@snaptrude/plugin-core 0.0.0-bimsvg-20260928124803

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 (383) hide show
  1. package/AGENTS.md +231 -0
  2. package/CHANGELOG.md +341 -0
  3. package/CLAUDE.md +11 -0
  4. package/api-manifest.json +9120 -0
  5. package/dist/api/analysis/daylight.d.ts +603 -0
  6. package/dist/api/analysis/daylight.d.ts.map +1 -0
  7. package/dist/api/analysis/heatmaps.d.ts +658 -0
  8. package/dist/api/analysis/heatmaps.d.ts.map +1 -0
  9. package/dist/api/analysis/illuminance.d.ts +145 -0
  10. package/dist/api/analysis/illuminance.d.ts.map +1 -0
  11. package/dist/api/analysis/index.d.ts +59 -0
  12. package/dist/api/analysis/index.d.ts.map +1 -0
  13. package/dist/api/analysis/shadows.d.ts +165 -0
  14. package/dist/api/analysis/shadows.d.ts.map +1 -0
  15. package/dist/api/analysis/solar.d.ts +249 -0
  16. package/dist/api/analysis/solar.d.ts.map +1 -0
  17. package/dist/api/analysis/sunlightHours.d.ts +208 -0
  18. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  19. package/dist/api/analysis/sunpath.d.ts +80 -0
  20. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  21. package/dist/api/analysis/weather.d.ts +193 -0
  22. package/dist/api/analysis/weather.d.ts.map +1 -0
  23. package/dist/api/core/buildings.d.ts +427 -0
  24. package/dist/api/core/buildings.d.ts.map +1 -0
  25. package/dist/api/core/camera/index.d.ts +261 -0
  26. package/dist/api/core/camera/index.d.ts.map +1 -0
  27. package/dist/api/core/comment/index.d.ts +333 -0
  28. package/dist/api/core/comment/index.d.ts.map +1 -0
  29. package/dist/api/core/geom/create/index.d.ts +1073 -0
  30. package/dist/api/core/geom/create/index.d.ts.map +1 -0
  31. package/dist/api/core/geom/delete/index.d.ts +78 -0
  32. package/dist/api/core/geom/delete/index.d.ts.map +1 -0
  33. package/dist/api/core/geom/index.d.ts +33 -0
  34. package/dist/api/core/geom/index.d.ts.map +1 -0
  35. package/dist/api/core/geom/query/arc.d.ts +169 -0
  36. package/dist/api/core/geom/query/arc.d.ts.map +1 -0
  37. package/dist/api/core/geom/query/brep.d.ts +514 -0
  38. package/dist/api/core/geom/query/brep.d.ts.map +1 -0
  39. package/dist/api/core/geom/query/circle.d.ts +378 -0
  40. package/dist/api/core/geom/query/circle.d.ts.map +1 -0
  41. package/dist/api/core/geom/query/contour.d.ts +450 -0
  42. package/dist/api/core/geom/query/contour.d.ts.map +1 -0
  43. package/dist/api/core/geom/query/curve.d.ts +918 -0
  44. package/dist/api/core/geom/query/curve.d.ts.map +1 -0
  45. package/dist/api/core/geom/query/edge.d.ts +128 -0
  46. package/dist/api/core/geom/query/edge.d.ts.map +1 -0
  47. package/dist/api/core/geom/query/face.d.ts +363 -0
  48. package/dist/api/core/geom/query/face.d.ts.map +1 -0
  49. package/dist/api/core/geom/query/halfedge.d.ts +206 -0
  50. package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
  51. package/dist/api/core/geom/query/index.d.ts +61 -0
  52. package/dist/api/core/geom/query/index.d.ts.map +1 -0
  53. package/dist/api/core/geom/query/profile.d.ts +410 -0
  54. package/dist/api/core/geom/query/profile.d.ts.map +1 -0
  55. package/dist/api/core/geom/query/vertex.d.ts +187 -0
  56. package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
  57. package/dist/api/core/geom/update/contour.d.ts +272 -0
  58. package/dist/api/core/geom/update/contour.d.ts.map +1 -0
  59. package/dist/api/core/geom/update/curve.d.ts +180 -0
  60. package/dist/api/core/geom/update/curve.d.ts.map +1 -0
  61. package/dist/api/core/geom/update/index.d.ts +27 -0
  62. package/dist/api/core/geom/update/index.d.ts.map +1 -0
  63. package/dist/api/core/geom/update/profile.d.ts +329 -0
  64. package/dist/api/core/geom/update/profile.d.ts.map +1 -0
  65. package/dist/api/core/groups.d.ts +485 -0
  66. package/dist/api/core/groups.d.ts.map +1 -0
  67. package/dist/api/core/handles/index.d.ts +210 -0
  68. package/dist/api/core/handles/index.d.ts.map +1 -0
  69. package/dist/api/core/history/index.d.ts +78 -0
  70. package/dist/api/core/history/index.d.ts.map +1 -0
  71. package/dist/api/core/index.d.ts +97 -0
  72. package/dist/api/core/index.d.ts.map +1 -0
  73. package/dist/api/core/io/export/index.d.ts +134 -0
  74. package/dist/api/core/io/export/index.d.ts.map +1 -0
  75. package/dist/api/core/io/import/index.d.ts +455 -0
  76. package/dist/api/core/io/import/index.d.ts.map +1 -0
  77. package/dist/api/core/io/index.d.ts +40 -0
  78. package/dist/api/core/io/index.d.ts.map +1 -0
  79. package/dist/api/core/io/job/index.d.ts +139 -0
  80. package/dist/api/core/io/job/index.d.ts.map +1 -0
  81. package/dist/api/core/io/query/index.d.ts +74 -0
  82. package/dist/api/core/io/query/index.d.ts.map +1 -0
  83. package/dist/api/core/io/terrain/index.d.ts +341 -0
  84. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  85. package/dist/api/core/io/underlay/index.d.ts +805 -0
  86. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  87. package/dist/api/core/layers.d.ts +402 -0
  88. package/dist/api/core/layers.d.ts.map +1 -0
  89. package/dist/api/core/math/index.d.ts +18 -0
  90. package/dist/api/core/math/index.d.ts.map +1 -0
  91. package/dist/api/core/math/quat.d.ts +170 -0
  92. package/dist/api/core/math/quat.d.ts.map +1 -0
  93. package/dist/api/core/math/vec3.d.ts +174 -0
  94. package/dist/api/core/math/vec3.d.ts.map +1 -0
  95. package/dist/api/core/mode/index.d.ts +111 -0
  96. package/dist/api/core/mode/index.d.ts.map +1 -0
  97. package/dist/api/core/project/index.d.ts +466 -0
  98. package/dist/api/core/project/index.d.ts.map +1 -0
  99. package/dist/api/core/proposals/index.d.ts +531 -0
  100. package/dist/api/core/proposals/index.d.ts.map +1 -0
  101. package/dist/api/core/storeys/index.d.ts +265 -0
  102. package/dist/api/core/storeys/index.d.ts.map +1 -0
  103. package/dist/api/core/tags.d.ts +860 -0
  104. package/dist/api/core/tags.d.ts.map +1 -0
  105. package/dist/api/core/units/index.d.ts +175 -0
  106. package/dist/api/core/units/index.d.ts.map +1 -0
  107. package/dist/api/core/user.d.ts +44 -0
  108. package/dist/api/core/user.d.ts.map +1 -0
  109. package/dist/api/core/zoom/index.d.ts +49 -0
  110. package/dist/api/core/zoom/index.d.ts.map +1 -0
  111. package/dist/api/design/boolean/index.d.ts +168 -0
  112. package/dist/api/design/boolean/index.d.ts.map +1 -0
  113. package/dist/api/design/create/bulk-items.d.ts +185 -0
  114. package/dist/api/design/create/bulk-items.d.ts.map +1 -0
  115. package/dist/api/design/create/grids.d.ts +132 -0
  116. package/dist/api/design/create/grids.d.ts.map +1 -0
  117. package/dist/api/design/create/index.d.ts +1747 -0
  118. package/dist/api/design/create/index.d.ts.map +1 -0
  119. package/dist/api/design/create/opening-fields.d.ts +37 -0
  120. package/dist/api/design/create/opening-fields.d.ts.map +1 -0
  121. package/dist/api/design/delete/index.d.ts +70 -0
  122. package/dist/api/design/delete/index.d.ts.map +1 -0
  123. package/dist/api/design/dimensions.d.ts +427 -0
  124. package/dist/api/design/dimensions.d.ts.map +1 -0
  125. package/dist/api/design/doors/index.d.ts +470 -0
  126. package/dist/api/design/doors/index.d.ts.map +1 -0
  127. package/dist/api/design/edit/index.d.ts +49 -0
  128. package/dist/api/design/edit/index.d.ts.map +1 -0
  129. package/dist/api/design/erase/index.d.ts +160 -0
  130. package/dist/api/design/erase/index.d.ts.map +1 -0
  131. package/dist/api/design/family.d.ts +611 -0
  132. package/dist/api/design/family.d.ts.map +1 -0
  133. package/dist/api/design/furniture/index.d.ts +296 -0
  134. package/dist/api/design/furniture/index.d.ts.map +1 -0
  135. package/dist/api/design/grids.d.ts +237 -0
  136. package/dist/api/design/grids.d.ts.map +1 -0
  137. package/dist/api/design/index.d.ts +260 -0
  138. package/dist/api/design/index.d.ts.map +1 -0
  139. package/dist/api/design/lock.d.ts +67 -0
  140. package/dist/api/design/lock.d.ts.map +1 -0
  141. package/dist/api/design/materials/index.d.ts +551 -0
  142. package/dist/api/design/materials/index.d.ts.map +1 -0
  143. package/dist/api/design/query/geometry/index.d.ts +252 -0
  144. package/dist/api/design/query/geometry/index.d.ts.map +1 -0
  145. package/dist/api/design/query/grids.d.ts +287 -0
  146. package/dist/api/design/query/grids.d.ts.map +1 -0
  147. package/dist/api/design/query/index.d.ts +1318 -0
  148. package/dist/api/design/query/index.d.ts.map +1 -0
  149. package/dist/api/design/query/referenceLines.d.ts +45 -0
  150. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  151. package/dist/api/design/query/spaces.d.ts +394 -0
  152. package/dist/api/design/query/spaces.d.ts.map +1 -0
  153. package/dist/api/design/selection/index.d.ts +282 -0
  154. package/dist/api/design/selection/index.d.ts.map +1 -0
  155. package/dist/api/design/shared.d.ts +38 -0
  156. package/dist/api/design/shared.d.ts.map +1 -0
  157. package/dist/api/design/transform/index.d.ts +249 -0
  158. package/dist/api/design/transform/index.d.ts.map +1 -0
  159. package/dist/api/design/types/index.d.ts +181 -0
  160. package/dist/api/design/types/index.d.ts.map +1 -0
  161. package/dist/api/design/update/index.d.ts +803 -0
  162. package/dist/api/design/update/index.d.ts.map +1 -0
  163. package/dist/api/design/visibility.d.ts +126 -0
  164. package/dist/api/design/visibility.d.ts.map +1 -0
  165. package/dist/api/design/windows/index.d.ts +300 -0
  166. package/dist/api/design/windows/index.d.ts.map +1 -0
  167. package/dist/api/entity/buildableEnvelope.d.ts +265 -0
  168. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  169. package/dist/api/entity/department.d.ts +1 -0
  170. package/dist/api/entity/department.d.ts.map +1 -0
  171. package/dist/api/entity/index.d.ts +28 -0
  172. package/dist/api/entity/index.d.ts.map +1 -0
  173. package/dist/api/entity/referenceLine.d.ts +210 -0
  174. package/dist/api/entity/referenceLine.d.ts.map +1 -0
  175. package/dist/api/entity/space.d.ts +846 -0
  176. package/dist/api/entity/space.d.ts.map +1 -0
  177. package/dist/api/entity/story.d.ts +476 -0
  178. package/dist/api/entity/story.d.ts.map +1 -0
  179. package/dist/api/index.d.ts +45 -0
  180. package/dist/api/index.d.ts.map +1 -0
  181. package/dist/api/presentation/aiInspiration.d.ts +2400 -0
  182. package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
  183. package/dist/api/presentation/annotate.d.ts +483 -0
  184. package/dist/api/presentation/annotate.d.ts.map +1 -0
  185. package/dist/api/presentation/diagrams.d.ts +184 -0
  186. package/dist/api/presentation/diagrams.d.ts.map +1 -0
  187. package/dist/api/presentation/drawings.d.ts +2900 -0
  188. package/dist/api/presentation/drawings.d.ts.map +1 -0
  189. package/dist/api/presentation/export.d.ts +126 -0
  190. package/dist/api/presentation/export.d.ts.map +1 -0
  191. package/dist/api/presentation/import.d.ts +164 -0
  192. package/dist/api/presentation/import.d.ts.map +1 -0
  193. package/dist/api/presentation/index.d.ts +114 -0
  194. package/dist/api/presentation/index.d.ts.map +1 -0
  195. package/dist/api/presentation/placedViews.d.ts +1232 -0
  196. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  197. package/dist/api/presentation/shapes.d.ts +481 -0
  198. package/dist/api/presentation/shapes.d.ts.map +1 -0
  199. package/dist/api/presentation/sheets.d.ts +643 -0
  200. package/dist/api/presentation/sheets.d.ts.map +1 -0
  201. package/dist/api/presentation/slideshow.d.ts +125 -0
  202. package/dist/api/presentation/slideshow.d.ts.map +1 -0
  203. package/dist/api/presentation/tables.d.ts +81 -0
  204. package/dist/api/presentation/tables.d.ts.map +1 -0
  205. package/dist/api/presentation/viewPresets.d.ts +70 -0
  206. package/dist/api/presentation/viewPresets.d.ts.map +1 -0
  207. package/dist/api/presentation/views.d.ts +741 -0
  208. package/dist/api/presentation/views.d.ts.map +1 -0
  209. package/dist/api/program/adjacency.d.ts +155 -0
  210. package/dist/api/program/adjacency.d.ts.map +1 -0
  211. package/dist/api/program/areas.d.ts +450 -0
  212. package/dist/api/program/areas.d.ts.map +1 -0
  213. package/dist/api/program/classification.d.ts +135 -0
  214. package/dist/api/program/classification.d.ts.map +1 -0
  215. package/dist/api/program/cores.d.ts +78 -0
  216. package/dist/api/program/cores.d.ts.map +1 -0
  217. package/dist/api/program/departments.d.ts +487 -0
  218. package/dist/api/program/departments.d.ts.map +1 -0
  219. package/dist/api/program/index.d.ts +71 -0
  220. package/dist/api/program/index.d.ts.map +1 -0
  221. package/dist/api/program/labels.d.ts +355 -0
  222. package/dist/api/program/labels.d.ts.map +1 -0
  223. package/dist/api/program/layout.d.ts +398 -0
  224. package/dist/api/program/layout.d.ts.map +1 -0
  225. package/dist/api/program/metadata.d.ts +328 -0
  226. package/dist/api/program/metadata.d.ts.map +1 -0
  227. package/dist/api/program/metrics.d.ts +108 -0
  228. package/dist/api/program/metrics.d.ts.map +1 -0
  229. package/dist/api/program/site.d.ts +823 -0
  230. package/dist/api/program/site.d.ts.map +1 -0
  231. package/dist/api/program/spreadsheet.d.ts +2628 -0
  232. package/dist/api/program/spreadsheet.d.ts.map +1 -0
  233. package/dist/api/workspace/index.d.ts +552 -0
  234. package/dist/api/workspace/index.d.ts.map +1 -0
  235. package/dist/errors/codes.d.ts +34 -0
  236. package/dist/errors/codes.d.ts.map +1 -0
  237. package/dist/errors/envelope.d.ts +56 -0
  238. package/dist/errors/envelope.d.ts.map +1 -0
  239. package/dist/errors/index.d.ts +6 -0
  240. package/dist/errors/index.d.ts.map +1 -0
  241. package/dist/errors/plugin-error.d.ts +69 -0
  242. package/dist/errors/plugin-error.d.ts.map +1 -0
  243. package/dist/handles.d.ts +229 -0
  244. package/dist/handles.d.ts.map +1 -0
  245. package/dist/host-utils.d.ts +47 -0
  246. package/dist/host-utils.d.ts.map +1 -0
  247. package/dist/index.cjs +8836 -0
  248. package/dist/index.cjs.map +1 -0
  249. package/dist/index.d.ts +6 -0
  250. package/dist/index.d.ts.map +1 -0
  251. package/dist/index.js +7568 -0
  252. package/dist/index.js.map +1 -0
  253. package/dist/types.d.ts +16 -0
  254. package/dist/types.d.ts.map +1 -0
  255. package/package.json +41 -0
  256. package/scripts/generate-manifest.mjs +238 -0
  257. package/scripts/generate-manifest.test.mjs +292 -0
  258. package/src/api/analysis/daylight.ts +470 -0
  259. package/src/api/analysis/heatmaps.ts +683 -0
  260. package/src/api/analysis/illuminance.ts +155 -0
  261. package/src/api/analysis/index.ts +61 -0
  262. package/src/api/analysis/shadows.ts +183 -0
  263. package/src/api/analysis/solar.ts +237 -0
  264. package/src/api/analysis/sunlightHours.ts +211 -0
  265. package/src/api/analysis/sunpath.ts +83 -0
  266. package/src/api/analysis/weather.ts +179 -0
  267. package/src/api/core/buildings.ts +485 -0
  268. package/src/api/core/camera/index.ts +268 -0
  269. package/src/api/core/comment/index.ts +376 -0
  270. package/src/api/core/geom/create/index.ts +1204 -0
  271. package/src/api/core/geom/delete/index.ts +84 -0
  272. package/src/api/core/geom/index.ts +35 -0
  273. package/src/api/core/geom/query/arc.ts +169 -0
  274. package/src/api/core/geom/query/brep.ts +563 -0
  275. package/src/api/core/geom/query/circle.ts +404 -0
  276. package/src/api/core/geom/query/contour.ts +540 -0
  277. package/src/api/core/geom/query/curve.ts +1078 -0
  278. package/src/api/core/geom/query/edge.ts +130 -0
  279. package/src/api/core/geom/query/face.ts +403 -0
  280. package/src/api/core/geom/query/halfedge.ts +210 -0
  281. package/src/api/core/geom/query/index.ts +63 -0
  282. package/src/api/core/geom/query/profile.ts +473 -0
  283. package/src/api/core/geom/query/vertex.ts +205 -0
  284. package/src/api/core/geom/update/contour.ts +315 -0
  285. package/src/api/core/geom/update/curve.ts +209 -0
  286. package/src/api/core/geom/update/index.ts +29 -0
  287. package/src/api/core/geom/update/profile.ts +377 -0
  288. package/src/api/core/groups.ts +521 -0
  289. package/src/api/core/handles/index.ts +233 -0
  290. package/src/api/core/history/index.ts +84 -0
  291. package/src/api/core/index.ts +99 -0
  292. package/src/api/core/io/export/index.ts +126 -0
  293. package/src/api/core/io/import/index.ts +504 -0
  294. package/src/api/core/io/index.ts +42 -0
  295. package/src/api/core/io/job/index.ts +140 -0
  296. package/src/api/core/io/query/index.ts +71 -0
  297. package/src/api/core/io/terrain/index.ts +360 -0
  298. package/src/api/core/io/underlay/index.ts +705 -0
  299. package/src/api/core/layers.ts +333 -0
  300. package/src/api/core/math/index.ts +20 -0
  301. package/src/api/core/math/quat.ts +172 -0
  302. package/src/api/core/math/vec3.ts +179 -0
  303. package/src/api/core/mode/index.ts +108 -0
  304. package/src/api/core/project/index.ts +479 -0
  305. package/src/api/core/proposals/index.ts +569 -0
  306. package/src/api/core/storeys/index.ts +294 -0
  307. package/src/api/core/tags.ts +911 -0
  308. package/src/api/core/units/index.ts +164 -0
  309. package/src/api/core/user.ts +46 -0
  310. package/src/api/core/zoom/index.ts +51 -0
  311. package/src/api/design/boolean/index.ts +179 -0
  312. package/src/api/design/create/bulk-items.ts +186 -0
  313. package/src/api/design/create/grids.ts +137 -0
  314. package/src/api/design/create/index.ts +1954 -0
  315. package/src/api/design/create/opening-fields.ts +37 -0
  316. package/src/api/design/delete/index.ts +74 -0
  317. package/src/api/design/dimensions.ts +453 -0
  318. package/src/api/design/doors/index.ts +500 -0
  319. package/src/api/design/edit/index.ts +54 -0
  320. package/src/api/design/erase/index.ts +151 -0
  321. package/src/api/design/family.ts +646 -0
  322. package/src/api/design/furniture/index.ts +319 -0
  323. package/src/api/design/grids.ts +237 -0
  324. package/src/api/design/index.ts +274 -0
  325. package/src/api/design/lock.ts +69 -0
  326. package/src/api/design/materials/index.ts +608 -0
  327. package/src/api/design/query/geometry/index.ts +288 -0
  328. package/src/api/design/query/grids.ts +197 -0
  329. package/src/api/design/query/index.ts +1176 -0
  330. package/src/api/design/query/referenceLines.ts +52 -0
  331. package/src/api/design/query/spaces.ts +275 -0
  332. package/src/api/design/selection/index.ts +273 -0
  333. package/src/api/design/shared.ts +40 -0
  334. package/src/api/design/transform/index.ts +254 -0
  335. package/src/api/design/types/index.ts +156 -0
  336. package/src/api/design/update/index.ts +798 -0
  337. package/src/api/design/visibility.ts +143 -0
  338. package/src/api/design/windows/index.ts +333 -0
  339. package/src/api/entity/buildableEnvelope.ts +322 -0
  340. package/src/api/entity/department.ts +0 -0
  341. package/src/api/entity/index.ts +30 -0
  342. package/src/api/entity/referenceLine.ts +235 -0
  343. package/src/api/entity/space.ts +612 -0
  344. package/src/api/entity/story.ts +517 -0
  345. package/src/api/index.ts +47 -0
  346. package/src/api/presentation/aiInspiration.ts +1116 -0
  347. package/src/api/presentation/annotate.ts +417 -0
  348. package/src/api/presentation/diagrams.ts +194 -0
  349. package/src/api/presentation/drawings.ts +529 -0
  350. package/src/api/presentation/export.ts +133 -0
  351. package/src/api/presentation/import.ts +159 -0
  352. package/src/api/presentation/index.ts +129 -0
  353. package/src/api/presentation/placedViews.ts +1203 -0
  354. package/src/api/presentation/shapes.ts +274 -0
  355. package/src/api/presentation/sheets.ts +616 -0
  356. package/src/api/presentation/slideshow.ts +134 -0
  357. package/src/api/presentation/tables.ts +84 -0
  358. package/src/api/presentation/viewPresets.ts +83 -0
  359. package/src/api/presentation/views.ts +698 -0
  360. package/src/api/program/adjacency.ts +164 -0
  361. package/src/api/program/areas.ts +408 -0
  362. package/src/api/program/classification.ts +138 -0
  363. package/src/api/program/cores.ts +83 -0
  364. package/src/api/program/departments.ts +517 -0
  365. package/src/api/program/index.ts +73 -0
  366. package/src/api/program/labels.ts +332 -0
  367. package/src/api/program/layout.ts +422 -0
  368. package/src/api/program/metadata.ts +364 -0
  369. package/src/api/program/metrics.ts +120 -0
  370. package/src/api/program/site.ts +748 -0
  371. package/src/api/program/spreadsheet.ts +2698 -0
  372. package/src/api/workspace/index.ts +612 -0
  373. package/src/errors/codes.ts +136 -0
  374. package/src/errors/envelope.ts +75 -0
  375. package/src/errors/index.ts +21 -0
  376. package/src/errors/plugin-error.ts +134 -0
  377. package/src/handles.ts +282 -0
  378. package/src/host-utils.ts +68 -0
  379. package/src/index.ts +5 -0
  380. package/src/types.ts +16 -0
  381. package/test/errors.test.mjs +184 -0
  382. package/tsconfig.json +22 -0
  383. package/tsup.config.ts +12 -0
