@camstack/addon-osd-manager 0.1.66 → 0.1.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. package/dist/{MotionZonesSettings-Bp2BSWKK.mjs → MotionZonesSettings-B_4oSB9j.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-_3yRf1uh.mjs → PrivacyMaskSettings-BA9bkG8G.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-CE0RqTXb.mjs → SceneMonitorEditor-ZIDwRiWt.mjs} +3 -3
  4. package/dist/_stub.js +11 -11
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-DP7G58n6.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-BZTQZn6M.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CzbsPrgW.mjs +26 -0
  7. package/dist/addon-osd-manager.css +1 -1
  8. package/dist/{hostInit-Dk1zIpzS.mjs → hostInit-CSD5LvtI.mjs} +3 -3
  9. package/dist/index.js +392 -0
  10. package/dist/index.mjs +392 -0
  11. package/dist/{player-overlays-qyiyMQOY.mjs → player-overlays-D5k6Sil0.mjs} +1 -1
  12. package/dist/remoteEntry.js +1 -1
  13. package/dist/{responsive-Cyn1xHLl.mjs → responsive-Bqsf65Tp.mjs} +1 -1
  14. package/dist/{square-CAGLvazc.mjs → square-B9YAq7Ib.mjs} +1 -1
  15. package/dist/{trash-2-DnonwJFX.mjs → trash-2-CfxM8zKf.mjs} +1 -1
  16. package/dist/{use-device-snapshot-DRRX_ZNa.mjs → use-device-snapshot-Cd65t8qo.mjs} +1 -1
  17. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-CfsEGMZ1.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DZOIcCkf.mjs} +1 -1
  18. package/package.json +1 -1
  19. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DUV7OUwj.mjs +0 -26
package/dist/index.js CHANGED
@@ -33999,6 +33999,287 @@ var ptzAutotrackCapability = {
33999
33999
  durability: "session"
34000
34000
  };
