@texturehq/edges 1.7.1 → 1.7.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 +914 -1406
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +98 -275
- package/dist/index.d.ts +98 -275
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/{server-DAd0A202.d.cts → server-7ZzifHri.d.cts} +191 -8
- package/dist/{server-DAd0A202.d.ts → server-7ZzifHri.d.ts} +191 -8
- package/dist/server.cjs +13 -13
- 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 +13 -13
- package/dist/server.js.map +1 -1
- package/dist/styles.css +5 -16
- package/dist/utilities.manifest.json +4 -1039
- package/package.json +2 -2
- package/scripts/generate-edges-docs.js +970 -0
- package/scripts/setup-cursor-rules.js +18 -0
- package/scripts/generate-components-manifest.js +0 -188
- package/scripts/generate-utilities-manifest.js +0 -392
|
@@ -1,33 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.7.
|
|
3
|
-
"generatedAt": "2025-10-
|
|
2
|
+
"version": "1.7.3",
|
|
3
|
+
"generatedAt": "2025-10-16T14:43:20.652Z",
|
|
4
4
|
"categories": {
|
|
5
5
|
"hooks": {
|
|
6
|
-
"description": "React hooks for common functionality like debouncing, local storage, and
|
|
6
|
+
"description": "React hooks for common functionality like breakpoints, debouncing, local storage, and media queries",
|
|
7
7
|
"utilities": [
|
|
8
|
-
{
|
|
9
|
-
"name": "Breakpoint",
|
|
10
|
-
"type": "type",
|
|
11
|
-
"description": "",
|
|
12
|
-
"example": null,
|
|
13
|
-
"category": "hooks",
|
|
14
|
-
"file": "hooks/useBreakpoint.ts"
|
|
15
|
-
},
|
|
16
8
|
{
|
|
17
9
|
"name": "BREAKPOINTS",
|
|
18
10
|
"type": "constant",
|
|
19
11
|
"description": "Tailwind CSS default breakpoints These match the standard Tailwind breakpoints used in your CSS",
|
|
20
|
-
"params": [],
|
|
21
|
-
"returns": null,
|
|
22
|
-
"example": null,
|
|
23
|
-
"category": "hooks",
|
|
24
|
-
"file": "hooks/useBreakpoint.ts"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "BreakpointState",
|
|
28
|
-
"type": "type",
|
|
29
|
-
"description": "",
|
|
30
|
-
"example": null,
|
|
31
12
|
"category": "hooks",
|
|
32
13
|
"file": "hooks/useBreakpoint.ts"
|
|
33
14
|
},
|
|
@@ -35,26 +16,6 @@
|
|
|
35
16
|
"name": "useBreakpoint",
|
|
36
17
|
"type": "function",
|
|
37
18
|
"description": "Hook to detect which Tailwind breakpoint is currently active Returns an object with boolean flags for each breakpoint and convenience helpers. All breakpoints use min-width queries to match Tailwind's mobile-first approach. ```tsx const { isMobile, isDesktop, current } = useBreakpoint(); // Conditional rendering based on screen size return isMobile ? <MobileNav /> : <DesktopNav />; // Check specific breakpoint if (isLg) { // Show expanded view on large screens } // Use current breakpoint console.log(`Current breakpoint: ${current}`); // \"md\", \"lg\", etc. ```",
|
|
38
|
-
"params": [
|
|
39
|
-
{
|
|
40
|
-
"name": "defaultBreakpoint",
|
|
41
|
-
"type": "unknown",
|
|
42
|
-
"description": "The breakpoint to assume during SSR or before first render (defaults to \"base\" for mobile-first)"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"returns": {
|
|
46
|
-
"type": "unknown",
|
|
47
|
-
"description": "An object containing breakpoint state information"
|
|
48
|
-
},
|
|
49
|
-
"example": "const { isMobile, isDesktop, current } = useBreakpoint();\n\n// Conditional rendering based on screen size\nreturn isMobile ? <MobileNav /> : <DesktopNav />;\n\n// Check specific breakpoint\nif (isLg) {\n // Show expanded view on large screens\n}\n\n// Use current breakpoint\nconsole.log(`Current breakpoint: ${current}`); // \"md\", \"lg\", etc.",
|
|
50
|
-
"category": "hooks",
|
|
51
|
-
"file": "hooks/useBreakpoint.ts"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"name": "UseBreakpointReturn",
|
|
55
|
-
"type": "type",
|
|
56
|
-
"description": "Public return type alias for useBreakpoint hook Provides a stable public API for barrel re-exports",
|
|
57
|
-
"example": null,
|
|
58
19
|
"category": "hooks",
|
|
59
20
|
"file": "hooks/useBreakpoint.ts"
|
|
60
21
|
},
|
|
@@ -62,41 +23,6 @@
|
|
|
62
23
|
"name": "useChartExport",
|
|
63
24
|
"type": "function",
|
|
64
25
|
"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
26
|
"category": "hooks",
|
|
101
27
|
"file": "hooks/useChartExport.ts"
|
|
102
28
|
},
|
|
@@ -104,9 +30,6 @@
|
|
|
104
30
|
"name": "useDebounce",
|
|
105
31
|
"type": "function",
|
|
106
32
|
"description": "",
|
|
107
|
-
"params": [],
|
|
108
|
-
"returns": null,
|
|
109
|
-
"example": null,
|
|
110
33
|
"category": "hooks",
|
|
111
34
|
"file": "hooks/useDebounce.ts"
|
|
112
35
|
},
|
|
@@ -114,23 +37,6 @@
|
|
|
114
37
|
"name": "useLocalStorage",
|
|
115
38
|
"type": "function",
|
|
116
39
|
"description": "Hook for managing localStorage values with React state synchronization",
|
|
117
|
-
"params": [
|
|
118
|
-
{
|
|
119
|
-
"name": "key",
|
|
120
|
-
"type": "unknown",
|
|
121
|
-
"description": "The localStorage key"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"name": "initialValue",
|
|
125
|
-
"type": "unknown",
|
|
126
|
-
"description": "The initial value if nothing is stored"
|
|
127
|
-
}
|
|
128
|
-
],
|
|
129
|
-
"returns": {
|
|
130
|
-
"type": "unknown",
|
|
131
|
-
"description": "[value, setValue, removeValue] - Current value, setter function, and remove function"
|
|
132
|
-
},
|
|
133
|
-
"example": null,
|
|
134
40
|
"category": "hooks",
|
|
135
41
|
"file": "hooks/useLocalStorage.ts"
|
|
136
42
|
},
|
|
@@ -138,23 +44,6 @@
|
|
|
138
44
|
"name": "useMediaQuery",
|
|
139
45
|
"type": "function",
|
|
140
46
|
"description": "Hook to check if a media query matches the current viewport ```tsx const isMobile = useMediaQuery('(max-width: 767px)'); const prefersReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)'); const isLandscape = useMediaQuery('(orientation: landscape)'); ```",
|
|
141
|
-
"params": [
|
|
142
|
-
{
|
|
143
|
-
"name": "query",
|
|
144
|
-
"type": "unknown",
|
|
145
|
-
"description": "A CSS media query string (e.g., \"(min-width: 768px)\")"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"name": "defaultValue",
|
|
149
|
-
"type": "unknown",
|
|
150
|
-
"description": "The default value to return during SSR or before the first render"
|
|
151
|
-
}
|
|
152
|
-
],
|
|
153
|
-
"returns": {
|
|
154
|
-
"type": "unknown",
|
|
155
|
-
"description": "A boolean indicating whether the media query matches"
|
|
156
|
-
},
|
|
157
|
-
"example": "const isMobile = useMediaQuery('(max-width: 767px)');\nconst prefersReducedMotion = useMediaQuery('(prefers-reduced-motion: reduce)');\nconst isLandscape = useMediaQuery('(orientation: landscape)');",
|
|
158
47
|
"category": "hooks",
|
|
159
48
|
"file": "hooks/useMediaQuery.ts"
|
|
160
49
|
}
|
|
@@ -167,9 +56,6 @@
|
|
|
167
56
|
"name": "autoScaleCurrent",
|
|
168
57
|
"type": "constant",
|
|
169
58
|
"description": "Auto-scale current to the most appropriate unit",
|
|
170
|
-
"params": [],
|
|
171
|
-
"returns": null,
|
|
172
|
-
"example": null,
|
|
173
59
|
"category": "formatting",
|
|
174
60
|
"file": "utils/formatting/current.ts"
|
|
175
61
|
},
|
|
@@ -177,9 +63,6 @@
|
|
|
177
63
|
"name": "autoScaleDistance",
|
|
178
64
|
"type": "constant",
|
|
179
65
|
"description": "Auto-scale distance to the most appropriate unit",
|
|
180
|
-
"params": [],
|
|
181
|
-
"returns": null,
|
|
182
|
-
"example": null,
|
|
183
66
|
"category": "formatting",
|
|
184
67
|
"file": "utils/formatting/distance.ts"
|
|
185
68
|
},
|
|
@@ -187,9 +70,6 @@
|
|
|
187
70
|
"name": "autoScaleEnergy",
|
|
188
71
|
"type": "constant",
|
|
189
72
|
"description": "Auto-scale energy to the most appropriate unit",
|
|
190
|
-
"params": [],
|
|
191
|
-
"returns": null,
|
|
192
|
-
"example": null,
|
|
193
73
|
"category": "formatting",
|
|
194
74
|
"file": "utils/formatting/energy.ts"
|
|
195
75
|
},
|
|
@@ -197,9 +77,6 @@
|
|
|
197
77
|
"name": "autoScalePower",
|
|
198
78
|
"type": "constant",
|
|
199
79
|
"description": "Auto-scale power to the most appropriate unit",
|
|
200
|
-
"params": [],
|
|
201
|
-
"returns": null,
|
|
202
|
-
"example": null,
|
|
203
80
|
"category": "formatting",
|
|
204
81
|
"file": "utils/formatting/power.ts"
|
|
205
82
|
},
|
|
@@ -207,9 +84,6 @@
|
|
|
207
84
|
"name": "autoScaleResistance",
|
|
208
85
|
"type": "constant",
|
|
209
86
|
"description": "Auto-scale resistance to the most appropriate unit",
|
|
210
|
-
"params": [],
|
|
211
|
-
"returns": null,
|
|
212
|
-
"example": null,
|
|
213
87
|
"category": "formatting",
|
|
214
88
|
"file": "utils/formatting/resistance.ts"
|
|
215
89
|
},
|
|
@@ -217,35 +91,13 @@
|
|
|
217
91
|
"name": "autoScaleVoltage",
|
|
218
92
|
"type": "constant",
|
|
219
93
|
"description": "Auto-scale voltage to the most appropriate unit",
|
|
220
|
-
"params": [],
|
|
221
|
-
"returns": null,
|
|
222
|
-
"example": null,
|
|
223
94
|
"category": "formatting",
|
|
224
95
|
"file": "utils/formatting/voltage.ts"
|
|
225
96
|
},
|
|
226
|
-
{
|
|
227
|
-
"name": "BaseFormat",
|
|
228
|
-
"type": "type",
|
|
229
|
-
"description": "",
|
|
230
|
-
"example": null,
|
|
231
|
-
"category": "formatting",
|
|
232
|
-
"file": "utils/formatting/types.ts"
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"name": "BooleanFormat",
|
|
236
|
-
"type": "type",
|
|
237
|
-
"description": "",
|
|
238
|
-
"example": null,
|
|
239
|
-
"category": "formatting",
|
|
240
|
-
"file": "utils/formatting/types.ts"
|
|
241
|
-
},
|
|
242
97
|
{
|
|
243
98
|
"name": "camelCaseToWords",
|
|
244
99
|
"type": "function",
|
|
245
100
|
"description": "Convert camelCase to words",
|
|
246
|
-
"params": [],
|
|
247
|
-
"returns": null,
|
|
248
|
-
"example": null,
|
|
249
101
|
"category": "formatting",
|
|
250
102
|
"file": "utils/formatting/text.ts"
|
|
251
103
|
},
|
|
@@ -253,9 +105,6 @@
|
|
|
253
105
|
"name": "capitalize",
|
|
254
106
|
"type": "function",
|
|
255
107
|
"description": "Capitalize first letter of each word",
|
|
256
|
-
"params": [],
|
|
257
|
-
"returns": null,
|
|
258
|
-
"example": null,
|
|
259
108
|
"category": "formatting",
|
|
260
109
|
"file": "utils/formatting/text.ts"
|
|
261
110
|
},
|
|
@@ -263,9 +112,6 @@
|
|
|
263
112
|
"name": "celsiusToFahrenheit",
|
|
264
113
|
"type": "function",
|
|
265
114
|
"description": "Convert Celsius to Fahrenheit",
|
|
266
|
-
"params": [],
|
|
267
|
-
"returns": null,
|
|
268
|
-
"example": null,
|
|
269
115
|
"category": "formatting",
|
|
270
116
|
"file": "utils/formatting/temperature.ts"
|
|
271
117
|
},
|
|
@@ -273,9 +119,6 @@
|
|
|
273
119
|
"name": "celsiusToKelvin",
|
|
274
120
|
"type": "function",
|
|
275
121
|
"description": "Convert Celsius to Kelvin",
|
|
276
|
-
"params": [],
|
|
277
|
-
"returns": null,
|
|
278
|
-
"example": null,
|
|
279
122
|
"category": "formatting",
|
|
280
123
|
"file": "utils/formatting/temperature.ts"
|
|
281
124
|
},
|
|
@@ -283,125 +126,20 @@
|
|
|
283
126
|
"name": "centimetersToInches",
|
|
284
127
|
"type": "function",
|
|
285
128
|
"description": "",
|
|
286
|
-
"params": [],
|
|
287
|
-
"returns": null,
|
|
288
|
-
"example": null,
|
|
289
129
|
"category": "formatting",
|
|
290
130
|
"file": "utils/formatting/distance.ts"
|
|
291
131
|
},
|
|
292
|
-
{
|
|
293
|
-
"name": "ComponentFormatOptions",
|
|
294
|
-
"type": "type",
|
|
295
|
-
"description": "Options for formatting values in components",
|
|
296
|
-
"example": null,
|
|
297
|
-
"category": "formatting",
|
|
298
|
-
"file": "utils/formatting/component-formatter.tsx"
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
"name": "ComponentFormatter",
|
|
302
|
-
"type": "type",
|
|
303
|
-
"description": "Common formatter type used by data display components Can be either a custom function or a FieldFormat object",
|
|
304
|
-
"example": null,
|
|
305
|
-
"category": "formatting",
|
|
306
|
-
"file": "utils/formatting/component-formatter.tsx"
|
|
307
|
-
},
|
|
308
132
|
{
|
|
309
133
|
"name": "createFormat",
|
|
310
134
|
"type": "constant",
|
|
311
135
|
"description": "Convenience function to create a format object ```typescript const currencyFormat = createFormat(\"currency\", { currency: \"EUR\" }); const dateFormat = createFormat(\"date\", { relative: true }); ```",
|
|
312
|
-
"params": [],
|
|
313
|
-
"returns": null,
|
|
314
|
-
"example": "const currencyFormat = createFormat(\"currency\", { currency: \"EUR\" });\nconst dateFormat = createFormat(\"date\", { relative: true });",
|
|
315
136
|
"category": "formatting",
|
|
316
137
|
"file": "utils/formatting/index.ts"
|
|
317
138
|
},
|
|
318
|
-
{
|
|
319
|
-
"name": "CurrencyFormat",
|
|
320
|
-
"type": "type",
|
|
321
|
-
"description": "",
|
|
322
|
-
"example": null,
|
|
323
|
-
"category": "formatting",
|
|
324
|
-
"file": "utils/formatting/types.ts"
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"name": "CurrentFormat",
|
|
328
|
-
"type": "type",
|
|
329
|
-
"description": "",
|
|
330
|
-
"example": null,
|
|
331
|
-
"category": "formatting",
|
|
332
|
-
"file": "utils/formatting/types.ts"
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
"name": "CurrentUnit",
|
|
336
|
-
"type": "type",
|
|
337
|
-
"description": "",
|
|
338
|
-
"example": null,
|
|
339
|
-
"category": "formatting",
|
|
340
|
-
"file": "utils/formatting/types.ts"
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
"name": "CustomFormat",
|
|
344
|
-
"type": "type",
|
|
345
|
-
"description": "",
|
|
346
|
-
"example": null,
|
|
347
|
-
"category": "formatting",
|
|
348
|
-
"file": "utils/formatting/types.ts"
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
"name": "DateFormat",
|
|
352
|
-
"type": "type",
|
|
353
|
-
"description": "",
|
|
354
|
-
"example": null,
|
|
355
|
-
"category": "formatting",
|
|
356
|
-
"file": "utils/formatting/types.ts"
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
"name": "DateFormatStyle",
|
|
360
|
-
"type": "type",
|
|
361
|
-
"description": "",
|
|
362
|
-
"example": null,
|
|
363
|
-
"category": "formatting",
|
|
364
|
-
"file": "utils/formatting/types.ts"
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
"name": "DistanceFormat",
|
|
368
|
-
"type": "type",
|
|
369
|
-
"description": "",
|
|
370
|
-
"example": null,
|
|
371
|
-
"category": "formatting",
|
|
372
|
-
"file": "utils/formatting/types.ts"
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
"name": "DistanceUnit",
|
|
376
|
-
"type": "type",
|
|
377
|
-
"description": "",
|
|
378
|
-
"example": null,
|
|
379
|
-
"category": "formatting",
|
|
380
|
-
"file": "utils/formatting/types.ts"
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
"name": "EnergyFormat",
|
|
384
|
-
"type": "type",
|
|
385
|
-
"description": "",
|
|
386
|
-
"example": null,
|
|
387
|
-
"category": "formatting",
|
|
388
|
-
"file": "utils/formatting/types.ts"
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
"name": "EnergyUnit",
|
|
392
|
-
"type": "type",
|
|
393
|
-
"description": "",
|
|
394
|
-
"example": null,
|
|
395
|
-
"category": "formatting",
|
|
396
|
-
"file": "utils/formatting/types.ts"
|
|
397
|
-
},
|
|
398
139
|
{
|
|
399
140
|
"name": "enumToSentenceCase",
|
|
400
141
|
"type": "function",
|
|
401
142
|
"description": "Convert enum-style text to sentence case",
|
|
402
|
-
"params": [],
|
|
403
|
-
"returns": null,
|
|
404
|
-
"example": null,
|
|
405
143
|
"category": "formatting",
|
|
406
144
|
"file": "utils/formatting/text.ts"
|
|
407
145
|
},
|
|
@@ -409,9 +147,6 @@
|
|
|
409
147
|
"name": "fahrenheitToCelsius",
|
|
410
148
|
"type": "function",
|
|
411
149
|
"description": "Convert Fahrenheit to Celsius",
|
|
412
|
-
"params": [],
|
|
413
|
-
"returns": null,
|
|
414
|
-
"example": null,
|
|
415
150
|
"category": "formatting",
|
|
416
151
|
"file": "utils/formatting/temperature.ts"
|
|
417
152
|
},
|
|
@@ -419,9 +154,6 @@
|
|
|
419
154
|
"name": "fahrenheitToKelvin",
|
|
420
155
|
"type": "function",
|
|
421
156
|
"description": "Convert Fahrenheit to Kelvin",
|
|
422
|
-
"params": [],
|
|
423
|
-
"returns": null,
|
|
424
|
-
"example": null,
|
|
425
157
|
"category": "formatting",
|
|
426
158
|
"file": "utils/formatting/temperature.ts"
|
|
427
159
|
},
|
|
@@ -429,9 +161,6 @@
|
|
|
429
161
|
"name": "feetToMeters",
|
|
430
162
|
"type": "function",
|
|
431
163
|
"description": "",
|
|
432
|
-
"params": [],
|
|
433
|
-
"returns": null,
|
|
434
|
-
"example": null,
|
|
435
164
|
"category": "formatting",
|
|
436
165
|
"file": "utils/formatting/distance.ts"
|
|
437
166
|
},
|
|
@@ -439,35 +168,13 @@
|
|
|
439
168
|
"name": "feetToMiles",
|
|
440
169
|
"type": "function",
|
|
441
170
|
"description": "",
|
|
442
|
-
"params": [],
|
|
443
|
-
"returns": null,
|
|
444
|
-
"example": null,
|
|
445
171
|
"category": "formatting",
|
|
446
172
|
"file": "utils/formatting/distance.ts"
|
|
447
173
|
},
|
|
448
|
-
{
|
|
449
|
-
"name": "FieldFormat",
|
|
450
|
-
"type": "type",
|
|
451
|
-
"description": "",
|
|
452
|
-
"example": null,
|
|
453
|
-
"category": "formatting",
|
|
454
|
-
"file": "utils/formatting/types.ts"
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
"name": "FieldValue",
|
|
458
|
-
"type": "type",
|
|
459
|
-
"description": "",
|
|
460
|
-
"example": null,
|
|
461
|
-
"category": "formatting",
|
|
462
|
-
"file": "utils/formatting/types.ts"
|
|
463
|
-
},
|
|
464
174
|
{
|
|
465
175
|
"name": "formatBoolean",
|
|
466
176
|
"type": "constant",
|
|
467
177
|
"description": "Format boolean according to BooleanFormat specification",
|
|
468
|
-
"params": [],
|
|
469
|
-
"returns": null,
|
|
470
|
-
"example": null,
|
|
471
178
|
"category": "formatting",
|
|
472
179
|
"file": "utils/formatting/boolean.ts"
|
|
473
180
|
},
|
|
@@ -475,9 +182,6 @@
|
|
|
475
182
|
"name": "formatComponentValue",
|
|
476
183
|
"type": "function",
|
|
477
184
|
"description": "Format a value for display in a component Centralizes the logic used by Kpi, StatList, and similar components ```tsx // In a component const formatted = formatComponentValue({ value: 1500, formatter: { type: \"power\" } }); // Returns: \"1.5 kW\" ```",
|
|
478
|
-
"params": [],
|
|
479
|
-
"returns": null,
|
|
480
|
-
"example": "// In a component\nconst formatted = formatComponentValue({\n value: 1500,\n formatter: { type: \"power\" }\n});\n// Returns: \"1.5 kW\"",
|
|
481
185
|
"category": "formatting",
|
|
482
186
|
"file": "utils/formatting/component-formatter.tsx"
|
|
483
187
|
},
|
|
@@ -485,9 +189,6 @@
|
|
|
485
189
|
"name": "formatCurrency",
|
|
486
190
|
"type": "constant",
|
|
487
191
|
"description": "Format currency according to CurrencyFormat specification",
|
|
488
|
-
"params": [],
|
|
489
|
-
"returns": null,
|
|
490
|
-
"example": null,
|
|
491
192
|
"category": "formatting",
|
|
492
193
|
"file": "utils/formatting/number.ts"
|
|
493
194
|
},
|
|
@@ -495,9 +196,6 @@
|
|
|
495
196
|
"name": "formatCurrent",
|
|
496
197
|
"type": "constant",
|
|
497
198
|
"description": "Format current according to CurrentFormat specification",
|
|
498
|
-
"params": [],
|
|
499
|
-
"returns": null,
|
|
500
|
-
"example": null,
|
|
501
199
|
"category": "formatting",
|
|
502
200
|
"file": "utils/formatting/current.ts"
|
|
503
201
|
},
|
|
@@ -505,9 +203,6 @@
|
|
|
505
203
|
"name": "formatDate",
|
|
506
204
|
"type": "constant",
|
|
507
205
|
"description": "Format date according to DateFormat specification",
|
|
508
|
-
"params": [],
|
|
509
|
-
"returns": null,
|
|
510
|
-
"example": null,
|
|
511
206
|
"category": "formatting",
|
|
512
207
|
"file": "utils/formatting/date.ts"
|
|
513
208
|
},
|
|
@@ -515,9 +210,6 @@
|
|
|
515
210
|
"name": "formatDistance",
|
|
516
211
|
"type": "constant",
|
|
517
212
|
"description": "Format distance according to DistanceFormat specification",
|
|
518
|
-
"params": [],
|
|
519
|
-
"returns": null,
|
|
520
|
-
"example": null,
|
|
521
213
|
"category": "formatting",
|
|
522
214
|
"file": "utils/formatting/distance.ts"
|
|
523
215
|
},
|
|
@@ -525,9 +217,6 @@
|
|
|
525
217
|
"name": "formatEnergy",
|
|
526
218
|
"type": "constant",
|
|
527
219
|
"description": "Format energy according to EnergyFormat specification",
|
|
528
|
-
"params": [],
|
|
529
|
-
"returns": null,
|
|
530
|
-
"example": null,
|
|
531
220
|
"category": "formatting",
|
|
532
221
|
"file": "utils/formatting/energy.ts"
|
|
533
222
|
},
|
|
@@ -535,9 +224,6 @@
|
|
|
535
224
|
"name": "formatFieldValue",
|
|
536
225
|
"type": "constant",
|
|
537
226
|
"description": "Main formatting function that routes to the appropriate formatter based on the format type ```typescript // Format as currency formatFieldValue(1234.56, { type: \"currency\", currency: \"USD\" }) // Returns: \"$1,234.56\" // Format as relative time formatFieldValue(new Date(), { type: \"date\", relative: true }) // Returns: \"just now\" // Format with custom formatter formatFieldValue(\"hello\", { type: \"custom\", formatter: (val) => String(val).toUpperCase() }) // Returns: \"HELLO\" ```",
|
|
538
|
-
"params": [],
|
|
539
|
-
"returns": null,
|
|
540
|
-
"example": "// Format as currency\nformatFieldValue(1234.56, { type: \"currency\", currency: \"USD\" })\n// Returns: \"$1,234.56\"\n\n// Format as relative time\nformatFieldValue(new Date(), { type: \"date\", relative: true })\n// Returns: \"just now\"\n\n// Format with custom formatter\nformatFieldValue(\"hello\", {\n type: \"custom\",\n formatter: (val) => String(val).toUpperCase()\n})\n// Returns: \"HELLO\"",
|
|
541
227
|
"category": "formatting",
|
|
542
228
|
"file": "utils/formatting/index.ts"
|
|
543
229
|
},
|
|
@@ -545,9 +231,6 @@
|
|
|
545
231
|
"name": "formatInternationalPhone",
|
|
546
232
|
"type": "constant",
|
|
547
233
|
"description": "Format international phone number",
|
|
548
|
-
"params": [],
|
|
549
|
-
"returns": null,
|
|
550
|
-
"example": null,
|
|
551
234
|
"category": "formatting",
|
|
552
235
|
"file": "utils/formatting/phone.ts"
|
|
553
236
|
},
|
|
@@ -555,9 +238,6 @@
|
|
|
555
238
|
"name": "formatNumber",
|
|
556
239
|
"type": "constant",
|
|
557
240
|
"description": "Format number according to NumberFormat specification",
|
|
558
|
-
"params": [],
|
|
559
|
-
"returns": null,
|
|
560
|
-
"example": null,
|
|
561
241
|
"category": "formatting",
|
|
562
242
|
"file": "utils/formatting/number.ts"
|
|
563
243
|
},
|
|
@@ -565,9 +245,6 @@
|
|
|
565
245
|
"name": "formatPhone",
|
|
566
246
|
"type": "constant",
|
|
567
247
|
"description": "Format phone according to PhoneFormat specification",
|
|
568
|
-
"params": [],
|
|
569
|
-
"returns": null,
|
|
570
|
-
"example": null,
|
|
571
248
|
"category": "formatting",
|
|
572
249
|
"file": "utils/formatting/phone.ts"
|
|
573
250
|
},
|
|
@@ -575,9 +252,6 @@
|
|
|
575
252
|
"name": "formatPhoneNumber",
|
|
576
253
|
"type": "constant",
|
|
577
254
|
"description": "Format phone number with basic formatting",
|
|
578
|
-
"params": [],
|
|
579
|
-
"returns": null,
|
|
580
|
-
"example": null,
|
|
581
255
|
"category": "formatting",
|
|
582
256
|
"file": "utils/formatting/phone.ts"
|
|
583
257
|
},
|
|
@@ -585,9 +259,6 @@
|
|
|
585
259
|
"name": "formatPower",
|
|
586
260
|
"type": "constant",
|
|
587
261
|
"description": "Format power according to PowerFormat specification",
|
|
588
|
-
"params": [],
|
|
589
|
-
"returns": null,
|
|
590
|
-
"example": null,
|
|
591
262
|
"category": "formatting",
|
|
592
263
|
"file": "utils/formatting/power.ts"
|
|
593
264
|
},
|
|
@@ -595,9 +266,6 @@
|
|
|
595
266
|
"name": "FormatRegistry",
|
|
596
267
|
"type": "constant",
|
|
597
268
|
"description": "",
|
|
598
|
-
"params": [],
|
|
599
|
-
"returns": null,
|
|
600
|
-
"example": null,
|
|
601
269
|
"category": "formatting",
|
|
602
270
|
"file": "utils/formatting/registry.ts"
|
|
603
271
|
},
|
|
@@ -605,45 +273,20 @@
|
|
|
605
273
|
"name": "formatResistance",
|
|
606
274
|
"type": "constant",
|
|
607
275
|
"description": "Format resistance according to ResistanceFormat specification",
|
|
608
|
-
"params": [],
|
|
609
|
-
"returns": null,
|
|
610
|
-
"example": null,
|
|
611
276
|
"category": "formatting",
|
|
612
277
|
"file": "utils/formatting/resistance.ts"
|
|
613
278
|
},
|
|
614
|
-
{
|
|
615
|
-
"name": "FormattedValue",
|
|
616
|
-
"type": "type",
|
|
617
|
-
"description": "",
|
|
618
|
-
"example": null,
|
|
619
|
-
"category": "formatting",
|
|
620
|
-
"file": "utils/formatting/types.ts"
|
|
621
|
-
},
|
|
622
279
|
{
|
|
623
280
|
"name": "formatTemperature",
|
|
624
281
|
"type": "constant",
|
|
625
282
|
"description": "Format temperature according to TemperatureFormat specification",
|
|
626
|
-
"params": [],
|
|
627
|
-
"returns": null,
|
|
628
|
-
"example": null,
|
|
629
283
|
"category": "formatting",
|
|
630
284
|
"file": "utils/formatting/temperature.ts"
|
|
631
285
|
},
|
|
632
|
-
{
|
|
633
|
-
"name": "FormatterFunction",
|
|
634
|
-
"type": "type",
|
|
635
|
-
"description": "",
|
|
636
|
-
"example": null,
|
|
637
|
-
"category": "formatting",
|
|
638
|
-
"file": "utils/formatting/types.ts"
|
|
639
|
-
},
|
|
640
286
|
{
|
|
641
287
|
"name": "formatText",
|
|
642
288
|
"type": "constant",
|
|
643
289
|
"description": "Format text according to TextFormat specification",
|
|
644
|
-
"params": [],
|
|
645
|
-
"returns": null,
|
|
646
|
-
"example": null,
|
|
647
290
|
"category": "formatting",
|
|
648
291
|
"file": "utils/formatting/text.ts"
|
|
649
292
|
},
|
|
@@ -651,9 +294,6 @@
|
|
|
651
294
|
"name": "formatUSPhone",
|
|
652
295
|
"type": "constant",
|
|
653
296
|
"description": "Format US phone number",
|
|
654
|
-
"params": [],
|
|
655
|
-
"returns": null,
|
|
656
|
-
"example": null,
|
|
657
297
|
"category": "formatting",
|
|
658
298
|
"file": "utils/formatting/phone.ts"
|
|
659
299
|
},
|
|
@@ -661,9 +301,6 @@
|
|
|
661
301
|
"name": "formatVoltage",
|
|
662
302
|
"type": "constant",
|
|
663
303
|
"description": "Format voltage according to VoltageFormat specification",
|
|
664
|
-
"params": [],
|
|
665
|
-
"returns": null,
|
|
666
|
-
"example": null,
|
|
667
304
|
"category": "formatting",
|
|
668
305
|
"file": "utils/formatting/voltage.ts"
|
|
669
306
|
},
|
|
@@ -671,9 +308,6 @@
|
|
|
671
308
|
"name": "getDateParts",
|
|
672
309
|
"type": "constant",
|
|
673
310
|
"description": "Get formatted date parts",
|
|
674
|
-
"params": [],
|
|
675
|
-
"returns": null,
|
|
676
|
-
"example": null,
|
|
677
311
|
"category": "formatting",
|
|
678
312
|
"file": "utils/formatting/date.ts"
|
|
679
313
|
},
|
|
@@ -681,9 +315,6 @@
|
|
|
681
315
|
"name": "inchesToCentimeters",
|
|
682
316
|
"type": "function",
|
|
683
317
|
"description": "",
|
|
684
|
-
"params": [],
|
|
685
|
-
"returns": null,
|
|
686
|
-
"example": null,
|
|
687
318
|
"category": "formatting",
|
|
688
319
|
"file": "utils/formatting/distance.ts"
|
|
689
320
|
},
|
|
@@ -691,9 +322,6 @@
|
|
|
691
322
|
"name": "isNil",
|
|
692
323
|
"type": "function",
|
|
693
324
|
"description": "Check if a value is null or undefined",
|
|
694
|
-
"params": [],
|
|
695
|
-
"returns": null,
|
|
696
|
-
"example": null,
|
|
697
325
|
"category": "formatting",
|
|
698
326
|
"file": "utils/formatting/number.ts"
|
|
699
327
|
},
|
|
@@ -701,9 +329,6 @@
|
|
|
701
329
|
"name": "kelvinToCelsius",
|
|
702
330
|
"type": "function",
|
|
703
331
|
"description": "Convert Kelvin to Celsius",
|
|
704
|
-
"params": [],
|
|
705
|
-
"returns": null,
|
|
706
|
-
"example": null,
|
|
707
332
|
"category": "formatting",
|
|
708
333
|
"file": "utils/formatting/temperature.ts"
|
|
709
334
|
},
|
|
@@ -711,9 +336,6 @@
|
|
|
711
336
|
"name": "kelvinToFahrenheit",
|
|
712
337
|
"type": "function",
|
|
713
338
|
"description": "Convert Kelvin to Fahrenheit",
|
|
714
|
-
"params": [],
|
|
715
|
-
"returns": null,
|
|
716
|
-
"example": null,
|
|
717
339
|
"category": "formatting",
|
|
718
340
|
"file": "utils/formatting/temperature.ts"
|
|
719
341
|
},
|
|
@@ -721,9 +343,6 @@
|
|
|
721
343
|
"name": "kilometersToMiles",
|
|
722
344
|
"type": "function",
|
|
723
345
|
"description": "",
|
|
724
|
-
"params": [],
|
|
725
|
-
"returns": null,
|
|
726
|
-
"example": null,
|
|
727
346
|
"category": "formatting",
|
|
728
347
|
"file": "utils/formatting/distance.ts"
|
|
729
348
|
},
|
|
@@ -731,9 +350,6 @@
|
|
|
731
350
|
"name": "metersToFeet",
|
|
732
351
|
"type": "function",
|
|
733
352
|
"description": "Conversion utilities",
|
|
734
|
-
"params": [],
|
|
735
|
-
"returns": null,
|
|
736
|
-
"example": null,
|
|
737
353
|
"category": "formatting",
|
|
738
354
|
"file": "utils/formatting/distance.ts"
|
|
739
355
|
},
|
|
@@ -741,9 +357,6 @@
|
|
|
741
357
|
"name": "metersToMiles",
|
|
742
358
|
"type": "function",
|
|
743
359
|
"description": "",
|
|
744
|
-
"params": [],
|
|
745
|
-
"returns": null,
|
|
746
|
-
"example": null,
|
|
747
360
|
"category": "formatting",
|
|
748
361
|
"file": "utils/formatting/distance.ts"
|
|
749
362
|
},
|
|
@@ -751,9 +364,6 @@
|
|
|
751
364
|
"name": "metersToYards",
|
|
752
365
|
"type": "function",
|
|
753
366
|
"description": "",
|
|
754
|
-
"params": [],
|
|
755
|
-
"returns": null,
|
|
756
|
-
"example": null,
|
|
757
367
|
"category": "formatting",
|
|
758
368
|
"file": "utils/formatting/distance.ts"
|
|
759
369
|
},
|
|
@@ -761,9 +371,6 @@
|
|
|
761
371
|
"name": "milesToFeet",
|
|
762
372
|
"type": "function",
|
|
763
373
|
"description": "",
|
|
764
|
-
"params": [],
|
|
765
|
-
"returns": null,
|
|
766
|
-
"example": null,
|
|
767
374
|
"category": "formatting",
|
|
768
375
|
"file": "utils/formatting/distance.ts"
|
|
769
376
|
},
|
|
@@ -771,9 +378,6 @@
|
|
|
771
378
|
"name": "milesToKilometers",
|
|
772
379
|
"type": "function",
|
|
773
380
|
"description": "",
|
|
774
|
-
"params": [],
|
|
775
|
-
"returns": null,
|
|
776
|
-
"example": null,
|
|
777
381
|
"category": "formatting",
|
|
778
382
|
"file": "utils/formatting/distance.ts"
|
|
779
383
|
},
|
|
@@ -781,145 +385,34 @@
|
|
|
781
385
|
"name": "milesToMeters",
|
|
782
386
|
"type": "function",
|
|
783
387
|
"description": "",
|
|
784
|
-
"params": [],
|
|
785
|
-
"returns": null,
|
|
786
|
-
"example": null,
|
|
787
388
|
"category": "formatting",
|
|
788
389
|
"file": "utils/formatting/distance.ts"
|
|
789
390
|
},
|
|
790
|
-
{
|
|
791
|
-
"name": "NumberFormat",
|
|
792
|
-
"type": "type",
|
|
793
|
-
"description": "",
|
|
794
|
-
"example": null,
|
|
795
|
-
"category": "formatting",
|
|
796
|
-
"file": "utils/formatting/types.ts"
|
|
797
|
-
},
|
|
798
391
|
{
|
|
799
392
|
"name": "parseBoolean",
|
|
800
393
|
"type": "function",
|
|
801
394
|
"description": "Parse various truthy/falsy values to boolean",
|
|
802
|
-
"params": [],
|
|
803
|
-
"returns": null,
|
|
804
|
-
"example": null,
|
|
805
395
|
"category": "formatting",
|
|
806
396
|
"file": "utils/formatting/boolean.ts"
|
|
807
397
|
},
|
|
808
|
-
{
|
|
809
|
-
"name": "PhoneFormat",
|
|
810
|
-
"type": "type",
|
|
811
|
-
"description": "",
|
|
812
|
-
"example": null,
|
|
813
|
-
"category": "formatting",
|
|
814
|
-
"file": "utils/formatting/types.ts"
|
|
815
|
-
},
|
|
816
|
-
{
|
|
817
|
-
"name": "PowerFormat",
|
|
818
|
-
"type": "type",
|
|
819
|
-
"description": "",
|
|
820
|
-
"example": null,
|
|
821
|
-
"category": "formatting",
|
|
822
|
-
"file": "utils/formatting/types.ts"
|
|
823
|
-
},
|
|
824
|
-
{
|
|
825
|
-
"name": "PowerUnit",
|
|
826
|
-
"type": "type",
|
|
827
|
-
"description": "",
|
|
828
|
-
"example": null,
|
|
829
|
-
"category": "formatting",
|
|
830
|
-
"file": "utils/formatting/types.ts"
|
|
831
|
-
},
|
|
832
|
-
{
|
|
833
|
-
"name": "ResistanceFormat",
|
|
834
|
-
"type": "type",
|
|
835
|
-
"description": "",
|
|
836
|
-
"example": null,
|
|
837
|
-
"category": "formatting",
|
|
838
|
-
"file": "utils/formatting/types.ts"
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
"name": "ResistanceUnit",
|
|
842
|
-
"type": "type",
|
|
843
|
-
"description": "",
|
|
844
|
-
"example": null,
|
|
845
|
-
"category": "formatting",
|
|
846
|
-
"file": "utils/formatting/types.ts"
|
|
847
|
-
},
|
|
848
398
|
{
|
|
849
399
|
"name": "snakeCaseToWords",
|
|
850
400
|
"type": "function",
|
|
851
401
|
"description": "Convert snake_case to words",
|
|
852
|
-
"params": [],
|
|
853
|
-
"returns": null,
|
|
854
|
-
"example": null,
|
|
855
402
|
"category": "formatting",
|
|
856
403
|
"file": "utils/formatting/text.ts"
|
|
857
404
|
},
|
|
858
|
-
{
|
|
859
|
-
"name": "TemperatureFormat",
|
|
860
|
-
"type": "type",
|
|
861
|
-
"description": "",
|
|
862
|
-
"example": null,
|
|
863
|
-
"category": "formatting",
|
|
864
|
-
"file": "utils/formatting/types.ts"
|
|
865
|
-
},
|
|
866
405
|
{
|
|
867
406
|
"name": "temperatureStringToSymbol",
|
|
868
407
|
"type": "function",
|
|
869
408
|
"description": "Convert temperature unit string to symbol",
|
|
870
|
-
"params": [],
|
|
871
|
-
"returns": null,
|
|
872
|
-
"example": null,
|
|
873
409
|
"category": "formatting",
|
|
874
410
|
"file": "utils/formatting/temperature.ts"
|
|
875
411
|
},
|
|
876
|
-
{
|
|
877
|
-
"name": "TemperatureUnit",
|
|
878
|
-
"type": "type",
|
|
879
|
-
"description": "",
|
|
880
|
-
"example": null,
|
|
881
|
-
"category": "formatting",
|
|
882
|
-
"file": "utils/formatting/types.ts"
|
|
883
|
-
},
|
|
884
|
-
{
|
|
885
|
-
"name": "TemperatureUnitString",
|
|
886
|
-
"type": "type",
|
|
887
|
-
"description": "",
|
|
888
|
-
"example": null,
|
|
889
|
-
"category": "formatting",
|
|
890
|
-
"file": "utils/formatting/types.ts"
|
|
891
|
-
},
|
|
892
|
-
{
|
|
893
|
-
"name": "TextFormat",
|
|
894
|
-
"type": "type",
|
|
895
|
-
"description": "",
|
|
896
|
-
"example": null,
|
|
897
|
-
"category": "formatting",
|
|
898
|
-
"file": "utils/formatting/types.ts"
|
|
899
|
-
},
|
|
900
|
-
{
|
|
901
|
-
"name": "TextTransform",
|
|
902
|
-
"type": "type",
|
|
903
|
-
"description": "",
|
|
904
|
-
"example": null,
|
|
905
|
-
"category": "formatting",
|
|
906
|
-
"file": "utils/formatting/types.ts"
|
|
907
|
-
},
|
|
908
|
-
{
|
|
909
|
-
"name": "TextTruncatePosition",
|
|
910
|
-
"type": "type",
|
|
911
|
-
"description": "",
|
|
912
|
-
"example": null,
|
|
913
|
-
"category": "formatting",
|
|
914
|
-
"file": "utils/formatting/types.ts"
|
|
915
|
-
},
|
|
916
412
|
{
|
|
917
413
|
"name": "toA",
|
|
918
414
|
"type": "constant",
|
|
919
415
|
"description": "",
|
|
920
|
-
"params": [],
|
|
921
|
-
"returns": null,
|
|
922
|
-
"example": null,
|
|
923
416
|
"category": "formatting",
|
|
924
417
|
"file": "utils/formatting/current.ts"
|
|
925
418
|
},
|
|
@@ -927,9 +420,6 @@
|
|
|
927
420
|
"name": "toActiveInactive",
|
|
928
421
|
"type": "constant",
|
|
929
422
|
"description": "Format boolean as active/inactive",
|
|
930
|
-
"params": [],
|
|
931
|
-
"returns": null,
|
|
932
|
-
"example": null,
|
|
933
423
|
"category": "formatting",
|
|
934
424
|
"file": "utils/formatting/boolean.ts"
|
|
935
425
|
},
|
|
@@ -937,9 +427,6 @@
|
|
|
937
427
|
"name": "toAmps",
|
|
938
428
|
"type": "constant",
|
|
939
429
|
"description": "Format as amperes",
|
|
940
|
-
"params": [],
|
|
941
|
-
"returns": null,
|
|
942
|
-
"example": null,
|
|
943
430
|
"category": "formatting",
|
|
944
431
|
"file": "utils/formatting/current.ts"
|
|
945
432
|
},
|
|
@@ -947,9 +434,6 @@
|
|
|
947
434
|
"name": "toBoolean",
|
|
948
435
|
"type": "constant",
|
|
949
436
|
"description": "Format boolean value with custom text",
|
|
950
|
-
"params": [],
|
|
951
|
-
"returns": null,
|
|
952
|
-
"example": null,
|
|
953
437
|
"category": "formatting",
|
|
954
438
|
"file": "utils/formatting/boolean.ts"
|
|
955
439
|
},
|
|
@@ -957,9 +441,6 @@
|
|
|
957
441
|
"name": "toCelsius",
|
|
958
442
|
"type": "constant",
|
|
959
443
|
"description": "Format as Celsius",
|
|
960
|
-
"params": [],
|
|
961
|
-
"returns": null,
|
|
962
|
-
"example": null,
|
|
963
444
|
"category": "formatting",
|
|
964
445
|
"file": "utils/formatting/temperature.ts"
|
|
965
446
|
},
|
|
@@ -967,9 +448,6 @@
|
|
|
967
448
|
"name": "toCentimeters",
|
|
968
449
|
"type": "constant",
|
|
969
450
|
"description": "Format as centimeters",
|
|
970
|
-
"params": [],
|
|
971
|
-
"returns": null,
|
|
972
|
-
"example": null,
|
|
973
451
|
"category": "formatting",
|
|
974
452
|
"file": "utils/formatting/distance.ts"
|
|
975
453
|
},
|
|
@@ -977,9 +455,6 @@
|
|
|
977
455
|
"name": "toCheckmark",
|
|
978
456
|
"type": "constant",
|
|
979
457
|
"description": "Format boolean as checkmark/cross",
|
|
980
|
-
"params": [],
|
|
981
|
-
"returns": null,
|
|
982
|
-
"example": null,
|
|
983
458
|
"category": "formatting",
|
|
984
459
|
"file": "utils/formatting/boolean.ts"
|
|
985
460
|
},
|
|
@@ -987,9 +462,6 @@
|
|
|
987
462
|
"name": "toCompactNumber",
|
|
988
463
|
"type": "constant",
|
|
989
464
|
"description": "Format number with compact notation (1K, 1M, etc.)",
|
|
990
|
-
"params": [],
|
|
991
|
-
"returns": null,
|
|
992
|
-
"example": null,
|
|
993
465
|
"category": "formatting",
|
|
994
466
|
"file": "utils/formatting/number.ts"
|
|
995
467
|
},
|
|
@@ -997,9 +469,6 @@
|
|
|
997
469
|
"name": "toCurrency",
|
|
998
470
|
"type": "constant",
|
|
999
471
|
"description": "Format as currency",
|
|
1000
|
-
"params": [],
|
|
1001
|
-
"returns": null,
|
|
1002
|
-
"example": null,
|
|
1003
472
|
"category": "formatting",
|
|
1004
473
|
"file": "utils/formatting/number.ts"
|
|
1005
474
|
},
|
|
@@ -1007,9 +476,6 @@
|
|
|
1007
476
|
"name": "toCustomDateFormat",
|
|
1008
477
|
"type": "constant",
|
|
1009
478
|
"description": "Format date with custom format string",
|
|
1010
|
-
"params": [],
|
|
1011
|
-
"returns": null,
|
|
1012
|
-
"example": null,
|
|
1013
479
|
"category": "formatting",
|
|
1014
480
|
"file": "utils/formatting/date.ts"
|
|
1015
481
|
},
|
|
@@ -1017,9 +483,6 @@
|
|
|
1017
483
|
"name": "toDateString",
|
|
1018
484
|
"type": "constant",
|
|
1019
485
|
"description": "Format date to a localized string with optional time and timezone. ```typescript toDateString(new Date()); // \"12/25/2023\" toDateString(new Date(), true); // \"12/25/2023, 3:30 PM\" toDateString(\"2023-12-25T15:30:00Z\", true, \"America/New_York\"); // \"12/25/2023, 10:30 AM\" ```",
|
|
1020
|
-
"params": [],
|
|
1021
|
-
"returns": null,
|
|
1022
|
-
"example": "toDateString(new Date()); // \"12/25/2023\"\ntoDateString(new Date(), true); // \"12/25/2023, 3:30 PM\"\ntoDateString(\"2023-12-25T15:30:00Z\", true, \"America/New_York\"); // \"12/25/2023, 10:30 AM\"",
|
|
1023
486
|
"category": "formatting",
|
|
1024
487
|
"file": "utils/formatting/date.ts"
|
|
1025
488
|
},
|
|
@@ -1027,9 +490,6 @@
|
|
|
1027
490
|
"name": "toEnabledDisabled",
|
|
1028
491
|
"type": "constant",
|
|
1029
492
|
"description": "Format boolean as enabled/disabled",
|
|
1030
|
-
"params": [],
|
|
1031
|
-
"returns": null,
|
|
1032
|
-
"example": null,
|
|
1033
493
|
"category": "formatting",
|
|
1034
494
|
"file": "utils/formatting/boolean.ts"
|
|
1035
495
|
},
|
|
@@ -1037,9 +497,6 @@
|
|
|
1037
497
|
"name": "toFahrenheit",
|
|
1038
498
|
"type": "constant",
|
|
1039
499
|
"description": "Format as Fahrenheit",
|
|
1040
|
-
"params": [],
|
|
1041
|
-
"returns": null,
|
|
1042
|
-
"example": null,
|
|
1043
500
|
"category": "formatting",
|
|
1044
501
|
"file": "utils/formatting/temperature.ts"
|
|
1045
502
|
},
|
|
@@ -1047,9 +504,6 @@
|
|
|
1047
504
|
"name": "toFeet",
|
|
1048
505
|
"type": "constant",
|
|
1049
506
|
"description": "Format as feet",
|
|
1050
|
-
"params": [],
|
|
1051
|
-
"returns": null,
|
|
1052
|
-
"example": null,
|
|
1053
507
|
"category": "formatting",
|
|
1054
508
|
"file": "utils/formatting/distance.ts"
|
|
1055
509
|
},
|
|
@@ -1057,9 +511,6 @@
|
|
|
1057
511
|
"name": "toFloat",
|
|
1058
512
|
"type": "constant",
|
|
1059
513
|
"description": "Format as float with specified decimals",
|
|
1060
|
-
"params": [],
|
|
1061
|
-
"returns": null,
|
|
1062
|
-
"example": null,
|
|
1063
514
|
"category": "formatting",
|
|
1064
515
|
"file": "utils/formatting/number.ts"
|
|
1065
516
|
},
|
|
@@ -1067,9 +518,6 @@
|
|
|
1067
518
|
"name": "toFormattedNumber",
|
|
1068
519
|
"type": "constant",
|
|
1069
520
|
"description": "Format number with thousands separator",
|
|
1070
|
-
"params": [],
|
|
1071
|
-
"returns": null,
|
|
1072
|
-
"example": null,
|
|
1073
521
|
"category": "formatting",
|
|
1074
522
|
"file": "utils/formatting/number.ts"
|
|
1075
523
|
},
|
|
@@ -1077,9 +525,6 @@
|
|
|
1077
525
|
"name": "toFullDateTime",
|
|
1078
526
|
"type": "constant",
|
|
1079
527
|
"description": "Format date with full date and time including weekday",
|
|
1080
|
-
"params": [],
|
|
1081
|
-
"returns": null,
|
|
1082
|
-
"example": null,
|
|
1083
528
|
"category": "formatting",
|
|
1084
529
|
"file": "utils/formatting/date.ts"
|
|
1085
530
|
},
|
|
@@ -1087,9 +532,6 @@
|
|
|
1087
532
|
"name": "toGigawatts",
|
|
1088
533
|
"type": "constant",
|
|
1089
534
|
"description": "Format as gigawatts",
|
|
1090
|
-
"params": [],
|
|
1091
|
-
"returns": null,
|
|
1092
|
-
"example": null,
|
|
1093
535
|
"category": "formatting",
|
|
1094
536
|
"file": "utils/formatting/power.ts"
|
|
1095
537
|
},
|
|
@@ -1097,9 +539,6 @@
|
|
|
1097
539
|
"name": "toGW",
|
|
1098
540
|
"type": "constant",
|
|
1099
541
|
"description": "",
|
|
1100
|
-
"params": [],
|
|
1101
|
-
"returns": null,
|
|
1102
|
-
"example": null,
|
|
1103
542
|
"category": "formatting",
|
|
1104
543
|
"file": "utils/formatting/power.ts"
|
|
1105
544
|
},
|
|
@@ -1107,9 +546,6 @@
|
|
|
1107
546
|
"name": "toGWh",
|
|
1108
547
|
"type": "constant",
|
|
1109
548
|
"description": "Format as gigawatt-hours",
|
|
1110
|
-
"params": [],
|
|
1111
|
-
"returns": null,
|
|
1112
|
-
"example": null,
|
|
1113
549
|
"category": "formatting",
|
|
1114
550
|
"file": "utils/formatting/energy.ts"
|
|
1115
551
|
},
|
|
@@ -1117,9 +553,6 @@
|
|
|
1117
553
|
"name": "toInches",
|
|
1118
554
|
"type": "constant",
|
|
1119
555
|
"description": "Format as inches",
|
|
1120
|
-
"params": [],
|
|
1121
|
-
"returns": null,
|
|
1122
|
-
"example": null,
|
|
1123
556
|
"category": "formatting",
|
|
1124
557
|
"file": "utils/formatting/distance.ts"
|
|
1125
558
|
},
|
|
@@ -1127,9 +560,6 @@
|
|
|
1127
560
|
"name": "toInteger",
|
|
1128
561
|
"type": "constant",
|
|
1129
562
|
"description": "Format as integer",
|
|
1130
|
-
"params": [],
|
|
1131
|
-
"returns": null,
|
|
1132
|
-
"example": null,
|
|
1133
563
|
"category": "formatting",
|
|
1134
564
|
"file": "utils/formatting/number.ts"
|
|
1135
565
|
},
|
|
@@ -1137,9 +567,6 @@
|
|
|
1137
567
|
"name": "toISOString",
|
|
1138
568
|
"type": "constant",
|
|
1139
569
|
"description": "Format date to ISO string",
|
|
1140
|
-
"params": [],
|
|
1141
|
-
"returns": null,
|
|
1142
|
-
"example": null,
|
|
1143
570
|
"category": "formatting",
|
|
1144
571
|
"file": "utils/formatting/date.ts"
|
|
1145
572
|
},
|
|
@@ -1147,9 +574,6 @@
|
|
|
1147
574
|
"name": "toKA",
|
|
1148
575
|
"type": "constant",
|
|
1149
576
|
"description": "",
|
|
1150
|
-
"params": [],
|
|
1151
|
-
"returns": null,
|
|
1152
|
-
"example": null,
|
|
1153
577
|
"category": "formatting",
|
|
1154
578
|
"file": "utils/formatting/current.ts"
|
|
1155
579
|
},
|
|
@@ -1157,9 +581,6 @@
|
|
|
1157
581
|
"name": "toKelvin",
|
|
1158
582
|
"type": "constant",
|
|
1159
583
|
"description": "Format as Kelvin",
|
|
1160
|
-
"params": [],
|
|
1161
|
-
"returns": null,
|
|
1162
|
-
"example": null,
|
|
1163
584
|
"category": "formatting",
|
|
1164
585
|
"file": "utils/formatting/temperature.ts"
|
|
1165
586
|
},
|
|
@@ -1167,9 +588,6 @@
|
|
|
1167
588
|
"name": "toKiloamps",
|
|
1168
589
|
"type": "constant",
|
|
1169
590
|
"description": "Format as kiloamps (rarely used but included for completeness)",
|
|
1170
|
-
"params": [],
|
|
1171
|
-
"returns": null,
|
|
1172
|
-
"example": null,
|
|
1173
591
|
"category": "formatting",
|
|
1174
592
|
"file": "utils/formatting/current.ts"
|
|
1175
593
|
},
|
|
@@ -1177,9 +595,6 @@
|
|
|
1177
595
|
"name": "toKilohms",
|
|
1178
596
|
"type": "constant",
|
|
1179
597
|
"description": "Format as kilohms",
|
|
1180
|
-
"params": [],
|
|
1181
|
-
"returns": null,
|
|
1182
|
-
"example": null,
|
|
1183
598
|
"category": "formatting",
|
|
1184
599
|
"file": "utils/formatting/resistance.ts"
|
|
1185
600
|
},
|
|
@@ -1187,9 +602,6 @@
|
|
|
1187
602
|
"name": "toKilometers",
|
|
1188
603
|
"type": "constant",
|
|
1189
604
|
"description": "Format as kilometers",
|
|
1190
|
-
"params": [],
|
|
1191
|
-
"returns": null,
|
|
1192
|
-
"example": null,
|
|
1193
605
|
"category": "formatting",
|
|
1194
606
|
"file": "utils/formatting/distance.ts"
|
|
1195
607
|
},
|
|
@@ -1197,9 +609,6 @@
|
|
|
1197
609
|
"name": "toKilovolts",
|
|
1198
610
|
"type": "constant",
|
|
1199
611
|
"description": "Format as kilovolts",
|
|
1200
|
-
"params": [],
|
|
1201
|
-
"returns": null,
|
|
1202
|
-
"example": null,
|
|
1203
612
|
"category": "formatting",
|
|
1204
613
|
"file": "utils/formatting/voltage.ts"
|
|
1205
614
|
},
|
|
@@ -1207,9 +616,6 @@
|
|
|
1207
616
|
"name": "toKilowatts",
|
|
1208
617
|
"type": "constant",
|
|
1209
618
|
"description": "Format as kilowatts",
|
|
1210
|
-
"params": [],
|
|
1211
|
-
"returns": null,
|
|
1212
|
-
"example": null,
|
|
1213
619
|
"category": "formatting",
|
|
1214
620
|
"file": "utils/formatting/power.ts"
|
|
1215
621
|
},
|
|
@@ -1217,9 +623,6 @@
|
|
|
1217
623
|
"name": "toKV",
|
|
1218
624
|
"type": "constant",
|
|
1219
625
|
"description": "",
|
|
1220
|
-
"params": [],
|
|
1221
|
-
"returns": null,
|
|
1222
|
-
"example": null,
|
|
1223
626
|
"category": "formatting",
|
|
1224
627
|
"file": "utils/formatting/voltage.ts"
|
|
1225
628
|
},
|
|
@@ -1227,9 +630,6 @@
|
|
|
1227
630
|
"name": "toKW",
|
|
1228
631
|
"type": "constant",
|
|
1229
632
|
"description": "",
|
|
1230
|
-
"params": [],
|
|
1231
|
-
"returns": null,
|
|
1232
|
-
"example": null,
|
|
1233
633
|
"category": "formatting",
|
|
1234
634
|
"file": "utils/formatting/power.ts"
|
|
1235
635
|
},
|
|
@@ -1237,9 +637,6 @@
|
|
|
1237
637
|
"name": "tokWh",
|
|
1238
638
|
"type": "constant",
|
|
1239
639
|
"description": "Format as kilowatt-hours",
|
|
1240
|
-
"params": [],
|
|
1241
|
-
"returns": null,
|
|
1242
|
-
"example": null,
|
|
1243
640
|
"category": "formatting",
|
|
1244
641
|
"file": "utils/formatting/energy.ts"
|
|
1245
642
|
},
|
|
@@ -1247,9 +644,6 @@
|
|
|
1247
644
|
"name": "toLowerCase",
|
|
1248
645
|
"type": "function",
|
|
1249
646
|
"description": "Convert text to lowercase",
|
|
1250
|
-
"params": [],
|
|
1251
|
-
"returns": null,
|
|
1252
|
-
"example": null,
|
|
1253
647
|
"category": "formatting",
|
|
1254
648
|
"file": "utils/formatting/text.ts"
|
|
1255
649
|
},
|
|
@@ -1257,9 +651,6 @@
|
|
|
1257
651
|
"name": "toMA",
|
|
1258
652
|
"type": "constant",
|
|
1259
653
|
"description": "",
|
|
1260
|
-
"params": [],
|
|
1261
|
-
"returns": null,
|
|
1262
|
-
"example": null,
|
|
1263
654
|
"category": "formatting",
|
|
1264
655
|
"file": "utils/formatting/current.ts"
|
|
1265
656
|
},
|
|
@@ -1267,9 +658,6 @@
|
|
|
1267
658
|
"name": "toMegawatts",
|
|
1268
659
|
"type": "constant",
|
|
1269
660
|
"description": "Format as megawatts",
|
|
1270
|
-
"params": [],
|
|
1271
|
-
"returns": null,
|
|
1272
|
-
"example": null,
|
|
1273
661
|
"category": "formatting",
|
|
1274
662
|
"file": "utils/formatting/power.ts"
|
|
1275
663
|
},
|
|
@@ -1277,9 +665,6 @@
|
|
|
1277
665
|
"name": "toMegohms",
|
|
1278
666
|
"type": "constant",
|
|
1279
667
|
"description": "Format as megohms",
|
|
1280
|
-
"params": [],
|
|
1281
|
-
"returns": null,
|
|
1282
|
-
"example": null,
|
|
1283
668
|
"category": "formatting",
|
|
1284
669
|
"file": "utils/formatting/resistance.ts"
|
|
1285
670
|
},
|
|
@@ -1287,9 +672,6 @@
|
|
|
1287
672
|
"name": "toMeters",
|
|
1288
673
|
"type": "constant",
|
|
1289
674
|
"description": "Format as meters",
|
|
1290
|
-
"params": [],
|
|
1291
|
-
"returns": null,
|
|
1292
|
-
"example": null,
|
|
1293
675
|
"category": "formatting",
|
|
1294
676
|
"file": "utils/formatting/distance.ts"
|
|
1295
677
|
},
|
|
@@ -1297,9 +679,6 @@
|
|
|
1297
679
|
"name": "toMiles",
|
|
1298
680
|
"type": "constant",
|
|
1299
681
|
"description": "Format as miles",
|
|
1300
|
-
"params": [],
|
|
1301
|
-
"returns": null,
|
|
1302
|
-
"example": null,
|
|
1303
682
|
"category": "formatting",
|
|
1304
683
|
"file": "utils/formatting/distance.ts"
|
|
1305
684
|
},
|
|
@@ -1307,9 +686,6 @@
|
|
|
1307
686
|
"name": "toMilliamps",
|
|
1308
687
|
"type": "constant",
|
|
1309
688
|
"description": "Format as milliamps",
|
|
1310
|
-
"params": [],
|
|
1311
|
-
"returns": null,
|
|
1312
|
-
"example": null,
|
|
1313
689
|
"category": "formatting",
|
|
1314
690
|
"file": "utils/formatting/current.ts"
|
|
1315
691
|
},
|
|
@@ -1317,9 +693,6 @@
|
|
|
1317
693
|
"name": "toMillimeters",
|
|
1318
694
|
"type": "constant",
|
|
1319
695
|
"description": "Format as millimeters",
|
|
1320
|
-
"params": [],
|
|
1321
|
-
"returns": null,
|
|
1322
|
-
"example": null,
|
|
1323
696
|
"category": "formatting",
|
|
1324
697
|
"file": "utils/formatting/distance.ts"
|
|
1325
698
|
},
|
|
@@ -1327,9 +700,6 @@
|
|
|
1327
700
|
"name": "toMilliohms",
|
|
1328
701
|
"type": "constant",
|
|
1329
702
|
"description": "Format as milliohms",
|
|
1330
|
-
"params": [],
|
|
1331
|
-
"returns": null,
|
|
1332
|
-
"example": null,
|
|
1333
703
|
"category": "formatting",
|
|
1334
704
|
"file": "utils/formatting/resistance.ts"
|
|
1335
705
|
},
|
|
@@ -1337,9 +707,6 @@
|
|
|
1337
707
|
"name": "toMillivolts",
|
|
1338
708
|
"type": "constant",
|
|
1339
709
|
"description": "Format as millivolts",
|
|
1340
|
-
"params": [],
|
|
1341
|
-
"returns": null,
|
|
1342
|
-
"example": null,
|
|
1343
710
|
"category": "formatting",
|
|
1344
711
|
"file": "utils/formatting/voltage.ts"
|
|
1345
712
|
},
|
|
@@ -1347,9 +714,6 @@
|
|
|
1347
714
|
"name": "toMV",
|
|
1348
715
|
"type": "constant",
|
|
1349
716
|
"description": "",
|
|
1350
|
-
"params": [],
|
|
1351
|
-
"returns": null,
|
|
1352
|
-
"example": null,
|
|
1353
717
|
"category": "formatting",
|
|
1354
718
|
"file": "utils/formatting/voltage.ts"
|
|
1355
719
|
},
|
|
@@ -1357,9 +721,6 @@
|
|
|
1357
721
|
"name": "toMW",
|
|
1358
722
|
"type": "constant",
|
|
1359
723
|
"description": "",
|
|
1360
|
-
"params": [],
|
|
1361
|
-
"returns": null,
|
|
1362
|
-
"example": null,
|
|
1363
724
|
"category": "formatting",
|
|
1364
725
|
"file": "utils/formatting/power.ts"
|
|
1365
726
|
},
|
|
@@ -1367,9 +728,6 @@
|
|
|
1367
728
|
"name": "toMWh",
|
|
1368
729
|
"type": "constant",
|
|
1369
730
|
"description": "Format as megawatt-hours",
|
|
1370
|
-
"params": [],
|
|
1371
|
-
"returns": null,
|
|
1372
|
-
"example": null,
|
|
1373
731
|
"category": "formatting",
|
|
1374
732
|
"file": "utils/formatting/energy.ts"
|
|
1375
733
|
},
|
|
@@ -1377,9 +735,6 @@
|
|
|
1377
735
|
"name": "toNauticalMiles",
|
|
1378
736
|
"type": "constant",
|
|
1379
737
|
"description": "Format as nautical miles",
|
|
1380
|
-
"params": [],
|
|
1381
|
-
"returns": null,
|
|
1382
|
-
"example": null,
|
|
1383
738
|
"category": "formatting",
|
|
1384
739
|
"file": "utils/formatting/distance.ts"
|
|
1385
740
|
},
|
|
@@ -1387,9 +742,6 @@
|
|
|
1387
742
|
"name": "toOhms",
|
|
1388
743
|
"type": "constant",
|
|
1389
744
|
"description": "Format as ohms",
|
|
1390
|
-
"params": [],
|
|
1391
|
-
"returns": null,
|
|
1392
|
-
"example": null,
|
|
1393
745
|
"category": "formatting",
|
|
1394
746
|
"file": "utils/formatting/resistance.ts"
|
|
1395
747
|
},
|
|
@@ -1397,9 +749,6 @@
|
|
|
1397
749
|
"name": "toOnOff",
|
|
1398
750
|
"type": "constant",
|
|
1399
751
|
"description": "Format boolean as on/off",
|
|
1400
|
-
"params": [],
|
|
1401
|
-
"returns": null,
|
|
1402
|
-
"example": null,
|
|
1403
752
|
"category": "formatting",
|
|
1404
753
|
"file": "utils/formatting/boolean.ts"
|
|
1405
754
|
},
|
|
@@ -1407,9 +756,6 @@
|
|
|
1407
756
|
"name": "toPercentage",
|
|
1408
757
|
"type": "constant",
|
|
1409
758
|
"description": "Format as percentage",
|
|
1410
|
-
"params": [],
|
|
1411
|
-
"returns": null,
|
|
1412
|
-
"example": null,
|
|
1413
759
|
"category": "formatting",
|
|
1414
760
|
"file": "utils/formatting/number.ts"
|
|
1415
761
|
},
|
|
@@ -1417,9 +763,6 @@
|
|
|
1417
763
|
"name": "toRelativeTime",
|
|
1418
764
|
"type": "constant",
|
|
1419
765
|
"description": "Format date to relative time (e.g., \"2 hours ago\", \"in 3 days\"). Automatically chooses the most appropriate unit. ```typescript toRelativeTime(new Date(Date.now() - 3600000)); // \"1 hour ago\" toRelativeTime(new Date(Date.now() + 86400000)); // \"in 1 day\" toRelativeTime(new Date()); // \"now\" ```",
|
|
1420
|
-
"params": [],
|
|
1421
|
-
"returns": null,
|
|
1422
|
-
"example": "toRelativeTime(new Date(Date.now() - 3600000)); // \"1 hour ago\"\ntoRelativeTime(new Date(Date.now() + 86400000)); // \"in 1 day\"\ntoRelativeTime(new Date()); // \"now\"",
|
|
1423
766
|
"category": "formatting",
|
|
1424
767
|
"file": "utils/formatting/date.ts"
|
|
1425
768
|
},
|
|
@@ -1427,9 +770,6 @@
|
|
|
1427
770
|
"name": "toScientificNotation",
|
|
1428
771
|
"type": "constant",
|
|
1429
772
|
"description": "Format number with scientific notation",
|
|
1430
|
-
"params": [],
|
|
1431
|
-
"returns": null,
|
|
1432
|
-
"example": null,
|
|
1433
773
|
"category": "formatting",
|
|
1434
774
|
"file": "utils/formatting/number.ts"
|
|
1435
775
|
},
|
|
@@ -1437,9 +777,6 @@
|
|
|
1437
777
|
"name": "toSecret",
|
|
1438
778
|
"type": "function",
|
|
1439
779
|
"description": "Mask sensitive text (e.g., secrets, API keys)",
|
|
1440
|
-
"params": [],
|
|
1441
|
-
"returns": null,
|
|
1442
|
-
"example": null,
|
|
1443
780
|
"category": "formatting",
|
|
1444
781
|
"file": "utils/formatting/text.ts"
|
|
1445
782
|
},
|
|
@@ -1447,18 +784,6 @@
|
|
|
1447
784
|
"name": "toSentenceCase",
|
|
1448
785
|
"type": "function",
|
|
1449
786
|
"description": "Convert text to sentence case (first letter capitalized, rest lowercase). ```typescript toSentenceCase(\"HELLO WORLD\"); // \"Hello world\" toSentenceCase(\"hello world\"); // \"Hello world\" ```",
|
|
1450
|
-
"params": [
|
|
1451
|
-
{
|
|
1452
|
-
"name": "text",
|
|
1453
|
-
"type": "unknown",
|
|
1454
|
-
"description": "Text to convert"
|
|
1455
|
-
}
|
|
1456
|
-
],
|
|
1457
|
-
"returns": {
|
|
1458
|
-
"type": "unknown",
|
|
1459
|
-
"description": "Sentence-cased text"
|
|
1460
|
-
},
|
|
1461
|
-
"example": "toSentenceCase(\"HELLO WORLD\"); // \"Hello world\"\ntoSentenceCase(\"hello world\"); // \"Hello world\"",
|
|
1462
787
|
"category": "formatting",
|
|
1463
788
|
"file": "utils/formatting/text.ts"
|
|
1464
789
|
},
|
|
@@ -1466,9 +791,6 @@
|
|
|
1466
791
|
"name": "toTemperature",
|
|
1467
792
|
"type": "constant",
|
|
1468
793
|
"description": "Format temperature with specified unit",
|
|
1469
|
-
"params": [],
|
|
1470
|
-
"returns": null,
|
|
1471
|
-
"example": null,
|
|
1472
794
|
"category": "formatting",
|
|
1473
795
|
"file": "utils/formatting/temperature.ts"
|
|
1474
796
|
},
|
|
@@ -1476,18 +798,6 @@
|
|
|
1476
798
|
"name": "toTitleCase",
|
|
1477
799
|
"type": "function",
|
|
1478
800
|
"description": "Convert text to title case with proper handling of articles and prepositions. Capitalizes the first letter of each word except common articles/prepositions (unless they're the first word). ```typescript toTitleCase(\"the quick brown fox\"); // \"The Quick Brown Fox\" toTitleCase(\"war and peace\"); // \"War and Peace\" toTitleCase(\"to be or not to be\"); // \"To Be or Not to Be\" ```",
|
|
1479
|
-
"params": [
|
|
1480
|
-
{
|
|
1481
|
-
"name": "text",
|
|
1482
|
-
"type": "unknown",
|
|
1483
|
-
"description": "Text to convert"
|
|
1484
|
-
}
|
|
1485
|
-
],
|
|
1486
|
-
"returns": {
|
|
1487
|
-
"type": "unknown",
|
|
1488
|
-
"description": "Title-cased text"
|
|
1489
|
-
},
|
|
1490
|
-
"example": "toTitleCase(\"the quick brown fox\"); // \"The Quick Brown Fox\"\ntoTitleCase(\"war and peace\"); // \"War and Peace\"\ntoTitleCase(\"to be or not to be\"); // \"To Be or Not to Be\"",
|
|
1491
801
|
"category": "formatting",
|
|
1492
802
|
"file": "utils/formatting/text.ts"
|
|
1493
803
|
},
|
|
@@ -1495,9 +805,6 @@
|
|
|
1495
805
|
"name": "toTrueFalse",
|
|
1496
806
|
"type": "constant",
|
|
1497
807
|
"description": "Format boolean as true/false",
|
|
1498
|
-
"params": [],
|
|
1499
|
-
"returns": null,
|
|
1500
|
-
"example": null,
|
|
1501
808
|
"category": "formatting",
|
|
1502
809
|
"file": "utils/formatting/boolean.ts"
|
|
1503
810
|
},
|
|
@@ -1505,9 +812,6 @@
|
|
|
1505
812
|
"name": "toUpperCase",
|
|
1506
813
|
"type": "function",
|
|
1507
814
|
"description": "Convert text to uppercase",
|
|
1508
|
-
"params": [],
|
|
1509
|
-
"returns": null,
|
|
1510
|
-
"example": null,
|
|
1511
815
|
"category": "formatting",
|
|
1512
816
|
"file": "utils/formatting/text.ts"
|
|
1513
817
|
},
|
|
@@ -1515,9 +819,6 @@
|
|
|
1515
819
|
"name": "toV",
|
|
1516
820
|
"type": "constant",
|
|
1517
821
|
"description": "",
|
|
1518
|
-
"params": [],
|
|
1519
|
-
"returns": null,
|
|
1520
|
-
"example": null,
|
|
1521
822
|
"category": "formatting",
|
|
1522
823
|
"file": "utils/formatting/voltage.ts"
|
|
1523
824
|
},
|
|
@@ -1525,9 +826,6 @@
|
|
|
1525
826
|
"name": "toVolts",
|
|
1526
827
|
"type": "constant",
|
|
1527
828
|
"description": "Format as volts",
|
|
1528
|
-
"params": [],
|
|
1529
|
-
"returns": null,
|
|
1530
|
-
"example": null,
|
|
1531
829
|
"category": "formatting",
|
|
1532
830
|
"file": "utils/formatting/voltage.ts"
|
|
1533
831
|
},
|
|
@@ -1535,9 +833,6 @@
|
|
|
1535
833
|
"name": "toW",
|
|
1536
834
|
"type": "constant",
|
|
1537
835
|
"description": "",
|
|
1538
|
-
"params": [],
|
|
1539
|
-
"returns": null,
|
|
1540
|
-
"example": null,
|
|
1541
836
|
"category": "formatting",
|
|
1542
837
|
"file": "utils/formatting/power.ts"
|
|
1543
838
|
},
|
|
@@ -1545,9 +840,6 @@
|
|
|
1545
840
|
"name": "toWatts",
|
|
1546
841
|
"type": "constant",
|
|
1547
842
|
"description": "Format as Watts",
|
|
1548
|
-
"params": [],
|
|
1549
|
-
"returns": null,
|
|
1550
|
-
"example": null,
|
|
1551
843
|
"category": "formatting",
|
|
1552
844
|
"file": "utils/formatting/power.ts"
|
|
1553
845
|
},
|
|
@@ -1555,9 +847,6 @@
|
|
|
1555
847
|
"name": "toWh",
|
|
1556
848
|
"type": "constant",
|
|
1557
849
|
"description": "Format as Watt-hours",
|
|
1558
|
-
"params": [],
|
|
1559
|
-
"returns": null,
|
|
1560
|
-
"example": null,
|
|
1561
850
|
"category": "formatting",
|
|
1562
851
|
"file": "utils/formatting/energy.ts"
|
|
1563
852
|
},
|
|
@@ -1565,9 +854,6 @@
|
|
|
1565
854
|
"name": "toYards",
|
|
1566
855
|
"type": "constant",
|
|
1567
856
|
"description": "Format as yards",
|
|
1568
|
-
"params": [],
|
|
1569
|
-
"returns": null,
|
|
1570
|
-
"example": null,
|
|
1571
857
|
"category": "formatting",
|
|
1572
858
|
"file": "utils/formatting/distance.ts"
|
|
1573
859
|
},
|
|
@@ -1575,9 +861,6 @@
|
|
|
1575
861
|
"name": "truncateEnd",
|
|
1576
862
|
"type": "constant",
|
|
1577
863
|
"description": "Truncate text at the end",
|
|
1578
|
-
"params": [],
|
|
1579
|
-
"returns": null,
|
|
1580
|
-
"example": null,
|
|
1581
864
|
"category": "formatting",
|
|
1582
865
|
"file": "utils/formatting/text.ts"
|
|
1583
866
|
},
|
|
@@ -1585,9 +868,6 @@
|
|
|
1585
868
|
"name": "truncateMiddle",
|
|
1586
869
|
"type": "constant",
|
|
1587
870
|
"description": "Truncate text in the middle",
|
|
1588
|
-
"params": [],
|
|
1589
|
-
"returns": null,
|
|
1590
|
-
"example": null,
|
|
1591
871
|
"category": "formatting",
|
|
1592
872
|
"file": "utils/formatting/text.ts"
|
|
1593
873
|
},
|
|
@@ -1595,9 +875,6 @@
|
|
|
1595
875
|
"name": "truncateStart",
|
|
1596
876
|
"type": "constant",
|
|
1597
877
|
"description": "Truncate text at the start",
|
|
1598
|
-
"params": [],
|
|
1599
|
-
"returns": null,
|
|
1600
|
-
"example": null,
|
|
1601
878
|
"category": "formatting",
|
|
1602
879
|
"file": "utils/formatting/text.ts"
|
|
1603
880
|
},
|
|
@@ -1605,9 +882,6 @@
|
|
|
1605
882
|
"name": "ucFirst",
|
|
1606
883
|
"type": "function",
|
|
1607
884
|
"description": "Uppercase first letter only",
|
|
1608
|
-
"params": [],
|
|
1609
|
-
"returns": null,
|
|
1610
|
-
"example": null,
|
|
1611
885
|
"category": "formatting",
|
|
1612
886
|
"file": "utils/formatting/text.ts"
|
|
1613
887
|
},
|
|
@@ -1615,35 +889,13 @@
|
|
|
1615
889
|
"name": "useComponentFormatter",
|
|
1616
890
|
"type": "function",
|
|
1617
891
|
"description": "Hook for using the component formatter Provides memoization for better performance ```tsx function MyComponent({ value, formatter }) { const format = useComponentFormatter(formatter); const formatted = format(value); return <span>{formatted}</span>; } ```",
|
|
1618
|
-
"params": [],
|
|
1619
|
-
"returns": null,
|
|
1620
|
-
"example": "function MyComponent({ value, formatter }) {\n const format = useComponentFormatter(formatter);\n const formatted = format(value);\n return <span>{formatted}</span>;\n}",
|
|
1621
892
|
"category": "formatting",
|
|
1622
893
|
"file": "utils/formatting/component-formatter.tsx"
|
|
1623
894
|
},
|
|
1624
|
-
{
|
|
1625
|
-
"name": "VoltageFormat",
|
|
1626
|
-
"type": "type",
|
|
1627
|
-
"description": "",
|
|
1628
|
-
"example": null,
|
|
1629
|
-
"category": "formatting",
|
|
1630
|
-
"file": "utils/formatting/types.ts"
|
|
1631
|
-
},
|
|
1632
|
-
{
|
|
1633
|
-
"name": "VoltageUnit",
|
|
1634
|
-
"type": "type",
|
|
1635
|
-
"description": "",
|
|
1636
|
-
"example": null,
|
|
1637
|
-
"category": "formatting",
|
|
1638
|
-
"file": "utils/formatting/types.ts"
|
|
1639
|
-
},
|
|
1640
895
|
{
|
|
1641
896
|
"name": "yardsToMeters",
|
|
1642
897
|
"type": "function",
|
|
1643
898
|
"description": "",
|
|
1644
|
-
"params": [],
|
|
1645
|
-
"returns": null,
|
|
1646
|
-
"example": null,
|
|
1647
899
|
"category": "formatting",
|
|
1648
900
|
"file": "utils/formatting/distance.ts"
|
|
1649
901
|
}
|
|
@@ -1652,55 +904,17 @@
|
|
|
1652
904
|
"charts": {
|
|
1653
905
|
"description": "Chart utilities for data visualization, scaling, and export functionality",
|
|
1654
906
|
"utilities": [
|
|
1655
|
-
{
|
|
1656
|
-
"name": "BaseDataPoint",
|
|
1657
|
-
"type": "type",
|
|
1658
|
-
"description": "",
|
|
1659
|
-
"example": null,
|
|
1660
|
-
"category": "charts",
|
|
1661
|
-
"file": "utils/charts/index.ts"
|
|
1662
|
-
},
|
|
1663
|
-
{
|
|
1664
|
-
"name": "BaseDataPoint",
|
|
1665
|
-
"type": "type",
|
|
1666
|
-
"description": "",
|
|
1667
|
-
"example": null,
|
|
1668
|
-
"category": "charts",
|
|
1669
|
-
"file": "utils/charts.ts"
|
|
1670
|
-
},
|
|
1671
907
|
{
|
|
1672
908
|
"name": "calculateCumulativeTotals",
|
|
1673
909
|
"type": "function",
|
|
1674
910
|
"description": "",
|
|
1675
|
-
"params": [],
|
|
1676
|
-
"returns": null,
|
|
1677
|
-
"example": null,
|
|
1678
911
|
"category": "charts",
|
|
1679
912
|
"file": "utils/charts/index.ts"
|
|
1680
913
|
},
|
|
1681
|
-
{
|
|
1682
|
-
"name": "ChartExportMetadata",
|
|
1683
|
-
"type": "type",
|
|
1684
|
-
"description": "",
|
|
1685
|
-
"example": null,
|
|
1686
|
-
"category": "charts",
|
|
1687
|
-
"file": "utils/chartExport.ts"
|
|
1688
|
-
},
|
|
1689
|
-
{
|
|
1690
|
-
"name": "ChartMargin",
|
|
1691
|
-
"type": "type",
|
|
1692
|
-
"description": "",
|
|
1693
|
-
"example": null,
|
|
1694
|
-
"category": "charts",
|
|
1695
|
-
"file": "utils/charts.ts"
|
|
1696
|
-
},
|
|
1697
914
|
{
|
|
1698
915
|
"name": "createXScale",
|
|
1699
916
|
"type": "function",
|
|
1700
917
|
"description": "",
|
|
1701
|
-
"params": [],
|
|
1702
|
-
"returns": null,
|
|
1703
|
-
"example": null,
|
|
1704
918
|
"category": "charts",
|
|
1705
919
|
"file": "utils/charts/index.ts"
|
|
1706
920
|
},
|
|
@@ -1708,9 +922,6 @@
|
|
|
1708
922
|
"name": "createXScale",
|
|
1709
923
|
"type": "function",
|
|
1710
924
|
"description": "",
|
|
1711
|
-
"params": [],
|
|
1712
|
-
"returns": null,
|
|
1713
|
-
"example": null,
|
|
1714
925
|
"category": "charts",
|
|
1715
926
|
"file": "utils/charts.ts"
|
|
1716
927
|
},
|
|
@@ -1718,9 +929,6 @@
|
|
|
1718
929
|
"name": "createYScale",
|
|
1719
930
|
"type": "constant",
|
|
1720
931
|
"description": "",
|
|
1721
|
-
"params": [],
|
|
1722
|
-
"returns": null,
|
|
1723
|
-
"example": null,
|
|
1724
932
|
"category": "charts",
|
|
1725
933
|
"file": "utils/charts/index.ts"
|
|
1726
934
|
},
|
|
@@ -1728,9 +936,6 @@
|
|
|
1728
936
|
"name": "createYScale",
|
|
1729
937
|
"type": "constant",
|
|
1730
938
|
"description": "",
|
|
1731
|
-
"params": [],
|
|
1732
|
-
"returns": null,
|
|
1733
|
-
"example": null,
|
|
1734
939
|
"category": "charts",
|
|
1735
940
|
"file": "utils/charts.ts"
|
|
1736
941
|
},
|
|
@@ -1738,9 +943,6 @@
|
|
|
1738
943
|
"name": "defaultMargin",
|
|
1739
944
|
"type": "constant",
|
|
1740
945
|
"description": "",
|
|
1741
|
-
"params": [],
|
|
1742
|
-
"returns": null,
|
|
1743
|
-
"example": null,
|
|
1744
946
|
"category": "charts",
|
|
1745
947
|
"file": "utils/charts.ts"
|
|
1746
948
|
},
|
|
@@ -1748,41 +950,6 @@
|
|
|
1748
950
|
"name": "exportChart",
|
|
1749
951
|
"type": "function",
|
|
1750
952
|
"description": "Main export function that handles all chart export types. Supports CSV, SVG, and PNG formats with automatic filename generation. ```typescript // Export single series as CSV await exportChart(\"csv\", data, { xLabel: \"Date\", yLabel: \"Value\", filename: \"sales-data\" }, svgRef); // Export multi-series chart as PNG await exportChart(\"png\", [series1, series2], { seriesLabels: [\"Revenue\", \"Profit\"], timestamp: false }, svgRef); ```",
|
|
1751
|
-
"params": [
|
|
1752
|
-
{
|
|
1753
|
-
"name": "type",
|
|
1754
|
-
"type": "unknown",
|
|
1755
|
-
"description": "Export format: \"csv\", \"svg\", or \"png\""
|
|
1756
|
-
},
|
|
1757
|
-
{
|
|
1758
|
-
"name": "datasets",
|
|
1759
|
-
"type": "unknown",
|
|
1760
|
-
"description": "Chart data as single array or array of arrays for multi-series"
|
|
1761
|
-
},
|
|
1762
|
-
{
|
|
1763
|
-
"name": "metadata",
|
|
1764
|
-
"type": "unknown",
|
|
1765
|
-
"description": "Export metadata including labels and filename options"
|
|
1766
|
-
},
|
|
1767
|
-
{
|
|
1768
|
-
"name": "svgRef",
|
|
1769
|
-
"type": "unknown",
|
|
1770
|
-
"description": "Reference to the chart's SVG element"
|
|
1771
|
-
}
|
|
1772
|
-
],
|
|
1773
|
-
"returns": {
|
|
1774
|
-
"type": "unknown",
|
|
1775
|
-
"description": "Promise that resolves when export is complete"
|
|
1776
|
-
},
|
|
1777
|
-
"example": "// Export single series as CSV\nawait exportChart(\"csv\", data, {\n xLabel: \"Date\",\n yLabel: \"Value\",\n filename: \"sales-data\"\n}, svgRef);\n\n// Export multi-series chart as PNG\nawait exportChart(\"png\", [series1, series2], {\n seriesLabels: [\"Revenue\", \"Profit\"],\n timestamp: false\n}, svgRef);",
|
|
1778
|
-
"category": "charts",
|
|
1779
|
-
"file": "utils/chartExport.ts"
|
|
1780
|
-
},
|
|
1781
|
-
{
|
|
1782
|
-
"name": "ExportType",
|
|
1783
|
-
"type": "type",
|
|
1784
|
-
"description": "",
|
|
1785
|
-
"example": null,
|
|
1786
953
|
"category": "charts",
|
|
1787
954
|
"file": "utils/chartExport.ts"
|
|
1788
955
|
},
|
|
@@ -1790,9 +957,6 @@
|
|
|
1790
957
|
"name": "getExportFormatName",
|
|
1791
958
|
"type": "function",
|
|
1792
959
|
"description": "Get human-readable export format name",
|
|
1793
|
-
"params": [],
|
|
1794
|
-
"returns": null,
|
|
1795
|
-
"example": null,
|
|
1796
960
|
"category": "charts",
|
|
1797
961
|
"file": "utils/chartExport.ts"
|
|
1798
962
|
},
|
|
@@ -1800,9 +964,6 @@
|
|
|
1800
964
|
"name": "getResolvedColor",
|
|
1801
965
|
"type": "function",
|
|
1802
966
|
"description": "",
|
|
1803
|
-
"params": [],
|
|
1804
|
-
"returns": null,
|
|
1805
|
-
"example": null,
|
|
1806
967
|
"category": "charts",
|
|
1807
968
|
"file": "utils/charts.ts"
|
|
1808
969
|
},
|
|
@@ -1810,19 +971,13 @@
|
|
|
1810
971
|
"name": "getYFormatSettings",
|
|
1811
972
|
"type": "function",
|
|
1812
973
|
"description": "",
|
|
1813
|
-
"params": [],
|
|
1814
|
-
"returns": null,
|
|
1815
|
-
"example": null,
|
|
1816
974
|
"category": "charts",
|
|
1817
975
|
"file": "utils/charts/index.ts"
|
|
1818
976
|
},
|
|
1819
977
|
{
|
|
1820
978
|
"name": "getYFormatSettings",
|
|
1821
979
|
"type": "function",
|
|
1822
|
-
"description": "",
|
|
1823
|
-
"params": [],
|
|
1824
|
-
"returns": null,
|
|
1825
|
-
"example": null,
|
|
980
|
+
"description": "Get Y-axis format settings from a ComponentFormatter Uses the main formatting system for consistency across all components",
|
|
1826
981
|
"category": "charts",
|
|
1827
982
|
"file": "utils/charts.ts"
|
|
1828
983
|
},
|
|
@@ -1830,9 +985,6 @@
|
|
|
1830
985
|
"name": "isExportSupported",
|
|
1831
986
|
"type": "function",
|
|
1832
987
|
"description": "Utility to check if export is supported in the current environment",
|
|
1833
|
-
"params": [],
|
|
1834
|
-
"returns": null,
|
|
1835
|
-
"example": null,
|
|
1836
988
|
"category": "charts",
|
|
1837
989
|
"file": "utils/chartExport.ts"
|
|
1838
990
|
},
|
|
@@ -1840,27 +992,8 @@
|
|
|
1840
992
|
"name": "that",
|
|
1841
993
|
"type": "function",
|
|
1842
994
|
"description": "",
|
|
1843
|
-
"params": [],
|
|
1844
|
-
"returns": null,
|
|
1845
|
-
"example": null,
|
|
1846
995
|
"category": "charts",
|
|
1847
996
|
"file": "utils/chartExport.ts"
|
|
1848
|
-
},
|
|
1849
|
-
{
|
|
1850
|
-
"name": "YFormatSettings",
|
|
1851
|
-
"type": "type",
|
|
1852
|
-
"description": "",
|
|
1853
|
-
"example": null,
|
|
1854
|
-
"category": "charts",
|
|
1855
|
-
"file": "utils/charts/index.ts"
|
|
1856
|
-
},
|
|
1857
|
-
{
|
|
1858
|
-
"name": "YFormatSettings",
|
|
1859
|
-
"type": "type",
|
|
1860
|
-
"description": "",
|
|
1861
|
-
"example": null,
|
|
1862
|
-
"category": "charts",
|
|
1863
|
-
"file": "utils/charts.ts"
|
|
1864
997
|
}
|
|
1865
998
|
]
|
|
1866
999
|
},
|
|
@@ -1871,9 +1004,6 @@
|
|
|
1871
1004
|
"name": "calculateBounds",
|
|
1872
1005
|
"type": "constant",
|
|
1873
1006
|
"description": "Calculate min and max bounds from numeric values",
|
|
1874
|
-
"params": [],
|
|
1875
|
-
"returns": null,
|
|
1876
|
-
"example": null,
|
|
1877
1007
|
"category": "colors",
|
|
1878
1008
|
"file": "utils/colors.ts"
|
|
1879
1009
|
},
|
|
@@ -1881,9 +1011,6 @@
|
|
|
1881
1011
|
"name": "calculateCenter",
|
|
1882
1012
|
"type": "constant",
|
|
1883
1013
|
"description": "Calculate center point for diverging palettes",
|
|
1884
|
-
"params": [],
|
|
1885
|
-
"returns": null,
|
|
1886
|
-
"example": null,
|
|
1887
1014
|
"category": "colors",
|
|
1888
1015
|
"file": "utils/colors.ts"
|
|
1889
1016
|
},
|
|
@@ -1891,9 +1018,6 @@
|
|
|
1891
1018
|
"name": "clearColorCache",
|
|
1892
1019
|
"type": "function",
|
|
1893
1020
|
"description": "Clears the color cache - useful when theme changes",
|
|
1894
|
-
"params": [],
|
|
1895
|
-
"returns": null,
|
|
1896
|
-
"example": null,
|
|
1897
1021
|
"category": "colors",
|
|
1898
1022
|
"file": "utils/colors.ts"
|
|
1899
1023
|
},
|
|
@@ -1901,9 +1025,6 @@
|
|
|
1901
1025
|
"name": "createAutoColorPaint",
|
|
1902
1026
|
"type": "constant",
|
|
1903
1027
|
"description": "Automatically assigns categorical colors to Mapbox layer paint properties This makes it easy for consumers to get great colors without manual assignment",
|
|
1904
|
-
"params": [],
|
|
1905
|
-
"returns": null,
|
|
1906
|
-
"example": null,
|
|
1907
1028
|
"category": "colors",
|
|
1908
1029
|
"file": "utils/colors.ts"
|
|
1909
1030
|
},
|
|
@@ -1911,9 +1032,6 @@
|
|
|
1911
1032
|
"name": "createCategoricalMapping",
|
|
1912
1033
|
"type": "constant",
|
|
1913
1034
|
"description": "Creates a categorical color mapping for use with vector layers or explicit mappings This is a helper for cases where categorical auto-assignment doesn't work: - Vector tile layers (data not accessible at render time) - URL-based GeoJSON layers - Custom pin layers // Vector layer with categorical coloring layer.vector({ tileset: \"mapbox://my-tileset\", sourceLayer: \"buildings\", style: { color: createCategoricalMapping(\"type\", [\"residential\", \"commercial\", \"industrial\"]) } }) // With custom colors for specific values const mapping = createCategoricalMapping(\"status\", [\"active\", \"pending\", \"inactive\"]); // Then override specific colors if needed: mapping.mapping.inactive = { hex: \"#cccccc\" };",
|
|
1914
|
-
"params": [],
|
|
1915
|
-
"returns": null,
|
|
1916
|
-
"example": "// Vector layer with categorical coloring\nlayer.vector({\n tileset: \"mapbox://my-tileset\",\n sourceLayer: \"buildings\",\n style: {\n color: createCategoricalMapping(\"type\", [\"residential\", \"commercial\", \"industrial\"])\n }\n})",
|
|
1917
1035
|
"category": "colors",
|
|
1918
1036
|
"file": "utils/colors.ts"
|
|
1919
1037
|
},
|
|
@@ -1921,9 +1039,6 @@
|
|
|
1921
1039
|
"name": "createCategoryColorMap",
|
|
1922
1040
|
"type": "constant",
|
|
1923
1041
|
"description": "Maps categories to colors based on a color scheme",
|
|
1924
|
-
"params": [],
|
|
1925
|
-
"returns": null,
|
|
1926
|
-
"example": null,
|
|
1927
1042
|
"category": "colors",
|
|
1928
1043
|
"file": "utils/colors.ts"
|
|
1929
1044
|
},
|
|
@@ -1931,9 +1046,6 @@
|
|
|
1931
1046
|
"name": "createDataLayer",
|
|
1932
1047
|
"type": "constant",
|
|
1933
1048
|
"description": "Creates a complete layer configuration with automatic color assignment Perfect for consumers who just want to pass data and get great colors",
|
|
1934
|
-
"params": [],
|
|
1935
|
-
"returns": null,
|
|
1936
|
-
"example": null,
|
|
1937
1049
|
"category": "colors",
|
|
1938
1050
|
"file": "utils/colors.ts"
|
|
1939
1051
|
},
|
|
@@ -1941,9 +1053,6 @@
|
|
|
1941
1053
|
"name": "createDivergingMapping",
|
|
1942
1054
|
"type": "constant",
|
|
1943
1055
|
"description": "Creates a diverging color mapping for vector layers or manual bounds Use this helper when categorical auto-assignment doesn't work: - Vector tile layers (data not accessible at render time) - URL-based GeoJSON layers - When you want consistent colors across multiple maps // Vector layer with diverging coloring layer.vector({ tileset: \"mapbox://my-tileset\", sourceLayer: \"temperature\", style: { color: createDivergingMapping(\"temp_anomaly\", { min: -10, max: 10 }, 0, \"orangeYellowSeafoam\") } })",
|
|
1944
|
-
"params": [],
|
|
1945
|
-
"returns": null,
|
|
1946
|
-
"example": "// Vector layer with diverging coloring\nlayer.vector({\n tileset: \"mapbox://my-tileset\",\n sourceLayer: \"temperature\",\n style: {\n color: createDivergingMapping(\"temp_anomaly\", { min: -10, max: 10 }, 0, \"orangeYellowSeafoam\")\n }\n})",
|
|
1947
1056
|
"category": "colors",
|
|
1948
1057
|
"file": "utils/colors.ts"
|
|
1949
1058
|
},
|
|
@@ -1951,9 +1060,6 @@
|
|
|
1951
1060
|
"name": "createSequentialMapping",
|
|
1952
1061
|
"type": "constant",
|
|
1953
1062
|
"description": "Creates a sequential color mapping for vector layers or manual bounds Use this helper when categorical auto-assignment doesn't work: - Vector tile layers (data not accessible at render time) - URL-based GeoJSON layers - When you want consistent colors across multiple maps // Vector layer with sequential coloring layer.vector({ tileset: \"mapbox://my-tileset\", sourceLayer: \"population\", style: { color: createSequentialMapping(\"density\", { min: 0, max: 100000 }, \"magma\") } })",
|
|
1954
|
-
"params": [],
|
|
1955
|
-
"returns": null,
|
|
1956
|
-
"example": "// Vector layer with sequential coloring\nlayer.vector({\n tileset: \"mapbox://my-tileset\",\n sourceLayer: \"population\",\n style: {\n color: createSequentialMapping(\"density\", { min: 0, max: 100000 }, \"magma\")\n }\n})",
|
|
1957
1063
|
"category": "colors",
|
|
1958
1064
|
"file": "utils/colors.ts"
|
|
1959
1065
|
},
|
|
@@ -1961,9 +1067,6 @@
|
|
|
1961
1067
|
"name": "extractNumericValues",
|
|
1962
1068
|
"type": "constant",
|
|
1963
1069
|
"description": "Extract numeric values from GeoJSON data for sequential/diverging palettes",
|
|
1964
|
-
"params": [],
|
|
1965
|
-
"returns": null,
|
|
1966
|
-
"example": null,
|
|
1967
1070
|
"category": "colors",
|
|
1968
1071
|
"file": "utils/colors.ts"
|
|
1969
1072
|
},
|
|
@@ -1971,9 +1074,6 @@
|
|
|
1971
1074
|
"name": "extractUniqueValues",
|
|
1972
1075
|
"type": "constant",
|
|
1973
1076
|
"description": "Extracts unique values for a given property from GeoJSON FeatureCollection",
|
|
1974
|
-
"params": [],
|
|
1975
|
-
"returns": null,
|
|
1976
|
-
"example": null,
|
|
1977
1077
|
"category": "colors",
|
|
1978
1078
|
"file": "utils/colors.ts"
|
|
1979
1079
|
},
|
|
@@ -1981,9 +1081,6 @@
|
|
|
1981
1081
|
"name": "getContrastingTextColor",
|
|
1982
1082
|
"type": "function",
|
|
1983
1083
|
"description": "Gets contrasting text color for a background",
|
|
1984
|
-
"params": [],
|
|
1985
|
-
"returns": null,
|
|
1986
|
-
"example": null,
|
|
1987
1084
|
"category": "colors",
|
|
1988
1085
|
"file": "utils/colors.ts"
|
|
1989
1086
|
},
|
|
@@ -1991,9 +1088,6 @@
|
|
|
1991
1088
|
"name": "getDefaultChartColor",
|
|
1992
1089
|
"type": "function",
|
|
1993
1090
|
"description": "Gets the default chart color from theme",
|
|
1994
|
-
"params": [],
|
|
1995
|
-
"returns": null,
|
|
1996
|
-
"example": null,
|
|
1997
1091
|
"category": "colors",
|
|
1998
1092
|
"file": "utils/colors.ts"
|
|
1999
1093
|
},
|
|
@@ -2001,9 +1095,6 @@
|
|
|
2001
1095
|
"name": "getDefaultColors",
|
|
2002
1096
|
"type": "function",
|
|
2003
1097
|
"description": "Default color palette matching the edges design system",
|
|
2004
|
-
"params": [],
|
|
2005
|
-
"returns": null,
|
|
2006
|
-
"example": null,
|
|
2007
1098
|
"category": "colors",
|
|
2008
1099
|
"file": "utils/colors.ts"
|
|
2009
1100
|
},
|
|
@@ -2011,18 +1102,6 @@
|
|
|
2011
1102
|
"name": "getDivergingColors",
|
|
2012
1103
|
"type": "function",
|
|
2013
1104
|
"description": "Get colors for a specific diverging palette",
|
|
2014
|
-
"params": [
|
|
2015
|
-
{
|
|
2016
|
-
"name": "scheme",
|
|
2017
|
-
"type": "unknown",
|
|
2018
|
-
"description": "Diverging palette name (defaults to \"redYellowBlue\")"
|
|
2019
|
-
}
|
|
2020
|
-
],
|
|
2021
|
-
"returns": {
|
|
2022
|
-
"type": "unknown",
|
|
2023
|
-
"description": "Array of 10 hex color strings (color 5 is the center)"
|
|
2024
|
-
},
|
|
2025
|
-
"example": null,
|
|
2026
1105
|
"category": "colors",
|
|
2027
1106
|
"file": "utils/colors.ts"
|
|
2028
1107
|
},
|
|
@@ -2030,9 +1109,6 @@
|
|
|
2030
1109
|
"name": "getResolvedColor",
|
|
2031
1110
|
"type": "constant",
|
|
2032
1111
|
"description": "Resolves a CSS variable to its computed color value Supports multiple formats and automatically adds the color- prefix if needed - \"brand-primary\" → resolves to --color-brand-primary - \"color-brand-primary\" → resolves to --color-brand-primary - \"--color-brand-primary\" → used as-is - \"var(--color-brand-primary)\" → unwrapped and used",
|
|
2033
|
-
"params": [],
|
|
2034
|
-
"returns": null,
|
|
2035
|
-
"example": null,
|
|
2036
1112
|
"category": "colors",
|
|
2037
1113
|
"file": "utils/colors.ts"
|
|
2038
1114
|
},
|
|
@@ -2040,18 +1116,6 @@
|
|
|
2040
1116
|
"name": "getSequentialColors",
|
|
2041
1117
|
"type": "function",
|
|
2042
1118
|
"description": "Get colors for a specific sequential palette",
|
|
2043
|
-
"params": [
|
|
2044
|
-
{
|
|
2045
|
-
"name": "scheme",
|
|
2046
|
-
"type": "unknown",
|
|
2047
|
-
"description": "Sequential palette name (defaults to \"viridis\")"
|
|
2048
|
-
}
|
|
2049
|
-
],
|
|
2050
|
-
"returns": {
|
|
2051
|
-
"type": "unknown",
|
|
2052
|
-
"description": "Array of 10 hex color strings"
|
|
2053
|
-
},
|
|
2054
|
-
"example": null,
|
|
2055
1119
|
"category": "colors",
|
|
2056
1120
|
"file": "utils/colors.ts"
|
|
2057
1121
|
},
|
|
@@ -2059,9 +1123,6 @@
|
|
|
2059
1123
|
"name": "getThemeCategoricalColors",
|
|
2060
1124
|
"type": "function",
|
|
2061
1125
|
"description": "Gets theme colors from CSS variables Returns an array of resolved color values",
|
|
2062
|
-
"params": [],
|
|
2063
|
-
"returns": null,
|
|
2064
|
-
"example": null,
|
|
2065
1126
|
"category": "colors",
|
|
2066
1127
|
"file": "utils/colors.ts"
|
|
2067
1128
|
},
|
|
@@ -2069,17 +1130,6 @@
|
|
|
2069
1130
|
"name": "isLightColor",
|
|
2070
1131
|
"type": "function",
|
|
2071
1132
|
"description": "Determines if a color is light or dark Useful for determining text color on colored backgrounds",
|
|
2072
|
-
"params": [],
|
|
2073
|
-
"returns": null,
|
|
2074
|
-
"example": null,
|
|
2075
|
-
"category": "colors",
|
|
2076
|
-
"file": "utils/colors.ts"
|
|
2077
|
-
},
|
|
2078
|
-
{
|
|
2079
|
-
"name": "MapboxExpression",
|
|
2080
|
-
"type": "type",
|
|
2081
|
-
"description": "Type for Mapbox GL JS expressions Represents nested array structures used by Mapbox for data-driven styling",
|
|
2082
|
-
"example": null,
|
|
2083
1133
|
"category": "colors",
|
|
2084
1134
|
"file": "utils/colors.ts"
|
|
2085
1135
|
},
|
|
@@ -2087,95 +1137,10 @@
|
|
|
2087
1137
|
"name": "mapValuesToCategoricalColors",
|
|
2088
1138
|
"type": "constant",
|
|
2089
1139
|
"description": "Maps unique values to categorical colors with looping",
|
|
2090
|
-
"params": [],
|
|
2091
|
-
"returns": null,
|
|
2092
|
-
"example": null,
|
|
2093
1140
|
"category": "colors",
|
|
2094
1141
|
"file": "utils/colors.ts"
|
|
2095
1142
|
}
|
|
2096
1143
|
]
|
|
2097
|
-
},
|
|
2098
|
-
"general": {
|
|
2099
|
-
"description": "General utility functions for focus management, Tailwind class composition, and theme utilities",
|
|
2100
|
-
"utilities": [
|
|
2101
|
-
{
|
|
2102
|
-
"name": "composeTailwindRenderProps",
|
|
2103
|
-
"type": "function",
|
|
2104
|
-
"description": "",
|
|
2105
|
-
"params": [],
|
|
2106
|
-
"returns": null,
|
|
2107
|
-
"example": null,
|
|
2108
|
-
"category": "general",
|
|
2109
|
-
"file": "utils/index.ts"
|
|
2110
|
-
},
|
|
2111
|
-
{
|
|
2112
|
-
"name": "focusRing",
|
|
2113
|
-
"type": "function",
|
|
2114
|
-
"description": "",
|
|
2115
|
-
"params": [],
|
|
2116
|
-
"returns": null,
|
|
2117
|
-
"example": null,
|
|
2118
|
-
"category": "general",
|
|
2119
|
-
"file": "utils/index.ts"
|
|
2120
|
-
},
|
|
2121
|
-
{
|
|
2122
|
-
"name": "getResolvedColor",
|
|
2123
|
-
"type": "function",
|
|
2124
|
-
"description": "",
|
|
2125
|
-
"params": [],
|
|
2126
|
-
"returns": null,
|
|
2127
|
-
"example": null,
|
|
2128
|
-
"category": "general",
|
|
2129
|
-
"file": "utils/index.ts"
|
|
2130
|
-
}
|
|
2131
|
-
]
|
|
2132
1144
|
}
|
|
2133
|
-
},
|
|
2134
|
-
"summary": {
|
|
2135
|
-
"totalUtilities": 207,
|
|
2136
|
-
"totalCategories": 5,
|
|
2137
|
-
"categories": [
|
|
2138
|
-
{
|
|
2139
|
-
"name": "hooks",
|
|
2140
|
-
"count": 10
|
|
2141
|
-
},
|
|
2142
|
-
{
|
|
2143
|
-
"name": "formatting",
|
|
2144
|
-
"count": 153
|
|
2145
|
-
},
|
|
2146
|
-
{
|
|
2147
|
-
"name": "charts",
|
|
2148
|
-
"count": 20
|
|
2149
|
-
},
|
|
2150
|
-
{
|
|
2151
|
-
"name": "colors",
|
|
2152
|
-
"count": 21
|
|
2153
|
-
},
|
|
2154
|
-
{
|
|
2155
|
-
"name": "general",
|
|
2156
|
-
"count": 3
|
|
2157
|
-
}
|
|
2158
|
-
]
|
|
2159
|
-
},
|
|
2160
|
-
"importInfo": {
|
|
2161
|
-
"package": "@texturehq/edges",
|
|
2162
|
-
"examples": [
|
|
2163
|
-
{
|
|
2164
|
-
"description": "Import specific utilities",
|
|
2165
|
-
"code": "import { formatNumber, formatCurrency, useDebounce } from \"@texturehq/edges\""
|
|
2166
|
-
},
|
|
2167
|
-
{
|
|
2168
|
-
"description": "Import all formatting utilities",
|
|
2169
|
-
"code": "import * as formatting from \"@texturehq/edges\""
|
|
2170
|
-
},
|
|
2171
|
-
{
|
|
2172
|
-
"description": "Import hooks",
|
|
2173
|
-
"code": "import { useDebounce, useLocalStorage } from \"@texturehq/edges\""
|
|
2174
|
-
},
|
|
2175
|
-
{
|
|
2176
|
-
"description": "Import color utilities",
|
|
2177
|
-
"code": "import { getResolvedColor, isLightColor } from \"@texturehq/edges\""
|
|
2178
|
-
}
|
|
2179
|
-
]
|
|
2180
1145
|
}
|
|
2181
1146
|
}
|