@snaptrude/plugin-core 0.7.1 → 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 (130) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/api-manifest.full.json +6442 -0
  3. package/api-manifest.json +2029 -128
  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/annotate.d.ts +448 -0
  67. package/dist/api/presentation/annotate.d.ts.map +1 -0
  68. package/dist/api/presentation/diagrams.d.ts +49 -8
  69. package/dist/api/presentation/diagrams.d.ts.map +1 -1
  70. package/dist/api/presentation/export.d.ts +104 -0
  71. package/dist/api/presentation/export.d.ts.map +1 -0
  72. package/dist/api/presentation/index.d.ts +38 -0
  73. package/dist/api/presentation/index.d.ts.map +1 -1
  74. package/dist/api/presentation/sheets.d.ts +410 -13
  75. package/dist/api/presentation/sheets.d.ts.map +1 -1
  76. package/dist/api/presentation/views.d.ts +165 -10
  77. package/dist/api/presentation/views.d.ts.map +1 -1
  78. package/dist/api/program/areas.d.ts +63 -3
  79. package/dist/api/program/areas.d.ts.map +1 -1
  80. package/dist/api/program/cores.d.ts +3 -99
  81. package/dist/api/program/cores.d.ts.map +1 -1
  82. package/dist/api/program/index.d.ts +2 -2
  83. package/dist/api/program/index.d.ts.map +1 -1
  84. package/dist/api/program/layout.d.ts +172 -12
  85. package/dist/api/program/layout.d.ts.map +1 -1
  86. package/dist/api/program/site.d.ts +11 -8
  87. package/dist/api/program/site.d.ts.map +1 -1
  88. package/dist/api/program/spreadsheet.d.ts +105 -13
  89. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  90. package/dist/handles.d.ts +64 -25
  91. package/dist/handles.d.ts.map +1 -1
  92. package/dist/index.cjs +2316 -1644
  93. package/dist/index.cjs.map +1 -1
  94. package/dist/index.js +2224 -1639
  95. package/dist/index.js.map +1 -1
  96. package/package.json +1 -1
  97. package/src/api/core/camera/index.ts +212 -0
  98. package/src/api/core/comment/index.ts +120 -2
  99. package/src/api/core/geom/delete/index.ts +6 -0
  100. package/src/api/core/handles/index.ts +233 -0
  101. package/src/api/core/index.ts +15 -0
  102. package/src/api/core/io/export/index.ts +124 -0
  103. package/src/api/core/io/index.ts +5 -0
  104. package/src/api/core/proposals/index.ts +71 -11
  105. package/src/api/core/user.ts +46 -0
  106. package/src/api/design/create/index.ts +166 -36
  107. package/src/api/design/doors/index.ts +40 -0
  108. package/src/api/design/furniture/index.ts +127 -3
  109. package/src/api/design/index.ts +10 -0
  110. package/src/api/design/materials/index.ts +157 -30
  111. package/src/api/design/query/index.ts +33 -7
  112. package/src/api/design/transform/index.ts +89 -12
  113. package/src/api/design/types/index.ts +156 -0
  114. package/src/api/design/update/index.ts +402 -6
  115. package/src/api/design/visibility.ts +109 -0
  116. package/src/api/entity/story.ts +141 -15
  117. package/src/api/presentation/annotate.ts +360 -0
  118. package/src/api/presentation/diagrams.ts +53 -8
  119. package/src/api/presentation/export.ts +104 -0
  120. package/src/api/presentation/index.ts +46 -0
  121. package/src/api/presentation/sheets.ts +346 -13
  122. package/src/api/presentation/views.ts +164 -12
  123. package/src/api/program/areas.ts +57 -6
  124. package/src/api/program/cores.ts +3 -91
  125. package/src/api/program/index.ts +2 -2
  126. package/src/api/program/layout.ts +182 -12
  127. package/src/api/program/site.ts +11 -8
  128. package/src/api/program/spreadsheet.ts +125 -29
  129. package/src/handles.ts +77 -13
  130. package/tsconfig.json +7 -2
