@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
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
1
|
+
import { type ReactNode, type JSX } from "react";
|
|
2
2
|
export interface KeyValueListProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
items: {
|
|
4
|
+
key: string;
|
|
5
|
+
value: ReactNode;
|
|
6
|
+
}[];
|
|
7
|
+
className?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export declare function KeyValueList({ items, className }: KeyValueListProps):
|
|
10
|
+
* A `<dl>` of label/value rows. Layout (including the L1 stacking) is owned by
|
|
11
|
+
* `SettingRow`; this composite only supplies the description-list semantics.
|
|
12
|
+
*
|
|
13
|
+
* The rows used to be `flex items-center h-7` with a `w-1/3` term, so a label
|
|
14
|
+
* could neither wrap nor stack: on a phone it took a third of the width and
|
|
15
|
+
* the value took whatever was left.
|
|
16
|
+
*/
|
|
17
|
+
export declare function KeyValueList({ items, className }: KeyValueListProps): JSX.Element;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
* Pure scroll-geometry helpers for LogStream's follow-the-tail behaviour.
|
|
3
|
+
*
|
|
4
|
+
* Kept free of React/DOM lifecycle so the (subtle) "is the viewport pinned
|
|
5
|
+
* to the bottom?" decision is unit-testable in isolation. The component
|
|
6
|
+
* wires these into a `useLayoutEffect` (capture pinned-state BEFORE rows
|
|
7
|
+
* grow) + a user-scroll handler (re-pin when the operator returns to the
|
|
8
|
+
* bottom). See log-stream.tsx for the lifecycle.
|
|
9
|
+
*/
|
|
10
10
|
/** Default distance (px) from the bottom within which we treat the
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* viewport as "pinned". Generous enough to absorb sub-pixel rounding and
|
|
12
|
+
* the height of a partially-revealed last row, tight enough that a
|
|
13
|
+
* deliberate scroll-up of even one full row reads as "not pinned". */
|
|
14
14
|
export declare const PIN_THRESHOLD_PX = 40;
|
|
15
15
|
/** The slice of scroll geometry the pin decision needs. Matches the
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
* properties of an `HTMLElement` (`scrollTop` / `scrollHeight` /
|
|
17
|
+
* `clientHeight`) so callers can pass the element fields directly. */
|
|
18
18
|
export interface ScrollGeometry {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
readonly scrollTop: number;
|
|
20
|
+
readonly scrollHeight: number;
|
|
21
|
+
readonly clientHeight: number;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
* True when the viewport is scrolled to (or within `threshold` px of) the
|
|
25
|
+
* bottom of its content.
|
|
26
|
+
*
|
|
27
|
+
* `scrollHeight - scrollTop - clientHeight` is the distance from the
|
|
28
|
+
* bottom: 0 when fully scrolled down, growing as the operator scrolls up.
|
|
29
|
+
* A `<=` comparison against the threshold means an exact-bottom geometry
|
|
30
|
+
* (distance 0) always counts as pinned even with a 0 threshold.
|
|
31
|
+
*/
|
|
32
32
|
export declare function isPinnedToBottom(geometry: ScrollGeometry, threshold?: number): boolean;
|
|
@@ -1,77 +1,88 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* LogStream — universal log viewer for ui-library.
|
|
3
|
+
*
|
|
4
|
+
* Hierarchical scope: agentId → addonId → deviceId.
|
|
5
|
+
* Props lock the top levels; child selectors appear for unlocked levels.
|
|
6
|
+
* Features: level filter, expandable metadata, copy all, load-more,
|
|
7
|
+
* capped live buffer (ring), auto-scroll toggle.
|
|
8
|
+
*
|
|
9
|
+
* Used inline (tabs, cards) and as a floating panel via FloatingLogStream.
|
|
10
|
+
*/
|
|
11
|
+
import { type JSX } from "react";
|
|
12
|
+
import { type LiveBuffer } from "../hooks/use-live-buffer";
|
|
2
13
|
interface LogEntry {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
readonly timestamp: string;
|
|
15
|
+
readonly level: string;
|
|
16
|
+
readonly message: string;
|
|
17
|
+
readonly scope?: string;
|
|
18
|
+
readonly tags?: Record<string, string | undefined>;
|
|
19
|
+
readonly meta?: Record<string, unknown>;
|
|
9
20
|
}
|
|
10
21
|
export interface LogStreamProps {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
22
|
+
/** Lock to a specific agent. When set, the agent selector is hidden. */
|
|
23
|
+
readonly agentId?: string;
|
|
24
|
+
/** Lock to a specific addon. When set, the addon selector is hidden. */
|
|
25
|
+
readonly addonId?: string;
|
|
26
|
+
/** Lock to a specific device. When set, the device selector is hidden. */
|
|
27
|
+
readonly deviceId?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Lock to a container SUBTREE: filters by `containerDeviceId`, returning the
|
|
30
|
+
* container's own logs AND every accessory child's logs in one view (each
|
|
31
|
+
* child stamps its parent's id; a container stamps its own). Pass this
|
|
32
|
+
* INSTEAD of `deviceId` for a container's Logs tab.
|
|
33
|
+
*/
|
|
34
|
+
readonly containerDeviceId?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Lock to a specific integration. Filter is ALWAYS applied when
|
|
37
|
+
* provided — current providers don't yet tag loggers with
|
|
38
|
+
* `integrationId`, so the result will be empty until they do, but
|
|
39
|
+
* the filter lets us light up integration-scoped logs incrementally
|
|
40
|
+
* without changing the call sites here.
|
|
41
|
+
*/
|
|
42
|
+
readonly integrationId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Correlation id for short-lived operations that have no `deviceId`
|
|
45
|
+
* yet (e.g. a creation-field probe). The matching surface (the
|
|
46
|
+
* Add-Device modal) generates the id once per dialog open and the
|
|
47
|
+
* provider plumbs it into its own scoped logger so the user sees
|
|
48
|
+
* live socket / handshake lines streaming during the test.
|
|
49
|
+
*/
|
|
50
|
+
readonly requestId?: string;
|
|
51
|
+
/** Initial log level filter. */
|
|
52
|
+
readonly level?: "debug" | "info" | "warn" | "error";
|
|
53
|
+
/** Max height CSS class (default: 'max-h-96'). */
|
|
54
|
+
readonly maxHeight?: string;
|
|
55
|
+
/** Show the scope column. */
|
|
56
|
+
readonly showScope?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Render an inline per-row device chip (`name #id` / `#id`) when the
|
|
59
|
+
* entry carries a `deviceId` tag. Meant for addon- or agent-scoped
|
|
60
|
+
* streams (orchestrator / runner logs) where lines interleave across
|
|
61
|
+
* many cameras and the operator needs the device at a glance without
|
|
62
|
+
* expanding each row. Off by default — device-scoped streams already
|
|
63
|
+
* imply the device.
|
|
64
|
+
*/
|
|
65
|
+
readonly showDeviceChip?: boolean;
|
|
66
|
+
/** Show the filter bar with selectors. Set false for compact inline use. */
|
|
67
|
+
readonly showFilters?: boolean;
|
|
68
|
+
/** Initial number of historical entries to fetch (default: 100). */
|
|
69
|
+
readonly limit?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Optional controlled live buffer. When provided, the stream reads
|
|
72
|
+
* + appends to this external store rather than its own `useState`,
|
|
73
|
+
* so visible logs survive an unmount/remount of the component
|
|
74
|
+
* (used by `DeviceActivityPanel` to preserve content across tab
|
|
75
|
+
* switches without keeping subscriptions open in inactive tabs).
|
|
76
|
+
*/
|
|
77
|
+
readonly liveBuffer?: LiveBuffer<LogEntry>;
|
|
78
|
+
/** Close button handler — when provided, renders a close button. */
|
|
79
|
+
readonly onClose?: () => void;
|
|
80
|
+
readonly className?: string;
|
|
70
81
|
}
|
|
71
|
-
export declare function LogStream({ agentId: propsAgentId, addonId: propsAddonId, deviceId: propsDeviceId, containerDeviceId: propsContainerDeviceId, integrationId: propsIntegrationId, requestId: propsRequestId, level: initialLevel, maxHeight, showScope, showDeviceChip, showFilters, limit, liveBuffer: externalBuffer, onClose, className
|
|
82
|
+
export declare function LogStream({ agentId: propsAgentId, addonId: propsAddonId, deviceId: propsDeviceId, containerDeviceId: propsContainerDeviceId, integrationId: propsIntegrationId, requestId: propsRequestId, level: initialLevel, maxHeight, showScope, showDeviceChip, showFilters, limit, liveBuffer: externalBuffer, onClose, className }: LogStreamProps): JSX.Element;
|
|
72
83
|
export interface FloatingLogStreamProps extends LogStreamProps {
|
|
73
|
-
|
|
74
|
-
|
|
84
|
+
/** Position: 'bottom' anchors to parent bottom, 'overlay' is absolute positioned. */
|
|
85
|
+
readonly position?: "bottom" | "overlay";
|
|
75
86
|
}
|
|
76
|
-
export declare function FloatingLogStream({ position, className, ...props }: FloatingLogStreamProps):
|
|
87
|
+
export declare function FloatingLogStream({ position, className, ...props }: FloatingLogStreamProps): JSX.Element;
|
|
77
88
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
1
2
|
export interface LoginFormProps {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
onLogin: (username: string, password: string) => Promise<void>;
|
|
4
|
+
serverUrl?: string;
|
|
5
|
+
logoSrc?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
className?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare function LoginForm({ onLogin, serverUrl, logoSrc, error: externalError, className
|
|
9
|
+
export declare function LoginForm({ onLogin, serverUrl, logoSrc, error: externalError, className }: LoginFormProps): JSX.Element;
|
|
@@ -1,35 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The editor of a MODEL-BOUND numeric step setting (D738) — the per-class
|
|
3
|
+
* confidence floors.
|
|
4
|
+
*
|
|
5
|
+
* Its default belongs to the model that runs (`modelApplicability.defaultByModel`,
|
|
6
|
+
* else the field's global `default`), and an operator value is stored together
|
|
7
|
+
* with the model it was made for (`<key>ModelId`). This control therefore:
|
|
8
|
+
*
|
|
9
|
+
* - shows the value IN FORCE for the selected model — an override made for
|
|
10
|
+
* another model is not that value, and is named as inapplicable;
|
|
11
|
+
* - says where the value comes from (override / model default / untuned
|
|
12
|
+
* global default);
|
|
13
|
+
* - writes every change bound to the selected model;
|
|
14
|
+
* - offers "Reset to model default", which removes the override and its
|
|
15
|
+
* binding.
|
|
16
|
+
*
|
|
17
|
+
* The rule itself is `resolveModelBoundSetting` in `@camstack/types` — the same
|
|
18
|
+
* one the runner applies — never re-derived here.
|
|
19
|
+
*/
|
|
20
|
+
import type { ConfigField, ConfigNumberField, ConfigSliderField } from "@camstack/types";
|
|
21
|
+
import type { JSX } from "react";
|
|
2
22
|
/** A numeric field this control can render. */
|
|
3
23
|
export type ModelBoundNumericField = ConfigSliderField | ConfigNumberField;
|
|
4
24
|
export interface ModelBoundSliderProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
readonly field: ModelBoundNumericField;
|
|
26
|
+
/** The model the edited row runs — pinned, or its effective default. */
|
|
27
|
+
readonly modelId: string;
|
|
28
|
+
readonly settings: Readonly<Record<string, unknown>> | undefined;
|
|
29
|
+
readonly disabled: boolean;
|
|
30
|
+
readonly onChangeSettings: (next: Record<string, unknown>) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Hide the source label + "Reset to model default" row. A layered editor
|
|
33
|
+
* (the step inspector, D754) draws its own provenance line naming every
|
|
34
|
+
* layer — this row could only name the model's, and its reset would remove
|
|
35
|
+
* the value from the merged view, not from the layer being edited.
|
|
36
|
+
*/
|
|
37
|
+
readonly hideSourceRow?: boolean;
|
|
18
38
|
}
|
|
19
|
-
export declare function ModelBoundSlider({ field, modelId, settings, disabled, onChangeSettings, hideSourceRow
|
|
39
|
+
export declare function ModelBoundSlider({ field, modelId, settings, disabled, onChangeSettings, hideSourceRow }: ModelBoundSliderProps): JSX.Element | null;
|
|
20
40
|
/** The keys of the model-bound fields of a schema, groups flattened. */
|
|
21
41
|
export declare function modelBoundKeysOf(fields: readonly ConfigField[]): string[];
|
|
22
42
|
export interface ResetModelDefaultsButtonProps {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
43
|
+
readonly fields: readonly ConfigField[];
|
|
44
|
+
/** The model the edited row runs — pinned, or its effective default. */
|
|
45
|
+
readonly modelId: string;
|
|
46
|
+
readonly settings: Readonly<Record<string, unknown>> | undefined;
|
|
47
|
+
readonly disabled?: boolean;
|
|
48
|
+
readonly onReset: (next: Record<string, unknown>) => void;
|
|
29
49
|
}
|
|
30
50
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export declare function ResetModelDefaultsButton({ fields, modelId, settings, disabled, onReset
|
|
51
|
+
* "Reset thresholds to model defaults" — every model-bound override in force
|
|
52
|
+
* for `modelId`, cleared in ONE settings change (one save). Rendered only when
|
|
53
|
+
* there is something to reset. An override stored for another model is kept.
|
|
54
|
+
*/
|
|
55
|
+
export declare function ResetModelDefaultsButton({ fields, modelId, settings, disabled, onReset }: ResetModelDefaultsButtonProps): JSX.Element | null;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { PipelineAddonSchema } from
|
|
2
|
-
|
|
1
|
+
import { type PipelineAddonSchema } from "@camstack/types";
|
|
2
|
+
import { type JSX } from "react";
|
|
3
|
+
export type ModelOption = PipelineAddonSchema["models"][number];
|
|
3
4
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare function ModelPicker({ models, value, onChange, disabled, defaultModelId
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}):
|
|
5
|
+
* Shared model picker — the ONE model-selection control across the app.
|
|
6
|
+
*
|
|
7
|
+
* Provider first (CamStack / Frigate / Scrypted / Custom), then inside that
|
|
8
|
+
* catalog the grouped Family→Tier→Variant selector when entries declare
|
|
9
|
+
* `group`, else a flat `<select>`. The persisted value stays the flat model
|
|
10
|
+
* id. `value === ''` renders nothing selected (callers that support an
|
|
11
|
+
* "Auto / node default" mode own that affordance and hide this picker while
|
|
12
|
+
* it is active).
|
|
13
|
+
*/
|
|
14
|
+
export declare function ModelPicker({ models, value, onChange, disabled, defaultModelId }: {
|
|
15
|
+
readonly models: readonly ModelOption[];
|
|
16
|
+
readonly value: string;
|
|
17
|
+
readonly onChange: (id: string) => void;
|
|
18
|
+
readonly disabled?: boolean;
|
|
19
|
+
/** Catalog / format default — offered when the current pin is no longer listed. */
|
|
20
|
+
readonly defaultModelId?: string;
|
|
21
|
+
}): JSX.Element;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { AddonPageProps } from
|
|
1
|
+
import type { AddonPageProps } from "./addon-page-props";
|
|
2
2
|
export interface MountAddonPageOptions {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
/** Backend server URL (default: 'https://localhost:4443') */
|
|
4
|
+
serverUrl?: string;
|
|
5
|
+
/** Title shown in the dev toolbar */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Root element ID (default: 'root') */
|
|
8
|
+
rootId?: string;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
* Mount an addon page component with the full dev shell.
|
|
12
|
+
*
|
|
13
|
+
* @param PageComponent - The addon page component (must accept AddonPageProps)
|
|
14
|
+
* @param options - Configuration options
|
|
15
|
+
*/
|
|
16
16
|
export declare function mountAddonPage(PageComponent: (props: AddonPageProps) => React.ReactNode, options?: MountAddonPageOptions): void;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
1
2
|
export interface NetworkLinkStatusLike {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
readonly type: "wifi" | "ethernet" | "cellular" | "unknown";
|
|
4
|
+
readonly signalPercent: number | null;
|
|
5
|
+
readonly ssid?: string;
|
|
5
6
|
}
|
|
6
7
|
export interface NetworkLinkBadgeProps {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
readonly status: NetworkLinkStatusLike | null | undefined;
|
|
9
|
+
readonly className?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare function NetworkLinkBadge({ status, className }: NetworkLinkBadgeProps):
|
|
11
|
+
export declare function NetworkLinkBadge({ status, className }: NetworkLinkBadgeProps): JSX.Element | null;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
1
2
|
export interface NodePickerProps {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
readonly selectedNodeId: string;
|
|
4
|
+
readonly onSelect: (nodeId: string) => void;
|
|
5
|
+
/** Caption shown before the pill bar. Defaults to `Node`. */
|
|
6
|
+
readonly label?: string;
|
|
7
|
+
/** Hide the leading `Server` icon (compact toolbars). */
|
|
8
|
+
readonly hideIcon?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* When true, render even when only the hub is online. Useful when
|
|
11
|
+
* the surrounding UI relies on the picker as a layout anchor; the
|
|
12
|
+
* default hides the picker since there's nothing to choose.
|
|
13
|
+
*/
|
|
14
|
+
readonly alwaysShow?: boolean;
|
|
14
15
|
}
|
|
15
|
-
export declare function NodePicker({ selectedNodeId, onSelect, label, hideIcon, alwaysShow
|
|
16
|
+
export declare function NodePicker({ selectedNodeId, onSelect, label, hideIcon, alwaysShow }: NodePickerProps): JSX.Element | null;
|
|
@@ -1,66 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Shared notification-output target pickers.
|
|
3
|
+
*
|
|
4
|
+
* The Notification Center editors (Summaries, Timelapses, Rules, Calendar
|
|
5
|
+
* events) and ConfigUISchema forms (script settings, addon settings) all
|
|
6
|
+
* pick the same catalog — `notificationOutput.listTargets`. One presentational
|
|
7
|
+
* control plus two ConfigUISchema wrappers so a script can declare
|
|
8
|
+
* `notification-target-select` / `notification-target-multiselect` without
|
|
9
|
+
* inventing a parallel picker.
|
|
10
|
+
*
|
|
11
|
+
* A DISABLED target is offered and marked, never hidden: it is a legitimate
|
|
12
|
+
* choice (the operator re-enables it later), and hiding it would make a rule
|
|
13
|
+
* whose only target is off look like a rule with no target at all.
|
|
14
|
+
*
|
|
15
|
+
* Single and multi both render through `OptionSelect` (dropdown + pills,
|
|
16
|
+
* searchable, kind brand icons via `iconUrl`).
|
|
17
|
+
*/
|
|
18
|
+
import { type JSX } from "react";
|
|
19
|
+
import type { ConfigNotificationTargetMultiSelectField, ConfigNotificationTargetSelectField } from "@camstack/types";
|
|
20
|
+
import type { TranslationFn } from "./config-form-builder";
|
|
21
|
+
import { type NotificationTargetOption } from "./notification-targets-options";
|
|
22
|
+
export type { NotificationTargetOption } from "./notification-targets-options";
|
|
5
23
|
export interface NotificationTargetsFieldProps {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
readonly targets: readonly NotificationTargetOption[];
|
|
25
|
+
readonly value: readonly string[];
|
|
26
|
+
readonly onChange: (next: string[]) => void;
|
|
27
|
+
readonly disabled?: boolean;
|
|
28
|
+
/** Cap on how many targets may be selected. */
|
|
29
|
+
readonly maxItems?: number;
|
|
30
|
+
/** Per-target test id is `<prefix>-<id>`. Default `notification-target`. */
|
|
31
|
+
readonly testIdPrefix?: string;
|
|
32
|
+
/** What an empty catalog says. */
|
|
33
|
+
readonly emptyMessage?: string;
|
|
34
|
+
/** Target ids that carry an extra note badge (e.g. already covered by a rule). */
|
|
35
|
+
readonly noteIds?: ReadonlySet<string>;
|
|
36
|
+
/** Label on the note badge. Default `note`. */
|
|
37
|
+
readonly noteLabel?: string;
|
|
38
|
+
readonly label?: string;
|
|
39
|
+
readonly description?: string;
|
|
40
|
+
/** Kind brand icons keyed as `addonId:kind`. */
|
|
41
|
+
readonly kindIconUrls?: ReadonlyMap<string, string>;
|
|
24
42
|
}
|
|
25
43
|
export interface NotificationTargetSelectFieldProps {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
readonly targets: readonly NotificationTargetOption[];
|
|
45
|
+
readonly value: string;
|
|
46
|
+
readonly onChange: (next: string) => void;
|
|
47
|
+
readonly disabled?: boolean;
|
|
48
|
+
readonly emptyMessage?: string;
|
|
49
|
+
readonly placeholder?: string;
|
|
50
|
+
readonly testId?: string;
|
|
51
|
+
readonly label?: string;
|
|
52
|
+
readonly description?: string;
|
|
53
|
+
readonly kindIconUrls?: ReadonlyMap<string, string>;
|
|
36
54
|
}
|
|
37
55
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export declare function NotificationTargetsField({ targets, value, onChange, disabled, maxItems, testIdPrefix, emptyMessage, noteIds, noteLabel, label, description, kindIconUrls: kindIconUrlsProp
|
|
56
|
+
* Multi-select of delivery targets (NC Summaries / Timelapses / Rules shape).
|
|
57
|
+
*/
|
|
58
|
+
export declare function NotificationTargetsField({ targets, value, onChange, disabled, maxItems, testIdPrefix, emptyMessage, noteIds, noteLabel, label, description, kindIconUrls: kindIconUrlsProp }: NotificationTargetsFieldProps): JSX.Element;
|
|
41
59
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export declare function NotificationTargetSelectField({ targets, value, onChange, disabled, emptyMessage, placeholder, testId, label, description, kindIconUrls: kindIconUrlsProp
|
|
60
|
+
* Single-select of one delivery target (Calendar events / script settings).
|
|
61
|
+
*/
|
|
62
|
+
export declare function NotificationTargetSelectField({ targets, value, onChange, disabled, emptyMessage, placeholder, testId, label, description, kindIconUrls: kindIconUrlsProp }: NotificationTargetSelectFieldProps): JSX.Element;
|
|
45
63
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export declare function ConfigNotificationTargetMultiSelectFieldView({ field, value, onChange, disabled, translationFn
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}):
|
|
64
|
+
* ConfigUISchema `notification-target-multiselect` — fetches listTargets and
|
|
65
|
+
* stores a `string[]` of target ids.
|
|
66
|
+
*/
|
|
67
|
+
export declare function ConfigNotificationTargetMultiSelectFieldView({ field, value, onChange, disabled, translationFn }: {
|
|
68
|
+
readonly field: ConfigNotificationTargetMultiSelectField;
|
|
69
|
+
readonly value: unknown;
|
|
70
|
+
readonly onChange: (v: unknown) => void;
|
|
71
|
+
readonly disabled?: boolean;
|
|
72
|
+
readonly translationFn?: TranslationFn;
|
|
73
|
+
}): JSX.Element;
|
|
56
74
|
/**
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export declare function ConfigNotificationTargetSelectFieldView({ field, value, onChange, disabled, translationFn
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}):
|
|
75
|
+
* ConfigUISchema `notification-target-select` — fetches listTargets and stores
|
|
76
|
+
* one target id string.
|
|
77
|
+
*/
|
|
78
|
+
export declare function ConfigNotificationTargetSelectFieldView({ field, value, onChange, disabled, translationFn }: {
|
|
79
|
+
readonly field: ConfigNotificationTargetSelectField;
|
|
80
|
+
readonly value: unknown;
|
|
81
|
+
readonly onChange: (v: unknown) => void;
|
|
82
|
+
readonly disabled?: boolean;
|
|
83
|
+
readonly translationFn?: TranslationFn;
|
|
84
|
+
}): JSX.Element;
|