@snaptrude/plugin-core 0.3.0 → 0.6.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 (302) hide show
  1. package/AGENTS.md +130 -48
  2. package/CHANGELOG.md +163 -0
  3. package/api-manifest.full.json +5600 -0
  4. package/api-manifest.json +5502 -0
  5. package/dist/api/analysis/heatmaps.d.ts +234 -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 +44 -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/sunlightHours.d.ts +208 -0
  14. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  15. package/dist/api/analysis/sunpath.d.ts +80 -0
  16. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  17. package/dist/api/core/buildings.d.ts +427 -0
  18. package/dist/api/core/buildings.d.ts.map +1 -0
  19. package/dist/api/core/comment/index.d.ts +230 -0
  20. package/dist/api/core/comment/index.d.ts.map +1 -0
  21. package/dist/api/core/geom/create/index.d.ts +247 -0
  22. package/dist/api/core/geom/create/index.d.ts.map +1 -0
  23. package/dist/api/core/geom/delete/index.d.ts +72 -0
  24. package/dist/api/core/geom/delete/index.d.ts.map +1 -0
  25. package/dist/api/core/geom/index.d.ts +24 -23
  26. package/dist/api/core/geom/index.d.ts.map +1 -1
  27. package/dist/api/core/geom/query/arc.d.ts +169 -0
  28. package/dist/api/core/geom/query/arc.d.ts.map +1 -0
  29. package/dist/api/core/geom/query/brep.d.ts +402 -0
  30. package/dist/api/core/geom/query/brep.d.ts.map +1 -0
  31. package/dist/api/core/geom/query/circle.d.ts +378 -0
  32. package/dist/api/core/geom/query/circle.d.ts.map +1 -0
  33. package/dist/api/core/geom/query/contour.d.ts +450 -0
  34. package/dist/api/core/geom/query/contour.d.ts.map +1 -0
  35. package/dist/api/core/geom/query/curve.d.ts +918 -0
  36. package/dist/api/core/geom/query/curve.d.ts.map +1 -0
  37. package/dist/api/core/geom/query/edge.d.ts +128 -0
  38. package/dist/api/core/geom/query/edge.d.ts.map +1 -0
  39. package/dist/api/core/geom/query/face.d.ts +363 -0
  40. package/dist/api/core/geom/query/face.d.ts.map +1 -0
  41. package/dist/api/core/geom/query/halfedge.d.ts +206 -0
  42. package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
  43. package/dist/api/core/geom/query/index.d.ts +61 -0
  44. package/dist/api/core/geom/query/index.d.ts.map +1 -0
  45. package/dist/api/core/geom/query/profile.d.ts +410 -0
  46. package/dist/api/core/geom/query/profile.d.ts.map +1 -0
  47. package/dist/api/core/geom/query/vertex.d.ts +187 -0
  48. package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
  49. package/dist/api/core/geom/update/contour.d.ts +272 -0
  50. package/dist/api/core/geom/update/contour.d.ts.map +1 -0
  51. package/dist/api/core/geom/update/curve.d.ts +180 -0
  52. package/dist/api/core/geom/update/curve.d.ts.map +1 -0
  53. package/dist/api/core/geom/update/index.d.ts +27 -0
  54. package/dist/api/core/geom/update/index.d.ts.map +1 -0
  55. package/dist/api/core/geom/update/profile.d.ts +329 -0
  56. package/dist/api/core/geom/update/profile.d.ts.map +1 -0
  57. package/dist/api/core/groups.d.ts +485 -0
  58. package/dist/api/core/groups.d.ts.map +1 -0
  59. package/dist/api/core/history/index.d.ts +78 -0
  60. package/dist/api/core/history/index.d.ts.map +1 -0
  61. package/dist/api/core/index.d.ts +51 -1
  62. package/dist/api/core/index.d.ts.map +1 -1
  63. package/dist/api/core/io/import/index.d.ts +392 -0
  64. package/dist/api/core/io/import/index.d.ts.map +1 -0
  65. package/dist/api/core/io/index.d.ts +35 -0
  66. package/dist/api/core/io/index.d.ts.map +1 -0
  67. package/dist/api/core/io/job/index.d.ts +139 -0
  68. package/dist/api/core/io/job/index.d.ts.map +1 -0
  69. package/dist/api/core/io/query/index.d.ts +74 -0
  70. package/dist/api/core/io/query/index.d.ts.map +1 -0
  71. package/dist/api/core/io/terrain/index.d.ts +206 -0
  72. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  73. package/dist/api/core/io/underlay/index.d.ts +286 -0
  74. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  75. package/dist/api/core/layers.d.ts +402 -0
  76. package/dist/api/core/layers.d.ts.map +1 -0
  77. package/dist/api/core/math/quat.d.ts +111 -128
  78. package/dist/api/core/math/quat.d.ts.map +1 -1
  79. package/dist/api/core/math/vec3.d.ts +120 -102
  80. package/dist/api/core/math/vec3.d.ts.map +1 -1
  81. package/dist/api/core/project/index.d.ts +399 -0
  82. package/dist/api/core/project/index.d.ts.map +1 -0
  83. package/dist/api/core/tags.d.ts +755 -0
  84. package/dist/api/core/tags.d.ts.map +1 -0
  85. package/dist/api/core/units/index.d.ts +175 -0
  86. package/dist/api/core/units/index.d.ts.map +1 -0
  87. package/dist/api/core/zoom/index.d.ts +45 -0
  88. package/dist/api/core/zoom/index.d.ts.map +1 -0
  89. package/dist/api/design/boolean/index.d.ts +168 -0
  90. package/dist/api/design/boolean/index.d.ts.map +1 -0
  91. package/dist/api/design/create/index.d.ts +837 -0
  92. package/dist/api/design/create/index.d.ts.map +1 -0
  93. package/dist/api/design/delete/index.d.ts +63 -0
  94. package/dist/api/design/delete/index.d.ts.map +1 -0
  95. package/dist/api/design/doors/index.d.ts +268 -0
  96. package/dist/api/design/doors/index.d.ts.map +1 -0
  97. package/dist/api/design/edit/index.d.ts +49 -0
  98. package/dist/api/design/edit/index.d.ts.map +1 -0
  99. package/dist/api/design/erase/index.d.ts +160 -0
  100. package/dist/api/design/erase/index.d.ts.map +1 -0
  101. package/dist/api/design/furniture/index.d.ts +123 -0
  102. package/dist/api/design/furniture/index.d.ts.map +1 -0
  103. package/dist/api/design/index.d.ts +153 -0
  104. package/dist/api/design/index.d.ts.map +1 -0
  105. package/dist/api/design/lock.d.ts +41 -0
  106. package/dist/api/design/lock.d.ts.map +1 -0
  107. package/dist/api/design/materials/index.d.ts +297 -0
  108. package/dist/api/design/materials/index.d.ts.map +1 -0
  109. package/dist/api/design/query/geometry/index.d.ts +140 -0
  110. package/dist/api/design/query/geometry/index.d.ts.map +1 -0
  111. package/dist/api/design/query/index.d.ts +1011 -0
  112. package/dist/api/design/query/index.d.ts.map +1 -0
  113. package/dist/api/design/query/spaces.d.ts +221 -0
  114. package/dist/api/design/query/spaces.d.ts.map +1 -0
  115. package/dist/api/design/selection/index.d.ts +282 -0
  116. package/dist/api/design/selection/index.d.ts.map +1 -0
  117. package/dist/api/design/shared.d.ts +38 -0
  118. package/dist/api/design/shared.d.ts.map +1 -0
  119. package/dist/api/design/transform/index.d.ts +87 -0
  120. package/dist/api/design/transform/index.d.ts.map +1 -0
  121. package/dist/api/design/update/index.d.ts +178 -0
  122. package/dist/api/design/update/index.d.ts.map +1 -0
  123. package/dist/api/design/windows/index.d.ts +189 -0
  124. package/dist/api/design/windows/index.d.ts.map +1 -0
  125. package/dist/api/entity/buildableEnvelope.d.ts +261 -0
  126. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  127. package/dist/api/entity/department.d.ts +0 -98
  128. package/dist/api/entity/department.d.ts.map +1 -1
  129. package/dist/api/entity/index.d.ts +9 -9
  130. package/dist/api/entity/index.d.ts.map +1 -1
  131. package/dist/api/entity/referenceLine.d.ts +49 -106
  132. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  133. package/dist/api/entity/space.d.ts +484 -251
  134. package/dist/api/entity/space.d.ts.map +1 -1
  135. package/dist/api/entity/story.d.ts +49 -39
  136. package/dist/api/entity/story.d.ts.map +1 -1
  137. package/dist/api/index.d.ts +22 -12
  138. package/dist/api/index.d.ts.map +1 -1
  139. package/dist/api/presentation/aiInspiration.d.ts +440 -0
  140. package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
  141. package/dist/api/presentation/diagrams.d.ts +81 -0
  142. package/dist/api/presentation/diagrams.d.ts.map +1 -0
  143. package/dist/api/presentation/import.d.ts +113 -0
  144. package/dist/api/presentation/import.d.ts.map +1 -0
  145. package/dist/api/presentation/index.d.ts +46 -0
  146. package/dist/api/presentation/index.d.ts.map +1 -0
  147. package/dist/api/presentation/sheets.d.ts +176 -0
  148. package/dist/api/presentation/sheets.d.ts.map +1 -0
  149. package/dist/api/presentation/views.d.ts +296 -0
  150. package/dist/api/presentation/views.d.ts.map +1 -0
  151. package/dist/api/program/adjacency.d.ts +155 -0
  152. package/dist/api/program/adjacency.d.ts.map +1 -0
  153. package/dist/api/program/areas.d.ts +360 -0
  154. package/dist/api/program/areas.d.ts.map +1 -0
  155. package/dist/api/program/classification.d.ts +135 -0
  156. package/dist/api/program/classification.d.ts.map +1 -0
  157. package/dist/api/program/cores.d.ts +174 -0
  158. package/dist/api/program/cores.d.ts.map +1 -0
  159. package/dist/api/program/departments.d.ts +431 -0
  160. package/dist/api/program/departments.d.ts.map +1 -0
  161. package/dist/api/program/index.d.ts +69 -0
  162. package/dist/api/program/index.d.ts.map +1 -0
  163. package/dist/api/program/layout.d.ts +63 -0
  164. package/dist/api/program/layout.d.ts.map +1 -0
  165. package/dist/api/program/metrics.d.ts +108 -0
  166. package/dist/api/program/metrics.d.ts.map +1 -0
  167. package/dist/api/program/site.d.ts +451 -0
  168. package/dist/api/program/site.d.ts.map +1 -0
  169. package/dist/api/program/spreadsheet.d.ts +2041 -0
  170. package/dist/api/program/spreadsheet.d.ts.map +1 -0
  171. package/dist/handles.d.ts +171 -0
  172. package/dist/handles.d.ts.map +1 -0
  173. package/dist/host-utils.d.ts +7 -5
  174. package/dist/host-utils.d.ts.map +1 -1
  175. package/dist/index.cjs +4344 -899
  176. package/dist/index.cjs.map +1 -1
  177. package/dist/index.d.ts +1 -0
  178. package/dist/index.d.ts.map +1 -1
  179. package/dist/index.js +3682 -865
  180. package/dist/index.js.map +1 -1
  181. package/package.json +6 -2
  182. package/scripts/generate-manifest.mjs +193 -0
  183. package/scripts/generate-manifest.test.mjs +215 -0
  184. package/src/api/analysis/heatmaps.ts +256 -0
  185. package/src/api/analysis/illuminance.ts +155 -0
  186. package/src/api/analysis/index.ts +46 -0
  187. package/src/api/analysis/shadows.ts +183 -0
  188. package/src/api/analysis/sunlightHours.ts +211 -0
  189. package/src/api/analysis/sunpath.ts +83 -0
  190. package/src/api/core/buildings.ts +485 -0
  191. package/src/api/core/comment/index.ts +258 -0
  192. package/src/api/core/geom/create/index.ts +293 -0
  193. package/src/api/core/geom/delete/index.ts +78 -0
  194. package/src/api/core/geom/index.ts +24 -23
  195. package/src/api/core/geom/query/arc.ts +169 -0
  196. package/src/api/core/geom/query/brep.ts +444 -0
  197. package/src/api/core/geom/query/circle.ts +404 -0
  198. package/src/api/core/geom/query/contour.ts +540 -0
  199. package/src/api/core/geom/query/curve.ts +1078 -0
  200. package/src/api/core/geom/query/edge.ts +130 -0
  201. package/src/api/core/geom/query/face.ts +403 -0
  202. package/src/api/core/geom/query/halfedge.ts +210 -0
  203. package/src/api/core/geom/query/index.ts +63 -0
  204. package/src/api/core/geom/query/profile.ts +473 -0
  205. package/src/api/core/geom/query/vertex.ts +205 -0
  206. package/src/api/core/geom/update/contour.ts +315 -0
  207. package/src/api/core/geom/update/curve.ts +209 -0
  208. package/src/api/core/geom/update/index.ts +29 -0
  209. package/src/api/core/geom/update/profile.ts +377 -0
  210. package/src/api/core/groups.ts +521 -0
  211. package/src/api/core/history/index.ts +84 -0
  212. package/src/api/core/index.ts +51 -1
  213. package/src/api/core/io/import/index.ts +432 -0
  214. package/src/api/core/io/index.ts +37 -0
  215. package/src/api/core/io/job/index.ts +140 -0
  216. package/src/api/core/io/query/index.ts +71 -0
  217. package/src/api/core/io/terrain/index.ts +214 -0
  218. package/src/api/core/io/underlay/index.ts +295 -0
  219. package/src/api/core/layers.ts +333 -0
  220. package/src/api/core/math/quat.ts +112 -235
  221. package/src/api/core/math/vec3.ts +124 -159
  222. package/src/api/core/project/index.ts +418 -0
  223. package/src/api/core/tags.ts +808 -0
  224. package/src/api/core/units/index.ts +164 -0
  225. package/src/api/core/zoom/index.ts +47 -0
  226. package/src/api/design/boolean/index.ts +179 -0
  227. package/src/api/design/create/index.ts +895 -0
  228. package/src/api/design/delete/index.ts +67 -0
  229. package/src/api/design/doors/index.ts +285 -0
  230. package/src/api/design/edit/index.ts +54 -0
  231. package/src/api/design/erase/index.ts +151 -0
  232. package/src/api/design/furniture/index.ts +130 -0
  233. package/src/api/design/index.ts +162 -0
  234. package/src/api/design/lock.ts +42 -0
  235. package/src/api/design/materials/index.ts +301 -0
  236. package/src/api/design/query/geometry/index.ts +166 -0
  237. package/src/api/design/query/index.ts +937 -0
  238. package/src/api/design/query/spaces.ts +132 -0
  239. package/src/api/design/selection/index.ts +273 -0
  240. package/src/api/design/shared.ts +40 -0
  241. package/src/api/design/transform/index.ts +93 -0
  242. package/src/api/design/update/index.ts +117 -0
  243. package/src/api/design/windows/index.ts +207 -0
  244. package/src/api/entity/buildableEnvelope.ts +318 -0
  245. package/src/api/entity/department.ts +0 -113
  246. package/src/api/entity/index.ts +9 -9
  247. package/src/api/entity/referenceLine.ts +50 -38
  248. package/src/api/entity/space.ts +285 -226
  249. package/src/api/entity/story.ts +53 -42
  250. package/src/api/index.ts +22 -12
  251. package/src/api/presentation/aiInspiration.ts +362 -0
  252. package/src/api/presentation/diagrams.ts +84 -0
  253. package/src/api/presentation/import.ts +112 -0
  254. package/src/api/presentation/index.ts +48 -0
  255. package/src/api/presentation/sheets.ts +198 -0
  256. package/src/api/presentation/views.ts +303 -0
  257. package/src/api/program/adjacency.ts +164 -0
  258. package/src/api/program/areas.ts +335 -0
  259. package/src/api/program/classification.ts +138 -0
  260. package/src/api/program/cores.ts +171 -0
  261. package/src/api/program/departments.ts +465 -0
  262. package/src/api/program/index.ts +71 -0
  263. package/src/api/program/layout.ts +68 -0
  264. package/src/api/program/metrics.ts +120 -0
  265. package/src/api/program/site.ts +419 -0
  266. package/src/api/program/spreadsheet.ts +2075 -0
  267. package/src/handles.ts +194 -0
  268. package/src/host-utils.ts +10 -6
  269. package/src/index.ts +1 -0
  270. package/dist/api/core/geom/arc.d.ts +0 -81
  271. package/dist/api/core/geom/arc.d.ts.map +0 -1
  272. package/dist/api/core/geom/curve.d.ts +0 -70
  273. package/dist/api/core/geom/curve.d.ts.map +0 -1
  274. package/dist/api/core/geom/line.d.ts +0 -56
  275. package/dist/api/core/geom/line.d.ts.map +0 -1
  276. package/dist/api/core/geom/profile.d.ts +0 -121
  277. package/dist/api/core/geom/profile.d.ts.map +0 -1
  278. package/dist/api/tools/copy.d.ts +0 -59
  279. package/dist/api/tools/copy.d.ts.map +0 -1
  280. package/dist/api/tools/index.d.ts +0 -33
  281. package/dist/api/tools/index.d.ts.map +0 -1
  282. package/dist/api/tools/material.d.ts +0 -51
  283. package/dist/api/tools/material.d.ts.map +0 -1
  284. package/dist/api/tools/offset.d.ts +0 -43
  285. package/dist/api/tools/offset.d.ts.map +0 -1
  286. package/dist/api/tools/selection.d.ts +0 -48
  287. package/dist/api/tools/selection.d.ts.map +0 -1
  288. package/dist/api/tools/transform.d.ts +0 -114
  289. package/dist/api/tools/transform.d.ts.map +0 -1
  290. package/dist/api/units/index.d.ts +0 -163
  291. package/dist/api/units/index.d.ts.map +0 -1
  292. package/src/api/core/geom/arc.ts +0 -70
  293. package/src/api/core/geom/curve.ts +0 -41
  294. package/src/api/core/geom/line.ts +0 -53
  295. package/src/api/core/geom/profile.ts +0 -94
  296. package/src/api/tools/copy.ts +0 -55
  297. package/src/api/tools/index.ts +0 -39
  298. package/src/api/tools/material.ts +0 -49
  299. package/src/api/tools/offset.ts +0 -43
  300. package/src/api/tools/selection.ts +0 -51
  301. package/src/api/tools/transform.ts +0 -117
  302. package/src/api/units/index.ts +0 -163
