@snaptrude/plugin-core 0.8.0 → 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 (111) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/api-manifest.full.json +1350 -89
  3. package/api-manifest.json +826 -40
  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 +37 -0
  15. package/dist/api/core/camera/index.d.ts.map +1 -1
  16. package/dist/api/core/geom/create/index.d.ts +318 -1
  17. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  18. package/dist/api/core/index.d.ts +9 -0
  19. package/dist/api/core/index.d.ts.map +1 -1
  20. package/dist/api/core/io/export/index.d.ts +3 -1
  21. package/dist/api/core/io/export/index.d.ts.map +1 -1
  22. package/dist/api/core/io/import/index.d.ts +61 -0
  23. package/dist/api/core/io/import/index.d.ts.map +1 -1
  24. package/dist/api/core/mode/index.d.ts +99 -0
  25. package/dist/api/core/mode/index.d.ts.map +1 -0
  26. package/dist/api/core/storeys/index.d.ts +251 -0
  27. package/dist/api/core/storeys/index.d.ts.map +1 -0
  28. package/dist/api/core/tags.d.ts +24 -0
  29. package/dist/api/core/tags.d.ts.map +1 -1
  30. package/dist/api/core/zoom/index.d.ts +4 -0
  31. package/dist/api/core/zoom/index.d.ts.map +1 -1
  32. package/dist/api/design/create/index.d.ts +115 -4
  33. package/dist/api/design/create/index.d.ts.map +1 -1
  34. package/dist/api/design/delete/index.d.ts +3 -0
  35. package/dist/api/design/delete/index.d.ts.map +1 -1
  36. package/dist/api/design/query/geometry/index.d.ts +112 -0
  37. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  38. package/dist/api/design/query/index.d.ts +4 -0
  39. package/dist/api/design/query/index.d.ts.map +1 -1
  40. package/dist/api/design/query/referenceLines.d.ts +45 -0
  41. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  42. package/dist/api/design/query/spaces.d.ts +173 -0
  43. package/dist/api/design/query/spaces.d.ts.map +1 -1
  44. package/dist/api/design/transform/index.d.ts +12 -0
  45. package/dist/api/design/transform/index.d.ts.map +1 -1
  46. package/dist/api/design/update/index.d.ts +51 -1
  47. package/dist/api/design/update/index.d.ts.map +1 -1
  48. package/dist/api/entity/buildableEnvelope.d.ts +4 -0
  49. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  50. package/dist/api/entity/referenceLine.d.ts +8 -0
  51. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  52. package/dist/api/entity/story.d.ts +20 -0
  53. package/dist/api/entity/story.d.ts.map +1 -1
  54. package/dist/api/index.d.ts +5 -0
  55. package/dist/api/index.d.ts.map +1 -1
  56. package/dist/api/presentation/export.d.ts +4 -0
  57. package/dist/api/presentation/export.d.ts.map +1 -1
  58. package/dist/api/presentation/import.d.ts +6 -0
  59. package/dist/api/presentation/import.d.ts.map +1 -1
  60. package/dist/api/presentation/index.d.ts +9 -0
  61. package/dist/api/presentation/index.d.ts.map +1 -1
  62. package/dist/api/presentation/placedViews.d.ts +370 -0
  63. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  64. package/dist/api/presentation/shapes.d.ts +481 -0
  65. package/dist/api/presentation/shapes.d.ts.map +1 -0
  66. package/dist/api/program/site.d.ts +94 -0
  67. package/dist/api/program/site.d.ts.map +1 -1
  68. package/dist/api/program/spreadsheet.d.ts +260 -28
  69. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  70. package/dist/api/workspace/index.d.ts +460 -0
  71. package/dist/api/workspace/index.d.ts.map +1 -0
  72. package/dist/index.cjs +2625 -1758
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.js +2515 -1758
  75. package/dist/index.js.map +1 -1
  76. package/package.json +3 -2
  77. package/scripts/generate-manifest.mjs +45 -0
  78. package/src/api/analysis/daylight.ts +470 -0
  79. package/src/api/analysis/heatmaps.ts +444 -17
  80. package/src/api/analysis/index.ts +15 -0
  81. package/src/api/analysis/solar.ts +237 -0
  82. package/src/api/analysis/weather.ts +179 -0
  83. package/src/api/core/camera/index.ts +39 -0
  84. package/src/api/core/geom/create/index.ts +344 -1
  85. package/src/api/core/index.ts +9 -0
  86. package/src/api/core/io/export/index.ts +3 -1
  87. package/src/api/core/io/import/index.ts +64 -0
  88. package/src/api/core/mode/index.ts +96 -0
  89. package/src/api/core/storeys/index.ts +279 -0
  90. package/src/api/core/tags.ts +27 -0
  91. package/src/api/core/zoom/index.ts +4 -0
  92. package/src/api/design/create/index.ts +138 -1
  93. package/src/api/design/delete/index.ts +3 -0
  94. package/src/api/design/query/geometry/index.ts +125 -3
  95. package/src/api/design/query/index.ts +4 -0
  96. package/src/api/design/query/referenceLines.ts +52 -0
  97. package/src/api/design/query/spaces.ts +143 -0
  98. package/src/api/design/transform/index.ts +12 -0
  99. package/src/api/design/update/index.ts +66 -1
  100. package/src/api/entity/buildableEnvelope.ts +4 -0
  101. package/src/api/entity/referenceLine.ts +8 -0
  102. package/src/api/entity/story.ts +20 -0
  103. package/src/api/index.ts +5 -0
  104. package/src/api/presentation/export.ts +4 -0
  105. package/src/api/presentation/import.ts +6 -0
  106. package/src/api/presentation/index.ts +9 -0
  107. package/src/api/presentation/placedViews.ts +363 -0
  108. package/src/api/presentation/shapes.ts +274 -0
  109. package/src/api/program/site.ts +95 -0
  110. package/src/api/program/spreadsheet.ts +251 -6
  111. package/src/api/workspace/index.ts +516 -0
