@camstack/addon-admin-ui 1.2.620 → 1.2.621

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 (140) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/assets/{Addons-DJdolmfq.js → Addons-D03BymGf.js} +1 -1
  3. package/dist/assets/{AdminPage-BHh-8_fU.js → AdminPage-i-Spu-Sm.js} +1 -1
  4. package/dist/assets/{AdminSectionedPage-iARsX8rZ.js → AdminSectionedPage-4B2I3krV.js} +1 -1
  5. package/dist/assets/{AiProfiles-2tnlEWXz.js → AiProfiles-BtxD6UCi.js} +1 -1
  6. package/dist/assets/{Authentication-Bem8tvA5.js → Authentication-CbR408Np.js} +1 -1
  7. package/dist/assets/Build-D_CEILuw.js +39 -0
  8. package/dist/assets/{Calendars-DNQrWvuF.js → Calendars-04ow5LWV.js} +1 -1
  9. package/dist/assets/{CameraGrids-C-z7UM1y.js → CameraGrids-DAxglM0u.js} +1 -1
  10. package/dist/assets/{Cluster-VLE7u_Ba.js → Cluster-B4-o839q.js} +1 -1
  11. package/dist/assets/CompositionBlockEditor-lXIySj_j.js +2 -0
  12. package/dist/assets/{CompositionEditorPage-CKETxShe.js → CompositionEditorPage-B0BQUfRK.js} +1 -1
  13. package/dist/assets/{Data-B9Er0g9D.js → Data-CUdCRkb4.js} +1 -1
  14. package/dist/assets/DeviceDetail-TiGGpszm.js +2 -0
  15. package/dist/assets/{DeviceDoActionFields-CZFlS0_-.js → DeviceDoActionFields-CUBDFM2y.js} +1 -1
  16. package/dist/assets/{Devices-CGx0wAxP.js → Devices-CGml-dVh.js} +1 -1
  17. package/dist/assets/{EditTemplateButton-Bq1ffI4D.js → EditTemplateButton-CJAzjfis.js} +1 -1
  18. package/dist/assets/{EmbedPlayerPage-4ehPr2TZ.js → EmbedPlayerPage-D7SG2EiT.js} +1 -1
  19. package/dist/assets/{History-Bx1E735e.js → History-DcKS8Pqt.js} +1 -1
  20. package/dist/assets/{Identity-CMUHSSqv.js → Identity-CSX5n8fe.js} +1 -1
  21. package/dist/assets/{InstancesTable-gUkLAnsD.js → InstancesTable-fKOn5UOw.js} +1 -1
  22. package/dist/assets/{IntegrationDetail-Ehyor6u6.js → IntegrationDetail-DOS8P8lV.js} +1 -1
  23. package/dist/assets/{IntegrationHub-BG7cMJsk.js → IntegrationHub-DHj2ddAb.js} +1 -1
  24. package/dist/assets/Integrations-DasA9TLi.js +1 -0
  25. package/dist/assets/{Integrations-CUC8UK1M.js → Integrations-aHJdbfWs.js} +1 -1
  26. package/dist/assets/{Library-BrzsxvAz.js → Library-Cm591Y9v.js} +1 -1
  27. package/dist/assets/{Locations-CVrXgE35.js → Locations-Dbb_PBsp.js} +2 -2
  28. package/dist/assets/{Logs-DsK5fRZR.js → Logs-wLf2rwe_.js} +1 -1
  29. package/dist/assets/{MaskShapeCanvas-Df0bxhWU.js → MaskShapeCanvas-BzKhGv5g.js} +1 -1
  30. package/dist/assets/{MotionZonesSettings-bzsZ9ORo.js → MotionZonesSettings-Bfd2oPVI.js} +1 -1
  31. package/dist/assets/{MyAccess-DnTnl7UZ.js → MyAccess-DWsYxabr.js} +1 -1
  32. package/dist/assets/{Network-Bw36Tv36.js → Network-O9S27-AU.js} +1 -1
  33. package/dist/assets/{NodeAddonsSettingsPanel-R1b0cru-.js → NodeAddonsSettingsPanel-DqIJD_Qv.js} +1 -1
  34. package/dist/assets/Notifications-ByJXuko8.js +1 -0
  35. package/dist/assets/{Pipeline-DC88azee.js → Pipeline-DBcs2yNk.js} +1 -1
  36. package/dist/assets/{PrivacyMaskSettings-BSmAOhtT.js → PrivacyMaskSettings-DHdyfCxl.js} +1 -1
  37. package/dist/assets/{Recordings-BHU_meXJ.js → Recordings-CpjBlQgb.js} +1 -1
  38. package/dist/assets/{ScanSubnetEditor-DQvmvgy2.js → ScanSubnetEditor-BxUEjJED.js} +1 -1
  39. package/dist/assets/{SceneMonitorEditor-H8rTgYvL.js → SceneMonitorEditor-VUmHb_E7.js} +1 -1
  40. package/dist/assets/{SessionsList-CjmK3K2H.js → SessionsList-S3gzW-Bs.js} +1 -1
  41. package/dist/assets/{Showroom-BVvH3mP_.js → Showroom-BopC4IyP.js} +1 -1
  42. package/dist/assets/{StorageLocationsTable-DpJ7jfbm.js → StorageLocationsTable-B_Ab0uTI.js} +1 -1
  43. package/dist/assets/{System-D4Q2GWws.js → System-0UIzVk6A.js} +1 -1
  44. package/dist/assets/Templates-Dn1IT7mN.js +1 -0
  45. package/dist/assets/{Terminal-DnA50N1m.js → Terminal-BlujfO1N.js} +1 -1
  46. package/dist/assets/{TrainingProviders-xT33i-sn.js → TrainingProviders-BDIe9V-m.js} +1 -1
  47. package/dist/assets/{Viewer-BPoCOCf0.js → Viewer-DqaGs4bt.js} +1 -1
  48. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CLO1yhFQ.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BOKWQVZm.js} +1 -1
  49. package/dist/assets/{addon-icons-context-BtBGiOr1.js → addon-icons-context-DXvgFgAk.js} +1 -1
  50. package/dist/assets/{ai-page.helpers-SZGcu2Qp.js → ai-page.helpers-CnzRKE0Z.js} +1 -1
  51. package/dist/assets/{archive-D0a0mcxB.js → archive-DTwUeQ3I.js} +1 -1
  52. package/dist/assets/{assignment-candidates-XbaIjrZx.js → assignment-candidates-CY1alfSb.js} +1 -1
  53. package/dist/assets/{authed-media-BNSpauA7.js → authed-media-xhEK3DwN.js} +1 -1
  54. package/dist/assets/{bell-off-DdK8iLZs.js → bell-off-Crg3HkuQ.js} +1 -1
  55. package/dist/assets/{board-model-CRqpael6.js → board-model-DhNDT4cH.js} +1 -1
  56. package/dist/assets/{boxes-vsSDyvgc.js → boxes-DLN5_QEP.js} +1 -1
  57. package/dist/assets/{calendar-clock-CoYYNqtJ.js → calendar-clock-Bmzy84-G.js} +1 -1
  58. package/dist/assets/circle-slash-CYSHrTP5.js +1 -0
  59. package/dist/assets/client-DwEQr2ur.js +809 -0
  60. package/dist/assets/{create-composition-DI5jt0R9.js → create-composition-EfBiEHTX.js} +2 -2
  61. package/dist/assets/crop-DICAJgzI.js +1 -0
  62. package/dist/assets/{database-zap-D8coLqwx.js → database-zap-BVMiC__a.js} +1 -1
  63. package/dist/assets/{device-integration-icon-BC_Avp9o.js → device-integration-icon-B0NXEAF6.js} +1 -1
  64. package/dist/assets/device-picker-model-C9OvDYbX.js +1 -0
  65. package/dist/assets/{dist-BtYGlWrp.js → dist-BignPdVL.js} +1 -1
  66. package/dist/assets/dist-pzgQFJEL.js +809 -0
  67. package/dist/assets/{eraser-Cen5rG9n.js → eraser-2cY7ECNx.js} +1 -1
  68. package/dist/assets/{file-up-Dmdm3s-W.js → file-up-DLkSKXl_.js} +1 -1
  69. package/dist/assets/{format-DU3bhEVG.js → format-CUI2PogY.js} +1 -1
  70. package/dist/assets/{grip-vertical-CfBM4Q2d.js → grip-vertical-DW7lfDYW.js} +1 -1
  71. package/dist/assets/{hard-drive-download-A53Ir3u_.js → hard-drive-download-DgGwUiog.js} +1 -1
  72. package/dist/assets/{hostInit-BZJ9ZClJ.js → hostInit-ugzaAWqe.js} +1 -1
  73. package/dist/assets/i18n-CR0LVhCP.js +1 -0
  74. package/dist/assets/{icons-DOpP4xQB.js → icons-Dpx2Bb-A.js} +1 -1
  75. package/dist/assets/{index-nTaq85cS.js → index-D4e2YUsw.js} +3 -3
  76. package/dist/assets/index-D4z5SYp_.css +2 -0
  77. package/dist/assets/{key-DAZ5__Cz.js → key-id_h-MS5.js} +1 -1
  78. package/dist/assets/{key-square-BYAGokh2.js → key-square-CZ-BUBaz.js} +1 -1
  79. package/dist/assets/{layers-QX48fc9O.js → layers-VzWSphzP.js} +1 -1
  80. package/dist/assets/{link-2-off-DJkRSf1H.js → link-2-off-BGS72ygx.js} +1 -1
  81. package/dist/assets/{linked-devices-model-DkQyKUky.js → linked-devices-model-DDQKKjq6.js} +1 -1
  82. package/dist/assets/{list-ordered-D9rezt8U.js → list-ordered-DrTv2zeo.js} +1 -1
  83. package/dist/assets/{memory-stick-B0y6xRLf.js → memory-stick-8fo589HI.js} +1 -1
  84. package/dist/assets/{message-square-plus-beuwcCJE.js → message-square-plus-CxJNrcr2.js} +1 -1
  85. package/dist/assets/{mf-entry-bootstrap-0-0b131bc2.js → mf-entry-bootstrap-0-877fa96c.js} +2 -2
  86. package/dist/assets/{mic-off-JlShE5CX.js → mic-off-Bh_ho71S.js} +1 -1
  87. package/dist/assets/{monitor-off-D1aEAZKv.js → monitor-off-D-qbNEjS.js} +1 -1
  88. package/dist/assets/{monitor-smartphone-DuS3QmFu.js → monitor-smartphone-D9TuFt2u.js} +1 -1
  89. package/dist/assets/mount-C9OvDYbX.js +1 -0
  90. package/dist/assets/{notification-rule-status-B6-wJrto.js → notification-rule-status-CU-CnTl3.js} +1 -1
  91. package/dist/assets/{player-overlays-D3s97s6y.js → player-overlays-B6eb3pSD.js} +1 -1
  92. package/dist/assets/remoteEntry-DkN3alIt.js +1 -0
  93. package/dist/assets/{ruler-Dm7ltXLY.js → ruler-556BAwlH.js} +1 -1
  94. package/dist/assets/{scissors-CscqL8Nh.js → scissors-D9URbBjJ.js} +1 -1
  95. package/dist/assets/{search-x-C4gWSmgx.js → search-x-kqp6hLO3.js} +1 -1
  96. package/dist/assets/{send-J4jIQUsN.js → send-CrZfmqZz.js} +1 -1
  97. package/dist/assets/{settings-2-BeW9uEQI.js → settings-2-BQNfk984.js} +1 -1
  98. package/dist/assets/{shapes-CKU3AF4Y.js → shapes-CSV4bLCs.js} +1 -1
  99. package/dist/assets/{sigma-CTKfYM4-.js → sigma-CHZCxy6u.js} +1 -1
  100. package/dist/assets/{speaker-Ck8srje1.js → speaker-B9gW5YmZ.js} +1 -1
  101. package/dist/assets/src-Ckl8V7Th.js +100 -0
  102. package/dist/assets/{sso-popup-n62X0G6g.js → sso-popup-DOZiM8kh.js} +1 -1
  103. package/dist/assets/{step-inspector-model-RAXDboWD.js → step-inspector-model-CenBI74c.js} +1 -1
  104. package/dist/assets/{table-2-aZySB4V2.js → table-2-DYJX8UpF.js} +1 -1
  105. package/dist/assets/{timer-reset-cWJEUvVi.js → timer-reset-Ff2gZGPp.js} +1 -1
  106. package/dist/assets/{tv-B5H99r1h.js → tv-DnxE4yEb.js} +1 -1
  107. package/dist/assets/{unlink-BdyIoPhB.js → unlink-CyyRT6oM.js} +1 -1
  108. package/dist/assets/{usb-BdbpQ7nA.js → usb-PkJOLOft.js} +1 -1
  109. package/dist/assets/{use-device-bound-caps-DoqwAZY7.js → use-device-bound-caps-D43Nr5S2.js} +1 -1
  110. package/dist/assets/{use-scenes-feed-CZ2-F4pX.js → use-scenes-feed-y2Z5EHD7.js} +1 -1
  111. package/dist/assets/{use-stationary-objects-DGtrBOe7.js → use-stationary-objects-C3cP9Fx7.js} +1 -1
  112. package/dist/assets/{useAdminDeviceRemoval-kKuk-Q3e.js → useAdminDeviceRemoval-D0BCW8rS.js} +1 -1
  113. package/dist/assets/useEventInvalidation-C9OvDYbX.js +1 -0
  114. package/dist/assets/{useNodeUrlSelection-Dj7g-m5p.js → useNodeUrlSelection-Dh0FD4-f.js} +1 -1
  115. package/dist/assets/user-round-Dx791Sjg.js +1 -0
  116. package/dist/assets/{user-x-DSMsu42n.js → user-x-Dr8HaNhq.js} +1 -1
  117. package/dist/assets/{variable-CmpJWWUH.js → variable-CMB1YQKA.js} +1 -1
  118. package/dist/assets/{video-D4xSLzZ9.js → video-CqjSiaxD.js} +1 -1
  119. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-C-xMhgE3.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CAHw7KkE.js} +2 -2
  120. package/dist/index.html +11 -11
  121. package/dist/server/addon.js +172 -48
  122. package/package.json +2 -2
  123. package/dist/assets/Build-Ds722tnb.js +0 -39
  124. package/dist/assets/CompositionBlockEditor-BbYo0Bux.js +0 -2
  125. package/dist/assets/DeviceDetail-B3RYtusL.js +0 -2
  126. package/dist/assets/Integrations-DOCNqIar.js +0 -1
  127. package/dist/assets/Notifications-DM1II39L.js +0 -1
  128. package/dist/assets/Templates-BEjJmEOH.js +0 -1
  129. package/dist/assets/circle-slash-ay8YxPUj.js +0 -1
  130. package/dist/assets/client-BvmEgDNh.js +0 -809
  131. package/dist/assets/crop-BdvIrRYF.js +0 -1
  132. package/dist/assets/device-picker-model-Bjv-RXWx.js +0 -1
  133. package/dist/assets/dist-CHzqN6_y.js +0 -809
  134. package/dist/assets/i18n-CI_T7hgw.js +0 -1
  135. package/dist/assets/index-DkUsDe0n.css +0 -2
  136. package/dist/assets/mount-Bjv-RXWx.js +0 -1
  137. package/dist/assets/remoteEntry-DaudLd-K.js +0 -1
  138. package/dist/assets/src-B-AT5yJl.js +0 -100
  139. package/dist/assets/useEventInvalidation-Bjv-RXWx.js +0 -1
  140. package/dist/assets/user-round-D_ydbSej.js +0 -1
