@archilogic/extension-sdk 0.16.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @archilogic/extension-sdk
2
2
 
3
+ ## 0.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 20a4ab2: The published declaration files bundle `@archilogic/space-graph-core` / `-sdk` types at build time, and 0.17.0 was built from core 0.31 — so hosts on core ≥ 0.34 could no longer pass their `OperationJson` to `onLayoutChange` (`EdgeUpdateValue.vertices` became optional with curved edges). The package now builds against `space-graph-core ^0.34.1` / `space-graph-sdk ^0.11.4`, so the bundled types match the current core.
8
+
9
+ ## 0.17.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 50b72f9: feat(extension-sdk): add a settings-change event carrying the host display units
14
+
3
15
  ## 0.16.0
4
16
 
5
17
  ### Minor Changes
package/dist/actions.d.ts CHANGED
@@ -131,6 +131,13 @@ declare type AnnotationUpdateValue = Partial<LayoutAnnotationJson> & {
131
131
  parameters?: Partial<LayoutAnnotationJson['parameters']>;
132
132
  };
133
133
 
134
+ declare interface Arc {
135
+ center: Vector2;
136
+ radius: number;
137
+ startAngle: number;
138
+ sweep: number;
139
+ }
140
+
134
141
  declare interface ArcCurve extends CurveBase {
135
142
  type: ArcCurveType;
136
143
  position?: Vector2;
@@ -572,6 +579,21 @@ declare enum DxfUnits {
572
579
 
573
580
  declare type DxfUnitsString = keyof typeof DxfUnits;
574
581
 
582
+ declare interface EdgeArc {
583
+ type: EdgeArcType;
584
+ /**
585
+ * Signed bulge factor: tan(sweptAngle / 4).
586
+ * 0 is a straight edge. The sign selects the side the arc bulges toward
587
+ * (positive is a counter-clockwise sweep from vertices[0] to vertices[1]).
588
+ * |bulge| === 1 is a semicircle; |bulge| > 1 is a major arc.
589
+ */
590
+ bulge: number;
591
+ }
592
+
593
+ declare type EdgeArcType = typeof EdgeArcTypeValue;
594
+
595
+ declare const EdgeArcTypeValue = "edgeCurve:arc";
596
+
575
597
  declare interface EdgeCanSplitOptions {
576
598
  minimumLength?: number;
577
599
  }
@@ -621,6 +643,10 @@ declare const EdgeCreateTypeValue: "operation:edgeCreate";
621
643
 
622
644
  declare type EdgeCreateValueType = Omit<SpatialGraphEdgeJson, 'type'>;
623
645
 
646
+ declare type EdgeCurve = EdgeArc;
647
+
648
+ declare type EdgeCurveJson = EdgeArc;
649
+
624
650
  declare type EdgeElementMap = {
625
651
  -readonly [Key in LayoutEdgeElementType]: LayoutElementTypeMap[Key];
626
652
  };
@@ -709,9 +735,9 @@ declare type EdgeSplitValue = {
709
735
 
710
736
  declare class EdgeUpdate extends OperationBase {
711
737
  type: typeof EdgeUpdateTypeValue;
712
- value: EdgeVertexValue;
713
- previousValue: EdgeVertexValue;
714
- constructor(edge: SpatialGraphEdge | string, value: EdgeVertexValue, previousValue?: EdgeVertexValue);
738
+ value: EdgeUpdateValue;
739
+ previousValue: EdgeUpdateValue;
740
+ constructor(edge: SpatialGraphEdge | string, value: EdgeUpdateValue, previousValue?: EdgeUpdateValue);
715
741
  private setPreviousValue;
716
742
  private update;
717
743
  do(layout: SpaceGraphLayout): void;
@@ -722,6 +748,13 @@ declare type EdgeUpdateOperationJson = Pick<EdgeUpdate, 'nodeId' | 'type' | 'val
722
748
 
723
749
  declare const EdgeUpdateTypeValue: "operation:edgeUpdate";
724
750
 
751
+ declare type EdgeUpdateValue = {
752
+ vertices?: [string, string];
753
+ curve?: EdgeCurveJson | null;
754
+ name?: string;
755
+ customId?: string;
756
+ };
757
+
725
758
  declare type EdgeVertexValue = Required<Pick<SpatialGraphEdgeJson, 'vertices'>> & Partial<SpatialGraphEdgeJson>;
726
759
 
727
760
  declare class ElementCreate extends OperationBase {
@@ -892,6 +925,8 @@ declare type ExtensionApi = {
892
925
  modifiers?: CanvasModifiers;
893
926
  }): void;
894
927
  onCanvasChange(change: CanvasChange): void;
928
+ /** The host's display settings changed — e.g. the user switched measurement units. Optional: extensions built before settings forwarding don't expose it, and hosts feature-check before calling. */
929
+ onSettingsChange?(settings: HostSettings): void;
895
930
  /** The user pressed a declared control of the running custom action. */
896
931
  onActionControl(args: {
897
932
  runId: string;
@@ -915,6 +950,7 @@ declare type ExtensionEventMap = {
915
950
  'canvas-click': Parameters<ExtensionApi['onCanvasClick']>[0];
916
951
  'canvas-mousemove': Parameters<ExtensionApi['onCanvasMouseMove']>[0];
917
952
  'canvas-change': Parameters<ExtensionApi['onCanvasChange']>[0];
953
+ 'settings-change': HostSettings;
918
954
  'action-control': Parameters<ExtensionApi['onActionControl']>[0];
919
955
  'action-end': Parameters<ExtensionApi['onActionEnd']>[0];
920
956
  };
@@ -1246,15 +1282,11 @@ declare type GroupRelationType = typeof GroupRelationTypeValue;
1246
1282
 
1247
1283
  declare const GroupRelationTypeValue = "relation:group";
1248
1284
 
1249
- declare type GroupShape = Omit<GroupShape_2, 'children'> & {
1250
- children: Shape[];
1251
- };
1252
-
1253
- declare interface GroupShape_2 {
1285
+ declare interface GroupShape<S = Shape_2> {
1254
1286
  type: 'group';
1255
1287
  position?: Vector2;
1256
1288
  rotation?: number;
1257
- children: Shape_2[];
1289
+ children: S[];
1258
1290
  style?: ShapeStyle;
1259
1291
  }
1260
1292
 
@@ -1445,6 +1477,21 @@ declare type HostApi = {
1445
1477
  off: <K extends ExtensionEventKey>(event: K, listener?: ExtensionEventListener<K>) => void;
1446
1478
  };
1447
1479
 
1480
+ /**
1481
+ * Display settings of the host, sent in the `onConnect` parameters (as `settings`) and again on
1482
+ * every change via `onSettingsChange` — so an extension can render measurements the way the
1483
+ * host does instead of hardcoding a unit system.
1484
+ */
1485
+ declare type HostSettings = {
1486
+ units?: {
1487
+ system?: 'metric' | 'imperial';
1488
+ /** Decimal places the host displays area values with. */
1489
+ areaDecimals?: number;
1490
+ /** Decimal places the host displays length values with. */
1491
+ lengthDecimals?: number;
1492
+ };
1493
+ };
1494
+
1448
1495
  /**
1449
1496
  * A resolved icon placed in the plan — first-class in fpe's render
1450
1497
  * vocabulary so every renderer consumes the icon svg natively instead of
@@ -1971,6 +2018,13 @@ declare class LayoutEdgeElementBase extends LayoutElementBase {
1971
2018
  getEndVertex(): SpatialGraphVertex | undefined;
1972
2019
  getAxisPoints(): [Vector2, Vector2] | [];
1973
2020
  getAxisLength(): number;
2021
+ resolveAxisPosition(s: number): {
2022
+ edge: SpatialGraphEdge;
2023
+ u: number;
2024
+ forward: boolean;
2025
+ } | undefined;
2026
+ getPointOnAxis(s: number): Vector2 | undefined;
2027
+ getTangentOnAxis(s: number): Vector2 | undefined;
1974
2028
  getEdgeAtLinearPosition(u: number): SpatialGraphEdge | undefined;
1975
2029
  getEdgesAtLinearSegment(u: number, v: number): SpatialGraphEdge[];
1976
2030
  resetTransform(): void;
@@ -2067,7 +2121,7 @@ declare class LayoutFloorPlanDxfAnnotation extends LayoutAnnotationBase {
2067
2121
  type: LayoutFloorPlanDxfType;
2068
2122
  parameters: LayoutFloorPlanDxfParameters;
2069
2123
  constructor(id: string);
2070
- setParameters(parameters: RecursivePartial<LayoutFloorPlanDxfParameters>): void;
2124
+ setParameters(parameters: LayoutFloorPlanDxfParametersUpdate): void;
2071
2125
  }
2072
2126
 
2073
2127
  declare interface LayoutFloorPlanDxfAnnotationJson extends LayoutAnnotationBaseJson {
@@ -2080,9 +2134,17 @@ declare interface LayoutFloorPlanDxfParameters {
2080
2134
  drawingOrigin: Vector2;
2081
2135
  drawingUnits: DxfUnitsString;
2082
2136
  hiddenLayers: string[];
2137
+ /**
2138
+ * Progress of tracing this drawing into the layout, owned by whatever tool does the tracing
2139
+ * (the cad-import extension keeps its cad-prep document here). Opaque to the space graph and
2140
+ * deliberately untyped for now: replaced as a whole on update, `null` resets it to `{}`.
2141
+ */
2142
+ tracingData?: Record<string, unknown>;
2083
2143
  }
2084
2144
 
2085
- declare type LayoutFloorPlanDxfParametersJson = Partial<LayoutFloorPlanDxfParameters>;
2145
+ declare type LayoutFloorPlanDxfParametersJson = Partial<Omit<LayoutFloorPlanDxfParameters, 'tracingData'>> & TracingDataUpdate;
2146
+
2147
+ declare type LayoutFloorPlanDxfParametersUpdate = RecursivePartial<Omit<LayoutFloorPlanDxfParameters, 'tracingData'>> & TracingDataUpdate;
2086
2148
 
2087
2149
  declare type LayoutFloorPlanDxfType = typeof LayoutFloorPlanDxfTypeValue;
2088
2150
 
@@ -3247,9 +3309,15 @@ declare interface SelectOption {
3247
3309
  label: string;
3248
3310
  }
3249
3311
 
3250
- declare type Shape = CurveShape | TextShape | GroupShape | IconShape;
3312
+ declare type Shape = Shape_2<IconShape>;
3251
3313
 
3252
- declare type Shape_2 = CurveShape | TextShape | GroupShape_2;
3314
+ /**
3315
+ *`Extension` is the sanctioned slot for renderers that
3316
+ * carry additional members (e.g. `Shape<IconShape>`).
3317
+ */
3318
+ declare type Shape_2<Extension extends {
3319
+ type: string;
3320
+ } = never> = CurveShape | TextShape | Extension | GroupShape<Shape_2<Extension>>;
3253
3321
 
3254
3322
  declare interface ShapeStyle {
3255
3323
  stroke?: string | number | number[];
@@ -3541,6 +3609,7 @@ declare interface SpaceGraphEventMap {
3541
3609
  'edge-set-vertices': [SpatialGraphEdge, {
3542
3610
  previousVertices: [SpatialGraphVertex, SpatialGraphVertex];
3543
3611
  }];
3612
+ 'edge-set-curve': [SpatialGraphEdge];
3544
3613
  'space-create': [LayoutSpace];
3545
3614
  'space-delete': [LayoutSpace];
3546
3615
  'space-split': [LayoutSpace, [LayoutSpace, LayoutSpace]];
@@ -3807,31 +3876,26 @@ declare class SpaceGraphProductBase extends SpaceGraphNodeWithCustomAttributesBa
3807
3876
  declare class SpaceGraphProductComponent extends SpaceGraphProductBase {
3808
3877
  type: SpaceGraphProductComponentType;
3809
3878
  attributes: SpaceGraphProductAttributes;
3810
- products: {
3811
- position: PositionEntry;
3812
- rotation: RotationEntry;
3813
- product: string;
3814
- }[];
3879
+ products: SpaceGraphProductComponentEntry[];
3815
3880
  geometries: GeometryOperationJson[];
3816
3881
  constructor(id: string);
3817
3882
  copyForClone(product: SpaceGraphProductComponent): void;
3818
3883
  toJSON(): SpaceGraphProductComponentJson;
3819
- setProducts(products: {
3820
- position: PositionEntry;
3821
- rotation: RotationEntry;
3822
- product: string;
3823
- }[]): void;
3884
+ setProducts(products: SpaceGraphProductComponentEntry[]): void;
3824
3885
  setInstances(): void;
3825
3886
  }
3826
3887
 
3888
+ /** Placement of one child product within a component. */
3889
+ declare interface SpaceGraphProductComponentEntry {
3890
+ position: PositionEntry;
3891
+ rotation: RotationEntry;
3892
+ product: string;
3893
+ }
3894
+
3827
3895
  declare interface SpaceGraphProductComponentJson extends SpaceGraphNodeWithCustomAttributesBaseJson {
3828
3896
  type: SpaceGraphProductComponentType;
3829
3897
  attributes?: SpaceGraphProductAttributesJson;
3830
- products: {
3831
- position: PositionEntry;
3832
- rotation: RotationEntry;
3833
- product: string;
3834
- }[];
3898
+ products: SpaceGraphProductComponentEntry[];
3835
3899
  geometries: GeometryOperationJson[];
3836
3900
  }
3837
3901
 
@@ -3984,9 +4048,18 @@ declare class SpatialGraphEdge extends SpatialGraphNodeBase {
3984
4048
  spaces: [LayoutSpace | null | undefined, LayoutSpace | null | undefined];
3985
4049
  boundaryWalls: [LayoutBoundaryWall | null, LayoutBoundaryWall | null];
3986
4050
  element: LayoutEdgeElement | null;
4051
+ curve?: EdgeCurve;
3987
4052
  constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex);
4053
+ copyForClone(edge: SpatialGraphEdge): void;
3988
4054
  getPoints(): [Vector2_2, Vector2_2];
3989
4055
  getLength(): number;
4056
+ getArc(): Arc | null;
4057
+ getPointAtParameter(u: number): Vector2_2;
4058
+ getClosestParameter(point: Vector2_2): number;
4059
+ getTangentAtParameter(u: number): Vector2_2;
4060
+ getTangentAtVertex(vertex: SpatialGraphVertex): Vector2_2;
4061
+ getPolyline(tolerance?: number): Vector2_2[];
4062
+ setCurve(curve: EdgeCurve | undefined): void;
3990
4063
  get isExternal(): boolean;
3991
4064
  setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void;
3992
4065
  resetSpatialIndexing(): void;
@@ -4003,6 +4076,7 @@ declare interface SpatialGraphEdgeJson extends SpatialGraphNodeBaseJson {
4003
4076
  id: string;
4004
4077
  type: SpatialGraphEdgeType;
4005
4078
  vertices: [string, string];
4079
+ curve?: EdgeCurveJson;
4006
4080
  }
4007
4081
 
4008
4082
  declare type SpatialGraphEdgeType = typeof SpatialGraphEdgeTypeValue;
@@ -4266,6 +4340,11 @@ declare type ThemeStyles = {
4266
4340
  byFilter?: StyleFilter[];
4267
4341
  };
4268
4342
 
4343
+ /** `null` resets the tracing data to `{}` (json cannot carry `undefined`). */
4344
+ declare type TracingDataUpdate = {
4345
+ tracingData?: Record<string, unknown> | null;
4346
+ };
4347
+
4269
4348
  declare type Transform3d = {
4270
4349
  position: Vector3;
4271
4350
  rotation: number;
package/dist/index.d.ts CHANGED
@@ -59,6 +59,13 @@ declare type AnnotationUpdateValue = Partial<LayoutAnnotationJson> & {
59
59
  parameters?: Partial<LayoutAnnotationJson['parameters']>;
60
60
  };
61
61
 
62
+ declare interface Arc {
63
+ center: Vector2;
64
+ radius: number;
65
+ startAngle: number;
66
+ sweep: number;
67
+ }
68
+
62
69
  declare interface ArcCurve extends CurveBase {
63
70
  type: ArcCurveType;
64
71
  position?: Vector2;
@@ -479,6 +486,21 @@ declare enum DxfUnits {
479
486
 
480
487
  declare type DxfUnitsString = keyof typeof DxfUnits;
481
488
 
489
+ declare interface EdgeArc {
490
+ type: EdgeArcType;
491
+ /**
492
+ * Signed bulge factor: tan(sweptAngle / 4).
493
+ * 0 is a straight edge. The sign selects the side the arc bulges toward
494
+ * (positive is a counter-clockwise sweep from vertices[0] to vertices[1]).
495
+ * |bulge| === 1 is a semicircle; |bulge| > 1 is a major arc.
496
+ */
497
+ bulge: number;
498
+ }
499
+
500
+ declare type EdgeArcType = typeof EdgeArcTypeValue;
501
+
502
+ declare const EdgeArcTypeValue = "edgeCurve:arc";
503
+
482
504
  declare interface EdgeCanSplitOptions {
483
505
  minimumLength?: number;
484
506
  }
@@ -528,6 +550,10 @@ declare const EdgeCreateTypeValue: "operation:edgeCreate";
528
550
 
529
551
  declare type EdgeCreateValueType = Omit<SpatialGraphEdgeJson, 'type'>;
530
552
 
553
+ declare type EdgeCurve = EdgeArc;
554
+
555
+ declare type EdgeCurveJson = EdgeArc;
556
+
531
557
  declare type EdgeElementMap = {
532
558
  -readonly [Key in LayoutEdgeElementType]: LayoutElementTypeMap[Key];
533
559
  };
@@ -616,9 +642,9 @@ declare type EdgeSplitValue = {
616
642
 
617
643
  declare class EdgeUpdate extends OperationBase {
618
644
  type: typeof EdgeUpdateTypeValue;
619
- value: EdgeVertexValue;
620
- previousValue: EdgeVertexValue;
621
- constructor(edge: SpatialGraphEdge | string, value: EdgeVertexValue, previousValue?: EdgeVertexValue);
645
+ value: EdgeUpdateValue;
646
+ previousValue: EdgeUpdateValue;
647
+ constructor(edge: SpatialGraphEdge | string, value: EdgeUpdateValue, previousValue?: EdgeUpdateValue);
622
648
  private setPreviousValue;
623
649
  private update;
624
650
  do(layout: SpaceGraphLayout): void;
@@ -629,6 +655,13 @@ declare type EdgeUpdateOperationJson = Pick<EdgeUpdate, 'nodeId' | 'type' | 'val
629
655
 
630
656
  declare const EdgeUpdateTypeValue: "operation:edgeUpdate";
631
657
 
658
+ declare type EdgeUpdateValue = {
659
+ vertices?: [string, string];
660
+ curve?: EdgeCurveJson | null;
661
+ name?: string;
662
+ customId?: string;
663
+ };
664
+
632
665
  declare type EdgeVertexValue = Required<Pick<SpatialGraphEdgeJson, 'vertices'>> & Partial<SpatialGraphEdgeJson>;
633
666
 
634
667
  declare class ElementCreate extends OperationBase {
@@ -799,6 +832,8 @@ export declare type ExtensionApi = {
799
832
  modifiers?: CanvasModifiers;
800
833
  }): void;
801
834
  onCanvasChange(change: CanvasChange): void;
835
+ /** The host's display settings changed — e.g. the user switched measurement units. Optional: extensions built before settings forwarding don't expose it, and hosts feature-check before calling. */
836
+ onSettingsChange?(settings: HostSettings): void;
802
837
  /** The user pressed a declared control of the running custom action. */
803
838
  onActionControl(args: {
804
839
  runId: string;
@@ -822,6 +857,7 @@ declare type ExtensionEventMap = {
822
857
  'canvas-click': Parameters<ExtensionApi['onCanvasClick']>[0];
823
858
  'canvas-mousemove': Parameters<ExtensionApi['onCanvasMouseMove']>[0];
824
859
  'canvas-change': Parameters<ExtensionApi['onCanvasChange']>[0];
860
+ 'settings-change': HostSettings;
825
861
  'action-control': Parameters<ExtensionApi['onActionControl']>[0];
826
862
  'action-end': Parameters<ExtensionApi['onActionEnd']>[0];
827
863
  };
@@ -1153,15 +1189,11 @@ declare type GroupRelationType = typeof GroupRelationTypeValue;
1153
1189
 
1154
1190
  declare const GroupRelationTypeValue = "relation:group";
1155
1191
 
1156
- declare type GroupShape = Omit<GroupShape_2, 'children'> & {
1157
- children: Shape[];
1158
- };
1159
-
1160
- declare interface GroupShape_2 {
1192
+ declare interface GroupShape<S = Shape_2> {
1161
1193
  type: 'group';
1162
1194
  position?: Vector2;
1163
1195
  rotation?: number;
1164
- children: Shape_2[];
1196
+ children: S[];
1165
1197
  style?: ShapeStyle;
1166
1198
  }
1167
1199
 
@@ -1352,6 +1384,21 @@ export declare type HostApi = {
1352
1384
  off: <K extends ExtensionEventKey>(event: K, listener?: ExtensionEventListener<K>) => void;
1353
1385
  };
1354
1386
 
1387
+ /**
1388
+ * Display settings of the host, sent in the `onConnect` parameters (as `settings`) and again on
1389
+ * every change via `onSettingsChange` — so an extension can render measurements the way the
1390
+ * host does instead of hardcoding a unit system.
1391
+ */
1392
+ export declare type HostSettings = {
1393
+ units?: {
1394
+ system?: 'metric' | 'imperial';
1395
+ /** Decimal places the host displays area values with. */
1396
+ areaDecimals?: number;
1397
+ /** Decimal places the host displays length values with. */
1398
+ lengthDecimals?: number;
1399
+ };
1400
+ };
1401
+
1355
1402
  /**
1356
1403
  * A resolved icon placed in the plan — first-class in fpe's render
1357
1404
  * vocabulary so every renderer consumes the icon svg natively instead of
@@ -1878,6 +1925,13 @@ declare class LayoutEdgeElementBase extends LayoutElementBase {
1878
1925
  getEndVertex(): SpatialGraphVertex | undefined;
1879
1926
  getAxisPoints(): [Vector2, Vector2] | [];
1880
1927
  getAxisLength(): number;
1928
+ resolveAxisPosition(s: number): {
1929
+ edge: SpatialGraphEdge;
1930
+ u: number;
1931
+ forward: boolean;
1932
+ } | undefined;
1933
+ getPointOnAxis(s: number): Vector2 | undefined;
1934
+ getTangentOnAxis(s: number): Vector2 | undefined;
1881
1935
  getEdgeAtLinearPosition(u: number): SpatialGraphEdge | undefined;
1882
1936
  getEdgesAtLinearSegment(u: number, v: number): SpatialGraphEdge[];
1883
1937
  resetTransform(): void;
@@ -1974,7 +2028,7 @@ declare class LayoutFloorPlanDxfAnnotation extends LayoutAnnotationBase {
1974
2028
  type: LayoutFloorPlanDxfType;
1975
2029
  parameters: LayoutFloorPlanDxfParameters;
1976
2030
  constructor(id: string);
1977
- setParameters(parameters: RecursivePartial<LayoutFloorPlanDxfParameters>): void;
2031
+ setParameters(parameters: LayoutFloorPlanDxfParametersUpdate): void;
1978
2032
  }
1979
2033
 
1980
2034
  declare interface LayoutFloorPlanDxfAnnotationJson extends LayoutAnnotationBaseJson {
@@ -1987,9 +2041,17 @@ declare interface LayoutFloorPlanDxfParameters {
1987
2041
  drawingOrigin: Vector2;
1988
2042
  drawingUnits: DxfUnitsString;
1989
2043
  hiddenLayers: string[];
2044
+ /**
2045
+ * Progress of tracing this drawing into the layout, owned by whatever tool does the tracing
2046
+ * (the cad-import extension keeps its cad-prep document here). Opaque to the space graph and
2047
+ * deliberately untyped for now: replaced as a whole on update, `null` resets it to `{}`.
2048
+ */
2049
+ tracingData?: Record<string, unknown>;
1990
2050
  }
1991
2051
 
1992
- declare type LayoutFloorPlanDxfParametersJson = Partial<LayoutFloorPlanDxfParameters>;
2052
+ declare type LayoutFloorPlanDxfParametersJson = Partial<Omit<LayoutFloorPlanDxfParameters, 'tracingData'>> & TracingDataUpdate;
2053
+
2054
+ declare type LayoutFloorPlanDxfParametersUpdate = RecursivePartial<Omit<LayoutFloorPlanDxfParameters, 'tracingData'>> & TracingDataUpdate;
1993
2055
 
1994
2056
  declare type LayoutFloorPlanDxfType = typeof LayoutFloorPlanDxfTypeValue;
1995
2057
 
@@ -3152,9 +3214,15 @@ declare interface SelectOption {
3152
3214
  label: string;
3153
3215
  }
3154
3216
 
3155
- export declare type Shape = CurveShape | TextShape | GroupShape | IconShape;
3217
+ export declare type Shape = Shape_2<IconShape>;
3156
3218
 
3157
- declare type Shape_2 = CurveShape | TextShape | GroupShape_2;
3219
+ /**
3220
+ *`Extension` is the sanctioned slot for renderers that
3221
+ * carry additional members (e.g. `Shape<IconShape>`).
3222
+ */
3223
+ declare type Shape_2<Extension extends {
3224
+ type: string;
3225
+ } = never> = CurveShape | TextShape | Extension | GroupShape<Shape_2<Extension>>;
3158
3226
 
3159
3227
  declare interface ShapeStyle {
3160
3228
  stroke?: string | number | number[];
@@ -3446,6 +3514,7 @@ declare interface SpaceGraphEventMap {
3446
3514
  'edge-set-vertices': [SpatialGraphEdge, {
3447
3515
  previousVertices: [SpatialGraphVertex, SpatialGraphVertex];
3448
3516
  }];
3517
+ 'edge-set-curve': [SpatialGraphEdge];
3449
3518
  'space-create': [LayoutSpace];
3450
3519
  'space-delete': [LayoutSpace];
3451
3520
  'space-split': [LayoutSpace, [LayoutSpace, LayoutSpace]];
@@ -3712,31 +3781,26 @@ declare class SpaceGraphProductBase extends SpaceGraphNodeWithCustomAttributesBa
3712
3781
  declare class SpaceGraphProductComponent extends SpaceGraphProductBase {
3713
3782
  type: SpaceGraphProductComponentType;
3714
3783
  attributes: SpaceGraphProductAttributes;
3715
- products: {
3716
- position: PositionEntry;
3717
- rotation: RotationEntry;
3718
- product: string;
3719
- }[];
3784
+ products: SpaceGraphProductComponentEntry[];
3720
3785
  geometries: GeometryOperationJson[];
3721
3786
  constructor(id: string);
3722
3787
  copyForClone(product: SpaceGraphProductComponent): void;
3723
3788
  toJSON(): SpaceGraphProductComponentJson;
3724
- setProducts(products: {
3725
- position: PositionEntry;
3726
- rotation: RotationEntry;
3727
- product: string;
3728
- }[]): void;
3789
+ setProducts(products: SpaceGraphProductComponentEntry[]): void;
3729
3790
  setInstances(): void;
3730
3791
  }
3731
3792
 
3793
+ /** Placement of one child product within a component. */
3794
+ declare interface SpaceGraphProductComponentEntry {
3795
+ position: PositionEntry;
3796
+ rotation: RotationEntry;
3797
+ product: string;
3798
+ }
3799
+
3732
3800
  declare interface SpaceGraphProductComponentJson extends SpaceGraphNodeWithCustomAttributesBaseJson {
3733
3801
  type: SpaceGraphProductComponentType;
3734
3802
  attributes?: SpaceGraphProductAttributesJson;
3735
- products: {
3736
- position: PositionEntry;
3737
- rotation: RotationEntry;
3738
- product: string;
3739
- }[];
3803
+ products: SpaceGraphProductComponentEntry[];
3740
3804
  geometries: GeometryOperationJson[];
3741
3805
  }
3742
3806
 
@@ -3889,9 +3953,18 @@ declare class SpatialGraphEdge extends SpatialGraphNodeBase {
3889
3953
  spaces: [LayoutSpace | null | undefined, LayoutSpace | null | undefined];
3890
3954
  boundaryWalls: [LayoutBoundaryWall | null, LayoutBoundaryWall | null];
3891
3955
  element: LayoutEdgeElement | null;
3956
+ curve?: EdgeCurve;
3892
3957
  constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex);
3958
+ copyForClone(edge: SpatialGraphEdge): void;
3893
3959
  getPoints(): [Vector2_2, Vector2_2];
3894
3960
  getLength(): number;
3961
+ getArc(): Arc | null;
3962
+ getPointAtParameter(u: number): Vector2_2;
3963
+ getClosestParameter(point: Vector2_2): number;
3964
+ getTangentAtParameter(u: number): Vector2_2;
3965
+ getTangentAtVertex(vertex: SpatialGraphVertex): Vector2_2;
3966
+ getPolyline(tolerance?: number): Vector2_2[];
3967
+ setCurve(curve: EdgeCurve | undefined): void;
3895
3968
  get isExternal(): boolean;
3896
3969
  setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void;
3897
3970
  resetSpatialIndexing(): void;
@@ -3908,6 +3981,7 @@ declare interface SpatialGraphEdgeJson extends SpatialGraphNodeBaseJson {
3908
3981
  id: string;
3909
3982
  type: SpatialGraphEdgeType;
3910
3983
  vertices: [string, string];
3984
+ curve?: EdgeCurveJson;
3911
3985
  }
3912
3986
 
3913
3987
  declare type SpatialGraphEdgeType = typeof SpatialGraphEdgeTypeValue;
@@ -4171,6 +4245,11 @@ declare type ThemeStyles = {
4171
4245
  byFilter?: StyleFilter[];
4172
4246
  };
4173
4247
 
4248
+ /** `null` resets the tracing data to `{}` (json cannot carry `undefined`). */
4249
+ declare type TracingDataUpdate = {
4250
+ tracingData?: Record<string, unknown> | null;
4251
+ };
4252
+
4174
4253
  declare type Transform3d = {
4175
4254
  position: Vector3;
4176
4255
  rotation: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@archilogic/extension-sdk",
3
3
  "description": "",
4
- "version": "0.16.0",
4
+ "version": "0.17.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -33,8 +33,9 @@
33
33
  }
34
34
  },
35
35
  "devDependencies": {
36
- "@archilogic/floor-plan-core": "^5.8.5",
37
- "@archilogic/space-graph-sdk": "^0.11.1",
36
+ "@archilogic/floor-plan-core": "^5.12.1",
37
+ "@archilogic/space-graph-core": "^0.34.1",
38
+ "@archilogic/space-graph-sdk": "^0.11.4",
38
39
  "vite-plugin-static-copy": "^4.1.1"
39
40
  },
40
41
  "nx": {}