@snaptrude/plugin-core 0.0.0-bimsvg-20260929092811 → 0.0.0-bimsvg-20260930135320
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/CHANGELOG.md +22 -0
- package/api-manifest.json +397 -91
- package/dist/api/core/camera/index.d.ts +29 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/index.d.ts +4 -4
- package/dist/api/core/index.d.ts.map +1 -1
- package/dist/api/core/layers.d.ts +377 -255
- package/dist/api/core/layers.d.ts.map +1 -1
- package/dist/api/core/proposals/index.d.ts +4 -3
- package/dist/api/core/proposals/index.d.ts.map +1 -1
- package/dist/api/core/storeys/index.d.ts +12 -0
- package/dist/api/core/storeys/index.d.ts.map +1 -1
- package/dist/api/core/storeys/layers.d.ts +408 -0
- package/dist/api/core/storeys/layers.d.ts.map +1 -0
- package/dist/api/core/tags.d.ts +3 -3
- package/dist/api/core/zoom/index.d.ts +13 -0
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +44 -0
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +31 -3
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/selection/index.d.ts +2 -2
- package/dist/api/design/update/index.d.ts +73 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +13 -13
- package/dist/api/presentation/camera.d.ts +265 -0
- package/dist/api/presentation/camera.d.ts.map +1 -0
- package/dist/api/presentation/drawingContract.d.ts +32 -0
- package/dist/api/presentation/drawingContract.d.ts.map +1 -0
- package/dist/api/presentation/drawings.d.ts +650 -33
- package/dist/api/presentation/drawings.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +1 -1
- package/dist/api/presentation/export.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +16 -3
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +13 -6
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/sheets.d.ts +12 -5
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/viewPresets.d.ts +161 -9
- package/dist/api/presentation/viewPresets.d.ts.map +1 -1
- package/dist/api/presentation/views.d.ts +16 -1
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/index.cjs +3014 -2730
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2974 -2727
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/generate-manifest.test.mjs +14 -3
- package/src/api/core/camera/index.ts +29 -0
- package/src/api/core/index.ts +4 -4
- package/src/api/core/layers.ts +380 -173
- package/src/api/core/proposals/index.ts +4 -3
- package/src/api/core/storeys/index.ts +14 -0
- package/src/api/core/storeys/layers.ts +339 -0
- package/src/api/core/zoom/index.ts +13 -0
- package/src/api/design/create/bulk-items.ts +68 -0
- package/src/api/design/create/index.ts +30 -4
- package/src/api/design/update/index.ts +80 -1
- package/src/api/presentation/camera.ts +289 -0
- package/src/api/presentation/drawingContract.ts +70 -0
- package/src/api/presentation/drawings.ts +680 -36
- package/src/api/presentation/export.ts +3 -2
- package/src/api/presentation/index.ts +16 -3
- package/src/api/presentation/placedViews.ts +14 -6
- package/src/api/presentation/sheets.ts +14 -6
- package/src/api/presentation/viewPresets.ts +167 -9
- package/src/api/presentation/views.ts +16 -1
- package/test/drawingContract.test.mjs +169 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @snaptrude/plugin-core
|
|
2
2
|
|
|
3
|
+
## 0.9.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4bfe118: `core.layers`: the layers in the Layers panel in the left sidebar. `list()`, `get(layerId)` and `getActive()` read the active design option's layers (default first, with `objectCount`); `create(name)` adds a layer to the active option (undoable, not activated); `rename(layerId, name)` renames (not undoable, default layer refused); `update(layerId, { locked?, hidden? })` locks and hides per-user (undoable; other option keys are rejected); `setActive(layerId)` sets where new objects land; `delete(layerId, { deleteObjects: true } | { targetLayerId })` deletes with an explicit disposition (server-validated; refused for the default, last, locked or shared layer; treat as permanent); `assign(componentIds, layerId)` moves objects onto a layer (undoable, locked objects skipped). Layer ids are the ids `core.proposals` records list as `bucketIds` / `defaultBucketId` (the proposals docs now point there).
|
|
8
|
+
|
|
9
|
+
MOVED (compatible at runtime): the former `core.layers` (each storey's sketch surfaces and imported underlays, ids `ly_*`) is now `core.storeys.layers`, with the same methods (`list`, `get`, `getActive`, `setActive`, `update`) and signatures. Plugins that still call the old shape on `core.layers` (`list(storeyId)`, `getActive(storeyId)`, `get` / `setActive` / `update(layerId, hidden)` with a `ly_*` id) keep working: the host routes those calls to `core.storeys.layers`. They are deprecated; new code should call `snaptrude.core.storeys.layers.*` directly. Only the TypeScript names change: `PluginCoreLayersApi` -> `PluginCoreStoreysLayersApi`, `PluginCoreLayer` -> `PluginCoreStoreyLayer`, `PluginCoreLayerType` -> `PluginCoreStoreyLayerType`, and `PluginCoreLayers*Args` / `PluginCoreLayers*Result` -> `PluginCoreStoreysLayers*Args` / `PluginCoreStoreysLayers*Result`; the names `PluginCoreLayersApi`, `PluginCoreLayer` and `PluginCoreLayers*` now describe the Layers panel.
|
|
10
|
+
|
|
11
|
+
- 80c1a2b: `presentation.camera`: the Present-mode canvas camera. `capture()` screenshots what the Present canvas currently shows (the visible area at the current pan and zoom, as a base64 data URL with its pixel size); `get()` reads pan, zoom, the visible page rectangle and the sheet on screen; `set({ x?, y?, zoom? })` pans and zooms; `zoomToFit()` frames every sheet; `zoomTo(shapeId)` frames one sheet or placed shape. View-state only (not write-gated, not undoable); requires Present mode to be open.
|
|
12
|
+
- 0e3df96: Raked and gabled walls: `design.create.walls` takes a trailing `topProfiles` argument and `design.create.wallRuns` items a `topProfiles` field — one optional `PluginWallTopProfile` per centerline curve (`[{ along, height }, …]`, `along` 0→1, at least two points). The wall is built as a real Wall with the given top edge (two points = single slope, three = gable), mitred at run corners, in the same single undo entry; it is non-parametric (the parametric wall graph does not rebuild it), like a wall whose top edge was dragged by hand.
|
|
13
|
+
- d84ea44: `design.update.setObjectType(components, objectType)`: convert masses into real walls, roofs, slabs or floors (`objectType` uses the `design.query` `type` vocabulary: `"wall" | "roof" | "slab" | "floor"`) — the properties panel's Object Type dropdown, headless, keeping the geometry exactly as built (no flattening to a default thickness) and keeping the component's handle. Instance families convert together. One undoable operation.
|
|
14
|
+
|
|
3
15
|
## 0.9.14
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -90,6 +102,16 @@
|
|
|
90
102
|
- `core.tags.listForComponents(componentIds?)` — every space's tags + colors in one round-trip.
|
|
91
103
|
- `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).
|
|
92
104
|
|
|
105
|
+
## 0.9.8
|
|
106
|
+
|
|
107
|
+
### Patch Changes
|
|
108
|
+
|
|
109
|
+
- 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.
|
|
110
|
+
|
|
111
|
+
**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.
|
|
112
|
+
|
|
113
|
+
`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.
|
|
114
|
+
|
|
93
115
|
## 0.9.7
|
|
94
116
|
|
|
95
117
|
### Patch Changes
|