@camstack/addon-admin-ui 1.2.276 → 1.2.277

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 (82) hide show
  1. package/dist/assets/{AddonCollectionPage-BD39bVDO.js → AddonCollectionPage-65yIgq50.js} +1 -1
  2. package/dist/assets/{Addons-Cq5slzUF.js → Addons-CjKLXBV3.js} +1 -1
  3. package/dist/assets/{AdminTabs-CxoBTklu.js → AdminTabs-Bsxd4tRa.js} +1 -1
  4. package/dist/assets/{AiProfiles-CJnTSsb2.js → AiProfiles-l7LHrzwT.js} +1 -1
  5. package/dist/assets/{BrokerForm-CpQEhIDa.js → BrokerForm-3rcdA3-f.js} +1 -1
  6. package/dist/assets/{Build-CDuj-tsF.js → Build-DRVkaxIT.js} +1 -1
  7. package/dist/assets/{Capabilities-DqF4Lni2.js → Capabilities-CESfvDkp.js} +1 -1
  8. package/dist/assets/{CapabilityBadges-lTXo5llx.js → CapabilityBadges-MCiRJB78.js} +1 -1
  9. package/dist/assets/{Cluster-C3S4f1h7.js → Cluster-Dl8XeKqT.js} +1 -1
  10. package/dist/assets/{Data-NyEE4mZ9.js → Data-pqJND2n4.js} +1 -1
  11. package/dist/assets/{DetectionIntelligence-qJXiye8T.js → DetectionIntelligence-CxLbtcRH.js} +1 -1
  12. package/dist/assets/{DeviceAggregateSection-BwiFXOuD.js → DeviceAggregateSection-BuSC-cdc.js} +1 -1
  13. package/dist/assets/{DeviceDetail-BcoUTKsH.js → DeviceDetail-DeJgcjCA.js} +1 -1
  14. package/dist/assets/{Devices-CUuNJmpH.js → Devices-B6Wzjk85.js} +1 -1
  15. package/dist/assets/{EmbedPlayerPage-m4ZAU5eR.js → EmbedPlayerPage-rypUtfsp.js} +1 -1
  16. package/dist/assets/{Events-Cz_SPAHz.js → Events-DMZqhcSB.js} +1 -1
  17. package/dist/assets/{FormBuilder-BtteYqpo.js → FormBuilder-BkkpgbP0.js} +1 -1
  18. package/dist/assets/{Identity-CbApAuMW.js → Identity-CAF1wZr0.js} +1 -1
  19. package/dist/assets/{IntegrationDetail-R1qnVcz1.js → IntegrationDetail-C9zY-gd5.js} +1 -1
  20. package/dist/assets/{Integrations-Dd6goBP7.js → Integrations-C-0BUSAM.js} +1 -1
  21. package/dist/assets/{Integrations-D3KyyETm.js → Integrations-D-oa4wlE.js} +1 -1
  22. package/dist/assets/{Locations-BBvmf6wR.js → Locations-BENkzgun.js} +1 -1
  23. package/dist/assets/{Logs-Bw1isllJ.js → Logs-HI08UKTA.js} +1 -1
  24. package/dist/assets/{ModelLicenses-BqfEvjh7.js → ModelLicenses-zZgTMqXO.js} +1 -1
  25. package/dist/assets/{MotionZonesSettings-D56Six9q.js → MotionZonesSettings-CTDWIbp0.js} +1 -1
  26. package/dist/assets/{MyAccess-DUKSI7eb.js → MyAccess-CauYj362.js} +1 -1
  27. package/dist/assets/{Network-zMCcMnJ8.js → Network-CFX3d_W_.js} +1 -1
  28. package/dist/assets/{NodeAddonsSettingsPanel-x4CXa830.js → NodeAddonsSettingsPanel-lBWaWtyZ.js} +1 -1
  29. package/dist/assets/{NodeInferenceDevices-CE4QB6-w.js → NodeInferenceDevices-CqSDOYod.js} +1 -1
  30. package/dist/assets/{Notifications-Cg60TCGD.js → Notifications-BVaBx5zp.js} +1 -1
  31. package/dist/assets/{Pipeline-QMQOdWgy.js → Pipeline-DLB19p4D.js} +1 -1
  32. package/dist/assets/{Plates-Bu2KLWF0.js → Plates-C-yOBq5k.js} +1 -1
  33. package/dist/assets/{PrivacyMaskSettings-DhAev9wG.js → PrivacyMaskSettings-0zZkGNOM.js} +1 -1
  34. package/dist/assets/{ProviderIcon-BdA8cO5j.js → ProviderIcon-CPPKo-Ts.js} +1 -1
  35. package/dist/assets/{Recordings-C6PDPiiY.js → Recordings-DbiWFy0T.js} +1 -1
  36. package/dist/assets/{ScanNetworkModal-0ozFHbP_.js → ScanNetworkModal-BJrHm0qj.js} +1 -1
  37. package/dist/assets/{SceneMonitorEditor-HWbGyLwn.js → SceneMonitorEditor-drNxXbce.js} +1 -1
  38. package/dist/assets/{Scenes-BVJE0STK.js → Scenes-0xZl7nj0.js} +1 -1
  39. package/dist/assets/{Settings-B9awqkTx.js → Settings-C-s7TZ7R.js} +1 -1
  40. package/dist/assets/{Showroom-CIRWo-dT.js → Showroom-BzLt_-OR.js} +1 -1
  41. package/dist/assets/{StorageLocationsPanel-B3j8F7aM.js → StorageLocationsPanel-OeuRyPsr.js} +1 -1
  42. package/dist/assets/{Terminal-C-6Y0pSD.js → Terminal-SFoH9jRn.js} +1 -1
  43. package/dist/assets/{Viewer-DWDitGER.js → Viewer-DyEoPMvX.js} +1 -1
  44. package/dist/assets/{__vite-browser-external-B6qJ4svC.js → __vite-browser-external-Cc3gW-QT.js} +1 -1
  45. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-uUKVnhy2.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DJ3Gqc8B.js} +1 -1
  46. package/dist/assets/{archive-IdtjFEze.js → archive-Dn3V52rE.js} +1 -1
  47. package/dist/assets/{authed-media-CC2YdLuq.js → authed-media-BZ_HLhjH.js} +1 -1
  48. package/dist/assets/{boxes-D7D7LK9v.js → boxes-C-ssGRxU.js} +1 -1
  49. package/dist/assets/circle-slash-D2ZkUEEp.js +1 -0
  50. package/dist/assets/{debounced-invalidate-B_nKJtYA.js → debounced-invalidate-LQZZcUzN.js} +1 -1
  51. package/dist/assets/dist-DcgQ6Ev-.js +349 -0
  52. package/dist/assets/{dist-BRxYTs-j.js → dist-DdKUzVhB.js} +1 -1
  53. package/dist/assets/{face-bbox-wwUkvIaL.js → face-bbox-B5Kgf0Oj.js} +1 -1
  54. package/dist/assets/{hard-drive-download-CMrOeRSw.js → hard-drive-download-CsozppT1.js} +1 -1
  55. package/dist/assets/{hostInit-Dg8MBaGO.js → hostInit-B4fqBDQa.js} +1 -1
  56. package/dist/assets/{index-ClE1rPAH.js → index-DJ7rWfAu.js} +3 -3
  57. package/dist/assets/{layers-CS70i66q.js → layers-YEExzxCf.js} +1 -1
  58. package/dist/assets/{location-owned-usage-C7x-LdjG.js → location-owned-usage-DASRr9Gn.js} +1 -1
  59. package/dist/assets/{mf-entry-bootstrap-0-b546ab2c.js → mf-entry-bootstrap-0-d8a20dad.js} +2 -2
  60. package/dist/assets/{player-overlays-C78iNIuD.js → player-overlays-DAihiFvO.js} +1 -1
  61. package/dist/assets/remoteEntry-DY7q5PVh.js +1 -0
  62. package/dist/assets/{send-DpHFnZI6.js → send-s1IW1yHx.js} +1 -1
  63. package/dist/assets/{settings-2-DwoSM6Bh.js → settings-2-sJ1lVWl6.js} +1 -1
  64. package/dist/assets/{square-check-big-cJI8MBN4.js → square-check-big-CP5rWVEN.js} +1 -1
  65. package/dist/assets/src-B4JHPaAN.js +67 -0
  66. package/dist/assets/src-DOeAf_sL.js +349 -0
  67. package/dist/assets/{use-scenes-feed-CqGeZJG7.js → use-scenes-feed-BlcOIyWI.js} +1 -1
  68. package/dist/assets/{use-stationary-objects-CITdXIwS.js → use-stationary-objects-C7CknC2f.js} +1 -1
  69. package/dist/assets/useEventInvalidation-vH-47C-i.js +1 -0
  70. package/dist/assets/{useNodeUrlSelection-CoD6D3d3.js → useNodeUrlSelection-Bmq-ZpDy.js} +1 -1
  71. package/dist/assets/user-round-CQEU9c3C.js +1 -0
  72. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DCI7-W2O.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-9zlM_isR.js} +2 -2
  73. package/dist/index.html +6 -6
  74. package/dist/server/addon.js +426 -23
  75. package/package.json +1 -1
  76. package/dist/assets/circle-slash-Duoo2xiR.js +0 -1
  77. package/dist/assets/dist-Di4eEfFU.js +0 -349
  78. package/dist/assets/remoteEntry-kl9sd-S-.js +0 -1
  79. package/dist/assets/src-C-gl2YyL.js +0 -67
  80. package/dist/assets/src-DAvjvAxz.js +0 -349
  81. package/dist/assets/useEventInvalidation-B_bVFeEF.js +0 -1
  82. package/dist/assets/user-round-DZp9kdLn.js +0 -1
