@snaptrude/plugin-core 1.0.2 → 1.0.4

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 (106) hide show
  1. package/AGENTS.md +17 -0
  2. package/CHANGELOG.md +12 -0
  3. package/api-manifest.json +130 -2098
  4. package/dist/api/core/camera/index.d.ts +16 -6
  5. package/dist/api/core/camera/index.d.ts.map +1 -1
  6. package/dist/api/core/comment/index.d.ts +7 -3
  7. package/dist/api/core/comment/index.d.ts.map +1 -1
  8. package/dist/api/core/geom/create/index.d.ts +69 -21
  9. package/dist/api/core/geom/create/index.d.ts.map +1 -1
  10. package/dist/api/core/geom/query/circle.d.ts +31 -11
  11. package/dist/api/core/geom/query/circle.d.ts.map +1 -1
  12. package/dist/api/core/geom/query/contour.d.ts +19 -7
  13. package/dist/api/core/geom/query/contour.d.ts.map +1 -1
  14. package/dist/api/core/geom/query/curve.d.ts +72 -24
  15. package/dist/api/core/geom/query/curve.d.ts.map +1 -1
  16. package/dist/api/core/geom/query/profile.d.ts +19 -7
  17. package/dist/api/core/geom/query/profile.d.ts.map +1 -1
  18. package/dist/api/core/geom/update/contour.d.ts +36 -12
  19. package/dist/api/core/geom/update/contour.d.ts.map +1 -1
  20. package/dist/api/core/geom/update/curve.d.ts +13 -5
  21. package/dist/api/core/geom/update/curve.d.ts.map +1 -1
  22. package/dist/api/core/geom/update/profile.d.ts +36 -12
  23. package/dist/api/core/geom/update/profile.d.ts.map +1 -1
  24. package/dist/api/core/io/import/index.d.ts +7 -3
  25. package/dist/api/core/io/import/index.d.ts.map +1 -1
  26. package/dist/api/core/math/quat.d.ts +2 -2
  27. package/dist/api/core/math/quat.d.ts.map +1 -1
  28. package/dist/api/core/math/vec3.d.ts +15 -15
  29. package/dist/api/core/math/vec3.d.ts.map +1 -1
  30. package/dist/api/core/storeys/index.d.ts +5 -0
  31. package/dist/api/core/storeys/index.d.ts.map +1 -1
  32. package/dist/api/design/boolean/index.d.ts +20 -4
  33. package/dist/api/design/boolean/index.d.ts.map +1 -1
  34. package/dist/api/design/create/bulk-items.d.ts +88 -17
  35. package/dist/api/design/create/bulk-items.d.ts.map +1 -1
  36. package/dist/api/design/create/index.d.ts +146 -59
  37. package/dist/api/design/create/index.d.ts.map +1 -1
  38. package/dist/api/design/create/opening-fields.d.ts +18 -6
  39. package/dist/api/design/create/opening-fields.d.ts.map +1 -1
  40. package/dist/api/design/delete/index.d.ts +14 -7
  41. package/dist/api/design/delete/index.d.ts.map +1 -1
  42. package/dist/api/design/dimensions.d.ts +12 -4
  43. package/dist/api/design/dimensions.d.ts.map +1 -1
  44. package/dist/api/design/doors/index.d.ts +37 -0
  45. package/dist/api/design/doors/index.d.ts.map +1 -1
  46. package/dist/api/design/edit/index.d.ts +7 -3
  47. package/dist/api/design/edit/index.d.ts.map +1 -1
  48. package/dist/api/design/family.d.ts +5 -1
  49. package/dist/api/design/family.d.ts.map +1 -1
  50. package/dist/api/design/index.d.ts +1 -0
  51. package/dist/api/design/index.d.ts.map +1 -1
  52. package/dist/api/design/lock.d.ts +3 -0
  53. package/dist/api/design/lock.d.ts.map +1 -1
  54. package/dist/api/design/opening-placement.d.ts +135 -0
  55. package/dist/api/design/opening-placement.d.ts.map +1 -0
  56. package/dist/api/design/transform/index.d.ts +28 -8
  57. package/dist/api/design/transform/index.d.ts.map +1 -1
  58. package/dist/api/design/windows/index.d.ts +23 -0
  59. package/dist/api/design/windows/index.d.ts.map +1 -1
  60. package/dist/api/entity/space.d.ts +30 -6
  61. package/dist/api/entity/space.d.ts.map +1 -1
  62. package/dist/api/entity/story.d.ts +4 -0
  63. package/dist/api/entity/story.d.ts.map +1 -1
  64. package/dist/api/presentation/drawings.d.ts +1 -1
  65. package/dist/api/presentation/views.d.ts +5 -1
  66. package/dist/api/presentation/views.d.ts.map +1 -1
  67. package/dist/handles.d.ts +8 -0
  68. package/dist/handles.d.ts.map +1 -1
  69. package/dist/index.cjs +2510 -2427
  70. package/dist/index.cjs.map +1 -1
  71. package/dist/index.js +2506 -2427
  72. package/dist/index.js.map +1 -1
  73. package/package.json +13 -13
  74. package/src/api/core/camera/index.ts +9 -7
  75. package/src/api/core/comment/index.ts +3 -3
  76. package/src/api/core/geom/create/index.ts +25 -25
  77. package/src/api/core/geom/query/circle.ts +11 -11
  78. package/src/api/core/geom/query/contour.ts +7 -6
  79. package/src/api/core/geom/query/curve.ts +25 -25
  80. package/src/api/core/geom/query/profile.ts +7 -6
  81. package/src/api/core/geom/update/contour.ts +12 -11
  82. package/src/api/core/geom/update/curve.ts +5 -5
  83. package/src/api/core/geom/update/profile.ts +12 -11
  84. package/src/api/core/io/import/index.ts +3 -2
  85. package/src/api/core/math/quat.ts +2 -2
  86. package/src/api/core/math/vec3.ts +16 -16
  87. package/src/api/core/storeys/index.ts +5 -0
  88. package/src/api/design/boolean/index.ts +2 -2
  89. package/src/api/design/create/bulk-items.ts +11 -3
  90. package/src/api/design/create/index.ts +46 -46
  91. package/src/api/design/create/opening-fields.ts +7 -7
  92. package/src/api/design/delete/index.ts +14 -7
  93. package/src/api/design/dimensions.ts +5 -4
  94. package/src/api/design/doors/index.ts +43 -0
  95. package/src/api/design/edit/index.ts +3 -3
  96. package/src/api/design/family.ts +2 -1
  97. package/src/api/design/index.ts +1 -0
  98. package/src/api/design/lock.ts +6 -0
  99. package/src/api/design/opening-placement.ts +79 -0
  100. package/src/api/design/transform/index.ts +15 -7
  101. package/src/api/design/windows/index.ts +29 -0
  102. package/src/api/entity/space.ts +5 -4
  103. package/src/api/entity/story.ts +4 -0
  104. package/src/api/presentation/views.ts +7 -2
  105. package/src/handles.ts +11 -0
  106. package/test/handles.test.mjs +36 -0