@@ -1,6 +1,6 @@
1
1
  import * as z from "zod";
2
2
  import { PluginApiReturn } from "../../../../types";
3
- import { Vec3Handle, LineHandle, ArcHandle, CircleHandle, CurveHandle, ProfileHandle, ContourHandle } from "../../../../handles";
3
+ import { Vec3Handle, LineHandle, ArcHandle, CircleHandle, CurveHandle, ProfileHandle, ContourHandle, BrepHandle, Vec3Components } from "../../../../handles";
4
4
  /**
5
5
  * Curve creation — construct new geometric curves from point handles (all-handle
6
6
  * model, §11).
@@ -152,6 +152,243 @@ export declare abstract class PluginGeomCreateApi {
152
152
  * ```
153
153
  */
154
154
  abstract contourFromProfiles(outer: ProfileHandle, holes?: ProfileHandle[]): PluginApiReturn<ContourHandle>;
155
+ /**
156
+ * Create a closed solid **B-rep** from explicit face loops. Host API call —
157
+ * returns a {@linkcode BrepHandle}. Faces are plain arrays of `{x, y, z}`
158
+ * point components, NOT point handles (bulk-data precedent:
159
+ * `design.query.geometry.getTriangulatedMeshes`), in raw Babylon units.
160
+ *
161
+ * Each face is one planar loop of at least 3 points; at least 4 faces are
162
+ * required. Loops may be authored in any consistent winding — the host
163
+ * validates edge coherence (every edge shared by exactly two faces, in
164
+ * opposite directions) and fixes the global orientation so faces point
165
+ * outward. Faces must be planar and the solid must be closed; holes in faces
166
+ * are not supported (v1).
167
+ *
168
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
169
+ * with `design.create.massFromBrep`.
170
+ *
171
+ * @param faces Face loops — each an ordered array of `{x, y, z}` points (≥3 points per face, ≥4 faces)
172
+ * @returns The new solid as a {@linkcode BrepHandle}
173
+ * @throws if a face is degenerate or non-planar, an edge is not shared by
174
+ * exactly two faces (open shell, non-manifold, or inconsistent winding), or
175
+ * the faces do not form a valid closed solid
176
+ *
177
+ * @examplePrompt Create a brep from faces
178
+ * @examplePrompt Build a custom solid from a set of faces
179
+ * @examplePrompt Make a pyramid from triangular faces
180
+ *
181
+ * # Example
182
+ * ```ts
183
+ * // A pyramid: square base + 4 triangular sides
184
+ * const apex = { x: 0, y: 4, z: 0 }
185
+ * const a = { x: -2, y: 0, z: -2 }
186
+ * const b = { x: 2, y: 0, z: -2 }
187
+ * const c = { x: 2, y: 0, z: 2 }
188
+ * const d = { x: -2, y: 0, z: 2 }
189
+ * const brep = await snaptrude.core.geom.create.brepFromFaces([
190
+ * [a, d, c, b], // base
191
+ * [a, b, apex],
192
+ * [b, c, apex],
193
+ * [c, d, apex],
194
+ * [d, a, apex],
195
+ * ])
196
+ * const faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 5
197
+ * ```
198
+ */
199
+ abstract brepFromFaces(faces: Vec3Components[][]): PluginApiReturn<BrepHandle>;
200
+ /**
201
+ * Create a closed solid **B-rep** by extruding a contour along a direction.
202
+ * Host API call — returns a {@linkcode BrepHandle}. The direction is
203
+ * normalised by the host, so `amount` is the extrusion distance in raw
204
+ * Babylon units (negative extrudes the opposite way). The contour is copied —
205
+ * the input handle is never mutated. Holes and arc/circle profiles extrude
206
+ * natively (a circle profile yields a cylinder).
207
+ *
208
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
209
+ * with `design.create.massFromBrep`.
210
+ *
211
+ * @param contour The cross-section to extrude (outer profile + optional holes)
212
+ * @param direction Extrusion direction as plain `{x, y, z}` components (non-zero, normalised by the host)
213
+ * @param amount Extrusion distance (non-zero; negative extrudes opposite to `direction`)
214
+ * @returns The new solid as a {@linkcode BrepHandle}
215
+ * @throws if the extrusion is degenerate (zero amount, zero direction, or a
216
+ * direction lying in the contour plane) or the contour cannot be extruded
217
+ * into a valid solid
218
+ *
219
+ * @examplePrompt Extrude this profile 3 metres up
220
+ * @examplePrompt Make a solid by extruding this outline
221
+ * @examplePrompt Create a cylinder from a circle profile
222
+ *
223
+ * # Example
224
+ * ```ts
225
+ * const rect = await snaptrude.core.geom.create.profileRect(4, 3)
226
+ * const contour = await snaptrude.core.geom.create.contourFromProfile(rect)
227
+ * const brep = await snaptrude.core.geom.create.brepFromExtrusion(contour, { x: 0, y: 1, z: 0 }, 3)
228
+ * const faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6
229
+ * ```
230
+ */
231
+ abstract brepFromExtrusion(contour: ContourHandle, direction: Vec3Components, amount: number): PluginApiReturn<BrepHandle>;
232
+ /**
233
+ * Create a closed solid **B-rep** by lofting between a bottom and a top
234
+ * contour. Host API call — returns a {@linkcode BrepHandle}. Both contours
235
+ * must have the same number of edges (and matching hole counts); side faces
236
+ * connect corresponding edges by authored index. Corresponding edges must
237
+ * stay coplanar — a twisted loft would produce non-planar side faces and is
238
+ * rejected. The contours are copied — the input handles are never mutated.
239
+ *
240
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
241
+ * with `design.create.massFromBrep`.
242
+ *
243
+ * @param bottomContour The bottom cross-section
244
+ * @param topContour The top cross-section (same edge and hole counts as the bottom)
245
+ * @returns The new solid as a {@linkcode BrepHandle}
246
+ * @throws if the contours are coincident, their edge or hole counts differ,
247
+ * a side face between corresponding edges would be non-planar, or the
248
+ * contours cannot be lofted into a valid solid
249
+ *
250
+ * @examplePrompt Make a tapered tower from these two outlines
251
+ * @examplePrompt Loft between a large base and a smaller top
252
+ * @examplePrompt Create a frustum from two squares
253
+ *
254
+ * # Example
255
+ * ```ts
256
+ * // A square frustum: 4m base lofted to a 2m top, 3m up
257
+ * const base = await snaptrude.core.geom.create.profileRect(4, 4)
258
+ * const top = await snaptrude.core.geom.create.profileRect(2, 2, await snaptrude.core.math.vec3.new(0, 3, 0))
259
+ * const brep = await snaptrude.core.geom.create.brepFromLoft(
260
+ * await snaptrude.core.geom.create.contourFromProfile(base),
261
+ * await snaptrude.core.geom.create.contourFromProfile(top),
262
+ * )
263
+ * const faceCount = await snaptrude.core.geom.query.brep.getFaceCount(brep) // 6
264
+ * ```
265
+ */
266
+ abstract brepFromLoft(bottomContour: ContourHandle, topContour: ContourHandle): PluginApiReturn<BrepHandle>;
267
+ /**
268
+ * Create a closed solid **B-rep** from indexed mesh data: a vertex position
269
+ * array plus face loops of indices into it. Host API call — returns a
270
+ * {@linkcode BrepHandle}. The indexed form of
271
+ * {@linkcode PluginGeomCreateApi.brepFromFaces} — same validation (planar
272
+ * faces, closed manifold solid, every edge shared by exactly two faces) after
273
+ * the indices are expanded to point loops.
274
+ *
275
+ * Inspect the result via `core.geom.query.brep.*`, or commit it to the scene
276
+ * with `design.create.massFromBrep`.
277
+ *
278
+ * @param positions Vertex positions as plain `{x, y, z}` components (≥4)
279
+ * @param faces Face loops — each an ordered array of indices into `positions` (≥3 indices per face, ≥4 faces)
280
+ * @returns The new solid as a {@linkcode BrepHandle}
281
+ * @throws if an index is not an integer within `positions` bounds, a face is
282
+ * degenerate or non-planar, or the faces do not form a valid closed solid
283
+ *
284
+ * @examplePrompt Create a brep from mesh vertices and indices
285
+ * @examplePrompt Turn this indexed mesh into a solid
286
+ * @examplePrompt Build a solid from vertex positions and face indices
287
+ *
288
+ * # Example
289
+ * ```ts
290
+ * // A tetrahedron from 4 vertices and 4 triangular faces
291
+ * const positions = [
292
+ * { x: 0, y: 0, z: 0 },
293
+ * { x: 4, y: 0, z: 0 },
294
+ * { x: 2, y: 0, z: 4 },
295
+ * { x: 2, y: 3, z: 1.5 },
296
+ * ]
297
+ * const brep = await snaptrude.core.geom.create.brepFromMesh(positions, [
298
+ * [0, 2, 1], // base
299
+ * [0, 1, 3],
300
+ * [1, 2, 3],
301
+ * [2, 0, 3],
302
+ * ])
303
+ * const vertexCount = await snaptrude.core.geom.query.brep.getVertexCount(brep) // 4
304
+ * ```
305
+ */
306
+ abstract brepFromMesh(positions: Vec3Components[], faces: number[][]): PluginApiReturn<BrepHandle>;
307
+ /**
308
+ * Create a closed solid **B-rep** as the boolean **union** of two breps
309
+ * (`a ∪ b`). Host API call — returns a new {@linkcode BrepHandle}. Inputs are
310
+ * read-only and may be authored breps (any `core.geom.create` brep
311
+ * constructor) or scene-derived breps from `design.query.geometry.getBrep`;
312
+ * coordinates are combined as-is, so both inputs must share a frame. The
313
+ * result must be a single solid — disjoint inputs are rejected.
314
+ *
315
+ * The first boolean call loads the OpenCascade geometry kernel (a wasm of
316
+ * tens of MB — expect a pause of seconds); subsequent calls are fast.
317
+ *
318
+ * @param a First solid
319
+ * @param b Second solid
320
+ * @returns The union as a new {@linkcode BrepHandle}
321
+ * @throws if the inputs do not overlap or touch (the union would be disjoint
322
+ * solids) or the result cannot be built as a valid single solid
323
+ *
324
+ * @examplePrompt Union these two solids
325
+ * @examplePrompt Merge these breps into one mass
326
+ * @examplePrompt Combine the tower and the podium into a single solid
327
+ *
328
+ * # Example
329
+ * ```ts
330
+ * const a = await snaptrude.core.geom.create.brepFromExtrusion(baseContour, { x: 0, y: 1, z: 0 }, 3)
331
+ * const b = await snaptrude.core.geom.create.brepFromExtrusion(overlappingContour, { x: 0, y: 1, z: 0 }, 5)
332
+ * const merged = await snaptrude.core.geom.create.brepFromUnion(a, b)
333
+ * ```
334
+ */
335
+ abstract brepFromUnion(a: BrepHandle, b: BrepHandle): PluginApiReturn<BrepHandle>;
336
+ /**
337
+ * Create a closed solid **B-rep** as the boolean **subtraction** of two
338
+ * breps: **`a` minus `b`** — `b` is cut away from `a`. Host API call —
339
+ * returns a new {@linkcode BrepHandle}. Argument order matters:
340
+ * `brepFromSubtraction(a, b)` removes `b`'s volume from `a`. Inputs are
341
+ * read-only and may be authored or scene-derived breps (see
342
+ * {@linkcode PluginGeomCreateApi.brepFromUnion}); coordinates are combined
343
+ * as-is.
344
+ *
345
+ * The first boolean call loads the OpenCascade geometry kernel (a wasm of
346
+ * tens of MB — expect a pause of seconds); subsequent calls are fast.
347
+ *
348
+ * @param a The solid to subtract from
349
+ * @param b The solid to remove from `a`
350
+ * @returns `a` minus `b` as a new {@linkcode BrepHandle}
351
+ * @throws if `b` consumes `a` entirely (empty result), the result splits into
352
+ * disjoint solids, or it cannot be built as a valid single solid
353
+ *
354
+ * @examplePrompt Subtract the courtyard from the building mass
355
+ * @examplePrompt Cut this solid out of that one
356
+ * @examplePrompt Punch a hole through the slab with this box
357
+ *
358
+ * # Example
359
+ * ```ts
360
+ * // buildingBrep minus courtyardBrep — order matters
361
+ * const carved = await snaptrude.core.geom.create.brepFromSubtraction(buildingBrep, courtyardBrep)
362
+ * ```
363
+ */
364
+ abstract brepFromSubtraction(a: BrepHandle, b: BrepHandle): PluginApiReturn<BrepHandle>;
365
+ /**
366
+ * Create a closed solid **B-rep** as the boolean **intersection** of two
367
+ * breps (`a ∩ b` — the shared volume only). Host API call — returns a new
368
+ * {@linkcode BrepHandle}. Inputs are read-only and may be authored or
369
+ * scene-derived breps (see {@linkcode PluginGeomCreateApi.brepFromUnion});
370
+ * coordinates are combined as-is.
371
+ *
372
+ * The first boolean call loads the OpenCascade geometry kernel (a wasm of
373
+ * tens of MB — expect a pause of seconds); subsequent calls are fast.
374
+ *
375
+ * @param a First solid
376
+ * @param b Second solid
377
+ * @returns The shared volume as a new {@linkcode BrepHandle}
378
+ * @throws if the inputs do not overlap (empty intersection), the result
379
+ * splits into disjoint solids, or it cannot be built as a valid single
380
+ * solid
381
+ *
382
+ * @examplePrompt Keep only the overlap of these two solids
383
+ * @examplePrompt Intersect these two masses
384
+ * @examplePrompt Clip the tower to the zoning envelope
385
+ *
386
+ * # Example
387
+ * ```ts
388
+ * const overlap = await snaptrude.core.geom.create.brepFromIntersection(towerBrep, envelopeBrep)
389
+ * ```
390
+ */
391
+ abstract brepFromIntersection(a: BrepHandle, b: BrepHandle): PluginApiReturn<BrepHandle>;
155
392
  }
