@snaptrude/plugin-core 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/AGENTS.md +130 -48
  2. package/CHANGELOG.md +111 -0
  3. package/api-manifest.full.json +3999 -0
  4. package/api-manifest.json +3845 -0
  5. package/dist/api/core/buildings.d.ts +427 -0
  6. package/dist/api/core/buildings.d.ts.map +1 -0
  7. package/dist/api/core/comment/index.d.ts +230 -0
  8. package/dist/api/core/comment/index.d.ts.map +1 -0
  9. package/dist/api/core/geom/create/index.d.ts +247 -0
  10. package/dist/api/core/geom/create/index.d.ts.map +1 -0
  11. package/dist/api/core/geom/delete/index.d.ts +72 -0
  12. package/dist/api/core/geom/delete/index.d.ts.map +1 -0
  13. package/dist/api/core/geom/index.d.ts +24 -23
  14. package/dist/api/core/geom/index.d.ts.map +1 -1
  15. package/dist/api/core/geom/query/arc.d.ts +169 -0
  16. package/dist/api/core/geom/query/arc.d.ts.map +1 -0
  17. package/dist/api/core/geom/query/brep.d.ts +402 -0
  18. package/dist/api/core/geom/query/brep.d.ts.map +1 -0
  19. package/dist/api/core/geom/query/circle.d.ts +378 -0
  20. package/dist/api/core/geom/query/circle.d.ts.map +1 -0
  21. package/dist/api/core/geom/query/contour.d.ts +450 -0
  22. package/dist/api/core/geom/query/contour.d.ts.map +1 -0
  23. package/dist/api/core/geom/query/curve.d.ts +918 -0
  24. package/dist/api/core/geom/query/curve.d.ts.map +1 -0
  25. package/dist/api/core/geom/query/edge.d.ts +128 -0
  26. package/dist/api/core/geom/query/edge.d.ts.map +1 -0
  27. package/dist/api/core/geom/query/face.d.ts +363 -0
  28. package/dist/api/core/geom/query/face.d.ts.map +1 -0
  29. package/dist/api/core/geom/query/halfedge.d.ts +206 -0
  30. package/dist/api/core/geom/query/halfedge.d.ts.map +1 -0
  31. package/dist/api/core/geom/query/index.d.ts +61 -0
  32. package/dist/api/core/geom/query/index.d.ts.map +1 -0
  33. package/dist/api/core/geom/query/profile.d.ts +410 -0
  34. package/dist/api/core/geom/query/profile.d.ts.map +1 -0
  35. package/dist/api/core/geom/query/vertex.d.ts +187 -0
  36. package/dist/api/core/geom/query/vertex.d.ts.map +1 -0
  37. package/dist/api/core/geom/update/contour.d.ts +272 -0
  38. package/dist/api/core/geom/update/contour.d.ts.map +1 -0
  39. package/dist/api/core/geom/update/curve.d.ts +180 -0
  40. package/dist/api/core/geom/update/curve.d.ts.map +1 -0
  41. package/dist/api/core/geom/update/index.d.ts +27 -0
  42. package/dist/api/core/geom/update/index.d.ts.map +1 -0
  43. package/dist/api/core/geom/update/profile.d.ts +329 -0
  44. package/dist/api/core/geom/update/profile.d.ts.map +1 -0
  45. package/dist/api/core/groups.d.ts +485 -0
  46. package/dist/api/core/groups.d.ts.map +1 -0
  47. package/dist/api/core/history/index.d.ts +78 -0
  48. package/dist/api/core/history/index.d.ts.map +1 -0
  49. package/dist/api/core/index.d.ts +46 -1
  50. package/dist/api/core/index.d.ts.map +1 -1
  51. package/dist/api/core/layers.d.ts +402 -0
  52. package/dist/api/core/layers.d.ts.map +1 -0
  53. package/dist/api/core/math/quat.d.ts +111 -128
  54. package/dist/api/core/math/quat.d.ts.map +1 -1
  55. package/dist/api/core/math/vec3.d.ts +120 -102
  56. package/dist/api/core/math/vec3.d.ts.map +1 -1
  57. package/dist/api/core/project/index.d.ts +399 -0
  58. package/dist/api/core/project/index.d.ts.map +1 -0
  59. package/dist/api/core/tags.d.ts +755 -0
  60. package/dist/api/core/tags.d.ts.map +1 -0
  61. package/dist/api/core/units/index.d.ts +175 -0
  62. package/dist/api/core/units/index.d.ts.map +1 -0
  63. package/dist/api/core/zoom/index.d.ts +45 -0
  64. package/dist/api/core/zoom/index.d.ts.map +1 -0
  65. package/dist/api/design/boolean/index.d.ts +168 -0
  66. package/dist/api/design/boolean/index.d.ts.map +1 -0
  67. package/dist/api/design/create/index.d.ts +828 -0
  68. package/dist/api/design/create/index.d.ts.map +1 -0
  69. package/dist/api/design/delete/index.d.ts +63 -0
  70. package/dist/api/design/delete/index.d.ts.map +1 -0
  71. package/dist/api/design/doors/index.d.ts +268 -0
  72. package/dist/api/design/doors/index.d.ts.map +1 -0
  73. package/dist/api/design/edit/index.d.ts +49 -0
  74. package/dist/api/design/edit/index.d.ts.map +1 -0
  75. package/dist/api/design/erase/index.d.ts +160 -0
  76. package/dist/api/design/erase/index.d.ts.map +1 -0
  77. package/dist/api/design/furniture/index.d.ts +123 -0
  78. package/dist/api/design/furniture/index.d.ts.map +1 -0
  79. package/dist/api/design/index.d.ts +153 -0
  80. package/dist/api/design/index.d.ts.map +1 -0
  81. package/dist/api/design/lock.d.ts +41 -0
  82. package/dist/api/design/lock.d.ts.map +1 -0
  83. package/dist/api/design/materials/index.d.ts +297 -0
  84. package/dist/api/design/materials/index.d.ts.map +1 -0
  85. package/dist/api/design/query/geometry/index.d.ts +140 -0
  86. package/dist/api/design/query/geometry/index.d.ts.map +1 -0
  87. package/dist/api/design/query/index.d.ts +1011 -0
  88. package/dist/api/design/query/index.d.ts.map +1 -0
  89. package/dist/api/design/query/spaces.d.ts +221 -0
  90. package/dist/api/design/query/spaces.d.ts.map +1 -0
  91. package/dist/api/design/selection/index.d.ts +138 -0
  92. package/dist/api/design/selection/index.d.ts.map +1 -0
  93. package/dist/api/design/shared.d.ts +38 -0
  94. package/dist/api/design/shared.d.ts.map +1 -0
  95. package/dist/api/design/transform/index.d.ts +87 -0
  96. package/dist/api/design/transform/index.d.ts.map +1 -0
  97. package/dist/api/design/update/index.d.ts +178 -0
  98. package/dist/api/design/update/index.d.ts.map +1 -0
  99. package/dist/api/design/windows/index.d.ts +189 -0
  100. package/dist/api/design/windows/index.d.ts.map +1 -0
  101. package/dist/api/entity/buildableEnvelope.d.ts +261 -0
  102. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -0
  103. package/dist/api/entity/department.d.ts +0 -98
  104. package/dist/api/entity/department.d.ts.map +1 -1
  105. package/dist/api/entity/index.d.ts +9 -9
  106. package/dist/api/entity/index.d.ts.map +1 -1
  107. package/dist/api/entity/referenceLine.d.ts +49 -106
  108. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  109. package/dist/api/entity/space.d.ts +482 -249
  110. package/dist/api/entity/space.d.ts.map +1 -1
  111. package/dist/api/entity/story.d.ts +49 -39
  112. package/dist/api/entity/story.d.ts.map +1 -1
  113. package/dist/api/index.d.ts +17 -12
  114. package/dist/api/index.d.ts.map +1 -1
  115. package/dist/api/presentation/aiInspiration.d.ts +440 -0
  116. package/dist/api/presentation/aiInspiration.d.ts.map +1 -0
  117. package/dist/api/presentation/diagrams.d.ts +81 -0
  118. package/dist/api/presentation/diagrams.d.ts.map +1 -0
  119. package/dist/api/presentation/import.d.ts +113 -0
  120. package/dist/api/presentation/import.d.ts.map +1 -0
  121. package/dist/api/presentation/index.d.ts +46 -0
  122. package/dist/api/presentation/index.d.ts.map +1 -0
  123. package/dist/api/presentation/sheets.d.ts +176 -0
  124. package/dist/api/presentation/sheets.d.ts.map +1 -0
  125. package/dist/api/presentation/views.d.ts +296 -0
  126. package/dist/api/presentation/views.d.ts.map +1 -0
  127. package/dist/api/program/adjacency.d.ts +155 -0
  128. package/dist/api/program/adjacency.d.ts.map +1 -0
  129. package/dist/api/program/areas.d.ts +360 -0
  130. package/dist/api/program/areas.d.ts.map +1 -0
  131. package/dist/api/program/classification.d.ts +135 -0
  132. package/dist/api/program/classification.d.ts.map +1 -0
  133. package/dist/api/program/cores.d.ts +174 -0
  134. package/dist/api/program/cores.d.ts.map +1 -0
  135. package/dist/api/program/departments.d.ts +431 -0
  136. package/dist/api/program/departments.d.ts.map +1 -0
  137. package/dist/api/program/index.d.ts +69 -0
  138. package/dist/api/program/index.d.ts.map +1 -0
  139. package/dist/api/program/layout.d.ts +63 -0
  140. package/dist/api/program/layout.d.ts.map +1 -0
  141. package/dist/api/program/metrics.d.ts +108 -0
  142. package/dist/api/program/metrics.d.ts.map +1 -0
  143. package/dist/api/program/site.d.ts +367 -0
  144. package/dist/api/program/site.d.ts.map +1 -0
  145. package/dist/api/program/spreadsheet.d.ts +2041 -0
  146. package/dist/api/program/spreadsheet.d.ts.map +1 -0
  147. package/dist/handles.d.ts +138 -0
  148. package/dist/handles.d.ts.map +1 -0
  149. package/dist/host-utils.d.ts +7 -5
  150. package/dist/host-utils.d.ts.map +1 -1
  151. package/dist/index.cjs +4001 -904
  152. package/dist/index.cjs.map +1 -1
  153. package/dist/index.d.ts +1 -0
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/index.js +3392 -870
  156. package/dist/index.js.map +1 -1
  157. package/package.json +6 -2
  158. package/scripts/generate-manifest.mjs +193 -0
  159. package/scripts/generate-manifest.test.mjs +193 -0
  160. package/src/api/core/buildings.ts +485 -0
  161. package/src/api/core/comment/index.ts +258 -0
  162. package/src/api/core/geom/create/index.ts +293 -0
  163. package/src/api/core/geom/delete/index.ts +78 -0
  164. package/src/api/core/geom/index.ts +24 -23
  165. package/src/api/core/geom/query/arc.ts +169 -0
  166. package/src/api/core/geom/query/brep.ts +444 -0
  167. package/src/api/core/geom/query/circle.ts +404 -0
  168. package/src/api/core/geom/query/contour.ts +540 -0
  169. package/src/api/core/geom/query/curve.ts +1078 -0
  170. package/src/api/core/geom/query/edge.ts +130 -0
  171. package/src/api/core/geom/query/face.ts +403 -0
  172. package/src/api/core/geom/query/halfedge.ts +210 -0
  173. package/src/api/core/geom/query/index.ts +63 -0
  174. package/src/api/core/geom/query/profile.ts +473 -0
  175. package/src/api/core/geom/query/vertex.ts +205 -0
  176. package/src/api/core/geom/update/contour.ts +315 -0
  177. package/src/api/core/geom/update/curve.ts +209 -0
  178. package/src/api/core/geom/update/index.ts +29 -0
  179. package/src/api/core/geom/update/profile.ts +377 -0
  180. package/src/api/core/groups.ts +521 -0
  181. package/src/api/core/history/index.ts +84 -0
  182. package/src/api/core/index.ts +46 -1
  183. package/src/api/core/layers.ts +333 -0
  184. package/src/api/core/math/quat.ts +112 -235
  185. package/src/api/core/math/vec3.ts +124 -159
  186. package/src/api/core/project/index.ts +418 -0
  187. package/src/api/core/tags.ts +808 -0
  188. package/src/api/core/units/index.ts +164 -0
  189. package/src/api/core/zoom/index.ts +47 -0
  190. package/src/api/design/boolean/index.ts +179 -0
  191. package/src/api/design/create/index.ts +886 -0
  192. package/src/api/design/delete/index.ts +67 -0
  193. package/src/api/design/doors/index.ts +285 -0
  194. package/src/api/design/edit/index.ts +54 -0
  195. package/src/api/design/erase/index.ts +151 -0
  196. package/src/api/design/furniture/index.ts +130 -0
  197. package/src/api/design/index.ts +162 -0
  198. package/src/api/design/lock.ts +42 -0
  199. package/src/api/design/materials/index.ts +301 -0
  200. package/src/api/design/query/geometry/index.ts +166 -0
  201. package/src/api/design/query/index.ts +937 -0
  202. package/src/api/design/query/spaces.ts +132 -0
  203. package/src/api/design/selection/index.ts +144 -0
  204. package/src/api/design/shared.ts +40 -0
  205. package/src/api/design/transform/index.ts +93 -0
  206. package/src/api/design/update/index.ts +117 -0
  207. package/src/api/design/windows/index.ts +207 -0
  208. package/src/api/entity/buildableEnvelope.ts +318 -0
  209. package/src/api/entity/department.ts +0 -113
  210. package/src/api/entity/index.ts +9 -9
  211. package/src/api/entity/referenceLine.ts +50 -38
  212. package/src/api/entity/space.ts +285 -226
  213. package/src/api/entity/story.ts +53 -42
  214. package/src/api/index.ts +17 -12
  215. package/src/api/presentation/aiInspiration.ts +362 -0
  216. package/src/api/presentation/diagrams.ts +84 -0
  217. package/src/api/presentation/import.ts +112 -0
  218. package/src/api/presentation/index.ts +48 -0
  219. package/src/api/presentation/sheets.ts +198 -0
  220. package/src/api/presentation/views.ts +303 -0
  221. package/src/api/program/adjacency.ts +164 -0
  222. package/src/api/program/areas.ts +335 -0
  223. package/src/api/program/classification.ts +138 -0
  224. package/src/api/program/cores.ts +171 -0
  225. package/src/api/program/departments.ts +465 -0
  226. package/src/api/program/index.ts +71 -0
  227. package/src/api/program/layout.ts +68 -0
  228. package/src/api/program/metrics.ts +120 -0
  229. package/src/api/program/site.ts +326 -0
  230. package/src/api/program/spreadsheet.ts +2075 -0
  231. package/src/handles.ts +148 -0
  232. package/src/host-utils.ts +10 -6
  233. package/src/index.ts +1 -0
  234. package/dist/api/core/geom/arc.d.ts +0 -81
  235. package/dist/api/core/geom/arc.d.ts.map +0 -1
  236. package/dist/api/core/geom/curve.d.ts +0 -70
  237. package/dist/api/core/geom/curve.d.ts.map +0 -1
  238. package/dist/api/core/geom/line.d.ts +0 -56
  239. package/dist/api/core/geom/line.d.ts.map +0 -1
  240. package/dist/api/core/geom/profile.d.ts +0 -121
  241. package/dist/api/core/geom/profile.d.ts.map +0 -1
  242. package/dist/api/tools/copy.d.ts +0 -59
  243. package/dist/api/tools/copy.d.ts.map +0 -1
  244. package/dist/api/tools/index.d.ts +0 -33
  245. package/dist/api/tools/index.d.ts.map +0 -1
  246. package/dist/api/tools/material.d.ts +0 -51
  247. package/dist/api/tools/material.d.ts.map +0 -1
  248. package/dist/api/tools/offset.d.ts +0 -43
  249. package/dist/api/tools/offset.d.ts.map +0 -1
  250. package/dist/api/tools/selection.d.ts +0 -48
  251. package/dist/api/tools/selection.d.ts.map +0 -1
  252. package/dist/api/tools/transform.d.ts +0 -114
  253. package/dist/api/tools/transform.d.ts.map +0 -1
  254. package/dist/api/units/index.d.ts +0 -163
  255. package/dist/api/units/index.d.ts.map +0 -1
  256. package/src/api/core/geom/arc.ts +0 -70
  257. package/src/api/core/geom/curve.ts +0 -41
  258. package/src/api/core/geom/line.ts +0 -53
  259. package/src/api/core/geom/profile.ts +0 -94
  260. package/src/api/tools/copy.ts +0 -55
  261. package/src/api/tools/index.ts +0 -39
  262. package/src/api/tools/material.ts +0 -49
  263. package/src/api/tools/offset.ts +0 -43
  264. package/src/api/tools/selection.ts +0 -51
  265. package/src/api/tools/transform.ts +0 -117
  266. 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"}
