@snaptrude/plugin-core 0.7.1 → 0.9.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 (193) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/api-manifest.full.json +7703 -0
  3. package/api-manifest.json +2946 -259
  4. package/dist/api/analysis/daylight.d.ts +603 -0
  5. package/dist/api/analysis/daylight.d.ts.map +1 -0
  6. package/dist/api/analysis/heatmaps.d.ts +438 -14
  7. package/dist/api/analysis/heatmaps.d.ts.map +1 -1
  8. package/dist/api/analysis/index.d.ts +15 -0
  9. package/dist/api/analysis/index.d.ts.map +1 -1
  10. package/dist/api/analysis/solar.d.ts +249 -0
  11. package/dist/api/analysis/solar.d.ts.map +1 -0
  12. package/dist/api/analysis/weather.d.ts +193 -0
  13. package/dist/api/analysis/weather.d.ts.map +1 -0
  14. package/dist/api/core/camera/index.d.ts +245 -0
  15. package/dist/api/core/camera/index.d.ts.map +1 -0
  16. package/dist/api/core/comment/index.d.ts +105 -2
  17. package/dist/api/core/comment/index.d.ts.map +1 -1
  18. package/dist/api/core/geom/create/index.d.ts +331 -14
  19. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  20. package/dist/api/core/geom/delete/index.d.ts +8 -2
  21. package/dist/api/core/geom/delete/index.d.ts.map +1 -1
  22. package/dist/api/core/geom/query/arc.d.ts +5 -5
  23. package/dist/api/core/geom/query/brep.d.ts +18 -18
  24. package/dist/api/core/geom/query/circle.d.ts +18 -18
  25. package/dist/api/core/geom/query/contour.d.ts +20 -20
  26. package/dist/api/core/geom/query/curve.d.ts +49 -49
  27. package/dist/api/core/geom/query/edge.d.ts +5 -5
  28. package/dist/api/core/geom/query/face.d.ts +16 -16
  29. package/dist/api/core/geom/query/halfedge.d.ts +8 -8
  30. package/dist/api/core/geom/query/profile.d.ts +19 -19
  31. package/dist/api/core/geom/query/vertex.d.ts +8 -8
  32. package/dist/api/core/geom/update/contour.d.ts +14 -14
  33. package/dist/api/core/geom/update/curve.d.ts +7 -7
  34. package/dist/api/core/geom/update/profile.d.ts +16 -16
  35. package/dist/api/core/handles/index.d.ts +210 -0
  36. package/dist/api/core/handles/index.d.ts.map +1 -0
  37. package/dist/api/core/index.d.ts +24 -0
  38. package/dist/api/core/index.d.ts.map +1 -1
  39. package/dist/api/core/io/export/index.d.ts +134 -0
  40. package/dist/api/core/io/export/index.d.ts.map +1 -0
  41. package/dist/api/core/io/import/index.d.ts +62 -1
  42. package/dist/api/core/io/import/index.d.ts.map +1 -1
  43. package/dist/api/core/io/index.d.ts +5 -0
  44. package/dist/api/core/io/index.d.ts.map +1 -1
  45. package/dist/api/core/layers.d.ts +7 -7
  46. package/dist/api/core/mode/index.d.ts +99 -0
  47. package/dist/api/core/mode/index.d.ts.map +1 -0
  48. package/dist/api/core/proposals/index.d.ts +65 -9
  49. package/dist/api/core/proposals/index.d.ts.map +1 -1
  50. package/dist/api/core/storeys/index.d.ts +251 -0
  51. package/dist/api/core/storeys/index.d.ts.map +1 -0
  52. package/dist/api/core/tags.d.ts +24 -0
  53. package/dist/api/core/tags.d.ts.map +1 -1
  54. package/dist/api/core/user.d.ts +44 -0
  55. package/dist/api/core/user.d.ts.map +1 -0
  56. package/dist/api/core/zoom/index.d.ts +4 -0
  57. package/dist/api/core/zoom/index.d.ts.map +1 -1
  58. package/dist/api/design/boolean/index.d.ts +4 -4
  59. package/dist/api/design/create/index.d.ts +253 -47
  60. package/dist/api/design/create/index.d.ts.map +1 -1
  61. package/dist/api/design/delete/index.d.ts +3 -0
  62. package/dist/api/design/delete/index.d.ts.map +1 -1
  63. package/dist/api/design/doors/index.d.ts +36 -0
  64. package/dist/api/design/doors/index.d.ts.map +1 -1
  65. package/dist/api/design/edit/index.d.ts +1 -1
  66. package/dist/api/design/erase/index.d.ts +2 -2
  67. package/dist/api/design/furniture/index.d.ts +114 -3
  68. package/dist/api/design/furniture/index.d.ts.map +1 -1
  69. package/dist/api/design/index.d.ts +10 -0
  70. package/dist/api/design/index.d.ts.map +1 -1
  71. package/dist/api/design/materials/index.d.ts +111 -14
  72. package/dist/api/design/materials/index.d.ts.map +1 -1
  73. package/dist/api/design/query/geometry/index.d.ts +112 -0
  74. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  75. package/dist/api/design/query/index.d.ts +35 -1
  76. package/dist/api/design/query/index.d.ts.map +1 -1
  77. package/dist/api/design/query/referenceLines.d.ts +45 -0
  78. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  79. package/dist/api/design/query/spaces.d.ts +178 -5
  80. package/dist/api/design/query/spaces.d.ts.map +1 -1
  81. package/dist/api/design/transform/index.d.ts +95 -14
  82. package/dist/api/design/transform/index.d.ts.map +1 -1
  83. package/dist/api/design/types/index.d.ts +181 -0
  84. package/dist/api/design/types/index.d.ts.map +1 -0
  85. package/dist/api/design/update/index.d.ts +385 -2
  86. package/dist/api/design/update/index.d.ts.map +1 -1
  87. package/dist/api/design/visibility.d.ts +98 -0
  88. package/dist/api/design/visibility.d.ts.map +1 -0
  89. package/dist/api/entity/buildableEnvelope.d.ts +4 -0
  90. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  91. package/dist/api/entity/referenceLine.d.ts +10 -2
  92. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  93. package/dist/api/entity/space.d.ts +19 -19
  94. package/dist/api/entity/story.d.ts +148 -15
  95. package/dist/api/entity/story.d.ts.map +1 -1
  96. package/dist/api/index.d.ts +5 -0
  97. package/dist/api/index.d.ts.map +1 -1
  98. package/dist/api/presentation/annotate.d.ts +448 -0
  99. package/dist/api/presentation/annotate.d.ts.map +1 -0
  100. package/dist/api/presentation/diagrams.d.ts +49 -8
  101. package/dist/api/presentation/diagrams.d.ts.map +1 -1
  102. package/dist/api/presentation/export.d.ts +108 -0
  103. package/dist/api/presentation/export.d.ts.map +1 -0
  104. package/dist/api/presentation/import.d.ts +6 -0
  105. package/dist/api/presentation/import.d.ts.map +1 -1
  106. package/dist/api/presentation/index.d.ts +47 -0
  107. package/dist/api/presentation/index.d.ts.map +1 -1
  108. package/dist/api/presentation/placedViews.d.ts +370 -0
  109. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  110. package/dist/api/presentation/shapes.d.ts +481 -0
  111. package/dist/api/presentation/shapes.d.ts.map +1 -0
  112. package/dist/api/presentation/sheets.d.ts +410 -13
  113. package/dist/api/presentation/sheets.d.ts.map +1 -1
  114. package/dist/api/presentation/views.d.ts +165 -10
  115. package/dist/api/presentation/views.d.ts.map +1 -1
  116. package/dist/api/program/areas.d.ts +63 -3
  117. package/dist/api/program/areas.d.ts.map +1 -1
  118. package/dist/api/program/cores.d.ts +3 -99
  119. package/dist/api/program/cores.d.ts.map +1 -1
  120. package/dist/api/program/index.d.ts +2 -2
  121. package/dist/api/program/index.d.ts.map +1 -1
  122. package/dist/api/program/layout.d.ts +172 -12
  123. package/dist/api/program/layout.d.ts.map +1 -1
  124. package/dist/api/program/site.d.ts +105 -8
  125. package/dist/api/program/site.d.ts.map +1 -1
  126. package/dist/api/program/spreadsheet.d.ts +365 -41
  127. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  128. package/dist/api/workspace/index.d.ts +460 -0
  129. package/dist/api/workspace/index.d.ts.map +1 -0
  130. package/dist/handles.d.ts +64 -25
  131. package/dist/handles.d.ts.map +1 -1
  132. package/dist/index.cjs +3210 -1671
  133. package/dist/index.cjs.map +1 -1
  134. package/dist/index.js +3008 -1666
  135. package/dist/index.js.map +1 -1
  136. package/package.json +3 -2
  137. package/scripts/generate-manifest.mjs +45 -0
  138. package/src/api/analysis/daylight.ts +470 -0
  139. package/src/api/analysis/heatmaps.ts +444 -17
  140. package/src/api/analysis/index.ts +15 -0
  141. package/src/api/analysis/solar.ts +237 -0
  142. package/src/api/analysis/weather.ts +179 -0
  143. package/src/api/core/camera/index.ts +251 -0
  144. package/src/api/core/comment/index.ts +120 -2
  145. package/src/api/core/geom/create/index.ts +344 -1
  146. package/src/api/core/geom/delete/index.ts +6 -0
  147. package/src/api/core/handles/index.ts +233 -0
  148. package/src/api/core/index.ts +24 -0
  149. package/src/api/core/io/export/index.ts +126 -0
  150. package/src/api/core/io/import/index.ts +64 -0
  151. package/src/api/core/io/index.ts +5 -0
  152. package/src/api/core/mode/index.ts +96 -0
  153. package/src/api/core/proposals/index.ts +71 -11
  154. package/src/api/core/storeys/index.ts +279 -0
  155. package/src/api/core/tags.ts +27 -0
  156. package/src/api/core/user.ts +46 -0
  157. package/src/api/core/zoom/index.ts +4 -0
  158. package/src/api/design/create/index.ts +303 -36
  159. package/src/api/design/delete/index.ts +3 -0
  160. package/src/api/design/doors/index.ts +40 -0
  161. package/src/api/design/furniture/index.ts +127 -3
  162. package/src/api/design/index.ts +10 -0
  163. package/src/api/design/materials/index.ts +157 -30
  164. package/src/api/design/query/geometry/index.ts +125 -3
  165. package/src/api/design/query/index.ts +37 -7
  166. package/src/api/design/query/referenceLines.ts +52 -0
  167. package/src/api/design/query/spaces.ts +143 -0
  168. package/src/api/design/transform/index.ts +101 -12
  169. package/src/api/design/types/index.ts +156 -0
  170. package/src/api/design/update/index.ts +467 -6
  171. package/src/api/design/visibility.ts +109 -0
  172. package/src/api/entity/buildableEnvelope.ts +4 -0
  173. package/src/api/entity/referenceLine.ts +8 -0
  174. package/src/api/entity/story.ts +161 -15
  175. package/src/api/index.ts +5 -0
  176. package/src/api/presentation/annotate.ts +360 -0
  177. package/src/api/presentation/diagrams.ts +53 -8
  178. package/src/api/presentation/export.ts +108 -0
  179. package/src/api/presentation/import.ts +6 -0
  180. package/src/api/presentation/index.ts +55 -0
  181. package/src/api/presentation/placedViews.ts +363 -0
  182. package/src/api/presentation/shapes.ts +274 -0
  183. package/src/api/presentation/sheets.ts +346 -13
  184. package/src/api/presentation/views.ts +164 -12
  185. package/src/api/program/areas.ts +57 -6
  186. package/src/api/program/cores.ts +3 -91
  187. package/src/api/program/index.ts +2 -2
  188. package/src/api/program/layout.ts +182 -12
  189. package/src/api/program/site.ts +106 -8
  190. package/src/api/program/spreadsheet.ts +376 -35
  191. package/src/api/workspace/index.ts +516 -0
  192. package/src/handles.ts +77 -13
  193. package/tsconfig.json +7 -2
