From fa85e838173e858b0b3c062abd9c7e4dd424976b Mon Sep 17 00:00:00 2001 From: Dan Ditomaso Date: Fri, 28 Feb 2025 14:59:17 -0500 Subject: [PATCH 1/6] fix: connected labels to inputs, improving accessibility and testability --- src/components/Form/DynamicForm.tsx | 39 ++++++++++--------- src/components/Form/FormInput.tsx | 1 + src/components/Form/FormPasswordGenerator.tsx | 2 + src/components/Form/FormSelect.tsx | 2 +- src/components/Form/FormToggle.tsx | 1 + src/components/Form/FormWrapper.tsx | 4 +- .../Config/Security/Security.tsx | 2 + src/components/UI/Generator.tsx | 4 +- 8 files changed, 34 insertions(+), 21 deletions(-) diff --git a/src/components/Form/DynamicForm.tsx b/src/components/Form/DynamicForm.tsx index 7009c89a..e883b004 100644 --- a/src/components/Form/DynamicForm.tsx +++ b/src/components/Form/DynamicForm.tsx @@ -98,24 +98,27 @@ export function DynamicForm({ {fieldGroup.description} - {fieldGroup.fields.map((field) => ( - - - - ))} + {fieldGroup.fields.map((field) => { + return ( + + + + ); + })} ))} {hasSubmitButton && } diff --git a/src/components/Form/FormInput.tsx b/src/components/Form/FormInput.tsx index 5fef2794..d50af067 100644 --- a/src/components/Form/FormInput.tsx +++ b/src/components/Form/FormInput.tsx @@ -53,6 +53,7 @@ export function GenericInput({ } step={field.properties?.step} value={field.type === "number" ? Number.parseFloat(value) : value} + id={field.name} onChange={(e) => { if (field.inputChange) field.inputChange(e); onChange( diff --git a/src/components/Form/FormPasswordGenerator.tsx b/src/components/Form/FormPasswordGenerator.tsx index 622e502e..6fc4aac7 100644 --- a/src/components/Form/FormPasswordGenerator.tsx +++ b/src/components/Form/FormPasswordGenerator.tsx @@ -11,6 +11,7 @@ import { Controller, type FieldValues } from "react-hook-form"; export interface PasswordGeneratorProps extends BaseFormBuilderProps { type: "passwordGenerator"; + id: string; hide?: boolean; bits?: { text: string; value: string; key: string }[]; devicePSKBitCount: number; @@ -41,6 +42,7 @@ export function PasswordGenerator({ render={({ field: { value, ...rest } }) => ( ({ {...remainingProperties} {...rest} > - + diff --git a/src/components/Form/FormToggle.tsx b/src/components/Form/FormToggle.tsx index e79bac76..d1b0567b 100644 --- a/src/components/Form/FormToggle.tsx +++ b/src/components/Form/FormToggle.tsx @@ -33,6 +33,7 @@ export function ToggleInput({
- +

{description}

diff --git a/src/components/PageComponents/Config/Security/Security.tsx b/src/components/PageComponents/Config/Security/Security.tsx index 9a1c72e9..85ba36fd 100644 --- a/src/components/PageComponents/Config/Security/Security.tsx +++ b/src/components/PageComponents/Config/Security/Security.tsx @@ -164,6 +164,7 @@ export const Security = () => { fields: [ { type: "passwordGenerator", + id: "pskInput", name: "privateKey", label: "Private Key", description: "Used to create a shared key with a remote device", @@ -234,6 +235,7 @@ export const Security = () => { { type: "passwordGenerator", name: "adminKey", + id: "adminKeyInput", label: "Admin Key", description: "The public key authorized to send admin messages to this node", diff --git a/src/components/UI/Generator.tsx b/src/components/UI/Generator.tsx index 6caf4ccc..80427c85 100644 --- a/src/components/UI/Generator.tsx +++ b/src/components/UI/Generator.tsx @@ -15,6 +15,7 @@ export interface GeneratorProps extends React.BaseHTMLAttributes { type: "text" | "password"; devicePSKBitCount?: number; value: string; + id: string; variant: "default" | "invalid"; actionButtons: { text: string; @@ -37,6 +38,7 @@ const Generator = React.forwardRef( { type, devicePSKBitCount, + id = "pskInput", variant, value, actionButtons, @@ -73,7 +75,7 @@ const Generator = React.forwardRef( <> Date: Sat, 1 Mar 2025 13:33:35 +0800 Subject: [PATCH 2/6] update dependencies --- .npmrc | 2 +- package.json | 40 +++++------ src/App.tsx | 30 ++++---- src/components/Dialog/DeviceNameDialog.tsx | 3 +- src/components/Dialog/ImportDialog.tsx | 29 +++++--- src/components/Dialog/QRDialog.tsx | 18 +++-- src/components/PageComponents/Channel.tsx | 68 +++++++++---------- .../PageComponents/Config/Bluetooth.tsx | 8 +-- .../PageComponents/Config/Device.tsx | 3 +- .../PageComponents/Config/Display.tsx | 3 +- src/components/PageComponents/Config/LoRa.tsx | 3 +- .../PageComponents/Config/Network.tsx | 18 +++-- .../PageComponents/Config/Position.tsx | 3 +- .../PageComponents/Config/Power.tsx | 3 +- .../Config/Security/Security.tsx | 16 +++-- .../ModuleConfig/AmbientLighting.tsx | 3 +- .../PageComponents/ModuleConfig/Audio.tsx | 3 +- .../ModuleConfig/CannedMessage.tsx | 18 +++-- .../ModuleConfig/DetectionSensor.tsx | 3 +- .../ModuleConfig/ExternalNotification.tsx | 3 +- .../PageComponents/ModuleConfig/MQTT.tsx | 63 ++++++++--------- .../ModuleConfig/NeighborInfo.tsx | 3 +- .../ModuleConfig/Paxcounter.tsx | 3 +- .../PageComponents/ModuleConfig/RangeTest.tsx | 3 +- .../PageComponents/ModuleConfig/Serial.tsx | 3 +- .../ModuleConfig/StoreForward.tsx | 3 +- .../PageComponents/ModuleConfig/Telemetry.tsx | 3 +- src/core/stores/deviceStore.ts | 51 ++++++-------- src/pages/Map/index.tsx | 29 ++++---- tsconfig.json | 4 +- 30 files changed, 238 insertions(+), 204 deletions(-) diff --git a/.npmrc b/.npmrc index 8dd477af..41583e36 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1 @@ -@buf:registry=https://buf.build/gen/npm/v1 +@jsr:registry=https://npm.jsr.io diff --git a/package.json b/package.json index 0ea7e064..6b060bcb 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ }, "homepage": "https://meshtastic.org", "dependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@meshtastic/js": "2.3.7-5", + "@bufbuild/protobuf": "^2.2.3", + "@meshtastic/js": "npm:@jsr/meshtastic__js@2.6.0-0", "@noble/curves": "^1.8.1", "@radix-ui/react-accordion": "^1.2.3", "@radix-ui/react-checkbox": "^1.1.4", @@ -63,44 +63,44 @@ "crypto-random-string": "^5.0.0", "immer": "^10.1.1", "js-cookie": "^3.0.5", - "lucide-react": "^0.475.0", - "mapbox-gl": "^3.9.4", - "maplibre-gl": "4.1.2", + "lucide-react": "^0.477.0", + "mapbox-gl": "^3.10.0", + "maplibre-gl": "5.1.1", "react": "^19.0.0", "react-dom": "^19.0.0", "react-hook-form": "^7.54.2", - "react-map-gl": "7.1.9", + "react-map-gl": "8.0.1", "react-qrcode-logo": "^3.0.0", - "react-scan": "^0.2.4", + "react-scan": "^0.2.8", "rfc4648": "^1.5.4", "vite-plugin-node-polyfills": "^0.23.0", "zustand": "5.0.3" }, "devDependencies": { "@biomejs/biome": "^1.9.4", - "@tailwindcss/postcss": "^4.0.7", + "@tailwindcss/postcss": "^4.0.9", "@testing-library/react": "^16.2.0", - "@types/chrome": "^0.0.304", + "@types/chrome": "^0.0.307", "@types/js-cookie": "^3.0.6", - "@types/node": "^22.13.4", + "@types/node": "^22.13.7", "@types/react": "^19.0.10", "@types/react-dom": "^19.0.4", - "@types/serviceworker": "^0.0.122", - "@types/w3c-web-serial": "^1.0.7", - "@types/web-bluetooth": "^0.0.20", + "@types/serviceworker": "^0.0.123", + "@types/w3c-web-serial": "^1.0.8", + "@types/web-bluetooth": "^0.0.21", "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", "gzipper": "^8.2.0", - "happy-dom": "^17.1.4", - "postcss": "^8.5.1", + "happy-dom": "^17.1.8", + "postcss": "^8.5.3", "simple-git-hooks": "^2.11.1", - "tailwind-merge": "^3.0.1", - "tailwindcss": "^4.0.7", + "tailwind-merge": "^3.0.2", + "tailwindcss": "^4.0.9", "tailwindcss-animate": "^1.0.7", "tar": "^7.4.3", - "typescript": "^5.7.3", - "vite": "^6.1.1", + "typescript": "^5.8.2", + "vite": "^6.2.0", "vite-plugin-pwa": "^0.21.1", - "vitest": "^3.0.6" + "vitest": "^3.0.7" } } diff --git a/src/App.tsx b/src/App.tsx index eb5bb1bd..a7c278fb 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,7 +12,7 @@ import { useAppStore } from "@core/stores/appStore.ts"; import { useDeviceStore } from "@core/stores/deviceStore.ts"; import { Dashboard } from "@pages/Dashboard/index.tsx"; import type { JSX } from "react"; -import { MapProvider } from "react-map-gl"; +import { MapProvider } from "react-map-gl/maplibre"; export const App = (): JSX.Element => { const { getDevice } = useDeviceStore(); @@ -36,19 +36,21 @@ export const App = (): JSX.Element => {
- {device ? ( -
- - - - -
- ) : ( - <> - -
- - )} + {device + ? ( +
+ + + + +
+ ) + : ( + <> + +
+ + )}
diff --git a/src/components/Dialog/DeviceNameDialog.tsx b/src/components/Dialog/DeviceNameDialog.tsx index 1b27ed8d..d6146972 100644 --- a/src/components/Dialog/DeviceNameDialog.tsx +++ b/src/components/Dialog/DeviceNameDialog.tsx @@ -12,6 +12,7 @@ import { Input } from "@components/UI/Input.tsx"; import { Label } from "@components/UI/Label.tsx"; import { Protobuf } from "@meshtastic/js"; import { useForm } from "react-hook-form"; +import { create } from "@bufbuild/protobuf"; export interface User { longName: string; @@ -40,7 +41,7 @@ export const DeviceNameDialog = ({ const onSubmit = handleSubmit((data) => { connection?.setOwner( - new Protobuf.Mesh.User({ + create(Protobuf.Mesh.UserSchema, { ...myNode?.user, ...data, }), diff --git a/src/components/Dialog/ImportDialog.tsx b/src/components/Dialog/ImportDialog.tsx index 5ea39e1c..5d9e22e1 100644 --- a/src/components/Dialog/ImportDialog.tsx +++ b/src/components/Dialog/ImportDialog.tsx @@ -1,3 +1,4 @@ +import { create, fromBinary } from "@bufbuild/protobuf"; import { Button } from "@components/UI/Button.tsx"; import { Checkbox } from "@components/UI/Checkbox.tsx"; import { @@ -55,7 +56,10 @@ export const ImportDialog = ({ .replace(/-/g, "+") .replace(/_/g, "/"); setChannelSet( - Protobuf.AppOnly.ChannelSet.fromBinary(toByteArray(paddedString)), + fromBinary( + Protobuf.AppOnly.ChannelSetSchema, + toByteArray(paddedString), + ), ); setValidUrl(true); } catch (error) { @@ -67,12 +71,11 @@ export const ImportDialog = ({ const apply = () => { channelSet?.settings.map((ch: unknown, index: number) => { connection?.setChannel( - new Protobuf.Channel.Channel({ + create(Protobuf.Channel.ChannelSchema, { index, - role: - index === 0 - ? Protobuf.Channel.Channel_Role.PRIMARY - : Protobuf.Channel.Channel_Role.SECONDARY, + role: index === 0 + ? Protobuf.Channel.Channel_Role.PRIMARY + : Protobuf.Channel.Channel_Role.SECONDARY, settings: ch, }), ); @@ -80,7 +83,7 @@ export const ImportDialog = ({ if (channelSet?.loraConfig) { connection?.setConfig( - new Protobuf.Config.Config({ + create(Protobuf.Config.ConfigSchema, { payloadVariant: { case: "lora", value: channelSet.loraConfig, @@ -119,21 +122,25 @@ export const ImportDialog = ({ checked={channelSet?.loraConfig?.usePreset ?? true} />
- {/* */} + */ + }
- {/* */} + */ + } Channels: diff --git a/src/components/Dialog/QRDialog.tsx b/src/components/Dialog/QRDialog.tsx index 825464ec..2f4be9a5 100644 --- a/src/components/Dialog/QRDialog.tsx +++ b/src/components/Dialog/QRDialog.tsx @@ -1,3 +1,4 @@ +import { create, toBinary } from "@bufbuild/protobuf"; import { Checkbox } from "@components/UI/Checkbox.tsx"; import { Dialog, @@ -39,13 +40,16 @@ export const QRDialog = ({ .filter((ch) => selectedChannels.includes(ch.index)) .map((channel) => channel.settings) .filter((ch): ch is Protobuf.Channel.ChannelSettings => !!ch); - const encoded = new Protobuf.AppOnly.ChannelSet( - new Protobuf.AppOnly.ChannelSet({ + const encoded = create( + Protobuf.AppOnly.ChannelSetSchema, + create(Protobuf.AppOnly.ChannelSetSchema, { loraConfig, settings: channelsToEncode, }), ); - const base64 = fromByteArray(encoded.toBinary()) + const base64 = fromByteArray( + toBinary(Protobuf.AppOnly.ChannelSetSchema, encoded), + ) .replace(/=/g, "") .replace(/\+/g, "-") .replace(/\//g, "_"); @@ -73,8 +77,8 @@ export const QRDialog = ({ {channel.settings?.name.length ? channel.settings.name : channel.role === Protobuf.Channel.Channel_Role.PRIMARY - ? "Primary" - : `Channel: ${channel.index}`} + ? "Primary" + : `Channel: ${channel.index}`} { if (selectedChannels.includes(channel.index)) { setSelectedChannels( - selectedChannels.filter((c) => c !== channel.index), + selectedChannels.filter((c) => + c !== channel.index + ), ); } else { setSelectedChannels([ diff --git a/src/components/PageComponents/Channel.tsx b/src/components/PageComponents/Channel.tsx index dcd69c17..5ae88160 100644 --- a/src/components/PageComponents/Channel.tsx +++ b/src/components/PageComponents/Channel.tsx @@ -7,6 +7,7 @@ import { fromByteArray, toByteArray } from "base64-js"; import cryptoRandomString from "crypto-random-string"; import { useState } from "react"; import { PkiRegenerateDialog } from "../Dialog/PkiRegenerateDialog"; +import { create } from "@bufbuild/protobuf"; export interface SettingsPanelProps { channel: Protobuf.Channel.Channel; @@ -23,11 +24,12 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { channel?.settings?.psk.length ?? 16, ); const [validationText, setValidationText] = useState(); - const [preSharedDialogOpen, setPreSharedDialogOpen] = - useState(false); + const [preSharedDialogOpen, setPreSharedDialogOpen] = useState( + false, + ); const onSubmit = (data: ChannelValidation) => { - const channel = new Protobuf.Channel.Channel({ + const channel = create(Protobuf.Channel.ChannelSchema, { ...data, settings: { ...data.settings, @@ -106,7 +108,7 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { channel?.settings?.moduleSettings?.positionPrecision === 32, positionPrecision: channel?.settings?.moduleSettings?.positionPrecision === - undefined + undefined ? 10 : channel?.settings?.moduleSettings?.positionPrecision, }, @@ -125,10 +127,9 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { description: "Device telemetry is sent over PRIMARY. Only one PRIMARY allowed", properties: { - enumValue: - channel.index === 0 - ? { PRIMARY: 1 } - : { DISABLED: 0, SECONDARY: 2 }, + enumValue: channel.index === 0 + ? { PRIMARY: 1 } + : { DISABLED: 0, SECONDARY: 2 }, }, }, { @@ -191,32 +192,31 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { description: "If not sharing precise location, position shared on channel will be accurate within this distance", properties: { - enumValue: - config.display?.units === 0 - ? { - "Within 23 km": 10, - "Within 12 km": 11, - "Within 5.8 km": 12, - "Within 2.9 km": 13, - "Within 1.5 km": 14, - "Within 700 m": 15, - "Within 350 m": 16, - "Within 200 m": 17, - "Within 90 m": 18, - "Within 50 m": 19, - } - : { - "Within 15 miles": 10, - "Within 7.3 miles": 11, - "Within 3.6 miles": 12, - "Within 1.8 miles": 13, - "Within 0.9 miles": 14, - "Within 0.5 miles": 15, - "Within 0.2 miles": 16, - "Within 600 feet": 17, - "Within 300 feet": 18, - "Within 150 feet": 19, - }, + enumValue: config.display?.units === 0 + ? { + "Within 23 km": 10, + "Within 12 km": 11, + "Within 5.8 km": 12, + "Within 2.9 km": 13, + "Within 1.5 km": 14, + "Within 700 m": 15, + "Within 350 m": 16, + "Within 200 m": 17, + "Within 90 m": 18, + "Within 50 m": 19, + } + : { + "Within 15 miles": 10, + "Within 7.3 miles": 11, + "Within 3.6 miles": 12, + "Within 1.8 miles": 13, + "Within 0.9 miles": 14, + "Within 0.5 miles": 15, + "Within 0.2 miles": 16, + "Within 600 feet": 17, + "Within 300 feet": 18, + "Within 150 feet": 19, + }, }, }, ], diff --git a/src/components/PageComponents/Config/Bluetooth.tsx b/src/components/PageComponents/Config/Bluetooth.tsx index 21bc7c4e..474663bd 100644 --- a/src/components/PageComponents/Config/Bluetooth.tsx +++ b/src/components/PageComponents/Config/Bluetooth.tsx @@ -1,5 +1,6 @@ import { useAppStore } from "@app/core/stores/appStore"; import type { BluetoothValidation } from "@app/validation/config/bluetooth.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -53,7 +54,7 @@ export const Bluetooth = () => { } setWorkingConfig( - new Protobuf.Config.Config({ + create(Protobuf.Config.ConfigSchema, { payloadVariant: { case: "bluetooth", value: data, @@ -110,9 +111,8 @@ export const Bluetooth = () => { disabledBy: [ { fieldName: "mode", - selector: - Protobuf.Config.Config_BluetoothConfig_PairingMode - .FIXED_PIN, + selector: Protobuf.Config.Config_BluetoothConfig_PairingMode + .FIXED_PIN, invert: true, }, { diff --git a/src/components/PageComponents/Config/Device.tsx b/src/components/PageComponents/Config/Device.tsx index 17ee8cb2..c06fe178 100644 --- a/src/components/PageComponents/Config/Device.tsx +++ b/src/components/PageComponents/Config/Device.tsx @@ -1,4 +1,5 @@ import type { DeviceValidation } from "@app/validation/config/device.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const Device = (): JSX.Element => { const onSubmit = (data: DeviceValidation) => { setWorkingConfig( - new Protobuf.Config.Config({ + create(Protobuf.Config.ConfigSchema, { payloadVariant: { case: "device", value: data, diff --git a/src/components/PageComponents/Config/Display.tsx b/src/components/PageComponents/Config/Display.tsx index 5589a8a7..64b5b368 100644 --- a/src/components/PageComponents/Config/Display.tsx +++ b/src/components/PageComponents/Config/Display.tsx @@ -1,4 +1,5 @@ import type { DisplayValidation } from "@app/validation/config/display.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const Display = (): JSX.Element => { const onSubmit = (data: DisplayValidation) => { setWorkingConfig( - new Protobuf.Config.Config({ + create(Protobuf.Config.ConfigSchema, { payloadVariant: { case: "display", value: data, diff --git a/src/components/PageComponents/Config/LoRa.tsx b/src/components/PageComponents/Config/LoRa.tsx index 80665f6c..8dfb81c9 100644 --- a/src/components/PageComponents/Config/LoRa.tsx +++ b/src/components/PageComponents/Config/LoRa.tsx @@ -1,4 +1,5 @@ import type { LoRaValidation } from "@app/validation/config/lora.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const LoRa = (): JSX.Element => { const onSubmit = (data: LoRaValidation) => { setWorkingConfig( - new Protobuf.Config.Config({ + create(Protobuf.Config.ConfigSchema, { payloadVariant: { case: "lora", value: data, diff --git a/src/components/PageComponents/Config/Network.tsx b/src/components/PageComponents/Config/Network.tsx index afda4eb5..76f1d54d 100644 --- a/src/components/PageComponents/Config/Network.tsx +++ b/src/components/PageComponents/Config/Network.tsx @@ -1,4 +1,5 @@ import type { NetworkValidation } from "@app/validation/config/network.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { @@ -12,17 +13,20 @@ export const Network = (): JSX.Element => { const onSubmit = (data: NetworkValidation) => { setWorkingConfig( - new Protobuf.Config.Config({ + create(Protobuf.Config.ConfigSchema, { payloadVariant: { case: "network", value: { ...data, - ipv4Config: new Protobuf.Config.Config_NetworkConfig_IpV4Config({ - ip: convertIpAddressToInt(data.ipv4Config.ip) ?? 0, - gateway: convertIpAddressToInt(data.ipv4Config.gateway) ?? 0, - subnet: convertIpAddressToInt(data.ipv4Config.subnet) ?? 0, - dns: convertIpAddressToInt(data.ipv4Config.dns) ?? 0, - }), + ipv4Config: create( + Protobuf.Config.Config_NetworkConfig_IpV4ConfigSchema, + { + ip: convertIpAddressToInt(data.ipv4Config.ip) ?? 0, + gateway: convertIpAddressToInt(data.ipv4Config.gateway) ?? 0, + subnet: convertIpAddressToInt(data.ipv4Config.subnet) ?? 0, + dns: convertIpAddressToInt(data.ipv4Config.dns) ?? 0, + }, + ), }, }, }), diff --git a/src/components/PageComponents/Config/Position.tsx b/src/components/PageComponents/Config/Position.tsx index e81af178..4aa3abba 100644 --- a/src/components/PageComponents/Config/Position.tsx +++ b/src/components/PageComponents/Config/Position.tsx @@ -3,6 +3,7 @@ import { usePositionFlags, } from "@app/core/hooks/usePositionFlags"; import type { PositionValidation } from "@app/validation/config/position.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -16,7 +17,7 @@ export const Position = () => { const onSubmit = (data: PositionValidation) => { return setWorkingConfig( - new Protobuf.Config.Config({ + create(Protobuf.Config.ConfigSchema, { payloadVariant: { case: "position", value: { ...data, positionFlags: flagsValue }, diff --git a/src/components/PageComponents/Config/Power.tsx b/src/components/PageComponents/Config/Power.tsx index 4f52be5f..e49d7ff6 100644 --- a/src/components/PageComponents/Config/Power.tsx +++ b/src/components/PageComponents/Config/Power.tsx @@ -1,4 +1,5 @@ import type { PowerValidation } from "@app/validation/config/power.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const Power = (): JSX.Element => { const onSubmit = (data: PowerValidation) => { setWorkingConfig( - new Protobuf.Config.Config({ + create(Protobuf.Config.ConfigSchema, { payloadVariant: { case: "power", value: data, diff --git a/src/components/PageComponents/Config/Security/Security.tsx b/src/components/PageComponents/Config/Security/Security.tsx index 85ba36fd..6047381b 100644 --- a/src/components/PageComponents/Config/Security/Security.tsx +++ b/src/components/PageComponents/Config/Security/Security.tsx @@ -12,6 +12,7 @@ import { fromByteArray, toByteArray } from "base64-js"; import { Eye, EyeOff } from "lucide-react"; import { useReducer } from "react"; import { securityReducer } from "./securityReducer"; +import { create } from "@bufbuild/protobuf"; export const Security = () => { const { config, setWorkingConfig, setDialogOpen } = useDevice(); @@ -57,7 +58,9 @@ export const Security = () => { if (input.length % 4 !== 0) { addError( fieldName, - `${fieldName === "privateKey" ? "Private" : "Admin"} Key is required to be a 256 bit pre-shared key (PSK)`, + `${ + fieldName === "privateKey" ? "Private" : "Admin" + } Key is required to be a 256 bit pre-shared key (PSK)`, ); return; } @@ -71,7 +74,9 @@ export const Security = () => { console.error(e); addError( fieldName, - `Invalid ${fieldName === "privateKey" ? "Private" : "Admin"} Key format`, + `Invalid ${ + fieldName === "privateKey" ? "Private" : "Admin" + } Key format`, ); } }; @@ -83,7 +88,7 @@ export const Security = () => { console.log(toByteArray(state.adminKey)); setWorkingConfig( - new Protobuf.Config.Config({ + create(Protobuf.Config.ConfigSchema, { payloadVariant: { case: "security", value: { @@ -243,7 +248,7 @@ export const Security = () => { ? getErrorMessage("adminKey") : "", inputChange: adminKeyInputChangeEvent, - selectChange: () => { }, + selectChange: () => {}, bits: [{ text: "256 bit", value: "32", key: "bit256" }], devicePSKBitCount: state.privateKeyBitCount, hide: !state.adminKeyVisible, @@ -303,8 +308,7 @@ export const Security = () => { - dispatch({ type: "SHOW_PRIVATE_KEY_DIALOG", payload: false }) - } + dispatch({ type: "SHOW_PRIVATE_KEY_DIALOG", payload: false })} onSubmit={pkiRegenerate} /> diff --git a/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx b/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx index 978ef633..f7853710 100644 --- a/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx +++ b/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx @@ -1,5 +1,6 @@ import { useDevice } from "@app/core/stores/deviceStore.ts"; import type { AmbientLightingValidation } from "@app/validation/moduleConfig/ambientLighting.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const AmbientLighting = (): JSX.Element => { const onSubmit = (data: AmbientLightingValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "ambientLighting", value: data, diff --git a/src/components/PageComponents/ModuleConfig/Audio.tsx b/src/components/PageComponents/ModuleConfig/Audio.tsx index c68bd9bf..46d2176c 100644 --- a/src/components/PageComponents/ModuleConfig/Audio.tsx +++ b/src/components/PageComponents/ModuleConfig/Audio.tsx @@ -1,4 +1,5 @@ import type { AudioValidation } from "@app/validation/moduleConfig/audio.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const Audio = (): JSX.Element => { const onSubmit = (data: AudioValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "audio", value: data, diff --git a/src/components/PageComponents/ModuleConfig/CannedMessage.tsx b/src/components/PageComponents/ModuleConfig/CannedMessage.tsx index 5fb1046a..672bbbb5 100644 --- a/src/components/PageComponents/ModuleConfig/CannedMessage.tsx +++ b/src/components/PageComponents/ModuleConfig/CannedMessage.tsx @@ -1,4 +1,5 @@ import type { CannedMessageValidation } from "@app/validation/moduleConfig/cannedMessage.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const CannedMessage = (): JSX.Element => { const onSubmit = (data: CannedMessageValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "cannedMessage", value: data, @@ -62,9 +63,8 @@ export const CannedMessage = (): JSX.Element => { label: "Clockwise event", description: "Select input event.", properties: { - enumValue: - Protobuf.ModuleConfig - .ModuleConfig_CannedMessageConfig_InputEventChar, + enumValue: Protobuf.ModuleConfig + .ModuleConfig_CannedMessageConfig_InputEventChar, }, }, { @@ -73,9 +73,8 @@ export const CannedMessage = (): JSX.Element => { label: "Counter Clockwise event", description: "Select input event.", properties: { - enumValue: - Protobuf.ModuleConfig - .ModuleConfig_CannedMessageConfig_InputEventChar, + enumValue: Protobuf.ModuleConfig + .ModuleConfig_CannedMessageConfig_InputEventChar, }, }, { @@ -84,9 +83,8 @@ export const CannedMessage = (): JSX.Element => { label: "Press event", description: "Select input event", properties: { - enumValue: - Protobuf.ModuleConfig - .ModuleConfig_CannedMessageConfig_InputEventChar, + enumValue: Protobuf.ModuleConfig + .ModuleConfig_CannedMessageConfig_InputEventChar, }, }, { diff --git a/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx b/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx index c7ec3c98..e547fab1 100644 --- a/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx +++ b/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx @@ -1,5 +1,6 @@ import { useDevice } from "@app/core/stores/deviceStore.ts"; import type { DetectionSensorValidation } from "@app/validation/moduleConfig/detectionSensor.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const DetectionSensor = (): JSX.Element => { const onSubmit = (data: DetectionSensorValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "detectionSensor", value: data, diff --git a/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx b/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx index f6b52662..dfe61fad 100644 --- a/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx +++ b/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx @@ -1,4 +1,5 @@ import type { ExternalNotificationValidation } from "@app/validation/moduleConfig/externalNotification.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const ExternalNotification = (): JSX.Element => { const onSubmit = (data: ExternalNotificationValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "externalNotification", value: data, diff --git a/src/components/PageComponents/ModuleConfig/MQTT.tsx b/src/components/PageComponents/ModuleConfig/MQTT.tsx index bb9b1527..4b6bfe25 100644 --- a/src/components/PageComponents/ModuleConfig/MQTT.tsx +++ b/src/components/PageComponents/ModuleConfig/MQTT.tsx @@ -1,5 +1,6 @@ import { useDevice } from "@app/core/stores/deviceStore.ts"; import type { MqttValidation } from "@app/validation/moduleConfig/mqtt.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { Protobuf } from "@meshtastic/js"; @@ -8,15 +9,16 @@ export const MQTT = (): JSX.Element => { const onSubmit = (data: MqttValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "mqtt", value: { ...data, - mapReportSettings: - new Protobuf.ModuleConfig.ModuleConfig_MapReportSettings( - data.mapReportSettings, - ), + mapReportSettings: create( + Protobuf.ModuleConfig + .ModuleConfig_MapReportSettingsSchema, + data.mapReportSettings, + ), }, }, }), @@ -164,32 +166,31 @@ export const MQTT = (): JSX.Element => { description: "Position shared will be accurate within this distance", properties: { - enumValue: - config.display?.units === 0 - ? { - "Within 23 km": 10, - "Within 12 km": 11, - "Within 5.8 km": 12, - "Within 2.9 km": 13, - "Within 1.5 km": 14, - "Within 700 m": 15, - "Within 350 m": 16, - "Within 200 m": 17, - "Within 90 m": 18, - "Within 50 m": 19, - } - : { - "Within 15 miles": 10, - "Within 7.3 miles": 11, - "Within 3.6 miles": 12, - "Within 1.8 miles": 13, - "Within 0.9 miles": 14, - "Within 0.5 miles": 15, - "Within 0.2 miles": 16, - "Within 600 feet": 17, - "Within 300 feet": 18, - "Within 150 feet": 19, - }, + enumValue: config.display?.units === 0 + ? { + "Within 23 km": 10, + "Within 12 km": 11, + "Within 5.8 km": 12, + "Within 2.9 km": 13, + "Within 1.5 km": 14, + "Within 700 m": 15, + "Within 350 m": 16, + "Within 200 m": 17, + "Within 90 m": 18, + "Within 50 m": 19, + } + : { + "Within 15 miles": 10, + "Within 7.3 miles": 11, + "Within 3.6 miles": 12, + "Within 1.8 miles": 13, + "Within 0.9 miles": 14, + "Within 0.5 miles": 15, + "Within 0.2 miles": 16, + "Within 600 feet": 17, + "Within 300 feet": 18, + "Within 150 feet": 19, + }, }, disabledBy: [ { diff --git a/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx b/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx index 9c878911..1dfa9532 100644 --- a/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx +++ b/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx @@ -1,5 +1,6 @@ import { useDevice } from "@app/core/stores/deviceStore.ts"; import type { NeighborInfoValidation } from "@app/validation/moduleConfig/neighborInfo.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const NeighborInfo = (): JSX.Element => { const onSubmit = (data: NeighborInfoValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "neighborInfo", value: data, diff --git a/src/components/PageComponents/ModuleConfig/Paxcounter.tsx b/src/components/PageComponents/ModuleConfig/Paxcounter.tsx index e31a298c..d4118b8e 100644 --- a/src/components/PageComponents/ModuleConfig/Paxcounter.tsx +++ b/src/components/PageComponents/ModuleConfig/Paxcounter.tsx @@ -1,4 +1,5 @@ import type { PaxcounterValidation } from "@app/validation/moduleConfig/paxcounter.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const Paxcounter = (): JSX.Element => { const onSubmit = (data: PaxcounterValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "paxcounter", value: data, diff --git a/src/components/PageComponents/ModuleConfig/RangeTest.tsx b/src/components/PageComponents/ModuleConfig/RangeTest.tsx index a661805d..6c98d45a 100644 --- a/src/components/PageComponents/ModuleConfig/RangeTest.tsx +++ b/src/components/PageComponents/ModuleConfig/RangeTest.tsx @@ -1,4 +1,5 @@ import type { RangeTestValidation } from "@app/validation/moduleConfig/rangeTest.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const RangeTest = (): JSX.Element => { const onSubmit = (data: RangeTestValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "rangeTest", value: data, diff --git a/src/components/PageComponents/ModuleConfig/Serial.tsx b/src/components/PageComponents/ModuleConfig/Serial.tsx index 92db0d9a..e7afd3eb 100644 --- a/src/components/PageComponents/ModuleConfig/Serial.tsx +++ b/src/components/PageComponents/ModuleConfig/Serial.tsx @@ -1,4 +1,5 @@ import type { SerialValidation } from "@app/validation/moduleConfig/serial.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const Serial = (): JSX.Element => { const onSubmit = (data: SerialValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "serial", value: data, diff --git a/src/components/PageComponents/ModuleConfig/StoreForward.tsx b/src/components/PageComponents/ModuleConfig/StoreForward.tsx index 6fe5c585..dbd17c28 100644 --- a/src/components/PageComponents/ModuleConfig/StoreForward.tsx +++ b/src/components/PageComponents/ModuleConfig/StoreForward.tsx @@ -1,4 +1,5 @@ import type { StoreForwardValidation } from "@app/validation/moduleConfig/storeForward.ts"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const StoreForward = (): JSX.Element => { const onSubmit = (data: StoreForwardValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "storeForward", value: data, diff --git a/src/components/PageComponents/ModuleConfig/Telemetry.tsx b/src/components/PageComponents/ModuleConfig/Telemetry.tsx index 24074f48..c6e9f4fb 100644 --- a/src/components/PageComponents/ModuleConfig/Telemetry.tsx +++ b/src/components/PageComponents/ModuleConfig/Telemetry.tsx @@ -1,4 +1,5 @@ import type { TelemetryValidation } from "@app/validation/moduleConfig/telemetry.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; @@ -8,7 +9,7 @@ export const Telemetry = (): JSX.Element => { const onSubmit = (data: TelemetryValidation) => { setWorkingModuleConfig( - new Protobuf.ModuleConfig.ModuleConfig({ + create(Protobuf.ModuleConfig.ModuleConfigSchema, { payloadVariant: { case: "telemetry", value: data, diff --git a/src/core/stores/deviceStore.ts b/src/core/stores/deviceStore.ts index a4ad7b69..74c4453b 100644 --- a/src/core/stores/deviceStore.ts +++ b/src/core/stores/deviceStore.ts @@ -1,9 +1,8 @@ import { createContext, useContext } from "react"; - import { produce } from "immer"; -import { create } from "zustand"; - +import { create as createStore } from "zustand"; import { Protobuf, Types } from "@meshtastic/js"; +import { create } from "@bufbuild/protobuf"; export type Page = "messages" | "map" | "config" | "channels" | "nodes"; @@ -111,7 +110,7 @@ export interface DeviceState { getDevice: (id: number) => Device | undefined; } -export const useDeviceStore = create((set, get) => ({ +export const useDeviceStore = createStore((set, get) => ({ devices: new Map(), remoteDevices: new Map(), @@ -122,11 +121,11 @@ export const useDeviceStore = create((set, get) => ({ id, status: Types.DeviceStatusEnum.DeviceDisconnected, channels: new Map(), - config: new Protobuf.LocalOnly.LocalConfig(), - moduleConfig: new Protobuf.LocalOnly.LocalModuleConfig(), + config: create(Protobuf.LocalOnly.LocalConfigSchema), + moduleConfig: create(Protobuf.LocalOnly.LocalModuleConfigSchema), workingConfig: [], workingModuleConfig: [], - hardware: new Protobuf.Mesh.MyNodeInfo(), + hardware: create(Protobuf.Mesh.MyNodeInfoSchema), nodes: new Map(), metadata: new Map(), messages: { @@ -138,7 +137,6 @@ export const useDeviceStore = create((set, get) => ({ activePage: "messages", activeNode: 0, waypoints: [], - // currentMetrics: new Protobuf.DeviceMetrics(), dialog: { import: false, QR: false, @@ -301,11 +299,11 @@ export const useDeviceStore = create((set, get) => ({ if (!device) { return; } - const workingModuleConfigIndex = - device?.workingModuleConfig.findIndex( + const workingModuleConfigIndex = device?.workingModuleConfig + .findIndex( (wmc) => wmc.payloadVariant.case === - moduleConfig.payloadVariant.case, + moduleConfig.payloadVariant.case, ); if (workingModuleConfigIndex !== -1) { device.workingModuleConfig[workingModuleConfigIndex] = @@ -447,8 +445,8 @@ export const useDeviceStore = create((set, get) => ({ if (!device) { return; } - const currentNode = - device.nodes.get(user.from) ?? new Protobuf.Mesh.NodeInfo(); + const currentNode = device.nodes.get(user.from) ?? + create(Protobuf.Mesh.NodeInfoSchema); currentNode.user = user.data; device.nodes.set(user.from, currentNode); }), @@ -461,9 +459,8 @@ export const useDeviceStore = create((set, get) => ({ if (!device) { return; } - const currentNode = - device.nodes.get(position.from) ?? - new Protobuf.Mesh.NodeInfo(); + const currentNode = device.nodes.get(position.from) ?? + create(Protobuf.Mesh.NodeInfoSchema); currentNode.position = position.data; device.nodes.set(position.from, currentNode); }), @@ -487,12 +484,11 @@ export const useDeviceStore = create((set, get) => ({ return; } const messageGroup = device.messages[message.type]; - const messageIndex = - message.type === "direct" - ? message.from === device.hardware.myNodeNum - ? message.to - : message.from - : message.channel; + const messageIndex = message.type === "direct" + ? message.from === device.hardware.myNodeNum + ? message.to + : message.from + : message.channel; const messages = messageGroup.get(messageIndex); if (messages) { @@ -565,12 +561,9 @@ export const useDeviceStore = create((set, get) => ({ } const messageGroup = device.messages[type]; - const messageIndex = - type === "direct" - ? from === device.hardware.myNodeNum - ? to - : from - : channelIndex; + const messageIndex = type === "direct" + ? from === device.hardware.myNodeNum ? to : from + : channelIndex; const messages = messageGroup.get(messageIndex); if (!messages) { @@ -618,7 +611,7 @@ export const useDeviceStore = create((set, get) => ({ } else { device.nodes.set( data.from, - new Protobuf.Mesh.NodeInfo({ + create(Protobuf.Mesh.NodeInfoSchema, { num: data.from, lastHeard: data.time, snr: data.snr, diff --git a/src/pages/Map/index.tsx b/src/pages/Map/index.tsx index 481b88c7..bb69825c 100644 --- a/src/pages/Map/index.tsx +++ b/src/pages/Map/index.tsx @@ -17,7 +17,7 @@ import { Popup, ScaleControl, useMap, -} from "react-map-gl"; +} from "react-map-gl/maplibre"; import MapGl from "react-map-gl/maplibre"; type NodePosition = { @@ -40,8 +40,9 @@ const MapPage = (): JSX.Element => { const darkMode = currentTheme === "dark"; - const [selectedNode, setSelectedNode] = - useState(null); + const [selectedNode, setSelectedNode] = useState< + Protobuf.Mesh.NodeInfo | null + >(null); // Filter out nodes without a valid position const validNodes = useMemo( @@ -185,16 +186,18 @@ const MapPage = (): JSX.Element => { ))} {markers} - {selectedNode ? ( - setSelectedNode(null)} - > - - - ) : null} + {selectedNode + ? ( + setSelectedNode(null)} + > + + + ) + : null} diff --git a/tsconfig.json b/tsconfig.json index 9f4e8d3f..91f1dff3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,8 +10,8 @@ "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", + "module": "NodeNext", + "moduleResolution": "nodenext", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, From f31ac247070f3ee1fb6b845e3a60a23332b77f58 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sat, 1 Mar 2025 13:34:05 +0800 Subject: [PATCH 3/6] fix formatting --- bun.lock | 275 +++++++++--------- src/App.tsx | 28 +- src/components/Dialog/DeviceNameDialog.tsx | 2 +- src/components/Dialog/ImportDialog.tsx | 19 +- src/components/Dialog/QRDialog.tsx | 8 +- src/components/PageComponents/Channel.tsx | 67 ++--- .../PageComponents/Config/Bluetooth.tsx | 5 +- .../Config/Security/Security.tsx | 5 +- .../ModuleConfig/CannedMessage.tsx | 15 +- .../PageComponents/ModuleConfig/MQTT.tsx | 54 ++-- src/core/stores/deviceStore.ts | 38 ++- src/pages/Map/index.tsx | 27 +- 12 files changed, 270 insertions(+), 273 deletions(-) diff --git a/bun.lock b/bun.lock index c7c62d71..378b1a1f 100644 --- a/bun.lock +++ b/bun.lock @@ -4,8 +4,8 @@ "": { "name": "meshtastic-web", "dependencies": { - "@bufbuild/protobuf": "^1.10.0", - "@meshtastic/js": "2.3.7-5", + "@bufbuild/protobuf": "^2.2.3", + "@meshtastic/js": "npm:@jsr/meshtastic__js@2.6.0-0", "@noble/curves": "^1.8.1", "@radix-ui/react-accordion": "^1.2.3", "@radix-ui/react-checkbox": "^1.1.4", @@ -30,45 +30,45 @@ "crypto-random-string": "^5.0.0", "immer": "^10.1.1", "js-cookie": "^3.0.5", - "lucide-react": "^0.475.0", - "mapbox-gl": "^3.9.4", - "maplibre-gl": "4.1.2", + "lucide-react": "^0.477.0", + "mapbox-gl": "^3.10.0", + "maplibre-gl": "5.1.1", "react": "^19.0.0", "react-dom": "^19.0.0", "react-hook-form": "^7.54.2", - "react-map-gl": "7.1.9", + "react-map-gl": "8.0.1", "react-qrcode-logo": "^3.0.0", - "react-scan": "^0.2.4", + "react-scan": "^0.2.8", "rfc4648": "^1.5.4", "vite-plugin-node-polyfills": "^0.23.0", "zustand": "5.0.3", }, "devDependencies": { "@biomejs/biome": "^1.9.4", - "@tailwindcss/postcss": "^4.0.7", + "@tailwindcss/postcss": "^4.0.9", "@testing-library/react": "^16.2.0", - "@types/chrome": "^0.0.304", + "@types/chrome": "^0.0.307", "@types/js-cookie": "^3.0.6", - "@types/node": "^22.13.4", + "@types/node": "^22.13.7", "@types/react": "^19.0.10", "@types/react-dom": "^19.0.4", - "@types/serviceworker": "^0.0.122", - "@types/w3c-web-serial": "^1.0.7", - "@types/web-bluetooth": "^0.0.20", + "@types/serviceworker": "^0.0.123", + "@types/w3c-web-serial": "^1.0.8", + "@types/web-bluetooth": "^0.0.21", "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", "gzipper": "^8.2.0", - "happy-dom": "^17.1.4", - "postcss": "^8.5.1", + "happy-dom": "^17.1.8", + "postcss": "^8.5.3", "simple-git-hooks": "^2.11.1", - "tailwind-merge": "^3.0.1", - "tailwindcss": "^4.0.7", + "tailwind-merge": "^3.0.2", + "tailwindcss": "^4.0.9", "tailwindcss-animate": "^1.0.7", "tar": "^7.4.3", - "typescript": "^5.7.3", - "vite": "^6.1.1", + "typescript": "^5.8.2", + "vite": "^6.2.0", "vite-plugin-pwa": "^0.21.1", - "vitest": "^3.0.6", + "vitest": "^3.0.7", }, }, }, @@ -277,61 +277,61 @@ "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@1.9.4", "", { "os": "win32", "cpu": "x64" }, "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA=="], - "@bufbuild/protobuf": ["@bufbuild/protobuf@1.10.0", "", {}, "sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag=="], + "@bufbuild/protobuf": ["@bufbuild/protobuf@2.2.3", "", {}, "sha512-tFQoXHJdkEOSwj5tRIZSPNUuXK3RaR7T1nUrPgbYX1pUbvqqaaZAsfo+NXBPsz5rZMSKVFrgK1WL8Q/MSLvprg=="], "@clack/core": ["@clack/core@0.3.5", "", { "dependencies": { "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-5cfhQNH+1VQ2xLQlmzXMqUoiaH0lRBq9/CLW9lTyMbuKLC3+xEK01tHVvyut++mLOn5urSHmkm6I0Lg9MaJSTQ=="], "@clack/prompts": ["@clack/prompts@0.8.2", "", { "dependencies": { "@clack/core": "0.3.5", "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-6b9Ab2UiZwJYA9iMyboYyW9yJvAO9V753ZhS+DHKEjZRKAxPPOb7MXXu84lsPFG+vZt6FRFniZ8rXi+zCIw4yQ=="], - "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.24.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA=="], + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.0", "", { "os": "aix", "cpu": "ppc64" }, "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ=="], - "@esbuild/android-arm": ["@esbuild/android-arm@0.24.2", "", { "os": "android", "cpu": "arm" }, "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q=="], + "@esbuild/android-arm": ["@esbuild/android-arm@0.25.0", "", { "os": "android", "cpu": "arm" }, "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g=="], - "@esbuild/android-arm64": ["@esbuild/android-arm64@0.24.2", "", { "os": "android", "cpu": "arm64" }, "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg=="], + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.25.0", "", { "os": "android", "cpu": "arm64" }, "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g=="], - "@esbuild/android-x64": ["@esbuild/android-x64@0.24.2", "", { "os": "android", "cpu": "x64" }, "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw=="], + "@esbuild/android-x64": ["@esbuild/android-x64@0.25.0", "", { "os": "android", "cpu": "x64" }, "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg=="], - "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.24.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA=="], + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.25.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw=="], - "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.24.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA=="], + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.25.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg=="], - "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.24.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg=="], + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.25.0", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w=="], - "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.24.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q=="], + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.25.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A=="], - "@esbuild/linux-arm": ["@esbuild/linux-arm@0.24.2", "", { "os": "linux", "cpu": "arm" }, "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA=="], + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.25.0", "", { "os": "linux", "cpu": "arm" }, "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg=="], - "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.24.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg=="], + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.25.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg=="], - "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.24.2", "", { "os": "linux", "cpu": "ia32" }, "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw=="], + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.25.0", "", { "os": "linux", "cpu": "ia32" }, "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg=="], - "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.24.2", "", { "os": "linux", "cpu": "none" }, "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ=="], + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.25.0", "", { "os": "linux", "cpu": "none" }, "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw=="], - "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.24.2", "", { "os": "linux", "cpu": "none" }, "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw=="], + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.25.0", "", { "os": "linux", "cpu": "none" }, "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ=="], - "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.24.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw=="], + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.25.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw=="], - "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.24.2", "", { "os": "linux", "cpu": "none" }, "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q=="], + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.25.0", "", { "os": "linux", "cpu": "none" }, "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA=="], - "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.24.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw=="], + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.25.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA=="], - "@esbuild/linux-x64": ["@esbuild/linux-x64@0.24.2", "", { "os": "linux", "cpu": "x64" }, "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q=="], + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.25.0", "", { "os": "linux", "cpu": "x64" }, "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw=="], - "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.24.2", "", { "os": "none", "cpu": "arm64" }, "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw=="], + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.25.0", "", { "os": "none", "cpu": "arm64" }, "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw=="], - "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.24.2", "", { "os": "none", "cpu": "x64" }, "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw=="], + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.25.0", "", { "os": "none", "cpu": "x64" }, "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA=="], - "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.24.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A=="], + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.25.0", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw=="], - "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.24.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA=="], + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.25.0", "", { "os": "openbsd", "cpu": "x64" }, "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg=="], - "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.24.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig=="], + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.25.0", "", { "os": "sunos", "cpu": "x64" }, "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg=="], - "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.24.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ=="], + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.25.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw=="], - "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.24.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA=="], + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.25.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA=="], - "@esbuild/win32-x64": ["@esbuild/win32-x64@0.24.2", "", { "os": "win32", "cpu": "x64" }, "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg=="], + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.0", "", { "os": "win32", "cpu": "x64" }, "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ=="], "@floating-ui/core": ["@floating-ui/core@1.6.9", "", { "dependencies": { "@floating-ui/utils": "^0.2.9" } }, "sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw=="], @@ -359,6 +359,8 @@ "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], + "@jsr/meshtastic__protobufs": ["@jsr/meshtastic__protobufs@2.6.0", "https://npm.jsr.io/~/11/@jsr/meshtastic__protobufs/2.6.0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3" } }, "sha512-CGlgBdzAuQCZuGPrnzP8zU+EcLlmyYeeMbqFHuJ834cYfArWXDjDh1UYaPo2rI03LTjqa3MeWpfqDlzBR8kIMg=="], + "@mapbox/geojson-rewind": ["@mapbox/geojson-rewind@0.5.2", "", { "dependencies": { "get-stream": "^6.0.1", "minimist": "^1.2.6" }, "bin": { "geojson-rewind": "geojson-rewind" } }, "sha512-tJaT+RbYGJYStt7wI3cq4Nl4SXxG8W7JDG5DMJu97V25RnbNg3QtQtf+KD+VLjNpWKYsRvXDNmNrBgEETr1ifA=="], "@mapbox/jsonlint-lines-primitives": ["@mapbox/jsonlint-lines-primitives@2.0.2", "", {}, "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ=="], @@ -375,9 +377,9 @@ "@mapbox/whoots-js": ["@mapbox/whoots-js@3.1.0", "", {}, "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q=="], - "@maplibre/maplibre-gl-style-spec": ["@maplibre/maplibre-gl-style-spec@20.4.0", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", "@mapbox/unitbezier": "^0.0.1", "json-stringify-pretty-compact": "^4.0.0", "minimist": "^1.2.8", "quickselect": "^2.0.0", "rw": "^1.3.3", "tinyqueue": "^3.0.0" }, "bin": { "gl-style-format": "dist/gl-style-format.mjs", "gl-style-migrate": "dist/gl-style-migrate.mjs", "gl-style-validate": "dist/gl-style-validate.mjs" } }, "sha512-AzBy3095fTFPjDjmWpR2w6HVRAZJ6hQZUCwk5Plz6EyfnfuQW1odeW5i2Ai47Y6TBA2hQnC+azscjBSALpaWgw=="], + "@maplibre/maplibre-gl-style-spec": ["@maplibre/maplibre-gl-style-spec@23.1.0", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", "@mapbox/unitbezier": "^0.0.1", "json-stringify-pretty-compact": "^4.0.0", "minimist": "^1.2.8", "quickselect": "^3.0.0", "rw": "^1.3.3", "tinyqueue": "^3.0.0" }, "bin": { "gl-style-migrate": "dist/gl-style-migrate.mjs", "gl-style-validate": "dist/gl-style-validate.mjs", "gl-style-format": "dist/gl-style-format.mjs" } }, "sha512-R6/ihEuC5KRexmKIYkWqUv84Gm+/QwsOUgHyt1yy2XqCdGdLvlBWVWIIeTZWN4NGdwmY6xDzdSGU2R9oBLNg2w=="], - "@meshtastic/js": ["@meshtastic/js@2.3.7-5", "", { "dependencies": { "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.2" } }, "sha512-77wYoCl83PgRLkvWE8ko0YFm5LbolrfFPqoBkwLd2AFgZOHGsHTlUwA7cj82yhZM3f4mf7yTFxl+8CBawEAXRA=="], + "@meshtastic/js": ["@jsr/meshtastic__js@2.6.0-0", "https://npm.jsr.io/~/11/@jsr/meshtastic__js/2.6.0-0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3", "@jsr/meshtastic__protobufs": "^2.6.0", "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.3" } }, "sha512-+xpZpxK6oUIVOuEs7C+LyxRr2druvc7UNNNTK9Rl8ioXj63Jz1uQXlYe2Gj0xjnRAiSQLR7QVaPef21BR/YTxA=="], "@noble/curves": ["@noble/curves@1.8.1", "", { "dependencies": { "@noble/hashes": "1.7.1" } }, "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ=="], @@ -527,33 +529,33 @@ "@surma/rollup-plugin-off-main-thread": ["@surma/rollup-plugin-off-main-thread@2.2.3", "", { "dependencies": { "ejs": "^3.1.6", "json5": "^2.2.0", "magic-string": "^0.25.0", "string.prototype.matchall": "^4.0.6" } }, "sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ=="], - "@tailwindcss/node": ["@tailwindcss/node@4.0.8", "", { "dependencies": { "enhanced-resolve": "^5.18.1", "jiti": "^2.4.2", "tailwindcss": "4.0.8" } }, "sha512-FKArQpbrbwv08TNT0k7ejYXpF+R8knZFAatNc0acOxbgeqLzwb86r+P3LGOjIeI3Idqe9CVkZrh4GlsJLJKkkw=="], + "@tailwindcss/node": ["@tailwindcss/node@4.0.9", "", { "dependencies": { "enhanced-resolve": "^5.18.1", "jiti": "^2.4.2", "tailwindcss": "4.0.9" } }, "sha512-tOJvdI7XfJbARYhxX+0RArAhmuDcczTC46DGCEziqxzzbIaPnfYaIyRT31n4u8lROrsO7Q6u/K9bmQHL2uL1bQ=="], - "@tailwindcss/oxide": ["@tailwindcss/oxide@4.0.8", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.0.8", "@tailwindcss/oxide-darwin-arm64": "4.0.8", "@tailwindcss/oxide-darwin-x64": "4.0.8", "@tailwindcss/oxide-freebsd-x64": "4.0.8", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.0.8", "@tailwindcss/oxide-linux-arm64-gnu": "4.0.8", "@tailwindcss/oxide-linux-arm64-musl": "4.0.8", "@tailwindcss/oxide-linux-x64-gnu": "4.0.8", "@tailwindcss/oxide-linux-x64-musl": "4.0.8", "@tailwindcss/oxide-win32-arm64-msvc": "4.0.8", "@tailwindcss/oxide-win32-x64-msvc": "4.0.8" } }, "sha512-KfMcuAu/Iw+DcV1e8twrFyr2yN8/ZDC/odIGta4wuuJOGkrkHZbvJvRNIbQNhGh7erZTYV6Ie0IeD6WC9Y8Hcw=="], + "@tailwindcss/oxide": ["@tailwindcss/oxide@4.0.9", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.0.9", "@tailwindcss/oxide-darwin-arm64": "4.0.9", "@tailwindcss/oxide-darwin-x64": "4.0.9", "@tailwindcss/oxide-freebsd-x64": "4.0.9", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.0.9", "@tailwindcss/oxide-linux-arm64-gnu": "4.0.9", "@tailwindcss/oxide-linux-arm64-musl": "4.0.9", "@tailwindcss/oxide-linux-x64-gnu": "4.0.9", "@tailwindcss/oxide-linux-x64-musl": "4.0.9", "@tailwindcss/oxide-win32-arm64-msvc": "4.0.9", "@tailwindcss/oxide-win32-x64-msvc": "4.0.9" } }, "sha512-eLizHmXFqHswJONwfqi/WZjtmWZpIalpvMlNhTM99/bkHtUs6IqgI1XQ0/W5eO2HiRQcIlXUogI2ycvKhVLNcA=="], - "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.0.8", "", { "os": "android", "cpu": "arm64" }, "sha512-We7K79+Sm4mwJHk26Yzu/GAj7C7myemm7PeXvpgMxyxO70SSFSL3uCcqFbz9JA5M5UPkrl7N9fkBe/Y0iazqpA=="], + "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.0.9", "", { "os": "android", "cpu": "arm64" }, "sha512-YBgy6+2flE/8dbtrdotVInhMVIxnHJPbAwa7U1gX4l2ThUIaPUp18LjB9wEH8wAGMBZUb//SzLtdXXNBHPUl6Q=="], - "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.0.8", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Lv9Isi2EwkCTG1sRHNDi0uRNN1UGFdEThUAGFrydRmQZnraGLMjN8gahzg2FFnOizDl7LB2TykLUuiw833DSNg=="], + "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.0.9", "", { "os": "darwin", "cpu": "arm64" }, "sha512-pWdl4J2dIHXALgy2jVkwKBmtEb73kqIfMpYmcgESr7oPQ+lbcQ4+tlPeVXaSAmang+vglAfFpXQCOvs/aGSqlw=="], - "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.0.8", "", { "os": "darwin", "cpu": "x64" }, "sha512-fWfywfYIlSWtKoqWTjukTHLWV3ARaBRjXCC2Eo0l6KVpaqGY4c2y8snUjp1xpxUtpqwMvCvFWFaleMoz1Vhzlw=="], + "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.0.9", "", { "os": "darwin", "cpu": "x64" }, "sha512-4Dq3lKp0/C7vrRSkNPtBGVebEyWt9QPPlQctxJ0H3MDyiQYvzVYf8jKow7h5QkWNe8hbatEqljMj/Y0M+ERYJg=="], - "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.0.8", "", { "os": "freebsd", "cpu": "x64" }, "sha512-SO+dyvjJV9G94bnmq2288Ke0BIdvrbSbvtPLaQdqjqHR83v5L2fWADyFO+1oecHo9Owsk8MxcXh1agGVPIKIqw=="], + "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.0.9", "", { "os": "freebsd", "cpu": "x64" }, "sha512-k7U1RwRODta8x0uealtVt3RoWAWqA+D5FAOsvVGpYoI6ObgmnzqWW6pnVwz70tL8UZ/QXjeMyiICXyjzB6OGtQ=="], - "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.0.8", "", { "os": "linux", "cpu": "arm" }, "sha512-ZSHggWiEblQNV69V0qUK5vuAtHP+I+S2eGrKGJ5lPgwgJeAd6GjLsVBN+Mqn2SPVfYM3BOpS9jX/zVg9RWQVDQ=="], + "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.0.9", "", { "os": "linux", "cpu": "arm" }, "sha512-NDDjVweHz2zo4j+oS8y3KwKL5wGCZoXGA9ruJM982uVJLdsF8/1AeKvUwKRlMBpxHt1EdWJSAh8a0Mfhl28GlQ=="], - "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.0.8", "", { "os": "linux", "cpu": "arm64" }, "sha512-xWpr6M0OZLDNsr7+bQz+3X7zcnDJZJ1N9gtBWCtfhkEtDjjxYEp+Lr5L5nc/yXlL4MyCHnn0uonGVXy3fhxaVA=="], + "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.0.9", "", { "os": "linux", "cpu": "arm64" }, "sha512-jk90UZ0jzJl3Dy1BhuFfRZ2KP9wVKMXPjmCtY4U6fF2LvrjP5gWFJj5VHzfzHonJexjrGe1lMzgtjriuZkxagg=="], - "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.0.8", "", { "os": "linux", "cpu": "arm64" }, "sha512-5tz2IL7LN58ssGEq7h/staD7pu/izF/KeMWdlJ86WDe2Ah46LF3ET6ZGKTr5eZMrnEA0M9cVFuSPprKRHNgjeg=="], + "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.0.9", "", { "os": "linux", "cpu": "arm64" }, "sha512-3eMjyTC6HBxh9nRgOHzrc96PYh1/jWOwHZ3Kk0JN0Kl25BJ80Lj9HEvvwVDNTgPg154LdICwuFLuhfgH9DULmg=="], - "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.0.8", "", { "os": "linux", "cpu": "x64" }, "sha512-KSzMkhyrxAQyY2o194NKVKU9j/c+NFSoMvnHWFaNHKi3P1lb+Vq1UC19tLHrmxSkKapcMMu69D7+G1+FVGNDXQ=="], + "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.0.9", "", { "os": "linux", "cpu": "x64" }, "sha512-v0D8WqI/c3WpWH1kq/HP0J899ATLdGZmENa2/emmNjubT0sWtEke9W9+wXeEoACuGAhF9i3PO5MeyditpDCiWQ=="], - "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.0.8", "", { "os": "linux", "cpu": "x64" }, "sha512-yFYKG5UtHTRimjtqxUWXBgI4Tc6NJe3USjRIVdlTczpLRxq/SFwgzGl5JbatCxgSRDPBFwRrNPxq+ukfQFGdrw=="], + "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.0.9", "", { "os": "linux", "cpu": "x64" }, "sha512-Kvp0TCkfeXyeehqLJr7otsc4hd/BUPfcIGrQiwsTVCfaMfjQZCG7DjI+9/QqPZha8YapLA9UoIcUILRYO7NE1Q=="], - "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.0.8", "", { "os": "win32", "cpu": "arm64" }, "sha512-tndGujmCSba85cRCnQzXgpA2jx5gXimyspsUYae5jlPyLRG0RjXbDshFKOheVXU4TLflo7FSG8EHCBJ0EHTKdQ=="], + "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.0.9", "", { "os": "win32", "cpu": "arm64" }, "sha512-m3+60T/7YvWekajNq/eexjhV8z10rswcz4BC9bioJ7YaN+7K8W2AmLmG0B79H14m6UHE571qB0XsPus4n0QVgQ=="], - "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.0.8", "", { "os": "win32", "cpu": "x64" }, "sha512-T77jroAc0p4EHVVgTUiNeFn6Nj3jtD3IeNId2X+0k+N1XxfNipy81BEkYErpKLiOkNhpNFjPee8/ZVas29b2OQ=="], + "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.0.9", "", { "os": "win32", "cpu": "x64" }, "sha512-dpc05mSlqkwVNOUjGu/ZXd5U1XNch1kHFJ4/cHkZFvaW1RzbHmRt24gvM8/HC6IirMxNarzVw4IXVtvrOoZtxA=="], - "@tailwindcss/postcss": ["@tailwindcss/postcss@4.0.8", "", { "dependencies": { "@alloc/quick-lru": "^5.2.0", "@tailwindcss/node": "4.0.8", "@tailwindcss/oxide": "4.0.8", "lightningcss": "^1.29.1", "postcss": "^8.4.41", "tailwindcss": "4.0.8" } }, "sha512-SUwlrXjn1ycmUbA0o0n3Y0LqlXqxN5R8HR+ti+OBbRS79wl2seDmiypEs3xJCuQXe07ol81s1AmRMitBmPveJA=="], + "@tailwindcss/postcss": ["@tailwindcss/postcss@4.0.9", "", { "dependencies": { "@alloc/quick-lru": "^5.2.0", "@tailwindcss/node": "4.0.9", "@tailwindcss/oxide": "4.0.9", "lightningcss": "^1.29.1", "postcss": "^8.4.41", "tailwindcss": "4.0.9" } }, "sha512-BT/E+pdMqulavEAVM5NCpxmGEwHiLDPpkmg/c/X25ZBW+izTe+aZ+v1gf/HXTrihRoCxrUp5U4YyHsBTzspQKQ=="], "@testing-library/dom": ["@testing-library/dom@10.4.0", "", { "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", "aria-query": "5.3.0", "chalk": "^4.1.0", "dom-accessibility-api": "^0.5.9", "lz-string": "^1.5.0", "pretty-format": "^27.0.2" } }, "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ=="], @@ -799,7 +801,7 @@ "@types/babel__traverse": ["@types/babel__traverse@7.20.6", "", { "dependencies": { "@babel/types": "^7.20.7" } }, "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg=="], - "@types/chrome": ["@types/chrome@0.0.304", "", { "dependencies": { "@types/filesystem": "*", "@types/har-format": "*" } }, "sha512-ms9CLILU+FEMK7gcmgz/Mtn2E81YQWiMIzCFF8ktp98EVNIIfoqaDTD4+ailOCq1sGjbnEmfJxQ1FAsQtk5M3A=="], + "@types/chrome": ["@types/chrome@0.0.307", "", { "dependencies": { "@types/filesystem": "*", "@types/har-format": "*" } }, "sha512-IHqsTT+JT6vlFTcRWaih7saaEYhFCT13KRgRIRFKjXYOG3g0ummwXAGKtaxK9Zzz6yYsYvbEut91exTX0F/xSg=="], "@types/d3-voronoi": ["@types/d3-voronoi@1.1.12", "", {}, "sha512-DauBl25PKZZ0WVJr42a6CNvI6efsdzofl9sajqZr2Gf5Gu733WkDdUGiPkUHXiUvYGzNNlFQde2wdZdfQPG+yw=="], @@ -817,13 +819,11 @@ "@types/js-cookie": ["@types/js-cookie@3.0.6", "", {}, "sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ=="], - "@types/mapbox-gl": ["@types/mapbox-gl@3.4.1", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-NsGKKtgW93B+UaLPti6B7NwlxYlES5DpV5Gzj9F75rK5ALKsqSk15CiEHbOnTr09RGbr6ZYiCdI+59NNNcAImg=="], - "@types/mapbox__point-geometry": ["@types/mapbox__point-geometry@0.1.4", "", {}, "sha512-mUWlSxAmYLfwnRBmgYV86tgYmMIICX4kza8YnE/eIlywGe2XoOxlpVnXWwir92xRLjwyarqwpu2EJKD2pk0IUA=="], "@types/mapbox__vector-tile": ["@types/mapbox__vector-tile@1.3.4", "", { "dependencies": { "@types/geojson": "*", "@types/mapbox__point-geometry": "*", "@types/pbf": "*" } }, "sha512-bpd8dRn9pr6xKvuEBQup8pwQfD4VUyqO/2deGjfpe6AwC8YRlyEipvefyRJUSiCJTZuCb8Pl1ciVV5ekqJ96Bg=="], - "@types/node": ["@types/node@22.13.4", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg=="], + "@types/node": ["@types/node@22.13.7", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-oU2q+BsQldB9lYxHNp/5aZO+/Bs0Usa74Abo9mAKulz4ahQyXRHK6UVKYIN8KSC8HXwhWSi7b49JnX+txuac0w=="], "@types/pbf": ["@types/pbf@3.0.5", "", {}, "sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA=="], @@ -833,7 +833,7 @@ "@types/resolve": ["@types/resolve@1.20.2", "", {}, "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q=="], - "@types/serviceworker": ["@types/serviceworker@0.0.122", "", {}, "sha512-KwzBl5AFhbYRqpj/+WE4lDYD8w9u6WKE90LBLvKLEwyRD3TefJNQ9VIEzhzOaLeR+I0rKnCE6kcKoTNXJqW0LQ=="], + "@types/serviceworker": ["@types/serviceworker@0.0.123", "", {}, "sha512-c6ynzmpJwqKTkMHDLonE+EStBqTHJqiR+1RsDd40K3YjglABm/C6mZO7xn25g5WldsgxfGHGaKa3IXRnig9c0A=="], "@types/supercluster": ["@types/supercluster@7.1.3", "", { "dependencies": { "@types/geojson": "*" } }, "sha512-Z0pOY34GDFl3Q6hUFYf3HkTwKEE02e7QgtJppBt+beEAxnyOpJua+voGFvxINBHa06GwLFFym7gRPY2SiKIfIA=="], @@ -841,25 +841,29 @@ "@types/validator": ["@types/validator@13.12.2", "", {}, "sha512-6SlHBzUW8Jhf3liqrGGXyTJSIFe4nqlJ5A5KaMZ2l/vbM3Wh3KSybots/wfWVzNLK4D1NZluDlSQIbIEPx6oyA=="], - "@types/w3c-web-serial": ["@types/w3c-web-serial@1.0.7", "", {}, "sha512-jzcwm//EZ0Z306L1/O1GXC3GthRd//9eaNB4/Yagm98UjEQViTzDS8bYvL+y+rTk1r9OFt9Yhp5pprUQFzSiiQ=="], + "@types/w3c-web-serial": ["@types/w3c-web-serial@1.0.8", "", {}, "sha512-QQOT+bxQJhRGXoZDZGLs3ksLud1dMNnMiSQtBA0w8KXvLpXX4oM4TZb6J0GgJ8UbCaHo5s9/4VQT8uXy9JER2A=="], + + "@types/web-bluetooth": ["@types/web-bluetooth@0.0.21", "", {}, "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA=="], + + "@vis.gl/react-mapbox": ["@vis.gl/react-mapbox@8.0.1", "", { "peerDependencies": { "mapbox-gl": ">=3.5.0", "react": ">=16.3.0", "react-dom": ">=16.3.0" }, "optionalPeers": ["mapbox-gl"] }, "sha512-s/OokvgK1T43Ev2/4hj21C0DKrf79nIigBCdYPtAkEX88qGLRQ5t5zCRqg5Zl+44xXfVxcVpX2/vWUKd9oYGKQ=="], - "@types/web-bluetooth": ["@types/web-bluetooth@0.0.20", "", {}, "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow=="], + "@vis.gl/react-maplibre": ["@vis.gl/react-maplibre@8.0.1", "", { "dependencies": { "@maplibre/maplibre-gl-style-spec": "^19.2.1" }, "peerDependencies": { "maplibre-gl": ">=4.0.0", "react": ">=16.3.0", "react-dom": ">=16.3.0" }, "optionalPeers": ["maplibre-gl"] }, "sha512-IFguo7DKIDZ9U9uRI4thZRfc5aTHEH4lWlIjedBeCpLeMm7wdrqtU2JshyEQt8dDO85kkEE7CbrtjMx5MplaoA=="], "@vitejs/plugin-react": ["@vitejs/plugin-react@4.3.4", "", { "dependencies": { "@babel/core": "^7.26.0", "@babel/plugin-transform-react-jsx-self": "^7.25.9", "@babel/plugin-transform-react-jsx-source": "^7.25.9", "@types/babel__core": "^7.20.5", "react-refresh": "^0.14.2" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0" } }, "sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug=="], - "@vitest/expect": ["@vitest/expect@3.0.6", "", { "dependencies": { "@vitest/spy": "3.0.6", "@vitest/utils": "3.0.6", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" } }, "sha512-zBduHf/ja7/QRX4HdP1DSq5XrPgdN+jzLOwaTq/0qZjYfgETNFCKf9nOAp2j3hmom3oTbczuUzrzg9Hafh7hNg=="], + "@vitest/expect": ["@vitest/expect@3.0.7", "", { "dependencies": { "@vitest/spy": "3.0.7", "@vitest/utils": "3.0.7", "chai": "^5.2.0", "tinyrainbow": "^2.0.0" } }, "sha512-QP25f+YJhzPfHrHfYHtvRn+uvkCFCqFtW9CktfBxmB+25QqWsx7VB2As6f4GmwllHLDhXNHvqedwhvMmSnNmjw=="], - "@vitest/mocker": ["@vitest/mocker@3.0.6", "", { "dependencies": { "@vitest/spy": "3.0.6", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^5.0.0 || ^6.0.0" }, "optionalPeers": ["msw", "vite"] }, "sha512-KPztr4/tn7qDGZfqlSPQoF2VgJcKxnDNhmfR3VgZ6Fy1bO8T9Fc1stUiTXtqz0yG24VpD00pZP5f8EOFknjNuQ=="], + "@vitest/mocker": ["@vitest/mocker@3.0.7", "", { "dependencies": { "@vitest/spy": "3.0.7", "estree-walker": "^3.0.3", "magic-string": "^0.30.17" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^5.0.0 || ^6.0.0" }, "optionalPeers": ["msw", "vite"] }, "sha512-qui+3BLz9Eonx4EAuR/i+QlCX6AUZ35taDQgwGkK/Tw6/WgwodSrjN1X2xf69IA/643ZX5zNKIn2svvtZDrs4w=="], - "@vitest/pretty-format": ["@vitest/pretty-format@3.0.6", "", { "dependencies": { "tinyrainbow": "^2.0.0" } }, "sha512-Zyctv3dbNL+67qtHfRnUE/k8qxduOamRfAL1BurEIQSyOEFffoMvx2pnDSSbKAAVxY0Ej2J/GH2dQKI0W2JyVg=="], + "@vitest/pretty-format": ["@vitest/pretty-format@3.0.7", "", { "dependencies": { "tinyrainbow": "^2.0.0" } }, "sha512-CiRY0BViD/V8uwuEzz9Yapyao+M9M008/9oMOSQydwbwb+CMokEq3XVaF3XK/VWaOK0Jm9z7ENhybg70Gtxsmg=="], - "@vitest/runner": ["@vitest/runner@3.0.6", "", { "dependencies": { "@vitest/utils": "3.0.6", "pathe": "^2.0.3" } }, "sha512-JopP4m/jGoaG1+CBqubV/5VMbi7L+NQCJTu1J1Pf6YaUbk7bZtaq5CX7p+8sY64Sjn1UQ1XJparHfcvTTdu9cA=="], + "@vitest/runner": ["@vitest/runner@3.0.7", "", { "dependencies": { "@vitest/utils": "3.0.7", "pathe": "^2.0.3" } }, "sha512-WeEl38Z0S2ZcuRTeyYqaZtm4e26tq6ZFqh5y8YD9YxfWuu0OFiGFUbnxNynwLjNRHPsXyee2M9tV7YxOTPZl2g=="], - "@vitest/snapshot": ["@vitest/snapshot@3.0.6", "", { "dependencies": { "@vitest/pretty-format": "3.0.6", "magic-string": "^0.30.17", "pathe": "^2.0.3" } }, "sha512-qKSmxNQwT60kNwwJHMVwavvZsMGXWmngD023OHSgn873pV0lylK7dwBTfYP7e4URy5NiBCHHiQGA9DHkYkqRqg=="], + "@vitest/snapshot": ["@vitest/snapshot@3.0.7", "", { "dependencies": { "@vitest/pretty-format": "3.0.7", "magic-string": "^0.30.17", "pathe": "^2.0.3" } }, "sha512-eqTUryJWQN0Rtf5yqCGTQWsCFOQe4eNz5Twsu21xYEcnFJtMU5XvmG0vgebhdLlrHQTSq5p8vWHJIeJQV8ovsA=="], - "@vitest/spy": ["@vitest/spy@3.0.6", "", { "dependencies": { "tinyspy": "^3.0.2" } }, "sha512-HfOGx/bXtjy24fDlTOpgiAEJbRfFxoX3zIGagCqACkFKKZ/TTOE6gYMKXlqecvxEndKFuNHcHqP081ggZ2yM0Q=="], + "@vitest/spy": ["@vitest/spy@3.0.7", "", { "dependencies": { "tinyspy": "^3.0.2" } }, "sha512-4T4WcsibB0B6hrKdAZTM37ekuyFZt2cGbEGd2+L0P8ov15J1/HUsUaqkXEQPNAWr4BtPPe1gI+FYfMHhEKfR8w=="], - "@vitest/utils": ["@vitest/utils@3.0.6", "", { "dependencies": { "@vitest/pretty-format": "3.0.6", "loupe": "^3.1.3", "tinyrainbow": "^2.0.0" } }, "sha512-18ktZpf4GQFTbf9jK543uspU03Q2qya7ZGya5yiZ0Gx0nnnalBvd5ZBislbl2EhLjM8A8rt4OilqKG7QwcGkvQ=="], + "@vitest/utils": ["@vitest/utils@3.0.7", "", { "dependencies": { "@vitest/pretty-format": "3.0.7", "loupe": "^3.1.3", "tinyrainbow": "^2.0.0" } }, "sha512-xePVpCRfooFX3rANQjwoditoXgWb1MaFbzmGuPP59MK6i13mrnDw/yEIyJudLeW6/38mCNcwCiJIGmpDPibAIg=="], "acorn": ["acorn@8.14.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="], @@ -1089,7 +1093,7 @@ "es-to-primitive": ["es-to-primitive@1.3.0", "", { "dependencies": { "is-callable": "^1.2.7", "is-date-object": "^1.0.5", "is-symbol": "^1.0.4" } }, "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g=="], - "esbuild": ["esbuild@0.24.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.24.2", "@esbuild/android-arm": "0.24.2", "@esbuild/android-arm64": "0.24.2", "@esbuild/android-x64": "0.24.2", "@esbuild/darwin-arm64": "0.24.2", "@esbuild/darwin-x64": "0.24.2", "@esbuild/freebsd-arm64": "0.24.2", "@esbuild/freebsd-x64": "0.24.2", "@esbuild/linux-arm": "0.24.2", "@esbuild/linux-arm64": "0.24.2", "@esbuild/linux-ia32": "0.24.2", "@esbuild/linux-loong64": "0.24.2", "@esbuild/linux-mips64el": "0.24.2", "@esbuild/linux-ppc64": "0.24.2", "@esbuild/linux-riscv64": "0.24.2", "@esbuild/linux-s390x": "0.24.2", "@esbuild/linux-x64": "0.24.2", "@esbuild/netbsd-arm64": "0.24.2", "@esbuild/netbsd-x64": "0.24.2", "@esbuild/openbsd-arm64": "0.24.2", "@esbuild/openbsd-x64": "0.24.2", "@esbuild/sunos-x64": "0.24.2", "@esbuild/win32-arm64": "0.24.2", "@esbuild/win32-ia32": "0.24.2", "@esbuild/win32-x64": "0.24.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA=="], + "esbuild": ["esbuild@0.25.0", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.0", "@esbuild/android-arm": "0.25.0", "@esbuild/android-arm64": "0.25.0", "@esbuild/android-x64": "0.25.0", "@esbuild/darwin-arm64": "0.25.0", "@esbuild/darwin-x64": "0.25.0", "@esbuild/freebsd-arm64": "0.25.0", "@esbuild/freebsd-x64": "0.25.0", "@esbuild/linux-arm": "0.25.0", "@esbuild/linux-arm64": "0.25.0", "@esbuild/linux-ia32": "0.25.0", "@esbuild/linux-loong64": "0.25.0", "@esbuild/linux-mips64el": "0.25.0", "@esbuild/linux-ppc64": "0.25.0", "@esbuild/linux-riscv64": "0.25.0", "@esbuild/linux-s390x": "0.25.0", "@esbuild/linux-x64": "0.25.0", "@esbuild/netbsd-arm64": "0.25.0", "@esbuild/netbsd-x64": "0.25.0", "@esbuild/openbsd-arm64": "0.25.0", "@esbuild/openbsd-x64": "0.25.0", "@esbuild/sunos-x64": "0.25.0", "@esbuild/win32-arm64": "0.25.0", "@esbuild/win32-ia32": "0.25.0", "@esbuild/win32-x64": "0.25.0" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw=="], "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], @@ -1153,17 +1157,17 @@ "get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="], - "get-tsconfig": ["get-tsconfig@4.10.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A=="], - "get-symbol-description": ["get-symbol-description@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6" } }, "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg=="], + "get-tsconfig": ["get-tsconfig@4.10.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A=="], + "get-value": ["get-value@2.0.6", "", {}, "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA=="], "gl-matrix": ["gl-matrix@3.4.3", "", {}, "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA=="], "glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], - "global-prefix": ["global-prefix@3.0.0", "", { "dependencies": { "ini": "^1.3.5", "kind-of": "^6.0.2", "which": "^1.3.1" } }, "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg=="], + "global-prefix": ["global-prefix@4.0.0", "", { "dependencies": { "ini": "^4.1.3", "kind-of": "^6.0.3", "which": "^4.0.0" } }, "sha512-w0Uf9Y9/nyHinEk5vMJKRie+wa4kR5hmDbEhGGds/kG1PwGLLHKRoNMeJOyCQjjBkANlnScqgzcFwGHgmgLkVA=="], "globals": ["globals@11.12.0", "", {}, "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="], @@ -1177,7 +1181,7 @@ "gzipper": ["gzipper@8.2.0", "", { "dependencies": { "@gfx/zopfli": "^1.0.15", "commander": "^12.1.0", "simple-zstd": "^1.4.2" }, "bin": { "gzipper": "bin/index.js" } }, "sha512-JUvhzo8dHQWJp1eyYy1ShaPfcowsPbRc2rvwkD4LRyou/80UUz96bn+EOOYLWO4PG0Y5f3+UlUX9Gmu8RZhrtw=="], - "happy-dom": ["happy-dom@17.1.4", "", { "dependencies": { "webidl-conversions": "^7.0.0", "whatwg-mimetype": "^3.0.0" } }, "sha512-cMxE0HP45kLIgWdI0PFfnitNb95Cv8kG8moqI7CK6kcEcfV7xoYVVvSmJ7EuGfDatSKWtjhG/czVooqEV0L4rA=="], + "happy-dom": ["happy-dom@17.1.8", "", { "dependencies": { "webidl-conversions": "^7.0.0", "whatwg-mimetype": "^3.0.0" } }, "sha512-Yxbq/FG79z1rhAf/iB6YM8wO2JB/JDQBy99RiLSs+2siEAi5J05x9eW1nnASHZJbpldjJE2KuFLsLZ+AzX/IxA=="], "has-bigints": ["has-bigints@1.1.0", "", {}, "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg=="], @@ -1211,7 +1215,7 @@ "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], - "ini": ["ini@1.3.8", "", {}, "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="], + "ini": ["ini@4.1.3", "", {}, "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg=="], "internal-slot": ["internal-slot@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.2", "side-channel": "^1.1.0" } }, "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw=="], @@ -1279,7 +1283,7 @@ "isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="], - "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + "isexe": ["isexe@3.1.1", "", {}, "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ=="], "isobject": ["isobject@3.0.1", "", {}, "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg=="], @@ -1357,7 +1361,7 @@ "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], - "lucide-react": ["lucide-react@0.475.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-NJzvVu1HwFVeZ+Gwq2q00KygM1aBhy/ZrhY9FsAgJtpB+E4R7uxRk9M2iKvHa6/vNxZydIB59htha4c2vvwvVg=="], + "lucide-react": ["lucide-react@0.477.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-yCf7aYxerFZAbd8jHJxjwe1j7jEMPptjnaOqdYeirFnEy85cNR3/L+o0I875CYFYya+eEVzZSbNuRk8BZPDpVw=="], "lz-string": ["lz-string@1.5.0", "", { "bin": { "lz-string": "bin/bin.js" } }, "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="], @@ -1365,7 +1369,7 @@ "mapbox-gl": ["mapbox-gl@3.10.0", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "^2.0.2", "@mapbox/mapbox-gl-supported": "^3.0.0", "@mapbox/point-geometry": "^0.1.0", "@mapbox/tiny-sdf": "^2.0.6", "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^1.3.1", "@mapbox/whoots-js": "^3.1.0", "@types/geojson": "^7946.0.16", "@types/geojson-vt": "^3.2.5", "@types/mapbox__point-geometry": "^0.1.4", "@types/mapbox__vector-tile": "^1.3.4", "@types/pbf": "^3.0.5", "@types/supercluster": "^7.1.3", "cheap-ruler": "^4.0.0", "csscolorparser": "~1.0.3", "earcut": "^3.0.0", "geojson-vt": "^4.0.2", "gl-matrix": "^3.4.3", "grid-index": "^1.1.0", "kdbush": "^4.0.2", "murmurhash-js": "^1.0.0", "pbf": "^3.2.1", "potpack": "^2.0.0", "quickselect": "^3.0.0", "serialize-to-js": "^3.1.2", "supercluster": "^8.0.1", "tinyqueue": "^3.0.0", "vt-pbf": "^3.1.3" } }, "sha512-YnQxjlthuv/tidcxGYU2C8nRDVXMlAHa3qFhuOJeX4AfRP72OMRBf9ApL+M+k5VWcAXi2fcNOUVgphknjLumjA=="], - "maplibre-gl": ["maplibre-gl@4.1.2", "", { "dependencies": { "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", "@mapbox/point-geometry": "^0.1.0", "@mapbox/tiny-sdf": "^2.0.6", "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^1.3.1", "@mapbox/whoots-js": "^3.1.0", "@maplibre/maplibre-gl-style-spec": "^20.1.1", "@types/geojson": "^7946.0.14", "@types/geojson-vt": "3.2.5", "@types/mapbox__point-geometry": "^0.1.4", "@types/mapbox__vector-tile": "^1.3.4", "@types/pbf": "^3.0.5", "@types/supercluster": "^7.1.3", "earcut": "^2.2.4", "geojson-vt": "^3.2.1", "gl-matrix": "^3.4.3", "global-prefix": "^3.0.0", "kdbush": "^4.0.2", "murmurhash-js": "^1.0.0", "pbf": "^3.2.1", "potpack": "^2.0.0", "quickselect": "^2.0.0", "supercluster": "^8.0.1", "tinyqueue": "^2.0.3", "vt-pbf": "^3.1.3" } }, "sha512-98T+3BesL4w/N39q/rgs9q6HzHLG6pgbS9UaTqg6fMISfzy2WGKokjK205ENFDDmEljj54/LTfdXgqg2XfYU4A=="], + "maplibre-gl": ["maplibre-gl@5.1.1", "", { "dependencies": { "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", "@mapbox/point-geometry": "^0.1.0", "@mapbox/tiny-sdf": "^2.0.6", "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^1.3.1", "@mapbox/whoots-js": "^3.1.0", "@maplibre/maplibre-gl-style-spec": "^23.1.0", "@types/geojson": "^7946.0.16", "@types/geojson-vt": "3.2.5", "@types/mapbox__point-geometry": "^0.1.4", "@types/mapbox__vector-tile": "^1.3.4", "@types/pbf": "^3.0.5", "@types/supercluster": "^7.1.3", "earcut": "^3.0.1", "geojson-vt": "^4.0.2", "gl-matrix": "^3.4.3", "global-prefix": "^4.0.0", "kdbush": "^4.0.2", "murmurhash-js": "^1.0.0", "pbf": "^3.3.0", "potpack": "^2.0.0", "quickselect": "^3.0.0", "supercluster": "^8.0.1", "tinyqueue": "^3.0.0", "vt-pbf": "^3.1.3" } }, "sha512-0Z6ODzyFu/grwT6K1eIBpv6MZE4xnJD1AV+Yq1hPzOh/YCY36r9BlSaU7d7n2/HJOaoKOy0b2YF8cS4dD+iEVQ=="], "marchingsquares": ["marchingsquares@1.3.3", "", {}, "sha512-gz6nNQoVK7Lkh2pZulrT4qd4347S/toG9RXH2pyzhLgkL5mLkBoqgv4EvAGXcV0ikDW72n/OQb3Xe8bGagQZCg=="], @@ -1513,7 +1517,7 @@ "react-is": ["react-is@17.0.2", "", {}, "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="], - "react-map-gl": ["react-map-gl@7.1.9", "", { "dependencies": { "@maplibre/maplibre-gl-style-spec": "^19.2.1", "@types/mapbox-gl": ">=1.0.0" }, "peerDependencies": { "mapbox-gl": ">=1.13.0", "maplibre-gl": ">=1.13.0 <5.0.0", "react": ">=16.3.0", "react-dom": ">=16.3.0" }, "optionalPeers": ["mapbox-gl", "maplibre-gl"] }, "sha512-KsCc8Gyn05wVGlHZoopaiiCr0RCAQ6LDISo5sEy1/pV/d7RlozkF946tiX7IgyijJQMRujHol5QdwUPESjh73w=="], + "react-map-gl": ["react-map-gl@8.0.1", "", { "dependencies": { "@vis.gl/react-mapbox": "8.0.1", "@vis.gl/react-maplibre": "8.0.1" }, "peerDependencies": { "mapbox-gl": ">=1.13.0", "maplibre-gl": ">=1.13.0", "react": ">=16.3.0", "react-dom": ">=16.3.0" }, "optionalPeers": ["mapbox-gl", "maplibre-gl"] }, "sha512-VQjLcZdtyJCPXxy5xVL2QIgfA+YG3v+PzSdt07WWbVmXFhV4wUuy6DZSQYDdfqVH2BujKo/ImdL5zfEJApRnpg=="], "react-qrcode-logo": ["react-qrcode-logo@3.0.0", "", { "dependencies": { "lodash.isequal": "^4.5.0", "qrcode-generator": "^1.4.4" }, "peerDependencies": { "react": ">=18.0.0", "react-dom": ">=18.0.0" } }, "sha512-2+vZ3GNBdUpYxIKyt6SFZsDGXa0xniyUQ0wPI4O0hJTzRjttPIx1pPnH9IWQmp/4nDMoN47IBhi3Breu1KudYw=="], @@ -1523,7 +1527,7 @@ "react-remove-scroll-bar": ["react-remove-scroll-bar@2.3.8", "", { "dependencies": { "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q=="], - "react-scan": ["react-scan@0.2.4", "", { "dependencies": { "@babel/core": "^7.26.0", "@babel/generator": "^7.26.2", "@babel/types": "^7.26.0", "@clack/core": "^0.3.5", "@clack/prompts": "^0.8.2", "@pivanov/utils": "^0.0.1", "@preact/signals": "^1.3.1", "@rollup/pluginutils": "^5.1.3", "@types/node": "^20.17.9", "bippy": "0.2.7", "esbuild": "^0.24.0", "estree-walker": "^3.0.3", "kleur": "^4.1.5", "mri": "^1.2.0", "playwright": "^1.49.0", "preact": "^10.25.1", "tsx": "^4.0.0" }, "optionalDependencies": { "unplugin": "2.1.0" }, "peerDependencies": { "@remix-run/react": ">=1.0.0", "next": ">=13.0.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-router": "^5.0.0 || ^6.0.0 || ^7.0.0", "react-router-dom": "^5.0.0 || ^6.0.0 || ^7.0.0" }, "optionalPeers": ["@remix-run/react", "next", "react-router", "react-router-dom"], "bin": { "react-scan": "bin/cli.js" } }, "sha512-J5aNlMLPPNrb4mg8w5qzbY+UAoQD8D5SyFLLA0NbTjkagFSi0GC2SHvRSK31vXfefcrcEZWUs8KSHCfmHw14zg=="], + "react-scan": ["react-scan@0.2.8", "", { "dependencies": { "@babel/core": "^7.26.0", "@babel/generator": "^7.26.2", "@babel/types": "^7.26.0", "@clack/core": "^0.3.5", "@clack/prompts": "^0.8.2", "@pivanov/utils": "^0.0.1", "@preact/signals": "^1.3.1", "@rollup/pluginutils": "^5.1.3", "@types/node": "^20.17.9", "bippy": "0.2.7", "esbuild": "^0.24.0", "estree-walker": "^3.0.3", "kleur": "^4.1.5", "mri": "^1.2.0", "playwright": "^1.49.0", "preact": "^10.25.1", "tsx": "^4.0.0" }, "optionalDependencies": { "unplugin": "2.1.0" }, "peerDependencies": { "@remix-run/react": ">=1.0.0", "next": ">=13.0.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-router": "^5.0.0 || ^6.0.0 || ^7.0.0", "react-router-dom": "^5.0.0 || ^6.0.0 || ^7.0.0" }, "optionalPeers": ["@remix-run/react", "next", "react-router", "react-router-dom"], "bin": { "react-scan": "bin/cli.js" } }, "sha512-+6Gvu9b0UMmzV0JkigA7Y2YcjQABiNrweP9l9j8nrutN5OAYLRe4JgfwiUohPFngMD+Y6I5N0kW+okXhvVLGUw=="], "react-style-singleton": ["react-style-singleton@2.2.3", "", { "dependencies": { "get-nonce": "^1.0.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ=="], @@ -1683,9 +1687,9 @@ "sweepline-intersections": ["sweepline-intersections@1.5.0", "", { "dependencies": { "tinyqueue": "^2.0.0" } }, "sha512-AoVmx72QHpKtItPu72TzFL+kcYjd67BPLDoR0LarIk+xyaRg+pDTMFXndIEvZf9xEKnJv6JdhgRMnocoG0D3AQ=="], - "tailwind-merge": ["tailwind-merge@3.0.1", "", {}, "sha512-AvzE8FmSoXC7nC+oU5GlQJbip2UO7tmOhOfQyOmPhrStOGXHU08j8mZEHZ4BmCqY5dWTCo4ClWkNyRNx1wpT0g=="], + "tailwind-merge": ["tailwind-merge@3.0.2", "", {}, "sha512-l7z+OYZ7mu3DTqrL88RiKrKIqO3NcpEO8V/Od04bNpvk0kiIFndGEoqfuzvj4yuhRkHKjRkII2z+KS2HfPcSxw=="], - "tailwindcss": ["tailwindcss@4.0.8", "", {}, "sha512-Me7N5CKR+D2A1xdWA5t5+kjjT7bwnxZOE6/yDI/ixJdJokszsn2n++mdU5yJwrsTpqFX2B9ZNMBJDwcqk9C9lw=="], + "tailwindcss": ["tailwindcss@4.0.9", "", {}, "sha512-12laZu+fv1ONDRoNR9ipTOpUD7RN9essRVkX36sjxuRUInpN7hIiHN4lBd/SIFjbISvnXzp8h/hXzmU8SQQYhw=="], "tailwindcss-animate": ["tailwindcss-animate@1.0.7", "", { "peerDependencies": { "tailwindcss": ">=3.0.0 || insiders" } }, "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA=="], @@ -1741,7 +1745,7 @@ "typed-array-length": ["typed-array-length@1.0.7", "", { "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "is-typed-array": "^1.1.13", "possible-typed-array-names": "^1.0.0", "reflect.getprototypeof": "^1.0.6" } }, "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg=="], - "typescript": ["typescript@5.7.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw=="], + "typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="], "typewise": ["typewise@1.0.3", "", { "dependencies": { "typewise-core": "^1.2.0" } }, "sha512-aXofE06xGhaQSPzt8hlTY+/YWQhm9P0jYUp1f2XtmW/3Bk0qzXcyFWAtPoo2uTGQj1ZwbDuSyuxicq+aDo8lCQ=="], @@ -1761,12 +1765,12 @@ "union-value": ["union-value@1.0.1", "", { "dependencies": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", "set-value": "^2.0.1" } }, "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg=="], - "unplugin": ["unplugin@2.1.0", "", { "dependencies": { "acorn": "^8.14.0", "webpack-virtual-modules": "^0.6.2" } }, "sha512-us4j03/499KhbGP8BU7Hrzrgseo+KdfJYWcbcajCOqsAyb8Gk0Yn2kiUIcZISYCb1JFaZfIuG3b42HmguVOKCQ=="], - "unique-string": ["unique-string@2.0.0", "", { "dependencies": { "crypto-random-string": "^2.0.0" } }, "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg=="], "universalify": ["universalify@2.0.1", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="], + "unplugin": ["unplugin@2.1.0", "", { "dependencies": { "acorn": "^8.14.0", "webpack-virtual-modules": "^0.6.2" } }, "sha512-us4j03/499KhbGP8BU7Hrzrgseo+KdfJYWcbcajCOqsAyb8Gk0Yn2kiUIcZISYCb1JFaZfIuG3b42HmguVOKCQ=="], + "upath": ["upath@1.2.0", "", {}, "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg=="], "update-browserslist-db": ["update-browserslist-db@1.1.2", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg=="], @@ -1785,15 +1789,15 @@ "validator": ["validator@13.12.0", "", {}, "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg=="], - "vite": ["vite@6.1.1", "", { "dependencies": { "esbuild": "^0.24.2", "postcss": "^8.5.2", "rollup": "^4.30.1" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4GgM54XrwRfrOp297aIYspIti66k56v16ZnqHvrIM7mG+HjDlAwS7p+Srr7J6fGvEdOJ5JcQ/D9T7HhtdXDTzA=="], + "vite": ["vite@6.2.0", "", { "dependencies": { "esbuild": "^0.25.0", "postcss": "^8.5.3", "rollup": "^4.30.1" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-7dPxoo+WsT/64rDcwoOjk76XHj+TqNTIvHKcuMQ1k4/SeHDaQt5GFAeLYzrimZrMpn/O6DtdI03WUjdxuPM0oQ=="], - "vite-node": ["vite-node@3.0.6", "", { "dependencies": { "cac": "^6.7.14", "debug": "^4.4.0", "es-module-lexer": "^1.6.0", "pathe": "^2.0.3", "vite": "^5.0.0 || ^6.0.0" }, "bin": { "vite-node": "vite-node.mjs" } }, "sha512-s51RzrTkXKJrhNbUzQRsarjmAae7VmMPAsRT7lppVpIg6mK3zGthP9Hgz0YQQKuNcF+Ii7DfYk3Fxz40jRmePw=="], + "vite-node": ["vite-node@3.0.7", "", { "dependencies": { "cac": "^6.7.14", "debug": "^4.4.0", "es-module-lexer": "^1.6.0", "pathe": "^2.0.3", "vite": "^5.0.0 || ^6.0.0" }, "bin": { "vite-node": "vite-node.mjs" } }, "sha512-2fX0QwX4GkkkpULXdT1Pf4q0tC1i1lFOyseKoonavXUNlQ77KpW2XqBGGNIm/J4Ows4KxgGJzDguYVPKwG/n5A=="], "vite-plugin-node-polyfills": ["vite-plugin-node-polyfills@0.23.0", "", { "dependencies": { "@rollup/plugin-inject": "^5.0.5", "node-stdlib-browser": "^1.2.0" }, "peerDependencies": { "vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" } }, "sha512-4n+Ys+2bKHQohPBKigFlndwWQ5fFKwaGY6muNDMTb0fSQLyBzS+jjUNRZG9sKF0S/Go4ApG6LFnUGopjkILg3w=="], "vite-plugin-pwa": ["vite-plugin-pwa@0.21.1", "", { "dependencies": { "debug": "^4.3.6", "pretty-bytes": "^6.1.1", "tinyglobby": "^0.2.10", "workbox-build": "^7.3.0", "workbox-window": "^7.3.0" }, "peerDependencies": { "@vite-pwa/assets-generator": "^0.2.6", "vite": "^3.1.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" }, "optionalPeers": ["@vite-pwa/assets-generator"] }, "sha512-rkTbKFbd232WdiRJ9R3u+hZmf5SfQljX1b45NF6oLA6DSktEKpYllgTo1l2lkiZWMWV78pABJtFjNXfBef3/3Q=="], - "vitest": ["vitest@3.0.6", "", { "dependencies": { "@vitest/expect": "3.0.6", "@vitest/mocker": "3.0.6", "@vitest/pretty-format": "^3.0.6", "@vitest/runner": "3.0.6", "@vitest/snapshot": "3.0.6", "@vitest/spy": "3.0.6", "@vitest/utils": "3.0.6", "chai": "^5.2.0", "debug": "^4.4.0", "expect-type": "^1.1.0", "magic-string": "^0.30.17", "pathe": "^2.0.3", "std-env": "^3.8.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.2", "tinypool": "^1.0.2", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0", "vite-node": "3.0.6", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "@vitest/browser": "3.0.6", "@vitest/ui": "3.0.6", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@types/debug", "@types/node", "@vitest/browser", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "vitest.mjs" } }, "sha512-/iL1Sc5VeDZKPDe58oGK4HUFLhw6b5XdY1MYawjuSaDA4sEfYlY9HnS6aCEG26fX+MgUi7MwlduTBHHAI/OvMA=="], + "vitest": ["vitest@3.0.7", "", { "dependencies": { "@vitest/expect": "3.0.7", "@vitest/mocker": "3.0.7", "@vitest/pretty-format": "^3.0.7", "@vitest/runner": "3.0.7", "@vitest/snapshot": "3.0.7", "@vitest/spy": "3.0.7", "@vitest/utils": "3.0.7", "chai": "^5.2.0", "debug": "^4.4.0", "expect-type": "^1.1.0", "magic-string": "^0.30.17", "pathe": "^2.0.3", "std-env": "^3.8.0", "tinybench": "^2.9.0", "tinyexec": "^0.3.2", "tinypool": "^1.0.2", "tinyrainbow": "^2.0.0", "vite": "^5.0.0 || ^6.0.0", "vite-node": "3.0.7", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@types/debug": "^4.1.12", "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "@vitest/browser": "3.0.7", "@vitest/ui": "3.0.7", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@types/debug", "@types/node", "@vitest/browser", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "vitest.mjs" } }, "sha512-IP7gPK3LS3Fvn44x30X1dM9vtawm0aesAa2yBIZ9vQf+qB69NXC5776+Qmcr7ohUXIQuLhk7xQR0aSUIDPqavg=="], "vm-browserify": ["vm-browserify@1.1.2", "", {}, "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ=="], @@ -1807,7 +1811,7 @@ "whatwg-url": ["whatwg-url@7.1.0", "", { "dependencies": { "lodash.sortby": "^4.7.0", "tr46": "^1.0.1", "webidl-conversions": "^4.0.2" } }, "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg=="], - "which": ["which@1.3.1", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "which": "./bin/which" } }, "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ=="], + "which": ["which@4.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg=="], "which-boxed-primitive": ["which-boxed-primitive@1.1.1", "", { "dependencies": { "is-bigint": "^1.1.0", "is-boolean-object": "^1.2.1", "is-number-object": "^1.1.1", "is-string": "^1.1.1", "is-symbol": "^1.1.1" } }, "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA=="], @@ -1865,8 +1869,6 @@ "zustand": ["zustand@5.0.3", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg=="], - "@maplibre/maplibre-gl-style-spec/quickselect": ["quickselect@2.0.0", "", {}, "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw=="], - "@rollup/plugin-babel/@rollup/pluginutils": ["@rollup/pluginutils@3.1.0", "", { "dependencies": { "@types/estree": "0.0.39", "estree-walker": "^1.0.1", "picomatch": "^2.2.2" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0" } }, "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg=="], "@rollup/plugin-babel/rollup": ["rollup@2.79.2", "", { "optionalDependencies": { "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ=="], @@ -1885,6 +1887,8 @@ "@turf/tesselate/earcut": ["earcut@2.2.4", "", {}, "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ=="], + "@vis.gl/react-maplibre/@maplibre/maplibre-gl-style-spec": ["@maplibre/maplibre-gl-style-spec@19.3.3", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", "@mapbox/unitbezier": "^0.0.1", "json-stringify-pretty-compact": "^3.0.0", "minimist": "^1.2.8", "rw": "^1.3.3", "sort-object": "^3.0.3" }, "bin": { "gl-style-format": "dist/gl-style-format.mjs", "gl-style-migrate": "dist/gl-style-migrate.mjs", "gl-style-validate": "dist/gl-style-validate.mjs" } }, "sha512-cOZZOVhDSulgK0meTsTkmNXb1ahVvmTmWmfx9gRBwc6hq98wS9JP35ESIoNq3xqEan+UN+gn8187Z6E4NKhLsw=="], + "asn1.js/bn.js": ["bn.js@4.12.1", "", {}, "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg=="], "browserify-sign/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="], @@ -1909,14 +1913,6 @@ "lru-cache/yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], - "maplibre-gl/earcut": ["earcut@2.2.4", "", {}, "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ=="], - - "maplibre-gl/geojson-vt": ["geojson-vt@3.2.1", "", {}, "sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg=="], - - "maplibre-gl/quickselect": ["quickselect@2.0.0", "", {}, "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw=="], - - "maplibre-gl/tinyqueue": ["tinyqueue@2.0.3", "", {}, "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA=="], - "miller-rabin/bn.js": ["bn.js@4.12.1", "", {}, "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg=="], "path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], @@ -1931,10 +1927,10 @@ "rbush/quickselect": ["quickselect@2.0.0", "", {}, "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw=="], - "react-map-gl/@maplibre/maplibre-gl-style-spec": ["@maplibre/maplibre-gl-style-spec@19.3.3", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", "@mapbox/unitbezier": "^0.0.1", "json-stringify-pretty-compact": "^3.0.0", "minimist": "^1.2.8", "rw": "^1.3.3", "sort-object": "^3.0.3" }, "bin": { "gl-style-format": "dist/gl-style-format.mjs", "gl-style-migrate": "dist/gl-style-migrate.mjs", "gl-style-validate": "dist/gl-style-validate.mjs" } }, "sha512-cOZZOVhDSulgK0meTsTkmNXb1ahVvmTmWmfx9gRBwc6hq98wS9JP35ESIoNq3xqEan+UN+gn8187Z6E4NKhLsw=="], - "react-scan/@types/node": ["@types/node@20.17.19", "", { "dependencies": { "undici-types": "~6.19.2" } }, "sha512-LEwC7o1ifqg/6r2gn9Dns0f1rhK+fPFDoMiceTJ6kWmVk6bgXBI/9IOWfVan4WiAavK9pIVWdX0/e3J+eEUh5A=="], + "react-scan/esbuild": ["esbuild@0.24.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.24.2", "@esbuild/android-arm": "0.24.2", "@esbuild/android-arm64": "0.24.2", "@esbuild/android-x64": "0.24.2", "@esbuild/darwin-arm64": "0.24.2", "@esbuild/darwin-x64": "0.24.2", "@esbuild/freebsd-arm64": "0.24.2", "@esbuild/freebsd-x64": "0.24.2", "@esbuild/linux-arm": "0.24.2", "@esbuild/linux-arm64": "0.24.2", "@esbuild/linux-ia32": "0.24.2", "@esbuild/linux-loong64": "0.24.2", "@esbuild/linux-mips64el": "0.24.2", "@esbuild/linux-ppc64": "0.24.2", "@esbuild/linux-riscv64": "0.24.2", "@esbuild/linux-s390x": "0.24.2", "@esbuild/linux-x64": "0.24.2", "@esbuild/netbsd-arm64": "0.24.2", "@esbuild/netbsd-x64": "0.24.2", "@esbuild/openbsd-arm64": "0.24.2", "@esbuild/openbsd-x64": "0.24.2", "@esbuild/sunos-x64": "0.24.2", "@esbuild/win32-arm64": "0.24.2", "@esbuild/win32-ia32": "0.24.2", "@esbuild/win32-x64": "0.24.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA=="], + "regjsparser/jsesc": ["jsesc@3.0.2", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g=="], "rimraf/glob": ["glob@10.4.5", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg=="], @@ -1963,9 +1959,6 @@ "topojson-server/commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], - - "tsx/esbuild": ["esbuild@0.25.0", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.0", "@esbuild/android-arm": "0.25.0", "@esbuild/android-arm64": "0.25.0", "@esbuild/android-x64": "0.25.0", "@esbuild/darwin-arm64": "0.25.0", "@esbuild/darwin-x64": "0.25.0", "@esbuild/freebsd-arm64": "0.25.0", "@esbuild/freebsd-x64": "0.25.0", "@esbuild/linux-arm": "0.25.0", "@esbuild/linux-arm64": "0.25.0", "@esbuild/linux-ia32": "0.25.0", "@esbuild/linux-loong64": "0.25.0", "@esbuild/linux-mips64el": "0.25.0", "@esbuild/linux-ppc64": "0.25.0", "@esbuild/linux-riscv64": "0.25.0", "@esbuild/linux-s390x": "0.25.0", "@esbuild/linux-x64": "0.25.0", "@esbuild/netbsd-arm64": "0.25.0", "@esbuild/netbsd-x64": "0.25.0", "@esbuild/openbsd-arm64": "0.25.0", "@esbuild/openbsd-x64": "0.25.0", "@esbuild/sunos-x64": "0.25.0", "@esbuild/win32-arm64": "0.25.0", "@esbuild/win32-ia32": "0.25.0", "@esbuild/win32-x64": "0.25.0" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw=="], - "tr46/punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], "unique-string/crypto-random-string": ["crypto-random-string@2.0.0", "", {}, "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA=="], @@ -1996,10 +1989,14 @@ "@rollup/plugin-replace/@rollup/pluginutils/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + "@vis.gl/react-maplibre/@maplibre/maplibre-gl-style-spec/json-stringify-pretty-compact": ["json-stringify-pretty-compact@3.0.0", "", {}, "sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA=="], + "browserify-sign/readable-stream/safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="], "browserify-sign/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="], + "cross-spawn/which/isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + "duplexify/readable-stream/safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="], "duplexify/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="], @@ -2010,63 +2007,61 @@ "peek-stream/through2/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="], - "react-map-gl/@maplibre/maplibre-gl-style-spec/json-stringify-pretty-compact": ["json-stringify-pretty-compact@3.0.0", "", {}, "sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA=="], - "react-scan/@types/node/undici-types": ["undici-types@6.19.8", "", {}, "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="], - "rimraf/glob/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], + "react-scan/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.24.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA=="], - "split-string/extend-shallow/is-extendable": ["is-extendable@1.0.1", "", { "dependencies": { "is-plain-object": "^2.0.4" } }, "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA=="], + "react-scan/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.24.2", "", { "os": "android", "cpu": "arm" }, "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q=="], - "tsx/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.0", "", { "os": "aix", "cpu": "ppc64" }, "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ=="], + "react-scan/esbuild/@esbuild/android-arm64": ["@esbuild/android-arm64@0.24.2", "", { "os": "android", "cpu": "arm64" }, "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg=="], - "tsx/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.25.0", "", { "os": "android", "cpu": "arm" }, "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g=="], + "react-scan/esbuild/@esbuild/android-x64": ["@esbuild/android-x64@0.24.2", "", { "os": "android", "cpu": "x64" }, "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw=="], - "tsx/esbuild/@esbuild/android-arm64": ["@esbuild/android-arm64@0.25.0", "", { "os": "android", "cpu": "arm64" }, "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g=="], + "react-scan/esbuild/@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.24.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA=="], - "tsx/esbuild/@esbuild/android-x64": ["@esbuild/android-x64@0.25.0", "", { "os": "android", "cpu": "x64" }, "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg=="], + "react-scan/esbuild/@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.24.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA=="], - "tsx/esbuild/@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.25.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw=="], + "react-scan/esbuild/@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.24.2", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg=="], - "tsx/esbuild/@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.25.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg=="], + "react-scan/esbuild/@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.24.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q=="], - "tsx/esbuild/@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.25.0", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w=="], + "react-scan/esbuild/@esbuild/linux-arm": ["@esbuild/linux-arm@0.24.2", "", { "os": "linux", "cpu": "arm" }, "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA=="], - "tsx/esbuild/@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.25.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A=="], + "react-scan/esbuild/@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.24.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg=="], - "tsx/esbuild/@esbuild/linux-arm": ["@esbuild/linux-arm@0.25.0", "", { "os": "linux", "cpu": "arm" }, "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg=="], + "react-scan/esbuild/@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.24.2", "", { "os": "linux", "cpu": "ia32" }, "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw=="], - "tsx/esbuild/@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.25.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg=="], + "react-scan/esbuild/@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.24.2", "", { "os": "linux", "cpu": "none" }, "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ=="], - "tsx/esbuild/@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.25.0", "", { "os": "linux", "cpu": "ia32" }, "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg=="], + "react-scan/esbuild/@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.24.2", "", { "os": "linux", "cpu": "none" }, "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw=="], - "tsx/esbuild/@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.25.0", "", { "os": "linux", "cpu": "none" }, "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw=="], + "react-scan/esbuild/@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.24.2", "", { "os": "linux", "cpu": "ppc64" }, "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw=="], - "tsx/esbuild/@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.25.0", "", { "os": "linux", "cpu": "none" }, "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ=="], + "react-scan/esbuild/@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.24.2", "", { "os": "linux", "cpu": "none" }, "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q=="], - "tsx/esbuild/@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.25.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw=="], + "react-scan/esbuild/@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.24.2", "", { "os": "linux", "cpu": "s390x" }, "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw=="], - "tsx/esbuild/@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.25.0", "", { "os": "linux", "cpu": "none" }, "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA=="], + "react-scan/esbuild/@esbuild/linux-x64": ["@esbuild/linux-x64@0.24.2", "", { "os": "linux", "cpu": "x64" }, "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q=="], - "tsx/esbuild/@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.25.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA=="], + "react-scan/esbuild/@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.24.2", "", { "os": "none", "cpu": "arm64" }, "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw=="], - "tsx/esbuild/@esbuild/linux-x64": ["@esbuild/linux-x64@0.25.0", "", { "os": "linux", "cpu": "x64" }, "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw=="], + "react-scan/esbuild/@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.24.2", "", { "os": "none", "cpu": "x64" }, "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw=="], - "tsx/esbuild/@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.25.0", "", { "os": "none", "cpu": "arm64" }, "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw=="], + "react-scan/esbuild/@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.24.2", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A=="], - "tsx/esbuild/@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.25.0", "", { "os": "none", "cpu": "x64" }, "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA=="], + "react-scan/esbuild/@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.24.2", "", { "os": "openbsd", "cpu": "x64" }, "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA=="], - "tsx/esbuild/@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.25.0", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw=="], + "react-scan/esbuild/@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.24.2", "", { "os": "sunos", "cpu": "x64" }, "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig=="], - "tsx/esbuild/@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.25.0", "", { "os": "openbsd", "cpu": "x64" }, "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg=="], + "react-scan/esbuild/@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.24.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ=="], - "tsx/esbuild/@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.25.0", "", { "os": "sunos", "cpu": "x64" }, "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg=="], + "react-scan/esbuild/@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.24.2", "", { "os": "win32", "cpu": "ia32" }, "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA=="], - "tsx/esbuild/@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.25.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw=="], + "react-scan/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.24.2", "", { "os": "win32", "cpu": "x64" }, "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg=="], - "tsx/esbuild/@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.25.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA=="], + "rimraf/glob/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], - "tsx/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.0", "", { "os": "win32", "cpu": "x64" }, "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ=="], + "split-string/extend-shallow/is-extendable": ["is-extendable@1.0.1", "", { "dependencies": { "is-plain-object": "^2.0.4" } }, "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA=="], "wrap-ansi-cjs/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], diff --git a/src/App.tsx b/src/App.tsx index a7c278fb..2d02ab5b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -36,21 +36,19 @@ export const App = (): JSX.Element => {
- {device - ? ( -
- - - - -
- ) - : ( - <> - -
- - )} + {device ? ( +
+ + + + +
+ ) : ( + <> + +
+ + )}
diff --git a/src/components/Dialog/DeviceNameDialog.tsx b/src/components/Dialog/DeviceNameDialog.tsx index d6146972..44fe6d7a 100644 --- a/src/components/Dialog/DeviceNameDialog.tsx +++ b/src/components/Dialog/DeviceNameDialog.tsx @@ -1,4 +1,5 @@ import { useDevice } from "@app/core/stores/deviceStore.ts"; +import { create } from "@bufbuild/protobuf"; import { Button } from "@components/UI/Button.tsx"; import { Dialog, @@ -12,7 +13,6 @@ import { Input } from "@components/UI/Input.tsx"; import { Label } from "@components/UI/Label.tsx"; import { Protobuf } from "@meshtastic/js"; import { useForm } from "react-hook-form"; -import { create } from "@bufbuild/protobuf"; export interface User { longName: string; diff --git a/src/components/Dialog/ImportDialog.tsx b/src/components/Dialog/ImportDialog.tsx index 5d9e22e1..3823538c 100644 --- a/src/components/Dialog/ImportDialog.tsx +++ b/src/components/Dialog/ImportDialog.tsx @@ -73,9 +73,10 @@ export const ImportDialog = ({ connection?.setChannel( create(Protobuf.Channel.ChannelSchema, { index, - role: index === 0 - ? Protobuf.Channel.Channel_Role.PRIMARY - : Protobuf.Channel.Channel_Role.SECONDARY, + role: + index === 0 + ? Protobuf.Channel.Channel_Role.PRIMARY + : Protobuf.Channel.Channel_Role.SECONDARY, settings: ch, }), ); @@ -122,25 +123,21 @@ export const ImportDialog = ({ checked={channelSet?.loraConfig?.usePreset ?? true} /> - { - /* */ - } + */} - { - /* */ - } + */} Channels: diff --git a/src/components/Dialog/QRDialog.tsx b/src/components/Dialog/QRDialog.tsx index 2f4be9a5..4b612a8d 100644 --- a/src/components/Dialog/QRDialog.tsx +++ b/src/components/Dialog/QRDialog.tsx @@ -77,8 +77,8 @@ export const QRDialog = ({ {channel.settings?.name.length ? channel.settings.name : channel.role === Protobuf.Channel.Channel_Role.PRIMARY - ? "Primary" - : `Channel: ${channel.index}`} + ? "Primary" + : `Channel: ${channel.index}`} { if (selectedChannels.includes(channel.index)) { setSelectedChannels( - selectedChannels.filter((c) => - c !== channel.index - ), + selectedChannels.filter((c) => c !== channel.index), ); } else { setSelectedChannels([ diff --git a/src/components/PageComponents/Channel.tsx b/src/components/PageComponents/Channel.tsx index 5ae88160..f3c7a1df 100644 --- a/src/components/PageComponents/Channel.tsx +++ b/src/components/PageComponents/Channel.tsx @@ -1,4 +1,5 @@ import type { ChannelValidation } from "@app/validation/channel.tsx"; +import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useToast } from "@core/hooks/useToast.ts"; import { useDevice } from "@core/stores/deviceStore.ts"; @@ -7,7 +8,6 @@ import { fromByteArray, toByteArray } from "base64-js"; import cryptoRandomString from "crypto-random-string"; import { useState } from "react"; import { PkiRegenerateDialog } from "../Dialog/PkiRegenerateDialog"; -import { create } from "@bufbuild/protobuf"; export interface SettingsPanelProps { channel: Protobuf.Channel.Channel; @@ -24,9 +24,8 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { channel?.settings?.psk.length ?? 16, ); const [validationText, setValidationText] = useState(); - const [preSharedDialogOpen, setPreSharedDialogOpen] = useState( - false, - ); + const [preSharedDialogOpen, setPreSharedDialogOpen] = + useState(false); const onSubmit = (data: ChannelValidation) => { const channel = create(Protobuf.Channel.ChannelSchema, { @@ -108,7 +107,7 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { channel?.settings?.moduleSettings?.positionPrecision === 32, positionPrecision: channel?.settings?.moduleSettings?.positionPrecision === - undefined + undefined ? 10 : channel?.settings?.moduleSettings?.positionPrecision, }, @@ -127,9 +126,10 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { description: "Device telemetry is sent over PRIMARY. Only one PRIMARY allowed", properties: { - enumValue: channel.index === 0 - ? { PRIMARY: 1 } - : { DISABLED: 0, SECONDARY: 2 }, + enumValue: + channel.index === 0 + ? { PRIMARY: 1 } + : { DISABLED: 0, SECONDARY: 2 }, }, }, { @@ -192,31 +192,32 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { description: "If not sharing precise location, position shared on channel will be accurate within this distance", properties: { - enumValue: config.display?.units === 0 - ? { - "Within 23 km": 10, - "Within 12 km": 11, - "Within 5.8 km": 12, - "Within 2.9 km": 13, - "Within 1.5 km": 14, - "Within 700 m": 15, - "Within 350 m": 16, - "Within 200 m": 17, - "Within 90 m": 18, - "Within 50 m": 19, - } - : { - "Within 15 miles": 10, - "Within 7.3 miles": 11, - "Within 3.6 miles": 12, - "Within 1.8 miles": 13, - "Within 0.9 miles": 14, - "Within 0.5 miles": 15, - "Within 0.2 miles": 16, - "Within 600 feet": 17, - "Within 300 feet": 18, - "Within 150 feet": 19, - }, + enumValue: + config.display?.units === 0 + ? { + "Within 23 km": 10, + "Within 12 km": 11, + "Within 5.8 km": 12, + "Within 2.9 km": 13, + "Within 1.5 km": 14, + "Within 700 m": 15, + "Within 350 m": 16, + "Within 200 m": 17, + "Within 90 m": 18, + "Within 50 m": 19, + } + : { + "Within 15 miles": 10, + "Within 7.3 miles": 11, + "Within 3.6 miles": 12, + "Within 1.8 miles": 13, + "Within 0.9 miles": 14, + "Within 0.5 miles": 15, + "Within 0.2 miles": 16, + "Within 600 feet": 17, + "Within 300 feet": 18, + "Within 150 feet": 19, + }, }, }, ], diff --git a/src/components/PageComponents/Config/Bluetooth.tsx b/src/components/PageComponents/Config/Bluetooth.tsx index 474663bd..362606bb 100644 --- a/src/components/PageComponents/Config/Bluetooth.tsx +++ b/src/components/PageComponents/Config/Bluetooth.tsx @@ -111,8 +111,9 @@ export const Bluetooth = () => { disabledBy: [ { fieldName: "mode", - selector: Protobuf.Config.Config_BluetoothConfig_PairingMode - .FIXED_PIN, + selector: + Protobuf.Config.Config_BluetoothConfig_PairingMode + .FIXED_PIN, invert: true, }, { diff --git a/src/components/PageComponents/Config/Security/Security.tsx b/src/components/PageComponents/Config/Security/Security.tsx index 6047381b..7aee9907 100644 --- a/src/components/PageComponents/Config/Security/Security.tsx +++ b/src/components/PageComponents/Config/Security/Security.tsx @@ -6,13 +6,13 @@ import { getX25519PublicKey, } from "@app/core/utils/x25519"; import type { SecurityValidation } from "@app/validation/config/security.tsx"; +import { create } from "@bufbuild/protobuf"; import { useDevice } from "@core/stores/deviceStore.ts"; import { Protobuf } from "@meshtastic/js"; import { fromByteArray, toByteArray } from "base64-js"; import { Eye, EyeOff } from "lucide-react"; import { useReducer } from "react"; import { securityReducer } from "./securityReducer"; -import { create } from "@bufbuild/protobuf"; export const Security = () => { const { config, setWorkingConfig, setDialogOpen } = useDevice(); @@ -308,7 +308,8 @@ export const Security = () => { - dispatch({ type: "SHOW_PRIVATE_KEY_DIALOG", payload: false })} + dispatch({ type: "SHOW_PRIVATE_KEY_DIALOG", payload: false }) + } onSubmit={pkiRegenerate} /> diff --git a/src/components/PageComponents/ModuleConfig/CannedMessage.tsx b/src/components/PageComponents/ModuleConfig/CannedMessage.tsx index 672bbbb5..97595ddc 100644 --- a/src/components/PageComponents/ModuleConfig/CannedMessage.tsx +++ b/src/components/PageComponents/ModuleConfig/CannedMessage.tsx @@ -63,8 +63,9 @@ export const CannedMessage = (): JSX.Element => { label: "Clockwise event", description: "Select input event.", properties: { - enumValue: Protobuf.ModuleConfig - .ModuleConfig_CannedMessageConfig_InputEventChar, + enumValue: + Protobuf.ModuleConfig + .ModuleConfig_CannedMessageConfig_InputEventChar, }, }, { @@ -73,8 +74,9 @@ export const CannedMessage = (): JSX.Element => { label: "Counter Clockwise event", description: "Select input event.", properties: { - enumValue: Protobuf.ModuleConfig - .ModuleConfig_CannedMessageConfig_InputEventChar, + enumValue: + Protobuf.ModuleConfig + .ModuleConfig_CannedMessageConfig_InputEventChar, }, }, { @@ -83,8 +85,9 @@ export const CannedMessage = (): JSX.Element => { label: "Press event", description: "Select input event", properties: { - enumValue: Protobuf.ModuleConfig - .ModuleConfig_CannedMessageConfig_InputEventChar, + enumValue: + Protobuf.ModuleConfig + .ModuleConfig_CannedMessageConfig_InputEventChar, }, }, { diff --git a/src/components/PageComponents/ModuleConfig/MQTT.tsx b/src/components/PageComponents/ModuleConfig/MQTT.tsx index 4b6bfe25..5b2d3f60 100644 --- a/src/components/PageComponents/ModuleConfig/MQTT.tsx +++ b/src/components/PageComponents/ModuleConfig/MQTT.tsx @@ -15,8 +15,7 @@ export const MQTT = (): JSX.Element => { value: { ...data, mapReportSettings: create( - Protobuf.ModuleConfig - .ModuleConfig_MapReportSettingsSchema, + Protobuf.ModuleConfig.ModuleConfig_MapReportSettingsSchema, data.mapReportSettings, ), }, @@ -166,31 +165,32 @@ export const MQTT = (): JSX.Element => { description: "Position shared will be accurate within this distance", properties: { - enumValue: config.display?.units === 0 - ? { - "Within 23 km": 10, - "Within 12 km": 11, - "Within 5.8 km": 12, - "Within 2.9 km": 13, - "Within 1.5 km": 14, - "Within 700 m": 15, - "Within 350 m": 16, - "Within 200 m": 17, - "Within 90 m": 18, - "Within 50 m": 19, - } - : { - "Within 15 miles": 10, - "Within 7.3 miles": 11, - "Within 3.6 miles": 12, - "Within 1.8 miles": 13, - "Within 0.9 miles": 14, - "Within 0.5 miles": 15, - "Within 0.2 miles": 16, - "Within 600 feet": 17, - "Within 300 feet": 18, - "Within 150 feet": 19, - }, + enumValue: + config.display?.units === 0 + ? { + "Within 23 km": 10, + "Within 12 km": 11, + "Within 5.8 km": 12, + "Within 2.9 km": 13, + "Within 1.5 km": 14, + "Within 700 m": 15, + "Within 350 m": 16, + "Within 200 m": 17, + "Within 90 m": 18, + "Within 50 m": 19, + } + : { + "Within 15 miles": 10, + "Within 7.3 miles": 11, + "Within 3.6 miles": 12, + "Within 1.8 miles": 13, + "Within 0.9 miles": 14, + "Within 0.5 miles": 15, + "Within 0.2 miles": 16, + "Within 600 feet": 17, + "Within 300 feet": 18, + "Within 150 feet": 19, + }, }, disabledBy: [ { diff --git a/src/core/stores/deviceStore.ts b/src/core/stores/deviceStore.ts index 74c4453b..e7682530 100644 --- a/src/core/stores/deviceStore.ts +++ b/src/core/stores/deviceStore.ts @@ -1,8 +1,8 @@ -import { createContext, useContext } from "react"; +import { create } from "@bufbuild/protobuf"; +import { Protobuf, Types } from "@meshtastic/js"; import { produce } from "immer"; +import { createContext, useContext } from "react"; import { create as createStore } from "zustand"; -import { Protobuf, Types } from "@meshtastic/js"; -import { create } from "@bufbuild/protobuf"; export type Page = "messages" | "map" | "config" | "channels" | "nodes"; @@ -299,11 +299,11 @@ export const useDeviceStore = createStore((set, get) => ({ if (!device) { return; } - const workingModuleConfigIndex = device?.workingModuleConfig - .findIndex( + const workingModuleConfigIndex = + device?.workingModuleConfig.findIndex( (wmc) => wmc.payloadVariant.case === - moduleConfig.payloadVariant.case, + moduleConfig.payloadVariant.case, ); if (workingModuleConfigIndex !== -1) { device.workingModuleConfig[workingModuleConfigIndex] = @@ -445,7 +445,8 @@ export const useDeviceStore = createStore((set, get) => ({ if (!device) { return; } - const currentNode = device.nodes.get(user.from) ?? + const currentNode = + device.nodes.get(user.from) ?? create(Protobuf.Mesh.NodeInfoSchema); currentNode.user = user.data; device.nodes.set(user.from, currentNode); @@ -459,7 +460,8 @@ export const useDeviceStore = createStore((set, get) => ({ if (!device) { return; } - const currentNode = device.nodes.get(position.from) ?? + const currentNode = + device.nodes.get(position.from) ?? create(Protobuf.Mesh.NodeInfoSchema); currentNode.position = position.data; device.nodes.set(position.from, currentNode); @@ -484,11 +486,12 @@ export const useDeviceStore = createStore((set, get) => ({ return; } const messageGroup = device.messages[message.type]; - const messageIndex = message.type === "direct" - ? message.from === device.hardware.myNodeNum - ? message.to - : message.from - : message.channel; + const messageIndex = + message.type === "direct" + ? message.from === device.hardware.myNodeNum + ? message.to + : message.from + : message.channel; const messages = messageGroup.get(messageIndex); if (messages) { @@ -561,9 +564,12 @@ export const useDeviceStore = createStore((set, get) => ({ } const messageGroup = device.messages[type]; - const messageIndex = type === "direct" - ? from === device.hardware.myNodeNum ? to : from - : channelIndex; + const messageIndex = + type === "direct" + ? from === device.hardware.myNodeNum + ? to + : from + : channelIndex; const messages = messageGroup.get(messageIndex); if (!messages) { diff --git a/src/pages/Map/index.tsx b/src/pages/Map/index.tsx index bb69825c..ee833720 100644 --- a/src/pages/Map/index.tsx +++ b/src/pages/Map/index.tsx @@ -40,9 +40,8 @@ const MapPage = (): JSX.Element => { const darkMode = currentTheme === "dark"; - const [selectedNode, setSelectedNode] = useState< - Protobuf.Mesh.NodeInfo | null - >(null); + const [selectedNode, setSelectedNode] = + useState(null); // Filter out nodes without a valid position const validNodes = useMemo( @@ -186,18 +185,16 @@ const MapPage = (): JSX.Element => { ))} {markers} - {selectedNode - ? ( - setSelectedNode(null)} - > - - - ) - : null} + {selectedNode ? ( + setSelectedNode(null)} + > + + + ) : null} From 5a62b67e792d3c79b0dbac099baeac10b452f01d Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sat, 1 Mar 2025 14:00:06 +0800 Subject: [PATCH 4/6] use new packages for imports & new webserial transport --- bun.lock | 8 + package.json | 2 + src/components/Dialog/DeviceNameDialog.tsx | 2 +- src/components/Dialog/ImportDialog.tsx | 21 +- .../Dialog/LocationResponseDialog.tsx | 12 +- src/components/Dialog/NodeDetailsDialog.tsx | 273 ++++++++++-------- src/components/Dialog/NodeOptionsDialog.tsx | 12 +- src/components/Dialog/QRDialog.tsx | 10 +- .../Dialog/TracerouteResponseDialog.tsx | 8 +- src/components/PageComponents/Channel.tsx | 67 +++-- .../PageComponents/Config/Bluetooth.tsx | 7 +- .../PageComponents/Config/Device.tsx | 2 +- .../PageComponents/Config/Display.tsx | 2 +- src/components/PageComponents/Config/LoRa.tsx | 2 +- .../PageComponents/Config/Network.tsx | 2 +- .../PageComponents/Config/Position.tsx | 2 +- .../PageComponents/Config/Power.tsx | 2 +- .../Config/Security/Security.tsx | 2 +- .../PageComponents/Connect/Serial.tsx | 14 +- .../PageComponents/Map/NodeDetail.tsx | 52 ++-- .../PageComponents/Messages/ChannelChat.tsx | 10 +- .../PageComponents/Messages/Message.tsx | 2 +- .../PageComponents/Messages/MessageInput.tsx | 6 +- .../PageComponents/Messages/TraceRoute.tsx | 38 +-- .../ModuleConfig/AmbientLighting.tsx | 2 +- .../PageComponents/ModuleConfig/Audio.tsx | 2 +- .../ModuleConfig/CannedMessage.tsx | 2 +- .../ModuleConfig/DetectionSensor.tsx | 2 +- .../ModuleConfig/ExternalNotification.tsx | 2 +- .../PageComponents/ModuleConfig/MQTT.tsx | 2 +- .../ModuleConfig/NeighborInfo.tsx | 2 +- .../ModuleConfig/Paxcounter.tsx | 2 +- .../PageComponents/ModuleConfig/RangeTest.tsx | 2 +- .../PageComponents/ModuleConfig/Serial.tsx | 2 +- .../ModuleConfig/StoreForward.tsx | 2 +- .../PageComponents/ModuleConfig/Telemetry.tsx | 2 +- src/core/stores/appStore.ts | 2 +- src/core/stores/deviceStore.ts | 34 +-- src/core/subscriptions.ts | 2 +- src/pages/Channels.tsx | 8 +- src/pages/Map/index.tsx | 2 +- src/pages/Messages.tsx | 67 ++--- src/pages/Nodes.tsx | 34 +-- src/validation/channel.ts | 8 +- src/validation/config/bluetooth.ts | 14 +- src/validation/config/device.ts | 2 +- src/validation/config/display.ts | 2 +- src/validation/config/lora.ts | 2 +- src/validation/config/network.ts | 2 +- src/validation/config/position.ts | 14 +- src/validation/config/power.ts | 2 +- src/validation/config/security.ts | 14 +- .../moduleConfig/ambientLighting.ts | 14 +- src/validation/moduleConfig/audio.ts | 2 +- src/validation/moduleConfig/cannedMessage.ts | 17 +- .../moduleConfig/detectionSensor.ts | 14 +- .../moduleConfig/externalNotification.ts | 14 +- src/validation/moduleConfig/mqtt.ts | 2 +- src/validation/moduleConfig/neighborInfo.ts | 5 +- src/validation/moduleConfig/paxcounter.ts | 5 +- src/validation/moduleConfig/rangeTest.ts | 2 +- src/validation/moduleConfig/serial.ts | 5 +- src/validation/moduleConfig/storeForward.ts | 2 +- src/validation/moduleConfig/telemetry.ts | 5 +- 64 files changed, 443 insertions(+), 435 deletions(-) diff --git a/bun.lock b/bun.lock index 378b1a1f..8bbaa95a 100644 --- a/bun.lock +++ b/bun.lock @@ -5,7 +5,9 @@ "name": "meshtastic-web", "dependencies": { "@bufbuild/protobuf": "^2.2.3", + "@meshtastic/core": "npm:@jsr/meshtastic__core@2.6.0-0", "@meshtastic/js": "npm:@jsr/meshtastic__js@2.6.0-0", + "@meshtastic/transport-web-serial": "npm:@jsr/meshtastic__transport-web-serial", "@noble/curves": "^1.8.1", "@radix-ui/react-accordion": "^1.2.3", "@radix-ui/react-checkbox": "^1.1.4", @@ -359,6 +361,8 @@ "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], + "@jsr/meshtastic__core": ["@jsr/meshtastic__core@2.6.0-0", "https://npm.jsr.io/~/11/@jsr/meshtastic__core/2.6.0-0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3", "@jsr/meshtastic__protobufs": "^2.6.0", "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.3" } }, "sha512-Ks71sRagbBipotznULpsJZ1EMcQIqCEJQx6mf628dmCNVf2YECi2zi/i/5zErp1hGPgfbDvCz9oPogvsd/7fMA=="], + "@jsr/meshtastic__protobufs": ["@jsr/meshtastic__protobufs@2.6.0", "https://npm.jsr.io/~/11/@jsr/meshtastic__protobufs/2.6.0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3" } }, "sha512-CGlgBdzAuQCZuGPrnzP8zU+EcLlmyYeeMbqFHuJ834cYfArWXDjDh1UYaPo2rI03LTjqa3MeWpfqDlzBR8kIMg=="], "@mapbox/geojson-rewind": ["@mapbox/geojson-rewind@0.5.2", "", { "dependencies": { "get-stream": "^6.0.1", "minimist": "^1.2.6" }, "bin": { "geojson-rewind": "geojson-rewind" } }, "sha512-tJaT+RbYGJYStt7wI3cq4Nl4SXxG8W7JDG5DMJu97V25RnbNg3QtQtf+KD+VLjNpWKYsRvXDNmNrBgEETr1ifA=="], @@ -379,8 +383,12 @@ "@maplibre/maplibre-gl-style-spec": ["@maplibre/maplibre-gl-style-spec@23.1.0", "", { "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", "@mapbox/unitbezier": "^0.0.1", "json-stringify-pretty-compact": "^4.0.0", "minimist": "^1.2.8", "quickselect": "^3.0.0", "rw": "^1.3.3", "tinyqueue": "^3.0.0" }, "bin": { "gl-style-migrate": "dist/gl-style-migrate.mjs", "gl-style-validate": "dist/gl-style-validate.mjs", "gl-style-format": "dist/gl-style-format.mjs" } }, "sha512-R6/ihEuC5KRexmKIYkWqUv84Gm+/QwsOUgHyt1yy2XqCdGdLvlBWVWIIeTZWN4NGdwmY6xDzdSGU2R9oBLNg2w=="], + "@meshtastic/core": ["@jsr/meshtastic__core@2.6.0-0", "https://npm.jsr.io/~/11/@jsr/meshtastic__core/2.6.0-0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3", "@jsr/meshtastic__protobufs": "^2.6.0", "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.3" } }, "sha512-Ks71sRagbBipotznULpsJZ1EMcQIqCEJQx6mf628dmCNVf2YECi2zi/i/5zErp1hGPgfbDvCz9oPogvsd/7fMA=="], + "@meshtastic/js": ["@jsr/meshtastic__js@2.6.0-0", "https://npm.jsr.io/~/11/@jsr/meshtastic__js/2.6.0-0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3", "@jsr/meshtastic__protobufs": "^2.6.0", "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.3" } }, "sha512-+xpZpxK6oUIVOuEs7C+LyxRr2druvc7UNNNTK9Rl8ioXj63Jz1uQXlYe2Gj0xjnRAiSQLR7QVaPef21BR/YTxA=="], + "@meshtastic/transport-web-serial": ["@jsr/meshtastic__transport-web-serial@0.2.0", "https://npm.jsr.io/~/11/@jsr/meshtastic__transport-web-serial/0.2.0.tgz", { "dependencies": { "@jsr/meshtastic__core": "^2.6.0-0" } }, "sha512-mP/nxOj0syABh3FkG5iIolWhUMiFh/qtJtvqihxLkaRoxdabUyW62mOtfhCMBEjxgVnKg4Gy7GkaXfC/eFy19Q=="], + "@noble/curves": ["@noble/curves@1.8.1", "", { "dependencies": { "@noble/hashes": "1.7.1" } }, "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ=="], "@noble/hashes": ["@noble/hashes@1.7.1", "", {}, "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ=="], diff --git a/package.json b/package.json index 6b060bcb..c001aff5 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,9 @@ "homepage": "https://meshtastic.org", "dependencies": { "@bufbuild/protobuf": "^2.2.3", + "@meshtastic/core": "npm:@jsr/meshtastic__core@2.6.0-0", "@meshtastic/js": "npm:@jsr/meshtastic__js@2.6.0-0", + "@meshtastic/transport-web-serial": "npm:@jsr/meshtastic__transport-web-serial", "@noble/curves": "^1.8.1", "@radix-ui/react-accordion": "^1.2.3", "@radix-ui/react-checkbox": "^1.1.4", diff --git a/src/components/Dialog/DeviceNameDialog.tsx b/src/components/Dialog/DeviceNameDialog.tsx index 44fe6d7a..655840cc 100644 --- a/src/components/Dialog/DeviceNameDialog.tsx +++ b/src/components/Dialog/DeviceNameDialog.tsx @@ -11,7 +11,7 @@ import { } from "@components/UI/Dialog.tsx"; import { Input } from "@components/UI/Input.tsx"; import { Label } from "@components/UI/Label.tsx"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { useForm } from "react-hook-form"; export interface User { diff --git a/src/components/Dialog/ImportDialog.tsx b/src/components/Dialog/ImportDialog.tsx index 3823538c..91947608 100644 --- a/src/components/Dialog/ImportDialog.tsx +++ b/src/components/Dialog/ImportDialog.tsx @@ -13,7 +13,7 @@ import { Input } from "@components/UI/Input.tsx"; import { Label } from "@components/UI/Label.tsx"; import { Switch } from "@components/UI/Switch.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { toByteArray } from "base64-js"; import { type JSX, useEffect, useState } from "react"; @@ -73,10 +73,9 @@ export const ImportDialog = ({ connection?.setChannel( create(Protobuf.Channel.ChannelSchema, { index, - role: - index === 0 - ? Protobuf.Channel.Channel_Role.PRIMARY - : Protobuf.Channel.Channel_Role.SECONDARY, + role: index === 0 + ? Protobuf.Channel.Channel_Role.PRIMARY + : Protobuf.Channel.Channel_Role.SECONDARY, settings: ch, }), ); @@ -123,21 +122,25 @@ export const ImportDialog = ({ checked={channelSet?.loraConfig?.usePreset ?? true} /> - {/* */} + */ + } - {/* */} + */ + } Channels: diff --git a/src/components/Dialog/LocationResponseDialog.tsx b/src/components/Dialog/LocationResponseDialog.tsx index 825046e6..5c79c487 100644 --- a/src/components/Dialog/LocationResponseDialog.tsx +++ b/src/components/Dialog/LocationResponseDialog.tsx @@ -6,7 +6,7 @@ import { DialogHeader, DialogTitle, } from "@components/UI/Dialog"; -import type { Protobuf, Types } from "@meshtastic/js"; +import type { Protobuf, Types } from "@meshtastic/core"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import type { JSX } from "react"; @@ -24,11 +24,9 @@ export const LocationResponseDialog = ({ const { nodes } = useDevice(); const from = nodes.get(location?.from ?? 0); - const longName = - from?.user?.longName ?? + const longName = from?.user?.longName ?? (from ? `!${numberToHexUnpadded(from?.num)}` : "Unknown"); - const shortName = - from?.user?.shortName ?? + const shortName = from?.user?.shortName ?? (from ? `${numberToHexUnpadded(from?.num).substring(0, 4)}` : "UNK"); return ( @@ -44,7 +42,9 @@ export const LocationResponseDialog = ({ Coordinates:{" "} diff --git a/src/components/Dialog/NodeDetailsDialog.tsx b/src/components/Dialog/NodeDetailsDialog.tsx index b3a8f1a1..325da884 100644 --- a/src/components/Dialog/NodeDetailsDialog.tsx +++ b/src/components/Dialog/NodeDetailsDialog.tsx @@ -13,7 +13,7 @@ import { DialogHeader, DialogTitle, } from "@components/UI/Dialog"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import { DeviceImage } from "../generic/DeviceImage"; import { TimeAgo } from "../generic/TimeAgo"; @@ -32,132 +32,159 @@ export const NodeDetailsDialog = ({ const { nodeNumDetails } = useAppStore(); const device: Protobuf.Mesh.NodeInfo = nodes.get(nodeNumDetails); - return device ? ( - - - - - Node Details for {device.user?.longName ?? "UNKNOWN"} ( - {device.user?.shortName ?? "UNK"}) - - - -
- -
-

- Details: -

-

- Hardware:{" "} - {Protobuf.Mesh.HardwareModel[device.user?.hwModel ?? 0]} -

-

Node Number: {device.num}

-

Node HEX: !{numberToHexUnpadded(device.num)}

-

- Role:{" "} - { - Protobuf.Config.Config_DeviceConfig_Role[ - device.user?.role ?? 0 - ] - } -

-

- Last Heard:{" "} - {device.lastHeard === 0 ? ( - "Never" - ) : ( - - )} -

-
- - {device.position ? ( -
+ return device + ? ( + + + + + Node Details for {device.user?.longName ?? "UNKNOWN"} ( + {device.user?.shortName ?? "UNK"}) + + + +
+ + - ) : null} - - {device.deviceMetrics ? ( -
-

- Device Metrics: +

+ Hardware:{" "} + {Protobuf.Mesh.HardwareModel[device.user?.hwModel ?? 0]} +

+

Node Number: {device.num}

+

Node HEX: !{numberToHexUnpadded(device.num)}

+

+ Role: {Protobuf.Config.Config_DeviceConfig_Role[ + device.user?.role ?? 0 + ]} +

+

+ Last Heard: {device.lastHeard === 0 + ? ( + "Never" + ) + : }

- {device.deviceMetrics.airUtilTx ? ( -

- Air TX utilization:{" "} - {device.deviceMetrics.airUtilTx.toFixed(2)}% -

- ) : null} - {device.deviceMetrics.channelUtilization ? ( -

- Channel utilization:{" "} - {device.deviceMetrics.channelUtilization.toFixed(2)}% -

- ) : null} - {device.deviceMetrics.batteryLevel ? ( -

- Battery level:{" "} - {device.deviceMetrics.batteryLevel.toFixed(2)}% -

- ) : null} - {device.deviceMetrics.voltage ? ( -

Voltage: {device.deviceMetrics.voltage.toFixed(2)}V

- ) : null} - {device.deviceMetrics.uptimeSeconds ? ( -

- Uptime:{" "} - -

- ) : null}
- ) : null} - {device ? ( -
- - - -

- All Raw Metrics: -

-
- -
+              {device.position
+                ? (
+                  
+

+ Position: +

+ {device.position.latitudeI && device.position.longitudeI + ? ( +

+ Coordinates:{" "} + + {device.position.latitudeI / 1e7},{" "} + {device.position.longitudeI / 1e7} + +

+ ) + : null} + {device.position.altitude + ?

Altitude: {device.position.altitude}m

+ : null} +
+ ) + : null} + + {device.deviceMetrics + ? ( +
+

+ Device Metrics: +

+ {device.deviceMetrics.airUtilTx + ? ( +

+ Air TX utilization:{" "} + {device.deviceMetrics.airUtilTx.toFixed(2)}% +

+ ) + : null} + {device.deviceMetrics.channelUtilization + ? ( +

+ Channel utilization:{" "} + {device.deviceMetrics.channelUtilization.toFixed(2)}% +

+ ) + : null} + {device.deviceMetrics.batteryLevel + ? ( +

+ Battery level:{" "} + {device.deviceMetrics.batteryLevel.toFixed(2)}% +

+ ) + : null} + {device.deviceMetrics.voltage + ? ( +

+ Voltage: {device.deviceMetrics.voltage.toFixed(2)}V +

+ ) + : null} + {device.deviceMetrics.uptimeSeconds + ? ( +

+ Uptime:{" "} + +

+ ) + : null} +
+ ) + : null} + + {device + ? ( +
+ + + +

+ All Raw Metrics: +

+
+ +
                         {JSON.stringify(device, null, 2)}
-                      
-
-
-
-
- ) : null} -
- - - - ) : null; + + + + +
+ ) + : null} +
+ + + + ) + : null; }; diff --git a/src/components/Dialog/NodeOptionsDialog.tsx b/src/components/Dialog/NodeOptionsDialog.tsx index d62e4065..d95ea7ab 100644 --- a/src/components/Dialog/NodeOptionsDialog.tsx +++ b/src/components/Dialog/NodeOptionsDialog.tsx @@ -7,7 +7,7 @@ import { DialogHeader, DialogTitle, } from "@components/UI/Dialog"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import { TrashIcon } from "lucide-react"; import type { JSX } from "react"; @@ -31,11 +31,9 @@ export const NodeOptionsDialog = ({ setChatType, setActiveChat, } = useAppStore(); - const longName = - node?.user?.longName ?? + const longName = node?.user?.longName ?? (node ? `!${numberToHexUnpadded(node?.num)}` : "Unknown"); - const shortName = - node?.user?.shortName ?? + const shortName = node?.user?.shortName ?? (node ? `${numberToHexUnpadded(node?.num).substring(0, 4)}` : "UNK"); function handleDirectMessage() { @@ -53,7 +51,7 @@ export const NodeOptionsDialog = ({ connection?.requestPosition(node.num).then(() => toast({ title: "Position request sent.", - }), + }) ); onOpenChange(); } @@ -66,7 +64,7 @@ export const NodeOptionsDialog = ({ connection?.traceRoute(node.num).then(() => toast({ title: "Traceroute sent.", - }), + }) ); onOpenChange(); } diff --git a/src/components/Dialog/QRDialog.tsx b/src/components/Dialog/QRDialog.tsx index 4b612a8d..751b6f69 100644 --- a/src/components/Dialog/QRDialog.tsx +++ b/src/components/Dialog/QRDialog.tsx @@ -10,7 +10,7 @@ import { } from "@components/UI/Dialog.tsx"; import { Input } from "@components/UI/Input.tsx"; import { Label } from "@components/UI/Label.tsx"; -import { Protobuf, type Types } from "@meshtastic/js"; +import { Protobuf, type Types } from "@meshtastic/core"; import { fromByteArray } from "base64-js"; import { ClipboardIcon } from "lucide-react"; import { useEffect, useMemo, useState } from "react"; @@ -77,8 +77,8 @@ export const QRDialog = ({ {channel.settings?.name.length ? channel.settings.name : channel.role === Protobuf.Channel.Channel_Role.PRIMARY - ? "Primary" - : `Channel: ${channel.index}`} + ? "Primary" + : `Channel: ${channel.index}`} { if (selectedChannels.includes(channel.index)) { setSelectedChannels( - selectedChannels.filter((c) => c !== channel.index), + selectedChannels.filter((c) => + c !== channel.index + ), ); } else { setSelectedChannels([ diff --git a/src/components/Dialog/TracerouteResponseDialog.tsx b/src/components/Dialog/TracerouteResponseDialog.tsx index 9fce1cfa..7e97fb81 100644 --- a/src/components/Dialog/TracerouteResponseDialog.tsx +++ b/src/components/Dialog/TracerouteResponseDialog.tsx @@ -6,7 +6,7 @@ import { DialogHeader, DialogTitle, } from "@components/UI/Dialog"; -import type { Protobuf, Types } from "@meshtastic/js"; +import type { Protobuf, Types } from "@meshtastic/core"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import type { JSX } from "react"; import { TraceRoute } from "../PageComponents/Messages/TraceRoute"; @@ -28,11 +28,9 @@ export const TracerouteResponseDialog = ({ const snrTowards = traceroute?.data.snrTowards ?? []; const snrBack = traceroute?.data.snrBack ?? []; const from = nodes.get(traceroute?.from ?? 0); - const longName = - from?.user?.longName ?? + const longName = from?.user?.longName ?? (from ? `!${numberToHexUnpadded(from?.num)}` : "Unknown"); - const shortName = - from?.user?.shortName ?? + const shortName = from?.user?.shortName ?? (from ? `${numberToHexUnpadded(from?.num).substring(0, 4)}` : "UNK"); const to = nodes.get(traceroute?.to ?? 0); return ( diff --git a/src/components/PageComponents/Channel.tsx b/src/components/PageComponents/Channel.tsx index f3c7a1df..53e9c68f 100644 --- a/src/components/PageComponents/Channel.tsx +++ b/src/components/PageComponents/Channel.tsx @@ -3,7 +3,7 @@ import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useToast } from "@core/hooks/useToast.ts"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { fromByteArray, toByteArray } from "base64-js"; import cryptoRandomString from "crypto-random-string"; import { useState } from "react"; @@ -24,8 +24,9 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { channel?.settings?.psk.length ?? 16, ); const [validationText, setValidationText] = useState(); - const [preSharedDialogOpen, setPreSharedDialogOpen] = - useState(false); + const [preSharedDialogOpen, setPreSharedDialogOpen] = useState( + false, + ); const onSubmit = (data: ChannelValidation) => { const channel = create(Protobuf.Channel.ChannelSchema, { @@ -107,7 +108,7 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { channel?.settings?.moduleSettings?.positionPrecision === 32, positionPrecision: channel?.settings?.moduleSettings?.positionPrecision === - undefined + undefined ? 10 : channel?.settings?.moduleSettings?.positionPrecision, }, @@ -126,10 +127,9 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { description: "Device telemetry is sent over PRIMARY. Only one PRIMARY allowed", properties: { - enumValue: - channel.index === 0 - ? { PRIMARY: 1 } - : { DISABLED: 0, SECONDARY: 2 }, + enumValue: channel.index === 0 + ? { PRIMARY: 1 } + : { DISABLED: 0, SECONDARY: 2 }, }, }, { @@ -192,32 +192,31 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { description: "If not sharing precise location, position shared on channel will be accurate within this distance", properties: { - enumValue: - config.display?.units === 0 - ? { - "Within 23 km": 10, - "Within 12 km": 11, - "Within 5.8 km": 12, - "Within 2.9 km": 13, - "Within 1.5 km": 14, - "Within 700 m": 15, - "Within 350 m": 16, - "Within 200 m": 17, - "Within 90 m": 18, - "Within 50 m": 19, - } - : { - "Within 15 miles": 10, - "Within 7.3 miles": 11, - "Within 3.6 miles": 12, - "Within 1.8 miles": 13, - "Within 0.9 miles": 14, - "Within 0.5 miles": 15, - "Within 0.2 miles": 16, - "Within 600 feet": 17, - "Within 300 feet": 18, - "Within 150 feet": 19, - }, + enumValue: config.display?.units === 0 + ? { + "Within 23 km": 10, + "Within 12 km": 11, + "Within 5.8 km": 12, + "Within 2.9 km": 13, + "Within 1.5 km": 14, + "Within 700 m": 15, + "Within 350 m": 16, + "Within 200 m": 17, + "Within 90 m": 18, + "Within 50 m": 19, + } + : { + "Within 15 miles": 10, + "Within 7.3 miles": 11, + "Within 3.6 miles": 12, + "Within 1.8 miles": 13, + "Within 0.9 miles": 14, + "Within 0.5 miles": 15, + "Within 0.2 miles": 16, + "Within 600 feet": 17, + "Within 300 feet": 18, + "Within 150 feet": 19, + }, }, }, ], diff --git a/src/components/PageComponents/Config/Bluetooth.tsx b/src/components/PageComponents/Config/Bluetooth.tsx index 362606bb..97f137b1 100644 --- a/src/components/PageComponents/Config/Bluetooth.tsx +++ b/src/components/PageComponents/Config/Bluetooth.tsx @@ -3,7 +3,7 @@ import type { BluetoothValidation } from "@app/validation/config/bluetooth.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { useState } from "react"; export const Bluetooth = () => { @@ -111,9 +111,8 @@ export const Bluetooth = () => { disabledBy: [ { fieldName: "mode", - selector: - Protobuf.Config.Config_BluetoothConfig_PairingMode - .FIXED_PIN, + selector: Protobuf.Config.Config_BluetoothConfig_PairingMode + .FIXED_PIN, invert: true, }, { diff --git a/src/components/PageComponents/Config/Device.tsx b/src/components/PageComponents/Config/Device.tsx index c06fe178..30629bed 100644 --- a/src/components/PageComponents/Config/Device.tsx +++ b/src/components/PageComponents/Config/Device.tsx @@ -2,7 +2,7 @@ import type { DeviceValidation } from "@app/validation/config/device.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const Device = (): JSX.Element => { const { config, setWorkingConfig } = useDevice(); diff --git a/src/components/PageComponents/Config/Display.tsx b/src/components/PageComponents/Config/Display.tsx index 64b5b368..e0d1e671 100644 --- a/src/components/PageComponents/Config/Display.tsx +++ b/src/components/PageComponents/Config/Display.tsx @@ -2,7 +2,7 @@ import type { DisplayValidation } from "@app/validation/config/display.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const Display = (): JSX.Element => { const { config, setWorkingConfig } = useDevice(); diff --git a/src/components/PageComponents/Config/LoRa.tsx b/src/components/PageComponents/Config/LoRa.tsx index 8dfb81c9..c1f3aa47 100644 --- a/src/components/PageComponents/Config/LoRa.tsx +++ b/src/components/PageComponents/Config/LoRa.tsx @@ -2,7 +2,7 @@ import type { LoRaValidation } from "@app/validation/config/lora.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const LoRa = (): JSX.Element => { const { config, setWorkingConfig } = useDevice(); diff --git a/src/components/PageComponents/Config/Network.tsx b/src/components/PageComponents/Config/Network.tsx index 76f1d54d..42d724d8 100644 --- a/src/components/PageComponents/Config/Network.tsx +++ b/src/components/PageComponents/Config/Network.tsx @@ -6,7 +6,7 @@ import { convertIntToIpAddress, convertIpAddressToInt, } from "@core/utils/ip.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const Network = (): JSX.Element => { const { config, setWorkingConfig } = useDevice(); diff --git a/src/components/PageComponents/Config/Position.tsx b/src/components/PageComponents/Config/Position.tsx index 4aa3abba..8d1992cc 100644 --- a/src/components/PageComponents/Config/Position.tsx +++ b/src/components/PageComponents/Config/Position.tsx @@ -6,7 +6,7 @@ import type { PositionValidation } from "@app/validation/config/position.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { useCallback } from "react"; export const Position = () => { diff --git a/src/components/PageComponents/Config/Power.tsx b/src/components/PageComponents/Config/Power.tsx index e49d7ff6..b1e389c6 100644 --- a/src/components/PageComponents/Config/Power.tsx +++ b/src/components/PageComponents/Config/Power.tsx @@ -2,7 +2,7 @@ import type { PowerValidation } from "@app/validation/config/power.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const Power = (): JSX.Element => { const { config, setWorkingConfig } = useDevice(); diff --git a/src/components/PageComponents/Config/Security/Security.tsx b/src/components/PageComponents/Config/Security/Security.tsx index 7aee9907..c1468efc 100644 --- a/src/components/PageComponents/Config/Security/Security.tsx +++ b/src/components/PageComponents/Config/Security/Security.tsx @@ -8,7 +8,7 @@ import { import type { SecurityValidation } from "@app/validation/config/security.tsx"; import { create } from "@bufbuild/protobuf"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { fromByteArray, toByteArray } from "base64-js"; import { Eye, EyeOff } from "lucide-react"; import { useReducer } from "react"; diff --git a/src/components/PageComponents/Connect/Serial.tsx b/src/components/PageComponents/Connect/Serial.tsx index 529b8c3d..f5288403 100644 --- a/src/components/PageComponents/Connect/Serial.tsx +++ b/src/components/PageComponents/Connect/Serial.tsx @@ -5,7 +5,8 @@ import { useAppStore } from "@core/stores/appStore.ts"; import { useDeviceStore } from "@core/stores/deviceStore.ts"; import { subscribeAll } from "@core/subscriptions.ts"; import { randId } from "@core/utils/randId.ts"; -import { SerialConnection } from "@meshtastic/js"; +import { MeshDevice } from "@meshtastic/core"; +import { TransportWebSerial } from "@meshtastic/transport-web-serial"; import { useCallback, useEffect, useState } from "react"; export const Serial = ({ closeDialog }: TabElementProps): JSX.Element => { @@ -31,14 +32,9 @@ export const Serial = ({ closeDialog }: TabElementProps): JSX.Element => { const id = randId(); const device = addDevice(id); setSelectedDevice(id); - const connection = new SerialConnection(id); - await connection - .connect({ - port, - baudRate: undefined, - concurrentLogOutput: true, - }) - .catch((e: Error) => console.log(`Unable to Connect: ${e.message}`)); + const transport = await TransportWebSerial.createFromPort(port); + const connection = new MeshDevice(transport, id); + connection.configure(); device.addConnection(connection); subscribeAll(device, connection); diff --git a/src/components/PageComponents/Map/NodeDetail.tsx b/src/components/PageComponents/Map/NodeDetail.tsx index e89dcd1b..7342bdf0 100644 --- a/src/components/PageComponents/Map/NodeDetail.tsx +++ b/src/components/PageComponents/Map/NodeDetail.tsx @@ -5,8 +5,8 @@ import { formatQuantity } from "@app/core/utils/string"; import { Avatar } from "@components/UI/Avatar"; import { Mono } from "@components/generic/Mono.tsx"; import { TimeAgo } from "@components/generic/TimeAgo.tsx"; -import { Protobuf } from "@meshtastic/js"; -import type { Protobuf as ProtobufType } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; +import type { Protobuf as ProtobufType } from "@meshtastic/core"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import { BatteryChargingIcon, @@ -37,21 +37,23 @@ export const NodeDetail = ({ node }: NodeDetailProps) => {
- {node.user?.publicKey && node.user?.publicKey.length > 0 ? ( - - ) : ( - - )} + {node.user?.publicKey && node.user?.publicKey.length > 0 + ? ( + + ) + : ( + + )}
{ node.deviceMetrics?.voltage?.toPrecision(3) ?? "Unknown" } volts`} > - {node.deviceMetrics?.batteryLevel > 100 ? ( - - ) : node.deviceMetrics?.batteryLevel > 80 ? ( - - ) : node.deviceMetrics?.batteryLevel > 20 ? ( - - ) : ( - - )} + {node.deviceMetrics?.batteryLevel > 100 + ? + : node.deviceMetrics?.batteryLevel > 80 + ? + : node.deviceMetrics?.batteryLevel > 20 + ? + : } {node.deviceMetrics?.batteryLevel > 100 ? "Charging" diff --git a/src/components/PageComponents/Messages/ChannelChat.tsx b/src/components/PageComponents/Messages/ChannelChat.tsx index a5231496..7969782b 100644 --- a/src/components/PageComponents/Messages/ChannelChat.tsx +++ b/src/components/PageComponents/Messages/ChannelChat.tsx @@ -4,7 +4,7 @@ import { } from "@app/core/stores/deviceStore.ts"; import { Message } from "@components/PageComponents/Messages/Message.tsx"; import { MessageInput } from "@components/PageComponents/Messages/MessageInput.tsx"; -import type { Types } from "@meshtastic/js"; +import type { Types } from "@meshtastic/core"; import { InboxIcon } from "lucide-react"; import { useCallback, useEffect, useRef } from "react"; import type { JSX } from "react"; @@ -34,8 +34,7 @@ export const ChannelChat = ({ const scrollToBottom = useCallback(() => { const scrollContainer = scrollContainerRef.current; if (scrollContainer) { - const isNearBottom = - scrollContainer.scrollHeight - + const isNearBottom = scrollContainer.scrollHeight - scrollContainer.scrollTop - scrollContainer.clientHeight < 100; @@ -72,9 +71,8 @@ export const ChannelChat = ({ key={message.id} message={message} sender={nodes.get(message.from)} - lastMsgSameUser={ - index > 0 && messages[index - 1].from === message.from - } + lastMsgSameUser={index > 0 && + messages[index - 1].from === message.from} /> ); })} diff --git a/src/components/PageComponents/Messages/Message.tsx b/src/components/PageComponents/Messages/Message.tsx index 6c6fa79a..17b659b2 100644 --- a/src/components/PageComponents/Messages/Message.tsx +++ b/src/components/PageComponents/Messages/Message.tsx @@ -12,7 +12,7 @@ import { } from "@app/core/stores/deviceStore.ts"; import { cn } from "@app/core/utils/cn"; import { Avatar } from "@components/UI/Avatar"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { AlertCircle, CheckCircle2, CircleEllipsis } from "lucide-react"; import type { LucideIcon } from "lucide-react"; import { useMemo } from "react"; diff --git a/src/components/PageComponents/Messages/MessageInput.tsx b/src/components/PageComponents/Messages/MessageInput.tsx index 1e4887cd..c91612be 100644 --- a/src/components/PageComponents/Messages/MessageInput.tsx +++ b/src/components/PageComponents/Messages/MessageInput.tsx @@ -2,7 +2,7 @@ import { debounce } from "@app/core/utils/debounce"; import { Button } from "@components/UI/Button.tsx"; import { Input } from "@components/UI/Input.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import type { Types } from "@meshtastic/js"; +import type { Types } from "@meshtastic/core"; import { SendIcon } from "lucide-react"; import { type JSX, @@ -51,7 +51,7 @@ export const MessageInput = ({ myNodeNum, id, "ack", - ), + ) ) .catch((e: Types.PacketError) => setMessageState( @@ -61,7 +61,7 @@ export const MessageInput = ({ myNodeNum, e.id, e.error, - ), + ) ); }, [channel, connection, myNodeNum, setMessageState, to], diff --git a/src/components/PageComponents/Messages/TraceRoute.tsx b/src/components/PageComponents/Messages/TraceRoute.tsx index 2c9e813a..aa5580a8 100644 --- a/src/components/PageComponents/Messages/TraceRoute.tsx +++ b/src/components/PageComponents/Messages/TraceRoute.tsx @@ -1,5 +1,5 @@ import { useDevice } from "@app/core/stores/deviceStore.ts"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import type { JSX } from "react"; @@ -38,23 +38,25 @@ export const TraceRoute = ({ ))} {from?.user?.longName} - {routeBack ? ( - -

Route back:

-

{from?.user?.longName}

-

↓ {snrBack?.[0] ? snrBack[0] : "??"}dB

- {routeBack.map((hop, i) => ( - -

- {nodes.get(hop)?.user?.longName ?? - `!${numberToHexUnpadded(hop)}`} -

-

↓ {snrBack?.[i + 1] ? snrBack[i + 1] : "??"}dB

-
- ))} - {to?.user?.longName} -
- ) : null} + {routeBack + ? ( + +

Route back:

+

{from?.user?.longName}

+

↓ {snrBack?.[0] ? snrBack[0] : "??"}dB

+ {routeBack.map((hop, i) => ( + +

+ {nodes.get(hop)?.user?.longName ?? + `!${numberToHexUnpadded(hop)}`} +

+

↓ {snrBack?.[i + 1] ? snrBack[i + 1] : "??"}dB

+
+ ))} + {to?.user?.longName} +
+ ) + : null}
); }; diff --git a/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx b/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx index f7853710..effe7471 100644 --- a/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx +++ b/src/components/PageComponents/ModuleConfig/AmbientLighting.tsx @@ -2,7 +2,7 @@ import { useDevice } from "@app/core/stores/deviceStore.ts"; import type { AmbientLightingValidation } from "@app/validation/moduleConfig/ambientLighting.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const AmbientLighting = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/Audio.tsx b/src/components/PageComponents/ModuleConfig/Audio.tsx index 46d2176c..08960704 100644 --- a/src/components/PageComponents/ModuleConfig/Audio.tsx +++ b/src/components/PageComponents/ModuleConfig/Audio.tsx @@ -2,7 +2,7 @@ import type { AudioValidation } from "@app/validation/moduleConfig/audio.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const Audio = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/CannedMessage.tsx b/src/components/PageComponents/ModuleConfig/CannedMessage.tsx index 97595ddc..b800035d 100644 --- a/src/components/PageComponents/ModuleConfig/CannedMessage.tsx +++ b/src/components/PageComponents/ModuleConfig/CannedMessage.tsx @@ -2,7 +2,7 @@ import type { CannedMessageValidation } from "@app/validation/moduleConfig/canne import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const CannedMessage = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx b/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx index e547fab1..056c48dd 100644 --- a/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx +++ b/src/components/PageComponents/ModuleConfig/DetectionSensor.tsx @@ -2,7 +2,7 @@ import { useDevice } from "@app/core/stores/deviceStore.ts"; import type { DetectionSensorValidation } from "@app/validation/moduleConfig/detectionSensor.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const DetectionSensor = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx b/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx index dfe61fad..6d767ea1 100644 --- a/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx +++ b/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx @@ -2,7 +2,7 @@ import type { ExternalNotificationValidation } from "@app/validation/moduleConfi import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const ExternalNotification = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/MQTT.tsx b/src/components/PageComponents/ModuleConfig/MQTT.tsx index 5b2d3f60..28e3cba9 100644 --- a/src/components/PageComponents/ModuleConfig/MQTT.tsx +++ b/src/components/PageComponents/ModuleConfig/MQTT.tsx @@ -2,7 +2,7 @@ import { useDevice } from "@app/core/stores/deviceStore.ts"; import type { MqttValidation } from "@app/validation/moduleConfig/mqtt.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const MQTT = (): JSX.Element => { const { config, moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx b/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx index 1dfa9532..b3391f0f 100644 --- a/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx +++ b/src/components/PageComponents/ModuleConfig/NeighborInfo.tsx @@ -2,7 +2,7 @@ import { useDevice } from "@app/core/stores/deviceStore.ts"; import type { NeighborInfoValidation } from "@app/validation/moduleConfig/neighborInfo.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const NeighborInfo = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/Paxcounter.tsx b/src/components/PageComponents/ModuleConfig/Paxcounter.tsx index d4118b8e..fd5b372f 100644 --- a/src/components/PageComponents/ModuleConfig/Paxcounter.tsx +++ b/src/components/PageComponents/ModuleConfig/Paxcounter.tsx @@ -2,7 +2,7 @@ import type { PaxcounterValidation } from "@app/validation/moduleConfig/paxcount import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const Paxcounter = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/RangeTest.tsx b/src/components/PageComponents/ModuleConfig/RangeTest.tsx index 6c98d45a..e0fbdf2f 100644 --- a/src/components/PageComponents/ModuleConfig/RangeTest.tsx +++ b/src/components/PageComponents/ModuleConfig/RangeTest.tsx @@ -2,7 +2,7 @@ import type { RangeTestValidation } from "@app/validation/moduleConfig/rangeTest import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const RangeTest = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/Serial.tsx b/src/components/PageComponents/ModuleConfig/Serial.tsx index e7afd3eb..05713f20 100644 --- a/src/components/PageComponents/ModuleConfig/Serial.tsx +++ b/src/components/PageComponents/ModuleConfig/Serial.tsx @@ -2,7 +2,7 @@ import type { SerialValidation } from "@app/validation/moduleConfig/serial.tsx"; import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const Serial = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/StoreForward.tsx b/src/components/PageComponents/ModuleConfig/StoreForward.tsx index dbd17c28..72ca9bee 100644 --- a/src/components/PageComponents/ModuleConfig/StoreForward.tsx +++ b/src/components/PageComponents/ModuleConfig/StoreForward.tsx @@ -2,7 +2,7 @@ import type { StoreForwardValidation } from "@app/validation/moduleConfig/storeF import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const StoreForward = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/components/PageComponents/ModuleConfig/Telemetry.tsx b/src/components/PageComponents/ModuleConfig/Telemetry.tsx index c6e9f4fb..c2de366e 100644 --- a/src/components/PageComponents/ModuleConfig/Telemetry.tsx +++ b/src/components/PageComponents/ModuleConfig/Telemetry.tsx @@ -2,7 +2,7 @@ import type { TelemetryValidation } from "@app/validation/moduleConfig/telemetry import { create } from "@bufbuild/protobuf"; import { DynamicForm } from "@components/Form/DynamicForm.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; export const Telemetry = (): JSX.Element => { const { moduleConfig, setWorkingModuleConfig } = useDevice(); diff --git a/src/core/stores/appStore.ts b/src/core/stores/appStore.ts index bf8644ce..cd943fc0 100644 --- a/src/core/stores/appStore.ts +++ b/src/core/stores/appStore.ts @@ -1,4 +1,4 @@ -import { Types } from "@meshtastic/js"; +import { Types } from "@meshtastic/core"; import { produce } from "immer"; import { create } from "zustand"; diff --git a/src/core/stores/deviceStore.ts b/src/core/stores/deviceStore.ts index e7682530..0822473f 100644 --- a/src/core/stores/deviceStore.ts +++ b/src/core/stores/deviceStore.ts @@ -1,5 +1,5 @@ import { create } from "@bufbuild/protobuf"; -import { Protobuf, Types } from "@meshtastic/js"; +import { Protobuf, Types } from "@meshtastic/core"; import { produce } from "immer"; import { createContext, useContext } from "react"; import { create as createStore } from "zustand"; @@ -299,11 +299,11 @@ export const useDeviceStore = createStore((set, get) => ({ if (!device) { return; } - const workingModuleConfigIndex = - device?.workingModuleConfig.findIndex( + const workingModuleConfigIndex = device?.workingModuleConfig + .findIndex( (wmc) => wmc.payloadVariant.case === - moduleConfig.payloadVariant.case, + moduleConfig.payloadVariant.case, ); if (workingModuleConfigIndex !== -1) { device.workingModuleConfig[workingModuleConfigIndex] = @@ -445,8 +445,7 @@ export const useDeviceStore = createStore((set, get) => ({ if (!device) { return; } - const currentNode = - device.nodes.get(user.from) ?? + const currentNode = device.nodes.get(user.from) ?? create(Protobuf.Mesh.NodeInfoSchema); currentNode.user = user.data; device.nodes.set(user.from, currentNode); @@ -460,8 +459,7 @@ export const useDeviceStore = createStore((set, get) => ({ if (!device) { return; } - const currentNode = - device.nodes.get(position.from) ?? + const currentNode = device.nodes.get(position.from) ?? create(Protobuf.Mesh.NodeInfoSchema); currentNode.position = position.data; device.nodes.set(position.from, currentNode); @@ -486,12 +484,11 @@ export const useDeviceStore = createStore((set, get) => ({ return; } const messageGroup = device.messages[message.type]; - const messageIndex = - message.type === "direct" - ? message.from === device.hardware.myNodeNum - ? message.to - : message.from - : message.channel; + const messageIndex = message.type === "direct" + ? message.from === device.hardware.myNodeNum + ? message.to + : message.from + : message.channel; const messages = messageGroup.get(messageIndex); if (messages) { @@ -564,12 +561,9 @@ export const useDeviceStore = createStore((set, get) => ({ } const messageGroup = device.messages[type]; - const messageIndex = - type === "direct" - ? from === device.hardware.myNodeNum - ? to - : from - : channelIndex; + const messageIndex = type === "direct" + ? from === device.hardware.myNodeNum ? to : from + : channelIndex; const messages = messageGroup.get(messageIndex); if (!messages) { diff --git a/src/core/subscriptions.ts b/src/core/subscriptions.ts index afba12b7..8dac29db 100644 --- a/src/core/subscriptions.ts +++ b/src/core/subscriptions.ts @@ -1,5 +1,5 @@ import type { Device } from "@core/stores/deviceStore.ts"; -import { Protobuf, type Types } from "@meshtastic/js"; +import { Protobuf, type Types } from "@meshtastic/core"; export const subscribeAll = ( device: Device, diff --git a/src/pages/Channels.tsx b/src/pages/Channels.tsx index 3a47455c..4a2b3954 100644 --- a/src/pages/Channels.tsx +++ b/src/pages/Channels.tsx @@ -8,8 +8,8 @@ import { Channel } from "@components/PageComponents/Channel.tsx"; import { PageLayout } from "@components/PageLayout.tsx"; import { Sidebar } from "@components/Sidebar.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Types } from "@meshtastic/js"; -import type { Protobuf } from "@meshtastic/js"; +import { Types } from "@meshtastic/core"; +import type { Protobuf } from "@meshtastic/core"; import { ImportIcon, QrCodeIcon } from "lucide-react"; import { useState } from "react"; @@ -17,8 +17,8 @@ export const getChannelName = (channel: Protobuf.Channel.Channel) => channel.settings?.name.length ? channel.settings?.name : channel.index === 0 - ? "Primary" - : `Ch ${channel.index}`; + ? "Primary" + : `Ch ${channel.index}`; const ChannelsPage = () => { const { channels, setDialogOpen } = useDevice(); diff --git a/src/pages/Map/index.tsx b/src/pages/Map/index.tsx index ee833720..c1c484a5 100644 --- a/src/pages/Map/index.tsx +++ b/src/pages/Map/index.tsx @@ -4,7 +4,7 @@ import { useTheme } from "@app/core/hooks/useTheme"; import { PageLayout } from "@components/PageLayout.tsx"; import { Sidebar } from "@components/Sidebar.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { bbox, lineString } from "@turf/turf"; import { current } from "immer"; import { MapPinIcon } from "lucide-react"; diff --git a/src/pages/Messages.tsx b/src/pages/Messages.tsx index 670bab74..2ac0d274 100644 --- a/src/pages/Messages.tsx +++ b/src/pages/Messages.tsx @@ -7,7 +7,7 @@ import { SidebarSection } from "@components/UI/Sidebar/SidebarSection.tsx"; import { SidebarButton } from "@components/UI/Sidebar/sidebarButton.tsx"; import { useToast } from "@core/hooks/useToast.ts"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf, Types } from "@meshtastic/js"; +import { Protobuf, Types } from "@meshtastic/core"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import { getChannelName } from "@pages/Channels.tsx"; import { HashIcon, LockIcon, LockOpenIcon, WaypointsIcon } from "lucide-react"; @@ -39,13 +39,11 @@ export const MessagesPage = () => { {filteredChannels.map((channel) => ( { setChatType("broadcast"); @@ -69,9 +67,8 @@ export const MessagesPage = () => { {filteredNodes.map((node) => ( { setChatType("direct"); @@ -94,32 +91,30 @@ export const MessagesPage = () => { chatType === "broadcast" && currentChannel ? getChannelName(currentChannel) : chatType === "direct" && nodes.get(activeChat) - ? (nodes.get(activeChat)?.user?.longName ?? nodeHex) - : "Loading..." + ? (nodes.get(activeChat)?.user?.longName ?? nodeHex) + : "Loading..." }`} - actions={ - chatType === "direct" - ? [ - { - icon: nodes.get(activeChat)?.user?.publicKey.length - ? LockIcon - : LockOpenIcon, - iconClasses: nodes.get(activeChat)?.user?.publicKey.length - ? "text-green-600" - : "text-yellow-300", - async onClick() { - const targetNode = nodes.get(activeChat)?.num; - if (targetNode === undefined) return; - toast({ - title: nodes.get(activeChat)?.user?.publicKey.length - ? "Chat is using PKI encryption." - : "Chat is using PSK encryption.", - }); - }, - }, - ] - : [] - } + actions={chatType === "direct" + ? [ + { + icon: nodes.get(activeChat)?.user?.publicKey.length + ? LockIcon + : LockOpenIcon, + iconClasses: nodes.get(activeChat)?.user?.publicKey.length + ? "text-green-600" + : "text-yellow-300", + async onClick() { + const targetNode = nodes.get(activeChat)?.num; + if (targetNode === undefined) return; + toast({ + title: nodes.get(activeChat)?.user?.publicKey.length + ? "Chat is using PKI encryption." + : "Chat is using PSK encryption.", + }); + }, + }, + ] + : []} > {allChannels.map( (channel) => diff --git a/src/pages/Nodes.tsx b/src/pages/Nodes.tsx index 0fadf0ca..30daaa84 100644 --- a/src/pages/Nodes.tsx +++ b/src/pages/Nodes.tsx @@ -8,7 +8,7 @@ import { Mono } from "@components/generic/Mono.tsx"; import { Table } from "@components/generic/Table/index.tsx"; import { TimeAgo } from "@components/generic/TimeAgo.tsx"; import { useDevice } from "@core/stores/deviceStore.ts"; -import { Protobuf, type Types } from "@meshtastic/js"; +import { Protobuf, type Types } from "@meshtastic/core"; import { numberToHexUnpadded } from "@noble/curves/abstract/utils"; import { LockIcon, LockOpenIcon } from "lucide-react"; import { Fragment, type JSX, useCallback, useEffect, useState } from "react"; @@ -107,9 +107,11 @@ const NodesPage = (): JSX.Element => { > {node.user?.shortName ?? (node.user?.macaddr - ? `${base16 + ? `${ + base16 .stringify(node.user?.macaddr.subarray(4, 6) ?? []) - .toLowerCase()}` + .toLowerCase() + }` : `${numberToHexUnpadded(node.num).slice(-4)}`)} , @@ -120,9 +122,11 @@ const NodesPage = (): JSX.Element => { > {node.user?.longName ?? (node.user?.macaddr - ? `Meshtastic ${base16 + ? `Meshtastic ${ + base16 .stringify(node.user?.macaddr.subarray(4, 6) ?? []) - .toLowerCase()}` + .toLowerCase() + }` : `!${numberToHexUnpadded(node.num)}`)} , @@ -136,11 +140,9 @@ const NodesPage = (): JSX.Element => { ?.join(":") ?? "UNK"} , - {node.lastHeard === 0 ? ( -

Never

- ) : ( - - )} + {node.lastHeard === 0 + ?

Never

+ : }
, {node.snr}db/ @@ -148,19 +150,17 @@ const NodesPage = (): JSX.Element => { {(node.snr + 10) * 5}raw , - {node.user?.publicKey && node.user?.publicKey.length > 0 ? ( - - ) : ( - - )} + {node.user?.publicKey && node.user?.publicKey.length > 0 + ? + : } , {node.lastHeard !== 0 ? node.viaMqtt === false && node.hopsAway === 0 ? "Direct" : `${node.hopsAway.toString()} ${ - node.hopsAway > 1 ? "hops" : "hop" - } away` + node.hopsAway > 1 ? "hops" : "hop" + } away` : "-"} {node.viaMqtt === true ? ", via MQTT" : ""} , diff --git a/src/validation/channel.ts b/src/validation/channel.ts index 33349d06..4f4d43bb 100644 --- a/src/validation/channel.ts +++ b/src/validation/channel.ts @@ -1,5 +1,5 @@ import type { Message } from "@bufbuild/protobuf"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsEnum, @@ -10,8 +10,7 @@ import { } from "class-validator"; export class ChannelValidation - implements Omit -{ + implements Omit { @IsNumber() index: number; @@ -22,8 +21,7 @@ export class ChannelValidation } export class Channel_SettingsValidation - implements Omit -{ + implements Omit { @IsNumber() channelNum: number; diff --git a/src/validation/config/bluetooth.ts b/src/validation/config/bluetooth.ts index efaca6e9..67492240 100644 --- a/src/validation/config/bluetooth.ts +++ b/src/validation/config/bluetooth.ts @@ -1,14 +1,12 @@ import type { Message } from "@bufbuild/protobuf"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsEnum, IsInt } from "class-validator"; -export class BluetoothValidation - implements - Omit< - Protobuf.Config.Config_BluetoothConfig, - keyof Message | "deviceLoggingEnabled" - > -{ +export class BluetoothValidation implements + Omit< + Protobuf.Config.Config_BluetoothConfig, + keyof Message | "deviceLoggingEnabled" + > { @IsBoolean() enabled: boolean; diff --git a/src/validation/config/device.ts b/src/validation/config/device.ts index b61be39f..5c79d583 100644 --- a/src/validation/config/device.ts +++ b/src/validation/config/device.ts @@ -1,5 +1,5 @@ import type { Message } from "@bufbuild/protobuf"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsEnum, IsInt, IsString } from "class-validator"; export class DeviceValidation diff --git a/src/validation/config/display.ts b/src/validation/config/display.ts index 48831052..ed21d3f9 100644 --- a/src/validation/config/display.ts +++ b/src/validation/config/display.ts @@ -1,5 +1,5 @@ import type { Message } from "@bufbuild/protobuf"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsEnum, IsInt } from "class-validator"; export class DisplayValidation diff --git a/src/validation/config/lora.ts b/src/validation/config/lora.ts index e8ff5cef..4fb5646a 100644 --- a/src/validation/config/lora.ts +++ b/src/validation/config/lora.ts @@ -1,5 +1,5 @@ import type { Message } from "@bufbuild/protobuf"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { IsArray, IsBoolean, IsEnum, IsInt, Max, Min } from "class-validator"; export class LoRaValidation diff --git a/src/validation/config/network.ts b/src/validation/config/network.ts index 41db88d7..922f9563 100644 --- a/src/validation/config/network.ts +++ b/src/validation/config/network.ts @@ -1,5 +1,5 @@ import type { Message } from "@bufbuild/protobuf"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsEnum, diff --git a/src/validation/config/position.ts b/src/validation/config/position.ts index 7eb42c56..4163db76 100644 --- a/src/validation/config/position.ts +++ b/src/validation/config/position.ts @@ -1,16 +1,14 @@ import type { Message } from "@bufbuild/protobuf"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { IsArray, IsBoolean, IsEnum, IsInt } from "class-validator"; const DeprecatedPositionValidationFields = ["gpsEnabled", "gpsAttemptTime"]; -export class PositionValidation - implements - Omit< - Protobuf.Config.Config_PositionConfig, - keyof Message | (typeof DeprecatedPositionValidationFields)[number] - > -{ +export class PositionValidation implements + Omit< + Protobuf.Config.Config_PositionConfig, + keyof Message | (typeof DeprecatedPositionValidationFields)[number] + > { @IsInt() positionBroadcastSecs: number; diff --git a/src/validation/config/power.ts b/src/validation/config/power.ts index 67bd1cd0..0e1012d3 100644 --- a/src/validation/config/power.ts +++ b/src/validation/config/power.ts @@ -1,5 +1,5 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt, IsNumber, Max, Min } from "class-validator"; export class PowerValidation diff --git a/src/validation/config/security.ts b/src/validation/config/security.ts index d1a35808..b856d521 100644 --- a/src/validation/config/security.ts +++ b/src/validation/config/security.ts @@ -1,14 +1,12 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsString } from "class-validator"; -export class SecurityValidation - implements - Omit< - Protobuf.Config.Config_SecurityConfig, - keyof Message | "adminKey" | "privateKey" | "publicKey" - > -{ +export class SecurityValidation implements + Omit< + Protobuf.Config.Config_SecurityConfig, + keyof Message | "adminKey" | "privateKey" | "publicKey" + > { @IsBoolean() adminChannelEnabled: boolean; diff --git a/src/validation/moduleConfig/ambientLighting.ts b/src/validation/moduleConfig/ambientLighting.ts index 2e72f00e..93124502 100644 --- a/src/validation/moduleConfig/ambientLighting.ts +++ b/src/validation/moduleConfig/ambientLighting.ts @@ -1,14 +1,12 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt } from "class-validator"; -export class AmbientLightingValidation - implements - Omit< - Protobuf.ModuleConfig.ModuleConfig_AmbientLightingConfig, - keyof Message - > -{ +export class AmbientLightingValidation implements + Omit< + Protobuf.ModuleConfig.ModuleConfig_AmbientLightingConfig, + keyof Message + > { @IsBoolean() ledState: boolean; diff --git a/src/validation/moduleConfig/audio.ts b/src/validation/moduleConfig/audio.ts index da527a66..091350f7 100644 --- a/src/validation/moduleConfig/audio.ts +++ b/src/validation/moduleConfig/audio.ts @@ -1,5 +1,5 @@ import type { Message } from "@bufbuild/protobuf"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsEnum, IsInt } from "class-validator"; export class AudioValidation diff --git a/src/validation/moduleConfig/cannedMessage.ts b/src/validation/moduleConfig/cannedMessage.ts index 85c8d6a7..59ecf755 100644 --- a/src/validation/moduleConfig/cannedMessage.ts +++ b/src/validation/moduleConfig/cannedMessage.ts @@ -1,11 +1,13 @@ import type { Message } from "@bufbuild/protobuf"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsEnum, IsInt, Length } from "class-validator"; export class CannedMessageValidation implements - Omit -{ + Omit< + Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig, + keyof Message + > { @IsBoolean() rotary1Enabled: boolean; @@ -19,13 +21,16 @@ export class CannedMessageValidation inputbrokerPinPress: number; @IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar) - inputbrokerEventCw: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; + inputbrokerEventCw: + Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; @IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar) - inputbrokerEventCcw: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; + inputbrokerEventCcw: + Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; @IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar) - inputbrokerEventPress: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; + inputbrokerEventPress: + Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; @IsBoolean() updown1Enabled: boolean; diff --git a/src/validation/moduleConfig/detectionSensor.ts b/src/validation/moduleConfig/detectionSensor.ts index 3e026fee..b812df17 100644 --- a/src/validation/moduleConfig/detectionSensor.ts +++ b/src/validation/moduleConfig/detectionSensor.ts @@ -1,14 +1,12 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt, Length } from "class-validator"; -export class DetectionSensorValidation - implements - Omit< - Protobuf.ModuleConfig.ModuleConfig_DetectionSensorConfig, - keyof Message - > -{ +export class DetectionSensorValidation implements + Omit< + Protobuf.ModuleConfig.ModuleConfig_DetectionSensorConfig, + keyof Message + > { @IsBoolean() enabled: boolean; diff --git a/src/validation/moduleConfig/externalNotification.ts b/src/validation/moduleConfig/externalNotification.ts index cf08a321..5b68ffa3 100644 --- a/src/validation/moduleConfig/externalNotification.ts +++ b/src/validation/moduleConfig/externalNotification.ts @@ -1,14 +1,12 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt } from "class-validator"; -export class ExternalNotificationValidation - implements - Omit< - Protobuf.ModuleConfig.ModuleConfig_ExternalNotificationConfig, - keyof Message - > -{ +export class ExternalNotificationValidation implements + Omit< + Protobuf.ModuleConfig.ModuleConfig_ExternalNotificationConfig, + keyof Message + > { @IsBoolean() enabled: boolean; diff --git a/src/validation/moduleConfig/mqtt.ts b/src/validation/moduleConfig/mqtt.ts index 7a2c9170..79608610 100644 --- a/src/validation/moduleConfig/mqtt.ts +++ b/src/validation/moduleConfig/mqtt.ts @@ -1,5 +1,5 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsNumber, diff --git a/src/validation/moduleConfig/neighborInfo.ts b/src/validation/moduleConfig/neighborInfo.ts index f6b48a01..513b8d7c 100644 --- a/src/validation/moduleConfig/neighborInfo.ts +++ b/src/validation/moduleConfig/neighborInfo.ts @@ -1,11 +1,10 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt } from "class-validator"; export class NeighborInfoValidation implements - Omit -{ + Omit { @IsBoolean() enabled: boolean; diff --git a/src/validation/moduleConfig/paxcounter.ts b/src/validation/moduleConfig/paxcounter.ts index 6f5bc66a..6b3eeb9b 100644 --- a/src/validation/moduleConfig/paxcounter.ts +++ b/src/validation/moduleConfig/paxcounter.ts @@ -1,11 +1,10 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt } from "class-validator"; export class PaxcounterValidation implements - Omit -{ + Omit { @IsBoolean() enabled: boolean; diff --git a/src/validation/moduleConfig/rangeTest.ts b/src/validation/moduleConfig/rangeTest.ts index 9cc9a96e..fa7a1feb 100644 --- a/src/validation/moduleConfig/rangeTest.ts +++ b/src/validation/moduleConfig/rangeTest.ts @@ -1,5 +1,5 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt } from "class-validator"; export class RangeTestValidation diff --git a/src/validation/moduleConfig/serial.ts b/src/validation/moduleConfig/serial.ts index 75861abd..c814a71b 100644 --- a/src/validation/moduleConfig/serial.ts +++ b/src/validation/moduleConfig/serial.ts @@ -1,11 +1,10 @@ import type { Message } from "@bufbuild/protobuf"; -import { Protobuf } from "@meshtastic/js"; +import { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsEnum, IsInt } from "class-validator"; export class SerialValidation implements - Omit -{ + Omit { @IsBoolean() enabled: boolean; diff --git a/src/validation/moduleConfig/storeForward.ts b/src/validation/moduleConfig/storeForward.ts index 773a2539..39007de8 100644 --- a/src/validation/moduleConfig/storeForward.ts +++ b/src/validation/moduleConfig/storeForward.ts @@ -1,5 +1,5 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt } from "class-validator"; export class StoreForwardValidation diff --git a/src/validation/moduleConfig/telemetry.ts b/src/validation/moduleConfig/telemetry.ts index 48b89025..921fb04a 100644 --- a/src/validation/moduleConfig/telemetry.ts +++ b/src/validation/moduleConfig/telemetry.ts @@ -1,11 +1,10 @@ import type { Message } from "@bufbuild/protobuf"; -import type { Protobuf } from "@meshtastic/js"; +import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt } from "class-validator"; export class TelemetryValidation implements - Omit -{ + Omit { @IsInt() deviceUpdateInterval: number; From 977b5647f6d6a2ecec4e76f9d1b909acf064165d Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sat, 1 Mar 2025 14:14:21 +0800 Subject: [PATCH 5/6] format --- src/components/Dialog/ImportDialog.tsx | 19 +- .../Dialog/LocationResponseDialog.tsx | 6 +- src/components/Dialog/NodeDetailsDialog.tsx | 273 ++++++++---------- src/components/Dialog/NodeOptionsDialog.tsx | 10 +- src/components/Dialog/QRDialog.tsx | 8 +- .../Dialog/TracerouteResponseDialog.tsx | 6 +- src/components/PageComponents/Channel.tsx | 65 +++-- .../PageComponents/Config/Bluetooth.tsx | 5 +- .../PageComponents/Map/NodeDetail.tsx | 48 +-- .../PageComponents/Messages/ChannelChat.tsx | 8 +- .../PageComponents/Messages/MessageInput.tsx | 4 +- .../PageComponents/Messages/TraceRoute.tsx | 36 ++- src/core/stores/deviceStore.ts | 32 +- src/pages/Channels.tsx | 4 +- src/pages/Messages.tsx | 65 +++-- src/pages/Nodes.tsx | 32 +- src/validation/channel.ts | 6 +- src/validation/config/bluetooth.ts | 12 +- src/validation/config/position.ts | 12 +- src/validation/config/security.ts | 12 +- .../moduleConfig/ambientLighting.ts | 12 +- src/validation/moduleConfig/cannedMessage.ts | 15 +- .../moduleConfig/detectionSensor.ts | 12 +- .../moduleConfig/externalNotification.ts | 12 +- src/validation/moduleConfig/neighborInfo.ts | 3 +- src/validation/moduleConfig/paxcounter.ts | 3 +- src/validation/moduleConfig/serial.ts | 3 +- src/validation/moduleConfig/telemetry.ts | 3 +- 28 files changed, 364 insertions(+), 362 deletions(-) diff --git a/src/components/Dialog/ImportDialog.tsx b/src/components/Dialog/ImportDialog.tsx index 91947608..ed37351e 100644 --- a/src/components/Dialog/ImportDialog.tsx +++ b/src/components/Dialog/ImportDialog.tsx @@ -73,9 +73,10 @@ export const ImportDialog = ({ connection?.setChannel( create(Protobuf.Channel.ChannelSchema, { index, - role: index === 0 - ? Protobuf.Channel.Channel_Role.PRIMARY - : Protobuf.Channel.Channel_Role.SECONDARY, + role: + index === 0 + ? Protobuf.Channel.Channel_Role.PRIMARY + : Protobuf.Channel.Channel_Role.SECONDARY, settings: ch, }), ); @@ -122,25 +123,21 @@ export const ImportDialog = ({ checked={channelSet?.loraConfig?.usePreset ?? true} /> - { - /* */ - } + */} - { - /* */ - } + */} Channels: diff --git a/src/components/Dialog/LocationResponseDialog.tsx b/src/components/Dialog/LocationResponseDialog.tsx index 5c79c487..b885667c 100644 --- a/src/components/Dialog/LocationResponseDialog.tsx +++ b/src/components/Dialog/LocationResponseDialog.tsx @@ -24,9 +24,11 @@ export const LocationResponseDialog = ({ const { nodes } = useDevice(); const from = nodes.get(location?.from ?? 0); - const longName = from?.user?.longName ?? + const longName = + from?.user?.longName ?? (from ? `!${numberToHexUnpadded(from?.num)}` : "Unknown"); - const shortName = from?.user?.shortName ?? + const shortName = + from?.user?.shortName ?? (from ? `${numberToHexUnpadded(from?.num).substring(0, 4)}` : "UNK"); return ( diff --git a/src/components/Dialog/NodeDetailsDialog.tsx b/src/components/Dialog/NodeDetailsDialog.tsx index 325da884..ab76aa2f 100644 --- a/src/components/Dialog/NodeDetailsDialog.tsx +++ b/src/components/Dialog/NodeDetailsDialog.tsx @@ -32,159 +32,134 @@ export const NodeDetailsDialog = ({ const { nodeNumDetails } = useAppStore(); const device: Protobuf.Mesh.NodeInfo = nodes.get(nodeNumDetails); - return device - ? ( - - - - - Node Details for {device.user?.longName ?? "UNKNOWN"} ( - {device.user?.shortName ?? "UNK"}) - - - -
- -
-

- Details: -

-

- Hardware:{" "} - {Protobuf.Mesh.HardwareModel[device.user?.hwModel ?? 0]} -

-

Node Number: {device.num}

-

Node HEX: !{numberToHexUnpadded(device.num)}

-

- Role: {Protobuf.Config.Config_DeviceConfig_Role[ + return device ? ( +

+ + + + Node Details for {device.user?.longName ?? "UNKNOWN"} ( + {device.user?.shortName ?? "UNK"}) + + + +
+ +
+

+ Details: +

+

+ Hardware:{" "} + {Protobuf.Mesh.HardwareModel[device.user?.hwModel ?? 0]} +

+

Node Number: {device.num}

+

Node HEX: !{numberToHexUnpadded(device.num)}

+

+ Role:{" "} + { + Protobuf.Config.Config_DeviceConfig_Role[ device.user?.role ?? 0 - ]} -

-

- Last Heard: {device.lastHeard === 0 - ? ( - "Never" - ) - : } + ] + } +

+

+ Last Heard:{" "} + {device.lastHeard === 0 ? ( + "Never" + ) : ( + + )} +

+
+ + {device.position ? ( +
+

+ Position:

+ {device.position.latitudeI && device.position.longitudeI ? ( +

+ Coordinates:{" "} + + {device.position.latitudeI / 1e7},{" "} + {device.position.longitudeI / 1e7} + +

+ ) : null} + {device.position.altitude ? ( +

Altitude: {device.position.altitude}m

+ ) : null}
+ ) : null} - {device.position - ? ( -
-

- Position: -

- {device.position.latitudeI && device.position.longitudeI - ? ( -

- Coordinates:{" "} - - {device.position.latitudeI / 1e7},{" "} - {device.position.longitudeI / 1e7} - -

- ) - : null} - {device.position.altitude - ?

Altitude: {device.position.altitude}m

- : null} -
- ) - : null} - - {device.deviceMetrics - ? ( -
-

- Device Metrics: -

- {device.deviceMetrics.airUtilTx - ? ( -

- Air TX utilization:{" "} - {device.deviceMetrics.airUtilTx.toFixed(2)}% -

- ) - : null} - {device.deviceMetrics.channelUtilization - ? ( -

- Channel utilization:{" "} - {device.deviceMetrics.channelUtilization.toFixed(2)}% -

- ) - : null} - {device.deviceMetrics.batteryLevel - ? ( -

- Battery level:{" "} - {device.deviceMetrics.batteryLevel.toFixed(2)}% -

- ) - : null} - {device.deviceMetrics.voltage - ? ( -

- Voltage: {device.deviceMetrics.voltage.toFixed(2)}V -

- ) - : null} - {device.deviceMetrics.uptimeSeconds - ? ( -

- Uptime:{" "} - -

- ) - : null} -
- ) - : null} + {device.deviceMetrics ? ( +
+

+ Device Metrics: +

+ {device.deviceMetrics.airUtilTx ? ( +

+ Air TX utilization:{" "} + {device.deviceMetrics.airUtilTx.toFixed(2)}% +

+ ) : null} + {device.deviceMetrics.channelUtilization ? ( +

+ Channel utilization:{" "} + {device.deviceMetrics.channelUtilization.toFixed(2)}% +

+ ) : null} + {device.deviceMetrics.batteryLevel ? ( +

+ Battery level:{" "} + {device.deviceMetrics.batteryLevel.toFixed(2)}% +

+ ) : null} + {device.deviceMetrics.voltage ? ( +

Voltage: {device.deviceMetrics.voltage.toFixed(2)}V

+ ) : null} + {device.deviceMetrics.uptimeSeconds ? ( +

+ Uptime:{" "} + +

+ ) : null} +
+ ) : null} - {device - ? ( -
- - - -

- All Raw Metrics: -

-
- -
+            {device ? (
+              
+ + + +

+ All Raw Metrics: +

+
+ +
                         {JSON.stringify(device, null, 2)}
-                          
-
-
-
-
- ) - : null} -
- - -
- ) - : null; + + + + +
+ ) : null} +
+
+
+
+ ) : null; }; diff --git a/src/components/Dialog/NodeOptionsDialog.tsx b/src/components/Dialog/NodeOptionsDialog.tsx index d95ea7ab..0161bb22 100644 --- a/src/components/Dialog/NodeOptionsDialog.tsx +++ b/src/components/Dialog/NodeOptionsDialog.tsx @@ -31,9 +31,11 @@ export const NodeOptionsDialog = ({ setChatType, setActiveChat, } = useAppStore(); - const longName = node?.user?.longName ?? + const longName = + node?.user?.longName ?? (node ? `!${numberToHexUnpadded(node?.num)}` : "Unknown"); - const shortName = node?.user?.shortName ?? + const shortName = + node?.user?.shortName ?? (node ? `${numberToHexUnpadded(node?.num).substring(0, 4)}` : "UNK"); function handleDirectMessage() { @@ -51,7 +53,7 @@ export const NodeOptionsDialog = ({ connection?.requestPosition(node.num).then(() => toast({ title: "Position request sent.", - }) + }), ); onOpenChange(); } @@ -64,7 +66,7 @@ export const NodeOptionsDialog = ({ connection?.traceRoute(node.num).then(() => toast({ title: "Traceroute sent.", - }) + }), ); onOpenChange(); } diff --git a/src/components/Dialog/QRDialog.tsx b/src/components/Dialog/QRDialog.tsx index 751b6f69..54e7aec8 100644 --- a/src/components/Dialog/QRDialog.tsx +++ b/src/components/Dialog/QRDialog.tsx @@ -77,8 +77,8 @@ export const QRDialog = ({ {channel.settings?.name.length ? channel.settings.name : channel.role === Protobuf.Channel.Channel_Role.PRIMARY - ? "Primary" - : `Channel: ${channel.index}`} + ? "Primary" + : `Channel: ${channel.index}`} { if (selectedChannels.includes(channel.index)) { setSelectedChannels( - selectedChannels.filter((c) => - c !== channel.index - ), + selectedChannels.filter((c) => c !== channel.index), ); } else { setSelectedChannels([ diff --git a/src/components/Dialog/TracerouteResponseDialog.tsx b/src/components/Dialog/TracerouteResponseDialog.tsx index 7e97fb81..0427a299 100644 --- a/src/components/Dialog/TracerouteResponseDialog.tsx +++ b/src/components/Dialog/TracerouteResponseDialog.tsx @@ -28,9 +28,11 @@ export const TracerouteResponseDialog = ({ const snrTowards = traceroute?.data.snrTowards ?? []; const snrBack = traceroute?.data.snrBack ?? []; const from = nodes.get(traceroute?.from ?? 0); - const longName = from?.user?.longName ?? + const longName = + from?.user?.longName ?? (from ? `!${numberToHexUnpadded(from?.num)}` : "Unknown"); - const shortName = from?.user?.shortName ?? + const shortName = + from?.user?.shortName ?? (from ? `${numberToHexUnpadded(from?.num).substring(0, 4)}` : "UNK"); const to = nodes.get(traceroute?.to ?? 0); return ( diff --git a/src/components/PageComponents/Channel.tsx b/src/components/PageComponents/Channel.tsx index 53e9c68f..d7fb490b 100644 --- a/src/components/PageComponents/Channel.tsx +++ b/src/components/PageComponents/Channel.tsx @@ -24,9 +24,8 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { channel?.settings?.psk.length ?? 16, ); const [validationText, setValidationText] = useState(); - const [preSharedDialogOpen, setPreSharedDialogOpen] = useState( - false, - ); + const [preSharedDialogOpen, setPreSharedDialogOpen] = + useState(false); const onSubmit = (data: ChannelValidation) => { const channel = create(Protobuf.Channel.ChannelSchema, { @@ -108,7 +107,7 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { channel?.settings?.moduleSettings?.positionPrecision === 32, positionPrecision: channel?.settings?.moduleSettings?.positionPrecision === - undefined + undefined ? 10 : channel?.settings?.moduleSettings?.positionPrecision, }, @@ -127,9 +126,10 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { description: "Device telemetry is sent over PRIMARY. Only one PRIMARY allowed", properties: { - enumValue: channel.index === 0 - ? { PRIMARY: 1 } - : { DISABLED: 0, SECONDARY: 2 }, + enumValue: + channel.index === 0 + ? { PRIMARY: 1 } + : { DISABLED: 0, SECONDARY: 2 }, }, }, { @@ -192,31 +192,32 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { description: "If not sharing precise location, position shared on channel will be accurate within this distance", properties: { - enumValue: config.display?.units === 0 - ? { - "Within 23 km": 10, - "Within 12 km": 11, - "Within 5.8 km": 12, - "Within 2.9 km": 13, - "Within 1.5 km": 14, - "Within 700 m": 15, - "Within 350 m": 16, - "Within 200 m": 17, - "Within 90 m": 18, - "Within 50 m": 19, - } - : { - "Within 15 miles": 10, - "Within 7.3 miles": 11, - "Within 3.6 miles": 12, - "Within 1.8 miles": 13, - "Within 0.9 miles": 14, - "Within 0.5 miles": 15, - "Within 0.2 miles": 16, - "Within 600 feet": 17, - "Within 300 feet": 18, - "Within 150 feet": 19, - }, + enumValue: + config.display?.units === 0 + ? { + "Within 23 km": 10, + "Within 12 km": 11, + "Within 5.8 km": 12, + "Within 2.9 km": 13, + "Within 1.5 km": 14, + "Within 700 m": 15, + "Within 350 m": 16, + "Within 200 m": 17, + "Within 90 m": 18, + "Within 50 m": 19, + } + : { + "Within 15 miles": 10, + "Within 7.3 miles": 11, + "Within 3.6 miles": 12, + "Within 1.8 miles": 13, + "Within 0.9 miles": 14, + "Within 0.5 miles": 15, + "Within 0.2 miles": 16, + "Within 600 feet": 17, + "Within 300 feet": 18, + "Within 150 feet": 19, + }, }, }, ], diff --git a/src/components/PageComponents/Config/Bluetooth.tsx b/src/components/PageComponents/Config/Bluetooth.tsx index 97f137b1..97a38fd0 100644 --- a/src/components/PageComponents/Config/Bluetooth.tsx +++ b/src/components/PageComponents/Config/Bluetooth.tsx @@ -111,8 +111,9 @@ export const Bluetooth = () => { disabledBy: [ { fieldName: "mode", - selector: Protobuf.Config.Config_BluetoothConfig_PairingMode - .FIXED_PIN, + selector: + Protobuf.Config.Config_BluetoothConfig_PairingMode + .FIXED_PIN, invert: true, }, { diff --git a/src/components/PageComponents/Map/NodeDetail.tsx b/src/components/PageComponents/Map/NodeDetail.tsx index 7342bdf0..e89bcdae 100644 --- a/src/components/PageComponents/Map/NodeDetail.tsx +++ b/src/components/PageComponents/Map/NodeDetail.tsx @@ -37,23 +37,21 @@ export const NodeDetail = ({ node }: NodeDetailProps) => {
- {node.user?.publicKey && node.user?.publicKey.length > 0 - ? ( - - ) - : ( - - )} + {node.user?.publicKey && node.user?.publicKey.length > 0 ? ( + + ) : ( + + )}
{ node.deviceMetrics?.voltage?.toPrecision(3) ?? "Unknown" } volts`} > - {node.deviceMetrics?.batteryLevel > 100 - ? - : node.deviceMetrics?.batteryLevel > 80 - ? - : node.deviceMetrics?.batteryLevel > 20 - ? - : } + {node.deviceMetrics?.batteryLevel > 100 ? ( + + ) : node.deviceMetrics?.batteryLevel > 80 ? ( + + ) : node.deviceMetrics?.batteryLevel > 20 ? ( + + ) : ( + + )} {node.deviceMetrics?.batteryLevel > 100 ? "Charging" diff --git a/src/components/PageComponents/Messages/ChannelChat.tsx b/src/components/PageComponents/Messages/ChannelChat.tsx index 7969782b..bc54865c 100644 --- a/src/components/PageComponents/Messages/ChannelChat.tsx +++ b/src/components/PageComponents/Messages/ChannelChat.tsx @@ -34,7 +34,8 @@ export const ChannelChat = ({ const scrollToBottom = useCallback(() => { const scrollContainer = scrollContainerRef.current; if (scrollContainer) { - const isNearBottom = scrollContainer.scrollHeight - + const isNearBottom = + scrollContainer.scrollHeight - scrollContainer.scrollTop - scrollContainer.clientHeight < 100; @@ -71,8 +72,9 @@ export const ChannelChat = ({ key={message.id} message={message} sender={nodes.get(message.from)} - lastMsgSameUser={index > 0 && - messages[index - 1].from === message.from} + lastMsgSameUser={ + index > 0 && messages[index - 1].from === message.from + } /> ); })} diff --git a/src/components/PageComponents/Messages/MessageInput.tsx b/src/components/PageComponents/Messages/MessageInput.tsx index c91612be..8c2e369f 100644 --- a/src/components/PageComponents/Messages/MessageInput.tsx +++ b/src/components/PageComponents/Messages/MessageInput.tsx @@ -51,7 +51,7 @@ export const MessageInput = ({ myNodeNum, id, "ack", - ) + ), ) .catch((e: Types.PacketError) => setMessageState( @@ -61,7 +61,7 @@ export const MessageInput = ({ myNodeNum, e.id, e.error, - ) + ), ); }, [channel, connection, myNodeNum, setMessageState, to], diff --git a/src/components/PageComponents/Messages/TraceRoute.tsx b/src/components/PageComponents/Messages/TraceRoute.tsx index aa5580a8..e0883323 100644 --- a/src/components/PageComponents/Messages/TraceRoute.tsx +++ b/src/components/PageComponents/Messages/TraceRoute.tsx @@ -38,25 +38,23 @@ export const TraceRoute = ({ ))} {from?.user?.longName}
- {routeBack - ? ( - -

Route back:

-

{from?.user?.longName}

-

↓ {snrBack?.[0] ? snrBack[0] : "??"}dB

- {routeBack.map((hop, i) => ( - -

- {nodes.get(hop)?.user?.longName ?? - `!${numberToHexUnpadded(hop)}`} -

-

↓ {snrBack?.[i + 1] ? snrBack[i + 1] : "??"}dB

-
- ))} - {to?.user?.longName} -
- ) - : null} + {routeBack ? ( + +

Route back:

+

{from?.user?.longName}

+

↓ {snrBack?.[0] ? snrBack[0] : "??"}dB

+ {routeBack.map((hop, i) => ( + +

+ {nodes.get(hop)?.user?.longName ?? + `!${numberToHexUnpadded(hop)}`} +

+

↓ {snrBack?.[i + 1] ? snrBack[i + 1] : "??"}dB

+
+ ))} + {to?.user?.longName} +
+ ) : null} ); }; diff --git a/src/core/stores/deviceStore.ts b/src/core/stores/deviceStore.ts index 0822473f..2d3d89d0 100644 --- a/src/core/stores/deviceStore.ts +++ b/src/core/stores/deviceStore.ts @@ -299,11 +299,11 @@ export const useDeviceStore = createStore((set, get) => ({ if (!device) { return; } - const workingModuleConfigIndex = device?.workingModuleConfig - .findIndex( + const workingModuleConfigIndex = + device?.workingModuleConfig.findIndex( (wmc) => wmc.payloadVariant.case === - moduleConfig.payloadVariant.case, + moduleConfig.payloadVariant.case, ); if (workingModuleConfigIndex !== -1) { device.workingModuleConfig[workingModuleConfigIndex] = @@ -445,7 +445,8 @@ export const useDeviceStore = createStore((set, get) => ({ if (!device) { return; } - const currentNode = device.nodes.get(user.from) ?? + const currentNode = + device.nodes.get(user.from) ?? create(Protobuf.Mesh.NodeInfoSchema); currentNode.user = user.data; device.nodes.set(user.from, currentNode); @@ -459,7 +460,8 @@ export const useDeviceStore = createStore((set, get) => ({ if (!device) { return; } - const currentNode = device.nodes.get(position.from) ?? + const currentNode = + device.nodes.get(position.from) ?? create(Protobuf.Mesh.NodeInfoSchema); currentNode.position = position.data; device.nodes.set(position.from, currentNode); @@ -484,11 +486,12 @@ export const useDeviceStore = createStore((set, get) => ({ return; } const messageGroup = device.messages[message.type]; - const messageIndex = message.type === "direct" - ? message.from === device.hardware.myNodeNum - ? message.to - : message.from - : message.channel; + const messageIndex = + message.type === "direct" + ? message.from === device.hardware.myNodeNum + ? message.to + : message.from + : message.channel; const messages = messageGroup.get(messageIndex); if (messages) { @@ -561,9 +564,12 @@ export const useDeviceStore = createStore((set, get) => ({ } const messageGroup = device.messages[type]; - const messageIndex = type === "direct" - ? from === device.hardware.myNodeNum ? to : from - : channelIndex; + const messageIndex = + type === "direct" + ? from === device.hardware.myNodeNum + ? to + : from + : channelIndex; const messages = messageGroup.get(messageIndex); if (!messages) { diff --git a/src/pages/Channels.tsx b/src/pages/Channels.tsx index 4a2b3954..4c2cd83c 100644 --- a/src/pages/Channels.tsx +++ b/src/pages/Channels.tsx @@ -17,8 +17,8 @@ export const getChannelName = (channel: Protobuf.Channel.Channel) => channel.settings?.name.length ? channel.settings?.name : channel.index === 0 - ? "Primary" - : `Ch ${channel.index}`; + ? "Primary" + : `Ch ${channel.index}`; const ChannelsPage = () => { const { channels, setDialogOpen } = useDevice(); diff --git a/src/pages/Messages.tsx b/src/pages/Messages.tsx index 2ac0d274..c4060804 100644 --- a/src/pages/Messages.tsx +++ b/src/pages/Messages.tsx @@ -39,11 +39,13 @@ export const MessagesPage = () => { {filteredChannels.map((channel) => ( { setChatType("broadcast"); @@ -67,8 +69,9 @@ export const MessagesPage = () => { {filteredNodes.map((node) => ( { setChatType("direct"); @@ -91,30 +94,32 @@ export const MessagesPage = () => { chatType === "broadcast" && currentChannel ? getChannelName(currentChannel) : chatType === "direct" && nodes.get(activeChat) - ? (nodes.get(activeChat)?.user?.longName ?? nodeHex) - : "Loading..." + ? (nodes.get(activeChat)?.user?.longName ?? nodeHex) + : "Loading..." }`} - actions={chatType === "direct" - ? [ - { - icon: nodes.get(activeChat)?.user?.publicKey.length - ? LockIcon - : LockOpenIcon, - iconClasses: nodes.get(activeChat)?.user?.publicKey.length - ? "text-green-600" - : "text-yellow-300", - async onClick() { - const targetNode = nodes.get(activeChat)?.num; - if (targetNode === undefined) return; - toast({ - title: nodes.get(activeChat)?.user?.publicKey.length - ? "Chat is using PKI encryption." - : "Chat is using PSK encryption.", - }); - }, - }, - ] - : []} + actions={ + chatType === "direct" + ? [ + { + icon: nodes.get(activeChat)?.user?.publicKey.length + ? LockIcon + : LockOpenIcon, + iconClasses: nodes.get(activeChat)?.user?.publicKey.length + ? "text-green-600" + : "text-yellow-300", + async onClick() { + const targetNode = nodes.get(activeChat)?.num; + if (targetNode === undefined) return; + toast({ + title: nodes.get(activeChat)?.user?.publicKey.length + ? "Chat is using PKI encryption." + : "Chat is using PSK encryption.", + }); + }, + }, + ] + : [] + } > {allChannels.map( (channel) => diff --git a/src/pages/Nodes.tsx b/src/pages/Nodes.tsx index 30daaa84..429fcbdd 100644 --- a/src/pages/Nodes.tsx +++ b/src/pages/Nodes.tsx @@ -107,11 +107,9 @@ const NodesPage = (): JSX.Element => { > {node.user?.shortName ?? (node.user?.macaddr - ? `${ - base16 + ? `${base16 .stringify(node.user?.macaddr.subarray(4, 6) ?? []) - .toLowerCase() - }` + .toLowerCase()}` : `${numberToHexUnpadded(node.num).slice(-4)}`)} , @@ -122,11 +120,9 @@ const NodesPage = (): JSX.Element => { > {node.user?.longName ?? (node.user?.macaddr - ? `Meshtastic ${ - base16 + ? `Meshtastic ${base16 .stringify(node.user?.macaddr.subarray(4, 6) ?? []) - .toLowerCase() - }` + .toLowerCase()}` : `!${numberToHexUnpadded(node.num)}`)} , @@ -140,9 +136,11 @@ const NodesPage = (): JSX.Element => { ?.join(":") ?? "UNK"} , - {node.lastHeard === 0 - ?

Never

- : } + {node.lastHeard === 0 ? ( +

Never

+ ) : ( + + )}
, {node.snr}db/ @@ -150,17 +148,19 @@ const NodesPage = (): JSX.Element => { {(node.snr + 10) * 5}raw , - {node.user?.publicKey && node.user?.publicKey.length > 0 - ? - : } + {node.user?.publicKey && node.user?.publicKey.length > 0 ? ( + + ) : ( + + )} , {node.lastHeard !== 0 ? node.viaMqtt === false && node.hopsAway === 0 ? "Direct" : `${node.hopsAway.toString()} ${ - node.hopsAway > 1 ? "hops" : "hop" - } away` + node.hopsAway > 1 ? "hops" : "hop" + } away` : "-"} {node.viaMqtt === true ? ", via MQTT" : ""} , diff --git a/src/validation/channel.ts b/src/validation/channel.ts index 4f4d43bb..6316ce4e 100644 --- a/src/validation/channel.ts +++ b/src/validation/channel.ts @@ -10,7 +10,8 @@ import { } from "class-validator"; export class ChannelValidation - implements Omit { + implements Omit +{ @IsNumber() index: number; @@ -21,7 +22,8 @@ export class ChannelValidation } export class Channel_SettingsValidation - implements Omit { + implements Omit +{ @IsNumber() channelNum: number; diff --git a/src/validation/config/bluetooth.ts b/src/validation/config/bluetooth.ts index 67492240..e84d8f27 100644 --- a/src/validation/config/bluetooth.ts +++ b/src/validation/config/bluetooth.ts @@ -2,11 +2,13 @@ import type { Message } from "@bufbuild/protobuf"; import { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsEnum, IsInt } from "class-validator"; -export class BluetoothValidation implements - Omit< - Protobuf.Config.Config_BluetoothConfig, - keyof Message | "deviceLoggingEnabled" - > { +export class BluetoothValidation + implements + Omit< + Protobuf.Config.Config_BluetoothConfig, + keyof Message | "deviceLoggingEnabled" + > +{ @IsBoolean() enabled: boolean; diff --git a/src/validation/config/position.ts b/src/validation/config/position.ts index 4163db76..97822bb4 100644 --- a/src/validation/config/position.ts +++ b/src/validation/config/position.ts @@ -4,11 +4,13 @@ import { IsArray, IsBoolean, IsEnum, IsInt } from "class-validator"; const DeprecatedPositionValidationFields = ["gpsEnabled", "gpsAttemptTime"]; -export class PositionValidation implements - Omit< - Protobuf.Config.Config_PositionConfig, - keyof Message | (typeof DeprecatedPositionValidationFields)[number] - > { +export class PositionValidation + implements + Omit< + Protobuf.Config.Config_PositionConfig, + keyof Message | (typeof DeprecatedPositionValidationFields)[number] + > +{ @IsInt() positionBroadcastSecs: number; diff --git a/src/validation/config/security.ts b/src/validation/config/security.ts index b856d521..0b9aa7d4 100644 --- a/src/validation/config/security.ts +++ b/src/validation/config/security.ts @@ -2,11 +2,13 @@ import type { Message } from "@bufbuild/protobuf"; import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsString } from "class-validator"; -export class SecurityValidation implements - Omit< - Protobuf.Config.Config_SecurityConfig, - keyof Message | "adminKey" | "privateKey" | "publicKey" - > { +export class SecurityValidation + implements + Omit< + Protobuf.Config.Config_SecurityConfig, + keyof Message | "adminKey" | "privateKey" | "publicKey" + > +{ @IsBoolean() adminChannelEnabled: boolean; diff --git a/src/validation/moduleConfig/ambientLighting.ts b/src/validation/moduleConfig/ambientLighting.ts index 93124502..30801067 100644 --- a/src/validation/moduleConfig/ambientLighting.ts +++ b/src/validation/moduleConfig/ambientLighting.ts @@ -2,11 +2,13 @@ import type { Message } from "@bufbuild/protobuf"; import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt } from "class-validator"; -export class AmbientLightingValidation implements - Omit< - Protobuf.ModuleConfig.ModuleConfig_AmbientLightingConfig, - keyof Message - > { +export class AmbientLightingValidation + implements + Omit< + Protobuf.ModuleConfig.ModuleConfig_AmbientLightingConfig, + keyof Message + > +{ @IsBoolean() ledState: boolean; diff --git a/src/validation/moduleConfig/cannedMessage.ts b/src/validation/moduleConfig/cannedMessage.ts index 59ecf755..6701c553 100644 --- a/src/validation/moduleConfig/cannedMessage.ts +++ b/src/validation/moduleConfig/cannedMessage.ts @@ -4,10 +4,8 @@ import { IsBoolean, IsEnum, IsInt, Length } from "class-validator"; export class CannedMessageValidation implements - Omit< - Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig, - keyof Message - > { + Omit +{ @IsBoolean() rotary1Enabled: boolean; @@ -21,16 +19,13 @@ export class CannedMessageValidation inputbrokerPinPress: number; @IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar) - inputbrokerEventCw: - Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; + inputbrokerEventCw: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; @IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar) - inputbrokerEventCcw: - Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; + inputbrokerEventCcw: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; @IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar) - inputbrokerEventPress: - Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; + inputbrokerEventPress: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar; @IsBoolean() updown1Enabled: boolean; diff --git a/src/validation/moduleConfig/detectionSensor.ts b/src/validation/moduleConfig/detectionSensor.ts index b812df17..b6acaa98 100644 --- a/src/validation/moduleConfig/detectionSensor.ts +++ b/src/validation/moduleConfig/detectionSensor.ts @@ -2,11 +2,13 @@ import type { Message } from "@bufbuild/protobuf"; import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt, Length } from "class-validator"; -export class DetectionSensorValidation implements - Omit< - Protobuf.ModuleConfig.ModuleConfig_DetectionSensorConfig, - keyof Message - > { +export class DetectionSensorValidation + implements + Omit< + Protobuf.ModuleConfig.ModuleConfig_DetectionSensorConfig, + keyof Message + > +{ @IsBoolean() enabled: boolean; diff --git a/src/validation/moduleConfig/externalNotification.ts b/src/validation/moduleConfig/externalNotification.ts index 5b68ffa3..e7b9e044 100644 --- a/src/validation/moduleConfig/externalNotification.ts +++ b/src/validation/moduleConfig/externalNotification.ts @@ -2,11 +2,13 @@ import type { Message } from "@bufbuild/protobuf"; import type { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsInt } from "class-validator"; -export class ExternalNotificationValidation implements - Omit< - Protobuf.ModuleConfig.ModuleConfig_ExternalNotificationConfig, - keyof Message - > { +export class ExternalNotificationValidation + implements + Omit< + Protobuf.ModuleConfig.ModuleConfig_ExternalNotificationConfig, + keyof Message + > +{ @IsBoolean() enabled: boolean; diff --git a/src/validation/moduleConfig/neighborInfo.ts b/src/validation/moduleConfig/neighborInfo.ts index 513b8d7c..b81a04d6 100644 --- a/src/validation/moduleConfig/neighborInfo.ts +++ b/src/validation/moduleConfig/neighborInfo.ts @@ -4,7 +4,8 @@ import { IsBoolean, IsInt } from "class-validator"; export class NeighborInfoValidation implements - Omit { + Omit +{ @IsBoolean() enabled: boolean; diff --git a/src/validation/moduleConfig/paxcounter.ts b/src/validation/moduleConfig/paxcounter.ts index 6b3eeb9b..10d0ece0 100644 --- a/src/validation/moduleConfig/paxcounter.ts +++ b/src/validation/moduleConfig/paxcounter.ts @@ -4,7 +4,8 @@ import { IsBoolean, IsInt } from "class-validator"; export class PaxcounterValidation implements - Omit { + Omit +{ @IsBoolean() enabled: boolean; diff --git a/src/validation/moduleConfig/serial.ts b/src/validation/moduleConfig/serial.ts index c814a71b..db69c7c5 100644 --- a/src/validation/moduleConfig/serial.ts +++ b/src/validation/moduleConfig/serial.ts @@ -4,7 +4,8 @@ import { IsBoolean, IsEnum, IsInt } from "class-validator"; export class SerialValidation implements - Omit { + Omit +{ @IsBoolean() enabled: boolean; diff --git a/src/validation/moduleConfig/telemetry.ts b/src/validation/moduleConfig/telemetry.ts index 921fb04a..08cc3d70 100644 --- a/src/validation/moduleConfig/telemetry.ts +++ b/src/validation/moduleConfig/telemetry.ts @@ -4,7 +4,8 @@ import { IsBoolean, IsInt } from "class-validator"; export class TelemetryValidation implements - Omit { + Omit +{ @IsInt() deviceUpdateInterval: number; From e224a4ebdf670b6149da6cb5aae836df7843efb2 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sat, 1 Mar 2025 16:12:56 +0800 Subject: [PATCH 6/6] migrate to new transport-http --- bun.lock | 7 ++++++- package.json | 1 + src/components/PageComponents/Connect/HTTP.tsx | 13 +++++-------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/bun.lock b/bun.lock index 8bbaa95a..036c024d 100644 --- a/bun.lock +++ b/bun.lock @@ -7,6 +7,7 @@ "@bufbuild/protobuf": "^2.2.3", "@meshtastic/core": "npm:@jsr/meshtastic__core@2.6.0-0", "@meshtastic/js": "npm:@jsr/meshtastic__js@2.6.0-0", + "@meshtastic/transport-http": "npm:@jsr/meshtastic__transport-http", "@meshtastic/transport-web-serial": "npm:@jsr/meshtastic__transport-web-serial", "@noble/curves": "^1.8.1", "@radix-ui/react-accordion": "^1.2.3", @@ -361,7 +362,7 @@ "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], - "@jsr/meshtastic__core": ["@jsr/meshtastic__core@2.6.0-0", "https://npm.jsr.io/~/11/@jsr/meshtastic__core/2.6.0-0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3", "@jsr/meshtastic__protobufs": "^2.6.0", "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.3" } }, "sha512-Ks71sRagbBipotznULpsJZ1EMcQIqCEJQx6mf628dmCNVf2YECi2zi/i/5zErp1hGPgfbDvCz9oPogvsd/7fMA=="], + "@jsr/meshtastic__core": ["@jsr/meshtastic__core@2.6.0-1", "https://npm.jsr.io/~/11/@jsr/meshtastic__core/2.6.0-1.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3", "@jsr/meshtastic__protobufs": "^2.6.0", "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.3" } }, "sha512-fVlFVImuthS5oIH3J5Glue+0OizGmhtvzTWEmAJwdgmYyUn7mfA2iEvoUHFv3EiEDq6BJ9SjkLzOSqMTRPSNuw=="], "@jsr/meshtastic__protobufs": ["@jsr/meshtastic__protobufs@2.6.0", "https://npm.jsr.io/~/11/@jsr/meshtastic__protobufs/2.6.0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3" } }, "sha512-CGlgBdzAuQCZuGPrnzP8zU+EcLlmyYeeMbqFHuJ834cYfArWXDjDh1UYaPo2rI03LTjqa3MeWpfqDlzBR8kIMg=="], @@ -387,6 +388,8 @@ "@meshtastic/js": ["@jsr/meshtastic__js@2.6.0-0", "https://npm.jsr.io/~/11/@jsr/meshtastic__js/2.6.0-0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3", "@jsr/meshtastic__protobufs": "^2.6.0", "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.3" } }, "sha512-+xpZpxK6oUIVOuEs7C+LyxRr2druvc7UNNNTK9Rl8ioXj63Jz1uQXlYe2Gj0xjnRAiSQLR7QVaPef21BR/YTxA=="], + "@meshtastic/transport-http": ["@jsr/meshtastic__transport-http@0.1.0", "https://npm.jsr.io/~/11/@jsr/meshtastic__transport-http/0.1.0.tgz", { "dependencies": { "@jsr/meshtastic__core": "^2.6.0-1" } }, "sha512-+cICcTAowbnTz9yffUod1c2XxuPgJRw6VfXYHZgJZ3oaBXtUoUFHl9WdMdZLE0juzMRpTARZY2/bAH3brCf0rw=="], + "@meshtastic/transport-web-serial": ["@jsr/meshtastic__transport-web-serial@0.2.0", "https://npm.jsr.io/~/11/@jsr/meshtastic__transport-web-serial/0.2.0.tgz", { "dependencies": { "@jsr/meshtastic__core": "^2.6.0-0" } }, "sha512-mP/nxOj0syABh3FkG5iIolWhUMiFh/qtJtvqihxLkaRoxdabUyW62mOtfhCMBEjxgVnKg4Gy7GkaXfC/eFy19Q=="], "@noble/curves": ["@noble/curves@1.8.1", "", { "dependencies": { "@noble/hashes": "1.7.1" } }, "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ=="], @@ -1877,6 +1880,8 @@ "zustand": ["zustand@5.0.3", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg=="], + "@meshtastic/transport-web-serial/@jsr/meshtastic__core": ["@jsr/meshtastic__core@2.6.0-0", "https://npm.jsr.io/~/11/@jsr/meshtastic__core/2.6.0-0.tgz", { "dependencies": { "@bufbuild/protobuf": "^2.2.3", "@jsr/meshtastic__protobufs": "^2.6.0", "crc": "^4.3.2", "ste-simple-events": "^3.0.11", "tslog": "^4.9.3" } }, "sha512-Ks71sRagbBipotznULpsJZ1EMcQIqCEJQx6mf628dmCNVf2YECi2zi/i/5zErp1hGPgfbDvCz9oPogvsd/7fMA=="], + "@rollup/plugin-babel/@rollup/pluginutils": ["@rollup/pluginutils@3.1.0", "", { "dependencies": { "@types/estree": "0.0.39", "estree-walker": "^1.0.1", "picomatch": "^2.2.2" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0" } }, "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg=="], "@rollup/plugin-babel/rollup": ["rollup@2.79.2", "", { "optionalDependencies": { "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ=="], diff --git a/package.json b/package.json index c001aff5..37385c8d 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@bufbuild/protobuf": "^2.2.3", "@meshtastic/core": "npm:@jsr/meshtastic__core@2.6.0-0", "@meshtastic/js": "npm:@jsr/meshtastic__js@2.6.0-0", + "@meshtastic/transport-http": "npm:@jsr/meshtastic__transport-http", "@meshtastic/transport-web-serial": "npm:@jsr/meshtastic__transport-web-serial", "@noble/curves": "^1.8.1", "@radix-ui/react-accordion": "^1.2.3", diff --git a/src/components/PageComponents/Connect/HTTP.tsx b/src/components/PageComponents/Connect/HTTP.tsx index 1f8991fc..226d4c47 100644 --- a/src/components/PageComponents/Connect/HTTP.tsx +++ b/src/components/PageComponents/Connect/HTTP.tsx @@ -7,7 +7,8 @@ import { useAppStore } from "@core/stores/appStore.ts"; import { useDeviceStore } from "@core/stores/deviceStore.ts"; import { subscribeAll } from "@core/subscriptions.ts"; import { randId } from "@core/utils/randId.ts"; -import { HttpConnection } from "@meshtastic/js"; +import { MeshDevice } from "@meshtastic/core"; +import { TransportHTTP } from "@meshtastic/transport-http"; import { type JSX, useState } from "react"; import { Controller, useForm } from "react-hook-form"; @@ -36,13 +37,9 @@ export const HTTP = ({ closeDialog }: TabElementProps): JSX.Element => { const id = randId(); const device = addDevice(id); - const connection = new HttpConnection(id); - // TODO: Promise never resolves - await connection.connect({ - address: data.ip, - fetchInterval: 2000, - tls: data.tls, - }); + const transport = await TransportHTTP.create(data.ip, data.tls); + const connection = new MeshDevice(transport, id); + connection.configure(); setSelectedDevice(id); device.addConnection(connection);