@snaptrude/plugin-core 0.0.0-dev-20260708130115 → 0.0.0-dev-20260827135706

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/CHANGELOG.md +152 -1
  2. package/api-manifest.json +3620 -276
  3. package/dist/api/analysis/daylight.d.ts +603 -0
  4. package/dist/api/analysis/daylight.d.ts.map +1 -0
  5. package/dist/api/analysis/heatmaps.d.ts +658 -0
  6. package/dist/api/analysis/heatmaps.d.ts.map +1 -0
  7. package/dist/api/analysis/illuminance.d.ts +145 -0
  8. package/dist/api/analysis/illuminance.d.ts.map +1 -0
  9. package/dist/api/analysis/index.d.ts +59 -0
  10. package/dist/api/analysis/index.d.ts.map +1 -0
  11. package/dist/api/analysis/shadows.d.ts +165 -0
  12. package/dist/api/analysis/shadows.d.ts.map +1 -0
  13. package/dist/api/analysis/solar.d.ts +249 -0
  14. package/dist/api/analysis/solar.d.ts.map +1 -0
  15. package/dist/api/analysis/sunlightHours.d.ts +208 -0
  16. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  17. package/dist/api/analysis/sunpath.d.ts +80 -0
  18. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  19. package/dist/api/analysis/weather.d.ts +193 -0
  20. package/dist/api/analysis/weather.d.ts.map +1 -0
  21. package/dist/api/core/camera/index.d.ts +261 -0
  22. package/dist/api/core/camera/index.d.ts.map +1 -0
  23. package/dist/api/core/comment/index.d.ts +105 -2
  24. package/dist/api/core/comment/index.d.ts.map +1 -1
  25. package/dist/api/core/geom/create/index.d.ts +840 -14
  26. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  27. package/dist/api/core/geom/delete/index.d.ts +8 -2
  28. package/dist/api/core/geom/delete/index.d.ts.map +1 -1
  29. package/dist/api/core/geom/query/arc.d.ts +5 -5
  30. package/dist/api/core/geom/query/brep.d.ts +130 -18
  31. package/dist/api/core/geom/query/brep.d.ts.map +1 -1
  32. package/dist/api/core/geom/query/circle.d.ts +18 -18
  33. package/dist/api/core/geom/query/contour.d.ts +20 -20
  34. package/dist/api/core/geom/query/curve.d.ts +49 -49
  35. package/dist/api/core/geom/query/edge.d.ts +5 -5
  36. package/dist/api/core/geom/query/face.d.ts +16 -16
  37. package/dist/api/core/geom/query/halfedge.d.ts +8 -8
  38. package/dist/api/core/geom/query/profile.d.ts +19 -19
  39. package/dist/api/core/geom/query/vertex.d.ts +8 -8
  40. package/dist/api/core/geom/update/contour.d.ts +14 -14
  41. package/dist/api/core/geom/update/curve.d.ts +7 -7
  42. package/dist/api/core/geom/update/profile.d.ts +16 -16
  43. package/dist/api/core/handles/index.d.ts +210 -0
  44. package/dist/api/core/handles/index.d.ts.map +1 -0
  45. package/dist/api/core/index.d.ts +34 -0
  46. package/dist/api/core/index.d.ts.map +1 -1
  47. package/dist/api/core/io/export/index.d.ts +134 -0
  48. package/dist/api/core/io/export/index.d.ts.map +1 -0
  49. package/dist/api/core/io/import/index.d.ts +453 -0
  50. package/dist/api/core/io/import/index.d.ts.map +1 -0
  51. package/dist/api/core/io/index.d.ts +40 -0
  52. package/dist/api/core/io/index.d.ts.map +1 -0
  53. package/dist/api/core/io/job/index.d.ts +139 -0
  54. package/dist/api/core/io/job/index.d.ts.map +1 -0
  55. package/dist/api/core/io/query/index.d.ts +74 -0
  56. package/dist/api/core/io/query/index.d.ts.map +1 -0
  57. package/dist/api/core/io/terrain/index.d.ts +341 -0
  58. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  59. package/dist/api/core/io/underlay/index.d.ts +805 -0
  60. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  61. package/dist/api/core/layers.d.ts +7 -7
  62. package/dist/api/core/mode/index.d.ts +99 -0
  63. package/dist/api/core/mode/index.d.ts.map +1 -0
  64. package/dist/api/core/project/index.d.ts +68 -1
  65. package/dist/api/core/project/index.d.ts.map +1 -1
  66. package/dist/api/core/proposals/index.d.ts +531 -0
  67. package/dist/api/core/proposals/index.d.ts.map +1 -0
  68. package/dist/api/core/storeys/index.d.ts +265 -0
  69. package/dist/api/core/storeys/index.d.ts.map +1 -0
  70. package/dist/api/core/tags.d.ts +24 -0
  71. package/dist/api/core/tags.d.ts.map +1 -1
  72. package/dist/api/core/user.d.ts +44 -0
  73. package/dist/api/core/user.d.ts.map +1 -0
  74. package/dist/api/core/zoom/index.d.ts +4 -0
  75. package/dist/api/core/zoom/index.d.ts.map +1 -1
  76. package/dist/api/design/boolean/index.d.ts +4 -4
  77. package/dist/api/design/create/index.d.ts +568 -45
  78. package/dist/api/design/create/index.d.ts.map +1 -1
  79. package/dist/api/design/delete/index.d.ts +3 -0
  80. package/dist/api/design/delete/index.d.ts.map +1 -1
  81. package/dist/api/design/doors/index.d.ts +195 -0
  82. package/dist/api/design/doors/index.d.ts.map +1 -1
  83. package/dist/api/design/edit/index.d.ts +1 -1
  84. package/dist/api/design/erase/index.d.ts +2 -2
  85. package/dist/api/design/family.d.ts +349 -0
  86. package/dist/api/design/family.d.ts.map +1 -0
  87. package/dist/api/design/furniture/index.d.ts +181 -8
  88. package/dist/api/design/furniture/index.d.ts.map +1 -1
  89. package/dist/api/design/index.d.ts +98 -0
  90. package/dist/api/design/index.d.ts.map +1 -1
  91. package/dist/api/design/lock.d.ts +26 -0
  92. package/dist/api/design/lock.d.ts.map +1 -1
  93. package/dist/api/design/materials/index.d.ts +270 -16
  94. package/dist/api/design/materials/index.d.ts.map +1 -1
  95. package/dist/api/design/query/geometry/index.d.ts +112 -0
  96. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  97. package/dist/api/design/query/index.d.ts +282 -11
  98. package/dist/api/design/query/index.d.ts.map +1 -1
  99. package/dist/api/design/query/referenceLines.d.ts +45 -0
  100. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  101. package/dist/api/design/query/spaces.d.ts +181 -8
  102. package/dist/api/design/query/spaces.d.ts.map +1 -1
  103. package/dist/api/design/selection/index.d.ts +144 -0
  104. package/dist/api/design/selection/index.d.ts.map +1 -1
  105. package/dist/api/design/transform/index.d.ts +172 -10
  106. package/dist/api/design/transform/index.d.ts.map +1 -1
  107. package/dist/api/design/types/index.d.ts +181 -0
  108. package/dist/api/design/types/index.d.ts.map +1 -0
  109. package/dist/api/design/update/index.d.ts +553 -2
  110. package/dist/api/design/update/index.d.ts.map +1 -1
  111. package/dist/api/design/visibility.d.ts +126 -0
  112. package/dist/api/design/visibility.d.ts.map +1 -0
  113. package/dist/api/design/windows/index.d.ts +113 -2
  114. package/dist/api/design/windows/index.d.ts.map +1 -1
  115. package/dist/api/entity/buildableEnvelope.d.ts +4 -0
  116. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  117. package/dist/api/entity/referenceLine.d.ts +10 -2
  118. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  119. package/dist/api/entity/space.d.ts +21 -21
  120. package/dist/api/entity/story.d.ts +242 -15
  121. package/dist/api/entity/story.d.ts.map +1 -1
  122. package/dist/api/index.d.ts +10 -0
  123. package/dist/api/index.d.ts.map +1 -1
  124. package/dist/api/presentation/aiInspiration.d.ts +25 -25
  125. package/dist/api/presentation/annotate.d.ts +467 -0
  126. package/dist/api/presentation/annotate.d.ts.map +1 -0
  127. package/dist/api/presentation/diagrams.d.ts +111 -8
  128. package/dist/api/presentation/diagrams.d.ts.map +1 -1
  129. package/dist/api/presentation/export.d.ts +108 -0
  130. package/dist/api/presentation/export.d.ts.map +1 -0
  131. package/dist/api/presentation/import.d.ts +55 -4
  132. package/dist/api/presentation/import.d.ts.map +1 -1
  133. package/dist/api/presentation/index.d.ts +58 -1
  134. package/dist/api/presentation/index.d.ts.map +1 -1
  135. package/dist/api/presentation/placedViews.d.ts +1139 -0
  136. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  137. package/dist/api/presentation/shapes.d.ts +481 -0
  138. package/dist/api/presentation/shapes.d.ts.map +1 -0
  139. package/dist/api/presentation/sheets.d.ts +452 -13
  140. package/dist/api/presentation/sheets.d.ts.map +1 -1
  141. package/dist/api/presentation/slideshow.d.ts +125 -0
  142. package/dist/api/presentation/slideshow.d.ts.map +1 -0
  143. package/dist/api/presentation/tables.d.ts +81 -0
  144. package/dist/api/presentation/tables.d.ts.map +1 -0
  145. package/dist/api/presentation/views.d.ts +367 -7
  146. package/dist/api/presentation/views.d.ts.map +1 -1
  147. package/dist/api/program/areas.d.ts +102 -12
  148. package/dist/api/program/areas.d.ts.map +1 -1
  149. package/dist/api/program/cores.d.ts +3 -99
  150. package/dist/api/program/cores.d.ts.map +1 -1
  151. package/dist/api/program/index.d.ts +7 -15
  152. package/dist/api/program/index.d.ts.map +1 -1
  153. package/dist/api/program/layout.d.ts +346 -11
  154. package/dist/api/program/layout.d.ts.map +1 -1
  155. package/dist/api/program/site.d.ts +469 -13
  156. package/dist/api/program/site.d.ts.map +1 -1
  157. package/dist/api/program/spreadsheet.d.ts +365 -41
  158. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  159. package/dist/api/workspace/index.d.ts +505 -0
  160. package/dist/api/workspace/index.d.ts.map +1 -0
  161. package/dist/errors/codes.d.ts +34 -0
  162. package/dist/errors/codes.d.ts.map +1 -0
  163. package/dist/errors/envelope.d.ts +56 -0
  164. package/dist/errors/envelope.d.ts.map +1 -0
  165. package/dist/errors/index.d.ts +6 -0
  166. package/dist/errors/index.d.ts.map +1 -0
  167. package/dist/errors/plugin-error.d.ts +69 -0
  168. package/dist/errors/plugin-error.d.ts.map +1 -0
  169. package/dist/handles.d.ts +97 -25
  170. package/dist/handles.d.ts.map +1 -1
  171. package/dist/host-utils.d.ts +4 -0
  172. package/dist/host-utils.d.ts.map +1 -1
  173. package/dist/index.cjs +4582 -1422
  174. package/dist/index.cjs.map +1 -1
  175. package/dist/index.d.ts +1 -0
  176. package/dist/index.d.ts.map +1 -1
  177. package/dist/index.js +4171 -1411
  178. package/dist/index.js.map +1 -1
  179. package/package.json +4 -2
  180. package/scripts/generate-manifest.mjs +45 -0
  181. package/scripts/generate-manifest.test.mjs +103 -4
  182. package/src/api/analysis/daylight.ts +470 -0
  183. package/src/api/analysis/heatmaps.ts +683 -0
  184. package/src/api/analysis/illuminance.ts +155 -0
  185. package/src/api/analysis/index.ts +61 -0
  186. package/src/api/analysis/shadows.ts +183 -0
  187. package/src/api/analysis/solar.ts +237 -0
  188. package/src/api/analysis/sunlightHours.ts +211 -0
  189. package/src/api/analysis/sunpath.ts +83 -0
  190. package/src/api/analysis/weather.ts +179 -0
  191. package/src/api/core/camera/index.ts +268 -0
  192. package/src/api/core/comment/index.ts +120 -2
  193. package/src/api/core/geom/create/index.ts +912 -1
  194. package/src/api/core/geom/delete/index.ts +6 -0
  195. package/src/api/core/geom/query/brep.ts +119 -0
  196. package/src/api/core/handles/index.ts +233 -0
  197. package/src/api/core/index.ts +34 -0
  198. package/src/api/core/io/export/index.ts +126 -0
  199. package/src/api/core/io/import/index.ts +496 -0
  200. package/src/api/core/io/index.ts +42 -0
  201. package/src/api/core/io/job/index.ts +140 -0
  202. package/src/api/core/io/query/index.ts +71 -0
  203. package/src/api/core/io/terrain/index.ts +360 -0
  204. package/src/api/core/io/underlay/index.ts +705 -0
  205. package/src/api/core/mode/index.ts +96 -0
  206. package/src/api/core/project/index.ts +62 -1
  207. package/src/api/core/proposals/index.ts +569 -0
  208. package/src/api/core/storeys/index.ts +294 -0
  209. package/src/api/core/tags.ts +27 -0
  210. package/src/api/core/user.ts +46 -0
  211. package/src/api/core/zoom/index.ts +4 -0
  212. package/src/api/design/create/index.ts +670 -30
  213. package/src/api/design/delete/index.ts +3 -0
  214. package/src/api/design/doors/index.ts +208 -0
  215. package/src/api/design/erase/index.ts +1 -1
  216. package/src/api/design/family.ts +388 -0
  217. package/src/api/design/furniture/index.ts +197 -8
  218. package/src/api/design/index.ts +102 -0
  219. package/src/api/design/lock.ts +27 -0
  220. package/src/api/design/materials/index.ts +334 -27
  221. package/src/api/design/query/geometry/index.ts +125 -3
  222. package/src/api/design/query/index.ts +217 -7
  223. package/src/api/design/query/referenceLines.ts +52 -0
  224. package/src/api/design/query/spaces.ts +143 -0
  225. package/src/api/design/selection/index.ts +129 -0
  226. package/src/api/design/transform/index.ts +170 -9
  227. package/src/api/design/types/index.ts +156 -0
  228. package/src/api/design/update/index.ts +631 -3
  229. package/src/api/design/visibility.ts +143 -0
  230. package/src/api/design/windows/index.ts +128 -2
  231. package/src/api/entity/buildableEnvelope.ts +4 -0
  232. package/src/api/entity/referenceLine.ts +8 -0
  233. package/src/api/entity/story.ts +259 -15
  234. package/src/api/index.ts +10 -0
  235. package/src/api/presentation/annotate.ts +385 -0
  236. package/src/api/presentation/diagrams.ts +118 -8
  237. package/src/api/presentation/export.ts +108 -0
  238. package/src/api/presentation/import.ts +51 -4
  239. package/src/api/presentation/index.ts +66 -1
  240. package/src/api/presentation/placedViews.ts +1120 -0
  241. package/src/api/presentation/shapes.ts +274 -0
  242. package/src/api/presentation/sheets.ts +400 -13
  243. package/src/api/presentation/slideshow.ts +134 -0
  244. package/src/api/presentation/tables.ts +84 -0
  245. package/src/api/presentation/views.ts +376 -8
  246. package/src/api/program/areas.ts +88 -15
  247. package/src/api/program/cores.ts +3 -91
  248. package/src/api/program/index.ts +7 -15
  249. package/src/api/program/layout.ts +365 -11
  250. package/src/api/program/site.ts +435 -13
  251. package/src/api/program/spreadsheet.ts +376 -35
  252. package/src/api/workspace/index.ts +563 -0
  253. package/src/errors/codes.ts +136 -0
  254. package/src/errors/envelope.ts +75 -0
  255. package/src/errors/index.ts +21 -0
  256. package/src/errors/plugin-error.ts +134 -0
  257. package/src/handles.ts +123 -13
  258. package/src/host-utils.ts +4 -0
  259. package/src/index.ts +1 -0
  260. package/test/errors.test.mjs +184 -0
  261. package/tsconfig.json +7 -2
