@rfkit/charts 1.5.1 → 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/charts/Spectrum/heatmapCaptureDefaults.d.ts +2 -0
- package/components/Cursor/useCursorSample.d.ts +2 -0
- package/components/EventBus/position.d.ts +8 -0
- package/components/EventBus/tools.d.ts +2 -1
- package/components/Overlay/Popover/index.d.ts +1 -0
- package/components/Toolbar/icons/DeltaMeasurementIcon.d.ts +3 -0
- package/components/Toolbar/icons/index.d.ts +1 -0
- package/components/ui/cursor-follow-layer.d.ts +1 -2
- 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/spectrum/index.d.ts +1 -0
- package/hooks/spectrum/waterfall.d.ts +5 -0
- package/hooks/useChart/index.d.ts +1 -1
- package/index.d.ts +2 -2
- package/index.js +1785 -736
- package/modules/Dial/index.d.ts +1 -1
- package/modules/Heatmap/cursorValue.d.ts +38 -0
- package/modules/IQEye/index.d.ts +1 -1
- package/modules/IQPlanisphere/index.d.ts +1 -1
- package/modules/Occupancy/CursorPopover.d.ts +4 -1
- package/modules/Spectrum/AxisYCanvas/index.d.ts +1 -1
- package/modules/Spectrum/BandLayer/bandState.d.ts +9 -0
- package/modules/Spectrum/FrequencyAllocation/model/channelModel.d.ts +16 -0
- package/modules/Spectrum/FrequencyAllocation/model/density.d.ts +13 -0
- package/modules/Spectrum/FrequencyAllocation/model/index.d.ts +4 -3
- package/modules/Spectrum/FrequencyAllocation/model/resolveFrequencyAllocationData.d.ts +7 -1
- package/modules/Spectrum/FrequencyAllocation/model/resolver.d.ts +26 -1
- package/modules/Spectrum/FrequencyAllocation/model/useAllocationAtCursor.d.ts +3 -1
- package/modules/Spectrum/FrequencyAllocation/model/useFrequencyAllocationData.d.ts +1 -0
- package/modules/Spectrum/FrequencyAllocation/overlays/Tooltip/index.d.ts +8 -1
- package/modules/Spectrum/FrequencyAllocation/presenters/AllocationInfo/index.d.ts +1 -0
- package/modules/Spectrum/FrequencyAllocation/presenters/AllocationSegments/index.d.ts +3 -3
- package/modules/Spectrum/FrequencyAllocation/tools.d.ts +11 -1
- package/modules/Spectrum/FrequencyAllocation/types.d.ts +3 -0
- package/modules/Spectrum/FrequencyDataBoard/index.d.ts +2 -0
- package/modules/Spectrum/Signal/index.d.ts +1 -0
- package/modules/Spectrum/Signal/model/index.d.ts +1 -1
- package/modules/Spectrum/Signal/model/resolver.d.ts +25 -0
- package/modules/Spectrum/Signal/model/useStationInfoAtCursor.d.ts +3 -1
- package/package.json +1 -1
- package/runtime/interaction/index.d.ts +71 -0
- package/store/bandState.d.ts +7 -0
- package/types/publish.d.ts +2 -2
- package/types/store/frequency.d.ts +8 -0
- package/types/store/heatmap.d.ts +2 -0
- 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 {
|
|
@@ -571,6 +634,22 @@ var __webpack_modules__ = {
|
|
|
571
634
|
z-index: 1000;
|
|
572
635
|
}
|
|
573
636
|
|
|
637
|
+
[data-rfkit-charts-root] .row-0 {
|
|
638
|
+
grid-row: 0;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
[data-rfkit-charts-root] .row-1 {
|
|
642
|
+
grid-row: 1;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
[data-rfkit-charts-root] .row-2 {
|
|
646
|
+
grid-row: 2;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
[data-rfkit-charts-root] .row-3 {
|
|
650
|
+
grid-row: 3;
|
|
651
|
+
}
|
|
652
|
+
|
|
574
653
|
[data-rfkit-charts-root] .container {
|
|
575
654
|
width: 100%;
|
|
576
655
|
}
|
|
@@ -606,7 +685,7 @@ var __webpack_modules__ = {
|
|
|
606
685
|
}
|
|
607
686
|
|
|
608
687
|
[data-rfkit-charts-root] .m-0 {
|
|
609
|
-
margin:
|
|
688
|
+
margin: 0;
|
|
610
689
|
}
|
|
611
690
|
|
|
612
691
|
[data-rfkit-charts-root] .-mx-1 {
|
|
@@ -614,11 +693,11 @@ var __webpack_modules__ = {
|
|
|
614
693
|
}
|
|
615
694
|
|
|
616
695
|
[data-rfkit-charts-root] .mx-1 {
|
|
617
|
-
margin-inline:
|
|
696
|
+
margin-inline: var(--spacing);
|
|
618
697
|
}
|
|
619
698
|
|
|
620
699
|
[data-rfkit-charts-root] .my-1 {
|
|
621
|
-
margin-block:
|
|
700
|
+
margin-block: var(--spacing);
|
|
622
701
|
}
|
|
623
702
|
|
|
624
703
|
[data-rfkit-charts-root] .my-\\[calc\\(var\\(--size-gap-base\\)\\/2\\)\\] {
|
|
@@ -630,7 +709,7 @@ var __webpack_modules__ = {
|
|
|
630
709
|
}
|
|
631
710
|
|
|
632
711
|
[data-rfkit-charts-root] .mt-1 {
|
|
633
|
-
margin-top:
|
|
712
|
+
margin-top: var(--spacing);
|
|
634
713
|
}
|
|
635
714
|
|
|
636
715
|
[data-rfkit-charts-root] .mt-2 {
|
|
@@ -654,11 +733,11 @@ var __webpack_modules__ = {
|
|
|
654
733
|
}
|
|
655
734
|
|
|
656
735
|
[data-rfkit-charts-root] .mr-1 {
|
|
657
|
-
margin-right:
|
|
736
|
+
margin-right: var(--spacing);
|
|
658
737
|
}
|
|
659
738
|
|
|
660
739
|
[data-rfkit-charts-root] .mb-1 {
|
|
661
|
-
margin-bottom:
|
|
740
|
+
margin-bottom: var(--spacing);
|
|
662
741
|
}
|
|
663
742
|
|
|
664
743
|
[data-rfkit-charts-root] .mb-2 {
|
|
@@ -733,7 +812,7 @@ var __webpack_modules__ = {
|
|
|
733
812
|
}
|
|
734
813
|
|
|
735
814
|
[data-rfkit-charts-root] .h-0 {
|
|
736
|
-
height:
|
|
815
|
+
height: 0;
|
|
737
816
|
}
|
|
738
817
|
|
|
739
818
|
[data-rfkit-charts-root] .h-1\\.5 {
|
|
@@ -829,7 +908,7 @@ var __webpack_modules__ = {
|
|
|
829
908
|
}
|
|
830
909
|
|
|
831
910
|
[data-rfkit-charts-root] .min-h-0 {
|
|
832
|
-
min-height:
|
|
911
|
+
min-height: 0;
|
|
833
912
|
}
|
|
834
913
|
|
|
835
914
|
[data-rfkit-charts-root] .min-h-\\[30\\%\\] {
|
|
@@ -857,7 +936,7 @@ var __webpack_modules__ = {
|
|
|
857
936
|
}
|
|
858
937
|
|
|
859
938
|
[data-rfkit-charts-root] .w-0 {
|
|
860
|
-
width:
|
|
939
|
+
width: 0;
|
|
861
940
|
}
|
|
862
941
|
|
|
863
942
|
[data-rfkit-charts-root] .w-2\\.5 {
|
|
@@ -962,7 +1041,7 @@ var __webpack_modules__ = {
|
|
|
962
1041
|
}
|
|
963
1042
|
|
|
964
1043
|
[data-rfkit-charts-root] .min-w-0 {
|
|
965
|
-
min-width:
|
|
1044
|
+
min-width: 0;
|
|
966
1045
|
}
|
|
967
1046
|
|
|
968
1047
|
[data-rfkit-charts-root] .min-w-4 {
|
|
@@ -1044,7 +1123,7 @@ var __webpack_modules__ = {
|
|
|
1044
1123
|
}
|
|
1045
1124
|
|
|
1046
1125
|
[data-rfkit-charts-root] .translate-x-0 {
|
|
1047
|
-
--tw-translate-x:
|
|
1126
|
+
--tw-translate-x: 0;
|
|
1048
1127
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1049
1128
|
}
|
|
1050
1129
|
|
|
@@ -1059,7 +1138,7 @@ var __webpack_modules__ = {
|
|
|
1059
1138
|
}
|
|
1060
1139
|
|
|
1061
1140
|
[data-rfkit-charts-root] .translate-y-0 {
|
|
1062
|
-
--tw-translate-y:
|
|
1141
|
+
--tw-translate-y: 0;
|
|
1063
1142
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1064
1143
|
}
|
|
1065
1144
|
|
|
@@ -1185,7 +1264,7 @@ var __webpack_modules__ = {
|
|
|
1185
1264
|
}
|
|
1186
1265
|
|
|
1187
1266
|
[data-rfkit-charts-root] .gap-0 {
|
|
1188
|
-
gap:
|
|
1267
|
+
gap: 0;
|
|
1189
1268
|
}
|
|
1190
1269
|
|
|
1191
1270
|
[data-rfkit-charts-root] .gap-0\\.5 {
|
|
@@ -1193,7 +1272,7 @@ var __webpack_modules__ = {
|
|
|
1193
1272
|
}
|
|
1194
1273
|
|
|
1195
1274
|
[data-rfkit-charts-root] .gap-1 {
|
|
1196
|
-
gap:
|
|
1275
|
+
gap: var(--spacing);
|
|
1197
1276
|
}
|
|
1198
1277
|
|
|
1199
1278
|
[data-rfkit-charts-root] .gap-1\\.5 {
|
|
@@ -1222,8 +1301,8 @@ var __webpack_modules__ = {
|
|
|
1222
1301
|
|
|
1223
1302
|
[data-rfkit-charts-root] :where(.space-y-1 > :not(:last-child)) {
|
|
1224
1303
|
--tw-space-y-reverse: 0;
|
|
1225
|
-
margin-block-start: calc(
|
|
1226
|
-
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)));
|
|
1227
1306
|
}
|
|
1228
1307
|
|
|
1229
1308
|
[data-rfkit-charts-root] :where(.space-y-2 > :not(:last-child)) {
|
|
@@ -1233,7 +1312,7 @@ var __webpack_modules__ = {
|
|
|
1233
1312
|
}
|
|
1234
1313
|
|
|
1235
1314
|
[data-rfkit-charts-root] .gap-x-1 {
|
|
1236
|
-
column-gap:
|
|
1315
|
+
column-gap: var(--spacing);
|
|
1237
1316
|
}
|
|
1238
1317
|
|
|
1239
1318
|
[data-rfkit-charts-root] .gap-x-3 {
|
|
@@ -1249,7 +1328,7 @@ var __webpack_modules__ = {
|
|
|
1249
1328
|
}
|
|
1250
1329
|
|
|
1251
1330
|
[data-rfkit-charts-root] .gap-y-1 {
|
|
1252
|
-
row-gap:
|
|
1331
|
+
row-gap: var(--spacing);
|
|
1253
1332
|
}
|
|
1254
1333
|
|
|
1255
1334
|
[data-rfkit-charts-root] .gap-y-2 {
|
|
@@ -1642,7 +1721,7 @@ var __webpack_modules__ = {
|
|
|
1642
1721
|
}
|
|
1643
1722
|
|
|
1644
1723
|
[data-rfkit-charts-root] .p-0 {
|
|
1645
|
-
padding:
|
|
1724
|
+
padding: 0;
|
|
1646
1725
|
}
|
|
1647
1726
|
|
|
1648
1727
|
[data-rfkit-charts-root] .p-0\\.5 {
|
|
@@ -1650,7 +1729,7 @@ var __webpack_modules__ = {
|
|
|
1650
1729
|
}
|
|
1651
1730
|
|
|
1652
1731
|
[data-rfkit-charts-root] .p-1 {
|
|
1653
|
-
padding:
|
|
1732
|
+
padding: var(--spacing);
|
|
1654
1733
|
}
|
|
1655
1734
|
|
|
1656
1735
|
[data-rfkit-charts-root] .p-2 {
|
|
@@ -1686,7 +1765,7 @@ var __webpack_modules__ = {
|
|
|
1686
1765
|
}
|
|
1687
1766
|
|
|
1688
1767
|
[data-rfkit-charts-root] .px-1 {
|
|
1689
|
-
padding-inline:
|
|
1768
|
+
padding-inline: var(--spacing);
|
|
1690
1769
|
}
|
|
1691
1770
|
|
|
1692
1771
|
[data-rfkit-charts-root] .px-1\\.5 {
|
|
@@ -1726,7 +1805,7 @@ var __webpack_modules__ = {
|
|
|
1726
1805
|
}
|
|
1727
1806
|
|
|
1728
1807
|
[data-rfkit-charts-root] .py-1 {
|
|
1729
|
-
padding-block:
|
|
1808
|
+
padding-block: var(--spacing);
|
|
1730
1809
|
}
|
|
1731
1810
|
|
|
1732
1811
|
[data-rfkit-charts-root] .py-1\\.5 {
|
|
@@ -1742,11 +1821,11 @@ var __webpack_modules__ = {
|
|
|
1742
1821
|
}
|
|
1743
1822
|
|
|
1744
1823
|
[data-rfkit-charts-root] .pt-0 {
|
|
1745
|
-
padding-top:
|
|
1824
|
+
padding-top: 0;
|
|
1746
1825
|
}
|
|
1747
1826
|
|
|
1748
1827
|
[data-rfkit-charts-root] .pt-1 {
|
|
1749
|
-
padding-top:
|
|
1828
|
+
padding-top: var(--spacing);
|
|
1750
1829
|
}
|
|
1751
1830
|
|
|
1752
1831
|
[data-rfkit-charts-root] .pt-\\[calc\\(var\\(--size-gap-base\\)\\/2\\)\\] {
|
|
@@ -1754,7 +1833,7 @@ var __webpack_modules__ = {
|
|
|
1754
1833
|
}
|
|
1755
1834
|
|
|
1756
1835
|
[data-rfkit-charts-root] .pr-0 {
|
|
1757
|
-
padding-right:
|
|
1836
|
+
padding-right: 0;
|
|
1758
1837
|
}
|
|
1759
1838
|
|
|
1760
1839
|
[data-rfkit-charts-root] .pr-0\\.5 {
|
|
@@ -1762,7 +1841,7 @@ var __webpack_modules__ = {
|
|
|
1762
1841
|
}
|
|
1763
1842
|
|
|
1764
1843
|
[data-rfkit-charts-root] .pr-1 {
|
|
1765
|
-
padding-right:
|
|
1844
|
+
padding-right: var(--spacing);
|
|
1766
1845
|
}
|
|
1767
1846
|
|
|
1768
1847
|
[data-rfkit-charts-root] .pr-2 {
|
|
@@ -1770,11 +1849,11 @@ var __webpack_modules__ = {
|
|
|
1770
1849
|
}
|
|
1771
1850
|
|
|
1772
1851
|
[data-rfkit-charts-root] .pb-0 {
|
|
1773
|
-
padding-bottom:
|
|
1852
|
+
padding-bottom: 0;
|
|
1774
1853
|
}
|
|
1775
1854
|
|
|
1776
1855
|
[data-rfkit-charts-root] .pb-1 {
|
|
1777
|
-
padding-bottom:
|
|
1856
|
+
padding-bottom: var(--spacing);
|
|
1778
1857
|
}
|
|
1779
1858
|
|
|
1780
1859
|
[data-rfkit-charts-root] .pl-0\\.5 {
|
|
@@ -2558,7 +2637,7 @@ var __webpack_modules__ = {
|
|
|
2558
2637
|
}
|
|
2559
2638
|
|
|
2560
2639
|
[data-rfkit-charts-root] .data-\\[side\\=bottom\\]\\:translate-y-1[data-side="bottom"] {
|
|
2561
|
-
--tw-translate-y:
|
|
2640
|
+
--tw-translate-y: var(--spacing);
|
|
2562
2641
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2563
2642
|
}
|
|
2564
2643
|
|
|
@@ -2576,7 +2655,7 @@ var __webpack_modules__ = {
|
|
|
2576
2655
|
}
|
|
2577
2656
|
|
|
2578
2657
|
[data-rfkit-charts-root] .data-\\[side\\=right\\]\\:translate-x-1[data-side="right"] {
|
|
2579
|
-
--tw-translate-x:
|
|
2658
|
+
--tw-translate-x: var(--spacing);
|
|
2580
2659
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2581
2660
|
}
|
|
2582
2661
|
|
|
@@ -2684,38 +2763,38 @@ var __webpack_modules__ = {
|
|
|
2684
2763
|
}
|
|
2685
2764
|
|
|
2686
2765
|
[data-rfkit-charts-root] .data-\\[state\\=unchecked\\]\\:translate-x-0[data-state="unchecked"] {
|
|
2687
|
-
--tw-translate-x:
|
|
2766
|
+
--tw-translate-x: 0;
|
|
2688
2767
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2689
2768
|
}
|
|
2690
2769
|
|
|
2691
|
-
@media (min-width:
|
|
2692
|
-
[data-rfkit-charts-root] .
|
|
2693
|
-
flex-direction: row;
|
|
2694
|
-
}
|
|
2695
|
-
|
|
2696
|
-
[data-rfkit-charts-root] .sm\\:justify-end {
|
|
2697
|
-
justify-content: flex-end;
|
|
2698
|
-
}
|
|
2699
|
-
}
|
|
2700
|
-
|
|
2701
|
-
@media (min-width: 80rem) {
|
|
2702
|
-
[data-rfkit-charts-root] .xl\\:grid-cols-\\[220px_minmax\\(0\\,1\\.2fr\\)_320px\\] {
|
|
2770
|
+
@media (min-width: 1180px) {
|
|
2771
|
+
[data-rfkit-charts-root] .min-\\[1180px\\]\\:grid-cols-\\[220px_minmax\\(0\\,1\\.2fr\\)_320px\\] {
|
|
2703
2772
|
grid-template-columns: 220px minmax(0, 1.2fr) 320px;
|
|
2704
2773
|
}
|
|
2705
2774
|
|
|
2706
|
-
[data-rfkit-charts-root] .
|
|
2775
|
+
[data-rfkit-charts-root] .min-\\[1180px\\]\\:grid-cols-\\[minmax\\(0\\,1\\.2fr\\)_auto_auto\\] {
|
|
2707
2776
|
grid-template-columns: minmax(0, 1.2fr) auto auto;
|
|
2708
2777
|
}
|
|
2709
2778
|
|
|
2710
|
-
[data-rfkit-charts-root] .
|
|
2779
|
+
[data-rfkit-charts-root] .min-\\[1180px\\]\\:grid-cols-\\[minmax\\(0\\,1\\.35fr\\)_320px\\] {
|
|
2711
2780
|
grid-template-columns: minmax(0, 1.35fr) 320px;
|
|
2712
2781
|
}
|
|
2713
2782
|
|
|
2714
|
-
[data-rfkit-charts-root] .
|
|
2783
|
+
[data-rfkit-charts-root] .min-\\[1180px\\]\\:grid-cols-\\[minmax\\(0\\,1fr\\)_minmax\\(0\\,1fr\\)\\] {
|
|
2715
2784
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
2716
2785
|
}
|
|
2717
2786
|
}
|
|
2718
2787
|
|
|
2788
|
+
@media (min-width: 40rem) {
|
|
2789
|
+
[data-rfkit-charts-root] .sm\\:flex-row {
|
|
2790
|
+
flex-direction: row;
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2793
|
+
[data-rfkit-charts-root] .sm\\:justify-end {
|
|
2794
|
+
justify-content: flex-end;
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2719
2798
|
[data-rfkit-charts-root] .\\[\\&_svg\\]\\:pointer-events-none svg {
|
|
2720
2799
|
pointer-events: none;
|
|
2721
2800
|
}
|
|
@@ -5066,7 +5145,9 @@ function isRangeIntersectSegment(range, segment) {
|
|
|
5066
5145
|
}
|
|
5067
5146
|
const isPlainObject = (value1)=>'[object Object]' === Object.prototype.toString.call(value1) && null !== value1;
|
|
5068
5147
|
const mergeObjects = (source, params)=>{
|
|
5069
|
-
const target =
|
|
5148
|
+
const target = {
|
|
5149
|
+
...source
|
|
5150
|
+
};
|
|
5070
5151
|
Object.keys(target).forEach((key)=>{
|
|
5071
5152
|
const paramValue = params[key];
|
|
5072
5153
|
if (isPlainObject(paramValue) && isPlainObject(target[key])) target[key] = {
|
|
@@ -5182,6 +5263,66 @@ const convertToTimestampedArrays = (data, timestamps)=>{
|
|
|
5182
5263
|
return frame;
|
|
5183
5264
|
});
|
|
5184
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
|
+
}
|
|
5185
5326
|
const AppContext = __WEBPACK_EXTERNAL_MODULE_react__["default"].createContext(null);
|
|
5186
5327
|
const store_context = AppContext;
|
|
5187
5328
|
var heatmap_HeatmapCaptureType = /*#__PURE__*/ function(HeatmapCaptureType) {
|
|
@@ -5364,6 +5505,7 @@ function createParams() {
|
|
|
5364
5505
|
onChange: ()=>{}
|
|
5365
5506
|
},
|
|
5366
5507
|
band: {
|
|
5508
|
+
kind: BandKind.Position,
|
|
5367
5509
|
show: false,
|
|
5368
5510
|
left: void 0,
|
|
5369
5511
|
width: 0,
|
|
@@ -5934,6 +6076,14 @@ const Params_Params = (props)=>{
|
|
|
5934
6076
|
const prevValue = prevPropsRef.current[name];
|
|
5935
6077
|
const stateKey = name;
|
|
5936
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
|
+
}
|
|
5937
6087
|
payload[stateKey] = mergeParameter(stateKey, currentValue, currentState);
|
|
5938
6088
|
hasChanges = true;
|
|
5939
6089
|
}
|
|
@@ -6133,20 +6283,28 @@ function useStore_useStore() {
|
|
|
6133
6283
|
store
|
|
6134
6284
|
};
|
|
6135
6285
|
}
|
|
6136
|
-
function
|
|
6286
|
+
function useStore_useSelector(selector) {
|
|
6137
6287
|
const { store } = useAppContext();
|
|
6138
6288
|
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useSyncExternalStore)(store.subscribe, ()=>selector(store.getState()), ()=>selector(store.getState()));
|
|
6139
6289
|
}
|
|
6290
|
+
function useStoreApi() {
|
|
6291
|
+
return useAppContext();
|
|
6292
|
+
}
|
|
6140
6293
|
function useStoreDispatch() {
|
|
6141
6294
|
return useAppContext().dispatch;
|
|
6142
6295
|
}
|
|
6143
6296
|
const Store = (props)=>{
|
|
6144
6297
|
const { children } = props;
|
|
6145
6298
|
const initialStateRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
6146
|
-
if (!initialStateRef.current)
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
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
|
+
}
|
|
6150
6308
|
const runtimeRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
6151
6309
|
if (!runtimeRef.current && initialStateRef.current) runtimeRef.current = createChartRuntime(initialStateRef.current);
|
|
6152
6310
|
if (!runtimeRef.current) throw new Error('Failed to initialize chart runtime');
|
|
@@ -6282,7 +6440,7 @@ const createNextSystemConfig = (system, size)=>({
|
|
|
6282
6440
|
const Container_Container = (props)=>{
|
|
6283
6441
|
const { children, style } = props;
|
|
6284
6442
|
const dispatch = useStoreDispatch();
|
|
6285
|
-
const system =
|
|
6443
|
+
const system = useStore_useSelector((state)=>state.system);
|
|
6286
6444
|
const globalID = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>createGUID(), []);
|
|
6287
6445
|
const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
6288
6446
|
const systemRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(system);
|
|
@@ -6664,11 +6822,18 @@ const createConfigUtils = (config)=>({
|
|
|
6664
6822
|
cache: createLruCache(config.cacheSize),
|
|
6665
6823
|
parseClassName: createParseClassName(config),
|
|
6666
6824
|
sortModifiers: createSortModifiers(config),
|
|
6825
|
+
postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config),
|
|
6667
6826
|
...createClassGroupUtils(config)
|
|
6668
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
|
+
};
|
|
6669
6834
|
const SPLIT_CLASSES_REGEX = /\s+/;
|
|
6670
6835
|
const mergeClassList = (classList, configUtils)=>{
|
|
6671
|
-
const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers } = configUtils;
|
|
6836
|
+
const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers, postfixLookupClassGroupIds } = configUtils;
|
|
6672
6837
|
const classGroupsInConflict = [];
|
|
6673
6838
|
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
6674
6839
|
let result = '';
|
|
@@ -6680,7 +6845,16 @@ const mergeClassList = (classList, configUtils)=>{
|
|
|
6680
6845
|
continue;
|
|
6681
6846
|
}
|
|
6682
6847
|
let hasPostfixModifier = !!maybePostfixModifierPosition;
|
|
6683
|
-
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);
|
|
6684
6858
|
if (!classGroupId) {
|
|
6685
6859
|
if (!hasPostfixModifier) {
|
|
6686
6860
|
result = originalClassName + (result.length > 0 ? ' ' + result : result);
|
|
@@ -6780,6 +6954,7 @@ const isNever = ()=>false;
|
|
|
6780
6954
|
const isShadow = (value1)=>shadowRegex.test(value1);
|
|
6781
6955
|
const isImage = (value1)=>imageRegex.test(value1);
|
|
6782
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));
|
|
6783
6958
|
const isArbitrarySize = (value1)=>getIsArbitraryValue(value1, isLabelSize, isNever);
|
|
6784
6959
|
const isArbitraryValue = (value1)=>arbitraryValueRegex.test(value1);
|
|
6785
6960
|
const isArbitraryLength = (value1)=>getIsArbitraryValue(value1, isLabelLength, isLengthOnly);
|
|
@@ -7218,6 +7393,20 @@ const getDefaultConfig = ()=>{
|
|
|
7218
7393
|
container: [
|
|
7219
7394
|
'container'
|
|
7220
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
|
+
],
|
|
7221
7410
|
columns: [
|
|
7222
7411
|
{
|
|
7223
7412
|
columns: [
|
|
@@ -8139,6 +8328,15 @@ const getDefaultConfig = ()=>{
|
|
|
8139
8328
|
indent: scaleUnambiguousSpacing()
|
|
8140
8329
|
}
|
|
8141
8330
|
],
|
|
8331
|
+
'tab-size': [
|
|
8332
|
+
{
|
|
8333
|
+
tab: [
|
|
8334
|
+
isInteger,
|
|
8335
|
+
isArbitraryVariable,
|
|
8336
|
+
isArbitraryValue
|
|
8337
|
+
]
|
|
8338
|
+
}
|
|
8339
|
+
],
|
|
8142
8340
|
'vertical-align': [
|
|
8143
8341
|
{
|
|
8144
8342
|
align: [
|
|
@@ -9406,6 +9604,15 @@ const getDefaultConfig = ()=>{
|
|
|
9406
9604
|
'translate-none': [
|
|
9407
9605
|
'translate-none'
|
|
9408
9606
|
],
|
|
9607
|
+
zoom: [
|
|
9608
|
+
{
|
|
9609
|
+
zoom: [
|
|
9610
|
+
isInteger,
|
|
9611
|
+
isArbitraryVariable,
|
|
9612
|
+
isArbitraryValue
|
|
9613
|
+
]
|
|
9614
|
+
}
|
|
9615
|
+
],
|
|
9409
9616
|
accent: [
|
|
9410
9617
|
{
|
|
9411
9618
|
accent: scaleColor()
|
|
@@ -9514,6 +9721,34 @@ const getDefaultConfig = ()=>{
|
|
|
9514
9721
|
]
|
|
9515
9722
|
}
|
|
9516
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
|
+
],
|
|
9517
9752
|
'scroll-m': [
|
|
9518
9753
|
{
|
|
9519
9754
|
'scroll-m': scaleUnambiguousSpacing()
|
|
@@ -9748,6 +9983,9 @@ const getDefaultConfig = ()=>{
|
|
|
9748
9983
|
]
|
|
9749
9984
|
},
|
|
9750
9985
|
conflictingClassGroups: {
|
|
9986
|
+
'container-named': [
|
|
9987
|
+
'container-type'
|
|
9988
|
+
],
|
|
9751
9989
|
overflow: [
|
|
9752
9990
|
'overflow-x',
|
|
9753
9991
|
'overflow-y'
|
|
@@ -10013,6 +10251,9 @@ const getDefaultConfig = ()=>{
|
|
|
10013
10251
|
'leading'
|
|
10014
10252
|
]
|
|
10015
10253
|
},
|
|
10254
|
+
postfixLookupClassGroups: [
|
|
10255
|
+
'container-type'
|
|
10256
|
+
],
|
|
10016
10257
|
orderSensitiveModifiers: [
|
|
10017
10258
|
'*',
|
|
10018
10259
|
'**',
|
|
@@ -10524,7 +10765,7 @@ const TOOLBAR_DROPDOWN_CONTENT_CLASS_NAME = 'border-border/80 bg-secondary/92 te
|
|
|
10524
10765
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
10525
10766
|
return function(event) {
|
|
10526
10767
|
originalEventHandler?.(event);
|
|
10527
|
-
if (false === checkForDefaultPrevented || !event.defaultPrevented) return ourEventHandler?.(event);
|
|
10768
|
+
if (false === checkForDefaultPrevented || !event || !event.defaultPrevented) return ourEventHandler?.(event);
|
|
10528
10769
|
};
|
|
10529
10770
|
}
|
|
10530
10771
|
function setRef(ref, value1) {
|
|
@@ -10555,6 +10796,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
10555
10796
|
let defaultContexts = [];
|
|
10556
10797
|
function createContext3(rootComponentName, defaultContext) {
|
|
10557
10798
|
const BaseContext = __WEBPACK_EXTERNAL_MODULE_react__.createContext(defaultContext);
|
|
10799
|
+
BaseContext.displayName = rootComponentName + "Context";
|
|
10558
10800
|
const index = defaultContexts.length;
|
|
10559
10801
|
defaultContexts = [
|
|
10560
10802
|
...defaultContexts,
|
|
@@ -10570,11 +10812,13 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
10570
10812
|
});
|
|
10571
10813
|
};
|
|
10572
10814
|
Provider.displayName = rootComponentName + "Provider";
|
|
10573
|
-
function useContext2(consumerName, scope) {
|
|
10815
|
+
function useContext2(consumerName, scope, options = {}) {
|
|
10816
|
+
const { optional = false } = options;
|
|
10574
10817
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
10575
10818
|
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(Context);
|
|
10576
10819
|
if (context) return context;
|
|
10577
10820
|
if (void 0 !== defaultContext) return defaultContext;
|
|
10821
|
+
if (optional) return;
|
|
10578
10822
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
10579
10823
|
}
|
|
10580
10824
|
return [
|
|
@@ -10699,59 +10943,52 @@ function isFunction(value1) {
|
|
|
10699
10943
|
}
|
|
10700
10944
|
Symbol("RADIX:SYNC_STATE");
|
|
10701
10945
|
function createSlot(ownerName) {
|
|
10702
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
10703
10946
|
const Slot2 = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
});
|
|
10719
|
-
}
|
|
10720
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(SlotClone, {
|
|
10721
|
-
...slotProps,
|
|
10722
|
-
ref: forwardedRef,
|
|
10723
|
-
children
|
|
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);
|
|
10724
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);
|
|
10725
10973
|
});
|
|
10726
10974
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
10727
10975
|
return Slot2;
|
|
10728
10976
|
}
|
|
10729
|
-
|
|
10730
|
-
const SlotClone = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
10731
|
-
const { children, ...slotProps } = props;
|
|
10732
|
-
if (__WEBPACK_EXTERNAL_MODULE_react__.isValidElement(children)) {
|
|
10733
|
-
const childrenRef = getElementRef(children);
|
|
10734
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
10735
|
-
if (children.type !== __WEBPACK_EXTERNAL_MODULE_react__.Fragment) props2.ref = forwardedRef ? dist_composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
10736
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(children, props2);
|
|
10737
|
-
}
|
|
10738
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.Children.count(children) > 1 ? __WEBPACK_EXTERNAL_MODULE_react__.Children.only(null) : null;
|
|
10739
|
-
});
|
|
10740
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
10741
|
-
return SlotClone;
|
|
10742
|
-
}
|
|
10743
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
10977
|
+
var SLOTTABLE_IDENTIFIER = Symbol.for("radix.slottable");
|
|
10744
10978
|
function createSlottable(ownerName) {
|
|
10745
|
-
const Slottable2 = (
|
|
10746
|
-
children
|
|
10747
|
-
});
|
|
10979
|
+
const Slottable2 = (props)=>"child" in props ? props.children(props.child) : props.children;
|
|
10748
10980
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
10749
10981
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
10750
10982
|
return Slottable2;
|
|
10751
10983
|
}
|
|
10752
|
-
|
|
10753
|
-
|
|
10754
|
-
|
|
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
|
+
};
|
|
10755
10992
|
function mergeProps(slotProps, childProps) {
|
|
10756
10993
|
const overrideProps = {
|
|
10757
10994
|
...childProps
|
|
@@ -10790,6 +11027,19 @@ function getElementRef(element) {
|
|
|
10790
11027
|
if (mayWarn) return element.props.ref;
|
|
10791
11028
|
return element.props.ref || element.ref;
|
|
10792
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()];
|
|
10793
11043
|
var NODES = [
|
|
10794
11044
|
"a",
|
|
10795
11045
|
"button",
|
|
@@ -10841,8 +11091,8 @@ function createCollection(name) {
|
|
|
10841
11091
|
});
|
|
10842
11092
|
const CollectionProvider = (props)=>{
|
|
10843
11093
|
const { scope, children } = props;
|
|
10844
|
-
const ref = __WEBPACK_EXTERNAL_MODULE_react__
|
|
10845
|
-
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;
|
|
10846
11096
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CollectionProviderImpl, {
|
|
10847
11097
|
scope,
|
|
10848
11098
|
itemMap,
|
|
@@ -10853,7 +11103,7 @@ function createCollection(name) {
|
|
|
10853
11103
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
10854
11104
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
10855
11105
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
10856
|
-
const CollectionSlot = __WEBPACK_EXTERNAL_MODULE_react__
|
|
11106
|
+
const CollectionSlot = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
10857
11107
|
const { scope, children } = props;
|
|
10858
11108
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
10859
11109
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
@@ -10866,12 +11116,12 @@ function createCollection(name) {
|
|
|
10866
11116
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
10867
11117
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
10868
11118
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
10869
|
-
const CollectionItemSlot = __WEBPACK_EXTERNAL_MODULE_react__
|
|
11119
|
+
const CollectionItemSlot = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
10870
11120
|
const { scope, children, ...itemData } = props;
|
|
10871
|
-
const ref = __WEBPACK_EXTERNAL_MODULE_react__
|
|
11121
|
+
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
10872
11122
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
10873
11123
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
10874
|
-
__WEBPACK_EXTERNAL_MODULE_react__
|
|
11124
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
10875
11125
|
context.itemMap.set(ref, {
|
|
10876
11126
|
ref,
|
|
10877
11127
|
...itemData
|
|
@@ -10889,7 +11139,7 @@ function createCollection(name) {
|
|
|
10889
11139
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
10890
11140
|
function useCollection(scope) {
|
|
10891
11141
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
10892
|
-
const getItems = __WEBPACK_EXTERNAL_MODULE_react__
|
|
11142
|
+
const getItems = __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>{
|
|
10893
11143
|
const collectionNode = context.collectionRef.current;
|
|
10894
11144
|
if (!collectionNode) return [];
|
|
10895
11145
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -10912,6 +11162,7 @@ function createCollection(name) {
|
|
|
10912
11162
|
createCollectionScope
|
|
10913
11163
|
];
|
|
10914
11164
|
}
|
|
11165
|
+
"use client";
|
|
10915
11166
|
var DirectionContext = __WEBPACK_EXTERNAL_MODULE_react__.createContext(void 0);
|
|
10916
11167
|
function useDirection(localDir) {
|
|
10917
11168
|
const globalDir = __WEBPACK_EXTERNAL_MODULE_react__.useContext(DirectionContext);
|
|
@@ -10924,23 +11175,6 @@ function useCallbackRef(callback) {
|
|
|
10924
11175
|
});
|
|
10925
11176
|
return __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>(...args)=>callbackRef.current?.(...args), []);
|
|
10926
11177
|
}
|
|
10927
|
-
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
10928
|
-
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
10929
|
-
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
10930
|
-
const handleKeyDown = (event)=>{
|
|
10931
|
-
if ("Escape" === event.key) onEscapeKeyDown(event);
|
|
10932
|
-
};
|
|
10933
|
-
ownerDocument.addEventListener("keydown", handleKeyDown, {
|
|
10934
|
-
capture: true
|
|
10935
|
-
});
|
|
10936
|
-
return ()=>ownerDocument.removeEventListener("keydown", handleKeyDown, {
|
|
10937
|
-
capture: true
|
|
10938
|
-
});
|
|
10939
|
-
}, [
|
|
10940
|
-
onEscapeKeyDown,
|
|
10941
|
-
ownerDocument
|
|
10942
|
-
]);
|
|
10943
|
-
}
|
|
10944
11178
|
"use client";
|
|
10945
11179
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
10946
11180
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
@@ -10950,34 +11184,47 @@ var originalBodyPointerEvents;
|
|
|
10950
11184
|
var DismissableLayerContext = __WEBPACK_EXTERNAL_MODULE_react__.createContext({
|
|
10951
11185
|
layers: /* @__PURE__ */ new Set(),
|
|
10952
11186
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
10953
|
-
branches: /* @__PURE__ */ new Set()
|
|
11187
|
+
branches: /* @__PURE__ */ new Set(),
|
|
11188
|
+
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
10954
11189
|
});
|
|
10955
11190
|
var DismissableLayer = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
10956
|
-
const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
|
|
11191
|
+
const { disableOutsidePointerEvents = false, deferPointerDownOutside = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
|
|
10957
11192
|
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(DismissableLayerContext);
|
|
10958
11193
|
const [node, setNode] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
10959
11194
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
10960
11195
|
const [, force] = __WEBPACK_EXTERNAL_MODULE_react__.useState({});
|
|
10961
|
-
const composedRefs = useComposedRefs(forwardedRef,
|
|
11196
|
+
const composedRefs = useComposedRefs(forwardedRef, setNode);
|
|
10962
11197
|
const layers = Array.from(context.layers);
|
|
10963
11198
|
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
10964
11199
|
...context.layersWithOutsidePointerEventsDisabled
|
|
10965
11200
|
].slice(-1);
|
|
10966
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
11201
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = highestLayerWithOutsidePointerEventsDisabled ? layers.indexOf(highestLayerWithOutsidePointerEventsDisabled) : -1;
|
|
10967
11202
|
const index = node ? layers.indexOf(node) : -1;
|
|
10968
11203
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
10969
11204
|
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
11205
|
+
const isDeferredPointerDownOutsideRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
10970
11206
|
const pointerDownOutside = usePointerDownOutside((event)=>{
|
|
10971
|
-
const target = event.target;
|
|
10972
|
-
const isPointerDownOnBranch = [
|
|
10973
|
-
...context.branches
|
|
10974
|
-
].some((branch)=>branch.contains(target));
|
|
10975
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
10976
11207
|
onPointerDownOutside?.(event);
|
|
10977
11208
|
onInteractOutside?.(event);
|
|
10978
11209
|
if (!event.defaultPrevented) onDismiss?.();
|
|
10979
|
-
},
|
|
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
|
+
});
|
|
10980
11226
|
const focusOutside = useFocusOutside((event)=>{
|
|
11227
|
+
if (deferPointerDownOutside && isDeferredPointerDownOutsideRef.current) return;
|
|
10981
11228
|
const target = event.target;
|
|
10982
11229
|
const isFocusInBranch = [
|
|
10983
11230
|
...context.branches
|
|
@@ -10987,15 +11234,28 @@ var DismissableLayer = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forw
|
|
|
10987
11234
|
onInteractOutside?.(event);
|
|
10988
11235
|
if (!event.defaultPrevented) onDismiss?.();
|
|
10989
11236
|
}, ownerDocument);
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
if (
|
|
11237
|
+
const isHighestLayer = node ? index === layers.length - 1 : false;
|
|
11238
|
+
const handleKeyDown = useCallbackRef((event)=>{
|
|
11239
|
+
if ("Escape" !== event.key) return;
|
|
10993
11240
|
onEscapeKeyDown?.(event);
|
|
10994
11241
|
if (!event.defaultPrevented && onDismiss) {
|
|
10995
11242
|
event.preventDefault();
|
|
10996
11243
|
onDismiss();
|
|
10997
11244
|
}
|
|
10998
|
-
}
|
|
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
|
+
]);
|
|
10999
11259
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11000
11260
|
if (!node) return;
|
|
11001
11261
|
if (disableOutsidePointerEvents) {
|
|
@@ -11008,7 +11268,10 @@ var DismissableLayer = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forw
|
|
|
11008
11268
|
context.layers.add(node);
|
|
11009
11269
|
dispatchUpdate();
|
|
11010
11270
|
return ()=>{
|
|
11011
|
-
if (disableOutsidePointerEvents
|
|
11271
|
+
if (disableOutsidePointerEvents) {
|
|
11272
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
11273
|
+
if (0 === context.layersWithOutsidePointerEventsDisabled.size) ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
11274
|
+
}
|
|
11012
11275
|
};
|
|
11013
11276
|
}, [
|
|
11014
11277
|
node,
|
|
@@ -11065,31 +11328,84 @@ var DismissableLayerBranch = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props
|
|
|
11065
11328
|
});
|
|
11066
11329
|
});
|
|
11067
11330
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
11068
|
-
|
|
11331
|
+
var IS_TRUE = ()=>true;
|
|
11332
|
+
function usePointerDownOutside(onPointerDownOutside, args) {
|
|
11333
|
+
const { ownerDocument = globalThis?.document, deferPointerDownOutside = false, isDeferredPointerDownOutsideRef, dismissableSurfaces, shouldHandlePointerDownOutside = IS_TRUE } = args;
|
|
11069
11334
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
11070
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());
|
|
11071
11338
|
const handleClickRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(()=>{});
|
|
11072
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
|
+
}
|
|
11073
11362
|
const handlePointerDown = (event)=>{
|
|
11074
11363
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
11075
11364
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
11076
|
-
|
|
11365
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11366
|
+
const wasOutsideInteractionIntercepted = isOutsideInteractionIntercepted();
|
|
11367
|
+
resetOutsideInteraction();
|
|
11368
|
+
if (!wasOutsideInteractionIntercepted) handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
|
|
11077
11369
|
discrete: true
|
|
11078
11370
|
});
|
|
11079
11371
|
};
|
|
11372
|
+
if (!shouldHandlePointerDownOutside(event.target)) {
|
|
11373
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11374
|
+
resetOutsideInteraction();
|
|
11375
|
+
isPointerInsideReactTreeRef.current = false;
|
|
11376
|
+
return;
|
|
11377
|
+
}
|
|
11080
11378
|
const eventDetail = {
|
|
11081
11379
|
originalEvent: event
|
|
11082
11380
|
};
|
|
11083
|
-
|
|
11381
|
+
isPointerDownOutsideRef.current = true;
|
|
11382
|
+
isDeferredPointerDownOutsideRef.current = deferPointerDownOutside && 0 === event.button;
|
|
11383
|
+
interceptedOutsideInteractionEventsRef.current.clear();
|
|
11384
|
+
if (deferPointerDownOutside && 0 === event.button) {
|
|
11084
11385
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11085
11386
|
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
11086
11387
|
ownerDocument.addEventListener("click", handleClickRef.current, {
|
|
11087
11388
|
once: true
|
|
11088
11389
|
});
|
|
11089
11390
|
} else handleAndDispatchPointerDownOutsideEvent2();
|
|
11090
|
-
} else
|
|
11391
|
+
} else {
|
|
11392
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11393
|
+
resetOutsideInteraction();
|
|
11394
|
+
}
|
|
11091
11395
|
isPointerInsideReactTreeRef.current = false;
|
|
11092
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
|
+
}
|
|
11093
11409
|
const timerId = window.setTimeout(()=>{
|
|
11094
11410
|
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
11095
11411
|
}, 0);
|
|
@@ -11097,10 +11413,18 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
11097
11413
|
window.clearTimeout(timerId);
|
|
11098
11414
|
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
11099
11415
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11416
|
+
for (const eventName of outsideInteractionEvents){
|
|
11417
|
+
ownerDocument.removeEventListener(eventName, handleInteractionCapture, true);
|
|
11418
|
+
ownerDocument.removeEventListener(eventName, handleInteractionBubble);
|
|
11419
|
+
}
|
|
11100
11420
|
};
|
|
11101
11421
|
}, [
|
|
11102
11422
|
ownerDocument,
|
|
11103
|
-
handlePointerDownOutside
|
|
11423
|
+
handlePointerDownOutside,
|
|
11424
|
+
deferPointerDownOutside,
|
|
11425
|
+
isDeferredPointerDownOutsideRef,
|
|
11426
|
+
dismissableSurfaces,
|
|
11427
|
+
shouldHandlePointerDownOutside
|
|
11104
11428
|
]);
|
|
11105
11429
|
return {
|
|
11106
11430
|
onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true
|
|
@@ -11150,15 +11474,24 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
11150
11474
|
}
|
|
11151
11475
|
"use client";
|
|
11152
11476
|
var dist_count = 0;
|
|
11477
|
+
var guards = null;
|
|
11153
11478
|
function useFocusGuards() {
|
|
11154
11479
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
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);
|
|
11158
11487
|
dist_count++;
|
|
11159
11488
|
return ()=>{
|
|
11160
|
-
if (1 === dist_count)
|
|
11161
|
-
|
|
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);
|
|
11162
11495
|
};
|
|
11163
11496
|
}, []);
|
|
11164
11497
|
}
|
|
@@ -11186,7 +11519,7 @@ var FocusScope = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
11186
11519
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
11187
11520
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
11188
11521
|
const lastFocusedElementRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
11189
|
-
const composedRefs = useComposedRefs(forwardedRef,
|
|
11522
|
+
const composedRefs = useComposedRefs(forwardedRef, setContainer);
|
|
11190
11523
|
const focusScope = __WEBPACK_EXTERNAL_MODULE_react__.useRef({
|
|
11191
11524
|
paused: false,
|
|
11192
11525
|
pause () {
|
|
@@ -11339,9 +11672,17 @@ function getTabbableCandidates(container) {
|
|
|
11339
11672
|
return nodes;
|
|
11340
11673
|
}
|
|
11341
11674
|
function findVisible(elements, container) {
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
})
|
|
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
|
+
}
|
|
11345
11686
|
}
|
|
11346
11687
|
function isHidden(node, { upTo }) {
|
|
11347
11688
|
if ("hidden" === getComputedStyle(node).visibility) return true;
|
|
@@ -13069,10 +13410,13 @@ var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
|
13069
13410
|
var Popper = (props)=>{
|
|
13070
13411
|
const { __scopePopper, children } = props;
|
|
13071
13412
|
const [anchor, setAnchor] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
13413
|
+
const [placementState, setPlacementState] = __WEBPACK_EXTERNAL_MODULE_react__.useState(void 0);
|
|
13072
13414
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(PopperProvider, {
|
|
13073
13415
|
scope: __scopePopper,
|
|
13074
13416
|
anchor,
|
|
13075
13417
|
onAnchorChange: setAnchor,
|
|
13418
|
+
placementState,
|
|
13419
|
+
setPlacementState,
|
|
13076
13420
|
children
|
|
13077
13421
|
});
|
|
13078
13422
|
};
|
|
@@ -13082,14 +13426,27 @@ var PopperAnchor = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwarde
|
|
|
13082
13426
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
13083
13427
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
13084
13428
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
13085
|
-
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);
|
|
13086
13437
|
const anchorRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
13087
13438
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
13439
|
+
if (!virtualRef) return;
|
|
13088
13440
|
const previousAnchor = anchorRef.current;
|
|
13089
|
-
anchorRef.current = virtualRef
|
|
13090
|
-
if (previousAnchor !== anchorRef.current)
|
|
13441
|
+
anchorRef.current = virtualRef.current;
|
|
13442
|
+
if (previousAnchor !== anchorRef.current) onAnchorChange(anchorRef.current);
|
|
13091
13443
|
});
|
|
13444
|
+
const sideAndAlign = context.placementState && getSideAndAlignFromPlacement(context.placementState);
|
|
13445
|
+
const placedSide = sideAndAlign?.[0];
|
|
13446
|
+
const placedAlign = sideAndAlign?.[1];
|
|
13092
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,
|
|
13093
13450
|
...anchorProps,
|
|
13094
13451
|
ref: composedRefs
|
|
13095
13452
|
});
|
|
@@ -13101,7 +13458,7 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13101
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;
|
|
13102
13459
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
13103
13460
|
const [content, setContent] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
13104
|
-
const composedRefs = useComposedRefs(forwardedRef,
|
|
13461
|
+
const composedRefs = useComposedRefs(forwardedRef, setContent);
|
|
13105
13462
|
const [arrow, setArrow] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
13106
13463
|
const arrowSize = useSize(arrow);
|
|
13107
13464
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
@@ -13170,10 +13527,21 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13170
13527
|
}),
|
|
13171
13528
|
hideWhenDetached && floating_ui_react_dom_hide({
|
|
13172
13529
|
strategy: "referenceHidden",
|
|
13173
|
-
...detectOverflowOptions
|
|
13530
|
+
...detectOverflowOptions,
|
|
13531
|
+
boundary: hasExplicitBoundaries ? detectOverflowOptions.boundary : void 0
|
|
13174
13532
|
})
|
|
13175
13533
|
]
|
|
13176
13534
|
});
|
|
13535
|
+
const setPlacementState = context.setPlacementState;
|
|
13536
|
+
useLayoutEffect2(()=>{
|
|
13537
|
+
setPlacementState(placement);
|
|
13538
|
+
return ()=>{
|
|
13539
|
+
setPlacementState(void 0);
|
|
13540
|
+
};
|
|
13541
|
+
}, [
|
|
13542
|
+
placement,
|
|
13543
|
+
setPlacementState
|
|
13544
|
+
]);
|
|
13177
13545
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
13178
13546
|
const handlePlaced = useCallbackRef(onPlaced);
|
|
13179
13547
|
useLayoutEffect2(()=>{
|
|
@@ -13199,7 +13567,7 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13199
13567
|
transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)",
|
|
13200
13568
|
minWidth: "max-content",
|
|
13201
13569
|
zIndex: contentZIndex,
|
|
13202
|
-
|
|
13570
|
+
"--radix-popper-transform-origin": [
|
|
13203
13571
|
middlewareData.transformOrigin?.x,
|
|
13204
13572
|
middlewareData.transformOrigin?.y
|
|
13205
13573
|
].join(" "),
|
|
@@ -13212,6 +13580,7 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13212
13580
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(PopperContentProvider, {
|
|
13213
13581
|
scope: __scopePopper,
|
|
13214
13582
|
placedSide,
|
|
13583
|
+
placedAlign,
|
|
13215
13584
|
onArrowChange: setArrow,
|
|
13216
13585
|
arrowX,
|
|
13217
13586
|
arrowY,
|
|
@@ -13334,7 +13703,7 @@ var Portal = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=
|
|
|
13334
13703
|
const [mounted, setMounted] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
13335
13704
|
useLayoutEffect2(()=>setMounted(true), []);
|
|
13336
13705
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
13337
|
-
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, {
|
|
13338
13707
|
...portalProps,
|
|
13339
13708
|
ref: forwardedRef
|
|
13340
13709
|
}), container) : null;
|
|
@@ -13353,7 +13722,7 @@ var Presence = (props)=>{
|
|
|
13353
13722
|
const child = "function" == typeof children ? children({
|
|
13354
13723
|
present: presence.isPresent
|
|
13355
13724
|
}) : __WEBPACK_EXTERNAL_MODULE_react__.Children.only(children);
|
|
13356
|
-
const ref =
|
|
13725
|
+
const ref = useStableComposedRefs(presence.ref, dist_getElementRef(child));
|
|
13357
13726
|
const forceMount = "function" == typeof children;
|
|
13358
13727
|
return forceMount || presence.isPresent ? __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(child, {
|
|
13359
13728
|
ref
|
|
@@ -13365,6 +13734,7 @@ function usePresence(present) {
|
|
|
13365
13734
|
const stylesRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
13366
13735
|
const prevPresentRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(present);
|
|
13367
13736
|
const prevAnimationNameRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef("none");
|
|
13737
|
+
const mountAnimationNameRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(void 0);
|
|
13368
13738
|
const initialState = present ? "mounted" : "unmounted";
|
|
13369
13739
|
const [state, send] = useStateMachine(initialState, {
|
|
13370
13740
|
mounted: {
|
|
@@ -13380,8 +13750,10 @@ function usePresence(present) {
|
|
|
13380
13750
|
}
|
|
13381
13751
|
});
|
|
13382
13752
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
13383
|
-
|
|
13384
|
-
|
|
13753
|
+
if ("mounted" === state) {
|
|
13754
|
+
prevAnimationNameRef.current = mountAnimationNameRef.current ?? getAnimationName(stylesRef.current);
|
|
13755
|
+
mountAnimationNameRef.current = void 0;
|
|
13756
|
+
} else prevAnimationNameRef.current = "none";
|
|
13385
13757
|
}, [
|
|
13386
13758
|
state
|
|
13387
13759
|
]);
|
|
@@ -13392,8 +13764,10 @@ function usePresence(present) {
|
|
|
13392
13764
|
if (hasPresentChanged) {
|
|
13393
13765
|
const prevAnimationName = prevAnimationNameRef.current;
|
|
13394
13766
|
const currentAnimationName = getAnimationName(styles);
|
|
13395
|
-
if (present)
|
|
13396
|
-
|
|
13767
|
+
if (present) {
|
|
13768
|
+
mountAnimationNameRef.current = currentAnimationName;
|
|
13769
|
+
send("MOUNT");
|
|
13770
|
+
} else if ("none" === currentAnimationName || styles?.display === "none") send("UNMOUNT");
|
|
13397
13771
|
else {
|
|
13398
13772
|
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
13399
13773
|
wasPresent && isAnimating ? send("ANIMATION_OUT") : send("UNMOUNT");
|
|
@@ -13446,11 +13820,39 @@ function usePresence(present) {
|
|
|
13446
13820
|
"unmountSuspended"
|
|
13447
13821
|
].includes(state),
|
|
13448
13822
|
ref: __WEBPACK_EXTERNAL_MODULE_react__.useCallback((node2)=>{
|
|
13449
|
-
|
|
13823
|
+
if (node2) {
|
|
13824
|
+
const styles = getComputedStyle(node2);
|
|
13825
|
+
stylesRef.current = styles;
|
|
13826
|
+
mountAnimationNameRef.current = getAnimationName(styles);
|
|
13827
|
+
} else stylesRef.current = null;
|
|
13450
13828
|
setNode(node2);
|
|
13451
13829
|
}, [])
|
|
13452
13830
|
};
|
|
13453
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
|
+
}
|
|
13454
13856
|
function getAnimationName(styles) {
|
|
13455
13857
|
return styles?.animationName || "none";
|
|
13456
13858
|
}
|
|
@@ -13463,6 +13865,25 @@ function dist_getElementRef(element) {
|
|
|
13463
13865
|
if (mayWarn) return element.props.ref;
|
|
13464
13866
|
return element.props.ref || element.ref;
|
|
13465
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;
|
|
13466
13887
|
"use client";
|
|
13467
13888
|
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
13468
13889
|
var dist_EVENT_OPTIONS = {
|
|
@@ -13568,12 +13989,23 @@ var RovingFocusGroupItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
13568
13989
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
13569
13990
|
const getItems = dist_useCollection(__scopeRovingFocusGroup);
|
|
13570
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
|
+
]);
|
|
13571
14003
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
13572
|
-
if (focusable)
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
}
|
|
14004
|
+
if (isHydrated || !focusable) return;
|
|
14005
|
+
onFocusableItemAdd();
|
|
14006
|
+
return ()=>onFocusableItemRemove();
|
|
13576
14007
|
}, [
|
|
14008
|
+
isHydrated,
|
|
13577
14009
|
focusable,
|
|
13578
14010
|
onFocusableItemAdd,
|
|
13579
14011
|
onFocusableItemRemove
|
|
@@ -14502,6 +14934,15 @@ var Menu = (props)=>{
|
|
|
14502
14934
|
});
|
|
14503
14935
|
};
|
|
14504
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
|
+
]);
|
|
14505
14946
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Root2, {
|
|
14506
14947
|
...popperScope,
|
|
14507
14948
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuProvider, {
|
|
@@ -14820,8 +15261,9 @@ var MenuItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef
|
|
|
14820
15261
|
if (!isPointerDownRef.current) event.currentTarget?.click();
|
|
14821
15262
|
}),
|
|
14822
15263
|
onKeyDown: composeEventHandlers(props.onKeyDown, (event)=>{
|
|
15264
|
+
if (disabled || event.target !== event.currentTarget) return;
|
|
14823
15265
|
const isTypingAhead = "" !== contentContext.searchRef.current;
|
|
14824
|
-
if (
|
|
15266
|
+
if (isTypingAhead && " " === event.key) return;
|
|
14825
15267
|
if (SELECTION_KEYS.includes(event.key)) {
|
|
14826
15268
|
event.currentTarget.click();
|
|
14827
15269
|
event.preventDefault();
|
|
@@ -15040,6 +15482,7 @@ var MenuSubTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
15040
15482
|
pointerGraceTimerRef,
|
|
15041
15483
|
onPointerGraceIntentChange
|
|
15042
15484
|
]);
|
|
15485
|
+
const composedRefs = useComposedRefs(forwardedRef, subContext.onTriggerChange);
|
|
15043
15486
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuAnchor, {
|
|
15044
15487
|
asChild: true,
|
|
15045
15488
|
...scope,
|
|
@@ -15047,10 +15490,10 @@ var MenuSubTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
15047
15490
|
id: subContext.triggerId,
|
|
15048
15491
|
"aria-haspopup": "menu",
|
|
15049
15492
|
"aria-expanded": context.open,
|
|
15050
|
-
"aria-controls": subContext.contentId,
|
|
15493
|
+
"aria-controls": context.open ? subContext.contentId : void 0,
|
|
15051
15494
|
"data-state": getOpenState(context.open),
|
|
15052
15495
|
...props,
|
|
15053
|
-
ref:
|
|
15496
|
+
ref: composedRefs,
|
|
15054
15497
|
onClick: (event)=>{
|
|
15055
15498
|
props.onClick?.(event);
|
|
15056
15499
|
if (props.disabled || event.defaultPrevented) return;
|
|
@@ -15111,8 +15554,9 @@ var MenuSubTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
15111
15554
|
}
|
|
15112
15555
|
})),
|
|
15113
15556
|
onKeyDown: composeEventHandlers(props.onKeyDown, (event)=>{
|
|
15557
|
+
if (props.disabled || event.target !== event.currentTarget) return;
|
|
15114
15558
|
const isTypingAhead = "" !== contentContext.searchRef.current;
|
|
15115
|
-
if (
|
|
15559
|
+
if (isTypingAhead && " " === event.key) return;
|
|
15116
15560
|
if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
|
|
15117
15561
|
context.onOpenChange(true);
|
|
15118
15562
|
context.content?.focus();
|
|
@@ -15126,7 +15570,7 @@ MenuSubTrigger.displayName = SUB_TRIGGER_NAME;
|
|
|
15126
15570
|
var SUB_CONTENT_NAME = "MenuSubContent";
|
|
15127
15571
|
var MenuSubContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15128
15572
|
const portalContext = usePortalContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15129
|
-
const { forceMount = portalContext.forceMount, ...subContentProps } = props;
|
|
15573
|
+
const { forceMount = portalContext.forceMount, align = "start", ...subContentProps } = props;
|
|
15130
15574
|
const context = useMenuContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15131
15575
|
const rootContext = useMenuRootContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15132
15576
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);
|
|
@@ -15143,7 +15587,7 @@ var MenuSubContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
15143
15587
|
"aria-labelledby": subContext.triggerId,
|
|
15144
15588
|
...subContentProps,
|
|
15145
15589
|
ref: composedRefs,
|
|
15146
|
-
align
|
|
15590
|
+
align,
|
|
15147
15591
|
side: "rtl" === rootContext.dir ? "left" : "right",
|
|
15148
15592
|
disableOutsidePointerEvents: false,
|
|
15149
15593
|
disableOutsideScroll: false,
|
|
@@ -15290,6 +15734,7 @@ var DropdownMenuTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
15290
15734
|
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
15291
15735
|
const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
|
|
15292
15736
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
15737
|
+
const composedRefs = useComposedRefs(forwardedRef, context.triggerRef);
|
|
15293
15738
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Anchor2, {
|
|
15294
15739
|
asChild: true,
|
|
15295
15740
|
...menuScope,
|
|
@@ -15303,7 +15748,7 @@ var DropdownMenuTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
15303
15748
|
"data-disabled": disabled ? "" : void 0,
|
|
15304
15749
|
disabled,
|
|
15305
15750
|
...triggerProps,
|
|
15306
|
-
ref:
|
|
15751
|
+
ref: composedRefs,
|
|
15307
15752
|
onPointerDown: composeEventHandlers(props.onPointerDown, (event)=>{
|
|
15308
15753
|
if (!disabled && 0 === event.button && false === event.ctrlKey) {
|
|
15309
15754
|
context.onOpenToggle();
|
|
@@ -15601,7 +16046,7 @@ var ScrollArea = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
15601
16046
|
const [cornerHeight, setCornerHeight] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
|
|
15602
16047
|
const [scrollbarXEnabled, setScrollbarXEnabled] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
15603
16048
|
const [scrollbarYEnabled, setScrollbarYEnabled] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
15604
|
-
const composedRefs = useComposedRefs(forwardedRef,
|
|
16049
|
+
const composedRefs = useComposedRefs(forwardedRef, setScrollArea);
|
|
15605
16050
|
const direction = useDirection(dir);
|
|
15606
16051
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaProvider, {
|
|
15607
16052
|
scope: __scopeScrollArea,
|
|
@@ -15629,8 +16074,8 @@ var ScrollArea = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
15629
16074
|
ref: composedRefs,
|
|
15630
16075
|
style: {
|
|
15631
16076
|
position: "relative",
|
|
15632
|
-
|
|
15633
|
-
|
|
16077
|
+
"--radix-scroll-area-corner-width": cornerWidth + "px",
|
|
16078
|
+
"--radix-scroll-area-corner-height": cornerHeight + "px",
|
|
15634
16079
|
...props.style
|
|
15635
16080
|
}
|
|
15636
16081
|
})
|
|
@@ -15645,10 +16090,7 @@ var ScrollAreaViewport = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
15645
16090
|
const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
|
15646
16091
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
15647
16092
|
children: [
|
|
15648
|
-
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
15649
|
-
dangerouslySetInnerHTML: {
|
|
15650
|
-
__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}"
|
|
15651
|
-
},
|
|
16093
|
+
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaViewportStyle, {
|
|
15652
16094
|
nonce
|
|
15653
16095
|
}),
|
|
15654
16096
|
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Primitive.div, {
|
|
@@ -15673,6 +16115,12 @@ var ScrollAreaViewport = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
15673
16115
|
});
|
|
15674
16116
|
});
|
|
15675
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);
|
|
15676
16124
|
var SCROLLBAR_NAME = "ScrollAreaScrollbar";
|
|
15677
16125
|
var ScrollAreaScrollbar = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15678
16126
|
const { forceMount, ...scrollbarProps } = props;
|
|
@@ -15703,7 +16151,8 @@ var ScrollAreaScrollbar = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
15703
16151
|
forceMount
|
|
15704
16152
|
}) : "always" === context.type ? /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaScrollbarVisible, {
|
|
15705
16153
|
...scrollbarProps,
|
|
15706
|
-
ref: forwardedRef
|
|
16154
|
+
ref: forwardedRef,
|
|
16155
|
+
"data-state": "visible"
|
|
15707
16156
|
}) : null;
|
|
15708
16157
|
});
|
|
15709
16158
|
ScrollAreaScrollbar.displayName = SCROLLBAR_NAME;
|
|
@@ -15916,7 +16365,7 @@ var ScrollAreaScrollbarX = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
15916
16365
|
bottom: 0,
|
|
15917
16366
|
left: "rtl" === context.dir ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
15918
16367
|
right: "ltr" === context.dir ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
15919
|
-
|
|
16368
|
+
"--radix-scroll-area-thumb-width": getThumbSize(sizes) + "px",
|
|
15920
16369
|
...props.style
|
|
15921
16370
|
},
|
|
15922
16371
|
onThumbPointerDown: (pointerPos)=>props.onThumbPointerDown(pointerPos.x),
|
|
@@ -15962,7 +16411,7 @@ var ScrollAreaScrollbarY = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
15962
16411
|
right: "ltr" === context.dir ? 0 : void 0,
|
|
15963
16412
|
left: "rtl" === context.dir ? 0 : void 0,
|
|
15964
16413
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
15965
|
-
|
|
16414
|
+
"--radix-scroll-area-thumb-height": getThumbSize(sizes) + "px",
|
|
15966
16415
|
...props.style
|
|
15967
16416
|
},
|
|
15968
16417
|
onThumbPointerDown: (pointerPos)=>props.onThumbPointerDown(pointerPos.y),
|
|
@@ -15992,7 +16441,7 @@ var ScrollAreaScrollbarImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
15992
16441
|
const { __scopeScrollArea, sizes, hasThumb, onThumbChange, onThumbPointerUp, onThumbPointerDown, onThumbPositionChange, onDragScroll, onWheelScroll, onResize, ...scrollbarProps } = props;
|
|
15993
16442
|
const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);
|
|
15994
16443
|
const [scrollbar, setScrollbar] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
15995
|
-
const composeRefs = useComposedRefs(forwardedRef,
|
|
16444
|
+
const composeRefs = useComposedRefs(forwardedRef, setScrollbar);
|
|
15996
16445
|
const rectRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
15997
16446
|
const prevWebkitUserSelectRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef("");
|
|
15998
16447
|
const viewport = context.viewport;
|
|
@@ -16089,7 +16538,7 @@ var ScrollAreaThumbImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16089
16538
|
const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);
|
|
16090
16539
|
const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);
|
|
16091
16540
|
const { onThumbPositionChange } = scrollbarContext;
|
|
16092
|
-
const composedRef = useComposedRefs(forwardedRef,
|
|
16541
|
+
const composedRef = useComposedRefs(forwardedRef, scrollbarContext.onThumbChange);
|
|
16093
16542
|
const removeUnlinkedScrollListenerRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(void 0);
|
|
16094
16543
|
const debounceScrollEnd = useDebounceCallback(()=>{
|
|
16095
16544
|
if (removeUnlinkedScrollListenerRef.current) {
|
|
@@ -16157,6 +16606,7 @@ var ScrollAreaCornerImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
16157
16606
|
const [width, setWidth] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
|
|
16158
16607
|
const [height, setHeight] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
|
|
16159
16608
|
const hasSize = Boolean(width && height);
|
|
16609
|
+
const { onCornerWidthChange, onCornerHeightChange } = context;
|
|
16160
16610
|
useResizeObserver(context.scrollbarX, ()=>{
|
|
16161
16611
|
const height2 = context.scrollbarX?.offsetHeight || 0;
|
|
16162
16612
|
context.onCornerHeightChange(height2);
|
|
@@ -16167,6 +16617,13 @@ var ScrollAreaCornerImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
16167
16617
|
context.onCornerWidthChange(width2);
|
|
16168
16618
|
setWidth(width2);
|
|
16169
16619
|
});
|
|
16620
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>()=>{
|
|
16621
|
+
onCornerWidthChange(0);
|
|
16622
|
+
onCornerHeightChange(0);
|
|
16623
|
+
}, [
|
|
16624
|
+
onCornerWidthChange,
|
|
16625
|
+
onCornerHeightChange
|
|
16626
|
+
]);
|
|
16170
16627
|
return hasSize ? /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Primitive.div, {
|
|
16171
16628
|
...cornerProps,
|
|
16172
16629
|
ref: forwardedRef,
|
|
@@ -16389,10 +16846,14 @@ var TooltipProvider = (props)=>{
|
|
|
16389
16846
|
isOpenDelayedRef,
|
|
16390
16847
|
delayDuration,
|
|
16391
16848
|
onOpen: __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>{
|
|
16849
|
+
if (skipDelayDuration <= 0) return;
|
|
16392
16850
|
window.clearTimeout(skipDelayTimerRef.current);
|
|
16393
16851
|
isOpenDelayedRef.current = false;
|
|
16394
|
-
}, [
|
|
16852
|
+
}, [
|
|
16853
|
+
skipDelayDuration
|
|
16854
|
+
]),
|
|
16395
16855
|
onClose: __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>{
|
|
16856
|
+
if (skipDelayDuration <= 0) return;
|
|
16396
16857
|
window.clearTimeout(skipDelayTimerRef.current);
|
|
16397
16858
|
skipDelayTimerRef.current = window.setTimeout(()=>isOpenDelayedRef.current = true, skipDelayDuration);
|
|
16398
16859
|
}, [
|
|
@@ -16691,8 +17152,7 @@ var TooltipContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
16691
17152
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
16692
17153
|
if (context.trigger) {
|
|
16693
17154
|
const handleScroll = (event)=>{
|
|
16694
|
-
|
|
16695
|
-
if (target?.contains(context.trigger)) onClose();
|
|
17155
|
+
if (event.target instanceof Node && event.target.contains(context.trigger)) onClose();
|
|
16696
17156
|
};
|
|
16697
17157
|
window.addEventListener("scroll", handleScroll, {
|
|
16698
17158
|
capture: true
|
|
@@ -17082,10 +17542,199 @@ const Dropdown = ({ value: value1, options, onChange, placeholder = "\u8BF7\u900
|
|
|
17082
17542
|
});
|
|
17083
17543
|
};
|
|
17084
17544
|
const Overlay_Dropdown = Dropdown;
|
|
17545
|
+
const DEFAULT_SAMPLE_INTERVAL_MS = 80;
|
|
17546
|
+
const DEFAULT_SAMPLE_IDLE_DELAY_MS = 80;
|
|
17547
|
+
const toCursorEventSnapshot = (snapshot)=>({
|
|
17548
|
+
sourceId: snapshot.sourceId,
|
|
17549
|
+
sourceType: snapshot.sourceType,
|
|
17550
|
+
clientX: snapshot.clientX,
|
|
17551
|
+
clientY: snapshot.clientY,
|
|
17552
|
+
bounds: snapshot.bounds
|
|
17553
|
+
});
|
|
17554
|
+
const isSameSample = (current, next)=>current?.sourceId === next.sourceId && current?.sourceType === next.sourceType && current?.coord.left === next.coord.left && current?.coord.top === next.coord.top && current?.clientX === next.clientX && current?.clientY === next.clientY && current?.bounds.left === next.bounds.left && current?.bounds.top === next.bounds.top && current?.bounds.right === next.bounds.right && current?.bounds.bottom === next.bounds.bottom && current?.sampledIndex === next.sampledIndex && current?.globalIndex === next.globalIndex && current?.rowIndex === next.rowIndex;
|
|
17555
|
+
class InteractionRuntime {
|
|
17556
|
+
entries = new Map();
|
|
17557
|
+
sampleIntervalMs;
|
|
17558
|
+
sampleIdleDelayMs;
|
|
17559
|
+
now;
|
|
17560
|
+
requestFrame;
|
|
17561
|
+
cancelFrame;
|
|
17562
|
+
setTimer;
|
|
17563
|
+
clearTimer;
|
|
17564
|
+
constructor(options = {}){
|
|
17565
|
+
this.sampleIntervalMs = options.sampleIntervalMs ?? DEFAULT_SAMPLE_INTERVAL_MS;
|
|
17566
|
+
this.sampleIdleDelayMs = options.sampleIdleDelayMs ?? DEFAULT_SAMPLE_IDLE_DELAY_MS;
|
|
17567
|
+
this.now = options.now ?? (()=>Date.now());
|
|
17568
|
+
this.requestFrame = options.requestFrame ?? ((callback)=>{
|
|
17569
|
+
if ('undefined' != typeof window) return window.requestAnimationFrame(callback);
|
|
17570
|
+
return Number(setTimeout(callback, 16));
|
|
17571
|
+
});
|
|
17572
|
+
this.cancelFrame = options.cancelFrame ?? ((id)=>{
|
|
17573
|
+
if ('undefined' != typeof window) return void window.cancelAnimationFrame(id);
|
|
17574
|
+
clearTimeout(id);
|
|
17575
|
+
});
|
|
17576
|
+
this.setTimer = options.setTimer ?? ((callback, delay)=>{
|
|
17577
|
+
if ('undefined' != typeof window) return window.setTimeout(callback, delay);
|
|
17578
|
+
return setTimeout(callback, delay);
|
|
17579
|
+
});
|
|
17580
|
+
this.clearTimer = options.clearTimer ?? ((id)=>{
|
|
17581
|
+
if ('undefined' != typeof window) return void window.clearTimeout(id);
|
|
17582
|
+
clearTimeout(id);
|
|
17583
|
+
});
|
|
17584
|
+
}
|
|
17585
|
+
updatePointer(id, snapshot) {
|
|
17586
|
+
const entry = this.ensureEntry(id);
|
|
17587
|
+
entry.version += 1;
|
|
17588
|
+
entry.pointer = {
|
|
17589
|
+
...snapshot,
|
|
17590
|
+
version: entry.version,
|
|
17591
|
+
timestamp: this.now()
|
|
17592
|
+
};
|
|
17593
|
+
this.schedulePointerFrame(entry);
|
|
17594
|
+
this.scheduleSample(entry);
|
|
17595
|
+
}
|
|
17596
|
+
refreshBounds(id, bounds) {
|
|
17597
|
+
const entry = this.ensureEntry(id);
|
|
17598
|
+
if (!entry.pointer) return;
|
|
17599
|
+
entry.version += 1;
|
|
17600
|
+
entry.pointer = {
|
|
17601
|
+
...entry.pointer,
|
|
17602
|
+
bounds,
|
|
17603
|
+
version: entry.version,
|
|
17604
|
+
timestamp: this.now()
|
|
17605
|
+
};
|
|
17606
|
+
this.schedulePointerFrame(entry);
|
|
17607
|
+
}
|
|
17608
|
+
clearPointer(id, _reason = 'manual') {
|
|
17609
|
+
const entry = this.entries.get(id);
|
|
17610
|
+
if (!entry) return;
|
|
17611
|
+
entry.pointer = null;
|
|
17612
|
+
entry.sample = null;
|
|
17613
|
+
entry.lastSampleTimestamp = 0;
|
|
17614
|
+
entry.hasSampleTimestamp = false;
|
|
17615
|
+
this.clearEntryTimers(entry);
|
|
17616
|
+
this.notifyPointer(entry, null);
|
|
17617
|
+
this.notifySample(entry, null);
|
|
17618
|
+
}
|
|
17619
|
+
subscribePointer(id, listener) {
|
|
17620
|
+
const entry = this.ensureEntry(id);
|
|
17621
|
+
entry.pointerListeners.add(listener);
|
|
17622
|
+
listener(entry.pointer);
|
|
17623
|
+
return ()=>{
|
|
17624
|
+
entry.pointerListeners.delete(listener);
|
|
17625
|
+
this.cleanupEntryIfEmpty(id, entry);
|
|
17626
|
+
};
|
|
17627
|
+
}
|
|
17628
|
+
subscribeSample(id, listener) {
|
|
17629
|
+
const entry = this.ensureEntry(id);
|
|
17630
|
+
entry.sampleListeners.add(listener);
|
|
17631
|
+
listener(entry.sample);
|
|
17632
|
+
return ()=>{
|
|
17633
|
+
entry.sampleListeners.delete(listener);
|
|
17634
|
+
this.cleanupEntryIfEmpty(id, entry);
|
|
17635
|
+
};
|
|
17636
|
+
}
|
|
17637
|
+
getPointer(id) {
|
|
17638
|
+
return this.entries.get(id)?.pointer ?? null;
|
|
17639
|
+
}
|
|
17640
|
+
getSample(id) {
|
|
17641
|
+
return this.entries.get(id)?.sample ?? null;
|
|
17642
|
+
}
|
|
17643
|
+
dispose(id) {
|
|
17644
|
+
if (id) {
|
|
17645
|
+
const entry = this.entries.get(id);
|
|
17646
|
+
if (!entry) return;
|
|
17647
|
+
this.clearPointer(id, 'dispose');
|
|
17648
|
+
entry.pointerListeners.clear();
|
|
17649
|
+
entry.sampleListeners.clear();
|
|
17650
|
+
this.entries.delete(id);
|
|
17651
|
+
return;
|
|
17652
|
+
}
|
|
17653
|
+
for (const key of Array.from(this.entries.keys()))this.dispose(key);
|
|
17654
|
+
}
|
|
17655
|
+
ensureEntry(id) {
|
|
17656
|
+
const current = this.entries.get(id);
|
|
17657
|
+
if (current) return current;
|
|
17658
|
+
const entry = {
|
|
17659
|
+
pointer: null,
|
|
17660
|
+
sample: null,
|
|
17661
|
+
pointerListeners: new Set(),
|
|
17662
|
+
sampleListeners: new Set(),
|
|
17663
|
+
pointerFrame: null,
|
|
17664
|
+
sampleTimer: null,
|
|
17665
|
+
idleTimer: null,
|
|
17666
|
+
lastSampleTimestamp: 0,
|
|
17667
|
+
hasSampleTimestamp: false,
|
|
17668
|
+
version: 0
|
|
17669
|
+
};
|
|
17670
|
+
this.entries.set(id, entry);
|
|
17671
|
+
return entry;
|
|
17672
|
+
}
|
|
17673
|
+
schedulePointerFrame(entry) {
|
|
17674
|
+
if (null !== entry.pointerFrame) return;
|
|
17675
|
+
entry.pointerFrame = this.requestFrame(()=>{
|
|
17676
|
+
entry.pointerFrame = null;
|
|
17677
|
+
this.notifyPointer(entry, entry.pointer);
|
|
17678
|
+
});
|
|
17679
|
+
}
|
|
17680
|
+
scheduleSample(entry) {
|
|
17681
|
+
if (!entry.pointer) return;
|
|
17682
|
+
const now = this.now();
|
|
17683
|
+
const elapsed = now - entry.lastSampleTimestamp;
|
|
17684
|
+
if (!entry.hasSampleTimestamp || elapsed >= this.sampleIntervalMs) this.flushSample(entry);
|
|
17685
|
+
else if (!entry.sampleTimer) entry.sampleTimer = this.setTimer(()=>{
|
|
17686
|
+
entry.sampleTimer = null;
|
|
17687
|
+
this.flushSample(entry);
|
|
17688
|
+
}, this.sampleIntervalMs - elapsed);
|
|
17689
|
+
if (entry.idleTimer) this.clearTimer(entry.idleTimer);
|
|
17690
|
+
entry.idleTimer = this.setTimer(()=>{
|
|
17691
|
+
entry.idleTimer = null;
|
|
17692
|
+
this.flushSample(entry);
|
|
17693
|
+
}, this.sampleIdleDelayMs);
|
|
17694
|
+
}
|
|
17695
|
+
flushSample(entry) {
|
|
17696
|
+
if (!entry.pointer) return;
|
|
17697
|
+
const nextSample = {
|
|
17698
|
+
...entry.pointer
|
|
17699
|
+
};
|
|
17700
|
+
entry.lastSampleTimestamp = this.now();
|
|
17701
|
+
entry.hasSampleTimestamp = true;
|
|
17702
|
+
if (isSameSample(entry.sample, nextSample)) return;
|
|
17703
|
+
entry.sample = nextSample;
|
|
17704
|
+
this.notifySample(entry, nextSample);
|
|
17705
|
+
}
|
|
17706
|
+
notifyPointer(entry, snapshot) {
|
|
17707
|
+
for (const listener of Array.from(entry.pointerListeners))listener(snapshot);
|
|
17708
|
+
}
|
|
17709
|
+
notifySample(entry, snapshot) {
|
|
17710
|
+
for (const listener of Array.from(entry.sampleListeners))listener(snapshot);
|
|
17711
|
+
}
|
|
17712
|
+
clearEntryTimers(entry) {
|
|
17713
|
+
if (null !== entry.pointerFrame) {
|
|
17714
|
+
this.cancelFrame(entry.pointerFrame);
|
|
17715
|
+
entry.pointerFrame = null;
|
|
17716
|
+
}
|
|
17717
|
+
if (entry.sampleTimer) {
|
|
17718
|
+
this.clearTimer(entry.sampleTimer);
|
|
17719
|
+
entry.sampleTimer = null;
|
|
17720
|
+
}
|
|
17721
|
+
if (entry.idleTimer) {
|
|
17722
|
+
this.clearTimer(entry.idleTimer);
|
|
17723
|
+
entry.idleTimer = null;
|
|
17724
|
+
}
|
|
17725
|
+
}
|
|
17726
|
+
cleanupEntryIfEmpty(id, entry) {
|
|
17727
|
+
if (entry.pointerListeners.size > 0 || entry.sampleListeners.size > 0 || entry.pointer || entry.sample) return;
|
|
17728
|
+
this.clearEntryTimers(entry);
|
|
17729
|
+
this.entries.delete(id);
|
|
17730
|
+
}
|
|
17731
|
+
}
|
|
17732
|
+
const interactionRuntime = new InteractionRuntime();
|
|
17733
|
+
const toCursorSnapshotEvent = toCursorEventSnapshot;
|
|
17085
17734
|
const cursor_follow_layer_useSafeLayoutEffect = 'undefined' == typeof window ? __WEBPACK_EXTERNAL_MODULE_react__.useEffect : __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect;
|
|
17086
17735
|
const isValidBounds = (bounds)=>Number.isFinite(bounds.left) && Number.isFinite(bounds.top) && Number.isFinite(bounds.right) && Number.isFinite(bounds.bottom) && Number.isFinite(bounds.width) && Number.isFinite(bounds.height) && bounds.width > 0 && bounds.height > 0 && bounds.right > bounds.left && bounds.bottom > bounds.top;
|
|
17087
17736
|
const isPointWithinBounds = (clientX, clientY, bounds)=>clientX >= bounds.left && clientX <= bounds.right && clientY >= bounds.top && clientY <= bounds.bottom;
|
|
17088
|
-
const CursorFollowLayer = ({ children,
|
|
17737
|
+
const CursorFollowLayer = ({ children, interactionId, margin = 8, className })=>{
|
|
17089
17738
|
const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
17090
17739
|
const portalRoot = useChartsPortalContainer('cursor-follow');
|
|
17091
17740
|
const renderedChildren = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>__WEBPACK_EXTERNAL_MODULE_react__.Children.toArray(children), [
|
|
@@ -17097,10 +17746,12 @@ const CursorFollowLayer = ({ children, event, margin = 8, className })=>{
|
|
|
17097
17746
|
ref.current.style.visibility = 'hidden';
|
|
17098
17747
|
ref.current.style.transform = 'translate3d(-100vw, -100vh, 0)';
|
|
17099
17748
|
}, []);
|
|
17100
|
-
const
|
|
17101
|
-
|
|
17749
|
+
const latestPointerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
17750
|
+
const updatePosition = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((pointer = latestPointerRef.current)=>{
|
|
17751
|
+
if (!pointer || !ref.current || !hasContent) return void hideLayer();
|
|
17752
|
+
latestPointerRef.current = pointer;
|
|
17102
17753
|
const node = ref.current;
|
|
17103
|
-
const { clientX, clientY, bounds } =
|
|
17754
|
+
const { clientX, clientY, bounds } = pointer;
|
|
17104
17755
|
if (!Number.isFinite(clientX) || !Number.isFinite(clientY) || !isValidBounds(bounds)) return void hideLayer();
|
|
17105
17756
|
const { width, height } = node.getBoundingClientRect();
|
|
17106
17757
|
const viewportWidth = window.innerWidth;
|
|
@@ -17130,11 +17781,26 @@ const CursorFollowLayer = ({ children, event, margin = 8, className })=>{
|
|
|
17130
17781
|
node.style.visibility = 'visible';
|
|
17131
17782
|
node.style.transform = `translate3d(${nextLeft}px, ${nextTop}px, 0)`;
|
|
17132
17783
|
}, [
|
|
17133
|
-
event,
|
|
17134
17784
|
hasContent,
|
|
17135
17785
|
hideLayer,
|
|
17136
17786
|
margin
|
|
17137
17787
|
]);
|
|
17788
|
+
cursor_follow_layer_useSafeLayoutEffect(()=>{
|
|
17789
|
+
if (!hasContent || !interactionId) return void hideLayer();
|
|
17790
|
+
return interactionRuntime.subscribePointer(interactionId, (pointer)=>{
|
|
17791
|
+
if (!pointer) {
|
|
17792
|
+
latestPointerRef.current = null;
|
|
17793
|
+
hideLayer();
|
|
17794
|
+
return;
|
|
17795
|
+
}
|
|
17796
|
+
updatePosition(pointer);
|
|
17797
|
+
});
|
|
17798
|
+
}, [
|
|
17799
|
+
hasContent,
|
|
17800
|
+
hideLayer,
|
|
17801
|
+
interactionId,
|
|
17802
|
+
updatePosition
|
|
17803
|
+
]);
|
|
17138
17804
|
cursor_follow_layer_useSafeLayoutEffect(()=>{
|
|
17139
17805
|
if (!portalRoot) return;
|
|
17140
17806
|
portalRoot.setAttribute('data-rfkit-cursor-layer', 'true');
|
|
@@ -17150,14 +17816,17 @@ const CursorFollowLayer = ({ children, event, margin = 8, className })=>{
|
|
|
17150
17816
|
});
|
|
17151
17817
|
cursor_follow_layer_useSafeLayoutEffect(()=>{
|
|
17152
17818
|
if (!ref.current || !hasContent) return;
|
|
17819
|
+
const handleResize = ()=>{
|
|
17820
|
+
updatePosition();
|
|
17821
|
+
};
|
|
17153
17822
|
const observer = new ResizeObserver(()=>{
|
|
17154
17823
|
updatePosition();
|
|
17155
17824
|
});
|
|
17156
17825
|
observer.observe(ref.current);
|
|
17157
|
-
window.addEventListener('resize',
|
|
17826
|
+
window.addEventListener('resize', handleResize);
|
|
17158
17827
|
return ()=>{
|
|
17159
17828
|
observer.disconnect();
|
|
17160
|
-
window.removeEventListener('resize',
|
|
17829
|
+
window.removeEventListener('resize', handleResize);
|
|
17161
17830
|
};
|
|
17162
17831
|
}, [
|
|
17163
17832
|
hasContent,
|
|
@@ -17176,15 +17845,11 @@ const CursorFollowLayer = ({ children, event, margin = 8, className })=>{
|
|
|
17176
17845
|
}), portalRoot);
|
|
17177
17846
|
};
|
|
17178
17847
|
const cursor_follow_layer = CursorFollowLayer;
|
|
17179
|
-
const Popover = ({ children })
|
|
17180
|
-
|
|
17181
|
-
if (!event) return null;
|
|
17182
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(cursor_follow_layer, {
|
|
17183
|
-
event: event,
|
|
17848
|
+
const Popover = ({ children, id })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(cursor_follow_layer, {
|
|
17849
|
+
interactionId: id,
|
|
17184
17850
|
margin: UI_CONFIG.POPOVER_MARGIN,
|
|
17185
17851
|
children: children
|
|
17186
17852
|
});
|
|
17187
|
-
};
|
|
17188
17853
|
const Overlay_Popover = Popover;
|
|
17189
17854
|
const Portal_Portal = ({ id, children })=>{
|
|
17190
17855
|
const [container, setContainer] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(null);
|
|
@@ -17321,7 +17986,7 @@ const ToolbarContentBox = ({ style, className, contentClassName, title, active =
|
|
|
17321
17986
|
});
|
|
17322
17987
|
};
|
|
17323
17988
|
const primitives_ToolbarContentBox = ToolbarContentBox;
|
|
17324
|
-
const
|
|
17989
|
+
const ToolbarGlyph_ToolbarGlyph = ({ children, className, opticalOffsetX = 0, opticalOffsetY = 0, opticalScale = 1 })=>{
|
|
17325
17990
|
const transforms = [];
|
|
17326
17991
|
if (0 !== opticalOffsetX || 0 !== opticalOffsetY) transforms.push(`translate(${opticalOffsetX}px, ${opticalOffsetY}px)`);
|
|
17327
17992
|
if (1 !== opticalScale) transforms.push(`scale(${opticalScale})`);
|
|
@@ -17333,137 +17998,7 @@ const ToolbarGlyph = ({ children, className, opticalOffsetX = 0, opticalOffsetY
|
|
|
17333
17998
|
children: children
|
|
17334
17999
|
});
|
|
17335
18000
|
};
|
|
17336
|
-
const
|
|
17337
|
-
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
17338
|
-
var use = __WEBPACK_EXTERNAL_MODULE_react__[" use ".trim().toString()];
|
|
17339
|
-
function isPromiseLike(value1) {
|
|
17340
|
-
return "object" == typeof value1 && null !== value1 && "then" in value1;
|
|
17341
|
-
}
|
|
17342
|
-
function isLazyComponent(element) {
|
|
17343
|
-
return null != element && "object" == typeof element && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
17344
|
-
}
|
|
17345
|
-
function dist_createSlot(ownerName) {
|
|
17346
|
-
const SlotClone = /* @__PURE__ */ dist_createSlotClone(ownerName);
|
|
17347
|
-
const Slot2 = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
17348
|
-
let { children, ...slotProps } = props;
|
|
17349
|
-
if (isLazyComponent(children) && "function" == typeof use) children = use(children._payload);
|
|
17350
|
-
const childrenArray = __WEBPACK_EXTERNAL_MODULE_react__.Children.toArray(children);
|
|
17351
|
-
const slottable = childrenArray.find(dist_isSlottable);
|
|
17352
|
-
if (slottable) {
|
|
17353
|
-
const newElement = slottable.props.children;
|
|
17354
|
-
const newChildren = childrenArray.map((child)=>{
|
|
17355
|
-
if (child !== slottable) return child;
|
|
17356
|
-
if (__WEBPACK_EXTERNAL_MODULE_react__.Children.count(newElement) > 1) return __WEBPACK_EXTERNAL_MODULE_react__.Children.only(null);
|
|
17357
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(newElement) ? newElement.props.children : null;
|
|
17358
|
-
});
|
|
17359
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(SlotClone, {
|
|
17360
|
-
...slotProps,
|
|
17361
|
-
ref: forwardedRef,
|
|
17362
|
-
children: __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(newElement) ? __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(newElement, void 0, newChildren) : null
|
|
17363
|
-
});
|
|
17364
|
-
}
|
|
17365
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(SlotClone, {
|
|
17366
|
-
...slotProps,
|
|
17367
|
-
ref: forwardedRef,
|
|
17368
|
-
children
|
|
17369
|
-
});
|
|
17370
|
-
});
|
|
17371
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
17372
|
-
return Slot2;
|
|
17373
|
-
}
|
|
17374
|
-
function dist_createSlotClone(ownerName) {
|
|
17375
|
-
const SlotClone = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
17376
|
-
let { children, ...slotProps } = props;
|
|
17377
|
-
if (isLazyComponent(children) && "function" == typeof use) children = use(children._payload);
|
|
17378
|
-
if (__WEBPACK_EXTERNAL_MODULE_react__.isValidElement(children)) {
|
|
17379
|
-
const childrenRef = react_slot_dist_getElementRef(children);
|
|
17380
|
-
const props2 = dist_mergeProps(slotProps, children.props);
|
|
17381
|
-
if (children.type !== __WEBPACK_EXTERNAL_MODULE_react__.Fragment) props2.ref = forwardedRef ? dist_composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
17382
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(children, props2);
|
|
17383
|
-
}
|
|
17384
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.Children.count(children) > 1 ? __WEBPACK_EXTERNAL_MODULE_react__.Children.only(null) : null;
|
|
17385
|
-
});
|
|
17386
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
17387
|
-
return SlotClone;
|
|
17388
|
-
}
|
|
17389
|
-
var dist_SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
17390
|
-
function dist_isSlottable(child) {
|
|
17391
|
-
return __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(child) && "function" == typeof child.type && "__radixId" in child.type && child.type.__radixId === dist_SLOTTABLE_IDENTIFIER;
|
|
17392
|
-
}
|
|
17393
|
-
function dist_mergeProps(slotProps, childProps) {
|
|
17394
|
-
const overrideProps = {
|
|
17395
|
-
...childProps
|
|
17396
|
-
};
|
|
17397
|
-
for(const propName in childProps){
|
|
17398
|
-
const slotPropValue = slotProps[propName];
|
|
17399
|
-
const childPropValue = childProps[propName];
|
|
17400
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
17401
|
-
if (isHandler) {
|
|
17402
|
-
if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{
|
|
17403
|
-
const result = childPropValue(...args);
|
|
17404
|
-
slotPropValue(...args);
|
|
17405
|
-
return result;
|
|
17406
|
-
};
|
|
17407
|
-
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
17408
|
-
} else if ("style" === propName) overrideProps[propName] = {
|
|
17409
|
-
...slotPropValue,
|
|
17410
|
-
...childPropValue
|
|
17411
|
-
};
|
|
17412
|
-
else if ("className" === propName) overrideProps[propName] = [
|
|
17413
|
-
slotPropValue,
|
|
17414
|
-
childPropValue
|
|
17415
|
-
].filter(Boolean).join(" ");
|
|
17416
|
-
}
|
|
17417
|
-
return {
|
|
17418
|
-
...slotProps,
|
|
17419
|
-
...overrideProps
|
|
17420
|
-
};
|
|
17421
|
-
}
|
|
17422
|
-
function react_slot_dist_getElementRef(element) {
|
|
17423
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
17424
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
17425
|
-
if (mayWarn) return element.ref;
|
|
17426
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
17427
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
17428
|
-
if (mayWarn) return element.props.ref;
|
|
17429
|
-
return element.props.ref || element.ref;
|
|
17430
|
-
}
|
|
17431
|
-
var dist_NODES = [
|
|
17432
|
-
"a",
|
|
17433
|
-
"button",
|
|
17434
|
-
"div",
|
|
17435
|
-
"form",
|
|
17436
|
-
"h2",
|
|
17437
|
-
"h3",
|
|
17438
|
-
"img",
|
|
17439
|
-
"input",
|
|
17440
|
-
"label",
|
|
17441
|
-
"li",
|
|
17442
|
-
"nav",
|
|
17443
|
-
"ol",
|
|
17444
|
-
"p",
|
|
17445
|
-
"select",
|
|
17446
|
-
"span",
|
|
17447
|
-
"svg",
|
|
17448
|
-
"ul"
|
|
17449
|
-
];
|
|
17450
|
-
var dist_Primitive = dist_NODES.reduce((primitive, node)=>{
|
|
17451
|
-
const Slot = dist_createSlot(`Primitive.${node}`);
|
|
17452
|
-
const Node1 = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
17453
|
-
const { asChild, ...primitiveProps } = props;
|
|
17454
|
-
const Comp = asChild ? Slot : node;
|
|
17455
|
-
if ("undefined" != typeof window) window[Symbol.for("radix-ui")] = true;
|
|
17456
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Comp, {
|
|
17457
|
-
...primitiveProps,
|
|
17458
|
-
ref: forwardedRef
|
|
17459
|
-
});
|
|
17460
|
-
});
|
|
17461
|
-
Node1.displayName = `Primitive.${node}`;
|
|
17462
|
-
return {
|
|
17463
|
-
...primitive,
|
|
17464
|
-
[node]: Node1
|
|
17465
|
-
};
|
|
17466
|
-
}, {});
|
|
18001
|
+
const ToolbarGlyph = ToolbarGlyph_ToolbarGlyph;
|
|
17467
18002
|
var react_separator_dist_NAME = "Separator";
|
|
17468
18003
|
var DEFAULT_ORIENTATION = "horizontal";
|
|
17469
18004
|
var ORIENTATIONS = [
|
|
@@ -17480,7 +18015,7 @@ var dist_Separator = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
17480
18015
|
"aria-orientation": ariaOrientation,
|
|
17481
18016
|
role: "separator"
|
|
17482
18017
|
};
|
|
17483
|
-
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, {
|
|
17484
18019
|
"data-orientation": orientation,
|
|
17485
18020
|
...semanticProps,
|
|
17486
18021
|
...domProps,
|
|
@@ -17518,7 +18053,7 @@ const ToolbarDropdown = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_rea
|
|
|
17518
18053
|
const ToolbarIconDropdown = ({ icon, title, triggerClassName, ...props })=>{
|
|
17519
18054
|
const iconNode = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
17520
18055
|
className: TOOLBAR_TRIGGER_ICON_CLASS_NAME,
|
|
17521
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
18056
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToolbarGlyph, {
|
|
17522
18057
|
children: icon
|
|
17523
18058
|
})
|
|
17524
18059
|
});
|
|
@@ -18003,7 +18538,7 @@ const RulerTicks_RulerTicks = ({ length = 10, tickColor = 'var(--chart-grid-stro
|
|
|
18003
18538
|
});
|
|
18004
18539
|
};
|
|
18005
18540
|
const components_RulerTicks = RulerTicks_RulerTicks;
|
|
18006
|
-
const
|
|
18541
|
+
const ZoomViewportLayer_ZoomViewportLayer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ children, className, style: customStyle }, ref)=>{
|
|
18007
18542
|
const { state: { zoom: { style: zoomStyle } } } = useStore_useStore();
|
|
18008
18543
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
18009
18544
|
ref: ref,
|
|
@@ -18016,7 +18551,7 @@ const ZoomViewportLayer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.fo
|
|
|
18016
18551
|
})
|
|
18017
18552
|
});
|
|
18018
18553
|
});
|
|
18019
|
-
const
|
|
18554
|
+
const ZoomViewportLayer = ZoomViewportLayer_ZoomViewportLayer;
|
|
18020
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';
|
|
18021
18556
|
const AXIS_X_TICKS_SHELL_CLASS_NAME = 'relative h-6 w-full select-none overflow-hidden text-xs leading-6';
|
|
18022
18557
|
const MSCAN_SEGMENT_CLASS_NAME = 'flex flex-1 items-center justify-center';
|
|
@@ -18158,7 +18693,7 @@ const AxisXTicks = ({ type })=>{
|
|
|
18158
18693
|
if (!show) return null;
|
|
18159
18694
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
18160
18695
|
className: AXIS_X_TICKS_SHELL_CLASS_NAME,
|
|
18161
|
-
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, {
|
|
18162
18697
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MScanTicks, {})
|
|
18163
18698
|
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ThreeFixedTicks, {})
|
|
18164
18699
|
});
|
|
@@ -20057,6 +20592,13 @@ function getSeriesWithGraphicType(globalID) {
|
|
|
20057
20592
|
});
|
|
20058
20593
|
return result;
|
|
20059
20594
|
}
|
|
20595
|
+
const DEFAULT_SPECTRUM_TYPE = 'singleFrequency';
|
|
20596
|
+
const WATERFALL_CAPABLE_SPECTRUM_TYPES = new Set([
|
|
20597
|
+
DEFAULT_SPECTRUM_TYPE,
|
|
20598
|
+
'scan',
|
|
20599
|
+
'mscan'
|
|
20600
|
+
]);
|
|
20601
|
+
const shouldEnableSpectrumWaterfall = ({ heatmapElementID, type })=>!!heatmapElementID && WATERFALL_CAPABLE_SPECTRUM_TYPES.has(type ?? DEFAULT_SPECTRUM_TYPE);
|
|
20060
20602
|
const applyAxisYRange = (currentAxisY, nextRange)=>{
|
|
20061
20603
|
const [start, end] = nextRange;
|
|
20062
20604
|
const currentRange = currentAxisY.range ?? constants_RANGE_DEFAULT;
|
|
@@ -20248,11 +20790,11 @@ function useSpectrumChartType({ type, heatmapElementID }) {
|
|
|
20248
20790
|
]);
|
|
20249
20791
|
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
20250
20792
|
let enableMetrics = false;
|
|
20251
|
-
|
|
20252
|
-
|
|
20253
|
-
|
|
20254
|
-
|
|
20255
|
-
|
|
20793
|
+
const enableWaterfall = shouldEnableSpectrumWaterfall({
|
|
20794
|
+
heatmapElementID,
|
|
20795
|
+
type
|
|
20796
|
+
});
|
|
20797
|
+
if (type === constants_ChartType.SingleFrequency || type === constants_ChartType.Scan || type === constants_ChartType.MScan) enableMetrics = true;
|
|
20256
20798
|
return {
|
|
20257
20799
|
enableMetrics,
|
|
20258
20800
|
enableWaterfall
|
|
@@ -20514,6 +21056,25 @@ function convertCoordToVisualLeft({ coord, zoom, segments }) {
|
|
|
20514
21056
|
const index = Math.min(Math.round(safeLift / 100 * (totalPoints - 1)), totalPoints - 1);
|
|
20515
21057
|
return (index - start) * 100 / (end - start + 1);
|
|
20516
21058
|
}
|
|
21059
|
+
const hasBounds = (target)=>'function' == typeof target?.getBoundingClientRect;
|
|
21060
|
+
const calculateEventRelativePositionFromSource = (source)=>{
|
|
21061
|
+
const { clientX = 0, clientY = 0 } = source;
|
|
21062
|
+
const target = source.currentTarget ?? source.target;
|
|
21063
|
+
const { left, top, width, height } = hasBounds(target) ? target.getBoundingClientRect() : {
|
|
21064
|
+
height: 0,
|
|
21065
|
+
left: 0,
|
|
21066
|
+
top: 0,
|
|
21067
|
+
width: 0
|
|
21068
|
+
};
|
|
21069
|
+
if (width <= 0 || height <= 0) return {
|
|
21070
|
+
left: 0,
|
|
21071
|
+
top: 0
|
|
21072
|
+
};
|
|
21073
|
+
return {
|
|
21074
|
+
left: (clientX - left) / width * 100,
|
|
21075
|
+
top: (clientY - top) / height * 100
|
|
21076
|
+
};
|
|
21077
|
+
};
|
|
20517
21078
|
function getEID(id) {
|
|
20518
21079
|
return `EVENTBUS-${id}`;
|
|
20519
21080
|
}
|
|
@@ -20531,16 +21092,7 @@ const createMouseEnterEventManager = (id, name, func)=>subscription_createSubscr
|
|
|
20531
21092
|
const createWheelEventManager = (id, name, func)=>subscription_createSubscriptionManager(`${generateRecursiveId(id, func)}-wheel`, name, func, id);
|
|
20532
21093
|
const createDragEventManager = (id, name, func)=>subscription_createSubscriptionManager(`${generateRecursiveId(id, func)}-drag`, name, func, id);
|
|
20533
21094
|
const createLongPressEventManager = (id, name, func)=>subscription_createSubscriptionManager(`${generateRecursiveId(id, func)}-long-press`, name, func, id);
|
|
20534
|
-
const calculateEventRelativePosition = (e)=>
|
|
20535
|
-
const { target, clientX, clientY } = e;
|
|
20536
|
-
const { left, top, width, height } = target.getBoundingClientRect();
|
|
20537
|
-
const x = (clientX - left) / width * 100;
|
|
20538
|
-
const y = (clientY - top) / height * 100;
|
|
20539
|
-
return {
|
|
20540
|
-
left: x,
|
|
20541
|
-
top: y
|
|
20542
|
-
};
|
|
20543
|
-
};
|
|
21095
|
+
const calculateEventRelativePosition = (e)=>calculateEventRelativePositionFromSource(e);
|
|
20544
21096
|
const EVENT_PRIORITY_LEVEL_DEFAULT = 'void';
|
|
20545
21097
|
const EVENT_PRIORITY_LEVELS = {
|
|
20546
21098
|
[EVENT_PRIORITY_LEVEL_DEFAULT]: 0,
|
|
@@ -20609,6 +21161,20 @@ const FrequencyDisplay = ({ frequency, unit })=>frequency ? /*#__PURE__*/ (0, __
|
|
|
20609
21161
|
unit
|
|
20610
21162
|
]
|
|
20611
21163
|
}) : null;
|
|
21164
|
+
const useCursorSample = (id)=>{
|
|
21165
|
+
const subscribe = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((listener)=>{
|
|
21166
|
+
if (!id) return ()=>{};
|
|
21167
|
+
return interactionRuntime.subscribeSample(id, ()=>{
|
|
21168
|
+
listener();
|
|
21169
|
+
});
|
|
21170
|
+
}, [
|
|
21171
|
+
id
|
|
21172
|
+
]);
|
|
21173
|
+
const getSnapshot = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>id ? interactionRuntime.getSample(id) : null, [
|
|
21174
|
+
id
|
|
21175
|
+
]);
|
|
21176
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
21177
|
+
};
|
|
20612
21178
|
function useSeriesManager(globalID, options = {}) {
|
|
20613
21179
|
const { subscribeToMode = true, subscribeToData = true, watchSeries } = options;
|
|
20614
21180
|
const [updateCounter, setUpdateCounter] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(0);
|
|
@@ -20696,7 +21262,7 @@ function getStableOrder(currentNames) {
|
|
|
20696
21262
|
}
|
|
20697
21263
|
function useFilteredSeries_useFilteredSeries(globalID, filter) {
|
|
20698
21264
|
const { series } = useSeriesManager(globalID);
|
|
20699
|
-
const
|
|
21265
|
+
const legendExternal = useStore_useSelector((state)=>state.series.legendExternal);
|
|
20700
21266
|
const filteredData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
20701
21267
|
const filtered = Array.from(series.values()).filter((config)=>{
|
|
20702
21268
|
if (legendExternal.includes(config.name)) return false;
|
|
@@ -20724,9 +21290,99 @@ function useFilteredSeries_useFilteredSeries(globalID, filter) {
|
|
|
20724
21290
|
]);
|
|
20725
21291
|
return filteredData;
|
|
20726
21292
|
}
|
|
21293
|
+
const clampPercent = (value1)=>Math.max(0, Math.min(100, value1));
|
|
21294
|
+
const normalizeRange = (a, b)=>({
|
|
21295
|
+
end: Math.max(a, b),
|
|
21296
|
+
start: Math.min(a, b)
|
|
21297
|
+
});
|
|
21298
|
+
const resolveHeatmapColumnCount = (waterfallData)=>waterfallData.reduce((columnCount, row)=>Math.max(columnCount, row?.length ?? 0), 0);
|
|
21299
|
+
const resolveHeatmapGridInfo = (waterfallData)=>({
|
|
21300
|
+
columnCount: resolveHeatmapColumnCount(waterfallData),
|
|
21301
|
+
rowCount: waterfallData.length
|
|
21302
|
+
});
|
|
21303
|
+
const resolveHeatmapRowIndex = (top, rowCount)=>{
|
|
21304
|
+
if (rowCount <= 0) return -1;
|
|
21305
|
+
if (1 === rowCount) return 0;
|
|
21306
|
+
const safeTop = clampPercent(top);
|
|
21307
|
+
return Math.max(0, Math.min(rowCount - 1, Math.ceil((100 - safeTop) * rowCount / 100) - 1));
|
|
21308
|
+
};
|
|
21309
|
+
const resolveHeatmapColumnIndex = (left, columnCount)=>{
|
|
21310
|
+
if (columnCount <= 0) return -1;
|
|
21311
|
+
if (1 === columnCount) return 0;
|
|
21312
|
+
const safeLeft = clampPercent(left);
|
|
21313
|
+
return Math.max(0, Math.min(columnCount - 1, Math.ceil(safeLeft * columnCount / 100) - 1));
|
|
21314
|
+
};
|
|
21315
|
+
const resolveHeatmapRowRange = (topA, topB, rowCount)=>{
|
|
21316
|
+
const rowA = resolveHeatmapRowIndex(topA, rowCount);
|
|
21317
|
+
const rowB = resolveHeatmapRowIndex(topB, rowCount);
|
|
21318
|
+
if (rowA < 0 || rowB < 0) return null;
|
|
21319
|
+
const { end, start } = normalizeRange(rowA, rowB);
|
|
21320
|
+
return {
|
|
21321
|
+
endIndex: end,
|
|
21322
|
+
startIndex: start
|
|
21323
|
+
};
|
|
21324
|
+
};
|
|
21325
|
+
const resolveHeatmapColumnRange = (leftA, leftB, columnCount)=>{
|
|
21326
|
+
const columnA = resolveHeatmapColumnIndex(leftA, columnCount);
|
|
21327
|
+
const columnB = resolveHeatmapColumnIndex(leftB, columnCount);
|
|
21328
|
+
if (columnA < 0 || columnB < 0) return null;
|
|
21329
|
+
const { end, start } = normalizeRange(columnA, columnB);
|
|
21330
|
+
return {
|
|
21331
|
+
endCol: end,
|
|
21332
|
+
startCol: start
|
|
21333
|
+
};
|
|
21334
|
+
};
|
|
21335
|
+
const resolveHeatmapGridRange = (waterfallData, bounds)=>{
|
|
21336
|
+
const { columnCount, rowCount } = resolveHeatmapGridInfo(waterfallData);
|
|
21337
|
+
if (0 === rowCount || 0 === columnCount) return null;
|
|
21338
|
+
const rowRange = resolveHeatmapRowRange(bounds.startTop, bounds.endTop, rowCount);
|
|
21339
|
+
const columnRange = resolveHeatmapColumnRange(bounds.startLeft, bounds.endLeft, columnCount);
|
|
21340
|
+
if (!rowRange || !columnRange) return null;
|
|
21341
|
+
return {
|
|
21342
|
+
...rowRange,
|
|
21343
|
+
...columnRange
|
|
21344
|
+
};
|
|
21345
|
+
};
|
|
21346
|
+
const resolveHeatmapRangeData = (waterfallData, range)=>{
|
|
21347
|
+
const { columnCount, rowCount } = resolveHeatmapGridInfo(waterfallData);
|
|
21348
|
+
if (0 === rowCount || 0 === columnCount) return [];
|
|
21349
|
+
const startIndex = Math.max(0, Math.min(rowCount - 1, range.startIndex));
|
|
21350
|
+
const endIndex = Math.max(startIndex, Math.min(rowCount - 1, range.endIndex));
|
|
21351
|
+
const startCol = Math.max(0, Math.min(columnCount - 1, range.startCol));
|
|
21352
|
+
const endCol = Math.max(startCol, Math.min(columnCount - 1, range.endCol));
|
|
21353
|
+
return waterfallData.slice(startIndex, endIndex + 1).map((row)=>{
|
|
21354
|
+
const values = [];
|
|
21355
|
+
for(let columnIndex = startCol; columnIndex <= endCol; columnIndex += 1){
|
|
21356
|
+
const rawValue = row?.[columnIndex];
|
|
21357
|
+
values.push('number' == typeof rawValue && Number.isFinite(rawValue) ? rawValue : Number.NaN);
|
|
21358
|
+
}
|
|
21359
|
+
return values;
|
|
21360
|
+
});
|
|
21361
|
+
};
|
|
21362
|
+
const resolveHeatmapCursorValue = (waterfallData, coord)=>{
|
|
21363
|
+
const { columnCount, rowCount } = resolveHeatmapGridInfo(waterfallData);
|
|
21364
|
+
if (0 === rowCount || 0 === columnCount) return null;
|
|
21365
|
+
const rowIndex = resolveHeatmapRowIndex(coord.top, rowCount);
|
|
21366
|
+
const columnIndex = resolveHeatmapColumnIndex(coord.left, columnCount);
|
|
21367
|
+
if (rowIndex < 0 || columnIndex < 0) return null;
|
|
21368
|
+
const row = waterfallData[rowIndex];
|
|
21369
|
+
const rawValue = row?.[columnIndex];
|
|
21370
|
+
const value1 = 'number' == typeof rawValue && Number.isFinite(rawValue) ? rawValue : null;
|
|
21371
|
+
return {
|
|
21372
|
+
columnIndex,
|
|
21373
|
+
rowIndex,
|
|
21374
|
+
timestamp: row?.timestamp ? String(row.timestamp) : '',
|
|
21375
|
+
value: value1
|
|
21376
|
+
};
|
|
21377
|
+
};
|
|
20727
21378
|
const HeatmapCursorPopover = ({ id })=>{
|
|
20728
|
-
const
|
|
20729
|
-
const
|
|
21379
|
+
const frequencyFormat = useStore_useSelector((state)=>state.axisX.frequencyFormat);
|
|
21380
|
+
const axisXUnit = useStore_useSelector((state)=>state.axisX.unit ?? '');
|
|
21381
|
+
const globalID = useStore_useSelector((state)=>state.globalID);
|
|
21382
|
+
const axisYUnit = useStore_useSelector((state)=>state.axisY.unit);
|
|
21383
|
+
const sample = useCursorSample(id);
|
|
21384
|
+
const left = sample?.coord.left;
|
|
21385
|
+
const top = sample?.coord.top;
|
|
20730
21386
|
const updateKey = useCursorPopoverUpdateKey('HeatmapPopover', id);
|
|
20731
21387
|
const [value1, setValue] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)('');
|
|
20732
21388
|
const [timestamp, setTimestamp] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)('');
|
|
@@ -20744,23 +21400,22 @@ const HeatmapCursorPopover = ({ id })=>{
|
|
|
20744
21400
|
setTimestamp('');
|
|
20745
21401
|
return;
|
|
20746
21402
|
}
|
|
20747
|
-
const
|
|
20748
|
-
|
|
20749
|
-
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
20756
|
-
|
|
20757
|
-
|
|
20758
|
-
const frameTimestamp = outputFrame.timestamp;
|
|
20759
|
-
setTimestamp(frameTimestamp ? String(frameTimestamp) : '');
|
|
21403
|
+
const cursorValue = resolveHeatmapCursorValue(outputWaterfall, {
|
|
21404
|
+
left,
|
|
21405
|
+
top
|
|
21406
|
+
});
|
|
21407
|
+
if (!cursorValue) {
|
|
21408
|
+
setValue('');
|
|
21409
|
+
setTimestamp('');
|
|
21410
|
+
return;
|
|
21411
|
+
}
|
|
21412
|
+
setValue(null !== cursorValue.value && Number.isFinite(cursorValue.value) ? cursorValue.value.toFixed(1) : '');
|
|
21413
|
+
setTimestamp(cursorValue.timestamp);
|
|
20760
21414
|
}, [
|
|
20761
21415
|
globalID,
|
|
20762
21416
|
left,
|
|
20763
21417
|
top,
|
|
21418
|
+
sample?.version,
|
|
20764
21419
|
updateKey
|
|
20765
21420
|
]);
|
|
20766
21421
|
const frequency = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>'number' == typeof left ? frequencyFormat?.(left) ?? '' : '', [
|
|
@@ -20809,8 +21464,10 @@ const HeatmapCursorPopover = ({ id })=>{
|
|
|
20809
21464
|
};
|
|
20810
21465
|
const CursorPopover = HeatmapCursorPopover;
|
|
20811
21466
|
const LevelCursorPopover = ({ id })=>{
|
|
20812
|
-
const
|
|
20813
|
-
const
|
|
21467
|
+
const globalID = useStore_useSelector((state)=>state.globalID);
|
|
21468
|
+
const axisYUnit = useStore_useSelector((state)=>state.axisY.unit);
|
|
21469
|
+
const sample = useCursorSample(id);
|
|
21470
|
+
const left = sample?.coord.left;
|
|
20814
21471
|
const updateKey = useCursorPopoverUpdateKey('LevelStreamPopover', id);
|
|
20815
21472
|
const [value1, setValue] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)('');
|
|
20816
21473
|
const [timestamp, setTimestamp] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)('');
|
|
@@ -20837,6 +21494,7 @@ const LevelCursorPopover = ({ id })=>{
|
|
|
20837
21494
|
}, [
|
|
20838
21495
|
globalID,
|
|
20839
21496
|
left,
|
|
21497
|
+
sample?.version,
|
|
20840
21498
|
updateKey
|
|
20841
21499
|
]);
|
|
20842
21500
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_Mask, {
|
|
@@ -20870,9 +21528,12 @@ const LevelCursorPopover = ({ id })=>{
|
|
|
20870
21528
|
});
|
|
20871
21529
|
};
|
|
20872
21530
|
const Level_CursorPopover = LevelCursorPopover;
|
|
20873
|
-
const OccupancyCursorPopover = ()=>{
|
|
20874
|
-
const
|
|
20875
|
-
const
|
|
21531
|
+
const OccupancyCursorPopover = ({ id })=>{
|
|
21532
|
+
const frequencyFormat = useStore_useSelector((state)=>state.axisX.frequencyFormat);
|
|
21533
|
+
const axisXUnit = useStore_useSelector((state)=>state.axisX.unit ?? '');
|
|
21534
|
+
const globalID = useStore_useSelector((state)=>state.globalID);
|
|
21535
|
+
const sample = useCursorSample(id);
|
|
21536
|
+
const left = sample?.coord.left;
|
|
20876
21537
|
const value1 = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
20877
21538
|
if (!globalID || 'number' != typeof left || !Number.isFinite(left)) return '';
|
|
20878
21539
|
const snapshot = withDatabase(globalID).getAllRawData(left);
|
|
@@ -20888,7 +21549,8 @@ const OccupancyCursorPopover = ()=>{
|
|
|
20888
21549
|
return '';
|
|
20889
21550
|
}, [
|
|
20890
21551
|
globalID,
|
|
20891
|
-
left
|
|
21552
|
+
left,
|
|
21553
|
+
sample?.version
|
|
20892
21554
|
]);
|
|
20893
21555
|
const frequency = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>'number' == typeof left ? frequencyFormat?.(left) ?? '' : '', [
|
|
20894
21556
|
left,
|
|
@@ -20962,7 +21624,7 @@ const compareFrequencyMatchedCandidates = (currentFrequency, a, b)=>{
|
|
|
20962
21624
|
if (0 !== widthDiff) return widthDiff;
|
|
20963
21625
|
const centerDistanceDiff = Math.abs(getRangeCenter(a.range) - currentFrequency) - Math.abs(getRangeCenter(b.range) - currentFrequency);
|
|
20964
21626
|
if (0 !== centerDistanceDiff) return centerDistanceDiff;
|
|
20965
|
-
const stationPriorityDiff = Number(
|
|
21627
|
+
const stationPriorityDiff = Number(utils_isStationInfo(b.item)) - Number(utils_isStationInfo(a.item));
|
|
20966
21628
|
if (0 !== stationPriorityDiff) return stationPriorityDiff;
|
|
20967
21629
|
return getUnifiedSignalKey(a.item).localeCompare(getUnifiedSignalKey(b.item));
|
|
20968
21630
|
};
|
|
@@ -20973,15 +21635,15 @@ const compareIndexMatchedCandidates = (currentFrequency, currentPointIndex, a, b
|
|
|
20973
21635
|
if (0 !== widthDiff) return widthDiff;
|
|
20974
21636
|
const frequencyDistanceDiff = getFrequencyDistanceToRange(currentFrequency, a.range) - getFrequencyDistanceToRange(currentFrequency, b.range);
|
|
20975
21637
|
if (0 !== frequencyDistanceDiff) return frequencyDistanceDiff;
|
|
20976
|
-
const stationPriorityDiff = Number(
|
|
21638
|
+
const stationPriorityDiff = Number(utils_isStationInfo(b.item)) - Number(utils_isStationInfo(a.item));
|
|
20977
21639
|
if (0 !== stationPriorityDiff) return stationPriorityDiff;
|
|
20978
21640
|
return getUnifiedSignalKey(a.item).localeCompare(getUnifiedSignalKey(b.item));
|
|
20979
21641
|
};
|
|
20980
|
-
function
|
|
21642
|
+
function utils_isStationInfo(item) {
|
|
20981
21643
|
return 'signalName' in item && 'orgName' in item;
|
|
20982
21644
|
}
|
|
20983
21645
|
function getUnifiedSignalKey(item) {
|
|
20984
|
-
if (
|
|
21646
|
+
if (utils_isStationInfo(item)) return `${item.signalName}-${item.frequency}`;
|
|
20985
21647
|
if (null != item.startFrequency && null != item.stopFrequency) return `${item.startFrequency}-${item.stopFrequency}`;
|
|
20986
21648
|
return `${item.frequency}-${item.bandwidth}`;
|
|
20987
21649
|
}
|
|
@@ -20993,7 +21655,7 @@ function toFrequencyRangeInput(item) {
|
|
|
20993
21655
|
stopFrequency: null != item.stopFrequency ? Number(item.stopFrequency) : void 0
|
|
20994
21656
|
};
|
|
20995
21657
|
}
|
|
20996
|
-
function
|
|
21658
|
+
function utils_resolveBestSignalMatch(candidates, options) {
|
|
20997
21659
|
const { currentFrequency, currentPointIndex } = options;
|
|
20998
21660
|
const indexTolerance = options.indexTolerance ?? SIGNAL_INDEX_MATCH_TOLERANCE;
|
|
20999
21661
|
if (!Number.isFinite(currentFrequency) || !Number.isFinite(currentPointIndex) || !candidates.length) return;
|
|
@@ -21006,7 +21668,7 @@ function resolveBestSignalMatch(candidates, options) {
|
|
|
21006
21668
|
return indexMatched[0];
|
|
21007
21669
|
}
|
|
21008
21670
|
const resolveSignalPresentation = (item)=>{
|
|
21009
|
-
if (
|
|
21671
|
+
if (utils_isStationInfo(item)) {
|
|
21010
21672
|
const signalType = item.signalType;
|
|
21011
21673
|
const signalTypeInfo = SIGNAL_TYPE_MAP[signalType];
|
|
21012
21674
|
const signalTypeName = signalTypeInfo?.name || item.signalType;
|
|
@@ -21055,40 +21717,49 @@ const resolveSignalPositions = (signalItems, segment)=>resolveSignalMatchCandida
|
|
|
21055
21717
|
tooltip
|
|
21056
21718
|
};
|
|
21057
21719
|
});
|
|
21058
|
-
const
|
|
21720
|
+
const resolveStaticSignalSegments = ({ segments, signalItems })=>{
|
|
21059
21721
|
if (!segments.length) return [];
|
|
21060
21722
|
const totalSegmentPoints = segments.reduce((sum, segment)=>sum + segment.point, 0);
|
|
21723
|
+
let segmentLeft = 0;
|
|
21061
21724
|
return segments.map((segment, segmentIndex)=>{
|
|
21062
|
-
const signalPositions = resolveSignalPositions(signalItems, segment);
|
|
21063
|
-
const activeMatch = isCursorActive && currentPosition.segmentIndex === segmentIndex && Number.isFinite(currentFrequency) ? resolveBestSignalMatch(signalPositions, {
|
|
21064
|
-
currentFrequency,
|
|
21065
|
-
currentPointIndex: currentPosition.pointIndex
|
|
21066
|
-
}) : void 0;
|
|
21067
21725
|
const segmentWidth = segment.point / totalSegmentPoints * 100;
|
|
21068
|
-
const
|
|
21069
|
-
return {
|
|
21726
|
+
const data = {
|
|
21070
21727
|
segment,
|
|
21071
21728
|
segmentIndex,
|
|
21072
|
-
signalPositions,
|
|
21073
|
-
activeSignalKey: activeMatch?.key,
|
|
21729
|
+
signalPositions: resolveSignalPositions(signalItems, segment),
|
|
21074
21730
|
style: {
|
|
21075
21731
|
left: `${segmentLeft}%`,
|
|
21076
21732
|
width: `${segmentWidth}%`
|
|
21077
21733
|
}
|
|
21078
21734
|
};
|
|
21735
|
+
segmentLeft += segmentWidth;
|
|
21736
|
+
return data;
|
|
21079
21737
|
});
|
|
21080
21738
|
};
|
|
21081
|
-
const
|
|
21739
|
+
const resolveActiveSignalKey = ({ segmentData, isCursorActive, currentFrequency, currentPosition })=>{
|
|
21740
|
+
if (!isCursorActive || !Number.isFinite(currentFrequency) || currentPosition.segmentIndex < 0) return;
|
|
21741
|
+
const currentSegmentData = segmentData[currentPosition.segmentIndex];
|
|
21742
|
+
if (!currentSegmentData) return;
|
|
21743
|
+
return utils_resolveBestSignalMatch(currentSegmentData.signalPositions, {
|
|
21744
|
+
currentFrequency,
|
|
21745
|
+
currentPointIndex: currentPosition.pointIndex
|
|
21746
|
+
})?.key;
|
|
21747
|
+
};
|
|
21748
|
+
const createStationRangeIndex = ({ signalItems, segments })=>{
|
|
21749
|
+
if (!signalItems.length || !segments.length) return [];
|
|
21750
|
+
const stationItems = signalItems.filter(utils_isStationInfo);
|
|
21751
|
+
if (!stationItems.length) return [];
|
|
21752
|
+
return segments.map((segment)=>resolveSignalMatchCandidates(stationItems, segment));
|
|
21753
|
+
};
|
|
21754
|
+
const findStationInRangeIndex = ({ frequency, stationRangeIndex, currentPosition })=>{
|
|
21082
21755
|
if (!Number.isFinite(frequency)) return;
|
|
21083
|
-
const
|
|
21084
|
-
if (!
|
|
21085
|
-
const
|
|
21086
|
-
if (!stationItems.length) return;
|
|
21087
|
-
const matchedSignal = resolveBestSignalMatch(resolveSignalMatchCandidates(stationItems, currentSegment), {
|
|
21756
|
+
const candidates = stationRangeIndex[currentPosition.segmentIndex];
|
|
21757
|
+
if (!candidates?.length) return;
|
|
21758
|
+
const matchedSignal = utils_resolveBestSignalMatch(candidates, {
|
|
21088
21759
|
currentFrequency: frequency,
|
|
21089
21760
|
currentPointIndex: currentPosition.pointIndex
|
|
21090
21761
|
});
|
|
21091
|
-
return matchedSignal &&
|
|
21762
|
+
return matchedSignal && utils_isStationInfo(matchedSignal.item) ? matchedSignal.item : void 0;
|
|
21092
21763
|
};
|
|
21093
21764
|
const withStationDataUpdate = (globalID, name, func)=>{
|
|
21094
21765
|
const subscriptionId = `stationData-update-${globalID}`;
|
|
@@ -21104,7 +21775,10 @@ const STATION_DATA = (globalID, data)=>{
|
|
|
21104
21775
|
return result;
|
|
21105
21776
|
};
|
|
21106
21777
|
function useUnifiedSignals({ respectVisibility = false } = {}) {
|
|
21107
|
-
const
|
|
21778
|
+
const globalID = useStore_useSelector((state)=>state.globalID);
|
|
21779
|
+
const signalData = useStore_useSelector((state)=>state.signal.data);
|
|
21780
|
+
const signalDisplay = useStore_useSelector((state)=>state.signal.display);
|
|
21781
|
+
const signalShow = useStore_useSelector((state)=>state.signal.show);
|
|
21108
21782
|
const [updateTrigger, setUpdateTrigger] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(0);
|
|
21109
21783
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
21110
21784
|
const subscriberName = `useUnifiedSignals-${globalID}-${Date.now()}`;
|
|
@@ -21120,30 +21794,39 @@ function useUnifiedSignals({ respectVisibility = false } = {}) {
|
|
|
21120
21794
|
globalID
|
|
21121
21795
|
]);
|
|
21122
21796
|
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
21123
|
-
if (respectVisibility && (!
|
|
21797
|
+
if (respectVisibility && (!signalShow || !signalDisplay)) return [];
|
|
21124
21798
|
const stationData = STATION_DATA(globalID);
|
|
21125
|
-
const
|
|
21799
|
+
const nextSignalData = signalData || [];
|
|
21126
21800
|
return [
|
|
21127
21801
|
...stationData,
|
|
21128
|
-
...
|
|
21802
|
+
...nextSignalData
|
|
21129
21803
|
];
|
|
21130
21804
|
}, [
|
|
21131
21805
|
globalID,
|
|
21132
|
-
|
|
21133
|
-
|
|
21134
|
-
|
|
21806
|
+
signalData,
|
|
21807
|
+
signalDisplay,
|
|
21808
|
+
signalShow,
|
|
21135
21809
|
respectVisibility,
|
|
21136
21810
|
updateTrigger
|
|
21137
21811
|
]);
|
|
21138
21812
|
}
|
|
21139
|
-
function useStationInfoAtCursor({ frequency, enabled = true }) {
|
|
21140
|
-
const
|
|
21141
|
-
const
|
|
21813
|
+
function useStationInfoAtCursor({ frequency, enabled = true, cursorSample }) {
|
|
21814
|
+
const cursor = useStore_useSelector((state)=>state.cursor);
|
|
21815
|
+
const segments = useStore_useSelector((state)=>state.segments);
|
|
21816
|
+
const left = cursorSample?.coord.left ?? cursor.coord.left;
|
|
21142
21817
|
const signalItems = useUnifiedSignals({
|
|
21143
21818
|
respectVisibility: enabled
|
|
21144
21819
|
});
|
|
21145
|
-
const
|
|
21820
|
+
const stationRangeIndex = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>createStationRangeIndex({
|
|
21821
|
+
signalItems,
|
|
21822
|
+
segments
|
|
21823
|
+
}), [
|
|
21824
|
+
segments,
|
|
21825
|
+
signalItems
|
|
21826
|
+
]);
|
|
21827
|
+
const isCursorActive = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>enabled && (cursorSample ? true : cursor_hasActiveSpectrumCursor(cursor)), [
|
|
21146
21828
|
cursor,
|
|
21829
|
+
cursorSample,
|
|
21147
21830
|
enabled
|
|
21148
21831
|
]);
|
|
21149
21832
|
const currentPosition = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>isCursorActive && 'number' == typeof left ? frequencyCalculation_calculateCursorPosition(left, segments) : {
|
|
@@ -21155,29 +21838,27 @@ function useStationInfoAtCursor({ frequency, enabled = true }) {
|
|
|
21155
21838
|
segments
|
|
21156
21839
|
]);
|
|
21157
21840
|
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
21158
|
-
if (!enabled || 'number' != typeof left || !Number.isFinite(left) || left < 0 || !
|
|
21841
|
+
if (!enabled || 'number' != typeof left || !Number.isFinite(left) || left < 0 || !stationRangeIndex.length || !segments?.length) return;
|
|
21159
21842
|
if (!isCursorActive) return;
|
|
21160
21843
|
const currentFrequency = frequencyCalculation_getCursorFrequencyAtPosition(segments, currentPosition);
|
|
21161
21844
|
if (!Number.isFinite(currentFrequency)) {
|
|
21162
21845
|
const fallbackFrequency = Number(frequency);
|
|
21163
21846
|
if (!Number.isFinite(fallbackFrequency)) return;
|
|
21164
|
-
return
|
|
21847
|
+
return findStationInRangeIndex({
|
|
21165
21848
|
frequency: fallbackFrequency,
|
|
21166
|
-
|
|
21167
|
-
segments,
|
|
21849
|
+
stationRangeIndex,
|
|
21168
21850
|
currentPosition
|
|
21169
21851
|
});
|
|
21170
21852
|
}
|
|
21171
|
-
return
|
|
21853
|
+
return findStationInRangeIndex({
|
|
21172
21854
|
frequency: currentFrequency,
|
|
21173
|
-
|
|
21174
|
-
segments,
|
|
21855
|
+
stationRangeIndex,
|
|
21175
21856
|
currentPosition
|
|
21176
21857
|
});
|
|
21177
21858
|
}, [
|
|
21178
21859
|
enabled,
|
|
21179
21860
|
frequency,
|
|
21180
|
-
|
|
21861
|
+
stationRangeIndex,
|
|
21181
21862
|
segments,
|
|
21182
21863
|
currentPosition,
|
|
21183
21864
|
left,
|
|
@@ -21250,16 +21931,21 @@ const StationInfoPanel = ({ stationInfo })=>{
|
|
|
21250
21931
|
});
|
|
21251
21932
|
};
|
|
21252
21933
|
const panels_StationInfoPanel = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(StationInfoPanel);
|
|
21253
|
-
const FrequencyDataBoard = ({ left, updateKey, onChange, showStationInfo = true })=>{
|
|
21254
|
-
const
|
|
21255
|
-
const
|
|
21934
|
+
const FrequencyDataBoard = ({ left, updateKey, onChange, showStationInfo = true, cursorSample })=>{
|
|
21935
|
+
const axisYUnit = useStore_useSelector((state)=>state.axisY.unit);
|
|
21936
|
+
const frequencyFormat = useStore_useSelector((state)=>state.axisX.frequencyFormat);
|
|
21937
|
+
const unit = useStore_useSelector((state)=>state.axisX.unit);
|
|
21938
|
+
const globalID = useStore_useSelector((state)=>state.globalID);
|
|
21939
|
+
const snapshotCacheRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
21940
|
+
const filterVisibleSeries = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((config)=>false !== config.display, []);
|
|
21941
|
+
const filteredSeries = useFilteredSeries_useFilteredSeries(globalID, filterVisibleSeries);
|
|
21256
21942
|
const calculateIndex = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((values, series, sampledIndex, rawValue)=>{
|
|
21257
21943
|
if (!values || 0 === values.length) return null;
|
|
21258
21944
|
const safeSampledIndex = Math.max(0, Math.min(values.length - 1, Math.floor(sampledIndex)));
|
|
21259
21945
|
const displayValue = Number.isFinite(rawValue) ? rawValue : values[safeSampledIndex];
|
|
21260
21946
|
if ('number' != typeof displayValue) return null;
|
|
21261
|
-
const
|
|
21262
|
-
const level = getVirtualLevel(
|
|
21947
|
+
const nextUnit = axisYUnit ?? '';
|
|
21948
|
+
const level = getVirtualLevel(nextUnit, displayValue)?.toFixed(1);
|
|
21263
21949
|
if (!(0, utils_array.Ri)(level)) return null;
|
|
21264
21950
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
21265
21951
|
className: "grid max-w-[220px] grid-cols-[minmax(0,1fr)_auto] items-center gap-x-1 text-xs",
|
|
@@ -21279,14 +21965,14 @@ const FrequencyDataBoard = ({ left, updateKey, onChange, showStationInfo = true
|
|
|
21279
21965
|
children: level
|
|
21280
21966
|
}),
|
|
21281
21967
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
21282
|
-
children:
|
|
21968
|
+
children: nextUnit
|
|
21283
21969
|
})
|
|
21284
21970
|
]
|
|
21285
21971
|
})
|
|
21286
21972
|
]
|
|
21287
21973
|
}, series.name);
|
|
21288
21974
|
}, [
|
|
21289
|
-
|
|
21975
|
+
axisYUnit
|
|
21290
21976
|
]);
|
|
21291
21977
|
const { value: value1, currentIndex } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
21292
21978
|
if (!globalID) return {
|
|
@@ -21298,7 +21984,16 @@ const FrequencyDataBoard = ({ left, updateKey, onChange, showStationInfo = true
|
|
|
21298
21984
|
value: null,
|
|
21299
21985
|
currentIndex: Number.NaN
|
|
21300
21986
|
};
|
|
21301
|
-
const
|
|
21987
|
+
const sampleVersion = cursorSample?.version;
|
|
21988
|
+
const cachedSnapshot = snapshotCacheRef.current;
|
|
21989
|
+
const snapshot = cachedSnapshot && cachedSnapshot.globalID === globalID && cachedSnapshot.left === left && cachedSnapshot.sampleVersion === sampleVersion && cachedSnapshot.updateKey === updateKey ? cachedSnapshot.snapshot : db.getAllRawData(left);
|
|
21990
|
+
snapshotCacheRef.current = {
|
|
21991
|
+
globalID,
|
|
21992
|
+
left,
|
|
21993
|
+
sampleVersion,
|
|
21994
|
+
updateKey,
|
|
21995
|
+
snapshot
|
|
21996
|
+
};
|
|
21302
21997
|
const cursorGlobalIndex = snapshot.cursorIndex?.globalIndex;
|
|
21303
21998
|
const cursorSampledIndex = snapshot.cursorIndex?.sampledIndex;
|
|
21304
21999
|
const sampledSeriesMap = {
|
|
@@ -21355,7 +22050,8 @@ const FrequencyDataBoard = ({ left, updateKey, onChange, showStationInfo = true
|
|
|
21355
22050
|
globalID,
|
|
21356
22051
|
filteredSeries,
|
|
21357
22052
|
updateKey,
|
|
21358
|
-
left
|
|
22053
|
+
left,
|
|
22054
|
+
cursorSample?.version
|
|
21359
22055
|
]);
|
|
21360
22056
|
const frequency = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>frequencyFormat?.(left) ?? '', [
|
|
21361
22057
|
left,
|
|
@@ -21373,7 +22069,8 @@ const FrequencyDataBoard = ({ left, updateKey, onChange, showStationInfo = true
|
|
|
21373
22069
|
]);
|
|
21374
22070
|
const matchedStation = useStationInfoAtCursor({
|
|
21375
22071
|
frequency,
|
|
21376
|
-
enabled: showStationInfo
|
|
22072
|
+
enabled: showStationInfo,
|
|
22073
|
+
cursorSample
|
|
21377
22074
|
});
|
|
21378
22075
|
const hasStationInfo = showStationInfo && !!matchedStation;
|
|
21379
22076
|
const hasValue = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>value1 && (Array.isArray(value1) ? value1.length > 0 : true), [
|
|
@@ -21402,12 +22099,16 @@ const FrequencyDataBoard = ({ left, updateKey, onChange, showStationInfo = true
|
|
|
21402
22099
|
};
|
|
21403
22100
|
const Spectrum_FrequencyDataBoard = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(FrequencyDataBoard);
|
|
21404
22101
|
const SpectrumCursorPopover = ({ id })=>{
|
|
21405
|
-
const
|
|
22102
|
+
const signalShow = useStore_useSelector((state)=>state.signal.show);
|
|
22103
|
+
const signalDisplay = useStore_useSelector((state)=>state.signal.display);
|
|
22104
|
+
const sample = useCursorSample(id);
|
|
22105
|
+
const left = sample?.coord.left;
|
|
21406
22106
|
const updateKey = useCursorPopoverUpdateKey('SpectrumPopover', id);
|
|
21407
22107
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Spectrum_FrequencyDataBoard, {
|
|
21408
|
-
left: left,
|
|
22108
|
+
left: 'number' == typeof left ? left : -1,
|
|
21409
22109
|
updateKey: updateKey,
|
|
21410
|
-
showStationInfo:
|
|
22110
|
+
showStationInfo: signalShow && signalDisplay,
|
|
22111
|
+
cursorSample: sample
|
|
21411
22112
|
});
|
|
21412
22113
|
};
|
|
21413
22114
|
const Spectrum_CursorPopover = SpectrumCursorPopover;
|
|
@@ -21421,35 +22122,46 @@ const resolveCursorPopover = ({ id, mode, type })=>{
|
|
|
21421
22122
|
if (type === constants_ModuleType.Heatmap) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CursorPopover, {
|
|
21422
22123
|
id: id
|
|
21423
22124
|
});
|
|
21424
|
-
if (type === constants_ModuleType.Occupancy) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Occupancy_CursorPopover, {
|
|
22125
|
+
if (type === constants_ModuleType.Occupancy) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Occupancy_CursorPopover, {
|
|
22126
|
+
id: id
|
|
22127
|
+
});
|
|
21425
22128
|
return null;
|
|
21426
22129
|
};
|
|
21427
22130
|
const Cursor_COMPONENT_KEY = 'Cursor';
|
|
21428
22131
|
const CURSOR_BOUNDS_TOLERANCE = 1;
|
|
21429
22132
|
const Cursor_isPointWithinBounds = (clientX, clientY, bounds, tolerance = CURSOR_BOUNDS_TOLERANCE)=>clientX >= bounds.left - tolerance && clientX <= bounds.right + tolerance && clientY >= bounds.top - tolerance && clientY <= bounds.bottom + tolerance;
|
|
21430
|
-
const
|
|
22133
|
+
const buildCursorPointerSnapshot = (event, coord, sourceId, sourceType, cachedBounds)=>{
|
|
21431
22134
|
const target = event.currentTarget;
|
|
21432
22135
|
if (!(target instanceof HTMLElement)) return null;
|
|
21433
|
-
const bounds = resolveCursorVisibleBounds(target);
|
|
22136
|
+
const bounds = cachedBounds ?? resolveCursorVisibleBounds(target);
|
|
21434
22137
|
return {
|
|
21435
22138
|
sourceId,
|
|
21436
22139
|
sourceType,
|
|
21437
22140
|
clientX: event.clientX,
|
|
21438
22141
|
clientY: event.clientY,
|
|
22142
|
+
coord,
|
|
21439
22143
|
bounds
|
|
21440
22144
|
};
|
|
21441
22145
|
};
|
|
22146
|
+
const resolveCursorTarget = (event)=>{
|
|
22147
|
+
const target = event.currentTarget;
|
|
22148
|
+
return target instanceof HTMLElement ? target : null;
|
|
22149
|
+
};
|
|
21442
22150
|
const isSameCursorPayload = (currentCursor, nextCoord, nextEvent)=>{
|
|
21443
22151
|
const prevEvent = currentCursor.event;
|
|
21444
22152
|
return currentCursor.coord.left === nextCoord.left && currentCursor.coord.top === nextCoord.top && prevEvent?.sourceId === nextEvent?.sourceId && prevEvent?.sourceType === nextEvent?.sourceType && prevEvent?.clientX === nextEvent?.clientX && prevEvent?.clientY === nextEvent?.clientY && prevEvent?.bounds.left === nextEvent?.bounds.left && prevEvent?.bounds.top === nextEvent?.bounds.top && prevEvent?.bounds.right === nextEvent?.bounds.right && prevEvent?.bounds.bottom === nextEvent?.bounds.bottom;
|
|
21445
22153
|
};
|
|
21446
22154
|
const Cursor = ({ id, type })=>{
|
|
21447
22155
|
const { state: { cursor, globalID }, dispatch } = useStore_useStore();
|
|
21448
|
-
const { active,
|
|
22156
|
+
const { active, show, mode } = cursor;
|
|
21449
22157
|
const [isEnabled, setIsEnabled] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
|
|
21450
22158
|
const cursorRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(cursor);
|
|
21451
22159
|
const activeRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(active);
|
|
21452
22160
|
const isEnabledRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(isEnabled);
|
|
22161
|
+
const boundsRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
22162
|
+
const targetRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
22163
|
+
const xLineRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
22164
|
+
const yLineRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
21453
22165
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
21454
22166
|
cursorRef.current = cursor;
|
|
21455
22167
|
activeRef.current = active;
|
|
@@ -21459,9 +22171,16 @@ const Cursor = ({ id, type })=>{
|
|
|
21459
22171
|
active,
|
|
21460
22172
|
isEnabled
|
|
21461
22173
|
]);
|
|
21462
|
-
const clearCursorIfOwned = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>()=>{
|
|
22174
|
+
const clearCursorIfOwned = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>(reason = 'leave')=>{
|
|
21463
22175
|
setIsEnabled(false);
|
|
21464
|
-
|
|
22176
|
+
const currentPointer = interactionRuntime.getPointer(id);
|
|
22177
|
+
if (cursorRef.current.event?.sourceId !== id && currentPointer?.sourceId !== id) {
|
|
22178
|
+
isEnabledRef.current = false;
|
|
22179
|
+
boundsRef.current = null;
|
|
22180
|
+
targetRef.current = null;
|
|
22181
|
+
interactionRuntime.clearPointer(id, reason);
|
|
22182
|
+
return;
|
|
22183
|
+
}
|
|
21465
22184
|
const nextCursor = {
|
|
21466
22185
|
...cursorRef.current,
|
|
21467
22186
|
event: null,
|
|
@@ -21472,6 +22191,9 @@ const Cursor = ({ id, type })=>{
|
|
|
21472
22191
|
};
|
|
21473
22192
|
cursorRef.current = nextCursor;
|
|
21474
22193
|
isEnabledRef.current = false;
|
|
22194
|
+
boundsRef.current = null;
|
|
22195
|
+
targetRef.current = null;
|
|
22196
|
+
interactionRuntime.clearPointer(id, reason);
|
|
21475
22197
|
(0, __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__.flushSync)(()=>{
|
|
21476
22198
|
setIsEnabled(false);
|
|
21477
22199
|
dispatch({
|
|
@@ -21484,27 +22206,86 @@ const Cursor = ({ id, type })=>{
|
|
|
21484
22206
|
dispatch,
|
|
21485
22207
|
id
|
|
21486
22208
|
]);
|
|
22209
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
22210
|
+
if (show) return;
|
|
22211
|
+
setIsEnabled(false);
|
|
22212
|
+
isEnabledRef.current = false;
|
|
22213
|
+
boundsRef.current = null;
|
|
22214
|
+
targetRef.current = null;
|
|
22215
|
+
interactionRuntime.clearPointer(id, 'manual');
|
|
22216
|
+
}, [
|
|
22217
|
+
id,
|
|
22218
|
+
show
|
|
22219
|
+
]);
|
|
22220
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>()=>{
|
|
22221
|
+
interactionRuntime.dispose(id);
|
|
22222
|
+
}, [
|
|
22223
|
+
id
|
|
22224
|
+
]);
|
|
21487
22225
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
21488
22226
|
if (!globalID || !show) return;
|
|
21489
|
-
|
|
21490
|
-
|
|
21491
|
-
|
|
21492
|
-
|
|
21493
|
-
|
|
21494
|
-
|
|
21495
|
-
|
|
21496
|
-
|
|
22227
|
+
return interactionRuntime.subscribeSample(id, (sample)=>{
|
|
22228
|
+
if (!sample || sample.sourceId !== id) return;
|
|
22229
|
+
const nextEvent = toCursorSnapshotEvent(sample);
|
|
22230
|
+
if (isSameCursorPayload(cursorRef.current, sample.coord, nextEvent)) return;
|
|
22231
|
+
const nextCursor = {
|
|
22232
|
+
...cursorRef.current,
|
|
22233
|
+
event: nextEvent,
|
|
22234
|
+
coord: sample.coord
|
|
22235
|
+
};
|
|
22236
|
+
cursorRef.current = nextCursor;
|
|
21497
22237
|
dispatch({
|
|
21498
22238
|
payload: {
|
|
21499
|
-
cursor:
|
|
21500
|
-
...cursorRef.current,
|
|
21501
|
-
event: nextEvent,
|
|
21502
|
-
coord
|
|
21503
|
-
}
|
|
22239
|
+
cursor: nextCursor
|
|
21504
22240
|
}
|
|
21505
22241
|
});
|
|
21506
22242
|
if (activeRef.current) CURSOR_SETACTIVE(globalID)();
|
|
21507
22243
|
});
|
|
22244
|
+
}, [
|
|
22245
|
+
dispatch,
|
|
22246
|
+
globalID,
|
|
22247
|
+
id,
|
|
22248
|
+
show
|
|
22249
|
+
]);
|
|
22250
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
22251
|
+
if (!show || !active) return;
|
|
22252
|
+
return interactionRuntime.subscribePointer(id, (pointer)=>{
|
|
22253
|
+
const xLine = xLineRef.current;
|
|
22254
|
+
const yLine = yLineRef.current;
|
|
22255
|
+
if (!pointer || pointer.sourceId !== id) {
|
|
22256
|
+
if (xLine) xLine.style.left = '-200%';
|
|
22257
|
+
if (yLine) yLine.style.top = '-200%';
|
|
22258
|
+
return;
|
|
22259
|
+
}
|
|
22260
|
+
if (xLine) xLine.style.left = `${pointer.coord.left}%`;
|
|
22261
|
+
if (yLine) yLine.style.top = `${pointer.coord.top}%`;
|
|
22262
|
+
});
|
|
22263
|
+
}, [
|
|
22264
|
+
active,
|
|
22265
|
+
id,
|
|
22266
|
+
show
|
|
22267
|
+
]);
|
|
22268
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
22269
|
+
if (!globalID || !show) return;
|
|
22270
|
+
const unsubscribeEnter = createMouseEnterEventManager(id, Cursor_COMPONENT_KEY, ()=>{
|
|
22271
|
+
isEnabledRef.current = true;
|
|
22272
|
+
setIsEnabled(true);
|
|
22273
|
+
});
|
|
22274
|
+
const unsubscribeMove = createMoveEventManager(id, Cursor_COMPONENT_KEY, (event, coord)=>{
|
|
22275
|
+
if (!isEnabledRef.current) return;
|
|
22276
|
+
const target = resolveCursorTarget(event);
|
|
22277
|
+
if (!target) return;
|
|
22278
|
+
if (targetRef.current !== target || !boundsRef.current) {
|
|
22279
|
+
const bounds = resolveCursorVisibleBounds(target);
|
|
22280
|
+
targetRef.current = target;
|
|
22281
|
+
boundsRef.current = bounds;
|
|
22282
|
+
interactionRuntime.refreshBounds(id, bounds);
|
|
22283
|
+
}
|
|
22284
|
+
const nextPointer = buildCursorPointerSnapshot(event, coord, id, type, boundsRef.current);
|
|
22285
|
+
if (!nextPointer) return;
|
|
22286
|
+
if (!Cursor_isPointWithinBounds(nextPointer.clientX, nextPointer.clientY, nextPointer.bounds)) return void clearCursorIfOwned('bounds');
|
|
22287
|
+
interactionRuntime.updatePointer(id, nextPointer);
|
|
22288
|
+
});
|
|
21508
22289
|
const unsubscribeLeave = createMouseLeaveEventManager(id, Cursor_COMPONENT_KEY, clearCursorIfOwned);
|
|
21509
22290
|
return ()=>{
|
|
21510
22291
|
unsubscribeEnter?.();
|
|
@@ -21515,15 +22296,36 @@ const Cursor = ({ id, type })=>{
|
|
|
21515
22296
|
id,
|
|
21516
22297
|
globalID,
|
|
21517
22298
|
show,
|
|
22299
|
+
type,
|
|
21518
22300
|
clearCursorIfOwned
|
|
21519
22301
|
]);
|
|
22302
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
22303
|
+
if (!show) return;
|
|
22304
|
+
const refreshBounds = ()=>{
|
|
22305
|
+
const target = targetRef.current;
|
|
22306
|
+
if (!target) return;
|
|
22307
|
+
const bounds = resolveCursorVisibleBounds(target);
|
|
22308
|
+
boundsRef.current = bounds;
|
|
22309
|
+
interactionRuntime.refreshBounds(id, bounds);
|
|
22310
|
+
};
|
|
22311
|
+
window.addEventListener('resize', refreshBounds);
|
|
22312
|
+
window.addEventListener('scroll', refreshBounds, true);
|
|
22313
|
+
return ()=>{
|
|
22314
|
+
window.removeEventListener('resize', refreshBounds);
|
|
22315
|
+
window.removeEventListener('scroll', refreshBounds, true);
|
|
22316
|
+
};
|
|
22317
|
+
}, [
|
|
22318
|
+
id,
|
|
22319
|
+
show
|
|
22320
|
+
]);
|
|
21520
22321
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
21521
22322
|
if (!show) return;
|
|
21522
22323
|
const handleGlobalPointerMove = (event)=>{
|
|
21523
22324
|
if (!isEnabledRef.current) return;
|
|
21524
|
-
const
|
|
21525
|
-
|
|
21526
|
-
if (
|
|
22325
|
+
const currentPointer = interactionRuntime.getPointer(id);
|
|
22326
|
+
const bounds = currentPointer?.bounds ?? cursorRef.current.event?.bounds;
|
|
22327
|
+
if (!currentPointer || currentPointer.sourceId !== id || !bounds) return;
|
|
22328
|
+
if (bounds.width <= 0 || bounds.height <= 0 || !Cursor_isPointWithinBounds(event.clientX, event.clientY, bounds)) clearCursorIfOwned('bounds');
|
|
21527
22329
|
};
|
|
21528
22330
|
window.addEventListener('pointermove', handleGlobalPointerMove, true);
|
|
21529
22331
|
return ()=>{
|
|
@@ -21534,18 +22336,28 @@ const Cursor = ({ id, type })=>{
|
|
|
21534
22336
|
id,
|
|
21535
22337
|
clearCursorIfOwned
|
|
21536
22338
|
]);
|
|
21537
|
-
|
|
21538
|
-
|
|
21539
|
-
|
|
21540
|
-
|
|
21541
|
-
|
|
21542
|
-
|
|
21543
|
-
|
|
21544
|
-
|
|
21545
|
-
|
|
21546
|
-
|
|
21547
|
-
|
|
21548
|
-
|
|
22339
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
22340
|
+
if (!show) return;
|
|
22341
|
+
const handleWindowBlur = ()=>{
|
|
22342
|
+
clearCursorIfOwned('blur');
|
|
22343
|
+
};
|
|
22344
|
+
const handleDocumentVisibilityChange = ()=>{
|
|
22345
|
+
if ('hidden' === document.visibilityState) clearCursorIfOwned('visibility');
|
|
22346
|
+
};
|
|
22347
|
+
const handleDocumentMouseOut = (event)=>{
|
|
22348
|
+
if (null === event.relatedTarget) clearCursorIfOwned('mouseout');
|
|
22349
|
+
};
|
|
22350
|
+
window.addEventListener('blur', handleWindowBlur);
|
|
22351
|
+
document.addEventListener('visibilitychange', handleDocumentVisibilityChange);
|
|
22352
|
+
document.addEventListener('mouseout', handleDocumentMouseOut);
|
|
22353
|
+
return ()=>{
|
|
22354
|
+
window.removeEventListener('blur', handleWindowBlur);
|
|
22355
|
+
document.removeEventListener('visibilitychange', handleDocumentVisibilityChange);
|
|
22356
|
+
document.removeEventListener('mouseout', handleDocumentMouseOut);
|
|
22357
|
+
};
|
|
22358
|
+
}, [
|
|
22359
|
+
clearCursorIfOwned,
|
|
22360
|
+
show
|
|
21549
22361
|
]);
|
|
21550
22362
|
const popoverContent = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>resolveCursorPopover({
|
|
21551
22363
|
id,
|
|
@@ -21556,19 +22368,20 @@ const Cursor = ({ id, type })=>{
|
|
|
21556
22368
|
mode,
|
|
21557
22369
|
type
|
|
21558
22370
|
]);
|
|
21559
|
-
if (!show || !isEnabled || !active
|
|
21560
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(
|
|
22371
|
+
if (!show || !isEnabled || !active) return null;
|
|
22372
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(ZoomViewportLayer, {
|
|
21561
22373
|
className: "z-[6]",
|
|
21562
22374
|
children: [
|
|
21563
22375
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
21564
|
-
|
|
21565
|
-
|
|
22376
|
+
ref: xLineRef,
|
|
22377
|
+
className: "pointer-events-none absolute left-[-200%] top-0 h-full border-l border-dashed border-chart-highlight/80 opacity-50"
|
|
21566
22378
|
}),
|
|
21567
22379
|
type === constants_ModuleType.Heatmap && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
21568
|
-
|
|
21569
|
-
|
|
22380
|
+
ref: yLineRef,
|
|
22381
|
+
className: "absolute left-0 top-[-200%] w-full border-t border-dashed border-chart-highlight/80 opacity-50"
|
|
21570
22382
|
}),
|
|
21571
22383
|
popoverContent && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Overlay_Popover, {
|
|
22384
|
+
id: id,
|
|
21572
22385
|
children: popoverContent
|
|
21573
22386
|
}, `${mode ?? type}-${id}`)
|
|
21574
22387
|
]
|
|
@@ -21604,7 +22417,7 @@ function useEventBusCallback(id) {
|
|
|
21604
22417
|
]);
|
|
21605
22418
|
}
|
|
21606
22419
|
const EventBus_EventBus = ({ id })=>{
|
|
21607
|
-
const globalID =
|
|
22420
|
+
const globalID = useStore_useSelector((state)=>state.globalID);
|
|
21608
22421
|
const EID = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>getEID(id), [
|
|
21609
22422
|
id
|
|
21610
22423
|
]);
|
|
@@ -21769,7 +22582,7 @@ const EventBus_EventBus = ({ id })=>{
|
|
|
21769
22582
|
}, [
|
|
21770
22583
|
handleMouseLeave
|
|
21771
22584
|
]);
|
|
21772
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
22585
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
21773
22586
|
className: "z-[5] pointer-events-auto",
|
|
21774
22587
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
|
|
21775
22588
|
ref: containerRef,
|
|
@@ -21934,7 +22747,6 @@ function useZoomEvent(id, name) {
|
|
|
21934
22747
|
handleDrag
|
|
21935
22748
|
]);
|
|
21936
22749
|
}
|
|
21937
|
-
const PERCENTAGE = 100;
|
|
21938
22750
|
const tools_PRECISION = 1e4;
|
|
21939
22751
|
const defaultAreaInfoResult = {
|
|
21940
22752
|
startIndex: 0,
|
|
@@ -21953,28 +22765,27 @@ const defaultAreaInfoResult = {
|
|
|
21953
22765
|
};
|
|
21954
22766
|
function calculateAreaInfo({ endLeft, startLeft, startTop, endTop, frequencyFormat, globalID }) {
|
|
21955
22767
|
const { waterfallData } = withDatabase(globalID).getAllRawData();
|
|
21956
|
-
if (!waterfallData?.length
|
|
21957
|
-
const
|
|
21958
|
-
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
|
|
21962
|
-
|
|
21963
|
-
|
|
21964
|
-
};
|
|
22768
|
+
if (!waterfallData?.length) return defaultAreaInfoResult;
|
|
22769
|
+
const indices = resolveHeatmapGridRange(waterfallData, {
|
|
22770
|
+
endLeft,
|
|
22771
|
+
endTop,
|
|
22772
|
+
startLeft,
|
|
22773
|
+
startTop
|
|
22774
|
+
});
|
|
22775
|
+
if (!indices) return defaultAreaInfoResult;
|
|
21965
22776
|
const formatFrequency = frequencyFormat;
|
|
21966
22777
|
const frequencies = {
|
|
21967
|
-
start: Math.round(Number(formatFrequency(startLeft)) * tools_PRECISION) / tools_PRECISION,
|
|
21968
|
-
end: Math.round(Number(formatFrequency(endLeft)) * tools_PRECISION) / tools_PRECISION
|
|
22778
|
+
start: Math.round(Number(formatFrequency(Math.min(startLeft, endLeft))) * tools_PRECISION) / tools_PRECISION,
|
|
22779
|
+
end: Math.round(Number(formatFrequency(Math.max(startLeft, endLeft))) * tools_PRECISION) / tools_PRECISION
|
|
21969
22780
|
};
|
|
21970
22781
|
const bandwidth = Math.abs(frequencies.end - frequencies.start);
|
|
21971
|
-
const startTimestamp = waterfallData[indices.
|
|
21972
|
-
const endTimestamp = waterfallData[indices.
|
|
22782
|
+
const startTimestamp = waterfallData[indices.startIndex]?.timestamp || '';
|
|
22783
|
+
const endTimestamp = waterfallData[indices.endIndex]?.timestamp || '';
|
|
21973
22784
|
const result = {
|
|
21974
|
-
startIndex: indices.
|
|
21975
|
-
endIndex: indices.
|
|
21976
|
-
startCol: indices.
|
|
21977
|
-
endCol: indices.
|
|
22785
|
+
startIndex: indices.startIndex,
|
|
22786
|
+
endIndex: indices.endIndex,
|
|
22787
|
+
startCol: indices.startCol,
|
|
22788
|
+
endCol: indices.endCol,
|
|
21978
22789
|
startTimestamp,
|
|
21979
22790
|
endTimestamp,
|
|
21980
22791
|
startFrequency: frequencies.start,
|
|
@@ -21983,30 +22794,32 @@ function calculateAreaInfo({ endLeft, startLeft, startTop, endTop, frequencyForm
|
|
|
21983
22794
|
endFrequencyFormat: String(frequencies.end),
|
|
21984
22795
|
bandwidth,
|
|
21985
22796
|
bandwidthFormat: getFrequencyToFixed(bandwidth),
|
|
21986
|
-
data: waterfallData
|
|
22797
|
+
data: resolveHeatmapRangeData(waterfallData, indices)
|
|
21987
22798
|
};
|
|
21988
22799
|
return result;
|
|
21989
22800
|
}
|
|
21990
22801
|
const heatmapCaptureUpdate = (globalID, func)=>subscription_createSubscriptionManager(`heatmapCaptureUpdate-${globalID}`, '0', func, globalID);
|
|
21991
22802
|
const Area_COMPONENT_KEY = constants_ToolType.HeatmapCapture;
|
|
21992
|
-
const
|
|
21993
|
-
const { state: { heatmapCapture,
|
|
22803
|
+
const Area_Area = (props)=>{
|
|
22804
|
+
const { state: { heatmapCapture, axisX: { frequencyFormat, unit }, system, globalID } } = useStore_useStore();
|
|
21994
22805
|
const { id } = props;
|
|
21995
|
-
const { type, show,
|
|
21996
|
-
const canArea = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>type === heatmap_HeatmapCaptureType.Area && show, [
|
|
21997
|
-
type
|
|
22806
|
+
const { type, show, display, onChange } = heatmapCapture;
|
|
22807
|
+
const canArea = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>type === heatmap_HeatmapCaptureType.Area && show && display, [
|
|
22808
|
+
type,
|
|
22809
|
+
show,
|
|
22810
|
+
display
|
|
21998
22811
|
]);
|
|
21999
22812
|
const [info, setInfo] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(defaultAreaInfoResult);
|
|
22000
22813
|
const [areaStyle, setAreaStyle] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)();
|
|
22001
22814
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
22002
22815
|
if (canArea) {
|
|
22003
|
-
createMouseUpEventManager(id, Area_COMPONENT_KEY, ()=>{
|
|
22816
|
+
const cleanupMouseUp = createMouseUpEventManager(id, Area_COMPONENT_KEY, ()=>{
|
|
22004
22817
|
onChange(info);
|
|
22005
22818
|
});
|
|
22006
|
-
createMouseLeaveEventManager(id, Area_COMPONENT_KEY, ()=>{
|
|
22819
|
+
const cleanupMouseLeave = createMouseLeaveEventManager(id, Area_COMPONENT_KEY, ()=>{
|
|
22007
22820
|
onChange(info);
|
|
22008
22821
|
});
|
|
22009
|
-
createDragEventManager(id, Area_COMPONENT_KEY, (start, end)=>{
|
|
22822
|
+
const cleanupDrag = createDragEventManager(id, Area_COMPONENT_KEY, (start, end)=>{
|
|
22010
22823
|
if (compareEventPriority(id, Area_COMPONENT_KEY) && start && end) {
|
|
22011
22824
|
const { left: startLeft, top: startTop } = start;
|
|
22012
22825
|
const { left: endLeft, top: endTop } = end;
|
|
@@ -22037,16 +22850,19 @@ const Area = (props)=>{
|
|
|
22037
22850
|
}));
|
|
22038
22851
|
}
|
|
22039
22852
|
});
|
|
22853
|
+
return ()=>{
|
|
22854
|
+
cleanupMouseUp?.();
|
|
22855
|
+
cleanupMouseLeave?.();
|
|
22856
|
+
cleanupDrag?.();
|
|
22857
|
+
};
|
|
22040
22858
|
}
|
|
22041
22859
|
}, [
|
|
22042
22860
|
id,
|
|
22043
22861
|
canArea,
|
|
22044
|
-
sync,
|
|
22045
|
-
areaStyle,
|
|
22046
22862
|
info,
|
|
22047
|
-
segments,
|
|
22048
22863
|
frequencyFormat,
|
|
22049
|
-
globalID
|
|
22864
|
+
globalID,
|
|
22865
|
+
onChange
|
|
22050
22866
|
]);
|
|
22051
22867
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
22052
22868
|
if (!canArea) {
|
|
@@ -22113,7 +22929,7 @@ const Area = (props)=>{
|
|
|
22113
22929
|
})
|
|
22114
22930
|
})
|
|
22115
22931
|
}),
|
|
22116
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
22932
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
22117
22933
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
22118
22934
|
style: {
|
|
22119
22935
|
left: `${areaStyle?.left}%`,
|
|
@@ -22127,13 +22943,15 @@ const Area = (props)=>{
|
|
|
22127
22943
|
]
|
|
22128
22944
|
});
|
|
22129
22945
|
};
|
|
22130
|
-
const
|
|
22946
|
+
const Area = Area_Area;
|
|
22131
22947
|
const RowIndex_COMPONENT_KEY = constants_ToolType.HeatmapCapture;
|
|
22132
22948
|
const RowIndex_RowIndex = ({ id })=>{
|
|
22133
22949
|
const { state: { heatmapCapture, globalID, publish } } = useStore_useStore();
|
|
22134
22950
|
const { onChange: onRowIndexChange, show, type, display } = heatmapCapture;
|
|
22135
|
-
const canRowindex = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>type === heatmap_HeatmapCaptureType.RowIndex, [
|
|
22136
|
-
type
|
|
22951
|
+
const canRowindex = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>type === heatmap_HeatmapCaptureType.RowIndex && show && display, [
|
|
22952
|
+
type,
|
|
22953
|
+
show,
|
|
22954
|
+
display
|
|
22137
22955
|
]);
|
|
22138
22956
|
const [info, setInfo] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(null);
|
|
22139
22957
|
const [currentPosition, setCurrentPosition] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(null);
|
|
@@ -22162,7 +22980,7 @@ const RowIndex_RowIndex = ({ id })=>{
|
|
|
22162
22980
|
publish
|
|
22163
22981
|
]);
|
|
22164
22982
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
22165
|
-
const isInteractive = globalID &&
|
|
22983
|
+
const isInteractive = globalID && canRowindex;
|
|
22166
22984
|
if (!isInteractive) return;
|
|
22167
22985
|
const handleMouseDown = ()=>{
|
|
22168
22986
|
setIsDragging(true);
|
|
@@ -22188,12 +23006,10 @@ const RowIndex_RowIndex = ({ id })=>{
|
|
|
22188
23006
|
}, [
|
|
22189
23007
|
id,
|
|
22190
23008
|
globalID,
|
|
22191
|
-
show,
|
|
22192
23009
|
canRowindex,
|
|
22193
|
-
display,
|
|
22194
23010
|
updateRowData
|
|
22195
23011
|
]);
|
|
22196
|
-
if (!canRowindex
|
|
23012
|
+
if (!canRowindex) return null;
|
|
22197
23013
|
const getMaskPosition = ()=>{
|
|
22198
23014
|
if (!currentPosition) return {};
|
|
22199
23015
|
const topPosition = currentPosition.top;
|
|
@@ -22811,7 +23627,7 @@ const DragSelectBox = ({ enabled, defaultRect, minSize = 0, minWidth, minHeight,
|
|
|
22811
23627
|
const middleInsetX = displayRectBox ? Math.max(0, Math.min(6, displayRectBox.width / 4)) : 6;
|
|
22812
23628
|
const middleInsetY = displayRectBox ? Math.max(0, Math.min(6, displayRectBox.height / 4)) : 6;
|
|
22813
23629
|
if (!enabled) return null;
|
|
22814
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(
|
|
23630
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(ZoomViewportLayer, {
|
|
22815
23631
|
className: cn_cn('left-0 top-0 h-full w-full overflow-hidden', className),
|
|
22816
23632
|
ref: containerRef,
|
|
22817
23633
|
style: {
|
|
@@ -22973,16 +23789,18 @@ const Slider = ({ id })=>{
|
|
|
22973
23789
|
const [heatmapData, len] = getHeatmapData();
|
|
22974
23790
|
if (len <= 0) return null;
|
|
22975
23791
|
const { position: pos, height: h, leftPosition: left, width: w } = r;
|
|
22976
|
-
const
|
|
22977
|
-
const
|
|
23792
|
+
const gridInfo = resolveHeatmapGridInfo(heatmapData);
|
|
23793
|
+
const rowRange = resolveHeatmapRowRange(pos + h, pos, len);
|
|
23794
|
+
if (!rowRange) return null;
|
|
23795
|
+
const { startIndex, endIndex } = rowRange;
|
|
22978
23796
|
const startTimestamp = heatmapData[startIndex]?.timestamp ?? '';
|
|
22979
23797
|
const endTimestamp = heatmapData[endIndex]?.timestamp ?? '';
|
|
22980
23798
|
const startTs = dateTimeToTimestamp(startTimestamp);
|
|
22981
23799
|
const endTs = dateTimeToTimestamp(endTimestamp);
|
|
22982
23800
|
const duration = startTs > 0 && endTs > 0 ? Math.abs(endTs - startTs) : 0;
|
|
22983
|
-
const
|
|
22984
|
-
|
|
22985
|
-
const
|
|
23801
|
+
const columnRange = resolveHeatmapColumnRange(left, left + w, gridInfo.columnCount);
|
|
23802
|
+
if (!columnRange) return null;
|
|
23803
|
+
const { startCol, endCol } = columnRange;
|
|
22986
23804
|
const formatFn = frequencyFormatRef.current;
|
|
22987
23805
|
const startFreqStr = formatFn?.(left);
|
|
22988
23806
|
const endFreqStr = formatFn?.(left + w);
|
|
@@ -23054,7 +23872,7 @@ const Slider = ({ id })=>{
|
|
|
23054
23872
|
const applyInterval = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((newInterval)=>{
|
|
23055
23873
|
const { startIndex, endIndex, startFrequency, endFrequency } = newInterval;
|
|
23056
23874
|
const [_, len] = getHeatmapData();
|
|
23057
|
-
const rowChanged = !(startIndex === info?.startIndex && endIndex === info?.endIndex) && len > 0 && startIndex >= 0 && endIndex
|
|
23875
|
+
const rowChanged = !(startIndex === info?.startIndex && endIndex === info?.endIndex) && len > 0 && startIndex >= 0 && endIndex < len && endIndex - startIndex >= Math.ceil(MIN_SIZE * len / 100);
|
|
23058
23876
|
let freqChanged = false;
|
|
23059
23877
|
let newLeftPosition = currentRect.leftPosition;
|
|
23060
23878
|
let newWidth = currentRect.width;
|
|
@@ -23164,7 +23982,7 @@ const HeatmapCapture = (props)=>{
|
|
|
23164
23982
|
...props
|
|
23165
23983
|
}) : type === heatmap_HeatmapCaptureType.RowIndex ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(RowIndex, {
|
|
23166
23984
|
...props
|
|
23167
|
-
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
23985
|
+
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Area, {
|
|
23168
23986
|
...props
|
|
23169
23987
|
});
|
|
23170
23988
|
};
|
|
@@ -23819,7 +24637,7 @@ const IQChart = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_r
|
|
|
23819
24637
|
const IQ_IQ = withChartPublisher(IQChart, 'IQ');
|
|
23820
24638
|
const IQ = IQ_IQ;
|
|
23821
24639
|
const Reset_modes = Object.values(constants_ModuleType);
|
|
23822
|
-
const
|
|
24640
|
+
const Reset_Reset = ()=>{
|
|
23823
24641
|
const { state: { globalID, publish } } = useStore_useStore();
|
|
23824
24642
|
const handleReset = ()=>{
|
|
23825
24643
|
publish?.({
|
|
@@ -23846,7 +24664,7 @@ const Reset = ()=>{
|
|
|
23846
24664
|
})
|
|
23847
24665
|
});
|
|
23848
24666
|
};
|
|
23849
|
-
const
|
|
24667
|
+
const Reset = Reset_Reset;
|
|
23850
24668
|
const SegmentsDisplayControl_SegmentsDisplayControl = ()=>{
|
|
23851
24669
|
const { state: { segments, globalID } } = useStore_useStore();
|
|
23852
24670
|
const [display, setDisplay] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([]);
|
|
@@ -24375,7 +25193,7 @@ const FluorescenceSwitch = ()=>{
|
|
|
24375
25193
|
tone: "primary",
|
|
24376
25194
|
onClick: toggleDisplay,
|
|
24377
25195
|
title: title,
|
|
24378
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
25196
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToolbarGlyph, {
|
|
24379
25197
|
opticalOffsetY: iconOpticalOffsetY,
|
|
24380
25198
|
opticalScale: iconOpticalScale,
|
|
24381
25199
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Icon, {})
|
|
@@ -24387,7 +25205,7 @@ const FluorescenceSwitch = ()=>{
|
|
|
24387
25205
|
tone: "primary",
|
|
24388
25206
|
onClick: toggleDisplay,
|
|
24389
25207
|
title: title,
|
|
24390
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
25208
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ToolbarGlyph, {
|
|
24391
25209
|
opticalOffsetY: iconOpticalOffsetY,
|
|
24392
25210
|
opticalScale: iconOpticalScale,
|
|
24393
25211
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Icon, {})
|
|
@@ -24399,10 +25217,50 @@ const FluorescenceSwitch = ()=>{
|
|
|
24399
25217
|
});
|
|
24400
25218
|
};
|
|
24401
25219
|
const Fluorescence_Switch = FluorescenceSwitch;
|
|
25220
|
+
const DeltaMeasurementIcon_DeltaMeasurementIcon = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
|
|
25221
|
+
viewBox: "0 0 1024 1024",
|
|
25222
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25223
|
+
width: "24",
|
|
25224
|
+
height: "24",
|
|
25225
|
+
style: {
|
|
25226
|
+
transition: 'transform 0.2s ease'
|
|
25227
|
+
},
|
|
25228
|
+
children: [
|
|
25229
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
25230
|
+
d: "M512 200 L812 824 L212 824 Z",
|
|
25231
|
+
fill: "none",
|
|
25232
|
+
stroke: "currentColor",
|
|
25233
|
+
strokeWidth: "60",
|
|
25234
|
+
strokeLinejoin: "miter"
|
|
25235
|
+
}),
|
|
25236
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
|
|
25237
|
+
x1: "350",
|
|
25238
|
+
y1: "650",
|
|
25239
|
+
x2: "674",
|
|
25240
|
+
y2: "650",
|
|
25241
|
+
stroke: "currentColor",
|
|
25242
|
+
strokeWidth: "40",
|
|
25243
|
+
strokeDasharray: "10,10"
|
|
25244
|
+
}),
|
|
25245
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
25246
|
+
d: "M 360 650 L 390 630 L 390 670 Z",
|
|
25247
|
+
fill: "currentColor"
|
|
25248
|
+
}),
|
|
25249
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
25250
|
+
d: "M 664 650 L 634 630 L 634 670 Z",
|
|
25251
|
+
fill: "currentColor"
|
|
25252
|
+
})
|
|
25253
|
+
]
|
|
25254
|
+
});
|
|
25255
|
+
const DeltaMeasurementIcon = DeltaMeasurementIcon_DeltaMeasurementIcon;
|
|
24402
25256
|
const Switch_Switch = ()=>{
|
|
24403
25257
|
const { state: { heatmapCapture }, dispatch } = useStore_useStore();
|
|
24404
|
-
const { show, display, type } = heatmapCapture;
|
|
24405
|
-
const { title,
|
|
25258
|
+
const { show, display, type, toolbarVariant } = heatmapCapture;
|
|
25259
|
+
const { title, icon } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
25260
|
+
if ('deltaMeasurement' === toolbarVariant) return {
|
|
25261
|
+
title: display ? "\u9000\u51FA\u0394\u6D4B\u91CF\u6A21\u5F0F" : "\u8FDB\u5165\u0394\u6D4B\u91CF\u6A21\u5F0F",
|
|
25262
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DeltaMeasurementIcon, {})
|
|
25263
|
+
};
|
|
24406
25264
|
let title = "\u7011\u5E03\u56FE\u6355\u83B7-\u533A\u57DF\u6D4B\u91CF";
|
|
24407
25265
|
let svg = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
24408
25266
|
children: [
|
|
@@ -24449,11 +25307,16 @@ const Switch_Switch = ()=>{
|
|
|
24449
25307
|
}
|
|
24450
25308
|
return {
|
|
24451
25309
|
title,
|
|
24452
|
-
svg
|
|
25310
|
+
icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("svg", {
|
|
25311
|
+
viewBox: "0 0 1024 1024",
|
|
25312
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25313
|
+
children: svg
|
|
25314
|
+
})
|
|
24453
25315
|
};
|
|
24454
25316
|
}, [
|
|
24455
25317
|
type,
|
|
24456
|
-
display
|
|
25318
|
+
display,
|
|
25319
|
+
toolbarVariant
|
|
24457
25320
|
]);
|
|
24458
25321
|
const setActive = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
24459
25322
|
dispatch({
|
|
@@ -24475,11 +25338,7 @@ const Switch_Switch = ()=>{
|
|
|
24475
25338
|
setActive(!display);
|
|
24476
25339
|
},
|
|
24477
25340
|
title: title,
|
|
24478
|
-
children:
|
|
24479
|
-
viewBox: "0 0 1024 1024",
|
|
24480
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
24481
|
-
children: svg
|
|
24482
|
-
})
|
|
25341
|
+
children: icon
|
|
24483
25342
|
});
|
|
24484
25343
|
};
|
|
24485
25344
|
const Capture_Switch = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(Switch_Switch);
|
|
@@ -24529,50 +25388,13 @@ const DeltaMeasurementSwitch = ()=>{
|
|
|
24529
25388
|
deltaMeasurement,
|
|
24530
25389
|
dispatch
|
|
24531
25390
|
]);
|
|
24532
|
-
const DeltaIcon = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("svg", {
|
|
24533
|
-
viewBox: "0 0 1024 1024",
|
|
24534
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
24535
|
-
width: "24",
|
|
24536
|
-
height: "24",
|
|
24537
|
-
style: {
|
|
24538
|
-
transition: 'transform 0.2s ease'
|
|
24539
|
-
},
|
|
24540
|
-
children: [
|
|
24541
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
24542
|
-
d: "M512 200 L812 824 L212 824 Z",
|
|
24543
|
-
fill: "none",
|
|
24544
|
-
stroke: "currentColor",
|
|
24545
|
-
strokeWidth: "60",
|
|
24546
|
-
strokeLinejoin: "miter"
|
|
24547
|
-
}),
|
|
24548
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("line", {
|
|
24549
|
-
x1: "350",
|
|
24550
|
-
y1: "650",
|
|
24551
|
-
x2: "674",
|
|
24552
|
-
y2: "650",
|
|
24553
|
-
stroke: "currentColor",
|
|
24554
|
-
strokeWidth: "40",
|
|
24555
|
-
strokeDasharray: "10,10"
|
|
24556
|
-
}),
|
|
24557
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
24558
|
-
d: "M 360 650 L 390 630 L 390 670 Z",
|
|
24559
|
-
fill: "currentColor"
|
|
24560
|
-
}),
|
|
24561
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("path", {
|
|
24562
|
-
d: "M 664 650 L 634 630 L 634 670 Z",
|
|
24563
|
-
fill: "currentColor"
|
|
24564
|
-
})
|
|
24565
|
-
]
|
|
24566
|
-
}), [
|
|
24567
|
-
display
|
|
24568
|
-
]);
|
|
24569
25391
|
if (!show) return null;
|
|
24570
25392
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(primitives_IconBox, {
|
|
24571
25393
|
active: display,
|
|
24572
25394
|
tone: "primary",
|
|
24573
25395
|
onClick: ()=>setDisplay(!display),
|
|
24574
25396
|
title: display ? "\u9000\u51FA\u0394\u6D4B\u91CF\u6A21\u5F0F" : "\u8FDB\u5165\u0394\u6D4B\u91CF\u6A21\u5F0F",
|
|
24575
|
-
children:
|
|
25397
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DeltaMeasurementIcon, {})
|
|
24576
25398
|
});
|
|
24577
25399
|
};
|
|
24578
25400
|
const DeltaMeasurement_Switch = DeltaMeasurementSwitch;
|
|
@@ -25070,7 +25892,7 @@ const TOOLBAR_ITEM_CONFIGS = [
|
|
|
25070
25892
|
]
|
|
25071
25893
|
},
|
|
25072
25894
|
{
|
|
25073
|
-
component:
|
|
25895
|
+
component: Reset,
|
|
25074
25896
|
toolType: constants_ToolbarItemType.Reset,
|
|
25075
25897
|
supportedCharts: [],
|
|
25076
25898
|
excludedCharts: [
|
|
@@ -25199,9 +26021,9 @@ const resolveToolbarItemProps = (config, chartType)=>{
|
|
|
25199
26021
|
};
|
|
25200
26022
|
return config.props;
|
|
25201
26023
|
};
|
|
25202
|
-
const
|
|
25203
|
-
const show =
|
|
25204
|
-
const hiddenTools =
|
|
26024
|
+
const Toolbar_Toolbar = ({ type })=>{
|
|
26025
|
+
const show = useStore_useSelector((state)=>state.toolbar.show);
|
|
26026
|
+
const hiddenTools = useStore_useSelector((state)=>state.toolbar.hiddenTools ?? []);
|
|
25205
26027
|
const { width, pluginBoxWidth } = useAxisYWidth_useAxisYWidth();
|
|
25206
26028
|
const axisStyle = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
25207
26029
|
marginLeft: width,
|
|
@@ -25231,7 +26053,7 @@ const Toolbar = ({ type })=>{
|
|
|
25231
26053
|
})
|
|
25232
26054
|
});
|
|
25233
26055
|
};
|
|
25234
|
-
const
|
|
26056
|
+
const Toolbar = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(Toolbar_Toolbar);
|
|
25235
26057
|
function useLevelStreamAnalyzer() {
|
|
25236
26058
|
const { state: { globalID, axisY, levelStream } } = useStore_useStore();
|
|
25237
26059
|
const range = axisY.range ?? constants_RANGE_DEFAULT;
|
|
@@ -25395,7 +26217,7 @@ const MINOR_TICK_LINE_WIDTH = LINE_WIDTH_BASE;
|
|
|
25395
26217
|
const AXIS_LINE_WIDTH = LINE_WIDTH_BASE;
|
|
25396
26218
|
function useCanvasAxisY(options) {
|
|
25397
26219
|
const { ranging } = options;
|
|
25398
|
-
const axisY =
|
|
26220
|
+
const axisY = useStore_useSelector((state)=>state.axisY);
|
|
25399
26221
|
const { range: axisYRange, disabled } = axisY;
|
|
25400
26222
|
const canvasRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
25401
26223
|
const containerRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
@@ -25978,7 +26800,7 @@ const DragFrame = ({ id })=>{
|
|
|
25978
26800
|
id
|
|
25979
26801
|
]);
|
|
25980
26802
|
if (!zoom.show) return null;
|
|
25981
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
26803
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
25982
26804
|
className: "z-[3]",
|
|
25983
26805
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
25984
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",
|
|
@@ -26006,6 +26828,17 @@ const DragFrame = ({ id })=>{
|
|
|
26006
26828
|
});
|
|
26007
26829
|
};
|
|
26008
26830
|
const Spectrum_DragFrame = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(DragFrame);
|
|
26831
|
+
const FREQUENCY_ALLOCATION_LANE_HEIGHT = 14;
|
|
26832
|
+
const FREQUENCY_ALLOCATION_COMPACT_LANE_HEIGHT = 5;
|
|
26833
|
+
const FREQUENCY_ALLOCATION_COMPACT_THRESHOLD = 4;
|
|
26834
|
+
const resolveFrequencyAllocationDensity = ({ density = 'auto', channelCount })=>{
|
|
26835
|
+
const compact = 'compact' === density || 'auto' === density && channelCount > FREQUENCY_ALLOCATION_COMPACT_THRESHOLD;
|
|
26836
|
+
return {
|
|
26837
|
+
compact,
|
|
26838
|
+
laneHeight: compact ? FREQUENCY_ALLOCATION_COMPACT_LANE_HEIGHT : FREQUENCY_ALLOCATION_LANE_HEIGHT,
|
|
26839
|
+
showLabels: !compact
|
|
26840
|
+
};
|
|
26841
|
+
};
|
|
26009
26842
|
const originalColors = [
|
|
26010
26843
|
'#B22222',
|
|
26011
26844
|
'#CD5C5C',
|
|
@@ -26577,19 +27410,65 @@ const FrequencyAllocation_data = [
|
|
|
26577
27410
|
}
|
|
26578
27411
|
];
|
|
26579
27412
|
const STORAGE_KEY = 'rfkit-charts-frequency-allocation';
|
|
26580
|
-
const
|
|
27413
|
+
const isFrequencyAllocationChannelCache = (data)=>{
|
|
27414
|
+
if (!data || 'object' != typeof data) return false;
|
|
27415
|
+
const cache = data;
|
|
27416
|
+
return 2 === cache.version && Array.isArray(cache.channels);
|
|
27417
|
+
};
|
|
27418
|
+
const readFrequencyAllocationCache = ()=>{
|
|
26581
27419
|
const cached = localStorage.getItem(STORAGE_KEY);
|
|
26582
27420
|
if (!cached) return null;
|
|
26583
27421
|
const data = JSON.parse(cached);
|
|
26584
|
-
|
|
27422
|
+
if (Array.isArray(data)) return data;
|
|
27423
|
+
if (isFrequencyAllocationChannelCache(data)) return data;
|
|
27424
|
+
return null;
|
|
27425
|
+
};
|
|
27426
|
+
const getFrequencyAllocationFromCache = ()=>{
|
|
27427
|
+
const cache = readFrequencyAllocationCache();
|
|
27428
|
+
return Array.isArray(cache) ? cache : null;
|
|
27429
|
+
};
|
|
27430
|
+
const getFrequencyAllocationChannelsFromCache = ()=>{
|
|
27431
|
+
const cache = readFrequencyAllocationCache();
|
|
27432
|
+
return isFrequencyAllocationChannelCache(cache) ? cache.channels : null;
|
|
26585
27433
|
};
|
|
26586
27434
|
const setFrequencyAllocationToCache = (data)=>{
|
|
26587
27435
|
localStorage.setItem(STORAGE_KEY, JSON.stringify(data));
|
|
26588
27436
|
};
|
|
26589
|
-
|
|
26590
|
-
|
|
27437
|
+
const setFrequencyAllocationChannelsToCache = (channels)=>{
|
|
27438
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify({
|
|
27439
|
+
version: 2,
|
|
27440
|
+
channels
|
|
27441
|
+
}));
|
|
27442
|
+
};
|
|
27443
|
+
const DEFAULT_FREQUENCY_ALLOCATION_CHANNEL_ID = 'default';
|
|
27444
|
+
const resolveChannelId = (channel, index)=>channel.id || channel.title || `${DEFAULT_FREQUENCY_ALLOCATION_CHANNEL_ID}-${index}`;
|
|
27445
|
+
const normalizeChannels = (channels, normalizeData)=>channels.map((channel, index)=>({
|
|
27446
|
+
id: resolveChannelId(channel, index),
|
|
27447
|
+
title: channel.title,
|
|
27448
|
+
data: normalizeData(channel.data ?? [])
|
|
27449
|
+
})).filter((channel)=>channel.data.length > 0);
|
|
27450
|
+
const normalizeSingleChannel = (data, normalizeData)=>[
|
|
27451
|
+
{
|
|
27452
|
+
id: DEFAULT_FREQUENCY_ALLOCATION_CHANNEL_ID,
|
|
27453
|
+
data: normalizeData(data)
|
|
27454
|
+
}
|
|
27455
|
+
];
|
|
27456
|
+
function resolveFrequencyAllocationChannelModel({ data, channels, cachedData, cachedChannels, presetData, normalizeData }) {
|
|
27457
|
+
if (channels) return channels.length ? normalizeChannels(channels, normalizeData) : normalizeSingleChannel(data?.length ? data : presetData, normalizeData);
|
|
27458
|
+
if (cachedChannels?.length) return normalizeChannels(cachedChannels, normalizeData);
|
|
26591
27459
|
const inputData = data ?? [];
|
|
26592
|
-
|
|
27460
|
+
const fallbackData = cachedData && cachedData.length > 0 ? cachedData : inputData.length > 0 ? inputData : presetData;
|
|
27461
|
+
return normalizeSingleChannel(fallbackData, normalizeData);
|
|
27462
|
+
}
|
|
27463
|
+
function resolveFrequencyAllocationChannels({ data, channels }) {
|
|
27464
|
+
return resolveFrequencyAllocationChannelModel({
|
|
27465
|
+
data,
|
|
27466
|
+
channels,
|
|
27467
|
+
cachedData: getFrequencyAllocationFromCache(),
|
|
27468
|
+
cachedChannels: getFrequencyAllocationChannelsFromCache(),
|
|
27469
|
+
presetData: FrequencyAllocation_data,
|
|
27470
|
+
normalizeData: sortAndRecolorFrequencyAllocationData
|
|
27471
|
+
});
|
|
26593
27472
|
}
|
|
26594
27473
|
const resolveFrequencyAllocationRange = (band)=>{
|
|
26595
27474
|
if (null != band.startFrequency && null != band.stopFrequency) {
|
|
@@ -26605,7 +27484,7 @@ const resolveFrequencyAllocationRange = (band)=>{
|
|
|
26605
27484
|
}
|
|
26606
27485
|
return null;
|
|
26607
27486
|
};
|
|
26608
|
-
const resolveFrequencyAllocationSegments = ({ segments, allocations })=>{
|
|
27487
|
+
const resolveFrequencyAllocationSegments = ({ segments, allocations, channelIndex, channelTitle })=>{
|
|
26609
27488
|
if (!segments.length || !allocations.length) return [];
|
|
26610
27489
|
const totalSegmentPoints = segments.reduce((sum, segment)=>sum + segment.point, 0);
|
|
26611
27490
|
return segments.map((segment, segmentIndex)=>{
|
|
@@ -26619,6 +27498,8 @@ const resolveFrequencyAllocationSegments = ({ segments, allocations })=>{
|
|
|
26619
27498
|
return {
|
|
26620
27499
|
band,
|
|
26621
27500
|
range,
|
|
27501
|
+
channelIndex: channelIndex ?? 0,
|
|
27502
|
+
channelTitle,
|
|
26622
27503
|
position: {
|
|
26623
27504
|
left: `${left}%`,
|
|
26624
27505
|
width: `${width}%`
|
|
@@ -26638,15 +27519,30 @@ const resolveFrequencyAllocationSegments = ({ segments, allocations })=>{
|
|
|
26638
27519
|
};
|
|
26639
27520
|
});
|
|
26640
27521
|
};
|
|
26641
|
-
|
|
26642
|
-
|
|
26643
|
-
|
|
26644
|
-
|
|
27522
|
+
const resolveFrequencyAllocationLanes = ({ segments, channels })=>channels.map((channel, channelIndex)=>({
|
|
27523
|
+
channel,
|
|
27524
|
+
channelIndex,
|
|
27525
|
+
segmentData: resolveFrequencyAllocationSegments({
|
|
27526
|
+
segments,
|
|
27527
|
+
allocations: channel.data,
|
|
27528
|
+
channelIndex,
|
|
27529
|
+
channelTitle: channel.title
|
|
27530
|
+
})
|
|
27531
|
+
})).filter((lane)=>lane.segmentData.some((segment)=>segment.bandPositions.length > 0));
|
|
27532
|
+
function useFrequencyAllocationChannels() {
|
|
27533
|
+
const data = useStore_useSelector((state)=>state.frequencyAllocation.data);
|
|
27534
|
+
const channels = useStore_useSelector((state)=>state.frequencyAllocation.channels);
|
|
27535
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>resolveFrequencyAllocationChannels({
|
|
27536
|
+
data,
|
|
27537
|
+
channels
|
|
27538
|
+
}), [
|
|
27539
|
+
data,
|
|
27540
|
+
channels
|
|
26645
27541
|
]);
|
|
26646
27542
|
}
|
|
26647
27543
|
const AllocationInfo_AllocationInfo = ({ allocationInfo, variant = 'default' })=>{
|
|
26648
27544
|
if (!allocationInfo) return null;
|
|
26649
|
-
const { title, description, startFrequency, stopFrequency, centerFrequency, stepFrequency, bandwidth, modulation } = allocationInfo;
|
|
27545
|
+
const { title, description, startFrequency, stopFrequency, centerFrequency, stepFrequency, bandwidth, modulation, channelTitle } = allocationInfo;
|
|
26650
27546
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
26651
27547
|
className: cn_cn('text-xs leading-5 text-popover-foreground', 'board' === variant && 'mt-[calc(var(--size-gap-base)/2)] border-t border-dashed border-border pt-[calc(var(--size-gap-base)/2)]'),
|
|
26652
27548
|
children: [
|
|
@@ -26657,6 +27553,12 @@ const AllocationInfo_AllocationInfo = ({ allocationInfo, variant = 'default' })=
|
|
|
26657
27553
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
26658
27554
|
className: "mb-1 text-primary",
|
|
26659
27555
|
children: [
|
|
27556
|
+
channelTitle ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
27557
|
+
children: [
|
|
27558
|
+
"\u901A\u9053\uFF1A",
|
|
27559
|
+
channelTitle
|
|
27560
|
+
]
|
|
27561
|
+
}) : null,
|
|
26660
27562
|
startFrequency && stopFrequency && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
26661
27563
|
children: [
|
|
26662
27564
|
"\u9891\u7387\u8303\u56F4\uFF1A",
|
|
@@ -26702,57 +27604,91 @@ const AllocationInfo_AllocationInfo = ({ allocationInfo, variant = 'default' })=
|
|
|
26702
27604
|
});
|
|
26703
27605
|
};
|
|
26704
27606
|
const AllocationInfo = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(AllocationInfo_AllocationInfo);
|
|
26705
|
-
const
|
|
27607
|
+
const AllocationSegments = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(({ style, bandPositions, showLabels, onMouseEnter, onMouseMove, onMouseLeave })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
26706
27608
|
className: "absolute top-0 h-full [contain:layout]",
|
|
26707
27609
|
style: style,
|
|
26708
|
-
children: bandPositions.map((
|
|
27610
|
+
children: bandPositions.map((bandPosition)=>{
|
|
27611
|
+
const { band, channelIndex, range, position } = bandPosition;
|
|
26709
27612
|
const backgroundStyle = band.gradientColors ? {
|
|
26710
27613
|
backgroundImage: `linear-gradient(to right, ${band.gradientColors[0]}, ${band.gradientColors[1]})`
|
|
26711
27614
|
} : {
|
|
26712
27615
|
backgroundColor: band.color || 'var(--primary)'
|
|
26713
27616
|
};
|
|
26714
27617
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
26715
|
-
className: "pointer-events-auto absolute flex h-full items-center justify-center overflow-hidden px-1 text-xs text-foreground/90 opacity-
|
|
27618
|
+
className: "pointer-events-auto absolute flex h-full items-center justify-center overflow-hidden px-1 text-xs text-foreground/90 opacity-60 backdrop-blur-sm transition-[opacity,box-shadow] duration-200 hover:z-[1] hover:opacity-100 hover:shadow-lg",
|
|
26716
27619
|
style: {
|
|
26717
27620
|
...backgroundStyle,
|
|
26718
27621
|
left: position.left,
|
|
26719
27622
|
width: position.width
|
|
26720
27623
|
},
|
|
26721
|
-
onMouseEnter: onMouseEnter(
|
|
27624
|
+
onMouseEnter: onMouseEnter(bandPosition),
|
|
26722
27625
|
onMouseMove: onMouseMove,
|
|
26723
27626
|
onMouseLeave: onMouseLeave,
|
|
26724
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
27627
|
+
children: showLabels ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
|
|
26725
27628
|
className: "truncate",
|
|
26726
27629
|
children: band.title
|
|
26727
|
-
})
|
|
26728
|
-
}, `band-${band.title}-${range.start}-${range.stop}-${position.left}`);
|
|
27630
|
+
}) : null
|
|
27631
|
+
}, `band-${channelIndex ?? 0}-${band.title}-${range.start}-${range.stop}-${position.left}`);
|
|
26729
27632
|
})
|
|
26730
27633
|
}));
|
|
26731
|
-
const
|
|
26732
|
-
const overlays_Tooltip_Tooltip = ({ title, description, visible, x, y, startFrequency, stopFrequency, centerFrequency, stepFrequency, bandwidth, modulation })=>{
|
|
27634
|
+
const presenters_AllocationSegments = AllocationSegments;
|
|
27635
|
+
const overlays_Tooltip_Tooltip = ({ title, description, visible, x, y, startFrequency, stopFrequency, centerFrequency, stepFrequency, bandwidth, modulation, channelTitle, positionRef, scheduleRef })=>{
|
|
26733
27636
|
const tooltipRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
26734
|
-
const
|
|
27637
|
+
const frameRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
27638
|
+
const updatePosition = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
27639
|
+
if (!visible || !tooltipRef.current) return;
|
|
27640
|
+
const viewportPadding = 12;
|
|
27641
|
+
const tooltip = tooltipRef.current;
|
|
27642
|
+
const tooltipWidth = tooltip.offsetWidth;
|
|
27643
|
+
const tooltipHeight = tooltip.offsetHeight;
|
|
27644
|
+
const windowWidth = window.innerWidth;
|
|
27645
|
+
const windowHeight = window.innerHeight;
|
|
27646
|
+
const sourcePosition = positionRef.current ?? {
|
|
27647
|
+
x,
|
|
27648
|
+
y
|
|
27649
|
+
};
|
|
27650
|
+
const sourceX = sourcePosition.x;
|
|
27651
|
+
const sourceY = sourcePosition.y;
|
|
27652
|
+
const nextX = sourceX + tooltipWidth > windowWidth - viewportPadding ? sourceX - tooltipWidth - 10 : sourceX;
|
|
27653
|
+
const nextY = sourceY + tooltipHeight > windowHeight - viewportPadding ? sourceY - tooltipHeight - 10 : sourceY;
|
|
27654
|
+
const clampedX = Math.max(viewportPadding, Math.min(nextX, windowWidth - tooltipWidth - viewportPadding));
|
|
27655
|
+
const clampedY = Math.max(viewportPadding, Math.min(nextY, windowHeight - tooltipHeight - viewportPadding));
|
|
27656
|
+
tooltip.style.transform = `translate3d(${clampedX}px, ${clampedY}px, 0)`;
|
|
27657
|
+
}, [
|
|
27658
|
+
positionRef,
|
|
27659
|
+
visible,
|
|
26735
27660
|
x,
|
|
26736
27661
|
y
|
|
26737
|
-
|
|
27662
|
+
]);
|
|
27663
|
+
const schedulePositionUpdate = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
27664
|
+
if (!visible || null !== frameRef.current) return;
|
|
27665
|
+
frameRef.current = requestAnimationFrame(()=>{
|
|
27666
|
+
frameRef.current = null;
|
|
27667
|
+
updatePosition();
|
|
27668
|
+
});
|
|
27669
|
+
}, [
|
|
27670
|
+
updatePosition,
|
|
27671
|
+
visible
|
|
27672
|
+
]);
|
|
26738
27673
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
26739
|
-
|
|
26740
|
-
|
|
26741
|
-
|
|
26742
|
-
|
|
26743
|
-
const tooltipHeight = tooltip.offsetHeight;
|
|
26744
|
-
const windowWidth = window.innerWidth;
|
|
26745
|
-
const windowHeight = window.innerHeight;
|
|
26746
|
-
const nextX = x + tooltipWidth > windowWidth - viewportPadding ? x - tooltipWidth - 10 : x;
|
|
26747
|
-
const nextY = y + tooltipHeight > windowHeight - viewportPadding ? y - tooltipHeight - 10 : y;
|
|
26748
|
-
setPosition({
|
|
26749
|
-
x: Math.max(viewportPadding, Math.min(nextX, windowWidth - tooltipWidth - viewportPadding)),
|
|
26750
|
-
y: Math.max(viewportPadding, Math.min(nextY, windowHeight - tooltipHeight - viewportPadding))
|
|
26751
|
-
});
|
|
26752
|
-
}
|
|
27674
|
+
scheduleRef.current = schedulePositionUpdate;
|
|
27675
|
+
return ()=>{
|
|
27676
|
+
if (scheduleRef.current === schedulePositionUpdate) scheduleRef.current = null;
|
|
27677
|
+
};
|
|
26753
27678
|
}, [
|
|
26754
|
-
|
|
26755
|
-
|
|
27679
|
+
schedulePositionUpdate,
|
|
27680
|
+
scheduleRef
|
|
27681
|
+
]);
|
|
27682
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
27683
|
+
if (!visible) return;
|
|
27684
|
+
schedulePositionUpdate();
|
|
27685
|
+
return ()=>{
|
|
27686
|
+
if (null === frameRef.current) return;
|
|
27687
|
+
cancelAnimationFrame(frameRef.current);
|
|
27688
|
+
frameRef.current = null;
|
|
27689
|
+
};
|
|
27690
|
+
}, [
|
|
27691
|
+
schedulePositionUpdate,
|
|
26756
27692
|
visible
|
|
26757
27693
|
]);
|
|
26758
27694
|
if (!visible) return null;
|
|
@@ -26760,8 +27696,9 @@ const overlays_Tooltip_Tooltip = ({ title, description, visible, x, y, startFreq
|
|
|
26760
27696
|
ref: tooltipRef,
|
|
26761
27697
|
className: "pointer-events-none fixed z-[1000] max-w-[300px] rounded-[var(--radius-surface)] border border-border/70 bg-chart-panel/95 p-[var(--size-gap-base)] text-chart-panel-foreground shadow-lg backdrop-blur-md",
|
|
26762
27698
|
style: {
|
|
26763
|
-
left:
|
|
26764
|
-
top:
|
|
27699
|
+
left: 0,
|
|
27700
|
+
top: 0,
|
|
27701
|
+
transform: `translate3d(${x}px, ${y}px, 0)`
|
|
26765
27702
|
},
|
|
26766
27703
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AllocationInfo, {
|
|
26767
27704
|
allocationInfo: {
|
|
@@ -26772,43 +27709,64 @@ const overlays_Tooltip_Tooltip = ({ title, description, visible, x, y, startFreq
|
|
|
26772
27709
|
centerFrequency,
|
|
26773
27710
|
stepFrequency,
|
|
26774
27711
|
bandwidth,
|
|
26775
|
-
modulation
|
|
27712
|
+
modulation,
|
|
27713
|
+
channelTitle
|
|
26776
27714
|
}
|
|
26777
27715
|
})
|
|
26778
27716
|
});
|
|
26779
27717
|
};
|
|
26780
27718
|
const overlays_Tooltip = overlays_Tooltip_Tooltip;
|
|
26781
|
-
const
|
|
26782
|
-
const unit =
|
|
26783
|
-
const segments =
|
|
26784
|
-
const display =
|
|
26785
|
-
const show =
|
|
26786
|
-
const
|
|
26787
|
-
const
|
|
27719
|
+
const FrequencyAllocation_FrequencyAllocation = ()=>{
|
|
27720
|
+
const unit = useStore_useSelector((state)=>state.axisX.unit);
|
|
27721
|
+
const segments = useStore_useSelector((state)=>state.segments);
|
|
27722
|
+
const display = useStore_useSelector((state)=>state.frequencyAllocation.display);
|
|
27723
|
+
const show = useStore_useSelector((state)=>state.frequencyAllocation.show);
|
|
27724
|
+
const density = useStore_useSelector((state)=>state.frequencyAllocation.density);
|
|
27725
|
+
const zoomOffStyle = useStore_useSelector((state)=>state.zoom.style);
|
|
27726
|
+
const frequencyAllocationChannels = useFrequencyAllocationChannels();
|
|
26788
27727
|
const [tooltipInfo, setTooltipInfo] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)({
|
|
26789
27728
|
visible: false,
|
|
26790
27729
|
x: 0,
|
|
26791
27730
|
y: 0
|
|
26792
27731
|
});
|
|
26793
|
-
const
|
|
27732
|
+
const tooltipPositionRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)({
|
|
27733
|
+
x: 0,
|
|
27734
|
+
y: 0
|
|
27735
|
+
});
|
|
27736
|
+
const scheduleTooltipPositionRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
27737
|
+
const updateTooltipPosition = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((event)=>{
|
|
27738
|
+
tooltipPositionRef.current = {
|
|
27739
|
+
x: event.clientX + 10,
|
|
27740
|
+
y: event.clientY + 10
|
|
27741
|
+
};
|
|
27742
|
+
scheduleTooltipPositionRef.current?.();
|
|
27743
|
+
}, []);
|
|
27744
|
+
const laneData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>resolveFrequencyAllocationLanes({
|
|
26794
27745
|
segments,
|
|
26795
|
-
|
|
27746
|
+
channels: frequencyAllocationChannels
|
|
26796
27747
|
}), [
|
|
26797
27748
|
segments,
|
|
26798
|
-
|
|
27749
|
+
frequencyAllocationChannels
|
|
26799
27750
|
]);
|
|
27751
|
+
const { laneHeight, showLabels } = resolveFrequencyAllocationDensity({
|
|
27752
|
+
density,
|
|
27753
|
+
channelCount: laneData.length
|
|
27754
|
+
});
|
|
27755
|
+
const containerHeight = Math.max(laneHeight, laneData.length * laneHeight);
|
|
26800
27756
|
const handleTooltipUpdate = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((tooltipData)=>{
|
|
26801
27757
|
setTooltipInfo((prev)=>({
|
|
26802
27758
|
...prev,
|
|
26803
27759
|
...tooltipData
|
|
26804
27760
|
}));
|
|
26805
27761
|
}, []);
|
|
26806
|
-
const handleMouseEnter = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((band, range)=>(e)=>{
|
|
27762
|
+
const handleMouseEnter = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(({ band, channelTitle, range })=>(e)=>{
|
|
27763
|
+
updateTooltipPosition(e);
|
|
26807
27764
|
const tooltipData = {
|
|
26808
27765
|
...band,
|
|
26809
27766
|
visible: true,
|
|
26810
|
-
x:
|
|
26811
|
-
y:
|
|
27767
|
+
x: tooltipPositionRef.current.x,
|
|
27768
|
+
y: tooltipPositionRef.current.y,
|
|
27769
|
+
channelTitle,
|
|
26812
27770
|
startFrequency: `${range.start}${unit}`,
|
|
26813
27771
|
stopFrequency: `${range.stop}${unit}`
|
|
26814
27772
|
};
|
|
@@ -26819,15 +27777,13 @@ const FrequencyAllocation = ()=>{
|
|
|
26819
27777
|
handleTooltipUpdate(tooltipData);
|
|
26820
27778
|
}, [
|
|
26821
27779
|
unit,
|
|
26822
|
-
handleTooltipUpdate
|
|
27780
|
+
handleTooltipUpdate,
|
|
27781
|
+
updateTooltipPosition
|
|
26823
27782
|
]);
|
|
26824
27783
|
const handleMouseMove = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
26825
|
-
|
|
26826
|
-
x: e.clientX + 10,
|
|
26827
|
-
y: e.clientY + 10
|
|
26828
|
-
});
|
|
27784
|
+
updateTooltipPosition(e);
|
|
26829
27785
|
}, [
|
|
26830
|
-
|
|
27786
|
+
updateTooltipPosition
|
|
26831
27787
|
]);
|
|
26832
27788
|
const handleMouseLeave = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
26833
27789
|
handleTooltipUpdate({
|
|
@@ -26836,28 +27792,42 @@ const FrequencyAllocation = ()=>{
|
|
|
26836
27792
|
}, [
|
|
26837
27793
|
handleTooltipUpdate
|
|
26838
27794
|
]);
|
|
26839
|
-
if (!show || !display) return null;
|
|
27795
|
+
if (!show || !display || 0 === laneData.length) return null;
|
|
26840
27796
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
26841
|
-
className: "pointer-events-none absolute inset-x-0 bottom-0 z-[5] flex
|
|
27797
|
+
className: "pointer-events-none absolute inset-x-0 bottom-0 z-[5] flex w-full select-none items-center overflow-hidden",
|
|
27798
|
+
style: {
|
|
27799
|
+
height: containerHeight,
|
|
27800
|
+
backgroundColor: 'color-mix(in srgb, var(--chart-surface) 12%, transparent)'
|
|
27801
|
+
},
|
|
26842
27802
|
children: [
|
|
26843
27803
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
26844
|
-
className: "absolute right-0 top-0
|
|
27804
|
+
className: "absolute right-0 top-0 h-full w-full will-change-transform",
|
|
26845
27805
|
style: zoomOffStyle ?? void 0,
|
|
26846
|
-
children:
|
|
26847
|
-
|
|
26848
|
-
|
|
26849
|
-
|
|
26850
|
-
|
|
26851
|
-
|
|
26852
|
-
|
|
27806
|
+
children: laneData.map(({ channel, channelIndex, segmentData })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
27807
|
+
className: "absolute left-0 w-full",
|
|
27808
|
+
style: {
|
|
27809
|
+
bottom: channelIndex * laneHeight,
|
|
27810
|
+
height: laneHeight
|
|
27811
|
+
},
|
|
27812
|
+
children: segmentData.map(({ segmentIndex, bandPositions, style })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(presenters_AllocationSegments, {
|
|
27813
|
+
style: style,
|
|
27814
|
+
bandPositions: bandPositions,
|
|
27815
|
+
showLabels: showLabels,
|
|
27816
|
+
onMouseEnter: handleMouseEnter,
|
|
27817
|
+
onMouseMove: handleMouseMove,
|
|
27818
|
+
onMouseLeave: handleMouseLeave
|
|
27819
|
+
}, `channel-${channel.id}-segment-${segmentIndex}`))
|
|
27820
|
+
}, `channel-${channel.id}`))
|
|
26853
27821
|
}),
|
|
26854
27822
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(overlays_Tooltip, {
|
|
26855
|
-
...tooltipInfo
|
|
27823
|
+
...tooltipInfo,
|
|
27824
|
+
positionRef: tooltipPositionRef,
|
|
27825
|
+
scheduleRef: scheduleTooltipPositionRef
|
|
26856
27826
|
})
|
|
26857
27827
|
]
|
|
26858
27828
|
});
|
|
26859
27829
|
};
|
|
26860
|
-
const
|
|
27830
|
+
const FrequencyAllocation = FrequencyAllocation_FrequencyAllocation;
|
|
26861
27831
|
const useUpdateKey = (id)=>{
|
|
26862
27832
|
const [updateKey, setUpdateKey] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(0);
|
|
26863
27833
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
@@ -26980,7 +27950,7 @@ const FrequencyTagLine_FrequencyTagLine = (props)=>{
|
|
|
26980
27950
|
show
|
|
26981
27951
|
]);
|
|
26982
27952
|
if (!show || !display) return null;
|
|
26983
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
27953
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
26984
27954
|
className: "z-[3]",
|
|
26985
27955
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
26986
27956
|
className: "relative flex h-full w-px border-l border-dashed border-chart-highlight/80 opacity-80",
|
|
@@ -27211,7 +28181,7 @@ const Limit_Limit = ({ id })=>{
|
|
|
27211
28181
|
system.height
|
|
27212
28182
|
]);
|
|
27213
28183
|
if (!show) return null;
|
|
27214
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
28184
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
27215
28185
|
className: "z-[2]",
|
|
27216
28186
|
children: segments?.map((i, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
27217
28187
|
style: {
|
|
@@ -27236,7 +28206,8 @@ const useMarkerEvents = (props)=>{
|
|
|
27236
28206
|
const stateRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)({
|
|
27237
28207
|
isDown: null,
|
|
27238
28208
|
dragStart: null,
|
|
27239
|
-
isHover: ''
|
|
28209
|
+
isHover: '',
|
|
28210
|
+
hoverId: null
|
|
27240
28211
|
});
|
|
27241
28212
|
const getEventContainer = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>document.getElementById(getEID(id)) ?? document.getElementById(id), [
|
|
27242
28213
|
id
|
|
@@ -27289,47 +28260,56 @@ const useMarkerEvents = (props)=>{
|
|
|
27289
28260
|
]);
|
|
27290
28261
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
27291
28262
|
const isShow = display;
|
|
27292
|
-
createMoveEventManager(id, useMarkerEvents_COMPONENT_KEY, (_, e)=>{
|
|
28263
|
+
const cleanupMove = createMoveEventManager(id, useMarkerEvents_COMPONENT_KEY, (_, e)=>{
|
|
27293
28264
|
if (!isShow) return;
|
|
27294
28265
|
if (void 0 !== e.left) {
|
|
27295
|
-
|
|
28266
|
+
const nextHover = checkHover({
|
|
27296
28267
|
left: e.left
|
|
27297
28268
|
});
|
|
28269
|
+
const nextHoverId = 'object' == typeof nextHover ? nextHover.id : null;
|
|
28270
|
+
if (stateRef.current.hoverId === nextHoverId) {
|
|
28271
|
+
stateRef.current.isHover = nextHover;
|
|
28272
|
+
return;
|
|
28273
|
+
}
|
|
28274
|
+
stateRef.current.isHover = nextHover;
|
|
28275
|
+
stateRef.current.hoverId = nextHoverId;
|
|
27298
28276
|
onHover({
|
|
27299
28277
|
left: e.left
|
|
27300
28278
|
});
|
|
27301
28279
|
}
|
|
27302
28280
|
});
|
|
27303
|
-
createDragEventManager(id, useMarkerEvents_COMPONENT_KEY, (_, e)=>{
|
|
28281
|
+
const cleanupDrag = createDragEventManager(id, useMarkerEvents_COMPONENT_KEY, (_, e)=>{
|
|
27304
28282
|
const { isDown } = stateRef.current;
|
|
27305
28283
|
if (isShow && isDown && compareEventPriority(id, useMarkerEvents_COMPONENT_KEY) && !fixed) onUpdateMarker(isDown.id, {
|
|
27306
28284
|
left: e.left,
|
|
27307
28285
|
top: e.top
|
|
27308
28286
|
});
|
|
27309
28287
|
});
|
|
27310
|
-
createMouseDownEventManager(id, useMarkerEvents_COMPONENT_KEY, (e)=>{
|
|
28288
|
+
const cleanupMouseDown = createMouseDownEventManager(id, useMarkerEvents_COMPONENT_KEY, (e)=>{
|
|
27311
28289
|
if (!isShow) return;
|
|
27312
28290
|
const marker = findMarkerByPosition(e) || ('object' == typeof stateRef.current.isHover ? stateRef.current.isHover : null);
|
|
27313
28291
|
if (marker && !fixed) stateRef.current.isDown = marker;
|
|
27314
28292
|
});
|
|
27315
|
-
createMouseUpEventManager(id, useMarkerEvents_COMPONENT_KEY, ()=>{
|
|
28293
|
+
const cleanupMouseUp = createMouseUpEventManager(id, useMarkerEvents_COMPONENT_KEY, ()=>{
|
|
27316
28294
|
if (!isShow) return;
|
|
27317
28295
|
stateRef.current.isDown = null;
|
|
27318
28296
|
resetEventLevel(id, useMarkerEvents_COMPONENT_KEY);
|
|
27319
28297
|
});
|
|
27320
|
-
createMouseLeaveEventManager(id, useMarkerEvents_COMPONENT_KEY, ()=>{
|
|
28298
|
+
const cleanupMouseLeave = createMouseLeaveEventManager(id, useMarkerEvents_COMPONENT_KEY, ()=>{
|
|
27321
28299
|
if (!isShow) return;
|
|
28300
|
+
const hadHover = null !== stateRef.current.hoverId;
|
|
27322
28301
|
stateRef.current.isDown = null;
|
|
27323
28302
|
stateRef.current.isHover = '';
|
|
28303
|
+
stateRef.current.hoverId = null;
|
|
27324
28304
|
resetEventLevel(id, useMarkerEvents_COMPONENT_KEY);
|
|
27325
|
-
onResetHover();
|
|
28305
|
+
if (hadHover) onResetHover();
|
|
27326
28306
|
});
|
|
27327
|
-
createLongPressEventManager(id, useMarkerEvents_COMPONENT_KEY, (_, e)=>{
|
|
28307
|
+
const cleanupLongPress = createLongPressEventManager(id, useMarkerEvents_COMPONENT_KEY, (_, e)=>{
|
|
27328
28308
|
if (!isShow || !compareEventPriority(id, useMarkerEvents_COMPONENT_KEY)) return;
|
|
27329
28309
|
const marker = findMarkerByPosition(e) || ('object' == typeof stateRef.current.isHover ? stateRef.current.isHover : null);
|
|
27330
28310
|
if (marker?.id) onToggleSelect(marker.id);
|
|
27331
28311
|
});
|
|
27332
|
-
createDoubleClickEventManager(id, useMarkerEvents_COMPONENT_KEY, (_, e)=>{
|
|
28312
|
+
const cleanupDoubleClick = createDoubleClickEventManager(id, useMarkerEvents_COMPONENT_KEY, (_, e)=>{
|
|
27333
28313
|
if (!isShow || !compareEventPriority(id, useMarkerEvents_COMPONENT_KEY)) return;
|
|
27334
28314
|
if (void 0 !== e.left) {
|
|
27335
28315
|
const nearbyMarker = checkHover({
|
|
@@ -27341,6 +28321,15 @@ const useMarkerEvents = (props)=>{
|
|
|
27341
28321
|
});
|
|
27342
28322
|
}
|
|
27343
28323
|
});
|
|
28324
|
+
return ()=>{
|
|
28325
|
+
cleanupMove?.();
|
|
28326
|
+
cleanupDrag?.();
|
|
28327
|
+
cleanupMouseDown?.();
|
|
28328
|
+
cleanupMouseUp?.();
|
|
28329
|
+
cleanupMouseLeave?.();
|
|
28330
|
+
cleanupLongPress?.();
|
|
28331
|
+
cleanupDoubleClick?.();
|
|
28332
|
+
};
|
|
27344
28333
|
}, [
|
|
27345
28334
|
id,
|
|
27346
28335
|
display,
|
|
@@ -28578,7 +29567,7 @@ const Markers = ({ id })=>{
|
|
|
28578
29567
|
resetMarkers
|
|
28579
29568
|
]);
|
|
28580
29569
|
if (!show) return null;
|
|
28581
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
29570
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
28582
29571
|
className: "z-[5]",
|
|
28583
29572
|
children: markers.map((marker)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Markers_MarkerItem, {
|
|
28584
29573
|
marker: marker
|
|
@@ -28634,7 +29623,7 @@ function useScope_useScope() {
|
|
|
28634
29623
|
const Scope = ()=>{
|
|
28635
29624
|
const { state: { scope: { show, left, width } } } = useStore_useStore();
|
|
28636
29625
|
if (!show) return null;
|
|
28637
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
29626
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
28638
29627
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
28639
29628
|
className: "relative flex h-full w-0 box-border border-y border-dashed border-chart-grid bg-chart-surface opacity-50",
|
|
28640
29629
|
style: {
|
|
@@ -28731,19 +29720,17 @@ function useSignalDataManager() {
|
|
|
28731
29720
|
updateSignalData
|
|
28732
29721
|
};
|
|
28733
29722
|
}
|
|
28734
|
-
const Signal = ({ show = true, display = true })=>{
|
|
28735
|
-
const segments =
|
|
28736
|
-
const zoomOffStyle =
|
|
28737
|
-
const
|
|
28738
|
-
const
|
|
28739
|
-
const
|
|
29723
|
+
const Signal = ({ id, show = true, display = true })=>{
|
|
29724
|
+
const segments = useStore_useSelector((state)=>state.segments);
|
|
29725
|
+
const zoomOffStyle = useStore_useSelector((state)=>state.zoom.style);
|
|
29726
|
+
const signal = useStore_useSelector((state)=>state.signal);
|
|
29727
|
+
const cursorSample = useCursorSample(id);
|
|
29728
|
+
const left = cursorSample?.coord.left;
|
|
28740
29729
|
const signalItems = useUnifiedSignals({
|
|
28741
29730
|
respectVisibility: true
|
|
28742
29731
|
});
|
|
28743
29732
|
const shouldDisplay = signal.show && signal.display && display;
|
|
28744
|
-
const isCursorActive =
|
|
28745
|
-
cursor
|
|
28746
|
-
]);
|
|
29733
|
+
const isCursorActive = !!cursorSample;
|
|
28747
29734
|
const currentPosition = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>isCursorActive && 'number' == typeof left ? frequencyCalculation_calculateCursorPosition(left, segments) : {
|
|
28748
29735
|
segmentIndex: -1,
|
|
28749
29736
|
pointIndex: -1
|
|
@@ -28757,18 +29744,23 @@ const Signal = ({ show = true, display = true })=>{
|
|
|
28757
29744
|
isCursorActive,
|
|
28758
29745
|
segments
|
|
28759
29746
|
]);
|
|
28760
|
-
const segmentData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>
|
|
29747
|
+
const segmentData = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>resolveStaticSignalSegments({
|
|
28761
29748
|
segments,
|
|
28762
|
-
signalItems
|
|
29749
|
+
signalItems
|
|
29750
|
+
}), [
|
|
29751
|
+
segments,
|
|
29752
|
+
signalItems
|
|
29753
|
+
]);
|
|
29754
|
+
const activeSignalKey = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>resolveActiveSignalKey({
|
|
29755
|
+
segmentData,
|
|
28763
29756
|
isCursorActive,
|
|
28764
29757
|
currentFrequency,
|
|
28765
29758
|
currentPosition
|
|
28766
29759
|
}), [
|
|
28767
|
-
segments,
|
|
28768
|
-
signalItems,
|
|
28769
|
-
isCursorActive,
|
|
28770
29760
|
currentFrequency,
|
|
28771
|
-
currentPosition
|
|
29761
|
+
currentPosition,
|
|
29762
|
+
isCursorActive,
|
|
29763
|
+
segmentData
|
|
28772
29764
|
]);
|
|
28773
29765
|
if (!show || !shouldDisplay) return null;
|
|
28774
29766
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
@@ -28776,10 +29768,10 @@ const Signal = ({ show = true, display = true })=>{
|
|
|
28776
29768
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
28777
29769
|
className: "absolute right-0 top-0 flex h-full w-full",
|
|
28778
29770
|
style: zoomOffStyle ?? void 0,
|
|
28779
|
-
children: segmentData.map(({ segmentIndex, signalPositions,
|
|
29771
|
+
children: segmentData.map(({ segmentIndex, signalPositions, style })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(SignalSegments, {
|
|
28780
29772
|
style: style,
|
|
28781
29773
|
signalPositions: signalPositions,
|
|
28782
|
-
activeSignalKey: activeSignalKey,
|
|
29774
|
+
activeSignalKey: currentPosition.segmentIndex === segmentIndex ? activeSignalKey : void 0,
|
|
28783
29775
|
segmentIndex: segmentIndex
|
|
28784
29776
|
}, `segment-${segmentIndex}`))
|
|
28785
29777
|
})
|
|
@@ -28788,7 +29780,7 @@ const Signal = ({ show = true, display = true })=>{
|
|
|
28788
29780
|
const Spectrum_Signal = Signal;
|
|
28789
29781
|
const Stripe_COMPONENT_KEY = constants_ToolType.Stripe;
|
|
28790
29782
|
const EDGE_HIT_SLOP = 1.5;
|
|
28791
|
-
const
|
|
29783
|
+
const Stripe_clampPercent = (value1)=>Math.max(0, Math.min(100, value1));
|
|
28792
29784
|
const resolveDragMode = ({ cursor, left, right })=>{
|
|
28793
29785
|
const leftDistance = Math.abs(cursor - left);
|
|
28794
29786
|
const rightDistance = Math.abs(cursor - right);
|
|
@@ -28833,7 +29825,7 @@ const Stripe_Stripe = ({ id })=>{
|
|
|
28833
29825
|
const updateStripe = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
28834
29826
|
const dragState = dragStateRef.current;
|
|
28835
29827
|
if (!dragState || !Number.isFinite(e?.left)) return;
|
|
28836
|
-
const coordinateCursor =
|
|
29828
|
+
const coordinateCursor = Stripe_clampPercent(e.left);
|
|
28837
29829
|
const currentStripe = stripeRef.current;
|
|
28838
29830
|
const { mode, startCursor, startLeft, startRight } = dragState;
|
|
28839
29831
|
let nextLeft = startLeft;
|
|
@@ -28841,7 +29833,7 @@ const Stripe_Stripe = ({ id })=>{
|
|
|
28841
29833
|
if ('move' === mode) {
|
|
28842
29834
|
const delta = coordinateCursor - startCursor;
|
|
28843
29835
|
const width = startRight - startLeft;
|
|
28844
|
-
nextLeft =
|
|
29836
|
+
nextLeft = Stripe_clampPercent(startLeft + delta);
|
|
28845
29837
|
nextRight = nextLeft + width;
|
|
28846
29838
|
if (nextRight > 100) {
|
|
28847
29839
|
nextRight = 100;
|
|
@@ -28885,7 +29877,7 @@ const Stripe_Stripe = ({ id })=>{
|
|
|
28885
29877
|
createMouseDownEventManager(id, Stripe_COMPONENT_KEY, (e)=>{
|
|
28886
29878
|
if (!show || !display || !Number.isFinite(e?.left)) return;
|
|
28887
29879
|
const currentStripe = stripeRef.current;
|
|
28888
|
-
const cursor =
|
|
29880
|
+
const cursor = Stripe_clampPercent(e.left);
|
|
28889
29881
|
dragStateRef.current = {
|
|
28890
29882
|
mode: resolveDragMode({
|
|
28891
29883
|
cursor,
|
|
@@ -28924,7 +29916,7 @@ const Stripe_Stripe = ({ id })=>{
|
|
|
28924
29916
|
change
|
|
28925
29917
|
]);
|
|
28926
29918
|
if (!show || left - right === 0 || !display) return null;
|
|
28927
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
29919
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
28928
29920
|
className: "z-[3]",
|
|
28929
29921
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
28930
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",
|
|
@@ -28936,37 +29928,73 @@ const Stripe_Stripe = ({ id })=>{
|
|
|
28936
29928
|
});
|
|
28937
29929
|
};
|
|
28938
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
|
+
}
|
|
28939
29960
|
function useBandLayerController() {
|
|
28940
|
-
const {
|
|
29961
|
+
const { dispatch, store } = useStoreApi();
|
|
28941
29962
|
const updateBand = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
28942
|
-
const
|
|
29963
|
+
const current = store.getState().band;
|
|
29964
|
+
const next = resolveBandState(e, current, 'replace');
|
|
29965
|
+
if (next === current) return;
|
|
28943
29966
|
dispatch({
|
|
28944
29967
|
payload: {
|
|
28945
|
-
band:
|
|
28946
|
-
...band,
|
|
28947
|
-
show,
|
|
28948
|
-
width
|
|
28949
|
-
}
|
|
29968
|
+
band: next
|
|
28950
29969
|
}
|
|
28951
29970
|
});
|
|
28952
29971
|
}, [
|
|
28953
|
-
|
|
29972
|
+
dispatch,
|
|
29973
|
+
store
|
|
28954
29974
|
]);
|
|
28955
29975
|
return updateBand;
|
|
28956
29976
|
}
|
|
28957
29977
|
const BandLayer_BandLayer = ()=>{
|
|
28958
|
-
const
|
|
28959
|
-
|
|
28960
|
-
|
|
28961
|
-
|
|
28962
|
-
|
|
28963
|
-
|
|
28964
|
-
|
|
28965
|
-
|
|
28966
|
-
|
|
28967
|
-
|
|
28968
|
-
|
|
28969
|
-
|
|
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))
|
|
28970
29998
|
});
|
|
28971
29999
|
};
|
|
28972
30000
|
const BandLayer = BandLayer_BandLayer;
|
|
@@ -29047,7 +30075,9 @@ const Spectrum_Spectrum = (props)=>{
|
|
|
29047
30075
|
id: id,
|
|
29048
30076
|
type: constants_ModuleType.Spectrum
|
|
29049
30077
|
}),
|
|
29050
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Spectrum_Signal, {
|
|
30078
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Spectrum_Signal, {
|
|
30079
|
+
id: id
|
|
30080
|
+
}),
|
|
29051
30081
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Spectrum_DragFrame, {
|
|
29052
30082
|
id: id
|
|
29053
30083
|
}),
|
|
@@ -29059,7 +30089,7 @@ const Spectrum_Spectrum = (props)=>{
|
|
|
29059
30089
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyTagLine, {
|
|
29060
30090
|
id: id
|
|
29061
30091
|
}),
|
|
29062
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30092
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FrequencyAllocation, {}),
|
|
29063
30093
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DeltaMeasurement, {})
|
|
29064
30094
|
]
|
|
29065
30095
|
})
|
|
@@ -29095,7 +30125,7 @@ const LevelStream_Chart_Chart = (props)=>{
|
|
|
29095
30125
|
]);
|
|
29096
30126
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_Container, {
|
|
29097
30127
|
children: [
|
|
29098
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30128
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
|
|
29099
30129
|
type: constants_ChartType.LevelStream
|
|
29100
30130
|
}),
|
|
29101
30131
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FlexBox, {
|
|
@@ -29352,9 +30382,9 @@ const charts_Occupancy_Occupancy = withChartPublisher(OccupancyChart, 'Occupancy
|
|
|
29352
30382
|
const charts_Occupancy = charts_Occupancy_Occupancy;
|
|
29353
30383
|
const Zoom_Zoom = ()=>{
|
|
29354
30384
|
const dispatch = useStoreDispatch();
|
|
29355
|
-
const zoom =
|
|
29356
|
-
const totalPoints =
|
|
29357
|
-
const frequencyFormat =
|
|
30385
|
+
const zoom = useStore_useSelector((state)=>state.zoom);
|
|
30386
|
+
const totalPoints = useStore_useSelector((state)=>state.segments.totalPoints) ?? 0;
|
|
30387
|
+
const frequencyFormat = useStore_useSelector((state)=>state.axisX.frequencyFormat);
|
|
29358
30388
|
const { interval: { start, end }, onChange } = zoom;
|
|
29359
30389
|
const ticks = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
29360
30390
|
if (!totalPoints || !frequencyFormat) return [
|
|
@@ -29500,7 +30530,7 @@ const HeatmapPortal_Chart = (props)=>{
|
|
|
29500
30530
|
id: heatmapElementID,
|
|
29501
30531
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Background, {
|
|
29502
30532
|
children: [
|
|
29503
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30533
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
|
|
29504
30534
|
type: constants_ChartType.Heatmap
|
|
29505
30535
|
}),
|
|
29506
30536
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Heatmap, {}),
|
|
@@ -29523,7 +30553,7 @@ const OccupancyPortal_Chart = (props)=>{
|
|
|
29523
30553
|
occupancyAxisYDisabled: true
|
|
29524
30554
|
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Background, {
|
|
29525
30555
|
children: [
|
|
29526
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30556
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
|
|
29527
30557
|
type: constants_ChartType.Occupancy
|
|
29528
30558
|
}),
|
|
29529
30559
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Occupancy, {}),
|
|
@@ -29566,7 +30596,7 @@ const Blaze = ()=>{
|
|
|
29566
30596
|
globalID
|
|
29567
30597
|
]);
|
|
29568
30598
|
if (!show) return null;
|
|
29569
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30599
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
29570
30600
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
29571
30601
|
className: "absolute left-[-100%] top-0 flex h-full w-0 opacity-50",
|
|
29572
30602
|
style: {
|
|
@@ -29601,7 +30631,7 @@ const Spectrum_Legend = Legend;
|
|
|
29601
30631
|
const SegmentsZebra = ()=>{
|
|
29602
30632
|
const { state: { segments } } = useStore_useStore();
|
|
29603
30633
|
const totalPoints = segments.totalPoints ?? 0;
|
|
29604
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30634
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ZoomViewportLayer, {
|
|
29605
30635
|
className: "z-[0]",
|
|
29606
30636
|
children: segments.map((i, key)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
29607
30637
|
className: "h-full border-x",
|
|
@@ -29943,7 +30973,7 @@ const Spectrum_Chart_Chart = (props)=>{
|
|
|
29943
30973
|
});
|
|
29944
30974
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_Container, {
|
|
29945
30975
|
children: [
|
|
29946
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30976
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Toolbar, {
|
|
29947
30977
|
type: type
|
|
29948
30978
|
}),
|
|
29949
30979
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_FlexBox, {
|
|
@@ -29981,12 +31011,31 @@ const Spectrum_Chart_Chart = (props)=>{
|
|
|
29981
31011
|
});
|
|
29982
31012
|
};
|
|
29983
31013
|
const Spectrum_Chart = Spectrum_Chart_Chart;
|
|
29984
|
-
const
|
|
31014
|
+
const heatmapCaptureDefaults_DEFAULT_SPECTRUM_TYPE = 'singleFrequency';
|
|
31015
|
+
const DEFAULT_HEATMAP_CAPTURE_TYPE = 'slider';
|
|
31016
|
+
const withSpectrumHeatmapCaptureDefaults = (props)=>{
|
|
31017
|
+
const type = props.type ?? heatmapCaptureDefaults_DEFAULT_SPECTRUM_TYPE;
|
|
31018
|
+
if (!props.heatmapElementID || type !== heatmapCaptureDefaults_DEFAULT_SPECTRUM_TYPE && 'scan' !== type && 'mscan' !== type) return props;
|
|
31019
|
+
return {
|
|
29985
31020
|
...props,
|
|
31021
|
+
heatmapCapture: {
|
|
31022
|
+
show: true,
|
|
31023
|
+
display: false,
|
|
31024
|
+
type: DEFAULT_HEATMAP_CAPTURE_TYPE,
|
|
31025
|
+
toolbarVariant: 'deltaMeasurement',
|
|
31026
|
+
...props.heatmapCapture
|
|
31027
|
+
}
|
|
31028
|
+
};
|
|
31029
|
+
};
|
|
31030
|
+
const SpectrumChart = (props)=>{
|
|
31031
|
+
const normalizedProps = withSpectrumHeatmapCaptureDefaults(props);
|
|
31032
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(src_store, {
|
|
31033
|
+
...normalizedProps,
|
|
29986
31034
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Spectrum_Chart, {
|
|
29987
|
-
...
|
|
31035
|
+
...normalizedProps
|
|
29988
31036
|
})
|
|
29989
31037
|
});
|
|
31038
|
+
};
|
|
29990
31039
|
const charts_Spectrum_Spectrum = withChartPublisher(SpectrumChart, 'Spectrum');
|
|
29991
31040
|
const charts_Spectrum = charts_Spectrum_Spectrum;
|
|
29992
31041
|
function initChartsTheme(options = {}) {
|
|
@@ -30003,4 +31052,4 @@ function initChartsTheme(options = {}) {
|
|
|
30003
31052
|
};
|
|
30004
31053
|
}
|
|
30005
31054
|
initializeChartsThemeEnvironment();
|
|
30006
|
-
export { constants_ChartType as ChartType, charts_Dial as Dial, constants_FrequencyUnit as FrequencyUnit, charts_Gauge as Gauge, charts_Heatmap as Heatmap, heatmap_HeatmapCaptureType as HeatmapCaptureType, IQ, LevelStream, constants_MarkerEventType as MarkerEventType, marker_MarkerMode as MarkerMode, constants_ModuleType as ModuleType, charts_Occupancy as Occupancy, constants_OptionKey as OptionKey, constants_PSType as PSType, constants_SegmentsEvent as SegmentsEvent, constants_SeriesType as SeriesType, signal_SignalDataType as SignalDataType, charts_Spectrum as Spectrum, constants_ToolType as ToolType, constants_ToolbarItemType as ToolbarItemType, formatFrequencyUnit, formatFrequencyUnitFromHz, formatFrequencyUnitFromMHz, getChartsThemeState, initChartsTheme, setFrequencyAllocationToCache, subscribeChartsThemeChange, useSafePublish, withChartPublisher };
|
|
31055
|
+
export { constants_ChartType as ChartType, charts_Dial as Dial, constants_FrequencyUnit as FrequencyUnit, charts_Gauge as Gauge, charts_Heatmap as Heatmap, heatmap_HeatmapCaptureType as HeatmapCaptureType, IQ, LevelStream, constants_MarkerEventType as MarkerEventType, marker_MarkerMode as MarkerMode, constants_ModuleType as ModuleType, charts_Occupancy as Occupancy, constants_OptionKey as OptionKey, constants_PSType as PSType, constants_SegmentsEvent as SegmentsEvent, constants_SeriesType as SeriesType, signal_SignalDataType as SignalDataType, charts_Spectrum as Spectrum, constants_ToolType as ToolType, constants_ToolbarItemType as ToolbarItemType, formatFrequencyUnit, formatFrequencyUnitFromHz, formatFrequencyUnitFromMHz, getChartsThemeState, initChartsTheme, setFrequencyAllocationChannelsToCache, setFrequencyAllocationToCache, subscribeChartsThemeChange, useSafePublish, withChartPublisher };
|