@snaptrude/plugin-core 0.7.0 → 0.8.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 +22 -0
- package/api-manifest.full.json +360 -19
- package/api-manifest.json +915 -37
- package/dist/api/core/camera/index.d.ts +208 -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 +13 -13
- 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 +18 -18
- 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 +15 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/export/index.d.ts +132 -0
- package/dist/api/core/io/export/index.d.ts.map +1 -0
- package/dist/api/core/io/import/index.d.ts +1 -1
- package/dist/api/core/io/index.d.ts +5 -0
- package/dist/api/core/io/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +7 -7
- package/dist/api/core/proposals/index.d.ts +65 -9
- package/dist/api/core/proposals/index.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/design/boolean/index.d.ts +4 -4
- package/dist/api/design/create/index.d.ts +139 -44
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +36 -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/furniture/index.d.ts +114 -3
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +10 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/materials/index.d.ts +111 -14
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +31 -1
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +5 -5
- package/dist/api/design/transform/index.d.ts +83 -14
- 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 +335 -2
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/visibility.d.ts +98 -0
- package/dist/api/design/visibility.d.ts.map +1 -0
- package/dist/api/entity/referenceLine.d.ts +2 -2
- package/dist/api/entity/space.d.ts +19 -19
- package/dist/api/entity/story.d.ts +128 -15
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +1967 -7
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -1
- package/dist/api/presentation/annotate.d.ts +448 -0
- package/dist/api/presentation/annotate.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +49 -8
- package/dist/api/presentation/diagrams.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +104 -0
- package/dist/api/presentation/export.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +40 -3
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/sheets.d.ts +410 -13
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/views.d.ts +165 -10
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/program/areas.d.ts +63 -3
- 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 +2 -2
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/layout.d.ts +172 -12
- package/dist/api/program/layout.d.ts.map +1 -1
- package/dist/api/program/site.d.ts +11 -8
- package/dist/api/program/site.d.ts.map +1 -1
- package/dist/api/program/spreadsheet.d.ts +105 -13
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/handles.d.ts +64 -25
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +2502 -1466
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2369 -1461
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/core/camera/index.ts +212 -0
- package/src/api/core/comment/index.ts +120 -2
- package/src/api/core/geom/delete/index.ts +6 -0
- package/src/api/core/handles/index.ts +233 -0
- package/src/api/core/index.ts +15 -0
- package/src/api/core/io/export/index.ts +124 -0
- package/src/api/core/io/index.ts +5 -0
- package/src/api/core/proposals/index.ts +71 -11
- package/src/api/core/user.ts +46 -0
- package/src/api/design/create/index.ts +166 -36
- package/src/api/design/doors/index.ts +40 -0
- package/src/api/design/furniture/index.ts +127 -3
- package/src/api/design/index.ts +10 -0
- package/src/api/design/materials/index.ts +157 -30
- package/src/api/design/query/index.ts +33 -7
- package/src/api/design/transform/index.ts +89 -12
- package/src/api/design/types/index.ts +156 -0
- package/src/api/design/update/index.ts +402 -6
- package/src/api/design/visibility.ts +109 -0
- package/src/api/entity/story.ts +141 -15
- package/src/api/presentation/aiInspiration.ts +761 -7
- package/src/api/presentation/annotate.ts +360 -0
- package/src/api/presentation/diagrams.ts +53 -8
- package/src/api/presentation/export.ts +104 -0
- package/src/api/presentation/index.ts +48 -3
- package/src/api/presentation/sheets.ts +346 -13
- package/src/api/presentation/views.ts +164 -12
- package/src/api/program/areas.ts +57 -6
- package/src/api/program/cores.ts +3 -91
- package/src/api/program/index.ts +2 -2
- package/src/api/program/layout.ts +182 -12
- package/src/api/program/site.ts +11 -8
- package/src/api/program/spreadsheet.ts +125 -29
- package/src/handles.ts +77 -13
- package/tsconfig.json +7 -2
|
@@ -5,12 +5,14 @@ import { PluginApiReturn } from "../../types";
|
|
|
5
5
|
*
|
|
6
6
|
* A **view** is a saved camera/plan: a sheet-ready 2D plan or a saved 3D view.
|
|
7
7
|
* A plugin can list and read views, capture them to images, activate one (move
|
|
8
|
-
* the camera to it), save the current camera as a new view,
|
|
9
|
-
* view's display settings (background, color
|
|
8
|
+
* the camera to it), save the current camera as a new view, rename or delete a
|
|
9
|
+
* saved view, and read/update a view's display settings (background, color
|
|
10
|
+
* mode, view mode, axis, edges, labels). Each view carries the `storey` it was
|
|
11
|
+
* saved on.
|
|
10
12
|
*
|
|
11
13
|
* `list`/`get`/`getActive`/`capture`/`getSettings` are reads;
|
|
12
|
-
* `setActive`/`create`/`updateSettings` are writes (a view is
|
|
13
|
-
* — not geometry).
|
|
14
|
+
* `setActive`/`create`/`rename`/`delete`/`updateSettings` are writes (a view is
|
|
15
|
+
* a camera bookmark — not geometry).
|
|
14
16
|
*
|
|
15
17
|
* Accessed via `snaptrude.presentation.views`.
|
|
16
18
|
*/
|
|
@@ -124,26 +126,34 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
124
126
|
* Creates a camera bookmark (not geometry) from where the camera is now.
|
|
125
127
|
*
|
|
126
128
|
* @param name - Name for the new view (a default is used when omitted).
|
|
127
|
-
* @param options - Optional `kind
|
|
129
|
+
* @param options - Optional `kind` (what kind of view to save, default
|
|
130
|
+
* `"view"`) and `storey` (save the view on a specific storey — the storey is
|
|
131
|
+
* activated first, matching the storey the view is captured on; when omitted
|
|
132
|
+
* the current active storey is used).
|
|
128
133
|
* @returns The newly created {@linkcode PluginPresentationView}.
|
|
129
|
-
* @throws If the view could
|
|
134
|
+
* @throws If `storey` is given but no such storey exists, or the view could
|
|
135
|
+
* not be saved.
|
|
130
136
|
*
|
|
131
137
|
* @examplePrompt Save the current view as Lobby Perspective
|
|
132
138
|
* @examplePrompt Create a new saved view from where I'm looking
|
|
133
139
|
* @examplePrompt Bookmark this camera angle
|
|
134
140
|
* @examplePrompt Save the current 2D plan as a view
|
|
141
|
+
* @examplePrompt Save a view on the second storey
|
|
135
142
|
*
|
|
136
143
|
* # Example
|
|
137
144
|
* ```ts
|
|
138
145
|
* const view = await snaptrude.presentation.views.create("Lobby")
|
|
146
|
+
* // …or capture the view on a specific storey
|
|
147
|
+
* const level2 = await snaptrude.presentation.views.create("Level 2", { storey: 2 })
|
|
139
148
|
* ```
|
|
140
149
|
*/
|
|
141
150
|
abstract create(name?: string, options?: {
|
|
142
151
|
kind?: "view" | "sitePlan";
|
|
152
|
+
storey?: number;
|
|
143
153
|
}): PluginApiReturn<PluginPresentationViewsCreateResult>;
|
|
144
154
|
/**
|
|
145
|
-
* Read a saved view's display settings (background, color mode,
|
|
146
|
-
* labels).
|
|
155
|
+
* Read a saved view's display settings (background, color mode, view mode,
|
|
156
|
+
* axis, edges, labels).
|
|
147
157
|
*
|
|
148
158
|
* @param viewId - The id of the view to read settings for.
|
|
149
159
|
* @returns The view's {@linkcode PluginPresentationViewSettings}, or `null` if
|
|
@@ -190,19 +200,30 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
190
200
|
* {@linkcode PluginPresentationViewsApi.getSettings}, so read-then-write
|
|
191
201
|
* round-trips a tag-based color scheme unchanged.
|
|
192
202
|
*
|
|
203
|
+
* `viewMode` (`"perspective"` | `"isometric"`) applies to **3D views only** —
|
|
204
|
+
* a 2D plan is always orthographic, so a `viewMode: "perspective"` patch on a
|
|
205
|
+
* 2D view is rejected. `"isometric"` on a 2D plan is accepted as a no-op (the
|
|
206
|
+
* plan is already orthographic), so writing back exactly what
|
|
207
|
+
* {@linkcode PluginPresentationViewsApi.getSettings} returned is always a
|
|
208
|
+
* no-op. On the active view the camera switches projection live (the same
|
|
209
|
+
* toggle the view-settings modal runs); on other views the mode is applied
|
|
210
|
+
* the next time the view is activated.
|
|
211
|
+
*
|
|
193
212
|
* @param viewId - The id of the view to update.
|
|
194
213
|
* @param settings - A partial {@linkcode PluginPresentationViewSettings}; any
|
|
195
214
|
* omitted field is left unchanged.
|
|
196
215
|
* @returns The updated view's `id`.
|
|
197
|
-
* @throws If writes are disabled, no view has the given id,
|
|
216
|
+
* @throws If writes are disabled, no view has the given id, the patch is
|
|
198
217
|
* contradictory (`showLabels: false` with a non-empty `labels`, or
|
|
199
|
-
* `showLabels: true` with an explicitly empty `labels` list)
|
|
218
|
+
* `showLabels: true` with an explicitly empty `labels` list), or
|
|
219
|
+
* `viewMode: "perspective"` is patched on a 2D plan view.
|
|
200
220
|
*
|
|
201
221
|
* @examplePrompt Switch this view to monochrome color mode
|
|
202
222
|
* @examplePrompt Turn off the axis in the Ground Floor view
|
|
203
223
|
* @examplePrompt Set the background of the active view to white
|
|
204
224
|
* @examplePrompt Show area labels on this view
|
|
205
225
|
* @examplePrompt Enable hidden-line mode for the section view
|
|
226
|
+
* @examplePrompt Make the 3D view orthographic instead of perspective
|
|
206
227
|
*
|
|
207
228
|
* # Example
|
|
208
229
|
* ```ts
|
|
@@ -210,9 +231,60 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
210
231
|
* colorMode: "monochrome",
|
|
211
232
|
* showAxis: false,
|
|
212
233
|
* })
|
|
234
|
+
* // switch a 3D view to an isometric (orthographic) projection
|
|
235
|
+
* await snaptrude.presentation.views.updateSettings("view_123", {
|
|
236
|
+
* viewMode: "isometric",
|
|
237
|
+
* })
|
|
213
238
|
* ```
|
|
214
239
|
*/
|
|
215
240
|
abstract updateSettings(viewId: string, settings: Partial<PluginPresentationViewSettings>): PluginApiReturn<PluginPresentationViewsUpdateSettingsResult>;
|
|
241
|
+
/**
|
|
242
|
+
* Rename a saved view.
|
|
243
|
+
*
|
|
244
|
+
* Sets the view's display name — the same label the views panel shows and
|
|
245
|
+
* that `list`/`get` read back. Names must be unique within the proposal and
|
|
246
|
+
* cannot contain the characters `\ : { } [ ] | ; < > ? ~`.
|
|
247
|
+
*
|
|
248
|
+
* @param viewId - The id of the view to rename.
|
|
249
|
+
* @param name - The new display name (non-empty after trimming).
|
|
250
|
+
* @returns The updated {@linkcode PluginPresentationView}.
|
|
251
|
+
* @throws If writes are disabled, no view has the given id, the name is
|
|
252
|
+
* empty/invalid, or another view in the proposal already has that name.
|
|
253
|
+
*
|
|
254
|
+
* @examplePrompt Rename the view Lobby to Entrance Lobby
|
|
255
|
+
* @examplePrompt Call this view Ground Floor Plan
|
|
256
|
+
* @examplePrompt Change the active view's name to Final
|
|
257
|
+
*
|
|
258
|
+
* # Example
|
|
259
|
+
* ```ts
|
|
260
|
+
* const view = await snaptrude.presentation.views.rename("view_123", "Entrance")
|
|
261
|
+
* ```
|
|
262
|
+
*/
|
|
263
|
+
abstract rename(viewId: string, name: string): PluginApiReturn<PluginPresentationViewsRenameResult>;
|
|
264
|
+
/**
|
|
265
|
+
* Delete a saved view.
|
|
266
|
+
*
|
|
267
|
+
* Removes the view from the project and the views panel (the panel's own
|
|
268
|
+
* delete action). If the deleted view was active, the product falls back to
|
|
269
|
+
* the default plan/3D view. Default views (the built-in plan/3D/site-plan
|
|
270
|
+
* entries) cannot be deleted.
|
|
271
|
+
*
|
|
272
|
+
* @param viewId - The id of the view to delete.
|
|
273
|
+
* @returns The id of the deleted view
|
|
274
|
+
* (a {@linkcode PluginPresentationViewsDeleteResult}).
|
|
275
|
+
* @throws If writes are disabled, no view has the given id, or the view is a
|
|
276
|
+
* default view.
|
|
277
|
+
*
|
|
278
|
+
* @examplePrompt Delete the view named Old Draft
|
|
279
|
+
* @examplePrompt Remove this saved view
|
|
280
|
+
* @examplePrompt Get rid of the Lobby camera bookmark
|
|
281
|
+
*
|
|
282
|
+
* # Example
|
|
283
|
+
* ```ts
|
|
284
|
+
* const { id } = await snaptrude.presentation.views.delete("view_123")
|
|
285
|
+
* ```
|
|
286
|
+
*/
|
|
287
|
+
abstract delete(viewId: string): PluginApiReturn<PluginPresentationViewsDeleteResult>;
|
|
216
288
|
}
|
|
217
289
|
/**
|
|
218
290
|
* The kind of a saved view: a 2D plan view or a 3D view.
|
|
@@ -231,6 +303,7 @@ export type PluginPresentationViewType = z.infer<typeof PluginPresentationViewTy
|
|
|
231
303
|
* | `name` | `string` | Display name |
|
|
232
304
|
* | `type` | `"2d" \| "3d"` | Whether this is a 2D plan view or a 3D view |
|
|
233
305
|
* | `isActive` | `boolean` | Whether this view is the currently active view |
|
|
306
|
+
* | `storey` | `number \| null` | The storey this view was saved on (`null` on older views saved without one) |
|
|
234
307
|
*/
|
|
235
308
|
export declare const PluginPresentationView: z.ZodObject<{
|
|
236
309
|
id: z.ZodString;
|
|
@@ -240,6 +313,7 @@ export declare const PluginPresentationView: z.ZodObject<{
|
|
|
240
313
|
"3d": "3d";
|
|
241
314
|
}>;
|
|
242
315
|
isActive: z.ZodBoolean;
|
|
316
|
+
storey: z.ZodNullable<z.ZodNumber>;
|
|
243
317
|
}, z.core.$strip>;
|
|
244
318
|
export type PluginPresentationView = z.infer<typeof PluginPresentationView>;
|
|
245
319
|
/**
|
|
@@ -258,6 +332,7 @@ export declare const PluginPresentationViewsListResult: z.ZodObject<{
|
|
|
258
332
|
"3d": "3d";
|
|
259
333
|
}>;
|
|
260
334
|
isActive: z.ZodBoolean;
|
|
335
|
+
storey: z.ZodNullable<z.ZodNumber>;
|
|
261
336
|
}, z.core.$strip>>;
|
|
262
337
|
}, z.core.$strip>;
|
|
263
338
|
export type PluginPresentationViewsListResult = z.infer<typeof PluginPresentationViewsListResult>;
|
|
@@ -285,6 +360,7 @@ export declare const PluginPresentationViewsGetResult: z.ZodNullable<z.ZodObject
|
|
|
285
360
|
"3d": "3d";
|
|
286
361
|
}>;
|
|
287
362
|
isActive: z.ZodBoolean;
|
|
363
|
+
storey: z.ZodNullable<z.ZodNumber>;
|
|
288
364
|
}, z.core.$strip>>;
|
|
289
365
|
export type PluginPresentationViewsGetResult = z.infer<typeof PluginPresentationViewsGetResult>;
|
|
290
366
|
/** Image format for {@linkcode PluginPresentationViewsApi.capture}. */
|
|
@@ -345,6 +421,7 @@ export type PluginPresentationViewsSetActiveResult = z.infer<typeof PluginPresen
|
|
|
345
421
|
* |---|---|---|
|
|
346
422
|
* | `name` | `string \| undefined` | Name for the new view (a default is used when omitted) |
|
|
347
423
|
* | `kind` | `"view" \| "sitePlan" \| undefined` | What kind of view to save (default `"view"`). `"plan"` is not offered — the host cannot create a plan view without a `planId` this API does not carry. |
|
|
424
|
+
* | `storey` | `number \| undefined` | Save the view on this storey (activated before capture); defaults to the current active storey |
|
|
348
425
|
*/
|
|
349
426
|
export declare const PluginPresentationViewsCreateArgs: z.ZodObject<{
|
|
350
427
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -352,6 +429,7 @@ export declare const PluginPresentationViewsCreateArgs: z.ZodObject<{
|
|
|
352
429
|
view: "view";
|
|
353
430
|
sitePlan: "sitePlan";
|
|
354
431
|
}>>;
|
|
432
|
+
storey: z.ZodOptional<z.ZodNumber>;
|
|
355
433
|
}, z.core.$strip>;
|
|
356
434
|
export type PluginPresentationViewsCreateArgs = z.infer<typeof PluginPresentationViewsCreateArgs>;
|
|
357
435
|
/** Result of {@linkcode PluginPresentationViewsApi.create} — the saved view. */
|
|
@@ -363,6 +441,7 @@ export declare const PluginPresentationViewsCreateResult: z.ZodObject<{
|
|
|
363
441
|
"3d": "3d";
|
|
364
442
|
}>;
|
|
365
443
|
isActive: z.ZodBoolean;
|
|
444
|
+
storey: z.ZodNullable<z.ZodNumber>;
|
|
366
445
|
}, z.core.$strip>;
|
|
367
446
|
export type PluginPresentationViewsCreateResult = z.infer<typeof PluginPresentationViewsCreateResult>;
|
|
368
447
|
/**
|
|
@@ -400,6 +479,22 @@ export declare const PluginPresentationViewLabel: z.ZodEnum<{
|
|
|
400
479
|
areas: "areas";
|
|
401
480
|
}>;
|
|
402
481
|
export type PluginPresentationViewLabel = z.infer<typeof PluginPresentationViewLabel>;
|
|
482
|
+
/**
|
|
483
|
+
* A view's camera projection: perspective, or isometric (orthographic).
|
|
484
|
+
*
|
|
485
|
+
* | Value | Meaning |
|
|
486
|
+
* |---|---|
|
|
487
|
+
* | `perspective` | Perspective projection (vanishing points) |
|
|
488
|
+
* | `isometric` | Orthographic projection (no perspective distortion) |
|
|
489
|
+
*
|
|
490
|
+
* Applies to 3D views; a 2D plan view is always orthographic and reads
|
|
491
|
+
* `"isometric"`.
|
|
492
|
+
*/
|
|
493
|
+
export declare const PluginPresentationViewMode: z.ZodEnum<{
|
|
494
|
+
perspective: "perspective";
|
|
495
|
+
isometric: "isometric";
|
|
496
|
+
}>;
|
|
497
|
+
export type PluginPresentationViewMode = z.infer<typeof PluginPresentationViewMode>;
|
|
403
498
|
/**
|
|
404
499
|
* A view's display settings.
|
|
405
500
|
*
|
|
@@ -407,6 +502,7 @@ export type PluginPresentationViewLabel = z.infer<typeof PluginPresentationViewL
|
|
|
407
502
|
* |---|---|---|
|
|
408
503
|
* | `backgroundColor` | `string` | Canvas background as a hex color (e.g. `#ffffff`) |
|
|
409
504
|
* | `colorMode` | {@linkcode PluginPresentationViewColorMode} | How the scene is colored (including `tag:<categoryId>` schemes) |
|
|
505
|
+
* | `viewMode` | {@linkcode PluginPresentationViewMode} | Camera projection — `"perspective"` or `"isometric"` (orthographic). Writable on 3D views only; a 2D plan always reads `"isometric"` and accepts only `"isometric"` (a no-op) |
|
|
410
506
|
* | `showAxis` | `boolean` | Whether the X/Y/Z axes are shown |
|
|
411
507
|
* | `showEdges` | `boolean` | Whether edges are shown; `false` = hidden-line rendering |
|
|
412
508
|
* | `showLabels` | `boolean` | Master label switch — whether on-canvas labels are shown at all. `true` always pairs with a non-empty `labels` selection (labels render only while the selection is non-empty; there is no labels-on-with-empty-selection state) |
|
|
@@ -419,6 +515,10 @@ export declare const PluginPresentationViewSettings: z.ZodObject<{
|
|
|
419
515
|
monochrome: "monochrome";
|
|
420
516
|
texture: "texture";
|
|
421
517
|
}>, z.ZodTemplateLiteral<`tag:${string}`>]>;
|
|
518
|
+
viewMode: z.ZodEnum<{
|
|
519
|
+
perspective: "perspective";
|
|
520
|
+
isometric: "isometric";
|
|
521
|
+
}>;
|
|
422
522
|
showAxis: z.ZodBoolean;
|
|
423
523
|
showEdges: z.ZodBoolean;
|
|
424
524
|
showLabels: z.ZodBoolean;
|
|
@@ -451,6 +551,10 @@ export declare const PluginPresentationViewsGetSettingsResult: z.ZodNullable<z.Z
|
|
|
451
551
|
monochrome: "monochrome";
|
|
452
552
|
texture: "texture";
|
|
453
553
|
}>, z.ZodTemplateLiteral<`tag:${string}`>]>;
|
|
554
|
+
viewMode: z.ZodEnum<{
|
|
555
|
+
perspective: "perspective";
|
|
556
|
+
isometric: "isometric";
|
|
557
|
+
}>;
|
|
454
558
|
showAxis: z.ZodBoolean;
|
|
455
559
|
showEdges: z.ZodBoolean;
|
|
456
560
|
showLabels: z.ZodBoolean;
|
|
@@ -482,6 +586,10 @@ export declare const PluginPresentationViewsUpdateSettingsArgs: z.ZodObject<{
|
|
|
482
586
|
monochrome: "monochrome";
|
|
483
587
|
texture: "texture";
|
|
484
588
|
}>, z.ZodTemplateLiteral<`tag:${string}`>]>>;
|
|
589
|
+
viewMode: z.ZodOptional<z.ZodEnum<{
|
|
590
|
+
perspective: "perspective";
|
|
591
|
+
isometric: "isometric";
|
|
592
|
+
}>>;
|
|
485
593
|
showAxis: z.ZodOptional<z.ZodBoolean>;
|
|
486
594
|
showEdges: z.ZodOptional<z.ZodBoolean>;
|
|
487
595
|
showLabels: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -498,4 +606,51 @@ export declare const PluginPresentationViewsUpdateSettingsResult: z.ZodObject<{
|
|
|
498
606
|
id: z.ZodString;
|
|
499
607
|
}, z.core.$strip>;
|
|
500
608
|
export type PluginPresentationViewsUpdateSettingsResult = z.infer<typeof PluginPresentationViewsUpdateSettingsResult>;
|
|
609
|
+
/**
|
|
610
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.rename}.
|
|
611
|
+
*
|
|
612
|
+
* | Property | Type | Description |
|
|
613
|
+
* |---|---|---|
|
|
614
|
+
* | `id` | `string` | The id of the view to rename |
|
|
615
|
+
* | `name` | `string` | New display name (non-empty after trimming) |
|
|
616
|
+
*/
|
|
617
|
+
export declare const PluginPresentationViewsRenameArgs: z.ZodObject<{
|
|
618
|
+
id: z.ZodString;
|
|
619
|
+
name: z.ZodString;
|
|
620
|
+
}, z.core.$strip>;
|
|
621
|
+
export type PluginPresentationViewsRenameArgs = z.infer<typeof PluginPresentationViewsRenameArgs>;
|
|
622
|
+
/** Result of {@linkcode PluginPresentationViewsApi.rename} — the renamed view. */
|
|
623
|
+
export declare const PluginPresentationViewsRenameResult: z.ZodObject<{
|
|
624
|
+
id: z.ZodString;
|
|
625
|
+
name: z.ZodString;
|
|
626
|
+
type: z.ZodEnum<{
|
|
627
|
+
"2d": "2d";
|
|
628
|
+
"3d": "3d";
|
|
629
|
+
}>;
|
|
630
|
+
isActive: z.ZodBoolean;
|
|
631
|
+
storey: z.ZodNullable<z.ZodNumber>;
|
|
632
|
+
}, z.core.$strip>;
|
|
633
|
+
export type PluginPresentationViewsRenameResult = z.infer<typeof PluginPresentationViewsRenameResult>;
|
|
634
|
+
/**
|
|
635
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.delete}.
|
|
636
|
+
*
|
|
637
|
+
* | Property | Type | Description |
|
|
638
|
+
* |---|---|---|
|
|
639
|
+
* | `id` | `string` | The id of the view to delete |
|
|
640
|
+
*/
|
|
641
|
+
export declare const PluginPresentationViewsDeleteArgs: z.ZodObject<{
|
|
642
|
+
id: z.ZodString;
|
|
643
|
+
}, z.core.$strip>;
|
|
644
|
+
export type PluginPresentationViewsDeleteArgs = z.infer<typeof PluginPresentationViewsDeleteArgs>;
|
|
645
|
+
/**
|
|
646
|
+
* Result of {@linkcode PluginPresentationViewsApi.delete}.
|
|
647
|
+
*
|
|
648
|
+
* | Property | Type | Description |
|
|
649
|
+
* |---|---|---|
|
|
650
|
+
* | `id` | `string` | Id of the deleted view |
|
|
651
|
+
*/
|
|
652
|
+
export declare const PluginPresentationViewsDeleteResult: z.ZodObject<{
|
|
653
|
+
id: z.ZodString;
|
|
654
|
+
}, z.core.$strip>;
|
|
655
|
+
export type PluginPresentationViewsDeleteResult = z.infer<typeof PluginPresentationViewsDeleteResult>;
|
|
501
656
|
//# sourceMappingURL=views.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/views.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C
|
|
1
|
+
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/views.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;;;GAeG;AACH,8BAAsB,0BAA0B;;IAG9C;;;;;;;;;;;;;;;;;;OAkBG;aACa,IAAI,IAAI,eAAe,CAAC,iCAAiC,CAAC;IAE1E;;;;;;;;;;;;;;;OAeG;aACa,GAAG,CACjB,MAAM,EAAE,MAAM,GACb,eAAe,CAAC,gCAAgC,CAAC;IAEpD;;;;;;;;;;;;;;OAcG;aACa,SAAS,IAAI,eAAe,CAAC,gCAAgC,CAAC;IAE9E;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,OAAO,CAAC,OAAO,CAAC,EAAE;QAChC,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM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AAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAC7D,OAAO,yCAAyC,CACjD,CAAA;AAED,+FAA+F;AAC/F,eAAO,MAAM,2CAA2C;;iBAEtD,CAAA;AACF,MAAM,MAAM,2CAA2C,GAAG,CAAC,CAAC,KAAK,CAC/D,OAAO,2CAA2C,CACnD,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iCAAiC;;;iBAG5C,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA;AAED,kFAAkF;AAClF,eAAO,MAAM,mCAAmC;;;;;;;;;iBAAyB,CAAA;AACzE,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC;;iBAE5C,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC;;iBAE9C,CAAA;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA"}
|
|
@@ -26,9 +26,14 @@ import { ComponentHandle } from "../../handles";
|
|
|
26
26
|
* PluginProgramAreasApi.update}); the two are the same ratio, one measured and
|
|
27
27
|
* one intended. The surface speaks **FAR only** — there is no FSI alias.
|
|
28
28
|
*
|
|
29
|
-
* Reads return plain records and never throw.
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* Reads return plain records and never throw. Because the engine only recomputes
|
|
30
|
+
* the breakdown live while the Area sidebar is open, a headless plugin should call
|
|
31
|
+
* {@linkcode PluginProgramAreasApi.refresh} first to guarantee the reads are fresh.
|
|
32
|
+
* The only write — {@linkcode PluginProgramAreasApi.update} — is a non-undoable
|
|
33
|
+
* settings write for the FAR inputs. With an active design option (proposal),
|
|
34
|
+
* those inputs are per-option: `update` writes and the reads report the active
|
|
35
|
+
* option's own target FAR / site area / deviation, matching the product's Area
|
|
36
|
+
* settings dialog.
|
|
32
37
|
*
|
|
33
38
|
* Accessed via `snaptrude.program.areas`.
|
|
34
39
|
*/
|
|
@@ -115,6 +120,13 @@ export declare abstract class PluginProgramAreasApi {
|
|
|
115
120
|
* area, and the allowed deviation. This is a **non-undoable settings write**
|
|
116
121
|
* (persisted with the project). `achievedFar` recomputes from these.
|
|
117
122
|
*
|
|
123
|
+
* **Design options:** when a design option (proposal) is active, the FAR
|
|
124
|
+
* inputs are **scoped to that design option** — exactly like the product's
|
|
125
|
+
* Area settings dialog. `update` writes the active option's settings (each
|
|
126
|
+
* option keeps its own target FAR / site area / deviation) and the reads
|
|
127
|
+
* ({@linkcode PluginProgramAreasApi.get} etc.) report that same scope.
|
|
128
|
+
* Without design options there is a single project-wide set of FAR inputs.
|
|
129
|
+
*
|
|
118
130
|
* @param options - Any of `targetFar`, `siteArea`, `deviation`; omitted fields
|
|
119
131
|
* are left unchanged.
|
|
120
132
|
* @returns The recomputed {@linkcode PluginProgramAreaSummary}.
|
|
@@ -135,6 +147,33 @@ export declare abstract class PluginProgramAreasApi {
|
|
|
135
147
|
siteArea?: number;
|
|
136
148
|
deviation?: number;
|
|
137
149
|
}): PluginApiReturn<PluginProgramAreasUpdateResult>;
|
|
150
|
+
/**
|
|
151
|
+
* Force the area breakdown to recompute, then return the fresh summary.
|
|
152
|
+
*
|
|
153
|
+
* The engine recomputes the carpet / built-up / FAR totals live **only while the
|
|
154
|
+
* Area sidebar is open**. A plugin running with the sidebar closed can therefore
|
|
155
|
+
* read a stale — or never-computed — snapshot from {@linkcode
|
|
156
|
+
* PluginProgramAreasApi.get} / {@linkcode PluginProgramAreasApi.list}. Call
|
|
157
|
+
* `refresh` first to guarantee those reads reflect the current model. It is a
|
|
158
|
+
* read (no write gate) — it recomputes derived totals, it does not change the model.
|
|
159
|
+
*
|
|
160
|
+
* **Cost:** a full pass over every space, floor and mass in the active structure.
|
|
161
|
+
* Not free on large models — call it once before a batch of reads, not per read.
|
|
162
|
+
*
|
|
163
|
+
* @returns The freshly-recomputed {@linkcode PluginProgramAreaSummary}.
|
|
164
|
+
*
|
|
165
|
+
* @examplePrompt Recompute the area totals before I read them
|
|
166
|
+
* @examplePrompt Refresh the FAR numbers
|
|
167
|
+
* @examplePrompt Make sure the area breakdown is up to date
|
|
168
|
+
*
|
|
169
|
+
* # Example
|
|
170
|
+
* ```ts
|
|
171
|
+
* const s = await snaptrude.program.areas.refresh()
|
|
172
|
+
* const { groups } = await snaptrude.program.areas.list("storeys") // now fresh
|
|
173
|
+
* console.log(s.builtUp, groups.length)
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
abstract refresh(): PluginApiReturn<PluginProgramAreasRefreshResult>;
|
|
138
177
|
}
|
|
139
178
|
/**
|
|
140
179
|
* The whole-program area / FAR summary. All area figures are in `areaUnit`;
|
|
@@ -387,4 +426,25 @@ export declare const PluginProgramAreasUpdateResult: z.ZodObject<{
|
|
|
387
426
|
}>;
|
|
388
427
|
}, z.core.$strip>;
|
|
389
428
|
export type PluginProgramAreasUpdateResult = z.infer<typeof PluginProgramAreasUpdateResult>;
|
|
429
|
+
/**
|
|
430
|
+
* Result of {@linkcode PluginProgramAreasApi.refresh} — the freshly-recomputed
|
|
431
|
+
* program area summary.
|
|
432
|
+
*/
|
|
433
|
+
export declare const PluginProgramAreasRefreshResult: z.ZodObject<{
|
|
434
|
+
count: z.ZodNumber;
|
|
435
|
+
hiddenCount: z.ZodNumber;
|
|
436
|
+
carpet: z.ZodNumber;
|
|
437
|
+
builtUp: z.ZodNumber;
|
|
438
|
+
excluded: z.ZodNumber;
|
|
439
|
+
farBuiltUp: z.ZodNumber;
|
|
440
|
+
siteArea: z.ZodNumber;
|
|
441
|
+
achievedFar: z.ZodNullable<z.ZodNumber>;
|
|
442
|
+
targetFar: z.ZodNumber;
|
|
443
|
+
deviation: z.ZodNumber;
|
|
444
|
+
areaUnit: z.ZodEnum<{
|
|
445
|
+
ft2: "ft2";
|
|
446
|
+
m2: "m2";
|
|
447
|
+
}>;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
export type PluginProgramAreasRefreshResult = z.infer<typeof PluginProgramAreasRefreshResult>;
|
|
390
450
|
//# sourceMappingURL=areas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"areas.d.ts","sourceRoot":"","sources":["../../../src/api/program/areas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C
|
|
1
|
+
{"version":3,"file":"areas.d.ts","sourceRoot":"","sources":["../../../src/api/program/areas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;;;;;;;OAqBG;aACa,GAAG,IAAI,eAAe,CAAC,2BAA2B,CAAC;IAEnE;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,IAAI,CAClB,OAAO,EAAE,wBAAwB,EACjC,UAAU,CAAC,EAAE,MAAM,GAClB,eAAe,CAAC,4BAA4B,CAAC;IAEhD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;aACa,WAAW,CACzB,OAAO,EAAE,wBAAwB,EACjC,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,GAClB,eAAe,CAAC,mCAAmC,CAAC;IAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;aACa,M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;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;iBAEvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;iBAQ1C,CAAA;AACJ,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;iBAE9C,CAAA;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B;;;;iBAIvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;iBAA2B,CAAA;AACtE,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;iBAA2B,CAAA;AACvE,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,+BAA+B,CACvC,CAAA"}
|
|
@@ -4,13 +4,9 @@ import { PluginApiReturn } from "../../types";
|
|
|
4
4
|
* Program cores — the building's vertical-circulation cores (lift / stair / shaft
|
|
5
5
|
* shells).
|
|
6
6
|
*
|
|
7
|
-
* Read the cores in the scene
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* core geometry itself is owned by the geometry layer, not here (the exact
|
|
11
|
-
* layout ↔ engine payload is coordinated with the geometry owner).
|
|
12
|
-
*
|
|
13
|
-
* `list`/`isCore` are reads; `create` triggers generation.
|
|
7
|
+
* Read the cores in the scene and test whether a space is a core. Both are reads;
|
|
8
|
+
* there is no core-generation trigger on this surface (core geometry is owned by
|
|
9
|
+
* the geometry layer, not here).
|
|
14
10
|
*
|
|
15
11
|
* Accessed via `snaptrude.program.cores`.
|
|
16
12
|
*/
|
|
@@ -49,33 +45,6 @@ export declare abstract class PluginProgramCoresApi {
|
|
|
49
45
|
* ```
|
|
50
46
|
*/
|
|
51
47
|
abstract isCore(id: string): PluginApiReturn<boolean>;
|
|
52
|
-
/**
|
|
53
|
-
* Generate core geometry from a layout (thin trigger).
|
|
54
|
-
*
|
|
55
|
-
* Hands the core layout to the core-generation engine and returns how many core
|
|
56
|
-
* elements were created. The geometry is authored by the engine, not here.
|
|
57
|
-
* _(Authored ahead — optional until the host's geometry adapter lands; the
|
|
58
|
-
* reads {@linkcode PluginProgramCoresApi.list}/{@linkcode PluginProgramCoresApi.isCore}
|
|
59
|
-
* are live.)_
|
|
60
|
-
*
|
|
61
|
-
* @param cores - The {@linkcode PluginProgramCoreSpec} layout of cores to
|
|
62
|
-
* generate.
|
|
63
|
-
* @param lengthUnit - Unit of the spec dimensions (default project unit).
|
|
64
|
-
* @returns A {@linkcode PluginProgramCoresCreateResult} with the created count.
|
|
65
|
-
* @throws If the layout could not be realized.
|
|
66
|
-
*
|
|
67
|
-
* @examplePrompt Generate the building cores from this layout
|
|
68
|
-
* @examplePrompt Place the elevator and stair cores
|
|
69
|
-
* @examplePrompt Create the service core shells
|
|
70
|
-
*
|
|
71
|
-
* # Example
|
|
72
|
-
* ```ts
|
|
73
|
-
* await snaptrude.program.cores.create([
|
|
74
|
-
* { type: "lift", position: { x: 0, y: 0, z: 0 }, width: 3, depth: 4 },
|
|
75
|
-
* ])
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
|
-
create?: (cores: PluginProgramCoreSpec[], lengthUnit?: "mm" | "m" | "ft") => PluginApiReturn<PluginProgramCoresCreateResult>;
|
|
79
48
|
}
|
|
80
49
|
/**
|
|
81
50
|
* A circulation core element in the building.
|
|
@@ -106,69 +75,4 @@ export declare const PluginProgramCoresIsCoreArgs: z.ZodObject<{
|
|
|
106
75
|
id: z.ZodString;
|
|
107
76
|
}, z.core.$strip>;
|
|
108
77
|
export type PluginProgramCoresIsCoreArgs = z.infer<typeof PluginProgramCoresIsCoreArgs>;
|
|
109
|
-
/**
|
|
110
|
-
* One core to generate. The geometry layer interprets this layout (the exact
|
|
111
|
-
* fields are coordinated with the geometry owner).
|
|
112
|
-
*
|
|
113
|
-
* | Property | Type | Description |
|
|
114
|
-
* |---|---|---|
|
|
115
|
-
* | `type` | `string \| undefined` | Core kind (e.g. `"lift"`, `"stair"`, `"shaft"`) |
|
|
116
|
-
* | `position` | `{ x; y; z }` | Base position of the core |
|
|
117
|
-
* | `width` | `number` | Core width, in `lengthUnit` |
|
|
118
|
-
* | `depth` | `number` | Core depth, in `lengthUnit` |
|
|
119
|
-
* | `fromStorey` | `number \| undefined` | First storey the core spans |
|
|
120
|
-
* | `toStorey` | `number \| undefined` | Last storey the core spans |
|
|
121
|
-
*/
|
|
122
|
-
export declare const PluginProgramCoreSpec: z.ZodObject<{
|
|
123
|
-
type: z.ZodOptional<z.ZodString>;
|
|
124
|
-
position: z.ZodObject<{
|
|
125
|
-
x: z.ZodNumber;
|
|
126
|
-
y: z.ZodNumber;
|
|
127
|
-
z: z.ZodNumber;
|
|
128
|
-
}, z.core.$strip>;
|
|
129
|
-
width: z.ZodNumber;
|
|
130
|
-
depth: z.ZodNumber;
|
|
131
|
-
fromStorey: z.ZodOptional<z.ZodNumber>;
|
|
132
|
-
toStorey: z.ZodOptional<z.ZodNumber>;
|
|
133
|
-
}, z.core.$strip>;
|
|
134
|
-
export type PluginProgramCoreSpec = z.infer<typeof PluginProgramCoreSpec>;
|
|
135
|
-
/**
|
|
136
|
-
* Arguments for {@linkcode PluginProgramCoresApi.create}.
|
|
137
|
-
*
|
|
138
|
-
* | Property | Type | Description |
|
|
139
|
-
* |---|---|---|
|
|
140
|
-
* | `cores` | {@linkcode PluginProgramCoreSpec}`[]` | The cores to generate |
|
|
141
|
-
* | `lengthUnit` | `"mm" \| "m" \| "ft" \| undefined` | Unit of the spec dimensions (default project unit) |
|
|
142
|
-
*/
|
|
143
|
-
export declare const PluginProgramCoresCreateArgs: z.ZodObject<{
|
|
144
|
-
cores: z.ZodArray<z.ZodObject<{
|
|
145
|
-
type: z.ZodOptional<z.ZodString>;
|
|
146
|
-
position: z.ZodObject<{
|
|
147
|
-
x: z.ZodNumber;
|
|
148
|
-
y: z.ZodNumber;
|
|
149
|
-
z: z.ZodNumber;
|
|
150
|
-
}, z.core.$strip>;
|
|
151
|
-
width: z.ZodNumber;
|
|
152
|
-
depth: z.ZodNumber;
|
|
153
|
-
fromStorey: z.ZodOptional<z.ZodNumber>;
|
|
154
|
-
toStorey: z.ZodOptional<z.ZodNumber>;
|
|
155
|
-
}, z.core.$strip>>;
|
|
156
|
-
lengthUnit: z.ZodOptional<z.ZodEnum<{
|
|
157
|
-
ft: "ft";
|
|
158
|
-
m: "m";
|
|
159
|
-
mm: "mm";
|
|
160
|
-
}>>;
|
|
161
|
-
}, z.core.$strip>;
|
|
162
|
-
export type PluginProgramCoresCreateArgs = z.infer<typeof PluginProgramCoresCreateArgs>;
|
|
163
|
-
/**
|
|
164
|
-
* Result of {@linkcode PluginProgramCoresApi.create}.
|
|
165
|
-
*
|
|
166
|
-
* | Property | Type | Description |
|
|
167
|
-
* |---|---|---|
|
|
168
|
-
* | `createdCount` | `number` | Number of core elements created |
|
|
169
|
-
*/
|
|
170
|
-
export declare const PluginProgramCoresCreateResult: z.ZodObject<{
|
|
171
|
-
createdCount: z.ZodNumber;
|
|
172
|
-
}, z.core.$strip>;
|
|
173
|
-
export type PluginProgramCoresCreateResult = z.infer<typeof PluginProgramCoresCreateResult>;
|
|
174
78
|
//# sourceMappingURL=cores.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cores.d.ts","sourceRoot":"","sources":["../../../src/api/program/cores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C
|
|
1
|
+
{"version":3,"file":"cores.d.ts","sourceRoot":"","sources":["../../../src/api/program/cores.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;GASG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;OAeG;aACa,IAAI,IAAI,eAAe,CAAC,4BAA4B,CAAC;IAErE;;;;;;;;;;;;;;OAcG;aACa,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC;CAC7D;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE,wDAAwD;AACxD,eAAO,MAAM,4BAA4B;;;;;;iBAEvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED,8DAA8D;AAC9D,eAAO,MAAM,4BAA4B;;iBAEvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA"}
|
|
@@ -23,7 +23,7 @@ import { PluginProgramAreasApi } from "./areas";
|
|
|
23
23
|
* - {@linkcode PluginProgramApi.areas} — FAR / built-up-area rollup and groupings
|
|
24
24
|
* - {@linkcode PluginProgramApi.spreadsheet} — Render program data to sheets and read it back
|
|
25
25
|
* - {@linkcode PluginProgramApi.site} — Read the site/plot planning context
|
|
26
|
-
* - {@linkcode PluginProgramApi.cores} — Read &
|
|
26
|
+
* - {@linkcode PluginProgramApi.cores} — Read & predicate vertical-circulation cores (reads only)
|
|
27
27
|
* - {@linkcode PluginProgramApi.classification} — Classification catalog + display tags
|
|
28
28
|
*
|
|
29
29
|
* Accessed via `snaptrude.program`.
|
|
@@ -43,7 +43,7 @@ export declare abstract class PluginProgramApi {
|
|
|
43
43
|
abstract spreadsheet: PluginProgramSpreadsheetApi;
|
|
44
44
|
/** Site/plot planning context — total area, parcel footprints, geo rings. See {@linkcode PluginProgramSiteApi}. */
|
|
45
45
|
abstract site: PluginProgramSiteApi;
|
|
46
|
-
/** Vertical-circulation cores — read & predicate (
|
|
46
|
+
/** Vertical-circulation cores — read & predicate (reads only). See {@linkcode PluginProgramCoresApi}. */
|
|
47
47
|
abstract cores: PluginProgramCoresApi;
|
|
48
48
|
/** Classification catalog (space/area/mass types) + display tags. See {@linkcode PluginProgramClassificationApi}. */
|
|
49
49
|
abstract classification: PluginProgramClassificationApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/program/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,8BAAsB,gBAAgB;IACpC,wHAAwH;IACxH,SAAg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