@snaptrude/plugin-core 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/api-manifest.full.json +1350 -89
  3. package/api-manifest.json +826 -40
  4. package/dist/api/analysis/daylight.d.ts +603 -0
  5. package/dist/api/analysis/daylight.d.ts.map +1 -0
  6. package/dist/api/analysis/heatmaps.d.ts +438 -14
  7. package/dist/api/analysis/heatmaps.d.ts.map +1 -1
  8. package/dist/api/analysis/index.d.ts +15 -0
  9. package/dist/api/analysis/index.d.ts.map +1 -1
  10. package/dist/api/analysis/solar.d.ts +249 -0
  11. package/dist/api/analysis/solar.d.ts.map +1 -0
  12. package/dist/api/analysis/weather.d.ts +193 -0
  13. package/dist/api/analysis/weather.d.ts.map +1 -0
  14. package/dist/api/core/camera/index.d.ts +37 -0
  15. package/dist/api/core/camera/index.d.ts.map +1 -1
  16. package/dist/api/core/geom/create/index.d.ts +318 -1
  17. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  18. package/dist/api/core/index.d.ts +9 -0
  19. package/dist/api/core/index.d.ts.map +1 -1
  20. package/dist/api/core/io/export/index.d.ts +3 -1
  21. package/dist/api/core/io/export/index.d.ts.map +1 -1
  22. package/dist/api/core/io/import/index.d.ts +61 -0
  23. package/dist/api/core/io/import/index.d.ts.map +1 -1
  24. package/dist/api/core/mode/index.d.ts +99 -0
  25. package/dist/api/core/mode/index.d.ts.map +1 -0
  26. package/dist/api/core/storeys/index.d.ts +251 -0
  27. package/dist/api/core/storeys/index.d.ts.map +1 -0
  28. package/dist/api/core/tags.d.ts +24 -0
  29. package/dist/api/core/tags.d.ts.map +1 -1
  30. package/dist/api/core/zoom/index.d.ts +4 -0
  31. package/dist/api/core/zoom/index.d.ts.map +1 -1
  32. package/dist/api/design/create/index.d.ts +115 -4
  33. package/dist/api/design/create/index.d.ts.map +1 -1
  34. package/dist/api/design/delete/index.d.ts +3 -0
  35. package/dist/api/design/delete/index.d.ts.map +1 -1
  36. package/dist/api/design/query/geometry/index.d.ts +112 -0
  37. package/dist/api/design/query/geometry/index.d.ts.map +1 -1
  38. package/dist/api/design/query/index.d.ts +4 -0
  39. package/dist/api/design/query/index.d.ts.map +1 -1
  40. package/dist/api/design/query/referenceLines.d.ts +45 -0
  41. package/dist/api/design/query/referenceLines.d.ts.map +1 -0
  42. package/dist/api/design/query/spaces.d.ts +173 -0
  43. package/dist/api/design/query/spaces.d.ts.map +1 -1
  44. package/dist/api/design/transform/index.d.ts +12 -0
  45. package/dist/api/design/transform/index.d.ts.map +1 -1
  46. package/dist/api/design/update/index.d.ts +51 -1
  47. package/dist/api/design/update/index.d.ts.map +1 -1
  48. package/dist/api/entity/buildableEnvelope.d.ts +4 -0
  49. package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
  50. package/dist/api/entity/referenceLine.d.ts +8 -0
  51. package/dist/api/entity/referenceLine.d.ts.map +1 -1
  52. package/dist/api/entity/story.d.ts +20 -0
  53. package/dist/api/entity/story.d.ts.map +1 -1
  54. package/dist/api/index.d.ts +5 -0
  55. package/dist/api/index.d.ts.map +1 -1
  56. package/dist/api/presentation/export.d.ts +4 -0
  57. package/dist/api/presentation/export.d.ts.map +1 -1
  58. package/dist/api/presentation/import.d.ts +6 -0
  59. package/dist/api/presentation/import.d.ts.map +1 -1
  60. package/dist/api/presentation/index.d.ts +9 -0
  61. package/dist/api/presentation/index.d.ts.map +1 -1
  62. package/dist/api/presentation/placedViews.d.ts +370 -0
  63. package/dist/api/presentation/placedViews.d.ts.map +1 -0
  64. package/dist/api/presentation/shapes.d.ts +481 -0
  65. package/dist/api/presentation/shapes.d.ts.map +1 -0
  66. package/dist/api/program/site.d.ts +94 -0
  67. package/dist/api/program/site.d.ts.map +1 -1
  68. package/dist/api/program/spreadsheet.d.ts +260 -28
  69. package/dist/api/program/spreadsheet.d.ts.map +1 -1
  70. package/dist/api/workspace/index.d.ts +460 -0
  71. package/dist/api/workspace/index.d.ts.map +1 -0
  72. package/dist/index.cjs +2625 -1758
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.js +2515 -1758
  75. package/dist/index.js.map +1 -1
  76. package/package.json +3 -2
  77. package/scripts/generate-manifest.mjs +45 -0
  78. package/src/api/analysis/daylight.ts +470 -0
  79. package/src/api/analysis/heatmaps.ts +444 -17
  80. package/src/api/analysis/index.ts +15 -0
  81. package/src/api/analysis/solar.ts +237 -0
  82. package/src/api/analysis/weather.ts +179 -0
  83. package/src/api/core/camera/index.ts +39 -0
  84. package/src/api/core/geom/create/index.ts +344 -1
  85. package/src/api/core/index.ts +9 -0
  86. package/src/api/core/io/export/index.ts +3 -1
  87. package/src/api/core/io/import/index.ts +64 -0
  88. package/src/api/core/mode/index.ts +96 -0
  89. package/src/api/core/storeys/index.ts +279 -0
  90. package/src/api/core/tags.ts +27 -0
  91. package/src/api/core/zoom/index.ts +4 -0
  92. package/src/api/design/create/index.ts +138 -1
  93. package/src/api/design/delete/index.ts +3 -0
  94. package/src/api/design/query/geometry/index.ts +125 -3
  95. package/src/api/design/query/index.ts +4 -0
  96. package/src/api/design/query/referenceLines.ts +52 -0
  97. package/src/api/design/query/spaces.ts +143 -0
  98. package/src/api/design/transform/index.ts +12 -0
  99. package/src/api/design/update/index.ts +66 -1
  100. package/src/api/entity/buildableEnvelope.ts +4 -0
  101. package/src/api/entity/referenceLine.ts +8 -0
  102. package/src/api/entity/story.ts +20 -0
  103. package/src/api/index.ts +5 -0
  104. package/src/api/presentation/export.ts +4 -0
  105. package/src/api/presentation/import.ts +6 -0
  106. package/src/api/presentation/index.ts +9 -0
  107. package/src/api/presentation/placedViews.ts +363 -0
  108. package/src/api/presentation/shapes.ts +274 -0
  109. package/src/api/program/site.ts +95 -0
  110. package/src/api/program/spreadsheet.ts +251 -6
  111. package/src/api/workspace/index.ts +516 -0
