@snaptrude/plugin-core 0.3.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/AGENTS.md +130 -48
  2. package/CHANGELOG.md +163 -0
  3. package/api-manifest.full.json +5600 -0
  4. package/api-manifest.json +5502 -0
  5. package/dist/api/analysis/heatmaps.d.ts +234 -0
  6. package/dist/api/analysis/heatmaps.d.ts.map +1 -0
  7. package/dist/api/analysis/illuminance.d.ts +145 -0
  8. package/dist/api/analysis/illuminance.d.ts.map +1 -0
  9. package/dist/api/analysis/index.d.ts +44 -0
  10. package/dist/api/analysis/index.d.ts.map +1 -0
  11. package/dist/api/analysis/shadows.d.ts +165 -0
  12. package/dist/api/analysis/shadows.d.ts.map +1 -0
  13. package/dist/api/analysis/sunlightHours.d.ts +208 -0
  14. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  15. package/dist/api/analysis/sunpath.d.ts +80 -0
  16. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  17. package/dist/api/core/buildings.d.ts +427 -0
  18. package/dist/api/core/buildings.d.ts.map +1 -0
  19. package/dist/api/core/comment/index.d.ts +230 -0
  20. package/dist/api/core/comment/index.d.ts.map +1 -0
  21. package/dist/api/core/geom/create/index.d.ts +247 -0
  22. package/dist/api/core/geom/create/index.d.ts.map +1 -0
  23. package/dist/api/core/geom/delete/index.d.ts +72 -0
  24. package/dist/api/core/geom/delete/index.d.ts.map +1 -0
  25. package/dist/api/core/geom/index.d.ts +24 -23
  26. package/dist/api/core/geom/index.d.ts.map +1 -1
  27. package/dist/api/core/geom/query/arc.d.ts +169 -0
  28. package/dist/api/core/geom/query/arc.d.ts.map +1 -0
  29. package/dist/api/core/geom/query/brep.d.ts +402 -0
  30. package/dist/api/core/geom/query/brep.d.ts.map +1 -0
  31. package/dist/api/core/geom/query/circle.d.ts +378 -0
  32. package/dist/api/core/geom/query/circle.d.ts.map +1 -0
  33. package/dist/api/core/geom/query/contour.d.ts +450 -0
  34. package/dist/api/core/geom/query/contour.d.ts.map +1 -0
  35. package/dist/api/core/geom/query/curve.d.ts +918 -0
  36. package/dist/api/core/geom/query/curve.d.ts.map +1 -0
  37. package/dist/api/core/geom/query/edge.d.ts +128 -0
  38. package/dist/api/core/geom/query/edge.d.ts.map +1 -0
  39. package/dist/api/core/geom/query/face.d.ts +363 -0
  40. package/dist/api/core/geom/query/face.d.ts.map +1 -0
  41. package/dist/api/core/geom/query/halfedge.d.ts +206 -0
  42. package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
  43. package/dist/api/core/geom/query/index.d.ts +61 -0
  44. package/dist/api/core/geom/query/index.d.ts.map +1 -0
  45. package/dist/api/core/geom/query/profile.d.ts +410 -0
  46. package/dist/api/core/geom/query/profile.d.ts.map +1 -0
  47. package/dist/api/core/geom/query/vertex.d.ts +187 -0
  48. package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
  49. package/dist/api/core/geom/update/contour.d.ts +272 -0
  50. package/dist/api/core/geom/update/contour.d.ts.map +1 -0
  51. package/dist/api/core/geom/update/curve.d.ts +180 -0
  52. package/dist/api/core/geom/update/curve.d.ts.map +1 -0
  53. package/dist/api/core/geom/update/index.d.ts +27 -0
  54. package/dist/api/core/geom/update/index.d.ts.map +1 -0
  55. package/dist/api/core/geom/update/profile.d.ts +329 -0
  56. package/dist/api/core/geom/update/profile.d.ts.map +1 -0
  57. package/dist/api/core/groups.d.ts +485 -0
  58. package/dist/api/core/groups.d.ts.map +1 -0
  59. package/dist/api/core/history/index.d.ts +78 -0
  60. package/dist/api/core/history/index.d.ts.map +1 -0
  61. package/dist/api/core/index.d.ts +51 -1
  62. package/dist/api/core/index.d.ts.map +1 -1
  63. package/dist/api/core/io/import/index.d.ts +392 -0
  64. package/dist/api/core/io/import/index.d.ts.map +1 -0
  65. package/dist/api/core/io/index.d.ts +35 -0
  66. package/dist/api/core/io/index.d.ts.map +1 -0
  67. package/dist/api/core/io/job/index.d.ts +139 -0
  68. package/dist/api/core/io/job/index.d.ts.map +1 -0
  69. package/dist/api/core/io/query/index.d.ts +74 -0
  70. package/dist/api/core/io/query/index.d.ts.map +1 -0
  71. package/dist/api/core/io/terrain/index.d.ts +206 -0
  72. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  73. package/dist/api/core/io/underlay/index.d.ts +286 -0
  74. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  75. package/dist/api/core/layers.d.ts +402 -0
  76. package/dist/api/core/layers.d.ts.map +1 -0
  77. package/dist/api/core/math/quat.d.ts +111 -128
  78. package/dist/api/core/math/quat.d.ts.map +1 -1
  79. package/dist/api/core/math/vec3.d.ts +120 -102
  80. package/dist/api/core/math/vec3.d.ts.map +1 -1
  81. package/dist/api/core/project/index.d.ts +399 -0
  82. package/dist/api/core/project/index.d.ts.map +1 -0
  83. package/dist/api/core/tags.d.ts +755 -0
  84. package/dist/api/core/tags.d.ts.map +1 -0
  85. package/dist/api/core/units/index.d.ts +175 -0
  86. package/dist/api/core/units/index.d.ts.map +1 -0
  87. package/dist/api/core/zoom/index.d.ts +45 -0
  88. package/dist/api/core/zoom/index.d.ts.map +1 -0
  89. package/dist/api/design/boolean/index.d.ts +168 -0
  90. package/dist/api/design/boolean/index.d.ts.map +1 -0
  91. package/dist/api/design/create/index.d.ts +837 -0
  92. package/dist/api/design/create/index.d.ts.map +1 -0
  93. package/dist/api/design/delete/index.d.ts +63 -0
  94. package/dist/api/design/delete/index.d.ts.map +1 -0
  95. package/dist/api/design/doors/index.d.ts +268 -0
  96. package/dist/api/design/doors/index.d.ts.map +1 -0
  97. package/dist/api/design/edit/index.d.ts +49 -0
  98. package/dist/api/design/edit/index.d.ts.map +1 -0
  99. package/dist/api/design/erase/index.d.ts +160 -0
  100. package/dist/api/design/erase/index.d.ts.map +1 -0
  101. package/dist/api/design/furniture/index.d.ts +123 -0
  102. package/dist/api/design/furniture/index.d.ts.map +1 -0
  103. package/dist/api/design/index.d.ts +153 -0
  104. package/dist/api/design/index.d.ts.map +1 -0
  105. package/dist/api/design/lock.d.ts +41 -0
  106. package/dist/api/design/lock.d.ts.map +1 -0
  107. package/dist/api/design/materials/index.d.ts +297 -0
  108. package/dist/api/design/materials/index.d.ts.map +1 -0
  109. package/dist/api/design/query/geometry/index.d.ts +140 -0
  110. package/dist/api/design/query/geometry/index.d.ts.map +1 -0
  111. package/dist/api/design/query/index.d.ts +1011 -0
  112. package/dist/api/design/query/index.d.ts.map +1 -0
  113. package/dist/api/design/query/spaces.d.ts +221 -0
  114. package/dist/api/design/query/spaces.d.ts.map +1 -0
  115. package/dist/api/design/selection/index.d.ts +282 -0
  116. package/dist/api/design/selection/index.d.ts.map +1 -0
  117. package/dist/api/design/shared.d.ts +38 -0
  118. package/dist/api/design/shared.d.ts.map +1 -0
  119. package/dist/api/design/transform/index.d.ts +87 -0
  120. package/dist/api/design/transform/index.d.ts.map +1 -0
  121. package/dist/api/design/update/index.d.ts +178 -0
  122. package/dist/api/design/update/index.d.ts.map +1 -0
  123. package/dist/api/design/windows/index.d.ts +189 -0
  124. package/dist/api/design/windows/index.d.ts.map +1 -0
  125. package/dist/api/entity/buildableEnvelope.d.ts +261 -0
  126. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  127. package/dist/api/entity/department.d.ts +0 -98
  128. package/dist/api/entity/department.d.ts.map +1 -1
  129. package/dist/api/entity/index.d.ts +9 -9
  130. package/dist/api/entity/index.d.ts.map +1 -1
  131. package/dist/api/entity/referenceLine.d.ts +49 -106
  132. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  133. package/dist/api/entity/space.d.ts +484 -251
  134. package/dist/api/entity/space.d.ts.map +1 -1
  135. package/dist/api/entity/story.d.ts +49 -39
  136. package/dist/api/entity/story.d.ts.map +1 -1
  137. package/dist/api/index.d.ts +22 -12
  138. package/dist/api/index.d.ts.map +1 -1
  139. package/dist/api/presentation/aiInspiration.d.ts +440 -0
  140. package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
  141. package/dist/api/presentation/diagrams.d.ts +81 -0
  142. package/dist/api/presentation/diagrams.d.ts.map +1 -0
  143. package/dist/api/presentation/import.d.ts +113 -0
  144. package/dist/api/presentation/import.d.ts.map +1 -0
  145. package/dist/api/presentation/index.d.ts +46 -0
  146. package/dist/api/presentation/index.d.ts.map +1 -0
  147. package/dist/api/presentation/sheets.d.ts +176 -0
  148. package/dist/api/presentation/sheets.d.ts.map +1 -0
  149. package/dist/api/presentation/views.d.ts +296 -0
  150. package/dist/api/presentation/views.d.ts.map +1 -0
  151. package/dist/api/program/adjacency.d.ts +155 -0
  152. package/dist/api/program/adjacency.d.ts.map +1 -0
  153. package/dist/api/program/areas.d.ts +360 -0
  154. package/dist/api/program/areas.d.ts.map +1 -0
  155. package/dist/api/program/classification.d.ts +135 -0
  156. package/dist/api/program/classification.d.ts.map +1 -0
  157. package/dist/api/program/cores.d.ts +174 -0
  158. package/dist/api/program/cores.d.ts.map +1 -0
  159. package/dist/api/program/departments.d.ts +431 -0
  160. package/dist/api/program/departments.d.ts.map +1 -0
  161. package/dist/api/program/index.d.ts +69 -0
  162. package/dist/api/program/index.d.ts.map +1 -0
  163. package/dist/api/program/layout.d.ts +63 -0
  164. package/dist/api/program/layout.d.ts.map +1 -0
  165. package/dist/api/program/metrics.d.ts +108 -0
  166. package/dist/api/program/metrics.d.ts.map +1 -0
  167. package/dist/api/program/site.d.ts +451 -0
  168. package/dist/api/program/site.d.ts.map +1 -0
  169. package/dist/api/program/spreadsheet.d.ts +2041 -0
  170. package/dist/api/program/spreadsheet.d.ts.map +1 -0
  171. package/dist/handles.d.ts +171 -0
  172. package/dist/handles.d.ts.map +1 -0
  173. package/dist/host-utils.d.ts +7 -5
  174. package/dist/host-utils.d.ts.map +1 -1
  175. package/dist/index.cjs +4344 -899
  176. package/dist/index.cjs.map +1 -1
  177. package/dist/index.d.ts +1 -0
  178. package/dist/index.d.ts.map +1 -1
  179. package/dist/index.js +3682 -865
  180. package/dist/index.js.map +1 -1
  181. package/package.json +6 -2
  182. package/scripts/generate-manifest.mjs +193 -0
  183. package/scripts/generate-manifest.test.mjs +215 -0
  184. package/src/api/analysis/heatmaps.ts +256 -0
  185. package/src/api/analysis/illuminance.ts +155 -0
  186. package/src/api/analysis/index.ts +46 -0
  187. package/src/api/analysis/shadows.ts +183 -0
  188. package/src/api/analysis/sunlightHours.ts +211 -0
  189. package/src/api/analysis/sunpath.ts +83 -0
  190. package/src/api/core/buildings.ts +485 -0
  191. package/src/api/core/comment/index.ts +258 -0
  192. package/src/api/core/geom/create/index.ts +293 -0
  193. package/src/api/core/geom/delete/index.ts +78 -0
  194. package/src/api/core/geom/index.ts +24 -23
  195. package/src/api/core/geom/query/arc.ts +169 -0
  196. package/src/api/core/geom/query/brep.ts +444 -0
  197. package/src/api/core/geom/query/circle.ts +404 -0
  198. package/src/api/core/geom/query/contour.ts +540 -0
  199. package/src/api/core/geom/query/curve.ts +1078 -0
  200. package/src/api/core/geom/query/edge.ts +130 -0
  201. package/src/api/core/geom/query/face.ts +403 -0
  202. package/src/api/core/geom/query/halfedge.ts +210 -0
  203. package/src/api/core/geom/query/index.ts +63 -0
  204. package/src/api/core/geom/query/profile.ts +473 -0
  205. package/src/api/core/geom/query/vertex.ts +205 -0
  206. package/src/api/core/geom/update/contour.ts +315 -0
  207. package/src/api/core/geom/update/curve.ts +209 -0
  208. package/src/api/core/geom/update/index.ts +29 -0
  209. package/src/api/core/geom/update/profile.ts +377 -0
  210. package/src/api/core/groups.ts +521 -0
  211. package/src/api/core/history/index.ts +84 -0
  212. package/src/api/core/index.ts +51 -1
  213. package/src/api/core/io/import/index.ts +432 -0
  214. package/src/api/core/io/index.ts +37 -0
  215. package/src/api/core/io/job/index.ts +140 -0
  216. package/src/api/core/io/query/index.ts +71 -0
  217. package/src/api/core/io/terrain/index.ts +214 -0
  218. package/src/api/core/io/underlay/index.ts +295 -0
  219. package/src/api/core/layers.ts +333 -0
  220. package/src/api/core/math/quat.ts +112 -235
  221. package/src/api/core/math/vec3.ts +124 -159
  222. package/src/api/core/project/index.ts +418 -0
  223. package/src/api/core/tags.ts +808 -0
  224. package/src/api/core/units/index.ts +164 -0
  225. package/src/api/core/zoom/index.ts +47 -0
  226. package/src/api/design/boolean/index.ts +179 -0
  227. package/src/api/design/create/index.ts +895 -0
  228. package/src/api/design/delete/index.ts +67 -0
  229. package/src/api/design/doors/index.ts +285 -0
  230. package/src/api/design/edit/index.ts +54 -0
  231. package/src/api/design/erase/index.ts +151 -0
  232. package/src/api/design/furniture/index.ts +130 -0
  233. package/src/api/design/index.ts +162 -0
  234. package/src/api/design/lock.ts +42 -0
  235. package/src/api/design/materials/index.ts +301 -0
  236. package/src/api/design/query/geometry/index.ts +166 -0
  237. package/src/api/design/query/index.ts +937 -0
  238. package/src/api/design/query/spaces.ts +132 -0
  239. package/src/api/design/selection/index.ts +273 -0
  240. package/src/api/design/shared.ts +40 -0
  241. package/src/api/design/transform/index.ts +93 -0
  242. package/src/api/design/update/index.ts +117 -0
  243. package/src/api/design/windows/index.ts +207 -0
  244. package/src/api/entity/buildableEnvelope.ts +318 -0
  245. package/src/api/entity/department.ts +0 -113
  246. package/src/api/entity/index.ts +9 -9
  247. package/src/api/entity/referenceLine.ts +50 -38
  248. package/src/api/entity/space.ts +285 -226
  249. package/src/api/entity/story.ts +53 -42
  250. package/src/api/index.ts +22 -12
  251. package/src/api/presentation/aiInspiration.ts +362 -0
  252. package/src/api/presentation/diagrams.ts +84 -0
  253. package/src/api/presentation/import.ts +112 -0
  254. package/src/api/presentation/index.ts +48 -0
  255. package/src/api/presentation/sheets.ts +198 -0
  256. package/src/api/presentation/views.ts +303 -0
  257. package/src/api/program/adjacency.ts +164 -0
  258. package/src/api/program/areas.ts +335 -0
  259. package/src/api/program/classification.ts +138 -0
  260. package/src/api/program/cores.ts +171 -0
  261. package/src/api/program/departments.ts +465 -0
  262. package/src/api/program/index.ts +71 -0
  263. package/src/api/program/layout.ts +68 -0
  264. package/src/api/program/metrics.ts +120 -0
  265. package/src/api/program/site.ts +419 -0
  266. package/src/api/program/spreadsheet.ts +2075 -0
  267. package/src/handles.ts +194 -0
  268. package/src/host-utils.ts +10 -6
  269. package/src/index.ts +1 -0
  270. package/dist/api/core/geom/arc.d.ts +0 -81
  271. package/dist/api/core/geom/arc.d.ts.map +0 -1
  272. package/dist/api/core/geom/curve.d.ts +0 -70
  273. package/dist/api/core/geom/curve.d.ts.map +0 -1
  274. package/dist/api/core/geom/line.d.ts +0 -56
  275. package/dist/api/core/geom/line.d.ts.map +0 -1
  276. package/dist/api/core/geom/profile.d.ts +0 -121
  277. package/dist/api/core/geom/profile.d.ts.map +0 -1
  278. package/dist/api/tools/copy.d.ts +0 -59
  279. package/dist/api/tools/copy.d.ts.map +0 -1
  280. package/dist/api/tools/index.d.ts +0 -33
  281. package/dist/api/tools/index.d.ts.map +0 -1
  282. package/dist/api/tools/material.d.ts +0 -51
  283. package/dist/api/tools/material.d.ts.map +0 -1
  284. package/dist/api/tools/offset.d.ts +0 -43
  285. package/dist/api/tools/offset.d.ts.map +0 -1
  286. package/dist/api/tools/selection.d.ts +0 -48
  287. package/dist/api/tools/selection.d.ts.map +0 -1
  288. package/dist/api/tools/transform.d.ts +0 -114
  289. package/dist/api/tools/transform.d.ts.map +0 -1
  290. package/dist/api/units/index.d.ts +0 -163
  291. package/dist/api/units/index.d.ts.map +0 -1
  292. package/src/api/core/geom/arc.ts +0 -70
  293. package/src/api/core/geom/curve.ts +0 -41
  294. package/src/api/core/geom/line.ts +0 -53
  295. package/src/api/core/geom/profile.ts +0 -94
  296. package/src/api/tools/copy.ts +0 -55
  297. package/src/api/tools/index.ts +0 -39
  298. package/src/api/tools/material.ts +0 -49
  299. package/src/api/tools/offset.ts +0 -43
  300. package/src/api/tools/selection.ts +0 -51
  301. package/src/api/tools/transform.ts +0 -117
  302. package/src/api/units/index.ts +0 -163
