@texturehq/edges 1.38.0 → 2.0.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/index.d.cts CHANGED
@@ -2,8 +2,8 @@ import { BreadcrumbProps, BreadcrumbsProps, DateValue, CalendarProps as Calendar
2
2
  export { BreadcrumbProps, BreadcrumbsProps, DialogTrigger } from 'react-aria-components';
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { RefObject, ComponentType, ReactNode, HTMLAttributes, ComponentProps, CSSProperties, Component, ErrorInfo } from 'react';
5
- import { U as FieldValue, V as BooleanFormat, W as FormattedValue, X as CurrentFormat, Z as DateFormat, _ as DistanceFormat, $ as EnergyFormat, a0 as CurrencyFormat, a1 as NumberFormat, a2 as PhoneFormat, a3 as PowerFormat, a4 as FormatterFunction, a5 as ResistanceFormat, a6 as TemperatureFormat, a7 as TemperatureUnitString, a8 as TemperatureUnit, a9 as TextFormat, aa as VoltageFormat, ab as FieldFormat, d as BaseDataPoint, B as BadgeProps, u as YFormatType, q as TooltipData, ac as DeviceState, ad as GridState, ae as ComponentFormatter, af as LayerSpec, ag as CustomPinsSpec, ah as GeoJsonLayerSpec, ai as RasterLayerSpec, aj as VectorLayerSpec, ak as ClusteredVectorLayerSpec } from './colors-CBDlvX1A.cjs';
6
- export { A as ActionItem, al as ActionMenu, a as ActionMenuProps, am as AppShell, b as AppShellProps, an as Avatar, c as AvatarProps, ao as Badge, ap as BaseFormat, aq as ChartContext, C as ChartMargin, ar as CodeEditor, e as CodeEditorProps, f as CodeLanguage, g as CodeTheme, as as ColorSpec, at as ComponentFormatOptions, au as CurrentUnit, av as CustomFormat, aw as DEFAULT_MAP_TYPE, ax as DateFormatStyle, ay as DistanceUnit, E as ENTITY_CONFIG, az as EnergyUnit, h as EntityConfig, i as EntityType, H as Heading, aA as InteractiveMap, I as InteractiveMapProps, aB as LayerFeature, aC as LayerStyle, L as Loader, j as Logo, aD as MAP_TYPES, M as MapPoint, aE as MapType, aF as Meter, k as MeterProps, aG as MetricFormat, aH as PercentageFormat, aI as PowerUnit, aJ as RenderType, aK as ResistanceUnit, S as SegmentOption, aL as SegmentedControl, l as SegmentedControlProps, m as SideNav, n as SideNavItem, o as SideNavProps, aM as StackNav, aN as StackNavItem, aO as StackNavLinkComponentProps, aP as StackNavProps, aQ as StackNavTheme, aR as StaticMap, p as StaticMapProps, T as TextLink, aS as TextTransform, aT as TextTruncatePosition, r as TooltipSeries, s as TopNav, t as TopNavProps, aU as VoltageUnit, Y as YFormatSettings, aV as ZoomStops, aW as activeDeviceStates, v as clearColorCache, w as createCategoryColorMap, x as createXScale, y as createYScale, z as defaultMargin, aX as deviceStateLabels, aY as deviceStateMetricFormats, aZ as formatComponentValue, D as getContrastingTextColor, F as getDefaultChartColor, G as getDefaultColors, a_ as getDeviceStateDisplayLabel, a_ as getDeviceStateLabel, J as getEntityConfig, K as getEntityIcon, N as getEntityLabel, a$ as getGridStateLabel, O as getResolvedColor, P as getThemeCategoricalColors, Q as getYFormatSettings, b0 as gridStateLabels, b1 as isActiveDeviceState, b1 as isActiveState, R as isLightColor, b2 as mapValuesToCategoricalColors, b3 as useChartContext, b4 as useComponentFormatter } from './colors-CBDlvX1A.cjs';
5
+ import { U as FieldValue, V as BooleanFormat, W as FormattedValue, X as CurrentFormat, Z as DateFormat, _ as DistanceFormat, $ as EnergyFormat, a0 as CurrencyFormat, a1 as NumberFormat, a2 as PhoneFormat, a3 as PowerFormat, a4 as FormatterFunction, a5 as ResistanceFormat, a6 as TemperatureFormat, a7 as TemperatureUnitString, a8 as TemperatureUnit, a9 as TextFormat, aa as VoltageFormat, ab as FieldFormat, d as BaseDataPoint, B as BadgeProps, u as YFormatType, q as TooltipData, ac as DeviceState, ad as GridState, ae as ComponentFormatter, af as LayerSpec, ag as CustomPinsSpec, ah as GeoJsonLayerSpec, ai as RasterLayerSpec, aj as VectorLayerSpec, ak as ClusteredVectorLayerSpec } from './colors-CfANmDSd.cjs';
6
+ export { A as ActionItem, al as ActionMenu, a as ActionMenuProps, am as AppShell, b as AppShellProps, an as Avatar, c as AvatarProps, ao as Badge, ap as BaseFormat, aq as ChartContext, C as ChartMargin, ar as CodeEditor, e as CodeEditorProps, f as CodeLanguage, g as CodeTheme, as as ColorSpec, at as ComponentFormatOptions, au as CurrentUnit, av as CustomFormat, aw as DEFAULT_MAP_TYPE, ax as DateFormatStyle, ay as DistanceUnit, E as ENTITY_CONFIG, az as EnergyUnit, h as EntityConfig, i as EntityType, H as Heading, aA as InteractiveMap, I as InteractiveMapProps, aB as LayerFeature, aC as LayerStyle, L as Loader, j as Logo, aD as MAP_TYPES, M as MapPoint, aE as MapType, aF as Meter, k as MeterProps, aG as MetricFormat, aH as PercentageFormat, aI as PowerUnit, aJ as RenderType, aK as ResistanceUnit, S as SegmentOption, aL as SegmentedControl, l as SegmentedControlProps, m as SideNav, n as SideNavItem, o as SideNavProps, aM as StackNav, aN as StackNavItem, aO as StackNavLinkComponentProps, aP as StackNavProps, aQ as StackNavTheme, aR as StaticMap, p as StaticMapProps, T as TextLink, aS as TextTransform, aT as TextTruncatePosition, r as TooltipSeries, s as TopNav, t as TopNavProps, aU as VoltageUnit, Y as YFormatSettings, aV as ZoomStops, aW as activeDeviceStates, aX as baselineFromPoint, v as clearColorCache, w as createCategoryColorMap, x as createXScale, y as createYScale, z as defaultMargin, aY as deviceStateLabels, aZ as deviceStateMetricFormats, a_ as formatComponentValue, D as getContrastingTextColor, F as getDefaultChartColor, G as getDefaultColors, a$ as getDeviceStateDisplayLabel, a$ as getDeviceStateLabel, J as getEntityConfig, K as getEntityIcon, N as getEntityLabel, b0 as getGridStateLabel, O as getResolvedColor, P as getThemeCategoricalColors, Q as getYFormatSettings, b1 as gridStateLabels, b2 as isActiveDeviceState, b2 as isActiveState, R as isLightColor, b3 as mapValuesToCategoricalColors, b4 as useChartContext, b5 as useComponentFormatter } from './colors-CfANmDSd.cjs';
7
7
  import { Virtualizer } from '@tanstack/react-virtual';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
9
  import { I as Icon, S as Size, d as IconName$2, B as BaseInputProps } from './RichTextEditor-diZqy_s1.cjs';
@@ -2349,7 +2349,7 @@ interface CopyToClipboardProps {
2349
2349
  }
2350
2350
  declare function CopyToClipboard({ value, children, className, size, iconPosition, }: CopyToClipboardProps): react_jsx_runtime.JSX.Element;
2351
2351
 
2352
- type AreaSeriesBaseline = number | number[] | ((point: BaseDataPoint, index: number) => number);
2352
+ type AreaSeriesBaseline = number | ((point: BaseDataPoint, index: number) => number);
2353
2353
  interface AreaSeriesProps {
2354
2354
  data: BaseDataPoint[];
2355
2355
  color?: string;
@@ -2361,8 +2361,19 @@ interface AreaSeriesProps {
2361
2361
  * preserves its historical behavior and closes the filled area to the chart
2362
2362
  * baseline. When provided, the fill renders between `baseline` and `yValue`
2363
2363
  * for each point while the visible line still follows `yValue`.
2364
+ *
2365
+ * A constant `number` or a per-point function accessor — typically
2366
+ * `baselineFromPoint`, reading each point's `baselineValue`. The per-point
2367
+ * form is required for banded areas in zoomable charts: the floor must travel
2368
+ * with its point so it survives `ChartContainer`'s zoom-filtering.
2364
2369
  */
2365
2370
  baseline?: AreaSeriesBaseline;
2371
+ /**
2372
+ * When true (and `baseline` is set), the tooltip renders this series as a
2373
+ * `baseline–yValue` range instead of just `yValue` — for min–max bands.
2374
+ * Stacked areas leave this off so their tooltips keep showing a single value.
2375
+ */
2376
+ tooltipRange?: boolean;
2366
2377
  /** Fill opacity at the strongest point of the default gradient. */
2367
2378
  fillOpacity?: number;
2368
2379
  /** Whether to draw the outline path on top of the filled area. */
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import { BreadcrumbProps, BreadcrumbsProps, DateValue, CalendarProps as Calendar
2
2
  export { BreadcrumbProps, BreadcrumbsProps, DialogTrigger } from 'react-aria-components';
3
3
  import * as React$1 from 'react';
4
4
  import React__default, { RefObject, ComponentType, ReactNode, HTMLAttributes, ComponentProps, CSSProperties, Component, ErrorInfo } from 'react';
5
- import { U as FieldValue, V as BooleanFormat, W as FormattedValue, X as CurrentFormat, Z as DateFormat, _ as DistanceFormat, $ as EnergyFormat, a0 as CurrencyFormat, a1 as NumberFormat, a2 as PhoneFormat, a3 as PowerFormat, a4 as FormatterFunction, a5 as ResistanceFormat, a6 as TemperatureFormat, a7 as TemperatureUnitString, a8 as TemperatureUnit, a9 as TextFormat, aa as VoltageFormat, ab as FieldFormat, d as BaseDataPoint, B as BadgeProps, u as YFormatType, q as TooltipData, ac as DeviceState, ad as GridState, ae as ComponentFormatter, af as LayerSpec, ag as CustomPinsSpec, ah as GeoJsonLayerSpec, ai as RasterLayerSpec, aj as VectorLayerSpec, ak as ClusteredVectorLayerSpec } from './colors-op_IMV5O.js';
6
- export { A as ActionItem, al as ActionMenu, a as ActionMenuProps, am as AppShell, b as AppShellProps, an as Avatar, c as AvatarProps, ao as Badge, ap as BaseFormat, aq as ChartContext, C as ChartMargin, ar as CodeEditor, e as CodeEditorProps, f as CodeLanguage, g as CodeTheme, as as ColorSpec, at as ComponentFormatOptions, au as CurrentUnit, av as CustomFormat, aw as DEFAULT_MAP_TYPE, ax as DateFormatStyle, ay as DistanceUnit, E as ENTITY_CONFIG, az as EnergyUnit, h as EntityConfig, i as EntityType, H as Heading, aA as InteractiveMap, I as InteractiveMapProps, aB as LayerFeature, aC as LayerStyle, L as Loader, j as Logo, aD as MAP_TYPES, M as MapPoint, aE as MapType, aF as Meter, k as MeterProps, aG as MetricFormat, aH as PercentageFormat, aI as PowerUnit, aJ as RenderType, aK as ResistanceUnit, S as SegmentOption, aL as SegmentedControl, l as SegmentedControlProps, m as SideNav, n as SideNavItem, o as SideNavProps, aM as StackNav, aN as StackNavItem, aO as StackNavLinkComponentProps, aP as StackNavProps, aQ as StackNavTheme, aR as StaticMap, p as StaticMapProps, T as TextLink, aS as TextTransform, aT as TextTruncatePosition, r as TooltipSeries, s as TopNav, t as TopNavProps, aU as VoltageUnit, Y as YFormatSettings, aV as ZoomStops, aW as activeDeviceStates, v as clearColorCache, w as createCategoryColorMap, x as createXScale, y as createYScale, z as defaultMargin, aX as deviceStateLabels, aY as deviceStateMetricFormats, aZ as formatComponentValue, D as getContrastingTextColor, F as getDefaultChartColor, G as getDefaultColors, a_ as getDeviceStateDisplayLabel, a_ as getDeviceStateLabel, J as getEntityConfig, K as getEntityIcon, N as getEntityLabel, a$ as getGridStateLabel, O as getResolvedColor, P as getThemeCategoricalColors, Q as getYFormatSettings, b0 as gridStateLabels, b1 as isActiveDeviceState, b1 as isActiveState, R as isLightColor, b2 as mapValuesToCategoricalColors, b3 as useChartContext, b4 as useComponentFormatter } from './colors-op_IMV5O.js';
5
+ import { U as FieldValue, V as BooleanFormat, W as FormattedValue, X as CurrentFormat, Z as DateFormat, _ as DistanceFormat, $ as EnergyFormat, a0 as CurrencyFormat, a1 as NumberFormat, a2 as PhoneFormat, a3 as PowerFormat, a4 as FormatterFunction, a5 as ResistanceFormat, a6 as TemperatureFormat, a7 as TemperatureUnitString, a8 as TemperatureUnit, a9 as TextFormat, aa as VoltageFormat, ab as FieldFormat, d as BaseDataPoint, B as BadgeProps, u as YFormatType, q as TooltipData, ac as DeviceState, ad as GridState, ae as ComponentFormatter, af as LayerSpec, ag as CustomPinsSpec, ah as GeoJsonLayerSpec, ai as RasterLayerSpec, aj as VectorLayerSpec, ak as ClusteredVectorLayerSpec } from './colors-VFFqViFy.js';
6
+ export { A as ActionItem, al as ActionMenu, a as ActionMenuProps, am as AppShell, b as AppShellProps, an as Avatar, c as AvatarProps, ao as Badge, ap as BaseFormat, aq as ChartContext, C as ChartMargin, ar as CodeEditor, e as CodeEditorProps, f as CodeLanguage, g as CodeTheme, as as ColorSpec, at as ComponentFormatOptions, au as CurrentUnit, av as CustomFormat, aw as DEFAULT_MAP_TYPE, ax as DateFormatStyle, ay as DistanceUnit, E as ENTITY_CONFIG, az as EnergyUnit, h as EntityConfig, i as EntityType, H as Heading, aA as InteractiveMap, I as InteractiveMapProps, aB as LayerFeature, aC as LayerStyle, L as Loader, j as Logo, aD as MAP_TYPES, M as MapPoint, aE as MapType, aF as Meter, k as MeterProps, aG as MetricFormat, aH as PercentageFormat, aI as PowerUnit, aJ as RenderType, aK as ResistanceUnit, S as SegmentOption, aL as SegmentedControl, l as SegmentedControlProps, m as SideNav, n as SideNavItem, o as SideNavProps, aM as StackNav, aN as StackNavItem, aO as StackNavLinkComponentProps, aP as StackNavProps, aQ as StackNavTheme, aR as StaticMap, p as StaticMapProps, T as TextLink, aS as TextTransform, aT as TextTruncatePosition, r as TooltipSeries, s as TopNav, t as TopNavProps, aU as VoltageUnit, Y as YFormatSettings, aV as ZoomStops, aW as activeDeviceStates, aX as baselineFromPoint, v as clearColorCache, w as createCategoryColorMap, x as createXScale, y as createYScale, z as defaultMargin, aY as deviceStateLabels, aZ as deviceStateMetricFormats, a_ as formatComponentValue, D as getContrastingTextColor, F as getDefaultChartColor, G as getDefaultColors, a$ as getDeviceStateDisplayLabel, a$ as getDeviceStateLabel, J as getEntityConfig, K as getEntityIcon, N as getEntityLabel, b0 as getGridStateLabel, O as getResolvedColor, P as getThemeCategoricalColors, Q as getYFormatSettings, b1 as gridStateLabels, b2 as isActiveDeviceState, b2 as isActiveState, R as isLightColor, b3 as mapValuesToCategoricalColors, b4 as useChartContext, b5 as useComponentFormatter } from './colors-VFFqViFy.js';
7
7
  import { Virtualizer } from '@tanstack/react-virtual';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
9
  import { I as Icon, S as Size, d as IconName$2, B as BaseInputProps } from './RichTextEditor-diZqy_s1.js';
@@ -2349,7 +2349,7 @@ interface CopyToClipboardProps {
2349
2349
  }
2350
2350
  declare function CopyToClipboard({ value, children, className, size, iconPosition, }: CopyToClipboardProps): react_jsx_runtime.JSX.Element;
2351
2351
 
2352
- type AreaSeriesBaseline = number | number[] | ((point: BaseDataPoint, index: number) => number);
2352
+ type AreaSeriesBaseline = number | ((point: BaseDataPoint, index: number) => number);
2353
2353
  interface AreaSeriesProps {
2354
2354
  data: BaseDataPoint[];
2355
2355
  color?: string;
@@ -2361,8 +2361,19 @@ interface AreaSeriesProps {
2361
2361
  * preserves its historical behavior and closes the filled area to the chart
2362
2362
  * baseline. When provided, the fill renders between `baseline` and `yValue`
2363
2363
  * for each point while the visible line still follows `yValue`.
2364
+ *
2365
+ * A constant `number` or a per-point function accessor — typically
2366
+ * `baselineFromPoint`, reading each point's `baselineValue`. The per-point
2367
+ * form is required for banded areas in zoomable charts: the floor must travel
2368
+ * with its point so it survives `ChartContainer`'s zoom-filtering.
2364
2369
  */
2365
2370
  baseline?: AreaSeriesBaseline;
2371
+ /**
2372
+ * When true (and `baseline` is set), the tooltip renders this series as a
2373
+ * `baseline–yValue` range instead of just `yValue` — for min–max bands.
2374
+ * Stacked areas leave this off so their tooltips keep showing a single value.
2375
+ */
2376
+ tooltipRange?: boolean;
2366
2377
  /** Fill opacity at the strongest point of the default gradient. */
2367
2378
  fillOpacity?: number;
2368
2379
  /** Whether to draw the outline path on top of the filled area. */