@snaptrude/plugin-core 0.9.12 → 0.9.14-networks-20260930.1
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 +45 -0
- package/dist/api/core/geom/create/index.d.ts +935 -100
- 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 +2 -0
- 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/design/create/grids.d.ts +1 -1
- package/dist/api/design/family.d.ts +117 -10
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +6 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/networks.d.ts +530 -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 +3 -3
- package/dist/api/design/query/index.d.ts +47 -0
- package/dist/api/design/query/index.d.ts.map +1 -1
- package/dist/api/design/query/spaces.d.ts +5 -5
- package/dist/api/design/update/index.d.ts +99 -0
- package/dist/api/design/update/index.d.ts.map +1 -1
- package/dist/api/entity/referenceLine.d.ts +1 -1
- package/dist/api/entity/space.d.ts +4 -4
- package/dist/api/entity/story.d.ts +4 -4
- package/dist/api/presentation/aiInspiration.d.ts +5 -5
- package/dist/api/program/site.d.ts +4 -4
- package/dist/api/program/spreadsheet.d.ts +4 -4
- package/dist/handles.d.ts +13 -3
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +3626 -2946
- 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 +3563 -2946
- 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/src/api/core/geom/create/index.ts +1030 -101
- 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 +2 -0
- package/src/api/core/geom/update/profile.ts +2 -0
- package/src/api/core/handles/index.ts +3 -2
- package/src/api/design/family.ts +123 -10
- package/src/api/design/index.ts +7 -0
- package/src/api/design/networks.ts +315 -0
- package/src/api/design/query/geometry/index.ts +35 -4
- package/src/api/design/query/index.ts +50 -0
- package/src/api/design/update/index.ts +106 -0
- package/src/handles.ts +18 -3
- package/src/index.ts +2 -0
- package/src/massParameters.ops.ts +246 -0
- package/src/massParameters.ts +427 -0
- package/test/massParameters.test.mjs +952 -0
- package/api-manifest.json +0 -8371
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import type { PluginApiReturn } from "../../types";
|
|
3
|
+
/** Authored world-space connector. This is not a claim of certified family connector metadata. */
|
|
4
|
+
export declare const NetworkPort: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
7
|
+
direction: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
8
|
+
system: z.ZodString;
|
|
9
|
+
sizeMm: z.ZodNumber;
|
|
10
|
+
heightMm: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
/** The agent supplies every route and section. The host does not size or route a network. */
|
|
13
|
+
export declare const NetworkGeometry: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
14
|
+
kind: z.ZodLiteral<"family">;
|
|
15
|
+
definitionId: z.ZodString;
|
|
16
|
+
version: z.ZodNumber;
|
|
17
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean]>>;
|
|
18
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
19
|
+
rotationDeg: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
20
|
+
ports: z.ZodArray<z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
23
|
+
direction: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
24
|
+
system: z.ZodString;
|
|
25
|
+
sizeMm: z.ZodNumber;
|
|
26
|
+
heightMm: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
}, z.core.$strict>>;
|
|
28
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"route">;
|
|
30
|
+
pathMm: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
31
|
+
system: z.ZodString;
|
|
32
|
+
section: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
33
|
+
kind: z.ZodLiteral<"round">;
|
|
34
|
+
diameterMm: z.ZodNumber;
|
|
35
|
+
wallMm: z.ZodNumber;
|
|
36
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
37
|
+
kind: z.ZodLiteral<"rectangular">;
|
|
38
|
+
widthMm: z.ZodNumber;
|
|
39
|
+
heightMm: z.ZodNumber;
|
|
40
|
+
wallMm: z.ZodNumber;
|
|
41
|
+
}, z.core.$strict>], "kind">;
|
|
42
|
+
}, z.core.$strict>], "kind">;
|
|
43
|
+
/** Electrical connectivity and circuit membership are distinct from physical route occupancy. */
|
|
44
|
+
export declare const ElectricalGraphDocument: z.ZodObject<{
|
|
45
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
46
|
+
label: z.ZodString;
|
|
47
|
+
architectureRevision: z.ZodString;
|
|
48
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
from: z.ZodObject<{
|
|
51
|
+
node: z.ZodString;
|
|
52
|
+
port: z.ZodString;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
to: z.ZodObject<{
|
|
55
|
+
node: z.ZodString;
|
|
56
|
+
port: z.ZodString;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
directed: z.ZodBoolean;
|
|
59
|
+
}, z.core.$strict>>;
|
|
60
|
+
relationships: z.ZodArray<z.ZodObject<{
|
|
61
|
+
node: z.ZodString;
|
|
62
|
+
relation: z.ZodEnum<{
|
|
63
|
+
within: "within";
|
|
64
|
+
mountedOn: "mountedOn";
|
|
65
|
+
serves: "serves";
|
|
66
|
+
penetrates: "penetrates";
|
|
67
|
+
}>;
|
|
68
|
+
target: z.ZodObject<{
|
|
69
|
+
kind: z.ZodEnum<{
|
|
70
|
+
topology: "topology";
|
|
71
|
+
component: "component";
|
|
72
|
+
}>;
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
}, z.core.$strict>>;
|
|
76
|
+
domain: z.ZodLiteral<"electrical">;
|
|
77
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
storey: z.ZodNumber;
|
|
80
|
+
geometry: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"family">;
|
|
82
|
+
definitionId: z.ZodString;
|
|
83
|
+
version: z.ZodNumber;
|
|
84
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean]>>;
|
|
85
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
86
|
+
rotationDeg: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
87
|
+
ports: z.ZodArray<z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
90
|
+
direction: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
91
|
+
system: z.ZodString;
|
|
92
|
+
sizeMm: z.ZodNumber;
|
|
93
|
+
heightMm: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
}, z.core.$strict>>;
|
|
95
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
96
|
+
kind: z.ZodLiteral<"route">;
|
|
97
|
+
pathMm: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
98
|
+
system: z.ZodString;
|
|
99
|
+
section: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
100
|
+
kind: z.ZodLiteral<"round">;
|
|
101
|
+
diameterMm: z.ZodNumber;
|
|
102
|
+
wallMm: z.ZodNumber;
|
|
103
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
104
|
+
kind: z.ZodLiteral<"rectangular">;
|
|
105
|
+
widthMm: z.ZodNumber;
|
|
106
|
+
heightMm: z.ZodNumber;
|
|
107
|
+
wallMm: z.ZodNumber;
|
|
108
|
+
}, z.core.$strict>], "kind">;
|
|
109
|
+
}, z.core.$strict>], "kind">;
|
|
110
|
+
kind: z.ZodEnum<{
|
|
111
|
+
transformer: "transformer";
|
|
112
|
+
mainBoard: "mainBoard";
|
|
113
|
+
distributionBoard: "distributionBoard";
|
|
114
|
+
mcbBox: "mcbBox";
|
|
115
|
+
junctionBox: "junctionBox";
|
|
116
|
+
switch: "switch";
|
|
117
|
+
outlet: "outlet";
|
|
118
|
+
light: "light";
|
|
119
|
+
load: "load";
|
|
120
|
+
equipment: "equipment";
|
|
121
|
+
fitting: "fitting";
|
|
122
|
+
wire: "wire";
|
|
123
|
+
cable: "cable";
|
|
124
|
+
conduit: "conduit";
|
|
125
|
+
cableDuct: "cableDuct";
|
|
126
|
+
cableTray: "cableTray";
|
|
127
|
+
}>;
|
|
128
|
+
}, z.core.$strict>>;
|
|
129
|
+
circuits: z.ZodArray<z.ZodObject<{
|
|
130
|
+
id: z.ZodString;
|
|
131
|
+
source: z.ZodString;
|
|
132
|
+
loads: z.ZodArray<z.ZodString>;
|
|
133
|
+
routes: z.ZodArray<z.ZodString>;
|
|
134
|
+
voltage: z.ZodNumber;
|
|
135
|
+
phases: z.ZodNumber;
|
|
136
|
+
ratedAmps: z.ZodNumber;
|
|
137
|
+
}, z.core.$strict>>;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
/** Plumbing uses explicit directed port connections; touching geometry never creates a connection. */
|
|
140
|
+
export declare const PlumbingGraphDocument: z.ZodObject<{
|
|
141
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
142
|
+
label: z.ZodString;
|
|
143
|
+
architectureRevision: z.ZodString;
|
|
144
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
145
|
+
id: z.ZodString;
|
|
146
|
+
from: z.ZodObject<{
|
|
147
|
+
node: z.ZodString;
|
|
148
|
+
port: z.ZodString;
|
|
149
|
+
}, z.core.$strict>;
|
|
150
|
+
to: z.ZodObject<{
|
|
151
|
+
node: z.ZodString;
|
|
152
|
+
port: z.ZodString;
|
|
153
|
+
}, z.core.$strict>;
|
|
154
|
+
directed: z.ZodBoolean;
|
|
155
|
+
}, z.core.$strict>>;
|
|
156
|
+
relationships: z.ZodArray<z.ZodObject<{
|
|
157
|
+
node: z.ZodString;
|
|
158
|
+
relation: z.ZodEnum<{
|
|
159
|
+
within: "within";
|
|
160
|
+
mountedOn: "mountedOn";
|
|
161
|
+
serves: "serves";
|
|
162
|
+
penetrates: "penetrates";
|
|
163
|
+
}>;
|
|
164
|
+
target: z.ZodObject<{
|
|
165
|
+
kind: z.ZodEnum<{
|
|
166
|
+
topology: "topology";
|
|
167
|
+
component: "component";
|
|
168
|
+
}>;
|
|
169
|
+
id: z.ZodString;
|
|
170
|
+
}, z.core.$strict>;
|
|
171
|
+
}, z.core.$strict>>;
|
|
172
|
+
domain: z.ZodLiteral<"plumbing">;
|
|
173
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
174
|
+
id: z.ZodString;
|
|
175
|
+
storey: z.ZodNumber;
|
|
176
|
+
geometry: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
177
|
+
kind: z.ZodLiteral<"family">;
|
|
178
|
+
definitionId: z.ZodString;
|
|
179
|
+
version: z.ZodNumber;
|
|
180
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean]>>;
|
|
181
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
182
|
+
rotationDeg: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
183
|
+
ports: z.ZodArray<z.ZodObject<{
|
|
184
|
+
id: z.ZodString;
|
|
185
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
186
|
+
direction: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
187
|
+
system: z.ZodString;
|
|
188
|
+
sizeMm: z.ZodNumber;
|
|
189
|
+
heightMm: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
}, z.core.$strict>>;
|
|
191
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
192
|
+
kind: z.ZodLiteral<"route">;
|
|
193
|
+
pathMm: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
194
|
+
system: z.ZodString;
|
|
195
|
+
section: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
196
|
+
kind: z.ZodLiteral<"round">;
|
|
197
|
+
diameterMm: z.ZodNumber;
|
|
198
|
+
wallMm: z.ZodNumber;
|
|
199
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
200
|
+
kind: z.ZodLiteral<"rectangular">;
|
|
201
|
+
widthMm: z.ZodNumber;
|
|
202
|
+
heightMm: z.ZodNumber;
|
|
203
|
+
wallMm: z.ZodNumber;
|
|
204
|
+
}, z.core.$strict>], "kind">;
|
|
205
|
+
}, z.core.$strict>], "kind">;
|
|
206
|
+
kind: z.ZodEnum<{
|
|
207
|
+
pipe: "pipe";
|
|
208
|
+
riser: "riser";
|
|
209
|
+
equipment: "equipment";
|
|
210
|
+
fitting: "fitting";
|
|
211
|
+
fixture: "fixture";
|
|
212
|
+
tank: "tank";
|
|
213
|
+
pump: "pump";
|
|
214
|
+
valve: "valve";
|
|
215
|
+
manifold: "manifold";
|
|
216
|
+
}>;
|
|
217
|
+
}, z.core.$strict>>;
|
|
218
|
+
}, z.core.$strict>;
|
|
219
|
+
export declare const NetworkGraphDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
220
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
221
|
+
label: z.ZodString;
|
|
222
|
+
architectureRevision: z.ZodString;
|
|
223
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
224
|
+
id: z.ZodString;
|
|
225
|
+
from: z.ZodObject<{
|
|
226
|
+
node: z.ZodString;
|
|
227
|
+
port: z.ZodString;
|
|
228
|
+
}, z.core.$strict>;
|
|
229
|
+
to: z.ZodObject<{
|
|
230
|
+
node: z.ZodString;
|
|
231
|
+
port: z.ZodString;
|
|
232
|
+
}, z.core.$strict>;
|
|
233
|
+
directed: z.ZodBoolean;
|
|
234
|
+
}, z.core.$strict>>;
|
|
235
|
+
relationships: z.ZodArray<z.ZodObject<{
|
|
236
|
+
node: z.ZodString;
|
|
237
|
+
relation: z.ZodEnum<{
|
|
238
|
+
within: "within";
|
|
239
|
+
mountedOn: "mountedOn";
|
|
240
|
+
serves: "serves";
|
|
241
|
+
penetrates: "penetrates";
|
|
242
|
+
}>;
|
|
243
|
+
target: z.ZodObject<{
|
|
244
|
+
kind: z.ZodEnum<{
|
|
245
|
+
topology: "topology";
|
|
246
|
+
component: "component";
|
|
247
|
+
}>;
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
}, z.core.$strict>;
|
|
250
|
+
}, z.core.$strict>>;
|
|
251
|
+
domain: z.ZodLiteral<"electrical">;
|
|
252
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
253
|
+
id: z.ZodString;
|
|
254
|
+
storey: z.ZodNumber;
|
|
255
|
+
geometry: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
256
|
+
kind: z.ZodLiteral<"family">;
|
|
257
|
+
definitionId: z.ZodString;
|
|
258
|
+
version: z.ZodNumber;
|
|
259
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean]>>;
|
|
260
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
261
|
+
rotationDeg: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
262
|
+
ports: z.ZodArray<z.ZodObject<{
|
|
263
|
+
id: z.ZodString;
|
|
264
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
265
|
+
direction: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
266
|
+
system: z.ZodString;
|
|
267
|
+
sizeMm: z.ZodNumber;
|
|
268
|
+
heightMm: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
}, z.core.$strict>>;
|
|
270
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
271
|
+
kind: z.ZodLiteral<"route">;
|
|
272
|
+
pathMm: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
273
|
+
system: z.ZodString;
|
|
274
|
+
section: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
275
|
+
kind: z.ZodLiteral<"round">;
|
|
276
|
+
diameterMm: z.ZodNumber;
|
|
277
|
+
wallMm: z.ZodNumber;
|
|
278
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
279
|
+
kind: z.ZodLiteral<"rectangular">;
|
|
280
|
+
widthMm: z.ZodNumber;
|
|
281
|
+
heightMm: z.ZodNumber;
|
|
282
|
+
wallMm: z.ZodNumber;
|
|
283
|
+
}, z.core.$strict>], "kind">;
|
|
284
|
+
}, z.core.$strict>], "kind">;
|
|
285
|
+
kind: z.ZodEnum<{
|
|
286
|
+
transformer: "transformer";
|
|
287
|
+
mainBoard: "mainBoard";
|
|
288
|
+
distributionBoard: "distributionBoard";
|
|
289
|
+
mcbBox: "mcbBox";
|
|
290
|
+
junctionBox: "junctionBox";
|
|
291
|
+
switch: "switch";
|
|
292
|
+
outlet: "outlet";
|
|
293
|
+
light: "light";
|
|
294
|
+
load: "load";
|
|
295
|
+
equipment: "equipment";
|
|
296
|
+
fitting: "fitting";
|
|
297
|
+
wire: "wire";
|
|
298
|
+
cable: "cable";
|
|
299
|
+
conduit: "conduit";
|
|
300
|
+
cableDuct: "cableDuct";
|
|
301
|
+
cableTray: "cableTray";
|
|
302
|
+
}>;
|
|
303
|
+
}, z.core.$strict>>;
|
|
304
|
+
circuits: z.ZodArray<z.ZodObject<{
|
|
305
|
+
id: z.ZodString;
|
|
306
|
+
source: z.ZodString;
|
|
307
|
+
loads: z.ZodArray<z.ZodString>;
|
|
308
|
+
routes: z.ZodArray<z.ZodString>;
|
|
309
|
+
voltage: z.ZodNumber;
|
|
310
|
+
phases: z.ZodNumber;
|
|
311
|
+
ratedAmps: z.ZodNumber;
|
|
312
|
+
}, z.core.$strict>>;
|
|
313
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
314
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
315
|
+
label: z.ZodString;
|
|
316
|
+
architectureRevision: z.ZodString;
|
|
317
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
318
|
+
id: z.ZodString;
|
|
319
|
+
from: z.ZodObject<{
|
|
320
|
+
node: z.ZodString;
|
|
321
|
+
port: z.ZodString;
|
|
322
|
+
}, z.core.$strict>;
|
|
323
|
+
to: z.ZodObject<{
|
|
324
|
+
node: z.ZodString;
|
|
325
|
+
port: z.ZodString;
|
|
326
|
+
}, z.core.$strict>;
|
|
327
|
+
directed: z.ZodBoolean;
|
|
328
|
+
}, z.core.$strict>>;
|
|
329
|
+
relationships: z.ZodArray<z.ZodObject<{
|
|
330
|
+
node: z.ZodString;
|
|
331
|
+
relation: z.ZodEnum<{
|
|
332
|
+
within: "within";
|
|
333
|
+
mountedOn: "mountedOn";
|
|
334
|
+
serves: "serves";
|
|
335
|
+
penetrates: "penetrates";
|
|
336
|
+
}>;
|
|
337
|
+
target: z.ZodObject<{
|
|
338
|
+
kind: z.ZodEnum<{
|
|
339
|
+
topology: "topology";
|
|
340
|
+
component: "component";
|
|
341
|
+
}>;
|
|
342
|
+
id: z.ZodString;
|
|
343
|
+
}, z.core.$strict>;
|
|
344
|
+
}, z.core.$strict>>;
|
|
345
|
+
domain: z.ZodLiteral<"plumbing">;
|
|
346
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
347
|
+
id: z.ZodString;
|
|
348
|
+
storey: z.ZodNumber;
|
|
349
|
+
geometry: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
350
|
+
kind: z.ZodLiteral<"family">;
|
|
351
|
+
definitionId: z.ZodString;
|
|
352
|
+
version: z.ZodNumber;
|
|
353
|
+
values: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodBoolean]>>;
|
|
354
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
355
|
+
rotationDeg: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
356
|
+
ports: z.ZodArray<z.ZodObject<{
|
|
357
|
+
id: z.ZodString;
|
|
358
|
+
positionMm: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
359
|
+
direction: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
360
|
+
system: z.ZodString;
|
|
361
|
+
sizeMm: z.ZodNumber;
|
|
362
|
+
heightMm: z.ZodOptional<z.ZodNumber>;
|
|
363
|
+
}, z.core.$strict>>;
|
|
364
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
365
|
+
kind: z.ZodLiteral<"route">;
|
|
366
|
+
pathMm: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
367
|
+
system: z.ZodString;
|
|
368
|
+
section: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
369
|
+
kind: z.ZodLiteral<"round">;
|
|
370
|
+
diameterMm: z.ZodNumber;
|
|
371
|
+
wallMm: z.ZodNumber;
|
|
372
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
373
|
+
kind: z.ZodLiteral<"rectangular">;
|
|
374
|
+
widthMm: z.ZodNumber;
|
|
375
|
+
heightMm: z.ZodNumber;
|
|
376
|
+
wallMm: z.ZodNumber;
|
|
377
|
+
}, z.core.$strict>], "kind">;
|
|
378
|
+
}, z.core.$strict>], "kind">;
|
|
379
|
+
kind: z.ZodEnum<{
|
|
380
|
+
pipe: "pipe";
|
|
381
|
+
riser: "riser";
|
|
382
|
+
equipment: "equipment";
|
|
383
|
+
fitting: "fitting";
|
|
384
|
+
fixture: "fixture";
|
|
385
|
+
tank: "tank";
|
|
386
|
+
pump: "pump";
|
|
387
|
+
valve: "valve";
|
|
388
|
+
manifold: "manifold";
|
|
389
|
+
}>;
|
|
390
|
+
}, z.core.$strict>>;
|
|
391
|
+
}, z.core.$strict>], "domain">;
|
|
392
|
+
export type NetworkGraphDocument = z.infer<typeof NetworkGraphDocument>;
|
|
393
|
+
export type NetworkNode = NetworkGraphDocument["nodes"][number];
|
|
394
|
+
export type NetworkPort = z.infer<typeof NetworkPort>;
|
|
395
|
+
export type NetworkDomain = NetworkGraphDocument["domain"];
|
|
396
|
+
/** JSON is an authored document, not a transport for live geometry handles. Maximum 2 MB characters. */
|
|
397
|
+
export declare const NetworkValidateArgs: z.ZodObject<{
|
|
398
|
+
graphJson: z.ZodString;
|
|
399
|
+
}, z.core.$strict>;
|
|
400
|
+
export declare const NetworkCreateArgs: z.ZodObject<{
|
|
401
|
+
graphJson: z.ZodString;
|
|
402
|
+
requestId: z.ZodString;
|
|
403
|
+
}, z.core.$strict>;
|
|
404
|
+
export declare const NetworkGetArgs: z.ZodObject<{
|
|
405
|
+
graphId: z.ZodString;
|
|
406
|
+
}, z.core.$strict>;
|
|
407
|
+
export declare const NetworkContextArgs: z.ZodObject<{
|
|
408
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
409
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
410
|
+
}, z.core.$strict>;
|
|
411
|
+
export declare const NetworkQueryArgs: z.ZodObject<{
|
|
412
|
+
graphId: z.ZodString;
|
|
413
|
+
revision: z.ZodNumber;
|
|
414
|
+
queryJson: z.ZodString;
|
|
415
|
+
}, z.core.$strict>;
|
|
416
|
+
export declare const NetworkQuery: z.ZodObject<{
|
|
417
|
+
kind: z.ZodEnum<{
|
|
418
|
+
ports: "ports";
|
|
419
|
+
relationships: "relationships";
|
|
420
|
+
nodes: "nodes";
|
|
421
|
+
circuits: "circuits";
|
|
422
|
+
connected: "connected";
|
|
423
|
+
upstream: "upstream";
|
|
424
|
+
downstream: "downstream";
|
|
425
|
+
nearestPort: "nearestPort";
|
|
426
|
+
}>;
|
|
427
|
+
node: z.ZodOptional<z.ZodString>;
|
|
428
|
+
pointMm: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>>;
|
|
429
|
+
radiusMm: z.ZodOptional<z.ZodNumber>;
|
|
430
|
+
system: z.ZodOptional<z.ZodString>;
|
|
431
|
+
sizeMm: z.ZodOptional<z.ZodNumber>;
|
|
432
|
+
heightMm: z.ZodOptional<z.ZodNumber>;
|
|
433
|
+
offset: z.ZodDefault<z.ZodNumber>;
|
|
434
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
435
|
+
}, z.core.$strict>;
|
|
436
|
+
export type NetworkQuery = z.infer<typeof NetworkQuery>;
|
|
437
|
+
export interface NetworkDiagnostic {
|
|
438
|
+
path: string;
|
|
439
|
+
message: string;
|
|
440
|
+
}
|
|
441
|
+
export interface NetworkValidation {
|
|
442
|
+
ok: boolean;
|
|
443
|
+
diagnostics: NetworkDiagnostic[];
|
|
444
|
+
nodeCount: number;
|
|
445
|
+
}
|
|
446
|
+
/** Durable node-to-scene mapping. Each node owns one component and its pinned generated recipe. */
|
|
447
|
+
export declare const NetworkComponentBinding: z.ZodObject<{
|
|
448
|
+
nodeId: z.ZodString;
|
|
449
|
+
componentId: z.ZodString;
|
|
450
|
+
definitionId: z.ZodString;
|
|
451
|
+
definitionVersion: z.ZodNumber;
|
|
452
|
+
}, z.core.$strict>;
|
|
453
|
+
export type NetworkComponentBinding = z.infer<typeof NetworkComponentBinding>;
|
|
454
|
+
export interface SavedNetworkGraph {
|
|
455
|
+
id: string;
|
|
456
|
+
domain: NetworkDomain;
|
|
457
|
+
revision: 1;
|
|
458
|
+
requestId: string;
|
|
459
|
+
document: NetworkGraphDocument;
|
|
460
|
+
components: NetworkComponentBinding[];
|
|
461
|
+
}
|
|
462
|
+
export interface NetworkCreateResult {
|
|
463
|
+
graphId: string;
|
|
464
|
+
revision: number;
|
|
465
|
+
components: NetworkComponentBinding[];
|
|
466
|
+
alreadyCreated: boolean;
|
|
467
|
+
/** Queue acceptance is not a durable database acknowledgement. */
|
|
468
|
+
saveStatus: "queued" | "existing";
|
|
469
|
+
}
|
|
470
|
+
export interface NetworkContextResult {
|
|
471
|
+
proposalId: string;
|
|
472
|
+
buildingId: string | null;
|
|
473
|
+
revision: string;
|
|
474
|
+
/** PG2's native serialization uses Snaptrude units (1 SU = 254 mm). */
|
|
475
|
+
topologyUnits: "SU";
|
|
476
|
+
topologyJson: string;
|
|
477
|
+
nextOffset: number | null;
|
|
478
|
+
total: number;
|
|
479
|
+
storeys: {
|
|
480
|
+
number: number;
|
|
481
|
+
elevationMm: number;
|
|
482
|
+
}[];
|
|
483
|
+
components: {
|
|
484
|
+
id: string;
|
|
485
|
+
type: string;
|
|
486
|
+
storey: number;
|
|
487
|
+
minMm: number[];
|
|
488
|
+
maxMm: number[];
|
|
489
|
+
}[];
|
|
490
|
+
/** Saved graph inventory, paged with topology/components. Use these IDs after reopening a project. */
|
|
491
|
+
networks: {
|
|
492
|
+
graphId: string;
|
|
493
|
+
domain: NetworkDomain;
|
|
494
|
+
revision: number;
|
|
495
|
+
label: string;
|
|
496
|
+
componentCount: number;
|
|
497
|
+
}[];
|
|
498
|
+
}
|
|
499
|
+
export interface NetworkQueryResult {
|
|
500
|
+
revision: number;
|
|
501
|
+
resultJson: string;
|
|
502
|
+
nextOffset: number | null;
|
|
503
|
+
total: number;
|
|
504
|
+
}
|
|
505
|
+
/** Shared transport only. Electrical and plumbing documents retain separate schemas and semantics. */
|
|
506
|
+
export declare abstract class PluginDomainNetworkApi {
|
|
507
|
+
/** Read the active proposal's architectural context before authoring. Keep one revision across pages. */
|
|
508
|
+
abstract context(args?: z.input<typeof NetworkContextArgs>): PluginApiReturn<NetworkContextResult>;
|
|
509
|
+
/** Validate authored JSON, pinned families and recipe evaluation without placing or saving anything.
|
|
510
|
+
* This does not build kernel meshes or certify engineering/code compliance.
|
|
511
|
+
*/
|
|
512
|
+
abstract validate(args: z.input<typeof NetworkValidateArgs>): PluginApiReturn<NetworkValidation>;
|
|
513
|
+
/** Construct each node on its authored storey, with one undo command and queued project persistence.
|
|
514
|
+
* Networks can span storeys. Reuse requestId on retry; components returns the durable node mapping.
|
|
515
|
+
* Coordinates are world millimetres, Y-up; rotations are degrees. No engineering rules are inferred.
|
|
516
|
+
* Throws for stale architecture, invalid references/geometry or conflicting retries.
|
|
517
|
+
*/
|
|
518
|
+
abstract create(args: z.input<typeof NetworkCreateArgs>): PluginApiReturn<NetworkCreateResult>;
|
|
519
|
+
/** Read one saved graph in the active proposal; null on miss. IDs are durable, not worker handles. */
|
|
520
|
+
abstract get(args: z.input<typeof NetworkGetArgs>): PluginApiReturn<SavedNetworkGraph | null>;
|
|
521
|
+
/** Read bounded authored topology in graph revision. Crossings do not connect. No clash/compliance claims. */
|
|
522
|
+
abstract query(args: z.input<typeof NetworkQueryArgs>): PluginApiReturn<NetworkQueryResult>;
|
|
523
|
+
}
|
|
524
|
+
/** Electrical equipment, physical routes and logical circuits, constructed from agent-authored intent. */
|
|
525
|
+
export declare abstract class PluginElectricalApi extends PluginDomainNetworkApi {
|
|
526
|
+
}
|
|
527
|
+
/** Plumbing equipment and routed pipe networks, constructed from agent-authored intent. */
|
|
528
|
+
export declare abstract class PluginPlumbingApi extends PluginDomainNetworkApi {
|
|
529
|
+
}
|
|
530
|
+
//# sourceMappingURL=networks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../../../src/api/design/networks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAWlD,kGAAkG;AAClG,eAAO,MAAM,WAAW;;;;;;;kBAUb,CAAA;AAEX,6FAA6F;AAC7F,eAAO,MAAM,eAAe;;;;;;;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CAAC,GACrC,eAAe,CAAC,kBAAkB,CAAC;CACvC;AAED,0GAA0G;AAC1G,8BAAsB,mBAAoB,SAAQ,sBAAsB;CAAG;AAC3E,2FAA2F;AAC3F,8BAAsB,iBAAkB,SAAQ,sBAAsB;CAAG"}
|
|
@@ -13,8 +13,8 @@ import { ComponentHandle, BrepHandle, ContourHandle, CurveHandle } from "../../.
|
|
|
13
13
|
* {@linkcode PluginDesignQueryGeometryApi.getCenterline} mints a
|
|
14
14
|
* {@linkcode CurveHandle} for a wall's core curve.
|
|
15
15
|
* {@linkcode PluginDesignQueryGeometryApi.getTriangulatedMeshes} is the
|
|
16
|
-
* handle-free exception: it returns the triangulated render
|
|
17
|
-
* world-space arrays.
|
|
16
|
+
* handle-free exception: it returns `{ meshes }` — the triangulated render
|
|
17
|
+
* meshes as plain world-space arrays, wrapped in an object, never bare.
|
|
18
18
|
*
|
|
19
19
|
* Returned handles are session-ephemeral and go stale on undo/redo/re-topologize
|
|
20
20
|
* — re-fetch a fresh one after edits.
|
|
@@ -27,10 +27,26 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
27
27
|
* scene entity, as a reusable {@linkcode BrepHandle} for the
|
|
28
28
|
* `core.geom.query.brep.*` reads.
|
|
29
29
|
*
|
|
30
|
+
* **Frame.** By default the brep comes back in the component's own LOCAL frame
|
|
31
|
+
* (its vertices are relative to the mesh origin, exactly as stored). This is
|
|
32
|
+
* the long-standing default, and existing callers rely on it. Pass
|
|
33
|
+
* `{ frame: "world" }` to get the same solid placed where it sits in the
|
|
34
|
+
* scene (world coordinates, like
|
|
35
|
+
* `getBottomContour` / `getTriangulatedMeshes` and every `design.query.measure`
|
|
36
|
+
* read). Use `"world"` whenever the handle will be COMBINED with other scene
|
|
37
|
+
* geometry or committed back beside its source: booleans between two scene
|
|
38
|
+
* masses, `brepFromFillet` / `brepFromShell` / `brepFromOffset` /
|
|
39
|
+
* `brepFromChamfer` on a scene mass followed by `massFromBrep`, or comparing
|
|
40
|
+
* its vertices with a bounding box. A world-frame handle from a parametrically
|
|
41
|
+
* live mass also carries that mass's recipe, so an operation result keeps an
|
|
42
|
+
* editable record.
|
|
43
|
+
*
|
|
30
44
|
* @param component - The scene component to read
|
|
31
|
-
* @
|
|
45
|
+
* @param options - `frame`: `"local"` (default, mesh-local coordinates) or `"world"` (scene coordinates)
|
|
46
|
+
* @returns The brep as a {@linkcode BrepHandle}, or `null` if the component has no brep geometry — also `null` for a parametric family: read `design.family.getParameters({ component }).parts[].brep`
|
|
32
47
|
*
|
|
33
48
|
* @examplePrompt Get the 3D solid geometry of the selected wall
|
|
49
|
+
* @examplePrompt Round the top rim of this column and put it back where it is
|
|
34
50
|
* @examplePrompt How many faces does this mass have?
|
|
35
51
|
* @examplePrompt Inspect the mesh of this slab so I can look at its faces and edges
|
|
36
52
|
* @examplePrompt Read the vertices of the selected column's geometry
|
|
@@ -41,9 +57,14 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
41
57
|
* if (brep) {
|
|
42
58
|
* const faces = await snaptrude.core.geom.query.brep.listFaces(brep)
|
|
43
59
|
* }
|
|
60
|
+
*
|
|
61
|
+
* // Operate on a scene mass and commit the result where the mass sits:
|
|
62
|
+
* const placed = await snaptrude.design.query.geometry.getBrep(mass, { frame: "world" })
|
|
63
|
+
* const rounded = await snaptrude.core.geom.create.brepFromFillet(placed, edges, 0.2)
|
|
64
|
+
* await snaptrude.design.create.massFromBrep(rounded, "Rounded")
|
|
44
65
|
* ```
|
|
45
66
|
*/
|
|
46
|
-
abstract getBrep(component: ComponentHandle): PluginApiReturn<BrepHandle | null>;
|
|
67
|
+
abstract getBrep(component: ComponentHandle, options?: PluginDesignQueryGeometryGetBrepOptions): PluginApiReturn<BrepHandle | null>;
|
|
47
68
|
/**
|
|
48
69
|
* Get the **bottom-face contour** of a component — the footprint outline (outer
|
|
49
70
|
* profile + holes) of its lowest horizontal face, as a reusable
|
|
@@ -110,7 +131,8 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
110
131
|
* Get the **triangulated render meshes** of scene components as plain,
|
|
111
132
|
* serializable arrays — flat world-space vertex `positions` (`[x0, y0, z0,
|
|
112
133
|
* x1, …]`) and triangle `indices` (three per triangle), one record per
|
|
113
|
-
* requested component.
|
|
134
|
+
* requested component. The result is `{ meshes }`, not a bare array —
|
|
135
|
+
* destructure it before iterating.
|
|
114
136
|
*
|
|
115
137
|
* Unlike the other `geometry.*` reads this does NOT mint kernel handles — the
|
|
116
138
|
* raw arrays cross the boundary directly, ready for export, custom analysis,
|
|
@@ -169,8 +191,14 @@ export declare abstract class PluginDesignQueryGeometryApi {
|
|
|
169
191
|
* |---|---|---|
|
|
170
192
|
* | `component` | {@linkcode ComponentHandle} | The scene component to read |
|
|
171
193
|
*/
|
|
194
|
+
/** Options for {@linkcode PluginDesignQueryGeometryApi.getBrep}: `frame` defaults to `"local"`. */
|
|
195
|
+
export type PluginDesignQueryGeometryGetBrepOptions = {
|
|
196
|
+
frame?: "local" | "world";
|
|
197
|
+
};
|
|
198
|
+
export declare const PluginDesignQueryGeometryGetBrepOptions: z.ZodType<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions>;
|
|
172
199
|
export declare const PluginDesignQueryGeometryGetBrepArgs: z.ZodObject<{
|
|
173
200
|
component: z.ZodPipe<z.ZodString, z.ZodTransform<ComponentHandle, string>>;
|
|
201
|
+
options: z.ZodOptional<z.ZodType<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions, z.core.$ZodTypeInternals<PluginDesignQueryGeometryGetBrepOptions, PluginDesignQueryGeometryGetBrepOptions>>>;
|
|
174
202
|
}, z.core.$strip>;
|
|
175
203
|
export type PluginDesignQueryGeometryGetBrepArgs = z.infer<typeof PluginDesignQueryGeometryGetBrepArgs>;
|
|
176
204
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/design/query/geometry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,4BAA4B;;IAGhD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/design/query/geometry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,4BAA4B;;IAGhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;aACa,OAAO,CACrB,SAAS,EAAE,eAAe,EAC1B,OAAO,CAAC,EAAE,uCAAuC,GAChD,eAAe,CAAC,UAAU,GAAG,IAAI,CAAC;IAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;aACa,gBAAgB,CAC9B,SAAS,EAAE,eAAe,GACzB,eAAe,CAAC,aAAa,GAAG,IAAI,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;aACa,aAAa,CAC3B,SAAS,EAAE,eAAe,GACzB,eAAe,CAAC,WAAW,GAAG,IAAI,CAAC;IAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsDG;aACa,qBAAqB,CACnC,UAAU,EAAE,eAAe,EAAE,EAC7B,OAAO,CAAC,EAAE,kDAAkD,CAAC,SAAS,CAAC,GACtE,eAAe,CAAC,oDAAoD,CAAC;CACzE;AAED;;;;;;GAMG;AACH,mGAAmG;AACnG,MAAM,MAAM,uCAAuC,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;CAAE,CAAA;AACnF,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,uCAAuC,EACvC,uCAAuC,CACqB,CAAA;AAE9D,eAAO,MAAM,oCAAoC;;;iBAG/C,CAAA;AAEF,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,oCAAoC,CAC5C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,6CAA6C;;iBAExD,CAAA;AAEF,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CACjE,OAAO,6CAA6C,CACrD,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C;;iBAErD,CAAA;AAEF,MAAM,MAAM,0CAA0C,GAAG,CAAC,CAAC,KAAK,CAC9D,OAAO,0CAA0C,CAClD,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;;;;iBAMjC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,kDAAkD;;;;;;iBAQ7D,CAAA;AAEF,MAAM,MAAM,kDAAkD,GAAG,CAAC,CAAC,KAAK,CACtE,OAAO,kDAAkD,CAC1D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oDAAoD;;;;;;;;iBAE/D,CAAA;AAEF,MAAM,MAAM,oDAAoD,GAAG,CAAC,CAAC,KAAK,CACxE,OAAO,oDAAoD,CAC5D,CAAA"}
|
|
@@ -36,7 +36,7 @@ export type PluginGridLineProps = z.infer<typeof PluginGridLineProps>;
|
|
|
36
36
|
* | `overrides` | `Partial<`{@linkcode PluginGridLineProps}`>`? | This line's raw overrides, when any exist |
|
|
37
37
|
*/
|
|
38
38
|
export declare const PluginGridLineRecord: z.ZodObject<{
|
|
39
|
-
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>]>;
|
|
39
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"spline">, string>>]>;
|
|
40
40
|
tag: z.ZodString;
|
|
41
41
|
visible: z.ZodBoolean;
|
|
42
42
|
props: z.ZodObject<{
|
|
@@ -84,7 +84,7 @@ export declare const PluginGridWingRecord: z.ZodObject<{
|
|
|
84
84
|
max: z.ZodNumber;
|
|
85
85
|
}, z.core.$strip>>;
|
|
86
86
|
lines: z.ZodArray<z.ZodObject<{
|
|
87
|
-
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>]>;
|
|
87
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"spline">, string>>]>;
|
|
88
88
|
tag: z.ZodString;
|
|
89
89
|
visible: z.ZodBoolean;
|
|
90
90
|
props: z.ZodObject<{
|
|
@@ -192,7 +192,7 @@ export declare const PluginGridGetResult: z.ZodObject<{
|
|
|
192
192
|
max: z.ZodNumber;
|
|
193
193
|
}, z.core.$strip>>;
|
|
194
194
|
lines: z.ZodArray<z.ZodObject<{
|
|
195
|
-
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>]>;
|
|
195
|
+
curve: z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"line">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"arc">, string>>, z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>, z.ZodTransform<import("../../..").Handle<"spline">, string>>]>;
|
|
196
196
|
tag: z.ZodString;
|
|
197
197
|
visible: z.ZodBoolean;
|
|
198
198
|
props: z.ZodObject<{
|