@snaptrude/plugin-core 0.9.5 → 0.9.7

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/api-manifest.full.json +8442 -0
  3. package/api-manifest.json +221 -7
  4. package/dist/api/core/camera/index.d.ts +16 -0
  5. package/dist/api/core/camera/index.d.ts.map +1 -1
  6. package/dist/api/core/io/import/index.d.ts +3 -1
  7. package/dist/api/core/io/import/index.d.ts.map +1 -1
  8. package/dist/api/core/project/index.d.ts +68 -1
  9. package/dist/api/core/project/index.d.ts.map +1 -1
  10. package/dist/api/core/storeys/index.d.ts +14 -0
  11. package/dist/api/core/storeys/index.d.ts.map +1 -1
  12. package/dist/api/design/create/bulk-items.d.ts +177 -0
  13. package/dist/api/design/create/bulk-items.d.ts.map +1 -0
  14. package/dist/api/design/create/index.d.ts +273 -8
  15. package/dist/api/design/create/index.d.ts.map +1 -1
  16. package/dist/api/design/create/opening-fields.d.ts +29 -0
  17. package/dist/api/design/create/opening-fields.d.ts.map +1 -0
  18. package/dist/api/design/delete/index.d.ts +4 -0
  19. package/dist/api/design/delete/index.d.ts.map +1 -1
  20. package/dist/api/design/dimensions.d.ts +427 -0
  21. package/dist/api/design/dimensions.d.ts.map +1 -0
  22. package/dist/api/design/furniture/index.d.ts +33 -0
  23. package/dist/api/design/furniture/index.d.ts.map +1 -1
  24. package/dist/api/design/index.d.ts +5 -0
  25. package/dist/api/design/index.d.ts.map +1 -1
  26. package/dist/api/design/visibility.d.ts +28 -0
  27. package/dist/api/design/visibility.d.ts.map +1 -1
  28. package/dist/api/presentation/annotate.d.ts +2 -2
  29. package/dist/api/presentation/shapes.d.ts +2 -2
  30. package/dist/handles.d.ts +19 -0
  31. package/dist/handles.d.ts.map +1 -1
  32. package/dist/index.cjs +2019 -1865
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.js +1994 -1865
  35. package/dist/index.js.map +1 -1
  36. package/package.json +13 -13
  37. package/src/api/core/camera/index.ts +17 -0
  38. package/src/api/core/io/import/index.ts +11 -3
  39. package/src/api/core/project/index.ts +62 -1
  40. package/src/api/core/storeys/index.ts +15 -0
  41. package/src/api/design/create/bulk-items.ts +182 -0
  42. package/src/api/design/create/index.ts +296 -18
  43. package/src/api/design/create/opening-fields.ts +29 -0
  44. package/src/api/design/delete/index.ts +4 -0
  45. package/src/api/design/dimensions.ts +453 -0
  46. package/src/api/design/furniture/index.ts +34 -0
  47. package/src/api/design/index.ts +5 -0
  48. package/src/api/design/visibility.ts +34 -0
  49. package/src/handles.ts +24 -0
