@snaptrude/plugin-core 0.9.14 → 0.9.16
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 +28 -0
- package/api-manifest.json +527 -26
- package/dist/api/core/camera/index.d.ts +418 -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/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/index.d.ts +14 -0
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +1 -1
- package/dist/api/presentation/views.d.ts +3 -1
- package/dist/api/presentation/views.d.ts.map +1 -1
- package/dist/api/presentation/walkthroughs.d.ts +1350 -0
- package/dist/api/presentation/walkthroughs.d.ts.map +1 -0
- package/dist/index.cjs +3162 -2553
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3077 -2550
- 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 +400 -1
- 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/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/index.ts +14 -0
- package/src/api/presentation/views.ts +3 -1
- package/src/api/presentation/walkthroughs.ts +1201 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../../src/api/core/layers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../../src/api/core/layers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,8BAAsB,mBAAmB;;IAGvC;;;;;;;;;;;;;;;;;;OAkBG;aACa,IAAI,IAAI,eAAe,CAAC,0BAA0B,CAAC;IAEnE;;;;;;;;;;;;;;;;;OAiBG;aACa,GAAG,CACjB,OAAO,EAAE,MAAM,GACd,eAAe,CAAC,yBAAyB,CAAC;IAE7C;;;;;;;;;;;;;;;OAeG;aACa,SAAS,IAAI,eAAe,CAAC,+BAA+B,CAAC;IAE7E;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;aACa,MAAM,CACpB,IAAI,EAAE,MAAM,GACX,eAAe,CAAC,4BAA4B,CAAC;IAEhD;;;;;;;;;;;;;;;;;;;;;;;OAuBG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,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;iBAAoC,CAAA;AAC9E,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,6BAA6B,CACrC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;iBAE1C,CAAA;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,+BAA+B,CACvC,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B;;;;iBAYnC,CAAA;AACJ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B;;iBAEvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;iBAQvC,CAAA;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,4BAA4B,CACpC,CAAA"}
|
|
@@ -5,7 +5,8 @@ import { ComponentHandle } from "../../../handles";
|
|
|
5
5
|
* Proposals — read and edit the project's design options ("proposals").
|
|
6
6
|
*
|
|
7
7
|
* A **proposal** is a design option: one of several variants of the same
|
|
8
|
-
* project. Each proposal owns a set of buckets (a bucket
|
|
8
|
+
* project. Each proposal owns a set of buckets (a bucket is a layer in the
|
|
9
|
+
* Layers panel; read them with `core.layers.get` / {@linkcode PluginCoreLayersApi}),
|
|
9
10
|
* and switching the active proposal shows/hides the buckets it owns. Proposals
|
|
10
11
|
* are **infrastructure**, not design — they own the buckets/layers geometry
|
|
11
12
|
* lives in — so they sit under `core`, not `design` (constitution §2A).
|
|
@@ -305,8 +306,8 @@ export declare abstract class PluginCoreProposalsApi {
|
|
|
305
306
|
* | `id` | `string` | Stable public proposal id (e.g. `"prop_1"`) |
|
|
306
307
|
* | `name` | `string` | Display name (≤ 24 chars) |
|
|
307
308
|
* | `isActive` | `boolean` | Whether this is the active proposal |
|
|
308
|
-
* | `defaultBucketId` | `string` | Id of the proposal's default
|
|
309
|
-
* | `bucketIds` | `string[]` | Ids of every
|
|
309
|
+
* | `defaultBucketId` | `string` | Id of the proposal's default layer (cannot be unshared); read it with `core.layers.get` ({@linkcode PluginCoreLayersApi}) |
|
|
310
|
+
* | `bucketIds` | `string[]` | Ids of every layer in the Layers panel the proposal owns; read them with `core.layers.get` ({@linkcode PluginCoreLayersApi}) |
|
|
310
311
|
* | `createdAt` | `string` | ISO creation timestamp |
|
|
311
312
|
* | `createdBy` | `string` | User id of the creator |
|
|
312
313
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/proposals/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAElD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/proposals/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAElD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,8BAAsB,sBAAsB;;IAG1C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|
2
2
|
import { PluginApiReturn } from "../../../types";
|
|
3
3
|
import { ComponentHandle } from "../../../handles";
|
|
4
4
|
import { PluginStoryGetProperty, PluginStoryGetResult, PluginStoryCreateResult, PluginStoryUpdateResult, PluginStorySetActiveResult, PluginStoryDeleteResult, PluginStoryDuplicateResult } from "../../entity/story";
|
|
5
|
+
import { PluginCoreStoreysLayersApi } from "./layers";
|
|
5
6
|
/**
|
|
6
7
|
* Storey (floor) management.
|
|
7
8
|
*
|
|
@@ -14,10 +15,20 @@ import { PluginStoryGetProperty, PluginStoryGetResult, PluginStoryCreateResult,
|
|
|
14
15
|
* API calls** that return Promises and support undo/redo via Snaptrude's command
|
|
15
16
|
* system (except {@linkcode PluginCoreStoreysApi.setActive}, a view change).
|
|
16
17
|
*
|
|
18
|
+
* - {@linkcode PluginCoreStoreysApi.layers} — each storey's sketch surfaces
|
|
19
|
+
* (Wall, Rough) and imported underlays (CAD, PDF, image, terrain): list, get,
|
|
20
|
+
* active layer get/set, show/hide. Not the Layers panel; that is `core.layers`.
|
|
21
|
+
*
|
|
17
22
|
* Accessed via `snaptrude.core.storeys`.
|
|
18
23
|
*/
|
|
19
24
|
export declare abstract class PluginCoreStoreysApi {
|
|
20
25
|
constructor();
|
|
26
|
+
/**
|
|
27
|
+
* Storey layers — each storey's sketch surfaces and imported underlays (ids
|
|
28
|
+
* like `ly_5`), formerly `core.layers`. Not the layers in the Layers panel;
|
|
29
|
+
* use `core.layers` for those. See {@linkcode PluginCoreStoreysLayersApi}.
|
|
30
|
+
*/
|
|
31
|
+
abstract layers: PluginCoreStoreysLayersApi;
|
|
21
32
|
/**
|
|
22
33
|
* Get properties of a storey by its storey number.
|
|
23
34
|
*
|
|
@@ -262,4 +273,5 @@ export declare const PluginCoreStoreysListResult: z.ZodObject<{
|
|
|
262
273
|
}, z.core.$strip>>;
|
|
263
274
|
}, z.core.$strip>;
|
|
264
275
|
export type PluginCoreStoreysListResult = z.infer<typeof PluginCoreStoreysListResult>;
|
|
276
|
+
export * from "./layers";
|
|
265
277
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/storeys/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EAEpB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/core/storeys/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EAEpB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAErD;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,oBAAoB;;IAGxC;;;;OAIG;IACH,SAAgB,MAAM,EAAE,0BAA0B,CAAA;IAElD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;aACa,GAAG,CACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,sBAAsB,EAAE,GACnC,eAAe,CAAC,oBAAoB,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;OAqBG;aACa,IAAI,IAAI,eAAe,CAAC,2BAA2B,CAAC;IAEpE;;;;;;;;;;;;;;;;;;;;;;;OAuBG;aACa,MAAM,CACpB,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,GACd,eAAe,CAAC,uBAAuB,CAAC;IAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;aACa,MAAM,CACpB,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAC1B,eAAe,CAAC,uBAAuB,CAAC;IAE3C;;;;;;;;;;;;OAYG;aACa,SAAS,IAAI,eAAe,CAAC,MAAM,CAAC;IAEpD;;;;;;;;;;;;;;;;;;;;OAoBG;aACa,SAAS,CACvB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,0BAA0B,CAAC;IAE9C;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,MAAM,CACpB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,uBAAuB,CAAC;IAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;aACa,IAAI,CAClB,SAAS,EAAE,IAAI,GAAG,MAAM,EACxB,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,GAC7D,eAAe,CAAC,0BAA0B,CAAC;CAC/C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B;;;;;;iBAEtC,CAAA;AAEF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,2BAA2B,CACnC,CAAA;AAED,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { PluginApiReturn } from "../../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Storey layers — read and toggle a storey's sketch surfaces and imported
|
|
5
|
+
* underlays.
|
|
6
|
+
*
|
|
7
|
+
* These are each storey's built-in sketch surfaces (Wall, Rough) and its
|
|
8
|
+
* imported underlays (CAD, PDF, images, terrain, neighbourhood buildings), with
|
|
9
|
+
* ids like `ly_5`. They are **NOT** the layers in the product's Layers panel in
|
|
10
|
+
* the left sidebar; use {@linkcode PluginCoreLayersApi} (`core.layers`) for
|
|
11
|
+
* those. They are also not wall/floor construction-assembly material layers.
|
|
12
|
+
*
|
|
13
|
+
* Reads return plain records and never throw for a missing layer (`get` and
|
|
14
|
+
* `getActive` return `null`, `list` returns `[]`).
|
|
15
|
+
*
|
|
16
|
+
* Storey layers are created only by storey creation and `core.io.import.*`;
|
|
17
|
+
* delete underlays with `core.io.underlay.delete` / `core.io.terrain.delete`.
|
|
18
|
+
*
|
|
19
|
+
* Sub-namespace members typed as optional (`?`) are **authored ahead of the
|
|
20
|
+
* host** — declared so plugins and codegen can see the shape, but kept out of the
|
|
21
|
+
* discovery manifest until the host lands them (at which point they are promoted
|
|
22
|
+
* to required `abstract` members).
|
|
23
|
+
*
|
|
24
|
+
* Accessed via `snaptrude.core.storeys.layers` (formerly `core.layers`).
|
|
25
|
+
*
|
|
26
|
+
* Formerly `core.layers`. Calls in that shape on `core.layers` (`list(storeyId)`,
|
|
27
|
+
* `getActive(storeyId)`, `get` / `setActive` / `update(layerId, hidden)` with a
|
|
28
|
+
* `ly_*` id) are still routed here, so plugins built before 0.9.15 keep working.
|
|
29
|
+
*/
|
|
30
|
+
export declare abstract class PluginCoreStoreysLayersApi {
|
|
31
|
+
constructor();
|
|
32
|
+
/**
|
|
33
|
+
* List the storey layers of a storey.
|
|
34
|
+
*
|
|
35
|
+
* Optionally filter to a single {@linkcode PluginCoreStoreyLayerType}.
|
|
36
|
+
*
|
|
37
|
+
* @param storeyId - The storey whose layers to read.
|
|
38
|
+
* @param layerType - Optional {@linkcode PluginCoreStoreyLayerType} filter.
|
|
39
|
+
* @returns A {@linkcode PluginCoreStoreysLayersListResult} with a `layers` array
|
|
40
|
+
* (empty when the storey is missing or has no matching layers).
|
|
41
|
+
*
|
|
42
|
+
* @examplePrompt List the sketch surfaces and underlays on this storey
|
|
43
|
+
* @examplePrompt Show all the PDF underlays on storey st_2
|
|
44
|
+
* @examplePrompt What CAD layers are on the ground floor?
|
|
45
|
+
*
|
|
46
|
+
* # Example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const { layers } = await snaptrude.core.storeys.layers.list("st_2")
|
|
49
|
+
* for (const l of layers) console.log(l.name, l.layerType, l.hidden)
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
abstract list(storeyId: string, layerType?: PluginCoreStoreyLayerType): PluginApiReturn<PluginCoreStoreysLayersListResult>;
|
|
53
|
+
/**
|
|
54
|
+
* Get a single storey layer by id.
|
|
55
|
+
*
|
|
56
|
+
* @param layerId - The id of the layer to read.
|
|
57
|
+
* @returns The matching {@linkcode PluginCoreStoreyLayer}, or `null` if no layer has
|
|
58
|
+
* that id.
|
|
59
|
+
*
|
|
60
|
+
* @examplePrompt Get the storey drawing layer with id ly_5
|
|
61
|
+
* @examplePrompt Is storey layer ly_5 hidden?
|
|
62
|
+
* @examplePrompt Look up a storey underlay layer by id
|
|
63
|
+
*
|
|
64
|
+
* # Example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const layer = await snaptrude.core.storeys.layers.get("ly_5")
|
|
67
|
+
* if (layer) console.log(layer.name, layer.hidden, layer.locked)
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
abstract get(layerId: string): PluginApiReturn<PluginCoreStoreysLayersGetResult>;
|
|
71
|
+
/**
|
|
72
|
+
* Get the active storey layer of a storey.
|
|
73
|
+
*
|
|
74
|
+
* The active layer is the one new sketch geometry is drawn onto. Paired with
|
|
75
|
+
* {@linkcode PluginCoreStoreysLayersApi.setActive}.
|
|
76
|
+
*
|
|
77
|
+
* @param storeyId - The storey whose active layer to read.
|
|
78
|
+
* @returns The active {@linkcode PluginCoreStoreyLayer}, or `null` if the storey is
|
|
79
|
+
* missing or has no active layer.
|
|
80
|
+
*
|
|
81
|
+
* @examplePrompt Which sketch surface (Wall/Rough) is active on this storey?
|
|
82
|
+
* @examplePrompt Get the active storey drawing layer on st_2
|
|
83
|
+
* @examplePrompt Which storey layer is new sketch geometry drawn onto?
|
|
84
|
+
*
|
|
85
|
+
* # Example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const active = await snaptrude.core.storeys.layers.getActive("st_2")
|
|
88
|
+
* if (active) console.log(active.name)
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
abstract getActive(storeyId: string): PluginApiReturn<PluginCoreStoreysLayersGetActiveResult>;
|
|
92
|
+
/**
|
|
93
|
+
* Make a storey layer the active layer of its storey.
|
|
94
|
+
*
|
|
95
|
+
* Paired with {@linkcode PluginCoreStoreysLayersApi.getActive}.
|
|
96
|
+
*
|
|
97
|
+
* @param layerId - The id of the layer to activate.
|
|
98
|
+
* @returns The id of the now-active layer.
|
|
99
|
+
* @throws If no layer has the given id.
|
|
100
|
+
*
|
|
101
|
+
* @examplePrompt Switch this storey's sketch surface to the Rough layer
|
|
102
|
+
* @examplePrompt Make storey layer ly_5 the active sketch surface
|
|
103
|
+
* @examplePrompt Switch the active storey layer to the CAD underlay
|
|
104
|
+
*
|
|
105
|
+
* # Example
|
|
106
|
+
* ```ts
|
|
107
|
+
* await snaptrude.core.storeys.layers.setActive("ly_5")
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
abstract setActive(layerId: string): PluginApiReturn<PluginCoreStoreysLayersSetActiveResult>;
|
|
111
|
+
/**
|
|
112
|
+
* Update a storey layer's visibility.
|
|
113
|
+
*
|
|
114
|
+
* A **sparse** update: omit `hidden` to leave it unchanged. This edit is **not
|
|
115
|
+
* undoable**. Locking and renaming are not exposed — layer `locked` is a
|
|
116
|
+
* read-only status here (setting it at runtime does not lock the live meshes or
|
|
117
|
+
* show a padlock in the app until a reload), and a rename cascades to every member
|
|
118
|
+
* mesh's `layerName`, a corruption hazard.
|
|
119
|
+
*
|
|
120
|
+
* @param layerId - The id of the layer to update.
|
|
121
|
+
* @param hidden - New hidden state (unchanged if omitted).
|
|
122
|
+
* @returns The updated {@linkcode PluginCoreStoreyLayer}.
|
|
123
|
+
* @throws If no layer has the given id.
|
|
124
|
+
*
|
|
125
|
+
* @examplePrompt Hide the PDF underlay layer
|
|
126
|
+
* @examplePrompt Show the CAD underlay again
|
|
127
|
+
* @examplePrompt Hide storey layer ly_5
|
|
128
|
+
*
|
|
129
|
+
* # Example
|
|
130
|
+
* ```ts
|
|
131
|
+
* const layer = await snaptrude.core.storeys.layers.update("ly_5", true)
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
abstract update(layerId: string, hidden?: boolean): PluginApiReturn<PluginCoreStoreysLayersUpdateResult>;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The kind of a storey layer.
|
|
138
|
+
*
|
|
139
|
+
* Author-drawable kinds (`floor`, `wall`, `ceiling`, `rough`, `default`) plus
|
|
140
|
+
* read-only imported underlays (`image`, `cad`, `pdf`, `terrain`, `buildings`).
|
|
141
|
+
*/
|
|
142
|
+
export declare const PluginCoreStoreyLayerType: z.ZodEnum<{
|
|
143
|
+
default: "default";
|
|
144
|
+
terrain: "terrain";
|
|
145
|
+
buildings: "buildings";
|
|
146
|
+
cad: "cad";
|
|
147
|
+
floor: "floor";
|
|
148
|
+
wall: "wall";
|
|
149
|
+
ceiling: "ceiling";
|
|
150
|
+
rough: "rough";
|
|
151
|
+
image: "image";
|
|
152
|
+
pdf: "pdf";
|
|
153
|
+
}>;
|
|
154
|
+
export type PluginCoreStoreyLayerType = z.infer<typeof PluginCoreStoreyLayerType>;
|
|
155
|
+
/**
|
|
156
|
+
* A storey layer on a storey.
|
|
157
|
+
*
|
|
158
|
+
* | Property | Type | Description |
|
|
159
|
+
* |---|---|---|
|
|
160
|
+
* | `id` | `string` | Stable public layer id (e.g. `"ly_5"`) |
|
|
161
|
+
* | `name` | `string` | Display name |
|
|
162
|
+
* | `layerType` | {@linkcode PluginCoreStoreyLayerType} | The layer's kind |
|
|
163
|
+
* | `storeyId` | `string` | The stable id of the storey this layer belongs to |
|
|
164
|
+
* | `buildingId` | `string` | The stable id of the building this layer belongs to |
|
|
165
|
+
* | `hidden` | `boolean` | Whether the layer is hidden |
|
|
166
|
+
* | `locked` | `boolean` | Whether the layer is locked against edits |
|
|
167
|
+
* | `contentSummary` | `object` | A summary of what the layer holds (see below) |
|
|
168
|
+
*
|
|
169
|
+
* `contentSummary`:
|
|
170
|
+
*
|
|
171
|
+
* | Property | Type | Description |
|
|
172
|
+
* |---|---|---|
|
|
173
|
+
* | `hasFloorplan` | `boolean` | Whether the layer holds drawn floorplan geometry |
|
|
174
|
+
* | `pdfCount` | `number` | Number of PDF underlays on the layer |
|
|
175
|
+
* | `hasTerrain` | `boolean` | Whether the layer holds terrain |
|
|
176
|
+
*/
|
|
177
|
+
export declare const PluginCoreStoreyLayer: z.ZodObject<{
|
|
178
|
+
id: z.ZodString;
|
|
179
|
+
name: z.ZodString;
|
|
180
|
+
layerType: z.ZodEnum<{
|
|
181
|
+
default: "default";
|
|
182
|
+
terrain: "terrain";
|
|
183
|
+
buildings: "buildings";
|
|
184
|
+
cad: "cad";
|
|
185
|
+
floor: "floor";
|
|
186
|
+
wall: "wall";
|
|
187
|
+
ceiling: "ceiling";
|
|
188
|
+
rough: "rough";
|
|
189
|
+
image: "image";
|
|
190
|
+
pdf: "pdf";
|
|
191
|
+
}>;
|
|
192
|
+
storeyId: z.ZodString;
|
|
193
|
+
buildingId: z.ZodString;
|
|
194
|
+
hidden: z.ZodBoolean;
|
|
195
|
+
locked: z.ZodBoolean;
|
|
196
|
+
contentSummary: z.ZodObject<{
|
|
197
|
+
hasFloorplan: z.ZodBoolean;
|
|
198
|
+
pdfCount: z.ZodNumber;
|
|
199
|
+
hasTerrain: z.ZodBoolean;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
export type PluginCoreStoreyLayer = z.infer<typeof PluginCoreStoreyLayer>;
|
|
203
|
+
/**
|
|
204
|
+
* Arguments for {@linkcode PluginCoreStoreysLayersApi.list}.
|
|
205
|
+
*
|
|
206
|
+
* | Property | Type | Description |
|
|
207
|
+
* |---|---|---|
|
|
208
|
+
* | `storeyId` | `string` | The storey whose layers to read |
|
|
209
|
+
* | `layerType` | {@linkcode PluginCoreStoreyLayerType}` \| undefined` | Optional layer-type filter |
|
|
210
|
+
*/
|
|
211
|
+
export declare const PluginCoreStoreysLayersListArgs: z.ZodObject<{
|
|
212
|
+
storeyId: z.ZodString;
|
|
213
|
+
layerType: z.ZodOptional<z.ZodEnum<{
|
|
214
|
+
default: "default";
|
|
215
|
+
terrain: "terrain";
|
|
216
|
+
buildings: "buildings";
|
|
217
|
+
cad: "cad";
|
|
218
|
+
floor: "floor";
|
|
219
|
+
wall: "wall";
|
|
220
|
+
ceiling: "ceiling";
|
|
221
|
+
rough: "rough";
|
|
222
|
+
image: "image";
|
|
223
|
+
pdf: "pdf";
|
|
224
|
+
}>>;
|
|
225
|
+
}, z.core.$strip>;
|
|
226
|
+
export type PluginCoreStoreysLayersListArgs = z.infer<typeof PluginCoreStoreysLayersListArgs>;
|
|
227
|
+
/**
|
|
228
|
+
* Result of {@linkcode PluginCoreStoreysLayersApi.list}.
|
|
229
|
+
*
|
|
230
|
+
* | Property | Type | Description |
|
|
231
|
+
* |---|---|---|
|
|
232
|
+
* | `layers` | {@linkcode PluginCoreStoreyLayer}`[]` | The storey's storey layers (empty when missing or none match) |
|
|
233
|
+
*/
|
|
234
|
+
export declare const PluginCoreStoreysLayersListResult: z.ZodObject<{
|
|
235
|
+
layers: z.ZodArray<z.ZodObject<{
|
|
236
|
+
id: z.ZodString;
|
|
237
|
+
name: z.ZodString;
|
|
238
|
+
layerType: z.ZodEnum<{
|
|
239
|
+
default: "default";
|
|
240
|
+
terrain: "terrain";
|
|
241
|
+
buildings: "buildings";
|
|
242
|
+
cad: "cad";
|
|
243
|
+
floor: "floor";
|
|
244
|
+
wall: "wall";
|
|
245
|
+
ceiling: "ceiling";
|
|
246
|
+
rough: "rough";
|
|
247
|
+
image: "image";
|
|
248
|
+
pdf: "pdf";
|
|
249
|
+
}>;
|
|
250
|
+
storeyId: z.ZodString;
|
|
251
|
+
buildingId: z.ZodString;
|
|
252
|
+
hidden: z.ZodBoolean;
|
|
253
|
+
locked: z.ZodBoolean;
|
|
254
|
+
contentSummary: z.ZodObject<{
|
|
255
|
+
hasFloorplan: z.ZodBoolean;
|
|
256
|
+
pdfCount: z.ZodNumber;
|
|
257
|
+
hasTerrain: z.ZodBoolean;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
}, z.core.$strip>>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
export type PluginCoreStoreysLayersListResult = z.infer<typeof PluginCoreStoreysLayersListResult>;
|
|
262
|
+
/**
|
|
263
|
+
* Arguments for {@linkcode PluginCoreStoreysLayersApi.get}.
|
|
264
|
+
*
|
|
265
|
+
* | Property | Type | Description |
|
|
266
|
+
* |---|---|---|
|
|
267
|
+
* | `layerId` | `string` | The id of the layer to read |
|
|
268
|
+
*/
|
|
269
|
+
export declare const PluginCoreStoreysLayersGetArgs: z.ZodObject<{
|
|
270
|
+
layerId: z.ZodString;
|
|
271
|
+
}, z.core.$strip>;
|
|
272
|
+
export type PluginCoreStoreysLayersGetArgs = z.infer<typeof PluginCoreStoreysLayersGetArgs>;
|
|
273
|
+
/**
|
|
274
|
+
* Result of {@linkcode PluginCoreStoreysLayersApi.get} — the layer, or `null`
|
|
275
|
+
* when no layer has the given id.
|
|
276
|
+
*/
|
|
277
|
+
export declare const PluginCoreStoreysLayersGetResult: z.ZodNullable<z.ZodObject<{
|
|
278
|
+
id: z.ZodString;
|
|
279
|
+
name: z.ZodString;
|
|
280
|
+
layerType: z.ZodEnum<{
|
|
281
|
+
default: "default";
|
|
282
|
+
terrain: "terrain";
|
|
283
|
+
buildings: "buildings";
|
|
284
|
+
cad: "cad";
|
|
285
|
+
floor: "floor";
|
|
286
|
+
wall: "wall";
|
|
287
|
+
ceiling: "ceiling";
|
|
288
|
+
rough: "rough";
|
|
289
|
+
image: "image";
|
|
290
|
+
pdf: "pdf";
|
|
291
|
+
}>;
|
|
292
|
+
storeyId: z.ZodString;
|
|
293
|
+
buildingId: z.ZodString;
|
|
294
|
+
hidden: z.ZodBoolean;
|
|
295
|
+
locked: z.ZodBoolean;
|
|
296
|
+
contentSummary: z.ZodObject<{
|
|
297
|
+
hasFloorplan: z.ZodBoolean;
|
|
298
|
+
pdfCount: z.ZodNumber;
|
|
299
|
+
hasTerrain: z.ZodBoolean;
|
|
300
|
+
}, z.core.$strip>;
|
|
301
|
+
}, z.core.$strip>>;
|
|
302
|
+
export type PluginCoreStoreysLayersGetResult = z.infer<typeof PluginCoreStoreysLayersGetResult>;
|
|
303
|
+
/**
|
|
304
|
+
* Arguments for {@linkcode PluginCoreStoreysLayersApi.getActive}.
|
|
305
|
+
*
|
|
306
|
+
* | Property | Type | Description |
|
|
307
|
+
* |---|---|---|
|
|
308
|
+
* | `storeyId` | `string` | The storey whose active layer to read |
|
|
309
|
+
*/
|
|
310
|
+
export declare const PluginCoreStoreysLayersGetActiveArgs: z.ZodObject<{
|
|
311
|
+
storeyId: z.ZodString;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
export type PluginCoreStoreysLayersGetActiveArgs = z.infer<typeof PluginCoreStoreysLayersGetActiveArgs>;
|
|
314
|
+
/**
|
|
315
|
+
* Result of {@linkcode PluginCoreStoreysLayersApi.getActive} — the active layer,
|
|
316
|
+
* or `null` when the storey is missing or has no active layer.
|
|
317
|
+
*/
|
|
318
|
+
export declare const PluginCoreStoreysLayersGetActiveResult: z.ZodNullable<z.ZodObject<{
|
|
319
|
+
id: z.ZodString;
|
|
320
|
+
name: z.ZodString;
|
|
321
|
+
layerType: z.ZodEnum<{
|
|
322
|
+
default: "default";
|
|
323
|
+
terrain: "terrain";
|
|
324
|
+
buildings: "buildings";
|
|
325
|
+
cad: "cad";
|
|
326
|
+
floor: "floor";
|
|
327
|
+
wall: "wall";
|
|
328
|
+
ceiling: "ceiling";
|
|
329
|
+
rough: "rough";
|
|
330
|
+
image: "image";
|
|
331
|
+
pdf: "pdf";
|
|
332
|
+
}>;
|
|
333
|
+
storeyId: z.ZodString;
|
|
334
|
+
buildingId: z.ZodString;
|
|
335
|
+
hidden: z.ZodBoolean;
|
|
336
|
+
locked: z.ZodBoolean;
|
|
337
|
+
contentSummary: z.ZodObject<{
|
|
338
|
+
hasFloorplan: z.ZodBoolean;
|
|
339
|
+
pdfCount: z.ZodNumber;
|
|
340
|
+
hasTerrain: z.ZodBoolean;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
}, z.core.$strip>>;
|
|
343
|
+
export type PluginCoreStoreysLayersGetActiveResult = z.infer<typeof PluginCoreStoreysLayersGetActiveResult>;
|
|
344
|
+
/**
|
|
345
|
+
* Arguments for {@linkcode PluginCoreStoreysLayersApi.setActive}.
|
|
346
|
+
*
|
|
347
|
+
* | Property | Type | Description |
|
|
348
|
+
* |---|---|---|
|
|
349
|
+
* | `layerId` | `string` | The id of the layer to activate |
|
|
350
|
+
*/
|
|
351
|
+
export declare const PluginCoreStoreysLayersSetActiveArgs: z.ZodObject<{
|
|
352
|
+
layerId: z.ZodString;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
export type PluginCoreStoreysLayersSetActiveArgs = z.infer<typeof PluginCoreStoreysLayersSetActiveArgs>;
|
|
355
|
+
/**
|
|
356
|
+
* Result of {@linkcode PluginCoreStoreysLayersApi.setActive} — the now-active
|
|
357
|
+
* layer's id.
|
|
358
|
+
*
|
|
359
|
+
* | Property | Type | Description |
|
|
360
|
+
* |---|---|---|
|
|
361
|
+
* | `layerId` | `string` | The id of the now-active layer |
|
|
362
|
+
*/
|
|
363
|
+
export declare const PluginCoreStoreysLayersSetActiveResult: z.ZodObject<{
|
|
364
|
+
layerId: z.ZodString;
|
|
365
|
+
}, z.core.$strip>;
|
|
366
|
+
export type PluginCoreStoreysLayersSetActiveResult = z.infer<typeof PluginCoreStoreysLayersSetActiveResult>;
|
|
367
|
+
/**
|
|
368
|
+
* Arguments for {@linkcode PluginCoreStoreysLayersApi.update}. Sparse — only the
|
|
369
|
+
* provided fields are changed.
|
|
370
|
+
*
|
|
371
|
+
* | Property | Type | Description |
|
|
372
|
+
* |---|---|---|
|
|
373
|
+
* | `layerId` | `string` | The id of the layer to update |
|
|
374
|
+
* | `hidden` | `boolean \| undefined` | New hidden state (unchanged if omitted) |
|
|
375
|
+
*/
|
|
376
|
+
export declare const PluginCoreStoreysLayersUpdateArgs: z.ZodObject<{
|
|
377
|
+
layerId: z.ZodString;
|
|
378
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
export type PluginCoreStoreysLayersUpdateArgs = z.infer<typeof PluginCoreStoreysLayersUpdateArgs>;
|
|
381
|
+
/** Result of {@linkcode PluginCoreStoreysLayersApi.update} — the updated layer. */
|
|
382
|
+
export declare const PluginCoreStoreysLayersUpdateResult: z.ZodObject<{
|
|
383
|
+
id: z.ZodString;
|
|
384
|
+
name: z.ZodString;
|
|
385
|
+
layerType: z.ZodEnum<{
|
|
386
|
+
default: "default";
|
|
387
|
+
terrain: "terrain";
|
|
388
|
+
buildings: "buildings";
|
|
389
|
+
cad: "cad";
|
|
390
|
+
floor: "floor";
|
|
391
|
+
wall: "wall";
|
|
392
|
+
ceiling: "ceiling";
|
|
393
|
+
rough: "rough";
|
|
394
|
+
image: "image";
|
|
395
|
+
pdf: "pdf";
|
|
396
|
+
}>;
|
|
397
|
+
storeyId: z.ZodString;
|
|
398
|
+
buildingId: z.ZodString;
|
|
399
|
+
hidden: z.ZodBoolean;
|
|
400
|
+
locked: z.ZodBoolean;
|
|
401
|
+
contentSummary: z.ZodObject<{
|
|
402
|
+
hasFloorplan: z.ZodBoolean;
|
|
403
|
+
pdfCount: z.ZodNumber;
|
|
404
|
+
hasTerrain: z.ZodBoolean;
|
|
405
|
+
}, z.core.$strip>;
|
|
406
|
+
}, z.core.$strip>;
|
|
407
|
+
export type PluginCoreStoreysLayersUpdateResult = z.infer<typeof PluginCoreStoreysLayersUpdateResult>;
|
|
408
|
+
//# sourceMappingURL=layers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../../../src/api/core/storeys/layers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,8BAAsB,0BAA0B;;IAG9C;;;;;;;;;;;;;;;;;;;OAmBG;aACa,IAAI,CAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,yBAAyB,GACpC,eAAe,CAAC,iCAAiC,CAAC;IAErD;;;;;;;;;;;;;;;;OAgBG;aACa,GAAG,CACjB,OAAO,EAAE,MAAM,GACd,eAAe,CAAC,gCAAgC,CAAC;IAEpD;;;;;;;;;;;;;;;;;;;OAmBG;aACa,SAAS,CACvB,QAAQ,EAAE,MAAM,GACf,eAAe,CAAC,sCAAsC,CAAC;IAE1D;;;;;;;;;;;;;;;;;OAiBG;aACa,SAAS,CACvB,OAAO,EAAE,MAAM,GACd,eAAe,CAAC,sCAAsC,CAAC;IAE1D;;;;;;;;;;;;;;;;;;;;;;OAsBG;aACa,MAAM,CACpB,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,OAAO,GACf,eAAe,CAAC,mCAAmC,CAAC;CACxD;AAED;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;EAWpC,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF;;;;;;;;;;;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AC5C,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,sCAAsC;;iBAEjD,CAAA;AACF,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAC1D,OAAO,sCAAsC,CAC9C,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC;;;iBAG5C,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,iCAAiC,CACzC,CAAA;AAED,mFAAmF;AACnF,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;iBAAwB,CAAA;AACxE,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA"}
|
package/dist/api/core/tags.d.ts
CHANGED
|
@@ -458,8 +458,8 @@ export declare const PluginCoreAssignOutcome: z.ZodObject<{
|
|
|
458
458
|
id: z.ZodString;
|
|
459
459
|
reason: z.ZodEnum<{
|
|
460
460
|
locked: "locked";
|
|
461
|
-
"not-taggable": "not-taggable";
|
|
462
461
|
"not-found": "not-found";
|
|
462
|
+
"not-taggable": "not-taggable";
|
|
463
463
|
}>;
|
|
464
464
|
}, z.core.$strip>>;
|
|
465
465
|
}, z.core.$strip>;
|
|
@@ -821,8 +821,8 @@ export declare const PluginCoreTagsAssignResult: z.ZodObject<{
|
|
|
821
821
|
id: z.ZodString;
|
|
822
822
|
reason: z.ZodEnum<{
|
|
823
823
|
locked: "locked";
|
|
824
|
-
"not-taggable": "not-taggable";
|
|
825
824
|
"not-found": "not-found";
|
|
825
|
+
"not-taggable": "not-taggable";
|
|
826
826
|
}>;
|
|
827
827
|
}, z.core.$strip>>;
|
|
828
828
|
categoryId: z.ZodString;
|
|
@@ -851,8 +851,8 @@ export declare const PluginCoreTagsUnassignResult: z.ZodObject<{
|
|
|
851
851
|
id: z.ZodString;
|
|
852
852
|
reason: z.ZodEnum<{
|
|
853
853
|
locked: "locked";
|
|
854
|
-
"not-taggable": "not-taggable";
|
|
855
854
|
"not-found": "not-found";
|
|
855
|
+
"not-taggable": "not-taggable";
|
|
856
856
|
}>;
|
|
857
857
|
}, z.core.$strip>>;
|
|
858
858
|
}, z.core.$strip>;
|
|
@@ -5,6 +5,41 @@ import * as z from "zod";
|
|
|
5
5
|
* into separate awaited batches, each with its own undo entry.
|
|
6
6
|
*/
|
|
7
7
|
export declare const PLUGIN_CREATE_BATCH_LIMIT = 1000;
|
|
8
|
+
/**
|
|
9
|
+
* One break point of a wall's top edge — see {@linkcode PluginWallTopProfile}.
|
|
10
|
+
*
|
|
11
|
+
* | Property | Type | Description |
|
|
12
|
+
* |---|---|---|
|
|
13
|
+
* | `along` | `number` | Position along the wall centerline as a fraction: `0` = start of the curve, `1` = end |
|
|
14
|
+
* | `height` | `number` | Top height above the wall base at that point (Snaptrude units, > 0) |
|
|
15
|
+
*/
|
|
16
|
+
export declare const PluginWallTopProfilePoint: z.ZodObject<{
|
|
17
|
+
along: z.ZodNumber;
|
|
18
|
+
height: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type PluginWallTopProfilePoint = z.infer<typeof PluginWallTopProfilePoint>;
|
|
21
|
+
/**
|
|
22
|
+
* The top edge of ONE wall as a polyline over its centerline: at least two
|
|
23
|
+
* points, `along` strictly increasing from `0` (curve start) to `1` (curve end),
|
|
24
|
+
* straight segments between them. Two points give a single slope (a raked
|
|
25
|
+
* wall), three give a gable, more give any stepped or folded ridge. Heights are
|
|
26
|
+
* measured from the wall base, like `height`. Both long faces follow the same
|
|
27
|
+
* profile, so the top stays a set of flat faces and the wall keeps its thickness
|
|
28
|
+
* end to end.
|
|
29
|
+
*
|
|
30
|
+
* Only straight centerlines take a top profile (an arc curve with one is
|
|
31
|
+
* rejected). A wall built this way is a real Wall — doors and windows host on
|
|
32
|
+
* it, corners mitre, quantities and Revit export read its geometry — but it is
|
|
33
|
+
* **non-parametric**: the parametric wall graph does not rebuild it, so a later
|
|
34
|
+
* move of a neighbour does not re-mitre its corner, exactly like a wall whose
|
|
35
|
+
* top edge was dragged by hand. `design.update.wall({ height })` scales it
|
|
36
|
+
* proportionally.
|
|
37
|
+
*/
|
|
38
|
+
export declare const PluginWallTopProfile: z.ZodArray<z.ZodObject<{
|
|
39
|
+
along: z.ZodNumber;
|
|
40
|
+
height: z.ZodNumber;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
export type PluginWallTopProfile = z.infer<typeof PluginWallTopProfile>;
|
|
8
43
|
/**
|
|
9
44
|
* One wall run to create via {@linkcode PluginDesignCreateApi.wallRuns} — the
|
|
10
45
|
* same inputs as {@linkcode PluginDesignCreateApi.walls}, one run per item.
|
|
@@ -16,6 +51,7 @@ export declare const PLUGIN_CREATE_BATCH_LIMIT = 1000;
|
|
|
16
51
|
* | `thickness` | `number`? | Wall thickness (Snaptrude units, > 0; default: `wallType`'s total layer thickness when given, else engine default) |
|
|
17
52
|
* | `wallType` | `string`? | Wall type name from `design.types.list("wall")` — layers/material/thickness defaults (default generic) |
|
|
18
53
|
* | `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) |
|
|
54
|
+
* | `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) |
|
|
19
55
|
*/
|
|
20
56
|
export declare const PluginCreateWallRunItem: z.ZodObject<{
|
|
21
57
|
profile: z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"profile">, string>>;
|
|
@@ -23,6 +59,10 @@ export declare const PluginCreateWallRunItem: z.ZodObject<{
|
|
|
23
59
|
thickness: z.ZodOptional<z.ZodNumber>;
|
|
24
60
|
wallType: z.ZodOptional<z.ZodString>;
|
|
25
61
|
storey: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
topProfiles: z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
63
|
+
along: z.ZodNumber;
|
|
64
|
+
height: z.ZodNumber;
|
|
65
|
+
}, z.core.$strip>>>>>;
|
|
26
66
|
}, z.core.$strip>;
|
|
27
67
|
export type PluginCreateWallRunItem = z.infer<typeof PluginCreateWallRunItem>;
|
|
28
68
|
/** The `items` array of {@linkcode PluginDesignCreateApi.wallRuns} (1…1000). */
|
|
@@ -32,6 +72,10 @@ export declare const PluginCreateWallRunItems: z.ZodArray<z.ZodObject<{
|
|
|
32
72
|
thickness: z.ZodOptional<z.ZodNumber>;
|
|
33
73
|
wallType: z.ZodOptional<z.ZodString>;
|
|
34
74
|
storey: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
topProfiles: z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
76
|
+
along: z.ZodNumber;
|
|
77
|
+
height: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>>>>>;
|
|
35
79
|
}, z.core.$strip>>;
|
|
36
80
|
export type PluginCreateWallRunItems = z.infer<typeof PluginCreateWallRunItems>;
|
|
37
81
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulk-items.d.ts","sourceRoot":"","sources":["../../../../src/api/design/create/bulk-items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAIxB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,OAAO,CAAA;AAM7C
|
|
1
|
+
{"version":3,"file":"bulk-items.d.ts","sourceRoot":"","sources":["../../../../src/api/design/create/bulk-items.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAIxB;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,OAAO,CAAA;AAM7C;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB;;;iBAGpC,CAAA;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,O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