@snaptrude/plugin-core 0.6.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 (83) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/api-manifest.full.json +511 -10
  3. package/api-manifest.json +529 -4
  4. package/dist/api/core/index.d.ts +5 -0
  5. package/dist/api/core/index.d.ts.map +1 -1
  6. package/dist/api/core/proposals/index.d.ts +475 -0
  7. package/dist/api/core/proposals/index.d.ts.map +1 -0
  8. package/dist/api/design/create/index.d.ts +209 -0
  9. package/dist/api/design/create/index.d.ts.map +1 -1
  10. package/dist/api/design/doors/index.d.ts +159 -0
  11. package/dist/api/design/doors/index.d.ts.map +1 -1
  12. package/dist/api/design/furniture/index.d.ts +34 -5
  13. package/dist/api/design/furniture/index.d.ts.map +1 -1
  14. package/dist/api/design/index.d.ts +83 -0
  15. package/dist/api/design/index.d.ts.map +1 -1
  16. package/dist/api/design/lock.d.ts +26 -0
  17. package/dist/api/design/lock.d.ts.map +1 -1
  18. package/dist/api/design/materials/index.d.ts +159 -2
  19. package/dist/api/design/materials/index.d.ts.map +1 -1
  20. package/dist/api/design/query/index.d.ts +115 -5
  21. package/dist/api/design/query/index.d.ts.map +1 -1
  22. package/dist/api/design/selection/index.d.ts +2 -2
  23. package/dist/api/design/transform/index.d.ts +83 -2
  24. package/dist/api/design/transform/index.d.ts.map +1 -1
  25. package/dist/api/design/update/index.d.ts +168 -0
  26. package/dist/api/design/update/index.d.ts.map +1 -1
  27. package/dist/api/design/windows/index.d.ts +113 -2
  28. package/dist/api/design/windows/index.d.ts.map +1 -1
  29. package/dist/api/entity/story.d.ts +101 -7
  30. package/dist/api/entity/story.d.ts.map +1 -1
  31. package/dist/api/presentation/import.d.ts +49 -4
  32. package/dist/api/presentation/import.d.ts.map +1 -1
  33. package/dist/api/presentation/views.d.ts +210 -5
  34. package/dist/api/presentation/views.d.ts.map +1 -1
  35. package/dist/api/program/areas.d.ts +42 -12
  36. package/dist/api/program/areas.d.ts.map +1 -1
  37. package/dist/api/program/index.d.ts +3 -11
  38. package/dist/api/program/index.d.ts.map +1 -1
  39. package/dist/api/program/layout.d.ts +186 -11
  40. package/dist/api/program/layout.d.ts.map +1 -1
  41. package/dist/errors/codes.d.ts +34 -0
  42. package/dist/errors/codes.d.ts.map +1 -0
  43. package/dist/errors/envelope.d.ts +56 -0
  44. package/dist/errors/envelope.d.ts.map +1 -0
  45. package/dist/errors/index.d.ts +6 -0
  46. package/dist/errors/index.d.ts.map +1 -0
  47. package/dist/errors/plugin-error.d.ts +69 -0
  48. package/dist/errors/plugin-error.d.ts.map +1 -0
  49. package/dist/host-utils.d.ts +4 -0
  50. package/dist/host-utils.d.ts.map +1 -1
  51. package/dist/index.cjs +1624 -1028
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.d.ts +1 -0
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +1546 -1025
  56. package/dist/index.js.map +1 -1
  57. package/package.json +2 -1
  58. package/scripts/generate-manifest.test.mjs +77 -0
  59. package/src/api/core/index.ts +5 -0
  60. package/src/api/core/proposals/index.ts +509 -0
  61. package/src/api/design/create/index.ts +249 -0
  62. package/src/api/design/doors/index.ts +168 -0
  63. package/src/api/design/furniture/index.ts +36 -5
  64. package/src/api/design/index.ts +87 -0
  65. package/src/api/design/lock.ts +27 -0
  66. package/src/api/design/materials/index.ts +182 -2
  67. package/src/api/design/query/index.ts +81 -0
  68. package/src/api/design/transform/index.ts +74 -2
  69. package/src/api/design/update/index.ts +167 -0
  70. package/src/api/design/windows/index.ts +128 -2
  71. package/src/api/entity/story.ts +105 -7
  72. package/src/api/presentation/import.ts +45 -4
  73. package/src/api/presentation/views.ts +221 -5
  74. package/src/api/program/areas.ts +34 -12
  75. package/src/api/program/index.ts +3 -11
  76. package/src/api/program/layout.ts +195 -11
  77. package/src/errors/codes.ts +136 -0
  78. package/src/errors/envelope.ts +75 -0
  79. package/src/errors/index.ts +21 -0
  80. package/src/errors/plugin-error.ts +134 -0
  81. package/src/host-utils.ts +4 -0
  82. package/src/index.ts +1 -0
  83. package/test/errors.test.mjs +184 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
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
+
3
24
  ## 0.6.0
4
25
 
5
26
  ### Minor Changes