update meshtastic.js package version

This commit is contained in:
Sacha Weatherstone
2023-12-26 22:16:45 +10:00
parent dcab2c33d0
commit a4a5061171
54 changed files with 455 additions and 466 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
"homepage": "https://meshtastic.org", "homepage": "https://meshtastic.org",
"dependencies": { "dependencies": {
"@emeraldpay/hashicon-react": "^0.5.2", "@emeraldpay/hashicon-react": "^0.5.2",
"@meshtastic/meshtasticjs": "2.2.16-0", "@meshtastic/js": "2.2.16-0",
"@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-checkbox": "^1.0.4", "@radix-ui/react-checkbox": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dialog": "^1.0.5",
+381 -399
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -10,7 +10,7 @@ import {
} from "@components/UI/Dialog.js"; } from "@components/UI/Dialog.js";
import { Input } from "@components/UI/Input.js"; import { Input } from "@components/UI/Input.js";
import { Label } from "@components/UI/Label.js"; import { Label } from "@components/UI/Label.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
import { useForm } from "react-hook-form"; import { useForm } from "react-hook-form";
export interface User { export interface User {
+2 -2
View File
@@ -12,7 +12,7 @@ import { Input } from "@components/UI/Input.js";
import { Label } from "@components/UI/Label.js"; import { Label } from "@components/UI/Label.js";
import { Switch } from "@components/UI/Switch.js"; import { Switch } from "@components/UI/Switch.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
import { toByteArray } from "base64-js"; import { toByteArray } from "base64-js";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
@@ -33,7 +33,7 @@ export const ImportDialog = ({
const { connection } = useDevice(); const { connection } = useDevice();
useEffect(() => { useEffect(() => {
const base64String = QRCodeURL.split("e/#")[1] const base64String = QRCodeURL.split("e/#")[1];
const paddedString = base64String const paddedString = base64String
?.padEnd(base64String.length + ((4 - (base64String.length % 4)) % 4), "=") ?.padEnd(base64String.length + ((4 - (base64String.length % 4)) % 4), "=")
.replace(/-/g, "+") .replace(/-/g, "+")
+3 -3
View File
@@ -9,7 +9,7 @@ import {
} from "@components/UI/Dialog.js"; } from "@components/UI/Dialog.js";
import { Input } from "@components/UI/Input.js"; import { Input } from "@components/UI/Input.js";
import { Label } from "@components/UI/Label.js"; import { Label } from "@components/UI/Label.js";
import { Protobuf, Types } from "@meshtastic/meshtasticjs"; import { Protobuf, Types } from "@meshtastic/js";
import { fromByteArray } from "base64-js"; import { fromByteArray } from "base64-js";
import { ClipboardIcon } from "lucide-react"; import { ClipboardIcon } from "lucide-react";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
@@ -70,8 +70,8 @@ export const QRDialog = ({
{channel.settings?.name.length {channel.settings?.name.length
? channel.settings.name ? channel.settings.name
: channel.role === Protobuf.Channel_Role.PRIMARY : channel.role === Protobuf.Channel_Role.PRIMARY
? "Primary" ? "Primary"
: `Channel: ${channel.index}`} : `Channel: ${channel.index}`}
</Label> </Label>
<Checkbox <Checkbox
key={channel.index} key={channel.index}
+5 -3
View File
@@ -2,7 +2,7 @@ import type { ChannelValidation } from "@app/validation/channel.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useToast } from "@core/hooks/useToast.js"; import { useToast } from "@core/hooks/useToast.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
import { fromByteArray, toByteArray } from "base64-js"; import { fromByteArray, toByteArray } from "base64-js";
export interface SettingsPanelProps { export interface SettingsPanelProps {
@@ -52,7 +52,8 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
type: "select", type: "select",
name: "role", name: "role",
label: "Role", label: "Role",
description: "Device telemetry is sent over PRIMARY. Only one PRIMARY allowed", description:
"Device telemetry is sent over PRIMARY. Only one PRIMARY allowed",
properties: { properties: {
enumValue: Protobuf.Channel_Role, enumValue: Protobuf.Channel_Role,
}, },
@@ -70,7 +71,8 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
type: "text", type: "text",
name: "settings.name", name: "settings.name",
label: "Name", label: "Name",
description: "A unique name for the channel <12 bytes, leave blank for default", description:
"A unique name for the channel <12 bytes, leave blank for default",
}, },
{ {
type: "toggle", type: "toggle",
@@ -1,7 +1,7 @@
import type { BluetoothValidation } from "@app/validation/config/bluetooth.js"; import type { BluetoothValidation } from "@app/validation/config/bluetooth.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const Bluetooth = (): JSX.Element => { export const Bluetooth = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice(); const { config, setWorkingConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { DeviceValidation } from "@app/validation/config/device.js"; import type { DeviceValidation } from "@app/validation/config/device.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const Device = (): JSX.Element => { export const Device = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice(); const { config, setWorkingConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { DisplayValidation } from "@app/validation/config/display.js"; import type { DisplayValidation } from "@app/validation/config/display.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const Display = (): JSX.Element => { export const Display = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice(); const { config, setWorkingConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { LoRaValidation } from "@app/validation/config/lora.js"; import type { LoRaValidation } from "@app/validation/config/lora.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const LoRa = (): JSX.Element => { export const LoRa = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice(); const { config, setWorkingConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { NetworkValidation } from "@app/validation/config/network.js"; import type { NetworkValidation } from "@app/validation/config/network.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const Network = (): JSX.Element => { export const Network = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice(); const { config, setWorkingConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { PositionValidation } from "@app/validation/config/position.js"; import type { PositionValidation } from "@app/validation/config/position.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const Position = (): JSX.Element => { export const Position = (): JSX.Element => {
const { config, nodes, hardware, setWorkingConfig } = useDevice(); const { config, nodes, hardware, setWorkingConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { PowerValidation } from "@app/validation/config/power.js"; import type { PowerValidation } from "@app/validation/config/power.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const Power = (): JSX.Element => { export const Power = (): JSX.Element => {
const { config, setWorkingConfig } = useDevice(); const { config, setWorkingConfig } = useDevice();
@@ -4,7 +4,7 @@ import { useAppStore } from "@core/stores/appStore.js";
import { useDeviceStore } from "@core/stores/deviceStore.js"; import { useDeviceStore } from "@core/stores/deviceStore.js";
import { subscribeAll } from "@core/subscriptions.js"; import { subscribeAll } from "@core/subscriptions.js";
import { randId } from "@core/utils/randId.js"; import { randId } from "@core/utils/randId.js";
import { Constants, IBLEConnection } from "@meshtastic/meshtasticjs"; import { Constants, IBLEConnection } from "@meshtastic/js";
import { useCallback, useEffect, useState } from "react"; import { useCallback, useEffect, useState } from "react";
export const BLE = (): JSX.Element => { export const BLE = (): JSX.Element => {
@@ -6,7 +6,7 @@ import { useAppStore } from "@core/stores/appStore.js";
import { useDeviceStore } from "@core/stores/deviceStore.js"; import { useDeviceStore } from "@core/stores/deviceStore.js";
import { subscribeAll } from "@core/subscriptions.js"; import { subscribeAll } from "@core/subscriptions.js";
import { randId } from "@core/utils/randId.js"; import { randId } from "@core/utils/randId.js";
import { IHTTPConnection } from "@meshtastic/meshtasticjs"; import { IHTTPConnection } from "@meshtastic/js";
import { Controller, useForm, useWatch } from "react-hook-form"; import { Controller, useForm, useWatch } from "react-hook-form";
export const HTTP = (): JSX.Element => { export const HTTP = (): JSX.Element => {
@@ -4,7 +4,7 @@ import { useAppStore } from "@core/stores/appStore.js";
import { useDeviceStore } from "@core/stores/deviceStore.js"; import { useDeviceStore } from "@core/stores/deviceStore.js";
import { subscribeAll } from "@core/subscriptions.js"; import { subscribeAll } from "@core/subscriptions.js";
import { randId } from "@core/utils/randId.js"; import { randId } from "@core/utils/randId.js";
import { ISerialConnection } from "@meshtastic/meshtasticjs"; import { ISerialConnection } from "@meshtastic/js";
import { useCallback, useEffect, useState } from "react"; import { useCallback, useEffect, useState } from "react";
export const Serial = (): JSX.Element => { export const Serial = (): JSX.Element => {
@@ -2,7 +2,7 @@ import { Subtle } from "@app/components/UI/Typography/Subtle.js";
import { MessageWithState, useDevice } from "@app/core/stores/deviceStore.js"; import { MessageWithState, useDevice } from "@app/core/stores/deviceStore.js";
import { Message } from "@components/PageComponents/Messages/Message.js"; import { Message } from "@components/PageComponents/Messages/Message.js";
import { MessageInput } from "@components/PageComponents/Messages/MessageInput.js"; import { MessageInput } from "@components/PageComponents/Messages/MessageInput.js";
import type { Types } from "@meshtastic/meshtasticjs"; import type { Types } from "@meshtastic/js";
import { InboxIcon } from "lucide-react"; import { InboxIcon } from "lucide-react";
export interface ChannelChatProps { export interface ChannelChatProps {
@@ -1,6 +1,6 @@
import type { MessageWithState } from "@app/core/stores/deviceStore.js"; import type { MessageWithState } from "@app/core/stores/deviceStore.js";
import { Hashicon } from "@emeraldpay/hashicon-react"; import { Hashicon } from "@emeraldpay/hashicon-react";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
import { import {
AlertCircleIcon, AlertCircleIcon,
CheckCircle2Icon, CheckCircle2Icon,
@@ -1,7 +1,7 @@
import { Button } from "@components/UI/Button.js"; import { Button } from "@components/UI/Button.js";
import { Input } from "@components/UI/Input.js"; import { Input } from "@components/UI/Input.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import type { Types } from "@meshtastic/meshtasticjs"; import type { Types } from "@meshtastic/js";
import { SendIcon } from "lucide-react"; import { SendIcon } from "lucide-react";
export interface MessageInputProps { export interface MessageInputProps {
@@ -1,7 +1,7 @@
import { useDevice } from "@app/core/stores/deviceStore.js"; import { useDevice } from "@app/core/stores/deviceStore.js";
import type { AmbientLightingValidation } from "@app/validation/moduleConfig/ambientLighting.js"; import type { AmbientLightingValidation } from "@app/validation/moduleConfig/ambientLighting.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const AmbientLighting = (): JSX.Element => { export const AmbientLighting = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { AudioValidation } from "@app/validation/moduleConfig/audio.js"; import type { AudioValidation } from "@app/validation/moduleConfig/audio.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const Audio = (): JSX.Element => { export const Audio = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { CannedMessageValidation } from "@app/validation/moduleConfig/cannedMessage.js"; import type { CannedMessageValidation } from "@app/validation/moduleConfig/cannedMessage.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const CannedMessage = (): JSX.Element => { export const CannedMessage = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
@@ -1,7 +1,7 @@
import { useDevice } from "@app/core/stores/deviceStore.js"; import { useDevice } from "@app/core/stores/deviceStore.js";
import type { DetectionSensorValidation } from "@app/validation/moduleConfig/detectionSensor.js"; import type { DetectionSensorValidation } from "@app/validation/moduleConfig/detectionSensor.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const DetectionSensor = (): JSX.Element => { export const DetectionSensor = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
@@ -36,7 +36,8 @@ export const DetectionSensor = (): JSX.Element => {
type: "number", type: "number",
name: "minimumBroadcastSecs", name: "minimumBroadcastSecs",
label: "Minimum Broadcast Seconds", label: "Minimum Broadcast Seconds",
description: "The interval in seconds of how often we can send a message to the mesh when a state change is detected", description:
"The interval in seconds of how often we can send a message to the mesh when a state change is detected",
disabledBy: [ disabledBy: [
{ {
fieldName: "enabled", fieldName: "enabled",
@@ -47,7 +48,8 @@ export const DetectionSensor = (): JSX.Element => {
type: "number", type: "number",
name: "stateBroadcastSecs", name: "stateBroadcastSecs",
label: "State Broadcast Seconds", label: "State Broadcast Seconds",
description: "The interval in seconds of how often we should send a message to the mesh with the current state regardless of changes", description:
"The interval in seconds of how often we should send a message to the mesh with the current state regardless of changes",
disabledBy: [ disabledBy: [
{ {
fieldName: "enabled", fieldName: "enabled",
@@ -69,7 +71,8 @@ export const DetectionSensor = (): JSX.Element => {
type: "text", type: "text",
name: "name", name: "name",
label: "Friendly Name", label: "Friendly Name",
description: "Used to format the message sent to mesh, max 20 Characters", description:
"Used to format the message sent to mesh, max 20 Characters",
disabledBy: [ disabledBy: [
{ {
fieldName: "enabled", fieldName: "enabled",
@@ -91,7 +94,8 @@ export const DetectionSensor = (): JSX.Element => {
type: "toggle", type: "toggle",
name: "detectionTriggeredHigh", name: "detectionTriggeredHigh",
label: "Detection Triggered High", label: "Detection Triggered High",
description: "Whether or not the GPIO pin state detection is triggered on HIGH (1), otherwise LOW (0)", description:
"Whether or not the GPIO pin state detection is triggered on HIGH (1), otherwise LOW (0)",
disabledBy: [ disabledBy: [
{ {
fieldName: "enabled", fieldName: "enabled",
@@ -1,7 +1,7 @@
import type { ExternalNotificationValidation } from "@app/validation/moduleConfig/externalNotification.js"; import type { ExternalNotificationValidation } from "@app/validation/moduleConfig/externalNotification.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const ExternalNotification = (): JSX.Element => { export const ExternalNotification = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
@@ -189,7 +189,7 @@ export const ExternalNotification = (): JSX.Element => {
{ {
fieldName: "enabled", fieldName: "enabled",
}, },
] ],
}, },
], ],
}, },
@@ -1,7 +1,7 @@
import { useDevice } from "@app/core/stores/deviceStore.js"; import { useDevice } from "@app/core/stores/deviceStore.js";
import type { MQTTValidation } from "@app/validation/moduleConfig/mqtt.js"; import type { MQTTValidation } from "@app/validation/moduleConfig/mqtt.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const MQTT = (): JSX.Element => { export const MQTT = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
@@ -1,7 +1,7 @@
import { useDevice } from "@app/core/stores/deviceStore.js"; import { useDevice } from "@app/core/stores/deviceStore.js";
import type { NeighborInfoValidation } from "@app/validation/moduleConfig/neighborInfo.js"; import type { NeighborInfoValidation } from "@app/validation/moduleConfig/neighborInfo.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const NeighborInfo = (): JSX.Element => { export const NeighborInfo = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
@@ -36,7 +36,8 @@ export const NeighborInfo = (): JSX.Element => {
type: "number", type: "number",
name: "updateInterval", name: "updateInterval",
label: "Update Interval", label: "Update Interval",
description: "Interval in seconds of how often we should try to send our Neighbor Info to the mesh", description:
"Interval in seconds of how often we should try to send our Neighbor Info to the mesh",
disabledBy: [ disabledBy: [
{ {
fieldName: "enabled", fieldName: "enabled",
@@ -1,7 +1,7 @@
import type { RangeTestValidation } from "@app/validation/moduleConfig/rangeTest.js"; import type { RangeTestValidation } from "@app/validation/moduleConfig/rangeTest.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const RangeTest = (): JSX.Element => { export const RangeTest = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { SerialValidation } from "@app/validation/moduleConfig/serial.js"; import type { SerialValidation } from "@app/validation/moduleConfig/serial.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const Serial = (): JSX.Element => { export const Serial = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { StoreForwardValidation } from "@app/validation/moduleConfig/storeForward.js"; import type { StoreForwardValidation } from "@app/validation/moduleConfig/storeForward.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const StoreForward = (): JSX.Element => { export const StoreForward = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
@@ -1,7 +1,7 @@
import type { TelemetryValidation } from "@app/validation/moduleConfig/telemetry.js"; import type { TelemetryValidation } from "@app/validation/moduleConfig/telemetry.js";
import { DynamicForm } from "@components/Form/DynamicForm.js"; import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export const Telemetry = (): JSX.Element => { export const Telemetry = (): JSX.Element => {
const { moduleConfig, setWorkingModuleConfig } = useDevice(); const { moduleConfig, setWorkingModuleConfig } = useDevice();
+1 -1
View File
@@ -3,7 +3,7 @@ import { createContext, useContext } from "react";
import { produce } from "immer"; import { produce } from "immer";
import { create } from "zustand"; import { create } from "zustand";
import { Protobuf, Types } from "@meshtastic/meshtasticjs"; import { Protobuf, Types } from "@meshtastic/js";
export type Page = "messages" | "map" | "config" | "channels" | "peers"; export type Page = "messages" | "map" | "config" | "channels" | "peers";
+1 -1
View File
@@ -1,5 +1,5 @@
import type { Device } from "@core/stores/deviceStore.js"; import type { Device } from "@core/stores/deviceStore.js";
import { Protobuf, Types } from "@meshtastic/meshtasticjs"; import { Protobuf, Types } from "@meshtastic/js";
export const subscribeAll = ( export const subscribeAll = (
device: Device, device: Device,
+3 -3
View File
@@ -9,7 +9,7 @@ import { Channel } from "@components/PageComponents/Channel.js";
import { PageLayout } from "@components/PageLayout.js"; import { PageLayout } from "@components/PageLayout.js";
import { Sidebar } from "@components/Sidebar.js"; import { Sidebar } from "@components/Sidebar.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf, Types } from "@meshtastic/meshtasticjs"; import { Protobuf, Types } from "@meshtastic/js";
import { ImportIcon, QrCodeIcon } from "lucide-react"; import { ImportIcon, QrCodeIcon } from "lucide-react";
import { useState } from "react"; import { useState } from "react";
@@ -17,8 +17,8 @@ export const getChannelName = (channel: Protobuf.Channel) =>
channel.settings?.name.length channel.settings?.name.length
? channel.settings?.name ? channel.settings?.name
: channel.index === 0 : channel.index === 0
? "Primary" ? "Primary"
: `Ch ${channel.index}`; : `Ch ${channel.index}`;
export const ChannelsPage = (): JSX.Element => { export const ChannelsPage = (): JSX.Element => {
const { channels, setDialogOpen } = useDevice(); const { channels, setDialogOpen } = useDevice();
+1 -1
View File
@@ -5,7 +5,7 @@ import { SidebarSection } from "@components/UI/Sidebar/SidebarSection.js";
import { SidebarButton } from "@components/UI/Sidebar/sidebarButton.js"; import { SidebarButton } from "@components/UI/Sidebar/sidebarButton.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Hashicon } from "@emeraldpay/hashicon-react"; import { Hashicon } from "@emeraldpay/hashicon-react";
import { Protobuf, Types } from "@meshtastic/meshtasticjs"; import { Protobuf, Types } from "@meshtastic/js";
import { getChannelName } from "@pages/Channels.js"; import { getChannelName } from "@pages/Channels.js";
import { HashIcon } from "lucide-react"; import { HashIcon } from "lucide-react";
import { useState } from "react"; import { useState } from "react";
+1 -1
View File
@@ -4,7 +4,7 @@ import { Table } from "@components/generic/Table/index.js";
import { TimeAgo } from "@components/generic/Table/tmp/TimeAgo.js"; import { TimeAgo } from "@components/generic/Table/tmp/TimeAgo.js";
import { useDevice } from "@core/stores/deviceStore.js"; import { useDevice } from "@core/stores/deviceStore.js";
import { Hashicon } from "@emeraldpay/hashicon-react"; import { Hashicon } from "@emeraldpay/hashicon-react";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
import { base16 } from "rfc4648"; import { base16 } from "rfc4648";
export const PeersPage = (): JSX.Element => { export const PeersPage = (): JSX.Element => {
+1 -1
View File
@@ -7,7 +7,7 @@ import {
Length, Length,
} from "class-validator"; } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export class ChannelValidation export class ChannelValidation
implements Omit<Protobuf.Channel, keyof Protobuf.native.Message | "settings"> implements Omit<Protobuf.Channel, keyof Protobuf.native.Message | "settings">
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsEnum, IsInt } from "class-validator"; import { IsBoolean, IsEnum, IsInt } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export class BluetoothValidation export class BluetoothValidation
implements implements
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsEnum, IsInt } from "class-validator"; import { IsBoolean, IsEnum, IsInt } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export class DeviceValidation export class DeviceValidation
implements Omit<Protobuf.Config_DeviceConfig, keyof Protobuf.native.Message> implements Omit<Protobuf.Config_DeviceConfig, keyof Protobuf.native.Message>
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsEnum, IsInt } from "class-validator"; import { IsBoolean, IsEnum, IsInt } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export class DisplayValidation export class DisplayValidation
implements Omit<Protobuf.Config_DisplayConfig, keyof Protobuf.native.Message> implements Omit<Protobuf.Config_DisplayConfig, keyof Protobuf.native.Message>
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsArray, IsBoolean, IsEnum, IsInt, Max, Min } from "class-validator"; import { IsArray, IsBoolean, IsEnum, IsInt, Max, Min } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export class LoRaValidation export class LoRaValidation
implements Omit<Protobuf.Config_LoRaConfig, keyof Protobuf.native.Message> implements Omit<Protobuf.Config_LoRaConfig, keyof Protobuf.native.Message>
+1 -1
View File
@@ -7,7 +7,7 @@ import {
Length, Length,
} from "class-validator"; } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export class NetworkValidation export class NetworkValidation
implements implements
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsInt, IsNumber } from "class-validator"; import { IsBoolean, IsInt, IsNumber } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
export class PositionValidation export class PositionValidation
implements Omit<Protobuf.Config_PositionConfig, keyof Protobuf.native.Message> implements Omit<Protobuf.Config_PositionConfig, keyof Protobuf.native.Message>
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsInt, Max, Min } from "class-validator"; import { IsBoolean, IsInt, Max, Min } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
export class PowerValidation export class PowerValidation
implements Omit<Protobuf.Config_PowerConfig, keyof Protobuf.native.Message> implements Omit<Protobuf.Config_PowerConfig, keyof Protobuf.native.Message>
@@ -1,6 +1,6 @@
import { IsBoolean, IsInt } from "class-validator"; import { IsBoolean, IsInt } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
export class AmbientLightingValidation export class AmbientLightingValidation
implements implements
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsEnum, IsInt } from "class-validator"; import { IsBoolean, IsEnum, IsInt } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export class AudioValidation export class AudioValidation
implements implements
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsEnum, IsInt, Length } from "class-validator"; import { IsBoolean, IsEnum, IsInt, Length } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export class CannedMessageValidation export class CannedMessageValidation
implements implements
@@ -1,6 +1,6 @@
import { IsBoolean, IsInt, Length } from "class-validator"; import { IsBoolean, IsInt, Length } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
export class DetectionSensorValidation export class DetectionSensorValidation
implements implements
@@ -1,6 +1,6 @@
import { IsBoolean, IsInt } from "class-validator"; import { IsBoolean, IsInt } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
export class ExternalNotificationValidation export class ExternalNotificationValidation
implements implements
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsString, Length } from "class-validator"; import { IsBoolean, IsString, Length } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
export class MQTTValidation export class MQTTValidation
implements implements
+2 -2
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsInt, Length } from "class-validator"; import { IsBoolean, IsInt, Length } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
export class NeighborInfoValidation export class NeighborInfoValidation
implements implements
@@ -14,4 +14,4 @@ export class NeighborInfoValidation
@IsInt() @IsInt()
updateInterval: number; updateInterval: number;
} }
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsInt } from "class-validator"; import { IsBoolean, IsInt } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
export class RangeTestValidation export class RangeTestValidation
implements implements
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsEnum, IsInt } from "class-validator"; import { IsBoolean, IsEnum, IsInt } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs"; import { Protobuf } from "@meshtastic/js";
export class SerialValidation export class SerialValidation
implements implements
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsInt } from "class-validator"; import { IsBoolean, IsInt } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
export class StoreForwardValidation export class StoreForwardValidation
implements implements
+1 -1
View File
@@ -1,6 +1,6 @@
import { IsBoolean, IsInt } from "class-validator"; import { IsBoolean, IsInt } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs"; import type { Protobuf } from "@meshtastic/js";
export class TelemetryValidation export class TelemetryValidation
implements implements