@snaptrude/plugin-core 0.0.0-dev-20260708130115 → 0.0.0-dev-20260827194031
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 +152 -1
- package/api-manifest.json +3643 -276
- package/dist/api/analysis/daylight.d.ts +603 -0
- package/dist/api/analysis/daylight.d.ts.map +1 -0
- package/dist/api/analysis/heatmaps.d.ts +658 -0
- package/dist/api/analysis/heatmaps.d.ts.map +1 -0
- package/dist/api/analysis/illuminance.d.ts +145 -0
- package/dist/api/analysis/illuminance.d.ts.map +1 -0
- package/dist/api/analysis/index.d.ts +59 -0
- package/dist/api/analysis/index.d.ts.map +1 -0
- package/dist/api/analysis/shadows.d.ts +165 -0
- package/dist/api/analysis/shadows.d.ts.map +1 -0
- package/dist/api/analysis/solar.d.ts +249 -0
- package/dist/api/analysis/solar.d.ts.map +1 -0
- package/dist/api/analysis/sunlightHours.d.ts +208 -0
- package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
- package/dist/api/analysis/sunpath.d.ts +80 -0
- package/dist/api/analysis/sunpath.d.ts.map +1 -0
- package/dist/api/analysis/weather.d.ts +193 -0
- package/dist/api/analysis/weather.d.ts.map +1 -0
- package/dist/api/core/camera/index.d.ts +261 -0
- package/dist/api/core/camera/index.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +105 -2
- package/dist/api/core/comment/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +840 -14
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/delete/index.d.ts +8 -2
- package/dist/api/core/geom/delete/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/arc.d.ts +5 -5
- package/dist/api/core/geom/query/brep.d.ts +130 -18
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/core/geom/query/circle.d.ts +18 -18
- package/dist/api/core/geom/query/contour.d.ts +20 -20
- package/dist/api/core/geom/query/curve.d.ts +49 -49
- package/dist/api/core/geom/query/edge.d.ts +5 -5
- package/dist/api/core/geom/query/face.d.ts +16 -16
- package/dist/api/core/geom/query/halfedge.d.ts +8 -8
- package/dist/api/core/geom/query/profile.d.ts +19 -19
- package/dist/api/core/geom/query/vertex.d.ts +8 -8
- package/dist/api/core/geom/update/contour.d.ts +14 -14
- package/dist/api/core/geom/update/curve.d.ts +7 -7
- package/dist/api/core/geom/update/profile.d.ts +16 -16
- package/dist/api/core/handles/index.d.ts +210 -0
- package/dist/api/core/handles/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +34 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/export/index.d.ts +134 -0
- package/dist/api/core/io/export/index.d.ts.map +1 -0
- package/dist/api/core/io/import/index.d.ts +453 -0
- package/dist/api/core/io/import/index.d.ts.map +1 -0
- package/dist/api/core/io/index.d.ts +40 -0
- package/dist/api/core/io/index.d.ts.map +1 -0
- package/dist/api/core/io/job/index.d.ts +139 -0
- package/dist/api/core/io/job/index.d.ts.map +1 -0
- package/dist/api/core/io/query/index.d.ts +74 -0
- package/dist/api/core/io/query/index.d.ts.map +1 -0
- package/dist/api/core/io/terrain/index.d.ts +341 -0
- package/dist/api/core/io/terrain/index.d.ts.map +1 -0
- package/dist/api/core/io/underlay/index.d.ts +805 -0
- package/dist/api/core/io/underlay/index.d.ts.map +1 -0
- package/dist/api/core/layers.d.ts +7 -7
- package/dist/api/core/mode/index.d.ts +99 -0
- package/dist/api/core/mode/index.d.ts.map +1 -0
- package/dist/api/core/project/index.d.ts +68 -1
- package/dist/api/core/project/index.d.ts.map +1 -1
- package/dist/api/core/proposals/index.d.ts +531 -0
- package/dist/api/core/proposals/index.d.ts.map +1 -0
- package/dist/api/core/storeys/index.d.ts +265 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +24 -0
- package/dist/api/core/tags.d.ts.map +1 -1
- package/dist/api/core/user.d.ts +44 -0
- package/dist/api/core/user.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +4 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/boolean/index.d.ts +4 -4
- package/dist/api/design/create/index.d.ts +568 -45
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +3 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +195 -0
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/edit/index.d.ts +1 -1
- package/dist/api/design/erase/index.d.ts +2 -2
- package/dist/api/design/family.d.ts +493 -0
- package/dist/api/design/family.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +181 -8
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +98 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/lock.d.ts +26 -0
- package/dist/api/design/lock.d.ts.map +1 -1
- package/dist/api/design/materials/index.d.ts +270 -16
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/query/geometry/index.d.ts +112 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +289 -11
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/referenceLines.d.ts +45 -0
- package/dist/api/design/query/referenceLines.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +181 -8
- package/dist/api/design/query/spaces.d.ts.map +1 -1
- package/dist/api/design/selection/index.d.ts +144 -0
- package/dist/api/design/selection/index.d.ts.map +1 -1
- package/dist/api/design/transform/index.d.ts +172 -10
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/types/index.d.ts +181 -0
- package/dist/api/design/types/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +553 -2
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/visibility.d.ts +126 -0
- package/dist/api/design/visibility.d.ts.map +1 -0
- package/dist/api/design/windows/index.d.ts +113 -2
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/entity/buildableEnvelope.d.ts +4 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +10 -2
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +21 -21
- package/dist/api/entity/story.d.ts +242 -15
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +25 -25
- package/dist/api/presentation/annotate.d.ts +467 -0
- package/dist/api/presentation/annotate.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +111 -8
- package/dist/api/presentation/diagrams.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +108 -0
- package/dist/api/presentation/export.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +55 -4
- package/dist/api/presentation/import.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +58 -1
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +1139 -0
- package/dist/api/presentation/placedViews.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +481 -0
- package/dist/api/presentation/shapes.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +452 -13
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/slideshow.d.ts +125 -0
- package/dist/api/presentation/slideshow.d.ts.map +1 -0
- package/dist/api/presentation/tables.d.ts +81 -0
- package/dist/api/presentation/tables.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +367 -7
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/program/areas.d.ts +102 -12
- package/dist/api/program/areas.d.ts.map +1 -1
- package/dist/api/program/cores.d.ts +3 -99
- package/dist/api/program/cores.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +7 -15
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/layout.d.ts +346 -11
- package/dist/api/program/layout.d.ts.map +1 -1
- package/dist/api/program/site.d.ts +469 -13
- package/dist/api/program/site.d.ts.map +1 -1
- package/dist/api/program/spreadsheet.d.ts +365 -41
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +505 -0
- package/dist/api/workspace/index.d.ts.map +1 -0
- package/dist/errors/codes.d.ts +34 -0
- package/dist/errors/codes.d.ts.map +1 -0
- package/dist/errors/envelope.d.ts +56 -0
- package/dist/errors/envelope.d.ts.map +1 -0
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/plugin-error.d.ts +69 -0
- package/dist/errors/plugin-error.d.ts.map +1 -0
- package/dist/handles.d.ts +97 -25
- package/dist/handles.d.ts.map +1 -1
- package/dist/host-utils.d.ts +4 -0
- package/dist/host-utils.d.ts.map +1 -1
- package/dist/index.cjs +4605 -1423
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4191 -1412
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
- package/scripts/generate-manifest.mjs +45 -0
- package/scripts/generate-manifest.test.mjs +103 -4
- package/src/api/analysis/daylight.ts +470 -0
- package/src/api/analysis/heatmaps.ts +683 -0
- package/src/api/analysis/illuminance.ts +155 -0
- package/src/api/analysis/index.ts +61 -0
- package/src/api/analysis/shadows.ts +183 -0
- package/src/api/analysis/solar.ts +237 -0
- package/src/api/analysis/sunlightHours.ts +211 -0
- package/src/api/analysis/sunpath.ts +83 -0
- package/src/api/analysis/weather.ts +179 -0
- package/src/api/core/camera/index.ts +268 -0
- package/src/api/core/comment/index.ts +120 -2
- package/src/api/core/geom/create/index.ts +912 -1
- package/src/api/core/geom/delete/index.ts +6 -0
- package/src/api/core/geom/query/brep.ts +119 -0
- package/src/api/core/handles/index.ts +233 -0
- package/src/api/core/index.ts +34 -0
- package/src/api/core/io/export/index.ts +126 -0
- package/src/api/core/io/import/index.ts +496 -0
- package/src/api/core/io/index.ts +42 -0
- package/src/api/core/io/job/index.ts +140 -0
- package/src/api/core/io/query/index.ts +71 -0
- package/src/api/core/io/terrain/index.ts +360 -0
- package/src/api/core/io/underlay/index.ts +705 -0
- package/src/api/core/mode/index.ts +96 -0
- package/src/api/core/project/index.ts +62 -1
- package/src/api/core/proposals/index.ts +569 -0
- package/src/api/core/storeys/index.ts +294 -0
- package/src/api/core/tags.ts +27 -0
- package/src/api/core/user.ts +46 -0
- package/src/api/core/zoom/index.ts +4 -0
- package/src/api/design/create/index.ts +670 -30
- package/src/api/design/delete/index.ts +3 -0
- package/src/api/design/doors/index.ts +208 -0
- package/src/api/design/erase/index.ts +1 -1
- package/src/api/design/family.ts +544 -0
- package/src/api/design/furniture/index.ts +197 -8
- package/src/api/design/index.ts +102 -0
- package/src/api/design/lock.ts +27 -0
- package/src/api/design/materials/index.ts +334 -27
- package/src/api/design/query/geometry/index.ts +125 -3
- package/src/api/design/query/index.ts +219 -7
- package/src/api/design/query/referenceLines.ts +52 -0
- package/src/api/design/query/spaces.ts +143 -0
- package/src/api/design/selection/index.ts +129 -0
- package/src/api/design/transform/index.ts +170 -9
- package/src/api/design/types/index.ts +156 -0
- package/src/api/design/update/index.ts +631 -3
- package/src/api/design/visibility.ts +143 -0
- package/src/api/design/windows/index.ts +128 -2
- package/src/api/entity/buildableEnvelope.ts +4 -0
- package/src/api/entity/referenceLine.ts +8 -0
- package/src/api/entity/story.ts +259 -15
- package/src/api/index.ts +10 -0
- package/src/api/presentation/annotate.ts +385 -0
- package/src/api/presentation/diagrams.ts +118 -8
- package/src/api/presentation/export.ts +108 -0
- package/src/api/presentation/import.ts +51 -4
- package/src/api/presentation/index.ts +66 -1
- package/src/api/presentation/placedViews.ts +1120 -0
- package/src/api/presentation/shapes.ts +274 -0
- package/src/api/presentation/sheets.ts +400 -13
- package/src/api/presentation/slideshow.ts +134 -0
- package/src/api/presentation/tables.ts +84 -0
- package/src/api/presentation/views.ts +376 -8
- package/src/api/program/areas.ts +88 -15
- package/src/api/program/cores.ts +3 -91
- package/src/api/program/index.ts +7 -15
- package/src/api/program/layout.ts +365 -11
- package/src/api/program/site.ts +435 -13
- package/src/api/program/spreadsheet.ts +376 -35
- package/src/api/workspace/index.ts +563 -0
- package/src/errors/codes.ts +136 -0
- package/src/errors/envelope.ts +75 -0
- package/src/errors/index.ts +21 -0
- package/src/errors/plugin-error.ts +134 -0
- package/src/handles.ts +123 -13
- package/src/host-utils.ts +4 -0
- package/src/index.ts +1 -0
- package/test/errors.test.mjs +184 -0
- package/tsconfig.json +7 -2
|
@@ -52,6 +52,9 @@ export abstract class PluginDesignDeleteApi {
|
|
|
52
52
|
* @examplePrompt Delete all the furniture I picked
|
|
53
53
|
* @examplePrompt Remove the door and window I just created
|
|
54
54
|
*
|
|
55
|
+
* @performance Array delete — pass every target in one call (one host round-trip). There is
|
|
56
|
+
* no per-item delete; collect the whole set and never loop this per entity.
|
|
57
|
+
*
|
|
55
58
|
* # Example
|
|
56
59
|
* ```ts
|
|
57
60
|
* // Hard-delete every furniture item on storey 2 (a single undo entry)
|
|
@@ -12,6 +12,13 @@ import { PluginDesignChangeResult } from "../lock"
|
|
|
12
12
|
* mesh reflection state. `mirror` reflects the door across an axis (undoable, one
|
|
13
13
|
* command); `setType` is intentionally absent (the engine has no in-place re-type —
|
|
14
14
|
* it would require delete+recreate).
|
|
15
|
+
*
|
|
16
|
+
* The **catalog** reads (`listCatalogGroups`/`listCatalog`/`getCatalogItem`/`exists`)
|
|
17
|
+
* browse the placeable door library — plain value records keyed by a library id
|
|
18
|
+
* (team `_id` or general `fullName`), NOT handles — and feed `design.create.door`.
|
|
19
|
+
* They are network-backed but carry no `Async` suffix (§6.6) and never throw
|
|
20
|
+
* (`[]`/`null`). The {@linkcode PluginObjectCatalogGroup} / {@linkcode PluginObjectCatalogItem}
|
|
21
|
+
* DTOs are shared with `design.windows`.
|
|
15
22
|
*/
|
|
16
23
|
export abstract class PluginDesignDoorsApi {
|
|
17
24
|
constructor() {}
|
|
@@ -98,6 +105,30 @@ export abstract class PluginDesignDoorsApi {
|
|
|
98
105
|
*/
|
|
99
106
|
public abstract getHeight(door: ComponentHandle): PluginApiReturn<number | null>
|
|
100
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Get a door's full dimensions in one call — width along the wall, vertical
|
|
110
|
+
* height, and thickness through the wall — measured in the door's local
|
|
111
|
+
* oriented space. Parity with {@linkcode PluginDesignWindowsApi.getDimensions}.
|
|
112
|
+
*
|
|
113
|
+
* @param door The door to query
|
|
114
|
+
* @returns The dimensions, or `null`
|
|
115
|
+
*
|
|
116
|
+
* @examplePrompt What are the dimensions of this door?
|
|
117
|
+
* @examplePrompt How big is the selected door?
|
|
118
|
+
* @examplePrompt Give me the width, height and depth of this door
|
|
119
|
+
* @examplePrompt Measure the entrance door including its thickness through the wall
|
|
120
|
+
*
|
|
121
|
+
* # Example
|
|
122
|
+
* ```ts
|
|
123
|
+
* const [door] = await snaptrude.design.query.listDoors({ isSelected: true })
|
|
124
|
+
* const dims = await snaptrude.design.doors.getDimensions(door)
|
|
125
|
+
* if (dims) console.log(dims.width, dims.height, dims.thickness)
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
public abstract getDimensions(
|
|
129
|
+
door: ComponentHandle
|
|
130
|
+
): PluginApiReturn<PluginDoorDimensions | null>
|
|
131
|
+
|
|
101
132
|
/**
|
|
102
133
|
* Get the floor a door is hosted on — the storey/level component that
|
|
103
134
|
* supports the door.
|
|
@@ -224,6 +255,90 @@ export abstract class PluginDesignDoorsApi {
|
|
|
224
255
|
doors: ComponentHandle[],
|
|
225
256
|
height: number
|
|
226
257
|
): PluginApiReturn<PluginDesignChangeResult>
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* List the door catalog **groups** — the placement families (Swing, Sliding,
|
|
261
|
+
* Folding, Pivot, …), built-in groups merged with any team-custom types.
|
|
262
|
+
*
|
|
263
|
+
* @returns The groups as {@linkcode PluginObjectCatalogGroup}`[]` (`[]` when empty)
|
|
264
|
+
*
|
|
265
|
+
* @examplePrompt What kinds of doors can I place?
|
|
266
|
+
* @examplePrompt List the door groups in the catalog
|
|
267
|
+
* @examplePrompt Show me the door families available in this project
|
|
268
|
+
* @examplePrompt Which door types does this project support?
|
|
269
|
+
*
|
|
270
|
+
* # Example
|
|
271
|
+
* ```ts
|
|
272
|
+
* const groups = await snaptrude.design.doors.listCatalogGroups()
|
|
273
|
+
* for (const g of groups) console.log(g.dbType, g.label, g.source)
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
276
|
+
public abstract listCatalogGroups(): PluginApiReturn<PluginObjectCatalogGroup[]>
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* List the placeable door catalog (team + general libraries), optionally
|
|
280
|
+
* restricted to one group by its `dbType` token.
|
|
281
|
+
*
|
|
282
|
+
* @param group Restrict to one group's `dbType` (optional; e.g. `"singleDoor"`)
|
|
283
|
+
* @returns The catalog as {@linkcode PluginObjectCatalogItem}`[]` (`[]` when empty)
|
|
284
|
+
*
|
|
285
|
+
* @examplePrompt What doors can I place in this project?
|
|
286
|
+
* @examplePrompt List every door in the library
|
|
287
|
+
* @examplePrompt Show me the sliding doors I can add
|
|
288
|
+
* @examplePrompt Browse the door catalog
|
|
289
|
+
*
|
|
290
|
+
* # Example
|
|
291
|
+
* ```ts
|
|
292
|
+
* const [group] = await snaptrude.design.doors.listCatalogGroups()
|
|
293
|
+
* const items = await snaptrude.design.doors.listCatalog(group?.dbType)
|
|
294
|
+
* for (const item of items) console.log(item.id, item.name, item.thumbnailUrl)
|
|
295
|
+
* ```
|
|
296
|
+
*/
|
|
297
|
+
public abstract listCatalog(
|
|
298
|
+
group?: string
|
|
299
|
+
): PluginApiReturn<PluginObjectCatalogItem[]>
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Get a single door catalog item by its library id.
|
|
303
|
+
*
|
|
304
|
+
* @param id The catalog library id
|
|
305
|
+
* @returns The item, or `null` if no catalog item matches
|
|
306
|
+
*
|
|
307
|
+
* @examplePrompt Get the details of this door from the library
|
|
308
|
+
* @examplePrompt Look up the catalog entry for this door id
|
|
309
|
+
* @examplePrompt What is the cost of this door item?
|
|
310
|
+
* @examplePrompt Show me the family name of this door in the catalog
|
|
311
|
+
*
|
|
312
|
+
* # Example
|
|
313
|
+
* ```ts
|
|
314
|
+
* const [entry] = await snaptrude.design.doors.listCatalog()
|
|
315
|
+
* const item = await snaptrude.design.doors.getCatalogItem(entry.id)
|
|
316
|
+
* if (item) console.log(item.name, item.source, item.dbType)
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
public abstract getCatalogItem(
|
|
320
|
+
id: string
|
|
321
|
+
): PluginApiReturn<PluginObjectCatalogItem | null>
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Test whether a door catalog item exists for the given library id.
|
|
325
|
+
*
|
|
326
|
+
* @param id The catalog library id
|
|
327
|
+
* @returns `true` if it exists, otherwise `false`
|
|
328
|
+
*
|
|
329
|
+
* @examplePrompt Is this door still in the library?
|
|
330
|
+
* @examplePrompt Check whether a door catalog item with this id exists
|
|
331
|
+
* @examplePrompt Does my team library have this door?
|
|
332
|
+
* @examplePrompt Verify the door is available before placing it
|
|
333
|
+
*
|
|
334
|
+
* # Example
|
|
335
|
+
* ```ts
|
|
336
|
+
* const [entry] = await snaptrude.design.doors.listCatalog()
|
|
337
|
+
* const stillAvailable = await snaptrude.design.doors.exists(entry.id)
|
|
338
|
+
* console.log(stillAvailable ? "safe to place" : "removed from library")
|
|
339
|
+
* ```
|
|
340
|
+
*/
|
|
341
|
+
public abstract exists(id: string): PluginApiReturn<boolean>
|
|
227
342
|
}
|
|
228
343
|
|
|
229
344
|
/**
|
|
@@ -238,6 +353,22 @@ export const PluginDesignDoorArgs = z.object({
|
|
|
238
353
|
})
|
|
239
354
|
export type PluginDesignDoorArgs = z.infer<typeof PluginDesignDoorArgs>
|
|
240
355
|
|
|
356
|
+
/**
|
|
357
|
+
* A door's dimensions (engine units), symmetric with {@linkcode PluginWindowDimensions}.
|
|
358
|
+
*
|
|
359
|
+
* | Property | Type | Description |
|
|
360
|
+
* |---|---|---|
|
|
361
|
+
* | `width` | `number` | Along the wall |
|
|
362
|
+
* | `height` | `number` | Vertical |
|
|
363
|
+
* | `thickness` | `number` | Through the wall (engine `length` axis) |
|
|
364
|
+
*/
|
|
365
|
+
export const PluginDoorDimensions = z.object({
|
|
366
|
+
width: z.number(),
|
|
367
|
+
height: z.number(),
|
|
368
|
+
thickness: z.number(),
|
|
369
|
+
})
|
|
370
|
+
export type PluginDoorDimensions = z.infer<typeof PluginDoorDimensions>
|
|
371
|
+
|
|
241
372
|
/** Mirror axis — tokens mirror the engine `FlipDirection` verbatim (§6.1). */
|
|
242
373
|
export const PluginMirrorAxis = z.enum(["x", "y", "z"])
|
|
243
374
|
export type PluginMirrorAxis = z.infer<typeof PluginMirrorAxis>
|
|
@@ -283,3 +414,80 @@ export const PluginDesignDoorSetHeightArgs = z.object({
|
|
|
283
414
|
height: z.number(),
|
|
284
415
|
})
|
|
285
416
|
export type PluginDesignDoorSetHeightArgs = z.infer<typeof PluginDesignDoorSetHeightArgs>
|
|
417
|
+
|
|
418
|
+
// ---------------------------------------------------------------------------
|
|
419
|
+
// catalog (shared by doors + windows)
|
|
420
|
+
// ---------------------------------------------------------------------------
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* A door/window catalog **group** — a placement family (e.g. Swing, Sliding,
|
|
424
|
+
* Casement). Shared by `design.doors` and `design.windows`.
|
|
425
|
+
*
|
|
426
|
+
* | Property | Type | Description |
|
|
427
|
+
* |---|---|---|
|
|
428
|
+
* | `dbType` | `string` | Stable engine token (e.g. `singleDoor`, `casementDouble`) |
|
|
429
|
+
* | `label` | `string` | Human-readable group label (e.g. `"Swing - 1 Shutter"`) |
|
|
430
|
+
* | `source` | `'default' \| 'team'` | Built-in group or a team-custom type |
|
|
431
|
+
*/
|
|
432
|
+
export const PluginObjectCatalogGroup = z.object({
|
|
433
|
+
dbType: z.string(),
|
|
434
|
+
label: z.string(),
|
|
435
|
+
source: z.enum(["default", "team"]),
|
|
436
|
+
})
|
|
437
|
+
export type PluginObjectCatalogGroup = z.infer<typeof PluginObjectCatalogGroup>
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* A placeable door/window catalog **item** (value record — not a scene
|
|
441
|
+
* entity/handle). Shared by `design.doors` and `design.windows`; symmetric with
|
|
442
|
+
* {@linkcode PluginFurnitureCatalogItem}. The raw mesh (`.babylon`) URL is never
|
|
443
|
+
* exposed — only `thumbnailUrl`.
|
|
444
|
+
*
|
|
445
|
+
* | Property | Type | Description |
|
|
446
|
+
* |---|---|---|
|
|
447
|
+
* | `id` | `string` | Library id (team `_id` or general `fullName`) — pass to `design.create.door`/`window` |
|
|
448
|
+
* | `name` | `string` | Display name |
|
|
449
|
+
* | `source` | `'team' \| 'general'` | Which library it came from |
|
|
450
|
+
* | `dbType` | `string` | The group token it belongs to (e.g. `singleDoor`) |
|
|
451
|
+
* | `subType` | `string`? | Engine sub-type (optional) |
|
|
452
|
+
* | `thumbnailUrl` | `string`? | Preview thumbnail URL (optional) |
|
|
453
|
+
* | `cost` | `number`? | Cost (optional; team items) |
|
|
454
|
+
* | `familyName` | `string`? | Family name (optional) |
|
|
455
|
+
*/
|
|
456
|
+
export const PluginObjectCatalogItem = z.object({
|
|
457
|
+
id: z.string(),
|
|
458
|
+
name: z.string(),
|
|
459
|
+
source: z.enum(["team", "general"]),
|
|
460
|
+
dbType: z.string(),
|
|
461
|
+
subType: z.string().optional(),
|
|
462
|
+
thumbnailUrl: z.string().optional(),
|
|
463
|
+
cost: z.number().optional(),
|
|
464
|
+
familyName: z.string().optional(),
|
|
465
|
+
})
|
|
466
|
+
export type PluginObjectCatalogItem = z.infer<typeof PluginObjectCatalogItem>
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Arguments for {@linkcode PluginDesignDoorsApi.listCatalog}.
|
|
470
|
+
*
|
|
471
|
+
* | Property | Type | Description |
|
|
472
|
+
* |---|---|---|
|
|
473
|
+
* | `group` | `string`? | Restrict to one group's `dbType` token (optional) |
|
|
474
|
+
*/
|
|
475
|
+
export const PluginDesignDoorListCatalogArgs = z.object({
|
|
476
|
+
group: z.string().optional(),
|
|
477
|
+
})
|
|
478
|
+
export type PluginDesignDoorListCatalogArgs = z.infer<typeof PluginDesignDoorListCatalogArgs>
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Arguments for {@linkcode PluginDesignDoorsApi.getCatalogItem} / {@linkcode PluginDesignDoorsApi.exists}.
|
|
482
|
+
*
|
|
483
|
+
* | Property | Type | Description |
|
|
484
|
+
* |---|---|---|
|
|
485
|
+
* | `id` | `string` | The catalog library id |
|
|
486
|
+
*/
|
|
487
|
+
export const PluginDesignDoorGetCatalogItemArgs = z.object({
|
|
488
|
+
id: z.string(),
|
|
489
|
+
})
|
|
490
|
+
export type PluginDesignDoorGetCatalogItemArgs = z.infer<typeof PluginDesignDoorGetCatalogItemArgs>
|
|
491
|
+
|
|
492
|
+
export const PluginDesignDoorExistsArgs = PluginDesignDoorGetCatalogItemArgs
|
|
493
|
+
export type PluginDesignDoorExistsArgs = z.infer<typeof PluginDesignDoorExistsArgs>
|
|
@@ -35,7 +35,7 @@ export const ErasableEdgeRef = z.object({
|
|
|
35
35
|
strategy: EraseStrategy,
|
|
36
36
|
/** Bottom-graph edge weight: `1` = external boundary edge, `>=2` = internal edge shared between components. */
|
|
37
37
|
edgeWeight: z.number(),
|
|
38
|
-
/** The components this edge is incident to — one for external (DirectDelete)
|
|
38
|
+
/** The components this edge is incident to — one for external (DirectDelete); two or more for internal (DirectUnion; 3+ at T-junctions where several masses share the edge). */
|
|
39
39
|
components: z.array(ComponentHandle),
|
|
40
40
|
/** A representative point on the edge (its head endpoint). Diagnostic only. */
|
|
41
41
|
snapPoint: Vec3Handle,
|