@archilogic/extension-sdk 0.2.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.
@@ -0,0 +1,3541 @@
1
+ declare class AnnotationCreate extends OperationBase {
2
+ type: typeof AnnotationCreateTypeValue;
3
+ value: LayoutAnnotationJson;
4
+ constructor(value: LayoutAnnotationJson);
5
+ do(layout: SpaceGraphLayout): void;
6
+ undo(layout: SpaceGraphLayout): void;
7
+ }
8
+
9
+ declare type AnnotationCreateOperationJson = Pick<AnnotationCreate, 'type' | 'value'>;
10
+
11
+ declare const AnnotationCreateTypeValue: "operation:annotationCreate";
12
+
13
+ declare class AnnotationRemove extends OperationBase {
14
+ type: typeof AnnotationRemoveTypeValue;
15
+ previousValue: LayoutAnnotationJson;
16
+ constructor(node: LayoutAnnotation | string, previousValue?: LayoutAnnotationJson);
17
+ do(layout: SpaceGraphLayout): void;
18
+ undo(layout: SpaceGraphLayout): void;
19
+ }
20
+
21
+ declare type AnnotationRemoveOperationJson = Pick<AnnotationRemove, 'nodeId' | 'type'> & Partial<Pick<AnnotationRemove, 'previousValue'>>;
22
+
23
+ declare const AnnotationRemoveTypeValue: "operation:annotationRemove";
24
+
25
+ declare class AnnotationUpdate extends OperationBase {
26
+ type: typeof AnnotationUpdateTypeValue;
27
+ value: AnnotationUpdateValue;
28
+ constructor(node: LayoutAnnotation | string, value: AnnotationUpdateValue, previousValue?: AnnotationUpdateValue);
29
+ private setPreviousValue;
30
+ private update;
31
+ do(layout: SpaceGraphLayout): void;
32
+ undo(layout: SpaceGraphLayout): void;
33
+ }
34
+
35
+ declare type AnnotationUpdateOperationJson = Pick<AnnotationUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<AnnotationUpdate, 'previousValue'>>;
36
+
37
+ declare const AnnotationUpdateTypeValue: "operation:annotationUpdate";
38
+
39
+ declare type AnnotationUpdateValue = Partial<LayoutAnnotationJson> & {
40
+ parameters?: Partial<LayoutAnnotationJson['parameters']>;
41
+ };
42
+
43
+ declare interface ArcCurve extends CurveBase {
44
+ type: ArcCurveType;
45
+ radius: number;
46
+ startAngle: number;
47
+ endAngle: number;
48
+ }
49
+
50
+ declare interface ArcCurve_2 extends BaseShape {
51
+ type: 'curve:arc';
52
+ position: Vector2_2;
53
+ radius: number;
54
+ startAngle: number;
55
+ endAngle: number;
56
+ }
57
+
58
+ declare type ArcCurveType = typeof ArcCurveTypeValue;
59
+
60
+ declare const ArcCurveTypeValue = "curve:arc";
61
+
62
+ /**
63
+ * Background of the floor plan canvas
64
+ */
65
+ declare type BackgroundOptions = {
66
+ /** background-color: hex code for color, set to 'transparent' for transparent background */
67
+ color?: string;
68
+ /** show a dynamic grid */
69
+ showGrid?: boolean;
70
+ };
71
+
72
+ declare interface BaseData {
73
+ id: string;
74
+ name: string;
75
+ type: string;
76
+ customId: string;
77
+ customAttributes: Record<string, string | number | boolean>;
78
+ /** dimensions in meters */
79
+ dimensions: {
80
+ width: number;
81
+ length: number;
82
+ height: number;
83
+ };
84
+ /**
85
+ * dimensions in meters
86
+ * @example
87
+ * {
88
+ * min: [0, 0, 0],
89
+ * max: [1, 2, 1],
90
+ * transform: {
91
+ * position: [0, 0, 0],
92
+ * rotation: 0,
93
+ * rotationAxis: [0, 1, 0]
94
+ * }
95
+ * }
96
+ * */
97
+ boundingBox: TransformBoundingBox3d;
98
+ /** */
99
+ boundingBoxContour: Vector2[];
100
+ }
101
+
102
+ declare interface BaseShape {
103
+ type: string;
104
+ style?: ShapeStyle;
105
+ }
106
+
107
+ declare interface BezierCurve extends BaseShape {
108
+ type: 'curve:quadraticBezier';
109
+ points: Polygon;
110
+ }
111
+
112
+ declare type BoundingBox3d = {
113
+ min: Vector3;
114
+ max: Vector3;
115
+ };
116
+
117
+ declare class CallOptions {
118
+ #private;
119
+ readonly transferables?: Transferable[];
120
+ readonly timeout?: number;
121
+ constructor(options?: {
122
+ transferables?: Transferable[];
123
+ timeout?: number;
124
+ });
125
+ }
126
+
127
+ declare interface CircleCurve extends CurveBase {
128
+ type: CircleCurveType;
129
+ radius: number;
130
+ }
131
+
132
+ declare interface CircleCurve_2 extends BaseShape {
133
+ type: 'curve:circle';
134
+ position: Vector2_2;
135
+ radius: number;
136
+ }
137
+
138
+ declare type CircleCurveType = typeof CircleCurveTypeValue;
139
+
140
+ declare const CircleCurveTypeValue = "curve:circle";
141
+
142
+ declare type ClosedCurve = RectangleCurve | PolygonCurve | PolygonWithHolesCurve | CircleCurve | CompositeCurve;
143
+
144
+ declare type ClosedCurveType = RectangleCurveType | PolygonCurveType | PolygonWithHolesCurveType | CircleCurveType | CompositeCurveType;
145
+
146
+ declare interface CommonParameters {
147
+ materials: LayoutBeamMaterials;
148
+ }
149
+
150
+ declare interface CommonParameters_2 {
151
+ counterHeight: number;
152
+ materials: LayoutCaseworkMaterials;
153
+ }
154
+
155
+ declare interface CommonParameters_3 {
156
+ /** thickness of the frame in x direction */
157
+ frameThickness: number;
158
+ /** depth of the frame in z direction */
159
+ frameDepth: number;
160
+ doorType: DoorType;
161
+ doorAngle: number;
162
+ hardware: boolean;
163
+ hingeSide: HingeSide;
164
+ doorSide: DoorSide;
165
+ materials: LayoutDoorMaterials;
166
+ }
167
+
168
+ declare interface CommonParameters_4 {
169
+ wallCabinet: boolean;
170
+ leftHighCabinetCount: number;
171
+ rightHighCabinetCount: number;
172
+ sinkElementSlot: number;
173
+ cooktopElementSlot: number;
174
+ ovenElementSlot: number;
175
+ materials: LayoutKitchenMaterials;
176
+ }
177
+
178
+ declare interface CommonParameters_5 {
179
+ segmentCount: number;
180
+ segmentLength: number;
181
+ materials: LayoutRailingMaterials;
182
+ }
183
+
184
+ declare interface CommonParameters_6 {
185
+ materials: LayoutRampMaterials;
186
+ }
187
+
188
+ declare interface CommonParameters_7 {
189
+ /** thickness of the frame in x direction */
190
+ frameThickness: number;
191
+ /** depth of the frame in z direction */
192
+ frameDepth: number;
193
+ panelLength: number;
194
+ panelCount: number;
195
+ materials: LayoutWindowMaterials;
196
+ }
197
+
198
+ declare type CommonStairsParameters = {
199
+ railing: 'none' | 'left' | 'right' | 'both';
200
+ materials: LayoutStairsMaterials;
201
+ };
202
+
203
+ declare interface CompositeCurve extends CurveBase {
204
+ type: CompositeCurveType;
205
+ segments: OpenCurve[];
206
+ }
207
+
208
+ declare interface CompositeCurve_2 extends BaseShape {
209
+ type: 'curve:composite';
210
+ segments: OpenCurves[];
211
+ }
212
+
213
+ declare type CompositeCurveType = typeof CompositeCurveTypeValue;
214
+
215
+ declare const CompositeCurveTypeValue = "curve:composite";
216
+
217
+ /**
218
+ * An object representing the connection as a result of calling connect().
219
+ */
220
+ export declare type Connection<TMethods extends Methods = Methods> = {
221
+ /**
222
+ * A promise which will be resolved once the connection has been established.
223
+ */
224
+ promise: Promise<RemoteProxy<TMethods>>;
225
+ /**
226
+ * A method that, when called, will disconnect any communication.
227
+ * You may call this even before a connection has been established.
228
+ */
229
+ destroy: () => void;
230
+ };
231
+
232
+ /**
233
+ * @example
234
+ * const pluginConnection = createPluginConnection(methods)
235
+ * const pluginApi = await pluginConnection.promise
236
+ * await pluginApi.onPluginConnect({ floorMetaData })
237
+ * pluginConnection.destroy()
238
+ */
239
+ export declare const createExtensionConnection: (iframe: HTMLIFrameElement, methods: any) => Connection<ExtensionApi>;
240
+
241
+ /**
242
+ * @example
243
+ * const hostApi = createHostConnection({
244
+ * onPluginConnect: () => {}
245
+ * })
246
+ * const spaceResponse = await hostApi.getSpaces()
247
+ */
248
+ export declare const createHostConnection: (methods?: Partial<ExtensionApi>) => HostApi;
249
+
250
+ declare class CuboidGeometry extends ParametricGeometryBase {
251
+ type: CuboidGeometryType;
252
+ dimensions: Vector3;
253
+ constructor(id: string);
254
+ }
255
+
256
+ declare interface CuboidGeometryJson extends ParametricGeometryBaseJson {
257
+ type: CuboidGeometryType;
258
+ dimensions: Vector3;
259
+ }
260
+
261
+ declare type CuboidGeometryType = typeof CuboidGeometryTypeValue;
262
+
263
+ declare const CuboidGeometryTypeValue = "geometry:cuboid";
264
+
265
+ declare interface CurveBase {
266
+ type: CurveType;
267
+ }
268
+
269
+ declare type CurveType = ClosedCurveType | OpenCurveType;
270
+
271
+ declare class CustomAttributeCreate extends OperationBase {
272
+ type: typeof CustomAttributeCreateTypeValue;
273
+ value: CustomAttributeCreateValue;
274
+ constructor(value: CustomAttributeCreateValue);
275
+ do(layout: SpaceGraphLayout): void;
276
+ undo(layout: SpaceGraphLayout): void;
277
+ }
278
+
279
+ declare type CustomAttributeCreateOperationJson = Pick<CustomAttributeCreate, 'type' | 'value'>;
280
+
281
+ declare const CustomAttributeCreateTypeValue = "operation:customAttributeCreate";
282
+
283
+ declare type CustomAttributeCreateValue = SpaceGraphCustomAttributeJson;
284
+
285
+ declare type CustomAttributeInputType = 'Text' | 'Number' | 'Boolean' | 'Integer' | 'Select';
286
+
287
+ declare class CustomAttributeRemove extends OperationBase {
288
+ type: typeof CustomAttributeRemoveTypeValue;
289
+ value: CustomAttributeRemoveValue;
290
+ previousValue: CustomAttributeRemoveValue;
291
+ constructor(node: SpaceGraphCustomAttribute | string, previousValue?: CustomAttributeRemoveValue);
292
+ do(layout: SpaceGraphLayout): void;
293
+ undo(layout: SpaceGraphLayout): void;
294
+ }
295
+
296
+ declare type CustomAttributeRemoveOperationJson = Pick<CustomAttributeRemove, 'nodeId' | 'type'> & Partial<Pick<CustomAttributeRemove, 'previousValue'>>;
297
+
298
+ declare const CustomAttributeRemoveTypeValue = "operation:customAttributeRemove";
299
+
300
+ declare type CustomAttributeRemoveValue = SpaceGraphCustomAttributeJson;
301
+
302
+ declare type CustomAttributeResourceType = 'building' | 'element' | 'floor' | 'layout' | 'product' | 'space';
303
+
304
+ declare type CustomAttributeSchema = CustomAttributeSchemaText | CustomAttributeSchemaSelect | CustomAttributeSchemaNumber | CustomAttributeSchemaInteger | CustomAttributeSchemaBoolean;
305
+
306
+ declare type CustomAttributeSchemaBoolean = {
307
+ type: 'boolean';
308
+ };
309
+
310
+ declare type CustomAttributeSchemaInteger = {
311
+ type: 'integer';
312
+ };
313
+
314
+ declare type CustomAttributeSchemaNumber = {
315
+ type: 'number';
316
+ };
317
+
318
+ declare type CustomAttributeSchemaSelect = {
319
+ type: 'string';
320
+ enum: string[];
321
+ };
322
+
323
+ declare type CustomAttributeSchemaText = {
324
+ type: 'string';
325
+ };
326
+
327
+ declare class CustomAttributeUpdate extends OperationBase {
328
+ type: typeof CustomAttributeUpdateTypeValue;
329
+ value: CustomAttributeUpdateValue;
330
+ constructor(node: SpaceGraphCustomAttribute | string, value: CustomAttributeUpdateValue, previousValue?: CustomAttributeUpdateValue);
331
+ private setPreviousValue;
332
+ do(layout: SpaceGraphLayout): void;
333
+ undo(layout: SpaceGraphLayout): void;
334
+ }
335
+
336
+ declare type CustomAttributeUpdateOperationJson = Pick<CustomAttributeUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<CustomAttributeUpdate, 'previousValue'>>;
337
+
338
+ declare const CustomAttributeUpdateTypeValue = "operation:customAttributeUpdate";
339
+
340
+ declare type CustomAttributeUpdateValue = Partial<SpaceGraphCustomAttributeJson>;
341
+
342
+ /** @deprecated */
343
+ declare type CustomAttributeValueType = 'Text' | 'Number' | 'Boolean' | 'Schema';
344
+
345
+ declare type CustomStairsParameters = {
346
+ stairsType: CustomStairsType;
347
+ /** @minimum 0.01 */
348
+ height: number;
349
+ /** @minimum 0.01 */
350
+ stepWidth: number;
351
+ } & CommonStairsParameters;
352
+
353
+ declare type CustomStairsParametersJson = Partial<CustomStairsParameters>;
354
+
355
+ declare type CustomStairsType = 'custom';
356
+
357
+ declare type DimensionParameters = {
358
+ /** @minimum 0.01 */
359
+ length: number;
360
+ /** @minimum 0.01 */
361
+ width: number;
362
+ /** @minimum 0.01 */
363
+ height: number;
364
+ };
365
+
366
+ declare interface DimensionParameters_2 {
367
+ /** @minimum 0.01 */
368
+ length: number;
369
+ /** @minimum 0.01 */
370
+ height: number;
371
+ }
372
+
373
+ declare interface DimensionParameters_3 {
374
+ /** @minimum 0.01 */
375
+ length: number;
376
+ /** @minimum 0.01 */
377
+ height: number;
378
+ }
379
+
380
+ declare type DoorSide = 'side1' | 'side2';
381
+
382
+ declare type DoorType = 'singleSwing' | 'doubleSwing' | 'slidingDoor' | 'opening' | 'elevatorDoor' | 'garageDoor';
383
+
384
+ declare enum DxfUnits {
385
+ unitLess = 0,
386
+ inches = 1,
387
+ feet = 2,
388
+ miles = 3,
389
+ millimeters = 4,
390
+ centimeters = 5,
391
+ meters = 6,
392
+ kilometers = 7
393
+ }
394
+
395
+ declare type DxfUnitsString = keyof typeof DxfUnits;
396
+
397
+ declare interface EdgeCanSplitOptions {
398
+ minimumLength?: number;
399
+ }
400
+
401
+ declare class EdgeConnect extends OperationBase {
402
+ type: typeof EdgeConnectTypeValue;
403
+ value: EdgeConnectValue;
404
+ previousVertex: {
405
+ [edgeId: string]: {
406
+ start: SpatialGraphVertexJson | null;
407
+ end: SpatialGraphVertexJson | null;
408
+ };
409
+ };
410
+ newEdgeId: {
411
+ [originEdgeId: string]: string;
412
+ };
413
+ constructor(edge: SpatialGraphEdge | string, value: EdgeConnectValue);
414
+ isInRange(value: number, range: [number, number]): boolean;
415
+ splitEdge(layout: SpaceGraphLayout, edgeId: string, u: number): SpatialGraphVertex;
416
+ undoSplitEdge(layout: SpaceGraphLayout, edgeId: string): void;
417
+ extendEdge(layout: SpaceGraphLayout, edgeId: string, u: number, point: Vector2, vertex?: SpatialGraphVertex): SpatialGraphVertex;
418
+ undoExtendEdge(layout: SpaceGraphLayout, edgeId: string): void;
419
+ safeRemoveVertexById(layout: SpaceGraphLayout, vertexId: string): void;
420
+ do(layout: SpaceGraphLayout): void;
421
+ undo(layout: SpaceGraphLayout): void;
422
+ }
423
+
424
+ declare type EdgeConnectOperationJson = Pick<EdgeConnect, 'nodeId' | 'type' | 'value'>;
425
+
426
+ declare const EdgeConnectTypeValue: "operation:edgeConnect";
427
+
428
+ declare type EdgeConnectValue = {
429
+ edgeId: string;
430
+ };
431
+
432
+ declare class EdgeCreate extends OperationBase {
433
+ type: typeof EdgeCreateTypeValue;
434
+ value: EdgeCreateValueType;
435
+ constructor(value: EdgeCreateValueType);
436
+ do(layout: SpaceGraphLayout): void;
437
+ undo(layout: SpaceGraphLayout): void;
438
+ }
439
+
440
+ declare type EdgeCreateOperationJson = Pick<EdgeCreate, 'value' | 'type'>;
441
+
442
+ declare const EdgeCreateTypeValue: "operation:edgeCreate";
443
+
444
+ declare type EdgeCreateValueType = Omit<SpatialGraphEdgeJson, 'type'>;
445
+
446
+ declare type EdgeElementMap = {
447
+ 'element:curtainWall': LayoutCurtainWall;
448
+ 'element:spaceDivider': LayoutSpaceDivider;
449
+ 'element:wall': LayoutWall;
450
+ };
451
+
452
+ declare class EdgeMerge extends OperationBase {
453
+ type: typeof EdgeMergeTypeValue;
454
+ value: EdgeMergeValue;
455
+ previousValue: {
456
+ splitEdgeU: number;
457
+ elementId?: string;
458
+ };
459
+ constructor(edge: SpatialGraphEdge | string, value: EdgeMergeValue, previousValue?: {
460
+ splitEdgeU: number;
461
+ });
462
+ do(layout: SpaceGraphLayout): void;
463
+ undo(layout: SpaceGraphLayout): void;
464
+ }
465
+
466
+ declare type EdgeMergeOperationJson = Pick<EdgeMerge, 'nodeId' | 'type' | 'value'> & Partial<Pick<EdgeMerge, 'previousValue'>>;
467
+
468
+ declare const EdgeMergeTypeValue: "operation:edgeMerge";
469
+
470
+ declare type EdgeMergeValue = {
471
+ vertexId: string;
472
+ edgeId: string;
473
+ };
474
+
475
+ declare class EdgeRemove extends OperationBase {
476
+ type: typeof EdgeRemoveTypeValue;
477
+ previousValue: EdgeVertexValue;
478
+ constructor(edge: SpatialGraphEdge | string, previousValue?: EdgeVertexValue);
479
+ do(layout: SpaceGraphLayout): void;
480
+ undo(layout: SpaceGraphLayout): void;
481
+ }
482
+
483
+ declare type EdgeRemoveOperationJson = Pick<EdgeRemove, 'nodeId' | 'type'> & Partial<Pick<EdgeRemove, 'previousValue'>>;
484
+
485
+ declare const EdgeRemoveTypeValue: "operation:edgeRemove";
486
+
487
+ declare class EdgeReplace extends OperationBase {
488
+ type: typeof EdgeReplaceTypeValue;
489
+ value: EdgeReplaceValue;
490
+ previousValue: SpatialGraphEdgeJson;
491
+ constructor(edge: SpatialGraphEdge | string, value: EdgeReplaceValue, previousValue?: SpatialGraphEdgeJson);
492
+ do(layout: SpaceGraphLayout): void;
493
+ undo(layout: SpaceGraphLayout): void;
494
+ }
495
+
496
+ declare type EdgeReplaceOperationJson = Pick<EdgeReplace, 'nodeId' | 'type' | 'value'> & Partial<Pick<EdgeReplace, 'previousValue'>>;
497
+
498
+ declare const EdgeReplaceTypeValue: "operation:edgeReplace";
499
+
500
+ declare type EdgeReplaceValue = Pick<SpatialGraphEdgeJson, 'id'> & Partial<SpatialGraphEdgeJson>;
501
+
502
+ declare class EdgeSplit extends OperationBase {
503
+ type: typeof EdgeSplitTypeValue;
504
+ value: EdgeSplitValue;
505
+ constructor(edge: SpatialGraphEdge | string, value: EdgeSplitValue);
506
+ do(layout: SpaceGraphLayout): void;
507
+ undo(layout: SpaceGraphLayout): void;
508
+ }
509
+
510
+ declare type EdgeSplitOperationJson = Pick<EdgeSplit, 'nodeId' | 'type' | 'value'>;
511
+
512
+ declare interface EdgeSplitOptions {
513
+ vertexId?: string;
514
+ edgeId?: string;
515
+ elementId?: string;
516
+ }
517
+
518
+ declare interface EdgeSplitReturnValue {
519
+ vertex: SpatialGraphVertex;
520
+ edge: SpatialGraphEdge;
521
+ element?: LayoutEdgeElement;
522
+ }
523
+
524
+ declare const EdgeSplitTypeValue: "operation:edgeSplit";
525
+
526
+ declare type EdgeSplitValue = {
527
+ splitEdgeU: number;
528
+ newVertexId: string;
529
+ newEdgeId: string;
530
+ newElementId?: string;
531
+ updateSpaceBoundaries?: boolean;
532
+ };
533
+
534
+ declare type EdgeType = 'graph:adjacentTo' | 'graph:connectedTo';
535
+
536
+ declare class EdgeUpdate extends OperationBase {
537
+ type: typeof EdgeUpdateTypeValue;
538
+ value: EdgeVertexValue;
539
+ previousValue: EdgeVertexValue;
540
+ constructor(edge: SpatialGraphEdge | string, value: EdgeVertexValue, previousValue?: EdgeVertexValue);
541
+ private setPreviousValue;
542
+ private update;
543
+ do(layout: SpaceGraphLayout): void;
544
+ undo(layout: SpaceGraphLayout): void;
545
+ }
546
+
547
+ declare type EdgeUpdateOperationJson = Pick<EdgeUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<EdgeUpdate, 'previousValue'>>;
548
+
549
+ declare const EdgeUpdateTypeValue: "operation:edgeUpdate";
550
+
551
+ declare type EdgeVertexValue = Required<Pick<SpatialGraphEdgeJson, 'vertices'>> & Partial<SpatialGraphEdgeJson>;
552
+
553
+ declare class ElementCreate extends OperationBase {
554
+ type: typeof ElementCreateTypeValue;
555
+ value: LayoutElementJson;
556
+ parentId?: string;
557
+ constructor(value: LayoutElementJson, parentId?: string);
558
+ do(layout: SpaceGraphLayout): void;
559
+ undo(layout: SpaceGraphLayout): void;
560
+ }
561
+
562
+ declare type ElementCreateOperationJson = Pick<ElementCreate, 'type' | 'value' | 'parentId'>;
563
+
564
+ declare const ElementCreateTypeValue: "operation:elementCreate";
565
+
566
+ export declare interface ElementData extends BaseData {
567
+ type: LayoutElementJson['type'];
568
+ parameters: LayoutElementJson['parameters'];
569
+ product: ProductData;
570
+ elements: ElementData[];
571
+ }
572
+
573
+ declare class ElementRemove extends OperationBase {
574
+ type: typeof ElementRemoveTypeValue;
575
+ previousValue: LayoutElementJson;
576
+ parentId?: string;
577
+ constructor(element: LayoutElement | string, previousValue?: ElementUpdateValue);
578
+ private setPreviousValue;
579
+ do(layout: SpaceGraphLayout): void;
580
+ undo(layout: SpaceGraphLayout): void;
581
+ }
582
+
583
+ declare type ElementRemoveOperationJson = Pick<ElementRemove, 'nodeId' | 'type'> & Partial<Pick<ElementUpdate, 'previousValue'>>;
584
+
585
+ declare const ElementRemoveTypeValue: "operation:elementRemove";
586
+
587
+ declare class ElementUpdate extends OperationBase {
588
+ type: typeof ElementUpdateTypeValue;
589
+ value: ElementUpdateValue;
590
+ constructor(element: LayoutElement | string, value: ElementUpdateValue, previousValue?: ElementUpdateValue);
591
+ private setPreviousValue;
592
+ private update;
593
+ do(layout: SpaceGraphLayout): void;
594
+ undo(layout: SpaceGraphLayout): void;
595
+ }
596
+
597
+ declare type ElementUpdateOperationJson = Pick<ElementUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<ElementUpdate, 'previousValue'>>;
598
+
599
+ declare const ElementUpdateTypeValue: "operation:elementUpdate";
600
+
601
+ declare type ElementUpdateValue = Partial<LayoutElementJson> & {
602
+ parameters?: Partial<LayoutElementJson['parameters']>;
603
+ };
604
+
605
+ declare interface EntityResponse extends HostResponse {
606
+ data: {
607
+ id: string;
608
+ };
609
+ }
610
+
611
+ export declare type ExtensionApi = {
612
+ onPluginConnect({ floorMetaData }: {
613
+ floorMetaData: any;
614
+ }): void;
615
+ onPluginDestroy(): void;
616
+ onLayoutChange(args: any): void;
617
+ onSelectionChange({ selectedNodes }: {
618
+ selectedNodes: {
619
+ id: string;
620
+ type: string;
621
+ }[];
622
+ }): void;
623
+ onGraphicDrag({ position, id }: {
624
+ position: [number, number];
625
+ id: string;
626
+ }): void;
627
+ onCanvasClick({ position, nodeId }: {
628
+ position: [number, number];
629
+ nodeId?: string;
630
+ }): void;
631
+ };
632
+
633
+ declare type ExtractValueFromReply<R> = R extends Reply ? Awaited<R['value']> : R;
634
+
635
+ declare class ExtrusionGeometry extends ParametricGeometryBase {
636
+ type: ExtrusionGeometryType;
637
+ profile: ClosedCurve;
638
+ height: number;
639
+ constructor(id: string, profile: ClosedCurve);
640
+ }
641
+
642
+ declare interface ExtrusionGeometryJson extends ParametricGeometryBaseJson {
643
+ type: ExtrusionGeometryType;
644
+ profile: ClosedCurve;
645
+ height: number;
646
+ }
647
+
648
+ declare type ExtrusionGeometryType = typeof ExtrusionGeometryTypeValue;
649
+
650
+ declare const ExtrusionGeometryTypeValue = "geometry:extrusion";
651
+
652
+ /**
653
+ * This is the place to give the floor plan your own style
654
+ */
655
+ declare type FloorPlanTheme = {
656
+ /** define the background */
657
+ background?: BackgroundOptions;
658
+ /** wall contours are merged to one continuous outline, needed if you want white walls */
659
+ wallContours?: boolean;
660
+ /** render assets with textures rather than solid colors */
661
+ showAssetTextures?: boolean;
662
+ fontFamily?: string;
663
+ elements?: {
664
+ byId?: Record<string, ShapeStyle>;
665
+ floorPlan?: {
666
+ grayscale: boolean;
667
+ };
668
+ roomStamp?: {
669
+ /** show the area information in room stamps */
670
+ roomStampDisplay?: ('usage' | 'area' | 'customId' | 'name' | 'id' | ['customAttribute', string])[];
671
+ /** text color for room stamps */
672
+ text?: Rgb;
673
+ /** whether the room stamp text should have an outline to assist with contrast issues */
674
+ textOutline?: boolean;
675
+ };
676
+ 'element:asset'?: ShapeStyle;
677
+ 'element:beam'?: ShapeStyle;
678
+ 'element:boundaryWall'?: ShapeStyle;
679
+ 'element:casework'?: ShapeStyle;
680
+ 'element:ceiling'?: ShapeStyle;
681
+ 'element:column'?: ShapeStyle;
682
+ 'element:curtainWall'?: ShapeStyle;
683
+ 'element:door'?: ShapeStyle;
684
+ 'element:floor'?: ShapeStyle;
685
+ 'element:generic'?: ShapeStyle;
686
+ 'element:kitchen'?: ShapeStyle;
687
+ 'element:opening'?: ShapeStyle;
688
+ 'element:railing'?: ShapeStyle;
689
+ 'element:ramp'?: ShapeStyle;
690
+ 'element:roof'?: ShapeStyle;
691
+ 'element:slab'?: ShapeStyle;
692
+ 'element:spaceDivider'?: ShapeStyle;
693
+ 'element:stairFlight'?: ShapeStyle;
694
+ 'element:stairs'?: ShapeStyle;
695
+ 'element:wall'?: ShapeStyle;
696
+ 'element:window'?: ShapeStyle;
697
+ 'layout:space'?: SpaceShapeStyle;
698
+ 'spatialGraph:edge'?: ShapeStyle;
699
+ };
700
+ };
701
+
702
+ declare class GeometryBase extends SpaceGraphNodeBase {
703
+ type: SpaceGraphGeometryType;
704
+ position: PositionEntry;
705
+ rotation: RotationEntry;
706
+ rotationAxis: Vector3;
707
+ boundingBox: BoundingBox3d;
708
+ surfaces: Surfaces;
709
+ materials: SurfaceMaterialsJson;
710
+ constructor(id: string, type: SpaceGraphGeometryType);
711
+ }
712
+
713
+ declare interface GeometryBaseJson extends SpaceGraphNodeBaseJson {
714
+ id: string;
715
+ type: SpaceGraphGeometryType;
716
+ position?: PositionEntry;
717
+ rotation?: RotationEntry;
718
+ rotationAxis?: Vector3;
719
+ boundingBox?: BoundingBox3d;
720
+ surfaces?: Surfaces;
721
+ materials?: SurfaceMaterialsJson;
722
+ material?: SpaceGraphMaterialJson;
723
+ }
724
+
725
+ declare class GeometryClip extends GeometryOperationPlaneBase {
726
+ type: GeometryClipType;
727
+ constructor(id: string, plane: Plane, material: SpaceGraphMaterial);
728
+ }
729
+
730
+ declare interface GeometryClipJson extends GeometryOperationPlaneBaseJson {
731
+ type: GeometryClipType;
732
+ }
733
+
734
+ declare type GeometryClipType = typeof GeometryClipTypeValue;
735
+
736
+ declare const GeometryClipTypeValue = "csg:clip";
737
+
738
+ declare type GeometryFaceIndices = number[] | IndexRange | 'all';
739
+
740
+ declare class GeometryIntersect extends GeometryOperationGeometryBase {
741
+ type: GeometryIntersectType;
742
+ }
743
+
744
+ declare interface GeometryIntersectJson extends GeometryOperationGeometryBaseJson {
745
+ type: GeometryIntersectType;
746
+ }
747
+
748
+ declare type GeometryIntersectType = typeof GeometryIntersectTypeValue;
749
+
750
+ declare const GeometryIntersectTypeValue = "csg:intersect";
751
+
752
+ declare type GeometryOperation = GeometryOperationGeometry | GeometryOperationPlane;
753
+
754
+ declare class GeometryOperationBase extends SpaceGraphTypedValue {
755
+ type: GeometryOperationType;
756
+ constructor(type: GeometryOperationType);
757
+ }
758
+
759
+ declare interface GeometryOperationBaseJson extends SpaceGraphTypedValueJson {
760
+ type: GeometryOperationType;
761
+ }
762
+
763
+ declare type GeometryOperationGeometry = GeometryReference | GeometrySubtract | GeometryUnion | GeometryIntersect;
764
+
765
+ declare class GeometryOperationGeometryBase extends GeometryOperationBase {
766
+ type: GeometryOperationGeometryType;
767
+ geometry: SpaceGraphGeometry;
768
+ position: PositionEntry;
769
+ rotation: RotationEntry;
770
+ rotationAxis: Vector3;
771
+ materials: SurfaceMaterials;
772
+ constructor(type: GeometryOperationGeometryType, geometry: SpaceGraphGeometry, materials: SurfaceMaterials);
773
+ }
774
+
775
+ declare interface GeometryOperationGeometryBaseJson extends GeometryOperationBaseJson {
776
+ type: GeometryOperationGeometryType;
777
+ geometry: string | SpaceGraphGeometryJson;
778
+ position?: PositionEntry;
779
+ rotation?: RotationEntry;
780
+ rotationAxis?: Vector3;
781
+ materials?: SurfaceMaterialsJson;
782
+ material?: SpaceGraphMaterialJson;
783
+ }
784
+
785
+ declare type GeometryOperationGeometryJson = string | GeometryReferenceJson | GeometrySubtractJson | GeometryIntersectJson | GeometryUnionJson;
786
+
787
+ declare type GeometryOperationGeometryType = GeometryReferenceType | GeometrySubtractType | GeometryUnionType | GeometryIntersectType;
788
+
789
+ declare type GeometryOperationJson = GeometryOperationGeometryJson | GeometryOperationPlaneJson;
790
+
791
+ declare type GeometryOperationPlane = GeometryClip;
792
+
793
+ declare class GeometryOperationPlaneBase extends GeometryOperationBase {
794
+ type: GeometryOperationPlaneType;
795
+ plane: Plane;
796
+ material: SpaceGraphMaterial;
797
+ constructor(type: GeometryOperationPlaneType, plane: Plane, material: SpaceGraphMaterial);
798
+ }
799
+
800
+ declare interface GeometryOperationPlaneBaseJson extends GeometryOperationBaseJson {
801
+ type: GeometryOperationPlaneType;
802
+ plane: Plane;
803
+ material: SpaceGraphMaterialJson;
804
+ }
805
+
806
+ declare type GeometryOperationPlaneJson = GeometryClipJson;
807
+
808
+ declare type GeometryOperationPlaneType = GeometryClipType;
809
+
810
+ declare type GeometryOperationType = GeometryOperationGeometryType | GeometryOperationPlaneType;
811
+
812
+ declare class GeometryReference extends GeometryOperationGeometryBase {
813
+ type: GeometryReferenceType;
814
+ }
815
+
816
+ declare interface GeometryReferenceJson extends GeometryOperationGeometryBaseJson {
817
+ type: GeometryReferenceType;
818
+ }
819
+
820
+ declare type GeometryReferenceType = typeof GeometryReferenceTypeValue;
821
+
822
+ declare const GeometryReferenceTypeValue = "reference:geometry";
823
+
824
+ declare class GeometrySubtract extends GeometryOperationGeometryBase {
825
+ type: GeometrySubtractType;
826
+ }
827
+
828
+ declare interface GeometrySubtractJson extends GeometryOperationGeometryBaseJson {
829
+ type: GeometrySubtractType;
830
+ }
831
+
832
+ declare type GeometrySubtractType = typeof GeometrySubtractTypeValue;
833
+
834
+ declare const GeometrySubtractTypeValue = "csg:subtract";
835
+
836
+ declare class GeometryUnion extends GeometryOperationGeometryBase {
837
+ type: GeometryUnionType;
838
+ }
839
+
840
+ declare interface GeometryUnionJson extends GeometryOperationGeometryBaseJson {
841
+ type: GeometryUnionType;
842
+ }
843
+
844
+ declare type GeometryUnionType = typeof GeometryUnionTypeValue;
845
+
846
+ declare const GeometryUnionTypeValue = "csg:union";
847
+
848
+ /**
849
+ * undirected graph for traversal without edge weights
850
+ */
851
+ declare class Graph {
852
+ nodeMap: Map<LayoutNode, Map<EdgeType, Set<LayoutNode>>>;
853
+ addNode(node: LayoutNode): Map<EdgeType, Set<LayoutNode>>;
854
+ addEdge(type: EdgeType, source: LayoutNode, destination: LayoutNode): void;
855
+ removeNode(node: LayoutNode): void;
856
+ removeEdge(type: EdgeType, source: LayoutNode, destination: LayoutNode): void;
857
+ /**
858
+ * Breadth-First Search
859
+ * if edges have weights this needs to be replaces with dijkstra algorithm
860
+ */
861
+ findShortestPath(edgeType: EdgeType, start: LayoutNode, end: LayoutNode, options?: {
862
+ depthLimit?: number;
863
+ }): LayoutNode[] | null;
864
+ }
865
+
866
+ declare class GroupRelation extends SpaceGraphNodeBase {
867
+ type: GroupRelationType;
868
+ elements: Set<LayoutElement>;
869
+ constructor(id: string);
870
+ insertElements(elements: LayoutElement[]): void;
871
+ removeElements(elements: LayoutElement[]): void;
872
+ copyForClone(product: GroupRelation): void;
873
+ toJSON(): GroupRelationJson;
874
+ }
875
+
876
+ declare interface GroupRelationJson extends SpaceGraphNodeBaseJson {
877
+ type: GroupRelationType;
878
+ elements: string[];
879
+ }
880
+
881
+ declare type GroupRelationType = typeof GroupRelationTypeValue;
882
+
883
+ declare const GroupRelationTypeValue = "relation:group";
884
+
885
+ declare interface GroupShape extends BaseShape {
886
+ type: 'group';
887
+ position?: Vector2_2;
888
+ rotation?: number;
889
+ children: Shape[];
890
+ }
891
+
892
+ declare type HingeSide = 'left' | 'right';
893
+
894
+ export declare type HostApi = {
895
+ /**
896
+ * @example
897
+ * const { data: element } = await hostApi.getElementsById({ id, include: ['name', 'type', 'dimensions']})
898
+ */
899
+ getElementById: <K extends keyof ElementData>(args: {
900
+ id: string;
901
+ include: K[];
902
+ }) => Promise<{
903
+ data?: Pick<ElementData, K>;
904
+ error?: string;
905
+ ok: boolean;
906
+ }>;
907
+ /**
908
+ * @example
909
+ * const { data: elements } = await hostApi.getElements({ include: ['id', 'name', 'type']})
910
+ */
911
+ getElements: <K extends keyof ElementData>(args: {
912
+ include: K[];
913
+ }) => Promise<{
914
+ data: Pick<ElementData, K>[];
915
+ error?: string;
916
+ ok: boolean;
917
+ }>;
918
+ /**
919
+ * @example
920
+ * const { data: elementsByType } = await hostApi.getElementsByType({ type, include: ['id', 'name', 'dimensions']})
921
+ */
922
+ getElementsByType: <K extends keyof ElementData>(args: {
923
+ type: LayoutElementJson['type'];
924
+ include: K[];
925
+ }) => Promise<{
926
+ data: Pick<ElementData, K>[];
927
+ error?: string;
928
+ ok: boolean;
929
+ }>;
930
+ getSpaceById: <K extends keyof SpaceData>(args: {
931
+ id: string;
932
+ include: K[];
933
+ }) => Promise<{
934
+ data?: Pick<SpaceData, K>;
935
+ error?: string;
936
+ ok: boolean;
937
+ }>;
938
+ getSpaces: <K extends keyof SpaceData>(args: {
939
+ include: K[];
940
+ }) => Promise<{
941
+ data: Pick<SpaceData, K>[];
942
+ error?: string;
943
+ ok: boolean;
944
+ }>;
945
+ getSpaceGraphJson: () => Promise<{
946
+ data: SpaceGraphJson;
947
+ error?: string;
948
+ }>;
949
+ runOperations: (args: {
950
+ operations: OperationJson[];
951
+ }) => Promise<HostResponse>;
952
+ setPlanConfig: (config: {
953
+ theme: FloorPlanTheme;
954
+ }) => Promise<HostResponse>;
955
+ addPlanLayer: (args: {
956
+ id?: string;
957
+ baseLayer?: string;
958
+ }) => Promise<EntityResponse>;
959
+ addPlanGraphic: (args: {
960
+ shapes: Shape[];
961
+ isHandler?: boolean;
962
+ layerId?: string;
963
+ id?: string;
964
+ clearLayer?: boolean;
965
+ }) => Promise<EntityResponse>;
966
+ zoomToNode: (args: {
967
+ nodeId: string;
968
+ margin?: number;
969
+ animate?: number | boolean;
970
+ }) => Promise<HostResponse>;
971
+ zoomExtents: (args?: {
972
+ margin?: number;
973
+ animate?: number | boolean;
974
+ }) => Promise<HostResponse>;
975
+ drawNodeUpdate: (args: {
976
+ nodeId: string;
977
+ style: 'selected' | ShapeStyle | false;
978
+ }) => Promise<HostResponse>;
979
+ selectNodes: (args: {
980
+ nodeIds: string[];
981
+ }) => Promise<SelectionResponse>;
982
+ };
983
+
984
+ export declare type HostApiSync = {
985
+ /**
986
+ * @example
987
+ * const { data: element } = await hostApi.getElementsById({ id, include: ['name', 'type', 'dimensions']})
988
+ */
989
+ getElementById: <K extends keyof ElementData>(args: {
990
+ id: string;
991
+ include: K[];
992
+ }) => {
993
+ data?: Pick<ElementData, K>;
994
+ error?: string;
995
+ ok: boolean;
996
+ };
997
+ /**
998
+ * @example
999
+ * const { data: elements } = await hostApi.getElements({ include: ['id', 'name', 'type']})
1000
+ */
1001
+ getElements: <K extends keyof ElementData>(args: {
1002
+ include: K[];
1003
+ }) => {
1004
+ data: Pick<ElementData, K>[];
1005
+ error?: string;
1006
+ ok: boolean;
1007
+ };
1008
+ /**
1009
+ * @example
1010
+ * const { data: elementsByType } = await hostApi.getElementsByType({ type, include: ['id', 'name', 'dimensions']})
1011
+ */
1012
+ getElementsByType: <K extends keyof ElementData>(args: {
1013
+ type: LayoutElementJson['type'];
1014
+ include: K[];
1015
+ }) => {
1016
+ data: Pick<ElementData, K>[];
1017
+ error?: string;
1018
+ ok: boolean;
1019
+ };
1020
+ getSpaceById: <K extends keyof SpaceData>(args: {
1021
+ id: string;
1022
+ include: K[];
1023
+ }) => {
1024
+ data?: Pick<SpaceData, K>;
1025
+ error?: string;
1026
+ ok: boolean;
1027
+ };
1028
+ getSpaces: <K extends keyof SpaceData>(args: {
1029
+ include: K[];
1030
+ }) => {
1031
+ data: Pick<SpaceData, K>[];
1032
+ error?: string;
1033
+ ok: boolean;
1034
+ };
1035
+ getSpaceGraphJson: () => {
1036
+ data: SpaceGraphJson;
1037
+ error?: string;
1038
+ };
1039
+ runOperations: (args: {
1040
+ operations: OperationJson[];
1041
+ }) => HostResponse;
1042
+ setPlanConfig: (config: {
1043
+ theme: FloorPlanTheme;
1044
+ }) => HostResponse;
1045
+ addPlanLayer: (args: {
1046
+ id?: string;
1047
+ baseLayer?: string;
1048
+ }) => EntityResponse;
1049
+ addPlanGraphic: (args: {
1050
+ shapes: Shape[];
1051
+ isHandler?: boolean;
1052
+ layerId?: string;
1053
+ id?: string;
1054
+ clearLayer?: boolean;
1055
+ }) => EntityResponse;
1056
+ zoomToNode: (args: {
1057
+ nodeId: string;
1058
+ margin?: number;
1059
+ animate?: number | boolean;
1060
+ }) => HostResponse;
1061
+ zoomExtents: (args?: {
1062
+ margin?: number;
1063
+ animate?: number | boolean;
1064
+ }) => HostResponse;
1065
+ drawNodeUpdate: (args: {
1066
+ nodeId: string;
1067
+ style: 'selected' | ShapeStyle | false;
1068
+ }) => HostResponse;
1069
+ selectNodes: (args: {
1070
+ nodeIds: string[];
1071
+ }) => SelectionResponse;
1072
+ };
1073
+
1074
+ export declare interface HostResponse {
1075
+ ok: boolean;
1076
+ data?: unknown;
1077
+ error?: string;
1078
+ }
1079
+
1080
+ declare type IndexRange = {
1081
+ type: 'index:range';
1082
+ start: number;
1083
+ end: number;
1084
+ };
1085
+
1086
+ declare class Layout2dView extends LayoutViewBase {
1087
+ type: Layout2dViewType;
1088
+ parameters: Layout2dViewParameters;
1089
+ constructor(id: string);
1090
+ setParameters(parameters: RecursivePartial<Layout2dViewParameters>): void;
1091
+ }
1092
+
1093
+ declare interface Layout2dViewJson extends LayoutViewBaseJson {
1094
+ type: Layout2dViewType;
1095
+ parameters?: Layout2dViewParametersJson;
1096
+ }
1097
+
1098
+ declare interface Layout2dViewNodeStyle {
1099
+ tags: string[];
1100
+ fill: string;
1101
+ fillOpacity: number;
1102
+ stroke: string;
1103
+ strokeWidth: number;
1104
+ }
1105
+
1106
+ declare type Layout2dViewNodeStyleJson = Partial<Layout2dViewNodeStyle>;
1107
+
1108
+ declare interface Layout2dViewParameters {
1109
+ style: Layout2dViewStyle;
1110
+ hidden: LayoutElementType[];
1111
+ }
1112
+
1113
+ declare interface Layout2dViewParametersJson {
1114
+ style: Layout2dViewStyleJson;
1115
+ hidden: LayoutElementType[];
1116
+ }
1117
+
1118
+ declare interface Layout2dViewStyle {
1119
+ background: Pick<Layout2dViewNodeStyle, 'fill'>;
1120
+ units: 'imperial' | 'metric';
1121
+ byId: Record<string, Layout2dViewNodeStyle>;
1122
+ byType: Record<string, Layout2dViewNodeStyle>;
1123
+ byAttribute: {
1124
+ program: Record<string, Layout2dViewNodeStyle>;
1125
+ usage: Record<string, Layout2dViewNodeStyle>;
1126
+ };
1127
+ }
1128
+
1129
+ declare interface Layout2dViewStyleJson {
1130
+ background?: Pick<Layout2dViewNodeStyleJson, 'fill'>;
1131
+ units?: 'imperial' | 'metric';
1132
+ byId?: Record<string, Layout2dViewNodeStyleJson>;
1133
+ byType?: Record<string, Layout2dViewNodeStyleJson>;
1134
+ byAttribute?: {
1135
+ program?: Record<string, Layout2dViewNodeStyleJson>;
1136
+ usage?: Record<string, Layout2dViewNodeStyleJson>;
1137
+ };
1138
+ }
1139
+
1140
+ declare type Layout2dViewType = typeof Layout2dViewTypeValue;
1141
+
1142
+ declare const Layout2dViewTypeValue = "view:2d";
1143
+
1144
+ declare class Layout3dView extends LayoutViewBase {
1145
+ type: Layout3dViewType;
1146
+ parameters: Layout3dViewParameters;
1147
+ constructor(id: string);
1148
+ setParameters(parameters: RecursivePartial<Layout3dViewParameters>): void;
1149
+ }
1150
+
1151
+ declare interface Layout3dViewJson extends LayoutViewBaseJson {
1152
+ type: Layout3dViewType;
1153
+ parameters?: Layout3dViewParametersJson;
1154
+ }
1155
+
1156
+ declare interface Layout3dViewParameters {
1157
+ position: Vector3;
1158
+ normal: Vector3;
1159
+ fov: number | 'default';
1160
+ scale: number | 'auto';
1161
+ lensShiftX: number;
1162
+ lensShiftY: number;
1163
+ projection: 'perspective' | 'orthographic';
1164
+ }
1165
+
1166
+ declare type Layout3dViewParametersJson = Partial<Layout3dViewParameters>;
1167
+
1168
+ declare type Layout3dViewType = typeof Layout3dViewTypeValue;
1169
+
1170
+ declare const Layout3dViewTypeValue = "view:3d";
1171
+
1172
+ declare type LayoutAnnotation = LayoutFloorPlanDxfAnnotation | LayoutFloorPlanImageAnnotation;
1173
+
1174
+ declare class LayoutAnnotationBase extends LayoutNodeBase {
1175
+ type: LayoutAnnotationType;
1176
+ parameters: LayoutAnnotationParameters;
1177
+ position: Vector3;
1178
+ rotation: number;
1179
+ copyForClone(annotation: LayoutAnnotation): void;
1180
+ setTransform(position: Vector3, rotation: number): void;
1181
+ setParameters(parameters: RecursivePartial<LayoutAnnotationParameters>): void;
1182
+ toJSON(): LayoutAnnotationJson;
1183
+ }
1184
+
1185
+ declare interface LayoutAnnotationBaseJson extends LayoutNodeBaseJson {
1186
+ type: LayoutAnnotationType;
1187
+ position: Vector3;
1188
+ rotation: number;
1189
+ parameters?: LayoutAnnotationParametersJson;
1190
+ }
1191
+
1192
+ declare type LayoutAnnotationJson = LayoutFloorPlanDxfAnnotationJson | LayoutFloorPlanImageAnnotationJson;
1193
+
1194
+ declare type LayoutAnnotationParameters = LayoutFloorPlanDxfParameters | LayoutFloorPlanImageParameters;
1195
+
1196
+ declare type LayoutAnnotationParametersJson = LayoutFloorPlanDxfParametersJson | LayoutFloorPlanImageParametersJson;
1197
+
1198
+ declare type LayoutAnnotationType = LayoutFloorPlanDxfType | LayoutFloorPlanImageType;
1199
+
1200
+ declare class LayoutAsset extends LayoutTransformElementBase {
1201
+ type: LayoutAssetType;
1202
+ parameters: LayoutAssetParameters;
1203
+ product: SpaceGraphProduct | null;
1204
+ constructor(id: string);
1205
+ setParameters(parameters: RecursivePartial<LayoutAssetParameters>): void;
1206
+ setProduct(product: SpaceGraphProduct): void;
1207
+ getBoundingBox(localTransform?: boolean): {
1208
+ min: Vector3;
1209
+ max: Vector3;
1210
+ transform: Transform3d;
1211
+ };
1212
+ }
1213
+
1214
+ declare interface LayoutAssetJson extends LayoutTransformElementBaseJson {
1215
+ type: LayoutAssetType;
1216
+ product?: string;
1217
+ }
1218
+
1219
+ declare interface LayoutAssetMaterials {
1220
+ }
1221
+
1222
+ declare interface LayoutAssetParameters {
1223
+ materials: LayoutAssetMaterials;
1224
+ }
1225
+
1226
+ declare type LayoutAssetType = typeof LayoutAssetTypeValue;
1227
+
1228
+ declare const LayoutAssetTypeValue = "element:asset";
1229
+
1230
+ declare class LayoutBeam extends LayoutTransformElementBase {
1231
+ type: LayoutBeamType;
1232
+ parameters: LayoutBeamParameters;
1233
+ constructor(id: string);
1234
+ setParameters(parameters: RecursivePartial<LayoutBeamParameters>): void;
1235
+ }
1236
+
1237
+ declare interface LayoutBeamJson extends LayoutTransformElementBaseJson {
1238
+ type: LayoutBeamType;
1239
+ parameters?: LayoutBeamParametersJson;
1240
+ }
1241
+
1242
+ declare interface LayoutBeamMaterials {
1243
+ top: SpaceGraphMaterialJson;
1244
+ bottom: SpaceGraphMaterialJson;
1245
+ sides: SpaceGraphMaterialJson;
1246
+ }
1247
+
1248
+ declare type LayoutBeamParameters = DimensionParameters & CommonParameters;
1249
+
1250
+ declare type LayoutBeamParametersJson = DimensionParameters & Partial<CommonParameters>;
1251
+
1252
+ declare type LayoutBeamType = typeof LayoutBeamTypeValue;
1253
+
1254
+ declare const LayoutBeamTypeValue = "element:beam";
1255
+
1256
+ declare class LayoutBoundary {
1257
+ vertices: SpatialGraphVertex[];
1258
+ edges: SpatialGraphEdge[];
1259
+ geometryProfile: Vector2[];
1260
+ toJSON(): LayoutBoundaryJson;
1261
+ }
1262
+
1263
+ declare type LayoutBoundaryElement = LayoutBoundarySlab | LayoutBoundaryWall;
1264
+
1265
+ declare class LayoutBoundaryElementBase extends LayoutElementBase {
1266
+ type: LayoutBoundaryElementType;
1267
+ parameters: LayoutBoundaryElementParameters;
1268
+ boundaries: LayoutBoundary[];
1269
+ constructor(id: string, type: LayoutBoundaryElementType, boundaries: LayoutBoundary[]);
1270
+ getBoundingBox(): {
1271
+ min: Vector3;
1272
+ max: Vector3;
1273
+ transform: Transform3d;
1274
+ };
1275
+ }
1276
+
1277
+ declare interface LayoutBoundaryElementBaseJson extends LayoutElementBaseJson {
1278
+ type: LayoutBoundaryElementType;
1279
+ boundaries: LayoutBoundaryJson[];
1280
+ parameters?: LayoutBoundaryElementParametersJson;
1281
+ }
1282
+
1283
+ declare type LayoutBoundaryElementJson = LayoutBoundarySlabJson | LayoutBoundaryWallJson;
1284
+
1285
+ declare type LayoutBoundaryElementParameters = LayoutBoundarySlabParameters | LayoutBoundaryWallParameters;
1286
+
1287
+ declare type LayoutBoundaryElementParametersJson = LayoutBoundarySlabParametersJson | LayoutBoundaryWallParametersJson;
1288
+
1289
+ declare type LayoutBoundaryElementType = LayoutBoundarySlabType | LayoutBoundaryWallType;
1290
+
1291
+ declare interface LayoutBoundaryJson {
1292
+ edges: string[];
1293
+ }
1294
+
1295
+ declare class LayoutBoundarySlab extends LayoutBoundaryElementBase {
1296
+ type: LayoutBoundarySlabType;
1297
+ parameters: LayoutBoundarySlabParameters;
1298
+ space: LayoutSpace | null;
1299
+ constructor(id: string, type: LayoutBoundarySlabType, boundaries: LayoutBoundary[]);
1300
+ setParameters(parameters: RecursivePartial<LayoutBoundarySlabParameters>): void;
1301
+ getSpaces(): LayoutSpace[];
1302
+ }
1303
+
1304
+ declare interface LayoutBoundarySlabJson extends LayoutBoundaryElementBaseJson {
1305
+ type: LayoutBoundarySlabType;
1306
+ parameters?: LayoutBoundarySlabParametersJson;
1307
+ }
1308
+
1309
+ declare interface LayoutBoundarySlabMaterials {
1310
+ top: SpaceGraphMaterialJson;
1311
+ bottom: SpaceGraphMaterialJson;
1312
+ sides: SpaceGraphMaterialJson;
1313
+ }
1314
+
1315
+ declare interface LayoutBoundarySlabParameters {
1316
+ height: number;
1317
+ elevation: number;
1318
+ materials: LayoutBoundarySlabMaterials;
1319
+ }
1320
+
1321
+ declare type LayoutBoundarySlabParametersJson = Partial<LayoutBoundarySlabParameters>;
1322
+
1323
+ declare type LayoutBoundarySlabType = LayoutFloorType | LayoutCeilingType;
1324
+
1325
+ declare class LayoutBoundaryWall extends LayoutBoundaryElementBase {
1326
+ type: LayoutBoundaryWallType;
1327
+ parameters: LayoutBoundaryWallParameters;
1328
+ constructor(id: string, boundaries: LayoutBoundary[]);
1329
+ setParameters(parameters: RecursivePartial<LayoutBoundaryWallParameters>): void;
1330
+ }
1331
+
1332
+ declare interface LayoutBoundaryWallJson extends LayoutBoundaryElementBaseJson {
1333
+ type: LayoutBoundaryWallType;
1334
+ parameters?: LayoutBoundaryWallParametersJson;
1335
+ }
1336
+
1337
+ declare interface LayoutBoundaryWallMaterials {
1338
+ top: SpaceGraphMaterialJson;
1339
+ bottom: SpaceGraphMaterialJson;
1340
+ sides: SpaceGraphMaterialJson;
1341
+ }
1342
+
1343
+ declare interface LayoutBoundaryWallParameters {
1344
+ height: number;
1345
+ elevation: number;
1346
+ surfaces: {
1347
+ top: [0];
1348
+ bottom: [1];
1349
+ sides: '...';
1350
+ };
1351
+ materials: LayoutBoundaryWallMaterials;
1352
+ }
1353
+
1354
+ declare type LayoutBoundaryWallParametersJson = Partial<LayoutBoundaryWallParameters>;
1355
+
1356
+ declare type LayoutBoundaryWallType = typeof LayoutBoundaryWallTypeValue;
1357
+
1358
+ declare const LayoutBoundaryWallTypeValue = "element:boundaryWall";
1359
+
1360
+ declare class LayoutCasework extends LayoutTransformElementBase {
1361
+ type: LayoutCaseworkType;
1362
+ parameters: LayoutCaseworkParameters;
1363
+ constructor(id: string);
1364
+ setParameters(parameters: RecursivePartial<LayoutCaseworkParameters>): void;
1365
+ }
1366
+
1367
+ declare interface LayoutCaseworkJson extends LayoutTransformElementBaseJson {
1368
+ type: LayoutCaseworkType;
1369
+ parameters?: LayoutCaseworkParametersJson;
1370
+ }
1371
+
1372
+ declare interface LayoutCaseworkMaterials {
1373
+ cabinet: SpaceGraphMaterialJson;
1374
+ cabinetDoors: SpaceGraphMaterialJson;
1375
+ counter: SpaceGraphMaterialJson;
1376
+ }
1377
+
1378
+ declare type LayoutCaseworkParameters = DimensionParameters & CommonParameters_2;
1379
+
1380
+ declare type LayoutCaseworkParametersJson = DimensionParameters & Partial<CommonParameters_2>;
1381
+
1382
+ declare type LayoutCaseworkType = typeof LayoutCaseworkTypeValue;
1383
+
1384
+ declare const LayoutCaseworkTypeValue = "element:casework";
1385
+
1386
+ declare type LayoutCeilingType = typeof LayoutCeilingTypeValue;
1387
+
1388
+ declare const LayoutCeilingTypeValue = "element:ceiling";
1389
+
1390
+ declare class LayoutColumn extends LayoutTransformElementBase {
1391
+ type: LayoutColumnType;
1392
+ parameters: LayoutColumnParameters;
1393
+ constructor(id: string);
1394
+ setParameters(parameters: RecursivePartial<LayoutColumnParameters>): void;
1395
+ }
1396
+
1397
+ declare interface LayoutColumnJson extends LayoutTransformElementBaseJson {
1398
+ type: LayoutColumnType;
1399
+ parameters?: LayoutColumnParametersJson;
1400
+ }
1401
+
1402
+ declare interface LayoutColumnMaterials {
1403
+ top: SpaceGraphMaterialJson;
1404
+ bottom: SpaceGraphMaterialJson;
1405
+ sides: SpaceGraphMaterialJson;
1406
+ }
1407
+
1408
+ declare interface LayoutColumnParameters {
1409
+ profile: LayoutColumnProfile;
1410
+ /** @minimum 0.01 */
1411
+ height: number;
1412
+ materials: LayoutColumnMaterials;
1413
+ }
1414
+
1415
+ declare type LayoutColumnParametersJson = Partial<LayoutColumnParameters>;
1416
+
1417
+ declare type LayoutColumnProfile = RectangleCurve | CircleCurve | PolygonCurve | PolygonWithHolesCurve;
1418
+
1419
+ declare type LayoutColumnType = typeof LayoutColumnTypeValue;
1420
+
1421
+ declare const LayoutColumnTypeValue = "element:column";
1422
+
1423
+ declare class LayoutCurtainWall extends LayoutEdgeElementBase {
1424
+ type: LayoutCurtainWallType;
1425
+ parameters: LayoutCurtainWallParameters;
1426
+ constructor(id: string, edges: SpatialGraphEdge[]);
1427
+ setParameters(parameters: RecursivePartial<LayoutCurtainWallParameters>): void;
1428
+ }
1429
+
1430
+ declare interface LayoutCurtainWallJson extends LayoutEdgeElementBaseJson {
1431
+ type: LayoutCurtainWallType;
1432
+ parameters?: LayoutCurtainWallParametersJson;
1433
+ }
1434
+
1435
+ declare interface LayoutCurtainWallParameters {
1436
+ }
1437
+
1438
+ declare type LayoutCurtainWallParametersJson = Partial<LayoutCurtainWallParameters>;
1439
+
1440
+ declare type LayoutCurtainWallType = typeof LayoutCurtainWallTypeValue;
1441
+
1442
+ declare const LayoutCurtainWallTypeValue = "element:curtainWall";
1443
+
1444
+ declare class LayoutDoor extends LayoutTransformElementBase {
1445
+ type: LayoutDoorType;
1446
+ parameters: LayoutDoorParameters;
1447
+ constructor(id: string);
1448
+ setParameters(parameters: RecursivePartial<LayoutDoorParameters>): void;
1449
+ getBoundingBox(localTransform?: boolean): {
1450
+ min: Vector3;
1451
+ max: Vector3;
1452
+ transform: Transform3d;
1453
+ };
1454
+ }
1455
+
1456
+ declare interface LayoutDoorJson extends LayoutTransformElementBaseJson {
1457
+ type: LayoutDoorType;
1458
+ parameters?: LayoutDoorParametersJson;
1459
+ }
1460
+
1461
+ declare interface LayoutDoorMaterials {
1462
+ frame: SpaceGraphMaterialJson;
1463
+ leaf: SpaceGraphMaterialJson;
1464
+ }
1465
+
1466
+ declare type LayoutDoorParameters = DimensionParameters_2 & CommonParameters_3;
1467
+
1468
+ declare type LayoutDoorParametersJson = DimensionParameters_2 & Partial<CommonParameters_3>;
1469
+
1470
+ declare type LayoutDoorType = typeof LayoutDoorTypeValue;
1471
+
1472
+ declare const LayoutDoorTypeValue = "element:door";
1473
+
1474
+ declare type LayoutEdgeElement = LayoutCurtainWall | LayoutSpaceDivider | LayoutWall;
1475
+
1476
+ declare class LayoutEdgeElementBase extends LayoutElementBase {
1477
+ type: LayoutEdgeElementType;
1478
+ parameters: LayoutEdgeElementParameters;
1479
+ private edges;
1480
+ private vertices;
1481
+ edgesChanged: boolean;
1482
+ constructor(id: string, type: LayoutEdgeElementType, edges: SpatialGraphEdge[]);
1483
+ setEdges(edges: SpatialGraphEdge[]): void;
1484
+ private verifyEdges;
1485
+ getEdges(): SpatialGraphEdge[];
1486
+ getVertices(): SpatialGraphVertex[];
1487
+ getStartVertex(): SpatialGraphVertex | undefined;
1488
+ getEndVertex(): SpatialGraphVertex | undefined;
1489
+ getAxisPoints(): [Vector2, Vector2] | [];
1490
+ getAxisLength(): number;
1491
+ getEdgeAtLinearPosition(u: number): SpatialGraphEdge | undefined;
1492
+ getEdgesAtLinearSegment(u: number, v: number): SpatialGraphEdge[];
1493
+ /**
1494
+ * @deprecated Use getEdges() instead of edge
1495
+ */
1496
+ get edge(): SpatialGraphEdge;
1497
+ getAdjacentElementsByVertex(): [LayoutEdgeElement[], LayoutEdgeElement[]];
1498
+ getAdjacentSpacesBySide(): [LayoutSpace[], LayoutSpace[]];
1499
+ getSpaces(): LayoutSpace[];
1500
+ getElementsAtLinearPosition(u: number): LayoutElement[];
1501
+ get isExternal(): boolean;
1502
+ }
1503
+
1504
+ declare interface LayoutEdgeElementBaseJson extends LayoutElementBaseJson {
1505
+ type: LayoutEdgeElementType;
1506
+ edge: string | string[];
1507
+ parameters?: LayoutEdgeElementParametersJson;
1508
+ }
1509
+
1510
+ declare type LayoutEdgeElementJson = LayoutCurtainWallJson | LayoutSpaceDividerJson | LayoutWallJson;
1511
+
1512
+ declare type LayoutEdgeElementParameters = LayoutCurtainWallParameters | LayoutSpaceDividerParameters | LayoutWallParameters;
1513
+
1514
+ declare type LayoutEdgeElementParametersJson = LayoutCurtainWallParametersJson | LayoutSpaceDividerParametersJson | LayoutWallParametersJson;
1515
+
1516
+ declare type LayoutEdgeElementType = LayoutCurtainWallType | LayoutSpaceDividerType | LayoutWallType;
1517
+
1518
+ declare type LayoutElement = LayoutBoundaryElement | LayoutEdgeElement | LayoutOpeningElement | LayoutTransformElement;
1519
+
1520
+ declare class LayoutElementBase extends LayoutNodeBase {
1521
+ type: LayoutElementType;
1522
+ parameters: LayoutElementParameters;
1523
+ parent: LayoutElement | null;
1524
+ elements: LayoutElement[];
1525
+ geometries: GeometryOperationJson[];
1526
+ insertElement(element: LayoutElement): void;
1527
+ getTransform(): Transform3d;
1528
+ getWorldTransform(): Transform3d;
1529
+ /**
1530
+ * returns the element's object aligned bounding box with transform
1531
+ */
1532
+ getBoundingBox(localTransform?: boolean): TransformBoundingBox3d;
1533
+ getAxisAlignedBoundingBox(localTransform?: boolean): BoundingBox3d;
1534
+ getBoundingBoxContour(localTransform?: boolean): Vector2[];
1535
+ get isExternal(): boolean;
1536
+ removeElement(element: LayoutElement): void;
1537
+ copyForClone(element: LayoutElement): void;
1538
+ setParameters(parameters: RecursivePartial<LayoutElementParameters>): void;
1539
+ getSpaces(): LayoutSpace[];
1540
+ toJSON(): LayoutElementJson;
1541
+ }
1542
+
1543
+ declare interface LayoutElementBaseJson extends LayoutNodeBaseJson {
1544
+ type: LayoutElementType;
1545
+ geometries?: GeometryOperationJson[];
1546
+ parameters?: LayoutElementParametersJson;
1547
+ elements?: LayoutElementJson[];
1548
+ }
1549
+
1550
+ declare type LayoutElementJson = LayoutBoundaryElementJson | LayoutEdgeElementJson | LayoutOpeningElementJson | LayoutTransformElementJson;
1551
+
1552
+ declare type LayoutElementParameters = LayoutBoundaryElementParameters | LayoutEdgeElementParameters | LayoutOpeningElementParameters | LayoutTransformElementParameters;
1553
+
1554
+ declare type LayoutElementParametersJson = LayoutBoundaryElementParametersJson | LayoutEdgeElementParametersJson | LayoutOpeningElementParametersJson | LayoutTransformElementParametersJson;
1555
+
1556
+ declare type LayoutElementType = LayoutBoundaryElementType | LayoutEdgeElementType | LayoutOpeningElementType | LayoutTransformElementType;
1557
+
1558
+ declare class LayoutFloorPlanDxfAnnotation extends LayoutAnnotationBase {
1559
+ type: LayoutFloorPlanDxfType;
1560
+ parameters: LayoutFloorPlanDxfParameters;
1561
+ constructor(id: string);
1562
+ setParameters(parameters: RecursivePartial<LayoutFloorPlanDxfParameters>): void;
1563
+ }
1564
+
1565
+ declare interface LayoutFloorPlanDxfAnnotationJson extends LayoutAnnotationBaseJson {
1566
+ type: LayoutFloorPlanDxfType;
1567
+ parameters?: LayoutFloorPlanDxfParametersJson;
1568
+ }
1569
+
1570
+ declare interface LayoutFloorPlanDxfParameters {
1571
+ uri: string;
1572
+ drawingOrigin: Vector2;
1573
+ drawingUnits: DxfUnitsString;
1574
+ hiddenLayers: string[];
1575
+ }
1576
+
1577
+ declare type LayoutFloorPlanDxfParametersJson = Partial<LayoutFloorPlanDxfParameters>;
1578
+
1579
+ declare type LayoutFloorPlanDxfType = typeof LayoutFloorPlanDxfTypeValue;
1580
+
1581
+ declare const LayoutFloorPlanDxfTypeValue = "annotation:floorPlanDxf";
1582
+
1583
+ declare class LayoutFloorPlanImageAnnotation extends LayoutAnnotationBase {
1584
+ type: LayoutFloorPlanImageType;
1585
+ parameters: LayoutFloorPlanImageParameters;
1586
+ constructor(id: string);
1587
+ setParameters(parameters: RecursivePartial<LayoutFloorPlanImageParameters>): void;
1588
+ }
1589
+
1590
+ declare interface LayoutFloorPlanImageAnnotationJson extends LayoutAnnotationBaseJson {
1591
+ type: LayoutFloorPlanImageType;
1592
+ parameters?: LayoutFloorPlanImageParametersJson;
1593
+ }
1594
+
1595
+ declare interface LayoutFloorPlanImageParameters {
1596
+ uri: string;
1597
+ length: number;
1598
+ width: number;
1599
+ }
1600
+
1601
+ declare type LayoutFloorPlanImageParametersJson = Partial<LayoutFloorPlanImageParameters>;
1602
+
1603
+ declare type LayoutFloorPlanImageType = typeof LayoutFloorPlanImageTypeValue;
1604
+
1605
+ declare const LayoutFloorPlanImageTypeValue = "annotation:floorPlanImage";
1606
+
1607
+ declare type LayoutFloorType = typeof LayoutFloorTypeValue;
1608
+
1609
+ declare const LayoutFloorTypeValue = "element:floor";
1610
+
1611
+ declare class LayoutGeneric extends LayoutTransformElementBase {
1612
+ type: LayoutGenericType;
1613
+ parameters: LayoutGenericParameters;
1614
+ constructor(id: string);
1615
+ setParameters(parameters: RecursivePartial<LayoutGenericParameters>): void;
1616
+ }
1617
+
1618
+ declare interface LayoutGenericJson extends LayoutTransformElementBaseJson {
1619
+ type: LayoutGenericType;
1620
+ parameters?: LayoutGenericParametersJson;
1621
+ }
1622
+
1623
+ declare interface LayoutGenericMaterials {
1624
+ top: SpaceGraphMaterialJson;
1625
+ bottom: SpaceGraphMaterialJson;
1626
+ sides: SpaceGraphMaterialJson;
1627
+ }
1628
+
1629
+ declare interface LayoutGenericParameters {
1630
+ profile: LayoutGenericProfile;
1631
+ height: number;
1632
+ materials: LayoutGenericMaterials;
1633
+ }
1634
+
1635
+ declare type LayoutGenericParametersJson = Partial<LayoutGenericParameters>;
1636
+
1637
+ declare type LayoutGenericProfile = 'none' | RectangleCurve | CircleCurve | PolygonCurve | PolygonWithHolesCurve;
1638
+
1639
+ declare type LayoutGenericType = typeof LayoutGenericTypeValue;
1640
+
1641
+ declare const LayoutGenericTypeValue = "element:generic";
1642
+
1643
+ declare class LayoutKitchen extends LayoutTransformElementBase {
1644
+ type: LayoutKitchenType;
1645
+ parameters: LayoutKitchenParameters;
1646
+ constructor(id: string);
1647
+ setParameters(parameters: RecursivePartial<LayoutKitchenParameters>, skipElementCreation?: boolean): void;
1648
+ }
1649
+
1650
+ declare interface LayoutKitchenJson extends LayoutTransformElementBaseJson {
1651
+ type: LayoutKitchenType;
1652
+ parameters?: LayoutKitchenParametersJson;
1653
+ }
1654
+
1655
+ declare interface LayoutKitchenMaterials {
1656
+ cabinet: SpaceGraphMaterialJson;
1657
+ cabinetDoors: SpaceGraphMaterialJson;
1658
+ counter: SpaceGraphMaterialJson;
1659
+ }
1660
+
1661
+ declare type LayoutKitchenParameters = DimensionParameters & CommonParameters_4;
1662
+
1663
+ declare type LayoutKitchenParametersJson = DimensionParameters & Partial<CommonParameters_4>;
1664
+
1665
+ declare type LayoutKitchenType = typeof LayoutKitchenTypeValue;
1666
+
1667
+ declare const LayoutKitchenTypeValue = "element:kitchen";
1668
+
1669
+ declare type LayoutNode = SpatialGraphNode_2 | LayoutSpace | LayoutElement | LayoutAnnotation | LayoutView;
1670
+
1671
+ declare class LayoutNodeBase extends SpaceGraphNodeWithCustomAttributesBase {
1672
+ type: LayoutNodeType;
1673
+ layout: SpaceGraphLayout;
1674
+ constructor(id: string, type: LayoutNodeType);
1675
+ }
1676
+
1677
+ declare interface LayoutNodeBaseJson extends SpaceGraphNodeWithCustomAttributesBaseJson {
1678
+ type: LayoutNodeType;
1679
+ }
1680
+
1681
+ declare type LayoutNodeType = SpatialGraphNodeType | LayoutSpaceType | LayoutElementType | LayoutAnnotationType | LayoutViewType;
1682
+
1683
+ declare class LayoutOpening extends LayoutOpeningElementBase {
1684
+ type: LayoutOpeningType;
1685
+ parameters: LayoutOpeningParameters;
1686
+ constructor(id: string);
1687
+ getTransform(): Transform3d;
1688
+ get position(): Vector3;
1689
+ get rotation(): number;
1690
+ setParameters(parameters: RecursivePartial<LayoutOpeningParameters>): void;
1691
+ getBoundingBox(localTransform?: boolean): {
1692
+ min: Vector3;
1693
+ max: Vector3;
1694
+ transform: Transform3d;
1695
+ };
1696
+ getSpaces(): LayoutSpace[];
1697
+ get isExternal(): boolean;
1698
+ }
1699
+
1700
+ declare type LayoutOpeningElement = LayoutOpening;
1701
+
1702
+ declare class LayoutOpeningElementBase extends LayoutElementBase {
1703
+ type: LayoutOpeningElementType;
1704
+ parameters: LayoutOpeningElementParameters;
1705
+ constructor(id: string, type: LayoutOpeningElementType);
1706
+ }
1707
+
1708
+ declare interface LayoutOpeningElementBaseJson extends LayoutElementBaseJson {
1709
+ type: LayoutOpeningElementType;
1710
+ parameters?: LayoutOpeningElementParametersJson;
1711
+ }
1712
+
1713
+ declare type LayoutOpeningElementJson = LayoutOpeningJson;
1714
+
1715
+ declare type LayoutOpeningElementParameters = LayoutOpeningParameters;
1716
+
1717
+ declare type LayoutOpeningElementParametersJson = LayoutOpeningParametersJson;
1718
+
1719
+ declare type LayoutOpeningElementType = LayoutOpeningType;
1720
+
1721
+ declare interface LayoutOpeningJson extends LayoutOpeningElementBaseJson {
1722
+ type: LayoutOpeningType;
1723
+ parameters?: LayoutOpeningParametersJson;
1724
+ }
1725
+
1726
+ declare interface LayoutOpeningMaterials {
1727
+ top: SpaceGraphMaterialJson;
1728
+ bottom: SpaceGraphMaterialJson;
1729
+ sides: SpaceGraphMaterialJson;
1730
+ }
1731
+
1732
+ declare interface LayoutOpeningParameters {
1733
+ position: Vector2;
1734
+ dimensions: Vector2;
1735
+ materials: LayoutOpeningMaterials;
1736
+ }
1737
+
1738
+ declare type LayoutOpeningParametersJson = Partial<LayoutOpeningParameters>;
1739
+
1740
+ declare type LayoutOpeningType = typeof LayoutOpeningTypeValue;
1741
+
1742
+ declare const LayoutOpeningTypeValue = "element:opening";
1743
+
1744
+ declare class LayoutRailing extends LayoutTransformElementBase {
1745
+ type: LayoutRailingType;
1746
+ parameters: LayoutRailingParameters;
1747
+ constructor(id: string);
1748
+ setParameters(parameters: RecursivePartial<LayoutRailingParameters>): void;
1749
+ }
1750
+
1751
+ declare interface LayoutRailingJson extends LayoutTransformElementBaseJson {
1752
+ type: LayoutRailingType;
1753
+ parameters?: LayoutRailingParametersJson;
1754
+ }
1755
+
1756
+ declare interface LayoutRailingMaterials {
1757
+ surface: SpaceGraphMaterialJson;
1758
+ }
1759
+
1760
+ declare type LayoutRailingParameters = DimensionParameters & CommonParameters_5;
1761
+
1762
+ declare type LayoutRailingParametersJson = DimensionParameters & Partial<CommonParameters_5>;
1763
+
1764
+ declare type LayoutRailingType = typeof LayoutRailingTypeValue;
1765
+
1766
+ declare const LayoutRailingTypeValue = "element:railing";
1767
+
1768
+ declare class LayoutRamp extends LayoutTransformElementBase {
1769
+ type: LayoutRampType;
1770
+ parameters: LayoutRampParameters;
1771
+ constructor(id: string);
1772
+ }
1773
+
1774
+ declare interface LayoutRampJson extends LayoutTransformElementBaseJson {
1775
+ type: LayoutRampType;
1776
+ parameters?: LayoutRampParametersJson;
1777
+ }
1778
+
1779
+ declare interface LayoutRampMaterials {
1780
+ top: SpaceGraphMaterialJson;
1781
+ bottom: SpaceGraphMaterialJson;
1782
+ sides: SpaceGraphMaterialJson;
1783
+ }
1784
+
1785
+ declare type LayoutRampParameters = DimensionParameters & CommonParameters_6;
1786
+
1787
+ declare type LayoutRampParametersJson = DimensionParameters & Partial<CommonParameters_6>;
1788
+
1789
+ declare type LayoutRampType = typeof LayoutRampTypeValue;
1790
+
1791
+ declare const LayoutRampTypeValue = "element:ramp";
1792
+
1793
+ declare class LayoutRoof extends LayoutTransformElementBase {
1794
+ type: LayoutRoofType;
1795
+ parameters: LayoutRoofParameters;
1796
+ constructor(id: string);
1797
+ }
1798
+
1799
+ declare interface LayoutRoofJson extends LayoutTransformElementBaseJson {
1800
+ type: LayoutRoofType;
1801
+ parameters?: LayoutRoofParametersJson;
1802
+ }
1803
+
1804
+ declare interface LayoutRoofMaterials {
1805
+ }
1806
+
1807
+ declare interface LayoutRoofParameters {
1808
+ materials: LayoutRoofMaterials;
1809
+ }
1810
+
1811
+ declare type LayoutRoofParametersJson = Partial<LayoutRoofParameters>;
1812
+
1813
+ declare type LayoutRoofType = typeof LayoutRoofTypeValue;
1814
+
1815
+ declare const LayoutRoofTypeValue = "element:roof";
1816
+
1817
+ declare class LayoutSlab extends LayoutTransformElementBase {
1818
+ type: LayoutSlabType;
1819
+ parameters: LayoutSlabParameters;
1820
+ constructor(id: string);
1821
+ setParameters(parameters: RecursivePartial<LayoutSlabParameters>): void;
1822
+ }
1823
+
1824
+ declare interface LayoutSlabJson extends LayoutTransformElementBaseJson {
1825
+ type: LayoutSlabType;
1826
+ parameters?: LayoutSlabParametersJson;
1827
+ }
1828
+
1829
+ declare interface LayoutSlabMaterials {
1830
+ top: SpaceGraphMaterialJson;
1831
+ bottom: SpaceGraphMaterialJson;
1832
+ sides: SpaceGraphMaterialJson;
1833
+ }
1834
+
1835
+ declare interface LayoutSlabParameters {
1836
+ profile: LayoutSlabProfile;
1837
+ height: number;
1838
+ materials: LayoutSlabMaterials;
1839
+ }
1840
+
1841
+ declare type LayoutSlabParametersJson = Partial<LayoutSlabParameters>;
1842
+
1843
+ declare type LayoutSlabProfile = RectangleCurve | CircleCurve | PolygonCurve | PolygonWithHolesCurve;
1844
+
1845
+ declare type LayoutSlabType = typeof LayoutSlabTypeValue;
1846
+
1847
+ declare const LayoutSlabTypeValue = "element:slab";
1848
+
1849
+ declare class LayoutSpace extends LayoutNodeBase {
1850
+ type: LayoutSpaceType;
1851
+ attributes: LayoutSpaceAttributes;
1852
+ boundaries: LayoutBoundary[];
1853
+ geometry: LayoutSpaceGeometry;
1854
+ slabs: LayoutBoundarySlab[];
1855
+ constructor(id: string, boundaries: LayoutBoundary[]);
1856
+ copyForClone(space: LayoutSpace): void;
1857
+ setId(id: string): void;
1858
+ setAttributes(attributes: LayoutSpaceAttributesJson): void;
1859
+ get isExternal(): boolean;
1860
+ getArea(): number;
1861
+ getAdjacentSpaces(graph: Graph, { connectivity }?: {
1862
+ connectivity?: number;
1863
+ }): LayoutSpace[];
1864
+ getElements(types?: string | string[]): LayoutElement[];
1865
+ getBoundaryFromVertex(vertex: SpatialGraphVertex): {
1866
+ boundary: LayoutBoundary | undefined;
1867
+ itemIndex: number;
1868
+ };
1869
+ getBoundaryFromEdge(edge: SpatialGraphEdge): {
1870
+ boundary: LayoutBoundary | undefined;
1871
+ edgeIndex: number;
1872
+ };
1873
+ getBoundingBox(): TransformBoundingBox3d;
1874
+ getAxisAlignedBoundingBox(): BoundingBox3d;
1875
+ getBoundingBoxContour(): Vector2[];
1876
+ attachSlab(slab: LayoutBoundarySlab): void;
1877
+ detachSlab(slab: LayoutBoundarySlab): void;
1878
+ toJSON(): LayoutSpaceJson;
1879
+ }
1880
+
1881
+ declare interface LayoutSpaceAttributes {
1882
+ usage: string;
1883
+ program: string;
1884
+ }
1885
+
1886
+ declare interface LayoutSpaceAttributesJson {
1887
+ usage?: string;
1888
+ program?: string;
1889
+ }
1890
+
1891
+ declare class LayoutSpaceDivider extends LayoutEdgeElementBase {
1892
+ type: LayoutSpaceDividerType;
1893
+ parameters: LayoutSpaceDividerParameters;
1894
+ constructor(id: string, edges: SpatialGraphEdge[]);
1895
+ setParameters(parameters: RecursivePartial<LayoutSpaceDividerParameters>): void;
1896
+ getBoundingBox(): TransformBoundingBox3d;
1897
+ }
1898
+
1899
+ declare interface LayoutSpaceDividerJson extends LayoutEdgeElementBaseJson {
1900
+ type: LayoutSpaceDividerType;
1901
+ parameters?: LayoutSpaceDividerParametersJson;
1902
+ }
1903
+
1904
+ declare interface LayoutSpaceDividerParameters {
1905
+ }
1906
+
1907
+ declare type LayoutSpaceDividerParametersJson = Partial<LayoutSpaceDividerParameters>;
1908
+
1909
+ declare type LayoutSpaceDividerType = typeof LayoutSpaceDividerTypeValue;
1910
+
1911
+ declare const LayoutSpaceDividerTypeValue = "element:spaceDivider";
1912
+
1913
+ declare interface LayoutSpaceGeometry {
1914
+ polygons: Vector2[][];
1915
+ }
1916
+
1917
+ declare interface LayoutSpaceJson extends LayoutNodeBaseJson {
1918
+ type: LayoutSpaceType;
1919
+ boundaries: LayoutBoundaryJson[];
1920
+ attributes?: LayoutSpaceAttributesJson;
1921
+ }
1922
+
1923
+ declare type LayoutSpaceType = typeof LayoutSpaceTypeValue;
1924
+
1925
+ declare const LayoutSpaceTypeValue = "layout:space";
1926
+
1927
+ declare class LayoutSpatialGraph {
1928
+ layout: SpaceGraphLayout;
1929
+ vertices: SpatialGraphVertex[];
1930
+ verticesById: Record<string, SpatialGraphVertex>;
1931
+ edges: SpatialGraphEdge[];
1932
+ edgesById: Record<string, SpatialGraphEdge>;
1933
+ graphChanged: boolean;
1934
+ debugVertexCount: number;
1935
+ debugEdgeCount: number;
1936
+ constructor(layout: SpaceGraphLayout);
1937
+ emit<EventType extends keyof SpaceGraphEventMap>(event: EventType, ...args: SpaceGraphEventMap[EventType]): void;
1938
+ copyForClone(spatialGraph: LayoutSpatialGraph): void;
1939
+ deleteVertexAtIndex(vertexIndex: number, removeNodes: boolean): SpatialGraphVertex | undefined;
1940
+ deleteEdgeAtIndex(edgeIndex: number, removeNodes: boolean): SpatialGraphEdge | undefined;
1941
+ insertVertex(vertex: SpatialGraphVertex): void;
1942
+ removeVertex(vertex: SpatialGraphVertex, removeNodes?: boolean): SpatialGraphVertex | undefined;
1943
+ removeVertexAtIndex(vertexIndex: number, removeNodes?: boolean): SpatialGraphVertex | undefined;
1944
+ removeVertexById(id: string, removeNodes?: boolean): SpatialGraphVertex | undefined;
1945
+ insertEdge(edge: SpatialGraphEdge, splitSpace?: boolean): void;
1946
+ removeEdge(edge: SpatialGraphEdge, removeNodes?: boolean): SpatialGraphEdge | undefined;
1947
+ removeEdgeAtIndex(edgeIndex: number, removeNodes?: boolean): SpatialGraphEdge | undefined;
1948
+ removeEdgeById(id: string, removeNodes?: boolean): SpatialGraphEdge | undefined;
1949
+ getEdgeFromVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): SpatialGraphEdge | undefined;
1950
+ getVertexId(prefix?: string): string;
1951
+ getEdgeId(prefix?: string): string;
1952
+ createVertex(id: string, x: number, y: number): SpatialGraphVertex;
1953
+ createEdge(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex, splitSpace?: boolean): SpatialGraphEdge;
1954
+ createEdgeByVertexIds(id: string, vertexId1: string, vertexId2: string, splitSpace?: boolean): SpatialGraphEdge;
1955
+ toJSON(): LayoutSpatialGraphJson;
1956
+ }
1957
+
1958
+ declare interface LayoutSpatialGraphJson {
1959
+ vertices: SpatialGraphVertexJson[];
1960
+ edges: SpatialGraphEdgeJson[];
1961
+ }
1962
+
1963
+ declare class LayoutStairFlight extends LayoutTransformElementBase {
1964
+ type: LayoutStairFlightType;
1965
+ parameters: LayoutStairFlightParameters;
1966
+ constructor(id: string);
1967
+ setParameters(parameters: RecursivePartial<LayoutStairFlightParameters>): void;
1968
+ }
1969
+
1970
+ declare interface LayoutStairFlightJson extends LayoutTransformElementBaseJson {
1971
+ type: LayoutStairFlightType;
1972
+ parameters?: LayoutStairFlightParametersJson;
1973
+ }
1974
+
1975
+ declare interface LayoutStairFlightMaterials {
1976
+ steps: SpaceGraphMaterialJson;
1977
+ tread: SpaceGraphMaterialJson;
1978
+ }
1979
+
1980
+ declare type LayoutStairFlightParameters = StraightStairFlightParameters | SpiralStairFlightParameters;
1981
+
1982
+ declare type LayoutStairFlightParametersJson = StraightStairFlightParametersJson | SpiralStairFlightParametersJson;
1983
+
1984
+ declare type LayoutStairFlightType = typeof LayoutStairFlightTypeValue;
1985
+
1986
+ declare const LayoutStairFlightTypeValue = "element:stairFlight";
1987
+
1988
+ declare class LayoutStairs extends LayoutTransformElementBase {
1989
+ type: LayoutStairsType;
1990
+ parameters: LayoutStairsParameters;
1991
+ constructor(id: string);
1992
+ setParameters(parameters: RecursivePartial<LayoutStairsParameters>, skipElementCreation?: boolean): void;
1993
+ getBoundingBox(localTransform?: boolean): {
1994
+ min: Vector3;
1995
+ max: Vector3;
1996
+ transform: Transform3d;
1997
+ };
1998
+ }
1999
+
2000
+ declare interface LayoutStairsJson extends LayoutTransformElementBaseJson {
2001
+ type: LayoutStairsType;
2002
+ parameters?: LayoutStairsParametersJson;
2003
+ }
2004
+
2005
+ declare interface LayoutStairsMaterials {
2006
+ steps: SpaceGraphMaterialJson;
2007
+ tread: SpaceGraphMaterialJson;
2008
+ railing: SpaceGraphMaterialJson;
2009
+ }
2010
+
2011
+ declare type LayoutStairsParameters = StraightStairsParameters | OrthogonalStairsParameters | SpiralStairsParameters | CustomStairsParameters;
2012
+
2013
+ declare type LayoutStairsParametersJson = StraightStairsParametersJson | OrthogonalStairsParametersJson | SpiralStairsParametersJson | CustomStairsParametersJson;
2014
+
2015
+ declare type LayoutStairsType = typeof LayoutStairsTypeValue;
2016
+
2017
+ declare const LayoutStairsTypeValue = "element:stairs";
2018
+
2019
+ declare type LayoutTransformElement = LayoutAsset | LayoutBeam | LayoutCasework | LayoutColumn | LayoutDoor | LayoutGeneric | LayoutKitchen | LayoutRailing | LayoutRamp | LayoutRoof | LayoutSlab | LayoutStairs | LayoutStairFlight | LayoutWindow;
2020
+
2021
+ declare class LayoutTransformElementBase extends LayoutElementBase {
2022
+ type: LayoutTransformElementType;
2023
+ parameters: LayoutTransformElementParameters;
2024
+ position: Vector3;
2025
+ rotation: number;
2026
+ rotationAxis: Vector3;
2027
+ constructor(id: string, type: LayoutTransformElementType);
2028
+ copyForClone(transformElement: LayoutTransformElement): void;
2029
+ setPosition(position: Vector3): void;
2030
+ setRotation(rotation: number, rotationAxis?: Vector3): void;
2031
+ setTransform(position: Vector3, rotation: number, rotationAxis?: Vector3): void;
2032
+ getSpaces(): LayoutSpace[];
2033
+ getTransform(): Transform3d;
2034
+ getWorldTransform(): Transform3d;
2035
+ getBoundingBox(localTransform?: boolean): {
2036
+ min: Vector3;
2037
+ max: Vector3;
2038
+ transform: Transform3d;
2039
+ };
2040
+ setParameters(parameters: RecursivePartial<LayoutTransformElementParameters>): void;
2041
+ }
2042
+
2043
+ declare interface LayoutTransformElementBaseJson extends LayoutElementBaseJson {
2044
+ type: LayoutTransformElementType;
2045
+ position: Vector3;
2046
+ rotation?: number;
2047
+ rotationAxis?: Vector3;
2048
+ parameters?: LayoutTransformElementParametersJson;
2049
+ }
2050
+
2051
+ declare type LayoutTransformElementJson = LayoutAssetJson | LayoutBeamJson | LayoutCaseworkJson | LayoutColumnJson | LayoutDoorJson | LayoutGenericJson | LayoutKitchenJson | LayoutRailingJson | LayoutRampJson | LayoutRoofJson | LayoutSlabJson | LayoutStairFlightJson | LayoutStairsJson | LayoutWindowJson;
2052
+
2053
+ declare type LayoutTransformElementParameters = LayoutAssetParameters | LayoutBeamParameters | LayoutCaseworkParameters | LayoutColumnParameters | LayoutDoorParameters | LayoutGenericParameters | LayoutKitchenParameters | LayoutRailingParameters | LayoutRampParameters | LayoutRoofParameters | LayoutSlabParameters | LayoutStairsParameters | LayoutStairFlightParameters | LayoutWindowParameters;
2054
+
2055
+ declare type LayoutTransformElementParametersJson = LayoutBeamParametersJson | LayoutCaseworkParametersJson | LayoutColumnParametersJson | LayoutDoorParametersJson | LayoutGenericParametersJson | LayoutKitchenParametersJson | LayoutRailingParametersJson | LayoutRampParametersJson | LayoutRoofParametersJson | LayoutSlabParametersJson | LayoutStairFlightParametersJson | LayoutStairsParametersJson | LayoutWindowParametersJson;
2056
+
2057
+ declare type LayoutTransformElementType = LayoutAssetType | LayoutBeamType | LayoutCaseworkType | LayoutColumnType | LayoutDoorType | LayoutGenericType | LayoutKitchenType | LayoutRailingType | LayoutRampType | LayoutRoofType | LayoutSlabType | LayoutStairsType | LayoutStairFlightType | LayoutWindowType;
2058
+
2059
+ declare type LayoutType = typeof LayoutTypeValue;
2060
+
2061
+ declare const LayoutTypeValue = "spatialStructure:layout";
2062
+
2063
+ declare class LayoutUpdate extends OperationBase {
2064
+ type: typeof LayoutUpdateTypeValue;
2065
+ value: LayoutUpdateValue;
2066
+ constructor(node: SpaceGraphLayout | string, value: LayoutUpdateValue, previousValue?: LayoutUpdateValue);
2067
+ private setPreviousValue;
2068
+ private update;
2069
+ do(layout: SpaceGraphLayout): void;
2070
+ undo(layout: SpaceGraphLayout): void;
2071
+ }
2072
+
2073
+ declare type LayoutUpdateOperationJson = Pick<LayoutUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<LayoutUpdate, 'previousValue'>>;
2074
+
2075
+ declare const LayoutUpdateTypeValue = "operation:layoutUpdate";
2076
+
2077
+ declare type LayoutUpdateValue = Partial<SpaceGraphNodeWithCustomAttributesBaseJson>;
2078
+
2079
+ declare type LayoutView = Layout2dView | Layout3dView;
2080
+
2081
+ declare class LayoutViewBase extends LayoutNodeBase {
2082
+ type: LayoutViewType;
2083
+ parameters: LayoutViewParameters;
2084
+ copyForClone(view: LayoutView): void;
2085
+ setParameters(parameters: RecursivePartial<LayoutViewParameters>): void;
2086
+ toJSON(): LayoutViewJson;
2087
+ }
2088
+
2089
+ declare interface LayoutViewBaseJson extends LayoutNodeBaseJson {
2090
+ type: LayoutViewType;
2091
+ parameters?: LayoutViewParametersJson;
2092
+ }
2093
+
2094
+ declare type LayoutViewJson = Layout2dViewJson | Layout3dViewJson;
2095
+
2096
+ declare type LayoutViewParameters = Layout2dViewParameters | Layout3dViewParameters;
2097
+
2098
+ declare type LayoutViewParametersJson = Layout2dViewParametersJson | Layout3dViewParametersJson;
2099
+
2100
+ declare type LayoutViewType = Layout2dViewType | Layout3dViewType;
2101
+
2102
+ declare class LayoutWall extends LayoutEdgeElementBase {
2103
+ type: LayoutWallType;
2104
+ parameters: LayoutWallParameters;
2105
+ geometryProfile: LayoutWallGeometryProfile;
2106
+ constructor(id: string, edges: SpatialGraphEdge[]);
2107
+ copyForClone(wall: LayoutWall): void;
2108
+ setParameters(parameters: RecursivePartial<LayoutWallParameters>): void;
2109
+ getBoundingBox(): TransformBoundingBox3d;
2110
+ }
2111
+
2112
+ declare interface LayoutWallGeometryProfile {
2113
+ valid: boolean;
2114
+ skipped: boolean;
2115
+ selfIntersecting: boolean;
2116
+ sidePoints1: Vector2[];
2117
+ sidePoints2: Vector2[];
2118
+ joinPoints1: Vector2[];
2119
+ joinPoints2: Vector2[];
2120
+ points: Vector2[];
2121
+ }
2122
+
2123
+ declare interface LayoutWallJson extends LayoutEdgeElementBaseJson {
2124
+ type: LayoutWallType;
2125
+ parameters?: LayoutWallParametersJson;
2126
+ }
2127
+
2128
+ declare interface LayoutWallMaterials {
2129
+ top: SpaceGraphMaterialJson;
2130
+ bottom: SpaceGraphMaterialJson;
2131
+ side1: SpaceGraphMaterialJson;
2132
+ side2: SpaceGraphMaterialJson;
2133
+ join1: SpaceGraphMaterialJson;
2134
+ join2: SpaceGraphMaterialJson;
2135
+ }
2136
+
2137
+ declare interface LayoutWallParameters {
2138
+ /** @minimum 0.01 */
2139
+ width: number;
2140
+ /** @minimum 0.01 */
2141
+ height: number;
2142
+ offset: number;
2143
+ elevation: number;
2144
+ materials: LayoutWallMaterials;
2145
+ }
2146
+
2147
+ declare type LayoutWallParametersJson = Partial<LayoutWallParameters>;
2148
+
2149
+ declare type LayoutWallType = typeof LayoutWallTypeValue;
2150
+
2151
+ declare const LayoutWallTypeValue = "element:wall";
2152
+
2153
+ declare class LayoutWindow extends LayoutTransformElementBase {
2154
+ type: LayoutWindowType;
2155
+ parameters: LayoutWindowParameters;
2156
+ constructor(id: string);
2157
+ setParameters(parameters: RecursivePartial<LayoutWindowParameters>): void;
2158
+ }
2159
+
2160
+ declare interface LayoutWindowJson extends LayoutTransformElementBaseJson {
2161
+ type: LayoutWindowType;
2162
+ parameters?: LayoutWindowParametersJson;
2163
+ }
2164
+
2165
+ declare interface LayoutWindowMaterials {
2166
+ frame: SpaceGraphMaterialJson;
2167
+ panel: SpaceGraphMaterialJson;
2168
+ }
2169
+
2170
+ declare type LayoutWindowParameters = DimensionParameters_3 & CommonParameters_7;
2171
+
2172
+ declare type LayoutWindowParametersJson = DimensionParameters_3 & Partial<CommonParameters_7>;
2173
+
2174
+ declare type LayoutWindowType = typeof LayoutWindowTypeValue;
2175
+
2176
+ declare const LayoutWindowTypeValue = "element:window";
2177
+
2178
+ declare interface LineCurve extends CurveBase {
2179
+ type: LineCurveType;
2180
+ start: Vector2;
2181
+ end: Vector2;
2182
+ }
2183
+
2184
+ declare interface LineCurve_2 extends BaseShape {
2185
+ type: 'curve:line';
2186
+ start: Vector2_2;
2187
+ end: Vector2_2;
2188
+ }
2189
+
2190
+ declare type LineCurveType = typeof LineCurveTypeValue;
2191
+
2192
+ declare const LineCurveTypeValue = "curve:line";
2193
+
2194
+ declare class MaterialCreate extends OperationBase {
2195
+ type: typeof MaterialCreateTypeValue;
2196
+ value: SpaceGraphMaterialResourceJson;
2197
+ constructor(value: SpaceGraphMaterialResourceJson);
2198
+ do(layout: SpaceGraphLayout): void;
2199
+ undo(layout: SpaceGraphLayout): void;
2200
+ }
2201
+
2202
+ declare type MaterialCreateOperationJson = Pick<MaterialCreate, 'type' | 'value'>;
2203
+
2204
+ declare const MaterialCreateTypeValue: "operation:materialCreate";
2205
+
2206
+ declare class MaterialRemove extends OperationBase {
2207
+ type: typeof MaterialRemoveTypeValue;
2208
+ previousValue: SpaceGraphMaterialResourceJson;
2209
+ constructor(node: SpaceGraphMaterial | string, previousValue?: SpaceGraphMaterialResourceJson);
2210
+ do(layout: SpaceGraphLayout): void;
2211
+ undo(layout: SpaceGraphLayout): void;
2212
+ }
2213
+
2214
+ declare type MaterialRemoveOperationJson = Pick<MaterialRemove, 'nodeId' | 'type'> & Partial<Pick<MaterialRemove, 'previousValue'>>;
2215
+
2216
+ declare const MaterialRemoveTypeValue: "operation:materialRemove";
2217
+
2218
+ declare class MaterialUpdate extends OperationBase {
2219
+ type: typeof MaterialUpdateTypeValue;
2220
+ value: MaterialUpdateValue;
2221
+ previousValue: MaterialUpdateValue;
2222
+ constructor(node: SpaceGraphMaterial | string, value: MaterialUpdateValue, previousValue?: MaterialUpdateValue);
2223
+ private setPreviousValue;
2224
+ do(layout: SpaceGraphLayout): void;
2225
+ undo(layout: SpaceGraphLayout): void;
2226
+ private updateMaterial;
2227
+ private updateBasicMaterial;
2228
+ private updateColorMaterial;
2229
+ private updateStandardMaterial;
2230
+ }
2231
+
2232
+ declare type MaterialUpdateOperationJson = Pick<MaterialUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<MaterialUpdate, 'previousValue'>>;
2233
+
2234
+ declare const MaterialUpdateTypeValue: "operation:materialUpdate";
2235
+
2236
+ declare type MaterialUpdateValue = Partial<SpaceGraphMaterialResourceJson>;
2237
+
2238
+ declare class MeshGeometry extends GeometryBase {
2239
+ type: MeshGeometryType;
2240
+ vertices: number[];
2241
+ indices: number[];
2242
+ normals: ParametricNormals | number[];
2243
+ uvs: ParametricUvs | number[];
2244
+ constructor(id: string);
2245
+ }
2246
+
2247
+ declare interface MeshGeometryJson extends GeometryBaseJson {
2248
+ type: MeshGeometryType;
2249
+ vertices: number[];
2250
+ indices: number[];
2251
+ normals?: ParametricNormals | number[];
2252
+ uvs?: ParametricUvs | number[];
2253
+ }
2254
+
2255
+ declare type MeshGeometryType = typeof MeshGeometryTypeValue;
2256
+
2257
+ declare const MeshGeometryTypeValue = "geometry:mesh";
2258
+
2259
+ /**
2260
+ * Methods to expose to the remote window. May contain nested objects
2261
+ * with methods as well.
2262
+ */
2263
+ declare type Methods = {
2264
+ [index: string]: Methods | Function;
2265
+ };
2266
+
2267
+ declare type NodesByType<NodeMap extends NodeTypeMap = {}> = {
2268
+ -readonly [K in keyof NodeMap]: InstanceType<NodeMap[K]>[];
2269
+ };
2270
+
2271
+ declare type NodeSelection = {
2272
+ id: string;
2273
+ type: string;
2274
+ }[];
2275
+
2276
+ declare type NodeTypeMap = Record<string, any>;
2277
+
2278
+ declare interface NumberList extends SpaceGraphTypedValueJson {
2279
+ type: 'number:list';
2280
+ list: number[];
2281
+ }
2282
+
2283
+ declare interface NumberRange extends SpaceGraphTypedValueJson {
2284
+ type: 'number:range';
2285
+ range: {
2286
+ start: number;
2287
+ step: number;
2288
+ count: number;
2289
+ };
2290
+ }
2291
+
2292
+ declare type OpenCurve = LineCurve | PolylineCurve | ArcCurve;
2293
+
2294
+ declare type OpenCurves = LineCurve_2 | ArcCurve_2 | PolylineCurve_2 | BezierCurve;
2295
+
2296
+ declare type OpenCurveType = LineCurveType | PolylineCurveType | ArcCurveType;
2297
+
2298
+ declare class OperationBase {
2299
+ /** @format uuid */
2300
+ nodeId: string;
2301
+ type: string;
2302
+ value: any;
2303
+ previousValue: any;
2304
+ constructor(operationType: string, nodeId: string, value: any, previousValue: any);
2305
+ do(layout: SpaceGraphLayout): void;
2306
+ undo(layout: SpaceGraphLayout): void;
2307
+ }
2308
+
2309
+ /**
2310
+ * @discriminator type
2311
+ */
2312
+ declare type OperationJson = VertexCreateOperationJson | EdgeCreateOperationJson | SpaceCreateOperationJson | ElementCreateOperationJson | AnnotationCreateOperationJson | ViewCreateOperationJson | ProductCreateOperationJson | RelationCreateOperationJson | MaterialCreateOperationJson | CustomAttributeCreateOperationJson | VertexRemoveOperationJson | VertexUpdateOperationJson | VertexReplaceOperationJson | EdgeConnectOperationJson | EdgeRemoveOperationJson | EdgeReplaceOperationJson | EdgeMergeOperationJson | EdgeSplitOperationJson | EdgeUpdateOperationJson | SpaceUpdateOperationJson | SpaceRemoveOperationJson | ElementUpdateOperationJson | ElementRemoveOperationJson | AnnotationUpdateOperationJson | AnnotationRemoveOperationJson | ViewUpdateOperationJson | ViewRemoveOperationJson | ProductUpdateOperationJson | ProductRemoveOperationJson | RelationUpdateOperationJson | RelationRemoveOperationJson | RelationInsertNodesOperationJson | RelationRemoveNodesOperationJson | MaterialUpdateOperationJson | MaterialRemoveOperationJson | LayoutUpdateOperationJson | CustomAttributeUpdateOperationJson | CustomAttributeRemoveOperationJson;
2313
+
2314
+ declare type OrthogonalStairsParameters = {
2315
+ stairsType: OrthogonalStairsType;
2316
+ /** @minimum 0.01 */
2317
+ stepWidth: number;
2318
+ circulation: 'left' | 'right';
2319
+ } & DimensionParameters & CommonStairsParameters;
2320
+
2321
+ declare type OrthogonalStairsParametersJson = Partial<OrthogonalStairsParameters>;
2322
+
2323
+ declare type OrthogonalStairsType = 'halfLanding' | 'quarterLanding' | 'twoQuarterLanding' | 'winder' | 'doubleWinder';
2324
+
2325
+ declare type ParametricGeometry = PlaneGeometry | CuboidGeometry | SphereGeometry | ExtrusionGeometry;
2326
+
2327
+ declare class ParametricGeometryBase extends GeometryBase {
2328
+ normals: ParametricNormals | 'generator';
2329
+ uvs: ParametricUvs | 'generator';
2330
+ geometries: GeometryOperation[];
2331
+ constructor(id: string, type: ParametricGeometryType);
2332
+ }
2333
+
2334
+ declare interface ParametricGeometryBaseJson extends GeometryBaseJson {
2335
+ normals?: ParametricNormals | 'generator';
2336
+ uvs?: ParametricUvs | 'generator';
2337
+ geometries?: GeometryOperationJson[];
2338
+ }
2339
+
2340
+ declare type ParametricGeometryJson = PlaneGeometryJson | CuboidGeometryJson | SphereGeometryJson | ExtrusionGeometryJson;
2341
+
2342
+ declare type ParametricGeometryType = PlaneGeometryType | CuboidGeometryType | SphereGeometryType | ExtrusionGeometryType;
2343
+
2344
+ declare type ParametricNormals = 'none' | 'flat' | 'smooth';
2345
+
2346
+ declare type ParametricUvs = 'none' | 'automatic' | 'spherical';
2347
+
2348
+ declare interface Plane {
2349
+ position: Vector3;
2350
+ normal: Vector3;
2351
+ }
2352
+
2353
+ declare class PlaneGeometry extends ParametricGeometryBase {
2354
+ type: PlaneGeometryType;
2355
+ normal: Vector3;
2356
+ size: number;
2357
+ doubleSided: boolean;
2358
+ constructor(id: string);
2359
+ }
2360
+
2361
+ declare interface PlaneGeometryJson extends ParametricGeometryBaseJson {
2362
+ type: PlaneGeometryType;
2363
+ normal: Vector3;
2364
+ size: number;
2365
+ doubleSided: boolean;
2366
+ }
2367
+
2368
+ declare type PlaneGeometryType = typeof PlaneGeometryTypeValue;
2369
+
2370
+ declare const PlaneGeometryTypeValue = "geometry:plane";
2371
+
2372
+ declare type Polygon = Vector2_2[];
2373
+
2374
+ declare interface PolygonCurve extends CurveBase {
2375
+ type: PolygonCurveType;
2376
+ points: Vector2[];
2377
+ }
2378
+
2379
+ declare interface PolygonCurve_2 extends BaseShape {
2380
+ type: 'curve:polygon';
2381
+ points: Polygon;
2382
+ }
2383
+
2384
+ declare type PolygonCurveType = typeof PolygonCurveTypeValue;
2385
+
2386
+ declare const PolygonCurveTypeValue = "curve:polygon";
2387
+
2388
+ /** outer ring counter clockwise, inner rings ( holes ) clockwise */
2389
+ declare type PolygonWithHoles = Polygon[];
2390
+
2391
+ declare interface PolygonWithHolesCurve extends CurveBase {
2392
+ type: PolygonWithHolesCurveType;
2393
+ polygons: Vector2[][];
2394
+ }
2395
+
2396
+ declare interface PolygonWithHolesCurve_2 extends BaseShape {
2397
+ type: 'curve:polygonWithHoles';
2398
+ polygons: PolygonWithHoles;
2399
+ }
2400
+
2401
+ declare type PolygonWithHolesCurveType = typeof PolygonWithHolesCurveTypeValue;
2402
+
2403
+ declare const PolygonWithHolesCurveTypeValue = "curve:polygonWithHoles";
2404
+
2405
+ declare interface PolylineCurve extends CurveBase {
2406
+ type: PolylineCurveType;
2407
+ points: Vector2[];
2408
+ }
2409
+
2410
+ declare interface PolylineCurve_2 extends BaseShape {
2411
+ type: 'curve:polyline';
2412
+ points: Polygon;
2413
+ }
2414
+
2415
+ declare type PolylineCurveType = typeof PolylineCurveTypeValue;
2416
+
2417
+ declare const PolylineCurveTypeValue = "curve:polyline";
2418
+
2419
+ declare type PositionEntry = Vector3 | Vector3List | Vector3Range;
2420
+
2421
+ declare type PositionValue = {
2422
+ position: Vector2;
2423
+ };
2424
+
2425
+ declare class ProductCreate extends OperationBase {
2426
+ type: typeof ProductCreateTypeValue;
2427
+ value: ProductCreateValue;
2428
+ constructor(value: ProductCreateValue);
2429
+ do(layout: SpaceGraphLayout): void;
2430
+ undo(layout: SpaceGraphLayout): void;
2431
+ }
2432
+
2433
+ declare type ProductCreateOperationJson = Pick<ProductCreate, 'type' | 'value'>;
2434
+
2435
+ declare const ProductCreateTypeValue: "operation:productCreate";
2436
+
2437
+ declare type ProductCreateValue = SpaceGraphProductJson;
2438
+
2439
+ export declare interface ProductData extends BaseData {
2440
+ type: SpaceGraphProduct['type'];
2441
+ attributes: {
2442
+ category: string;
2443
+ subCategory: string;
2444
+ };
2445
+ }
2446
+
2447
+ declare class ProductRemove extends OperationBase {
2448
+ type: typeof ProductRemoveTypeValue;
2449
+ value: ProductRemoveValue;
2450
+ previousValue: ProductRemoveValue;
2451
+ constructor(node: SpaceGraphProduct | string, previousValue?: ProductRemoveValue);
2452
+ do(layout: SpaceGraphLayout): void;
2453
+ undo(layout: SpaceGraphLayout): void;
2454
+ }
2455
+
2456
+ declare type ProductRemoveOperationJson = Pick<ProductRemove, 'nodeId' | 'type'> & Partial<Pick<ProductRemove, 'previousValue'>>;
2457
+
2458
+ declare const ProductRemoveTypeValue: "operation:productRemove";
2459
+
2460
+ declare type ProductRemoveValue = SpaceGraphProductJson;
2461
+
2462
+ declare class ProductUpdate extends OperationBase {
2463
+ type: typeof ProductUpdateTypeValue;
2464
+ value: ProductUpdateValue;
2465
+ constructor(node: SpaceGraphProduct | string, value: ProductUpdateValue, previousValue?: ProductUpdateValue);
2466
+ private setPreviousValue;
2467
+ do(layout: SpaceGraphLayout): void;
2468
+ undo(layout: SpaceGraphLayout): void;
2469
+ }
2470
+
2471
+ declare type ProductUpdateOperationJson = Pick<ProductUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<ProductUpdate, 'previousValue'>>;
2472
+
2473
+ declare const ProductUpdateTypeValue: "operation:productUpdate";
2474
+
2475
+ declare type ProductUpdateValue = Partial<SpaceGraphProductJson>;
2476
+
2477
+ declare interface RectangleCurve extends CurveBase {
2478
+ type: RectangleCurveType;
2479
+ dimensions: Vector2;
2480
+ }
2481
+
2482
+ declare interface RectangleCurve_2 extends BaseShape {
2483
+ type: 'curve:rectangle';
2484
+ position: Vector2_2;
2485
+ dimensions: [number, number];
2486
+ }
2487
+
2488
+ declare type RectangleCurveType = typeof RectangleCurveTypeValue;
2489
+
2490
+ declare const RectangleCurveTypeValue = "curve:rectangle";
2491
+
2492
+ declare type RecursivePartial<T> = T extends Array<any> ? {
2493
+ [K in keyof T]: RecursivePartial<T[K]>;
2494
+ } : T extends object ? {
2495
+ [P in keyof T]?: RecursivePartial<T[P]>;
2496
+ } : T;
2497
+
2498
+ declare class RelationCreate extends OperationBase {
2499
+ type: typeof RelationCreateTypeValue;
2500
+ value: SpaceGraphRelationJson;
2501
+ constructor(value: SpaceGraphRelationJson);
2502
+ do(layout: SpaceGraphLayout): void;
2503
+ undo(layout: SpaceGraphLayout): void;
2504
+ }
2505
+
2506
+ declare type RelationCreateOperationJson = Pick<RelationCreate, 'type' | 'value'>;
2507
+
2508
+ declare const RelationCreateTypeValue: "operation:relationCreate";
2509
+
2510
+ declare class RelationInsertNodes extends OperationBase {
2511
+ type: typeof RelationInsertNodesTypeValue;
2512
+ value: RelationInsertNodesValue;
2513
+ constructor(node: SpaceGraphRelation | string, value: RelationInsertNodesValue);
2514
+ do(layout: SpaceGraphLayout): void;
2515
+ undo(layout: SpaceGraphLayout): void;
2516
+ }
2517
+
2518
+ declare type RelationInsertNodesOperationJson = Pick<RelationInsertNodes, 'nodeId' | 'type' | 'value'>;
2519
+
2520
+ declare const RelationInsertNodesTypeValue: "operation:relationInsertNodes";
2521
+
2522
+ declare type RelationInsertNodesValue = string[];
2523
+
2524
+ declare class RelationRemove extends OperationBase {
2525
+ type: typeof RelationRemoveTypeValue;
2526
+ previousValue: SpaceGraphRelationJson;
2527
+ constructor(node: SpaceGraphRelation | string, previousValue?: SpaceGraphRelationJson);
2528
+ do(layout: SpaceGraphLayout): void;
2529
+ undo(layout: SpaceGraphLayout): void;
2530
+ }
2531
+
2532
+ declare class RelationRemoveNodes extends OperationBase {
2533
+ type: typeof RelationRemoveNodesTypeValue;
2534
+ value: RelationRemoveNodesValue;
2535
+ constructor(node: SpaceGraphRelation | string, value: RelationRemoveNodesValue);
2536
+ do(layout: SpaceGraphLayout): void;
2537
+ undo(layout: SpaceGraphLayout): void;
2538
+ }
2539
+
2540
+ declare type RelationRemoveNodesOperationJson = Pick<RelationRemoveNodes, 'nodeId' | 'type' | 'value'>;
2541
+
2542
+ declare const RelationRemoveNodesTypeValue: "operation:relationRemoveNodes";
2543
+
2544
+ declare type RelationRemoveNodesValue = string[];
2545
+
2546
+ declare type RelationRemoveOperationJson = Pick<RelationRemove, 'nodeId' | 'type'> & Partial<Pick<RelationRemove, 'previousValue'>>;
2547
+
2548
+ declare const RelationRemoveTypeValue: "operation:relationRemove";
2549
+
2550
+ declare class RelationUpdate extends OperationBase {
2551
+ type: typeof RelationUpdateTypeValue;
2552
+ value: RelationUpdateValue;
2553
+ previousValue: RelationUpdateValue;
2554
+ constructor(node: SpaceGraphRelation | string, value: RelationUpdateValue, previousValue?: RelationUpdateValue);
2555
+ private setPreviousValue;
2556
+ private update;
2557
+ do(layout: SpaceGraphLayout): void;
2558
+ undo(layout: SpaceGraphLayout): void;
2559
+ }
2560
+
2561
+ declare type RelationUpdateOperationJson = Pick<RelationUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<RelationUpdate, 'previousValue'>>;
2562
+
2563
+ declare const RelationUpdateTypeValue: "operation:relationUpdate";
2564
+
2565
+ declare type RelationUpdateValue = Omit<Partial<SpaceGraphRelationJson>, 'type'>;
2566
+
2567
+ /**
2568
+ * An object representing methods exposed by the remote but that can be called
2569
+ * locally.
2570
+ */
2571
+ export declare type RemoteProxy<TMethods extends Methods = Methods> = {
2572
+ [K in keyof TMethods]: TMethods[K] extends (...args: infer A) => infer R ? (...args: [...A, CallOptions?]) => Promise<ExtractValueFromReply<Awaited<R>>> : TMethods[K] extends Methods ? RemoteProxy<TMethods[K]> : never;
2573
+ };
2574
+
2575
+ declare class Reply<T = unknown> {
2576
+ #private;
2577
+ readonly value: T;
2578
+ readonly transferables?: Transferable[];
2579
+ constructor(value: T, options?: {
2580
+ transferables?: Transferable[];
2581
+ });
2582
+ }
2583
+
2584
+ declare type Rgb = [number, number, number];
2585
+
2586
+ declare type RgbA = [number, number, number, number];
2587
+
2588
+ declare type RotationEntry = number | NumberList | NumberRange;
2589
+
2590
+ declare interface SelectionResponse extends HostResponse {
2591
+ data: {
2592
+ selectedNodes: NodeSelection;
2593
+ };
2594
+ }
2595
+
2596
+ declare type Shape = PolygonCurve_2 | PolygonWithHolesCurve_2 | PolylineCurve_2 | RectangleCurve_2 | CircleCurve_2 | LineCurve_2 | GroupShape | TextShape | ArcCurve_2 | BezierCurve | CompositeCurve_2;
2597
+
2598
+ declare interface ShapeStyle {
2599
+ stroke?: string | number | number[];
2600
+ strokeWidth?: number | 'native';
2601
+ strokeOpacity?: number;
2602
+ fill?: string | number | number[] | false;
2603
+ fillOpacity?: number;
2604
+ dash?: boolean;
2605
+ alignment?: 0 | 0.5 | 1;
2606
+ }
2607
+
2608
+ declare class SpaceCreate extends OperationBase {
2609
+ type: typeof SpaceCreateTypeValue;
2610
+ value: SpaceCreateValue;
2611
+ constructor(value: SpaceCreateValue);
2612
+ do(layout: SpaceGraphLayout): void;
2613
+ undo(layout: SpaceGraphLayout): void;
2614
+ }
2615
+
2616
+ declare type SpaceCreateOperationJson = Pick<SpaceCreate, 'type' | 'value'>;
2617
+
2618
+ declare const SpaceCreateTypeValue: "operation:spaceCreate";
2619
+
2620
+ declare type SpaceCreateValue = LayoutSpaceJson;
2621
+
2622
+ export declare interface SpaceData extends BaseData {
2623
+ type: LayoutSpaceJson['type'];
2624
+ attributes: {
2625
+ category: string;
2626
+ subCategory: string;
2627
+ };
2628
+ area: number;
2629
+ labelPoint: Vector2;
2630
+ polygons: PolygonWithHoles;
2631
+ elements: ElementData[];
2632
+ }
2633
+
2634
+ declare class SpaceGraph {
2635
+ spatialStructure: SpaceGraphSpatialStructure;
2636
+ products: SpaceGraphProduct[];
2637
+ productsById: Record<string, SpaceGraphProduct>;
2638
+ productsByType: NodesByType<{
2639
+ readonly 'product:static': typeof SpaceGraphProduct;
2640
+ }>;
2641
+ customAttributes: SpaceGraphCustomAttribute[];
2642
+ customAttributesById: Record<string, SpaceGraphCustomAttribute>;
2643
+ customAttributesByType: NodesByType<{
2644
+ readonly 'customAttribute:definition': typeof SpaceGraphCustomAttribute;
2645
+ }>;
2646
+ geometries: SpaceGraphGeometryJson[];
2647
+ geometriesById: Record<string, SpaceGraphGeometryJson>;
2648
+ geometriesByType: NodesByType<{
2649
+ readonly 'geometry:plane': PlaneGeometry;
2650
+ readonly 'geometry:cuboid': CuboidGeometry;
2651
+ readonly 'geometry:sphere': SphereGeometry;
2652
+ readonly 'geometry:extrusion': ExtrusionGeometry;
2653
+ readonly 'geometry:mesh': MeshGeometry;
2654
+ readonly 'geometry:uri': UriGeometry;
2655
+ }>;
2656
+ materials: SpaceGraphMaterial[];
2657
+ materialsById: Record<string, SpaceGraphMaterial>;
2658
+ materialsByType: NodesByType<{
2659
+ readonly 'material:embedded': typeof SpaceGraphEmbeddedMaterial;
2660
+ readonly 'material:basic': typeof SpaceGraphBasicMaterial;
2661
+ readonly 'material:color': typeof SpaceGraphColorMaterial;
2662
+ readonly 'material:standard': typeof SpaceGraphStandardMaterial;
2663
+ }>;
2664
+ relations: SpaceGraphRelation[];
2665
+ relationsById: Record<string, SpaceGraphRelation>;
2666
+ relationsByType: NodesByType<{
2667
+ readonly 'relation:group': typeof GroupRelation;
2668
+ }>;
2669
+ nodes: SpaceGraphNode[];
2670
+ nodesById: Record<string, SpaceGraphNode>;
2671
+ nodesByType: NodesByType<{
2672
+ readonly 'spatialStructure:building': typeof SpaceGraphBuilding;
2673
+ readonly 'spatialStructure:floor': typeof SpaceGraphFloor;
2674
+ readonly 'spatialStructure:layout': typeof SpaceGraphLayout;
2675
+ readonly 'relation:group': typeof GroupRelation;
2676
+ readonly 'product:static': typeof SpaceGraphProduct;
2677
+ readonly 'material:embedded': typeof SpaceGraphEmbeddedMaterial;
2678
+ readonly 'material:basic': typeof SpaceGraphBasicMaterial;
2679
+ readonly 'material:color': typeof SpaceGraphColorMaterial;
2680
+ readonly 'material:standard': typeof SpaceGraphStandardMaterial;
2681
+ readonly 'geometry:plane': PlaneGeometry;
2682
+ readonly 'geometry:cuboid': CuboidGeometry;
2683
+ readonly 'geometry:sphere': SphereGeometry;
2684
+ readonly 'geometry:extrusion': ExtrusionGeometry;
2685
+ readonly 'geometry:mesh': MeshGeometry;
2686
+ readonly 'geometry:uri': UriGeometry;
2687
+ readonly 'spatialGraph:edge': SpatialGraphEdge;
2688
+ readonly 'spatialGraph:vertex': SpatialGraphVertex;
2689
+ readonly 'layout:space': LayoutSpace;
2690
+ readonly 'view:2d': Layout2dView;
2691
+ readonly 'view:3d': Layout3dView;
2692
+ readonly 'annotation:floorPlanDxf': LayoutFloorPlanDxfAnnotation;
2693
+ readonly 'annotation:floorPlanImage': LayoutFloorPlanImageAnnotation;
2694
+ readonly 'element:ceiling': LayoutBoundarySlab;
2695
+ readonly 'element:floor': LayoutBoundarySlab;
2696
+ readonly 'element:boundaryWall': LayoutBoundaryWall;
2697
+ readonly 'element:curtainWall': LayoutCurtainWall;
2698
+ readonly 'element:spaceDivider': LayoutSpaceDivider;
2699
+ readonly 'element:wall': LayoutWall;
2700
+ readonly 'element:opening': LayoutOpening;
2701
+ readonly 'element:asset': LayoutAsset;
2702
+ readonly 'element:beam': LayoutBeam;
2703
+ readonly 'element:casework': LayoutCasework;
2704
+ readonly 'element:column': LayoutColumn;
2705
+ readonly 'element:door': LayoutDoor;
2706
+ readonly 'element:generic': LayoutGeneric;
2707
+ readonly 'element:kitchen': LayoutKitchen;
2708
+ readonly 'element:railing': LayoutRailing;
2709
+ readonly 'element:ramp': LayoutRamp;
2710
+ readonly 'element:roof': LayoutRoof;
2711
+ readonly 'element:slab': LayoutSlab;
2712
+ readonly 'element:stairs': LayoutStairs;
2713
+ readonly 'element:stairFlight': LayoutStairFlight;
2714
+ readonly 'element:window': LayoutWindow;
2715
+ }>;
2716
+ sourceSchemaVersion: string | undefined;
2717
+ private emitter;
2718
+ constructor(sourceSchemaVersion?: string);
2719
+ getEvents(): Record<string, Function>;
2720
+ copyEvents(spaceGraph: SpaceGraph): void;
2721
+ deleteNodeAtIndex(nodeIndex: number, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: NodesByType<Record<string, SpaceGraphNode>>): SpaceGraphNode | undefined;
2722
+ insertNode(node: SpaceGraphNode, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: NodesByType<Record<string, SpaceGraphNode>>): void;
2723
+ removeNode(node: SpaceGraphNode, nodes: SpaceGraphNode[], nodesById: Record<string, SpaceGraphNode>, nodesByType: NodesByType<Record<string, SpaceGraphNode>>): SpaceGraphNode | undefined;
2724
+ registerNode(node: SpaceGraphNode): void;
2725
+ unregisterNode(node: SpaceGraphNode): void;
2726
+ insertSpatialStructure(spatialStructure: SpaceGraphSpatialStructure): void;
2727
+ removeSpatialStructure(): SpaceGraphSpatialStructure | undefined;
2728
+ createSpatialStructure(type: SpaceGraphBuildingType, id: string): SpaceGraphBuilding;
2729
+ createSpatialStructure(type: SpaceGraphFloorType, id: string): SpaceGraphFloor;
2730
+ createSpatialStructure(type: LayoutType, id: string): SpaceGraphLayout;
2731
+ createSpatialStructure(type: SpaceGraphSpatialStructureType, id: string): SpaceGraphSpatialStructure;
2732
+ insertProduct(product: SpaceGraphProduct): void;
2733
+ removeProduct(product: SpaceGraphProduct): void;
2734
+ createProduct(id: string): SpaceGraphProduct;
2735
+ insertGeometry(geometryJson: SpaceGraphGeometryJson): void;
2736
+ removeGeometry(geometryJson: SpaceGraphGeometryJson): void;
2737
+ insertMaterial(material: SpaceGraphMaterial): void;
2738
+ removeMaterial(material: SpaceGraphMaterial): void;
2739
+ createMaterial(type: SpaceGraphColorMaterialType, id: string, color: Rgb, opacity: number): SpaceGraphColorMaterial;
2740
+ createMaterial(type: SpaceGraphStandardMaterialType, id: string, reference: string): SpaceGraphStandardMaterial;
2741
+ createMaterial(type: SpaceGraphEmbeddedMaterialType, id: string, reference: string, format: SpaceGraphEmbeddedMaterialFormat): SpaceGraphEmbeddedMaterial;
2742
+ createMaterial(type: SpaceGraphBasicMaterialType, id: string): SpaceGraphBasicMaterial;
2743
+ insertRelation(relation: SpaceGraphRelation): void;
2744
+ removeRelation(relation: SpaceGraphRelation): void;
2745
+ createRelation(type: SpaceGraphRelationType, id: string): SpaceGraphRelation;
2746
+ insertCustomAttribute(customAttribute: SpaceGraphCustomAttribute): void;
2747
+ removeCustomAttribute(customAttribute: SpaceGraphCustomAttribute): void;
2748
+ getId(): string;
2749
+ emit<EventType extends keyof SpaceGraphEventMap>(event: EventType, ...args: SpaceGraphEventMap[EventType]): void;
2750
+ on<EventType extends keyof SpaceGraphEventMap>(event: EventType, handler: (...args: SpaceGraphEventMap[EventType]) => void, context?: any): void;
2751
+ once<EventType extends keyof SpaceGraphEventMap>(event: EventType, handler: (...args: SpaceGraphEventMap[EventType]) => void, context?: any): void;
2752
+ off<EventType extends keyof SpaceGraphEventMap>(event: EventType, handler?: (...args: SpaceGraphEventMap[EventType]) => void): void;
2753
+ toJSON(): SpaceGraphJson;
2754
+ }
2755
+
2756
+ declare class SpaceGraphBasicMaterial extends SpaceGraphNodeBase {
2757
+ type: SpaceGraphBasicMaterialType;
2758
+ colorDiffuse: Rgb;
2759
+ colorSpecular: Rgb;
2760
+ specularCoefficient: number;
2761
+ opacity: number;
2762
+ constructor(id: string);
2763
+ copyForClone(material: SpaceGraphBasicMaterial): void;
2764
+ toJSON(): SpaceGraphMaterialResourceJson;
2765
+ }
2766
+
2767
+ declare interface SpaceGraphBasicMaterialJson extends SpaceGraphMaterialBaseJson {
2768
+ type: SpaceGraphBasicMaterialType;
2769
+ colorDiffuse: Rgb;
2770
+ colorSpecular?: Rgb;
2771
+ specularCoefficient?: number;
2772
+ opacity?: number;
2773
+ }
2774
+
2775
+ declare type SpaceGraphBasicMaterialType = typeof SpaceGraphBasicMaterialTypeValue;
2776
+
2777
+ declare const SpaceGraphBasicMaterialTypeValue = "material:basic";
2778
+
2779
+ declare class SpaceGraphBuilding extends SpaceGraphSpatialStructureBase {
2780
+ type: SpaceGraphBuildingType;
2781
+ location: SpaceGraphLocation;
2782
+ floors: SpaceGraphFloor[];
2783
+ constructor(id: string);
2784
+ copyForClone(building: SpaceGraphBuilding): void;
2785
+ insertFloor(floor: SpaceGraphFloor): void;
2786
+ removeFloor(floor: SpaceGraphFloor): void;
2787
+ createFloor(id: string): SpaceGraphFloor;
2788
+ toJSON(): SpaceGraphBuildingJson;
2789
+ }
2790
+
2791
+ declare interface SpaceGraphBuildingJson extends SpaceGraphSpatialStructureBaseJson {
2792
+ type: SpaceGraphBuildingType;
2793
+ location?: SpaceGraphLocation;
2794
+ floors: SpaceGraphFloorJson[];
2795
+ }
2796
+
2797
+ declare type SpaceGraphBuildingType = typeof SpaceGraphBuildingTypeValue;
2798
+
2799
+ declare const SpaceGraphBuildingTypeValue = "spatialStructure:building";
2800
+
2801
+ declare class SpaceGraphColorMaterial extends SpaceGraphNodeBase {
2802
+ type: SpaceGraphColorMaterialType;
2803
+ color: Rgb;
2804
+ opacity: number;
2805
+ constructor(id: string, color?: Rgb, opacity?: number);
2806
+ toJSON(): SpaceGraphMaterialResourceJson;
2807
+ }
2808
+
2809
+ declare interface SpaceGraphColorMaterialJson extends SpaceGraphMaterialBaseJson {
2810
+ type: SpaceGraphColorMaterialType;
2811
+ value: Rgb | RgbA | string;
2812
+ }
2813
+
2814
+ declare type SpaceGraphColorMaterialType = typeof SpaceGraphColorMaterialTypeValue;
2815
+
2816
+ declare const SpaceGraphColorMaterialTypeValue = "material:color";
2817
+
2818
+ declare class SpaceGraphCustomAttribute extends SpaceGraphNodeBase {
2819
+ type: SpaceGraphCustomAttributeType;
2820
+ attributes: SpaceGraphCustomAttributeAttributes;
2821
+ constructor(id: string, attributesJson?: SpaceGraphCustomAttributeAttributesJson);
2822
+ getInputType(): CustomAttributeInputType;
2823
+ setAttributes(attributesJson: SpaceGraphCustomAttributeAttributesJson): void;
2824
+ copyForClone(customAttribute: SpaceGraphCustomAttribute): void;
2825
+ toJSON(): SpaceGraphCustomAttributeJson;
2826
+ }
2827
+
2828
+ declare type SpaceGraphCustomAttributeAttributes = {
2829
+ resourceType: CustomAttributeResourceType;
2830
+ schema: CustomAttributeSchema;
2831
+ updatedAt?: string;
2832
+ description?: string;
2833
+ };
2834
+
2835
+ declare type SpaceGraphCustomAttributeAttributesJson = {
2836
+ resourceType: CustomAttributeResourceType;
2837
+ valueType?: CustomAttributeValueType;
2838
+ schema?: CustomAttributeSchema;
2839
+ updatedAt?: string;
2840
+ /** @minLength 3 @maxLength 200 @type string */
2841
+ description?: string;
2842
+ };
2843
+
2844
+ declare interface SpaceGraphCustomAttributeJson extends SpaceGraphNodeBaseJson {
2845
+ /** @type string @minLength 3 @maxLength 70 @pattern ^(?![_-])[A-Za-z0-9_:-]*$ */
2846
+ id: string;
2847
+ /** @minLength 3 @maxLength 30 @type string */
2848
+ name: string;
2849
+ type: SpaceGraphCustomAttributeType;
2850
+ attributes: SpaceGraphCustomAttributeAttributesJson;
2851
+ }
2852
+
2853
+ declare type SpaceGraphCustomAttributeType = typeof SpaceGraphCustomAttributeTypeValue;
2854
+
2855
+ declare const SpaceGraphCustomAttributeTypeValue = "customAttribute:definition";
2856
+
2857
+ declare type SpaceGraphCustomAttributeValue = Record<string, string | boolean | number>;
2858
+
2859
+ declare type SpaceGraphCustomAttributeValueJson = Record<string, string | boolean | number | null>;
2860
+
2861
+ declare class SpaceGraphEmbeddedMaterial extends SpaceGraphNodeBase {
2862
+ type: SpaceGraphEmbeddedMaterialType;
2863
+ reference: string;
2864
+ format: SpaceGraphEmbeddedMaterialFormat;
2865
+ constructor(id: string, reference: string, format: SpaceGraphEmbeddedMaterialFormat);
2866
+ toJSON(): SpaceGraphMaterialResourceJson;
2867
+ }
2868
+
2869
+ declare type SpaceGraphEmbeddedMaterialFormat = 'data3d';
2870
+
2871
+ declare type SpaceGraphEmbeddedMaterialType = typeof SpaceGraphEmbeddedMaterialTypeValue;
2872
+
2873
+ declare const SpaceGraphEmbeddedMaterialTypeValue = "material:embedded";
2874
+
2875
+ declare interface SpaceGraphEventMap {
2876
+ 'spatial-structure-create': [SpaceGraphSpatialStructure];
2877
+ 'spatial-structure-delete': [SpaceGraphSpatialStructure];
2878
+ 'product-create': [SpaceGraphProduct];
2879
+ 'product-delete': [SpaceGraphProduct];
2880
+ 'material-create': [SpaceGraphMaterial];
2881
+ 'material-delete': [SpaceGraphMaterial];
2882
+ 'relation-create': [SpaceGraphRelation];
2883
+ 'relation-delete': [SpaceGraphRelation];
2884
+ 'custom-attribute-create': [SpaceGraphCustomAttribute];
2885
+ 'custom-attribute-delete': [SpaceGraphCustomAttribute];
2886
+ 'node-id-change': [SpaceGraphNodeBase, string];
2887
+ 'node-property-change': [SpaceGraphNodeBase, string];
2888
+ 'node-custom-attributes-change': [SpaceGraphNodeBase];
2889
+ 'vertex-create': [SpatialGraphVertex];
2890
+ 'vertex-delete': [SpatialGraphVertex];
2891
+ 'vertex-add-edge': [SpatialGraphVertex, SpatialGraphEdge];
2892
+ 'vertex-remove-edge': [SpatialGraphVertex, SpatialGraphEdge];
2893
+ 'vertex-set-position': [SpatialGraphVertex];
2894
+ 'edge-create': [SpatialGraphEdge];
2895
+ 'edge-delete': [SpatialGraphEdge];
2896
+ 'edge-set-vertices': [SpatialGraphEdge, {
2897
+ previousVertices: [SpatialGraphVertex, SpatialGraphVertex];
2898
+ }];
2899
+ 'space-create': [LayoutSpace];
2900
+ 'space-delete': [LayoutSpace];
2901
+ 'space-split': [LayoutSpace, [LayoutSpace, LayoutSpace]];
2902
+ 'space-attributes-change': [LayoutSpace];
2903
+ 'element-create': [LayoutElement];
2904
+ 'element-delete': [LayoutElement, LayoutElement | null];
2905
+ 'element-parameters-change': [LayoutElementBase];
2906
+ 'element-transform-change': [LayoutTransformElementBase];
2907
+ 'element-edges-change': [LayoutEdgeElementBase];
2908
+ 'annotation-create': [LayoutAnnotation];
2909
+ 'annotation-delete': [LayoutAnnotation];
2910
+ 'annotation-transform-change': [LayoutAnnotationBase];
2911
+ 'annotation-parameters-change': [LayoutAnnotationBase];
2912
+ 'view-create': [LayoutView];
2913
+ 'view-delete': [LayoutView];
2914
+ 'view-parameters-change': [LayoutViewBase];
2915
+ 'geometry-update': [LayoutElement];
2916
+ 'geometry-profile-update': [LayoutSpace | LayoutElement];
2917
+ }
2918
+
2919
+ declare class SpaceGraphFloor extends SpaceGraphSpatialStructureBase {
2920
+ type: SpaceGraphFloorType;
2921
+ parent: SpaceGraphBuilding | null;
2922
+ position: Vector3;
2923
+ rotation: number;
2924
+ layouts: SpaceGraphLayout[];
2925
+ constructor(id: string);
2926
+ copyForClone(floor: SpaceGraphFloor): void;
2927
+ insertLayout(layout: SpaceGraphLayout): void;
2928
+ removeLayout(layout: SpaceGraphLayout): void;
2929
+ createLayout(id: string): SpaceGraphLayout;
2930
+ toJSON(): SpaceGraphFloorJson;
2931
+ }
2932
+
2933
+ declare interface SpaceGraphFloorJson extends SpaceGraphSpatialStructureBaseJson {
2934
+ type: SpaceGraphFloorType;
2935
+ position: Vector3;
2936
+ rotation: number;
2937
+ layouts: SpaceGraphLayoutJson[];
2938
+ }
2939
+
2940
+ declare type SpaceGraphFloorType = typeof SpaceGraphFloorTypeValue;
2941
+
2942
+ declare const SpaceGraphFloorTypeValue = "spatialStructure:floor";
2943
+
2944
+ declare type SpaceGraphGeometry = ParametricGeometry | MeshGeometry | UriGeometry;
2945
+
2946
+ declare type SpaceGraphGeometryJson = ParametricGeometryJson | MeshGeometryJson | UriGeometryJson;
2947
+
2948
+ declare type SpaceGraphGeometryType = ParametricGeometryType | MeshGeometryType | UriGeometryType;
2949
+
2950
+ declare interface SpaceGraphJson {
2951
+ schemaVersion: string;
2952
+ spatialStructure: SpaceGraphSpatialStructureJson;
2953
+ sharedResources: SpaceGraphSharedResourcesJson;
2954
+ }
2955
+
2956
+ declare class SpaceGraphLayout extends SpaceGraphSpatialStructureBase {
2957
+ type: LayoutType;
2958
+ parent: SpaceGraphFloor | null;
2959
+ spatialGraph: LayoutSpatialGraph;
2960
+ spaces: LayoutSpace[];
2961
+ spacesById: Record<string, LayoutSpace>;
2962
+ elements: LayoutElement[];
2963
+ elementsById: Record<string, LayoutElement>;
2964
+ elementsByType: NodesByType< {
2965
+ readonly 'element:ceiling': typeof LayoutBoundarySlab;
2966
+ readonly 'element:floor': typeof LayoutBoundarySlab;
2967
+ readonly 'element:boundaryWall': typeof LayoutBoundaryWall;
2968
+ readonly 'element:curtainWall': LayoutCurtainWall;
2969
+ readonly 'element:spaceDivider': LayoutSpaceDivider;
2970
+ readonly 'element:wall': LayoutWall;
2971
+ readonly 'element:opening': typeof LayoutOpening;
2972
+ readonly 'element:asset': LayoutAsset;
2973
+ readonly 'element:beam': LayoutBeam;
2974
+ readonly 'element:casework': LayoutCasework;
2975
+ readonly 'element:column': LayoutColumn;
2976
+ readonly 'element:door': LayoutDoor;
2977
+ readonly 'element:generic': LayoutGeneric;
2978
+ readonly 'element:kitchen': LayoutKitchen;
2979
+ readonly 'element:railing': LayoutRailing;
2980
+ readonly 'element:ramp': LayoutRamp;
2981
+ readonly 'element:roof': LayoutRoof;
2982
+ readonly 'element:slab': LayoutSlab;
2983
+ readonly 'element:stairs': LayoutStairs;
2984
+ readonly 'element:stairFlight': LayoutStairFlight;
2985
+ readonly 'element:window': LayoutWindow;
2986
+ }>;
2987
+ annotations: LayoutAnnotation[];
2988
+ annotationsById: Record<string, LayoutAnnotation>;
2989
+ annotationsByType: NodesByType< {
2990
+ readonly 'annotation:floorPlanDxf': LayoutFloorPlanDxfAnnotation;
2991
+ readonly 'annotation:floorPlanImage': LayoutFloorPlanImageAnnotation;
2992
+ }>;
2993
+ views: LayoutView[];
2994
+ viewsById: Record<string, LayoutView>;
2995
+ viewsByType: NodesByType< {
2996
+ readonly 'view:2d': Layout2dView;
2997
+ readonly 'view:3d': Layout3dView;
2998
+ }>;
2999
+ debugIds: boolean;
3000
+ suggestedIds: Record<string, boolean>;
3001
+ constructor(id: string);
3002
+ copyForClone(layout: SpaceGraphLayout): void;
3003
+ insertSpace(space: LayoutSpace): void;
3004
+ removeSpace(space: LayoutSpace): LayoutSpace | undefined;
3005
+ createSpace(id: string, boundaries: LayoutBoundary[]): LayoutSpace;
3006
+ insertElement(element: LayoutElement): void;
3007
+ removeElement(element: LayoutElement): LayoutElement | undefined;
3008
+ createElement(type: LayoutOpeningType, id: string): LayoutOpening;
3009
+ createElement(type: LayoutBoundarySlabType, id: string, boundaries: LayoutBoundary[]): LayoutBoundarySlab;
3010
+ createElement(type: LayoutBoundaryWallType, id: string, boundaries: LayoutBoundary[]): LayoutBoundaryWall;
3011
+ createElement<T extends LayoutEdgeElementType>(type: T, id: string, edges: SpatialGraphEdge[]): EdgeElementMap[T];
3012
+ createElement<T extends LayoutTransformElementType>(type: T, id: string): TransformElementMap[T];
3013
+ insertNode(node: LayoutAnnotation | LayoutView): void;
3014
+ removeNode(node: LayoutAnnotation | LayoutView): void;
3015
+ insertAnnotation(annotation: LayoutAnnotation): void;
3016
+ removeAnnotation(annotation: LayoutAnnotation): LayoutAnnotation | undefined;
3017
+ createAnnotation(type: LayoutAnnotationType, id: string): LayoutAnnotation;
3018
+ insertView(view: LayoutView): void;
3019
+ removeView(view: LayoutView): LayoutView;
3020
+ createView(type: LayoutViewType, id: string): LayoutView;
3021
+ clearSpaces(): void;
3022
+ getElementList(): LayoutElement[];
3023
+ getArea(filter?: {
3024
+ program?: {
3025
+ exclude?: string[];
3026
+ include?: string[];
3027
+ };
3028
+ }): number;
3029
+ getLayoutGraph(): Graph;
3030
+ getUniqueId(prefix: string, nodesById: Record<string, SpaceGraphNode>): string;
3031
+ getSpaceId(prefix?: string): string;
3032
+ getElementId(element: LayoutElement, prefix?: string): string;
3033
+ getBoundingBox(): TransformBoundingBox3d;
3034
+ toJSON(): SpaceGraphLayoutJson;
3035
+ }
3036
+
3037
+ declare interface SpaceGraphLayoutJson extends SpaceGraphSpatialStructureBaseJson {
3038
+ type: LayoutType;
3039
+ spatialGraph: LayoutSpatialGraphJson;
3040
+ spaces: LayoutSpaceJson[];
3041
+ elements: LayoutElementJson[];
3042
+ annotations?: LayoutAnnotationJson[];
3043
+ views?: LayoutViewJson[];
3044
+ }
3045
+
3046
+ declare type SpaceGraphLocation = {
3047
+ latLong: Vector2;
3048
+ rotation: number;
3049
+ };
3050
+
3051
+ declare type SpaceGraphMaterial = SpaceGraphColorMaterial | SpaceGraphStandardMaterial | SpaceGraphEmbeddedMaterial | SpaceGraphBasicMaterial;
3052
+
3053
+ declare interface SpaceGraphMaterialBaseJson extends SpaceGraphNodeBaseJson {
3054
+ id: string;
3055
+ }
3056
+
3057
+ declare type SpaceGraphMaterialJson = Rgb | RgbA | string | SpaceGraphMaterialResourceJson;
3058
+
3059
+ declare type SpaceGraphMaterialResourceJson = SpaceGraphColorMaterialJson | SpaceGraphStandardMaterialJson | SpaceGraphBasicMaterialJson;
3060
+
3061
+ declare type SpaceGraphNode = SpaceGraphProduct | SpaceGraphGeometry | SpaceGraphMaterial | SpaceGraphRelation | SpaceGraphCustomAttribute | SpaceGraphBuilding | SpaceGraphFloor | LayoutNode | SpaceGraphLayout | LayoutAnnotation;
3062
+
3063
+ declare class SpaceGraphNodeBase extends SpaceGraphTypedValue {
3064
+ id: string;
3065
+ name: string;
3066
+ customId: string;
3067
+ constructor(id: string, type: string);
3068
+ copyForClone(node: SpaceGraphNode): void;
3069
+ setName(name: string): void;
3070
+ setCustomId(customId: string): void;
3071
+ emit<EventType extends keyof SpaceGraphEventMap>(event: EventType, ...args: SpaceGraphEventMap[EventType]): void;
3072
+ toJSON(): SpaceGraphNodeBaseJson;
3073
+ }
3074
+
3075
+ declare interface SpaceGraphNodeBaseJson extends SpaceGraphTypedValueJson {
3076
+ /** @format uuid */
3077
+ id: string;
3078
+ name?: string;
3079
+ customId?: string;
3080
+ }
3081
+
3082
+ declare type SpaceGraphNodeWithCustomAttributes = LayoutNode | SpaceGraphSpatialStructure | SpaceGraphProduct;
3083
+
3084
+ declare class SpaceGraphNodeWithCustomAttributesBase extends SpaceGraphNodeBase {
3085
+ customAttributes: SpaceGraphCustomAttributeValue;
3086
+ constructor(id: string, type: string);
3087
+ setCustomAttributes(customAttributes?: SpaceGraphCustomAttributeValueJson | null, customAttributesById?: Record<string, SpaceGraphCustomAttribute>): void;
3088
+ toJSON(): SpaceGraphNodeWithCustomAttributesBaseJson;
3089
+ copyForClone(node: SpaceGraphNodeWithCustomAttributes): void;
3090
+ }
3091
+
3092
+ declare interface SpaceGraphNodeWithCustomAttributesBaseJson extends SpaceGraphNodeBaseJson {
3093
+ customAttributes?: SpaceGraphCustomAttributeValueJson | null;
3094
+ }
3095
+
3096
+ declare class SpaceGraphProduct extends SpaceGraphNodeWithCustomAttributesBase {
3097
+ type: SpaceGraphProductType;
3098
+ attributes: SpaceGraphProductAttributes;
3099
+ geometries: GeometryOperationJson[];
3100
+ constructor(id: string);
3101
+ copyForClone(product: SpaceGraphProduct): void;
3102
+ setAttributes(attributesJson: SpaceGraphProductAttributesJson): void;
3103
+ toJSON(): SpaceGraphProductJson;
3104
+ }
3105
+
3106
+ declare type SpaceGraphProductAttributes = {
3107
+ manufacturer: string;
3108
+ categories: string[];
3109
+ subCategories: string[];
3110
+ thumbnail: string;
3111
+ boundingBox: BoundingBox3d;
3112
+ seatCapacity: number;
3113
+ updatedAt: string;
3114
+ };
3115
+
3116
+ declare type SpaceGraphProductAttributesJson = {
3117
+ manufacturer?: string;
3118
+ categories?: string[];
3119
+ subCategories?: string[];
3120
+ thumbnail?: string;
3121
+ boundingBox?: BoundingBox3d;
3122
+ seatCapacity?: number;
3123
+ updatedAt?: string;
3124
+ };
3125
+
3126
+ declare interface SpaceGraphProductJson extends SpaceGraphNodeWithCustomAttributesBaseJson {
3127
+ type: SpaceGraphProductType;
3128
+ attributes?: SpaceGraphProductAttributesJson;
3129
+ geometries: GeometryOperationJson[];
3130
+ }
3131
+
3132
+ declare type SpaceGraphProductType = typeof SpaceGraphProductTypeValue;
3133
+
3134
+ declare const SpaceGraphProductTypeValue = "product:static";
3135
+
3136
+ declare type SpaceGraphRelation = GroupRelation;
3137
+
3138
+ declare type SpaceGraphRelationJson = GroupRelationJson;
3139
+
3140
+ declare type SpaceGraphRelationType = GroupRelationType;
3141
+
3142
+ declare interface SpaceGraphSharedResourcesJson {
3143
+ products: SpaceGraphProductJson[];
3144
+ geometries: SpaceGraphGeometryJson[];
3145
+ materials: SpaceGraphMaterialResourceJson[];
3146
+ relations: SpaceGraphRelationJson[];
3147
+ customAttributes?: SpaceGraphCustomAttributeJson[];
3148
+ }
3149
+
3150
+ declare type SpaceGraphSpatialStructure = SpaceGraphBuilding | SpaceGraphFloor | SpaceGraphLayout;
3151
+
3152
+ declare class SpaceGraphSpatialStructureBase extends SpaceGraphNodeWithCustomAttributesBase {
3153
+ type: SpaceGraphSpatialStructureType;
3154
+ constructor(id: string, type: SpaceGraphSpatialStructureType);
3155
+ }
3156
+
3157
+ declare interface SpaceGraphSpatialStructureBaseJson extends SpaceGraphNodeWithCustomAttributesBaseJson {
3158
+ type: SpaceGraphSpatialStructureType;
3159
+ }
3160
+
3161
+ declare type SpaceGraphSpatialStructureJson = SpaceGraphBuildingJson | SpaceGraphFloorJson | SpaceGraphLayoutJson;
3162
+
3163
+ declare type SpaceGraphSpatialStructureType = SpaceGraphBuildingType | SpaceGraphFloorType | LayoutType;
3164
+
3165
+ declare class SpaceGraphStandardMaterial extends SpaceGraphNodeBase {
3166
+ type: SpaceGraphStandardMaterialType;
3167
+ reference: string;
3168
+ constructor(id: string, reference: string);
3169
+ toJSON(): SpaceGraphMaterialResourceJson;
3170
+ }
3171
+
3172
+ declare interface SpaceGraphStandardMaterialJson extends SpaceGraphMaterialBaseJson {
3173
+ type: SpaceGraphStandardMaterialType;
3174
+ reference: string;
3175
+ }
3176
+
3177
+ declare type SpaceGraphStandardMaterialType = typeof SpaceGraphStandardMaterialTypeValue;
3178
+
3179
+ declare const SpaceGraphStandardMaterialTypeValue = "material:standard";
3180
+
3181
+ declare class SpaceGraphTypedValue {
3182
+ spaceGraph: SpaceGraph;
3183
+ type: string;
3184
+ constructor(type: string);
3185
+ }
3186
+
3187
+ declare interface SpaceGraphTypedValueJson {
3188
+ type: string;
3189
+ }
3190
+
3191
+ declare class SpaceRemove extends OperationBase {
3192
+ type: typeof SpaceRemoveTypeValue;
3193
+ previousValue: SpaceRemoveValue;
3194
+ constructor(node: LayoutSpace | string, previousValue?: SpaceRemoveValue);
3195
+ do(layout: SpaceGraphLayout): void;
3196
+ undo(layout: SpaceGraphLayout): void;
3197
+ }
3198
+
3199
+ declare type SpaceRemoveOperationJson = Pick<SpaceRemove, 'nodeId' | 'type'> & Partial<Pick<SpaceRemove, 'previousValue'>>;
3200
+
3201
+ declare const SpaceRemoveTypeValue: "operation:spaceRemove";
3202
+
3203
+ declare type SpaceRemoveValue = LayoutSpaceJson;
3204
+
3205
+ declare interface SpaceShapeStyle extends ShapeStyle {
3206
+ usage?: {
3207
+ [key: string]: ShapeStyle;
3208
+ };
3209
+ program?: {
3210
+ [key: string]: ShapeStyle;
3211
+ };
3212
+ }
3213
+
3214
+ declare class SpaceUpdate extends OperationBase {
3215
+ type: typeof SpaceUpdateTypeValue;
3216
+ value: SpaceUpdateValue;
3217
+ constructor(node: LayoutSpace | string, value: SpaceUpdateValue, previousValue?: SpaceUpdateValue);
3218
+ private setPreviousValue;
3219
+ private update;
3220
+ do(layout: SpaceGraphLayout): void;
3221
+ undo(layout: SpaceGraphLayout): void;
3222
+ }
3223
+
3224
+ declare type SpaceUpdateOperationJson = Pick<SpaceUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<SpaceUpdate, 'previousValue'>>;
3225
+
3226
+ declare const SpaceUpdateTypeValue: "operation:spaceUpdate";
3227
+
3228
+ declare type SpaceUpdateValue = Partial<LayoutSpaceJson>;
3229
+
3230
+ declare class SpatialGraphEdge extends SpatialGraphNodeBase {
3231
+ type: SpatialGraphEdgeType;
3232
+ vertices: [SpatialGraphVertex, SpatialGraphVertex];
3233
+ spaces: [LayoutSpace | null | undefined, LayoutSpace | null | undefined];
3234
+ boundaryWalls: [LayoutBoundaryWall | null, LayoutBoundaryWall | null];
3235
+ element: LayoutEdgeElement | null;
3236
+ constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex);
3237
+ getPoints(): [Vector2_2, Vector2_2];
3238
+ getLength(): number;
3239
+ get isExternal(): boolean;
3240
+ setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void;
3241
+ setVerticesByIds(vertexId1: string, vertexId2: string): void;
3242
+ canSplit(u: number, options?: EdgeCanSplitOptions): boolean;
3243
+ split(u: number, options?: EdgeSplitOptions, updateSpaceBoundaries?: boolean): EdgeSplitReturnValue;
3244
+ canMerge(edge: SpatialGraphEdge): boolean;
3245
+ merge(edge: SpatialGraphEdge, updateSpaceBoundaries?: boolean): void;
3246
+ toJSON(): SpatialGraphEdgeJson;
3247
+ }
3248
+
3249
+ declare interface SpatialGraphEdgeJson extends SpatialGraphNodeBaseJson {
3250
+ type: SpatialGraphEdgeType;
3251
+ vertices: [string, string];
3252
+ }
3253
+
3254
+ declare type SpatialGraphEdgeType = typeof SpatialGraphEdgeTypeValue;
3255
+
3256
+ declare const SpatialGraphEdgeTypeValue = "spatialGraph:edge";
3257
+
3258
+ declare type SpatialGraphNode_2 = SpatialGraphVertex | SpatialGraphEdge;
3259
+
3260
+ declare class SpatialGraphNodeBase extends LayoutNodeBase {
3261
+ }
3262
+
3263
+ declare interface SpatialGraphNodeBaseJson extends LayoutNodeBaseJson {
3264
+ }
3265
+
3266
+ declare type SpatialGraphNodeType = SpatialGraphVertexType | SpatialGraphEdgeType;
3267
+
3268
+ declare class SpatialGraphVertex extends SpatialGraphNodeBase {
3269
+ type: SpatialGraphVertexType;
3270
+ position: Vector2;
3271
+ edges: SpatialGraphEdge[];
3272
+ constructor(id: string, x: number, y: number);
3273
+ sortVertexEdges(): void;
3274
+ addEdge(edge: SpatialGraphEdge): void;
3275
+ removeEdge(edge: SpatialGraphEdge): void;
3276
+ setPosition(x: number, y: number): void;
3277
+ toJSON(): SpatialGraphVertexJson;
3278
+ }
3279
+
3280
+ declare interface SpatialGraphVertexJson extends SpatialGraphNodeBaseJson {
3281
+ type: SpatialGraphVertexType;
3282
+ position: Vector2;
3283
+ }
3284
+
3285
+ declare type SpatialGraphVertexType = typeof SpatialGraphVertexTypeValue;
3286
+
3287
+ declare const SpatialGraphVertexTypeValue = "spatialGraph:vertex";
3288
+
3289
+ declare class SphereGeometry extends ParametricGeometryBase {
3290
+ type: SphereGeometryType;
3291
+ radius: number;
3292
+ constructor(id: string);
3293
+ }
3294
+
3295
+ declare interface SphereGeometryJson extends ParametricGeometryBaseJson {
3296
+ type: SphereGeometryType;
3297
+ radius: number;
3298
+ }
3299
+
3300
+ declare type SphereGeometryType = typeof SphereGeometryTypeValue;
3301
+
3302
+ declare const SphereGeometryTypeValue = "geometry:sphere";
3303
+
3304
+ declare interface SpiralStairFlightParameters {
3305
+ stairFlightType: 'spiral';
3306
+ angle: number;
3307
+ radius: number;
3308
+ /** @minimum 0.01 */
3309
+ width: number;
3310
+ /** @minimum 0.01 */
3311
+ height: number;
3312
+ circulation: 'left' | 'right';
3313
+ materials: LayoutStairFlightMaterials;
3314
+ }
3315
+
3316
+ declare type SpiralStairFlightParametersJson = Partial<SpiralStairFlightParameters>;
3317
+
3318
+ declare type SpiralStairsParameters = {
3319
+ stairsType: SpiralStairsType;
3320
+ radius: number;
3321
+ angle: number;
3322
+ /** @minimum 0.01 */
3323
+ height: number;
3324
+ /** @minimum 0.01 */
3325
+ stepWidth: number;
3326
+ circulation: 'left' | 'right';
3327
+ } & CommonStairsParameters;
3328
+
3329
+ declare type SpiralStairsParametersJson = Partial<SpiralStairsParameters>;
3330
+
3331
+ declare type SpiralStairsType = 'spiral';
3332
+
3333
+ declare type StraightStairFlightParameters = {
3334
+ stairFlightType: 'straight';
3335
+ materials: LayoutStairFlightMaterials;
3336
+ } & DimensionParameters;
3337
+
3338
+ declare type StraightStairFlightParametersJson = Partial<StraightStairFlightParameters>;
3339
+
3340
+ declare type StraightStairsParameters = {
3341
+ stairsType: StraightStairsType;
3342
+ } & DimensionParameters & CommonStairsParameters;
3343
+
3344
+ declare type StraightStairsParametersJson = Partial<StraightStairsParameters>;
3345
+
3346
+ declare type StraightStairsType = 'straight' | 'straightLanding';
3347
+
3348
+ declare interface SurfaceMaterials {
3349
+ [surface: string]: SpaceGraphMaterial;
3350
+ }
3351
+
3352
+ declare interface SurfaceMaterialsJson {
3353
+ [surface: string]: SpaceGraphMaterialJson;
3354
+ }
3355
+
3356
+ declare interface Surfaces {
3357
+ [surface: string]: GeometryFaceIndices;
3358
+ }
3359
+
3360
+ declare interface TextShape extends BaseShape {
3361
+ type: 'text';
3362
+ position: Vector2_2;
3363
+ text: string;
3364
+ rotation?: number;
3365
+ alignV?: 'center' | 'bottom' | 'top';
3366
+ alignH?: 'center' | 'left' | 'right';
3367
+ fontSize?: number;
3368
+ }
3369
+
3370
+ declare type Transform3d = {
3371
+ position: Vector3;
3372
+ rotation: number;
3373
+ rotationAxis: Vector3;
3374
+ };
3375
+
3376
+ declare type TransformBoundingBox3d = {
3377
+ min: Vector3;
3378
+ max: Vector3;
3379
+ transform: Transform3d;
3380
+ };
3381
+
3382
+ declare type TransformElementMap = {
3383
+ 'element:asset': LayoutAsset;
3384
+ 'element:beam': LayoutBeam;
3385
+ 'element:casework': LayoutCasework;
3386
+ 'element:column': LayoutColumn;
3387
+ 'element:door': LayoutDoor;
3388
+ 'element:kitchen': LayoutKitchen;
3389
+ 'element:railing': LayoutRailing;
3390
+ 'element:ramp': LayoutRamp;
3391
+ 'element:roof': LayoutRoof;
3392
+ 'element:slab': LayoutSlab;
3393
+ 'element:stairs': LayoutStairs;
3394
+ 'element:stairFlight': LayoutStairFlight;
3395
+ 'element:window': LayoutWindow;
3396
+ 'element:generic': LayoutGeneric;
3397
+ };
3398
+
3399
+ declare class UriGeometry extends GeometryBase {
3400
+ type: UriGeometryType;
3401
+ format: UriGeometryFormat;
3402
+ uri: string;
3403
+ normals: ParametricNormals;
3404
+ constructor(id: string);
3405
+ }
3406
+
3407
+ declare type UriGeometryFormat = 'data3d';
3408
+
3409
+ declare interface UriGeometryJson extends GeometryBaseJson {
3410
+ type: UriGeometryType;
3411
+ format: UriGeometryFormat;
3412
+ uri: string;
3413
+ normals?: ParametricNormals;
3414
+ }
3415
+
3416
+ declare type UriGeometryType = typeof UriGeometryTypeValue;
3417
+
3418
+ declare const UriGeometryTypeValue = "geometry:uri";
3419
+
3420
+ declare type Vector2 = [number, number];
3421
+
3422
+ declare type Vector2_2 = [number, number];
3423
+
3424
+ declare type Vector3 = [number, number, number];
3425
+
3426
+ declare interface Vector3List extends SpaceGraphTypedValueJson {
3427
+ type: 'vector3:list';
3428
+ list: Vector3[];
3429
+ }
3430
+
3431
+ declare interface Vector3Range extends SpaceGraphTypedValueJson {
3432
+ type: 'vector3:range';
3433
+ range: {
3434
+ start: Vector3;
3435
+ step: Vector3;
3436
+ count: number;
3437
+ };
3438
+ }
3439
+
3440
+ declare class VertexCreate extends OperationBase {
3441
+ type: typeof VertexCreateTypeValue;
3442
+ value: VertexValueType;
3443
+ previousValue: null;
3444
+ constructor(value: VertexValueType);
3445
+ do(layout: SpaceGraphLayout): void;
3446
+ undo(layout: SpaceGraphLayout): void;
3447
+ }
3448
+
3449
+ declare type VertexCreateOperationJson = Pick<VertexCreate, 'type' | 'value'>;
3450
+
3451
+ declare const VertexCreateTypeValue: "operation:vertexCreate";
3452
+
3453
+ declare class VertexRemove extends OperationBase {
3454
+ type: typeof VertexRemoveTypeValue;
3455
+ previousValue: PositionValue;
3456
+ constructor(vertex: SpatialGraphVertex | string, previousValue?: PositionValue);
3457
+ setPreviousValue(layout: SpaceGraphLayout): void;
3458
+ do(layout: SpaceGraphLayout): void;
3459
+ undo(layout: SpaceGraphLayout): void;
3460
+ }
3461
+
3462
+ declare type VertexRemoveOperationJson = Pick<VertexRemove, 'nodeId' | 'type'> & Partial<Pick<VertexRemove, 'previousValue'>>;
3463
+
3464
+ declare const VertexRemoveTypeValue: "operation:vertexRemove";
3465
+
3466
+ declare class VertexReplace extends OperationBase {
3467
+ type: typeof VertexReplaceTypeValue;
3468
+ value: VertexReplaceValue;
3469
+ previousValue: SpatialGraphVertexJson;
3470
+ constructor(vertex: SpatialGraphVertex | string, value: VertexReplaceValue, previousValue?: VertexReplaceValue);
3471
+ setPreviousValue(layout: SpaceGraphLayout): void;
3472
+ do(layout: SpaceGraphLayout): void;
3473
+ undo(layout: SpaceGraphLayout): void;
3474
+ }
3475
+
3476
+ declare type VertexReplaceOperationJson = Pick<VertexReplace, 'nodeId' | 'type' | 'value'> & Partial<Pick<VertexReplace, 'previousValue'>>;
3477
+
3478
+ declare const VertexReplaceTypeValue: "operation:vertexReplace";
3479
+
3480
+ declare type VertexReplaceValue = Pick<VertexValueType, 'id'> & Partial<VertexValueType>;
3481
+
3482
+ declare class VertexUpdate extends OperationBase {
3483
+ type: typeof VertexUpdateTypeValue;
3484
+ value: PositionValue;
3485
+ previousValue: PositionValue;
3486
+ constructor(vertex: SpatialGraphVertex | string, value: PositionValue, previousValue?: PositionValue);
3487
+ private setPreviousValue;
3488
+ private update;
3489
+ do(layout: SpaceGraphLayout): void;
3490
+ undo(layout: SpaceGraphLayout): void;
3491
+ }
3492
+
3493
+ declare type VertexUpdateOperationJson = Pick<VertexUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<VertexUpdate, 'previousValue'>>;
3494
+
3495
+ declare const VertexUpdateTypeValue: "operation:vertexUpdate";
3496
+
3497
+ declare type VertexValueType = Omit<SpatialGraphVertexJson, 'type'>;
3498
+
3499
+ declare class ViewCreate extends OperationBase {
3500
+ type: typeof ViewCreateTypeValue;
3501
+ value: LayoutViewJson;
3502
+ constructor(value: LayoutViewJson);
3503
+ do(layout: SpaceGraphLayout): void;
3504
+ undo(layout: SpaceGraphLayout): void;
3505
+ }
3506
+
3507
+ declare type ViewCreateOperationJson = Pick<ViewCreate, 'type' | 'value'>;
3508
+
3509
+ declare const ViewCreateTypeValue: "operation:viewCreate";
3510
+
3511
+ declare class ViewRemove extends OperationBase {
3512
+ type: typeof ViewRemoveTypeValue;
3513
+ previousValue: LayoutViewJson;
3514
+ constructor(node: LayoutView | string, previousValue?: LayoutViewJson);
3515
+ do(layout: SpaceGraphLayout): void;
3516
+ undo(layout: SpaceGraphLayout): void;
3517
+ }
3518
+
3519
+ declare type ViewRemoveOperationJson = Pick<ViewRemove, 'nodeId' | 'type'> & Partial<Pick<ViewRemove, 'previousValue'>>;
3520
+
3521
+ declare const ViewRemoveTypeValue: "operation:viewRemove";
3522
+
3523
+ declare class ViewUpdate extends OperationBase {
3524
+ type: typeof ViewUpdateTypeValue;
3525
+ value: ViewUpdateValue;
3526
+ constructor(node: LayoutView | string, value: ViewUpdateValue, previousValue?: ViewUpdateValue);
3527
+ private setPreviousValue;
3528
+ private update;
3529
+ do(layout: SpaceGraphLayout): void;
3530
+ undo(layout: SpaceGraphLayout): void;
3531
+ }
3532
+
3533
+ declare type ViewUpdateOperationJson = Pick<ViewUpdate, 'nodeId' | 'type' | 'value'> & Partial<Pick<ViewUpdate, 'previousValue'>>;
3534
+
3535
+ declare const ViewUpdateTypeValue: "operation:viewUpdate";
3536
+
3537
+ declare type ViewUpdateValue = Partial<LayoutViewJson> & {
3538
+ parameters?: Partial<LayoutViewJson['parameters']>;
3539
+ };
3540
+
3541
+ export { }