@snaptrude/plugin-core 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/api-manifest.full.json +360 -19
  3. package/api-manifest.json +915 -37
  4. package/dist/api/core/camera/index.d.ts +208 -0
  5. package/dist/api/core/camera/index.d.ts.map +1 -0
  6. package/dist/api/core/comment/index.d.ts +105 -2
  7. package/dist/api/core/comment/index.d.ts.map +1 -1
  8. package/dist/api/core/geom/create/index.d.ts +13 -13
  9. package/dist/api/core/geom/delete/index.d.ts +8 -2
  10. package/dist/api/core/geom/delete/index.d.ts.map +1 -1
  11. package/dist/api/core/geom/query/arc.d.ts +5 -5
  12. package/dist/api/core/geom/query/brep.d.ts +18 -18
  13. package/dist/api/core/geom/query/circle.d.ts +18 -18
  14. package/dist/api/core/geom/query/contour.d.ts +20 -20
  15. package/dist/api/core/geom/query/curve.d.ts +49 -49
  16. package/dist/api/core/geom/query/edge.d.ts +5 -5
  17. package/dist/api/core/geom/query/face.d.ts +16 -16
  18. package/dist/api/core/geom/query/halfedge.d.ts +8 -8
  19. package/dist/api/core/geom/query/profile.d.ts +19 -19
  20. package/dist/api/core/geom/query/vertex.d.ts +8 -8
  21. package/dist/api/core/geom/update/contour.d.ts +14 -14
  22. package/dist/api/core/geom/update/curve.d.ts +7 -7
  23. package/dist/api/core/geom/update/profile.d.ts +16 -16
  24. package/dist/api/core/handles/index.d.ts +210 -0
  25. package/dist/api/core/handles/index.d.ts.map +1 -0
  26. package/dist/api/core/index.d.ts +15 -0
  27. package/dist/api/core/index.d.ts.map +1 -1
  28. package/dist/api/core/io/export/index.d.ts +132 -0
  29. package/dist/api/core/io/export/index.d.ts.map +1 -0
  30. package/dist/api/core/io/import/index.d.ts +1 -1
  31. package/dist/api/core/io/index.d.ts +5 -0
  32. package/dist/api/core/io/index.d.ts.map +1 -1
  33. package/dist/api/core/layers.d.ts +7 -7
  34. package/dist/api/core/proposals/index.d.ts +65 -9
  35. package/dist/api/core/proposals/index.d.ts.map +1 -1
  36. package/dist/api/core/user.d.ts +44 -0
  37. package/dist/api/core/user.d.ts.map +1 -0
  38. package/dist/api/design/boolean/index.d.ts +4 -4
  39. package/dist/api/design/create/index.d.ts +139 -44
  40. package/dist/api/design/create/index.d.ts.map +1 -1
  41. package/dist/api/design/doors/index.d.ts +36 -0
  42. package/dist/api/design/doors/index.d.ts.map +1 -1
  43. package/dist/api/design/edit/index.d.ts +1 -1
  44. package/dist/api/design/erase/index.d.ts +2 -2
  45. package/dist/api/design/furniture/index.d.ts +114 -3
  46. package/dist/api/design/furniture/index.d.ts.map +1 -1
  47. package/dist/api/design/index.d.ts +10 -0
  48. package/dist/api/design/index.d.ts.map +1 -1
  49. package/dist/api/design/materials/index.d.ts +111 -14
  50. package/dist/api/design/materials/index.d.ts.map +1 -1
  51. package/dist/api/design/query/index.d.ts +31 -1
  52. package/dist/api/design/query/index.d.ts.map +1 -1
  53. package/dist/api/design/query/spaces.d.ts +5 -5
  54. package/dist/api/design/transform/index.d.ts +83 -14
  55. package/dist/api/design/transform/index.d.ts.map +1 -1
  56. package/dist/api/design/types/index.d.ts +181 -0
  57. package/dist/api/design/types/index.d.ts.map +1 -0
  58. package/dist/api/design/update/index.d.ts +335 -2
  59. package/dist/api/design/update/index.d.ts.map +1 -1
  60. package/dist/api/design/visibility.d.ts +98 -0
  61. package/dist/api/design/visibility.d.ts.map +1 -0
  62. package/dist/api/entity/referenceLine.d.ts +2 -2
  63. package/dist/api/entity/space.d.ts +19 -19
  64. package/dist/api/entity/story.d.ts +128 -15
  65. package/dist/api/entity/story.d.ts.map +1 -1
  66. package/dist/api/presentation/aiInspiration.d.ts +1967 -7
  67. package/dist/api/presentation/aiInspiration.d.ts.map +1 -1
  68. package/dist/api/presentation/annotate.d.ts +448 -0
  69. package/dist/api/presentation/annotate.d.ts.map +1 -0
  70. package/dist/api/presentation/diagrams.d.ts +49 -8
  71. package/dist/api/presentation/diagrams.d.ts.map +1 -1
  72. package/dist/api/presentation/export.d.ts +104 -0
  73. package/dist/api/presentation/export.d.ts.map +1 -0
  74. package/dist/api/presentation/index.d.ts +40 -3
  75. package/dist/api/presentation/index.d.ts.map +1 -1
  76. package/dist/api/presentation/sheets.d.ts +410 -13
  77. package/dist/api/presentation/sheets.d.ts.map +1 -1
  78. package/dist/api/presentation/views.d.ts +165 -10
  79. package/dist/api/presentation/views.d.ts.map +1 -1
  80. package/dist/api/program/areas.d.ts +63 -3
  81. package/dist/api/program/areas.d.ts.map +1 -1
  82. package/dist/api/program/cores.d.ts +3 -99
  83. package/dist/api/program/cores.d.ts.map +1 -1
  84. package/dist/api/program/index.d.ts +2 -2
  85. package/dist/api/program/index.d.ts.map +1 -1
  86. package/dist/api/program/layout.d.ts +172 -12
  87. package/dist/api/program/layout.d.ts.map +1 -1
  88. package/dist/api/program/site.d.ts +11 -8
  89. package/dist/api/program/site.d.ts.map +1 -1
  90. package/dist/api/program/spreadsheet.d.ts +105 -13
  91. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  92. package/dist/handles.d.ts +64 -25
  93. package/dist/handles.d.ts.map +1 -1
  94. package/dist/index.cjs +2502 -1466
  95. package/dist/index.cjs.map +1 -1
  96. package/dist/index.js +2369 -1461
  97. package/dist/index.js.map +1 -1
  98. package/package.json +1 -1
  99. package/src/api/core/camera/index.ts +212 -0
  100. package/src/api/core/comment/index.ts +120 -2
  101. package/src/api/core/geom/delete/index.ts +6 -0
  102. package/src/api/core/handles/index.ts +233 -0
  103. package/src/api/core/index.ts +15 -0
  104. package/src/api/core/io/export/index.ts +124 -0
  105. package/src/api/core/io/index.ts +5 -0
  106. package/src/api/core/proposals/index.ts +71 -11
  107. package/src/api/core/user.ts +46 -0
  108. package/src/api/design/create/index.ts +166 -36
  109. package/src/api/design/doors/index.ts +40 -0
  110. package/src/api/design/furniture/index.ts +127 -3
  111. package/src/api/design/index.ts +10 -0
  112. package/src/api/design/materials/index.ts +157 -30
  113. package/src/api/design/query/index.ts +33 -7
  114. package/src/api/design/transform/index.ts +89 -12
  115. package/src/api/design/types/index.ts +156 -0
  116. package/src/api/design/update/index.ts +402 -6
  117. package/src/api/design/visibility.ts +109 -0
  118. package/src/api/entity/story.ts +141 -15
  119. package/src/api/presentation/aiInspiration.ts +761 -7
  120. package/src/api/presentation/annotate.ts +360 -0
  121. package/src/api/presentation/diagrams.ts +53 -8
  122. package/src/api/presentation/export.ts +104 -0
  123. package/src/api/presentation/index.ts +48 -3
  124. package/src/api/presentation/sheets.ts +346 -13
  125. package/src/api/presentation/views.ts +164 -12
  126. package/src/api/program/areas.ts +57 -6
  127. package/src/api/program/cores.ts +3 -91
  128. package/src/api/program/index.ts +2 -2
  129. package/src/api/program/layout.ts +182 -12
  130. package/src/api/program/site.ts +11 -8
  131. package/src/api/program/spreadsheet.ts +125 -29
  132. package/src/handles.ts +77 -13
  133. package/tsconfig.json +7 -2