156
393
  /**
157
394
  * Arguments for {@linkcode PluginGeomCreateApi.line}.
@@ -244,4 +481,84 @@ export declare const PluginGeomCreateContourFromProfilesArgs: z.ZodObject<{
244
481
  holes: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"profile">, string>>>>;
245
482
  }, z.core.$strip>;
246
483
  export type PluginGeomCreateContourFromProfilesArgs = z.infer<typeof PluginGeomCreateContourFromProfilesArgs>;
484
+ /**
485
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromFaces}.
486
+ *
487
+ * | Property | Type | Description |
488
+ * |---|---|---|
489
+ * | `faces` | {@linkcode Vec3Components}`[][]` | Face loops — each an ordered array of `{x, y, z}` points (≥3 points per face, ≥4 faces) |
490
+ */
491
+ export declare const PluginGeomCreateBrepFromFacesArgs: z.ZodObject<{
492
+ faces: z.ZodArray<z.ZodArray<z.ZodObject<{
493
+ x: z.ZodNumber;
494
+ y: z.ZodNumber;
495
+ z: z.ZodNumber;
496
+ }, z.core.$strip>>>;
497
+ }, z.core.$strip>;
498
+ export type PluginGeomCreateBrepFromFacesArgs = z.infer<typeof PluginGeomCreateBrepFromFacesArgs>;
499
+ /**
500
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromExtrusion}.
501
+ *
502
+ * | Property | Type | Description |
503
+ * |---|---|---|
504
+ * | `contour` | {@linkcode ContourHandle} | The cross-section to extrude |
505
+ * | `direction` | {@linkcode Vec3Components} | Extrusion direction (non-zero, finite components) |
506
+ * | `amount` | `number` | Extrusion distance (finite, non-zero) |
507
+ */
508
+ export declare const PluginGeomCreateBrepFromExtrusionArgs: z.ZodObject<{
509
+ contour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
510
+ direction: z.ZodObject<{
511
+ x: z.ZodNumber;
512
+ y: z.ZodNumber;
513
+ z: z.ZodNumber;
514
+ }, z.core.$strip>;
515
+ amount: z.ZodNumber;
516
+ }, z.core.$strip>;
517
+ export type PluginGeomCreateBrepFromExtrusionArgs = z.infer<typeof PluginGeomCreateBrepFromExtrusionArgs>;
518
+ /**
519
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromLoft}.
520
+ *
521
+ * | Property | Type | Description |
522
+ * |---|---|---|
523
+ * | `bottomContour` | {@linkcode ContourHandle} | The bottom cross-section |
524
+ * | `topContour` | {@linkcode ContourHandle} | The top cross-section |
525
+ */
526
+ export declare const PluginGeomCreateBrepFromLoftArgs: z.ZodObject<{
527
+ bottomContour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
528
+ topContour: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"contour">, string>>;
529
+ }, z.core.$strip>;
530
+ export type PluginGeomCreateBrepFromLoftArgs = z.infer<typeof PluginGeomCreateBrepFromLoftArgs>;
531
+ /**
532
+ * Arguments for {@linkcode PluginGeomCreateApi.brepFromMesh}.
533
+ *
534
+ * | Property | Type | Description |
535
+ * |---|---|---|
536
+ * | `positions` | {@linkcode Vec3Components}`[]` | Vertex positions (≥4) |
537
+ * | `faces` | `number[][]` | Face loops of indices into `positions` (≥3 indices per face, ≥4 faces) |
538
+ */
539
+ export declare const PluginGeomCreateBrepFromMeshArgs: z.ZodObject<{
540
+ positions: z.ZodArray<z.ZodObject<{
541
+ x: z.ZodNumber;
542
+ y: z.ZodNumber;
543
+ z: z.ZodNumber;
544
+ }, z.core.$strip>>;
545
+ faces: z.ZodArray<z.ZodArray<z.ZodNumber>>;
546
+ }, z.core.$strip>;
547
+ export type PluginGeomCreateBrepFromMeshArgs = z.infer<typeof PluginGeomCreateBrepFromMeshArgs>;
548
+ /**
549
+ * Arguments for the brep boolean constructors —
550
+ * {@linkcode PluginGeomCreateApi.brepFromUnion},
551
+ * {@linkcode PluginGeomCreateApi.brepFromSubtraction} (`a` minus `b`), and
552
+ * {@linkcode PluginGeomCreateApi.brepFromIntersection}.
553
+ *
554
+ * | Property | Type | Description |
555
+ * |---|---|---|
556
+ * | `a` | {@linkcode BrepHandle} | First solid (the subtraction target) |
557
+ * | `b` | {@linkcode BrepHandle} | Second solid (the subtraction tool) |
558
+ */
559
+ export declare const PluginGeomCreateBrepBooleanArgs: z.ZodObject<{
560
+ a: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
561
+ b: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../../..").Handle<"brep">, string>>;
562
+ }, z.core.$strip>;
563
+ export type PluginGeomCreateBrepBooleanArgs = z.infer<typeof PluginGeomCreateBrepBooleanArgs>;
247
564
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/geom/create/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEhI;;;;;;;;;;GAUG;AACH,8BAAsB,mBAAmB;;IAGvC;;;;;;;;;;;;;;;OAeG;aACa,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC;IAE/F;;;;;;;;;;;;;;;;;OAiBG;aACa,GAAG,CACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,UAAU,EACvB,IAAI,EAAE,UAAU,GACf,eAAe,CAAC,SAAS,CAAC;IAE7B;;;;;;;;;;;;;;;;;OAiBG;aACa,MAAM,CACpB,WAAW,EAAE,UAAU,EACvB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,GACb,eAAe,CAAC,YAAY,CAAC;IAEhC;;;;;;;;;;;;;;OAcG;aACa,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,eAAe,CAAC,aAAa,CAAC;IAE3F;;;;;;;;;;;;;OAaG;aACa,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,eAAe,CAAC,aAAa,CAAC;IAExF;;;;;;;;;;;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D,OAAO,iCAAiC,CACzC,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;iBAWhD,CAAA;AAEF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACzD,OAAO,qCAAqC,CAC7C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAA;AAEF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAE/F;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC;;;;;;;iBAG3C,CAAA;AAEF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAE/F;;;;;;;;;;GAUG;AACH,eAAO,MAAM,+BAA+B;;;iBAG1C,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA"}
@@ -13,6 +13,8 @@ import { PluginCoreIoApi } from "./io";
13
13
  import { PluginCoreHandlesApi } from "./handles";
