@camstack/addon-admin-ui 1.2.520 → 1.2.521

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 (128) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/assets/{AddonAssetIcon-Do54wTZ7.js → AddonAssetIcon-DIfNr6QF.js} +1 -1
  3. package/dist/assets/{Addons-B1OJ_ktZ.js → Addons-D8e5UEhk.js} +1 -1
  4. package/dist/assets/{AdminPage-BmoKOToB.js → AdminPage-DPm4iuSn.js} +1 -1
  5. package/dist/assets/{AdminSectionedPage-O0ffiJOS.js → AdminSectionedPage-B1FFlzAp.js} +1 -1
  6. package/dist/assets/AiProfiles-_jjOpe29.js +3 -0
  7. package/dist/assets/{BrokerEditorDialog-CcvbGDox.js → BrokerEditorDialog-CMa1f8kC.js} +1 -1
  8. package/dist/assets/Build-SkecHiHh.js +40 -0
  9. package/dist/assets/{Calendars-DeDcWHS-.js → Calendars-BncAsHLV.js} +1 -1
  10. package/dist/assets/{Cluster-CZB476Cv.js → Cluster-BtPubX4s.js} +1 -1
  11. package/dist/assets/{ComposedDeviceEditDialog-DiO4bitz.js → ComposedDeviceEditDialog-BHCTUKU-.js} +1 -1
  12. package/dist/assets/CompositionBlockEditor-ImrFV2Gk.js +2 -0
  13. package/dist/assets/{CompositionEditorPage-caLz4h3I.js → CompositionEditorPage-D4Sj47wU.js} +1 -1
  14. package/dist/assets/{Data-Cpi9Lb2k.js → Data-DGUMhXre.js} +1 -1
  15. package/dist/assets/{DeviceDetail-SAboiNCE.js → DeviceDetail-CwB8tpfD.js} +2 -2
  16. package/dist/assets/{DeviceDoActionFields-C5Oeqy94.js → DeviceDoActionFields-B08_5fN_.js} +1 -1
  17. package/dist/assets/{Devices-DArtILxr.js → Devices-B-o-SYft.js} +1 -1
  18. package/dist/assets/{EmbedPlayerPage-B-NlJHwD.js → EmbedPlayerPage-BCAMYXmH.js} +1 -1
  19. package/dist/assets/{History-B_xZFQt7.js → History-CkZOzm2S.js} +1 -1
  20. package/dist/assets/{Identity-Cawa92L2.js → Identity-D-mKJp3i.js} +1 -1
  21. package/dist/assets/{IntegrationDetail-D6gLTapX.js → IntegrationDetail-Ba7jt4aH.js} +1 -1
  22. package/dist/assets/{IntegrationHub-vZ23z1RD.js → IntegrationHub-D3NNWcI3.js} +1 -1
  23. package/dist/assets/{Integrations-BLhvc6uB.js → Integrations-DfCvoh1h.js} +1 -1
  24. package/dist/assets/{Integrations-Bt-5ZNBV.js → Integrations-DzVbMY51.js} +1 -1
  25. package/dist/assets/{Library-K2waPmh-.js → Library-CIdnKcUl.js} +1 -1
  26. package/dist/assets/{Locations-GaQ-Vlg2.js → Locations-BMUiqhX7.js} +1 -1
  27. package/dist/assets/{Logs-8qT_HE5j.js → Logs-Cr5Ev4Yn.js} +1 -1
  28. package/dist/assets/{MaskShapeCanvas-B599Qff8.js → MaskShapeCanvas-Bv7J_UVF.js} +1 -1
  29. package/dist/assets/{MotionZonesSettings-kGwQFrli.js → MotionZonesSettings-BZxXQ1bq.js} +1 -1
  30. package/dist/assets/{MyAccess-A5l6WoMd.js → MyAccess-egWpZOj7.js} +1 -1
  31. package/dist/assets/{Network-B_HZ4sjm.js → Network-DQwRnVG_.js} +1 -1
  32. package/dist/assets/{NodeAddonsSettingsPanel-Ccww7SgZ.js → NodeAddonsSettingsPanel-B9vvxBEQ.js} +1 -1
  33. package/dist/assets/Notifications-B7GkPWCE.js +1 -0
  34. package/dist/assets/{Pipeline-7I-tbGWA.js → Pipeline-L7YohUe9.js} +1 -1
  35. package/dist/assets/{PrivacyMaskSettings-D3OKCG5L.js → PrivacyMaskSettings-Bic1_gT9.js} +1 -1
  36. package/dist/assets/{Recordings-Dqxrdll7.js → Recordings-CNhL7oIf.js} +1 -1
  37. package/dist/assets/{RemoteGrid-BC7RcI7j.js → RemoteGrid-Ttvy6q8V.js} +1 -1
  38. package/dist/assets/{ScanNetworkModal-De1BMqEu.js → ScanNetworkModal-B6vWwCe8.js} +1 -1
  39. package/dist/assets/{SceneMonitorEditor-BWwBdarY.js → SceneMonitorEditor-Bd7aOOIg.js} +1 -1
  40. package/dist/assets/{SessionsList-DK9sBB3z.js → SessionsList--VxRl_LS.js} +1 -1
  41. package/dist/assets/{Showroom-bS5UisOb.js → Showroom-UkIbrPnX.js} +1 -1
  42. package/dist/assets/{System-CoCWu43h.js → System-QDZtQXm_.js} +1 -1
  43. package/dist/assets/{Templates-DIMuzzu_.js → Templates-C43xppeu.js} +1 -1
  44. package/dist/assets/{Terminal-CaIDL65f.js → Terminal-5v2dzxpg.js} +1 -1
  45. package/dist/assets/{Viewer-BzxcMFB5.js → Viewer-B92j2D9F.js} +1 -1
  46. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DvIAWVsR.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DugEb7xj.js} +1 -1
  47. package/dist/assets/{addon-icons-context-D-3KCr36.js → addon-icons-context-CDyNgrka.js} +1 -1
  48. package/dist/assets/{archive-sIPC64K9.js → archive-BKuD6-O9.js} +1 -1
  49. package/dist/assets/{assignment-candidates-C_UoiwJK.js → assignment-candidates-CvlbrbgK.js} +1 -1
  50. package/dist/assets/{authed-media-BE3neYoh.js → authed-media-DxWmG5JA.js} +1 -1
  51. package/dist/assets/{bell-off-DBYFNI8u.js → bell-off-7L6K5pJk.js} +1 -1
  52. package/dist/assets/{board-model-CeWFKx9n.js → board-model-CZOb3LmO.js} +1 -1
  53. package/dist/assets/{boxes-5j10egHw.js → boxes-BYgmIZEw.js} +1 -1
  54. package/dist/assets/circle-slash-DSfcxndq.js +1 -0
  55. package/dist/assets/client-Clemlz5W.js +674 -0
  56. package/dist/assets/{cloud-upload-CUkN17bl.js → cloud-upload-C40Dp7qu.js} +1 -1
  57. package/dist/assets/crop-CnSchINM.js +1 -0
  58. package/dist/assets/{device-integration-icon-DUQvGDM8.js → device-integration-icon-CLK4k1ae.js} +1 -1
  59. package/dist/assets/device-picker-model-ojy8FewR.js +1 -0
  60. package/dist/assets/dist-B-uSoSKi.js +674 -0
  61. package/dist/assets/{dist-dCyhYCji.js → dist-CJ9iy42m.js} +1 -1
  62. package/dist/assets/{file-up-DF9281zn.js → file-up-DhY5nof7.js} +1 -1
  63. package/dist/assets/{format-Ctn7h3o7.js → format-CvKyF2QM.js} +1 -1
  64. package/dist/assets/{hard-drive-download-YoDQjZ6G.js → hard-drive-download-gFidUJGC.js} +1 -1
  65. package/dist/assets/{hostInit-BqZN7ExA.js → hostInit-CDWllEW4.js} +1 -1
  66. package/dist/assets/i18n-C1QctlOB.js +1 -0
  67. package/dist/assets/{icons-CUtj9rug.js → icons-DrXFX-WI.js} +1 -1
  68. package/dist/assets/{index-s2JBApLj.js → index-D3Yx0Smp.js} +3 -3
  69. package/dist/assets/{key-BpA5yjS5.js → key-CKmpBvKe.js} +1 -1
  70. package/dist/assets/{key-round-BbwlZYgP.js → key-round-DMWVlifP.js} +1 -1
  71. package/dist/assets/{layers-Bxrx5612.js → layers-Bo1tC_4O.js} +1 -1
  72. package/dist/assets/{linked-devices-model-4X2JNgtv.js → linked-devices-model-D9TIS2pY.js} +1 -1
  73. package/dist/assets/{list-ordered-BQZRweJv.js → list-ordered-BAebxGoz.js} +1 -1
  74. package/dist/assets/{location-owned-usage-Dwc8i-A6.js → location-owned-usage-B3nr7gWQ.js} +1 -1
  75. package/dist/assets/{log-in-BFtLVkKt.js → log-in-CUgGOn9k.js} +1 -1
  76. package/dist/assets/{memory-stick-65f0Nh--.js → memory-stick-CsWM7ppk.js} +1 -1
  77. package/dist/assets/{message-square-plus-Cz97-8Ea.js → message-square-plus-C-LDprie.js} +1 -1
  78. package/dist/assets/{mf-entry-bootstrap-0-bfee715d.js → mf-entry-bootstrap-0-e1103afa.js} +2 -2
  79. package/dist/assets/{mic-off-C90AfhxH.js → mic-off-BmNdC4XW.js} +1 -1
  80. package/dist/assets/{monitor-off-Kj0KouMn.js → monitor-off-DhTBAYUp.js} +1 -1
  81. package/dist/assets/{monitor-smartphone-dJjQFha0.js → monitor-smartphone-6kCGO3r1.js} +1 -1
  82. package/dist/assets/mount-ojy8FewR.js +1 -0
  83. package/dist/assets/{player-overlays-Cl9fdVyE.js → player-overlays-C_WpL6a6.js} +1 -1
  84. package/dist/assets/{recycle-B_n3HNql.js → recycle-Di1EQ0Qy.js} +1 -1
  85. package/dist/assets/remoteEntry-B3Z2iNH7.js +1 -0
  86. package/dist/assets/{ruler-DFksgfFc.js → ruler-cSAzAdF0.js} +1 -1
  87. package/dist/assets/{scan-eye-Dcs85qj4.js → scan-eye-6vO-dwZC.js} +1 -1
  88. package/dist/assets/{scissors-DpVQCMjY.js → scissors-MIPuZwTY.js} +1 -1
  89. package/dist/assets/{search-x-BUboqisx.js → search-x-Jgy5Olce.js} +1 -1
  90. package/dist/assets/{send-i8_gi4Wv.js → send-CnArxdfm.js} +1 -1
  91. package/dist/assets/{settings-2-BuOeZPiK.js → settings-2-Cc7_8hT4.js} +1 -1
  92. package/dist/assets/{shapes-DGstG7DR.js → shapes-B6yDXStU.js} +1 -1
  93. package/dist/assets/{sigma-B0KIxXLC.js → sigma-q5eaqxJ5.js} +1 -1
  94. package/dist/assets/{speaker-C7Ctczma.js → speaker-CbeO5md6.js} +1 -1
  95. package/dist/assets/src-BuD4BDe3.js +67 -0
  96. package/dist/assets/{step-inspector-model-Du5MgFTI.js → step-inspector-model-Dm1vwliM.js} +1 -1
  97. package/dist/assets/{table-2-Bi2N6ehZ.js → table-2-Dl4UBoV9.js} +1 -1
  98. package/dist/assets/{timer-reset-C-DbgYsd.js → timer-reset-Bp1VJ4jU.js} +1 -1
  99. package/dist/assets/{unlink-DOrqvhrS.js → unlink-DoHrrlyB.js} +1 -1
  100. package/dist/assets/{usb-D21IcPqp.js → usb-uGk5FuUX.js} +1 -1
  101. package/dist/assets/{use-device-bound-caps-DUbLU0h-.js → use-device-bound-caps-Di0CbhM4.js} +1 -1
  102. package/dist/assets/{use-scenes-feed-Cc_FfCf0.js → use-scenes-feed-hWCFwCtN.js} +1 -1
  103. package/dist/assets/{use-stationary-objects-C9cIQpEH.js → use-stationary-objects-DJ9JfRWk.js} +1 -1
  104. package/dist/assets/useEventInvalidation-ojy8FewR.js +1 -0
  105. package/dist/assets/{useNodeUrlSelection-B-iNHDOR.js → useNodeUrlSelection-CW3xhZq4.js} +1 -1
  106. package/dist/assets/user-round-BdixCoAv.js +1 -0
  107. package/dist/assets/{user-x-dk19_EsK.js → user-x-KqDnAcpq.js} +1 -1
  108. package/dist/assets/{variable-jCYthbGt.js → variable-vSgKlDpd.js} +1 -1
  109. package/dist/assets/{video-BbvU47vV.js → video-DgFhEP51.js} +1 -1
  110. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DOT_MvML.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CmMSAYDD.js} +2 -2
  111. package/dist/index.html +9 -9
  112. package/dist/server/addon.js +519 -62
  113. package/package.json +1 -1
  114. package/dist/assets/AiProfiles-koWE1ekm.js +0 -3
  115. package/dist/assets/Build-DkW1vw1Z.js +0 -40
  116. package/dist/assets/CompositionBlockEditor-BQbgk5OR.js +0 -2
  117. package/dist/assets/Notifications-DxoAS5SX.js +0 -1
  118. package/dist/assets/circle-slash-VFJ46qWN.js +0 -1
  119. package/dist/assets/client-BmfSvq-t.js +0 -674
  120. package/dist/assets/crop-DwwjG8X9.js +0 -1
  121. package/dist/assets/device-picker-model-C2rxDYB3.js +0 -1
  122. package/dist/assets/dist-CGa31Bpn.js +0 -674
  123. package/dist/assets/i18n-CWf2gqjI.js +0 -1
  124. package/dist/assets/mount-C2rxDYB3.js +0 -1
  125. package/dist/assets/remoteEntry-Bgu2wj6M.js +0 -1
  126. package/dist/assets/src-Cjqv1L1_.js +0 -67
  127. package/dist/assets/useEventInvalidation-C2rxDYB3.js +0 -1
  128. package/dist/assets/user-round-CCHLAyrG.js +0 -1
