@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,69 @@
|
|
|
1
|
+
import { PluginProgramDepartmentsApi } from "./departments";
|
|
2
|
+
import { PluginProgramAdjacencyApi } from "./adjacency";
|
|
3
|
+
import { PluginProgramLayoutApi } from "./layout";
|
|
4
|
+
import { PluginProgramMetricsApi } from "./metrics";
|
|
5
|
+
import { PluginProgramSpreadsheetApi } from "./spreadsheet";
|
|
6
|
+
import { PluginProgramSiteApi } from "./site";
|
|
7
|
+
import { PluginProgramCoresApi } from "./cores";
|
|
8
|
+
import { PluginProgramClassificationApi } from "./classification";
|
|
9
|
+
import { PluginProgramAreasApi } from "./areas";
|
|
10
|
+
/**
|
|
11
|
+
* Program-mode planning APIs.
|
|
12
|
+
*
|
|
13
|
+
* The program is the space-planning layer: department groupings with area targets,
|
|
14
|
+
* the metrics that track allocated area against those targets, and the reports
|
|
15
|
+
* that render program/takeoff data to spreadsheet sheets. Reads describe the
|
|
16
|
+
* *plan* (intent + targets); the geometry that realizes the plan is authored
|
|
17
|
+
* through the geometry namespaces.
|
|
18
|
+
*
|
|
19
|
+
* - {@linkcode PluginProgramApi.departments} — Read & edit program departments (groupings + targets)
|
|
20
|
+
* - {@linkcode PluginProgramApi.adjacency} — Read & compute the department/space adjacency matrix
|
|
21
|
+
* - {@linkcode PluginProgramApi.layout} — Arrange/pack spaces in the envelope (authored ahead)
|
|
22
|
+
* - {@linkcode PluginProgramApi.metrics} — Read the area-program summary
|
|
23
|
+
* - {@linkcode PluginProgramApi.areas} — FAR / built-up-area rollup and groupings
|
|
24
|
+
* - {@linkcode PluginProgramApi.spreadsheet} — Render program data to sheets and read it back
|
|
25
|
+
* - {@linkcode PluginProgramApi.site} — Read the site/plot planning context
|
|
26
|
+
* - {@linkcode PluginProgramApi.cores} — Read & trigger vertical-circulation cores
|
|
27
|
+
* - {@linkcode PluginProgramApi.classification} — Classification catalog + display tags
|
|
28
|
+
*
|
|
29
|
+
* Sub-namespaces typed as optional (`?`) are **authored ahead of the host** —
|
|
30
|
+
* declared so plugins and codegen can see the shape, but not required of host
|
|
31
|
+
* implementations and kept out of the discovery manifest until the host lands
|
|
32
|
+
* them (at which point they are promoted to required `abstract` members).
|
|
33
|
+
*
|
|
34
|
+
* Accessed via `snaptrude.program`.
|
|
35
|
+
*/
|
|
36
|
+
export declare abstract class PluginProgramApi {
|
|
37
|
+
/** Program departments — groupings, area targets, and space assignment. See {@linkcode PluginProgramDepartmentsApi}. */
|
|
38
|
+
abstract departments: PluginProgramDepartmentsApi;
|
|
39
|
+
/** Adjacency matrix — read & compute proximity relationships. See {@linkcode PluginProgramAdjacencyApi}. */
|
|
40
|
+
abstract adjacency: PluginProgramAdjacencyApi;
|
|
41
|
+
/**
|
|
42
|
+
* Arrange/pack spaces in the envelope. See {@linkcode PluginProgramLayoutApi}.
|
|
43
|
+
* _(authored ahead — optional until the host lands it next increment.)_
|
|
44
|
+
*/
|
|
45
|
+
layout?: PluginProgramLayoutApi;
|
|
46
|
+
/** Area-program summary — targets vs allocated area. See {@linkcode PluginProgramMetricsApi}. */
|
|
47
|
+
abstract metrics: PluginProgramMetricsApi;
|
|
48
|
+
/** FAR / built-up-area rollup and groupings. See {@linkcode PluginProgramAreasApi}. */
|
|
49
|
+
abstract areas: PluginProgramAreasApi;
|
|
50
|
+
/** Spreadsheet reports — render tables to sheets, export, list, read back. See {@linkcode PluginProgramSpreadsheetApi}. */
|
|
51
|
+
abstract spreadsheet: PluginProgramSpreadsheetApi;
|
|
52
|
+
/** Site/plot planning context — total area, parcel footprints, geo rings. See {@linkcode PluginProgramSiteApi}. */
|
|
53
|
+
abstract site: PluginProgramSiteApi;
|
|
54
|
+
/** Vertical-circulation cores — read & predicate (live); generation trigger is optional. See {@linkcode PluginProgramCoresApi}. */
|
|
55
|
+
abstract cores: PluginProgramCoresApi;
|
|
56
|
+
/** Classification catalog (space/area/mass types) + display tags. See {@linkcode PluginProgramClassificationApi}. */
|
|
57
|
+
abstract classification: PluginProgramClassificationApi;
|
|
58
|
+
constructor();
|
|
59
|
+
}
|
|
60
|
+
export * from "./departments";
|
|
61
|
+
export * from "./adjacency";
|
|
62
|
+
export * from "./layout";
|
|
63
|
+
export * from "./metrics";
|
|
64
|
+
export * from "./spreadsheet";
|
|
65
|
+
export * from "./site";
|
|
66
|
+
export * from "./cores";
|
|
67
|
+
export * from "./classification";
|
|
68
|
+
export * from "./areas";
|
|
69
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/program/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,8BAAsB,gBAAgB;IACpC,wHAAwH;IACxH,SAAgB,WAAW,EAAE,2BAA2B,CAAA;IACxD,4GAA4G;IAC5G,SAAgB,SAAS,EAAE,yBAAyB,CAAA;IACpD;;;OAGG;IACI,MAAM,CAAC,EAAE,sBAAsB,CAAA;IACtC,iGAAiG;IACjG,SAAgB,OAAO,EAAE,uBAAuB,CAAA;IAChD,uFAAuF;IACvF,SAAgB,KAAK,EAAE,qBAAqB,CAAA;IAC5C,2HAA2H;IAC3H,SAAgB,WAAW,EAAE,2BAA2B,CAAA;IACxD,mHAAmH;IACnH,SAAgB,IAAI,EAAE,oBAAoB,CAAA;IAC1C,mIAAmI;IACnI,SAAgB,KAAK,EAAE,qBAAqB,CAAA;IAC5C,qHAAqH;IACrH,SAAgB,cAAc,EAAE,8BAA8B,CAAA;;CAG/D;AAED,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Program layout — arrange and pack spaces inside the envelope.
|
|
5
|
+
*
|
|
6
|
+
* These wrap the product's **Arrange in envelope** / **Pack in envelope**
|
|
7
|
+
* tools (engine: `Planner.pack_arrange` in the react host) — stages two and
|
|
8
|
+
* three of the space-planning workflow that starts with
|
|
9
|
+
* {@linkcode PluginProgramAdjacencyApi} (`program.adjacency`).
|
|
10
|
+
*
|
|
11
|
+
* _(Authored ahead — both methods are optional until the host lands them in
|
|
12
|
+
* the next increment, and are kept out of the discovery manifest until then.)_
|
|
13
|
+
*
|
|
14
|
+
* Accessed via `snaptrude.program.layout`.
|
|
15
|
+
*/
|
|
16
|
+
export declare abstract class PluginProgramLayoutApi {
|
|
17
|
+
constructor();
|
|
18
|
+
/**
|
|
19
|
+
* Arrange the spaces inside the envelope using the computed adjacency data.
|
|
20
|
+
* _(Authored ahead — optional until the host lands.)_
|
|
21
|
+
*
|
|
22
|
+
* @examplePrompt Arrange the rooms in the envelope
|
|
23
|
+
* @examplePrompt Lay out the departments inside the building envelope
|
|
24
|
+
* @examplePrompt Auto-arrange the program spaces
|
|
25
|
+
*
|
|
26
|
+
* # Example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const { success, error } = await snaptrude.program.layout.arrange()
|
|
29
|
+
* if (!success) console.log("Arrange failed:", error)
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
arrange?: () => PluginApiReturn<PluginProgramLayoutRunResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Pack the spaces into the envelope (a tighter fit than arrange).
|
|
35
|
+
* _(Authored ahead — optional until the host lands.)_
|
|
36
|
+
*
|
|
37
|
+
* @examplePrompt Pack the rooms into the envelope
|
|
38
|
+
* @examplePrompt Fit the program spaces tightly into the building
|
|
39
|
+
* @examplePrompt Run pack-in-envelope on this storey
|
|
40
|
+
*
|
|
41
|
+
* # Example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const { success, error } = await snaptrude.program.layout.pack()
|
|
44
|
+
* if (!success) console.log("Pack failed:", error)
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
pack?: () => PluginApiReturn<PluginProgramLayoutRunResult>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Result of {@linkcode PluginProgramLayoutApi.arrange} /
|
|
51
|
+
* {@linkcode PluginProgramLayoutApi.pack}.
|
|
52
|
+
*
|
|
53
|
+
* | Property | Type | Description |
|
|
54
|
+
* |---|---|---|
|
|
55
|
+
* | `success` | `boolean` | Whether the layout run completed |
|
|
56
|
+
* | `error` | `string \| undefined` | Failure reason when `success` is `false` |
|
|
57
|
+
*/
|
|
58
|
+
export declare const PluginProgramLayoutRunResult: z.ZodObject<{
|
|
59
|
+
success: z.ZodBoolean;
|
|
60
|
+
error: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type PluginProgramLayoutRunResult = z.infer<typeof PluginProgramLayoutRunResult>;
|
|
63
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/api/program/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;GAYG;AACH,8BAAsB,sBAAsB;;IAG1C;;;;;;;;;;;;;OAaG;IACI,OAAO,CAAC,EAAE,MAAM,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAEpE;;;;;;;;;;;;;OAaG;IACI,IAAI,CAAC,EAAE,MAAM,eAAe,CAAC,4BAA4B,CAAC,CAAA;CAClE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Program metrics — the area-program summary of the active project.
|
|
5
|
+
*
|
|
6
|
+
* Aggregate planning numbers: total target versus allocated area, plus a
|
|
7
|
+
* per-department breakdown. This is the program-mode "am I hitting my area
|
|
8
|
+
* targets?" read; per-entity geometry measurements (a single space's area,
|
|
9
|
+
* volume, bounding box) live under the geometry namespaces, not here.
|
|
10
|
+
*
|
|
11
|
+
* Every area is reported in the summary's `units` (ft² or m²). This is a read:
|
|
12
|
+
* it never throws and returns an empty breakdown with zero totals when the
|
|
13
|
+
* project has no program.
|
|
14
|
+
*
|
|
15
|
+
* Accessed via `snaptrude.program.metrics`.
|
|
16
|
+
*/
|
|
17
|
+
export declare abstract class PluginProgramMetricsApi {
|
|
18
|
+
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* Get the area-program summary for the active project.
|
|
21
|
+
*
|
|
22
|
+
* @returns A {@linkcode PluginProgramMetricsSummary} with project-level totals
|
|
23
|
+
* and a per-department area breakdown.
|
|
24
|
+
*
|
|
25
|
+
* @examplePrompt How much area have I allocated versus my targets?
|
|
26
|
+
* @examplePrompt Give me the program area summary
|
|
27
|
+
* @examplePrompt Which departments are over or under their target area?
|
|
28
|
+
* @examplePrompt What's the total built area in the program?
|
|
29
|
+
* @examplePrompt Show the area breakdown per department
|
|
30
|
+
* @examplePrompt Am I within my area program?
|
|
31
|
+
*
|
|
32
|
+
* # Example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const m = await snaptrude.program.metrics.get()
|
|
35
|
+
* console.log(`${m.totalAllocatedArea} / ${m.totalTargetArea} ${m.units}`)
|
|
36
|
+
* console.log("unassigned:", m.unassignedArea)
|
|
37
|
+
* for (const d of m.departments) {
|
|
38
|
+
* console.log(d.name, d.allocatedArea, d.targetArea)
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
abstract get(): PluginApiReturn<PluginProgramMetricsSummary>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The unit areas are reported in: square feet (`"ft2"`) or square metres (`"m2"`).
|
|
46
|
+
*
|
|
47
|
+
* **Area-units convention (applies to every area-returning method).** A result
|
|
48
|
+
* carries exactly one `units` field, at the **top level of the value the method
|
|
49
|
+
* returns**: on the response **envelope** for `list`/multi/composite results, and
|
|
50
|
+
* on the **record itself** only for a single `.get` that returns a bare record.
|
|
51
|
+
* Inner/leaf records never repeat it.
|
|
52
|
+
*/
|
|
53
|
+
export declare const PluginAreaUnit: z.ZodEnum<{
|
|
54
|
+
ft2: "ft2";
|
|
55
|
+
m2: "m2";
|
|
56
|
+
}>;
|
|
57
|
+
export type PluginAreaUnit = z.infer<typeof PluginAreaUnit>;
|
|
58
|
+
/**
|
|
59
|
+
* Per-department area figures within the program summary. Areas are in the
|
|
60
|
+
* enclosing {@linkcode PluginProgramMetricsSummary}'s `units`.
|
|
61
|
+
*
|
|
62
|
+
* | Property | Type | Description |
|
|
63
|
+
* |---|---|---|
|
|
64
|
+
* | `departmentId` | `string` | Department id |
|
|
65
|
+
* | `name` | `string` | Department name |
|
|
66
|
+
* | `targetArea` | `number \| null` | Target area in project units, or `null` if no target is set |
|
|
67
|
+
* | `allocatedArea` | `number` | Area currently allocated to this department, in project units |
|
|
68
|
+
*/
|
|
69
|
+
export declare const PluginProgramDepartmentMetric: z.ZodObject<{
|
|
70
|
+
departmentId: z.ZodString;
|
|
71
|
+
name: z.ZodString;
|
|
72
|
+
targetArea: z.ZodNullable<z.ZodNumber>;
|
|
73
|
+
allocatedArea: z.ZodNumber;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type PluginProgramDepartmentMetric = z.infer<typeof PluginProgramDepartmentMetric>;
|
|
76
|
+
/**
|
|
77
|
+
* Result of {@linkcode PluginProgramMetricsApi.get}.
|
|
78
|
+
*
|
|
79
|
+
* Reconciliation invariant: `totalAllocatedArea === unassignedArea` plus the sum
|
|
80
|
+
* of every `departments[].allocatedArea`. `totalTargetArea` is the sum of every
|
|
81
|
+
* `departments[].targetArea` (a `null` target counts as 0); unassigned area has
|
|
82
|
+
* no target. Every area is in `units`.
|
|
83
|
+
*
|
|
84
|
+
* | Property | Type | Description |
|
|
85
|
+
* |---|---|---|
|
|
86
|
+
* | `units` | `"ft2" \| "m2"` | The unit every area in this summary is reported in |
|
|
87
|
+
* | `totalTargetArea` | `number` | Sum of all department target areas |
|
|
88
|
+
* | `totalAllocatedArea` | `number` | Total allocated area = departments + `unassignedArea` |
|
|
89
|
+
* | `unassignedArea` | `number` | Allocated area not attributed to any listed department (site/unassigned) — the delta that reconciles the total |
|
|
90
|
+
* | `departments` | {@linkcode PluginProgramDepartmentMetric}`[]` | Per-department area breakdown |
|
|
91
|
+
*/
|
|
92
|
+
export declare const PluginProgramMetricsSummary: z.ZodObject<{
|
|
93
|
+
units: z.ZodEnum<{
|
|
94
|
+
ft2: "ft2";
|
|
95
|
+
m2: "m2";
|
|
96
|
+
}>;
|
|
97
|
+
totalTargetArea: z.ZodNumber;
|
|
98
|
+
totalAllocatedArea: z.ZodNumber;
|
|
99
|
+
unassignedArea: z.ZodNumber;
|
|
100
|
+
departments: z.ZodArray<z.ZodObject<{
|
|
101
|
+
departmentId: z.ZodString;
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
targetArea: z.ZodNullable<z.ZodNumber>;
|
|
104
|
+
allocatedArea: z.ZodNumber;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export type PluginProgramMetricsSummary = z.infer<typeof PluginProgramMetricsSummary>;
|
|
108
|
+
//# sourceMappingURL=metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../src/api/program/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;;;;;;;;;;;GAaG;AACH,8BAAsB,uBAAuB;;IAG3C;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,GAAG,IAAI,eAAe,CAAC,2BAA2B,CAAC;CACpE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;EAAwB,CAAA;AACnD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B;;;;;iBAKxC,CAAA;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,6BAA6B,CACrC,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;iBAqBrC,CAAA;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,2BAA2B,CACnC,CAAA"}
|