@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.
- package/AGENTS.md +17 -0
- package/CHANGELOG.md +12 -0
- package/api-manifest.json +130 -2098
- package/dist/api/core/camera/index.d.ts +16 -6
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/comment/index.d.ts +7 -3
- package/dist/api/core/comment/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +69 -21
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/circle.d.ts +31 -11
- package/dist/api/core/geom/query/circle.d.ts.map +1 -1
- package/dist/api/core/geom/query/contour.d.ts +19 -7
- package/dist/api/core/geom/query/contour.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +72 -24
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/profile.d.ts +19 -7
- package/dist/api/core/geom/query/profile.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +36 -12
- package/dist/api/core/geom/update/contour.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +13 -5
- package/dist/api/core/geom/update/curve.d.ts.map +1 -1
- package/dist/api/core/geom/update/profile.d.ts +36 -12
- package/dist/api/core/geom/update/profile.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +7 -3
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/math/quat.d.ts +2 -2
- package/dist/api/core/math/quat.d.ts.map +1 -1
- package/dist/api/core/math/vec3.d.ts +15 -15
- package/dist/api/core/math/vec3.d.ts.map +1 -1
- package/dist/api/core/storeys/index.d.ts +5 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -1
- package/dist/api/design/boolean/index.d.ts +20 -4
- package/dist/api/design/boolean/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +88 -17
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +146 -59
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +18 -6
- package/dist/api/design/create/opening-fields.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +14 -7
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +12 -4
- package/dist/api/design/dimensions.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +37 -0
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/edit/index.d.ts +7 -3
- package/dist/api/design/edit/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +5 -1
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +1 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/lock.d.ts +3 -0
- package/dist/api/design/lock.d.ts.map +1 -1
- package/dist/api/design/opening-placement.d.ts +135 -0
- package/dist/api/design/opening-placement.d.ts.map +1 -0
- package/dist/api/design/transform/index.d.ts +28 -8
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +23 -0
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +30 -6
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +4 -0
- package/dist/api/entity/story.d.ts.map +1 -1
- package/dist/api/presentation/drawings.d.ts +1 -1
- package/dist/api/presentation/views.d.ts +5 -1
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/handles.d.ts +8 -0
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +2510 -2427
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2506 -2427
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/api/core/camera/index.ts +9 -7
- package/src/api/core/comment/index.ts +3 -3
- package/src/api/core/geom/create/index.ts +25 -25
- package/src/api/core/geom/query/circle.ts +11 -11
- package/src/api/core/geom/query/contour.ts +7 -6
- package/src/api/core/geom/query/curve.ts +25 -25
- package/src/api/core/geom/query/profile.ts +7 -6
- package/src/api/core/geom/update/contour.ts +12 -11
- package/src/api/core/geom/update/curve.ts +5 -5
- package/src/api/core/geom/update/profile.ts +12 -11
- package/src/api/core/io/import/index.ts +3 -2
- package/src/api/core/math/quat.ts +2 -2
- package/src/api/core/math/vec3.ts +16 -16
- package/src/api/core/storeys/index.ts +5 -0
- package/src/api/design/boolean/index.ts +2 -2
- package/src/api/design/create/bulk-items.ts +11 -3
- package/src/api/design/create/index.ts +46 -46
- package/src/api/design/create/opening-fields.ts +7 -7
- package/src/api/design/delete/index.ts +14 -7
- package/src/api/design/dimensions.ts +5 -4
- package/src/api/design/doors/index.ts +43 -0
- package/src/api/design/edit/index.ts +3 -3
- package/src/api/design/family.ts +2 -1
- package/src/api/design/index.ts +1 -0
- package/src/api/design/lock.ts +6 -0
- package/src/api/design/opening-placement.ts +79 -0
- package/src/api/design/transform/index.ts +15 -7
- package/src/api/design/windows/index.ts +29 -0
- package/src/api/entity/space.ts +5 -4
- package/src/api/entity/story.ts +4 -0
- package/src/api/presentation/views.ts +7 -2
- package/src/handles.ts +11 -0
- 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
|