@@ -0,0 +1,427 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ import { ComponentHandle, DimensionHandle, Vec3Handle } from "../../handles";
4
+ /**
5
+ * Dimension lines (Measuring Tape) — the measurement annotations the Measuring
6
+ * Tape tool leaves in the 3D scene, NOT an entity's width/height/depth
7
+ * properties (for those see `design.windows.getDimensions`,
8
+ * `design.create.staircase`'s `dimensions`, or `design.query.measure`).
9
+ *
10
+ * A dimension line is a scene object: two endpoints anchored to the geometry
11
+ * they were measured on, an offset that pushes the drawn line clear of the
12
+ * span, and a label showing the distance in the project's units. Because the
13
+ * endpoints are anchored, the line follows its host when the host is moved,
14
+ * edited, or resized, and it is removed with the host when the host is deleted.
15
+ * Dimension lines are storey-scoped, render in both plan and 3D, and are drawn
16
+ * into Present-mode sheets (style them with
17
+ * `presentation.placedViews.updateStyles(shapeId, "Dimension", …)`).
18
+ *
19
+ * **Units.** Every length here — `offset` and the record's `length` — is in
20
+ * **Babylon units** (BU), the engine's storage unit: 1 BU = 10 in = 0.254 m.
21
+ * Convert with `core.units.convert(value, from, await core.units.getBabylonType())`.
22
+ *
23
+ * **Offset convention.** `options.offset` is a **signed** distance in BU:
24
+ * positive pushes the drawn line to the **left** of the `from` → `to`
25
+ * direction in plan (`cross(up, direction)`), negative to the right. It
26
+ * defaults to `3.937` BU (1 m). The placement mode is always `"across"` (the
27
+ * tape tool's perpendicular mode), which re-perpendicularises when the host
28
+ * geometry is edited.
29
+ *
30
+ * Every mutator here (`create`, `delete`, `hide`, `show`) commits through the
31
+ * engine's command manager, so each call is a single undo entry, is autosaved,
32
+ * and replays to collaborators.
33
+ *
34
+ * Accessed via `snaptrude.design.dimensions`.
35
+ */
36
+ export declare abstract class PluginDesignDimensionsApi {
37
+ constructor();
38
+ /**
39
+ * Draw one dimension line between two world points, anchored to a component.
40
+ *
41
+ * `anchor` is **required**: the endpoints are stored relative to the anchor's
42
+ * mesh, and only component-anchored dimension lines survive a reload. A
43
+ * free-point dimension anchors to a scene helper mesh whose id is not stable
44
+ * across reloads, so it is dropped or corrupted when the project is reopened
45
+ * — the host therefore rejects a non-component anchor rather than writing a
46
+ * record that silently disappears. Pass `options.anchorTo` to anchor the
47
+ * second endpoint to a different component (it defaults to `anchor`).
48
+ *
49
+ * The dimension is created flat (never plan-projected) so the same call
50
+ * produces the same record whatever the current camera; it still draws in
51
+ * plan.
52
+ *
53
+ * @param from - World-space first endpoint.
54
+ * @param to - World-space second endpoint.
55
+ * @param anchor - The component the first endpoint is anchored to (required).
56
+ * @param options - `anchorTo` (component for the second endpoint; defaults to
57
+ * `anchor`), `offset` (signed perpendicular offset in Babylon units,
58
+ * positive = left of the `from` → `to` direction in plan; default `3.937`
59
+ * BU = 1 m).
60
+ * @returns The new dimension line's {@linkcode DimensionHandle}.
61
+ * @throws `VALIDATION` for malformed arguments or a degenerate span (`from`
62
+ * and `to` closer than the engine's minimum); `HANDLE_INVALID` for an
63
+ * unknown `anchor` / `anchorTo`; `PRECONDITION_FAILED` when the anchor is
64
+ * outside the active proposal or the editor is not mounted;
65
+ * `METHOD_NOT_PERMITTED` when plugin writes are disabled.
66
+ *
67
+ * @examplePrompt Dimension every wall on level 2
68
+ * @examplePrompt Add a dimension line along this wall
69
+ * @examplePrompt Measure the width of this room and label it on the plan
70
+ *
71
+ * # Example
72
+ * ```ts
73
+ * const { design, core } = snaptrude
74
+ * const v = core.math.vec3
75
+ * const curve = core.geom.query.curve
76
+ * for (const wall of await design.query.listWalls({ storeys: [2] })) {
77
+ * const cl = await design.query.geometry.getCenterline(wall)
78
+ * if (!cl) continue
79
+ * const a = await curve.getStartPoint(cl)
80
+ * const b = await curve.getEndPoint(cl)
81
+ * await design.dimensions.create(
82
+ * await v.new(a.x, a.y, a.z),
83
+ * await v.new(b.x, b.y, b.z),
84
+ * wall,
85
+ * )
86
+ * }
87
+ * ```
88
+ */
89
+ abstract create(from: Vec3Handle, to: Vec3Handle, anchor: ComponentHandle, options?: {
90
+ anchorTo?: ComponentHandle;
91
+ offset?: number;
92
+ }): PluginApiReturn<DimensionHandle>;
93
+ /**
94
+ * List the dimension lines in the project as full records.
95
+ *
96
+ * Filters combine with AND. `storeys` keeps only the dimensions on those
97
+ * storey numbers, `anchors` only the ones anchored to those components
98
+ * (matching either endpoint, and matching an instanced anchor's source mesh
99
+ * too), `isHidden` only the ones whose user Hide flag equals the value given.
100
+ *
101
+ * Dimension lines drawn by the Measuring Tape onto a scene helper mesh rather
102
+ * than a component come back with `anchor: null` and are not proposal-scoped.
103
+ *
104
+ * @param options - `storeys`, `anchors`, `isHidden` filters (all optional,
105
+ * ANDed).
106
+ * @returns The matching {@linkcode PluginDimensionLine} records (`[]` when
107
+ * nothing matches).
108
+ * @throws `VALIDATION` for malformed filters; `HANDLE_INVALID` for an unknown
109
+ * handle in `anchors`.
110
+ *
111
+ * @examplePrompt List all the dimension lines in this model
112
+ * @examplePrompt Which dimensions are on level 3?
113
+ * @examplePrompt Flag any dimension line shorter than 600 mm
114
+ *
115
+ * @performance Array read — one host round-trip returns every record. Filter
116
+ * in one call rather than calling `get` per dimension.
117
+ *
118
+ * # Example
119
+ * ```ts
120
+ * const units = snaptrude.core.units
121
+ * const min = await units.convert(600, "millimeters", await units.getBabylonType())
122
+ * const short = (await snaptrude.design.dimensions.list()).filter(
123
+ * (d) => d.length < min,
124
+ * )
125
+ * console.log(short.map((d) => `${d.label} on storey ${d.storey}`))
126
+ * ```
127
+ */
128
+ abstract list(options?: {
129
+ storeys?: number[];
130
+ anchors?: ComponentHandle[];
131
+ isHidden?: boolean;
132
+ }): PluginApiReturn<PluginDimensionLine[]>;
133
+ /**
134
+ * Read one dimension line by handle.
135
+ *
136
+ * Returns `null` — rather than throwing — when the dimension no longer
137
+ * exists, so a handle kept across a delete or an undo can be polled safely.
138
+ *
139
+ * @param dimension - The dimension line to read.
140
+ * @returns Its {@linkcode PluginDimensionLine} record, or `null` if it is
141
+ * gone.
142
+ * @throws `VALIDATION` if `dimension` is not a non-empty id string.
143
+ *
144
+ * @examplePrompt Read the dimension line I just created
145
+ * @examplePrompt How long is this dimension and what does its label say?
146
+ * @examplePrompt Check whether that dimension line still exists
147
+ *
148
+ * # Example
149
+ * ```ts
150
+ * const dim = await snaptrude.design.dimensions.get(handle)
151
+ * if (dim) console.log(dim.label, dim.length, dim.storey)
152
+ * ```
153
+ */
154
+ abstract get(dimension: DimensionHandle): PluginApiReturn<PluginDimensionLine | null>;
155
+ /**
156
+ * Delete dimension lines — the same hard removal as selecting them and
157
+ * pressing Delete. Undoable as a **single** entry for the whole batch.
158
+ *
159
+ * Deleted handles are stale afterwards: {@linkcode
160
+ * PluginDesignDimensionsApi.get} returns `null` for them and the other
161
+ * mutators throw `HANDLE_INVALID`.
162
+ *
163
+ * @param dimensions - The dimension lines to delete (at least one — an empty
164
+ * array is a caller error, not a no-op).
165
+ * @returns The dimensions that were deleted, as
166
+ * {@linkcode PluginDimensionsChangeResult}.
167
+ * @throws `VALIDATION` for an empty or malformed array; `HANDLE_INVALID` if
168
+ * any handle is unknown (the whole call rejects before anything is
169
+ * deleted); `PRECONDITION_FAILED` if any dimension's anchor is outside the
170
+ * active proposal; `METHOD_NOT_PERMITTED` when plugin writes are disabled.
171
+ *
172
+ * @examplePrompt Remove all dimension lines
173
+ * @examplePrompt Delete the dimensions on this wall
174
+ * @examplePrompt Clear the measurements I added to level 2
175
+ *
176
+ * @performance Array API — pass the whole set in one call (one host
177
+ * round-trip, one undo entry). Never loop this per dimension.
178
+ *
179
+ * # Example
180
+ * ```ts
181
+ * const dims = snaptrude.design.dimensions
182
+ * const onWall = await dims.list({ anchors: [wall] })
183
+ * if (onWall.length > 0) await dims.delete(onWall.map((d) => d.id))
184
+ * ```
185
+ */
186
+ abstract delete(dimensions: DimensionHandle[]): PluginApiReturn<PluginDimensionsChangeResult>;
187
+ /**
188
+ * Hide dimension lines from the viewport — the same as the right-click "Hide"
189
+ * action (it sets the user Hide flag, `isHidden`). Undoable. Already-hidden
190
+ * dimensions are skipped and are not reported in `affected`.
191
+ *
192
+ * @param dimensions - The dimension lines to hide.
193
+ * @returns The dimensions actually hidden, as
194
+ * {@linkcode PluginDimensionsChangeResult} — already-hidden inputs are
195
+ * omitted, so `affected` can be shorter than the input.
196
+ * @throws `VALIDATION` for a malformed array; `HANDLE_INVALID` if any handle
197
+ * is unknown; `PRECONDITION_FAILED` if any dimension's anchor is outside
198
+ * the active proposal; `METHOD_NOT_PERMITTED` when plugin writes are
199
+ * disabled.
200
+ *
201
+ * @examplePrompt Hide the dimensions on this storey
202
+ * @examplePrompt Hide every dimension line while I present
203
+ * @examplePrompt Temporarily hide the measurements on level 3
204
+ *
205
+ * @performance Array API — one host round-trip and one undo entry for the
206
+ * whole set.
207
+ *
208
+ * # Example
209
+ * ```ts
210
+ * const dims = snaptrude.design.dimensions
211
+ * const onLevel3 = await dims.list({ storeys: [3] })
212
+ * const { affected } = await dims.hide(onLevel3.map((d) => d.id))
213
+ * ```
214
+ */
215
+ abstract hide(dimensions: DimensionHandle[]): PluginApiReturn<PluginDimensionsChangeResult>;
216
+ /**
217
+ * Reveal hidden dimension lines — clear the user Hide flag, the inverse of
218
+ * {@linkcode PluginDesignDimensionsApi.hide}. Undoable. Already-visible
219
+ * dimensions are skipped and are not reported in `affected`.
220
+ *
221
+ * Clearing the flag does not guarantee the dimension is on screen: a
222
+ * dimension whose anchor component is itself hidden stays off screen with
223
+ * `isHidden: false` and `isVisible: false`.
224
+ *
225
+ * @param dimensions - The dimension lines to reveal.
226
+ * @returns The dimensions actually revealed, as
227
+ * {@linkcode PluginDimensionsChangeResult} — already-visible inputs are
228
+ * omitted, so `affected` can be shorter than the input.
229
+ * @throws `VALIDATION` for a malformed array; `HANDLE_INVALID` if any handle
230
+ * is unknown; `PRECONDITION_FAILED` if any dimension's anchor is outside
231
+ * the active proposal; `METHOD_NOT_PERMITTED` when plugin writes are
232
+ * disabled.
233
+ *
234
+ * @examplePrompt Show the dimension lines again
235
+ * @examplePrompt Unhide all the hidden dimensions
236
+ * @examplePrompt Bring back the measurements I hid on this storey
237
+ *
238
+ * @performance Array API — one host round-trip and one undo entry for the
239
+ * whole set.
240
+ *
241
+ * # Example
242
+ * ```ts
243
+ * const dims = snaptrude.design.dimensions
244
+ * const hidden = await dims.list({ isHidden: true })
245
+ * await dims.show(hidden.map((d) => d.id))
246
+ * ```
247
+ */
248
+ abstract show(dimensions: DimensionHandle[]): PluginApiReturn<PluginDimensionsChangeResult>;
249
+ }
250
+ /**
251
+ * How a dimension line's drawn offset is constrained.
252
+ *
253
+ * - `"across"` — perpendicular to the span (the tape tool's default, and what
254
+ * every plugin-created dimension uses); re-perpendicularises when the host
255
+ * geometry is edited.
256
+ * - `"x"` / `"y"` / `"z"` — the offset is locked to that world axis.
257
+ * - `"none"` — no placement mode recorded (a plain world-space offset).
258
+ */
259
+ export declare const PluginDimensionPlacement: z.ZodEnum<{
260
+ x: "x";
261
+ y: "y";
262
+ z: "z";
263
+ across: "across";
264
+ none: "none";
265
+ }>;
266
+ export type PluginDimensionPlacement = z.infer<typeof PluginDimensionPlacement>;
267
+ /**
268
+ * One dimension line (Measuring Tape annotation). Lengths are in **Babylon
269
+ * units** (1 BU = 0.254 m — convert with `core.units.convert`).
270
+ *
271
+ * | Property | Type | Description |
272
+ * |---|---|---|
273
+ * | `id` | {@linkcode DimensionHandle} | The dimension line's handle |
274
+ * | `from` | {@linkcode Vec3Components} | Live world position of the first endpoint |
275
+ * | `to` | {@linkcode Vec3Components} | Live world position of the second endpoint |
276
+ * | `length` | `number` | Straight-line distance between `from` and `to`, in Babylon units |
277
+ * | `label` | `string` | The text drawn on the canvas, in the project's units (a bare number for metric/inch projects, `27' 7"` style for feet-inches). For a span whose x, y and z all differ the drawn line is the plan projection, so `label` reads the horizontal distance while `length` is the true 3D one |
278
+ * | `offset` | {@linkcode Vec3Components} | World vector from the measured span to the drawn line |
279
+ * | `placement` | {@linkcode PluginDimensionPlacement} | How that offset is constrained |
280
+ * | `anchor` | {@linkcode ComponentHandle}` \| null` | Component the first endpoint is anchored to; `null` for a free point or a non-component host mesh |
281
+ * | `anchorTo` | {@linkcode ComponentHandle}` \| null` | Component the second endpoint is anchored to; equals `anchor` when both endpoints share a host |
282
+ * | `storey` | `number` | Storey the dimension belongs to |
283
+ * | `buildingId` | `string \| null` | Building it belongs to, when it has one |
284
+ * | `isHidden` | `boolean` | The user Hide flag (what `hide` / `show` toggle) |
285
+ * | `isVisible` | `boolean` | Whether it is actually drawn — `false` when hidden, and also when an anchor component is hidden |
286
+ * | `isPlanProjected` | `boolean` | Whether it is drawn flattened onto the storey base (Measuring Tape dimensions drawn in 2D are; plugin-created ones never are) |
287
+ */
288
+ export declare const PluginDimensionLine: z.ZodObject<{
289
+ id: z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>;
290
+ from: z.ZodObject<{
291
+ x: z.ZodNumber;
292
+ y: z.ZodNumber;
293
+ z: z.ZodNumber;
294
+ }, z.core.$strip>;
295
+ to: z.ZodObject<{
296
+ x: z.ZodNumber;
297
+ y: z.ZodNumber;
298
+ z: z.ZodNumber;
299
+ }, z.core.$strip>;
300
+ length: z.ZodNumber;
301
+ label: z.ZodString;
302
+ offset: z.ZodObject<{
303
+ x: z.ZodNumber;
304
+ y: z.ZodNumber;
305
+ z: z.ZodNumber;
306
+ }, z.core.$strip>;
307
+ placement: z.ZodEnum<{
308
+ x: "x";
309
+ y: "y";
310
+ z: "z";
311
+ across: "across";
312
+ none: "none";
313
+ }>;
314
+ anchor: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
315
+ anchorTo: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
316
+ storey: z.ZodNumber;
317
+ buildingId: z.ZodNullable<z.ZodString>;
318
+ isHidden: z.ZodBoolean;
319
+ isVisible: z.ZodBoolean;
320
+ isPlanProjected: z.ZodBoolean;
321
+ }, z.core.$strip>;
322
+ export type PluginDimensionLine = z.infer<typeof PluginDimensionLine>;
323
+ /**
324
+ * Result of every `design.dimensions` mutation that takes a batch
325
+ * ({@linkcode PluginDesignDimensionsApi.delete} /
326
+ * {@linkcode PluginDesignDimensionsApi.hide} /
327
+ * {@linkcode PluginDesignDimensionsApi.show}) — the dimensions actually
328
+ * affected. `hide` / `show` skip dimensions already in the target state, so
329
+ * `affected` can be shorter than the input; `delete` echoes the whole batch.
330
+ * Failures throw (the RPC rejects); there is no `Result<>` monad in the SDK.
331
+ *
332
+ * | Property | Type | Description |
333
+ * |---|---|---|
334
+ * | `affected` | {@linkcode DimensionHandle}`[]` | The dimension lines the call changed |
335
+ */
336
+ export declare const PluginDimensionsChangeResult: z.ZodObject<{
337
+ affected: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>>;
338
+ }, z.core.$strip>;
339
+ export type PluginDimensionsChangeResult = z.infer<typeof PluginDimensionsChangeResult>;
340
+ /**
341
+ * Arguments for {@linkcode PluginDesignDimensionsApi.create} (options
342
+ * flattened).
343
+ *
344
+ * | Property | Type | Description |
345
+ * |---|---|---|
346
+ * | `from` | {@linkcode Vec3Handle} | World-space first endpoint |
347
+ * | `to` | {@linkcode Vec3Handle} | World-space second endpoint |
348
+ * | `anchor` | {@linkcode ComponentHandle} | Component the first endpoint anchors to (required — free-point dimensions do not survive a reload) |
349
+ * | `anchorTo` | {@linkcode ComponentHandle}? | Component for the second endpoint (default: `anchor`) |
350
+ * | `offset` | `number`? | Signed perpendicular offset in Babylon units, positive = left of the `from` → `to` direction in plan (default `3.937` BU = 1 m) |
351
+ *
352
+ * TRANSPORT: positional args — validated host-side as this object.
353
+ */
354
+ export declare const PluginDesignDimensionsCreateArgs: z.ZodObject<{
355
+ from: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
356
+ to: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../..").Handle<"vec3">, string>>;
357
+ anchor: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
358
+ anchorTo: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
359
+ offset: z.ZodOptional<z.ZodNumber>;
360
+ }, z.core.$strip>;
361
+ export type PluginDesignDimensionsCreateArgs = z.infer<typeof PluginDesignDimensionsCreateArgs>;
362
+ /**
363
+ * Arguments for {@linkcode PluginDesignDimensionsApi.list} (options flattened).
364
+ * Filters combine with AND; omitting all of them lists every dimension line.
365
+ *
366
+ * | Property | Type | Description |
367
+ * |---|---|---|
368
+ * | `storeys` | `number[]`? | Only dimensions on these storey numbers |
369
+ * | `anchors` | {@linkcode ComponentHandle}`[]`? | Only dimensions anchored to these components (either endpoint) |
370
+ * | `isHidden` | `boolean`? | user-hidden flag === |
371
+ */
372
+ export declare const PluginDesignDimensionsListArgs: z.ZodObject<{
373
+ storeys: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
374
+ anchors: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>>;
375
+ isHidden: z.ZodOptional<z.ZodBoolean>;
376
+ }, z.core.$strip>;
377
+ export type PluginDesignDimensionsListArgs = z.infer<typeof PluginDesignDimensionsListArgs>;
378
+ /**
379
+ * Arguments for {@linkcode PluginDesignDimensionsApi.get}.
380
+ *
381
+ * | Property | Type | Description |
382
+ * |---|---|---|
383
+ * | `dimension` | {@linkcode DimensionHandle} | The dimension line to read |
384
+ */
385
+ export declare const PluginDesignDimensionsGetArgs: z.ZodObject<{
386
+ dimension: z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>;
387
+ }, z.core.$strip>;
388
+ export type PluginDesignDimensionsGetArgs = z.infer<typeof PluginDesignDimensionsGetArgs>;
389
+ /**
390
+ * Arguments for {@linkcode PluginDesignDimensionsApi.delete}.
391
+ *
392
+ * `.min(1)` mirrors {@linkcode PluginDesignDeleteEntitiesArgs}: an empty delete
393
+ * is a caller error, not a no-op.
394
+ *
395
+ * | Property | Type | Description |
396
+ * |---|---|---|
397
+ * | `dimensions` | {@linkcode DimensionHandle}`[]` | Dimension lines to delete. Unknown handles reject the whole call (fail-fast). |
398
+ */
399
+ export declare const PluginDesignDimensionsDeleteArgs: z.ZodObject<{
400
+ dimensions: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>>;
401
+ }, z.core.$strip>;
402
+ export type PluginDesignDimensionsDeleteArgs = z.infer<typeof PluginDesignDimensionsDeleteArgs>;
403
+ /**
404
+ * Arguments for {@linkcode PluginDesignDimensionsApi.hide}. An empty array is
405
+ * allowed and is a no-op (mirroring {@linkcode PluginDesignVisibilityHideArgs}).
406
+ *
407
+ * | Property | Type | Description |
408
+ * |---|---|---|
409
+ * | `dimensions` | {@linkcode DimensionHandle}`[]` | Dimension lines to hide |
410
+ */
411
+ export declare const PluginDesignDimensionsHideArgs: z.ZodObject<{
412
+ dimensions: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>>;
413
+ }, z.core.$strip>;
414
+ export type PluginDesignDimensionsHideArgs = z.infer<typeof PluginDesignDimensionsHideArgs>;
415
+ /**
416
+ * Arguments for {@linkcode PluginDesignDimensionsApi.show}. An empty array is
417
+ * allowed and is a no-op.
418
+ *
419
+ * | Property | Type | Description |
420
+ * |---|---|---|
421
+ * | `dimensions` | {@linkcode DimensionHandle}`[]` | Dimension lines to reveal |
422
+ */
423
+ export declare const PluginDesignDimensionsShowArgs: z.ZodObject<{
424
+ dimensions: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<DimensionHandle, string>>>;
425
+ }, z.core.$strip>;
426
+ export type PluginDesignDimensionsShowArgs = z.infer<typeof PluginDesignDimensionsShowArgs>;
427
+ //# sourceMappingURL=dimensions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dimensions.d.ts","sourceRoot":"","sources":["../../../src/api/design/dimensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EACL,eAAe,EACf,eAAe,EAEf,UAAU,EACX,MAAM,eAAe,CAAA;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,8BAAsB,yBAAyB;;IAG7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkDG;aACa,MAAM,CACpB,IAAI,EAAE,UAAU,EAChB,EAAE,EAAE,UAAU,EACd,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,eAAe,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GACxD,eAAe,CAAC,eAAe,CAAC;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;aACa,IAAI,CAAC,OAAO,CAAC,EAAE;QAC7B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;QAClB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;QAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;KACnB,GAAG,eAAe,CAAC,mBAAmB,EAAE,CAAC;IAE1C;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,GAAG,CACjB,S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;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;iBAExC,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,6BAA6B,CACrC,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC;;iBAE3C,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,gCAAgC,CACxC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA"}
@@ -2,6 +2,7 @@ import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../../types";
3
3
  import { ComponentHandle } from "../../../handles";