@@ -6,12 +6,12 @@ import { PluginDesignChangeResult } from "../lock";
6
6
  * `snaptrude.design.transform` — rigid transforms on scene entities.
7
7
  *
8
8
  * `move` / `rotate` migrated from the removed `tools.transform.*`; `align` snaps a
9
- * set of components' bounding-box edges to each other (or to a reference). All ops
10
- * are undoable and return {@linkcode PluginDesignChangeResult} `{ affected }`;
11
- * failures throw (RPC rejects).
9
+ * set of components' bounding-box edges to each other (or to a reference); `mirror`
10
+ * flips components in place about a horizontal axis. All ops are undoable and return
11
+ * {@linkcode PluginDesignChangeResult} `{ affected }`; failures throw (RPC rejects).
12
12
  *
13
- * `mirror` / `getPosition` / `setPosition` (and `scale`, an engine gap) are NOT in
14
- * this surface yet — they are a later, non-migration pass.
13
+ * `getPosition` / `setPosition` (and `scale`, an engine gap) are NOT in this surface
14
+ * yet — they are a later pass.
15
15
  */
16
16
  export declare abstract class PluginDesignTransformApi {
17
17
  constructor();
@@ -30,6 +30,9 @@ export declare abstract class PluginDesignTransformApi {
30
30
  * @examplePrompt Translate the furniture block by (10, 0, 5)
31
31
  * @examplePrompt Move these masses up one storey
32
32
  *
33
+ * @performance Array API — one host round-trip for the whole set. Pass every target in a
34
+ * single call; never loop `design.transform.move` per entity.
35
+ *
33
36
  * # Example
34
37
  * ```ts
35
38
  * const { vec3 } = snaptrude.core.math
@@ -41,28 +44,39 @@ export declare abstract class PluginDesignTransformApi {
41
44
  trackParentChange?: boolean;
42
45
  }): PluginApiReturn<PluginDesignChangeResult>;
43
46
  /**
44
- * Rotate entities by a **signed angle in DEGREES**, anchored at the combined
45
- * bounding-box centre (positive = CCW about +Y). NOTE: unlike the removed
46
- * `tools.transform.rotate` (radians + caller pivot), this canonical form takes
47
- * DEGREES and has NO caller pivot — the pivot is always the bbox centre. Undoable.
47
+ * Rotate entities by a **signed angle in DEGREES** (positive = CCW about +Y).
48
+ * The pivot defaults to the combined bounding-box centre; pass `options.pivot`
49
+ * to rotate about an explicit world-space point instead. NOTE: unlike the
50
+ * removed `tools.transform.rotate` (radians), this canonical form takes
51
+ * DEGREES. Undoable.
48
52
  *
49
53
  * @param components - Entities to rotate
50
54
  * @param angleInDegrees - Signed rotation angle in degrees
51
- * @param options - `axis` (defaults to world +Y), `is2D`
55
+ * @param options - `axis` (defaults to world +Y), `pivot` (world-space rotation
56
+ * centre as a {@linkcode Vec3Handle}; defaults to the combined bbox centre),
57
+ * `is2D`
52
58
  * @returns {@linkcode PluginDesignChangeResult}
53
59
  *
54
60
  * @examplePrompt Rotate the selected building 90 degrees
55
61
  * @examplePrompt Turn this room 45 degrees clockwise
56
62
  * @examplePrompt Spin the furniture block 180 degrees about its centre
57
63
  * @examplePrompt Rotate these masses 30 degrees around the vertical axis
64
+ * @examplePrompt Rotate these walls 90 degrees about the origin
65
+ *
66
+ * @performance Array API — one host round-trip for the whole set. Pass every target in a
67
+ * single call; never loop `design.transform.rotate` per entity.
58
68
  *
59
69
  * # Example
60
70
  * ```ts
61
71
  * await snaptrude.design.transform.rotate(["space-id"], 90)
72
+ * // …or rotate about an explicit pivot point
73
+ * const { vec3 } = snaptrude.core.math
74
+ * await snaptrude.design.transform.rotate(["space-id"], 90, { pivot: vec3.new(0, 0, 0) })
62
75
  * ```
63
76
  */
64
77
  abstract rotate(components: ComponentHandle[], angleInDegrees: number, options?: {
65
78
  axis?: Vec3Handle;
79
+ pivot?: Vec3Handle;
66
80
  is2D?: boolean;
67
81
  }): PluginApiReturn<PluginDesignChangeResult>;
68
82
  /**
@@ -95,6 +109,9 @@ export declare abstract class PluginDesignTransformApi {
95
109
  * @examplePrompt Align all the walls to the left edge of this reference wall
96
110
  * @examplePrompt Snap the bottom edges of these spaces together
97
111
  *
112
+ * @performance Array API — one host round-trip for the whole set. Pass every target in a
113
+ * single call; never loop `design.transform.align` per entity.
114
+ *
98
115
  * # Example
99
116
  * ```ts
100
117
  * const rooms = await snaptrude.design.selection.get()
@@ -108,7 +125,54 @@ export declare abstract class PluginDesignTransformApi {
108
125
  abstract align(components: ComponentHandle[], edge: PluginAlignEdge, options?: {
109
126
  reference?: ComponentHandle;
110
127
  }): PluginApiReturn<PluginDesignChangeResult>;
128
+ /**
129
+ * Mirror components **in place** about a horizontal axis, flipping their geometry
130
+ * across that axis through the combined bounding-box centre (the mesh's
131
+ * world-matrix flip + brep inversion + CAD/dimension-line/parametric handling
132
+ * commit atomically). Nothing moves off-centre — this is the toolbar "flip", not
133
+ * a translate-and-reflect. Undoable.
134
+ *
135
+ * `axis` names the axis the geometry mirrors **across** (world axes, Y is up):
136
+ * - `'x'` — mirror across world X (a front↔back flip in plan; reflects the Z coord)
137
+ * - `'z'` — mirror across world Z (a left↔right flip in plan; reflects the X coord)
138
+ *
139
+ * Vertical (`'y'`) mirroring is intentionally not exposed. Locked, bucket-locked
140
+ * and ineligible entries (terrain, plinths, reference/dimension lines,
141
+ * neighbourhood buildings) are **silently dropped**; the call only throws if
142
+ * nothing mirrorable remains. `affected` echoes the supplied handles.
143
+ *
144
+ * @param components - Entities to mirror (≥1)
145
+ * @param axis - Axis to mirror across ({@linkcode PluginTransformMirrorAxis})
146
+ * @returns {@linkcode PluginDesignChangeResult}
147
+ *
148
+ * @examplePrompt Mirror the selected building across the x axis
149
+ * @examplePrompt Flip these rooms left to right
150
+ * @examplePrompt Mirror this furniture block horizontally
151
+ * @examplePrompt Flip the selected walls front to back
152
+ * @examplePrompt Create a mirror image of these masses about the z axis
153
+ *
154
+ * @performance Array API — one host round-trip for the whole set. Pass every target in a
155
+ * single call; never loop `design.transform.mirror` per entity.
156
+ *
157
+ * # Example
158
+ * ```ts
159
+ * const rooms = await snaptrude.design.selection.get()
160
+ * await snaptrude.design.transform.mirror(rooms, "x")
161
+ * ```
162
+ */
163
+ abstract mirror(components: ComponentHandle[], axis: PluginTransformMirrorAxis): PluginApiReturn<PluginDesignChangeResult>;
111
164
  }
165
+ /**
166
+ * The horizontal axis a {@linkcode PluginDesignTransformApi.mirror} flips **across**
167
+ * (world axes, Y up): `'x'` mirrors across world X (front↔back in plan; reflects Z),
168
+ * `'z'` mirrors across world Z (left↔right in plan; reflects X). Vertical (`'y'`)
169
+ * mirroring is not exposed.
170
+ */
171
+ export declare const PluginTransformMirrorAxis: z.ZodEnum<{
172
+ x: "x";
173
+ z: "z";
174
+ }>;
175
+ export type PluginTransformMirrorAxis = z.infer<typeof PluginTransformMirrorAxis>;
112
176
  /**
113
177
  * The bounding-box edge an {@linkcode PluginDesignTransformApi.align} snaps to.
114
178
  * Mirrors the engine's align `DirectionType`. World-axis mapping: `left`/`right`/`center`
@@ -116,9 +180,9 @@ export declare abstract class PluginDesignTransformApi {
116
180
  */
117
181
  export declare const PluginAlignEdge: z.ZodEnum<{
118
182
  center: "center";
183
+ top: "top";
119
184
  left: "left";
120
185
  right: "right";
121
- top: "top";
122
186
  bottom: "bottom";
123
187
  middle: "middle";
124
188
  }>;
@@ -128,7 +192,7 @@ export type PluginAlignEdge = z.infer<typeof PluginAlignEdge>;
128
192
  */
129
193
  export declare const PluginDesignMoveArgs: z.ZodObject<{
130
194
  components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
131
- displacement: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
195
+ displacement: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>;
132
196
  is2D: z.ZodOptional<z.ZodBoolean>;
133
197
  trackParentChange: z.ZodOptional<z.ZodBoolean>;
134
198
  }, z.core.$strip>;
@@ -139,8 +203,9 @@ export type PluginDesignMoveArgs = z.infer<typeof PluginDesignMoveArgs>;
139
203
  export declare const PluginDesignRotateArgs: z.ZodObject<{
140
204
  components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
141
205
  angleInDegrees: z.ZodNumber;
142
- axis: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
206
+ axis: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
143
207
  is2D: z.ZodOptional<z.ZodBoolean>;
208
+ pivot: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"vec3">, string>>>;
144
209
  }, z.core.$strip>;
145
210
  export type PluginDesignRotateArgs = z.infer<typeof PluginDesignRotateArgs>;
146
211
  /**
@@ -156,13 +221,29 @@ export declare const PluginDesignAlignArgs: z.ZodObject<{
156
221
  components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
157
222
  edge: z.ZodEnum<{
158
223
  center: "center";
224
+ top: "top";
159
225
  left: "left";
160
226
  right: "right";
161
- top: "top";
162
227
  bottom: "bottom";
163
228
  middle: "middle";
164
229
  }>;
165
230
  reference: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
166
231
  }, z.core.$strip>;
167
232
  export type PluginDesignAlignArgs = z.infer<typeof PluginDesignAlignArgs>;
233
+ /**
234
+ * Arguments for {@linkcode PluginDesignTransformApi.mirror}.
235
+ *
236
+ * | Property | Type | Description |
237
+ * |---|---|---|
238
+ * | `components` | {@linkcode ComponentHandle}`[]` | Entities to mirror (≥1) |
239
+ * | `axis` | {@linkcode PluginTransformMirrorAxis} | Horizontal axis to mirror across (`'x'` \| `'z'`) |
240
+ */
241
+ export declare const PluginDesignMirrorArgs: z.ZodObject<{
242
+ components: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>>;
243
+ axis: z.ZodEnum<{
244
+ x: "x";
245
+ z: "z";
246
+ }>;
247
+ }, z.core.$strip>;
248
+ export type PluginDesignMirrorArgs = z.infer<typeof PluginDesignMirrorArgs>;
168
249
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/transform/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;;;;;;GAUG;AACH,8BAAsB,wBAAwB;;IAG5C;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,IAAI,CAClB,UAAU,EAAE,eAAe,EAAE,EAC7B,YAAY,EAAE,UAAU,EACxB,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAE,GACxD,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,MAAM,CACpB,UAAU,EAAE,eAAe,EAAE,EAC7B,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,UAAU,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,GAC9C,eAAe,CAAC,wBAAwB,CAAC;IAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;aACa,KAAK,CACnB,UAAU,EAAE,eAAe,EAAE,EAC7B,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,eAAe,CAAA;KAAE,GACxC,eAAe,CAAC,wBAAwB,CAAC;CAC7C;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;EAAiE,CAAA;AAC7F,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,C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;;;;iBAGjC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
@@ -0,0 +1,181 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../../types";
3
+ /**
4
+ * `snaptrude.design.types` — READ-ONLY reference over the project's building
5
+ * **type / assembly** system (the Project Properties layer stacks: External /
6
+ * Internal walls, slabs, floors, ceilings, roofs). A type bundles a labelled
7
+ * layer stack — each layer's role, thickness (engine units) and material — plus a
8
+ * summed total thickness. Both the built-in defaults and any team/user-added types
9
+ * are surfaced.
10
+ *
11
+ * Types are plain value records ({@linkcode PluginBuildingType}) — NOT scene
12
+ * entities/handles. A type's `id` is a stable `"<kind>:<name>"` token
13
+ * (e.g. `"wall:brickWithPlasterAndPaint"`) returned by
14
+ * {@linkcode PluginDesignTypesApi.list} and consumed by
15
+ * {@linkcode PluginDesignTypesApi.get}. Reads never throw — an unknown id yields
16
+ * `null`; a kind with no types yields `[]`.
17
+ *
18
+ * These are reads only: there is no engine seam to author a type from a plugin
19
+ * (types are created through the construction/project-properties UI).
20
+ */
21
+ export declare abstract class PluginDesignTypesApi {
22
+ constructor();
23
+ /**
24
+ * List the building types of one `kind` (wall / slab / floor / ceiling / roof)
25
+ * — the built-in defaults plus any team/user-added types. Returns lightweight
26
+ * summaries; call {@linkcode PluginDesignTypesApi.get} for the full layer stack.
27
+ *
28
+ * @param kind Which family of types to list
29
+ * @returns The type summaries as {@linkcode PluginBuildingTypeSummary}`[]` (`[]` when none)
30
+ *
31
+ * @examplePrompt What wall types does this project have?
32
+ * @examplePrompt List the available slab assemblies
33
+ * @examplePrompt Show me every roof type in the project
34
+ * @examplePrompt Which floor types can I use?
35
+ *
36
+ * # Example
37
+ * ```ts
38
+ * const wallTypes = await snaptrude.design.types.list("wall")
39
+ * for (const t of wallTypes) console.log(t.id, t.label, t.thickness)
40
+ * ```
41
+ */
42
+ abstract list(kind: PluginBuildingTypeKind): PluginApiReturn<PluginBuildingTypeSummary[]>;
43
+ /**
44
+ * Get one building type by its `"<kind>:<name>"` id — its labelled layer stack
45
+ * (each layer's role, thickness and material) plus the summed total thickness.
46
+ *
47
+ * @param typeId The type id from {@linkcode PluginDesignTypesApi.list} (e.g. `"wall:exposedConcrete"`)
48
+ * @returns The full type, or `null` if no type matches
49
+ *
50
+ * @examplePrompt What layers make up this wall type?
51
+ * @examplePrompt Show the construction of the exposed-concrete wall
52
+ * @examplePrompt What's the total thickness of this slab type?
53
+ * @examplePrompt Which materials are in this roof assembly?
54
+ *
55
+ * # Example
56
+ * ```ts
57
+ * const [first] = await snaptrude.design.types.list("wall")
58
+ * const type = await snaptrude.design.types.get(first.id)
59
+ * if (type) for (const layer of type.layers) console.log(layer.name, layer.thickness)
60
+ * ```
61
+ */
62
+ abstract get(typeId: string): PluginApiReturn<PluginBuildingType | null>;
63
+ }
64
+ /** The building-type families exposed by {@linkcode PluginDesignTypesApi}. */
65
+ export declare const PluginBuildingTypeKind: z.ZodEnum<{
66
+ floor: "floor";
67
+ wall: "wall";
68
+ ceiling: "ceiling";
69
+ slab: "slab";
70
+ roof: "roof";
71
+ }>;
72
+ export type PluginBuildingTypeKind = z.infer<typeof PluginBuildingTypeKind>;
73
+ /**
74
+ * One layer of a building type's assembly.
75
+ *
76
+ * | Property | Type | Description |
77
+ * |---|---|---|
78
+ * | `name` | `string` | Layer name (e.g. `"RCC"`, `"Paint"`) |
79
+ * | `role` | `string` | Layer role (e.g. `"Structure"`, `"Finish"`) |
80
+ * | `thickness` | `number` | Layer thickness in engine units (project's active unit mode) |
81
+ * | `material` | `object`? | Layer material — `{ name, type }` (optional) |
82
+ */
83
+ export declare const PluginTypeLayer: z.ZodObject<{
84
+ name: z.ZodString;
85
+ role: z.ZodString;
86
+ thickness: z.ZodNumber;
87
+ material: z.ZodOptional<z.ZodObject<{
88
+ name: z.ZodString;
89
+ type: z.ZodString;
90
+ }, z.core.$strip>>;
91
+ }, z.core.$strip>;
92
+ export type PluginTypeLayer = z.infer<typeof PluginTypeLayer>;
93
+ /**
94
+ * A lightweight building-type summary (no layer stack).
95
+ *
96
+ * | Property | Type | Description |
97
+ * |---|---|---|
98
+ * | `id` | `string` | Stable `"<kind>:<name>"` token — pass to `design.types.get` |
99
+ * | `kind` | {@linkcode PluginBuildingTypeKind} | Which family it belongs to |
100
+ * | `label` | `string` | Human-readable label |
101
+ * | `isDefault` | `boolean` | `true` for a built-in type, `false` for a team/user type |
102
+ * | `thickness` | `number` | Summed layer thickness in engine units |
103
+ */
104
+ export declare const PluginBuildingTypeSummary: z.ZodObject<{
105
+ id: z.ZodString;
106
+ kind: z.ZodEnum<{
107
+ floor: "floor";
108
+ wall: "wall";
109
+ ceiling: "ceiling";
110
+ slab: "slab";
111
+ roof: "roof";
112
+ }>;
113
+ label: z.ZodString;
114
+ isDefault: z.ZodBoolean;
115
+ thickness: z.ZodNumber;
116
+ }, z.core.$strip>;
117
+ export type PluginBuildingTypeSummary = z.infer<typeof PluginBuildingTypeSummary>;
118
+ /**
119
+ * A full building type — a {@linkcode PluginBuildingTypeSummary} plus its layer stack.
120
+ *
121
+ * | Property | Type | Description |
122
+ * |---|---|---|
123
+ * | `id` | `string` | Stable `"<kind>:<name>"` token |
124
+ * | `kind` | {@linkcode PluginBuildingTypeKind} | Which family it belongs to |
125
+ * | `label` | `string` | Human-readable label |
126
+ * | `isDefault` | `boolean` | `true` for a built-in type |
127
+ * | `thickness` | `number` | Summed layer thickness in engine units |
128
+ * | `layers` | {@linkcode PluginTypeLayer}`[]` | The ordered layer stack |
129
+ */
130
+ export declare const PluginBuildingType: z.ZodObject<{
131
+ id: z.ZodString;
132
+ kind: z.ZodEnum<{
133
+ floor: "floor";
134
+ wall: "wall";
135
+ ceiling: "ceiling";
136
+ slab: "slab";
137
+ roof: "roof";
138
+ }>;
139
+ label: z.ZodString;
140
+ isDefault: z.ZodBoolean;
141
+ thickness: z.ZodNumber;
142
+ layers: z.ZodArray<z.ZodObject<{
143
+ name: z.ZodString;
144
+ role: z.ZodString;
145
+ thickness: z.ZodNumber;
146
+ material: z.ZodOptional<z.ZodObject<{
147
+ name: z.ZodString;
148
+ type: z.ZodString;
149
+ }, z.core.$strip>>;
150
+ }, z.core.$strip>>;
151
+ }, z.core.$strip>;
152
+ export type PluginBuildingType = z.infer<typeof PluginBuildingType>;
153
+ /**
154
+ * Arguments for {@linkcode PluginDesignTypesApi.list}.
155
+ *
156
+ * | Property | Type | Description |
157
+ * |---|---|---|
158
+ * | `kind` | {@linkcode PluginBuildingTypeKind} | Which family of types to list |
159
+ */
160
+ export declare const PluginDesignTypesListArgs: z.ZodObject<{
161
+ kind: z.ZodEnum<{
162
+ floor: "floor";
163
+ wall: "wall";
164
+ ceiling: "ceiling";
165
+ slab: "slab";
166
+ roof: "roof";
167
+ }>;
168
+ }, z.core.$strip>;
169
+ export type PluginDesignTypesListArgs = z.infer<typeof PluginDesignTypesListArgs>;
170
+ /**
171
+ * Arguments for {@linkcode PluginDesignTypesApi.get}.
172
+ *
173
+ * | Property | Type | Description |
174
+ * |---|---|---|
175
+ * | `typeId` | `string` | The `"<kind>:<name>"` id from `design.types.list` |
176
+ */
177
+ export declare const PluginDesignTypesGetArgs: z.ZodObject<{
178
+ typeId: z.ZodString;
179
+ }, z.core.$strip>;
180
+ export type PluginDesignTypesGetArgs = z.infer<typeof PluginDesignTypesGetArgs>;
181
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,oBAAoB;;IAGxC;;;;;;;;;;;;;;;;;;OAkBG;aACa,IAAI,CAClB,IAAI,EAAE,sBAAsB,GAC3B,eAAe,CAAC,yBAAyB,E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