@texturehq/edges 1.29.1 → 1.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1222 +0,0 @@
1
- {
2
- "version": "1.29.1",
3
- "categories": {
4
- "hooks": {
5
- "description": "React hooks for common functionality like breakpoints, debouncing, local storage, and media queries",
6
- "utilities": [
7
- {
8
- "name": "BREAKPOINTS",
9
- "type": "constant",
10
- "description": "Tailwind CSS default breakpoints These match the standard Tailwind breakpoints used in your CSS",
11
- "category": "hooks",
12
- "file": "hooks/useBreakpoint.ts"
13
- },
14
- {
15
- "name": "useBreakpoint",
16
- "type": "function",
17
- "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.",
18
- "category": "hooks",
19
- "file": "hooks/useBreakpoint.ts"
20
- },
21
- {
22
- "name": "useChartExport",
23
- "type": "function",
24
- "description": "Hook for exporting chart data in various formats (CSV, SVG, PNG). Provides a stable callback for triggering exports with memoized dependencies.",
25
- "category": "hooks",
26
- "file": "hooks/useChartExport.ts"
27
- },
28
- {
29
- "name": "useClientDataControls",
30
- "type": "function",
31
- "description": "useClientDataControls Client-side hook for filtering, sorting, searching, and faceting data. Uses memoization to avoid unnecessary recomputation. Operations are applied in this order: 1. Search (fuzzy or exact matching) 2. Filter (structured conditions) 3. Facet computation (on filtered data) 4. Sort",
32
- "category": "hooks",
33
- "file": "hooks/useClientDataControls.ts"
34
- },
35
- {
36
- "name": "useDataControls",
37
- "type": "function",
38
- "description": "useDataControls Unified hook for managing data filtering, sorting, searching, and faceting. Supports both client-side and server-side modes. **Client Mode:** - Processes data locally using pure functions - Computes facet counts automatically - Best for datasets < 5000 rows **Server Mode:** - Notifies parent when state changes (debounced for search) - Passes through server-provided data and counts - Best for large datasets or complex queries",
39
- "category": "hooks",
40
- "file": "hooks/useDataControls.ts"
41
- },
42
- {
43
- "name": "useDebounce",
44
- "type": "function",
45
- "description": "",
46
- "category": "hooks",
47
- "file": "hooks/useDebounce.ts"
48
- },
49
- {
50
- "name": "useDelayedLoading",
51
- "type": "function",
52
- "description": "useDelayedLoading Returns a delayed version of the loading state to prevent flashing loaders for fast operations. The loader will only show if loading takes longer than the specified delay.",
53
- "category": "hooks",
54
- "file": "hooks/useDelayedLoading.ts"
55
- },
56
- {
57
- "name": "useElementSize",
58
- "type": "function",
59
- "description": "useElementSize A performant hook that tracks the dimensions of a DOM element using ResizeObserver. Returns a callback ref to attach to the element and its current width/height. Performance optimizations: - Uses ResizeObserver for efficient resize detection - Debounces updates using requestAnimationFrame - Cleans up observer on unmount",
60
- "category": "hooks",
61
- "file": "hooks/useElementSize.ts"
62
- },
63
- {
64
- "name": "useInfiniteScroll",
65
- "type": "function",
66
- "description": "useInfiniteScroll Hook for implementing infinite scroll with optional virtualization. Intelligently detects initial vs loading-more states from context. Features: - Smart loading state detection (initial vs loading-more) - Optional explicit state control - TanStack Virtual integration for performance - Intersection Observer for load triggering - Configurable virtualization threshold",
67
- "category": "hooks",
68
- "file": "hooks/useInfiniteScroll.ts"
69
- },
70
- {
71
- "name": "useLocalStorage",
72
- "type": "function",
73
- "description": "Hook for managing localStorage values with React state synchronization",
74
- "category": "hooks",
75
- "file": "hooks/useLocalStorage.ts"
76
- },
77
- {
78
- "name": "useMediaQuery",
79
- "type": "function",
80
- "description": "Hook to check if a media query matches the current viewport",
81
- "category": "hooks",
82
- "file": "hooks/useMediaQuery.ts"
83
- },
84
- {
85
- "name": "useServerDataControls",
86
- "type": "function",
87
- "description": "useServerDataControls Server-side hook that notifies the parent when filter/sort/search state changes. Search queries are debounced to avoid excessive API calls. This hook doesn't manipulate data - it just provides a clean way to: 1. Debounce search input 2. Notify when any state changes 3. Trigger server refetch",
88
- "category": "hooks",
89
- "file": "hooks/useServerDataControls.ts"
90
- },
91
- {
92
- "name": "useTableExport",
93
- "type": "function",
94
- "description": "Hook for exporting DataTable data as CSV. Provides a stable callback for triggering exports with memoized dependencies. For client-side DataTables where all data is in the browser. For server-side exports, use the `onExport` callback pattern instead.",
95
- "category": "hooks",
96
- "file": "hooks/useTableExport.ts"
97
- },
98
- {
99
- "name": "useVisualViewportHeight",
100
- "type": "function",
101
- "description": "useVisualViewportHeight Tracks `window.visualViewport` to handle the iOS soft keyboard. On iOS Safari, `position: fixed` elements are anchored to the layout viewport (full page size) and don't move when the keyboard opens. This hook returns: - `height`: the visible viewport height (shrinks when keyboard opens) - `keyboardOffset`: how many px to translate a fixed element upward to clear the keyboard Returns `null` on SSR or in browsers that don't support `visualViewport`.",
102
- "category": "hooks",
103
- "file": "hooks/useVisualViewportHeight.ts"
104
- }
105
- ]
106
- },
107
- "formatting": {
108
- "description": "Comprehensive formatting utilities for text, numbers, dates, currency, energy, temperature, distance, and more",
109
- "utilities": [
110
- {
111
- "name": "autoScaleCurrent",
112
- "type": "constant",
113
- "description": "Auto-scale current to the most appropriate unit",
114
- "category": "formatting",
115
- "file": "utils/formatting/current.ts"
116
- },
117
- {
118
- "name": "autoScaleDistance",
119
- "type": "constant",
120
- "description": "Auto-scale distance to the most appropriate unit",
121
- "category": "formatting",
122
- "file": "utils/formatting/distance.ts"
123
- },
124
- {
125
- "name": "autoScaleEnergy",
126
- "type": "constant",
127
- "description": "Auto-scale energy to the most appropriate unit",
128
- "category": "formatting",
129
- "file": "utils/formatting/energy.ts"
130
- },
131
- {
132
- "name": "autoScalePower",
133
- "type": "constant",
134
- "description": "Auto-scale power to the most appropriate unit",
135
- "category": "formatting",
136
- "file": "utils/formatting/power.ts"
137
- },
138
- {
139
- "name": "autoScaleResistance",
140
- "type": "constant",
141
- "description": "Auto-scale resistance to the most appropriate unit",
142
- "category": "formatting",
143
- "file": "utils/formatting/resistance.ts"
144
- },
145
- {
146
- "name": "autoScaleVoltage",
147
- "type": "constant",
148
- "description": "Auto-scale voltage to the most appropriate unit",
149
- "category": "formatting",
150
- "file": "utils/formatting/voltage.ts"
151
- },
152
- {
153
- "name": "camelCaseToWords",
154
- "type": "function",
155
- "description": "Convert camelCase to words",
156
- "category": "formatting",
157
- "file": "utils/formatting/text.ts"
158
- },
159
- {
160
- "name": "capitalize",
161
- "type": "function",
162
- "description": "Capitalize first letter of each word",
163
- "category": "formatting",
164
- "file": "utils/formatting/text.ts"
165
- },
166
- {
167
- "name": "celsiusToFahrenheit",
168
- "type": "function",
169
- "description": "Convert Celsius to Fahrenheit",
170
- "category": "formatting",
171
- "file": "utils/formatting/temperature.ts"
172
- },
173
- {
174
- "name": "celsiusToKelvin",
175
- "type": "function",
176
- "description": "Convert Celsius to Kelvin",
177
- "category": "formatting",
178
- "file": "utils/formatting/temperature.ts"
179
- },
180
- {
181
- "name": "centimetersToInches",
182
- "type": "function",
183
- "description": "",
184
- "category": "formatting",
185
- "file": "utils/formatting/distance.ts"
186
- },
187
- {
188
- "name": "createFormat",
189
- "type": "constant",
190
- "description": "Convenience function to create a format object",
191
- "category": "formatting",
192
- "file": "utils/formatting/index.ts"
193
- },
194
- {
195
- "name": "enumToSentenceCase",
196
- "type": "function",
197
- "description": "Convert enum-style text to sentence case",
198
- "category": "formatting",
199
- "file": "utils/formatting/text.ts"
200
- },
201
- {
202
- "name": "fahrenheitToCelsius",
203
- "type": "function",
204
- "description": "Convert Fahrenheit to Celsius",
205
- "category": "formatting",
206
- "file": "utils/formatting/temperature.ts"
207
- },
208
- {
209
- "name": "fahrenheitToKelvin",
210
- "type": "function",
211
- "description": "Convert Fahrenheit to Kelvin",
212
- "category": "formatting",
213
- "file": "utils/formatting/temperature.ts"
214
- },
215
- {
216
- "name": "feetToMeters",
217
- "type": "function",
218
- "description": "",
219
- "category": "formatting",
220
- "file": "utils/formatting/distance.ts"
221
- },
222
- {
223
- "name": "feetToMiles",
224
- "type": "function",
225
- "description": "",
226
- "category": "formatting",
227
- "file": "utils/formatting/distance.ts"
228
- },
229
- {
230
- "name": "formatBoolean",
231
- "type": "constant",
232
- "description": "Format boolean according to BooleanFormat specification",
233
- "category": "formatting",
234
- "file": "utils/formatting/boolean.ts"
235
- },
236
- {
237
- "name": "formatCapacity",
238
- "type": "function",
239
- "description": "Format battery capacity (kWh)",
240
- "category": "formatting",
241
- "file": "utils/formatting/capacity.ts"
242
- },
243
- {
244
- "name": "formatComponentValue",
245
- "type": "function",
246
- "description": "Format a value for display in a component Centralizes the logic used by Kpi, StatList, and similar components",
247
- "category": "formatting",
248
- "file": "utils/formatting/component-formatter.tsx"
249
- },
250
- {
251
- "name": "formatCurrency",
252
- "type": "constant",
253
- "description": "Format currency according to CurrencyFormat specification",
254
- "category": "formatting",
255
- "file": "utils/formatting/number.ts"
256
- },
257
- {
258
- "name": "formatCurrent",
259
- "type": "constant",
260
- "description": "Format current according to CurrentFormat specification",
261
- "category": "formatting",
262
- "file": "utils/formatting/current.ts"
263
- },
264
- {
265
- "name": "formatDate",
266
- "type": "constant",
267
- "description": "Format date according to DateFormat specification",
268
- "category": "formatting",
269
- "file": "utils/formatting/date.ts"
270
- },
271
- {
272
- "name": "formatDistance",
273
- "type": "constant",
274
- "description": "Format distance according to DistanceFormat specification",
275
- "category": "formatting",
276
- "file": "utils/formatting/distance.ts"
277
- },
278
- {
279
- "name": "formatEnergy",
280
- "type": "constant",
281
- "description": "Format energy according to EnergyFormat specification",
282
- "category": "formatting",
283
- "file": "utils/formatting/energy.ts"
284
- },
285
- {
286
- "name": "formatFieldValue",
287
- "type": "constant",
288
- "description": "Main formatting function that routes to the appropriate formatter based on the format type",
289
- "category": "formatting",
290
- "file": "utils/formatting/index.ts"
291
- },
292
- {
293
- "name": "formatInternationalPhone",
294
- "type": "constant",
295
- "description": "Format international phone number",
296
- "category": "formatting",
297
- "file": "utils/formatting/phone.ts"
298
- },
299
- {
300
- "name": "formatNumber",
301
- "type": "constant",
302
- "description": "Format number according to NumberFormat specification",
303
- "category": "formatting",
304
- "file": "utils/formatting/number.ts"
305
- },
306
- {
307
- "name": "formatPercent",
308
- "type": "constant",
309
- "description": "Format percentage (simple wrapper for consistency with other formatters)",
310
- "category": "formatting",
311
- "file": "utils/formatting/number.ts"
312
- },
313
- {
314
- "name": "formatPhone",
315
- "type": "constant",
316
- "description": "Format phone according to PhoneFormat specification",
317
- "category": "formatting",
318
- "file": "utils/formatting/phone.ts"
319
- },
320
- {
321
- "name": "formatPhoneNumber",
322
- "type": "constant",
323
- "description": "Format phone number with basic formatting",
324
- "category": "formatting",
325
- "file": "utils/formatting/phone.ts"
326
- },
327
- {
328
- "name": "formatPower",
329
- "type": "constant",
330
- "description": "Format power according to PowerFormat specification",
331
- "category": "formatting",
332
- "file": "utils/formatting/power.ts"
333
- },
334
- {
335
- "name": "formatPowerRating",
336
- "type": "function",
337
- "description": "Format power rating (kW)",
338
- "category": "formatting",
339
- "file": "utils/formatting/capacity.ts"
340
- },
341
- {
342
- "name": "FormatRegistry",
343
- "type": "constant",
344
- "description": "",
345
- "category": "formatting",
346
- "file": "utils/formatting/registry.ts"
347
- },
348
- {
349
- "name": "formatResistance",
350
- "type": "constant",
351
- "description": "Format resistance according to ResistanceFormat specification",
352
- "category": "formatting",
353
- "file": "utils/formatting/resistance.ts"
354
- },
355
- {
356
- "name": "formatTemperature",
357
- "type": "constant",
358
- "description": "Format temperature according to TemperatureFormat specification",
359
- "category": "formatting",
360
- "file": "utils/formatting/temperature.ts"
361
- },
362
- {
363
- "name": "formatText",
364
- "type": "constant",
365
- "description": "Format text according to TextFormat specification",
366
- "category": "formatting",
367
- "file": "utils/formatting/text.ts"
368
- },
369
- {
370
- "name": "formatUSPhone",
371
- "type": "constant",
372
- "description": "Format US phone number",
373
- "category": "formatting",
374
- "file": "utils/formatting/phone.ts"
375
- },
376
- {
377
- "name": "formatVoltage",
378
- "type": "constant",
379
- "description": "Format voltage according to VoltageFormat specification",
380
- "category": "formatting",
381
- "file": "utils/formatting/voltage.ts"
382
- },
383
- {
384
- "name": "getDateParts",
385
- "type": "constant",
386
- "description": "Get formatted date parts",
387
- "category": "formatting",
388
- "file": "utils/formatting/date.ts"
389
- },
390
- {
391
- "name": "inchesToCentimeters",
392
- "type": "function",
393
- "description": "",
394
- "category": "formatting",
395
- "file": "utils/formatting/distance.ts"
396
- },
397
- {
398
- "name": "isNil",
399
- "type": "function",
400
- "description": "Check if a value is null or undefined",
401
- "category": "formatting",
402
- "file": "utils/formatting/number.ts"
403
- },
404
- {
405
- "name": "kelvinToCelsius",
406
- "type": "function",
407
- "description": "Convert Kelvin to Celsius",
408
- "category": "formatting",
409
- "file": "utils/formatting/temperature.ts"
410
- },
411
- {
412
- "name": "kelvinToFahrenheit",
413
- "type": "function",
414
- "description": "Convert Kelvin to Fahrenheit",
415
- "category": "formatting",
416
- "file": "utils/formatting/temperature.ts"
417
- },
418
- {
419
- "name": "kilometersToMiles",
420
- "type": "function",
421
- "description": "",
422
- "category": "formatting",
423
- "file": "utils/formatting/distance.ts"
424
- },
425
- {
426
- "name": "metersToFeet",
427
- "type": "function",
428
- "description": "Conversion utilities",
429
- "category": "formatting",
430
- "file": "utils/formatting/distance.ts"
431
- },
432
- {
433
- "name": "metersToMiles",
434
- "type": "function",
435
- "description": "",
436
- "category": "formatting",
437
- "file": "utils/formatting/distance.ts"
438
- },
439
- {
440
- "name": "metersToYards",
441
- "type": "function",
442
- "description": "",
443
- "category": "formatting",
444
- "file": "utils/formatting/distance.ts"
445
- },
446
- {
447
- "name": "milesToFeet",
448
- "type": "function",
449
- "description": "",
450
- "category": "formatting",
451
- "file": "utils/formatting/distance.ts"
452
- },
453
- {
454
- "name": "milesToKilometers",
455
- "type": "function",
456
- "description": "",
457
- "category": "formatting",
458
- "file": "utils/formatting/distance.ts"
459
- },
460
- {
461
- "name": "milesToMeters",
462
- "type": "function",
463
- "description": "",
464
- "category": "formatting",
465
- "file": "utils/formatting/distance.ts"
466
- },
467
- {
468
- "name": "parseBoolean",
469
- "type": "function",
470
- "description": "Parse various truthy/falsy values to boolean",
471
- "category": "formatting",
472
- "file": "utils/formatting/boolean.ts"
473
- },
474
- {
475
- "name": "snakeCaseToWords",
476
- "type": "function",
477
- "description": "Convert snake_case to words",
478
- "category": "formatting",
479
- "file": "utils/formatting/text.ts"
480
- },
481
- {
482
- "name": "temperatureStringToSymbol",
483
- "type": "function",
484
- "description": "Convert temperature unit string to symbol",
485
- "category": "formatting",
486
- "file": "utils/formatting/temperature.ts"
487
- },
488
- {
489
- "name": "toA",
490
- "type": "constant",
491
- "description": "",
492
- "category": "formatting",
493
- "file": "utils/formatting/current.ts"
494
- },
495
- {
496
- "name": "toActiveInactive",
497
- "type": "constant",
498
- "description": "Format boolean as active/inactive",
499
- "category": "formatting",
500
- "file": "utils/formatting/boolean.ts"
501
- },
502
- {
503
- "name": "toAmps",
504
- "type": "constant",
505
- "description": "Format as amperes",
506
- "category": "formatting",
507
- "file": "utils/formatting/current.ts"
508
- },
509
- {
510
- "name": "toBoolean",
511
- "type": "constant",
512
- "description": "Format boolean value with custom text",
513
- "category": "formatting",
514
- "file": "utils/formatting/boolean.ts"
515
- },
516
- {
517
- "name": "toCelsius",
518
- "type": "constant",
519
- "description": "Format as Celsius",
520
- "category": "formatting",
521
- "file": "utils/formatting/temperature.ts"
522
- },
523
- {
524
- "name": "toCentimeters",
525
- "type": "constant",
526
- "description": "Format as centimeters",
527
- "category": "formatting",
528
- "file": "utils/formatting/distance.ts"
529
- },
530
- {
531
- "name": "toCheckmark",
532
- "type": "constant",
533
- "description": "Format boolean as checkmark/cross",
534
- "category": "formatting",
535
- "file": "utils/formatting/boolean.ts"
536
- },
537
- {
538
- "name": "toCompactNumber",
539
- "type": "constant",
540
- "description": "Format number with compact notation (1K, 1M, etc.)",
541
- "category": "formatting",
542
- "file": "utils/formatting/number.ts"
543
- },
544
- {
545
- "name": "toCurrency",
546
- "type": "constant",
547
- "description": "Format as currency",
548
- "category": "formatting",
549
- "file": "utils/formatting/number.ts"
550
- },
551
- {
552
- "name": "toCustomDateFormat",
553
- "type": "constant",
554
- "description": "Format date with custom format string",
555
- "category": "formatting",
556
- "file": "utils/formatting/date.ts"
557
- },
558
- {
559
- "name": "toDateString",
560
- "type": "constant",
561
- "description": "Format date to a localized string with optional time and timezone.",
562
- "category": "formatting",
563
- "file": "utils/formatting/date.ts"
564
- },
565
- {
566
- "name": "toEnabledDisabled",
567
- "type": "constant",
568
- "description": "Format boolean as enabled/disabled",
569
- "category": "formatting",
570
- "file": "utils/formatting/boolean.ts"
571
- },
572
- {
573
- "name": "toFahrenheit",
574
- "type": "constant",
575
- "description": "Format as Fahrenheit",
576
- "category": "formatting",
577
- "file": "utils/formatting/temperature.ts"
578
- },
579
- {
580
- "name": "toFeet",
581
- "type": "constant",
582
- "description": "Format as feet",
583
- "category": "formatting",
584
- "file": "utils/formatting/distance.ts"
585
- },
586
- {
587
- "name": "toFloat",
588
- "type": "constant",
589
- "description": "Format as float with specified decimals",
590
- "category": "formatting",
591
- "file": "utils/formatting/number.ts"
592
- },
593
- {
594
- "name": "toFormattedNumber",
595
- "type": "constant",
596
- "description": "Format number with thousands separator",
597
- "category": "formatting",
598
- "file": "utils/formatting/number.ts"
599
- },
600
- {
601
- "name": "toFullDateTime",
602
- "type": "constant",
603
- "description": "Format date with full date and time including weekday",
604
- "category": "formatting",
605
- "file": "utils/formatting/date.ts"
606
- },
607
- {
608
- "name": "toGigawatts",
609
- "type": "constant",
610
- "description": "Format as gigawatts",
611
- "category": "formatting",
612
- "file": "utils/formatting/power.ts"
613
- },
614
- {
615
- "name": "toGW",
616
- "type": "constant",
617
- "description": "",
618
- "category": "formatting",
619
- "file": "utils/formatting/power.ts"
620
- },
621
- {
622
- "name": "toGWh",
623
- "type": "constant",
624
- "description": "Format as gigawatt-hours",
625
- "category": "formatting",
626
- "file": "utils/formatting/energy.ts"
627
- },
628
- {
629
- "name": "toInches",
630
- "type": "constant",
631
- "description": "Format as inches",
632
- "category": "formatting",
633
- "file": "utils/formatting/distance.ts"
634
- },
635
- {
636
- "name": "toInteger",
637
- "type": "constant",
638
- "description": "Format as integer",
639
- "category": "formatting",
640
- "file": "utils/formatting/number.ts"
641
- },
642
- {
643
- "name": "toISOString",
644
- "type": "constant",
645
- "description": "Format date to ISO string",
646
- "category": "formatting",
647
- "file": "utils/formatting/date.ts"
648
- },
649
- {
650
- "name": "toKA",
651
- "type": "constant",
652
- "description": "",
653
- "category": "formatting",
654
- "file": "utils/formatting/current.ts"
655
- },
656
- {
657
- "name": "toKelvin",
658
- "type": "constant",
659
- "description": "Format as Kelvin",
660
- "category": "formatting",
661
- "file": "utils/formatting/temperature.ts"
662
- },
663
- {
664
- "name": "toKiloamps",
665
- "type": "constant",
666
- "description": "Format as kiloamps (rarely used but included for completeness)",
667
- "category": "formatting",
668
- "file": "utils/formatting/current.ts"
669
- },
670
- {
671
- "name": "toKilohms",
672
- "type": "constant",
673
- "description": "Format as kilohms",
674
- "category": "formatting",
675
- "file": "utils/formatting/resistance.ts"
676
- },
677
- {
678
- "name": "toKilometers",
679
- "type": "constant",
680
- "description": "Format as kilometers",
681
- "category": "formatting",
682
- "file": "utils/formatting/distance.ts"
683
- },
684
- {
685
- "name": "toKilovolts",
686
- "type": "constant",
687
- "description": "Format as kilovolts",
688
- "category": "formatting",
689
- "file": "utils/formatting/voltage.ts"
690
- },
691
- {
692
- "name": "toKilowatts",
693
- "type": "constant",
694
- "description": "Format as kilowatts",
695
- "category": "formatting",
696
- "file": "utils/formatting/power.ts"
697
- },
698
- {
699
- "name": "toKV",
700
- "type": "constant",
701
- "description": "",
702
- "category": "formatting",
703
- "file": "utils/formatting/voltage.ts"
704
- },
705
- {
706
- "name": "toKW",
707
- "type": "constant",
708
- "description": "",
709
- "category": "formatting",
710
- "file": "utils/formatting/power.ts"
711
- },
712
- {
713
- "name": "tokWh",
714
- "type": "constant",
715
- "description": "Format as kilowatt-hours",
716
- "category": "formatting",
717
- "file": "utils/formatting/energy.ts"
718
- },
719
- {
720
- "name": "toLowerCase",
721
- "type": "function",
722
- "description": "Convert text to lowercase",
723
- "category": "formatting",
724
- "file": "utils/formatting/text.ts"
725
- },
726
- {
727
- "name": "toMA",
728
- "type": "constant",
729
- "description": "",
730
- "category": "formatting",
731
- "file": "utils/formatting/current.ts"
732
- },
733
- {
734
- "name": "toMegawatts",
735
- "type": "constant",
736
- "description": "Format as megawatts",
737
- "category": "formatting",
738
- "file": "utils/formatting/power.ts"
739
- },
740
- {
741
- "name": "toMegohms",
742
- "type": "constant",
743
- "description": "Format as megohms",
744
- "category": "formatting",
745
- "file": "utils/formatting/resistance.ts"
746
- },
747
- {
748
- "name": "toMeters",
749
- "type": "constant",
750
- "description": "Format as meters",
751
- "category": "formatting",
752
- "file": "utils/formatting/distance.ts"
753
- },
754
- {
755
- "name": "toMiles",
756
- "type": "constant",
757
- "description": "Format as miles",
758
- "category": "formatting",
759
- "file": "utils/formatting/distance.ts"
760
- },
761
- {
762
- "name": "toMilliamps",
763
- "type": "constant",
764
- "description": "Format as milliamps",
765
- "category": "formatting",
766
- "file": "utils/formatting/current.ts"
767
- },
768
- {
769
- "name": "toMillimeters",
770
- "type": "constant",
771
- "description": "Format as millimeters",
772
- "category": "formatting",
773
- "file": "utils/formatting/distance.ts"
774
- },
775
- {
776
- "name": "toMilliohms",
777
- "type": "constant",
778
- "description": "Format as milliohms",
779
- "category": "formatting",
780
- "file": "utils/formatting/resistance.ts"
781
- },
782
- {
783
- "name": "toMillivolts",
784
- "type": "constant",
785
- "description": "Format as millivolts",
786
- "category": "formatting",
787
- "file": "utils/formatting/voltage.ts"
788
- },
789
- {
790
- "name": "toMV",
791
- "type": "constant",
792
- "description": "",
793
- "category": "formatting",
794
- "file": "utils/formatting/voltage.ts"
795
- },
796
- {
797
- "name": "toMW",
798
- "type": "constant",
799
- "description": "",
800
- "category": "formatting",
801
- "file": "utils/formatting/power.ts"
802
- },
803
- {
804
- "name": "toMWh",
805
- "type": "constant",
806
- "description": "Format as megawatt-hours",
807
- "category": "formatting",
808
- "file": "utils/formatting/energy.ts"
809
- },
810
- {
811
- "name": "toNauticalMiles",
812
- "type": "constant",
813
- "description": "Format as nautical miles",
814
- "category": "formatting",
815
- "file": "utils/formatting/distance.ts"
816
- },
817
- {
818
- "name": "toOhms",
819
- "type": "constant",
820
- "description": "Format as ohms",
821
- "category": "formatting",
822
- "file": "utils/formatting/resistance.ts"
823
- },
824
- {
825
- "name": "toOnOff",
826
- "type": "constant",
827
- "description": "Format boolean as on/off",
828
- "category": "formatting",
829
- "file": "utils/formatting/boolean.ts"
830
- },
831
- {
832
- "name": "toPercentage",
833
- "type": "constant",
834
- "description": "Format as percentage",
835
- "category": "formatting",
836
- "file": "utils/formatting/number.ts"
837
- },
838
- {
839
- "name": "toRelativeTime",
840
- "type": "constant",
841
- "description": "Format date to relative time (e.g., \"2 hours ago\", \"in 3 days\"). Automatically chooses the most appropriate unit.",
842
- "category": "formatting",
843
- "file": "utils/formatting/date.ts"
844
- },
845
- {
846
- "name": "toScientificNotation",
847
- "type": "constant",
848
- "description": "Format number with scientific notation",
849
- "category": "formatting",
850
- "file": "utils/formatting/number.ts"
851
- },
852
- {
853
- "name": "toSecret",
854
- "type": "function",
855
- "description": "Mask sensitive text (e.g., secrets, API keys)",
856
- "category": "formatting",
857
- "file": "utils/formatting/text.ts"
858
- },
859
- {
860
- "name": "toSentenceCase",
861
- "type": "function",
862
- "description": "Convert text to sentence case (first letter capitalized, rest lowercase).",
863
- "category": "formatting",
864
- "file": "utils/formatting/text.ts"
865
- },
866
- {
867
- "name": "toTemperature",
868
- "type": "constant",
869
- "description": "Format temperature with specified unit",
870
- "category": "formatting",
871
- "file": "utils/formatting/temperature.ts"
872
- },
873
- {
874
- "name": "toTitleCase",
875
- "type": "function",
876
- "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).",
877
- "category": "formatting",
878
- "file": "utils/formatting/text.ts"
879
- },
880
- {
881
- "name": "toTrueFalse",
882
- "type": "constant",
883
- "description": "Format boolean as true/false",
884
- "category": "formatting",
885
- "file": "utils/formatting/boolean.ts"
886
- },
887
- {
888
- "name": "toUpperCase",
889
- "type": "function",
890
- "description": "Convert text to uppercase",
891
- "category": "formatting",
892
- "file": "utils/formatting/text.ts"
893
- },
894
- {
895
- "name": "toV",
896
- "type": "constant",
897
- "description": "",
898
- "category": "formatting",
899
- "file": "utils/formatting/voltage.ts"
900
- },
901
- {
902
- "name": "toVolts",
903
- "type": "constant",
904
- "description": "Format as volts",
905
- "category": "formatting",
906
- "file": "utils/formatting/voltage.ts"
907
- },
908
- {
909
- "name": "toW",
910
- "type": "constant",
911
- "description": "",
912
- "category": "formatting",
913
- "file": "utils/formatting/power.ts"
914
- },
915
- {
916
- "name": "toWatts",
917
- "type": "constant",
918
- "description": "Format as Watts",
919
- "category": "formatting",
920
- "file": "utils/formatting/power.ts"
921
- },
922
- {
923
- "name": "toWh",
924
- "type": "constant",
925
- "description": "Format as Watt-hours",
926
- "category": "formatting",
927
- "file": "utils/formatting/energy.ts"
928
- },
929
- {
930
- "name": "toYards",
931
- "type": "constant",
932
- "description": "Format as yards",
933
- "category": "formatting",
934
- "file": "utils/formatting/distance.ts"
935
- },
936
- {
937
- "name": "truncateEnd",
938
- "type": "constant",
939
- "description": "Truncate text at the end",
940
- "category": "formatting",
941
- "file": "utils/formatting/text.ts"
942
- },
943
- {
944
- "name": "truncateMiddle",
945
- "type": "constant",
946
- "description": "Truncate text in the middle",
947
- "category": "formatting",
948
- "file": "utils/formatting/text.ts"
949
- },
950
- {
951
- "name": "truncateStart",
952
- "type": "constant",
953
- "description": "Truncate text at the start",
954
- "category": "formatting",
955
- "file": "utils/formatting/text.ts"
956
- },
957
- {
958
- "name": "ucFirst",
959
- "type": "function",
960
- "description": "Uppercase first letter only",
961
- "category": "formatting",
962
- "file": "utils/formatting/text.ts"
963
- },
964
- {
965
- "name": "useComponentFormatter",
966
- "type": "function",
967
- "description": "Hook for using the component formatter Provides memoization for better performance",
968
- "category": "formatting",
969
- "file": "utils/formatting/component-formatter.tsx"
970
- },
971
- {
972
- "name": "yardsToMeters",
973
- "type": "function",
974
- "description": "",
975
- "category": "formatting",
976
- "file": "utils/formatting/distance.ts"
977
- }
978
- ]
979
- },
980
- "charts": {
981
- "description": "Chart utilities for data visualization, scaling, and export functionality",
982
- "utilities": [
983
- {
984
- "name": "calculateCumulativeTotals",
985
- "type": "function",
986
- "description": "",
987
- "category": "charts",
988
- "file": "utils/charts/index.ts"
989
- },
990
- {
991
- "name": "createXScale",
992
- "type": "function",
993
- "description": "",
994
- "category": "charts",
995
- "file": "utils/charts/index.ts"
996
- },
997
- {
998
- "name": "createXScale",
999
- "type": "function",
1000
- "description": "",
1001
- "category": "charts",
1002
- "file": "utils/charts.ts"
1003
- },
1004
- {
1005
- "name": "createYScale",
1006
- "type": "constant",
1007
- "description": "",
1008
- "category": "charts",
1009
- "file": "utils/charts/index.ts"
1010
- },
1011
- {
1012
- "name": "createYScale",
1013
- "type": "constant",
1014
- "description": "",
1015
- "category": "charts",
1016
- "file": "utils/charts.ts"
1017
- },
1018
- {
1019
- "name": "defaultMargin",
1020
- "type": "constant",
1021
- "description": "",
1022
- "category": "charts",
1023
- "file": "utils/charts.ts"
1024
- },
1025
- {
1026
- "name": "exportChart",
1027
- "type": "function",
1028
- "description": "Main export function that handles all chart export types. Supports CSV, SVG, and PNG formats with automatic filename generation.",
1029
- "category": "charts",
1030
- "file": "utils/chartExport.ts"
1031
- },
1032
- {
1033
- "name": "getExportFormatName",
1034
- "type": "function",
1035
- "description": "Get human-readable export format name",
1036
- "category": "charts",
1037
- "file": "utils/chartExport.ts"
1038
- },
1039
- {
1040
- "name": "getYFormatSettings",
1041
- "type": "function",
1042
- "description": "",
1043
- "category": "charts",
1044
- "file": "utils/charts/index.ts"
1045
- },
1046
- {
1047
- "name": "getYFormatSettings",
1048
- "type": "function",
1049
- "description": "Get Y-axis format settings from a ComponentFormatter Uses the main formatting system for consistency across all components",
1050
- "category": "charts",
1051
- "file": "utils/charts.ts"
1052
- },
1053
- {
1054
- "name": "isExportSupported",
1055
- "type": "function",
1056
- "description": "Utility to check if export is supported in the current environment",
1057
- "category": "charts",
1058
- "file": "utils/chartExport.ts"
1059
- }
1060
- ]
1061
- },
1062
- "colors": {
1063
- "description": "Color management utilities for theme-aware color resolution, contrast calculation, and palette generation",
1064
- "utilities": [
1065
- {
1066
- "name": "calculateBounds",
1067
- "type": "constant",
1068
- "description": "Calculate min and max bounds from numeric values",
1069
- "category": "colors",
1070
- "file": "utils/colors.ts"
1071
- },
1072
- {
1073
- "name": "calculateCenter",
1074
- "type": "constant",
1075
- "description": "Calculate center point for diverging palettes",
1076
- "category": "colors",
1077
- "file": "utils/colors.ts"
1078
- },
1079
- {
1080
- "name": "clearColorCache",
1081
- "type": "function",
1082
- "description": "Clears the color cache - useful when theme changes",
1083
- "category": "colors",
1084
- "file": "utils/colors.ts"
1085
- },
1086
- {
1087
- "name": "createAutoColorPaint",
1088
- "type": "constant",
1089
- "description": "Automatically assigns categorical colors to Mapbox layer paint properties This makes it easy for consumers to get great colors without manual assignment",
1090
- "category": "colors",
1091
- "file": "utils/colors.ts"
1092
- },
1093
- {
1094
- "name": "createCategoricalMapping",
1095
- "type": "constant",
1096
- "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",
1097
- "category": "colors",
1098
- "file": "utils/colors.ts"
1099
- },
1100
- {
1101
- "name": "createCategoryColorMap",
1102
- "type": "constant",
1103
- "description": "Maps categories to colors based on a color scheme",
1104
- "category": "colors",
1105
- "file": "utils/colors.ts"
1106
- },
1107
- {
1108
- "name": "createDataLayer",
1109
- "type": "constant",
1110
- "description": "Creates a complete layer configuration with automatic color assignment Perfect for consumers who just want to pass data and get great colors",
1111
- "category": "colors",
1112
- "file": "utils/colors.ts"
1113
- },
1114
- {
1115
- "name": "createDivergingMapping",
1116
- "type": "constant",
1117
- "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",
1118
- "category": "colors",
1119
- "file": "utils/colors.ts"
1120
- },
1121
- {
1122
- "name": "createSequentialMapping",
1123
- "type": "constant",
1124
- "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",
1125
- "category": "colors",
1126
- "file": "utils/colors.ts"
1127
- },
1128
- {
1129
- "name": "extractNumericValues",
1130
- "type": "constant",
1131
- "description": "Extract numeric values from GeoJSON data for sequential/diverging palettes",
1132
- "category": "colors",
1133
- "file": "utils/colors.ts"
1134
- },
1135
- {
1136
- "name": "extractUniqueValues",
1137
- "type": "constant",
1138
- "description": "Extracts unique values for a given property from GeoJSON FeatureCollection",
1139
- "category": "colors",
1140
- "file": "utils/colors.ts"
1141
- },
1142
- {
1143
- "name": "getColorFromDivergingScale",
1144
- "type": "constant",
1145
- "description": "Get color from diverging scale for a given value Uses existing diverging palettes to interpolate color based on value position relative to center",
1146
- "category": "colors",
1147
- "file": "utils/colors.ts"
1148
- },
1149
- {
1150
- "name": "getColorFromSequentialScale",
1151
- "type": "constant",
1152
- "description": "Get color from sequential scale for a given value Uses existing sequential palettes to interpolate color based on value position in range",
1153
- "category": "colors",
1154
- "file": "utils/colors.ts"
1155
- },
1156
- {
1157
- "name": "getContrastingTextColor",
1158
- "type": "function",
1159
- "description": "Gets contrasting text color for a background",
1160
- "category": "colors",
1161
- "file": "utils/colors.ts"
1162
- },
1163
- {
1164
- "name": "getDefaultChartColor",
1165
- "type": "function",
1166
- "description": "Gets the default chart color from theme",
1167
- "category": "colors",
1168
- "file": "utils/colors.ts"
1169
- },
1170
- {
1171
- "name": "getDefaultColors",
1172
- "type": "function",
1173
- "description": "Default color palette matching the edges design system",
1174
- "category": "colors",
1175
- "file": "utils/colors.ts"
1176
- },
1177
- {
1178
- "name": "getDivergingColors",
1179
- "type": "function",
1180
- "description": "Get colors for a specific diverging palette",
1181
- "category": "colors",
1182
- "file": "utils/colors.ts"
1183
- },
1184
- {
1185
- "name": "getResolvedColor",
1186
- "type": "constant",
1187
- "description": "Resolves a CSS variable to its computed color value Supports multiple formats and automatically adds the color- prefix if needed",
1188
- "category": "colors",
1189
- "file": "utils/colors.ts"
1190
- },
1191
- {
1192
- "name": "getSequentialColors",
1193
- "type": "function",
1194
- "description": "Get colors for a specific sequential palette",
1195
- "category": "colors",
1196
- "file": "utils/colors.ts"
1197
- },
1198
- {
1199
- "name": "getThemeCategoricalColors",
1200
- "type": "function",
1201
- "description": "Gets theme colors from CSS variables Returns an array of resolved color values",
1202
- "category": "colors",
1203
- "file": "utils/colors.ts"
1204
- },
1205
- {
1206
- "name": "isLightColor",
1207
- "type": "function",
1208
- "description": "Determines if a color is light or dark Useful for determining text color on colored backgrounds",
1209
- "category": "colors",
1210
- "file": "utils/colors.ts"
1211
- },
1212
- {
1213
- "name": "mapValuesToCategoricalColors",
1214
- "type": "constant",
1215
- "description": "Maps unique values to categorical colors with looping",
1216
- "category": "colors",
1217
- "file": "utils/colors.ts"
1218
- }
1219
- ]
1220
- }
1221
- }
1222
- }