@@ -0,0 +1,467 @@
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
+ * Typography is optional: `fontFamily` takes a system family or any Google
28
+ * Font (loaded automatically, the same loader as the Present text panel);
29
+ * `fontWeight` is a numeric weight string like `"400"` or `"700"`,
30
+ * optionally with the `-italic` suffix (e.g. `"700-italic"`) — the Present
31
+ * text panel's value domain; a weight the chosen font does not provide
32
+ * falls back to regular. `fontSizePx` sets an exact pixel size, overriding
33
+ * the `size` preset when both are given (`size` alone keeps working).
34
+ *
35
+ * @param sheetId - The sheet to annotate.
36
+ * @param text - The label text.
37
+ * @param options - Optional `position` (`{ x, y }`, relative to the sheet's
38
+ * top-left, in canvas units — defaults to the sheet's top-left corner),
39
+ * `size` (`"s" | "m" | "l" | "xl"`, default `"m"`), `color` (a named
40
+ * palette color, default `"black"`), and typography: `fontFamily`,
41
+ * `fontWeight` (numeric string, `-italic` suffix allowed), `fontSizePx`
42
+ * (positive px size overriding the `size` preset).
43
+ * @returns A {@linkcode PluginPresentationAnnotateTextResult} with the created
44
+ * `shapeId`.
45
+ * @throws If Present mode is not open or the sheet id is invalid.
46
+ *
47
+ * @examplePrompt Add a title "Ground Floor" to Sheet 1
48
+ * @examplePrompt Label the cover sheet with the project name
49
+ * @examplePrompt Caption this view with "Proposed layout"
50
+ * @examplePrompt Put a red note on the sheet
51
+ *
52
+ * # Example
53
+ * ```ts
54
+ * const { shapeId } = await snaptrude.presentation.annotate.text(
55
+ * "sheet_1",
56
+ * "Ground Floor",
57
+ * { position: { x: 40, y: 40 }, size: "xl", color: "blue" },
58
+ * )
59
+ * ```
60
+ */
61
+ abstract text(sheetId: string, text: string, options?: {
62
+ position?: {
63
+ x: number;
64
+ y: number;
65
+ };
66
+ size?: PluginAnnotateTextSize;
67
+ color?: PluginAnnotateTextColor;
68
+ fontFamily?: string;
69
+ fontWeight?: string;
70
+ fontSizePx?: number;
71
+ }): PluginApiReturn<PluginPresentationAnnotateTextResult>;
72
+ /**
73
+ * Draw an arrow on a sheet.
74
+ *
75
+ * Creates an arrow shape from `start` to `end` (both relative to the sheet's
76
+ * top-left, in canvas units — the same Arrow tool as the Present toolbar) and
77
+ * returns the id of the created canvas shape. Requires Present mode to be open.
78
+ *
79
+ * @param sheetId - The sheet to annotate.
80
+ * @param start - Arrow tail position (`{ x, y }`, relative to the sheet's top-left).
81
+ * @param end - Arrow head position (`{ x, y }`, relative to the sheet's top-left).
82
+ * @param options - Optional `color` (a named palette color, default `"black"`)
83
+ * and `size` (stroke weight preset, `"s" | "m" | "l" | "xl"`, default `"m"`).
84
+ * @returns A {@linkcode PluginPresentationAnnotateResult} with the created
85
+ * `shapeId`.
86
+ * @throws If Present mode is not open or the sheet id is invalid.
87
+ *
88
+ * @examplePrompt Draw an arrow pointing at the entrance on Sheet 1
89
+ * @examplePrompt Add a red arrow from the title to the plan view
90
+ * @examplePrompt Point an arrow at the top-left view on the cover sheet
91
+ *
92
+ * # Example
93
+ * ```ts
94
+ * const { shapeId } = await snaptrude.presentation.annotate.arrow(
95
+ * "sheet_1",
96
+ * { x: 100, y: 200 },
97
+ * { x: 300, y: 250 },
98
+ * { color: "red" },
99
+ * )
100
+ * ```
101
+ */
102
+ abstract arrow(sheetId: string, start: {
103
+ x: number;
104
+ y: number;
105
+ }, end: {
106
+ x: number;
107
+ y: number;
108
+ }, options?: {
109
+ color?: PluginAnnotateTextColor;
110
+ size?: PluginAnnotateTextSize;
111
+ }): PluginApiReturn<PluginPresentationAnnotateResult>;
112
+ /**
113
+ * Add a sticky note to a sheet.
114
+ *
115
+ * Creates a note shape (the same Note tool as the Present toolbar — a
116
+ * fixed-size sticky square that grows with its text) and returns the id of
117
+ * the created canvas shape. Requires Present mode to be open.
118
+ *
119
+ * @param sheetId - The sheet to annotate.
120
+ * @param text - The note text.
121
+ * @param options - Optional `position` (`{ x, y }`, relative to the sheet's
122
+ * top-left, in canvas units — defaults to the sheet's top-left corner),
123
+ * `color` (a named palette color, default `"black"` — rendered as the
124
+ * note's sticky fill), and `size` (text size preset,
125
+ * `"s" | "m" | "l" | "xl"`, default `"m"`).
126
+ * @returns A {@linkcode PluginPresentationAnnotateResult} with the created
127
+ * `shapeId`.
128
+ * @throws If Present mode is not open or the sheet id is invalid.
129
+ *
130
+ * @examplePrompt Add a sticky note "Review this wall" to Sheet 1
131
+ * @examplePrompt Put a yellow note on the cover sheet
132
+ * @examplePrompt Leave a note next to the ground floor plan
133
+ *
134
+ * # Example
135
+ * ```ts
136
+ * const { shapeId } = await snaptrude.presentation.annotate.note(
137
+ * "sheet_1",
138
+ * "Review this wall",
139
+ * { position: { x: 60, y: 120 }, color: "yellow" },
140
+ * )
141
+ * ```
142
+ */
143
+ abstract note(sheetId: string, text: string, options?: {
144
+ position?: {
145
+ x: number;
146
+ y: number;
147
+ };
148
+ color?: PluginAnnotateTextColor;
149
+ size?: PluginAnnotateTextSize;
150
+ }): PluginApiReturn<PluginPresentationAnnotateResult>;
151
+ /**
152
+ * Draw a geo shape (rectangle, ellipse, cloud, …) on a sheet.
153
+ *
154
+ * Creates a geo shape of the given `kind` — the same shapes as the Present
155
+ * toolbar's shape flyout — sized to `bounds` (relative to the sheet's
156
+ * top-left, in canvas units) and returns the id of the created canvas shape.
157
+ * Requires Present mode to be open.
158
+ *
159
+ * @param sheetId - The sheet to annotate.
160
+ * @param kind - The shape kind ({@linkcode PluginAnnotateGeoKind}), e.g.
161
+ * `"rectangle"`, `"ellipse"`, `"cloud"`.
162
+ * @param bounds - Placement box `{ x, y, w, h }` — `x`/`y` are the shape's
163
+ * top-left relative to the sheet's top-left; `w`/`h` must be positive.
164
+ * @param options - Optional `color` (a named palette color, default
165
+ * `"black"`) and `fill` ({@linkcode PluginAnnotateFill}, default `"none"` —
166
+ * outline only).
167
+ * @returns A {@linkcode PluginPresentationAnnotateResult} with the created
168
+ * `shapeId`.
169
+ * @throws If Present mode is not open or the sheet id is invalid.
170
+ *
171
+ * @examplePrompt Draw a revision cloud around the kitchen on Sheet 2
172
+ * @examplePrompt Add a red rectangle highlight to the sheet
173
+ * @examplePrompt Draw an ellipse around the entrance on the cover sheet
174
+ *
175
+ * # Example
176
+ * ```ts
177
+ * const { shapeId } = await snaptrude.presentation.annotate.shape(
178
+ * "sheet_1",
179
+ * "cloud",
180
+ * { x: 80, y: 80, w: 240, h: 160 },
181
+ * { color: "red" },
182
+ * )
183
+ * ```
184
+ */
185
+ abstract shape(sheetId: string, kind: PluginAnnotateGeoKind, bounds: {
186
+ x: number;
187
+ y: number;
188
+ w: number;
189
+ h: number;
190
+ }, options?: {
191
+ color?: PluginAnnotateTextColor;
192
+ fill?: PluginAnnotateFill;
193
+ }): PluginApiReturn<PluginPresentationAnnotateResult>;
194
+ }
195
+ /** Text size preset (the same s/m/l/xl scale as the Present-mode text tool). */
196
+ export declare const PluginAnnotateTextSize: z.ZodEnum<{
197
+ m: "m";
198
+ s: "s";
199
+ l: "l";
200
+ xl: "xl";
201
+ }>;
202
+ export type PluginAnnotateTextSize = z.infer<typeof PluginAnnotateTextSize>;
203
+ /** Named palette color (the same swatches as the Present-mode style panel). */
204
+ export declare const PluginAnnotateTextColor: z.ZodEnum<{
205
+ black: "black";
206
+ grey: "grey";
207
+ "light-violet": "light-violet";
208
+ violet: "violet";
209
+ blue: "blue";
210
+ "light-blue": "light-blue";
211
+ yellow: "yellow";
212
+ orange: "orange";
213
+ green: "green";
214
+ "light-green": "light-green";
215
+ "light-red": "light-red";
216
+ red: "red";
217
+ white: "white";
218
+ }>;
219
+ export type PluginAnnotateTextColor = z.infer<typeof PluginAnnotateTextColor>;
220
+ /**
221
+ * Arguments for {@linkcode PluginPresentationAnnotateApi.text}.
222
+ *
223
+ * | Property | Type | Description |
224
+ * |---|---|---|
225
+ * | `sheetId` | `string` | The sheet to annotate |
226
+ * | `text` | `string` | The label text |
227
+ * | `position` | `{ x: number; y: number } \| undefined` | Where to place it (relative to the sheet) |
228
+ * | `size` | {@linkcode PluginAnnotateTextSize}` \| undefined` | Text size preset |
229
+ * | `color` | {@linkcode PluginAnnotateTextColor}` \| undefined` | Text color |
230
+ * | `fontFamily` | `string \| undefined` | System family or any Google Font (loaded automatically) |
231
+ * | `fontWeight` | `string \| undefined` | Numeric weight like `"400"`/`"700"`, `-italic` suffix allowed |
232
+ * | `fontSizePx` | `number \| undefined` | Exact px size (overrides the `size` preset) |
233
+ */
234
+ export declare const PluginPresentationAnnotateTextArgs: z.ZodObject<{
235
+ sheetId: z.ZodString;
236
+ text: z.ZodString;
237
+ position: z.ZodOptional<z.ZodObject<{
238
+ x: z.ZodNumber;
239
+ y: z.ZodNumber;
240
+ }, z.core.$strip>>;
241
+ size: z.ZodOptional<z.ZodEnum<{
242
+ m: "m";
243
+ s: "s";
244
+ l: "l";
245
+ xl: "xl";
246
+ }>>;
247
+ color: z.ZodOptional<z.ZodEnum<{
248
+ black: "black";
249
+ grey: "grey";
250
+ "light-violet": "light-violet";
251
+ violet: "violet";
252
+ blue: "blue";
253
+ "light-blue": "light-blue";
254
+ yellow: "yellow";
255
+ orange: "orange";
256
+ green: "green";
257
+ "light-green": "light-green";
258
+ "light-red": "light-red";
259
+ red: "red";
260
+ white: "white";
261
+ }>>;
262
+ fontFamily: z.ZodOptional<z.ZodString>;
263
+ fontWeight: z.ZodOptional<z.ZodString>;
264
+ fontSizePx: z.ZodOptional<z.ZodNumber>;
265
+ }, z.core.$strip>;
266
+ export type PluginPresentationAnnotateTextArgs = z.infer<typeof PluginPresentationAnnotateTextArgs>;
267
+ /**
268
+ * Result of {@linkcode PluginPresentationAnnotateApi.text}.
269
+ *
270
+ * | Property | Type | Description |
271
+ * |---|---|---|
272
+ * | `shapeId` | `string` | Id of the created text shape |
273
+ */
274
+ export declare const PluginPresentationAnnotateTextResult: z.ZodObject<{
275
+ shapeId: z.ZodString;
276
+ }, z.core.$strip>;
277
+ export type PluginPresentationAnnotateTextResult = z.infer<typeof PluginPresentationAnnotateTextResult>;
278
+ /**
279
+ * Geo shape kind — the shapes offered by the Present-mode toolbar's shape
280
+ * flyout.
281
+ */
282
+ export declare const PluginAnnotateGeoKind: z.ZodEnum<{
283
+ rectangle: "rectangle";
284
+ ellipse: "ellipse";
285
+ triangle: "triangle";
286
+ diamond: "diamond";
287
+ hexagon: "hexagon";
288
+ oval: "oval";
289
+ rhombus: "rhombus";
290
+ star: "star";
291
+ cloud: "cloud";
292
+ heart: "heart";
293
+ "x-box": "x-box";
294
+ "check-box": "check-box";
295
+ "arrow-left": "arrow-left";
296
+ "arrow-up": "arrow-up";
297
+ "arrow-right": "arrow-right";
298
+ "arrow-down": "arrow-down";
299
+ }>;
300
+ export type PluginAnnotateGeoKind = z.infer<typeof PluginAnnotateGeoKind>;
301
+ /** Fill style for geo shapes (the same fills as the Present-mode style panel). */
302
+ export declare const PluginAnnotateFill: z.ZodEnum<{
303
+ pattern: "pattern";
304
+ solid: "solid";
305
+ none: "none";
306
+ semi: "semi";
307
+ }>;
308
+ export type PluginAnnotateFill = z.infer<typeof PluginAnnotateFill>;
309
+ /**
310
+ * Arguments for {@linkcode PluginPresentationAnnotateApi.arrow}.
311
+ *
312
+ * | Property | Type | Description |
313
+ * |---|---|---|
314
+ * | `sheetId` | `string` | The sheet to annotate |
315
+ * | `start` | `{ x: number; y: number }` | Arrow tail (relative to the sheet) |
316
+ * | `end` | `{ x: number; y: number }` | Arrow head (relative to the sheet) |
317
+ * | `color` | {@linkcode PluginAnnotateTextColor}` \| undefined` | Arrow color |
318
+ * | `size` | {@linkcode PluginAnnotateTextSize}` \| undefined` | Stroke weight preset |
319
+ */
320
+ export declare const PluginPresentationAnnotateArrowArgs: z.ZodObject<{
321
+ sheetId: z.ZodString;
322
+ start: z.ZodObject<{
323
+ x: z.ZodNumber;
324
+ y: z.ZodNumber;
325
+ }, z.core.$strip>;
326
+ end: z.ZodObject<{
327
+ x: z.ZodNumber;
328
+ y: z.ZodNumber;
329
+ }, z.core.$strip>;
330
+ color: z.ZodOptional<z.ZodEnum<{
331
+ black: "black";
332
+ grey: "grey";
333
+ "light-violet": "light-violet";
334
+ violet: "violet";
335
+ blue: "blue";
336
+ "light-blue": "light-blue";
337
+ yellow: "yellow";
338
+ orange: "orange";
339
+ green: "green";
340
+ "light-green": "light-green";
341
+ "light-red": "light-red";
342
+ red: "red";
343
+ white: "white";
344
+ }>>;
345
+ size: z.ZodOptional<z.ZodEnum<{
346
+ m: "m";
347
+ s: "s";
348
+ l: "l";
349
+ xl: "xl";
350
+ }>>;
351
+ }, z.core.$strip>;
352
+ export type PluginPresentationAnnotateArrowArgs = z.infer<typeof PluginPresentationAnnotateArrowArgs>;
353
+ /**
354
+ * Arguments for {@linkcode PluginPresentationAnnotateApi.note}.
355
+ *
356
+ * | Property | Type | Description |
357
+ * |---|---|---|
358
+ * | `sheetId` | `string` | The sheet to annotate |
359
+ * | `text` | `string` | The note text |
360
+ * | `position` | `{ x: number; y: number } \| undefined` | Where to place it (relative to the sheet) |
361
+ * | `color` | {@linkcode PluginAnnotateTextColor}` \| undefined` | Sticky fill color |
362
+ * | `size` | {@linkcode PluginAnnotateTextSize}` \| undefined` | Text size preset |
363
+ */
364
+ export declare const PluginPresentationAnnotateNoteArgs: z.ZodObject<{
365
+ sheetId: z.ZodString;
366
+ text: z.ZodString;
367
+ position: z.ZodOptional<z.ZodObject<{
368
+ x: z.ZodNumber;
369
+ y: z.ZodNumber;
370
+ }, z.core.$strip>>;
371
+ color: z.ZodOptional<z.ZodEnum<{
372
+ black: "black";
373
+ grey: "grey";
374
+ "light-violet": "light-violet";
375
+ violet: "violet";
376
+ blue: "blue";
377
+ "light-blue": "light-blue";
378
+ yellow: "yellow";
379
+ orange: "orange";
380
+ green: "green";
381
+ "light-green": "light-green";
382
+ "light-red": "light-red";
383
+ red: "red";
384
+ white: "white";
385
+ }>>;
386
+ size: z.ZodOptional<z.ZodEnum<{
387
+ m: "m";
388
+ s: "s";
389
+ l: "l";
390
+ xl: "xl";
391
+ }>>;
392
+ }, z.core.$strip>;
393
+ export type PluginPresentationAnnotateNoteArgs = z.infer<typeof PluginPresentationAnnotateNoteArgs>;
394
+ /**
395
+ * Arguments for {@linkcode PluginPresentationAnnotateApi.shape}.
396
+ *
397
+ * | Property | Type | Description |
398
+ * |---|---|---|
399
+ * | `sheetId` | `string` | The sheet to annotate |
400
+ * | `kind` | {@linkcode PluginAnnotateGeoKind} | The shape kind |
401
+ * | `bounds` | `{ x: number; y: number; w: number; h: number }` | Placement box (relative to the sheet; `w`/`h` positive) |
402
+ * | `color` | {@linkcode PluginAnnotateTextColor}` \| undefined` | Outline color |
403
+ * | `fill` | {@linkcode PluginAnnotateFill}` \| undefined` | Fill style |
404
+ */
405
+ export declare const PluginPresentationAnnotateShapeArgs: z.ZodObject<{
406
+ sheetId: z.ZodString;
407
+ kind: z.ZodEnum<{
408
+ rectangle: "rectangle";
409
+ ellipse: "ellipse";
410
+ triangle: "triangle";
411
+ diamond: "diamond";
412
+ hexagon: "hexagon";
413
+ oval: "oval";
414
+ rhombus: "rhombus";
415
+ star: "star";
416
+ cloud: "cloud";
417
+ heart: "heart";
418
+ "x-box": "x-box";
419
+ "check-box": "check-box";
420
+ "arrow-left": "arrow-left";
421
+ "arrow-up": "arrow-up";
422
+ "arrow-right": "arrow-right";
423
+ "arrow-down": "arrow-down";
424
+ }>;
425
+ bounds: z.ZodObject<{
426
+ x: z.ZodNumber;
427
+ y: z.ZodNumber;
428
+ w: z.ZodNumber;
429
+ h: z.ZodNumber;
430
+ }, z.core.$strip>;
431
+ color: z.ZodOptional<z.ZodEnum<{
432
+ black: "black";
433
+ grey: "grey";
434
+ "light-violet": "light-violet";
435
+ violet: "violet";
436
+ blue: "blue";
437
+ "light-blue": "light-blue";
438
+ yellow: "yellow";
439
+ orange: "orange";
440
+ green: "green";
441
+ "light-green": "light-green";
442
+ "light-red": "light-red";
443
+ red: "red";
444
+ white: "white";
445
+ }>>;
446
+ fill: z.ZodOptional<z.ZodEnum<{
447
+ pattern: "pattern";
448
+ solid: "solid";
449
+ none: "none";
450
+ semi: "semi";
451
+ }>>;
452
+ }, z.core.$strip>;
453
+ export type PluginPresentationAnnotateShapeArgs = z.infer<typeof PluginPresentationAnnotateShapeArgs>;
454
+ /**
455
+ * Result of {@linkcode PluginPresentationAnnotateApi.arrow},
456
+ * {@linkcode PluginPresentationAnnotateApi.note}, and
457
+ * {@linkcode PluginPresentationAnnotateApi.shape}.
458
+ *
459
+ * | Property | Type | Description |
460
+ * |---|---|---|
461
+ * | `shapeId` | `string` | Id of the created canvas shape |
462
+ */
463
+ export declare const PluginPresentationAnnotateResult: z.ZodObject<{
464
+ shapeId: z.ZodString;
465
+ }, z.core.$strip>;
466
+ export type PluginPresentationAnnotateResult = z.infer<typeof PluginPresentationAnnotateResult>;
467
+ //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;aACa,IAAI,CAClB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ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;;;;;;;;;;;;;;;;;iBAM9C,CAAA;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM7C,CAAA;AACF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,kCAAkC,CAC1C,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW9C,CAAA;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC;;iBAE3C,CAAA;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,gCAAgC,CACxC,CAAA"}
@@ -1,22 +1,91 @@
1
1
  import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../types";