@@ -9795,23 +9795,6 @@ var ExpressionEvalError = class extends Error {
9795
9795
  this.name = "ExpressionEvalError";
9796
9796
  }
9797
9797
  };
9798
- /**
9799
- * Frozen, null-prototype builtin function table for the expression engine
9800
- * (spec §4 rule 4). The table is the SOLE surface of callable functions: the
9801
- * parser rejects any callee not in it, and the evaluator gates each call on an
9802
- * own-property check against it.
9803
- *
9804
- * Because the object has a NULL prototype AND is `Object.freeze`d:
9805
- * - it cannot be polluted (no `__proto__` / `constructor` write reaches it);
9806
- * - a lookup for `toString` / `hasOwnProperty` / `constructor` finds NOTHING
9807
- * (there is no `Object.prototype` in the chain), so those names are not
9808
- * callable — they are simply "unknown function" at parse time.
9809
- *
9810
- * Every numeric argument is validated as a finite number and every numeric
9811
- * RESULT is re-checked finite, so `/0`, `sqrt(-1)` (→ NaN) and overflow
9812
- * (`pow(10,400)` → Infinity) all raise `ExpressionEvalError` and fail the link
9813
- * closed rather than emitting a garbage value.
9814
- */
9815
9798
  function asFiniteNumber(value, name, index) {
9816
9799
  if (typeof value !== "number" || !Number.isFinite(value)) throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a finite number`);
9817
9800
  return value;
@@ -9827,6 +9810,10 @@ function finiteResult(value, name) {
9827
9810
  function allFiniteNumbers(args, name) {
9828
9811
  return args.map((a, idx) => asFiniteNumber(a, name, idx));
9829
9812
  }
9813
+ function asBoolean$1(value, name, index) {
9814
+ if (typeof value !== "boolean") throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a boolean`);
9815
+ return value;
9816
+ }
9830
9817
  var INF = Number.POSITIVE_INFINITY;
