@archilogic/extension-sdk 0.17.0 → 0.17.2
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 +12 -0
- package/dist/actions.d.ts +89 -28
- package/dist/index.d.ts +89 -28
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @archilogic/extension-sdk
|
|
2
2
|
|
|
3
|
+
## 0.17.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 81d691c: Bump spage-graph and fpe version
|
|
8
|
+
|
|
9
|
+
## 0.17.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 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.
|
|
14
|
+
|
|
3
15
|
## 0.17.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:
|
|
713
|
-
previousValue:
|
|
714
|
-
constructor(edge: SpatialGraphEdge | string, value:
|
|
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 {
|
|
@@ -1249,15 +1282,11 @@ declare type GroupRelationType = typeof GroupRelationTypeValue;
|
|
|
1249
1282
|
|
|
1250
1283
|
declare const GroupRelationTypeValue = "relation:group";
|
|
1251
1284
|
|
|
1252
|
-
declare
|
|
1253
|
-
children: Shape[];
|
|
1254
|
-
};
|
|
1255
|
-
|
|
1256
|
-
declare interface GroupShape_2 {
|
|
1285
|
+
declare interface GroupShape<S = Shape_2> {
|
|
1257
1286
|
type: 'group';
|
|
1258
1287
|
position?: Vector2;
|
|
1259
1288
|
rotation?: number;
|
|
1260
|
-
children:
|
|
1289
|
+
children: S[];
|
|
1261
1290
|
style?: ShapeStyle;
|
|
1262
1291
|
}
|
|
1263
1292
|
|
|
@@ -1989,6 +2018,13 @@ declare class LayoutEdgeElementBase extends LayoutElementBase {
|
|
|
1989
2018
|
getEndVertex(): SpatialGraphVertex | undefined;
|
|
1990
2019
|
getAxisPoints(): [Vector2, Vector2] | [];
|
|
1991
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;
|
|
1992
2028
|
getEdgeAtLinearPosition(u: number): SpatialGraphEdge | undefined;
|
|
1993
2029
|
getEdgesAtLinearSegment(u: number, v: number): SpatialGraphEdge[];
|
|
1994
2030
|
resetTransform(): void;
|
|
@@ -2085,7 +2121,7 @@ declare class LayoutFloorPlanDxfAnnotation extends LayoutAnnotationBase {
|
|
|
2085
2121
|
type: LayoutFloorPlanDxfType;
|
|
2086
2122
|
parameters: LayoutFloorPlanDxfParameters;
|
|
2087
2123
|
constructor(id: string);
|
|
2088
|
-
setParameters(parameters:
|
|
2124
|
+
setParameters(parameters: LayoutFloorPlanDxfParametersUpdate): void;
|
|
2089
2125
|
}
|
|
2090
2126
|
|
|
2091
2127
|
declare interface LayoutFloorPlanDxfAnnotationJson extends LayoutAnnotationBaseJson {
|
|
@@ -2098,9 +2134,17 @@ declare interface LayoutFloorPlanDxfParameters {
|
|
|
2098
2134
|
drawingOrigin: Vector2;
|
|
2099
2135
|
drawingUnits: DxfUnitsString;
|
|
2100
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>;
|
|
2101
2143
|
}
|
|
2102
2144
|
|
|
2103
|
-
declare type LayoutFloorPlanDxfParametersJson = Partial<LayoutFloorPlanDxfParameters
|
|
2145
|
+
declare type LayoutFloorPlanDxfParametersJson = Partial<Omit<LayoutFloorPlanDxfParameters, 'tracingData'>> & TracingDataUpdate;
|
|
2146
|
+
|
|
2147
|
+
declare type LayoutFloorPlanDxfParametersUpdate = RecursivePartial<Omit<LayoutFloorPlanDxfParameters, 'tracingData'>> & TracingDataUpdate;
|
|
2104
2148
|
|
|
2105
2149
|
declare type LayoutFloorPlanDxfType = typeof LayoutFloorPlanDxfTypeValue;
|
|
2106
2150
|
|
|
@@ -3265,9 +3309,15 @@ declare interface SelectOption {
|
|
|
3265
3309
|
label: string;
|
|
3266
3310
|
}
|
|
3267
3311
|
|
|
3268
|
-
declare type Shape =
|
|
3312
|
+
declare type Shape = Shape_2<IconShape>;
|
|
3269
3313
|
|
|
3270
|
-
|
|
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>>;
|
|
3271
3321
|
|
|
3272
3322
|
declare interface ShapeStyle {
|
|
3273
3323
|
stroke?: string | number | number[];
|
|
@@ -3559,6 +3609,7 @@ declare interface SpaceGraphEventMap {
|
|
|
3559
3609
|
'edge-set-vertices': [SpatialGraphEdge, {
|
|
3560
3610
|
previousVertices: [SpatialGraphVertex, SpatialGraphVertex];
|
|
3561
3611
|
}];
|
|
3612
|
+
'edge-set-curve': [SpatialGraphEdge];
|
|
3562
3613
|
'space-create': [LayoutSpace];
|
|
3563
3614
|
'space-delete': [LayoutSpace];
|
|
3564
3615
|
'space-split': [LayoutSpace, [LayoutSpace, LayoutSpace]];
|
|
@@ -3825,31 +3876,26 @@ declare class SpaceGraphProductBase extends SpaceGraphNodeWithCustomAttributesBa
|
|
|
3825
3876
|
declare class SpaceGraphProductComponent extends SpaceGraphProductBase {
|
|
3826
3877
|
type: SpaceGraphProductComponentType;
|
|
3827
3878
|
attributes: SpaceGraphProductAttributes;
|
|
3828
|
-
products:
|
|
3829
|
-
position: PositionEntry;
|
|
3830
|
-
rotation: RotationEntry;
|
|
3831
|
-
product: string;
|
|
3832
|
-
}[];
|
|
3879
|
+
products: SpaceGraphProductComponentEntry[];
|
|
3833
3880
|
geometries: GeometryOperationJson[];
|
|
3834
3881
|
constructor(id: string);
|
|
3835
3882
|
copyForClone(product: SpaceGraphProductComponent): void;
|
|
3836
3883
|
toJSON(): SpaceGraphProductComponentJson;
|
|
3837
|
-
setProducts(products:
|
|
3838
|
-
position: PositionEntry;
|
|
3839
|
-
rotation: RotationEntry;
|
|
3840
|
-
product: string;
|
|
3841
|
-
}[]): void;
|
|
3884
|
+
setProducts(products: SpaceGraphProductComponentEntry[]): void;
|
|
3842
3885
|
setInstances(): void;
|
|
3843
3886
|
}
|
|
3844
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
|
+
|
|
3845
3895
|
declare interface SpaceGraphProductComponentJson extends SpaceGraphNodeWithCustomAttributesBaseJson {
|
|
3846
3896
|
type: SpaceGraphProductComponentType;
|
|
3847
3897
|
attributes?: SpaceGraphProductAttributesJson;
|
|
3848
|
-
products:
|
|
3849
|
-
position: PositionEntry;
|
|
3850
|
-
rotation: RotationEntry;
|
|
3851
|
-
product: string;
|
|
3852
|
-
}[];
|
|
3898
|
+
products: SpaceGraphProductComponentEntry[];
|
|
3853
3899
|
geometries: GeometryOperationJson[];
|
|
3854
3900
|
}
|
|
3855
3901
|
|
|
@@ -4002,9 +4048,18 @@ declare class SpatialGraphEdge extends SpatialGraphNodeBase {
|
|
|
4002
4048
|
spaces: [LayoutSpace | null | undefined, LayoutSpace | null | undefined];
|
|
4003
4049
|
boundaryWalls: [LayoutBoundaryWall | null, LayoutBoundaryWall | null];
|
|
4004
4050
|
element: LayoutEdgeElement | null;
|
|
4051
|
+
curve?: EdgeCurve;
|
|
4005
4052
|
constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex);
|
|
4053
|
+
copyForClone(edge: SpatialGraphEdge): void;
|
|
4006
4054
|
getPoints(): [Vector2_2, Vector2_2];
|
|
4007
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;
|
|
4008
4063
|
get isExternal(): boolean;
|
|
4009
4064
|
setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void;
|
|
4010
4065
|
resetSpatialIndexing(): void;
|
|
@@ -4021,6 +4076,7 @@ declare interface SpatialGraphEdgeJson extends SpatialGraphNodeBaseJson {
|
|
|
4021
4076
|
id: string;
|
|
4022
4077
|
type: SpatialGraphEdgeType;
|
|
4023
4078
|
vertices: [string, string];
|
|
4079
|
+
curve?: EdgeCurveJson;
|
|
4024
4080
|
}
|
|
4025
4081
|
|
|
4026
4082
|
declare type SpatialGraphEdgeType = typeof SpatialGraphEdgeTypeValue;
|
|
@@ -4284,6 +4340,11 @@ declare type ThemeStyles = {
|
|
|
4284
4340
|
byFilter?: StyleFilter[];
|
|
4285
4341
|
};
|
|
4286
4342
|
|
|
4343
|
+
/** `null` resets the tracing data to `{}` (json cannot carry `undefined`). */
|
|
4344
|
+
declare type TracingDataUpdate = {
|
|
4345
|
+
tracingData?: Record<string, unknown> | null;
|
|
4346
|
+
};
|
|
4347
|
+
|
|
4287
4348
|
declare type Transform3d = {
|
|
4288
4349
|
position: Vector3;
|
|
4289
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:
|
|
620
|
-
previousValue:
|
|
621
|
-
constructor(edge: SpatialGraphEdge | string, value:
|
|
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 {
|
|
@@ -1156,15 +1189,11 @@ declare type GroupRelationType = typeof GroupRelationTypeValue;
|
|
|
1156
1189
|
|
|
1157
1190
|
declare const GroupRelationTypeValue = "relation:group";
|
|
1158
1191
|
|
|
1159
|
-
declare
|
|
1160
|
-
children: Shape[];
|
|
1161
|
-
};
|
|
1162
|
-
|
|
1163
|
-
declare interface GroupShape_2 {
|
|
1192
|
+
declare interface GroupShape<S = Shape_2> {
|
|
1164
1193
|
type: 'group';
|
|
1165
1194
|
position?: Vector2;
|
|
1166
1195
|
rotation?: number;
|
|
1167
|
-
children:
|
|
1196
|
+
children: S[];
|
|
1168
1197
|
style?: ShapeStyle;
|
|
1169
1198
|
}
|
|
1170
1199
|
|
|
@@ -1896,6 +1925,13 @@ declare class LayoutEdgeElementBase extends LayoutElementBase {
|
|
|
1896
1925
|
getEndVertex(): SpatialGraphVertex | undefined;
|
|
1897
1926
|
getAxisPoints(): [Vector2, Vector2] | [];
|
|
1898
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;
|
|
1899
1935
|
getEdgeAtLinearPosition(u: number): SpatialGraphEdge | undefined;
|
|
1900
1936
|
getEdgesAtLinearSegment(u: number, v: number): SpatialGraphEdge[];
|
|
1901
1937
|
resetTransform(): void;
|
|
@@ -1992,7 +2028,7 @@ declare class LayoutFloorPlanDxfAnnotation extends LayoutAnnotationBase {
|
|
|
1992
2028
|
type: LayoutFloorPlanDxfType;
|
|
1993
2029
|
parameters: LayoutFloorPlanDxfParameters;
|
|
1994
2030
|
constructor(id: string);
|
|
1995
|
-
setParameters(parameters:
|
|
2031
|
+
setParameters(parameters: LayoutFloorPlanDxfParametersUpdate): void;
|
|
1996
2032
|
}
|
|
1997
2033
|
|
|
1998
2034
|
declare interface LayoutFloorPlanDxfAnnotationJson extends LayoutAnnotationBaseJson {
|
|
@@ -2005,9 +2041,17 @@ declare interface LayoutFloorPlanDxfParameters {
|
|
|
2005
2041
|
drawingOrigin: Vector2;
|
|
2006
2042
|
drawingUnits: DxfUnitsString;
|
|
2007
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>;
|
|
2008
2050
|
}
|
|
2009
2051
|
|
|
2010
|
-
declare type LayoutFloorPlanDxfParametersJson = Partial<LayoutFloorPlanDxfParameters
|
|
2052
|
+
declare type LayoutFloorPlanDxfParametersJson = Partial<Omit<LayoutFloorPlanDxfParameters, 'tracingData'>> & TracingDataUpdate;
|
|
2053
|
+
|
|
2054
|
+
declare type LayoutFloorPlanDxfParametersUpdate = RecursivePartial<Omit<LayoutFloorPlanDxfParameters, 'tracingData'>> & TracingDataUpdate;
|
|
2011
2055
|
|
|
2012
2056
|
declare type LayoutFloorPlanDxfType = typeof LayoutFloorPlanDxfTypeValue;
|
|
2013
2057
|
|
|
@@ -3170,9 +3214,15 @@ declare interface SelectOption {
|
|
|
3170
3214
|
label: string;
|
|
3171
3215
|
}
|
|
3172
3216
|
|
|
3173
|
-
export declare type Shape =
|
|
3217
|
+
export declare type Shape = Shape_2<IconShape>;
|
|
3174
3218
|
|
|
3175
|
-
|
|
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>>;
|
|
3176
3226
|
|
|
3177
3227
|
declare interface ShapeStyle {
|
|
3178
3228
|
stroke?: string | number | number[];
|
|
@@ -3464,6 +3514,7 @@ declare interface SpaceGraphEventMap {
|
|
|
3464
3514
|
'edge-set-vertices': [SpatialGraphEdge, {
|
|
3465
3515
|
previousVertices: [SpatialGraphVertex, SpatialGraphVertex];
|
|
3466
3516
|
}];
|
|
3517
|
+
'edge-set-curve': [SpatialGraphEdge];
|
|
3467
3518
|
'space-create': [LayoutSpace];
|
|
3468
3519
|
'space-delete': [LayoutSpace];
|
|
3469
3520
|
'space-split': [LayoutSpace, [LayoutSpace, LayoutSpace]];
|
|
@@ -3730,31 +3781,26 @@ declare class SpaceGraphProductBase extends SpaceGraphNodeWithCustomAttributesBa
|
|
|
3730
3781
|
declare class SpaceGraphProductComponent extends SpaceGraphProductBase {
|
|
3731
3782
|
type: SpaceGraphProductComponentType;
|
|
3732
3783
|
attributes: SpaceGraphProductAttributes;
|
|
3733
|
-
products:
|
|
3734
|
-
position: PositionEntry;
|
|
3735
|
-
rotation: RotationEntry;
|
|
3736
|
-
product: string;
|
|
3737
|
-
}[];
|
|
3784
|
+
products: SpaceGraphProductComponentEntry[];
|
|
3738
3785
|
geometries: GeometryOperationJson[];
|
|
3739
3786
|
constructor(id: string);
|
|
3740
3787
|
copyForClone(product: SpaceGraphProductComponent): void;
|
|
3741
3788
|
toJSON(): SpaceGraphProductComponentJson;
|
|
3742
|
-
setProducts(products:
|
|
3743
|
-
position: PositionEntry;
|
|
3744
|
-
rotation: RotationEntry;
|
|
3745
|
-
product: string;
|
|
3746
|
-
}[]): void;
|
|
3789
|
+
setProducts(products: SpaceGraphProductComponentEntry[]): void;
|
|
3747
3790
|
setInstances(): void;
|
|
3748
3791
|
}
|
|
3749
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
|
+
|
|
3750
3800
|
declare interface SpaceGraphProductComponentJson extends SpaceGraphNodeWithCustomAttributesBaseJson {
|
|
3751
3801
|
type: SpaceGraphProductComponentType;
|
|
3752
3802
|
attributes?: SpaceGraphProductAttributesJson;
|
|
3753
|
-
products:
|
|
3754
|
-
position: PositionEntry;
|
|
3755
|
-
rotation: RotationEntry;
|
|
3756
|
-
product: string;
|
|
3757
|
-
}[];
|
|
3803
|
+
products: SpaceGraphProductComponentEntry[];
|
|
3758
3804
|
geometries: GeometryOperationJson[];
|
|
3759
3805
|
}
|
|
3760
3806
|
|
|
@@ -3907,9 +3953,18 @@ declare class SpatialGraphEdge extends SpatialGraphNodeBase {
|
|
|
3907
3953
|
spaces: [LayoutSpace | null | undefined, LayoutSpace | null | undefined];
|
|
3908
3954
|
boundaryWalls: [LayoutBoundaryWall | null, LayoutBoundaryWall | null];
|
|
3909
3955
|
element: LayoutEdgeElement | null;
|
|
3956
|
+
curve?: EdgeCurve;
|
|
3910
3957
|
constructor(id: string, vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex);
|
|
3958
|
+
copyForClone(edge: SpatialGraphEdge): void;
|
|
3911
3959
|
getPoints(): [Vector2_2, Vector2_2];
|
|
3912
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;
|
|
3913
3968
|
get isExternal(): boolean;
|
|
3914
3969
|
setVertices(vertex1: SpatialGraphVertex, vertex2: SpatialGraphVertex): void;
|
|
3915
3970
|
resetSpatialIndexing(): void;
|
|
@@ -3926,6 +3981,7 @@ declare interface SpatialGraphEdgeJson extends SpatialGraphNodeBaseJson {
|
|
|
3926
3981
|
id: string;
|
|
3927
3982
|
type: SpatialGraphEdgeType;
|
|
3928
3983
|
vertices: [string, string];
|
|
3984
|
+
curve?: EdgeCurveJson;
|
|
3929
3985
|
}
|
|
3930
3986
|
|
|
3931
3987
|
declare type SpatialGraphEdgeType = typeof SpatialGraphEdgeTypeValue;
|
|
@@ -4189,6 +4245,11 @@ declare type ThemeStyles = {
|
|
|
4189
4245
|
byFilter?: StyleFilter[];
|
|
4190
4246
|
};
|
|
4191
4247
|
|
|
4248
|
+
/** `null` resets the tracing data to `{}` (json cannot carry `undefined`). */
|
|
4249
|
+
declare type TracingDataUpdate = {
|
|
4250
|
+
tracingData?: Record<string, unknown> | null;
|
|
4251
|
+
};
|
|
4252
|
+
|
|
4192
4253
|
declare type Transform3d = {
|
|
4193
4254
|
position: Vector3;
|
|
4194
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.17.
|
|
4
|
+
"version": "0.17.2",
|
|
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.
|
|
37
|
-
"@archilogic/space-graph-
|
|
36
|
+
"@archilogic/floor-plan-core": "^5.14.0",
|
|
37
|
+
"@archilogic/space-graph-core": "^0.34.2",
|
|
38
|
+
"@archilogic/space-graph-sdk": "^0.11.4",
|
|
38
39
|
"vite-plugin-static-copy": "^4.1.1"
|
|
39
40
|
},
|
|
40
41
|
"nx": {}
|