@snaptrude/plugin-core 0.2.9 → 0.5.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 (269) hide show
  1. package/AGENTS.md +128 -50
  2. package/CHANGELOG.md +52 -6
  3. package/api-manifest.full.json +3999 -0
  4. package/api-manifest.json +3845 -0
  5. package/dist/api/core/buildings.d.ts +427 -0
  6. package/dist/api/core/buildings.d.ts.map +1 -0
  7. package/dist/api/core/comment/index.d.ts +230 -0
  8. package/dist/api/core/comment/index.d.ts.map +1 -0
  9. package/dist/api/core/geom/create/index.d.ts +247 -0
  10. package/dist/api/core/geom/create/index.d.ts.map +1 -0
  11. package/dist/api/core/geom/delete/index.d.ts +72 -0
  12. package/dist/api/core/geom/delete/index.d.ts.map +1 -0
  13. package/dist/api/core/geom/index.d.ts +24 -23
  14. package/dist/api/core/geom/index.d.ts.map +1 -1
  15. package/dist/api/core/geom/query/arc.d.ts +169 -0
  16. package/dist/api/core/geom/query/arc.d.ts.map +1 -0
  17. package/dist/api/core/geom/query/brep.d.ts +402 -0
  18. package/dist/api/core/geom/query/brep.d.ts.map +1 -0
  19. package/dist/api/core/geom/query/circle.d.ts +378 -0
  20. package/dist/api/core/geom/query/circle.d.ts.map +1 -0
  21. package/dist/api/core/geom/query/contour.d.ts +450 -0
  22. package/dist/api/core/geom/query/contour.d.ts.map +1 -0
  23. package/dist/api/core/geom/query/curve.d.ts +918 -0
  24. package/dist/api/core/geom/query/curve.d.ts.map +1 -0
  25. package/dist/api/core/geom/query/edge.d.ts +128 -0
  26. package/dist/api/core/geom/query/edge.d.ts.map +1 -0
  27. package/dist/api/core/geom/query/face.d.ts +363 -0
  28. package/dist/api/core/geom/query/face.d.ts.map +1 -0
  29. package/dist/api/core/geom/query/halfedge.d.ts +206 -0
  30. package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
  31. package/dist/api/core/geom/query/index.d.ts +61 -0
  32. package/dist/api/core/geom/query/index.d.ts.map +1 -0
  33. package/dist/api/core/geom/query/profile.d.ts +410 -0
  34. package/dist/api/core/geom/query/profile.d.ts.map +1 -0
  35. package/dist/api/core/geom/query/vertex.d.ts +187 -0
  36. package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
  37. package/dist/api/core/geom/update/contour.d.ts +272 -0
  38. package/dist/api/core/geom/update/contour.d.ts.map +1 -0
  39. package/dist/api/core/geom/update/curve.d.ts +180 -0
  40. package/dist/api/core/geom/update/curve.d.ts.map +1 -0
  41. package/dist/api/core/geom/update/index.d.ts +27 -0
  42. package/dist/api/core/geom/update/index.d.ts.map +1 -0
  43. package/dist/api/core/geom/update/profile.d.ts +329 -0
  44. package/dist/api/core/geom/update/profile.d.ts.map +1 -0
  45. package/dist/api/core/groups.d.ts +485 -0
  46. package/dist/api/core/groups.d.ts.map +1 -0
  47. package/dist/api/core/history/index.d.ts +78 -0
  48. package/dist/api/core/history/index.d.ts.map +1 -0
  49. package/dist/api/core/index.d.ts +46 -1
  50. package/dist/api/core/index.d.ts.map +1 -1
  51. package/dist/api/core/layers.d.ts +402 -0
  52. package/dist/api/core/layers.d.ts.map +1 -0
  53. package/dist/api/core/math/quat.d.ts +111 -128
  54. package/dist/api/core/math/quat.d.ts.map +1 -1
  55. package/dist/api/core/math/vec3.d.ts +120 -102
  56. package/dist/api/core/math/vec3.d.ts.map +1 -1
  57. package/dist/api/core/project/index.d.ts +399 -0
  58. package/dist/api/core/project/index.d.ts.map +1 -0
  59. package/dist/api/core/tags.d.ts +755 -0
  60. package/dist/api/core/tags.d.ts.map +1 -0
  61. package/dist/api/core/units/index.d.ts +175 -0
  62. package/dist/api/core/units/index.d.ts.map +1 -0
  63. package/dist/api/core/zoom/index.d.ts +45 -0
  64. package/dist/api/core/zoom/index.d.ts.map +1 -0
  65. package/dist/api/design/boolean/index.d.ts +168 -0
  66. package/dist/api/design/boolean/index.d.ts.map +1 -0
  67. package/dist/api/design/create/index.d.ts +828 -0
  68. package/dist/api/design/create/index.d.ts.map +1 -0
  69. package/dist/api/design/delete/index.d.ts +63 -0
  70. package/dist/api/design/delete/index.d.ts.map +1 -0
  71. package/dist/api/design/doors/index.d.ts +268 -0
  72. package/dist/api/design/doors/index.d.ts.map +1 -0
  73. package/dist/api/design/edit/index.d.ts +49 -0
  74. package/dist/api/design/edit/index.d.ts.map +1 -0
  75. package/dist/api/design/erase/index.d.ts +160 -0
  76. package/dist/api/design/erase/index.d.ts.map +1 -0
  77. package/dist/api/design/furniture/index.d.ts +123 -0
  78. package/dist/api/design/furniture/index.d.ts.map +1 -0
  79. package/dist/api/design/index.d.ts +153 -0
  80. package/dist/api/design/index.d.ts.map +1 -0
  81. package/dist/api/design/lock.d.ts +41 -0
  82. package/dist/api/design/lock.d.ts.map +1 -0
  83. package/dist/api/design/materials/index.d.ts +297 -0
  84. package/dist/api/design/materials/index.d.ts.map +1 -0
  85. package/dist/api/design/query/geometry/index.d.ts +140 -0
  86. package/dist/api/design/query/geometry/index.d.ts.map +1 -0
  87. package/dist/api/design/query/index.d.ts +1011 -0
  88. package/dist/api/design/query/index.d.ts.map +1 -0
  89. package/dist/api/design/query/spaces.d.ts +221 -0
  90. package/dist/api/design/query/spaces.d.ts.map +1 -0
  91. package/dist/api/design/selection/index.d.ts +138 -0
  92. package/dist/api/design/selection/index.d.ts.map +1 -0
  93. package/dist/api/design/shared.d.ts +38 -0
  94. package/dist/api/design/shared.d.ts.map +1 -0
  95. package/dist/api/design/transform/index.d.ts +87 -0
  96. package/dist/api/design/transform/index.d.ts.map +1 -0
  97. package/dist/api/design/update/index.d.ts +178 -0
  98. package/dist/api/design/update/index.d.ts.map +1 -0
  99. package/dist/api/design/windows/index.d.ts +189 -0
  100. package/dist/api/design/windows/index.d.ts.map +1 -0
  101. package/dist/api/entity/buildableEnvelope.d.ts +51 -23
  102. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  103. package/dist/api/entity/department.d.ts +0 -98
  104. package/dist/api/entity/department.d.ts.map +1 -1
  105. package/dist/api/entity/index.d.ts +4 -9
  106. package/dist/api/entity/index.d.ts.map +1 -1
  107. package/dist/api/entity/referenceLine.d.ts +49 -106
  108. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  109. package/dist/api/entity/space.d.ts +76 -828
  110. package/dist/api/entity/space.d.ts.map +1 -1
  111. package/dist/api/entity/story.d.ts +47 -37
  112. package/dist/api/entity/story.d.ts.map +1 -1
  113. package/dist/api/index.d.ts +17 -17
  114. package/dist/api/index.d.ts.map +1 -1
  115. package/dist/api/presentation/aiInspiration.d.ts +440 -0
  116. package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
  117. package/dist/api/presentation/diagrams.d.ts +81 -0
  118. package/dist/api/presentation/diagrams.d.ts.map +1 -0
  119. package/dist/api/presentation/import.d.ts +113 -0
  120. package/dist/api/presentation/import.d.ts.map +1 -0
  121. package/dist/api/presentation/index.d.ts +46 -0
  122. package/dist/api/presentation/index.d.ts.map +1 -0
  123. package/dist/api/presentation/sheets.d.ts +176 -0
  124. package/dist/api/presentation/sheets.d.ts.map +1 -0
  125. package/dist/api/presentation/views.d.ts +296 -0
  126. package/dist/api/presentation/views.d.ts.map +1 -0
  127. package/dist/api/program/adjacency.d.ts +155 -0
  128. package/dist/api/program/adjacency.d.ts.map +1 -0
  129. package/dist/api/program/areas.d.ts +360 -0
  130. package/dist/api/program/areas.d.ts.map +1 -0
  131. package/dist/api/program/classification.d.ts +135 -0
  132. package/dist/api/program/classification.d.ts.map +1 -0
  133. package/dist/api/program/cores.d.ts +174 -0
  134. package/dist/api/program/cores.d.ts.map +1 -0
  135. package/dist/api/program/departments.d.ts +431 -0
  136. package/dist/api/program/departments.d.ts.map +1 -0
  137. package/dist/api/program/index.d.ts +69 -0
  138. package/dist/api/program/index.d.ts.map +1 -0
  139. package/dist/api/program/layout.d.ts +63 -0
  140. package/dist/api/program/layout.d.ts.map +1 -0
  141. package/dist/api/program/metrics.d.ts +108 -0
  142. package/dist/api/program/metrics.d.ts.map +1 -0
  143. package/dist/api/program/site.d.ts +367 -0
  144. package/dist/api/program/site.d.ts.map +1 -0
  145. package/dist/api/program/spreadsheet.d.ts +2041 -0
  146. package/dist/api/program/spreadsheet.d.ts.map +1 -0
  147. package/dist/handles.d.ts +138 -0
  148. package/dist/handles.d.ts.map +1 -0
  149. package/dist/host-utils.d.ts +7 -5
  150. package/dist/host-utils.d.ts.map +1 -1
  151. package/dist/index.cjs +3897 -1542
  152. package/dist/index.cjs.map +1 -1
  153. package/dist/index.d.ts +1 -0
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/index.js +3326 -1462
  156. package/dist/index.js.map +1 -1
  157. package/package.json +6 -2
  158. package/scripts/generate-manifest.mjs +193 -0
  159. package/scripts/generate-manifest.test.mjs +193 -0
  160. package/src/api/core/buildings.ts +485 -0
  161. package/src/api/core/comment/index.ts +258 -0
  162. package/src/api/core/geom/create/index.ts +293 -0
  163. package/src/api/core/geom/delete/index.ts +78 -0
  164. package/src/api/core/geom/index.ts +24 -23
  165. package/src/api/core/geom/query/arc.ts +169 -0
  166. package/src/api/core/geom/query/brep.ts +444 -0
  167. package/src/api/core/geom/query/circle.ts +404 -0
  168. package/src/api/core/geom/query/contour.ts +540 -0
  169. package/src/api/core/geom/query/curve.ts +1078 -0
  170. package/src/api/core/geom/query/edge.ts +130 -0
  171. package/src/api/core/geom/query/face.ts +403 -0
  172. package/src/api/core/geom/query/halfedge.ts +210 -0
  173. package/src/api/core/geom/query/index.ts +63 -0
  174. package/src/api/core/geom/query/profile.ts +473 -0
  175. package/src/api/core/geom/query/vertex.ts +205 -0
  176. package/src/api/core/geom/update/contour.ts +315 -0
  177. package/src/api/core/geom/update/curve.ts +209 -0
  178. package/src/api/core/geom/update/index.ts +29 -0
  179. package/src/api/core/geom/update/profile.ts +377 -0
  180. package/src/api/core/groups.ts +521 -0
  181. package/src/api/core/history/index.ts +84 -0
  182. package/src/api/core/index.ts +46 -1
  183. package/src/api/core/layers.ts +333 -0
  184. package/src/api/core/math/quat.ts +112 -235
  185. package/src/api/core/math/vec3.ts +124 -159
  186. package/src/api/core/project/index.ts +418 -0
  187. package/src/api/core/tags.ts +808 -0
  188. package/src/api/core/units/index.ts +164 -0
  189. package/src/api/core/zoom/index.ts +47 -0
  190. package/src/api/design/boolean/index.ts +179 -0
  191. package/src/api/design/create/index.ts +886 -0
  192. package/src/api/design/delete/index.ts +67 -0
  193. package/src/api/design/doors/index.ts +285 -0
  194. package/src/api/design/edit/index.ts +54 -0
  195. package/src/api/design/erase/index.ts +151 -0
  196. package/src/api/design/furniture/index.ts +130 -0
  197. package/src/api/design/index.ts +162 -0
  198. package/src/api/design/lock.ts +42 -0
  199. package/src/api/design/materials/index.ts +301 -0
  200. package/src/api/design/query/geometry/index.ts +166 -0
  201. package/src/api/design/query/index.ts +937 -0
  202. package/src/api/design/query/spaces.ts +132 -0
  203. package/src/api/design/selection/index.ts +144 -0
  204. package/src/api/design/shared.ts +40 -0
  205. package/src/api/design/transform/index.ts +93 -0
  206. package/src/api/design/update/index.ts +117 -0
  207. package/src/api/design/windows/index.ts +207 -0
  208. package/src/api/entity/buildableEnvelope.ts +64 -23
  209. package/src/api/entity/department.ts +0 -113
  210. package/src/api/entity/index.ts +4 -9
  211. package/src/api/entity/referenceLine.ts +50 -38
  212. package/src/api/entity/space.ts +84 -440
  213. package/src/api/entity/story.ts +53 -42
  214. package/src/api/index.ts +17 -17
  215. package/src/api/presentation/aiInspiration.ts +362 -0
  216. package/src/api/presentation/diagrams.ts +84 -0
  217. package/src/api/presentation/import.ts +112 -0
  218. package/src/api/presentation/index.ts +48 -0
  219. package/src/api/presentation/sheets.ts +198 -0
  220. package/src/api/presentation/views.ts +303 -0
  221. package/src/api/program/adjacency.ts +164 -0
  222. package/src/api/program/areas.ts +335 -0
  223. package/src/api/program/classification.ts +138 -0
  224. package/src/api/program/cores.ts +171 -0
  225. package/src/api/program/departments.ts +465 -0
  226. package/src/api/program/index.ts +71 -0
  227. package/src/api/program/layout.ts +68 -0
  228. package/src/api/program/metrics.ts +120 -0
  229. package/src/api/program/site.ts +326 -0
  230. package/src/api/program/spreadsheet.ts +2075 -0
  231. package/src/handles.ts +148 -0
  232. package/src/host-utils.ts +10 -6
  233. package/src/index.ts +1 -0
  234. package/dist/api/core/geom/arc.d.ts +0 -81
  235. package/dist/api/core/geom/arc.d.ts.map +0 -1
  236. package/dist/api/core/geom/curve.d.ts +0 -70
  237. package/dist/api/core/geom/curve.d.ts.map +0 -1
  238. package/dist/api/core/geom/line.d.ts +0 -56
  239. package/dist/api/core/geom/line.d.ts.map +0 -1
  240. package/dist/api/core/geom/profile.d.ts +0 -121
  241. package/dist/api/core/geom/profile.d.ts.map +0 -1
  242. package/dist/api/documentation/aiInspiration.d.ts +0 -2155
  243. package/dist/api/documentation/aiInspiration.d.ts.map +0 -1
  244. package/dist/api/documentation/index.d.ts +0 -13
  245. package/dist/api/documentation/index.d.ts.map +0 -1
  246. package/dist/api/tools/copy.d.ts +0 -59
  247. package/dist/api/tools/copy.d.ts.map +0 -1
  248. package/dist/api/tools/index.d.ts +0 -29
  249. package/dist/api/tools/index.d.ts.map +0 -1
  250. package/dist/api/tools/offset.d.ts +0 -43
  251. package/dist/api/tools/offset.d.ts.map +0 -1
  252. package/dist/api/tools/selection.d.ts +0 -48
  253. package/dist/api/tools/selection.d.ts.map +0 -1
  254. package/dist/api/tools/transform.d.ts +0 -114
  255. package/dist/api/tools/transform.d.ts.map +0 -1
  256. package/dist/api/units/index.d.ts +0 -163
  257. package/dist/api/units/index.d.ts.map +0 -1
  258. package/src/api/core/geom/arc.ts +0 -70
  259. package/src/api/core/geom/curve.ts +0 -41
  260. package/src/api/core/geom/line.ts +0 -53
  261. package/src/api/core/geom/profile.ts +0 -94
  262. package/src/api/documentation/aiInspiration.ts +0 -871
  263. package/src/api/documentation/index.ts +0 -15
  264. package/src/api/tools/copy.ts +0 -55
  265. package/src/api/tools/index.ts +0 -35
  266. package/src/api/tools/offset.ts +0 -43
  267. package/src/api/tools/selection.ts +0 -51
  268. package/src/api/tools/transform.ts +0 -117
  269. package/src/api/units/index.ts +0 -163
