@camstack/ui-library 1.2.256 → 1.2.258
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.
- package/dist/composites/accelerator-label.d.ts +9 -9
- package/dist/composites/adaptive-downlink.d.ts +141 -143
- package/dist/composites/addon-global-settings-form.d.ts +73 -60
- package/dist/composites/addon-page-props.d.ts +34 -10
- package/dist/composites/agent-step-editor.d.ts +48 -47
- package/dist/composites/app-shell/app-shell.d.ts +17 -17
- package/dist/composites/app-shell/index.d.ts +3 -3
- package/dist/composites/app-shell/sidebar-item.d.ts +9 -8
- package/dist/composites/app-shell/sidebar.d.ts +10 -10
- package/dist/composites/audio-classification-list.d.ts +16 -15
- package/dist/composites/audio-level-waveform.d.ts +31 -30
- package/dist/composites/audio-waveform.d.ts +18 -17
- package/dist/composites/battery-badge.d.ts +27 -13
- package/dist/composites/breadcrumb.d.ts +21 -21
- package/dist/composites/camera-stream-player.d.ts +309 -309
- package/dist/composites/cap-settings/AutotrackSection.d.ts +19 -2
- package/dist/composites/cap-settings/CameraGridLayoutEditor.d.ts +24 -2
- package/dist/composites/cap-settings/ConsumablesPanel.d.ts +21 -2
- package/dist/composites/cap-settings/CoverageTrack.d.ts +21 -20
- package/dist/composites/cap-settings/EventBucketStrip.d.ts +21 -20
- package/dist/composites/cap-settings/EventHeatmap.d.ts +8 -7
- package/dist/composites/cap-settings/HomePresetPicker.d.ts +2 -2
- package/dist/composites/cap-settings/MaskShapeCanvas.d.ts +143 -41
- package/dist/composites/cap-settings/MotionZonesSettings.d.ts +41 -2
- package/dist/composites/cap-settings/NavigationPanel.d.ts +14 -2
- package/dist/composites/cap-settings/PrivacyMaskSettings.d.ts +3 -2
- package/dist/composites/cap-settings/PtzPanel.d.ts +15 -2
- package/dist/composites/cap-settings/RecordingBandsEditor.d.ts +33 -32
- package/dist/composites/cap-settings/RecordingPanel.d.ts +3 -2
- package/dist/composites/cap-settings/RecordingSettings.d.ts +11 -10
- package/dist/composites/cap-settings/RecordingTimeline.d.ts +3 -2
- package/dist/composites/cap-settings/SceneMonitorEditor.d.ts +3 -51
- package/dist/composites/cap-settings/SceneReferenceGallery.d.ts +62 -23
- package/dist/composites/cap-settings/SceneSettingsForm.d.ts +52 -16
- package/dist/composites/cap-settings/TimelineControls.d.ts +21 -20
- package/dist/composites/cap-settings/camera-grid-layout.d.ts +95 -95
- package/dist/composites/cap-settings/event-thumb.d.ts +9 -8
- package/dist/composites/cap-settings/index.d.ts +20 -20
- package/dist/composites/cap-settings/privacy-mask-audio.d.ts +47 -47
- package/dist/composites/cap-settings/recording-config-form.d.ts +25 -25
- package/dist/composites/cap-settings/recording-spans.d.ts +14 -14
- package/dist/composites/cap-settings/recording-timeline-model.d.ts +57 -57
- package/dist/composites/cap-settings/scene-monitor-copy.d.ts +58 -49
- package/dist/composites/client-network-sample.d.ts +41 -41
- package/dist/composites/clips/ClipBandBar.d.ts +44 -14
- package/dist/composites/clips/ClipPanel.d.ts +30 -6
- package/dist/composites/clips/ClipTile.d.ts +26 -5
- package/dist/composites/clips/ClipsSection.d.ts +107 -2
- package/dist/composites/clips/clip-band.d.ts +72 -38
- package/dist/composites/clips/clip-day-window.d.ts +7 -30
- package/dist/composites/clips/clip-source-state.d.ts +55 -26
- package/dist/composites/clips/clip-still-retry.d.ts +39 -39
- package/dist/composites/clips/clip-thumbnail-fetch.d.ts +9 -9
- package/dist/composites/clips/clip-tile-media.d.ts +64 -32
- package/dist/composites/clips/clip-view-state.d.ts +76 -46
- package/dist/composites/code-block.d.ts +5 -4
- package/dist/composites/config-form-builder.d.ts +14 -13
- package/dist/composites/config-form-field.d.ts +63 -62
- package/dist/composites/config-icon-field.d.ts +10 -9
- package/dist/composites/config-secret-field.d.ts +51 -27
- package/dist/composites/confirm-action-button.d.ts +52 -39
- package/dist/composites/confirm-dialog.d.ts +110 -48
- package/dist/composites/copy-button.d.ts +25 -19
- package/dist/composites/data-table/data-table-header.d.ts +8 -7
- package/dist/composites/data-table/data-table-pagination.d.ts +7 -6
- package/dist/composites/data-table/data-table-row.d.ts +8 -7
- package/dist/composites/data-table/data-table.d.ts +3 -2
- package/dist/composites/data-table/index.d.ts +2 -2
- package/dist/composites/data-table/types.d.ts +29 -29
- package/dist/composites/data-table-filter-bar.d.ts +30 -29
- package/dist/composites/data-table-filter.d.ts +34 -34
- package/dist/composites/data-table-layout.d.ts +24 -24
- package/dist/composites/data-table-pager.d.ts +5 -5
- package/dist/composites/data-table-pagination.d.ts +23 -23
- package/dist/composites/data-table-selection.d.ts +10 -10
- package/dist/composites/data-table.d.ts +167 -118
- package/dist/composites/detection-canvas.d.ts +34 -25
- package/dist/composites/detection-colors.d.ts +9 -9
- package/dist/composites/detection-overlay.d.ts +33 -32
- package/dist/composites/detection-result-tree.d.ts +22 -9
- package/dist/composites/dev-shell.d.ts +15 -14
- package/dist/composites/device-activity-panel.d.ts +37 -31
- package/dist/composites/device-card.d.ts +32 -32
- package/dist/composites/device-controls/ac-panel.d.ts +2 -2
- package/dist/composites/device-controls/alarm-hero-card.d.ts +42 -42
- package/dist/composites/device-controls/atoms.d.ts +50 -50
- package/dist/composites/device-controls/brightness-panel.d.ts +3 -3
- package/dist/composites/device-controls/button-control.d.ts +14 -14
- package/dist/composites/device-controls/climate-panel.d.ts +12 -12
- package/dist/composites/device-controls/container-primary-hero.d.ts +33 -16
- package/dist/composites/device-controls/container-primary.d.ts +68 -39
- package/dist/composites/device-controls/control-panel.d.ts +4 -4
- package/dist/composites/device-controls/control-registry.d.ts +81 -70
- package/dist/composites/device-controls/cover-hero-card.d.ts +26 -26
- package/dist/composites/device-controls/cover-inline.d.ts +20 -20
- package/dist/composites/device-controls/cover-panel.d.ts +2 -2
- package/dist/composites/device-controls/dummy-hero-card.d.ts +2 -2
- package/dist/composites/device-controls/fan-hero-card.d.ts +20 -20
- package/dist/composites/device-controls/fan-panel.d.ts +3 -3
- package/dist/composites/device-controls/humidifier-control.d.ts +46 -29
- package/dist/composites/device-controls/image-control.d.ts +41 -27
- package/dist/composites/device-controls/index.d.ts +34 -34
- package/dist/composites/device-controls/lawn-mower-control.d.ts +30 -16
- package/dist/composites/device-controls/light-hero-card.d.ts +15 -15
- package/dist/composites/device-controls/lock-hero-card.d.ts +14 -14
- package/dist/composites/device-controls/lock-panel.d.ts +3 -3
- package/dist/composites/device-controls/media-player-hero-card.d.ts +16 -16
- package/dist/composites/device-controls/media-player-panel.d.ts +7 -7
- package/dist/composites/device-controls/offline-badge.d.ts +23 -8
- package/dist/composites/device-controls/panel-controls.d.ts +39 -20
- package/dist/composites/device-controls/pet-feeder-panel.d.ts +27 -9
- package/dist/composites/device-controls/popover-row-action.d.ts +18 -6
- package/dist/composites/device-controls/primary-child-picker.d.ts +31 -15
- package/dist/composites/device-controls/primary-child.d.ts +14 -25
- package/dist/composites/device-controls/radial-gauge.d.ts +17 -17
- package/dist/composites/device-controls/script-automation-controls.d.ts +9 -9
- package/dist/composites/device-controls/sensor-hero-card.d.ts +26 -8
- package/dist/composites/device-controls/sensor-inline-control.d.ts +21 -9
- package/dist/composites/device-controls/sensor-value-atom.d.ts +97 -76
- package/dist/composites/device-controls/switch-hero-card.d.ts +11 -11
- package/dist/composites/device-controls/switch-panel.d.ts +2 -2
- package/dist/composites/device-controls/tap-toggle.d.ts +13 -13
- package/dist/composites/device-controls/thermostat-hero-card.d.ts +16 -16
- package/dist/composites/device-controls/types.d.ts +11 -11
- package/dist/composites/device-controls/update-control.d.ts +20 -7
- package/dist/composites/device-controls/vacuum-control.d.ts +41 -25
- package/dist/composites/device-controls/valve-control.d.ts +51 -35
- package/dist/composites/device-controls/water-heater-control.d.ts +48 -31
- package/dist/composites/device-controls/weather-control.d.ts +46 -28
- package/dist/composites/device-export-panel.d.ts +34 -34
- package/dist/composites/device-grid.d.ts +10 -10
- package/dist/composites/device-item/actions.d.ts +40 -18
- package/dist/composites/device-item/admin-link-quick-action.d.ts +66 -26
- package/dist/composites/device-item/child-layout.d.ts +43 -26
- package/dist/composites/device-item/child-section-accordion.d.ts +20 -6
- package/dist/composites/device-item/children-accordion.d.ts +11 -11
- package/dist/composites/device-item/container-children-context.d.ts +28 -11
- package/dist/composites/device-item/device-delete-action.d.ts +23 -5
- package/dist/composites/device-item/features.d.ts +33 -15
- package/dist/composites/device-item/header.d.ts +53 -31
- package/dist/composites/device-item/helpers.d.ts +291 -274
- package/dist/composites/device-item/index.d.ts +18 -9
- package/dist/composites/device-item/preview.d.ts +41 -21
- package/dist/composites/device-item/quick-detail-action.d.ts +4 -4
- package/dist/composites/device-item/reboot-quick-action.d.ts +28 -7
- package/dist/composites/device-item/role-display-defaults-context.d.ts +28 -12
- package/dist/composites/device-item/status-dot.d.ts +24 -6
- package/dist/composites/device-list/batch-actions-bar.d.ts +23 -12
- package/dist/composites/device-list/batch-toolbar.d.ts +13 -13
- package/dist/composites/device-list/columns.d.ts +108 -108
- package/dist/composites/device-list/device-integration.d.ts +48 -58
- package/dist/composites/device-list/device-mode.d.ts +121 -121
- package/dist/composites/device-list/empty-state.d.ts +14 -3
- package/dist/composites/device-list/filter-chips.d.ts +42 -29
- package/dist/composites/device-list/fuzzy-match.d.ts +22 -22
- package/dist/composites/device-list/generic-mode.d.ts +88 -88
- package/dist/composites/device-list/group.d.ts +62 -35
- package/dist/composites/device-list/hardware-cell.d.ts +14 -3
- package/dist/composites/device-list/hardware.d.ts +29 -11
- package/dist/composites/device-list/icon-action.d.ts +27 -15
- package/dist/composites/device-list/index.d.ts +46 -23
- package/dist/composites/device-list/multi-select.d.ts +17 -17
- package/dist/composites/device-list/page-size-select.d.ts +13 -7
- package/dist/composites/device-list/pagination.d.ts +19 -12
- package/dist/composites/device-list/sort.d.ts +28 -15
- package/dist/composites/device-list/sortable-header.d.ts +20 -7
- package/dist/composites/device-list/table-layout.d.ts +44 -44
- package/dist/composites/device-list/type-filter.d.ts +16 -16
- package/dist/composites/device-list/url-state.d.ts +35 -35
- package/dist/composites/device-meta.d.ts +43 -43
- package/dist/composites/device-picker/DevicePicker.d.ts +72 -33
- package/dist/composites/device-picker/SelectedChip.d.ts +10 -9
- package/dist/composites/device-picker/device-filter-bar.d.ts +19 -18
- package/dist/composites/device-picker/device-fleet-view.d.ts +11 -3
- package/dist/composites/device-picker/device-parent.d.ts +27 -27
- package/dist/composites/device-picker/device-picker-grouping.d.ts +3 -3
- package/dist/composites/device-picker/device-picker-model.d.ts +140 -140
- package/dist/composites/device-picker/device-selection-rows.d.ts +31 -24
- package/dist/composites/device-picker/device-selection.d.ts +43 -43
- package/dist/composites/device-picker/index.d.ts +9 -9
- package/dist/composites/device-select-field.d.ts +17 -16
- package/dist/composites/device-select-filter.d.ts +78 -78
- package/dist/composites/device-selector-picker.d.ts +25 -25
- package/dist/composites/device-step-matrix.d.ts +54 -28
- package/dist/composites/discovery-panel.d.ts +22 -22
- package/dist/composites/doorbell-recent-panel.d.ts +9 -8
- package/dist/composites/empty-state.d.ts +8 -8
- package/dist/composites/error-box.d.ts +32 -17
- package/dist/composites/event-kind-visuals.d.ts +29 -18
- package/dist/composites/event-stream.d.ts +59 -42
- package/dist/composites/extensions/AssociationSlotCard.d.ts +45 -24
- package/dist/composites/extensions/ExtensionsPanel.d.ts +41 -18
- package/dist/composites/extensions/extensions-view-state.d.ts +71 -53
- package/dist/composites/filter-bar.d.ts +22 -21
- package/dist/composites/form-field.d.ts +9 -9
- package/dist/composites/format-state-value.d.ts +23 -51
- package/dist/composites/grouped-model-selector.d.ts +7 -6
- package/dist/composites/hls-quality.d.ts +26 -26
- package/dist/composites/hls-video.d.ts +62 -39
- package/dist/composites/hover-zoom-image.d.ts +35 -16
- package/dist/composites/icon-picker.d.ts +86 -50
- package/dist/composites/image-selector.d.ts +21 -20
- package/dist/composites/index.d.ts +204 -204
- package/dist/composites/inference-config-selector.d.ts +36 -35
- package/dist/composites/kebab-menu.d.ts +53 -35
- package/dist/composites/key-value-list.d.ts +14 -14
- package/dist/composites/log-stream-scroll.d.ts +24 -24
- package/dist/composites/log-stream.d.ts +81 -70
- package/dist/composites/login-form.d.ts +7 -6
- package/dist/composites/model-bound-slider.d.ts +46 -26
- package/dist/composites/model-picker.d.ts +20 -19
- package/dist/composites/mount-addon-page.d.ts +12 -12
- package/dist/composites/network-link-badge.d.ts +7 -6
- package/dist/composites/node-picker.d.ts +14 -13
- package/dist/composites/notification-targets-field.d.ts +76 -58
- package/dist/composites/notification-targets-options.d.ts +9 -6
- package/dist/composites/option-select/OptionSelect.d.ts +23 -22
- package/dist/composites/option-select/index.d.ts +4 -4
- package/dist/composites/option-select/option-select-model.d.ts +35 -35
- package/dist/composites/page-header.d.ts +6 -6
- package/dist/composites/peer-connection-config.d.ts +9 -9
- package/dist/composites/phase-icon.d.ts +10 -3
- package/dist/composites/pipeline-builder.d.ts +21 -13
- package/dist/composites/pipeline-matrix-shared.d.ts +159 -150
- package/dist/composites/pipeline-runtime-selector.d.ts +12 -11
- package/dist/composites/pipeline-step.d.ts +39 -31
- package/dist/composites/placeholder-field/PlaceholderChipField.d.ts +23 -22
- package/dist/composites/placeholder-field/index.d.ts +1 -1
- package/dist/composites/provider-badge.d.ts +6 -5
- package/dist/composites/ptz-overlay.d.ts +38 -18
- package/dist/composites/qr-code.d.ts +24 -10
- package/dist/composites/reconnect-schedule.d.ts +22 -22
- package/dist/composites/resolve-step-default-model.d.ts +94 -94
- package/dist/composites/response-log.d.ts +7 -6
- package/dist/composites/root-model-source.d.ts +21 -10
- package/dist/composites/scope-picker.d.ts +49 -25
- package/dist/composites/section-card.d.ts +19 -11
- package/dist/composites/setting-row.d.ts +39 -21
- package/dist/composites/snapshot-button.d.ts +23 -19
- package/dist/composites/sort-header-button.d.ts +25 -8
- package/dist/composites/stat-card.d.ts +20 -8
- package/dist/composites/state-values-stream.d.ts +49 -24
- package/dist/composites/status-badge.d.ts +10 -8
- package/dist/composites/step-inspector/gate-control.d.ts +13 -12
- package/dist/composites/step-inspector/index.d.ts +8 -8
- package/dist/composites/step-inspector/layered-settings-form.d.ts +41 -30
- package/dist/composites/step-inspector/segmented-choice.d.ts +8 -7
- package/dist/composites/step-inspector/setting-values.d.ts +13 -8
- package/dist/composites/step-inspector/step-detail-dock.d.ts +39 -23
- package/dist/composites/step-inspector/step-inspector-panel.d.ts +34 -28
- package/dist/composites/step-inspector/step-model-row.d.ts +29 -24
- package/dist/composites/step-inspector/step-search.d.ts +11 -11
- package/dist/composites/step-timings.d.ts +7 -6
- package/dist/composites/step-tree.d.ts +17 -12
- package/dist/composites/stream-broker-selector.d.ts +29 -8
- package/dist/composites/stream-debug/stream-debug-overlay.d.ts +40 -40
- package/dist/composites/stream-debug/webrtc-debug-stats.d.ts +144 -129
- package/dist/composites/stream-panel.d.ts +212 -201
- package/dist/composites/table-sort.d.ts +61 -61
- package/dist/composites/timezone-selector.d.ts +15 -13
- package/dist/composites/training/send-frame-to-training.d.ts +5 -4
- package/dist/composites/training/training-collection-picker.d.ts +4 -3
- package/dist/composites/training/training-refusal-text.d.ts +6 -6
- package/dist/composites/unit-picker/UnitPicker.d.ts +19 -14
- package/dist/composites/unit-picker/index.d.ts +1 -1
- package/dist/composites/use-data-table-filter.d.ts +19 -19
- package/dist/composites/version-badge.d.ts +19 -18
- package/dist/composites/webrtc-diagnostics/EndpointTestCard.d.ts +7 -7
- package/dist/composites/webrtc-diagnostics/HubSessionTestCard.d.ts +14 -14
- package/dist/composites/webrtc-diagnostics/RunReport.d.ts +10 -5
- package/dist/composites/webrtc-diagnostics/endpoint-probe.d.ts +41 -21
- package/dist/composites/webrtc-diagnostics/endpoint-test.d.ts +37 -32
- package/dist/composites/webrtc-diagnostics/format.d.ts +3 -3
- package/dist/composites/webrtc-diagnostics/ice-candidates.d.ts +49 -49
- package/dist/composites/webrtc-diagnostics/nat-mapping.d.ts +36 -36
- package/dist/composites/webrtc-diagnostics/session-run.d.ts +108 -95
- package/dist/composites/webrtc-diagnostics/session-verdict.d.ts +29 -20
- package/dist/composites/widget-panel.d.ts +23 -23
- package/dist/composites/widget-slot.d.ts +35 -17
- package/dist/contexts/custom-field-renderers.d.ts +53 -17
- package/dist/contexts/device-context.d.ts +32 -12
- package/dist/contexts/device-quick-detail.d.ts +13 -4
- package/dist/contexts/player-overlays.d.ts +82 -42
- package/dist/contexts/recorded-playback.d.ts +40 -18
- package/dist/contexts/system-context.d.ts +28 -13
- package/dist/contexts/vod-playback.d.ts +39 -22
- package/dist/contexts/widget-registry.d.ts +139 -102
- package/dist/contexts/zone-editing.d.ts +69 -46
- package/dist/generated/system-hooks.d.ts +17 -1
- package/dist/hooks/index.d.ts +43 -43
- package/dist/hooks/turn-server-cache.d.ts +69 -69
- package/dist/hooks/use-capability-presence.d.ts +65 -28
- package/dist/hooks/use-cluster-nodes.d.ts +54 -27
- package/dist/hooks/use-device-autotrack.d.ts +7 -7
- package/dist/hooks/use-device-battery.d.ts +24 -11
- package/dist/hooks/use-device-cap-slice.d.ts +15 -15
- package/dist/hooks/use-device-capability.d.ts +61 -27
- package/dist/hooks/use-device-detections.d.ts +32 -32
- package/dist/hooks/use-device-features.d.ts +18 -18
- package/dist/hooks/use-device-list-page-size.d.ts +19 -6
- package/dist/hooks/use-device-network-link.d.ts +15 -7
- package/dist/hooks/use-device-proxy.d.ts +98 -92
- package/dist/hooks/use-device-snapshot.d.ts +23 -23
- package/dist/hooks/use-device-webrtc.d.ts +211 -205
- package/dist/hooks/use-devices.d.ts +9 -9
- package/dist/hooks/use-doorbell-events.d.ts +13 -13
- package/dist/hooks/use-event-stream.d.ts +6 -3
- package/dist/hooks/use-is-mobile.d.ts +5 -5
- package/dist/hooks/use-live-buffer.d.ts +5 -5
- package/dist/hooks/use-live-event.d.ts +1 -1
- package/dist/hooks/use-navigation.d.ts +20 -20
- package/dist/hooks/use-optimistic-slice.d.ts +13 -13
- package/dist/hooks/use-persisted-page-size.d.ts +10 -10
- package/dist/hooks/use-ptz.d.ts +108 -108
- package/dist/hooks/use-stationary-overlay.d.ts +37 -37
- package/dist/hooks/use-system-query.d.ts +33 -10
- package/dist/hooks/use-url-query.d.ts +3 -3
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/provider-icons.d.ts +2 -2
- package/dist/icons/status-icons.d.ts +2 -2
- package/dist/index.cjs +123 -69
- package/dist/index.d.ts +31 -27
- package/dist/index.js +123 -69
- package/dist/lib/cap-error.d.ts +18 -39
- package/dist/lib/cn.d.ts +1 -1
- package/dist/lib/fleet-query-defaults.d.ts +68 -34
- package/dist/lib/format-control-datetime.d.ts +16 -16
- package/dist/lib/format-duration.d.ts +12 -12
- package/dist/lib/format-last-seen.d.ts +5 -18
- package/dist/lib/format-numeric.d.ts +7 -7
- package/dist/lib/hub-mount.d.ts +8 -42
- package/dist/lib/index.d.ts +21 -21
- package/dist/lib/phase-config.d.ts +24 -11
- package/dist/lib/pipeline-mirror.d.ts +16 -16
- package/dist/lib/recorded-control-protocol.d.ts +41 -43
- package/dist/lib/resolve-sensor-display.d.ts +36 -20
- package/dist/lib/responsive.d.ts +54 -54
- package/dist/lib/scrub-controller.d.ts +75 -78
- package/dist/lib/shared-context.d.ts +27 -2
- package/dist/lib/tailwind-variants.d.ts +20 -20
- package/dist/primitives/badge.d.ts +5 -10
- package/dist/primitives/bottom-sheet.d.ts +7 -7
- package/dist/primitives/button.d.ts +5 -9
- package/dist/primitives/card.d.ts +4 -8
- package/dist/primitives/checkbox.d.ts +3 -4
- package/dist/primitives/collapsible-card.d.ts +23 -13
- package/dist/primitives/dialog.d.ts +33 -59
- package/dist/primitives/dropdown.d.ts +13 -13
- package/dist/primitives/floating-panel.d.ts +41 -20
- package/dist/primitives/icon-button.d.ts +8 -12
- package/dist/primitives/index.d.ts +22 -22
- package/dist/primitives/input.d.ts +6 -16
- package/dist/primitives/label.d.ts +3 -4
- package/dist/primitives/mobile-drawer.d.ts +8 -8
- package/dist/primitives/password-input.d.ts +18 -18
- package/dist/primitives/popover.d.ts +7 -7
- package/dist/primitives/scroll-area.d.ts +3 -4
- package/dist/primitives/select.d.ts +20 -20
- package/dist/primitives/separator.d.ts +4 -8
- package/dist/primitives/skeleton.d.ts +3 -4
- package/dist/primitives/switch.d.ts +6 -6
- package/dist/primitives/tabs.d.ts +26 -26
- package/dist/primitives/tooltip.d.ts +12 -12
- package/dist/theme/create-theme.d.ts +1 -1
- package/dist/theme/defaults.d.ts +1 -1
- package/dist/theme/index.d.ts +6 -6
- package/dist/theme/theme-provider.d.ts +8 -7
- package/dist/theme/theme-to-css.d.ts +1 -1
- package/dist/theme/types.d.ts +98 -100
- package/dist/theme/use-theme-mode.d.ts +1 -1
- package/dist/trpc-react.d.ts +23 -3
- package/dist/widgets/host-widgets.d.ts +4 -4
- package/package.json +8 -4
- package/src/tailwind/camstack-theme.css +11 -0
- package/dist/composites/unit-picker/UnitPicker.spec.d.ts +0 -1
|
@@ -1,24 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Robotic lawn-mower controls for a `DeviceType.LawnMower` device.
|
|
3
|
+
*
|
|
4
|
+
* Reads the `lawn-mower-control` cap status slice (activity /
|
|
5
|
+
* batteryLevel) and renders:
|
|
6
|
+
* - LawnMowerInlineControl (device-list row): compact Mow / Pause /
|
|
7
|
+
* Dock buttons with activity-aware highlight + a battery % badge.
|
|
8
|
+
* - LawnMowerHeroCard (device-detail hero): an activity label, the
|
|
9
|
+
* full action set (Start mowing / Pause / Dock), and the battery
|
|
10
|
+
* readout.
|
|
11
|
+
*
|
|
12
|
+
* Mirrors the vacuum/cover controls' `useDeviceCapability` pattern so the
|
|
13
|
+
* row and hero never diverge. Buttons are gated on `available`.
|
|
14
|
+
*/
|
|
15
|
+
import type { ReactNode } from "react";
|
|
16
|
+
import type { LawnMowerActivity } from "@camstack/types";
|
|
17
|
+
import type { DeviceControlProps } from "./control-registry";
|
|
4
18
|
export interface LawnMowerActivityMeta {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
19
|
+
readonly label: string;
|
|
20
|
+
/** Tailwind text-colour token for the activity label. */
|
|
21
|
+
readonly tone: string;
|
|
8
22
|
}
|
|
9
23
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
24
|
+
* Pure helper — maps a LawnMowerActivity (or undefined when no slice
|
|
25
|
+
* yet) to a human label + colour tone. Exhaustive switch: a new enum
|
|
26
|
+
* member fails the build.
|
|
27
|
+
*/
|
|
14
28
|
export declare function lawnMowerActivityMeta(activity: LawnMowerActivity | undefined): LawnMowerActivityMeta;
|
|
15
29
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
* LawnMowerInlineControl — compact, activity-aware mower controls for a
|
|
31
|
+
* device-list row. Mow / Pause / Dock + battery badge.
|
|
32
|
+
*/
|
|
19
33
|
export declare function LawnMowerInlineControl({ trpc, deviceId }: DeviceControlProps): ReactNode;
|
|
20
34
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
35
|
+
* LawnMowerHeroCard — full control surface for the device-detail hero
|
|
36
|
+
* area. Activity label + action buttons + battery readout.
|
|
37
|
+
*/
|
|
24
38
|
export declare function LawnMowerHeroCard({ trpc, deviceId }: DeviceControlProps): ReactNode;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { DeviceControlProps } from
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DeviceControlProps } from "./control-registry";
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare function LightHeroCard({ trpc, deviceId, features, optimistic
|
|
4
|
+
* LightHeroCard — radial dimmer hero for Light devices.
|
|
5
|
+
*
|
|
6
|
+
* Renders:
|
|
7
|
+
* - RadialGauge: brightness ArcKnob riding a 270° ring at the level fraction,
|
|
8
|
+
* centered bulb glyph + percentage readout.
|
|
9
|
+
* - TAP TOGGLE for on/off (Spec §3 — NOT a SlideToggle; slide is safety-only).
|
|
10
|
+
* - Colour-temperature GripTrack strip — ONLY when the device advertises
|
|
11
|
+
* DeviceFeature.LightColorMired AND the `color` cap is bound.
|
|
12
|
+
*
|
|
13
|
+
* Composes three caps: `switch` (on/off), `brightness` (level), `color` (CT).
|
|
14
|
+
* Cap-gated on `switch` (always present on a Light) — returns null without it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function LightHeroCard({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { DeviceControlProps } from
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DeviceControlProps } from "./control-registry";
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export declare function LockHeroCard({ trpc, deviceId, features, optimistic
|
|
4
|
+
* LockHeroCard — padlock hero for lock devices.
|
|
5
|
+
*
|
|
6
|
+
* Renders:
|
|
7
|
+
* - Padlock glyph: state-colored (locked=green, unlocked=amber, jammed=red)
|
|
8
|
+
* - SlideToggle (safety gesture): thumb must be dragged past threshold to
|
|
9
|
+
* confirm lock/unlock — a plain tap never triggers the action (Spec §3).
|
|
10
|
+
* - Open (unlatch) button: rendered ONLY when device.features includes
|
|
11
|
+
* DeviceFeature.LockOpen ('lock-open'). Absent otherwise.
|
|
12
|
+
*
|
|
13
|
+
* Cap-gated: returns null when the device has no lockControl cap.
|
|
14
|
+
*/
|
|
15
|
+
export declare function LockHeroCard({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { ControlPanelProps } from
|
|
3
|
-
export declare function LockPanel({ trpc, deviceId, layout, optimistic, features
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { ControlPanelProps } from "./types";
|
|
3
|
+
export declare function LockPanel({ trpc, deviceId, layout, optimistic, features }: ControlPanelProps): ReactNode;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { DeviceControlProps } from
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DeviceControlProps } from "./control-registry";
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export declare function MediaPlayerHeroCard({ trpc, deviceId, features, optimistic
|
|
4
|
+
* MediaPlayerHeroCard — now-playing hero for MediaPlayer devices.
|
|
5
|
+
*
|
|
6
|
+
* Renders (Spec §3):
|
|
7
|
+
* - Now-playing block: cover glyph + title + artist/album.
|
|
8
|
+
* - Seek GripTrack with a native range overlay (gated on DeviceFeature
|
|
9
|
+
* MediaPlayerSeek + a known duration).
|
|
10
|
+
* - Transport row: SkipBack / Play-Pause / SkipForward (lucide icons). Skip
|
|
11
|
+
* buttons are gated on MediaPlayerPrevious / MediaPlayerNext.
|
|
12
|
+
* - Volume GripTrack with a native range overlay + mute toggle (gated on a
|
|
13
|
+
* non-null volume surface + DeviceFeature.MediaPlayerVolume).
|
|
14
|
+
*
|
|
15
|
+
* Cap-gated on `media-player` — returns null when the device lacks the cap.
|
|
16
|
+
*/
|
|
17
|
+
export declare function MediaPlayerHeroCard({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { ControlPanelProps } from
|
|
3
|
-
import { MediaPlayerState } from
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ControlPanelProps } from "./types.js";
|
|
3
|
+
import type { MediaPlayerState } from "@camstack/types";
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
* Exhaustive colour map — one entry per MediaPlayerState.
|
|
6
|
+
* Build fails if a state is added and not reflected here.
|
|
7
|
+
*/
|
|
8
8
|
export declare const STATE_COLOR: Record<MediaPlayerState, string>;
|
|
9
|
-
export declare function MediaPlayerPanel({ trpc, deviceId, features: _features, layout, optimistic
|
|
9
|
+
export declare function MediaPlayerPanel({ trpc, deviceId, features: _features, layout, optimistic }: ControlPanelProps): ReactNode;
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* OfflineBadge — a small, shared "device is unreachable" pill.
|
|
3
|
+
*
|
|
4
|
+
* Rendered ONCE per device (in the detail hero header) when the
|
|
5
|
+
* device-status slice reports `online: false`. Controls themselves stay
|
|
6
|
+
* mounted showing their last-known value (greyed/read-only via the
|
|
7
|
+
* `useDeviceCapability` `available` gate); this badge is the single,
|
|
8
|
+
* legible explanation of WHY they're inert plus how long ago the device
|
|
9
|
+
* was last seen.
|
|
10
|
+
*
|
|
11
|
+
* Pure presentational atom: no fetches, no internal state. The caller
|
|
12
|
+
* supplies `lastChangedAt` (the device-status `lastChangedAt` /
|
|
13
|
+
* `useDeviceCapability` `offlineSince`). When it is absent or
|
|
14
|
+
* non-positive only the "Unavailable" label renders.
|
|
15
|
+
*/
|
|
16
|
+
import type { ReactElement } from "react";
|
|
2
17
|
export interface OfflineBadgeProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Ms epoch of the last online→offline transition (device-status
|
|
20
|
+
* `lastChangedAt`). `null`/`undefined`/non-positive → no "last seen"
|
|
21
|
+
* suffix is shown.
|
|
22
|
+
*/
|
|
23
|
+
readonly lastChangedAt?: number | null;
|
|
24
|
+
readonly className?: string;
|
|
10
25
|
}
|
|
11
26
|
export declare function OfflineBadge({ lastChangedAt, className }: OfflineBadgeProps): ReactElement;
|
|
@@ -1,20 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Panel-backed InlineControl and HeroCard wrappers for all non-Cover actuator types.
|
|
3
|
+
*
|
|
4
|
+
* Each wrapper:
|
|
5
|
+
* - Guards on `cap === undefined` → returns null (device has no such cap).
|
|
6
|
+
* Never disappears on a transient undefined slice; the panel itself handles that.
|
|
7
|
+
* - InlineControl: renders the panel at layout="compact" (row-sized).
|
|
8
|
+
* - HeroCard: renders the panel at layout="full" in the standard hero shell
|
|
9
|
+
* (rounded-lg border border-border bg-surface p-4, matching CoverHeroCard's shell).
|
|
10
|
+
*
|
|
11
|
+
* Mapped types:
|
|
12
|
+
* Switch / Siren → SwitchPanel
|
|
13
|
+
* Lock → LockPanel
|
|
14
|
+
* Light → SwitchPanel + BrightnessPanel (switch toggle + brightness slider)
|
|
15
|
+
* Fan → SwitchPanel + FanPanel
|
|
16
|
+
* Thermostat → ClimatePanel
|
|
17
|
+
* MediaPlayer → MediaPlayerPanel
|
|
18
|
+
* Control → ControlPanel
|
|
19
|
+
*/
|
|
20
|
+
import type { ReactNode } from "react";
|
|
21
|
+
import type { DeviceControlProps } from "./control-registry";
|
|
22
|
+
export { ThermostatHeroCard } from "./thermostat-hero-card";
|
|
23
|
+
export { LockHeroCard } from "./lock-hero-card";
|
|
24
|
+
export { LightHeroCard } from "./light-hero-card";
|
|
25
|
+
export { FanHeroCard } from "./fan-hero-card";
|
|
26
|
+
export { SwitchHeroCard } from "./switch-hero-card";
|
|
27
|
+
export { MediaPlayerHeroCard } from "./media-player-hero-card";
|
|
28
|
+
export { AlarmHeroCard, AlarmInlineControl as AlarmPanelInlineControl } from "./alarm-hero-card";
|
|
29
|
+
export { AutomationHeroCard, AutomationInlineControl, ScriptHeroCard, ScriptInlineControl } from "./script-automation-controls";
|
|
30
|
+
export declare function SwitchInlineControl({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
31
|
+
export declare function LockInlineControl({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
32
|
+
export declare function LightInlineControl({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
33
|
+
export declare function FanInlineControl({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
34
|
+
export declare function ThermostatInlineControl({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
35
|
+
export declare function AcInlineControl({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
36
|
+
export declare function AcHeroCard({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
37
|
+
export declare function MediaPlayerInlineControl({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
38
|
+
export declare function ControlInlineControl({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
39
|
+
export declare function ControlHeroCard({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Pet-feeder controls for a `DeviceType.PetFeeder` device.
|
|
3
|
+
*
|
|
4
|
+
* Reads the `pet-feeder` cap status slice (foodLevel / food1 / food2 /
|
|
5
|
+
* lowFood / batteryPower / desiccantLeftDays / feeding / status / error /
|
|
6
|
+
* errorCode / isDualHopper + the four persisted settings) and renders:
|
|
7
|
+
* - PetFeederInlineControl (device-list row): a compact food-level +
|
|
8
|
+
* battery readout with a one-tap Feed button (default portion).
|
|
9
|
+
* - PetFeederHeroCard (device-detail hero): the food-bowl fill gauge
|
|
10
|
+
* signature, battery + desiccant readouts, a manual-feed portion
|
|
11
|
+
* stepper honouring the 4-200 g hardware range (per-hopper on
|
|
12
|
+
* dual-hopper models), a maintenance action row (Call pet / Reset
|
|
13
|
+
* desiccant / Mark refilled) and the child-lock / indicator-light /
|
|
14
|
+
* feed-sound / volume settings.
|
|
15
|
+
*
|
|
16
|
+
* Mirrors the AC card's `useDeviceCapability` + inferred-cap pattern so
|
|
17
|
+
* the row and hero never diverge. Actions are gated on `available`.
|
|
18
|
+
*/
|
|
19
|
+
import { type ReactNode } from "react";
|
|
20
|
+
import type { ControlPanelProps } from "./types.js";
|
|
21
|
+
export declare function PetFeederPanel({ trpc, deviceId, layout, optimistic }: ControlPanelProps): ReactNode;
|
|
4
22
|
interface DeviceControlProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
23
|
+
readonly trpc: ControlPanelProps["trpc"];
|
|
24
|
+
readonly deviceId: number;
|
|
25
|
+
readonly features: readonly string[] | undefined;
|
|
26
|
+
readonly optimistic?: boolean;
|
|
9
27
|
}
|
|
10
|
-
export declare function PetFeederInlineControl({ trpc, deviceId, features, optimistic
|
|
11
|
-
export declare function PetFeederHeroCard({ trpc, deviceId, features, optimistic
|
|
28
|
+
export declare function PetFeederInlineControl({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
29
|
+
export declare function PetFeederHeroCard({ trpc, deviceId, features, optimistic }: DeviceControlProps): ReactNode;
|
|
12
30
|
export {};
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* <PopoverRowAction> — generic icon-button → portal popover.
|
|
3
|
+
*
|
|
4
|
+
* Distilled from `PtzQuickAction` (device-item/actions.tsx): a 5x5
|
|
5
|
+
* icon-button trigger that opens a fixed-position panel mounted on
|
|
6
|
+
* `document.body` (so it escapes the table's `overflow` clip), anchored
|
|
7
|
+
* under the trigger and clamped inside the viewport. Closes on a second
|
|
8
|
+
* trigger click or an outside `mousedown`.
|
|
9
|
+
*
|
|
10
|
+
* Available for use by any composite that needs an icon-button → panel
|
|
11
|
+
* popover pattern (e.g. PTZ quick-action, more-actions menu).
|
|
12
|
+
*/
|
|
13
|
+
import { type ReactNode } from "react";
|
|
14
|
+
import type { LucideIcon } from "lucide-react";
|
|
3
15
|
interface PopoverRowActionProps {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
16
|
+
readonly icon: LucideIcon;
|
|
17
|
+
readonly title: string;
|
|
18
|
+
readonly children: ReactNode;
|
|
7
19
|
}
|
|
8
|
-
export declare function PopoverRowAction({ icon: Icon, title, children
|
|
20
|
+
export declare function PopoverRowAction({ icon: Icon, title, children }: PopoverRowActionProps): ReactNode;
|
|
9
21
|
export {};
|
|
@@ -1,20 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* <PrimaryChildPicker> — controlled dropdown that selects which entity-child of
|
|
3
|
+
* a CONTAINER device is its PRIMARY child.
|
|
4
|
+
*
|
|
5
|
+
* The picker is a thin, presentation-only controlled `<select>`: it carries each
|
|
6
|
+
* child's numeric `id` on its `<option>` values (stable React keys + selection),
|
|
7
|
+
* but reports a change as the chosen child's re-sync/rename-stable `entityId` —
|
|
8
|
+
* which is what the durable override (`deviceManager.setPrimaryChildEntityId`)
|
|
9
|
+
* persists. Resolving the CURRENT primary child (priority default vs. persisted
|
|
10
|
+
* override) is the caller's job; this component only renders the choice and
|
|
11
|
+
* surfaces a new pick.
|
|
12
|
+
*
|
|
13
|
+
* Extracted from the container detail hero so the same selector can live in the
|
|
14
|
+
* device's primary config block (next to name / location) instead of floating on
|
|
15
|
+
* the hero card. The hero no longer owns it.
|
|
16
|
+
*/
|
|
17
|
+
import type { ReactNode } from "react";
|
|
18
|
+
import { type ContainerChild } from "./container-primary";
|
|
3
19
|
/** A child row the picker can offer. */
|
|
4
20
|
export interface PrimaryChildOption extends ContainerChild {
|
|
5
|
-
|
|
21
|
+
readonly name: string;
|
|
6
22
|
}
|
|
7
23
|
export interface PrimaryChildPickerProps {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
/** The container's entity-children (from `deviceManager.getChildren`). */
|
|
25
|
+
readonly childrenList: readonly PrimaryChildOption[];
|
|
26
|
+
/** Numeric id of the currently-resolved primary child. */
|
|
27
|
+
readonly selectedId: number;
|
|
28
|
+
/** Called with the picked child's re-sync/rename-stable `entityId`. */
|
|
29
|
+
/** Called with the picked child's `stableId` — the canonical override key. */
|
|
30
|
+
readonly onSetPrimary: (childStableId: string) => void;
|
|
31
|
+
/** Disable the control while a persist is in flight. */
|
|
32
|
+
readonly disabled?: boolean;
|
|
33
|
+
/** Optional extra classes for the `<select>` (so a host row can size it). */
|
|
34
|
+
readonly className?: string;
|
|
19
35
|
}
|
|
20
|
-
export declare function PrimaryChildPicker({ childrenList, selectedId, onSetPrimary, disabled, className
|
|
36
|
+
export declare function PrimaryChildPicker({ childrenList, selectedId, onSetPrimary, disabled, className }: PrimaryChildPickerProps): ReactNode;
|
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Which child a container is rendered AS — this surface's name for the shared
|
|
3
|
-
* rule.
|
|
4
|
-
*
|
|
5
|
-
* The list and the resolution used to live here, in a COPY that carried a
|
|
6
|
-
* comment asking the Home Assistant adoption mapping and the viewer's panel to
|
|
7
|
-
* stay in sync with it. Three lists and three comments is not one rule, it is
|
|
8
|
-
* three chances to drift. Both now come from `@camstack/types`, which all of
|
|
9
|
-
* them already depend on; what remains here is the adapter for this module's
|
|
10
|
-
* historical `ChildRef` shape.
|
|
11
|
-
*/
|
|
12
1
|
/** The shared precedence, under this module's historical name. */
|
|
13
2
|
export declare const PRIORITY: readonly string[];
|
|
14
3
|
export interface ChildRef {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
readonly id: number;
|
|
5
|
+
readonly entityId: string;
|
|
6
|
+
readonly type: string;
|
|
7
|
+
/** `DeviceRole`, ranked ABOVE `type` — see `CONTAINER_CHILD_ROLE_PRIORITY`. */
|
|
8
|
+
readonly role?: string | undefined;
|
|
9
|
+
/** Operator-facing name — used for the namesake tiebreak. */
|
|
10
|
+
readonly name?: string | undefined;
|
|
22
11
|
}
|
|
23
12
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
* Resolve a container's primary child: the operator's pick when it still
|
|
14
|
+
* matches a live child, else the highest-priority type.
|
|
15
|
+
*
|
|
16
|
+
* `entityId` here is `sourceInfo?.id ?? stableId` (see `containerChildToRef`).
|
|
17
|
+
* The shared resolver matches its canonical `stableId` key first and accepts
|
|
18
|
+
* that legacy value too, so a pick stored under either keeps resolving.
|
|
19
|
+
*/
|
|
31
20
|
export declare function resolvePrimaryChild(children: readonly ChildRef[], overrideEntityId: string | undefined, containerName?: string): ChildRef | null;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
2
|
export interface RadialGaugeProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
/** Fill fraction 0..1 (brightness or speed level). */
|
|
4
|
+
readonly fraction: number;
|
|
5
|
+
/** Hex/CSS colour for the fill arc + knob border. */
|
|
6
|
+
readonly color: string;
|
|
7
|
+
/** Centered content (icon + value readout). */
|
|
8
|
+
readonly children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* When provided, the ArcKnob becomes draggable: dragging it reports the new
|
|
11
|
+
* arc fraction (0..1) to the parent, which owns the value and re-renders the
|
|
12
|
+
* gauge at the new `fraction`. When omitted the knob is display-only.
|
|
13
|
+
*/
|
|
14
|
+
readonly onDragFraction?: (fraction: number) => void;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export declare function RadialGauge({ fraction, color, children, onDragFraction
|
|
17
|
+
* Circular gauge with an ArcKnob at `fraction` and centered children.
|
|
18
|
+
* The knob wrapper carries `data-testid="arc-knob"` for test assertions.
|
|
19
|
+
*/
|
|
20
|
+
export declare function RadialGauge({ fraction, color, children, onDragFraction }: RadialGaugeProps): ReactNode;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { DeviceControlProps } from
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { DeviceControlProps } from "./control-registry";
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
* "3 min ago", or nothing at all.
|
|
5
|
+
*
|
|
6
|
+
* **0 means NEVER RUN** on both status schemas, and it must not render as the
|
|
7
|
+
* epoch. "1 Jan 1970" next to a script is the kind of detail that sends an
|
|
8
|
+
* operator looking for a clock problem that does not exist.
|
|
9
|
+
*/
|
|
10
10
|
export declare function lastRunLabel(atMs: number, nowMs: number): string | null;
|
|
11
11
|
export declare function ScriptInlineControl({ trpc, deviceId, optimistic }: DeviceControlProps): ReactNode;
|
|
12
12
|
export declare function ScriptHeroCard({ trpc, deviceId, optimistic }: DeviceControlProps): ReactNode;
|
|
13
|
-
export declare function AutomationInlineControl({ trpc, deviceId, optimistic
|
|
13
|
+
export declare function AutomationInlineControl({ trpc, deviceId, optimistic }: DeviceControlProps): ReactNode;
|
|
14
14
|
export declare function AutomationHeroCard({ trpc, deviceId, optimistic }: DeviceControlProps): ReactNode;
|
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { DeviceControlProps } from './control-registry';
|
|
3
1
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
* SensorHeroCard — large-format sensor value display for the device-detail
|
|
3
|
+
* hero area.
|
|
4
|
+
*
|
|
5
|
+
* Renders:
|
|
6
|
+
* - Typed numeric sensors: value in `text-3xl font-semibold tabular-nums` +
|
|
7
|
+
* canonical unit from ROLE_DESCRIPTOR (e.g. temperature-sensor → '°C').
|
|
8
|
+
* - Generic numeric-sensor: value + unit read live from the slice
|
|
9
|
+
* (`slice.unit`, populated by the HA provider from state attributes).
|
|
10
|
+
* - Binary sensors: coloured state badge ("Detected"/"Clear" etc.) — same
|
|
11
|
+
* labels and colours as SensorValueAtom's binary branch.
|
|
12
|
+
* - Presence: Home/Away/zone-name badge — same labels as SensorValueAtom.
|
|
13
|
+
* - All: sensor name label below the value.
|
|
14
|
+
*
|
|
15
|
+
* Unit resolution uses the same logic as SensorValueAtom (live slice.unit
|
|
16
|
+
* wins, ROLE_DESCRIPTOR canonicalUnit as fallback) — the two surfaces stay
|
|
17
|
+
* in sync.
|
|
18
|
+
*/
|
|
19
|
+
import type { ReactNode } from "react";
|
|
20
|
+
import type { DeviceControlProps } from "./control-registry";
|
|
21
|
+
/**
|
|
22
|
+
* SensorHeroCard — full hero card for the device-detail area.
|
|
23
|
+
*
|
|
24
|
+
* Fetches the device row (name, role, sourceInfo) via React Query
|
|
25
|
+
* (`deviceManager.getDevice`), then delegates rendering to the inner
|
|
26
|
+
* component that reads the live state slice via the proxy.
|
|
27
|
+
*/
|
|
10
28
|
export declare function SensorHeroCard({ trpc, deviceId }: DeviceControlProps): ReactNode;
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { DeviceControlProps } from './control-registry';
|
|
3
1
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
* SensorInlineControl — registry-compatible wrapper around SensorValueAtom.
|
|
3
|
+
*
|
|
4
|
+
* Bridges the registry's `DeviceControlProps` (trpc, deviceId, features) into
|
|
5
|
+
* SensorValueAtom's `{trpc, device}` shape by fetching the device row (role)
|
|
6
|
+
* from `deviceManager.getDevice`. Returns null while the device row is loading
|
|
7
|
+
* or when no role is found (not a sensor accessory).
|
|
8
|
+
*
|
|
9
|
+
* Unit resolution happens in SensorValueAtom: typed roles use the descriptor's
|
|
10
|
+
* canonical unit; generic numeric-sensor reads unit live from the slice.
|
|
11
|
+
* sourceInfo is no longer needed here.
|
|
12
|
+
*/
|
|
13
|
+
import type { ReactNode } from "react";
|
|
14
|
+
import type { DeviceControlProps } from "./control-registry";
|
|
15
|
+
/**
|
|
16
|
+
* Registry InlineControl for Sensor and Presence device types.
|
|
17
|
+
*
|
|
18
|
+
* Fetches the device row once (React Query cache — no waterfall for
|
|
19
|
+
* repeated renders), maps to DeviceItemDevice, and delegates rendering
|
|
20
|
+
* to the existing SensorValueAtom so both the row special-case path and
|
|
21
|
+
* the registry path stay in sync.
|
|
22
|
+
*/
|
|
11
23
|
export declare function SensorInlineControl({ trpc, deviceId }: DeviceControlProps): ReactNode;
|