9831
9818
  var table = {
9832
9819
  min: {
@@ -9927,6 +9914,40 @@ var table = {
9927
9914
  if (from === to) return x;
9928
9915
  throw new ExpressionEvalError("convert: unit conversion table not installed");
9929
9916
  }
9917
+ },
9918
+ any: {
9919
+ minArgs: 1,
9920
+ maxArgs: INF,
9921
+ apply: (args) => args.map((a, i) => asBoolean$1(a, "any", i)).some((b) => b)
9922
+ },
9923
+ all: {
9924
+ minArgs: 1,
9925
+ maxArgs: INF,
9926
+ apply: (args) => args.map((a, i) => asBoolean$1(a, "all", i)).every((b) => b)
9927
+ },
9928
+ within: {
9929
+ minArgs: 2,
9930
+ maxArgs: 2,
9931
+ apply: (args, hooks) => {
9932
+ const windowMs = asFiniteNumber(args[1], "within", 1);
9933
+ if (windowMs < 0) throw new ExpressionEvalError("within: the window must not be negative");
9934
+ const at = args[0];
9935
+ if (at === null) return false;
9936
+ const ts = asFiniteNumber(at, "within", 0);
9937
+ const now = hooks.now;
9938
+ if (now === void 0 || !Number.isFinite(now)) throw new ExpressionEvalError("within: no clock was supplied to this evaluation");
9939
+ const inside = now - ts <= windowMs;
9940
+ if (inside) hooks.noteDeadline?.(ts + windowMs + 1);
9941
+ return inside;
9942
+ }
9943
+ },
9944
+ latest: {
9945
+ minArgs: 1,
9946
+ maxArgs: INF,
9947
+ apply: (args) => {
9948
+ const present = args.flatMap((a, i) => a === null ? [] : [asFiniteNumber(a, "latest", i)]);
9949
+ return present.length === 0 ? null : finiteResult(Math.max(...present), "latest");
9950
+ }
9930
9951
  }
9931
9952
  };
