@texturehq/edges 1.6.1 → 1.6.3
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/components.manifest.json +2 -6
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -55
- package/dist/index.d.ts +55 -55
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- 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.map +1 -1
- package/dist/styles.css +9 -0
- package/dist/utilities.manifest.json +46 -32
- package/package.json +1 -1
- package/dist/{server-C20rH2CQ.d.cts → server-DDYwupsj.d.cts} +57 -57
- package/dist/{server-C20rH2CQ.d.ts → server-DDYwupsj.d.ts} +57 -57
package/dist/styles.css
CHANGED
|
@@ -2783,6 +2783,9 @@
|
|
|
2783
2783
|
.fill-neutral-black {
|
|
2784
2784
|
fill: var(--color-neutral-black);
|
|
2785
2785
|
}
|
|
2786
|
+
.fill-red-500 {
|
|
2787
|
+
fill: var(--color-red-500);
|
|
2788
|
+
}
|
|
2786
2789
|
.fill-slate-700 {
|
|
2787
2790
|
fill: var(--color-slate-700);
|
|
2788
2791
|
}
|
|
@@ -2878,6 +2881,9 @@
|
|
|
2878
2881
|
.px-6 {
|
|
2879
2882
|
padding-inline: var(--spacing-6);
|
|
2880
2883
|
}
|
|
2884
|
+
.px-8 {
|
|
2885
|
+
padding-inline: var(--spacing-8);
|
|
2886
|
+
}
|
|
2881
2887
|
.px-\[var\(--control-padding-lg\)\] {
|
|
2882
2888
|
padding-inline: var(--control-padding-lg);
|
|
2883
2889
|
}
|
|
@@ -2926,6 +2932,9 @@
|
|
|
2926
2932
|
.py-8 {
|
|
2927
2933
|
padding-block: var(--spacing-8);
|
|
2928
2934
|
}
|
|
2935
|
+
.py-10 {
|
|
2936
|
+
padding-block: var(--spacing-10);
|
|
2937
|
+
}
|
|
2929
2938
|
.py-12 {
|
|
2930
2939
|
padding-block: var(--spacing-12);
|
|
2931
2940
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.6.
|
|
3
|
-
"generatedAt": "2025-10-
|
|
2
|
+
"version": "1.6.3",
|
|
3
|
+
"generatedAt": "2025-10-14T16:50:11.346Z",
|
|
4
4
|
"categories": {
|
|
5
5
|
"hooks": {
|
|
6
6
|
"description": "React hooks for common functionality like debouncing, local storage, and time controls",
|
|
@@ -31,24 +31,6 @@
|
|
|
31
31
|
"category": "hooks",
|
|
32
32
|
"file": "hooks/useBreakpoint.ts"
|
|
33
33
|
},
|
|
34
|
-
{
|
|
35
|
-
"name": "handleChartExport",
|
|
36
|
-
"type": "function",
|
|
37
|
-
"description": "",
|
|
38
|
-
"params": [],
|
|
39
|
-
"returns": null,
|
|
40
|
-
"example": null,
|
|
41
|
-
"category": "hooks",
|
|
42
|
-
"file": "hooks/handleChartExport.tsx"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"name": "TimeControlsState",
|
|
46
|
-
"type": "type",
|
|
47
|
-
"description": "",
|
|
48
|
-
"example": null,
|
|
49
|
-
"category": "hooks",
|
|
50
|
-
"file": "hooks/useTimeControls.ts"
|
|
51
|
-
},
|
|
52
34
|
{
|
|
53
35
|
"name": "useBreakpoint",
|
|
54
36
|
"type": "function",
|
|
@@ -76,6 +58,48 @@
|
|
|
76
58
|
"category": "hooks",
|
|
77
59
|
"file": "hooks/useBreakpoint.ts"
|
|
78
60
|
},
|
|
61
|
+
{
|
|
62
|
+
"name": "useChartExport",
|
|
63
|
+
"type": "function",
|
|
64
|
+
"description": "Hook for exporting chart data in various formats (CSV, SVG, PNG). Provides a stable callback for triggering exports with memoized dependencies. ```tsx const svgRef = useRef<SVGSVGElement>(null); const handleExport = useChartExport({ datasets: chartData, metadata: { xLabel: 'Date', yLabel: 'Value', seriesLabels: ['Series 1', 'Series 2'], filename: 'sales-report', timestamp: true }, svgRef }); // In your component <Button onPress={() => handleExport('csv')}>Export CSV</Button> <Button onPress={() => handleExport('png')}>Export PNG</Button> ```",
|
|
65
|
+
"params": [
|
|
66
|
+
{
|
|
67
|
+
"name": "options",
|
|
68
|
+
"type": "unknown",
|
|
69
|
+
"description": "Configuration for chart export"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "options.datasets",
|
|
73
|
+
"type": "unknown",
|
|
74
|
+
"description": "Chart data as single array or array of arrays for multi-series"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "options.metadata",
|
|
78
|
+
"type": "unknown",
|
|
79
|
+
"description": "Export metadata including labels and filename options"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "options.svgRef",
|
|
83
|
+
"type": "unknown",
|
|
84
|
+
"description": "Reference to the chart's SVG element"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"returns": {
|
|
88
|
+
"type": "unknown",
|
|
89
|
+
"description": "Async function to trigger export for a given format"
|
|
90
|
+
},
|
|
91
|
+
"example": "const svgRef = useRef<SVGSVGElement>(null);\nconst handleExport = useChartExport({\n datasets: chartData,\n metadata: {\n xLabel: 'Date',\n yLabel: 'Value',\n seriesLabels: ['Series 1', 'Series 2'],\n filename: 'sales-report',\n timestamp: true\n },\n svgRef\n});\n\n// In your component\n<Button onPress={() => handleExport('csv')}>Export CSV</Button>\n<Button onPress={() => handleExport('png')}>Export PNG</Button>",
|
|
92
|
+
"category": "hooks",
|
|
93
|
+
"file": "hooks/useChartExport.ts"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "UseChartExportOptions",
|
|
97
|
+
"type": "type",
|
|
98
|
+
"description": "",
|
|
99
|
+
"example": null,
|
|
100
|
+
"category": "hooks",
|
|
101
|
+
"file": "hooks/useChartExport.ts"
|
|
102
|
+
},
|
|
79
103
|
{
|
|
80
104
|
"name": "useDebounce",
|
|
81
105
|
"type": "function",
|
|
@@ -133,16 +157,6 @@
|
|
|
133
157
|
"example": "const isMobile = useMediaQuery('(max-width: 767px)');\nconst prefersReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\nconst isLandscape = useMediaQuery('(orientation: landscape)');",
|
|
134
158
|
"category": "hooks",
|
|
135
159
|
"file": "hooks/useMediaQuery.ts"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"name": "useTimeControls",
|
|
139
|
-
"type": "function",
|
|
140
|
-
"description": "",
|
|
141
|
-
"params": [],
|
|
142
|
-
"returns": null,
|
|
143
|
-
"example": null,
|
|
144
|
-
"category": "hooks",
|
|
145
|
-
"file": "hooks/useTimeControls.ts"
|
|
146
160
|
}
|
|
147
161
|
]
|
|
148
162
|
},
|
|
@@ -2118,12 +2132,12 @@
|
|
|
2118
2132
|
}
|
|
2119
2133
|
},
|
|
2120
2134
|
"summary": {
|
|
2121
|
-
"totalUtilities":
|
|
2135
|
+
"totalUtilities": 207,
|
|
2122
2136
|
"totalCategories": 5,
|
|
2123
2137
|
"categories": [
|
|
2124
2138
|
{
|
|
2125
2139
|
"name": "hooks",
|
|
2126
|
-
"count":
|
|
2140
|
+
"count": 10
|
|
2127
2141
|
},
|
|
2128
2142
|
{
|
|
2129
2143
|
"name": "formatting",
|
package/package.json
CHANGED
|
@@ -8,6 +8,63 @@ import { ViewState, MapRef } from 'react-map-gl';
|
|
|
8
8
|
import * as d3_scale from 'd3-scale';
|
|
9
9
|
import { ScaleTime, ScaleLinear } from 'd3-scale';
|
|
10
10
|
|
|
11
|
+
type YFormatType = "number" | "percent" | "kWh" | "kW" | "amperes" | "temperature" | "percentageChange" | "decimal" | "currency" | "scientific" | "integer" | "logarithmic" | "timeDuration" | "compact" | "si" | "bytes" | "rate" | "ordinal" | "date" | "largeCurrency" | "coordinates" | "ranked";
|
|
12
|
+
interface TooltipData {
|
|
13
|
+
xValue: Date;
|
|
14
|
+
series: TooltipSeries[];
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
position: "left" | "right";
|
|
18
|
+
}
|
|
19
|
+
interface TooltipSeries {
|
|
20
|
+
label: string;
|
|
21
|
+
value: number;
|
|
22
|
+
color: string;
|
|
23
|
+
type?: "area" | "line" | "bar";
|
|
24
|
+
}
|
|
25
|
+
interface ChartContextType {
|
|
26
|
+
xScale: ScaleTime<number, number>;
|
|
27
|
+
yScale: ScaleLinear<number, number>;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
yFormatType: YFormatType;
|
|
31
|
+
animationSettings: {
|
|
32
|
+
duration: number;
|
|
33
|
+
ease: string;
|
|
34
|
+
};
|
|
35
|
+
tooltip: {
|
|
36
|
+
data: TooltipData | null;
|
|
37
|
+
show: (data: TooltipData) => void;
|
|
38
|
+
hide: () => void;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
declare const ChartContext: React$1.Context<ChartContextType | null>;
|
|
42
|
+
|
|
43
|
+
declare const useChartContext: () => ChartContextType;
|
|
44
|
+
|
|
45
|
+
interface BaseDataPoint {
|
|
46
|
+
xValue: Date;
|
|
47
|
+
yValue: number;
|
|
48
|
+
category?: string;
|
|
49
|
+
}
|
|
50
|
+
interface ChartMargin {
|
|
51
|
+
top: number;
|
|
52
|
+
right: number;
|
|
53
|
+
bottom: number;
|
|
54
|
+
left: number;
|
|
55
|
+
}
|
|
56
|
+
declare const defaultMargin: ChartMargin;
|
|
57
|
+
interface YFormatSettings {
|
|
58
|
+
format: (value: number) => string;
|
|
59
|
+
min?: number;
|
|
60
|
+
max?: number;
|
|
61
|
+
tickInterval?: number;
|
|
62
|
+
tickFormat?: (value: number) => string;
|
|
63
|
+
}
|
|
64
|
+
declare function getYFormatSettings(formatType: YFormatType, currencySymbol?: string): YFormatSettings;
|
|
65
|
+
declare const createXScale: (data: BaseDataPoint[], width: number) => d3_scale.ScaleTime<number, number, never>;
|
|
66
|
+
declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType) => d3_scale.ScaleLinear<number, number, never>;
|
|
67
|
+
|
|
11
68
|
type PhosphorIconName = keyof typeof PhosphorIcons;
|
|
12
69
|
type IconName = PhosphorIconName;
|
|
13
70
|
declare const sizePresets: {
|
|
@@ -432,63 +489,6 @@ interface CodeEditorProps {
|
|
|
432
489
|
*/
|
|
433
490
|
declare function CodeEditor({ value, readOnly, onChange, language, theme, height, width, className, lineHeight, minLines, maxLines, showLineNumbers, showGutter, fontSize, wrapEnabled, }: CodeEditorProps): react_jsx_runtime.JSX.Element;
|
|
434
491
|
|
|
435
|
-
type YFormatType = "number" | "percent" | "kWh" | "kW" | "amperes" | "temperature" | "percentageChange" | "decimal" | "currency" | "scientific" | "integer" | "logarithmic" | "timeDuration" | "compact" | "si" | "bytes" | "rate" | "ordinal" | "date" | "largeCurrency" | "coordinates" | "ranked";
|
|
436
|
-
interface TooltipData {
|
|
437
|
-
xValue: Date;
|
|
438
|
-
series: TooltipSeries[];
|
|
439
|
-
x: number;
|
|
440
|
-
y: number;
|
|
441
|
-
position: "left" | "right";
|
|
442
|
-
}
|
|
443
|
-
interface TooltipSeries {
|
|
444
|
-
label: string;
|
|
445
|
-
value: number;
|
|
446
|
-
color: string;
|
|
447
|
-
type?: "area" | "line" | "bar";
|
|
448
|
-
}
|
|
449
|
-
interface ChartContextType {
|
|
450
|
-
xScale: ScaleTime<number, number>;
|
|
451
|
-
yScale: ScaleLinear<number, number>;
|
|
452
|
-
width: number;
|
|
453
|
-
height: number;
|
|
454
|
-
yFormatType: YFormatType;
|
|
455
|
-
animationSettings: {
|
|
456
|
-
duration: number;
|
|
457
|
-
ease: string;
|
|
458
|
-
};
|
|
459
|
-
tooltip: {
|
|
460
|
-
data: TooltipData | null;
|
|
461
|
-
show: (data: TooltipData) => void;
|
|
462
|
-
hide: () => void;
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
declare const ChartContext: React$1.Context<ChartContextType | null>;
|
|
466
|
-
|
|
467
|
-
declare const useChartContext: () => ChartContextType;
|
|
468
|
-
|
|
469
|
-
interface BaseDataPoint {
|
|
470
|
-
xValue: Date;
|
|
471
|
-
yValue: number;
|
|
472
|
-
category?: string;
|
|
473
|
-
}
|
|
474
|
-
interface ChartMargin {
|
|
475
|
-
top: number;
|
|
476
|
-
right: number;
|
|
477
|
-
bottom: number;
|
|
478
|
-
left: number;
|
|
479
|
-
}
|
|
480
|
-
declare const defaultMargin: ChartMargin;
|
|
481
|
-
interface YFormatSettings {
|
|
482
|
-
format: (value: number) => string;
|
|
483
|
-
min?: number;
|
|
484
|
-
max?: number;
|
|
485
|
-
tickInterval?: number;
|
|
486
|
-
tickFormat?: (value: number) => string;
|
|
487
|
-
}
|
|
488
|
-
declare function getYFormatSettings(formatType: YFormatType, currencySymbol?: string): YFormatSettings;
|
|
489
|
-
declare const createXScale: (data: BaseDataPoint[], width: number) => d3_scale.ScaleTime<number, number, never>;
|
|
490
|
-
declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType) => d3_scale.ScaleLinear<number, number, never>;
|
|
491
|
-
|
|
492
492
|
/**
|
|
493
493
|
* DateField
|
|
494
494
|
*
|
|
@@ -8,6 +8,63 @@ import { ViewState, MapRef } from 'react-map-gl';
|
|
|
8
8
|
import * as d3_scale from 'd3-scale';
|
|
9
9
|
import { ScaleTime, ScaleLinear } from 'd3-scale';
|
|
10
10
|
|
|
11
|
+
type YFormatType = "number" | "percent" | "kWh" | "kW" | "amperes" | "temperature" | "percentageChange" | "decimal" | "currency" | "scientific" | "integer" | "logarithmic" | "timeDuration" | "compact" | "si" | "bytes" | "rate" | "ordinal" | "date" | "largeCurrency" | "coordinates" | "ranked";
|
|
12
|
+
interface TooltipData {
|
|
13
|
+
xValue: Date;
|
|
14
|
+
series: TooltipSeries[];
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
position: "left" | "right";
|
|
18
|
+
}
|
|
19
|
+
interface TooltipSeries {
|
|
20
|
+
label: string;
|
|
21
|
+
value: number;
|
|
22
|
+
color: string;
|
|
23
|
+
type?: "area" | "line" | "bar";
|
|
24
|
+
}
|
|
25
|
+
interface ChartContextType {
|
|
26
|
+
xScale: ScaleTime<number, number>;
|
|
27
|
+
yScale: ScaleLinear<number, number>;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
yFormatType: YFormatType;
|
|
31
|
+
animationSettings: {
|
|
32
|
+
duration: number;
|
|
33
|
+
ease: string;
|
|
34
|
+
};
|
|
35
|
+
tooltip: {
|
|
36
|
+
data: TooltipData | null;
|
|
37
|
+
show: (data: TooltipData) => void;
|
|
38
|
+
hide: () => void;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
declare const ChartContext: React$1.Context<ChartContextType | null>;
|
|
42
|
+
|
|
43
|
+
declare const useChartContext: () => ChartContextType;
|
|
44
|
+
|
|
45
|
+
interface BaseDataPoint {
|
|
46
|
+
xValue: Date;
|
|
47
|
+
yValue: number;
|
|
48
|
+
category?: string;
|
|
49
|
+
}
|
|
50
|
+
interface ChartMargin {
|
|
51
|
+
top: number;
|
|
52
|
+
right: number;
|
|
53
|
+
bottom: number;
|
|
54
|
+
left: number;
|
|
55
|
+
}
|
|
56
|
+
declare const defaultMargin: ChartMargin;
|
|
57
|
+
interface YFormatSettings {
|
|
58
|
+
format: (value: number) => string;
|
|
59
|
+
min?: number;
|
|
60
|
+
max?: number;
|
|
61
|
+
tickInterval?: number;
|
|
62
|
+
tickFormat?: (value: number) => string;
|
|
63
|
+
}
|
|
64
|
+
declare function getYFormatSettings(formatType: YFormatType, currencySymbol?: string): YFormatSettings;
|
|
65
|
+
declare const createXScale: (data: BaseDataPoint[], width: number) => d3_scale.ScaleTime<number, number, never>;
|
|
66
|
+
declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType) => d3_scale.ScaleLinear<number, number, never>;
|
|
67
|
+
|
|
11
68
|
type PhosphorIconName = keyof typeof PhosphorIcons;
|
|
12
69
|
type IconName = PhosphorIconName;
|
|
13
70
|
declare const sizePresets: {
|
|
@@ -432,63 +489,6 @@ interface CodeEditorProps {
|
|
|
432
489
|
*/
|
|
433
490
|
declare function CodeEditor({ value, readOnly, onChange, language, theme, height, width, className, lineHeight, minLines, maxLines, showLineNumbers, showGutter, fontSize, wrapEnabled, }: CodeEditorProps): react_jsx_runtime.JSX.Element;
|
|
434
491
|
|
|
435
|
-
type YFormatType = "number" | "percent" | "kWh" | "kW" | "amperes" | "temperature" | "percentageChange" | "decimal" | "currency" | "scientific" | "integer" | "logarithmic" | "timeDuration" | "compact" | "si" | "bytes" | "rate" | "ordinal" | "date" | "largeCurrency" | "coordinates" | "ranked";
|
|
436
|
-
interface TooltipData {
|
|
437
|
-
xValue: Date;
|
|
438
|
-
series: TooltipSeries[];
|
|
439
|
-
x: number;
|
|
440
|
-
y: number;
|
|
441
|
-
position: "left" | "right";
|
|
442
|
-
}
|
|
443
|
-
interface TooltipSeries {
|
|
444
|
-
label: string;
|
|
445
|
-
value: number;
|
|
446
|
-
color: string;
|
|
447
|
-
type?: "area" | "line" | "bar";
|
|
448
|
-
}
|
|
449
|
-
interface ChartContextType {
|
|
450
|
-
xScale: ScaleTime<number, number>;
|
|
451
|
-
yScale: ScaleLinear<number, number>;
|
|
452
|
-
width: number;
|
|
453
|
-
height: number;
|
|
454
|
-
yFormatType: YFormatType;
|
|
455
|
-
animationSettings: {
|
|
456
|
-
duration: number;
|
|
457
|
-
ease: string;
|
|
458
|
-
};
|
|
459
|
-
tooltip: {
|
|
460
|
-
data: TooltipData | null;
|
|
461
|
-
show: (data: TooltipData) => void;
|
|
462
|
-
hide: () => void;
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
declare const ChartContext: React$1.Context<ChartContextType | null>;
|
|
466
|
-
|
|
467
|
-
declare const useChartContext: () => ChartContextType;
|
|
468
|
-
|
|
469
|
-
interface BaseDataPoint {
|
|
470
|
-
xValue: Date;
|
|
471
|
-
yValue: number;
|
|
472
|
-
category?: string;
|
|
473
|
-
}
|
|
474
|
-
interface ChartMargin {
|
|
475
|
-
top: number;
|
|
476
|
-
right: number;
|
|
477
|
-
bottom: number;
|
|
478
|
-
left: number;
|
|
479
|
-
}
|
|
480
|
-
declare const defaultMargin: ChartMargin;
|
|
481
|
-
interface YFormatSettings {
|
|
482
|
-
format: (value: number) => string;
|
|
483
|
-
min?: number;
|
|
484
|
-
max?: number;
|
|
485
|
-
tickInterval?: number;
|
|
486
|
-
tickFormat?: (value: number) => string;
|
|
487
|
-
}
|
|
488
|
-
declare function getYFormatSettings(formatType: YFormatType, currencySymbol?: string): YFormatSettings;
|
|
489
|
-
declare const createXScale: (data: BaseDataPoint[], width: number) => d3_scale.ScaleTime<number, number, never>;
|
|
490
|
-
declare const createYScale: (data: BaseDataPoint[], height: number, formatType: YFormatType) => d3_scale.ScaleLinear<number, number, never>;
|
|
491
|
-
|
|
492
492
|
/**
|
|
493
493
|
* DateField
|
|
494
494
|
*
|