4
4
  import { PluginDesignChangeResult } from "../lock";
5
+ import { PluginObjectCatalogGroup } from "../doors";
5
6
  /**
6
7
  * `snaptrude.design.furniture` — the placeable furniture **catalog** (a library of
7
8
  * source items, NOT scene entities) plus dimension reads/edits of PLACED furniture.
@@ -83,8 +84,40 @@ export declare abstract class PluginDesignFurnitureApi {
83
84
  * const items = await snaptrude.design.furniture.listCatalog(undefined, first)
84
85
  * console.log(first, "→", items.length, "items")
85
86
  * ```
87
+ *
88
+ * @deprecated Use `design.furniture.listCatalogGroups` — the same name
89
+ * `design.doors` and `design.windows` use. Still supported.
86
90
  */
87
91
  abstract listCategories(): PluginApiReturn<string[]>;
92
+ /**
93
+ * List the furniture catalog's groups. Matches
94
+ * {@linkcode PluginDesignDoorsApi.listCatalogGroups} and
95
+ * {@linkcode PluginDesignWindowsApi.listCatalogGroups}, so all three catalog
96
+ * surfaces are named alike.
97
+ *
98
+ * `source` is `"default"` for the built-in picker groups and `"team"` for the
99
+ * sub-types of THIS project's team library — exactly the split
100
+ * {@linkcode PluginDesignFurnitureApi.listCatalog}'s `source` filter uses, so
101
+ * every `"team"` group is guaranteed to match at least one team item here.
102
+ * For furniture the group token and its label are the same string (the
103
+ * category), so `dbType === label`; `design.doors`/`design.windows` have a
104
+ * distinct engine `dbType`.
105
+ *
106
+ * @returns The catalog groups as {@linkcode PluginObjectCatalogGroup}`[]`
107
+ * (`[]` when empty). Pass a group's `dbType` (=== `label`) to
108
+ * {@linkcode PluginDesignFurnitureApi.listCatalog}'s `category` filter to
109
+ * list its items.
110
+ *
111
+ * @examplePrompt What furniture groups are available?
112
+ * @examplePrompt List the furniture categories in this project
113
+ *
114
+ * # Example
115
+ * ```ts
116
+ * const groups = await snaptrude.design.furniture.listCatalogGroups()
117
+ * for (const g of groups) console.log(g.dbType, g.label, g.source)
118
+ * ```
119
+ */
120
+ abstract listCatalogGroups(): PluginApiReturn<PluginObjectCatalogGroup[]>;
88
121
  /**
89
122
  * List the placeable furniture catalog (team + general libraries),
90
123
  * optionally filtered by library `source` and/or `category`.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/furniture/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,wBAAwB;;IAG5C;;;;;;;;;;;;;;;;;;;OAmBG;aACa,aAAa,CAC3B,IAAI,EAAE,eAAe,GACpB,eAAe,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAEpD;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,aAAa,CAC3B,IAAI,EAAE,eAAe,EACrB,UAAU,EAAE,+BAA+B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A;AAEzF;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B;;;;iBAI1C,CAAA;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE7F;;;;;;;GAOG;AACH,eAAO,MAAM,sCAAsC;;;;;;;iBAGjD,CAAA;AACF,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAC1D,OAAO,sCAAsC,CAC9C,CAAA"}
@@ -14,6 +14,7 @@ import { PluginDesignTransformApi } from "./transform";
14
14
  import { PluginDesignEditApi } from "./edit";
15
15
  import { PluginDesignUpdateApi } from "./update";
16
16
  import { PluginDesignVisibilityApi } from "./visibility";
17
+ import { PluginDesignDimensionsApi } from "./dimensions";
17
18
  import { PluginDesignTypesApi } from "./types";
18
19
  import { PluginDesignChangeResult } from "./lock";
19
20
  /**
@@ -29,6 +30,7 @@ import { PluginDesignChangeResult } from "./lock";
29
30
  * - {@linkcode PluginDesignApi.erase} — plan-level adjacency-edge erase (NOT hard delete)
30
31
  * - {@linkcode PluginDesignApi.delete} — hard entity removal
31
32
  * - {@linkcode PluginDesignApi.visibility} — hide / isolate / reveal entities
33
+ * - {@linkcode PluginDesignApi.dimensions} — dimension lines (Measuring Tape): create / list / delete / hide
32
34
  * - {@linkcode PluginDesignApi.types} — read-only building type / assembly reference
33
35
  * - {@linkcode PluginDesignApi.lock} / {@linkcode PluginDesignApi.unlock} / {@linkcode PluginDesignApi.isLocked} / {@linkcode PluginDesignApi.listLocked} — lock state (top-level design verbs, §2A.1)
34
36
  * - {@linkcode PluginDesignApi.lockArea} / {@linkcode PluginDesignApi.unlockArea} / {@linkcode PluginDesignApi.isAreaLocked} / {@linkcode PluginDesignApi.listAreaLocked} — footprint-area lock for Room/Department spaces
@@ -64,6 +66,8 @@ export declare abstract class PluginDesignApi {
64
66
  abstract update: PluginDesignUpdateApi;
65
67
  /** Hide / isolate / reveal entities. See {@linkcode PluginDesignVisibilityApi}. */