3
3
  /**
4
- * Presentation diagrams — place diagram images onto sheets.
4
+ * Presentation diagrams — generate program diagrams from the model, and place
5
+ * diagram images onto sheets.
5
6
  *
6
- * {@linkcode PluginPresentationDiagramsApi.place} drops diagram images (by
7
- * URL) onto a sheet and returns the created canvas shape ids (requires Present
8
- * mode to be open). Adjacency data itself is read and computed via
7
+ * {@linkcode PluginPresentationDiagramsApi.generateProgram} runs the Present-mode
8
+ * **Program** action: it reads the project's spaces and departments and creates
9
+ * new layout sheets holding the generated diagram graphics.
10
+ * {@linkcode PluginPresentationDiagramsApi.generateSite} runs the site-diagram
11
+ * flow (location / streetview / climate sheets from the map terrain).
12
+ * {@linkcode PluginPresentationDiagramsApi.place} drops ready diagram images (by
13
+ * URL) onto an existing sheet and returns the created canvas shape ids. All
14
+ * require Present mode to be open. Adjacency data itself is read and computed via
9
15
  * `program.adjacency` (see {@linkcode PluginProgramAdjacencyApi}).
10
16
  *
11
- * A future one-step spec-based `place` which would render a diagram spec
12
- * and place it in a single call — awaits a public generator from the
13
- * documentation engine; until that generator exists, `place` takes ready
14
- * image `urls` (we do not ship a spec-based `place` that would only throw).
17
+ * There is intentionally no `generateAdjacency`: the host's adjacency generator
18
+ * runs its sheet-creation task fire-and-forget internally, so a single call
19
+ * cannot return the sheets it creates. Use the Present-mode Adjacency menu for
20
+ * those, then `place` a pre-rendered adjacency image if you need it via the API.
15
21
  *
16
22
  * Accessed via `snaptrude.presentation.diagrams`.
17
23
  */