@@ -0,0 +1,440 @@
1
+ import * as z from "zod";
2
+ import type { PluginApiReturn } from "../../types";
3
+ declare const JsonPrimitive: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
4
+ type JsonValue = z.infer<typeof JsonPrimitive> | JsonValue[] | {
5
+ [key: string]: JsonValue;
6
+ };
7
+ declare const JsonValue: z.ZodType<JsonValue>;
8
+ export declare const PluginAIInspirationOutputKind: z.ZodEnum<{
9
+ image: "image";
10
+ source: "source";
11
+ video: "video";
12
+ }>;
13
+ export type PluginAIInspirationOutputKind = z.infer<typeof PluginAIInspirationOutputKind>;
14
+ export declare const PluginAIInspirationModelOutput: z.ZodEnum<{
15
+ image: "image";
16
+ video: "video";
17
+ }>;
18
+ export type PluginAIInspirationModelOutput = z.infer<typeof PluginAIInspirationModelOutput>;
19
+ export declare const PluginAIInspirationShapeKind: z.ZodEnum<{
20
+ image: "image";
21
+ view: "view";
22
+ video: "video";
23
+ }>;
24
+ export type PluginAIInspirationShapeKind = z.infer<typeof PluginAIInspirationShapeKind>;
25
+ export declare const PluginAIInspirationVideoMode: z.ZodEnum<{
26
+ animate: "animate";
27
+ references: "references";
28
+ keyframes: "keyframes";
29
+ }>;
30
+ export type PluginAIInspirationVideoMode = z.infer<typeof PluginAIInspirationVideoMode>;
31
+ export declare const PluginAIInspirationVideoMotion: z.ZodEnum<{
32
+ auto: "auto";
33
+ "slow-dolly": "slow-dolly";
34
+ "subtle-orbit": "subtle-orbit";
35
+ reveal: "reveal";
36
+ }>;
37
+ export type PluginAIInspirationVideoMotion = z.infer<typeof PluginAIInspirationVideoMotion>;
38
+ export declare const PluginAIInspirationVideoDuration: z.ZodEnum<{
39
+ "4s": "4s";
40
+ "6s": "6s";
41
+ "8s": "8s";
42
+ }>;
43
+ export type PluginAIInspirationVideoDuration = z.infer<typeof PluginAIInspirationVideoDuration>;
44
+ export declare const PluginAIInspirationRegionHint: z.ZodObject<{
45
+ x: z.ZodNumber;
46
+ y: z.ZodNumber;
47
+ w: z.ZodNumber;
48
+ h: z.ZodNumber;
49
+ }, z.core.$strip>;
50
+ export type PluginAIInspirationRegionHint = z.infer<typeof PluginAIInspirationRegionHint>;
51
+ export declare const PluginAIInspirationPoint: z.ZodObject<{
52
+ x: z.ZodNumber;
53
+ y: z.ZodNumber;
54
+ }, z.core.$strip>;
55
+ export type PluginAIInspirationPoint = z.infer<typeof PluginAIInspirationPoint>;
56
+ export declare const PluginAIInspirationTextAnnotation: z.ZodObject<{
57
+ text: z.ZodString;
58
+ x: z.ZodOptional<z.ZodNumber>;
59
+ y: z.ZodOptional<z.ZodNumber>;
60
+ }, z.core.$strip>;
61
+ export type PluginAIInspirationTextAnnotation = z.infer<typeof PluginAIInspirationTextAnnotation>;
62
+ export declare const PluginAIInspirationSketchGuidance: z.ZodObject<{
63
+ visualShapeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
64
+ textAnnotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
65
+ text: z.ZodString;
66
+ x: z.ZodOptional<z.ZodNumber>;
67
+ y: z.ZodOptional<z.ZodNumber>;
68
+ }, z.core.$strip>>>;
69
+ }, z.core.$strip>;
70
+ export type PluginAIInspirationSketchGuidance = z.infer<typeof PluginAIInspirationSketchGuidance>;
71
+ export declare const PluginAIInspirationSiteOptions: z.ZodObject<{
72
+ includeSatellite: z.ZodOptional<z.ZodBoolean>;
73
+ includeStreetView: z.ZodOptional<z.ZodBoolean>;
74
+ includeAerial: z.ZodOptional<z.ZodBoolean>;
75
+ aerialBearing: z.ZodOptional<z.ZodNumber>;
76
+ aerialPitch: z.ZodOptional<z.ZodNumber>;
77
+ selectedDiagramIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ location: z.ZodOptional<z.ZodObject<{
79
+ lat: z.ZodNumber;
80
+ lng: z.ZodNumber;
81
+ }, z.core.$strip>>;
82
+ }, z.core.$strip>;
83
+ export type PluginAIInspirationSiteOptions = z.infer<typeof PluginAIInspirationSiteOptions>;
84
+ export declare const PluginAIInspirationAppliedPreset: z.ZodObject<{
85
+ source: z.ZodEnum<{
86
+ curated: "curated";
87
+ user: "user";
88
+ }>;
89
+ presetId: z.ZodString;
90
+ name: z.ZodString;
91
+ savedPresetKind: z.ZodOptional<z.ZodEnum<{
92
+ style: "style";
93
+ prompt: "prompt";
94
+ }>>;
95
+ stylePrompt: z.ZodOptional<z.ZodString>;
96
+ modelId: z.ZodOptional<z.ZodString>;
97
+ referenceImages: z.ZodOptional<z.ZodArray<z.ZodObject<{
98
+ url: z.ZodString;
99
+ label: z.ZodOptional<z.ZodString>;
100
+ weight: z.ZodOptional<z.ZodNumber>;
101
+ }, z.core.$strip>>>;
102
+ siteDefaults: z.ZodOptional<z.ZodObject<{
103
+ includeSatellite: z.ZodOptional<z.ZodBoolean>;
104
+ includeStreetView: z.ZodOptional<z.ZodBoolean>;
105
+ includeAerial: z.ZodOptional<z.ZodBoolean>;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strip>;
108
+ export type PluginAIInspirationAppliedPreset = z.infer<typeof PluginAIInspirationAppliedPreset>;
109
+ export declare const PluginAIInspirationVideoOptions: z.ZodObject<{
110
+ mode: z.ZodOptional<z.ZodEnum<{
111
+ animate: "animate";
112
+ references: "references";
113
+ keyframes: "keyframes";
114
+ }>>;
115
+ endFrameShapeId: z.ZodOptional<z.ZodString>;
116
+ motion: z.ZodOptional<z.ZodEnum<{
117
+ auto: "auto";
118
+ "slow-dolly": "slow-dolly";
119
+ "subtle-orbit": "subtle-orbit";
120
+ reveal: "reveal";
121
+ }>>;
122
+ duration: z.ZodOptional<z.ZodEnum<{
123
+ "4s": "4s";
124
+ "6s": "6s";
125
+ "8s": "8s";
126
+ }>>;
127
+ }, z.core.$strip>;
128
+ export type PluginAIInspirationVideoOptions = z.infer<typeof PluginAIInspirationVideoOptions>;
129
+ export declare const PluginAIInspirationModel: z.ZodObject<{
130
+ id: z.ZodString;
131
+ label: z.ZodString;
132
+ supportsMultiImage: z.ZodBoolean;
133
+ output: z.ZodEnum<{
134
+ image: "image";
135
+ video: "video";
136
+ }>;
137
+ isDefault: z.ZodOptional<z.ZodBoolean>;
138
+ }, z.core.$strip>;
139
+ export type PluginAIInspirationModel = z.infer<typeof PluginAIInspirationModel>;
140
+ export declare const PluginAIInspirationListModelsResult: z.ZodObject<{
141
+ defaultModelId: z.ZodString;
142
+ models: z.ZodArray<z.ZodObject<{
143
+ id: z.ZodString;
144
+ label: z.ZodString;
145
+ supportsMultiImage: z.ZodBoolean;
146
+ output: z.ZodEnum<{
147
+ image: "image";
148
+ video: "video";
149
+ }>;
150
+ isDefault: z.ZodOptional<z.ZodBoolean>;
151
+ }, z.core.$strip>>;
152
+ }, z.core.$strip>;
153
+ export type PluginAIInspirationListModelsResult = z.infer<typeof PluginAIInspirationListModelsResult>;
154
+ export declare const PluginAIInspirationShapeRef: z.ZodObject<{
155
+ shapeId: z.ZodString;
156
+ assetId: z.ZodOptional<z.ZodString>;
157
+ kind: z.ZodEnum<{
158
+ image: "image";
159
+ view: "view";
160
+ video: "video";
161
+ }>;
162
+ name: z.ZodOptional<z.ZodString>;
163
+ width: z.ZodOptional<z.ZodNumber>;
164
+ height: z.ZodOptional<z.ZodNumber>;
165
+ outputType: z.ZodOptional<z.ZodEnum<{
166
+ image: "image";
167
+ source: "source";
168
+ video: "video";
169
+ }>>;
170
+ sourceUrl: z.ZodOptional<z.ZodString>;
171
+ }, z.core.$strip>;
172
+ export type PluginAIInspirationShapeRef = z.infer<typeof PluginAIInspirationShapeRef>;
173
+ export declare const PluginAIInspirationListSourcesArgs: z.ZodObject<{
174
+ includeGenerated: z.ZodOptional<z.ZodBoolean>;
175
+ includeSourceUrl: z.ZodOptional<z.ZodBoolean>;
176
+ }, z.core.$strip>;
177
+ export type PluginAIInspirationListSourcesArgs = z.infer<typeof PluginAIInspirationListSourcesArgs>;
178
+ export declare const PluginAIInspirationListSourcesResult: z.ZodObject<{
179
+ sources: z.ZodArray<z.ZodObject<{
180
+ shapeId: z.ZodString;
181
+ assetId: z.ZodOptional<z.ZodString>;
182
+ kind: z.ZodEnum<{
183
+ image: "image";
184
+ view: "view";
185
+ video: "video";
186
+ }>;
187
+ name: z.ZodOptional<z.ZodString>;
188
+ width: z.ZodOptional<z.ZodNumber>;
189
+ height: z.ZodOptional<z.ZodNumber>;
190
+ outputType: z.ZodOptional<z.ZodEnum<{
191
+ image: "image";
192
+ source: "source";
193
+ video: "video";
194
+ }>>;
195
+ sourceUrl: z.ZodOptional<z.ZodString>;
196
+ }, z.core.$strip>>;
197
+ }, z.core.$strip>;
198
+ export type PluginAIInspirationListSourcesResult = z.infer<typeof PluginAIInspirationListSourcesResult>;
199
+ export declare const PluginAIInspirationOutput: z.ZodObject<{
200
+ outputType: z.ZodEnum<{
201
+ image: "image";
202
+ video: "video";
203
+ }>;
204
+ shapeId: z.ZodString;
205
+ assetId: z.ZodString;
206
+ outputUrl: z.ZodOptional<z.ZodString>;
207
+ position: z.ZodOptional<z.ZodObject<{
208
+ x: z.ZodNumber;
209
+ y: z.ZodNumber;
210
+ }, z.core.$strip>>;
211
+ }, z.core.$strip>;
212
+ export type PluginAIInspirationOutput = z.infer<typeof PluginAIInspirationOutput>;
213
+ export declare const PluginAIInspirationDebugSummary: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
214
+ export type PluginAIInspirationDebugSummary = z.infer<typeof PluginAIInspirationDebugSummary>;
215
+ export declare const PluginAIInspirationRunMetadata: z.ZodObject<{
216
+ geometryFidelity: z.ZodOptional<z.ZodString>;
217
+ debugSummary: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
218
+ streetViewComposite: z.ZodOptional<z.ZodObject<{
219
+ used: z.ZodBoolean;
220
+ renderMode: z.ZodEnum<{
221
+ prompt_refs_default: "prompt_refs_default";
222
+ masked_composite_pilot: "masked_composite_pilot";
223
+ }>;
224
+ backgroundLabel: z.ZodOptional<z.ZodString>;
225
+ }, z.core.$strip>>;
226
+ }, z.core.$strip>;
227
+ export type PluginAIInspirationRunMetadata = z.infer<typeof PluginAIInspirationRunMetadata>;
228
+ export declare const PluginAIInspirationGenerateArgs: z.ZodObject<{
229
+ sourceShapeId: z.ZodString;
230
+ prompt: z.ZodString;
231
+ modelId: z.ZodOptional<z.ZodString>;
232
+ referenceShapeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
233
+ referenceStrength: z.ZodOptional<z.ZodEnum<{
234
+ low: "low";
235
+ medium: "medium";
236
+ high: "high";
237
+ }>>;
238
+ appliedPreset: z.ZodOptional<z.ZodObject<{
239
+ source: z.ZodEnum<{
240
+ curated: "curated";
241
+ user: "user";
242
+ }>;
243
+ presetId: z.ZodString;
244
+ name: z.ZodString;
245
+ savedPresetKind: z.ZodOptional<z.ZodEnum<{
246
+ style: "style";
247
+ prompt: "prompt";
248
+ }>>;
249
+ stylePrompt: z.ZodOptional<z.ZodString>;
250
+ modelId: z.ZodOptional<z.ZodString>;
251
+ referenceImages: z.ZodOptional<z.ZodArray<z.ZodObject<{
252
+ url: z.ZodString;
253
+ label: z.ZodOptional<z.ZodString>;
254
+ weight: z.ZodOptional<z.ZodNumber>;
255
+ }, z.core.$strip>>>;
256
+ siteDefaults: z.ZodOptional<z.ZodObject<{
257
+ includeSatellite: z.ZodOptional<z.ZodBoolean>;
258
+ includeStreetView: z.ZodOptional<z.ZodBoolean>;
259
+ includeAerial: z.ZodOptional<z.ZodBoolean>;
260
+ }, z.core.$strip>>;
261
+ }, z.core.$strip>>;
262
+ site: z.ZodOptional<z.ZodObject<{
263
+ includeSatellite: z.ZodOptional<z.ZodBoolean>;
264
+ includeStreetView: z.ZodOptional<z.ZodBoolean>;
265
+ includeAerial: z.ZodOptional<z.ZodBoolean>;
266
+ aerialBearing: z.ZodOptional<z.ZodNumber>;
267
+ aerialPitch: z.ZodOptional<z.ZodNumber>;
268
+ selectedDiagramIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
269
+ location: z.ZodOptional<z.ZodObject<{
270
+ lat: z.ZodNumber;
271
+ lng: z.ZodNumber;
272
+ }, z.core.$strip>>;
273
+ }, z.core.$strip>>;
274
+ regionHint: z.ZodOptional<z.ZodObject<{
275
+ x: z.ZodNumber;
276
+ y: z.ZodNumber;
277
+ w: z.ZodNumber;
278
+ h: z.ZodNumber;
279
+ }, z.core.$strip>>;
280
+ sketchGuidance: z.ZodOptional<z.ZodObject<{
281
+ visualShapeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
282
+ textAnnotations: z.ZodOptional<z.ZodArray<z.ZodObject<{
283
+ text: z.ZodString;
284
+ x: z.ZodOptional<z.ZodNumber>;
285
+ y: z.ZodOptional<z.ZodNumber>;
286
+ }, z.core.$strip>>>;
287
+ }, z.core.$strip>>;
288
+ video: z.ZodOptional<z.ZodObject<{
289
+ mode: z.ZodOptional<z.ZodEnum<{
290
+ animate: "animate";
291
+ references: "references";
292
+ keyframes: "keyframes";
293
+ }>>;
294
+ endFrameShapeId: z.ZodOptional<z.ZodString>;
295
+ motion: z.ZodOptional<z.ZodEnum<{
296
+ auto: "auto";
297
+ "slow-dolly": "slow-dolly";
298
+ "subtle-orbit": "subtle-orbit";
299
+ reveal: "reveal";
300
+ }>>;
301
+ duration: z.ZodOptional<z.ZodEnum<{
302
+ "4s": "4s";
303
+ "6s": "6s";
304
+ "8s": "8s";
305
+ }>>;
306
+ }, z.core.$strip>>;
307
+ }, z.core.$strip>;
308
+ export type PluginAIInspirationGenerateArgs = z.infer<typeof PluginAIInspirationGenerateArgs>;
309
+ export declare const PluginAIInspirationRunResult: z.ZodObject<{
310
+ outputs: z.ZodArray<z.ZodObject<{
311
+ outputType: z.ZodEnum<{
312
+ image: "image";
313
+ video: "video";
314
+ }>;
315
+ shapeId: z.ZodString;
316
+ assetId: z.ZodString;
317
+ outputUrl: z.ZodOptional<z.ZodString>;
318
+ position: z.ZodOptional<z.ZodObject<{
319
+ x: z.ZodNumber;
320
+ y: z.ZodNumber;
321
+ }, z.core.$strip>>;
322
+ }, z.core.$strip>>;
323
+ metadata: z.ZodOptional<z.ZodObject<{
324
+ geometryFidelity: z.ZodOptional<z.ZodString>;
325
+ debugSummary: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
326
+ streetViewComposite: z.ZodOptional<z.ZodObject<{
327
+ used: z.ZodBoolean;
328
+ renderMode: z.ZodEnum<{
329
+ prompt_refs_default: "prompt_refs_default";
330
+ masked_composite_pilot: "masked_composite_pilot";
331
+ }>;
332
+ backgroundLabel: z.ZodOptional<z.ZodString>;
333
+ }, z.core.$strip>>;
334
+ }, z.core.$strip>>;
335
+ }, z.core.$strip>;
336
+ export type PluginAIInspirationRunResult = z.infer<typeof PluginAIInspirationRunResult>;
337
+ export declare const PluginAIInspirationRefineArgs: z.ZodObject<{
338
+ sourceShapeId: z.ZodString;
339
+ upscaleFactor: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1.5>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
340
+ }, z.core.$strip>;
341
+ export type PluginAIInspirationRefineArgs = z.infer<typeof PluginAIInspirationRefineArgs>;
342
+ /**
343
+ * Present-mode AI Inspiration APIs.
344
+ *
345
+ * These APIs operate on Present canvas shape IDs and inherit the current user's
346
+ * AI quota. They create outputs on the Present canvas; pure backend generation
347
+ * without canvas output is intentionally out of scope.
348
+ *
349
+ * Accessed via `snaptrude.presentation.aiInspiration`.
350
+ */
351
+ export declare abstract class PluginPresentationAIInspirationApi {
352
+ constructor();
353
+ /**
354
+ * List AI Inspiration models that can be used for generation.
355
+ *
356
+ * @returns The default model ID and available model descriptors.
357
+ *
358
+ * @examplePrompt What AI inspiration models can I use?
359
+ * @examplePrompt List the available image and video models
360
+ * @examplePrompt Which generation model is the default?
361
+ *
362
+ * # Example
363
+ * ```ts
364
+ * const { defaultModelId, models } = await snaptrude.presentation.aiInspiration.listModels()
365
+ * const videoModels = models.filter((m) => m.output === "video")
366
+ * console.log(defaultModelId, videoModels.map((m) => m.id))
367
+ * ```
368
+ */
369
+ abstract listModels(): PluginApiReturn<PluginAIInspirationListModelsResult>;
370
+ /**
371
+ * List image/view/video sources on the current Present page.
372
+ *
373
+ * @param args - Optional filters. Set `includeGenerated` to include AI outputs.
374
+ * @returns Serializable shape references using Present canvas shape IDs.
375
+ *
376
+ * @examplePrompt List the images I can generate from on this page
377
+ * @examplePrompt What source shapes are on the present canvas?
378
+ * @examplePrompt Show me the reference images available for AI generation
379
+ *
380
+ * # Example
381
+ * ```ts
382
+ * const { sources } = await snaptrude.presentation.aiInspiration.listSources({ includeGenerated: true })
383
+ * for (const s of sources) console.log(s.kind, s.shapeId, s.name)
384
+ * ```
385
+ */
386
+ abstract listSources(args: PluginAIInspirationListSourcesArgs): PluginApiReturn<PluginAIInspirationListSourcesResult>;
387
+ /**
388
+ * Generate an image or video from a Present canvas source.
389
+ *
390
+ * @param args - Generation options including source, prompt, model, references, site context,
391
+ * region guidance, sketch guidance, and video options.
392
+ * @returns The created canvas output(s).
393
+ *
394
+ * @examplePrompt Generate an image from this sketch
395
+ * @examplePrompt Render the selected view as a photorealistic image
396
+ * @examplePrompt Make an AI image of a modern facade from this source
397
+ * @examplePrompt Generate a video from this image
398
+ * @examplePrompt Turn this massing into a rendered street view
399
+ *
400
+ * # Example
401
+ * ```ts
402
+ * const { sources } = await snaptrude.presentation.aiInspiration.listSources({})
403
+ * const [source, ...refs] = sources
404
+ * const { outputs } = await snaptrude.presentation.aiInspiration.generate({
405
+ * sourceShapeId: source.shapeId,
406
+ * prompt: "Photorealistic render of a modern timber facade at dusk",
407
+ * referenceShapeIds: refs.slice(0, 2).map((r) => r.shapeId),
408
+ * referenceStrength: "medium",
409
+ * })
410
+ * for (const out of outputs) console.log(out.outputType, out.shapeId, out.outputUrl)
411
+ * ```
412
+ */
413
+ abstract generate(args: PluginAIInspirationGenerateArgs): PluginApiReturn<PluginAIInspirationRunResult>;
414
+ /**
415
+ * Refine/upscale an AI Inspiration source image.
416
+ *
417
+ * @param args - Source shape and optional upscale factor.
418
+ * @returns The refined canvas output(s).
419
+ *
420
+ * @examplePrompt Upscale this AI image
421
+ * @examplePrompt Refine and sharpen the selected render
422
+ * @examplePrompt Make this generated image higher resolution
423
+ *
424
+ * # Example
425
+ * ```ts
426
+ * const { sources } = await snaptrude.presentation.aiInspiration.listSources({ includeGenerated: true })
427
+ * const image = sources.find((s) => s.kind === "image")
428
+ * if (image) {
429
+ * const { outputs } = await snaptrude.presentation.aiInspiration.refine({
430
+ * sourceShapeId: image.shapeId,
431
+ * upscaleFactor: 2,
432
+ * })
433
+ * console.log(outputs[0].shapeId)
434
+ * }
435
+ * ```
436
+ */
437
+ abstract refine(args: PluginAIInspirationRefineArgs): PluginApiReturn<PluginAIInspirationRunResult>;
438
+ }
439
+ export {};
440
+ //# sourceMappingURL=aiInspiration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aiInspiration.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/aiInspiration.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,81 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ /**
4
+ * Presentation diagrams — place diagram images onto sheets.
5
+ *
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
9
+ * `program.adjacency` (see {@linkcode PluginProgramAdjacencyApi}).
10
+ *
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).
15
+ *
16
+ * Accessed via `snaptrude.presentation.diagrams`.
17
+ */
18
+ export declare abstract class PluginPresentationDiagramsApi {
19
+ constructor();
20
+ /**
21
+ * Place diagram images onto a sheet.
22
+ *
23
+ * Drops the given diagram image URLs onto a sheet and returns the ids of the
24
+ * created canvas shapes. Requires Present mode to be open.
25
+ *
26
+ * @param sheetId - The sheet to place onto.
27
+ * @param urls - Diagram image URLs to place.
28
+ * @param options - Optional `position` (`{ x, y }`, relative to the sheet)
29
+ * for the placed images.
30
+ * @returns A {@linkcode PluginPresentationDiagramsPlaceResult} with the created
31
+ * `shapeIds`.
32
+ * @throws If Present mode is not open or the sheet id is invalid.
33
+ *
34
+ * @examplePrompt Place the adjacency diagram on Sheet 1
35
+ * @examplePrompt Add the program diagram to the cover sheet
36
+ * @examplePrompt Drop these diagram images onto the layout
37
+ *
38
+ * # Example
39
+ * ```ts
40
+ * await snaptrude.presentation.diagrams.place("sheet_1", [
41
+ * "https://example.com/program-diagram.png",
42
+ * ])
43
+ * ```
44
+ */
45
+ abstract place(sheetId: string, urls: string[], options?: {
46
+ position?: {
47
+ x: number;
48
+ y: number;
49
+ };
50
+ }): PluginApiReturn<PluginPresentationDiagramsPlaceResult>;
51
+ }
52
+ /**
53
+ * Arguments for {@linkcode PluginPresentationDiagramsApi.place}.
54
+ *
55
+ * | Property | Type | Description |
56
+ * |---|---|---|
57
+ * | `sheetId` | `string` | The sheet to place onto |
58
+ * | `urls` | `string[]` | Diagram image URLs |
59
+ * | `position` | `{ x: number; y: number } \| undefined` | Where to place them |
60
+ */
61
+ export declare const PluginPresentationDiagramsPlaceArgs: z.ZodObject<{
62
+ sheetId: z.ZodString;
63
+ urls: z.ZodArray<z.ZodString>;
64
+ position: z.ZodOptional<z.ZodObject<{
65
+ x: z.ZodNumber;
66
+ y: z.ZodNumber;
67
+ }, z.core.$strip>>;
68
+ }, z.core.$strip>;
69
+ export type PluginPresentationDiagramsPlaceArgs = z.infer<typeof PluginPresentationDiagramsPlaceArgs>;
70
+ /**
71
+ * Result of {@linkcode PluginPresentationDiagramsApi.place}.
72
+ *
73
+ * | Property | Type | Description |
74
+ * |---|---|---|
75
+ * | `shapeIds` | `string[]` | Ids of the created canvas shapes |
76
+ */
77
+ export declare const PluginPresentationDiagramsPlaceResult: z.ZodObject<{
78
+ shapeIds: z.ZodArray<z.ZodString>;
79
+ }, z.core.$strip>;
80
+ export type PluginPresentationDiagramsPlaceResult = z.infer<typeof PluginPresentationDiagramsPlaceResult>;
81
+ //# sourceMappingURL=diagrams.d.ts.map
@@ -0,0 +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;CAC1D;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,mCAAmC;;;;;;;iBAI9C,CAAA;AACF,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC;;iBAEhD,CAAA;AACF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACzD,OAAO,qCAAqC,CAC7C,CAAA"}
@@ -0,0 +1,113 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ /**
4
+ * Presentation import — bring external reference assets onto the Present canvas.
5
+ *
6
+ * `import.image` places a reference image and `import.pdf` places a PDF (each
7
+ * page vectorized to SVG) onto the current Present sheet, returning the created
8
+ * canvas shape ids. Requires Present mode to be open.
9
+ *
10
+ * The host engine takes a browser `File`, which a plugin worker cannot supply,
11
+ * so these accept a `url`/`dataUrl` that the host adapts into a `File`.
12
+ *
13
+ * Accessed via `snaptrude.presentation.import`.
14
+ */
15
+ export declare abstract class PluginPresentationImportApi {
16
+ constructor();
17
+ /**
18
+ * Import a reference image onto the current Present sheet.
19
+ *
20
+ * @param source - The asset to import: exactly one of `url` or `dataUrl`.
21
+ * @param options - Optional `position` — where to place the image on the
22
+ * sheet.
23
+ * @returns A {@linkcode PluginPresentationImportResult} with the created
24
+ * `shapeIds`.
25
+ * @throws If Present mode is not open or the source cannot be loaded.
26
+ *
27
+ * @examplePrompt Import this reference image onto the present canvas
28
+ * @examplePrompt Add a JPG to my presentation board
29
+ * @examplePrompt Drop this site photo onto the current sheet
30
+ * @examplePrompt Bring an inspiration image into Present mode
31
+ *
32
+ * # Example
33
+ * ```ts
34
+ * const { shapeIds } = await snaptrude.presentation.import.image(
35
+ * { url: "https://example.com/ref.png" },
36
+ * { position: { x: 200, y: 150 } },
37
+ * )
38
+ * ```
39
+ */
40
+ abstract image(source: {
41
+ url?: string;
42
+ dataUrl?: string;
43
+ }, options?: {
44
+ position?: {
45
+ x: number;
46
+ y: number;
47
+ };
48
+ }): PluginApiReturn<PluginPresentationImportResult>;
49
+ /**
50
+ * Import a PDF onto the current Present sheet (one shape per page).
51
+ *
52
+ * Each page is converted to vector SVG and placed as a canvas shape.
53
+ *
54
+ * @param source - The asset to import: exactly one of `url` or `dataUrl`.
55
+ * @param options - Optional `position` — where to place the pages on the
56
+ * sheet.
57
+ * @returns A {@linkcode PluginPresentationImportResult} with one `shapeId` per
58
+ * page.
59
+ * @throws If Present mode is not open or the source cannot be loaded.
60
+ *
61
+ * @examplePrompt Import this PDF onto the present canvas
62
+ * @examplePrompt Add a multi-page PDF reference to my board
63
+ * @examplePrompt Bring a PDF floor plan into Present mode as vectors
64
+ * @examplePrompt Place each page of this PDF on the sheet
65
+ *
66
+ * # Example
67
+ * ```ts
68
+ * const { shapeIds } = await snaptrude.presentation.import.pdf({
69
+ * url: "https://example.com/plans.pdf",
70
+ * })
71
+ * ```
72
+ */
73
+ abstract pdf(source: {
74
+ url?: string;
75
+ dataUrl?: string;
76
+ }, options?: {
77
+ position?: {
78
+ x: number;
79
+ y: number;
80
+ };
81
+ }): PluginApiReturn<PluginPresentationImportResult>;
82
+ }
83
+ /**
84
+ * Arguments for {@linkcode PluginPresentationImportApi.image} /
85
+ * {@linkcode PluginPresentationImportApi.pdf}. Provide exactly one source.
86
+ *
87
+ * | Property | Type | Description |
88
+ * |---|---|---|
89
+ * | `url` | `string \| undefined` | URL of the asset to import |
90
+ * | `dataUrl` | `string \| undefined` | Base64 data URL of the asset |
91
+ * | `position` | `{ x: number; y: number } \| undefined` | Where to place it on the sheet |
92
+ */
93
+ export declare const PluginPresentationImportArgs: z.ZodObject<{
94
+ url: z.ZodOptional<z.ZodString>;
95
+ dataUrl: z.ZodOptional<z.ZodString>;
96
+ position: z.ZodOptional<z.ZodObject<{
97
+ x: z.ZodNumber;
98
+ y: z.ZodNumber;
99
+ }, z.core.$strip>>;
100
+ }, z.core.$strip>;
101
+ export type PluginPresentationImportArgs = z.infer<typeof PluginPresentationImportArgs>;
102
+ /**
103
+ * Result of an import.
104
+ *
105
+ * | Property | Type | Description |
106
+ * |---|---|---|
107
+ * | `shapeIds` | `string[]` | Ids of the created canvas shapes (one per page for PDFs) |
108
+ */
109
+ export declare const PluginPresentationImportResult: z.ZodObject<{
110
+ shapeIds: z.ZodArray<z.ZodString>;
111
+ }, z.core.$strip>;
112
+ export type PluginPresentationImportResult = z.infer<typeof PluginPresentationImportResult>;
113
+ //# sourceMappingURL=import.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/import.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;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,KAAK,CACnB,MAAM,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,EAC1C,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAChD,eAAe,CAAC,8BAA8B,CAAC;IAElD;;;;;;;;;;;;;;;;;;;;;;;OAuBG;aACa,GAAG,CACjB,MAAM,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,EAC1C,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,GAChD,eAAe,CAAC,8BAA8B,CAAC;CACnD;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B;;;;;;;iBAQrC,CAAA;AACJ,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAA;AACF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAA"}