@xsynaptic/sonic-ui 0.23.0 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/default/elements/readout.js +3 -2
  3. package/dist/default/elements/sonic-element.js +23 -4
  4. package/dist/default/elements/value-element.js +2 -2
  5. package/dist/default/lib/spoken-duration.js +3 -0
  6. package/dist/default/lib/waveform-bands.js +37 -24
  7. package/dist/default/lib/waveform-scene.js +12 -1
  8. package/dist/dev/elements/readout.js +3 -2
  9. package/dist/dev/elements/readout.js.map +1 -1
  10. package/dist/dev/elements/sonic-element.js +23 -4
  11. package/dist/dev/elements/sonic-element.js.map +1 -1
  12. package/dist/dev/elements/value-element.js +2 -2
  13. package/dist/dev/elements/value-element.js.map +1 -1
  14. package/dist/dev/elements/waveform.d.ts +3 -0
  15. package/dist/dev/lib/spoken-duration.js +3 -0
  16. package/dist/dev/lib/spoken-duration.js.map +1 -1
  17. package/dist/dev/lib/waveform-bands.js +37 -24
  18. package/dist/dev/lib/waveform-bands.js.map +1 -1
  19. package/dist/dev/lib/waveform-scene.d.ts +3 -0
  20. package/dist/dev/lib/waveform-scene.js +12 -1
  21. package/dist/dev/lib/waveform-scene.js.map +1 -1
  22. package/dist/styles/button.css +30 -11
  23. package/dist/styles/dial.css +13 -15
  24. package/dist/styles/envelope.css +2 -2
  25. package/dist/styles/led.css +28 -13
  26. package/dist/styles/material/cap.css +6 -6
  27. package/dist/styles/material/core.css +53 -1
  28. package/dist/styles/material/glass.css +11 -1
  29. package/dist/styles/material/keycap.css +3 -3
  30. package/dist/styles/material/pane.css +8 -6
  31. package/dist/styles/material/readout.css +19 -7
  32. package/dist/styles/material/scale.css +4 -4
  33. package/dist/styles/material/value.css +12 -3
  34. package/dist/styles/meter.css +6 -6
  35. package/dist/styles/panel.css +2 -3
  36. package/dist/styles/ring.css +3 -3
  37. package/dist/styles/segmented.css +6 -6
  38. package/dist/styles/slider.css +28 -29
  39. package/dist/styles/switch.css +49 -51
  40. package/dist/styles/toggle.css +31 -37
  41. package/dist/styles/waveform.css +23 -2
  42. package/dist/styles/wavestrip.css +4 -4
  43. package/dist/styles/xy.css +10 -11
  44. package/package.json +2 -2
@@ -62,15 +62,18 @@
62
62
  line-height: 1;
63
63
  user-select: none;
64
64
  transition: --_sonic-switch-at 90ms cubic-bezier(0.4, 0, 0.2, 1);
65
+ }
65
66
 
66
67
  @media (prefers-reduced-motion: reduce) {
68
+
69
+ .sonic-switch {
67
70
  transition: none;
71
+ }
68
72
  }
69
73
 
70
- & > * {
74
+ .sonic-switch > * {
71
75
  grid-area: 1 / 1;
72
76
  }
73
- }
74
77
 
75
78
  [orientation='horizontal'] > .sonic-switch {
76
79
  --_sonic-switch-along-x: 1;
@@ -99,20 +102,20 @@
99
102
  cursor: pointer;
100
103
  background: transparent;
101
104
  border: 0;
105
+ }
102
106
 