@@ -7,8 +7,11 @@ import { PluginApiReturn } from "../../types";
7
7
  * These methods require **Present mode to be open** (the documentation editor) —
8
8
  * reads return `[]`/`null` and writes throw when it is not.
9
9
  *
10
- * `list`/`get` are reads; `create` adds a sheet and `place` drops a saved view
11
- * onto a sheet (returning the id of the created canvas shape).
10
+ * `list`/`get` are reads; the rest mutate and require Present mode to be open:
11
+ * `create` adds a sheet, `place` drops a saved view onto a sheet as a live
12
+ * linked view shape, `rename` relabels a sheet, `delete` removes one, `reorder`
13
+ * moves one in the sheet order, `setActive` navigates to one, and
14
+ * `updatePlacedView` re-renders placed views to the current model.
12
15
  *
13
16
  * Accessed via `snaptrude.presentation.sheets`.
14
17
  */
@@ -50,50 +53,256 @@ export declare abstract class PluginPresentationSheetsApi {
50
53
  /**
51
54
  * Create a new layout sheet.
52
55
  *
56
+ * Optionally sets the paper size and orientation — the same presets as the
57
+ * sheet header's size dropdown (ANSI A–E, Arch A–E1, ISO A4–A0). When `size`
58
+ * is omitted the sheet inherits the editor session's last-used size
59
+ * (initially ANSI B) in landscape, so pass `size` explicitly whenever the
60
+ * output format matters.
61
+ *
53
62
  * Requires Present mode to be open.
54
63
  *
55
64
  * @param name - Display name for the new sheet (optional).
65
+ * @param options - Optional `size` ({@linkcode PluginSheetSize} paper preset)
66
+ * and `orientation` ({@linkcode PluginSheetOrientation}; `"landscape"` when
67
+ * omitted).
56
68
  * @returns The newly created {@linkcode PluginPresentationSheet}.
57
69
  * @throws If Present mode is not open.
58
70
  *
59
71
  * @examplePrompt Create a new sheet called Cover
60
- * @examplePrompt Add a layout sheet
61
- * @examplePrompt Make a new presentation sheet named Floor Plans
72
+ * @examplePrompt Add an A3 landscape layout sheet
73
+ * @examplePrompt Make a new ANSI D presentation sheet named Floor Plans
74
+ * @examplePrompt Create a portrait A4 sheet
62
75
  *
63
76
  * # Example
64
77
  * ```ts
65
- * const sheet = await snaptrude.presentation.sheets.create("Cover")
78
+ * const sheet = await snaptrude.presentation.sheets.create("Cover", {
79
+ * size: "ISO_A3",
80
+ * orientation: "landscape",
81
+ * })
66
82
  * ```
67
83
  */
68
- abstract create(name?: string): PluginApiReturn<PluginPresentationSheet>;
84
+ abstract create(name?: string, options?: {
85
+ size?: PluginSheetSize;
86
+ orientation?: PluginSheetOrientation;
87
+ }): PluginApiReturn<PluginPresentationSheet>;
88
+ /**
89
+ * Set a sheet's paper size and/or orientation.
90
+ *
91
+ * Applies one of the standard paper presets — exactly what the sheet header's
92
+ * size dropdown and orientation toggle do. Content that no longer fits inside
93
+ * the resized sheet is moved out onto the canvas (matching the native
94
+ * behavior). Undoable. Does not change the user's remembered default size for
95
+ * new sheets.
96
+ *
97
+ * Requires Present mode to be open.
98
+ *
99
+ * @param sheetId - The id of the sheet to resize.
100
+ * @param size - The paper preset ({@linkcode PluginSheetSize}).
101
+ * @param orientation - Optional {@linkcode PluginSheetOrientation}; keeps the
102
+ * sheet's current orientation when omitted.
103
+ * @returns The updated {@linkcode PluginPresentationSheet}.
104
+ * @throws If Present mode is not open, or the sheet id is invalid.
105
+ *
106
+ * @examplePrompt Resize sheet_1 to A1
107
+ * @examplePrompt Make the cover sheet ANSI B portrait
108
+ * @examplePrompt Change this sheet to Arch D landscape
109
+ * @examplePrompt Set the sheet size to A3
110
+ *
111
+ * # Example
112
+ * ```ts
113
+ * const sheet = await snaptrude.presentation.sheets.setSize("sheet_1", "ISO_A1", "portrait")
114
+ * ```
115
+ */
116
+ abstract setSize(sheetId: string, size: PluginSheetSize, orientation?: PluginSheetOrientation): PluginApiReturn<PluginPresentationSheet>;
69
117
  /**
70
118
  * Place a saved view onto a sheet.
71
119
  *
72
- * Drops the given view onto the sheet at an optional position and returns the
73
- * id of the created canvas shape. Requires Present mode to be open.
120
+ * Drops the given view onto the sheet through the **native view drop** the
121
+ * placed shape is a live linked view (the same shape the Present views panel's
122
+ * drag-drop creates), re-rendered from the current model, so
123
+ * {@linkcode PluginPresentationSheetsApi.updatePlacedView} refreshes it later.
124
+ * 2D and site-plan views are placed at an architectural scale: the closest
125
+ * standard scale by default (the native auto-fit), or the explicit `scale`
126
+ * when given — one of the standard values the placed view's Scale dropdown
127
+ * offers for the project's unit system (metric `10, 20, 50, 100, 150, 200,
128
+ * 250, 500, 1000`; imperial e.g. `48` for 1/4″ = 1′, `96` for 1/8″ = 1′,
129
+ * `120` for 1″ = 10′). 3D views have no scale — passing `scale` for one
130
+ * throws. Requires Present mode to be open.
74
131
  *
75
132
  * @param sheetId - The id of the sheet to place onto.
76
133
  * @param viewId - The id of the saved view to place.
77
134
  * @param options - Optional `position` ({@linkcode PluginSheetPosition}) —
78
- * where to place it (a default is used when omitted).
135
+ * where to place it (sheet centre when omitted) — and `scale` — a standard
136
+ * scale value for the project's unit system (2D/site-plan views only;
137
+ * auto-fit when omitted).
79
138
  * @returns A {@linkcode PluginPresentationSheetsPlaceResult} with the created
80
139
  * `shapeId`.
81
- * @throws If Present mode is not open, or the sheet/view id is invalid.
140
+ * @throws If Present mode is not open, the sheet/view id is invalid, `scale`
141
+ * is not a standard value for the project's unit system, or `scale` is
142
+ * passed for a 3D view.
82
143
  *
83
144
  * @examplePrompt Place the floor plan on Sheet 1
84
145
  * @examplePrompt Add this 3D view to the cover sheet
85
146
  * @examplePrompt Drop the site plan onto the layout sheet at 100, 200
86
- * @examplePrompt Put the Ground Floor view on sheet_1
147
+ * @examplePrompt Put the Ground Floor view on sheet_1 at 1:100 scale
148
+ * @examplePrompt Place the plan on the cover sheet at quarter-inch scale
87
149
  *
88
150
  * # Example
89
151
  * ```ts
90
- * const { shapeId } = await snaptrude.presentation.sheets.place("sheet_1", "view_123")
152
+ * const { shapeId } = await snaptrude.presentation.sheets.place("sheet_1", "view_123", {
153
+ * scale: 100, // 1:100 (metric project)
154
+ * })
91
155
  * ```
92
156
  */
93
157
  abstract place(sheetId: string, viewId: string, options?: {
94
158
  position?: PluginSheetPosition;
159
+ scale?: number;
95
160
  }): PluginApiReturn<PluginPresentationSheetsPlaceResult>;
161
+ /**
162
+ * Rename a layout sheet.
163
+ *
164
+ * Sets the sheet's display name — the same label the sheets panel shows and
165
+ * that `list`/`get` read back. Requires Present mode to be open.
166
+ *
167
+ * @param sheetId - The id of the sheet to rename.
168
+ * @param name - The new display name (non-empty after trimming).
169
+ * @returns The updated {@linkcode PluginPresentationSheet}.
170
+ * @throws If Present mode is not open, or the sheet id is invalid.
171
+ *
172
+ * @examplePrompt Rename sheet_1 to Cover
173
+ * @examplePrompt Call the first sheet Ground Floor
174
+ * @examplePrompt Change this sheet's name to Site Plan
175
+ *
176
+ * # Example
177
+ * ```ts
178
+ * const sheet = await snaptrude.presentation.sheets.rename("sheet_1", "Cover")
179
+ * ```
180
+ */
181
+ abstract rename(sheetId: string, name: string): PluginApiReturn<PluginPresentationSheet>;
182
+ /**
183
+ * Delete a layout sheet.
184
+ *
185
+ * Removes the sheet (and its placed content) from the presentation and
186
+ * renumbers the remaining sheets. Requires Present mode to be open. Auto-diagram
187
+ * sheets cannot be deleted through the API — remove those from the Present UI.
188
+ *
189
+ * @param sheetId - The id of the sheet to delete.
190
+ * @returns The id of the deleted sheet
191
+ * (a {@linkcode PluginPresentationSheetsDeleteResult}).
192
+ * @throws If Present mode is not open, the sheet id is invalid, or the sheet is
193
+ * an auto-diagram sheet.
194
+ *
195
+ * @examplePrompt Delete sheet_2
196
+ * @examplePrompt Remove the Cover sheet
197
+ * @examplePrompt Get rid of the last layout sheet
198
+ *
199
+ * # Example
200
+ * ```ts
201
+ * const { id } = await snaptrude.presentation.sheets.delete("sheet_2")
202
+ * ```
203
+ */
204
+ abstract delete(sheetId: string): PluginApiReturn<PluginPresentationSheetsDeleteResult>;
205
+ /**
206
+ * Move a sheet to a new position in the sheet order.
207
+ *
208
+ * Reorders the sheet to the given zero-based `index` (as the sheets panel does
209
+ * when a sheet is dragged) and renumbers the rest. `index` is clamped to the
210
+ * valid range. Requires Present mode to be open.
211
+ *
212
+ * @param sheetId - The id of the sheet to move.
213
+ * @param index - Zero-based target position in the sheet order.
214
+ * @returns The sheets in their new order
215
+ * (a {@linkcode PluginPresentationSheetsListResult}).
216
+ * @throws If Present mode is not open, or the sheet id is invalid.
217
+ *
218
+ * @examplePrompt Move sheet_3 to the front
219
+ * @examplePrompt Make the Cover sheet the first sheet
220
+ * @examplePrompt Reorder this sheet to position 2
221
+ *
222
+ * # Example
223
+ * ```ts
224
+ * const { sheets } = await snaptrude.presentation.sheets.reorder("sheet_3", 0)
225
+ * ```
226
+ */
227
+ abstract reorder(sheetId: string, index: number): PluginApiReturn<PluginPresentationSheetsListResult>;
228
+ /**
229
+ * Make a sheet the active sheet.
230
+ *
231
+ * Selects the sheet in the sheets panel and navigates the Present canvas to it
232
+ * (the same as clicking it in the panel). Requires Present mode to be open.
233
+ *
234
+ * @param sheetId - The id of the sheet to activate.
235
+ * @returns The now-active {@linkcode PluginPresentationSheet}.
236
+ * @throws If Present mode is not open, or the sheet id is invalid.
237
+ *
238
+ * @examplePrompt Go to sheet_1
239
+ * @examplePrompt Open the Cover sheet
240
+ * @examplePrompt Switch to the Site Plan sheet
241
+ *
242
+ * # Example
243
+ * ```ts
244
+ * await snaptrude.presentation.sheets.setActive("sheet_1")
245
+ * ```
246
+ */
247
+ abstract setActive(sheetId: string): PluginApiReturn<PluginPresentationSheet>;
248
+ /**
249
+ * Refresh placed views to the current model state.
250
+ *
251
+ * Re-renders the presentation's placed **views** — the live linked view shapes —
252
+ * from the current model (the "Update views" action). Views placed with
253
+ * {@linkcode PluginPresentationSheetsApi.place} are live view shapes too, so
254
+ * they refresh along with panel-dropped ones. Pass `sheetId` to refresh only
255
+ * the views on that sheet, or omit it to refresh every placed view. Requires
256
+ * Present mode to be open.
257
+ *
258
+ * @param options - Optional `sheetId` — restrict the refresh to one sheet's
259
+ * placed views (all placed views when omitted).
260
+ * @returns The ids of the placed view shapes submitted for refresh
261
+ * (a {@linkcode PluginPresentationSheetsUpdatePlacedViewResult}).
262
+ * @throws If Present mode is not open, or `sheetId` is given but invalid.
263
+ *
264
+ * @examplePrompt Update all the placed views to the latest model
265
+ * @examplePrompt Refresh the views on sheet_1
266
+ * @examplePrompt Re-render the placed views after my edits
267
+ *
268
+ * # Example
269
+ * ```ts
270
+ * const { shapeIds } = await snaptrude.presentation.sheets.updatePlacedView()
271
+ * ```
272
+ */
273
+ abstract updatePlacedView(options?: {
274
+ sheetId?: string;
275
+ }): PluginApiReturn<PluginPresentationSheetsUpdatePlacedViewResult>;
96
276
  }
