@snaptrude/plugin-core 0.8.0 → 0.9.1

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.
Files changed (129) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/api-manifest.full.json +1350 -89
  3. package/api-manifest.json +1146 -48
  4. package/dist/api/analysis/daylight.d.ts +603 -0
  5. package/dist/api/analysis/daylight.d.ts.map +1 -0
  6. package/dist/api/analysis/heatmaps.d.ts +438 -14
  7. package/dist/api/analysis/heatmaps.d.ts.map +1 -1
  8. package/dist/api/analysis/index.d.ts +15 -0
  9. package/dist/api/analysis/index.d.ts.map +1 -1
  10. package/dist/api/analysis/solar.d.ts +249 -0
  11. package/dist/api/analysis/solar.d.ts.map +1 -0
  12. package/dist/api/analysis/weather.d.ts +193 -0
  13. package/dist/api/analysis/weather.d.ts.map +1 -0
  14. package/dist/api/core/camera/index.d.ts +37 -0
  15. package/dist/api/core/camera/index.d.ts.map +1 -1
  16. package/dist/api/core/geom/create/index.d.ts +318 -1
  17. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  18. package/dist/api/core/index.d.ts +9 -0
  19. package/dist/api/core/index.d.ts.map +1 -1
  20. package/dist/api/core/io/export/index.d.ts +3 -1
  21. package/dist/api/core/io/export/index.d.ts.map +1 -1
  22. package/dist/api/core/io/import/index.d.ts +61 -0
  23. package/dist/api/core/io/import/index.d.ts.map +1 -1
  24. package/dist/api/core/io/terrain/index.d.ts +132 -0
  25. package/dist/api/core/io/terrain/index.d.ts.map +1 -1
  26. package/dist/api/core/mode/index.d.ts +99 -0
  27. package/dist/api/core/mode/index.d.ts.map +1 -0
  28. package/dist/api/core/storeys/index.d.ts +251 -0
  29. package/dist/api/core/storeys/index.d.ts.map +1 -0
  30. package/dist/api/core/tags.d.ts +24 -0
  31. package/dist/api/core/tags.d.ts.map +1 -1
  32. package/dist/api/core/zoom/index.d.ts +4 -0
  33. package/dist/api/core/zoom/index.d.ts.map +1 -1
  34. package/dist/api/design/create/index.d.ts +115 -4
  35. package/dist/api/design/create/index.d.ts.map +1 -1
  36. package/dist/api/design/delete/index.d.ts +3 -0
  37. package/dist/api/design/delete/index.d.ts.map +1 -1
  38. package/dist/api/design/query/geometry/index.d.ts +112 -0
  39. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  40. package/dist/api/design/query/index.d.ts +4 -0
  41. package/dist/api/design/query/index.d.ts.map +1 -1
  42. package/dist/api/design/query/referenceLines.d.ts +45 -0
  43. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  44. package/dist/api/design/query/spaces.d.ts +173 -0
  45. package/dist/api/design/query/spaces.d.ts.map +1 -1
  46. package/dist/api/design/transform/index.d.ts +12 -0
  47. package/dist/api/design/transform/index.d.ts.map +1 -1
  48. package/dist/api/design/update/index.d.ts +51 -1
  49. package/dist/api/design/update/index.d.ts.map +1 -1
  50. package/dist/api/entity/buildableEnvelope.d.ts +4 -0
  51. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  52. package/dist/api/entity/referenceLine.d.ts +8 -0
  53. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  54. package/dist/api/entity/story.d.ts +20 -0
  55. package/dist/api/entity/story.d.ts.map +1 -1
  56. package/dist/api/index.d.ts +5 -0
  57. package/dist/api/index.d.ts.map +1 -1
  58. package/dist/api/presentation/annotate.d.ts +23 -4
  59. package/dist/api/presentation/annotate.d.ts.map +1 -1
  60. package/dist/api/presentation/diagrams.d.ts +64 -2
  61. package/dist/api/presentation/diagrams.d.ts.map +1 -1
  62. package/dist/api/presentation/export.d.ts +4 -0
  63. package/dist/api/presentation/export.d.ts.map +1 -1
  64. package/dist/api/presentation/import.d.ts +6 -0
  65. package/dist/api/presentation/import.d.ts.map +1 -1
  66. package/dist/api/presentation/index.d.ts +20 -1
  67. package/dist/api/presentation/index.d.ts.map +1 -1
  68. package/dist/api/presentation/placedViews.d.ts +1139 -0
  69. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  70. package/dist/api/presentation/shapes.d.ts +481 -0
  71. package/dist/api/presentation/shapes.d.ts.map +1 -0
  72. package/dist/api/presentation/sheets.d.ts +42 -0
  73. package/dist/api/presentation/sheets.d.ts.map +1 -1
  74. package/dist/api/presentation/slideshow.d.ts +125 -0
  75. package/dist/api/presentation/slideshow.d.ts.map +1 -0
  76. package/dist/api/presentation/tables.d.ts +81 -0
  77. package/dist/api/presentation/tables.d.ts.map +1 -0
  78. package/dist/api/program/site.d.ts +260 -2
  79. package/dist/api/program/site.d.ts.map +1 -1
  80. package/dist/api/program/spreadsheet.d.ts +260 -28
  81. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  82. package/dist/api/workspace/index.d.ts +505 -0
  83. package/dist/api/workspace/index.d.ts.map +1 -0
  84. package/dist/index.cjs +2904 -1761
  85. package/dist/index.cjs.map +1 -1
  86. package/dist/index.js +2762 -1761
  87. package/dist/index.js.map +1 -1
  88. package/package.json +3 -2
  89. package/scripts/generate-manifest.mjs +45 -0
  90. package/src/api/analysis/daylight.ts +470 -0
  91. package/src/api/analysis/heatmaps.ts +444 -17
  92. package/src/api/analysis/index.ts +15 -0
  93. package/src/api/analysis/solar.ts +237 -0
  94. package/src/api/analysis/weather.ts +179 -0
  95. package/src/api/core/camera/index.ts +39 -0
  96. package/src/api/core/geom/create/index.ts +344 -1
  97. package/src/api/core/index.ts +9 -0
  98. package/src/api/core/io/export/index.ts +3 -1
  99. package/src/api/core/io/import/index.ts +64 -0
  100. package/src/api/core/io/terrain/index.ts +143 -0
  101. package/src/api/core/mode/index.ts +96 -0
  102. package/src/api/core/storeys/index.ts +279 -0
  103. package/src/api/core/tags.ts +27 -0
  104. package/src/api/core/zoom/index.ts +4 -0
  105. package/src/api/design/create/index.ts +138 -1
  106. package/src/api/design/delete/index.ts +3 -0
  107. package/src/api/design/query/geometry/index.ts +125 -3
  108. package/src/api/design/query/index.ts +4 -0
  109. package/src/api/design/query/referenceLines.ts +52 -0
  110. package/src/api/design/query/spaces.ts +143 -0
  111. package/src/api/design/transform/index.ts +12 -0
  112. package/src/api/design/update/index.ts +66 -1
  113. package/src/api/entity/buildableEnvelope.ts +4 -0
  114. package/src/api/entity/referenceLine.ts +8 -0
  115. package/src/api/entity/story.ts +20 -0
  116. package/src/api/index.ts +5 -0
  117. package/src/api/presentation/annotate.ts +27 -2
  118. package/src/api/presentation/diagrams.ts +67 -2
  119. package/src/api/presentation/export.ts +4 -0
  120. package/src/api/presentation/import.ts +6 -0
  121. package/src/api/presentation/index.ts +20 -1
  122. package/src/api/presentation/placedViews.ts +1120 -0
  123. package/src/api/presentation/shapes.ts +274 -0
  124. package/src/api/presentation/sheets.ts +54 -0
  125. package/src/api/presentation/slideshow.ts +134 -0
  126. package/src/api/presentation/tables.ts +84 -0
  127. package/src/api/program/site.ts +205 -2
  128. package/src/api/program/spreadsheet.ts +251 -6
  129. package/src/api/workspace/index.ts +563 -0