package/CHANGELOG.md CHANGED
@@ -1,12 +1,27 @@
1
1
  # @snaptrude/plugin-core
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Plugin API 0.9.0 — namespace reorganization (deprecate-in-place, nothing breaks), the analysis wave, and the spreadsheet data lane.
8
+ - **Namespace map** — `entity.*` retired via aliases (storeys → `core.storeys`, reference lines / buildable envelopes → `design.*`), `core.zoom` → `core.camera`, `core.tags.getTagsForComponent` → `core.tags.listForComponent`, new `workspace.*` (projects/teams) and `core.mode` top-levels. Every deprecated path still works and delegates to its canonical implementation.
9
+ - **Analysis wave** — `analysis.weather.getSeries` (hourly EPW rows + station metadata + quality flags), `analysis.solar.sampleGrid` (per-point GPU-raytraced visibility/shade/SVF/irradiance), `analysis.daylight.compute` (LM-83 numeric ASE + sDA with full provenance — see the sDA entry below), `program.site.getWeather`/`getTimezone`, `.epw` import + project weather override via `core.io.import`.
10
+ - **sDA (LM-83 Spatial Daylight Autonomy)** — `analysis.daylight` now computes real sDA300/50% with dynamic blind operation (LM-83 2% rule, 5% diffuse closed-blind default) via Radiance. Runs including `"sDA"` are asynchronous: `compute` returns `{ status: "running", runId }` and the new `analysis.daylight.poll({ runId, cursor? })` fetches results; ASE-only runs stay synchronous and unchanged. New optional `optics` arg overrides surface optics per material (keyed by Snaptrude material name) or per category, over LM-83/convention defaults (wall 0.5 / ceiling 0.7 / floor 0.2 / furniture 0.5 / glazing Tvis 0.65 / context 0.2); glazing takes visible transmittance (Tvis), converted to Radiance transmissivity backend-side. Sensor records gain `da300Percent`/`sdaPass`, aggregates gain `sdaPercent`, results gain `runId`, and the ASE fields (`directSunHoursAtOrAbove1000Lux`/`aseFail`/`asePercent`) are now optional — present when ASE is requested.
11
+ - **Heatmaps** — named overlays (up to 16, `analysis.heatmaps.overlays.*`), `renderField` arbitrary cell geometry, `renderSurfaceGrid` façade grids, discrete/threshold/categorical scales, hover tooltips.
12
+ - **Geometry reads** — `design.query.geometry.getTriangulatedMeshes` (world-space triangles, optional per-triangle `materialIds` and B-rep `faceIds`), `design.query.spaces.getEnclosure` (geometric v1).
13
+ - **Spreadsheet data lane** — `program.spreadsheet.datasets.{set, list}` (plugin datasets, upsert + auto-refresh of bound ranges), binding `source` widened to `{ dataset: "takeoff" } | { dataset: "plugin", name }` (takeoff unchanged), `addImage` (data-URI floating pictures, stable-name replace-on-rerun), `addChart` accepts the ratified `"column"`/`"bar"` enum on the wire.
14
+ - **Presentation** — `presentation.shapes` keyed shape lifecycle on Present sheets (`upsert`/`remove`/`removeAll`/`list`).
15
+ - **Constructive geometry (brep kernel)** — the full `core.geom.create.brepFrom*` constructor family minting `BrepHandle`s at authored coordinates: `brepFromFaces` (plain face-point loops; host validates welding, planarity, edge coherence and fixes global orientation), `brepFromExtrusion` (prisms along any direction, holes + arc profiles), `brepFromLoft` (tapered solids between two contours; lofts producing non-planar side faces are rejected), `brepFromMesh` (indexed vertex + face-index input), and the OpenCascade booleans `brepFromUnion` / `brepFromSubtraction` (`a` minus `b`) / `brepFromIntersection` (scene-derived `getBrep` handles accepted as read-only inputs; empty/disjoint results throw typed VALIDATION).
16
+ - **`design.create.massFromBrep(brep, label?)`** — commit a mass from any `core.geom.create` brep constructor's handle (scene-derived breps stay read-only): generic mass at authored coordinates, single undo step, collab-synced.
17
+ - **`presentation.placedViews`** — layout control over placed views (`list`/`get`/`move`/`scale`/`setScale`/`setCrop`): sheet-local position, size, architectural scale, rotation, crop and link state; uniform corner-drag-equivalent `scale`, Scale-dropdown `setScale` (2D only), native crop fractions with page-anchored visible region — crop survives `sheets.updatePlacedView` refreshes.
18
+
3
19
  ## 0.8.0