14
14
  import { PluginCoreProposalsApi } from "./proposals";
15
15
  import { PluginCameraApi } from "./camera";
16
+ import { PluginCoreStoreysApi } from "./storeys";
17
+ import { PluginCoreModeApi } from "./mode";
16
18
  import { PluginUserApi } from "./user";
17
19
  /**
18
20
  * Core primitives and infrastructure used across the plugin API.
@@ -28,6 +30,7 @@ import { PluginUserApi } from "./user";
28
30
  * - {@linkcode PluginCoreApi.comment} — Comments: create, edit, resolve, tag, list
29
31
  * - {@linkcode PluginCoreApi.groups} — Read & edit the group hierarchy
30
32
  * - {@linkcode PluginCoreApi.buildings} — Read & edit buildings and their storeys
33
+ * - {@linkcode PluginCoreApi.storeys} — Create, read & edit storeys (floors)
31
34
  * - {@linkcode PluginCoreApi.layers} — Read & toggle storey drawing/reference layers
32
35
  * - {@linkcode PluginCoreApi.tags} — Tag catalog + assignment
33
36
  * - {@linkcode PluginCoreApi.io} — Import files (image/pdf/cad/model/terrain), poll jobs, manage underlays
@@ -57,6 +60,10 @@ export declare abstract class PluginCoreApi {
57
60
  abstract groups: PluginCoreGroupsApi;
58
61
  /** Buildings — read & edit buildings and their storeys. See {@linkcode PluginCoreBuildingsApi}. */
