@nice2dev/ui-buildings 1.1.6 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -218,6 +218,13 @@ export declare interface BuildingZone {
218
218
  deviceIds?: BuildingId[];
219
219
  }
220
220
 
221
+ export declare interface BuildingZoneOccupancy {
222
+ zoneId: BuildingId;
223
+ occupied: boolean;
224
+ count?: number;
225
+ lastUpdated: string;
226
+ }
227
+
221
228
  export declare interface CameraState {
222
229
  streaming: boolean;
223
230
  recording: boolean;
@@ -257,7 +264,7 @@ declare interface DeviceControlAction {
257
264
  transitionMs?: number;
258
265
  }
259
266
 
260
- export declare type DeviceProtocol = 'zigbee' | 'z-wave' | 'wifi' | 'bluetooth' | 'matter' | 'thread' | 'knx' | 'modbus' | 'cloud' | 'local_api' | 'other';
267
+ export declare type DeviceProtocol = 'zigbee' | 'z-wave' | 'wifi' | 'bluetooth' | 'matter' | 'thread' | 'knx' | 'modbus' | 'mqtt' | 'cloud' | 'local_api' | 'other';
261
268
 
262
269
  declare type DeviceState = LightState | ThermostatState | LockState | BlindState | SwitchState | CameraState | AlarmState | SensorState | ClimateState | MediaPlayerState | EnergyMeterState | Record<string, unknown>;
263
270
 
@@ -525,7 +532,10 @@ declare interface NavigationRoute {
525
532
  export declare const NiceAutomationEditor: default_2.FC<NiceAutomationEditorProps>;
526
533
 
527
534
  export declare interface NiceAutomationEditorProps {
528
- automations: BuildingAutomation[];
535
+ /** Automations (controlled). Omit it to let the editor keep its own. */
536
+ automations?: BuildingAutomation[];
537
+ /** Initial automations when uncontrolled. */
538
+ defaultAutomations?: BuildingAutomation[];
529
539
  devices?: BuildingDevice[];
530
540
  zones?: BuildingZone[];
531
541
  scenes?: BuildingScene[];
@@ -588,7 +598,10 @@ export declare interface NiceDeviceControlProps {
588
598
  export declare const NiceFloorPlanEditor: default_2.FC<NiceFloorPlanEditorProps>;
589
599
 
590
600
  export declare interface NiceFloorPlanEditorProps {
591
- floors: FloorPlanFloor[];
601
+ /** Floors (controlled). Omit it to let the editor keep its own. */
602
+ floors?: FloorPlanFloor[];
603
+ /** Initial floors when uncontrolled. */
604
+ defaultFloors?: FloorPlanFloor[];
592
605
  devices?: BuildingDevice[];
593
606
  onFloorChange?: (floors: FloorPlanFloor[]) => void;
594
607
  onDeviceMove?: (deviceId: BuildingId, floorId: BuildingId, roomId: BuildingId | null, position: Point2D) => void;
@@ -627,7 +640,10 @@ export declare interface NiceLightControlProps {
627
640
  export declare const NiceSceneEditor: default_2.FC<NiceSceneEditorProps>;
628
641
 
629
642
  export declare interface NiceSceneEditorProps {
630
- scenes: BuildingScene[];
643
+ /** Scenes (controlled). Omit it to let the editor keep its own. */
644
+ scenes?: BuildingScene[];
645
+ /** Initial scenes when uncontrolled. */
646
+ defaultScenes?: BuildingScene[];
631
647
  devices?: BuildingDevice[];
632
648
  zones?: BuildingZone[];
633
649
  /** Currently active scene ids (highlighted). */
@@ -832,7 +848,7 @@ export declare interface OccupancySensorState {
832
848
  export declare interface OccupancyStats {
833
849
  totalOccupied: number;
834
850
  totalZones: number;
835
- byZone: ZoneOccupancy[];
851
+ byZone: BuildingZoneOccupancy[];
836
852
  peakToday?: number;
837
853
  peakTime?: string;
838
854
  hourlyToday?: number[];
@@ -1188,12 +1204,12 @@ export declare interface ViewportState {
1188
1204
  snapModes: SnapMode[];
1189
1205
  }
1190
1206
 
1191
- export declare interface ZoneOccupancy {
1192
- zoneId: BuildingId;
1193
- occupied: boolean;
1194
- count?: number;
1195
- lastUpdated: string;
1196
- }
1207
+ /**
1208
+ * @deprecated Use `BuildingZoneOccupancy`. `@nice2dev/events` exports a different
1209
+ * `ZoneOccupancy` (venue capacity), so importing both packages collided; this alias is
1210
+ * removed in 1.2.0.
1211
+ */
1212
+ export declare type ZoneOccupancy = BuildingZoneOccupancy;
1197
1213
 
1198
1214
  export declare type ZoneType = 'living_room' | 'bedroom' | 'master_bedroom' | 'kids_room' | 'bathroom' | 'kitchen' | 'dining_room' | 'hallway' | 'office' | 'garage' | 'basement' | 'attic' | 'balcony' | 'garden' | 'laundry' | 'storage' | 'gym' | 'cinema' | 'open_office' | 'private_office' | 'meeting_room' | 'boardroom' | 'reception' | 'waiting_area' | 'server_room' | 'it_room' | 'break_room' | 'lobby' | 'corridor' | 'stairwell' | 'parking' | 'cafeteria' | 'mechanical_room' | 'other';
1199
1215