@texturehq/edges 2.0.1 → 2.1.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/dist/{RichTextEditor-diZqy_s1.d.cts → RichTextEditor-BNXNpG4s.d.cts} +51 -10
- package/dist/{RichTextEditor-diZqy_s1.d.ts → RichTextEditor-BNXNpG4s.d.ts} +51 -10
- package/dist/{TimeField-7pTUPh11.d.ts → TimeField-2KuhWThm.d.ts} +1 -1
- package/dist/{TimeField-CqmVrAdn.d.cts → TimeField-DAuKLDSw.d.cts} +1 -1
- package/dist/{colors-CfANmDSd.d.cts → colors-C_3RVUMs.d.cts} +455 -28
- package/dist/{colors-VFFqViFy.d.ts → colors-DxW1GSLj.d.ts} +455 -28
- package/dist/form/index.cjs +2 -1
- package/dist/form/index.cjs.map +1 -1
- package/dist/form/index.js +2 -1
- package/dist/form/index.js.map +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +98 -47
- package/dist/index.d.ts +98 -47
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/rhf/index.cjs +2 -1
- package/dist/rhf/index.cjs.map +1 -1
- package/dist/rhf/index.d.cts +2 -2
- package/dist/rhf/index.d.ts +2 -2
- package/dist/rhf/index.js +2 -1
- package/dist/rhf/index.js.map +1 -1
- package/dist/server.cjs +2 -2
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import * as React$1 from 'react';
|
|
|
3
3
|
import React__default, { ReactNode, ComponentType } from 'react';
|
|
4
4
|
import { ScaleTime, ScaleLinear } from 'd3-scale';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
-
import { d as IconName } from './RichTextEditor-
|
|
6
|
+
import { d as IconName } from './RichTextEditor-BNXNpG4s.cjs';
|
|
7
7
|
import * as react_map_gl from 'react-map-gl';
|
|
8
8
|
import { ViewState, MapRef } from 'react-map-gl';
|
|
9
9
|
import { MeterProps as MeterProps$1 } from 'react-aria-components';
|
|
@@ -578,9 +578,36 @@ type StackNavTheme = {
|
|
|
578
578
|
/** Border color (rail border, header/footer separators, dividers). Defaults to `var(--color-border-default)`. */
|
|
579
579
|
borderColor?: string;
|
|
580
580
|
};
|
|
581
|
-
|
|
582
|
-
|
|
581
|
+
/**
|
|
582
|
+
* A logical group of root-pane items. Renders the group's `items` in order,
|
|
583
|
+
* with a thin divider drawn between consecutive groups (and an optional
|
|
584
|
+
* uppercase `title` label above the group). Mirrors the old SideNav sectioned
|
|
585
|
+
* `topItems` API so grouped navigation composes without the consumer having to
|
|
586
|
+
* hand-inject divider rows.
|
|
587
|
+
*/
|
|
588
|
+
type StackNavGroup = {
|
|
589
|
+
/** Stable identifier for the group (used as a React key). */
|
|
590
|
+
id: string;
|
|
591
|
+
/** Optional uppercase label rendered above the group's rows. */
|
|
592
|
+
title?: string;
|
|
593
|
+
/** Items belonging to this group. Each can recurse with `children`. */
|
|
583
594
|
items: StackNavItem[];
|
|
595
|
+
};
|
|
596
|
+
type StackNavProps = {
|
|
597
|
+
/**
|
|
598
|
+
* Root pane items. Each item can recurse with `children`. Mutually exclusive
|
|
599
|
+
* with `groups` — when both are passed, `groups` wins and `items` is ignored
|
|
600
|
+
* (a dev-build warning is logged).
|
|
601
|
+
*/
|
|
602
|
+
items?: StackNavItem[];
|
|
603
|
+
/**
|
|
604
|
+
* Grouped root-pane items. When provided, the root pane renders each group's
|
|
605
|
+
* rows in order with a divider between consecutive groups (and the group's
|
|
606
|
+
* optional `title` as an uppercase label). Prefer this over hand-injecting
|
|
607
|
+
* `divider`/`groupLabel` rows into a flat `items` array — the component owns
|
|
608
|
+
* the separator rendering so every consumer gets consistent grouping.
|
|
609
|
+
*/
|
|
610
|
+
groups?: StackNavGroup[];
|
|
584
611
|
/**
|
|
585
612
|
* Additional L1 items pinned to the bottom of the root pane. Behave identically
|
|
586
613
|
* to `items` — leaves navigate, parents push a sub-pane on click, deep-links
|
|
@@ -688,7 +715,7 @@ type StackNavProps = {
|
|
|
688
715
|
*/
|
|
689
716
|
sidebarCollapseId?: string;
|
|
690
717
|
};
|
|
691
|
-
declare function StackNav({ items, 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;
|
|
718
|
+
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;
|
|
692
719
|
|
|
693
720
|
type ColorMode = "system" | "light" | "dark";
|
|
694
721
|
type TopNavProps = {
|
|
@@ -1089,6 +1116,7 @@ type ColorSpec = {
|
|
|
1089
1116
|
} | {
|
|
1090
1117
|
by: string;
|
|
1091
1118
|
mapping: Record<string, ColorSpec>;
|
|
1119
|
+
fallback?: ColorSpec;
|
|
1092
1120
|
} | {
|
|
1093
1121
|
by: string;
|
|
1094
1122
|
palette: "categorical";
|
|
@@ -1997,8 +2025,14 @@ declare const TextLink: ({ href, children, className, external, title, variant,
|
|
|
1997
2025
|
/**
|
|
1998
2026
|
* Entity Configuration
|
|
1999
2027
|
*
|
|
2000
|
-
* Centralized configuration for
|
|
2001
|
-
*
|
|
2028
|
+
* Centralized configuration for every entity the Texture platform models —
|
|
2029
|
+
* core product objects (app, site, device…), physical grid-infrastructure
|
|
2030
|
+
* elements (transformer, recloser, pole…), and behind-the-meter connected
|
|
2031
|
+
* devices (battery, EV charger, thermostat…).
|
|
2032
|
+
*
|
|
2033
|
+
* Each entity carries its display label, a Phosphor icon, an optional
|
|
2034
|
+
* description, and a `category` so surfaces can group them (Platform / Grid
|
|
2035
|
+
* element / Device).
|
|
2002
2036
|
*
|
|
2003
2037
|
* Use this for consistent entity representation across the application:
|
|
2004
2038
|
* - Navigation
|
|
@@ -2012,13 +2046,20 @@ declare const TextLink: ({ href, children, className, external, title, variant,
|
|
|
2012
2046
|
* import { ENTITY_CONFIG } from "@texturehq/edges/config/entities";
|
|
2013
2047
|
*
|
|
2014
2048
|
* const siteConfig = ENTITY_CONFIG.site;
|
|
2015
|
-
* // { icon: "
|
|
2049
|
+
* // { icon: "MapPin", category: "platform", label: { singular: "Site", plural: "Sites" }, ... }
|
|
2016
2050
|
* ```
|
|
2017
2051
|
*/
|
|
2018
2052
|
|
|
2053
|
+
/** Grouping for an entity. Lets surfaces section grid elements and devices
|
|
2054
|
+
* apart from core platform objects. */
|
|
2055
|
+
type EntityCategory = "platform" | "grid" | "device";
|
|
2019
2056
|
interface EntityConfig {
|
|
2020
|
-
/** Phosphor icon name
|
|
2057
|
+
/** Phosphor icon name. The canonical (resting / default) glyph. For switchable
|
|
2058
|
+
* elements this mirrors `states.closed.icon` (or the base glyph when the
|
|
2059
|
+
* state only changes color). */
|
|
2021
2060
|
icon: IconName;
|
|
2061
|
+
/** Grouping for the entity (platform object, grid element, or device). */
|
|
2062
|
+
category: EntityCategory;
|
|
2022
2063
|
/** Display labels */
|
|
2023
2064
|
label: {
|
|
2024
2065
|
singular: string;
|
|
@@ -2026,119 +2067,489 @@ interface EntityConfig {
|
|
|
2026
2067
|
};
|
|
2027
2068
|
/** Optional description */
|
|
2028
2069
|
description?: string;
|
|
2070
|
+
/**
|
|
2071
|
+
* Optional open/closed state variants for switchable elements. State is
|
|
2072
|
+
* expressed one of two ways, per the identity-vs-state boundary:
|
|
2073
|
+
* • GEOMETRY — the shape moves (Switch, Sectionalizer): set `icon` per state.
|
|
2074
|
+
* • COLOR — the shape is fixed, the tint changes (Breaker, Recloser):
|
|
2075
|
+
* set `color` per state; the glyph stays `EntityConfig.icon`.
|
|
2076
|
+
* A state may set both. When `icon` is omitted the entity's base `icon` is
|
|
2077
|
+
* used and only the color differs. Color is applied at the RENDER layer via
|
|
2078
|
+
* the documented `GRID_STATE_COLORS` token — never baked into the glyph SVG.
|
|
2079
|
+
*/
|
|
2080
|
+
states?: {
|
|
2081
|
+
open: EntityStateVariant;
|
|
2082
|
+
closed: EntityStateVariant;
|
|
2083
|
+
};
|
|
2084
|
+
}
|
|
2085
|
+
/** One open/closed state's presentation: an optional glyph override and/or a
|
|
2086
|
+
* status color. Omitting `icon` means "use the entity's base icon, recolored". */
|
|
2087
|
+
interface EntityStateVariant {
|
|
2088
|
+
icon?: IconName;
|
|
2089
|
+
color?: GridStateColor;
|
|
2029
2090
|
}
|
|
2091
|
+
/**
|
|
2092
|
+
* Status palette for grid-element states. This is the SINGLE source for both
|
|
2093
|
+
* the live render-layer tint (Breaker/Recloser recolor their glyph by state)
|
|
2094
|
+
* and the docs/QA legend. `className` is the Edges Tailwind token utility
|
|
2095
|
+
* applied to the icon wrapper (glyph inherits via `currentColor`); `token` is
|
|
2096
|
+
* the raw CSS variable for non-Tailwind consumers. The glyph SVG itself stays
|
|
2097
|
+
* monochrome — color lives here, at the render layer, not in the icon.
|
|
2098
|
+
*/
|
|
2099
|
+
declare const GRID_STATE_COLORS: {
|
|
2100
|
+
readonly open: {
|
|
2101
|
+
readonly className: "text-feedback-success-border";
|
|
2102
|
+
readonly token: "--color-feedback-success-border";
|
|
2103
|
+
readonly label: "Open";
|
|
2104
|
+
};
|
|
2105
|
+
readonly closed: {
|
|
2106
|
+
readonly className: "text-feedback-error-border";
|
|
2107
|
+
readonly token: "--color-feedback-error-border";
|
|
2108
|
+
readonly label: "Closed";
|
|
2109
|
+
};
|
|
2110
|
+
};
|
|
2111
|
+
type GridStateColor = keyof typeof GRID_STATE_COLORS;
|
|
2112
|
+
/** Display metadata for each category — label, blurb, icon, and sort order. */
|
|
2113
|
+
interface EntityCategoryConfig {
|
|
2114
|
+
label: string;
|
|
2115
|
+
description: string;
|
|
2116
|
+
icon: IconName;
|
|
2117
|
+
order: number;
|
|
2118
|
+
}
|
|
2119
|
+
declare const ENTITY_CATEGORY_CONFIG: {
|
|
2120
|
+
readonly platform: {
|
|
2121
|
+
readonly label: "Platform";
|
|
2122
|
+
readonly description: "Core product objects that structure the Texture workspace.";
|
|
2123
|
+
readonly icon: "Stack";
|
|
2124
|
+
readonly order: 0;
|
|
2125
|
+
};
|
|
2126
|
+
readonly grid: {
|
|
2127
|
+
readonly label: "Grid Elements";
|
|
2128
|
+
readonly description: "Physical utility-grid infrastructure imported from a customer's GIS export.";
|
|
2129
|
+
readonly icon: "TreeStructure";
|
|
2130
|
+
readonly order: 1;
|
|
2131
|
+
};
|
|
2132
|
+
readonly device: {
|
|
2133
|
+
readonly label: "Devices";
|
|
2134
|
+
readonly description: "Behind-the-meter connected energy devices.";
|
|
2135
|
+
readonly icon: "Lightning";
|
|
2136
|
+
readonly order: 2;
|
|
2137
|
+
};
|
|
2138
|
+
};
|
|
2030
2139
|
declare const ENTITY_CONFIG: {
|
|
2031
2140
|
readonly app: {
|
|
2032
2141
|
readonly icon: "AppWindow";
|
|
2142
|
+
readonly category: "platform";
|
|
2033
2143
|
readonly label: {
|
|
2034
2144
|
readonly singular: "App";
|
|
2035
2145
|
readonly plural: "Apps";
|
|
2036
2146
|
};
|
|
2037
|
-
readonly description: "Workspace and
|
|
2147
|
+
readonly description: "Workspace tools and third-party integrations";
|
|
2038
2148
|
};
|
|
2039
2149
|
readonly site: {
|
|
2040
2150
|
readonly icon: "MapPin";
|
|
2151
|
+
readonly category: "platform";
|
|
2041
2152
|
readonly label: {
|
|
2042
2153
|
readonly singular: "Site";
|
|
2043
2154
|
readonly plural: "Sites";
|
|
2044
2155
|
};
|
|
2045
|
-
readonly description: "Physical
|
|
2156
|
+
readonly description: "Physical location housing energy systems";
|
|
2046
2157
|
};
|
|
2047
2158
|
readonly device: {
|
|
2048
2159
|
readonly icon: "ShareNetwork";
|
|
2160
|
+
readonly category: "platform";
|
|
2049
2161
|
readonly label: {
|
|
2050
2162
|
readonly singular: "Device";
|
|
2051
2163
|
readonly plural: "Devices";
|
|
2052
2164
|
};
|
|
2053
|
-
readonly description: "Connected energy
|
|
2165
|
+
readonly description: "Connected, controllable energy device";
|
|
2054
2166
|
};
|
|
2055
2167
|
readonly customer: {
|
|
2056
2168
|
readonly icon: "Users";
|
|
2169
|
+
readonly category: "platform";
|
|
2057
2170
|
readonly label: {
|
|
2058
2171
|
readonly singular: "Customer";
|
|
2059
2172
|
readonly plural: "Customers";
|
|
2060
2173
|
};
|
|
2061
|
-
readonly description: "End
|
|
2174
|
+
readonly description: "End customer or owner of one or more sites";
|
|
2062
2175
|
};
|
|
2063
2176
|
readonly contact: {
|
|
2064
2177
|
readonly icon: "Users";
|
|
2178
|
+
readonly category: "platform";
|
|
2065
2179
|
readonly label: {
|
|
2066
2180
|
readonly singular: "Contact";
|
|
2067
2181
|
readonly plural: "Contacts";
|
|
2068
2182
|
};
|
|
2069
|
-
readonly description: "
|
|
2183
|
+
readonly description: "Person associated with a customer or site";
|
|
2070
2184
|
};
|
|
2071
2185
|
readonly program: {
|
|
2072
2186
|
readonly icon: "ClipboardText";
|
|
2187
|
+
readonly category: "platform";
|
|
2073
2188
|
readonly label: {
|
|
2074
2189
|
readonly singular: "Program";
|
|
2075
2190
|
readonly plural: "Programs";
|
|
2076
2191
|
};
|
|
2077
|
-
readonly description: "Demand
|
|
2192
|
+
readonly description: "Demand-response or virtual power plant program";
|
|
2078
2193
|
};
|
|
2079
2194
|
readonly workflow: {
|
|
2080
2195
|
readonly icon: "FlowArrow";
|
|
2196
|
+
readonly category: "platform";
|
|
2081
2197
|
readonly label: {
|
|
2082
2198
|
readonly singular: "Workflow";
|
|
2083
2199
|
readonly plural: "Workflows";
|
|
2084
2200
|
};
|
|
2085
|
-
readonly description: "Automated
|
|
2201
|
+
readonly description: "Automated rule that runs in response to events";
|
|
2086
2202
|
};
|
|
2087
2203
|
readonly collection: {
|
|
2088
2204
|
readonly icon: "Stack";
|
|
2205
|
+
readonly category: "platform";
|
|
2089
2206
|
readonly label: {
|
|
2090
2207
|
readonly singular: "Collection";
|
|
2091
2208
|
readonly plural: "Collections";
|
|
2092
2209
|
};
|
|
2093
|
-
readonly description: "
|
|
2210
|
+
readonly description: "Named group of related entities or records";
|
|
2094
2211
|
};
|
|
2095
2212
|
readonly board: {
|
|
2096
2213
|
readonly icon: "SquaresFour";
|
|
2214
|
+
readonly category: "platform";
|
|
2097
2215
|
readonly label: {
|
|
2098
2216
|
readonly singular: "Board";
|
|
2099
2217
|
readonly plural: "Boards";
|
|
2100
2218
|
};
|
|
2101
|
-
readonly description: "Dashboard
|
|
2219
|
+
readonly description: "Dashboard for monitoring metrics and devices";
|
|
2102
2220
|
};
|
|
2103
2221
|
readonly report: {
|
|
2104
2222
|
readonly icon: "ChartLine";
|
|
2223
|
+
readonly category: "platform";
|
|
2105
2224
|
readonly label: {
|
|
2106
2225
|
readonly singular: "Report";
|
|
2107
2226
|
readonly plural: "Reports";
|
|
2108
2227
|
};
|
|
2109
|
-
readonly description: "
|
|
2228
|
+
readonly description: "Saved analytics view or generated report";
|
|
2110
2229
|
};
|
|
2111
2230
|
readonly event: {
|
|
2112
2231
|
readonly icon: "ClockCounterClockwise";
|
|
2232
|
+
readonly category: "platform";
|
|
2113
2233
|
readonly label: {
|
|
2114
2234
|
readonly singular: "Event";
|
|
2115
2235
|
readonly plural: "Events";
|
|
2116
2236
|
};
|
|
2117
|
-
readonly description: "
|
|
2237
|
+
readonly description: "Recorded system event or logged activity";
|
|
2118
2238
|
};
|
|
2119
2239
|
readonly alert: {
|
|
2120
2240
|
readonly icon: "Warning";
|
|
2241
|
+
readonly category: "platform";
|
|
2121
2242
|
readonly label: {
|
|
2122
2243
|
readonly singular: "Alert";
|
|
2123
2244
|
readonly plural: "Alerts";
|
|
2124
2245
|
};
|
|
2125
|
-
readonly description: "
|
|
2246
|
+
readonly description: "Notification raised when attention is needed";
|
|
2126
2247
|
};
|
|
2127
2248
|
readonly monitor: {
|
|
2128
2249
|
readonly icon: "Pulse";
|
|
2250
|
+
readonly category: "platform";
|
|
2129
2251
|
readonly label: {
|
|
2130
2252
|
readonly singular: "Monitor";
|
|
2131
2253
|
readonly plural: "Monitors";
|
|
2132
2254
|
};
|
|
2133
|
-
readonly description: "
|
|
2255
|
+
readonly description: "Rule that watches a metric against a threshold";
|
|
2134
2256
|
};
|
|
2135
2257
|
readonly command: {
|
|
2136
2258
|
readonly icon: "Play";
|
|
2259
|
+
readonly category: "platform";
|
|
2137
2260
|
readonly label: {
|
|
2138
2261
|
readonly singular: "Command";
|
|
2139
2262
|
readonly plural: "Commands";
|
|
2140
2263
|
};
|
|
2141
|
-
readonly description: "
|
|
2264
|
+
readonly description: "Control action issued to a connected device";
|
|
2265
|
+
};
|
|
2266
|
+
readonly source: {
|
|
2267
|
+
readonly icon: "TextureSource";
|
|
2268
|
+
readonly category: "grid";
|
|
2269
|
+
readonly label: {
|
|
2270
|
+
readonly singular: "Source";
|
|
2271
|
+
readonly plural: "Sources";
|
|
2272
|
+
};
|
|
2273
|
+
readonly description: "Upstream feed where the network originates";
|
|
2274
|
+
};
|
|
2275
|
+
readonly substation: {
|
|
2276
|
+
readonly icon: "TextureSource";
|
|
2277
|
+
readonly category: "grid";
|
|
2278
|
+
readonly label: {
|
|
2279
|
+
readonly singular: "Substation";
|
|
2280
|
+
readonly plural: "Substations";
|
|
2281
|
+
};
|
|
2282
|
+
readonly description: "Facility that steps down transmission voltage";
|
|
2283
|
+
};
|
|
2284
|
+
readonly capacitor: {
|
|
2285
|
+
readonly icon: "TextureCapacitor";
|
|
2286
|
+
readonly category: "grid";
|
|
2287
|
+
readonly label: {
|
|
2288
|
+
readonly singular: "Capacitor";
|
|
2289
|
+
readonly plural: "Capacitors";
|
|
2290
|
+
};
|
|
2291
|
+
readonly description: "Capacitor bank for power-factor and voltage support";
|
|
2292
|
+
};
|
|
2293
|
+
readonly switch: {
|
|
2294
|
+
readonly icon: "TextureSwitchClosed";
|
|
2295
|
+
readonly category: "grid";
|
|
2296
|
+
readonly label: {
|
|
2297
|
+
readonly singular: "Switch";
|
|
2298
|
+
readonly plural: "Switches";
|
|
2299
|
+
};
|
|
2300
|
+
readonly description: "Sectionalizing or disconnect switch on the line";
|
|
2301
|
+
readonly states: {
|
|
2302
|
+
readonly open: {
|
|
2303
|
+
readonly icon: "TextureSwitch";
|
|
2304
|
+
readonly color: "open";
|
|
2305
|
+
};
|
|
2306
|
+
readonly closed: {
|
|
2307
|
+
readonly icon: "TextureSwitchClosed";
|
|
2308
|
+
readonly color: "closed";
|
|
2309
|
+
};
|
|
2310
|
+
};
|
|
2311
|
+
};
|
|
2312
|
+
readonly sectionalizer: {
|
|
2313
|
+
readonly icon: "TextureSectionalizerClosed";
|
|
2314
|
+
readonly category: "grid";
|
|
2315
|
+
readonly label: {
|
|
2316
|
+
readonly singular: "Sectionalizer";
|
|
2317
|
+
readonly plural: "Sectionalizers";
|
|
2318
|
+
};
|
|
2319
|
+
readonly description: "Counts upstream recloser trips and opens to isolate a faulted section";
|
|
2320
|
+
readonly states: {
|
|
2321
|
+
readonly open: {
|
|
2322
|
+
readonly icon: "TextureSectionalizerOpen";
|
|
2323
|
+
readonly color: "open";
|
|
2324
|
+
};
|
|
2325
|
+
readonly closed: {
|
|
2326
|
+
readonly icon: "TextureSectionalizerClosed";
|
|
2327
|
+
readonly color: "closed";
|
|
2328
|
+
};
|
|
2329
|
+
};
|
|
2330
|
+
};
|
|
2331
|
+
readonly relay: {
|
|
2332
|
+
readonly icon: "Cpu";
|
|
2333
|
+
readonly category: "grid";
|
|
2334
|
+
readonly label: {
|
|
2335
|
+
readonly singular: "Relay";
|
|
2336
|
+
readonly plural: "Relays";
|
|
2337
|
+
};
|
|
2338
|
+
readonly description: "Microprocessor relay that senses faults and trips devices";
|
|
2339
|
+
};
|
|
2340
|
+
readonly transformer: {
|
|
2341
|
+
readonly icon: "TextureTransformer";
|
|
2342
|
+
readonly category: "grid";
|
|
2343
|
+
readonly label: {
|
|
2344
|
+
readonly singular: "Transformer";
|
|
2345
|
+
readonly plural: "Transformers";
|
|
2346
|
+
};
|
|
2347
|
+
readonly description: "Transformer that steps voltage up or down";
|
|
2348
|
+
};
|
|
2349
|
+
readonly meter: {
|
|
2350
|
+
readonly icon: "Gauge";
|
|
2351
|
+
readonly category: "grid";
|
|
2352
|
+
readonly label: {
|
|
2353
|
+
readonly singular: "Meter";
|
|
2354
|
+
readonly plural: "Meters";
|
|
2355
|
+
};
|
|
2356
|
+
readonly description: "Revenue meter at the point of consumption";
|
|
2357
|
+
};
|
|
2358
|
+
readonly consumer: {
|
|
2359
|
+
readonly icon: "Gauge";
|
|
2360
|
+
readonly category: "grid";
|
|
2361
|
+
readonly label: {
|
|
2362
|
+
readonly singular: "Consumer";
|
|
2363
|
+
readonly plural: "Consumers";
|
|
2364
|
+
};
|
|
2365
|
+
readonly description: "Service point or customer premise on the grid";
|
|
2366
|
+
};
|
|
2367
|
+
readonly singlePhaseOverheadLine: {
|
|
2368
|
+
readonly icon: "TextureSinglePhaseOverheadLine";
|
|
2369
|
+
readonly category: "grid";
|
|
2370
|
+
readonly label: {
|
|
2371
|
+
readonly singular: "Single-Phase Overhead Line";
|
|
2372
|
+
readonly plural: "Single-Phase Overhead Lines";
|
|
2373
|
+
};
|
|
2374
|
+
readonly description: "Overhead line carrying one phase conductor";
|
|
2375
|
+
};
|
|
2376
|
+
readonly twoPhaseOverheadLine: {
|
|
2377
|
+
readonly icon: "TextureTwoPhaseOverheadLine";
|
|
2378
|
+
readonly category: "grid";
|
|
2379
|
+
readonly label: {
|
|
2380
|
+
readonly singular: "Two-Phase Overhead Line";
|
|
2381
|
+
readonly plural: "Two-Phase Overhead Lines";
|
|
2382
|
+
};
|
|
2383
|
+
readonly description: "Overhead line carrying two phase conductors";
|
|
2384
|
+
};
|
|
2385
|
+
readonly threePhaseOverheadLine: {
|
|
2386
|
+
readonly icon: "TextureThreePhaseOverheadLine";
|
|
2387
|
+
readonly category: "grid";
|
|
2388
|
+
readonly label: {
|
|
2389
|
+
readonly singular: "Three-Phase Overhead Line";
|
|
2390
|
+
readonly plural: "Three-Phase Overhead Lines";
|
|
2391
|
+
};
|
|
2392
|
+
readonly description: "Overhead line carrying three phase conductors";
|
|
2393
|
+
};
|
|
2394
|
+
readonly singlePhaseUndergroundLine: {
|
|
2395
|
+
readonly icon: "TextureSinglePhaseUndergroundLine";
|
|
2396
|
+
readonly category: "grid";
|
|
2397
|
+
readonly label: {
|
|
2398
|
+
readonly singular: "Single-Phase Underground Line";
|
|
2399
|
+
readonly plural: "Single-Phase Underground Lines";
|
|
2400
|
+
};
|
|
2401
|
+
readonly description: "Buried line carrying one phase conductor";
|
|
2402
|
+
};
|
|
2403
|
+
readonly twoPhaseUndergroundLine: {
|
|
2404
|
+
readonly icon: "TextureTwoPhaseUndergroundLine";
|
|
2405
|
+
readonly category: "grid";
|
|
2406
|
+
readonly label: {
|
|
2407
|
+
readonly singular: "Two-Phase Underground Line";
|
|
2408
|
+
readonly plural: "Two-Phase Underground Lines";
|
|
2409
|
+
};
|
|
2410
|
+
readonly description: "Buried line carrying two phase conductors";
|
|
2411
|
+
};
|
|
2412
|
+
readonly threePhaseUndergroundLine: {
|
|
2413
|
+
readonly icon: "TextureThreePhaseUndergroundLine";
|
|
2414
|
+
readonly category: "grid";
|
|
2415
|
+
readonly label: {
|
|
2416
|
+
readonly singular: "Three-Phase Underground Line";
|
|
2417
|
+
readonly plural: "Three-Phase Underground Lines";
|
|
2418
|
+
};
|
|
2419
|
+
readonly description: "Buried line carrying three phase conductors";
|
|
2420
|
+
};
|
|
2421
|
+
readonly motorSwitch: {
|
|
2422
|
+
readonly icon: "Diamond";
|
|
2423
|
+
readonly category: "grid";
|
|
2424
|
+
readonly label: {
|
|
2425
|
+
readonly singular: "Motor Switch";
|
|
2426
|
+
readonly plural: "Motor Switches";
|
|
2427
|
+
};
|
|
2428
|
+
readonly description: "Motor-operated switch or motor load element";
|
|
2429
|
+
};
|
|
2430
|
+
readonly recloser: {
|
|
2431
|
+
readonly icon: "TextureRecloser";
|
|
2432
|
+
readonly category: "grid";
|
|
2433
|
+
readonly label: {
|
|
2434
|
+
readonly singular: "Recloser";
|
|
2435
|
+
readonly plural: "Reclosers";
|
|
2436
|
+
};
|
|
2437
|
+
readonly description: "Auto-reclosing device that clears transient faults";
|
|
2438
|
+
readonly states: {
|
|
2439
|
+
readonly open: {
|
|
2440
|
+
readonly color: "open";
|
|
2441
|
+
};
|
|
2442
|
+
readonly closed: {
|
|
2443
|
+
readonly color: "closed";
|
|
2444
|
+
};
|
|
2445
|
+
};
|
|
2446
|
+
};
|
|
2447
|
+
readonly fuse: {
|
|
2448
|
+
readonly icon: "TextureFuse";
|
|
2449
|
+
readonly category: "grid";
|
|
2450
|
+
readonly label: {
|
|
2451
|
+
readonly singular: "Fuse";
|
|
2452
|
+
readonly plural: "Fuses";
|
|
2453
|
+
};
|
|
2454
|
+
readonly description: "Fusible element providing overcurrent protection";
|
|
2455
|
+
};
|
|
2456
|
+
readonly breaker: {
|
|
2457
|
+
readonly icon: "TextureBreaker";
|
|
2458
|
+
readonly category: "grid";
|
|
2459
|
+
readonly label: {
|
|
2460
|
+
readonly singular: "Breaker";
|
|
2461
|
+
readonly plural: "Breakers";
|
|
2462
|
+
};
|
|
2463
|
+
readonly description: "Circuit breaker that interrupts fault current";
|
|
2464
|
+
readonly states: {
|
|
2465
|
+
readonly open: {
|
|
2466
|
+
readonly color: "open";
|
|
2467
|
+
};
|
|
2468
|
+
readonly closed: {
|
|
2469
|
+
readonly color: "closed";
|
|
2470
|
+
};
|
|
2471
|
+
};
|
|
2472
|
+
};
|
|
2473
|
+
readonly generator: {
|
|
2474
|
+
readonly icon: "Wind";
|
|
2475
|
+
readonly category: "grid";
|
|
2476
|
+
readonly label: {
|
|
2477
|
+
readonly singular: "Generator";
|
|
2478
|
+
readonly plural: "Generators";
|
|
2479
|
+
};
|
|
2480
|
+
readonly description: "Distributed generation unit feeding the grid";
|
|
2481
|
+
};
|
|
2482
|
+
readonly regulator: {
|
|
2483
|
+
readonly icon: "TextureRegulator";
|
|
2484
|
+
readonly category: "grid";
|
|
2485
|
+
readonly label: {
|
|
2486
|
+
readonly singular: "Regulator";
|
|
2487
|
+
readonly plural: "Regulators";
|
|
2488
|
+
};
|
|
2489
|
+
readonly description: "Voltage regulator that holds line voltage in range";
|
|
2490
|
+
};
|
|
2491
|
+
readonly supportStructure: {
|
|
2492
|
+
readonly icon: "TextureSupportStructure";
|
|
2493
|
+
readonly category: "grid";
|
|
2494
|
+
readonly label: {
|
|
2495
|
+
readonly singular: "Support Structure";
|
|
2496
|
+
readonly plural: "Support Structures";
|
|
2497
|
+
};
|
|
2498
|
+
readonly description: "Structure carrying overhead line equipment";
|
|
2499
|
+
};
|
|
2500
|
+
readonly battery: {
|
|
2501
|
+
readonly icon: "BatteryHigh";
|
|
2502
|
+
readonly category: "device";
|
|
2503
|
+
readonly label: {
|
|
2504
|
+
readonly singular: "Battery";
|
|
2505
|
+
readonly plural: "Batteries";
|
|
2506
|
+
};
|
|
2507
|
+
readonly description: "Behind-the-meter battery or storage system";
|
|
2508
|
+
};
|
|
2509
|
+
readonly evCharger: {
|
|
2510
|
+
readonly icon: "ChargingStation";
|
|
2511
|
+
readonly category: "device";
|
|
2512
|
+
readonly label: {
|
|
2513
|
+
readonly singular: "EV Charger";
|
|
2514
|
+
readonly plural: "EV Chargers";
|
|
2515
|
+
};
|
|
2516
|
+
readonly description: "Electric-vehicle charging station or port";
|
|
2517
|
+
};
|
|
2518
|
+
readonly inverter: {
|
|
2519
|
+
readonly icon: "Sun";
|
|
2520
|
+
readonly category: "device";
|
|
2521
|
+
readonly label: {
|
|
2522
|
+
readonly singular: "Solar / Inverter";
|
|
2523
|
+
readonly plural: "Solar / Inverters";
|
|
2524
|
+
};
|
|
2525
|
+
readonly description: "Solar PV inverter and its connected array";
|
|
2526
|
+
};
|
|
2527
|
+
readonly thermostat: {
|
|
2528
|
+
readonly icon: "Thermometer";
|
|
2529
|
+
readonly category: "device";
|
|
2530
|
+
readonly label: {
|
|
2531
|
+
readonly singular: "Thermostat";
|
|
2532
|
+
readonly plural: "Thermostats";
|
|
2533
|
+
};
|
|
2534
|
+
readonly description: "Smart thermostat or connected HVAC control";
|
|
2535
|
+
};
|
|
2536
|
+
readonly vehicle: {
|
|
2537
|
+
readonly icon: "Car";
|
|
2538
|
+
readonly category: "device";
|
|
2539
|
+
readonly label: {
|
|
2540
|
+
readonly singular: "EV";
|
|
2541
|
+
readonly plural: "EVs";
|
|
2542
|
+
};
|
|
2543
|
+
readonly description: "Electric vehicle managed as a flexible load";
|
|
2544
|
+
};
|
|
2545
|
+
readonly waterHeater: {
|
|
2546
|
+
readonly icon: "Drop";
|
|
2547
|
+
readonly category: "device";
|
|
2548
|
+
readonly label: {
|
|
2549
|
+
readonly singular: "Water Heater";
|
|
2550
|
+
readonly plural: "Water Heaters";
|
|
2551
|
+
};
|
|
2552
|
+
readonly description: "Connected or smart electric water heater";
|
|
2142
2553
|
};
|
|
2143
2554
|
};
|
|
2144
2555
|
type EntityType = keyof typeof ENTITY_CONFIG;
|
|
@@ -2151,7 +2562,7 @@ type EntityType = keyof typeof ENTITY_CONFIG;
|
|
|
2151
2562
|
* @example
|
|
2152
2563
|
* ```tsx
|
|
2153
2564
|
* const config = getEntityConfig("site");
|
|
2154
|
-
* // { icon: "
|
|
2565
|
+
* // { icon: "MapPin", category: "platform", label: { singular: "Site", plural: "Sites" }, ... }
|
|
2155
2566
|
* ```
|
|
2156
2567
|
*/
|
|
2157
2568
|
declare function getEntityConfig(entityType: EntityType): EntityConfig;
|
|
@@ -2163,7 +2574,7 @@ declare function getEntityConfig(entityType: EntityType): EntityConfig;
|
|
|
2163
2574
|
*
|
|
2164
2575
|
* @example
|
|
2165
2576
|
* ```tsx
|
|
2166
|
-
* const iconName = getEntityIcon("site"); // "
|
|
2577
|
+
* const iconName = getEntityIcon("site"); // "MapPin"
|
|
2167
2578
|
* ```
|
|
2168
2579
|
*/
|
|
2169
2580
|
declare function getEntityIcon(entityType: EntityType): IconName;
|
|
@@ -2181,17 +2592,33 @@ declare function getEntityIcon(entityType: EntityType): IconName;
|
|
|
2181
2592
|
* ```
|
|
2182
2593
|
*/
|
|
2183
2594
|
declare function getEntityLabel(entityType: EntityType, plural?: boolean): string;
|
|
2595
|
+
/**
|
|
2596
|
+
* Get the category an entity belongs to.
|
|
2597
|
+
*
|
|
2598
|
+
* @param entityType - The entity type key
|
|
2599
|
+
* @returns The entity's category
|
|
2600
|
+
*/
|
|
2601
|
+
declare function getEntityCategory(entityType: EntityType): EntityCategory;
|
|
2184
2602
|
|
|
2185
2603
|
/**
|
|
2186
|
-
* Resolves a CSS variable to its computed color value
|
|
2187
|
-
* Supports multiple formats
|
|
2604
|
+
* Resolves a CSS variable to its computed color value.
|
|
2605
|
+
* Supports multiple input formats, automatically adds the `color-` prefix
|
|
2606
|
+
* when needed, and follows `var(--alias)` chains across themes.
|
|
2188
2607
|
*
|
|
2189
2608
|
* @param variableName - CSS variable name in any of these formats:
|
|
2190
2609
|
* - "action-brand" → resolves to --color-action-brand
|
|
2191
2610
|
* - "color-action-brand" → resolves to --color-action-brand
|
|
2192
2611
|
* - "--color-action-brand" → used as-is
|
|
2193
2612
|
* - "var(--color-action-brand)" → unwrapped and used
|
|
2194
|
-
* @returns Resolved color value or fallback
|
|
2613
|
+
* @returns Resolved color value (hex / rgb / named) or `fallback`
|
|
2614
|
+
*
|
|
2615
|
+
* Why alias following: `getComputedStyle().getPropertyValue()` returns the
|
|
2616
|
+
* DECLARED value of a custom property, not its fully-resolved value. In
|
|
2617
|
+
* Edges tokens, dark-theme feedback colors are declared as
|
|
2618
|
+
* `var(--color-*-base)`, so a single lookup hands back another `var(...)`
|
|
2619
|
+
* string. Mapbox GL can't parse that — the caller would either drop the
|
|
2620
|
+
* paint property or fall back to a default. We follow the chain (capped at
|
|
2621
|
+
* `MAX_VAR_ALIAS_DEPTH`) so callers always receive a parseable color.
|
|
2195
2622
|
*/
|
|
2196
2623
|
declare const getResolvedColor: (variableName: string, fallback?: string) => string;
|
|
2197
2624
|
/**
|
|
@@ -2232,4 +2659,4 @@ declare const getContrastingTextColor: (backgroundColor: string) => string;
|
|
|
2232
2659
|
*/
|
|
2233
2660
|
declare const mapValuesToCategoricalColors: (values: (string | number)[]) => Record<string | number, string>;
|
|
2234
2661
|
|
|
2235
|
-
export { type EnergyFormat as $, type ActionItem as A, type BadgeProps as B, type ChartMargin as C, getContrastingTextColor as D, ENTITY_CONFIG as E, getDefaultChartColor as F, getDefaultColors as G, Heading as H, type InteractiveMapProps as I, getEntityConfig as J, getEntityIcon as K, Loader as L, type MapPoint as M, getEntityLabel as N, getResolvedColor as O, getThemeCategoricalColors as P, getYFormatSettings as Q, isLightColor as R, type SegmentOption as S, TextLink as T, type FieldValue as U, type BooleanFormat as V, type FormattedValue as W, type CurrentFormat as X, type YFormatSettings as Y, type DateFormat as Z, type DistanceFormat as _, type ActionMenuProps as a,
|
|
2662
|
+
export { type EnergyFormat as $, type ActionItem as A, type BadgeProps as B, type ChartMargin as C, getContrastingTextColor as D, ENTITY_CONFIG as E, getDefaultChartColor as F, getDefaultColors as G, Heading as H, type InteractiveMapProps as I, getEntityConfig as J, getEntityIcon as K, Loader as L, type MapPoint as M, getEntityLabel as N, getResolvedColor as O, getThemeCategoricalColors as P, getYFormatSettings as Q, isLightColor as R, type SegmentOption as S, TextLink as T, type FieldValue as U, type BooleanFormat as V, type FormattedValue as W, type CurrentFormat as X, type YFormatSettings as Y, type DateFormat as Z, type DistanceFormat as _, type ActionMenuProps as a, type VoltageUnit as a$, type CurrencyFormat as a0, type NumberFormat as a1, type PhoneFormat as a2, type PowerFormat as a3, type FormatterFunction as a4, type ResistanceFormat as a5, type TemperatureFormat as a6, type TemperatureUnitString as a7, type TemperatureUnit as a8, type TextFormat as a9, type EnergyUnit as aA, type EntityCategory as aB, type EntityCategoryConfig as aC, GRID_STATE_COLORS as aD, type GridStateColor as aE, InteractiveMap as aF, type InteractiveMapHandle as aG, type LayerFeature as aH, type LayerStyle as aI, MAP_TYPES as aJ, type MapType as aK, Meter as aL, type MetricFormat as aM, type PercentageFormat as aN, type PowerUnit as aO, type RenderType as aP, type ResistanceUnit as aQ, SegmentedControl as aR, StackNav as aS, type StackNavGroup as aT, type StackNavItem as aU, type StackNavLinkComponentProps as aV, type StackNavProps as aW, type StackNavTheme as aX, StaticMap as aY, type TextTransform as aZ, type TextTruncatePosition as a_, type VoltageFormat as aa, type FieldFormat as ab, type DeviceState as ac, type GridState as ad, type ComponentFormatter as ae, type LayerSpec as af, type CustomPinsSpec as ag, type GeoJsonLayerSpec as ah, type RasterLayerSpec as ai, type VectorLayerSpec as aj, type ClusteredVectorLayerSpec as ak, ActionMenu as al, AppShell as am, Avatar as an, Badge as ao, type BaseFormat as ap, ChartContext as aq, CodeEditor as ar, type ColorSpec as as, type ComponentFormatOptions as at, type CurrentUnit as au, type CustomFormat as av, DEFAULT_MAP_TYPE as aw, type DateFormatStyle as ax, type DistanceUnit as ay, ENTITY_CATEGORY_CONFIG as az, type AppShellProps as b, type ZoomStops as b0, activeDeviceStates as b1, baselineFromPoint as b2, deviceStateLabels as b3, deviceStateMetricFormats as b4, formatComponentValue as b5, getDeviceStateLabel as b6, getEntityCategory as b7, getGridStateLabel as b8, gridStateLabels as b9, isActiveState as ba, mapValuesToCategoricalColors as bb, useChartContext as bc, useComponentFormatter as bd, type AvatarProps as c, type BaseDataPoint as d, type CodeEditorProps as e, type CodeLanguage as f, type CodeTheme as g, type EntityConfig as h, type EntityType as i, Logo as j, type MeterProps as k, type SegmentedControlProps as l, SideNav as m, type SideNavItem as n, type SideNavProps as o, type StaticMapProps as p, type TooltipData as q, type TooltipSeries as r, TopNav as s, type TopNavProps as t, type YFormatType as u, clearColorCache as v, createCategoryColorMap as w, createXScale as x, createYScale as y, defaultMargin as z };
|