@snaptrude/plugin-core 0.9.16-networks-20261012.1 → 0.9.17
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 +6 -0
- package/api-manifest.json +9711 -0
- package/dist/api/analysis/daylight.d.ts +5 -5
- package/dist/api/analysis/solar.d.ts +2 -2
- package/dist/api/core/camera/index.d.ts +0 -29
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/zoom/index.d.ts +0 -13
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +21 -40
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +97 -120
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +12 -13
- package/dist/api/design/create/opening-fields.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +24 -18
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +27 -797
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +0 -16
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +30 -30
- package/dist/api/design/selection/index.d.ts +10 -10
- package/dist/api/design/types/index.d.ts +24 -40
- package/dist/api/design/types/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +3 -40
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +8 -8
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +10 -10
- package/dist/api/presentation/annotate.d.ts +22 -38
- package/dist/api/presentation/annotate.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +5 -23
- package/dist/api/presentation/export.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +21 -32
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +6 -106
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/sections.d.ts +461 -0
- package/dist/api/presentation/sections.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/api/presentation/sheets.d.ts +19 -175
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/views.d.ts +5 -103
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/presentation/walkthroughs.d.ts +6 -6
- package/dist/index.cjs +2434 -3619
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2421 -3501
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/generate-manifest.mjs +0 -5
- package/src/api/core/camera/index.ts +0 -29
- package/src/api/core/zoom/index.ts +0 -13
- package/src/api/design/create/bulk-items.ts +16 -23
- package/src/api/design/create/index.ts +119 -129
- package/src/api/design/create/opening-fields.ts +12 -15
- package/src/api/design/doors/index.ts +42 -58
- package/src/api/design/family.ts +32 -662
- package/src/api/design/index.ts +4 -34
- package/src/api/design/types/index.ts +24 -31
- package/src/api/design/update/index.ts +3 -41
- package/src/api/design/windows/index.ts +22 -40
- package/src/api/presentation/annotate.ts +58 -90
- package/src/api/presentation/export.ts +6 -32
- package/src/api/presentation/index.ts +23 -39
- package/src/api/presentation/placedViews.ts +28 -119
- package/src/api/presentation/sections.ts +420 -0
- package/src/api/presentation/sheets.ts +20 -181
- package/src/api/presentation/views.ts +6 -46
- package/dist/api/design/bim.d.ts +0 -209
- package/dist/api/design/bim.d.ts.map +0 -1
- package/dist/api/design/catalog.d.ts +0 -320
- package/dist/api/design/catalog.d.ts.map +0 -1
- package/dist/api/design/networks.d.ts +0 -1703
- package/dist/api/design/networks.d.ts.map +0 -1
- package/dist/api/presentation/drawingContract.d.ts +0 -32
- package/dist/api/presentation/drawingContract.d.ts.map +0 -1
- package/dist/api/presentation/drawings.d.ts +0 -3523
- package/dist/api/presentation/drawings.d.ts.map +0 -1
- package/dist/api/presentation/viewPresets.d.ts +0 -222
- package/dist/api/presentation/viewPresets.d.ts.map +0 -1
- package/src/api/design/bim.ts +0 -121
- package/src/api/design/catalog.ts +0 -203
- package/src/api/design/networks.ts +0 -607
- package/src/api/presentation/drawingContract.ts +0 -70
- package/src/api/presentation/drawings.ts +0 -1179
- package/src/api/presentation/viewPresets.ts +0 -241
- package/test/drawingContract.test.mjs +0 -288
|
@@ -8,15 +8,18 @@ import { PluginDesignChangeResult } from "../lock"
|
|
|
8
8
|
* `design.create.door`; generic reads (`listDoors`/`getHost`/`getProperties`) live at
|
|
9
9
|
* `design.query.*`. Door targets are {@linkcode ComponentHandle}s.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* the
|
|
14
|
-
*
|
|
11
|
+
* `getSwingDirection` is a DERIVED read (no persisted field) — computed from the placed
|
|
12
|
+
* mesh's orientation: stand on the side the door swings open to, facing it; `'left'`
|
|
13
|
+
* when the hinged jamb is on your left. `mirror` reflects the door about one of its own
|
|
14
|
+
* axes (undoable, one command): `'x'` flips the swing side, `'z'` swaps the hinged jamb;
|
|
15
|
+
* `setType` is intentionally absent (the engine has no in-place re-type —
|
|
16
|
+
* it would require delete+recreate).
|
|
15
17
|
*
|
|
16
18
|
* The **catalog** reads (`listCatalogGroups`/`listCatalog`/`getCatalogItem`/`exists`)
|
|
17
|
-
* browse
|
|
18
|
-
*
|
|
19
|
-
*
|
|
19
|
+
* browse the placeable door library — plain value records keyed by a library id
|
|
20
|
+
* (team `_id` or general `fullName`), NOT handles — and feed `design.create.door`.
|
|
21
|
+
* They are network-backed but carry no `Async` suffix (§6.6) and never throw
|
|
22
|
+
* (`[]`/`null`). The {@linkcode PluginObjectCatalogGroup} / {@linkcode PluginObjectCatalogItem}
|
|
20
23
|
* DTOs are shared with `design.windows`.
|
|
21
24
|
*/
|
|
22
25
|
export abstract class PluginDesignDoorsApi {
|
|
@@ -62,9 +65,7 @@ export abstract class PluginDesignDoorsApi {
|
|
|
62
65
|
* if (family) console.log("family:", family)
|
|
63
66
|
* ```
|
|
64
67
|
*/
|
|
65
|
-
public abstract getFamily(
|
|
66
|
-
door: ComponentHandle,
|
|
67
|
-
): PluginApiReturn<string | null>
|
|
68
|
+
public abstract getFamily(door: ComponentHandle): PluginApiReturn<string | null>
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
71
|
* Get the width of a door — how wide its opening is along the host wall.
|
|
@@ -84,9 +85,7 @@ export abstract class PluginDesignDoorsApi {
|
|
|
84
85
|
* if (width !== null) console.log("door width:", width)
|
|
85
86
|
* ```
|
|
86
87
|
*/
|
|
87
|
-
public abstract getWidth(
|
|
88
|
-
door: ComponentHandle,
|
|
89
|
-
): PluginApiReturn<number | null>
|
|
88
|
+
public abstract getWidth(door: ComponentHandle): PluginApiReturn<number | null>
|
|
90
89
|
|
|
91
90
|
/**
|
|
92
91
|
* Get the height of a door — how tall its opening is from base to head.
|
|
@@ -106,13 +105,12 @@ export abstract class PluginDesignDoorsApi {
|
|
|
106
105
|
* if (height !== null) console.log("door height:", height)
|
|
107
106
|
* ```
|
|
108
107
|
*/
|
|
109
|
-
public abstract getHeight(
|
|
110
|
-
door: ComponentHandle,
|
|
111
|
-
): PluginApiReturn<number | null>
|
|
108
|
+
public abstract getHeight(door: ComponentHandle): PluginApiReturn<number | null>
|
|
112
109
|
|
|
113
110
|
/**
|
|
114
|
-
* Get
|
|
115
|
-
*
|
|
111
|
+
* Get a door's full dimensions in one call — width along the wall, vertical
|
|
112
|
+
* height, and thickness through the wall — measured in the door's local
|
|
113
|
+
* oriented space. Parity with {@linkcode PluginDesignWindowsApi.getDimensions}.
|
|
116
114
|
*
|
|
117
115
|
* @param door The door to query
|
|
118
116
|
* @returns The dimensions, or `null`
|
|
@@ -130,12 +128,12 @@ export abstract class PluginDesignDoorsApi {
|
|
|
130
128
|
* ```
|
|
131
129
|
*/
|
|
132
130
|
public abstract getDimensions(
|
|
133
|
-
door: ComponentHandle
|
|
131
|
+
door: ComponentHandle
|
|
134
132
|
): PluginApiReturn<PluginDoorDimensions | null>
|
|
135
133
|
|
|
136
134
|
/**
|
|
137
|
-
*
|
|
138
|
-
*
|
|
135
|
+
* Get the floor a door is hosted on — the storey/level component that
|
|
136
|
+
* supports the door.
|
|
139
137
|
*
|
|
140
138
|
* @param door The door to query
|
|
141
139
|
* @returns The support floor {@linkcode ComponentHandle}, or `null`
|
|
@@ -155,13 +153,14 @@ export abstract class PluginDesignDoorsApi {
|
|
|
155
153
|
* }
|
|
156
154
|
* ```
|
|
157
155
|
*/
|
|
158
|
-
public abstract getSupportFloor(
|
|
159
|
-
door: ComponentHandle,
|
|
160
|
-
): PluginApiReturn<ComponentHandle | null>
|
|
156
|
+
public abstract getSupportFloor(door: ComponentHandle): PluginApiReturn<ComponentHandle | null>
|
|
161
157
|
|
|
162
158
|
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
159
|
+
* Get a door's swing (hinge) handedness. Stand on the side the door swings
|
|
160
|
+
* open to, facing the door: `'left'` when the hinged jamb is on your left,
|
|
161
|
+
* `'right'` when it is on your right. Derived from the placed mesh's
|
|
162
|
+
* orientation (the same reflection `mirror` and the `hinge` placement option
|
|
163
|
+
* apply), not a persisted field.
|
|
165
164
|
*
|
|
166
165
|
* @param door The door to query
|
|
167
166
|
* @returns `'left'` / `'right'`, or `null` if indeterminate
|
|
@@ -179,15 +178,14 @@ export abstract class PluginDesignDoorsApi {
|
|
|
179
178
|
* ```
|
|
180
179
|
*/
|
|
181
180
|
public abstract getSwingDirection(
|
|
182
|
-
door: ComponentHandle
|
|
181
|
+
door: ComponentHandle
|
|
183
182
|
): PluginApiReturn<"left" | "right" | null>
|
|
184
183
|
|
|
185
184
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
* room floors requires this output; a missing or invalid report rejects the cut.
|
|
185
|
+
* Mirror a door about its own axes. `'x'` (default) flips the swing side —
|
|
186
|
+
* the door opens to the other side of the wall; `'z'` swaps the hinged jamb
|
|
187
|
+
* (left-hand ↔ right-hand, same swing side); `'y'` turns it upside down.
|
|
188
|
+
* Undoable as a single command.
|
|
191
189
|
*
|
|
192
190
|
* @param door The door to mirror
|
|
193
191
|
* @param axis Reflection axis (optional; default `'x'` — the swing-flip axis; `'z'` — the hinge-jamb axis)
|
|
@@ -210,7 +208,7 @@ export abstract class PluginDesignDoorsApi {
|
|
|
210
208
|
*/
|
|
211
209
|
public abstract mirror(
|
|
212
210
|
door: ComponentHandle,
|
|
213
|
-
axis?: PluginMirrorAxis
|
|
211
|
+
axis?: PluginMirrorAxis
|
|
214
212
|
): PluginApiReturn<PluginDesignChangeResult>
|
|
215
213
|
|
|
216
214
|
/**
|
|
@@ -237,7 +235,7 @@ export abstract class PluginDesignDoorsApi {
|
|
|
237
235
|
*/
|
|
238
236
|
public abstract setWidth(
|
|
239
237
|
doors: ComponentHandle[],
|
|
240
|
-
width: number
|
|
238
|
+
width: number
|
|
241
239
|
): PluginApiReturn<PluginDesignChangeResult>
|
|
242
240
|
|
|
243
241
|
/**
|
|
@@ -262,7 +260,7 @@ export abstract class PluginDesignDoorsApi {
|
|
|
262
260
|
*/
|
|
263
261
|
public abstract setHeight(
|
|
264
262
|
doors: ComponentHandle[],
|
|
265
|
-
height: number
|
|
263
|
+
height: number
|
|
266
264
|
): PluginApiReturn<PluginDesignChangeResult>
|
|
267
265
|
|
|
268
266
|
/**
|
|
@@ -282,9 +280,7 @@ export abstract class PluginDesignDoorsApi {
|
|
|
282
280
|
* for (const g of groups) console.log(g.dbType, g.label, g.source)
|
|
283
281
|
* ```
|
|
284
282
|
*/
|
|
285
|
-
public abstract listCatalogGroups(): PluginApiReturn<
|
|
286
|
-
PluginObjectCatalogGroup[]
|
|
287
|
-
>
|
|
283
|
+
public abstract listCatalogGroups(): PluginApiReturn<PluginObjectCatalogGroup[]>
|
|
288
284
|
|
|
289
285
|
/**
|
|
290
286
|
* List the placeable door catalog (team + general libraries), optionally
|
|
@@ -306,7 +302,7 @@ export abstract class PluginDesignDoorsApi {
|
|
|
306
302
|
* ```
|
|
307
303
|
*/
|
|
308
304
|
public abstract listCatalog(
|
|
309
|
-
group?: string
|
|
305
|
+
group?: string
|
|
310
306
|
): PluginApiReturn<PluginObjectCatalogItem[]>
|
|
311
307
|
|
|
312
308
|
/**
|
|
@@ -328,7 +324,7 @@ export abstract class PluginDesignDoorsApi {
|
|
|
328
324
|
* ```
|
|
329
325
|
*/
|
|
330
326
|
public abstract getCatalogItem(
|
|
331
|
-
id: string
|
|
327
|
+
id: string
|
|
332
328
|
): PluginApiReturn<PluginObjectCatalogItem | null>
|
|
333
329
|
|
|
334
330
|
/**
|
|
@@ -396,9 +392,7 @@ export const PluginDesignDoorMirrorArgs = z.object({
|
|
|
396
392
|
door: ComponentHandle,
|
|
397
393
|
axis: PluginMirrorAxis.optional(),
|
|
398
394
|
})
|
|
399
|
-
export type PluginDesignDoorMirrorArgs = z.infer<
|
|
400
|
-
typeof PluginDesignDoorMirrorArgs
|
|
401
|
-
>
|
|
395
|
+
export type PluginDesignDoorMirrorArgs = z.infer<typeof PluginDesignDoorMirrorArgs>
|
|
402
396
|
|
|
403
397
|
/**
|
|
404
398
|
* Arguments for {@linkcode PluginDesignDoorsApi.setWidth}.
|
|
@@ -412,9 +406,7 @@ export const PluginDesignDoorSetWidthArgs = z.object({
|
|
|
412
406
|
doors: z.array(ComponentHandle),
|
|
413
407
|
width: z.number(),
|
|
414
408
|
})
|
|
415
|
-
export type PluginDesignDoorSetWidthArgs = z.infer<
|
|
416
|
-
typeof PluginDesignDoorSetWidthArgs
|
|
417
|
-
>
|
|
409
|
+
export type PluginDesignDoorSetWidthArgs = z.infer<typeof PluginDesignDoorSetWidthArgs>
|
|
418
410
|
|
|
419
411
|
/**
|
|
420
412
|
* Arguments for {@linkcode PluginDesignDoorsApi.setHeight}.
|
|
@@ -428,9 +420,7 @@ export const PluginDesignDoorSetHeightArgs = z.object({
|
|
|
428
420
|
doors: z.array(ComponentHandle),
|
|
429
421
|
height: z.number(),
|
|
430
422
|
})
|
|
431
|
-
export type PluginDesignDoorSetHeightArgs = z.infer<
|
|
432
|
-
typeof PluginDesignDoorSetHeightArgs
|
|
433
|
-
>
|
|
423
|
+
export type PluginDesignDoorSetHeightArgs = z.infer<typeof PluginDesignDoorSetHeightArgs>
|
|
434
424
|
|
|
435
425
|
// ---------------------------------------------------------------------------
|
|
436
426
|
// catalog (shared by doors + windows)
|
|
@@ -492,9 +482,7 @@ export type PluginObjectCatalogItem = z.infer<typeof PluginObjectCatalogItem>
|
|
|
492
482
|
export const PluginDesignDoorListCatalogArgs = z.object({
|
|
493
483
|
group: z.string().optional(),
|
|
494
484
|
})
|
|
495
|
-
export type PluginDesignDoorListCatalogArgs = z.infer<
|
|
496
|
-
typeof PluginDesignDoorListCatalogArgs
|
|
497
|
-
>
|
|
485
|
+
export type PluginDesignDoorListCatalogArgs = z.infer<typeof PluginDesignDoorListCatalogArgs>
|
|
498
486
|
|
|
499
487
|
/**
|
|
500
488
|
* Arguments for {@linkcode PluginDesignDoorsApi.getCatalogItem} / {@linkcode PluginDesignDoorsApi.exists}.
|
|
@@ -506,11 +494,7 @@ export type PluginDesignDoorListCatalogArgs = z.infer<
|
|
|
506
494
|
export const PluginDesignDoorGetCatalogItemArgs = z.object({
|
|
507
495
|
id: z.string(),
|
|
508
496
|
})
|
|
509
|
-
export type PluginDesignDoorGetCatalogItemArgs = z.infer<
|
|
510
|
-
typeof PluginDesignDoorGetCatalogItemArgs
|
|
511
|
-
>
|
|
497
|
+
export type PluginDesignDoorGetCatalogItemArgs = z.infer<typeof PluginDesignDoorGetCatalogItemArgs>
|
|
512
498
|
|
|
513
499
|
export const PluginDesignDoorExistsArgs = PluginDesignDoorGetCatalogItemArgs
|
|
514
|
-
export type PluginDesignDoorExistsArgs = z.infer<
|
|
515
|
-
typeof PluginDesignDoorExistsArgs
|
|
516
|
-
>
|
|
500
|
+
export type PluginDesignDoorExistsArgs = z.infer<typeof PluginDesignDoorExistsArgs>
|