@@ -1,390 +1,27 @@
1
+ // Space value types + schemas. The `entity.space.*` API was removed and its
2
+ // operations migrated to `design.create.spaces` / `design.update.*` /
3
+ // `design.query.*` / `design.delete.entities`. These shared space types survive
4
+ // here because `design.create` / `design.query` / `design.update` import them.
1
5
  import * as z from "zod"
2
- import { PluginApiReturn } from "../../types"
3
- import { PVec3 } from "../core/math/vec3"
4
- import { PQuat } from "../core/math/quat"
5
- import { PProfile } from "../core/geom/profile"
6
+ import {
7
+ ProfileHandle,
8
+ Vec3Handle,
9
+ Vec3Components,
10
+ QuatComponents,
11
+ CurveHandle,
12
+ } from "../../handles"
6
13
 
7
- /**
8
- * Space (room/mass) management — create, query, update, and delete spaces.
9
- *
10
- * A **space** is a 3D volume representing a room or mass in the
11
- * Snaptrude scene. Spaces live on a particular story and carry
12
- * properties such as name, area, department, and room type.
13
- *
14
- * All methods are **host API calls** that return Promises and support
15
- * undo/redo via Snaptrude's command system.
16
- *
17
- * Accessed via `snaptrude.entity.space`.
18
- */
19
- export abstract class PluginSpaceApi {
20
- constructor() {}
21
-
22
- /**
23
- * Create a rectangular (box) space.
24
- *
25
- * Generates an axis-aligned box with the given dimensions at the
26
- * specified position. The created space is automatically assigned
27
- * to the active story and a default department.
28
- *
29
- * @param args - An object containing:
30
- * - {@linkcode PluginSpaceCreateRectangularArgs.position args.position} — Origin
31
- * position as a {@linkcode PVec3} in Babylon units
32
- * - {@linkcode PluginSpaceCreateRectangularArgs.dimensions args.dimensions} — Box
33
- * dimensions `{ width, height, depth }` in Babylon units
34
- * @returns A {@linkcode PluginSpaceCreateRectangularResult} with the `spaceId`
35
- * of the created space
36
- * @throws If space creation fails
37
- *
38
- * # Example
39
- * ```ts
40
- * const { vec3 } = snaptrude.core.math
41
- *
42
- * const { spaceId } = await snaptrude.entity.space.createRectangular({
43
- * position: vec3.new(0, 0, 0),
44
- * dimensions: { width: 5, height: 3, depth: 4 },
45
- * })
46
- * ```
47
- */
48
- public abstract createRectangular({
49
- position,
50
- dimensions,
51
- }: PluginSpaceCreateRectangularArgs): PluginApiReturn<PluginSpaceCreateRectangularResult>
52
-
53
- /**
54
- * Create a space by extruding a 2D profile.
55
- *
56
- * The {@linkcode PluginSpaceCreateFromProfileArgs.profile profile} is used as
57
- * the outer boundary and extruded upward (along the Y axis) by
58
- * {@linkcode PluginSpaceCreateFromProfileArgs.extrudeHeight extrudeHeight},
59
- * then offset by {@linkcode PluginSpaceCreateFromProfileArgs.position
60
- * position}. Optional {@linkcode PluginSpaceCreateFromProfileArgs.innerProfiles
61
- * innerProfiles} are used as holes inside the outer boundary. The created
62
- * space is automatically assigned to the active story and a default department.
63
- *
64
- * Use {@linkcode PluginProfileApi.fromLinePoints} to quickly build a profile
65
- * from a list of points.
66
- *
67
- * @param args - An object containing:
68
- * - {@linkcode PluginSpaceCreateFromProfileArgs.profile args.profile} — A closed
69
- * {@linkcode PProfile} defining the outer floor shape
70
- * - {@linkcode PluginSpaceCreateFromProfileArgs.innerProfiles args.innerProfiles} —
71
- * Optional closed {@linkcode PProfile}`[]` loops to subtract as holes
72
- * - {@linkcode PluginSpaceCreateFromProfileArgs.extrudeHeight args.extrudeHeight} —
73
- * Extrusion height in Babylon units
74
- * - {@linkcode PluginSpaceCreateFromProfileArgs.position args.position} — Offset
75
- * position as a {@linkcode PVec3} in Babylon units
76
- * @returns A {@linkcode PluginSpaceCreateFromProfileResult} with the `spaceId`
77
- * of the created space
78
- * @throws If the profile is invalid or mesh creation fails
79
- *
80
- * # Example
81
- * ```ts
82
- * const { vec3 } = snaptrude.core.math
83
- *
84
- * const outerProfile = await snaptrude.core.geom.profile.fromLinePoints({
85
- * points: [
86
- * vec3.new(0, 0, 0),
87
- * vec3.new(10, 0, 0),
88
- * vec3.new(10, 0, 8),
89
- * vec3.new(0, 0, 8),
90
- * ],
91
- * })
92
- * const holeProfile = await snaptrude.core.geom.profile.fromLinePoints({
93
- * points: [
94
- * vec3.new(3, 0, 3),
95
- * vec3.new(7, 0, 3),
96
- * vec3.new(7, 0, 5),
97
- * vec3.new(3, 0, 5),
98
- * ],
99
- * })
100
- *
101
- * const { spaceId } = await snaptrude.entity.space.createFromProfile({
102
- * profile: outerProfile,
103
- * innerProfiles: [holeProfile],
104
- * extrudeHeight: 3,
105
- * position: vec3.new(0, 0, 0),
106
- * })
107
- * ```
108
- */
109
- public abstract createFromProfile({
110
- profile,
111
- innerProfiles,
112
- extrudeHeight,
113
- position,
114
- }: PluginSpaceCreateFromProfileArgs): PluginApiReturn<PluginSpaceCreateFromProfileResult>
115
-
116
- /**
117
- * Update a space's BRep and mesh geometry by extruding a 2D profile.
118
- *
119
- * The {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.profile profile} is
120
- * extruded upward (along the Y axis) by
121
- * {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.extrudeHeight extrudeHeight}
122
- * and applied to the existing space. The space keeps the same `spaceId`,
123
- * metadata, department, and transform; only its geometry is replaced.
124
- *
125
- * Profile points are interpreted in scene coordinates. Profiles returned by
126
- * {@linkcode PluginSpaceApi.get} with `"profile"` can be passed back directly;
127
- * `"planPoints"` can be used to construct line-only profiles in the same X/Z
128
- * plan coordinate space.
129
- *
130
- * Use {@linkcode PluginProfileApi.fromLinePoints} to quickly build a profile
131
- * from a list of points.
132
- *
133
- * @param args - An object containing:
134
- * - {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.spaceId args.spaceId} —
135
- * The unique space ID to update
136
- * - {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.profile args.profile} —
137
- * A closed {@linkcode PProfile} defining the new floor shape
138
- * - {@linkcode PluginSpaceUpdateGeometryFromProfileArgs.extrudeHeight
139
- * args.extrudeHeight} — New extrusion height in Babylon units
140
- * @returns A {@linkcode PluginSpaceUpdateGeometryFromProfileResult} with the
141
- * `spaceId` of the updated space
142
- * @throws If the space does not exist, the component is not a space/mass, the
143
- * height is not positive, or the profile cannot create valid geometry
144
- *
145
- * # Example
146
- * ```ts
147
- * const { vec3 } = snaptrude.core.math
148
- *
149
- * const profile = await snaptrude.core.geom.profile.fromLinePoints({
150
- * points: [
151
- * vec3.new(0, 0, 0),
152
- * vec3.new(12, 0, 0),
153
- * vec3.new(12, 0, 6),
154
- * vec3.new(0, 0, 6),
155
- * ],
156
- * })
157
- *
158
- * const { spaceId } = await snaptrude.entity.space.updateGeometryFromProfile({
159
- * spaceId: "some-space-id",
160
- * profile,
161
- * extrudeHeight: 4,
162
- * })
163
- * ```
164
- */
165
- public abstract updateGeometryFromProfile({
166
- spaceId,
167
- profile,
168
- extrudeHeight,
169
- }: PluginSpaceUpdateGeometryFromProfileArgs): PluginApiReturn<PluginSpaceUpdateGeometryFromProfileResult>
170
-
171
- /**
172
- * Get the IDs of all spaces in the current project.
173
- *
174
- * Returns every space (mass that is not a building) across all stories.
175
- * Use the returned IDs with {@linkcode PluginSpaceApi.get} to query
176
- * individual space properties.
177
- *
178
- * @returns A {@linkcode PluginSpaceGetAllResult} with a `spacesIds` array
179
- *
180
- * # Example
181
- * ```ts
182
- * const { spacesIds } = await snaptrude.entity.space.getAll()
183
- * console.log(`Project has ${spacesIds.length} spaces`)
184
- * ```
185
- */
186
- public abstract getAll(): PluginApiReturn<PluginSpaceGetAllResult>
187
-
188
- /**
189
- * Get properties of a space by its ID.
190
- *
191
- * Only the properties listed in {@linkcode PluginSpaceGetArgs.properties
192
- * args.properties} are returned — unlisted properties will be `undefined`
193
- * in the result.
194
- *
195
- * @param args - An object containing:
196
- * - {@linkcode PluginSpaceGetArgs.spaceId args.spaceId} — The unique space ID
197
- * (as returned by creation methods or {@linkcode PluginSpaceApi.getAll})
198
- * - {@linkcode PluginSpaceGetArgs.properties args.properties} — Array of property
199
- * names to retrieve. See {@linkcode PluginSpaceGetProperty} for available values.
200
- * @returns A partial {@linkcode PluginSpaceGetResult} containing only the requested
201
- * properties
202
- * @throws If the space does not exist or the component is not a space/mass
203
- *
204
- * # Example
205
- * ```ts
206
- * const info = await snaptrude.entity.space.get({
207
- * spaceId: "some-space-id",
208
- * properties: ["name", "area", "position"],
209
- * })
210
- * console.log(info.name, info.area, info.position)
211
- * ```
212
- */
213
- public abstract get({
214
- spaceId,
215
- properties,
216
- }: PluginSpaceGetArgs): PluginApiReturn<PluginSpaceGetResult>
217
-
218
- /**
219
- * Delete a space by its ID.
220
- *
221
- * Permanently removes the space and its associated mesh from the scene.
222
- * This operation is undoable via Snaptrude's command system.
223
- *
224
- * @param args - An object containing:
225
- * - {@linkcode PluginSpaceDeleteArgs.spaceId args.spaceId} — The unique space ID
226
- * to delete
227
- * @throws If the space does not exist or the component is not a space/mass
228
- *
229
- * # Example
230
- * ```ts
231
- * await snaptrude.entity.space.delete({ spaceId: "some-space-id" })
232
- * ```
233
- */
234
- public abstract delete({
235
- spaceId,
236
- }: PluginSpaceDeleteArgs): PluginApiReturn<PluginSpaceDeleteResult>
237
-
238
- /**
239
- * Update properties of a space by its ID.
240
- *
241
- * Only the properties provided in {@linkcode PluginSpaceUpdateArgs.properties
242
- * args.properties} will be updated — omitted properties remain unchanged.
243
- * This operation is undoable via Snaptrude's command system.
244
- *
245
- * @param args - An object containing:
246
- * - {@linkcode PluginSpaceUpdateArgs.spaceId args.spaceId} — The unique space ID
247
- * to update
248
- * - {@linkcode PluginSpaceUpdateArgs.properties args.properties} — Key/value pairs
249
- * of properties to update. See {@linkcode PluginSpaceUpdateArgs} for supported fields.
250
- * @returns A {@linkcode PluginSpaceUpdateResult} echoing back the `spaceId` and
251
- * the updated property values
252
- * @throws If the space does not exist or the component is not a space/mass
253
- *
254
- * # Example
255
- * ```ts
256
- * const result = await snaptrude.entity.space.update({
257
- * spaceId: "some-space-id",
258
- * properties: {
259
- * room_type: "Kitchen",
260
- * massType: "Room",
261
- * departmentId: "CORE",
262
- * },
263
- * })
264
- * ```
265
- */
266
- public abstract update(
267
- args: PluginSpaceUpdateArgs,
268
- ): PluginApiReturn<PluginSpaceUpdateResult>
269
-
270
- /**
271
- * Create many spaces in a single undoable operation.
272
- *
273
- * Each item is either a rectangular box (`kind: "rectangular"`) or an
274
- * extruded profile (`kind: "profile"`), and may optionally set `room_type`,
275
- * `spaceType`, `massType`, and `departmentId`. All creations — and the
276
- * optional property assignments — are batched into **one** command, so the
277
- * entire batch is undone/redone in a single step.
278
- *
279
- * All items are validated first; if any item is invalid the call **throws**
280
- * and no spaces are created (nothing is applied) — consistent with the
281
- * single-item create methods.
282
- *
283
- * @param args - {@linkcode PluginSpaceBulkCreateArgs} with an `items` array
284
- * @returns A {@linkcode PluginSpaceBulkCreateResult} with the `spaceIds` of
285
- * the created spaces, in input order
286
- * @throws If any item has invalid dimensions, height, or profile
287
- *
288
- * # Example
289
- * ```ts
290
- * const { vec3 } = snaptrude.core.math
291
- *
292
- * const { spaceIds } = await snaptrude.entity.space.bulkCreate({
293
- * items: [
294
- * {
295
- * kind: "rectangular",
296
- * position: vec3.new(0, 0, 0),
297
- * dimensions: { width: 5, height: 3, depth: 4 },
298
- * spaceType: "Room",
299
- * departmentId: "CORE",
300
- * },
301
- * {
302
- * kind: "profile",
303
- * profile: await snaptrude.core.geom.profile.fromLinePoints({
304
- * points: [vec3.new(0, 0, 0), vec3.new(8, 0, 0), vec3.new(8, 0, 6), vec3.new(0, 0, 6)],
305
- * }),
306
- * extrudeHeight: 3,
307
- * position: vec3.new(10, 0, 0),
308
- * massType: "Room",
309
- * },
310
- * ],
311
- * })
312
- * ```
313
- */
314
- public abstract bulkCreate(
315
- args: PluginSpaceBulkCreateArgs,
316
- ): PluginApiReturn<PluginSpaceBulkCreateResult>
317
-
318
- /**
319
- * Update many existing spaces in a single undoable operation.
320
- *
321
- * Each item targets an existing space by `spaceId` and may change its
322
- * geometry (`profile` + `extrudeHeight`, which must be supplied together) and/or
323
- * its `properties` (`room_type`, `massType`, `spaceType`, `areaClass`,
324
- * `departmentId` —
325
- * nested under `properties`, mirroring {@linkcode PluginSpaceApi.update}). All
326
- * changes are batched into **one** command, so the entire batch is
327
- * undone/redone in a single step.
328
- *
329
- * All items are validated first; if any item is invalid — an unknown
330
- * `spaceId`, a non-positive height, or supplying only one of
331
- * `profile`/`extrudeHeight` — the call **throws** and no changes are applied.
332
- *
333
- * @param args - {@linkcode PluginSpaceBulkUpdateArgs} with an `items` array
334
- * @returns A {@linkcode PluginSpaceBulkUpdateResult} echoing one
335
- * {@linkcode PluginSpaceUpdateResult} per item in `spaces`, in input order
336
- * @throws If any item targets an unknown space, has a non-positive height, or
337
- * supplies only one of `profile`/`extrudeHeight`
338
- *
339
- * # Example
340
- * ```ts
341
- * const { spaces } = await snaptrude.entity.space.bulkUpdate({
342
- * items: [
343
- * { spaceId: "space-a", properties: { room_type: "Kitchen", spaceType: "Room" } },
344
- * { spaceId: "space-b", profile, extrudeHeight: 4 },
345
- * ],
346
- * })
347
- * ```
348
- */
349
- public abstract bulkUpdate(
350
- args: PluginSpaceBulkUpdateArgs,
351
- ): PluginApiReturn<PluginSpaceBulkUpdateResult>
352
-
353
- /**
354
- * Delete many spaces in a single undoable operation.
355
- *
356
- * All deletions are batched into **one** command, so the entire batch is
357
- * undone/redone in a single step.
358
- *
359
- * All IDs are validated first; if any ID is unknown or is not a space the
360
- * call **throws** and no spaces are deleted — consistent with the single-item
361
- * {@linkcode PluginSpaceApi.delete}.
362
- *
363
- * @param args - {@linkcode PluginSpaceBulkDeleteArgs} with a `spaceIds` array
364
- * @returns A {@linkcode PluginSpaceBulkDeleteResult} with `deletedSpaceIds`
365
- * (the removed IDs, in input order)
366
- * @throws If any ID does not resolve to an existing space
367
- *
368
- * # Example
369
- * ```ts
370
- * await snaptrude.entity.space.bulkDelete({ spaceIds: ["space-a", "space-b"] })
371
- * ```
372
- */
373
- public abstract bulkDelete(
374
- args: PluginSpaceBulkDeleteArgs,
375
- ): PluginApiReturn<PluginSpaceBulkDeleteResult>
376
- }
377
14
 
