@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @snaptrude/plugin-core
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- More additions to the APIs, infra changes.
|
|
8
|
+
- Plugin API 0.8.0 — the 0.8 API wave, handle lifecycle, events, and geometry/data-integrity fixes.
|
|
9
|
+
|
|
10
|
+
- **The 0.8 API wave** — model/presentation **export** (`core.io.export`, `presentation.export`), **element editing** widenings on `design.update`/`design.edit`, **`core.camera.*`**, **storey management**, **`design.visibility.*`**, **dimensions**, **locale/user** reads (`core.user`), `design.types.list`, presentation annotate, plus completeness widenings across existing families. The discovery manifest grows from 423 to 595 method paths (including the new `core.handles.*` lifecycle below).
|
|
11
|
+
- **Events** — `model:changed` subscription contract: debounced model-change notifications delivered to the plugin worker for user and plugin edits alike (client API: `PluginWorker.subscribe`). `selection:changed`, `tool:activated`, `project:saved`, `view:changed` are reserved names, not yet emitted.
|
|
12
|
+
- **BREAKING — `program.site` footprints are world Snaptrude units.** Previously the only plan-geometry read scaled to scene metres (×0.254), so site parcels could not be overlaid on `planPoints`. Now the same world XZ plan space as every other plan read; areas and the geographic reads are unchanged.
|
|
13
|
+
- **BREAKING — real beam/column geometry.** `design.create.beam` with a horizontal direction (the documented canonical call) used to build a zero-height flat sheet; it now builds a true beam with tool-parity semantics (section X extent = width, Z extent = depth, body hangs below the authoring plane by its depth). `design.create.column` builds exactly the requested height (the silent slab-thickness deduction is gone). Degenerate extrusions (zero/diagonal/in-plane directions, zero height) throw VALIDATION errors instead of silently building corrupt solids; directions are normalized.
|
|
14
|
+
- **Data integrity** — `design.query.list*` no longer returns engine-internal shells (originals parked by instance copies, disposed phantoms), so one copy no longer doubles `listSpaces`/schedules; `design.delete.entities` orders instance copies before their source meshes so mixed batches cannot fail midway; `design.update.wall` documents that rebuilds replace the wall — re-bind from `affected[0]`.
|
|
15
|
+
- **Handle lifecycle (`core.handles.*`) + GC-backed `Handle` objects** — `Handle` is now a class wrapping the wire id (public type names unchanged): `handle.id`, `toString()` stays the bare id, `equals()` compares by id, and `toJSON()` emits the `{__h: id}` wire tag — `JSON.stringify` output containing handles changes shape. New namespace: `core.handles.release(handles[])` (batched, arena-agnostic, silent no-op on unknown/released ids), `core.handles.releaseAll(kind?)`, mint-recording scopes `beginScope()` / `endScope(scope, retain?)` (token-addressed, retain promotes to the enclosing scope), and `core.handles.stats()`. The client runs a FinalizationRegistry-backed auto-release queue, so unreferenced handles are reclaimed host-side without explicit code. `core.geom.delete.profile/contour` are retained as deprecated aliases of `core.handles.release`. Entity-style kinds (component/material/underlay/terrain/importJob) remain branded strings.
|
|
16
|
+
|
|
17
|
+
## 0.7.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- 8f22cb7: Expand `presentation.aiInspiration` to the full AI Inspiration surface (18 methods) and make it a required member of `PluginPresentationApi` now that the host implementation lands.
|
|
22
|
+
- New methods: `getModelCapabilities`, `getSelection`, `getPresetCatalog`, `getJob`, `cancelJob`, `listJobs`, `getWorkflowForShape`, `getSelectedBranchRerunPlan`, `rerunSelectedBranch`, `extractRecipeFromShape`, `listRecipes`, `saveRecipe`, `deleteRecipe`, `runRecipe` (plus job/workflow/recipe Zod schemas).
|
|
23
|
+
- `generate`/`refine` (and `rerunSelectedBranch`/`runRecipe`) accept `runMode: "blocking" | "job"`; `PluginAIInspirationRunResult` is accordingly loosened to `{ jobId?, output?, outputs?, metadata? }` — job-mode calls resolve with a `jobId` instead of outputs.
|
|
24
|
+
|
|
3
25
|
## 0.7.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/api-manifest.full.json
CHANGED
|
@@ -347,6 +347,46 @@
|
|
|
347
347
|
"argsType": "string",
|
|
348
348
|
"resultType": "PluginCoreBuildingsUpdateResult"
|
|
349
349
|
},
|
|
350
|
+
{
|
|
351
|
+
"path": "core.camera.lookFrom",
|
|
352
|
+
"namespace": "core.camera",
|
|
353
|
+
"summary": "Point the camera: place its eye at `eye` looking toward `target` (world coordinates, internal `babylon` units). View-state only — not undoable.",
|
|
354
|
+
"examplePrompts": [
|
|
355
|
+
"Look at the model from above the north-east corner",
|
|
356
|
+
"Position the camera at (50, 30, 50) looking at the origin",
|
|
357
|
+
"Point the camera at the centre of the building from the side",
|
|
358
|
+
"Set the eye to this point and aim it at that point\n\n# Example\n```ts\nconst { vec3 } = snaptrude.core.math\nawait snaptrude.core.camera.lookFrom(vec3.new(50, 30, 50), vec3.new(0, 0, 0))\n```"
|
|
359
|
+
],
|
|
360
|
+
"argsType": "Vec3Handle",
|
|
361
|
+
"resultType": "boolean"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"path": "core.camera.setMode",
|
|
365
|
+
"namespace": "core.camera",
|
|
366
|
+
"summary": "Toggle the modelling mode between `2d` (plan) and `3d`. Mirrors the canvas 2D/3D toggle: `3d` enters the isometric perspective view, `2d` drops to the orthographic plan of the active storey. View-state only — not undoable.",
|
|
367
|
+
"examplePrompts": [
|
|
368
|
+
"Switch to 3D view",
|
|
369
|
+
"Drop into 2D plan mode",
|
|
370
|
+
"Go back to 3D",
|
|
371
|
+
"Show the floor plan in 2D\n\n# Example\n```ts\nawait snaptrude.core.camera.setMode(\"3d\")\n```"
|
|
372
|
+
],
|
|
373
|
+
"argsType": "PluginCameraMode",
|
|
374
|
+
"resultType": "boolean"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"path": "core.camera.setStandardView",
|
|
378
|
+
"namespace": "core.camera",
|
|
379
|
+
"summary": "Snap the camera to a standard view — the five orthographic elevations (`top` / `front` / `back` / `left` / `right`) or the 3D `iso` (isometric perspective) view. Mirrors the canvas view menu. View-state only — not undoable. The orthographic presets exit 2D mode first if needed.",
|
|
380
|
+
"examplePrompts": [
|
|
381
|
+
"Switch to the top view",
|
|
382
|
+
"Show me the front elevation",
|
|
383
|
+
"Go to the isometric view",
|
|
384
|
+
"Look at the model from the left",
|
|
385
|
+
"Give me a plan view from the top\n\n# Example\n```ts\nawait snaptrude.core.camera.setStandardView(\"top\")\n```"
|
|
386
|
+
],
|
|
387
|
+
"argsType": "PluginStandardView",
|
|
388
|
+
"resultType": "boolean"
|
|
389
|
+
},
|
|
350
390
|
{
|
|
351
391
|
"path": "core.comment.create",
|
|
352
392
|
"namespace": "core.comment",
|
|
@@ -2023,6 +2063,46 @@
|
|
|
2023
2063
|
"argsType": "string",
|
|
2024
2064
|
"resultType": "PluginCoreGroupsUpdateResult"
|
|
2025
2065
|
},
|
|
2066
|
+
{
|
|
2067
|
+
"path": "core.handles.beginScope",
|
|
2068
|
+
"namespace": "core.handles",
|
|
2069
|
+
"summary": "Open a mint-recording scope: every arena handle MINTED after this call (fresh mints only — identity-deduped re-registrations of pre-existing objects are not captured) is freed when the matching {@linkcode endScope} runs. Scopes nest, up to 64 deep — always pair begin/end in try/finally.",
|
|
2070
|
+
"examplePrompts": [],
|
|
2071
|
+
"argsType": null,
|
|
2072
|
+
"resultType": "ScopeToken"
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
"path": "core.handles.endScope",
|
|
2076
|
+
"namespace": "core.handles",
|
|
2077
|
+
"summary": "Close a scope by its token and free every handle it recorded, except those listed in `retain`. Retained handles are promoted to the enclosing scope (if any), so nesting composes like block scopes. Closing is token-addressed: an out-of-order close (interleaved async tasks) frees only that scope's mints and leaves other open scopes intact. Always pair begin/end in try/finally so a thrown body cannot leak the scope.",
|
|
2078
|
+
"examplePrompts": [],
|
|
2079
|
+
"argsType": "ScopeToken",
|
|
2080
|
+
"resultType": "void"
|
|
2081
|
+
},
|
|
2082
|
+
{
|
|
2083
|
+
"path": "core.handles.release",
|
|
2084
|
+
"namespace": "core.handles",
|
|
2085
|
+
"summary": "Free arena handles in bulk. Unknown, foreign, or already-released ids are silent no-ops — there is no per-id result and no count, so responses can never be used as an existence oracle.",
|
|
2086
|
+
"examplePrompts": [],
|
|
2087
|
+
"argsType": "ReadonlyArray<AnyArenaHandle>",
|
|
2088
|
+
"resultType": "void"
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
"path": "core.handles.releaseAll",
|
|
2092
|
+
"namespace": "core.handles",
|
|
2093
|
+
"summary": "Free every live arena handle of one kind, or ALL arena handles when the kind is omitted. Useful at batch boundaries — e.g. a poll loop that mints a fresh footprint contour per tick.",
|
|
2094
|
+
"examplePrompts": [],
|
|
2095
|
+
"argsType": "ArenaKind",
|
|
2096
|
+
"resultType": "void"
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
"path": "core.handles.stats",
|
|
2100
|
+
"namespace": "core.handles",
|
|
2101
|
+
"summary": "Live handle-registry statistics for the calling plugin, plus the host page's JS heap usage (when the browser exposes it). Diagnostic surface for verifying that releases actually shrink host memory.",
|
|
2102
|
+
"examplePrompts": [],
|
|
2103
|
+
"argsType": null,
|
|
2104
|
+
"resultType": "PluginHandlesStatsResult"
|
|
2105
|
+
},
|
|
2026
2106
|
{
|
|
2027
2107
|
"path": "core.history.redo",
|
|
2028
2108
|
"namespace": "core.history",
|
|
@@ -2050,6 +2130,19 @@
|
|
|
2050
2130
|
"argsType": "number",
|
|
2051
2131
|
"resultType": "PluginHistoryStepResult"
|
|
2052
2132
|
},
|
|
2133
|
+
{
|
|
2134
|
+
"path": "core.io.export.model",
|
|
2135
|
+
"namespace": "core.io.export",
|
|
2136
|
+
"summary": "Export the model to a 3D file and return its bytes as base64.",
|
|
2137
|
+
"examplePrompts": [
|
|
2138
|
+
"Export the model as a GLB",
|
|
2139
|
+
"Give me the whole scene as an OBJ file",
|
|
2140
|
+
"Export just my selection to GLB",
|
|
2141
|
+
"Download the model as a glTF binary\n\n# Example\n```ts\nconst file = await snaptrude.core.io.export.model(\"glb\")\n// decode base64 → bytes and save/download in the plugin UI\nconst bytes = Uint8Array.from(atob(file.dataBase64), (c) => c.charCodeAt(0))\nconst blob = new Blob([bytes], { type: file.mimeType })\n// ...offer blob for download as file.fileName\n\n// Only the current selection, as OBJ text:\nconst obj = await snaptrude.core.io.export.model(\"obj\", \"selection\")\nconst text = atob(obj.dataBase64)\n```"
|
|
2142
|
+
],
|
|
2143
|
+
"argsType": "ExportModelFormat",
|
|
2144
|
+
"resultType": "ExportedFile"
|
|
2145
|
+
},
|
|
2053
2146
|
{
|
|
2054
2147
|
"path": "core.io.import.cadJson",
|
|
2055
2148
|
"namespace": "core.io.import",
|
|
@@ -3055,9 +3148,9 @@
|
|
|
3055
3148
|
"namespace": "core.proposals",
|
|
3056
3149
|
"summary": "Delete a proposal.",
|
|
3057
3150
|
"examplePrompts": [
|
|
3058
|
-
"Delete proposal prop_2",
|
|
3059
|
-
"Remove this design option and
|
|
3060
|
-
"Merge prop_2's layers into prop_1 and delete prop_2\n\n# Example\n```ts\nawait snaptrude.core.proposals.delete(\"prop_2\", { deleteObjects: true })\n```"
|
|
3151
|
+
"Delete proposal prop_2 and everything in it",
|
|
3152
|
+
"Remove this design option and destroy its geometry",
|
|
3153
|
+
"Merge prop_2's layers into prop_1 and delete prop_2\n\n# Example\n```ts\n// destroy the proposal and its exclusive geometry\nawait snaptrude.core.proposals.delete(\"prop_2\", { deleteObjects: true })\n// …or keep the geometry by transferring its buckets to prop_1 first\nawait snaptrude.core.proposals.delete(\"prop_2\", { targetProposalId: \"prop_1\" })\n```"
|
|
3061
3154
|
],
|
|
3062
3155
|
"argsType": "string",
|
|
3063
3156
|
"resultType": "PluginCoreProposalsDeleteResult"
|
|
@@ -3379,6 +3472,19 @@
|
|
|
3379
3472
|
"argsType": "PUnitType",
|
|
3380
3473
|
"resultType": "boolean"
|
|
3381
3474
|
},
|
|
3475
|
+
{
|
|
3476
|
+
"path": "core.user.getLocale",
|
|
3477
|
+
"namespace": "core.user",
|
|
3478
|
+
"summary": "Get the viewer's locale: IANA timezone and BCP-47 language tag, resolved from the browser (`Intl.DateTimeFormat().resolvedOptions().timeZone` and `navigator.language`). Locale only — no precise location.",
|
|
3479
|
+
"examplePrompts": [
|
|
3480
|
+
"What timezone is the user in?",
|
|
3481
|
+
"Get the viewer's language for localized labels",
|
|
3482
|
+
"Format the report date in the user's local timezone",
|
|
3483
|
+
"Which locale should I use for this plugin's UI?\n\n# Example\n```ts\nconst { timezone, language } = await snaptrude.core.user.getLocale()\n```"
|
|
3484
|
+
],
|
|
3485
|
+
"argsType": null,
|
|
3486
|
+
"resultType": "PluginUserLocale"
|
|
3487
|
+
},
|
|
3382
3488
|
{
|
|
3383
3489
|
"path": "core.zoom.extents",
|
|
3384
3490
|
"namespace": "core.zoom",
|
|
@@ -3604,7 +3710,7 @@
|
|
|
3604
3710
|
"Apply this furniture arrangement to the other offices",
|
|
3605
3711
|
"Replicate this template into these two spaces",
|
|
3606
3712
|
"Place this desk cluster into every meeting room",
|
|
3607
|
-
"Use this room as a template for the rooms I selected but keep them visible\n\n# Example\n```ts\nconst [templateRoom, ...targets] = await snaptrude.design.query.listSpaces({ isSelected: true })\nconst result = await snaptrude.design.create.smartLayout({\ntemplateComponents: [templateRoom],\ntargets,\n})\nconsole.log(\"placed walls:\", result.created.walls.length, \"skipped:\", result.skippedWalls)\n```"
|
|
3713
|
+
"Use this room as a template for the rooms I selected but keep them visible\n\n# Example\n```ts\nconst [templateRoom, ...targets] = await snaptrude.design.query.listSpaces({ isSelected: true })\nconst result = await snaptrude.design.create.smartLayout({\ntemplateComponents: [templateRoom],\ntargets,\n})\nconsole.log(\"placed walls:\", result.created.walls.length, \"skipped:\", result.skippedWalls)\n\n// …or clone a saved group by its id (from core.groups.list)\nconst { groups } = await snaptrude.core.groups.list()\nawait snaptrude.design.create.smartLayout({ templateGroup: groups[0].id, targets })\n```"
|
|
3608
3714
|
],
|
|
3609
3715
|
"argsType": "PluginSmartLayoutArgs",
|
|
3610
3716
|
"resultType": "PluginSmartLayoutResult"
|
|
@@ -3718,6 +3824,19 @@
|
|
|
3718
3824
|
"argsType": "string",
|
|
3719
3825
|
"resultType": "PluginObjectCatalogItem | null"
|
|
3720
3826
|
},
|
|
3827
|
+
{
|
|
3828
|
+
"path": "design.doors.getDimensions",
|
|
3829
|
+
"namespace": "design.doors",
|
|
3830
|
+
"summary": "Get a door's full dimensions in one call — width along the wall, vertical height, and thickness through the wall — measured in the door's local oriented space. Parity with {@linkcode PluginDesignWindowsApi.getDimensions}.",
|
|
3831
|
+
"examplePrompts": [
|
|
3832
|
+
"What are the dimensions of this door?",
|
|
3833
|
+
"How big is the selected door?",
|
|
3834
|
+
"Give me the width, height and depth of this door",
|
|
3835
|
+
"Measure the entrance door including its thickness through the wall\n\n# Example\n```ts\nconst [door] = await snaptrude.design.query.listDoors({ isSelected: true })\nconst dims = await snaptrude.design.doors.getDimensions(door)\nif (dims) console.log(dims.width, dims.height, dims.thickness)\n```"
|
|
3836
|
+
],
|
|
3837
|
+
"argsType": "ComponentHandle",
|
|
3838
|
+
"resultType": "PluginDoorDimensions | null"
|
|
3839
|
+
},
|
|
3721
3840
|
{
|
|
3722
3841
|
"path": "design.doors.getFamily",
|
|
3723
3842
|
"namespace": "design.doors",
|
|
@@ -3929,6 +4048,19 @@
|
|
|
3929
4048
|
"argsType": "string",
|
|
3930
4049
|
"resultType": "PluginFurnitureCatalogItem | null"
|
|
3931
4050
|
},
|
|
4051
|
+
{
|
|
4052
|
+
"path": "design.furniture.getDimensions",
|
|
4053
|
+
"namespace": "design.furniture",
|
|
4054
|
+
"summary": "Get the dimensions of a PLACED furniture item — `length` (along the object), `width` (across it) and `height` (vertical), in engine units. Mirrors the Length/Width/Height fields of the furniture properties panel.",
|
|
4055
|
+
"examplePrompts": [
|
|
4056
|
+
"How big is this sofa?",
|
|
4057
|
+
"What are the dimensions of the selected furniture?",
|
|
4058
|
+
"Measure the length, width and height of this table",
|
|
4059
|
+
"Get the size of the chair I just placed\n\n# Example\n```ts\nconst [item] = await snaptrude.design.query.listFurniture({ isSelected: true })\nconst dims = await snaptrude.design.furniture.getDimensions(item)\nif (dims) console.log(dims.length, dims.width, dims.height)\n```"
|
|
4060
|
+
],
|
|
4061
|
+
"argsType": "ComponentHandle",
|
|
4062
|
+
"resultType": "PluginFurnitureDimensions | null"
|
|
4063
|
+
},
|
|
3932
4064
|
{
|
|
3933
4065
|
"path": "design.furniture.listCatalog",
|
|
3934
4066
|
"namespace": "design.furniture",
|
|
@@ -3956,6 +4088,19 @@
|
|
|
3956
4088
|
"argsType": null,
|
|
3957
4089
|
"resultType": "string[]"
|
|
3958
4090
|
},
|
|
4091
|
+
{
|
|
4092
|
+
"path": "design.furniture.setDimensions",
|
|
4093
|
+
"namespace": "design.furniture",
|
|
4094
|
+
"summary": "Resize a PLACED furniture item along one or more axes — `length`, `width` and/or `height` (engine units). Omitted axes are left unchanged. Each supplied axis is an undoable command, mirroring editing the furniture properties panel.",
|
|
4095
|
+
"examplePrompts": [
|
|
4096
|
+
"Make this table 1.8m long",
|
|
4097
|
+
"Resize the selected sofa to 2000 wide",
|
|
4098
|
+
"Set this furniture to 800mm tall",
|
|
4099
|
+
"Change the desk to 1500 long and 700 deep\n\n# Example\n```ts\nconst [item] = await snaptrude.design.query.listFurniture({ isSelected: true })\nconst { affected } = await snaptrude.design.furniture.setDimensions(item, {\nlength: 1800,\nheight: 750\n})\n```"
|
|
4100
|
+
],
|
|
4101
|
+
"argsType": "ComponentHandle",
|
|
4102
|
+
"resultType": "PluginDesignChangeResult"
|
|
4103
|
+
},
|
|
3959
4104
|
{
|
|
3960
4105
|
"path": "design.isAreaLocked",
|
|
3961
4106
|
"namespace": "design",
|
|
@@ -4731,6 +4876,20 @@
|
|
|
4731
4876
|
"argsType": "ComponentHandle[]",
|
|
4732
4877
|
"resultType": "PluginDesignChangeResult"
|
|
4733
4878
|
},
|
|
4879
|
+
{
|
|
4880
|
+
"path": "design.transform.mirror",
|
|
4881
|
+
"namespace": "design.transform",
|
|
4882
|
+
"summary": "Mirror components **in place** about a horizontal axis, flipping their geometry across that axis through the combined bounding-box centre (the mesh's world-matrix flip + brep inversion + CAD/dimension-line/parametric handling commit atomically). Nothing moves off-centre — this is the toolbar \"flip\", not a translate-and-reflect. Undoable.",
|
|
4883
|
+
"examplePrompts": [
|
|
4884
|
+
"Mirror the selected building across the x axis",
|
|
4885
|
+
"Flip these rooms left to right",
|
|
4886
|
+
"Mirror this furniture block horizontally",
|
|
4887
|
+
"Flip the selected walls front to back",
|
|
4888
|
+
"Create a mirror image of these masses about the z axis\n\n# Example\n```ts\nconst rooms = await snaptrude.design.selection.get()\nawait snaptrude.design.transform.mirror(rooms, \"x\")\n```"
|
|
4889
|
+
],
|
|
4890
|
+
"argsType": "ComponentHandle[]",
|
|
4891
|
+
"resultType": "PluginDesignChangeResult"
|
|
4892
|
+
},
|
|
4734
4893
|
{
|
|
4735
4894
|
"path": "design.transform.move",
|
|
4736
4895
|
"namespace": "design.transform",
|
|
@@ -4758,6 +4917,32 @@
|
|
|
4758
4917
|
"argsType": "ComponentHandle[]",
|
|
4759
4918
|
"resultType": "PluginDesignChangeResult"
|
|
4760
4919
|
},
|
|
4920
|
+
{
|
|
4921
|
+
"path": "design.types.get",
|
|
4922
|
+
"namespace": "design.types",
|
|
4923
|
+
"summary": "Get one building type by its `\"<kind>:<name>\"` id — its labelled layer stack (each layer's role, thickness and material) plus the summed total thickness.",
|
|
4924
|
+
"examplePrompts": [
|
|
4925
|
+
"What layers make up this wall type?",
|
|
4926
|
+
"Show the construction of the exposed-concrete wall",
|
|
4927
|
+
"What's the total thickness of this slab type?",
|
|
4928
|
+
"Which materials are in this roof assembly?\n\n# Example\n```ts\nconst [first] = await snaptrude.design.types.list(\"wall\")\nconst type = await snaptrude.design.types.get(first.id)\nif (type) for (const layer of type.layers) console.log(layer.name, layer.thickness)\n```"
|
|
4929
|
+
],
|
|
4930
|
+
"argsType": "string",
|
|
4931
|
+
"resultType": "PluginBuildingType | null"
|
|
4932
|
+
},
|
|
4933
|
+
{
|
|
4934
|
+
"path": "design.types.list",
|
|
4935
|
+
"namespace": "design.types",
|
|
4936
|
+
"summary": "List the building types of one `kind` (wall / slab / floor / ceiling / roof) — the built-in defaults plus any team/user-added types. Returns lightweight summaries; call {@linkcode PluginDesignTypesApi.get} for the full layer stack.",
|
|
4937
|
+
"examplePrompts": [
|
|
4938
|
+
"What wall types does this project have?",
|
|
4939
|
+
"List the available slab assemblies",
|
|
4940
|
+
"Show me every roof type in the project",
|
|
4941
|
+
"Which floor types can I use?\n\n# Example\n```ts\nconst wallTypes = await snaptrude.design.types.list(\"wall\")\nfor (const t of wallTypes) console.log(t.id, t.label, t.thickness)\n```"
|
|
4942
|
+
],
|
|
4943
|
+
"argsType": "PluginBuildingTypeKind",
|
|
4944
|
+
"resultType": "PluginBuildingTypeSummary[]"
|
|
4945
|
+
},
|
|
4761
4946
|
{
|
|
4762
4947
|
"path": "design.unlock",
|
|
4763
4948
|
"namespace": "design",
|
|
@@ -4784,6 +4969,68 @@
|
|
|
4784
4969
|
"argsType": "ComponentHandle[]",
|
|
4785
4970
|
"resultType": "PluginDesignChangeResult"
|
|
4786
4971
|
},
|
|
4972
|
+
{
|
|
4973
|
+
"path": "design.update.ceiling",
|
|
4974
|
+
"namespace": "design.update",
|
|
4975
|
+
"summary": "Edit a **ceiling's** thickness — the slab-family updater for ceilings (shares the slab thickness command). Undoable. Thickness is in **engine units** (the `design.doors.setWidth` convention) and must be `> 0`.",
|
|
4976
|
+
"examplePrompts": [
|
|
4977
|
+
"Make this ceiling 150mm thick",
|
|
4978
|
+
"Set every ceiling to a 100 thickness",
|
|
4979
|
+
"Thicken the ceiling to 200\n\n# Example\n```ts\nconst [ceiling] = await snaptrude.design.query.listCeilings()\nawait snaptrude.design.update.ceiling(ceiling, { thickness: 150 })\n```"
|
|
4980
|
+
],
|
|
4981
|
+
"argsType": "ComponentHandle",
|
|
4982
|
+
"resultType": "PluginDesignChangeResult"
|
|
4983
|
+
},
|
|
4984
|
+
{
|
|
4985
|
+
"path": "design.update.floor",
|
|
4986
|
+
"namespace": "design.update",
|
|
4987
|
+
"summary": "Edit a **floor's** thickness — the slab-family updater for floors (shares the slab thickness command). Undoable. Thickness is in **engine units** (the `design.doors.setWidth` convention) and must be `> 0`.",
|
|
4988
|
+
"examplePrompts": [
|
|
4989
|
+
"Make this floor 200mm thick",
|
|
4990
|
+
"Set every floor to a 250 thickness",
|
|
4991
|
+
"Thicken the ground floor slab to 300\n\n# Example\n```ts\nconst [floor] = await snaptrude.design.query.listFloors()\nawait snaptrude.design.update.floor(floor, { thickness: 200 })\n```"
|
|
4992
|
+
],
|
|
4993
|
+
"argsType": "ComponentHandle",
|
|
4994
|
+
"resultType": "PluginDesignChangeResult"
|
|
4995
|
+
},
|
|
4996
|
+
{
|
|
4997
|
+
"path": "design.update.roof",
|
|
4998
|
+
"namespace": "design.update",
|
|
4999
|
+
"summary": "Edit a **roof's** thickness — the slab-family updater for roofs (shares the slab thickness command). Undoable. Thickness is in **engine units** (the `design.doors.setWidth` convention) and must be `> 0`.",
|
|
5000
|
+
"examplePrompts": [
|
|
5001
|
+
"Make this roof 300mm thick",
|
|
5002
|
+
"Set the roof slab thickness to 250",
|
|
5003
|
+
"Thicken every roof to 350\n\n# Example\n```ts\nconst [roof] = await snaptrude.design.query.listRoofs()\nawait snaptrude.design.update.roof(roof, { thickness: 300 })\n```"
|
|
5004
|
+
],
|
|
5005
|
+
"argsType": "ComponentHandle",
|
|
5006
|
+
"resultType": "PluginDesignChangeResult"
|
|
5007
|
+
},
|
|
5008
|
+
{
|
|
5009
|
+
"path": "design.update.setBaseOffset",
|
|
5010
|
+
"namespace": "design.update",
|
|
5011
|
+
"summary": "Set a component's **base offset** — its vertical distance above its own storey's base level. Moves the component so its base lands at `storeyBase + offset`, composed over the same command-backed move machinery as {@linkcode setElevation} (undoable, persisted, per-type invariants kept in sync). Use this instead of {@linkcode setElevation} when you want an offset relative to the storey rather than an absolute world height. `offset` is in **engine units** (the `design.doors.setWidth` convention); `0` sits the base flush with the storey base. Re-applying the current offset is a no-op.",
|
|
5012
|
+
"examplePrompts": [
|
|
5013
|
+
"Lift this element 300 above its floor",
|
|
5014
|
+
"Set this staircase's base offset to 0",
|
|
5015
|
+
"Raise the selected mass 500 off the storey base",
|
|
5016
|
+
"Offset this slab 150 above the floor level\n\n# Example\n```ts\nconst [stair] = await snaptrude.design.query.listStaircases()\nawait snaptrude.design.update.setBaseOffset(stair, 0)\n```"
|
|
5017
|
+
],
|
|
5018
|
+
"argsType": "ComponentHandle",
|
|
5019
|
+
"resultType": "PluginDesignChangeResult"
|
|
5020
|
+
},
|
|
5021
|
+
{
|
|
5022
|
+
"path": "design.update.setElevation",
|
|
5023
|
+
"namespace": "design.update",
|
|
5024
|
+
"summary": "Set a component's **absolute world elevation** — moves it vertically so its base (the bounding-box bottom, world Y) lands at `elevation`. Composed over the canonical command-backed move machinery, so it is undoable and persisted exactly like dragging the element up or down; per-type invariants (e.g. a staircase's base offset) stay in sync. `elevation` is in **engine units** (the `design.doors.setWidth` convention). Re-applying the current elevation is a no-op.",
|
|
5025
|
+
"examplePrompts": [
|
|
5026
|
+
"Set this element's elevation to 3000",
|
|
5027
|
+
"Raise this mass so its base sits at 3 metres",
|
|
5028
|
+
"Drop the selected slab to elevation 0",
|
|
5029
|
+
"Put this staircase's base at 3200\n\n# Example\n```ts\n// Sit the roof slab exactly at the top of a 3m storey\nconst [roof] = await snaptrude.design.query.listRoofs()\nawait snaptrude.design.update.setElevation(roof, 3000)\n```"
|
|
5030
|
+
],
|
|
5031
|
+
"argsType": "ComponentHandle",
|
|
5032
|
+
"resultType": "PluginDesignChangeResult"
|
|
5033
|
+
},
|
|
4787
5034
|
{
|
|
4788
5035
|
"path": "design.update.setLabel",
|
|
4789
5036
|
"namespace": "design.update",
|
|
@@ -4797,6 +5044,18 @@
|
|
|
4797
5044
|
"argsType": "ComponentHandle",
|
|
4798
5045
|
"resultType": "boolean"
|
|
4799
5046
|
},
|
|
5047
|
+
{
|
|
5048
|
+
"path": "design.update.slab",
|
|
5049
|
+
"namespace": "design.update",
|
|
5050
|
+
"summary": "Edit a **slab's** thickness — the same command the properties panel's Thickness field drives. Undoable; the slab rebuilds and dimension lines refresh. The thickness is in **engine units** (the same convention as `design.doors.setWidth`) and must be `> 0`.",
|
|
5051
|
+
"examplePrompts": [
|
|
5052
|
+
"Set this slab's thickness to 250mm",
|
|
5053
|
+
"Make the floor slab 300 thick",
|
|
5054
|
+
"Thicken every slab on level 2 to 200\n\n# Example\n```ts\nconst [slab] = await snaptrude.design.query.listSlabs()\nawait snaptrude.design.update.slab(slab, { thickness: 250 })\n```"
|
|
5055
|
+
],
|
|
5056
|
+
"argsType": "ComponentHandle",
|
|
5057
|
+
"resultType": "PluginDesignChangeResult"
|
|
5058
|
+
},
|
|
4800
5059
|
{
|
|
4801
5060
|
"path": "design.update.space",
|
|
4802
5061
|
"namespace": "design.update",
|
|
@@ -4839,6 +5098,59 @@
|
|
|
4839
5098
|
"argsType": "ComponentHandle[]",
|
|
4840
5099
|
"resultType": "PluginDesignChangeResult"
|
|
4841
5100
|
},
|
|
5101
|
+
{
|
|
5102
|
+
"path": "design.update.wall",
|
|
5103
|
+
"namespace": "design.update",
|
|
5104
|
+
"summary": "Edit a **wall's** dimensions — its thickness and/or height — the same command the properties panel's Thickness/Height fields drive. Sparse: only the fields you provide change. Undoable; the geometry rebuilds and any dimension lines refresh. Stacked-wall companions and hosted fenestration are handled exactly as the panel does.",
|
|
5105
|
+
"examplePrompts": [
|
|
5106
|
+
"Make this wall 230mm thick",
|
|
5107
|
+
"Set the selected wall's height to 3 metres",
|
|
5108
|
+
"Thicken every exterior wall to 300",
|
|
5109
|
+
"Raise all the walls on this floor to 3200 tall",
|
|
5110
|
+
"Change this partition to 100mm thick and 2700 high\n\n# Example\n```ts\n// Standardise every wall on storey 1 to a 230mm thickness\nconst walls = await snaptrude.design.query.listWalls({ storeys: [1] })\nfor (const wall of walls) {\nawait snaptrude.design.update.wall(wall, { thickness: 230 })\n}\n```"
|
|
5111
|
+
],
|
|
5112
|
+
"argsType": "ComponentHandle",
|
|
5113
|
+
"resultType": "PluginDesignChangeResult"
|
|
5114
|
+
},
|
|
5115
|
+
{
|
|
5116
|
+
"path": "design.visibility.hide",
|
|
5117
|
+
"namespace": "design.visibility",
|
|
5118
|
+
"summary": "Hide entities from the viewport — the same as the \"Hide\" action. Undoable. Hosted door/window/void children ride along with their wall. Already-hidden entities stay hidden.",
|
|
5119
|
+
"examplePrompts": [
|
|
5120
|
+
"Hide the selected walls",
|
|
5121
|
+
"Conceal these masses so I can see behind them",
|
|
5122
|
+
"Hide every column on this floor",
|
|
5123
|
+
"Make this furniture disappear from view\n\n# Example\n```ts\nconst walls = await snaptrude.design.query.listWalls({ storeys: [1] })\nconst { affected } = await snaptrude.design.visibility.hide(walls)\n```"
|
|
5124
|
+
],
|
|
5125
|
+
"argsType": "ComponentHandle[]",
|
|
5126
|
+
"resultType": "PluginDesignChangeResult"
|
|
5127
|
+
},
|
|
5128
|
+
{
|
|
5129
|
+
"path": "design.visibility.isolate",
|
|
5130
|
+
"namespace": "design.visibility",
|
|
5131
|
+
"summary": "Isolate entities — hide everything else so only the given entities remain visible (the \"Isolate\" / solo action). Undoable. Reverse it with {@linkcode PluginDesignVisibilityApi.showAll}.",
|
|
5132
|
+
"examplePrompts": [
|
|
5133
|
+
"Isolate the selected room so I can focus on it",
|
|
5134
|
+
"Show only these walls and hide the rest",
|
|
5135
|
+
"Solo this mass",
|
|
5136
|
+
"Hide everything except the staircase\n\n# Example\n```ts\nconst [room] = await snaptrude.design.selection.get()\nawait snaptrude.design.visibility.isolate([room])\n```"
|
|
5137
|
+
],
|
|
5138
|
+
"argsType": "ComponentHandle[]",
|
|
5139
|
+
"resultType": "PluginDesignChangeResult"
|
|
5140
|
+
},
|
|
5141
|
+
{
|
|
5142
|
+
"path": "design.visibility.showAll",
|
|
5143
|
+
"namespace": "design.visibility",
|
|
5144
|
+
"summary": "Reveal everything hidden on the active story — the \"Show All\" action, which also exits an isolate. Undoable.",
|
|
5145
|
+
"examplePrompts": [
|
|
5146
|
+
"Show everything again",
|
|
5147
|
+
"Unhide all the hidden objects",
|
|
5148
|
+
"Exit isolate mode",
|
|
5149
|
+
"Reveal everything I hid earlier\n\n# Example\n```ts\nconst { affected } = await snaptrude.design.visibility.showAll()\nconsole.log(`Revealed ${affected.length} entities`)\n```"
|
|
5150
|
+
],
|
|
5151
|
+
"argsType": null,
|
|
5152
|
+
"resultType": "PluginDesignChangeResult"
|
|
5153
|
+
},
|
|
4842
5154
|
{
|
|
4843
5155
|
"path": "design.windows.exists",
|
|
4844
5156
|
"namespace": "design.windows",
|
|
@@ -5065,6 +5377,19 @@
|
|
|
5065
5377
|
"argsType": "number",
|
|
5066
5378
|
"resultType": "PluginStoryCreateResult"
|
|
5067
5379
|
},
|
|
5380
|
+
{
|
|
5381
|
+
"path": "entity.story.delete",
|
|
5382
|
+
"namespace": "entity.story",
|
|
5383
|
+
"summary": "Delete a story and everything on it — the same as removing it from the storey panel. Every element placed on the story (walls, floors, masses, …) is deleted with it, the remaining stories are re-stacked, and the active story falls back to an adjacent one. Committed as a single undo step.",
|
|
5384
|
+
"examplePrompts": [
|
|
5385
|
+
"Delete the top floor",
|
|
5386
|
+
"Remove the basement level",
|
|
5387
|
+
"Get rid of storey 3",
|
|
5388
|
+
"Delete the second floor and everything on it\n\n# Example\n```ts\nconst { newActiveStory } = await snaptrude.entity.story.delete(3)\nconsole.log(`Deleted story 3; now on story ${newActiveStory}`)\n```"
|
|
5389
|
+
],
|
|
5390
|
+
"argsType": "number",
|
|
5391
|
+
"resultType": "PluginStoryDeleteResult"
|
|
5392
|
+
},
|
|
5068
5393
|
{
|
|
5069
5394
|
"path": "entity.story.duplicate",
|
|
5070
5395
|
"namespace": "entity.story",
|
|
@@ -5105,15 +5430,29 @@
|
|
|
5105
5430
|
"argsType": null,
|
|
5106
5431
|
"resultType": "PluginStoryGetAllResult"
|
|
5107
5432
|
},
|
|
5433
|
+
{
|
|
5434
|
+
"path": "entity.story.setActive",
|
|
5435
|
+
"namespace": "entity.story",
|
|
5436
|
+
"summary": "Make a story the active story — the same as clicking it in the storey/layer panel. Subsequent draws and creates target this story, and in 2D the viewport switches to it. This is a view/navigation change: it is **not** undoable and commits nothing to the model.",
|
|
5437
|
+
"examplePrompts": [
|
|
5438
|
+
"Switch to the second floor",
|
|
5439
|
+
"Make the ground storey active",
|
|
5440
|
+
"Go to the basement level",
|
|
5441
|
+
"Set level 3 as the current storey\n\n# Example\n```ts\n// Activate story 2, then draw a wall — it lands on story 2.\nawait snaptrude.entity.story.setActive(2)\n```"
|
|
5442
|
+
],
|
|
5443
|
+
"argsType": "number",
|
|
5444
|
+
"resultType": "PluginStorySetActiveResult"
|
|
5445
|
+
},
|
|
5108
5446
|
{
|
|
5109
5447
|
"path": "entity.story.update",
|
|
5110
5448
|
"namespace": "entity.story",
|
|
5111
|
-
"summary": "Update a story's floor-to-floor height
|
|
5449
|
+
"summary": "Update a story's floor-to-floor `height` and/or `name`.",
|
|
5112
5450
|
"examplePrompts": [
|
|
5113
5451
|
"Change the ground floor height to 3.5 metres",
|
|
5114
5452
|
"Make the second storey taller",
|
|
5453
|
+
"Rename the ground floor to \"Lobby\"",
|
|
5115
5454
|
"Set the floor-to-floor height of level 1",
|
|
5116
|
-
"
|
|
5455
|
+
"Rename storey 2 and make it taller in one go\n\n# Example\n```ts\n// Set ground floor height to 5 Babylon units — walls stretch and the\n// floors above move up to match, all in a single undo step.\nconst result = await snaptrude.entity.story.update(1, 5)\n// Rename only, leaving the height untouched.\nawait snaptrude.entity.story.update(1, undefined, { name: \"Lobby\" })\n```"
|
|
5117
5456
|
],
|
|
5118
5457
|
"argsType": "number",
|
|
5119
5458
|
"resultType": "PluginStoryUpdateResult"
|
|
@@ -5180,6 +5519,20 @@
|
|
|
5180
5519
|
"argsType": "string",
|
|
5181
5520
|
"resultType": "PluginPresentationDiagramsPlaceResult"
|
|
5182
5521
|
},
|
|
5522
|
+
{
|
|
5523
|
+
"path": "presentation.export",
|
|
5524
|
+
"namespace": "presentation",
|
|
5525
|
+
"summary": "Export the presentation's layout sheets to a downloadable file (PDF / PNG / JPG) and return the encoded bytes as base64. Wraps the Present-mode Export dialog pipeline headlessly. Requires Present mode to be open.",
|
|
5526
|
+
"examplePrompts": [
|
|
5527
|
+
"Export the presentation as a PDF",
|
|
5528
|
+
"Download all sheets as a single PDF",
|
|
5529
|
+
"Export sheet 1 as a PNG",
|
|
5530
|
+
"Save the presentation sheets as JPG images",
|
|
5531
|
+
"Export these sheets to PDF at high resolution\n\n# Example\n```ts\nconst { files } = await snaptrude.presentation.export(\"pdf\")\n```"
|
|
5532
|
+
],
|
|
5533
|
+
"argsType": "PluginPresentationExportFormat",
|
|
5534
|
+
"resultType": "PluginPresentationExportResult"
|
|
5535
|
+
},
|
|
5183
5536
|
{
|
|
5184
5537
|
"path": "presentation.import.image",
|
|
5185
5538
|
"namespace": "presentation.import",
|
|
@@ -5209,7 +5562,7 @@
|
|
|
5209
5562
|
{
|
|
5210
5563
|
"path": "presentation.import.svg",
|
|
5211
5564
|
"namespace": "presentation.import",
|
|
5212
|
-
"summary": "Import an SVG onto the current Present sheet as a
|
|
5565
|
+
"summary": "Import an SVG onto the current Present sheet as a vector asset.",
|
|
5213
5566
|
"examplePrompts": [
|
|
5214
5567
|
"Import this SVG diagram onto the present canvas",
|
|
5215
5568
|
"Add a vector logo to my presentation board",
|
|
@@ -5478,18 +5831,6 @@
|
|
|
5478
5831
|
"argsType": null,
|
|
5479
5832
|
"resultType": "PluginProgramClassificationTypesResult"
|
|
5480
5833
|
},
|
|
5481
|
-
{
|
|
5482
|
-
"path": "program.cores.create",
|
|
5483
|
-
"namespace": "program.cores",
|
|
5484
|
-
"summary": "Generate core geometry from a layout (thin trigger).",
|
|
5485
|
-
"examplePrompts": [
|
|
5486
|
-
"Generate the building cores from this layout",
|
|
5487
|
-
"Place the elevator and stair cores",
|
|
5488
|
-
"Create the service core shells\n\n# Example\n```ts\nawait snaptrude.program.cores.create([\n{ type: \"lift\", position: { x: 0, y: 0, z: 0 }, width: 3, depth: 4 },\n])\n```"
|
|
5489
|
-
],
|
|
5490
|
-
"argsType": "PluginProgramCoreSpec[]",
|
|
5491
|
-
"resultType": "PluginProgramCoresCreateResult"
|
|
5492
|
-
},
|
|
5493
5834
|
{
|
|
5494
5835
|
"path": "program.cores.isCore",
|
|
5495
5836
|
"namespace": "program.cores",
|