@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.
Files changed (88) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/api-manifest.json +9711 -0
  3. package/dist/api/analysis/daylight.d.ts +5 -5
  4. package/dist/api/analysis/solar.d.ts +2 -2
  5. package/dist/api/core/camera/index.d.ts +0 -29
  6. package/dist/api/core/camera/index.d.ts.map +1 -1
  7. package/dist/api/core/zoom/index.d.ts +0 -13
  8. package/dist/api/core/zoom/index.d.ts.map +1 -1
  9. package/dist/api/design/create/bulk-items.d.ts +21 -40
  10. package/dist/api/design/create/bulk-items.d.ts.map +1 -1
  11. package/dist/api/design/create/index.d.ts +97 -120
  12. package/dist/api/design/create/index.d.ts.map +1 -1
  13. package/dist/api/design/create/opening-fields.d.ts +12 -13
  14. package/dist/api/design/create/opening-fields.d.ts.map +1 -1
  15. package/dist/api/design/doors/index.d.ts +24 -18
  16. package/dist/api/design/doors/index.d.ts.map +1 -1
  17. package/dist/api/design/family.d.ts +27 -797
  18. package/dist/api/design/family.d.ts.map +1 -1
  19. package/dist/api/design/index.d.ts +0 -16
  20. package/dist/api/design/index.d.ts.map +1 -1
  21. package/dist/api/design/query/index.d.ts +30 -30
  22. package/dist/api/design/selection/index.d.ts +10 -10
  23. package/dist/api/design/types/index.d.ts +24 -40
  24. package/dist/api/design/types/index.d.ts.map +1 -1
  25. package/dist/api/design/update/index.d.ts +3 -40
  26. package/dist/api/design/update/index.d.ts.map +1 -1
  27. package/dist/api/design/windows/index.d.ts +8 -8
  28. package/dist/api/design/windows/index.d.ts.map +1 -1
  29. package/dist/api/presentation/aiInspiration.d.ts +10 -10
  30. package/dist/api/presentation/annotate.d.ts +22 -38
  31. package/dist/api/presentation/annotate.d.ts.map +1 -1
  32. package/dist/api/presentation/export.d.ts +5 -23
  33. package/dist/api/presentation/export.d.ts.map +1 -1
  34. package/dist/api/presentation/index.d.ts +21 -32
  35. package/dist/api/presentation/index.d.ts.map +1 -1
  36. package/dist/api/presentation/placedViews.d.ts +6 -106
  37. package/dist/api/presentation/placedViews.d.ts.map +1 -1
  38. package/dist/api/presentation/sections.d.ts +461 -0
  39. package/dist/api/presentation/sections.d.ts.map +1 -0
  40. package/dist/api/presentation/shapes.d.ts +2 -2
  41. package/dist/api/presentation/sheets.d.ts +19 -175
  42. package/dist/api/presentation/sheets.d.ts.map +1 -1
  43. package/dist/api/presentation/views.d.ts +5 -103
  44. package/dist/api/presentation/views.d.ts.map +1 -1
  45. package/dist/api/presentation/walkthroughs.d.ts +6 -6
  46. package/dist/index.cjs +2434 -3619
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.js +2421 -3501
  49. package/dist/index.js.map +1 -1
  50. package/package.json +1 -1
  51. package/scripts/generate-manifest.mjs +0 -5
  52. package/src/api/core/camera/index.ts +0 -29
  53. package/src/api/core/zoom/index.ts +0 -13
  54. package/src/api/design/create/bulk-items.ts +16 -23
  55. package/src/api/design/create/index.ts +119 -129
  56. package/src/api/design/create/opening-fields.ts +12 -15
  57. package/src/api/design/doors/index.ts +42 -58
  58. package/src/api/design/family.ts +32 -662
  59. package/src/api/design/index.ts +4 -34
  60. package/src/api/design/types/index.ts +24 -31
  61. package/src/api/design/update/index.ts +3 -41
  62. package/src/api/design/windows/index.ts +22 -40
  63. package/src/api/presentation/annotate.ts +58 -90
  64. package/src/api/presentation/export.ts +6 -32
  65. package/src/api/presentation/index.ts +23 -39
  66. package/src/api/presentation/placedViews.ts +28 -119
  67. package/src/api/presentation/sections.ts +420 -0
  68. package/src/api/presentation/sheets.ts +20 -181
  69. package/src/api/presentation/views.ts +6 -46
  70. package/dist/api/design/bim.d.ts +0 -209
  71. package/dist/api/design/bim.d.ts.map +0 -1
  72. package/dist/api/design/catalog.d.ts +0 -320
  73. package/dist/api/design/catalog.d.ts.map +0 -1
  74. package/dist/api/design/networks.d.ts +0 -1703
  75. package/dist/api/design/networks.d.ts.map +0 -1
  76. package/dist/api/presentation/drawingContract.d.ts +0 -32
  77. package/dist/api/presentation/drawingContract.d.ts.map +0 -1
  78. package/dist/api/presentation/drawings.d.ts +0 -3523
  79. package/dist/api/presentation/drawings.d.ts.map +0 -1
  80. package/dist/api/presentation/viewPresets.d.ts +0 -222
  81. package/dist/api/presentation/viewPresets.d.ts.map +0 -1
  82. package/src/api/design/bim.ts +0 -121
  83. package/src/api/design/catalog.ts +0 -203
  84. package/src/api/design/networks.ts +0 -607
  85. package/src/api/presentation/drawingContract.ts +0 -70
  86. package/src/api/presentation/drawings.ts +0 -1179
  87. package/src/api/presentation/viewPresets.ts +0 -241
  88. package/test/drawingContract.test.mjs +0 -288
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snaptrude/plugin-core",
3
- "version": "0.9.16-networks-20261012.1",
3
+ "version": "0.9.17",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -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` | {@linkcode PluginWallType}? | Legacy name/id or exact native `{ id, version }` pin from `design.types.list("wall")` (default generic) |
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: PluginWallType.optional(),
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
- * Values are evaluated before cutting. Numeric lengths use SU; unit strings
152
- * are accepted in values. `facing` selects local +Z; `hinge` sets the declared
153
- * hand enum (left = local -X, right = +X). Both are world points.
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
- * | `familyId` | `string` | Hosted door family definition ID |
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 jamb; requires hand control |
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`? | Declared width parameter (SU, > 0), not evaluated hole width |
166
- * | `height` | `number`? | Declared height parameter (SU, > 0) |
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
- * | `familyId` | `string` | Hosted window family definition ID |
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 jamb; requires hand control |
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`? | Declared width parameter (SU, > 0), not evaluated hole width |
200
- * | `height` | `number`? | Declared height parameter (SU, > 0) |
201
- * | `sillHeight` | `number`? | Declared sill parameter (SU, ≥ 0); position Y is ignored |
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({