277
+ /**
278
+ * Standard paper-size presets for layout sheets — identical to the sheet
279
+ * header's size dropdown in Present mode.
280
+ */
281
+ export declare const PluginSheetSize: z.ZodEnum<{
282
+ ANSI_A: "ANSI_A";
283
+ ANSI_B: "ANSI_B";
284
+ ANSI_C: "ANSI_C";
285
+ ANSI_D: "ANSI_D";
286
+ ANSI_E: "ANSI_E";
287
+ ARCH_A: "ARCH_A";
288
+ ARCH_B: "ARCH_B";
289
+ ARCH_C: "ARCH_C";
290
+ ARCH_D: "ARCH_D";
291
+ ARCH_E: "ARCH_E";
292
+ ARCH_E1: "ARCH_E1";
293
+ ISO_A4: "ISO_A4";
294
+ ISO_A3: "ISO_A3";
295
+ ISO_A2: "ISO_A2";
296
+ ISO_A1: "ISO_A1";
297
+ ISO_A0: "ISO_A0";
298
+ }>;
299
+ export type PluginSheetSize = z.infer<typeof PluginSheetSize>;
300
+ /** Sheet orientation. */
301
+ export declare const PluginSheetOrientation: z.ZodEnum<{
302
+ landscape: "landscape";
303
+ portrait: "portrait";
304
+ }>;
305
+ export type PluginSheetOrientation = z.infer<typeof PluginSheetOrientation>;
97
306
  /**
98
307
  * A layout sheet in the presentation.
99
308
  *
@@ -101,10 +310,34 @@ export declare abstract class PluginPresentationSheetsApi {
101
310
  * |---|---|---|
102
311
  * | `id` | `string` | Unique sheet id |
103
312
  * | `name` | `string` | Display name |
313
+ * | `size` | {@linkcode PluginSheetSize}` \| null` | Paper preset (`null` for a legacy sheet without one) |
314
+ * | `orientation` | {@linkcode PluginSheetOrientation}` \| null` | Orientation (`null` for a legacy sheet) |
104
315
  */