59
62
  abstract buildings: PluginCoreBuildingsApi;
63
+ /** Storeys — create, read & edit storeys (floors). See {@linkcode PluginCoreStoreysApi}. */
64
+ abstract storeys: PluginCoreStoreysApi;
65
+ /** Application mode — read & switch the editor's top-bar mode. See {@linkcode PluginCoreModeApi}. */
66
+ abstract mode: PluginCoreModeApi;
60
67
  /** Layers — read & toggle storey drawing/reference layers. See {@linkcode PluginCoreLayersApi}. */
61
68
  abstract layers: PluginCoreLayersApi;
62
69
  /** Tags — tag catalog + assignment. See {@linkcode PluginCoreTagsApi}. */
@@ -80,6 +87,8 @@ export * from "./project";
80
87
  export * from "./comment";
81
88
  export * from "./groups";
82
89
  export * from "./buildings";
90
+ export * from "./storeys";
91
+ export * from "./mode";
83
92
  export * from "./layers";
84
93
  export * from "./tags";
85
94
  export * from "./io";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAC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QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,MAAM,CAAA;AACpB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA"}
@@ -43,7 +43,9 @@ export type ExportedFile = z.infer<typeof ExportedFile>;
43
43
  *
44
44
  * `core.io.export.model` hands you the file bytes as base64 — no download
