@archilogic/extension-sdk 0.13.1 → 0.14.0
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 +14 -0
- package/dist/index.d.ts +201 -171
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @archilogic/extension-sdk
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b4c58c3: Extensions can track the 2D viewport and frame arbitrary areas. The host may call the new `onCanvasChange` extension API (received as the `canvas-change` event) carrying a tagged `CanvasView2d` (`canvasMode: '2d'`) with the current `viewBox` in meters, `pixelsPerMeter` zoom scale and canvas pixel size — enabling screen-space tooling such as constant-pixel pick tolerances. The `canvasMode` discriminant reserves room for a future 3D canvas without renaming `CanvasChange`. The new `hostApi.zoomToBoundingBox({ min, max, animate })` lets an extension zoom the plan to a custom region, e.g. a drawing it rendered itself.
|
|
8
|
+
- 279ff09: Canvas pointer events now carry the keyboard `modifiers` (shift, alt, ctrl, meta) held at the time of the interaction, on both `onCanvasClick` and `onCanvasMouseMove`. The field is optional, so hosts that predate modifier forwarding keep working.
|
|
9
|
+
- c7bd399: Extensions can subscribe to canvas mousemove: the host may call the new `onCanvasMouseMove` extension API and extensions receive it as the `canvas-mousemove` event, enabling hover-driven tooling on the plan.
|
|
10
|
+
|
|
11
|
+
## 0.13.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 2ab8113: chore: bump space graph and floor plan engine dependencies for extension-sdk
|
|
16
|
+
|
|
3
17
|
## 0.13.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -44,14 +44,7 @@ declare type AnnotationUpdateValue = Partial<LayoutAnnotationJson> & {
|
|
|
44
44
|
|
|
45
45
|
declare interface ArcCurve extends CurveBase {
|
|
46
46
|
type: ArcCurveType;
|
|
47
|
-
|
|
48
|
-
startAngle: number;
|
|
49
|
-
endAngle: number;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
declare interface ArcCurve_2 extends BaseShape {
|
|
53
|
-
type: 'curve:arc';
|
|
54
|
-
position: Vector2_2;
|
|
47
|
+
position?: Vector2;
|
|
55
48
|
radius: number;
|
|
56
49
|
startAngle: number;
|
|
57
50
|
endAngle: number;
|
|
@@ -105,7 +98,7 @@ declare interface BaseField {
|
|
|
105
98
|
required?: boolean;
|
|
106
99
|
}
|
|
107
100
|
|
|
108
|
-
declare interface
|
|
101
|
+
declare interface BaseNodeFilter {
|
|
109
102
|
id?: StringComparator;
|
|
110
103
|
type?: StringComparator;
|
|
111
104
|
name?: StringComparator | NullComparator;
|
|
@@ -118,19 +111,6 @@ declare interface BaseFilter {
|
|
|
118
111
|
};
|
|
119
112
|
}
|
|
120
113
|
|
|
121
|
-
declare interface BaseFilter_2 {
|
|
122
|
-
id?: StringComparator_2;
|
|
123
|
-
type?: StringComparator_2;
|
|
124
|
-
name?: StringComparator_2 | NullComparator_2;
|
|
125
|
-
customId?: StringComparator_2 | NullComparator_2;
|
|
126
|
-
customAttributes?: Record<string, StringComparator_2 | NumberComparator_2 | BooleanComparator_2 | NullComparator_2>;
|
|
127
|
-
dimensions?: {
|
|
128
|
-
width?: NumberComparator_2;
|
|
129
|
-
length?: NumberComparator_2;
|
|
130
|
-
height?: NumberComparator_2;
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
114
|
declare interface BaseSelect {
|
|
135
115
|
id?: boolean;
|
|
136
116
|
type?: boolean;
|
|
@@ -148,23 +128,16 @@ declare interface BaseSelect {
|
|
|
148
128
|
contour?: boolean;
|
|
149
129
|
}
|
|
150
130
|
|
|
151
|
-
declare interface
|
|
152
|
-
type:
|
|
153
|
-
|
|
131
|
+
declare interface BezierCurve extends CurveBase {
|
|
132
|
+
type: BezierCurveType;
|
|
133
|
+
points: Vector2[];
|
|
154
134
|
}
|
|
155
135
|
|
|
156
|
-
declare
|
|
157
|
-
type: 'curve:quadraticBezier';
|
|
158
|
-
points: Polygon_2;
|
|
159
|
-
}
|
|
136
|
+
declare type BezierCurveType = typeof BezierCurveTypeValue;
|
|
160
137
|
|
|
161
|
-
declare
|
|
162
|
-
eq: boolean;
|
|
163
|
-
} | {
|
|
164
|
-
neq: boolean;
|
|
165
|
-
};
|
|
138
|
+
declare const BezierCurveTypeValue = "curve:quadraticBezier";
|
|
166
139
|
|
|
167
|
-
declare type
|
|
140
|
+
declare type BooleanComparator = boolean | {
|
|
168
141
|
eq: boolean;
|
|
169
142
|
} | {
|
|
170
143
|
neq: boolean;
|
|
@@ -194,14 +167,50 @@ declare type BoundingBox3d = {
|
|
|
194
167
|
max: Vector3;
|
|
195
168
|
};
|
|
196
169
|
|
|
170
|
+
/**
|
|
171
|
+
* The canvas viewport as delivered to `onCanvasChange`. Today it is always the 2D view; a future
|
|
172
|
+
* 3D canvas would add a `CanvasView3d` (`canvasMode: '3d'`, camera pose) and widen this to
|
|
173
|
+
* `CanvasView2d | CanvasView3d` — extensions that switch on `canvasMode` stay forward-compatible.
|
|
174
|
+
*/
|
|
175
|
+
export declare type CanvasChange = CanvasView2d;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Keyboard modifier state at the moment of a canvas pointer event. Extensions can't listen to
|
|
179
|
+
* keys on the host document, so the host snapshots the modifiers into each event — e.g. for
|
|
180
|
+
* CAD-style selection where shift-click adds and alt-click removes.
|
|
181
|
+
*/
|
|
182
|
+
export declare type CanvasModifiers = {
|
|
183
|
+
shift: boolean;
|
|
184
|
+
alt: boolean;
|
|
185
|
+
ctrl: boolean;
|
|
186
|
+
meta: boolean;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* State of the 2D canvas viewport, emitted whenever the user pans, zooms or the canvas resizes.
|
|
191
|
+
* Lets an extension work in screen space — e.g. keep a pick tolerance at a constant pixel size
|
|
192
|
+
* (`tolerancePx / pixelsPerMeter` meters) so it tightens as the user zooms in. The `canvasMode`
|
|
193
|
+
* discriminant leaves room for a future 3D canvas without changing the `CanvasChange` name.
|
|
194
|
+
*/
|
|
195
|
+
export declare type CanvasView2d = {
|
|
196
|
+
canvasMode: '2d';
|
|
197
|
+
/** Visible plan area in meters, `[x, y]` corners in layout space. */
|
|
198
|
+
viewBox: {
|
|
199
|
+
min: Vector2;
|
|
200
|
+
max: Vector2;
|
|
201
|
+
};
|
|
202
|
+
/** Screen pixels per plan meter — the zoom scale. */
|
|
203
|
+
pixelsPerMeter: number;
|
|
204
|
+
/** Canvas size in CSS pixels. */
|
|
205
|
+
canvas: {
|
|
206
|
+
width: number;
|
|
207
|
+
height: number;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
|
|
197
211
|
declare interface CircleCurve extends CurveBase {
|
|
198
212
|
type: CircleCurveType;
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
declare interface CircleCurve_2 extends BaseShape {
|
|
203
|
-
type: 'curve:circle';
|
|
204
|
-
position: Vector2_2;
|
|
213
|
+
position?: Vector2;
|
|
205
214
|
radius: number;
|
|
206
215
|
}
|
|
207
216
|
|
|
@@ -275,11 +284,6 @@ declare interface CompositeCurve extends CurveBase {
|
|
|
275
284
|
segments: OpenCurve[];
|
|
276
285
|
}
|
|
277
286
|
|
|
278
|
-
declare interface CompositeCurve_2 extends BaseShape {
|
|
279
|
-
type: 'curve:composite';
|
|
280
|
-
segments: OpenCurves[];
|
|
281
|
-
}
|
|
282
|
-
|
|
283
287
|
declare type CompositeCurveType = typeof CompositeCurveTypeValue;
|
|
284
288
|
|
|
285
289
|
declare const CompositeCurveTypeValue = "curve:composite";
|
|
@@ -306,10 +310,16 @@ declare type CuboidGeometryType = typeof CuboidGeometryTypeValue;
|
|
|
306
310
|
|
|
307
311
|
declare const CuboidGeometryTypeValue = "geometry:cuboid";
|
|
308
312
|
|
|
313
|
+
declare type Curve = ClosedCurve | OpenCurve;
|
|
314
|
+
|
|
309
315
|
declare interface CurveBase {
|
|
310
316
|
type: CurveType;
|
|
311
317
|
}
|
|
312
318
|
|
|
319
|
+
declare type CurveShape = Curve & {
|
|
320
|
+
style?: ShapeStyle;
|
|
321
|
+
};
|
|
322
|
+
|
|
313
323
|
declare type CurveType = ClosedCurveType | OpenCurveType;
|
|
314
324
|
|
|
315
325
|
declare class CustomAttributeCreate extends OperationBase {
|
|
@@ -627,7 +637,7 @@ export declare interface ElementData extends BaseData {
|
|
|
627
637
|
parent: ElementData;
|
|
628
638
|
}
|
|
629
639
|
|
|
630
|
-
export declare interface ElementFilter extends
|
|
640
|
+
export declare interface ElementFilter extends BaseNodeFilter {
|
|
631
641
|
product?: ProductFilter;
|
|
632
642
|
category?: StringComparator;
|
|
633
643
|
subCategory?: StringComparator;
|
|
@@ -641,20 +651,6 @@ export declare interface ElementFilter extends BaseFilter {
|
|
|
641
651
|
isExternal?: BooleanComparator;
|
|
642
652
|
}
|
|
643
653
|
|
|
644
|
-
declare interface ElementFilter_2 extends BaseFilter_2 {
|
|
645
|
-
product?: ProductFilter_2;
|
|
646
|
-
category?: StringComparator_2;
|
|
647
|
-
subCategory?: StringComparator_2;
|
|
648
|
-
/** point query */
|
|
649
|
-
at?: Vector2;
|
|
650
|
-
/** 2d bounding box intersection */
|
|
651
|
-
within?: {
|
|
652
|
-
min: Vector2;
|
|
653
|
-
max: Vector2;
|
|
654
|
-
};
|
|
655
|
-
isExternal?: BooleanComparator_2;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
654
|
declare type ElementQuery = {
|
|
659
655
|
select?: ElementSelect;
|
|
660
656
|
where?: ElementFilter;
|
|
@@ -742,10 +738,19 @@ export declare type ExtensionApi = {
|
|
|
742
738
|
position: [number, number];
|
|
743
739
|
nodeId: string;
|
|
744
740
|
}): void;
|
|
745
|
-
onCanvasClick({ position, nodeId }: {
|
|
741
|
+
onCanvasClick({ position, nodeId, modifiers }: {
|
|
742
|
+
position: [number, number];
|
|
743
|
+
nodeId?: string;
|
|
744
|
+
/** Absent on hosts that predate modifier forwarding. */
|
|
745
|
+
modifiers?: CanvasModifiers;
|
|
746
|
+
}): void;
|
|
747
|
+
onCanvasMouseMove({ position, nodeId, modifiers }: {
|
|
746
748
|
position: [number, number];
|
|
747
749
|
nodeId?: string;
|
|
750
|
+
/** Absent on hosts that predate modifier forwarding. */
|
|
751
|
+
modifiers?: CanvasModifiers;
|
|
748
752
|
}): void;
|
|
753
|
+
onCanvasChange(change: CanvasChange): void;
|
|
749
754
|
};
|
|
750
755
|
|
|
751
756
|
declare type ExtensionEventKey = keyof ExtensionEventMap;
|
|
@@ -757,6 +762,8 @@ declare type ExtensionEventMap = {
|
|
|
757
762
|
'selection-change': Parameters<ExtensionApi['onSelectionChange']>[0];
|
|
758
763
|
'graphic-drag': Parameters<ExtensionApi['onGraphicDrag']>[0];
|
|
759
764
|
'canvas-click': Parameters<ExtensionApi['onCanvasClick']>[0];
|
|
765
|
+
'canvas-mousemove': Parameters<ExtensionApi['onCanvasMouseMove']>[0];
|
|
766
|
+
'canvas-change': Parameters<ExtensionApi['onCanvasChange']>[0];
|
|
760
767
|
};
|
|
761
768
|
|
|
762
769
|
declare class ExtrusionGeometry extends ParametricGeometryBase {
|
|
@@ -1077,11 +1084,12 @@ declare type GroupRelationType = typeof GroupRelationTypeValue;
|
|
|
1077
1084
|
|
|
1078
1085
|
declare const GroupRelationTypeValue = "relation:group";
|
|
1079
1086
|
|
|
1080
|
-
declare interface GroupShape
|
|
1087
|
+
declare interface GroupShape {
|
|
1081
1088
|
type: 'group';
|
|
1082
|
-
position?:
|
|
1089
|
+
position?: Vector2;
|
|
1083
1090
|
rotation?: number;
|
|
1084
1091
|
children: Shape[];
|
|
1092
|
+
style?: ShapeStyle;
|
|
1085
1093
|
}
|
|
1086
1094
|
|
|
1087
1095
|
/**
|
|
@@ -1173,6 +1181,15 @@ export declare type HostApi = {
|
|
|
1173
1181
|
margin?: number;
|
|
1174
1182
|
animate?: number | boolean;
|
|
1175
1183
|
}) => Promise<boolean>;
|
|
1184
|
+
/**
|
|
1185
|
+
* Frame an arbitrary area in plan meters — e.g. a custom drawing the extension rendered that
|
|
1186
|
+
* the host floor's own extents don't cover.
|
|
1187
|
+
*/
|
|
1188
|
+
zoomToBoundingBox: (args: {
|
|
1189
|
+
min: Vector2;
|
|
1190
|
+
max: Vector2;
|
|
1191
|
+
animate?: number | boolean;
|
|
1192
|
+
}) => Promise<boolean>;
|
|
1176
1193
|
drawNodeUpdate: (args: {
|
|
1177
1194
|
nodeId: string;
|
|
1178
1195
|
style: 'selected' | ShapeStyle | false;
|
|
@@ -1235,6 +1252,41 @@ declare type IndexRange = {
|
|
|
1235
1252
|
end: number;
|
|
1236
1253
|
};
|
|
1237
1254
|
|
|
1255
|
+
declare interface LabelAppearance {
|
|
1256
|
+
text?: string;
|
|
1257
|
+
icon?: LabelIcon;
|
|
1258
|
+
fontSize?: number;
|
|
1259
|
+
color?: string;
|
|
1260
|
+
textOutline?: boolean;
|
|
1261
|
+
/** Only render within this zoom range */
|
|
1262
|
+
visible?: [number, number];
|
|
1263
|
+
fixedScreenSize?: boolean | [number, number];
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
declare interface LabelIcon {
|
|
1267
|
+
/** Well-known symbol id, e.g. 'iso7010:F001' (fire extinguisher). Preferred over uri */
|
|
1268
|
+
symbol?: string;
|
|
1269
|
+
/** Custom SVG by URI (SVG-only, so every output stays vector), for icons outside the symbol library */
|
|
1270
|
+
uri?: string;
|
|
1271
|
+
/** Icon height in meters at world scale; the label's fixedScreenSize applies on top */
|
|
1272
|
+
size?: number;
|
|
1273
|
+
/** Arrangement relative to the text when both are set. Default 'above' */
|
|
1274
|
+
placement?: 'above' | 'below' | 'left' | 'right';
|
|
1275
|
+
/** Tint for monochrome symbols */
|
|
1276
|
+
color?: string;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
declare interface LabelRule extends LabelAppearance {
|
|
1280
|
+
query: NodeQuery;
|
|
1281
|
+
offset?: Vector2;
|
|
1282
|
+
frame?: 'local' | 'world';
|
|
1283
|
+
overrides?: Record<string, {
|
|
1284
|
+
offset?: Vector2;
|
|
1285
|
+
hidden?: boolean;
|
|
1286
|
+
}>;
|
|
1287
|
+
name?: string;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1238
1290
|
declare class Layout2dView extends LayoutViewBase {
|
|
1239
1291
|
type: Layout2dViewType;
|
|
1240
1292
|
parameters: Layout2dViewParameters;
|
|
@@ -1321,7 +1373,7 @@ declare type Layout3dViewType = typeof Layout3dViewTypeValue;
|
|
|
1321
1373
|
|
|
1322
1374
|
declare const Layout3dViewTypeValue = "view:3d";
|
|
1323
1375
|
|
|
1324
|
-
declare type LayoutAnnotation = LayoutFloorPlanDxfAnnotation | LayoutFloorPlanImageAnnotation;
|
|
1376
|
+
declare type LayoutAnnotation = LayoutFloorPlanDxfAnnotation | LayoutFloorPlanImageAnnotation | LayoutLabelAnnotation;
|
|
1325
1377
|
|
|
1326
1378
|
declare class LayoutAnnotationBase extends LayoutNodeBase {
|
|
1327
1379
|
type: LayoutAnnotationType;
|
|
@@ -1341,13 +1393,13 @@ declare interface LayoutAnnotationBaseJson extends LayoutNodeBaseJson {
|
|
|
1341
1393
|
parameters?: LayoutAnnotationParametersJson;
|
|
1342
1394
|
}
|
|
1343
1395
|
|
|
1344
|
-
declare type LayoutAnnotationJson = LayoutFloorPlanDxfAnnotationJson | LayoutFloorPlanImageAnnotationJson;
|
|
1396
|
+
declare type LayoutAnnotationJson = LayoutFloorPlanDxfAnnotationJson | LayoutFloorPlanImageAnnotationJson | LayoutLabelAnnotationJson;
|
|
1345
1397
|
|
|
1346
|
-
declare type LayoutAnnotationParameters = LayoutFloorPlanDxfParameters | LayoutFloorPlanImageParameters;
|
|
1398
|
+
declare type LayoutAnnotationParameters = LayoutFloorPlanDxfParameters | LayoutFloorPlanImageParameters | LayoutLabelAnnotationParameters;
|
|
1347
1399
|
|
|
1348
|
-
declare type LayoutAnnotationParametersJson = LayoutFloorPlanDxfParametersJson | LayoutFloorPlanImageParametersJson;
|
|
1400
|
+
declare type LayoutAnnotationParametersJson = LayoutFloorPlanDxfParametersJson | LayoutFloorPlanImageParametersJson | LayoutLabelAnnotationParametersJson;
|
|
1349
1401
|
|
|
1350
|
-
declare type LayoutAnnotationType = LayoutFloorPlanDxfType | LayoutFloorPlanImageType;
|
|
1402
|
+
declare type LayoutAnnotationType = LayoutFloorPlanDxfType | LayoutFloorPlanImageType | LayoutLabelAnnotationType;
|
|
1351
1403
|
|
|
1352
1404
|
declare class LayoutAsset extends LayoutTransformElementBase {
|
|
1353
1405
|
type: LayoutAssetType;
|
|
@@ -1845,6 +1897,32 @@ declare type LayoutKitchenType = typeof LayoutKitchenTypeValue;
|
|
|
1845
1897
|
|
|
1846
1898
|
declare const LayoutKitchenTypeValue = "element:kitchen";
|
|
1847
1899
|
|
|
1900
|
+
declare class LayoutLabelAnnotation extends LayoutAnnotationBase {
|
|
1901
|
+
type: LayoutLabelAnnotationType;
|
|
1902
|
+
parameters: LayoutLabelAnnotationParameters;
|
|
1903
|
+
constructor(id: string);
|
|
1904
|
+
setParameters(parameters: RecursivePartial<LayoutLabelAnnotationParameters>): void;
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
declare interface LayoutLabelAnnotationJson extends LayoutAnnotationBaseJson {
|
|
1908
|
+
type: LayoutLabelAnnotationType;
|
|
1909
|
+
parameters?: LayoutLabelAnnotationParametersJson;
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
declare interface LayoutLabelAnnotationParameters extends LabelAppearance {
|
|
1913
|
+
anchor?: {
|
|
1914
|
+
node: string;
|
|
1915
|
+
offset?: Vector2;
|
|
1916
|
+
frame?: 'local' | 'world';
|
|
1917
|
+
};
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
declare type LayoutLabelAnnotationParametersJson = LayoutLabelAnnotationParameters;
|
|
1921
|
+
|
|
1922
|
+
declare type LayoutLabelAnnotationType = typeof LayoutLabelAnnotationTypeValue;
|
|
1923
|
+
|
|
1924
|
+
declare const LayoutLabelAnnotationTypeValue = "annotation:label";
|
|
1925
|
+
|
|
1848
1926
|
declare type LayoutNode = SpatialGraphNode_2 | LayoutSpace | LayoutElement | LayoutAnnotation | LayoutView;
|
|
1849
1927
|
|
|
1850
1928
|
declare class LayoutNodeBase extends SpaceGraphNodeWithCustomAttributesBase {
|
|
@@ -2262,7 +2340,7 @@ declare const LayoutUpdateTypeValue = "operation:layoutUpdate";
|
|
|
2262
2340
|
|
|
2263
2341
|
declare type LayoutUpdateValue = Partial<SpaceGraphNodeWithCustomAttributesBaseJson>;
|
|
2264
2342
|
|
|
2265
|
-
declare type LayoutView = Layout2dView | Layout3dView;
|
|
2343
|
+
declare type LayoutView = Layout2dView | Layout3dView | LayoutViewStyle;
|
|
2266
2344
|
|
|
2267
2345
|
declare class LayoutViewBase extends LayoutNodeBase {
|
|
2268
2346
|
type: LayoutViewType;
|
|
@@ -2277,13 +2355,36 @@ declare interface LayoutViewBaseJson extends LayoutNodeBaseJson {
|
|
|
2277
2355
|
parameters?: LayoutViewParametersJson;
|
|
2278
2356
|
}
|
|
2279
2357
|
|
|
2280
|
-
declare type LayoutViewJson = Layout2dViewJson | Layout3dViewJson;
|
|
2358
|
+
declare type LayoutViewJson = Layout2dViewJson | Layout3dViewJson | LayoutViewStyleJson;
|
|
2359
|
+
|
|
2360
|
+
declare type LayoutViewParameters = Layout2dViewParameters | Layout3dViewParameters | LayoutViewStyleParameters;
|
|
2361
|
+
|
|
2362
|
+
declare type LayoutViewParametersJson = Layout2dViewParametersJson | Layout3dViewParametersJson | LayoutViewStyleParametersJson;
|
|
2363
|
+
|
|
2364
|
+
declare class LayoutViewStyle extends LayoutViewBase {
|
|
2365
|
+
type: LayoutViewStyleType;
|
|
2366
|
+
parameters: LayoutViewStyleParameters;
|
|
2367
|
+
constructor(id: string);
|
|
2368
|
+
setParameters(parameters: RecursivePartial<LayoutViewStyleParameters>): void;
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
declare interface LayoutViewStyleJson extends LayoutViewBaseJson {
|
|
2372
|
+
type: LayoutViewStyleType;
|
|
2373
|
+
parameters?: LayoutViewStyleParametersJson;
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
declare interface LayoutViewStyleParameters {
|
|
2377
|
+
labelRules?: LabelRule[];
|
|
2378
|
+
annotations?: string[];
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
declare type LayoutViewStyleParametersJson = LayoutViewStyleParameters;
|
|
2281
2382
|
|
|
2282
|
-
declare type
|
|
2383
|
+
declare type LayoutViewStyleType = typeof LayoutViewStyleTypeValue;
|
|
2283
2384
|
|
|
2284
|
-
declare
|
|
2385
|
+
declare const LayoutViewStyleTypeValue = "view:style";
|
|
2285
2386
|
|
|
2286
|
-
declare type LayoutViewType = Layout2dViewType | Layout3dViewType;
|
|
2387
|
+
declare type LayoutViewType = Layout2dViewType | Layout3dViewType | LayoutViewStyleType;
|
|
2287
2388
|
|
|
2288
2389
|
declare class LayoutWall extends LayoutEdgeElementBase {
|
|
2289
2390
|
type: LayoutWallType;
|
|
@@ -2369,12 +2470,6 @@ declare interface LineCurve extends CurveBase {
|
|
|
2369
2470
|
end: Vector2;
|
|
2370
2471
|
}
|
|
2371
2472
|
|
|
2372
|
-
declare interface LineCurve_2 extends BaseShape {
|
|
2373
|
-
type: 'curve:line';
|
|
2374
|
-
start: Vector2_2;
|
|
2375
|
-
end: Vector2_2;
|
|
2376
|
-
}
|
|
2377
|
-
|
|
2378
2473
|
declare type LineCurveType = typeof LineCurveTypeValue;
|
|
2379
2474
|
|
|
2380
2475
|
declare const LineCurveTypeValue = "curve:line";
|
|
@@ -2460,6 +2555,18 @@ declare type NodeLabel = {
|
|
|
2460
2555
|
fixedScreenSize?: boolean | ZoomRange;
|
|
2461
2556
|
};
|
|
2462
2557
|
|
|
2558
|
+
/**
|
|
2559
|
+
* A persisted node query. The explicit target tells consumers whether to
|
|
2560
|
+
* resolve the filter with queryElements or querySpaces
|
|
2561
|
+
*/
|
|
2562
|
+
declare type NodeQuery = {
|
|
2563
|
+
target: 'elements';
|
|
2564
|
+
where: ElementFilter;
|
|
2565
|
+
} | {
|
|
2566
|
+
target: 'spaces';
|
|
2567
|
+
where: SpaceFilter;
|
|
2568
|
+
};
|
|
2569
|
+
|
|
2463
2570
|
declare type NodeResult = {
|
|
2464
2571
|
id: string;
|
|
2465
2572
|
type: string;
|
|
@@ -2475,10 +2582,6 @@ declare type NullComparator = {
|
|
|
2475
2582
|
null: boolean;
|
|
2476
2583
|
};
|
|
2477
2584
|
|
|
2478
|
-
declare type NullComparator_2 = {
|
|
2479
|
-
null: boolean;
|
|
2480
|
-
};
|
|
2481
|
-
|
|
2482
2585
|
declare type NumberComparator = number | {
|
|
2483
2586
|
eq: number;
|
|
2484
2587
|
} | {
|
|
@@ -2497,24 +2600,6 @@ declare type NumberComparator = number | {
|
|
|
2497
2600
|
lte: number;
|
|
2498
2601
|
};
|
|
2499
2602
|
|
|
2500
|
-
declare type NumberComparator_2 = number | {
|
|
2501
|
-
eq: number;
|
|
2502
|
-
} | {
|
|
2503
|
-
neq: number;
|
|
2504
|
-
} | {
|
|
2505
|
-
in: number[];
|
|
2506
|
-
} | {
|
|
2507
|
-
nin: number[];
|
|
2508
|
-
} | {
|
|
2509
|
-
gt: number;
|
|
2510
|
-
} | {
|
|
2511
|
-
gte: number;
|
|
2512
|
-
} | {
|
|
2513
|
-
lt: number;
|
|
2514
|
-
} | {
|
|
2515
|
-
lte: number;
|
|
2516
|
-
};
|
|
2517
|
-
|
|
2518
2603
|
declare interface NumberField extends BaseField {
|
|
2519
2604
|
type: 'number';
|
|
2520
2605
|
min: number;
|
|
@@ -2537,11 +2622,9 @@ declare interface NumberRange extends SpaceGraphTypedValueJson {
|
|
|
2537
2622
|
};
|
|
2538
2623
|
}
|
|
2539
2624
|
|
|
2540
|
-
declare type OpenCurve = LineCurve | PolylineCurve | ArcCurve;
|
|
2541
|
-
|
|
2542
|
-
declare type OpenCurves = LineCurve_2 | ArcCurve_2 | PolylineCurve_2 | BezierCurve;
|
|
2625
|
+
declare type OpenCurve = LineCurve | PolylineCurve | ArcCurve | BezierCurve;
|
|
2543
2626
|
|
|
2544
|
-
declare type OpenCurveType = LineCurveType | PolylineCurveType | ArcCurveType;
|
|
2627
|
+
declare type OpenCurveType = LineCurveType | PolylineCurveType | ArcCurveType | BezierCurveType;
|
|
2545
2628
|
|
|
2546
2629
|
declare class OperationBase {
|
|
2547
2630
|
/** @format uuid */
|
|
@@ -2626,37 +2709,22 @@ declare const PlaneGeometryTypeValue = "geometry:plane";
|
|
|
2626
2709
|
|
|
2627
2710
|
declare type Polygon = Vector2[];
|
|
2628
2711
|
|
|
2629
|
-
declare type Polygon_2 = Vector2_2[];
|
|
2630
|
-
|
|
2631
2712
|
declare interface PolygonCurve extends CurveBase {
|
|
2632
2713
|
type: PolygonCurveType;
|
|
2633
2714
|
points: Vector2[];
|
|
2634
2715
|
}
|
|
2635
2716
|
|
|
2636
|
-
declare interface PolygonCurve_2 extends BaseShape {
|
|
2637
|
-
type: 'curve:polygon';
|
|
2638
|
-
points: Polygon_2;
|
|
2639
|
-
}
|
|
2640
|
-
|
|
2641
2717
|
declare type PolygonCurveType = typeof PolygonCurveTypeValue;
|
|
2642
2718
|
|
|
2643
2719
|
declare const PolygonCurveTypeValue = "curve:polygon";
|
|
2644
2720
|
|
|
2645
2721
|
declare type PolygonWithHoles = Vector2[][];
|
|
2646
2722
|
|
|
2647
|
-
/** outer ring counter clockwise, inner rings ( holes ) clockwise */
|
|
2648
|
-
declare type PolygonWithHoles_2 = Polygon_2[];
|
|
2649
|
-
|
|
2650
2723
|
declare interface PolygonWithHolesCurve extends CurveBase {
|
|
2651
2724
|
type: PolygonWithHolesCurveType;
|
|
2652
2725
|
polygons: Vector2[][];
|
|
2653
2726
|
}
|
|
2654
2727
|
|
|
2655
|
-
declare interface PolygonWithHolesCurve_2 extends BaseShape {
|
|
2656
|
-
type: 'curve:polygonWithHoles';
|
|
2657
|
-
polygons: PolygonWithHoles_2;
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
2728
|
declare type PolygonWithHolesCurveType = typeof PolygonWithHolesCurveTypeValue;
|
|
2661
2729
|
|
|
2662
2730
|
declare const PolygonWithHolesCurveTypeValue = "curve:polygonWithHoles";
|
|
@@ -2666,11 +2734,6 @@ declare interface PolylineCurve extends CurveBase {
|
|
|
2666
2734
|
points: Vector2[];
|
|
2667
2735
|
}
|
|
2668
2736
|
|
|
2669
|
-
declare interface PolylineCurve_2 extends BaseShape {
|
|
2670
|
-
type: 'curve:polyline';
|
|
2671
|
-
points: Polygon_2;
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
2737
|
declare type PolylineCurveType = typeof PolylineCurveTypeValue;
|
|
2675
2738
|
|
|
2676
2739
|
declare const PolylineCurveTypeValue = "curve:polyline";
|
|
@@ -2702,18 +2765,12 @@ export declare interface ProductData extends BaseData {
|
|
|
2702
2765
|
seatCapacity: number;
|
|
2703
2766
|
}
|
|
2704
2767
|
|
|
2705
|
-
declare interface ProductFilter extends
|
|
2768
|
+
declare interface ProductFilter extends BaseNodeFilter {
|
|
2706
2769
|
category?: StringComparator;
|
|
2707
2770
|
subCategory?: StringComparator;
|
|
2708
2771
|
seatCapacity?: NumberComparator;
|
|
2709
2772
|
}
|
|
2710
2773
|
|
|
2711
|
-
declare interface ProductFilter_2 extends BaseFilter_2 {
|
|
2712
|
-
category?: StringComparator_2;
|
|
2713
|
-
subCategory?: StringComparator_2;
|
|
2714
|
-
seatCapacity?: NumberComparator_2;
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
2774
|
declare class ProductRemove extends OperationBase {
|
|
2718
2775
|
type: typeof ProductRemoveTypeValue;
|
|
2719
2776
|
value: ProductRemoveValue;
|
|
@@ -2764,15 +2821,10 @@ export declare type QueryPick<T, S> = {
|
|
|
2764
2821
|
|
|
2765
2822
|
declare interface RectangleCurve extends CurveBase {
|
|
2766
2823
|
type: RectangleCurveType;
|
|
2824
|
+
position?: Vector2;
|
|
2767
2825
|
dimensions: Vector2;
|
|
2768
2826
|
}
|
|
2769
2827
|
|
|
2770
|
-
declare interface RectangleCurve_2 extends BaseShape {
|
|
2771
|
-
type: 'curve:rectangle';
|
|
2772
|
-
position: Vector2_2;
|
|
2773
|
-
dimensions: [number, number];
|
|
2774
|
-
}
|
|
2775
|
-
|
|
2776
2828
|
declare type RectangleCurveType = typeof RectangleCurveTypeValue;
|
|
2777
2829
|
|
|
2778
2830
|
declare const RectangleCurveTypeValue = "curve:rectangle";
|
|
@@ -2868,7 +2920,7 @@ declare interface SelectOption {
|
|
|
2868
2920
|
label: string;
|
|
2869
2921
|
}
|
|
2870
2922
|
|
|
2871
|
-
export declare type Shape =
|
|
2923
|
+
export declare type Shape = CurveShape | TextShape | GroupShape;
|
|
2872
2924
|
|
|
2873
2925
|
declare interface ShapeStyle {
|
|
2874
2926
|
stroke?: string | number | number[];
|
|
@@ -2910,7 +2962,7 @@ export declare interface SpaceData extends BaseData {
|
|
|
2910
2962
|
boundaries: BoundaryData[];
|
|
2911
2963
|
}
|
|
2912
2964
|
|
|
2913
|
-
export declare interface SpaceFilter extends
|
|
2965
|
+
export declare interface SpaceFilter extends BaseNodeFilter {
|
|
2914
2966
|
category?: StringComparator;
|
|
2915
2967
|
subCategory?: StringComparator;
|
|
2916
2968
|
seatCapacity?: NumberComparator;
|
|
@@ -2925,21 +2977,6 @@ export declare interface SpaceFilter extends BaseFilter {
|
|
|
2925
2977
|
};
|
|
2926
2978
|
}
|
|
2927
2979
|
|
|
2928
|
-
declare interface SpaceFilter_2 extends BaseFilter_2 {
|
|
2929
|
-
category?: StringComparator_2;
|
|
2930
|
-
subCategory?: StringComparator_2;
|
|
2931
|
-
seatCapacity?: NumberComparator_2;
|
|
2932
|
-
isExternal?: BooleanComparator_2;
|
|
2933
|
-
area?: NumberComparator_2;
|
|
2934
|
-
/** point query */
|
|
2935
|
-
at?: Vector2;
|
|
2936
|
-
/** 2d bounding box intersection */
|
|
2937
|
-
within?: {
|
|
2938
|
-
min: Vector2;
|
|
2939
|
-
max: Vector2;
|
|
2940
|
-
};
|
|
2941
|
-
}
|
|
2942
|
-
|
|
2943
2980
|
declare class SpaceGraph {
|
|
2944
2981
|
spatialStructure: SpaceGraphSpatialStructure;
|
|
2945
2982
|
products: SpaceGraphProduct[];
|
|
@@ -3000,8 +3037,10 @@ declare class SpaceGraph {
|
|
|
3000
3037
|
readonly 'layout:space': LayoutSpace;
|
|
3001
3038
|
readonly 'view:2d': Layout2dView;
|
|
3002
3039
|
readonly 'view:3d': Layout3dView;
|
|
3040
|
+
readonly 'view:style': LayoutViewStyle;
|
|
3003
3041
|
readonly 'annotation:floorPlanDxf': LayoutFloorPlanDxfAnnotation;
|
|
3004
3042
|
readonly 'annotation:floorPlanImage': LayoutFloorPlanImageAnnotation;
|
|
3043
|
+
readonly 'annotation:label': LayoutLabelAnnotation;
|
|
3005
3044
|
readonly 'element:ceiling': LayoutBoundarySlab;
|
|
3006
3045
|
readonly 'element:floor': LayoutBoundarySlab;
|
|
3007
3046
|
readonly 'element:boundaryWall': LayoutBoundaryWall;
|
|
@@ -3327,12 +3366,14 @@ declare class SpaceGraphLayout extends SpaceGraphSpatialStructureBase {
|
|
|
3327
3366
|
annotationsByType: NodesByType<{
|
|
3328
3367
|
readonly 'annotation:floorPlanDxf': LayoutFloorPlanDxfAnnotation;
|
|
3329
3368
|
readonly 'annotation:floorPlanImage': LayoutFloorPlanImageAnnotation;
|
|
3369
|
+
readonly 'annotation:label': LayoutLabelAnnotation;
|
|
3330
3370
|
}>;
|
|
3331
3371
|
views: LayoutView[];
|
|
3332
3372
|
viewsById: Record<string, LayoutView>;
|
|
3333
3373
|
viewsByType: NodesByType<{
|
|
3334
3374
|
readonly 'view:2d': Layout2dView;
|
|
3335
3375
|
readonly 'view:3d': Layout3dView;
|
|
3376
|
+
readonly 'view:style': LayoutViewStyle;
|
|
3336
3377
|
}>;
|
|
3337
3378
|
spatialIndex: SpatialIndex;
|
|
3338
3379
|
debugIds: boolean;
|
|
@@ -3806,22 +3847,10 @@ declare type StringComparator = string | {
|
|
|
3806
3847
|
contains: string;
|
|
3807
3848
|
};
|
|
3808
3849
|
|
|
3809
|
-
declare type StringComparator_2 = string | {
|
|
3810
|
-
eq: string;
|
|
3811
|
-
} | {
|
|
3812
|
-
neq: string;
|
|
3813
|
-
} | {
|
|
3814
|
-
in: string[];
|
|
3815
|
-
} | {
|
|
3816
|
-
nin: string[];
|
|
3817
|
-
} | {
|
|
3818
|
-
contains: string;
|
|
3819
|
-
};
|
|
3820
|
-
|
|
3821
3850
|
declare type StyleByKey = Record<string, ShapeStyle>;
|
|
3822
3851
|
|
|
3823
3852
|
declare type StyledFilter = {
|
|
3824
|
-
where:
|
|
3853
|
+
where: ElementFilter | SpaceFilter;
|
|
3825
3854
|
style: ShapeStyle;
|
|
3826
3855
|
};
|
|
3827
3856
|
|
|
@@ -3844,14 +3873,15 @@ declare interface TextField extends BaseField {
|
|
|
3844
3873
|
default?: string;
|
|
3845
3874
|
}
|
|
3846
3875
|
|
|
3847
|
-
declare interface TextShape
|
|
3876
|
+
declare interface TextShape {
|
|
3848
3877
|
type: 'text';
|
|
3849
|
-
position:
|
|
3878
|
+
position: Vector2;
|
|
3850
3879
|
text: string;
|
|
3851
3880
|
rotation?: number;
|
|
3852
3881
|
alignV?: 'center' | 'bottom' | 'top';
|
|
3853
3882
|
alignH?: 'center' | 'left' | 'right';
|
|
3854
3883
|
fontSize?: number;
|
|
3884
|
+
style?: ShapeStyle;
|
|
3855
3885
|
}
|
|
3856
3886
|
|
|
3857
3887
|
declare type Texture = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archilogic/extension-sdk",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@archilogic/floor-plan-core": "^5.8.
|
|
32
|
-
"@archilogic/space-graph-sdk": "^0.
|
|
31
|
+
"@archilogic/floor-plan-core": "^5.8.2",
|
|
32
|
+
"@archilogic/space-graph-sdk": "^0.10.0",
|
|
33
33
|
"vite-plugin-static-copy": "^4.1.1"
|
|
34
34
|
},
|
|
35
35
|
"nx": {}
|