@kitlangton/knobs 0.1.0 → 0.2.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/README.md +174 -30
- package/dist/dev/{chunk-e13znr7c.js → chunk-4km87zfx.js} +3 -3
- package/dist/dev/{chunk-ktsn42p7.js → chunk-5cr85vv6.js} +7448 -5390
- package/dist/dev/{chunk-kdewv0mt.js → chunk-693jd1gj.js} +171 -70
- package/dist/dev/{chunk-qtt698hp.js → chunk-gezhc24g.js} +21 -7
- package/dist/dev/index.js +377 -106
- package/dist/index.js +392 -108
- package/dist/panel.js +9518 -6749
- package/dist/types/core/random.d.ts +61 -1
- package/dist/types/core/remote.d.ts +3 -1
- package/dist/types/core/schema.d.ts +30 -6
- package/dist/types/core/store.d.ts +68 -6
- package/dist/types/core/variants.d.ts +10 -2
- package/dist/types/index.d.ts +3 -2
- package/dist/types/panel/editors.d.ts +11 -0
- package/dist/types/panel/flash.d.ts +13 -0
- package/dist/types/panel/gpu/renderer.d.ts +78 -6
- package/dist/types/panel/haptics.d.ts +6 -2
- package/dist/types/panel/has.d.ts +0 -1
- package/dist/types/panel/index.d.ts +1 -0
- package/dist/types/panel/inspector.d.ts +32 -2
- package/dist/types/panel/optkeys.d.ts +7 -0
- package/dist/types/panel/presets.d.ts +17 -5
- package/dist/types/panel/ramp-morph.d.ts +117 -0
- package/dist/types/panel/ramps.d.ts +1 -1
- package/dist/types/panel/reel.d.ts +43 -0
- package/dist/types/panel/scope.d.ts +19 -0
- package/dist/types/panel/slider.d.ts +1 -1
- package/dist/types/panel/sound.d.ts +137 -0
- package/dist/types/panel/styles.d.ts +1 -1
- package/dist/types/panel/toolbar-grid.d.ts +6 -0
- package/dist/types/ui/activity-css.d.ts +1 -0
- package/dist/types/ui/activity-model.d.ts +122 -0
- package/dist/types/ui/activity.d.ts +67 -0
- package/dist/types/ui/follow.d.ts +17 -0
- package/dist/types/ui/index.d.ts +5 -1
- package/dist/types/ui/look.d.ts +9 -0
- package/dist/types/ui/picker-css.d.ts +1 -0
- package/dist/types/ui/picker-model.d.ts +53 -0
- package/dist/types/ui/picker.d.ts +67 -0
- package/dist/types/ui/react.d.ts +27 -0
- package/dist/types/ui/solid.d.ts +23 -0
- package/dist/types/ui/split-model.d.ts +54 -0
- package/dist/types/ui/split.d.ts +17 -0
- package/dist/ui-react.js +3239 -567
- package/dist/ui-solid.js +3123 -472
- package/dist/ui.js +2688 -100
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
springEasing,
|
|
5
5
|
springCss2,
|
|
6
6
|
storageKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-gezhc24g.js";
|
|
8
8
|
|
|
9
9
|
// src/panel/icons.ts
|
|
10
10
|
var ICONS = {
|
|
@@ -186,6 +186,23 @@ function entranceOffset(elapsed, duration, hold = 0.14) {
|
|
|
186
186
|
return (1 + 10 * p) * Math.exp(-10 * p);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
// src/panel/flash.ts
|
|
190
|
+
var FLASH_MS = 320, flashes = /* @__PURE__ */ new WeakMap;
|
|
191
|
+
function flash(button, wake) {
|
|
192
|
+
if (!button || button.hidden)
|
|
193
|
+
return;
|
|
194
|
+
flashes.set(button, button.ownerDocument.defaultView?.performance.now() ?? performance.now()), button.dataset.kFlash = button.dataset.kFlash === "a" ? "b" : "a", wake?.();
|
|
195
|
+
}
|
|
196
|
+
function flashOf(button, now) {
|
|
197
|
+
let at = flashes.get(button);
|
|
198
|
+
if (at === void 0)
|
|
199
|
+
return 0;
|
|
200
|
+
let p = (now - at) / 320;
|
|
201
|
+
if (p >= 1 || p < 0)
|
|
202
|
+
return 0;
|
|
203
|
+
return (1 - p) ** 3;
|
|
204
|
+
}
|
|
205
|
+
|
|
189
206
|
// src/panel/rolling-css.ts
|
|
190
207
|
var rolling_css_default = `.rn-root {
|
|
191
208
|
display: inline-block;
|
|
@@ -377,7 +394,7 @@ var problemsPreset = {
|
|
|
377
394
|
};
|
|
378
395
|
|
|
379
396
|
// src/panel/styles.ts
|
|
380
|
-
var lead = springEasing(LEAD.omega, LEAD.zeta), trail = springEasing(TRAIL.omega, TRAIL.zeta), fill = springEasing(FILL.omega, FILL.zeta), LEAD_T = `${lead.ms}ms var(--k-lead)`, TRAIL_T = `calc(${trail.ms}ms * (.6 + .4 * clamp(0, var(--k-blur), 2))) var(--k-trail)`, FILL_T = "calc(var(--k-fill-ms) * 1ms * clamp(var(--k-blur),.1,2)) var(--k-fill-ease)", SLIDE_T = "calc(var(--k-fill-ms) * 1ms) var(--k-fill-ease)", DELAY = "var(--k-delay,0ms)", POINTER_ROW = ".knobs-panel[data-k-row-hover]:not([data-keyboard])", DELAYED = ".knobs-fill,.knobs-handle,.knobs-seg-pill,.knobs-toggle,.knobs-toggle i,.knobs-arm,.knobs-curve,.knobs-swatch,.knobs-strip-thumb,.knobs-pad>i,.knobs-ease-handle,.knobs-range-fill,.knobs-range-thumb,.knobs-dial-hand,.knobs-grad,.knobs-grad-mini,.knobs-grad-mini>i,.knobs-grad-stop,.knobs-graph-pt", GRAD_N = GRADIENT_SAMPLES, gradStops = (at) => Array.from({ length: GRAD_N }, (_, i) => `var(--kgrad-${i}) ${at(i)}`).join(","), GRAD_STRIP = `linear-gradient(to right,${gradStops((i) => `calc(var(--kg-r) + (100% - var(--kg-r) * 2) * ${Number((i / (GRAD_N - 1)).toFixed(5))})`)})`, GRAD_MINI = `linear-gradient(to right,${gradStops((i) => `${Number((i / (GRAD_N - 1) * 100).toFixed(3))}%`)})`,
|
|
397
|
+
var lead = springEasing(LEAD.omega, LEAD.zeta), trail = springEasing(TRAIL.omega, TRAIL.zeta), fill = springEasing(FILL.omega, FILL.zeta), LEAD_T = `${lead.ms}ms var(--k-lead)`, TRAIL_T = `calc(${trail.ms}ms * (.6 + .4 * clamp(0, var(--k-blur), 2))) var(--k-trail)`, FILL_T = "calc(var(--k-fill-ms) * 1ms * clamp(var(--k-blur),.1,2)) var(--k-fill-ease)", SLIDE_T = "calc(var(--k-fill-ms) * 1ms) var(--k-fill-ease)", snappy = springEasing(2 * Math.PI / 0.25, 1), snappyOut = springEasing(2 * Math.PI / 0.2, 1), BLOOM_IN = `${snappy.ms}ms ${snappy.easing}`, BLOOM_OUT = `${snappyOut.ms}ms ${snappyOut.easing}`, DELAY = "var(--k-delay,0ms)", POINTER_ROW = ".knobs-panel[data-k-row-hover]:not([data-keyboard])", DELAYED = ".knobs-fill,.knobs-handle,.knobs-seg-pill,.knobs-toggle,.knobs-toggle i,.knobs-arm,.knobs-curve,.knobs-swatch,.knobs-strip-thumb,.knobs-pad>i,.knobs-ease-handle,.knobs-range-track,.knobs-range-fill,.knobs-range-thumb,.knobs-dial-hand,.knobs-grad,.knobs-grad-mini,.knobs-grad-mini>i,.knobs-grad-stop,.knobs-graph-pt", GRAD_N = GRADIENT_SAMPLES, gradStops = (at) => Array.from({ length: GRAD_N }, (_, i) => `var(--kgrad-${i}) ${at(i)}`).join(","), GRAD_STRIP = `linear-gradient(to right,${gradStops((i) => `calc(var(--kg-r) + (100% - var(--kg-r) * 2) * ${Number((i / (GRAD_N - 1)).toFixed(5))})`)})`, GRAD_MINI = `linear-gradient(to right,${gradStops((i) => `${Number((i / (GRAD_N - 1) * 100).toFixed(3))}%`)})`, GRAD_PROPS = Array.from({ length: GRAD_N }, (_, i) => `@property --kgrad-${i}{syntax:"<color>";inherits:false;initial-value:transparent}`).join(`
|
|
381
398
|
`), COLOR_TOKENS = [
|
|
382
399
|
"bg",
|
|
383
400
|
"surface",
|
|
@@ -413,8 +430,12 @@ ${register(["width"], "<length-percentage>", "288px")}
|
|
|
413
430
|
@property --k-copy{syntax:"<number>";inherits:true;initial-value:1}
|
|
414
431
|
@property --k-check{syntax:"<number>";inherits:true;initial-value:0}
|
|
415
432
|
@property --k-check-a{syntax:"<number>";inherits:true;initial-value:0}
|
|
433
|
+
@property --k-head-s{syntax:"<number>";inherits:true;initial-value:0}
|
|
434
|
+
@property --k-head-v{syntax:"<number>";inherits:true;initial-value:0}
|
|
416
435
|
@property --kc-value-size{syntax:"<length>";inherits:true;initial-value:11.5px}
|
|
417
436
|
@property --kr-lo{syntax:"<number>";inherits:true;initial-value:0}
|
|
437
|
+
@property --kpt-sel{syntax:"<number>";inherits:false;initial-value:1}
|
|
438
|
+
@property --kgs-sel{syntax:"<number>";inherits:false;initial-value:1}
|
|
418
439
|
@property --kr-hi{syntax:"<number>";inherits:true;initial-value:0}
|
|
419
440
|
@property --kr-show-lo{syntax:"<number>";inherits:true;initial-value:0}
|
|
420
441
|
@property --kr-show-hi{syntax:"<number>";inherits:true;initial-value:0}
|
|
@@ -431,7 +452,7 @@ ${GRAD_PROPS}
|
|
|
431
452
|
--k-mono:"SF Mono",SFMono-Regular,ui-monospace,Menlo,monospace;
|
|
432
453
|
--k-spring:0.24 0.16;--k-ease:cubic-bezier(.2,.8,.2,1);--k-reveal-ease:var(--k-ease);
|
|
433
454
|
--k-font-weight:400;--k-title-weight:600;--k-thumb:#fff;--k-lift:1;--k-frame:card;
|
|
434
|
-
--k-row-gap:0px;--k-hover-in:
|
|
455
|
+
--k-row-gap:0px;--k-hover-in:0;--k-hover-out:120;--k-fill-base:var(--k-surface-hi);--k-fill-rest-mix:20%;--k-fill-hover-mix:var(--k-fill-rest-mix);--k-fill-active-mix:30%;--k-chrome:1;--k-handle:var(--k-accent);--k-handle-inset:0px;--k-handle-rest:0;--k-step-resist:0.25;--k-motion-blur:0;--k-range-blur:.5;--k-curve-blur:.5;--k-group-transform:uppercase;--k-value-font:var(--k-font);
|
|
435
456
|
--k-lead:${lead.easing};--k-trail:${trail.easing};--k-fill-ease:${fill.easing};--k-fill-ms:${fill.ms};
|
|
436
457
|
}
|
|
437
458
|
/* Glass edges are hairlines: --k-rim-width is one device pixel at common pixel ratios. */
|
|
@@ -556,7 +577,7 @@ ${GRAD_PROPS}
|
|
|
556
577
|
background:color-mix(in srgb,color-mix(in srgb,var(--k-bg) calc(100% - var(--k-glass) * 20%),transparent) calc(var(--k-chrome) * 100%),transparent);border-color:transparent;
|
|
557
578
|
--k-backdrop:blur(calc(var(--k-glass) * var(--k-chrome) * 24px)) saturate(calc(1 + var(--k-glass) * var(--k-chrome) * .8)) brightness(calc(1 + (var(--k-glass-tone) - 1) * var(--k-glass) * var(--k-chrome)))}
|
|
558
579
|
@keyframes knobs-in{from{opacity:0;transform:translateY(4px) scale(.985)}to{opacity:1;transform:none}}
|
|
559
|
-
@media(prefers-reduced-motion:reduce){.knobs-panel{animation:none}.knobs-panel *{transition:none!important}}
|
|
580
|
+
@media(prefers-reduced-motion:reduce){.knobs-panel{animation:none}.knobs-panel *{transition:none!important}.knobs-keys .knobs-keys-text,.knobs-number,.knobs-cell-edit{animation:none}}
|
|
560
581
|
|
|
561
582
|
/* A scoped reset, (0,1,1): above a host's element rules (button{...}, button:hover{...},
|
|
562
583
|
input[type=text]{...}) and below every knobs rule that styles these elements, which are all
|
|
@@ -570,6 +591,30 @@ ${GRAD_PROPS}
|
|
|
570
591
|
/* Header */
|
|
571
592
|
.knobs-panel header{display:flex;align-items:center;justify-content:space-between;gap:6px;cursor:grab;touch-action:none;padding:0 var(--k-inset) var(--k-section-gap);min-height:var(--k-icon-btn)}
|
|
572
593
|
.knobs-panel.knobs-inline header,.knobs-panel.knobs-inline header:active{cursor:default}
|
|
594
|
+
/* The title row stays pinned while the rows scroll under it, in the panel (it scrolls once it's
|
|
595
|
+
bounded) or, with .knobs-pin-ancestor (which also makes the panel overflow:visible), in the
|
|
596
|
+
nearest scroller around it. Once rows are under it, and only then, it frosts (backdrop blur over
|
|
597
|
+
the panel's colour) and softens its foot with a short fade. That's scroll-driven, with no
|
|
598
|
+
script: --k-head-s follows the panel's own scroll, --k-head-v (pinned to an ancestor) the
|
|
599
|
+
panel's top passing its scroller's, over their first 24px. Until then the header is as it
|
|
600
|
+
always was: no background, no filter, no change in spacing. The GPU reads them too, to clip the
|
|
601
|
+
rows at the header's foot and fade them in below it. Without scroll-driven animations nothing
|
|
602
|
+
pins. */
|
|
603
|
+
@keyframes knobs-head-s{from{-webkit-backdrop-filter:none;backdrop-filter:none}to{--k-head-s:1;-webkit-backdrop-filter:blur(16px) saturate(1.4);backdrop-filter:blur(16px) saturate(1.4)}}
|
|
604
|
+
@keyframes knobs-head-v{from{-webkit-backdrop-filter:none;backdrop-filter:none}to{--k-head-v:1;-webkit-backdrop-filter:blur(16px) saturate(1.4);backdrop-filter:blur(16px) saturate(1.4)}}
|
|
605
|
+
@supports (animation-timeline:scroll()){
|
|
606
|
+
.knobs-panel:not(.knobs-page){scroll-timeline:--knobs-self block}
|
|
607
|
+
.knobs-panel.knobs-pin-ancestor:not(.knobs-page){overflow:visible;view-timeline:--knobs-view block}
|
|
608
|
+
.knobs-panel:not(.knobs-page)>header{position:sticky;top:0;z-index:4;border-radius:max(0px,calc(var(--k-panel-radius) - 1px)) max(0px,calc(var(--k-panel-radius) - 1px)) 0 0;
|
|
609
|
+
--k-head-on:max(var(--k-head-s),var(--k-head-v));--k-head-bg:color-mix(in srgb,var(--k-bg) 88%,transparent);
|
|
610
|
+
background:color-mix(in srgb,var(--k-head-bg) calc(var(--k-head-on) * 100%),transparent);
|
|
611
|
+
animation:knobs-head-s linear both;animation-timeline:--knobs-self;animation-range:0px 24px}
|
|
612
|
+
.knobs-panel.knobs-pin-ancestor:not(.knobs-page)>header{animation:knobs-head-v linear both;animation-timeline:--knobs-view;animation-range:exit-crossing 0px exit-crossing 24px}
|
|
613
|
+
.knobs-panel:not(.knobs-page)>header::after{content:"";position:absolute;left:0;right:0;top:100%;height:10px;pointer-events:none;
|
|
614
|
+
background:linear-gradient(var(--k-head-bg),transparent);opacity:var(--k-head-on)}
|
|
615
|
+
.knobs-panel[data-gpu-active="true"]:not(.knobs-page)>header{background:transparent!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
|
|
616
|
+
.knobs-panel[data-gpu-active="true"]:not(.knobs-page)>header::after{display:none}
|
|
617
|
+
}
|
|
573
618
|
.knobs-panel header:active{cursor:grabbing}
|
|
574
619
|
.knobs-panel header strong{flex:1;min-width:0;font-weight:var(--k-title-weight);font-size:var(--k-text-title);letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .2s var(--k-ease)}
|
|
575
620
|
/* Holding \\ shows the values from before the last change; the title dims meanwhile. */
|
|
@@ -582,26 +627,36 @@ ${GRAD_PROPS}
|
|
|
582
627
|
.knobs-panel[data-gpu-active="true"] .knobs-die-icon>canvas{visibility:hidden}
|
|
583
628
|
/* The tools sit quiet (--k-dim) until the panel has the pointer or keyboard focus, then read as
|
|
584
629
|
labels, and as text under the pointer. */
|
|
585
|
-
.knobs-panel header button{position:relative;width:var(--k-icon-btn);height:var(--k-icon-btn);padding:0;display:inline-flex;align-items:center;justify-content:center;color:var(--k-dim);background:transparent;border-radius:var(--k-round);cursor:pointer;font-size:12px;line-height:1;transition:background
|
|
630
|
+
.knobs-panel header button{position:relative;width:var(--k-icon-btn);height:var(--k-icon-btn);padding:0;display:inline-flex;align-items:center;justify-content:center;color:var(--k-dim);background:transparent;border-radius:var(--k-round);cursor:pointer;font-size:12px;line-height:1;transition:background var(--k-hover-t),color var(--k-hover-t),opacity .15s}
|
|
586
631
|
.knobs-panel:is(:hover,:has(:focus-visible)) header button{color:var(--k-label)}
|
|
587
632
|
.knobs-panel header button:is(:hover:not([disabled]),:focus-visible),.knobs-panel header button[aria-expanded="true"]{background:var(--k-surface-hi);color:var(--k-text)}
|
|
588
633
|
.knobs-panel header button[disabled]{opacity:var(--k-disabled-opacity);cursor:default}
|
|
589
634
|
/* The close X's ink sits a fifth of its box in from each side, a digit's barely: nudged right, its
|
|
590
635
|
ink ends where the values' digits do. */
|
|
591
636
|
.knobs-panel header .knobs-close>.knobs-icon{translate:calc(var(--k-icon-size) * .1) 0}
|
|
592
|
-
/* Undo
|
|
593
|
-
|
|
594
|
-
.knobs-head-history
|
|
595
|
-
.knobs-head-
|
|
596
|
-
.knobs-panel .knobs-head-
|
|
597
|
-
|
|
637
|
+
/* Undo · Redo sit apart from Reset · Copy · Random. Undo, Redo and Reset (and a group's reset)
|
|
638
|
+
keep their slots while they're away and bloom in and out of them: nothing beside them moves. */
|
|
639
|
+
.knobs-head-history{display:flex;flex:none;margin-right:calc(var(--k-unit) * 1.5)}
|
|
640
|
+
.knobs-panel :is(.knobs-head-actions,.knobs-group-head) button[data-shown]{transition:background var(--k-hover-t),color var(--k-hover-t),opacity ${BLOOM_IN},scale ${BLOOM_IN},filter 0s,visibility 0s}
|
|
641
|
+
.knobs-panel :is(.knobs-head-actions,.knobs-group-head) button[data-shown="false"]{opacity:0;scale:.9;filter:blur(2.5px);visibility:hidden;
|
|
642
|
+
transition:background var(--k-hover-t),color var(--k-hover-t),opacity ${BLOOM_OUT},scale ${BLOOM_OUT},filter ${BLOOM_OUT},visibility 0s ${snappyOut.ms}ms}
|
|
643
|
+
@media(prefers-reduced-motion:reduce){
|
|
644
|
+
.knobs-panel :is(.knobs-head-actions,.knobs-group-head) button[data-shown]{transition:opacity .15s,visibility 0s!important}
|
|
645
|
+
.knobs-panel :is(.knobs-head-actions,.knobs-group-head) button[data-shown="false"]{scale:1;filter:none;transition:opacity .15s,visibility 0s .15s!important}}
|
|
646
|
+
/* A press flash (flash.ts): from a key or a click, the button's wash brightens at once and eases
|
|
647
|
+
back to its own, its ink with it. Two names, so a second press restarts it. */
|
|
648
|
+
@keyframes knobs-flash-a{from{background-color:var(--k-flash-bg);color:var(--k-text)}}
|
|
649
|
+
@keyframes knobs-flash-b{from{background-color:var(--k-flash-bg);color:var(--k-text)}}
|
|
650
|
+
.knobs-panel :is(header,.knobs-group-head) button{--k-flash-bg:color-mix(in srgb,var(--k-surface-hi),var(--k-text) 10%)}
|
|
651
|
+
.knobs-panel :is(header,.knobs-group-head) button[data-k-flash="a"]{animation:knobs-flash-a ${FLASH_MS}ms cubic-bezier(.33,1,.68,1)}
|
|
652
|
+
.knobs-panel :is(header,.knobs-group-head) button[data-k-flash="b"]{animation:knobs-flash-b ${FLASH_MS}ms cubic-bezier(.33,1,.68,1)}
|
|
598
653
|
/* Copied: the glyph shrinks away and a check draws itself in its place, held, then they trade
|
|
599
654
|
back (the check fading). Driven by --k-copy (the glyph), --k-check (how much of the check is
|
|
600
655
|
drawn) and --k-check-a (its opacity), which the GPU renderer reads too. */
|
|
601
656
|
.knobs-panel header .knobs-copy{--k-copy:1;--k-check:0;--k-check-a:0;
|
|
602
|
-
transition:background
|
|
657
|
+
transition:background var(--k-hover-t),color var(--k-hover-t),opacity .15s,--k-copy ${BLOOM_IN} .04s,--k-check 0s .1s,--k-check-a .1s cubic-bezier(.4,0,1,1)}
|
|
603
658
|
.knobs-panel header .knobs-copy[data-copied]{--k-copy:0;--k-check:1;--k-check-a:1;color:var(--k-text);
|
|
604
|
-
transition:background
|
|
659
|
+
transition:background var(--k-hover-t),color var(--k-hover-t),opacity .15s,--k-copy .1s cubic-bezier(.4,0,1,1),--k-check .18s cubic-bezier(.2,.8,.2,1) .03s,--k-check-a .04s linear .03s}
|
|
605
660
|
.knobs-copy>.knobs-icon:not(.knobs-check){opacity:var(--k-copy);scale:calc(.5 + .5 * var(--k-copy))}
|
|
606
661
|
.knobs-copy>.knobs-check{position:absolute;inset:0;margin:auto;opacity:var(--k-check-a)}
|
|
607
662
|
/* (Over .knobs-icon>path's fill: the check is a stroke, 16 of 256 wide like Phosphor's regular icons.) */
|
|
@@ -629,6 +684,18 @@ ${GRAD_PROPS}
|
|
|
629
684
|
.knobs-panel .knobs-preset-chip[aria-checked="true"]{color:var(--k-text);font-weight:var(--k-title-weight)}
|
|
630
685
|
.knobs-panel .knobs-preset-save{flex:none;width:calc((var(--k-inset) - var(--k-tray-pad)) * 2 + 8px);padding:0!important;color:var(--k-dim)!important;font-weight:400!important;font-size:var(--k-text-title)!important}
|
|
631
686
|
.knobs-panel .knobs-preset-save:hover{color:var(--k-text)!important}
|
|
687
|
+
/* The active preset's modified mark: the values have drifted off it (a row's dot, in its corner). */
|
|
688
|
+
.knobs-panel .knobs-preset-chip::after{content:"";position:absolute;top:4px;right:4px;width:4px;height:4px;border-radius:50%;background:var(--k-modified);opacity:0;transform:scale(.4);pointer-events:none;transition:opacity .16s ease-out,transform .28s cubic-bezier(.34,1.5,.64,1)}
|
|
689
|
+
.knobs-panel .knobs-preset-chip[data-drifted]::after{opacity:.95;transform:none}
|
|
690
|
+
/* Naming a saved preset: a field over its chip that opens out from the middle to the chip's width;
|
|
691
|
+
the chip's own name hides beneath it. Leaving, it fades. */
|
|
692
|
+
.knobs-panel .knobs-preset-chip[data-naming]{color:transparent!important}
|
|
693
|
+
.knobs-panel .knobs-preset-name{position:absolute;z-index:2;box-sizing:border-box;min-width:0;margin:0;padding:0 6px;border:1px solid color-mix(in srgb,var(--k-accent) 55%,transparent);border-radius:var(--k-button-radius,var(--k-radius-md));outline:none;background:color-mix(in srgb,var(--k-accent) 10%,transparent);color:var(--k-text);caret-color:var(--k-accent);
|
|
694
|
+
font-family:inherit;font-size:var(--k-button-font-size,var(--k-text-control));font-weight:var(--k-title-weight);letter-spacing:inherit;text-align:center;animation:knobs-name-in .25s cubic-bezier(.2,.8,.2,1);transition:opacity .11s cubic-bezier(.4,0,1,1)}
|
|
695
|
+
.knobs-preset-name::selection{background:color-mix(in srgb,var(--k-accent) 24%,transparent);color:var(--k-text)}
|
|
696
|
+
.knobs-panel .knobs-preset-name[data-leaving]{opacity:0;pointer-events:none}
|
|
697
|
+
@keyframes knobs-name-in{from{clip-path:inset(0 50% round 6px);opacity:.4}to{clip-path:inset(0 round 6px);opacity:1}}
|
|
698
|
+
@media(prefers-reduced-motion:reduce){.knobs-panel .knobs-preset-name{animation:knobs-fade .15s ease-out}}
|
|
632
699
|
|
|
633
700
|
/* Group headers */
|
|
634
701
|
.knobs-group-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:20px;margin:var(--k-group-gap) 0 var(--k-gap);padding:0 var(--k-group-inset);color:var(--k-group-color);font-size:var(--k-group-size);font-weight:var(--k-title-weight);letter-spacing:var(--k-group-tracking);text-transform:var(--k-group-transform)}
|
|
@@ -637,27 +704,28 @@ ${GRAD_PROPS}
|
|
|
637
704
|
.knobs-group-head>span:last-child{display:flex;align-items:center;gap:var(--k-tray-pad);margin-right:calc((var(--k-icon-sm) - 20px) / 2)}
|
|
638
705
|
.knobs-group-head button{height:20px;padding:0 6px;font-size:var(--k-text-meta);font-weight:500;letter-spacing:0;text-transform:none;color:var(--k-label);background:transparent;border-radius:var(--k-radius-sm);cursor:pointer}
|
|
639
706
|
.knobs-group-head button:is(:hover:not([disabled]),:focus-visible){background:var(--k-surface-hi);color:var(--k-text)}
|
|
640
|
-
.knobs-group-head .knobs-group-reset{width:20px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--k-round)
|
|
641
|
-
transition:opacity .18s var(--k-ease),transform .3s cubic-bezier(.34,1.45,.64,1),background .15s,color .15s,visibility 0s}
|
|
707
|
+
.knobs-group-head .knobs-group-reset{width:20px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--k-round)}
|
|
642
708
|
.knobs-group-head :is(.knobs-icon,.knobs-die-icon){width:var(--k-icon-sm);height:var(--k-icon-sm)}
|
|
643
|
-
.knobs-group-reset[data-shown="false"]{opacity:0;visibility:hidden;transform:scale(.55);transition:opacity .14s ease-in,transform .14s ease-in,visibility 0s .14s}
|
|
644
709
|
.knobs-group-head .knobs-group-die{width:20px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--k-round);color:var(--k-dim)}
|
|
645
710
|
.knobs-group-head .knobs-group-die[disabled]{opacity:var(--k-disabled-opacity);cursor:default}
|
|
646
|
-
.knobs-panel .knobs-group-head button:where(:not(.knobs-group-reset)){transition:background
|
|
711
|
+
.knobs-panel .knobs-group-head button:where(:not(.knobs-group-reset)){transition:background var(--k-hover-t),color var(--k-hover-t),opacity .2s,transform .12s}
|
|
647
712
|
|
|
648
|
-
/* Grouped cards: rows share one surface, split by hairlines */
|
|
713
|
+
/* Grouped cards: rows share one surface, split by hairlines that stay put whatever a row is doing */
|
|
649
714
|
.knobs-card{position:relative;margin-bottom:var(--k-section-gap);border-radius:var(--k-radius);background:var(--k-surface);overflow:hidden}
|
|
650
715
|
.knobs-card:last-child{margin-bottom:0}
|
|
651
716
|
.knobs-card>*{position:relative;min-height:var(--k-row);transition:background var(--k-hover-t),opacity .2s}
|
|
652
717
|
.knobs-card>:hover,.knobs-card>.knobs-active{background:var(--k-row-hover)}
|
|
653
718
|
.knobs-card>*+*::before{content:"";position:absolute;z-index:1;left:0;right:0;top:0;height:1px;transform:scaleY(.5);transform-origin:top;background:var(--k-line);pointer-events:none;transition:opacity .15s}
|
|
654
|
-
.knobs-card
|
|
655
|
-
|
|
719
|
+
.knobs-card>::after{content:"";position:absolute;z-index:2;inset:0;background:var(--k-surface-hi);opacity:0;pointer-events:none;transition:opacity .15s,box-shadow .15s}
|
|
720
|
+
/* The card focus is on (a click on its empty area or heading, Esc from a row): a soft wash over all
|
|
721
|
+
of it, for R and ⇧R acting on its group. */
|
|
722
|
+
:is(.knobs-card,.knobs-tile)::after{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--k-surface);opacity:0;pointer-events:none;transition:opacity .2s var(--k-ease)}
|
|
723
|
+
:is(.knobs-card,.knobs-tile)[data-k-scope]::after{opacity:1}
|
|
724
|
+
.knobs-panel:focus{outline:none}
|
|
656
725
|
.knobs-card>:has(:focus-visible)::after{opacity:1}
|
|
657
726
|
/* One wash at a time: while the pointer has a row (and keys haven't taken over since), a focus
|
|
658
|
-
wash elsewhere steps aside
|
|
727
|
+
wash elsewhere steps aside. */
|
|
659
728
|
${POINTER_ROW} :is(.knobs-card>*,.knobs-sub,.knobs-x-head):not(:hover)::after{opacity:0}
|
|
660
|
-
${POINTER_ROW} .knobs-card>:not(:hover,.knobs-active,:hover+*,.knobs-active+*)::before{opacity:1}
|
|
661
729
|
.knobs-panel .knobs-slider{height:var(--k-row);contain:layout style}
|
|
662
730
|
.knobs-panel .knobs-row:where(:not(.knobs-slider,.knobs-x,.knobs-spring)){display:flex;align-items:center;justify-content:space-between;gap:8px;height:var(--k-row);padding:0 var(--k-inset);contain:layout style}
|
|
663
731
|
.knobs-panel .knobs-row>span:first-child{color:var(--k-label);font-weight:var(--k-label-weight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
@@ -748,7 +816,7 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
748
816
|
.knobs-smear-pill{margin-inline:calc(var(--k-smear) * -.5px);
|
|
749
817
|
-webkit-mask:linear-gradient(to right,transparent,#000 calc(var(--k-smear) * 1px),#000 calc(100% - var(--k-smear) * 1px),transparent);
|
|
750
818
|
mask:linear-gradient(to right,transparent,#000 calc(var(--k-smear) * 1px),#000 calc(100% - var(--k-smear) * 1px),transparent)}
|
|
751
|
-
.knobs-seg button{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0 7px;font-size:var(--k-text-control);font-weight:var(--k-label-weight);white-space:nowrap;color:var(--k-label);background:transparent;cursor:pointer;border-radius:var(--k-radius-sm);transition:background
|
|
819
|
+
.knobs-seg button{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0 7px;font-size:var(--k-text-control);font-weight:var(--k-label-weight);white-space:nowrap;color:var(--k-label);background:transparent;cursor:pointer;border-radius:var(--k-radius-sm);transition:background var(--k-hover-t),color var(--k-hover-t)}
|
|
752
820
|
.knobs-seg button:is(:hover,:focus-visible){color:var(--k-text)}
|
|
753
821
|
.knobs-seg button[aria-checked=true]{color:var(--k-text)}
|
|
754
822
|
|
|
@@ -765,10 +833,17 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
765
833
|
.knobs-panel .knobs-action-row{padding:0}
|
|
766
834
|
.knobs-panel .knobs-action{width:100%;height:100%;padding:0 var(--k-inset);text-align:left;background:transparent;border-radius:0;color:var(--k-button-color,var(--k-text));font-size:var(--k-button-font-size,calc(var(--k-text-control) + .5px));font-weight:var(--k-label-weight);cursor:pointer;transition:color var(--k-hover-t),background var(--k-hover-t),box-shadow var(--k-hover-t)}
|
|
767
835
|
.knobs-panel .knobs-action:is(:hover,:focus-visible){color:var(--k-accent)}
|
|
768
|
-
.knobs-panel .knobs-action:active{opacity:.7}
|
|
836
|
+
.knobs-panel .knobs-action:is(:active,.knobs-pressed){opacity:.7}
|
|
837
|
+
.knobs-panel .knobs-action.knobs-pressed{color:var(--k-accent)}
|
|
838
|
+
/* A shortcut: its key cap at the row's end, the button taking the rest. */
|
|
839
|
+
.knobs-panel .knobs-action-row[data-keyed]{gap:6px}
|
|
840
|
+
.knobs-panel .knobs-action-row[data-keyed]>.knobs-action{flex:1 1 0;width:auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
841
|
+
.knobs-panel .knobs-action-row>.knobs-keys{order:1;margin-right:var(--k-inset)}
|
|
769
842
|
/* With a button fill or outline (--k-button-bg, --k-button-line), an action is a sized button in
|
|
770
843
|
its row, and the presets strip a row of them, as toolbar buttons are. */
|
|
771
844
|
.knobs-panel[data-buttons] .knobs-action-row{padding:0 var(--k-inset)}
|
|
845
|
+
.knobs-panel[data-buttons] .knobs-action-row[data-keyed]>.knobs-action{flex:0 1 auto;margin-right:auto}
|
|
846
|
+
.knobs-panel[data-buttons] .knobs-action-row>.knobs-keys{margin-right:0}
|
|
772
847
|
.knobs-panel[data-buttons] .knobs-action{width:auto;max-width:100%;height:var(--k-button-h,var(--kc-control-h));padding:0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
|
|
773
848
|
background:var(--k-button-bg,transparent);box-shadow:inset 0 0 0 1px var(--k-button-line,transparent);border-radius:var(--k-button-radius,var(--k-radius-md))}
|
|
774
849
|
.knobs-panel[data-buttons] .knobs-action:is(:hover,:focus-visible){color:var(--k-text);background:var(--k-button-hover-bg,var(--k-surface-hi));box-shadow:inset 0 0 0 1px var(--k-button-hover-line,var(--k-button-line,transparent))}
|
|
@@ -794,13 +869,12 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
794
869
|
.knobs-sub{position:relative;transition:background var(--k-hover-t)}
|
|
795
870
|
.knobs-sub:hover,.knobs-sub.knobs-active,.knobs-x-head:hover,.knobs-x-head[data-panned]{background:var(--k-row-hover)}
|
|
796
871
|
.knobs-sub+.knobs-sub::before{content:"";position:absolute;z-index:1;left:0;right:0;top:0;height:1px;transform:scaleY(.5);transform-origin:top;background:var(--k-line);pointer-events:none;transition:opacity .15s}
|
|
797
|
-
.knobs-sub
|
|
798
|
-
:is(.knobs-sub,.knobs-x-head)::after{content:"";position:absolute;z-index:2;inset:0;background:var(--k-surface);opacity:0;pointer-events:none;transition:opacity .15s}
|
|
872
|
+
:is(.knobs-sub,.knobs-x-head)::after{content:"";position:absolute;z-index:2;inset:0;background:var(--k-surface-hi);opacity:0;pointer-events:none;transition:opacity .15s}
|
|
799
873
|
:is(.knobs-sub:has(:focus-visible),.knobs-x-head:focus-visible)::after{opacity:1}
|
|
800
874
|
.knobs-spring-curve{position:relative;flex:none;width:calc(var(--k-row) * 2.5);margin:var(--k-gap) var(--k-inset) var(--k-gap) 0;border-radius:var(--k-radius-sm);background:var(--k-seg-bg);pointer-events:none}
|
|
801
875
|
.knobs-panel :is(.knobs-spring-curve,.knobs-ease)>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
|
|
802
876
|
.knobs-guide{fill:none;stroke:var(--k-line);stroke-width:1}
|
|
803
|
-
.knobs-arm{fill:none;stroke:var(--k-dim);stroke-width:1
|
|
877
|
+
.knobs-arm{fill:none;stroke:var(--k-dim);stroke-width:1}
|
|
804
878
|
.knobs-curve{fill:none;stroke:var(--k-accent);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;transition:d ${FILL_T} ${DELAY}}
|
|
805
879
|
.knobs-spring-dot{position:absolute;left:0;top:0;width:5px;height:5px;margin:-2.5px;border-radius:50%;background:var(--k-accent);box-shadow:0 0 calc(var(--k-glow) * 8px) var(--k-accent);opacity:0;scale:var(--k-curve-dot)}
|
|
806
880
|
.knobs-guide-dashed{stroke:var(--k-line-hi)}
|
|
@@ -808,12 +882,16 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
808
882
|
|
|
809
883
|
.knobs-panel :is(input,textarea,[contenteditable]){-webkit-user-select:text;user-select:text}
|
|
810
884
|
.knobs-x-head{position:relative;display:flex;align-items:center;justify-content:space-between;gap:8px;height:var(--k-row);padding:0 var(--k-inset);cursor:pointer;user-select:none;transition:background var(--k-hover-t)}
|
|
885
|
+
.knobs-x-head[data-panned]{cursor:ew-resize}
|
|
811
886
|
.knobs-panel .knobs-x-head:focus-visible{outline:none;box-shadow:none}
|
|
812
887
|
.knobs-x-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--k-label);font-weight:var(--k-label-weight)}
|
|
813
888
|
.knobs-x-label::after{content:"";display:inline-block;width:4px;height:4px;margin-left:5px;border-radius:50%;background:var(--k-modified);vertical-align:middle;opacity:0;transform:scale(.4);transition:opacity .16s ease-out,transform .28s cubic-bezier(.34,1.5,.64,1)}
|
|
814
889
|
.knobs-modified .knobs-x-label::after{opacity:.95;transform:none}
|
|
815
890
|
.knobs-x-sum{display:flex;align-items:center;gap:8px;min-width:0}
|
|
816
891
|
.knobs-x-read,.knobs-strip-read{color:var(--k-label);font-size:var(--kc-value-size);font-variant-numeric:tabular-nums;font-feature-settings:"tnum";white-space:nowrap}
|
|
892
|
+
/* A name crossfading (reel.ts fadeText): the old one fades out over the new, where it was. */
|
|
893
|
+
.knobs-x-read{position:relative}
|
|
894
|
+
.knobs-ghost{position:absolute;right:0;top:0;white-space:nowrap;pointer-events:none}
|
|
817
895
|
.knobs-caret{width:10px;height:10px;flex:none;margin-right:-2.5px;color:var(--k-dim);transition:transform ${LEAD_T},color .15s}
|
|
818
896
|
.knobs-caret path{fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
|
|
819
897
|
.knobs-x-head:hover .knobs-caret{color:var(--k-label)}
|
|
@@ -838,33 +916,33 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
838
916
|
.knobs-pad.knobs-active>i{transition:scale .2s var(--k-ease)}
|
|
839
917
|
.knobs-pad:is(.knobs-active,:focus-visible) .knobs-pad-puck{scale:1.2}
|
|
840
918
|
.knobs-ease{height:calc(var(--k-row) * 4.5)}
|
|
841
|
-
.knobs-panel .knobs-ease-handle{position:absolute;left:0;top:0;width:12px;height:12px;margin:-6px;padding:0;border-radius:var(--k-round);background:var(--k-bg);box-shadow:inset 0 0 0 2px var(--k-accent),0 1px 3px rgba(0,0,0,calc(.3 * var(--k-lift)));cursor:grab;touch-action:none;transition:
|
|
919
|
+
.knobs-panel .knobs-ease-handle{position:absolute;left:0;top:0;width:12px;height:12px;margin:-6px;padding:0;border-radius:var(--k-round);background:var(--k-bg);box-shadow:inset 0 0 0 2px var(--k-accent),0 1px 3px rgba(0,0,0,calc(.3 * var(--k-lift)));cursor:grab;touch-action:none;transition:scale .2s var(--k-ease)}
|
|
842
920
|
.knobs-ease-handle::before{content:"";position:absolute;inset:-8px;border-radius:50%}
|
|
843
|
-
|
|
844
|
-
|
|
921
|
+
/* The row's morph moves the curve, arms and handles each frame (ramp-morph.ts), so they don't
|
|
922
|
+
transition. */
|
|
923
|
+
:is(.knobs-ease,.knobs-ease-mini) .knobs-curve{transition:none}
|
|
845
924
|
.knobs-ease-handle:active{scale:1.2;cursor:grabbing}
|
|
846
925
|
.knobs-ease-handle:focus-visible{scale:1.2}
|
|
847
926
|
.knobs-ease-mini{flex:none;width:30px;height:var(--k-track-h);overflow:visible}
|
|
848
927
|
.knobs-ease-chips{display:grid;grid-template-columns:repeat(4,1fr);gap:var(--k-tray-pad);margin-top:6px;padding:var(--k-tray-pad);border-radius:var(--k-radius-md);background:var(--k-seg-bg)}
|
|
849
|
-
.knobs-panel .knobs-ease-chip{min-width:0;height:calc(var(--k-row) - 10px);padding:0 6px;font-size:var(--k-text-control);font-weight:var(--k-label-weight);color:var(--k-label);background:transparent;border-radius:var(--k-radius-sm);cursor:pointer;white-space:nowrap;transition:background
|
|
928
|
+
.knobs-panel .knobs-ease-chip{min-width:0;height:calc(var(--k-row) - 10px);padding:0 6px;font-size:var(--k-text-control);font-weight:var(--k-label-weight);color:var(--k-label);background:transparent;border-radius:var(--k-radius-sm);cursor:pointer;white-space:nowrap;transition:background var(--k-hover-t),color var(--k-hover-t),box-shadow .15s}
|
|
850
929
|
.knobs-panel .knobs-ease-chip:is(:hover,:focus-visible){color:var(--k-text)}
|
|
851
930
|
.knobs-panel .knobs-ease-chip[aria-checked="true"]{color:var(--k-text);background:var(--k-pill-bg);box-shadow:var(--k-lift-shadow)}
|
|
852
931
|
|
|
853
932
|
/* Gradients: a swatch strip with stop ticks in the head; a wide strip with a handle per stop (the
|
|
854
933
|
selected one full size), then that stop's colour strips. The ramp runs a handle's radius in from
|
|
855
934
|
each end, as the colour strips' do. */
|
|
856
|
-
.knobs-grad-mini{position:relative;flex:none;width:calc(var(--k-row) * 2.5);height:var(--k-track-h);border-radius:var(--k-radius-sm);box-shadow:inset 0 0 0 1px var(--k-line);background:${GRAD_MINI}
|
|
857
|
-
.knobs-grad-mini>i{position:absolute;top:calc(100% + 2px);left:0;width:1px;height:3px;margin-left:-.5px;background:var(--k-dim);
|
|
858
|
-
.knobs-grad{--kg-h:calc(var(--k-row) - 6px);--kg-r:calc(var(--kg-h) / 2);--kg-pin:round(calc(var(--kg-h) * .42),1px);position:relative;height:var(--kg-h);margin:2px 0 var(--k-gap);border-radius:var(--k-round);box-shadow:inset 0 0 0 1px var(--k-line);background:${GRAD_STRIP};cursor:pointer;touch-action:none;user-select:none;outline:none
|
|
859
|
-
.knobs-grad-stop{position:absolute;top:50%;left:0;width:var(--kg-pin);height:calc(var(--kg-h) - 4px);margin:calc(2px - var(--kg-h) / 2) 0 0 calc(var(--kg-pin) / -2);border-radius:var(--k-round);box-shadow:0 0 0 2px var(--k-thumb),0 1px 4px rgba(0,0,0,calc(.4 * var(--k-lift)));pointer-events:none;
|
|
860
|
-
|
|
861
|
-
.
|
|
862
|
-
|
|
863
|
-
.
|
|
864
|
-
.knobs-
|
|
865
|
-
.knobs-
|
|
866
|
-
|
|
867
|
-
@keyframes knobs-born{from{opacity:0;scale:.4}}
|
|
935
|
+
.knobs-grad-mini{position:relative;flex:none;width:calc(var(--k-row) * 2.5);height:var(--k-track-h);border-radius:var(--k-radius-sm);box-shadow:inset 0 0 0 1px var(--k-line);background:${GRAD_MINI}}
|
|
936
|
+
.knobs-grad-mini>i{position:absolute;top:calc(100% + 2px);left:0;width:1px;height:3px;margin-left:-.5px;background:var(--k-dim);scale:1 var(--kgs-grow,1);transform-origin:top;transition:opacity .15s}
|
|
937
|
+
.knobs-grad{--kg-h:calc(var(--k-row) - 6px);--kg-r:calc(var(--kg-h) / 2);--kg-pin:round(calc(var(--kg-h) * .42),1px);position:relative;height:var(--kg-h);margin:2px 0 var(--k-gap);border-radius:var(--k-round);box-shadow:inset 0 0 0 1px var(--k-line);background:${GRAD_STRIP};cursor:pointer;touch-action:none;user-select:none;outline:none}
|
|
938
|
+
.knobs-grad-stop{position:absolute;top:50%;left:0;width:var(--kg-pin);height:calc(var(--kg-h) - 4px);margin:calc(2px - var(--kg-h) / 2) 0 0 calc(var(--kg-pin) / -2);border-radius:var(--k-round);box-shadow:0 0 0 2px var(--k-thumb),0 1px 4px rgba(0,0,0,calc(.4 * var(--k-lift)));pointer-events:none;
|
|
939
|
+
--kgs-sel:.78;scale:calc(var(--kgs-sel) * var(--kgs-grow,1));transition:--kgs-sel .2s var(--k-ease),opacity .15s}
|
|
940
|
+
/* The row's morph moves the strip, stops and ticks each frame (ramp-morph.ts), so none transition
|
|
941
|
+
but a stop's focus scale (--kgs-sel); its growth (--kgs-grow) buds it from the strip or merges it
|
|
942
|
+
into a neighbour. */
|
|
943
|
+
.knobs-grad-stop[data-selected]{--kgs-sel:1}
|
|
944
|
+
.knobs-grad:is(:focus-visible,.knobs-active) .knobs-grad-stop[data-selected]{--kgs-sel:1.12}
|
|
945
|
+
.knobs-grad-stop[data-leaving]{opacity:.35;--kgs-sel:.6}
|
|
868
946
|
.knobs-mixed :is(.knobs-grad,.knobs-grad-mini){background:transparent}
|
|
869
947
|
/* A ramp's shapes and presets share one row: each chip gives up padding before its words, and only
|
|
870
948
|
a very narrow column ellipsizes them (the GPU overlay does the same). */
|
|
@@ -879,13 +957,15 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
879
957
|
.knobs-graph{position:relative;height:calc(var(--k-row) * 4.5);border-radius:var(--k-radius-md);background:var(--k-seg-bg);cursor:crosshair;touch-action:none;user-select:none;outline:none;overflow:hidden}
|
|
880
958
|
.knobs-panel .knobs-graph>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
|
|
881
959
|
.knobs-graph>i{position:absolute;left:0;top:0;pointer-events:none}
|
|
960
|
+
/* The row's morph places the line and points each frame (ramp-morph.ts), so neither transitions:
|
|
961
|
+
a point's size is its focus scale (--kpt-sel, which does) times its growth (--kpt-grow, budding
|
|
962
|
+
from the line or merging into a neighbour). */
|
|
882
963
|
.knobs-graph-pt{width:10px;height:10px;margin:-5px;border-radius:var(--k-round);background:var(--k-bg);box-shadow:inset 0 0 0 2px var(--k-accent),0 1px 3px rgba(0,0,0,calc(.3 * var(--k-lift)));
|
|
883
|
-
|
|
964
|
+
scale:calc(var(--kpt-sel) * var(--kpt-grow,1));transition:background-color .15s,--kpt-sel .2s var(--k-ease),opacity .15s}
|
|
884
965
|
.knobs-graph-pt[data-selected]{background:var(--k-accent)}
|
|
885
|
-
.knobs-graph:is(:focus-visible,.knobs-active) .knobs-graph-pt[data-selected]{
|
|
886
|
-
.knobs-graph-pt[data-leaving]{opacity:.35
|
|
887
|
-
.knobs-graph.knobs-
|
|
888
|
-
.knobs-graph.knobs-active .knobs-curve,.knobs-x[data-k-active] .knobs-curve-mini .knobs-curve{transition:none}
|
|
966
|
+
.knobs-graph:is(:focus-visible,.knobs-active) .knobs-graph-pt[data-selected]{--kpt-sel:1.2}
|
|
967
|
+
.knobs-graph-pt[data-leaving]{opacity:.35;--kpt-sel:.7}
|
|
968
|
+
.knobs-graph .knobs-curve,.knobs-curve-mini .knobs-curve{transition:none}
|
|
889
969
|
.knobs-graph :is(.knobs-graph-v,.knobs-graph-h,.knobs-graph-dot,.knobs-graph-read){opacity:0;transition:opacity .15s}
|
|
890
970
|
.knobs-graph[data-hover] :is(.knobs-graph-v,.knobs-graph-h,.knobs-graph-dot,.knobs-graph-read){opacity:1}
|
|
891
971
|
.knobs-graph-v{bottom:0;width:1px;margin-left:-.5px;background:var(--k-line-hi)}
|
|
@@ -950,7 +1030,7 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
950
1030
|
.knobs-panel .knobs-search input{flex:1;min-width:0;height:100%;padding:0;background:transparent;border-radius:0;color:var(--k-text);font-size:var(--k-text-control);-webkit-appearance:none;appearance:none}
|
|
951
1031
|
.knobs-panel .knobs-search input::placeholder{color:var(--k-dim)}
|
|
952
1032
|
.knobs-panel .knobs-search input::-webkit-search-cancel-button{display:none}
|
|
953
|
-
.knobs-panel .knobs-search-chip{flex:none;display:inline-flex;align-items:center;gap:5px;height:var(--kc-control-h);padding:0 8px;background:transparent;border-radius:var(--k-radius-md);box-shadow:inset 0 0 0 1px var(--k-line);color:var(--k-label);font-size:var(--k-text-meta);font-weight:var(--k-label-weight);white-space:nowrap;cursor:pointer;transition:background
|
|
1033
|
+
.knobs-panel .knobs-search-chip{flex:none;display:inline-flex;align-items:center;gap:5px;height:var(--kc-control-h);padding:0 8px;background:transparent;border-radius:var(--k-radius-md);box-shadow:inset 0 0 0 1px var(--k-line);color:var(--k-label);font-size:var(--k-text-meta);font-weight:var(--k-label-weight);white-space:nowrap;cursor:pointer;transition:background var(--k-hover-t),color var(--k-hover-t),box-shadow .15s,opacity .15s}
|
|
954
1034
|
.knobs-panel .knobs-search-chip:is(:hover,:focus-visible){color:var(--k-text);box-shadow:inset 0 0 0 1px var(--k-line-hi)}
|
|
955
1035
|
.knobs-panel .knobs-search-chip[aria-pressed="true"]{background:var(--k-pill-bg);box-shadow:inset 0 0 0 1px var(--k-pill-border);color:var(--k-text)}
|
|
956
1036
|
.knobs-panel .knobs-search-chip[data-none]{opacity:.5}
|
|
@@ -977,14 +1057,14 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
977
1057
|
.knobs-cell-axis{flex:none;font-style:normal;font-size:var(--k-text-cap);font-weight:var(--k-title-weight);color:var(--k-dim)}
|
|
978
1058
|
.knobs-cell-read,.knobs-range-read,.knobs-angle-read,.knobs-seed-read{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--k-label);font-family:var(--k-value-font);font-size:var(--kc-value-size);font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}
|
|
979
1059
|
.knobs-cell:focus-visible .knobs-cell-read,.knobs-active .knobs-cell:focus .knobs-cell-read,.knobs-cell[data-panned] .knobs-cell-read{color:var(--k-text)}
|
|
980
|
-
.knobs-panel .knobs-link{flex:none;width:20px;height:20px;margin:0 -4px 0 auto;padding:0;display:inline-flex;align-items:center;justify-content:center;background:transparent;border-radius:var(--k-round);color:var(--k-dim);cursor:pointer;transition:background
|
|
1060
|
+
.knobs-panel .knobs-link{flex:none;width:20px;height:20px;margin:0 -4px 0 auto;padding:0;display:inline-flex;align-items:center;justify-content:center;background:transparent;border-radius:var(--k-round);color:var(--k-dim);cursor:pointer;transition:background var(--k-hover-t),color var(--k-hover-t)}
|
|
981
1061
|
.knobs-panel .knobs-link:hover{background:var(--k-surface-hi);color:var(--k-text)}
|
|
982
1062
|
.knobs-panel .knobs-link[aria-pressed="true"]{color:var(--k-text)}
|
|
983
1063
|
.knobs-link .knobs-icon{width:var(--k-icon-sm);height:var(--k-icon-sm)}
|
|
984
1064
|
/* The inline editor over a readout: above the GPU canvas, which leaves that readout to it. */
|
|
985
|
-
.knobs-panel .knobs-cell-edit{position:absolute;z-index:3;right:var(--k-inset);top:50%;transform:translateY(-50%);width:7ch;height:
|
|
1065
|
+
.knobs-panel .knobs-cell-edit{position:absolute;z-index:3;right:calc(var(--k-inset) - 6px);top:50%;transform:translateY(-50%);width:calc(7ch + 12px);height:var(--kc-control-h);padding:0 6px;text-align:right;background:linear-gradient(var(--k-surface-hi),var(--k-surface-hi)),var(--k-bg);border:0;border-radius:var(--k-radius-md);outline:none;color:var(--k-text);caret-color:var(--k-accent);font-family:var(--k-value-font);font-variant-numeric:tabular-nums;font-size:var(--kc-value-size);animation:knobs-fade .12s ease-out}
|
|
986
1066
|
.knobs-cell.knobs-editing>:not(.knobs-cell-edit){visibility:hidden}
|
|
987
|
-
.knobs-panel .knobs-cell>.knobs-cell-edit{inset:0;width:auto;transform:none
|
|
1067
|
+
.knobs-panel .knobs-cell>.knobs-cell-edit{inset:0;width:auto;height:auto;transform:none}
|
|
988
1068
|
.knobs-panel[data-gpu-active="true"] .knobs-cell-edit{z-index:2147480003}
|
|
989
1069
|
|
|
990
1070
|
.knobs-panel .knobs-row.knobs-range{display:block;height:var(--k-row);padding:0}
|
|
@@ -998,19 +1078,18 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
998
1078
|
background:linear-gradient(to right,transparent calc(var(--ks-a) - var(--kr-smear-lo,0) * .5px),var(--kr-tint) calc(var(--ks-a) + var(--kr-smear-lo,0) * .5px),var(--kr-tint) calc(var(--ks-b) - var(--kr-smear-hi,0) * .5px),transparent calc(var(--ks-b) + var(--kr-smear-hi,0) * .5px))}
|
|
999
1079
|
.knobs-range-smearing .knobs-range-smear{display:block}
|
|
1000
1080
|
.knobs-range-smearing .knobs-range-fill{opacity:0}
|
|
1001
|
-
|
|
1002
|
-
.knobs-range-thumb
|
|
1081
|
+
/* Each thumb sits on its end, centred, held 1.5px in at the track's ends so its hairline isn't cut. */
|
|
1082
|
+
.knobs-range-thumb{position:absolute;top:0;bottom:0;left:clamp(1.5px,calc(var(--kr-lo) * 100%),calc(100% - 1.5px));width:0;outline:none}
|
|
1083
|
+
.knobs-range-thumb[data-end="hi"]{left:clamp(1.5px,calc(var(--kr-hi) * 100%),calc(100% - 1.5px))}
|
|
1003
1084
|
/* Where a thumb shows, the label and readout fade around it (2.5px either side of its hairline). */
|
|
1004
1085
|
.knobs-range-text{position:absolute;inset:0;pointer-events:none;transition:--kr-show-lo .15s,--kr-show-hi .15s;
|
|
1005
|
-
--kg-lo:calc(var(--kr-lo) * 100%
|
|
1086
|
+
--kg-lo:clamp(1.5px,calc(var(--kr-lo) * 100%),calc(100% - 1.5px));--kg-hi:clamp(1.5px,calc(var(--kr-hi) * 100%),calc(100% - 1.5px));--kg-in-lo:rgb(0 0 0/calc(1 - var(--kr-show-lo)));--kg-in-hi:rgb(0 0 0/calc(1 - var(--kr-show-hi)));
|
|
1006
1087
|
--kg-mask:linear-gradient(to right,#000 calc(var(--kg-lo) - 6.5px),var(--kg-in-lo) calc(var(--kg-lo) - 2.5px),var(--kg-in-lo) calc(var(--kg-lo) + 2.5px),#000 calc(var(--kg-lo) + 6.5px)),linear-gradient(to right,#000 calc(var(--kg-hi) - 6.5px),var(--kg-in-hi) calc(var(--kg-hi) - 2.5px),var(--kg-in-hi) calc(var(--kg-hi) + 2.5px),#000 calc(var(--kg-hi) + 6.5px));
|
|
1007
1088
|
-webkit-mask:var(--kg-mask);mask:var(--kg-mask);-webkit-mask-composite:source-in;mask-composite:intersect}
|
|
1008
1089
|
.knobs-range:not(.knobs-mixed):hover .knobs-range-text{--kr-show-lo:1;--kr-show-hi:1}
|
|
1009
1090
|
.knobs-range:not(.knobs-mixed)[data-end-focus="lo"]:is([data-k-fv],.knobs-active) .knobs-range-text{--kr-show-lo:1}
|
|
1010
1091
|
.knobs-range:not(.knobs-mixed)[data-end-focus="hi"]:is([data-k-fv],.knobs-active) .knobs-range-text{--kr-show-hi:1}
|
|
1011
1092
|
.knobs-range-thumb::before{content:"";position:absolute;left:0;top:50%;width:3px;height:calc(var(--k-row) - 12px);margin-top:calc(6px - var(--k-row) / 2);translate:-50% 0;border-radius:var(--k-round);background:var(--k-handle);opacity:0;scale:.25 1;transition:opacity .15s,scale .22s var(--k-ease)}
|
|
1012
|
-
.knobs-range-thumb[data-end="lo"]::before{translate:0 0}
|
|
1013
|
-
.knobs-range-thumb[data-end="hi"]::before{translate:-100% 0}
|
|
1014
1093
|
.knobs-range:hover .knobs-range-thumb::before{opacity:.5}
|
|
1015
1094
|
.knobs-range-thumb:focus-visible::before,.knobs-range.knobs-active .knobs-range-thumb:focus::before{opacity:.95;scale:1}
|
|
1016
1095
|
.knobs-range .knobs-label{max-width:calc(55% - var(--k-inset))}
|
|
@@ -1036,27 +1115,37 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
1036
1115
|
.knobs-seed-read{display:inline-flex;align-items:center}
|
|
1037
1116
|
.knobs-seed-read[data-mixed]::before{content:"—"}
|
|
1038
1117
|
.knobs-seed-read[data-mixed]>.knobs-seed-digits{display:none}
|
|
1039
|
-
.knobs-panel .knobs-seed-roll{flex:none;width:var(--k-icon-btn);height:var(--k-icon-btn);padding:0;display:inline-flex;align-items:center;justify-content:center;background:transparent;border-radius:var(--k-round);color:var(--k-dim);cursor:pointer;transition:background
|
|
1118
|
+
.knobs-panel .knobs-seed-roll{flex:none;width:var(--k-icon-btn);height:var(--k-icon-btn);padding:0;display:inline-flex;align-items:center;justify-content:center;background:transparent;border-radius:var(--k-round);color:var(--k-dim);cursor:pointer;transition:background var(--k-hover-t),color var(--k-hover-t)}
|
|
1040
1119
|
.knobs-panel .knobs-seed-roll:hover{background:var(--k-surface-hi);color:var(--k-text)}
|
|
1041
1120
|
.knobs-seed-roll .knobs-die-icon{width:var(--k-icon-sm);height:var(--k-icon-sm)}
|
|
1042
1121
|
|
|
1043
|
-
.knobs-panel .knobs-keys{flex:none;display:inline-flex;align-items:center;max-width:62%;height:var(--kc-control-h);padding:0 8px;background:var(--k-seg-bg);border-radius:var(--k-radius-md);color:var(--k-text);font-size:var(--kc-value-size);letter-spacing:.08em;white-space:nowrap;cursor:pointer;transition:background
|
|
1122
|
+
.knobs-panel .knobs-keys{flex:none;display:inline-flex;align-items:center;justify-content:center;max-width:62%;height:var(--kc-control-h);padding:0 8px;overflow:hidden;background:var(--k-seg-bg);border-radius:var(--k-radius-md);color:var(--k-text);font-family:inherit;font-weight:inherit;font-size:var(--kc-value-size);letter-spacing:.08em;white-space:nowrap;cursor:pointer;transition:background var(--k-hover-t),color var(--k-hover-t)}
|
|
1044
1123
|
.knobs-panel .knobs-keys:is(:hover,:focus-visible){background:color-mix(in srgb,var(--k-surface-hi) 70%,var(--k-seg-bg))}
|
|
1045
1124
|
.knobs-panel .knobs-keys[data-empty]{color:var(--k-dim);letter-spacing:0}
|
|
1046
|
-
|
|
1125
|
+
/* Listening: a soft accent wash, no ring, and the text breathing in "Type keys…" (keyCap). */
|
|
1126
|
+
.knobs-panel .knobs-keys[aria-pressed="true"]{background:var(--k-pill-bg);color:var(--k-label)}
|
|
1127
|
+
.knobs-keys[aria-pressed="true"] .knobs-keys-text{animation:knobs-breathe 1.6s ease-in-out infinite}
|
|
1128
|
+
@keyframes knobs-breathe{50%{opacity:.55}}
|
|
1047
1129
|
.knobs-keys-text{min-width:0;overflow:hidden;text-overflow:ellipsis}
|
|
1130
|
+
.knobs-keys[data-morph] .knobs-keys-text{flex:none;overflow:visible}
|
|
1131
|
+
.knobs-panel .knobs-keys[data-static]{cursor:default}
|
|
1132
|
+
.knobs-panel .knobs-keys[hidden]{display:none}
|
|
1048
1133
|
|
|
1049
|
-
/* Toolbars: icon, label and shortcut per button
|
|
1050
|
-
.
|
|
1134
|
+
/* Toolbars: icon, label and shortcut per button, in equal columns balanced across their rows
|
|
1135
|
+
(inspector.ts sets --k-tool-cols); one gap between them and around them. Buttons take the
|
|
1136
|
+
button tokens. */
|
|
1137
|
+
.knobs-panel .knobs-row.knobs-toolbar{--k-tool-gap:max(4px,calc((var(--k-row) - var(--k-button-h,var(--kc-control-h))) / 2));display:grid;grid-template-columns:repeat(var(--k-tool-cols,1),minmax(0,1fr));gap:var(--k-tool-gap);height:auto;min-height:var(--k-row);padding:var(--k-tool-gap) var(--k-inset)}
|
|
1051
1138
|
.knobs-card>.knobs-toolbar:hover{background:transparent}
|
|
1052
1139
|
.knobs-card>.knobs-toolbar:has(:focus-visible)::after{opacity:0}
|
|
1053
|
-
.knobs-panel .knobs-tool{display:
|
|
1140
|
+
.knobs-panel .knobs-tool{display:flex;align-items:center;gap:6px;min-width:0;height:var(--k-button-h,var(--kc-control-h));padding:0 8px;background:var(--k-button-bg,var(--k-seg-bg));border-radius:var(--k-button-radius,var(--k-radius-md));box-shadow:inset 0 0 0 1px var(--k-button-line,transparent);
|
|
1054
1141
|
color:var(--k-button-color,var(--k-label));font-size:var(--k-button-font-size,var(--k-text-control));font-weight:var(--k-label-weight);white-space:nowrap;cursor:pointer;transition:background var(--k-hover-t),color .15s,box-shadow .15s,scale .12s var(--k-ease),opacity .15s}
|
|
1055
1142
|
.knobs-panel .knobs-tool:is(:hover:not([disabled]),:focus-visible){background:var(--k-button-hover-bg,var(--k-surface-hi));box-shadow:inset 0 0 0 1px var(--k-button-hover-line,var(--k-button-line,transparent));color:var(--k-text)}
|
|
1056
1143
|
.knobs-panel .knobs-tool:is(:active:not([disabled]),.knobs-pressed){scale:.96}
|
|
1057
1144
|
.knobs-panel .knobs-tool[disabled]{opacity:var(--k-disabled-opacity);cursor:default}
|
|
1058
|
-
.knobs-tool .knobs-icon{width:var(--k-icon-sm);height:var(--k-icon-sm)}
|
|
1059
|
-
.knobs-
|
|
1145
|
+
.knobs-tool .knobs-icon{flex:none;width:var(--k-icon-sm);height:var(--k-icon-sm)}
|
|
1146
|
+
.knobs-tool-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
|
|
1147
|
+
/* The shortcut sits at the button's end, so a column of buttons lines their chips up. */
|
|
1148
|
+
.knobs-panel .knobs-tool-key{flex:none;margin-left:auto;padding-left:4px;font:inherit;font-size:var(--k-text-cap);font-variant-numeric:tabular-nums;color:var(--k-dim);letter-spacing:.06em}
|
|
1060
1149
|
.knobs-panel :is([data-disabled],[data-readonly]) :is(.knobs-cell,.knobs-range-track,.knobs-angle,.knobs-dial,.knobs-seed,.knobs-keys,.knobs-tool){cursor:default}
|
|
1061
1150
|
|
|
1062
1151
|
/* Row accessories (rowAccessory): the host's node, just after the label. */
|
|
@@ -1066,6 +1155,7 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
1066
1155
|
.knobs-track>.knobs-accessory{position:absolute;top:0;bottom:0;left:calc(var(--k-label-right,0px) + 4px);z-index:1}
|
|
1067
1156
|
.knobs-x-head>.knobs-accessory{margin:0 auto 0 -4px}
|
|
1068
1157
|
.knobs-action-row>.knobs-accessory{position:absolute;top:0;bottom:0;right:var(--k-inset)}
|
|
1158
|
+
.knobs-action-row[data-keyed]>.knobs-accessory{position:static}
|
|
1069
1159
|
|
|
1070
1160
|
/* Foldable groups (folded / groupFolded): the header toggles its card. */
|
|
1071
1161
|
.knobs-panel .knobs-group-head[data-foldable]{cursor:pointer;user-select:none;transition:background var(--k-hover-t)}
|
|
@@ -1095,18 +1185,26 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
1095
1185
|
.knobs-hint-typed{opacity:var(--k-hint-typed-opacity)}
|
|
1096
1186
|
.knobs-hint-rest{opacity:1}
|
|
1097
1187
|
|
|
1188
|
+
/* A focused row's options: tiny digits in hint mode's look, once focus settles (optkeys.ts). */
|
|
1189
|
+
.knobs-optkeys{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;z-index:5}
|
|
1190
|
+
.knobs-optkey{position:absolute;transform:translateY(-50%);display:inline-flex;align-items:center;height:12px;padding:0 3px;border-radius:var(--k-radius-sm);background:var(--k-accent);color:var(--k-bg);box-shadow:0 1px 3px rgba(0,0,0,calc(.35 * var(--k-lift)));
|
|
1191
|
+
font:700 calc(var(--k-text-cap) * .85)/1 var(--k-mono);letter-spacing:.04em;pointer-events:none;opacity:0;transition:opacity .12s var(--k-ease)}
|
|
1192
|
+
.knobs-optkey-range{transform:translate(-100%,-50%)}
|
|
1193
|
+
.knobs-optkey[data-shown]{opacity:.85;transition-duration:.15s}
|
|
1194
|
+
|
|
1098
1195
|
/* Custom actions */
|
|
1099
1196
|
.knobs-panel .knobs-custom-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:var(--k-gap);margin-top:var(--k-section-gap)}
|
|
1100
1197
|
.knobs-panel .knobs-custom-actions button{height:var(--k-button-h,var(--k-action-h));min-height:24px;padding:0 8px;font-size:var(--k-button-font-size,var(--k-text-control));font-weight:var(--k-label-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--k-button-color,var(--k-label));cursor:pointer;
|
|
1101
|
-
background:var(--k-button-bg,var(--k-surface));border-radius:var(--k-button-radius,var(--k-radius));box-shadow:inset 0 0 0 1px var(--k-button-line,transparent);transition:background
|
|
1198
|
+
background:var(--k-button-bg,var(--k-surface));border-radius:var(--k-button-radius,var(--k-radius));box-shadow:inset 0 0 0 1px var(--k-button-line,transparent);transition:background var(--k-hover-t),color var(--k-hover-t),opacity .15s,transform .12s,box-shadow .15s}
|
|
1102
1199
|
.knobs-panel .knobs-custom-actions button:is(:hover:not([disabled]),:focus-visible){background:var(--k-button-hover-bg,var(--k-surface-hi));box-shadow:inset 0 0 0 1px var(--k-button-hover-line,var(--k-button-line,transparent));color:var(--k-text)}
|
|
1103
1200
|
.knobs-panel .knobs-custom-actions button:active:not([disabled]){transform:scale(.97)}
|
|
1104
1201
|
.knobs-panel .knobs-tile-body>.knobs-custom-actions button[disabled]{opacity:var(--k-disabled-opacity);cursor:default}
|
|
1105
1202
|
|
|
1106
1203
|
/* Variants Disclosure Drawer */
|
|
1107
1204
|
.knobs-transfer{display:grid;grid-template-columns:1fr 1fr;gap:var(--k-gap);margin-top:8px;padding-top:8px;border-top:1px solid var(--k-line)}
|
|
1108
|
-
.knobs-transfer button{height:var(--k-button-h,24px);padding:0 8px;background:var(--k-button-bg,var(--k-surface));border-radius:var(--k-button-radius,var(--k-radius));box-shadow:inset 0 0 0 1px var(--k-button-line,transparent);font-size:var(--k-button-font-size,var(--k-text-meta));color:var(--k-button-color,var(--k-label));cursor:pointer;transition:background
|
|
1205
|
+
.knobs-transfer button{height:var(--k-button-h,24px);padding:0 8px;background:var(--k-button-bg,var(--k-surface));border-radius:var(--k-button-radius,var(--k-radius));box-shadow:inset 0 0 0 1px var(--k-button-line,transparent);font-size:var(--k-button-font-size,var(--k-text-meta));color:var(--k-button-color,var(--k-label));cursor:pointer;transition:background var(--k-hover-t),color var(--k-hover-t),box-shadow .15s}
|
|
1109
1206
|
.knobs-transfer button:is(:hover,:focus-visible){background:var(--k-button-hover-bg,var(--k-surface-hi));box-shadow:inset 0 0 0 1px var(--k-button-hover-line,var(--k-button-line,transparent));color:var(--k-text)}
|
|
1207
|
+
.knobs-sound-pref{grid-template-columns:1fr}
|
|
1110
1208
|
|
|
1111
1209
|
/* Context menu: borrows its panel's tokens (see menu.ts) and floats above everything. */
|
|
1112
1210
|
.knobs-menu{position:fixed;z-index:2147480004;min-width:176px;padding:var(--k-unit);box-sizing:border-box;font:var(--k-font-weight) var(--k-text-control)/1.35 var(--k-font);color:var(--k-text);text-align:left;-webkit-font-smoothing:antialiased;
|
|
@@ -1157,11 +1255,14 @@ ${POINTER_ROW} .knobs-slider.knobs-modified:not(:hover,.knobs-active) .knobs-val
|
|
|
1157
1255
|
.knobs-panel[data-gpu-active="true"] :is(.knobs-sub,.knobs-x-head,.knobs-x-label)::after,
|
|
1158
1256
|
.knobs-panel[data-gpu-active="true"] .knobs-card:not(.knobs-live *)>::before,
|
|
1159
1257
|
.knobs-panel[data-gpu-active="true"] .knobs-card:not(.knobs-live *)>::after,
|
|
1258
|
+
.knobs-panel[data-gpu-active="true"] :is(.knobs-card:not(.knobs-live *),.knobs-tile:not(.knobs-live))::after,
|
|
1259
|
+
.knobs-panel[data-gpu-active="true"] .knobs-optkey,
|
|
1160
1260
|
.knobs-panel[data-gpu-active="true"] .knobs-row:not(.knobs-live *)>span:first-child::after,
|
|
1261
|
+
.knobs-panel[data-gpu-active="true"] .knobs-preset-chip::after,
|
|
1161
1262
|
.knobs-panel[data-gpu-active="true"] :is(.knobs-tile:not(.knobs-live)>.knobs-veil,.knobs-tile:not(.knobs-live)>.knobs-mark,.knobs-section-head>.knobs-mark){opacity:0!important}
|
|
1162
1263
|
/* Parts the canvas doesn't draw (shortcuts, status, editors) sit above it. */
|
|
1163
1264
|
.knobs-panel[data-gpu-active="true"] :where(.knobs-popover,.knobs-status,textarea,.knobs-apply-btn){position:relative;z-index:2147480003}
|
|
1164
|
-
.knobs-panel[data-gpu-active="true"] .knobs-number{z-index:2147480003}
|
|
1265
|
+
.knobs-panel[data-gpu-active="true"] :is(.knobs-number,.knobs-preset-name){z-index:2147480003}
|
|
1165
1266
|
/* A row accessory is the host's own DOM, so it sits above the canvas too (its row then can't
|
|
1166
1267
|
contain its layout, which would trap it in a stacking context under the canvas). */
|
|
1167
1268
|
.knobs-panel[data-gpu-active="true"] .knobs-row[data-accessory]{contain:style}
|
|
@@ -1319,7 +1420,7 @@ function injectPreset(doc, preset) {
|
|
|
1319
1420
|
let style = doc.createElement("style");
|
|
1320
1421
|
style.dataset.knobsPreset = preset.name, style.textContent = content, doc.head.append(style);
|
|
1321
1422
|
}
|
|
1322
|
-
var keyboardQuietsHover = (css) => css.replaceAll(":hover", ":hover:where(:not([data-k-quiet]))"), withoutHas = (css) => css.replaceAll("
|
|
1423
|
+
var keyboardQuietsHover = (css) => css.replaceAll(":hover", ":hover:where(:not([data-k-quiet]))"), withoutHas = (css) => css.replaceAll(":has(:focus-visible)", "[data-k-fv]").replaceAll(":has(.knobs-track:focus-visible)", '[data-k-fv="track"]').replaceAll(":has(.knobs-active)", "[data-k-active]");
|
|
1323
1424
|
function injectStyles(doc) {
|
|
1324
1425
|
let content = rolling_css_default + DRIVERS + defaultsCss + keyboardQuietsHover(withoutHas(aliased(css))), existing = doc.querySelector("style[data-knobs-style]");
|
|
1325
1426
|
if (existing) {
|
|
@@ -1331,4 +1432,4 @@ function injectStyles(doc) {
|
|
|
1331
1432
|
style.dataset.knobsStyle = "", style.textContent = content, doc.head.append(style);
|
|
1332
1433
|
}
|
|
1333
1434
|
|
|
1334
|
-
export { CHECK_POINTS, CHECK_PATH, iconPath, iconSvg, readSession, writeSession, presetCss, FILL, LEAD, trailScale, Edges, POP_MS, popScale, VelocityTracker, clamp, Roll, rollTarget, numeral, entranceOffset, DELAYED, injectPreset, injectStyles };
|
|
1435
|
+
export { CHECK_POINTS, CHECK_PATH, iconPath, iconSvg, readSession, writeSession, rolling_css_default, presetCss, FILL, LEAD, trailScale, Edges, POP_MS, popScale, VelocityTracker, clamp, Roll, rollTarget, numeral, entranceOffset, FLASH_MS, flash, flashOf, DELAYED, injectPreset, injectStyles };
|
|
@@ -553,7 +553,15 @@ function choice2(value, options, meta) {
|
|
|
553
553
|
}, meta);
|
|
554
554
|
}
|
|
555
555
|
function action2(label, meta) {
|
|
556
|
-
|
|
556
|
+
let { shortcut, global, rebind, run, ...rest } = meta ?? {}, key = shortcutOf({ ...shortcut ? { shortcut } : {}, ...global ? { global } : {} }), combo = key ? normalizeCombo2(key.key) : "";
|
|
557
|
+
if (key && !combo)
|
|
558
|
+
throw Error("An action's shortcut must name a key.");
|
|
559
|
+
return withMeta({
|
|
560
|
+
kind: "action",
|
|
561
|
+
...run ? { run } : {},
|
|
562
|
+
...key ? { shortcut: combo, scope: key.scope } : {},
|
|
563
|
+
...rebind ? { rebind: !0 } : {}
|
|
564
|
+
}, { ...rest, ...label !== void 0 ? { label } : {} });
|
|
557
565
|
}
|
|
558
566
|
function flatSpring2(parts = {}, meta = {}) {
|
|
559
567
|
let id = meta.id ?? meta.label ?? `spring-${++springIds}`, half = (part, input, fallback) => {
|
|
@@ -579,7 +587,7 @@ function flatSpring2(parts = {}, meta = {}) {
|
|
|
579
587
|
}
|
|
580
588
|
var springIds = 0;
|
|
581
589
|
function toggle2(value, meta) {
|
|
582
|
-
return withMeta({ kind: "toggle", value }, meta);
|
|
590
|
+
return withMeta({ kind: "toggle", value }, { ...meta, random: meta?.random ?? !1 });
|
|
583
591
|
}
|
|
584
592
|
function spring2(value = {}, meta) {
|
|
585
593
|
let field = { kind: "spring", value: { duration: 0.5, bounce: 0 } };
|
|
@@ -722,13 +730,19 @@ function curve2(points, options = {}) {
|
|
|
722
730
|
...presets && Object.keys(presets).length ? { presets } : {}
|
|
723
731
|
}, options);
|
|
724
732
|
}
|
|
725
|
-
function
|
|
726
|
-
let s =
|
|
733
|
+
function shortcutOf(o) {
|
|
734
|
+
let s = o.shortcut;
|
|
727
735
|
if (!s)
|
|
728
736
|
return;
|
|
729
737
|
if (typeof s === "string")
|
|
730
|
-
return { key: s, scope:
|
|
731
|
-
return s.key ? { key: s.key, scope: s.scope ?? (
|
|
738
|
+
return { key: s, scope: o.global ? "page" : "panel" };
|
|
739
|
+
return s.key ? { key: s.key, scope: s.scope ?? (o.global ? "page" : "panel") } : void 0;
|
|
740
|
+
}
|
|
741
|
+
function toolbarShortcut2(item) {
|
|
742
|
+
return shortcutOf(item);
|
|
743
|
+
}
|
|
744
|
+
function actionShortcut2(field) {
|
|
745
|
+
return field.shortcut ? { key: field.shortcut, scope: field.scope ?? "panel" } : void 0;
|
|
732
746
|
}
|
|
733
747
|
function toolbar2(items, meta) {
|
|
734
748
|
if (!items.length)
|
|
@@ -1115,4 +1129,4 @@ function urlFlag2(name) {
|
|
|
1115
1129
|
}
|
|
1116
1130
|
var storageKey = (id, part) => `knobs:${encodeURIComponent(id)}:${part}:v1`;
|
|
1117
1131
|
|
|
1118
|
-
export { __preload, __chunks, maxChroma, oklchToRgb, parseColor2, fitColor, formatColor, colorHex2, EASINGS2, EASING_Y, easingName, bezierPoint2, bezierCss2, normalizeCombo2, letterOf2, comboFromEvent2, heldMods, matchesCombo2, comboParts2, comboLabel2, GRADIENT_SAMPLES, sampleGradient2, gradientSamples, gradientCss2, stopColorAt, sampleCurve2, curveSamples, CURVE_SHAPES2, inRange, sameRamp, randomStops, mutateStops, randomPoints, mutatePoints, pickMeta, isReadout2, hasValue2, SPRING2, valueKeys, knob2, choice2, action2, flatSpring2, toggle2, spring2, color2, point2, easing2, vec22, vec32, range2, angle2, seed2, keybind2, gradient2, curve2, toolbarShortcut2, toolbar2, watch2, sparkline2, graph2, meter2, table2, log2, wrapAngle2, normalizeField, normalize, isRecord, same, equal, Spring, springMotion2, springResponse, springEasing, springCss2, RESHAPE, RESET_KEYS, REFRESHES, readoutState, pushReadout, READOUT, memoryStorage2, browserStorage, urlFlag2, storageKey };
|
|
1132
|
+
export { __preload, __chunks, maxChroma, oklchToRgb, parseColor2, fitColor, formatColor, colorHex2, EASINGS2, EASING_Y, easingName, bezierPoint2, bezierCss2, normalizeCombo2, letterOf2, comboFromEvent2, heldMods, matchesCombo2, comboParts2, comboLabel2, GRADIENT_SAMPLES, sampleGradient2, gradientSamples, gradientCss2, stopColorAt, sampleCurve2, curveSamples, CURVE_SHAPES2, inRange, sameRamp, randomStops, mutateStops, randomPoints, mutatePoints, pickMeta, isReadout2, hasValue2, SPRING2, valueKeys, knob2, choice2, action2, flatSpring2, toggle2, spring2, color2, point2, easing2, vec22, vec32, range2, angle2, seed2, keybind2, gradient2, curve2, toolbarShortcut2, actionShortcut2, toolbar2, watch2, sparkline2, graph2, meter2, table2, log2, wrapAngle2, normalizeField, normalize, isRecord, same, equal, Spring, springMotion2, springResponse, springEasing, springCss2, RESHAPE, RESET_KEYS, REFRESHES, readoutState, pushReadout, READOUT, memoryStorage2, browserStorage, urlFlag2, storageKey };
|