@camstack/addon-osd-manager 0.1.66 → 0.1.68

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