floor-editor-ts 1.3.6 → 1.3.7

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.
@@ -1,4 +1,4 @@
1
- import { Project } from '../../lib/models/types';
1
+ import { Floor, Project } from '../../lib/models/types';
2
2
  /** Camera from host app — used to assign floor camera furniture via select. */
3
3
  export interface SiteCameraOption {
4
4
  serial: string;
@@ -16,6 +16,8 @@ export type AssignedCamera = {
16
16
  /** Flatten host camera object into string props for furniture + UI. */
17
17
  export declare function assignedCameraToProps(cam: AssignedCamera): Record<string, string>;
18
18
  export declare function formatCameraPropLabel(key: string): string;
19
+ /** How secondary TopBar tools (grid/furniture/history/area/settings) are shown. */
20
+ export type HeaderToolsMode = "full" | "compact" | "auto";
19
21
  export interface FloorEditorConfig {
20
22
  viewOnly: boolean;
21
23
  floorMaxWidth: number;
@@ -36,9 +38,20 @@ export interface FloorEditorConfig {
36
38
  canvasBackground?: string;
37
39
  /** Fill under the floor plan (inside wall bounds) */
38
40
  floorPlateBackground?: string;
41
+ /**
42
+ * TopBar secondary tools layout:
43
+ * - `full` — separate icons (default)
44
+ * - `compact` — always fold into one Settings menu
45
+ * - `auto` — fold when header is narrow
46
+ */
47
+ headerToolsMode?: HeaderToolsMode;
39
48
  }
40
49
  export declare const DEFAULT_CONFIG: FloorEditorConfig;
41
50
  export declare function normalizeConfig(value: Partial<FloorEditorConfig> | null | undefined): FloorEditorConfig;
42
- export declare function normalizeFloorData(data: Partial<Project> | null | undefined): Project;
51
+ /**
52
+ * Accepts a full Project, `{ floors }`, a floors array, or a single Floor.
53
+ * Furniture (incl. cameras) is preserved as given.
54
+ */
55
+ export declare function normalizeFloorData(data: Partial<Project> | Floor[] | Floor | null | undefined): Project;
43
56
  /** Strip runtime-only fields before persisting or dispatching floor:save. */
44
57
  export declare function exportProjectForSave(project: Project): Project;
@@ -1,4 +1,6 @@
1
1
  import { AssignedCamera } from '../../../lib/packageDefaults';
2
+ /** Call when host replaces floorData so load doesn't fight a stale sync set. */
3
+ export declare function resetAssignedCamerasSyncState(): void;
2
4
  /**
3
5
  * Sync host `assignedCameras` onto the active floor.
4
6
  * - Adds missing serials at floor center (non-overlapping)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "floor-editor-ts",
3
3
  "private": false,
4
- "version": "1.3.6",
4
+ "version": "1.3.7",
5
5
  "type": "module",
6
6
  "main": "./dist/floor-editor.es.js",
7
7
  "module": "./dist/floor-editor.es.js",