@@ -0,0 +1,367 @@
1
+ import * as z from "zod";
2
+ import { PluginApiReturn } from "../../types";
3
+ /**
4
+ * Program site — read the planning context of the project's site/plot.
5
+ *
6
+ * The **site** is the set of plot/parcel footprints the program is planned
7
+ * against: their total area, per-parcel footprints (in scene XZ coordinates),
8
+ * and — when the project is geo-located on terrain — their geographic
9
+ * (latitude/longitude) rings. This is the program-planning view of the site;
10
+ * zoning numbers (setbacks, FAR/FSI, height limits) live in the site-analysis
11
+ * sheet and are not read here.
12
+ *
13
+ * All methods are reads: they return plain records and never throw — `get`
14
+ * returns an empty snapshot (zero totals) when there is no site, and the `list`
15
+ * methods return `[]`.
16
+ *
17
+ * Accessed via `snaptrude.program.site`.
18
+ */
19
+ export declare abstract class PluginProgramSiteApi {
20
+ constructor();
21
+ /**
22
+ * Get a snapshot of the project site.
23
+ *
24
+ * @returns A {@linkcode PluginProgramSiteSnapshot} with the total site area,
25
+ * parcel count, and each parcel's footprint. Empty (zero totals, no
26
+ * parcels) when the project has no site.
27
+ *
28
+ * @examplePrompt What is my total site area?
29
+ * @examplePrompt Give me a summary of the site
30
+ * @examplePrompt How many site parcels are on the canvas?
31
+ * @examplePrompt Show the site footprint and its area
32
+ * @examplePrompt How big is the plot I'm building on?
33
+ *
34
+ * # Example
35
+ * ```ts
36
+ * const site = await snaptrude.program.site.get()
37
+ * console.log(`${site.totalArea} ${site.units} across ${site.polygonCount} parcels`)
38
+ * ```
39
+ */
40
+ abstract get(): PluginApiReturn<PluginProgramSiteSnapshot>;
41
+ /**
42
+ * Get just the total site area.
43
+ *
44
+ * A fast single-metric read — the same number as
45
+ * {@linkcode PluginProgramSiteSnapshot.totalArea}, without computing the
46
+ * per-parcel footprints.
47
+ *
48
+ * @returns A {@linkcode PluginProgramSiteAreaResult} with the total `area` and
49
+ * its `units` (`0` when there is no site).
50
+ *
51
+ * @examplePrompt What's the total site area?
52
+ * @examplePrompt How big is my plot in square metres?
53
+ * @examplePrompt Total parcel area on the site
54
+ *
55
+ * # Example
56
+ * ```ts
57
+ * const { area, units } = await snaptrude.program.site.getArea()
58
+ * ```
59
+ */
60
+ abstract getArea(): PluginApiReturn<PluginProgramSiteAreaResult>;
61
+ /**
62
+ * List the site parcels with their footprints (in scene coordinates).
63
+ *
64
+ * @returns A {@linkcode PluginProgramSiteListPolygonsResult} with each parcel's
65
+ * id, area, label, and 2D footprint (XZ ground-plane points). Empty when the
66
+ * project has no site.
67
+ *
68
+ * @examplePrompt List every site parcel
69
+ * @examplePrompt Show me each plot's footprint
70
+ * @examplePrompt Which site parcels are largest?
71
+ * @examplePrompt Get the boundary points of the site polygons
72
+ *
73
+ * # Example
74
+ * ```ts
75
+ * const { polygons, units } = await snaptrude.program.site.listPolygons()
76
+ * for (const p of polygons) console.log(p.label, p.area, units, p.footprint.length)
77
+ * ```
78
+ */
79
+ abstract listPolygons(): PluginApiReturn<PluginProgramSiteListPolygonsResult>;
80
+ /**
81
+ * List the site parcels as geographic latitude/longitude rings.
82
+ *
83
+ * Only available when the project is geo-located on terrain; returns `[]` (no
84
+ * rings) otherwise. Use {@linkcode PluginProgramSiteApi.listPolygons} for the
85
+ * scene-coordinate footprints that are always available.
86
+ *
87
+ * @returns A {@linkcode PluginProgramSiteListGeoPolygonsResult} with one ring
88
+ * of `{ lat, lng, alt }` points per parcel.
89
+ *
90
+ * @examplePrompt Give me the site polygons in latitude and longitude
91
+ * @examplePrompt Export the plot boundary as geo-coordinates
92
+ * @examplePrompt Where is the site located geographically?
93
+ * @examplePrompt Get the site parcels as lat/long rings
94
+ *
95
+ * # Example
96
+ * ```ts
97
+ * const { polygons } = await snaptrude.program.site.listGeoPolygons()
98
+ * const firstRing = polygons[0] // [{ lat, lng, alt }, ...]
99
+ * ```
100
+ */
101
+ abstract listGeoPolygons(): PluginApiReturn<PluginProgramSiteListGeoPolygonsResult>;
102
+ /**
103
+ * Get the geo-referenced terrain context of the site.
104
+ *
105
+ * The map center and bounds, the terrain size in metres, the effective zoom,
106
+ * and each parcel's geographic footprint and area — the context used for site
107
+ * analysis. Returns `null` when the project is not geo-located on terrain.
108
+ *
109
+ * @returns A {@linkcode PluginProgramSiteContext}, or `null`.
110
+ *
111
+ * @examplePrompt What's the site's map center and bounds?
112
+ * @examplePrompt How wide is the terrain in metres?
113
+ * @examplePrompt Give me the parcel geometry and areas
114
+ * @examplePrompt Where is the site located on the map?
115
+ *
116
+ * # Example
117
+ * ```ts
118
+ * const ctx = await snaptrude.program.site.getContext()
119
+ * if (ctx) console.log(ctx.center, ctx.widthInM)
120
+ * ```
121
+ */
122
+ abstract getContext(): PluginApiReturn<PluginProgramSiteContextResult>;
123
+ }
124
+ /**
125
+ * A 2D ground-plane point of a site parcel footprint, in scene coordinates
126
+ * (metres on the project's XZ plane).
127
+ *
128
+ * | Property | Type | Description |
129
+ * |---|---|---|
130
+ * | `x` | `number` | X coordinate (scene metres) |
131
+ * | `z` | `number` | Z coordinate (scene metres) |
132
+ */
133
+ export declare const PluginSiteFootprintPoint: z.ZodObject<{
134
+ x: z.ZodNumber;
135
+ z: z.ZodNumber;
136
+ }, z.core.$strip>;
137
+ export type PluginSiteFootprintPoint = z.infer<typeof PluginSiteFootprintPoint>;
138
+ /**
139
+ * A geographic point of a site parcel ring (WGS84).
140
+ *
141
+ * | Property | Type | Description |
142
+ * |---|---|---|
143
+ * | `lat` | `number` | Latitude (degrees) |
144
+ * | `lng` | `number` | Longitude (degrees) |
145
+ * | `alt` | `number` | Altitude (metres) |
146
+ */
147
+ export declare const PluginSiteGeoPoint: z.ZodObject<{
148
+ lat: z.ZodNumber;
149
+ lng: z.ZodNumber;
150
+ alt: z.ZodNumber;
151
+ }, z.core.$strip>;
152
+ export type PluginSiteGeoPoint = z.infer<typeof PluginSiteGeoPoint>;
153
+ /**
154
+ * A single site parcel/polygon. Its `area` is in the enclosing result's `units`.
155
+ *
156
+ * | Property | Type | Description |
157
+ * |---|---|---|
158
+ * | `id` | `string` | Unique parcel/component id |
159
+ * | `area` | `number` | Footprint area, in the result's `units` |
160
+ * | `label` | `string` | Parcel label / room type (e.g. `"site"`) |
161
+ * | `footprint` | {@linkcode PluginSiteFootprintPoint}`[]` | 2D ground-plane boundary points |
162
+ */
163
+ export declare const PluginSitePolygon: z.ZodObject<{
164
+ id: z.ZodString;
165
+ area: z.ZodNumber;
166
+ label: z.ZodString;
167
+ footprint: z.ZodArray<z.ZodObject<{
168
+ x: z.ZodNumber;
169
+ z: z.ZodNumber;
170
+ }, z.core.$strip>>;
171
+ }, z.core.$strip>;
172
+ export type PluginSitePolygon = z.infer<typeof PluginSitePolygon>;
173
+ /**
174
+ * Result of {@linkcode PluginProgramSiteApi.get}. Per the area-units convention,
175
+ * `units` sits on this snapshot and every `area` below is reported in it.
176
+ *
177
+ * | Property | Type | Description |
178
+ * |---|---|---|
179
+ * | `units` | `"ft2" \| "m2"` | The unit all areas in this snapshot are reported in |
180
+ * | `totalArea` | `number` | Total area of all site parcels |
181
+ * | `polygonCount` | `number` | Number of site parcels |
182
+ * | `polygons` | {@linkcode PluginSitePolygon}`[]` | Each site parcel with its footprint |
183
+ */
184
+ export declare const PluginProgramSiteSnapshot: z.ZodObject<{
185
+ units: z.ZodEnum<{
186
+ ft2: "ft2";
187
+ m2: "m2";
188
+ }>;
189
+ totalArea: z.ZodNumber;
190
+ polygonCount: z.ZodNumber;
191
+ polygons: z.ZodArray<z.ZodObject<{
192
+ id: z.ZodString;
193
+ area: z.ZodNumber;
194
+ label: z.ZodString;
195
+ footprint: z.ZodArray<z.ZodObject<{
196
+ x: z.ZodNumber;
197
+ z: z.ZodNumber;
198
+ }, z.core.$strip>>;
199
+ }, z.core.$strip>>;
200
+ }, z.core.$strip>;
201
+ export type PluginProgramSiteSnapshot = z.infer<typeof PluginProgramSiteSnapshot>;
202
+ /**
203
+ * Result of {@linkcode PluginProgramSiteApi.getArea}.
204
+ *
205
+ * | Property | Type | Description |
206
+ * |---|---|---|
207
+ * | `units` | `"ft2" \| "m2"` | The unit `area` is reported in |
208
+ * | `area` | `number` | Total site area |
209
+ */
210
+ export declare const PluginProgramSiteAreaResult: z.ZodObject<{
211
+ units: z.ZodEnum<{
212
+ ft2: "ft2";
213
+ m2: "m2";
214
+ }>;
215
+ area: z.ZodNumber;
216
+ }, z.core.$strip>;
217
+ export type PluginProgramSiteAreaResult = z.infer<typeof PluginProgramSiteAreaResult>;
218
+ /**
219
+ * Result of {@linkcode PluginProgramSiteApi.listPolygons}. `units` sits on the
220
+ * response; each parcel's `area` is in it.
221
+ *
222
+ * | Property | Type | Description |
223
+ * |---|---|---|
224
+ * | `units` | `"ft2" \| "m2"` | The unit every parcel `area` is reported in |
225
+ * | `polygons` | {@linkcode PluginSitePolygon}`[]` | All site parcels |
226
+ */
227
+ export declare const PluginProgramSiteListPolygonsResult: z.ZodObject<{
228
+ units: z.ZodEnum<{
229
+ ft2: "ft2";
230
+ m2: "m2";
231
+ }>;
232
+ polygons: z.ZodArray<z.ZodObject<{
233
+ id: z.ZodString;
234
+ area: z.ZodNumber;
235
+ label: z.ZodString;
236
+ footprint: z.ZodArray<z.ZodObject<{
237
+ x: z.ZodNumber;
238
+ z: z.ZodNumber;
239
+ }, z.core.$strip>>;
240
+ }, z.core.$strip>>;
241
+ }, z.core.$strip>;
242
+ export type PluginProgramSiteListPolygonsResult = z.infer<typeof PluginProgramSiteListPolygonsResult>;
243
+ /**
244
+ * Result of {@linkcode PluginProgramSiteApi.listGeoPolygons} — one ring of
245
+ * geographic points per parcel (`[]` when the project is not geo-located).
246
+ *
247
+ * | Property | Type | Description |
248
+ * |---|---|---|
249
+ * | `polygons` | {@linkcode PluginSiteGeoPoint}`[][]` | One ring per parcel; each ring is a list of geographic points |
250
+ */
251
+ export declare const PluginProgramSiteListGeoPolygonsResult: z.ZodObject<{
252
+ polygons: z.ZodArray<z.ZodArray<z.ZodObject<{
253
+ lat: z.ZodNumber;
254
+ lng: z.ZodNumber;
255
+ alt: z.ZodNumber;
256
+ }, z.core.$strip>>>;
257
+ }, z.core.$strip>;
258
+ export type PluginProgramSiteListGeoPolygonsResult = z.infer<typeof PluginProgramSiteListGeoPolygonsResult>;
259
+ /**
260
+ * A geographic latitude/longitude point (no altitude).
261
+ *
262
+ * | Property | Type | Description |
263
+ * |---|---|---|
264
+ * | `lat` | `number` | Latitude (degrees) |
265
+ * | `lng` | `number` | Longitude (degrees) |
266
+ */
267
+ export declare const PluginSiteLatLng: z.ZodObject<{
268
+ lat: z.ZodNumber;
269
+ lng: z.ZodNumber;
270
+ }, z.core.$strip>;
271
+ export type PluginSiteLatLng = z.infer<typeof PluginSiteLatLng>;
272
+ /**
273
+ * Geographic bounds of the site terrain.
274
+ *
275
+ * | Property | Type | Description |
276
+ * |---|---|---|
277
+ * | `north` | `number` | North latitude |
278
+ * | `south` | `number` | South latitude |
279
+ * | `east` | `number` | East longitude |
280
+ * | `west` | `number` | West longitude |
281
+ */
282
+ export declare const PluginSiteBounds: z.ZodObject<{
283
+ north: z.ZodNumber;
284
+ south: z.ZodNumber;
285
+ east: z.ZodNumber;
286
+ west: z.ZodNumber;
287
+ }, z.core.$strip>;
288
+ export type PluginSiteBounds = z.infer<typeof PluginSiteBounds>;
289
+ /**
290
+ * A site parcel in the terrain context — geographic footprint and area.
291
+ *
292
+ * | Property | Type | Description |
293
+ * |---|---|---|
294
+ * | `footprint` | {@linkcode PluginSiteLatLng}`[]` | Geographic boundary points |
295
+ * | `area` | `number` | Parcel area (project area units) |
296
+ */
297
+ export declare const PluginSiteContextParcel: z.ZodObject<{
298
+ footprint: z.ZodArray<z.ZodObject<{
299
+ lat: z.ZodNumber;
300
+ lng: z.ZodNumber;
301
+ }, z.core.$strip>>;
302
+ area: z.ZodNumber;
303
+ }, z.core.$strip>;
304
+ export type PluginSiteContextParcel = z.infer<typeof PluginSiteContextParcel>;
305
+ /**
306
+ * The geo-referenced terrain context of the site.
307
+ *
308
+ * | Property | Type | Description |
309
+ * |---|---|---|
310
+ * | `center` | {@linkcode PluginSiteLatLng} | Map center |
311
+ * | `bounds` | {@linkcode PluginSiteBounds} | Terrain bounds |
312
+ * | `widthInM` | `number` | Terrain width in metres |
313
+ * | `heightInM` | `number` | Terrain height in metres |
314
+ * | `zoom` | `number` | Effective map zoom |
315
+ * | `parcels` | {@linkcode PluginSiteContextParcel}`[]` | Site parcels with geographic footprints |
316
+ */
317
+ export declare const PluginProgramSiteContext: z.ZodObject<{
318
+ center: z.ZodObject<{
319
+ lat: z.ZodNumber;
320
+ lng: z.ZodNumber;
321
+ }, z.core.$strip>;
322
+ bounds: z.ZodObject<{
323
+ north: z.ZodNumber;
324
+ south: z.ZodNumber;
325
+ east: z.ZodNumber;
326
+ west: z.ZodNumber;
327
+ }, z.core.$strip>;
328
+ widthInM: z.ZodNumber;
329
+ heightInM: z.ZodNumber;
330
+ zoom: z.ZodNumber;
331
+ parcels: z.ZodArray<z.ZodObject<{
332
+ footprint: z.ZodArray<z.ZodObject<{
333
+ lat: z.ZodNumber;
334
+ lng: z.ZodNumber;
335
+ }, z.core.$strip>>;
336
+ area: z.ZodNumber;
337
+ }, z.core.$strip>>;
338
+ }, z.core.$strip>;
339
+ export type PluginProgramSiteContext = z.infer<typeof PluginProgramSiteContext>;
340
+ /**
341
+ * Result of {@linkcode PluginProgramSiteApi.getContext} — the terrain context, or
342
+ * `null` when the project is not geo-located.
343
+ */
344
+ export declare const PluginProgramSiteContextResult: z.ZodNullable<z.ZodObject<{
345
+ center: z.ZodObject<{
346
+ lat: z.ZodNumber;
347
+ lng: z.ZodNumber;
348
+ }, z.core.$strip>;
349
+ bounds: z.ZodObject<{
350
+ north: z.ZodNumber;
351
+ south: z.ZodNumber;
352
+ east: z.ZodNumber;
353
+ west: z.ZodNumber;
354
+ }, z.core.$strip>;
355
+ widthInM: z.ZodNumber;
356
+ heightInM: z.ZodNumber;
357
+ zoom: z.ZodNumber;
358
+ parcels: z.ZodArray<z.ZodObject<{
359
+ footprint: z.ZodArray<z.ZodObject<{
360
+ lat: z.ZodNumber;
361
+ lng: z.ZodNumber;
362
+ }, z.core.$strip>>;
363
+ area: z.ZodNumber;
364
+ }, z.core.$strip>>;
365
+ }, z.core.$strip>>;
366
+ export type PluginProgramSiteContextResult = z.infer<typeof PluginProgramSiteContextResult>;
367
+ //# sourceMappingURL=site.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"site.d.ts","sourceRoot":"","sources":["../../../src/api/program/site.ts"],"names":[],"mappings":"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"}