105
316
  export declare const PluginPresentationSheet: z.ZodObject<{
106
317
  id: z.ZodString;
107
318
  name: z.ZodString;
319
+ size: z.ZodNullable<z.ZodEnum<{
320
+ ANSI_A: "ANSI_A";
321
+ ANSI_B: "ANSI_B";
322
+ ANSI_C: "ANSI_C";
323
+ ANSI_D: "ANSI_D";
324
+ ANSI_E: "ANSI_E";
325
+ ARCH_A: "ARCH_A";
326
+ ARCH_B: "ARCH_B";
327
+ ARCH_C: "ARCH_C";
328
+ ARCH_D: "ARCH_D";
329
+ ARCH_E: "ARCH_E";
330
+ ARCH_E1: "ARCH_E1";
331
+ ISO_A4: "ISO_A4";
332
+ ISO_A3: "ISO_A3";
333
+ ISO_A2: "ISO_A2";
334
+ ISO_A1: "ISO_A1";
335
+ ISO_A0: "ISO_A0";
336
+ }>>;
337
+ orientation: z.ZodNullable<z.ZodEnum<{
338
+ landscape: "landscape";
339
+ portrait: "portrait";
340
+ }>>;
108
341
  }, z.core.$strip>;
109
342
  export type PluginPresentationSheet = z.infer<typeof PluginPresentationSheet>;