34001
34001
  /**
34002
+ * `navigation` — a device-scoped capability that natively expresses the FULL
34003
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
34004
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
34005
+ *
34006
+ * Why a NEW cap rather than overloading `ptz`:
34007
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
34008
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
34009
+ * The two are different physical models: PTZ is absolute-position + presets,
34010
+ * navigation is momentary drive nudges + discrete robot ACTIONS
34011
+ * (dock / spot-clean / follow-pet / go-to-point / …).
34012
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
34013
+ * the reverse:
34014
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
34015
+ * / `getOptions`), and
34016
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
34017
+ * robot camera shows up in the existing PTZ control path without every
34018
+ * PTZ provider learning about robots. The mapping lives in the adapter,
34019
+ * not here (see the addon design note):
34020
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
34021
+ * ptz.stop() → navigation.stop()
34022
+ * ptz.goHome() → navigation.runAction('goHome')
34023
+ * ptz.getPresets() → navigation.listActions() (id→preset)
34024
+ * ptz.goToPreset(id) → navigation.runAction(id)
34025
+ *
34026
+ * ## Continuous drive
34027
+ *
34028
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
34029
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
34030
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
34031
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
34032
+ * coalesce them. The UI owns the cadence.
34033
+ *
34034
+ * ## The action dictionary
34035
+ *
34036
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
34037
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
34038
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
34039
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
34040
+ * vendor-specific list. `kind: 'action'` entries are triggered with
34041
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
34042
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
34043
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
34044
+ *
34045
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
34046
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
34047
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
34048
+ * every device handle. A future nodedreame publish adds a typed
34049
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
34050
+ * provider can then swap the raw calls for the typed methods with no change to
34051
+ * THIS contract.
34052
+ */
34053
+ /**
34054
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
34055
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
34056
+ * halts it.
34057
+ *
34058
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
34059
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
34060
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
34061
+ * vector by it (drivers without proportional drive ignore it).
34062
+ *
34063
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
34064
+ * axis alone; an all-undefined nudge is a no-op.
34065
+ */
34066
+ var NavigationMoveCommandSchema = object({
34067
+ pan: number().min(-1).max(1).optional(),
34068
+ tilt: number().min(-1).max(1).optional(),
34069
+ speed: number().min(0).max(1).optional()
34070
+ });
34071
+ /**
34072
+ * The enumerated discrete actions a navigation-capable robot can perform via
34073
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
34074
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
34075
+ * `playSound` (see the `sound` dictionary entries).
34076
+ */
34077
+ var NavigationActionIdSchema = _enum([
34078
+ "goHome",
34079
+ "locate",
34080
+ "spotClean",
34081
+ "findPet",
34082
+ "personFollow",
34083
+ "stop",
34084
+ "startClean",
34085
+ "pauseClean",
34086
+ "dockWash",
34087
+ "autoEmpty",
34088
+ "flashOn",
34089
+ "flashOff"
34090
+ ]);
34091
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
34092
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
34093
+ /**
34094
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
34095
+ * native panel and the PTZ mimic render as a button.
34096
+ *
34097
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
34098
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
34099
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
34100
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
34101
+ * - `label` — operator-facing English label.
34102
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
34103
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
34104
+ * PTZ render ONLY enabled entries. Data-driven: the provider
34105
+ * flips it from config, never by editing code.
34106
+ */
34107
+ var NavigationActionEntrySchema = object({
34108
+ id: string(),
34109
+ kind: NavigationEntryKindSchema,
34110
+ label: string(),
34111
+ icon: string(),
34112
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
34113
+ soundId: number().int().optional(),
34114
+ /** Per-device feature flag — render this entry only when true. */
34115
+ enabled: boolean()
34116
+ });
34117
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
34118
+ var NavigationPointSchema = object({
34119
+ x: number(),
34120
+ y: number()
34121
+ });
34122
+ /**
34123
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
34124
+ * The cap reports which are enabled so the UI / PTZ render only the controls
34125
+ * that are turned on for THIS device. Data-driven: the provider derives these
34126
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
34127
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
34128
+ * that are not dictionary entries.
34129
+ *
34130
+ * - `move` / `stop` — the momentary drive joystick.
34131
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
34132
+ * map-coordinate plumbing is wired.
34133
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
34134
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
34135
+ * - `light` — the on/off fill-light toggle (works anytime).
34136
+ * - `lightMode` — the auto/manual selector + manual level slider (a
34137
+ * camera-service control; needs an active stream).
34138
+ */
34139
+ var NavigationFeaturesSchema = object({
34140
+ move: boolean(),
34141
+ stop: boolean(),
34142
+ goToPoint: boolean(),
34143
+ runAction: boolean(),
34144
+ playSound: boolean(),
34145
+ light: boolean(),
34146
+ lightMode: boolean()
34147
+ });
34148
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
34149
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
34150
+ /**
34151
+ * Live navigation state so the UI can reflect what the robot is doing:
34152
+ * - `mode` — coarse activity (idle / cleaning / following / …).
34153
+ * - `following` — person/pet follow is currently armed.
34154
+ * - `flash` — the on-camera fill light is on.
34155
+ * - `lightMode` — auto vs manual fill-light mode.
34156
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
34157
+ * `lightMode === 'manual'`.
34158
+ */
34159
+ var NavigationStatusSchema = object({
34160
+ mode: _enum([
34161
+ "idle",
34162
+ "cleaning",
34163
+ "spot",
34164
+ "following",
34165
+ "goto",
34166
+ "returning",
34167
+ "paused",
34168
+ "unknown"
34169
+ ]),
34170
+ following: boolean(),
34171
+ flash: boolean(),
34172
+ lightMode: NavigationLightModeSchema,
34173
+ lightLevel: number().min(40).max(100),
34174
+ /** Ms epoch when the slice was last updated. */
34175
+ lastChangedAt: number()
34176
+ });
34177
+ /**
34178
+ * Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
34179
+ * observable). Adds `lastFetchedAt` on top of the status shape per the
34180
+ * convention.
34181
+ */
34182
+ var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
34183
+ var navigationCapability = {
34184
+ name: "navigation",
34185
+ scope: "device",
34186
+ deviceNative: true,
34187
+ mode: "singleton",
34188
+ deviceTypes: [DeviceType.Camera],
34189
+ deviceConfig: { ui: {
34190
+ kind: "widget",
34191
+ widgetId: "host/navigation-panel",
34192
+ tab: "navigation",
34193
+ topTab: true,
34194
+ label: "Navigation",
34195
+ order: 0
34196
+ } },
34197
+ methods: {
34198
+ /**
34199
+ * Momentary drive nudge (the robot moves). `protected` — mirrors
34200
+ * `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
34201
+ * path) works for any authenticated user, not admin-only. The UI sends
34202
+ * these at ~1 Hz while a control is held; the provider forwards each one to
34203
+ * a single drive write WITHOUT debouncing.
34204
+ */
34205
+ move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
34206
+ /** Halt all motion immediately (zero drive vector). */
34207
+ stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
34208
+ /** Send the robot to a point on its live map. */
34209
+ goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
34210
+ /**
34211
+ * Enumerate the discrete controls THIS device supports (data-driven UI +
34212
+ * PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
34213
+ */
34214
+ listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
34215
+ /**
34216
+ * Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
34217
+ * unsupported action ids are rejected by the provider.
34218
+ */
34219
+ runAction: method(object({
34220
+ deviceId: number(),
34221
+ actionId: NavigationActionIdSchema
34222
+ }), _void(), { kind: "mutation" }),
34223
+ /** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
34224
+ playSound: method(object({
34225
+ deviceId: number(),
34226
+ soundId: number().int()
34227
+ }), _void(), { kind: "mutation" }),
34228
+ /**
34229
+ * Turn the on-camera fill light on / off (the `OpenFullLight` control —
34230
+ * works anytime, no active stream required).
34231
+ */
34232
+ setLightOn: method(object({
34233
+ deviceId: number(),
34234
+ on: boolean()
34235
+ }), _void(), { kind: "mutation" }),
34236
+ /**
34237
+ * Set the fill-light mode (auto vs manual). `manual` optionally carries the
34238
+ * initial `level`. The auto/manual + level control is a CAMERA-service
34239
+ * action that generally needs an active camera stream/monitor session — the
34240
+ * UI shows the manual level slider ONLY when `mode === 'manual'`.
34241
+ */
34242
+ setLightMode: method(object({
34243
+ deviceId: number(),
34244
+ mode: NavigationLightModeSchema,
34245
+ level: number().min(40).max(100).optional()
34246
+ }), _void(), { kind: "mutation" }),
34247
+ /** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
34248
+ setLightLevel: method(object({
34249
+ deviceId: number(),
34250
+ level: number().min(40).max(100)
34251
+ }), _void(), { kind: "mutation" }),
34252
+ /**
34253
+ * Per-device FEATURE-FLAG report for the general primitives — drives which
34254
+ * controls the UI shows (the per-entry flags for the dictionary come back on
34255
+ * `listActions`).
34256
+ */
34257
+ getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
34258
+ },
34259
+ events: { onStatusChanged: { data: object({
34260
+ deviceId: number(),
34261
+ status: NavigationStatusSchema
34262
+ }) } },
34263
+ status: {
34264
+ schema: NavigationStatusSchema,
34265
+ kind: "push"
34266
+ },
34267
+ /**
34268
+ * Runtime-state slice mirrored by the kernel. The navigation panel watches it
34269
+ * for live mode / follow / flash changes.
34270
+ */
34271
+ runtimeState: NavigationRuntimeStateSchema,
34272
+ /**
34273
+ * Runtime-state durability: **session** — like `vacuum-control`, a restored
34274
+ * `mode: cleaning` / `following: true` is a robot that is not actually doing
34275
+ * that. The live handle re-publishes on connect.
34276
+ *
34277
+ * See `RuntimeStateDurability`. Enforced by
34278
+ * `scripts/check-runtime-state-durability.ts`.
34279
+ */
34280
+ durability: "session"
34281
+ };
34282
+ /**
34002
34283
  * reboot — device-scoped capability for "soft" device reboots (firmware
34003
34284
  * reboot via vendor protocol; cameras, NVRs, doorbells). Surfaces a
34004
34285
  * single mutation so the UI can offer a confirm-and-reboot button for
@@ -37522,6 +37803,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
37522
37803
  motionZonesCapability,
37523
37804
  mqttBrokerCapability,
37524
37805
  nativeObjectDetectionCapability,
37806
+ navigationCapability,
37525
37807
  networkAccessCapability,
37526
37808
  networkLinkCapability,
37527
37809
  networkQualityCapability,
@@ -40324,6 +40606,66 @@ Object.freeze({
40324
40606
  addonId: null,
40325
40607
  access: "create"
40326
40608
  },
40609
+ "navigation.getFeatures": {
40610
+ capName: "navigation",
40611
+ capScope: "device",
40612
+ addonId: null,
40613
+ access: "view"
40614
+ },
40615
+ "navigation.goToPoint": {
40616
+ capName: "navigation",
40617
+ capScope: "device",
40618
+ addonId: null,
40619
+ access: "create"
40620
+ },
40621
+ "navigation.listActions": {
40622
+ capName: "navigation",
40623
+ capScope: "device",
40624
+ addonId: null,
40625
+ access: "view"
40626
+ },
40627
+ "navigation.move": {
40628
+ capName: "navigation",
40629
+ capScope: "device",
40630
+ addonId: null,
40631
+ access: "create"
40632
+ },
40633
+ "navigation.playSound": {
40634
+ capName: "navigation",
40635
+ capScope: "device",
40636
+ addonId: null,
40637
+ access: "create"
40638
+ },
40639
+ "navigation.runAction": {
40640
+ capName: "navigation",
40641
+ capScope: "device",
40642
+ addonId: null,
40643
+ access: "create"
40644
+ },
40645
+ "navigation.setLightLevel": {
40646
+ capName: "navigation",
40647
+ capScope: "device",
40648
+ addonId: null,
40649
+ access: "create"
40650
+ },
40651
+ "navigation.setLightMode": {
40652
+ capName: "navigation",
40653
+ capScope: "device",
40654
+ addonId: null,
40655
+ access: "create"
40656
+ },
40657
+ "navigation.setLightOn": {
40658
+ capName: "navigation",
40659
+ capScope: "device",
40660
+ addonId: null,
40661
+ access: "create"
40662
+ },
40663
+ "navigation.stop": {
40664
+ capName: "navigation",
40665
+ capScope: "device",
40666
+ addonId: null,
40667
+ access: "create"
40668
+ },
40327
40669
  "networkAccess.getEndpoint": {
40328
40670
  capName: "network-access",
40329
40671
  capScope: "system",
@@ -44419,6 +44761,56 @@ Object.freeze({
44419
44761
  form: "single",
44420
44762
  optional: false
44421
44763
  }],
44764
+ "navigation.getFeatures": [{
44765
+ name: "deviceId",
44766
+ form: "single",
44767
+ optional: false
44768
+ }],
44769
+ "navigation.goToPoint": [{
44770
+ name: "deviceId",
44771
+ form: "single",
44772
+ optional: false
44773
+ }],
44774
+ "navigation.listActions": [{
44775
+ name: "deviceId",
44776
+ form: "single",
44777
+ optional: false
44778
+ }],
44779
+ "navigation.move": [{
44780
+ name: "deviceId",
44781
+ form: "single",
44782
+ optional: false
44783
+ }],
44784
+ "navigation.playSound": [{
44785
+ name: "deviceId",
44786
+ form: "single",
44787
+ optional: false
44788
+ }],
44789
+ "navigation.runAction": [{
44790
+ name: "deviceId",
44791
+ form: "single",
44792
+ optional: false
44793
+ }],
44794
+ "navigation.setLightLevel": [{
44795
+ name: "deviceId",
44796
+ form: "single",
44797
+ optional: false
44798
+ }],
44799
+ "navigation.setLightMode": [{
44800
+ name: "deviceId",
44801
+ form: "single",
44802
+ optional: false
44803
+ }],
44804
+ "navigation.setLightOn": [{
44805
+ name: "deviceId",
44806
+ form: "single",
44807
+ optional: false
44808
+ }],
44809
+ "navigation.stop": [{
44810
+ name: "deviceId",
44811
+ form: "single",
44812
+ optional: false
44813
+ }],
44422
44814
  "networkQuality.getDeviceStats": [{
44423
44815
  name: "deviceId",
44424
44816
  form: "single",