@snaptrude/plugin-core 0.5.0 → 0.7.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 +73 -0
- package/api-manifest.full.json +2644 -542
- package/api-manifest.json +2606 -424
- package/dist/api/analysis/heatmaps.d.ts +234 -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 +44 -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/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/core/index.d.ts +10 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +392 -0
- package/dist/api/core/io/import/index.d.ts.map +1 -0
- package/dist/api/core/io/index.d.ts +35 -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 +206 -0
- package/dist/api/core/io/terrain/index.d.ts.map +1 -0
- package/dist/api/core/io/underlay/index.d.ts +286 -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/proposals/index.d.ts +475 -0
- package/dist/api/core/proposals/index.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +218 -0
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +159 -0
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/furniture/index.d.ts +34 -5
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +83 -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 +159 -2
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +115 -5
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +3 -3
- 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 +83 -2
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +168 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- 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/space.d.ts +2 -2
- package/dist/api/entity/story.d.ts +101 -7
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +5 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/import.d.ts +49 -4
- package/dist/api/presentation/import.d.ts.map +1 -1
- package/dist/api/presentation/views.d.ts +210 -5
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/program/areas.d.ts +42 -12
- package/dist/api/program/areas.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +3 -11
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/layout.d.ts +186 -11
- package/dist/api/program/layout.d.ts.map +1 -1
- package/dist/api/program/site.d.ts +84 -0
- package/dist/api/program/site.d.ts.map +1 -1
- 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 +33 -0
- 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 +1942 -998
- 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 +1810 -994
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/scripts/generate-manifest.test.mjs +103 -4
- package/src/api/analysis/heatmaps.ts +256 -0
- package/src/api/analysis/illuminance.ts +155 -0
- package/src/api/analysis/index.ts +46 -0
- package/src/api/analysis/shadows.ts +183 -0
- package/src/api/analysis/sunlightHours.ts +211 -0
- package/src/api/analysis/sunpath.ts +83 -0
- package/src/api/core/index.ts +10 -0
- package/src/api/core/io/import/index.ts +432 -0
- package/src/api/core/io/index.ts +37 -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 +214 -0
- package/src/api/core/io/underlay/index.ts +295 -0
- package/src/api/core/proposals/index.ts +509 -0
- package/src/api/design/create/index.ts +258 -0
- package/src/api/design/doors/index.ts +168 -0
- package/src/api/design/erase/index.ts +1 -1
- package/src/api/design/furniture/index.ts +36 -5
- package/src/api/design/index.ts +87 -0
- package/src/api/design/lock.ts +27 -0
- package/src/api/design/materials/index.ts +182 -2
- package/src/api/design/query/index.ts +81 -0
- package/src/api/design/selection/index.ts +129 -0
- package/src/api/design/transform/index.ts +74 -2
- package/src/api/design/update/index.ts +167 -0
- package/src/api/design/windows/index.ts +128 -2
- package/src/api/entity/story.ts +105 -7
- package/src/api/index.ts +5 -0
- package/src/api/presentation/import.ts +45 -4
- package/src/api/presentation/views.ts +221 -5
- package/src/api/program/areas.ts +34 -12
- package/src/api/program/index.ts +3 -11
- package/src/api/program/layout.ts +195 -11
- package/src/api/program/site.ts +93 -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 +46 -0
- package/src/host-utils.ts +4 -0
- package/src/index.ts +1 -0
- package/test/errors.test.mjs +184 -0
|
@@ -6,12 +6,12 @@ import { PluginApiReturn } from "../../types"
|
|
|
6
6
|
*
|
|
7
7
|
* A **view** is a saved camera/plan: a sheet-ready 2D plan or a saved 3D view.
|
|
8
8
|
* A plugin can list and read views, capture them to images, activate one (move
|
|
9
|
-
* the camera to it),
|
|
9
|
+
* the camera to it), save the current camera as a new view, and read/update a
|
|
10
|
+
* view's display settings (background, color mode, axis, edges, labels).
|
|
10
11
|
*
|
|
11
|
-
* `list`/`get`/`getActive`/`capture` are reads;
|
|
12
|
-
* (a view is a camera bookmark
|
|
13
|
-
*
|
|
14
|
-
* live discovery surface until the host lands them.
|
|
12
|
+
* `list`/`get`/`getActive`/`capture`/`getSettings` are reads;
|
|
13
|
+
* `setActive`/`create`/`updateSettings` are writes (a view is a camera bookmark
|
|
14
|
+
* — not geometry).
|
|
15
15
|
*
|
|
16
16
|
* Accessed via `snaptrude.presentation.views`.
|
|
17
17
|
*/
|
|
@@ -153,6 +153,85 @@ export abstract class PluginPresentationViewsApi {
|
|
|
153
153
|
name?: string,
|
|
154
154
|
options?: { kind?: "view" | "sitePlan" },
|
|
155
155
|
): PluginApiReturn<PluginPresentationViewsCreateResult>
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Read a saved view's display settings (background, color mode, axis, edges,
|
|
159
|
+
* labels).
|
|
160
|
+
*
|
|
161
|
+
* @param viewId - The id of the view to read settings for.
|
|
162
|
+
* @returns The view's {@linkcode PluginPresentationViewSettings}, or `null` if
|
|
163
|
+
* no view has that id.
|
|
164
|
+
*
|
|
165
|
+
* @examplePrompt What color mode is the Ground Floor view using?
|
|
166
|
+
* @examplePrompt Get the display settings for this view
|
|
167
|
+
* @examplePrompt Does the site plan view show axes and labels?
|
|
168
|
+
* @examplePrompt Read the background color of the active view
|
|
169
|
+
*
|
|
170
|
+
* # Example
|
|
171
|
+
* ```ts
|
|
172
|
+
* const settings = await snaptrude.presentation.views.getSettings("view_123")
|
|
173
|
+
* if (settings) console.log(settings.colorMode, settings.backgroundColor)
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
public abstract getSettings(
|
|
177
|
+
viewId: string,
|
|
178
|
+
): PluginApiReturn<PluginPresentationViewsGetSettingsResult>
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Update a saved view's display settings (partial patch — only the fields you
|
|
182
|
+
* pass change).
|
|
183
|
+
*
|
|
184
|
+
* Persists and broadcasts the change; if the view is currently active, the
|
|
185
|
+
* scene updates live. **Not Ctrl+Z-undoable** — view-metadata edits publish
|
|
186
|
+
* directly and do not land on the local undo stack; this matches how the
|
|
187
|
+
* product's own view-settings UI behaves.
|
|
188
|
+
*
|
|
189
|
+
* Label patch semantics (mirroring the product, which stores no label
|
|
190
|
+
* selection while labels are off):
|
|
191
|
+
*
|
|
192
|
+
* - `{ showLabels: true }` alone turns labels on; if the view has no stored
|
|
193
|
+
* selection, the product defaults (`objectLabels`, `areas`) are applied —
|
|
194
|
+
* labels are never "on" with an empty selection (the product has no such
|
|
195
|
+
* state; labels render only while the selection is non-empty).
|
|
196
|
+
* - `{ labels: [...] }` alone sets the selection **and turns labels on**.
|
|
197
|
+
* - `{ showLabels: false }` turns labels off and **clears the stored
|
|
198
|
+
* selection** — a later read returns `labels: []`.
|
|
199
|
+
* - `{ showLabels: false, labels: [...] }` with a non-empty list is
|
|
200
|
+
* contradictory and **rejected** (nothing is silently discarded).
|
|
201
|
+
* - `{ showLabels: true, labels: [] }` is likewise contradictory and
|
|
202
|
+
* **rejected** — pass a non-empty list, or omit `labels` to get the
|
|
203
|
+
* defaults.
|
|
204
|
+
*
|
|
205
|
+
* `colorMode` accepts the `tag:<categoryId>` scheme strings returned by
|
|
206
|
+
* {@linkcode PluginPresentationViewsApi.getSettings}, so read-then-write
|
|
207
|
+
* round-trips a tag-based color scheme unchanged.
|
|
208
|
+
*
|
|
209
|
+
* @param viewId - The id of the view to update.
|
|
210
|
+
* @param settings - A partial {@linkcode PluginPresentationViewSettings}; any
|
|
211
|
+
* omitted field is left unchanged.
|
|
212
|
+
* @returns The updated view's `id`.
|
|
213
|
+
* @throws If writes are disabled, no view has the given id, or the patch is
|
|
214
|
+
* contradictory (`showLabels: false` with a non-empty `labels`, or
|
|
215
|
+
* `showLabels: true` with an explicitly empty `labels` list).
|
|
216
|
+
*
|
|
217
|
+
* @examplePrompt Switch this view to monochrome color mode
|
|
218
|
+
* @examplePrompt Turn off the axis in the Ground Floor view
|
|
219
|
+
* @examplePrompt Set the background of the active view to white
|
|
220
|
+
* @examplePrompt Show area labels on this view
|
|
221
|
+
* @examplePrompt Enable hidden-line mode for the section view
|
|
222
|
+
*
|
|
223
|
+
* # Example
|
|
224
|
+
* ```ts
|
|
225
|
+
* await snaptrude.presentation.views.updateSettings("view_123", {
|
|
226
|
+
* colorMode: "monochrome",
|
|
227
|
+
* showAxis: false,
|
|
228
|
+
* })
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
public abstract updateSettings(
|
|
232
|
+
viewId: string,
|
|
233
|
+
settings: Partial<PluginPresentationViewSettings>,
|
|
234
|
+
): PluginApiReturn<PluginPresentationViewsUpdateSettingsResult>
|
|
156
235
|
}
|
|
157
236
|
|
|
158
237
|
/**
|
|
@@ -301,3 +380,140 @@ export const PluginPresentationViewsCreateResult = PluginPresentationView
|
|
|
301
380
|
export type PluginPresentationViewsCreateResult = z.infer<
|
|
302
381
|
typeof PluginPresentationViewsCreateResult
|
|
303
382
|
>
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* How the scene is colored in a view.
|
|
386
|
+
*
|
|
387
|
+
* | Value | Meaning |
|
|
388
|
+
* |---|---|
|
|
389
|
+
* | `monochrome` | Flat single-tone shading |
|
|
390
|
+
* | `texture` | Material textures/colors |
|
|
391
|
+
* | `department` | Colored by department |
|
|
392
|
+
* | `tag:<categoryId>` | Colored by a project tag category (e.g. `tag:ZONE`) |
|
|
393
|
+
*
|
|
394
|
+
* The `tag:<categoryId>` form carries the product's tag-based color schemes
|
|
395
|
+
* losslessly — reading a view that uses one returns the `tag:` string as-is,
|
|
396
|
+
* and writing it back preserves the scheme (read-then-write is safe).
|
|
397
|
+
*/
|
|
398
|
+
export const PluginPresentationViewColorMode = z.union([
|
|
399
|
+
z.enum(["monochrome", "texture", "department"]),
|
|
400
|
+
z.templateLiteral(["tag:", z.string()]),
|
|
401
|
+
])
|
|
402
|
+
export type PluginPresentationViewColorMode = z.infer<
|
|
403
|
+
typeof PluginPresentationViewColorMode
|
|
404
|
+
>
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* A category of on-canvas labels a view can show.
|
|
408
|
+
*
|
|
409
|
+
* | Value | Meaning |
|
|
410
|
+
* |---|---|
|
|
411
|
+
* | `objectLabels` | Per-object name labels |
|
|
412
|
+
* | `areas` | Area/room labels |
|
|
413
|
+
* | `department` | Department labels |
|
|
414
|
+
*/
|
|
415
|
+
export const PluginPresentationViewLabel = z.enum([
|
|
416
|
+
"objectLabels",
|
|
417
|
+
"areas",
|
|
418
|
+
"department",
|
|
419
|
+
])
|
|
420
|
+
export type PluginPresentationViewLabel = z.infer<
|
|
421
|
+
typeof PluginPresentationViewLabel
|
|
422
|
+
>
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* A view's display settings.
|
|
426
|
+
*
|
|
427
|
+
* | Property | Type | Description |
|
|
428
|
+
* |---|---|---|
|
|
429
|
+
* | `backgroundColor` | `string` | Canvas background as a hex color (e.g. `#ffffff`) |
|
|
430
|
+
* | `colorMode` | {@linkcode PluginPresentationViewColorMode} | How the scene is colored (including `tag:<categoryId>` schemes) |
|
|
431
|
+
* | `showAxis` | `boolean` | Whether the X/Y/Z axes are shown |
|
|
432
|
+
* | `showEdges` | `boolean` | Whether edges are shown; `false` = hidden-line rendering |
|
|
433
|
+
* | `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) |
|
|
434
|
+
* | `labels` | {@linkcode PluginPresentationViewLabel}`[]` | Which label categories are selected. When `showLabels` is `false` the view stores no selection and this reads `[]` |
|
|
435
|
+
*/
|
|
436
|
+
export const PluginPresentationViewSettings = z.object({
|
|
437
|
+
backgroundColor: z.string(),
|
|
438
|
+
colorMode: PluginPresentationViewColorMode,
|
|
439
|
+
showAxis: z.boolean(),
|
|
440
|
+
showEdges: z.boolean(),
|
|
441
|
+
showLabels: z.boolean(),
|
|
442
|
+
labels: z.array(PluginPresentationViewLabel),
|
|
443
|
+
})
|
|
444
|
+
export type PluginPresentationViewSettings = z.infer<
|
|
445
|
+
typeof PluginPresentationViewSettings
|
|
446
|
+
>
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.getSettings}.
|
|
450
|
+
*
|
|
451
|
+
* | Property | Type | Description |
|
|
452
|
+
* |---|---|---|
|
|
453
|
+
* | `id` | `string` | The id of the view to read settings for |
|
|
454
|
+
*/
|
|
455
|
+
export const PluginPresentationViewsGetSettingsArgs = z.object({
|
|
456
|
+
id: z.string(),
|
|
457
|
+
})
|
|
458
|
+
export type PluginPresentationViewsGetSettingsArgs = z.infer<
|
|
459
|
+
typeof PluginPresentationViewsGetSettingsArgs
|
|
460
|
+
>
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Result of {@linkcode PluginPresentationViewsApi.getSettings} — the settings,
|
|
464
|
+
* or `null` when no view has that id.
|
|
465
|
+
*/
|
|
466
|
+
export const PluginPresentationViewsGetSettingsResult =
|
|
467
|
+
PluginPresentationViewSettings.nullable()
|
|
468
|
+
export type PluginPresentationViewsGetSettingsResult = z.infer<
|
|
469
|
+
typeof PluginPresentationViewsGetSettingsResult
|
|
470
|
+
>
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.updateSettings}. The
|
|
474
|
+
* `settings` patch is partial — any omitted field is left unchanged. A patch
|
|
475
|
+
* pairing `showLabels: false` with a non-empty `labels` list, or
|
|
476
|
+
* `showLabels: true` with an explicitly empty `labels` list, is rejected as
|
|
477
|
+
* contradictory (see the method JSDoc for the full label patch semantics).
|
|
478
|
+
*
|
|
479
|
+
* | Property | Type | Description |
|
|
480
|
+
* |---|---|---|
|
|
481
|
+
* | `id` | `string` | The id of the view to update |
|
|
482
|
+
* | `settings` | `Partial<`{@linkcode PluginPresentationViewSettings}`>` | The fields to change |
|
|
483
|
+
*/
|
|
484
|
+
export const PluginPresentationViewsUpdateSettingsArgs = z
|
|
485
|
+
.object({
|
|
486
|
+
id: z.string(),
|
|
487
|
+
settings: PluginPresentationViewSettings.partial(),
|
|
488
|
+
})
|
|
489
|
+
.refine(
|
|
490
|
+
(v) =>
|
|
491
|
+
!(v.settings.showLabels === false && (v.settings.labels?.length ?? 0) > 0),
|
|
492
|
+
{
|
|
493
|
+
message:
|
|
494
|
+
"Contradictory patch: labels cannot be set while showLabels is false",
|
|
495
|
+
},
|
|
496
|
+
)
|
|
497
|
+
.refine(
|
|
498
|
+
(v) =>
|
|
499
|
+
!(
|
|
500
|
+
v.settings.showLabels === true &&
|
|
501
|
+
v.settings.labels !== undefined &&
|
|
502
|
+
v.settings.labels.length === 0
|
|
503
|
+
),
|
|
504
|
+
{
|
|
505
|
+
message:
|
|
506
|
+
"Contradictory patch: showLabels cannot be true with an explicitly empty labels list — pass a non-empty list, or omit labels to apply the defaults",
|
|
507
|
+
},
|
|
508
|
+
)
|
|
509
|
+
export type PluginPresentationViewsUpdateSettingsArgs = z.infer<
|
|
510
|
+
typeof PluginPresentationViewsUpdateSettingsArgs
|
|
511
|
+
>
|
|
512
|
+
|
|
513
|
+
/** Result of {@linkcode PluginPresentationViewsApi.updateSettings} — the updated view's id. */
|
|
514
|
+
export const PluginPresentationViewsUpdateSettingsResult = z.object({
|
|
515
|
+
id: z.string(),
|
|
516
|
+
})
|
|
517
|
+
export type PluginPresentationViewsUpdateSettingsResult = z.infer<
|
|
518
|
+
typeof PluginPresentationViewsUpdateSettingsResult
|
|
519
|
+
>
|
package/src/api/program/areas.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod"
|
|
2
2
|
import { PluginApiReturn } from "../../types"
|
|
3
3
|
import { PluginAreaUnit } from "./metrics"
|
|
4
|
+
import { PluginAreaClass } from "../entity/space"
|
|
4
5
|
import { ComponentHandle } from "../../handles"
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -12,15 +13,25 @@ import { ComponentHandle } from "../../handles"
|
|
|
12
13
|
* department-allocation lens (targets vs allocated area per department); this
|
|
13
14
|
* namespace is the whole-program area/FAR summary and its groupings.
|
|
14
15
|
*
|
|
16
|
+
* **Net vs gross:** the `carpet` / `builtUp` / `excluded` figures are the three
|
|
17
|
+
* area *classes* — every space's whole footprint lands in exactly one, chosen
|
|
18
|
+
* by its `areaClass` (see {@linkcode PluginProgramAreaMember.areaClass}). In UI
|
|
19
|
+
* terms `carpet` is the **Net Internal Area** (Σ of `NET`-classed spaces), and
|
|
20
|
+
* `builtUp` is the **Gross External Area** (Σ of `GROSS`-classed spaces) — so
|
|
21
|
+
* "net" and "gross" are the plain-English synonyms for `carpet` and `builtUp`.
|
|
22
|
+
* These are not wall-thickness carpet-vs-super-built-up; there is no common-area
|
|
23
|
+
* math. Note the summary also folds in non-mass elements (floors count as NET,
|
|
24
|
+
* slabs as GROSS), so **summing `listMembers` spaces does not reconcile to the
|
|
25
|
+
* summary totals**.
|
|
26
|
+
*
|
|
15
27
|
* `achievedFar` is **derived and read-only** — computed from built-up area and
|
|
16
28
|
* site area. `targetFar` is the goal you set (via {@linkcode
|
|
17
29
|
* PluginProgramAreasApi.update}); the two are the same ratio, one measured and
|
|
18
30
|
* one intended. The surface speaks **FAR only** — there is no FSI alias.
|
|
19
31
|
*
|
|
20
|
-
* Reads return plain records and never throw. The write
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* (at which point it is promoted to a required `abstract` member).
|
|
32
|
+
* Reads return plain records and never throw. The only write —
|
|
33
|
+
* {@linkcode PluginProgramAreasApi.update} — is a non-undoable settings write
|
|
34
|
+
* for the FAR inputs.
|
|
24
35
|
*
|
|
25
36
|
* Accessed via `snaptrude.program.areas`.
|
|
26
37
|
*/
|
|
@@ -38,6 +49,8 @@ export abstract class PluginProgramAreasApi {
|
|
|
38
49
|
*
|
|
39
50
|
* @examplePrompt What's my FAR right now?
|
|
40
51
|
* @examplePrompt Give me the program area summary
|
|
52
|
+
* @examplePrompt What is my net internal area vs gross external area?
|
|
53
|
+
* @examplePrompt How much net and gross area do I have?
|
|
41
54
|
* @examplePrompt How much built-up area have I used against the site area?
|
|
42
55
|
* @examplePrompt Am I within my FAR target?
|
|
43
56
|
*
|
|
@@ -62,6 +75,7 @@ export abstract class PluginProgramAreasApi {
|
|
|
62
75
|
* (empty when the program has no spaces).
|
|
63
76
|
*
|
|
64
77
|
* @examplePrompt Break down the area by storey
|
|
78
|
+
* @examplePrompt Break down net vs gross area by storey
|
|
65
79
|
* @examplePrompt Show the area rollup per department
|
|
66
80
|
* @examplePrompt Group the built-up area by building
|
|
67
81
|
*
|
|
@@ -92,6 +106,7 @@ export abstract class PluginProgramAreasApi {
|
|
|
92
106
|
* array (empty when the group is missing or empty).
|
|
93
107
|
*
|
|
94
108
|
* @examplePrompt List the spaces on this storey with their areas
|
|
109
|
+
* @examplePrompt Which spaces are net and which are gross on this storey?
|
|
95
110
|
* @examplePrompt What rooms are in the Bedrooms department bucket?
|
|
96
111
|
* @examplePrompt Break the storey area down into individual spaces
|
|
97
112
|
*
|
|
@@ -142,9 +157,9 @@ export abstract class PluginProgramAreasApi {
|
|
|
142
157
|
* |---|---|---|
|
|
143
158
|
* | `count` | `number` | Number of spaces in the program (a count, not an area) |
|
|
144
159
|
* | `hiddenCount` | `number` | Number of those spaces that are currently hidden |
|
|
145
|
-
* | `carpet` | `number` | Total
|
|
146
|
-
* | `builtUp` | `number` | Total
|
|
147
|
-
* | `excluded` | `number` | Total
|
|
160
|
+
* | `carpet` | `number` | Total **Net Internal Area** ("net") — Σ `NET`-classed spaces + floors — in `areaUnit` |
|
|
161
|
+
* | `builtUp` | `number` | Total **Gross External Area** ("gross") — Σ `GROSS`-classed spaces + slabs — in `areaUnit` |
|
|
162
|
+
* | `excluded` | `number` | Total **Excluded Area** — Σ `EXCLUDED`-classed spaces — in `areaUnit` |
|
|
148
163
|
* | `farBuiltUp` | `number` | Built-up area that counts toward FAR, in `areaUnit` |
|
|
149
164
|
* | `siteArea` | `number` | Site/plot area in `areaUnit` |
|
|
150
165
|
* | `achievedFar` | `number \| null` | Derived FAR (`farBuiltUp / siteArea`); `null` when site area or target FAR is unset |
|
|
@@ -177,8 +192,8 @@ export type PluginProgramAreaSummary = z.infer<typeof PluginProgramAreaSummary>
|
|
|
177
192
|
* | `groupId` | `string` | Stable id of the group (e.g. storey id, department id) |
|
|
178
193
|
* | `name` | `string` | Display name of the group |
|
|
179
194
|
* | `color` | `string` | CSS hex color string for the group |
|
|
180
|
-
* | `carpet` | `number` |
|
|
181
|
-
* | `builtUp` | `number` |
|
|
195
|
+
* | `carpet` | `number` | Net Internal Area ("net") for this group |
|
|
196
|
+
* | `builtUp` | `number` | Gross External Area ("gross") for this group |
|
|
182
197
|
* | `excluded` | `number` | Excluded area for this group |
|
|
183
198
|
* | `count` | `number` | Number of spaces in this group |
|
|
184
199
|
* | `targetArea` | `number` | Target area for this group, in `targetUnit` |
|
|
@@ -201,18 +216,25 @@ export type PluginProgramAreaGroup = z.infer<typeof PluginProgramAreaGroup>
|
|
|
201
216
|
* A single space within an area group. Area figures are in the program's area
|
|
202
217
|
* unit (see {@linkcode PluginProgramAreaSummary.areaUnit}).
|
|
203
218
|
*
|
|
219
|
+
* `areaClass` is the space's effective classification — it decides which of the
|
|
220
|
+
* three buckets the space's whole footprint lands in: `NET` → `carpet` ("net"),
|
|
221
|
+
* `GROSS` → `builtUp` ("gross"), `EXCLUDED` → `excluded`. So for any one member
|
|
222
|
+
* exactly one of `carpet` / `builtUp` / `excluded` is non-zero.
|
|
223
|
+
*
|
|
204
224
|
* | Property | Type | Description |
|
|
205
225
|
* |---|---|---|
|
|
206
226
|
* | `id` | `ComponentHandle` | `Component.id` of the space (never a mesh handle) |
|
|
207
227
|
* | `label` | `string` | Display label of the space |
|
|
208
|
-
* | `
|
|
209
|
-
* | `
|
|
210
|
-
* | `
|
|
228
|
+
* | `areaClass` | {@linkcode PluginAreaClass} | Effective area class — `"NET"` (→ `carpet`), `"GROSS"` (→ `builtUp`), or `"EXCLUDED"` |
|
|
229
|
+
* | `carpet` | `number` | Net area of the space (non-zero when `areaClass` is `"NET"`) |
|
|
230
|
+
* | `builtUp` | `number` | Gross area of the space (non-zero when `areaClass` is `"GROSS"`) |
|
|
231
|
+
* | `excluded` | `number` | Excluded area of the space (non-zero when `areaClass` is `"EXCLUDED"`) |
|
|
211
232
|
* | `isVisible` | `boolean` | Whether the space is currently visible |
|
|
212
233
|
*/
|
|
213
234
|
export const PluginProgramAreaMember = z.object({
|
|
214
235
|
id: ComponentHandle,
|
|
215
236
|
label: z.string(),
|
|
237
|
+
areaClass: PluginAreaClass,
|
|
216
238
|
carpet: z.number(),
|
|
217
239
|
builtUp: z.number(),
|
|
218
240
|
excluded: z.number(),
|
package/src/api/program/index.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { PluginProgramAreasApi } from "./areas"
|
|
|
19
19
|
*
|
|
20
20
|
* - {@linkcode PluginProgramApi.departments} — Read & edit program departments (groupings + targets)
|
|
21
21
|
* - {@linkcode PluginProgramApi.adjacency} — Read & compute the department/space adjacency matrix
|
|
22
|
-
* - {@linkcode PluginProgramApi.layout} — Arrange/pack spaces in the envelope
|
|
22
|
+
* - {@linkcode PluginProgramApi.layout} — Arrange/pack spaces in the envelope
|
|
23
23
|
* - {@linkcode PluginProgramApi.metrics} — Read the area-program summary
|
|
24
24
|
* - {@linkcode PluginProgramApi.areas} — FAR / built-up-area rollup and groupings
|
|
25
25
|
* - {@linkcode PluginProgramApi.spreadsheet} — Render program data to sheets and read it back
|
|
@@ -27,11 +27,6 @@ import { PluginProgramAreasApi } from "./areas"
|
|
|
27
27
|
* - {@linkcode PluginProgramApi.cores} — Read & trigger vertical-circulation cores
|
|
28
28
|
* - {@linkcode PluginProgramApi.classification} — Classification catalog + display tags
|
|
29
29
|
*
|
|
30
|
-
* Sub-namespaces typed as optional (`?`) are **authored ahead of the host** —
|
|
31
|
-
* declared so plugins and codegen can see the shape, but not required of host
|
|
32
|
-
* implementations and kept out of the discovery manifest until the host lands
|
|
33
|
-
* them (at which point they are promoted to required `abstract` members).
|
|
34
|
-
*
|
|
35
30
|
* Accessed via `snaptrude.program`.
|
|
36
31
|
*/
|
|
37
32
|
export abstract class PluginProgramApi {
|
|
@@ -39,11 +34,8 @@ export abstract class PluginProgramApi {
|
|
|
39
34
|
public abstract departments: PluginProgramDepartmentsApi
|
|
40
35
|
/** Adjacency matrix — read & compute proximity relationships. See {@linkcode PluginProgramAdjacencyApi}. */
|
|
41
36
|
public abstract adjacency: PluginProgramAdjacencyApi
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
* _(authored ahead — optional until the host lands it next increment.)_
|
|
45
|
-
*/
|
|
46
|
-
public layout?: PluginProgramLayoutApi
|
|
37
|
+
/** Arrange/pack spaces in the envelope (async job family). See {@linkcode PluginProgramLayoutApi}. */
|
|
38
|
+
public abstract layout: PluginProgramLayoutApi
|
|
47
39
|
/** Area-program summary — targets vs allocated area. See {@linkcode PluginProgramMetricsApi}. */
|
|
48
40
|
public abstract metrics: PluginProgramMetricsApi
|
|
49
41
|
/** FAR / built-up-area rollup and groupings. See {@linkcode PluginProgramAreasApi}. */
|
|
@@ -9,8 +9,20 @@ import { PluginApiReturn } from "../../types"
|
|
|
9
9
|
* three of the space-planning workflow that starts with
|
|
10
10
|
* {@linkcode PluginProgramAdjacencyApi} (`program.adjacency`).
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* Both {@linkcode PluginProgramLayoutApi.arrange} and
|
|
13
|
+
* {@linkcode PluginProgramLayoutApi.pack} run as an **asynchronous backend
|
|
14
|
+
* job** on the space-solver service:
|
|
15
|
+
*
|
|
16
|
+
* 1. `arrange` / `pack` start the job and **return immediately** — they do
|
|
17
|
+
* not wait for the layout.
|
|
18
|
+
* 2. Poll {@linkcode PluginProgramLayoutApi.getState} until `status` is no
|
|
19
|
+
* longer `"running"` — a run can take up to 20 minutes.
|
|
20
|
+
* 3. {@linkcode PluginProgramLayoutApi.cancel} aborts an in-flight run.
|
|
21
|
+
*
|
|
22
|
+
* `arrange` produces several candidate layouts and **auto-commits the first
|
|
23
|
+
* solution** as one undoable edit (there is no interactive solution-review
|
|
24
|
+
* over the plugin boundary); `pack` re-shapes and applies its single result
|
|
25
|
+
* directly. Both are **Pro-plan-gated**, matching the product UI.
|
|
14
26
|
*
|
|
15
27
|
* Accessed via `snaptrude.program.layout`.
|
|
16
28
|
*/
|
|
@@ -19,7 +31,29 @@ export abstract class PluginProgramLayoutApi {
|
|
|
19
31
|
|
|
20
32
|
/**
|
|
21
33
|
* Arrange the spaces inside the envelope using the computed adjacency data.
|
|
22
|
-
*
|
|
34
|
+
*
|
|
35
|
+
* Starts the backend job and **returns immediately** — poll
|
|
36
|
+
* {@linkcode PluginProgramLayoutApi.getState} until `status` leaves
|
|
37
|
+
* `"running"` (a run can take up to 20 minutes). The solver produces
|
|
38
|
+
* several candidate layouts; this **auto-commits the first solution** as one
|
|
39
|
+
* undoable edit (no interactive review over the plugin boundary). Starting a
|
|
40
|
+
* run while one is in flight replaces it.
|
|
41
|
+
*
|
|
42
|
+
* With no `options`, operates on the eligible Room/Department masses on the
|
|
43
|
+
* active storey and auto-detects the single buildable envelope there.
|
|
44
|
+
*
|
|
45
|
+
* @param options - Optional {@linkcode PluginProgramLayoutRunArgs} — the
|
|
46
|
+
* space / department masses to arrange and the envelope to fit them in.
|
|
47
|
+
* Omitted fields fall back to the active-storey defaults.
|
|
48
|
+
* @returns A {@linkcode PluginProgramLayoutRunResult} — `{ success: true }`
|
|
49
|
+
* when the job was started. Solver failures surface through
|
|
50
|
+
* {@linkcode PluginProgramLayoutApi.getState} (`status: "inactive"`), not
|
|
51
|
+
* as a rejected call.
|
|
52
|
+
* @throws When the project is not on a Pro plan.
|
|
53
|
+
* @throws When a `spaceId` / `departmentId` / `envelopeId` does not resolve.
|
|
54
|
+
* @throws When more than one envelope is on the active storey and none was
|
|
55
|
+
* given (ambiguous).
|
|
56
|
+
* @throws When plugin writes are disabled.
|
|
23
57
|
*
|
|
24
58
|
* @examplePrompt Arrange the rooms in the envelope
|
|
25
59
|
* @examplePrompt Lay out the departments inside the building envelope
|
|
@@ -28,14 +62,43 @@ export abstract class PluginProgramLayoutApi {
|
|
|
28
62
|
* # Example
|
|
29
63
|
* ```ts
|
|
30
64
|
* const { success, error } = await snaptrude.program.layout.arrange()
|
|
31
|
-
* if (!success)
|
|
65
|
+
* if (!success) throw new Error(error)
|
|
66
|
+
* // poll until the layout is applied
|
|
67
|
+
* let job = await snaptrude.program.layout.getState()
|
|
68
|
+
* while (job?.status === "running") {
|
|
69
|
+
* await new Promise((r) => setTimeout(r, 5000))
|
|
70
|
+
* job = await snaptrude.program.layout.getState()
|
|
71
|
+
* }
|
|
32
72
|
* ```
|
|
33
73
|
*/
|
|
34
|
-
public arrange
|
|
74
|
+
public abstract arrange(
|
|
75
|
+
options?: PluginProgramLayoutRunArgs,
|
|
76
|
+
): PluginApiReturn<PluginProgramLayoutRunResult>
|
|
35
77
|
|
|
36
78
|
/**
|
|
37
79
|
* Pack the spaces into the envelope (a tighter fit than arrange).
|
|
38
|
-
*
|
|
80
|
+
*
|
|
81
|
+
* Like {@linkcode PluginProgramLayoutApi.arrange}, this starts the backend
|
|
82
|
+
* job and **returns immediately** — poll
|
|
83
|
+
* {@linkcode PluginProgramLayoutApi.getState} until `status` leaves
|
|
84
|
+
* `"running"` (up to 20 minutes). Pack re-shapes mass geometry to fit and
|
|
85
|
+
* **applies its single result directly** (no solution review). Starting a
|
|
86
|
+
* run while one is in flight replaces it.
|
|
87
|
+
*
|
|
88
|
+
* With no `options`, operates on the eligible Room/Department masses on the
|
|
89
|
+
* active storey and auto-detects the single buildable envelope there.
|
|
90
|
+
*
|
|
91
|
+
* @param options - Optional {@linkcode PluginProgramLayoutRunArgs} — same
|
|
92
|
+
* shape as `arrange`; omitted fields fall back to the active-storey
|
|
93
|
+
* defaults.
|
|
94
|
+
* @returns A {@linkcode PluginProgramLayoutRunResult} — `{ success: true }`
|
|
95
|
+
* when the job was started. Solver failures surface through
|
|
96
|
+
* {@linkcode PluginProgramLayoutApi.getState} (`status: "inactive"`).
|
|
97
|
+
* @throws When the project is not on a Pro plan.
|
|
98
|
+
* @throws When a `spaceId` / `departmentId` / `envelopeId` does not resolve.
|
|
99
|
+
* @throws When more than one envelope is on the active storey and none was
|
|
100
|
+
* given (ambiguous).
|
|
101
|
+
* @throws When plugin writes are disabled.
|
|
39
102
|
*
|
|
40
103
|
* @examplePrompt Pack the rooms into the envelope
|
|
41
104
|
* @examplePrompt Fit the program spaces tightly into the building
|
|
@@ -43,20 +106,99 @@ export abstract class PluginProgramLayoutApi {
|
|
|
43
106
|
*
|
|
44
107
|
* # Example
|
|
45
108
|
* ```ts
|
|
46
|
-
* const { success
|
|
47
|
-
*
|
|
109
|
+
* const { success } = await snaptrude.program.layout.pack({ envelopeId: "be_..." })
|
|
110
|
+
* let job = await snaptrude.program.layout.getState()
|
|
111
|
+
* while (job?.status === "running") {
|
|
112
|
+
* await new Promise((r) => setTimeout(r, 5000))
|
|
113
|
+
* job = await snaptrude.program.layout.getState()
|
|
114
|
+
* }
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
public abstract pack(
|
|
118
|
+
options?: PluginProgramLayoutRunArgs,
|
|
119
|
+
): PluginApiReturn<PluginProgramLayoutRunResult>
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Get the state of the layout run.
|
|
123
|
+
*
|
|
124
|
+
* The polling read for the async job started by
|
|
125
|
+
* {@linkcode PluginProgramLayoutApi.arrange} /
|
|
126
|
+
* {@linkcode PluginProgramLayoutApi.pack}. `status` values:
|
|
127
|
+
*
|
|
128
|
+
* | Status | Meaning |
|
|
129
|
+
* |---|---|
|
|
130
|
+
* | `"running"` | A run is in flight — keep polling |
|
|
131
|
+
* | `"active"` | The run finished and its layout is applied to the model |
|
|
132
|
+
* | `"inactive"` | A run finished without applying a layout (the solver failed or found no solution) |
|
|
133
|
+
*
|
|
134
|
+
* @returns A {@linkcode PluginProgramLayoutStateResult} with the run
|
|
135
|
+
* `status`, or `null` when no run result is available (never ran or was
|
|
136
|
+
* cancelled).
|
|
137
|
+
*
|
|
138
|
+
* @examplePrompt Is the arrange done?
|
|
139
|
+
* @examplePrompt Check the status of the layout run
|
|
140
|
+
* @examplePrompt Did the pack finish?
|
|
141
|
+
*
|
|
142
|
+
* # Example
|
|
143
|
+
* ```ts
|
|
144
|
+
* const job = await snaptrude.program.layout.getState()
|
|
145
|
+
* if (job?.status === "active") console.log("layout applied")
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
public abstract getState(): PluginApiReturn<PluginProgramLayoutStateResult>
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Cancel the in-flight layout run.
|
|
152
|
+
*
|
|
153
|
+
* Aborts the backend job and discards any pending solution. A no-op
|
|
154
|
+
* (returns `false`) when nothing is running.
|
|
155
|
+
*
|
|
156
|
+
* @returns `true` when a run was cancelled, `false` when nothing was
|
|
157
|
+
* running.
|
|
158
|
+
* @throws When plugin writes are disabled.
|
|
159
|
+
*
|
|
160
|
+
* @examplePrompt Cancel the arrange
|
|
161
|
+
* @examplePrompt Stop the running layout job
|
|
162
|
+
* @examplePrompt Abort the pack in envelope
|
|
163
|
+
*
|
|
164
|
+
* # Example
|
|
165
|
+
* ```ts
|
|
166
|
+
* await snaptrude.program.layout.cancel()
|
|
48
167
|
* ```
|
|
49
168
|
*/
|
|
50
|
-
public
|
|
169
|
+
public abstract cancel(): PluginApiReturn<boolean>
|
|
51
170
|
}
|
|
52
171
|
|
|
172
|
+
/**
|
|
173
|
+
* Arguments for {@linkcode PluginProgramLayoutApi.arrange} /
|
|
174
|
+
* {@linkcode PluginProgramLayoutApi.pack}. All fields are optional — omitted
|
|
175
|
+
* fields fall back to the eligible masses and the single envelope on the
|
|
176
|
+
* active storey.
|
|
177
|
+
*
|
|
178
|
+
* | Property | Type | Description |
|
|
179
|
+
* |---|---|---|
|
|
180
|
+
* | `spaceIds` | `string[] \| undefined` | Component ids of the Room masses to lay out |
|
|
181
|
+
* | `departmentIds` | `string[] \| undefined` | Component ids of the Department masses to lay out |
|
|
182
|
+
* | `envelopeId` | `string \| undefined` | The envelope to fit into — a mass component id or a buildable-envelope handle (`be_…`); omit to auto-detect the single envelope on the active storey |
|
|
183
|
+
*/
|
|
184
|
+
export const PluginProgramLayoutRunArgs = z.object({
|
|
185
|
+
spaceIds: z.array(z.string()).optional(),
|
|
186
|
+
departmentIds: z.array(z.string()).optional(),
|
|
187
|
+
envelopeId: z.string().optional(),
|
|
188
|
+
})
|
|
189
|
+
export type PluginProgramLayoutRunArgs = z.infer<
|
|
190
|
+
typeof PluginProgramLayoutRunArgs
|
|
191
|
+
>
|
|
192
|
+
|
|
53
193
|
/**
|
|
54
194
|
* Result of {@linkcode PluginProgramLayoutApi.arrange} /
|
|
55
|
-
* {@linkcode PluginProgramLayoutApi.pack}
|
|
195
|
+
* {@linkcode PluginProgramLayoutApi.pack} — reports whether the run was
|
|
196
|
+
* **started**, not whether the layout finished (poll
|
|
197
|
+
* {@linkcode PluginProgramLayoutApi.getState} for completion).
|
|
56
198
|
*
|
|
57
199
|
* | Property | Type | Description |
|
|
58
200
|
* |---|---|---|
|
|
59
|
-
* | `success` | `boolean` | Whether the layout run
|
|
201
|
+
* | `success` | `boolean` | Whether the layout run was started |
|
|
60
202
|
* | `error` | `string \| undefined` | Failure reason when `success` is `false` |
|
|
61
203
|
*/
|
|
62
204
|
export const PluginProgramLayoutRunResult = z.object({
|
|
@@ -66,3 +208,45 @@ export const PluginProgramLayoutRunResult = z.object({
|
|
|
66
208
|
export type PluginProgramLayoutRunResult = z.infer<
|
|
67
209
|
typeof PluginProgramLayoutRunResult
|
|
68
210
|
>
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The status of a layout run.
|
|
214
|
+
*
|
|
215
|
+
* | Value | Meaning |
|
|
216
|
+
* |---|---|
|
|
217
|
+
* | `"running"` | A run is in flight — keep polling |
|
|
218
|
+
* | `"active"` | The run finished and its layout is applied to the model |
|
|
219
|
+
* | `"inactive"` | A run finished without applying a layout (the solver failed or found no solution) |
|
|
220
|
+
*/
|
|
221
|
+
export const PluginProgramLayoutJobStatus = z.enum([
|
|
222
|
+
"running",
|
|
223
|
+
"active",
|
|
224
|
+
"inactive",
|
|
225
|
+
])
|
|
226
|
+
export type PluginProgramLayoutJobStatus = z.infer<
|
|
227
|
+
typeof PluginProgramLayoutJobStatus
|
|
228
|
+
>
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* The state of a layout run.
|
|
232
|
+
*
|
|
233
|
+
* | Property | Type | Description |
|
|
234
|
+
* |---|---|---|
|
|
235
|
+
* | `status` | {@linkcode PluginProgramLayoutJobStatus} | `"running"` \| `"active"` \| `"inactive"` |
|
|
236
|
+
*/
|
|
237
|
+
export const PluginProgramLayoutJobState = z.object({
|
|
238
|
+
status: PluginProgramLayoutJobStatus,
|
|
239
|
+
})
|
|
240
|
+
export type PluginProgramLayoutJobState = z.infer<
|
|
241
|
+
typeof PluginProgramLayoutJobState
|
|
242
|
+
>
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Result of {@linkcode PluginProgramLayoutApi.getState} — the run state, or
|
|
246
|
+
* `null` when no run result is available (never ran or was cancelled).
|
|
247
|
+
*/
|
|
248
|
+
export const PluginProgramLayoutStateResult =
|
|
249
|
+
PluginProgramLayoutJobState.nullable()
|
|
250
|
+
export type PluginProgramLayoutStateResult = z.infer<
|
|
251
|
+
typeof PluginProgramLayoutStateResult
|
|
252
|
+
>
|