@snaptrude/plugin-core 0.3.0 → 0.5.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/AGENTS.md +130 -48
- package/CHANGELOG.md +111 -0
- package/api-manifest.full.json +3999 -0
- package/api-manifest.json +3845 -0
- package/dist/api/core/buildings.d.ts +427 -0
- package/dist/api/core/buildings.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +230 -0
- package/dist/api/core/comment/index.d.ts.map +1 -0
- package/dist/api/core/geom/create/index.d.ts +247 -0
- package/dist/api/core/geom/create/index.d.ts.map +1 -0
- package/dist/api/core/geom/delete/index.d.ts +72 -0
- package/dist/api/core/geom/delete/index.d.ts.map +1 -0
- package/dist/api/core/geom/index.d.ts +24 -23
- package/dist/api/core/geom/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/arc.d.ts +169 -0
- package/dist/api/core/geom/query/arc.d.ts.map +1 -0
- package/dist/api/core/geom/query/brep.d.ts +402 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -0
- package/dist/api/core/geom/query/circle.d.ts +378 -0
- package/dist/api/core/geom/query/circle.d.ts.map +1 -0
- package/dist/api/core/geom/query/contour.d.ts +450 -0
- package/dist/api/core/geom/query/contour.d.ts.map +1 -0
- package/dist/api/core/geom/query/curve.d.ts +918 -0
- package/dist/api/core/geom/query/curve.d.ts.map +1 -0
- package/dist/api/core/geom/query/edge.d.ts +128 -0
- package/dist/api/core/geom/query/edge.d.ts.map +1 -0
- package/dist/api/core/geom/query/face.d.ts +363 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -0
- package/dist/api/core/geom/query/halfedge.d.ts +206 -0
- package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
- package/dist/api/core/geom/query/index.d.ts +61 -0
- package/dist/api/core/geom/query/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/profile.d.ts +410 -0
- package/dist/api/core/geom/query/profile.d.ts.map +1 -0
- package/dist/api/core/geom/query/vertex.d.ts +187 -0
- package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
- package/dist/api/core/geom/update/contour.d.ts +272 -0
- package/dist/api/core/geom/update/contour.d.ts.map +1 -0
- package/dist/api/core/geom/update/curve.d.ts +180 -0
- package/dist/api/core/geom/update/curve.d.ts.map +1 -0
- package/dist/api/core/geom/update/index.d.ts +27 -0
- package/dist/api/core/geom/update/index.d.ts.map +1 -0
- package/dist/api/core/geom/update/profile.d.ts +329 -0
- package/dist/api/core/geom/update/profile.d.ts.map +1 -0
- package/dist/api/core/groups.d.ts +485 -0
- package/dist/api/core/groups.d.ts.map +1 -0
- package/dist/api/core/history/index.d.ts +78 -0
- package/dist/api/core/history/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +46 -1
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +402 -0
- package/dist/api/core/layers.d.ts.map +1 -0
- package/dist/api/core/math/quat.d.ts +111 -128
- package/dist/api/core/math/quat.d.ts.map +1 -1
- package/dist/api/core/math/vec3.d.ts +120 -102
- package/dist/api/core/math/vec3.d.ts.map +1 -1
- package/dist/api/core/project/index.d.ts +399 -0
- package/dist/api/core/project/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +755 -0
- package/dist/api/core/tags.d.ts.map +1 -0
- package/dist/api/core/units/index.d.ts +175 -0
- package/dist/api/core/units/index.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +45 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +168 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +828 -0
- package/dist/api/design/create/index.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +63 -0
- package/dist/api/design/delete/index.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +268 -0
- package/dist/api/design/doors/index.d.ts.map +1 -0
- package/dist/api/design/edit/index.d.ts +49 -0
- package/dist/api/design/edit/index.d.ts.map +1 -0
- package/dist/api/design/erase/index.d.ts +160 -0
- package/dist/api/design/erase/index.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +123 -0
- package/dist/api/design/furniture/index.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +153 -0
- package/dist/api/design/index.d.ts.map +1 -0
- package/dist/api/design/lock.d.ts +41 -0
- package/dist/api/design/lock.d.ts.map +1 -0
- package/dist/api/design/materials/index.d.ts +297 -0
- package/dist/api/design/materials/index.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +140 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +1011 -0
- package/dist/api/design/query/index.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +221 -0
- package/dist/api/design/query/spaces.d.ts.map +1 -0
- package/dist/api/design/selection/index.d.ts +138 -0
- package/dist/api/design/selection/index.d.ts.map +1 -0
- package/dist/api/design/shared.d.ts +38 -0
- package/dist/api/design/shared.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +87 -0
- package/dist/api/design/transform/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +178 -0
- package/dist/api/design/update/index.d.ts.map +1 -0
- package/dist/api/design/windows/index.d.ts +189 -0
- package/dist/api/design/windows/index.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +261 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
- package/dist/api/entity/department.d.ts +0 -98
- package/dist/api/entity/department.d.ts.map +1 -1
- package/dist/api/entity/index.d.ts +9 -9
- package/dist/api/entity/index.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +49 -106
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +482 -249
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +49 -39
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +17 -12
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +440 -0
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +81 -0
- package/dist/api/presentation/diagrams.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +113 -0
- package/dist/api/presentation/import.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +46 -0
- package/dist/api/presentation/index.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +176 -0
- package/dist/api/presentation/sheets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +296 -0
- package/dist/api/presentation/views.d.ts.map +1 -0
- package/dist/api/program/adjacency.d.ts +155 -0
- package/dist/api/program/adjacency.d.ts.map +1 -0
- package/dist/api/program/areas.d.ts +360 -0
- package/dist/api/program/areas.d.ts.map +1 -0
- package/dist/api/program/classification.d.ts +135 -0
- package/dist/api/program/classification.d.ts.map +1 -0
- package/dist/api/program/cores.d.ts +174 -0
- package/dist/api/program/cores.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +431 -0
- package/dist/api/program/departments.d.ts.map +1 -0
- package/dist/api/program/index.d.ts +69 -0
- package/dist/api/program/index.d.ts.map +1 -0
- package/dist/api/program/layout.d.ts +63 -0
- package/dist/api/program/layout.d.ts.map +1 -0
- package/dist/api/program/metrics.d.ts +108 -0
- package/dist/api/program/metrics.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +367 -0
- package/dist/api/program/site.d.ts.map +1 -0
- package/dist/api/program/spreadsheet.d.ts +2041 -0
- package/dist/api/program/spreadsheet.d.ts.map +1 -0
- package/dist/handles.d.ts +138 -0
- package/dist/handles.d.ts.map +1 -0
- package/dist/host-utils.d.ts +7 -5
- package/dist/host-utils.d.ts.map +1 -1
- package/dist/index.cjs +4001 -904
- 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 +3392 -870
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
- package/scripts/generate-manifest.mjs +193 -0
- package/scripts/generate-manifest.test.mjs +193 -0
- package/src/api/core/buildings.ts +485 -0
- package/src/api/core/comment/index.ts +258 -0
- package/src/api/core/geom/create/index.ts +293 -0
- package/src/api/core/geom/delete/index.ts +78 -0
- package/src/api/core/geom/index.ts +24 -23
- package/src/api/core/geom/query/arc.ts +169 -0
- package/src/api/core/geom/query/brep.ts +444 -0
- package/src/api/core/geom/query/circle.ts +404 -0
- package/src/api/core/geom/query/contour.ts +540 -0
- package/src/api/core/geom/query/curve.ts +1078 -0
- package/src/api/core/geom/query/edge.ts +130 -0
- package/src/api/core/geom/query/face.ts +403 -0
- package/src/api/core/geom/query/halfedge.ts +210 -0
- package/src/api/core/geom/query/index.ts +63 -0
- package/src/api/core/geom/query/profile.ts +473 -0
- package/src/api/core/geom/query/vertex.ts +205 -0
- package/src/api/core/geom/update/contour.ts +315 -0
- package/src/api/core/geom/update/curve.ts +209 -0
- package/src/api/core/geom/update/index.ts +29 -0
- package/src/api/core/geom/update/profile.ts +377 -0
- package/src/api/core/groups.ts +521 -0
- package/src/api/core/history/index.ts +84 -0
- package/src/api/core/index.ts +46 -1
- package/src/api/core/layers.ts +333 -0
- package/src/api/core/math/quat.ts +112 -235
- package/src/api/core/math/vec3.ts +124 -159
- package/src/api/core/project/index.ts +418 -0
- package/src/api/core/tags.ts +808 -0
- package/src/api/core/units/index.ts +164 -0
- package/src/api/core/zoom/index.ts +47 -0
- package/src/api/design/boolean/index.ts +179 -0
- package/src/api/design/create/index.ts +886 -0
- package/src/api/design/delete/index.ts +67 -0
- package/src/api/design/doors/index.ts +285 -0
- package/src/api/design/edit/index.ts +54 -0
- package/src/api/design/erase/index.ts +151 -0
- package/src/api/design/furniture/index.ts +130 -0
- package/src/api/design/index.ts +162 -0
- package/src/api/design/lock.ts +42 -0
- package/src/api/design/materials/index.ts +301 -0
- package/src/api/design/query/geometry/index.ts +166 -0
- package/src/api/design/query/index.ts +937 -0
- package/src/api/design/query/spaces.ts +132 -0
- package/src/api/design/selection/index.ts +144 -0
- package/src/api/design/shared.ts +40 -0
- package/src/api/design/transform/index.ts +93 -0
- package/src/api/design/update/index.ts +117 -0
- package/src/api/design/windows/index.ts +207 -0
- package/src/api/entity/buildableEnvelope.ts +318 -0
- package/src/api/entity/department.ts +0 -113
- package/src/api/entity/index.ts +9 -9
- package/src/api/entity/referenceLine.ts +50 -38
- package/src/api/entity/space.ts +285 -226
- package/src/api/entity/story.ts +53 -42
- package/src/api/index.ts +17 -12
- package/src/api/presentation/aiInspiration.ts +362 -0
- package/src/api/presentation/diagrams.ts +84 -0
- package/src/api/presentation/import.ts +112 -0
- package/src/api/presentation/index.ts +48 -0
- package/src/api/presentation/sheets.ts +198 -0
- package/src/api/presentation/views.ts +303 -0
- package/src/api/program/adjacency.ts +164 -0
- package/src/api/program/areas.ts +335 -0
- package/src/api/program/classification.ts +138 -0
- package/src/api/program/cores.ts +171 -0
- package/src/api/program/departments.ts +465 -0
- package/src/api/program/index.ts +71 -0
- package/src/api/program/layout.ts +68 -0
- package/src/api/program/metrics.ts +120 -0
- package/src/api/program/site.ts +326 -0
- package/src/api/program/spreadsheet.ts +2075 -0
- package/src/handles.ts +148 -0
- package/src/host-utils.ts +10 -6
- package/src/index.ts +1 -0
- package/dist/api/core/geom/arc.d.ts +0 -81
- package/dist/api/core/geom/arc.d.ts.map +0 -1
- package/dist/api/core/geom/curve.d.ts +0 -70
- package/dist/api/core/geom/curve.d.ts.map +0 -1
- package/dist/api/core/geom/line.d.ts +0 -56
- package/dist/api/core/geom/line.d.ts.map +0 -1
- package/dist/api/core/geom/profile.d.ts +0 -121
- package/dist/api/core/geom/profile.d.ts.map +0 -1
- package/dist/api/tools/copy.d.ts +0 -59
- package/dist/api/tools/copy.d.ts.map +0 -1
- package/dist/api/tools/index.d.ts +0 -33
- package/dist/api/tools/index.d.ts.map +0 -1
- package/dist/api/tools/material.d.ts +0 -51
- package/dist/api/tools/material.d.ts.map +0 -1
- package/dist/api/tools/offset.d.ts +0 -43
- package/dist/api/tools/offset.d.ts.map +0 -1
- package/dist/api/tools/selection.d.ts +0 -48
- package/dist/api/tools/selection.d.ts.map +0 -1
- package/dist/api/tools/transform.d.ts +0 -114
- package/dist/api/tools/transform.d.ts.map +0 -1
- package/dist/api/units/index.d.ts +0 -163
- package/dist/api/units/index.d.ts.map +0 -1
- package/src/api/core/geom/arc.ts +0 -70
- package/src/api/core/geom/curve.ts +0 -41
- package/src/api/core/geom/line.ts +0 -53
- package/src/api/core/geom/profile.ts +0 -94
- package/src/api/tools/copy.ts +0 -55
- package/src/api/tools/index.ts +0 -39
- package/src/api/tools/material.ts +0 -49
- package/src/api/tools/offset.ts +0 -43
- package/src/api/tools/selection.ts +0 -51
- package/src/api/tools/transform.ts +0 -117
- package/src/api/units/index.ts +0 -163
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { PluginPresentationViewsApi } from "./views";
|
|
2
|
+
import { PluginPresentationAIInspirationApi } from "./aiInspiration";
|
|
3
|
+
import { PluginPresentationSheetsApi } from "./sheets";
|
|
4
|
+
import { PluginPresentationDiagramsApi } from "./diagrams";
|
|
5
|
+
import { PluginPresentationImportApi } from "./import";
|
|
6
|
+
/**
|
|
7
|
+
* Presentation APIs — prepare and assemble presentations.
|
|
8
|
+
*
|
|
9
|
+
* Reads describe the artifacts a presentation is built from (saved views, layout
|
|
10
|
+
* sheets); writes assemble them (place views/diagrams on sheets, import
|
|
11
|
+
* references, capture/save views). Present-mode AI Inspiration also lives here.
|
|
12
|
+
*
|
|
13
|
+
* Several members require **Present mode to be open** (the documentation editor):
|
|
14
|
+
* sheets, diagram placement, and import.
|
|
15
|
+
*
|
|
16
|
+
* - {@linkcode PluginPresentationApi.views} — Saved 2D/3D views (list, get, capture, activate, create)
|
|
17
|
+
* - {@linkcode PluginPresentationApi.sheets} — Layout sheets (list, get, create, place views)
|
|
18
|
+
* - {@linkcode PluginPresentationApi.diagrams} — Place program/adjacency/site diagram images on sheets
|
|
19
|
+
* - {@linkcode PluginPresentationApi.import} — Import reference images/PDFs onto the canvas
|
|
20
|
+
* - {@linkcode PluginPresentationApi.aiInspiration} — Present-mode AI image/video generation
|
|
21
|
+
*
|
|
22
|
+
* Accessed via `snaptrude.presentation`.
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class PluginPresentationApi {
|
|
25
|
+
/** Saved 2D/3D views. See {@linkcode PluginPresentationViewsApi}. */
|
|
26
|
+
abstract views: PluginPresentationViewsApi;
|
|
27
|
+
/** Layout sheets — list/get/create and place views (Present mode). See {@linkcode PluginPresentationSheetsApi}. */
|
|
28
|
+
abstract sheets: PluginPresentationSheetsApi;
|
|
29
|
+
/** Program/adjacency/site diagrams — place images on sheets. See {@linkcode PluginPresentationDiagramsApi}. */
|
|
30
|
+
abstract diagrams: PluginPresentationDiagramsApi;
|
|
31
|
+
/** Import reference images/PDFs onto the Present canvas. See {@linkcode PluginPresentationImportApi}. */
|
|
32
|
+
abstract import: PluginPresentationImportApi;
|
|
33
|
+
/**
|
|
34
|
+
* Present-mode AI Inspiration image/video generation. See
|
|
35
|
+
* {@linkcode PluginPresentationAIInspirationApi}. _(authored ahead — optional
|
|
36
|
+
* until the host lands; the host implementation today is a stub.)_
|
|
37
|
+
*/
|
|
38
|
+
aiInspiration?: PluginPresentationAIInspirationApi;
|
|
39
|
+
constructor();
|
|
40
|
+
}
|
|
41
|
+
export * from "./views";
|
|
42
|
+
export * from "./sheets";
|
|
43
|
+
export * from "./diagrams";
|
|
44
|
+
export * from "./import";
|
|
45
|
+
export * from "./aiInspiration";
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,kCAAkC,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AACtD,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,qBAAqB;IACzC,qEAAqE;IACrE,SAAgB,KAAK,EAAE,0BAA0B,CAAA;IACjD,mHAAmH;IACnH,SAAgB,MAAM,EAAE,2BAA2B,CAAA;IACnD,+GAA+G;IAC/G,SAAgB,QAAQ,EAAE,6BAA6B,CAAA;IACvD,yGAAyG;IACzG,SAAgB,MAAM,EAAE,2BAA2B,CAAA;IACnD;;;;OAIG;IACI,aAAa,CAAC,EAAE,kCAAkC,CAAA;;CAG1D;AAED,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Presentation sheets — the layout sheets a presentation is assembled on.
|
|
5
|
+
*
|
|
6
|
+
* A **sheet** is a page in Present mode that views and diagrams are placed onto.
|
|
7
|
+
* These methods require **Present mode to be open** (the documentation editor) —
|
|
8
|
+
* reads return `[]`/`null` and writes throw when it is not.
|
|
9
|
+
*
|
|
10
|
+
* `list`/`get` are reads; `create` adds a sheet and `place` drops a saved view
|
|
11
|
+
* onto a sheet (returning the id of the created canvas shape).
|
|
12
|
+
*
|
|
13
|
+
* Accessed via `snaptrude.presentation.sheets`.
|
|
14
|
+
*/
|
|
15
|
+
export declare abstract class PluginPresentationSheetsApi {
|
|
16
|
+
constructor();
|
|
17
|
+
/**
|
|
18
|
+
* List the layout sheets in the presentation.
|
|
19
|
+
*
|
|
20
|
+
* @returns A {@linkcode PluginPresentationSheetsListResult} with a `sheets`
|
|
21
|
+
* array (empty when Present mode is closed or there are no sheets).
|
|
22
|
+
*
|
|
23
|
+
* @examplePrompt List all the sheets
|
|
24
|
+
* @examplePrompt How many layout sheets are there?
|
|
25
|
+
* @examplePrompt Show me the presentation sheets
|
|
26
|
+
* @examplePrompt What sheets can I place views on?
|
|
27
|
+
*
|
|
28
|
+
* # Example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const { sheets } = await snaptrude.presentation.sheets.list()
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
abstract list(): PluginApiReturn<PluginPresentationSheetsListResult>;
|
|
34
|
+
/**
|
|
35
|
+
* Get a single sheet by id.
|
|
36
|
+
*
|
|
37
|
+
* @param sheetId - The id of the sheet to read.
|
|
38
|
+
* @returns The matching {@linkcode PluginPresentationSheet}, or `null`.
|
|
39
|
+
*
|
|
40
|
+
* @examplePrompt Get the sheet with id sheet_1
|
|
41
|
+
* @examplePrompt Find the sheet called Cover
|
|
42
|
+
* @examplePrompt Look up a layout sheet by id
|
|
43
|
+
*
|
|
44
|
+
* # Example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const sheet = await snaptrude.presentation.sheets.get("sheet_1")
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
abstract get(sheetId: string): PluginApiReturn<PluginPresentationSheetsGetResult>;
|
|
50
|
+
/**
|
|
51
|
+
* Create a new layout sheet.
|
|
52
|
+
*
|
|
53
|
+
* Requires Present mode to be open.
|
|
54
|
+
*
|
|
55
|
+
* @param name - Display name for the new sheet (optional).
|
|
56
|
+
* @returns The newly created {@linkcode PluginPresentationSheet}.
|
|
57
|
+
* @throws If Present mode is not open.
|
|
58
|
+
*
|
|
59
|
+
* @examplePrompt Create a new sheet called Cover
|
|
60
|
+
* @examplePrompt Add a layout sheet
|
|
61
|
+
* @examplePrompt Make a new presentation sheet named Floor Plans
|
|
62
|
+
*
|
|
63
|
+
* # Example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const sheet = await snaptrude.presentation.sheets.create("Cover")
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
abstract create(name?: string): PluginApiReturn<PluginPresentationSheet>;
|
|
69
|
+
/**
|
|
70
|
+
* Place a saved view onto a sheet.
|
|
71
|
+
*
|
|
72
|
+
* Drops the given view onto the sheet at an optional position and returns the
|
|
73
|
+
* id of the created canvas shape. Requires Present mode to be open.
|
|
74
|
+
*
|
|
75
|
+
* @param sheetId - The id of the sheet to place onto.
|
|
76
|
+
* @param viewId - The id of the saved view to place.
|
|
77
|
+
* @param options - Optional `position` ({@linkcode PluginSheetPosition}) —
|
|
78
|
+
* where to place it (a default is used when omitted).
|
|
79
|
+
* @returns A {@linkcode PluginPresentationSheetsPlaceResult} with the created
|
|
80
|
+
* `shapeId`.
|
|
81
|
+
* @throws If Present mode is not open, or the sheet/view id is invalid.
|
|
82
|
+
*
|
|
83
|
+
* @examplePrompt Place the floor plan on Sheet 1
|
|
84
|
+
* @examplePrompt Add this 3D view to the cover sheet
|
|
85
|
+
* @examplePrompt Drop the site plan onto the layout sheet at 100, 200
|
|
86
|
+
* @examplePrompt Put the Ground Floor view on sheet_1
|
|
87
|
+
*
|
|
88
|
+
* # Example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const { shapeId } = await snaptrude.presentation.sheets.place("sheet_1", "view_123")
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
abstract place(sheetId: string, viewId: string, options?: {
|
|
94
|
+
position?: PluginSheetPosition;
|
|
95
|
+
}): PluginApiReturn<PluginPresentationSheetsPlaceResult>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* A layout sheet in the presentation.
|
|
99
|
+
*
|
|
100
|
+
* | Property | Type | Description |
|
|
101
|
+
* |---|---|---|
|
|
102
|
+
* | `id` | `string` | Unique sheet id |
|
|
103
|
+
* | `name` | `string` | Display name |
|
|
104
|
+
*/
|
|
105
|
+
export declare const PluginPresentationSheet: z.ZodObject<{
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
name: z.ZodString;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
export type PluginPresentationSheet = z.infer<typeof PluginPresentationSheet>;
|
|
110
|
+
/**
|
|
111
|
+
* A position on a sheet/canvas (sheet coordinates).
|
|
112
|
+
*
|
|
113
|
+
* | Property | Type | Description |
|
|
114
|
+
* |---|---|---|
|
|
115
|
+
* | `x` | `number` | X coordinate |
|
|
116
|
+
* | `y` | `number` | Y coordinate |
|
|
117
|
+
*/
|
|
118
|
+
export declare const PluginSheetPosition: z.ZodObject<{
|
|
119
|
+
x: z.ZodNumber;
|
|
120
|
+
y: z.ZodNumber;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export type PluginSheetPosition = z.infer<typeof PluginSheetPosition>;
|
|
123
|
+
/** Result of {@linkcode PluginPresentationSheetsApi.list}. */
|
|
124
|
+
export declare const PluginPresentationSheetsListResult: z.ZodObject<{
|
|
125
|
+
sheets: z.ZodArray<z.ZodObject<{
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
name: z.ZodString;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export type PluginPresentationSheetsListResult = z.infer<typeof PluginPresentationSheetsListResult>;
|
|
131
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.get}. */
|
|
132
|
+
export declare const PluginPresentationSheetsGetArgs: z.ZodObject<{
|
|
133
|
+
id: z.ZodString;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
export type PluginPresentationSheetsGetArgs = z.infer<typeof PluginPresentationSheetsGetArgs>;
|
|
136
|
+
/** Result of {@linkcode PluginPresentationSheetsApi.get} — the sheet, or `null`. */
|
|
137
|
+
export declare const PluginPresentationSheetsGetResult: z.ZodNullable<z.ZodObject<{
|
|
138
|
+
id: z.ZodString;
|
|
139
|
+
name: z.ZodString;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
export type PluginPresentationSheetsGetResult = z.infer<typeof PluginPresentationSheetsGetResult>;
|
|
142
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.create}. */
|
|
143
|
+
export declare const PluginPresentationSheetsCreateArgs: z.ZodObject<{
|
|
144
|
+
name: z.ZodOptional<z.ZodString>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
export type PluginPresentationSheetsCreateArgs = z.infer<typeof PluginPresentationSheetsCreateArgs>;
|
|
147
|
+
/**
|
|
148
|
+
* Arguments for {@linkcode PluginPresentationSheetsApi.place}.
|
|
149
|
+
*
|
|
150
|
+
* | Property | Type | Description |
|
|
151
|
+
* |---|---|---|
|
|
152
|
+
* | `sheetId` | `string` | The sheet to place onto |
|
|
153
|
+
* | `viewId` | `string` | The saved view to place |
|
|
154
|
+
* | `position` | {@linkcode PluginSheetPosition}` \| undefined` | Where to place it (a default is used when omitted) |
|
|
155
|
+
*/
|
|
156
|
+
export declare const PluginPresentationSheetsPlaceArgs: z.ZodObject<{
|
|
157
|
+
sheetId: z.ZodString;
|
|
158
|
+
viewId: z.ZodString;
|
|
159
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
160
|
+
x: z.ZodNumber;
|
|
161
|
+
y: z.ZodNumber;
|
|
162
|
+
}, z.core.$strip>>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
export type PluginPresentationSheetsPlaceArgs = z.infer<typeof PluginPresentationSheetsPlaceArgs>;
|
|
165
|
+
/**
|
|
166
|
+
* Result of {@linkcode PluginPresentationSheetsApi.place}.
|
|
167
|
+
*
|
|
168
|
+
* | Property | Type | Description |
|
|
169
|
+
* |---|---|---|
|
|
170
|
+
* | `shapeId` | `string` | Id of the created canvas shape |
|
|
171
|
+
*/
|
|
172
|
+
export declare const PluginPresentationSheetsPlaceResult: z.ZodObject<{
|
|
173
|
+
shapeId: z.ZodString;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
export type PluginPresentationSheetsPlaceResult = z.infer<typeof PluginPresentationSheetsPlaceResult>;
|
|
176
|
+
//# sourceMappingURL=sheets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheets.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/sheets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;GAWG;AACH,8BAAsB,2BAA2B;;IAG/C;;;;;;;;;;;;;;;OAeG;aACa,IAAI,IAAI,eAAe,CAAC,kCAAkC,CAAC;IAE3E;;;;;;;;;;;;;;OAcG;aACa,GAAG,CACjB,OAAO,EAAE,MAAM,GACd,eAAe,CAAC,iCAAiC,CAAC;IAErD;;;;;;;;;;;;;;;;;OAiBG;aACa,MAAM,CACpB,IAAI,CAAC,EAAE,MAAM,GACZ,eAAe,CAAC,uBAAuB,CAAC;IAE3C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;aACa,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,mBAAmB,CAAA;KAAE,GAC3C,eAAe,CAAC,mCAAmC,CAAC;CACxD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAErE,8DAA8D;AAC9D,eAAO,MAAM,kCAAkC;;;;;iBAE7C,CAAA;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,kCAAkC,CAC1C,CAAA;AAED,iEAAiE;AACjE,eAAO,MAAM,+BAA+B;;iBAE1C,CAAA;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,+BAA+B,CACvC,CAAA;AAED,oFAAoF;AACpF,eAAO,MAAM,iCAAiC;;;kBACV,CAAA;AACpC,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA;AAED,oEAAoE;AACpE,eAAO,MAAM,kCAAkC;;iBAE7C,CAAA;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,kCAAkC,CAC1C,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC;;;;;;;iBAI5C,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"}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Presentation views — read the saved 2D/3D views used to prepare presentations.
|
|
5
|
+
*
|
|
6
|
+
* A **view** is a saved camera/plan: a sheet-ready 2D plan or a saved 3D view.
|
|
7
|
+
* A plugin can list and read views, capture them to images, activate one (move
|
|
8
|
+
* the camera to it), and save the current camera as a new view.
|
|
9
|
+
*
|
|
10
|
+
* `list`/`get`/`getActive`/`capture` are reads; `setActive`/`create` are writes
|
|
11
|
+
* (a view is a camera bookmark — not geometry). Members typed optional (`?`) are
|
|
12
|
+
* authored ahead of the host: declared for plugins/codegen but not yet on the
|
|
13
|
+
* live discovery surface until the host lands them.
|
|
14
|
+
*
|
|
15
|
+
* Accessed via `snaptrude.presentation.views`.
|
|
16
|
+
*/
|
|
17
|
+
export declare abstract class PluginPresentationViewsApi {
|
|
18
|
+
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* List the saved views in the active project.
|
|
21
|
+
*
|
|
22
|
+
* @returns A {@linkcode PluginPresentationViewsListResult} with a `views` array
|
|
23
|
+
* of 2D and 3D views (empty when the project has none).
|
|
24
|
+
*
|
|
25
|
+
* @examplePrompt List all the saved views
|
|
26
|
+
* @examplePrompt What 2D and 3D views are in this project?
|
|
27
|
+
* @examplePrompt Which view is currently active?
|
|
28
|
+
* @examplePrompt Get the names of every presentation view
|
|
29
|
+
* @examplePrompt Show me the 3D views I can put on a sheet
|
|
30
|
+
*
|
|
31
|
+
* # Example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const { views } = await snaptrude.presentation.views.list()
|
|
34
|
+
* const active = views.find((v) => v.isActive)
|
|
35
|
+
* const plans = views.filter((v) => v.type === "2d")
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
abstract list(): PluginApiReturn<PluginPresentationViewsListResult>;
|
|
39
|
+
/**
|
|
40
|
+
* Get a single saved view by id.
|
|
41
|
+
*
|
|
42
|
+
* @param viewId - The id of the view to read.
|
|
43
|
+
* @returns The matching {@linkcode PluginPresentationView}, or `null` if no view
|
|
44
|
+
* has that id.
|
|
45
|
+
*
|
|
46
|
+
* @examplePrompt Get the view with id view_12345
|
|
47
|
+
* @examplePrompt Find the saved view called Ground Floor Plan
|
|
48
|
+
* @examplePrompt Look up a presentation view by its id
|
|
49
|
+
*
|
|
50
|
+
* # Example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const view = await snaptrude.presentation.views.get("view_123")
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
abstract get(viewId: string): PluginApiReturn<PluginPresentationViewsGetResult>;
|
|
56
|
+
/**
|
|
57
|
+
* Get the currently active view.
|
|
58
|
+
*
|
|
59
|
+
* @returns The active {@linkcode PluginPresentationView}, or `null` if none is
|
|
60
|
+
* active.
|
|
61
|
+
*
|
|
62
|
+
* @examplePrompt Which view is active right now?
|
|
63
|
+
* @examplePrompt Get the current view
|
|
64
|
+
* @examplePrompt What view am I looking at?
|
|
65
|
+
*
|
|
66
|
+
* # Example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const active = await snaptrude.presentation.views.getActive()
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
abstract getActive(): PluginApiReturn<PluginPresentationViewsGetResult>;
|
|
72
|
+
/**
|
|
73
|
+
* Capture a screenshot of a view as a base64 image.
|
|
74
|
+
*
|
|
75
|
+
* Captures the **current** viewport by default; pass `viewId` to capture a
|
|
76
|
+
* specific saved view (which briefly applies that view to the scene). Use
|
|
77
|
+
* `format`/`resolution` to control the output.
|
|
78
|
+
*
|
|
79
|
+
* @param options - All optional: `viewId` (capture this saved view; omit for the
|
|
80
|
+
* current viewport), `format` (default `"png"`), `resolution` (e.g. `"1280x720"`).
|
|
81
|
+
* @returns A {@linkcode PluginPresentationViewsCaptureResult} with the base64
|
|
82
|
+
* `image` data URL.
|
|
83
|
+
* @throws If a given `viewId` does not exist.
|
|
84
|
+
*
|
|
85
|
+
* @examplePrompt Take a screenshot of the current view
|
|
86
|
+
* @examplePrompt Capture this view as a PNG
|
|
87
|
+
* @examplePrompt Render the Site Plan view to an image
|
|
88
|
+
* @examplePrompt Export a high-res image of what I'm looking at
|
|
89
|
+
*
|
|
90
|
+
* # Example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const { image } = await snaptrude.presentation.views.capture({ format: "png" })
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
abstract capture(options?: {
|
|
96
|
+
viewId?: string;
|
|
97
|
+
format?: "png" | "jpeg";
|
|
98
|
+
resolution?: string;
|
|
99
|
+
}): PluginApiReturn<PluginPresentationViewsCaptureResult>;
|
|
100
|
+
/**
|
|
101
|
+
* Activate a saved view — move the camera to it and restore its scene state.
|
|
102
|
+
*
|
|
103
|
+
* Applies the view's camera, visibility, and storey state to the live scene.
|
|
104
|
+
* Paired with {@linkcode PluginPresentationViewsApi.getActive}.
|
|
105
|
+
*
|
|
106
|
+
* @param viewId - The id of the view to activate.
|
|
107
|
+
* @returns The id of the now-active view.
|
|
108
|
+
* @throws If no view has the given id.
|
|
109
|
+
*
|
|
110
|
+
* @examplePrompt Switch to the Ground Floor plan view
|
|
111
|
+
* @examplePrompt Make the 3D view active
|
|
112
|
+
* @examplePrompt Go to the view named Entrance
|
|
113
|
+
* @examplePrompt Load the site plan view
|
|
114
|
+
*
|
|
115
|
+
* # Example
|
|
116
|
+
* ```ts
|
|
117
|
+
* await snaptrude.presentation.views.setActive("view_123")
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
abstract setActive(viewId: string): PluginApiReturn<PluginPresentationViewsSetActiveResult>;
|
|
121
|
+
/**
|
|
122
|
+
* Save the current camera/scene state as a new named view.
|
|
123
|
+
*
|
|
124
|
+
* Creates a camera bookmark (not geometry) from where the camera is now.
|
|
125
|
+
*
|
|
126
|
+
* @param name - Name for the new view (a default is used when omitted).
|
|
127
|
+
* @param options - Optional `kind`: what kind of view to save (default `"view"`).
|
|
128
|
+
* @returns The newly created {@linkcode PluginPresentationView}.
|
|
129
|
+
* @throws If the view could not be saved.
|
|
130
|
+
*
|
|
131
|
+
* @examplePrompt Save the current view as Lobby Perspective
|
|
132
|
+
* @examplePrompt Create a new saved view from where I'm looking
|
|
133
|
+
* @examplePrompt Bookmark this camera angle
|
|
134
|
+
* @examplePrompt Save the current 2D plan as a view
|
|
135
|
+
*
|
|
136
|
+
* # Example
|
|
137
|
+
* ```ts
|
|
138
|
+
* const view = await snaptrude.presentation.views.create("Lobby")
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
abstract create(name?: string, options?: {
|
|
142
|
+
kind?: "view" | "sitePlan";
|
|
143
|
+
}): PluginApiReturn<PluginPresentationViewsCreateResult>;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The kind of a saved view: a 2D plan view or a 3D view.
|
|
147
|
+
*/
|
|
148
|
+
export declare const PluginPresentationViewType: z.ZodEnum<{
|
|
149
|
+
"2d": "2d";
|
|
150
|
+
"3d": "3d";
|
|
151
|
+
}>;
|
|
152
|
+
export type PluginPresentationViewType = z.infer<typeof PluginPresentationViewType>;
|
|
153
|
+
/**
|
|
154
|
+
* A saved presentation view.
|
|
155
|
+
*
|
|
156
|
+
* | Property | Type | Description |
|
|
157
|
+
* |---|---|---|
|
|
158
|
+
* | `id` | `string` | Unique view id |
|
|
159
|
+
* | `name` | `string` | Display name |
|
|
160
|
+
* | `type` | `"2d" \| "3d"` | Whether this is a 2D plan view or a 3D view |
|
|
161
|
+
* | `isActive` | `boolean` | Whether this view is the currently active view |
|
|
162
|
+
*/
|
|
163
|
+
export declare const PluginPresentationView: z.ZodObject<{
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
name: z.ZodString;
|
|
166
|
+
type: z.ZodEnum<{
|
|
167
|
+
"2d": "2d";
|
|
168
|
+
"3d": "3d";
|
|
169
|
+
}>;
|
|
170
|
+
isActive: z.ZodBoolean;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
export type PluginPresentationView = z.infer<typeof PluginPresentationView>;
|
|
173
|
+
/**
|
|
174
|
+
* Result of {@linkcode PluginPresentationViewsApi.list}.
|
|
175
|
+
*
|
|
176
|
+
* | Property | Type | Description |
|
|
177
|
+
* |---|---|---|
|
|
178
|
+
* | `views` | {@linkcode PluginPresentationView}`[]` | All saved views in the project |
|
|
179
|
+
*/
|
|
180
|
+
export declare const PluginPresentationViewsListResult: z.ZodObject<{
|
|
181
|
+
views: z.ZodArray<z.ZodObject<{
|
|
182
|
+
id: z.ZodString;
|
|
183
|
+
name: z.ZodString;
|
|
184
|
+
type: z.ZodEnum<{
|
|
185
|
+
"2d": "2d";
|
|
186
|
+
"3d": "3d";
|
|
187
|
+
}>;
|
|
188
|
+
isActive: z.ZodBoolean;
|
|
189
|
+
}, z.core.$strip>>;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
export type PluginPresentationViewsListResult = z.infer<typeof PluginPresentationViewsListResult>;
|
|
192
|
+
/**
|
|
193
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.get}.
|
|
194
|
+
*
|
|
195
|
+
* | Property | Type | Description |
|
|
196
|
+
* |---|---|---|
|
|
197
|
+
* | `id` | `string` | The id of the view to read |
|
|
198
|
+
*/
|
|
199
|
+
export declare const PluginPresentationViewsGetArgs: z.ZodObject<{
|
|
200
|
+
id: z.ZodString;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
export type PluginPresentationViewsGetArgs = z.infer<typeof PluginPresentationViewsGetArgs>;
|
|
203
|
+
/**
|
|
204
|
+
* Result of {@linkcode PluginPresentationViewsApi.get} and
|
|
205
|
+
* {@linkcode PluginPresentationViewsApi.getActive} — the view, or `null` when
|
|
206
|
+
* there is no match / no active view.
|
|
207
|
+
*/
|
|
208
|
+
export declare const PluginPresentationViewsGetResult: z.ZodNullable<z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
name: z.ZodString;
|
|
211
|
+
type: z.ZodEnum<{
|
|
212
|
+
"2d": "2d";
|
|
213
|
+
"3d": "3d";
|
|
214
|
+
}>;
|
|
215
|
+
isActive: z.ZodBoolean;
|
|
216
|
+
}, z.core.$strip>>;
|
|
217
|
+
export type PluginPresentationViewsGetResult = z.infer<typeof PluginPresentationViewsGetResult>;
|
|
218
|
+
/** Image format for {@linkcode PluginPresentationViewsApi.capture}. */
|
|
219
|
+
export declare const PluginPresentationImageFormat: z.ZodEnum<{
|
|
220
|
+
png: "png";
|
|
221
|
+
jpeg: "jpeg";
|
|
222
|
+
}>;
|
|
223
|
+
export type PluginPresentationImageFormat = z.infer<typeof PluginPresentationImageFormat>;
|
|
224
|
+
/**
|
|
225
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.capture}. All optional.
|
|
226
|
+
*
|
|
227
|
+
* | Property | Type | Description |
|
|
228
|
+
* |---|---|---|
|
|
229
|
+
* | `viewId` | `string \| undefined` | Capture this saved view; omit to capture the current viewport |
|
|
230
|
+
* | `format` | `"png" \| "jpeg" \| undefined` | Output image format (default `"png"`) |
|
|
231
|
+
* | `resolution` | `string \| undefined` | Optional resolution hint (e.g. `"1280x720"`) |
|
|
232
|
+
*/
|
|
233
|
+
export declare const PluginPresentationViewsCaptureArgs: z.ZodObject<{
|
|
234
|
+
viewId: z.ZodOptional<z.ZodString>;
|
|
235
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
236
|
+
png: "png";
|
|
237
|
+
jpeg: "jpeg";
|
|
238
|
+
}>>;
|
|
239
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
export type PluginPresentationViewsCaptureArgs = z.infer<typeof PluginPresentationViewsCaptureArgs>;
|
|
242
|
+
/**
|
|
243
|
+
* Result of {@linkcode PluginPresentationViewsApi.capture}.
|
|
244
|
+
*
|
|
245
|
+
* | Property | Type | Description |
|
|
246
|
+
* |---|---|---|
|
|
247
|
+
* | `image` | `string` | The captured image as a base64 data URL |
|
|
248
|
+
*/
|
|
249
|
+
export declare const PluginPresentationViewsCaptureResult: z.ZodObject<{
|
|
250
|
+
image: z.ZodString;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
export type PluginPresentationViewsCaptureResult = z.infer<typeof PluginPresentationViewsCaptureResult>;
|
|
253
|
+
/**
|
|
254
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.setActive}.
|
|
255
|
+
*
|
|
256
|
+
* | Property | Type | Description |
|
|
257
|
+
* |---|---|---|
|
|
258
|
+
* | `id` | `string` | The id of the view to activate |
|
|
259
|
+
*/
|
|
260
|
+
export declare const PluginPresentationViewsSetActiveArgs: z.ZodObject<{
|
|
261
|
+
id: z.ZodString;
|
|
262
|
+
}, z.core.$strip>;
|
|
263
|
+
export type PluginPresentationViewsSetActiveArgs = z.infer<typeof PluginPresentationViewsSetActiveArgs>;
|
|
264
|
+
/** Result of {@linkcode PluginPresentationViewsApi.setActive} — the active view's id. */
|
|
265
|
+
export declare const PluginPresentationViewsSetActiveResult: z.ZodObject<{
|
|
266
|
+
id: z.ZodString;
|
|
267
|
+
}, z.core.$strip>;
|
|
268
|
+
export type PluginPresentationViewsSetActiveResult = z.infer<typeof PluginPresentationViewsSetActiveResult>;
|
|
269
|
+
/**
|
|
270
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.create}. All optional.
|
|
271
|
+
*
|
|
272
|
+
* | Property | Type | Description |
|
|
273
|
+
* |---|---|---|
|
|
274
|
+
* | `name` | `string \| undefined` | Name for the new view (a default is used when omitted) |
|
|
275
|
+
* | `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. |
|
|
276
|
+
*/
|
|
277
|
+
export declare const PluginPresentationViewsCreateArgs: z.ZodObject<{
|
|
278
|
+
name: z.ZodOptional<z.ZodString>;
|
|
279
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
280
|
+
view: "view";
|
|
281
|
+
sitePlan: "sitePlan";
|
|
282
|
+
}>>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
export type PluginPresentationViewsCreateArgs = z.infer<typeof PluginPresentationViewsCreateArgs>;
|
|
285
|
+
/** Result of {@linkcode PluginPresentationViewsApi.create} — the saved view. */
|
|
286
|
+
export declare const PluginPresentationViewsCreateResult: z.ZodObject<{
|
|
287
|
+
id: z.ZodString;
|
|
288
|
+
name: z.ZodString;
|
|
289
|
+
type: z.ZodEnum<{
|
|
290
|
+
"2d": "2d";
|
|
291
|
+
"3d": "3d";
|
|
292
|
+
}>;
|
|
293
|
+
isActive: z.ZodBoolean;
|
|
294
|
+
}, z.core.$strip>;
|
|
295
|
+
export type PluginPresentationViewsCreateResult = z.infer<typeof PluginPresentationViewsCreateResult>;
|
|
296
|
+
//# sourceMappingURL=views.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/views.ts"],"names":[],"mappings":"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"}
|