@texturehq/edges 3.1.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{colors-vcCsLoIo.d.ts → colors-CG2ClL96.d.ts} +28 -5
- package/dist/{colors-BJ7jego1.d.cts → colors-CYFLoBNY.d.cts} +28 -5
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +64 -14
- package/dist/index.d.ts +64 -14
- package/dist/index.js +9 -9
- 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 +12 -4
- package/package.json +1 -1
|
@@ -557,7 +557,19 @@ interface AvatarProps {
|
|
|
557
557
|
*/
|
|
558
558
|
declare function Avatar({ src, alt, firstName, lastName, fullName, onClick, size, shape, variant, className, status, bordered, piiEntity, }: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
559
559
|
|
|
560
|
-
|
|
560
|
+
/**
|
|
561
|
+
* Device states Edges can label and colour.
|
|
562
|
+
*
|
|
563
|
+
* `circulate` was half-shipped: its design tokens (`bg-state-circulate`,
|
|
564
|
+
* `text-state-circulate-text` and friends) were generated, but it was in neither
|
|
565
|
+
* this union nor `badgeVariantStyles`, so the 23,330 `fanMode` events a week that
|
|
566
|
+
* report it had no styling to resolve. Adding it here is what wires the tokens up.
|
|
567
|
+
*
|
|
568
|
+
* The two `Record<DeviceState, …>` maps below are the completeness guard: adding a
|
|
569
|
+
* member breaks the build until both have an entry. `activeDeviceStates` is a plain
|
|
570
|
+
* array and is NOT compiler-enforced — decide about it explicitly.
|
|
571
|
+
*/
|
|
572
|
+
type DeviceState = "unknown" | "on" | "off" | "idle" | "charging" | "discharging" | "heat" | "eco" | "cool" | "auto" | "circulate" | "connected" | "disconnected";
|
|
561
573
|
type MetricFormat = "percentage" | "kW" | "temperature";
|
|
562
574
|
declare const deviceStateMetricFormats: Record<DeviceState, MetricFormat | undefined>;
|
|
563
575
|
/**
|
|
@@ -578,7 +590,18 @@ declare function isActiveState(state: DeviceState): boolean;
|
|
|
578
590
|
*/
|
|
579
591
|
declare function getDeviceStateLabel(state: DeviceState): string;
|
|
580
592
|
|
|
581
|
-
|
|
593
|
+
/**
|
|
594
|
+
* Grid states — the direction of power flow between a site and the grid.
|
|
595
|
+
*
|
|
596
|
+
* Mirrors the `GridStatus` Prisma enum in `domains/device/prisma/schema.prisma`.
|
|
597
|
+
* `idle` and `unknown` were missing here while being 13–20 % of the observed
|
|
598
|
+
* event stream, so any consumer narrowing to this union rendered them as nothing
|
|
599
|
+
* at all. They need no new Badge entry and no new design token: both names
|
|
600
|
+
* already resolve in `badgeVariantStyles` (declared there under the device-state
|
|
601
|
+
* group, which is a flat map, so a name resolves regardless of which comment
|
|
602
|
+
* group it sits under).
|
|
603
|
+
*/
|
|
604
|
+
type GridState = "importing" | "exporting" | "idle" | "unknown";
|
|
582
605
|
/**
|
|
583
606
|
* Human-readable labels for grid states
|
|
584
607
|
*/
|
|
@@ -621,8 +644,8 @@ interface BadgeProps {
|
|
|
621
644
|
* A non-interactive label for displaying status, counts, or categories.
|
|
622
645
|
* Use for read-only indicators. For interactive elements, use Chip instead.
|
|
623
646
|
*
|
|
624
|
-
* Supports device states (charging, discharging, heat, cool, etc.) and
|
|
625
|
-
* grid states (importing, exporting) as variant values.
|
|
647
|
+
* Supports device states (charging, discharging, heat, cool, circulate, etc.) and
|
|
648
|
+
* grid states (importing, exporting, idle, unknown) as variant values.
|
|
626
649
|
*/
|
|
627
650
|
declare function Badge({ children, variant, size, shape, dot, dotPosition, dotPulse, title, className, }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
628
651
|
|
|
@@ -4343,4 +4366,4 @@ declare const getContrastingTextColor: (backgroundColor: string) => string;
|
|
|
4343
4366
|
*/
|
|
4344
4367
|
declare const mapValuesToCategoricalColors: (values: (string | number)[]) => Record<string | number, string>;
|
|
4345
4368
|
|
|
4346
|
-
export {
|
|
4369
|
+
export { defaultMargin as $, ABSENT_GRID_FIELDS as A, type BadgeProps as B, type ChartMargin as C, type DeviceState as D, ENTITY_CONFIG as E, type SideNavItem as F, GRID_ELEMENT_TYPE_BY_ENTITY as G, HEADLINE_METRIC_BOUNDS as H, type InteractiveMapProps as I, type SideNavProps as J, type StaticMapProps as K, Loader as L, type MapPoint as M, type TooltipData as N, type TooltipSeries as O, TopNav as P, type TopNavProps as Q, type YFormatType as R, type SegmentOption as S, TextLink as T, activeDeviceStates as U, archetypeFor as V, clearColorCache as W, createCategoryColorMap as X, type YFormatSettings as Y, createXScale as Z, createYScale as _, type ActionItem as a, type EntityCategoryConfig as a$, deviceStateLabels as a0, deviceStateMetricFormats as a1, entityHasDetailPage as a2, entityHasStatList as a3, entityShowsNow as a4, getContrastingTextColor as a5, getDefaultChartColor as a6, getDefaultColors as a7, getDeviceStateLabel as a8, getEntityConfig as a9, type TemperatureUnitString as aA, type TemperatureUnit as aB, type TextFormat as aC, type VoltageFormat 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, type ColorSpec as aL, ActionMenu as aM, AppShell as aN, Avatar as aO, Badge as aP, type BaseFormat as aQ, ChartContext as aR, CodeEditor 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 EntityCategory as a_, getEntityIcon as aa, getEntityLabel as ab, getEntityStatList as ac, getGridStateLabel as ad, getResolvedColor as ae, getThemeCategoricalColors as af, getYFormatSettings as ag, gridStateLabels as ah, isActiveState as ai, isLightColor as aj, type FieldValue as ak, type BooleanFormat as al, type FormattedValue as am, type FieldFormat as an, type CurrentFormat as ao, type DateFormat as ap, type DistanceFormat as aq, type EnergyUnit as ar, type EnergyFormat as as, type CurrencyFormat as at, type NumberFormat as au, type PhoneFormat as av, type PowerFormat as aw, type FormatterFunction as ax, type ResistanceFormat as ay, type TemperatureFormat as az, type ActionMenuProps as b, GRID_STATE_COLORS as b0, type GridStateColor as b1, InteractiveMap as b2, type InteractiveMapHandle as b3, type LayerCheckState as b4, type LayerFeature as b5, type LayerSelection as b6, type LayerStyle as b7, type LayerTreeNode as b8, type LayerVisibilityPatch as b9, useChartContext as bA, useComponentFormatter as bB, MAP_TYPES as ba, type MapType as bb, Meter as bc, type PercentageFormat as bd, type PowerUnit as be, type RenderType as bf, type ResistanceUnit as bg, SegmentedControl as bh, StackNav as bi, type StackNavGroup as bj, type StackNavItem as bk, type StackNavLinkComponentProps as bl, type StackNavProps as bm, type StackNavRenderRow as bn, type StackNavRowRenderProps as bo, type StackNavTheme as bp, StaticMap as bq, type TextTransform as br, type TextTruncatePosition as bs, UNVERIFIED_VOLTAGE_UNIT_ROWS as bt, type VoltageUnit as bu, type ZoomStops as bv, baselineFromPoint as bw, formatComponentValue as bx, getEntityCategory 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, type GridState as q, Heading as r, type HeadlineMetric as s, Logo as t, type MeterProps as u, type MetricFormat as v, type MetricSource as w, type SegmentedControlProps as x, type SerializableFieldFormat as y, SideNav as z };
|
|
@@ -557,7 +557,19 @@ interface AvatarProps {
|
|
|
557
557
|
*/
|
|
558
558
|
declare function Avatar({ src, alt, firstName, lastName, fullName, onClick, size, shape, variant, className, status, bordered, piiEntity, }: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
559
559
|
|
|
560
|
-
|
|
560
|
+
/**
|
|
561
|
+
* Device states Edges can label and colour.
|
|
562
|
+
*
|
|
563
|
+
* `circulate` was half-shipped: its design tokens (`bg-state-circulate`,
|
|
564
|
+
* `text-state-circulate-text` and friends) were generated, but it was in neither
|
|
565
|
+
* this union nor `badgeVariantStyles`, so the 23,330 `fanMode` events a week that
|
|
566
|
+
* report it had no styling to resolve. Adding it here is what wires the tokens up.
|
|
567
|
+
*
|
|
568
|
+
* The two `Record<DeviceState, …>` maps below are the completeness guard: adding a
|
|
569
|
+
* member breaks the build until both have an entry. `activeDeviceStates` is a plain
|
|
570
|
+
* array and is NOT compiler-enforced — decide about it explicitly.
|
|
571
|
+
*/
|
|
572
|
+
type DeviceState = "unknown" | "on" | "off" | "idle" | "charging" | "discharging" | "heat" | "eco" | "cool" | "auto" | "circulate" | "connected" | "disconnected";
|
|
561
573
|
type MetricFormat = "percentage" | "kW" | "temperature";
|
|
562
574
|
declare const deviceStateMetricFormats: Record<DeviceState, MetricFormat | undefined>;
|
|
563
575
|
/**
|
|
@@ -578,7 +590,18 @@ declare function isActiveState(state: DeviceState): boolean;
|
|
|
578
590
|
*/
|
|
579
591
|
declare function getDeviceStateLabel(state: DeviceState): string;
|
|
580
592
|
|
|
581
|
-
|
|
593
|
+
/**
|
|
594
|
+
* Grid states — the direction of power flow between a site and the grid.
|
|
595
|
+
*
|
|
596
|
+
* Mirrors the `GridStatus` Prisma enum in `domains/device/prisma/schema.prisma`.
|
|
597
|
+
* `idle` and `unknown` were missing here while being 13–20 % of the observed
|
|
598
|
+
* event stream, so any consumer narrowing to this union rendered them as nothing
|
|
599
|
+
* at all. They need no new Badge entry and no new design token: both names
|
|
600
|
+
* already resolve in `badgeVariantStyles` (declared there under the device-state
|
|
601
|
+
* group, which is a flat map, so a name resolves regardless of which comment
|
|
602
|
+
* group it sits under).
|
|
603
|
+
*/
|
|
604
|
+
type GridState = "importing" | "exporting" | "idle" | "unknown";
|
|
582
605
|
/**
|
|
583
606
|
* Human-readable labels for grid states
|
|
584
607
|
*/
|
|
@@ -621,8 +644,8 @@ interface BadgeProps {
|
|
|
621
644
|
* A non-interactive label for displaying status, counts, or categories.
|
|
622
645
|
* Use for read-only indicators. For interactive elements, use Chip instead.
|
|
623
646
|
*
|
|
624
|
-
* Supports device states (charging, discharging, heat, cool, etc.) and
|
|
625
|
-
* grid states (importing, exporting) as variant values.
|
|
647
|
+
* Supports device states (charging, discharging, heat, cool, circulate, etc.) and
|
|
648
|
+
* grid states (importing, exporting, idle, unknown) as variant values.
|
|
626
649
|
*/
|
|
627
650
|
declare function Badge({ children, variant, size, shape, dot, dotPosition, dotPulse, title, className, }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
628
651
|
|
|
@@ -4343,4 +4366,4 @@ declare const getContrastingTextColor: (backgroundColor: string) => string;
|
|
|
4343
4366
|
*/
|
|
4344
4367
|
declare const mapValuesToCategoricalColors: (values: (string | number)[]) => Record<string | number, string>;
|
|
4345
4368
|
|
|
4346
|
-
export {
|
|
4369
|
+
export { defaultMargin as $, ABSENT_GRID_FIELDS as A, type BadgeProps as B, type ChartMargin as C, type DeviceState as D, ENTITY_CONFIG as E, type SideNavItem as F, GRID_ELEMENT_TYPE_BY_ENTITY as G, HEADLINE_METRIC_BOUNDS as H, type InteractiveMapProps as I, type SideNavProps as J, type StaticMapProps as K, Loader as L, type MapPoint as M, type TooltipData as N, type TooltipSeries as O, TopNav as P, type TopNavProps as Q, type YFormatType as R, type SegmentOption as S, TextLink as T, activeDeviceStates as U, archetypeFor as V, clearColorCache as W, createCategoryColorMap as X, type YFormatSettings as Y, createXScale as Z, createYScale as _, type ActionItem as a, type EntityCategoryConfig as a$, deviceStateLabels as a0, deviceStateMetricFormats as a1, entityHasDetailPage as a2, entityHasStatList as a3, entityShowsNow as a4, getContrastingTextColor as a5, getDefaultChartColor as a6, getDefaultColors as a7, getDeviceStateLabel as a8, getEntityConfig as a9, type TemperatureUnitString as aA, type TemperatureUnit as aB, type TextFormat as aC, type VoltageFormat 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, type ColorSpec as aL, ActionMenu as aM, AppShell as aN, Avatar as aO, Badge as aP, type BaseFormat as aQ, ChartContext as aR, CodeEditor 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 EntityCategory as a_, getEntityIcon as aa, getEntityLabel as ab, getEntityStatList as ac, getGridStateLabel as ad, getResolvedColor as ae, getThemeCategoricalColors as af, getYFormatSettings as ag, gridStateLabels as ah, isActiveState as ai, isLightColor as aj, type FieldValue as ak, type BooleanFormat as al, type FormattedValue as am, type FieldFormat as an, type CurrentFormat as ao, type DateFormat as ap, type DistanceFormat as aq, type EnergyUnit as ar, type EnergyFormat as as, type CurrencyFormat as at, type NumberFormat as au, type PhoneFormat as av, type PowerFormat as aw, type FormatterFunction as ax, type ResistanceFormat as ay, type TemperatureFormat as az, type ActionMenuProps as b, GRID_STATE_COLORS as b0, type GridStateColor as b1, InteractiveMap as b2, type InteractiveMapHandle as b3, type LayerCheckState as b4, type LayerFeature as b5, type LayerSelection as b6, type LayerStyle as b7, type LayerTreeNode as b8, type LayerVisibilityPatch as b9, useChartContext as bA, useComponentFormatter as bB, MAP_TYPES as ba, type MapType as bb, Meter as bc, type PercentageFormat as bd, type PowerUnit as be, type RenderType as bf, type ResistanceUnit as bg, SegmentedControl as bh, StackNav as bi, type StackNavGroup as bj, type StackNavItem as bk, type StackNavLinkComponentProps as bl, type StackNavProps as bm, type StackNavRenderRow as bn, type StackNavRowRenderProps as bo, type StackNavTheme as bp, StaticMap as bq, type TextTransform as br, type TextTruncatePosition as bs, UNVERIFIED_VOLTAGE_UNIT_ROWS as bt, type VoltageUnit as bu, type ZoomStops as bv, baselineFromPoint as bw, formatComponentValue as bx, getEntityCategory 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, type GridState as q, Heading as r, type HeadlineMetric as s, Logo as t, type MeterProps as u, type MetricFormat as v, type MetricSource as w, type SegmentedControlProps as x, type SerializableFieldFormat as y, SideNav as z };
|