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