package/AGENTS.md CHANGED
@@ -214,6 +214,23 @@ check **all** consumers of `@snaptrude/plugin-client` or `@snaptrude/plugin-core
214
214
 
215
215
  Search these directories for usage of the changed API and update accordingly.
216
216
 
217
+ ### 8. snapagents (every API change, breaking or not)
218
+
219
+ The Snap agent (`snapagents` repo) does not install this package. It keeps a synced copy of the
220
+ built `dist/**/*.d.ts` under `plugin-types/plugin-core/` and compiles every script the
221
+ agent writes against them before it runs, so a stale copy means the agent is held
222
+ to an old API. After a plugin-core release, in the snapagents checkout run:
223
+
224
+ ```bash
225
+ npm run sync:plugin-core -- <path to packages/plugin-core>
226
+ ```
227
+
228
+ It copies new and changed declaration files, keeps snapagents' agent-only files,
229
+ refuses to overwrite its hand-merged files (and prints what to merge), and stamps
230
+ `plugin-types/plugin-core/.synced.json` with the version. Where the editor validates a
231
+ parameter against a fixed list, declare it as that literal union here, not as
232
+ `string`: the agent's type-check can only reject what the type names.
233
+
217
234
  ## Adding a new API namespace (end-to-end)
218
235
 
219
236
  When adding an entirely new namespace (e.g. `snaptrude.materials`):
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @snaptrude/plugin-core
2
2
 
3
+ ## 1.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 3862bd8: handles: new `Vec3Input` (a `Vec3Handle` in any inbound form, or a plain finite `{ x, y, z }` point) is the type of every vec3 ARGUMENT — transform displacement/axis/pivot, create positions and directions, opening facing/hinge, dimension ends, camera eye/target, `core.math.vec3` operands, geometry create/update/query points. Geometry reads return plain points, so they can be passed straight back; hosts from Oct 2026 resolve the point as a vector, older hosts reject it as an invalid handle. Returns stay `Vec3Handle`. `PluginDesignChangeResult` gains optional `cascaded`, `missing` and `rejected` (delete only). design.delete / design.transform JSDoc updated. The openings' `position` / `facing` / `hinge` (`design.create.door` / `window` / `doors` / `windows` / `opening`) take `Vec3Input` too. `PluginPresentationViewsCreateResult` declares the `framed` flag `views.create` already returns.
8
+
9
+ ## 1.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Add `design.doors.checkPlacement` and `design.windows.checkPlacement` — trial an opening's host fit, cut and material clearance (plus up to 12 `candidateWidths`) and restore the model without publishing commands, history or saves. A width/height on a family sized by its Type (Custom Sizes off) now picks the Type within 25 mm, else turns Custom Sizes on; `checkPlacement` reports which as `sizing`, and `design.create.door(s)` / `window(s)` apply the same rule. Door docs: a room door's `facing` goes inside the room it serves, and `getSwingDirection` / `mirror` point to `design.validation.access()` `opensInto` for which room a door opens into.
14
+
3
15
  ## 1.0.2
4
16
 
5
17
  ### Patch Changes