@@ -0,0 +1,164 @@
1
+ import * as z from "zod"
2
+ import { PluginApiReturn } from "../../../types"
3
+
4
+ /**
5
+ * Unit-type queries and conversion.
6
+ *
7
+ * Snaptrude stores all geometry in an internal `babylon` unit. These methods
8
+ * read the available unit types, the internal (`babylon`) type, and the current
9
+ * project type; set the current project type; and convert values between any two
10
+ * unit types.
11
+ *
12
+ * Accessed via `snaptrude.core.units`.
13
+ */
14
+ export abstract class PluginUnitsApi {
15
+ constructor() {}
16
+
17
+ /**
18
+ * List the selectable real-world unit types (excludes the internal `babylon`
19
+ * storage type, which is read via {@linkcode PluginUnitsApi.getBabylonType}).
20
+ *
21
+ * @examplePrompt What units can I use in this project?
22
+ * @examplePrompt List all the available measurement units
23
+ * @examplePrompt Which unit systems does Snaptrude support?
24
+ * @examplePrompt Show the unit options I could switch the model to
25
+ *
26
+ * # Example
27
+ * ```ts
28
+ * const types = await snaptrude.core.units.listTypes()
29
+ * console.log(types) // ["meters", "feet-inches", "inches", ...]
30
+ * ```
31
+ */
32
+ public abstract listTypes(): PluginApiReturn<PUnitType[]>
33
+
34
+ /**
35
+ * Get the internal storage unit type that all geometry is kept in — always
36
+ * `"babylon"` — for use as one side of a {@linkcode PluginUnitsApi.convert} call.
37
+ *
38
+ * @examplePrompt What unit does Snaptrude store geometry in internally?
39
+ * @examplePrompt Get the internal babylon unit type
40
+ * @examplePrompt Which unit are raw model coordinates saved in?
41
+ *
42
+ * # Example
43
+ * ```ts
44
+ * const babylon = await snaptrude.core.units.getBabylonType() // "babylon"
45
+ * const meters = await snaptrude.core.units.convert(10, babylon, "meters")
46
+ * ```
47
+ */
48
+ public abstract getBabylonType(): PluginApiReturn<PUnitType>
49
+
50
+ /**
51
+ * Get the current project's unit type — the unit lengths are displayed and
52
+ * entered in. Paired with {@linkcode PluginUnitsApi.setType}.
53
+ *
54
+ * @examplePrompt What units is this project using?
55
+ * @examplePrompt Are we working in metric or imperial?
56
+ * @examplePrompt Check the current measurement unit of the model
57
+ * @examplePrompt Is the file set to millimetres or feet and inches?
58
+ *
59
+ * # Example
60
+ * ```ts
61
+ * const type = await snaptrude.core.units.getType()
62
+ * console.log(type) // e.g. "millimeters"
63
+ * ```
64
+ */
65
+ public abstract getType(): PluginApiReturn<PUnitType>
66
+
67
+ /**
68
+ * Set the current project's unit type. Paired with {@linkcode PluginUnitsApi.getType}.
69
+ *
70
+ * @param type - The unit type to set as the project unit.
71
+ * @returns `true` if applied; `false` if `type` is not a settable project unit
72
+ * (e.g. `kilometers`, `miles`, `babylon`).
73
+ *
74
+ * @examplePrompt Change the project units to millimeters
75
+ * @examplePrompt Switch this model to feet and inches
76
+ * @examplePrompt Set the working units to metric
77
+ * @examplePrompt Make the drawing use centimetres instead of meters
78
+ *
79
+ * # Example
80
+ * ```ts
81
+ * await snaptrude.core.units.setType("meters")
82
+ * ```
83
+ */
84
+ public abstract setType(type: PUnitType): PluginApiReturn<boolean>
85
+
86
+ /**
87
+ * Convert a value between two unit types.
88
+ *
89
+ * @param value - The numeric value to convert.
90
+ * @param from - Source unit type.
91
+ * @param to - Target unit type.
92
+ * @param degree - (Optional) 1 = length, 2 = area, 3 = volume. Defaults to 1.
93
+ * @returns The converted numeric value.
94
+ *
95
+ * @examplePrompt Convert 5 meters to feet and inches
96
+ * @examplePrompt How many millimetres is 12 feet?
97
+ * @examplePrompt Change this area from internal units to square metres
98
+ * @examplePrompt Turn 2500 mm into meters
99
+ * @examplePrompt Convert a volume value from babylon units to cubic feet
100
+ *
101
+ * # Example
102
+ * ```ts
103
+ * // 5 meters → internal babylon units
104
+ * const b = await snaptrude.core.units.convert(5, "meters", "babylon")
105
+ * // an internal area → square metres
106
+ * const m2 = await snaptrude.core.units.convert(area, "babylon", "meters", 2)
107
+ * ```
108
+ */
109
+ public abstract convert(
110
+ value: number,
111
+ from: PUnitType,
112
+ to: PUnitType,
113
+ degree?: number,
114
+ ): PluginApiReturn<number>
115
+ }
116
+
117
+ /**
118
+ * Supported unit types. `babylon` is Snaptrude's internal storage unit; the rest
119
+ * are real-world units. Mirrors the engine `Converter.UNITS` vocabulary.
120
+ */
121
+ export const PUnitType = z.enum([
122
+ "meters",
123
+ "feet-inches",
124
+ "inches",
125
+ "centimeters",
126
+ "millimeters",
127
+ "kilometers",
128
+ "miles",
129
+ "babylon",
130
+ ])
131
+
132
+ export type PUnitType = z.infer<typeof PUnitType>
133
+
134
+ /**
135
+ * Arguments for {@linkcode PluginUnitsApi.setType}.
136
+ *
137
+ * | Property | Type | Description |
138
+ * |---|---|---|
139
+ * | `type` | {@linkcode PUnitType} | The unit type to set as the project unit |
140
+ */
141
+ export const PluginUnitsSetTypeArgs = z.object({
142
+ type: PUnitType,
143
+ })
144
+
145
+ export type PluginUnitsSetTypeArgs = z.infer<typeof PluginUnitsSetTypeArgs>
146
+
147
+ /**
148
+ * Arguments for {@linkcode PluginUnitsApi.convert}.
149
+ *
150
+ * | Property | Type | Description |
151
+ * |---|---|---|
152
+ * | `value` | `number` | The numeric value to convert |
153
+ * | `from` | {@linkcode PUnitType} | Source unit type |
154
+ * | `to` | {@linkcode PUnitType} | Target unit type |
155
+ * | `degree` | `1 \| 2 \| 3` | (Optional) 1 = length, 2 = area, 3 = volume. Defaults to 1 |
156
+ */
157
+ export const PluginUnitsConvertArgs = z.object({
158
+ value: z.number(),
159
+ from: PUnitType,
160
+ to: PUnitType,
161
+ degree: z.number().int().min(1).max(3).optional(),
162
+ })
163
+
164
+ export type PluginUnitsConvertArgs = z.infer<typeof PluginUnitsConvertArgs>
@@ -0,0 +1,46 @@
1
+ import * as z from "zod"
2
+ import { PluginApiReturn } from "../../types"
3
+
4
+ /**
5
+ * User locale.
6
+ *
7
+ * Read the viewer's timezone and language — for date/number formatting and
8
+ * localized labels. This is locale only: NO precise geolocation, no IP, no
9
+ * account identity. Accessed via `snaptrude.core.user`.
10
+ */
11
+ export abstract class PluginUserApi {
12
+ constructor() {}
13
+
14
+ /**
15
+ * Get the viewer's locale: IANA timezone and BCP-47 language tag, resolved
16
+ * from the browser (`Intl.DateTimeFormat().resolvedOptions().timeZone` and
17
+ * `navigator.language`). Locale only — no precise location.
18
+ *
19
+ * @returns `{ timezone, language }` — e.g. `{ timezone: "Asia/Kolkata", language: "en-US" }`.
20
+ *
21
+ * @examplePrompt What timezone is the user in?
22
+ * @examplePrompt Get the viewer's language for localized labels
23
+ * @examplePrompt Format the report date in the user's local timezone
24
+ * @examplePrompt Which locale should I use for this plugin's UI?
25
+ *
26
+ * # Example
27
+ * ```ts
28
+ * const { timezone, language } = await snaptrude.core.user.getLocale()
29
+ * ```
30
+ */
31
+ public abstract getLocale(): PluginApiReturn<PluginUserLocale>
32
+ }
33
+
34
+ /**
35
+ * The viewer's locale.
36
+ *
37
+ * | Property | Type | Description |
38
+ * |---|---|---|
39
+ * | `timezone` | `string` | IANA timezone id (e.g. `"Asia/Kolkata"`) |
40
+ * | `language` | `string` | BCP-47 language tag (e.g. `"en-US"`) |
41
+ */
42
+ export const PluginUserLocale = z.object({
43
+ timezone: z.string(),
44
+ language: z.string(),
45
+ })
46
+ export type PluginUserLocale = z.infer<typeof PluginUserLocale>
@@ -0,0 +1,51 @@
1
+ import { PluginApiReturn } from "../../../types"
2
+
3
+ /**
4
+ * Camera zoom controls.
5
+ *
6
+ * Frame the viewport camera onto scene geometry — mirrors the canvas zoom menu
7
+ * ("Zoom extents" / "Zoom to selection"). Accessed via `snaptrude.core.zoom`.
8
+ */
9
+ export abstract class PluginZoomApi {
10
+ constructor() {}
11
+
12
+ /**
13
+ * Zoom (fit) the camera to all geometry in the scene — the "zoom extents" action.
14
+ *
15
+ * @returns `true` once the camera has been framed to the scene.
16
+ *
17
+ * @examplePrompt Zoom out so I can see the whole model
18
+ * @examplePrompt Fit everything in the view
19
+ * @examplePrompt Frame the entire building in the viewport
20
+ * @examplePrompt Do a zoom extents on the canvas
21
+ * @examplePrompt Show me the full scene
22
+ *
23
+ * # Example
24
+ * ```ts
25
+ * await snaptrude.core.zoom.extents()
26
+ * ```
27
+ *
28
+ * @deprecated Use `core.camera.zoomExtents`
29
+ */
30
+ public abstract extents(): PluginApiReturn<boolean>
31
+
32
+ /**
33
+ * Zoom (fit) the camera to the current selection.
34
+ *
35
+ * @returns `true` if there was a selection to frame; `false` if nothing is
36
+ * selected (no-op).
37
+ *
38
+ * @examplePrompt Zoom in on what I have selected
39
+ * @examplePrompt Frame the selected walls in the view
40
+ * @examplePrompt Focus the camera on my current selection
41
+ * @examplePrompt Fit the view to the selected room
42
+ *
43
+ * # Example
44
+ * ```ts
45
+ * await snaptrude.core.zoom.selection()
46
+ * ```
47
+ *
48
+ * @deprecated Use `core.camera.zoomSelection`
49
+ */
50
+ public abstract selection(): PluginApiReturn<boolean>
51
+ }
@@ -0,0 +1,179 @@
1
+ import * as z from "zod"
2
+ import { PluginApiReturn } from "../../../types"
3
+ import { ComponentHandle, Vec3Handle } from "../../../handles"
4
+ import { BooleanOutcome } from "../shared"
5
+
6
+ /**
7
+ * `snaptrude.design.boolean` — OpenCascade CSG on scene masses/spaces.
8
+ *
9
+ * Every method **commits** the operation as one undoable step (engine `run()`
10
+ * queues create/delete/group/dimension commands, `execute()` runs them through
11
+ * `CommandManager`) and returns the committed {@linkcode BooleanOutcome}. Failures
12
+ * **throw** (RPC rejects) — no `Result<>` monad crosses the boundary.
13
+ *
14
+ * Eligibility (all inputs): a `Mass` that is a room OR a DEPARTMENT, has a brep, is
15
+ * unlocked (mesh + bucket), visible, and NOT in a parametric-copy group; the whole
16
+ * set must be all-planar OR all-non-planar; **≥2** components; all inputs share one
17
+ * group or are ungrouped; inputs must be adjacent/overlapping.
18
+ *
19
+ * `design.boolean.subtract` is a **CSG geometry delete** — distinct from
20
+ * `design.delete.entities` (hard entity removal) and `design.erase.edge`
21
+ * (adjacency-edge topology op).
22
+ *
23
+ * TRANSPORT: positional args per method.
24
+ */
25
+ export abstract class PluginDesignBooleanApi {
26
+ constructor() {}
27
+
28
+ /**
29
+ * Fuse two or more masses into a single combined mass (`A ∪ B ∪ …`) — a boolean
30
+ * (CSG) union that merges the adjacent or overlapping inputs into one solid,
31
+ * committed as a single undoable step. Order-independent.
32
+ * @param components - The ≥2 entities to fuse (order-independent)
33
+ * @param options - Optional output offset — {@linkcode BooleanOptions}
34
+ * @returns The committed CSG delta — {@linkcode BooleanOutcome}
35
+ * @throws if inputs are ineligible, disjoint, non-manifold when joined, span
36
+ * different groups, or the CSG yields no / invalid geometry.
37
+ *
38
+ * @examplePrompt Merge these two masses into one
39
+ * @examplePrompt Union the selected volumes into a single mass
40
+ * @examplePrompt Combine the overlapping rooms into one shape
41
+ * @examplePrompt Join the tower and podium blocks together
42
+ * @examplePrompt Fuse all the selected massing blocks into a single solid
43
+ *
44
+ * # Example
45
+ * ```ts
46
+ * // Fuse the overlapping massing blocks on the ground storey into one solid
47
+ * const masses = await snaptrude.design.query.listMasses({ storeys: [1] })
48
+ * const { created, deleted } = await snaptrude.design.boolean.union(masses)
49
+ * console.log("created", created.length, "mass; consumed", deleted.length)
50
+ * ```
51
+ */
52
+ public abstract union(
53
+ components: ComponentHandle[],
54
+ options?: BooleanOptions,
55
+ ): PluginApiReturn<BooleanOutcome>
56
+
57
+ /**
58
+ * Cut one or more tool masses out of a target mass (`target − ⋃tools`) — a
59
+ * boolean (CSG) subtraction that carves the tools' volume out of the target and
60
+ * commits the remainder as a single undoable step.
61
+ *
62
+ * ORDER-SENSITIVE: the host seeds `[target, ...tools]`; index 0 is the arg brep,
63
+ * the rest are tool breps. `deleted` includes the target AND every tool;
64
+ * `created` is the remainder mass(es).
65
+ * @param target - The entity subtracted FROM (arg brep)
66
+ * @param tools - The ≥1 entities subtracted (tool breps)
67
+ * @param options - Optional output offset — {@linkcode BooleanOptions}
68
+ * @returns The committed CSG delta — {@linkcode BooleanOutcome}
69
+ * @throws as {@linkcode union}; a `NoResult` here carries the "select the target
70
+ * object first" hint from the engine.
71
+ *
72
+ * @examplePrompt Cut this shape out of the bigger mass
73
+ * @examplePrompt Subtract the cylinder from the building volume
74
+ * @examplePrompt Punch an opening through this block using the small box
75
+ * @examplePrompt Carve the courtyard volume out of the main massing
76
+ * @examplePrompt Remove the overlapping part of mass B from mass A
77
+ *
78
+ * # Example
79
+ * ```ts
80
+ * // Order matters: the first arg is the target, the array holds the tools
81
+ * const [building, courtyard] = await snaptrude.design.selection.get()
82
+ * const { created, deleted } = await snaptrude.design.boolean.subtract(building, [courtyard])
83
+ * // deleted includes the target AND every tool; created is the remainder
84
+ * ```
85
+ */
86
+ public abstract subtract(
87
+ target: ComponentHandle,
88
+ tools: ComponentHandle[],
89
+ options?: BooleanOptions,
90
+ ): PluginApiReturn<BooleanOutcome>
91
+
92
+ /**
93
+ * Keep only the overlapping volume of exactly two masses (`A ∩ B`) — a boolean
94
+ * (CSG) intersection that discards everything outside the shared region and
95
+ * commits the overlap as a single undoable step. Order-independent.
96
+ *
97
+ * HARD constraint: **EXACTLY 2** components (schema `.length(2)`; the engine
98
+ * also throws `MoreThan2ComponentsForIntersect` on >2).
99
+ * @param components - **EXACTLY 2** entities to intersect (order-independent)
100
+ * @param options - Optional output offset — {@linkcode BooleanOptions}
101
+ * @returns The committed CSG delta — {@linkcode BooleanOutcome}
102
+ * @throws as {@linkcode union}, plus `MoreThan2ComponentsForIntersect` on >2.
103
+ *
104
+ * @examplePrompt Keep only the part where these two masses overlap
105
+ * @examplePrompt Intersect the two selected volumes
106
+ * @examplePrompt Give me the common volume between the tower and the zoning envelope
107
+ * @examplePrompt Trim this mass down to just its overlap with the other one
108
+ *
109
+ * # Example
110
+ * ```ts
111
+ * // Keep only the overlap of the tower and the zoning envelope (EXACTLY 2 inputs),
112
+ * // shifting the result mass 10 units in x via the optional offset
113
+ * const [tower, envelope] = await snaptrude.design.query.listMasses()
114
+ * const offset = await snaptrude.core.math.vec3.new(10, 0, 0)
115
+ * const { created } = await snaptrude.design.boolean.intersect([tower, envelope], { offset })
116
+ * ```
117
+ */
118
+ public abstract intersect(
119
+ components: ComponentHandle[],
120
+ options?: BooleanOptions,
121
+ ): PluginApiReturn<BooleanOutcome>
122
+ }
123
+
124
+ /**
125
+ * Optional knobs shared by all boolean ops. The only safe one is a world-space
126
+ * translation applied to the output mass(es) — maps to `Boolean3dOperation.offset`.
127
+ *
128
+ * | Property | Type | Description |
129
+ * |---|---|---|
130
+ * | `offset` | {@linkcode Vec3Handle} | Translation added to the created result mass(es) (default: none) |
131
+ */
132
+ export const BooleanOptions = z.object({
133
+ offset: Vec3Handle.optional(),
134
+ })
135
+ export type BooleanOptions = z.infer<typeof BooleanOptions>
136
+
137
+ /**
138
+ * Arguments for {@linkcode PluginDesignBooleanApi.union}.
139
+ *
140
+ * | Property | Type | Description |
141
+ * |---|---|---|
142
+ * | `components` | {@linkcode ComponentHandle}`[]` | The ≥2 entities to fuse (order-independent) |
143
+ * | `options` | {@linkcode BooleanOptions} | Optional output offset |
144
+ */
145
+ export const PluginDesignBooleanUnionArgs = z.object({
146
+ components: z.array(ComponentHandle).min(2),
147
+ options: BooleanOptions.optional(),
148
+ })
149
+ export type PluginDesignBooleanUnionArgs = z.infer<typeof PluginDesignBooleanUnionArgs>
150
+
151
+ /**
152
+ * Arguments for {@linkcode PluginDesignBooleanApi.subtract}.
153
+ *
154
+ * | Property | Type | Description |
155
+ * |---|---|---|
156
+ * | `target` | {@linkcode ComponentHandle} | The entity subtracted FROM (arg brep) |
157
+ * | `tools` | {@linkcode ComponentHandle}`[]` | The ≥1 entities subtracted (tool breps) |
158
+ * | `options` | {@linkcode BooleanOptions} | Optional output offset |
159
+ */
160
+ export const PluginDesignBooleanSubtractArgs = z.object({
161
+ target: ComponentHandle,
162
+ tools: z.array(ComponentHandle).min(1),
163
+ options: BooleanOptions.optional(),
164
+ })
165
+ export type PluginDesignBooleanSubtractArgs = z.infer<typeof PluginDesignBooleanSubtractArgs>
166
+
167
+ /**
168
+ * Arguments for {@linkcode PluginDesignBooleanApi.intersect}.
169
+ *
170
+ * | Property | Type | Description |
171
+ * |---|---|---|
172
+ * | `components` | {@linkcode ComponentHandle}`[]` | **EXACTLY 2** entities to intersect (order-independent) |
173
+ * | `options` | {@linkcode BooleanOptions} | Optional output offset |
174
+ */
175
+ export const PluginDesignBooleanIntersectArgs = z.object({
176
+ components: z.array(ComponentHandle).length(2),
177
+ options: BooleanOptions.optional(),
178
+ })
179
+ export type PluginDesignBooleanIntersectArgs = z.infer<typeof PluginDesignBooleanIntersectArgs>
@@ -0,0 +1,186 @@
1
+ import * as z from "zod"
2
+ import { ContourHandle, ProfileHandle, Vec3Handle } from "../../../handles"
3
+ import { PluginOpeningBaseOptions } from "./opening-fields"
4
+
5
+ /**
6
+ * Maximum items per bulk `design.create.*` call. A bounded request keeps
7
+ * validation, command capture and rollback work finite; split a larger import
8
+ * into separate awaited batches, each with its own undo entry.
9
+ */
10
+ export const PLUGIN_CREATE_BATCH_LIMIT = 1000
11
+
12
+ // ---------------------------------------------------------------------------
13
+ // wallRuns
14
+ // ---------------------------------------------------------------------------
15
+
16
+ /**
17
+ * One wall run to create via {@linkcode PluginDesignCreateApi.wallRuns} — the
18
+ * same inputs as {@linkcode PluginDesignCreateApi.walls}, one run per item.
19
+ *
20
+ * | Property | Type | Description |
21
+ * |---|---|---|
22
+ * | `profile` | {@linkcode ProfileHandle} | Ordered curve chain (wall centerlines) |
23
+ * | `height` | `number`? | Wall height (Snaptrude units, > 0; default engine default) |
24
+ * | `thickness` | `number`? | Wall thickness (Snaptrude units, > 0; default: `wallType`'s total layer thickness when given, else engine default) |
25
+ * | `wallType` | `string`? | Wall type name from `design.types.list("wall")` — layers/material/thickness defaults (default generic) |
26
+ * | `storey` | `number`? (int) | Target storey (must exist) — the run's walls are assigned + lifted to its base in the same undo entry (default: geometry-derived) |
27
+ */
28
+ export const PluginCreateWallRunItem = z.object({
29
+ profile: ProfileHandle,
30
+ height: z.number().optional(),
31
+ thickness: z.number().optional(),
32
+ wallType: z.string().min(1).optional(),
33
+ storey: z.number().int().optional(),
34
+ })
35
+ export type PluginCreateWallRunItem = z.infer<typeof PluginCreateWallRunItem>
36
+
37
+ /** The `items` array of {@linkcode PluginDesignCreateApi.wallRuns} (1…1000). */
38
+ export const PluginCreateWallRunItems = z
39
+ .array(PluginCreateWallRunItem)
40
+ .min(1)
41
+ .max(PLUGIN_CREATE_BATCH_LIMIT)
42
+ export type PluginCreateWallRunItems = z.infer<typeof PluginCreateWallRunItems>
43
+
44
+ // ---------------------------------------------------------------------------
45
+ // floors
46
+ // ---------------------------------------------------------------------------
47
+
48
+ /**
49
+ * One floor to create via {@linkcode PluginDesignCreateApi.floors} — the same
50
+ * footprint-extrude inputs as {@linkcode PluginDesignCreateApi.floor}.
51
+ *
52
+ * | Property | Type | Description |
53
+ * |---|---|---|
54
+ * | `contour` | {@linkcode ContourHandle} | Footprint (outer profile + holes) |
55
+ * | `thickness` | `number` | Floor thickness (Snaptrude units, > 0) |
56
+ * | `position` | {@linkcode Vec3Handle}? | Offset from origin (default origin) |
57
+ */
58
+ export const PluginCreateFloorItem = z.object({
59
+ contour: ContourHandle,
60
+ thickness: z.number(),
61
+ position: Vec3Handle.optional(),
62
+ })
63
+ export type PluginCreateFloorItem = z.infer<typeof PluginCreateFloorItem>
64
+
65
+ /** The `items` array of {@linkcode PluginDesignCreateApi.floors} (1…1000). */
66
+ export const PluginCreateFloorItems = z
67
+ .array(PluginCreateFloorItem)
68
+ .min(1)
69
+ .max(PLUGIN_CREATE_BATCH_LIMIT)
70
+ export type PluginCreateFloorItems = z.infer<typeof PluginCreateFloorItems>
71
+
72
+ // ---------------------------------------------------------------------------
73
+ // doors / windows
74
+ // ---------------------------------------------------------------------------
75
+
76
+ /**
77
+ * One door to place via {@linkcode PluginDesignCreateApi.doors} — the same
78
+ * fields as a `"door"` {@linkcode PluginDesignCreateOpeningOptions}, so the
79
+ * size overrides singular {@linkcode PluginDesignCreateApi.door} lacks are
80
+ * available per item. `facing` and `hinge` are WORLD POINTS, not directions:
81
+ * `facing` on the side of the wall the door swings open to, `hinge` near the
82
+ * jamb it is hinged on. Rejects unknown fields.
83
+ *
84
+ * | Property | Type | Description |
85
+ * |---|---|---|
86
+ * | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
87
+ * | `hostWall` | {@linkcode ComponentHandle} | The wall to host the door |
88
+ * | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
89
+ * | `facing` | {@linkcode Vec3Handle}? | World point on the side the door swings open to (default engine-chosen) |
90
+ * | `hinge` | {@linkcode Vec3Handle}? | World point near the jamb the door is hinged on (default the catalog item's authored side) |
91
+ * | `label` | `string`? | Instance name (optional) |
92
+ * | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
93
+ * | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
94
+ */
95
+ export const PluginCreateDoorItem = z
96
+ .object({ ...PluginOpeningBaseOptions })
97
+ .strict()
98
+ export type PluginCreateDoorItem = z.infer<typeof PluginCreateDoorItem>
99
+
100
+ /** The `items` array of {@linkcode PluginDesignCreateApi.doors} (1…1000). */
101
+ export const PluginCreateDoorItems = z
102
+ .array(PluginCreateDoorItem)
103
+ .min(1)
104
+ .max(PLUGIN_CREATE_BATCH_LIMIT)
105
+ export type PluginCreateDoorItems = z.infer<typeof PluginCreateDoorItems>
106
+
107
+ /**
108
+ * One window to place via {@linkcode PluginDesignCreateApi.windows} — the same
109
+ * fields as a `"window"` {@linkcode PluginDesignCreateOpeningOptions}.
110
+ * `sillHeight` is a nonnegative Snaptrude-unit distance from the host wall's
111
+ * base to the BOTTOM of the window, not to its center. `facing` and `hinge`
112
+ * are WORLD POINTS, not directions: `facing` on the side of the wall the
113
+ * window opens to, `hinge` near the jamb it is hinged on. Rejects unknown
114
+ * fields.
115
+ *
116
+ * | Property | Type | Description |
117
+ * |---|---|---|
118
+ * | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
119
+ * | `hostWall` | {@linkcode ComponentHandle} | The wall to host the window |
120
+ * | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
121
+ * | `facing` | {@linkcode Vec3Handle}? | World point on the side the window opens to (default engine-chosen) |
122
+ * | `hinge` | {@linkcode Vec3Handle}? | World point near the jamb the window is hinged on (default the catalog item's authored side) |
123
+ * | `label` | `string`? | Instance name (optional) |
124
+ * | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
125
+ * | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
126
+ * | `sillHeight` | `number`? | Wall base to window bottom (Snaptrude units, ≥ 0; default the catalog item's) |
127
+ */
128
+ export const PluginCreateWindowItem = z
129
+ .object({
130
+ ...PluginOpeningBaseOptions,
131
+ sillHeight: z.number().finite().nonnegative().optional(),
132
+ })
133
+ .strict()
134
+ export type PluginCreateWindowItem = z.infer<typeof PluginCreateWindowItem>
135
+
136
+ /** The `items` array of {@linkcode PluginDesignCreateApi.windows} (1…1000). */
137
+ export const PluginCreateWindowItems = z
138
+ .array(PluginCreateWindowItem)
139
+ .min(1)
140
+ .max(PLUGIN_CREATE_BATCH_LIMIT)
141
+ export type PluginCreateWindowItems = z.infer<typeof PluginCreateWindowItems>
142
+
143
+ // ---------------------------------------------------------------------------
144
+ // furnitureItems
145
+ // ---------------------------------------------------------------------------
146
+
147
+ /**
148
+ * One furniture instance to place via
149
+ * {@linkcode PluginDesignCreateApi.furnitureItems} — the same inputs as
150
+ * {@linkcode PluginDesignCreateApi.furniture} minus `createNewSourceMesh`: in a
151
+ * batch the host owns source-mesh persistence (a source is recorded once per
152
+ * call, however many items reuse it).
153
+ *
154
+ * `position.y` is the REST elevation: the item is grounded so its bounding-box
155
+ * base sits exactly at `position.y` (the same surface-flush contract as
156
+ * interactive drag-drop) — pass the floor/storey elevation to stand furniture
157
+ * on it; never add half the item's height yourself.
158
+ *
159
+ * | Property | Type | Description |
160
+ * |---|---|---|
161
+ * | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
162
+ * | `position` | {@linkcode Vec3Handle} | Absolute world placement point (`y` = rest elevation) |
163
+ * | `label` | `string`? | Instance name and readable label (default auto `${name}Ins${n}`) |
164
+ * | `angleInDegrees` | `number`? | Rotation about the vertical axis, in degrees (default unrotated) |
165
+ */
166
+ export const PluginCreateFurnitureItem = z.object({
167
+ catalogId: z.string().min(1),
168
+ position: Vec3Handle,
169
+ label: z.string().optional(),
170
+ angleInDegrees: z.number().optional(),
171
+ })
172
+ export type PluginCreateFurnitureItem = z.infer<
173
+ typeof PluginCreateFurnitureItem
174
+ >
175
+
176
+ /**
177
+ * The `items` array of {@linkcode PluginDesignCreateApi.furnitureItems}
178
+ * (1…1000).
179
+ */
180
+ export const PluginCreateFurnitureItems = z
181
+ .array(PluginCreateFurnitureItem)
182
+ .min(1)
183
+ .max(PLUGIN_CREATE_BATCH_LIMIT)
184
+ export type PluginCreateFurnitureItems = z.infer<
185
+ typeof PluginCreateFurnitureItems
186
+ >