9932
9953
  Object.freeze(Object.assign(Object.create(null), table));
@@ -10541,7 +10562,7 @@ var AutomationActionSchema = discriminatedUnion("kind", [
10541
10562
  code: string().min(1).max(2e4)
10542
10563
  })
10543
10564
  ]);
10544
- object({
10565
+ var AutomationRecipeSchema = object({
10545
10566
  triggers: array(AutomationTriggerSchema),
10546
10567
  conditions: AutomationConditionSchema.optional(),
10547
10568
  actions: array(AutomationActionSchema)
@@ -12592,6 +12613,195 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
12592
12613
  }),
12593
12614
  lastChangedAt: number()
12594
12615
  });
12616
+ /** A composed device's stableId is this prefix plus the block id. */
12617
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
12618
+ /** Longest snippet a `code` source may carry (slice 4). */
12619
+ var MAX_COMPOSITION_CODE_LENGTH = 2e4;
12620
+ var CompositionSourceRefSchema = object({
12621
+ /** The owning addon; `stableId` is unique only within it. */
12622
+ addonId: string().min(1),
12623
+ stableId: string().min(1)
12624
+ });
12625
+ /** One field of one capability of one source device. */
12626
+ var CompositionFieldReadSchema = object({
12627
+ source: CompositionSourceRefSchema,
12628
+ cap: string().min(1),
12629
+ /** Dotted path into the source cap's runtime-state slice. */
12630
+ fieldPath: string().min(1)
12631
+ });
12632
+ /** `from`: copy one source field verbatim. It is also an expression's `from` binding. */
12633
+ var CompositionFromSourceSchema = CompositionFieldReadSchema.extend({ kind: literal("from") });
12634
+ var CompositionBindingSchema = discriminatedUnion("kind", [CompositionFromSourceSchema, object({
12635
+ kind: literal("literal"),
12636
+ value: union([
12637
+ string(),
12638
+ number(),
12639
+ boolean(),
12640
+ _null()
12641
+ ])
12642
+ })]);
12643
+ /**
12644
+ * `expression`: a formula over named bindings, in the salvaged expression
12645
+ * engine. Validated at parse by the SAME function every other consumer runs,
12646
+ * so the editor and the store cannot disagree.
12647
+ */
12648
+ var CompositionExpressionSourceSchema = object({
12649
+ kind: literal("expression"),
12650
+ expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
12651
+ bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), CompositionBindingSchema)
12652
+ }).superRefine((src, ctx) => {
12653
+ const err = validateExpressionSource(src);
12654
+ if (err !== null) ctx.addIssue({
12655
+ code: "custom",
12656
+ message: err,
12657
+ path: ["expr"]
12658
+ });
12659
+ });
12660
+ /** `code`: RESERVED for slice 4 (own runner, one-way eject). */
12661
+ var CompositionCodeSourceSchema = object({
12662
+ kind: literal("code"),
12663
+ code: string().min(1).max(MAX_COMPOSITION_CODE_LENGTH)
12664
+ });
12665
+ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12666
+ CompositionFromSourceSchema,
12667
+ CompositionExpressionSourceSchema,
12668
+ CompositionCodeSourceSchema
12669
+ ]);
12670
+ var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
12671
+ kind: literal("forward"),
12672
+ source: CompositionSourceRefSchema,
12673
+ cap: string().min(1),
12674
+ method: string().min(1)
12675
+ }), CompositionCodeSourceSchema]);
12676
+ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
12677
+ kind: literal("fields"),
12678
+ cap: string().min(1),
12679
+ fields: record(string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
12680
+ /** RESERVED for slice 3; refused by the validator when non-empty. */
12681
+ commands: record(string().min(1), CompositionCommandTargetSchema).optional()
12682
+ }), object({
12683
+ kind: literal("passthrough"),
12684
+ cap: string().min(1),
12685
+ source: CompositionSourceRefSchema
12686
+ })]);
12687
+ var CompositionSchema = object({
12688
+ target: discriminatedUnion("kind", [object({
12689
+ kind: literal("new"),
12690
+ type: _enum(DeviceType),
12691
+ role: _enum(DeviceRole).optional()
12692
+ }), object({
12693
+ kind: literal("existing"),
12694
+ device: CompositionSourceRefSchema
12695
+ })]),
12696
+ features: array(CompositionFeatureSchema).min(1).max(16)
12697
+ }).superRefine((composition, ctx) => {
12698
+ const seen = /* @__PURE__ */ new Set();
12699
+ composition.features.forEach((feature, index) => {
12700
+ if (seen.has(feature.cap)) ctx.addIssue({
12701
+ code: "custom",
12702
+ message: `capability \`${feature.cap}\` is composed twice — one feature per capability`,
12703
+ path: [
12704
+ "features",
12705
+ index,
12706
+ "cap"
12707
+ ]
12708
+ });
12709
+ seen.add(feature.cap);
12710
+ });
12711
+ });
12712
+ /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
12713
+ var CompositionProblemSchema = object({
12714
+ code: _enum([
12715
+ "reserved-variant",
12716
+ "unknown-capability",
12717
+ "not-composable",
12718
+ "wrong-device-type",
12719
+ "has-commands",
12720
+ "unknown-field",
12721
+ "nested-field",
12722
+ "missing-field",
12723
+ "kind-mismatch",
12724
+ "may-be-null",
12725
+ "source-missing",
12726
+ "source-unreadable",
12727
+ "source-capability-missing",
12728
+ "source-field-unknown",
12729
+ "expression-invalid",
12730
+ "cycle",
12731
+ "duplicate-target"
12732
+ ]),
12733
+ path: string(),
12734
+ message: string()
12735
+ });
12736
+ var CompositionFieldKindSchema = _enum([
12737
+ "string",
12738
+ "number",
12739
+ "boolean",
12740
+ "enum"
12741
+ ]);
12742
+ /** How a field says "unavailable": `null` when its schema allows it, else the device goes offline (D393). */
12743
+ var CompositionUnavailableModeSchema = _enum(["null", "offline"]);
12744
+ /**
12745
+ * `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
12746
+ * field of its cap changes value · `constant` reads nothing, computed once.
12747
+ */
12748
+ var CompositionFieldRoleSchema = _enum([
12749
+ "derived",
12750
+ "clock",
12751
+ "constant"
12752
+ ]);
12753
+ var CompositionFieldPlanSchema = object({
12754
+ cap: string(),
12755
+ path: string(),
12756
+ /** Index into `composition.features` this field's capability came from —
12757
+ * lets a source/cycle problem name its path as `features[N].fields.<path>`
12758
+ * (the same convention `planComposition`'s own problems already use). */
12759
+ featureIndex: number().int().nonnegative(),
12760
+ kind: CompositionFieldKindSchema,
12761
+ nullable: boolean(),
12762
+ required: boolean(),
12763
+ unavailable: CompositionUnavailableModeSchema,
12764
+ role: CompositionFieldRoleSchema,
12765
+ source: CompositionFieldSourceSchema,
12766
+ reads: array(CompositionFieldReadSchema)
12767
+ });
12768
+ var CompositionValidationSchema = object({
12769
+ ok: boolean(),
12770
+ problems: array(CompositionProblemSchema),
12771
+ fields: array(CompositionFieldPlanSchema)
12772
+ });
12773
+ /** Mirrors `CoreBlockStatus`, pinned by `core-blocks-source.spec.ts` (Task 11). */
12774
+ var CompositionRunStatusSchema = _enum([
12775
+ "stopped",
12776
+ "starting",
12777
+ "running",
12778
+ "failed"
12779
+ ]);
12780
+ var CompositionFieldStateKindSchema = _enum([
12781
+ "fresh",
12782
+ "stale",
12783
+ "unavailable"
12784
+ ]);
12785
+ var CompositionFieldStateSchema = object({
12786
+ cap: string(),
12787
+ path: string(),
12788
+ state: CompositionFieldStateKindSchema,
12789
+ /** `null` whenever `state === 'unavailable'`; never a plausible stand-in (D393). */
12790
+ value: union([
12791
+ string(),
12792
+ number(),
12793
+ boolean(),
12794
+ _null()
12795
+ ]),
12796
+ reason: string().optional()
12797
+ });
12798
+ var CompositionBlockStateSchema = object({
12799
+ blockId: string(),
12800
+ deviceId: number().nullable(),
12801
+ status: CompositionRunStatusSchema,
12802
+ reason: string().optional(),
12803
+ fields: array(CompositionFieldStateSchema)
12804
+ });
12595
12805
  /** Where a block runs. The operator chooses — a block driving a device on an
12596
12806
  * agent is the reason placement is not fixed to the hub. */