103
- &:disabled {
107
+ .sonic-switch-position:disabled {
104
108
  cursor: default;
105
109
  }
106
110
 
107
- &:focus-visible {
111
+ .sonic-switch-position:focus-visible {
108
112
  outline: var(--sonic-focus-outline, 2px solid transparent);
109
113
  outline-offset: var(--sonic-focus-outline-offset, -2px);
110
114
  }
111
115
 
112
- &:has([data-sonic-momentary]) {
116
+ .sonic-switch-position:has([data-sonic-momentary]) {
113
117
  touch-action: none;
114
118
  }
115
- }
116
119
 
117
120
  .sonic-switch[data-sonic-position-count] > .sonic-switch-position::after {
118
121
  inset-block: 0;
@@ -128,71 +131,68 @@
128
131
  .sonic-switch-label {
129
132
  padding: calc(var(--_sonic-switch-size) * 0.12);
130
133
  white-space: nowrap;
134
+ }
131
135
 
132
- & svg {
136
+ .sonic-switch-label svg {
133
137
  display: block;
134
138
  inline-size: 1em;
135
139
  block-size: 1em;
136
140
  }
137
- }
138
141
 
139
142
  .sonic-switch-position:disabled > .sonic-switch-label {
140
143
  color: var(--sonic-ink-disabled, color-mix(in oklab, currentcolor 30%, transparent));
141
144
  }
142
-
143
- .sonic-switch[data-sonic-position-count] {
144
- & > :is(.sonic-switch-bushing, .sonic-switch-bat) {
145
+ .sonic-switch[data-sonic-position-count] > :is(.sonic-switch-bushing,.sonic-switch-bat) {
145
146
  grid-area: 2 / 1 / -2 / 2;
146
147
  }
147
148
 
148
- & > .sonic-switch-position {
149
+ .sonic-switch[data-sonic-position-count] > .sonic-switch-position {
149
150
  grid-template: subgrid / subgrid;
150
151
  }
151
- }
152
152
 
153
153
  .sonic-switch[data-sonic-position-count='2'] {
154
154
  grid-template:
155
155
  auto repeat(2, calc(var(--_sonic-switch-size) / 2)) auto /
156
156
  minmax(var(--_sonic-switch-size), auto);
157
+ }
157
158
 
158
- & > .sonic-switch-position {
159
+ .sonic-switch[data-sonic-position-count='2'] > .sonic-switch-position {
159
160
  grid-area: 1 / 1 / 3 / 2;
161
+ }
160
162
 
161
- &:last-child {
163
+ :is(.sonic-switch[data-sonic-position-count='2'] > .sonic-switch-position):last-child {
162
164
  grid-area: 3 / 1 / 5 / 2;
165
+ }
163
166
 
164
- & > .sonic-switch-label {
167
+ :is(.sonic-switch[data-sonic-position-count='2'] > .sonic-switch-position):last-child > .sonic-switch-label {
165
168
  grid-row: 2;
166
169
  }
167
- }
168
- }
169
- }
170
170
 
171
171
  .sonic-switch[data-sonic-position-count='3'] {
172
172
  grid-template:
173
173
  auto repeat(3, calc(var(--_sonic-switch-size) / 3)) auto /
174
174
  minmax(var(--_sonic-switch-size), auto) auto;
175
+ }
175
176
 
176
- & > .sonic-switch-position {
177
+ .sonic-switch[data-sonic-position-count='3'] > .sonic-switch-position {
177
178
  grid-area: 1 / 1 / 3 / 2;
179
+ }
178
180
 
179
- &:last-child {
181
+ :is(.sonic-switch[data-sonic-position-count='3'] > .sonic-switch-position):last-child {
180
182
  grid-area: 4 / 1 / 6 / 2;
183
+ }
181
184
 
182
- & > .sonic-switch-label {
185
+ :is(.sonic-switch[data-sonic-position-count='3'] > .sonic-switch-position):last-child > .sonic-switch-label {
183
186
  grid-row: 2;
184
187
  }
185
- }
186
188
 
187
- &:nth-child(2 of .sonic-switch-position) {
189
+ :is(.sonic-switch[data-sonic-position-count='3'] > .sonic-switch-position):nth-child(2 of .sonic-switch-position) {
188
190
  grid-area: 3 / 1 / 4 / 3;
191
+ }
189
192
 
190
- & > .sonic-switch-label {
193
+ :is(.sonic-switch[data-sonic-position-count='3'] > .sonic-switch-position):nth-child(2 of .sonic-switch-position) > .sonic-switch-label {
191
194
  grid-column: 2;
192
195
  }
193
- }
194
- }
195
- }
196
196
 
197
197
  [orientation='horizontal']
198
198
  > .sonic-switch[data-sonic-position-count]
@@ -204,45 +204,45 @@
204
204
  grid-template:
205
205
  minmax(var(--_sonic-switch-size), auto) /
206
206
  auto repeat(2, calc(var(--_sonic-switch-size) / 2)) auto;
207
+ }
207
208
 
208
- & > .sonic-switch-position {
209
+ :is([orientation='horizontal'] > .sonic-switch[data-sonic-position-count='2']) > .sonic-switch-position {
209
210
  grid-area: 1 / 1 / 2 / 3;
211
+ }
210
212
 
211
- &:last-child {
213
+ :is(:is([orientation='horizontal'] > .sonic-switch[data-sonic-position-count='2']) > .sonic-switch-position):last-child {
212
214
  grid-area: 1 / 3 / 2 / 5;
215
+ }
213
216
 
214
- & > .sonic-switch-label {
217
+ :is(:is([orientation='horizontal'] > .sonic-switch[data-sonic-position-count='2']) > .sonic-switch-position):last-child > .sonic-switch-label {
215
218
  grid-area: 1 / 2;
216
219
  }
217
- }
218
- }
219
- }
220
220
 
221
221
  [orientation='horizontal'] > .sonic-switch[data-sonic-position-count='3'] {
222
222
  grid-template:
223
223
  minmax(var(--_sonic-switch-size), auto) auto /
224
224
  auto repeat(3, calc(var(--_sonic-switch-size) / 3)) auto;
225
+ }
225
226
 
226
- & > .sonic-switch-position {
227
+ :is([orientation='horizontal'] > .sonic-switch[data-sonic-position-count='3']) > .sonic-switch-position {
227
228
  grid-area: 1 / 1 / 2 / 3;
229
+ }
228
230
 
229
- &:last-child {
231
+ :is(:is([orientation='horizontal'] > .sonic-switch[data-sonic-position-count='3']) > .sonic-switch-position):last-child {
230
232
  grid-area: 1 / 4 / 2 / 6;
233
+ }
231
234
 
232
- & > .sonic-switch-label {
235
+ :is(:is([orientation='horizontal'] > .sonic-switch[data-sonic-position-count='3']) > .sonic-switch-position):last-child > .sonic-switch-label {
233
236
  grid-area: 1 / 2;
234
237
  }
235
- }
236
238
 
237
- &:nth-child(2 of .sonic-switch-position) {
239
+ :is(:is([orientation='horizontal'] > .sonic-switch[data-sonic-position-count='3']) > .sonic-switch-position):nth-child(2 of .sonic-switch-position) {
238
240
  grid-area: 1 / 3 / 3 / 4;
241
+ }
239
242
 
240
- & > .sonic-switch-label {
243
+ :is(:is([orientation='horizontal'] > .sonic-switch[data-sonic-position-count='3']) > .sonic-switch-position):nth-child(2 of .sonic-switch-position) > .sonic-switch-label {
241
244
  grid-area: 2 / 1;
242
245
  }
243
- }
244
- }
245
- }
246
246
 
247
247
  .sonic-switch-bushing {
248
248
  --_sonic-switch-bushing-shade: color-mix(
@@ -325,9 +325,9 @@
325
325
  calc((1 + var(--_sonic-switch-lean)) * var(--_sonic-cast-y)) calc(1.5 * var(--_sonic-unit))
326
326
  var(--_sonic-drop-shade)
327
327
  );
328
+ }
328
329
 
329
- &::before,
330
- &::after {
330
+ .sonic-switch-bat::before,.sonic-switch-bat::after {
331
331
  position: absolute;
332
332
  inset: 0;
333
333
  margin: auto;
@@ -338,7 +338,7 @@
338
338
  box-shadow: 0 0 0 var(--_sonic-switch-outline) var(--_sonic-switch-rim);
339
339
  }
340
340
 
341
- &::before {
341
+ .sonic-switch-bat::before {
342
342
  --_sonic-switch-shaft-top: calc(
343
343
  var(--_sonic-switch-pivot) + var(--_sonic-switch-along-y) *
344
344
  min(0px, var(--_sonic-switch-throw))
@@ -362,7 +362,7 @@
362
362
  calc(-1 * var(--_sonic-switch-shaft-top));
363
363
  }
364
364
 
365
- &::after {
365
+ .sonic-switch-bat::after {
366
366
  inline-size: var(--_sonic-switch-ball);
367
367
  block-size: var(--_sonic-switch-ball);
368
368
  background-position: calc((var(--_sonic-switch-ball) - var(--_sonic-switch-size)) / 2)
@@ -375,7 +375,6 @@
375
375
  translate: calc(var(--_sonic-switch-along-x) * var(--_sonic-switch-throw))
376
376
  calc(var(--_sonic-switch-along-y) * var(--_sonic-switch-throw));
377
377
  }
378
- }
379
378
 
380
379
  .sonic-switch:has(> .sonic-switch-position:focus-visible) {
381
380
  --_sonic-focus-shadow: var(--_sonic-focus-glow);
@@ -414,13 +413,12 @@
414
413
 
415
414
  .sonic-switch-bat {
416
415
  filter: none;
416
+ }
417
417
 
418
- &::before,
419
- &::after {
418
+ .sonic-switch-bat::before,.sonic-switch-bat::after {
420
419
  background: var(--_sonic-switch-metal);
421
420
  box-shadow: none;
422
421
  }
423
- }
424
422
 
425
423
  .sonic-switch-position:focus-visible {
426
424
  outline-offset: 2px;
@@ -222,8 +222,9 @@
222
222
  transition:
223
223
  scale var(--_sonic-press-duration) cubic-bezier(0.4, 0, 0.2, 1),
224
224
  box-shadow var(--_sonic-press-duration) cubic-bezier(0.4, 0, 0.2, 1);
225
+ }
225
226
 
226
- & > .sonic-led {
227
+ .sonic-toggle-cap > .sonic-led {
227
228
  --_sonic-led-size: var(
228
229
  --sonic-led-size,
229
230
  calc(var(--_sonic-toggle-size) * var(--_sonic-toggle-led-ratio))
@@ -233,10 +234,9 @@
233
234
  box-shadow: inset 0 0 0 max(1px, 0.1 * var(--_sonic-led-size)) var(--_sonic-toggle-led-ring);
234
235
  }
235
236
 
236
- & > * {
237
+ .sonic-toggle-cap > * {
237
238
  color: var(--_sonic-toggle-legend);
238
239
  }
239
- }
240
240
 
241
241
  .sonic-toggle-position {
242
242
  position: relative;
@@ -313,11 +313,11 @@
313
313
  translate: calc(var(--_sonic-toggle-along-x) * var(--_sonic-toggle-ride))
314
314
  calc(var(--_sonic-toggle-along-y) * var(--_sonic-toggle-ride) + var(--_sonic-toggle-sink));
315
315
  transition: opacity var(--_sonic-fade-duration) ease-out;
316
+ }
316
317
 
317
- & > * {
318
+ .sonic-toggle-legend > * {
318
319
  filter: var(--_sonic-engraving);
319
320
  }
320
- }
321
321
 
322
322
  :is(.sonic-toggle-cap, .sonic-toggle-legend) > svg {
323
323
  display: block;
@@ -331,25 +331,23 @@
331
331
 
332
332
  .sonic-toggle-position[aria-checked='true']:has([data-sonic-lit]) > .sonic-toggle-legend {
333
333
  color: var(--_sonic-toggle-legend-lit);
334
+ }
334
335
 
335
- & > * {
336
+ :is(.sonic-toggle-position[aria-checked='true']:has([data-sonic-lit]) > .sonic-toggle-legend) > * {
336
337
  filter: var(--_sonic-engraving) var(--_sonic-legend-glow);
337
338
  }
338
- }
339
-
340
- [legends='outside'] > .sonic-toggle[data-sonic-position-count] {
341
- & > :is(.sonic-toggle-well, .sonic-toggle-cap) {
339
+ :is([legends='outside'] > .sonic-toggle[data-sonic-position-count]) > :is(.sonic-toggle-well,.sonic-toggle-cap) {
342
340
  grid-area: 1 / 2 / 2 / -2;
343
341
  }
344
342
 
345
- & > .sonic-toggle-position {
343
+ :is([legends='outside'] > .sonic-toggle[data-sonic-position-count]) > .sonic-toggle-position {
346
344
  display: grid;
347
345
  grid-area: 1 / 1 / 2 / 3;
348
346
  grid-template: subgrid / subgrid;
349
347
  place-items: center;
350
348
  }
351
349
 
352
- & > .sonic-toggle-position > .sonic-toggle-legend {
350
+ :is([legends='outside'] > .sonic-toggle[data-sonic-position-count]) > .sonic-toggle-position > .sonic-toggle-legend {
353
351
  position: static;
354
352
  display: block;
355
353
  inline-size: auto;
@@ -360,86 +358,82 @@
360
358
  pointer-events: auto;
361
359
  opacity: 1;
362
360
  translate: none;
361
+ }
363
362
 
364
- & > * {
363
+ :is(:is([legends='outside'] > .sonic-toggle[data-sonic-position-count]) > .sonic-toggle-position > .sonic-toggle-legend) > * {
365
364
  filter: none;
366
365
  }
367
- }
368
366
 
369
- & > .sonic-toggle-position:disabled > .sonic-toggle-legend {
367
+ :is([legends='outside'] > .sonic-toggle[data-sonic-position-count]) > .sonic-toggle-position:disabled > .sonic-toggle-legend {
370
368
  color: var(--sonic-ink-disabled, color-mix(in oklab, currentcolor 30%, transparent));
371
369
  }
372
370
 
373
- & > .sonic-toggle-position:last-child > .sonic-toggle-legend {
371
+ :is([legends='outside'] > .sonic-toggle[data-sonic-position-count]) > .sonic-toggle-position:last-child > .sonic-toggle-legend {
374
372
  grid-column: 2;
375
373
  }
376
- }
377
-
378
- [legends='outside'][orientation='vertical'] > .sonic-toggle[data-sonic-position-count] {
379
- & > :is(.sonic-toggle-well, .sonic-toggle-cap) {
374
+ :is([legends='outside'][orientation='vertical'] > .sonic-toggle[data-sonic-position-count]) > :is(.sonic-toggle-well,.sonic-toggle-cap) {
380
375
  grid-area: 2 / 1 / -2 / 2;
381
376
  }
382
377
 
383
- & > .sonic-toggle-position {
378
+ :is([legends='outside'][orientation='vertical'] > .sonic-toggle[data-sonic-position-count]) > .sonic-toggle-position {
384
379
  grid-area: 1 / 1 / 3 / 2;
385
380
  }
386
381
 
387
- & > .sonic-toggle-position:last-child > .sonic-toggle-legend {
382
+ :is([legends='outside'][orientation='vertical'] > .sonic-toggle[data-sonic-position-count]) > .sonic-toggle-position:last-child > .sonic-toggle-legend {
388
383
  grid-area: 2 / 1;
389
384
  }
390
- }
391
385
 
392
386
  [legends='outside'] > .sonic-toggle[data-sonic-position-count='2'] {
393
387
  grid-template: var(--_sonic-toggle-size) / auto repeat(2, var(--_sonic-toggle-slice)) auto;
388
+ }
394
389
 
395
- & > .sonic-toggle-position:last-child {
390
+ :is([legends='outside'] > .sonic-toggle[data-sonic-position-count='2']) > .sonic-toggle-position:last-child {
396
391
  grid-area: 1 / 3 / 2 / 5;
397
392
  }
398
- }
399
393
 
400
394
  [legends='outside'] > .sonic-toggle[data-sonic-position-count='3'] {
401
395
  grid-template: var(--_sonic-toggle-size) auto / auto repeat(3, var(--_sonic-toggle-slice)) auto;
396
+ }
402
397
 
403
- & > .sonic-toggle-position:last-child {
398
+ :is([legends='outside'] > .sonic-toggle[data-sonic-position-count='3']) > .sonic-toggle-position:last-child {
404
399
  grid-area: 1 / 4 / 2 / 6;
405
400
  }
406
401
 
407
- & > .sonic-toggle-position:nth-child(2 of .sonic-toggle-position) {
402
+ :is([legends='outside'] > .sonic-toggle[data-sonic-position-count='3']) > .sonic-toggle-position:nth-child(2 of .sonic-toggle-position) {
408
403
  grid-area: 1 / 3 / 3 / 4;
404
+ }
409
405
 
410
- & > .sonic-toggle-legend {
406
+ :is(:is([legends='outside'] > .sonic-toggle[data-sonic-position-count='3']) > .sonic-toggle-position:nth-child(2 of .sonic-toggle-position)) > .sonic-toggle-legend {
411
407
  grid-row: 2;
412
408
  }
413
- }
414
- }
415
409
 
416
410
  [legends='outside'][orientation='vertical'] > .sonic-toggle[data-sonic-position-count='2'] {
417
411
  grid-template:
418
412
  auto repeat(2, var(--_sonic-toggle-slice)) auto /
419
413
  minmax(var(--_sonic-toggle-size), auto);
414
+ }
420
415
 
421
- & > .sonic-toggle-position:last-child {
416
+ :is([legends='outside'][orientation='vertical'] > .sonic-toggle[data-sonic-position-count='2']) > .sonic-toggle-position:last-child {
422
417
  grid-area: 3 / 1 / 5 / 2;
423
418
  }
424
- }
425
419
 
426
420
  [legends='outside'][orientation='vertical'] > .sonic-toggle[data-sonic-position-count='3'] {
427
421
  grid-template:
428
422
  auto repeat(3, var(--_sonic-toggle-slice)) auto /
429
423
  minmax(var(--_sonic-toggle-size), auto) auto;
424
+ }
430
425
 
431
- & > .sonic-toggle-position:last-child {
426
+ :is([legends='outside'][orientation='vertical'] > .sonic-toggle[data-sonic-position-count='3']) > .sonic-toggle-position:last-child {
432
427
  grid-area: 4 / 1 / 6 / 2;
433
428
  }
434
429
 
435
- & > .sonic-toggle-position:nth-child(2 of .sonic-toggle-position) {
430
+ :is([legends='outside'][orientation='vertical'] > .sonic-toggle[data-sonic-position-count='3']) > .sonic-toggle-position:nth-child(2 of .sonic-toggle-position) {
436
431
  grid-area: 3 / 1 / 4 / 3;
432
+ }
437
433
 
438
- & > .sonic-toggle-legend {
434
+ :is(:is([legends='outside'][orientation='vertical'] > .sonic-toggle[data-sonic-position-count='3']) > .sonic-toggle-position:nth-child(2 of .sonic-toggle-position)) > .sonic-toggle-legend {
439
435
  grid-area: 1 / 2;
440
436
  }
441
- }
442
- }
443
437
 
444
438
  @media (prefers-reduced-motion: reduce) {
445
439
  .sonic-toggle,
@@ -54,6 +54,24 @@
54
54
  initial-value: 1;
55
55
  }
56
56
 
57
+ @property --_sonic-waveform-band-normalize {
58
+ syntax: '<number>';
59
+ inherits: true;
60
+ initial-value: 1;
61
+ }
62
+
63
+ @property --_sonic-waveform-band-contrast {
64
+ syntax: '<number>';
65
+ inherits: true;
66
+ initial-value: 1;
67
+ }
68
+
69
+ @property --_sonic-waveform-band-tilt {
70
+ syntax: '<number>';
71
+ inherits: true;
72
+ initial-value: 0;
73
+ }
74
+
57
75
  @property --_sonic-waveform-grid {
58
76
  syntax: '<color>';
59
77
  inherits: true;
@@ -122,6 +140,9 @@
122
140
  --_sonic-waveform-band-opacity: calc(
123
141
  var(--sonic-waveform-band-opacity, 1) * var(--_sonic-waveform-band-dim, 1)
124
142
  );
143
+ --_sonic-waveform-band-normalize: var(--sonic-waveform-band-normalize, 1);
144
+ --_sonic-waveform-band-contrast: var(--sonic-waveform-band-contrast, 1);
145
+ --_sonic-waveform-band-tilt: var(--sonic-waveform-band-tilt, 0);
125
146
  --_sonic-waveform-grid: var(--sonic-waveform-grid, var(--_sonic-etch));
126
147
  --_sonic-waveform-ends: var(--sonic-waveform-ends, var(--_sonic-etch));
127
148
  --_sonic-waveform-placeholder: var(--sonic-waveform-placeholder, var(--_sonic-etch));
@@ -259,12 +280,12 @@
259
280
 
260
281
  .sonic-waveform-label {
261
282
  color: CanvasText;
283
+ }
262
284
 
263
- &[data-sonic-dimmed] {
285
+ .sonic-waveform-label[data-sonic-dimmed] {
264
286
  color: GrayText;
265
287
  filter: none;
266
288
  }
267
- }
268
289
 
269
290
  .sonic-waveform-playhead {
270
291
  background: CanvasText;
@@ -178,15 +178,15 @@
178
178
  --_sonic-marker-colour: var(--_sonic-marker, var(--_sonic-marker-default));
179
179
 
180
180
  position: absolute;
181
+ }
181
182
 
182
- &[data-sonic-dimmed] {
183
+ [data-sonic-dimmed]:is(.sonic-wavestrip-marker,.sonic-wavestrip-region) {
183
184
  --_sonic-marker-colour: color-mix(
184
185
  in oklab,
185
186
  var(--_sonic-marker, var(--_sonic-marker-default)) 45%,
186
187
  transparent
187
188
  );
188
189
  }
189
- }
190
190
 
191
191
  .sonic-wavestrip-marker {
192
192
  inset: calc(var(--_sonic-marker-lane, 0) * var(--_sonic-marker-step)) auto auto
@@ -233,11 +233,11 @@
233
233
  --_sonic-marker-colour: CanvasText;
234
234
 
235
235
  forced-color-adjust: none;
236
+ }
236
237
 
237
- &[data-sonic-dimmed] {
238
+ [data-sonic-dimmed]:is(.sonic-wavestrip-marker,.sonic-wavestrip-region) {
238
239
  --_sonic-marker-colour: GrayText;
239
240
  }
240
- }
241
241
 
242
242
  .sonic-wavestrip-marker {
243
243
  background: var(--_sonic-marker-colour);
@@ -64,14 +64,14 @@
64
64
  position: absolute;
65
65
  inset: 0;
66
66
  pointer-events: none;
67
+ }
67
68
 
68
- &::before,
69
- &::after {
69
+ .sonic-xy-field::before,.sonic-xy-field::after {
70
70
  position: absolute;
71
71
  content: '';
72
72
  }
73
73
 
74
- &::before {
74
+ .sonic-xy-field::before {
75
75
  inset: auto 0
76
76
  calc(
77
77
  var(--_sonic-xy-y, 0) * var(--_sonic-xy-travel-y) +
@@ -96,7 +96,7 @@
96
96
  var(--_sonic-unlit);
97
97
  }
98
98
 
99
- &::after {
99
+ .sonic-xy-field::after {
100
100
  inset: 0 auto 0
101
101
  calc(
102
102
  var(--_sonic-xy-x, 0) * var(--_sonic-xy-travel-x) +
@@ -120,7 +120,6 @@
120
120
  ),
121
121
  var(--_sonic-unlit);
122
122
  }
123
- }
124
123
 
125
124
  :is(.sonic-xy-bracket, .sonic-xy-puck) {
126
125
  position: absolute;
@@ -146,8 +145,9 @@
146
145
  cursor: var(--_sonic-xy-cursor);
147
146
  filter: drop-shadow(0 0 calc(0.15 * var(--_sonic-xy-puck)) var(--_sonic-xy-puck-glow));
148
147
  transition: filter var(--_sonic-fade-duration) ease-out;
148
+ }
149
149
 
150
- &::before {
150
+ .sonic-xy-puck::before {
151
151
  position: absolute;
152
152
  inset: 25%;
153
153
  pointer-events: none;
@@ -162,7 +162,6 @@
162
162
  border-color var(--_sonic-fade-duration) ease-out,
163
163
  outline-color var(--_sonic-fade-duration) ease-out;
164
164
  }
165
- }
166
165
 
167
166
  @media (hover: hover) {
168
167
  :not(:disabled, :state(dragging)) > .sonic-xy > .sonic-xy-puck:hover {
@@ -208,10 +207,10 @@
208
207
  forced-color-adjust: none;
209
208
 
210
209
  /* The axis's own outline is the focus here */
211
- &::before {
210
+ }
211
+ .sonic-xy-puck::before {
212
212
  outline-style: none;
213
213
  }
214
- }
215
214
 
216
215
  :state(dragging) > .sonic-xy > .sonic-xy-puck {
217
216
  --_sonic-xy-puck-fill: Canvas;
@@ -224,10 +223,10 @@
224
223
 
225
224
  .sonic-xy-axis:focus-visible {
226
225
  outline-offset: 2px;
226
+ }
227
227
 
228
- &[data-sonic-pointer-focus] {
228
+ .sonic-xy-axis[data-sonic-pointer-focus]:focus-visible {
229
229
  outline-style: none;
230
230
  }
231
- }
232
231
  }
233
232
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsynaptic/sonic-ui",
3
- "version": "0.23.0",
3
+ "version": "0.24.1",
4
4
  "description": "Native custom elements for audio interfaces, skinned with CSS custom properties",
5
5
  "keywords": [
6
6
  "custom-elements",
@@ -81,7 +81,7 @@
81
81
  "typescript": "^6.0.3"
82
82
  },
83
83
  "scripts": {
84
- "build": "tsdown",
84
+ "build": "tsdown && node ../../scripts/lower-sheets.ts",
85
85
  "check-types": "tsc --noEmit"
86
86
  }
87
87
  }