@arraypress/waveform-sounds 0.3.1 → 2.1.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/LICENSE +1 -1
- package/README.md +43 -3
- package/dist/waveform-sounds-no-autoinit.esm.js +607 -178
- package/dist/waveform-sounds-render.esm.js +79 -15
- package/dist/waveform-sounds.css +136 -79
- package/dist/waveform-sounds.esm.js +611 -181
- package/dist/waveform-sounds.js +608 -181
- package/dist/waveform-sounds.min.css +1 -1
- package/dist/waveform-sounds.min.js +3 -3
- package/package.json +36 -33
- package/src/css/waveform-sounds.css +136 -79
- package/src/js/core/WaveformSounds.ts +1366 -0
- package/src/js/core/element.ts +208 -0
- package/src/js/core/engine.ts +107 -0
- package/src/js/core/{options.js → options.ts} +28 -28
- package/src/js/data/{bpm.js → bpm.ts} +27 -17
- package/src/js/data/{navigation.js → navigation.ts} +31 -18
- package/src/js/data/{sounds.js → sounds.ts} +97 -66
- package/src/js/data/url-state.ts +130 -0
- package/src/js/dom/colors.ts +86 -0
- package/src/js/dom/{draw.js → draw.ts} +16 -17
- package/src/js/dom/{menus.js → menus.ts} +70 -55
- package/src/js/dom/{rows.js → rows.ts} +15 -17
- package/src/js/entry.ts +60 -0
- package/src/js/{index.js → index.ts} +7 -3
- package/src/js/render/{html.js → html.ts} +16 -12
- package/src/js/render/{icons.js → icons.ts} +3 -4
- package/src/js/render/{markup.js → markup.ts} +114 -64
- package/src/js/render/options.ts +118 -0
- package/src/js/render/{strings.js → strings.ts} +18 -16
- package/src/js/{render-entry.js → render-entry.ts} +2 -1
- package/src/js/shared/{utils.js → utils.ts} +24 -24
- package/{index.d.ts → src/js/types.ts} +40 -88
- package/types/core/WaveformSounds.d.ts +175 -0
- package/types/core/WaveformSounds.d.ts.map +1 -0
- package/types/core/element.d.ts +84 -0
- package/types/core/element.d.ts.map +1 -0
- package/types/core/engine.d.ts +72 -0
- package/types/core/engine.d.ts.map +1 -0
- package/types/core/options.d.ts +71 -0
- package/types/core/options.d.ts.map +1 -0
- package/types/data/bpm.d.ts +80 -0
- package/types/data/bpm.d.ts.map +1 -0
- package/types/data/navigation.d.ts +62 -0
- package/types/data/navigation.d.ts.map +1 -0
- package/types/data/sounds.d.ts +168 -0
- package/types/data/sounds.d.ts.map +1 -0
- package/types/data/url-state.d.ts +109 -0
- package/types/data/url-state.d.ts.map +1 -0
- package/types/dom/colors.d.ts +48 -0
- package/types/dom/colors.d.ts.map +1 -0
- package/types/dom/draw.d.ts +72 -0
- package/types/dom/draw.d.ts.map +1 -0
- package/types/dom/menus.d.ts +75 -0
- package/types/dom/menus.d.ts.map +1 -0
- package/types/dom/rows.d.ts +39 -0
- package/types/dom/rows.d.ts.map +1 -0
- package/types/entry.d.ts +28 -0
- package/types/entry.d.ts.map +1 -0
- package/types/index.d.ts +16 -0
- package/types/index.d.ts.map +1 -0
- package/types/render/html.d.ts +37 -0
- package/types/render/html.d.ts.map +1 -0
- package/types/render/icons.d.ts +17 -0
- package/types/render/icons.d.ts.map +1 -0
- package/types/render/markup.d.ts +141 -0
- package/types/render/markup.d.ts.map +1 -0
- package/types/render/options.d.ts +69 -0
- package/types/render/options.d.ts.map +1 -0
- package/types/render/strings.d.ts +43 -0
- package/types/render/strings.d.ts.map +1 -0
- package/types/render-entry.d.ts +8 -0
- package/types/render-entry.d.ts.map +1 -0
- package/types/shared/utils.d.ts +57 -0
- package/types/shared/utils.d.ts.map +1 -0
- package/types/types.d.ts +280 -0
- package/types/types.d.ts.map +1 -0
- package/types/vendor/arraypress-text.d.ts +250 -0
- package/dist/waveform-sounds-no-autoinit.cjs +0 -2159
- package/dist/waveform-sounds-render.cjs +0 -614
- package/dist/waveform-sounds.cjs +0 -2181
- package/no-autoinit.d.ts +0 -2
- package/render.d.ts +0 -5
- package/src/js/core/WaveformSounds.js +0 -993
- package/src/js/core/engine.js +0 -57
- package/src/js/data/url-state.js +0 -106
- package/src/js/dom/colors.js +0 -59
- package/src/js/entry.js +0 -25
- package/src/js/render/options.js +0 -90
|
@@ -15,12 +15,21 @@
|
|
|
15
15
|
* canvas can't use CSS, so the runtime resolves them, and re-reads them
|
|
16
16
|
* when the page theme flips).
|
|
17
17
|
*/
|
|
18
|
+
/* <waveform-sounds>: a block, like the <div data-waveform-sounds> form (a
|
|
19
|
+
* custom element is inline by default), and styled as one from the first
|
|
20
|
+
* paint: the container rules below name the tag as well as the class, so
|
|
21
|
+
* server-rendered markup inside it doesn't shift when it upgrades. Before
|
|
22
|
+
* the script defines it, an EMPTY element (a manifest still to load) holds
|
|
23
|
+
* --ws-element-height, if you set one. */
|
|
24
|
+
waveform-sounds { display: block; }
|
|
25
|
+
waveform-sounds:not(:defined):empty { min-height: var(--ws-element-height, 0); }
|
|
26
|
+
|
|
18
27
|
/* THE ONE RULE for the inverted states: an element whose background is
|
|
19
28
|
* `var(--ws-accent)` never sets its own `color` — its CHILDREN take the
|
|
20
29
|
* ink. `--ws-accent` defaults to `currentColor`, which resolves where it's
|
|
21
30
|
* used (even registered with @property: Chrome keeps the keyword), so a
|
|
22
31
|
* button with `color: ink; background: currentColor` paints ink on ink. */
|
|
23
|
-
.waveform-sounds {
|
|
32
|
+
:is(.waveform-sounds, waveform-sounds) {
|
|
24
33
|
--ws-accent: currentColor;
|
|
25
34
|
/* The ink on an inverted fill: the page surface (set by you, or
|
|
26
35
|
* measured by the runtime), else the INVERSE of the text colour — right
|
|
@@ -43,20 +52,53 @@
|
|
|
43
52
|
color: inherit;
|
|
44
53
|
font: inherit;
|
|
45
54
|
}
|
|
46
|
-
|
|
47
|
-
|
|
55
|
+
/* The inverse above is relative colour FROM currentColor: Chrome 131,
|
|
56
|
+
* Firefox 133, Safari 18, all newer than the 2.0 floor. Chrome 119–130
|
|
57
|
+
* parse relative colour, but not from currentColor, so the guard names it;
|
|
58
|
+
* Firefox 128–132 parse it but resolve currentColor as black (white ink on
|
|
59
|
+
* a light fill), so they are named too: Firefox (-moz-appearance) without
|
|
60
|
+
* a feature of its 133 (letter-spacing in %). Where it's unusable the ink
|
|
61
|
+
* is the surface the runtime measures. Until it has
|
|
62
|
+
* (a server-rendered first paint, or no script — the runtime sets
|
|
63
|
+
* data-ws-initialized as it measures), there is no ink that is right on
|
|
64
|
+
* every page (the system Canvas is white on a dark page that doesn't declare
|
|
65
|
+
* color-scheme), so a pressed control is a TINT with text-colour ink
|
|
66
|
+
* instead of an inversion: readable on any page. */
|
|
67
|
+
@supports (not (color: rgb(from currentColor r g b))) or ((-moz-appearance: none) and (not (letter-spacing: 1%))) {
|
|
68
|
+
:is(.waveform-sounds, waveform-sounds) { --ws-on-accent: var(--ws-surface, Canvas); }
|
|
69
|
+
:is(.waveform-sounds, waveform-sounds):where(:not([data-ws-initialized])) {
|
|
70
|
+
--ws-accent-fill: color-mix(in srgb, currentColor 22%, transparent);
|
|
71
|
+
--ws-on-accent: currentColor;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
:is(.waveform-sounds, waveform-sounds) *, :is(.waveform-sounds, waveform-sounds) *::before, :is(.waveform-sounds, waveform-sounds) *::after { box-sizing: border-box; }
|
|
75
|
+
:is(.waveform-sounds, waveform-sounds) [hidden] { display: none !important; }
|
|
48
76
|
|
|
49
77
|
.ws-sr {
|
|
50
78
|
position: absolute !important;
|
|
51
79
|
width: 1px; height: 1px;
|
|
52
80
|
margin: -1px; padding: 0;
|
|
53
81
|
overflow: hidden;
|
|
54
|
-
clip:
|
|
82
|
+
clip-path: inset(50%);
|
|
55
83
|
white-space: nowrap;
|
|
56
84
|
border: 0;
|
|
57
85
|
}
|
|
58
86
|
.ws-icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
|
|
59
87
|
|
|
88
|
+
/* ── Controls: shared ────────────────────────────────────────────────── */
|
|
89
|
+
/* The pill-shaped controls share one frame... */
|
|
90
|
+
.ws-search, .ws-menu-btn, .ws-seg, .ws-loop, .ws-chip, .ws-clear, .ws-more {
|
|
91
|
+
border: 1px solid var(--ws-border);
|
|
92
|
+
border-radius: var(--ws-control-radius);
|
|
93
|
+
}
|
|
94
|
+
/* ...and every button starts from the text around it. */
|
|
95
|
+
.ws-menu-btn, .ws-bpm-clear, .ws-seg-btn, .ws-loop, .ws-chip, .ws-clear, .ws-more {
|
|
96
|
+
background: none;
|
|
97
|
+
color: inherit;
|
|
98
|
+
font: inherit;
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
}
|
|
101
|
+
|
|
60
102
|
/* ── Toolbar ─────────────────────────────────────────────────────────── */
|
|
61
103
|
.ws-toolbar {
|
|
62
104
|
display: flex;
|
|
@@ -73,13 +115,12 @@
|
|
|
73
115
|
min-width: 0;
|
|
74
116
|
height: 2.75rem;
|
|
75
117
|
padding: 0 1rem;
|
|
76
|
-
border: 1px solid var(--ws-border);
|
|
77
|
-
border-radius: var(--ws-control-radius);
|
|
78
118
|
background: var(--ws-field);
|
|
79
119
|
color: inherit;
|
|
80
120
|
cursor: text;
|
|
81
121
|
}
|
|
82
|
-
|
|
122
|
+
/* The focus ring is the field's frame, not the bare input inside it. */
|
|
123
|
+
.ws-search:focus-within { border-color: var(--ws-accent); outline: 2px solid var(--ws-accent); outline-offset: 2px; }
|
|
83
124
|
.ws-search-input {
|
|
84
125
|
flex: 1;
|
|
85
126
|
min-width: 0;
|
|
@@ -88,13 +129,14 @@
|
|
|
88
129
|
background: none;
|
|
89
130
|
color: inherit;
|
|
90
131
|
font: inherit;
|
|
91
|
-
outline: none;
|
|
92
132
|
}
|
|
93
|
-
.ws-search
|
|
94
|
-
.ws-search-input::placeholder { color: var(--ws-muted); }
|
|
133
|
+
.ws-search-input:focus { outline: none; } /* the frame above carries the ring */
|
|
134
|
+
.ws-search .ws-icon, .ws-search-input::placeholder { color: var(--ws-muted); }
|
|
135
|
+
/* WebKit/Blink's clear button, redrawn in the text colour. The mask stays
|
|
136
|
+
* prefixed: unprefixed `mask` is Chrome/Edge 120+. */
|
|
95
137
|
.ws-search-input::-webkit-search-cancel-button,
|
|
96
138
|
.ws-menu-search::-webkit-search-cancel-button {
|
|
97
|
-
|
|
139
|
+
appearance: none;
|
|
98
140
|
width: 0.9em;
|
|
99
141
|
height: 0.9em;
|
|
100
142
|
background: currentColor;
|
|
@@ -103,7 +145,9 @@
|
|
|
103
145
|
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.4 5 5 6.4 10.6 12 5 17.6 6.4 19l5.6-5.6 5.6 5.6 1.4-1.4-5.6-5.6L19 6.4 17.6 5 12 10.6z'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
104
146
|
}
|
|
105
147
|
|
|
148
|
+
/* The row of menus, the loops filter and the Loop toggle. */
|
|
106
149
|
.ws-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
|
|
150
|
+
|
|
107
151
|
/* ── Dropdowns (type / key / sort) ──────────────────────────────────── */
|
|
108
152
|
.ws-menu { position: relative; }
|
|
109
153
|
.ws-menu-btn {
|
|
@@ -113,18 +157,13 @@
|
|
|
113
157
|
height: 2.75rem;
|
|
114
158
|
max-width: 16rem;
|
|
115
159
|
padding: 0 0.85rem 0 1rem;
|
|
116
|
-
border: 1px solid var(--ws-border);
|
|
117
|
-
border-radius: var(--ws-control-radius);
|
|
118
160
|
background: var(--ws-field);
|
|
119
|
-
color: inherit;
|
|
120
|
-
font: inherit;
|
|
121
161
|
font-size: 0.9em;
|
|
122
|
-
cursor: pointer;
|
|
123
162
|
}
|
|
124
163
|
.ws-menu-btn:hover { background: var(--ws-hover); }
|
|
125
164
|
.ws-menu-btn[aria-expanded='true'] { border-color: var(--ws-accent); }
|
|
126
165
|
.ws-menu-prefix { color: var(--ws-muted); }
|
|
127
|
-
.ws-menu-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
166
|
+
.ws-menu-value, .ws-menu-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
128
167
|
.ws-menu-chevron { font-size: 1.1em; color: var(--ws-muted); transition: transform 0.15s; }
|
|
129
168
|
.ws-menu-btn[aria-expanded='true'] .ws-menu-chevron { transform: rotate(180deg); }
|
|
130
169
|
.ws-menu-pop {
|
|
@@ -154,9 +193,9 @@
|
|
|
154
193
|
color: inherit;
|
|
155
194
|
font: inherit;
|
|
156
195
|
font-size: 0.9em;
|
|
157
|
-
outline: none;
|
|
158
196
|
}
|
|
159
197
|
.ws-menu-search:focus { border-color: var(--ws-accent); }
|
|
198
|
+
.ws-menu-search:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 1px; }
|
|
160
199
|
.ws-menu-list { list-style: none; margin: 0; padding: 0; max-height: 18rem; overflow-y: auto; outline: none; }
|
|
161
200
|
.ws-menu-option {
|
|
162
201
|
display: flex;
|
|
@@ -172,7 +211,7 @@
|
|
|
172
211
|
.ws-menu-check { visibility: hidden; flex: none; }
|
|
173
212
|
.ws-menu-option[aria-selected='true'] { font-weight: 600; }
|
|
174
213
|
.ws-menu-option[aria-selected='true'] .ws-menu-check { visibility: visible; }
|
|
175
|
-
.ws-menu-text { flex: 1; min-width: 0;
|
|
214
|
+
.ws-menu-text { flex: 1; min-width: 0; }
|
|
176
215
|
.ws-menu-count { font-family: var(--ws-mono); font-size: 0.85em; color: var(--ws-muted); }
|
|
177
216
|
.ws-menu-none { margin: 0; padding: 0.6rem; color: var(--ws-muted); font-size: 0.9em; }
|
|
178
217
|
|
|
@@ -181,14 +220,20 @@
|
|
|
181
220
|
.ws-bpm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.6rem; }
|
|
182
221
|
.ws-bpm-readout { font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
183
222
|
.ws-bpm-clear {
|
|
184
|
-
|
|
223
|
+
/* A 24px target (WCAG 2.5.8) without growing the head. */
|
|
224
|
+
display: inline-flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: center;
|
|
227
|
+
min-width: 24px;
|
|
228
|
+
min-height: 24px;
|
|
229
|
+
margin: -2px -0.3rem -2px 0;
|
|
230
|
+
padding: 0 0.3rem;
|
|
185
231
|
border: 0;
|
|
186
|
-
|
|
232
|
+
border-radius: 4px;
|
|
187
233
|
color: var(--ws-muted);
|
|
188
|
-
font: inherit;
|
|
189
234
|
font-size: 0.85em;
|
|
190
|
-
cursor: pointer;
|
|
191
235
|
}
|
|
236
|
+
.ws-bpm-clear:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 0; }
|
|
192
237
|
.ws-bpm-clear:hover { color: inherit; text-decoration: underline; }
|
|
193
238
|
|
|
194
239
|
/* Two native range inputs stacked on one track. The track and the filled
|
|
@@ -229,12 +274,13 @@
|
|
|
229
274
|
margin: 0;
|
|
230
275
|
background: none;
|
|
231
276
|
pointer-events: none;
|
|
232
|
-
-webkit-appearance: none;
|
|
233
277
|
appearance: none;
|
|
234
278
|
}
|
|
235
279
|
/* When the handles meet, the lower one goes on top (it's the one that can
|
|
236
280
|
* still move: left). */
|
|
237
281
|
.ws-range.is-min-top [data-ws-bpm-min] { z-index: 2; }
|
|
282
|
+
/* The track and thumb pseudo-elements are per engine, each in its own
|
|
283
|
+
* rule: a browser drops a whole selector list over one it doesn't know. */
|
|
238
284
|
.ws-range-input::-webkit-slider-runnable-track { height: 100%; background: none; }
|
|
239
285
|
.ws-range-input::-moz-range-track { background: none; }
|
|
240
286
|
.ws-range-input::-webkit-slider-thumb {
|
|
@@ -247,7 +293,6 @@
|
|
|
247
293
|
box-shadow: 0 0 0 1px var(--ws-border);
|
|
248
294
|
cursor: grab;
|
|
249
295
|
pointer-events: auto;
|
|
250
|
-
-webkit-appearance: none;
|
|
251
296
|
appearance: none;
|
|
252
297
|
}
|
|
253
298
|
.ws-range-input::-moz-range-thumb {
|
|
@@ -274,50 +319,35 @@
|
|
|
274
319
|
font-size: 0.75em;
|
|
275
320
|
font-variant-numeric: tabular-nums;
|
|
276
321
|
}
|
|
277
|
-
.ws-loop {
|
|
278
|
-
display: inline-flex;
|
|
279
|
-
align-items: center;
|
|
280
|
-
gap: 0.45rem;
|
|
281
|
-
height: 2.75rem;
|
|
282
|
-
padding: 0 1rem;
|
|
283
|
-
border: 1px solid var(--ws-border);
|
|
284
|
-
border-radius: var(--ws-control-radius);
|
|
285
|
-
background: none;
|
|
286
|
-
color: inherit;
|
|
287
|
-
font: inherit;
|
|
288
|
-
font-size: 0.9em;
|
|
289
|
-
cursor: pointer;
|
|
290
|
-
}
|
|
291
|
-
.ws-loop[aria-pressed='true'] { border-color: var(--ws-accent); background: var(--ws-accent); }
|
|
292
|
-
.ws-loop[aria-pressed='true'] > * { color: var(--ws-on-accent); }
|
|
293
322
|
|
|
294
|
-
/* Loops or one-shots: a segmented control, one button pressed
|
|
323
|
+
/* ── Loops or one-shots: a segmented control, one button pressed ─────── */
|
|
295
324
|
.ws-seg {
|
|
296
325
|
display: inline-flex;
|
|
297
326
|
height: 2.75rem;
|
|
298
327
|
padding: 0.25rem;
|
|
299
328
|
gap: 0.15rem;
|
|
300
|
-
border: 1px solid var(--ws-border);
|
|
301
|
-
border-radius: var(--ws-control-radius);
|
|
302
329
|
}
|
|
303
330
|
.ws-seg-btn {
|
|
304
331
|
padding: 0 0.85rem;
|
|
305
332
|
border: 0;
|
|
306
333
|
border-radius: var(--ws-control-radius);
|
|
307
|
-
background: none;
|
|
308
|
-
color: inherit;
|
|
309
|
-
font: inherit;
|
|
310
334
|
font-size: 0.88em;
|
|
311
335
|
white-space: nowrap;
|
|
312
|
-
cursor: pointer;
|
|
313
336
|
transition: background 0.15s;
|
|
314
337
|
}
|
|
315
338
|
.ws-seg-btn:hover { background: var(--ws-hover); }
|
|
316
|
-
/* On the accent the CHILD takes the inverted ink: the button itself never
|
|
317
|
-
* sets a colour (see the pause icon note at the top). */
|
|
318
|
-
.ws-seg-btn[aria-pressed='true'] { background: var(--ws-accent); }
|
|
319
|
-
.ws-seg-btn[aria-pressed='true'] > * { color: var(--ws-on-accent); }
|
|
320
339
|
|
|
340
|
+
/* ── The Loop toggle ─────────────────────────────────────────────────── */
|
|
341
|
+
.ws-loop {
|
|
342
|
+
display: inline-flex;
|
|
343
|
+
align-items: center;
|
|
344
|
+
gap: 0.45rem;
|
|
345
|
+
height: 2.75rem;
|
|
346
|
+
padding: 0 1rem;
|
|
347
|
+
font-size: 0.9em;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/* ── Type chips and the count ────────────────────────────────────────── */
|
|
321
351
|
.ws-meta { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
|
|
322
352
|
.ws-types { display: flex; flex-wrap: wrap; gap: 0.4rem; flex: 1 1 auto; min-width: 0; }
|
|
323
353
|
.ws-chip {
|
|
@@ -326,23 +356,27 @@
|
|
|
326
356
|
gap: 0.4rem;
|
|
327
357
|
height: 2.25rem;
|
|
328
358
|
padding: 0 0.9rem;
|
|
329
|
-
border: 1px solid var(--ws-border);
|
|
330
|
-
border-radius: var(--ws-control-radius);
|
|
331
|
-
background: none;
|
|
332
|
-
color: inherit;
|
|
333
|
-
font: inherit;
|
|
334
359
|
font-size: 0.88em;
|
|
335
|
-
cursor: pointer;
|
|
336
360
|
transition: border-color 0.15s, background 0.15s;
|
|
337
361
|
}
|
|
338
362
|
.ws-chip:hover { background: var(--ws-hover); }
|
|
339
|
-
.ws-chip[aria-pressed='true'] { border-color: var(--ws-accent); background: var(--ws-accent); }
|
|
340
|
-
.ws-chip[aria-pressed='true'] > * { color: var(--ws-on-accent); }
|
|
341
363
|
.ws-chip-count { font-family: var(--ws-mono); font-size: 0.85em; opacity: 0.7; }
|
|
364
|
+
.ws-count { margin: 0 0 0 auto; color: var(--ws-muted); font-size: 0.88em; font-variant-numeric: tabular-nums; }
|
|
365
|
+
|
|
366
|
+
/* ── The pressed controls: the accent fill, inverted ink ─────────────── */
|
|
367
|
+
/* After the hovers, so a pressed control keeps its fill under the pointer.
|
|
368
|
+
* The CHILDREN take the ink, never the button (THE ONE RULE, at the top). */
|
|
369
|
+
/* `--ws-accent-fill` is unset, except for a tint before the runtime has
|
|
370
|
+
* measured the surface in engines without relative colour (top of file). */
|
|
371
|
+
.ws-loop[aria-pressed='true'],
|
|
372
|
+
.ws-chip[aria-pressed='true'] { border-color: var(--ws-accent); background: var(--ws-accent-fill, var(--ws-accent)); }
|
|
373
|
+
.ws-seg-btn[aria-pressed='true'] { background: var(--ws-accent-fill, var(--ws-accent)); }
|
|
374
|
+
.ws-loop[aria-pressed='true'] > *,
|
|
375
|
+
.ws-seg-btn[aria-pressed='true'] > *,
|
|
376
|
+
.ws-chip[aria-pressed='true'] > * { color: var(--ws-on-accent); }
|
|
342
377
|
/* Full ink on the accent: a dimmed count on a saturated fill fails contrast
|
|
343
378
|
* (70% measured 4.04:1 on #ff4f24). */
|
|
344
379
|
.ws-chip[aria-pressed='true'] .ws-chip-count { opacity: 1; }
|
|
345
|
-
.ws-count { margin: 0 0 0 auto; color: var(--ws-muted); font-size: 0.88em; font-variant-numeric: tabular-nums; }
|
|
346
380
|
|
|
347
381
|
/* ── Rows ────────────────────────────────────────────────────────────── */
|
|
348
382
|
.ws-list {
|
|
@@ -365,14 +399,17 @@
|
|
|
365
399
|
.ws-row.is-current { background: var(--ws-current); }
|
|
366
400
|
.ws-row.is-error .ws-title { text-decoration: line-through; opacity: 0.6; }
|
|
367
401
|
|
|
368
|
-
|
|
402
|
+
/* The play button and the download link: round icon buttons. */
|
|
403
|
+
.ws-play, .ws-download {
|
|
369
404
|
flex: none;
|
|
370
405
|
display: grid;
|
|
371
406
|
place-items: center;
|
|
372
407
|
width: 2.25rem;
|
|
373
408
|
height: 2.25rem;
|
|
374
|
-
border: 0;
|
|
375
409
|
border-radius: 999px;
|
|
410
|
+
}
|
|
411
|
+
.ws-play {
|
|
412
|
+
border: 0;
|
|
376
413
|
background: var(--ws-field);
|
|
377
414
|
color: inherit;
|
|
378
415
|
font-size: 0.95rem;
|
|
@@ -380,7 +417,7 @@
|
|
|
380
417
|
transition: background 0.15s, color 0.15s;
|
|
381
418
|
}
|
|
382
419
|
.ws-row:hover .ws-play { background: color-mix(in srgb, currentColor 12%, transparent); }
|
|
383
|
-
.ws-row.is-current .ws-play { background: var(--ws-accent); }
|
|
420
|
+
.ws-row.is-current .ws-play { background: var(--ws-accent-fill, var(--ws-accent)); }
|
|
384
421
|
.ws-row.is-current .ws-play > * { color: var(--ws-on-accent); }
|
|
385
422
|
.ws-play .ws-icon-pause { display: none; }
|
|
386
423
|
.ws-row.is-playing .ws-play .ws-icon-play { display: none; }
|
|
@@ -419,12 +456,6 @@
|
|
|
419
456
|
}
|
|
420
457
|
.ws-canvas { display: block; width: 100%; height: 100%; }
|
|
421
458
|
.ws-download {
|
|
422
|
-
flex: none;
|
|
423
|
-
display: grid;
|
|
424
|
-
place-items: center;
|
|
425
|
-
width: 2.25rem;
|
|
426
|
-
height: 2.25rem;
|
|
427
|
-
border-radius: 999px;
|
|
428
459
|
color: var(--ws-muted);
|
|
429
460
|
font-size: 1.05rem;
|
|
430
461
|
text-decoration: none;
|
|
@@ -458,18 +489,17 @@
|
|
|
458
489
|
.ws-cells > .ws-cell:not(:empty) ~ .ws-cell:not(:empty)::before { content: '·'; margin-right: 0.5rem; opacity: 0.6; }
|
|
459
490
|
.ws-wave { grid-area: wave; margin-top: 0.35rem; min-width: 0; }
|
|
460
491
|
.ws-download { grid-area: dl; align-self: start; }
|
|
492
|
+
/* The menus open from the controls row, never wider than it: anchored
|
|
493
|
+
to their own button, a wide panel (the BPM range) near the end of a
|
|
494
|
+
phone-width row hung off the screen's edge. */
|
|
495
|
+
.ws-controls { position: relative; }
|
|
496
|
+
.ws-menu { position: static; }
|
|
497
|
+
.ws-menu-pop { min-width: min(14rem, 100%); max-width: 100%; }
|
|
498
|
+
.ws-bpm-pop { width: min(17rem, 100%); }
|
|
461
499
|
}
|
|
462
500
|
|
|
463
501
|
/* ── Footer bits ─────────────────────────────────────────────────────── */
|
|
464
502
|
.ws-empty { margin: 1.5rem 0; color: var(--ws-muted); }
|
|
465
|
-
.ws-clear, .ws-more {
|
|
466
|
-
border: 1px solid var(--ws-border);
|
|
467
|
-
border-radius: var(--ws-control-radius);
|
|
468
|
-
background: none;
|
|
469
|
-
color: inherit;
|
|
470
|
-
font: inherit;
|
|
471
|
-
cursor: pointer;
|
|
472
|
-
}
|
|
473
503
|
.ws-clear { margin-left: 0.5rem; padding: 0.35rem 0.85rem; font-size: 0.88em; }
|
|
474
504
|
.ws-more { display: block; margin: 1.25rem auto 0; padding: 0.7rem 1.4rem; font-size: 0.92em; }
|
|
475
505
|
.ws-more:hover, .ws-clear:hover { background: var(--ws-hover); }
|
|
@@ -500,6 +530,33 @@
|
|
|
500
530
|
.ws-menu-option { padding: 0.75rem 0.6rem; }
|
|
501
531
|
}
|
|
502
532
|
|
|
533
|
+
/* Forced colours (Windows High Contrast): the pressed states and the
|
|
534
|
+
* playing row's button are the system Highlight, with their icons in
|
|
535
|
+
* HighlightText (left to the system, the inverted ink vanished into the
|
|
536
|
+
* forced background); the BPM track and thumb are drawn in system colours,
|
|
537
|
+
* and focus is an outline, never only a box-shadow (which is dropped). The
|
|
538
|
+
* canvases follow too: the runtime draws them in CanvasText / Highlight. */
|
|
539
|
+
@media (forced-colors: active) {
|
|
540
|
+
.ws-loop[aria-pressed='true'],
|
|
541
|
+
.ws-chip[aria-pressed='true'],
|
|
542
|
+
.ws-seg-btn[aria-pressed='true'],
|
|
543
|
+
.ws-row.is-current .ws-play {
|
|
544
|
+
forced-color-adjust: none;
|
|
545
|
+
border-color: Highlight;
|
|
546
|
+
background: Highlight;
|
|
547
|
+
color: HighlightText;
|
|
548
|
+
}
|
|
549
|
+
.ws-loop[aria-pressed='true'] > *,
|
|
550
|
+
.ws-seg-btn[aria-pressed='true'] > *,
|
|
551
|
+
.ws-chip[aria-pressed='true'] > *,
|
|
552
|
+
.ws-row.is-current .ws-play > * { color: HighlightText; }
|
|
553
|
+
.ws-range::before, .ws-range::after { forced-color-adjust: none; }
|
|
554
|
+
.ws-range::before { background: GrayText; }
|
|
555
|
+
.ws-range::after { background: Highlight; }
|
|
556
|
+
.ws-range-input:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; }
|
|
557
|
+
.ws-menu-option.is-active { outline: 2px solid Highlight; }
|
|
558
|
+
}
|
|
559
|
+
|
|
503
560
|
@media (prefers-reduced-motion: reduce) {
|
|
504
|
-
.ws-row, .ws-chip, .ws-play { transition: none; }
|
|
561
|
+
.ws-row, .ws-chip, .ws-play, .ws-seg-btn, .ws-download, .ws-menu-chevron { transition: none; }
|
|
505
562
|
}
|