12597
12807
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -12618,6 +12828,30 @@ var CoreBlockInputSchema = object({
12618
12828
  */
12619
12829
  integrationId: string().optional()
12620
12830
  });
12831
+ /**
12832
+ * What a block IS (D659). Absent means `code` — every row stored before this
12833
+ * union keeps working unchanged.
12834
+ * - `code`: the TypeScript in `code`, compiled and run in its own runner;
12835
+ * - `recipe`: RESERVED (automations), stored shape only; refused at run by name;
12836
+ * - `composition`: declarative, run by the shared `composer`; `code` is `''`.
12837
+ */
12838
+ var CoreBlockSourceSchema = discriminatedUnion("kind", [
12839
+ object({ kind: literal("code") }),
12840
+ object({
12841
+ kind: literal("recipe"),
12842
+ recipe: AutomationRecipeSchema
12843
+ }),
12844
+ object({
12845
+ kind: literal("composition"),
12846
+ composition: CompositionSchema
12847
+ })
12848
+ ]);
12849
+ /** The client-authored half of a composition block. No `code`, no placement (hub-only; Phase 7). */
12850
+ var CompositionBlockInputSchema = object({
12851
+ name: string().min(1).max(120),
12852
+ enabled: boolean(),
12853
+ composition: CompositionSchema
12854
+ });
12621
12855
  /** A stored block. */