@@ -803,7 +803,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
803
803
  return EventCategory;
804
804
  }({});
805
805
  //#endregion
806
- //#region ../types/dist/device-type-DxCT0krO.mjs
806
+ //#region ../types/dist/device-type-CbDhVwFP.mjs
807
807
  /**
808
808
  import { errMsg } from '@camstack/types'
809
809
  * Extract a human-readable message from an unknown error value.
@@ -972,6 +972,13 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
972
972
  * (`featuresOfBoundCaps`). Gates the quick-run control in the viewer.
973
973
  */
974
974
  DeviceFeature["TimedRun"] = "timed-run";
975
+ /**
976
+ * Device binds a plain `switch` cap. Derived from the bindings
977
+ * (`featuresOfBoundCaps`) for a composed device, whose switch is bound by the
978
+ * composition and not by a driver: an appliance (a heater behind a smart
979
+ * plug) has no control of its own, so a surface reads this as its on/off.
980
+ */
981
+ DeviceFeature["Switch"] = "switch";
975
982
  /** Light supports rgb-triplet color via `color` cap. */
976
983
  DeviceFeature["LightColorRgb"] = "light-color-rgb";
977
984
  /** Light supports HSV color via `color` cap. */
@@ -5873,7 +5880,7 @@ var ZodIssueCode = {
5873
5880
  var ZodFirstPartyTypeKind;
5874
5881
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5875
5882
  //#endregion
5876
- //#region ../types/dist/sleep-t7BftoJG.mjs
5883
+ //#region ../types/dist/sleep-CqvzKIq2.mjs
5877
5884
  /**
5878
5885
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5879
5886
  * window to float samples (D455).
@@ -16300,7 +16307,7 @@ object({
16300
16307
  params: record(string(), union([string(), number()])).optional()
16301
16308
  });
16302
16309
  //#endregion
16303
- //#region ../types/dist/composition-Bx0JvKUU.mjs
16310
+ //#region ../types/dist/composition-CXCX78IR.mjs
16304
16311
  /**
16305
16312
  * The ffmpeg build every CamStack node downloads, per platform and arch.
16306
16313
  *
@@ -47840,6 +47847,90 @@ DeviceType.Control, method(object({
47840
47847
  kind: "mutation",
47841
47848
  auth: "protected"
47842
47849
  });
47850
+ var IrCodecError = class extends Error {
47851
+ code;
47852
+ constructor(code, message) {
47853
+ super(message);
47854
+ this.name = "IrCodecError";
47855
+ this.code = code;
47856
+ }
47857
+ };
47858
+ /**
47859
+ * A pulse train in signed microseconds: mark (+) first, then space (-), strictly
47860
+ * alternating, no zeros, 2..1024 entries.
47861
+ */
47862
+ var IrTimingsSchema = array(number().int()).min(2).max(1024).superRefine((timings, ctx) => {
47863
+ timings.forEach((value, index) => {
47864
+ const expectMark = index % 2 === 0;
47865
+ if (value === 0 || value > 0 !== expectMark) ctx.addIssue({
47866
+ code: "custom",
47867
+ message: `timing ${index} must be a non-zero ${expectMark ? "mark (positive)" : "space (negative)"}`,
47868
+ path: [index]
47869
+ });
47870
+ });
47871
+ });
47872
+ /** Per-command transmit options. Every key is optional; a transmitter applies what it can. */
47873
+ var TransmitSettingsSchema = object({
47874
+ carrierHz: number().int().positive().optional(),
47875
+ dutyCyclePercent: number().int().min(1).max(100).optional(),
47876
+ repeat: number().int().min(0).max(20).optional(),
47877
+ repeatDelayMs: number().int().min(0).optional()
47878
+ });
47879
+ /** One Pronto frequency-word unit, in microseconds, per unit of the word. */
47880
+ var PRONTO_CLOCK_US = .241246;
47881
+ var LEARNED_FORM = 0;
47882
+ /**
47883
+ * Decode a learned (0000 form) Pronto hex string. The intro burst is followed by
47884
+ * the repeat burst once; a different form is refused with `pronto-unsupported-form`.
47885
+ */
47886
+ function decodePronto(code) {
47887
+ const words = code.trim().split(/\s+/).filter((w) => w.length > 0);
47888
+ if (words.length < 4) throw new IrCodecError("pronto-malformed", `Pronto code needs at least 4 words, got ${words.length}`);
47889
+ const values = words.map((w) => /^[0-9a-fA-F]{1,4}$/.test(w) ? parseInt(w, 16) : NaN);
47890
+ if (values.some((v) => Number.isNaN(v))) throw new IrCodecError("pronto-malformed", "Pronto code must be 4-digit hexadecimal words");
47891
+ const [form, freqWord, introCount, repeatCount] = values;
47892
+ if (form === void 0 || freqWord === void 0 || introCount === void 0 || repeatCount === void 0) throw new IrCodecError("pronto-malformed", "Pronto header incomplete");
47893
+ if (form !== LEARNED_FORM) throw new IrCodecError("pronto-unsupported-form", `Pronto form ${words[0] ?? ""} is not supported, only the learned 0000 form`);
47894
+ if (freqWord === 0) throw new IrCodecError("pronto-malformed", "Pronto frequency word is zero");
47895
+ const pairs = introCount + repeatCount;
47896
+ if (pairs === 0 || values.length !== 4 + pairs * 2) throw new IrCodecError("pronto-malformed", `Pronto declares ${pairs} burst pairs but carries ${(values.length - 4) / 2} word pairs`);
47897
+ const unitUs = freqWord * PRONTO_CLOCK_US;
47898
+ const timings = values.slice(4).map((count, index) => {
47899
+ const us = Math.max(1, Math.round(count * unitUs));
47900
+ return index % 2 === 0 ? us : -us;
47901
+ });
47902
+ const checked = IrTimingsSchema.safeParse(timings);
47903
+ if (!checked.success) throw new IrCodecError("invalid-timings", `Pronto decoded to invalid timings: ${checked.error.message}`);
47904
+ return {
47905
+ timings: checked.data,
47906
+ carrierHz: Math.round(1e6 / unitUs)
47907
+ };
47908
+ }
47909
+ /** What a remote command stores: a raw pulse train, or a learned Pronto code. */
47910
+ var IrPayloadSchema = discriminatedUnion("kind", [object({
47911
+ kind: literal("raw"),
47912
+ timings: array(number().int()),
47913
+ settings: TransmitSettingsSchema.optional()
47914
+ }), object({
47915
+ kind: literal("pronto"),
47916
+ code: string()
47917
+ })]);
47918
+ /** Resolve a payload to what `ir-transmitter.send` takes. Throws `IrCodecError`. */
47919
+ function toTimings(payload) {
47920
+ if (payload.kind === "pronto") {
47921
+ const decoded = decodePronto(payload.code);
47922
+ return {
47923
+ timings: decoded.timings,
47924
+ settings: { carrierHz: decoded.carrierHz }
47925
+ };
47926
+ }
47927
+ const checked = IrTimingsSchema.safeParse(payload.timings);
47928
+ if (!checked.success) throw new IrCodecError("invalid-timings", checked.error.message);
47929
+ return {
47930
+ timings: checked.data,
47931
+ settings: payload.settings ?? {}
47932
+ };
47933
+ }
47843
47934
  /**
47844
47935
  * The role vocabulary of a remote (D963): what a button MEANS, independent of
47845
47936
  * how it is wired. A layout template places buttons by role; a device binds a
@@ -47927,11 +48018,18 @@ var RemoteRoleSchema = string().refine(isRemoteRole, { message: "a role is one o
47927
48018
  * a voice command or `playMedia` names.
47928
48019
  * - `sequence`: a name and explicit steps — bound roles pressed in order
47929
48020
  * (an input key, a menu macro such as `source, down, down, ok`).
48021
+ * - `ir`: a name and one infrared code of its own (raw timings or a Pronto
48022
+ * string), sent through a named transmitter (planning#464). It presses no
48023
+ * button: a source the remote's layout has no key for.
47930
48024
  *
47931
48025
  * The name and the number resolve to the SAME declared source. A number no
47932
48026
  * `digits` source declares is not a channel: it is refused, never guessed.
47933
48027
  */
47934
- var REMOTE_SOURCE_KINDS = ["digits", "sequence"];
48028
+ var REMOTE_SOURCE_KINDS = [
48029
+ "digits",
48030
+ "sequence",
48031
+ "ir"
48032
+ ];
47935
48033
  _enum(REMOTE_SOURCE_KINDS);
47936
48034
  var REMOTE_SOURCE_ID_RE = /^[a-z0-9][a-z0-9_-]{0,47}$/;
47937
48035
  var CHANNEL_NUMBER_RE = new RegExp(`^[0-9]{1,6}$`);
@@ -47941,19 +48039,50 @@ var sourceBase = {
47941
48039
  /** What the operator calls it, and what a voice command or a picker names. */
47942
48040
  name: string().trim().min(1).max(60)
47943
48041
  };
47944
- var RemoteSourceSchema = discriminatedUnion("kind", [object({
47945
- ...sourceBase,
47946
- kind: literal("digits"),
47947
- number: string().regex(CHANNEL_NUMBER_RE, { message: "up to 6 digits" })
47948
- }), object({
47949
- ...sourceBase,
47950
- kind: literal("sequence"),
47951
- steps: array(RemoteRoleSchema).min(1).max(16)
47952
- })]);
48042
+ var RemoteSourceSchema = discriminatedUnion("kind", [
48043
+ object({
48044
+ ...sourceBase,
48045
+ kind: literal("digits"),
48046
+ number: string().regex(CHANNEL_NUMBER_RE, { message: "up to 6 digits" })
48047
+ }),
48048
+ object({
48049
+ ...sourceBase,
48050
+ kind: literal("sequence"),
48051
+ steps: array(RemoteRoleSchema).min(1).max(16)
48052
+ }),
48053
+ object({
48054
+ ...sourceBase,
48055
+ kind: literal("ir"),
48056
+ /** The `ir-transmitter` device the code is sent through. */
48057
+ transmitterId: number().int().nonnegative(),
48058
+ /** The code itself; whether a transmitter could send it is `irSourceProblem`. */
48059
+ payload: IrPayloadSchema
48060
+ })
48061
+ ]);
47953
48062
  var REMOTE_STEP_DELAY_MAX_MS = 3e3;
47954
- /** The roles a source presses, in order. A `digits` number is its digit roles. */
48063
+ /**
48064
+ * The roles a source presses, in order. A `digits` number is its digit roles;
48065
+ * an `ir` source presses none — it carries its own code.
48066
+ */
47955
48067
  function remoteSourceSteps(source) {
47956
- return source.kind === "sequence" ? source.steps : Array.from(source.number, (digit) => `digit_${digit}`);
48068
+ switch (source.kind) {
48069
+ case "sequence": return source.steps;
48070
+ case "digits": return Array.from(source.number, (digit) => `digit_${digit}`);
48071
+ case "ir": return [];
48072
+ }
48073
+ }
48074
+ /**
48075
+ * Why an `ir` source's code could not be sent (the codec's own words), or null
48076
+ * when it resolves to a pulse train. The schema refuses on it; the editor shows it.
48077
+ */
48078
+ function irSourceProblem(source) {
48079
+ try {
48080
+ toTimings(source.payload);
48081
+ return null;
48082
+ } catch (err) {
48083
+ if (err instanceof IrCodecError) return err.message;
48084
+ throw err;
48085
+ }
47957
48086
  }
47958
48087
  /**
47959
48088
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
@@ -53470,8 +53599,9 @@ DeviceType.Thermostat;
53470
53599
  *
53471
53600
  * "Heat for 30 minutes", "run the fountain pump for 2 minutes": the device has
53472
53601
  * no timer of its own, so the hub keeps one. `runFor` turns the device on and
53473
- * records a deadline; `cancel` (or the device being switched off by hand)
53474
- * forgets it; at the deadline the hub issues the off once.
53602
+ * records a deadline; `cancel` switches the device off and forgets the deadline,
53603
+ * and the device being switched off by hand just forgets it; at the deadline
53604
+ * the hub issues the off once.
53475
53605
  *
53476
53606
  * The deadline is DURABLE: it is a row in the records store, so a hub restart
53477
53607
  * neither loses a pending off nor leaves the device running past its time. At
@@ -54614,27 +54744,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), object({
54614
54744
  deviceId: number(),
54615
54745
  status: IntercomStatusSchema
54616
54746
  });
54617
- /**
54618
- * A pulse train in signed microseconds: mark (+) first, then space (-), strictly
54619
- * alternating, no zeros, 2..1024 entries.
54620
- */
54621
- var IrTimingsSchema = array(number().int()).min(2).max(1024).superRefine((timings, ctx) => {
54622
- timings.forEach((value, index) => {
54623
- const expectMark = index % 2 === 0;
54624
- if (value === 0 || value > 0 !== expectMark) ctx.addIssue({
54625
- code: "custom",
54626
- message: `timing ${index} must be a non-zero ${expectMark ? "mark (positive)" : "space (negative)"}`,
54627
- path: [index]
54628
- });
54629
- });
54630
- });
54631
- /** Per-command transmit options. Every key is optional; a transmitter applies what it can. */
54632
- var TransmitSettingsSchema = object({
54633
- carrierHz: number().int().positive().optional(),
54634
- dutyCyclePercent: number().int().min(1).max(100).optional(),
54635
- repeat: number().int().min(0).max(20).optional(),
54636
- repeatDelayMs: number().int().min(0).optional()
54637
- });
54638
54747
  /** The setting keys a transmitter may declare as settable (`getInfo.settable`). */
54639
54748
  var TransmitSettingKeySchema = _enum([
54640
54749
  "carrierHz",
@@ -70957,6 +71066,10 @@ function refineSources(config, ctx) {
70957
71066
  if (numbers.has(source.number)) fail(`channel ${source.number} is declared twice`, "number");
70958
71067
  numbers.add(source.number);
70959
71068
  }
71069
+ if (source.kind === "ir") {
71070
+ const problem = irSourceProblem(source);
71071
+ if (problem !== null) fail(problem, "payload");
71072
+ }
70960
71073
  for (const role of remoteSourceSteps(source)) if (isRemoteWidgetRole(role)) fail(`"${source.name}" presses ${role}, a layout widget, not a command`, "steps");
70961
71074
  else if (config.bindings[role] === void 0) fail(`"${source.name}" presses ${role}, which is not bound`, "steps");
70962
71075
  });
@@ -70978,6 +71091,14 @@ function refineSources(config, ctx) {
70978
71091
  }
70979
71092
  });
