@rfkit/charts 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui/dialog.d.ts +5 -5
- package/components/ui/dropdown-menu.d.ts +3 -3
- package/components/ui/popover.d.ts +3 -3
- package/components/ui/select.d.ts +3 -3
- package/components/ui/separator.d.ts +1 -1
- package/components/ui/tabs.d.ts +1 -1
- package/components/ui/tooltip.d.ts +4 -4
- package/hooks/useChart/index.d.ts +1 -1
- package/index.d.ts +1 -1
- package/index.js +725 -375
- package/modules/Dial/index.d.ts +1 -1
- package/modules/IQEye/index.d.ts +1 -1
- package/modules/IQPlanisphere/index.d.ts +1 -1
- package/modules/Spectrum/AxisYCanvas/index.d.ts +1 -1
- package/modules/Spectrum/BandLayer/bandState.d.ts +9 -0
- package/package.json +1 -1
- package/store/bandState.d.ts +7 -0
- package/types/publish.d.ts +2 -2
- package/types/store/index.d.ts +3 -3
- package/types/store/ui.d.ts +53 -2
- package/utils/object.d.ts +1 -1
package/index.js
CHANGED
|
@@ -79,6 +79,10 @@ var __webpack_modules__ = {
|
|
|
79
79
|
module.id,
|
|
80
80
|
`@layer properties {
|
|
81
81
|
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
82
|
+
[data-rfkit-charts-root], [data-rfkit-charts-root] {
|
|
83
|
+
--shimmer-angle: 20deg;
|
|
84
|
+
}
|
|
85
|
+
|
|
82
86
|
[data-rfkit-charts-root] *, [data-rfkit-charts-root] :before, [data-rfkit-charts-root] :after {
|
|
83
87
|
--tw-animation-delay: 0s;
|
|
84
88
|
--tw-animation-direction: normal;
|
|
@@ -97,6 +101,13 @@ var __webpack_modules__ = {
|
|
|
97
101
|
--tw-exit-scale: 1;
|
|
98
102
|
--tw-exit-translate-x: 0;
|
|
99
103
|
--tw-exit-translate-y: 0;
|
|
104
|
+
--scroll-fade-t: 0px;
|
|
105
|
+
--scroll-fade-b: 0px;
|
|
106
|
+
--scroll-fade-s: 0px;
|
|
107
|
+
--scroll-fade-e: 0px;
|
|
108
|
+
--scroll-fade-mask: initial;
|
|
109
|
+
--shimmer-image: initial;
|
|
110
|
+
--shimmer-text-fill: initial;
|
|
100
111
|
--tw-translate-x: 0;
|
|
101
112
|
--tw-translate-y: 0;
|
|
102
113
|
--tw-translate-z: 0;
|
|
@@ -170,6 +181,13 @@ var __webpack_modules__ = {
|
|
|
170
181
|
--tw-exit-scale: 1;
|
|
171
182
|
--tw-exit-translate-x: 0;
|
|
172
183
|
--tw-exit-translate-y: 0;
|
|
184
|
+
--scroll-fade-t: 0px;
|
|
185
|
+
--scroll-fade-b: 0px;
|
|
186
|
+
--scroll-fade-s: 0px;
|
|
187
|
+
--scroll-fade-e: 0px;
|
|
188
|
+
--scroll-fade-mask: initial;
|
|
189
|
+
--shimmer-image: initial;
|
|
190
|
+
--shimmer-text-fill: initial;
|
|
173
191
|
--tw-translate-x: 0;
|
|
174
192
|
--tw-translate-y: 0;
|
|
175
193
|
--tw-translate-z: 0;
|
|
@@ -367,6 +385,59 @@ var __webpack_modules__ = {
|
|
|
367
385
|
initial-value: 0;
|
|
368
386
|
}
|
|
369
387
|
|
|
388
|
+
@property --scroll-fade-t {
|
|
389
|
+
syntax: "<length-percentage>";
|
|
390
|
+
inherits: false;
|
|
391
|
+
initial-value: 0;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
@property --scroll-fade-b {
|
|
395
|
+
syntax: "<length-percentage>";
|
|
396
|
+
inherits: false;
|
|
397
|
+
initial-value: 0;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
@property --scroll-fade-s {
|
|
401
|
+
syntax: "<length-percentage>";
|
|
402
|
+
inherits: false;
|
|
403
|
+
initial-value: 0;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
@property --scroll-fade-e {
|
|
407
|
+
syntax: "<length-percentage>";
|
|
408
|
+
inherits: false;
|
|
409
|
+
initial-value: 0;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
@property --scroll-fade-mask {
|
|
413
|
+
syntax: "*";
|
|
414
|
+
inherits: false
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
@property --shimmer-angle {
|
|
418
|
+
syntax: "<angle>";
|
|
419
|
+
inherits: true;
|
|
420
|
+
initial-value: 20deg;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
@property --shimmer-image {
|
|
424
|
+
syntax: "*";
|
|
425
|
+
inherits: false
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
@property --shimmer-text-fill {
|
|
429
|
+
syntax: "*";
|
|
430
|
+
inherits: false
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
@media (prefers-reduced-motion: reduce) {
|
|
434
|
+
[data-rfkit-charts-root] .shimmer {
|
|
435
|
+
-webkit-text-fill-color: currentColor;
|
|
436
|
+
background-image: none;
|
|
437
|
+
animation: none;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
370
441
|
[data-rfkit-charts-root] .pointer-events-auto {
|
|
371
442
|
pointer-events: auto;
|
|
372
443
|
}
|
|
@@ -412,23 +483,15 @@ var __webpack_modules__ = {
|
|
|
412
483
|
}
|
|
413
484
|
|
|
414
485
|
[data-rfkit-charts-root] .inset-0 {
|
|
415
|
-
inset:
|
|
486
|
+
inset: 0;
|
|
416
487
|
}
|
|
417
488
|
|
|
418
489
|
[data-rfkit-charts-root] .inset-x-0 {
|
|
419
|
-
inset-inline:
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
[data-rfkit-charts-root] .start {
|
|
423
|
-
inset-inline-start: var(--spacing);
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
[data-rfkit-charts-root] .end {
|
|
427
|
-
inset-inline-end: var(--spacing);
|
|
490
|
+
inset-inline: 0;
|
|
428
491
|
}
|
|
429
492
|
|
|
430
493
|
[data-rfkit-charts-root] .top-0 {
|
|
431
|
-
top:
|
|
494
|
+
top: 0;
|
|
432
495
|
}
|
|
433
496
|
|
|
434
497
|
[data-rfkit-charts-root] .top-1\\/2 {
|
|
@@ -460,7 +523,7 @@ var __webpack_modules__ = {
|
|
|
460
523
|
}
|
|
461
524
|
|
|
462
525
|
[data-rfkit-charts-root] .right-0 {
|
|
463
|
-
right:
|
|
526
|
+
right: 0;
|
|
464
527
|
}
|
|
465
528
|
|
|
466
529
|
[data-rfkit-charts-root] .right-4 {
|
|
@@ -480,7 +543,7 @@ var __webpack_modules__ = {
|
|
|
480
543
|
}
|
|
481
544
|
|
|
482
545
|
[data-rfkit-charts-root] .bottom-0 {
|
|
483
|
-
bottom:
|
|
546
|
+
bottom: 0;
|
|
484
547
|
}
|
|
485
548
|
|
|
486
549
|
[data-rfkit-charts-root] .bottom-5 {
|
|
@@ -492,7 +555,7 @@ var __webpack_modules__ = {
|
|
|
492
555
|
}
|
|
493
556
|
|
|
494
557
|
[data-rfkit-charts-root] .left-0 {
|
|
495
|
-
left:
|
|
558
|
+
left: 0;
|
|
496
559
|
}
|
|
497
560
|
|
|
498
561
|
[data-rfkit-charts-root] .left-1\\/2 {
|
|
@@ -622,7 +685,7 @@ var __webpack_modules__ = {
|
|
|
622
685
|
}
|
|
623
686
|
|
|
624
687
|
[data-rfkit-charts-root] .m-0 {
|
|
625
|
-
margin:
|
|
688
|
+
margin: 0;
|
|
626
689
|
}
|
|
627
690
|
|
|
628
691
|
[data-rfkit-charts-root] .-mx-1 {
|
|
@@ -630,11 +693,11 @@ var __webpack_modules__ = {
|
|
|
630
693
|
}
|
|
631
694
|
|
|
632
695
|
[data-rfkit-charts-root] .mx-1 {
|
|
633
|
-
margin-inline:
|
|
696
|
+
margin-inline: var(--spacing);
|
|
634
697
|
}
|
|
635
698
|
|
|
636
699
|
[data-rfkit-charts-root] .my-1 {
|
|
637
|
-
margin-block:
|
|
700
|
+
margin-block: var(--spacing);
|
|
638
701
|
}
|
|
639
702
|
|
|
640
703
|
[data-rfkit-charts-root] .my-\\[calc\\(var\\(--size-gap-base\\)\\/2\\)\\] {
|
|
@@ -646,7 +709,7 @@ var __webpack_modules__ = {
|
|
|
646
709
|
}
|
|
647
710
|
|
|
648
711
|
[data-rfkit-charts-root] .mt-1 {
|
|
649
|
-
margin-top:
|
|
712
|
+
margin-top: var(--spacing);
|
|
650
713
|
}
|
|
651
714
|
|
|
652
715
|
[data-rfkit-charts-root] .mt-2 {
|
|
@@ -670,11 +733,11 @@ var __webpack_modules__ = {
|
|
|
670
733
|
}
|
|
671
734
|
|
|
672
735
|
[data-rfkit-charts-root] .mr-1 {
|
|
673
|
-
margin-right:
|
|
736
|
+
margin-right: var(--spacing);
|
|
674
737
|
}
|
|
675
738
|
|
|
676
739
|
[data-rfkit-charts-root] .mb-1 {
|
|
677
|
-
margin-bottom:
|
|
740
|
+
margin-bottom: var(--spacing);
|
|
678
741
|
}
|
|
679
742
|
|
|
680
743
|
[data-rfkit-charts-root] .mb-2 {
|
|
@@ -749,7 +812,7 @@ var __webpack_modules__ = {
|
|
|
749
812
|
}
|
|
750
813
|
|
|
751
814
|
[data-rfkit-charts-root] .h-0 {
|
|
752
|
-
height:
|
|
815
|
+
height: 0;
|
|
753
816
|
}
|
|
754
817
|
|
|
755
818
|
[data-rfkit-charts-root] .h-1\\.5 {
|
|
@@ -845,7 +908,7 @@ var __webpack_modules__ = {
|
|
|
845
908
|
}
|
|
846
909
|
|
|
847
910
|
[data-rfkit-charts-root] .min-h-0 {
|
|
848
|
-
min-height:
|
|
911
|
+
min-height: 0;
|
|
849
912
|
}
|
|
850
913
|
|
|
851
914
|
[data-rfkit-charts-root] .min-h-\\[30\\%\\] {
|
|
@@ -873,7 +936,7 @@ var __webpack_modules__ = {
|
|
|
873
936
|
}
|
|
874
937
|
|
|
875
938
|
[data-rfkit-charts-root] .w-0 {
|
|
876
|
-
width:
|
|
939
|
+
width: 0;
|
|
877
940
|
}
|
|
878
941
|
|
|
879
942
|
[data-rfkit-charts-root] .w-2\\.5 {
|
|
@@ -978,7 +1041,7 @@ var __webpack_modules__ = {
|
|
|
978
1041
|
}
|
|
979
1042
|
|
|
980
1043
|
[data-rfkit-charts-root] .min-w-0 {
|
|
981
|
-
min-width:
|
|
1044
|
+
min-width: 0;
|
|
982
1045
|
}
|
|
983
1046
|
|
|
984
1047
|
[data-rfkit-charts-root] .min-w-4 {
|
|
@@ -1060,7 +1123,7 @@ var __webpack_modules__ = {
|
|
|
1060
1123
|
}
|
|
1061
1124
|
|
|
1062
1125
|
[data-rfkit-charts-root] .translate-x-0 {
|
|
1063
|
-
--tw-translate-x:
|
|
1126
|
+
--tw-translate-x: 0;
|
|
1064
1127
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1065
1128
|
}
|
|
1066
1129
|
|
|
@@ -1075,7 +1138,7 @@ var __webpack_modules__ = {
|
|
|
1075
1138
|
}
|
|
1076
1139
|
|
|
1077
1140
|
[data-rfkit-charts-root] .translate-y-0 {
|
|
1078
|
-
--tw-translate-y:
|
|
1141
|
+
--tw-translate-y: 0;
|
|
1079
1142
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1080
1143
|
}
|
|
1081
1144
|
|
|
@@ -1201,7 +1264,7 @@ var __webpack_modules__ = {
|
|
|
1201
1264
|
}
|
|
1202
1265
|
|
|
1203
1266
|
[data-rfkit-charts-root] .gap-0 {
|
|
1204
|
-
gap:
|
|
1267
|
+
gap: 0;
|
|
1205
1268
|
}
|
|
1206
1269
|
|
|
1207
1270
|
[data-rfkit-charts-root] .gap-0\\.5 {
|
|
@@ -1209,7 +1272,7 @@ var __webpack_modules__ = {
|
|
|
1209
1272
|
}
|
|
1210
1273
|
|
|
1211
1274
|
[data-rfkit-charts-root] .gap-1 {
|
|
1212
|
-
gap:
|
|
1275
|
+
gap: var(--spacing);
|
|
1213
1276
|
}
|
|
1214
1277
|
|
|
1215
1278
|
[data-rfkit-charts-root] .gap-1\\.5 {
|
|
@@ -1238,8 +1301,8 @@ var __webpack_modules__ = {
|
|
|
1238
1301
|
|
|
1239
1302
|
[data-rfkit-charts-root] :where(.space-y-1 > :not(:last-child)) {
|
|
1240
1303
|
--tw-space-y-reverse: 0;
|
|
1241
|
-
margin-block-start: calc(
|
|
1242
|
-
margin-block-end: calc(
|
|
1304
|
+
margin-block-start: calc(var(--spacing) * var(--tw-space-y-reverse));
|
|
1305
|
+
margin-block-end: calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)));
|
|
1243
1306
|
}
|
|
1244
1307
|
|
|
1245
1308
|
[data-rfkit-charts-root] :where(.space-y-2 > :not(:last-child)) {
|
|
@@ -1249,7 +1312,7 @@ var __webpack_modules__ = {
|
|
|
1249
1312
|
}
|
|
1250
1313
|
|
|
1251
1314
|
[data-rfkit-charts-root] .gap-x-1 {
|
|
1252
|
-
column-gap:
|
|
1315
|
+
column-gap: var(--spacing);
|
|
1253
1316
|
}
|
|
1254
1317
|
|
|
1255
1318
|
[data-rfkit-charts-root] .gap-x-3 {
|
|
@@ -1265,7 +1328,7 @@ var __webpack_modules__ = {
|
|
|
1265
1328
|
}
|
|
1266
1329
|
|
|
1267
1330
|
[data-rfkit-charts-root] .gap-y-1 {
|
|
1268
|
-
row-gap:
|
|
1331
|
+
row-gap: var(--spacing);
|
|
1269
1332
|
}
|
|
1270
1333
|
|
|
1271
1334
|
[data-rfkit-charts-root] .gap-y-2 {
|
|
@@ -1658,7 +1721,7 @@ var __webpack_modules__ = {
|
|
|
1658
1721
|
}
|
|
1659
1722
|
|
|
1660
1723
|
[data-rfkit-charts-root] .p-0 {
|
|
1661
|
-
padding:
|
|
1724
|
+
padding: 0;
|
|
1662
1725
|
}
|
|
1663
1726
|
|
|
1664
1727
|
[data-rfkit-charts-root] .p-0\\.5 {
|
|
@@ -1666,7 +1729,7 @@ var __webpack_modules__ = {
|
|
|
1666
1729
|
}
|
|
1667
1730
|
|
|
1668
1731
|
[data-rfkit-charts-root] .p-1 {
|
|
1669
|
-
padding:
|
|
1732
|
+
padding: var(--spacing);
|
|
1670
1733
|
}
|
|
1671
1734
|
|
|
1672
1735
|
[data-rfkit-charts-root] .p-2 {
|
|
@@ -1702,7 +1765,7 @@ var __webpack_modules__ = {
|
|
|
1702
1765
|
}
|
|
1703
1766
|
|
|
1704
1767
|
[data-rfkit-charts-root] .px-1 {
|
|
1705
|
-
padding-inline:
|
|
1768
|
+
padding-inline: var(--spacing);
|
|
1706
1769
|
}
|
|
1707
1770
|
|
|
1708
1771
|
[data-rfkit-charts-root] .px-1\\.5 {
|
|
@@ -1742,7 +1805,7 @@ var __webpack_modules__ = {
|
|
|
1742
1805
|
}
|
|
1743
1806
|
|
|
1744
1807
|
[data-rfkit-charts-root] .py-1 {
|
|
1745
|
-
padding-block:
|
|
1808
|
+
padding-block: var(--spacing);
|
|
1746
1809
|
}
|
|
1747
1810
|
|
|
1748
1811
|
[data-rfkit-charts-root] .py-1\\.5 {
|
|
@@ -1758,11 +1821,11 @@ var __webpack_modules__ = {
|
|
|
1758
1821
|
}
|
|
1759
1822
|
|
|
1760
1823
|
[data-rfkit-charts-root] .pt-0 {
|
|
1761
|
-
padding-top:
|
|
1824
|
+
padding-top: 0;
|
|
1762
1825
|
}
|
|
1763
1826
|
|
|
1764
1827
|
[data-rfkit-charts-root] .pt-1 {
|
|
1765
|
-
padding-top:
|
|
1828
|
+
padding-top: var(--spacing);
|
|
1766
1829
|
}
|
|
1767
1830
|
|
|
1768
1831
|
[data-rfkit-charts-root] .pt-\\[calc\\(var\\(--size-gap-base\\)\\/2\\)\\] {
|
|
@@ -1770,7 +1833,7 @@ var __webpack_modules__ = {
|
|
|
1770
1833
|
}
|
|
1771
1834
|
|
|
1772
1835
|
[data-rfkit-charts-root] .pr-0 {
|
|
1773
|
-
padding-right:
|
|
1836
|
+
padding-right: 0;
|
|
1774
1837
|
}
|
|
1775
1838
|
|
|
1776
1839
|
[data-rfkit-charts-root] .pr-0\\.5 {
|
|
@@ -1778,7 +1841,7 @@ var __webpack_modules__ = {
|
|
|
1778
1841
|
}
|
|
1779
1842
|
|
|
1780
1843
|
[data-rfkit-charts-root] .pr-1 {
|
|
1781
|
-
padding-right:
|
|
1844
|
+
padding-right: var(--spacing);
|
|
1782
1845
|
}
|
|
1783
1846
|
|
|
1784
1847
|
[data-rfkit-charts-root] .pr-2 {
|
|
@@ -1786,11 +1849,11 @@ var __webpack_modules__ = {
|
|
|
1786
1849
|
}
|
|
1787
1850
|
|
|
1788
1851
|
[data-rfkit-charts-root] .pb-0 {
|
|
1789
|
-
padding-bottom:
|
|
1852
|
+
padding-bottom: 0;
|
|
1790
1853
|
}
|
|
1791
1854
|
|
|
1792
1855
|
[data-rfkit-charts-root] .pb-1 {
|
|
1793
|
-
padding-bottom:
|
|
1856
|
+
padding-bottom: var(--spacing);
|
|
1794
1857
|
}
|
|
1795
1858
|
|
|
1796
1859
|
[data-rfkit-charts-root] .pl-0\\.5 {
|
|
@@ -2574,7 +2637,7 @@ var __webpack_modules__ = {
|
|
|
2574
2637
|
}
|
|
2575
2638
|
|
|
2576
2639
|
[data-rfkit-charts-root] .data-\\[side\\=bottom\\]\\:translate-y-1[data-side="bottom"] {
|
|
2577
|
-
--tw-translate-y:
|
|
2640
|
+
--tw-translate-y: var(--spacing);
|
|
2578
2641
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2579
2642
|
}
|
|
2580
2643
|
|
|
@@ -2592,7 +2655,7 @@ var __webpack_modules__ = {
|
|
|
2592
2655
|
}
|
|
2593
2656
|
|
|
2594
2657
|
[data-rfkit-charts-root] .data-\\[side\\=right\\]\\:translate-x-1[data-side="right"] {
|
|
2595
|
-
--tw-translate-x:
|
|
2658
|
+
--tw-translate-x: var(--spacing);
|
|
2596
2659
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2597
2660
|
}
|
|
2598
2661
|
|
|
@@ -2700,7 +2763,7 @@ var __webpack_modules__ = {
|
|
|
2700
2763
|
}
|
|
2701
2764
|
|
|
2702
2765
|
[data-rfkit-charts-root] .data-\\[state\\=unchecked\\]\\:translate-x-0[data-state="unchecked"] {
|
|
2703
|
-
--tw-translate-x:
|
|
2766
|
+
--tw-translate-x: 0;
|
|
2704
2767
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2705
2768
|
}
|
|
2706
2769
|
|
|
@@ -5082,7 +5145,9 @@ function isRangeIntersectSegment(range, segment) {
|
|
|
5082
5145
|
}
|
|
5083
5146
|
const isPlainObject = (value1)=>'[object Object]' === Object.prototype.toString.call(value1) && null !== value1;
|
|
5084
5147
|
const mergeObjects = (source, params)=>{
|
|
5085
|
-
const target =
|
|
5148
|
+
const target = {
|
|
5149
|
+
...source
|
|
5150
|
+
};
|
|
5086
5151
|
Object.keys(target).forEach((key)=>{
|
|
5087
5152
|
const paramValue = params[key];
|
|
5088
5153
|
if (isPlainObject(paramValue) && isPlainObject(target[key])) target[key] = {
|
|
@@ -5198,6 +5263,66 @@ const convertToTimestampedArrays = (data, timestamps)=>{
|
|
|
5198
5263
|
return frame;
|
|
5199
5264
|
});
|
|
5200
5265
|
};
|
|
5266
|
+
const BandKind = {
|
|
5267
|
+
Position: 'position',
|
|
5268
|
+
CenterBandwidth: 'centerBandwidth',
|
|
5269
|
+
FrequencyRange: 'frequencyRange'
|
|
5270
|
+
};
|
|
5271
|
+
const DEFAULT_BAND_STATE = {
|
|
5272
|
+
kind: BandKind.Position,
|
|
5273
|
+
show: false,
|
|
5274
|
+
left: void 0,
|
|
5275
|
+
width: 0,
|
|
5276
|
+
color: ''
|
|
5277
|
+
};
|
|
5278
|
+
const hasOwn = (value1, key)=>Object.hasOwn(value1, key);
|
|
5279
|
+
const isFiniteNumber = (value1)=>'number' == typeof value1 && Number.isFinite(value1);
|
|
5280
|
+
const hasValidSharedFields = (input)=>(!hasOwn(input, 'show') || 'boolean' == typeof input.show) && (!hasOwn(input, 'color') || void 0 === input.color || 'string' == typeof input.color);
|
|
5281
|
+
const resolveSharedState = (input, current, strategy)=>({
|
|
5282
|
+
show: 'boolean' == typeof input.show ? input.show : 'merge' === strategy ? current.show : true,
|
|
5283
|
+
color: hasOwn(input, 'color') ? input.color : 'merge' === strategy ? current.color : void 0
|
|
5284
|
+
});
|
|
5285
|
+
function resolveBandState(input, current = DEFAULT_BAND_STATE, strategy = 'replace') {
|
|
5286
|
+
if (!hasValidSharedFields(input)) return current;
|
|
5287
|
+
const hasPosition = hasOwn(input, 'left') || hasOwn(input, 'width');
|
|
5288
|
+
const hasCenter = hasOwn(input, 'frequency') || hasOwn(input, 'bandwidth');
|
|
5289
|
+
const hasRange = hasOwn(input, 'startFrequency') || hasOwn(input, 'stopFrequency');
|
|
5290
|
+
const modeCount = Number(hasPosition) + Number(hasCenter) + Number(hasRange);
|
|
5291
|
+
if (modeCount > 1) return current;
|
|
5292
|
+
const shared = resolveSharedState(input, current, strategy);
|
|
5293
|
+
if (hasCenter) {
|
|
5294
|
+
if (!isFiniteNumber(input.frequency) || !isFiniteNumber(input.bandwidth) || input.bandwidth <= 0) return current;
|
|
5295
|
+
return {
|
|
5296
|
+
kind: BandKind.CenterBandwidth,
|
|
5297
|
+
...shared,
|
|
5298
|
+
frequency: input.frequency,
|
|
5299
|
+
bandwidth: input.bandwidth
|
|
5300
|
+
};
|
|
5301
|
+
}
|
|
5302
|
+
if (hasRange) {
|
|
5303
|
+
if (!isFiniteNumber(input.startFrequency) || !isFiniteNumber(input.stopFrequency) || input.stopFrequency <= input.startFrequency) return current;
|
|
5304
|
+
return {
|
|
5305
|
+
kind: BandKind.FrequencyRange,
|
|
5306
|
+
...shared,
|
|
5307
|
+
startFrequency: input.startFrequency,
|
|
5308
|
+
stopFrequency: input.stopFrequency
|
|
5309
|
+
};
|
|
5310
|
+
}
|
|
5311
|
+
if (hasPosition) {
|
|
5312
|
+
if (hasOwn(input, 'left') && void 0 !== input.left && !isFiniteNumber(input.left) || hasOwn(input, 'width') && void 0 !== input.width && !isFiniteNumber(input.width)) return current;
|
|
5313
|
+
const currentPosition = current.kind === BandKind.Position ? current : void 0;
|
|
5314
|
+
return {
|
|
5315
|
+
kind: BandKind.Position,
|
|
5316
|
+
...shared,
|
|
5317
|
+
left: hasOwn(input, 'left') ? input.left : 'merge' === strategy ? currentPosition?.left : void 0,
|
|
5318
|
+
width: hasOwn(input, 'width') ? input.width ?? 0 : 'merge' === strategy ? currentPosition?.width ?? 0 : 0
|
|
5319
|
+
};
|
|
5320
|
+
}
|
|
5321
|
+
return {
|
|
5322
|
+
...current,
|
|
5323
|
+
...shared
|
|
5324
|
+
};
|
|
5325
|
+
}
|
|
5201
5326
|
const AppContext = __WEBPACK_EXTERNAL_MODULE_react__["default"].createContext(null);
|
|
5202
5327
|
const store_context = AppContext;
|
|
5203
5328
|
var heatmap_HeatmapCaptureType = /*#__PURE__*/ function(HeatmapCaptureType) {
|
|
@@ -5380,6 +5505,7 @@ function createParams() {
|
|
|
5380
5505
|
onChange: ()=>{}
|
|
5381
5506
|
},
|
|
5382
5507
|
band: {
|
|
5508
|
+
kind: BandKind.Position,
|
|
5383
5509
|
show: false,
|
|
5384
5510
|
left: void 0,
|
|
5385
5511
|
width: 0,
|
|
@@ -5950,6 +6076,14 @@ const Params_Params = (props)=>{
|
|
|
5950
6076
|
const prevValue = prevPropsRef.current[name];
|
|
5951
6077
|
const stateKey = name;
|
|
5952
6078
|
if (void 0 !== currentValue && currentValue !== prevValue) {
|
|
6079
|
+
if ('band' === name) {
|
|
6080
|
+
const nextBand = resolveBandState(currentValue, currentState.band, 'merge');
|
|
6081
|
+
if (nextBand !== currentState.band) {
|
|
6082
|
+
payload.band = nextBand;
|
|
6083
|
+
hasChanges = true;
|
|
6084
|
+
}
|
|
6085
|
+
continue;
|
|
6086
|
+
}
|
|
5953
6087
|
payload[stateKey] = mergeParameter(stateKey, currentValue, currentState);
|
|
5954
6088
|
hasChanges = true;
|
|
5955
6089
|
}
|
|
@@ -6153,16 +6287,24 @@ function useStore_useSelector(selector) {
|
|
|
6153
6287
|
const { store } = useAppContext();
|
|
6154
6288
|
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useSyncExternalStore)(store.subscribe, ()=>selector(store.getState()), ()=>selector(store.getState()));
|
|
6155
6289
|
}
|
|
6290
|
+
function useStoreApi() {
|
|
6291
|
+
return useAppContext();
|
|
6292
|
+
}
|
|
6156
6293
|
function useStoreDispatch() {
|
|
6157
6294
|
return useAppContext().dispatch;
|
|
6158
6295
|
}
|
|
6159
6296
|
const Store = (props)=>{
|
|
6160
6297
|
const { children } = props;
|
|
6161
6298
|
const initialStateRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
6162
|
-
if (!initialStateRef.current)
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6299
|
+
if (!initialStateRef.current) {
|
|
6300
|
+
const defaultState = createParams();
|
|
6301
|
+
const initialState = mergeObjects(defaultState, {
|
|
6302
|
+
...props,
|
|
6303
|
+
axisY: normalizeAxisYProps(props.axisY)
|
|
6304
|
+
});
|
|
6305
|
+
if (props.band) initialState.band = resolveBandState(props.band, defaultState.band, 'merge');
|
|
6306
|
+
initialStateRef.current = initialState;
|
|
6307
|
+
}
|
|
6166
6308
|
const runtimeRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
6167
6309
|
if (!runtimeRef.current && initialStateRef.current) runtimeRef.current = createChartRuntime(initialStateRef.current);
|
|
6168
6310
|
if (!runtimeRef.current) throw new Error('Failed to initialize chart runtime');
|
|
@@ -6680,11 +6822,18 @@ const createConfigUtils = (config)=>({
|
|
|
6680
6822
|
cache: createLruCache(config.cacheSize),
|
|
6681
6823
|
parseClassName: createParseClassName(config),
|
|
6682
6824
|
sortModifiers: createSortModifiers(config),
|
|
6825
|
+
postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config),
|
|
6683
6826
|
...createClassGroupUtils(config)
|
|
6684
6827
|
});
|
|
6828
|
+
const createPostfixLookupClassGroupIds = (config)=>{
|
|
6829
|
+
const lookup = Object.create(null);
|
|
6830
|
+
const classGroupIds = config.postfixLookupClassGroups;
|
|
6831
|
+
if (classGroupIds) for(let i = 0; i < classGroupIds.length; i++)lookup[classGroupIds[i]] = true;
|
|
6832
|
+
return lookup;
|
|
6833
|
+
};
|
|
6685
6834
|
const SPLIT_CLASSES_REGEX = /\s+/;
|
|
6686
6835
|
const mergeClassList = (classList, configUtils)=>{
|
|
6687
|
-
const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers } = configUtils;
|
|
6836
|
+
const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers, postfixLookupClassGroupIds } = configUtils;
|
|
6688
6837
|
const classGroupsInConflict = [];
|
|
6689
6838
|
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
6690
6839
|
let result = '';
|
|
@@ -6696,7 +6845,16 @@ const mergeClassList = (classList, configUtils)=>{
|
|
|
6696
6845
|
continue;
|
|
6697
6846
|
}
|
|
6698
6847
|
let hasPostfixModifier = !!maybePostfixModifierPosition;
|
|
6699
|
-
let classGroupId
|
|
6848
|
+
let classGroupId;
|
|
6849
|
+
if (hasPostfixModifier) {
|
|
6850
|
+
const baseClassNameWithoutPostfix = baseClassName.substring(0, maybePostfixModifierPosition);
|
|
6851
|
+
classGroupId = getClassGroupId(baseClassNameWithoutPostfix);
|
|
6852
|
+
const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : void 0;
|
|
6853
|
+
if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) {
|
|
6854
|
+
classGroupId = classGroupIdWithPostfix;
|
|
6855
|
+
hasPostfixModifier = false;
|
|
6856
|
+
}
|
|
6857
|
+
} else classGroupId = getClassGroupId(baseClassName);
|
|
6700
6858
|
if (!classGroupId) {
|
|
6701
6859
|
if (!hasPostfixModifier) {
|
|
6702
6860
|
result = originalClassName + (result.length > 0 ? ' ' + result : result);
|
|
@@ -6796,6 +6954,7 @@ const isNever = ()=>false;
|
|
|
6796
6954
|
const isShadow = (value1)=>shadowRegex.test(value1);
|
|
6797
6955
|
const isImage = (value1)=>imageRegex.test(value1);
|
|
6798
6956
|
const isAnyNonArbitrary = (value1)=>!isArbitraryValue(value1) && !isArbitraryVariable(value1);
|
|
6957
|
+
const isNamedContainerQuery = (value1)=>value1.startsWith('@container') && ('/' === value1[10] && void 0 !== value1[11] || 's' === value1[11] && void 0 !== value1[16] && value1.startsWith('-size/', 10) || 'n' === value1[11] && void 0 !== value1[18] && value1.startsWith('-normal/', 10));
|
|
6799
6958
|
const isArbitrarySize = (value1)=>getIsArbitraryValue(value1, isLabelSize, isNever);
|
|
6800
6959
|
const isArbitraryValue = (value1)=>arbitraryValueRegex.test(value1);
|
|
6801
6960
|
const isArbitraryLength = (value1)=>getIsArbitraryValue(value1, isLabelLength, isLengthOnly);
|
|
@@ -7234,6 +7393,20 @@ const getDefaultConfig = ()=>{
|
|
|
7234
7393
|
container: [
|
|
7235
7394
|
'container'
|
|
7236
7395
|
],
|
|
7396
|
+
'container-type': [
|
|
7397
|
+
{
|
|
7398
|
+
'@container': [
|
|
7399
|
+
'',
|
|
7400
|
+
'normal',
|
|
7401
|
+
'size',
|
|
7402
|
+
isArbitraryVariable,
|
|
7403
|
+
isArbitraryValue
|
|
7404
|
+
]
|
|
7405
|
+
}
|
|
7406
|
+
],
|
|
7407
|
+
'container-named': [
|
|
7408
|
+
isNamedContainerQuery
|
|
7409
|
+
],
|
|
7237
7410
|
columns: [
|
|
7238
7411
|
{
|
|
7239
7412
|
columns: [
|
|
@@ -8155,6 +8328,15 @@ const getDefaultConfig = ()=>{
|
|
|
8155
8328
|
indent: scaleUnambiguousSpacing()
|
|
8156
8329
|
}
|
|
8157
8330
|
],
|
|
8331
|
+
'tab-size': [
|
|
8332
|
+
{
|
|
8333
|
+
tab: [
|
|
8334
|
+
isInteger,
|
|
8335
|
+
isArbitraryVariable,
|
|
8336
|
+
isArbitraryValue
|
|
8337
|
+
]
|
|
8338
|
+
}
|
|
8339
|
+
],
|
|
8158
8340
|
'vertical-align': [
|
|
8159
8341
|
{
|
|
8160
8342
|
align: [
|
|
@@ -9422,6 +9604,15 @@ const getDefaultConfig = ()=>{
|
|
|
9422
9604
|
'translate-none': [
|
|
9423
9605
|
'translate-none'
|
|
9424
9606
|
],
|
|
9607
|
+
zoom: [
|
|
9608
|
+
{
|
|
9609
|
+
zoom: [
|
|
9610
|
+
isInteger,
|
|
9611
|
+
isArbitraryVariable,
|
|
9612
|
+
isArbitraryValue
|
|
9613
|
+
]
|
|
9614
|
+
}
|
|
9615
|
+
],
|
|
9425
9616
|
accent: [
|
|
9426
9617
|
{
|
|
9427
9618
|
accent: scaleColor()
|
|
@@ -9530,6 +9721,34 @@ const getDefaultConfig = ()=>{
|
|
|
9530
9721
|
]
|
|
9531
9722
|
}
|
|
9532
9723
|
],
|
|
9724
|
+
'scrollbar-thumb-color': [
|
|
9725
|
+
{
|
|
9726
|
+
'scrollbar-thumb': scaleColor()
|
|
9727
|
+
}
|
|
9728
|
+
],
|
|
9729
|
+
'scrollbar-track-color': [
|
|
9730
|
+
{
|
|
9731
|
+
'scrollbar-track': scaleColor()
|
|
9732
|
+
}
|
|
9733
|
+
],
|
|
9734
|
+
'scrollbar-gutter': [
|
|
9735
|
+
{
|
|
9736
|
+
'scrollbar-gutter': [
|
|
9737
|
+
'auto',
|
|
9738
|
+
'stable',
|
|
9739
|
+
'both'
|
|
9740
|
+
]
|
|
9741
|
+
}
|
|
9742
|
+
],
|
|
9743
|
+
'scrollbar-w': [
|
|
9744
|
+
{
|
|
9745
|
+
scrollbar: [
|
|
9746
|
+
'auto',
|
|
9747
|
+
'thin',
|
|
9748
|
+
'none'
|
|
9749
|
+
]
|
|
9750
|
+
}
|
|
9751
|
+
],
|
|
9533
9752
|
'scroll-m': [
|
|
9534
9753
|
{
|
|
9535
9754
|
'scroll-m': scaleUnambiguousSpacing()
|
|
@@ -9764,6 +9983,9 @@ const getDefaultConfig = ()=>{
|
|
|
9764
9983
|
]
|
|
9765
9984
|
},
|
|
9766
9985
|
conflictingClassGroups: {
|
|
9986
|
+
'container-named': [
|
|
9987
|
+
'container-type'
|
|
9988
|
+
],
|
|
9767
9989
|
overflow: [
|
|
9768
9990
|
'overflow-x',
|
|
9769
9991
|
'overflow-y'
|
|
@@ -10029,6 +10251,9 @@ const getDefaultConfig = ()=>{
|
|
|
10029
10251
|
'leading'
|
|
10030
10252
|
]
|
|
10031
10253
|
},
|
|
10254
|
+
postfixLookupClassGroups: [
|
|
10255
|
+
'container-type'
|
|
10256
|
+
],
|
|
10032
10257
|
orderSensitiveModifiers: [
|
|
10033
10258
|
'*',
|
|
10034
10259
|
'**',
|
|
@@ -10540,7 +10765,7 @@ const TOOLBAR_DROPDOWN_CONTENT_CLASS_NAME = 'border-border/80 bg-secondary/92 te
|
|
|
10540
10765
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
10541
10766
|
return function(event) {
|
|
10542
10767
|
originalEventHandler?.(event);
|
|
10543
|
-
if (false === checkForDefaultPrevented || !event.defaultPrevented) return ourEventHandler?.(event);
|
|
10768
|
+
if (false === checkForDefaultPrevented || !event || !event.defaultPrevented) return ourEventHandler?.(event);
|
|
10544
10769
|
};
|
|
10545
10770
|
}
|
|
10546
10771
|
function setRef(ref, value1) {
|
|
@@ -10571,6 +10796,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
10571
10796
|
let defaultContexts = [];
|
|
10572
10797
|
function createContext3(rootComponentName, defaultContext) {
|
|
10573
10798
|
const BaseContext = __WEBPACK_EXTERNAL_MODULE_react__.createContext(defaultContext);
|
|
10799
|
+
BaseContext.displayName = rootComponentName + "Context";
|
|
10574
10800
|
const index = defaultContexts.length;
|
|
10575
10801
|
defaultContexts = [
|
|
10576
10802
|
...defaultContexts,
|
|
@@ -10586,11 +10812,13 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
10586
10812
|
});
|
|
10587
10813
|
};
|
|
10588
10814
|
Provider.displayName = rootComponentName + "Provider";
|
|
10589
|
-
function useContext2(consumerName, scope) {
|
|
10815
|
+
function useContext2(consumerName, scope, options = {}) {
|
|
10816
|
+
const { optional = false } = options;
|
|
10590
10817
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
10591
10818
|
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(Context);
|
|
10592
10819
|
if (context) return context;
|
|
10593
10820
|
if (void 0 !== defaultContext) return defaultContext;
|
|
10821
|
+
if (optional) return;
|
|
10594
10822
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
10595
10823
|
}
|
|
10596
10824
|
return [
|
|
@@ -10715,59 +10943,52 @@ function isFunction(value1) {
|
|
|
10715
10943
|
}
|
|
10716
10944
|
Symbol("RADIX:SYNC_STATE");
|
|
10717
10945
|
function createSlot(ownerName) {
|
|
10718
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
10719
10946
|
const Slot2 = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10737
|
-
|
|
10738
|
-
|
|
10739
|
-
|
|
10740
|
-
|
|
10947
|
+
let { children, ...slotProps } = props;
|
|
10948
|
+
let slottableElement = null;
|
|
10949
|
+
let hasSlottable = false;
|
|
10950
|
+
const newChildren = [];
|
|
10951
|
+
if (isLazyComponent(children) && "function" == typeof use) children = use(children._payload);
|
|
10952
|
+
__WEBPACK_EXTERNAL_MODULE_react__.Children.forEach(children, (maybeSlottable)=>{
|
|
10953
|
+
if (isSlottable(maybeSlottable)) {
|
|
10954
|
+
hasSlottable = true;
|
|
10955
|
+
const slottable = maybeSlottable;
|
|
10956
|
+
let child = "child" in slottable.props ? slottable.props.child : slottable.props.children;
|
|
10957
|
+
if (isLazyComponent(child) && "function" == typeof use) child = use(child._payload);
|
|
10958
|
+
slottableElement = getSlottableElementFromSlottable(slottable, child);
|
|
10959
|
+
newChildren.push(slottableElement?.props?.children);
|
|
10960
|
+
} else newChildren.push(maybeSlottable);
|
|
10961
|
+
});
|
|
10962
|
+
if (slottableElement) slottableElement = __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(slottableElement, void 0, newChildren);
|
|
10963
|
+
else if (!hasSlottable && 1 === __WEBPACK_EXTERNAL_MODULE_react__.Children.count(children) && __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(children)) slottableElement = children;
|
|
10964
|
+
const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;
|
|
10965
|
+
const composedRef = useComposedRefs(forwardedRef, slottableElementRef);
|
|
10966
|
+
if (!slottableElement) {
|
|
10967
|
+
if (children || 0 === children) throw new Error(hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName));
|
|
10968
|
+
return children;
|
|
10969
|
+
}
|
|
10970
|
+
const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});
|
|
10971
|
+
if (slottableElement.type !== __WEBPACK_EXTERNAL_MODULE_react__.Fragment) mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;
|
|
10972
|
+
return __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(slottableElement, mergedProps);
|
|
10741
10973
|
});
|
|
10742
10974
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
10743
10975
|
return Slot2;
|
|
10744
10976
|
}
|
|
10745
|
-
|
|
10746
|
-
const SlotClone = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
10747
|
-
const { children, ...slotProps } = props;
|
|
10748
|
-
if (__WEBPACK_EXTERNAL_MODULE_react__.isValidElement(children)) {
|
|
10749
|
-
const childrenRef = getElementRef(children);
|
|
10750
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
10751
|
-
if (children.type !== __WEBPACK_EXTERNAL_MODULE_react__.Fragment) props2.ref = forwardedRef ? dist_composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
10752
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(children, props2);
|
|
10753
|
-
}
|
|
10754
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.Children.count(children) > 1 ? __WEBPACK_EXTERNAL_MODULE_react__.Children.only(null) : null;
|
|
10755
|
-
});
|
|
10756
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
10757
|
-
return SlotClone;
|
|
10758
|
-
}
|
|
10759
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
10977
|
+
var SLOTTABLE_IDENTIFIER = Symbol.for("radix.slottable");
|
|
10760
10978
|
function createSlottable(ownerName) {
|
|
10761
|
-
const Slottable2 = (
|
|
10762
|
-
children
|
|
10763
|
-
});
|
|
10979
|
+
const Slottable2 = (props)=>"child" in props ? props.children(props.child) : props.children;
|
|
10764
10980
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
10765
10981
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
10766
10982
|
return Slottable2;
|
|
10767
10983
|
}
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10984
|
+
var getSlottableElementFromSlottable = (slottable, child)=>{
|
|
10985
|
+
if ("child" in slottable.props) {
|
|
10986
|
+
const child2 = slottable.props.child;
|
|
10987
|
+
if (!__WEBPACK_EXTERNAL_MODULE_react__.isValidElement(child2)) return null;
|
|
10988
|
+
return __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(child2, void 0, slottable.props.children(child2.props.children));
|
|
10989
|
+
}
|
|
10990
|
+
return __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(child) ? child : null;
|
|
10991
|
+
};
|
|
10771
10992
|
function mergeProps(slotProps, childProps) {
|
|
10772
10993
|
const overrideProps = {
|
|
10773
10994
|
...childProps
|
|
@@ -10806,6 +11027,19 @@ function getElementRef(element) {
|
|
|
10806
11027
|
if (mayWarn) return element.props.ref;
|
|
10807
11028
|
return element.props.ref || element.ref;
|
|
10808
11029
|
}
|
|
11030
|
+
function isSlottable(child) {
|
|
11031
|
+
return __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(child) && "function" == typeof child.type && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
11032
|
+
}
|
|
11033
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
11034
|
+
function isLazyComponent(element) {
|
|
11035
|
+
return null != element && "object" == typeof element && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
11036
|
+
}
|
|
11037
|
+
function isPromiseLike(value1) {
|
|
11038
|
+
return "object" == typeof value1 && null !== value1 && "then" in value1;
|
|
11039
|
+
}
|
|
11040
|
+
var createSlotError = (ownerName)=>`${ownerName} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`;
|
|
11041
|
+
var createSlottableError = (ownerName)=>`${ownerName} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`;
|
|
11042
|
+
var use = __WEBPACK_EXTERNAL_MODULE_react__[" use ".trim().toString()];
|
|
10809
11043
|
var NODES = [
|
|
10810
11044
|
"a",
|
|
10811
11045
|
"button",
|
|
@@ -10857,8 +11091,8 @@ function createCollection(name) {
|
|
|
10857
11091
|
});
|
|
10858
11092
|
const CollectionProvider = (props)=>{
|
|
10859
11093
|
const { scope, children } = props;
|
|
10860
|
-
const ref = __WEBPACK_EXTERNAL_MODULE_react__
|
|
10861
|
-
const itemMap = __WEBPACK_EXTERNAL_MODULE_react__
|
|
11094
|
+
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
11095
|
+
const itemMap = __WEBPACK_EXTERNAL_MODULE_react__.useRef(/* @__PURE__ */ new Map()).current;
|
|
10862
11096
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CollectionProviderImpl, {
|
|
10863
11097
|
scope,
|
|
10864
11098
|
itemMap,
|
|
@@ -10869,7 +11103,7 @@ function createCollection(name) {
|
|
|
10869
11103
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
10870
11104
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
10871
11105
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
10872
|
-
const CollectionSlot = __WEBPACK_EXTERNAL_MODULE_react__
|
|
11106
|
+
const CollectionSlot = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
10873
11107
|
const { scope, children } = props;
|
|
10874
11108
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
10875
11109
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
@@ -10882,12 +11116,12 @@ function createCollection(name) {
|
|
|
10882
11116
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
10883
11117
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
10884
11118
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
10885
|
-
const CollectionItemSlot = __WEBPACK_EXTERNAL_MODULE_react__
|
|
11119
|
+
const CollectionItemSlot = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
10886
11120
|
const { scope, children, ...itemData } = props;
|
|
10887
|
-
const ref = __WEBPACK_EXTERNAL_MODULE_react__
|
|
11121
|
+
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
10888
11122
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
10889
11123
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
10890
|
-
__WEBPACK_EXTERNAL_MODULE_react__
|
|
11124
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
10891
11125
|
context.itemMap.set(ref, {
|
|
10892
11126
|
ref,
|
|
10893
11127
|
...itemData
|
|
@@ -10905,7 +11139,7 @@ function createCollection(name) {
|
|
|
10905
11139
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
10906
11140
|
function useCollection(scope) {
|
|
10907
11141
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
10908
|
-
const getItems = __WEBPACK_EXTERNAL_MODULE_react__
|
|
11142
|
+
const getItems = __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>{
|
|
10909
11143
|
const collectionNode = context.collectionRef.current;
|
|
10910
11144
|
if (!collectionNode) return [];
|
|
10911
11145
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -10928,6 +11162,7 @@ function createCollection(name) {
|
|
|
10928
11162
|
createCollectionScope
|
|
10929
11163
|
];
|
|
10930
11164
|
}
|
|
11165
|
+
"use client";
|
|
10931
11166
|
var DirectionContext = __WEBPACK_EXTERNAL_MODULE_react__.createContext(void 0);
|
|
10932
11167
|
function useDirection(localDir) {
|
|
10933
11168
|
const globalDir = __WEBPACK_EXTERNAL_MODULE_react__.useContext(DirectionContext);
|
|
@@ -10940,23 +11175,6 @@ function useCallbackRef(callback) {
|
|
|
10940
11175
|
});
|
|
10941
11176
|
return __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>(...args)=>callbackRef.current?.(...args), []);
|
|
10942
11177
|
}
|
|
10943
|
-
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
10944
|
-
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
10945
|
-
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
10946
|
-
const handleKeyDown = (event)=>{
|
|
10947
|
-
if ("Escape" === event.key) onEscapeKeyDown(event);
|
|
10948
|
-
};
|
|
10949
|
-
ownerDocument.addEventListener("keydown", handleKeyDown, {
|
|
10950
|
-
capture: true
|
|
10951
|
-
});
|
|
10952
|
-
return ()=>ownerDocument.removeEventListener("keydown", handleKeyDown, {
|
|
10953
|
-
capture: true
|
|
10954
|
-
});
|
|
10955
|
-
}, [
|
|
10956
|
-
onEscapeKeyDown,
|
|
10957
|
-
ownerDocument
|
|
10958
|
-
]);
|
|
10959
|
-
}
|
|
10960
11178
|
"use client";
|
|
10961
11179
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
10962
11180
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
@@ -10966,34 +11184,47 @@ var originalBodyPointerEvents;
|
|
|
10966
11184
|
var DismissableLayerContext = __WEBPACK_EXTERNAL_MODULE_react__.createContext({
|
|
10967
11185
|
layers: /* @__PURE__ */ new Set(),
|
|
10968
11186
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
10969
|
-
branches: /* @__PURE__ */ new Set()
|
|
11187
|
+
branches: /* @__PURE__ */ new Set(),
|
|
11188
|
+
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
10970
11189
|
});
|
|
10971
11190
|
var DismissableLayer = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
10972
|
-
const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
|
|
11191
|
+
const { disableOutsidePointerEvents = false, deferPointerDownOutside = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
|
|
10973
11192
|
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(DismissableLayerContext);
|
|
10974
11193
|
const [node, setNode] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
10975
11194
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
10976
11195
|
const [, force] = __WEBPACK_EXTERNAL_MODULE_react__.useState({});
|
|
10977
|
-
const composedRefs = useComposedRefs(forwardedRef,
|
|
11196
|
+
const composedRefs = useComposedRefs(forwardedRef, setNode);
|
|
10978
11197
|
const layers = Array.from(context.layers);
|
|
10979
11198
|
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
10980
11199
|
...context.layersWithOutsidePointerEventsDisabled
|
|
10981
11200
|
].slice(-1);
|
|
10982
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
11201
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = highestLayerWithOutsidePointerEventsDisabled ? layers.indexOf(highestLayerWithOutsidePointerEventsDisabled) : -1;
|
|
10983
11202
|
const index = node ? layers.indexOf(node) : -1;
|
|
10984
11203
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
10985
11204
|
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
11205
|
+
const isDeferredPointerDownOutsideRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
10986
11206
|
const pointerDownOutside = usePointerDownOutside((event)=>{
|
|
10987
|
-
const target = event.target;
|
|
10988
|
-
const isPointerDownOnBranch = [
|
|
10989
|
-
...context.branches
|
|
10990
|
-
].some((branch)=>branch.contains(target));
|
|
10991
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
10992
11207
|
onPointerDownOutside?.(event);
|
|
10993
11208
|
onInteractOutside?.(event);
|
|
10994
11209
|
if (!event.defaultPrevented) onDismiss?.();
|
|
10995
|
-
},
|
|
11210
|
+
}, {
|
|
11211
|
+
ownerDocument,
|
|
11212
|
+
deferPointerDownOutside,
|
|
11213
|
+
isDeferredPointerDownOutsideRef,
|
|
11214
|
+
dismissableSurfaces: context.dismissableSurfaces,
|
|
11215
|
+
shouldHandlePointerDownOutside: __WEBPACK_EXTERNAL_MODULE_react__.useCallback((target)=>{
|
|
11216
|
+
if (!(target instanceof Node)) return false;
|
|
11217
|
+
const isPointerDownOnBranch = [
|
|
11218
|
+
...context.branches
|
|
11219
|
+
].some((branch)=>branch.contains(target));
|
|
11220
|
+
return isPointerEventsEnabled && !isPointerDownOnBranch;
|
|
11221
|
+
}, [
|
|
11222
|
+
context.branches,
|
|
11223
|
+
isPointerEventsEnabled
|
|
11224
|
+
])
|
|
11225
|
+
});
|
|
10996
11226
|
const focusOutside = useFocusOutside((event)=>{
|
|
11227
|
+
if (deferPointerDownOutside && isDeferredPointerDownOutsideRef.current) return;
|
|
10997
11228
|
const target = event.target;
|
|
10998
11229
|
const isFocusInBranch = [
|
|
10999
11230
|
...context.branches
|
|
@@ -11003,15 +11234,28 @@ var DismissableLayer = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forw
|
|
|
11003
11234
|
onInteractOutside?.(event);
|
|
11004
11235
|
if (!event.defaultPrevented) onDismiss?.();
|
|
11005
11236
|
}, ownerDocument);
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
if (
|
|
11237
|
+
const isHighestLayer = node ? index === layers.length - 1 : false;
|
|
11238
|
+
const handleKeyDown = useCallbackRef((event)=>{
|
|
11239
|
+
if ("Escape" !== event.key) return;
|
|
11009
11240
|
onEscapeKeyDown?.(event);
|
|
11010
11241
|
if (!event.defaultPrevented && onDismiss) {
|
|
11011
11242
|
event.preventDefault();
|
|
11012
11243
|
onDismiss();
|
|
11013
11244
|
}
|
|
11014
|
-
}
|
|
11245
|
+
});
|
|
11246
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11247
|
+
if (!isHighestLayer) return;
|
|
11248
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, {
|
|
11249
|
+
capture: true
|
|
11250
|
+
});
|
|
11251
|
+
return ()=>ownerDocument.removeEventListener("keydown", handleKeyDown, {
|
|
11252
|
+
capture: true
|
|
11253
|
+
});
|
|
11254
|
+
}, [
|
|
11255
|
+
ownerDocument,
|
|
11256
|
+
isHighestLayer,
|
|
11257
|
+
handleKeyDown
|
|
11258
|
+
]);
|
|
11015
11259
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11016
11260
|
if (!node) return;
|
|
11017
11261
|
if (disableOutsidePointerEvents) {
|
|
@@ -11024,7 +11268,10 @@ var DismissableLayer = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forw
|
|
|
11024
11268
|
context.layers.add(node);
|
|
11025
11269
|
dispatchUpdate();
|
|
11026
11270
|
return ()=>{
|
|
11027
|
-
if (disableOutsidePointerEvents
|
|
11271
|
+
if (disableOutsidePointerEvents) {
|
|
11272
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
11273
|
+
if (0 === context.layersWithOutsidePointerEventsDisabled.size) ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
11274
|
+
}
|
|
11028
11275
|
};
|
|
11029
11276
|
}, [
|
|
11030
11277
|
node,
|
|
@@ -11081,31 +11328,84 @@ var DismissableLayerBranch = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props
|
|
|
11081
11328
|
});
|
|
11082
11329
|
});
|
|
11083
11330
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
11084
|
-
|
|
11331
|
+
var IS_TRUE = ()=>true;
|
|
11332
|
+
function usePointerDownOutside(onPointerDownOutside, args) {
|
|
11333
|
+
const { ownerDocument = globalThis?.document, deferPointerDownOutside = false, isDeferredPointerDownOutsideRef, dismissableSurfaces, shouldHandlePointerDownOutside = IS_TRUE } = args;
|
|
11085
11334
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
11086
11335
|
const isPointerInsideReactTreeRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
11336
|
+
const isPointerDownOutsideRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
11337
|
+
const interceptedOutsideInteractionEventsRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(/* @__PURE__ */ new Map());
|
|
11087
11338
|
const handleClickRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(()=>{});
|
|
11088
11339
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11340
|
+
function resetOutsideInteraction() {
|
|
11341
|
+
isPointerDownOutsideRef.current = false;
|
|
11342
|
+
isDeferredPointerDownOutsideRef.current = false;
|
|
11343
|
+
interceptedOutsideInteractionEventsRef.current.clear();
|
|
11344
|
+
}
|
|
11345
|
+
function isOutsideInteractionIntercepted() {
|
|
11346
|
+
return Array.from(interceptedOutsideInteractionEventsRef.current.values()).some(Boolean);
|
|
11347
|
+
}
|
|
11348
|
+
function handleInteractionCapture(event) {
|
|
11349
|
+
if (!isPointerDownOutsideRef.current) return;
|
|
11350
|
+
const target = event.target;
|
|
11351
|
+
const isDismissableSurface = target instanceof Node && [
|
|
11352
|
+
...dismissableSurfaces
|
|
11353
|
+
].some((surface)=>surface.contains(target));
|
|
11354
|
+
if (!isDismissableSurface) interceptedOutsideInteractionEventsRef.current.set(event.type, true);
|
|
11355
|
+
if ("click" === event.type) window.setTimeout(()=>{
|
|
11356
|
+
if (isPointerDownOutsideRef.current) handleClickRef.current();
|
|
11357
|
+
}, 0);
|
|
11358
|
+
}
|
|
11359
|
+
function handleInteractionBubble(event) {
|
|
11360
|
+
if (isPointerDownOutsideRef.current) interceptedOutsideInteractionEventsRef.current.set(event.type, false);
|
|
11361
|
+
}
|
|
11089
11362
|
const handlePointerDown = (event)=>{
|
|
11090
11363
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
11091
11364
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
11092
|
-
|
|
11365
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11366
|
+
const wasOutsideInteractionIntercepted = isOutsideInteractionIntercepted();
|
|
11367
|
+
resetOutsideInteraction();
|
|
11368
|
+
if (!wasOutsideInteractionIntercepted) handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
|
|
11093
11369
|
discrete: true
|
|
11094
11370
|
});
|
|
11095
11371
|
};
|
|
11372
|
+
if (!shouldHandlePointerDownOutside(event.target)) {
|
|
11373
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11374
|
+
resetOutsideInteraction();
|
|
11375
|
+
isPointerInsideReactTreeRef.current = false;
|
|
11376
|
+
return;
|
|
11377
|
+
}
|
|
11096
11378
|
const eventDetail = {
|
|
11097
11379
|
originalEvent: event
|
|
11098
11380
|
};
|
|
11099
|
-
|
|
11381
|
+
isPointerDownOutsideRef.current = true;
|
|
11382
|
+
isDeferredPointerDownOutsideRef.current = deferPointerDownOutside && 0 === event.button;
|
|
11383
|
+
interceptedOutsideInteractionEventsRef.current.clear();
|
|
11384
|
+
if (deferPointerDownOutside && 0 === event.button) {
|
|
11100
11385
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11101
11386
|
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
11102
11387
|
ownerDocument.addEventListener("click", handleClickRef.current, {
|
|
11103
11388
|
once: true
|
|
11104
11389
|
});
|
|
11105
11390
|
} else handleAndDispatchPointerDownOutsideEvent2();
|
|
11106
|
-
} else
|
|
11391
|
+
} else {
|
|
11392
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11393
|
+
resetOutsideInteraction();
|
|
11394
|
+
}
|
|
11107
11395
|
isPointerInsideReactTreeRef.current = false;
|
|
11108
11396
|
};
|
|
11397
|
+
const outsideInteractionEvents = [
|
|
11398
|
+
"pointerup",
|
|
11399
|
+
"mousedown",
|
|
11400
|
+
"mouseup",
|
|
11401
|
+
"touchstart",
|
|
11402
|
+
"touchend",
|
|
11403
|
+
"click"
|
|
11404
|
+
];
|
|
11405
|
+
for (const eventName of outsideInteractionEvents){
|
|
11406
|
+
ownerDocument.addEventListener(eventName, handleInteractionCapture, true);
|
|
11407
|
+
ownerDocument.addEventListener(eventName, handleInteractionBubble);
|
|
11408
|
+
}
|
|
11109
11409
|
const timerId = window.setTimeout(()=>{
|
|
11110
11410
|
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
11111
11411
|
}, 0);
|
|
@@ -11113,10 +11413,18 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
11113
11413
|
window.clearTimeout(timerId);
|
|
11114
11414
|
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
11115
11415
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11416
|
+
for (const eventName of outsideInteractionEvents){
|
|
11417
|
+
ownerDocument.removeEventListener(eventName, handleInteractionCapture, true);
|
|
11418
|
+
ownerDocument.removeEventListener(eventName, handleInteractionBubble);
|
|
11419
|
+
}
|
|
11116
11420
|
};
|
|
11117
11421
|
}, [
|
|
11118
11422
|
ownerDocument,
|
|
11119
|
-
handlePointerDownOutside
|
|
11423
|
+
handlePointerDownOutside,
|
|
11424
|
+
deferPointerDownOutside,
|
|
11425
|
+
isDeferredPointerDownOutsideRef,
|
|
11426
|
+
dismissableSurfaces,
|
|
11427
|
+
shouldHandlePointerDownOutside
|
|
11120
11428
|
]);
|
|
11121
11429
|
return {
|
|
11122
11430
|
onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true
|
|
@@ -11166,15 +11474,24 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
11166
11474
|
}
|
|
11167
11475
|
"use client";
|
|
11168
11476
|
var dist_count = 0;
|
|
11477
|
+
var guards = null;
|
|
11169
11478
|
function useFocusGuards() {
|
|
11170
11479
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11480
|
+
if (!guards) guards = {
|
|
11481
|
+
start: createFocusGuard(),
|
|
11482
|
+
end: createFocusGuard()
|
|
11483
|
+
};
|
|
11484
|
+
const { start, end } = guards;
|
|
11485
|
+
if (document.body.firstElementChild !== start) document.body.insertAdjacentElement("afterbegin", start);
|
|
11486
|
+
if (document.body.lastElementChild !== end) document.body.insertAdjacentElement("beforeend", end);
|
|
11174
11487
|
dist_count++;
|
|
11175
11488
|
return ()=>{
|
|
11176
|
-
if (1 === dist_count)
|
|
11177
|
-
|
|
11489
|
+
if (1 === dist_count) {
|
|
11490
|
+
guards?.start.remove();
|
|
11491
|
+
guards?.end.remove();
|
|
11492
|
+
guards = null;
|
|
11493
|
+
}
|
|
11494
|
+
dist_count = Math.max(0, dist_count - 1);
|
|
11178
11495
|
};
|
|
11179
11496
|
}, []);
|
|
11180
11497
|
}
|
|
@@ -11202,7 +11519,7 @@ var FocusScope = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
11202
11519
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
11203
11520
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
11204
11521
|
const lastFocusedElementRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
11205
|
-
const composedRefs = useComposedRefs(forwardedRef,
|
|
11522
|
+
const composedRefs = useComposedRefs(forwardedRef, setContainer);
|
|
11206
11523
|
const focusScope = __WEBPACK_EXTERNAL_MODULE_react__.useRef({
|
|
11207
11524
|
paused: false,
|
|
11208
11525
|
pause () {
|
|
@@ -11355,9 +11672,17 @@ function getTabbableCandidates(container) {
|
|
|
11355
11672
|
return nodes;
|
|
11356
11673
|
}
|
|
11357
11674
|
function findVisible(elements, container) {
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
})
|
|
11675
|
+
const canUseCheckVisibility = "function" == typeof container.checkVisibility && container.checkVisibility({
|
|
11676
|
+
checkVisibilityCSS: true
|
|
11677
|
+
});
|
|
11678
|
+
for (const element of elements){
|
|
11679
|
+
const hidden = canUseCheckVisibility ? !element.checkVisibility({
|
|
11680
|
+
checkVisibilityCSS: true
|
|
11681
|
+
}) : isHidden(element, {
|
|
11682
|
+
upTo: container
|
|
11683
|
+
});
|
|
11684
|
+
if (!hidden) return element;
|
|
11685
|
+
}
|
|
11361
11686
|
}
|
|
11362
11687
|
function isHidden(node, { upTo }) {
|
|
11363
11688
|
if ("hidden" === getComputedStyle(node).visibility) return true;
|
|
@@ -13085,10 +13410,13 @@ var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
|
13085
13410
|
var Popper = (props)=>{
|
|
13086
13411
|
const { __scopePopper, children } = props;
|
|
13087
13412
|
const [anchor, setAnchor] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
13413
|
+
const [placementState, setPlacementState] = __WEBPACK_EXTERNAL_MODULE_react__.useState(void 0);
|
|
13088
13414
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(PopperProvider, {
|
|
13089
13415
|
scope: __scopePopper,
|
|
13090
13416
|
anchor,
|
|
13091
13417
|
onAnchorChange: setAnchor,
|
|
13418
|
+
placementState,
|
|
13419
|
+
setPlacementState,
|
|
13092
13420
|
children
|
|
13093
13421
|
});
|
|
13094
13422
|
};
|
|
@@ -13098,14 +13426,27 @@ var PopperAnchor = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwarde
|
|
|
13098
13426
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
13099
13427
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
13100
13428
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
13101
|
-
const
|
|
13429
|
+
const onAnchorChange = context.onAnchorChange;
|
|
13430
|
+
const callbackRef = __WEBPACK_EXTERNAL_MODULE_react__.useCallback((node)=>{
|
|
13431
|
+
ref.current = node;
|
|
13432
|
+
if (node) onAnchorChange(node);
|
|
13433
|
+
}, [
|
|
13434
|
+
onAnchorChange
|
|
13435
|
+
]);
|
|
13436
|
+
const composedRefs = useComposedRefs(forwardedRef, callbackRef);
|
|
13102
13437
|
const anchorRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
13103
13438
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
13439
|
+
if (!virtualRef) return;
|
|
13104
13440
|
const previousAnchor = anchorRef.current;
|
|
13105
|
-
anchorRef.current = virtualRef
|
|
13106
|
-
if (previousAnchor !== anchorRef.current)
|
|
13441
|
+
anchorRef.current = virtualRef.current;
|
|
13442
|
+
if (previousAnchor !== anchorRef.current) onAnchorChange(anchorRef.current);
|
|
13107
13443
|
});
|
|
13444
|
+
const sideAndAlign = context.placementState && getSideAndAlignFromPlacement(context.placementState);
|
|
13445
|
+
const placedSide = sideAndAlign?.[0];
|
|
13446
|
+
const placedAlign = sideAndAlign?.[1];
|
|
13108
13447
|
return virtualRef ? null : /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Primitive.div, {
|
|
13448
|
+
"data-radix-popper-side": placedSide,
|
|
13449
|
+
"data-radix-popper-align": placedAlign,
|
|
13109
13450
|
...anchorProps,
|
|
13110
13451
|
ref: composedRefs
|
|
13111
13452
|
});
|
|
@@ -13117,7 +13458,7 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13117
13458
|
const { __scopePopper, side = "bottom", sideOffset = 0, align = "center", alignOffset = 0, arrowPadding = 0, avoidCollisions = true, collisionBoundary = [], collisionPadding: collisionPaddingProp = 0, sticky = "partial", hideWhenDetached = false, updatePositionStrategy = "optimized", onPlaced, ...contentProps } = props;
|
|
13118
13459
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
13119
13460
|
const [content, setContent] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
13120
|
-
const composedRefs = useComposedRefs(forwardedRef,
|
|
13461
|
+
const composedRefs = useComposedRefs(forwardedRef, setContent);
|
|
13121
13462
|
const [arrow, setArrow] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
13122
13463
|
const arrowSize = useSize(arrow);
|
|
13123
13464
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
@@ -13186,10 +13527,21 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13186
13527
|
}),
|
|
13187
13528
|
hideWhenDetached && floating_ui_react_dom_hide({
|
|
13188
13529
|
strategy: "referenceHidden",
|
|
13189
|
-
...detectOverflowOptions
|
|
13530
|
+
...detectOverflowOptions,
|
|
13531
|
+
boundary: hasExplicitBoundaries ? detectOverflowOptions.boundary : void 0
|
|
13190
13532
|
})
|
|
13191
13533
|
]
|
|
13192
13534
|
});
|
|
13535
|
+
const setPlacementState = context.setPlacementState;
|
|
13536
|
+
useLayoutEffect2(()=>{
|
|
13537
|
+
setPlacementState(placement);
|
|
13538
|
+
return ()=>{
|
|
13539
|
+
setPlacementState(void 0);
|
|
13540
|
+
};
|
|
13541
|
+
}, [
|
|
13542
|
+
placement,
|
|
13543
|
+
setPlacementState
|
|
13544
|
+
]);
|
|
13193
13545
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
13194
13546
|
const handlePlaced = useCallbackRef(onPlaced);
|
|
13195
13547
|
useLayoutEffect2(()=>{
|
|
@@ -13215,7 +13567,7 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13215
13567
|
transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)",
|
|
13216
13568
|
minWidth: "max-content",
|
|
13217
13569
|
zIndex: contentZIndex,
|
|
13218
|
-
|
|
13570
|
+
"--radix-popper-transform-origin": [
|
|
13219
13571
|
middlewareData.transformOrigin?.x,
|
|
13220
13572
|
middlewareData.transformOrigin?.y
|
|
13221
13573
|
].join(" "),
|
|
@@ -13228,6 +13580,7 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13228
13580
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(PopperContentProvider, {
|
|
13229
13581
|
scope: __scopePopper,
|
|
13230
13582
|
placedSide,
|
|
13583
|
+
placedAlign,
|
|
13231
13584
|
onArrowChange: setArrow,
|
|
13232
13585
|
arrowX,
|
|
13233
13586
|
arrowY,
|
|
@@ -13350,7 +13703,7 @@ var Portal = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=
|
|
|
13350
13703
|
const [mounted, setMounted] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
13351
13704
|
useLayoutEffect2(()=>setMounted(true), []);
|
|
13352
13705
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
13353
|
-
return container ? __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__
|
|
13706
|
+
return container ? __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__.createPortal(/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Primitive.div, {
|
|
13354
13707
|
...portalProps,
|
|
13355
13708
|
ref: forwardedRef
|
|
13356
13709
|
}), container) : null;
|
|
@@ -13369,7 +13722,7 @@ var Presence = (props)=>{
|
|
|
13369
13722
|
const child = "function" == typeof children ? children({
|
|
13370
13723
|
present: presence.isPresent
|
|
13371
13724
|
}) : __WEBPACK_EXTERNAL_MODULE_react__.Children.only(children);
|
|
13372
|
-
const ref =
|
|
13725
|
+
const ref = useStableComposedRefs(presence.ref, dist_getElementRef(child));
|
|
13373
13726
|
const forceMount = "function" == typeof children;
|
|
13374
13727
|
return forceMount || presence.isPresent ? __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(child, {
|
|
13375
13728
|
ref
|
|
@@ -13381,6 +13734,7 @@ function usePresence(present) {
|
|
|
13381
13734
|
const stylesRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
13382
13735
|
const prevPresentRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(present);
|
|
13383
13736
|
const prevAnimationNameRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef("none");
|
|
13737
|
+
const mountAnimationNameRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(void 0);
|
|
13384
13738
|
const initialState = present ? "mounted" : "unmounted";
|
|
13385
13739
|
const [state, send] = useStateMachine(initialState, {
|
|
13386
13740
|
mounted: {
|
|
@@ -13396,8 +13750,10 @@ function usePresence(present) {
|
|
|
13396
13750
|
}
|
|
13397
13751
|
});
|
|
13398
13752
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
13399
|
-
|
|
13400
|
-
|
|
13753
|
+
if ("mounted" === state) {
|
|
13754
|
+
prevAnimationNameRef.current = mountAnimationNameRef.current ?? getAnimationName(stylesRef.current);
|
|
13755
|
+
mountAnimationNameRef.current = void 0;
|
|
13756
|
+
} else prevAnimationNameRef.current = "none";
|
|
13401
13757
|
}, [
|
|
13402
13758
|
state
|
|
13403
13759
|
]);
|
|
@@ -13408,8 +13764,10 @@ function usePresence(present) {
|
|
|
13408
13764
|
if (hasPresentChanged) {
|
|
13409
13765
|
const prevAnimationName = prevAnimationNameRef.current;
|
|
13410
13766
|
const currentAnimationName = getAnimationName(styles);
|
|
13411
|
-
if (present)
|
|
13412
|
-
|
|
13767
|
+
if (present) {
|
|
13768
|
+
mountAnimationNameRef.current = currentAnimationName;
|
|
13769
|
+
send("MOUNT");
|
|
13770
|
+
} else if ("none" === currentAnimationName || styles?.display === "none") send("UNMOUNT");
|
|
13413
13771
|
else {
|
|
13414
13772
|
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
13415
13773
|
wasPresent && isAnimating ? send("ANIMATION_OUT") : send("UNMOUNT");
|
|
@@ -13462,11 +13820,39 @@ function usePresence(present) {
|
|
|
13462
13820
|
"unmountSuspended"
|
|
13463
13821
|
].includes(state),
|
|
13464
13822
|
ref: __WEBPACK_EXTERNAL_MODULE_react__.useCallback((node2)=>{
|
|
13465
|
-
|
|
13823
|
+
if (node2) {
|
|
13824
|
+
const styles = getComputedStyle(node2);
|
|
13825
|
+
stylesRef.current = styles;
|
|
13826
|
+
mountAnimationNameRef.current = getAnimationName(styles);
|
|
13827
|
+
} else stylesRef.current = null;
|
|
13466
13828
|
setNode(node2);
|
|
13467
13829
|
}, [])
|
|
13468
13830
|
};
|
|
13469
13831
|
}
|
|
13832
|
+
function dist_setRef(ref, value1) {
|
|
13833
|
+
if ("function" == typeof ref) return ref(value1);
|
|
13834
|
+
if (null != ref) ref.current = value1;
|
|
13835
|
+
}
|
|
13836
|
+
function useStableComposedRefs(...refs) {
|
|
13837
|
+
const refsRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(refs);
|
|
13838
|
+
refsRef.current = refs;
|
|
13839
|
+
return __WEBPACK_EXTERNAL_MODULE_react__.useCallback((node)=>{
|
|
13840
|
+
const currentRefs = refsRef.current;
|
|
13841
|
+
let hasCleanup = false;
|
|
13842
|
+
const cleanups = currentRefs.map((ref)=>{
|
|
13843
|
+
const cleanup = dist_setRef(ref, node);
|
|
13844
|
+
if (!hasCleanup && "function" == typeof cleanup) hasCleanup = true;
|
|
13845
|
+
return cleanup;
|
|
13846
|
+
});
|
|
13847
|
+
if (hasCleanup) return ()=>{
|
|
13848
|
+
for(let i = 0; i < cleanups.length; i++){
|
|
13849
|
+
const cleanup = cleanups[i];
|
|
13850
|
+
if ("function" == typeof cleanup) cleanup();
|
|
13851
|
+
else dist_setRef(currentRefs[i], null);
|
|
13852
|
+
}
|
|
13853
|
+
};
|
|
13854
|
+
}, []);
|
|
13855
|
+
}
|
|
13470
13856
|
function getAnimationName(styles) {
|
|
13471
13857
|
return styles?.animationName || "none";
|
|
13472
13858
|
}
|
|
@@ -13479,6 +13865,25 @@ function dist_getElementRef(element) {
|
|
|
13479
13865
|
if (mayWarn) return element.props.ref;
|
|
13480
13866
|
return element.props.ref || element.ref;
|
|
13481
13867
|
}
|
|
13868
|
+
var _isHydrated = false;
|
|
13869
|
+
function useIsHydrated() {
|
|
13870
|
+
const [isHydrated, setIsHydrated] = __WEBPACK_EXTERNAL_MODULE_react__.useState(_isHydrated);
|
|
13871
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
13872
|
+
if (!_isHydrated) {
|
|
13873
|
+
_isHydrated = true;
|
|
13874
|
+
setIsHydrated(true);
|
|
13875
|
+
}
|
|
13876
|
+
}, []);
|
|
13877
|
+
return isHydrated;
|
|
13878
|
+
}
|
|
13879
|
+
var useReactSyncExternalStore = __WEBPACK_EXTERNAL_MODULE_react__[" useSyncExternalStore ".trim().toString()];
|
|
13880
|
+
function dist_subscribe() {
|
|
13881
|
+
return ()=>{};
|
|
13882
|
+
}
|
|
13883
|
+
function useIsHydratedModern() {
|
|
13884
|
+
return useReactSyncExternalStore(dist_subscribe, ()=>true, ()=>false);
|
|
13885
|
+
}
|
|
13886
|
+
var useIsHydrated2 = "function" == typeof useReactSyncExternalStore ? useIsHydratedModern : useIsHydrated;
|
|
13482
13887
|
"use client";
|
|
13483
13888
|
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
13484
13889
|
var dist_EVENT_OPTIONS = {
|
|
@@ -13584,12 +13989,23 @@ var RovingFocusGroupItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
13584
13989
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
13585
13990
|
const getItems = dist_useCollection(__scopeRovingFocusGroup);
|
|
13586
13991
|
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
|
|
13992
|
+
const isHydrated = useIsHydrated2();
|
|
13993
|
+
useLayoutEffect2(()=>{
|
|
13994
|
+
if (!isHydrated || !focusable) return;
|
|
13995
|
+
onFocusableItemAdd();
|
|
13996
|
+
return ()=>onFocusableItemRemove();
|
|
13997
|
+
}, [
|
|
13998
|
+
isHydrated,
|
|
13999
|
+
focusable,
|
|
14000
|
+
onFocusableItemAdd,
|
|
14001
|
+
onFocusableItemRemove
|
|
14002
|
+
]);
|
|
13587
14003
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
13588
|
-
if (focusable)
|
|
13589
|
-
|
|
13590
|
-
|
|
13591
|
-
}
|
|
14004
|
+
if (isHydrated || !focusable) return;
|
|
14005
|
+
onFocusableItemAdd();
|
|
14006
|
+
return ()=>onFocusableItemRemove();
|
|
13592
14007
|
}, [
|
|
14008
|
+
isHydrated,
|
|
13593
14009
|
focusable,
|
|
13594
14010
|
onFocusableItemAdd,
|
|
13595
14011
|
onFocusableItemRemove
|
|
@@ -14518,6 +14934,15 @@ var Menu = (props)=>{
|
|
|
14518
14934
|
});
|
|
14519
14935
|
};
|
|
14520
14936
|
}, []);
|
|
14937
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
14938
|
+
if (!open) return;
|
|
14939
|
+
const handleBlur = ()=>handleOpenChange(false);
|
|
14940
|
+
window.addEventListener("blur", handleBlur);
|
|
14941
|
+
return ()=>window.removeEventListener("blur", handleBlur);
|
|
14942
|
+
}, [
|
|
14943
|
+
open,
|
|
14944
|
+
handleOpenChange
|
|
14945
|
+
]);
|
|
14521
14946
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Root2, {
|
|
14522
14947
|
...popperScope,
|
|
14523
14948
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuProvider, {
|
|
@@ -14836,8 +15261,9 @@ var MenuItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef
|
|
|
14836
15261
|
if (!isPointerDownRef.current) event.currentTarget?.click();
|
|
14837
15262
|
}),
|
|
14838
15263
|
onKeyDown: composeEventHandlers(props.onKeyDown, (event)=>{
|
|
15264
|
+
if (disabled || event.target !== event.currentTarget) return;
|
|
14839
15265
|
const isTypingAhead = "" !== contentContext.searchRef.current;
|
|
14840
|
-
if (
|
|
15266
|
+
if (isTypingAhead && " " === event.key) return;
|
|
14841
15267
|
if (SELECTION_KEYS.includes(event.key)) {
|
|
14842
15268
|
event.currentTarget.click();
|
|
14843
15269
|
event.preventDefault();
|
|
@@ -15056,6 +15482,7 @@ var MenuSubTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
15056
15482
|
pointerGraceTimerRef,
|
|
15057
15483
|
onPointerGraceIntentChange
|
|
15058
15484
|
]);
|
|
15485
|
+
const composedRefs = useComposedRefs(forwardedRef, subContext.onTriggerChange);
|
|
15059
15486
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuAnchor, {
|
|
15060
15487
|
asChild: true,
|
|
15061
15488
|
...scope,
|
|
@@ -15063,10 +15490,10 @@ var MenuSubTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
15063
15490
|
id: subContext.triggerId,
|
|
15064
15491
|
"aria-haspopup": "menu",
|
|
15065
15492
|
"aria-expanded": context.open,
|
|
15066
|
-
"aria-controls": subContext.contentId,
|
|
15493
|
+
"aria-controls": context.open ? subContext.contentId : void 0,
|
|
15067
15494
|
"data-state": getOpenState(context.open),
|
|
15068
15495
|
...props,
|
|
15069
|
-
ref:
|
|
15496
|
+
ref: composedRefs,
|
|
15070
15497
|
onClick: (event)=>{
|
|
15071
15498
|
props.onClick?.(event);
|
|
15072
15499
|
if (props.disabled || event.defaultPrevented) return;
|
|
@@ -15127,8 +15554,9 @@ var MenuSubTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
15127
15554
|
}
|
|
15128
15555
|
})),
|
|
15129
15556
|
onKeyDown: composeEventHandlers(props.onKeyDown, (event)=>{
|
|
15557
|
+
if (props.disabled || event.target !== event.currentTarget) return;
|
|
15130
15558
|
const isTypingAhead = "" !== contentContext.searchRef.current;
|
|
15131
|
-
if (
|
|
15559
|
+
if (isTypingAhead && " " === event.key) return;
|
|
15132
15560
|
if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
|
|
15133
15561
|
context.onOpenChange(true);
|
|
15134
15562
|
context.content?.focus();
|
|
@@ -15142,7 +15570,7 @@ MenuSubTrigger.displayName = SUB_TRIGGER_NAME;
|
|
|
15142
15570
|
var SUB_CONTENT_NAME = "MenuSubContent";
|
|
15143
15571
|
var MenuSubContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15144
15572
|
const portalContext = usePortalContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15145
|
-
const { forceMount = portalContext.forceMount, ...subContentProps } = props;
|
|
15573
|
+
const { forceMount = portalContext.forceMount, align = "start", ...subContentProps } = props;
|
|
15146
15574
|
const context = useMenuContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15147
15575
|
const rootContext = useMenuRootContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15148
15576
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);
|
|
@@ -15159,7 +15587,7 @@ var MenuSubContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
15159
15587
|
"aria-labelledby": subContext.triggerId,
|
|
15160
15588
|
...subContentProps,
|
|
15161
15589
|
ref: composedRefs,
|
|
15162
|
-
align
|
|
15590
|
+
align,
|
|
15163
15591
|
side: "rtl" === rootContext.dir ? "left" : "right",
|
|
15164
15592
|
disableOutsidePointerEvents: false,
|
|
15165
15593
|
disableOutsideScroll: false,
|
|
@@ -15306,6 +15734,7 @@ var DropdownMenuTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
15306
15734
|
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
15307
15735
|
const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
|
|
15308
15736
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
15737
|
+
const composedRefs = useComposedRefs(forwardedRef, context.triggerRef);
|
|
15309
15738
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Anchor2, {
|
|
15310
15739
|
asChild: true,
|
|
15311
15740
|
...menuScope,
|
|
@@ -15319,7 +15748,7 @@ var DropdownMenuTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
15319
15748
|
"data-disabled": disabled ? "" : void 0,
|
|
15320
15749
|
disabled,
|
|
15321
15750
|
...triggerProps,
|
|
15322
|
-
ref:
|
|
15751
|
+
ref: composedRefs,
|
|
15323
15752
|
onPointerDown: composeEventHandlers(props.onPointerDown, (event)=>{
|
|
15324
15753
|
if (!disabled && 0 === event.button && false === event.ctrlKey) {
|
|
15325
15754
|
context.onOpenToggle();
|
|
@@ -15617,7 +16046,7 @@ var ScrollArea = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
15617
16046
|
const [cornerHeight, setCornerHeight] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
|
|
15618
16047
|
const [scrollbarXEnabled, setScrollbarXEnabled] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
15619
16048
|
const [scrollbarYEnabled, setScrollbarYEnabled] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
15620
|
-
const composedRefs = useComposedRefs(forwardedRef,
|
|
16049
|
+
const composedRefs = useComposedRefs(forwardedRef, setScrollArea);
|
|
15621
16050
|
const direction = useDirection(dir);
|
|
15622
16051
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaProvider, {
|
|
15623
16052
|
scope: __scopeScrollArea,
|
|
@@ -15645,8 +16074,8 @@ var ScrollArea = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
15645
16074
|
ref: composedRefs,
|
|
15646
16075
|
style: {
|
|
15647
16076
|
position: "relative",
|
|
15648
|
-
|
|
15649
|
-
|
|
16077
|
+
"--radix-scroll-area-corner-width": cornerWidth + "px",
|
|
16078
|
+
"--radix-scroll-area-corner-height": cornerHeight + "px",
|
|
15650
16079
|
...props.style
|
|
15651
16080
|
}
|
|
15652
16081
|
})
|
|
@@ -15661,10 +16090,7 @@ var ScrollAreaViewport = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
15661
16090
|
const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
|
15662
16091
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
15663
16092
|
children: [
|
|
15664
|
-
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
15665
|
-
dangerouslySetInnerHTML: {
|
|
15666
|
-
__html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
|
|
15667
|
-
},
|
|
16093
|
+
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaViewportStyle, {
|
|
15668
16094
|
nonce
|
|
15669
16095
|
}),
|
|
15670
16096
|
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Primitive.div, {
|
|
@@ -15689,6 +16115,12 @@ var ScrollAreaViewport = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
15689
16115
|
});
|
|
15690
16116
|
});
|
|
15691
16117
|
ScrollAreaViewport.displayName = VIEWPORT_NAME;
|
|
16118
|
+
var ScrollAreaViewportStyle = __WEBPACK_EXTERNAL_MODULE_react__.memo(({ nonce })=>/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("style", {
|
|
16119
|
+
dangerouslySetInnerHTML: {
|
|
16120
|
+
__html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
|
|
16121
|
+
},
|
|
16122
|
+
nonce
|
|
16123
|
+
}), (prevProps, nextProps)=>prevProps.nonce === nextProps.nonce);
|
|
15692
16124
|
var SCROLLBAR_NAME = "ScrollAreaScrollbar";
|
|
15693
16125
|
var ScrollAreaScrollbar = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15694
16126
|
const { forceMount, ...scrollbarProps } = props;
|
|
@@ -15719,7 +16151,8 @@ var ScrollAreaScrollbar = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
15719
16151
|
forceMount
|
|
15720
16152
|
}) : "always" === context.type ? /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaScrollbarVisible, {
|
|
15721
16153
|
...scrollbarProps,
|
|
15722
|
-
ref: forwardedRef
|
|
16154
|
+
ref: forwardedRef,
|
|
16155
|
+
"data-state": "visible"
|
|
15723
16156
|
}) : null;
|
|
15724
16157
|
});
|
|
15725
16158
|
ScrollAreaScrollbar.displayName = SCROLLBAR_NAME;
|
|
@@ -15932,7 +16365,7 @@ var ScrollAreaScrollbarX = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
15932
16365
|
bottom: 0,
|
|
15933
16366
|
left: "rtl" === context.dir ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
15934
16367
|
right: "ltr" === context.dir ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
15935
|
-
|
|
16368
|
+
"--radix-scroll-area-thumb-width": getThumbSize(sizes) + "px",
|
|
15936
16369
|
...props.style
|
|
15937
16370
|
},
|
|
15938
16371
|
onThumbPointerDown: (pointerPos)=>props.onThumbPointerDown(pointerPos.x),
|
|
@@ -15978,7 +16411,7 @@ var ScrollAreaScrollbarY = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
15978
16411
|
right: "ltr" === context.dir ? 0 : void 0,
|
|
15979
16412
|
left: "rtl" === context.dir ? 0 : void 0,
|
|
15980
16413
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
15981
|
-
|
|
16414
|
+
"--radix-scroll-area-thumb-height": getThumbSize(sizes) + "px",
|
|
15982
16415
|
...props.style
|
|
15983
16416
|
},
|
|
15984
16417
|
onThumbPointerDown: (pointerPos)=>props.onThumbPointerDown(pointerPos.y),
|
|
@@ -16008,7 +16441,7 @@ var ScrollAreaScrollbarImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
16008
16441
|
const { __scopeScrollArea, sizes, hasThumb, onThumbChange, onThumbPointerUp, onThumbPointerDown, onThumbPositionChange, onDragScroll, onWheelScroll, onResize, ...scrollbarProps } = props;
|
|
16009
16442
|
const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);
|
|
16010
16443
|
const [scrollbar, setScrollbar] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
16011
|
-
const composeRefs = useComposedRefs(forwardedRef,
|
|
16444
|
+
const composeRefs = useComposedRefs(forwardedRef, setScrollbar);
|
|
16012
16445
|
const rectRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
16013
16446
|
const prevWebkitUserSelectRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef("");
|
|
16014
16447
|
const viewport = context.viewport;
|
|
@@ -16105,7 +16538,7 @@ var ScrollAreaThumbImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16105
16538
|
const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);
|
|
16106
16539
|
const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);
|
|
16107
16540
|
const { onThumbPositionChange } = scrollbarContext;
|
|
16108
|
-
const composedRef = useComposedRefs(forwardedRef,
|
|
16541
|
+
const composedRef = useComposedRefs(forwardedRef, scrollbarContext.onThumbChange);
|
|
16109
16542
|
const removeUnlinkedScrollListenerRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(void 0);
|
|
16110
16543
|
const debounceScrollEnd = useDebounceCallback(()=>{
|
|
16111
16544
|
if (removeUnlinkedScrollListenerRef.current) {
|
|
@@ -16173,6 +16606,7 @@ var ScrollAreaCornerImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
16173
16606
|
const [width, setWidth] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
|
|
16174
16607
|
const [height, setHeight] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
|
|
16175
16608
|
const hasSize = Boolean(width && height);
|
|
16609
|
+
const { onCornerWidthChange, onCornerHeightChange } = context;
|
|
16176
16610
|
useResizeObserver(context.scrollbarX, ()=>{
|
|
16177
16611
|
const height2 = context.scrollbarX?.offsetHeight || 0;
|
|
16178
16612
|
context.onCornerHeightChange(height2);
|
|
@@ -16183,6 +16617,13 @@ var ScrollAreaCornerImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
16183
16617
|
context.onCornerWidthChange(width2);
|
|
16184
16618
|
setWidth(width2);
|
|
16185
16619
|
});
|
|
16620
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>()=>{
|
|
16621
|
+
onCornerWidthChange(0);
|
|
16622
|
+
onCornerHeightChange(0);
|
|
16623
|
+
}, [
|
|
16624
|
+
onCornerWidthChange,
|
|
16625
|
+
onCornerHeightChange
|
|
16626
|
+
]);
|
|
16186
16627
|
return hasSize ? /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Primitive.div, {
|
|
16187
16628
|
...cornerProps,
|
|
16188
16629
|
ref: forwardedRef,
|
|
@@ -16405,10 +16846,14 @@ var TooltipProvider = (props)=>{
|
|
|
16405
16846
|
isOpenDelayedRef,
|
|
16406
16847
|
delayDuration,
|
|
16407
16848
|
onOpen: __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>{
|
|
16849
|
+
if (skipDelayDuration <= 0) return;
|
|
16408
16850
|
window.clearTimeout(skipDelayTimerRef.current);
|
|
16409
16851
|
isOpenDelayedRef.current = false;
|
|
16410
|
-
}, [
|
|
16852
|
+
}, [
|
|
16853
|
+
skipDelayDuration
|
|
16854
|
+
]),
|
|
16411
16855
|
onClose: __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>{
|
|
16856
|
+
if (skipDelayDuration <= 0) return;
|
|
16412
16857
|
window.clearTimeout(skipDelayTimerRef.current);
|
|
16413
16858
|
skipDelayTimerRef.current = window.setTimeout(()=>isOpenDelayedRef.current = true, skipDelayDuration);
|
|
16414
16859
|
}, [
|
|
@@ -16707,8 +17152,7 @@ var TooltipContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
16707
17152
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
16708
17153
|
if (context.trigger) {
|
|
16709
17154
|
const handleScroll = (event)=>{
|
|
16710
|
-
|
|
16711
|
-
if (target?.contains(context.trigger)) onClose();
|
|
17155
|
+
if (event.target instanceof Node && event.target.contains(context.trigger)) onClose();
|
|
16712
17156
|
};
|
|
16713
17157
|
window.addEventListener("scroll", handleScroll, {
|
|
16714
17158
|
capture: true
|
|
@@ -17542,7 +17986,7 @@ const ToolbarContentBox = ({ style, className, contentClassName, title, active =
|
|
|
17542
17986
|
});
|
|
17543
17987
|
};
|
|
17544
17988
|
const primitives_ToolbarContentBox = ToolbarContentBox;
|
|
17545
|
-
const
|
|
17989
|
+
const ToolbarGlyph_ToolbarGlyph = ({ children, className, opticalOffsetX = 0, opticalOffsetY = 0, opticalScale = 1 })=>{
|
|
17546
17990
|
const transforms = [];
|
|
17547
17991
|
if (0 !== opticalOffsetX || 0 !== opticalOffsetY) transforms.push(`translate(${opticalOffsetX}px, ${opticalOffsetY}px)`);
|
|
17548
17992
|
if (1 !== opticalScale) transforms.push(`scale(${opticalScale})`);
|
|
@@ -17554,137 +17998,7 @@ const ToolbarGlyph = ({ children, className, opticalOffsetX = 0, opticalOffsetY
|
|
|
17554
17998
|
children: children
|
|
17555
17999
|
});
|
|
17556
18000
|
};
|
|
17557
|
-
const
|
|
17558
|
-
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
17559
|
-
var use = __WEBPACK_EXTERNAL_MODULE_react__[" use ".trim().toString()];
|
|
17560
|
-
function isPromiseLike(value1) {
|
|
17561
|
-
return "object" == typeof value1 && null !== value1 && "then" in value1;
|
|
17562
|
-
}
|
|
17563
|
-
function isLazyComponent(element) {
|
|
17564
|
-
return null != element && "object" == typeof element && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
17565
|
-
}
|
|
17566
|
-
function dist_createSlot(ownerName) {
|
|
17567
|
-
const SlotClone = /* @__PURE__ */ dist_createSlotClone(ownerName);
|
|
17568
|
-
const Slot2 = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
17569
|
-
let { children, ...slotProps } = props;
|
|
17570
|
-
if (isLazyComponent(children) && "function" == typeof use) children = use(children._payload);
|
|
17571
|
-
const childrenArray = __WEBPACK_EXTERNAL_MODULE_react__.Children.toArray(children);
|
|
17572
|
-
const slottable = childrenArray.find(dist_isSlottable);
|
|
17573
|
-
if (slottable) {
|
|
17574
|
-
const newElement = slottable.props.children;
|
|
17575
|
-
const newChildren = childrenArray.map((child)=>{
|
|
17576
|
-
if (child !== slottable) return child;
|
|
17577
|
-
if (__WEBPACK_EXTERNAL_MODULE_react__.Children.count(newElement) > 1) return __WEBPACK_EXTERNAL_MODULE_react__.Children.only(null);
|
|
17578
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(newElement) ? newElement.props.children : null;
|
|
17579
|
-
});
|
|
17580
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(SlotClone, {
|
|
17581
|
-
...slotProps,
|
|
17582
|
-
ref: forwardedRef,
|
|
17583
|
-
children: __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(newElement) ? __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(newElement, void 0, newChildren) : null
|
|
17584
|
-
});
|
|
17585
|
-
}
|
|
17586
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(SlotClone, {
|
|
17587
|
-
...slotProps,
|
|
17588
|
-
ref: forwardedRef,
|
|
17589
|
-
children
|
|
17590
|
-
});
|
|
17591
|
-
});
|
|
17592
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
17593
|
-
return Slot2;
|
|
17594
|
-
}
|
|
17595
|
-
function dist_createSlotClone(ownerName) {
|
|
17596
|
-
const SlotClone = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
17597
|
-
let { children, ...slotProps } = props;
|
|
17598
|
-
if (isLazyComponent(children) && "function" == typeof use) children = use(children._payload);
|
|
17599
|
-
if (__WEBPACK_EXTERNAL_MODULE_react__.isValidElement(children)) {
|
|
17600
|
-
const childrenRef = react_slot_dist_getElementRef(children);
|
|
17601
|
-
const props2 = dist_mergeProps(slotProps, children.props);
|
|
17602
|
-
if (children.type !== __WEBPACK_EXTERNAL_MODULE_react__.Fragment) props2.ref = forwardedRef ? dist_composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
17603
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(children, props2);
|
|
17604
|
-
}
|
|
17605
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.Children.count(children) > 1 ? __WEBPACK_EXTERNAL_MODULE_react__.Children.only(null) : null;
|
|
17606
|
-
});
|
|
17607
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
17608
|
-
return SlotClone;
|
|
17609
|
-
}
|
|
17610
|
-
var dist_SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
17611
|
-
function dist_isSlottable(child) {
|
|
17612
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(child) && "function" == typeof child.type && "__radixId" in child.type && child.type.__radixId === dist_SLOTTABLE_IDENTIFIER;
|
|
17613
|
-
}
|
|
17614
|
-
function dist_mergeProps(slotProps, childProps) {
|
|
17615
|
-
const overrideProps = {
|
|
17616
|
-
...childProps
|
|
17617
|
-
};
|
|
17618
|
-
for(const propName in childProps){
|
|
17619
|
-
const slotPropValue = slotProps[propName];
|
|
17620
|
-
const childPropValue = childProps[propName];
|
|
17621
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
17622
|
-
if (isHandler) {
|
|
17623
|
-
if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{
|
|
17624
|
-
const result = childPropValue(...args);
|
|
17625
|
-
slotPropValue(...args);
|
|
17626
|
-
return result;
|
|
17627
|
-
};
|
|
17628
|
-
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
17629
|
-
} else if ("style" === propName) overrideProps[propName] = {
|
|
17630
|
-
...slotPropValue,
|
|
17631
|
-
...childPropValue
|
|
17632
|
-
};
|
|
17633
|
-
else if ("className" === propName) overrideProps[propName] = [
|
|
17634
|
-
slotPropValue,
|
|
17635
|
-
childPropValue
|
|
17636
|
-
].filter(Boolean).join(" ");
|
|
17637
|
-
}
|
|
17638
|
-
return {
|
|
17639
|
-
...slotProps,
|
|
17640
|
-
...overrideProps
|
|
17641
|
-
};
|
|
17642
|
-
}
|
|
17643
|
-
function react_slot_dist_getElementRef(element) {
|
|
17644
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
17645
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
17646
|
-
if (mayWarn) return element.ref;
|
|
17647
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
17648
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
17649
|
-
if (mayWarn) return element.props.ref;
|
|
17650
|
-
return element.props.ref || element.ref;
|
|
17651
|
-
}
|
|
17652
|
-
var dist_NODES = [
|
|
17653
|
-
"a",
|
|
17654
|
-
"button",
|
|
17655
|
-
"div",
|
|
17656
|
-
"form",
|
|
17657
|
-
"h2",
|
|
17658
|
-
"h3",
|
|
17659
|
-
"img",
|
|
17660
|
-
"input",
|
|
17661
|
-
"label",
|
|
17662
|
-
"li",
|
|
17663
|
-
"nav",
|
|
17664
|
-
"ol",
|
|
17665
|
-
"p",
|
|
17666
|
-
"select",
|
|
17667
|
-
"span",
|
|
17668
|
-
"svg",
|
|
17669
|
-
"ul"
|
|
17670
|
-
];
|
|
17671
|
-
var dist_Primitive = dist_NODES.reduce((primitive, node)=>{
|
|
17672
|
-
const Slot = dist_createSlot(`Primitive.${node}`);
|
|
17673
|
-
const Node1 = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
17674
|
-
const { asChild, ...primitiveProps } = props;
|
|
17675
|
-
const Comp = asChild ? Slot : node;
|
|
17676
|
-
if ("undefined" != typeof window) window[Symbol.for("radix-ui")] = true;
|
|
17677
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Comp, {
|
|
17678
|
-
...primitiveProps,
|
|
17679
|
-
ref: forwardedRef
|
|
17680
|
-
});
|
|
17681
|
-
});
|
|
17682
|
-
Node1.displayName = `Primitive.${node}`;
|
|
17683
|
-
return {
|
|
17684
|
-
...primitive,
|
|
17685
|
-
[node]: Node1
|
|
17686
|
-
};
|
|
17687
|
-
}, {});
|
|
18001
|
+
const ToolbarGlyph = ToolbarGlyph_ToolbarGlyph;
|
|
17688
18002
|
var react_separator_dist_NAME = "Separator";
|
|
17689
18003
|
var DEFAULT_ORIENTATION = "horizontal";
|
|
17690
18004
|
var ORIENTATIONS = [
|
|
@@ -17701,7 +18015,7 @@ var dist_Separator = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
17701
18015
|
"aria-orientation": ariaOrientation,
|
|
17702
18016
|
role: "separator"
|
|
17703
18017
|
};
|
|
17704
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
18018
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Primitive.div, {
|
|
17705
18019
|
"data-orientation": orientation,
|
|
17706
18020
|
...semanticProps,
|
|
17707
18021
|
...domProps,
|
|
@@ -17739,7 +18053,7 @@ const ToolbarDropdown = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_rea
|
|
|
17739
18053
|
const ToolbarIconDropdown = ({ icon, title, triggerClassName, ...props })=>{
|
|
17740
18054
|
const iconNode = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
17741
18055
|
className: TOOLBAR_TRIGGER_ICON_CLASS_NAME,
|
|
17742
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
18056
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToolbarGlyph, {
|
|
17743
18057
|
children: icon
|
|
17744
18058
|
})
|
|
17745
18059
|
});
|
|
@@ -18224,7 +18538,7 @@ const RulerTicks_RulerTicks = ({ length = 10, tickColor = 'var(--chart-grid-stro
|
|
|
18224
18538
|
});
|
|
18225
18539
|
};
|
|
18226
18540
|
const components_RulerTicks = RulerTicks_RulerTicks;
|
|
18227
|
-
const
|
|
18541
|
+
const ZoomViewportLayer_ZoomViewportLayer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ children, className, style: customStyle }, ref)=>{
|
|
18228
18542
|
const { state: { zoom: { style: zoomStyle } } } = useStore_useStore();
|
|
18229
18543
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
18230
18544
|
ref: ref,
|
|
@@ -18237,7 +18551,7 @@ const ZoomViewportLayer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.fo
|
|
|
18237
18551
|
})
|
|
18238
18552
|
});
|
|
18239
18553
|
});
|
|
18240
|
-
const
|
|
18554
|
+
const ZoomViewportLayer = ZoomViewportLayer_ZoomViewportLayer;
|
|
18241
18555
|
const AXIS_X_TICKS_LAYER_CLASS_NAME = 'absolute right-0 top-0 flex h-full w-full items-center justify-between text-xs opacity-50';
|
|
18242
18556
|
const AXIS_X_TICKS_SHELL_CLASS_NAME = 'relative h-6 w-full select-none overflow-hidden text-xs leading-6';
|
|
18243
18557
|
const MSCAN_SEGMENT_CLASS_NAME = 'flex flex-1 items-center justify-center';
|
|
@@ -18379,7 +18693,7 @@ const AxisXTicks = ({ type })=>{
|
|
|
18379
18693
|
if (!show) return null;
|
|
18380
18694
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
18381
18695
|
className: AXIS_X_TICKS_SHELL_CLASS_NAME,
|
|
18382
|
-
children: type === constants_ChartType.Scan || type === constants_ChartType.ScanDF360 ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DataNFixedTicks, {}) : type === constants_ChartType.MScan ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
18696
|
+
children: type === constants_ChartType.Scan || type === constants_ChartType.ScanDF360 ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DataNFixedTicks, {}) : type === constants_ChartType.MScan ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
18383
18697
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MScanTicks, {})
|
|
18384
18698
|
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ThreeFixedTicks, {})
|
|
18385
18699
|
});
|
|
@@ -22055,7 +22369,7 @@ const Cursor = ({ id, type })=>{
|
|
|
22055
22369
|
type
|
|
22056
22370
|
]);
|
|
22057
22371
|
if (!show || !isEnabled || !active) return null;
|
|
22058
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(
|
|
22372
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(ZoomViewportLayer, {
|
|
22059
22373
|
className: "z-[6]",
|
|
22060
22374
|
children: [
|
|
22061
22375
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
@@ -22268,7 +22582,7 @@ const EventBus_EventBus = ({ id })=>{
|
|
|
22268
22582
|
}, [
|
|
22269
22583
|
handleMouseLeave
|
|
22270
22584
|
]);
|
|
22271
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
22585
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
22272
22586
|
className: "z-[5] pointer-events-auto",
|
|
22273
22587
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
|
|
22274
22588
|
ref: containerRef,
|
|
@@ -22615,7 +22929,7 @@ const Area_Area = (props)=>{
|
|
|
22615
22929
|
})
|
|
22616
22930
|
})
|
|
22617
22931
|
}),
|
|
22618
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
22932
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
22619
22933
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
22620
22934
|
style: {
|
|
22621
22935
|
left: `${areaStyle?.left}%`,
|
|
@@ -23313,7 +23627,7 @@ const DragSelectBox = ({ enabled, defaultRect, minSize = 0, minWidth, minHeight,
|
|
|
23313
23627
|
const middleInsetX = displayRectBox ? Math.max(0, Math.min(6, displayRectBox.width / 4)) : 6;
|
|
23314
23628
|
const middleInsetY = displayRectBox ? Math.max(0, Math.min(6, displayRectBox.height / 4)) : 6;
|
|
23315
23629
|
if (!enabled) return null;
|
|
23316
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(
|
|
23630
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(ZoomViewportLayer, {
|
|
23317
23631
|
className: cn_cn('left-0 top-0 h-full w-full overflow-hidden', className),
|
|
23318
23632
|
ref: containerRef,
|
|
23319
23633
|
style: {
|
|
@@ -24323,7 +24637,7 @@ const IQChart = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_r
|
|
|
24323
24637
|
const IQ_IQ = withChartPublisher(IQChart, 'IQ');
|
|
24324
24638
|
const IQ = IQ_IQ;
|
|
24325
24639
|
const Reset_modes = Object.values(constants_ModuleType);
|
|
24326
|
-
const
|
|
24640
|
+
const Reset_Reset = ()=>{
|
|
24327
24641
|
const { state: { globalID, publish } } = useStore_useStore();
|
|
24328
24642
|
const handleReset = ()=>{
|
|
24329
24643
|
publish?.({
|
|
@@ -24350,7 +24664,7 @@ const Reset = ()=>{
|
|
|
24350
24664
|
})
|
|
24351
24665
|
});
|
|
24352
24666
|
};
|
|
24353
|
-
const
|
|
24667
|
+
const Reset = Reset_Reset;
|
|
24354
24668
|
const SegmentsDisplayControl_SegmentsDisplayControl = ()=>{
|
|
24355
24669
|
const { state: { segments, globalID } } = useStore_useStore();
|
|
24356
24670
|
const [display, setDisplay] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([]);
|
|
@@ -24395,7 +24709,7 @@ const SegmentsDisplayControl_SegmentsDisplayControl = ()=>{
|
|
|
24395
24709
|
});
|
|
24396
24710
|
};
|
|
24397
24711
|
const SegmentsDisplayControl = SegmentsDisplayControl_SegmentsDisplayControl;
|
|
24398
|
-
const
|
|
24712
|
+
const SeriesControl_SeriesControl = ({ type })=>{
|
|
24399
24713
|
const { state: { globalID } } = useStore_useStore();
|
|
24400
24714
|
const { mode: currentMode } = useSeriesManager(globalID);
|
|
24401
24715
|
const handleSeriesControl = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
@@ -24517,7 +24831,7 @@ const SeriesControl = ({ type })=>{
|
|
|
24517
24831
|
children: renderIcon()
|
|
24518
24832
|
});
|
|
24519
24833
|
};
|
|
24520
|
-
const
|
|
24834
|
+
const SeriesControl = SeriesControl_SeriesControl;
|
|
24521
24835
|
const SeriesDisplayControl = ()=>{
|
|
24522
24836
|
const { state: { globalID, series: seriesConfig } } = useStore_useStore();
|
|
24523
24837
|
const filteredSeries = useFilteredSeries_useFilteredSeries(globalID);
|
|
@@ -24879,7 +25193,7 @@ const FluorescenceSwitch = ()=>{
|
|
|
24879
25193
|
tone: "primary",
|
|
24880
25194
|
onClick: toggleDisplay,
|
|
24881
25195
|
title: title,
|
|
24882
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
25196
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToolbarGlyph, {
|
|
24883
25197
|
opticalOffsetY: iconOpticalOffsetY,
|
|
24884
25198
|
opticalScale: iconOpticalScale,
|
|
24885
25199
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Icon, {})
|
|
@@ -24891,7 +25205,7 @@ const FluorescenceSwitch = ()=>{
|
|
|
24891
25205
|
tone: "primary",
|
|
24892
25206
|
onClick: toggleDisplay,
|
|
24893
25207
|
title: title,
|
|
24894
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
25208
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToolbarGlyph, {
|
|
24895
25209
|
opticalOffsetY: iconOpticalOffsetY,
|
|
24896
25210
|
opticalScale: iconOpticalScale,
|
|
24897
25211
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Icon, {})
|
|
@@ -25578,7 +25892,7 @@ const TOOLBAR_ITEM_CONFIGS = [
|
|
|
25578
25892
|
]
|
|
25579
25893
|
},
|
|
25580
25894
|
{
|
|
25581
|
-
component:
|
|
25895
|
+
component: Reset,
|
|
25582
25896
|
toolType: constants_ToolbarItemType.Reset,
|
|
25583
25897
|
supportedCharts: [],
|
|
25584
25898
|
excludedCharts: [
|
|
@@ -25596,7 +25910,7 @@ const TOOLBAR_ITEM_CONFIGS = [
|
|
|
25596
25910
|
]
|
|
25597
25911
|
},
|
|
25598
25912
|
{
|
|
25599
|
-
component:
|
|
25913
|
+
component: SeriesControl,
|
|
25600
25914
|
toolType: constants_ToolbarItemType.SeriesControl,
|
|
25601
25915
|
supportedCharts: [
|
|
25602
25916
|
constants_ChartType.SingleFrequency,
|
|
@@ -25707,7 +26021,7 @@ const resolveToolbarItemProps = (config, chartType)=>{
|
|
|
25707
26021
|
};
|
|
25708
26022
|
return config.props;
|
|
25709
26023
|
};
|
|
25710
|
-
const
|
|
26024
|
+
const Toolbar_Toolbar = ({ type })=>{
|
|
25711
26025
|
const show = useStore_useSelector((state)=>state.toolbar.show);
|
|
25712
26026
|
const hiddenTools = useStore_useSelector((state)=>state.toolbar.hiddenTools ?? []);
|
|
25713
26027
|
const { width, pluginBoxWidth } = useAxisYWidth_useAxisYWidth();
|
|
@@ -25739,7 +26053,7 @@ const Toolbar = ({ type })=>{
|
|
|
25739
26053
|
})
|
|
25740
26054
|
});
|
|
25741
26055
|
};
|
|
25742
|
-
const
|
|
26056
|
+
const Toolbar = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(Toolbar_Toolbar);
|
|
25743
26057
|
function useLevelStreamAnalyzer() {
|
|
25744
26058
|
const { state: { globalID, axisY, levelStream } } = useStore_useStore();
|
|
25745
26059
|
const range = axisY.range ?? constants_RANGE_DEFAULT;
|
|
@@ -25865,7 +26179,7 @@ class Occupancy extends BaseRenderer {
|
|
|
25865
26179
|
});
|
|
25866
26180
|
}
|
|
25867
26181
|
}
|
|
25868
|
-
const
|
|
26182
|
+
const Level_Level = (props)=>{
|
|
25869
26183
|
const { opacity } = props;
|
|
25870
26184
|
const { chart, Chart } = hooks_useChart({
|
|
25871
26185
|
Render: Occupancy,
|
|
@@ -25888,7 +26202,7 @@ const Level = (props)=>{
|
|
|
25888
26202
|
style: style
|
|
25889
26203
|
});
|
|
25890
26204
|
};
|
|
25891
|
-
const
|
|
26205
|
+
const Level = Level_Level;
|
|
25892
26206
|
const LINE_WIDTH_BASE = 0.5;
|
|
25893
26207
|
const MAJOR_TICK_LENGTH = 6;
|
|
25894
26208
|
const MINOR_TICK_LENGTH = 4;
|
|
@@ -26486,7 +26800,7 @@ const DragFrame = ({ id })=>{
|
|
|
26486
26800
|
id
|
|
26487
26801
|
]);
|
|
26488
26802
|
if (!zoom.show) return null;
|
|
26489
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
26803
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
26490
26804
|
className: "z-[3]",
|
|
26491
26805
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
26492
26806
|
className: "absolute left-[-100%] top-0 h-full w-0 box-border border-2 border-dashed border-chart-grid-strong bg-chart-surface opacity-40",
|
|
@@ -27636,7 +27950,7 @@ const FrequencyTagLine_FrequencyTagLine = (props)=>{
|
|
|
27636
27950
|
show
|
|
27637
27951
|
]);
|
|
27638
27952
|
if (!show || !display) return null;
|
|
27639
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
27953
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
27640
27954
|
className: "z-[3]",
|
|
27641
27955
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
27642
27956
|
className: "relative flex h-full w-px border-l border-dashed border-chart-highlight/80 opacity-80",
|
|
@@ -27867,7 +28181,7 @@ const Limit_Limit = ({ id })=>{
|
|
|
27867
28181
|
system.height
|
|
27868
28182
|
]);
|
|
27869
28183
|
if (!show) return null;
|
|
27870
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
28184
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
27871
28185
|
className: "z-[2]",
|
|
27872
28186
|
children: segments?.map((i, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
27873
28187
|
style: {
|
|
@@ -29253,7 +29567,7 @@ const Markers = ({ id })=>{
|
|
|
29253
29567
|
resetMarkers
|
|
29254
29568
|
]);
|
|
29255
29569
|
if (!show) return null;
|
|
29256
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
29570
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
29257
29571
|
className: "z-[5]",
|
|
29258
29572
|
children: markers.map((marker)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Markers_MarkerItem, {
|
|
29259
29573
|
marker: marker
|
|
@@ -29309,7 +29623,7 @@ function useScope_useScope() {
|
|
|
29309
29623
|
const Scope = ()=>{
|
|
29310
29624
|
const { state: { scope: { show, left, width } } } = useStore_useStore();
|
|
29311
29625
|
if (!show) return null;
|
|
29312
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
29626
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
29313
29627
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
29314
29628
|
className: "relative flex h-full w-0 box-border border-y border-dashed border-chart-grid bg-chart-surface opacity-50",
|
|
29315
29629
|
style: {
|
|
@@ -29602,7 +29916,7 @@ const Stripe_Stripe = ({ id })=>{
|
|
|
29602
29916
|
change
|
|
29603
29917
|
]);
|
|
29604
29918
|
if (!show || left - right === 0 || !display) return null;
|
|
29605
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
29919
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
29606
29920
|
className: "z-[3]",
|
|
29607
29921
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
29608
29922
|
className: "relative flex h-full w-px box-border border-x-2 border-dashed border-y-0 border-chart-grid-strong bg-chart-surface opacity-40",
|
|
@@ -29614,37 +29928,73 @@ const Stripe_Stripe = ({ id })=>{
|
|
|
29614
29928
|
});
|
|
29615
29929
|
};
|
|
29616
29930
|
const Stripe = Stripe_Stripe;
|
|
29931
|
+
function resolveBandPositions(band, segments) {
|
|
29932
|
+
if (!band.show) return [];
|
|
29933
|
+
if (band.kind === BandKind.Position) return [
|
|
29934
|
+
{
|
|
29935
|
+
key: BandKind.Position,
|
|
29936
|
+
left: band.left ?? 50 - band.width / 2,
|
|
29937
|
+
width: band.width
|
|
29938
|
+
}
|
|
29939
|
+
];
|
|
29940
|
+
const range = frequencyCalculation_calculateFrequencyRange(band);
|
|
29941
|
+
if (!range || !segments.length) return [];
|
|
29942
|
+
const totalSegmentPoints = segments.reduce((sum, segment)=>sum + Math.max(0, segment.point), 0);
|
|
29943
|
+
if (totalSegmentPoints <= 0) return [];
|
|
29944
|
+
const positions = [];
|
|
29945
|
+
let segmentLeft = 0;
|
|
29946
|
+
segments.forEach((segment, segmentIndex)=>{
|
|
29947
|
+
const segmentWidth = Math.max(0, segment.point) / totalSegmentPoints * 100;
|
|
29948
|
+
if (segment.point > 0 && segment.frequencyCache?.length && isRangeIntersectSegment(range, segment)) {
|
|
29949
|
+
const localPosition = calculatePositionFromFrequencyRange(range, segment);
|
|
29950
|
+
positions.push({
|
|
29951
|
+
key: `frequency-${segmentIndex}`,
|
|
29952
|
+
left: segmentLeft + localPosition.left / 100 * segmentWidth,
|
|
29953
|
+
width: localPosition.width / 100 * segmentWidth
|
|
29954
|
+
});
|
|
29955
|
+
}
|
|
29956
|
+
segmentLeft += segmentWidth;
|
|
29957
|
+
});
|
|
29958
|
+
return positions;
|
|
29959
|
+
}
|
|
29617
29960
|
function useBandLayerController() {
|
|
29618
|
-
const {
|
|
29961
|
+
const { dispatch, store } = useStoreApi();
|
|
29619
29962
|
const updateBand = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
29620
|
-
const
|
|
29963
|
+
const current = store.getState().band;
|
|
29964
|
+
const next = resolveBandState(e, current, 'replace');
|
|
29965
|
+
if (next === current) return;
|
|
29621
29966
|
dispatch({
|
|
29622
29967
|
payload: {
|
|
29623
|
-
band:
|
|
29624
|
-
...band,
|
|
29625
|
-
show,
|
|
29626
|
-
width
|
|
29627
|
-
}
|
|
29968
|
+
band: next
|
|
29628
29969
|
}
|
|
29629
29970
|
});
|
|
29630
29971
|
}, [
|
|
29631
|
-
|
|
29972
|
+
dispatch,
|
|
29973
|
+
store
|
|
29632
29974
|
]);
|
|
29633
29975
|
return updateBand;
|
|
29634
29976
|
}
|
|
29635
29977
|
const BandLayer_BandLayer = ()=>{
|
|
29636
|
-
const
|
|
29637
|
-
|
|
29638
|
-
|
|
29639
|
-
|
|
29640
|
-
|
|
29641
|
-
|
|
29642
|
-
|
|
29643
|
-
|
|
29644
|
-
|
|
29645
|
-
|
|
29646
|
-
|
|
29647
|
-
|
|
29978
|
+
const band = useStore_useSelector((state)=>state.band);
|
|
29979
|
+
const segments = useStore_useSelector((state)=>state.segments);
|
|
29980
|
+
const positions = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>resolveBandPositions(band, segments), [
|
|
29981
|
+
band,
|
|
29982
|
+
segments
|
|
29983
|
+
]);
|
|
29984
|
+
if (!positions.length) return null;
|
|
29985
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
29986
|
+
children: positions.map((position)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
29987
|
+
"data-testid": "spectrum-band",
|
|
29988
|
+
"data-band-kind": band.kind,
|
|
29989
|
+
"data-band-key": position.key,
|
|
29990
|
+
className: "absolute flex h-full w-0 box-border border-y border-dashed opacity-50",
|
|
29991
|
+
style: {
|
|
29992
|
+
left: `${position.left}%`,
|
|
29993
|
+
width: `${position.width}%`,
|
|
29994
|
+
backgroundColor: band.color ? `${band.color}15` : void 0,
|
|
29995
|
+
borderColor: band.color
|
|
29996
|
+
}
|
|
29997
|
+
}, position.key))
|
|
29648
29998
|
});
|
|
29649
29999
|
};
|
|
29650
30000
|
const BandLayer = BandLayer_BandLayer;
|
|
@@ -29775,13 +30125,13 @@ const LevelStream_Chart_Chart = (props)=>{
|
|
|
29775
30125
|
]);
|
|
29776
30126
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_Container, {
|
|
29777
30127
|
children: [
|
|
29778
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30128
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
|
|
29779
30129
|
type: constants_ChartType.LevelStream
|
|
29780
30130
|
}),
|
|
29781
30131
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FlexBox, {
|
|
29782
30132
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Spectrum, {
|
|
29783
30133
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(PluginBox, {
|
|
29784
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30134
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Level, {
|
|
29785
30135
|
opacity: 0.5
|
|
29786
30136
|
})
|
|
29787
30137
|
})
|
|
@@ -30180,7 +30530,7 @@ const HeatmapPortal_Chart = (props)=>{
|
|
|
30180
30530
|
id: heatmapElementID,
|
|
30181
30531
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Background, {
|
|
30182
30532
|
children: [
|
|
30183
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30533
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
|
|
30184
30534
|
type: constants_ChartType.Heatmap
|
|
30185
30535
|
}),
|
|
30186
30536
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Heatmap, {}),
|
|
@@ -30203,7 +30553,7 @@ const OccupancyPortal_Chart = (props)=>{
|
|
|
30203
30553
|
occupancyAxisYDisabled: true
|
|
30204
30554
|
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Background, {
|
|
30205
30555
|
children: [
|
|
30206
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30556
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
|
|
30207
30557
|
type: constants_ChartType.Occupancy
|
|
30208
30558
|
}),
|
|
30209
30559
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Occupancy, {}),
|
|
@@ -30246,7 +30596,7 @@ const Blaze = ()=>{
|
|
|
30246
30596
|
globalID
|
|
30247
30597
|
]);
|
|
30248
30598
|
if (!show) return null;
|
|
30249
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30599
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
30250
30600
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
30251
30601
|
className: "absolute left-[-100%] top-0 flex h-full w-0 opacity-50",
|
|
30252
30602
|
style: {
|
|
@@ -30281,7 +30631,7 @@ const Spectrum_Legend = Legend;
|
|
|
30281
30631
|
const SegmentsZebra = ()=>{
|
|
30282
30632
|
const { state: { segments } } = useStore_useStore();
|
|
30283
30633
|
const totalPoints = segments.totalPoints ?? 0;
|
|
30284
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30634
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
30285
30635
|
className: "z-[0]",
|
|
30286
30636
|
children: segments.map((i, key)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
30287
30637
|
className: "h-full border-x",
|
|
@@ -30623,7 +30973,7 @@ const Spectrum_Chart_Chart = (props)=>{
|
|
|
30623
30973
|
});
|
|
30624
30974
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_Container, {
|
|
30625
30975
|
children: [
|
|
30626
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30976
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
|
|
30627
30977
|
type: type
|
|
30628
30978
|
}),
|
|
30629
30979
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_FlexBox, {
|