110
343
  /**
@@ -125,6 +358,28 @@ export declare const PluginPresentationSheetsListResult: z.ZodObject<{
125
358
  sheets: z.ZodArray<z.ZodObject<{
126
359
  id: z.ZodString;
127
360
  name: z.ZodString;
361
+ size: z.ZodNullable<z.ZodEnum<{
362
+ ANSI_A: "ANSI_A";
363
+ ANSI_B: "ANSI_B";
364
+ ANSI_C: "ANSI_C";
365
+ ANSI_D: "ANSI_D";
366
+ ANSI_E: "ANSI_E";
367
+ ARCH_A: "ARCH_A";
368
+ ARCH_B: "ARCH_B";
369
+ ARCH_C: "ARCH_C";
370
+ ARCH_D: "ARCH_D";
371
+ ARCH_E: "ARCH_E";
372
+ ARCH_E1: "ARCH_E1";
373
+ ISO_A4: "ISO_A4";
374
+ ISO_A3: "ISO_A3";
375
+ ISO_A2: "ISO_A2";
376
+ ISO_A1: "ISO_A1";
377
+ ISO_A0: "ISO_A0";
378
+ }>>;
379
+ orientation: z.ZodNullable<z.ZodEnum<{
380
+ landscape: "landscape";
381
+ portrait: "portrait";
382
+ }>>;
128
383
  }, z.core.$strip>>;
129
384
  }, z.core.$strip>;
130
385
  export type PluginPresentationSheetsListResult = z.infer<typeof PluginPresentationSheetsListResult>;
@@ -137,13 +392,84 @@ export type PluginPresentationSheetsGetArgs = z.infer<typeof PluginPresentationS
137
392
  export declare const PluginPresentationSheetsGetResult: z.ZodNullable<z.ZodObject<{
138
393
  id: z.ZodString;
139
394
  name: z.ZodString;
395
+ size: z.ZodNullable<z.ZodEnum<{
396
+ ANSI_A: "ANSI_A";
397
+ ANSI_B: "ANSI_B";
398
+ ANSI_C: "ANSI_C";
399
+ ANSI_D: "ANSI_D";
400
+ ANSI_E: "ANSI_E";
401
+ ARCH_A: "ARCH_A";
402
+ ARCH_B: "ARCH_B";
403
+ ARCH_C: "ARCH_C";
404
+ ARCH_D: "ARCH_D";
405
+ ARCH_E: "ARCH_E";
406
+ ARCH_E1: "ARCH_E1";
407
+ ISO_A4: "ISO_A4";
408
+ ISO_A3: "ISO_A3";
409
+ ISO_A2: "ISO_A2";
410
+ ISO_A1: "ISO_A1";
411
+ ISO_A0: "ISO_A0";
412
+ }>>;
413
+ orientation: z.ZodNullable<z.ZodEnum<{
414
+ landscape: "landscape";
415
+ portrait: "portrait";
416
+ }>>;
140
417
  }, z.core.$strip>>;
141
418
  export type PluginPresentationSheetsGetResult = z.infer<typeof PluginPresentationSheetsGetResult>;
142
419
  /** Arguments for {@linkcode PluginPresentationSheetsApi.create}. */
