@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,551 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../../types";
3
+ import { ComponentHandle, MaterialHandle } from "../../../handles";
4
+ /**
5
+ * `snaptrude.design.materials` — the project material library + material assignment.
6
+ *
7
+ * Materials are {@linkcode MaterialHandle}s (entity-style, name-addressed). Reads return
8
+ * a {@linkcode MaterialHandle}/{@linkcode PluginMaterialInfo}; `apply`/`reset` mutate the
9
+ * scene (undoable via `save`, default `true`). `create` mints a material from a
10
+ * {@linkcode PluginMaterialSpec} (idempotent by name). `list` reads the materials loaded
11
+ * in the project; `listPresets` reads the browsable preset/library catalog (handle-less
12
+ * {@linkcode PluginPresetMaterial} records that become materials via `create`/`apply`).
13
+ *
14
+ * Per-face assignment — {@linkcode PluginDesignMaterialsApi.applyToFaces} /
15
+ * {@linkcode PluginDesignMaterialsApi.resetFaces} plus per-face reads
16
+ * ({@linkcode PluginDesignMaterialsApi.getByFace} / {@linkcode PluginDesignMaterialsApi.listByFace})
17
+ * — targets **BREP faces by durable face index** and is **BREP-only** (furniture,
18
+ * doors/windows, and Revit imports are rejected) and **visual-only** in v1 (the
19
+ * per-face finish is not carried into BIM schedules / cost layers). A face index
20
+ * is durable only while the component's BREP topology (face count/order) is unchanged.
21
+ *
22
+ * `copy` (needs an undo wrapper) lands in a later pass.
23
+ */
24
+ export declare abstract class PluginDesignMaterialsApi {
25
+ constructor();
26
+ /**
27
+ * List the materials loaded in the project — every named material in the live
28
+ * scene (applied finishes, plugin-created materials, and type defaults in use).
29
+ * For the browsable preset/library catalog (finishes not yet in the project),
30
+ * use {@linkcode PluginDesignMaterialsApi.listPresets}.
31
+ *
32
+ * @returns The materials as {@linkcode MaterialHandle}`[]`
33
+ *
34
+ * @examplePrompt List all the materials in this project
35
+ * @examplePrompt What materials do I have available to apply?
36
+ * @examplePrompt Which finishes exist in this model?
37
+ * @examplePrompt Get every material in the project palette
38
+ *
39
+ * # Example
40
+ * ```ts
41
+ * const materials = await snaptrude.design.materials.list()
42
+ * console.log(materials.length, "materials in the project")
43
+ * ```
44
+ */
45
+ abstract list(): PluginApiReturn<MaterialHandle[]>;
46
+ /**
47
+ * List the preset material library — the catalog the app's material browser
48
+ * shows (the built-in finishes plus the workspace's uploaded materials),
49
+ * fetched from the material library service. Library entries are **not**
50
+ * scene materials and carry no {@linkcode MaterialHandle}; each is a named
51
+ * texture record. To use one, feed it to
52
+ * {@linkcode PluginDesignMaterialsApi.create} /
53
+ * {@linkcode PluginDesignMaterialsApi.apply} as a
54
+ * {@linkcode PluginMaterialSpec}: `{ name, textureUrl, materialType: category }`.
55
+ *
56
+ * @returns The library as {@linkcode PluginPresetMaterial}`[]` (`[]` when the
57
+ * library service is unreachable)
58
+ *
59
+ * @examplePrompt Show me the preset materials library
60
+ * @examplePrompt What wood finishes are available in the material library?
61
+ * @examplePrompt Browse the material catalog and apply a brick texture
62
+ * @examplePrompt Which preset materials can I choose from?
63
+ *
64
+ * # Example
65
+ * ```ts
66
+ * const presets = await snaptrude.design.materials.listPresets()
67
+ * const brick = presets.find((p) => p.category.toLowerCase().includes("brick"))
68
+ * if (brick) {
69
+ * const walls = await snaptrude.design.query.listWalls()
70
+ * await snaptrude.design.materials.apply(walls, {
71
+ * name: brick.name,
72
+ * textureUrl: brick.textureUrl,
73
+ * materialType: brick.category,
74
+ * })
75
+ * }
76
+ * ```
77
+ */
78
+ abstract listPresets(): PluginApiReturn<PluginPresetMaterial[]>;
79
+ /**
80
+ * Read a material's descriptor — its name, color, opacity, and texture
81
+ * (when it has one).
82
+ *
83
+ * @param material The material to read
84
+ * @returns The {@linkcode PluginMaterialInfo}, or `null` if the material is gone
85
+ *
86
+ * @examplePrompt What colour is the Brick material?
87
+ * @examplePrompt Show me the details of this material
88
+ * @examplePrompt Get the opacity of the glass finish
89
+ * @examplePrompt Which texture image does the wood material use?
90
+ *
91
+ * # Example
92
+ * ```ts
93
+ * const [material] = await snaptrude.design.materials.list()
94
+ * const info = await snaptrude.design.materials.getInfo(material)
95
+ * if (info) console.log(info.name, info.colorHex, info.alpha)
96
+ * ```
97
+ */
98
+ abstract getInfo(material: MaterialHandle): PluginApiReturn<PluginMaterialInfo | null>;
99
+ /**
100
+ * Read the material applied to a component **as a whole** — the eyedropper. For a
101
+ * uniformly-painted component this is that single material; for a per-face-painted
102
+ * component it is the material on the component's base/first face. Use
103
+ * {@linkcode PluginDesignMaterialsApi.getByFace} /
104
+ * {@linkcode PluginDesignMaterialsApi.listByFace} for the per-face breakdown.
105
+ *
106
+ * @param component The component to sample
107
+ * @returns The whole-object material as a {@linkcode PluginComponentMaterial} — its
108
+ * handle (chain it into `apply` / `getInfo`), engine id, name, and whether the
109
+ * component carries its type `default` or an explicitly `applied` finish — or `null`
110
+ * if the component carries no material
111
+ *
112
+ * @examplePrompt What material is on this wall?
113
+ * @examplePrompt Eyedrop the finish of the selected object
114
+ * @examplePrompt Which material does this slab use?
115
+ * @examplePrompt Read the material on this column so I can paint others with it
116
+ * @examplePrompt Is this component painted, and with what?
117
+ *
118
+ * # Example
119
+ * ```ts
120
+ * const [component] = await snaptrude.design.selection.get()
121
+ * const sampled = await snaptrude.design.materials.get(component)
122
+ * if (sampled) {
123
+ * console.log(sampled.name, sampled.source) // e.g. "Brick Red" "applied"
124
+ * const info = await snaptrude.design.materials.getInfo(sampled.material)
125
+ * console.log(info?.colorHex)
126
+ * }
127
+ * ```
128
+ */
129
+ abstract get(component: ComponentHandle): PluginApiReturn<PluginComponentMaterial | null>;
130
+ /**
131
+ * Apply a material to one or more components — an existing project material by
132
+ * handle, or a new one described inline as a {@linkcode PluginMaterialSpec}.
133
+ * Undoable when `save` is true (the default).
134
+ *
135
+ * @param targets Components to paint
136
+ * @param material Material handle, or an inline {@linkcode PluginMaterialSpec}
137
+ * @param save Commit as an undoable command (default `true`)
138
+ * @returns The number of targets the material was applied to
139
+ *
140
+ * @examplePrompt Paint the selected walls red
141
+ * @examplePrompt Apply the brick material to these walls
142
+ * @examplePrompt Put a wood finish on the floor
143
+ * @examplePrompt Change the colour of this room's walls to #ff8800
144
+ * @examplePrompt Add a concrete texture to the facade
145
+ *
146
+ * # Example
147
+ * ```ts
148
+ * const walls = await snaptrude.design.query.listWalls({ storeys: [1] })
149
+ * // inline spec — creates (or reuses by name) a project material, then applies it
150
+ * const { count } = await snaptrude.design.materials.apply(walls, { name: "Accent Red", color: "#b04a3a" })
151
+ * console.log("painted", count, "walls")
152
+ * ```
153
+ */
154
+ abstract apply(targets: ComponentHandle[], material: MaterialHandle | PluginMaterialSpec, save?: boolean): PluginApiReturn<PluginMaterialResult>;
155
+ /**
156
+ * Reset one or more components back to the default material for their type,
157
+ * removing any applied finish. The inverse of `apply`; undoable when `save`
158
+ * is true (the default).
159
+ *
160
+ * @param components Components to reset
161
+ * @param save Commit as an undoable command (default `true`)
162
+ * @returns The number of components reset
163
+ *
164
+ * @examplePrompt Remove the paint from these walls
165
+ * @examplePrompt Reset the selected objects to their default material
166
+ * @examplePrompt Clear the custom finish on the floor
167
+ * @examplePrompt Restore the original colour of this roof
168
+ *
169
+ * # Example
170
+ * ```ts
171
+ * const selected = await snaptrude.design.selection.get()
172
+ * const { count } = await snaptrude.design.materials.reset(selected)
173
+ * console.log("reset", count, "components to their default material")
174
+ * ```
175
+ */
176
+ abstract reset(components: ComponentHandle[], save?: boolean): PluginApiReturn<PluginMaterialResult>;
177
+ /**
178
+ * Paint specific **BREP faces** of a component with a material — an existing
179
+ * project material by handle, or a new one described inline as a
180
+ * {@linkcode PluginMaterialSpec}. Faces are addressed by **durable BREP face
181
+ * index** (their 0-based position in the component's BREP face list).
182
+ * Undoable when `save` is true (the default).
183
+ *
184
+ * Per-face materials are **BREP-only** (walls, floors, slabs, roofs, masses,
185
+ * columns, beams; furniture, doors/windows, and Revit imports are rejected) and
186
+ * **visual-only in v1** — the finish is not carried into BIM schedules / cost
187
+ * layers. A face index is durable only while the BREP topology (face count/order)
188
+ * is unchanged; a face index at or beyond the face count is rejected.
189
+ *
190
+ * @param component The (BREP) component to paint
191
+ * @param faces BREP face indices to paint (nonnegative integers)
192
+ * @param material Material handle, or an inline {@linkcode PluginMaterialSpec}
193
+ * @param save Commit as an undoable command (default `true`)
194
+ * @returns The number of faces painted
195
+ *
196
+ * @examplePrompt Paint the top face of this slab red
197
+ * @examplePrompt Apply the brick material to faces 0 and 2 of this wall
198
+ * @examplePrompt Put a wood finish on just the front face of this column
199
+ * @examplePrompt Colour face 4 of the selected mass with #ff8800
200
+ *
201
+ * # Example
202
+ * ```ts
203
+ * const [wall] = await snaptrude.design.query.listWalls({ storeys: [1] })
204
+ * // faces are addressed by durable 0-based BREP face index
205
+ * const { count } = await snaptrude.design.materials.applyToFaces(wall, [0, 1], { name: "Accent", color: "#b04a3a" })
206
+ * console.log("painted", count, "faces")
207
+ * ```
208
+ */
209
+ abstract applyToFaces(component: ComponentHandle, faces: number[], material: MaterialHandle | PluginMaterialSpec, save?: boolean): PluginApiReturn<PluginMaterialResult>;
210
+ /**
211
+ * Reset specific BREP faces of a component back to the component/type default,
212
+ * removing any per-face finish. The inverse of
213
+ * {@linkcode PluginDesignMaterialsApi.applyToFaces}; undoable when `save` is true
214
+ * (the default). BREP-only (see `applyToFaces`).
215
+ *
216
+ * @param component The (BREP) component
217
+ * @param faces BREP face indices to reset (nonnegative integers)
218
+ * @param save Commit as an undoable command (default `true`)
219
+ * @returns The number of faces reset
220
+ *
221
+ * @examplePrompt Remove the paint from the top face of this slab
222
+ * @examplePrompt Reset faces 0 and 2 of this wall to their default material
223
+ * @examplePrompt Clear the custom finish on the front face of this column
224
+ *
225
+ * # Example
226
+ * ```ts
227
+ * const [wall] = await snaptrude.design.query.listWalls({ storeys: [1] })
228
+ * const { count } = await snaptrude.design.materials.resetFaces(wall, [0, 1])
229
+ * console.log("reset", count, "faces")
230
+ * ```
231
+ */
232
+ abstract resetFaces(component: ComponentHandle, faces: number[], save?: boolean): PluginApiReturn<PluginMaterialResult>;
233
+ /**
234
+ * Read the material applied to a single BREP face.
235
+ *
236
+ * @param component The (BREP) component
237
+ * @param face The BREP face index (a nonnegative integer)
238
+ * @returns The face's material as a {@linkcode MaterialHandle}, or `null` if the
239
+ * face carries no explicit per-face material (or the component has no BREP)
240
+ *
241
+ * @examplePrompt What material is on the top face of this slab?
242
+ * @examplePrompt Get the finish applied to face 2 of this wall
243
+ * @examplePrompt Which material is painted on the front face of this column?
244
+ *
245
+ * # Example
246
+ * ```ts
247
+ * const [wall] = await snaptrude.design.query.listWalls()
248
+ * const material = await snaptrude.design.materials.getByFace(wall, 0)
249
+ * if (material) console.log(await snaptrude.design.materials.getInfo(material))
250
+ * ```
251
+ */
252
+ abstract getByFace(component: ComponentHandle, face: number): PluginApiReturn<MaterialHandle | null>;
253
+ /**
254
+ * List the per-face materials of a component — one entry per BREP face, in face
255
+ * index order. A face carrying no explicit per-face material reports `null`.
256
+ *
257
+ * @param component The (BREP) component
258
+ * @returns The per-face materials as {@linkcode PluginFaceMaterial}`[]` (`[]` for a
259
+ * component with no BREP)
260
+ *
261
+ * @examplePrompt List the material on every face of this wall
262
+ * @examplePrompt Show me which faces of this slab are painted and with what
263
+ * @examplePrompt Break down the per-face finishes of the selected mass
264
+ *
265
+ * # Example
266
+ * ```ts
267
+ * const [wall] = await snaptrude.design.query.listWalls()
268
+ * const faces = await snaptrude.design.materials.listByFace(wall)
269
+ * for (const f of faces) console.log(f.faceIndex, f.material ?? "(default)")
270
+ * ```
271
+ */
272
+ abstract listByFace(component: ComponentHandle): PluginApiReturn<PluginFaceMaterial[]>;
273
+ /**
274
+ * Create a new material in the project from a spec — a color, texture URL,
275
+ * opacity, and/or name. Idempotent by name: creating with the name of an
276
+ * existing material returns that material instead of duplicating it.
277
+ *
278
+ * @param spec The material construction spec
279
+ * @returns The new material as a {@linkcode MaterialHandle}
280
+ *
281
+ * @examplePrompt Create a new red material called Accent
282
+ * @examplePrompt Make a material from this texture image URL
283
+ * @examplePrompt Add a semi-transparent glass material to the project
284
+ * @examplePrompt Define a dark grey concrete finish I can reuse
285
+ *
286
+ * # Example
287
+ * ```ts
288
+ * const glass = await snaptrude.design.materials.create({ name: "Frosted Glass", color: "#cfe4e8", alpha: 0.4 })
289
+ * const walls = await snaptrude.design.query.listWalls({ storeys: [1] })
290
+ * await snaptrude.design.materials.apply(walls, glass)
291
+ * ```
292
+ */
293
+ abstract create(spec: PluginMaterialSpec): PluginApiReturn<MaterialHandle>;
294
+ /**
295
+ * Get the default material for a component's type.
296
+ * @param component The component to look up
297
+ * @returns The default material as a {@linkcode MaterialHandle}, or `null`
298
+ *
299
+ * @examplePrompt What is the default material for walls?
300
+ * @examplePrompt Get the standard material this floor type uses
301
+ * @examplePrompt Which material would this roof have out of the box?
302
+ * @examplePrompt Find the default finish for the selected column
303
+ *
304
+ * # Example
305
+ * ```ts
306
+ * const [wall] = await snaptrude.design.query.listWalls()
307
+ * const defaultMaterial = await snaptrude.design.materials.getDefault(wall)
308
+ * if (defaultMaterial) console.log(await snaptrude.design.materials.getInfo(defaultMaterial))
309
+ * ```
310
+ */
311
+ abstract getDefault(component: ComponentHandle): PluginApiReturn<MaterialHandle | null>;
312
+ /**
313
+ * Test whether a component carries its (type) default material.
314
+ * @param component The component to test
315
+ * @returns `true` if default, otherwise `false`
316
+ *
317
+ * @examplePrompt Is this wall still using its default material?
318
+ * @examplePrompt Has the material on this floor been changed?
319
+ * @examplePrompt Check if the selected object still has its original finish
320
+ * @examplePrompt Tell me whether this roof has been painted or is still standard
321
+ *
322
+ * # Example
323
+ * ```ts
324
+ * const [wall] = await snaptrude.design.query.listWalls()
325
+ * const untouched = await snaptrude.design.materials.isDefault(wall)
326
+ * console.log(untouched ? "still default" : "has been painted")
327
+ * ```
328
+ */
329
+ abstract isDefault(component: ComponentHandle): PluginApiReturn<boolean>;
330
+ /**
331
+ * Test whether a component has a single (uniform) material across all faces.
332
+ * @param component The component to test
333
+ * @returns `true` if uniform, otherwise `false`
334
+ *
335
+ * @examplePrompt Does this wall have the same material on every face?
336
+ * @examplePrompt Is the floor finished uniformly or face by face?
337
+ * @examplePrompt Check if this column is a single material all over
338
+ * @examplePrompt Are any faces of the selected object painted differently?
339
+ *
340
+ * # Example
341
+ * ```ts
342
+ * const [selected] = await snaptrude.design.selection.get()
343
+ * const uniform = await snaptrude.design.materials.isUniform(selected)
344
+ * console.log(uniform ? "one material all over" : "painted per face")
345
+ * ```
346
+ */
347
+ abstract isUniform(component: ComponentHandle): PluginApiReturn<boolean>;
348
+ /**
349
+ * Test whether a material has a texture.
350
+ * @param material The material to test
351
+ * @returns `true` if it has a diffuse texture, otherwise `false`
352
+ *
353
+ * @examplePrompt Does this material have a texture image?
354
+ * @examplePrompt Is the brick material textured or just a flat colour?
355
+ * @examplePrompt Check whether the wood finish uses an image map
356
+ * @examplePrompt Tell me if this material is image-based or a plain colour
357
+ *
358
+ * # Example
359
+ * ```ts
360
+ * const [material] = await snaptrude.design.materials.list()
361
+ * const textured = await snaptrude.design.materials.hasTexture(material)
362
+ * console.log(textured ? "image-based" : "flat colour")
363
+ * ```
364
+ */
365
+ abstract hasTexture(material: MaterialHandle): PluginApiReturn<boolean>;
366
+ }
367
+ /**
368
+ * A material's descriptor.
369
+ *
370
+ * | Property | Type | Description |
371
+ * |---|---|---|
372
+ * | `name` | `string` | Material name (== the handle token) |
373
+ * | `id` | `string` | Engine material id |
374
+ * | `colorHex` | `string` | Diffuse color as `#rrggbb` |
375
+ * | `alpha` | `number` | Opacity `0..1` |
376
+ * | `materialType` | `string` | Material type tag (optional) |
377
+ * | `textureUrl` | `string` | Diffuse texture URL (optional) |
378
+ */
379
+ export declare const PluginMaterialInfo: z.ZodObject<{
380
+ name: z.ZodString;
381
+ id: z.ZodString;
382
+ colorHex: z.ZodString;
383
+ alpha: z.ZodNumber;
384
+ materialType: z.ZodOptional<z.ZodString>;
385
+ textureUrl: z.ZodOptional<z.ZodString>;
386
+ }, z.core.$strip>;
387
+ export type PluginMaterialInfo = z.infer<typeof PluginMaterialInfo>;
388
+ /**
389
+ * A material construction spec (input DTO — NOT a handle).
390
+ *
391
+ * | Property | Type | Description |
392
+ * |---|---|---|
393
+ * | `name` | `string` | Name (optional; generated if omitted) |
394
+ * | `color` | `string` | Diffuse color `#rrggbb` (optional) |
395
+ * | `textureUrl` | `string` | Diffuse texture URL (optional; wins over color) |
396
+ * | `alpha` | `number` | Opacity `0..1` (optional) |
397
+ * | `materialType` | `string` | Material type tag (optional) |
398
+ */
399
+ export declare const PluginMaterialSpec: z.ZodObject<{
400
+ name: z.ZodOptional<z.ZodString>;
401
+ color: z.ZodOptional<z.ZodString>;
402
+ textureUrl: z.ZodOptional<z.ZodString>;
403
+ alpha: z.ZodOptional<z.ZodNumber>;
404
+ materialType: z.ZodOptional<z.ZodString>;
405
+ }, z.core.$strip>;
406
+ export type PluginMaterialSpec = z.infer<typeof PluginMaterialSpec>;
407
+ /** Result of a material mutation — the count of targets affected. */
408
+ export declare const PluginMaterialResult: z.ZodObject<{
409
+ count: z.ZodNumber;
410
+ }, z.core.$strip>;
411
+ export type PluginMaterialResult = z.infer<typeof PluginMaterialResult>;
412
+ /**
413
+ * A single component face's material assignment (value record — not a handle).
414
+ *
415
+ * | Property | Type | Description |
416
+ * |---|---|---|
417
+ * | `faceIndex` | `number` | Durable BREP face index (0-based position in the face list) |
418
+ * | `material` | {@linkcode MaterialHandle} \| `null` | The applied material, or `null` for the default |
419
+ */
420
+ export declare const PluginFaceMaterial: z.ZodObject<{
421
+ faceIndex: z.ZodNumber;
422
+ material: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<MaterialHandle, string>>>;
423
+ }, z.core.$strip>;
424
+ export type PluginFaceMaterial = z.infer<typeof PluginFaceMaterial>;
425
+ /**
426
+ * The material on a component **as a whole** — the eyedropper read returned by
427
+ * {@linkcode PluginDesignMaterialsApi.get} (value record, plus a reusable handle).
428
+ *
429
+ * | Property | Type | Description |
430
+ * |---|---|---|
431
+ * | `material` | {@linkcode MaterialHandle} | The whole-object material — chain into `apply` / `getInfo` |
432
+ * | `id` | `string` | Engine material id |
433
+ * | `name` | `string` | Material name (== the handle token) |
434
+ * | `source` | `"default" \| "applied"` | Whether it is the component's type default or an explicitly-applied finish |
435
+ */
436
+ export declare const PluginComponentMaterial: z.ZodObject<{
437
+ material: z.ZodPipe<z.ZodString, z.ZodTransform<MaterialHandle, string>>;
438
+ id: z.ZodString;
439
+ name: z.ZodString;
440
+ source: z.ZodEnum<{
441
+ default: "default";
442
+ applied: "applied";
443
+ }>;
444
+ }, z.core.$strip>;
445
+ export type PluginComponentMaterial = z.infer<typeof PluginComponentMaterial>;
446
+ /**
447
+ * A preset material library entry (value record — NOT a handle), returned by
448
+ * {@linkcode PluginDesignMaterialsApi.listPresets}.
449
+ *
450
+ * | Property | Type | Description |
451
+ * |---|---|---|
452
+ * | `name` | `string` | Display name of the library entry |
453
+ * | `category` | `string` | Library category (camelCase, e.g. `"wood"`, `"colors"`, `"brick"`) |
454
+ * | `textureUrl` | `string` | Texture/swatch image URL — feed to {@linkcode PluginMaterialSpec}`.textureUrl` |
455
+ */
456
+ export declare const PluginPresetMaterial: z.ZodObject<{
457
+ name: z.ZodString;
458
+ category: z.ZodString;
459
+ textureUrl: z.ZodString;
460
+ }, z.core.$strip>;
461
+ export type PluginPresetMaterial = z.infer<typeof PluginPresetMaterial>;
462
+ /** Arguments for {@linkcode PluginDesignMaterialsApi.getInfo} / `hasTexture`. */
463
+ export declare const PluginDesignMaterialsGetInfoArgs: z.ZodObject<{
464
+ material: z.ZodPipe<z.ZodString, z.ZodTransform<MaterialHandle, string>>;
465
+ }, z.core.$strip>;
466
+ export type PluginDesignMaterialsGetInfoArgs = z.infer<typeof PluginDesignMaterialsGetInfoArgs>;
467
+ /** Arguments for component-scoped predicates (`getDefault`/`isDefault`/`isUniform`). */
468
+ export declare const PluginDesignMaterialsComponentArgs: z.ZodObject<{
469
+ component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
470
+ }, z.core.$strip>;
471
+ export type PluginDesignMaterialsComponentArgs = z.infer<typeof PluginDesignMaterialsComponentArgs>;
472
+ /**
473
+ * Arguments for {@linkcode PluginDesignMaterialsApi.apply}.
474
+ *
475
+ * | Property | Type | Description |
476
+ * |---|---|---|
477
+ * | `targets` | {@linkcode ComponentHandle}`[]` | Components to paint |
478
+ * | `material` | {@linkcode MaterialHandle} \| {@linkcode PluginMaterialSpec} | Material handle, or an inline spec |
479
+ * | `save` | `boolean` | Commit as an undoable command (default `true`) |
480
+ */
481
+ export declare const PluginDesignMaterialsApplyArgs: z.ZodObject<{
482
+ targets: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
483
+ material: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<MaterialHandle, string>>, z.ZodObject<{
484
+ name: z.ZodOptional<z.ZodString>;
485
+ color: z.ZodOptional<z.ZodString>;
486
+ textureUrl: z.ZodOptional<z.ZodString>;
487
+ alpha: z.ZodOptional<z.ZodNumber>;
488
+ materialType: z.ZodOptional<z.ZodString>;
489
+ }, z.core.$strip>]>;
490
+ save: z.ZodOptional<z.ZodBoolean>;
491
+ }, z.core.$strip>;
492
+ export type PluginDesignMaterialsApplyArgs = z.infer<typeof PluginDesignMaterialsApplyArgs>;
493
+ /** Arguments for {@linkcode PluginDesignMaterialsApi.reset}. */
494
+ export declare const PluginDesignMaterialsResetArgs: z.ZodObject<{
495
+ components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
496
+ save: z.ZodOptional<z.ZodBoolean>;
497
+ }, z.core.$strip>;
498
+ export type PluginDesignMaterialsResetArgs = z.infer<typeof PluginDesignMaterialsResetArgs>;
499
+ /** Arguments for {@linkcode PluginDesignMaterialsApi.create}. */
500
+ export declare const PluginDesignMaterialsCreateArgs: z.ZodObject<{
501
+ spec: z.ZodObject<{
502
+ name: z.ZodOptional<z.ZodString>;
503
+ color: z.ZodOptional<z.ZodString>;
504
+ textureUrl: z.ZodOptional<z.ZodString>;
505
+ alpha: z.ZodOptional<z.ZodNumber>;
506
+ materialType: z.ZodOptional<z.ZodString>;
507
+ }, z.core.$strip>;
508
+ }, z.core.$strip>;
509
+ export type PluginDesignMaterialsCreateArgs = z.infer<typeof PluginDesignMaterialsCreateArgs>;
510
+ /**
511
+ * Arguments for {@linkcode PluginDesignMaterialsApi.applyToFaces}.
512
+ *
513
+ * | Property | Type | Description |
514
+ * |---|---|---|
515
+ * | `component` | {@linkcode ComponentHandle} | The (BREP) component to paint |
516
+ * | `faces` | `number[]` | BREP face indices to paint (nonnegative integers) |
517
+ * | `material` | {@linkcode MaterialHandle} \| {@linkcode PluginMaterialSpec} | Material handle, or an inline spec |
518
+ * | `save` | `boolean` | Commit as an undoable command (default `true`) |
519
+ */
520
+ export declare const PluginDesignMaterialsApplyToFacesArgs: z.ZodObject<{
521
+ component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
522
+ faces: z.ZodArray<z.ZodNumber>;
523
+ material: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<MaterialHandle, string>>, z.ZodObject<{
524
+ name: z.ZodOptional<z.ZodString>;
525
+ color: z.ZodOptional<z.ZodString>;
526
+ textureUrl: z.ZodOptional<z.ZodString>;
527
+ alpha: z.ZodOptional<z.ZodNumber>;
528
+ materialType: z.ZodOptional<z.ZodString>;
529
+ }, z.core.$strip>]>;
530
+ save: z.ZodOptional<z.ZodBoolean>;
531
+ }, z.core.$strip>;
532
+ export type PluginDesignMaterialsApplyToFacesArgs = z.infer<typeof PluginDesignMaterialsApplyToFacesArgs>;
533
+ /** Arguments for {@linkcode PluginDesignMaterialsApi.resetFaces}. */
534
+ export declare const PluginDesignMaterialsResetFacesArgs: z.ZodObject<{
535
+ component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
536
+ faces: z.ZodArray<z.ZodNumber>;
537
+ save: z.ZodOptional<z.ZodBoolean>;
538
+ }, z.core.$strip>;
539
+ export type PluginDesignMaterialsResetFacesArgs = z.infer<typeof PluginDesignMaterialsResetFacesArgs>;
540
+ /** Arguments for {@linkcode PluginDesignMaterialsApi.getByFace}. */
541
+ export declare const PluginDesignMaterialsGetByFaceArgs: z.ZodObject<{
542
+ component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
543
+ face: z.ZodNumber;
544
+ }, z.core.$strip>;
545
+ export type PluginDesignMaterialsGetByFaceArgs = z.infer<typeof PluginDesignMaterialsGetByFaceArgs>;
546
+ /** Arguments for {@linkcode PluginDesignMaterialsApi.listByFace} (component only). */
547
+ export declare const PluginDesignMaterialsListByFaceArgs: z.ZodObject<{
548
+ component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
549
+ }, z.core.$strip>;
550
+ export type PluginDesignMaterialsListByFaceArgs = z.infer<typeof PluginDesignMaterialsListByFaceArgs>;
551
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/materials/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAElE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,8BAAsB,wBAAwB;;IAG5C;;;;;;;;;;;;;;;;;;OAkBG;aACa,IAAI,IAAI,eAAe,CAAC,cAAc,EAAE,CAAC;IAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;aACa,WAAW,IAAI,eAAe,CAAC,oBAAoB,EAAE,CAAC;IAEtE;;;;;;;;;;;;;;;;;;OAkBG;aACa,OAAO,CACrB,QAAQ,EAAE,cAAc,GACvB,eAAe,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6B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