@@ -0,0 +1,1139 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ import { PluginSheetPosition } from "./sheets";
4
+ /**
5
+ * Placed views — the view shapes already laid out on the Present canvas.
6
+ *
7
+ * A **placed view** is a saved view that has been dropped onto a layout sheet
8
+ * (or the open canvas) — the live linked view shape
9
+ * {@linkcode PluginPresentationSheetsApi.place} and the Present views panel's
10
+ * drag-drop create. These methods read and edit the **layout** of those
11
+ * shapes: where they sit, how big they are, their rotation, their
12
+ * architectural scale, and their crop. To refresh a placed view's **content** from the current model,
13
+ * use `sheets.updatePlacedView` — content refresh lives on `sheets`,
14
+ * layout lives here.
15
+ *
16
+ * Reads (`list`) return `[]` when Present mode is closed; `get` and every
17
+ * write require Present mode to be open.
18
+ *
19
+ * Accessed via `snaptrude.presentation.placedViews`.
20
+ */
21
+ export declare abstract class PluginPresentationPlacedViewsApi {
22
+ constructor();
23
+ /**
24
+ * List the placed views in the presentation.
25
+ *
26
+ * Returns every placed view shape on the Present canvas — those nested on a
27
+ * layout sheet (with that sheet's id) and those sitting loose on the canvas
28
+ * (`sheetId: null`). Pass `sheetId` to list only the views placed on that
29
+ * sheet.
30
+ *
31
+ * @param sheetId - Optional sheet id to filter by.
32
+ * @returns A {@linkcode PluginPresentationPlacedViewsListResult} with a
33
+ * `placedViews` array (empty when Present mode is closed or nothing is
34
+ * placed).
35
+ * @throws If `sheetId` is given but is not a sheet (with Present mode open).
36
+ *
37
+ * @examplePrompt Which views are placed on this sheet?
38
+ * @examplePrompt List all the placed views in the presentation
39
+ * @examplePrompt What's laid out on sheet 2?
40
+ * @examplePrompt Show me every view on the Present canvas
41
+ *
42
+ * # Example
43
+ * ```ts
44
+ * const { placedViews } = await snaptrude.presentation.placedViews.list("sheet_1")
45
+ * ```
46
+ */
47
+ abstract list(sheetId?: string): PluginApiReturn<PluginPresentationPlacedViewsListResult>;
48
+ /**
49
+ * Get a single placed view by its shape id.
50
+ *
51
+ * `shapeId` is the id `sheets.place` returned (also reported by `list`).
52
+ *
53
+ * @param shapeId - The id of the placed view shape to read.
54
+ * @returns The matching {@linkcode PluginPlacedView}.
55
+ * @throws If Present mode is not open, or `shapeId` is unknown or is not a
56
+ * placed view.
57
+ *
58
+ * @examplePrompt Get the placed view I just dropped on the sheet
59
+ * @examplePrompt Read the position and scale of this placed view
60
+ * @examplePrompt What's the crop on shape_123?
61
+ *
62
+ * # Example
63
+ * ```ts
64
+ * const placed = await snaptrude.presentation.placedViews.get(shapeId)
65
+ * console.log(placed.position, placed.scale)
66
+ * ```
67
+ */
68
+ abstract get(shapeId: string): PluginApiReturn<PluginPlacedView>;
69
+ /**
70
+ * Move a placed view.
71
+ *
72
+ * Repositions the placed view on its sheet — `position` is the new top-left
73
+ * in sheet coordinates (page coordinates when the view is not on a sheet).
74
+ * Pass `options.sheetId` to move it onto another sheet: the view is
75
+ * reparented to that sheet and then positioned at `position` in the new
76
+ * sheet's coordinates. A grouped placed view (e.g. a sustainability 3D view
77
+ * with its legend) moves as one unit. Requires Present mode to be open.
78
+ *
79
+ * @param shapeId - The placed view shape to move.
80
+ * @param position - New top-left position (sheet-local; page coordinates
81
+ * when off-sheet).
82
+ * @param options - Optional `sheetId` — move the view onto that sheet.
83
+ * @returns The updated {@linkcode PluginPlacedView}.
84
+ * @throws If Present mode is not open, `shapeId` is unknown or is not a
85
+ * placed view, or `options.sheetId` is given but is not a sheet.
86
+ *
87
+ * @examplePrompt Move the site plan view to the top-left of sheet 2
88
+ * @examplePrompt Reposition this placed view to 100, 200
89
+ * @examplePrompt Move the hero perspective onto the cover sheet
90
+ *
91
+ * # Example
92
+ * ```ts
93
+ * await snaptrude.presentation.placedViews.move(shapeId, { x: 50, y: 50 }, {
94
+ * sheetId: "sheet_2",
95
+ * })
96
+ * ```
97
+ */
98
+ abstract move(shapeId: string, position: PluginSheetPosition, options?: {
99
+ sheetId?: string;
100
+ }): PluginApiReturn<PluginPlacedView>;
101
+ /**
102
+ * Resize a placed view by a uniform factor.
103
+ *
104
+ * Scales the placed view about its top-left corner — the same resize as
105
+ * dragging a corner handle, aspect ratio held. Works for 2D and 3D views;
106
+ * labels and grouped legends resize with it. For a 2D view the **printed
107
+ * architectural scale changes proportionally** (doubling the size of a
108
+ * 1:100 plan makes it a 1:50 plan) — use
109
+ * {@linkcode PluginPresentationPlacedViewsApi.setScale} to land on an exact
110
+ * standard scale instead. Requires Present mode to be open.
111
+ *
112
+ * @param shapeId - The placed view shape to resize.
113
+ * @param factor - Uniform scale factor, between `0.01` and `100`
114
+ * (`2` doubles the size, `0.5` halves it).
115
+ * @returns The updated {@linkcode PluginPlacedView}.
116
+ * @throws If Present mode is not open, `shapeId` is unknown or is not a
117
+ * placed view, or `factor` is not a finite number between 0.01 and 100.
118
+ *
119
+ * @examplePrompt Make this placed view twice as big
120
+ * @examplePrompt Shrink the placed 3D view to half its size
121
+ * @examplePrompt Scale the placed plan up by 50%
122
+ *
123
+ * # Example
124
+ * ```ts
125
+ * await snaptrude.presentation.placedViews.scale(shapeId, 2)
126
+ * ```
127
+ */
128
+ abstract scale(shapeId: string, factor: number): PluginApiReturn<PluginPlacedView>;
129
+ /**
130
+ * Set a placed view's architectural scale.
131
+ *
132
+ * Applies a standard architectural scale — the same write the placed view's
133
+ * Scale dropdown performs. The view (and its labels) is resized about its
134
+ * top-left corner so it prints at the given scale. `scale` must be one of
135
+ * the standard values for the project's unit system (metric `10, 20, 50,
136
+ * 100, 150, 200, 250, 500, 1000`; imperial e.g. `48` for 1/4″ = 1′, `96`
137
+ * for 1/8″ = 1′, `120` for 1″ = 10′) — the same validation as
138
+ * `sheets.place`. 3D views have no architectural scale — calling this on
139
+ * one throws. Requires Present mode to be open.
140
+ *
141
+ * @param shapeId - The placed view shape to set the scale of.
142
+ * @param scale - A standard scale value for the project's unit system.
143
+ * @returns The updated {@linkcode PluginPlacedView}.
144
+ * @throws If Present mode is not open, `shapeId` is unknown or is not a
145
+ * placed view, `scale` is not a standard value for the project's unit
146
+ * system, or the placed view is a 3D view.
147
+ *
148
+ * @examplePrompt Set the plan to 1:100
149
+ * @examplePrompt Change the placed floor plan to 1:50 scale
150
+ * @examplePrompt Make this view print at quarter-inch scale
151
+ *
152
+ * # Example
153
+ * ```ts
154
+ * await snaptrude.presentation.placedViews.setScale(shapeId, 100) // 1:100
155
+ * ```
156
+ */
157
+ abstract setScale(shapeId: string, scale: number): PluginApiReturn<PluginPlacedView>;
158
+ /**
159
+ * Crop a placed view, or clear its crop.
160
+ *
161
+ * `crop` selects the visible window as **fractions (0–1) of the uncropped
162
+ * view** — `topLeft` must be strictly less than `bottomRight` on both axes.
163
+ * The visible region stays anchored on the page (the same behavior as the
164
+ * interactive crop), labels that fall outside the crop are hidden, and the
165
+ * view's architectural scale is untouched. Pass `null` to clear the crop
166
+ * and restore the full view in its uncropped footprint (the interactive
167
+ * double-click-edge reset). The crop **survives a content refresh**
168
+ * (`sheets.updatePlacedView` recomputes it against the refreshed content
169
+ * and only clears it when the refreshed view no longer overlaps the cropped
170
+ * region). Requires Present mode to be open.
171
+ *
172
+ * @param shapeId - The placed view shape to crop.
173
+ * @param crop - The crop window ({@linkcode PluginPlacedViewCrop},
174
+ * fractions of the uncropped view), or `null` to clear.
175
+ * @returns The updated {@linkcode PluginPlacedView}.
176
+ * @throws If Present mode is not open, `shapeId` is unknown or is not a
177
+ * placed view, or `crop` is not a valid 0–1 rectangle with
178
+ * `topLeft < bottomRight` on both axes.
179
+ *
180
+ * @examplePrompt Crop the placed view to its left half
181
+ * @examplePrompt Crop this view to the top-right quarter
182
+ * @examplePrompt Remove the crop from the placed plan
183
+ *
184
+ * # Example
185
+ * ```ts
186
+ * // keep the left half of the view
187
+ * await snaptrude.presentation.placedViews.setCrop(shapeId, {
188
+ * topLeft: { x: 0, y: 0 },
189
+ * bottomRight: { x: 0.5, y: 1 },
190
+ * })
191
+ * await snaptrude.presentation.placedViews.setCrop(shapeId, null) // clear
192
+ * ```
193
+ */
194
+ abstract setCrop(shapeId: string, crop: PluginPlacedViewCrop | null): PluginApiReturn<PluginPlacedView>;
195
+ /**
196
+ * Set a placed view's rotation.
197
+ *
198
+ * `rotation` is the **absolute** angle in radians (tldraw convention) — the
199
+ * value the record's `rotation` field reads back. Values are canonicalized
200
+ * into `[0, 2π)`, so pass values in that range for an exact round-trip
201
+ * (`setRotation(-0.1)` reads back as `2π − 0.1`). The view rotates about
202
+ * its bounds center (the same pivot as the UI rotation handle). One undo
203
+ * step. Joins the absolute-setter family
204
+ * `setScale`/`setCrop`/`setOpacity`/`setMask`.
205
+ *
206
+ * **3D placed views only.** 2D and site-plan views cannot rotate — the
207
+ * canvas hides their rotate handle and reverts any rotation applied to
208
+ * them — so calling this on one is refused with a typed
209
+ * `PRECONDITION_FAILED` instead of silently no-opping. Requires Present
210
+ * mode to be open.
211
+ *
212
+ * @param shapeId - The placed view shape to rotate.
213
+ * @param rotation - Absolute rotation in radians.
214
+ * @returns The updated {@linkcode PluginPlacedView}.
215
+ * @throws If Present mode is not open, `shapeId` is unknown or is not a
216
+ * placed view, `rotation` is not a finite number, or the placed view is
217
+ * a 2D/site-plan view (`PRECONDITION_FAILED` — only 3D views rotate).
218
+ *
219
+ * @examplePrompt Rotate the placed plan 90 degrees
220
+ * @examplePrompt Set this view's rotation to 45 degrees
221
+ * @examplePrompt Straighten the placed view back to zero rotation
222
+ *
223
+ * # Example
224
+ * ```ts
225
+ * await snaptrude.presentation.placedViews.setRotation(shapeId, Math.PI / 2)
226
+ * ```
227
+ */
228
+ abstract setRotation(shapeId: string, rotation: number): PluginApiReturn<PluginPlacedView>;
229
+ /**
230
+ * Read a placed view's (or sheet's) per-category presentation styles.
231
+ *
232
+ * Returns one entry per style category (Site, Topography, Space, Department,
233
+ * Envelope, Facade/Mass, Dimension, Reference Line, Adjacency Line,
234
+ * Landscape elements — sheets/auto-diagrams use their 3-category subset)
235
+ * with the **fully-resolved** setting values (defaults merged with this
236
+ * shape's overrides), which setting ids the category supports, whether the
237
+ * category is currently disabled (not visible in the view), and — where the
238
+ * category has a Text tab — its label font styles. Styles are stored **per
239
+ * placed shape instance**: the same saved view placed twice can read
240
+ * differently. Requires Present mode to be open.
241
+ *
242
+ * @param shapeId - The placed view (or sheet) shape to read.
243
+ * @throws If Present mode is not open or `shapeId` is not a styleable shape.
244
+ *
245
+ * @examplePrompt What line weights is this placed plan using?
246
+ * @examplePrompt Read the styling of the placed view
247
+ * @examplePrompt Which categories can I restyle on this sheet?
248
+ *
249
+ * # Example
250
+ * ```ts
251
+ * const styles = await snaptrude.presentation.placedViews.getStyles(shapeId)
252
+ * const space = styles.categories.find((c) => c.category === "Space")
253
+ * console.log(space?.settings.cutWidth, space?.settings.lineStyle)
254
+ * ```
255
+ */
256
+ abstract getStyles(shapeId: string): PluginApiReturn<PluginPlacedViewStylesResult>;
257
+ /**
258
+ * Update one style category on a placed view (or sheet) — the same writes
259
+ * the Present sidebar's per-category configure panel performs.
260
+ *
261
+ * The patch may set any subset of the category's settings: line style (7
262
+ * dash patterns), line color, dash-length multiplier, line weights in mm
263
+ * (`cutWidth` vs `projectionWidth` — Revit-style cut/projection distinction;
264
+ * `lineWidth` where the category has a single weight; `treeLineWidth` /
265
+ * `parkingLineWidth` for Landscape), fill `colorMode` (`department`,
266
+ * `texture`, `monochrome`, or `tag:<tagCategoryId>`), per-category fill
267
+ * `opacity` (0–100), category `hide` (cascades to that category's labels),
268
+ * the shape restyle `viewStyle` (`NONE` block / `FILLET` rounded with
269
+ * `radius` / `BUBBLE`) with `radius` and `inset`, and Topography's
270
+ * map/building sub-controls. Settings a category does not support are
271
+ * rejected. Writes are validated, undoable (one history stop per call), and
272
+ * re-render immediately; on an auto-diagram sheet the write fans out to
273
+ * every sheet in its diagram set. Requires Present mode to be open.
274
+ *
275
+ * @param shapeId - The placed view (or sheet) shape to restyle.
276
+ * @param category - The style category to update.
277
+ * @param patch - The settings to change (at least one).
278
+ * @returns The category's resolved styles after the update.
279
+ * @throws If Present mode is not open, `shapeId` is not a styleable shape,
280
+ * the category does not apply to this shape, or a patched setting is not
281
+ * supported by the category or fails validation.
282
+ *
283
+ * @examplePrompt Set the Space cut line weight to 0.5 mm
284
+ * @examplePrompt Make the Department lines dashed
285
+ * @examplePrompt Color the plan by department
286
+ * @examplePrompt Hide the dimension lines on this view
287
+ * @examplePrompt Round the space corners with a 2 ft radius
288
+ *
289
+ * # Example
290
+ * ```ts
291
+ * await snaptrude.presentation.placedViews.updateStyles(shapeId, "Space", {
292
+ * cutWidth: 0.5,
293
+ * projectionWidth: 0.18,
294
+ * lineStyle: "dashed",
295
+ * colorMode: "department",
296
+ * })
297
+ * ```
298
+ */
299
+ abstract updateStyles(shapeId: string, category: PluginViewSettingCategory, patch: PluginPlacedViewStylePatch): PluginApiReturn<PluginPlacedViewCategoryStyles>;
300
+ /**
301
+ * Reset a placed view's styling to defaults — the sidebar's Reset button:
302
+ * clears every per-category override and view-style restyle, resets font
303
+ * styles, and un-hides labels hidden by styling. Undoable. Requires Present
304
+ * mode to be open.
305
+ *
306
+ * @param shapeId - The placed view (or sheet) shape to reset.
307
+ * @throws If Present mode is not open or `shapeId` is not a styleable shape.
308
+ *
309
+ * @examplePrompt Reset this view's styling
310
+ * @examplePrompt Clear all the style overrides on the placed plan
311
+ * @examplePrompt Put the sheet styles back to default
312
+ */
313
+ abstract resetStyles(shapeId: string): PluginApiReturn<void>;
314
+ /**
315
+ * Update a category's label typography on a placed view (or sheet) — the
316
+ * configure panel's Text tab.
317
+ *
318
+ * Each category carries font styles per label type — `objectLabels` (the
319
+ * name), `department`, and `areas` — with `fontFamily` (system families or
320
+ * any Google Font; the font is loaded automatically and the weight is
321
+ * coerced to an available variant), `fontWeight` (numeric string, e.g.
322
+ * `"700"`), `fontStyle` (`normal`/`italic`), and `fontSize` in px.
323
+ * `visibleTypes` controls which label types render (an empty array hides
324
+ * all). Not every category has a Text tab — Topography, Facade/Mass,
325
+ * Reference Line and Adjacency Line reject font writes. Undoable. Requires
326
+ * Present mode to be open.
327
+ *
328
+ * @param shapeId - The placed view (or sheet) shape.
329
+ * @param category - The style category whose labels to restyle.
330
+ * @param patch - The font styles to change (at least one field).
331
+ * @throws If Present mode is not open, `shapeId` is not a styleable shape,
332
+ * or the category has no Text tab.
333
+ *
334
+ * @examplePrompt Set the space labels to Roboto 24px bold
335
+ * @examplePrompt Hide the area values on this plan
336
+ * @examplePrompt Make the department labels italic
337
+ *
338
+ * # Example
339
+ * ```ts
340
+ * await snaptrude.presentation.placedViews.updateFontStyles(shapeId, "Space", {
341
+ * objectLabels: { fontFamily: "Roboto", fontWeight: "700", fontSize: 24 },
342
+ * visibleTypes: ["objectLabels", "areas"],
343
+ * })
344
+ * ```
345
+ */
346
+ abstract updateFontStyles(shapeId: string, category: PluginViewSettingCategory, patch: PluginPlacedViewFontStylesPatch): PluginApiReturn<void>;
347
+ /**
348
+ * List a placed view's labels — the text children generated from the view's
349
+ * content (space names, departments, areas, dimension texts). Each label is
350
+ * individually addressable: it can be moved and hidden. Returns `[]` when
351
+ * the view has no labels. Requires Present mode to be open.
352
+ *
353
+ * @param shapeId - The placed view shape whose labels to list.
354
+ * @throws If Present mode is not open or `shapeId` is not a placed view.
355
+ *
356
+ * @examplePrompt List the labels on this placed plan
357
+ * @examplePrompt Where are the space labels on this view?
358
+ * @examplePrompt Show every label with its position
359
+ *
360
+ * # Example
361
+ * ```ts
362
+ * const { labels } = await snaptrude.presentation.placedViews.listLabels(shapeId)
363
+ * for (const l of labels) console.log(l.text, l.position, l.hidden)
364
+ * ```
365
+ */
366
+ abstract listLabels(shapeId: string): PluginApiReturn<PluginPlacedViewLabelsResult>;
367
+ /**
368
+ * Move a label to a new position (coordinates relative to its placed view,
369
+ * the same space `listLabels` reports). The manual position survives style
370
+ * changes. Undoable. Requires Present mode to be open.
371
+ *
372
+ * @param labelId - The label to move (from `listLabels`).
373
+ * @param position - New position, parent-view-relative.
374
+ * @throws If Present mode is not open or `labelId` is not a view label.
375
+ *
376
+ * @examplePrompt Move the kitchen label out of the hatched area
377
+ * @examplePrompt Nudge this label 20 units right
378
+ * @examplePrompt Reposition the area text
379
+ */
380
+ abstract moveLabel(labelId: string, position: PluginSheetPosition): PluginApiReturn<PluginPlacedViewLabel>;
381
+ /**
382
+ * Hide or show a single label (independent of the category-level label
383
+ * visibility). Undoable. Requires Present mode to be open.
384
+ *
385
+ * @param labelId - The label to hide/show (from `listLabels`).
386
+ * @param hidden - `true` to hide, `false` to show.
387
+ * @throws If Present mode is not open or `labelId` is not a view label.
388
+ *
389
+ * @examplePrompt Hide the corridor label
390
+ * @examplePrompt Show that label again
391
+ */
392
+ abstract setLabelHidden(labelId: string, hidden: boolean): PluginApiReturn<PluginPlacedViewLabel>;
393
+ /**
394
+ * List the top-level shapes on the Present canvas — not just placed views:
395
+ * AI-generated outputs, placed diagram images, plugin-created shapes, and
396
+ * annotations, each with an `origin` classification. Sheets (frames) are
397
+ * not listed — use `sheets.list`. Pass `sheetId` to list only shapes on
398
+ * that sheet. Returns `[]` when Present mode is closed.
399
+ *
400
+ * @param sheetId - Optional sheet id to filter by.
401
+ *
402
+ * @examplePrompt List everything on the Present canvas
403
+ * @examplePrompt What AI outputs are on this sheet?
404
+ * @examplePrompt Show all the shapes with their positions
405
+ *
406
+ * # Example
407
+ * ```ts
408
+ * const { shapes } = await snaptrude.presentation.placedViews.listShapes()
409
+ * const aiOutputs = shapes.filter((s) => s.origin === "aiOutput")
410
+ * ```
411
+ */
412
+ abstract listShapes(sheetId?: string): PluginApiReturn<PluginCanvasShapesListResult>;
413
+ /**
414
+ * Get one Present-canvas shape by id — works for any top-level shape
415
+ * (placed view, AI output, diagram image, plugin shape, annotation), unlike
416
+ * `get` which requires a placed view. Requires Present mode to be open.
417
+ *
418
+ * @param shapeId - The shape to read.
419
+ * @throws If Present mode is not open or `shapeId` is unknown or a sheet.
420
+ *
421
+ * @examplePrompt Inspect the AI render I just generated
422
+ * @examplePrompt Get the bounds of that diagram image
423
+ */
424
+ abstract getShape(shapeId: string): PluginApiReturn<PluginCanvasShape>;
425
+ /**
426
+ * Move any Present-canvas shape (AI outputs, diagram images, plugin shapes,
427
+ * annotations — placed views too). Same coordinate semantics as `move`:
428
+ * sheet-local when on a sheet, page coordinates otherwise; pass
429
+ * `options.sheetId` to reparent onto a sheet. Undoable. Requires Present
430
+ * mode to be open.
431
+ *
432
+ * @param shapeId - The shape to move.
433
+ * @param position - New top-left position.
434
+ * @param options - Optional `sheetId` to move the shape onto that sheet.
435
+ * @throws If Present mode is not open, `shapeId` is unknown or a sheet, or
436
+ * `options.sheetId` is not a sheet.
437
+ *
438
+ * @examplePrompt Move the AI render to the top of the sheet
439
+ * @examplePrompt Put the diagram image at 100, 200
440
+ */
441
+ abstract moveShape(shapeId: string, position: PluginSheetPosition, options?: {
442
+ sheetId?: string;
443
+ }): PluginApiReturn<PluginCanvasShape>;
444
+ /**
445
+ * Resize any Present-canvas shape by a uniform factor about its top-left
446
+ * corner (aspect ratio held) — the generic counterpart of `scale`, which
447
+ * requires a placed view. Undoable. Requires Present mode to be open.
448
+ *
449
+ * @param shapeId - The shape to resize.
450
+ * @param factor - Uniform scale factor, between `0.01` and `100`.
451
+ * @throws If Present mode is not open, `shapeId` is unknown or a sheet, or
452
+ * `factor` is out of range.
453
+ *
454
+ * @examplePrompt Make the AI output half its size
455
+ * @examplePrompt Double the size of that image
456
+ */
457
+ abstract resizeShape(shapeId: string, factor: number): PluginApiReturn<PluginCanvasShape>;
458
+ /**
459
+ * Rotate any Present-canvas shape (AI outputs, diagram images, plugin
460
+ * shapes, annotations — placed views too) — the generic counterpart of
461
+ * `setRotation`, same target rules as `moveShape`. Same semantics:
462
+ * **absolute** angle in radians (tldraw convention) about the shape's
463
+ * bounds center, canonicalized into `[0, 2π)` (pass values in that range
464
+ * for an exact round-trip via `getShape`), one undo step. A placed view
465
+ * passed here falls under the same 3D-only rule as `setRotation`: 2D and
466
+ * site-plan views cannot rotate and are refused with a typed
467
+ * `PRECONDITION_FAILED`. Requires Present mode to be open.
468
+ *
469
+ * @param shapeId - The shape to rotate.
470
+ * @param rotation - Absolute rotation in radians.
471
+ * @throws If Present mode is not open, `shapeId` is unknown or a sheet,
472
+ * `rotation` is not a finite number, or the target is a 2D/site-plan
473
+ * placed view (`PRECONDITION_FAILED` — only 3D views rotate).
474
+ *
475
+ * @examplePrompt Rotate the AI render 15 degrees
476
+ * @examplePrompt Turn that image sideways
477
+ * @examplePrompt Reset the diagram image's rotation
478
+ */
479
+ abstract rotateShape(shapeId: string, rotation: number): PluginApiReturn<PluginCanvasShape>;
480
+ /**
481
+ * Delete Present-canvas shapes. One undoable step for the whole batch, and
482
+ * the batch is atomic — if any id is rejected, nothing is deleted.
483
+ *
484
+ * Deletable: placed views, AI-generated outputs, placed diagram images, and
485
+ * shapes created by plugins. **Not deletable here:** sheets (use
486
+ * `sheets.delete`) and user-drawn annotations (draw, geo, arrow, note,
487
+ * text, highlight, line shapes without a plugin ownership stamp) — those
488
+ * reject with a validation error. Requires Present mode to be open.
489
+ *
490
+ * @param shapeIds - The shapes to delete (at least one).
491
+ * @returns The deleted shape ids.
492
+ * @throws If Present mode is not open, or any id is unknown, a sheet, or a
493
+ * protected user annotation.
494
+ *
495
+ * @examplePrompt Delete the old AI renders from the sheet
496
+ * @examplePrompt Remove that placed view
497
+ * @examplePrompt Clear the diagram images I placed
498
+ *
499
+ * # Example
500
+ * ```ts
501
+ * const { deleted } = await snaptrude.presentation.placedViews.deleteShapes([
502
+ * out1.shapeId,
503
+ * out2.shapeId,
504
+ * ])
505
+ * ```
506
+ */
507
+ abstract deleteShapes(shapeIds: string[]): PluginApiReturn<PluginCanvasShapesDeleteResult>;
508
+ /**
509
+ * Set a Present-canvas shape's opacity (`0` transparent .. `1` opaque) —
510
+ * the sidebar's whole-shape opacity slider (distinct from the per-category
511
+ * fill opacity in `updateStyles`). Works for any top-level shape. Undoable.
512
+ * Requires Present mode to be open.
513
+ *
514
+ * @param shapeId - The shape to change.
515
+ * @param opacity - Target opacity, `0`..`1`.
516
+ * @throws If Present mode is not open or `shapeId` is unknown or a sheet.
517
+ *
518
+ * @examplePrompt Fade the placed view to 50%
519
+ * @examplePrompt Make the AI render semi-transparent
520
+ */
521
+ abstract setOpacity(shapeId: string, opacity: number): PluginApiReturn<void>;
522
+ /**
523
+ * Toggle "mask context buildings" on a placed view — mutes the inactive
524
+ * proposal buildings in the view (the sidebar checkbox). Views only.
525
+ * Undoable. Requires Present mode to be open.
526
+ *
527
+ * @param shapeId - The placed view shape.
528
+ * @param enabled - `true` to mask context buildings.
529
+ * @throws If Present mode is not open or `shapeId` is not a placed view.
530
+ *
531
+ * @examplePrompt Mask the context buildings in this view
532
+ * @examplePrompt Show the neighboring proposals again in the placed view
533
+ */
534
+ abstract setMask(shapeId: string, enabled: boolean): PluginApiReturn<void>;
535
+ }
536
+ /**
537
+ * A crop window on a placed view, as fractions (0–1) of the **uncropped**
538
+ * view. `topLeft` must be strictly less than `bottomRight` on both axes.
539
+ *
540
+ * | Property | Type | Description |
541
+ * |---|---|---|
542
+ * | `topLeft` | `{ x: number, y: number }` | Top-left of the visible window (fractions 0–1) |
543
+ * | `bottomRight` | `{ x: number, y: number }` | Bottom-right of the visible window (fractions 0–1) |
544
+ */
545
+ export declare const PluginPlacedViewCrop: z.ZodObject<{
546
+ topLeft: z.ZodObject<{
547
+ x: z.ZodNumber;
548
+ y: z.ZodNumber;
549
+ }, z.core.$strip>;
550
+ bottomRight: z.ZodObject<{
551
+ x: z.ZodNumber;
552
+ y: z.ZodNumber;
553
+ }, z.core.$strip>;
554
+ }, z.core.$strip>;
555
+ export type PluginPlacedViewCrop = z.infer<typeof PluginPlacedViewCrop>;
556
+ /**
557
+ * A view placed on the Present canvas.
558
+ *
559
+ * | Property | Type | Description |
560
+ * |---|---|---|
561
+ * | `shapeId` | `string` | Id of the placed view shape (the id `sheets.place` returns) |
562
+ * | `sheetId` | `string \| null` | The sheet it sits on (`null` when placed loose on the canvas) |
563
+ * | `title` | `string` | The saved view's title |
564
+ * | `viewId` | `string` | Id of the saved view it was placed from |
565
+ * | `position` | {@linkcode PluginSheetPosition} | Top-left position — sheet-local when on a sheet, page coordinates otherwise |
566
+ * | `size` | `{ width: number, height: number }` | Displayed size on the canvas |
567
+ * | `scale` | `number \| null` | Architectural scale (e.g. `100` = 1:100); `null` for 3D views |
568
+ * | `is3d` | `boolean` | Whether it is a 3D view (no architectural scale) |
569
+ * | `rotation` | `number` | Rotation in radians, `[0, 2π)` (nonzero only for 3D views — 2D views cannot rotate; set with `setRotation`) |
570
+ * | `crop` | {@linkcode PluginPlacedViewCrop}` \| null` | Crop window (`null` when uncropped) |
571
+ * | `isUnlinked` | `boolean` | Whether the source proposal was removed (an unlinked view no longer refreshes) |
572
+ */
573
+ export declare const PluginPlacedView: z.ZodObject<{
574
+ shapeId: z.ZodString;
575
+ sheetId: z.ZodNullable<z.ZodString>;
576
+ title: z.ZodString;
577
+ viewId: z.ZodString;
578
+ position: z.ZodObject<{
579
+ x: z.ZodNumber;
580
+ y: z.ZodNumber;
581
+ }, z.core.$strip>;
582
+ size: z.ZodObject<{
583
+ width: z.ZodNumber;
584
+ height: z.ZodNumber;
585
+ }, z.core.$strip>;
586
+ scale: z.ZodNullable<z.ZodNumber>;
587
+ is3d: z.ZodBoolean;
588
+ rotation: z.ZodNumber;
589
+ crop: z.ZodNullable<z.ZodObject<{
590
+ topLeft: z.ZodObject<{
591
+ x: z.ZodNumber;
592
+ y: z.ZodNumber;
593
+ }, z.core.$strip>;
594
+ bottomRight: z.ZodObject<{
595
+ x: z.ZodNumber;
596
+ y: z.ZodNumber;
597
+ }, z.core.$strip>;
598
+ }, z.core.$strip>>;
599
+ isUnlinked: z.ZodBoolean;
600
+ }, z.core.$strip>;
601
+ export type PluginPlacedView = z.infer<typeof PluginPlacedView>;
602
+ /** Arguments for {@linkcode PluginPresentationPlacedViewsApi.list}. */
603
+ export declare const PluginPresentationPlacedViewsListArgs: z.ZodObject<{
604
+ sheetId: z.ZodOptional<z.ZodString>;
605
+ }, z.core.$strip>;
606
+ export type PluginPresentationPlacedViewsListArgs = z.infer<typeof PluginPresentationPlacedViewsListArgs>;
607
+ /** Result of {@linkcode PluginPresentationPlacedViewsApi.list}. */
608
+ export declare const PluginPresentationPlacedViewsListResult: z.ZodObject<{
609
+ placedViews: z.ZodArray<z.ZodObject<{
610
+ shapeId: z.ZodString;
611
+ sheetId: z.ZodNullable<z.ZodString>;
612
+ title: z.ZodString;
613
+ viewId: z.ZodString;
614
+ position: z.ZodObject<{
615
+ x: z.ZodNumber;
616
+ y: z.ZodNumber;
617
+ }, z.core.$strip>;
618
+ size: z.ZodObject<{
619
+ width: z.ZodNumber;
620
+ height: z.ZodNumber;
621
+ }, z.core.$strip>;
622
+ scale: z.ZodNullable<z.ZodNumber>;
623
+ is3d: z.ZodBoolean;
624
+ rotation: z.ZodNumber;
625
+ crop: z.ZodNullable<z.ZodObject<{
626
+ topLeft: z.ZodObject<{
627
+ x: z.ZodNumber;
628
+ y: z.ZodNumber;
629
+ }, z.core.$strip>;
630
+ bottomRight: z.ZodObject<{
631
+ x: z.ZodNumber;
632
+ y: z.ZodNumber;
633
+ }, z.core.$strip>;
634
+ }, z.core.$strip>>;
635
+ isUnlinked: z.ZodBoolean;
636
+ }, z.core.$strip>>;
637
+ }, z.core.$strip>;
638
+ export type PluginPresentationPlacedViewsListResult = z.infer<typeof PluginPresentationPlacedViewsListResult>;
639
+ /** Arguments for {@linkcode PluginPresentationPlacedViewsApi.get}. */
640
+ export declare const PluginPresentationPlacedViewsGetArgs: z.ZodObject<{
641
+ shapeId: z.ZodString;
642
+ }, z.core.$strip>;
643
+ export type PluginPresentationPlacedViewsGetArgs = z.infer<typeof PluginPresentationPlacedViewsGetArgs>;
644
+ /**
645
+ * Arguments for {@linkcode PluginPresentationPlacedViewsApi.move}.
646
+ *
647
+ * | Property | Type | Description |
648
+ * |---|---|---|
649
+ * | `shapeId` | `string` | The placed view shape to move |
650
+ * | `position` | {@linkcode PluginSheetPosition} | New top-left position (sheet-local; page coordinates when off-sheet) |
651
+ * | `sheetId` | `string`? | Move the view onto this sheet |
652
+ */
653
+ export declare const PluginPresentationPlacedViewsMoveArgs: z.ZodObject<{
654
+ shapeId: z.ZodString;
655
+ position: z.ZodObject<{
656
+ x: z.ZodNumber;
657
+ y: z.ZodNumber;
658
+ }, z.core.$strip>;
659
+ sheetId: z.ZodOptional<z.ZodString>;
660
+ }, z.core.$strip>;
661
+ export type PluginPresentationPlacedViewsMoveArgs = z.infer<typeof PluginPresentationPlacedViewsMoveArgs>;
662
+ /**
663
+ * Arguments for {@linkcode PluginPresentationPlacedViewsApi.scale}.
664
+ *
665
+ * | Property | Type | Description |
666
+ * |---|---|---|
667
+ * | `shapeId` | `string` | The placed view shape to resize |
668
+ * | `factor` | `number` | Uniform scale factor (0.01–100) |
669
+ */
670
+ export declare const PluginPresentationPlacedViewsScaleArgs: z.ZodObject<{
671
+ shapeId: z.ZodString;
672
+ factor: z.ZodNumber;
673
+ }, z.core.$strip>;
674
+ export type PluginPresentationPlacedViewsScaleArgs = z.infer<typeof PluginPresentationPlacedViewsScaleArgs>;
675
+ /**
676
+ * Arguments for {@linkcode PluginPresentationPlacedViewsApi.setScale}.
677
+ *
678
+ * | Property | Type | Description |
679
+ * |---|---|---|
680
+ * | `shapeId` | `string` | The placed view shape to set the scale of |
681
+ * | `scale` | `number` | A standard scale value for the project's unit system |
682
+ */
683
+ export declare const PluginPresentationPlacedViewsSetScaleArgs: z.ZodObject<{
684
+ shapeId: z.ZodString;
685
+ scale: z.ZodNumber;
686
+ }, z.core.$strip>;
687
+ export type PluginPresentationPlacedViewsSetScaleArgs = z.infer<typeof PluginPresentationPlacedViewsSetScaleArgs>;
688
+ /**
689
+ * Arguments for {@linkcode PluginPresentationPlacedViewsApi.setCrop}.
690
+ *
691
+ * | Property | Type | Description |
692
+ * |---|---|---|
693
+ * | `shapeId` | `string` | The placed view shape to crop |
694
+ * | `crop` | {@linkcode PluginPlacedViewCrop}` \| null` | The crop window, or `null` to clear |
695
+ */
696
+ export declare const PluginPresentationPlacedViewsSetCropArgs: z.ZodObject<{
697
+ shapeId: z.ZodString;
698
+ crop: z.ZodNullable<z.ZodObject<{
699
+ topLeft: z.ZodObject<{
700
+ x: z.ZodNumber;
701
+ y: z.ZodNumber;
702
+ }, z.core.$strip>;
703
+ bottomRight: z.ZodObject<{
704
+ x: z.ZodNumber;
705
+ y: z.ZodNumber;
706
+ }, z.core.$strip>;
707
+ }, z.core.$strip>>;
708
+ }, z.core.$strip>;
709
+ export type PluginPresentationPlacedViewsSetCropArgs = z.infer<typeof PluginPresentationPlacedViewsSetCropArgs>;
710
+ /**
711
+ * Arguments for {@linkcode PluginPresentationPlacedViewsApi.setRotation}.
712
+ *
713
+ * | Property | Type | Description |
714
+ * |---|---|---|
715
+ * | `shapeId` | `string` | The placed view shape to rotate |
716
+ * | `rotation` | `number` | Absolute rotation in radians (tldraw convention) |
717
+ */
718
+ export declare const PluginPresentationPlacedViewsSetRotationArgs: z.ZodObject<{
719
+ shapeId: z.ZodString;
720
+ rotation: z.ZodNumber;
721
+ }, z.core.$strip>;
722
+ export type PluginPresentationPlacedViewsSetRotationArgs = z.infer<typeof PluginPresentationPlacedViewsSetRotationArgs>;
723
+ /**
724
+ * A Present-mode style category — mirrors the host's view-settings CATEGORIES
725
+ * exactly. Sheets/auto-diagrams use the subset Space / Department /
726
+ * Adjacency Line.
727
+ */
728
+ export declare const PluginViewSettingCategory: z.ZodEnum<{
729
+ Envelope: "Envelope";
730
+ Department: "Department";
731
+ Site: "Site";
732
+ Topography: "Topography";
733
+ Space: "Space";
734
+ "Facade/Mass": "Facade/Mass";
735
+ Dimension: "Dimension";
736
+ "Reference Line": "Reference Line";
737
+ "Adjacency Line": "Adjacency Line";
738
+ "Landscape elements": "Landscape elements";
739
+ }>;
740
+ export type PluginViewSettingCategory = z.infer<typeof PluginViewSettingCategory>;
741
+ /** The 7 line dash styles (mirrors the host's LINE_STYLES). */
742
+ export declare const PluginViewLineStyle: z.ZodEnum<{
743
+ center: "center";
744
+ hidden: "hidden";
745
+ solid: "solid";
746
+ dashed: "dashed";
747
+ dashdot: "dashdot";
748
+ phantom: "phantom";
749
+ propertyLine: "propertyLine";
750
+ }>;
751
+ export type PluginViewLineStyle = z.infer<typeof PluginViewLineStyle>;
752
+ /**
753
+ * A style patch for one category — any subset of the category's settings.
754
+ * Line weights are in **mm** (the printed weight); `opacity` values are 0–100;
755
+ * `colorMode` is `department` / `texture` / `monochrome` or `tag:<tagCategoryId>`
756
+ * (color by a project tag category).
757
+ *
758
+ * | Property | Type | Description |
759
+ * |---|---|---|
760
+ * | `hide` | `boolean`? | Hide the category (cascades to its labels) |
761
+ * | `lineStyle` | {@linkcode PluginViewLineStyle}? | Dash pattern |
762
+ * | `lineColor` | `string`? | Line color, 6-digit hex (`#` optional) |
763
+ * | `dashLength` | `number`? | Dash-length multiplier (> 0; `1` = default) |
764
+ * | `lineWidth` | `number`? | Single line weight in mm (categories without cut/projection) |
765
+ * | `cutWidth` | `number`? | Cut-line weight in mm |
766
+ * | `projectionWidth` | `number`? | Projection-line weight in mm |
767
+ * | `treeLineWidth` | `number`? | Tree line weight in mm (Landscape) |
768
+ * | `parkingLineWidth` | `number`? | Parking line weight in mm (Landscape) |
769
+ * | `colorMode` | `string`? | `department` \| `texture` \| `monochrome` \| `tag:<id>` |
770
+ * | `opacity` | `number`? | Category fill opacity, 0–100 |
771
+ * | `mapOpacity` | `number`? | Topography: map image opacity, 0–100 |
772
+ * | `buildingOpacity` | `number`? | Topography: context-building opacity, 0–100 |
773
+ * | `mapHide` | `boolean`? | Topography: hide the map image |
774
+ * | `buildingHide` | `boolean`? | Topography: hide context buildings |
775
+ * | `noBuilding` | `boolean`? | Topography: suppress buildings entirely |
776
+ * | `viewStyle` | `"NONE" \| "FILLET" \| "BUBBLE"`? | Shape restyle: block / rounded corner / bubble |
777
+ * | `radius` | `number`? | Corner radius for `FILLET` (feet) |
778
+ * | `inset` | `number`? | Shape inset/offset |
779
+ */
780
+ export declare const PluginPlacedViewStylePatch: z.ZodObject<{
781
+ hide: z.ZodOptional<z.ZodBoolean>;
782
+ lineStyle: z.ZodOptional<z.ZodEnum<{
783
+ center: "center";
784
+ hidden: "hidden";
785
+ solid: "solid";
786
+ dashed: "dashed";
787
+ dashdot: "dashdot";
788
+ phantom: "phantom";
789
+ propertyLine: "propertyLine";
790
+ }>>;
791
+ lineColor: z.ZodOptional<z.ZodString>;
792
+ dashLength: z.ZodOptional<z.ZodNumber>;
793
+ lineWidth: z.ZodOptional<z.ZodNumber>;
794
+ cutWidth: z.ZodOptional<z.ZodNumber>;
795
+ projectionWidth: z.ZodOptional<z.ZodNumber>;
796
+ treeLineWidth: z.ZodOptional<z.ZodNumber>;
797
+ parkingLineWidth: z.ZodOptional<z.ZodNumber>;
798
+ colorMode: z.ZodOptional<z.ZodString>;
799
+ opacity: z.ZodOptional<z.ZodNumber>;
800
+ mapOpacity: z.ZodOptional<z.ZodNumber>;
801
+ buildingOpacity: z.ZodOptional<z.ZodNumber>;
802
+ mapHide: z.ZodOptional<z.ZodBoolean>;
803
+ buildingHide: z.ZodOptional<z.ZodBoolean>;
804
+ noBuilding: z.ZodOptional<z.ZodBoolean>;
805
+ viewStyle: z.ZodOptional<z.ZodEnum<{
806
+ NONE: "NONE";
807
+ FILLET: "FILLET";
808
+ BUBBLE: "BUBBLE";
809
+ }>>;
810
+ radius: z.ZodOptional<z.ZodNumber>;
811
+ inset: z.ZodOptional<z.ZodNumber>;
812
+ }, z.core.$strict>;
813
+ export type PluginPlacedViewStylePatch = z.infer<typeof PluginPlacedViewStylePatch>;
814
+ /** Label types that carry typography in a category's Text tab. */
815
+ export declare const PluginViewLabelType: z.ZodEnum<{
816
+ department: "department";
817
+ objectLabels: "objectLabels";
818
+ areas: "areas";
819
+ }>;
820
+ export type PluginViewLabelType = z.infer<typeof PluginViewLabelType>;
821
+ /**
822
+ * Font-styles patch for one category's Text tab.
823
+ *
824
+ * | Property | Type | Description |
825
+ * |---|---|---|
826
+ * | `visibleTypes` | {@linkcode PluginViewLabelType}`[]`? | Which label types render (`[]` hides all) |
827
+ * | `objectLabels` | variant? | Typography for the name label |
828
+ * | `department` | variant? | Typography for the department label |
829
+ * | `areas` | variant? | Typography for the area/tag values |
830
+ */
831
+ export declare const PluginPlacedViewFontStylesPatch: z.ZodObject<{
832
+ visibleTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
833
+ department: "department";
834
+ objectLabels: "objectLabels";
835
+ areas: "areas";
836
+ }>>>;
837
+ objectLabels: z.ZodOptional<z.ZodObject<{
838
+ fontFamily: z.ZodOptional<z.ZodString>;
839
+ fontWeight: z.ZodOptional<z.ZodString>;
840
+ fontStyle: z.ZodOptional<z.ZodEnum<{
841
+ normal: "normal";
842
+ italic: "italic";
843
+ }>>;
844
+ fontSize: z.ZodOptional<z.ZodNumber>;
845
+ }, z.core.$strict>>;
846
+ department: z.ZodOptional<z.ZodObject<{
847
+ fontFamily: z.ZodOptional<z.ZodString>;
848
+ fontWeight: z.ZodOptional<z.ZodString>;
849
+ fontStyle: z.ZodOptional<z.ZodEnum<{
850
+ normal: "normal";
851
+ italic: "italic";
852
+ }>>;
853
+ fontSize: z.ZodOptional<z.ZodNumber>;
854
+ }, z.core.$strict>>;
855
+ areas: z.ZodOptional<z.ZodObject<{
856
+ fontFamily: z.ZodOptional<z.ZodString>;
857
+ fontWeight: z.ZodOptional<z.ZodString>;
858
+ fontStyle: z.ZodOptional<z.ZodEnum<{
859
+ normal: "normal";
860
+ italic: "italic";
861
+ }>>;
862
+ fontSize: z.ZodOptional<z.ZodNumber>;
863
+ }, z.core.$strict>>;
864
+ }, z.core.$strict>;
865
+ export type PluginPlacedViewFontStylesPatch = z.infer<typeof PluginPlacedViewFontStylesPatch>;
866
+ /** Resolved font styles for one label type (fontSize in px). */
867
+ export type PluginViewFontVariant = {
868
+ fontFamily?: string;
869
+ fontWeight?: string;
870
+ fontStyle?: "normal" | "italic";
871
+ fontSize?: number;
872
+ };
873
+ /**
874
+ * One category's resolved styles on a placed view or sheet.
875
+ *
876
+ * | Property | Type | Description |
877
+ * |---|---|---|
878
+ * | `category` | {@linkcode PluginViewSettingCategory} | The category |
879
+ * | `disabled` | `boolean` | Not visible in this view — settings are inert |
880
+ * | `supported` | `string[]` | Setting ids this category accepts in `updateStyles` |
881
+ * | `settings` | {@linkcode PluginPlacedViewStylePatch} | Fully-resolved values (defaults + overrides) |
882
+ * | `fontStyles` | object? | Resolved Text-tab typography (absent when the category has no Text tab) |
883
+ */
884
+ export type PluginPlacedViewCategoryStyles = {
885
+ category: PluginViewSettingCategory;
886
+ disabled: boolean;
887
+ supported: string[];
888
+ settings: PluginPlacedViewStylePatch;
889
+ fontStyles?: {
890
+ visibleTypes: PluginViewLabelType[];
891
+ objectLabels?: PluginViewFontVariant;
892
+ department?: PluginViewFontVariant;
893
+ areas?: PluginViewFontVariant;
894
+ };
895
+ };
896
+ /**
897
+ * Result of {@link PluginPresentationPlacedViewsApi.getStyles}.
898
+ *
899
+ * | Property | Type | Description |
900
+ * |---|---|---|
901
+ * | `shapeId` | `string` | The styleable shape read |
902
+ * | `kind` | `"view" \| "sheet"` | Placed view or auto-diagram sheet |
903
+ * | `categories` | {@linkcode PluginPlacedViewCategoryStyles}`[]` | One entry per applicable category |
904
+ */
905
+ export type PluginPlacedViewStylesResult = {
906
+ shapeId: string;
907
+ kind: "view" | "sheet";
908
+ categories: PluginPlacedViewCategoryStyles[];
909
+ };
910
+ /** Arguments for {@link PluginPresentationPlacedViewsApi.updateStyles}. */
911
+ export declare const PluginPlacedViewsUpdateStylesArgs: z.ZodObject<{
912
+ shapeId: z.ZodString;
913
+ category: z.ZodEnum<{
914
+ Envelope: "Envelope";
915
+ Department: "Department";
916
+ Site: "Site";
917
+ Topography: "Topography";
918
+ Space: "Space";
919
+ "Facade/Mass": "Facade/Mass";
920
+ Dimension: "Dimension";
921
+ "Reference Line": "Reference Line";
922
+ "Adjacency Line": "Adjacency Line";
923
+ "Landscape elements": "Landscape elements";
924
+ }>;
925
+ patch: z.ZodObject<{
926
+ hide: z.ZodOptional<z.ZodBoolean>;
927
+ lineStyle: z.ZodOptional<z.ZodEnum<{
928
+ center: "center";
929
+ hidden: "hidden";
930
+ solid: "solid";
931
+ dashed: "dashed";
932
+ dashdot: "dashdot";
933
+ phantom: "phantom";
934
+ propertyLine: "propertyLine";
935
+ }>>;
936
+ lineColor: z.ZodOptional<z.ZodString>;
937
+ dashLength: z.ZodOptional<z.ZodNumber>;
938
+ lineWidth: z.ZodOptional<z.ZodNumber>;
939
+ cutWidth: z.ZodOptional<z.ZodNumber>;
940
+ projectionWidth: z.ZodOptional<z.ZodNumber>;
941
+ treeLineWidth: z.ZodOptional<z.ZodNumber>;
942
+ parkingLineWidth: z.ZodOptional<z.ZodNumber>;
943
+ colorMode: z.ZodOptional<z.ZodString>;
944
+ opacity: z.ZodOptional<z.ZodNumber>;
945
+ mapOpacity: z.ZodOptional<z.ZodNumber>;
946
+ buildingOpacity: z.ZodOptional<z.ZodNumber>;
947
+ mapHide: z.ZodOptional<z.ZodBoolean>;
948
+ buildingHide: z.ZodOptional<z.ZodBoolean>;
949
+ noBuilding: z.ZodOptional<z.ZodBoolean>;
950
+ viewStyle: z.ZodOptional<z.ZodEnum<{
951
+ NONE: "NONE";
952
+ FILLET: "FILLET";
953
+ BUBBLE: "BUBBLE";
954
+ }>>;
955
+ radius: z.ZodOptional<z.ZodNumber>;
956
+ inset: z.ZodOptional<z.ZodNumber>;
957
+ }, z.core.$strict>;
958
+ }, z.core.$strip>;
959
+ export type PluginPlacedViewsUpdateStylesArgs = z.infer<typeof PluginPlacedViewsUpdateStylesArgs>;
960
+ /** Arguments for {@link PluginPresentationPlacedViewsApi.updateFontStyles}. */
961
+ export declare const PluginPlacedViewsUpdateFontStylesArgs: z.ZodObject<{
962
+ shapeId: z.ZodString;
963
+ category: z.ZodEnum<{
964
+ Envelope: "Envelope";
965
+ Department: "Department";
966
+ Site: "Site";
967
+ Topography: "Topography";
968
+ Space: "Space";
969
+ "Facade/Mass": "Facade/Mass";
970
+ Dimension: "Dimension";
971
+ "Reference Line": "Reference Line";
972
+ "Adjacency Line": "Adjacency Line";
973
+ "Landscape elements": "Landscape elements";
974
+ }>;
975
+ patch: z.ZodObject<{
976
+ visibleTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
977
+ department: "department";
978
+ objectLabels: "objectLabels";
979
+ areas: "areas";
980
+ }>>>;
981
+ objectLabels: z.ZodOptional<z.ZodObject<{
982
+ fontFamily: z.ZodOptional<z.ZodString>;
983
+ fontWeight: z.ZodOptional<z.ZodString>;
984
+ fontStyle: z.ZodOptional<z.ZodEnum<{
985
+ normal: "normal";
986
+ italic: "italic";
987
+ }>>;
988
+ fontSize: z.ZodOptional<z.ZodNumber>;
989
+ }, z.core.$strict>>;
990
+ department: z.ZodOptional<z.ZodObject<{
991
+ fontFamily: z.ZodOptional<z.ZodString>;
992
+ fontWeight: z.ZodOptional<z.ZodString>;
993
+ fontStyle: z.ZodOptional<z.ZodEnum<{
994
+ normal: "normal";
995
+ italic: "italic";
996
+ }>>;
997
+ fontSize: z.ZodOptional<z.ZodNumber>;
998
+ }, z.core.$strict>>;
999
+ areas: z.ZodOptional<z.ZodObject<{
1000
+ fontFamily: z.ZodOptional<z.ZodString>;
1001
+ fontWeight: z.ZodOptional<z.ZodString>;
1002
+ fontStyle: z.ZodOptional<z.ZodEnum<{
1003
+ normal: "normal";
1004
+ italic: "italic";
1005
+ }>>;
1006
+ fontSize: z.ZodOptional<z.ZodNumber>;
1007
+ }, z.core.$strict>>;
1008
+ }, z.core.$strict>;
1009
+ }, z.core.$strip>;
1010
+ export type PluginPlacedViewsUpdateFontStylesArgs = z.infer<typeof PluginPlacedViewsUpdateFontStylesArgs>;
1011
+ /**
1012
+ * A label on a placed view — a text child generated from the view content.
1013
+ *
1014
+ * | Property | Type | Description |
1015
+ * |---|---|---|
1016
+ * | `labelId` | `string` | The label's shape id (addressable in `moveLabel`/`setLabelHidden`) |
1017
+ * | `category` | `string \| null` | The style category it belongs to (`null` when untagged) |
1018
+ * | `text` | `string` | The rendered text |
1019
+ * | `position` | {@linkcode PluginSheetPosition} | Position relative to the placed view |
1020
+ * | `scale` | `number` | The label's scale factor |
1021
+ * | `hidden` | `boolean` | Whether it is currently hidden |
1022
+ */
1023
+ export type PluginPlacedViewLabel = {
1024
+ labelId: string;
1025
+ category: string | null;
1026
+ text: string;
1027
+ position: PluginSheetPosition;
1028
+ scale: number;
1029
+ hidden: boolean;
1030
+ };
1031
+ /** Result of {@link PluginPresentationPlacedViewsApi.listLabels}. */
1032
+ export type PluginPlacedViewLabelsResult = {
1033
+ labels: PluginPlacedViewLabel[];
1034
+ };
1035
+ /** Arguments for {@link PluginPresentationPlacedViewsApi.moveLabel}. */
1036
+ export declare const PluginPlacedViewsMoveLabelArgs: z.ZodObject<{
1037
+ labelId: z.ZodString;
1038
+ position: z.ZodObject<{
1039
+ x: z.ZodNumber;
1040
+ y: z.ZodNumber;
1041
+ }, z.core.$strip>;
1042
+ }, z.core.$strip>;
1043
+ export type PluginPlacedViewsMoveLabelArgs = z.infer<typeof PluginPlacedViewsMoveLabelArgs>;
1044
+ /** Arguments for {@link PluginPresentationPlacedViewsApi.setLabelHidden}. */
1045
+ export declare const PluginPlacedViewsSetLabelHiddenArgs: z.ZodObject<{
1046
+ labelId: z.ZodString;
1047
+ hidden: z.ZodBoolean;
1048
+ }, z.core.$strip>;
1049
+ export type PluginPlacedViewsSetLabelHiddenArgs = z.infer<typeof PluginPlacedViewsSetLabelHiddenArgs>;
1050
+ /**
1051
+ * Origin classification of a Present-canvas shape: a placed view, an
1052
+ * AI-generated output, a placed diagram image, a plugin-created shape, a
1053
+ * user annotation, a plain image, or other.
1054
+ */
1055
+ export declare const PluginCanvasShapeOrigin: z.ZodEnum<{
1056
+ image: "image";
1057
+ view: "view";
1058
+ aiOutput: "aiOutput";
1059
+ diagram: "diagram";
1060
+ pluginShape: "pluginShape";
1061
+ annotation: "annotation";
1062
+ other: "other";
1063
+ }>;
1064
+ export type PluginCanvasShapeOrigin = z.infer<typeof PluginCanvasShapeOrigin>;
1065
+ /**
1066
+ * A top-level shape on the Present canvas.
1067
+ *
1068
+ * | Property | Type | Description |
1069
+ * |---|---|---|
1070
+ * | `shapeId` | `string` | The shape id |
1071
+ * | `type` | `string` | The canvas shape type (`view`, `image`, `geo`, `text`, …) |
1072
+ * | `origin` | {@linkcode PluginCanvasShapeOrigin} | What created it |
1073
+ * | `sheetId` | `string \| null` | The sheet it sits on (`null` when loose on the canvas) |
1074
+ * | `position` | {@linkcode PluginSheetPosition} | Top-left position (sheet-local; page coordinates off-sheet) |
1075
+ * | `size` | `{ width: number, height: number }` | Displayed size |
1076
+ * | `rotation` | `number` | Rotation in radians |
1077
+ * | `opacity` | `number` | Whole-shape opacity, 0–1 |
1078
+ */
1079
+ export type PluginCanvasShape = {
1080
+ shapeId: string;
1081
+ type: string;
1082
+ origin: PluginCanvasShapeOrigin;
1083
+ sheetId: string | null;
1084
+ position: PluginSheetPosition;
1085
+ size: {
1086
+ width: number;
1087
+ height: number;
1088
+ };
1089
+ rotation: number;
1090
+ opacity: number;
1091
+ };
1092
+ /** Result of {@link PluginPresentationPlacedViewsApi.listShapes}. */
1093
+ export type PluginCanvasShapesListResult = {
1094
+ shapes: PluginCanvasShape[];
1095
+ };
1096
+ /** Result of {@link PluginPresentationPlacedViewsApi.deleteShapes}. */
1097
+ export type PluginCanvasShapesDeleteResult = {
1098
+ deleted: string[];
1099
+ };
1100
+ /** Arguments for {@link PluginPresentationPlacedViewsApi.moveShape}. */
1101
+ export declare const PluginPlacedViewsMoveShapeArgs: z.ZodObject<{
1102
+ shapeId: z.ZodString;
1103
+ position: z.ZodObject<{
1104
+ x: z.ZodNumber;
1105
+ y: z.ZodNumber;
1106
+ }, z.core.$strip>;
1107
+ sheetId: z.ZodOptional<z.ZodString>;
1108
+ }, z.core.$strip>;
1109
+ export type PluginPlacedViewsMoveShapeArgs = z.infer<typeof PluginPlacedViewsMoveShapeArgs>;
1110
+ /** Arguments for {@link PluginPresentationPlacedViewsApi.resizeShape}. */
1111
+ export declare const PluginPlacedViewsResizeShapeArgs: z.ZodObject<{
1112
+ shapeId: z.ZodString;
1113
+ factor: z.ZodNumber;
1114
+ }, z.core.$strip>;
1115
+ export type PluginPlacedViewsResizeShapeArgs = z.infer<typeof PluginPlacedViewsResizeShapeArgs>;
1116
+ /** Arguments for {@link PluginPresentationPlacedViewsApi.rotateShape}. */
1117
+ export declare const PluginPresentationPlacedViewsRotateShapeArgs: z.ZodObject<{
1118
+ shapeId: z.ZodString;
1119
+ rotation: z.ZodNumber;
1120
+ }, z.core.$strip>;
1121
+ export type PluginPresentationPlacedViewsRotateShapeArgs = z.infer<typeof PluginPresentationPlacedViewsRotateShapeArgs>;
1122
+ /** Arguments for {@link PluginPresentationPlacedViewsApi.deleteShapes}. */
1123
+ export declare const PluginPlacedViewsDeleteShapesArgs: z.ZodObject<{
1124
+ shapeIds: z.ZodArray<z.ZodString>;
1125
+ }, z.core.$strip>;
1126
+ export type PluginPlacedViewsDeleteShapesArgs = z.infer<typeof PluginPlacedViewsDeleteShapesArgs>;
1127
+ /** Arguments for {@link PluginPresentationPlacedViewsApi.setOpacity}. */
1128
+ export declare const PluginPlacedViewsSetOpacityArgs: z.ZodObject<{
1129
+ shapeId: z.ZodString;
1130
+ opacity: z.ZodNumber;
1131
+ }, z.core.$strip>;
1132
+ export type PluginPlacedViewsSetOpacityArgs = z.infer<typeof PluginPlacedViewsSetOpacityArgs>;
1133
+ /** Arguments for {@link PluginPresentationPlacedViewsApi.setMask}. */
1134
+ export declare const PluginPlacedViewsSetMaskArgs: z.ZodObject<{
1135
+ shapeId: z.ZodString;
1136
+ enabled: z.ZodBoolean;
1137
+ }, z.core.$strip>;
1138
+ export type PluginPlacedViewsSetMaskArgs = z.infer<typeof PluginPlacedViewsSetMaskArgs>;
1139
+ //# sourceMappingURL=placedViews.d.ts.map