143
420
  export declare const PluginPresentationSheetsCreateArgs: z.ZodObject<{
144
421
  name: z.ZodOptional<z.ZodString>;
422
+ size: z.ZodOptional<z.ZodEnum<{
423
+ ANSI_A: "ANSI_A";
424
+ ANSI_B: "ANSI_B";
425
+ ANSI_C: "ANSI_C";
426
+ ANSI_D: "ANSI_D";
427
+ ANSI_E: "ANSI_E";
428
+ ARCH_A: "ARCH_A";
429
+ ARCH_B: "ARCH_B";
430
+ ARCH_C: "ARCH_C";
431
+ ARCH_D: "ARCH_D";
432
+ ARCH_E: "ARCH_E";
433
+ ARCH_E1: "ARCH_E1";
434
+ ISO_A4: "ISO_A4";
435
+ ISO_A3: "ISO_A3";
436
+ ISO_A2: "ISO_A2";
437
+ ISO_A1: "ISO_A1";
438
+ ISO_A0: "ISO_A0";
439
+ }>>;
440
+ orientation: z.ZodOptional<z.ZodEnum<{
441
+ landscape: "landscape";
442
+ portrait: "portrait";
443
+ }>>;
145
444
  }, z.core.$strip>;
146
445
  export type PluginPresentationSheetsCreateArgs = z.infer<typeof PluginPresentationSheetsCreateArgs>;