45
45
  * dialog opens; the plugin decides what to do with the result (save it, POST
46
- * it, diff it). Four formats:
46
+ * it, diff it). For a different export intent, see `presentation.export`
47
+ * (Present-mode layout sheets to PDF/PNG/JPG) and `program.spreadsheet.export`
48
+ * (the area-program / takeoff workbook). Four formats:
47
49
  *
48
50
  * - `"glb"` — binary glTF (`model/gltf-binary`); geometry + materials,
49
51
  * serialized in the browser (nothing is uploaded).
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/io/export/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;EAAuC,CAAA;AACrE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE;;;GAGG;AACH,eAAO,MAAM,WAAW;;;EAAiC,CAAA;AACzD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAA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;;;;;;;;;;;;OAgCG;aACa,KAAK,CACnB,MAAM,EAAE,iBAAiB,EACzB,KAAK,CAAC,EAAE,WAAW,GAClB,eAAe,CAAC,YAAY,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;iBAGhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
@@ -41,6 +41,9 @@ export declare abstract class PluginCoreIoImportApi {
41
41
  * Supported formats: PNG, JPG/JPEG, BMP. The image is placed on the target
42
42
  * storey's "Image" layer at ~50% opacity by default.
43
43
  *
44
+ * To place the image on a **Present-mode sheet** instead of the scene, use
45
+ * `presentation.import.image`.
46
+ *
44
47
  * The plane is placed at the storey origin (the engine's import placement);
45
48
  * there is no placement parameter — calibrate size with
46
49
  * {@link PluginCoreIoUnderlayApi.setScale} after import.
@@ -262,6 +265,39 @@ export declare abstract class PluginCoreIoImportApi {
262
265
  * ```
263
266
  */
264
267
  abstract terrain(lat: number, lng: number, width: number, length: number, elevation?: boolean, satellite?: boolean, neighborhood?: boolean, parcels?: boolean): PluginApiReturn<TerrainHandle>;
268
+ /**
269
+ * Import an **EPW weather file** into the project's weather catalog.
270
+ *
271
+ * Uploads an EnergyPlus Weather (`.epw`) file and registers it as the
272
+ * project's site weather, returning its catalog `weatherFileId` — the same id
273
+ * {@link PluginAnalysisWeatherApi.getSeries}, `program.site.getWeather`, and a
274
+ * daylight run's provenance report. Uploading a user file makes the site's
275
+ * `selectionMethod` `"user-upload"`, overriding nearest-station resolution.
276
+ *
277
+ * **Mutating**: this writes project state and is subject to the plugin
278
+ * write-gate — it throws when plugin writes are disabled. Unlike the file
279
+ * underlay/model importers it returns no scene handle (a weather file is not
280
+ * a scene object), only the catalog `{ weatherFileId, label }`.
281
+ *
282
+ * @param source - The `.epw` file to import: an `https://` URL or a `data:` URL.
283
+ * @returns A {@linkcode PluginImportEpwResult} — the catalog `weatherFileId`
284
+ * and a human-readable `label` (the station/file name).
285
+ * @throws if writes are disabled, the source can't be loaded, or the file is
286
+ * not a valid EPW.
287
+ *
288
+ * @examplePrompt Import this EPW weather file for the site
289
+ * @examplePrompt Upload a custom weather file for the daylight analysis
290
+ * @examplePrompt Use this .epw as the project's weather source
291
+ *
292
+ * # Example
293
+ * ```ts
294
+ * const { weatherFileId, label } = await snaptrude.core.io.import.epw(
295
+ * "https://example.com/Chicago-OHare.epw",
296
+ * )
297
+ * console.log(`Weather set to ${label} (${weatherFileId})`)
298
+ * ```
299
+ */
300
+ abstract epw(source: string): PluginApiReturn<PluginImportEpwResult>;
265
301
  }
266
302
  /**
267
303
  * Supported 3D model import formats. `.glb`/`.gltf`/`.ifc`/`.stl` and Rhino/Revit
@@ -389,4 +425,29 @@ export declare const PluginImportTerrainArgs: z.ZodObject<{
389
425
  parcels: z.ZodOptional<z.ZodBoolean>;
390
426
  }, z.core.$strip>;
391
427
  export type PluginImportTerrainArgs = z.infer<typeof PluginImportTerrainArgs>;
428
+ /**
429
+ * Arguments for {@link PluginCoreIoImportApi.epw}.
430
+ *
431
+ * | Property | Type | Description |
432
+ * |---|---|---|
433
+ * | `source` | `string` | EPW `https://` URL or `data:` URL |
434
+ */
435
+ export declare const PluginImportEpwArgs: z.ZodObject<{
436
+ source: z.ZodString;
437
+ }, z.core.$strip>;
438
+ export type PluginImportEpwArgs = z.infer<typeof PluginImportEpwArgs>;
439
+ /**
440
+ * Result of {@link PluginCoreIoImportApi.epw} — the imported weather file's
441
+ * catalog entry.
442
+ *
443
+ * | Property | Type | Description |
444
+ * |---|---|---|
445
+ * | `weatherFileId` | `string` | Catalog id (same key as `analysis.weather`'s `weatherFileId`) |
446
+ * | `label` | `string` | Human-readable name (station / file name) |
447
+ */
448
+ export declare const PluginImportEpwResult: z.ZodObject<{
449
+ weatherFileId: z.ZodString;
450
+ label: z.ZodString;
451
+ }, z.core.$strip>;
452
+ export type PluginImportEpwResult = z.infer<typeof PluginImportEpwResult>;
392
453
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/core/io/import/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAE5B;;;;GAIG;AACH,eAAO,MAAM,YAAY,aAKrB,CAAA;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,8BAAsB,qBAAqB;;IAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;aACa,KAAK,CACnB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM,GACb,eAAe,CAAC,cAAc,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;aACa,GAAG,CACjB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,MAAM,GACf,eAAe,CAAC,cAAc,CAAC;IAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;aACa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,eAAe,CAAC;IAEtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;aACa,OAAO,CAAC,GAAG,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,cAAc,CAAC;IAE5F;;;;;;;;;;;;;;;;;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M,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
@@ -0,0 +1,99 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../../types";
3
+ /**
4
+ * The editor's top-bar application modes — the tabs a user switches between
5
+ * while working on a project.
6
+ */
7
+ export declare const PluginAppMode: z.ZodEnum<{
8
+ design: "design";
9
+ bim: "bim";
10
+ present: "present";
11
+ program: "program";
12
+ }>;
13
+ export type PluginAppMode = z.infer<typeof PluginAppMode>;
14
+ export declare const PluginCoreModeSetArgs: z.ZodObject<{
15
+ mode: z.ZodEnum<{
16
+ design: "design";
17
+ bim: "bim";
18
+ present: "present";
19
+ program: "program";
20
+ }>;
21
+ }, z.core.$strip>;
22
+ export type PluginCoreModeSetArgs = z.infer<typeof PluginCoreModeSetArgs>;
23
+ export interface PluginCoreModeListResult {
24
+ modes: PluginAppMode[];
25
+ }
26
+ export interface PluginCoreModeSetResult {
27
+ mode: PluginAppMode;
28
+ }
29
+ /**
30
+ * Application-mode control — read and switch the editor's top-bar mode
31
+ * (Design, BIM, Present, Program), the same tabs a user clicks in the
32
+ * top menu bar. Accessed via `snaptrude.core.mode`.
33
+ *
34
+ * Not to be confused with the viewport's 2D/3D camera mode
35
+ * (`core.camera.setMode`) or saved presentation views (`presentation.views`).
36
+ *
37
+ * `set` covers `design`, `bim`, and `present` — in-page switches.
38
+ * `program` opens in its own browser tab in the product, which a plugin worker
39
+ * cannot do, so `set("program")` fails with `PRECONDITION_FAILED`; `get()`
40
+ * still reports `"program"` for code running in the Program tab.
41
+ */
42
+ export declare abstract class PluginCoreModeApi {
43
+ constructor();
44
+ /**
45
+ * List every application mode the editor has.
46
+ *
47
+ * @returns The full set of mode tokens accepted by {@linkcode get} / {@linkcode set}.
48
+ *
49
+ * @examplePrompt What modes does Snaptrude have?
50
+ * @examplePrompt List the editor modes I can switch to
51
+ *
52
+ * # Example
53
+ * ```ts
54
+ * const { modes } = await snaptrude.core.mode.list()
55
+ * // ["design", "bim", "present", "program"]
56
+ * ```
57
+ */
58
+ abstract list(): PluginApiReturn<PluginCoreModeListResult>;
59
+ /**
60
+ * Get the currently active application mode.
61
+ *
62
+ * @returns The active mode token (e.g. `"design"`).
63
+ *
64
+ * @examplePrompt Which mode am I in right now?
65
+ * @examplePrompt Am I in present mode?
66
+ * @examplePrompt Check whether the editor is in BIM mode
67
+ *
68
+ * # Example
69
+ * ```ts
70
+ * const mode = await snaptrude.core.mode.get()
71
+ * if (mode !== "present") await snaptrude.core.mode.set("present")
72
+ * ```
73
+ */
74
+ abstract get(): PluginApiReturn<PluginAppMode>;
75
+ /**
76
+ * Switch the editor to another application mode — the same action as
77
+ * clicking that tab in the top menu bar.
78
+ *
79
+ * Supported: `"design"`, `"bim"`, `"present"`. Switching to
80
+ * `"program"` is rejected with `PRECONDITION_FAILED` (the Program surface
81
+ * opens in its own browser tab in the product; a plugin cannot open one).
82
+ *
83
+ * @param mode - Target mode token from {@linkcode PluginAppMode}
84
+ * @returns The committed `{ mode }` after the switch.
85
+ *
86
+ * @examplePrompt Switch to present mode
87
+ * @examplePrompt Open BIM mode
88
+ * @examplePrompt Go back to design mode
89
+ *
90
+ * # Example
91
+ * ```ts
92
+ * await snaptrude.core.mode.set("present")
93
+ * // ... presentation work ...
94
+ * await snaptrude.core.mode.set("design")
95
+ * ```
96
+ */
97
+ abstract set(mode: PluginAppMode): PluginApiReturn<PluginCoreModeSetResult>;
98
+ }
99
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/mode/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;EAAkD,CAAA;AAC5E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAEzD,eAAO,MAAM,qBAAqB;;;;;;;iBAEhC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEzE,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,aAAa,EAAE,CAAA;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,aAAa,CAAA;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,8BAAsB,iBAAiB;;IAGrC;;;;;;;;;;;;;OAaG;aACa,IAAI,IAAI,eAAe,CAAC,wBAAwB,CAAC;IAEjE;;;;;;;;;;;;;;OAcG;aACa,GAAG,IAAI,eAAe,CAAC,aAAa,CAAC;IAErD;;;;;;;;;;;;;;;;;;;;;OAqBG;aACa,GAAG,CAAC,IAAI,EAAE,aAAa,GAAG,eAAe,CAAC,uBAAuB,CAAC;CACnF"}