@snaptrude/plugin-core 0.5.0 → 0.7.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 (134) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/api-manifest.full.json +2644 -542
  3. package/api-manifest.json +2606 -424
  4. package/dist/api/analysis/heatmaps.d.ts +234 -0
  5. package/dist/api/analysis/heatmaps.d.ts.map +1 -0
  6. package/dist/api/analysis/illuminance.d.ts +145 -0
  7. package/dist/api/analysis/illuminance.d.ts.map +1 -0
  8. package/dist/api/analysis/index.d.ts +44 -0
  9. package/dist/api/analysis/index.d.ts.map +1 -0
  10. package/dist/api/analysis/shadows.d.ts +165 -0
  11. package/dist/api/analysis/shadows.d.ts.map +1 -0
  12. package/dist/api/analysis/sunlightHours.d.ts +208 -0
  13. package/dist/api/analysis/sunlightHours.d.ts.map +1 -0
  14. package/dist/api/analysis/sunpath.d.ts +80 -0
  15. package/dist/api/analysis/sunpath.d.ts.map +1 -0
  16. package/dist/api/core/index.d.ts +10 -0
  17. package/dist/api/core/index.d.ts.map +1 -1
  18. package/dist/api/core/io/import/index.d.ts +392 -0
  19. package/dist/api/core/io/import/index.d.ts.map +1 -0
  20. package/dist/api/core/io/index.d.ts +35 -0
  21. package/dist/api/core/io/index.d.ts.map +1 -0
  22. package/dist/api/core/io/job/index.d.ts +139 -0
  23. package/dist/api/core/io/job/index.d.ts.map +1 -0
  24. package/dist/api/core/io/query/index.d.ts +74 -0
  25. package/dist/api/core/io/query/index.d.ts.map +1 -0
  26. package/dist/api/core/io/terrain/index.d.ts +206 -0
  27. package/dist/api/core/io/terrain/index.d.ts.map +1 -0
  28. package/dist/api/core/io/underlay/index.d.ts +286 -0
  29. package/dist/api/core/io/underlay/index.d.ts.map +1 -0
  30. package/dist/api/core/layers.d.ts +7 -7
  31. package/dist/api/core/proposals/index.d.ts +475 -0
  32. package/dist/api/core/proposals/index.d.ts.map +1 -0
  33. package/dist/api/design/create/index.d.ts +218 -0
  34. package/dist/api/design/create/index.d.ts.map +1 -1
  35. package/dist/api/design/doors/index.d.ts +159 -0
  36. package/dist/api/design/doors/index.d.ts.map +1 -1
  37. package/dist/api/design/furniture/index.d.ts +34 -5
  38. package/dist/api/design/furniture/index.d.ts.map +1 -1
  39. package/dist/api/design/index.d.ts +83 -0
  40. package/dist/api/design/index.d.ts.map +1 -1
  41. package/dist/api/design/lock.d.ts +26 -0
  42. package/dist/api/design/lock.d.ts.map +1 -1
  43. package/dist/api/design/materials/index.d.ts +159 -2
  44. package/dist/api/design/materials/index.d.ts.map +1 -1
  45. package/dist/api/design/query/index.d.ts +115 -5
  46. package/dist/api/design/query/index.d.ts.map +1 -1
  47. package/dist/api/design/query/spaces.d.ts +3 -3
  48. package/dist/api/design/selection/index.d.ts +144 -0
  49. package/dist/api/design/selection/index.d.ts.map +1 -1
  50. package/dist/api/design/transform/index.d.ts +83 -2
  51. package/dist/api/design/transform/index.d.ts.map +1 -1
  52. package/dist/api/design/update/index.d.ts +168 -0
  53. package/dist/api/design/update/index.d.ts.map +1 -1
  54. package/dist/api/design/windows/index.d.ts +113 -2
  55. package/dist/api/design/windows/index.d.ts.map +1 -1
  56. package/dist/api/entity/space.d.ts +2 -2
  57. package/dist/api/entity/story.d.ts +101 -7
  58. package/dist/api/entity/story.d.ts.map +1 -1
  59. package/dist/api/index.d.ts +5 -0
  60. package/dist/api/index.d.ts.map +1 -1
  61. package/dist/api/presentation/import.d.ts +49 -4
  62. package/dist/api/presentation/import.d.ts.map +1 -1
  63. package/dist/api/presentation/views.d.ts +210 -5
  64. package/dist/api/presentation/views.d.ts.map +1 -1
  65. package/dist/api/program/areas.d.ts +42 -12
  66. package/dist/api/program/areas.d.ts.map +1 -1
  67. package/dist/api/program/index.d.ts +3 -11
  68. package/dist/api/program/index.d.ts.map +1 -1
  69. package/dist/api/program/layout.d.ts +186 -11
  70. package/dist/api/program/layout.d.ts.map +1 -1
  71. package/dist/api/program/site.d.ts +84 -0
  72. package/dist/api/program/site.d.ts.map +1 -1
  73. package/dist/errors/codes.d.ts +34 -0
  74. package/dist/errors/codes.d.ts.map +1 -0
  75. package/dist/errors/envelope.d.ts +56 -0
  76. package/dist/errors/envelope.d.ts.map +1 -0
  77. package/dist/errors/index.d.ts +6 -0
  78. package/dist/errors/index.d.ts.map +1 -0
  79. package/dist/errors/plugin-error.d.ts +69 -0
  80. package/dist/errors/plugin-error.d.ts.map +1 -0
  81. package/dist/handles.d.ts +33 -0
  82. package/dist/handles.d.ts.map +1 -1
  83. package/dist/host-utils.d.ts +4 -0
  84. package/dist/host-utils.d.ts.map +1 -1
  85. package/dist/index.cjs +1942 -998
  86. package/dist/index.cjs.map +1 -1
  87. package/dist/index.d.ts +1 -0
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +1810 -994
  90. package/dist/index.js.map +1 -1
  91. package/package.json +2 -1
  92. package/scripts/generate-manifest.test.mjs +103 -4
  93. package/src/api/analysis/heatmaps.ts +256 -0
  94. package/src/api/analysis/illuminance.ts +155 -0
  95. package/src/api/analysis/index.ts +46 -0
  96. package/src/api/analysis/shadows.ts +183 -0
  97. package/src/api/analysis/sunlightHours.ts +211 -0
  98. package/src/api/analysis/sunpath.ts +83 -0
  99. package/src/api/core/index.ts +10 -0
  100. package/src/api/core/io/import/index.ts +432 -0
  101. package/src/api/core/io/index.ts +37 -0
  102. package/src/api/core/io/job/index.ts +140 -0
  103. package/src/api/core/io/query/index.ts +71 -0
  104. package/src/api/core/io/terrain/index.ts +214 -0
  105. package/src/api/core/io/underlay/index.ts +295 -0
  106. package/src/api/core/proposals/index.ts +509 -0
  107. package/src/api/design/create/index.ts +258 -0
  108. package/src/api/design/doors/index.ts +168 -0
  109. package/src/api/design/erase/index.ts +1 -1
  110. package/src/api/design/furniture/index.ts +36 -5
  111. package/src/api/design/index.ts +87 -0
  112. package/src/api/design/lock.ts +27 -0
  113. package/src/api/design/materials/index.ts +182 -2
  114. package/src/api/design/query/index.ts +81 -0
  115. package/src/api/design/selection/index.ts +129 -0
  116. package/src/api/design/transform/index.ts +74 -2
  117. package/src/api/design/update/index.ts +167 -0
  118. package/src/api/design/windows/index.ts +128 -2
  119. package/src/api/entity/story.ts +105 -7
  120. package/src/api/index.ts +5 -0
  121. package/src/api/presentation/import.ts +45 -4
  122. package/src/api/presentation/views.ts +221 -5
  123. package/src/api/program/areas.ts +34 -12
  124. package/src/api/program/index.ts +3 -11
  125. package/src/api/program/layout.ts +195 -11
  126. package/src/api/program/site.ts +93 -0
  127. package/src/errors/codes.ts +136 -0
  128. package/src/errors/envelope.ts +75 -0
  129. package/src/errors/index.ts +21 -0
  130. package/src/errors/plugin-error.ts +134 -0
  131. package/src/handles.ts +46 -0
  132. package/src/host-utils.ts +4 -0
  133. package/src/index.ts +1 -0
  134. package/test/errors.test.mjs +184 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,78 @@
