@camstack/ui-library 1.2.256 → 1.2.258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composites/accelerator-label.d.ts +9 -9
- package/dist/composites/adaptive-downlink.d.ts +141 -143
- package/dist/composites/addon-global-settings-form.d.ts +73 -60
- package/dist/composites/addon-page-props.d.ts +34 -10
- package/dist/composites/agent-step-editor.d.ts +48 -47
- package/dist/composites/app-shell/app-shell.d.ts +17 -17
- package/dist/composites/app-shell/index.d.ts +3 -3
- package/dist/composites/app-shell/sidebar-item.d.ts +9 -8
- package/dist/composites/app-shell/sidebar.d.ts +10 -10
- package/dist/composites/audio-classification-list.d.ts +16 -15
- package/dist/composites/audio-level-waveform.d.ts +31 -30
- package/dist/composites/audio-waveform.d.ts +18 -17
- package/dist/composites/battery-badge.d.ts +27 -13
- package/dist/composites/breadcrumb.d.ts +21 -21
- package/dist/composites/camera-stream-player.d.ts +309 -309
- package/dist/composites/cap-settings/AutotrackSection.d.ts +19 -2
- package/dist/composites/cap-settings/CameraGridLayoutEditor.d.ts +24 -2
- package/dist/composites/cap-settings/ConsumablesPanel.d.ts +21 -2
- package/dist/composites/cap-settings/CoverageTrack.d.ts +21 -20
- package/dist/composites/cap-settings/EventBucketStrip.d.ts +21 -20
- package/dist/composites/cap-settings/EventHeatmap.d.ts +8 -7
- package/dist/composites/cap-settings/HomePresetPicker.d.ts +2 -2
- package/dist/composites/cap-settings/MaskShapeCanvas.d.ts +143 -41
- package/dist/composites/cap-settings/MotionZonesSettings.d.ts +41 -2
- package/dist/composites/cap-settings/NavigationPanel.d.ts +14 -2
- package/dist/composites/cap-settings/PrivacyMaskSettings.d.ts +3 -2
- package/dist/composites/cap-settings/PtzPanel.d.ts +15 -2
- package/dist/composites/cap-settings/RecordingBandsEditor.d.ts +33 -32
- package/dist/composites/cap-settings/RecordingPanel.d.ts +3 -2
- package/dist/composites/cap-settings/RecordingSettings.d.ts +11 -10
- package/dist/composites/cap-settings/RecordingTimeline.d.ts +3 -2
- package/dist/composites/cap-settings/SceneMonitorEditor.d.ts +3 -51
- package/dist/composites/cap-settings/SceneReferenceGallery.d.ts +62 -23
- package/dist/composites/cap-settings/SceneSettingsForm.d.ts +52 -16
- package/dist/composites/cap-settings/TimelineControls.d.ts +21 -20
- package/dist/composites/cap-settings/camera-grid-layout.d.ts +95 -95
- package/dist/composites/cap-settings/event-thumb.d.ts +9 -8
- package/dist/composites/cap-settings/index.d.ts +20 -20
- package/dist/composites/cap-settings/privacy-mask-audio.d.ts +47 -47
- package/dist/composites/cap-settings/recording-config-form.d.ts +25 -25
- package/dist/composites/cap-settings/recording-spans.d.ts +14 -14
- package/dist/composites/cap-settings/recording-timeline-model.d.ts +57 -57
- package/dist/composites/cap-settings/scene-monitor-copy.d.ts +58 -49
- package/dist/composites/client-network-sample.d.ts +41 -41
- package/dist/composites/clips/ClipBandBar.d.ts +44 -14
- package/dist/composites/clips/ClipPanel.d.ts +30 -6
- package/dist/composites/clips/ClipTile.d.ts +26 -5
- package/dist/composites/clips/ClipsSection.d.ts +107 -2
- package/dist/composites/clips/clip-band.d.ts +72 -38
- package/dist/composites/clips/clip-day-window.d.ts +7 -30
- package/dist/composites/clips/clip-source-state.d.ts +55 -26
- package/dist/composites/clips/clip-still-retry.d.ts +39 -39
- package/dist/composites/clips/clip-thumbnail-fetch.d.ts +9 -9
- package/dist/composites/clips/clip-tile-media.d.ts +64 -32
- package/dist/composites/clips/clip-view-state.d.ts +76 -46
- package/dist/composites/code-block.d.ts +5 -4
- package/dist/composites/config-form-builder.d.ts +14 -13
- package/dist/composites/config-form-field.d.ts +63 -62
- package/dist/composites/config-icon-field.d.ts +10 -9
- package/dist/composites/config-secret-field.d.ts +51 -27
- package/dist/composites/confirm-action-button.d.ts +52 -39
- package/dist/composites/confirm-dialog.d.ts +110 -48
- package/dist/composites/copy-button.d.ts +25 -19
- package/dist/composites/data-table/data-table-header.d.ts +8 -7
- package/dist/composites/data-table/data-table-pagination.d.ts +7 -6
- package/dist/composites/data-table/data-table-row.d.ts +8 -7
- package/dist/composites/data-table/data-table.d.ts +3 -2
- package/dist/composites/data-table/index.d.ts +2 -2
- package/dist/composites/data-table/types.d.ts +29 -29
- package/dist/composites/data-table-filter-bar.d.ts +30 -29
- package/dist/composites/data-table-filter.d.ts +34 -34
- package/dist/composites/data-table-layout.d.ts +24 -24
- package/dist/composites/data-table-pager.d.ts +5 -5
- package/dist/composites/data-table-pagination.d.ts +23 -23
- package/dist/composites/data-table-selection.d.ts +10 -10
- package/dist/composites/data-table.d.ts +167 -118
- package/dist/composites/detection-canvas.d.ts +34 -25
- package/dist/composites/detection-colors.d.ts +9 -9
- package/dist/composites/detection-overlay.d.ts +33 -32
- package/dist/composites/detection-result-tree.d.ts +22 -9
- package/dist/composites/dev-shell.d.ts +15 -14
- package/dist/composites/device-activity-panel.d.ts +37 -31
- package/dist/composites/device-card.d.ts +32 -32
- package/dist/composites/device-controls/ac-panel.d.ts +2 -2
- package/dist/composites/device-controls/alarm-hero-card.d.ts +42 -42
- package/dist/composites/device-controls/atoms.d.ts +50 -50
- package/dist/composites/device-controls/brightness-panel.d.ts +3 -3
- package/dist/composites/device-controls/button-control.d.ts +14 -14
- package/dist/composites/device-controls/climate-panel.d.ts +12 -12
- package/dist/composites/device-controls/container-primary-hero.d.ts +33 -16
- package/dist/composites/device-controls/container-primary.d.ts +68 -39
- package/dist/composites/device-controls/control-panel.d.ts +4 -4
- package/dist/composites/device-controls/control-registry.d.ts +81 -70
- package/dist/composites/device-controls/cover-hero-card.d.ts +26 -26
- package/dist/composites/device-controls/cover-inline.d.ts +20 -20
- package/dist/composites/device-controls/cover-panel.d.ts +2 -2
- package/dist/composites/device-controls/dummy-hero-card.d.ts +2 -2
- package/dist/composites/device-controls/fan-hero-card.d.ts +20 -20
- package/dist/composites/device-controls/fan-panel.d.ts +3 -3
- package/dist/composites/device-controls/humidifier-control.d.ts +46 -29
- package/dist/composites/device-controls/image-control.d.ts +41 -27
- package/dist/composites/device-controls/index.d.ts +34 -34
- package/dist/composites/device-controls/lawn-mower-control.d.ts +30 -16
- package/dist/composites/device-controls/light-hero-card.d.ts +15 -15
- package/dist/composites/device-controls/lock-hero-card.d.ts +14 -14
- package/dist/composites/device-controls/lock-panel.d.ts +3 -3
- package/dist/composites/device-controls/media-player-hero-card.d.ts +16 -16
- package/dist/composites/device-controls/media-player-panel.d.ts +7 -7
- package/dist/composites/device-controls/offline-badge.d.ts +23 -8
- package/dist/composites/device-controls/panel-controls.d.ts +39 -20
- package/dist/composites/device-controls/pet-feeder-panel.d.ts +27 -9
- package/dist/composites/device-controls/popover-row-action.d.ts +18 -6
- package/dist/composites/device-controls/primary-child-picker.d.ts +31 -15
- package/dist/composites/device-controls/primary-child.d.ts +14 -25
- package/dist/composites/device-controls/radial-gauge.d.ts +17 -17
- package/dist/composites/device-controls/script-automation-controls.d.ts +9 -9
- package/dist/composites/device-controls/sensor-hero-card.d.ts +26 -8
- package/dist/composites/device-controls/sensor-inline-control.d.ts +21 -9
- package/dist/composites/device-controls/sensor-value-atom.d.ts +97 -76
- package/dist/composites/device-controls/switch-hero-card.d.ts +11 -11
- package/dist/composites/device-controls/switch-panel.d.ts +2 -2
- package/dist/composites/device-controls/tap-toggle.d.ts +13 -13
- package/dist/composites/device-controls/thermostat-hero-card.d.ts +16 -16
- package/dist/composites/device-controls/types.d.ts +11 -11
- package/dist/composites/device-controls/update-control.d.ts +20 -7
- package/dist/composites/device-controls/vacuum-control.d.ts +41 -25
- package/dist/composites/device-controls/valve-control.d.ts +51 -35
- package/dist/composites/device-controls/water-heater-control.d.ts +48 -31
- package/dist/composites/device-controls/weather-control.d.ts +46 -28
- package/dist/composites/device-export-panel.d.ts +34 -34
- package/dist/composites/device-grid.d.ts +10 -10
- package/dist/composites/device-item/actions.d.ts +40 -18
- package/dist/composites/device-item/admin-link-quick-action.d.ts +66 -26
- package/dist/composites/device-item/child-layout.d.ts +43 -26
- package/dist/composites/device-item/child-section-accordion.d.ts +20 -6
- package/dist/composites/device-item/children-accordion.d.ts +11 -11
- package/dist/composites/device-item/container-children-context.d.ts +28 -11
- package/dist/composites/device-item/device-delete-action.d.ts +23 -5
- package/dist/composites/device-item/features.d.ts +33 -15
- package/dist/composites/device-item/header.d.ts +53 -31
- package/dist/composites/device-item/helpers.d.ts +291 -274
- package/dist/composites/device-item/index.d.ts +18 -9
- package/dist/composites/device-item/preview.d.ts +41 -21
- package/dist/composites/device-item/quick-detail-action.d.ts +4 -4
- package/dist/composites/device-item/reboot-quick-action.d.ts +28 -7
- package/dist/composites/device-item/role-display-defaults-context.d.ts +28 -12
- package/dist/composites/device-item/status-dot.d.ts +24 -6
- package/dist/composites/device-list/batch-actions-bar.d.ts +23 -12
- package/dist/composites/device-list/batch-toolbar.d.ts +13 -13
- package/dist/composites/device-list/columns.d.ts +108 -108
- package/dist/composites/device-list/device-integration.d.ts +48 -58
- package/dist/composites/device-list/device-mode.d.ts +121 -121
- package/dist/composites/device-list/empty-state.d.ts +14 -3
- package/dist/composites/device-list/filter-chips.d.ts +42 -29
- package/dist/composites/device-list/fuzzy-match.d.ts +22 -22
- package/dist/composites/device-list/generic-mode.d.ts +88 -88
- package/dist/composites/device-list/group.d.ts +62 -35
- package/dist/composites/device-list/hardware-cell.d.ts +14 -3
- package/dist/composites/device-list/hardware.d.ts +29 -11
- package/dist/composites/device-list/icon-action.d.ts +27 -15
- package/dist/composites/device-list/index.d.ts +46 -23
- package/dist/composites/device-list/multi-select.d.ts +17 -17
- package/dist/composites/device-list/page-size-select.d.ts +13 -7
- package/dist/composites/device-list/pagination.d.ts +19 -12
- package/dist/composites/device-list/sort.d.ts +28 -15
- package/dist/composites/device-list/sortable-header.d.ts +20 -7
- package/dist/composites/device-list/table-layout.d.ts +44 -44
- package/dist/composites/device-list/type-filter.d.ts +16 -16
- package/dist/composites/device-list/url-state.d.ts +35 -35
- package/dist/composites/device-meta.d.ts +43 -43
- package/dist/composites/device-picker/DevicePicker.d.ts +72 -33
- package/dist/composites/device-picker/SelectedChip.d.ts +10 -9
- package/dist/composites/device-picker/device-filter-bar.d.ts +19 -18
- package/dist/composites/device-picker/device-fleet-view.d.ts +11 -3
- package/dist/composites/device-picker/device-parent.d.ts +27 -27
- package/dist/composites/device-picker/device-picker-grouping.d.ts +3 -3
- package/dist/composites/device-picker/device-picker-model.d.ts +140 -140
- package/dist/composites/device-picker/device-selection-rows.d.ts +31 -24
- package/dist/composites/device-picker/device-selection.d.ts +43 -43
- package/dist/composites/device-picker/index.d.ts +9 -9
- package/dist/composites/device-select-field.d.ts +17 -16
- package/dist/composites/device-select-filter.d.ts +78 -78
- package/dist/composites/device-selector-picker.d.ts +25 -25
- package/dist/composites/device-step-matrix.d.ts +54 -28
- package/dist/composites/discovery-panel.d.ts +22 -22
- package/dist/composites/doorbell-recent-panel.d.ts +9 -8
- package/dist/composites/empty-state.d.ts +8 -8
- package/dist/composites/error-box.d.ts +32 -17
- package/dist/composites/event-kind-visuals.d.ts +29 -18
- package/dist/composites/event-stream.d.ts +59 -42
- package/dist/composites/extensions/AssociationSlotCard.d.ts +45 -24
- package/dist/composites/extensions/ExtensionsPanel.d.ts +41 -18
- package/dist/composites/extensions/extensions-view-state.d.ts +71 -53
- package/dist/composites/filter-bar.d.ts +22 -21
- package/dist/composites/form-field.d.ts +9 -9
- package/dist/composites/format-state-value.d.ts +23 -51
- package/dist/composites/grouped-model-selector.d.ts +7 -6
- package/dist/composites/hls-quality.d.ts +26 -26
- package/dist/composites/hls-video.d.ts +62 -39
- package/dist/composites/hover-zoom-image.d.ts +35 -16
- package/dist/composites/icon-picker.d.ts +86 -50
- package/dist/composites/image-selector.d.ts +21 -20
- package/dist/composites/index.d.ts +204 -204
- package/dist/composites/inference-config-selector.d.ts +36 -35
- package/dist/composites/kebab-menu.d.ts +53 -35
- package/dist/composites/key-value-list.d.ts +14 -14
- package/dist/composites/log-stream-scroll.d.ts +24 -24
- package/dist/composites/log-stream.d.ts +81 -70
- package/dist/composites/login-form.d.ts +7 -6
- package/dist/composites/model-bound-slider.d.ts +46 -26
- package/dist/composites/model-picker.d.ts +20 -19
- package/dist/composites/mount-addon-page.d.ts +12 -12
- package/dist/composites/network-link-badge.d.ts +7 -6
- package/dist/composites/node-picker.d.ts +14 -13
- package/dist/composites/notification-targets-field.d.ts +76 -58
- package/dist/composites/notification-targets-options.d.ts +9 -6
- package/dist/composites/option-select/OptionSelect.d.ts +23 -22
- package/dist/composites/option-select/index.d.ts +4 -4
- package/dist/composites/option-select/option-select-model.d.ts +35 -35
- package/dist/composites/page-header.d.ts +6 -6
- package/dist/composites/peer-connection-config.d.ts +9 -9
- package/dist/composites/phase-icon.d.ts +10 -3
- package/dist/composites/pipeline-builder.d.ts +21 -13
- package/dist/composites/pipeline-matrix-shared.d.ts +159 -150
- package/dist/composites/pipeline-runtime-selector.d.ts +12 -11
- package/dist/composites/pipeline-step.d.ts +39 -31
- package/dist/composites/placeholder-field/PlaceholderChipField.d.ts +23 -22
- package/dist/composites/placeholder-field/index.d.ts +1 -1
- package/dist/composites/provider-badge.d.ts +6 -5
- package/dist/composites/ptz-overlay.d.ts +38 -18
- package/dist/composites/qr-code.d.ts +24 -10
- package/dist/composites/reconnect-schedule.d.ts +22 -22
- package/dist/composites/resolve-step-default-model.d.ts +94 -94
- package/dist/composites/response-log.d.ts +7 -6
- package/dist/composites/root-model-source.d.ts +21 -10
- package/dist/composites/scope-picker.d.ts +49 -25
- package/dist/composites/section-card.d.ts +19 -11
- package/dist/composites/setting-row.d.ts +39 -21
- package/dist/composites/snapshot-button.d.ts +23 -19
- package/dist/composites/sort-header-button.d.ts +25 -8
- package/dist/composites/stat-card.d.ts +20 -8
- package/dist/composites/state-values-stream.d.ts +49 -24
- package/dist/composites/status-badge.d.ts +10 -8
- package/dist/composites/step-inspector/gate-control.d.ts +13 -12
- package/dist/composites/step-inspector/index.d.ts +8 -8
- package/dist/composites/step-inspector/layered-settings-form.d.ts +41 -30
- package/dist/composites/step-inspector/segmented-choice.d.ts +8 -7
- package/dist/composites/step-inspector/setting-values.d.ts +13 -8
- package/dist/composites/step-inspector/step-detail-dock.d.ts +39 -23
- package/dist/composites/step-inspector/step-inspector-panel.d.ts +34 -28
- package/dist/composites/step-inspector/step-model-row.d.ts +29 -24
- package/dist/composites/step-inspector/step-search.d.ts +11 -11
- package/dist/composites/step-timings.d.ts +7 -6
- package/dist/composites/step-tree.d.ts +17 -12
- package/dist/composites/stream-broker-selector.d.ts +29 -8
- package/dist/composites/stream-debug/stream-debug-overlay.d.ts +40 -40
- package/dist/composites/stream-debug/webrtc-debug-stats.d.ts +144 -129
- package/dist/composites/stream-panel.d.ts +212 -201
- package/dist/composites/table-sort.d.ts +61 -61
- package/dist/composites/timezone-selector.d.ts +15 -13
- package/dist/composites/training/send-frame-to-training.d.ts +5 -4
- package/dist/composites/training/training-collection-picker.d.ts +4 -3
- package/dist/composites/training/training-refusal-text.d.ts +6 -6
- package/dist/composites/unit-picker/UnitPicker.d.ts +19 -14
- package/dist/composites/unit-picker/index.d.ts +1 -1
- package/dist/composites/use-data-table-filter.d.ts +19 -19
- package/dist/composites/version-badge.d.ts +19 -18
- package/dist/composites/webrtc-diagnostics/EndpointTestCard.d.ts +7 -7
- package/dist/composites/webrtc-diagnostics/HubSessionTestCard.d.ts +14 -14
- package/dist/composites/webrtc-diagnostics/RunReport.d.ts +10 -5
- package/dist/composites/webrtc-diagnostics/endpoint-probe.d.ts +41 -21
- package/dist/composites/webrtc-diagnostics/endpoint-test.d.ts +37 -32
- package/dist/composites/webrtc-diagnostics/format.d.ts +3 -3
- package/dist/composites/webrtc-diagnostics/ice-candidates.d.ts +49 -49
- package/dist/composites/webrtc-diagnostics/nat-mapping.d.ts +36 -36
- package/dist/composites/webrtc-diagnostics/session-run.d.ts +108 -95
- package/dist/composites/webrtc-diagnostics/session-verdict.d.ts +29 -20
- package/dist/composites/widget-panel.d.ts +23 -23
- package/dist/composites/widget-slot.d.ts +35 -17
- package/dist/contexts/custom-field-renderers.d.ts +53 -17
- package/dist/contexts/device-context.d.ts +32 -12
- package/dist/contexts/device-quick-detail.d.ts +13 -4
- package/dist/contexts/player-overlays.d.ts +82 -42
- package/dist/contexts/recorded-playback.d.ts +40 -18
- package/dist/contexts/system-context.d.ts +28 -13
- package/dist/contexts/vod-playback.d.ts +39 -22
- package/dist/contexts/widget-registry.d.ts +139 -102
- package/dist/contexts/zone-editing.d.ts +69 -46
- package/dist/generated/system-hooks.d.ts +17 -1
- package/dist/hooks/index.d.ts +43 -43
- package/dist/hooks/turn-server-cache.d.ts +69 -69
- package/dist/hooks/use-capability-presence.d.ts +65 -28
- package/dist/hooks/use-cluster-nodes.d.ts +54 -27
- package/dist/hooks/use-device-autotrack.d.ts +7 -7
- package/dist/hooks/use-device-battery.d.ts +24 -11
- package/dist/hooks/use-device-cap-slice.d.ts +15 -15
- package/dist/hooks/use-device-capability.d.ts +61 -27
- package/dist/hooks/use-device-detections.d.ts +32 -32
- package/dist/hooks/use-device-features.d.ts +18 -18
- package/dist/hooks/use-device-list-page-size.d.ts +19 -6
- package/dist/hooks/use-device-network-link.d.ts +15 -7
- package/dist/hooks/use-device-proxy.d.ts +98 -92
- package/dist/hooks/use-device-snapshot.d.ts +23 -23
- package/dist/hooks/use-device-webrtc.d.ts +211 -205
- package/dist/hooks/use-devices.d.ts +9 -9
- package/dist/hooks/use-doorbell-events.d.ts +13 -13
- package/dist/hooks/use-event-stream.d.ts +6 -3
- package/dist/hooks/use-is-mobile.d.ts +5 -5
- package/dist/hooks/use-live-buffer.d.ts +5 -5
- package/dist/hooks/use-live-event.d.ts +1 -1
- package/dist/hooks/use-navigation.d.ts +20 -20
- package/dist/hooks/use-optimistic-slice.d.ts +13 -13
- package/dist/hooks/use-persisted-page-size.d.ts +10 -10
- package/dist/hooks/use-ptz.d.ts +108 -108
- package/dist/hooks/use-stationary-overlay.d.ts +37 -37
- package/dist/hooks/use-system-query.d.ts +33 -10
- package/dist/hooks/use-url-query.d.ts +3 -3
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/provider-icons.d.ts +2 -2
- package/dist/icons/status-icons.d.ts +2 -2
- package/dist/index.cjs +123 -69
- package/dist/index.d.ts +31 -27
- package/dist/index.js +123 -69
- package/dist/lib/cap-error.d.ts +18 -39
- package/dist/lib/cn.d.ts +1 -1
- package/dist/lib/fleet-query-defaults.d.ts +68 -34
- package/dist/lib/format-control-datetime.d.ts +16 -16
- package/dist/lib/format-duration.d.ts +12 -12
- package/dist/lib/format-last-seen.d.ts +5 -18
- package/dist/lib/format-numeric.d.ts +7 -7
- package/dist/lib/hub-mount.d.ts +8 -42
- package/dist/lib/index.d.ts +21 -21
- package/dist/lib/phase-config.d.ts +24 -11
- package/dist/lib/pipeline-mirror.d.ts +16 -16
- package/dist/lib/recorded-control-protocol.d.ts +41 -43
- package/dist/lib/resolve-sensor-display.d.ts +36 -20
- package/dist/lib/responsive.d.ts +54 -54
- package/dist/lib/scrub-controller.d.ts +75 -78
- package/dist/lib/shared-context.d.ts +27 -2
- package/dist/lib/tailwind-variants.d.ts +20 -20
- package/dist/primitives/badge.d.ts +5 -10
- package/dist/primitives/bottom-sheet.d.ts +7 -7
- package/dist/primitives/button.d.ts +5 -9
- package/dist/primitives/card.d.ts +4 -8
- package/dist/primitives/checkbox.d.ts +3 -4
- package/dist/primitives/collapsible-card.d.ts +23 -13
- package/dist/primitives/dialog.d.ts +33 -59
- package/dist/primitives/dropdown.d.ts +13 -13
- package/dist/primitives/floating-panel.d.ts +41 -20
- package/dist/primitives/icon-button.d.ts +8 -12
- package/dist/primitives/index.d.ts +22 -22
- package/dist/primitives/input.d.ts +6 -16
- package/dist/primitives/label.d.ts +3 -4
- package/dist/primitives/mobile-drawer.d.ts +8 -8
- package/dist/primitives/password-input.d.ts +18 -18
- package/dist/primitives/popover.d.ts +7 -7
- package/dist/primitives/scroll-area.d.ts +3 -4
- package/dist/primitives/select.d.ts +20 -20
- package/dist/primitives/separator.d.ts +4 -8
- package/dist/primitives/skeleton.d.ts +3 -4
- package/dist/primitives/switch.d.ts +6 -6
- package/dist/primitives/tabs.d.ts +26 -26
- package/dist/primitives/tooltip.d.ts +12 -12
- package/dist/theme/create-theme.d.ts +1 -1
- package/dist/theme/defaults.d.ts +1 -1
- package/dist/theme/index.d.ts +6 -6
- package/dist/theme/theme-provider.d.ts +8 -7
- package/dist/theme/theme-to-css.d.ts +1 -1
- package/dist/theme/types.d.ts +98 -100
- package/dist/theme/use-theme-mode.d.ts +1 -1
- package/dist/trpc-react.d.ts +23 -3
- package/dist/widgets/host-widgets.d.ts +4 -4
- package/package.json +8 -4
- package/src/tailwind/camstack-theme.css +11 -0
- package/dist/composites/unit-picker/UnitPicker.spec.d.ts +0 -1
|
@@ -1,56 +1,96 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Player overlay registry — pluggable layers + toolbar buttons for
|
|
3
|
+
* the device-detail live-frame `StreamPanel`.
|
|
4
|
+
*
|
|
5
|
+
* Why a registry: previously `StreamPanelContent` hardcoded each
|
|
6
|
+
* overlay (PTZ, intercom toggle, zone editor) and threaded the
|
|
7
|
+
* editing state by hand. Adding a new feature (audio waveform,
|
|
8
|
+
* detection bbox tracker, recording controls, …) meant another
|
|
9
|
+
* round of plumbing through the host file and StreamPanel's prop
|
|
10
|
+
* surface. The registry lets a sibling component (Detection tab,
|
|
11
|
+
* Live Stats tab, an addon-page extension) declare its own layer
|
|
12
|
+
* imperatively via a hook, and the host renders whatever's
|
|
13
|
+
* registered.
|
|
14
|
+
*
|
|
15
|
+
* Two registries live side-by-side:
|
|
16
|
+
*
|
|
17
|
+
* 1. **layers** — absolute-positioned React nodes drawn over the
|
|
18
|
+
* video frame (zones polygon canvas, motion bbox overlay,
|
|
19
|
+
* audio waveform). Rendered ordered by `order` (lower first
|
|
20
|
+
* → bottom; higher → top); the last-registered layer wins
|
|
21
|
+
* ties.
|
|
22
|
+
*
|
|
23
|
+
* 2. **toolbar buttons** — controls surfaced in the player's
|
|
24
|
+
* always-visible toolbar cluster (next to Intercom + Play/Stop).
|
|
25
|
+
* Each carries an icon, label, controlled `active` flag, and
|
|
26
|
+
* a click handler. The host (StreamPanel) renders them
|
|
27
|
+
* uniformly; tone variants stay simple (`'default' | 'primary'`).
|
|
28
|
+
*
|
|
29
|
+
* Lifecycle: hooks register their layer / button on mount and
|
|
30
|
+
* unregister on unmount, so swapping tabs (e.g. leaving Detection)
|
|
31
|
+
* automatically tears down the registration. Re-registering with
|
|
32
|
+
* the same `id` replaces the prior entry — meaning a single hook
|
|
33
|
+
* call can update its overlay/button props on every render without
|
|
34
|
+
* leaking entries.
|
|
35
|
+
*
|
|
36
|
+
* Provider scope: typically wraps the whole device-detail subtree
|
|
37
|
+
* so the StreamPanel + every tab share the same registry. One
|
|
38
|
+
* provider per `deviceId`; switching device IDs unmounts the
|
|
39
|
+
* provider naturally.
|
|
40
|
+
*/
|
|
41
|
+
import { type ReactNode, type JSX } from "react";
|
|
2
42
|
export interface PlayerOverlayLayer {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
43
|
+
readonly id: string;
|
|
44
|
+
/** Lower = bottom. Built-in layers (PTZ overlay, detection overlay)
|
|
45
|
+
* are drawn at order 0; addon-contributed layers should pick a
|
|
46
|
+
* higher value (e.g. 100) to land on top. */
|
|
47
|
+
readonly order: number;
|
|
48
|
+
readonly node: ReactNode;
|
|
9
49
|
}
|
|
10
50
|
export interface PlayerToolbarButton {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
51
|
+
readonly id: string;
|
|
52
|
+
/** Lower = leftmost in the toolbar cluster. */
|
|
53
|
+
readonly order: number;
|
|
54
|
+
/** Icon node — typically a `<svg>` or lucide-react icon. The host
|
|
55
|
+
* renders it inside a button shell; the icon component is
|
|
56
|
+
* responsible for its own sizing (h-3 w-3 by convention). */
|
|
57
|
+
readonly icon: ReactNode;
|
|
58
|
+
/** Visible label on wider breakpoints; collapses to icon-only on
|
|
59
|
+
* narrow widths. */
|
|
60
|
+
readonly label: string;
|
|
61
|
+
/** Title/tooltip for the rendered button. Defaults to `label`. */
|
|
62
|
+
readonly title?: string;
|
|
63
|
+
/** Controlled active state — drives the highlight (primary tint). */
|
|
64
|
+
readonly active: boolean;
|
|
65
|
+
/** Tone variant for the inactive state. `'primary'` reads as a
|
|
66
|
+
* call-to-action (e.g. "Snapshot"); `'default'` is a neutral
|
|
67
|
+
* toggle. */
|
|
68
|
+
readonly tone?: "default" | "primary";
|
|
69
|
+
/** Disable the button when the host is mid-transition. */
|
|
70
|
+
readonly disabled?: boolean;
|
|
71
|
+
readonly onClick: () => void;
|
|
32
72
|
}
|
|
33
73
|
export interface PlayerOverlaysProviderProps {
|
|
34
|
-
|
|
74
|
+
readonly children: ReactNode;
|
|
35
75
|
}
|
|
36
|
-
export declare function PlayerOverlaysProvider({ children }: PlayerOverlaysProviderProps):
|
|
76
|
+
export declare function PlayerOverlaysProvider({ children }: PlayerOverlaysProviderProps): JSX.Element;
|
|
37
77
|
/** Snapshot of registered layers ordered by `order` (asc, ties resolved
|
|
38
|
-
|
|
39
|
-
|
|
78
|
+
* by insertion order of the underlying Map). Returns `[]` outside a
|
|
79
|
+
* provider. */
|
|
40
80
|
export declare function usePlayerOverlayLayers(): readonly PlayerOverlayLayer[];
|
|
41
81
|
/** Snapshot of registered toolbar buttons, ordered by `order` (asc). */
|
|
42
82
|
export declare function usePlayerToolbarButtons(): readonly PlayerToolbarButton[];
|
|
43
83
|
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
84
|
+
* Register an overlay layer for the lifetime of the calling component.
|
|
85
|
+
* Re-registers on every render with the latest spec; auto-unregisters
|
|
86
|
+
* on unmount. Pass `null` to skip registration when the layer is
|
|
87
|
+
* conditionally enabled (the hook still runs every render — keeps
|
|
88
|
+
* react-hook order stable across spec === null toggles).
|
|
89
|
+
*
|
|
90
|
+
* Callers that build the spec inline should memoise it (`useMemo`)
|
|
91
|
+
* to avoid re-registering on every parent render — context-write
|
|
92
|
+
* effects depend on referential equality of the spec object.
|
|
93
|
+
*/
|
|
54
94
|
export declare function usePlayerOverlayLayer(spec: PlayerOverlayLayer | null): void;
|
|
55
95
|
/** Same shape as `usePlayerOverlayLayer`, scoped to toolbar buttons. */
|
|
56
96
|
export declare function usePlayerToolbarButton(spec: PlayerToolbarButton | null): void;
|
|
@@ -1,23 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* RecordedPlayback — shared context wiring the hero player's
|
|
3
|
+
* `camstack-control` RTCDataChannel to the Recording timeline (R9).
|
|
4
|
+
*
|
|
5
|
+
* The hero `StreamPanel` (host side) BINDS the channel that
|
|
6
|
+
* `CameraStreamPlayer` opens on the live WebRTC session; the Recording
|
|
7
|
+
* widget's `RecordingTimeline` (controller side) SENDS frame-push playback
|
|
8
|
+
* commands over it (seek / scrubCommit / setRate / goLive — the broker's
|
|
9
|
+
* `TimelineSession` drives the `RecordedFeeder` on the SAME session, so
|
|
10
|
+
* recorded frames arrive on the same `<video>` element) and OBSERVES the
|
|
11
|
+
* server's playback state + ~1 Hz position reports.
|
|
12
|
+
*
|
|
13
|
+
* This is the admin-ui port of the shipped viewer's default recorded path
|
|
14
|
+
* (srcV2 → embed → `camstack-control`), replacing "manifest-window HLS only".
|
|
15
|
+
* The HLS VOD path (VodPlayback context) remains available as a fallback.
|
|
16
|
+
*
|
|
17
|
+
* Built on `createSharedContext` (NOT a plain `createContext`) so it crosses
|
|
18
|
+
* the Module-Federation boundary — same mechanism as `vod-playback`.
|
|
19
|
+
* Consumers outside a provider get the inert default: `bindControlChannel`
|
|
20
|
+
* is null (StreamPanel then opens NO datachannel — plain live player) and
|
|
21
|
+
* `channelOpen` is false (RecordingTimeline stays on the HLS path).
|
|
22
|
+
*/
|
|
23
|
+
import { type ReactNode, type JSX } from "react";
|
|
24
|
+
import { type RecordedControlCommand, type RecordedPlaybackMode } from "../lib/recorded-control-protocol";
|
|
3
25
|
export interface RecordedPlaybackContextValue {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Host-side binding for the player's `onControlChannel` prop. `null` in the
|
|
28
|
+
* inert default — a StreamPanel outside the provider passes `undefined` to
|
|
29
|
+
* the player and no datachannel is created (behaviour unchanged).
|
|
30
|
+
*/
|
|
31
|
+
readonly bindControlChannel: ((channel: RTCDataChannel) => void) | null;
|
|
32
|
+
/** True while a bound channel is open — frame-push control is available. */
|
|
33
|
+
readonly channelOpen: boolean;
|
|
34
|
+
/** Last server-reported playback mode (`live` until told otherwise). */
|
|
35
|
+
readonly mode: RecordedPlaybackMode;
|
|
36
|
+
/** Last server-reported playback position (~1 Hz), or null while live. */
|
|
37
|
+
readonly positionMs: number | null;
|
|
38
|
+
/** Send a control command. Returns false when the channel isn't open. */
|
|
39
|
+
readonly send: (cmd: RecordedControlCommand) => boolean;
|
|
18
40
|
}
|
|
19
41
|
export declare function RecordedPlaybackProvider({ children }: {
|
|
20
|
-
|
|
21
|
-
}):
|
|
42
|
+
readonly children: ReactNode;
|
|
43
|
+
}): JSX.Element;
|
|
22
44
|
/** @returns the recorded-playback control surface (inert outside a provider). */
|
|
23
45
|
export declare function useRecordedPlayback(): RecordedPlaybackContextValue;
|
|
@@ -1,19 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* SystemContext — React-context plumbing for the unified `System` SDK
|
|
3
|
+
* class.
|
|
4
|
+
*
|
|
5
|
+
* Phase 2 of the API consolidation makes `System` the single
|
|
6
|
+
* client-side entry point. Pages/components reach the cluster through
|
|
7
|
+
* the hooks in `../hooks/`; those hooks all read the `System`
|
|
8
|
+
* instance from this context.
|
|
9
|
+
*
|
|
10
|
+
* The provider is intentionally stupid — it just stores the instance.
|
|
11
|
+
* Lifecycle (`init()`, reconnect on auth change, watchdog) lives in
|
|
12
|
+
* the host app (admin-ui's `App.tsx`) — the provider doesn't try to
|
|
13
|
+
* own it because addon UIs may want to construct the System
|
|
14
|
+
* differently (e.g. against a remote cluster).
|
|
15
|
+
*/
|
|
16
|
+
import { type ReactNode, type JSX } from "react";
|
|
17
|
+
import type { System } from "@camstack/sdk";
|
|
3
18
|
export interface SystemProviderProps {
|
|
4
|
-
|
|
5
|
-
|
|
19
|
+
readonly system: System;
|
|
20
|
+
readonly children: ReactNode;
|
|
6
21
|
}
|
|
7
|
-
export declare function SystemProvider({ system, children }: SystemProviderProps):
|
|
22
|
+
export declare function SystemProvider({ system, children }: SystemProviderProps): JSX.Element;
|
|
8
23
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
24
|
+
* Read the active `System` instance from the surrounding `<SystemProvider>`.
|
|
25
|
+
* Throws when no provider is mounted — every hook in this directory
|
|
26
|
+
* relies on the system, so a clear error beats a silent null.
|
|
27
|
+
*/
|
|
13
28
|
export declare function useSystem(): System;
|
|
14
29
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
* Variant that returns `null` instead of throwing — useful for
|
|
31
|
+
* components that need to render before the provider is set up
|
|
32
|
+
* (boot-time splash screens etc.).
|
|
33
|
+
*/
|
|
19
34
|
export declare function useOptionalSystem(): System | null;
|
|
@@ -1,29 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* VodPlayback — shared context coordinating recorded (VOD) playback between a
|
|
3
|
+
* widget/section (the Recording panel) and the hero StreamPanel.
|
|
4
|
+
*
|
|
5
|
+
* A CONTROLLER (the Recording widget) calls `play({ url, label })`; the hero
|
|
6
|
+
* StreamPanel CONSUMES `request` and switches into VOD mode (HLS playback
|
|
7
|
+
* through the hub data-plane) instead of the live WebRTC stream. `clear()`
|
|
8
|
+
* returns the hero to live.
|
|
9
|
+
*
|
|
10
|
+
* Built on `createSharedContext` (NOT a plain `createContext`) so it crosses
|
|
11
|
+
* the Module-Federation boundary: an addon-shipped widget consuming
|
|
12
|
+
* `useVodPlayback()` resolves the SAME provider instance the host mounted —
|
|
13
|
+
* the same mechanism `player-overlays` / `zone-editing` use to let federated
|
|
14
|
+
* widgets (zone-editor, privacy-mask) drive the live player. Consumers used
|
|
15
|
+
* outside a provider get the inert default (no-op), so a StreamPanel mounted
|
|
16
|
+
* on a page without the Recording widget stays live-only without crashing.
|
|
17
|
+
*/
|
|
18
|
+
import { type ReactNode, type JSX } from "react";
|
|
2
19
|
export interface VodPlaybackRequest {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
/** Media URL through the hub data-plane (relative) — an HLS master `.m3u8`,
|
|
21
|
+
* or a progressive `.mp4` when {@link format} says so. */
|
|
22
|
+
readonly url: string;
|
|
23
|
+
/**
|
|
24
|
+
* What {@link url} is. Absent means `hls`, so every existing controller is
|
|
25
|
+
* unchanged.
|
|
26
|
+
*
|
|
27
|
+
* A NATIVE clip (a camera's own file, fetched and muxed by its vendor addon)
|
|
28
|
+
* is `mp4`: the hero player sets `video.src` instead of handing it to
|
|
29
|
+
* hls.js, which would parse the file as a manifest and fail (D549 22). The
|
|
30
|
+
* value comes straight from `videoclips.getClipPlayback().format` — the
|
|
31
|
+
* provider is the only thing that knows.
|
|
32
|
+
*/
|
|
33
|
+
readonly format?: "hls" | "mp4";
|
|
34
|
+
/** Short human label shown in the hero while playing (e.g. a timestamp). */
|
|
35
|
+
readonly label?: string;
|
|
19
36
|
}
|
|
20
37
|
export interface VodPlaybackContextValue {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
38
|
+
readonly request: VodPlaybackRequest | null;
|
|
39
|
+
readonly play: (request: VodPlaybackRequest) => void;
|
|
40
|
+
readonly clear: () => void;
|
|
24
41
|
}
|
|
25
42
|
export declare function VodPlaybackProvider({ children }: {
|
|
26
|
-
|
|
27
|
-
}):
|
|
43
|
+
readonly children: ReactNode;
|
|
44
|
+
}): JSX.Element;
|
|
28
45
|
/** @returns the VOD playback controller (inert no-op outside a provider). */
|
|
29
46
|
export declare function useVodPlayback(): VodPlaybackContextValue;
|
|
@@ -1,127 +1,164 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* WidgetRegistry — admin-ui side of the addon-widgets system.
|
|
3
|
+
*
|
|
4
|
+
* Backed by Module Federation (`@module-federation/runtime`). The host
|
|
5
|
+
* (admin-ui) declares its shared singletons in `vite.config.ts`; every
|
|
6
|
+
* widget addon publishes a remote at `dist/remoteEntry.js` (built by
|
|
7
|
+
* `vite.widgets.config.ts`). At runtime we fetch the public list of
|
|
8
|
+
* addon-contributed widgets via `useAddonWidgetsListWidgets()`, register
|
|
9
|
+
* each remote (`registerRemotes`) once, then resolve a widget by
|
|
10
|
+
* loading the exposed module (`loadRemote`) whose default export is a
|
|
11
|
+
* `Record<componentKey, ComponentType>` map.
|
|
12
|
+
*
|
|
13
|
+
* Unified UI-contribution model (Task 10) — a widget declaration IS a
|
|
14
|
+
* `UiContribution` with `kind:'remote'`. Both the device-detail path
|
|
15
|
+
* (`ContributionRenderer`) and the dashboard render widgets through the
|
|
16
|
+
* same `loadRemoteBundle` MF path. `loadRemoteBundle` is exported and
|
|
17
|
+
* generic over `(remoteName, exposedModule, entryUrl)` so any
|
|
18
|
+
* `UiContributionRemote` descriptor resolves without an aggregator-keyed
|
|
19
|
+
* lookup.
|
|
20
|
+
*
|
|
21
|
+
* Why MF instead of raw ESM:
|
|
22
|
+
* - automatic dedup of shared deps (react/react-dom/@tanstack/etc.)
|
|
23
|
+
* against the host's instances — no more hand-rolled vendor stubs +
|
|
24
|
+
* importmap shims pointing at `window.__camstack*` globals.
|
|
25
|
+
* - version negotiation (we pin `singleton: true` everywhere; the host
|
|
26
|
+
* wins by default).
|
|
27
|
+
* - cross-bundle context invariant preserved automatically: every
|
|
28
|
+
* remote's `@camstack/ui-library` import resolves to the host's
|
|
29
|
+
* instance, so `createContext()` references match across bundles.
|
|
30
|
+
*
|
|
31
|
+
* Live-update — listens to `addon.widget-ready` so newly-loaded addons
|
|
32
|
+
* surface their widgets without a manual page reload (the aggregator
|
|
33
|
+
* stamps a fresh `?v=<mtime>` cache-buster on the entry URL).
|
|
34
|
+
*
|
|
35
|
+
* Cache resilience — same `staleTime: 0` + `refetchOnMount` + boot-
|
|
36
|
+
* window poll fallback as `AppLayout`'s addon-pages query.
|
|
37
|
+
*/
|
|
38
|
+
import { type ComponentType, type ReactNode, type JSX } from "react";
|
|
39
|
+
import type { UiContributionRemote } from "@camstack/types";
|
|
3
40
|
/** Standard props every addon-contributed widget receives. */
|
|
4
41
|
export interface WidgetProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
42
|
+
/** Stable id of THIS widget instance (form-builder field key, dashboard slot UUID, etc.). */
|
|
43
|
+
readonly instanceId: string;
|
|
44
|
+
/** Host where this widget is rendered. */
|
|
45
|
+
readonly host: "device-tab" | "dashboard" | "integration-detail";
|
|
46
|
+
/** Form/dashboard-supplied props. Shape depends on the widget. */
|
|
47
|
+
readonly config?: Readonly<Record<string, unknown>>;
|
|
48
|
+
/** Provided when host has a device context. */
|
|
49
|
+
readonly deviceId?: number;
|
|
50
|
+
/** Provided when host has an integration context. */
|
|
51
|
+
readonly integrationId?: string;
|
|
52
|
+
/** Dashboard sizing hints (placeholder for v1 — widget can ignore). */
|
|
53
|
+
readonly size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
54
|
+
readonly columns?: number;
|
|
55
|
+
readonly rows?: number;
|
|
19
56
|
}
|
|
20
57
|
/** Public registry surface. */
|
|
21
58
|
export interface WidgetRegistry {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Returns the resolved widget component for `<addonId>/<stableId>`,
|
|
61
|
+
* or `undefined` when the widget id is unknown to the registry, or
|
|
62
|
+
* `null` while the bundle is still loading.
|
|
63
|
+
*
|
|
64
|
+
* @deprecated Unused by all render paths since the unified
|
|
65
|
+
* UI-contribution model (Task 10). Resolve remotes through
|
|
66
|
+
* `useRemoteComponent` / `<WidgetSlot>` instead. Kept for external
|
|
67
|
+
* addons that may still call it.
|
|
68
|
+
*/
|
|
69
|
+
resolve(widgetId: string): ComponentType<WidgetProps> | null | undefined;
|
|
70
|
+
/** Metadata lookup — used by `<WidgetSlot>` to validate `requires`. */
|
|
71
|
+
metadata(widgetId: string): WidgetMetadataEntry | undefined;
|
|
72
|
+
/** Every contributed widget. Used by host pickers (e.g. dashboard
|
|
73
|
+
* add-widget modal) to enumerate the available widgets. */
|
|
74
|
+
listAll(): readonly WidgetMetadataEntry[];
|
|
75
|
+
/**
|
|
76
|
+
* Resolve the versioned MF entry URL for a remote name — the
|
|
77
|
+
* aggregator-stamped `bundleUrl`. Used by the unified
|
|
78
|
+
* `ContributionRenderer` `kind:'remote'` path to load a remote it
|
|
79
|
+
* only knows by `remoteName`. `undefined` when no widget in the
|
|
80
|
+
* registry references that remote.
|
|
81
|
+
*/
|
|
82
|
+
entryUrlFor(remoteName: string): string | undefined;
|
|
46
83
|
}
|
|
47
84
|
/** Widget host kinds — a widget can run on more than one host. */
|
|
48
|
-
export type WidgetHost =
|
|
85
|
+
export type WidgetHost = "device-tab" | "dashboard" | "integration-detail";
|
|
49
86
|
/** Dashboard sizing hints. */
|
|
50
|
-
export type WidgetSize =
|
|
87
|
+
export type WidgetSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
51
88
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
89
|
+
* One enriched-aggregator entry exposed to consumers.
|
|
90
|
+
*
|
|
91
|
+
* A widget declaration IS a `UiContribution` (`kind:'remote'`) plus
|
|
92
|
+
* widget-only metadata — this entry mirrors that shape with the
|
|
93
|
+
* aggregator-stamped `addonId` + `bundleUrl` added.
|
|
94
|
+
*/
|
|
58
95
|
export interface WidgetMetadataEntry {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
96
|
+
readonly widgetId: string;
|
|
97
|
+
readonly addonId: string;
|
|
98
|
+
readonly stableId: string;
|
|
99
|
+
readonly tab: string;
|
|
100
|
+
readonly subTab?: string;
|
|
101
|
+
readonly label: string;
|
|
102
|
+
readonly order?: number;
|
|
103
|
+
readonly kind: "remote";
|
|
104
|
+
readonly remote: UiContributionRemote;
|
|
105
|
+
readonly description?: string;
|
|
106
|
+
readonly icon?: string;
|
|
107
|
+
readonly bundleUrl: string;
|
|
108
|
+
readonly hosts: readonly WidgetHost[];
|
|
109
|
+
readonly requires: {
|
|
110
|
+
readonly deviceContext: boolean;
|
|
111
|
+
readonly integrationContext: boolean;
|
|
112
|
+
};
|
|
113
|
+
readonly defaultSize: WidgetSize;
|
|
114
|
+
readonly allowedSizes: readonly WidgetSize[];
|
|
115
|
+
readonly defaultColumns: number;
|
|
116
|
+
readonly defaultRows: number;
|
|
80
117
|
}
|
|
81
118
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
119
|
+
* Register the MF remote (idempotent) and load one of its exposed
|
|
120
|
+
* modules. Returns the resolved `Record<componentKey, Component>` map
|
|
121
|
+
* (the exposed module's `default` export).
|
|
122
|
+
*
|
|
123
|
+
* Exported so the unified `ContributionRenderer` `kind:'remote'` path
|
|
124
|
+
* can load an arbitrary `{ remoteName, exposedModule }` descriptor —
|
|
125
|
+
* the same path the `WidgetRegistry` uses internally for widgets.
|
|
126
|
+
*/
|
|
90
127
|
export declare function loadRemoteBundle(remoteName: string, exposedModule: string, entryUrl: string): Promise<Record<string, ComponentType<WidgetProps>>>;
|
|
91
128
|
export interface WidgetRegistryProviderProps {
|
|
92
|
-
|
|
129
|
+
readonly children: ReactNode;
|
|
93
130
|
}
|
|
94
|
-
export declare function WidgetRegistryProvider({ children }: WidgetRegistryProviderProps):
|
|
131
|
+
export declare function WidgetRegistryProvider({ children }: WidgetRegistryProviderProps): JSX.Element | null;
|
|
95
132
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
133
|
+
* Returns the registered widget component, `null` while loading, or
|
|
134
|
+
* `undefined` if unknown.
|
|
135
|
+
*
|
|
136
|
+
* @deprecated Unused by all render paths since the unified
|
|
137
|
+
* UI-contribution model (Task 10). Use `useRemoteComponent` /
|
|
138
|
+
* `<WidgetSlot>` instead. Kept for external addons that may import it.
|
|
139
|
+
*/
|
|
103
140
|
export declare function useWidget(widgetId: string): ComponentType<WidgetProps> | null | undefined;
|
|
104
141
|
/** Returns the metadata entry for a widget, or `undefined` if unknown. */
|
|
105
142
|
export declare function useWidgetMetadata(widgetId: string): WidgetMetadataEntry | undefined;
|
|
106
143
|
/** Returns every contributed widget — host pickers (dashboard
|
|
107
|
-
|
|
108
|
-
|
|
144
|
+
* add-widget modal, settings UI palette) consume this to enumerate
|
|
145
|
+
* the registry. Filter on the call site by `metadata.hosts.includes()`. */
|
|
109
146
|
export declare function useAllWidgets(): readonly WidgetMetadataEntry[];
|
|
110
147
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
148
|
+
* Resolve a `kind:'remote'` `UiContributionRemote` descriptor to a
|
|
149
|
+
* React component. Drives the unified `ContributionRenderer`
|
|
150
|
+
* `kind:'remote'` path — both device-detail contributions and dashboard
|
|
151
|
+
* widgets resolve through the same MF `loadRemoteBundle` loader.
|
|
152
|
+
*
|
|
153
|
+
* Returns:
|
|
154
|
+
* - `undefined` — the remote couldn't be resolved (no entry URL known,
|
|
155
|
+
* or the remote exposed no component for `componentKey`),
|
|
156
|
+
* - `null` — the bundle is still loading,
|
|
157
|
+
* - the component otherwise.
|
|
158
|
+
*
|
|
159
|
+
* `entryUrl` may be passed explicitly; when omitted it's resolved from
|
|
160
|
+
* the registry's aggregator-stamped `bundleUrl` for `remote.remoteName`.
|
|
161
|
+
*/
|
|
125
162
|
export declare function useRemoteComponent(remote: UiContributionRemote, entryUrl?: string): ComponentType<WidgetProps> | null | undefined;
|
|
126
163
|
/** Read the registry instance — throws when no provider is mounted. */
|
|
127
164
|
export declare function useWidgetRegistry(): WidgetRegistry;
|