18
24
  export declare abstract class PluginPresentationDiagramsApi {
19
25
  constructor();
26
+ /**
27
+ * Generate the program (space + department) diagrams for the current model,
28
+ * creating new layout sheets.
29
+ *
30
+ * Runs the same auto-generation as the Present-mode **Program** action: reads
31
+ * the project's spaces and departments, lays them out to scale, and creates one
32
+ * or more new sheets holding the generated diagram graphics. Unlike
33
+ * {@linkcode PluginPresentationDiagramsApi.place} (which pastes ready image URLs
34
+ * onto an existing sheet), this generates the graphics from the model and
35
+ * creates its own sheets. Requires Present mode to be open.
36
+ *
37
+ * @returns A {@linkcode PluginPresentationDiagramsGenerateResult} with the
38
+ * `sheetIds` of the sheets created.
39
+ * @throws If Present mode is not open, or the model has no spaces/departments to
40
+ * generate from.
41
+ *
42
+ * @examplePrompt Generate the program diagrams for this project
43
+ * @examplePrompt Auto-generate the space and department diagram sheets
44
+ * @examplePrompt Create the program layout sheets from the model
45
+ *
46
+ * # Example
47
+ * ```ts
48
+ * const { sheetIds } = await snaptrude.presentation.diagrams.generateProgram()
49
+ * ```
50
+ */
51
+ abstract generateProgram(): PluginApiReturn<PluginPresentationDiagramsGenerateResult>;
52
+ /**
53
+ * Generate the site diagrams (location, streetview, climate) for the
54
+ * current model, creating new layout sheets.
55
+ *
56
+ * Runs the same auto-generation as the Present-mode site-diagram flow:
57
+ * each requested type renders its diagram from the project's map terrain
58
+ * and creates a new sheet holding it. `options.types` selects which
59
+ * diagrams to generate (default: all three). Generation is tracked
60
+ * per-proposal — a type whose diagram already exists for the active
61
+ * proposal is **skipped, not duplicated** (the same semantics as the
62
+ * mount-time flow; existing site-diagram sheets are never replaced), so
63
+ * `sheetIds` contains only the sheets created by this call and can be
64
+ * empty when everything already exists. Requires Present mode to be open
65
+ * and the project to have a map terrain to generate from.
66
+ *
67
+ * @param options - Optional `types` — which site diagrams to generate
68
+ * (default: `["location", "streetview", "climate"]`).
69
+ * @returns A {@linkcode PluginPresentationDiagramsGenerateResult} with the
70
+ * `sheetIds` of the sheets created by this call (empty when all requested
71
+ * types were already generated).
72
+ * @throws If Present mode is not open or the project has no map terrain to
73
+ * generate from.
74
+ *
75
+ * @examplePrompt Generate the site diagrams for this project
76
+ * @examplePrompt Create the location, streetview and climate sheets
77
+ * @examplePrompt Add a climate diagram sheet to the presentation
78
+ *
79
+ * # Example
80
+ * ```ts
81
+ * const { sheetIds } = await snaptrude.presentation.diagrams.generateSite({
82
+ * types: ["location", "climate"],
83
+ * })
84
+ * ```
85
+ */
86
+ abstract generateSite(options?: {
87
+ types?: PluginPresentationSiteDiagramType[];
88
+ }): PluginApiReturn<PluginPresentationDiagramsGenerateResult>;
20
89
  /**
21
90
  * Place diagram images onto a sheet.
22
91
  *
@@ -78,4 +147,38 @@ export declare const PluginPresentationDiagramsPlaceResult: z.ZodObject<{
78
147
  shapeIds: z.ZodArray<z.ZodString>;
79
148
  }, z.core.$strip>;
80
149
  export type PluginPresentationDiagramsPlaceResult = z.infer<typeof PluginPresentationDiagramsPlaceResult>;
150
+ /** A site diagram type — the three diagrams of the Present-mode site flow. */
151
+ export declare const PluginPresentationSiteDiagramType: z.ZodEnum<{
152
+ location: "location";
153
+ streetview: "streetview";
154
+ climate: "climate";
155
+ }>;
156
+ export type PluginPresentationSiteDiagramType = z.infer<typeof PluginPresentationSiteDiagramType>;
157
+ /**
158
+ * Arguments for {@linkcode PluginPresentationDiagramsApi.generateSite}.
159
+ *
160
+ * | Property | Type | Description |
161
+ * |---|---|---|
162
+ * | `types` | {@linkcode PluginPresentationSiteDiagramType}`[] \| undefined` | Which site diagrams to generate (default: all three) |
163
+ */
164
+ export declare const PluginPresentationDiagramsGenerateSiteArgs: z.ZodObject<{
165
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
166
+ location: "location";
167
+ streetview: "streetview";
168
+ climate: "climate";
169
+ }>>>;
170
+ }, z.core.$strip>;
171
+ export type PluginPresentationDiagramsGenerateSiteArgs = z.infer<typeof PluginPresentationDiagramsGenerateSiteArgs>;
172
+ /**
173
+ * Result of {@linkcode PluginPresentationDiagramsApi.generateProgram} and
174
+ * {@linkcode PluginPresentationDiagramsApi.generateSite}.
175
+ *
176
+ * | Property | Type | Description |
177
+ * |---|---|---|
178
+ * | `sheetIds` | `string[]` | Ids of the sheets created by the generator |
179
+ */
180
+ export declare const PluginPresentationDiagramsGenerateResult: z.ZodObject<{
181
+ sheetIds: z.ZodArray<z.ZodString>;
182
+ }, z.core.$strip>;
183
+ export type PluginPresentationDiagramsGenerateResult = z.infer<typeof PluginPresentationDiagramsGenerateResult>;
81
184
  //# sourceMappingURL=diagrams.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagrams.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/diagrams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,6BAA6B;;IAGjD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;aACa,KAAK,CACnB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAChD,eAAe,CAAC,qCAAqC,CAAC;CA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