378
15
  /**
379
- * Arguments for {@linkcode PluginSpaceApi.createRectangular}.
16
+ * Arguments for `createRectangular`.
380
17
  *
381
18
  * | Property | Type | Description |
382
19
  * |---|---|---|
383
- * | `position` | {@linkcode PVec3} | Origin position in Babylon units |
20
+ * | `position` | {@linkcode Vec3Handle} | Origin position in Babylon units |
384
21
  * | `dimensions` | `{ width, height, depth }` | Box dimensions in Babylon units |
385
22
  */
386
23
  export const PluginSpaceCreateRectangularArgs = z.object({
387
- position: PVec3,
24
+ position: Vec3Handle,
388
25
  dimensions: z.object({
389
26
  width: z.number(),
390
27
  height: z.number(),
@@ -397,7 +34,7 @@ export type PluginSpaceCreateRectangularArgs = z.infer<
397
34
  >
398
35
 
399
36
  /**
400
- * Result of {@linkcode PluginSpaceApi.createRectangular}.
37
+ * Result of `createRectangular`.
401
38
  *
402
39
  * | Property | Type | Description |
403
40
  * |---|---|---|
@@ -412,20 +49,20 @@ export type PluginSpaceCreateRectangularResult = z.infer<
412
49
  >
413
50
 
414
51
  /**
415
- * Arguments for {@linkcode PluginSpaceApi.createFromProfile}.
52
+ * Arguments for `createFromProfile`.
416
53
  *
417
54
  * | Property | Type | Description |
418
55
  * |---|---|---|
419
- * | `profile` | {@linkcode PProfile} | Closed 2D profile defining the outer floor shape |
420
- * | `innerProfiles` | {@linkcode PProfile}`[]` | Optional closed profiles to subtract as holes |
56
+ * | `profile` | {@linkcode ProfileHandle} | Handle to a closed 2D profile (the outer floor shape) |
57
+ * | `innerProfiles` | {@linkcode ProfileHandle}`[]` | Optional profile handles to subtract as holes |
421
58
  * | `extrudeHeight` | `number` | Extrusion height in Babylon units |
422
- * | `position` | {@linkcode PVec3} | Offset position in Babylon units |
59
+ * | `position` | {@linkcode Vec3Handle} | Offset position in Babylon units |
423
60
  */
424
61
  export const PluginSpaceCreateFromProfileArgs = z.object({
425
- profile: PProfile,
426
- innerProfiles: z.array(PProfile).optional(),
62
+ profile: ProfileHandle,
63
+ innerProfiles: z.array(ProfileHandle).optional(),
427
64
  extrudeHeight: z.number(),
428
- position: PVec3,
65
+ position: Vec3Handle,
429
66
  })
430
67
 
431
68
  export type PluginSpaceCreateFromProfileArgs = z.infer<
@@ -433,7 +70,7 @@ export type PluginSpaceCreateFromProfileArgs = z.infer<
433
70
  >
434
71
 
435
72
  /**
436
- * Result of {@linkcode PluginSpaceApi.createFromProfile}.
73
+ * Result of `createFromProfile`.
437
74
  *
438
75
  * | Property | Type | Description |
439
76
  * |---|---|---|
@@ -448,17 +85,17 @@ export type PluginSpaceCreateFromProfileResult = z.infer<
448
85
  >
449
86
 
450
87
  /**
451
- * Arguments for {@linkcode PluginSpaceApi.updateGeometryFromProfile}.
88
+ * Arguments for `updateGeometryFromProfile`.
452
89
  *
453
90
  * | Property | Type | Description |
454
91
  * |---|---|---|
455
92
  * | `spaceId` | `string` | Space to update |
456
- * | `profile` | {@linkcode PProfile} | Closed 2D profile defining the new floor shape |
93
+ * | `profile` | {@linkcode ProfileHandle} | Handle to the closed 2D profile defining the new floor shape |
457
94
  * | `extrudeHeight` | `number` | New extrusion height in Babylon units |
458
95
  */
459
96
  export const PluginSpaceUpdateGeometryFromProfileArgs = z.object({
460
97
  spaceId: z.string(),
461
- profile: PProfile,
98
+ profile: ProfileHandle,
462
99
  extrudeHeight: z.number(),
463
100
  })
464
101
 
@@ -467,7 +104,7 @@ export type PluginSpaceUpdateGeometryFromProfileArgs = z.infer<
467
104
  >
468
105
 
469
106
  /**
470
- * Result of {@linkcode PluginSpaceApi.updateGeometryFromProfile}.
107
+ * Result of `updateGeometryFromProfile`.
471
108
  *
472
109
  * | Property | Type | Description |
473
110
  * |---|---|---|
@@ -501,7 +138,6 @@ export type PluginSpaceUpdateGeometryFromProfileResult = z.infer<
501
138
  * | `"height"` | `number` | Height dimension |
502
139
  * | `"massType"` | `string \| null` | Mass type classification |
503
140
  * | `"spaceType"` | `string \| null` | Space type classification (Room, Balcony, etc.) |
504
- * | `"areaClass"` | {@linkcode PluginAreaClass} | Effective area classification (`"NET"`, `"GROSS"`, or `"EXCLUDED"`), resolving any per-space override then the space-type default. Never null. |
505
141
  * | `"storey"` | `number \| null` | Story the space belongs to |
506
142
  * | `"departmentId"` | `string \| null` | Assigned department ID |
507
143
  * | `"departmentName"` | `string` | Assigned department name |
@@ -510,18 +146,23 @@ export type PluginSpaceUpdateGeometryFromProfileResult = z.infer<
510
146
  * **Derived from mesh:**
511
147
  * | Value | Return Type | Description |
512
148
  * |---|---|---|
513
- * | `"position"` | {@linkcode PVec3} | Local position relative to parent |
514
- * | `"absolutePosition"` | {@linkcode PVec3} | Absolute position in the scene |
515
- * | `"rotation"` | {@linkcode PVec3} | Euler rotation angles (radians) |
516
- * | `"rotationQuaternion"` | {@linkcode PQuat} \| `null` | Quaternion rotation, or `null` if unset |
149
+ * | `"position"` | {@linkcode Vec3Components} | Local position relative to parent |
150
+ * | `"absolutePosition"` | {@linkcode Vec3Components} | Absolute position in the scene |
151
+ * | `"rotation"` | {@linkcode Vec3Components} | Euler rotation angles (radians) |
152
+ * | `"rotationQuaternion"` | {@linkcode QuatComponents} \| `null` | Quaternion rotation, or `null` if unset |
517
153
  *
518
154
  * **Derived from brep:**
519
155
  * | Value | Return Type | Description |
520
156
  * |---|---|---|
521
- * | `"planPoints"` | {@linkcode PVec3}`[]` | Bottom outer profile points in world space with `y = 0` (2D plan). No closing duplicate point. |
522
- * | `"profile"` | {@linkcode PProfile} | Bottom outer profile in world space, preserving line/arc curve data. |
523
- * | `"innerProfiles"` | {@linkcode PProfile}`[]` | Bottom inner profiles (holes) in world space, preserving line/arc curve data. Empty array when the space has no holes. |
524
- * | `"innerPlanPoints"` | {@linkcode PVec3}`[][]` | One point loop per inner profile (hole) in world space with `y = 0` (2D plan). No closing duplicate point. Empty array when the space has no holes. |
157
+ * | `"planPoints"` | {@linkcode Vec3Components}`[]` | Bottom outer profile points in world space with `y = 0` (2D plan). No closing duplicate point. |
158
+ * | `"profile"` | {@linkcode CurveHandle}`[]` | Bottom outer profile curves in world space, as opaque curve handles. Read coordinates via the `core.geom.curve` read API. |
159
+ * | `"innerProfiles"` | {@linkcode CurveHandle}`[][]` | Inner (hole) profile curve loops in world space one loop per hole, `[]` when the space has none. Each curve is an opaque handle. |
160
+ * | `"innerPlanPoints"` | {@linkcode Vec3Components}`[][]` | Inner (hole) profile points in world space with `y = 0` one loop per hole, no closing duplicate, `[]` when none. |
161
+ *
162
+ * **Derived from adjacency manager:**
163
+ * | Value | Return Type | Description |
164
+ * |---|---|---|
165
+ * | `"adjacency"` | `{ spaceId: string; value: number }[]` | Adjacency relationships to other spaces. `value`: `2` = Direct (required), `1` = Indirect or physical contact, `-1` = Restricted; `0` (no relationship) entries are filtered out. Empty when adjacency has never been computed — see `program.adjacency.compute`. |
525
166
  */
526
167
  export const PluginSpaceGetProperty = z.enum([
527
168
  // Basic
@@ -556,7 +197,7 @@ export const PluginSpaceGetProperty = z.enum([
556
197
  ])
557
198
 
558
199
  /**
559
- * Arguments for {@linkcode PluginSpaceApi.get}.
200
+ * Arguments for `get`.
560
201
  *
561
202
  * | Property | Type | Description |
562
203
  * |---|---|---|
@@ -600,24 +241,22 @@ export const PluginSpaceType = z.enum([
600
241
  "Envelope",
601
242
  "Parking",
602
243
  ])
244
+ /** The space-type value union (same-name type alias for positional signatures). */
245
+ export type PluginSpaceType = z.infer<typeof PluginSpaceType>
603
246
 
604
247
  /**
605
- * Area classification for a space controls which area total the space's
606
- * footprint contributes to.
248
+ * Area-class classification of a space (mirrors the internal `AreaClass` enum).
607
249
  *
608
250
  * | Value | Description |
609
251
  * |---|---|
610
- * | `"NET"` | Counted toward the net (carpet) area total |
611
- * | `"GROSS"` | Counted toward the gross (built-up) area total |
612
- * | `"EXCLUDED"` | Counted toward neither total |
613
- *
614
- * The classification does **not** change a space's own footprint area — it
615
- * only decides which project-level total that footprint is summed into.
252
+ * | `"NET"` | Net (usable) area |
253
+ * | `"GROSS"` | Gross area |
254
+ * | `"EXCLUDED"` | Excluded from area totals |
616
255
  */
617
256
  export const PluginAreaClass = z.enum(["NET", "GROSS", "EXCLUDED"])
618
257
 
619
258
  /**
620
- * Result of {@linkcode PluginSpaceApi.get}.
259
+ * Result of `get`.
621
260
  *
622
261
  * A partial object — only the properties that were requested in
623
262
  * {@linkcode PluginSpaceGetArgs.properties} will be present.
@@ -642,16 +281,19 @@ export const PluginSpaceGetResult = z
642
281
  departmentName: z.string(),
643
282
  departmentColor: z.string(),
644
283
  // Derived from mesh
645
- position: PVec3,
646
- absolutePosition: PVec3,
647
- rotation: PVec3,
648
- rotationQuaternion: PQuat.nullable(),
284
+ position: Vec3Components,
285
+ absolutePosition: Vec3Components,
286
+ rotation: Vec3Components,
287
+ rotationQuaternion: QuatComponents.nullable(),
649
288
  // Derived from brep
650
- planPoints: z.array(PVec3),
651
- profile: PProfile,
652
- innerProfiles: z.array(PProfile),
653
- innerPlanPoints: z.array(z.array(PVec3)),
654
- // Derived from adjacency manager
289
+ planPoints: z.array(Vec3Components),
290
+ profile: z.array(CurveHandle),
291
+ innerProfiles: z.array(z.array(CurveHandle)),
292
+ innerPlanPoints: z.array(z.array(Vec3Components)),
293
+ // Derived from adjacency manager.
294
+ // value: 2 = Direct (required), 1 = Indirect or physical contact, -1 = Restricted;
295
+ // 0 (no relationship) entries are filtered out. Empty array when adjacency has
296
+ // never been computed — run program.adjacency.compute() first for fresh data.
655
297
  adjacency: z.array(z.object({
656
298
  spaceId: z.string(),
657
299
  value: z.number(),
@@ -662,7 +304,7 @@ export const PluginSpaceGetResult = z
662
304
  export type PluginSpaceGetResult = z.infer<typeof PluginSpaceGetResult>
663
305
 
664
306
  /**
665
- * Result of {@linkcode PluginSpaceApi.getAll}.
307
+ * Result of `getAll`.
666
308
  *
667
309
  * | Property | Type | Description |
668
310
  * |---|---|---|
@@ -675,7 +317,7 @@ export const PluginSpaceGetAllResult = z.object({
675
317
  export type PluginSpaceGetAllResult = z.infer<typeof PluginSpaceGetAllResult>
676
318
 
677
319
  /**
678
- * Arguments for {@linkcode PluginSpaceApi.delete}.
320
+ * Arguments for `delete`.
679
321
  *
680
322
  * | Property | Type | Description |
681
323
  * |---|---|---|
@@ -687,7 +329,7 @@ export const PluginSpaceDeleteArgs = z.object({
687
329
 
688
330
  export type PluginSpaceDeleteArgs = z.infer<typeof PluginSpaceDeleteArgs>
689
331
 
690
- /** Result type for {@linkcode PluginSpaceApi.delete} — returns nothing on success. */
332
+ /** Result type for `delete` — returns nothing on success. */
691
333
  export type PluginSpaceDeleteResult = void
692
334
 
693
335
  /**
@@ -724,6 +366,8 @@ export const PluginMassType = z.enum([
724
366
  "Mass",
725
367
  "Site",
726
368
  ])
369
+ /** The mass-type value union (same-name type alias for positional signatures). */
370
+ export type PluginMassType = z.infer<typeof PluginMassType>
727
371
 
728
372
  /**
729
373
  * Well-known (built-in) department IDs.
@@ -750,9 +394,11 @@ export const PluginDepartmentId = z.union([
750
394
  PluginWellKnownDepartmentId,
751
395
  z.uuid(),
752
396
  ])
397
+ /** The department-id value union (same-name type alias for positional signatures). */
398
+ export type PluginDepartmentId = z.infer<typeof PluginDepartmentId>
753
399
 
754
400
  /**
755
- * Arguments for {@linkcode PluginSpaceApi.update}.
401
+ * Arguments for `update`.
756
402
  *
757
403
  * | Property | Type | Description |
758
404
  * |---|---|---|
@@ -760,7 +406,6 @@ export const PluginDepartmentId = z.union([
760
406
  * | `properties` | `object` | Key/value pairs of properties to update (all optional) |
761
407
  * | `properties.room_type` | `string?` | New room type label |
762
408
  * | `properties.massType` | {@linkcode PluginMassType}`?` | New mass type |
763
- * | `properties.areaClass` | {@linkcode PluginAreaClass}`?` | New area classification. Sets an explicit per-space override (`"NET"`, `"GROSS"`, or `"EXCLUDED"`) that wins over the space-type default. |
764
409
  * | `properties.departmentId` | {@linkcode PluginDepartmentId}`?` | New department ID |
765
410
  */
766
411
  export const PluginSpaceUpdateArgs = z.object({
@@ -777,7 +422,7 @@ export const PluginSpaceUpdateArgs = z.object({
777
422
  export type PluginSpaceUpdateArgs = z.infer<typeof PluginSpaceUpdateArgs>
778
423
 
779
424
  /**
780
- * Result of {@linkcode PluginSpaceApi.update}.
425
+ * Result of `update`.
781
426
  *
782
427
  * Echoes back the `spaceId` and the values of properties that were updated.
783
428
  * Properties that were not included in the update request will be `undefined`.
@@ -788,7 +433,6 @@ export type PluginSpaceUpdateArgs = z.infer<typeof PluginSpaceUpdateArgs>
788
433
  * | `room_type` | `string?` | Updated room type (if changed) |
789
434
  * | `massType` | `string?` | Updated mass type (if changed) |
790
435
  * | `spaceType` | `string?` | Updated space type (if changed) |
791
- * | `areaClass` | {@linkcode PluginAreaClass}`?` | Updated area classification (if changed) |
792
436
  * | `departmentId` | `string \| null?` | Updated department ID (if changed) |
793
437
  */
794
438
  export const PluginSpaceUpdateResult = z.object({
@@ -807,7 +451,7 @@ export type PluginSpaceUpdateResult = z.infer<typeof PluginSpaceUpdateResult>
807
451
  // ---------------------------------------------------------------------------
808
452
 
809
453
  /**
810
- * A single item for {@linkcode PluginSpaceApi.bulkCreate}.
454
+ * A single item for `bulkCreate`.
811
455
  *
812
456
  * Discriminated on `kind`:
813
457
  * - `"rectangular"` — a box defined by `position` + `dimensions` (mirrors
@@ -822,7 +466,7 @@ export type PluginSpaceUpdateResult = z.infer<typeof PluginSpaceUpdateResult>
822
466
  export const PluginSpaceBulkCreateItem = z.discriminatedUnion("kind", [
823
467
  z.object({
824
468
  kind: z.literal("rectangular"),
825
- position: PVec3,
469
+ position: Vec3Handle,
826
470
  dimensions: z.object({
827
471
  width: z.number(),
828
472
  height: z.number(),
@@ -835,10 +479,10 @@ export const PluginSpaceBulkCreateItem = z.discriminatedUnion("kind", [
835
479
  }),
836
480
  z.object({
837
481
  kind: z.literal("profile"),
838
- profile: PProfile,
839
- innerProfiles: z.array(PProfile).optional(),
482
+ profile: ProfileHandle,
483
+ innerProfiles: z.array(ProfileHandle).optional(),
840
484
  extrudeHeight: z.number(),
841
- position: PVec3,
485
+ position: Vec3Handle,
842
486
  room_type: z.string().optional(),
843
487
  spaceType: PluginSpaceType.optional(),
844
488
  massType: PluginMassType.optional(),
@@ -849,7 +493,7 @@ export const PluginSpaceBulkCreateItem = z.discriminatedUnion("kind", [
849
493
  export type PluginSpaceBulkCreateItem = z.infer<typeof PluginSpaceBulkCreateItem>
850
494
 
851
495
  /**
852
- * Arguments for {@linkcode PluginSpaceApi.bulkCreate}.
496
+ * Arguments for `bulkCreate`.
853
497
  *
854
498
  * | Property | Type | Description |
855
499
  * |---|---|---|
@@ -862,7 +506,7 @@ export const PluginSpaceBulkCreateArgs = z.object({
862
506
  export type PluginSpaceBulkCreateArgs = z.infer<typeof PluginSpaceBulkCreateArgs>
863
507
 
864
508
  /**
865
- * Result of {@linkcode PluginSpaceApi.bulkCreate}.
509
+ * Result of `bulkCreate`.
866
510
  *
867
511
  * | Property | Type | Description |
868
512
  * |---|---|---|
@@ -877,7 +521,7 @@ export type PluginSpaceBulkCreateResult = z.infer<
877
521
  >
878
522
 
879
523
  /**
880
- * A single item for {@linkcode PluginSpaceApi.bulkUpdate}.
524
+ * A single item for `bulkUpdate`.
881
525
  *
882
526
  * Targets an existing space by `spaceId`. Geometry fields `profile` and
883
527
  * `extrudeHeight` must be supplied **together** (mirrors
@@ -887,13 +531,13 @@ export type PluginSpaceBulkCreateResult = z.infer<
887
531
  * | Property | Type | Description |
888
532
  * |---|---|---|
889
533
  * | `spaceId` | `string` | The space to update |
890
- * | `profile` | {@linkcode PProfile}`?` | New floor shape (requires `extrudeHeight`) |
534
+ * | `profile` | {@linkcode ProfileHandle}`?` | New floor shape handle (requires `extrudeHeight`) |
891
535
  * | `extrudeHeight` | `number?` | New extrusion height (requires `profile`) |
892
536
  * | `properties` | `object?` | Property changes (same shape as {@linkcode PluginSpaceUpdateArgs.properties}) |
893
537
  */
894
538
  export const PluginSpaceBulkUpdateItem = z.object({
895
539
  spaceId: z.string(),
896
- profile: PProfile.optional(),
540
+ profile: ProfileHandle.optional(),
897
541
  extrudeHeight: z.number().optional(),
898
542
  properties: z
899
543
  .object({
@@ -909,7 +553,7 @@ export const PluginSpaceBulkUpdateItem = z.object({
909
553
  export type PluginSpaceBulkUpdateItem = z.infer<typeof PluginSpaceBulkUpdateItem>
910
554
 
911
555
  /**
912
- * Arguments for {@linkcode PluginSpaceApi.bulkUpdate}.
556
+ * Arguments for `bulkUpdate`.
913
557
  *
914
558
  * | Property | Type | Description |
915
559
  * |---|---|---|
@@ -922,10 +566,10 @@ export const PluginSpaceBulkUpdateArgs = z.object({
922
566
  export type PluginSpaceBulkUpdateArgs = z.infer<typeof PluginSpaceBulkUpdateArgs>
923
567
 
924
568
  /**
925
- * Result of {@linkcode PluginSpaceApi.bulkUpdate}.
569
+ * Result of `bulkUpdate`.
926
570
  *
927
571
  * Echoes one {@linkcode PluginSpaceUpdateResult} per item, in input order —
928
- * the same per-space shape returned by {@linkcode PluginSpaceApi.update}.
572
+ * the same per-space shape returned by `update`.
929
573
  *
930
574
  * | Property | Type | Description |
931
575
  * |---|---|---|
@@ -940,7 +584,7 @@ export type PluginSpaceBulkUpdateResult = z.infer<
940
584
  >
941
585
 
942
586
  /**
943
- * Arguments for {@linkcode PluginSpaceApi.bulkDelete}.
587
+ * Arguments for `bulkDelete`.
944
588
  *
945
589
  * | Property | Type | Description |
946
590
  * |---|---|---|
@@ -953,7 +597,7 @@ export const PluginSpaceBulkDeleteArgs = z.object({
953
597
  export type PluginSpaceBulkDeleteArgs = z.infer<typeof PluginSpaceBulkDeleteArgs>
954
598
 
955
599
  /**
956
- * Result of {@linkcode PluginSpaceApi.bulkDelete}.
600
+ * Result of `bulkDelete`.
957
601
  *
958
602
  * | Property | Type | Description |
959
603
  * |---|---|---|