@camera.ui/sdk 0.0.12 → 0.0.14

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 (2) hide show
  1. package/dist/index.d.ts +50 -8
  2. package/package.json +6 -6
package/dist/index.d.ts CHANGED
@@ -705,6 +705,9 @@ interface DeviceStorage<T extends Record<string, any> = Record<string, any>> {
705
705
  /**
706
706
  * Get a configuration value.
707
707
  *
708
+ * Resolves in order: the schema's `onGet` callback (if any), then the stored
709
+ * value, then the schema default, then the provided default.
710
+ *
708
711
  * @param key - Configuration key
709
712
  *
710
713
  * @returns Value or undefined
@@ -723,9 +726,15 @@ interface DeviceStorage<T extends Record<string, any> = Record<string, any>> {
723
726
  /**
724
727
  * Set a configuration value.
725
728
  *
729
+ * Takes effect only if a schema exists for the key. Passing `null` or
730
+ * `undefined` deletes the key — it reads as never-set again and the schema
731
+ * default applies. For a field whose schema opts into storage (`store: true`)
732
+ * the value is durably persisted before the returned promise resolves; the
733
+ * schema's `onSet` fires afterwards.
734
+ *
726
735
  * @param key - Configuration key
727
736
  *
728
- * @param newValue - New value to set
737
+ * @param newValue - New value to set, or `null`/`undefined` to delete the key
729
738
  */
730
739
  setValue<U = string>(key: string, newValue: U): Promise<void>;
731
740
  /**
@@ -751,9 +760,13 @@ interface DeviceStorage<T extends Record<string, any> = Record<string, any>> {
751
760
  */
752
761
  getConfig(): Promise<SchemaConfig>;
753
762
  /**
754
- * Set the full configuration.
763
+ * Merge configuration values into the current config.
755
764
  *
756
- * @param newConfig - New configuration values
765
+ * Only keys present in `newConfig` are updated (not a full replace); arrays
766
+ * are replaced, not merged. Values are durably persisted before the returned
767
+ * promise resolves; `onSet` fires for each key whose value actually changed.
768
+ *
769
+ * @param newConfig - Configuration values to merge in
757
770
  */
758
771
  setConfig(newConfig: T): Promise<void>;
759
772
  /**
@@ -771,17 +784,24 @@ interface DeviceStorage<T extends Record<string, any> = Record<string, any>> {
771
784
  /**
772
785
  * Remove a schema field.
773
786
  *
787
+ * The field's stored value is deleted along with the schema; the removal
788
+ * is durably persisted when the returned promise resolves.
789
+ *
774
790
  * @param key - Schema key to remove
775
791
  */
776
792
  removeSchema(key: string): Promise<void>;
777
793
  /**
778
- * Update an existing schema field.
794
+ * Replace an existing schema field with a full schema.
779
795
  *
780
- * @param key - Schema key to update
796
+ * The whole schema is replaced individual fields are not merged. It is a
797
+ * no-op when no schema with that key is registered (use {@link addSchema} to
798
+ * add a new field). The passed key always wins.
781
799
  *
782
- * @param newSchema - Partial schema with updated fields
800
+ * @param key - Schema key to replace
801
+ *
802
+ * @param newSchema - Full schema definition that replaces the current one
783
803
  */
784
- changeSchema(key: string, newSchema: Partial<JsonSchema>): Promise<void>;
804
+ changeSchema(key: string, newSchema: JsonSchema): Promise<void>;
785
805
  /**
786
806
  * Get a schema definition by key.
787
807
  *
@@ -799,13 +819,18 @@ interface DeviceStorage<T extends Record<string, any> = Record<string, any>> {
799
819
  /**
800
820
  * Set a system-internal value (e.g. _displayName) without requiring a schema and persist it.
801
821
  *
822
+ * When the returned promise resolves, the value is durably persisted.
823
+ * Passing `null` or `undefined` deletes the key — it reads as never-set again.
824
+ *
802
825
  * @param key - Internal key (typically prefixed with '_')
803
826
  *
804
- * @param value - Value to set
827
+ * @param value - Value to set, or `null`/`undefined` to delete the key
805
828
  */
806
829
  setInternalValue(key: string, value: unknown): Promise<void>;
807
830
  /**
808
831
  * Persist all changes to storage.
832
+ *
833
+ * When the returned promise resolves, all values are durably persisted.
809
834
  */
810
835
  save(): Promise<void>;
811
836
  }
@@ -3348,6 +3373,23 @@ interface PtzAutotrackSettings {
3348
3373
  * no motor command is issued. Range 0 - 0.3.
3349
3374
  */
3350
3375
  triggerDeadZone: number;
3376
+ /**
3377
+ * How aggressively the camera moves to re-center the target. Higher reaches
3378
+ * full pan/tilt speed at a smaller off-center error. Range 1 - 5.
3379
+ */
3380
+ trackingSpeed: number;
3381
+ /**
3382
+ * Motion prediction: aim this many detection-frames ahead along the target's
3383
+ * measured velocity so a moving target is followed without lag. 0 disables
3384
+ * prediction. Range 0 - 6.
3385
+ */
3386
+ leadFrames: number;
3387
+ /**
3388
+ * Camera pan-rate calibration — assumed pan travel at full motor speed, in
3389
+ * normalized frame-widths per second. Lower it if the camera stops short of
3390
+ * the target, raise it if it overshoots. Range 0.1 - 3.
3391
+ */
3392
+ panRate: number;
3351
3393
  /** Return to home position when no target is found for homeWaitMs */
3352
3394
  returnToHome: boolean;
3353
3395
  /** How long to wait (ms) without a target before returning home */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camera.ui/sdk",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "camera.ui sdk",
5
5
  "exports": {
6
6
  ".": {
@@ -34,11 +34,11 @@
34
34
  "@rollup/plugin-typescript": "^12.3.0",
35
35
  "@stylistic/eslint-plugin": "^5.10.0",
36
36
  "@types/multicast-dns": "^7.2.4",
37
- "@types/node": "26.1.0",
38
- "@typescript-eslint/parser": "^8.62.1",
37
+ "@types/node": "26.1.1",
38
+ "@typescript-eslint/parser": "^8.63.0",
39
39
  "cpy-cli": "^7.0.0",
40
40
  "eslint": "9.39.2",
41
- "eslint-plugin-jsdoc": "^63.0.11",
41
+ "eslint-plugin-jsdoc": "^63.0.12",
42
42
  "globals": "^17.7.0",
43
43
  "prettier": "^3.9.4",
44
44
  "rimraf": "^6.1.3",
@@ -48,9 +48,9 @@
48
48
  "typedoc-plugin-markdown": "^4.12.0",
49
49
  "typedoc-vitepress-theme": "^1.1.3",
50
50
  "typescript": "5.9.3",
51
- "typescript-eslint": "^8.62.1",
51
+ "typescript-eslint": "^8.63.0",
52
52
  "vitepress": "^1.6.4",
53
- "vitest": "^4.1.9",
53
+ "vitest": "^4.1.10",
54
54
  "werift": "0.23.0",
55
55
  "werift-rtp": "^0.8.8"
56
56
  },