@@ -15455,6 +15455,478 @@ object({
15455
15455
  path: ["expr"]
15456
15456
  });
15457
15457
  });
15458
+ /**
15459
+ * Identity envelope for a device's upstream-system metadata.
15460
+ *
15461
+ * Two jobs:
15462
+ *
15463
+ * 1. **Dispatch key.** `id` is the natural identifier the SOURCE system
15464
+ * uses to address this device (HA `entity_id`, Reolink MAC, ONVIF
15465
+ * WS-Discovery endpoint UUID, …). Provider code keeps a
15466
+ * `Map<sourceInfo.id, IDevice>` to route inbound push events in O(1)
15467
+ * without round-tripping through `stableId` / `id` mappings.
15468
+ *
15469
+ * 2. **Stability bridge.** `uniqueId` is the *immutable* upstream id when
15470
+ * one exists (HA `entity.unique_id`, Reolink MAC again — same as `id`
15471
+ * for vendors where MAC is the natural key). For systems where the
15472
+ * live dispatch key can be renamed (HA `entity_id` can be edited),
15473
+ * providers detect renames by matching `uniqueId` and patch `id`
15474
+ * in-place so dispatch keeps working.
15475
+ *
15476
+ * **Display unit and precision are NOT stored here.** They are a read-time
15477
+ * preference (D944). A polymorphic reading stores its `quantity` here once,
15478
+ * at adopt, and a date/time value stores `dateTimeShape` the same way —
15479
+ * neither is repeated on each sample. The `device_class` tag is an
15480
+ * HA-specific input consumed at the discovery boundary (`ha-domain-mapping`)
15481
+ * to derive the CamStack `DeviceRole`; it is never stored after that point.
15482
+ *
15483
+ * The `raw` escape hatch carries provider-specific attributes that don't
15484
+ * fit the structured slots (HA `attributes` whitelist, Reolink `deviceCache`
15485
+ * details, …). Providers control what lands here.
15486
+ */
15487
+ var SourceInfoSchema = object({
15488
+ /** Live dispatch key — mutable when the source system allows rename. */
15489
+ id: string(),
15490
+ /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
15491
+ system: string(),
15492
+ /** Immutable upstream identifier when available (HA `unique_id`, … ).
15493
+ * Used to detect rename when `id` changes. */
15494
+ uniqueId: string().optional(),
15495
+ /** Quantity of a polymorphic reading, written once at adopt (D944). */
15496
+ quantity: ReadingQuantitySchema.optional(),
15497
+ /** Date / time / datetime shape of a string reading, written once at adopt. */
15498
+ dateTimeShape: _enum([
15499
+ "date",
15500
+ "time",
15501
+ "datetime"
15502
+ ]).optional(),
15503
+ /** Provider-specific extras that don't fit the structured slots.
15504
+ * Whitelist what goes here per provider — do NOT dump entire HA
15505
+ * attribute blobs (would explode the meta JSON column). */
15506
+ raw: record(string(), unknown()).optional()
15507
+ });
15508
+ /**
15509
+ * Frozen unit → spec table. `•` in the doc marks each dimension's canonical
15510
+ * unit (`factor: 1, offset: 0`). °F derives from `°C = (°F − 32) × 5/9` ⇒
15511
+ * `factor = 5/9`, `offset = -160/9` (kept as exact expressions, not rounded
15512
+ * decimals). K derives from `°C = K − 273.15`.
15513
+ */
15514
+ var UNIT_TABLE = {
15515
+ "°C": {
15516
+ dimension: "temperature",
15517
+ factor: 1,
15518
+ offset: 0
15519
+ },
15520
+ "°F": {
15521
+ dimension: "temperature",
15522
+ factor: 5 / 9,
15523
+ offset: -160 / 9
15524
+ },
15525
+ K: {
15526
+ dimension: "temperature",
15527
+ factor: 1,
15528
+ offset: -273.15
15529
+ },
15530
+ hPa: {
15531
+ dimension: "pressure",
15532
+ factor: 1,
15533
+ offset: 0
15534
+ },
15535
+ kPa: {
15536
+ dimension: "pressure",
15537
+ factor: 10,
15538
+ offset: 0
15539
+ },
15540
+ Pa: {
15541
+ dimension: "pressure",
15542
+ factor: .01,
15543
+ offset: 0
15544
+ },
15545
+ mbar: {
15546
+ dimension: "pressure",
15547
+ factor: 1,
15548
+ offset: 0
15549
+ },
15550
+ bar: {
15551
+ dimension: "pressure",
15552
+ factor: 1e3,
15553
+ offset: 0
15554
+ },
15555
+ inHg: {
15556
+ dimension: "pressure",
15557
+ factor: 33.8639,
15558
+ offset: 0
15559
+ },
15560
+ mmHg: {
15561
+ dimension: "pressure",
15562
+ factor: 1.33322,
15563
+ offset: 0
15564
+ },
15565
+ psi: {
15566
+ dimension: "pressure",
15567
+ factor: 68.9476,
15568
+ offset: 0
15569
+ },
15570
+ "m/s": {
15571
+ dimension: "speed",
15572
+ factor: 1,
15573
+ offset: 0
15574
+ },
15575
+ "km/h": {
15576
+ dimension: "speed",
15577
+ factor: 1 / 3.6,
15578
+ offset: 0
15579
+ },
15580
+ mph: {
15581
+ dimension: "speed",
15582
+ factor: .44704,
15583
+ offset: 0
15584
+ },
15585
+ kn: {
15586
+ dimension: "speed",
15587
+ factor: .514444,
15588
+ offset: 0
15589
+ },
15590
+ "mm/h": {
15591
+ dimension: "precipitation-rate",
15592
+ factor: 1,
15593
+ offset: 0
15594
+ },
15595
+ "in/h": {
15596
+ dimension: "precipitation-rate",
15597
+ factor: 25.4,
15598
+ offset: 0
15599
+ },
15600
+ m: {
15601
+ dimension: "length",
15602
+ factor: 1,
15603
+ offset: 0
15604
+ },
15605
+ mm: {
15606
+ dimension: "length",
15607
+ factor: .001,
15608
+ offset: 0
15609
+ },
15610
+ cm: {
15611
+ dimension: "length",
15612
+ factor: .01,
15613
+ offset: 0
15614
+ },
15615
+ km: {
15616
+ dimension: "length",
15617
+ factor: 1e3,
15618
+ offset: 0
15619
+ },
15620
+ in: {
15621
+ dimension: "length",
15622
+ factor: .0254,
15623
+ offset: 0
15624
+ },
15625
+ ft: {
15626
+ dimension: "length",
15627
+ factor: .3048,
15628
+ offset: 0
15629
+ },
15630
+ mi: {
15631
+ dimension: "length",
15632
+ factor: 1609.344,
15633
+ offset: 0
15634
+ },
15635
+ "m²": {
15636
+ dimension: "area",
15637
+ factor: 1,
15638
+ offset: 0
15639
+ },
15640
+ lx: {
15641
+ dimension: "illuminance",
15642
+ factor: 1,
15643
+ offset: 0
15644
+ },
15645
+ "W/m²": {
15646
+ dimension: "irradiance",
15647
+ factor: 1,
15648
+ offset: 0
15649
+ },
15650
+ W: {
15651
+ dimension: "power",
15652
+ factor: 1,
15653
+ offset: 0
15654
+ },
15655
+ kW: {
15656
+ dimension: "power",
15657
+ factor: 1e3,
15658
+ offset: 0
15659
+ },
15660
+ VA: {
15661
+ dimension: "apparent-power",
15662
+ factor: 1,
15663
+ offset: 0
15664
+ },
15665
+ Wh: {
15666
+ dimension: "energy",
15667
+ factor: 1,
15668
+ offset: 0
15669
+ },
15670
+ kWh: {
15671
+ dimension: "energy",
15672
+ factor: 1e3,
15673
+ offset: 0
15674
+ },
15675
+ MWh: {
15676
+ dimension: "energy",
15677
+ factor: 1e6,
15678
+ offset: 0
15679
+ },
15680
+ V: {
15681
+ dimension: "voltage",
15682
+ factor: 1,
15683
+ offset: 0
15684
+ },
15685
+ mV: {
15686
+ dimension: "voltage",
15687
+ factor: .001,
15688
+ offset: 0
15689
+ },
15690
+ A: {
15691
+ dimension: "current",
15692
+ factor: 1,
15693
+ offset: 0
15694
+ },
15695
+ mA: {
15696
+ dimension: "current",
15697
+ factor: .001,
15698
+ offset: 0
15699
+ },
15700
+ ppm: {
15701
+ dimension: "concentration-volume",
15702
+ factor: 1,
15703
+ offset: 0
15704
+ },
15705
+ ppb: {
15706
+ dimension: "concentration-volume",
15707
+ factor: .001,
15708
+ offset: 0
15709
+ },
15710
+ "µg/m³": {
15711
+ dimension: "concentration-mass",
15712
+ factor: 1,
15713
+ offset: 0
15714
+ },
15715
+ "mg/m³": {
15716
+ dimension: "concentration-mass",
15717
+ factor: 1e3,
15718
+ offset: 0
15719
+ },
15720
+ kg: {
15721
+ dimension: "mass",
15722
+ factor: 1,
15723
+ offset: 0
15724
+ },
15725
+ g: {
15726
+ dimension: "mass",
15727
+ factor: .001,
15728
+ offset: 0
15729
+ },
15730
+ lb: {
15731
+ dimension: "mass",
15732
+ factor: .453592,
15733
+ offset: 0
15734
+ },
15735
+ oz: {
15736
+ dimension: "mass",
15737
+ factor: .0283495,
15738
+ offset: 0
15739
+ },
15740
+ "%": {
15741
+ dimension: "percentage",
15742
+ factor: 1,
15743
+ offset: 0
15744
+ },
15745
+ L: {
15746
+ dimension: "volume",
15747
+ factor: 1,
15748
+ offset: 0
15749
+ },
15750
+ mL: {
15751
+ dimension: "volume",
15752
+ factor: .001,
15753
+ offset: 0
15754
+ },
15755
+ gal: {
15756
+ dimension: "volume",
15757
+ factor: 3.785411784,
15758
+ offset: 0
15759
+ },
15760
+ s: {
15761
+ dimension: "duration",
15762
+ factor: 1,
15763
+ offset: 0
15764
+ },
15765
+ ms: {
15766
+ dimension: "duration",
15767
+ factor: .001,
15768
+ offset: 0
15769
+ },
15770
+ min: {
15771
+ dimension: "duration",
15772
+ factor: 60,
15773
+ offset: 0
15774
+ },
15775
+ h: {
15776
+ dimension: "duration",
15777
+ factor: 3600,
15778
+ offset: 0
15779
+ },
15780
+ d: {
15781
+ dimension: "duration",
15782
+ factor: 86400,
15783
+ offset: 0
15784
+ },
15785
+ B: {
15786
+ dimension: "information",
15787
+ factor: 1,
15788
+ offset: 0
15789
+ },
15790
+ KiB: {
15791
+ dimension: "information",
15792
+ factor: 1024,
15793
+ offset: 0
15794
+ },
15795
+ MiB: {
15796
+ dimension: "information",
15797
+ factor: 1024 ** 2,
15798
+ offset: 0
15799
+ },
15800
+ GiB: {
15801
+ dimension: "information",
15802
+ factor: 1024 ** 3,
15803
+ offset: 0
15804
+ },
15805
+ TiB: {
15806
+ dimension: "information",
15807
+ factor: 1024 ** 4,
15808
+ offset: 0
15809
+ },
15810
+ kB: {
15811
+ dimension: "information",
15812
+ factor: 1e3,
15813
+ offset: 0
15814
+ },
15815
+ MB: {
15816
+ dimension: "information",
15817
+ factor: 1e6,
15818
+ offset: 0
15819
+ },
15820
+ GB: {
15821
+ dimension: "information",
15822
+ factor: 1e9,
15823
+ offset: 0
15824
+ },
15825
+ "°": {
15826
+ dimension: "angle",
15827
+ factor: 1,
15828
+ offset: 0
15829
+ },
15830
+ dBFS: {
15831
+ dimension: "sound-level",
15832
+ factor: 1,
15833
+ offset: 0
15834
+ },
15835
+ dBm: {
15836
+ dimension: "signal-level",
15837
+ factor: 1,
15838
+ offset: 0
15839
+ },
15840
+ mired: {
15841
+ dimension: "colour-temperature",
15842
+ factor: 1,
15843
+ offset: 0
15844
+ },
15845
+ kbps: {
15846
+ dimension: "bitrate",
15847
+ factor: 1,
15848
+ offset: 0
15849
+ },
15850
+ Mbps: {
15851
+ dimension: "bitrate",
15852
+ factor: 1e3,
15853
+ offset: 0
15854
+ },
15855
+ fps: {
15856
+ dimension: "rate",
15857
+ factor: 1,
15858
+ offset: 0
15859
+ }
15860
+ };
15861
+ /** Resolve a unit's `UnitSpec`, or `undefined` when the spelling is unknown. */
15862
+ function specFor(unit) {
15863
+ return Object.hasOwn(UNIT_TABLE, unit) ? UNIT_TABLE[unit] : void 0;
15864
+ }
15865
+ /** Value in `spec`'s unit → its dimension's canonical unit. */
15866
+ function toCanonical(value, spec) {
15867
+ return value * spec.factor + spec.offset;
15868
+ }
15869
+ /** Canonical-unit value → the unit described by `spec`. */
15870
+ function fromCanonical(canonical, spec) {
15871
+ return (canonical - spec.offset) / spec.factor;
15872
+ }
15873
+ /**
15874
+ * Graceful variant for the render path: returns the converted value, or
15875
+ * `undefined` when the conversion is refused (unknown unit / cross-dimension).
15876
+ * Never throws — a render caller falls back to the raw value + source unit.
15877
+ */
15878
+ function tryConvertUnit(value, from, to) {
15879
+ if (from === to) return value;
15880
+ const fromSpec = specFor(from);
15881
+ if (!fromSpec) return void 0;
15882
+ const toSpec = specFor(to);
15883
+ if (!toSpec) return void 0;
15884
+ if (fromSpec.dimension !== toSpec.dimension) return void 0;
15885
+ return fromCanonical(toCanonical(value, fromSpec), toSpec);
15886
+ }
15887
+ /**
15888
+ * A number a person types for a physical quantity — the input side of the
15889
+ * value + unit contract (D972).
15890
+ *
15891
+ * Readings are stored in the base unit of their quantity (D944); a cap method
15892
+ * param is stored in the unit its input schema DECLARES (`paramMeta`). The
15893
+ * wire pair {@link QuantityValue} says "this number is expressed in this
15894
+ * unit"; {@link convertQuantityInput} brings it to the stored unit and refuses,
15895
+ * with a typed {@link QuantityUnitError}, a unit that cannot be that quantity.
15896
+ */
15897
+ /** A unit that cannot be applied to the number it was given with. */
15898
+ var QuantityUnitError = class extends Error {
15899
+ code;
15900
+ constructor(code, message) {
15901
+ super(`[${code}] ${message}`);
15902
+ this.name = "QuantityUnitError";
15903
+ this.code = code;
15904
+ }
15905
+ };
15906
+ /** The wire pair: `value` is expressed in `unit`. */
15907
+ var QuantityValueSchema = object({
15908
+ value: number(),
15909
+ unit: string().min(1)
15910
+ });
15911
+ /**
15912
+ * Zod `.meta()` bag for a cap METHOD param that is a physical quantity — the
15913
+ * input-side twin of `readingMeta`. The value is carried in `unit` (a gram
15914
+ * portion stays in grams); the unit must belong to the quantity, checked once
15915
+ * when the cap is declared.
15916
+ */
15917
+ function paramMeta(declared) {
15918
+ const base = baseUnitOf(declared.quantity);
15919
+ if (base === void 0) throw new QuantityUnitError("unknown-unit", `quantity "${declared.quantity}" has no unit`);
15920
+ if (tryConvertUnit(1, declared.unit, base) === void 0) throw new QuantityUnitError("cross-dimension", `"${declared.unit}" is not a unit of ${declared.quantity}`);
15921
+ return {
15922
+ quantity: declared.quantity,
15923
+ unit: declared.unit
15924
+ };
15925
+ }
15926
+ object({
15927
+ quantity: ReadingQuantitySchema,
15928
+ unit: string().min(1)
15929
+ });
15458
15930
  /** How a leaf compares a device field to a value. Derived from the field's
15459
15931
  * `kind` in `deviceManager.getWireableFields`, never hand-maintained. */