@@ -0,0 +1,132 @@
1
+ import * as z from "zod"
2
+ import { PluginApiReturn } from "../../../types"
3
+ import { ComponentHandle, ContourHandle } from "../../../handles"
4
+ import { PluginSpaceGetProperty, PluginSpaceGetResult } from "../../entity/space"
5
+
6
+ /**
7
+ * `design.query.spaces.*` — space-specific reads (a space is a room mass).
8
+ *
9
+ * Only the space queries feasible against the engine today are exposed here.
10
+ * `getFloor` / `listBoundingWalls` (space↔wall topology) are deferred — they need
11
+ * engine work that does not exist yet. `listAdjacent` stays deferred because the
12
+ * shipped surfaces already answer it with value semantics: per-space via the
13
+ * `adjacency` field of `design.query.getProperties`, in bulk via
14
+ * `program.adjacency.getMatrix`.
15
+ *
16
+ * Accessed via `snaptrude.design.query.spaces`.
17
+ */
18
+ export abstract class PluginDesignQuerySpacesApi {
19
+ constructor() {}
20
+
21
+ /**
22
+ * Get selected properties of a space — the selective multi-property read.
23
+ *
24
+ * Only the properties listed in `properties` are returned — unlisted
25
+ * properties will be `undefined` in the result. This is the canonical home of
26
+ * the read formerly at `entity.space.get` (now deprecated). Adjacency is not
27
+ * part of this read — it is an entity property: read it via the `adjacency`
28
+ * field of {@linkcode PluginDesignQueryApi.getProperties}.
29
+ *
30
+ * @param space - The space (room mass) to read
31
+ * @param properties - Array of property names to retrieve. See
32
+ * {@linkcode PluginDesignQuerySpacesGetProperty} for available values.
33
+ * @returns A partial {@linkcode PluginDesignQuerySpacesGetResult} containing only
34
+ * the requested properties
35
+ * @throws If the space does not exist or the component is not a space/mass
36
+ *
37
+ * @examplePrompt What is the area of this room?
38
+ * @examplePrompt Get the name, storey and height of the selected space
39
+ * @examplePrompt Which department does this room belong to?
40
+ * @examplePrompt Where is this space positioned on the plan?
41
+ * @examplePrompt Read the room type and dimensions of the selected room
42
+ *
43
+ * # Example
44
+ * ```ts
45
+ * const [space] = await snaptrude.design.query.listSpaces()
46
+ * const info = await snaptrude.design.query.spaces.get(space, ["name", "area", "position"])
47
+ * console.log(info.name, info.area, info.position)
48
+ * ```
49
+ */
50
+ public abstract get(
51
+ space: ComponentHandle,
52
+ properties: PluginDesignQuerySpacesGetArgs["properties"],
53
+ ): PluginApiReturn<PluginDesignQuerySpacesGetResult>
54
+
55
+ /**
56
+ * Get the **footprint** of a space — its bottom-face contour (outer profile +
57
+ * holes) as a reusable {@linkcode ContourHandle}. Equivalent to
58
+ * {@linkcode PluginDesignQueryGeometryApi.getBottomContour} narrowed to spaces.
59
+ *
60
+ * @param space - The space (room mass) to read
61
+ * @returns the footprint {@linkcode ContourHandle}, or `null` if the space has
62
+ * no extractable footprint
63
+ *
64
+ * @examplePrompt Get the footprint of this room
65
+ * @examplePrompt Trace the floor outline of the selected space
66
+ * @examplePrompt What is the plan boundary of this room, including any holes?
67
+ * @examplePrompt Give me the base profile of the selected room mass
68
+ *
69
+ * # Example
70
+ * ```ts
71
+ * const [space] = await snaptrude.design.query.listSpaces()
72
+ * const footprint = await snaptrude.design.query.spaces.getFootprint(space)
73
+ * ```
74
+ */
75
+ public abstract getFootprint(
76
+ space: ComponentHandle,
77
+ ): PluginApiReturn<ContourHandle | null>
78
+ }
79
+
80
+ /**
81
+ * Arguments for {@linkcode PluginDesignQuerySpacesApi.getFootprint}.
82
+ *
83
+ * | Property | Type | Description |
84
+ * |---|---|---|
85
+ * | `space` | {@linkcode ComponentHandle} | The space (room mass) to read |
86
+ */
87
+ export const PluginDesignQueryGetFootprintArgs = z.object({
88
+ space: ComponentHandle,
89
+ })
90
+ export type PluginDesignQueryGetFootprintArgs = z.infer<
91
+ typeof PluginDesignQueryGetFootprintArgs
92
+ >
93
+
94
+ /**
95
+ * Property names readable via {@linkcode PluginDesignQuerySpacesApi.get} — the
96
+ * legacy {@linkcode PluginSpaceGetProperty} set minus `"adjacency"` (adjacency is
97
+ * an entity property: see the `adjacency` field of
98
+ * {@linkcode PluginDesignQueryApi.getProperties}).
99
+ */
100
+ export const PluginDesignQuerySpacesGetProperty =
101
+ PluginSpaceGetProperty.exclude(["adjacency"])
102
+ export type PluginDesignQuerySpacesGetProperty = z.infer<
103
+ typeof PluginDesignQuerySpacesGetProperty
104
+ >
105
+
106
+ /**
107
+ * Arguments for {@linkcode PluginDesignQuerySpacesApi.get}.
108
+ *
109
+ * | Property | Type | Description |
110
+ * |---|---|---|
111
+ * | `space` | {@linkcode ComponentHandle} | The space (room mass) to read |
112
+ * | `properties` | {@linkcode PluginDesignQuerySpacesGetProperty}`[]` | Properties to retrieve |
113
+ */
114
+ export const PluginDesignQuerySpacesGetArgs = z.object({
115
+ space: ComponentHandle,
116
+ properties: z.array(PluginDesignQuerySpacesGetProperty),
117
+ })
118
+ export type PluginDesignQuerySpacesGetArgs = z.infer<
119
+ typeof PluginDesignQuerySpacesGetArgs
120
+ >
121
+
122
+ /**
123
+ * Result of {@linkcode PluginDesignQuerySpacesApi.get} — the legacy
124
+ * {@linkcode PluginSpaceGetResult} record minus `adjacency`. Partial: only the
125
+ * requested properties are present.
126
+ */
127
+ export const PluginDesignQuerySpacesGetResult = PluginSpaceGetResult.omit({
128
+ adjacency: true,
129
+ })
130
+ export type PluginDesignQuerySpacesGetResult = z.infer<
131
+ typeof PluginDesignQuerySpacesGetResult
132
+ >
@@ -0,0 +1,273 @@
1
+ import * as z from "zod"
2
+ import { PluginApiReturn } from "../../../types"
3
+ import { ComponentHandle } from "../../../handles"
4
+ import { PluginDesignChangeResult } from "../lock"
5
+
6
+ /**
7
+ * The entity kinds {@linkcode PluginDesignSelectionApi.setByFilter} can select —
8
+ * the union of the editor's "Filter selection" menus (Design tab + BIM tab).
9
+ * Tokens mirror {@linkcode PluginEntityType} where a kind exists on the query
10
+ * surface; the rest are selection-only kinds the query surface cannot reach
11
+ * (layer-backed and annotation objects).
12
+ *
13
+ * | Value | Entity (menu label) |
14
+ * |---|---|
15
+ * | `"wall"` | Wall |
16
+ * | `"slab"` | Floor slab |
17
+ * | `"floor"` | Flooring |
18
+ * | `"door"` | Door |
19
+ * | `"window"` | Window |
20
+ * | `"beam"` | Beam |
21
+ * | `"column"` | Column |
22
+ * | `"ceiling"` | Ceiling |
23
+ * | `"roof"` | Roof |
24
+ * | `"staircase"` | Staircase |
25
+ * | `"furniture"` | Furniture |
26
+ * | `"pergola"` | Pergola |
27
+ * | `"sunshade"` | Sunshade |
28
+ * | `"referenceLine"` | Reference line |
29
+ * | `"space"` | Space (room mass) |
30
+ * | `"site"` | Site |
31
+ * | `"terrain"` | Terrain |
32
+ * | `"cad"` | CAD import |
33
+ * | `"pdf"` | PDF import |
34
+ * | `"image"` | Image import |
35
+ * | `"dimensionLine"` | Dimension line |
36
+ * | `"model3d"` | Imported 3D model |
37
+ * | `"neighborhoodBuilding"` | Neighborhood building |
38
+ * | `"programBlock"` | Program block (department mass) |
39
+ */
40
+ export const PluginSelectionEntityType = z.enum([
41
+ "wall",
42
+ "slab",
43
+ "floor",
44
+ "door",
45
+ "window",
46
+ "beam",
47
+ "column",
48
+ "ceiling",
49
+ "roof",
50
+ "staircase",
51
+ "furniture",
52
+ "pergola",
53
+ "sunshade",
54
+ "referenceLine",
55
+ "space",
56
+ "site",
57
+ "terrain",
58
+ "cad",
59
+ "pdf",
60
+ "image",
61
+ "dimensionLine",
62
+ "model3d",
63
+ "neighborhoodBuilding",
64
+ "programBlock",
65
+ ])
66
+ export type PluginSelectionEntityType = z.infer<typeof PluginSelectionEntityType>
67
+
68
+ /**
69
+ * The filter for {@linkcode PluginDesignSelectionApi.setByFilter}. At least one
70
+ * field must be non-empty (to empty the selection use
71
+ * {@linkcode PluginDesignSelectionApi.clear}). Fields **AND**-combine; values
72
+ * within a field **OR**-combine — `{ storeys: [2], types: ["furniture"] }`
73
+ * selects only the furniture on storey 2.
74
+ *
75
+ * | Field | Type | Selects entities where |
76
+ * |---|---|---|
77
+ * | `storeys` | `number[]` | storey/floor level ∈ `storeys` (negative = basement) |
78
+ * | `types` | {@linkcode PluginSelectionEntityType}`[]` | entity kind ∈ `types` |
79
+ */
80
+ export const PluginSelectionFilter = z
81
+ .object({
82
+ storeys: z.array(z.number()).optional(),
83
+ types: z.array(PluginSelectionEntityType).optional(),
84
+ })
85
+ .refine((f) => (f.storeys?.length ?? 0) + (f.types?.length ?? 0) > 0, {
86
+ message:
87
+ "PluginSelectionFilter requires at least one non-empty field (storeys or types); use design.selection.clear() to deselect everything",
88
+ })
89
+ export type PluginSelectionFilter = z.infer<typeof PluginSelectionFilter>
90
+
91
+ /**
92
+ * `snaptrude.design.selection` — read and mutate the current scene selection.
93
+ *
94
+ * Selection targets are {@linkcode ComponentHandle}s. `get` is the one sanctioned
95
+ * `get`-returns-array accessor (§4.1(3)). The mutators (`set`/`add`/`remove`/`clear`)
96
+ * change the live selection and return the resulting selection snapshot — they are
97
+ * **not undoable** (the engine fires a selection listener, no command), so the
98
+ * returned {@linkcode PluginDesignChangeResult} is a committed-state snapshot.
99
+ */
100
+ export abstract class PluginDesignSelectionApi {
101
+ constructor() {}
102
+
103
+ /**
104
+ * Read the current scene selection — the entities the user (or a previous
105
+ * call) has selected, returned as handles you can pass straight into other
106
+ * API calls.
107
+ *
108
+ * @returns The selection as {@linkcode ComponentHandle}`[]` (`[]` when nothing is selected)
109
+ *
110
+ * @examplePrompt What do I have selected right now?
111
+ * @examplePrompt List the currently selected objects
112
+ * @examplePrompt Which rooms are selected in the scene?
113
+ * @examplePrompt Get the ids of everything I've selected
114
+ * @examplePrompt Is anything selected?
115
+ *
116
+ * # Example
117
+ * ```ts
118
+ * // Selection handles feed straight into other API calls
119
+ * const selection = await snaptrude.design.selection.get()
120
+ * if (selection.length > 0) {
121
+ * const props = await snaptrude.design.query.getProperties(selection[0])
122
+ * }
123
+ * ```
124
+ */
125
+ public abstract get(): PluginApiReturn<ComponentHandle[]>
126
+
127
+ /**
128
+ * Replace the selection with exactly the given entities — anything
129
+ * previously selected is deselected first, so afterwards only these
130
+ * entities are selected.
131
+ *
132
+ * @param components The entities to select
133
+ * @returns The resulting selection snapshot
134
+ *
135
+ * @examplePrompt Select these three walls
136
+ * @examplePrompt Select only the kitchen and deselect everything else
137
+ * @examplePrompt Change the selection to just these rooms
138
+ * @examplePrompt Highlight the spaces on the second storey
139
+ *
140
+ * # Example
141
+ * ```ts
142
+ * // Select only the ground-storey walls (replaces the previous selection)
143
+ * const walls = await snaptrude.design.query.listWalls({ storeys: [1] })
144
+ * const { affected } = await snaptrude.design.selection.set(walls)
145
+ * ```
146
+ */
147
+ public abstract set(components: ComponentHandle[]): PluginApiReturn<PluginDesignChangeResult>
148
+
149
+ /**
150
+ * Add entities to the current selection without deselecting anything — the
151
+ * selection grows to include the given entities alongside whatever was
152
+ * already selected.
153
+ *
154
+ * @param components The entities to add to the selection
155
+ * @returns The resulting selection snapshot
156
+ *
157
+ * @examplePrompt Add the corridor to my current selection
158
+ * @examplePrompt Select these columns too, keeping what's already selected
159
+ * @examplePrompt Also select the roof
160
+ * @examplePrompt Extend the selection to include all the doors on this floor
161
+ *
162
+ * # Example
163
+ * ```ts
164
+ * // Grow the selection to include every roof, keeping what's already selected
165
+ * const roofs = await snaptrude.design.query.listRoofs()
166
+ * await snaptrude.design.selection.add(roofs)
167
+ * ```
168
+ */
169
+ public abstract add(components: ComponentHandle[]): PluginApiReturn<PluginDesignChangeResult>
170
+
171
+ /**
172
+ * Remove entities from the current selection — the given entities are
173
+ * deselected while everything else stays selected.
174
+ *
175
+ * @param components The entities to remove from the selection
176
+ * @returns The resulting selection snapshot
177
+ *
178
+ * @examplePrompt Deselect the stair core but keep the rest selected
179
+ * @examplePrompt Remove these walls from my selection
180
+ * @examplePrompt Take the furniture out of the current selection
181
+ * @examplePrompt Unselect the two smaller rooms
182
+ *
183
+ * # Example
184
+ * ```ts
185
+ * // Deselect the furniture while keeping everything else selected
186
+ * const furniture = await snaptrude.design.query.listFurniture({ isSelected: true })
187
+ * await snaptrude.design.selection.remove(furniture)
188
+ * ```
189
+ */
190
+ public abstract remove(
191
+ components: ComponentHandle[]
192
+ ): PluginApiReturn<PluginDesignChangeResult>
193
+
194
+ /**
195
+ * Clear the selection so nothing is selected (equivalent to `set([])`).
196
+ *
197
+ * @returns The resulting (empty) selection snapshot
198
+ *
199
+ * @examplePrompt Deselect everything
200
+ * @examplePrompt Clear my current selection
201
+ * @examplePrompt Unselect all objects in the scene
202
+ * @examplePrompt Make sure nothing is selected before we start
203
+ *
204
+ * # Example
205
+ * ```ts
206
+ * const { affected } = await snaptrude.design.selection.clear()
207
+ * // affected is the resulting selection — always [] here
208
+ * ```
209
+ */
210
+ public abstract clear(): PluginApiReturn<PluginDesignChangeResult>
211
+
212
+ /**
213
+ * Replace the selection with every visible entity of the active building that
214
+ * matches the filter — the programmatic equivalent of the editor's
215
+ * **Story selection** (`storeys`) and **Filter selection** (`types`) menus
216
+ * under the select tool, including their combination (fields AND, values
217
+ * within a field OR). Reaches selection-only kinds the query surface cannot
218
+ * (sites, terrain, CAD/PDF/image imports, dimension lines, 3D models,
219
+ * neighborhood buildings) and selects whole groups the way the editor does.
220
+ *
221
+ * This is a one-shot bulk select, not a persistent mode: the user's next
222
+ * canvas click resets the underlying filter state (the selection it made
223
+ * stays until changed). Results honor the ambient view — active building,
224
+ * hidden objects/buckets, and in 2D the active storey.
225
+ *
226
+ * @param filter Which entities to select — {@linkcode PluginSelectionFilter};
227
+ * at least one field must be non-empty
228
+ * @returns The resulting selection snapshot
229
+ *
230
+ * @examplePrompt Select everything on storey 2
231
+ * @examplePrompt Select all the walls and doors
232
+ * @examplePrompt Story selection: select the ground floor and first floor
233
+ * @examplePrompt Filter selection: select all furniture in the model
234
+ * @examplePrompt Select only the furniture on the second storey
235
+ * @examplePrompt Select all the spaces so I can recolor them
236
+ *
237
+ * # Example
238
+ * ```ts
239
+ * // "Story selection": everything on storeys 1 and 2
240
+ * await snaptrude.design.selection.setByFilter({ storeys: [1, 2] })
241
+ *
242
+ * // "Filter selection": all walls and doors
243
+ * await snaptrude.design.selection.setByFilter({ types: ["wall", "door"] })
244
+ *
245
+ * // Combined: only the furniture on storey 2
246
+ * const { affected } = await snaptrude.design.selection.setByFilter({
247
+ * storeys: [2],
248
+ * types: ["furniture"],
249
+ * })
250
+ * ```
251
+ */
252
+ public abstract setByFilter(
253
+ filter: PluginSelectionFilter
254
+ ): PluginApiReturn<PluginDesignChangeResult>
255
+ }
256
+
257
+ /**
258
+ * Arguments for {@linkcode PluginDesignSelectionApi.set}.
259
+ *
260
+ * | Property | Type | Description |
261
+ * |---|---|---|
262
+ * | `components` | {@linkcode ComponentHandle}`[]` | The entities to select |
263
+ */
264
+ export const PluginDesignSelectionSetArgs = z.object({
265
+ components: z.array(ComponentHandle),
266
+ })
267
+ export type PluginDesignSelectionSetArgs = z.infer<typeof PluginDesignSelectionSetArgs>
268
+
269
+ export const PluginDesignSelectionAddArgs = PluginDesignSelectionSetArgs
270
+ export type PluginDesignSelectionAddArgs = z.infer<typeof PluginDesignSelectionAddArgs>
271
+
272
+ export const PluginDesignSelectionRemoveArgs = PluginDesignSelectionSetArgs
273
+ export type PluginDesignSelectionRemoveArgs = z.infer<typeof PluginDesignSelectionRemoveArgs>
@@ -0,0 +1,40 @@
1
+ import * as z from "zod"
2
+ import { ComponentHandle } from "../../handles"
3
+
4
+ /**
5
+ * Shared `design.*` operation return records (LLD Part A.3).
6
+ *
7
+ * `PluginDesignChangeResult` (`{ affected }`) is NOT here — it already lives in
8
+ * `./lock` and is reused verbatim by the transform/delete mutators.
9
+ *
10
+ * NOTE: `PluginMirrorAxis` currently lives in `./doors`; its relocation into this
11
+ * shared module is deferred to the transform wave (avoids a doors edit + a
12
+ * double-export while `design.transform` is unwired).
13
+ */
14
+
15
+ /**
16
+ * Result of a CSG boolean op (`design.boolean.union/subtract/intersect`). Grounded
17
+ * in the engine `Boolean3dOperation.resultComponents { toCreate; toDelete }`:
18
+ * `created` are the result masses, `deleted` is every consumed input (for
19
+ * `subtract` this includes BOTH the target AND the tools). Errors throw (RPC
20
+ * rejects); no `Result<>` crosses the boundary.
21
+ */
22
+ export const BooleanOutcome = z.object({
23
+ created: z.array(ComponentHandle),
24
+ deleted: z.array(ComponentHandle),
25
+ })
26
+ export type BooleanOutcome = z.infer<typeof BooleanOutcome>
27
+
28
+ /**
29
+ * Result of `design.edit.offsetSplit` (migrated from `tools.offset`). `createdIds`
30
+ * are the components the offset produced; `deletedIds` are those a split-style
31
+ * offset removed. `offsetValue` is the engine's POST-clamp / post-sign applied
32
+ * distance — the only way a caller learns the actually-applied clamped distance
33
+ * (the shipped `tools.offset` result dropped it).
34
+ */
35
+ export const OffsetSplitOutcome = z.object({
36
+ createdIds: z.array(ComponentHandle),
37
+ deletedIds: z.array(ComponentHandle),
38
+ offsetValue: z.number(),
39
+ })
40
+ export type OffsetSplitOutcome = z.infer<typeof OffsetSplitOutcome>
@@ -0,0 +1,93 @@
1
+ import * as z from "zod"
2
+ import { PluginApiReturn } from "../../../types"
3
+ import { ComponentHandle, Vec3Handle } from "../../../handles"
4
+ import { PluginDesignChangeResult } from "../lock"
5
+
6
+ /**
7
+ * `snaptrude.design.transform` — rigid transforms on scene entities.
8
+ *
9
+ * Migrated from the removed `tools.transform.*`. All ops are undoable and return
10
+ * {@linkcode PluginDesignChangeResult} `{ affected }`; failures throw (RPC rejects).
11
+ *
12
+ * `mirror` / `getPosition` / `setPosition` (and `scale`, an engine gap) are NOT in
13
+ * this surface yet — they are a later, non-migration pass.
14
+ */
15
+ export abstract class PluginDesignTransformApi {
16
+ constructor() {}
17
+
18
+ /**
19
+ * Translate entities by a **relative** displacement vector (added to the first
20
+ * component's absolute position as the anchor). Undoable.
21
+ *
22
+ * @param components - Entities to move
23
+ * @param displacement - Relative translation as a {@linkcode Vec3Handle}
24
+ * @param options - `is2D`, `trackParentChange`
25
+ * @returns {@linkcode PluginDesignChangeResult}
26
+ *
27
+ * @examplePrompt Move the selected room 5 metres to the right
28
+ * @examplePrompt Shift these walls 3m along the x axis
29
+ * @examplePrompt Nudge this space 500mm north
30
+ * @examplePrompt Translate the furniture block by (10, 0, 5)
31
+ * @examplePrompt Move these masses up one storey
32
+ *
33
+ * # Example
34
+ * ```ts
35
+ * const { vec3 } = snaptrude.core.math
36
+ * await snaptrude.design.transform.move(["space-id"], vec3.new(10, 0, 0))
37
+ * ```
38
+ */
39
+ public abstract move(
40
+ components: ComponentHandle[],
41
+ displacement: Vec3Handle,
42
+ options?: { is2D?: boolean; trackParentChange?: boolean },
43
+ ): PluginApiReturn<PluginDesignChangeResult>
44
+
45
+ /**
46
+ * Rotate entities by a **signed angle in DEGREES**, anchored at the combined
47
+ * bounding-box centre (positive = CCW about +Y). NOTE: unlike the removed
48
+ * `tools.transform.rotate` (radians + caller pivot), this canonical form takes
49
+ * DEGREES and has NO caller pivot — the pivot is always the bbox centre. Undoable.
50
+ *
51
+ * @param components - Entities to rotate
52
+ * @param angleInDegrees - Signed rotation angle in degrees
53
+ * @param options - `axis` (defaults to world +Y), `is2D`
54
+ * @returns {@linkcode PluginDesignChangeResult}
55
+ *
56
+ * @examplePrompt Rotate the selected building 90 degrees
57
+ * @examplePrompt Turn this room 45 degrees clockwise
58
+ * @examplePrompt Spin the furniture block 180 degrees about its centre
59
+ * @examplePrompt Rotate these masses 30 degrees around the vertical axis
60
+ *
61
+ * # Example
62
+ * ```ts
63
+ * await snaptrude.design.transform.rotate(["space-id"], 90)
64
+ * ```
65
+ */
66
+ public abstract rotate(
67
+ components: ComponentHandle[],
68
+ angleInDegrees: number,
69
+ options?: { axis?: Vec3Handle; is2D?: boolean },
70
+ ): PluginApiReturn<PluginDesignChangeResult>
71
+ }
72
+
73
+ /**
74
+ * Arguments for {@linkcode PluginDesignTransformApi.move} (options flattened).
75
+ */
76
+ export const PluginDesignMoveArgs = z.object({
77
+ components: z.array(ComponentHandle).min(1),
78
+ displacement: Vec3Handle,
79
+ is2D: z.boolean().optional(),
80
+ trackParentChange: z.boolean().optional(),
81
+ })
82
+ export type PluginDesignMoveArgs = z.infer<typeof PluginDesignMoveArgs>
83
+
84
+ /**
85
+ * Arguments for {@linkcode PluginDesignTransformApi.rotate} (options flattened).
86
+ */
87
+ export const PluginDesignRotateArgs = z.object({
88
+ components: z.array(ComponentHandle).min(1),
89
+ angleInDegrees: z.number(),
90
+ axis: Vec3Handle.optional(),
91
+ is2D: z.boolean().optional(),
92
+ })
93
+ export type PluginDesignRotateArgs = z.infer<typeof PluginDesignRotateArgs>
@@ -0,0 +1,117 @@
1
+ import * as z from "zod"
2
+ import { PluginApiReturn } from "../../../types"
3
+ import { ComponentHandle, ProfileHandle } from "../../../handles"
4
+ import {
5
+ PluginSpaceType,
6
+ PluginMassType,
7
+ PluginDepartmentId,
8
+ PluginAreaClass,
9
+ PluginSpaceUpdateResult,
10
+ } from "../../entity/space"
11
+
12
+ /**
13
+ * Sparse property updates for a space. Only provided fields change.
14
+ *
15
+ * | Property | Type | Description |
16
+ * |---|---|---|
17
+ * | `room_type` | `string`? | Room label |
18
+ * | `massType` | `PluginMassType`? | Mass type |
19
+ * | `spaceType` | `PluginSpaceType`? | Space type |
20
+ * | `areaClass` | `PluginAreaClass`? | Area class (NET/GROSS/EXCLUDED) |
21
+ * | `departmentId` | `PluginDepartmentId`? | Department |
22
+ */
23
+ export const PluginSpacePropertyUpdates = z.object({
24
+ room_type: z.string().optional(),
25
+ massType: PluginMassType.optional(),
26
+ spaceType: PluginSpaceType.optional(),
27
+ areaClass: PluginAreaClass.optional(),
28
+ departmentId: PluginDepartmentId.optional(),
29
+ })
30
+ export type PluginSpacePropertyUpdates = z.infer<typeof PluginSpacePropertyUpdates>
31
+
32
+ /** Geometry replacement for a space — re-extrude a profile. */
33
+ export const PluginSpaceGeometryUpdate = z.object({
34
+ profile: ProfileHandle,
35
+ extrudeHeight: z.number(),
36
+ })
37
+ export type PluginSpaceGeometryUpdate = z.infer<typeof PluginSpaceGeometryUpdate>
38
+
39
+ /** One space to update via {@linkcode PluginDesignUpdateApi.spaces}. */
40
+ export const PluginUpdateSpaceItem = z.object({
41
+ space: ComponentHandle,
42
+ properties: PluginSpacePropertyUpdates.optional(),
43
+ geometry: PluginSpaceGeometryUpdate.optional(),
44
+ })
45
+ export type PluginUpdateSpaceItem = z.infer<typeof PluginUpdateSpaceItem>
46
+
47
+ /**
48
+ * `snaptrude.design.update` — edit existing scene entities (properties + geometry).
49
+ *
50
+ * Migrated from the removed `entity.space.{update, updateGeometryFromProfile, bulkUpdate}`.
51
+ * Only provided fields change; each call is undoable. Failures throw (RPC rejects).
52
+ */
53
+ export abstract class PluginDesignUpdateApi {
54
+ constructor() {}
55
+
56
+ /**
57
+ * Update a single space (room) — change its properties (room label, space
58
+ * type, mass type, area class, department) and/or replace its geometry by
59
+ * re-extruding a profile to a new height. Sparse and undoable: only the
60
+ * fields you provide change.
61
+ *
62
+ * @param space - The space to update
63
+ * @param options - `properties` (sparse) and/or `geometry` ({ profile, extrudeHeight })
64
+ * @returns the updated space's echoed {@linkcode PluginSpaceUpdateResult}
65
+ *
66
+ * @examplePrompt Rename this room to Office
67
+ * @examplePrompt Change this space's room type to Meeting Room
68
+ * @examplePrompt Set the height of this room to 3 metres
69
+ * @examplePrompt Move this space into the Circulation department
70
+ * @examplePrompt Exclude this room from the area calculations
71
+ *
72
+ * # Example
73
+ * ```ts
74
+ * await snaptrude.design.update.space("space-id", { properties: { room_type: "Office" } })
75
+ * ```
76
+ */
77
+ public abstract space(
78
+ space: ComponentHandle,
79
+ options: {
80
+ properties?: PluginSpacePropertyUpdates
81
+ geometry?: PluginSpaceGeometryUpdate
82
+ },
83
+ ): PluginApiReturn<PluginSpaceUpdateResult>
84
+
85
+ /**
86
+ * Update many spaces (rooms) in one undoable operation — the bulk form of
87
+ * {@linkcode space}. Each item pairs a space with the sparse property
88
+ * changes and/or geometry re-extrude to apply; every item is validated up
89
+ * front, then all changes are applied as a single command.
90
+ *
91
+ * Migrated from `entity.space.bulkUpdate`.
92
+ *
93
+ * @param items - One {@linkcode PluginUpdateSpaceItem} per space
94
+ * @returns one {@linkcode PluginSpaceUpdateResult} per item, in input order
95
+ *
96
+ * @examplePrompt Label all the selected rooms as Bedrooms
97
+ * @examplePrompt Change the room type of these five spaces at once
98
+ * @examplePrompt Set every room on this floor to a 3m height in one go
99
+ * @examplePrompt Bulk-assign these spaces to the Service department
100
+ * @examplePrompt Mark all of these rooms as excluded from area in one update
101
+ *
102
+ * # Example
103
+ * ```ts
104
+ * // Re-label every selected room and mark it NET area — one undoable bulk update
105
+ * const rooms = await snaptrude.design.query.listSpaces({ isSelected: true })
106
+ * const results = await snaptrude.design.update.spaces(
107
+ * rooms.map((space) => ({
108
+ * space,
109
+ * properties: { room_type: "Bedroom", areaClass: "NET" },
110
+ * })),
111
+ * )
112
+ * // One result per item, in input order
113
+ * console.log(results.map((r) => r.spaceId))
114
+ * ```
115
+ */
116
+ public abstract spaces(items: PluginUpdateSpaceItem[]): PluginApiReturn<PluginSpaceUpdateResult[]>
117
+ }