@snaptrude/plugin-core 0.9.16 → 0.9.18-edgesetbacks-20261021.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.
- package/AGENTS.md +231 -231
- package/CHANGELOG.md +408 -402
- package/CLAUDE.md +11 -11
- package/api-manifest.json +1510 -701
- package/dist/api/analysis/daylight.d.ts +5 -5
- package/dist/api/analysis/solar.d.ts +2 -2
- package/dist/api/core/camera/index.d.ts +29 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +7 -1
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +8 -2
- package/dist/api/core/geom/update/contour.d.ts.map +1 -1
- package/dist/api/core/storeys/index.d.ts +5 -2
- package/dist/api/core/storeys/index.d.ts.map +1 -1
- package/dist/api/core/zoom/index.d.ts +13 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/bim.d.ts +299 -0
- package/dist/api/design/bim.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +2 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -1
- package/dist/api/design/catalog.d.ts +320 -0
- package/dist/api/design/catalog.d.ts.map +1 -0
- package/dist/api/design/create/bulk-items.d.ts +65 -25
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +299 -100
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +13 -12
- package/dist/api/design/create/opening-fields.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +1 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +18 -24
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +813 -35
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +16 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/networks.d.ts +1703 -0
- package/dist/api/design/networks.d.ts.map +1 -0
- package/dist/api/design/query/grids.d.ts +2 -2
- package/dist/api/design/query/index.d.ts +42 -32
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/selection/index.d.ts +10 -10
- package/dist/api/design/types/index.d.ts +40 -24
- package/dist/api/design/types/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +111 -6
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +8 -8
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/entity/buildableEnvelope.d.ts +84 -2
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +10 -10
- package/dist/api/presentation/annotate.d.ts +38 -22
- package/dist/api/presentation/annotate.d.ts.map +1 -1
- package/dist/api/presentation/drawingContract.d.ts +32 -0
- package/dist/api/presentation/drawingContract.d.ts.map +1 -0
- package/dist/api/presentation/drawings.d.ts +3523 -0
- package/dist/api/presentation/drawings.d.ts.map +1 -0
- package/dist/api/presentation/export.d.ts +23 -5
- package/dist/api/presentation/export.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +41 -12
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +106 -6
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/sections.d.ts +461 -0
- package/dist/api/presentation/sections.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/api/presentation/sheets.d.ts +175 -19
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/viewPresets.d.ts +222 -0
- package/dist/api/presentation/viewPresets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +141 -8
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/presentation/walkthroughs.d.ts +6 -6
- package/dist/errors/codes.d.ts +3 -1
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/index.cjs +3883 -2385
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3744 -2385
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/check-dist-fresh.mjs +22 -22
- package/scripts/generate-manifest.mjs +243 -238
- package/scripts/generate-manifest.test.mjs +303 -303
- package/src/api/analysis/daylight.ts +470 -470
- package/src/api/analysis/heatmaps.ts +683 -683
- package/src/api/analysis/illuminance.ts +155 -155
- package/src/api/analysis/index.ts +61 -61
- package/src/api/analysis/shadows.ts +183 -183
- package/src/api/analysis/solar.ts +237 -237
- package/src/api/analysis/sunlightHours.ts +211 -211
- package/src/api/analysis/sunpath.ts +83 -83
- package/src/api/analysis/weather.ts +179 -179
- package/src/api/core/buildings.ts +485 -485
- package/src/api/core/camera/index.ts +696 -667
- package/src/api/core/comment/index.ts +376 -376
- package/src/api/core/geom/create/index.ts +2139 -2133
- package/src/api/core/geom/delete/index.ts +84 -84
- package/src/api/core/geom/index.ts +35 -35
- package/src/api/core/geom/query/arc.ts +169 -169
- package/src/api/core/geom/query/brep.ts +621 -621
- package/src/api/core/geom/query/circle.ts +404 -404
- package/src/api/core/geom/query/contour.ts +540 -540
- package/src/api/core/geom/query/curve.ts +1102 -1102
- package/src/api/core/geom/query/edge.ts +130 -130
- package/src/api/core/geom/query/face.ts +508 -508
- package/src/api/core/geom/query/halfedge.ts +210 -210
- package/src/api/core/geom/query/index.ts +63 -63
- package/src/api/core/geom/query/profile.ts +473 -473
- package/src/api/core/geom/query/vertex.ts +205 -205
- package/src/api/core/geom/update/contour.ts +323 -317
- package/src/api/core/geom/update/curve.ts +209 -209
- package/src/api/core/geom/update/index.ts +29 -29
- package/src/api/core/geom/update/profile.ts +379 -379
- package/src/api/core/groups.ts +521 -521
- package/src/api/core/handles/index.ts +234 -234
- package/src/api/core/history/index.ts +84 -84
- package/src/api/core/index.ts +99 -99
- package/src/api/core/io/export/index.ts +126 -126
- package/src/api/core/io/import/index.ts +504 -504
- package/src/api/core/io/index.ts +42 -42
- package/src/api/core/io/job/index.ts +140 -140
- package/src/api/core/io/query/index.ts +71 -71
- package/src/api/core/io/terrain/index.ts +360 -360
- package/src/api/core/io/underlay/index.ts +705 -705
- package/src/api/core/layers.ts +540 -540
- package/src/api/core/math/index.ts +20 -20
- package/src/api/core/math/quat.ts +172 -172
- package/src/api/core/math/vec3.ts +179 -179
- package/src/api/core/mode/index.ts +108 -108
- package/src/api/core/project/index.ts +479 -479
- package/src/api/core/proposals/index.ts +570 -570
- package/src/api/core/storeys/index.ts +311 -308
- package/src/api/core/storeys/layers.ts +339 -339
- package/src/api/core/tags.ts +911 -911
- package/src/api/core/units/index.ts +164 -164
- package/src/api/core/user.ts +46 -46
- package/src/api/core/zoom/index.ts +64 -51
- package/src/api/design/bim.ts +210 -0
- package/src/api/design/boolean/index.ts +181 -179
- package/src/api/design/catalog.ts +203 -0
- package/src/api/design/create/bulk-items.ts +294 -254
- package/src/api/design/create/grids.ts +137 -137
- package/src/api/design/create/index.ts +2178 -1980
- package/src/api/design/create/opening-fields.ts +40 -37
- package/src/api/design/delete/index.ts +75 -74
- package/src/api/design/dimensions.ts +453 -453
- package/src/api/design/doors/index.ts +516 -500
- package/src/api/design/edit/index.ts +54 -54
- package/src/api/design/erase/index.ts +151 -151
- package/src/api/design/family.ts +1342 -704
- package/src/api/design/furniture/index.ts +319 -319
- package/src/api/design/grids.ts +237 -237
- package/src/api/design/index.ts +304 -274
- package/src/api/design/lock.ts +69 -69
- package/src/api/design/materials/index.ts +608 -608
- package/src/api/design/networks.ts +607 -0
- package/src/api/design/query/geometry/index.ts +319 -319
- package/src/api/design/query/grids.ts +197 -197
- package/src/api/design/query/index.ts +1236 -1226
- package/src/api/design/query/referenceLines.ts +52 -52
- package/src/api/design/query/spaces.ts +275 -275
- package/src/api/design/selection/index.ts +273 -273
- package/src/api/design/shared.ts +40 -40
- package/src/api/design/transform/index.ts +254 -254
- package/src/api/design/types/index.ts +163 -156
- package/src/api/design/update/index.ts +1096 -983
- package/src/api/design/visibility.ts +143 -143
- package/src/api/design/windows/index.ts +351 -333
- package/src/api/entity/buildableEnvelope.ts +397 -322
- package/src/api/entity/index.ts +30 -30
- package/src/api/entity/referenceLine.ts +235 -235
- package/src/api/entity/space.ts +612 -612
- package/src/api/entity/story.ts +517 -517
- package/src/api/index.ts +47 -47
- package/src/api/presentation/aiInspiration.ts +1116 -1116
- package/src/api/presentation/annotate.ts +417 -385
- package/src/api/presentation/camera.ts +289 -289
- package/src/api/presentation/diagrams.ts +194 -194
- package/src/api/presentation/drawingContract.ts +70 -0
- package/src/api/presentation/drawings.ts +1179 -0
- package/src/api/presentation/export.ts +134 -108
- package/src/api/presentation/import.ts +159 -159
- package/src/api/presentation/index.ts +160 -126
- package/src/api/presentation/placedViews.ts +1211 -1120
- package/src/api/presentation/sections.ts +420 -0
- package/src/api/presentation/shapes.ts +274 -274
- package/src/api/presentation/sheets.ts +746 -585
- package/src/api/presentation/slideshow.ts +134 -134
- package/src/api/presentation/tables.ts +84 -84
- package/src/api/presentation/viewPresets.ts +241 -0
- package/src/api/presentation/views.ts +742 -673
- package/src/api/presentation/walkthroughs.ts +1201 -1201
- package/src/api/program/adjacency.ts +164 -164
- package/src/api/program/areas.ts +408 -408
- package/src/api/program/classification.ts +138 -138
- package/src/api/program/cores.ts +83 -83
- package/src/api/program/departments.ts +517 -517
- package/src/api/program/index.ts +73 -73
- package/src/api/program/labels.ts +332 -332
- package/src/api/program/layout.ts +422 -422
- package/src/api/program/metadata.ts +364 -364
- package/src/api/program/metrics.ts +120 -120
- package/src/api/program/site.ts +748 -748
- package/src/api/program/spreadsheet.ts +2698 -2698
- package/src/api/workspace/index.ts +612 -612
- package/src/errors/codes.ts +143 -136
- package/src/errors/envelope.ts +75 -75
- package/src/errors/index.ts +21 -21
- package/src/errors/plugin-error.ts +134 -134
- package/src/handles.ts +297 -297
- package/src/host-utils.ts +67 -67
- package/src/index.ts +7 -7
- package/src/massParameters.ops.ts +246 -246
- package/src/massParameters.ts +427 -427
- package/src/types.ts +16 -16
- package/test/drawingContract.test.mjs +288 -0
- package/test/errors.test.mjs +185 -184
- package/test/massParameters.test.mjs +952 -952
- package/test/presentationViewSettings.test.mjs +85 -0
- package/tsconfig.json +22 -22
- package/tsup.config.ts +12 -12
|
@@ -1,585 +1,746 @@
|
|
|
1
|
-
import * as z from "zod"
|
|
2
|
-
import { PluginApiReturn } from "../../types"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* `
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* @
|
|
79
|
-
* @
|
|
80
|
-
* @
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* @
|
|
115
|
-
* @
|
|
116
|
-
* @
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
*
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
* @
|
|
212
|
-
* @
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
* @returns
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
* @
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
* @
|
|
322
|
-
* @
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
export
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
*
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
export
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
}
|
|
547
|
-
export
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
export
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
* |
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
})
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
1
|
+
import * as z from "zod"
|
|
2
|
+
import { PluginApiReturn } from "../../types"
|
|
3
|
+
import { PluginStandardDrawingScale } from "./drawingContract"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Presentation sheets — the layout sheets a presentation is assembled on.
|
|
7
|
+
*
|
|
8
|
+
* A **sheet** is a page in Present mode that views and diagrams are placed onto.
|
|
9
|
+
* These methods require **Present mode to be open** (the documentation editor) —
|
|
10
|
+
* reads return `[]`/`null` and writes throw when it is not.
|
|
11
|
+
*
|
|
12
|
+
* `list`/`get` are reads; the rest mutate and require Present mode to be open:
|
|
13
|
+
* `create` adds a sheet, `place` drops a saved view onto a sheet as a live
|
|
14
|
+
* linked view shape (fitted to that sheet), `placeDrawing` moves an existing
|
|
15
|
+
* drawing onto a sheet (scaled down to fit by default), `rename` relabels a
|
|
16
|
+
* sheet, `delete` removes one, `reorder` moves one in the sheet order,
|
|
17
|
+
* `setActive` navigates to one, and `updatePlacedView` re-renders placed views
|
|
18
|
+
* to the current model.
|
|
19
|
+
*
|
|
20
|
+
* `presentation.drawings.create` never puts a drawing on a sheet: it makes the
|
|
21
|
+
* drawing beside its source view on the canvas. To put a view on a sheet, call
|
|
22
|
+
* `place(sheetId, viewId)`; to move a drawing you already made, call
|
|
23
|
+
* `placeDrawing(sheetId, drawingId)`.
|
|
24
|
+
*
|
|
25
|
+
* Accessed via `snaptrude.presentation.sheets`.
|
|
26
|
+
*/
|
|
27
|
+
export abstract class PluginPresentationSheetsApi {
|
|
28
|
+
constructor() {}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* List the layout sheets in the presentation.
|
|
32
|
+
*
|
|
33
|
+
* @returns A {@linkcode PluginPresentationSheetsListResult} with a `sheets`
|
|
34
|
+
* array (empty when Present mode is closed or there are no sheets).
|
|
35
|
+
*
|
|
36
|
+
* @examplePrompt List all the sheets
|
|
37
|
+
* @examplePrompt How many layout sheets are there?
|
|
38
|
+
* @examplePrompt Show me the presentation sheets
|
|
39
|
+
* @examplePrompt What sheets can I place views on?
|
|
40
|
+
*
|
|
41
|
+
* # Example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const { sheets } = await snaptrude.presentation.sheets.list()
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
public abstract list(): PluginApiReturn<PluginPresentationSheetsListResult>
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get a single sheet by id.
|
|
50
|
+
*
|
|
51
|
+
* @param sheetId - The id of the sheet to read.
|
|
52
|
+
* @returns The matching {@linkcode PluginPresentationSheet}, or `null`.
|
|
53
|
+
*
|
|
54
|
+
* @examplePrompt Get the sheet with id sheet_1
|
|
55
|
+
* @examplePrompt Find the sheet called Cover
|
|
56
|
+
* @examplePrompt Look up a layout sheet by id
|
|
57
|
+
*
|
|
58
|
+
* # Example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const sheet = await snaptrude.presentation.sheets.get("sheet_1")
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
public abstract get(
|
|
64
|
+
sheetId: string,
|
|
65
|
+
): PluginApiReturn<PluginPresentationSheetsGetResult>
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Create a new layout sheet.
|
|
69
|
+
*
|
|
70
|
+
* Optionally sets the paper size and orientation — the same presets as the
|
|
71
|
+
* sheet header's size dropdown (ANSI A–E, Arch A–E1, ISO A4–A0). When `size`
|
|
72
|
+
* is omitted the sheet inherits the editor session's last-used size
|
|
73
|
+
* (initially ANSI B) in landscape, so pass `size` explicitly whenever the
|
|
74
|
+
* output format matters.
|
|
75
|
+
*
|
|
76
|
+
* Requires Present mode to be open.
|
|
77
|
+
*
|
|
78
|
+
* @param name - Display name for the new sheet (optional).
|
|
79
|
+
* @param options - Optional `size` ({@linkcode PluginSheetSize} paper preset)
|
|
80
|
+
* and `orientation` ({@linkcode PluginSheetOrientation}; `"landscape"` when
|
|
81
|
+
* omitted).
|
|
82
|
+
* @returns The newly created {@linkcode PluginPresentationSheet}.
|
|
83
|
+
* @throws If Present mode is not open.
|
|
84
|
+
*
|
|
85
|
+
* @examplePrompt Create a new sheet called Cover
|
|
86
|
+
* @examplePrompt Add an A3 landscape layout sheet
|
|
87
|
+
* @examplePrompt Make a new ANSI D presentation sheet named Floor Plans
|
|
88
|
+
* @examplePrompt Create a portrait A4 sheet
|
|
89
|
+
*
|
|
90
|
+
* # Example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const sheet = await snaptrude.presentation.sheets.create("Cover", {
|
|
93
|
+
* size: "ISO_A3",
|
|
94
|
+
* orientation: "landscape",
|
|
95
|
+
* })
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
public abstract create(
|
|
99
|
+
name?: string,
|
|
100
|
+
options?: { size?: PluginSheetSize; orientation?: PluginSheetOrientation },
|
|
101
|
+
): PluginApiReturn<PluginPresentationSheet>
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Set a sheet's paper size and/or orientation.
|
|
105
|
+
*
|
|
106
|
+
* Applies one of the standard paper presets — exactly what the sheet header's
|
|
107
|
+
* size dropdown and orientation toggle do. Content that no longer fits inside
|
|
108
|
+
* the resized sheet is moved out onto the canvas (matching the native
|
|
109
|
+
* behavior). Undoable. Does not change the user's remembered default size for
|
|
110
|
+
* new sheets.
|
|
111
|
+
*
|
|
112
|
+
* Requires Present mode to be open.
|
|
113
|
+
*
|
|
114
|
+
* @param sheetId - The id of the sheet to resize.
|
|
115
|
+
* @param size - The paper preset ({@linkcode PluginSheetSize}).
|
|
116
|
+
* @param orientation - Optional {@linkcode PluginSheetOrientation}; keeps the
|
|
117
|
+
* sheet's current orientation when omitted.
|
|
118
|
+
* @returns The updated {@linkcode PluginPresentationSheet}.
|
|
119
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
120
|
+
*
|
|
121
|
+
* @examplePrompt Resize sheet_1 to A1
|
|
122
|
+
* @examplePrompt Make the cover sheet ANSI B portrait
|
|
123
|
+
* @examplePrompt Change this sheet to Arch D landscape
|
|
124
|
+
* @examplePrompt Set the sheet size to A3
|
|
125
|
+
*
|
|
126
|
+
* # Example
|
|
127
|
+
* ```ts
|
|
128
|
+
* const sheet = await snaptrude.presentation.sheets.setSize("sheet_1", "ISO_A1", "portrait")
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
public abstract setSize(
|
|
132
|
+
sheetId: string,
|
|
133
|
+
size: PluginSheetSize,
|
|
134
|
+
orientation?: PluginSheetOrientation,
|
|
135
|
+
): PluginApiReturn<PluginPresentationSheet>
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Set a sheet's print margin.
|
|
139
|
+
*
|
|
140
|
+
* Applies one of the canonical margin presets — exactly what the sheet
|
|
141
|
+
* header's margin dropdown does. `margin` is unit-agnostic: `0 | 0.25 |
|
|
142
|
+
* 0.5 | 0.75 | 1`, displayed as None / 1/4″ / 1/2″ / 3/4″ / 1″ on imperial
|
|
143
|
+
* projects and None / 5mm / 10mm / 15mm / 20mm on metric ones. One undo
|
|
144
|
+
* step. Requires Present mode to be open.
|
|
145
|
+
*
|
|
146
|
+
* @param sheetId - The id of the sheet.
|
|
147
|
+
* @param margin - The margin preset ({@linkcode PluginSheetMargin}).
|
|
148
|
+
* @returns The updated {@linkcode PluginPresentationSheet}.
|
|
149
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
150
|
+
*
|
|
151
|
+
* @examplePrompt Set the sheet margin to half an inch
|
|
152
|
+
* @examplePrompt Remove the margins on sheet_1
|
|
153
|
+
* @examplePrompt Give the cover sheet a 10mm margin
|
|
154
|
+
*
|
|
155
|
+
* # Example
|
|
156
|
+
* ```ts
|
|
157
|
+
* const sheet = await snaptrude.presentation.sheets.setMargin("sheet_1", 0.5)
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
public abstract setMargin(
|
|
161
|
+
sheetId: string,
|
|
162
|
+
margin: PluginSheetMargin,
|
|
163
|
+
): PluginApiReturn<PluginPresentationSheet>
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Place a saved view onto a sheet. This is the call that puts a view on a
|
|
167
|
+
* sheet (`presentation.drawings.create` makes a drawing beside its source
|
|
168
|
+
* view, not on a sheet). When `scale` is omitted the view is fitted to the
|
|
169
|
+
* target sheet: a 2D or site-plan view is placed at the largest
|
|
170
|
+
* standard scale at which it fits inside the target sheet's margin, and
|
|
171
|
+
* never at a larger scale than the normal view drop would pick; a 3D view
|
|
172
|
+
* has no scale, so it is shrunk evenly to fit instead. This is the same fit
|
|
173
|
+
* as `placeDrawing`. Omit `position` unless the user asked for a specific
|
|
174
|
+
* place.
|
|
175
|
+
* Without a `position` the drawing goes to the sheet centre when that is
|
|
176
|
+
* free, otherwise to the nearest free spot to the centre inside the margin,
|
|
177
|
+
* beside the drawings already there; when there is no free spot it is
|
|
178
|
+
* centred anyway and the result has `overlaps: true`. With a `position` it
|
|
179
|
+
* is placed as given, and the result has `overlaps: true` when it covers
|
|
180
|
+
* another drawing, but it is not moved. In both cases only other drawings
|
|
181
|
+
* count (placed views and their title blocks and labels): text, images and
|
|
182
|
+
* other shapes on the sheet are ignored. Each call fits one view to the
|
|
183
|
+
* whole sheet, so a second fitted view often has no free spot: when several
|
|
184
|
+
* views should share a sheet, pass a `scale` small enough for all of them;
|
|
185
|
+
* otherwise use `sheets.create` per view. When the result's `overlaps` is
|
|
186
|
+
* true, move the drawing or put it on its own sheet.
|
|
187
|
+
* An explicit `scale` is always kept, even when the drawing (title block
|
|
188
|
+
* included) does not fit inside the sheet's margin at that scale; the result
|
|
189
|
+
* then has `overflows: true`. When it is true, pass a smaller scale (larger
|
|
190
|
+
* denominator), omit `scale` to fit, or use a larger sheet.
|
|
191
|
+
* `scale` must be a standard architectural scale denominator (100 means 1:100)
|
|
192
|
+
* in the project's unit system; any other value is rejected. Metric: 10, 20, 50,
|
|
193
|
+
* 100, 150, 200, 250, 500, 1000. Imperial detail: 12, 16, 24, 32, 48, 64, 96, 128,
|
|
194
|
+
* 192, 384, 768, 1536 (1" = 1' to 1/128" = 1'; 48 is 1/4" = 1', 96 is 1/8" = 1').
|
|
195
|
+
* Imperial site: 120, 240, 360, 480, 600, 1200, 2400, 3600, 4800 (1" = 10' to
|
|
196
|
+
* 1" = 400'). Pick the LARGEST standard scale (smallest denominator) at which the
|
|
197
|
+
* view still fits its frame or sheet and its room labels stay readable: for a
|
|
198
|
+
* building floor plan that is usually 1:50 to 1:200 (1/4" = 1' to 1/16" = 1').
|
|
199
|
+
* Never use a site-sized scale (1:500 and up, 1/64" = 1' (768) and smaller,
|
|
200
|
+
* 1" = 20' (240) and up) for a single building plan unless the user asked for it.
|
|
201
|
+
*
|
|
202
|
+
* Drops the given view onto the sheet through the **native view drop** — the
|
|
203
|
+
* placed shape is a live linked view (the same shape the Present views panel's
|
|
204
|
+
* drag-drop creates), re-rendered from the current model, so
|
|
205
|
+
* {@linkcode PluginPresentationSheetsApi.updatePlacedView} refreshes it later.
|
|
206
|
+
* 2D and site-plan views are placed at an architectural scale: the fitted
|
|
207
|
+
* standard scale described above by default, or the explicit `scale` when
|
|
208
|
+
* given (one of the standard values above). 3D views have no scale; passing
|
|
209
|
+
* `scale` for one throws. Requires Present mode to be open.
|
|
210
|
+
*
|
|
211
|
+
* @param sheetId - The id of the sheet to place onto.
|
|
212
|
+
* @param viewId - The id of the saved view to place.
|
|
213
|
+
* @param options - Optional `position` ({@linkcode PluginSheetPosition}) —
|
|
214
|
+
* where to place it (when omitted, the sheet centre or the nearest free
|
|
215
|
+
* spot) — and `scale` — a standard scale value for the project's unit system (2D/site-plan views only;
|
|
216
|
+
* fitted to the target sheet when omitted).
|
|
217
|
+
* @returns A {@linkcode PluginPresentationSheetsPlaceResult} with the created
|
|
218
|
+
* `shapeId`, the `scale` used (`null` for a 3D view), whether the fit
|
|
219
|
+
* `rescaled` it, whether it `overlaps` another drawing on the sheet, and
|
|
220
|
+
* whether it `overflows` the sheet's margin at an explicit `scale`.
|
|
221
|
+
* (Hosts older than the fit return only `shapeId`.)
|
|
222
|
+
* @throws If Present mode is not open, the sheet/view id is invalid, `scale`
|
|
223
|
+
* is not a standard value for the project's unit system, or `scale` is
|
|
224
|
+
* passed for a 3D view. `PRECONDITION_FAILED` when the view does not fit
|
|
225
|
+
* the sheet even at the smallest standard scale, or the title block alone
|
|
226
|
+
* is larger than the sheet's drawable area (use a larger sheet); no
|
|
227
|
+
* drawing is left on the sheet.
|
|
228
|
+
*
|
|
229
|
+
* @examplePrompt Place the floor plan on Sheet 1
|
|
230
|
+
* @examplePrompt Add this 3D view to the cover sheet
|
|
231
|
+
* @examplePrompt Drop the site plan onto the layout sheet at 100, 200
|
|
232
|
+
* @examplePrompt Put the Ground Floor view on sheet_1 at 1:100 scale
|
|
233
|
+
* @examplePrompt Place the plan on the cover sheet at quarter-inch scale
|
|
234
|
+
* @examplePrompt Add a floor plan drawing of each storey to this sheet
|
|
235
|
+
*
|
|
236
|
+
* # Example
|
|
237
|
+
* ```ts
|
|
238
|
+
* const { shapeId } = await snaptrude.presentation.sheets.place("sheet_1", "view_123", {
|
|
239
|
+
* scale: 100, // 1:100 (metric project)
|
|
240
|
+
* })
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
public abstract place(
|
|
244
|
+
sheetId: string,
|
|
245
|
+
viewId: string,
|
|
246
|
+
options?: { position?: PluginSheetPosition; scale?: number },
|
|
247
|
+
): PluginApiReturn<PluginPresentationSheetsPlaceResult>
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Move an existing drawing onto a sheet without copying or regenerating it,
|
|
251
|
+
* scaled down to fit the sheet when it is too big. `presentation.drawings.create`
|
|
252
|
+
* leaves a drawing beside its source view, not on a sheet; this is the call
|
|
253
|
+
* that puts it on one. To place a saved view on a sheet in one call, use
|
|
254
|
+
* `sheets.place(sheetId, viewId)`, which fits it the same way.
|
|
255
|
+
* By default (`fit` true or omitted) a drawing larger than the sheet's
|
|
256
|
+
* drawable area (the sheet inside its margin) is moved to the LARGEST standard
|
|
257
|
+
* architectural scale at which it fits; a drawing that already fits keeps its
|
|
258
|
+
* scale, and a drawing is never scaled up. A 3D drawing has no architectural
|
|
259
|
+
* scale, so it is shrunk uniformly to fit instead. With `fit: false` the scale
|
|
260
|
+
* is kept and a drawing that does not fit is rejected with an error naming the
|
|
261
|
+
* drawing, the sheet and the scale, and saying to call `placeDrawing` without
|
|
262
|
+
* `fit: false` to fit it, or use a larger sheet. When even
|
|
263
|
+
* the smallest standard scale does not fit, the call is rejected with an error
|
|
264
|
+
* suggesting a larger sheet size.
|
|
265
|
+
* Without a `position` the drawing goes to the sheet centre when that is
|
|
266
|
+
* free, otherwise to the nearest free spot to the centre inside the margin,
|
|
267
|
+
* beside the drawings already there; when there is no free spot it is
|
|
268
|
+
* centred anyway and the result has `overlaps: true`. With a `position` it
|
|
269
|
+
* is placed as given, and the result has `overlaps: true` when it covers
|
|
270
|
+
* another drawing, but it is not moved. In both cases only other drawings
|
|
271
|
+
* count (placed views and their title blocks and labels): text, images and
|
|
272
|
+
* other shapes on the sheet are ignored. Each call fits one drawing to the
|
|
273
|
+
* whole sheet, so a second fitted drawing often has no free spot: when
|
|
274
|
+
* several drawings should share a sheet, give them scales small enough for
|
|
275
|
+
* all of them; otherwise use `sheets.create` per drawing.
|
|
276
|
+
* The position is sheet-local. The drawing's
|
|
277
|
+
* stable id remains unchanged; `shapeId` therefore identifies the moved
|
|
278
|
+
* drawing. The result reports the architectural scale the drawing has on the
|
|
279
|
+
* sheet and whether this call changed it; a host that reports it also says
|
|
280
|
+
* whether the drawing `overlaps` another drawing on the sheet (move it or
|
|
281
|
+
* put it on its own sheet when true).
|
|
282
|
+
*
|
|
283
|
+
* @param sheetId - The id of the destination sheet.
|
|
284
|
+
* @param drawingId - The id of an existing drawing deliverable.
|
|
285
|
+
* @param options - Optional sheet-local `position` (when omitted, the sheet centre or the nearest free spot)
|
|
286
|
+
* and `fit` (default `true`: scale a drawing that does not fit down to fit;
|
|
287
|
+
* `false`: keep its scale and reject a drawing that does not fit).
|
|
288
|
+
* @returns A {@linkcode PluginPresentationSheetsPlaceDrawingResult} with the
|
|
289
|
+
* drawing's `shapeId`, the `scale` used (`null` for a 3D drawing),
|
|
290
|
+
* `rescaled`, and optionally `overlaps`.
|
|
291
|
+
* @throws `PRECONDITION_FAILED` if Present mode is closed, the sheet is locked,
|
|
292
|
+
* the drawing does not fit with `fit: false`, or it does not fit even at the
|
|
293
|
+
* smallest standard scale; `HANDLE_INVALID` if either id is invalid or the
|
|
294
|
+
* shape is not a drawing.
|
|
295
|
+
*
|
|
296
|
+
* @examplePrompt Move this drawing onto the cover sheet
|
|
297
|
+
* @examplePrompt Place drawing_1 at the center of sheet_2
|
|
298
|
+
* @examplePrompt Put the level 2 plan drawing on the Level 2 Plan sheet
|
|
299
|
+
* @examplePrompt Add the floor plan drawings to this sheet
|
|
300
|
+
*
|
|
301
|
+
* # Example
|
|
302
|
+
* ```ts
|
|
303
|
+
* const { scale, rescaled } = await snaptrude.presentation.sheets.placeDrawing(
|
|
304
|
+
* sheet.id,
|
|
305
|
+
* drawing.id,
|
|
306
|
+
* )
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
309
|
+
public abstract placeDrawing(
|
|
310
|
+
sheetId: string,
|
|
311
|
+
drawingId: string,
|
|
312
|
+
options?: { position?: PluginSheetPosition; fit?: boolean },
|
|
313
|
+
): PluginApiReturn<PluginPresentationSheetsPlaceDrawingResult>
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Rename a layout sheet.
|
|
317
|
+
*
|
|
318
|
+
* Sets the sheet's display name — the same label the sheets panel shows and
|
|
319
|
+
* that `list`/`get` read back. Requires Present mode to be open.
|
|
320
|
+
*
|
|
321
|
+
* @param sheetId - The id of the sheet to rename.
|
|
322
|
+
* @param name - The new display name (non-empty after trimming).
|
|
323
|
+
* @returns The updated {@linkcode PluginPresentationSheet}.
|
|
324
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
325
|
+
*
|
|
326
|
+
* @examplePrompt Rename sheet_1 to Cover
|
|
327
|
+
* @examplePrompt Call the first sheet Ground Floor
|
|
328
|
+
* @examplePrompt Change this sheet's name to Site Plan
|
|
329
|
+
*
|
|
330
|
+
* # Example
|
|
331
|
+
* ```ts
|
|
332
|
+
* const sheet = await snaptrude.presentation.sheets.rename("sheet_1", "Cover")
|
|
333
|
+
* ```
|
|
334
|
+
*/
|
|
335
|
+
public abstract rename(
|
|
336
|
+
sheetId: string,
|
|
337
|
+
name: string,
|
|
338
|
+
): PluginApiReturn<PluginPresentationSheet>
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Delete a layout sheet.
|
|
342
|
+
*
|
|
343
|
+
* Removes the sheet (and its placed content) from the presentation and
|
|
344
|
+
* renumbers the remaining sheets. Requires Present mode to be open. Auto-diagram
|
|
345
|
+
* sheets cannot be deleted through the API — remove those from the Present UI.
|
|
346
|
+
*
|
|
347
|
+
* @param sheetId - The id of the sheet to delete.
|
|
348
|
+
* @returns The id of the deleted sheet
|
|
349
|
+
* (a {@linkcode PluginPresentationSheetsDeleteResult}).
|
|
350
|
+
* @throws If Present mode is not open, the sheet id is invalid, or the sheet is
|
|
351
|
+
* an auto-diagram sheet.
|
|
352
|
+
*
|
|
353
|
+
* @examplePrompt Delete sheet_2
|
|
354
|
+
* @examplePrompt Remove the Cover sheet
|
|
355
|
+
* @examplePrompt Get rid of the last layout sheet
|
|
356
|
+
*
|
|
357
|
+
* # Example
|
|
358
|
+
* ```ts
|
|
359
|
+
* const { id } = await snaptrude.presentation.sheets.delete("sheet_2")
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
public abstract delete(
|
|
363
|
+
sheetId: string,
|
|
364
|
+
): PluginApiReturn<PluginPresentationSheetsDeleteResult>
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Move a sheet to a new position in the sheet order.
|
|
368
|
+
*
|
|
369
|
+
* Reorders the sheet to the given zero-based `index` (as the sheets panel does
|
|
370
|
+
* when a sheet is dragged) and renumbers the rest. `index` is clamped to the
|
|
371
|
+
* valid range. Requires Present mode to be open.
|
|
372
|
+
*
|
|
373
|
+
* @param sheetId - The id of the sheet to move.
|
|
374
|
+
* @param index - Zero-based target position in the sheet order.
|
|
375
|
+
* @returns The sheets in their new order
|
|
376
|
+
* (a {@linkcode PluginPresentationSheetsListResult}).
|
|
377
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
378
|
+
*
|
|
379
|
+
* @examplePrompt Move sheet_3 to the front
|
|
380
|
+
* @examplePrompt Make the Cover sheet the first sheet
|
|
381
|
+
* @examplePrompt Reorder this sheet to position 2
|
|
382
|
+
*
|
|
383
|
+
* # Example
|
|
384
|
+
* ```ts
|
|
385
|
+
* const { sheets } = await snaptrude.presentation.sheets.reorder("sheet_3", 0)
|
|
386
|
+
* ```
|
|
387
|
+
*/
|
|
388
|
+
public abstract reorder(
|
|
389
|
+
sheetId: string,
|
|
390
|
+
index: number,
|
|
391
|
+
): PluginApiReturn<PluginPresentationSheetsListResult>
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Make a sheet the active sheet.
|
|
395
|
+
*
|
|
396
|
+
* Selects the sheet in the sheets panel and navigates the Present canvas to it
|
|
397
|
+
* (the same as clicking it in the panel). Requires Present mode to be open.
|
|
398
|
+
*
|
|
399
|
+
* @param sheetId - The id of the sheet to activate.
|
|
400
|
+
* @returns The now-active {@linkcode PluginPresentationSheet}.
|
|
401
|
+
* @throws If Present mode is not open, or the sheet id is invalid.
|
|
402
|
+
*
|
|
403
|
+
* @examplePrompt Go to sheet_1
|
|
404
|
+
* @examplePrompt Open the Cover sheet
|
|
405
|
+
* @examplePrompt Switch to the Site Plan sheet
|
|
406
|
+
*
|
|
407
|
+
* # Example
|
|
408
|
+
* ```ts
|
|
409
|
+
* await snaptrude.presentation.sheets.setActive("sheet_1")
|
|
410
|
+
* ```
|
|
411
|
+
*/
|
|
412
|
+
public abstract setActive(
|
|
413
|
+
sheetId: string,
|
|
414
|
+
): PluginApiReturn<PluginPresentationSheet>
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Refresh placed views to the current model state.
|
|
418
|
+
*
|
|
419
|
+
* Re-renders the presentation's placed **views** — the live linked view shapes —
|
|
420
|
+
* from the current model (the "Update views" action). Views placed with
|
|
421
|
+
* {@linkcode PluginPresentationSheetsApi.place} are live view shapes too, so
|
|
422
|
+
* they refresh along with panel-dropped ones. Pass `sheetId` to refresh only
|
|
423
|
+
* the views on that sheet, or omit it to refresh every placed view. Requires
|
|
424
|
+
* Present mode to be open.
|
|
425
|
+
*
|
|
426
|
+
* @param options - Optional `sheetId` — restrict the refresh to one sheet's
|
|
427
|
+
* placed views (all placed views when omitted).
|
|
428
|
+
* @returns The ids of the placed view shapes submitted for refresh
|
|
429
|
+
* (a {@linkcode PluginPresentationSheetsUpdatePlacedViewResult}).
|
|
430
|
+
* @throws If Present mode is not open, or `sheetId` is given but invalid.
|
|
431
|
+
*
|
|
432
|
+
* @examplePrompt Update all the placed views to the latest model
|
|
433
|
+
* @examplePrompt Refresh the views on sheet_1
|
|
434
|
+
* @examplePrompt Re-render the placed views after my edits
|
|
435
|
+
*
|
|
436
|
+
* # Example
|
|
437
|
+
* ```ts
|
|
438
|
+
* const { shapeIds } = await snaptrude.presentation.sheets.updatePlacedView()
|
|
439
|
+
* ```
|
|
440
|
+
*/
|
|
441
|
+
public abstract updatePlacedView(options?: {
|
|
442
|
+
sheetId?: string
|
|
443
|
+
}): PluginApiReturn<PluginPresentationSheetsUpdatePlacedViewResult>
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Standard paper-size presets for layout sheets — identical to the sheet
|
|
448
|
+
* header's size dropdown in Present mode.
|
|
449
|
+
*/
|
|
450
|
+
export const PluginSheetSize = z.enum([
|
|
451
|
+
"ANSI_A",
|
|
452
|
+
"ANSI_B",
|
|
453
|
+
"ANSI_C",
|
|
454
|
+
"ANSI_D",
|
|
455
|
+
"ANSI_E",
|
|
456
|
+
"ARCH_A",
|
|
457
|
+
"ARCH_B",
|
|
458
|
+
"ARCH_C",
|
|
459
|
+
"ARCH_D",
|
|
460
|
+
"ARCH_E",
|
|
461
|
+
"ARCH_E1",
|
|
462
|
+
"ISO_A4",
|
|
463
|
+
"ISO_A3",
|
|
464
|
+
"ISO_A2",
|
|
465
|
+
"ISO_A1",
|
|
466
|
+
"ISO_A0",
|
|
467
|
+
])
|
|
468
|
+
export type PluginSheetSize = z.infer<typeof PluginSheetSize>
|
|
469
|
+
|
|
470
|
+
/** Sheet orientation. */
|
|
471
|
+
export const PluginSheetOrientation = z.enum(["landscape", "portrait"])
|
|
472
|
+
export type PluginSheetOrientation = z.infer<typeof PluginSheetOrientation>
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Canonical sheet margin presets — unit-agnostic values matching the sheet
|
|
476
|
+
* header's margin dropdown: `0` (None), `0.25`, `0.5`, `0.75`, `1`.
|
|
477
|
+
* Displayed as None / 1/4″ / 1/2″ / 3/4″ / 1″ on imperial projects and
|
|
478
|
+
* None / 5mm / 10mm / 15mm / 20mm on metric ones.
|
|
479
|
+
*/
|
|
480
|
+
export const PluginSheetMargin = z.union([
|
|
481
|
+
z.literal(0),
|
|
482
|
+
z.literal(0.25),
|
|
483
|
+
z.literal(0.5),
|
|
484
|
+
z.literal(0.75),
|
|
485
|
+
z.literal(1),
|
|
486
|
+
])
|
|
487
|
+
export type PluginSheetMargin = z.infer<typeof PluginSheetMargin>
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* A layout sheet in the presentation.
|
|
491
|
+
*
|
|
492
|
+
* | Property | Type | Description |
|
|
493
|
+
* |---|---|---|
|
|
494
|
+
* | `id` | `string` | Unique sheet id |
|
|
495
|
+
* | `name` | `string` | Display name |
|
|
496
|
+
* | `size` | {@linkcode PluginSheetSize}` \| null` | Paper preset (`null` for a legacy sheet without one) |
|
|
497
|
+
* | `orientation` | {@linkcode PluginSheetOrientation}` \| null` | Orientation (`null` for a legacy sheet) |
|
|
498
|
+
* | `margin` | {@linkcode PluginSheetMargin}` \| null` | Margin preset (`null` when absent/unrecognized) |
|
|
499
|
+
*/
|
|
500
|
+
export const PluginPresentationSheet = z.object({
|
|
501
|
+
id: z.string(),
|
|
502
|
+
name: z.string(),
|
|
503
|
+
size: PluginSheetSize.nullable(),
|
|
504
|
+
orientation: PluginSheetOrientation.nullable(),
|
|
505
|
+
margin: PluginSheetMargin.nullable(),
|
|
506
|
+
})
|
|
507
|
+
export type PluginPresentationSheet = z.infer<typeof PluginPresentationSheet>
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* A position on a sheet/canvas (sheet coordinates).
|
|
511
|
+
*
|
|
512
|
+
* | Property | Type | Description |
|
|
513
|
+
* |---|---|---|
|
|
514
|
+
* | `x` | `number` | X coordinate |
|
|
515
|
+
* | `y` | `number` | Y coordinate |
|
|
516
|
+
*/
|
|
517
|
+
export const PluginSheetPosition = z.object({
|
|
518
|
+
x: z.number(),
|
|
519
|
+
y: z.number(),
|
|
520
|
+
})
|
|
521
|
+
export type PluginSheetPosition = z.infer<typeof PluginSheetPosition>
|
|
522
|
+
|
|
523
|
+
/** Result of {@linkcode PluginPresentationSheetsApi.list}. */
|
|
524
|
+
export const PluginPresentationSheetsListResult = z.object({
|
|
525
|
+
sheets: z.array(PluginPresentationSheet),
|
|
526
|
+
})
|
|
527
|
+
export type PluginPresentationSheetsListResult = z.infer<
|
|
528
|
+
typeof PluginPresentationSheetsListResult
|
|
529
|
+
>
|
|
530
|
+
|
|
531
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.get}. */
|
|
532
|
+
export const PluginPresentationSheetsGetArgs = z.object({
|
|
533
|
+
id: z.string(),
|
|
534
|
+
})
|
|
535
|
+
export type PluginPresentationSheetsGetArgs = z.infer<
|
|
536
|
+
typeof PluginPresentationSheetsGetArgs
|
|
537
|
+
>
|
|
538
|
+
|
|
539
|
+
/** Result of {@linkcode PluginPresentationSheetsApi.get} — the sheet, or `null`. */
|
|
540
|
+
export const PluginPresentationSheetsGetResult =
|
|
541
|
+
PluginPresentationSheet.nullable()
|
|
542
|
+
export type PluginPresentationSheetsGetResult = z.infer<
|
|
543
|
+
typeof PluginPresentationSheetsGetResult
|
|
544
|
+
>
|
|
545
|
+
|
|
546
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.create}. */
|
|
547
|
+
export const PluginPresentationSheetsCreateArgs = z.object({
|
|
548
|
+
name: z.string().optional(),
|
|
549
|
+
size: PluginSheetSize.optional(),
|
|
550
|
+
orientation: PluginSheetOrientation.optional(),
|
|
551
|
+
})
|
|
552
|
+
export type PluginPresentationSheetsCreateArgs = z.infer<
|
|
553
|
+
typeof PluginPresentationSheetsCreateArgs
|
|
554
|
+
>
|
|
555
|
+
|
|
556
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.setSize}. */
|
|
557
|
+
export const PluginPresentationSheetsSetSizeArgs = z.object({
|
|
558
|
+
sheetId: z.string(),
|
|
559
|
+
size: PluginSheetSize,
|
|
560
|
+
orientation: PluginSheetOrientation.optional(),
|
|
561
|
+
})
|
|
562
|
+
export type PluginPresentationSheetsSetSizeArgs = z.infer<
|
|
563
|
+
typeof PluginPresentationSheetsSetSizeArgs
|
|
564
|
+
>
|
|
565
|
+
|
|
566
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.setMargin}. */
|
|
567
|
+
export const PluginPresentationSheetsSetMarginArgs = z.object({
|
|
568
|
+
sheetId: z.string(),
|
|
569
|
+
margin: PluginSheetMargin,
|
|
570
|
+
})
|
|
571
|
+
export type PluginPresentationSheetsSetMarginArgs = z.infer<
|
|
572
|
+
typeof PluginPresentationSheetsSetMarginArgs
|
|
573
|
+
>
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Arguments for {@linkcode PluginPresentationSheetsApi.place}.
|
|
577
|
+
*
|
|
578
|
+
* | Property | Type | Description |
|
|
579
|
+
* |---|---|---|
|
|
580
|
+
* | `sheetId` | `string` | The sheet to place onto |
|
|
581
|
+
* | `viewId` | `string` | The saved view to place |
|
|
582
|
+
* | `position` | {@linkcode PluginSheetPosition}` \| undefined` | Where to place it (when omitted, the sheet centre or the nearest free spot) |
|
|
583
|
+
* | `scale` | `number \| undefined` | Standard scale value for the project's unit system (2D/site-plan views only; when omitted, the largest standard scale that fits inside the target sheet's margin, never larger than the normal view drop's) |
|
|
584
|
+
*/
|
|
585
|
+
export const PluginPresentationSheetsPlaceArgs = z.object({
|
|
586
|
+
sheetId: z.string(),
|
|
587
|
+
viewId: z.string(),
|
|
588
|
+
position: PluginSheetPosition.optional(),
|
|
589
|
+
scale: PluginStandardDrawingScale.optional(),
|
|
590
|
+
})
|
|
591
|
+
export type PluginPresentationSheetsPlaceArgs = z.infer<
|
|
592
|
+
typeof PluginPresentationSheetsPlaceArgs
|
|
593
|
+
>
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Arguments for {@linkcode PluginPresentationSheetsApi.placeDrawing}.
|
|
597
|
+
*
|
|
598
|
+
* | Property | Type | Description |
|
|
599
|
+
* |---|---|---|
|
|
600
|
+
* | `sheetId` | `string` | The destination sheet |
|
|
601
|
+
* | `drawingId` | `string` | The existing drawing to move |
|
|
602
|
+
* | `position` | {@linkcode PluginSheetPosition}` \| undefined` | Sheet-local position (when omitted, the sheet centre or the nearest free spot) |
|
|
603
|
+
* | `fit` | `boolean \| undefined` | `true` (default) scales a drawing that does not fit down to fit; `false` keeps its scale and rejects a drawing that does not fit |
|
|
604
|
+
*/
|
|
605
|
+
export const PluginPresentationSheetsPlaceDrawingArgs = z.object({
|
|
606
|
+
sheetId: z.string().min(1),
|
|
607
|
+
drawingId: z.string().min(1),
|
|
608
|
+
position: PluginSheetPosition.optional(),
|
|
609
|
+
fit: z.boolean().optional(),
|
|
610
|
+
})
|
|
611
|
+
export type PluginPresentationSheetsPlaceDrawingArgs = z.infer<
|
|
612
|
+
typeof PluginPresentationSheetsPlaceDrawingArgs
|
|
613
|
+
>
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* Result of {@linkcode PluginPresentationSheetsApi.place}. The host returns
|
|
617
|
+
* `scale` and `rescaled` (and `overlaps`, `overflows`); they are optional only
|
|
618
|
+
* because hosts that predate the fit report `shapeId` alone.
|
|
619
|
+
*
|
|
620
|
+
* | Property | Type | Description |
|
|
621
|
+
* |---|---|---|
|
|
622
|
+
* | `shapeId` | `string` | Id of the created canvas shape |
|
|
623
|
+
* | `scale` | `number \| null \| undefined` | Architectural scale denominator the view has on the sheet (`null` for a 3D view) |
|
|
624
|
+
* | `rescaled` | `boolean \| undefined` | Whether the fit changed the view's size from the normal view drop's |
|
|
625
|
+
* | `overlaps` | `boolean \| undefined` | Whether the placed drawing overlaps another drawing on the sheet (only drawings count, not text, images or other shapes) |
|
|
626
|
+
* | `overflows` | `boolean \| undefined` | `true` when the drawing, title block included, does not fit inside the sheet's margin at the explicit `scale` passed (the scale is kept); absent otherwise |
|
|
627
|
+
*/
|
|
628
|
+
export const PluginPresentationSheetsPlaceResult = z.object({
|
|
629
|
+
shapeId: z.string(),
|
|
630
|
+
scale: z.number().finite().nullable().optional(),
|
|
631
|
+
rescaled: z.boolean().optional(),
|
|
632
|
+
overlaps: z.boolean().optional(),
|
|
633
|
+
overflows: z.boolean().optional(),
|
|
634
|
+
})
|
|
635
|
+
export type PluginPresentationSheetsPlaceResult = z.infer<
|
|
636
|
+
typeof PluginPresentationSheetsPlaceResult
|
|
637
|
+
>
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Result of {@linkcode PluginPresentationSheetsApi.placeDrawing}.
|
|
641
|
+
*
|
|
642
|
+
* | Property | Type | Description |
|
|
643
|
+
* |---|---|---|
|
|
644
|
+
* | `shapeId` | `string` | Id of the moved drawing (the drawing id, unchanged) |
|
|
645
|
+
* | `scale` | `number \| null` | Architectural scale denominator the drawing has on the sheet (`null` for a 3D drawing) |
|
|
646
|
+
* | `rescaled` | `boolean` | Whether this call changed the drawing's size to fit the sheet |
|
|
647
|
+
* | `overlaps` | `boolean \| undefined` | Whether the drawing overlaps another drawing on the sheet (only drawings count, not text, images or other shapes) |
|
|
648
|
+
*/
|
|
649
|
+
export const PluginPresentationSheetsPlaceDrawingResult =
|
|
650
|
+
PluginPresentationSheetsPlaceResult.omit({ overflows: true }).extend({
|
|
651
|
+
scale: z.number().finite().nullable(),
|
|
652
|
+
rescaled: z.boolean(),
|
|
653
|
+
})
|
|
654
|
+
export type PluginPresentationSheetsPlaceDrawingResult = z.infer<
|
|
655
|
+
typeof PluginPresentationSheetsPlaceDrawingResult
|
|
656
|
+
>
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Arguments for {@linkcode PluginPresentationSheetsApi.rename}.
|
|
660
|
+
*
|
|
661
|
+
* | Property | Type | Description |
|
|
662
|
+
* |---|---|---|
|
|
663
|
+
* | `sheetId` | `string` | The sheet to rename |
|
|
664
|
+
* | `name` | `string` | New display name (non-empty after trimming) |
|
|
665
|
+
*/
|
|
666
|
+
export const PluginPresentationSheetsRenameArgs = z.object({
|
|
667
|
+
sheetId: z.string(),
|
|
668
|
+
name: z.string().trim().min(1),
|
|
669
|
+
})
|
|
670
|
+
export type PluginPresentationSheetsRenameArgs = z.infer<
|
|
671
|
+
typeof PluginPresentationSheetsRenameArgs
|
|
672
|
+
>
|
|
673
|
+
|
|
674
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.delete}. */
|
|
675
|
+
export const PluginPresentationSheetsDeleteArgs = z.object({
|
|
676
|
+
sheetId: z.string(),
|
|
677
|
+
})
|
|
678
|
+
export type PluginPresentationSheetsDeleteArgs = z.infer<
|
|
679
|
+
typeof PluginPresentationSheetsDeleteArgs
|
|
680
|
+
>
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Result of {@linkcode PluginPresentationSheetsApi.delete}.
|
|
684
|
+
*
|
|
685
|
+
* | Property | Type | Description |
|
|
686
|
+
* |---|---|---|
|
|
687
|
+
* | `id` | `string` | Id of the deleted sheet |
|
|
688
|
+
*/
|
|
689
|
+
export const PluginPresentationSheetsDeleteResult = z.object({
|
|
690
|
+
id: z.string(),
|
|
691
|
+
})
|
|
692
|
+
export type PluginPresentationSheetsDeleteResult = z.infer<
|
|
693
|
+
typeof PluginPresentationSheetsDeleteResult
|
|
694
|
+
>
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* Arguments for {@linkcode PluginPresentationSheetsApi.reorder}.
|
|
698
|
+
*
|
|
699
|
+
* | Property | Type | Description |
|
|
700
|
+
* |---|---|---|
|
|
701
|
+
* | `sheetId` | `string` | The sheet to move |
|
|
702
|
+
* | `index` | `number` | Zero-based target position (clamped to range) |
|
|
703
|
+
*/
|
|
704
|
+
export const PluginPresentationSheetsReorderArgs = z.object({
|
|
705
|
+
sheetId: z.string(),
|
|
706
|
+
index: z.number().int().min(0),
|
|
707
|
+
})
|
|
708
|
+
export type PluginPresentationSheetsReorderArgs = z.infer<
|
|
709
|
+
typeof PluginPresentationSheetsReorderArgs
|
|
710
|
+
>
|
|
711
|
+
|
|
712
|
+
/** Arguments for {@linkcode PluginPresentationSheetsApi.setActive}. */
|
|
713
|
+
export const PluginPresentationSheetsSetActiveArgs = z.object({
|
|
714
|
+
sheetId: z.string(),
|
|
715
|
+
})
|
|
716
|
+
export type PluginPresentationSheetsSetActiveArgs = z.infer<
|
|
717
|
+
typeof PluginPresentationSheetsSetActiveArgs
|
|
718
|
+
>
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* Arguments for {@linkcode PluginPresentationSheetsApi.updatePlacedView}.
|
|
722
|
+
*
|
|
723
|
+
* | Property | Type | Description |
|
|
724
|
+
* |---|---|---|
|
|
725
|
+
* | `sheetId` | `string`? | Restrict the refresh to one sheet's placed views |
|
|
726
|
+
*/
|
|
727
|
+
export const PluginPresentationSheetsUpdatePlacedViewArgs = z.object({
|
|
728
|
+
sheetId: z.string().optional(),
|
|
729
|
+
})
|
|
730
|
+
export type PluginPresentationSheetsUpdatePlacedViewArgs = z.infer<
|
|
731
|
+
typeof PluginPresentationSheetsUpdatePlacedViewArgs
|
|
732
|
+
>
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Result of {@linkcode PluginPresentationSheetsApi.updatePlacedView}.
|
|
736
|
+
*
|
|
737
|
+
* | Property | Type | Description |
|
|
738
|
+
* |---|---|---|
|
|
739
|
+
* | `shapeIds` | `string[]` | Ids of the placed view shapes submitted for refresh |
|
|
740
|
+
*/
|
|
741
|
+
export const PluginPresentationSheetsUpdatePlacedViewResult = z.object({
|
|
742
|
+
shapeIds: z.array(z.string()),
|
|
743
|
+
})
|
|
744
|
+
export type PluginPresentationSheetsUpdatePlacedViewResult = z.infer<
|
|
745
|
+
typeof PluginPresentationSheetsUpdatePlacedViewResult
|
|
746
|
+
>
|