@texturehq/edges 3.1.0 → 3.1.2
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/{colors-DJDkptUU.d.cts → colors-BJ7jego1.d.cts} +165 -8
- package/dist/{colors-JkpMFxrb.d.ts → colors-vcCsLoIo.d.ts} +165 -8
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +304 -3
- package/dist/index.d.ts +304 -3
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +2 -2
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/styles.css +3 -0
- package/package.json +1 -1
|
@@ -227,6 +227,43 @@ type StackNavLinkComponentProps = {
|
|
|
227
227
|
"aria-current"?: "page" | undefined;
|
|
228
228
|
onClick?: (event: React$1.MouseEvent<HTMLAnchorElement>) => void;
|
|
229
229
|
};
|
|
230
|
+
type StackNavRowRenderProps = {
|
|
231
|
+
item: StackNavItem;
|
|
232
|
+
isActive: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Whether the item has children. Use it to decide whether to draw a drill-in
|
|
235
|
+
* affordance.
|
|
236
|
+
*
|
|
237
|
+
* Note this reports child presence, not a guarantee about `select`: the click
|
|
238
|
+
* path pushes a pane whenever children exist and does not consult
|
|
239
|
+
* `pushOnSelect`, which today only affects deep-link resolution. That
|
|
240
|
+
* discrepancy predates this prop and is left alone here rather than changed
|
|
241
|
+
* underneath existing consumers.
|
|
242
|
+
*/
|
|
243
|
+
hasChildren: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Run StackNav's selection: report through `onSelect` and push the sub-pane
|
|
246
|
+
* when the item has children.
|
|
247
|
+
*
|
|
248
|
+
* This does **not** navigate `href`. The built-in row navigates because it is
|
|
249
|
+
* itself an anchor and the browser follows it; a custom row must render its
|
|
250
|
+
* own anchor — `LinkComponent` below — for `href` to do anything.
|
|
251
|
+
*/
|
|
252
|
+
select: (event: React$1.MouseEvent) => void;
|
|
253
|
+
/**
|
|
254
|
+
* The anchor component configured on the nav (`linkComponent`, defaulting to
|
|
255
|
+
* a native `<a>`). Render `href` rows through this so router integration and
|
|
256
|
+
* navigation keep working.
|
|
257
|
+
*/
|
|
258
|
+
LinkComponent: React$1.ComponentType<StackNavLinkComponentProps>;
|
|
259
|
+
/** Class list the built-in row uses, for custom rows that want its base styling. */
|
|
260
|
+
className: string;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Renders one row in place of the built-in one. Return any node; the pane stack,
|
|
264
|
+
* back affordance, and drill-in logic stay with StackNav.
|
|
265
|
+
*/
|
|
266
|
+
type StackNavRenderRow = (props: StackNavRowRenderProps) => React$1.ReactNode;
|
|
230
267
|
/**
|
|
231
268
|
* Color overrides for the rail surface and row affordances. Any value accepted
|
|
232
269
|
* by CSS (`#hex`, `rgb()`, `var(--token)`, etc.) is fine; each entry maps to a
|
|
@@ -318,6 +355,20 @@ type StackNavProps = {
|
|
|
318
355
|
* Defaults to a native `<a>`.
|
|
319
356
|
*/
|
|
320
357
|
linkComponent?: React$1.ComponentType<StackNavLinkComponentProps>;
|
|
358
|
+
/**
|
|
359
|
+
* Take over rendering of the rows, keeping this component's pane stack, back
|
|
360
|
+
* affordance, and drill-in behavior.
|
|
361
|
+
*
|
|
362
|
+
* Needed when a row must carry its own interactive control — a checkbox, a
|
|
363
|
+
* switch — which cannot go in `leading`, since that renders inside the row's
|
|
364
|
+
* link/button, making it invalid markup and giving one click target two
|
|
365
|
+
* actions. A custom row can place the control as a sibling of whatever it
|
|
366
|
+
* makes navigable.
|
|
367
|
+
*
|
|
368
|
+
* Dividers and group labels are unaffected. Omit this and rows render exactly
|
|
369
|
+
* as they always have.
|
|
370
|
+
*/
|
|
371
|
+
renderRow?: StackNavRenderRow | undefined;
|
|
321
372
|
/**
|
|
322
373
|
* Render the Texture logo at the top of the rail (above any `header` slot).
|
|
323
374
|
* Set `logo` to override the default mark; otherwise the standard `<Logo />`
|
|
@@ -382,7 +433,7 @@ type StackNavProps = {
|
|
|
382
433
|
*/
|
|
383
434
|
sidebarCollapseId?: string;
|
|
384
435
|
};
|
|
385
|
-
declare function StackNav({ items, groups, bottomItems, value, defaultStack, stack: controlledStack, onStackChange, onSelect, linkComponent: LinkComponent, showLogo, logo, header, footer, mobileMenuId, sidebarCollapseId, rootLabel, sticky, width, ariaLabel, theme, animated, style, className, }: StackNavProps): react_jsx_runtime.JSX.Element;
|
|
436
|
+
declare function StackNav({ items, groups, bottomItems, value, defaultStack, stack: controlledStack, onStackChange, onSelect, linkComponent: LinkComponent, renderRow, showLogo, logo, header, footer, mobileMenuId, sidebarCollapseId, rootLabel, sticky, width, ariaLabel, theme, animated, style, className, }: StackNavProps): react_jsx_runtime.JSX.Element;
|
|
386
437
|
|
|
387
438
|
type ColorMode = "system" | "light" | "dark";
|
|
388
439
|
type TopNavProps = {
|
|
@@ -1480,6 +1531,60 @@ interface ClusteredVectorLayerSpec extends Omit<BaseLayerSpec, "tooltip"> {
|
|
|
1480
1531
|
* Union of all layer types
|
|
1481
1532
|
*/
|
|
1482
1533
|
type LayerSpec = VectorLayerSpec | GeoJsonLayerSpec | CustomPinsSpec | RasterLayerSpec | ClusteredVectorLayerSpec;
|
|
1534
|
+
/**
|
|
1535
|
+
* One row in the layers panel.
|
|
1536
|
+
*
|
|
1537
|
+
* Depth is whatever the config declares — a node with `children` is a container
|
|
1538
|
+
* the panel drills into, a node with `layerId` is a leaf controlling that layer.
|
|
1539
|
+
* The shape mirrors `StackNavItem`/`SideNavItem`, with `layerId` playing the
|
|
1540
|
+
* role `href` plays there.
|
|
1541
|
+
*
|
|
1542
|
+
* Kept separate from `LayerSpec` because containers have no geometry of their
|
|
1543
|
+
* own: "Grid infrastructure" is a heading over Transformers and Feeders, not a
|
|
1544
|
+
* layer that could be rendered.
|
|
1545
|
+
*/
|
|
1546
|
+
interface LayerTreeNode {
|
|
1547
|
+
/** Stable identifier, unique across the tree. */
|
|
1548
|
+
id: string;
|
|
1549
|
+
label: string;
|
|
1550
|
+
/** Leaf only: the `LayerSpec.id` this row shows and hides. */
|
|
1551
|
+
layerId?: string;
|
|
1552
|
+
/** Container only: nested rows, to any depth. */
|
|
1553
|
+
children?: LayerTreeNode[];
|
|
1554
|
+
/**
|
|
1555
|
+
* How many of this node's children may be on at once. Defaults to `multi`.
|
|
1556
|
+
*
|
|
1557
|
+
* `single` is for a layer whose children are alternatives rather than
|
|
1558
|
+
* additions — weather showing temperature *or* wind, never both. Those render
|
|
1559
|
+
* as radios, and choosing one turns its siblings off.
|
|
1560
|
+
*/
|
|
1561
|
+
selection?: LayerSelection;
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Children of a `single` node are mutually exclusive. `allowNone` lets the user
|
|
1565
|
+
* clear the choice from within the child pane; without it the only way back to
|
|
1566
|
+
* nothing-selected is the parent's own checkbox.
|
|
1567
|
+
*/
|
|
1568
|
+
type LayerSelection = {
|
|
1569
|
+
mode: "multi";
|
|
1570
|
+
} | {
|
|
1571
|
+
mode: "single";
|
|
1572
|
+
allowNone?: boolean;
|
|
1573
|
+
};
|
|
1574
|
+
/**
|
|
1575
|
+
* A row's checkbox state. Containers are `indeterminate` when only some of the
|
|
1576
|
+
* leaves beneath them are visible — impossible under `single` selection, where a
|
|
1577
|
+
* node is either off or showing exactly one child.
|
|
1578
|
+
*/
|
|
1579
|
+
type LayerCheckState = "checked" | "unchecked" | "indeterminate";
|
|
1580
|
+
/**
|
|
1581
|
+
* A visibility change as an explicit target state per layer.
|
|
1582
|
+
*
|
|
1583
|
+
* A map rather than `(ids, visible)` because single-select changes two things at
|
|
1584
|
+
* once — one layer on, its siblings off — and splitting that across two calls
|
|
1585
|
+
* would let the map render a moment with everything off.
|
|
1586
|
+
*/
|
|
1587
|
+
type LayerVisibilityPatch = Record<string, boolean>;
|
|
1483
1588
|
|
|
1484
1589
|
/**
|
|
1485
1590
|
* Unified map style configuration for all map components
|
|
@@ -1599,6 +1704,17 @@ interface LayersControl extends BaseControl {
|
|
|
1599
1704
|
* declaring `legend.variants`.
|
|
1600
1705
|
*/
|
|
1601
1706
|
onLayerVariantChange?: (layerId: string, variantId: string) => void;
|
|
1707
|
+
/**
|
|
1708
|
+
* Recursive layer tree. When provided, the control renders the drill-down
|
|
1709
|
+
* layers panel in place of the flat list.
|
|
1710
|
+
*/
|
|
1711
|
+
layerTree?: LayerTreeNode[];
|
|
1712
|
+
/**
|
|
1713
|
+
* Apply a visibility change from the panel, given as the target state per
|
|
1714
|
+
* affected layer. Container toggles and single-select choices both arrive as
|
|
1715
|
+
* one patch. Only used alongside `layerTree`.
|
|
1716
|
+
*/
|
|
1717
|
+
onVisibilityChange?: (patch: LayerVisibilityPatch) => void;
|
|
1602
1718
|
}
|
|
1603
1719
|
/**
|
|
1604
1720
|
* Search control configuration
|
|
@@ -2463,6 +2579,31 @@ type GridElementSourceType = "CAPACITOR" | "CONSUMER" | "GENERATOR" | "MOTOR" |
|
|
|
2463
2579
|
* by the conformance test, not just documented.
|
|
2464
2580
|
*/
|
|
2465
2581
|
declare const ABSENT_GRID_FIELDS: readonly ["energized", "customerName", "gs_max_continuous_current"];
|
|
2582
|
+
/**
|
|
2583
|
+
* MR-G12 §5 -- voltage stat-list rows still sourced from a RAW metadata key whose
|
|
2584
|
+
* unit has NOT been measured against prod.
|
|
2585
|
+
*
|
|
2586
|
+
* The conformance rule (`entities.test.ts`): a `GRID_STAT_LIST` row with
|
|
2587
|
+
* `format.type === "voltage"` must EITHER reference a normalized/decoded key
|
|
2588
|
+
* (suffix `Kv`, i.e. the unit is established by construction) OR be listed here.
|
|
2589
|
+
* `formatGridStatValue` takes the unit straight from this config and performs no
|
|
2590
|
+
* conversion, so an unmeasured raw key is a three-order-of-magnitude error waiting
|
|
2591
|
+
* to ship -- exactly how `TRANSFORMER.primaryRatedVoltage` shipped "7 V" for a
|
|
2592
|
+
* 7.2 kV transformer. Listing a row here is a deliberate, reviewable admission
|
|
2593
|
+
* that its unit is unverified, not an oversight.
|
|
2594
|
+
*
|
|
2595
|
+
* Status per row (as of 2026-08-17):
|
|
2596
|
+
* • CAPACITOR / NODE `nominalVoltage` -- NOT measured; DQ-3 covered transformers
|
|
2597
|
+
* only. Deliberately NOT fixed blind: added to the next DB round (DQ-10). If
|
|
2598
|
+
* they show the transformer pattern, one decision fixes both.
|
|
2599
|
+
* • REGULATOR `outputVoltagePh{A,B,C}` -- lower risk: the SCADA audit observed
|
|
2600
|
+
* regulator volts in the 7,261...20,538 V range, but that is TELEMETRY, not
|
|
2601
|
+
* this metadata key.
|
|
2602
|
+
* • GENERATOR `outputVoltage` / MOTOR `voltage` -- small populations.
|
|
2603
|
+
*
|
|
2604
|
+
* Entries are `${GridElementSourceType}.${key}`.
|
|
2605
|
+
*/
|
|
2606
|
+
declare const UNVERIFIED_VOLTAGE_UNIT_ROWS: readonly ["CAPACITOR.nominalVoltage", "NODE.nominalVoltage", "REGULATOR.outputVoltagePhA", "REGULATOR.outputVoltagePhB", "REGULATOR.outputVoltagePhC", "GENERATOR.outputVoltage", "MOTOR.voltage"];
|
|
2466
2607
|
/**
|
|
2467
2608
|
* Static property rows per `GridElementType`, transcribed from
|
|
2468
2609
|
* `grid-element-config/src/configs/*.config.ts` `metadataFields`. Serializable:
|
|
@@ -2478,12 +2619,20 @@ declare const GRID_STAT_LIST: {
|
|
|
2478
2619
|
readonly decimals: 0;
|
|
2479
2620
|
};
|
|
2480
2621
|
}, {
|
|
2481
|
-
readonly key: "
|
|
2622
|
+
readonly key: "primaryVoltageKv";
|
|
2482
2623
|
readonly label: "Primary Voltage";
|
|
2483
2624
|
readonly format: {
|
|
2484
2625
|
readonly type: "voltage";
|
|
2485
|
-
readonly unit: "
|
|
2486
|
-
readonly decimals:
|
|
2626
|
+
readonly unit: "kV";
|
|
2627
|
+
readonly decimals: 1;
|
|
2628
|
+
};
|
|
2629
|
+
}, {
|
|
2630
|
+
readonly key: "outputVoltageKv";
|
|
2631
|
+
readonly label: "Output Voltage";
|
|
2632
|
+
readonly format: {
|
|
2633
|
+
readonly type: "voltage";
|
|
2634
|
+
readonly unit: "kV";
|
|
2635
|
+
readonly decimals: 2;
|
|
2487
2636
|
};
|
|
2488
2637
|
}];
|
|
2489
2638
|
readonly CONSUMER: [{
|
|
@@ -3058,12 +3207,20 @@ declare const ENTITY_CONFIG: {
|
|
|
3058
3207
|
readonly decimals: 0;
|
|
3059
3208
|
};
|
|
3060
3209
|
}, {
|
|
3061
|
-
readonly key: "
|
|
3210
|
+
readonly key: "primaryVoltageKv";
|
|
3062
3211
|
readonly label: "Primary Voltage";
|
|
3063
3212
|
readonly format: {
|
|
3064
3213
|
readonly type: "voltage";
|
|
3065
|
-
readonly unit: "
|
|
3066
|
-
readonly decimals:
|
|
3214
|
+
readonly unit: "kV";
|
|
3215
|
+
readonly decimals: 1;
|
|
3216
|
+
};
|
|
3217
|
+
}, {
|
|
3218
|
+
readonly key: "outputVoltageKv";
|
|
3219
|
+
readonly label: "Output Voltage";
|
|
3220
|
+
readonly format: {
|
|
3221
|
+
readonly type: "voltage";
|
|
3222
|
+
readonly unit: "kV";
|
|
3223
|
+
readonly decimals: 2;
|
|
3067
3224
|
};
|
|
3068
3225
|
}];
|
|
3069
3226
|
};
|
|
@@ -4186,4 +4343,4 @@ declare const getContrastingTextColor: (backgroundColor: string) => string;
|
|
|
4186
4343
|
*/
|
|
4187
4344
|
declare const mapValuesToCategoricalColors: (values: (string | number)[]) => Record<string | number, string>;
|
|
4188
4345
|
|
|
4189
|
-
export { getContrastingTextColor as $, ABSENT_GRID_FIELDS as A, type BadgeProps as B, type ChartMargin as C, type StaticMapProps as D, ENTITY_CONFIG as E, type TooltipData as F, GRID_ELEMENT_TYPE_BY_ENTITY as G, HEADLINE_METRIC_BOUNDS as H, type InteractiveMapProps as I, type TooltipSeries as J, TopNav as K, Loader as L, type MapPoint as M, type TopNavProps as N, type YFormatType as O, archetypeFor as P, clearColorCache as Q, createCategoryColorMap as R, type SegmentOption as S, TextLink as T, createXScale as U, createYScale as V, defaultMargin as W, entityHasDetailPage as X, type YFormatSettings as Y, entityHasStatList as Z, entityShowsNow as _, type ActionItem as a, type
|
|
4346
|
+
export { getContrastingTextColor as $, ABSENT_GRID_FIELDS as A, type BadgeProps as B, type ChartMargin as C, type StaticMapProps as D, ENTITY_CONFIG as E, type TooltipData as F, GRID_ELEMENT_TYPE_BY_ENTITY as G, HEADLINE_METRIC_BOUNDS as H, type InteractiveMapProps as I, type TooltipSeries as J, TopNav as K, Loader as L, type MapPoint as M, type TopNavProps as N, type YFormatType as O, archetypeFor as P, clearColorCache as Q, createCategoryColorMap as R, type SegmentOption as S, TextLink as T, createXScale as U, createYScale as V, defaultMargin as W, entityHasDetailPage as X, type YFormatSettings as Y, entityHasStatList as Z, entityShowsNow as _, type ActionItem as a, type LayerStyle as a$, getDefaultChartColor as a0, getDefaultColors as a1, getEntityConfig as a2, getEntityIcon as a3, getEntityLabel as a4, getEntityStatList as a5, getResolvedColor as a6, getThemeCategoricalColors as a7, getYFormatSettings as a8, isLightColor as a9, type RasterLayerSpec as aA, type VectorLayerSpec as aB, type ClusteredVectorLayerSpec as aC, type ColorSpec as aD, ActionMenu as aE, AppShell as aF, Avatar as aG, Badge as aH, type BaseFormat as aI, ChartContext as aJ, CodeEditor as aK, type ComponentFormatOptions as aL, type CurrentUnit as aM, type CustomFormat as aN, DEFAULT_MAP_TYPE as aO, type DateFormatStyle as aP, type DistanceUnit as aQ, ENTITY_CATEGORY_CONFIG as aR, type EntityCategory as aS, type EntityCategoryConfig as aT, GRID_STATE_COLORS as aU, type GridStateColor as aV, InteractiveMap as aW, type InteractiveMapHandle as aX, type LayerCheckState as aY, type LayerFeature as aZ, type LayerSelection as a_, type FieldValue as aa, type BooleanFormat as ab, type FormattedValue as ac, type FieldFormat as ad, type CurrentFormat as ae, type DateFormat as af, type DistanceFormat as ag, type EnergyUnit as ah, type EnergyFormat as ai, type CurrencyFormat as aj, type NumberFormat as ak, type PhoneFormat as al, type PowerFormat as am, type FormatterFunction as an, type ResistanceFormat as ao, type TemperatureFormat as ap, type TemperatureUnitString as aq, type TemperatureUnit as ar, type TextFormat as as, type VoltageFormat as at, type DeviceState as au, type GridState as av, type ComponentFormatter as aw, type LayerSpec as ax, type CustomPinsSpec as ay, type GeoJsonLayerSpec as az, type ActionMenuProps as b, type LayerTreeNode as b0, type LayerVisibilityPatch as b1, MAP_TYPES as b2, type MapType as b3, Meter as b4, type MetricFormat as b5, type PercentageFormat as b6, type PowerUnit as b7, type RenderType as b8, type ResistanceUnit as b9, useChartContext as bA, useComponentFormatter as bB, SegmentedControl as ba, StackNav as bb, type StackNavGroup as bc, type StackNavItem as bd, type StackNavLinkComponentProps as be, type StackNavProps as bf, type StackNavRenderRow as bg, type StackNavRowRenderProps as bh, type StackNavTheme as bi, StaticMap as bj, type TextTransform as bk, type TextTruncatePosition as bl, UNVERIFIED_VOLTAGE_UNIT_ROWS as bm, type VoltageUnit as bn, type ZoomStops as bo, activeDeviceStates as bp, baselineFromPoint as bq, deviceStateLabels as br, deviceStateMetricFormats as bs, formatComponentValue as bt, getDeviceStateLabel as bu, getEntityCategory as bv, getGridStateLabel as bw, gridStateLabels as bx, isActiveState as by, mapValuesToCategoricalColors as bz, type AppShellProps as c, type AvatarProps as d, type BaseDataPoint as e, type CodeEditorProps as f, type CodeLanguage as g, type CodeTheme as h, type EntityArchetype as i, type EntityConfig as j, type EntityStateRule as k, type EntityType as l, GRID_STAT_LIST as m, type GridElementSourceType as n, type GridStatField as o, type GridStatFieldFormat as p, Heading as q, type HeadlineMetric as r, Logo as s, type MeterProps as t, type MetricSource as u, type SegmentedControlProps as v, type SerializableFieldFormat as w, SideNav as x, type SideNavItem as y, type SideNavProps as z };
|
|
@@ -227,6 +227,43 @@ type StackNavLinkComponentProps = {
|
|
|
227
227
|
"aria-current"?: "page" | undefined;
|
|
228
228
|
onClick?: (event: React$1.MouseEvent<HTMLAnchorElement>) => void;
|
|
229
229
|
};
|
|
230
|
+
type StackNavRowRenderProps = {
|
|
231
|
+
item: StackNavItem;
|
|
232
|
+
isActive: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Whether the item has children. Use it to decide whether to draw a drill-in
|
|
235
|
+
* affordance.
|
|
236
|
+
*
|
|
237
|
+
* Note this reports child presence, not a guarantee about `select`: the click
|
|
238
|
+
* path pushes a pane whenever children exist and does not consult
|
|
239
|
+
* `pushOnSelect`, which today only affects deep-link resolution. That
|
|
240
|
+
* discrepancy predates this prop and is left alone here rather than changed
|
|
241
|
+
* underneath existing consumers.
|
|
242
|
+
*/
|
|
243
|
+
hasChildren: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Run StackNav's selection: report through `onSelect` and push the sub-pane
|
|
246
|
+
* when the item has children.
|
|
247
|
+
*
|
|
248
|
+
* This does **not** navigate `href`. The built-in row navigates because it is
|
|
249
|
+
* itself an anchor and the browser follows it; a custom row must render its
|
|
250
|
+
* own anchor — `LinkComponent` below — for `href` to do anything.
|
|
251
|
+
*/
|
|
252
|
+
select: (event: React$1.MouseEvent) => void;
|
|
253
|
+
/**
|
|
254
|
+
* The anchor component configured on the nav (`linkComponent`, defaulting to
|
|
255
|
+
* a native `<a>`). Render `href` rows through this so router integration and
|
|
256
|
+
* navigation keep working.
|
|
257
|
+
*/
|
|
258
|
+
LinkComponent: React$1.ComponentType<StackNavLinkComponentProps>;
|
|
259
|
+
/** Class list the built-in row uses, for custom rows that want its base styling. */
|
|
260
|
+
className: string;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Renders one row in place of the built-in one. Return any node; the pane stack,
|
|
264
|
+
* back affordance, and drill-in logic stay with StackNav.
|
|
265
|
+
*/
|
|
266
|
+
type StackNavRenderRow = (props: StackNavRowRenderProps) => React$1.ReactNode;
|
|
230
267
|
/**
|
|
231
268
|
* Color overrides for the rail surface and row affordances. Any value accepted
|
|
232
269
|
* by CSS (`#hex`, `rgb()`, `var(--token)`, etc.) is fine; each entry maps to a
|
|
@@ -318,6 +355,20 @@ type StackNavProps = {
|
|
|
318
355
|
* Defaults to a native `<a>`.
|
|
319
356
|
*/
|
|
320
357
|
linkComponent?: React$1.ComponentType<StackNavLinkComponentProps>;
|
|
358
|
+
/**
|
|
359
|
+
* Take over rendering of the rows, keeping this component's pane stack, back
|
|
360
|
+
* affordance, and drill-in behavior.
|
|
361
|
+
*
|
|
362
|
+
* Needed when a row must carry its own interactive control — a checkbox, a
|
|
363
|
+
* switch — which cannot go in `leading`, since that renders inside the row's
|
|
364
|
+
* link/button, making it invalid markup and giving one click target two
|
|
365
|
+
* actions. A custom row can place the control as a sibling of whatever it
|
|
366
|
+
* makes navigable.
|
|
367
|
+
*
|
|
368
|
+
* Dividers and group labels are unaffected. Omit this and rows render exactly
|
|
369
|
+
* as they always have.
|
|
370
|
+
*/
|
|
371
|
+
renderRow?: StackNavRenderRow | undefined;
|
|
321
372
|
/**
|
|
322
373
|
* Render the Texture logo at the top of the rail (above any `header` slot).
|
|
323
374
|
* Set `logo` to override the default mark; otherwise the standard `<Logo />`
|
|
@@ -382,7 +433,7 @@ type StackNavProps = {
|
|
|
382
433
|
*/
|
|
383
434
|
sidebarCollapseId?: string;
|
|
384
435
|
};
|
|
385
|
-
declare function StackNav({ items, groups, bottomItems, value, defaultStack, stack: controlledStack, onStackChange, onSelect, linkComponent: LinkComponent, showLogo, logo, header, footer, mobileMenuId, sidebarCollapseId, rootLabel, sticky, width, ariaLabel, theme, animated, style, className, }: StackNavProps): react_jsx_runtime.JSX.Element;
|
|
436
|
+
declare function StackNav({ items, groups, bottomItems, value, defaultStack, stack: controlledStack, onStackChange, onSelect, linkComponent: LinkComponent, renderRow, showLogo, logo, header, footer, mobileMenuId, sidebarCollapseId, rootLabel, sticky, width, ariaLabel, theme, animated, style, className, }: StackNavProps): react_jsx_runtime.JSX.Element;
|
|
386
437
|
|
|
387
438
|
type ColorMode = "system" | "light" | "dark";
|
|
388
439
|
type TopNavProps = {
|
|
@@ -1480,6 +1531,60 @@ interface ClusteredVectorLayerSpec extends Omit<BaseLayerSpec, "tooltip"> {
|
|
|
1480
1531
|
* Union of all layer types
|
|
1481
1532
|
*/
|
|
1482
1533
|
type LayerSpec = VectorLayerSpec | GeoJsonLayerSpec | CustomPinsSpec | RasterLayerSpec | ClusteredVectorLayerSpec;
|
|
1534
|
+
/**
|
|
1535
|
+
* One row in the layers panel.
|
|
1536
|
+
*
|
|
1537
|
+
* Depth is whatever the config declares — a node with `children` is a container
|
|
1538
|
+
* the panel drills into, a node with `layerId` is a leaf controlling that layer.
|
|
1539
|
+
* The shape mirrors `StackNavItem`/`SideNavItem`, with `layerId` playing the
|
|
1540
|
+
* role `href` plays there.
|
|
1541
|
+
*
|
|
1542
|
+
* Kept separate from `LayerSpec` because containers have no geometry of their
|
|
1543
|
+
* own: "Grid infrastructure" is a heading over Transformers and Feeders, not a
|
|
1544
|
+
* layer that could be rendered.
|
|
1545
|
+
*/
|
|
1546
|
+
interface LayerTreeNode {
|
|
1547
|
+
/** Stable identifier, unique across the tree. */
|
|
1548
|
+
id: string;
|
|
1549
|
+
label: string;
|
|
1550
|
+
/** Leaf only: the `LayerSpec.id` this row shows and hides. */
|
|
1551
|
+
layerId?: string;
|
|
1552
|
+
/** Container only: nested rows, to any depth. */
|
|
1553
|
+
children?: LayerTreeNode[];
|
|
1554
|
+
/**
|
|
1555
|
+
* How many of this node's children may be on at once. Defaults to `multi`.
|
|
1556
|
+
*
|
|
1557
|
+
* `single` is for a layer whose children are alternatives rather than
|
|
1558
|
+
* additions — weather showing temperature *or* wind, never both. Those render
|
|
1559
|
+
* as radios, and choosing one turns its siblings off.
|
|
1560
|
+
*/
|
|
1561
|
+
selection?: LayerSelection;
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Children of a `single` node are mutually exclusive. `allowNone` lets the user
|
|
1565
|
+
* clear the choice from within the child pane; without it the only way back to
|
|
1566
|
+
* nothing-selected is the parent's own checkbox.
|
|
1567
|
+
*/
|
|
1568
|
+
type LayerSelection = {
|
|
1569
|
+
mode: "multi";
|
|
1570
|
+
} | {
|
|
1571
|
+
mode: "single";
|
|
1572
|
+
allowNone?: boolean;
|
|
1573
|
+
};
|
|
1574
|
+
/**
|
|
1575
|
+
* A row's checkbox state. Containers are `indeterminate` when only some of the
|
|
1576
|
+
* leaves beneath them are visible — impossible under `single` selection, where a
|
|
1577
|
+
* node is either off or showing exactly one child.
|
|
1578
|
+
*/
|
|
1579
|
+
type LayerCheckState = "checked" | "unchecked" | "indeterminate";
|
|
1580
|
+
/**
|
|
1581
|
+
* A visibility change as an explicit target state per layer.
|
|
1582
|
+
*
|
|
1583
|
+
* A map rather than `(ids, visible)` because single-select changes two things at
|
|
1584
|
+
* once — one layer on, its siblings off — and splitting that across two calls
|
|
1585
|
+
* would let the map render a moment with everything off.
|
|
1586
|
+
*/
|
|
1587
|
+
type LayerVisibilityPatch = Record<string, boolean>;
|
|
1483
1588
|
|
|
1484
1589
|
/**
|
|
1485
1590
|
* Unified map style configuration for all map components
|
|
@@ -1599,6 +1704,17 @@ interface LayersControl extends BaseControl {
|
|
|
1599
1704
|
* declaring `legend.variants`.
|
|
1600
1705
|
*/
|
|
1601
1706
|
onLayerVariantChange?: (layerId: string, variantId: string) => void;
|
|
1707
|
+
/**
|
|
1708
|
+
* Recursive layer tree. When provided, the control renders the drill-down
|
|
1709
|
+
* layers panel in place of the flat list.
|
|
1710
|
+
*/
|
|
1711
|
+
layerTree?: LayerTreeNode[];
|
|
1712
|
+
/**
|
|
1713
|
+
* Apply a visibility change from the panel, given as the target state per
|
|
1714
|
+
* affected layer. Container toggles and single-select choices both arrive as
|
|
1715
|
+
* one patch. Only used alongside `layerTree`.
|
|
1716
|
+
*/
|
|
1717
|
+
onVisibilityChange?: (patch: LayerVisibilityPatch) => void;
|
|
1602
1718
|
}
|
|
1603
1719
|
/**
|
|
1604
1720
|
* Search control configuration
|
|
@@ -2463,6 +2579,31 @@ type GridElementSourceType = "CAPACITOR" | "CONSUMER" | "GENERATOR" | "MOTOR" |
|
|
|
2463
2579
|
* by the conformance test, not just documented.
|
|
2464
2580
|
*/
|
|
2465
2581
|
declare const ABSENT_GRID_FIELDS: readonly ["energized", "customerName", "gs_max_continuous_current"];
|
|
2582
|
+
/**
|
|
2583
|
+
* MR-G12 §5 -- voltage stat-list rows still sourced from a RAW metadata key whose
|
|
2584
|
+
* unit has NOT been measured against prod.
|
|
2585
|
+
*
|
|
2586
|
+
* The conformance rule (`entities.test.ts`): a `GRID_STAT_LIST` row with
|
|
2587
|
+
* `format.type === "voltage"` must EITHER reference a normalized/decoded key
|
|
2588
|
+
* (suffix `Kv`, i.e. the unit is established by construction) OR be listed here.
|
|
2589
|
+
* `formatGridStatValue` takes the unit straight from this config and performs no
|
|
2590
|
+
* conversion, so an unmeasured raw key is a three-order-of-magnitude error waiting
|
|
2591
|
+
* to ship -- exactly how `TRANSFORMER.primaryRatedVoltage` shipped "7 V" for a
|
|
2592
|
+
* 7.2 kV transformer. Listing a row here is a deliberate, reviewable admission
|
|
2593
|
+
* that its unit is unverified, not an oversight.
|
|
2594
|
+
*
|
|
2595
|
+
* Status per row (as of 2026-08-17):
|
|
2596
|
+
* • CAPACITOR / NODE `nominalVoltage` -- NOT measured; DQ-3 covered transformers
|
|
2597
|
+
* only. Deliberately NOT fixed blind: added to the next DB round (DQ-10). If
|
|
2598
|
+
* they show the transformer pattern, one decision fixes both.
|
|
2599
|
+
* • REGULATOR `outputVoltagePh{A,B,C}` -- lower risk: the SCADA audit observed
|
|
2600
|
+
* regulator volts in the 7,261...20,538 V range, but that is TELEMETRY, not
|
|
2601
|
+
* this metadata key.
|
|
2602
|
+
* • GENERATOR `outputVoltage` / MOTOR `voltage` -- small populations.
|
|
2603
|
+
*
|
|
2604
|
+
* Entries are `${GridElementSourceType}.${key}`.
|
|
2605
|
+
*/
|
|
2606
|
+
declare const UNVERIFIED_VOLTAGE_UNIT_ROWS: readonly ["CAPACITOR.nominalVoltage", "NODE.nominalVoltage", "REGULATOR.outputVoltagePhA", "REGULATOR.outputVoltagePhB", "REGULATOR.outputVoltagePhC", "GENERATOR.outputVoltage", "MOTOR.voltage"];
|
|
2466
2607
|
/**
|
|
2467
2608
|
* Static property rows per `GridElementType`, transcribed from
|
|
2468
2609
|
* `grid-element-config/src/configs/*.config.ts` `metadataFields`. Serializable:
|
|
@@ -2478,12 +2619,20 @@ declare const GRID_STAT_LIST: {
|
|
|
2478
2619
|
readonly decimals: 0;
|
|
2479
2620
|
};
|
|
2480
2621
|
}, {
|
|
2481
|
-
readonly key: "
|
|
2622
|
+
readonly key: "primaryVoltageKv";
|
|
2482
2623
|
readonly label: "Primary Voltage";
|
|
2483
2624
|
readonly format: {
|
|
2484
2625
|
readonly type: "voltage";
|
|
2485
|
-
readonly unit: "
|
|
2486
|
-
readonly decimals:
|
|
2626
|
+
readonly unit: "kV";
|
|
2627
|
+
readonly decimals: 1;
|
|
2628
|
+
};
|
|
2629
|
+
}, {
|
|
2630
|
+
readonly key: "outputVoltageKv";
|
|
2631
|
+
readonly label: "Output Voltage";
|
|
2632
|
+
readonly format: {
|
|
2633
|
+
readonly type: "voltage";
|
|
2634
|
+
readonly unit: "kV";
|
|
2635
|
+
readonly decimals: 2;
|
|
2487
2636
|
};
|
|
2488
2637
|
}];
|
|
2489
2638
|
readonly CONSUMER: [{
|
|
@@ -3058,12 +3207,20 @@ declare const ENTITY_CONFIG: {
|
|
|
3058
3207
|
readonly decimals: 0;
|
|
3059
3208
|
};
|
|
3060
3209
|
}, {
|
|
3061
|
-
readonly key: "
|
|
3210
|
+
readonly key: "primaryVoltageKv";
|
|
3062
3211
|
readonly label: "Primary Voltage";
|
|
3063
3212
|
readonly format: {
|
|
3064
3213
|
readonly type: "voltage";
|
|
3065
|
-
readonly unit: "
|
|
3066
|
-
readonly decimals:
|
|
3214
|
+
readonly unit: "kV";
|
|
3215
|
+
readonly decimals: 1;
|
|
3216
|
+
};
|
|
3217
|
+
}, {
|
|
3218
|
+
readonly key: "outputVoltageKv";
|
|
3219
|
+
readonly label: "Output Voltage";
|
|
3220
|
+
readonly format: {
|
|
3221
|
+
readonly type: "voltage";
|
|
3222
|
+
readonly unit: "kV";
|
|
3223
|
+
readonly decimals: 2;
|
|
3067
3224
|
};
|
|
3068
3225
|
}];
|
|
3069
3226
|
};
|
|
@@ -4186,4 +4343,4 @@ declare const getContrastingTextColor: (backgroundColor: string) => string;
|
|
|
4186
4343
|
*/
|
|
4187
4344
|
declare const mapValuesToCategoricalColors: (values: (string | number)[]) => Record<string | number, string>;
|
|
4188
4345
|
|
|
4189
|
-
export { getContrastingTextColor as $, ABSENT_GRID_FIELDS as A, type BadgeProps as B, type ChartMargin as C, type StaticMapProps as D, ENTITY_CONFIG as E, type TooltipData as F, GRID_ELEMENT_TYPE_BY_ENTITY as G, HEADLINE_METRIC_BOUNDS as H, type InteractiveMapProps as I, type TooltipSeries as J, TopNav as K, Loader as L, type MapPoint as M, type TopNavProps as N, type YFormatType as O, archetypeFor as P, clearColorCache as Q, createCategoryColorMap as R, type SegmentOption as S, TextLink as T, createXScale as U, createYScale as V, defaultMargin as W, entityHasDetailPage as X, type YFormatSettings as Y, entityHasStatList as Z, entityShowsNow as _, type ActionItem as a, type
|
|
4346
|
+
export { getContrastingTextColor as $, ABSENT_GRID_FIELDS as A, type BadgeProps as B, type ChartMargin as C, type StaticMapProps as D, ENTITY_CONFIG as E, type TooltipData as F, GRID_ELEMENT_TYPE_BY_ENTITY as G, HEADLINE_METRIC_BOUNDS as H, type InteractiveMapProps as I, type TooltipSeries as J, TopNav as K, Loader as L, type MapPoint as M, type TopNavProps as N, type YFormatType as O, archetypeFor as P, clearColorCache as Q, createCategoryColorMap as R, type SegmentOption as S, TextLink as T, createXScale as U, createYScale as V, defaultMargin as W, entityHasDetailPage as X, type YFormatSettings as Y, entityHasStatList as Z, entityShowsNow as _, type ActionItem as a, type LayerStyle as a$, getDefaultChartColor as a0, getDefaultColors as a1, getEntityConfig as a2, getEntityIcon as a3, getEntityLabel as a4, getEntityStatList as a5, getResolvedColor as a6, getThemeCategoricalColors as a7, getYFormatSettings as a8, isLightColor as a9, type RasterLayerSpec as aA, type VectorLayerSpec as aB, type ClusteredVectorLayerSpec as aC, type ColorSpec as aD, ActionMenu as aE, AppShell as aF, Avatar as aG, Badge as aH, type BaseFormat as aI, ChartContext as aJ, CodeEditor as aK, type ComponentFormatOptions as aL, type CurrentUnit as aM, type CustomFormat as aN, DEFAULT_MAP_TYPE as aO, type DateFormatStyle as aP, type DistanceUnit as aQ, ENTITY_CATEGORY_CONFIG as aR, type EntityCategory as aS, type EntityCategoryConfig as aT, GRID_STATE_COLORS as aU, type GridStateColor as aV, InteractiveMap as aW, type InteractiveMapHandle as aX, type LayerCheckState as aY, type LayerFeature as aZ, type LayerSelection as a_, type FieldValue as aa, type BooleanFormat as ab, type FormattedValue as ac, type FieldFormat as ad, type CurrentFormat as ae, type DateFormat as af, type DistanceFormat as ag, type EnergyUnit as ah, type EnergyFormat as ai, type CurrencyFormat as aj, type NumberFormat as ak, type PhoneFormat as al, type PowerFormat as am, type FormatterFunction as an, type ResistanceFormat as ao, type TemperatureFormat as ap, type TemperatureUnitString as aq, type TemperatureUnit as ar, type TextFormat as as, type VoltageFormat as at, type DeviceState as au, type GridState as av, type ComponentFormatter as aw, type LayerSpec as ax, type CustomPinsSpec as ay, type GeoJsonLayerSpec as az, type ActionMenuProps as b, type LayerTreeNode as b0, type LayerVisibilityPatch as b1, MAP_TYPES as b2, type MapType as b3, Meter as b4, type MetricFormat as b5, type PercentageFormat as b6, type PowerUnit as b7, type RenderType as b8, type ResistanceUnit as b9, useChartContext as bA, useComponentFormatter as bB, SegmentedControl as ba, StackNav as bb, type StackNavGroup as bc, type StackNavItem as bd, type StackNavLinkComponentProps as be, type StackNavProps as bf, type StackNavRenderRow as bg, type StackNavRowRenderProps as bh, type StackNavTheme as bi, StaticMap as bj, type TextTransform as bk, type TextTruncatePosition as bl, UNVERIFIED_VOLTAGE_UNIT_ROWS as bm, type VoltageUnit as bn, type ZoomStops as bo, activeDeviceStates as bp, baselineFromPoint as bq, deviceStateLabels as br, deviceStateMetricFormats as bs, formatComponentValue as bt, getDeviceStateLabel as bu, getEntityCategory as bv, getGridStateLabel as bw, gridStateLabels as bx, isActiveState as by, mapValuesToCategoricalColors as bz, type AppShellProps as c, type AvatarProps as d, type BaseDataPoint as e, type CodeEditorProps as f, type CodeLanguage as g, type CodeTheme as h, type EntityArchetype as i, type EntityConfig as j, type EntityStateRule as k, type EntityType as l, GRID_STAT_LIST as m, type GridElementSourceType as n, type GridStatField as o, type GridStatFieldFormat as p, Heading as q, type HeadlineMetric as r, Logo as s, type MeterProps as t, type MetricSource as u, type SegmentedControlProps as v, type SerializableFieldFormat as w, SideNav as x, type SideNavItem as y, type SideNavProps as z };
|