1
1
  # @snaptrude/plugin-core
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e1915e4: Plugin API 0.7.0 — new families and methods (supersedes the cancelled `design.update.setLabel` 0.6.1 patch, now folded in).
8
+ - **`core.proposals.*`** — design options as infrastructure: `list` / `get` / `getActive` / `listForComponent` / `isActive` (reads) plus `create` / `rename` / `setActive` / `delete` (non-undoable writes).
9
+ - **`program.layout.*`** — the space-solver promoted to a real async-job family: `arrange` / `pack` now start a backend job and return immediately, with `getState` (poll) and `cancel`.
10
+ - **Door & window catalogs + placement** — `design.doors.*` / `design.windows.*` gain `listCatalogGroups` / `listCatalog` / `getCatalogItem` / `exists` (shared catalog DTOs), and `design.create.door` / `design.create.window` place a catalog item into a host wall.
11
+ - **`design.create.smartLayout`** — clone an in-scene template cluster into one or more target spaces in a single undo batch.
12
+ - **Furniture categories** — `design.furniture.listCategories` plus a `category` filter on `listCatalog`, and `thumbnailUrl` on catalog items.
13
+ - **`design.transform.align`** — snap components' bounding-box edges (left/right/center/top/bottom/middle), optionally to a reference.
14
+ - **Per-face materials** — `design.materials.applyToFaces` / `resetFaces` / `getByFace` / `listByFace` (BREP faces by durable index, visual-only).
15
+ - **Staircase params** — `design.query.getStaircaseParams` (read) and `design.update.staircase` (sparse parametric write).
16
+ - **Footprint-area lock** — `design.lockArea` / `unlockArea` / `isAreaLocked` / `listAreaLocked` for Room/Department spaces.
17
+ - **`entity.story.duplicate`** — duplicate a storey (or a subset) up/down, auto-creating the target storey.
18
+ - **`presentation.import.svg`** — import a guaranteed-vector SVG onto the Present sheet.
19
+ - **View display settings** — `presentation.views.getSettings` / `updateSettings` (background, color mode, axis, edges, labels).
20
+ - **`design.update.setLabel`** — set any component's panel Label (write pair of `design.query.getLabel`); undoable, lock-aware, validated.
21
+ - **`program.areas`** — area members now report their `areaClass` (`NET` / `GROSS` / `EXCLUDED`), with net/gross documented as the plain-English synonyms for carpet/built-up.
22
+ - **Typed plugin API errors** — every host failure now crosses the wire as a structured envelope instead of a flattened `Execution error: <msg>` string: a stable `code` from the shared plugin-core error registry, the offending handle, an authored `hint`, and `retryAfterMs` / `didYouMean` enrichment where applicable. Zod validation failures forward the first 10 issues, each projected to `{path, code, message}` (full count in `details.issueCount`); internal faults are sanitized and host-logged under an `errorId`. Every handler across the API surface now throws typed codes, each doc page gained an Errors section, and a drift test pins thrown code literals to the registry.
23
+
24
+ ## 0.6.0
25
+
26
+ ### Minor Changes
27
+
28
+ - 934405e: New `analysis.heatmaps` family — render plugin-computed scalar data as a
29
+ heatmap: `renderSpaces` (flat colour per space top face), `renderGrid`
30
+ (coloured grid mesh from world-coordinate samples), `reset`, `isActive`.
31
+ Single active heatmap (a render replaces the previous one); values outside
32
+ `[min, max]` clamp to the end colours; ephemeral (auto-cleared on
33
+ scene-mutating edits, never persisted). The react host has landed, so all
34
+ members are required `abstract` and in the discovery manifest.
35
+ - a68e866: New top-level `analysis` namespace:
36
+ `analysis.sunpath` (enable/disable/isActive), `analysis.shadows`
37
+ (enable/disable/isEnabled/setDateTime/getDateTime — ISO date-time strings),
38
+ and the async heatmap job families `analysis.sunlightHours` and
39
+ `analysis.illuminance` (compute/get/cancel/reset; illuminance is Pro-gated).
40
+ Also extends `program.site` with `getLocation()` and `getNorthAngle()` geo
41
+ reads. The react host has landed, so all new members are required `abstract`
42
+ and in the discovery manifest; the plugin-client mounts the `analysis` RPC
43
+ namespace.
44
+ - New `core.io` namespace — file import, import jobs, and underlay/terrain
45
+ management:
46
+ - `core.io.import` — bring external files onto a storey: `image`, `pdf`
47
+ (page-selectable), `dwg`, `cadJson` (parsed CAD geometry as a sketch),
48
+ `model` (3D formats), and `terrain` (map snapshot at a lat/lng with
49
+ optional elevation). Slow formats return an `ImportJobHandle` instead of
50
+ blocking.
51
+ - `core.io.job` — poll those imports: `getStatus`, `isComplete`, `getResult`,
52
+ `getError`.
53
+ - `core.io.query` — pre-import inspection: `getPdfPageCount`,
54
+ `listCadLayers`.
55
+ - `core.io.underlay` — manage imported image/PDF/CAD underlays: `list`,
56
+ `getBounds`, `getScale`/`setScale`/`resetScale`, `getOpacity`/`setOpacity`,
57
+ `delete`.
58
+ - `core.io.terrain` — manage the imported map terrain: `exists`, `get`,
59
+ `getDatum` (current vertical position, world Y) / `setDatum` (relative
60
+ datum shift, not an absolute elevation), `delete`, `getReport`, elevation and satellite-imagery toggles
61
+ (`isElevationEnabled`/`enableElevation`/`disableElevation`,
62
+ `isSatelliteEnabled`/`enableSatellite`/`disableSatellite`), and
63
+ `getOpacity`/`setOpacity`.
64
+
65
+ - New `design.selection.setByFilter(filter)` — the programmatic equivalent of
66
+ the editor's **Story selection** and **Filter selection** menus. Replaces the
67
+ selection with every visible entity of the active building matching
68
+ `{ storeys?: number[], types?: PluginSelectionEntityType[] }` (fields AND,
69
+ values within a field OR; at least one field required — use `clear()` to
70
+ deselect). The new `PluginSelectionEntityType` vocabulary covers all 24 menu
71
+ kinds, including selection-only kinds the query surface can't reach (sites,
72
+ terrain, CAD/PDF/image imports, dimension lines, 3D models, neighborhood
73
+ buildings, program blocks). One-shot bulk select, not a persistent mode; not
74
+ undoable, like the other selection mutators.
75
+
3
76
  ## 0.5.0
4
77
 
5
78
  ### Minor Changes