446
+ /** Arguments for {@linkcode PluginPresentationSheetsApi.setSize}. */
447
+ export declare const PluginPresentationSheetsSetSizeArgs: z.ZodObject<{
448
+ sheetId: z.ZodString;
449
+ size: z.ZodEnum<{
450
+ ANSI_A: "ANSI_A";
451
+ ANSI_B: "ANSI_B";
452
+ ANSI_C: "ANSI_C";
453
+ ANSI_D: "ANSI_D";
454
+ ANSI_E: "ANSI_E";
455
+ ARCH_A: "ARCH_A";
456
+ ARCH_B: "ARCH_B";
457
+ ARCH_C: "ARCH_C";
458
+ ARCH_D: "ARCH_D";
459
+ ARCH_E: "ARCH_E";
460
+ ARCH_E1: "ARCH_E1";
461
+ ISO_A4: "ISO_A4";
462
+ ISO_A3: "ISO_A3";
463
+ ISO_A2: "ISO_A2";
464
+ ISO_A1: "ISO_A1";
465
+ ISO_A0: "ISO_A0";
466
+ }>;
467
+ orientation: z.ZodOptional<z.ZodEnum<{
468
+ landscape: "landscape";
469
+ portrait: "portrait";
470
+ }>>;
471
+ }, z.core.$strip>;
472
+ export type PluginPresentationSheetsSetSizeArgs = z.infer<typeof PluginPresentationSheetsSetSizeArgs>;
147
473
  /**
148
474
  * Arguments for {@linkcode PluginPresentationSheetsApi.place}.
149
475
  *
@@ -151,7 +477,8 @@ export type PluginPresentationSheetsCreateArgs = z.infer<typeof PluginPresentati
151
477
  * |---|---|---|
152
478
  * | `sheetId` | `string` | The sheet to place onto |
153
479
  * | `viewId` | `string` | The saved view to place |
154
- * | `position` | {@linkcode PluginSheetPosition}` \| undefined` | Where to place it (a default is used when omitted) |
480
+ * | `position` | {@linkcode PluginSheetPosition}` \| undefined` | Where to place it (sheet centre when omitted) |
481
+ * | `scale` | `number \| undefined` | Standard scale value for the project's unit system (2D/site-plan views only; auto-fit to the closest standard scale when omitted) |
155
482
  */
156
483
  export declare const PluginPresentationSheetsPlaceArgs: z.ZodObject<{
157
484
  sheetId: z.ZodString;
@@ -160,6 +487,7 @@ export declare const PluginPresentationSheetsPlaceArgs: z.ZodObject<{
160
487
  x: z.ZodNumber;
161
488
  y: z.ZodNumber;
162
489
  }, z.core.$strip>>;
490
+ scale: z.ZodOptional<z.ZodNumber>;
163
491
  }, z.core.$strip>;
164
492
  export type PluginPresentationSheetsPlaceArgs = z.infer<typeof PluginPresentationSheetsPlaceArgs>;
