@arraypress/waveform-bar 1.3.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/waveform-bar.css +77 -13
- package/dist/waveform-bar.esm.js +450 -58
- package/dist/waveform-bar.js +450 -58
- package/dist/waveform-bar.min.css +1 -1
- package/dist/waveform-bar.min.js +6 -6
- package/package.json +8 -2
- package/src/css/waveform-bar.css +77 -13
- package/src/js/actions.js +2 -2
- package/src/js/core.js +529 -57
- package/src/js/dom.js +14 -1
- package/src/js/icons.js +3 -0
- package/src/js/utils.js +49 -4
package/dist/waveform-bar.css
CHANGED
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
--wb-border: rgba(255, 255, 255, 0.1);
|
|
14
14
|
--wb-text: #ffffff;
|
|
15
15
|
--wb-text-muted: rgba(255, 255, 255, 0.5);
|
|
16
|
-
--wb-accent: #
|
|
17
|
-
--wb-accent-light: #
|
|
16
|
+
--wb-accent: #fafafa;
|
|
17
|
+
--wb-accent-light: #e4e4e7;
|
|
18
|
+
--wb-on-accent: #18181b;
|
|
18
19
|
--wb-hover: rgba(255, 255, 255, 0.08);
|
|
19
20
|
--wb-tag-bg: rgba(255, 255, 255, 0.08);
|
|
20
21
|
--wb-tag-text: rgba(255, 255, 255, 0.7);
|
|
@@ -28,6 +29,9 @@
|
|
|
28
29
|
--wb-border: rgba(0, 0, 0, 0.1);
|
|
29
30
|
--wb-text: #1a1a1a;
|
|
30
31
|
--wb-text-muted: rgba(0, 0, 0, 0.5);
|
|
32
|
+
--wb-accent: #18181b;
|
|
33
|
+
--wb-accent-light: #3f3f46;
|
|
34
|
+
--wb-on-accent: #fafafa;
|
|
31
35
|
--wb-hover: rgba(0, 0, 0, 0.05);
|
|
32
36
|
--wb-tag-bg: rgba(0, 0, 0, 0.06);
|
|
33
37
|
--wb-tag-text: rgba(0, 0, 0, 0.6);
|
|
@@ -81,7 +85,8 @@
|
|
|
81
85
|
========================================================================== */
|
|
82
86
|
|
|
83
87
|
.wb-inner {
|
|
84
|
-
max-width
|
|
88
|
+
/* Override via the `wide` / `maxWidth` options (sets --wb-max-width on the bar). */
|
|
89
|
+
max-width: var(--wb-max-width, 1400px);
|
|
85
90
|
margin: 0 auto;
|
|
86
91
|
padding: 0.5rem 1.5rem;
|
|
87
92
|
display: flex;
|
|
@@ -147,6 +152,11 @@
|
|
|
147
152
|
pointer-events: none;
|
|
148
153
|
}
|
|
149
154
|
|
|
155
|
+
/* Brief "link copied" feedback on the share button. */
|
|
156
|
+
.wb-share.wb-copied {
|
|
157
|
+
color: #4ade80;
|
|
158
|
+
}
|
|
159
|
+
|
|
150
160
|
.wb-btn-sm {
|
|
151
161
|
width: 32px;
|
|
152
162
|
height: 32px;
|
|
@@ -156,12 +166,12 @@
|
|
|
156
166
|
width: 40px;
|
|
157
167
|
height: 40px;
|
|
158
168
|
background: var(--wb-accent);
|
|
159
|
-
color:
|
|
169
|
+
color: var(--wb-on-accent);
|
|
160
170
|
}
|
|
161
171
|
|
|
162
172
|
.wb-play:hover {
|
|
163
173
|
background: var(--wb-accent-light);
|
|
164
|
-
color:
|
|
174
|
+
color: var(--wb-on-accent);
|
|
165
175
|
transform: scale(1.05);
|
|
166
176
|
}
|
|
167
177
|
|
|
@@ -334,7 +344,7 @@
|
|
|
334
344
|
|
|
335
345
|
.wb-tag-bpm {
|
|
336
346
|
color: var(--wb-accent);
|
|
337
|
-
background:
|
|
347
|
+
background: color-mix(in srgb, var(--wb-accent) 12%, transparent);
|
|
338
348
|
}
|
|
339
349
|
|
|
340
350
|
.wb-tag-key {
|
|
@@ -492,7 +502,7 @@
|
|
|
492
502
|
}
|
|
493
503
|
|
|
494
504
|
.wb-repeat.wb-repeat-active:hover {
|
|
495
|
-
background:
|
|
505
|
+
background: color-mix(in srgb, var(--wb-accent) 12%, transparent);
|
|
496
506
|
}
|
|
497
507
|
|
|
498
508
|
/* ==========================================================================
|
|
@@ -501,7 +511,7 @@
|
|
|
501
511
|
|
|
502
512
|
.wb-queue-btn.wb-active {
|
|
503
513
|
color: var(--wb-accent);
|
|
504
|
-
background:
|
|
514
|
+
background: color-mix(in srgb, var(--wb-accent) 12%, transparent);
|
|
505
515
|
}
|
|
506
516
|
|
|
507
517
|
/* ==========================================================================
|
|
@@ -562,7 +572,7 @@
|
|
|
562
572
|
}
|
|
563
573
|
|
|
564
574
|
.wb-queue-count {
|
|
565
|
-
background:
|
|
575
|
+
background: color-mix(in srgb, var(--wb-accent) 15%, transparent);
|
|
566
576
|
color: var(--wb-accent);
|
|
567
577
|
padding: 0.1rem 0.45rem;
|
|
568
578
|
border-radius: 10px;
|
|
@@ -631,7 +641,7 @@
|
|
|
631
641
|
}
|
|
632
642
|
|
|
633
643
|
.wb-queue-current {
|
|
634
|
-
background:
|
|
644
|
+
background: color-mix(in srgb, var(--wb-accent) 10%, transparent);
|
|
635
645
|
}
|
|
636
646
|
|
|
637
647
|
.wb-queue-num {
|
|
@@ -793,12 +803,12 @@
|
|
|
793
803
|
}
|
|
794
804
|
|
|
795
805
|
.wb-card-highlight.wb-current {
|
|
796
|
-
border-color: var(--wb-accent
|
|
797
|
-
box-shadow: 0 0 0 1px var(--wb-accent
|
|
806
|
+
border-color: var(--wb-accent);
|
|
807
|
+
box-shadow: 0 0 0 1px var(--wb-accent);
|
|
798
808
|
}
|
|
799
809
|
|
|
800
810
|
.wb-current .wb-accent-current {
|
|
801
|
-
color: var(--wb-accent
|
|
811
|
+
color: var(--wb-accent);
|
|
802
812
|
}
|
|
803
813
|
|
|
804
814
|
.wb-pulse-playing.wb-playing {
|
|
@@ -940,4 +950,58 @@
|
|
|
940
950
|
.wb-queue-panel {
|
|
941
951
|
bottom: 85px;
|
|
942
952
|
}
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
/* ==========================================================================
|
|
956
|
+
Position — dock to the top edge (position: 'top')
|
|
957
|
+
========================================================================== */
|
|
958
|
+
|
|
959
|
+
.waveform-bar.wb-top {
|
|
960
|
+
top: 0;
|
|
961
|
+
bottom: auto;
|
|
962
|
+
border-top: none;
|
|
963
|
+
border-bottom: 1px solid var(--wb-border);
|
|
964
|
+
transform: translateY(-100%);
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
.waveform-bar.wb-top.wb-active {
|
|
968
|
+
transform: translateY(0);
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
/* ==========================================================================
|
|
972
|
+
Collapse-to-pill (collapsible: true)
|
|
973
|
+
========================================================================== */
|
|
974
|
+
|
|
975
|
+
.wb-collapse {
|
|
976
|
+
flex-shrink: 0;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
.waveform-bar.wb-collapsed {
|
|
980
|
+
left: auto;
|
|
981
|
+
right: 1rem;
|
|
982
|
+
bottom: 1rem;
|
|
983
|
+
border: 1px solid var(--wb-border);
|
|
984
|
+
border-radius: 999px;
|
|
985
|
+
overflow: hidden;
|
|
986
|
+
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
.waveform-bar.wb-top.wb-collapsed {
|
|
990
|
+
top: 1rem;
|
|
991
|
+
bottom: auto;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
.waveform-bar.wb-collapsed .wb-inner {
|
|
995
|
+
max-width: none;
|
|
996
|
+
padding: 0.3rem 0.45rem;
|
|
997
|
+
gap: 0.25rem;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
/* Collapsed = a compact transport pill: prev / play-pause / next + expand.
|
|
1001
|
+
Everything else (track info, waveform, right-zone actions, repeat) hides. */
|
|
1002
|
+
.waveform-bar.wb-collapsed .wb-centre,
|
|
1003
|
+
.waveform-bar.wb-collapsed .wb-right,
|
|
1004
|
+
.waveform-bar.wb-collapsed .wb-track,
|
|
1005
|
+
.waveform-bar.wb-collapsed .wb-repeat {
|
|
1006
|
+
display: none;
|
|
943
1007
|
}
|