@snaptrude/plugin-core 0.0.0-dev-20260708130115 → 0.0.0-dev-20260827135706
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 +152 -1
- package/api-manifest.json +3620 -276
- package/dist/api/analysis/daylight.d.ts +603 -0
- package/dist/api/analysis/daylight.d.ts.map +1 -0
- package/dist/api/analysis/heatmaps.d.ts +658 -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 +59 -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/solar.d.ts +249 -0
- package/dist/api/analysis/solar.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/analysis/weather.d.ts +193 -0
- package/dist/api/analysis/weather.d.ts.map +1 -0
- package/dist/api/core/camera/index.d.ts +261 -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 +840 -14
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- 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 +130 -18
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- 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 +34 -0
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/export/index.d.ts +134 -0
- package/dist/api/core/io/export/index.d.ts.map +1 -0
- package/dist/api/core/io/import/index.d.ts +453 -0
- package/dist/api/core/io/import/index.d.ts.map +1 -0
- package/dist/api/core/io/index.d.ts +40 -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 +341 -0
- package/dist/api/core/io/terrain/index.d.ts.map +1 -0
- package/dist/api/core/io/underlay/index.d.ts +805 -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/mode/index.d.ts +99 -0
- package/dist/api/core/mode/index.d.ts.map +1 -0
- package/dist/api/core/project/index.d.ts +68 -1
- package/dist/api/core/project/index.d.ts.map +1 -1
- package/dist/api/core/proposals/index.d.ts +531 -0
- package/dist/api/core/proposals/index.d.ts.map +1 -0
- package/dist/api/core/storeys/index.d.ts +265 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +24 -0
- package/dist/api/core/tags.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/core/zoom/index.d.ts +4 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/boolean/index.d.ts +4 -4
- package/dist/api/design/create/index.d.ts +568 -45
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +3 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +195 -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/family.d.ts +349 -0
- package/dist/api/design/family.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +181 -8
- package/dist/api/design/furniture/index.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +98 -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 +270 -16
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/query/geometry/index.d.ts +112 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +282 -11
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/referenceLines.d.ts +45 -0
- package/dist/api/design/query/referenceLines.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +181 -8
- package/dist/api/design/query/spaces.d.ts.map +1 -1
- 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 +172 -10
- 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 +553 -2
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/visibility.d.ts +126 -0
- package/dist/api/design/visibility.d.ts.map +1 -0
- 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/buildableEnvelope.d.ts +4 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +10 -2
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +21 -21
- package/dist/api/entity/story.d.ts +242 -15
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +25 -25
- package/dist/api/presentation/annotate.d.ts +467 -0
- package/dist/api/presentation/annotate.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +111 -8
- package/dist/api/presentation/diagrams.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +108 -0
- package/dist/api/presentation/export.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +55 -4
- package/dist/api/presentation/import.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +58 -1
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +1139 -0
- package/dist/api/presentation/placedViews.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +481 -0
- package/dist/api/presentation/shapes.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +452 -13
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/slideshow.d.ts +125 -0
- package/dist/api/presentation/slideshow.d.ts.map +1 -0
- package/dist/api/presentation/tables.d.ts +81 -0
- package/dist/api/presentation/tables.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +367 -7
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/program/areas.d.ts +102 -12
- 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 +7 -15
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/layout.d.ts +346 -11
- package/dist/api/program/layout.d.ts.map +1 -1
- package/dist/api/program/site.d.ts +469 -13
- package/dist/api/program/site.d.ts.map +1 -1
- package/dist/api/program/spreadsheet.d.ts +365 -41
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +505 -0
- package/dist/api/workspace/index.d.ts.map +1 -0
- 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 +97 -25
- 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 +4582 -1422
- 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 +4171 -1411
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
- package/scripts/generate-manifest.mjs +45 -0
- package/scripts/generate-manifest.test.mjs +103 -4
- package/src/api/analysis/daylight.ts +470 -0
- package/src/api/analysis/heatmaps.ts +683 -0
- package/src/api/analysis/illuminance.ts +155 -0
- package/src/api/analysis/index.ts +61 -0
- package/src/api/analysis/shadows.ts +183 -0
- package/src/api/analysis/solar.ts +237 -0
- package/src/api/analysis/sunlightHours.ts +211 -0
- package/src/api/analysis/sunpath.ts +83 -0
- package/src/api/analysis/weather.ts +179 -0
- package/src/api/core/camera/index.ts +268 -0
- package/src/api/core/comment/index.ts +120 -2
- package/src/api/core/geom/create/index.ts +912 -1
- package/src/api/core/geom/delete/index.ts +6 -0
- package/src/api/core/geom/query/brep.ts +119 -0
- package/src/api/core/handles/index.ts +233 -0
- package/src/api/core/index.ts +34 -0
- package/src/api/core/io/export/index.ts +126 -0
- package/src/api/core/io/import/index.ts +496 -0
- package/src/api/core/io/index.ts +42 -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 +360 -0
- package/src/api/core/io/underlay/index.ts +705 -0
- package/src/api/core/mode/index.ts +96 -0
- package/src/api/core/project/index.ts +62 -1
- package/src/api/core/proposals/index.ts +569 -0
- package/src/api/core/storeys/index.ts +294 -0
- package/src/api/core/tags.ts +27 -0
- package/src/api/core/user.ts +46 -0
- package/src/api/core/zoom/index.ts +4 -0
- package/src/api/design/create/index.ts +670 -30
- package/src/api/design/delete/index.ts +3 -0
- package/src/api/design/doors/index.ts +208 -0
- package/src/api/design/erase/index.ts +1 -1
- package/src/api/design/family.ts +388 -0
- package/src/api/design/furniture/index.ts +197 -8
- package/src/api/design/index.ts +102 -0
- package/src/api/design/lock.ts +27 -0
- package/src/api/design/materials/index.ts +334 -27
- package/src/api/design/query/geometry/index.ts +125 -3
- package/src/api/design/query/index.ts +217 -7
- package/src/api/design/query/referenceLines.ts +52 -0
- package/src/api/design/query/spaces.ts +143 -0
- package/src/api/design/selection/index.ts +129 -0
- package/src/api/design/transform/index.ts +170 -9
- package/src/api/design/types/index.ts +156 -0
- package/src/api/design/update/index.ts +631 -3
- package/src/api/design/visibility.ts +143 -0
- package/src/api/design/windows/index.ts +128 -2
- package/src/api/entity/buildableEnvelope.ts +4 -0
- package/src/api/entity/referenceLine.ts +8 -0
- package/src/api/entity/story.ts +259 -15
- package/src/api/index.ts +10 -0
- package/src/api/presentation/annotate.ts +385 -0
- package/src/api/presentation/diagrams.ts +118 -8
- package/src/api/presentation/export.ts +108 -0
- package/src/api/presentation/import.ts +51 -4
- package/src/api/presentation/index.ts +66 -1
- package/src/api/presentation/placedViews.ts +1120 -0
- package/src/api/presentation/shapes.ts +274 -0
- package/src/api/presentation/sheets.ts +400 -13
- package/src/api/presentation/slideshow.ts +134 -0
- package/src/api/presentation/tables.ts +84 -0
- package/src/api/presentation/views.ts +376 -8
- package/src/api/program/areas.ts +88 -15
- package/src/api/program/cores.ts +3 -91
- package/src/api/program/index.ts +7 -15
- package/src/api/program/layout.ts +365 -11
- package/src/api/program/site.ts +435 -13
- package/src/api/program/spreadsheet.ts +376 -35
- package/src/api/workspace/index.ts +563 -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 +123 -13
- package/src/host-utils.ts +4 -0
- package/src/index.ts +1 -0
- package/test/errors.test.mjs +184 -0
- package/tsconfig.json +7 -2
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Presentation slideshow — run the Present-mode slideshow programmatically.
|
|
5
|
+
*
|
|
6
|
+
* The scriptable counterpart of the Present toolbar's slideshow: the
|
|
7
|
+
* slideshow plays **all** layout sheets in sheet order (hidden sheets are
|
|
8
|
+
* excluded) — `start` options only pick the slide it opens on. Slide
|
|
9
|
+
* navigation stays with the user (arrow keys / on-screen controls); there is
|
|
10
|
+
* intentionally no `next`/`prev`/`goTo`.
|
|
11
|
+
*
|
|
12
|
+
* **Fullscreen caveat:** browsers only grant fullscreen on a user gesture. A
|
|
13
|
+
* plugin-triggered `start` usually fails that check, in which case the
|
|
14
|
+
* slideshow catches the rejection and runs non-fullscreen (same slides, same
|
|
15
|
+
* controls, windowed).
|
|
16
|
+
*
|
|
17
|
+
* `start`/`stop` are write-gated; `getState` is a never-throw read. Requires
|
|
18
|
+
* Present mode to be open (except `getState`, which reports not-running).
|
|
19
|
+
*
|
|
20
|
+
* Accessed via `snaptrude.presentation.slideshow`.
|
|
21
|
+
*/
|
|
22
|
+
export declare abstract class PluginPresentationSlideshowApi {
|
|
23
|
+
constructor();
|
|
24
|
+
/**
|
|
25
|
+
* Start the slideshow.
|
|
26
|
+
*
|
|
27
|
+
* Launches the Present-mode slideshow over all layout sheets in sheet
|
|
28
|
+
* order. `options.startIndex` opens on that slide (clamped into range);
|
|
29
|
+
* otherwise `options.sheetIds` naming exactly one sheet opens on that
|
|
30
|
+
* sheet; otherwise it opens on the first slide. May run non-fullscreen —
|
|
31
|
+
* see the fullscreen caveat on
|
|
32
|
+
* {@linkcode PluginPresentationSlideshowApi}. Requires Present mode to be
|
|
33
|
+
* open with at least one sheet.
|
|
34
|
+
*
|
|
35
|
+
* @param options - Optional `sheetIds` (open on this sheet when exactly one
|
|
36
|
+
* id is given) and `startIndex` (0-based slide to open on; wins over
|
|
37
|
+
* `sheetIds`; clamped into range).
|
|
38
|
+
* @returns The {@linkcode PluginPresentationSlideshowState} after the
|
|
39
|
+
* launch (`running: true` and the opening `index`).
|
|
40
|
+
* @throws If Present mode is not open or there are no sheets to present.
|
|
41
|
+
*
|
|
42
|
+
* @examplePrompt Start the slideshow
|
|
43
|
+
* @examplePrompt Present the sheets from the beginning
|
|
44
|
+
* @examplePrompt Start the slideshow on sheet 3
|
|
45
|
+
* @examplePrompt Play the presentation starting at the cover sheet
|
|
46
|
+
*
|
|
47
|
+
* # Example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const state = await snaptrude.presentation.slideshow.start({ startIndex: 2 })
|
|
50
|
+
* console.log(state.running, state.index) // true, 2
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
abstract start(options?: {
|
|
54
|
+
sheetIds?: string[];
|
|
55
|
+
startIndex?: number;
|
|
56
|
+
}): PluginApiReturn<PluginPresentationSlideshowState>;
|
|
57
|
+
/**
|
|
58
|
+
* Stop the slideshow.
|
|
59
|
+
*
|
|
60
|
+
* Closes the running slideshow (exiting fullscreen if it entered it) and
|
|
61
|
+
* returns to the Present canvas. A no-op when no slideshow is running.
|
|
62
|
+
*
|
|
63
|
+
* @returns The {@linkcode PluginPresentationSlideshowState} after the stop
|
|
64
|
+
* (`running: false`).
|
|
65
|
+
* @throws If Present mode is not open.
|
|
66
|
+
*
|
|
67
|
+
* @examplePrompt Stop the slideshow
|
|
68
|
+
* @examplePrompt Exit the presentation
|
|
69
|
+
* @examplePrompt Close the slideshow and go back to the sheets
|
|
70
|
+
*
|
|
71
|
+
* # Example
|
|
72
|
+
* ```ts
|
|
73
|
+
* await snaptrude.presentation.slideshow.stop()
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
abstract stop(): PluginApiReturn<PluginPresentationSlideshowState>;
|
|
77
|
+
/**
|
|
78
|
+
* Read the slideshow state.
|
|
79
|
+
*
|
|
80
|
+
* A never-throw read: reports whether a slideshow is running and, when it
|
|
81
|
+
* is, the current 0-based slide index (`index` is `null` when not
|
|
82
|
+
* running — including when Present mode is closed).
|
|
83
|
+
*
|
|
84
|
+
* @returns The current {@linkcode PluginPresentationSlideshowState}.
|
|
85
|
+
*
|
|
86
|
+
* @examplePrompt Is the slideshow running?
|
|
87
|
+
* @examplePrompt Which slide is the presentation on?
|
|
88
|
+
* @examplePrompt Check the slideshow state
|
|
89
|
+
*
|
|
90
|
+
* # Example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const { running, index } = await snaptrude.presentation.slideshow.getState()
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
abstract getState(): PluginApiReturn<PluginPresentationSlideshowState>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Arguments for {@linkcode PluginPresentationSlideshowApi.start}.
|
|
99
|
+
*
|
|
100
|
+
* | Property | Type | Description |
|
|
101
|
+
* |---|---|---|
|
|
102
|
+
* | `sheetIds` | `string[] \| undefined` | Open on this sheet when exactly one id is given |
|
|
103
|
+
* | `startIndex` | `number \| undefined` | 0-based slide to open on (wins over `sheetIds`; clamped) |
|
|
104
|
+
*/
|
|
105
|
+
export declare const PluginPresentationSlideshowStartArgs: z.ZodObject<{
|
|
106
|
+
sheetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
107
|
+
startIndex: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
export type PluginPresentationSlideshowStartArgs = z.infer<typeof PluginPresentationSlideshowStartArgs>;
|
|
110
|
+
/**
|
|
111
|
+
* The slideshow state — result of {@linkcode PluginPresentationSlideshowApi.start},
|
|
112
|
+
* {@linkcode PluginPresentationSlideshowApi.stop}, and
|
|
113
|
+
* {@linkcode PluginPresentationSlideshowApi.getState}.
|
|
114
|
+
*
|
|
115
|
+
* | Property | Type | Description |
|
|
116
|
+
* |---|---|---|
|
|
117
|
+
* | `running` | `boolean` | Whether a slideshow is currently running |
|
|
118
|
+
* | `index` | `number \| null` | Current 0-based slide index (`null` when not running) |
|
|
119
|
+
*/
|
|
120
|
+
export declare const PluginPresentationSlideshowState: z.ZodObject<{
|
|
121
|
+
running: z.ZodBoolean;
|
|
122
|
+
index: z.ZodNullable<z.ZodNumber>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type PluginPresentationSlideshowState = z.infer<typeof PluginPresentationSlideshowState>;
|
|
125
|
+
//# sourceMappingURL=slideshow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slideshow.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/slideshow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,8BAAsB,8BAA8B;;IAGlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;aACa,KAAK,CAAC,OAAO,CAAC,EAAE;QAC9B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,GAAG,eAAe,CAAC,gCAAgC,CAAC;IAErD;;;;;;;;;;;;;;;;;;OAkBG;aACa,IAAI,IAAI,eAAe,CAAC,gCAAgC,CAAC;IAEzE;;;;;;;;;;;;;;;;;OAiBG;aACa,QAAQ,IAAI,eAAe,CAAC,gCAAgC,CAAC;CAC9E;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,oCAAoC;;;iBAG/C,CAAA;AACF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,oCAAoC,CAC5C,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,gCAAgC,CACxC,CAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
import type { PluginCanvasShape } from "./placedViews";
|
|
4
|
+
/**
|
|
5
|
+
* Presentation tables — place data tables on Present-mode sheets.
|
|
6
|
+
*
|
|
7
|
+
* The scriptable counterpart of the Present canvas's table paste (the flow
|
|
8
|
+
* that turns a Program-mode / Google Sheets / Excel paste into a table
|
|
9
|
+
* shape): {@linkcode PluginPresentationTablesApi.place} takes plain string
|
|
10
|
+
* rows and creates one table shape on a sheet. Requires Present mode to be
|
|
11
|
+
* open.
|
|
12
|
+
*
|
|
13
|
+
* Accessed via `snaptrude.presentation.tables`.
|
|
14
|
+
*/
|
|
15
|
+
export declare abstract class PluginPresentationTablesApi {
|
|
16
|
+
constructor();
|
|
17
|
+
/**
|
|
18
|
+
* Place a table on a sheet.
|
|
19
|
+
*
|
|
20
|
+
* Creates one table shape from `table.rows` — the same shape the Present
|
|
21
|
+
* canvas creates when a spreadsheet table is pasted — and returns the
|
|
22
|
+
* created shape as a canvas-shape record. Cells are plain strings; rows may
|
|
23
|
+
* be ragged (each row needs at least one cell), capped at 10000 cells
|
|
24
|
+
* total. `options.position` is sheet-local (relative to the sheet's
|
|
25
|
+
* top-left, in canvas units — the same convention as `annotate.*`); when
|
|
26
|
+
* omitted the table lands where the paste flow would auto-place it (the
|
|
27
|
+
* center of the current viewport). One undo step. Requires Present mode to
|
|
28
|
+
* be open.
|
|
29
|
+
*
|
|
30
|
+
* @param sheetId - The sheet to place the table on.
|
|
31
|
+
* @param table - The table content: `rows`, an array of string-cell rows.
|
|
32
|
+
* @param options - Optional `position` (`{ x, y }`, relative to the sheet's
|
|
33
|
+
* top-left — defaults to the paste flow's auto-placement).
|
|
34
|
+
* @returns The created table shape as a {@linkcode PluginCanvasShape}.
|
|
35
|
+
* @throws If Present mode is not open, the sheet id is invalid, or the
|
|
36
|
+
* table is empty / exceeds the 10000-cell cap.
|
|
37
|
+
*
|
|
38
|
+
* @examplePrompt Put the area schedule as a table on Sheet 1
|
|
39
|
+
* @examplePrompt Add a table of the room programs to the cover sheet
|
|
40
|
+
* @examplePrompt Paste this data as a table on the sheet
|
|
41
|
+
* @examplePrompt Place a two-column table of space names and areas
|
|
42
|
+
*
|
|
43
|
+
* # Example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const shape = await snaptrude.presentation.tables.place("sheet_1", {
|
|
46
|
+
* rows: [
|
|
47
|
+
* ["Room", "Area"],
|
|
48
|
+
* ["Kitchen", "12.4 m²"],
|
|
49
|
+
* ["Living", "28.0 m²"],
|
|
50
|
+
* ],
|
|
51
|
+
* }, { position: { x: 40, y: 40 } })
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
abstract place(sheetId: string, table: {
|
|
55
|
+
rows: string[][];
|
|
56
|
+
}, options?: {
|
|
57
|
+
position?: {
|
|
58
|
+
x: number;
|
|
59
|
+
y: number;
|
|
60
|
+
};
|
|
61
|
+
}): PluginApiReturn<PluginCanvasShape>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Arguments for {@linkcode PluginPresentationTablesApi.place}.
|
|
65
|
+
*
|
|
66
|
+
* | Property | Type | Description |
|
|
67
|
+
* |---|---|---|
|
|
68
|
+
* | `sheetId` | `string` | The sheet to place the table on |
|
|
69
|
+
* | `rows` | `string[][]` | Table cells as string rows (non-empty; ≤ 10000 cells total) |
|
|
70
|
+
* | `position` | `{ x: number; y: number } \| undefined` | Sheet-local position (default: paste auto-placement) |
|
|
71
|
+
*/
|
|
72
|
+
export declare const PluginPresentationTablesPlaceArgs: z.ZodObject<{
|
|
73
|
+
sheetId: z.ZodString;
|
|
74
|
+
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
75
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
x: z.ZodNumber;
|
|
77
|
+
y: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
export type PluginPresentationTablesPlaceArgs = z.infer<typeof PluginPresentationTablesPlaceArgs>;
|
|
81
|
+
//# sourceMappingURL=tables.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/tables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEtD;;;;;;;;;;GAUG;AACH,8BAAsB,2BAA2B;;IAG/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;aACa,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,EAAE,CAAA;KAAE,EAC3B,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAChD,eAAe,CAAC,iBAAiB,CAAC;CACtC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC;;;;;;;iBAS5C,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA"}
|
|
@@ -5,12 +5,14 @@ import { PluginApiReturn } from "../../types";
|
|
|
5
5
|
*
|
|
6
6
|
* A **view** is a saved camera/plan: a sheet-ready 2D plan or a saved 3D view.
|
|
7
7
|
* A plugin can list and read views, capture them to images, activate one (move
|
|
8
|
-
* the camera to it),
|
|
8
|
+
* the camera to it), save the current camera as a new view, rename or delete a
|
|
9
|
+
* saved view, and read/update a view's display settings (background, color
|
|
10
|
+
* mode, view mode, axis, edges, labels). Each view carries the `storey` it was
|
|
11
|
+
* saved on.
|
|
9
12
|
*
|
|
10
|
-
* `list`/`get`/`getActive`/`capture` are reads;
|
|
11
|
-
* (a view is
|
|
12
|
-
*
|
|
13
|
-
* live discovery surface until the host lands them.
|
|
13
|
+
* `list`/`get`/`getActive`/`capture`/`getSettings` are reads;
|
|
14
|
+
* `setActive`/`create`/`rename`/`delete`/`updateSettings` are writes (a view is
|
|
15
|
+
* a camera bookmark — not geometry).
|
|
14
16
|
*
|
|
15
17
|
* Accessed via `snaptrude.presentation.views`.
|
|
16
18
|
*/
|
|
@@ -124,23 +126,165 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
124
126
|
* Creates a camera bookmark (not geometry) from where the camera is now.
|
|
125
127
|
*
|
|
126
128
|
* @param name - Name for the new view (a default is used when omitted).
|
|
127
|
-
* @param options - Optional `kind
|
|
129
|
+
* @param options - Optional `kind` (what kind of view to save, default
|
|
130
|
+
* `"view"`) and `storey` (save the view on a specific storey — the storey is
|
|
131
|
+
* activated first, matching the storey the view is captured on; when omitted
|
|
132
|
+
* the current active storey is used).
|
|
128
133
|
* @returns The newly created {@linkcode PluginPresentationView}.
|
|
129
|
-
* @throws If the view could
|
|
134
|
+
* @throws If `storey` is given but no such storey exists, or the view could
|
|
135
|
+
* not be saved.
|
|
130
136
|
*
|
|
131
137
|
* @examplePrompt Save the current view as Lobby Perspective
|
|
132
138
|
* @examplePrompt Create a new saved view from where I'm looking
|
|
133
139
|
* @examplePrompt Bookmark this camera angle
|
|
134
140
|
* @examplePrompt Save the current 2D plan as a view
|
|
141
|
+
* @examplePrompt Save a view on the second storey
|
|
135
142
|
*
|
|
136
143
|
* # Example
|
|
137
144
|
* ```ts
|
|
138
145
|
* const view = await snaptrude.presentation.views.create("Lobby")
|
|
146
|
+
* // …or capture the view on a specific storey
|
|
147
|
+
* const level2 = await snaptrude.presentation.views.create("Level 2", { storey: 2 })
|
|
139
148
|
* ```
|
|
140
149
|
*/
|
|
141
150
|
abstract create(name?: string, options?: {
|
|
142
151
|
kind?: "view" | "sitePlan";
|
|
152
|
+
storey?: number;
|
|
143
153
|
}): PluginApiReturn<PluginPresentationViewsCreateResult>;
|
|
154
|
+
/**
|
|
155
|
+
* Read a saved view's display settings (background, color mode, view mode,
|
|
156
|
+
* axis, edges, labels).
|
|
157
|
+
*
|
|
158
|
+
* @param viewId - The id of the view to read settings for.
|
|
159
|
+
* @returns The view's {@linkcode PluginPresentationViewSettings}, or `null` if
|
|
160
|
+
* no view has that id.
|
|
161
|
+
*
|
|
162
|
+
* @examplePrompt What color mode is the Ground Floor view using?
|
|
163
|
+
* @examplePrompt Get the display settings for this view
|
|
164
|
+
* @examplePrompt Does the site plan view show axes and labels?
|
|
165
|
+
* @examplePrompt Read the background color of the active view
|
|
166
|
+
*
|
|
167
|
+
* # Example
|
|
168
|
+
* ```ts
|
|
169
|
+
* const settings = await snaptrude.presentation.views.getSettings("view_123")
|
|
170
|
+
* if (settings) console.log(settings.colorMode, settings.backgroundColor)
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
abstract getSettings(viewId: string): PluginApiReturn<PluginPresentationViewsGetSettingsResult>;
|
|
174
|
+
/**
|
|
175
|
+
* Update a saved view's display settings (partial patch — only the fields you
|
|
176
|
+
* pass change).
|
|
177
|
+
*
|
|
178
|
+
* Persists and broadcasts the change; if the view is currently active, the
|
|
179
|
+
* scene updates live. **Not Ctrl+Z-undoable** — view-metadata edits publish
|
|
180
|
+
* directly and do not land on the local undo stack; this matches how the
|
|
181
|
+
* product's own view-settings UI behaves.
|
|
182
|
+
*
|
|
183
|
+
* Label patch semantics (mirroring the product, which stores no label
|
|
184
|
+
* selection while labels are off):
|
|
185
|
+
*
|
|
186
|
+
* - `{ showLabels: true }` alone turns labels on; if the view has no stored
|
|
187
|
+
* selection, the product defaults (`objectLabels`, `areas`) are applied —
|
|
188
|
+
* labels are never "on" with an empty selection (the product has no such
|
|
189
|
+
* state; labels render only while the selection is non-empty).
|
|
190
|
+
* - `{ labels: [...] }` alone sets the selection **and turns labels on**.
|
|
191
|
+
* - `{ showLabels: false }` turns labels off and **clears the stored
|
|
192
|
+
* selection** — a later read returns `labels: []`.
|
|
193
|
+
* - `{ showLabels: false, labels: [...] }` with a non-empty list is
|
|
194
|
+
* contradictory and **rejected** (nothing is silently discarded).
|
|
195
|
+
* - `{ showLabels: true, labels: [] }` is likewise contradictory and
|
|
196
|
+
* **rejected** — pass a non-empty list, or omit `labels` to get the
|
|
197
|
+
* defaults.
|
|
198
|
+
*
|
|
199
|
+
* `colorMode` accepts the `tag:<categoryId>` scheme strings returned by
|
|
200
|
+
* {@linkcode PluginPresentationViewsApi.getSettings}, so read-then-write
|
|
201
|
+
* round-trips a tag-based color scheme unchanged.
|
|
202
|
+
*
|
|
203
|
+
* `viewMode` (`"perspective"` | `"isometric"`) applies to **3D views only** —
|
|
204
|
+
* a 2D plan is always orthographic, so a `viewMode: "perspective"` patch on a
|
|
205
|
+
* 2D view is rejected. `"isometric"` on a 2D plan is accepted as a no-op (the
|
|
206
|
+
* plan is already orthographic), so writing back exactly what
|
|
207
|
+
* {@linkcode PluginPresentationViewsApi.getSettings} returned is always a
|
|
208
|
+
* no-op. On the active view the camera switches projection live (the same
|
|
209
|
+
* toggle the view-settings modal runs); on other views the mode is applied
|
|
210
|
+
* the next time the view is activated.
|
|
211
|
+
*
|
|
212
|
+
* @param viewId - The id of the view to update.
|
|
213
|
+
* @param settings - A partial {@linkcode PluginPresentationViewSettings}; any
|
|
214
|
+
* omitted field is left unchanged.
|
|
215
|
+
* @returns The updated view's `id`.
|
|
216
|
+
* @throws If writes are disabled, no view has the given id, the patch is
|
|
217
|
+
* contradictory (`showLabels: false` with a non-empty `labels`, or
|
|
218
|
+
* `showLabels: true` with an explicitly empty `labels` list), or
|
|
219
|
+
* `viewMode: "perspective"` is patched on a 2D plan view.
|
|
220
|
+
*
|
|
221
|
+
* @examplePrompt Switch this view to monochrome color mode
|
|
222
|
+
* @examplePrompt Turn off the axis in the Ground Floor view
|
|
223
|
+
* @examplePrompt Set the background of the active view to white
|
|
224
|
+
* @examplePrompt Show area labels on this view
|
|
225
|
+
* @examplePrompt Enable hidden-line mode for the section view
|
|
226
|
+
* @examplePrompt Make the 3D view orthographic instead of perspective
|
|
227
|
+
*
|
|
228
|
+
* # Example
|
|
229
|
+
* ```ts
|
|
230
|
+
* await snaptrude.presentation.views.updateSettings("view_123", {
|
|
231
|
+
* colorMode: "monochrome",
|
|
232
|
+
* showAxis: false,
|
|
233
|
+
* })
|
|
234
|
+
* // switch a 3D view to an isometric (orthographic) projection
|
|
235
|
+
* await snaptrude.presentation.views.updateSettings("view_123", {
|
|
236
|
+
* viewMode: "isometric",
|
|
237
|
+
* })
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
abstract updateSettings(viewId: string, settings: Partial<PluginPresentationViewSettings>): PluginApiReturn<PluginPresentationViewsUpdateSettingsResult>;
|
|
241
|
+
/**
|
|
242
|
+
* Rename a saved view.
|
|
243
|
+
*
|
|
244
|
+
* Sets the view's display name — the same label the views panel shows and
|
|
245
|
+
* that `list`/`get` read back. Names must be unique within the proposal and
|
|
246
|
+
* cannot contain the characters `\ : { } [ ] | ; < > ? ~`.
|
|
247
|
+
*
|
|
248
|
+
* @param viewId - The id of the view to rename.
|
|
249
|
+
* @param name - The new display name (non-empty after trimming).
|
|
250
|
+
* @returns The updated {@linkcode PluginPresentationView}.
|
|
251
|
+
* @throws If writes are disabled, no view has the given id, the name is
|
|
252
|
+
* empty/invalid, or another view in the proposal already has that name.
|
|
253
|
+
*
|
|
254
|
+
* @examplePrompt Rename the view Lobby to Entrance Lobby
|
|
255
|
+
* @examplePrompt Call this view Ground Floor Plan
|
|
256
|
+
* @examplePrompt Change the active view's name to Final
|
|
257
|
+
*
|
|
258
|
+
* # Example
|
|
259
|
+
* ```ts
|
|
260
|
+
* const view = await snaptrude.presentation.views.rename("view_123", "Entrance")
|
|
261
|
+
* ```
|
|
262
|
+
*/
|
|
263
|
+
abstract rename(viewId: string, name: string): PluginApiReturn<PluginPresentationViewsRenameResult>;
|
|
264
|
+
/**
|
|
265
|
+
* Delete a saved view.
|
|
266
|
+
*
|
|
267
|
+
* Removes the view from the project and the views panel (the panel's own
|
|
268
|
+
* delete action). If the deleted view was active, the product falls back to
|
|
269
|
+
* the default plan/3D view. Default views (the built-in plan/3D/site-plan
|
|
270
|
+
* entries) cannot be deleted.
|
|
271
|
+
*
|
|
272
|
+
* @param viewId - The id of the view to delete.
|
|
273
|
+
* @returns The id of the deleted view
|
|
274
|
+
* (a {@linkcode PluginPresentationViewsDeleteResult}).
|
|
275
|
+
* @throws If writes are disabled, no view has the given id, or the view is a
|
|
276
|
+
* default view.
|
|
277
|
+
*
|
|
278
|
+
* @examplePrompt Delete the view named Old Draft
|
|
279
|
+
* @examplePrompt Remove this saved view
|
|
280
|
+
* @examplePrompt Get rid of the Lobby camera bookmark
|
|
281
|
+
*
|
|
282
|
+
* # Example
|
|
283
|
+
* ```ts
|
|
284
|
+
* const { id } = await snaptrude.presentation.views.delete("view_123")
|
|
285
|
+
* ```
|
|
286
|
+
*/
|
|
287
|
+
abstract delete(viewId: string): PluginApiReturn<PluginPresentationViewsDeleteResult>;
|
|
144
288
|
}
|
|
145
289
|
/**
|
|
146
290
|
* The kind of a saved view: a 2D plan view or a 3D view.
|
|
@@ -159,6 +303,7 @@ export type PluginPresentationViewType = z.infer<typeof PluginPresentationViewTy
|
|
|
159
303
|
* | `name` | `string` | Display name |
|
|
160
304
|
* | `type` | `"2d" \| "3d"` | Whether this is a 2D plan view or a 3D view |
|
|
161
305
|
* | `isActive` | `boolean` | Whether this view is the currently active view |
|
|
306
|
+
* | `storey` | `number \| null` | The storey this view was saved on (`null` on older views saved without one) |
|
|
162
307
|
*/
|
|
163
308
|
export declare const PluginPresentationView: z.ZodObject<{
|
|
164
309
|
id: z.ZodString;
|
|
@@ -168,6 +313,7 @@ export declare const PluginPresentationView: z.ZodObject<{
|
|
|
168
313
|
"3d": "3d";
|
|
169
314
|
}>;
|
|
170
315
|
isActive: z.ZodBoolean;
|
|
316
|
+
storey: z.ZodNullable<z.ZodNumber>;
|
|
171
317
|
}, z.core.$strip>;
|
|
172
318
|
export type PluginPresentationView = z.infer<typeof PluginPresentationView>;
|
|
173
319
|
/**
|
|
@@ -186,6 +332,7 @@ export declare const PluginPresentationViewsListResult: z.ZodObject<{
|
|
|
186
332
|
"3d": "3d";
|
|
187
333
|
}>;
|
|
188
334
|
isActive: z.ZodBoolean;
|
|
335
|
+
storey: z.ZodNullable<z.ZodNumber>;
|
|
189
336
|
}, z.core.$strip>>;
|
|
190
337
|
}, z.core.$strip>;
|
|
191
338
|
export type PluginPresentationViewsListResult = z.infer<typeof PluginPresentationViewsListResult>;
|
|
@@ -213,6 +360,7 @@ export declare const PluginPresentationViewsGetResult: z.ZodNullable<z.ZodObject
|
|
|
213
360
|
"3d": "3d";
|
|
214
361
|
}>;
|
|
215
362
|
isActive: z.ZodBoolean;
|
|
363
|
+
storey: z.ZodNullable<z.ZodNumber>;
|
|
216
364
|
}, z.core.$strip>>;
|
|
217
365
|
export type PluginPresentationViewsGetResult = z.infer<typeof PluginPresentationViewsGetResult>;
|
|
218
366
|
/** Image format for {@linkcode PluginPresentationViewsApi.capture}. */
|
|
@@ -273,6 +421,7 @@ export type PluginPresentationViewsSetActiveResult = z.infer<typeof PluginPresen
|
|
|
273
421
|
* |---|---|---|
|
|
274
422
|
* | `name` | `string \| undefined` | Name for the new view (a default is used when omitted) |
|
|
275
423
|
* | `kind` | `"view" \| "sitePlan" \| undefined` | What kind of view to save (default `"view"`). `"plan"` is not offered — the host cannot create a plan view without a `planId` this API does not carry. |
|
|
424
|
+
* | `storey` | `number \| undefined` | Save the view on this storey (activated before capture); defaults to the current active storey |
|
|
276
425
|
*/
|
|
277
426
|
export declare const PluginPresentationViewsCreateArgs: z.ZodObject<{
|
|
278
427
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -280,6 +429,7 @@ export declare const PluginPresentationViewsCreateArgs: z.ZodObject<{
|
|
|
280
429
|
view: "view";
|
|
281
430
|
sitePlan: "sitePlan";
|
|
282
431
|
}>>;
|
|
432
|
+
storey: z.ZodOptional<z.ZodNumber>;
|
|
283
433
|
}, z.core.$strip>;
|
|
284
434
|
export type PluginPresentationViewsCreateArgs = z.infer<typeof PluginPresentationViewsCreateArgs>;
|
|
285
435
|
/** Result of {@linkcode PluginPresentationViewsApi.create} — the saved view. */
|
|
@@ -291,6 +441,216 @@ export declare const PluginPresentationViewsCreateResult: z.ZodObject<{
|
|
|
291
441
|
"3d": "3d";
|
|
292
442
|
}>;
|
|
293
443
|
isActive: z.ZodBoolean;
|
|
444
|
+
storey: z.ZodNullable<z.ZodNumber>;
|
|
294
445
|
}, z.core.$strip>;
|
|
295
446
|
export type PluginPresentationViewsCreateResult = z.infer<typeof PluginPresentationViewsCreateResult>;
|
|
447
|
+
/**
|
|
448
|
+
* How the scene is colored in a view.
|
|
449
|
+
*
|
|
450
|
+
* | Value | Meaning |
|
|
451
|
+
* |---|---|
|
|
452
|
+
* | `monochrome` | Flat single-tone shading |
|
|
453
|
+
* | `texture` | Material textures/colors |
|
|
454
|
+
* | `department` | Colored by department |
|
|
455
|
+
* | `tag:<categoryId>` | Colored by a project tag category (e.g. `tag:ZONE`) |
|
|
456
|
+
*
|
|
457
|
+
* The `tag:<categoryId>` form carries the product's tag-based color schemes
|
|
458
|
+
* losslessly — reading a view that uses one returns the `tag:` string as-is,
|
|
459
|
+
* and writing it back preserves the scheme (read-then-write is safe).
|
|
460
|
+
*/
|
|
461
|
+
export declare const PluginPresentationViewColorMode: z.ZodUnion<readonly [z.ZodEnum<{
|
|
462
|
+
department: "department";
|
|
463
|
+
monochrome: "monochrome";
|
|
464
|
+
texture: "texture";
|
|
465
|
+
}>, z.ZodTemplateLiteral<`tag:${string}`>]>;
|
|
466
|
+
export type PluginPresentationViewColorMode = z.infer<typeof PluginPresentationViewColorMode>;
|
|
467
|
+
/**
|
|
468
|
+
* A category of on-canvas labels a view can show.
|
|
469
|
+
*
|
|
470
|
+
* | Value | Meaning |
|
|
471
|
+
* |---|---|
|
|
472
|
+
* | `objectLabels` | Per-object name labels |
|
|
473
|
+
* | `areas` | Area/room labels |
|
|
474
|
+
* | `department` | Department labels |
|
|
475
|
+
*/
|
|
476
|
+
export declare const PluginPresentationViewLabel: z.ZodEnum<{
|
|
477
|
+
department: "department";
|
|
478
|
+
objectLabels: "objectLabels";
|
|
479
|
+
areas: "areas";
|
|
480
|
+
}>;
|
|
481
|
+
export type PluginPresentationViewLabel = z.infer<typeof PluginPresentationViewLabel>;
|
|
482
|
+
/**
|
|
483
|
+
* A view's camera projection: perspective, or isometric (orthographic).
|
|
484
|
+
*
|
|
485
|
+
* | Value | Meaning |
|
|
486
|
+
* |---|---|
|
|
487
|
+
* | `perspective` | Perspective projection (vanishing points) |
|
|
488
|
+
* | `isometric` | Orthographic projection (no perspective distortion) |
|
|
489
|
+
*
|
|
490
|
+
* Applies to 3D views; a 2D plan view is always orthographic and reads
|
|
491
|
+
* `"isometric"`.
|
|
492
|
+
*/
|
|
493
|
+
export declare const PluginPresentationViewMode: z.ZodEnum<{
|
|
494
|
+
perspective: "perspective";
|
|
495
|
+
isometric: "isometric";
|
|
496
|
+
}>;
|
|
497
|
+
export type PluginPresentationViewMode = z.infer<typeof PluginPresentationViewMode>;
|
|
498
|
+
/**
|
|
499
|
+
* A view's display settings.
|
|
500
|
+
*
|
|
501
|
+
* | Property | Type | Description |
|
|
502
|
+
* |---|---|---|
|
|
503
|
+
* | `backgroundColor` | `string` | Canvas background as a hex color (e.g. `#ffffff`) |
|
|
504
|
+
* | `colorMode` | {@linkcode PluginPresentationViewColorMode} | How the scene is colored (including `tag:<categoryId>` schemes) |
|
|
505
|
+
* | `viewMode` | {@linkcode PluginPresentationViewMode} | Camera projection — `"perspective"` or `"isometric"` (orthographic). Writable on 3D views only; a 2D plan always reads `"isometric"` and accepts only `"isometric"` (a no-op) |
|
|
506
|
+
* | `showAxis` | `boolean` | Whether the X/Y/Z axes are shown |
|
|
507
|
+
* | `showEdges` | `boolean` | Whether edges are shown; `false` = hidden-line rendering |
|
|
508
|
+
* | `showLabels` | `boolean` | Master label switch — whether on-canvas labels are shown at all. `true` always pairs with a non-empty `labels` selection (labels render only while the selection is non-empty; there is no labels-on-with-empty-selection state) |
|
|
509
|
+
* | `labels` | {@linkcode PluginPresentationViewLabel}`[]` | Which label categories are selected. When `showLabels` is `false` the view stores no selection and this reads `[]` |
|
|
510
|
+
*/
|
|
511
|
+
export declare const PluginPresentationViewSettings: z.ZodObject<{
|
|
512
|
+
backgroundColor: z.ZodString;
|
|
513
|
+
colorMode: z.ZodUnion<readonly [z.ZodEnum<{
|
|
514
|
+
department: "department";
|
|
515
|
+
monochrome: "monochrome";
|
|
516
|
+
texture: "texture";
|
|
517
|
+
}>, z.ZodTemplateLiteral<`tag:${string}`>]>;
|
|
518
|
+
viewMode: z.ZodEnum<{
|
|
519
|
+
perspective: "perspective";
|
|
520
|
+
isometric: "isometric";
|
|
521
|
+
}>;
|
|
522
|
+
showAxis: z.ZodBoolean;
|
|
523
|
+
showEdges: z.ZodBoolean;
|
|
524
|
+
showLabels: z.ZodBoolean;
|
|
525
|
+
labels: z.ZodArray<z.ZodEnum<{
|
|
526
|
+
department: "department";
|
|
527
|
+
objectLabels: "objectLabels";
|
|
528
|
+
areas: "areas";
|
|
529
|
+
}>>;
|
|
530
|
+
}, z.core.$strip>;
|
|
531
|
+
export type PluginPresentationViewSettings = z.infer<typeof PluginPresentationViewSettings>;
|
|
532
|
+
/**
|
|
533
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.getSettings}.
|
|
534
|
+
*
|
|
535
|
+
* | Property | Type | Description |
|
|
536
|
+
* |---|---|---|
|
|
537
|
+
* | `id` | `string` | The id of the view to read settings for |
|
|
538
|
+
*/
|
|
539
|
+
export declare const PluginPresentationViewsGetSettingsArgs: z.ZodObject<{
|
|
540
|
+
id: z.ZodString;
|
|
541
|
+
}, z.core.$strip>;
|
|
542
|
+
export type PluginPresentationViewsGetSettingsArgs = z.infer<typeof PluginPresentationViewsGetSettingsArgs>;
|
|
543
|
+
/**
|
|
544
|
+
* Result of {@linkcode PluginPresentationViewsApi.getSettings} — the settings,
|
|
545
|
+
* or `null` when no view has that id.
|
|
546
|
+
*/
|
|
547
|
+
export declare const PluginPresentationViewsGetSettingsResult: z.ZodNullable<z.ZodObject<{
|
|
548
|
+
backgroundColor: z.ZodString;
|
|
549
|
+
colorMode: z.ZodUnion<readonly [z.ZodEnum<{
|
|
550
|
+
department: "department";
|
|
551
|
+
monochrome: "monochrome";
|
|
552
|
+
texture: "texture";
|
|
553
|
+
}>, z.ZodTemplateLiteral<`tag:${string}`>]>;
|
|
554
|
+
viewMode: z.ZodEnum<{
|
|
555
|
+
perspective: "perspective";
|
|
556
|
+
isometric: "isometric";
|
|
557
|
+
}>;
|
|
558
|
+
showAxis: z.ZodBoolean;
|
|
559
|
+
showEdges: z.ZodBoolean;
|
|
560
|
+
showLabels: z.ZodBoolean;
|
|
561
|
+
labels: z.ZodArray<z.ZodEnum<{
|
|
562
|
+
department: "department";
|
|
563
|
+
objectLabels: "objectLabels";
|
|
564
|
+
areas: "areas";
|
|
565
|
+
}>>;
|
|
566
|
+
}, z.core.$strip>>;
|
|
567
|
+
export type PluginPresentationViewsGetSettingsResult = z.infer<typeof PluginPresentationViewsGetSettingsResult>;
|
|
568
|
+
/**
|
|
569
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.updateSettings}. The
|
|
570
|
+
* `settings` patch is partial — any omitted field is left unchanged. A patch
|
|
571
|
+
* pairing `showLabels: false` with a non-empty `labels` list, or
|
|
572
|
+
* `showLabels: true` with an explicitly empty `labels` list, is rejected as
|
|
573
|
+
* contradictory (see the method JSDoc for the full label patch semantics).
|
|
574
|
+
*
|
|
575
|
+
* | Property | Type | Description |
|
|
576
|
+
* |---|---|---|
|
|
577
|
+
* | `id` | `string` | The id of the view to update |
|
|
578
|
+
* | `settings` | `Partial<`{@linkcode PluginPresentationViewSettings}`>` | The fields to change |
|
|
579
|
+
*/
|
|
580
|
+
export declare const PluginPresentationViewsUpdateSettingsArgs: z.ZodObject<{
|
|
581
|
+
id: z.ZodString;
|
|
582
|
+
settings: z.ZodObject<{
|
|
583
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
584
|
+
colorMode: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
585
|
+
department: "department";
|
|
586
|
+
monochrome: "monochrome";
|
|
587
|
+
texture: "texture";
|
|
588
|
+
}>, z.ZodTemplateLiteral<`tag:${string}`>]>>;
|
|
589
|
+
viewMode: z.ZodOptional<z.ZodEnum<{
|
|
590
|
+
perspective: "perspective";
|
|
591
|
+
isometric: "isometric";
|
|
592
|
+
}>>;
|
|
593
|
+
showAxis: z.ZodOptional<z.ZodBoolean>;
|
|
594
|
+
showEdges: z.ZodOptional<z.ZodBoolean>;
|
|
595
|
+
showLabels: z.ZodOptional<z.ZodBoolean>;
|
|
596
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
597
|
+
department: "department";
|
|
598
|
+
objectLabels: "objectLabels";
|
|
599
|
+
areas: "areas";
|
|
600
|
+
}>>>;
|
|
601
|
+
}, z.core.$strip>;
|
|
602
|
+
}, z.core.$strip>;
|
|
603
|
+
export type PluginPresentationViewsUpdateSettingsArgs = z.infer<typeof PluginPresentationViewsUpdateSettingsArgs>;
|
|
604
|
+
/** Result of {@linkcode PluginPresentationViewsApi.updateSettings} — the updated view's id. */
|
|
605
|
+
export declare const PluginPresentationViewsUpdateSettingsResult: z.ZodObject<{
|
|
606
|
+
id: z.ZodString;
|
|
607
|
+
}, z.core.$strip>;
|
|
608
|
+
export type PluginPresentationViewsUpdateSettingsResult = z.infer<typeof PluginPresentationViewsUpdateSettingsResult>;
|
|
609
|
+
/**
|
|
610
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.rename}.
|
|
611
|
+
*
|
|
612
|
+
* | Property | Type | Description |
|
|
613
|
+
* |---|---|---|
|
|
614
|
+
* | `id` | `string` | The id of the view to rename |
|
|
615
|
+
* | `name` | `string` | New display name (non-empty after trimming) |
|
|
616
|
+
*/
|
|
617
|
+
export declare const PluginPresentationViewsRenameArgs: z.ZodObject<{
|
|
618
|
+
id: z.ZodString;
|
|
619
|
+
name: z.ZodString;
|
|
620
|
+
}, z.core.$strip>;
|
|
621
|
+
export type PluginPresentationViewsRenameArgs = z.infer<typeof PluginPresentationViewsRenameArgs>;
|
|
622
|
+
/** Result of {@linkcode PluginPresentationViewsApi.rename} — the renamed view. */
|
|
623
|
+
export declare const PluginPresentationViewsRenameResult: z.ZodObject<{
|
|
624
|
+
id: z.ZodString;
|
|
625
|
+
name: z.ZodString;
|
|
626
|
+
type: z.ZodEnum<{
|
|
627
|
+
"2d": "2d";
|
|
628
|
+
"3d": "3d";
|
|
629
|
+
}>;
|
|
630
|
+
isActive: z.ZodBoolean;
|
|
631
|
+
storey: z.ZodNullable<z.ZodNumber>;
|
|
632
|
+
}, z.core.$strip>;
|
|
633
|
+
export type PluginPresentationViewsRenameResult = z.infer<typeof PluginPresentationViewsRenameResult>;
|
|
634
|
+
/**
|
|
635
|
+
* Arguments for {@linkcode PluginPresentationViewsApi.delete}.
|
|
636
|
+
*
|
|
637
|
+
* | Property | Type | Description |
|
|
638
|
+
* |---|---|---|
|
|
639
|
+
* | `id` | `string` | The id of the view to delete |
|
|
640
|
+
*/
|
|
641
|
+
export declare const PluginPresentationViewsDeleteArgs: z.ZodObject<{
|
|
642
|
+
id: z.ZodString;
|
|
643
|
+
}, z.core.$strip>;
|
|
644
|
+
export type PluginPresentationViewsDeleteArgs = z.infer<typeof PluginPresentationViewsDeleteArgs>;
|
|
645
|
+
/**
|
|
646
|
+
* Result of {@linkcode PluginPresentationViewsApi.delete}.
|
|
647
|
+
*
|
|
648
|
+
* | Property | Type | Description |
|
|
649
|
+
* |---|---|---|
|
|
650
|
+
* | `id` | `string` | Id of the deleted view |
|
|
651
|
+
*/
|
|
652
|
+
export declare const PluginPresentationViewsDeleteResult: z.ZodObject<{
|
|
653
|
+
id: z.ZodString;
|
|
654
|
+
}, z.core.$strip>;
|
|
655
|
+
export type PluginPresentationViewsDeleteResult = z.infer<typeof PluginPresentationViewsDeleteResult>;
|
|
296
656
|
//# sourceMappingURL=views.d.ts.map
|