@snaptrude/plugin-core 0.9.16-networks-20261012.1 → 0.9.17
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 +6 -0
- package/api-manifest.json +9711 -0
- package/dist/api/analysis/daylight.d.ts +5 -5
- package/dist/api/analysis/solar.d.ts +2 -2
- package/dist/api/core/camera/index.d.ts +0 -29
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/zoom/index.d.ts +0 -13
- package/dist/api/core/zoom/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +21 -40
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +97 -120
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +12 -13
- package/dist/api/design/create/opening-fields.d.ts.map +1 -1
- package/dist/api/design/doors/index.d.ts +24 -18
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +27 -797
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +0 -16
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/query/index.d.ts +30 -30
- package/dist/api/design/selection/index.d.ts +10 -10
- package/dist/api/design/types/index.d.ts +24 -40
- package/dist/api/design/types/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +3 -40
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +8 -8
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/presentation/aiInspiration.d.ts +10 -10
- package/dist/api/presentation/annotate.d.ts +22 -38
- package/dist/api/presentation/annotate.d.ts.map +1 -1
- package/dist/api/presentation/export.d.ts +5 -23
- package/dist/api/presentation/export.d.ts.map +1 -1
- package/dist/api/presentation/index.d.ts +21 -32
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +6 -106
- package/dist/api/presentation/placedViews.d.ts.map +1 -1
- package/dist/api/presentation/sections.d.ts +461 -0
- package/dist/api/presentation/sections.d.ts.map +1 -0
- package/dist/api/presentation/shapes.d.ts +2 -2
- package/dist/api/presentation/sheets.d.ts +19 -175
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/views.d.ts +5 -103
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/presentation/walkthroughs.d.ts +6 -6
- package/dist/index.cjs +2434 -3619
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2421 -3501
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/scripts/generate-manifest.mjs +0 -5
- package/src/api/core/camera/index.ts +0 -29
- package/src/api/core/zoom/index.ts +0 -13
- package/src/api/design/create/bulk-items.ts +16 -23
- package/src/api/design/create/index.ts +119 -129
- package/src/api/design/create/opening-fields.ts +12 -15
- package/src/api/design/doors/index.ts +42 -58
- package/src/api/design/family.ts +32 -662
- package/src/api/design/index.ts +4 -34
- package/src/api/design/types/index.ts +24 -31
- package/src/api/design/update/index.ts +3 -41
- package/src/api/design/windows/index.ts +22 -40
- package/src/api/presentation/annotate.ts +58 -90
- package/src/api/presentation/export.ts +6 -32
- package/src/api/presentation/index.ts +23 -39
- package/src/api/presentation/placedViews.ts +28 -119
- package/src/api/presentation/sections.ts +420 -0
- package/src/api/presentation/sheets.ts +20 -181
- package/src/api/presentation/views.ts +6 -46
- package/dist/api/design/bim.d.ts +0 -209
- package/dist/api/design/bim.d.ts.map +0 -1
- package/dist/api/design/catalog.d.ts +0 -320
- package/dist/api/design/catalog.d.ts.map +0 -1
- package/dist/api/design/networks.d.ts +0 -1703
- package/dist/api/design/networks.d.ts.map +0 -1
- package/dist/api/presentation/drawingContract.d.ts +0 -32
- package/dist/api/presentation/drawingContract.d.ts.map +0 -1
- package/dist/api/presentation/drawings.d.ts +0 -3523
- package/dist/api/presentation/drawings.d.ts.map +0 -1
- package/dist/api/presentation/viewPresets.d.ts +0 -222
- package/dist/api/presentation/viewPresets.d.ts.map +0 -1
- package/src/api/design/bim.ts +0 -121
- package/src/api/design/catalog.ts +0 -203
- package/src/api/design/networks.ts +0 -607
- package/src/api/presentation/drawingContract.ts +0 -70
- package/src/api/presentation/drawings.ts +0 -1179
- package/src/api/presentation/viewPresets.ts +0 -241
- package/test/drawingContract.test.mjs +0 -288
package/package.json
CHANGED
|
@@ -115,11 +115,6 @@ export function buildManifest({ includeOptional = false } = {}) {
|
|
|
115
115
|
const cls = classes.get(className)
|
|
116
116
|
if (!cls) return
|
|
117
117
|
|
|
118
|
-
// Domain network namespaces inherit their transport methods. Include these
|
|
119
|
-
// leaves so discovery exposes the same API as the generic worker proxy.
|
|
120
|
-
const base = cls.getExtends()?.getExpression().getText()
|
|
121
|
-
if (base && classes.has(base)) walk(base, pathPrefix)
|
|
122
|
-
|
|
123
118
|
// Leaf methods on this namespace.
|
|
124
119
|
for (const method of cls.getMethods()) {
|
|
125
120
|
const name = method.getName()
|
|
@@ -17,11 +17,6 @@ import { Vec3Components, Vec3Handle } from "../../../handles"
|
|
|
17
17
|
* Positions are world coordinates in internal `babylon` units (1 unit =
|
|
18
18
|
* 0.254 m, Y up); yaw is degrees clockwise from +z seen from above, pitch is
|
|
19
19
|
* degrees above level.
|
|
20
|
-
*
|
|
21
|
-
* While Present mode is open these calls set the Design frame a view saved in
|
|
22
|
-
* Present (`presentation.views.create`) is taken from; they never move the
|
|
23
|
-
* Present sheet canvas. To pan, zoom or screenshot the Present canvas, use
|
|
24
|
-
* {@linkcode PluginPresentationCameraApi} (`presentation.camera`).
|
|
25
20
|
*/
|
|
26
21
|
export abstract class PluginCameraApi {
|
|
27
22
|
constructor() {}
|
|
@@ -30,10 +25,6 @@ export abstract class PluginCameraApi {
|
|
|
30
25
|
* Point the camera: place its eye at `eye` looking toward `target` (world
|
|
31
26
|
* coordinates, internal `babylon` units). View-state only — not undoable.
|
|
32
27
|
*
|
|
33
|
-
* While Present is open this sets the Design frame a view saved in Present
|
|
34
|
-
* is taken from; it never moves the Present sheet canvas; use
|
|
35
|
-
* `presentation.camera` for that.
|
|
36
|
-
*
|
|
37
28
|
* @param eye - Camera position as a {@linkcode Vec3Handle}
|
|
38
29
|
* @param target - Point the camera looks at as a {@linkcode Vec3Handle}
|
|
39
30
|
* @returns `true` once the camera has been positioned.
|
|
@@ -60,10 +51,6 @@ export abstract class PluginCameraApi {
|
|
|
60
51
|
* perspective) view. Mirrors the canvas view menu. View-state only — not
|
|
61
52
|
* undoable. The orthographic presets exit 2D mode first if needed.
|
|
62
53
|
*
|
|
63
|
-
* While Present is open this sets the Design frame a view saved in Present
|
|
64
|
-
* is taken from; it never moves the Present sheet canvas; use
|
|
65
|
-
* `presentation.camera` for that.
|
|
66
|
-
*
|
|
67
54
|
* @param view - The standard view to snap to ({@linkcode PluginStandardView})
|
|
68
55
|
* @returns `true` once the view has been applied.
|
|
69
56
|
*
|
|
@@ -104,10 +91,6 @@ export abstract class PluginCameraApi {
|
|
|
104
91
|
* 2D/3D toggle: `3d` enters the isometric perspective view, `2d` drops to the
|
|
105
92
|
* orthographic plan of the active storey. View-state only — not undoable.
|
|
106
93
|
*
|
|
107
|
-
* While Present is open this sets the Design frame a view saved in Present
|
|
108
|
-
* is taken from; it never moves the Present sheet canvas; use
|
|
109
|
-
* `presentation.camera` for that.
|
|
110
|
-
*
|
|
111
94
|
* @param mode - `"2d"` or `"3d"` ({@linkcode PluginCameraMode})
|
|
112
95
|
* @returns `true` once the mode switch has been requested.
|
|
113
96
|
*
|
|
@@ -152,10 +135,6 @@ export abstract class PluginCameraApi {
|
|
|
152
135
|
* `"orthographic"` is accepted as a no-op, while `"perspective"` is
|
|
153
136
|
* rejected — switch to 3D first via `setMode("3d")`.
|
|
154
137
|
*
|
|
155
|
-
* While Present is open this sets the Design frame a view saved in Present
|
|
156
|
-
* is taken from; it never moves the Present sheet canvas; use
|
|
157
|
-
* `presentation.camera` for that.
|
|
158
|
-
*
|
|
159
138
|
* @param projection - `"perspective"` or `"orthographic"` ({@linkcode PluginCameraProjection})
|
|
160
139
|
* @returns `true` once the projection has been applied.
|
|
161
140
|
*
|
|
@@ -179,10 +158,6 @@ export abstract class PluginCameraApi {
|
|
|
179
158
|
* action. View-state only — not undoable. Canonical home of the zoom-extents
|
|
180
159
|
* read (the deprecated `core.zoom.extents`).
|
|
181
160
|
*
|
|
182
|
-
* While Present is open this sets the Design frame a view saved in Present
|
|
183
|
-
* is taken from; it never moves the Present sheet canvas; use
|
|
184
|
-
* `presentation.camera` for that.
|
|
185
|
-
*
|
|
186
161
|
* @returns `true` once the camera has been framed to the scene.
|
|
187
162
|
*
|
|
188
163
|
* @examplePrompt Zoom out so I can see the whole model
|
|
@@ -202,10 +177,6 @@ export abstract class PluginCameraApi {
|
|
|
202
177
|
* undoable. Canonical home of the zoom-to-selection read (the deprecated
|
|
203
178
|
* `core.zoom.selection`).
|
|
204
179
|
*
|
|
205
|
-
* While Present is open this sets the Design frame a view saved in Present
|
|
206
|
-
* is taken from; it never moves the Present sheet canvas; use
|
|
207
|
-
* `presentation.camera` for that.
|
|
208
|
-
*
|
|
209
180
|
* @returns `true` if there was a selection to frame; `false` if nothing is
|
|
210
181
|
* selected (no-op).
|
|
211
182
|
*
|
|
@@ -5,11 +5,6 @@ import { PluginApiReturn } from "../../../types"
|
|
|
5
5
|
*
|
|
6
6
|
* Frame the viewport camera onto scene geometry — mirrors the canvas zoom menu
|
|
7
7
|
* ("Zoom extents" / "Zoom to selection"). Accessed via `snaptrude.core.zoom`.
|
|
8
|
-
*
|
|
9
|
-
* While Present mode is open these calls set the Design frame a view saved in
|
|
10
|
-
* Present (`presentation.views.create`) is taken from; they never move the
|
|
11
|
-
* Present sheet canvas. To pan, zoom or screenshot the Present canvas, use
|
|
12
|
-
* {@linkcode PluginPresentationCameraApi} (`presentation.camera`).
|
|
13
8
|
*/
|
|
14
9
|
export abstract class PluginZoomApi {
|
|
15
10
|
constructor() {}
|
|
@@ -17,10 +12,6 @@ export abstract class PluginZoomApi {
|
|
|
17
12
|
/**
|
|
18
13
|
* Zoom (fit) the camera to all geometry in the scene — the "zoom extents" action.
|
|
19
14
|
*
|
|
20
|
-
* While Present is open this sets the Design frame a view saved in Present
|
|
21
|
-
* is taken from; it never moves the Present sheet canvas; use
|
|
22
|
-
* `presentation.camera` for that.
|
|
23
|
-
*
|
|
24
15
|
* @returns `true` once the camera has been framed to the scene.
|
|
25
16
|
*
|
|
26
17
|
* @examplePrompt Zoom out so I can see the whole model
|
|
@@ -41,10 +32,6 @@ export abstract class PluginZoomApi {
|
|
|
41
32
|
/**
|
|
42
33
|
* Zoom (fit) the camera to the current selection.
|
|
43
34
|
*
|
|
44
|
-
* While Present is open this sets the Design frame a view saved in Present
|
|
45
|
-
* is taken from; it never moves the Present sheet canvas; use
|
|
46
|
-
* `presentation.camera` for that.
|
|
47
|
-
*
|
|
48
35
|
* @returns `true` if there was a selection to frame; `false` if nothing is
|
|
49
36
|
* selected (no-op).
|
|
50
37
|
*
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as z from "zod"
|
|
2
2
|
import { ContourHandle, ProfileHandle, Vec3Handle } from "../../../handles"
|
|
3
3
|
import { PluginOpeningBaseOptions } from "./opening-fields"
|
|
4
|
-
import { PluginWallType } from "../types"
|
|
5
|
-
import { PluginFamilyValues } from "../catalog"
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* Maximum items per bulk `design.create.*` call. A bounded request keeps
|
|
@@ -90,7 +88,7 @@ export type PluginWallTopProfile = z.infer<typeof PluginWallTopProfile>
|
|
|
90
88
|
* | `profile` | {@linkcode ProfileHandle} | Ordered curve chain (wall centerlines) |
|
|
91
89
|
* | `height` | `number`? | Wall height (Snaptrude units, > 0; default engine default) |
|
|
92
90
|
* | `thickness` | `number`? | Wall thickness (Snaptrude units, > 0; default: `wallType`'s total layer thickness when given, else engine default) |
|
|
93
|
-
* | `wallType` |
|
|
91
|
+
* | `wallType` | `string`? | Wall type name from `design.types.list("wall")` — layers/material/thickness defaults (default generic) |
|
|
94
92
|
* | `storey` | `number`? (int) | Target storey (must exist) — the run's walls are assigned + lifted to its base in the same undo entry (default: geometry-derived) |
|
|
95
93
|
* | `topProfiles` | ({@linkcode PluginWallTopProfile} \| `null`)[]? | Top edge per curve of `profile`, same order; a `null` or missing entry keeps that wall flat at `height`. Raked / gabled walls (straight curves only) |
|
|
96
94
|
*/
|
|
@@ -98,11 +96,9 @@ export const PluginCreateWallRunItem = z.object({
|
|
|
98
96
|
profile: ProfileHandle,
|
|
99
97
|
height: z.number().optional(),
|
|
100
98
|
thickness: z.number().optional(),
|
|
101
|
-
wallType:
|
|
99
|
+
wallType: z.string().min(1).optional(),
|
|
102
100
|
storey: z.number().int().optional(),
|
|
103
101
|
topProfiles: z.array(PluginWallTopProfile.nullable()).optional(),
|
|
104
|
-
/** Optional family overrides in mm/degrees. Host length/height stay geometry inputs. */
|
|
105
|
-
values: PluginFamilyValues.optional(),
|
|
106
102
|
})
|
|
107
103
|
export type PluginCreateWallRunItem = z.infer<typeof PluginCreateWallRunItem>
|
|
108
104
|
|
|
@@ -147,23 +143,22 @@ export type PluginCreateFloorItems = z.infer<typeof PluginCreateFloorItems>
|
|
|
147
143
|
|
|
148
144
|
/**
|
|
149
145
|
* One door to place via {@linkcode PluginDesignCreateApi.doors} — the same
|
|
150
|
-
* fields as a `"door"` {@linkcode PluginDesignCreateOpeningOptions}
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
146
|
+
* fields as a `"door"` {@linkcode PluginDesignCreateOpeningOptions}, so the
|
|
147
|
+
* size overrides singular {@linkcode PluginDesignCreateApi.door} lacks are
|
|
148
|
+
* available per item. `facing` and `hinge` are WORLD POINTS, not directions:
|
|
149
|
+
* `facing` on the side of the wall the door swings open to, `hinge` near the
|
|
150
|
+
* jamb it is hinged on. Rejects unknown fields.
|
|
154
151
|
*
|
|
155
152
|
* | Property | Type | Description |
|
|
156
153
|
* |---|---|---|
|
|
157
|
-
* | `
|
|
158
|
-
* | `version` | `number`? | Exact version; newest known by default |
|
|
159
|
-
* | `values` | `Record<string, number \| string>`? | Authored parameter overrides |
|
|
154
|
+
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
160
155
|
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the door |
|
|
161
156
|
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
162
157
|
* | `facing` | {@linkcode Vec3Handle}? | World point on the side the door swings open to (default engine-chosen) |
|
|
163
|
-
* | `hinge` | {@linkcode Vec3Handle}? | World point near the hinged
|
|
158
|
+
* | `hinge` | {@linkcode Vec3Handle}? | World point near the jamb the door is hinged on (default the catalog item's authored side) |
|
|
164
159
|
* | `label` | `string`? | Instance name (optional) |
|
|
165
|
-
* | `width` | `number`? |
|
|
166
|
-
* | `height` | `number`? |
|
|
160
|
+
* | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
|
|
161
|
+
* | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
|
|
167
162
|
*/
|
|
168
163
|
export const PluginCreateDoorItem = z
|
|
169
164
|
.object({ ...PluginOpeningBaseOptions })
|
|
@@ -188,17 +183,15 @@ export type PluginCreateDoorItems = z.infer<typeof PluginCreateDoorItems>
|
|
|
188
183
|
*
|
|
189
184
|
* | Property | Type | Description |
|
|
190
185
|
* |---|---|---|
|
|
191
|
-
* | `
|
|
192
|
-
* | `version` | `number`? | Exact version; newest known by default |
|
|
193
|
-
* | `values` | `Record<string, number \| string>`? | Authored parameter overrides; numeric lengths use SU |
|
|
186
|
+
* | `catalogId` | `string` | Library id: team `_id` or general `fullName` |
|
|
194
187
|
* | `hostWall` | {@linkcode ComponentHandle} | The wall to host the window |
|
|
195
188
|
* | `position` | {@linkcode Vec3Handle} | World point projected onto the wall |
|
|
196
189
|
* | `facing` | {@linkcode Vec3Handle}? | World point on the side the window opens to (default engine-chosen) |
|
|
197
|
-
* | `hinge` | {@linkcode Vec3Handle}? | World point near the hinged
|
|
190
|
+
* | `hinge` | {@linkcode Vec3Handle}? | World point near the jamb the window is hinged on (default the catalog item's authored side) |
|
|
198
191
|
* | `label` | `string`? | Instance name (optional) |
|
|
199
|
-
* | `width` | `number`? |
|
|
200
|
-
* | `height` | `number`? |
|
|
201
|
-
* | `sillHeight` | `number`? |
|
|
192
|
+
* | `width` | `number`? | Width override (Snaptrude units, > 0; default the catalog item's) |
|
|
193
|
+
* | `height` | `number`? | Height override (Snaptrude units, > 0; default the catalog item's) |
|
|
194
|
+
* | `sillHeight` | `number`? | Wall base to window bottom (Snaptrude units, ≥ 0; default the catalog item's) |
|
|
202
195
|
*/
|
|
203
196
|
export const PluginCreateWindowItem = z
|
|
204
197
|
.object({
|