@snaptrude/plugin-core 0.11.0-rc.1 → 1.0.0
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 +176 -14
- package/api-manifest.json +872 -49
- 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 +447 -0
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +942 -101
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/brep.d.ts +59 -2
- package/dist/api/core/geom/query/brep.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +59 -35
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/edge.d.ts +2 -2
- package/dist/api/core/geom/query/face.d.ts +105 -0
- package/dist/api/core/geom/query/face.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +10 -2
- package/dist/api/core/geom/update/contour.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +5 -5
- package/dist/api/core/geom/update/profile.d.ts +3 -1
- package/dist/api/core/geom/update/profile.d.ts.map +1 -1
- package/dist/api/core/handles/index.d.ts +4 -2
- package/dist/api/core/handles/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/io/import/index.d.ts +3 -1
- package/dist/api/core/io/import/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/mode/index.d.ts +19 -7
- package/dist/api/core/mode/index.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 +17 -2
- 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 +84 -3
- package/dist/api/core/tags.d.ts.map +1 -1
- 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/bim.d.ts +299 -0
- package/dist/api/design/bim.d.ts.map +1 -0
- package/dist/api/design/boolean/index.d.ts +2 -0
- package/dist/api/design/boolean/index.d.ts.map +1 -1
- package/dist/api/design/catalog.d.ts +320 -0
- package/dist/api/design/catalog.d.ts.map +1 -0
- package/dist/api/design/create/bulk-items.d.ts +269 -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 +753 -102
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/create/opening-fields.d.ts +38 -0
- package/dist/api/design/create/opening-fields.d.ts.map +1 -0
- package/dist/api/design/delete/index.d.ts +7 -20
- 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 +24 -23
- package/dist/api/design/doors/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +1446 -0
- package/dist/api/design/family.d.ts.map +1 -0
- 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 +30 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/networks.d.ts +1703 -0
- package/dist/api/design/networks.d.ts.map +1 -0
- package/dist/api/design/query/geometry/index.d.ts +33 -5
- package/dist/api/design/query/geometry/index.d.ts.map +1 -1
- package/dist/api/design/query/grids.d.ts +287 -0
- package/dist/api/design/query/grids.d.ts.map +1 -0
- package/dist/api/design/query/index.d.ts +143 -36
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +5 -66
- package/dist/api/design/query/spaces.d.ts.map +1 -1
- package/dist/api/design/selection/index.d.ts +12 -12
- package/dist/api/design/types/index.d.ts +40 -24
- package/dist/api/design/types/index.d.ts.map +1 -1
- package/dist/api/design/update/index.d.ts +412 -8
- 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/entity/buildableEnvelope.d.ts +84 -2
- package/dist/api/entity/buildableEnvelope.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +13 -1
- package/dist/api/entity/referenceLine.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +12 -15
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/entity/story.d.ts +4 -4
- package/dist/api/presentation/aiInspiration.d.ts +24 -24
- package/dist/api/presentation/annotate.d.ts +38 -22
- package/dist/api/presentation/annotate.d.ts.map +1 -1
- 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 +3523 -0
- package/dist/api/presentation/drawings.d.ts.map +1 -0
- package/dist/api/presentation/export.d.ts +23 -5
- package/dist/api/presentation/export.d.ts.map +1 -1
- package/dist/api/presentation/graphics.d.ts +419 -0
- package/dist/api/presentation/graphics.d.ts.map +1 -0
- package/dist/api/presentation/index.d.ts +66 -12
- package/dist/api/presentation/index.d.ts.map +1 -1
- package/dist/api/presentation/placedViews.d.ts +117 -51
- 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 +175 -37
- package/dist/api/presentation/sheets.d.ts.map +1 -1
- package/dist/api/presentation/standards.d.ts +590 -0
- package/dist/api/presentation/standards.d.ts.map +1 -0
- package/dist/api/presentation/viewPresets.d.ts +222 -0
- package/dist/api/presentation/viewPresets.d.ts.map +1 -0
- package/dist/api/presentation/views.d.ts +144 -9
- 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/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/site.d.ts +4 -4
- package/dist/api/program/spreadsheet.d.ts +267 -4
- 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/errors/codes.d.ts +5 -8
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/handles.d.ts +32 -3
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +6534 -2865
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6118 -2857
- package/dist/index.js.map +1 -1
- package/dist/massParameters.d.ts +287 -0
- package/dist/massParameters.d.ts.map +1 -0
- package/dist/massParameters.ops.d.ts +138 -0
- package/dist/massParameters.ops.d.ts.map +1 -0
- package/package.json +2 -1
- package/scripts/check-dist-fresh.mjs +22 -0
- package/scripts/generate-manifest.mjs +5 -0
- package/scripts/generate-manifest.test.mjs +14 -3
- package/src/api/core/camera/index.ts +429 -1
- package/src/api/core/geom/create/index.ts +1037 -102
- package/src/api/core/geom/query/brep.ts +60 -2
- package/src/api/core/geom/query/curve.ts +26 -2
- package/src/api/core/geom/query/edge.ts +2 -2
- package/src/api/core/geom/query/face.ts +109 -4
- package/src/api/core/geom/update/contour.ts +10 -2
- package/src/api/core/geom/update/profile.ts +2 -0
- package/src/api/core/handles/index.ts +3 -2
- package/src/api/core/index.ts +4 -4
- package/src/api/core/io/import/index.ts +11 -3
- package/src/api/core/layers.ts +380 -173
- package/src/api/core/mode/index.ts +19 -7
- package/src/api/core/proposals/index.ts +4 -3
- package/src/api/core/storeys/index.ts +19 -2
- package/src/api/core/storeys/layers.ts +339 -0
- package/src/api/core/tags.ts +76 -0
- package/src/api/core/zoom/index.ts +13 -0
- package/src/api/design/bim.ts +210 -0
- package/src/api/design/boolean/index.ts +2 -0
- package/src/api/design/catalog.ts +203 -0
- package/src/api/design/create/bulk-items.ts +294 -0
- package/src/api/design/create/grids.ts +137 -0
- package/src/api/design/create/index.ts +824 -141
- package/src/api/design/create/opening-fields.ts +40 -0
- package/src/api/design/delete/index.ts +6 -20
- package/src/api/design/dimensions.ts +453 -0
- package/src/api/design/doors/index.ts +64 -41
- package/src/api/design/family.ts +1342 -0
- package/src/api/design/grids.ts +237 -0
- package/src/api/design/index.ts +49 -4
- package/src/api/design/networks.ts +607 -0
- package/src/api/design/query/geometry/index.ts +35 -4
- package/src/api/design/query/grids.ts +197 -0
- package/src/api/design/query/index.ts +105 -5
- package/src/api/design/query/spaces.ts +0 -68
- package/src/api/design/types/index.ts +31 -24
- package/src/api/design/update/index.ts +398 -4
- package/src/api/design/windows/index.ts +40 -22
- package/src/api/entity/buildableEnvelope.ts +77 -2
- package/src/api/entity/referenceLine.ts +25 -12
- package/src/api/entity/space.ts +0 -2
- package/src/api/presentation/annotate.ts +90 -58
- package/src/api/presentation/camera.ts +289 -0
- package/src/api/presentation/drawingContract.ts +70 -0
- package/src/api/presentation/drawings.ts +1179 -0
- package/src/api/presentation/export.ts +32 -6
- package/src/api/presentation/graphics.ts +324 -0
- package/src/api/presentation/index.ts +73 -14
- package/src/api/presentation/placedViews.ts +120 -57
- package/src/api/presentation/sections.ts +420 -0
- package/src/api/presentation/sheets.ts +182 -37
- package/src/api/presentation/standards.ts +445 -0
- package/src/api/presentation/viewPresets.ts +241 -0
- package/src/api/presentation/views.ts +81 -10
- package/src/api/presentation/walkthroughs.ts +1201 -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/errors/codes.ts +9 -30
- package/src/handles.ts +42 -3
- package/src/index.ts +2 -0
- package/src/massParameters.ops.ts +246 -0
- package/src/massParameters.ts +427 -0
- package/test/drawingContract.test.mjs +288 -0
- package/test/errors.test.mjs +1 -4
- package/test/massParameters.test.mjs +952 -0
- package/test/paperPensContract.test.mjs +75 -0
- package/test/presentationViewSettings.test.mjs +85 -0
- package/api-manifest.full.json +0 -6928
- package/snaptrude-plugin-core-0.11.0.tgz +0 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import type { PluginApiReturn } from "../../types";
|
|
3
|
+
/** Presets are document-local. Their ids are stable across reload; built-ins are immutable. */
|
|
4
|
+
export declare const PluginViewPreset: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
builtIn: z.ZodBoolean;
|
|
8
|
+
revision: z.ZodNumber;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type PluginViewPreset = z.infer<typeof PluginViewPreset>;
|
|
11
|
+
export declare const PluginViewPresetIdArgs: z.ZodObject<{
|
|
12
|
+
presetId: z.ZodString;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type PluginViewPresetIdArgs = z.infer<typeof PluginViewPresetIdArgs>;
|
|
15
|
+
export declare const PluginViewPresetCreateArgs: z.ZodObject<{
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
fromDrawingId: z.ZodString;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export type PluginViewPresetCreateArgs = z.infer<typeof PluginViewPresetCreateArgs>;
|
|
20
|
+
export declare const PluginViewPresetRenameArgs: z.ZodObject<{
|
|
21
|
+
presetId: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
export type PluginViewPresetRenameArgs = z.infer<typeof PluginViewPresetRenameArgs>;
|
|
25
|
+
export declare const PluginViewPresetUpdateArgs: z.ZodObject<{
|
|
26
|
+
presetId: z.ZodString;
|
|
27
|
+
fromDrawingId: z.ZodString;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
export type PluginViewPresetUpdateArgs = z.infer<typeof PluginViewPresetUpdateArgs>;
|
|
30
|
+
export declare const PluginViewPresetDeleteArgs: z.ZodObject<{
|
|
31
|
+
presetId: z.ZodString;
|
|
32
|
+
replacementId: z.ZodString;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
export type PluginViewPresetDeleteArgs = z.infer<typeof PluginViewPresetDeleteArgs>;
|
|
35
|
+
/**
|
|
36
|
+
* Reusable styles for kernel-plan drawings, stored in the Present document.
|
|
37
|
+
*
|
|
38
|
+
* A preset holds every style category of a native kernel plan. A drawing is
|
|
39
|
+
* bound to one with {@linkcode PluginPresentationDrawingsApi.applyPreset}; its
|
|
40
|
+
* own style changes are overrides on top, dropped by
|
|
41
|
+
* {@linkcode PluginPresentationDrawingsApi.resetOverrides}. Presets apply only
|
|
42
|
+
* to drawings whose `drawings.getCapabilities(drawingId).presets` is `true`.
|
|
43
|
+
* Local title text is excluded from preset values.
|
|
44
|
+
*
|
|
45
|
+
* Presets are document-local; their ids survive reload. Built-in presets are
|
|
46
|
+
* immutable. Catalog writes (`create`, `copy`, `rename`, `update`, `delete`)
|
|
47
|
+
* are native document metadata and are **not undoable**; binding a drawing or
|
|
48
|
+
* changing its overrides uses Present undo. Every method requires **Present
|
|
49
|
+
* mode to be open** and throws `PRECONDITION_FAILED` ("Present mode is not
|
|
50
|
+
* open") when it is closed; no method switches tabs.
|
|
51
|
+
*
|
|
52
|
+
* Accessed via `snaptrude.presentation.viewPresets`.
|
|
53
|
+
*/
|
|
54
|
+
export declare abstract class PluginPresentationViewPresetsApi {
|
|
55
|
+
/**
|
|
56
|
+
* List the preset catalog: built-ins first, then custom presets by name.
|
|
57
|
+
*
|
|
58
|
+
* @returns Every {@linkcode PluginViewPreset}.
|
|
59
|
+
* @throws `PRECONDITION_FAILED` if Present mode is not open.
|
|
60
|
+
*
|
|
61
|
+
* @examplePrompt List the available drawing style presets
|
|
62
|
+
* @examplePrompt Which custom presets does this presentation have?
|
|
63
|
+
* @examplePrompt Is there a Planning Issue preset?
|
|
64
|
+
*
|
|
65
|
+
* # Example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const presets = await snaptrude.presentation.viewPresets.list()
|
|
68
|
+
* const custom = presets.filter((preset) => !preset.builtIn)
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
abstract list(): PluginApiReturn<PluginViewPreset[]>;
|
|
72
|
+
/**
|
|
73
|
+
* Read one preset by id.
|
|
74
|
+
*
|
|
75
|
+
* @param presetId - The preset to read.
|
|
76
|
+
* @returns The {@linkcode PluginViewPreset}, or `null` if no preset has that id.
|
|
77
|
+
* @throws `PRECONDITION_FAILED` if Present mode is not open.
|
|
78
|
+
*
|
|
79
|
+
* @examplePrompt Which preset is this drawing using?
|
|
80
|
+
* @examplePrompt Is this preset a built-in one?
|
|
81
|
+
* @examplePrompt Read the preset bound to the ground floor plan
|
|
82
|
+
*
|
|
83
|
+
* # Example
|
|
84
|
+
* ```ts
|
|
85
|
+
* const drawing = await snaptrude.presentation.drawings.get(drawingId)
|
|
86
|
+
* const preset = drawing?.presetId
|
|
87
|
+
* ? await snaptrude.presentation.viewPresets.get(drawing.presetId)
|
|
88
|
+
* : null
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
abstract get(presetId: string): PluginApiReturn<PluginViewPreset | null>;
|
|
92
|
+
/**
|
|
93
|
+
* Save a kernel-plan drawing's effective styles as a new custom preset and
|
|
94
|
+
* bind that drawing to it. Not undoable (catalog write).
|
|
95
|
+
*
|
|
96
|
+
* @param name - A unique preset name (non-empty after trimming).
|
|
97
|
+
* @param options - `fromDrawingId`: the kernel-plan drawing to take styles from.
|
|
98
|
+
* @returns The new {@linkcode PluginViewPreset}.
|
|
99
|
+
* @throws `VALIDATION` for an empty or duplicate name (with a hint);
|
|
100
|
+
* `PRECONDITION_FAILED` if Present mode is not open, the document is
|
|
101
|
+
* read-only, or the drawing is not a kernel vector plan (each with a
|
|
102
|
+
* hint); `HANDLE_INVALID` if `fromDrawingId` is not a drawing.
|
|
103
|
+
*
|
|
104
|
+
* @examplePrompt Save this drawing's styles as a new preset
|
|
105
|
+
* @examplePrompt Make a preset called Planning Issue from this plan
|
|
106
|
+
* @examplePrompt Turn my restyled drawing into a reusable style
|
|
107
|
+
*
|
|
108
|
+
* # Example
|
|
109
|
+
* ```ts
|
|
110
|
+
* const capabilities = await snaptrude.presentation.drawings.getCapabilities(drawing.id)
|
|
111
|
+
* if (capabilities.presets) {
|
|
112
|
+
* const preset = await snaptrude.presentation.viewPresets.create("Planning Issue", {
|
|
113
|
+
* fromDrawingId: drawing.id,
|
|
114
|
+
* })
|
|
115
|
+
* }
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
abstract create(name: string, options: {
|
|
119
|
+
fromDrawingId: string;
|
|
120
|
+
}): PluginApiReturn<PluginViewPreset>;
|
|
121
|
+
/**
|
|
122
|
+
* Duplicate a preset under a native-generated unique name. Drawing bindings
|
|
123
|
+
* do not change. Not undoable (catalog write). Built-ins can be copied.
|
|
124
|
+
*
|
|
125
|
+
* @param presetId - The preset to copy.
|
|
126
|
+
* @returns The new custom {@linkcode PluginViewPreset}.
|
|
127
|
+
* @throws `PRECONDITION_FAILED` if Present mode is not open or the document
|
|
128
|
+
* is read-only (each with a hint); `HANDLE_INVALID` if `presetId` does not
|
|
129
|
+
* exist.
|
|
130
|
+
*
|
|
131
|
+
* @examplePrompt Duplicate this preset
|
|
132
|
+
* @examplePrompt Make an editable copy of the built-in preset
|
|
133
|
+
* @examplePrompt Copy the Planning Issue preset so I can change it
|
|
134
|
+
*
|
|
135
|
+
* # Example
|
|
136
|
+
* ```ts
|
|
137
|
+
* const copy = await snaptrude.presentation.viewPresets.copy(preset.id)
|
|
138
|
+
* await snaptrude.presentation.viewPresets.rename(copy.id, "Planning Issue B")
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
abstract copy(presetId: string): PluginApiReturn<PluginViewPreset>;
|
|
142
|
+
/**
|
|
143
|
+
* Rename a custom preset. Names must stay unique; built-ins cannot be
|
|
144
|
+
* renamed. Not undoable (catalog write).
|
|
145
|
+
*
|
|
146
|
+
* @param presetId - The custom preset to rename.
|
|
147
|
+
* @param name - The new unique name (non-empty after trimming).
|
|
148
|
+
* @returns The renamed {@linkcode PluginViewPreset}.
|
|
149
|
+
* @throws `VALIDATION` when the catalog refuses: an empty or duplicate name,
|
|
150
|
+
* a built-in preset, or an unknown `presetId` (with a hint);
|
|
151
|
+
* `PRECONDITION_FAILED` if Present mode is not open or the document is
|
|
152
|
+
* read-only (each with a hint).
|
|
153
|
+
*
|
|
154
|
+
* @examplePrompt Rename this preset to Client Review
|
|
155
|
+
* @examplePrompt Call the copied preset Planning Issue B
|
|
156
|
+
* @examplePrompt Change the name of my custom drawing style
|
|
157
|
+
*
|
|
158
|
+
* # Example
|
|
159
|
+
* ```ts
|
|
160
|
+
* await snaptrude.presentation.viewPresets.rename(preset.id, "Client Review")
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
abstract rename(presetId: string, name: string): PluginApiReturn<PluginViewPreset>;
|
|
164
|
+
/**
|
|
165
|
+
* Replace a custom preset's values with the effective styles of a drawing
|
|
166
|
+
* already bound to it, then refresh every bound drawing. Built-ins cannot
|
|
167
|
+
* be updated. Not undoable (catalog write).
|
|
168
|
+
*
|
|
169
|
+
* @param presetId - The custom preset to update.
|
|
170
|
+
* @param options - `fromDrawingId`: a kernel-plan drawing bound to this preset.
|
|
171
|
+
* @returns The updated {@linkcode PluginViewPreset} (its `revision` grows).
|
|
172
|
+
* @throws `VALIDATION` when the catalog refuses: a built-in preset (with a
|
|
173
|
+
* hint); `PRECONDITION_FAILED` if Present mode is not open, the document
|
|
174
|
+
* is read-only, or the drawing is not a kernel vector plan bound to this
|
|
175
|
+
* preset (each with a hint); `HANDLE_INVALID` if `fromDrawingId` is not a
|
|
176
|
+
* drawing.
|
|
177
|
+
*
|
|
178
|
+
* @examplePrompt Update this preset from the current drawing styles
|
|
179
|
+
* @examplePrompt Push my style changes to every drawing using this preset
|
|
180
|
+
* @examplePrompt Save these overrides into the Planning Issue preset
|
|
181
|
+
*
|
|
182
|
+
* # Example
|
|
183
|
+
* ```ts
|
|
184
|
+
* await snaptrude.presentation.viewPresets.update(drawing.presetId!, {
|
|
185
|
+
* fromDrawingId: drawing.id,
|
|
186
|
+
* })
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
abstract update(presetId: string, options: {
|
|
190
|
+
fromDrawingId: string;
|
|
191
|
+
}): PluginApiReturn<PluginViewPreset>;
|
|
192
|
+
/**
|
|
193
|
+
* Delete a custom preset and rebind its drawings to another existing
|
|
194
|
+
* preset. Built-ins cannot be deleted. Not undoable (catalog write).
|
|
195
|
+
*
|
|
196
|
+
* @param presetId - The custom preset to delete.
|
|
197
|
+
* @param options - `replacementId`: the existing preset its drawings move to
|
|
198
|
+
* (not the deleted one).
|
|
199
|
+
* @returns Nothing.
|
|
200
|
+
* @throws `VALIDATION` when the catalog refuses: a built-in or unknown
|
|
201
|
+
* `presetId`, or an unknown `replacementId` (with a hint);
|
|
202
|
+
* `PRECONDITION_FAILED` if Present mode is not open or the document is
|
|
203
|
+
* read-only (each with a hint).
|
|
204
|
+
*
|
|
205
|
+
* @examplePrompt Delete this preset
|
|
206
|
+
* @examplePrompt Remove the old style preset and switch its drawings to the default
|
|
207
|
+
* @examplePrompt Get rid of the Planning Issue B preset
|
|
208
|
+
*
|
|
209
|
+
* # Example
|
|
210
|
+
* ```ts
|
|
211
|
+
* const presets = await snaptrude.presentation.viewPresets.list()
|
|
212
|
+
* const replacement = presets.find((each) => each.builtIn)!
|
|
213
|
+
* await snaptrude.presentation.viewPresets.delete(customPreset.id, {
|
|
214
|
+
* replacementId: replacement.id,
|
|
215
|
+
* })
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
abstract delete(presetId: string, options: {
|
|
219
|
+
replacementId: string;
|
|
220
|
+
}): PluginApiReturn<void>;
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=viewPresets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewPresets.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/viewPresets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB;;;;;iBAK3B,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAC/D,eAAO,MAAM,sBAAsB;;kBAExB,CAAA;AACX,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAC3E,eAAO,MAAM,0BAA0B;;;kBAE5B,CAAA;AACX,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AACD,eAAO,MAAM,0BAA0B;;;kBAErC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,0BAA0B,CAClC,CAAA;AACD,eAAO,MAAM,0BAA0B;;;kBAErC,CAAA;AACF,MAA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
|
2
2
|
import { PluginApiReturn } from "../../types";
|
|
3
3
|
/**
|
|
4
|
-
* Presentation views — read the saved
|
|
4
|
+
* Presentation views — read the saved plan, 3D, and elevation views used to prepare presentations.
|
|
5
5
|
*
|
|
6
6
|
* A **view** is a saved camera/plan: a sheet-ready 2D plan or a saved 3D view.
|
|
7
7
|
* A plugin can list and read views, capture them to images, activate one (move
|
|
@@ -22,10 +22,10 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
22
22
|
* List the saved views in the active project.
|
|
23
23
|
*
|
|
24
24
|
* @returns A {@linkcode PluginPresentationViewsListResult} with a `views` array
|
|
25
|
-
* of
|
|
25
|
+
* of plan, 3D, and elevation views (empty when the project has none).
|
|
26
26
|
*
|
|
27
27
|
* @examplePrompt List all the saved views
|
|
28
|
-
* @examplePrompt What
|
|
28
|
+
* @examplePrompt What plan, 3D, and elevation views are in this project?
|
|
29
29
|
* @examplePrompt Which view is currently active?
|
|
30
30
|
* @examplePrompt Get the names of every presentation view
|
|
31
31
|
* @examplePrompt Show me the 3D views I can put on a sheet
|
|
@@ -76,7 +76,9 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
76
76
|
*
|
|
77
77
|
* Captures the **current** viewport by default; pass `viewId` to capture a
|
|
78
78
|
* specific saved view (which briefly applies that view to the scene). Use
|
|
79
|
-
* `format`/`resolution` to control the output.
|
|
79
|
+
* `format`/`resolution` to control the output. This shoots the Design (3D)
|
|
80
|
+
* canvas; to screenshot the Present canvas use
|
|
81
|
+
* {@linkcode PluginPresentationCameraApi.capture}.
|
|
80
82
|
*
|
|
81
83
|
* @param options - All optional: `viewId` (capture this saved view; omit for the
|
|
82
84
|
* current viewport), `format` (default `"png"`), `resolution` (e.g. `"1280x720"`).
|
|
@@ -105,6 +107,10 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
105
107
|
* Applies the view's camera, visibility, and storey state to the live scene.
|
|
106
108
|
* Paired with {@linkcode PluginPresentationViewsApi.getActive}.
|
|
107
109
|
*
|
|
110
|
+
* While Present is open this sets the Design frame a view saved in Present
|
|
111
|
+
* is taken from; it never moves the Present sheet canvas; use
|
|
112
|
+
* `presentation.camera` for that.
|
|
113
|
+
*
|
|
108
114
|
* @param viewId - The id of the view to activate.
|
|
109
115
|
* @returns The id of the now-active view.
|
|
110
116
|
* @throws If no view has the given id.
|
|
@@ -125,6 +131,15 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
125
131
|
*
|
|
126
132
|
* Creates a camera bookmark (not geometry) from where the camera is now.
|
|
127
133
|
*
|
|
134
|
+
* Works while Present mode is open. Present draws its drawings on the same
|
|
135
|
+
* 3D scene, so a view saved in Present takes its framing (camera, 2D or 3D
|
|
136
|
+
* mode, projection, storey, building) from the Design frame instead: the one
|
|
137
|
+
* the user had when Present opened, or one a plugin set since with
|
|
138
|
+
* `setActive`, `updateSettings({ viewMode })`, `core.camera`, `core.zoom`,
|
|
139
|
+
* `core.storeys.setActive`, `core.storeys.layers.setActive` or
|
|
140
|
+
* `core.buildings.setActive`. It never moves the Present sheet canvas; use
|
|
141
|
+
* `presentation.camera` for that.
|
|
142
|
+
*
|
|
128
143
|
* @param name - Name for the new view (a default is used when omitted).
|
|
129
144
|
* @param options - Optional `kind` (what kind of view to save, default
|
|
130
145
|
* `"view"`) and `storey` (save the view on a specific storey — the storey is
|
|
@@ -157,12 +172,16 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
157
172
|
*
|
|
158
173
|
* @param viewId - The id of the view to read settings for.
|
|
159
174
|
* @returns The view's {@linkcode PluginPresentationViewSettings}, or `null` if
|
|
160
|
-
* no view has that id.
|
|
175
|
+
* no view has that id. A plan view also reports its `cutPlaneHeight`,
|
|
176
|
+
* `viewDepthStorey` and `showOverheadObjects` (saved values, or the product
|
|
177
|
+
* defaults for a plan saved before cut ranges existed); other views omit them.
|
|
161
178
|
*
|
|
162
179
|
* @examplePrompt What color mode is the Ground Floor view using?
|
|
163
180
|
* @examplePrompt Get the display settings for this view
|
|
164
181
|
* @examplePrompt Does the site plan view show axes and labels?
|
|
165
182
|
* @examplePrompt Read the background color of the active view
|
|
183
|
+
* @examplePrompt What is the cut height of this plan?
|
|
184
|
+
* @examplePrompt How deep does this plan look below the cut?
|
|
166
185
|
*
|
|
167
186
|
* # Example
|
|
168
187
|
* ```ts
|
|
@@ -209,14 +228,24 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
209
228
|
* toggle the view-settings modal runs); on other views the mode is applied
|
|
210
229
|
* the next time the view is activated.
|
|
211
230
|
*
|
|
231
|
+
* `cutPlaneHeight`, `viewDepthStorey` and `showOverheadObjects` set the plan's
|
|
232
|
+
* cut range and apply to **plan views only** (patching them on a 3D, elevation
|
|
233
|
+
* or site-plan view is rejected). `cutPlaneHeight` is in engine units, the same
|
|
234
|
+
* unit as `story.height`, and must be greater than 0 and less than the plan
|
|
235
|
+
* storey's height. `viewDepthStorey` must be an existing storey at or below the
|
|
236
|
+
* plan's storey. A sparse patch leaves the other two range fields as they
|
|
237
|
+
* were; on the active plan the canvas redraws live.
|
|
238
|
+
*
|
|
212
239
|
* @param viewId - The id of the view to update.
|
|
213
240
|
* @param settings - A partial {@linkcode PluginPresentationViewSettings}; any
|
|
214
241
|
* omitted field is left unchanged.
|
|
215
242
|
* @returns The updated view's `id`.
|
|
216
243
|
* @throws If writes are disabled, no view has the given id, the patch is
|
|
217
244
|
* contradictory (`showLabels: false` with a non-empty `labels`, or
|
|
218
|
-
* `showLabels: true` with an explicitly empty `labels` list),
|
|
219
|
-
* `viewMode: "perspective"` is patched on a 2D plan view
|
|
245
|
+
* `showLabels: true` with an explicitly empty `labels` list),
|
|
246
|
+
* `viewMode: "perspective"` is patched on a 2D plan view, a plan-range
|
|
247
|
+
* field is patched on a view that is not a plan, or the cut height / depth
|
|
248
|
+
* is out of range.
|
|
220
249
|
*
|
|
221
250
|
* @examplePrompt Switch this view to monochrome color mode
|
|
222
251
|
* @examplePrompt Turn off the axis in the Ground Floor view
|
|
@@ -224,6 +253,9 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
224
253
|
* @examplePrompt Show area labels on this view
|
|
225
254
|
* @examplePrompt Enable hidden-line mode for the section view
|
|
226
255
|
* @examplePrompt Make the 3D view orthographic instead of perspective
|
|
256
|
+
* @examplePrompt Raise the cut plane of the Ground Floor plan to 1.8 m
|
|
257
|
+
* @examplePrompt Show the basement below in this plan
|
|
258
|
+
* @examplePrompt Hide the overhead objects in this plan
|
|
227
259
|
*
|
|
228
260
|
* # Example
|
|
229
261
|
* ```ts
|
|
@@ -235,6 +267,12 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
235
267
|
* await snaptrude.presentation.views.updateSettings("view_123", {
|
|
236
268
|
* viewMode: "isometric",
|
|
237
269
|
* })
|
|
270
|
+
* // set a plan's range: cut 1.2 m up, show the basement below, no overhead
|
|
271
|
+
* await snaptrude.presentation.views.updateSettings("plan_1", {
|
|
272
|
+
* cutPlaneHeight: 4.72,
|
|
273
|
+
* viewDepthStorey: -1,
|
|
274
|
+
* showOverheadObjects: false,
|
|
275
|
+
* })
|
|
238
276
|
* ```
|
|
239
277
|
*/
|
|
240
278
|
abstract updateSettings(viewId: string, settings: Partial<PluginPresentationViewSettings>): PluginApiReturn<PluginPresentationViewsUpdateSettingsResult>;
|
|
@@ -287,13 +325,31 @@ export declare abstract class PluginPresentationViewsApi {
|
|
|
287
325
|
abstract delete(viewId: string): PluginApiReturn<PluginPresentationViewsDeleteResult>;
|
|
288
326
|
}
|
|
289
327
|
/**
|
|
290
|
-
* The
|
|
328
|
+
* The rendering category of a saved view. Existing plan/3D values are preserved;
|
|
329
|
+
* elevations are identified independently of their orthographic 3D camera.
|
|
291
330
|
*/
|
|
292
331
|
export declare const PluginPresentationViewType: z.ZodEnum<{
|
|
332
|
+
elevation: "elevation";
|
|
293
333
|
"2d": "2d";
|
|
294
334
|
"3d": "3d";
|
|
295
335
|
}>;
|
|
296
336
|
export type PluginPresentationViewType = z.infer<typeof PluginPresentationViewType>;
|
|
337
|
+
/** The native semantic kind persisted for a saved view. */
|
|
338
|
+
export declare const PluginPresentationViewKind: z.ZodEnum<{
|
|
339
|
+
elevation: "elevation";
|
|
340
|
+
plan: "plan";
|
|
341
|
+
sitePlan: "sitePlan";
|
|
342
|
+
threeD: "threeD";
|
|
343
|
+
}>;
|
|
344
|
+
export type PluginPresentationViewKind = z.infer<typeof PluginPresentationViewKind>;
|
|
345
|
+
/** Cardinal direction for an elevation; non-elevation views return `null`. */
|
|
346
|
+
export declare const PluginPresentationElevationDirection: z.ZodEnum<{
|
|
347
|
+
north: "north";
|
|
348
|
+
south: "south";
|
|
349
|
+
east: "east";
|
|
350
|
+
west: "west";
|
|
351
|
+
}>;
|
|
352
|
+
export type PluginPresentationElevationDirection = z.infer<typeof PluginPresentationElevationDirection>;
|
|
297
353
|
/**
|
|
298
354
|
* A saved presentation view.
|
|
299
355
|
*
|
|
@@ -301,7 +357,9 @@ export type PluginPresentationViewType = z.infer<typeof PluginPresentationViewTy
|
|
|
301
357
|
* |---|---|---|
|
|
302
358
|
* | `id` | `string` | Unique view id |
|
|
303
359
|
* | `name` | `string` | Display name |
|
|
304
|
-
* | `type` | `"2d" \| "3d"` |
|
|
360
|
+
* | `type` | `"2d" \| "3d" \| "elevation"` | Rendering category; elevations are distinct from ordinary 3D views |
|
|
361
|
+
* | `kind` | {@linkcode PluginPresentationViewKind} | Native semantic view kind |
|
|
362
|
+
* | `direction` | {@linkcode PluginPresentationElevationDirection}` \| null` | Cardinal direction for elevations; otherwise `null` |
|
|
305
363
|
* | `isActive` | `boolean` | Whether this view is the currently active view |
|
|
306
364
|
* | `storey` | `number \| null` | The storey this view was saved on (`null` on older views saved without one) |
|
|
307
365
|
*/
|
|
@@ -309,9 +367,22 @@ export declare const PluginPresentationView: z.ZodObject<{
|
|
|
309
367
|
id: z.ZodString;
|
|
310
368
|
name: z.ZodString;
|
|
311
369
|
type: z.ZodEnum<{
|
|
370
|
+
elevation: "elevation";
|
|
312
371
|
"2d": "2d";
|
|
313
372
|
"3d": "3d";
|
|
314
373
|
}>;
|
|
374
|
+
kind: z.ZodEnum<{
|
|
375
|
+
elevation: "elevation";
|
|
376
|
+
plan: "plan";
|
|
377
|
+
sitePlan: "sitePlan";
|
|
378
|
+
threeD: "threeD";
|
|
379
|
+
}>;
|
|
380
|
+
direction: z.ZodNullable<z.ZodEnum<{
|
|
381
|
+
north: "north";
|
|
382
|
+
south: "south";
|
|
383
|
+
east: "east";
|
|
384
|
+
west: "west";
|
|
385
|
+
}>>;
|
|
315
386
|
isActive: z.ZodBoolean;
|
|
316
387
|
storey: z.ZodNullable<z.ZodNumber>;
|
|
317
388
|
}, z.core.$strip>;
|
|
@@ -328,9 +399,22 @@ export declare const PluginPresentationViewsListResult: z.ZodObject<{
|
|
|
328
399
|
id: z.ZodString;
|
|
329
400
|
name: z.ZodString;
|
|
330
401
|
type: z.ZodEnum<{
|
|
402
|
+
elevation: "elevation";
|
|
331
403
|
"2d": "2d";
|
|
332
404
|
"3d": "3d";
|
|
333
405
|
}>;
|
|
406
|
+
kind: z.ZodEnum<{
|
|
407
|
+
elevation: "elevation";
|
|
408
|
+
plan: "plan";
|
|
409
|
+
sitePlan: "sitePlan";
|
|
410
|
+
threeD: "threeD";
|
|
411
|
+
}>;
|
|
412
|
+
direction: z.ZodNullable<z.ZodEnum<{
|
|
413
|
+
north: "north";
|
|
414
|
+
south: "south";
|
|
415
|
+
east: "east";
|
|
416
|
+
west: "west";
|
|
417
|
+
}>>;
|
|
334
418
|
isActive: z.ZodBoolean;
|
|
335
419
|
storey: z.ZodNullable<z.ZodNumber>;
|
|
336
420
|
}, z.core.$strip>>;
|
|
@@ -356,9 +440,22 @@ export declare const PluginPresentationViewsGetResult: z.ZodNullable<z.ZodObject
|
|
|
356
440
|
id: z.ZodString;
|
|
357
441
|
name: z.ZodString;
|
|
358
442
|
type: z.ZodEnum<{
|
|
443
|
+
elevation: "elevation";
|
|
359
444
|
"2d": "2d";
|
|
360
445
|
"3d": "3d";
|
|
361
446
|
}>;
|
|
447
|
+
kind: z.ZodEnum<{
|
|
448
|
+
elevation: "elevation";
|
|
449
|
+
plan: "plan";
|
|
450
|
+
sitePlan: "sitePlan";
|
|
451
|
+
threeD: "threeD";
|
|
452
|
+
}>;
|
|
453
|
+
direction: z.ZodNullable<z.ZodEnum<{
|
|
454
|
+
north: "north";
|
|
455
|
+
south: "south";
|
|
456
|
+
east: "east";
|
|
457
|
+
west: "west";
|
|
458
|
+
}>>;
|
|
362
459
|
isActive: z.ZodBoolean;
|
|
363
460
|
storey: z.ZodNullable<z.ZodNumber>;
|
|
364
461
|
}, z.core.$strip>>;
|
|
@@ -437,9 +534,22 @@ export declare const PluginPresentationViewsCreateResult: z.ZodObject<{
|
|
|
437
534
|
id: z.ZodString;
|
|
438
535
|
name: z.ZodString;
|
|
439
536
|
type: z.ZodEnum<{
|
|
537
|
+
elevation: "elevation";
|
|
440
538
|
"2d": "2d";
|
|
441
539
|
"3d": "3d";
|
|
442
540
|
}>;
|
|
541
|
+
kind: z.ZodEnum<{
|
|
542
|
+
elevation: "elevation";
|
|
543
|
+
plan: "plan";
|
|
544
|
+
sitePlan: "sitePlan";
|
|
545
|
+
threeD: "threeD";
|
|
546
|
+
}>;
|
|
547
|
+
direction: z.ZodNullable<z.ZodEnum<{
|
|
548
|
+
north: "north";
|
|
549
|
+
south: "south";
|
|
550
|
+
east: "east";
|
|
551
|
+
west: "west";
|
|
552
|
+
}>>;
|
|
443
553
|
isActive: z.ZodBoolean;
|
|
444
554
|
storey: z.ZodNullable<z.ZodNumber>;
|
|
445
555
|
}, z.core.$strip>;
|
|
@@ -507,6 +617,9 @@ export type PluginPresentationViewMode = z.infer<typeof PluginPresentationViewMo
|
|
|
507
617
|
* | `showEdges` | `boolean` | Whether edges are shown; `false` = hidden-line rendering |
|
|
508
618
|
* | `showLabels` | `boolean` | Master label switch — whether on-canvas labels are shown at all. `true` always pairs with a non-empty `labels` selection (labels render only while the selection is non-empty; there is no labels-on-with-empty-selection state) |
|
|
509
619
|
* | `labels` | {@linkcode PluginPresentationViewLabel}`[]` | Which label categories are selected. When `showLabels` is `false` the view stores no selection and this reads `[]` |
|
|
620
|
+
* | `cutPlaneHeight` | `number`? | **Plan views only.** Height of the plan's cut plane above its storey base, in engine units (the unit `story.height` uses). Absent on 3D and elevation views |
|
|
621
|
+
* | `viewDepthStorey` | `number`? | **Plan views only.** The lowest storey the plan shows below the cut; defaults to the plan's own storey. Absent on 3D and elevation views |
|
|
622
|
+
* | `showOverheadObjects` | `boolean`? | **Plan views only.** Whether objects above the cut are drawn as dashed overhead linework. Absent on 3D and elevation views |
|
|
510
623
|
*/
|
|
511
624
|
export declare const PluginPresentationViewSettings: z.ZodObject<{
|
|
512
625
|
backgroundColor: z.ZodString;
|
|
@@ -527,6 +640,9 @@ export declare const PluginPresentationViewSettings: z.ZodObject<{
|
|
|
527
640
|
objectLabels: "objectLabels";
|
|
528
641
|
areas: "areas";
|
|
529
642
|
}>>;
|
|
643
|
+
cutPlaneHeight: z.ZodOptional<z.ZodNumber>;
|
|
644
|
+
viewDepthStorey: z.ZodOptional<z.ZodNumber>;
|
|
645
|
+
showOverheadObjects: z.ZodOptional<z.ZodBoolean>;
|
|
530
646
|
}, z.core.$strip>;
|
|
531
647
|
export type PluginPresentationViewSettings = z.infer<typeof PluginPresentationViewSettings>;
|
|
532
648
|
/**
|
|
@@ -563,6 +679,9 @@ export declare const PluginPresentationViewsGetSettingsResult: z.ZodNullable<z.Z
|
|
|
563
679
|
objectLabels: "objectLabels";
|
|
564
680
|
areas: "areas";
|
|
565
681
|
}>>;
|
|
682
|
+
cutPlaneHeight: z.ZodOptional<z.ZodNumber>;
|
|
683
|
+
viewDepthStorey: z.ZodOptional<z.ZodNumber>;
|
|
684
|
+
showOverheadObjects: z.ZodOptional<z.ZodBoolean>;
|
|
566
685
|
}, z.core.$strip>>;
|
|
567
686
|
export type PluginPresentationViewsGetSettingsResult = z.infer<typeof PluginPresentationViewsGetSettingsResult>;
|
|
568
687
|
/**
|
|
@@ -598,6 +717,9 @@ export declare const PluginPresentationViewsUpdateSettingsArgs: z.ZodObject<{
|
|
|
598
717
|
objectLabels: "objectLabels";
|
|
599
718
|
areas: "areas";
|
|
600
719
|
}>>>;
|
|
720
|
+
cutPlaneHeight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
721
|
+
viewDepthStorey: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
722
|
+
showOverheadObjects: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
601
723
|
}, z.core.$strip>;
|
|
602
724
|
}, z.core.$strip>;
|
|
603
725
|
export type PluginPresentationViewsUpdateSettingsArgs = z.infer<typeof PluginPresentationViewsUpdateSettingsArgs>;
|
|
@@ -624,9 +746,22 @@ export declare const PluginPresentationViewsRenameResult: z.ZodObject<{
|
|
|
624
746
|
id: z.ZodString;
|
|
625
747
|
name: z.ZodString;
|
|
626
748
|
type: z.ZodEnum<{
|
|
749
|
+
elevation: "elevation";
|
|
627
750
|
"2d": "2d";
|
|
628
751
|
"3d": "3d";
|
|
629
752
|
}>;
|
|
753
|
+
kind: z.ZodEnum<{
|
|
754
|
+
elevation: "elevation";
|
|
755
|
+
plan: "plan";
|
|
756
|
+
sitePlan: "sitePlan";
|
|
757
|
+
threeD: "threeD";
|
|
758
|
+
}>;
|
|
759
|
+
direction: z.ZodNullable<z.ZodEnum<{
|
|
760
|
+
north: "north";
|
|
761
|
+
south: "south";
|
|
762
|
+
east: "east";
|
|
763
|
+
west: "west";
|
|
764
|
+
}>>;
|
|
630
765
|
isActive: z.ZodBoolean;
|
|
631
766
|
storey: z.ZodNullable<z.ZodNumber>;
|
|
632
767
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../../src/api/presentation/views.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,M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