@elaraai/east-ui 1.0.12 → 1.0.13
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/dist/src/collections/schematic/index.d.ts +335 -2
- package/dist/src/collections/schematic/index.d.ts.map +1 -1
- package/dist/src/collections/schematic/index.js +158 -2
- package/dist/src/collections/schematic/index.js.map +1 -1
- package/dist/src/collections/schematic/types.d.ts +338 -0
- package/dist/src/collections/schematic/types.d.ts.map +1 -1
- package/dist/src/collections/schematic/types.js +104 -0
- package/dist/src/collections/schematic/types.js.map +1 -1
- package/dist/src/component.d.ts +67 -0
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/runtime/collections/schematic.d.ts +4 -0
- package/dist/src/runtime/collections/schematic.d.ts.map +1 -1
- package/dist/src/runtime/collections/schematic.js +4 -0
- package/dist/src/runtime/collections/schematic.js.map +1 -1
- package/dist/test/collections/schematic.examples.d.ts +2 -0
- package/dist/test/collections/schematic.examples.d.ts.map +1 -1
- package/dist/test/collections/schematic.examples.js +70 -4
- package/dist/test/collections/schematic.examples.js.map +1 -1
- package/package.json +3 -3
|
@@ -16,12 +16,19 @@ import { East, Expr, variant, some, none, ArrayType, FloatType, StringType, Stru
|
|
|
16
16
|
import { UIComponentType } from "../../component.js";
|
|
17
17
|
import { StatusTokenType } from "../../style/interaction.js";
|
|
18
18
|
import {} from "../../display/icon/types.js";
|
|
19
|
-
import { SchematicRootType, SchematicItemType, SchematicZoneType, SchematicLinkType, SchematicPointType, SchematicZonePatternType, SchematicLinkStyleType, SchematicRouteType, SchematicToneType, } from "./types.js";
|
|
19
|
+
import { SchematicRootType, SchematicItemType, SchematicZoneType, SchematicLinkType, SchematicPointType, SchematicVertexType, SchematicGeometryType, SchematicZonePatternType, SchematicLinkStyleType, SchematicRouteType, SchematicToneType, } from "./types.js";
|
|
20
20
|
// Re-export types
|
|
21
|
-
export { SchematicRootType, SchematicItemType, SchematicZoneType, SchematicLinkType, SchematicPointType, SchematicZonePatternType, SchematicLinkStyleType, SchematicRouteType, SchematicToneType, } from "./types.js";
|
|
21
|
+
export { SchematicRootType, SchematicItemType, SchematicZoneType, SchematicLinkType, SchematicPointType, SchematicVertexType, SchematicGeometryType, SchematicZonePatternType, SchematicLinkStyleType, SchematicRouteType, SchematicToneType, } from "./types.js";
|
|
22
22
|
function toneValue(tone) {
|
|
23
23
|
return tone !== undefined ? some(variant(tone, null)) : none;
|
|
24
24
|
}
|
|
25
|
+
/** Wrap an item/zone `tone` colour override into its option — accepts a string
|
|
26
|
+
* literal shorthand (`"brand"`) or an East tone expression / value. */
|
|
27
|
+
function toneOption(tone) {
|
|
28
|
+
if (tone === undefined)
|
|
29
|
+
return none;
|
|
30
|
+
return typeof tone === "string" ? some(variant(tone, null)) : some(tone);
|
|
31
|
+
}
|
|
25
32
|
/**
|
|
26
33
|
* Builds an `outline` zone pattern value — the dashed boundary with an
|
|
27
34
|
* eyebrow label (rooms, cells).
|
|
@@ -70,6 +77,66 @@ function dashed(config) {
|
|
|
70
77
|
weight: config?.weight !== undefined ? some(config.weight) : none,
|
|
71
78
|
});
|
|
72
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Normalise {@link SchematicVertices} into an East-coercible array of
|
|
82
|
+
* {@link SchematicVertexType} — plain arrays get `bulge` defaulted to `0`,
|
|
83
|
+
* East expressions pass through unchanged (they must already be vertices).
|
|
84
|
+
*/
|
|
85
|
+
function toVertices(vertices) {
|
|
86
|
+
if (Array.isArray(vertices)) {
|
|
87
|
+
return vertices.map(v => ({
|
|
88
|
+
x: v.x,
|
|
89
|
+
y: v.y,
|
|
90
|
+
bulge: v.bulge !== undefined ? v.bulge : 0,
|
|
91
|
+
}));
|
|
92
|
+
}
|
|
93
|
+
return vertices;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Builds a `rect` geometry value — the axis-aligned box. For zones this is
|
|
97
|
+
* the `x/y/width/height` bounding box; for items, the point / marker form.
|
|
98
|
+
* Equivalent to omitting `geometry` / `footprint`.
|
|
99
|
+
*
|
|
100
|
+
* @returns A `SchematicGeometryType` value
|
|
101
|
+
*/
|
|
102
|
+
function rect() {
|
|
103
|
+
return East.value(variant("rect", null), SchematicGeometryType);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Builds a `circle` geometry value — a circle centred on the entity anchor
|
|
107
|
+
* (an item's `x/y`, or a zone's bounding-box centre). Models tanks, silos,
|
|
108
|
+
* and round equipment without flattening to a polygon.
|
|
109
|
+
*
|
|
110
|
+
* @param radius - Circle radius in world units
|
|
111
|
+
* @returns A `SchematicGeometryType` value
|
|
112
|
+
*/
|
|
113
|
+
function circle(radius) {
|
|
114
|
+
return East.value(variant("circle", { radius }), SchematicGeometryType);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Builds a `polyline` geometry value — an open, arc-aware polyline in world
|
|
118
|
+
* coordinates, optionally widened into a band (a road / aisle / walkway).
|
|
119
|
+
*
|
|
120
|
+
* @param vertices - Vertices in world coords, in order (each `{ x, y, bulge? }`; `bulge` defaults to `0`)
|
|
121
|
+
* @param config - Optional `width` band in world units
|
|
122
|
+
* @returns A `SchematicGeometryType` value
|
|
123
|
+
*/
|
|
124
|
+
function polyline(vertices, config) {
|
|
125
|
+
return East.value(variant("polyline", {
|
|
126
|
+
vertices: toVertices(vertices),
|
|
127
|
+
width: config?.width !== undefined ? some(config.width) : none,
|
|
128
|
+
}), SchematicGeometryType);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Builds a `polygon` geometry value — a closed, arc-aware polygon in world
|
|
132
|
+
* coordinates (a rotated / L-shaped zone, or an equipment footprint).
|
|
133
|
+
*
|
|
134
|
+
* @param vertices - Boundary vertices in world coords, in order (auto-closed; each `{ x, y, bulge? }`)
|
|
135
|
+
* @returns A `SchematicGeometryType` value
|
|
136
|
+
*/
|
|
137
|
+
function polygon(vertices) {
|
|
138
|
+
return East.value(variant("polygon", { vertices: toVertices(vertices) }), SchematicGeometryType);
|
|
139
|
+
}
|
|
73
140
|
function buildRoot(items, config) {
|
|
74
141
|
const itemMapper = config.item;
|
|
75
142
|
const resolvedItems = itemMapper === undefined
|
|
@@ -91,6 +158,12 @@ function buildRoot(items, config) {
|
|
|
91
158
|
: none,
|
|
92
159
|
metric: r.metric !== undefined ? some(r.metric) : none,
|
|
93
160
|
width: r.width !== undefined ? some(r.width) : none,
|
|
161
|
+
footprint: r.footprint !== undefined ? some(r.footprint) : none,
|
|
162
|
+
tone: toneOption(r.tone),
|
|
163
|
+
color: r.color !== undefined ? some(r.color) : none,
|
|
164
|
+
bg: r.bg !== undefined ? some(r.bg) : none,
|
|
165
|
+
fillOpacity: r.fillOpacity !== undefined ? some(r.fillOpacity) : none,
|
|
166
|
+
weight: r.weight !== undefined ? some(r.weight) : none,
|
|
94
167
|
}, SchematicItemType);
|
|
95
168
|
});
|
|
96
169
|
const zoneMapper = config.zone;
|
|
@@ -112,6 +185,12 @@ function buildRoot(items, config) {
|
|
|
112
185
|
pattern: r.pattern !== undefined
|
|
113
186
|
? r.pattern
|
|
114
187
|
: East.value(outline(), SchematicZonePatternType),
|
|
188
|
+
geometry: r.geometry !== undefined ? some(r.geometry) : none,
|
|
189
|
+
tone: toneOption(r.tone),
|
|
190
|
+
color: r.color !== undefined ? some(r.color) : none,
|
|
191
|
+
bg: r.bg !== undefined ? some(r.bg) : none,
|
|
192
|
+
fillOpacity: r.fillOpacity !== undefined ? some(r.fillOpacity) : none,
|
|
193
|
+
weight: r.weight !== undefined ? some(r.weight) : none,
|
|
115
194
|
}, SchematicZoneType);
|
|
116
195
|
});
|
|
117
196
|
const linkMapper = config.link;
|
|
@@ -147,6 +226,7 @@ function buildRoot(items, config) {
|
|
|
147
226
|
grid: config.grid !== undefined ? some(config.grid) : none,
|
|
148
227
|
navigator: config.navigator !== undefined ? some(config.navigator) : none,
|
|
149
228
|
minimap: config.minimap !== undefined ? some(config.minimap) : none,
|
|
229
|
+
height: config.height !== undefined ? some(config.height) : none,
|
|
150
230
|
onSelect: config.onSelect !== undefined ? some(config.onSelect) : none,
|
|
151
231
|
}), UIComponentType);
|
|
152
232
|
}
|
|
@@ -276,6 +356,62 @@ export const Schematic = {
|
|
|
276
356
|
* ```
|
|
277
357
|
*/
|
|
278
358
|
dashed,
|
|
359
|
+
/**
|
|
360
|
+
* Builds a `rect` geometry value — the axis-aligned box (a zone's
|
|
361
|
+
* `x/y/width/height`, or an item's point / marker form). Equals omitting
|
|
362
|
+
* `geometry` / `footprint`.
|
|
363
|
+
*
|
|
364
|
+
* @returns A `SchematicGeometryType` value
|
|
365
|
+
*
|
|
366
|
+
* @example
|
|
367
|
+
* ```ts
|
|
368
|
+
* Schematic.rect()
|
|
369
|
+
* ```
|
|
370
|
+
*/
|
|
371
|
+
rect,
|
|
372
|
+
/**
|
|
373
|
+
* Builds a `circle` geometry value — a circle centred on the entity
|
|
374
|
+
* anchor (an item's `x/y`, or a zone's bbox centre). Models tanks, silos,
|
|
375
|
+
* and round equipment.
|
|
376
|
+
*
|
|
377
|
+
* @param radius - Circle radius in world units
|
|
378
|
+
* @returns A `SchematicGeometryType` value
|
|
379
|
+
*
|
|
380
|
+
* @example
|
|
381
|
+
* ```ts
|
|
382
|
+
* Schematic.circle(2.5)
|
|
383
|
+
* ```
|
|
384
|
+
*/
|
|
385
|
+
circle,
|
|
386
|
+
/**
|
|
387
|
+
* Builds a `polyline` geometry value — an open, arc-aware polyline in
|
|
388
|
+
* world coordinates, optionally widened into a band (a road / aisle).
|
|
389
|
+
* Each vertex's `bulge` curves the edge to the next vertex (0 = straight).
|
|
390
|
+
*
|
|
391
|
+
* @param vertices - Vertices in world coords, in order (`{ x, y, bulge? }`)
|
|
392
|
+
* @param config - Optional `width` band in world units
|
|
393
|
+
* @returns A `SchematicGeometryType` value
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* ```ts
|
|
397
|
+
* Schematic.polyline([{ x: 0, y: 4 }, { x: 12, y: 4, bulge: 0.42 }, { x: 12, y: 9 }], { width: 1.6 })
|
|
398
|
+
* ```
|
|
399
|
+
*/
|
|
400
|
+
polyline,
|
|
401
|
+
/**
|
|
402
|
+
* Builds a `polygon` geometry value — a closed, arc-aware polygon in
|
|
403
|
+
* world coordinates (a rotated / L-shaped zone, or an equipment
|
|
404
|
+
* footprint). The last vertex's `bulge` curves the closing edge.
|
|
405
|
+
*
|
|
406
|
+
* @param vertices - Boundary vertices in world coords, in order (auto-closed; `{ x, y, bulge? }`)
|
|
407
|
+
* @returns A `SchematicGeometryType` value
|
|
408
|
+
*
|
|
409
|
+
* @example
|
|
410
|
+
* ```ts
|
|
411
|
+
* Schematic.polygon([{ x: 2, y: 2 }, { x: 7, y: 3 }, { x: 6, y: 8 }, { x: 1, y: 6 }])
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
polygon,
|
|
279
415
|
Types: {
|
|
280
416
|
/**
|
|
281
417
|
* East StructType for the Schematic component.
|
|
@@ -304,6 +440,7 @@ export const Schematic = {
|
|
|
304
440
|
* @property meter - Optional mini utilisation bar
|
|
305
441
|
* @property metric - Optional live metric text
|
|
306
442
|
* @property width - Optional world width (wide bar form)
|
|
443
|
+
* @property footprint - Optional shape footprint (point + icon when absent)
|
|
307
444
|
*/
|
|
308
445
|
Item: SchematicItemType,
|
|
309
446
|
/**
|
|
@@ -316,6 +453,7 @@ export const Schematic = {
|
|
|
316
453
|
* @property width - World width
|
|
317
454
|
* @property height - World height
|
|
318
455
|
* @property pattern - Render pattern
|
|
456
|
+
* @property geometry - Optional shape geometry (rect when absent)
|
|
319
457
|
*/
|
|
320
458
|
Zone: SchematicZoneType,
|
|
321
459
|
/**
|
|
@@ -360,6 +498,24 @@ export const Schematic = {
|
|
|
360
498
|
* @property danger - Status bad
|
|
361
499
|
*/
|
|
362
500
|
Tone: SchematicToneType,
|
|
501
|
+
/**
|
|
502
|
+
* Shared shape geometry for zones (`geometry`) and item footprints
|
|
503
|
+
* (`footprint`).
|
|
504
|
+
*
|
|
505
|
+
* @property rect - Axis-aligned box
|
|
506
|
+
* @property circle - Circle centred on the entity anchor (`radius` in world units)
|
|
507
|
+
* @property polyline - Open, arc-aware polyline; optional world-space band width
|
|
508
|
+
* @property polygon - Closed, arc-aware polygon (>= 3 vertices)
|
|
509
|
+
*/
|
|
510
|
+
Geometry: SchematicGeometryType,
|
|
511
|
+
/**
|
|
512
|
+
* A polyline / polygon vertex — a world point plus DXF `bulge`.
|
|
513
|
+
*
|
|
514
|
+
* @property x - World x
|
|
515
|
+
* @property y - World y
|
|
516
|
+
* @property bulge - DXF bulge for the edge to the next vertex (0 = straight)
|
|
517
|
+
*/
|
|
518
|
+
Vertex: SchematicVertexType,
|
|
363
519
|
},
|
|
364
520
|
};
|
|
365
521
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collections/schematic/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH,OAAO,EAIH,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,EAET,SAAS,EAIT,UAAU,EACV,UAAU,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAiB,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,GACpB,MAAM,YAAY,CAAC;AAEpB,kBAAkB;AAClB,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB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MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;KACpE,CAAC,CAAC;AACP,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/collections/schematic/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH,OAAO,EAIH,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,SAAS,EAET,SAAS,EAIT,UAAU,EACV,UAAU,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAiB,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,GACpB,MAAM,YAAY,CAAC;AAEpB,kBAAkB;AAClB,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,GACpB,MAAM,YAAY,CAAC;AAiBpB,SAAS,SAAS,CAAC,IAAsC;IACrD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjE,CAAC;AAED;wEACwE;AACxE,SAAS,UAAU,CAAC,IAA8E;IAC9F,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAC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;IACR;;;;;;;;;;;;OAYG;IACH,OAAO;IACP,KAAK,EAAE;QACH;;;;;;;;;;;;WAYG;QACH,SAAS,EAAE,iBAAiB;QAC5B;;;;;;;;;;;;;;WAcG;QACH,IAAI,EAAE,iBAAiB;QACvB;;;;;;;;;;;WAWG;QACH,IAAI,EAAE,iBAAiB;QACvB;;;;;;;;WAQG;QACH,IAAI,EAAE,iBAAiB;QACvB;;;;;WAKG;QACH,WAAW,EAAE,wBAAwB;QACrC;;;;;WAKG;QACH,SAAS,EAAE,sBAAsB;QACjC;;;;;WAKG;QACH,KAAK,EAAE,kBAAkB;QACzB;;;;;;;;;WASG;QACH,IAAI,EAAE,iBAAiB;QACvB;;;;;;;;WAQG;QACH,QAAQ,EAAE,qBAAqB;QAC/B;;;;;;WAMG;QACH,MAAM,EAAE,mBAAmB;KAC9B;CACK,CAAC"}
|
|
@@ -179,6 +179,93 @@ export declare const SchematicPointType: StructType<{
|
|
|
179
179
|
* Type representing world points.
|
|
180
180
|
*/
|
|
181
181
|
export type SchematicPointType = typeof SchematicPointType;
|
|
182
|
+
/**
|
|
183
|
+
* A polyline / polygon vertex — a world point plus DXF `bulge`.
|
|
184
|
+
*
|
|
185
|
+
* @remarks
|
|
186
|
+
* `bulge` encodes the edge from THIS vertex to the NEXT one: `0` is a
|
|
187
|
+
* straight segment; nonzero is a circular arc where
|
|
188
|
+
* `bulge = tan(includedAngle / 4)` and the sign gives the turn direction
|
|
189
|
+
* (positive = counter-clockwise in world space). One polyline / polygon thus
|
|
190
|
+
* stores true curved kerbs / walls exactly — no flattening into many short
|
|
191
|
+
* segments. For a closed `polygon`, the last vertex's `bulge` applies to the
|
|
192
|
+
* closing edge back to the first vertex.
|
|
193
|
+
*
|
|
194
|
+
* @property x - World x
|
|
195
|
+
* @property y - World y
|
|
196
|
+
* @property bulge - DXF bulge for the edge to the next vertex (0 = straight)
|
|
197
|
+
*/
|
|
198
|
+
export declare const SchematicVertexType: StructType<{
|
|
199
|
+
/** World x */
|
|
200
|
+
readonly x: FloatType;
|
|
201
|
+
/** World y */
|
|
202
|
+
readonly y: FloatType;
|
|
203
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
204
|
+
readonly bulge: FloatType;
|
|
205
|
+
}>;
|
|
206
|
+
/**
|
|
207
|
+
* Type representing a polyline / polygon vertex (world point + DXF bulge).
|
|
208
|
+
*/
|
|
209
|
+
export type SchematicVertexType = typeof SchematicVertexType;
|
|
210
|
+
/**
|
|
211
|
+
* Shared shape geometry for zones (`geometry`) and item footprints
|
|
212
|
+
* (`footprint`) — one variant, four cases.
|
|
213
|
+
*
|
|
214
|
+
* @remarks
|
|
215
|
+
* Geometry is **additive**: a zone keeps its required `x/y/width/height`
|
|
216
|
+
* bounding box and an item keeps its required `x/y` anchor/centroid; the
|
|
217
|
+
* shape, when present, is what the renderer strokes/fills. Absent geometry
|
|
218
|
+
* (`none`) means today's behaviour — a zone is its rect, an item is its
|
|
219
|
+
* point + icon. `circle` centres on the entity anchor (an item's `x/y`, a
|
|
220
|
+
* zone's bbox centre). `polyline` / `polygon` carry {@link SchematicVertexType}
|
|
221
|
+
* vertices in world coords, each with a DXF `bulge`, so curved kerbs / walls
|
|
222
|
+
* are exact (no flattening); all of them paint on the Canvas2D layer, while
|
|
223
|
+
* `rect` keeps the marker fast path.
|
|
224
|
+
*
|
|
225
|
+
* @property rect - Axis-aligned box (zones: the `x/y/width/height` box; items: the point / marker form)
|
|
226
|
+
* @property circle - Circle centred on the entity anchor; `radius` in world units (tanks, silos)
|
|
227
|
+
* @property polyline - Open, arc-aware polyline in world coords; optional world-space band `width`
|
|
228
|
+
* @property polygon - Closed, arc-aware polygon in world coords (>= 3 vertices, auto-closed)
|
|
229
|
+
*/
|
|
230
|
+
export declare const SchematicGeometryType: VariantType<{
|
|
231
|
+
/** Axis-aligned box — zones use `x/y/width/height`; items, the point / marker form. */
|
|
232
|
+
readonly rect: NullType;
|
|
233
|
+
/** Circle centred on the entity anchor (item `x/y` or zone bbox centre); `radius` in world units. */
|
|
234
|
+
readonly circle: StructType<{
|
|
235
|
+
/** Circle radius in world units. */
|
|
236
|
+
readonly radius: FloatType;
|
|
237
|
+
}>;
|
|
238
|
+
/** Open, arc-aware polyline in world coords; optional world-space band width. */
|
|
239
|
+
readonly polyline: StructType<{
|
|
240
|
+
/** Vertices in world coords, in order (each carries a DXF bulge). */
|
|
241
|
+
readonly vertices: ArrayType<StructType<{
|
|
242
|
+
/** World x */
|
|
243
|
+
readonly x: FloatType;
|
|
244
|
+
/** World y */
|
|
245
|
+
readonly y: FloatType;
|
|
246
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
247
|
+
readonly bulge: FloatType;
|
|
248
|
+
}>>;
|
|
249
|
+
/** Optional band width in world units — the stroke widens into a road / aisle. */
|
|
250
|
+
readonly width: OptionType<FloatType>;
|
|
251
|
+
}>;
|
|
252
|
+
/** Closed, arc-aware polygon in world coords (>= 3 vertices, auto-closed). */
|
|
253
|
+
readonly polygon: StructType<{
|
|
254
|
+
/** Boundary vertices in world coords, in order (each carries a DXF bulge). */
|
|
255
|
+
readonly vertices: ArrayType<StructType<{
|
|
256
|
+
/** World x */
|
|
257
|
+
readonly x: FloatType;
|
|
258
|
+
/** World y */
|
|
259
|
+
readonly y: FloatType;
|
|
260
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
261
|
+
readonly bulge: FloatType;
|
|
262
|
+
}>>;
|
|
263
|
+
}>;
|
|
264
|
+
}>;
|
|
265
|
+
/**
|
|
266
|
+
* Type representing shared shape geometry.
|
|
267
|
+
*/
|
|
268
|
+
export type SchematicGeometryType = typeof SchematicGeometryType;
|
|
182
269
|
/**
|
|
183
270
|
* A resolved placed item (node card).
|
|
184
271
|
*
|
|
@@ -192,6 +279,12 @@ export type SchematicPointType = typeof SchematicPointType;
|
|
|
192
279
|
* @property meter - Optional mini utilisation bar
|
|
193
280
|
* @property metric - Optional live metric text
|
|
194
281
|
* @property width - Optional world width — renders the wide bar form
|
|
282
|
+
* @property footprint - Optional shape footprint; absent ⇒ point + icon (`x/y` stay the anchor/centroid)
|
|
283
|
+
* @property tone - Optional colour override (semantic tone); absent ⇒ `status` drives the colour
|
|
284
|
+
* @property color - Optional raw CSS stroke / marker tint; wins over `tone`
|
|
285
|
+
* @property bg - Optional raw CSS fill for a polygon / circle footprint
|
|
286
|
+
* @property fillOpacity - Optional fill alpha (0–1) for a polygon / circle footprint
|
|
287
|
+
* @property weight - Optional stroke width in px
|
|
195
288
|
*/
|
|
196
289
|
export declare const SchematicItemType: StructType<{
|
|
197
290
|
/** Item identity — links reference it; `onSelect` returns it */
|
|
@@ -225,6 +318,65 @@ export declare const SchematicItemType: StructType<{
|
|
|
225
318
|
readonly metric: OptionType<StringType>;
|
|
226
319
|
/** Optional world width — renders the wide bar form */
|
|
227
320
|
readonly width: OptionType<FloatType>;
|
|
321
|
+
/** Optional shape footprint; absent ⇒ point + icon (`x/y` stay the anchor/centroid) */
|
|
322
|
+
readonly footprint: OptionType<VariantType<{
|
|
323
|
+
/** Axis-aligned box — zones use `x/y/width/height`; items, the point / marker form. */
|
|
324
|
+
readonly rect: NullType;
|
|
325
|
+
/** Circle centred on the entity anchor (item `x/y` or zone bbox centre); `radius` in world units. */
|
|
326
|
+
readonly circle: StructType<{
|
|
327
|
+
/** Circle radius in world units. */
|
|
328
|
+
readonly radius: FloatType;
|
|
329
|
+
}>;
|
|
330
|
+
/** Open, arc-aware polyline in world coords; optional world-space band width. */
|
|
331
|
+
readonly polyline: StructType<{
|
|
332
|
+
/** Vertices in world coords, in order (each carries a DXF bulge). */
|
|
333
|
+
readonly vertices: ArrayType<StructType<{
|
|
334
|
+
/** World x */
|
|
335
|
+
readonly x: FloatType;
|
|
336
|
+
/** World y */
|
|
337
|
+
readonly y: FloatType;
|
|
338
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
339
|
+
readonly bulge: FloatType;
|
|
340
|
+
}>>;
|
|
341
|
+
/** Optional band width in world units — the stroke widens into a road / aisle. */
|
|
342
|
+
readonly width: OptionType<FloatType>;
|
|
343
|
+
}>;
|
|
344
|
+
/** Closed, arc-aware polygon in world coords (>= 3 vertices, auto-closed). */
|
|
345
|
+
readonly polygon: StructType<{
|
|
346
|
+
/** Boundary vertices in world coords, in order (each carries a DXF bulge). */
|
|
347
|
+
readonly vertices: ArrayType<StructType<{
|
|
348
|
+
/** World x */
|
|
349
|
+
readonly x: FloatType;
|
|
350
|
+
/** World y */
|
|
351
|
+
readonly y: FloatType;
|
|
352
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
353
|
+
readonly bulge: FloatType;
|
|
354
|
+
}>>;
|
|
355
|
+
}>;
|
|
356
|
+
}>>;
|
|
357
|
+
/** Optional colour override (semantic tone); absent ⇒ `status` drives the colour */
|
|
358
|
+
readonly tone: OptionType<VariantType<{
|
|
359
|
+
/** Brand teal */
|
|
360
|
+
readonly brand: NullType;
|
|
361
|
+
/** Foreground ink */
|
|
362
|
+
readonly ink: NullType;
|
|
363
|
+
/** Muted foreground */
|
|
364
|
+
readonly muted: NullType;
|
|
365
|
+
/** Status ok */
|
|
366
|
+
readonly success: NullType;
|
|
367
|
+
/** Status warn */
|
|
368
|
+
readonly warning: NullType;
|
|
369
|
+
/** Status bad */
|
|
370
|
+
readonly danger: NullType;
|
|
371
|
+
}>>;
|
|
372
|
+
/** Optional raw CSS stroke / marker tint (e.g. `"#2D7FF9"`, `"teal"`); wins over `tone` */
|
|
373
|
+
readonly color: OptionType<StringType>;
|
|
374
|
+
/** Optional raw CSS fill for a polygon / circle footprint */
|
|
375
|
+
readonly bg: OptionType<StringType>;
|
|
376
|
+
/** Optional fill alpha (0–1) for a polygon / circle footprint */
|
|
377
|
+
readonly fillOpacity: OptionType<FloatType>;
|
|
378
|
+
/** Optional stroke width in px */
|
|
379
|
+
readonly weight: OptionType<FloatType>;
|
|
228
380
|
}>;
|
|
229
381
|
/**
|
|
230
382
|
* Type representing resolved placed items.
|
|
@@ -240,6 +392,12 @@ export type SchematicItemType = typeof SchematicItemType;
|
|
|
240
392
|
* @property width - World width
|
|
241
393
|
* @property height - World height
|
|
242
394
|
* @property pattern - Render pattern (`outline` / `hatch`)
|
|
395
|
+
* @property geometry - Optional shape geometry; absent ⇒ rect (`x/y/width/height` stay the bounding box)
|
|
396
|
+
* @property tone - Optional colour override (semantic tone); absent ⇒ the `pattern`'s tone drives the colour
|
|
397
|
+
* @property color - Optional raw CSS stroke tint; wins over `tone`
|
|
398
|
+
* @property bg - Optional raw CSS area fill (opt-in; zones are unfilled by default)
|
|
399
|
+
* @property fillOpacity - Optional fill alpha (0–1) for the area fill
|
|
400
|
+
* @property weight - Optional stroke width in px
|
|
243
401
|
*/
|
|
244
402
|
export declare const SchematicZoneType: StructType<{
|
|
245
403
|
/** Zone identity */
|
|
@@ -297,6 +455,65 @@ export declare const SchematicZoneType: StructType<{
|
|
|
297
455
|
readonly angle: OptionType<FloatType>;
|
|
298
456
|
}>;
|
|
299
457
|
}>;
|
|
458
|
+
/** Optional shape geometry; absent ⇒ rect (`x/y/width/height` stay the bounding box) */
|
|
459
|
+
readonly geometry: OptionType<VariantType<{
|
|
460
|
+
/** Axis-aligned box — zones use `x/y/width/height`; items, the point / marker form. */
|
|
461
|
+
readonly rect: NullType;
|
|
462
|
+
/** Circle centred on the entity anchor (item `x/y` or zone bbox centre); `radius` in world units. */
|
|
463
|
+
readonly circle: StructType<{
|
|
464
|
+
/** Circle radius in world units. */
|
|
465
|
+
readonly radius: FloatType;
|
|
466
|
+
}>;
|
|
467
|
+
/** Open, arc-aware polyline in world coords; optional world-space band width. */
|
|
468
|
+
readonly polyline: StructType<{
|
|
469
|
+
/** Vertices in world coords, in order (each carries a DXF bulge). */
|
|
470
|
+
readonly vertices: ArrayType<StructType<{
|
|
471
|
+
/** World x */
|
|
472
|
+
readonly x: FloatType;
|
|
473
|
+
/** World y */
|
|
474
|
+
readonly y: FloatType;
|
|
475
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
476
|
+
readonly bulge: FloatType;
|
|
477
|
+
}>>;
|
|
478
|
+
/** Optional band width in world units — the stroke widens into a road / aisle. */
|
|
479
|
+
readonly width: OptionType<FloatType>;
|
|
480
|
+
}>;
|
|
481
|
+
/** Closed, arc-aware polygon in world coords (>= 3 vertices, auto-closed). */
|
|
482
|
+
readonly polygon: StructType<{
|
|
483
|
+
/** Boundary vertices in world coords, in order (each carries a DXF bulge). */
|
|
484
|
+
readonly vertices: ArrayType<StructType<{
|
|
485
|
+
/** World x */
|
|
486
|
+
readonly x: FloatType;
|
|
487
|
+
/** World y */
|
|
488
|
+
readonly y: FloatType;
|
|
489
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
490
|
+
readonly bulge: FloatType;
|
|
491
|
+
}>>;
|
|
492
|
+
}>;
|
|
493
|
+
}>>;
|
|
494
|
+
/** Optional colour override (semantic tone); absent ⇒ the `pattern`'s tone drives the colour */
|
|
495
|
+
readonly tone: OptionType<VariantType<{
|
|
496
|
+
/** Brand teal */
|
|
497
|
+
readonly brand: NullType;
|
|
498
|
+
/** Foreground ink */
|
|
499
|
+
readonly ink: NullType;
|
|
500
|
+
/** Muted foreground */
|
|
501
|
+
readonly muted: NullType;
|
|
502
|
+
/** Status ok */
|
|
503
|
+
readonly success: NullType;
|
|
504
|
+
/** Status warn */
|
|
505
|
+
readonly warning: NullType;
|
|
506
|
+
/** Status bad */
|
|
507
|
+
readonly danger: NullType;
|
|
508
|
+
}>>;
|
|
509
|
+
/** Optional raw CSS stroke tint (e.g. `"#2D7FF9"`, `"teal"`); wins over `tone` */
|
|
510
|
+
readonly color: OptionType<StringType>;
|
|
511
|
+
/** Optional raw CSS area fill (opt-in; zones are unfilled by default) */
|
|
512
|
+
readonly bg: OptionType<StringType>;
|
|
513
|
+
/** Optional fill alpha (0–1) for the area fill */
|
|
514
|
+
readonly fillOpacity: OptionType<FloatType>;
|
|
515
|
+
/** Optional stroke width in px */
|
|
516
|
+
readonly weight: OptionType<FloatType>;
|
|
300
517
|
}>;
|
|
301
518
|
/**
|
|
302
519
|
* Type representing resolved zones.
|
|
@@ -401,6 +618,7 @@ export type SchematicLinkType = typeof SchematicLinkType;
|
|
|
401
618
|
* @property grid - Metric grid aligned to the scale legend
|
|
402
619
|
* @property navigator - Navigator rail (zones → items TOC)
|
|
403
620
|
* @property minimap - Minimap with the viewport rectangle
|
|
621
|
+
* @property height - Optional fixed panel height (any CSS length)
|
|
404
622
|
* @property onSelect - Optional item-click callback (receives the item key)
|
|
405
623
|
*/
|
|
406
624
|
export declare const SchematicRootType: StructType<{
|
|
@@ -444,6 +662,65 @@ export declare const SchematicRootType: StructType<{
|
|
|
444
662
|
readonly metric: OptionType<StringType>;
|
|
445
663
|
/** Optional world width — renders the wide bar form */
|
|
446
664
|
readonly width: OptionType<FloatType>;
|
|
665
|
+
/** Optional shape footprint; absent ⇒ point + icon (`x/y` stay the anchor/centroid) */
|
|
666
|
+
readonly footprint: OptionType<VariantType<{
|
|
667
|
+
/** Axis-aligned box — zones use `x/y/width/height`; items, the point / marker form. */
|
|
668
|
+
readonly rect: NullType;
|
|
669
|
+
/** Circle centred on the entity anchor (item `x/y` or zone bbox centre); `radius` in world units. */
|
|
670
|
+
readonly circle: StructType<{
|
|
671
|
+
/** Circle radius in world units. */
|
|
672
|
+
readonly radius: FloatType;
|
|
673
|
+
}>;
|
|
674
|
+
/** Open, arc-aware polyline in world coords; optional world-space band width. */
|
|
675
|
+
readonly polyline: StructType<{
|
|
676
|
+
/** Vertices in world coords, in order (each carries a DXF bulge). */
|
|
677
|
+
readonly vertices: ArrayType<StructType<{
|
|
678
|
+
/** World x */
|
|
679
|
+
readonly x: FloatType;
|
|
680
|
+
/** World y */
|
|
681
|
+
readonly y: FloatType;
|
|
682
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
683
|
+
readonly bulge: FloatType;
|
|
684
|
+
}>>;
|
|
685
|
+
/** Optional band width in world units — the stroke widens into a road / aisle. */
|
|
686
|
+
readonly width: OptionType<FloatType>;
|
|
687
|
+
}>;
|
|
688
|
+
/** Closed, arc-aware polygon in world coords (>= 3 vertices, auto-closed). */
|
|
689
|
+
readonly polygon: StructType<{
|
|
690
|
+
/** Boundary vertices in world coords, in order (each carries a DXF bulge). */
|
|
691
|
+
readonly vertices: ArrayType<StructType<{
|
|
692
|
+
/** World x */
|
|
693
|
+
readonly x: FloatType;
|
|
694
|
+
/** World y */
|
|
695
|
+
readonly y: FloatType;
|
|
696
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
697
|
+
readonly bulge: FloatType;
|
|
698
|
+
}>>;
|
|
699
|
+
}>;
|
|
700
|
+
}>>;
|
|
701
|
+
/** Optional colour override (semantic tone); absent ⇒ `status` drives the colour */
|
|
702
|
+
readonly tone: OptionType<VariantType<{
|
|
703
|
+
/** Brand teal */
|
|
704
|
+
readonly brand: NullType;
|
|
705
|
+
/** Foreground ink */
|
|
706
|
+
readonly ink: NullType;
|
|
707
|
+
/** Muted foreground */
|
|
708
|
+
readonly muted: NullType;
|
|
709
|
+
/** Status ok */
|
|
710
|
+
readonly success: NullType;
|
|
711
|
+
/** Status warn */
|
|
712
|
+
readonly warning: NullType;
|
|
713
|
+
/** Status bad */
|
|
714
|
+
readonly danger: NullType;
|
|
715
|
+
}>>;
|
|
716
|
+
/** Optional raw CSS stroke / marker tint (e.g. `"#2D7FF9"`, `"teal"`); wins over `tone` */
|
|
717
|
+
readonly color: OptionType<StringType>;
|
|
718
|
+
/** Optional raw CSS fill for a polygon / circle footprint */
|
|
719
|
+
readonly bg: OptionType<StringType>;
|
|
720
|
+
/** Optional fill alpha (0–1) for a polygon / circle footprint */
|
|
721
|
+
readonly fillOpacity: OptionType<FloatType>;
|
|
722
|
+
/** Optional stroke width in px */
|
|
723
|
+
readonly weight: OptionType<FloatType>;
|
|
447
724
|
}>>;
|
|
448
725
|
/** Annotation zones (rooms, cells, walkway bands) */
|
|
449
726
|
readonly zones: ArrayType<StructType<{
|
|
@@ -502,6 +779,65 @@ export declare const SchematicRootType: StructType<{
|
|
|
502
779
|
readonly angle: OptionType<FloatType>;
|
|
503
780
|
}>;
|
|
504
781
|
}>;
|
|
782
|
+
/** Optional shape geometry; absent ⇒ rect (`x/y/width/height` stay the bounding box) */
|
|
783
|
+
readonly geometry: OptionType<VariantType<{
|
|
784
|
+
/** Axis-aligned box — zones use `x/y/width/height`; items, the point / marker form. */
|
|
785
|
+
readonly rect: NullType;
|
|
786
|
+
/** Circle centred on the entity anchor (item `x/y` or zone bbox centre); `radius` in world units. */
|
|
787
|
+
readonly circle: StructType<{
|
|
788
|
+
/** Circle radius in world units. */
|
|
789
|
+
readonly radius: FloatType;
|
|
790
|
+
}>;
|
|
791
|
+
/** Open, arc-aware polyline in world coords; optional world-space band width. */
|
|
792
|
+
readonly polyline: StructType<{
|
|
793
|
+
/** Vertices in world coords, in order (each carries a DXF bulge). */
|
|
794
|
+
readonly vertices: ArrayType<StructType<{
|
|
795
|
+
/** World x */
|
|
796
|
+
readonly x: FloatType;
|
|
797
|
+
/** World y */
|
|
798
|
+
readonly y: FloatType;
|
|
799
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
800
|
+
readonly bulge: FloatType;
|
|
801
|
+
}>>;
|
|
802
|
+
/** Optional band width in world units — the stroke widens into a road / aisle. */
|
|
803
|
+
readonly width: OptionType<FloatType>;
|
|
804
|
+
}>;
|
|
805
|
+
/** Closed, arc-aware polygon in world coords (>= 3 vertices, auto-closed). */
|
|
806
|
+
readonly polygon: StructType<{
|
|
807
|
+
/** Boundary vertices in world coords, in order (each carries a DXF bulge). */
|
|
808
|
+
readonly vertices: ArrayType<StructType<{
|
|
809
|
+
/** World x */
|
|
810
|
+
readonly x: FloatType;
|
|
811
|
+
/** World y */
|
|
812
|
+
readonly y: FloatType;
|
|
813
|
+
/** DXF bulge for the edge to the next vertex (0 = straight; `tan(includedAngle / 4)`). */
|
|
814
|
+
readonly bulge: FloatType;
|
|
815
|
+
}>>;
|
|
816
|
+
}>;
|
|
817
|
+
}>>;
|
|
818
|
+
/** Optional colour override (semantic tone); absent ⇒ the `pattern`'s tone drives the colour */
|
|
819
|
+
readonly tone: OptionType<VariantType<{
|
|
820
|
+
/** Brand teal */
|
|
821
|
+
readonly brand: NullType;
|
|
822
|
+
/** Foreground ink */
|
|
823
|
+
readonly ink: NullType;
|
|
824
|
+
/** Muted foreground */
|
|
825
|
+
readonly muted: NullType;
|
|
826
|
+
/** Status ok */
|
|
827
|
+
readonly success: NullType;
|
|
828
|
+
/** Status warn */
|
|
829
|
+
readonly warning: NullType;
|
|
830
|
+
/** Status bad */
|
|
831
|
+
readonly danger: NullType;
|
|
832
|
+
}>>;
|
|
833
|
+
/** Optional raw CSS stroke tint (e.g. `"#2D7FF9"`, `"teal"`); wins over `tone` */
|
|
834
|
+
readonly color: OptionType<StringType>;
|
|
835
|
+
/** Optional raw CSS area fill (opt-in; zones are unfilled by default) */
|
|
836
|
+
readonly bg: OptionType<StringType>;
|
|
837
|
+
/** Optional fill alpha (0–1) for the area fill */
|
|
838
|
+
readonly fillOpacity: OptionType<FloatType>;
|
|
839
|
+
/** Optional stroke width in px */
|
|
840
|
+
readonly weight: OptionType<FloatType>;
|
|
505
841
|
}>>;
|
|
506
842
|
/** Connections between items, addressed by key */
|
|
507
843
|
readonly links: ArrayType<StructType<{
|
|
@@ -580,6 +916,8 @@ export declare const SchematicRootType: StructType<{
|
|
|
580
916
|
readonly navigator: OptionType<BooleanType>;
|
|
581
917
|
/** Minimap with the viewport rectangle; default: shown for large canvases */
|
|
582
918
|
readonly minimap: OptionType<BooleanType>;
|
|
919
|
+
/** Optional fixed panel height (any CSS length, e.g. `"400px"`); default: aspect-driven, capped at 75vh */
|
|
920
|
+
readonly height: OptionType<StringType>;
|
|
583
921
|
/** Optional item-click callback (receives the item key) */
|
|
584
922
|
readonly onSelect: OptionType<FunctionType<[StringType], NullType>>;
|
|
585
923
|
}>;
|