66
68
  abstract visibility: PluginDesignVisibilityApi;
69
+ /** Dimension lines (Measuring Tape). See {@linkcode PluginDesignDimensionsApi}. */
70
+ abstract dimensions: PluginDesignDimensionsApi;
67
71
  /** Read-only building type / assembly reference. See {@linkcode PluginDesignTypesApi}. */
68
72
  abstract types: PluginDesignTypesApi;
69
73
  /**
@@ -242,5 +246,6 @@ export * from "./transform";
242
246
  export * from "./edit";
243
247
  export * from "./update";
244
248
  export * from "./visibility";
249
+ export * from "./dimensions";
245
250
  export * from "./types";
246
251
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/design/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,EAAE,yBAAyB,EA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YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAAC,OAAO,CAAC;IAE9E;;;;;;;;;;;;;;;OAeG;aACa,cAAc,IAAI,eAAe,CAAC,eAAe,EAAE,CAAC;;CAGrE;AAED,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"}
@@ -34,6 +34,23 @@ export declare abstract class PluginDesignVisibilityApi {
34
34
  * ```
35
35
  */
36
36
  abstract hide(components: ComponentHandle[]): PluginApiReturn<PluginDesignChangeResult>;
37
+ /**
38
+ * Reveal specific hidden components — the inverse of
39
+ * {@linkcode PluginDesignVisibilityApi.hide}. Use
40
+ * {@linkcode PluginDesignVisibilityApi.showAll} to reveal everything.
41
+ *
42
+ * @param components - The components to reveal.
43
+ * @returns A {@linkcode PluginDesignChangeResult} echoing the components shown.
44
+ *
45
+ * @examplePrompt Show these walls again
46
+ * @examplePrompt Unhide the selected furniture
47
+ *
48
+ * # Example
49
+ * ```ts
50
+ * await snaptrude.design.visibility.show([wall])
51
+ * ```
52
+ */
53
+ abstract show(components: ComponentHandle[]): PluginApiReturn<PluginDesignChangeResult>;
37
54
  /**
38
55
  * Isolate entities — hide everything else so only the given entities remain
39
56
  * visible (the "Isolate" / solo action). Undoable. Reverse it with
@@ -84,6 +101,17 @@ export declare const PluginDesignVisibilityHideArgs: z.ZodObject<{
84
101
  components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
85
102
  }, z.core.$strip>;
86
103
  export type PluginDesignVisibilityHideArgs = z.infer<typeof PluginDesignVisibilityHideArgs>;
104
+ /**
105
+ * Arguments for {@linkcode PluginDesignVisibilityApi.show}.
106
+ *
107
+ * | Property | Type | Description |
108
+ * |---|---|---|
109
+ * | `components` | {@linkcode ComponentHandle}`[]` | Entities to reveal |
110
+ */
111
+ export declare const PluginDesignVisibilityShowArgs: z.ZodObject<{
112
+ components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
113
+ }, z.core.$strip>;
114
+ export type PluginDesignVisibilityShowArgs = z.infer<typeof PluginDesignVisibilityShowArgs>;
87
115
  /**
88
116
  * Arguments for {@linkcode PluginDesignVisibilityApi.isolate}.
89
117
  *
@@ -1 +1 @@
1
- {"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../src/api/design/visibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAA;AAEjD;;;;;;;;;GASG;AACH,8BAAsB,yBAAyB;;IAG7C;;;;;;;;;;;;;;;;;;OAkBG;aACa,IAAI,CAClB,UAAU,EAAE,eAAe,EAAE,GAC5B,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;OAkBG;aACa,OAAO,CACrB,UAAU,EAAE,eAAe,EAAE,GAC5B,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;OAgBG;aACa,OAAO,IAAI,eAAe,CAAC,wBAAwB,CAAC;CACrE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAA;AACF,MAAM,MAAM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,eAAO,MAAM,iCAAiC;;iBAE5C,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA"}
@@ -301,8 +301,8 @@ export type PluginAnnotateGeoKind = z.infer<typeof PluginAnnotateGeoKind>;
301
301
  /** Fill style for geo shapes (the same fills as the Present-mode style panel). */