4
20
 
5
21
  ### Minor Changes
6
22
 
7
23
  - More additions to the APIs, infra changes.
8
24
  - Plugin API 0.8.0 — the 0.8 API wave, handle lifecycle, events, and geometry/data-integrity fixes.
9
-
10
25
  - **The 0.8 API wave** — model/presentation **export** (`core.io.export`, `presentation.export`), **element editing** widenings on `design.update`/`design.edit`, **`core.camera.*`**, **storey management**, **`design.visibility.*`**, **dimensions**, **locale/user** reads (`core.user`), `design.types.list`, presentation annotate, plus completeness widenings across existing families. The discovery manifest grows from 423 to 595 method paths (including the new `core.handles.*` lifecycle below).
11
26
  - **Events** — `model:changed` subscription contract: debounced model-change notifications delivered to the plugin worker for user and plugin edits alike (client API: `PluginWorker.subscribe`). `selection:changed`, `tool:activated`, `project:saved`, `view:changed` are reserved names, not yet emitted.
12
27
  - **BREAKING — `program.site` footprints are world Snaptrude units.** Previously the only plan-geometry read scaled to scene metres (×0.254), so site parcels could not be overlaid on `planPoints`. Now the same world XZ plan space as every other plan read; areas and the geographic reads are unchanged.