@dominevo/ui-library 0.0.0-stage → 0.1.1
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 +1371 -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-Bres0ZEA.cjs +1052 -0
- package/dist/SceneMonitorEditor-grGP7vRI.js +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 +51 -0
- package/dist/composites/charts/TimeSeriesChart.d.ts +59 -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 +55 -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 +15 -0
- package/dist/composites/device-card/connected/PrimaryTrend.d.ts +10 -0
- package/dist/composites/device-card/connected/ReadingHistory.d.ts +20 -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 +53 -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 +54 -0
- package/dist/composites/device-card/scenes/sensor/reading-colour.d.ts +32 -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 +131 -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 +108230 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +105060 -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/dominevo-theme.css +334 -0
|
@@ -0,0 +1,915 @@
|
|
|
1
|
+
const require_index = require("./index.cjs");
|
|
2
|
+
let react = require("react");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let react_konva = require("react-konva");
|
|
5
|
+
//#region src/composites/cap-settings/MaskShapeCanvas.tsx
|
|
6
|
+
/**
|
|
7
|
+
* MaskShapeCanvas — ONE shared, Konva-based on-frame "drawing plane" editor
|
|
8
|
+
* that handles ALL four `MaskShape` kinds: `rect`, `polygon`, `grid`, `line`.
|
|
9
|
+
*
|
|
10
|
+
* It is a generalization of the detection `ZoneCanvas` (orchestrator) so that
|
|
11
|
+
* privacy-mask (rect/polygon), motion-zones (grid), and the
|
|
12
|
+
* pipeline-orchestrator zones/lines editor can eventually all share a single
|
|
13
|
+
* editor instead of three bespoke ones. Every coordinate is normalized 0..1 of
|
|
14
|
+
* the camera frame (top-left origin), like every existing on-frame editor.
|
|
15
|
+
*
|
|
16
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
17
|
+
* Behaviours ported (the references are NOT edited — this generalizes them):
|
|
18
|
+
*
|
|
19
|
+
* - From `ZoneCanvas` (orchestrator zone-editor):
|
|
20
|
+
* • ResizeObserver-sized `<Stage>`, `transparent` absolute-fill overlay
|
|
21
|
+
* mode for layering over a stream player, optional `backdrop` slot,
|
|
22
|
+
* pointer-events pass-through while not editing.
|
|
23
|
+
* • polygon draw / vertex-drag / body-drag with optimistic local override
|
|
24
|
+
* + the `useEffect` that drops the override once the controlled prop
|
|
25
|
+
* echoes the commit back, the rAF-throttled cursor ghost-line preview,
|
|
26
|
+
* the `Arrow` tripwire, and the memoised export.
|
|
27
|
+
* - From `PrivacyMaskCanvas`:
|
|
28
|
+
* • rect move + bottom-right-handle resize with 0..1 clamp, polygon
|
|
29
|
+
* vertex add (edge midpoint) / remove (✕, gated by min/max), and the
|
|
30
|
+
* `polygonVertices` {min,max} gate (e.g. Hikvision {min:4,max:4}).
|
|
31
|
+
* - From `MotionGridCanvas`:
|
|
32
|
+
* • grid cell-paint gesture (press-drag paints every touched cell to the
|
|
33
|
+
* value the first-touched cell flipped to), row-major `cells`.
|
|
34
|
+
*
|
|
35
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
36
|
+
* Usage — each consumer maps its own model onto `MaskShapeItem[]` and gates the
|
|
37
|
+
* editor with `supportedShapes`:
|
|
38
|
+
*
|
|
39
|
+
* @example privacy-mask (rect + polygon)
|
|
40
|
+
* ```tsx
|
|
41
|
+
* const items: MaskShapeItem[] = regions.map((r) => ({ id: r.id, shape: r.shape }))
|
|
42
|
+
* <MaskShapeCanvas
|
|
43
|
+
* transparent
|
|
44
|
+
* items={items}
|
|
45
|
+
* supportedShapes={['rect', 'polygon']}
|
|
46
|
+
* polygonVertices={options.polygonVertices} // Hikvision {min:4,max:4}
|
|
47
|
+
* selectedId={selectedId}
|
|
48
|
+
* onSelect={setSelectedId}
|
|
49
|
+
* onShapeChange={(id, shape) =>
|
|
50
|
+
* onRegionsChange(regions.map((r) => (r.id === id ? { ...r, shape } : r)))}
|
|
51
|
+
* onDrawComplete={(shape) => onRegionsChange([...regions, { id: nextId(), shape }])}
|
|
52
|
+
* drawingKind={drawing ? 'rect' : null}
|
|
53
|
+
* />
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @example motion-zones (grid)
|
|
57
|
+
* ```tsx
|
|
58
|
+
* const items: MaskShapeItem[] = [{
|
|
59
|
+
* id: 'motion',
|
|
60
|
+
* shape: { kind: 'grid', gridWidth: w, gridHeight: h, cells },
|
|
61
|
+
* }]
|
|
62
|
+
* <MaskShapeCanvas
|
|
63
|
+
* transparent
|
|
64
|
+
* items={items}
|
|
65
|
+
* supportedShapes={['grid']}
|
|
66
|
+
* grid={{ width: w, height: h }}
|
|
67
|
+
* selectedId="motion"
|
|
68
|
+
* onSelect={() => {}}
|
|
69
|
+
* onShapeChange={(_id, shape) => {
|
|
70
|
+
* if (shape.kind === 'grid') onCellsChange(shape.cells)
|
|
71
|
+
* }}
|
|
72
|
+
* onDrawComplete={() => {}}
|
|
73
|
+
* drawingKind={null}
|
|
74
|
+
* />
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @example orchestrator (polygon + line/tripwire)
|
|
78
|
+
* ```tsx
|
|
79
|
+
* const items: MaskShapeItem[] = zones.map((z) => ({
|
|
80
|
+
* id: z.id,
|
|
81
|
+
* label: z.name,
|
|
82
|
+
* color: z.color,
|
|
83
|
+
* shape: z.kind === 'tripwire'
|
|
84
|
+
* ? { kind: 'line', points: z.points }
|
|
85
|
+
* : { kind: 'polygon', points: z.points },
|
|
86
|
+
* }))
|
|
87
|
+
* <MaskShapeCanvas
|
|
88
|
+
* transparent
|
|
89
|
+
* items={items}
|
|
90
|
+
* supportedShapes={['polygon', 'line']}
|
|
91
|
+
* selectedId={selectedZoneId}
|
|
92
|
+
* onSelect={onSelectZone}
|
|
93
|
+
* onShapeChange={(id, shape) => {
|
|
94
|
+
* if (shape.kind === 'polygon' || shape.kind === 'line')
|
|
95
|
+
* onZonePointsChange(id, shape.points)
|
|
96
|
+
* }}
|
|
97
|
+
* onDrawComplete={(shape) => onZoneComplete(shape)}
|
|
98
|
+
* drawingKind={drawingKind === 'tripwire' ? 'line' : drawingKind}
|
|
99
|
+
* backdrop={<CameraStreamPlayer ... />}
|
|
100
|
+
* />
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* Purely controlled — the parent owns the truth. Every edit fires
|
|
104
|
+
* `onShapeChange(id, shape)` (or `onDrawComplete(shape)` for a freshly-drawn
|
|
105
|
+
* shape) with a brand-new immutable shape object; points and cells are never
|
|
106
|
+
* mutated in place.
|
|
107
|
+
*/
|
|
108
|
+
var DEFAULT_COLOR = {
|
|
109
|
+
rect: "#ef4444",
|
|
110
|
+
polygon: "#3b82f6",
|
|
111
|
+
grid: "#6366f1",
|
|
112
|
+
line: "#f59e0b"
|
|
113
|
+
};
|
|
114
|
+
/** Polygon body fill alpha (hex suffix). `#33` ≈ 20%, `#66` ≈ 40%. */
|
|
115
|
+
var FILL_ALPHA = "33";
|
|
116
|
+
var FILL_ALPHA_SELECTED = "66";
|
|
117
|
+
var DRAW_PREVIEW_STROKE = "#6366f1";
|
|
118
|
+
var FLOOR_POLYGON_VERTICES = 3;
|
|
119
|
+
var FLOOR_LINE_VERTICES = 2;
|
|
120
|
+
var CLOSE_HIT_RADIUS = 12;
|
|
121
|
+
var RHYTHM_COLS = 16;
|
|
122
|
+
var RHYTHM_ROWS = 9;
|
|
123
|
+
function toCanvas(p, w, h) {
|
|
124
|
+
return {
|
|
125
|
+
x: p.x * w,
|
|
126
|
+
y: p.y * h
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function toNorm(p, w, h) {
|
|
130
|
+
return {
|
|
131
|
+
x: p.x / w,
|
|
132
|
+
y: p.y / h
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function flatPoints(points, w, h) {
|
|
136
|
+
return points.flatMap((p) => [p.x * w, p.y * h]);
|
|
137
|
+
}
|
|
138
|
+
/** Clamp to the normalized 0..1 range, mapping non-finite values to 0. */
|
|
139
|
+
function clamp01(v) {
|
|
140
|
+
if (!Number.isFinite(v)) return 0;
|
|
141
|
+
if (v < 0) return 0;
|
|
142
|
+
if (v > 1) return 1;
|
|
143
|
+
return v;
|
|
144
|
+
}
|
|
145
|
+
function resolveColor(item) {
|
|
146
|
+
return item.color ?? DEFAULT_COLOR[item.shape.kind];
|
|
147
|
+
}
|
|
148
|
+
/** Insert a vertex at the midpoint of edge `edgeStart → edgeStart+1`. */
|
|
149
|
+
function insertMidpoint(points, edgeStart) {
|
|
150
|
+
const a = points[edgeStart];
|
|
151
|
+
const b = points[(edgeStart + 1) % points.length];
|
|
152
|
+
if (!a || !b) return [...points];
|
|
153
|
+
const mid = {
|
|
154
|
+
x: (a.x + b.x) / 2,
|
|
155
|
+
y: (a.y + b.y) / 2
|
|
156
|
+
};
|
|
157
|
+
return [
|
|
158
|
+
...points.slice(0, edgeStart + 1),
|
|
159
|
+
mid,
|
|
160
|
+
...points.slice(edgeStart + 1)
|
|
161
|
+
];
|
|
162
|
+
}
|
|
163
|
+
/** Float-tolerant point-list equality (used to detect prop catch-up). */
|
|
164
|
+
function pointsEqual(a, b) {
|
|
165
|
+
if (a.length !== b.length) return false;
|
|
166
|
+
return a.every((p, i) => {
|
|
167
|
+
const o = b[i];
|
|
168
|
+
return Math.abs(p.x - o.x) < 1e-6 && Math.abs(p.y - o.y) < 1e-6;
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function isPointShape(shape) {
|
|
172
|
+
return shape.kind === "polygon" || shape.kind === "line";
|
|
173
|
+
}
|
|
174
|
+
function MaskShapeCanvasImpl({ items, selectedId, onSelect, onShapeChange, onDrawComplete, drawingKind, supportedShapes, transparent = false, backdrop, polygonVertices, grid }) {
|
|
175
|
+
const t = require_index.useUiText();
|
|
176
|
+
const containerRef = (0, react.useRef)(null);
|
|
177
|
+
const [size, setSize] = (0, react.useState)({
|
|
178
|
+
w: 800,
|
|
179
|
+
h: 450
|
|
180
|
+
});
|
|
181
|
+
const [drawPoints, setDrawPoints] = (0, react.useState)([]);
|
|
182
|
+
const [cursorPos, setCursorPos] = (0, react.useState)(null);
|
|
183
|
+
const [draggingItemId, setDraggingItemId] = (0, react.useState)(null);
|
|
184
|
+
const [dragOverride, setDragOverride] = (0, react.useState)(null);
|
|
185
|
+
const isDrawing = drawingKind !== null && supportedShapes.includes(drawingKind);
|
|
186
|
+
(0, react.useEffect)(() => {
|
|
187
|
+
if (!dragOverride) return;
|
|
188
|
+
const it = items.find((i) => i.id === dragOverride.itemId);
|
|
189
|
+
if (!it || !isPointShape(it.shape)) {
|
|
190
|
+
setDragOverride(null);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (pointsEqual(it.shape.points, dragOverride.points)) setDragOverride(null);
|
|
194
|
+
}, [items, dragOverride]);
|
|
195
|
+
(0, react.useEffect)(() => {
|
|
196
|
+
const el = containerRef.current;
|
|
197
|
+
if (!el) return;
|
|
198
|
+
const ro = new ResizeObserver((entries) => {
|
|
199
|
+
const entry = entries[0];
|
|
200
|
+
if (!entry) return;
|
|
201
|
+
const { width, height } = entry.contentRect;
|
|
202
|
+
setSize(transparent ? {
|
|
203
|
+
w: width,
|
|
204
|
+
h: height
|
|
205
|
+
} : {
|
|
206
|
+
w: width,
|
|
207
|
+
h: width * 9 / 16
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
ro.observe(el);
|
|
211
|
+
return () => ro.disconnect();
|
|
212
|
+
}, [transparent]);
|
|
213
|
+
(0, react.useEffect)(() => {
|
|
214
|
+
if (!isDrawing && cursorPos !== null) setCursorPos(null);
|
|
215
|
+
}, [isDrawing, cursorPos]);
|
|
216
|
+
const completeDraw = (0, react.useCallback)((shape) => {
|
|
217
|
+
onDrawComplete(shape);
|
|
218
|
+
setDrawPoints([]);
|
|
219
|
+
}, [onDrawComplete]);
|
|
220
|
+
const handleStageClick = (0, react.useCallback)((e) => {
|
|
221
|
+
if (!isDrawing || drawingKind === null) {
|
|
222
|
+
onSelect(null);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const stage = e.target.getStage();
|
|
226
|
+
if (!stage) return;
|
|
227
|
+
const pos = stage.getPointerPosition();
|
|
228
|
+
if (!pos) return;
|
|
229
|
+
const norm = toNorm(pos, size.w, size.h);
|
|
230
|
+
if (drawingKind === "rect") {
|
|
231
|
+
const x = clamp01(norm.x);
|
|
232
|
+
const y = clamp01(norm.y);
|
|
233
|
+
completeDraw({
|
|
234
|
+
kind: "rect",
|
|
235
|
+
x,
|
|
236
|
+
y,
|
|
237
|
+
width: Math.min(.2, 1 - x),
|
|
238
|
+
height: Math.min(.2, 1 - y)
|
|
239
|
+
});
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (drawingKind === "grid") {
|
|
243
|
+
const gw = grid?.width ?? RHYTHM_COLS;
|
|
244
|
+
const gh = grid?.height ?? RHYTHM_ROWS;
|
|
245
|
+
completeDraw({
|
|
246
|
+
kind: "grid",
|
|
247
|
+
gridWidth: gw,
|
|
248
|
+
gridHeight: gh,
|
|
249
|
+
cells: Array.from({ length: gw * gh }, () => false)
|
|
250
|
+
});
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
if (drawingKind === "line") {
|
|
254
|
+
if (drawPoints.length === 0) {
|
|
255
|
+
setDrawPoints([norm]);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
completeDraw({
|
|
259
|
+
kind: "line",
|
|
260
|
+
points: [...drawPoints, norm]
|
|
261
|
+
});
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (drawingKind === "polygon") {
|
|
265
|
+
if (drawPoints.length === 0) {
|
|
266
|
+
setDrawPoints([norm]);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
if (drawPoints.length >= FLOOR_POLYGON_VERTICES) {
|
|
270
|
+
const first = toCanvas(drawPoints[0], size.w, size.h);
|
|
271
|
+
if (Math.hypot(pos.x - first.x, pos.y - first.y) < CLOSE_HIT_RADIUS) {
|
|
272
|
+
completeDraw({
|
|
273
|
+
kind: "polygon",
|
|
274
|
+
points: drawPoints
|
|
275
|
+
});
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
setDrawPoints((prev) => [...prev, norm]);
|
|
280
|
+
}
|
|
281
|
+
}, [
|
|
282
|
+
isDrawing,
|
|
283
|
+
drawingKind,
|
|
284
|
+
drawPoints,
|
|
285
|
+
size,
|
|
286
|
+
grid,
|
|
287
|
+
completeDraw,
|
|
288
|
+
onSelect
|
|
289
|
+
]);
|
|
290
|
+
const handleDblClick = (0, react.useCallback)((e) => {
|
|
291
|
+
if (!isDrawing || drawingKind !== "polygon") return;
|
|
292
|
+
if (drawPoints.length < FLOOR_POLYGON_VERTICES) return;
|
|
293
|
+
e.cancelBubble = true;
|
|
294
|
+
completeDraw({
|
|
295
|
+
kind: "polygon",
|
|
296
|
+
points: drawPoints
|
|
297
|
+
});
|
|
298
|
+
}, [
|
|
299
|
+
isDrawing,
|
|
300
|
+
drawingKind,
|
|
301
|
+
drawPoints,
|
|
302
|
+
completeDraw
|
|
303
|
+
]);
|
|
304
|
+
const cursorRafRef = (0, react.useRef)(null);
|
|
305
|
+
const pendingCursorRef = (0, react.useRef)(null);
|
|
306
|
+
(0, react.useEffect)(() => () => {
|
|
307
|
+
if (cursorRafRef.current !== null) cancelAnimationFrame(cursorRafRef.current);
|
|
308
|
+
}, []);
|
|
309
|
+
const handleMouseMove = (0, react.useCallback)((e) => {
|
|
310
|
+
if (!isDrawing) return;
|
|
311
|
+
const stage = e.target.getStage();
|
|
312
|
+
if (!stage) return;
|
|
313
|
+
pendingCursorRef.current = stage.getPointerPosition() ?? null;
|
|
314
|
+
if (cursorRafRef.current !== null) return;
|
|
315
|
+
cursorRafRef.current = requestAnimationFrame(() => {
|
|
316
|
+
cursorRafRef.current = null;
|
|
317
|
+
setCursorPos(pendingCursorRef.current);
|
|
318
|
+
});
|
|
319
|
+
}, [isDrawing]);
|
|
320
|
+
const paintingRef = (0, react.useRef)(false);
|
|
321
|
+
const paintValueRef = (0, react.useRef)(true);
|
|
322
|
+
const paintedRef = (0, react.useRef)(/* @__PURE__ */ new Set());
|
|
323
|
+
const paintCell = (0, react.useCallback)((itemId, shape, index, value) => {
|
|
324
|
+
const total = shape.gridWidth * shape.gridHeight;
|
|
325
|
+
if (index < 0 || index >= total) return;
|
|
326
|
+
if (shape.cells[index] === value) return;
|
|
327
|
+
const next = [...shape.cells];
|
|
328
|
+
while (next.length < total) next.push(false);
|
|
329
|
+
next.length = total;
|
|
330
|
+
next[index] = value;
|
|
331
|
+
onShapeChange(itemId, {
|
|
332
|
+
...shape,
|
|
333
|
+
cells: next
|
|
334
|
+
});
|
|
335
|
+
}, [onShapeChange]);
|
|
336
|
+
const rhythmLines = [];
|
|
337
|
+
if (!transparent) {
|
|
338
|
+
for (let i = 1; i < RHYTHM_COLS; i++) {
|
|
339
|
+
const x = size.w / RHYTHM_COLS * i;
|
|
340
|
+
rhythmLines.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Line, {
|
|
341
|
+
points: [
|
|
342
|
+
x,
|
|
343
|
+
0,
|
|
344
|
+
x,
|
|
345
|
+
size.h
|
|
346
|
+
],
|
|
347
|
+
stroke: "#ffffff",
|
|
348
|
+
strokeWidth: .5,
|
|
349
|
+
opacity: .08
|
|
350
|
+
}, `gv-${i}`));
|
|
351
|
+
}
|
|
352
|
+
for (let i = 1; i < RHYTHM_ROWS; i++) {
|
|
353
|
+
const y = size.h / RHYTHM_ROWS * i;
|
|
354
|
+
rhythmLines.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Line, {
|
|
355
|
+
points: [
|
|
356
|
+
0,
|
|
357
|
+
y,
|
|
358
|
+
size.w,
|
|
359
|
+
y
|
|
360
|
+
],
|
|
361
|
+
stroke: "#ffffff",
|
|
362
|
+
strokeWidth: .5,
|
|
363
|
+
opacity: .08
|
|
364
|
+
}, `gh-${i}`));
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
368
|
+
ref: containerRef,
|
|
369
|
+
className: transparent ? "absolute inset-0" : "relative w-full bg-zinc-900 rounded-lg overflow-hidden",
|
|
370
|
+
style: { cursor: isDrawing ? "crosshair" : "default" },
|
|
371
|
+
children: [
|
|
372
|
+
backdrop && !transparent ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
373
|
+
className: "absolute inset-0 pointer-events-none [&>*]:w-full [&>*]:h-full [&>img]:object-cover [&>video]:object-cover",
|
|
374
|
+
style: {
|
|
375
|
+
width: size.w,
|
|
376
|
+
height: size.h
|
|
377
|
+
},
|
|
378
|
+
children: backdrop
|
|
379
|
+
}) : null,
|
|
380
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_konva.Stage, {
|
|
381
|
+
width: size.w,
|
|
382
|
+
height: size.h,
|
|
383
|
+
onClick: handleStageClick,
|
|
384
|
+
onDblClick: handleDblClick,
|
|
385
|
+
onMouseMove: handleMouseMove,
|
|
386
|
+
children: [
|
|
387
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_konva.Layer, {
|
|
388
|
+
listening: false,
|
|
389
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Line, {
|
|
390
|
+
points: [
|
|
391
|
+
0,
|
|
392
|
+
0,
|
|
393
|
+
size.w,
|
|
394
|
+
0,
|
|
395
|
+
size.w,
|
|
396
|
+
size.h,
|
|
397
|
+
0,
|
|
398
|
+
size.h,
|
|
399
|
+
0,
|
|
400
|
+
0
|
|
401
|
+
],
|
|
402
|
+
stroke: "transparent",
|
|
403
|
+
strokeWidth: 0
|
|
404
|
+
}), rhythmLines]
|
|
405
|
+
}),
|
|
406
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Layer, { children: items.map((item) => {
|
|
407
|
+
const selected = item.id === selectedId;
|
|
408
|
+
const dimmed = item.enabled === false;
|
|
409
|
+
const color = resolveColor(item);
|
|
410
|
+
const editable = selected && !isDrawing && !dimmed;
|
|
411
|
+
if (item.shape.kind === "rect") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RectItem, {
|
|
412
|
+
item,
|
|
413
|
+
shape: item.shape,
|
|
414
|
+
color,
|
|
415
|
+
selected,
|
|
416
|
+
dimmed,
|
|
417
|
+
editable,
|
|
418
|
+
isDrawing,
|
|
419
|
+
size,
|
|
420
|
+
onSelect,
|
|
421
|
+
onShapeChange
|
|
422
|
+
}, item.id);
|
|
423
|
+
if (item.shape.kind === "grid") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GridItem, {
|
|
424
|
+
item,
|
|
425
|
+
shape: item.shape,
|
|
426
|
+
color,
|
|
427
|
+
dimmed,
|
|
428
|
+
editable,
|
|
429
|
+
size,
|
|
430
|
+
onSelect,
|
|
431
|
+
paintingRef,
|
|
432
|
+
paintValueRef,
|
|
433
|
+
paintedRef,
|
|
434
|
+
paintCell
|
|
435
|
+
}, item.id);
|
|
436
|
+
const isLine = item.shape.kind === "line";
|
|
437
|
+
const minVertices = isLine ? FLOOR_LINE_VERTICES : Math.max(FLOOR_POLYGON_VERTICES, polygonVertices?.min ?? FLOOR_POLYGON_VERTICES);
|
|
438
|
+
const maxVertices = isLine ? FLOOR_LINE_VERTICES : polygonVertices?.max;
|
|
439
|
+
const effectivePoints = dragOverride && dragOverride.itemId === item.id ? dragOverride.points : item.shape.points;
|
|
440
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PointItem, {
|
|
441
|
+
item,
|
|
442
|
+
shape: item.shape,
|
|
443
|
+
color,
|
|
444
|
+
selected,
|
|
445
|
+
dimmed,
|
|
446
|
+
editable,
|
|
447
|
+
isLine,
|
|
448
|
+
isDrawing,
|
|
449
|
+
size,
|
|
450
|
+
effectivePoints,
|
|
451
|
+
minVertices,
|
|
452
|
+
maxVertices,
|
|
453
|
+
isDragging: draggingItemId === item.id,
|
|
454
|
+
onSelect,
|
|
455
|
+
onShapeChange,
|
|
456
|
+
setDragOverride,
|
|
457
|
+
setDraggingItemId
|
|
458
|
+
}, item.id);
|
|
459
|
+
}) }),
|
|
460
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Layer, {
|
|
461
|
+
listening: false,
|
|
462
|
+
children: isDrawing && drawPoints.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_konva.Group, { children: [
|
|
463
|
+
drawingKind === "polygon" && drawPoints.length >= 2 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Line, {
|
|
464
|
+
points: flatPoints(drawPoints, size.w, size.h),
|
|
465
|
+
stroke: DRAW_PREVIEW_STROKE,
|
|
466
|
+
strokeWidth: 1.5,
|
|
467
|
+
dash: [6, 3],
|
|
468
|
+
opacity: .8
|
|
469
|
+
}),
|
|
470
|
+
drawingKind === "line" && drawPoints.length === 1 && cursorPos && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Line, {
|
|
471
|
+
points: [
|
|
472
|
+
drawPoints[0].x * size.w,
|
|
473
|
+
drawPoints[0].y * size.h,
|
|
474
|
+
cursorPos.x,
|
|
475
|
+
cursorPos.y
|
|
476
|
+
],
|
|
477
|
+
stroke: DEFAULT_COLOR.line,
|
|
478
|
+
strokeWidth: 1.5,
|
|
479
|
+
dash: [6, 3],
|
|
480
|
+
opacity: .7
|
|
481
|
+
}),
|
|
482
|
+
drawingKind === "polygon" && cursorPos && drawPoints.length >= 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Line, {
|
|
483
|
+
points: [
|
|
484
|
+
drawPoints[drawPoints.length - 1].x * size.w,
|
|
485
|
+
drawPoints[drawPoints.length - 1].y * size.h,
|
|
486
|
+
cursorPos.x,
|
|
487
|
+
cursorPos.y
|
|
488
|
+
],
|
|
489
|
+
stroke: DRAW_PREVIEW_STROKE,
|
|
490
|
+
strokeWidth: 1,
|
|
491
|
+
dash: [4, 4],
|
|
492
|
+
opacity: .5
|
|
493
|
+
}),
|
|
494
|
+
drawPoints.map((p, idx) => {
|
|
495
|
+
const cp = toCanvas(p, size.w, size.h);
|
|
496
|
+
const firstClose = idx === 0 && drawingKind === "polygon" && drawPoints.length >= FLOOR_POLYGON_VERTICES;
|
|
497
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Circle, {
|
|
498
|
+
x: cp.x,
|
|
499
|
+
y: cp.y,
|
|
500
|
+
radius: firstClose ? 7 : 4,
|
|
501
|
+
fill: firstClose ? DRAW_PREVIEW_STROKE : "#ffffff",
|
|
502
|
+
stroke: DRAW_PREVIEW_STROKE,
|
|
503
|
+
strokeWidth: 1.5,
|
|
504
|
+
opacity: .9
|
|
505
|
+
}, idx);
|
|
506
|
+
})
|
|
507
|
+
] })
|
|
508
|
+
})
|
|
509
|
+
]
|
|
510
|
+
}),
|
|
511
|
+
isDrawing ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
512
|
+
className: "px-3 py-1.5 bg-zinc-800/80 text-[11px] text-zinc-400 border-t border-zinc-700",
|
|
513
|
+
children: drawingKind === "line" ? t("uiLibrary.maskShapeCanvas.hintLine", "Click to set the start point, click again to complete the line") : drawingKind === "rect" ? t("uiLibrary.maskShapeCanvas.hintRect", "Click to drop a rectangle, then drag the corner to resize") : drawingKind === "grid" ? t("uiLibrary.maskShapeCanvas.hintGrid", "Click to add the grid, then paint cells") : drawPoints.length < FLOOR_POLYGON_VERTICES ? t("uiLibrary.maskShapeCanvas.hintPoints", "Click to add points (min 3). Double-click or click the first point to close.") : t("uiLibrary.maskShapeCanvas.hintMore", "Continue adding points. Double-click or click the first point to close.")
|
|
514
|
+
}) : null
|
|
515
|
+
]
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
var MIN_RECT_DIM = .02;
|
|
519
|
+
/** Float-tolerant rect equality (used to detect controlled-prop catch-up). */
|
|
520
|
+
function rectGeomEqual(a, b) {
|
|
521
|
+
return Math.abs(a.x - b.x) < 1e-6 && Math.abs(a.y - b.y) < 1e-6 && Math.abs(a.width - b.width) < 1e-6 && Math.abs(a.height - b.height) < 1e-6;
|
|
522
|
+
}
|
|
523
|
+
function RectItem({ item, shape, color, selected, dimmed, editable, isDrawing, size, onSelect, onShapeChange }) {
|
|
524
|
+
const [override, setOverride] = (0, react.useState)(null);
|
|
525
|
+
const propGeom = {
|
|
526
|
+
x: shape.x,
|
|
527
|
+
y: shape.y,
|
|
528
|
+
width: shape.width,
|
|
529
|
+
height: shape.height
|
|
530
|
+
};
|
|
531
|
+
(0, react.useEffect)(() => {
|
|
532
|
+
if (override && rectGeomEqual(propGeom, override)) setOverride(null);
|
|
533
|
+
}, [
|
|
534
|
+
shape.x,
|
|
535
|
+
shape.y,
|
|
536
|
+
shape.width,
|
|
537
|
+
shape.height,
|
|
538
|
+
override
|
|
539
|
+
]);
|
|
540
|
+
const geom = override ?? propGeom;
|
|
541
|
+
const x = geom.x * size.w;
|
|
542
|
+
const y = geom.y * size.h;
|
|
543
|
+
const w = geom.width * size.w;
|
|
544
|
+
const h = geom.height * size.h;
|
|
545
|
+
const baseOpacity = dimmed ? .35 : selected ? 1 : .85;
|
|
546
|
+
const commit = (g) => {
|
|
547
|
+
setOverride(g);
|
|
548
|
+
onShapeChange(item.id, {
|
|
549
|
+
kind: "rect",
|
|
550
|
+
x: g.x,
|
|
551
|
+
y: g.y,
|
|
552
|
+
width: g.width,
|
|
553
|
+
height: g.height
|
|
554
|
+
});
|
|
555
|
+
};
|
|
556
|
+
const dragBoundFunc = (pos) => ({
|
|
557
|
+
x: Math.max(-x, Math.min(size.w - (x + w), pos.x)),
|
|
558
|
+
y: Math.max(-y, Math.min(size.h - (y + h), pos.y))
|
|
559
|
+
});
|
|
560
|
+
const onBodyDragEnd = (e) => {
|
|
561
|
+
const node = e.target;
|
|
562
|
+
const dx = node.x() / size.w;
|
|
563
|
+
const dy = node.y() / size.h;
|
|
564
|
+
node.position({
|
|
565
|
+
x: 0,
|
|
566
|
+
y: 0
|
|
567
|
+
});
|
|
568
|
+
if (dx === 0 && dy === 0) return;
|
|
569
|
+
const nx = Math.min(Math.max(0, geom.x + dx), Math.max(0, 1 - geom.width));
|
|
570
|
+
const ny = Math.min(Math.max(0, geom.y + dy), Math.max(0, 1 - geom.height));
|
|
571
|
+
commit({
|
|
572
|
+
...geom,
|
|
573
|
+
x: nx,
|
|
574
|
+
y: ny
|
|
575
|
+
});
|
|
576
|
+
};
|
|
577
|
+
const onHandleDragMove = (e) => {
|
|
578
|
+
const node = e.target;
|
|
579
|
+
const newW = clamp01(node.x() / size.w - geom.x);
|
|
580
|
+
const newH = clamp01(node.y() / size.h - geom.y);
|
|
581
|
+
setOverride({
|
|
582
|
+
...geom,
|
|
583
|
+
width: Math.max(MIN_RECT_DIM, Math.min(newW, 1 - geom.x)),
|
|
584
|
+
height: Math.max(MIN_RECT_DIM, Math.min(newH, 1 - geom.y))
|
|
585
|
+
});
|
|
586
|
+
};
|
|
587
|
+
const onHandleDragEnd = (e) => {
|
|
588
|
+
const node = e.target;
|
|
589
|
+
const newW = clamp01(node.x() / size.w - geom.x);
|
|
590
|
+
const newH = clamp01(node.y() / size.h - geom.y);
|
|
591
|
+
commit({
|
|
592
|
+
...geom,
|
|
593
|
+
width: Math.max(MIN_RECT_DIM, Math.min(newW, 1 - geom.x)),
|
|
594
|
+
height: Math.max(MIN_RECT_DIM, Math.min(newH, 1 - geom.y))
|
|
595
|
+
});
|
|
596
|
+
};
|
|
597
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Group, {
|
|
598
|
+
onClick: (e) => {
|
|
599
|
+
e.cancelBubble = true;
|
|
600
|
+
if (!isDrawing) onSelect(item.id);
|
|
601
|
+
},
|
|
602
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_konva.Group, {
|
|
603
|
+
draggable: editable,
|
|
604
|
+
dragBoundFunc: editable ? dragBoundFunc : void 0,
|
|
605
|
+
onDragEnd: editable ? onBodyDragEnd : void 0,
|
|
606
|
+
onMouseEnter: (e) => {
|
|
607
|
+
if (!editable) return;
|
|
608
|
+
const stage = e.target.getStage();
|
|
609
|
+
if (stage) stage.container().style.cursor = "move";
|
|
610
|
+
},
|
|
611
|
+
onMouseLeave: (e) => {
|
|
612
|
+
if (!editable) return;
|
|
613
|
+
const stage = e.target.getStage();
|
|
614
|
+
if (stage) stage.container().style.cursor = isDrawing ? "crosshair" : "default";
|
|
615
|
+
},
|
|
616
|
+
children: [
|
|
617
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Rect, {
|
|
618
|
+
x,
|
|
619
|
+
y,
|
|
620
|
+
width: w,
|
|
621
|
+
height: h,
|
|
622
|
+
fill: color + (selected ? FILL_ALPHA_SELECTED : FILL_ALPHA),
|
|
623
|
+
stroke: color,
|
|
624
|
+
strokeWidth: selected ? 2.5 : 1.5,
|
|
625
|
+
opacity: baseOpacity
|
|
626
|
+
}),
|
|
627
|
+
item.label ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Text, {
|
|
628
|
+
x,
|
|
629
|
+
y: y - 16,
|
|
630
|
+
text: item.label,
|
|
631
|
+
fontSize: 12,
|
|
632
|
+
fill: color,
|
|
633
|
+
stroke: "#000000",
|
|
634
|
+
strokeWidth: 3,
|
|
635
|
+
fillAfterStrokeEnabled: true,
|
|
636
|
+
fontStyle: "bold",
|
|
637
|
+
listening: false
|
|
638
|
+
}) : null,
|
|
639
|
+
editable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Circle, {
|
|
640
|
+
x: x + w,
|
|
641
|
+
y: y + h,
|
|
642
|
+
radius: 6,
|
|
643
|
+
fill: color,
|
|
644
|
+
stroke: "#ffffff",
|
|
645
|
+
strokeWidth: 1.5,
|
|
646
|
+
draggable: true,
|
|
647
|
+
dragBoundFunc: (pos) => ({
|
|
648
|
+
x: Math.min(size.w, Math.max(x, pos.x)),
|
|
649
|
+
y: Math.min(size.h, Math.max(y, pos.y))
|
|
650
|
+
}),
|
|
651
|
+
onDragStart: (e) => {
|
|
652
|
+
e.cancelBubble = true;
|
|
653
|
+
},
|
|
654
|
+
onDragMove: onHandleDragMove,
|
|
655
|
+
onDragEnd: onHandleDragEnd,
|
|
656
|
+
onMouseEnter: (e) => {
|
|
657
|
+
const stage = e.target.getStage();
|
|
658
|
+
if (stage) stage.container().style.cursor = "nwse-resize";
|
|
659
|
+
},
|
|
660
|
+
onMouseLeave: (e) => {
|
|
661
|
+
const stage = e.target.getStage();
|
|
662
|
+
if (stage) stage.container().style.cursor = "default";
|
|
663
|
+
}
|
|
664
|
+
}) : null
|
|
665
|
+
]
|
|
666
|
+
})
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
function GridItem({ item, shape, color, dimmed, editable, size, onSelect, paintingRef, paintValueRef, paintedRef, paintCell }) {
|
|
670
|
+
const { gridWidth, gridHeight, cells } = shape;
|
|
671
|
+
const cellW = size.w / gridWidth;
|
|
672
|
+
const cellH = size.h / gridHeight;
|
|
673
|
+
const total = gridWidth * gridHeight;
|
|
674
|
+
const opacity = dimmed ? .3 : 1;
|
|
675
|
+
const onCellDown = (index) => {
|
|
676
|
+
if (!editable) {
|
|
677
|
+
onSelect(item.id);
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
const nextValue = cells[index] !== true;
|
|
681
|
+
paintingRef.current = true;
|
|
682
|
+
paintValueRef.current = nextValue;
|
|
683
|
+
paintedRef.current = new Set([index]);
|
|
684
|
+
paintCell(item.id, shape, index, nextValue);
|
|
685
|
+
};
|
|
686
|
+
const onCellEnter = (index) => {
|
|
687
|
+
if (!paintingRef.current || !editable) return;
|
|
688
|
+
if (paintedRef.current.has(index)) return;
|
|
689
|
+
paintedRef.current.add(index);
|
|
690
|
+
paintCell(item.id, shape, index, paintValueRef.current);
|
|
691
|
+
};
|
|
692
|
+
const endPaint = () => {
|
|
693
|
+
if (!paintingRef.current) return;
|
|
694
|
+
paintingRef.current = false;
|
|
695
|
+
paintedRef.current = /* @__PURE__ */ new Set();
|
|
696
|
+
};
|
|
697
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Group, {
|
|
698
|
+
opacity,
|
|
699
|
+
onMouseUp: endPaint,
|
|
700
|
+
onMouseLeave: endPaint,
|
|
701
|
+
children: Array.from({ length: total }, (_, i) => {
|
|
702
|
+
const col = i % gridWidth;
|
|
703
|
+
const row = Math.floor(i / gridWidth);
|
|
704
|
+
const active = cells[i] === true;
|
|
705
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Rect, {
|
|
706
|
+
x: col * cellW,
|
|
707
|
+
y: row * cellH,
|
|
708
|
+
width: cellW,
|
|
709
|
+
height: cellH,
|
|
710
|
+
fill: active ? color + FILL_ALPHA_SELECTED : "#ffffff10",
|
|
711
|
+
stroke: active ? color : "#ffffff40",
|
|
712
|
+
strokeWidth: .5,
|
|
713
|
+
onMouseDown: (e) => {
|
|
714
|
+
e.cancelBubble = true;
|
|
715
|
+
onCellDown(i);
|
|
716
|
+
},
|
|
717
|
+
onMouseEnter: () => onCellEnter(i)
|
|
718
|
+
}, i);
|
|
719
|
+
})
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
function PointItem({ item, shape, color, selected, dimmed, editable, isLine, isDrawing, size, effectivePoints, minVertices, maxVertices, isDragging, onSelect, onShapeChange, setDragOverride, setDraggingItemId }) {
|
|
723
|
+
const pts = flatPoints(effectivePoints, size.w, size.h);
|
|
724
|
+
const baseOpacity = dimmed ? .35 : selected ? 1 : isLine ? .8 : .85;
|
|
725
|
+
const commitPoints = (points) => isLine ? {
|
|
726
|
+
kind: "line",
|
|
727
|
+
points: [...points]
|
|
728
|
+
} : {
|
|
729
|
+
kind: "polygon",
|
|
730
|
+
points: [...points]
|
|
731
|
+
};
|
|
732
|
+
const xs = effectivePoints.map((p) => p.x * size.w);
|
|
733
|
+
const ys = effectivePoints.map((p) => p.y * size.h);
|
|
734
|
+
const minX = xs.length > 0 ? Math.min(...xs) : 0;
|
|
735
|
+
const maxX = xs.length > 0 ? Math.max(...xs) : 0;
|
|
736
|
+
const minY = ys.length > 0 ? Math.min(...ys) : 0;
|
|
737
|
+
const maxY = ys.length > 0 ? Math.max(...ys) : 0;
|
|
738
|
+
const dragBoundFunc = (pos) => ({
|
|
739
|
+
x: Math.max(-minX, Math.min(size.w - maxX, pos.x)),
|
|
740
|
+
y: Math.max(-minY, Math.min(size.h - maxY, pos.y))
|
|
741
|
+
});
|
|
742
|
+
const onBodyDragEnd = (e) => {
|
|
743
|
+
const node = e.target;
|
|
744
|
+
const dx = node.x() / size.w;
|
|
745
|
+
const dy = node.y() / size.h;
|
|
746
|
+
node.position({
|
|
747
|
+
x: 0,
|
|
748
|
+
y: 0
|
|
749
|
+
});
|
|
750
|
+
setDraggingItemId(null);
|
|
751
|
+
if (dx === 0 && dy === 0) return;
|
|
752
|
+
const updated = shape.points.map((p) => ({
|
|
753
|
+
x: p.x + dx,
|
|
754
|
+
y: p.y + dy
|
|
755
|
+
}));
|
|
756
|
+
setDragOverride({
|
|
757
|
+
itemId: item.id,
|
|
758
|
+
points: updated
|
|
759
|
+
});
|
|
760
|
+
onShapeChange(item.id, commitPoints(updated));
|
|
761
|
+
};
|
|
762
|
+
const canRemoveVertex = !isLine && effectivePoints.length > minVertices;
|
|
763
|
+
const canAddVertex = !isLine && (maxVertices === void 0 || effectivePoints.length < maxVertices);
|
|
764
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_konva.Group, {
|
|
765
|
+
onClick: (e) => {
|
|
766
|
+
e.cancelBubble = true;
|
|
767
|
+
if (!isDrawing) onSelect(item.id);
|
|
768
|
+
},
|
|
769
|
+
children: [
|
|
770
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_konva.Group, {
|
|
771
|
+
draggable: editable,
|
|
772
|
+
dragBoundFunc: editable ? dragBoundFunc : void 0,
|
|
773
|
+
onDragStart: editable ? () => setDraggingItemId(item.id) : void 0,
|
|
774
|
+
onDragEnd: editable ? onBodyDragEnd : void 0,
|
|
775
|
+
onMouseEnter: (e) => {
|
|
776
|
+
if (!editable) return;
|
|
777
|
+
const stage = e.target.getStage();
|
|
778
|
+
if (stage) stage.container().style.cursor = "move";
|
|
779
|
+
},
|
|
780
|
+
onMouseLeave: (e) => {
|
|
781
|
+
if (!editable) return;
|
|
782
|
+
const stage = e.target.getStage();
|
|
783
|
+
if (stage) stage.container().style.cursor = isDrawing ? "crosshair" : "default";
|
|
784
|
+
},
|
|
785
|
+
children: [isLine ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Arrow, {
|
|
786
|
+
points: pts,
|
|
787
|
+
stroke: color,
|
|
788
|
+
strokeWidth: selected ? 3 : 2,
|
|
789
|
+
fill: color,
|
|
790
|
+
pointerLength: 10,
|
|
791
|
+
pointerWidth: 8,
|
|
792
|
+
opacity: baseOpacity
|
|
793
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Line, {
|
|
794
|
+
points: pts,
|
|
795
|
+
closed: true,
|
|
796
|
+
fill: color + (selected ? FILL_ALPHA_SELECTED : FILL_ALPHA),
|
|
797
|
+
stroke: color,
|
|
798
|
+
strokeWidth: selected ? 2.5 : 1.5,
|
|
799
|
+
opacity: baseOpacity
|
|
800
|
+
}), item.label && effectivePoints.length > 0 ? (() => {
|
|
801
|
+
const c = toCanvas({
|
|
802
|
+
x: effectivePoints.reduce((s, p) => s + p.x, 0) / effectivePoints.length,
|
|
803
|
+
y: effectivePoints.reduce((s, p) => s + p.y, 0) / effectivePoints.length
|
|
804
|
+
}, size.w, size.h);
|
|
805
|
+
const approxWidth = Math.max(40, item.label.length * 11 * .62);
|
|
806
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Text, {
|
|
807
|
+
x: c.x - approxWidth / 2,
|
|
808
|
+
y: c.y - 7,
|
|
809
|
+
width: approxWidth,
|
|
810
|
+
align: "center",
|
|
811
|
+
text: item.label,
|
|
812
|
+
fontSize: 12,
|
|
813
|
+
fill: color,
|
|
814
|
+
stroke: "#000000",
|
|
815
|
+
strokeWidth: 3,
|
|
816
|
+
fillAfterStrokeEnabled: true,
|
|
817
|
+
fontStyle: "bold",
|
|
818
|
+
listening: false
|
|
819
|
+
});
|
|
820
|
+
})() : null]
|
|
821
|
+
}),
|
|
822
|
+
editable && !isDragging && effectivePoints.map((p, idx) => {
|
|
823
|
+
const cp = toCanvas(p, size.w, size.h);
|
|
824
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Circle, {
|
|
825
|
+
x: cp.x,
|
|
826
|
+
y: cp.y,
|
|
827
|
+
radius: 5,
|
|
828
|
+
fill: color,
|
|
829
|
+
stroke: "#ffffff",
|
|
830
|
+
strokeWidth: 1.5,
|
|
831
|
+
draggable: true,
|
|
832
|
+
onDragMove: (e) => {
|
|
833
|
+
const newPt = toNorm({
|
|
834
|
+
x: e.target.x(),
|
|
835
|
+
y: e.target.y()
|
|
836
|
+
}, size.w, size.h);
|
|
837
|
+
setDragOverride((prev) => {
|
|
838
|
+
const base = prev && prev.itemId === item.id ? prev.points : shape.points;
|
|
839
|
+
return {
|
|
840
|
+
itemId: item.id,
|
|
841
|
+
points: base.map((pp, i) => i === idx ? newPt : pp)
|
|
842
|
+
};
|
|
843
|
+
});
|
|
844
|
+
},
|
|
845
|
+
onDragEnd: (e) => {
|
|
846
|
+
const newPt = toNorm({
|
|
847
|
+
x: e.target.x(),
|
|
848
|
+
y: e.target.y()
|
|
849
|
+
}, size.w, size.h);
|
|
850
|
+
const updated = shape.points.map((pp, i) => i === idx ? newPt : pp);
|
|
851
|
+
setDragOverride({
|
|
852
|
+
itemId: item.id,
|
|
853
|
+
points: updated
|
|
854
|
+
});
|
|
855
|
+
onShapeChange(item.id, commitPoints(updated));
|
|
856
|
+
},
|
|
857
|
+
onContextMenu: (e) => {
|
|
858
|
+
e.evt.preventDefault();
|
|
859
|
+
e.cancelBubble = true;
|
|
860
|
+
if (!canRemoveVertex) return;
|
|
861
|
+
onShapeChange(item.id, commitPoints(shape.points.filter((_, i) => i !== idx)));
|
|
862
|
+
}
|
|
863
|
+
}, `pt-${idx}`);
|
|
864
|
+
}),
|
|
865
|
+
editable && !isDragging && canAddVertex && effectivePoints.length >= 2 && effectivePoints.map((p, idx) => {
|
|
866
|
+
const next = effectivePoints[(idx + 1) % effectivePoints.length];
|
|
867
|
+
const cp = toCanvas({
|
|
868
|
+
x: (p.x + next.x) / 2,
|
|
869
|
+
y: (p.y + next.y) / 2
|
|
870
|
+
}, size.w, size.h);
|
|
871
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_konva.Circle, {
|
|
872
|
+
x: cp.x,
|
|
873
|
+
y: cp.y,
|
|
874
|
+
radius: 4,
|
|
875
|
+
fill: "#ffffff",
|
|
876
|
+
stroke: color,
|
|
877
|
+
strokeWidth: 1.5,
|
|
878
|
+
opacity: .6,
|
|
879
|
+
onMouseEnter: (e) => {
|
|
880
|
+
const node = e.target;
|
|
881
|
+
node.to({
|
|
882
|
+
radius: 6,
|
|
883
|
+
opacity: 1,
|
|
884
|
+
duration: .1
|
|
885
|
+
});
|
|
886
|
+
const stage = node.getStage();
|
|
887
|
+
if (stage) stage.container().style.cursor = "copy";
|
|
888
|
+
},
|
|
889
|
+
onMouseLeave: (e) => {
|
|
890
|
+
const node = e.target;
|
|
891
|
+
node.to({
|
|
892
|
+
radius: 4,
|
|
893
|
+
opacity: .6,
|
|
894
|
+
duration: .1
|
|
895
|
+
});
|
|
896
|
+
const stage = node.getStage();
|
|
897
|
+
if (stage) stage.container().style.cursor = isDrawing ? "crosshair" : "default";
|
|
898
|
+
},
|
|
899
|
+
onClick: (e) => {
|
|
900
|
+
e.cancelBubble = true;
|
|
901
|
+
onShapeChange(item.id, commitPoints(insertMidpoint(shape.points, idx)));
|
|
902
|
+
}
|
|
903
|
+
}, `mid-${idx}`);
|
|
904
|
+
})
|
|
905
|
+
]
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* Memoised export. The Konva scene is expensive to re-evaluate (many nodes per
|
|
910
|
+
* item + per-item drag-bound closures) and overlay parents re-render on every
|
|
911
|
+
* detection/motion event. Mirrors ZoneCanvas's `memo`.
|
|
912
|
+
*/
|
|
913
|
+
var MaskShapeCanvas = (0, react.memo)(MaskShapeCanvasImpl);
|
|
914
|
+
//#endregion
|
|
915
|
+
exports.MaskShapeCanvas = MaskShapeCanvas;
|