@texturehq/edges 1.6.2 → 1.7.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/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
  }
@@ -2941,6 +2944,9 @@
2941
2944
  .pt-4 {
2942
2945
  padding-top: var(--spacing-4);
2943
2946
  }
2947
+ .pt-24 {
2948
+ padding-top: var(--spacing-24);
2949
+ }
2944
2950
  .pt-\[60px\] {
2945
2951
  padding-top: 60px;
2946
2952
  }
@@ -2977,6 +2983,9 @@
2977
2983
  .pb-4 {
2978
2984
  padding-bottom: var(--spacing-4);
2979
2985
  }
2986
+ .pb-28 {
2987
+ padding-bottom: var(--spacing-28);
2988
+ }
2980
2989
  .pl-0 {
2981
2990
  padding-left: var(--spacing-0);
2982
2991
  }
@@ -4612,6 +4621,11 @@
4612
4621
  margin-bottom: var(--spacing-6);
4613
4622
  }
4614
4623
  }
4624
+ .md\:mb-8 {
4625
+ @media (width >= 48rem) {
4626
+ margin-bottom: var(--spacing-8);
4627
+ }
4628
+ }
4615
4629
  .md\:block {
4616
4630
  @media (width >= 48rem) {
4617
4631
  display: block;
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.6.2",
3
- "generatedAt": "2025-10-13T20:19:50.383Z",
2
+ "version": "1.7.0",
3
+ "generatedAt": "2025-10-15T17:18:21.444Z",
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": 208,
2135
+ "totalUtilities": 207,
2122
2136
  "totalCategories": 5,
2123
2137
  "categories": [
2124
2138
  {
2125
2139
  "name": "hooks",
2126
- "count": 11
2140
+ "count": 10
2127
2141
  },
2128
2142
  {
2129
2143
  "name": "formatting",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@texturehq/edges",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "author": "Nicholas Brown <nick@texturehq.com>",
5
5
  "description": "A shared component library for Texture",
6
6
  "type": "module",
@@ -103,7 +103,7 @@
103
103
  "@storybook/react": "^8.6.14",
104
104
  "@storybook/react-vite": "^8.6.14",
105
105
  "@storybook/test": "^8.6.14",
106
- "@tailwindcss/postcss": "^4.1.4",
106
+ "@tailwindcss/postcss": "^4.1.14",
107
107
  "@testing-library/dom": "^10.4.0",
108
108
  "@testing-library/jest-dom": "^6.4.2",
109
109
  "@testing-library/react": "^16.3.0",
@@ -121,13 +121,13 @@
121
121
  "acorn-jsx": "^5.3.2",
122
122
  "autoprefixer": "^10.4.19",
123
123
  "jsdom": "^24.0.0",
124
- "postcss": "^8.4.35",
124
+ "postcss": "^8.5.6",
125
125
  "postcss-cli": "^11.0.0",
126
126
  "react": "19.2.0",
127
127
  "react-dom": "19.2.0",
128
128
  "storybook": "^8.6.14",
129
129
  "style-dictionary": "^5.0.4",
130
- "tailwindcss": "^4.1.3",
130
+ "tailwindcss": "^4.1.14",
131
131
  "tsup": "^8.0.2",
132
132
  "typescript": "~5.9.2",
133
133
  "vite": "^5.1.6",