302
302
  export declare const PluginAnnotateFill: z.ZodEnum<{
303
303
  pattern: "pattern";
304
- solid: "solid";
305
304
  none: "none";
305
+ solid: "solid";
306
306
  semi: "semi";
307
307
  }>;
308
308
  export type PluginAnnotateFill = z.infer<typeof PluginAnnotateFill>;
@@ -445,8 +445,8 @@ export declare const PluginPresentationAnnotateShapeArgs: z.ZodObject<{
445
445
  }>>;
446
446
  fill: z.ZodOptional<z.ZodEnum<{
447
447
  pattern: "pattern";
448
- solid: "solid";
449
448
  none: "none";
449
+ solid: "solid";
450
450
  semi: "semi";
451
451
  }>>;
452
452
  }, z.core.$strip>;
@@ -271,8 +271,8 @@ export declare const PluginPresentationShapeSpec: z.ZodDiscriminatedUnion<[z.Zod
271
271
  }>>;
272
272
  fill: z.ZodOptional<z.ZodEnum<{
273
273
  pattern: "pattern";
274
- solid: "solid";
275
274
  none: "none";
275
+ solid: "solid";
276
276
  semi: "semi";
277
277
  }>>;
278
278
  }, z.core.$strip>], "type">;
@@ -426,8 +426,8 @@ export declare const PluginPresentationShapesUpsertArgs: z.ZodObject<{
426
426
  }>>;
427
427
  fill: z.ZodOptional<z.ZodEnum<{
428
428
  pattern: "pattern";
429
- solid: "solid";
430
429
  none: "none";
430
+ solid: "solid";
431
431
  semi: "semi";
432
432
  }>>;
433
433
  }, z.core.$strip>], "type">;