70980
71093
  }
71094
+ /** A stored source that was left out of a read, and why (the UI shows it). */
71095
+ var RemoteRefusedSourceSchema = object({
71096
+ /** Position in the stored list. */
71097
+ index: number().int().nonnegative(),
71098
+ id: string().nullable(),
71099
+ name: string().nullable(),
71100
+ reason: string()
71101
+ });
70981
71102
  var RemoteConfigSchema = object({
70982
71103
  layoutTemplateId: string().min(1).nullable(),
70983
71104
  /**
@@ -70995,7 +71116,13 @@ var RemoteConfigSchema = object({
70995
71116
  sources: array(RemoteSourceSchema).max(200).default([]),
70996
71117
  /** The pause between two steps of a source: the television's receiver, not a repeat. */
70997
71118
  stepDelayMs: number().int().min(100).max(REMOTE_STEP_DELAY_MAX_MS).default(500),
70998
- power: object({ mode: RemotePowerModeSchema })
71119
+ power: object({ mode: RemotePowerModeSchema }),
71120
+ /**
71121
+ * READ-ONLY: sources a stored configuration carries that no longer parse,
71122
+ * left out of `sources` with the reason (`readStoredRemoteConfig`). Never
71123
+ * stored: the store strips it on write.
71124
+ */
71125
+ refusedSources: array(RemoteRefusedSourceSchema).optional()
70999
71126
  }).superRefine((config, ctx) => {
71000
71127
  const roles = Object.keys(config.bindings);
71001
71128
  if (roles.length > 200) ctx.addIssue({
@@ -71036,6 +71163,11 @@ var RemoteConfigSchema = object({
71036
71163
  }
71037
71164
  refineSources(config, ctx);
71038
71165
  });
71166
+ looseObject({ sources: array(unknown()) });
71167
+ object({
71168
+ id: string(),
71169
+ name: string()
71170
+ }).partial();
71039
71171
  object({
71040
71172
  power: object({
71041
71173
  state: _enum(["on", "off"]),
@@ -76110,14 +76242,6 @@ btn("power", 0, 0, {
76110
76242
  3,
76111
76243
  4
76112
76244
  ].map((n) => btn(`app${n}`, 0, n - 1, { role: `custom:app_slot_${n}` })), btn("back", 0, 0, { role: "back" }), btn("home", 0, 1, { role: "home" }), btn("menu", 0, 2, { role: "menu" });
76113
- discriminatedUnion("kind", [object({
76114
- kind: literal("raw"),
76115
- timings: array(number().int()),
76116
- settings: TransmitSettingsSchema.optional()
76117
- }), object({
76118
- kind: literal("pronto"),
76119
- code: string()
76120
- })]);
76121
76245
  /**
76122
76246
  * Propose a running threshold from a device's own power history (planning#405).
76123
76247
  *
@@ -91212,7 +91336,7 @@ var AdminUIAddon = class extends BaseAddon {
91212
91336
  capability: adminUiCapability,
91213
91337
  provider: {
91214
91338
  getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
91215
- getVersion: async () => ({ version: "1.2.620" })
91339
+ getVersion: async () => ({ version: "1.2.621" })
91216
91340
  }
91217
91341
  }];
91218
91342
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-admin-ui",
3
- "version": "1.2.620",
3
+ "version": "1.2.621",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Admin UI — Vite frontend build and server-side addon",
@@ -50,7 +50,7 @@
50
50
  }
51
51
  ],
52
52
  "requires": {
53
- "server": ">=1.2.813"
53
+ "server": ">=1.2.814"
54
54
  }
55
55
  },
56
56
  "scripts": {