165
493
  /**
@@ -173,4 +501,73 @@ export declare const PluginPresentationSheetsPlaceResult: z.ZodObject<{
173
501
  shapeId: z.ZodString;
174
502
  }, z.core.$strip>;
175
503
  export type PluginPresentationSheetsPlaceResult = z.infer<typeof PluginPresentationSheetsPlaceResult>;
504
+ /**
505
+ * Arguments for {@linkcode PluginPresentationSheetsApi.rename}.
506
+ *
507
+ * | Property | Type | Description |
508
+ * |---|---|---|
509
+ * | `sheetId` | `string` | The sheet to rename |
510
+ * | `name` | `string` | New display name (non-empty after trimming) |
511
+ */
512
+ export declare const PluginPresentationSheetsRenameArgs: z.ZodObject<{
513
+ sheetId: z.ZodString;
514
+ name: z.ZodString;
515
+ }, z.core.$strip>;
516
+ export type PluginPresentationSheetsRenameArgs = z.infer<typeof PluginPresentationSheetsRenameArgs>;
517
+ /** Arguments for {@linkcode PluginPresentationSheetsApi.delete}. */
518
+ export declare const PluginPresentationSheetsDeleteArgs: z.ZodObject<{
519
+ sheetId: z.ZodString;
520
+ }, z.core.$strip>;
521
+ export type PluginPresentationSheetsDeleteArgs = z.infer<typeof PluginPresentationSheetsDeleteArgs>;
522
+ /**
523
+ * Result of {@linkcode PluginPresentationSheetsApi.delete}.
524
+ *
525
+ * | Property | Type | Description |
526
+ * |---|---|---|
527
+ * | `id` | `string` | Id of the deleted sheet |
528
+ */
529
+ export declare const PluginPresentationSheetsDeleteResult: z.ZodObject<{
530
+ id: z.ZodString;
531
+ }, z.core.$strip>;
532
+ export type PluginPresentationSheetsDeleteResult = z.infer<typeof PluginPresentationSheetsDeleteResult>;
533
+ /**
534
+ * Arguments for {@linkcode PluginPresentationSheetsApi.reorder}.
535
+ *
536
+ * | Property | Type | Description |
537
+ * |---|---|---|
538
+ * | `sheetId` | `string` | The sheet to move |
539
+ * | `index` | `number` | Zero-based target position (clamped to range) |
540
+ */
541
+ export declare const PluginPresentationSheetsReorderArgs: z.ZodObject<{
542
+ sheetId: z.ZodString;
543
+ index: z.ZodNumber;
544
+ }, z.core.$strip>;
545
+ export type PluginPresentationSheetsReorderArgs = z.infer<typeof PluginPresentationSheetsReorderArgs>;
546
+ /** Arguments for {@linkcode PluginPresentationSheetsApi.setActive}. */
547
+ export declare const PluginPresentationSheetsSetActiveArgs: z.ZodObject<{
548
+ sheetId: z.ZodString;
549
+ }, z.core.$strip>;
550
+ export type PluginPresentationSheetsSetActiveArgs = z.infer<typeof PluginPresentationSheetsSetActiveArgs>;
551
+ /**
552
+ * Arguments for {@linkcode PluginPresentationSheetsApi.updatePlacedView}.
553
+ *
554
+ * | Property | Type | Description |
555
+ * |---|---|---|
556
+ * | `sheetId` | `string`? | Restrict the refresh to one sheet's placed views |
557
+ */
558
+ export declare const PluginPresentationSheetsUpdatePlacedViewArgs: z.ZodObject<{
559
+ sheetId: z.ZodOptional<z.ZodString>;
560
+ }, z.core.$strip>;
561
+ export type PluginPresentationSheetsUpdatePlacedViewArgs = z.infer<typeof PluginPresentationSheetsUpdatePlacedViewArgs>;
562
+ /**
563
+ * Result of {@linkcode PluginPresentationSheetsApi.updatePlacedView}.
564
+ *
565
+ * | Property | Type | Description |
566
+ * |---|---|---|
567
+ * | `shapeIds` | `string[]` | Ids of the placed view shapes submitted for refresh |
568
+ */
569
+ export declare const PluginPresentationSheetsUpdatePlacedViewResult: z.ZodObject<{
570
+ shapeIds: z.ZodArray<z.ZodString>;
571
+ }, z.core.$strip>;
572
+ export type PluginPresentationSheetsUpdatePlacedViewResult = z.infer<typeof PluginPresentationSheetsUpdatePlacedViewResult>;
176
573
  //# sourceMappingURL=sheets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sheets.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/sheets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;GAWG;AACH,8BAAsB,2BAA2B;;IAG/C;;;;;;;;;;;;;;;OAeG;aACa,IAAI,IAAI,eAAe,CAAC,kCAAkC,CAAC;IAE3E;;;;;;;;;;;;;;OAcG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