@snaptrude/plugin-core 0.0.0-surfaces-20260921090636 → 0.0.0-surfaces-20260923052616
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 +4 -0
- package/CHANGELOG.md +59 -0
- package/api-manifest.json +619 -22
- package/dist/api/core/geom/create/index.d.ts +51 -52
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/brep.d.ts +5 -1
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +1 -1
- package/dist/api/core/io/import/index.d.ts +3 -1
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/mode/index.d.ts +19 -7
- package/dist/api/core/mode/index.d.ts.map +1 -1
- package/dist/api/core/tags.d.ts +81 -0
- package/dist/api/core/tags.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +185 -0
- package/dist/api/design/create/bulk-items.d.ts.map +1 -0
- package/dist/api/design/create/grids.d.ts +132 -0
- package/dist/api/design/create/grids.d.ts.map +1 -0
- package/dist/api/design/create/index.d.ts +419 -23
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +37 -0
- package/dist/api/design/create/opening-fields.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +4 -0
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +427 -0
- package/dist/api/design/dimensions.d.ts.map +1 -0
- package/dist/api/design/doors/index.d.ts +20 -13
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +136 -11
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/grids.d.ts +237 -0
- package/dist/api/design/grids.d.ts.map +1 -0
- package/dist/api/design/index.d.ts +9 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/query/geometry/index.d.ts +9 -7
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/grids.d.ts +288 -0
- package/dist/api/design/query/grids.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +29 -0
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +74 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/presentation/annotate.d.ts +2 -2
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/api/program/departments.d.ts +58 -2
- package/dist/api/program/departments.d.ts.map +1 -1
- package/dist/api/program/index.d.ts +16 -6
- package/dist/api/program/index.d.ts.map +1 -1
- package/dist/api/program/labels.d.ts +355 -0
- package/dist/api/program/labels.d.ts.map +1 -0
- package/dist/api/program/metadata.d.ts +328 -0
- package/dist/api/program/metadata.d.ts.map +1 -0
- package/dist/api/program/spreadsheet.d.ts +263 -0
- package/dist/api/program/spreadsheet.d.ts.map +1 -1
- package/dist/api/workspace/index.d.ts +49 -2
- package/dist/api/workspace/index.d.ts.map +1 -1
- package/dist/handles.d.ts +19 -0
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +2490 -1891
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2396 -1891
- package/dist/index.js.map +1 -1
- package/dist/massParameters.d.ts +16 -9
- package/dist/massParameters.d.ts.map +1 -1
- package/dist/massParameters.ops.d.ts +5 -3
- package/dist/massParameters.ops.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/api/core/geom/create/index.ts +55 -54
- package/src/api/core/geom/query/brep.ts +5 -1
- package/src/api/core/geom/query/curve.ts +1 -1
- package/src/api/core/io/import/index.ts +11 -3
- package/src/api/core/mode/index.ts +19 -7
- package/src/api/core/tags.ts +76 -0
- package/src/api/design/create/bulk-items.ts +186 -0
- package/src/api/design/create/grids.ts +137 -0
- package/src/api/design/create/index.ts +466 -38
- package/src/api/design/create/opening-fields.ts +37 -0
- package/src/api/design/delete/index.ts +4 -0
- package/src/api/design/dimensions.ts +453 -0
- package/src/api/design/doors/index.ts +20 -13
- package/src/api/design/family.ts +115 -10
- package/src/api/design/grids.ts +237 -0
- package/src/api/design/index.ts +10 -0
- package/src/api/design/query/geometry/index.ts +9 -7
- package/src/api/design/query/grids.ts +197 -0
- package/src/api/design/query/index.ts +27 -0
- package/src/api/design/update/index.ts +53 -0
- package/src/api/program/departments.ts +54 -2
- package/src/api/program/index.ts +16 -6
- package/src/api/program/labels.ts +332 -0
- package/src/api/program/metadata.ts +364 -0
- package/src/api/program/spreadsheet.ts +282 -0
- package/src/api/workspace/index.ts +51 -2
- package/src/handles.ts +24 -0
- package/src/massParameters.ops.ts +5 -3
- package/src/massParameters.ts +24 -15
- package/test/massParameters.test.mjs +5 -3
package/AGENTS.md
CHANGED
|
@@ -180,6 +180,10 @@ These are in-browser integration tests that exercise the plugin API end-to-end.
|
|
|
180
180
|
| `entity/referenceLine.ts` | `tests/referenceLines.ts` |
|
|
181
181
|
| `entity/department.ts` | `tests/departments.ts` |
|
|
182
182
|
| `entity/buildableEnvelope.ts` | `tests/buildableEnvelope.ts` |
|
|
183
|
+
| `program/metadata.ts` | `tests/programMetadata.ts` |
|
|
184
|
+
| `program/labels.ts` | `tests/programLabels.ts` |
|
|
185
|
+
| `program/spreadsheet.ts` (custom sheets) | `tests/spreadsheetCustomSheets.ts` |
|
|
186
|
+
| `core/tags.ts` (`listForComponents`) | `tests/tagsBulk.ts` |
|
|
183
187
|
| `tools/selection.ts` | `tests/selection.ts` |
|
|
184
188
|
| `tools/transform.ts` | `tests/transform.ts` |
|
|
185
189
|
| `tools/copy.ts` | `tests/copy.ts` |
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# @snaptrude/plugin-core
|
|
2
2
|
|
|
3
|
+
## 0.9.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6e4a055: added param comps
|
|
8
|
+
- 8e37e1f: `design.family`: `prepare` and `flex` warnings gain the `proportion` code — parts thinner than 0.5 mm, parts or a family larger than 50 m, a family smaller than 10 mm, each naming the parts — and `flex` now returns `warnings`.
|
|
9
|
+
- 2a06dd9: `design.family`: `prepare`, `flex` and `getParameters` accept a `snapshot` option and return a `snapshot` block — an isolated offscreen picture of the family (iso, front, right, top tiles with a dimension line) as a PNG data URL, so an agent can look at what it built before reporting.
|
|
10
|
+
|
|
11
|
+
## 0.9.11
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 7fd374e: Add `hinge` to `design.create.door` / `window` (in `options`), `doors[]` / `windows[]` items and `opening`: a world point near the jamb the leaf is hinged on; the placed item is reflected along the wall when the catalog item's authored hinge side would land on the other jamb — one undo entry, no extra command.
|
|
16
|
+
|
|
17
|
+
**BEHAVIOUR FIX — `facing`.** The host placed the swing on the side OPPOSITE the `facing` point (the interactive tool's cursor convention) while the contract said "the room it opens into". The host now matches the contract: the leaf swings open toward `facing`. Callers that passed a point on the room side get the documented result; nothing in the contract changed shape.
|
|
18
|
+
|
|
19
|
+
`design.doors.getSwingDirection` is now derived from the placed mesh's orientation (hand as seen standing on the swing side facing the door); it previously read a scaling sign that placement never sets and reported `"left"` for every door. `mirror` axis docs now say what each axis does to a door (`'x'` swing side, `'z'` hinged jamb, `'y'` upside down); behaviour unchanged.
|
|
20
|
+
|
|
21
|
+
- e325bee: Add the structural-grids API surface: queries, creators, a sparse patch updater, structural line edits, and generic-family acceptance.
|
|
22
|
+
- **Query** — `design.query.listGrids(filter?)` (standard `PluginEntityFilter`; `"grid"` joins `PluginEntityType`, so `listByType("grid")` works) and the field-projected `design.query.grids.get(gridId, properties[])`: `angle` (degrees, CCW about +Y), `props`, `storeyVisibility`, `wings` (per-wing spacing/tagStart/span and per-line world-space `CurveHandle`, tag, visibility, effective + override props), `bounds`. Unknown ids throw `HANDLE_INVALID`.
|
|
23
|
+
- **Create** — `design.create.grid(linesX, linesY, spacingX, spacingY, options?)` (free 2-wing grid; optional `angle` in degrees and `center`, which defaults to the native viewport-centre behavior), `design.create.gridFromCurve(curve, options?)` (one wing/one line — line or arc), `design.create.gridsFromMasses(masses, spacingX, spacingY, options?)` (fitted, one group per footprint cluster, lenient skipping, ONE undo unit), and `design.create.columnsFromGrids(grids, width, depth)` (columns at every line intersection, ONE undo unit).
|
|
24
|
+
- **Update** — `design.update.grid(grid, patch)`: GROUP-LEVEL sparse patch — `props` (default styling), absolute `angle` in degrees, and `storeyVisibility`; each changed field commits its own undoable command through the panel's setters.
|
|
25
|
+
- **Grids family** — `design.grids.updateWings(grid, wings[])` (per-wing `spacing`/`count`/`spanMin`/`spanMax`; a `count` change re-indexes lines — re-query) and `design.grids.updateLines(grid, lines[])` (per-line `tag`/`distanceToPrevious`|`distanceToNext` (mutually exclusive)/`props`/`visible: false` (hide-only, product parity — show the GROUP to restore all lines); hiding every remaining visible line hides the GROUP instead — native last-line rule); plus `design.grids.addLine(grid, wing, position)` and `design.grids.removeLines(grid, lines, tagPolicy?)` (`"rewrite"` default | `"preserve"`; removing the group's last line throws `OPERATION_FAILED` — delete the group instead). Every update routes through the exact setters the native panel uses — one undoable command per changed field, identical to panel edits.
|
|
26
|
+
- **Generic families** — grid groups are accepted by `design.transform.move`/`rotate`, `design.visibility.hide`/`show`, `design.lock`/`unlock`, `design.delete.entities`, and `design.selection`; `transform.align` and `transform.mirror` throw `OPERATION_FAILED` for grids.
|
|
27
|
+
|
|
28
|
+
Grid lines have no stable identity: every line-level operation addresses them positionally as `{ wing, line }` index pairs into the `wings` arrays returned by `grids.get`; structural edits re-index lines, so re-query after mutating.
|
|
29
|
+
|
|
30
|
+
## 0.9.10
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- `core.mode.set("program")` now opens the Program tab (the same path as the top bar's Program button) instead of refusing with `PRECONDITION_FAILED`; it resolves once the tab has connected, and waits for the user to confirm the editor's pop-up modal when the browser blocks the window.
|
|
35
|
+
- `workspace.openProgramMode()` / `closeProgramMode()` — the Program-tab counterpart of `openPresentMode` / `closePresentMode`: open (awaiting the tab's connection) and close the paired Program window.
|
|
36
|
+
|
|
37
|
+
## 0.9.9
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Program-mode additions requested by the healthcare programming pilot (all additive; no signature changes):
|
|
42
|
+
- `program.metadata` — the Program Data sheet's custom columns and per-space values: `listHeaders`, `createHeader` (reuse-by-name), `get`, `list`, `update`, `updateMany`. Writes are undoable and work with the Program tab closed.
|
|
43
|
+
- `program.labels` — the program rows (space types) with targets: `list`, `get`, `create` (optionally `createSpaces`), `setTargetArea`, `setTargetCount`. Covers "target area of non-departments": a space inherits its label's target; departments keep `program.departments.setTargetArea`.
|
|
44
|
+
- `program.spreadsheet` — custom program sheets with a group-by hierarchy: `createCustomSheet`, `updateCustomSheet`, `getCustomSheet`, `listCustomSheets`, `listCustomSheetProperties`.
|
|
45
|
+
- `core.tags.listForComponents(componentIds?)` — every space's tags + colors in one round-trip.
|
|
46
|
+
- `program.departments` — `targetCount` on the department record and `setTargetCount(departmentId, targetCount)`, the count twin of `setTargetArea` (the engine stores both on the department, like on labels).
|
|
47
|
+
|
|
48
|
+
## 0.9.7
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- 6e60c61: Add bulk `design.create` creators — `wallRuns`, `floors`, `doors`, `windows`, `furnitureItems`: one host round-trip and one undo entry per batch.
|
|
53
|
+
|
|
54
|
+
Singular creators, fixes shipped alongside (behaviour changes for existing callers):
|
|
55
|
+
- `floor`, `slab`, `roof`, `ceiling`, `column`, `beam`: contour holes are now cut (holed contours previously failed or lost their holes).
|
|
56
|
+
- `floor`: the `position` offset is applied before the creation snapshot, so it survives redo and reload and drives storey assignment.
|
|
57
|
+
- `furniture`: `options.label` is now also the readable label (`design.query.getLabel`); `createNewSourceMesh` can no longer skip recording a source this call brought in (the host owns source persistence, recorded exactly once across concurrent calls); refuses with `PRECONDITION_FAILED` (`engineCode: "TOOL_ACTIVE"`) while the interactive furniture tool is active. The same refusal applies to `core.io.import.model` furniture placement.
|
|
58
|
+
- `door`, `window`: published as one save document instead of five; undo granularity unchanged.
|
|
59
|
+
|
|
60
|
+
- 2f10e6b: Add `design.dimensions` — dimension lines (Measuring Tape): `create`, `list`, `get`, `delete`, `hide`, `show`, plus the new `DimensionHandle`.
|
|
61
|
+
|
|
3
62
|
## 0.9.6
|
|
4
63
|
|
|
5
64
|
### Patch Changes
|