@@ -91,21 +91,32 @@ export declare abstract class PluginStoryApi {
91
91
  */
92
92
  abstract create(storyValue: number, height?: number): PluginApiReturn<PluginStoryCreateResult>;
93
93
  /**
94
- * Update a story's floor-to-floor height, cascading the full geometry change.
94
+ * Update a story's floor-to-floor `height` and/or `name`.
95
95
  *
96
- * This is the same operation as editing the height in the Stories panel: the
97
- * walls, columns, and masses on the story are **stretched** to the new height,
98
- * every story **above shifts up/down** by the delta so the stack stays
96
+ * **Height** is the same operation as editing the height in the Stories panel:
97
+ * the walls, columns, and masses on the story are **stretched** to the new
98
+ * height, every story **above shifts up/down** by the delta so the stack stays
99
99
  * contiguous, and coupled elements (staircases, parametric curtain walls,
100
- * furniture offsets) are re-fitted. The whole cascade is committed as **one
101
- * undo step**. Height-locked elements are left untouched.
100
+ * furniture offsets) are re-fitted. The whole height cascade is committed as
101
+ * **one undo step**. Height-locked elements are left untouched.
102
+ *
103
+ * **Name** is the same as renaming the story in the Stories panel: it is
104
+ * persisted immediately (saved to the project) but, mirroring the panel, is
105
+ * **not** part of the height undo step.
106
+ *
107
+ * At least one of `height` or `options.name` must be supplied. Omitting the
108
+ * `height` argument (e.g. for a rename-only update) leaves the height
109
+ * untouched.
102
110
  *
103
111
  * @param storyValue - Integer storey number
104
112
  * identifying the story to update
105
113
  * @param height - New floor-to-floor height in
106
- * Babylon units
107
- * @returns A {@linkcode PluginStoryUpdateResult} with the updated `storyValue` and `height`
114
+ * Babylon units. Omit to leave the height unchanged.
115
+ * @param options - `name` (new display name for the story)
116
+ * @returns A {@linkcode PluginStoryUpdateResult} with the story's
117
+ * `storyValue`, `height`, and `name` after the update
108
118
  * @throws `PRECONDITION_FAILED` if no story has the given value;
119
+ * `VALIDATION` if neither `height` nor `options.name` is supplied;
109
120
  * `STORY_HEIGHT_REJECTED` if the engine rejects the height (e.g. out of
110
121
  * range — the change silently reverts host-side and is surfaced as this
111
122
  * error); `STORY_UPDATE_FAILED` if the story cannot be re-read after the
@@ -113,17 +124,68 @@ export declare abstract class PluginStoryApi {
113
124
  *
114
125
  * @examplePrompt Change the ground floor height to 3.5 metres
115
126
  * @examplePrompt Make the second storey taller
127
+ * @examplePrompt Rename the ground floor to "Lobby"
116
128
  * @examplePrompt Set the floor-to-floor height of level 1
117
- * @examplePrompt Increase the height of the third floor
129
+ * @examplePrompt Rename storey 2 and make it taller in one go
118
130
  *
119
131
  * # Example
120
132
  * ```ts
121
133
  * // Set ground floor height to 5 Babylon units — walls stretch and the
122
134
  * // floors above move up to match, all in a single undo step.
123
135
  * const result = await snaptrude.entity.story.update(1, 5)
136
+ * // Rename only, leaving the height untouched.
137
+ * await snaptrude.entity.story.update(1, undefined, { name: "Lobby" })
124
138
  * ```
125
139
  */
126
- abstract update(storyValue: number, height: number): PluginApiReturn<PluginStoryUpdateResult>;
140
+ abstract update(storyValue: number, height?: number, options?: {
141
+ name?: string;
142
+ }): PluginApiReturn<PluginStoryUpdateResult>;
143
+ /**
144
+ * Make a story the active story — the same as clicking it in the storey/layer
145
+ * panel. Subsequent draws and creates target this story, and in 2D the
146
+ * viewport switches to it. This is a view/navigation change: it is **not**
147
+ * undoable and commits nothing to the model.
148
+ *
149
+ * @param storyValue - Integer storey number to activate
150
+ * @returns A {@linkcode PluginStorySetActiveResult} echoing the now-active `storyValue`
151
+ * @throws `PRECONDITION_FAILED` if no story has the given value
152
+ *
153
+ * @examplePrompt Switch to the second floor
154
+ * @examplePrompt Make the ground storey active
155
+ * @examplePrompt Go to the basement level
156
+ * @examplePrompt Set level 3 as the current storey
157
+ *
158
+ * # Example
159
+ * ```ts
160
+ * // Activate story 2, then draw a wall — it lands on story 2.
161
+ * await snaptrude.entity.story.setActive(2)
162
+ * ```
163
+ */
164
+ abstract setActive(storyValue: number): PluginApiReturn<PluginStorySetActiveResult>;
165
+ /**
166
+ * Delete a story and everything on it — the same as removing it from the
167
+ * storey panel. Every element placed on the story (walls, floors, masses, …)
168
+ * is deleted with it, the remaining stories are re-stacked, and the active
169
+ * story falls back to an adjacent one. Committed as a single undo step.
170
+ *
171
+ * @param storyValue - Integer storey number to delete
172
+ * @returns A {@linkcode PluginStoryDeleteResult} with the deleted `storyValue`
173
+ * and the `newActiveStory` the editor fell back to
174
+ * @throws `PRECONDITION_FAILED` if no story has the given value; or if plugin
175
+ * writes are disabled
176
+ *
177
+ * @examplePrompt Delete the top floor
178
+ * @examplePrompt Remove the basement level
179
+ * @examplePrompt Get rid of storey 3
180
+ * @examplePrompt Delete the second floor and everything on it
181
+ *
182
+ * # Example
183
+ * ```ts
184
+ * const { newActiveStory } = await snaptrude.entity.story.delete(3)
185
+ * console.log(`Deleted story 3; now on story ${newActiveStory}`)
186
+ * ```
187
+ */
188
+ abstract delete(storyValue: number): PluginApiReturn<PluginStoryDeleteResult>;
127
189
  /**
128
190
  * Duplicate a story into the adjacent level, up or down.
129
191
  *
@@ -278,31 +340,82 @@ export declare const PluginStoryCreateResult: z.ZodObject<{
278
340
  }, z.core.$strip>;
279
341
  export type PluginStoryCreateResult = z.infer<typeof PluginStoryCreateResult>;
280
342
  /**
281
- * Arguments for {@linkcode PluginStoryApi.update}.
343
+ * Arguments for {@linkcode PluginStoryApi.update}. At least one of `height` or
344
+ * `name` must be supplied.
282
345
  *
283
346
  * | Property | Type | Description |
284
347
  * |---|---|---|
285
348
  * | `storyValue` | `number` (int) | Storey number of the story to update |
286
- * | `height` | `number` | New height in Babylon units |
349
+ * | `height` | `number?` | New height in Babylon units (omit to leave unchanged) |
350
+ * | `name` | `string?` | New display name for the story (omit to leave unchanged) |
287
351
  */
288
352
  export declare const PluginStoryUpdateArgs: z.ZodObject<{
289
353
  storyValue: z.ZodNumber;
290
- height: z.ZodNumber;
354
+ height: z.ZodOptional<z.ZodNumber>;
355
+ name: z.ZodOptional<z.ZodString>;
291
356
  }, z.core.$strip>;
292
357
  export type PluginStoryUpdateArgs = z.infer<typeof PluginStoryUpdateArgs>;
293
358
  /**
294
- * Result of {@linkcode PluginStoryApi.update}.
359
+ * Result of {@linkcode PluginStoryApi.update} — the story's state after the update.
295
360
  *
296
361
  * | Property | Type | Description |
297
362
  * |---|---|---|
298
363
  * | `storyValue` | `number` | The storey number of the updated story |
299
- * | `height` | `number` | The new height after the update |
364
+ * | `height` | `number` | The height after the update |
365
+ * | `name` | `string` | The name after the update |
300
366
  */
301
367
  export declare const PluginStoryUpdateResult: z.ZodObject<{
302
368
  storyValue: z.ZodNumber;
303
369
  height: z.ZodNumber;
370
+ name: z.ZodString;
304
371
  }, z.core.$strip>;
305
372
  export type PluginStoryUpdateResult = z.infer<typeof PluginStoryUpdateResult>;
373
+ /**
374
+ * Arguments for {@linkcode PluginStoryApi.setActive}.
375
+ *
376
+ * | Property | Type | Description |
377
+ * |---|---|---|
378
+ * | `storyValue` | `number` (int) | Storey number to activate |
379
+ */
380
+ export declare const PluginStorySetActiveArgs: z.ZodObject<{
381
+ storyValue: z.ZodNumber;
382
+ }, z.core.$strip>;
383
+ export type PluginStorySetActiveArgs = z.infer<typeof PluginStorySetActiveArgs>;
384
+ /**
385
+ * Result of {@linkcode PluginStoryApi.setActive}.
386
+ *
387
+ * | Property | Type | Description |
388
+ * |---|---|---|
389
+ * | `storyValue` | `number` | The storey number that is now active |
390
+ */
391
+ export declare const PluginStorySetActiveResult: z.ZodObject<{
392
+ storyValue: z.ZodNumber;
393
+ }, z.core.$strip>;
394
+ export type PluginStorySetActiveResult = z.infer<typeof PluginStorySetActiveResult>;
395
+ /**
396
+ * Arguments for {@linkcode PluginStoryApi.delete}.
397
+ *
398
+ * | Property | Type | Description |
399
+ * |---|---|---|
400
+ * | `storyValue` | `number` (int) | Storey number to delete |
401
+ */
402
+ export declare const PluginStoryDeleteArgs: z.ZodObject<{
403
+ storyValue: z.ZodNumber;
404
+ }, z.core.$strip>;
405
+ export type PluginStoryDeleteArgs = z.infer<typeof PluginStoryDeleteArgs>;
406
+ /**
407
+ * Result of {@linkcode PluginStoryApi.delete}.
408
+ *
409
+ * | Property | Type | Description |
410
+ * |---|---|---|
411
+ * | `storyValue` | `number` | The storey number that was deleted |
412
+ * | `newActiveStory` | `number` | The storey the editor fell back to as active |
413
+ */
414
+ export declare const PluginStoryDeleteResult: z.ZodObject<{
415
+ storyValue: z.ZodNumber;
416
+ newActiveStory: z.ZodNumber;
417
+ }, z.core.$strip>;
418
+ export type PluginStoryDeleteResult = z.infer<typeof PluginStoryDeleteResult>;
306
419
  /**
307
420
  * Arguments for {@linkcode PluginStoryApi.duplicate} (options flattened).
308
421
  *
@@ -1 +1 @@
1
- {"version":3,"file":"story.d.ts","sourceRoot":"","sources":["../../../src/api/entity/story.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C;;;;;;;;;;;GAWG;AACH,8BAAsB,cAAc;;IAGlC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;aACa,GAAG,CACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,sBAAsB,EAAE,GACnC,eAAe,CAAC,oBAAoB,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;OAqBG;aACa,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;iBAEhC,CAAA;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB;;;;;;;iBAInC,CAAA;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAE/E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B;;;;;;iBAMrC,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA"}
@@ -0,0 +1,448 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ /**
4
+ * Presentation annotate — add annotations to Present-mode sheets.
5
+ *
6
+ * The scriptable counterparts to the Present toolbar's annotation tools (all
7
+ * require Present mode to be open; each returns the created canvas shape id):
8
+ *
9
+ * - {@linkcode PluginPresentationAnnotateApi.text} — text labels (titles, captions)
10
+ * - {@linkcode PluginPresentationAnnotateApi.arrow} — arrows pointing between two points
11
+ * - {@linkcode PluginPresentationAnnotateApi.note} — sticky notes
12
+ * - {@linkcode PluginPresentationAnnotateApi.shape} — geo shapes (rectangle, ellipse, cloud, …)
13
+ *
14
+ * The freehand Draw tool is not scriptable (a stroke is an interactive gesture,
15
+ * not a single call) and is intentionally not exposed here.
16
+ *
17
+ * Accessed via `snaptrude.presentation.annotate`.
18
+ */
19
+ export declare abstract class PluginPresentationAnnotateApi {
20
+ constructor();
21
+ /**
22
+ * Add a text label to a sheet.
23
+ *
24
+ * Creates a text shape on the given sheet and returns the id of the created
25
+ * canvas shape. Requires Present mode to be open.
26
+ *
27
+ * @param sheetId - The sheet to annotate.
28
+ * @param text - The label text.
29
+ * @param options - Optional `position` (`{ x, y }`, relative to the sheet's
30
+ * top-left, in canvas units — defaults to the sheet's top-left corner),
31
+ * `size` (`"s" | "m" | "l" | "xl"`, default `"m"`), and `color` (a named
32
+ * palette color, default `"black"`).
33
+ * @returns A {@linkcode PluginPresentationAnnotateTextResult} with the created
34
+ * `shapeId`.
35
+ * @throws If Present mode is not open or the sheet id is invalid.
36
+ *
37
+ * @examplePrompt Add a title "Ground Floor" to Sheet 1
38
+ * @examplePrompt Label the cover sheet with the project name
39
+ * @examplePrompt Caption this view with "Proposed layout"
40
+ * @examplePrompt Put a red note on the sheet
41
+ *
42
+ * # Example
43
+ * ```ts
44
+ * const { shapeId } = await snaptrude.presentation.annotate.text(
45
+ * "sheet_1",
46
+ * "Ground Floor",
47
+ * { position: { x: 40, y: 40 }, size: "xl", color: "blue" },
48
+ * )
49
+ * ```
50
+ */
51
+ abstract text(sheetId: string, text: string, options?: {
52
+ position?: {
53
+ x: number;
54
+ y: number;
55
+ };
56
+ size?: PluginAnnotateTextSize;
57
+ color?: PluginAnnotateTextColor;
58
+ }): PluginApiReturn<PluginPresentationAnnotateTextResult>;
59
+ /**
60
+ * Draw an arrow on a sheet.
61
+ *
62
+ * Creates an arrow shape from `start` to `end` (both relative to the sheet's
63
+ * top-left, in canvas units — the same Arrow tool as the Present toolbar) and
64
+ * returns the id of the created canvas shape. Requires Present mode to be open.
65
+ *
66
+ * @param sheetId - The sheet to annotate.
67
+ * @param start - Arrow tail position (`{ x, y }`, relative to the sheet's top-left).
68
+ * @param end - Arrow head position (`{ x, y }`, relative to the sheet's top-left).
69
+ * @param options - Optional `color` (a named palette color, default `"black"`)
70
+ * and `size` (stroke weight preset, `"s" | "m" | "l" | "xl"`, default `"m"`).
71
+ * @returns A {@linkcode PluginPresentationAnnotateResult} with the created
72
+ * `shapeId`.
73
+ * @throws If Present mode is not open or the sheet id is invalid.
74
+ *
75
+ * @examplePrompt Draw an arrow pointing at the entrance on Sheet 1
76
+ * @examplePrompt Add a red arrow from the title to the plan view
77
+ * @examplePrompt Point an arrow at the top-left view on the cover sheet
78
+ *
79
+ * # Example
80
+ * ```ts
81
+ * const { shapeId } = await snaptrude.presentation.annotate.arrow(
82
+ * "sheet_1",
83
+ * { x: 100, y: 200 },
84
+ * { x: 300, y: 250 },
85
+ * { color: "red" },
86
+ * )
87
+ * ```
88
+ */
89
+ abstract arrow(sheetId: string, start: {
90
+ x: number;
91
+ y: number;
92
+ }, end: {
93
+ x: number;
94
+ y: number;
95
+ }, options?: {
96
+ color?: PluginAnnotateTextColor;
97
+ size?: PluginAnnotateTextSize;
98
+ }): PluginApiReturn<PluginPresentationAnnotateResult>;
99
+ /**
100
+ * Add a sticky note to a sheet.
101
+ *
102
+ * Creates a note shape (the same Note tool as the Present toolbar — a
103
+ * fixed-size sticky square that grows with its text) and returns the id of
104
+ * the created canvas shape. Requires Present mode to be open.
105
+ *
106
+ * @param sheetId - The sheet to annotate.
107
+ * @param text - The note text.
108
+ * @param options - Optional `position` (`{ x, y }`, relative to the sheet's
109
+ * top-left, in canvas units — defaults to the sheet's top-left corner),
110
+ * `color` (a named palette color, default `"black"` — rendered as the
111
+ * note's sticky fill), and `size` (text size preset,
112
+ * `"s" | "m" | "l" | "xl"`, default `"m"`).
113
+ * @returns A {@linkcode PluginPresentationAnnotateResult} with the created
114
+ * `shapeId`.
115
+ * @throws If Present mode is not open or the sheet id is invalid.
116
+ *
117
+ * @examplePrompt Add a sticky note "Review this wall" to Sheet 1
118
+ * @examplePrompt Put a yellow note on the cover sheet
119
+ * @examplePrompt Leave a note next to the ground floor plan
120
+ *
121
+ * # Example
122
+ * ```ts
123
+ * const { shapeId } = await snaptrude.presentation.annotate.note(
124
+ * "sheet_1",
125
+ * "Review this wall",
126
+ * { position: { x: 60, y: 120 }, color: "yellow" },
127
+ * )
128
+ * ```
129
+ */
130
+ abstract note(sheetId: string, text: string, options?: {
131
+ position?: {
132
+ x: number;
133
+ y: number;
134
+ };
135
+ color?: PluginAnnotateTextColor;
136
+ size?: PluginAnnotateTextSize;
137
+ }): PluginApiReturn<PluginPresentationAnnotateResult>;
138
+ /**
139
+ * Draw a geo shape (rectangle, ellipse, cloud, …) on a sheet.
140
+ *
141
+ * Creates a geo shape of the given `kind` — the same shapes as the Present
142
+ * toolbar's shape flyout — sized to `bounds` (relative to the sheet's
143
+ * top-left, in canvas units) and returns the id of the created canvas shape.
144
+ * Requires Present mode to be open.
145
+ *
146
+ * @param sheetId - The sheet to annotate.
147
+ * @param kind - The shape kind ({@linkcode PluginAnnotateGeoKind}), e.g.
148
+ * `"rectangle"`, `"ellipse"`, `"cloud"`.
149
+ * @param bounds - Placement box `{ x, y, w, h }` — `x`/`y` are the shape's
150
+ * top-left relative to the sheet's top-left; `w`/`h` must be positive.
151
+ * @param options - Optional `color` (a named palette color, default
152
+ * `"black"`) and `fill` ({@linkcode PluginAnnotateFill}, default `"none"` —
153
+ * outline only).
154
+ * @returns A {@linkcode PluginPresentationAnnotateResult} with the created
155
+ * `shapeId`.
156
+ * @throws If Present mode is not open or the sheet id is invalid.
157
+ *
158
+ * @examplePrompt Draw a revision cloud around the kitchen on Sheet 2
159
+ * @examplePrompt Add a red rectangle highlight to the sheet
160
+ * @examplePrompt Draw an ellipse around the entrance on the cover sheet
161
+ *
162
+ * # Example
163
+ * ```ts
164
+ * const { shapeId } = await snaptrude.presentation.annotate.shape(
165
+ * "sheet_1",
166
+ * "cloud",
167
+ * { x: 80, y: 80, w: 240, h: 160 },
168
+ * { color: "red" },
169
+ * )
170
+ * ```
171
+ */
172
+ abstract shape(sheetId: string, kind: PluginAnnotateGeoKind, bounds: {
173
+ x: number;
174
+ y: number;
175
+ w: number;
176
+ h: number;
177
+ }, options?: {
178
+ color?: PluginAnnotateTextColor;
179
+ fill?: PluginAnnotateFill;
180
+ }): PluginApiReturn<PluginPresentationAnnotateResult>;
181
+ }
182
+ /** Text size preset (the same s/m/l/xl scale as the Present-mode text tool). */
183
+ export declare const PluginAnnotateTextSize: z.ZodEnum<{
184
+ m: "m";
185
+ s: "s";
186
+ l: "l";
187
+ xl: "xl";
188
+ }>;
189
+ export type PluginAnnotateTextSize = z.infer<typeof PluginAnnotateTextSize>;
190
+ /** Named palette color (the same swatches as the Present-mode style panel). */
191
+ export declare const PluginAnnotateTextColor: z.ZodEnum<{
192
+ black: "black";
193
+ grey: "grey";
194
+ "light-violet": "light-violet";
195
+ violet: "violet";
196
+ blue: "blue";
197
+ "light-blue": "light-blue";
198
+ yellow: "yellow";
199
+ orange: "orange";
200
+ green: "green";
201
+ "light-green": "light-green";
202
+ "light-red": "light-red";
203
+ red: "red";
204
+ white: "white";
205
+ }>;
206
+ export type PluginAnnotateTextColor = z.infer<typeof PluginAnnotateTextColor>;
207
+ /**
208
+ * Arguments for {@linkcode PluginPresentationAnnotateApi.text}.
209
+ *
210
+ * | Property | Type | Description |
211
+ * |---|---|---|
212
+ * | `sheetId` | `string` | The sheet to annotate |
213
+ * | `text` | `string` | The label text |
214
+ * | `position` | `{ x: number; y: number } \| undefined` | Where to place it (relative to the sheet) |
215
+ * | `size` | {@linkcode PluginAnnotateTextSize}` \| undefined` | Text size preset |
216
+ * | `color` | {@linkcode PluginAnnotateTextColor}` \| undefined` | Text color |
217
+ */
218
+ export declare const PluginPresentationAnnotateTextArgs: z.ZodObject<{
219
+ sheetId: z.ZodString;
220
+ text: z.ZodString;
221
+ position: z.ZodOptional<z.ZodObject<{
222
+ x: z.ZodNumber;
223
+ y: z.ZodNumber;
224
+ }, z.core.$strip>>;
225
+ size: z.ZodOptional<z.ZodEnum<{
226
+ m: "m";
227
+ s: "s";
228
+ l: "l";
229
+ xl: "xl";
230
+ }>>;
231
+ color: z.ZodOptional<z.ZodEnum<{
232
+ black: "black";
233
+ grey: "grey";
234
+ "light-violet": "light-violet";
235
+ violet: "violet";
236
+ blue: "blue";
237
+ "light-blue": "light-blue";
238
+ yellow: "yellow";
239
+ orange: "orange";
240
+ green: "green";
241
+ "light-green": "light-green";
242
+ "light-red": "light-red";
243
+ red: "red";
244
+ white: "white";
245
+ }>>;
246
+ }, z.core.$strip>;
247
+ export type PluginPresentationAnnotateTextArgs = z.infer<typeof PluginPresentationAnnotateTextArgs>;
248
+ /**
249
+ * Result of {@linkcode PluginPresentationAnnotateApi.text}.
250
+ *
251
+ * | Property | Type | Description |
252
+ * |---|---|---|
253
+ * | `shapeId` | `string` | Id of the created text shape |
254
+ */
255
+ export declare const PluginPresentationAnnotateTextResult: z.ZodObject<{
256
+ shapeId: z.ZodString;
257
+ }, z.core.$strip>;
258
+ export type PluginPresentationAnnotateTextResult = z.infer<typeof PluginPresentationAnnotateTextResult>;
259
+ /**
260
+ * Geo shape kind — the shapes offered by the Present-mode toolbar's shape
261
+ * flyout.
262
+ */
263
+ export declare const PluginAnnotateGeoKind: z.ZodEnum<{
264
+ rectangle: "rectangle";
265
+ ellipse: "ellipse";
266
+ triangle: "triangle";
267
+ diamond: "diamond";
268
+ hexagon: "hexagon";
269
+ oval: "oval";
270
+ rhombus: "rhombus";
271
+ star: "star";
272
+ cloud: "cloud";
273
+ heart: "heart";
274
+ "x-box": "x-box";
275
+ "check-box": "check-box";
276
+ "arrow-left": "arrow-left";
277
+ "arrow-up": "arrow-up";
278
+ "arrow-right": "arrow-right";
279
+ "arrow-down": "arrow-down";
280
+ }>;
281
+ export type PluginAnnotateGeoKind = z.infer<typeof PluginAnnotateGeoKind>;
282
+ /** Fill style for geo shapes (the same fills as the Present-mode style panel). */
283
+ export declare const PluginAnnotateFill: z.ZodEnum<{
284
+ pattern: "pattern";
285
+ none: "none";
286
+ semi: "semi";
287
+ solid: "solid";
288
+ }>;
289
+ export type PluginAnnotateFill = z.infer<typeof PluginAnnotateFill>;
290
+ /**
291
+ * Arguments for {@linkcode PluginPresentationAnnotateApi.arrow}.
292
+ *
293
+ * | Property | Type | Description |
294
+ * |---|---|---|
295
+ * | `sheetId` | `string` | The sheet to annotate |
296
+ * | `start` | `{ x: number; y: number }` | Arrow tail (relative to the sheet) |
297
+ * | `end` | `{ x: number; y: number }` | Arrow head (relative to the sheet) |
298
+ * | `color` | {@linkcode PluginAnnotateTextColor}` \| undefined` | Arrow color |
299
+ * | `size` | {@linkcode PluginAnnotateTextSize}` \| undefined` | Stroke weight preset |
300
+ */
301
+ export declare const PluginPresentationAnnotateArrowArgs: z.ZodObject<{
302
+ sheetId: z.ZodString;
303
+ start: z.ZodObject<{
304
+ x: z.ZodNumber;
305
+ y: z.ZodNumber;
306
+ }, z.core.$strip>;
307
+ end: z.ZodObject<{
308
+ x: z.ZodNumber;
309
+ y: z.ZodNumber;
310
+ }, z.core.$strip>;
311
+ color: z.ZodOptional<z.ZodEnum<{
312
+ black: "black";
313
+ grey: "grey";
314
+ "light-violet": "light-violet";
315
+ violet: "violet";
316
+ blue: "blue";
317
+ "light-blue": "light-blue";
318
+ yellow: "yellow";
319
+ orange: "orange";
320
+ green: "green";
321
+ "light-green": "light-green";
322
+ "light-red": "light-red";
323
+ red: "red";
324
+ white: "white";
325
+ }>>;
326
+ size: z.ZodOptional<z.ZodEnum<{
327
+ m: "m";
328
+ s: "s";
329
+ l: "l";
330
+ xl: "xl";
331
+ }>>;
332
+ }, z.core.$strip>;
333
+ export type PluginPresentationAnnotateArrowArgs = z.infer<typeof PluginPresentationAnnotateArrowArgs>;
334
+ /**
335
+ * Arguments for {@linkcode PluginPresentationAnnotateApi.note}.
336
+ *
337
+ * | Property | Type | Description |
338
+ * |---|---|---|
339
+ * | `sheetId` | `string` | The sheet to annotate |
340
+ * | `text` | `string` | The note text |
341
+ * | `position` | `{ x: number; y: number } \| undefined` | Where to place it (relative to the sheet) |
342
+ * | `color` | {@linkcode PluginAnnotateTextColor}` \| undefined` | Sticky fill color |
343
+ * | `size` | {@linkcode PluginAnnotateTextSize}` \| undefined` | Text size preset |
344
+ */
345
+ export declare const PluginPresentationAnnotateNoteArgs: z.ZodObject<{
346
+ sheetId: z.ZodString;
347
+ text: z.ZodString;
348
+ position: z.ZodOptional<z.ZodObject<{
349
+ x: z.ZodNumber;
350
+ y: z.ZodNumber;
351
+ }, z.core.$strip>>;
352
+ color: z.ZodOptional<z.ZodEnum<{
353
+ black: "black";
354
+ grey: "grey";
355
+ "light-violet": "light-violet";
356
+ violet: "violet";
357
+ blue: "blue";
358
+ "light-blue": "light-blue";
359
+ yellow: "yellow";
360
+ orange: "orange";
361
+ green: "green";
362
+ "light-green": "light-green";
363
+ "light-red": "light-red";
364
+ red: "red";
365
+ white: "white";
366
+ }>>;
367
+ size: z.ZodOptional<z.ZodEnum<{
368
+ m: "m";
369
+ s: "s";
370
+ l: "l";
371
+ xl: "xl";
372
+ }>>;
373
+ }, z.core.$strip>;
374
+ export type PluginPresentationAnnotateNoteArgs = z.infer<typeof PluginPresentationAnnotateNoteArgs>;
375
+ /**
376
+ * Arguments for {@linkcode PluginPresentationAnnotateApi.shape}.
377
+ *
378
+ * | Property | Type | Description |
379
+ * |---|---|---|
380
+ * | `sheetId` | `string` | The sheet to annotate |
381
+ * | `kind` | {@linkcode PluginAnnotateGeoKind} | The shape kind |
382
+ * | `bounds` | `{ x: number; y: number; w: number; h: number }` | Placement box (relative to the sheet; `w`/`h` positive) |
383
+ * | `color` | {@linkcode PluginAnnotateTextColor}` \| undefined` | Outline color |
384
+ * | `fill` | {@linkcode PluginAnnotateFill}` \| undefined` | Fill style |
385
+ */
386
+ export declare const PluginPresentationAnnotateShapeArgs: z.ZodObject<{
387
+ sheetId: z.ZodString;
388
+ kind: z.ZodEnum<{
389
+ rectangle: "rectangle";
390
+ ellipse: "ellipse";
391
+ triangle: "triangle";
392
+ diamond: "diamond";
393
+ hexagon: "hexagon";
394
+ oval: "oval";
395
+ rhombus: "rhombus";
396
+ star: "star";
397
+ cloud: "cloud";
398
+ heart: "heart";
399
+ "x-box": "x-box";
400
+ "check-box": "check-box";
401
+ "arrow-left": "arrow-left";
402
+ "arrow-up": "arrow-up";
403
+ "arrow-right": "arrow-right";
404
+ "arrow-down": "arrow-down";
405
+ }>;
406
+ bounds: z.ZodObject<{
407
+ x: z.ZodNumber;
408
+ y: z.ZodNumber;
409
+ w: z.ZodNumber;
410
+ h: z.ZodNumber;
411
+ }, z.core.$strip>;
412
+ color: z.ZodOptional<z.ZodEnum<{
413
+ black: "black";
414
+ grey: "grey";
415
+ "light-violet": "light-violet";
416
+ violet: "violet";
417
+ blue: "blue";
418
+ "light-blue": "light-blue";
419
+ yellow: "yellow";
420
+ orange: "orange";
421
+ green: "green";
422
+ "light-green": "light-green";
423
+ "light-red": "light-red";
424
+ red: "red";
425
+ white: "white";
426
+ }>>;
427
+ fill: z.ZodOptional<z.ZodEnum<{
428
+ pattern: "pattern";
429
+ none: "none";
430
+ semi: "semi";
431
+ solid: "solid";
432
+ }>>;
433
+ }, z.core.$strip>;
434
+ export type PluginPresentationAnnotateShapeArgs = z.infer<typeof PluginPresentationAnnotateShapeArgs>;
435
+ /**
436
+ * Result of {@linkcode PluginPresentationAnnotateApi.arrow},
437
+ * {@linkcode PluginPresentationAnnotateApi.note}, and
438
+ * {@linkcode PluginPresentationAnnotateApi.shape}.
439
+ *
440
+ * | Property | Type | Description |
441
+ * |---|---|---|
442
+ * | `shapeId` | `string` | Id of the created canvas shape |
443
+ */
444
+ export declare const PluginPresentationAnnotateResult: z.ZodObject<{
445
+ shapeId: z.ZodString;
446
+ }, z.core.$strip>;
447
+ export type PluginPresentationAnnotateResult = z.infer<typeof PluginPresentationAnnotateResult>;
448
+ //# sourceMappingURL=annotate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotate.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/annotate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;;;GAeG;AACH,8BAAsB,6BAA6B;;IAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;aACa,IAAI,CAClB,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