15460
15932
  var AutomationConditionOperatorSchema = _enum([
@@ -15477,8 +15949,10 @@ var AutomationConditionLeafSchema = object({
15477
15949
  string(),
15478
15950
  number(),
15479
15951
  boolean(),
15480
- array(union([string(), number()]))
15481
- ])
15952
+ array(union([string(), number()])),
15953
+ QuantityValueSchema
15954
+ ]),
15955
+ unit: string().min(1).optional()
15482
15956
  });
15483
15957
  var AutomationConditionStationaryPresentSchema = object({
15484
15958
  kind: literal("stationary-present"),
@@ -15631,7 +16105,13 @@ var AutomationCapStepSchema = object({
15631
16105
  /** Values may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
15632
16106
  * SUBSTITUTE and do not evaluate (§3.2.3). Anything beyond substitution is
15633
16107
  * the expression leaf. */
15634
- args: record(string(), unknown()).optional()
16108
+ args: record(string(), unknown()).optional(),
16109
+ /**
16110
+ * The unit the person picked per arg (display only). `args` always hold the
16111
+ * value in the unit the method's input DECLARES (`paramMeta`); on a write an
16112
+ * arg may be a {@link QuantityValue}, which the save boundary converts.
16113
+ */
16114
+ argUnits: record(string(), string().min(1)).optional()
15635
16115
  });
15636
16116
  /**
15637
16117
  * The steps an internal Action may contain: cap and wait, and nothing that can
@@ -16011,6 +16491,16 @@ object({
16011
16491
  lastRunAt: number().nullable(),
16012
16492
  lastError: string().nullable()
16013
16493
  });
16494
+ /** A bare number accepted as a base unit — the save succeeded, say so. */
16495
+ var UnitWarningSchema = object({
16496
+ /** Where in the saved record, e.g. `conditions.children.0` or `steps.2.args.grams`. */
16497
+ path: string(),
16498
+ deviceId: number().int().optional(),
16499
+ field: string(),
16500
+ value: number(),
16501
+ assumedUnit: string(),
16502
+ message: string()
16503
+ });
16014
16504
  /**
16015
16505
  * notification-output — canonical, capability-gated notification delivery.
16016
16506
  *
@@ -21355,56 +21845,6 @@ var DeviceAdminLinkSchema = object({
21355
21845
  });
21356
21846
  method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
21357
21847
  /**
21358
- * Identity envelope for a device's upstream-system metadata.
21359
- *
21360
- * Two jobs:
21361
- *
21362
- * 1. **Dispatch key.** `id` is the natural identifier the SOURCE system
21363
- * uses to address this device (HA `entity_id`, Reolink MAC, ONVIF
21364
- * WS-Discovery endpoint UUID, …). Provider code keeps a
21365
- * `Map<sourceInfo.id, IDevice>` to route inbound push events in O(1)
21366
- * without round-tripping through `stableId` / `id` mappings.
21367
- *
21368
- * 2. **Stability bridge.** `uniqueId` is the *immutable* upstream id when
21369
- * one exists (HA `entity.unique_id`, Reolink MAC again — same as `id`
21370
- * for vendors where MAC is the natural key). For systems where the
21371
- * live dispatch key can be renamed (HA `entity_id` can be edited),
21372
- * providers detect renames by matching `uniqueId` and patch `id`
21373
- * in-place so dispatch keeps working.
21374
- *
21375
- * **Display unit and precision are NOT stored here.** They are a read-time
21376
- * preference (D944). A polymorphic reading stores its `quantity` here once,
21377
- * at adopt, and a date/time value stores `dateTimeShape` the same way —
21378
- * neither is repeated on each sample. The `device_class` tag is an
21379
- * HA-specific input consumed at the discovery boundary (`ha-domain-mapping`)
21380
- * to derive the CamStack `DeviceRole`; it is never stored after that point.
21381
- *
21382
- * The `raw` escape hatch carries provider-specific attributes that don't
21383
- * fit the structured slots (HA `attributes` whitelist, Reolink `deviceCache`
21384
- * details, …). Providers control what lands here.
21385
- */
21386
- var SourceInfoSchema = object({
21387
- /** Live dispatch key — mutable when the source system allows rename. */
21388
- id: string(),
21389
- /** Source system tag — e.g. 'homeassistant' | 'reolink' | 'onvif'. */
21390
- system: string(),
21391
- /** Immutable upstream identifier when available (HA `unique_id`, … ).
21392
- * Used to detect rename when `id` changes. */
21393
- uniqueId: string().optional(),
21394
- /** Quantity of a polymorphic reading, written once at adopt (D944). */
21395
- quantity: ReadingQuantitySchema.optional(),
21396
- /** Date / time / datetime shape of a string reading, written once at adopt. */
21397
- dateTimeShape: _enum([
21398
- "date",
21399
- "time",
21400
- "datetime"
21401
- ]).optional(),
21402
- /** Provider-specific extras that don't fit the structured slots.
21403
- * Whitelist what goes here per provider — do NOT dump entire HA
21404
- * attribute blobs (would explode the meta JSON column). */
21405
- raw: record(string(), unknown()).optional()
21406
- });
21407
- /**
21408
21848
  * device-discovery — device-scoped capability for parents that host /
21409
21849
  * enumerate child devices (Reolink Hub / NVR, ONVIF gateway, future
21410
21850
  * integrations). The parent advertises a list of discoverable children,
@@ -57411,13 +57851,19 @@ method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
57411
57851
  }), method(ActionIdInput, _void(), {
57412
57852
  kind: "mutation",
57413
57853
  auth: "admin"
57414
- }), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({ action: ActionEntrySchema }), {
57854
+ }), method(ActionIdInput, object({ traces: array(AutomationRunTraceSchema) }), { auth: "admin" }), method(object({ action: ActionInputSchema }), object({
57855
+ action: ActionEntrySchema,
57856
+ warnings: array(UnitWarningSchema).optional()
57857
+ }), {
57415
57858
  kind: "mutation",
57416
57859
  auth: "admin"
57417
57860
  }), method(object({
57418
57861
  actionId: string().min(1),
57419
57862
  action: ActionInputSchema.partial()
57420
- }), object({ action: ActionEntrySchema }), {
57863
+ }), object({
57864
+ action: ActionEntrySchema,
57865
+ warnings: array(UnitWarningSchema).optional()
57866
+ }), {
57421
57867
  kind: "mutation",
57422
57868
  auth: "admin"
57423
57869
  }), method(ActionIdInput, _void(), {
@@ -62064,6 +62510,14 @@ var PetFeederDeviceStatusSchema = _enum([
62064
62510
  "on_batteries"
62065
62511
  ]);
62066
62512
  var gramsPortion = number().int().min(4).max(200);
62513
+ /** A portion REQUESTED of the feeder is a mass the method takes in GRAMS (the
62514
+ * hardware's own unit). The bounds are grams; a caller entering another unit
62515
+ * converts to grams first (`paramMeta`, D972). The STATUS fields above stay
62516
+ * plain grams — they are not readings in the kilogram base. */
62517
+ var gramsParam = gramsPortion.meta(paramMeta({
62518
+ quantity: "mass",
62519
+ unit: "g"
62520
+ }));
62067
62521
  object({
62068
62522
  /** Food in the TANK (hopper), as the feeder's own sensor reports it
62069
62523
  * (`state.food`). A coarse level code, not grams — `0` is empty. The
@@ -62138,9 +62592,9 @@ object({
62138
62592
  });
62139
62593
  DeviceType.PetFeeder, method(object({
62140
62594
  deviceId: number().int().nonnegative(),
62141
- grams: gramsPortion.optional(),
62142
- hopper1: gramsPortion.optional(),
62143
- hopper2: gramsPortion.optional()
62595
+ grams: gramsParam.optional(),
62596
+ hopper1: gramsParam.optional(),
62597
+ hopper2: gramsParam.optional()
62144
62598
  }), _void(), {
62145
62599
  kind: "mutation",
62146
62600
  auth: "protected"
@@ -78739,7 +79193,8 @@ var APPLIANCE_CAP_VOCABULARY = {
78739
79193
  min: 4,
78740
79194
  max: 200,
78741
79195
  step: 1,
78742
- unit: "g"
79196
+ unit: "g",
79197
+ quantity: "mass"
78743
79198
  },
78744
79199
  optional: true
78745
79200
  }]
@@ -78758,7 +79213,8 @@ var APPLIANCE_CAP_VOCABULARY = {
78758
79213
  min: 4,
78759
79214
  max: 200,
78760
79215
  step: 1,
78761
- unit: "g"
79216
+ unit: "g",
79217
+ quantity: "mass"
78762
79218
  },
78763
79219
  optional: true
78764
79220
  }, {
@@ -78769,7 +79225,8 @@ var APPLIANCE_CAP_VOCABULARY = {
78769
79225
  min: 4,
78770
79226
  max: 200,
78771
79227
  step: 1,
78772
- unit: "g"
79228
+ unit: "g",
79229
+ quantity: "mass"
78773
79230
  },
78774
79231
  optional: true
78775
79232
  }]
@@ -85198,7 +85655,7 @@ var AdminUIAddon = class extends BaseAddon {
85198
85655
  capability: adminUiCapability,
85199
85656
  provider: {
85200
85657
  getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
85201
- getVersion: async () => ({ version: "1.2.520" })
85658
+ getVersion: async () => ({ version: "1.2.521" })
85202
85659
  }
85203
85660
  }];
85204
85661
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-admin-ui",
3
- "version": "1.2.520",
3
+ "version": "1.2.521",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Admin UI — Vite frontend build and server-side addon",