@camstack/ui-library 1.2.257 → 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
package/dist/index.js
CHANGED
|
@@ -10693,7 +10693,10 @@ var IconButton = forwardRef(({ className, variant, size, icon: Icon, ...props },
|
|
|
10693
10693
|
size
|
|
10694
10694
|
}), className),
|
|
10695
10695
|
...props,
|
|
10696
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
10696
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
10697
|
+
className: "h-4 w-4",
|
|
10698
|
+
"aria-hidden": "true"
|
|
10699
|
+
})
|
|
10697
10700
|
});
|
|
10698
10701
|
});
|
|
10699
10702
|
IconButton.displayName = "IconButton";
|
|
@@ -10714,19 +10717,19 @@ var inputVariants = cva("h-7 w-full px-2.5 text-xs bg-surface border rounded-md
|
|
|
10714
10717
|
});
|
|
10715
10718
|
var Input = forwardRef(({ className, state, leftSlot, rightSlot, ...props }, ref) => {
|
|
10716
10719
|
if (leftSlot || rightSlot) return /* @__PURE__ */ jsxs("div", {
|
|
10717
|
-
className: "relative flex items-center
|
|
10720
|
+
className: cn("relative flex items-center", className),
|
|
10718
10721
|
children: [
|
|
10719
10722
|
leftSlot && /* @__PURE__ */ jsx("div", {
|
|
10720
|
-
className: "absolute left-2.5 flex items-center pointer-events-none",
|
|
10723
|
+
className: "absolute left-2.5 flex items-center text-foreground-subtle pointer-events-none",
|
|
10721
10724
|
children: leftSlot
|
|
10722
10725
|
}),
|
|
10723
10726
|
/* @__PURE__ */ jsx("input", {
|
|
10724
10727
|
ref,
|
|
10725
|
-
className: cn(inputVariants({ state }), leftSlot
|
|
10728
|
+
className: cn(inputVariants({ state }), leftSlot && "pl-8", rightSlot && "pr-8", className),
|
|
10726
10729
|
...props
|
|
10727
10730
|
}),
|
|
10728
10731
|
rightSlot && /* @__PURE__ */ jsx("div", {
|
|
10729
|
-
className: "absolute right-2.5 flex items-center
|
|
10732
|
+
className: "absolute right-2.5 flex items-center text-foreground-subtle",
|
|
10730
10733
|
children: rightSlot
|
|
10731
10734
|
})
|
|
10732
10735
|
]
|
|
@@ -30702,16 +30705,6 @@ function resolveEffectiveStepModel(input) {
|
|
|
30702
30705
|
}
|
|
30703
30706
|
//#endregion
|
|
30704
30707
|
//#region src/composites/root-model-source.tsx
|
|
30705
|
-
/**
|
|
30706
|
-
* "Use the root model" — the step editor's control for a step the camera's
|
|
30707
|
-
* ROOT detection model can supply (D730).
|
|
30708
|
-
*
|
|
30709
|
-
* The flag (`useRootModel`, in the step's own settings) is an operator INTENT
|
|
30710
|
-
* kept beside the step's model: checking it never changes the model, and a
|
|
30711
|
-
* root that cannot supply the step leaves the step running its own model while
|
|
30712
|
-
* the flag waits, inactive, for a root that can. Whether it is in force is
|
|
30713
|
-
* `resolveRootSupply` — the same function the runner decides with.
|
|
30714
|
-
*/
|
|
30715
30708
|
/** The editor's view of the flag for one step, or `null` for a step no root can supply. */
|
|
30716
30709
|
function rootSourceState(stepId, settings, rootModel) {
|
|
30717
30710
|
if (!isRootSuppliableStepId(stepId)) return null;
|
|
@@ -31663,6 +31656,7 @@ var Separator = forwardRef(({ className, orientation, ...props }, ref) => {
|
|
|
31663
31656
|
return /* @__PURE__ */ jsx("div", {
|
|
31664
31657
|
ref,
|
|
31665
31658
|
role: "separator",
|
|
31659
|
+
"aria-orientation": orientation ?? "horizontal",
|
|
31666
31660
|
className: cn(separatorVariants({ orientation }), className),
|
|
31667
31661
|
...props
|
|
31668
31662
|
});
|
|
@@ -31964,15 +31958,27 @@ var ScrollArea = forwardRef(({ className, ...props }, ref) => {
|
|
|
31964
31958
|
ScrollArea.displayName = "ScrollArea";
|
|
31965
31959
|
//#endregion
|
|
31966
31960
|
//#region src/primitives/floating-panel.tsx
|
|
31967
|
-
function FloatingPanel({ title, onClose, children, defaultWidth = 360, defaultHeight = 280, minWidth = 280, minHeight = 160, offsetIndex = 0, className }) {
|
|
31968
|
-
const [
|
|
31961
|
+
function FloatingPanel({ title, icon: Icon, position, onPositionChange, size: controlledSize, onSizeChange, onClose, children, defaultWidth = 360, defaultHeight = 280, minWidth = 280, minHeight = 160, offsetIndex = 0, className }) {
|
|
31962
|
+
const [ownPos, setOwnPos] = useState({
|
|
31969
31963
|
x: 80 + offsetIndex * 30,
|
|
31970
31964
|
y: 80 + offsetIndex * 30
|
|
31971
31965
|
});
|
|
31972
|
-
const [
|
|
31966
|
+
const [ownSize, setOwnSize] = useState({
|
|
31973
31967
|
w: defaultWidth,
|
|
31974
31968
|
h: defaultHeight
|
|
31975
31969
|
});
|
|
31970
|
+
const pos = position ?? ownPos;
|
|
31971
|
+
const size = controlledSize ?? ownSize;
|
|
31972
|
+
const latest = useRef({
|
|
31973
|
+
size,
|
|
31974
|
+
onPositionChange,
|
|
31975
|
+
onSizeChange
|
|
31976
|
+
});
|
|
31977
|
+
latest.current = {
|
|
31978
|
+
size,
|
|
31979
|
+
onPositionChange,
|
|
31980
|
+
onSizeChange
|
|
31981
|
+
};
|
|
31976
31982
|
const [minimized, setMinimized] = useState(false);
|
|
31977
31983
|
const dragging = useRef(false);
|
|
31978
31984
|
const resizing = useRef(false);
|
|
@@ -32000,10 +32006,14 @@ function FloatingPanel({ title, onClose, children, defaultWidth = 360, defaultHe
|
|
|
32000
32006
|
}, []);
|
|
32001
32007
|
useEffect(() => {
|
|
32002
32008
|
const onMouseMove = (e) => {
|
|
32003
|
-
if (dragging.current)
|
|
32004
|
-
|
|
32005
|
-
|
|
32006
|
-
|
|
32009
|
+
if (dragging.current) {
|
|
32010
|
+
const next = {
|
|
32011
|
+
x: e.clientX - offset.current.x,
|
|
32012
|
+
y: e.clientY - offset.current.y
|
|
32013
|
+
};
|
|
32014
|
+
setOwnPos(next);
|
|
32015
|
+
latest.current.onPositionChange?.(next);
|
|
32016
|
+
}
|
|
32007
32017
|
if (resizing.current) {
|
|
32008
32018
|
const dx = e.clientX - offset.current.x;
|
|
32009
32019
|
const dy = e.clientY - offset.current.y;
|
|
@@ -32011,10 +32021,17 @@ function FloatingPanel({ title, onClose, children, defaultWidth = 360, defaultHe
|
|
|
32011
32021
|
x: e.clientX,
|
|
32012
32022
|
y: e.clientY
|
|
32013
32023
|
};
|
|
32014
|
-
|
|
32024
|
+
const prev = latest.current.size;
|
|
32025
|
+
const next = {
|
|
32015
32026
|
w: Math.max(minWidth, prev.w + dx),
|
|
32016
32027
|
h: Math.max(minHeight, prev.h + dy)
|
|
32017
|
-
}
|
|
32028
|
+
};
|
|
32029
|
+
latest.current = {
|
|
32030
|
+
...latest.current,
|
|
32031
|
+
size: next
|
|
32032
|
+
};
|
|
32033
|
+
setOwnSize(next);
|
|
32034
|
+
latest.current.onSizeChange?.(next);
|
|
32018
32035
|
}
|
|
32019
32036
|
};
|
|
32020
32037
|
const onMouseUp = () => {
|
|
@@ -32033,9 +32050,15 @@ function FloatingPanel({ title, onClose, children, defaultWidth = 360, defaultHe
|
|
|
32033
32050
|
style: { maxHeight: "60dvh" },
|
|
32034
32051
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
32035
32052
|
className: "flex items-center justify-between gap-2 px-3 py-2 border-b border-border shrink-0 bg-surface",
|
|
32036
|
-
children: [/* @__PURE__ */
|
|
32037
|
-
className: "
|
|
32038
|
-
children:
|
|
32053
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
32054
|
+
className: "flex items-center gap-2 min-w-0",
|
|
32055
|
+
children: [Icon && /* @__PURE__ */ jsx(Icon, {
|
|
32056
|
+
size: 12,
|
|
32057
|
+
className: "text-primary shrink-0"
|
|
32058
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
32059
|
+
className: "text-[11px] font-medium truncate",
|
|
32060
|
+
children: title
|
|
32061
|
+
})]
|
|
32039
32062
|
}), /* @__PURE__ */ jsxs("div", {
|
|
32040
32063
|
className: "flex items-center gap-1 shrink-0",
|
|
32041
32064
|
children: [/* @__PURE__ */ jsx("button", {
|
|
@@ -32066,13 +32089,20 @@ function FloatingPanel({ title, onClose, children, defaultWidth = 360, defaultHe
|
|
|
32066
32089
|
className: "flex items-center justify-between gap-2 px-3 py-2 border-b border-border cursor-move select-none shrink-0 bg-surface",
|
|
32067
32090
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
32068
32091
|
className: "flex items-center gap-2 min-w-0",
|
|
32069
|
-
children: [
|
|
32070
|
-
|
|
32071
|
-
|
|
32072
|
-
|
|
32073
|
-
|
|
32074
|
-
|
|
32075
|
-
|
|
32092
|
+
children: [
|
|
32093
|
+
/* @__PURE__ */ jsx(GripHorizontal, {
|
|
32094
|
+
size: 12,
|
|
32095
|
+
className: "text-foreground-subtle shrink-0"
|
|
32096
|
+
}),
|
|
32097
|
+
Icon && /* @__PURE__ */ jsx(Icon, {
|
|
32098
|
+
size: 12,
|
|
32099
|
+
className: "text-primary shrink-0"
|
|
32100
|
+
}),
|
|
32101
|
+
/* @__PURE__ */ jsx("span", {
|
|
32102
|
+
className: "text-[11px] font-medium truncate",
|
|
32103
|
+
children: title
|
|
32104
|
+
})
|
|
32105
|
+
]
|
|
32076
32106
|
}), /* @__PURE__ */ jsxs("div", {
|
|
32077
32107
|
className: "flex items-center gap-1 shrink-0",
|
|
32078
32108
|
children: [/* @__PURE__ */ jsx("button", {
|
|
@@ -32549,19 +32579,6 @@ function AudioWaveform({ samples, sampleRate = 16e3, height = 96, className = ""
|
|
|
32549
32579
|
}
|
|
32550
32580
|
//#endregion
|
|
32551
32581
|
//#region src/composites/battery-badge.tsx
|
|
32552
|
-
/**
|
|
32553
|
-
* BatteryBadge — compact battery indicator for camera tiles + headers.
|
|
32554
|
-
*
|
|
32555
|
-
* Renders a battery icon with the percentage, a charging glyph when the
|
|
32556
|
-
* device is on DC/solar, and a moon when the camera is sleeping (so
|
|
32557
|
-
* operators don't blame the platform for low fps on a sleeping cam).
|
|
32558
|
-
*
|
|
32559
|
-
* Self-contained on data: the caller passes a `status` snapshot from
|
|
32560
|
-
* `trpc.battery.getStatus.useQuery` or the `battery.onStatusChanged`
|
|
32561
|
-
* event subscription. Returns `null` when status is missing so the
|
|
32562
|
-
* call-site can drop the badge in unconditionally — non-battery
|
|
32563
|
-
* cameras simply produce no badge.
|
|
32564
|
-
*/
|
|
32565
32582
|
/** A binary battery is "low" below this stand-in percentage (normal maps to
|
|
32566
32583
|
* 100, low to a sub-threshold value). Keep in sync with the HA container. */
|
|
32567
32584
|
var BINARY_LOW_THRESHOLD = 50;
|
|
@@ -58578,26 +58595,39 @@ function SnapshotButton({ trpc, deviceId, deviceName, size = "sm", className })
|
|
|
58578
58595
|
}
|
|
58579
58596
|
//#endregion
|
|
58580
58597
|
//#region src/composites/stat-card.tsx
|
|
58581
|
-
function StatCard({ value, label, trend, className }) {
|
|
58582
|
-
return /* @__PURE__ */ jsxs(
|
|
58583
|
-
className: cn("
|
|
58584
|
-
children: [
|
|
58585
|
-
|
|
58586
|
-
|
|
58587
|
-
className: "
|
|
58588
|
-
|
|
58589
|
-
|
|
58590
|
-
|
|
58591
|
-
|
|
58592
|
-
|
|
58593
|
-
|
|
58594
|
-
|
|
58595
|
-
|
|
58596
|
-
|
|
58597
|
-
|
|
58598
|
-
|
|
58599
|
-
|
|
58600
|
-
|
|
58598
|
+
function StatCard({ value, label, icon: Icon, subtext, valueClassName, trend, className }) {
|
|
58599
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
58600
|
+
className: cn("rounded-lg border border-border bg-surface p-2 sm:p-2.5 min-w-0", className),
|
|
58601
|
+
children: [
|
|
58602
|
+
/* @__PURE__ */ jsxs("div", {
|
|
58603
|
+
className: "flex items-center gap-1.5 mb-0.5 min-w-0",
|
|
58604
|
+
children: [Icon && /* @__PURE__ */ jsx(Icon, { className: "h-3 w-3 text-foreground-subtle flex-shrink-0" }), /* @__PURE__ */ jsx("span", {
|
|
58605
|
+
className: "text-[10px] text-foreground-subtle uppercase tracking-wider whitespace-nowrap overflow-hidden text-ellipsis min-w-0",
|
|
58606
|
+
title: label,
|
|
58607
|
+
children: label
|
|
58608
|
+
})]
|
|
58609
|
+
}),
|
|
58610
|
+
/* @__PURE__ */ jsxs("div", {
|
|
58611
|
+
className: "flex items-baseline gap-2 min-w-0",
|
|
58612
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
58613
|
+
className: cn("text-lg font-semibold leading-tight whitespace-nowrap overflow-hidden text-ellipsis min-w-0", valueClassName ?? "text-foreground"),
|
|
58614
|
+
title: String(value),
|
|
58615
|
+
children: value
|
|
58616
|
+
}), trend && /* @__PURE__ */ jsxs("span", {
|
|
58617
|
+
className: cn("inline-flex items-center gap-0.5 text-xs font-medium shrink-0", trend.direction === "up" ? "text-success" : "text-danger"),
|
|
58618
|
+
children: [
|
|
58619
|
+
trend.direction === "up" ? /* @__PURE__ */ jsx(TrendingUp, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(TrendingDown, { className: "h-3 w-3" }),
|
|
58620
|
+
trend.value,
|
|
58621
|
+
"%"
|
|
58622
|
+
]
|
|
58623
|
+
})]
|
|
58624
|
+
}),
|
|
58625
|
+
subtext && /* @__PURE__ */ jsx("p", {
|
|
58626
|
+
className: "text-[10px] text-foreground-subtle mt-0.5 truncate",
|
|
58627
|
+
title: subtext,
|
|
58628
|
+
children: subtext
|
|
58629
|
+
})
|
|
58630
|
+
]
|
|
58601
58631
|
});
|
|
58602
58632
|
}
|
|
58603
58633
|
//#endregion
|
|
@@ -58618,9 +58648,33 @@ var statusConfig = {
|
|
|
58618
58648
|
unknown: {
|
|
58619
58649
|
colorClass: "bg-foreground-subtle",
|
|
58620
58650
|
label: "Unknown"
|
|
58651
|
+
},
|
|
58652
|
+
running: {
|
|
58653
|
+
colorClass: "bg-success",
|
|
58654
|
+
label: "Running"
|
|
58655
|
+
},
|
|
58656
|
+
stopped: {
|
|
58657
|
+
colorClass: "bg-foreground-subtle",
|
|
58658
|
+
label: "Stopped"
|
|
58659
|
+
},
|
|
58660
|
+
error: {
|
|
58661
|
+
colorClass: "bg-danger",
|
|
58662
|
+
label: "Error"
|
|
58663
|
+
},
|
|
58664
|
+
idle: {
|
|
58665
|
+
colorClass: "bg-info",
|
|
58666
|
+
label: "Idle"
|
|
58667
|
+
},
|
|
58668
|
+
enabled: {
|
|
58669
|
+
colorClass: "bg-success",
|
|
58670
|
+
label: "Enabled"
|
|
58671
|
+
},
|
|
58672
|
+
disabled: {
|
|
58673
|
+
colorClass: "bg-warning",
|
|
58674
|
+
label: "Disabled"
|
|
58621
58675
|
}
|
|
58622
58676
|
};
|
|
58623
|
-
function StatusBadge({ status, showDot = true, showLabel = true, size = "sm", className }) {
|
|
58677
|
+
function StatusBadge({ status, label, showDot = true, showLabel = true, size = "sm", className }) {
|
|
58624
58678
|
const config = statusConfig[status];
|
|
58625
58679
|
return /* @__PURE__ */ jsxs("span", {
|
|
58626
58680
|
className: cn("inline-flex items-center gap-1.5", size === "sm" ? "text-xs" : "text-sm", className),
|
|
@@ -58629,7 +58683,7 @@ function StatusBadge({ status, showDot = true, showLabel = true, size = "sm", cl
|
|
|
58629
58683
|
"aria-hidden": "true"
|
|
58630
58684
|
}), showLabel && /* @__PURE__ */ jsx("span", {
|
|
58631
58685
|
className: "text-foreground",
|
|
58632
|
-
children: config.label
|
|
58686
|
+
children: label ?? config.label
|
|
58633
58687
|
})]
|
|
58634
58688
|
});
|
|
58635
58689
|
}
|
package/dist/lib/cap-error.d.ts
CHANGED
|
@@ -1,41 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* once every throw site has been migrated.
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* Returns `true` when `err` indicates that the requested capability has
|
|
24
|
-
* no provider bound for the device — i.e. the device legitimately does
|
|
25
|
-
* not expose this cap and the UI should stay hidden / show a friendly
|
|
26
|
-
* "not supported" message.
|
|
27
|
-
*
|
|
28
|
-
* Returns `false` for real dispatch errors (`transport-failed`) — those
|
|
29
|
-
* should be surfaced to the operator as unexpected failures.
|
|
30
|
-
*
|
|
31
|
-
* ## Absent-provider reasons
|
|
32
|
-
* - `'no-provider'` — no provider is registered for this cap/device pair.
|
|
33
|
-
* - `'node-offline'` — the node that hosts the cap is not reachable; the
|
|
34
|
-
* device is effectively unavailable so we treat it as absent.
|
|
35
|
-
*
|
|
36
|
-
* ## Not-absent reasons
|
|
37
|
-
* - `'transport-failed'` — a provider exists but the call failed in transit.
|
|
38
|
-
* - `'cap-unknown'` — the cap name isn't registered at all; treat as
|
|
39
|
-
* a real error (likely a programming mistake or version skew).
|
|
40
|
-
*/
|
|
2
|
+
* Returns `true` when `err` indicates that the requested capability has
|
|
3
|
+
* no provider bound for the device — i.e. the device legitimately does
|
|
4
|
+
* not expose this cap and the UI should stay hidden / show a friendly
|
|
5
|
+
* "not supported" message.
|
|
6
|
+
*
|
|
7
|
+
* Returns `false` for real dispatch errors (`transport-failed`) — those
|
|
8
|
+
* should be surfaced to the operator as unexpected failures.
|
|
9
|
+
*
|
|
10
|
+
* ## Absent-provider reasons
|
|
11
|
+
* - `'no-provider'` — no provider is registered for this cap/device pair.
|
|
12
|
+
* - `'node-offline'` — the node that hosts the cap is not reachable; the
|
|
13
|
+
* device is effectively unavailable so we treat it as absent.
|
|
14
|
+
*
|
|
15
|
+
* ## Not-absent reasons
|
|
16
|
+
* - `'transport-failed'` — a provider exists but the call failed in transit.
|
|
17
|
+
* - `'cap-unknown'` — the cap name isn't registered at all; treat as
|
|
18
|
+
* a real error (likely a programming mistake or version skew).
|
|
19
|
+
*/
|
|
41
20
|
export declare function isAbsentProvider(err: unknown): boolean;
|
package/dist/lib/cn.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ClassValue } from
|
|
1
|
+
import { type ClassValue } from "clsx";
|
|
2
2
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
@@ -1,41 +1,75 @@
|
|
|
1
|
-
import { QueryClient, QueryKey } from '@tanstack/react-query';
|
|
2
1
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
* Fleet-list query defaults — the ONE owner of the `deviceManager.listAll`
|
|
3
|
+
* caching window (D274).
|
|
4
|
+
*
|
|
5
|
+
* ── The bug class this prevents ────────────────────────────────────────────
|
|
6
|
+
* `staleTime` is a per-OBSERVER setting in React Query, not a property of the
|
|
7
|
+
* cache entry. `defaultQueryOptions` resolves it once per mounted observer as
|
|
8
|
+
*
|
|
9
|
+
* { ...defaultOptions.queries, ...getQueryDefaults(queryKey), ...callSite }
|
|
10
|
+
*
|
|
11
|
+
* so a single observer that leaves `staleTime` at the app-wide default of `0`
|
|
12
|
+
* re-triggers a fetch of the shared key on mount, no matter what its ~40
|
|
13
|
+
* siblings passed. The admin UI mounts the fleet list from the sidebar, the
|
|
14
|
+
* Devices page, Integrations, Recordings, Scenes, Retrain, the detection
|
|
15
|
+
* sections and four ui-library pickers at once — on a hub with 1017 devices
|
|
16
|
+
* that is one `deviceManager.listAll` round-trip per forgetful call site, at
|
|
17
|
+
* every boot.
|
|
18
|
+
*
|
|
19
|
+
* The previous attempt fixed this by hand at the call site, 25 times. It had
|
|
20
|
+
* already drifted before this file existed: every ui-library composite was
|
|
21
|
+
* missed, and those are the ones asking for the UNPROJECTED fleet.
|
|
22
|
+
*
|
|
23
|
+
* ── Why the query client and not the call site ─────────────────────────────
|
|
24
|
+
* `setQueryDefaults` keys off a query-key PREFIX, so one registration covers
|
|
25
|
+
* every `input` variant of the method — `{}`, `{ projection: 'slim' }`,
|
|
26
|
+
* `{ isCamera: true, projection: 'slim' }`, and whatever call site 44 invents.
|
|
27
|
+
* It sits ABOVE the call site in the merge order, so it cannot be forgotten;
|
|
28
|
+
* it sits BELOW an explicit option, so a call site that genuinely needs
|
|
29
|
+
* something else (a `refetchInterval`) still gets it.
|
|
30
|
+
*
|
|
31
|
+
* `scripts/check-fleet-query-defaults.ts` keeps both halves honest: every
|
|
32
|
+
* `QueryClient` in the admin UI and ui-library must run through here, and no
|
|
33
|
+
* call site may re-declare the window locally.
|
|
34
|
+
*/
|
|
35
|
+
import type { QueryClient, QueryKey } from "@tanstack/react-query";
|
|
36
|
+
/**
|
|
37
|
+
* The tRPC query-key PREFIX shared by every `deviceManager.listAll` observer.
|
|
38
|
+
* tRPC v11 builds `[[path], { input, type }]`, and `partialMatchKey` treats a
|
|
39
|
+
* shorter key as a prefix — so this matches all inputs, and only this method.
|
|
40
|
+
*/
|
|
7
41
|
export declare const FLEET_LIST_QUERY_KEY: QueryKey;
|
|
8
42
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export declare const FLEET_LIST_STALE_TIME_MS =
|
|
43
|
+
* 30 s, matching the window `GlobalSearch` established and the 21 call sites
|
|
44
|
+
* that copied it — this registration replaces them rather than competing with
|
|
45
|
+
* them.
|
|
46
|
+
*
|
|
47
|
+
* It is not longer for one reason: device mutations invalidate
|
|
48
|
+
* `[['deviceManager']]` (~20 call sites do, and the prefix covers `listAll`
|
|
49
|
+
* under every input), so an operator EDIT is never the thing this window makes
|
|
50
|
+
* stale. What it does bound is the change no client mutation announces — a
|
|
51
|
+
* provider discovering a camera, a device going offline, a scan adding rows.
|
|
52
|
+
* Nothing invalidates those, so the window is the only thing that picks them
|
|
53
|
+
* up, and 30 s is the cost an operator will tolerate for a row that appeared
|
|
54
|
+
* on its own.
|
|
55
|
+
*/
|
|
56
|
+
export declare const FLEET_LIST_STALE_TIME_MS = 3e4;
|
|
23
57
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
58
|
+
* 5 min. The app-wide default is `gcTime: 0` (a deliberate "no cross-navigation
|
|
59
|
+
* cache" choice), which drops the entry the instant its last observer
|
|
60
|
+
* unmounts — and that would make the `staleTime` above inert for every key
|
|
61
|
+
* without a permanently-mounted reader. `{ projection: 'slim' }` has one (the
|
|
62
|
+
* sidebar search); `{ isCamera: true, … }` and `{}` do not, so leaving `gcTime`
|
|
63
|
+
* at 0 would refetch the whole fleet on every return to Recordings or Scenes.
|
|
64
|
+
*
|
|
65
|
+
* Scoped to this one key: the fleet list is the largest and most re-read
|
|
66
|
+
* response in the UI, and it is comprehensively invalidated. The global
|
|
67
|
+
* default is untouched.
|
|
68
|
+
*/
|
|
35
69
|
export declare const FLEET_LIST_GC_TIME_MS: number;
|
|
36
70
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
71
|
+
* Register the fleet-list window on a query client. Call this on EVERY
|
|
72
|
+
* `QueryClient` that can mount a fleet consumer, immediately after
|
|
73
|
+
* construction — the guard enforces it.
|
|
74
|
+
*/
|
|
41
75
|
export declare function applyFleetQueryDefaults(queryClient: QueryClient): void;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export type ControlDateTimeFormat =
|
|
2
|
+
* Format an HA-native datetime control value in the user's locale.
|
|
3
|
+
*
|
|
4
|
+
* The `control` cap keeps the value verbatim in one of three HA-native shapes:
|
|
5
|
+
* - date → 'YYYY-MM-DD'
|
|
6
|
+
* - time → 'HH:MM' or 'HH:MM:SS'
|
|
7
|
+
* - datetime → full ISO timestamp ('YYYY-MM-DDTHH:MM[:SS]' or space-separated)
|
|
8
|
+
*
|
|
9
|
+
* This helper renders that value for the READ-ONLY (at-a-glance) context:
|
|
10
|
+
* - 'date' → locale date (e.g. en-US '6/7/2026')
|
|
11
|
+
* - 'time' → locale time (e.g. en-US '07:30 AM')
|
|
12
|
+
* - 'datetime' → locale date+time (medium date + short time)
|
|
13
|
+
*
|
|
14
|
+
* It NEVER throws: any value it cannot parse is returned unchanged (graceful
|
|
15
|
+
* fallback). `locale` is optional and defaults to the runtime/browser locale.
|
|
16
|
+
*/
|
|
17
|
+
export type ControlDateTimeFormat = "date" | "time" | "datetime";
|
|
18
18
|
export declare function formatControlDateTime(value: string, format: ControlDateTimeFormat, locale?: string): string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
* How long something lasted, the way this product says it.
|
|
3
|
+
*
|
|
4
|
+
* Promoted verbatim from `composites/cap-settings/RecordingPanel.tsx`, which
|
|
5
|
+
* had been the only place answering this question about MEDIA. It is now the
|
|
6
|
+
* only place, so a clip's length and a recording's retention read the same.
|
|
7
|
+
*
|
|
8
|
+
* Two other private formatters stay where they are, on purpose:
|
|
9
|
+
* `config-form-field.tsx` formats a config VALUE (sub-second `ms`, `—` for a
|
|
10
|
+
* value that is not a number), and `scene-monitor-copy.ts`'s `humanDuration`
|
|
11
|
+
* is deliberately single-unit and coarse for a sentence. Neither is a media
|
|
12
|
+
* length, and folding them in here would change what they say.
|
|
13
|
+
*/
|
|
14
14
|
export declare function formatDurationMs(ms: number): string;
|
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* placeholder or a seeded "known value, unknown change time" stamp), so
|
|
8
|
-
* callers can render nothing rather than a misleading "—", "NaN ago", or
|
|
9
|
-
* (for a seeded `1`) "20000 days ago".
|
|
10
|
-
*
|
|
11
|
-
* Future timestamps (clock skew between the device and the browser)
|
|
12
|
-
* collapse to "just now" instead of a negative duration.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* The earliest timestamp a real "last seen" could plausibly carry. Below
|
|
16
|
-
* this, a value is a placeholder or a seeded "known value, unknown change
|
|
17
|
-
* time" stamp (e.g. Homematic's `HM_SEEDED_CHANGED_AT = 1`) — never a real
|
|
18
|
-
* instant. Year 2000 predates every device this renders.
|
|
19
|
-
*/
|
|
2
|
+
* The earliest timestamp a real "last seen" could plausibly carry. Below
|
|
3
|
+
* this, a value is a placeholder or a seeded "known value, unknown change
|
|
4
|
+
* time" stamp (e.g. Homematic's `HM_SEEDED_CHANGED_AT = 1`) — never a real
|
|
5
|
+
* instant. Year 2000 predates every device this renders.
|
|
6
|
+
*/
|
|
20
7
|
export declare const MIN_PLAUSIBLE_TIMESTAMP_MS: number;
|
|
21
8
|
export declare function formatLastSeen(timestampMs: number | null | undefined): string | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
* Format a numeric sensor / control value with optional display precision.
|
|
3
|
+
*
|
|
4
|
+
* When `precision` is provided, delegates to `value.toFixed(precision)` which
|
|
5
|
+
* matches the HA `suggested_display_precision` contract.
|
|
6
|
+
* When absent, falls back to auto-formatting: integers render without a
|
|
7
|
+
* decimal point; non-integers use one decimal place.
|
|
8
|
+
*/
|
|
9
9
|
export declare function formatNumeric(value: number, precision: number | undefined): string;
|
package/dist/lib/hub-mount.d.ts
CHANGED
|
@@ -1,50 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* → `https://<hub>:4443/…` — so the browser never has to trust the hub's
|
|
7
|
-
* local certificate. The relay sends `X-Forwarded-Prefix` and the hub
|
|
8
|
-
* injects two things into the shell it serves for that request:
|
|
9
|
-
*
|
|
10
|
-
* <base href="<prefix>/">
|
|
11
|
-
* <meta name="camstack-mount" content="<prefix>/">
|
|
12
|
-
*
|
|
13
|
-
* This module is the ONE reader of that fact. Every URL the page composes
|
|
14
|
-
* toward the hub — tRPC HTTP and WS, `/api/webrtc`, `/addon/…` data planes,
|
|
15
|
-
* `/api/addon-assets`, MF remote entries, `<img src>` — goes through it:
|
|
16
|
-
*
|
|
17
|
-
* - `hubPath('/api/x')` → `/api/x` at the root, `/<prefix>/api/x` under one.
|
|
18
|
-
* A same-origin path; the default for fetch, `<img>`, links.
|
|
19
|
-
* - `hubOrigin()` → `https://host` or `https://host/<prefix>`; the
|
|
20
|
-
* `serverUrl` handed to the SDK and the players (they append `/trpc`,
|
|
21
|
-
* `/api/webrtc`, `/adaptive-probe` themselves).
|
|
22
|
-
* - `hubUrl()` / `hubWsUrl()` — absolute http(s) / ws(s) forms.
|
|
23
|
-
* - `routerBasename()` → `''` or `/<prefix>`, for `<BrowserRouter>`.
|
|
24
|
-
*
|
|
25
|
-
* Why not `window.location.origin` + a literal: `<base>` does not apply to a
|
|
26
|
-
* root-absolute path, so `'/api/x'` leaves the relay and lands on HA's own
|
|
27
|
-
* `/api/x`. And why not `document.baseURI` alone: without a `<base>` it is
|
|
28
|
-
* the DOCUMENT's URL, so `/devices/5` would read as a mount of `/devices/`.
|
|
29
|
-
* The meta is the authority; a `<base>` element is accepted on its own for a
|
|
30
|
-
* host that injects only that.
|
|
31
|
-
*
|
|
32
|
-
* `scripts/check-hub-paths-through-mount.ts` keeps every other module from
|
|
33
|
-
* spelling a hub path directly.
|
|
34
|
-
*/
|
|
35
|
-
/**
|
|
36
|
-
* The path the app is mounted at, with a trailing slash: `/` or `/<prefix>/`.
|
|
37
|
-
* Resolved once — the shell is the only thing that can say where it lives,
|
|
38
|
-
* and it says so before any script runs.
|
|
39
|
-
*/
|
|
2
|
+
* The path the app is mounted at, with a trailing slash: `/` or `/<prefix>/`.
|
|
3
|
+
* Resolved once — the shell is the only thing that can say where it lives,
|
|
4
|
+
* and it says so before any script runs.
|
|
5
|
+
*/
|
|
40
6
|
export declare function mountPath(): string;
|
|
41
7
|
/** `<BrowserRouter basename>`: the mount without its trailing slash. */
|
|
42
8
|
export declare function routerBasename(): string;
|
|
43
9
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
10
|
+
* A same-origin path under the mount. Absolute URLs and paths already under
|
|
11
|
+
* the mount pass through unchanged, so a server-stamped `bundleUrl` can be
|
|
12
|
+
* wrapped without knowing whether it was.
|
|
13
|
+
*/
|
|
48
14
|
export declare function hubPath(pathname: string): string;
|
|
49
15
|
/** The absolute hub base with no trailing slash — the SDK's `serverUrl`. */
|
|
50
16
|
export declare function hubOrigin(): string;
|