@snaptrude/plugin-core 0.3.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +130 -48
- package/CHANGELOG.md +163 -0
- package/api-manifest.full.json +5600 -0
- package/api-manifest.json +5502 -0
- package/dist/api/analysis/heatmaps.d.ts +234 -0
- package/dist/api/analysis/heatmaps.d.ts.map +1 -0
- package/dist/api/analysis/illuminance.d.ts +145 -0
- package/dist/api/analysis/illuminance.d.ts.map +1 -0
- package/dist/api/analysis/index.d.ts +44 -0
- package/dist/api/analysis/index.d.ts.map +1 -0
- package/dist/api/analysis/shadows.d.ts +165 -0
- package/dist/api/analysis/shadows.d.ts.map +1 -0
- package/dist/api/analysis/sunlightHours.d.ts +208 -0
- package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
- package/dist/api/analysis/sunpath.d.ts +80 -0
- package/dist/api/analysis/sunpath.d.ts.map +1 -0
- package/dist/api/core/buildings.d.ts +427 -0
- package/dist/api/core/buildings.d.ts.map +1 -0
- package/dist/api/core/comment/index.d.ts +230 -0
- package/dist/api/core/comment/index.d.ts.map +1 -0
- package/dist/api/core/geom/create/index.d.ts +247 -0
- package/dist/api/core/geom/create/index.d.ts.map +1 -0
- package/dist/api/core/geom/delete/index.d.ts +72 -0
- package/dist/api/core/geom/delete/index.d.ts.map +1 -0
- package/dist/api/core/geom/index.d.ts +24 -23
- package/dist/api/core/geom/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/arc.d.ts +169 -0
- package/dist/api/core/geom/query/arc.d.ts.map +1 -0
- package/dist/api/core/geom/query/brep.d.ts +402 -0
- package/dist/api/core/geom/query/brep.d.ts.map +1 -0
- package/dist/api/core/geom/query/circle.d.ts +378 -0
- package/dist/api/core/geom/query/circle.d.ts.map +1 -0
- package/dist/api/core/geom/query/contour.d.ts +450 -0
- package/dist/api/core/geom/query/contour.d.ts.map +1 -0
- package/dist/api/core/geom/query/curve.d.ts +918 -0
- package/dist/api/core/geom/query/curve.d.ts.map +1 -0
- package/dist/api/core/geom/query/edge.d.ts +128 -0
- package/dist/api/core/geom/query/edge.d.ts.map +1 -0
- package/dist/api/core/geom/query/face.d.ts +363 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -0
- package/dist/api/core/geom/query/halfedge.d.ts +206 -0
- package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
- package/dist/api/core/geom/query/index.d.ts +61 -0
- package/dist/api/core/geom/query/index.d.ts.map +1 -0
- package/dist/api/core/geom/query/profile.d.ts +410 -0
- package/dist/api/core/geom/query/profile.d.ts.map +1 -0
- package/dist/api/core/geom/query/vertex.d.ts +187 -0
- package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
- package/dist/api/core/geom/update/contour.d.ts +272 -0
- package/dist/api/core/geom/update/contour.d.ts.map +1 -0
- package/dist/api/core/geom/update/curve.d.ts +180 -0
- package/dist/api/core/geom/update/curve.d.ts.map +1 -0
- package/dist/api/core/geom/update/index.d.ts +27 -0
- package/dist/api/core/geom/update/index.d.ts.map +1 -0
- package/dist/api/core/geom/update/profile.d.ts +329 -0
- package/dist/api/core/geom/update/profile.d.ts.map +1 -0
- package/dist/api/core/groups.d.ts +485 -0
- package/dist/api/core/groups.d.ts.map +1 -0
- package/dist/api/core/history/index.d.ts +78 -0
- package/dist/api/core/history/index.d.ts.map +1 -0
- package/dist/api/core/index.d.ts +51 -1
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +392 -0
- package/dist/api/core/io/import/index.d.ts.map +1 -0
- package/dist/api/core/io/index.d.ts +35 -0
- package/dist/api/core/io/index.d.ts.map +1 -0
- package/dist/api/core/io/job/index.d.ts +139 -0
- package/dist/api/core/io/job/index.d.ts.map +1 -0
- package/dist/api/core/io/query/index.d.ts +74 -0
- package/dist/api/core/io/query/index.d.ts.map +1 -0
- package/dist/api/core/io/terrain/index.d.ts +206 -0
- package/dist/api/core/io/terrain/index.d.ts.map +1 -0
- package/dist/api/core/io/underlay/index.d.ts +286 -0
- package/dist/api/core/io/underlay/index.d.ts.map +1 -0
- package/dist/api/core/layers.d.ts +402 -0
- package/dist/api/core/layers.d.ts.map +1 -0
- package/dist/api/core/math/quat.d.ts +111 -128
- package/dist/api/core/math/quat.d.ts.map +1 -1
- package/dist/api/core/math/vec3.d.ts +120 -102
- package/dist/api/core/math/vec3.d.ts.map +1 -1
- package/dist/api/core/project/index.d.ts +399 -0
- package/dist/api/core/project/index.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +755 -0
- package/dist/api/core/tags.d.ts.map +1 -0
- package/dist/api/core/units/index.d.ts +175 -0
- package/dist/api/core/units/index.d.ts.map +1 -0
- package/dist/api/core/zoom/index.d.ts +45 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +168 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +837 -0
- package/dist/api/design/create/index.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +63 -0
- package/dist/api/design/delete/index.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +268 -0
- package/dist/api/design/doors/index.d.ts.map +1 -0
- package/dist/api/design/edit/index.d.ts +49 -0
- package/dist/api/design/edit/index.d.ts.map +1 -0
- package/dist/api/design/erase/index.d.ts +160 -0
- package/dist/api/design/erase/index.d.ts.map +1 -0
- package/dist/api/design/furniture/index.d.ts +123 -0
- package/dist/api/design/furniture/index.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +153 -0
- package/dist/api/design/index.d.ts.map +1 -0
- package/dist/api/design/lock.d.ts +41 -0
- package/dist/api/design/lock.d.ts.map +1 -0
- package/dist/api/design/materials/index.d.ts +297 -0
- package/dist/api/design/materials/index.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +140 -0
- package/dist/api/design/query/geometry/index.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +1011 -0
- package/dist/api/design/query/index.d.ts.map +1 -0
- package/dist/api/design/query/spaces.d.ts +221 -0
- package/dist/api/design/query/spaces.d.ts.map +1 -0
- package/dist/api/design/selection/index.d.ts +282 -0
- package/dist/api/design/selection/index.d.ts.map +1 -0
- package/dist/api/design/shared.d.ts +38 -0
- package/dist/api/design/shared.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +87 -0
- package/dist/api/design/transform/index.d.ts.map +1 -0
- package/dist/api/design/update/index.d.ts +178 -0
- package/dist/api/design/update/index.d.ts.map +1 -0
- package/dist/api/design/windows/index.d.ts +189 -0
- package/dist/api/design/windows/index.d.ts.map +1 -0
- package/dist/api/entity/buildableEnvelope.d.ts +261 -0
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
- package/dist/api/entity/department.d.ts +0 -98
- package/dist/api/entity/department.d.ts.map +1 -1
- package/dist/api/entity/index.d.ts +9 -9
- package/dist/api/entity/index.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +49 -106
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +484 -251
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +49 -39
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/index.d.ts +22 -12
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +440 -0
- package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
- package/dist/api/presentation/diagrams.d.ts +81 -0
- package/dist/api/presentation/diagrams.d.ts.map +1 -0
- package/dist/api/presentation/import.d.ts +113 -0
- package/dist/api/presentation/import.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +46 -0
- package/dist/api/presentation/index.d.ts.map +1 -0
- package/dist/api/presentation/sheets.d.ts +176 -0
- package/dist/api/presentation/sheets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +296 -0
- package/dist/api/presentation/views.d.ts.map +1 -0
- package/dist/api/program/adjacency.d.ts +155 -0
- package/dist/api/program/adjacency.d.ts.map +1 -0
- package/dist/api/program/areas.d.ts +360 -0
- package/dist/api/program/areas.d.ts.map +1 -0
- package/dist/api/program/classification.d.ts +135 -0
- package/dist/api/program/classification.d.ts.map +1 -0
- package/dist/api/program/cores.d.ts +174 -0
- package/dist/api/program/cores.d.ts.map +1 -0
- package/dist/api/program/departments.d.ts +431 -0
- package/dist/api/program/departments.d.ts.map +1 -0
- package/dist/api/program/index.d.ts +69 -0
- package/dist/api/program/index.d.ts.map +1 -0
- package/dist/api/program/layout.d.ts +63 -0
- package/dist/api/program/layout.d.ts.map +1 -0
- package/dist/api/program/metrics.d.ts +108 -0
- package/dist/api/program/metrics.d.ts.map +1 -0
- package/dist/api/program/site.d.ts +451 -0
- package/dist/api/program/site.d.ts.map +1 -0
- package/dist/api/program/spreadsheet.d.ts +2041 -0
- package/dist/api/program/spreadsheet.d.ts.map +1 -0
- package/dist/handles.d.ts +171 -0
- package/dist/handles.d.ts.map +1 -0
- package/dist/host-utils.d.ts +7 -5
- package/dist/host-utils.d.ts.map +1 -1
- package/dist/index.cjs +4344 -899
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3682 -865
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
- package/scripts/generate-manifest.mjs +193 -0
- package/scripts/generate-manifest.test.mjs +215 -0
- package/src/api/analysis/heatmaps.ts +256 -0
- package/src/api/analysis/illuminance.ts +155 -0
- package/src/api/analysis/index.ts +46 -0
- package/src/api/analysis/shadows.ts +183 -0
- package/src/api/analysis/sunlightHours.ts +211 -0
- package/src/api/analysis/sunpath.ts +83 -0
- package/src/api/core/buildings.ts +485 -0
- package/src/api/core/comment/index.ts +258 -0
- package/src/api/core/geom/create/index.ts +293 -0
- package/src/api/core/geom/delete/index.ts +78 -0
- package/src/api/core/geom/index.ts +24 -23
- package/src/api/core/geom/query/arc.ts +169 -0
- package/src/api/core/geom/query/brep.ts +444 -0
- package/src/api/core/geom/query/circle.ts +404 -0
- package/src/api/core/geom/query/contour.ts +540 -0
- package/src/api/core/geom/query/curve.ts +1078 -0
- package/src/api/core/geom/query/edge.ts +130 -0
- package/src/api/core/geom/query/face.ts +403 -0
- package/src/api/core/geom/query/halfedge.ts +210 -0
- package/src/api/core/geom/query/index.ts +63 -0
- package/src/api/core/geom/query/profile.ts +473 -0
- package/src/api/core/geom/query/vertex.ts +205 -0
- package/src/api/core/geom/update/contour.ts +315 -0
- package/src/api/core/geom/update/curve.ts +209 -0
- package/src/api/core/geom/update/index.ts +29 -0
- package/src/api/core/geom/update/profile.ts +377 -0
- package/src/api/core/groups.ts +521 -0
- package/src/api/core/history/index.ts +84 -0
- package/src/api/core/index.ts +51 -1
- package/src/api/core/io/import/index.ts +432 -0
- package/src/api/core/io/index.ts +37 -0
- package/src/api/core/io/job/index.ts +140 -0
- package/src/api/core/io/query/index.ts +71 -0
- package/src/api/core/io/terrain/index.ts +214 -0
- package/src/api/core/io/underlay/index.ts +295 -0
- package/src/api/core/layers.ts +333 -0
- package/src/api/core/math/quat.ts +112 -235
- package/src/api/core/math/vec3.ts +124 -159
- package/src/api/core/project/index.ts +418 -0
- package/src/api/core/tags.ts +808 -0
- package/src/api/core/units/index.ts +164 -0
- package/src/api/core/zoom/index.ts +47 -0
- package/src/api/design/boolean/index.ts +179 -0
- package/src/api/design/create/index.ts +895 -0
- package/src/api/design/delete/index.ts +67 -0
- package/src/api/design/doors/index.ts +285 -0
- package/src/api/design/edit/index.ts +54 -0
- package/src/api/design/erase/index.ts +151 -0
- package/src/api/design/furniture/index.ts +130 -0
- package/src/api/design/index.ts +162 -0
- package/src/api/design/lock.ts +42 -0
- package/src/api/design/materials/index.ts +301 -0
- package/src/api/design/query/geometry/index.ts +166 -0
- package/src/api/design/query/index.ts +937 -0
- package/src/api/design/query/spaces.ts +132 -0
- package/src/api/design/selection/index.ts +273 -0
- package/src/api/design/shared.ts +40 -0
- package/src/api/design/transform/index.ts +93 -0
- package/src/api/design/update/index.ts +117 -0
- package/src/api/design/windows/index.ts +207 -0
- package/src/api/entity/buildableEnvelope.ts +318 -0
- package/src/api/entity/department.ts +0 -113
- package/src/api/entity/index.ts +9 -9
- package/src/api/entity/referenceLine.ts +50 -38
- package/src/api/entity/space.ts +285 -226
- package/src/api/entity/story.ts +53 -42
- package/src/api/index.ts +22 -12
- package/src/api/presentation/aiInspiration.ts +362 -0
- package/src/api/presentation/diagrams.ts +84 -0
- package/src/api/presentation/import.ts +112 -0
- package/src/api/presentation/index.ts +48 -0
- package/src/api/presentation/sheets.ts +198 -0
- package/src/api/presentation/views.ts +303 -0
- package/src/api/program/adjacency.ts +164 -0
- package/src/api/program/areas.ts +335 -0
- package/src/api/program/classification.ts +138 -0
- package/src/api/program/cores.ts +171 -0
- package/src/api/program/departments.ts +465 -0
- package/src/api/program/index.ts +71 -0
- package/src/api/program/layout.ts +68 -0
- package/src/api/program/metrics.ts +120 -0
- package/src/api/program/site.ts +419 -0
- package/src/api/program/spreadsheet.ts +2075 -0
- package/src/handles.ts +194 -0
- package/src/host-utils.ts +10 -6
- package/src/index.ts +1 -0
- package/dist/api/core/geom/arc.d.ts +0 -81
- package/dist/api/core/geom/arc.d.ts.map +0 -1
- package/dist/api/core/geom/curve.d.ts +0 -70
- package/dist/api/core/geom/curve.d.ts.map +0 -1
- package/dist/api/core/geom/line.d.ts +0 -56
- package/dist/api/core/geom/line.d.ts.map +0 -1
- package/dist/api/core/geom/profile.d.ts +0 -121
- package/dist/api/core/geom/profile.d.ts.map +0 -1
- package/dist/api/tools/copy.d.ts +0 -59
- package/dist/api/tools/copy.d.ts.map +0 -1
- package/dist/api/tools/index.d.ts +0 -33
- package/dist/api/tools/index.d.ts.map +0 -1
- package/dist/api/tools/material.d.ts +0 -51
- package/dist/api/tools/material.d.ts.map +0 -1
- package/dist/api/tools/offset.d.ts +0 -43
- package/dist/api/tools/offset.d.ts.map +0 -1
- package/dist/api/tools/selection.d.ts +0 -48
- package/dist/api/tools/selection.d.ts.map +0 -1
- package/dist/api/tools/transform.d.ts +0 -114
- package/dist/api/tools/transform.d.ts.map +0 -1
- package/dist/api/units/index.d.ts +0 -163
- package/dist/api/units/index.d.ts.map +0 -1
- package/src/api/core/geom/arc.ts +0 -70
- package/src/api/core/geom/curve.ts +0 -41
- package/src/api/core/geom/line.ts +0 -53
- package/src/api/core/geom/profile.ts +0 -94
- package/src/api/tools/copy.ts +0 -55
- package/src/api/tools/index.ts +0 -39
- package/src/api/tools/material.ts +0 -49
- package/src/api/tools/offset.ts +0 -43
- package/src/api/tools/selection.ts +0 -51
- package/src/api/tools/transform.ts +0 -117
- package/src/api/units/index.ts +0 -163
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../../types";
|
|
3
|
+
import { ComponentHandle } from "../../../handles";
|
|
4
|
+
import { PluginSpaceUpdateResult } from "../../entity/space";
|
|
5
|
+
/**
|
|
6
|
+
* Sparse property updates for a space. Only provided fields change.
|
|
7
|
+
*
|
|
8
|
+
* | Property | Type | Description |
|
|
9
|
+
* |---|---|---|
|
|
10
|
+
* | `room_type` | `string`? | Room label |
|
|
11
|
+
* | `massType` | `PluginMassType`? | Mass type |
|
|
12
|
+
* | `spaceType` | `PluginSpaceType`? | Space type |
|
|
13
|
+
* | `areaClass` | `PluginAreaClass`? | Area class (NET/GROSS/EXCLUDED) |
|
|
14
|
+
* | `departmentId` | `PluginDepartmentId`? | Department |
|
|
15
|
+
*/
|
|
16
|
+
export declare const PluginSpacePropertyUpdates: z.ZodObject<{
|
|
17
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
18
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
Room: "Room";
|
|
20
|
+
Plinth: "Plinth";
|
|
21
|
+
Void: "Void";
|
|
22
|
+
Pergola: "Pergola";
|
|
23
|
+
Furniture: "Furniture";
|
|
24
|
+
"Facade element": "Facade element";
|
|
25
|
+
"Generic mass": "Generic mass";
|
|
26
|
+
Department: "Department";
|
|
27
|
+
Building: "Building";
|
|
28
|
+
"Revit Import": "Revit Import";
|
|
29
|
+
Mass: "Mass";
|
|
30
|
+
Site: "Site";
|
|
31
|
+
}>>;
|
|
32
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
33
|
+
Room: "Room";
|
|
34
|
+
"Program Block": "Program Block";
|
|
35
|
+
Balcony: "Balcony";
|
|
36
|
+
Road: "Road";
|
|
37
|
+
Garden: "Garden";
|
|
38
|
+
Deck: "Deck";
|
|
39
|
+
Pool: "Pool";
|
|
40
|
+
Walkway: "Walkway";
|
|
41
|
+
Envelope: "Envelope";
|
|
42
|
+
Parking: "Parking";
|
|
43
|
+
}>>;
|
|
44
|
+
areaClass: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
NET: "NET";
|
|
46
|
+
GROSS: "GROSS";
|
|
47
|
+
EXCLUDED: "EXCLUDED";
|
|
48
|
+
}>>;
|
|
49
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
50
|
+
DEFAULT: "DEFAULT";
|
|
51
|
+
SITE: "SITE";
|
|
52
|
+
ENVELOPE: "ENVELOPE";
|
|
53
|
+
CORE: "CORE";
|
|
54
|
+
}>, z.ZodUUID]>>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
export type PluginSpacePropertyUpdates = z.infer<typeof PluginSpacePropertyUpdates>;
|
|
57
|
+
/** Geometry replacement for a space — re-extrude a profile. */
|
|
58
|
+
export declare const PluginSpaceGeometryUpdate: z.ZodObject<{
|
|
59
|
+
profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
60
|
+
extrudeHeight: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type PluginSpaceGeometryUpdate = z.infer<typeof PluginSpaceGeometryUpdate>;
|
|
63
|
+
/** One space to update via {@linkcode PluginDesignUpdateApi.spaces}. */
|
|
64
|
+
export declare const PluginUpdateSpaceItem: z.ZodObject<{
|
|
65
|
+
space: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
66
|
+
properties: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
room_type: z.ZodOptional<z.ZodString>;
|
|
68
|
+
massType: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
Room: "Room";
|
|
70
|
+
Plinth: "Plinth";
|
|
71
|
+
Void: "Void";
|
|
72
|
+
Pergola: "Pergola";
|
|
73
|
+
Furniture: "Furniture";
|
|
74
|
+
"Facade element": "Facade element";
|
|
75
|
+
"Generic mass": "Generic mass";
|
|
76
|
+
Department: "Department";
|
|
77
|
+
Building: "Building";
|
|
78
|
+
"Revit Import": "Revit Import";
|
|
79
|
+
Mass: "Mass";
|
|
80
|
+
Site: "Site";
|
|
81
|
+
}>>;
|
|
82
|
+
spaceType: z.ZodOptional<z.ZodEnum<{
|
|
83
|
+
Room: "Room";
|
|
84
|
+
"Program Block": "Program Block";
|
|
85
|
+
Balcony: "Balcony";
|
|
86
|
+
Road: "Road";
|
|
87
|
+
Garden: "Garden";
|
|
88
|
+
Deck: "Deck";
|
|
89
|
+
Pool: "Pool";
|
|
90
|
+
Walkway: "Walkway";
|
|
91
|
+
Envelope: "Envelope";
|
|
92
|
+
Parking: "Parking";
|
|
93
|
+
}>>;
|
|
94
|
+
areaClass: z.ZodOptional<z.ZodEnum<{
|
|
95
|
+
NET: "NET";
|
|
96
|
+
GROSS: "GROSS";
|
|
97
|
+
EXCLUDED: "EXCLUDED";
|
|
98
|
+
}>>;
|
|
99
|
+
departmentId: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
100
|
+
DEFAULT: "DEFAULT";
|
|
101
|
+
SITE: "SITE";
|
|
102
|
+
ENVELOPE: "ENVELOPE";
|
|
103
|
+
CORE: "CORE";
|
|
104
|
+
}>, z.ZodUUID]>>;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
geometry: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
profile: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
108
|
+
extrudeHeight: z.ZodNumber;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
export type PluginUpdateSpaceItem = z.infer<typeof PluginUpdateSpaceItem>;
|
|
112
|
+
/**
|
|
113
|
+
* `snaptrude.design.update` — edit existing scene entities (properties + geometry).
|
|
114
|
+
*
|
|
115
|
+
* Migrated from the removed `entity.space.{update, updateGeometryFromProfile, bulkUpdate}`.
|
|
116
|
+
* Only provided fields change; each call is undoable. Failures throw (RPC rejects).
|
|
117
|
+
*/
|
|
118
|
+
export declare abstract class PluginDesignUpdateApi {
|
|
119
|
+
constructor();
|
|
120
|
+
/**
|
|
121
|
+
* Update a single space (room) — change its properties (room label, space
|
|
122
|
+
* type, mass type, area class, department) and/or replace its geometry by
|
|
123
|
+
* re-extruding a profile to a new height. Sparse and undoable: only the
|
|
124
|
+
* fields you provide change.
|
|
125
|
+
*
|
|
126
|
+
* @param space - The space to update
|
|
127
|
+
* @param options - `properties` (sparse) and/or `geometry` ({ profile, extrudeHeight })
|
|
128
|
+
* @returns the updated space's echoed {@linkcode PluginSpaceUpdateResult}
|
|
129
|
+
*
|
|
130
|
+
* @examplePrompt Rename this room to Office
|
|
131
|
+
* @examplePrompt Change this space's room type to Meeting Room
|
|
132
|
+
* @examplePrompt Set the height of this room to 3 metres
|
|
133
|
+
* @examplePrompt Move this space into the Circulation department
|
|
134
|
+
* @examplePrompt Exclude this room from the area calculations
|
|
135
|
+
*
|
|
136
|
+
* # Example
|
|
137
|
+
* ```ts
|
|
138
|
+
* await snaptrude.design.update.space("space-id", { properties: { room_type: "Office" } })
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
abstract space(space: ComponentHandle, options: {
|
|
142
|
+
properties?: PluginSpacePropertyUpdates;
|
|
143
|
+
geometry?: PluginSpaceGeometryUpdate;
|
|
144
|
+
}): PluginApiReturn<PluginSpaceUpdateResult>;
|
|
145
|
+
/**
|
|
146
|
+
* Update many spaces (rooms) in one undoable operation — the bulk form of
|
|
147
|
+
* {@linkcode space}. Each item pairs a space with the sparse property
|
|
148
|
+
* changes and/or geometry re-extrude to apply; every item is validated up
|
|
149
|
+
* front, then all changes are applied as a single command.
|
|
150
|
+
*
|
|
151
|
+
* Migrated from `entity.space.bulkUpdate`.
|
|
152
|
+
*
|
|
153
|
+
* @param items - One {@linkcode PluginUpdateSpaceItem} per space
|
|
154
|
+
* @returns one {@linkcode PluginSpaceUpdateResult} per item, in input order
|
|
155
|
+
*
|
|
156
|
+
* @examplePrompt Label all the selected rooms as Bedrooms
|
|
157
|
+
* @examplePrompt Change the room type of these five spaces at once
|
|
158
|
+
* @examplePrompt Set every room on this floor to a 3m height in one go
|
|
159
|
+
* @examplePrompt Bulk-assign these spaces to the Service department
|
|
160
|
+
* @examplePrompt Mark all of these rooms as excluded from area in one update
|
|
161
|
+
*
|
|
162
|
+
* # Example
|
|
163
|
+
* ```ts
|
|
164
|
+
* // Re-label every selected room and mark it NET area — one undoable bulk update
|
|
165
|
+
* const rooms = await snaptrude.design.query.listSpaces({ isSelected: true })
|
|
166
|
+
* const results = await snaptrude.design.update.spaces(
|
|
167
|
+
* rooms.map((space) => ({
|
|
168
|
+
* space,
|
|
169
|
+
* properties: { room_type: "Bedroom", areaClass: "NET" },
|
|
170
|
+
* })),
|
|
171
|
+
* )
|
|
172
|
+
* // One result per item, in input order
|
|
173
|
+
* console.log(results.map((r) => r.spaceId))
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
abstract spaces(items: PluginUpdateSpaceItem[]): PluginApiReturn<PluginSpaceUpdateResult[]>;
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/update/index.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le } from "../../../handles";
|
|
4
|
+
import { PluginDesignChangeResult } from "../lock";
|
|
5
|
+
/**
|
|
6
|
+
* `snaptrude.design.windows` — window-specific reads. Creation lives at
|
|
7
|
+
* `design.create.window`; generic reads (`listWindows`/`getHost`/`getProperties`) live
|
|
8
|
+
* at `design.query.*`. Window targets are {@linkcode ComponentHandle}s.
|
|
9
|
+
*
|
|
10
|
+
* `listTypes` (UI-const catalog), `getSillHeight` (bounds-derived), and the
|
|
11
|
+
* command-wired `mirror` land in a later pass.
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class PluginDesignWindowsApi {
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* Get the type name of a window — the label that identifies which kind of
|
|
17
|
+
* window the instance is, as shown in its properties.
|
|
18
|
+
*
|
|
19
|
+
* @param window The window to query
|
|
20
|
+
* @returns The type as a `string`, or `null`
|
|
21
|
+
*
|
|
22
|
+
* @examplePrompt What type of window is this?
|
|
23
|
+
* @examplePrompt Is the selected window a casement or a slider?
|
|
24
|
+
* @examplePrompt Tell me the window type used on this wall
|
|
25
|
+
* @examplePrompt Check what kind of window the living room has
|
|
26
|
+
*
|
|
27
|
+
* # Example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const [win] = await snaptrude.design.query.listWindows({ isSelected: true })
|
|
30
|
+
* const type = await snaptrude.design.windows.getType(win)
|
|
31
|
+
* if (type) console.log("window type:", type)
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
abstract getType(window: ComponentHandle): PluginApiReturn<string | null>;
|
|
35
|
+
/**
|
|
36
|
+
* Get the width of a window — how wide its opening is along the host wall.
|
|
37
|
+
*
|
|
38
|
+
* @param window The window to query
|
|
39
|
+
* @returns The width as a `number`, or `null`
|
|
40
|
+
*
|
|
41
|
+
* @examplePrompt How wide is this window?
|
|
42
|
+
* @examplePrompt What's the width of the selected window?
|
|
43
|
+
* @examplePrompt Measure the width of the kitchen window
|
|
44
|
+
* @examplePrompt Check whether this window is 1200mm wide
|
|
45
|
+
*
|
|
46
|
+
* # Example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const [win] = await snaptrude.design.query.listWindows()
|
|
49
|
+
* const width = await snaptrude.design.windows.getWidth(win)
|
|
50
|
+
* if (width !== null) console.log("window width:", width)
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
abstract getWidth(window: ComponentHandle): PluginApiReturn<number | null>;
|
|
54
|
+
/**
|
|
55
|
+
* Get the height of a window — how tall its opening is on the host wall.
|
|
56
|
+
*
|
|
57
|
+
* @param window The window to query
|
|
58
|
+
* @returns The height as a `number`, or `null`
|
|
59
|
+
*
|
|
60
|
+
* @examplePrompt How tall is this window?
|
|
61
|
+
* @examplePrompt What's the height of the selected window?
|
|
62
|
+
* @examplePrompt Check the window height on this wall
|
|
63
|
+
* @examplePrompt Is the bedroom window 1.5m high?
|
|
64
|
+
*
|
|
65
|
+
* # Example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const [win] = await snaptrude.design.query.listWindows()
|
|
68
|
+
* const height = await snaptrude.design.windows.getHeight(win)
|
|
69
|
+
* if (height !== null) console.log("window height:", height)
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
abstract getHeight(window: ComponentHandle): PluginApiReturn<number | null>;
|
|
73
|
+
/**
|
|
74
|
+
* Get a window's full dimensions in one call — width along the wall, vertical
|
|
75
|
+
* height, and thickness through the wall — measured in the window's local
|
|
76
|
+
* oriented space.
|
|
77
|
+
*
|
|
78
|
+
* @param window The window to query
|
|
79
|
+
* @returns The dimensions, or `null`
|
|
80
|
+
*
|
|
81
|
+
* @examplePrompt What are the dimensions of this window?
|
|
82
|
+
* @examplePrompt How big is the selected window?
|
|
83
|
+
* @examplePrompt Give me the width, height and depth of this window
|
|
84
|
+
* @examplePrompt Measure the living room window
|
|
85
|
+
* @examplePrompt Get the window size including its thickness through the wall
|
|
86
|
+
*
|
|
87
|
+
* # Example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const [win] = await snaptrude.design.query.listWindows({ isSelected: true })
|
|
90
|
+
* const dims = await snaptrude.design.windows.getDimensions(win)
|
|
91
|
+
* if (dims) console.log(dims.width, dims.height, dims.thickness)
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
abstract getDimensions(window: ComponentHandle): PluginApiReturn<PluginWindowDimensions | null>;
|
|
95
|
+
/**
|
|
96
|
+
* Set the width of a window, resizing its opening and re-cutting the host
|
|
97
|
+
* wall. Width is in engine units; the change is undoable.
|
|
98
|
+
*
|
|
99
|
+
* @param window The window to resize
|
|
100
|
+
* @param width New width (engine units)
|
|
101
|
+
* @returns The affected window
|
|
102
|
+
*
|
|
103
|
+
* @examplePrompt Make this window 1200mm wide
|
|
104
|
+
* @examplePrompt Widen the selected window to 4 feet
|
|
105
|
+
* @examplePrompt Change the window width to 1.5m
|
|
106
|
+
* @examplePrompt Resize the kitchen window to 900 wide
|
|
107
|
+
*
|
|
108
|
+
* # Example
|
|
109
|
+
* ```ts
|
|
110
|
+
* // Takes a single window (unlike design.doors.setWidth, which takes an array)
|
|
111
|
+
* const [win] = await snaptrude.design.query.listWindows({ isSelected: true })
|
|
112
|
+
* const { affected } = await snaptrude.design.windows.setWidth(win, 1200)
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
abstract setWidth(window: ComponentHandle, width: number): PluginApiReturn<PluginDesignChangeResult>;
|
|
116
|
+
/**
|
|
117
|
+
* Set the height of a window, resizing its opening and re-cutting the host
|
|
118
|
+
* wall. Height is in engine units; the change is undoable.
|
|
119
|
+
*
|
|
120
|
+
* @param window The window to resize
|
|
121
|
+
* @param height New height (engine units)
|
|
122
|
+
* @returns The affected window
|
|
123
|
+
*
|
|
124
|
+
* @examplePrompt Make this window 1.5m tall
|
|
125
|
+
* @examplePrompt Change the window height to 4 feet
|
|
126
|
+
* @examplePrompt Shorten the selected window to 900mm high
|
|
127
|
+
* @examplePrompt Set the bedroom window height to 1200
|
|
128
|
+
*
|
|
129
|
+
* # Example
|
|
130
|
+
* ```ts
|
|
131
|
+
* const [win] = await snaptrude.design.query.listWindows({ isSelected: true })
|
|
132
|
+
* await snaptrude.design.windows.setHeight(win, 1500)
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
abstract setHeight(window: ComponentHandle, height: number): PluginApiReturn<PluginDesignChangeResult>;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Arguments for the single-window read methods.
|
|
139
|
+
*
|
|
140
|
+
* | Property | Type | Description |
|
|
141
|
+
* |---|---|---|
|
|
142
|
+
* | `window` | {@linkcode ComponentHandle} | The window to query |
|
|
143
|
+
*/
|
|
144
|
+
export declare const PluginDesignWindowArgs: z.ZodObject<{
|
|
145
|
+
window: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export type PluginDesignWindowArgs = z.infer<typeof PluginDesignWindowArgs>;
|
|
148
|
+
/**
|
|
149
|
+
* A window's dimensions.
|
|
150
|
+
*
|
|
151
|
+
* | Property | Type | Description |
|
|
152
|
+
* |---|---|---|
|
|
153
|
+
* | `width` | `number` | Along the wall |
|
|
154
|
+
* | `height` | `number` | Vertical |
|
|
155
|
+
* | `thickness` | `number` | Through the wall (engine `length` axis) |
|
|
156
|
+
*/
|
|
157
|
+
export declare const PluginWindowDimensions: z.ZodObject<{
|
|
158
|
+
width: z.ZodNumber;
|
|
159
|
+
height: z.ZodNumber;
|
|
160
|
+
thickness: z.ZodNumber;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
export type PluginWindowDimensions = z.infer<typeof PluginWindowDimensions>;
|
|
163
|
+
/**
|
|
164
|
+
* Arguments for {@linkcode PluginDesignWindowsApi.setWidth}.
|
|
165
|
+
*
|
|
166
|
+
* | Property | Type | Description |
|
|
167
|
+
* |---|---|---|
|
|
168
|
+
* | `window` | {@linkcode ComponentHandle} | The window to resize |
|
|
169
|
+
* | `width` | `number` | New width (engine units) |
|
|
170
|
+
*/
|
|
171
|
+
export declare const PluginDesignWindowSetWidthArgs: z.ZodObject<{
|
|
172
|
+
window: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
173
|
+
width: z.ZodNumber;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
export type PluginDesignWindowSetWidthArgs = z.infer<typeof PluginDesignWindowSetWidthArgs>;
|
|
176
|
+
/**
|
|
177
|
+
* Arguments for {@linkcode PluginDesignWindowsApi.setHeight}.
|
|
178
|
+
*
|
|
179
|
+
* | Property | Type | Description |
|
|
180
|
+
* |---|---|---|
|
|
181
|
+
* | `window` | {@linkcode ComponentHandle} | The window to resize |
|
|
182
|
+
* | `height` | `number` | New height (engine units) |
|
|
183
|
+
*/
|
|
184
|
+
export declare const PluginDesignWindowSetHeightArgs: z.ZodObject<{
|
|
185
|
+
window: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
186
|
+
height: z.ZodNumber;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
export type PluginDesignWindowSetHeightArgs = z.infer<typeof PluginDesignWindowSetHeightArgs>;
|
|
189
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/design/windows/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAElD;;;;;;;GAOG;AACH,8BAAsB,sBAAsB;;IAG1C;;;;;;;;;;;;;;;;;;OAkBG;aACa,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC;IAEhF;;;;;;;;;;;;;;;;;OAiB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
|
3
|
+
/**
|
|
4
|
+
* Buildable Envelope management — create and update parametric zoning envelopes.
|
|
5
|
+
*
|
|
6
|
+
* A **buildable envelope** is the regulated volume inside which a building may
|
|
7
|
+
* be massed. The host owns envelope identity: {@linkcode PluginBuildableEnvelopeApi.create create}
|
|
8
|
+
* mints a `buildableEnvelopeId` and returns it; {@linkcode PluginBuildableEnvelopeApi.update update}
|
|
9
|
+
* requires that id to target the existing envelope.
|
|
10
|
+
*
|
|
11
|
+
* Accessed via `snaptrude.entity.buildableEnvelope`.
|
|
12
|
+
*/
|
|
13
|
+
export declare abstract class PluginBuildableEnvelopeApi {
|
|
14
|
+
constructor();
|
|
15
|
+
/**
|
|
16
|
+
* Create a new parametric buildable envelope — the zoning-regulated volume a
|
|
17
|
+
* building may occupy — generated from a site polygon, tiered setbacks, a
|
|
18
|
+
* height or floor-count cap, and optional FAR and lot-coverage limits.
|
|
19
|
+
*
|
|
20
|
+
* @param sitePolygon - Site polygon vertices in `lengthUnit`; minimum 3 vertices.
|
|
21
|
+
* @param lengthUnit - Unit used by all length fields (`"ft" | "m"`).
|
|
22
|
+
* @param setbacks - Setback profile, ground tier first; minimum 1 tier.
|
|
23
|
+
* @param verticalCap - Maximum height or floor count.
|
|
24
|
+
* @param floorToFloor - Required floor-to-floor height in `lengthUnit`.
|
|
25
|
+
* @param farRatio - Optional FAR value, positive when provided.
|
|
26
|
+
* @param lotCoverageMaxPct - Optional lot coverage cap, `0..100`.
|
|
27
|
+
* @returns A {@linkcode PluginBuildableEnvelopeCreateResult} with the
|
|
28
|
+
* `buildableEnvelopeId` of the created envelope.
|
|
29
|
+
* @throws If validation fails or generation produces no renderable geometry.
|
|
30
|
+
*
|
|
31
|
+
* @examplePrompt Create a buildable envelope for my site
|
|
32
|
+
* @examplePrompt Generate the zoning envelope with 10ft front setbacks
|
|
33
|
+
* @examplePrompt Show the maximum buildable volume with a 150ft height limit
|
|
34
|
+
* @examplePrompt Model the allowable massing from the setback rules
|
|
35
|
+
* @examplePrompt Create a zoning envelope capped at 12 floors with FAR 3
|
|
36
|
+
*
|
|
37
|
+
* # Example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.create(
|
|
40
|
+
* [
|
|
41
|
+
* { x: 0, z: 0 },
|
|
42
|
+
* { x: 100, z: 0 },
|
|
43
|
+
* { x: 100, z: 80 },
|
|
44
|
+
* { x: 0, z: 80 },
|
|
45
|
+
* ],
|
|
46
|
+
* "ft",
|
|
47
|
+
* [
|
|
48
|
+
* { aboveHeight: 0, front: 10, side: 5, rear: 10 },
|
|
49
|
+
* { aboveHeight: 100, front: 20, side: 10, rear: 20 },
|
|
50
|
+
* ],
|
|
51
|
+
* { kind: "max_height", maxHeight: 150 },
|
|
52
|
+
* 12,
|
|
53
|
+
* )
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
abstract create(sitePolygon: PluginBuildableEnvelopePolygonVertex[], lengthUnit: "ft" | "m", setbacks: PluginBuildableEnvelopeSetbackTier[], verticalCap: PluginBuildableEnvelopeVerticalCap, floorToFloor: number, farRatio?: number, lotCoverageMaxPct?: number): PluginApiReturn<PluginBuildableEnvelopeCreateResult>;
|
|
57
|
+
/**
|
|
58
|
+
* Update an existing parametric buildable envelope — regenerate the zoning
|
|
59
|
+
* volume from a revised site polygon, setbacks, vertical cap, or FAR and
|
|
60
|
+
* lot-coverage limits, keeping the same envelope id.
|
|
61
|
+
*
|
|
62
|
+
* @param buildableEnvelopeId - Existing envelope ID to update; non-empty and
|
|
63
|
+
* must match an existing envelope on the canvas.
|
|
64
|
+
* @param sitePolygon - Site polygon vertices in `lengthUnit`; minimum 3 vertices.
|
|
65
|
+
* @param lengthUnit - Unit used by all length fields (`"ft" | "m"`).
|
|
66
|
+
* @param setbacks - Setback profile, ground tier first; minimum 1 tier.
|
|
67
|
+
* @param verticalCap - Maximum height or floor count.
|
|
68
|
+
* @param floorToFloor - Required floor-to-floor height in `lengthUnit`.
|
|
69
|
+
* @param farRatio - Optional FAR value, positive when provided.
|
|
70
|
+
* @param lotCoverageMaxPct - Optional lot coverage cap, `0..100`.
|
|
71
|
+
* @returns A {@linkcode PluginBuildableEnvelopeUpdateResult} with the
|
|
72
|
+
* `buildableEnvelopeId` of the updated envelope.
|
|
73
|
+
* @throws If validation fails, the envelope does not exist, or generation
|
|
74
|
+
* produces no renderable geometry.
|
|
75
|
+
*
|
|
76
|
+
* @examplePrompt Change the envelope's height limit to 175 feet
|
|
77
|
+
* @examplePrompt Update the setbacks on the buildable envelope
|
|
78
|
+
* @examplePrompt Regenerate the zoning envelope with a new site boundary
|
|
79
|
+
* @examplePrompt Increase the FAR on the buildable volume
|
|
80
|
+
* @examplePrompt Modify the envelope to allow 15 storeys instead
|
|
81
|
+
*
|
|
82
|
+
* # Example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const { buildableEnvelopeId } = await snaptrude.entity.buildableEnvelope.update(
|
|
85
|
+
* existingId,
|
|
86
|
+
* [
|
|
87
|
+
* { x: 0, z: 0 },
|
|
88
|
+
* { x: 100, z: 0 },
|
|
89
|
+
* { x: 100, z: 80 },
|
|
90
|
+
* { x: 0, z: 80 },
|
|
91
|
+
* ],
|
|
92
|
+
* "ft",
|
|
93
|
+
* [{ aboveHeight: 0, front: 10, side: 5, rear: 10 }],
|
|
94
|
+
* { kind: "max_height", maxHeight: 175 },
|
|
95
|
+
* 12,
|
|
96
|
+
* )
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
abstract update(buildableEnvelopeId: string, sitePolygon: PluginBuildableEnvelopePolygonVertex[], lengthUnit: "ft" | "m", setbacks: PluginBuildableEnvelopeSetbackTier[], verticalCap: PluginBuildableEnvelopeVerticalCap, floorToFloor: number, farRatio?: number, lotCoverageMaxPct?: number): PluginApiReturn<PluginBuildableEnvelopeUpdateResult>;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Site polygon vertex in the request `lengthUnit`.
|
|
103
|
+
*
|
|
104
|
+
* Vertices may be passed as `{x, z}` objects or `[x, z]` tuples. Numeric
|
|
105
|
+
* values must be finite (no `NaN` or `±Infinity`).
|
|
106
|
+
*/
|
|
107
|
+
export declare const PluginBuildableEnvelopePolygonVertex: z.ZodUnion<readonly [z.ZodObject<{
|
|
108
|
+
x: z.ZodNumber;
|
|
109
|
+
z: z.ZodNumber;
|
|
110
|
+
}, z.core.$strict>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>;
|
|
111
|
+
export type PluginBuildableEnvelopePolygonVertex = z.infer<typeof PluginBuildableEnvelopePolygonVertex>;
|
|
112
|
+
/**
|
|
113
|
+
* Vertical cap for a buildable envelope.
|
|
114
|
+
*
|
|
115
|
+
* Use exactly one shape:
|
|
116
|
+
* - `{ kind: "max_height", maxHeight }`
|
|
117
|
+
* - `{ kind: "max_floors", maxFloors }`
|
|
118
|
+
*
|
|
119
|
+
* Floor-to-floor height is not nested here; it is always supplied as the
|
|
120
|
+
* top-level `floorToFloor` argument.
|
|
121
|
+
*/
|
|
122
|
+
export declare const PluginBuildableEnvelopeVerticalCap: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
123
|
+
kind: z.ZodLiteral<"max_height">;
|
|
124
|
+
maxHeight: z.ZodNumber;
|
|
125
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
126
|
+
kind: z.ZodLiteral<"max_floors">;
|
|
127
|
+
maxFloors: z.ZodNumber;
|
|
128
|
+
}, z.core.$strict>], "kind">;
|
|
129
|
+
export type PluginBuildableEnvelopeVerticalCap = z.infer<typeof PluginBuildableEnvelopeVerticalCap>;
|
|
130
|
+
/**
|
|
131
|
+
* One tier of a buildable envelope's setback profile.
|
|
132
|
+
*
|
|
133
|
+
* Tiers are ordered by `aboveHeight`. The first tier (index 0) must have
|
|
134
|
+
* `aboveHeight: 0` and describes the ground footprint; each subsequent tier
|
|
135
|
+
* describes the complete setback at a strictly greater height. Each tier
|
|
136
|
+
* carries its own `front`, `side`, and `rear` values — there is no
|
|
137
|
+
* inheritance from earlier tiers.
|
|
138
|
+
*
|
|
139
|
+
* All numeric values must be finite and nonnegative, in the request
|
|
140
|
+
* `lengthUnit`.
|
|
141
|
+
*
|
|
142
|
+
* | Property | Type | Description |
|
|
143
|
+
* |---|---|---|
|
|
144
|
+
* | `aboveHeight` | `number` | Height at or above which this tier applies; the ground tier uses `0` |
|
|
145
|
+
* | `front` | `number` | Front setback for this tier |
|
|
146
|
+
* | `side` | `number` | Side setback for this tier |
|
|
147
|
+
* | `rear` | `number` | Rear setback for this tier |
|
|
148
|
+
*/
|
|
149
|
+
export declare const PluginBuildableEnvelopeSetbackTier: z.ZodObject<{
|
|
150
|
+
aboveHeight: z.ZodNumber;
|
|
151
|
+
front: z.ZodNumber;
|
|
152
|
+
side: z.ZodNumber;
|
|
153
|
+
rear: z.ZodNumber;
|
|
154
|
+
}, z.core.$strict>;
|
|
155
|
+
export type PluginBuildableEnvelopeSetbackTier = z.infer<typeof PluginBuildableEnvelopeSetbackTier>;
|
|
156
|
+
/**
|
|
157
|
+
* Arguments for {@linkcode PluginBuildableEnvelopeApi.create}.
|
|
158
|
+
*
|
|
159
|
+
* Strict schema. The host owns identity — no `buildableEnvelopeId` is accepted
|
|
160
|
+
* on create; the id is minted by the host and returned in
|
|
161
|
+
* {@linkcode PluginBuildableEnvelopeCreateResult}.
|
|
162
|
+
*
|
|
163
|
+
* | Property | Type | Description |
|
|
164
|
+
* |---|---|---|
|
|
165
|
+
* | `sitePolygon` | {@linkcode PluginBuildableEnvelopePolygonVertex}`[]` | Site polygon vertices in `lengthUnit`; minimum 3 vertices |
|
|
166
|
+
* | `lengthUnit` | `"ft" \| "m"` | Unit used by all length fields |
|
|
167
|
+
* | `setbacks` | {@linkcode PluginBuildableEnvelopeSetbackTier}`[]` | Setback profile, ground tier first; minimum 1 tier |
|
|
168
|
+
* | `verticalCap` | {@linkcode PluginBuildableEnvelopeVerticalCap} | Maximum height or floor count |
|
|
169
|
+
* | `floorToFloor` | `number` | Required floor-to-floor height in `lengthUnit` |
|
|
170
|
+
* | `farRatio` | `number?` | Optional FAR value, positive when provided |
|
|
171
|
+
* | `lotCoverageMaxPct` | `number?` | Optional lot coverage cap, `0..100` |
|
|
172
|
+
*/
|
|
173
|
+
export declare const PluginBuildableEnvelopeCreateArgs: z.ZodObject<{
|
|
174
|
+
sitePolygon: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
175
|
+
x: z.ZodNumber;
|
|
176
|
+
z: z.ZodNumber;
|
|
177
|
+
}, z.core.$strict>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>>;
|
|
178
|
+
lengthUnit: z.ZodUnion<readonly [z.ZodLiteral<"ft">, z.ZodLiteral<"m">]>;
|
|
179
|
+
setbacks: z.ZodArray<z.ZodObject<{
|
|
180
|
+
aboveHeight: z.ZodNumber;
|
|
181
|
+
front: z.ZodNumber;
|
|
182
|
+
side: z.ZodNumber;
|
|
183
|
+
rear: z.ZodNumber;
|
|
184
|
+
}, z.core.$strict>>;
|
|
185
|
+
verticalCap: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
186
|
+
kind: z.ZodLiteral<"max_height">;
|
|
187
|
+
maxHeight: z.ZodNumber;
|
|
188
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
189
|
+
kind: z.ZodLiteral<"max_floors">;
|
|
190
|
+
maxFloors: z.ZodNumber;
|
|
191
|
+
}, z.core.$strict>], "kind">;
|
|
192
|
+
floorToFloor: z.ZodNumber;
|
|
193
|
+
farRatio: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
lotCoverageMaxPct: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
}, z.core.$strict>;
|
|
196
|
+
export type PluginBuildableEnvelopeCreateArgs = z.infer<typeof PluginBuildableEnvelopeCreateArgs>;
|
|
197
|
+
/**
|
|
198
|
+
* Result of {@linkcode PluginBuildableEnvelopeApi.create}.
|
|
199
|
+
*
|
|
200
|
+
* | Property | Type | Description |
|
|
201
|
+
* |---|---|---|
|
|
202
|
+
* | `buildableEnvelopeId` | `string` | Non-empty unique ID of the created buildable envelope |
|
|
203
|
+
*/
|
|
204
|
+
export declare const PluginBuildableEnvelopeCreateResult: z.ZodObject<{
|
|
205
|
+
buildableEnvelopeId: z.ZodString;
|
|
206
|
+
}, z.core.$strict>;
|
|
207
|
+
export type PluginBuildableEnvelopeCreateResult = z.infer<typeof PluginBuildableEnvelopeCreateResult>;
|
|
208
|
+
/**
|
|
209
|
+
* Arguments for {@linkcode PluginBuildableEnvelopeApi.update}.
|
|
210
|
+
*
|
|
211
|
+
* Strict schema. `buildableEnvelopeId` is required and identifies the prior
|
|
212
|
+
* envelope on the canvas to update.
|
|
213
|
+
*
|
|
214
|
+
* | Property | Type | Description |
|
|
215
|
+
* |---|---|---|
|
|
216
|
+
* | `buildableEnvelopeId` | `string` | Existing envelope ID to update; non-empty |
|
|
217
|
+
* | `sitePolygon` | {@linkcode PluginBuildableEnvelopePolygonVertex}`[]` | Site polygon vertices in `lengthUnit`; minimum 3 vertices |
|
|
218
|
+
* | `lengthUnit` | `"ft" \| "m"` | Unit used by all length fields |
|
|
219
|
+
* | `setbacks` | {@linkcode PluginBuildableEnvelopeSetbackTier}`[]` | Setback profile, ground tier first; minimum 1 tier |
|
|
220
|
+
* | `verticalCap` | {@linkcode PluginBuildableEnvelopeVerticalCap} | Maximum height or floor count |
|
|
221
|
+
* | `floorToFloor` | `number` | Required floor-to-floor height in `lengthUnit` |
|
|
222
|
+
* | `farRatio` | `number?` | Optional FAR value, positive when provided |
|
|
223
|
+
* | `lotCoverageMaxPct` | `number?` | Optional lot coverage cap, `0..100` |
|
|
224
|
+
*/
|
|
225
|
+
export declare const PluginBuildableEnvelopeUpdateArgs: z.ZodObject<{
|
|
226
|
+
buildableEnvelopeId: z.ZodString;
|
|
227
|
+
sitePolygon: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
228
|
+
x: z.ZodNumber;
|
|
229
|
+
z: z.ZodNumber;
|
|
230
|
+
}, z.core.$strict>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>>;
|
|
231
|
+
lengthUnit: z.ZodUnion<readonly [z.ZodLiteral<"ft">, z.ZodLiteral<"m">]>;
|
|
232
|
+
setbacks: z.ZodArray<z.ZodObject<{
|
|
233
|
+
aboveHeight: z.ZodNumber;
|
|
234
|
+
front: z.ZodNumber;
|
|
235
|
+
side: z.ZodNumber;
|
|
236
|
+
rear: z.ZodNumber;
|
|
237
|
+
}, z.core.$strict>>;
|
|
238
|
+
verticalCap: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
239
|
+
kind: z.ZodLiteral<"max_height">;
|
|
240
|
+
maxHeight: z.ZodNumber;
|
|
241
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
242
|
+
kind: z.ZodLiteral<"max_floors">;
|
|
243
|
+
maxFloors: z.ZodNumber;
|
|
244
|
+
}, z.core.$strict>], "kind">;
|
|
245
|
+
floorToFloor: z.ZodNumber;
|
|
246
|
+
farRatio: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
lotCoverageMaxPct: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
}, z.core.$strict>;
|
|
249
|
+
export type PluginBuildableEnvelopeUpdateArgs = z.infer<typeof PluginBuildableEnvelopeUpdateArgs>;
|
|
250
|
+
/**
|
|
251
|
+
* Result of {@linkcode PluginBuildableEnvelopeApi.update}.
|
|
252
|
+
*
|
|
253
|
+
* | Property | Type | Description |
|
|
254
|
+
* |---|---|---|
|
|
255
|
+
* | `buildableEnvelopeId` | `string` | Non-empty unique ID of the updated buildable envelope |
|
|
256
|
+
*/
|
|
257
|
+
export declare const PluginBuildableEnvelopeUpdateResult: z.ZodObject<{
|
|
258
|
+
buildableEnvelopeId: z.ZodString;
|
|
259
|
+
}, z.core.$strict>;
|
|
260
|
+
export type PluginBuildableEnvelopeUpdateResult = z.infer<typeof PluginBuildableEnvelopeUpdateResult>;
|
|
261
|
+
//# sourceMappingURL=buildableE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