12622
12856
  var CoreBlockSchema = CoreBlockInputSchema.extend({
12623
12857
  id: string(),
@@ -12633,8 +12867,38 @@ var CoreBlockSchema = CoreBlockInputSchema.extend({
12633
12867
  */
12634
12868
  lastError: string().optional(),
12635
12869
  /** Ms epoch of the last state change. */
12636
- lastChangedAt: number()
12870
+ lastChangedAt: number(),
12871
+ /** What the block is. Absent means `code` (D659). */
12872
+ source: CoreBlockSourceSchema.optional()
12873
+ });
12874
+ /** A stored composition block and what the composer says about it. */
12875
+ var CompositionViewSchema = object({
12876
+ block: CoreBlockSchema,
12877
+ state: discriminatedUnion("kind", [object({
12878
+ kind: literal("answered"),
12879
+ state: CompositionBlockStateSchema.nullable()
12880
+ }), object({
12881
+ kind: literal("unreachable"),
12882
+ error: string()
12883
+ })])
12637
12884
  });
12885
+ /**
12886
+ * A read of the stored compositions. `not-loaded` while the `core_blocks`
12887
+ * table has not been READ: an empty answer then would make "not yet known"
12888
+ * look like "none", and invite the operator to recreate what exists (D315).
12889
+ */
12890
+ var CompositionsNotLoadedSchema = object({
12891
+ state: literal("not-loaded"),
12892
+ reason: string()
12893
+ });
12894
+ var CompositionListReadSchema = discriminatedUnion("state", [object({
12895
+ state: literal("loaded"),
12896
+ views: array(CompositionViewSchema)
12897
+ }), CompositionsNotLoadedSchema]);
12898
+ var CompositionGetReadSchema = discriminatedUnion("state", [object({
12899
+ state: literal("loaded"),
12900
+ view: CompositionViewSchema.nullable()
12901
+ }), CompositionsNotLoadedSchema]);
12638
12902
  /** What a compile attempt produced. */
12639
12903
  var CoreBlockCompileResultSchema = object({
12640
12904
  ok: boolean(),
@@ -12672,7 +12936,72 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
12672
12936
  }), method(object({}), object({ libs: array(object({
12673
12937
  filePath: string(),
12674
12938
  content: string()
12675
- })) }), { auth: "admin" });
12939
+ })) }), { auth: "admin" }), method(object({ block: CompositionBlockInputSchema }), object({ block: CoreBlockSchema }), {
12940
+ kind: "mutation",
12941
+ auth: "admin",
12942
+ caller: "required"
12943
+ }), method(object({
12944
+ blockId: string(),
12945
+ expectedUpdatedAt: number(),
12946
+ block: CompositionBlockInputSchema.partial()
12947
+ }), object({ block: CoreBlockSchema }), {
12948
+ kind: "mutation",
12949
+ auth: "admin",
12950
+ caller: "required"
12951
+ }), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
12952
+ composition: CompositionSchema,
12953
+ blockId: string().optional()
12954
+ }), CompositionValidationSchema, {
12955
+ kind: "mutation",
12956
+ auth: "admin",
12957
+ access: "view"
12958
+ });
12959
+ var ComposerBlockSchema = object({
12960
+ id: string().min(1),
12961
+ name: string().min(1).max(120),
12962
+ enabled: boolean(),
12963
+ updatedAt: number(),
12964
+ composition: CompositionSchema
12965
+ });
12966
+ /**
12967
+ * A stored composition row that no longer PARSES — a schema a release
12968
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
12969
+ * its device as a placeholder and reports the block `failed` naming the parse
12970
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
12971
+ */
12972
+ var ComposerUnreadableBlockSchema = object({
12973
+ id: string().min(1),
12974
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
12975
+ name: string().nullable(),
12976
+ /** The parse error, in the operator's words. */
12977
+ error: string()
12978
+ });
12979
+ method(object({
12980
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
12981
+ integrationId: string().nullable(),
12982
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
12983
+ storeLoaded: boolean(),
12984
+ blocks: array(ComposerBlockSchema),
12985
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
12986
+ restartBlockIds: array(string()),
12987
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
12988
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
12989
+ }), object({
12990
+ blocks: array(object({
12991
+ blockId: string(),
12992
+ status: CompositionRunStatusSchema,
12993
+ reason: string().optional()
12994
+ })),
12995
+ /**
12996
+ * False when the composer declared and withdrew NOTHING (store not loaded,
12997
+ * integration unknown, its own rows unread or read empty once). An empty
12998
+ * apply the caller owes is paid off only by one the composer acted on (D49).
12999
+ */
13000
+ acted: boolean()
13001
+ }), {
13002
+ kind: "mutation",
13003
+ auth: "admin"
13004
+ }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
12676
13005
  /**
12677
13006
  * `custom-model-registry` — collection cap exposing operator-registered
12678
13007
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -18417,8 +18746,8 @@ var NcTestResultSchema = object({
18417
18746
  className: string().optional(),
18418
18747
  label: string().optional()
18419
18748
  });
18420
- /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is the
18421
- * same union; the template-vars spec pins the two together. `mixed` is DERIVED
18749
+ /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
18750
+ * `z.infer` of this schema — one shape, no twin. `mixed` is DERIVED
18422
18751
  * (a stored system rule whose kinds span families, D637) and never authored. */
18423
18752
  var NcRuleKindSchema = _enum([
18424
18753
  "detection",
@@ -34488,6 +34817,38 @@ DeviceType.Camera, method(object({
34488
34817
  detection: array(ZoneRuleSchema).readonly(),
34489
34818
  package: array(ZoneRuleSchema).readonly()
34490
34819
  });
34820
+ var NUMBER = {
34821
+ kind: "fixed",
34822
+ result: ["number"]
34823
+ };
34824
+ var BOOLEAN = {
34825
+ kind: "fixed",
34826
+ result: ["boolean"]
34827
+ };
34828
+ Object.freeze({
34829
+ min: NUMBER,
34830
+ max: NUMBER,
34831
+ abs: NUMBER,
34832
+ floor: NUMBER,
34833
+ ceil: NUMBER,
34834
+ sqrt: NUMBER,
34835
+ round: NUMBER,
34836
+ pow: NUMBER,
34837
+ clamp: NUMBER,
34838
+ avg: NUMBER,
34839
+ sum: NUMBER,
34840
+ age: NUMBER,
34841
+ convert: NUMBER,
34842
+ coalesce: { kind: "coalesce" },
34843
+ any: BOOLEAN,
34844
+ all: BOOLEAN,
34845
+ within: BOOLEAN,
34846
+ latest: {
34847
+ kind: "fixed",
34848
+ result: ["number", "null"]
34849
+ }
34850
+ });
34851
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
34491
34852
  /**
34492
34853
  * Accessory device helpers — shared across drivers.
34493
34854
  *
@@ -36796,6 +37157,18 @@ Object.freeze({
36796
37157
  addonId: null,
36797
37158
  access: "create"
36798
37159
  },
37160
+ "composer.applyBlocks": {
37161
+ capName: "composer",
37162
+ capScope: "system",
37163
+ addonId: null,
37164
+ access: "create"
37165
+ },
37166
+ "composer.getStates": {
37167
+ capName: "composer",
37168
+ capScope: "system",
37169
+ addonId: null,
37170
+ access: "view"
37171
+ },
36799
37172
  "connectionTest.describeTest": {
36800
37173
  capName: "connection-test",
36801
37174
  capScope: "system",
@@ -36856,6 +37229,12 @@ Object.freeze({
36856
37229
  addonId: null,
36857
37230
  access: "create"
36858
37231
  },
37232
+ "coreBlocks.createComposition": {
37233
+ capName: "core-blocks",
37234
+ capScope: "system",
37235
+ addonId: null,
37236
+ access: "create"
37237
+ },
36859
37238
  "coreBlocks.delete": {
36860
37239
  capName: "core-blocks",
36861
37240
  capScope: "system",
@@ -36868,6 +37247,12 @@ Object.freeze({
36868
37247
  addonId: null,
36869
37248
  access: "view"
36870
37249
  },
37250
+ "coreBlocks.getComposition": {
37251
+ capName: "core-blocks",
37252
+ capScope: "system",
37253
+ addonId: null,
37254
+ access: "view"
37255
+ },
36871
37256
  "coreBlocks.getTypeDefs": {
36872
37257
  capName: "core-blocks",
36873
37258
  capScope: "system",
@@ -36880,6 +37265,12 @@ Object.freeze({
36880
37265
  addonId: null,
36881
37266
  access: "view"
36882
37267
  },
37268
+ "coreBlocks.listCompositions": {
37269
+ capName: "core-blocks",
37270
+ capScope: "system",
37271
+ addonId: null,
37272
+ access: "view"
37273
+ },
36883
37274
  "coreBlocks.restart": {
36884
37275
  capName: "core-blocks",
36885
37276
  capScope: "system",
@@ -36898,6 +37289,18 @@ Object.freeze({
36898
37289
  addonId: null,
36899
37290
  access: "create"
36900
37291
  },
37292
+ "coreBlocks.updateComposition": {
37293
+ capName: "core-blocks",
37294
+ capScope: "system",
37295
+ addonId: null,
37296
+ access: "create"
37297
+ },
37298
+ "coreBlocks.validateComposition": {
37299
+ capName: "core-blocks",
37300
+ capScope: "system",
37301
+ addonId: null,
37302
+ access: "view"
37303
+ },
36901
37304
  "cover.close": {
36902
37305
  capName: "cover",
36903
37306
  capScope: "device",
@@ -45877,7 +46280,7 @@ var AdminUIAddon = class extends BaseAddon {
45877
46280
  capability: adminUiCapability,
45878
46281
  provider: {
45879
46282
  getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
45880
- getVersion: async () => ({ version: "1.2.276" })
46283
+ getVersion: async () => ({ version: "1.2.277" })
45881
46284
  }
45882
46285
  }];
45883
46286
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-admin-ui",
3
- "version": "1.2.276",
3
+ "version": "1.2.277",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Admin UI — Vite frontend build and server-side addon",
@@ -1 +0,0 @@
1
- import{yt as e}from"./player-overlays-C78iNIuD.js";var t=e(`circle-slash`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]);export{t};