@dominevo/ui-library 0.0.0-stage → 0.1.0
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/CHANGELOG.md +1363 -0
- package/README.md +18 -2
- package/assets/brand/dominevo-current.svg +1 -0
- package/assets/brand/dominevo-light.svg +1 -0
- package/assets/brand/dominevo-mono.svg +1 -0
- package/assets/brand/dominevo-primary.svg +1 -0
- package/dist/MaskShapeCanvas-C9cJlxvG.js +915 -0
- package/dist/MaskShapeCanvas-NCNwu9_5.cjs +915 -0
- package/dist/MotionZonesSettings-C2AIvd4c.js +410 -0
- package/dist/MotionZonesSettings-CPRH536-.cjs +410 -0
- package/dist/PrivacyMaskSettings-BLM8OfT5.cjs +433 -0
- package/dist/PrivacyMaskSettings-FNCxdQCg.js +433 -0
- package/dist/SceneMonitorEditor-Bj_BN2Ar.js +1052 -0
- package/dist/SceneMonitorEditor-CU24Au1r.cjs +1052 -0
- package/dist/chevron-down-B71qEdFG.js +121 -0
- package/dist/chevron-down-VnEXTuJa.cjs +132 -0
- package/dist/composites/DeviceRunsPanel.d.ts +23 -0
- package/dist/composites/accelerator-label.d.ts +17 -0
- package/dist/composites/account-sign-in-field.d.ts +17 -0
- package/dist/composites/adaptive-downlink.d.ts +202 -0
- package/dist/composites/addon-page-props.d.ts +44 -0
- package/dist/composites/addon-scoped-settings-form.d.ts +59 -0
- package/dist/composites/agent-step-editor.d.ts +56 -0
- package/dist/composites/app-shell/app-shell.d.ts +19 -0
- package/dist/composites/app-shell/index.d.ts +3 -0
- package/dist/composites/app-shell/sidebar-item.d.ts +11 -0
- package/dist/composites/app-shell/sidebar.d.ts +14 -0
- package/dist/composites/audio-classification-list.d.ts +21 -0
- package/dist/composites/audio-level-waveform.d.ts +36 -0
- package/dist/composites/audio-waveform.d.ts +21 -0
- package/dist/composites/battery-badge.d.ts +37 -0
- package/dist/composites/battery-details-list.d.ts +10 -0
- package/dist/composites/battery-details.d.ts +22 -0
- package/dist/composites/binary-battery.d.ts +8 -0
- package/dist/composites/breadcrumb.d.ts +26 -0
- package/dist/composites/camera-stream-player.d.ts +330 -0
- package/dist/composites/cap-link-cell.d.ts +30 -0
- package/dist/composites/cap-settings/AutotrackSection.d.ts +6 -0
- package/dist/composites/cap-settings/CameraGridLayoutEditor.d.ts +5 -0
- package/dist/composites/cap-settings/CoverageTrack.d.ts +30 -0
- package/dist/composites/cap-settings/EventBucketStrip.d.ts +26 -0
- package/dist/composites/cap-settings/EventHeatmap.d.ts +17 -0
- package/dist/composites/cap-settings/HomePresetPicker.d.ts +6 -0
- package/dist/composites/cap-settings/MaskShapeCanvas.d.ts +48 -0
- package/dist/composites/cap-settings/MotionZonesSettings.d.ts +3 -0
- package/dist/composites/cap-settings/NavigationPanel.d.ts +3 -0
- package/dist/composites/cap-settings/PowerMeterLine.d.ts +10 -0
- package/dist/composites/cap-settings/PrivacyMaskSettings.d.ts +3 -0
- package/dist/composites/cap-settings/PtzPanel.d.ts +15 -0
- package/dist/composites/cap-settings/RecordingBandsEditor.d.ts +46 -0
- package/dist/composites/cap-settings/RecordingPanel.d.ts +3 -0
- package/dist/composites/cap-settings/RecordingSettings.d.ts +14 -0
- package/dist/composites/cap-settings/RecordingTimeline.d.ts +34 -0
- package/dist/composites/cap-settings/SceneMonitorEditor.d.ts +5 -0
- package/dist/composites/cap-settings/SceneReferenceGallery.d.ts +37 -0
- package/dist/composites/cap-settings/SceneSettingsForm.d.ts +22 -0
- package/dist/composites/cap-settings/SourceCropCanvas.d.ts +73 -0
- package/dist/composites/cap-settings/TimelineControls.d.ts +25 -0
- package/dist/composites/cap-settings/camera-grid-layout.d.ts +120 -0
- package/dist/composites/cap-settings/event-thumb.d.ts +12 -0
- package/dist/composites/cap-settings/index.d.ts +23 -0
- package/dist/composites/cap-settings/privacy-mask-audio.d.ts +59 -0
- package/dist/composites/cap-settings/recording-config-form.d.ts +57 -0
- package/dist/composites/cap-settings/recording-spans.d.ts +22 -0
- package/dist/composites/cap-settings/recording-timeline-model.d.ts +129 -0
- package/dist/composites/cap-settings/scene-monitor-copy.d.ts +84 -0
- package/dist/composites/charts/BarSeries.d.ts +54 -0
- package/dist/composites/charts/Sparkline.d.ts +31 -0
- package/dist/composites/charts/StateTimeline.d.ts +49 -0
- package/dist/composites/charts/TimeSeriesChart.d.ts +57 -0
- package/dist/composites/charts/bar-series-model.d.ts +25 -0
- package/dist/composites/charts/chart-bands.d.ts +22 -0
- package/dist/composites/charts/chart-data.d.ts +89 -0
- package/dist/composites/charts/chart-frame.d.ts +53 -0
- package/dist/composites/charts/chart-palette.d.ts +46 -0
- package/dist/composites/charts/chart-scale.d.ts +29 -0
- package/dist/composites/charts/chart-tooltip-host.d.ts +27 -0
- package/dist/composites/charts/chart-tooltip-model.d.ts +178 -0
- package/dist/composites/charts/chart-uplot.d.ts +79 -0
- package/dist/composites/charts/chart-window.d.ts +19 -0
- package/dist/composites/charts/index.d.ts +16 -0
- package/dist/composites/charts/time-series-model.d.ts +50 -0
- package/dist/composites/charts/uplot-host.d.ts +42 -0
- package/dist/composites/client-network-sample.d.ts +56 -0
- package/dist/composites/clips/ClipBandBar.d.ts +46 -0
- package/dist/composites/clips/ClipPanel.d.ts +32 -0
- package/dist/composites/clips/ClipSourceLanes.d.ts +47 -0
- package/dist/composites/clips/ClipTile.d.ts +28 -0
- package/dist/composites/clips/ClipsSection.d.ts +109 -0
- package/dist/composites/clips/clip-band.d.ts +92 -0
- package/dist/composites/clips/clip-day-window.d.ts +13 -0
- package/dist/composites/clips/clip-source-options.d.ts +42 -0
- package/dist/composites/clips/clip-source-state.d.ts +64 -0
- package/dist/composites/clips/clip-still-retry.d.ts +50 -0
- package/dist/composites/clips/clip-thumbnail-fetch.d.ts +17 -0
- package/dist/composites/clips/clip-tile-media.d.ts +78 -0
- package/dist/composites/clips/clip-view-state.d.ts +87 -0
- package/dist/composites/code-block.d.ts +7 -0
- package/dist/composites/command-slider.d.ts +20 -0
- package/dist/composites/condition-kind-picker/ConditionKindPicker.d.ts +36 -0
- package/dist/composites/condition-kind-picker/condition-kind-icons.d.ts +4 -0
- package/dist/composites/condition-kind-picker/condition-kind-picker-model.d.ts +63 -0
- package/dist/composites/condition-kind-picker/index.d.ts +3 -0
- package/dist/composites/condition-kind-picker/use-recent-kinds.d.ts +11 -0
- package/dist/composites/config-discovered-select-field.d.ts +43 -0
- package/dist/composites/config-form-builder.d.ts +42 -0
- package/dist/composites/config-form-field.d.ts +80 -0
- package/dist/composites/config-icon-field.d.ts +12 -0
- package/dist/composites/config-instance-select-field.d.ts +32 -0
- package/dist/composites/config-secret-field.d.ts +65 -0
- package/dist/composites/confirm-action-button.d.ts +74 -0
- package/dist/composites/confirm-dialog.d.ts +79 -0
- package/dist/composites/consumable-level-badge.d.ts +63 -0
- package/dist/composites/copy-button.d.ts +27 -0
- package/dist/composites/data-records/data-records-hub.d.ts +9 -0
- package/dist/composites/data-records/data-records-model.d.ts +26 -0
- package/dist/composites/data-records/index.d.ts +2 -0
- package/dist/composites/data-table-filter-bar.d.ts +58 -0
- package/dist/composites/data-table-filter.d.ts +74 -0
- package/dist/composites/data-table-pager.d.ts +8 -0
- package/dist/composites/data-table-pagination.d.ts +31 -0
- package/dist/composites/data-table-selection.d.ts +15 -0
- package/dist/composites/data-table.d.ts +215 -0
- package/dist/composites/detection-canvas.d.ts +29 -0
- package/dist/composites/detection-colors.d.ts +24 -0
- package/dist/composites/detection-overlay.d.ts +35 -0
- package/dist/composites/detection-result-tree.d.ts +12 -0
- package/dist/composites/dev-shell.d.ts +21 -0
- package/dist/composites/device-activity-panel.d.ts +39 -0
- package/dist/composites/device-card/__fixtures__/actuations.d.ts +12 -0
- package/dist/composites/device-card/__fixtures__/alarm.d.ts +10 -0
- package/dist/composites/device-card/__fixtures__/appliance.d.ts +18 -0
- package/dist/composites/device-card/__fixtures__/climate.d.ts +15 -0
- package/dist/composites/device-card/__fixtures__/common.d.ts +21 -0
- package/dist/composites/device-card/__fixtures__/cover.d.ts +9 -0
- package/dist/composites/device-card/__fixtures__/energy-day.d.ts +3 -0
- package/dist/composites/device-card/__fixtures__/energy.d.ts +22 -0
- package/dist/composites/device-card/__fixtures__/fan.d.ts +10 -0
- package/dist/composites/device-card/__fixtures__/heat-pump.d.ts +13 -0
- package/dist/composites/device-card/__fixtures__/heater.d.ts +11 -0
- package/dist/composites/device-card/__fixtures__/humidifier.d.ts +10 -0
- package/dist/composites/device-card/__fixtures__/ir.d.ts +10 -0
- package/dist/composites/device-card/__fixtures__/light.d.ts +10 -0
- package/dist/composites/device-card/__fixtures__/lock.d.ts +10 -0
- package/dist/composites/device-card/__fixtures__/media.d.ts +11 -0
- package/dist/composites/device-card/__fixtures__/pet.d.ts +11 -0
- package/dist/composites/device-card/__fixtures__/pie-readings.d.ts +14 -0
- package/dist/composites/device-card/__fixtures__/plug.d.ts +19 -0
- package/dist/composites/device-card/__fixtures__/robot.d.ts +9 -0
- package/dist/composites/device-card/__fixtures__/sensor.d.ts +3 -0
- package/dist/composites/device-card/__fixtures__/siren.d.ts +10 -0
- package/dist/composites/device-card/__fixtures__/valve.d.ts +10 -0
- package/dist/composites/device-card/__fixtures__/water-heater.d.ts +10 -0
- package/dist/composites/device-card/__fixtures__/wave-d-common.d.ts +11 -0
- package/dist/composites/device-card/__fixtures__/wave-e.d.ts +29 -0
- package/dist/composites/device-card/__fixtures__/weather-station.d.ts +10 -0
- package/dist/composites/device-card/__fixtures__/weather.d.ts +10 -0
- package/dist/composites/device-card/card-css.d.ts +8 -0
- package/dist/composites/device-card/connected/ConnectedActionCards.d.ts +11 -0
- package/dist/composites/device-card/connected/ConnectedAlarmCard.d.ts +8 -0
- package/dist/composites/device-card/connected/ConnectedApplianceCard.d.ts +9 -0
- package/dist/composites/device-card/connected/ConnectedCameraCard.d.ts +41 -0
- package/dist/composites/device-card/connected/ConnectedClimateCard.d.ts +7 -0
- package/dist/composites/device-card/connected/ConnectedContainerCard.d.ts +14 -0
- package/dist/composites/device-card/connected/ConnectedControlCard.d.ts +9 -0
- package/dist/composites/device-card/connected/ConnectedCoverCard.d.ts +8 -0
- package/dist/composites/device-card/connected/ConnectedDeviceCard.d.ts +12 -0
- package/dist/composites/device-card/connected/ConnectedDishwasherCard.d.ts +10 -0
- package/dist/composites/device-card/connected/ConnectedEnergyCard.d.ts +10 -0
- package/dist/composites/device-card/connected/ConnectedEventCard.d.ts +23 -0
- package/dist/composites/device-card/connected/ConnectedFanCard.d.ts +9 -0
- package/dist/composites/device-card/connected/ConnectedGatewayCard.d.ts +11 -0
- package/dist/composites/device-card/connected/ConnectedHeatPumpCard.d.ts +9 -0
- package/dist/composites/device-card/connected/ConnectedHeaterCard.d.ts +4 -0
- package/dist/composites/device-card/connected/ConnectedHumidifierCard.d.ts +7 -0
- package/dist/composites/device-card/connected/ConnectedImageCard.d.ts +4 -0
- package/dist/composites/device-card/connected/ConnectedIrTransmitterCard.d.ts +8 -0
- package/dist/composites/device-card/connected/ConnectedLightCard.d.ts +12 -0
- package/dist/composites/device-card/connected/ConnectedLockCard.d.ts +8 -0
- package/dist/composites/device-card/connected/ConnectedMediaCard.d.ts +8 -0
- package/dist/composites/device-card/connected/ConnectedNotifierCard.d.ts +4 -0
- package/dist/composites/device-card/connected/ConnectedPetFeederCard.d.ts +9 -0
- package/dist/composites/device-card/connected/ConnectedPetFountainCard.d.ts +4 -0
- package/dist/composites/device-card/connected/ConnectedPlugCard.d.ts +16 -0
- package/dist/composites/device-card/connected/ConnectedRobotCard.d.ts +6 -0
- package/dist/composites/device-card/connected/ConnectedSensorCard.d.ts +19 -0
- package/dist/composites/device-card/connected/ConnectedSirenCard.d.ts +10 -0
- package/dist/composites/device-card/connected/ConnectedUpdateCard.d.ts +7 -0
- package/dist/composites/device-card/connected/ConnectedValveCard.d.ts +8 -0
- package/dist/composites/device-card/connected/ConnectedWaterHeaterCard.d.ts +8 -0
- package/dist/composites/device-card/connected/ConnectedWeatherCard.d.ts +7 -0
- package/dist/composites/device-card/connected/ConnectedWeatherStationCard.d.ts +4 -0
- package/dist/composites/device-card/connected/ConnectedWorkloadCard.d.ts +10 -0
- package/dist/composites/device-card/connected/MeasuredPieCard.d.ts +25 -0
- package/dist/composites/device-card/connected/PrimaryTrend.d.ts +10 -0
- package/dist/composites/device-card/connected/SensorTrend.d.ts +19 -0
- package/dist/composites/device-card/connected/TrendReadout.d.ts +27 -0
- package/dist/composites/device-card/connected/alarm-model.d.ts +8 -0
- package/dist/composites/device-card/connected/appliance-model.d.ts +36 -0
- package/dist/composites/device-card/connected/cap-card-kinds.d.ts +13 -0
- package/dist/composites/device-card/connected/climate-model.d.ts +42 -0
- package/dist/composites/device-card/connected/coarse-duration.d.ts +3 -0
- package/dist/composites/device-card/connected/connected-card-kind.d.ts +17 -0
- package/dist/composites/device-card/connected/consumable-card-item.d.ts +10 -0
- package/dist/composites/device-card/connected/control-model.d.ts +8 -0
- package/dist/composites/device-card/connected/energy-day.d.ts +57 -0
- package/dist/composites/device-card/connected/energy-model.d.ts +102 -0
- package/dist/composites/device-card/connected/fan-model.d.ts +42 -0
- package/dist/composites/device-card/connected/heat-pump-model.d.ts +22 -0
- package/dist/composites/device-card/connected/humidifier-model.d.ts +7 -0
- package/dist/composites/device-card/connected/ir-transmitter-model.d.ts +46 -0
- package/dist/composites/device-card/connected/lock-model.d.ts +11 -0
- package/dist/composites/device-card/connected/measurement-label.d.ts +4 -0
- package/dist/composites/device-card/connected/measurement-since.d.ts +10 -0
- package/dist/composites/device-card/connected/media-model.d.ts +18 -0
- package/dist/composites/device-card/connected/pet-model.d.ts +13 -0
- package/dist/composites/device-card/connected/primary-trend.d.ts +21 -0
- package/dist/composites/device-card/connected/remote-panel.d.ts +14 -0
- package/dist/composites/device-card/connected/robot-model.d.ts +5 -0
- package/dist/composites/device-card/connected/since-text.d.ts +6 -0
- package/dist/composites/device-card/connected/trend-readout.d.ts +33 -0
- package/dist/composites/device-card/connected/use-card-common.d.ts +49 -0
- package/dist/composites/device-card/connected/use-command-notice.d.ts +39 -0
- package/dist/composites/device-card/connected/use-energy-day.d.ts +22 -0
- package/dist/composites/device-card/connected/use-heat-pump-link.d.ts +25 -0
- package/dist/composites/device-card/connected/use-measurement-readings.d.ts +13 -0
- package/dist/composites/device-card/connected/use-motion-trigger.d.ts +27 -0
- package/dist/composites/device-card/connected/use-power-cycle.d.ts +21 -0
- package/dist/composites/device-card/connected/use-switch-power.d.ts +16 -0
- package/dist/composites/device-card/connected/water-heater-model.d.ts +19 -0
- package/dist/composites/device-card/icons.d.ts +10 -0
- package/dist/composites/device-card/illustrations/AlarmIllustration.d.ts +12 -0
- package/dist/composites/device-card/illustrations/AmbientFx.d.ts +37 -0
- package/dist/composites/device-card/illustrations/ApplianceIllustration.d.ts +19 -0
- package/dist/composites/device-card/illustrations/ClimateRoleGlyph.d.ts +9 -0
- package/dist/composites/device-card/illustrations/CoverIllustration.d.ts +35 -0
- package/dist/composites/device-card/illustrations/DropIllustration.d.ts +10 -0
- package/dist/composites/device-card/illustrations/EnergyFlowIllustration.d.ts +43 -0
- package/dist/composites/device-card/illustrations/FanIllustration.d.ts +28 -0
- package/dist/composites/device-card/illustrations/HeatPumpIllustration.d.ts +14 -0
- package/dist/composites/device-card/illustrations/HeaterIllustration.d.ts +7 -0
- package/dist/composites/device-card/illustrations/LightIllustration.d.ts +18 -0
- package/dist/composites/device-card/illustrations/LockIllustration.d.ts +11 -0
- package/dist/composites/device-card/illustrations/MeasurementFx.d.ts +11 -0
- package/dist/composites/device-card/illustrations/MediaArtwork.d.ts +19 -0
- package/dist/composites/device-card/illustrations/PetFeederIllustration.d.ts +14 -0
- package/dist/composites/device-card/illustrations/PetFountainIllustration.d.ts +10 -0
- package/dist/composites/device-card/illustrations/PlugIllustration.d.ts +7 -0
- package/dist/composites/device-card/illustrations/PoePortIllustration.d.ts +11 -0
- package/dist/composites/device-card/illustrations/RobotIllustration.d.ts +18 -0
- package/dist/composites/device-card/illustrations/SirenIllustration.d.ts +7 -0
- package/dist/composites/device-card/illustrations/TankIllustration.d.ts +15 -0
- package/dist/composites/device-card/illustrations/ValveIllustration.d.ts +14 -0
- package/dist/composites/device-card/index.d.ts +175 -0
- package/dist/composites/device-card/parts/ArcGauge.d.ts +18 -0
- package/dist/composites/device-card/parts/ArmedButton.d.ts +31 -0
- package/dist/composites/device-card/parts/ButtonGroup.d.ts +26 -0
- package/dist/composites/device-card/parts/CardButton.d.ts +16 -0
- package/dist/composites/device-card/parts/CardIcon.d.ts +8 -0
- package/dist/composites/device-card/parts/CodePad.d.ts +14 -0
- package/dist/composites/device-card/parts/CountdownRing.d.ts +23 -0
- package/dist/composites/device-card/parts/Dial.d.ts +63 -0
- package/dist/composites/device-card/parts/EnergyDayPanel.d.ts +33 -0
- package/dist/composites/device-card/parts/EventList.d.ts +17 -0
- package/dist/composites/device-card/parts/InfoTile.d.ts +20 -0
- package/dist/composites/device-card/parts/KeyValue.d.ts +7 -0
- package/dist/composites/device-card/parts/LevelBar.d.ts +13 -0
- package/dist/composites/device-card/parts/LevelRow.d.ts +12 -0
- package/dist/composites/device-card/parts/MenuButton.d.ts +25 -0
- package/dist/composites/device-card/parts/PopoverButton.d.ts +22 -0
- package/dist/composites/device-card/parts/RangeDial.d.ts +32 -0
- package/dist/composites/device-card/parts/ReadingValue.d.ts +12 -0
- package/dist/composites/device-card/parts/Readings.d.ts +15 -0
- package/dist/composites/device-card/parts/StateDot.d.ts +11 -0
- package/dist/composites/device-card/parts/SwitchTimer.d.ts +16 -0
- package/dist/composites/device-card/parts/ValueChip.d.ts +11 -0
- package/dist/composites/device-card/parts/ValueEntry.d.ts +17 -0
- package/dist/composites/device-card/parts/sliders.d.ts +32 -0
- package/dist/composites/device-card/parts/switch-timer-model.d.ts +21 -0
- package/dist/composites/device-card/parts/use-countdown.d.ts +2 -0
- package/dist/composites/device-card/scenes/action/ActionCards.d.ts +22 -0
- package/dist/composites/device-card/scenes/action/model.d.ts +44 -0
- package/dist/composites/device-card/scenes/alarm/AlarmCard.d.ts +21 -0
- package/dist/composites/device-card/scenes/alarm/model.d.ts +23 -0
- package/dist/composites/device-card/scenes/appliance/ApplianceCard.d.ts +19 -0
- package/dist/composites/device-card/scenes/appliance/model.d.ts +63 -0
- package/dist/composites/device-card/scenes/camera/CameraCard.d.ts +20 -0
- package/dist/composites/device-card/scenes/climate/ClimateCard.d.ts +22 -0
- package/dist/composites/device-card/scenes/climate/model.d.ts +93 -0
- package/dist/composites/device-card/scenes/container/ContainerCard.d.ts +18 -0
- package/dist/composites/device-card/scenes/container/container-model.d.ts +20 -0
- package/dist/composites/device-card/scenes/control/ControlCard.d.ts +14 -0
- package/dist/composites/device-card/scenes/control/model.d.ts +43 -0
- package/dist/composites/device-card/scenes/cover/CoverCard.d.ts +23 -0
- package/dist/composites/device-card/scenes/cover/model.d.ts +52 -0
- package/dist/composites/device-card/scenes/energy/EnergyCard.d.ts +39 -0
- package/dist/composites/device-card/scenes/energy/model.d.ts +82 -0
- package/dist/composites/device-card/scenes/event/EventCard.d.ts +40 -0
- package/dist/composites/device-card/scenes/event/event-entries.d.ts +24 -0
- package/dist/composites/device-card/scenes/fan/FanCard.d.ts +24 -0
- package/dist/composites/device-card/scenes/fan/model.d.ts +77 -0
- package/dist/composites/device-card/scenes/gateway/GatewayCard.d.ts +34 -0
- package/dist/composites/device-card/scenes/heat-pump/HeatPumpCard.d.ts +19 -0
- package/dist/composites/device-card/scenes/heat-pump/model.d.ts +61 -0
- package/dist/composites/device-card/scenes/heater/HeaterCard.d.ts +14 -0
- package/dist/composites/device-card/scenes/heater/model.d.ts +13 -0
- package/dist/composites/device-card/scenes/humidifier/HumidifierCard.d.ts +20 -0
- package/dist/composites/device-card/scenes/humidifier/model.d.ts +29 -0
- package/dist/composites/device-card/scenes/image/ImageCard.d.ts +21 -0
- package/dist/composites/device-card/scenes/ir/IrTransmitterCard.d.ts +11 -0
- package/dist/composites/device-card/scenes/ir/model.d.ts +16 -0
- package/dist/composites/device-card/scenes/light/LightCard.d.ts +14 -0
- package/dist/composites/device-card/scenes/light/model.d.ts +40 -0
- package/dist/composites/device-card/scenes/lock/LockCard.d.ts +19 -0
- package/dist/composites/device-card/scenes/lock/model.d.ts +24 -0
- package/dist/composites/device-card/scenes/media/MediaPlayerCard.d.ts +22 -0
- package/dist/composites/device-card/scenes/media/model.d.ts +98 -0
- package/dist/composites/device-card/scenes/notifier/NotifierCard.d.ts +27 -0
- package/dist/composites/device-card/scenes/pet/PetFeederCard.d.ts +19 -0
- package/dist/composites/device-card/scenes/pet/PetFountainCard.d.ts +17 -0
- package/dist/composites/device-card/scenes/pet/model.d.ts +93 -0
- package/dist/composites/device-card/scenes/plug/PlugCard.d.ts +15 -0
- package/dist/composites/device-card/scenes/plug/model.d.ts +19 -0
- package/dist/composites/device-card/scenes/robot/RobotCard.d.ts +18 -0
- package/dist/composites/device-card/scenes/robot/model.d.ts +38 -0
- package/dist/composites/device-card/scenes/sensor/ReadingTile.d.ts +18 -0
- package/dist/composites/device-card/scenes/sensor/SensorCard.d.ts +17 -0
- package/dist/composites/device-card/scenes/sensor/SensorGridCard.d.ts +24 -0
- package/dist/composites/device-card/scenes/sensor/SensorPieCard.d.ts +51 -0
- package/dist/composites/device-card/scenes/sensor/model.d.ts +39 -0
- package/dist/composites/device-card/scenes/sensor/pie-css.d.ts +6 -0
- package/dist/composites/device-card/scenes/sensor/pie-model.d.ts +49 -0
- package/dist/composites/device-card/scenes/siren/SirenCard.d.ts +19 -0
- package/dist/composites/device-card/scenes/siren/model.d.ts +84 -0
- package/dist/composites/device-card/scenes/update/UpdateCard.d.ts +14 -0
- package/dist/composites/device-card/scenes/update/model.d.ts +40 -0
- package/dist/composites/device-card/scenes/valve/ValveCard.d.ts +19 -0
- package/dist/composites/device-card/scenes/valve/model.d.ts +21 -0
- package/dist/composites/device-card/scenes/water-heater/WaterHeaterCard.d.ts +20 -0
- package/dist/composites/device-card/scenes/water-heater/model.d.ts +32 -0
- package/dist/composites/device-card/scenes/weather/WeatherCard.d.ts +22 -0
- package/dist/composites/device-card/scenes/weather/model.d.ts +28 -0
- package/dist/composites/device-card/scenes/weather-station/WeatherStationCard.d.ts +17 -0
- package/dist/composites/device-card/scenes/weather-station/WeatherStationIllustration.d.ts +15 -0
- package/dist/composites/device-card/scenes/weather-station/model.d.ts +55 -0
- package/dist/composites/device-card/scenes/weather-station/station-geometry.d.ts +9 -0
- package/dist/composites/device-card/scenes/workload/WorkloadCard.d.ts +17 -0
- package/dist/composites/device-card/scenes/workload/model.d.ts +91 -0
- package/dist/composites/device-card/shell/ActuationHistory.d.ts +11 -0
- package/dist/composites/device-card/shell/BottomLine.d.ts +31 -0
- package/dist/composites/device-card/shell/Corner.d.ts +57 -0
- package/dist/composites/device-card/shell/DeviceCard.d.ts +81 -0
- package/dist/composites/device-card/shell/Overlays.d.ts +24 -0
- package/dist/composites/device-card/shell/SceneGrid.d.ts +47 -0
- package/dist/composites/device-card/shell/ScenePower.d.ts +18 -0
- package/dist/composites/device-card/shell/actuation-model.d.ts +115 -0
- package/dist/composites/device-card/shell/bottom-rows.d.ts +182 -0
- package/dist/composites/device-card/shell/column-items.d.ts +94 -0
- package/dist/composites/device-card/shell/gating.d.ts +17 -0
- package/dist/composites/device-card/shell/history-sections.d.ts +16 -0
- package/dist/composites/device-card/shell/model.d.ts +174 -0
- package/dist/composites/device-card/shell/overlay-box.d.ts +17 -0
- package/dist/composites/device-card/shell/remote-keys.d.ts +29 -0
- package/dist/composites/device-card/shell/scene-layout.d.ts +17 -0
- package/dist/composites/device-card/shell/use-popover.d.ts +9 -0
- package/dist/composites/device-controls/ac-panel.d.ts +40 -0
- package/dist/composites/device-controls/alarm-hero-card.d.ts +47 -0
- package/dist/composites/device-controls/appliance-control.d.ts +3 -0
- package/dist/composites/device-controls/atoms.d.ts +84 -0
- package/dist/composites/device-controls/brightness-panel.d.ts +3 -0
- package/dist/composites/device-controls/button-control.d.ts +9 -0
- package/dist/composites/device-controls/climate-offers-cooling.d.ts +7 -0
- package/dist/composites/device-controls/climate-panel.d.ts +30 -0
- package/dist/composites/device-controls/container-primary-hero.d.ts +26 -0
- package/dist/composites/device-controls/container-primary.d.ts +80 -0
- package/dist/composites/device-controls/control-panel.d.ts +53 -0
- package/dist/composites/device-controls/control-registry.d.ts +85 -0
- package/dist/composites/device-controls/cover-hero-card.d.ts +27 -0
- package/dist/composites/device-controls/cover-inline.d.ts +27 -0
- package/dist/composites/device-controls/cover-panel.d.ts +3 -0
- package/dist/composites/device-controls/dishwasher-control.d.ts +32 -0
- package/dist/composites/device-controls/dishwasher-options.d.ts +22 -0
- package/dist/composites/device-controls/dummy-hero-card.d.ts +6 -0
- package/dist/composites/device-controls/energy-system-control.d.ts +14 -0
- package/dist/composites/device-controls/fan-hero-card.d.ts +21 -0
- package/dist/composites/device-controls/fan-panel.d.ts +3 -0
- package/dist/composites/device-controls/heater-control.d.ts +4 -0
- package/dist/composites/device-controls/heating-valve-readout.d.ts +4 -0
- package/dist/composites/device-controls/humidifier-control.d.ts +37 -0
- package/dist/composites/device-controls/image-control.d.ts +49 -0
- package/dist/composites/device-controls/index.d.ts +35 -0
- package/dist/composites/device-controls/lawn-mower-control.d.ts +15 -0
- package/dist/composites/device-controls/light-hero-card.d.ts +16 -0
- package/dist/composites/device-controls/lock-hero-card.d.ts +15 -0
- package/dist/composites/device-controls/lock-panel.d.ts +3 -0
- package/dist/composites/device-controls/media-player-panel.d.ts +9 -0
- package/dist/composites/device-controls/offline-badge.d.ts +26 -0
- package/dist/composites/device-controls/panel-controls.d.ts +68 -0
- package/dist/composites/device-controls/pet-feeder-panel.d.ts +23 -0
- package/dist/composites/device-controls/pet-fountain-panel.d.ts +11 -0
- package/dist/composites/device-controls/popover-row-action.d.ts +21 -0
- package/dist/composites/device-controls/primary-child-picker.d.ts +36 -0
- package/dist/composites/device-controls/primary-child.d.ts +39 -0
- package/dist/composites/device-controls/radial-gauge.d.ts +20 -0
- package/dist/composites/device-controls/script-automation-controls.d.ts +13 -0
- package/dist/composites/device-controls/sensor-hero-card.d.ts +10 -0
- package/dist/composites/device-controls/sensor-hero-source.d.ts +24 -0
- package/dist/composites/device-controls/sensor-inline-control.d.ts +23 -0
- package/dist/composites/device-controls/sensor-value-atom.d.ts +123 -0
- package/dist/composites/device-controls/switch-panel.d.ts +3 -0
- package/dist/composites/device-controls/tap-toggle.d.ts +17 -0
- package/dist/composites/device-controls/timed-run-control.d.ts +13 -0
- package/dist/composites/device-controls/timed-run-quick-model.d.ts +47 -0
- package/dist/composites/device-controls/timed-run-quick.d.ts +12 -0
- package/dist/composites/device-controls/timed-run-row-control.d.ts +17 -0
- package/dist/composites/device-controls/types.d.ts +15 -0
- package/dist/composites/device-controls/update-control.d.ts +7 -0
- package/dist/composites/device-controls/vacuum-control.d.ts +7 -0
- package/dist/composites/device-controls/valve-control.d.ts +47 -0
- package/dist/composites/device-controls/water-heater-control.d.ts +12 -0
- package/dist/composites/device-controls/weather-control.d.ts +60 -0
- package/dist/composites/device-controls/workload-control.d.ts +10 -0
- package/dist/composites/device-export-panel.d.ts +63 -0
- package/dist/composites/device-grid.d.ts +12 -0
- package/dist/composites/device-history/DeviceHistoryView.d.ts +28 -0
- package/dist/composites/device-history/HistoryChart.d.ts +37 -0
- package/dist/composites/device-history/HistoryLanes.d.ts +13 -0
- package/dist/composites/device-history/HistoryWindowBar.d.ts +16 -0
- package/dist/composites/device-history/PointsSelect.d.ts +19 -0
- package/dist/composites/device-history/history-lanes.d.ts +26 -0
- package/dist/composites/device-history/history-model.d.ts +126 -0
- package/dist/composites/device-history/history-reads.d.ts +43 -0
- package/dist/composites/device-history/history-runs.d.ts +29 -0
- package/dist/composites/device-history/history-selection.d.ts +55 -0
- package/dist/composites/device-history/history-units.d.ts +42 -0
- package/dist/composites/device-history/history-window.d.ts +31 -0
- package/dist/composites/device-history/index.d.ts +16 -0
- package/dist/composites/device-history/use-device-history.d.ts +44 -0
- package/dist/composites/device-history/use-device-runs.d.ts +11 -0
- package/dist/composites/device-history/use-history-panels.d.ts +10 -0
- package/dist/composites/device-item/actions.d.ts +38 -0
- package/dist/composites/device-item/child-layout.d.ts +49 -0
- package/dist/composites/device-item/child-section-accordion.d.ts +23 -0
- package/dist/composites/device-item/children-accordion.d.ts +22 -0
- package/dist/composites/device-item/container-children-context.d.ts +32 -0
- package/dist/composites/device-item/device-delete-action.d.ts +31 -0
- package/dist/composites/device-item/features.d.ts +37 -0
- package/dist/composites/device-item/header.d.ts +55 -0
- package/dist/composites/device-item/helpers.d.ts +395 -0
- package/dist/composites/device-item/index.d.ts +11 -0
- package/dist/composites/device-item/model-row-value.d.ts +48 -0
- package/dist/composites/device-item/open-page-quick-action.d.ts +6 -0
- package/dist/composites/device-item/preview.d.ts +43 -0
- package/dist/composites/device-item/reboot-quick-action.d.ts +30 -0
- package/dist/composites/device-item/role-display-defaults-context.d.ts +37 -0
- package/dist/composites/device-item/row-models-context.d.ts +42 -0
- package/dist/composites/device-item/row-swipe-tray.d.ts +17 -0
- package/dist/composites/device-item/status-dot.d.ts +30 -0
- package/dist/composites/device-item/use-device-admin-link.d.ts +20 -0
- package/dist/composites/device-list/batch-actions-bar.d.ts +15 -0
- package/dist/composites/device-list/batch-toolbar.d.ts +15 -0
- package/dist/composites/device-list/columns.d.ts +109 -0
- package/dist/composites/device-list/device-integration.d.ts +59 -0
- package/dist/composites/device-list/device-mode.d.ts +141 -0
- package/dist/composites/device-list/empty-state.d.ts +17 -0
- package/dist/composites/device-list/filter-chips.d.ts +33 -0
- package/dist/composites/device-list/fuzzy-match.d.ts +27 -0
- package/dist/composites/device-list/generic-mode.d.ts +125 -0
- package/dist/composites/device-list/group.d.ts +71 -0
- package/dist/composites/device-list/hardware-cell.d.ts +18 -0
- package/dist/composites/device-list/hardware.d.ts +44 -0
- package/dist/composites/device-list/icon-action.d.ts +29 -0
- package/dist/composites/device-list/index.d.ts +51 -0
- package/dist/composites/device-list/multi-select.d.ts +30 -0
- package/dist/composites/device-list/page-size-select.d.ts +11 -0
- package/dist/composites/device-list/pagination.d.ts +18 -0
- package/dist/composites/device-list/row-model-ids.d.ts +7 -0
- package/dist/composites/device-list/sort.d.ts +35 -0
- package/dist/composites/device-list/sortable-header.d.ts +23 -0
- package/dist/composites/device-list/table-layout.d.ts +53 -0
- package/dist/composites/device-list/type-filter.d.ts +19 -0
- package/dist/composites/device-list/url-state.d.ts +42 -0
- package/dist/composites/device-mesh/DeviceMeshCard.d.ts +7 -0
- package/dist/composites/device-mesh/device-mesh-model.d.ts +64 -0
- package/dist/composites/device-mesh/index.d.ts +4 -0
- package/dist/composites/device-mesh/mesh-labels.d.ts +9 -0
- package/dist/composites/device-mesh/use-mesh-networks.d.ts +14 -0
- package/dist/composites/device-meta.d.ts +70 -0
- package/dist/composites/device-name/DeviceName.d.ts +17 -0
- package/dist/composites/device-name/device-fleet.d.ts +29 -0
- package/dist/composites/device-name/device-name-nouns.d.ts +27 -0
- package/dist/composites/device-name/format-device-name.d.ts +49 -0
- package/dist/composites/device-name/index.d.ts +10 -0
- package/dist/composites/device-name/use-device-label.d.ts +18 -0
- package/dist/composites/device-picker/DevicePicker.d.ts +107 -0
- package/dist/composites/device-picker/SelectedChip.d.ts +17 -0
- package/dist/composites/device-picker/device-filter-bar.d.ts +27 -0
- package/dist/composites/device-picker/device-fleet-view.d.ts +15 -0
- package/dist/composites/device-picker/device-parent.d.ts +39 -0
- package/dist/composites/device-picker/device-picker-grouping.d.ts +14 -0
- package/dist/composites/device-picker/device-picker-model.d.ts +254 -0
- package/dist/composites/device-picker/device-provider-label.d.ts +21 -0
- package/dist/composites/device-picker/device-selection-rows.d.ts +52 -0
- package/dist/composites/device-picker/device-selection.d.ts +64 -0
- package/dist/composites/device-picker/index.d.ts +9 -0
- package/dist/composites/device-select-filter.d.ts +120 -0
- package/dist/composites/device-selector-picker.d.ts +38 -0
- package/dist/composites/device-step-matrix.d.ts +42 -0
- package/dist/composites/device-summary-card.d.ts +38 -0
- package/dist/composites/device-template-field/DeviceTemplateField.d.ts +42 -0
- package/dist/composites/device-template-field/device-template-feedback.d.ts +13 -0
- package/dist/composites/device-template-field/device-template-function.d.ts +18 -0
- package/dist/composites/device-template-field/device-template-insert-model.d.ts +10 -0
- package/dist/composites/device-template-field/device-template-insert.d.ts +19 -0
- package/dist/composites/device-template-field/device-template-model.d.ts +143 -0
- package/dist/composites/device-template-field/device-template-param-input.d.ts +16 -0
- package/dist/composites/device-template-field/device-template-suggest.d.ts +12 -0
- package/dist/composites/device-template-field/index.d.ts +2 -0
- package/dist/composites/device-template-field/use-template-field-unit.d.ts +7 -0
- package/dist/composites/device-value-field/device-value-field.d.ts +112 -0
- package/dist/composites/device-value-field/device-value-token.d.ts +13 -0
- package/dist/composites/device-value-field/index.d.ts +3 -0
- package/dist/composites/device-value-field/use-device-value-source.d.ts +30 -0
- package/dist/composites/device-value-picker/DeviceActionPicker.d.ts +37 -0
- package/dist/composites/device-value-picker/DeviceEventPicker.d.ts +22 -0
- package/dist/composites/device-value-picker/DeviceValuePicker.d.ts +68 -0
- package/dist/composites/device-value-picker/action-target-label.d.ts +17 -0
- package/dist/composites/device-value-picker/device-event-model.d.ts +54 -0
- package/dist/composites/device-value-picker/device-id-values.d.ts +9 -0
- package/dist/composites/device-value-picker/device-value-form-fields.d.ts +22 -0
- package/dist/composites/device-value-picker/device-value-panel.d.ts +43 -0
- package/dist/composites/device-value-picker/device-value-picker-model.d.ts +155 -0
- package/dist/composites/device-value-picker/device-value-rail.d.ts +27 -0
- package/dist/composites/device-value-picker/device-value-rows.d.ts +42 -0
- package/dist/composites/device-value-picker/index.d.ts +10 -0
- package/dist/composites/device-value-picker/use-device-value-search.d.ts +33 -0
- package/dist/composites/device-value-picker/use-integration-providers.d.ts +10 -0
- package/dist/composites/device-value-picker/use-recent-devices.d.ts +16 -0
- package/dist/composites/discovered-adoption.d.ts +7 -0
- package/dist/composites/display-palette-context.d.ts +26 -0
- package/dist/composites/doorbell-recent-panel.d.ts +11 -0
- package/dist/composites/duration-input/DurationInput.d.ts +68 -0
- package/dist/composites/duration-input/duration-parts.d.ts +15 -0
- package/dist/composites/duration-input/index.d.ts +2 -0
- package/dist/composites/empty-state.d.ts +10 -0
- package/dist/composites/error-box.d.ts +19 -0
- package/dist/composites/event-category-picker.d.ts +11 -0
- package/dist/composites/event-kind-visuals.d.ts +37 -0
- package/dist/composites/event-stream.d.ts +72 -0
- package/dist/composites/export-bulk-selection.d.ts +54 -0
- package/dist/composites/export-entity-rows.d.ts +33 -0
- package/dist/composites/expression-input/ExpressionInput.d.ts +9 -0
- package/dist/composites/expression-input/expression-suggestions.d.ts +15 -0
- package/dist/composites/expression-input/index.d.ts +2 -0
- package/dist/composites/extensions/AssociationSlotCard.d.ts +36 -0
- package/dist/composites/extensions/ExtensionsPanel.d.ts +43 -0
- package/dist/composites/extensions/extensions-view-state.d.ts +125 -0
- package/dist/composites/filter-bar.d.ts +29 -0
- package/dist/composites/form-field.d.ts +11 -0
- package/dist/composites/form-save-bar.d.ts +35 -0
- package/dist/composites/format-state-value.d.ts +34 -0
- package/dist/composites/grouped-model-selector.d.ts +9 -0
- package/dist/composites/grouped-tile-picker.d.ts +43 -0
- package/dist/composites/hero-model/HeroModelCard.d.ts +25 -0
- package/dist/composites/hero-model/MeasurementScene.d.ts +22 -0
- package/dist/composites/hero-model/ModelHero.d.ts +29 -0
- package/dist/composites/hero-model/call-hero-action.d.ts +17 -0
- package/dist/composites/hero-model/card-display-subject.d.ts +19 -0
- package/dist/composites/hero-model/hero-labels.d.ts +33 -0
- package/dist/composites/hero-model/hero-model-view.d.ts +36 -0
- package/dist/composites/hero-model/hero-utilities.d.ts +9 -0
- package/dist/composites/hero-model/index.d.ts +4 -0
- package/dist/composites/hero-model/measurement-display.d.ts +40 -0
- package/dist/composites/hero-model/use-hero-live-refresh.d.ts +6 -0
- package/dist/composites/hero-scene/backdrops.d.ts +20 -0
- package/dist/composites/hero-scene/device-row.d.ts +21 -0
- package/dist/composites/hero-scene/hero-card-a.d.ts +29 -0
- package/dist/composites/hero-scene/hero-row.d.ts +39 -0
- package/dist/composites/hero-scene/hero-scene-css.d.ts +10 -0
- package/dist/composites/hero-scene/hero-scene.d.ts +45 -0
- package/dist/composites/hero-scene/hero-utility-grid.d.ts +30 -0
- package/dist/composites/hero-scene/hero-utility-layout.d.ts +10 -0
- package/dist/composites/hero-scene/index.d.ts +10 -0
- package/dist/composites/hero-scene/scene-art-home.d.ts +5 -0
- package/dist/composites/hero-scene/scene-art.d.ts +21 -0
- package/dist/composites/hero-scene/scene-map.d.ts +6 -0
- package/dist/composites/hero-scene/types.d.ts +48 -0
- package/dist/composites/hls-quality.d.ts +36 -0
- package/dist/composites/hls-video.d.ts +64 -0
- package/dist/composites/hover-zoom-image.d.ts +37 -0
- package/dist/composites/icon-glyphs.d.ts +30 -0
- package/dist/composites/icon-picker.d.ts +80 -0
- package/dist/composites/image-selector.d.ts +26 -0
- package/dist/composites/index.d.ts +278 -0
- package/dist/composites/inference-config-selector.d.ts +45 -0
- package/dist/composites/item-form-dialog.d.ts +39 -0
- package/dist/composites/kebab-menu.d.ts +63 -0
- package/dist/composites/key-value-list.d.ts +17 -0
- package/dist/composites/log-export-dialog.d.ts +21 -0
- package/dist/composites/log-export.d.ts +68 -0
- package/dist/composites/log-history-paging.d.ts +62 -0
- package/dist/composites/log-stream-columns.d.ts +37 -0
- package/dist/composites/log-stream-names.d.ts +19 -0
- package/dist/composites/log-stream-scroll.d.ts +32 -0
- package/dist/composites/log-stream.d.ts +102 -0
- package/dist/composites/login-form.d.ts +9 -0
- package/dist/composites/media-grid.d.ts +27 -0
- package/dist/composites/model-bound-slider.d.ts +36 -0
- package/dist/composites/model-picker.d.ts +21 -0
- package/dist/composites/mount-addon-page.d.ts +16 -0
- package/dist/composites/network-link-badge.d.ts +11 -0
- package/dist/composites/node-color-map.d.ts +11 -0
- package/dist/composites/node-color.d.ts +5 -0
- package/dist/composites/node-picker.d.ts +20 -0
- package/dist/composites/notification-targets-field.d.ts +84 -0
- package/dist/composites/notification-targets-options.d.ts +13 -0
- package/dist/composites/option-select/OptionSelect.d.ts +37 -0
- package/dist/composites/option-select/index.d.ts +4 -0
- package/dist/composites/option-select/option-select-model.d.ts +62 -0
- package/dist/composites/page-actions.d.ts +56 -0
- package/dist/composites/page-header.d.ts +12 -0
- package/dist/composites/page-shell.d.ts +34 -0
- package/dist/composites/peer-connection-config.d.ts +13 -0
- package/dist/composites/phase-icon.d.ts +12 -0
- package/dist/composites/pipeline-builder.d.ts +23 -0
- package/dist/composites/pipeline-matrix-shared.d.ts +200 -0
- package/dist/composites/pipeline-runtime-selector.d.ts +17 -0
- package/dist/composites/pipeline-step.d.ts +36 -0
- package/dist/composites/placeholder-field/PlaceholderChipField.d.ts +30 -0
- package/dist/composites/placeholder-field/index.d.ts +1 -0
- package/dist/composites/playback-stats.d.ts +59 -0
- package/dist/composites/provider-badge.d.ts +8 -0
- package/dist/composites/provider-entries/AddProviderEntryDialog.d.ts +28 -0
- package/dist/composites/provider-entries/ProviderEntryPills.d.ts +19 -0
- package/dist/composites/provider-entries/index.d.ts +2 -0
- package/dist/composites/ptz-overlay.d.ts +21 -0
- package/dist/composites/qr-code.d.ts +12 -0
- package/dist/composites/quantity-value-input/QuantityValueInput.d.ts +35 -0
- package/dist/composites/quantity-value-input/index.d.ts +2 -0
- package/dist/composites/quantity-value-input/quantity-value.d.ts +38 -0
- package/dist/composites/reconnect-schedule.d.ts +32 -0
- package/dist/composites/record-entries/entry-json-schema-form.d.ts +11 -0
- package/dist/composites/record-entries/index.d.ts +3 -0
- package/dist/composites/record-entries/record-entries-panel.d.ts +18 -0
- package/dist/composites/record-entries/record-entry-secrets.d.ts +9 -0
- package/dist/composites/remote/AppBrandGlyph.d.ts +11 -0
- package/dist/composites/remote/RemoteGrid.d.ts +57 -0
- package/dist/composites/remote/SourceSelectKey.d.ts +20 -0
- package/dist/composites/remote/app-brand-icons.d.ts +28 -0
- package/dist/composites/remote/display-layout.d.ts +7 -0
- package/dist/composites/remote/index.d.ts +9 -0
- package/dist/composites/remote/layout-model.d.ts +110 -0
- package/dist/composites/remote/layout-presets.d.ts +21 -0
- package/dist/composites/remote/remote-look.d.ts +25 -0
- package/dist/composites/remote/role-vocabulary.d.ts +10 -0
- package/dist/composites/resizable-columns/ResizableColumns.d.ts +21 -0
- package/dist/composites/resizable-columns/index.d.ts +1 -0
- package/dist/composites/resizable-columns/resizable-columns-model.d.ts +13 -0
- package/dist/composites/resolve-step-default-model.d.ts +113 -0
- package/dist/composites/response-log.d.ts +10 -0
- package/dist/composites/role-node-pill.d.ts +26 -0
- package/dist/composites/root-model-source.d.ts +20 -0
- package/dist/composites/running-badge.d.ts +20 -0
- package/dist/composites/running-status.d.ts +20 -0
- package/dist/composites/sanitize-info-html.d.ts +16 -0
- package/dist/composites/scope-picker.d.ts +31 -0
- package/dist/composites/section-card.d.ts +27 -0
- package/dist/composites/section-toolbar.d.ts +14 -0
- package/dist/composites/sectioned-page.d.ts +55 -0
- package/dist/composites/setting-row.d.ts +42 -0
- package/dist/composites/snapshot-button.d.ts +29 -0
- package/dist/composites/sort-header-button.d.ts +28 -0
- package/dist/composites/stable-tab-panel.d.ts +17 -0
- package/dist/composites/stat-card.d.ts +22 -0
- package/dist/composites/state-values-stream.d.ts +27 -0
- package/dist/composites/status-badge.d.ts +12 -0
- package/dist/composites/step-inspector/gate-control.d.ts +21 -0
- package/dist/composites/step-inspector/index.d.ts +8 -0
- package/dist/composites/step-inspector/layered-settings-form.d.ts +37 -0
- package/dist/composites/step-inspector/segmented-choice.d.ts +15 -0
- package/dist/composites/step-inspector/setting-values.d.ts +27 -0
- package/dist/composites/step-inspector/step-detail-dock.d.ts +49 -0
- package/dist/composites/step-inspector/step-inspector-panel.d.ts +32 -0
- package/dist/composites/step-inspector/step-model-row.d.ts +32 -0
- package/dist/composites/step-inspector/step-search.d.ts +18 -0
- package/dist/composites/step-timings.d.ts +10 -0
- package/dist/composites/step-tree.d.ts +21 -0
- package/dist/composites/storage-records/index.d.ts +1 -0
- package/dist/composites/storage-records/storage-records-panel.d.ts +6 -0
- package/dist/composites/stream-broker-selector.d.ts +10 -0
- package/dist/composites/stream-debug/stream-debug-overlay.d.ts +44 -0
- package/dist/composites/stream-debug/webrtc-debug-stats.d.ts +166 -0
- package/dist/composites/stream-panel.d.ts +252 -0
- package/dist/composites/table-sort.d.ts +77 -0
- package/dist/composites/tags/index.d.ts +9 -0
- package/dist/composites/tags/tag-chip.d.ts +32 -0
- package/dist/composites/tags/tag-entries-context.d.ts +9 -0
- package/dist/composites/tags/tag-filter-bar.d.ts +44 -0
- package/dist/composites/tags/tag-input.d.ts +10 -0
- package/dist/composites/tags/tag-model.d.ts +77 -0
- package/dist/composites/tags/tag-style-dialog.d.ts +16 -0
- package/dist/composites/tags/tagged-data-table.d.ts +23 -0
- package/dist/composites/tags/use-tag-filter.d.ts +31 -0
- package/dist/composites/tags/use-tag-registry.d.ts +21 -0
- package/dist/composites/time-window-input/TimeSpecInput.d.ts +29 -0
- package/dist/composites/time-window-input/TimeWindowInput.d.ts +33 -0
- package/dist/composites/time-window-input/index.d.ts +4 -0
- package/dist/composites/time-window-input/stored-clock-range.d.ts +28 -0
- package/dist/composites/time-window-input/time-window-model.d.ts +49 -0
- package/dist/composites/timeline-slider.d.ts +47 -0
- package/dist/composites/timezone-selector.d.ts +20 -0
- package/dist/composites/toggle-chip-row.d.ts +21 -0
- package/dist/composites/training/TrainingBaseModelPicker.d.ts +29 -0
- package/dist/composites/training/retrain-review-badge.d.ts +37 -0
- package/dist/composites/training/root-detector-placements.d.ts +50 -0
- package/dist/composites/training/send-frame-to-training.d.ts +7 -0
- package/dist/composites/training/training-collection-picker.d.ts +6 -0
- package/dist/composites/training/training-refusal-text.d.ts +10 -0
- package/dist/composites/unit-picker/UnitPicker.d.ts +16 -0
- package/dist/composites/unit-picker/index.d.ts +1 -0
- package/dist/composites/use-data-table-filter.d.ts +27 -0
- package/dist/composites/use-item-form-url.d.ts +27 -0
- package/dist/composites/version-badge.d.ts +25 -0
- package/dist/composites/view-switch.d.ts +24 -0
- package/dist/composites/webrtc-diagnostics/EndpointTestCard.d.ts +15 -0
- package/dist/composites/webrtc-diagnostics/HubSessionTestCard.d.ts +18 -0
- package/dist/composites/webrtc-diagnostics/RunReport.d.ts +11 -0
- package/dist/composites/webrtc-diagnostics/endpoint-probe.d.ts +56 -0
- package/dist/composites/webrtc-diagnostics/endpoint-test.d.ts +60 -0
- package/dist/composites/webrtc-diagnostics/format.d.ts +7 -0
- package/dist/composites/webrtc-diagnostics/ice-candidates.d.ts +66 -0
- package/dist/composites/webrtc-diagnostics/nat-mapping.d.ts +45 -0
- package/dist/composites/webrtc-diagnostics/session-run.d.ts +139 -0
- package/dist/composites/webrtc-diagnostics/session-verdict.d.ts +39 -0
- package/dist/composites/widget-panel.d.ts +33 -0
- package/dist/composites/widget-slot.d.ts +38 -0
- package/dist/composites/zones-layer/ZonesReadOnlyLayer.d.ts +12 -0
- package/dist/composites/zones-layer/zone-items.d.ts +29 -0
- package/dist/contexts/custom-field-renderers.d.ts +62 -0
- package/dist/contexts/device-context.d.ts +40 -0
- package/dist/contexts/device-quick-detail.d.ts +17 -0
- package/dist/contexts/instance-picker-slot.d.ts +28 -0
- package/dist/contexts/player-overlays.d.ts +102 -0
- package/dist/contexts/recorded-playback.d.ts +45 -0
- package/dist/contexts/system-context.d.ts +50 -0
- package/dist/contexts/ui-text.d.ts +49 -0
- package/dist/contexts/unit-preferences-from-server.d.ts +9 -0
- package/dist/contexts/unit-preferences.d.ts +12 -0
- package/dist/contexts/vod-playback.d.ts +46 -0
- package/dist/contexts/widget-registry.d.ts +166 -0
- package/dist/contexts/zone-editing.d.ts +82 -0
- package/dist/generated/system-hooks.d.ts +2821 -0
- package/dist/hls-CckKbjjD.cjs +28320 -0
- package/dist/hls-CfgsaJjd.js +28320 -0
- package/dist/hooks/device-proxy-registry.d.ts +29 -0
- package/dist/hooks/index.d.ts +58 -0
- package/dist/hooks/merge-detections.d.ts +16 -0
- package/dist/hooks/motion-trigger-reading.d.ts +10 -0
- package/dist/hooks/turn-server-cache.d.ts +77 -0
- package/dist/hooks/use-account-unit-preferences.d.ts +10 -0
- package/dist/hooks/use-broker-instances.d.ts +48 -0
- package/dist/hooks/use-capability-presence.d.ts +110 -0
- package/dist/hooks/use-cluster-nodes.d.ts +64 -0
- package/dist/hooks/use-debounced-string.d.ts +1 -0
- package/dist/hooks/use-destructive-action.d.ts +31 -0
- package/dist/hooks/use-device-autotrack.d.ts +10 -0
- package/dist/hooks/use-device-battery.d.ts +29 -0
- package/dist/hooks/use-device-cap-slice.d.ts +19 -0
- package/dist/hooks/use-device-capability.d.ts +63 -0
- package/dist/hooks/use-device-command.d.ts +3 -0
- package/dist/hooks/use-device-detections.d.ts +50 -0
- package/dist/hooks/use-device-features.d.ts +25 -0
- package/dist/hooks/use-device-list-page-size.d.ts +28 -0
- package/dist/hooks/use-device-network-link.d.ts +18 -0
- package/dist/hooks/use-device-proxy.d.ts +117 -0
- package/dist/hooks/use-device-removal.d.ts +26 -0
- package/dist/hooks/use-device-snapshot.d.ts +30 -0
- package/dist/hooks/use-device-webrtc.d.ts +235 -0
- package/dist/hooks/use-devices.d.ts +13 -0
- package/dist/hooks/use-doorbell-events.d.ts +20 -0
- package/dist/hooks/use-drag-value.d.ts +32 -0
- package/dist/hooks/use-event-invalidation.d.ts +1 -0
- package/dist/hooks/use-event-stream.d.ts +8 -0
- package/dist/hooks/use-instances-of-cap.d.ts +50 -0
- package/dist/hooks/use-is-mobile.d.ts +10 -0
- package/dist/hooks/use-live-buffer.d.ts +8 -0
- package/dist/hooks/use-live-event.d.ts +3 -0
- package/dist/hooks/use-lock-door-sensor.d.ts +34 -0
- package/dist/hooks/use-log-history.d.ts +26 -0
- package/dist/hooks/use-log-names.d.ts +15 -0
- package/dist/hooks/use-log-stream-columns.d.ts +8 -0
- package/dist/hooks/use-navigation.d.ts +26 -0
- package/dist/hooks/use-one-shot-command.d.ts +13 -0
- package/dist/hooks/use-owns-scroll.d.ts +18 -0
- package/dist/hooks/use-persisted-page-size.d.ts +18 -0
- package/dist/hooks/use-ptz.d.ts +128 -0
- package/dist/hooks/use-row-operations.d.ts +28 -0
- package/dist/hooks/use-stationary-overlay.d.ts +46 -0
- package/dist/hooks/use-system-query.d.ts +35 -0
- package/dist/hooks/use-url-query.d.ts +20 -0
- package/dist/hotkeys/combo.d.ts +24 -0
- package/dist/hotkeys/hotkey-provider.d.ts +50 -0
- package/dist/hotkeys/index.d.ts +6 -0
- package/dist/hotkeys/use-search-field-hotkey.d.ts +13 -0
- package/dist/i18n/addon-i18n.d.ts +46 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/use-addon-t.d.ts +57 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/provider-icons.d.ts +3 -0
- package/dist/icons/remote-control.d.ts +3 -0
- package/dist/icons/status-icons.d.ts +3 -0
- package/dist/icons-CmCk_R3w.cjs +38517 -0
- package/dist/icons-DZzn2TV2.js +36816 -0
- package/dist/index.cjs +108146 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +104976 -0
- package/dist/lib/cap-error.d.ts +20 -0
- package/dist/lib/capability-label.d.ts +18 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/event-category-selection.d.ts +26 -0
- package/dist/lib/fleet-query-defaults.d.ts +75 -0
- package/dist/lib/format-control-datetime.d.ts +18 -0
- package/dist/lib/format-duration.d.ts +14 -0
- package/dist/lib/format-last-seen.d.ts +22 -0
- package/dist/lib/format-numeric.d.ts +1 -0
- package/dist/lib/hub-mount.d.ts +22 -0
- package/dist/lib/index.d.ts +22 -0
- package/dist/lib/listbox-position.d.ts +46 -0
- package/dist/lib/mf-runtime-init.d.ts +1 -0
- package/dist/lib/phase-config.d.ts +35 -0
- package/dist/lib/recorded-control-protocol.d.ts +59 -0
- package/dist/lib/resolve-sensor-display.d.ts +42 -0
- package/dist/lib/responsive.d.ts +111 -0
- package/dist/lib/scrub-controller.d.ts +112 -0
- package/dist/lib/shared-context.d.ts +30 -0
- package/dist/lib/subject-path.d.ts +9 -0
- package/dist/lib/tailwind-variants.d.ts +27 -0
- package/dist/lib/unit-preferences.d.ts +28 -0
- package/dist/lucide-icons-module.d.d.ts +10 -0
- package/dist/mic-off-B83GCRGo.js +45 -0
- package/dist/mic-off-BKguA8pd.cjs +56 -0
- package/dist/primitives/badge.d.ts +15 -0
- package/dist/primitives/bottom-sheet.d.ts +11 -0
- package/dist/primitives/button.d.ts +12 -0
- package/dist/primitives/card.d.ts +5 -0
- package/dist/primitives/checkbox.d.ts +3 -0
- package/dist/primitives/collapsible-card.d.ts +25 -0
- package/dist/primitives/dialog-search-focus.d.ts +11 -0
- package/dist/primitives/dialog.d.ts +39 -0
- package/dist/primitives/disclosure-chevron.d.ts +18 -0
- package/dist/primitives/dropdown.d.ts +27 -0
- package/dist/primitives/file-input.d.ts +7 -0
- package/dist/primitives/floating-panel.d.ts +43 -0
- package/dist/primitives/icon-button.d.ts +11 -0
- package/dist/primitives/index.d.ts +28 -0
- package/dist/primitives/input.d.ts +13 -0
- package/dist/primitives/label.d.ts +3 -0
- package/dist/primitives/mobile-drawer.d.ts +10 -0
- package/dist/primitives/password-input.d.ts +19 -0
- package/dist/primitives/popover.d.ts +35 -0
- package/dist/primitives/radio.d.ts +4 -0
- package/dist/primitives/scroll-area.d.ts +3 -0
- package/dist/primitives/select-model.d.ts +22 -0
- package/dist/primitives/select.d.ts +60 -0
- package/dist/primitives/separator.d.ts +5 -0
- package/dist/primitives/skeleton.d.ts +3 -0
- package/dist/primitives/slider.d.ts +4 -0
- package/dist/primitives/swipe-actions.d.ts +99 -0
- package/dist/primitives/switch.d.ts +7 -0
- package/dist/primitives/tabs-list-scroll.d.ts +19 -0
- package/dist/primitives/tabs.d.ts +41 -0
- package/dist/primitives/textarea.d.ts +6 -0
- package/dist/primitives/tooltip.d.ts +15 -0
- package/dist/primitives/top-layer-portal.d.ts +21 -0
- package/dist/test-setup/tag-registry.d.ts +1 -0
- package/dist/testing/select-option.d.ts +35 -0
- package/dist/theme/create-theme.d.ts +2 -0
- package/dist/theme/defaults.d.ts +4 -0
- package/dist/theme/index.cjs +102 -0
- package/dist/theme/index.d.ts +7 -0
- package/dist/theme/index.js +91 -0
- package/dist/theme/theme-provider.d.ts +11 -0
- package/dist/theme/theme-to-css.d.ts +3 -0
- package/dist/theme/theme-to-root-css.d.ts +10 -0
- package/dist/theme/tokens.cjs +7 -0
- package/dist/theme/tokens.d.ts +9 -0
- package/dist/theme/tokens.js +2 -0
- package/dist/theme/types.d.ts +116 -0
- package/dist/theme/use-theme-mode.d.ts +2 -0
- package/dist/theme-to-root-css-CIqt8k0j.cjs +256 -0
- package/dist/theme-to-root-css-Ca6MGqO9.js +227 -0
- package/dist/trpc-react.d.ts +27 -0
- package/dist/uPlot.esm-BbxBUnav.cjs +3767 -0
- package/dist/uPlot.esm-C_8LiAPm.js +3767 -0
- package/dist/ui-library-version.d.ts +1 -0
- package/dist/widgets/host-widgets.d.ts +9 -0
- package/package.json +135 -4
- package/src/tailwind/camstack-theme.css +334 -0
|
@@ -0,0 +1,1052 @@
|
|
|
1
|
+
import { Checkbox, Dt as RotateCcw, DurationInput, FormSaveBar, Jr as Camera, P as Trash2, SCENE_CAPTURE_VARIANTS, Select, Slider, TEXT_HINT, UiTrans, badgeFor, coverageLine, formatNumeric, gt as Settings2, hubPath, isAbsentProvider, jn as ImageOff, roiTooLarge, statusLine, useConfirm, useDeviceProxy, useDeviceSnapshotImage, useDeviceStateSlice, useSystem, useUiText, variantLabel } from "./index.js";
|
|
2
|
+
import { MaskShapeCanvas } from "./MaskShapeCanvas-C9cJlxvG.js";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/composites/cap-settings/SceneReferenceGallery.tsx
|
|
6
|
+
/**
|
|
7
|
+
* SceneReferenceGallery — the photographs a scene is actually judging against,
|
|
8
|
+
* grouped by lighting variant, each individually deletable.
|
|
9
|
+
*
|
|
10
|
+
* ## Why it has to exist
|
|
11
|
+
*
|
|
12
|
+
* A scene's whole answer is "does this region still look like the photograph".
|
|
13
|
+
* Until now the operator could see a COUNT of references and never the
|
|
14
|
+
* references themselves, which makes the two failure modes indistinguishable
|
|
15
|
+
* from the outside: a blurry capture taken while a van was in the way poisons a
|
|
16
|
+
* condition forever, and from a cosine score there is no way to tell which one
|
|
17
|
+
* it was. `deleteReference` shipped with the cap for exactly this and had no
|
|
18
|
+
* caller.
|
|
19
|
+
*
|
|
20
|
+
* ## The image
|
|
21
|
+
*
|
|
22
|
+
* A bare `<img>` against the `event-media` data plane
|
|
23
|
+
* (`/addon/pipeline-analytics/event-media/m/<mediaId>` — D482), which is
|
|
24
|
+
* `access: 'authenticated'` — that accepts the `camstack_session` cookie, and a
|
|
25
|
+
* cookie is the only credential an `<img>` can send. Same mechanism, and the
|
|
26
|
+
* same reasoning, as `use-device-snapshot`; no bearer-token blob fetch is
|
|
27
|
+
* needed and no second copy of the auth plumbing is introduced here.
|
|
28
|
+
*
|
|
29
|
+
* `SceneReference.thumbnailMediaId` finally IS a media row id (D482). It was
|
|
30
|
+
* named `…MediaId` while holding a composite MediaStore key
|
|
31
|
+
* (`scene:<ownerId>:thumbnailSmall:<ts>`), which this component read
|
|
32
|
+
* POSITIONALLY for its owner id — a name that described the right design
|
|
33
|
+
* beside a value that did not, which is the shape of leftover this repo has
|
|
34
|
+
* been bitten by three times. The tile now addresses the row.
|
|
35
|
+
*
|
|
36
|
+
* **A missing blob is normal, not exceptional.** Reference thumbnails written
|
|
37
|
+
* before the `ownerKind: 'scene'` fix carried an `ownerId` no event row backs,
|
|
38
|
+
* which made them eligible for the orphan sweep — so on an existing install
|
|
39
|
+
* some of these ids resolve to nothing. That must degrade to a dated
|
|
40
|
+
* placeholder: the reference is still real, still being scored against, and
|
|
41
|
+
* still deletable. A gallery that blanks or throws over a missing picture would
|
|
42
|
+
* take the delete button away exactly when it is needed.
|
|
43
|
+
*/
|
|
44
|
+
/** The hub-proxied prefix for the pipeline-analytics event-media data plane. */
|
|
45
|
+
var SCENE_MEDIA_BASE = hubPath("/addon/pipeline-analytics/event-media");
|
|
46
|
+
/**
|
|
47
|
+
* The plane's ROW-form path for a scene reference thumbnail (D482).
|
|
48
|
+
*
|
|
49
|
+
* `thumbnailMediaId` is the media row's OWN id, so the tile addresses the row
|
|
50
|
+
* and nothing else — no owner id to re-derive, and no key to parse. It used to
|
|
51
|
+
* be a composite MediaStore key (`scene:<ownerId>:thumbnailSmall:<ts>`) that
|
|
52
|
+
* this component read POSITIONALLY for its owner id; the field was already
|
|
53
|
+
* named `…MediaId` while holding a key, which is the kind of leftover that
|
|
54
|
+
* reads as done.
|
|
55
|
+
*/
|
|
56
|
+
function sceneMediaPath(mediaId) {
|
|
57
|
+
return `${SCENE_MEDIA_BASE}/m/${mediaId}`;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Flatten `states[].references[]` into per-condition groups while keeping each
|
|
61
|
+
* reference's `(stateId, index)` — the pair `deleteReference` takes.
|
|
62
|
+
*
|
|
63
|
+
* The index is deliberately the position in the state's OWN array rather than
|
|
64
|
+
* anything derived from the grouping: an index computed over the grouped view
|
|
65
|
+
* would address a different reference the moment a scene holds two conditions,
|
|
66
|
+
* and the operator would delete the wrong photograph with no way to tell.
|
|
67
|
+
*/
|
|
68
|
+
function groupReferences(monitor) {
|
|
69
|
+
const byCondition = /* @__PURE__ */ new Map();
|
|
70
|
+
for (const state of monitor.states) state.references.forEach((reference, index) => {
|
|
71
|
+
const list = byCondition.get(reference.condition) ?? [];
|
|
72
|
+
list.push({
|
|
73
|
+
stateId: state.id,
|
|
74
|
+
index,
|
|
75
|
+
reference
|
|
76
|
+
});
|
|
77
|
+
byCondition.set(reference.condition, list);
|
|
78
|
+
});
|
|
79
|
+
return [...byCondition.entries()].map(([condition, tiles]) => ({
|
|
80
|
+
condition,
|
|
81
|
+
tiles: [...tiles].sort((a, b) => b.reference.capturedAt - a.reference.capturedAt)
|
|
82
|
+
})).sort((a, b) => a.condition.localeCompare(b.condition));
|
|
83
|
+
}
|
|
84
|
+
/** Total references across every state — the count that decides whether a
|
|
85
|
+
* delete leaves the scene with no idea what "normal" looks like. */
|
|
86
|
+
function totalReferences(monitor) {
|
|
87
|
+
return monitor.states.reduce((n, s) => n + s.references.length, 0);
|
|
88
|
+
}
|
|
89
|
+
var BTN_TINY = "rounded border border-danger/50 bg-danger/10 px-1 py-0.5 text-[10px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors";
|
|
90
|
+
function SceneReferenceGallery({ monitor, disabled, onDelete }) {
|
|
91
|
+
const t = useUiText();
|
|
92
|
+
const groups = groupReferences(monitor);
|
|
93
|
+
const total = totalReferences(monitor);
|
|
94
|
+
const confirm = useConfirm();
|
|
95
|
+
if (groups.length === 0) return /* @__PURE__ */ jsx("p", {
|
|
96
|
+
className: `${TEXT_HINT} leading-relaxed`,
|
|
97
|
+
children: t("uiLibrary.sceneReferenceGallery.empty", "No photographs captured yet. Press “Capture daylight” to take the one this scene will judge everything against.")
|
|
98
|
+
});
|
|
99
|
+
return /* @__PURE__ */ jsx("div", {
|
|
100
|
+
className: "flex flex-col gap-2",
|
|
101
|
+
children: groups.map((group) => /* @__PURE__ */ jsxs("div", {
|
|
102
|
+
className: "flex flex-col gap-1",
|
|
103
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
104
|
+
className: "text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle",
|
|
105
|
+
children: [
|
|
106
|
+
variantLabel(group.condition, t),
|
|
107
|
+
" · ",
|
|
108
|
+
group.tiles.length
|
|
109
|
+
]
|
|
110
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
111
|
+
className: "flex flex-wrap gap-1.5",
|
|
112
|
+
children: group.tiles.map((tile) => {
|
|
113
|
+
const key = `${tile.stateId}:${String(tile.index)}`;
|
|
114
|
+
const isLastOverall = total === 1;
|
|
115
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
116
|
+
className: "flex w-24 flex-col gap-1 rounded-md border border-border p-1",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ jsx(ReferenceThumb, { reference: tile.reference }),
|
|
119
|
+
/* @__PURE__ */ jsx("span", {
|
|
120
|
+
className: `${TEXT_HINT} tabular-nums`,
|
|
121
|
+
children: formatCapturedAt(tile.reference.capturedAt)
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ jsxs("button", {
|
|
124
|
+
type: "button",
|
|
125
|
+
className: BTN_TINY,
|
|
126
|
+
disabled,
|
|
127
|
+
"aria-label": t("uiLibrary.sceneReferenceGallery.deleteLabel", "Delete the {{variant}} photograph from {{date}}", {
|
|
128
|
+
variant: variantLabel(group.condition, t).toLowerCase(),
|
|
129
|
+
date: formatCapturedAt(tile.reference.capturedAt)
|
|
130
|
+
}),
|
|
131
|
+
onClick: () => {
|
|
132
|
+
(async () => {
|
|
133
|
+
if (isLastOverall) {
|
|
134
|
+
if (!await confirm({
|
|
135
|
+
title: t("uiLibrary.sceneReferenceGallery.deleteTitle", "Delete the only photograph?"),
|
|
136
|
+
message: t("uiLibrary.sceneReferenceGallery.lastWarning", "This is the only photograph this scene has. Delete it and the scene no longer knows what normal looks like — it stops judging until you capture again."),
|
|
137
|
+
confirmLabel: t("uiLibrary.sceneReferenceGallery.delete", "Delete"),
|
|
138
|
+
variant: "danger"
|
|
139
|
+
})) return;
|
|
140
|
+
}
|
|
141
|
+
onDelete({
|
|
142
|
+
stateId: tile.stateId,
|
|
143
|
+
index: tile.index
|
|
144
|
+
});
|
|
145
|
+
})();
|
|
146
|
+
},
|
|
147
|
+
children: [/* @__PURE__ */ jsx(Trash2, { className: "mr-1 inline h-3 w-3" }), t("uiLibrary.sceneReferenceGallery.delete", "Delete")]
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
}, key);
|
|
151
|
+
})
|
|
152
|
+
})]
|
|
153
|
+
}, group.condition))
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function ReferenceThumb({ reference }) {
|
|
157
|
+
const t = useUiText();
|
|
158
|
+
const [failed, setFailed] = useState(false);
|
|
159
|
+
const mediaId = reference.thumbnailMediaId;
|
|
160
|
+
if (mediaId === void 0 || failed) return /* @__PURE__ */ jsxs("div", {
|
|
161
|
+
className: "flex h-16 w-full flex-col items-center justify-center gap-0.5 rounded bg-surface text-foreground-subtle",
|
|
162
|
+
title: t("uiLibrary.sceneReferenceGallery.missingPicture", "The picture for this reference is no longer stored. The reference itself is intact and still being scored against."),
|
|
163
|
+
children: [/* @__PURE__ */ jsx(ImageOff, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
164
|
+
className: "text-[9px]",
|
|
165
|
+
children: t("uiLibrary.sceneReferenceGallery.noPicture", "no picture")
|
|
166
|
+
})]
|
|
167
|
+
});
|
|
168
|
+
return /* @__PURE__ */ jsx("img", {
|
|
169
|
+
src: sceneMediaPath(mediaId),
|
|
170
|
+
alt: "",
|
|
171
|
+
loading: "lazy",
|
|
172
|
+
className: "h-16 w-full rounded object-cover",
|
|
173
|
+
onError: () => setFailed(true)
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function formatCapturedAt(at) {
|
|
177
|
+
const d = new Date(at);
|
|
178
|
+
return `${d.toLocaleDateString()} ${d.toLocaleTimeString([], {
|
|
179
|
+
hour: "2-digit",
|
|
180
|
+
minute: "2-digit"
|
|
181
|
+
})}`;
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/composites/cap-settings/SceneSettingsForm.tsx
|
|
185
|
+
/**
|
|
186
|
+
* SceneSettingsForm — every knob a scene actually has, per scene.
|
|
187
|
+
*
|
|
188
|
+
* ## Why this exists
|
|
189
|
+
*
|
|
190
|
+
* The model has carried `enabled`, `triggerMode`, `checkIntervalSec`,
|
|
191
|
+
* `check.threshold`, `check.hysteresisCount`, `quietSeconds`,
|
|
192
|
+
* `minObservationSpacingSec`, `emit`, `autoRestore` and `confirm` since the
|
|
193
|
+
* provider shipped, and `updateScene` has accepted a patch for all of them —
|
|
194
|
+
* but the editor exposed **none**. Every scene therefore ran on the creation
|
|
195
|
+
* defaults, and an operator whose scene fired too eagerly (or not at all) had
|
|
196
|
+
* no move available except deleting it and drawing it again. Tuning knobs that
|
|
197
|
+
* exist and cannot be reached are worse than absent ones: they read, from the
|
|
198
|
+
* code, as a feature that shipped.
|
|
199
|
+
*
|
|
200
|
+
* ## What is deliberately NOT here
|
|
201
|
+
*
|
|
202
|
+
* `check.mode: 'llm'`. The cap declares it and the engine has an adapter seam
|
|
203
|
+
* for it, but no production caller supplies `SceneEngineDeps.llm` — an
|
|
204
|
+
* `llm`-mode scene reports `availability: 'unavailable'` forever. Offering the
|
|
205
|
+
* switch would let an operator convert a working scene into a permanently
|
|
206
|
+
* broken one in one click. The vision model reaches a scene through the
|
|
207
|
+
* **`confirm`** adjudicator instead, which IS wired (`SceneConfirmGate`, built
|
|
208
|
+
* unconditionally at the engine's construction site) and is the better
|
|
209
|
+
* topology anyway: CLIP proposes at the poll cadence, the model is asked only
|
|
210
|
+
* on a candidate flip.
|
|
211
|
+
*
|
|
212
|
+
* ## Editing model
|
|
213
|
+
*
|
|
214
|
+
* The typed knobs (name, intervals, threshold, agreeing checks, the question)
|
|
215
|
+
* are a local draft that one Save writes together; Discard restores the stored
|
|
216
|
+
* scene. Selects and checkboxes commit on change, because there is no
|
|
217
|
+
* intermediate state worth protecting. There is no second store:
|
|
218
|
+
* `updateScene` writes the authority the provider already owns and the caller
|
|
219
|
+
* refetches (D62).
|
|
220
|
+
*/
|
|
221
|
+
var FIELD = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground focus:border-primary focus:outline-none disabled:opacity-50";
|
|
222
|
+
var LABEL = "text-[10px] font-medium text-foreground-subtle";
|
|
223
|
+
var GROUP = "flex flex-col gap-2 rounded-md border border-border bg-surface/40 p-2";
|
|
224
|
+
var GROUP_TITLE = "text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle";
|
|
225
|
+
/** The two engine-visible interval floors, in the units the operator thinks in. */
|
|
226
|
+
var MIN_INTERVAL_SEC = 5;
|
|
227
|
+
var MAX_INTERVAL_SEC = 3600;
|
|
228
|
+
function triggerHint(mode, t) {
|
|
229
|
+
switch (mode) {
|
|
230
|
+
case "periodic": return t("uiLibrary.sceneSettingsForm.triggerHintPeriodic", "Only on the clock. Predictable, and it notices a change even on a camera nothing ever moves in front of.");
|
|
231
|
+
case "on-motion": return t("uiLibrary.sceneSettingsForm.triggerHintOnMotion", "Only after the camera has been still again for the quiet window below. Cheapest, but a change nobody walks past is never seen.");
|
|
232
|
+
case "both": return t("uiLibrary.sceneSettingsForm.triggerHintBoth", "Both — the clock is the safety net that lets the motion path miss. This is the right answer for almost every scene.");
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function uncoveredHint(policy, t) {
|
|
236
|
+
switch (policy) {
|
|
237
|
+
case "skip": return t("uiLibrary.sceneSettingsForm.uncoveredHintSkip", "Sit that light out. No verdict, no alarm, no flag touched — it picks itself back up when a light it knows returns. This is why the night capture is optional.");
|
|
238
|
+
case "judge-anyway": return t("uiLibrary.sceneSettingsForm.uncoveredHintJudge", "Compare against the references you do have. Only correct when the two lights genuinely look alike (a floodlit driveway, an indoor lamp) — against a real infrared frame it will report a change that did not happen.");
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function draftOf(monitor) {
|
|
242
|
+
return {
|
|
243
|
+
label: monitor.label,
|
|
244
|
+
checkIntervalSec: monitor.checkIntervalSec ?? 60,
|
|
245
|
+
threshold: monitor.check.mode === "similarity" ? monitor.check.threshold : .8,
|
|
246
|
+
hysteresisCount: monitor.check.hysteresisCount,
|
|
247
|
+
quietSeconds: monitor.quietSeconds,
|
|
248
|
+
minObservationSpacingSec: monitor.minObservationSpacingSec,
|
|
249
|
+
confirmPrompt: monitor.confirm?.prompt ?? ""
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
function SceneSettingsForm({ monitor, disabled, onPatch }) {
|
|
253
|
+
const t = useUiText();
|
|
254
|
+
const [draft, setDraft] = useState(() => draftOf(monitor));
|
|
255
|
+
const synced = useRef(draft);
|
|
256
|
+
useEffect(() => {
|
|
257
|
+
const stored = draftOf(monitor);
|
|
258
|
+
setDraft((current) => sameDraft(current, synced.current) ? stored : current);
|
|
259
|
+
synced.current = stored;
|
|
260
|
+
}, [monitor]);
|
|
261
|
+
const commit = (patch) => {
|
|
262
|
+
onPatch(patch);
|
|
263
|
+
};
|
|
264
|
+
/** Patch the check union in place, so a mode's own fields travel with it. */
|
|
265
|
+
const patchCheck = (next) => monitor.check.mode === "similarity" ? {
|
|
266
|
+
mode: "similarity",
|
|
267
|
+
threshold: next.threshold ?? monitor.check.threshold,
|
|
268
|
+
hysteresisCount: next.hysteresisCount ?? monitor.check.hysteresisCount
|
|
269
|
+
} : {
|
|
270
|
+
...monitor.check,
|
|
271
|
+
hysteresisCount: next.hysteresisCount ?? monitor.check.hysteresisCount
|
|
272
|
+
};
|
|
273
|
+
const confirmEnabled = monitor.confirm?.enabled === true;
|
|
274
|
+
const pending = pendingPatch(monitor, draft, confirmEnabled, patchCheck);
|
|
275
|
+
const writeCount = Object.keys(pending).length;
|
|
276
|
+
const dirty = !sameDraft(draft, draftOf(monitor));
|
|
277
|
+
const problem = draftProblem(monitor, draft, t);
|
|
278
|
+
const pendingCount = dirty ? Math.max(1, writeCount) : 0;
|
|
279
|
+
const save = () => {
|
|
280
|
+
if (problem !== void 0) return;
|
|
281
|
+
if (writeCount === 0) {
|
|
282
|
+
setDraft(draftOf(monitor));
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
setDraft((d) => ({
|
|
286
|
+
...d,
|
|
287
|
+
label: d.label.trim(),
|
|
288
|
+
checkIntervalSec: clamp(d.checkIntervalSec, MIN_INTERVAL_SEC, MAX_INTERVAL_SEC),
|
|
289
|
+
hysteresisCount: clamp(d.hysteresisCount, 1, 10),
|
|
290
|
+
quietSeconds: clamp(d.quietSeconds, 0, 3600),
|
|
291
|
+
minObservationSpacingSec: clamp(d.minObservationSpacingSec, 0, 3600),
|
|
292
|
+
confirmPrompt: d.confirmPrompt.trim()
|
|
293
|
+
}));
|
|
294
|
+
commit(pending);
|
|
295
|
+
};
|
|
296
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
297
|
+
className: "flex flex-col gap-2",
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ jsxs("div", {
|
|
300
|
+
className: GROUP,
|
|
301
|
+
children: [
|
|
302
|
+
/* @__PURE__ */ jsx("p", {
|
|
303
|
+
className: GROUP_TITLE,
|
|
304
|
+
children: t("uiLibrary.sceneSettingsForm.whatItWatches", "What it watches")
|
|
305
|
+
}),
|
|
306
|
+
/* @__PURE__ */ jsxs("label", {
|
|
307
|
+
className: "flex flex-col gap-1",
|
|
308
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
309
|
+
className: LABEL,
|
|
310
|
+
children: t("uiLibrary.sceneSettingsForm.name", "Name")
|
|
311
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
312
|
+
type: "text",
|
|
313
|
+
value: draft.label,
|
|
314
|
+
disabled,
|
|
315
|
+
className: FIELD,
|
|
316
|
+
onChange: (e) => setDraft((d) => ({
|
|
317
|
+
...d,
|
|
318
|
+
label: e.target.value
|
|
319
|
+
}))
|
|
320
|
+
})]
|
|
321
|
+
}),
|
|
322
|
+
/* @__PURE__ */ jsxs("label", {
|
|
323
|
+
className: "flex items-center gap-2",
|
|
324
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
325
|
+
checked: monitor.enabled,
|
|
326
|
+
disabled,
|
|
327
|
+
onChange: (e) => commit({ enabled: e.target.checked })
|
|
328
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
329
|
+
className: LABEL,
|
|
330
|
+
children: t("uiLibrary.sceneSettingsForm.watching", "Watching")
|
|
331
|
+
})]
|
|
332
|
+
}),
|
|
333
|
+
/* @__PURE__ */ jsx("p", {
|
|
334
|
+
className: TEXT_HINT,
|
|
335
|
+
children: t("uiLibrary.sceneSettingsForm.watchingHint", "Turned off, the scene keeps its region, its references and its flag — it simply stops checking. Nothing is lost by pausing one for a while.")
|
|
336
|
+
}),
|
|
337
|
+
/* @__PURE__ */ jsxs("label", {
|
|
338
|
+
className: "flex flex-col gap-1",
|
|
339
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
340
|
+
className: LABEL,
|
|
341
|
+
children: t("uiLibrary.sceneSettingsForm.whenToLook", "When to look")
|
|
342
|
+
}), /* @__PURE__ */ jsxs(Select, {
|
|
343
|
+
value: monitor.triggerMode,
|
|
344
|
+
disabled,
|
|
345
|
+
className: FIELD,
|
|
346
|
+
onChange: (e) => {
|
|
347
|
+
const value = e.target.value;
|
|
348
|
+
if (value === "periodic" || value === "on-motion" || value === "both") commit({ triggerMode: value });
|
|
349
|
+
},
|
|
350
|
+
children: [
|
|
351
|
+
/* @__PURE__ */ jsx("option", {
|
|
352
|
+
value: "both",
|
|
353
|
+
children: t("uiLibrary.sceneSettingsForm.triggerBoth", "On the clock and after motion settles")
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ jsx("option", {
|
|
356
|
+
value: "periodic",
|
|
357
|
+
children: t("uiLibrary.sceneSettingsForm.triggerPeriodic", "On the clock only")
|
|
358
|
+
}),
|
|
359
|
+
/* @__PURE__ */ jsx("option", {
|
|
360
|
+
value: "on-motion",
|
|
361
|
+
children: t("uiLibrary.sceneSettingsForm.triggerOnMotion", "After motion settles only")
|
|
362
|
+
})
|
|
363
|
+
]
|
|
364
|
+
})]
|
|
365
|
+
}),
|
|
366
|
+
/* @__PURE__ */ jsx("p", {
|
|
367
|
+
className: TEXT_HINT,
|
|
368
|
+
children: triggerHint(monitor.triggerMode, t)
|
|
369
|
+
}),
|
|
370
|
+
/* @__PURE__ */ jsxs("div", {
|
|
371
|
+
className: "flex flex-col gap-1",
|
|
372
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
373
|
+
className: LABEL,
|
|
374
|
+
children: t("uiLibrary.sceneSettingsForm.checkEvery", "Check every (seconds)")
|
|
375
|
+
}), /* @__PURE__ */ jsx(DurationInput, {
|
|
376
|
+
value: draft.checkIntervalSec,
|
|
377
|
+
min: MIN_INTERVAL_SEC,
|
|
378
|
+
max: MAX_INTERVAL_SEC,
|
|
379
|
+
disabled,
|
|
380
|
+
"aria-label": t("uiLibrary.sceneSettingsForm.checkEvery", "Check every (seconds)"),
|
|
381
|
+
testIdPrefix: "scene-check-every",
|
|
382
|
+
onChange: (seconds) => setDraft((d) => ({
|
|
383
|
+
...d,
|
|
384
|
+
checkIntervalSec: seconds
|
|
385
|
+
}))
|
|
386
|
+
})]
|
|
387
|
+
}),
|
|
388
|
+
/* @__PURE__ */ jsx("p", {
|
|
389
|
+
className: TEXT_HINT,
|
|
390
|
+
children: t("uiLibrary.sceneSettingsForm.intervalHint", "60 s suits “is the bin still out”. Every check costs one photograph and one encode, so going below about 30 s buys latency you almost never need and multiplies the cost by the number of scenes you own.")
|
|
391
|
+
})
|
|
392
|
+
]
|
|
393
|
+
}),
|
|
394
|
+
/* @__PURE__ */ jsxs("div", {
|
|
395
|
+
className: GROUP,
|
|
396
|
+
children: [
|
|
397
|
+
/* @__PURE__ */ jsx("p", {
|
|
398
|
+
className: GROUP_TITLE,
|
|
399
|
+
children: t("uiLibrary.sceneSettingsForm.howSure", "How sure it has to be")
|
|
400
|
+
}),
|
|
401
|
+
monitor.check.mode === "similarity" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("label", {
|
|
402
|
+
className: "flex flex-col gap-1",
|
|
403
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
404
|
+
className: LABEL,
|
|
405
|
+
children: /* @__PURE__ */ jsx(UiTrans, {
|
|
406
|
+
uiKey: "uiLibrary.sceneSettingsForm.matchThreshold",
|
|
407
|
+
fallback: "Match threshold — <0>{{value}}</0>",
|
|
408
|
+
components: [/* @__PURE__ */ jsx("span", { className: "tabular-nums" }, "value")],
|
|
409
|
+
values: { value: formatNumeric(draft.threshold, void 0) }
|
|
410
|
+
})
|
|
411
|
+
}), /* @__PURE__ */ jsx(Slider, {
|
|
412
|
+
min: .3,
|
|
413
|
+
max: .99,
|
|
414
|
+
step: .01,
|
|
415
|
+
value: draft.threshold,
|
|
416
|
+
disabled,
|
|
417
|
+
onChange: (e) => setDraft((d) => ({
|
|
418
|
+
...d,
|
|
419
|
+
threshold: Number(e.target.value)
|
|
420
|
+
}))
|
|
421
|
+
})]
|
|
422
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
423
|
+
className: "text-[10px] text-foreground-subtle",
|
|
424
|
+
children: t("uiLibrary.sceneSettingsForm.thresholdHint", "How closely the region still has to resemble the photograph to count as unchanged. Higher means fussier: at 0.95 a passing cloud can read as a change; at 0.60 the bin can be taken and the scene will shrug. 0.80 is a sensible start — if it cries wolf, lower it; if it misses the thing you care about, raise it.")
|
|
425
|
+
})] }),
|
|
426
|
+
/* @__PURE__ */ jsxs("label", {
|
|
427
|
+
className: "flex flex-col gap-1",
|
|
428
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
429
|
+
className: LABEL,
|
|
430
|
+
children: t("uiLibrary.sceneSettingsForm.agreeingChecks", "Agreeing checks before it changes its mind")
|
|
431
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
432
|
+
type: "number",
|
|
433
|
+
min: 1,
|
|
434
|
+
max: 10,
|
|
435
|
+
value: draft.hysteresisCount,
|
|
436
|
+
disabled,
|
|
437
|
+
className: FIELD,
|
|
438
|
+
onChange: (e) => setDraft((d) => ({
|
|
439
|
+
...d,
|
|
440
|
+
hysteresisCount: Number(e.target.value) || 1
|
|
441
|
+
}))
|
|
442
|
+
})]
|
|
443
|
+
}),
|
|
444
|
+
/* @__PURE__ */ jsx("p", {
|
|
445
|
+
className: TEXT_HINT,
|
|
446
|
+
children: t("uiLibrary.sceneSettingsForm.agreeingHint", "One bad photograph must never be able to flip a scene. 3 agreeing checks at 60 s is about four minutes of latency and is what makes the answer trustworthy — leaving a state costs exactly the same as entering one.")
|
|
447
|
+
}),
|
|
448
|
+
/* @__PURE__ */ jsxs("div", {
|
|
449
|
+
className: "flex flex-col gap-1",
|
|
450
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
451
|
+
className: LABEL,
|
|
452
|
+
children: t("uiLibrary.sceneSettingsForm.quietFor", "Quiet for (seconds) before a check counts")
|
|
453
|
+
}), /* @__PURE__ */ jsx(DurationInput, {
|
|
454
|
+
value: draft.quietSeconds,
|
|
455
|
+
min: 0,
|
|
456
|
+
max: 3600,
|
|
457
|
+
disabled,
|
|
458
|
+
"aria-label": t("uiLibrary.sceneSettingsForm.quietFor", "Quiet for (seconds) before a check counts"),
|
|
459
|
+
testIdPrefix: "scene-quiet-for",
|
|
460
|
+
onChange: (seconds) => setDraft((d) => ({
|
|
461
|
+
...d,
|
|
462
|
+
quietSeconds: seconds
|
|
463
|
+
}))
|
|
464
|
+
})]
|
|
465
|
+
}),
|
|
466
|
+
/* @__PURE__ */ jsx("p", {
|
|
467
|
+
className: TEXT_HINT,
|
|
468
|
+
children: t("uiLibrary.sceneSettingsForm.quietHint", "A check taken while something is moving is a photograph of the van parked in front of the bin, so it is discarded rather than merely delayed. 0 disables the gate.")
|
|
469
|
+
}),
|
|
470
|
+
/* @__PURE__ */ jsxs("div", {
|
|
471
|
+
className: "flex flex-col gap-1",
|
|
472
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
473
|
+
className: LABEL,
|
|
474
|
+
children: t("uiLibrary.sceneSettingsForm.minGap", "Minimum gap between counted checks (seconds)")
|
|
475
|
+
}), /* @__PURE__ */ jsx(DurationInput, {
|
|
476
|
+
value: draft.minObservationSpacingSec,
|
|
477
|
+
min: 0,
|
|
478
|
+
max: 3600,
|
|
479
|
+
disabled,
|
|
480
|
+
"aria-label": t("uiLibrary.sceneSettingsForm.minGap", "Minimum gap between counted checks (seconds)"),
|
|
481
|
+
testIdPrefix: "scene-min-gap",
|
|
482
|
+
onChange: (seconds) => setDraft((d) => ({
|
|
483
|
+
...d,
|
|
484
|
+
minObservationSpacingSec: seconds
|
|
485
|
+
}))
|
|
486
|
+
})]
|
|
487
|
+
}),
|
|
488
|
+
/* @__PURE__ */ jsx("p", {
|
|
489
|
+
className: TEXT_HINT,
|
|
490
|
+
children: t("uiLibrary.sceneSettingsForm.minGapHint", "Spreads the agreeing checks over real time instead of letting three adjacent polls inside one long occlusion be mistaken for three independent opinions.")
|
|
491
|
+
})
|
|
492
|
+
]
|
|
493
|
+
}),
|
|
494
|
+
/* @__PURE__ */ jsxs("div", {
|
|
495
|
+
className: GROUP,
|
|
496
|
+
children: [
|
|
497
|
+
/* @__PURE__ */ jsx("p", {
|
|
498
|
+
className: GROUP_TITLE,
|
|
499
|
+
children: t("uiLibrary.sceneSettingsForm.lighting", "Lighting")
|
|
500
|
+
}),
|
|
501
|
+
/* @__PURE__ */ jsxs("label", {
|
|
502
|
+
className: "flex flex-col gap-1",
|
|
503
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
504
|
+
className: LABEL,
|
|
505
|
+
children: t("uiLibrary.sceneSettingsForm.noReference", "When a light has no reference of its own")
|
|
506
|
+
}), /* @__PURE__ */ jsxs(Select, {
|
|
507
|
+
value: monitor.onUncoveredCondition,
|
|
508
|
+
disabled,
|
|
509
|
+
className: FIELD,
|
|
510
|
+
onChange: (e) => {
|
|
511
|
+
const value = e.target.value;
|
|
512
|
+
if (value === "skip" || value === "judge-anyway") commit({ onUncoveredCondition: value });
|
|
513
|
+
},
|
|
514
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
515
|
+
value: "skip",
|
|
516
|
+
children: t("uiLibrary.sceneSettingsForm.uncoveredSkip", "Skip the check (recommended)")
|
|
517
|
+
}), /* @__PURE__ */ jsx("option", {
|
|
518
|
+
value: "judge-anyway",
|
|
519
|
+
children: t("uiLibrary.sceneSettingsForm.uncoveredJudge", "Judge against the other light anyway")
|
|
520
|
+
})]
|
|
521
|
+
})]
|
|
522
|
+
}),
|
|
523
|
+
/* @__PURE__ */ jsx("p", {
|
|
524
|
+
className: TEXT_HINT,
|
|
525
|
+
children: uncoveredHint(monitor.onUncoveredCondition, t)
|
|
526
|
+
})
|
|
527
|
+
]
|
|
528
|
+
}),
|
|
529
|
+
/* @__PURE__ */ jsxs("div", {
|
|
530
|
+
className: GROUP,
|
|
531
|
+
children: [
|
|
532
|
+
/* @__PURE__ */ jsx("p", {
|
|
533
|
+
className: GROUP_TITLE,
|
|
534
|
+
children: t("uiLibrary.sceneSettingsForm.whatYouGetTold", "What you get told")
|
|
535
|
+
}),
|
|
536
|
+
/* @__PURE__ */ jsxs("label", {
|
|
537
|
+
className: "flex flex-col gap-1",
|
|
538
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
539
|
+
className: LABEL,
|
|
540
|
+
children: t("uiLibrary.sceneSettingsForm.notificationsFollow", "Notifications follow")
|
|
541
|
+
}), /* @__PURE__ */ jsxs(Select, {
|
|
542
|
+
value: monitor.emit,
|
|
543
|
+
disabled,
|
|
544
|
+
className: FIELD,
|
|
545
|
+
onChange: (e) => {
|
|
546
|
+
const value = e.target.value;
|
|
547
|
+
if (value === "latched" || value === "live") commit({ emit: value });
|
|
548
|
+
},
|
|
549
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
550
|
+
value: "latched",
|
|
551
|
+
children: t("uiLibrary.sceneSettingsForm.emitLatched", "The flag — told once, still visible at breakfast")
|
|
552
|
+
}), /* @__PURE__ */ jsx("option", {
|
|
553
|
+
value: "live",
|
|
554
|
+
children: t("uiLibrary.sceneSettingsForm.emitLive", "The live state — follows the region as it changes")
|
|
555
|
+
})]
|
|
556
|
+
})]
|
|
557
|
+
}),
|
|
558
|
+
/* @__PURE__ */ jsx("p", {
|
|
559
|
+
className: TEXT_HINT,
|
|
560
|
+
children: t("uiLibrary.sceneSettingsForm.emitHint", "“Is the bin gone” is a flag: you want to be told once and still see it later. “Is the gate open” is a live state.")
|
|
561
|
+
}),
|
|
562
|
+
/* @__PURE__ */ jsxs("label", {
|
|
563
|
+
className: "flex items-center gap-2",
|
|
564
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
565
|
+
checked: monitor.autoRestore,
|
|
566
|
+
disabled,
|
|
567
|
+
onChange: (e) => commit({ autoRestore: e.target.checked })
|
|
568
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
569
|
+
className: LABEL,
|
|
570
|
+
children: t("uiLibrary.sceneSettingsForm.autoRestore", "Clear the flag by itself when things look normal again")
|
|
571
|
+
})]
|
|
572
|
+
}),
|
|
573
|
+
/* @__PURE__ */ jsx("p", {
|
|
574
|
+
className: TEXT_HINT,
|
|
575
|
+
children: t("uiLibrary.sceneSettingsForm.autoRestoreHint", "Off by default, so an alarm never silently clears itself. The “back to normal” moment is recorded either way, so an automation can still react to it.")
|
|
576
|
+
})
|
|
577
|
+
]
|
|
578
|
+
}),
|
|
579
|
+
/* @__PURE__ */ jsxs("div", {
|
|
580
|
+
className: GROUP,
|
|
581
|
+
children: [
|
|
582
|
+
/* @__PURE__ */ jsx("p", {
|
|
583
|
+
className: GROUP_TITLE,
|
|
584
|
+
children: t("uiLibrary.sceneSettingsForm.aiDoubleCheck", "AI double-check")
|
|
585
|
+
}),
|
|
586
|
+
/* @__PURE__ */ jsxs("label", {
|
|
587
|
+
className: "flex items-center gap-2",
|
|
588
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
589
|
+
checked: confirmEnabled,
|
|
590
|
+
disabled: disabled || draft.confirmPrompt.trim().length === 0,
|
|
591
|
+
onChange: (e) => commit(e.target.checked ? { confirm: {
|
|
592
|
+
...defaultConfirm(draft.confirmPrompt.trim()),
|
|
593
|
+
enabled: true
|
|
594
|
+
} } : { confirm: null })
|
|
595
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
596
|
+
className: LABEL,
|
|
597
|
+
children: t("uiLibrary.sceneSettingsForm.askVision", "Ask a vision model before changing the answer")
|
|
598
|
+
})]
|
|
599
|
+
}),
|
|
600
|
+
/* @__PURE__ */ jsxs("label", {
|
|
601
|
+
className: "flex flex-col gap-1",
|
|
602
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
603
|
+
className: LABEL,
|
|
604
|
+
children: t("uiLibrary.sceneSettingsForm.question", "The question to ask")
|
|
605
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
606
|
+
type: "text",
|
|
607
|
+
value: draft.confirmPrompt,
|
|
608
|
+
placeholder: t("uiLibrary.sceneSettingsForm.questionPlaceholder", "e.g. Is the wheelie bin still there?"),
|
|
609
|
+
disabled,
|
|
610
|
+
className: FIELD,
|
|
611
|
+
onChange: (e) => setDraft((d) => ({
|
|
612
|
+
...d,
|
|
613
|
+
confirmPrompt: e.target.value
|
|
614
|
+
}))
|
|
615
|
+
})]
|
|
616
|
+
}),
|
|
617
|
+
/* @__PURE__ */ jsx("p", {
|
|
618
|
+
className: TEXT_HINT,
|
|
619
|
+
children: /* @__PURE__ */ jsx(UiTrans, {
|
|
620
|
+
uiKey: "uiLibrary.sceneSettingsForm.confirmHint",
|
|
621
|
+
fallback: "The model is asked <0>only</0> when the region has already changed enough to flip the answer — roughly twice a week for a bin, not once a minute. It reasons about the object rather than the pixels, so rain, shadows and a repositioned bin stop counting as the thing being taken. If it cannot be reached, the change is held rather than announced.",
|
|
622
|
+
components: [/* @__PURE__ */ jsx("strong", {}, "only")]
|
|
623
|
+
})
|
|
624
|
+
})
|
|
625
|
+
]
|
|
626
|
+
}),
|
|
627
|
+
/* @__PURE__ */ jsx(FormSaveBar, {
|
|
628
|
+
pendingCount,
|
|
629
|
+
saving: disabled,
|
|
630
|
+
problem,
|
|
631
|
+
onSave: save,
|
|
632
|
+
onDiscard: () => setDraft(draftOf(monitor))
|
|
633
|
+
})
|
|
634
|
+
]
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
/** Whether two drafts hold the same values. */
|
|
638
|
+
function sameDraft(a, b) {
|
|
639
|
+
return a.label === b.label && a.checkIntervalSec === b.checkIntervalSec && a.threshold === b.threshold && a.hysteresisCount === b.hysteresisCount && a.quietSeconds === b.quietSeconds && a.minObservationSpacingSec === b.minObservationSpacingSec && a.confirmPrompt === b.confirmPrompt;
|
|
640
|
+
}
|
|
641
|
+
/** Why the draft cannot be saved, or `undefined` when it can. */
|
|
642
|
+
function draftProblem(monitor, draft, t) {
|
|
643
|
+
if (draft.label.trim().length === 0) return t("uiLibrary.sceneSettingsForm.nameRequired", "The scene needs a name.");
|
|
644
|
+
if (monitor.confirm !== void 0 && draft.confirmPrompt.trim().length === 0) return t("uiLibrary.sceneSettingsForm.questionRequired", "The confirmation question cannot be empty.");
|
|
645
|
+
}
|
|
646
|
+
/** What Save would write: only the fields whose draft differs from the stored scene. */
|
|
647
|
+
function pendingPatch(monitor, draft, confirmEnabled, patchCheck) {
|
|
648
|
+
const label = draft.label.trim();
|
|
649
|
+
const interval = clamp(draft.checkIntervalSec, MIN_INTERVAL_SEC, MAX_INTERVAL_SEC);
|
|
650
|
+
const hysteresis = clamp(draft.hysteresisCount, 1, 10);
|
|
651
|
+
const quiet = clamp(draft.quietSeconds, 0, 3600);
|
|
652
|
+
const spacing = clamp(draft.minObservationSpacingSec, 0, 3600);
|
|
653
|
+
const prompt = draft.confirmPrompt.trim();
|
|
654
|
+
const storedThreshold = monitor.check.mode === "similarity" ? monitor.check.threshold : null;
|
|
655
|
+
const thresholdChanged = storedThreshold !== null && draft.threshold !== storedThreshold;
|
|
656
|
+
const hysteresisChanged = hysteresis !== monitor.check.hysteresisCount;
|
|
657
|
+
return {
|
|
658
|
+
...label.length > 0 && label !== monitor.label ? { label } : {},
|
|
659
|
+
...interval !== monitor.checkIntervalSec ? { checkIntervalSec: interval } : {},
|
|
660
|
+
...thresholdChanged || hysteresisChanged ? { check: patchCheck({
|
|
661
|
+
...thresholdChanged ? { threshold: draft.threshold } : {},
|
|
662
|
+
hysteresisCount: hysteresis
|
|
663
|
+
}) } : {},
|
|
664
|
+
...quiet !== monitor.quietSeconds ? { quietSeconds: quiet } : {},
|
|
665
|
+
...spacing !== monitor.minObservationSpacingSec ? { minObservationSpacingSec: spacing } : {},
|
|
666
|
+
...prompt.length > 0 && prompt !== monitor.confirm?.prompt ? { confirm: {
|
|
667
|
+
...defaultConfirm(prompt),
|
|
668
|
+
enabled: confirmEnabled
|
|
669
|
+
} } : {}
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
function clamp(value, min, max) {
|
|
673
|
+
return Math.min(max, Math.max(min, value));
|
|
674
|
+
}
|
|
675
|
+
/** The adjudicator's own defaults, restated here because a Zod `.default()`
|
|
676
|
+
* does not run on the cap path — the provider receives exactly this object. */
|
|
677
|
+
function defaultConfirm(prompt) {
|
|
678
|
+
return {
|
|
679
|
+
enabled: false,
|
|
680
|
+
prompt,
|
|
681
|
+
timeoutMs: 8e3,
|
|
682
|
+
maxImagePx: 448,
|
|
683
|
+
onTimeout: "hold"
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region src/composites/cap-settings/SceneMonitorEditor.tsx
|
|
688
|
+
/**
|
|
689
|
+
* SceneMonitorEditor — the per-camera half of the Scenes surface.
|
|
690
|
+
*
|
|
691
|
+
* **Imported directly, not resolved as a widget.** It briefly lived behind the
|
|
692
|
+
* host widget `host/scene-monitor-editor`, mounted as a "Scenes" tab on one
|
|
693
|
+
* camera's detail page. That put a standing question about the property ("is
|
|
694
|
+
* the bin still out") one camera deep, where the operator's actual question —
|
|
695
|
+
* "which of my scenes have tripped" — could not be asked at all. The overview
|
|
696
|
+
* is now the top-level `/scenes` page; this component is what that page opens
|
|
697
|
+
* once a camera is chosen, in a dialog. The widget id and its `deviceConfig`
|
|
698
|
+
* declaration are both gone, in the same commit, because
|
|
699
|
+
* `scripts/check-host-widget-resolves.ts` checks both directions.
|
|
700
|
+
*
|
|
701
|
+
* It renders BARE — no `WidgetPanel` — because its only caller supplies a
|
|
702
|
+
* dialog header, and two stacked titles read as a layout bug.
|
|
703
|
+
*
|
|
704
|
+
* ## The flow, in the order the operator meets it
|
|
705
|
+
*
|
|
706
|
+
* 1. **Draw a region on the still frame.** A rect over a SNAPSHOT, not the live
|
|
707
|
+
* player: a scene is defined against a photograph, and drawing on a moving
|
|
708
|
+
* picture makes it impossible to see whether the box actually contains the
|
|
709
|
+
* bin. The editor starts in draw mode and warns above ~40 % of the frame,
|
|
710
|
+
* because a full-frame scene is dominated by weather, sky and parked cars —
|
|
711
|
+
* it will not work, and it will look broken rather than misconfigured.
|
|
712
|
+
* 2. **Capture the initial state, per lighting variant.** Two buttons, Daylight
|
|
713
|
+
* and Night (IR), each forcing a fresh snapshot. The variant is DETECTED
|
|
714
|
+
* from the frame and shown rather than asked; the buttons exist so the
|
|
715
|
+
* operator can say "capture this as the night reference" while standing
|
|
716
|
+
* outside at 22:00 — which is exactly why **Night (IR) is labelled
|
|
717
|
+
* optional**. Almost nobody does that, and a scene captured only in daylight
|
|
718
|
+
* is a configuration, not a defect: under the default
|
|
719
|
+
* `onUncoveredCondition: 'skip'` the infrared hours are simply sat out.
|
|
720
|
+
* 3. **Read the coverage line.** "Daylight ✓ · Night (IR) ✗ — optional; checks
|
|
721
|
+
* in night (ir) are skipped". This feature's failure mode is silence that
|
|
722
|
+
* reads as "nothing has happened", and that one line is the difference
|
|
723
|
+
* between a five-minute fix and a session of guessing — but it must say what
|
|
724
|
+
* HAPPENS, not complain. It used to end "reports 'can't tell'", which made a
|
|
725
|
+
* correctly configured scene look broken every night.
|
|
726
|
+
* 4. **Reset.** Clears the flag AND re-captures the baseline for the current
|
|
727
|
+
* light, because the bin never goes back in exactly the same spot.
|
|
728
|
+
* 5. **Settings.** Every knob the model has actually carried since the provider
|
|
729
|
+
* shipped — how often it looks, how closely it has to match, how many
|
|
730
|
+
* agreeing checks a change costs, what a missing light means, which boolean
|
|
731
|
+
* drives notifications, and whether a vision model adjudicates a flip. None
|
|
732
|
+
* of it was reachable before; see `SceneSettingsForm`.
|
|
733
|
+
*
|
|
734
|
+
* Live state arrives through the cap's `status.kind: 'push'` runtime slice, so
|
|
735
|
+
* the card updates itself without polling.
|
|
736
|
+
*/
|
|
737
|
+
var BTN_NEUTRAL = "rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors";
|
|
738
|
+
var BTN_PRIMARY = "rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors";
|
|
739
|
+
var BTN_DANGER = "rounded-md border border-danger/50 bg-danger/10 px-2 py-1 text-[11px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors";
|
|
740
|
+
var TONE_CLASS = {
|
|
741
|
+
alarm: "border-danger/50 bg-danger/15 text-danger",
|
|
742
|
+
ok: "border-success/50 bg-success/15 text-success",
|
|
743
|
+
unknown: "border-border bg-surface text-foreground-subtle"
|
|
744
|
+
};
|
|
745
|
+
/** A scene without at least one reference cannot judge anything, so the
|
|
746
|
+
* similarity threshold only becomes meaningful after the first capture. */
|
|
747
|
+
var DEFAULT_THRESHOLD = .8;
|
|
748
|
+
var DEFAULT_HYSTERESIS = 3;
|
|
749
|
+
function SceneMonitorEditor({ deviceId }) {
|
|
750
|
+
const t = useUiText();
|
|
751
|
+
const dev = useDeviceProxy(useSystem().trpcClient, deviceId);
|
|
752
|
+
const pushed = useDeviceStateSlice(dev?.state.sceneMonitor);
|
|
753
|
+
const snapshot = useDeviceSnapshotImage(deviceId, { width: 640 });
|
|
754
|
+
const [fetched, setFetched] = useState(null);
|
|
755
|
+
const [unsupported, setUnsupported] = useState(false);
|
|
756
|
+
const [busy, setBusy] = useState(null);
|
|
757
|
+
const [error, setError] = useState(null);
|
|
758
|
+
const [selectedId, setSelectedId] = useState(null);
|
|
759
|
+
/** Which scene has its settings panel open — one at a time, because the panel
|
|
760
|
+
* is tall and a wall of them would bury the list it belongs to. */
|
|
761
|
+
const [tuningId, setTuningId] = useState(null);
|
|
762
|
+
const [drafting, setDrafting] = useState(false);
|
|
763
|
+
const [draftRoi, setDraftRoi] = useState(null);
|
|
764
|
+
const [draftLabel, setDraftLabel] = useState("");
|
|
765
|
+
const mounted = useRef(true);
|
|
766
|
+
useEffect(() => {
|
|
767
|
+
mounted.current = true;
|
|
768
|
+
return () => {
|
|
769
|
+
mounted.current = false;
|
|
770
|
+
};
|
|
771
|
+
}, []);
|
|
772
|
+
const reload = useCallback(async () => {
|
|
773
|
+
if (!dev) return;
|
|
774
|
+
try {
|
|
775
|
+
const status = await dev.sceneMonitor?.listScenes({});
|
|
776
|
+
if (!mounted.current) return;
|
|
777
|
+
if (status) setFetched(status);
|
|
778
|
+
} catch (err) {
|
|
779
|
+
if (!mounted.current) return;
|
|
780
|
+
if (isAbsentProvider(err)) setUnsupported(true);
|
|
781
|
+
else setError(err instanceof Error ? err.message : String(err));
|
|
782
|
+
}
|
|
783
|
+
}, [dev]);
|
|
784
|
+
useEffect(() => {
|
|
785
|
+
setFetched(null);
|
|
786
|
+
setUnsupported(false);
|
|
787
|
+
setError(null);
|
|
788
|
+
reload();
|
|
789
|
+
}, [reload]);
|
|
790
|
+
const monitors = pushed?.monitors ?? fetched?.monitors ?? [];
|
|
791
|
+
const now = Date.now();
|
|
792
|
+
const run = useCallback(async (key, fn) => {
|
|
793
|
+
setBusy(key);
|
|
794
|
+
setError(null);
|
|
795
|
+
try {
|
|
796
|
+
await fn();
|
|
797
|
+
await reload();
|
|
798
|
+
} catch (err) {
|
|
799
|
+
if (mounted.current) setError(err instanceof Error ? err.message : String(err));
|
|
800
|
+
} finally {
|
|
801
|
+
if (mounted.current) setBusy(null);
|
|
802
|
+
}
|
|
803
|
+
}, [reload]);
|
|
804
|
+
const items = useMemo(() => {
|
|
805
|
+
const existing = monitors.map((m) => ({
|
|
806
|
+
id: m.id,
|
|
807
|
+
shape: m.roi,
|
|
808
|
+
label: m.label,
|
|
809
|
+
enabled: m.enabled
|
|
810
|
+
}));
|
|
811
|
+
return draftRoi !== null ? [...existing, {
|
|
812
|
+
id: "__draft__",
|
|
813
|
+
shape: draftRoi,
|
|
814
|
+
label: t("uiLibrary.sceneMonitor.newSceneLabel", "New scene")
|
|
815
|
+
}] : existing;
|
|
816
|
+
}, [
|
|
817
|
+
monitors,
|
|
818
|
+
draftRoi,
|
|
819
|
+
t
|
|
820
|
+
]);
|
|
821
|
+
const onShapeChange = useCallback((id, shape) => {
|
|
822
|
+
if (shape.kind !== "rect") return;
|
|
823
|
+
if (id === "__draft__") {
|
|
824
|
+
setDraftRoi(shape);
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
run(`roi-${String(id)}`, async () => dev?.sceneMonitor?.updateScene({
|
|
828
|
+
monitorId: String(id),
|
|
829
|
+
patch: { roi: shape }
|
|
830
|
+
}));
|
|
831
|
+
}, [dev, run]);
|
|
832
|
+
const onDrawComplete = useCallback((shape) => {
|
|
833
|
+
if (shape.kind !== "rect") return;
|
|
834
|
+
setDraftRoi(shape);
|
|
835
|
+
}, []);
|
|
836
|
+
const createScene = useCallback(async () => {
|
|
837
|
+
if (draftRoi === null || draftLabel.trim().length === 0) return;
|
|
838
|
+
await run("create", async () => {
|
|
839
|
+
await dev?.sceneMonitor?.createScene({
|
|
840
|
+
label: draftLabel.trim(),
|
|
841
|
+
roi: draftRoi,
|
|
842
|
+
check: {
|
|
843
|
+
mode: "similarity",
|
|
844
|
+
threshold: DEFAULT_THRESHOLD,
|
|
845
|
+
hysteresisCount: DEFAULT_HYSTERESIS
|
|
846
|
+
}
|
|
847
|
+
});
|
|
848
|
+
});
|
|
849
|
+
setDraftRoi(null);
|
|
850
|
+
setDraftLabel("");
|
|
851
|
+
setDrafting(false);
|
|
852
|
+
}, [
|
|
853
|
+
dev,
|
|
854
|
+
draftRoi,
|
|
855
|
+
draftLabel,
|
|
856
|
+
run
|
|
857
|
+
]);
|
|
858
|
+
if (!dev) return null;
|
|
859
|
+
return /* @__PURE__ */ jsx("div", {
|
|
860
|
+
className: "flex flex-col gap-3",
|
|
861
|
+
children: unsupported ? /* @__PURE__ */ jsx("p", {
|
|
862
|
+
className: `${TEXT_HINT} leading-relaxed`,
|
|
863
|
+
children: t("uiLibrary.sceneMonitor.unsupported", "Scene monitoring is not available for this camera.")
|
|
864
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
865
|
+
/* @__PURE__ */ jsx("p", {
|
|
866
|
+
className: `${TEXT_HINT} leading-relaxed`,
|
|
867
|
+
children: t("uiLibrary.sceneMonitor.intro", "A scene watches one region of this camera and tells you when it stops looking like the picture you captured. Draw a box around the thing you care about — a wheelie bin, a gate, a parking space — then capture what “normal” looks like. Daylight is enough to start: the night reference is optional, and without it the scene simply sits the infrared hours out instead of reporting a problem.")
|
|
868
|
+
}),
|
|
869
|
+
/* @__PURE__ */ jsx("div", {
|
|
870
|
+
className: "relative overflow-hidden rounded-md border border-border",
|
|
871
|
+
children: /* @__PURE__ */ jsx(MaskShapeCanvas, {
|
|
872
|
+
items,
|
|
873
|
+
supportedShapes: ["rect"],
|
|
874
|
+
selectedId: selectedId ?? (draftRoi !== null ? "__draft__" : null),
|
|
875
|
+
onSelect: (id) => setSelectedId(id === null ? null : String(id)),
|
|
876
|
+
onShapeChange,
|
|
877
|
+
onDrawComplete,
|
|
878
|
+
drawingKind: drafting && draftRoi === null ? "rect" : null,
|
|
879
|
+
backdrop: snapshot.src !== null ? /* @__PURE__ */ jsx("img", {
|
|
880
|
+
src: snapshot.src,
|
|
881
|
+
alt: "",
|
|
882
|
+
className: "h-full w-full object-contain",
|
|
883
|
+
draggable: false
|
|
884
|
+
}) : null
|
|
885
|
+
})
|
|
886
|
+
}),
|
|
887
|
+
/* @__PURE__ */ jsxs("div", {
|
|
888
|
+
className: "flex flex-wrap items-center gap-2",
|
|
889
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
890
|
+
type: "button",
|
|
891
|
+
className: drafting ? BTN_PRIMARY : BTN_NEUTRAL,
|
|
892
|
+
"aria-pressed": drafting,
|
|
893
|
+
onClick: () => {
|
|
894
|
+
setDrafting((v) => !v);
|
|
895
|
+
setDraftRoi(null);
|
|
896
|
+
},
|
|
897
|
+
disabled: busy !== null,
|
|
898
|
+
children: drafting ? t("uiLibrary.sceneMonitor.cancel", "Cancel") : t("uiLibrary.sceneMonitor.newScene", "+ New scene")
|
|
899
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
900
|
+
type: "button",
|
|
901
|
+
className: BTN_NEUTRAL,
|
|
902
|
+
onClick: snapshot.refresh,
|
|
903
|
+
disabled: busy !== null,
|
|
904
|
+
children: t("uiLibrary.sceneMonitor.refresh", "Refresh frame")
|
|
905
|
+
})]
|
|
906
|
+
}),
|
|
907
|
+
drafting && /* @__PURE__ */ jsxs("div", {
|
|
908
|
+
className: "flex flex-col gap-2 rounded-md border border-border bg-surface p-2",
|
|
909
|
+
children: [
|
|
910
|
+
/* @__PURE__ */ jsx("p", {
|
|
911
|
+
className: "text-[10px] text-foreground-subtle",
|
|
912
|
+
children: draftRoi === null ? t("uiLibrary.sceneMonitor.draftHint", "Click on the frame to drop a box, then drag its corner to fit it around the thing you want watched.") : t("uiLibrary.sceneMonitor.nameHint", "Name it, then create. You capture what “normal” looks like next.")
|
|
913
|
+
}),
|
|
914
|
+
draftRoi !== null && roiTooLarge(draftRoi) && /* @__PURE__ */ jsx("p", {
|
|
915
|
+
className: "text-[11px] leading-relaxed text-warning",
|
|
916
|
+
children: t("uiLibrary.sceneMonitor.tooLarge", "That box covers most of the frame. A scene that big is dominated by the weather, the sky and passing cars — it will quietly stop noticing the thing you actually care about. Draw it tighter.")
|
|
917
|
+
}),
|
|
918
|
+
/* @__PURE__ */ jsxs("div", {
|
|
919
|
+
className: "flex items-center gap-2",
|
|
920
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
921
|
+
type: "text",
|
|
922
|
+
value: draftLabel,
|
|
923
|
+
onChange: (e) => setDraftLabel(e.target.value),
|
|
924
|
+
placeholder: t("uiLibrary.sceneMonitor.placeholder", "e.g. Immondizia prelevata"),
|
|
925
|
+
className: "flex-1 rounded-md border border-border bg-surface px-2 py-1 text-[12px] text-foreground"
|
|
926
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
927
|
+
type: "button",
|
|
928
|
+
className: BTN_PRIMARY,
|
|
929
|
+
onClick: () => void createScene(),
|
|
930
|
+
disabled: draftRoi === null || draftLabel.trim().length === 0 || busy !== null,
|
|
931
|
+
children: t("uiLibrary.sceneMonitor.create", "Create")
|
|
932
|
+
})]
|
|
933
|
+
})
|
|
934
|
+
]
|
|
935
|
+
}),
|
|
936
|
+
error !== null && /* @__PURE__ */ jsx("p", {
|
|
937
|
+
className: "text-[11px] leading-relaxed text-danger",
|
|
938
|
+
children: error
|
|
939
|
+
}),
|
|
940
|
+
monitors.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
941
|
+
className: `${TEXT_HINT} leading-relaxed`,
|
|
942
|
+
children: t("uiLibrary.sceneMonitor.empty", "No scenes on this camera yet.")
|
|
943
|
+
}) : /* @__PURE__ */ jsx("ul", {
|
|
944
|
+
className: "flex flex-col gap-2",
|
|
945
|
+
children: monitors.map((m) => {
|
|
946
|
+
const badge = badgeFor(m, t);
|
|
947
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
948
|
+
className: `flex flex-col gap-1.5 rounded-md border p-2 ${selectedId === m.id ? "border-primary/50" : "border-border"}`,
|
|
949
|
+
children: [
|
|
950
|
+
/* @__PURE__ */ jsxs("div", {
|
|
951
|
+
className: "flex items-center gap-2",
|
|
952
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
953
|
+
type: "button",
|
|
954
|
+
className: "flex-1 text-left text-[12px] font-medium text-foreground",
|
|
955
|
+
onClick: () => setSelectedId(m.id),
|
|
956
|
+
children: m.label
|
|
957
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
958
|
+
className: `rounded border px-1.5 py-0.5 text-[10px] font-medium ${TONE_CLASS[badge.tone]}`,
|
|
959
|
+
children: badge.text
|
|
960
|
+
})]
|
|
961
|
+
}),
|
|
962
|
+
/* @__PURE__ */ jsx("p", {
|
|
963
|
+
className: `${TEXT_HINT} leading-relaxed`,
|
|
964
|
+
children: statusLine(m, now, t)
|
|
965
|
+
}),
|
|
966
|
+
/* @__PURE__ */ jsx("p", {
|
|
967
|
+
className: `${TEXT_HINT} tabular-nums`,
|
|
968
|
+
children: coverageLine(m, t)
|
|
969
|
+
}),
|
|
970
|
+
/* @__PURE__ */ jsx(SceneReferenceGallery, {
|
|
971
|
+
monitor: m,
|
|
972
|
+
disabled: busy !== null,
|
|
973
|
+
onDelete: ({ stateId, index }) => void run(`refdel-${m.id}-${stateId}-${String(index)}`, async () => dev.sceneMonitor?.deleteReference({
|
|
974
|
+
monitorId: m.id,
|
|
975
|
+
stateId,
|
|
976
|
+
index
|
|
977
|
+
}))
|
|
978
|
+
}),
|
|
979
|
+
/* @__PURE__ */ jsxs("div", {
|
|
980
|
+
className: "flex flex-wrap items-center gap-1.5",
|
|
981
|
+
children: [
|
|
982
|
+
SCENE_CAPTURE_VARIANTS.map((variant) => {
|
|
983
|
+
const optional = variant === "ir";
|
|
984
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
985
|
+
type: "button",
|
|
986
|
+
className: BTN_NEUTRAL,
|
|
987
|
+
disabled: busy !== null,
|
|
988
|
+
title: optional ? t("uiLibrary.sceneMonitor.optionalTitle", "Optional. Without a night reference the checks in infrared are simply skipped — the scene keeps working in daylight and nothing is reported as broken.") : t("uiLibrary.sceneMonitor.captureTitle", "Take a fresh photo now and store it as the {{variant}} reference", { variant: variantLabel(variant, t).toLowerCase() }),
|
|
989
|
+
onClick: () => void run(`cap-${m.id}-${variant}`, async () => dev.sceneMonitor?.captureReference({
|
|
990
|
+
monitorId: m.id,
|
|
991
|
+
condition: variant
|
|
992
|
+
})),
|
|
993
|
+
children: [
|
|
994
|
+
/* @__PURE__ */ jsx(Camera, { className: "mr-1 inline h-3 w-3" }),
|
|
995
|
+
t("uiLibrary.sceneMonitor.capture", "Capture {{variant}}", { variant: variantLabel(variant, t).toLowerCase() }),
|
|
996
|
+
optional && /* @__PURE__ */ jsx("span", {
|
|
997
|
+
className: "ml-1 text-foreground-subtle/70",
|
|
998
|
+
children: t("uiLibrary.sceneMonitor.optional", "(optional)")
|
|
999
|
+
})
|
|
1000
|
+
]
|
|
1001
|
+
}, variant);
|
|
1002
|
+
}),
|
|
1003
|
+
/* @__PURE__ */ jsxs("button", {
|
|
1004
|
+
type: "button",
|
|
1005
|
+
className: BTN_PRIMARY,
|
|
1006
|
+
disabled: busy !== null || m.states.length === 0,
|
|
1007
|
+
title: t("uiLibrary.sceneMonitor.resetTitle", "Clear the flag and re-photograph what normal looks like right now"),
|
|
1008
|
+
onClick: () => void run(`reset-${m.id}`, async () => dev.sceneMonitor?.resetScene({ monitorId: m.id })),
|
|
1009
|
+
children: [/* @__PURE__ */ jsx(RotateCcw, { className: "mr-1 inline h-3 w-3" }), t("uiLibrary.sceneMonitor.reset", "Reset")]
|
|
1010
|
+
}),
|
|
1011
|
+
/* @__PURE__ */ jsx("button", {
|
|
1012
|
+
type: "button",
|
|
1013
|
+
className: BTN_NEUTRAL,
|
|
1014
|
+
disabled: busy !== null,
|
|
1015
|
+
onClick: () => void run(`check-${m.id}`, async () => dev.sceneMonitor?.recheckNow({ monitorId: m.id })),
|
|
1016
|
+
children: t("uiLibrary.sceneMonitor.checkNow", "Check now")
|
|
1017
|
+
}),
|
|
1018
|
+
/* @__PURE__ */ jsxs("button", {
|
|
1019
|
+
type: "button",
|
|
1020
|
+
className: tuningId === m.id ? BTN_PRIMARY : BTN_NEUTRAL,
|
|
1021
|
+
"aria-pressed": tuningId === m.id,
|
|
1022
|
+
"aria-label": t("uiLibrary.sceneMonitor.settingsFor", "Settings for {{label}}", { label: m.label }),
|
|
1023
|
+
disabled: busy !== null,
|
|
1024
|
+
onClick: () => setTuningId((id) => id === m.id ? null : m.id),
|
|
1025
|
+
children: [/* @__PURE__ */ jsx(Settings2, { className: "mr-1 inline h-3 w-3" }), t("uiLibrary.sceneMonitor.settings", "Settings")]
|
|
1026
|
+
}),
|
|
1027
|
+
/* @__PURE__ */ jsx("button", {
|
|
1028
|
+
type: "button",
|
|
1029
|
+
className: BTN_DANGER,
|
|
1030
|
+
disabled: busy !== null,
|
|
1031
|
+
onClick: () => void run(`del-${m.id}`, async () => dev.sceneMonitor?.deleteScene({ monitorId: m.id })),
|
|
1032
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-3 w-3" })
|
|
1033
|
+
})
|
|
1034
|
+
]
|
|
1035
|
+
}),
|
|
1036
|
+
tuningId === m.id && /* @__PURE__ */ jsx(SceneSettingsForm, {
|
|
1037
|
+
monitor: m,
|
|
1038
|
+
disabled: busy !== null,
|
|
1039
|
+
onPatch: (patch) => void run(`tune-${m.id}`, async () => dev.sceneMonitor?.updateScene({
|
|
1040
|
+
monitorId: m.id,
|
|
1041
|
+
patch
|
|
1042
|
+
}))
|
|
1043
|
+
})
|
|
1044
|
+
]
|
|
1045
|
+
}, m.id);
|
|
1046
|
+
})
|
|
1047
|
+
})
|
|
1048
|
+
] })
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
//#endregion
|
|
1052
|
+
export { SceneMonitorEditor };
|