@texturehq/edges 2.2.7 → 2.3.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/{colors-DsSW-pdc.d.cts → colors-AT5gFqGB.d.cts} +174 -170
- package/dist/{colors-BR-DX69l.d.ts → colors-DOYgrvZw.d.ts} +174 -170
- package/dist/form/index.cjs +2 -2
- package/dist/form/index.cjs.map +1 -1
- package/dist/form/index.js +2 -2
- package/dist/form/index.js.map +1 -1
- package/dist/index.cjs +10 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1331 -1294
- package/dist/index.d.ts +1331 -1294
- package/dist/index.js +10 -46
- package/dist/index.js.map +1 -1
- package/dist/rhf/index.cjs +2 -2
- package/dist/rhf/index.cjs.map +1 -1
- package/dist/rhf/index.js +2 -2
- 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 +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 +2 -112
- package/package.json +8 -13
- package/scripts/check-legacy-action-variants.mjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { ReactNode, ComponentType } from 'react';
|
|
4
|
-
import { ScaleTime, ScaleLinear } from 'd3-scale';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
4
|
import { d as IconName } from './RichTextEditor-BNXNpG4s.cjs';
|
|
5
|
+
import * as _visx_vendor_d3_scale from '@visx/vendor/d3-scale';
|
|
6
|
+
import { ScaleTime, ScaleLinear } from 'd3-scale';
|
|
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';
|
|
@@ -195,173 +195,6 @@ declare function formatComponentValue({ value, formatter, emptyClassName, emptyT
|
|
|
195
195
|
*/
|
|
196
196
|
declare function useComponentFormatter(formatter?: ComponentFormatter, emptyClassName?: string, emptyText?: React__default.ReactNode): (value: FieldValue) => React__default.ReactNode;
|
|
197
197
|
|
|
198
|
-
/**
|
|
199
|
-
* Chart Y-axis formatter type
|
|
200
|
-
* Uses the main formatting system for consistency with Kpi, StatList, and DataTable
|
|
201
|
-
*/
|
|
202
|
-
type YFormatType = ComponentFormatter;
|
|
203
|
-
interface TooltipData {
|
|
204
|
-
/** The x-axis value (Date for time-series charts) */
|
|
205
|
-
xValue: Date;
|
|
206
|
-
series: TooltipSeries[];
|
|
207
|
-
x: number;
|
|
208
|
-
y: number;
|
|
209
|
-
position: "left" | "right";
|
|
210
|
-
/** Whether this tooltip is for an event marker (vs data point) */
|
|
211
|
-
isEvent?: boolean;
|
|
212
|
-
/** Optional event metadata to display */
|
|
213
|
-
eventMetadata?: Record<string, string | number>;
|
|
214
|
-
/** Optional list of event items to display in event tooltips. */
|
|
215
|
-
eventItems?: TooltipEventItem[];
|
|
216
|
-
}
|
|
217
|
-
interface TooltipEventItem {
|
|
218
|
-
label: string;
|
|
219
|
-
color: string;
|
|
220
|
-
metadata?: Record<string, string | number>;
|
|
221
|
-
}
|
|
222
|
-
interface TooltipSeries {
|
|
223
|
-
label: string;
|
|
224
|
-
value: number;
|
|
225
|
-
/**
|
|
226
|
-
* Lower bound for a min–max band series. When set, the tooltip renders the
|
|
227
|
-
* range `baselineValue–value` instead of a single value.
|
|
228
|
-
*/
|
|
229
|
-
baselineValue?: number;
|
|
230
|
-
/**
|
|
231
|
-
* Optional y-axis coordinate (in data space) where the focus highlight
|
|
232
|
-
* should be drawn for this series. Defaults to `value`. Used by stacked
|
|
233
|
-
* series where the drawn position differs from the reported value.
|
|
234
|
-
*/
|
|
235
|
-
chartY?: number;
|
|
236
|
-
showMarker?: boolean;
|
|
237
|
-
color: string;
|
|
238
|
-
type?: "area" | "line" | "bar" | "event";
|
|
239
|
-
category?: string;
|
|
240
|
-
categoryColor?: string;
|
|
241
|
-
/** Optional extra rows to display in the tooltip below the category row. */
|
|
242
|
-
extraTooltipRows?: Array<{
|
|
243
|
-
label: string;
|
|
244
|
-
value: string;
|
|
245
|
-
}>;
|
|
246
|
-
}
|
|
247
|
-
interface SeriesMetadata {
|
|
248
|
-
label: string;
|
|
249
|
-
color: string;
|
|
250
|
-
}
|
|
251
|
-
interface ChartContextType {
|
|
252
|
-
xScale: ScaleTime<number, number>;
|
|
253
|
-
yScale: ScaleLinear<number, number>;
|
|
254
|
-
width: number;
|
|
255
|
-
height: number;
|
|
256
|
-
yFormatter: YFormatType;
|
|
257
|
-
animationSettings: {
|
|
258
|
-
duration: number;
|
|
259
|
-
ease: string;
|
|
260
|
-
};
|
|
261
|
-
tooltip: {
|
|
262
|
-
data: TooltipData | null;
|
|
263
|
-
show: (data: TooltipData) => void;
|
|
264
|
-
hide: () => void;
|
|
265
|
-
};
|
|
266
|
-
/** Series datasets for accessing underlying data */
|
|
267
|
-
datasets?: BaseDataPoint[][];
|
|
268
|
-
/** Series metadata for labels and colors */
|
|
269
|
-
seriesMetadata?: SeriesMetadata[];
|
|
270
|
-
/** Series types for proper tooltip rendering */
|
|
271
|
-
seriesTypes?: ("area" | "line" | "bar")[];
|
|
272
|
-
/** Category colors for bar charts */
|
|
273
|
-
categoryColors?: Record<string, string>;
|
|
274
|
-
/** Category labels for translating category values */
|
|
275
|
-
categoryLabels?: Record<string, string>;
|
|
276
|
-
}
|
|
277
|
-
declare const ChartContext: React$1.Context<ChartContextType | null>;
|
|
278
|
-
|
|
279
|
-
declare const useChartContext: () => ChartContextType;
|
|
280
|
-
|
|
281
|
-
interface BaseDataPoint {
|
|
282
|
-
xValue: Date;
|
|
283
|
-
/**
|
|
284
|
-
* The data value for this point. This is the value reported to tooltips and
|
|
285
|
-
* CSV exports, and — by default — also the y-axis coordinate where the point
|
|
286
|
-
* is drawn.
|
|
287
|
-
*
|
|
288
|
-
* For stacked or banded charts where the *drawn* position differs from the
|
|
289
|
-
* data value (e.g. each band is drawn at its cumulative stack top), set
|
|
290
|
-
* `chartYValue` on the point instead of mutating `yValue`. That keeps tooltip
|
|
291
|
-
* and export output honest while letting the chart draw the visual stack.
|
|
292
|
-
*/
|
|
293
|
-
yValue: number;
|
|
294
|
-
/**
|
|
295
|
-
* Optional render-only override for where to draw this point on the y-axis.
|
|
296
|
-
* When set, series components (e.g. `AreaSeries`, `LineSeries`) draw the
|
|
297
|
-
* point at `chartYValue` instead of `yValue`. Tooltip values and CSV exports
|
|
298
|
-
* continue to use `yValue`, so the user-facing number reflects the underlying
|
|
299
|
-
* data and not the stacked coordinate.
|
|
300
|
-
*
|
|
301
|
-
* Used for stacked area charts where each band's drawn y is the cumulative
|
|
302
|
-
* top of the stack, but the displayed value should be the band's own
|
|
303
|
-
* magnitude. Existing non-stacked consumers can leave this undefined and
|
|
304
|
-
* behavior is unchanged.
|
|
305
|
-
*/
|
|
306
|
-
chartYValue?: number;
|
|
307
|
-
/**
|
|
308
|
-
* Optional lower bound for a banded `AreaSeries` (e.g. a min–max envelope or a
|
|
309
|
-
* stacked band's floor). Carried on the point so the floor stays bound to the
|
|
310
|
-
* same sample as the ceiling and survives `ChartContainer`'s zoom-filtering —
|
|
311
|
-
* a positional baseline array would desync once `data` is re-indexed. Read via
|
|
312
|
-
* `baselineFromPoint`.
|
|
313
|
-
*/
|
|
314
|
-
baselineValue?: number;
|
|
315
|
-
/**
|
|
316
|
-
* Optional render-only control for the tooltip focus marker. Defaults to true.
|
|
317
|
-
* Useful for zero-height stacked bands: the tooltip row should still report
|
|
318
|
-
* the zero value, but drawing a marker at the current stack baseline makes the
|
|
319
|
-
* band look active when it is not.
|
|
320
|
-
*/
|
|
321
|
-
showTooltipMarker?: boolean;
|
|
322
|
-
category?: string;
|
|
323
|
-
/**
|
|
324
|
-
* Optional extra rows to display in the tooltip for this data point, below
|
|
325
|
-
* the series value and category rows. Purely presentational — does not
|
|
326
|
-
* affect chart drawing, scales, or CSV export. Used by consumers that need
|
|
327
|
-
* to surface point-level context (e.g. per-sample geolocation status like
|
|
328
|
-
* home/away). Each row is `{ label, value }` and rendered as
|
|
329
|
-
* `<label>: <value>` in the tooltip.
|
|
330
|
-
*/
|
|
331
|
-
extraTooltipRows?: Array<{
|
|
332
|
-
label: string;
|
|
333
|
-
value: string;
|
|
334
|
-
}>;
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* Canonical `AreaSeries` baseline accessor: the per-point band floor. Pass as
|
|
338
|
-
* `baseline={baselineFromPoint}` for any banded area whose points carry a
|
|
339
|
-
* `baselineValue`. Because the floor is read off the point, it stays correct
|
|
340
|
-
* under zoom/pan where a positional baseline array would desync.
|
|
341
|
-
*/
|
|
342
|
-
declare const baselineFromPoint: (point: BaseDataPoint) => number;
|
|
343
|
-
interface ChartMargin {
|
|
344
|
-
top: number;
|
|
345
|
-
right: number;
|
|
346
|
-
bottom: number;
|
|
347
|
-
left: number;
|
|
348
|
-
}
|
|
349
|
-
declare const defaultMargin: ChartMargin;
|
|
350
|
-
interface YFormatSettings {
|
|
351
|
-
format: (value: number) => string;
|
|
352
|
-
min?: number;
|
|
353
|
-
max?: number;
|
|
354
|
-
tickInterval?: number;
|
|
355
|
-
tickFormat?: (value: number) => string;
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* Get Y-axis format settings from a ComponentFormatter
|
|
359
|
-
* Uses the main formatting system for consistency across all components
|
|
360
|
-
*/
|
|
361
|
-
declare function getYFormatSettings(formatter?: YFormatType): YFormatSettings;
|
|
362
|
-
declare const createXScale: (data: BaseDataPoint[], width: number) => _visx_vendor_d3_scale.ScaleTime<number, number, never>;
|
|
363
|
-
declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType, explicitDomain?: [number, number]) => _visx_vendor_d3_scale.ScaleLinear<number, number, never>;
|
|
364
|
-
|
|
365
198
|
interface ActionItem {
|
|
366
199
|
/**
|
|
367
200
|
* Unique identifier for the action
|
|
@@ -391,6 +224,10 @@ interface ActionItem {
|
|
|
391
224
|
* Handler for when the action is selected
|
|
392
225
|
*/
|
|
393
226
|
onAction?: () => void;
|
|
227
|
+
/**
|
|
228
|
+
* Optional URL for navigation. When set, the menu item renders as a link.
|
|
229
|
+
*/
|
|
230
|
+
href?: string;
|
|
394
231
|
/**
|
|
395
232
|
* Test ID for testing
|
|
396
233
|
*/
|
|
@@ -998,6 +835,173 @@ interface CodeEditorProps {
|
|
|
998
835
|
*/
|
|
999
836
|
declare function CodeEditor({ value, readOnly, onChange, language, theme, height, width, className, lineHeight, minLines, maxLines, showLineNumbers, showGutter, fontSize, wrapEnabled, }: CodeEditorProps): react_jsx_runtime.JSX.Element;
|
|
1000
837
|
|
|
838
|
+
/**
|
|
839
|
+
* Chart Y-axis formatter type
|
|
840
|
+
* Uses the main formatting system for consistency with Kpi, StatList, and DataTable
|
|
841
|
+
*/
|
|
842
|
+
type YFormatType = ComponentFormatter;
|
|
843
|
+
interface TooltipData {
|
|
844
|
+
/** The x-axis value (Date for time-series charts) */
|
|
845
|
+
xValue: Date;
|
|
846
|
+
series: TooltipSeries[];
|
|
847
|
+
x: number;
|
|
848
|
+
y: number;
|
|
849
|
+
position: "left" | "right";
|
|
850
|
+
/** Whether this tooltip is for an event marker (vs data point) */
|
|
851
|
+
isEvent?: boolean;
|
|
852
|
+
/** Optional event metadata to display */
|
|
853
|
+
eventMetadata?: Record<string, string | number>;
|
|
854
|
+
/** Optional list of event items to display in event tooltips. */
|
|
855
|
+
eventItems?: TooltipEventItem[];
|
|
856
|
+
}
|
|
857
|
+
interface TooltipEventItem {
|
|
858
|
+
label: string;
|
|
859
|
+
color: string;
|
|
860
|
+
metadata?: Record<string, string | number>;
|
|
861
|
+
}
|
|
862
|
+
interface TooltipSeries {
|
|
863
|
+
label: string;
|
|
864
|
+
value: number;
|
|
865
|
+
/**
|
|
866
|
+
* Lower bound for a min–max band series. When set, the tooltip renders the
|
|
867
|
+
* range `baselineValue–value` instead of a single value.
|
|
868
|
+
*/
|
|
869
|
+
baselineValue?: number;
|
|
870
|
+
/**
|
|
871
|
+
* Optional y-axis coordinate (in data space) where the focus highlight
|
|
872
|
+
* should be drawn for this series. Defaults to `value`. Used by stacked
|
|
873
|
+
* series where the drawn position differs from the reported value.
|
|
874
|
+
*/
|
|
875
|
+
chartY?: number;
|
|
876
|
+
showMarker?: boolean;
|
|
877
|
+
color: string;
|
|
878
|
+
type?: "area" | "line" | "bar" | "event";
|
|
879
|
+
category?: string;
|
|
880
|
+
categoryColor?: string;
|
|
881
|
+
/** Optional extra rows to display in the tooltip below the category row. */
|
|
882
|
+
extraTooltipRows?: Array<{
|
|
883
|
+
label: string;
|
|
884
|
+
value: string;
|
|
885
|
+
}>;
|
|
886
|
+
}
|
|
887
|
+
interface SeriesMetadata {
|
|
888
|
+
label: string;
|
|
889
|
+
color: string;
|
|
890
|
+
}
|
|
891
|
+
interface ChartContextType {
|
|
892
|
+
xScale: ScaleTime<number, number>;
|
|
893
|
+
yScale: ScaleLinear<number, number>;
|
|
894
|
+
width: number;
|
|
895
|
+
height: number;
|
|
896
|
+
yFormatter: YFormatType;
|
|
897
|
+
animationSettings: {
|
|
898
|
+
duration: number;
|
|
899
|
+
ease: string;
|
|
900
|
+
};
|
|
901
|
+
tooltip: {
|
|
902
|
+
data: TooltipData | null;
|
|
903
|
+
show: (data: TooltipData) => void;
|
|
904
|
+
hide: () => void;
|
|
905
|
+
};
|
|
906
|
+
/** Series datasets for accessing underlying data */
|
|
907
|
+
datasets?: BaseDataPoint[][];
|
|
908
|
+
/** Series metadata for labels and colors */
|
|
909
|
+
seriesMetadata?: SeriesMetadata[];
|
|
910
|
+
/** Series types for proper tooltip rendering */
|
|
911
|
+
seriesTypes?: ("area" | "line" | "bar")[];
|
|
912
|
+
/** Category colors for bar charts */
|
|
913
|
+
categoryColors?: Record<string, string>;
|
|
914
|
+
/** Category labels for translating category values */
|
|
915
|
+
categoryLabels?: Record<string, string>;
|
|
916
|
+
}
|
|
917
|
+
declare const ChartContext: React$1.Context<ChartContextType | null>;
|
|
918
|
+
|
|
919
|
+
declare const useChartContext: () => ChartContextType;
|
|
920
|
+
|
|
921
|
+
interface BaseDataPoint {
|
|
922
|
+
xValue: Date;
|
|
923
|
+
/**
|
|
924
|
+
* The data value for this point. This is the value reported to tooltips and
|
|
925
|
+
* CSV exports, and — by default — also the y-axis coordinate where the point
|
|
926
|
+
* is drawn.
|
|
927
|
+
*
|
|
928
|
+
* For stacked or banded charts where the *drawn* position differs from the
|
|
929
|
+
* data value (e.g. each band is drawn at its cumulative stack top), set
|
|
930
|
+
* `chartYValue` on the point instead of mutating `yValue`. That keeps tooltip
|
|
931
|
+
* and export output honest while letting the chart draw the visual stack.
|
|
932
|
+
*/
|
|
933
|
+
yValue: number;
|
|
934
|
+
/**
|
|
935
|
+
* Optional render-only override for where to draw this point on the y-axis.
|
|
936
|
+
* When set, series components (e.g. `AreaSeries`, `LineSeries`) draw the
|
|
937
|
+
* point at `chartYValue` instead of `yValue`. Tooltip values and CSV exports
|
|
938
|
+
* continue to use `yValue`, so the user-facing number reflects the underlying
|
|
939
|
+
* data and not the stacked coordinate.
|
|
940
|
+
*
|
|
941
|
+
* Used for stacked area charts where each band's drawn y is the cumulative
|
|
942
|
+
* top of the stack, but the displayed value should be the band's own
|
|
943
|
+
* magnitude. Existing non-stacked consumers can leave this undefined and
|
|
944
|
+
* behavior is unchanged.
|
|
945
|
+
*/
|
|
946
|
+
chartYValue?: number;
|
|
947
|
+
/**
|
|
948
|
+
* Optional lower bound for a banded `AreaSeries` (e.g. a min–max envelope or a
|
|
949
|
+
* stacked band's floor). Carried on the point so the floor stays bound to the
|
|
950
|
+
* same sample as the ceiling and survives `ChartContainer`'s zoom-filtering —
|
|
951
|
+
* a positional baseline array would desync once `data` is re-indexed. Read via
|
|
952
|
+
* `baselineFromPoint`.
|
|
953
|
+
*/
|
|
954
|
+
baselineValue?: number;
|
|
955
|
+
/**
|
|
956
|
+
* Optional render-only control for the tooltip focus marker. Defaults to true.
|
|
957
|
+
* Useful for zero-height stacked bands: the tooltip row should still report
|
|
958
|
+
* the zero value, but drawing a marker at the current stack baseline makes the
|
|
959
|
+
* band look active when it is not.
|
|
960
|
+
*/
|
|
961
|
+
showTooltipMarker?: boolean;
|
|
962
|
+
category?: string;
|
|
963
|
+
/**
|
|
964
|
+
* Optional extra rows to display in the tooltip for this data point, below
|
|
965
|
+
* the series value and category rows. Purely presentational — does not
|
|
966
|
+
* affect chart drawing, scales, or CSV export. Used by consumers that need
|
|
967
|
+
* to surface point-level context (e.g. per-sample geolocation status like
|
|
968
|
+
* home/away). Each row is `{ label, value }` and rendered as
|
|
969
|
+
* `<label>: <value>` in the tooltip.
|
|
970
|
+
*/
|
|
971
|
+
extraTooltipRows?: Array<{
|
|
972
|
+
label: string;
|
|
973
|
+
value: string;
|
|
974
|
+
}>;
|
|
975
|
+
}
|
|
976
|
+
/**
|
|
977
|
+
* Canonical `AreaSeries` baseline accessor: the per-point band floor. Pass as
|
|
978
|
+
* `baseline={baselineFromPoint}` for any banded area whose points carry a
|
|
979
|
+
* `baselineValue`. Because the floor is read off the point, it stays correct
|
|
980
|
+
* under zoom/pan where a positional baseline array would desync.
|
|
981
|
+
*/
|
|
982
|
+
declare const baselineFromPoint: (point: BaseDataPoint) => number;
|
|
983
|
+
interface ChartMargin {
|
|
984
|
+
top: number;
|
|
985
|
+
right: number;
|
|
986
|
+
bottom: number;
|
|
987
|
+
left: number;
|
|
988
|
+
}
|
|
989
|
+
declare const defaultMargin: ChartMargin;
|
|
990
|
+
interface YFormatSettings {
|
|
991
|
+
format: (value: number) => string;
|
|
992
|
+
min?: number;
|
|
993
|
+
max?: number;
|
|
994
|
+
tickInterval?: number;
|
|
995
|
+
tickFormat?: (value: number) => string;
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* Get Y-axis format settings from a ComponentFormatter
|
|
999
|
+
* Uses the main formatting system for consistency across all components
|
|
1000
|
+
*/
|
|
1001
|
+
declare function getYFormatSettings(formatter?: YFormatType): YFormatSettings;
|
|
1002
|
+
declare const createXScale: (data: BaseDataPoint[], width: number) => _visx_vendor_d3_scale.ScaleTime<number, number, never>;
|
|
1003
|
+
declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType, explicitDomain?: [number, number]) => _visx_vendor_d3_scale.ScaleLinear<number, number, never>;
|
|
1004
|
+
|
|
1001
1005
|
declare const variantSizeMap: {
|
|
1002
1006
|
readonly heading: {
|
|
1003
1007
|
readonly sm: "text-heading-sm";
|