@kitlangton/knobs 0.4.0-next.0 → 0.4.0-next.10
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 +451 -54
- package/dist/dev/{chunk-7xgkerd2.js → chunk-3ygqgy1x.js} +23 -1
- package/dist/dev/{chunk-stbcgz1y.js → chunk-5pb7ymrd.js} +567 -471
- package/dist/dev/{chunk-t68smqkc.js → chunk-a7cjgy8x.js} +13 -11
- package/dist/dev/{chunk-pmkvb9ep.js → chunk-dyq4m24m.js} +2081 -507
- package/dist/dev/index.js +10 -5
- package/dist/index.js +25 -1
- package/dist/panel.js +3187 -1341
- package/dist/react.js +294 -6
- package/dist/review-react.js +18580 -0
- package/dist/review-solid.js +18482 -0
- package/dist/review.js +18488 -0
- package/dist/solid.js +292 -4
- package/dist/themes.js +1767 -7
- package/dist/types/core/adapter.d.ts +6 -2
- package/dist/types/core/appearance.d.ts +44 -0
- package/dist/types/core/glide.d.ts +7 -0
- package/dist/types/core/motion.d.ts +66 -0
- package/dist/types/core/root.d.ts +13 -0
- package/dist/types/core/store.d.ts +18 -5
- package/dist/types/core/theme.d.ts +10 -3
- package/dist/types/index.d.ts +2 -1
- package/dist/types/panel/gpu/color.d.ts +6 -0
- package/dist/types/panel/motion.d.ts +1 -1
- package/dist/types/panel/styles.d.ts +2 -3
- package/dist/types/review/font.d.ts +13 -0
- package/dist/types/review/foundations.d.ts +175 -0
- package/dist/types/review/index.d.ts +13 -0
- package/dist/types/review/react.d.ts +1 -0
- package/dist/types/review/solid.d.ts +1 -0
- package/dist/types/themes/define.d.ts +104 -0
- package/dist/types/themes/index.d.ts +16 -0
- package/dist/types/themes/knobs.d.ts +5 -0
- package/dist/types/themes/review.d.ts +8 -0
- package/dist/types/themes/void.d.ts +8 -0
- package/dist/types/tokens/color.d.ts +42 -0
- package/dist/types/tokens/css.d.ts +13 -0
- package/dist/types/tokens/evaluate.d.ts +8 -0
- package/dist/types/tokens/index.d.ts +4 -0
- package/dist/types/tokens/schema.d.ts +1280 -0
- package/dist/types/ui/bento-css.d.ts +1 -1
- package/dist/types/ui/compare-css.d.ts +1 -1
- package/dist/types/ui/compare-gpu.d.ts +6 -6
- package/dist/types/ui/compare-model.d.ts +85 -2
- package/dist/types/ui/compare.d.ts +18 -4
- package/dist/types/ui/diff.d.ts +4 -5
- package/dist/types/ui/history-css.d.ts +1 -0
- package/dist/types/ui/history-model.d.ts +249 -0
- package/dist/types/ui/history.d.ts +38 -0
- package/dist/types/ui/icons.d.ts +40 -0
- package/dist/types/ui/index.d.ts +9 -5
- package/dist/types/ui/look.d.ts +18 -13
- package/dist/types/ui/overlay-css.d.ts +1 -1
- package/dist/types/ui/player-css.d.ts +1 -0
- package/dist/types/ui/player.d.ts +51 -0
- package/dist/types/ui/readout-css.d.ts +1 -1
- package/dist/types/ui/readout-model.d.ts +5 -1
- package/dist/types/ui/review-look.d.ts +6 -0
- package/dist/types/ui/review-options.d.ts +28 -0
- package/dist/types/ui/rgba.d.ts +11 -0
- package/dist/types/ui/selection-pill-css.d.ts +1 -0
- package/dist/types/ui/selection-pill.d.ts +106 -0
- package/dist/types/ui/timeline-model.d.ts +27 -0
- package/dist/types/ui/timeline.d.ts +16 -1
- package/dist/types/ui/tree.d.ts +3 -2
- package/dist/types/ui/walkthrough-annotations.d.ts +42 -0
- package/dist/types/ui/walkthrough-blocks.d.ts +87 -0
- package/dist/types/ui/walkthrough-media.d.ts +30 -1
- package/dist/types/ui/walkthrough-model.d.ts +469 -5
- package/dist/types/ui/walkthrough.d.ts +27 -5
- package/dist/ui-react.js +8087 -2350
- package/dist/ui-solid.js +8100 -2363
- package/dist/ui.js +9751 -3963
- package/package.json +13 -1
|
@@ -35,12 +35,21 @@ import {
|
|
|
35
35
|
springMotion2,
|
|
36
36
|
springResponse,
|
|
37
37
|
springEasing,
|
|
38
|
+
SPRINGS2,
|
|
39
|
+
FADE,
|
|
40
|
+
MOTION,
|
|
41
|
+
reducedMotion,
|
|
42
|
+
springLinear,
|
|
38
43
|
REFRESHES,
|
|
39
44
|
pushReadout,
|
|
40
45
|
READOUT,
|
|
41
46
|
storageKey
|
|
42
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-3ygqgy1x.js";
|
|
43
48
|
import {
|
|
49
|
+
resolveLook,
|
|
50
|
+
themeOf,
|
|
51
|
+
applyLook,
|
|
52
|
+
panelLook,
|
|
44
53
|
CHECK_POINTS,
|
|
45
54
|
CHECK_PATH,
|
|
46
55
|
iconPath,
|
|
@@ -48,7 +57,6 @@ import {
|
|
|
48
57
|
readSession,
|
|
49
58
|
writeSession,
|
|
50
59
|
rolling_css_default,
|
|
51
|
-
presetCss,
|
|
52
60
|
FILL,
|
|
53
61
|
LEAD,
|
|
54
62
|
trailScale,
|
|
@@ -93,8 +101,11 @@ import {
|
|
|
93
101
|
digitOption,
|
|
94
102
|
digitHints,
|
|
95
103
|
createCrumbs,
|
|
104
|
+
TOKENS,
|
|
105
|
+
knobs,
|
|
106
|
+
aliased,
|
|
107
|
+
injectTokens,
|
|
96
108
|
DELAYED,
|
|
97
|
-
injectPreset,
|
|
98
109
|
injectStyles,
|
|
99
110
|
resolveSound,
|
|
100
111
|
sound,
|
|
@@ -105,7 +116,7 @@ import {
|
|
|
105
116
|
createHintController,
|
|
106
117
|
pageHints,
|
|
107
118
|
toggleLayer
|
|
108
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-dyq4m24m.js";
|
|
109
120
|
|
|
110
121
|
// src/panel/die.ts
|
|
111
122
|
var ROUND = 16 * Math.sqrt(5), DIE = { half: 64 + ROUND, round: ROUND, pip: 12 }, PIPS = {
|
|
@@ -1292,7 +1303,7 @@ function createPresetStrip(doc, controls, showVariants, run, onAfterChange, pres
|
|
|
1292
1303
|
}
|
|
1293
1304
|
|
|
1294
1305
|
// src/panel/spin.ts
|
|
1295
|
-
var TURN = springMotion2(
|
|
1306
|
+
var TURN = springMotion2(SPRINGS2.smooth), BLINK_MS = 180, spins = /* @__PURE__ */ new WeakMap, reducedMotion2 = (el) => el.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches ?? !1, blinkAt = (ms) => ms >= BLINK_MS ? 1 : 1 - 0.55 * Math.sin(Math.PI * ms / BLINK_MS);
|
|
1296
1307
|
function spin(button, wake, rest) {
|
|
1297
1308
|
let icon = button.querySelector(".knobs-icon"), win = button.ownerDocument.defaultView;
|
|
1298
1309
|
if (!icon || !win)
|
|
@@ -1303,7 +1314,7 @@ function spin(button, wake, rest) {
|
|
|
1303
1314
|
let state = s;
|
|
1304
1315
|
state.rest = rest;
|
|
1305
1316
|
let now = win.performance.now();
|
|
1306
|
-
if (
|
|
1317
|
+
if (reducedMotion2(button))
|
|
1307
1318
|
state.blinkAt = now;
|
|
1308
1319
|
else
|
|
1309
1320
|
state.spring.set(state.spring.target - 360);
|
|
@@ -1353,7 +1364,7 @@ function resize(node, from) {
|
|
|
1353
1364
|
return;
|
|
1354
1365
|
}
|
|
1355
1366
|
node.style.overflow = "hidden";
|
|
1356
|
-
let ease = win.getComputedStyle(node).getPropertyValue("--
|
|
1367
|
+
let ease = win.getComputedStyle(node).getPropertyValue("--_k-reveal-ease").trim() || EASE_OUT, animation = node.animate([{ height: `${from}px` }, { height: `${to}px` }], {
|
|
1357
1368
|
duration: 200,
|
|
1358
1369
|
easing: ease
|
|
1359
1370
|
});
|
|
@@ -2179,7 +2190,7 @@ function rollMs(el) {
|
|
|
2179
2190
|
let n = parseFloat(getComputedStyle(el).getPropertyValue("--k-roll"));
|
|
2180
2191
|
return Number.isFinite(n) ? Math.max(0, n) : 320;
|
|
2181
2192
|
}
|
|
2182
|
-
var
|
|
2193
|
+
var reducedMotion3 = (el) => el.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches ?? !1, onCanvas = (el) => el.closest('[data-gpu-active="true"]') !== null, readouts = /* @__PURE__ */ new WeakMap, rollingReadoutOf = (el) => readouts.get(el), settle = (value, decimals) => {
|
|
2183
2194
|
let v = Number(value.toFixed(decimals));
|
|
2184
2195
|
return v === 0 ? 0 : v;
|
|
2185
2196
|
};
|
|
@@ -2197,7 +2208,7 @@ function rollingReadout(host) {
|
|
|
2197
2208
|
return segments.map((s) => s.text).join("");
|
|
2198
2209
|
},
|
|
2199
2210
|
show(parts, ms, delay = 0) {
|
|
2200
|
-
if (ms > 0 &&
|
|
2211
|
+
if (ms > 0 && reducedMotion3(host))
|
|
2201
2212
|
ms = 0;
|
|
2202
2213
|
let next = parts.map((p) => typeof p === "string" ? "t" : `n${p.decimals}`).join("|");
|
|
2203
2214
|
if (next !== shape) {
|
|
@@ -2263,7 +2274,7 @@ function fadeText(el, text, fade) {
|
|
|
2263
2274
|
return;
|
|
2264
2275
|
el.dataset.text = text, el.toggleAttribute("data-fade", fade);
|
|
2265
2276
|
let now = el.ownerDocument.createElement("span");
|
|
2266
|
-
if (now.textContent = text, el.replaceChildren(now), !fade || !was || !el.isConnected || onCanvas(el) ||
|
|
2277
|
+
if (now.textContent = text, el.replaceChildren(now), !fade || !was || !el.isConnected || onCanvas(el) || reducedMotion3(el))
|
|
2267
2278
|
return;
|
|
2268
2279
|
let ghost = el.ownerDocument.createElement("span");
|
|
2269
2280
|
ghost.className = "knobs-ghost", ghost.setAttribute("aria-hidden", "true"), ghost.textContent = was, el.append(ghost), now.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
@@ -2530,6 +2541,35 @@ var withAlpha = (c, k) => [
|
|
|
2530
2541
|
a[3] + (b[3] - a[3]) * u
|
|
2531
2542
|
];
|
|
2532
2543
|
};
|
|
2544
|
+
function pickScheme(raw, light) {
|
|
2545
|
+
let s = raw;
|
|
2546
|
+
for (let at = s.lastIndexOf("light-dark(");at >= 0; at = s.lastIndexOf("light-dark(")) {
|
|
2547
|
+
let depth = 0, comma = -1, end = -1;
|
|
2548
|
+
for (let i = at + 11;i < s.length; i++) {
|
|
2549
|
+
let ch = s[i];
|
|
2550
|
+
if (ch === "(")
|
|
2551
|
+
depth++;
|
|
2552
|
+
else if (ch === ")") {
|
|
2553
|
+
if (depth === 0) {
|
|
2554
|
+
end = i;
|
|
2555
|
+
break;
|
|
2556
|
+
}
|
|
2557
|
+
depth--;
|
|
2558
|
+
} else if (ch === "," && depth === 0 && comma < 0)
|
|
2559
|
+
comma = i;
|
|
2560
|
+
}
|
|
2561
|
+
if (end < 0 || comma < 0)
|
|
2562
|
+
break;
|
|
2563
|
+
let side = light ? s.slice(at + 11, comma) : s.slice(comma + 1, end);
|
|
2564
|
+
s = s.slice(0, at) + side.trim() + s.slice(end + 1);
|
|
2565
|
+
}
|
|
2566
|
+
return s;
|
|
2567
|
+
}
|
|
2568
|
+
var isLightStyle = (style) => style.getPropertyValue("--_k-light").trim() === "1";
|
|
2569
|
+
function tokenColor(style, name, fallback) {
|
|
2570
|
+
let raw = style.getPropertyValue(name).trim();
|
|
2571
|
+
return raw ? parseCssColor(pickScheme(raw, isLightStyle(style)), fallback) : fallback;
|
|
2572
|
+
}
|
|
2533
2573
|
|
|
2534
2574
|
// src/panel/gpu/color.ts
|
|
2535
2575
|
function cssMix(a, b, p) {
|
|
@@ -2539,7 +2579,7 @@ function cssMix(a, b, p) {
|
|
|
2539
2579
|
let ch = (i) => (a[i] * a[3] * p + b[i] * b[3] * (1 - p)) / alpha;
|
|
2540
2580
|
return [ch(0), ch(1), ch(2), alpha];
|
|
2541
2581
|
}
|
|
2542
|
-
var token = (style, name) => style.getPropertyValue(`--kv-${name}`) || style.getPropertyValue(`--k-${name}`), numProp = (style, name, fallback) => {
|
|
2582
|
+
var token = (style, name) => pickScheme(style.getPropertyValue(`--kv-${name}`) || style.getPropertyValue(`--_k-${name}`) || style.getPropertyValue(`--k-${name}`), isLightStyle(style)), numProp = (style, name, fallback) => {
|
|
2543
2583
|
let raw = parseFloat(token(style, name));
|
|
2544
2584
|
return Number.isFinite(raw) ? raw : fallback;
|
|
2545
2585
|
}, lengthProp = (style, name, em, fallback) => {
|
|
@@ -2549,7 +2589,7 @@ var token = (style, name) => style.getPropertyValue(`--kv-${name}`) || style.get
|
|
|
2549
2589
|
return raw.endsWith("em") ? n * em : n;
|
|
2550
2590
|
}, colorProp = (style, name, fallback) => token(style, name).trim() ? parseCssColor(token(style, name), fallback) : fallback, optColor = (style, name) => {
|
|
2551
2591
|
let raw = style.getPropertyValue(`--k-${name}`).trim();
|
|
2552
|
-
return raw ? parseCssColor(raw, [0, 0, 0, 0]) : null;
|
|
2592
|
+
return raw ? parseCssColor(pickScheme(raw, isLightStyle(style)), [0, 0, 0, 0]) : null;
|
|
2553
2593
|
}, optLength = (style, name, em) => {
|
|
2554
2594
|
let raw = style.getPropertyValue(`--k-${name}`).trim();
|
|
2555
2595
|
if (!raw)
|
|
@@ -2563,7 +2603,7 @@ function readPanelTokens(panel, version = -1) {
|
|
|
2563
2603
|
if (hit && hit.version === version)
|
|
2564
2604
|
return hit.tokens;
|
|
2565
2605
|
}
|
|
2566
|
-
let style = getComputedStyle(panel), bg = parseCssColor(token(style, "bg"),
|
|
2606
|
+
let style = getComputedStyle(panel), light = isLightStyle(style), theme = gpuDefaults(themeOf(panel), light), bg = parseCssColor(token(style, "bg"), theme.bg), isLight = light || bg[0] * 0.2126 + bg[1] * 0.7152 + bg[2] * 0.0722 > 0.55, surface = parseCssColor(token(style, "fill"), theme.fill), surfaceHi = parseCssColor(token(style, "fill-selected"), theme["fill-selected"]), line = parseCssColor(token(style, "border"), theme.border), lineHi = parseCssColor(token(style, "border-strong"), theme["border-strong"]), text = parseCssColor(token(style, "fg"), theme.fg), label = parseCssColor(token(style, "fg-2"), theme["fg-2"]), dim = parseCssColor(token(style, "fg-3"), theme["fg-3"]), accent = parseCssColor(token(style, "accent"), theme.accent), modified = parseCssColor(token(style, "modified"), theme.modified), segBg = parseCssColor(token(style, "segmented-track"), theme["segmented-track"]), segActive = parseCssColor(token(style, "segmented-active"), theme["segmented-active"]), toggleTrack = parseCssColor(token(style, "toggle-track"), theme["toggle-track"]), fillBase = style.getPropertyValue("--k-fill-base").trim() ? parseCssColor(token(style, "fill-base"), surfaceHi) : surfaceHi, toggleThumb = parseCssColor(token(style, "toggle-thumb"), theme["toggle-thumb"]), [duration, bounce] = style.getPropertyValue("--k-spring").trim().split(/\s+/).map(Number), fill = Number.isFinite(duration) && Number.isFinite(bounce) ? springMotion2({ duration, bounce }) : MOTION.default, fontFamily = style.fontFamily || style.getPropertyValue("--_k-font").trim() || 'system-ui, -apple-system, "SF Pro Text", sans-serif', monoFamily = style.getPropertyValue("--_k-mono").trim() || '"SF Mono", SFMono-Regular, ui-monospace, Menlo, monospace', unit = numProp(style, "unit", 4), pad = numProp(style, "pad", 10), inset = numProp(style, "inset", pad), row = numProp(style, "row", 32), gap = numProp(style, "gap", 4), trayPad = numProp(style, "tray-pad", unit * 0.5), radius = numProp(style, "radius", 8), panelRadius = numProp(style, "radius-panel", radius + unit), radiusMd = Math.max(0, radius - trayPad), radiusSm = Math.max(0, radius - trayPad * 2), fontSize = parseFloat(style.fontSize) || numProp(style, "font-size", 12), roundRaw = style.getPropertyValue("--_k-round").trim(), round = /^-?[\d.]+(px)?$/.test(roundRaw) ? Math.max(0, parseFloat(roundRaw)) : radius > 0 ? 1e4 : 0, tokens = {
|
|
2567
2607
|
bg,
|
|
2568
2608
|
surface,
|
|
2569
2609
|
surfaceHi,
|
|
@@ -2578,26 +2618,26 @@ function readPanelTokens(panel, version = -1) {
|
|
|
2578
2618
|
segActive,
|
|
2579
2619
|
toggleTrack,
|
|
2580
2620
|
toggleThumb,
|
|
2581
|
-
rim: parseCssColor(token(style, "rim"),
|
|
2582
|
-
edge: parseCssColor(token(style, "
|
|
2621
|
+
rim: parseCssColor(token(style, "rim"), theme.rim),
|
|
2622
|
+
edge: parseCssColor(token(style, "border-subtle"), theme["border-subtle"]),
|
|
2583
2623
|
rimWidth: lengthProp(style, "rim-width", fontSize, 1),
|
|
2584
|
-
page: parseCssColor(token(style, "page"),
|
|
2624
|
+
page: parseCssColor(token(style, "bg-page"), theme["bg-page"]),
|
|
2585
2625
|
rowHover: withAlpha(surface, 0.5),
|
|
2586
2626
|
rowGap: numProp(style, "row-gap", 0),
|
|
2587
2627
|
hoverIn: numProp(style, "hover-in", 0),
|
|
2588
2628
|
hoverOut: numProp(style, "hover-out", 120),
|
|
2589
2629
|
handleRest: numProp(style, "handle-rest", 0),
|
|
2590
|
-
handle: colorProp(style, "handle", accent),
|
|
2630
|
+
handle: colorProp(style, "slider-handle", accent),
|
|
2591
2631
|
handleInset: lengthProp(style, "handle-inset", fontSize, 0),
|
|
2592
2632
|
groupUpper: style.getPropertyValue("--k-group-transform").trim() !== "none",
|
|
2593
2633
|
groupSize: lengthProp(style, "group-size", fontSize, fontSize - 2),
|
|
2594
|
-
groupColor: colorProp(style, "group-
|
|
2634
|
+
groupColor: colorProp(style, "group-label", dim),
|
|
2595
2635
|
groupTracking: lengthProp(style, "group-tracking", 1, 0.04),
|
|
2596
2636
|
groupDivider: colorProp(style, "group-divider", [0, 0, 0, 0]),
|
|
2597
2637
|
unitGap: lengthProp(style, "unit-gap", fontSize - 0.5, (fontSize - 0.5) * 0.28),
|
|
2598
2638
|
unitColor: /^currentcolor$/i.test(token(style, "unit-color").trim()) ? null : colorProp(style, "unit-color", dim),
|
|
2599
2639
|
readoutMark: numProp(style, "readout-mark", 0),
|
|
2600
|
-
valueFamily: style.getPropertyValue("--
|
|
2640
|
+
valueFamily: style.getPropertyValue("--_k-value-font").trim() || fontFamily,
|
|
2601
2641
|
curveInset: lengthProp(style, "curve-inset", fontSize, 6),
|
|
2602
2642
|
curveDashed: style.getPropertyValue("--k-curve-guide").trim() === "dashed",
|
|
2603
2643
|
curveDot: numProp(style, "curve-dot", 1),
|
|
@@ -2622,7 +2662,7 @@ function readPanelTokens(panel, version = -1) {
|
|
|
2622
2662
|
textControl: fontSize - 0.5,
|
|
2623
2663
|
textMeta: fontSize - 1,
|
|
2624
2664
|
textCap: fontSize - 2,
|
|
2625
|
-
valueSize: parseFloat(style.getPropertyValue("--
|
|
2665
|
+
valueSize: parseFloat(style.getPropertyValue("--_k-value-size")) || fontSize - 0.5,
|
|
2626
2666
|
buttonBg: optColor(style, "button-bg"),
|
|
2627
2667
|
buttonLine: optColor(style, "button-line"),
|
|
2628
2668
|
buttonHoverBg: optColor(style, "button-hover-bg"),
|
|
@@ -2633,7 +2673,7 @@ function readPanelTokens(panel, version = -1) {
|
|
|
2633
2673
|
boxed: Boolean(style.getPropertyValue("--k-button-bg").trim() || style.getPropertyValue("--k-button-line").trim()),
|
|
2634
2674
|
iconSize: numProp(style, "icon-size", 14),
|
|
2635
2675
|
iconSm: numProp(style, "icon-sm", 13),
|
|
2636
|
-
labelWeight: numProp(style, "label
|
|
2676
|
+
labelWeight: numProp(style, "weight-label", 500),
|
|
2637
2677
|
disabledOpacity: numProp(style, "disabled-opacity", 0.32),
|
|
2638
2678
|
hintTypedOpacity: numProp(style, "hint-typed-opacity", 0.42),
|
|
2639
2679
|
blurStrength: numProp(style, "blur", 1),
|
|
@@ -2647,11 +2687,11 @@ function readPanelTokens(panel, version = -1) {
|
|
|
2647
2687
|
fontFamily,
|
|
2648
2688
|
monoFamily,
|
|
2649
2689
|
isLight,
|
|
2650
|
-
fontWeight: numProp(style, "
|
|
2651
|
-
titleWeight: numProp(style, "title
|
|
2690
|
+
fontWeight: numProp(style, "weight", 400),
|
|
2691
|
+
titleWeight: numProp(style, "weight-title", 600),
|
|
2652
2692
|
round,
|
|
2653
2693
|
flat: style.getPropertyValue("--k-frame").trim() === "flat",
|
|
2654
|
-
thumb: colorProp(style, "thumb", [
|
|
2694
|
+
thumb: colorProp(style, "toggle-thumb-off", theme["toggle-thumb-off"]),
|
|
2655
2695
|
lift: Math.max(0, numProp(style, "lift", 1)),
|
|
2656
2696
|
shadowStrength: Math.max(0, numProp(style, "shadow-strength", isLight ? 0.16 : 0.48))
|
|
2657
2697
|
};
|
|
@@ -2659,6 +2699,15 @@ function readPanelTokens(panel, version = -1) {
|
|
|
2659
2699
|
tokenCache.set(panel, { version, tokens });
|
|
2660
2700
|
return tokens;
|
|
2661
2701
|
}
|
|
2702
|
+
var toSrgb = (c) => c <= 0.0031308 ? 12.92 * c : 1.055 * c ** 0.4166666666666667 - 0.055, defaults = /* @__PURE__ */ new WeakMap;
|
|
2703
|
+
function gpuDefaults(theme, light) {
|
|
2704
|
+
let t = theme ?? knobs, hit = defaults.get(t);
|
|
2705
|
+
if (!hit) {
|
|
2706
|
+
let convert = (g) => Object.fromEntries(Object.entries(g).map(([k, [r, gg, b, a]]) => [k, [toSrgb(r), toSrgb(gg), toSrgb(b), a]]));
|
|
2707
|
+
hit = { dark: convert(t.gpu.dark), light: convert(t.gpu.light) }, defaults.set(t, hit);
|
|
2708
|
+
}
|
|
2709
|
+
return light ? hit.light : hit.dark;
|
|
2710
|
+
}
|
|
2662
2711
|
|
|
2663
2712
|
// src/panel/gpu/die.wgsl.ts
|
|
2664
2713
|
var f = (n) => Number.isInteger(n) ? `${n}.0` : String(n), v3 = (v) => `vec3f(${v.map(f).join(", ")})`, pipBranches = FACES.map(({ value }, i) => {
|
|
@@ -3511,7 +3560,7 @@ fn shadeAt(p: Prim, at: vec2f, rect: vec4f, frag: vec2f) -> vec4f {
|
|
|
3511
3560
|
`;
|
|
3512
3561
|
|
|
3513
3562
|
// src/panel/gpu/renderer.ts
|
|
3514
|
-
var LAYOUT_TOKENS = new Set(["width", "pad", "inset", "row", "gap", "font-size", "label
|
|
3563
|
+
var LAYOUT_TOKENS = new Set(["width", "pad", "inset", "row", "gap", "font-size", "weight-label"].map((t) => `--kt-${t}`)), nudge = (r, dx) => dx === 0 ? r : {
|
|
3515
3564
|
left: r.left + dx,
|
|
3516
3565
|
right: r.right + dx,
|
|
3517
3566
|
x: r.x + dx,
|
|
@@ -3719,7 +3768,13 @@ class GpuOverlayManager {
|
|
|
3719
3768
|
});
|
|
3720
3769
|
mo.observe(panel.root, {
|
|
3721
3770
|
attributes: !0,
|
|
3722
|
-
attributeFilter: [
|
|
3771
|
+
attributeFilter: [
|
|
3772
|
+
"data-knobs-theme",
|
|
3773
|
+
"data-appearance",
|
|
3774
|
+
"data-density",
|
|
3775
|
+
"data-preset",
|
|
3776
|
+
"style"
|
|
3777
|
+
]
|
|
3723
3778
|
});
|
|
3724
3779
|
let onTokenEvent = (event) => {
|
|
3725
3780
|
let name = event.propertyName;
|
|
@@ -5364,7 +5419,7 @@ class GpuOverlayManager {
|
|
|
5364
5419
|
let t = this.curTokens, el = cap.chip, text = cap.text.textContent ?? "", key = textKey(text), r = this.rectOf(el, key);
|
|
5365
5420
|
if (r.width <= 0)
|
|
5366
5421
|
return;
|
|
5367
|
-
let still = this.curReduced, capturing = cap.capturing(), on = interactive && (this.isHovered(el) || this.isFocused(el)), w = this.ease(el, "capw", r.width, still ? SNAP_OMEGA :
|
|
5422
|
+
let still = this.curReduced, capturing = cap.capturing(), on = interactive && (this.isHovered(el) || this.isFocused(el)), w = this.ease(el, "capw", r.width, still ? SNAP_OMEGA : MOTION.snappy.omega), texts = this.capTexts.get(el);
|
|
5368
5423
|
if (!texts)
|
|
5369
5424
|
this.capTexts.set(el, texts = { now: text, was: "" });
|
|
5370
5425
|
if (texts.now !== text)
|
|
@@ -5635,7 +5690,7 @@ class GpuOverlayManager {
|
|
|
5635
5690
|
this.curBypassRectCache = opening || leaving || panelRevealing && !bodyRevealing || layoutGliding || pageMoving || presenceRunning;
|
|
5636
5691
|
let tokens = rawTokens;
|
|
5637
5692
|
this.curTokens = tokens, this.curLocks = panel.locks, this.curLens = panel.lens !== void 0;
|
|
5638
|
-
let armedLook = this.armedLook(panel.root), armed = this.ease(panel.root, "armed", panel.root.hasAttribute("data-k-armed") ? 1 : 0, reducedMotion ? SNAP_OMEGA :
|
|
5693
|
+
let armedLook = this.armedLook(panel.root), armed = this.ease(panel.root, "armed", panel.root.hasAttribute("data-k-armed") ? 1 : 0, reducedMotion ? SNAP_OMEGA : MOTION.default.omega);
|
|
5639
5694
|
if (this.curDt = reducedMotion ? 1 : dt, this.curReduced = reducedMotion, opening || leaving)
|
|
5640
5695
|
this.curAlpha = Number(getComputedStyle(panel.root).opacity) || 0, anyMoving = !0;
|
|
5641
5696
|
else
|
|
@@ -6574,36 +6629,26 @@ function getGpuOverlayManager(doc) {
|
|
|
6574
6629
|
}
|
|
6575
6630
|
|
|
6576
6631
|
// src/panel/menu.ts
|
|
6577
|
-
var TOKENS = [
|
|
6632
|
+
var TOKEN_NAMES = TOKENS.map((t) => t.name), BORROWED = TOKEN_NAMES.map((t) => `--_k-${t}`), GLIDES = [
|
|
6578
6633
|
"bg",
|
|
6579
|
-
"
|
|
6580
|
-
"
|
|
6581
|
-
"
|
|
6582
|
-
"
|
|
6583
|
-
"
|
|
6584
|
-
"
|
|
6585
|
-
"
|
|
6634
|
+
"fill",
|
|
6635
|
+
"fill-selected",
|
|
6636
|
+
"segmented-track",
|
|
6637
|
+
"border",
|
|
6638
|
+
"fg",
|
|
6639
|
+
"fg-2",
|
|
6640
|
+
"fg-3",
|
|
6586
6641
|
"accent",
|
|
6587
6642
|
"font-size",
|
|
6588
6643
|
"radius",
|
|
6589
6644
|
"row",
|
|
6590
6645
|
"rim"
|
|
6591
|
-
], reduced = (doc) => doc.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches ?? !1;
|
|
6646
|
+
].map((t) => `--kv-${t}`), reduced = (doc) => doc.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches ?? !1;
|
|
6592
6647
|
function openMenu(doc, panel, items, at, options = {}) {
|
|
6593
6648
|
let win = doc.defaultView, previous = options.returnTo ?? doc.activeElement, menu = doc.createElement("div");
|
|
6594
|
-
menu.className = "knobs-menu", menu.setAttribute("role", "menu"), menu.tabIndex = -1;
|
|
6649
|
+
menu.className = "knobs-root knobs-menu", menu.setAttribute("role", "menu"), menu.tabIndex = -1;
|
|
6595
6650
|
let cs = win.getComputedStyle(panel);
|
|
6596
|
-
for (let t of
|
|
6597
|
-
menu.style.setProperty(`--kv-${t}`, cs.getPropertyValue(`--kv-${t}`));
|
|
6598
|
-
for (let t of [
|
|
6599
|
-
"--k-font",
|
|
6600
|
-
"--k-mono",
|
|
6601
|
-
"--k-unit",
|
|
6602
|
-
"--k-shadow",
|
|
6603
|
-
"--k-font-weight",
|
|
6604
|
-
"--k-title-weight",
|
|
6605
|
-
"--k-control-h"
|
|
6606
|
-
])
|
|
6651
|
+
for (let t of [...BORROWED, ...GLIDES])
|
|
6607
6652
|
menu.style.setProperty(t, cs.getPropertyValue(t));
|
|
6608
6653
|
menu.style.colorScheme = cs.colorScheme;
|
|
6609
6654
|
let active = -1, enabled = (i) => !items[i]?.disabled && !nodes[i]?.hidden, list = doc.createElement("div");
|
|
@@ -7068,7 +7113,7 @@ function createPageLayout(doc, host, options) {
|
|
|
7068
7113
|
}
|
|
7069
7114
|
let lit = null, glows = /* @__PURE__ */ new Map, glowing = /* @__PURE__ */ new Set, dimAmount = 0.4, panelSpring = () => {
|
|
7070
7115
|
let [duration, bounce] = getComputedStyle(host).getPropertyValue("--k-spring").trim().split(/\s+/).map(Number);
|
|
7071
|
-
return Number.isFinite(duration) && Number.isFinite(bounce) ? springMotion2({ duration, bounce }) :
|
|
7116
|
+
return Number.isFinite(duration) && Number.isFinite(bounce) ? springMotion2({ duration, bounce }) : MOTION.default;
|
|
7072
7117
|
}, idOf = (tile) => tile.dataset.group ?? tile.dataset.card, focusedIn = (node) => node.contains(doc.activeElement), litTile = (tile) => {
|
|
7073
7118
|
if (!lit)
|
|
7074
7119
|
return { on: !0, own: !1 };
|
|
@@ -7153,7 +7198,7 @@ function createPageLayout(doc, host, options) {
|
|
|
7153
7198
|
let h = Math.max(0, m.h.x);
|
|
7154
7199
|
if (node.style.height = `${h}px`, node.style.overflow = "clip", m.fold !== void 0) {
|
|
7155
7200
|
let f = Math.min(1, m.fold > 0 ? h / m.fold : 0);
|
|
7156
|
-
if (node.style.paddingTop = node.style.paddingBottom = `calc(var(--
|
|
7201
|
+
if (node.style.paddingTop = node.style.paddingBottom = `calc(var(--kv-pad) * ${f})`, node.style.marginBottom = `${-gapPx * (1 - f) - Math.max(0, 2 - h)}px`, !m.o)
|
|
7157
7202
|
node.style.opacity = leaving.has(node) && f < 0.3333333333333333 ? String(f * 3) : "";
|
|
7158
7203
|
}
|
|
7159
7204
|
}
|
|
@@ -8076,7 +8121,7 @@ function createSlider(doc, key, initialField, set, onMotionWake, options = {}) {
|
|
|
8076
8121
|
return r + (ratioOf(pulled) - r) * tokens.resist;
|
|
8077
8122
|
}, gpuActive = () => root.closest('[data-gpu-active="true"]') !== null, reduced = doc.defaultView?.matchMedia("(prefers-reduced-motion: reduce)"), writeFill = (ratio) => {
|
|
8078
8123
|
let p = `${ratio * 100}%`;
|
|
8079
|
-
fill.style.setProperty("--
|
|
8124
|
+
fill.style.setProperty("--_k-fill-at", p), handle.style.setProperty("--_k-fill-at", p), ruler.style.setProperty("--_k-fill-at", p);
|
|
8080
8125
|
}, frame = 0, frameAt = 0, smear = 0, synced = !0, springDriven = () => frame !== 0 || inHand() && stepped() || readTokens().blur > 0, setSmear = (px) => {
|
|
8081
8126
|
let next = px < 0.25 ? 0 : px;
|
|
8082
8127
|
if (next === smear)
|
|
@@ -8094,7 +8139,7 @@ function createSlider(doc, key, initialField, set, onMotionWake, options = {}) {
|
|
|
8094
8139
|
if (frame)
|
|
8095
8140
|
return;
|
|
8096
8141
|
if (!synced) {
|
|
8097
|
-
let shown = parseFloat(getComputedStyle(fill).getPropertyValue("--
|
|
8142
|
+
let shown = parseFloat(getComputedStyle(fill).getPropertyValue("--_k-fill-at"));
|
|
8098
8143
|
if (Number.isFinite(shown))
|
|
8099
8144
|
fillSpring.x = shown / 100, fillSpring.v = 0;
|
|
8100
8145
|
synced = !0;
|
|
@@ -8727,7 +8772,7 @@ function smearFilters(doc, plot) {
|
|
|
8727
8772
|
}
|
|
8728
8773
|
|
|
8729
8774
|
// src/panel/editors.ts
|
|
8730
|
-
var
|
|
8775
|
+
var reducedMotion4 = (doc) => doc.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches ?? !1, rgbCss = (rgb) => `rgb(${rgb.map((v) => Math.round(v * 2550) / 10).join(" ")})`, pathOf = (pts) => {
|
|
8731
8776
|
let d = "";
|
|
8732
8777
|
for (let i = 0;i < pts.length; i += 2)
|
|
8733
8778
|
d += `${i ? "L" : "M"}${pts[i].toFixed(2)} ${pts[i + 1].toFixed(2)}`;
|
|
@@ -8982,7 +9027,7 @@ function springRow(c) {
|
|
|
8982
9027
|
}, size = measure2(box, () => {
|
|
8983
9028
|
readLook(), draw(!0);
|
|
8984
9029
|
}), dragging = () => parts.some((p) => p.slider.isDragging()), dotAnimation, play = (delay) => {
|
|
8985
|
-
if (!size.w ||
|
|
9030
|
+
if (!size.w || reducedMotion4(c.doc))
|
|
8986
9031
|
return;
|
|
8987
9032
|
let frames = points(), ms = SPRING_WINDOW * 1000;
|
|
8988
9033
|
dotRun = { at: performance.now() + delay, frames, ms };
|
|
@@ -9534,7 +9579,7 @@ function easingRow(c) {
|
|
|
9534
9579
|
let [x0, y0] = map(0, 0), [x1, y1] = map(1, 1);
|
|
9535
9580
|
guides.setAttribute("d", `M${EASE_PAD.x} ${y0}H${size.w - EASE_PAD.x}M${EASE_PAD.x} ${y1}H${size.w - EASE_PAD.x}M${x0} ${y0}L${x1} ${y1}`);
|
|
9536
9581
|
}
|
|
9537
|
-
let still = instant || !placed ||
|
|
9582
|
+
let still = instant || !placed || reducedMotion4(c.doc);
|
|
9538
9583
|
if (placed = !0, morph.set(unitSamples(), unitHandles(), { instant: still, delay, now: performance.now() }), morph.moving)
|
|
9539
9584
|
strength = curveBlur(x.row), loop.kick();
|
|
9540
9585
|
draw();
|
|
@@ -9732,7 +9777,7 @@ function gradientRow(c) {
|
|
|
9732
9777
|
stop.style.setProperty("--kgs-grow", grow >= 0.999 ? "" : grow.toFixed(3)), tick.style.left = `${d.at[0] * 100}%`, tick.style.setProperty("--kgs-grow", grow >= 0.999 ? "" : grow.toFixed(3)), smears.dot(stop, ...stopSmear(d));
|
|
9733
9778
|
}
|
|
9734
9779
|
}, loop = morphLoop(c, morph, draw), layout = (instant, delay = 0) => {
|
|
9735
|
-
let still = instant || !initialized ||
|
|
9780
|
+
let still = instant || !initialized || reducedMotion4(c.doc);
|
|
9736
9781
|
if (morph.set(gradientSamples(shown, f.space), unitStops(), {
|
|
9737
9782
|
instant: still,
|
|
9738
9783
|
delay,
|
|
@@ -10068,7 +10113,7 @@ function curveRow(c) {
|
|
|
10068
10113
|
}
|
|
10069
10114
|
if (miniSize.h)
|
|
10070
10115
|
mini.setAttribute("viewBox", `0 0 ${MINI_W} ${miniSize.h}`);
|
|
10071
|
-
let still = instant || !initialized ||
|
|
10116
|
+
let still = instant || !initialized || reducedMotion4(c.doc);
|
|
10072
10117
|
if (morph.set(unitSamples(), unitPoints(), { instant: still, delay, now: performance.now() }), morph.moving)
|
|
10073
10118
|
strength = curveBlur(x.row), loop.kick();
|
|
10074
10119
|
draw(), drawHover();
|
|
@@ -10721,7 +10766,7 @@ function angleRow(c) {
|
|
|
10721
10766
|
return f().wrap ? wrapAngle2(q, f().min, f().max) : clamp(q, f().min, f().max);
|
|
10722
10767
|
}, rolling = rollingReadout(read), paint = (instant, delay = 0) => {
|
|
10723
10768
|
let t = mixed ? "—" : `${fmt(value, places())}°`;
|
|
10724
|
-
if (rolling.show(mixed ? ["—"] : [{ value, decimals: places() }, "°"], instant || row.classList.contains("knobs-active") ? 0 : rollMs(row), delay), control.setAttribute("aria-valuenow", String(value)), control.setAttribute("aria-valuetext", t), instant ||
|
|
10769
|
+
if (rolling.show(mixed ? ["—"] : [{ value, decimals: places() }, "°"], instant || row.classList.contains("knobs-active") ? 0 : rollMs(row), delay), control.setAttribute("aria-valuenow", String(value)), control.setAttribute("aria-valuetext", t), instant || reducedMotion4(c.doc))
|
|
10725
10770
|
hand.style.transition = "none";
|
|
10726
10771
|
if (hand.style.rotate = `${turn.toFixed(3)}deg`, instant)
|
|
10727
10772
|
hand.offsetWidth, hand.style.transition = "";
|
|
@@ -10964,14 +11009,14 @@ function seedRow(c) {
|
|
|
10964
11009
|
gpu: [gpu]
|
|
10965
11010
|
};
|
|
10966
11011
|
}
|
|
10967
|
-
var CAP_MORPH =
|
|
11012
|
+
var CAP_MORPH = springLinear(SPRINGS2.snappy);
|
|
10968
11013
|
function keyCap(o) {
|
|
10969
11014
|
let chip = o.doc.createElement("button");
|
|
10970
11015
|
chip.className = "knobs-keys", chip.type = "button";
|
|
10971
11016
|
let text = o.doc.createElement("span");
|
|
10972
11017
|
text.className = "knobs-keys-text", chip.append(text);
|
|
10973
11018
|
let value = "", capturing = !1, preview = "", morph, write = (shown) => {
|
|
10974
|
-
let glide = chip.isConnected && chip.offsetWidth > 0 && !chip.closest('[data-gpu-active="true"]') && !
|
|
11019
|
+
let glide = chip.isConnected && chip.offsetWidth > 0 && !chip.closest('[data-gpu-active="true"]') && !reducedMotion4(o.doc), from = glide ? chip.getBoundingClientRect().width : 0;
|
|
10975
11020
|
if (morph?.cancel(), text.textContent = shown, !glide)
|
|
10976
11021
|
return;
|
|
10977
11022
|
let to = chip.getBoundingClientRect().width;
|
|
@@ -11161,7 +11206,7 @@ function toolbarRow(c, press, keyOf = toolbarShortcut2) {
|
|
|
11161
11206
|
},
|
|
11162
11207
|
press(item) {
|
|
11163
11208
|
let i = field.items.indexOf(item), b = buttons[i];
|
|
11164
|
-
if (b && !
|
|
11209
|
+
if (b && !reducedMotion4(c.doc))
|
|
11165
11210
|
b.classList.add("knobs-pressed"), setTimeout(() => b.classList.remove("knobs-pressed"), 140), c.wake();
|
|
11166
11211
|
press(item);
|
|
11167
11212
|
},
|
|
@@ -11277,34 +11322,33 @@ function markLabel(label, text, span) {
|
|
|
11277
11322
|
}
|
|
11278
11323
|
|
|
11279
11324
|
// src/ui/activity-css.ts
|
|
11280
|
-
var open =
|
|
11325
|
+
var open = springLinear(SPRINGS2.snappy), activityCss = `
|
|
11281
11326
|
:where(.knobs-activity,.knobs-activity *){box-sizing:border-box}
|
|
11282
|
-
:where(.knobs-activity){color-scheme:dark}
|
|
11283
11327
|
.knobs-ui.knobs-activity{position:relative;display:block;height:100%;overflow:auto;overflow-anchor:none;outline:none;scrollbar-width:none;overscroll-behavior:contain;user-select:none;-webkit-user-select:none;
|
|
11284
|
-
font:var(--
|
|
11285
|
-
--ka-gutter:var(--k-activity-gutter,28px);--ka-row:var(--k-activity-row,var(--
|
|
11286
|
-
--ka-line:var(--
|
|
11287
|
-
--ka-you:var(--k-activity-you,
|
|
11288
|
-
--ka-review:var(--k-activity-review,var(--
|
|
11289
|
-
--ka-blocked:var(--k-activity-blocked,var(--
|
|
11328
|
+
font:var(--_k-weight) var(--_k-font-size)/1.35 var(--_k-font);color:var(--_k-fg);text-align:left;letter-spacing:normal;-webkit-font-smoothing:antialiased;
|
|
11329
|
+
--ka-gutter:var(--k-activity-gutter,28px);--ka-row:var(--k-activity-row,var(--_k-row));--ka-row-child:var(--k-activity-row-child,calc(var(--ka-row) - 6px));
|
|
11330
|
+
--ka-line:var(--_k-activity-rail);--ka-select:var(--k-activity-select,var(--_ku-wash-hi));--ka-hover:var(--k-activity-hover,var(--_ku-wash));
|
|
11331
|
+
--ka-you:var(--k-activity-you,var(--_k-info));--ka-agent:var(--k-activity-agent,var(--_k-fg-2));--ka-proposal:var(--k-activity-proposal,var(--_k-fg));
|
|
11332
|
+
--ka-review:var(--k-activity-review,var(--_k-fg));--ka-pr:var(--k-activity-pr,var(--_k-series-5));--ka-build:var(--k-activity-build,var(--_k-fg-2));
|
|
11333
|
+
--ka-blocked:var(--k-activity-blocked,var(--_k-warn));--ka-shipped:var(--k-activity-shipped,var(--_k-ok));--ka-open-ease:${open.easing};--ka-open-ms:${open.ms}ms}
|
|
11290
11334
|
.knobs-activity [hidden]{display:none!important}
|
|
11291
11335
|
/* Clipped below: the content grows on a spring, so a new last row shows as the rail makes room. */
|
|
11292
11336
|
.knobs-activity-space{position:relative;width:100%;overflow-x:visible;overflow-y:clip;pointer-events:none}
|
|
11293
|
-
.knobs-activity-line{position:absolute;top:0;left:calc(var(--
|
|
11337
|
+
.knobs-activity-line{position:absolute;top:0;left:calc(var(--_ku-row-x) + var(--ka-gutter) / 2 - 1px);width:2px;height:100%;overflow:visible;pointer-events:none;z-index:1}
|
|
11294
11338
|
.knobs-activity-line path{fill:none;stroke:var(--ka-line);stroke-width:1px}
|
|
11295
11339
|
/* The selection's tint: a wash that glides between rows, shown only once keys move it. It leaves
|
|
11296
11340
|
in 100 ms when the pointer is used, and comes back at once. */
|
|
11297
|
-
.knobs-activity-hl{position:absolute;left:var(--
|
|
11341
|
+
.knobs-activity-hl{position:absolute;left:var(--_ku-row-x);right:var(--_ku-row-x);top:0;height:0;border-radius:var(--_ku-row-radius);background:var(--ka-select);opacity:0;
|
|
11298
11342
|
transition:opacity 100ms ease-out;pointer-events:none;will-change:transform}
|
|
11299
11343
|
.knobs-activity[data-keys] .knobs-activity-hl{opacity:1;transition:none}
|
|
11300
|
-
.knobs-activity-row{position:absolute;left:var(--
|
|
11301
|
-
color:var(--
|
|
11344
|
+
.knobs-activity-row{position:absolute;left:var(--_ku-row-x);right:var(--_ku-row-x);top:0;display:flex;align-items:center;height:var(--ka-row);padding-right:calc(var(--_k-inset) - 4px);
|
|
11345
|
+
color:var(--_k-fg);white-space:nowrap;cursor:default;will-change:transform;transform-origin:calc(var(--ka-gutter) / 2) 50%;pointer-events:auto;--ka-tint:var(--ka-agent)}
|
|
11302
11346
|
.knobs-activity-row[data-leaving]{pointer-events:none}
|
|
11303
11347
|
.knobs-activity-row[data-depth="1"]{height:var(--ka-row-child)}
|
|
11304
11348
|
.knobs-activity-row>*{position:relative}
|
|
11305
11349
|
/* Hover: in at once, out over 100 ms; not while keys drive the selection. */
|
|
11306
|
-
.knobs-activity-row::before{content:"";position:absolute;inset:0;border-radius:var(--
|
|
11307
|
-
.knobs-activity:not([data-keys]) .knobs-activity-row:not([data-leaving]):hover::before{opacity:1;transition-duration:calc(var(--
|
|
11350
|
+
.knobs-activity-row::before{content:"";position:absolute;inset:0;border-radius:var(--_ku-row-radius);background:var(--ka-hover);opacity:0;transition:opacity calc(var(--_k-hover-out,100) * 1ms) ease-out;pointer-events:none}
|
|
11351
|
+
.knobs-activity:not([data-keys]) .knobs-activity-row:not([data-leaving]):hover::before{opacity:1;transition-duration:calc(var(--_k-hover-in,0) * 1ms)}
|
|
11308
11352
|
.knobs-activity-row[data-kind="you"]{--ka-tint:var(--ka-you)}
|
|
11309
11353
|
.knobs-activity-row[data-kind="agent"]{--ka-tint:var(--ka-agent)}
|
|
11310
11354
|
.knobs-activity-row[data-kind="proposal"]{--ka-tint:var(--ka-proposal)}
|
|
@@ -11316,7 +11360,7 @@ var open = springEasing(2 * Math.PI / 0.22, 1), activityCss = `
|
|
|
11316
11360
|
/* The node: the kind's icon on the line (which stops clear of it), or a small dot inside a group. */
|
|
11317
11361
|
.knobs-activity-node{flex:none;display:flex;align-items:center;justify-content:center;width:var(--ka-gutter);height:100%;color:var(--ka-tint)}
|
|
11318
11362
|
.knobs-activity-node svg{display:block;width:14px;height:14px}
|
|
11319
|
-
.knobs-activity-glyph{display:flex;align-items:center;justify-content:center;width:14px;height:14px;font-size:calc(var(--
|
|
11363
|
+
.knobs-activity-glyph{display:flex;align-items:center;justify-content:center;width:14px;height:14px;font-size:calc(var(--_k-font-size) - 1px);line-height:1}
|
|
11320
11364
|
.knobs-activity-node::before{content:"";position:absolute;left:50%;top:50%;width:22px;height:22px;margin:-11px 0 0 -11px;border-radius:50%;background:color-mix(in srgb,var(--ka-tint) 15%,transparent);
|
|
11321
11365
|
opacity:0;scale:.8;transition:opacity .16s ease-out,scale var(--ka-open-ms) var(--ka-open-ease)}
|
|
11322
11366
|
.knobs-activity-row[aria-selected="true"] .knobs-activity-node::before{opacity:1;scale:1}
|
|
@@ -11328,47 +11372,47 @@ var open = springEasing(2 * Math.PI / 0.22, 1), activityCss = `
|
|
|
11328
11372
|
.knobs-activity-row[data-depth="1"] .knobs-activity-node::before,.knobs-activity-row[data-depth="1"] .knobs-activity-node::after{width:13px;height:13px;margin:-6.5px 0 0 -6.5px}
|
|
11329
11373
|
/* The words: who in the text colour, then the title, one line that fades where it's cut off. */
|
|
11330
11374
|
.knobs-activity-main{flex:1;min-width:0;overflow:hidden;white-space:nowrap}
|
|
11331
|
-
.knobs-activity-actor{margin-right:6px;font-weight:var(--
|
|
11375
|
+
.knobs-activity-actor{margin-right:6px;font-weight:var(--_k-weight-label);color:var(--_k-fg)}
|
|
11332
11376
|
.knobs-activity-actor:empty{display:none}
|
|
11333
|
-
.knobs-activity-title{color:var(--
|
|
11334
|
-
.knobs-activity-row[data-depth="1"] .knobs-activity-main{font-size:var(--
|
|
11335
|
-
.knobs-activity-row[data-depth="1"] .knobs-activity-actor{font-weight:var(--
|
|
11336
|
-
.knobs-activity-row[data-depth="1"] .knobs-activity-title{color:var(--
|
|
11337
|
-
.knobs-activity-row[aria-selected="true"] .knobs-activity-title{color:var(--
|
|
11377
|
+
.knobs-activity-title{color:var(--_k-fg-2)}
|
|
11378
|
+
.knobs-activity-row[data-depth="1"] .knobs-activity-main{font-size:var(--_k-text-meta)}
|
|
11379
|
+
.knobs-activity-row[data-depth="1"] .knobs-activity-actor{font-weight:var(--_k-weight);color:var(--_k-fg-2)}
|
|
11380
|
+
.knobs-activity-row[data-depth="1"] .knobs-activity-title{color:var(--_k-fg-3)}
|
|
11381
|
+
.knobs-activity-row[aria-selected="true"] .knobs-activity-title{color:var(--_k-fg)}
|
|
11338
11382
|
.knobs-activity-row[data-dimmed] :is(.knobs-activity-main,.knobs-activity-meta){opacity:.55}
|
|
11339
11383
|
.knobs-activity-row[data-dimmed] .knobs-activity-node{opacity:.6}
|
|
11340
11384
|
/* Trailing: thumbnails, a duration chip, the group's chevron and the time. */
|
|
11341
|
-
.knobs-activity-meta{flex:none;display:flex;align-items:center;gap:6px;margin-left:8px;color:var(--
|
|
11385
|
+
.knobs-activity-meta{flex:none;display:flex;align-items:center;gap:6px;margin-left:8px;color:var(--_k-fg-3);font-size:var(--_k-text-meta);font-variant-numeric:tabular-nums}
|
|
11342
11386
|
.knobs-activity-meta:empty{display:none}
|
|
11343
11387
|
.knobs-activity-thumbs{display:flex;gap:3px}
|
|
11344
|
-
.knobs-activity-thumbs img{display:block;width:18px;height:18px;border-radius:4px;object-fit:cover;background:var(--
|
|
11388
|
+
.knobs-activity-thumbs img{display:block;width:18px;height:18px;border-radius:4px;object-fit:cover;background:var(--_k-fill);box-shadow:inset 0 0 0 .5px var(--_k-border)}
|
|
11345
11389
|
.knobs-activity-row[data-depth="1"] .knobs-activity-thumbs img{width:15px;height:15px}
|
|
11346
11390
|
:where(.knobs-ui) .knobs-activity-chip{all:revert;box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;height:18px;padding:0 6px 0 5px;border:0;margin:0;border-radius:9px;
|
|
11347
|
-
background:var(--
|
|
11391
|
+
background:var(--_k-fill);color:var(--_k-fg-2);font:inherit;font-variant-numeric:tabular-nums;letter-spacing:inherit;outline:none;transition:background calc(var(--_k-hover-out,100) * 1ms) ease-out}
|
|
11348
11392
|
.knobs-activity-chip svg{width:8px;height:8px}
|
|
11349
11393
|
button.knobs-activity-chip{cursor:pointer}
|
|
11350
|
-
button.knobs-activity-chip:hover{background:var(--
|
|
11351
|
-
.knobs-activity-caret{display:flex;width:12px;height:12px;color:var(--
|
|
11394
|
+
button.knobs-activity-chip:hover{background:var(--_k-fill-selected);color:var(--_k-fg);transition-duration:0s}
|
|
11395
|
+
.knobs-activity-caret{display:flex;width:12px;height:12px;color:var(--_k-fg-3);transition:rotate .18s var(--_ku-ease)}
|
|
11352
11396
|
.knobs-activity-caret svg{width:10px;height:10px;margin:1px}
|
|
11353
11397
|
.knobs-activity-row[aria-expanded="true"] .knobs-activity-caret{rotate:90deg;transition:rotate var(--ka-open-ms) var(--ka-open-ease)}
|
|
11354
11398
|
.knobs-activity-time{min-width:2ch;text-align:right;white-space:nowrap}
|
|
11355
11399
|
.knobs-activity-time:empty{display:none}
|
|
11356
|
-
.knobs-activity-empty{padding:10px var(--
|
|
11400
|
+
.knobs-activity-empty{padding:10px var(--_k-inset);color:var(--_k-fg-3)}
|
|
11357
11401
|
@media(prefers-reduced-motion:reduce){.knobs-activity :where(*,::before,::after){transition:none!important;animation:none!important}}
|
|
11358
11402
|
`;
|
|
11359
11403
|
|
|
11360
11404
|
// src/ui/bento-css.ts
|
|
11361
11405
|
var bentoCss = `
|
|
11362
|
-
.knobs-ui.knobs-bento{--
|
|
11363
|
-
position:relative;width:100%;height:100%;overflow:hidden auto;outline:none;background:var(--k-ui-bento-bg,var(--
|
|
11406
|
+
.knobs-ui.knobs-bento{--_ku-bento-radius:var(--k-ui-bento-radius,max(0px,calc(var(--_k-radius) - 5px)));
|
|
11407
|
+
position:relative;width:100%;height:100%;overflow:hidden auto;outline:none;background:var(--k-ui-bento-bg,var(--_k-bg-page));
|
|
11364
11408
|
scrollbar-width:thin;scrollbar-gutter:stable;overscroll-behavior:contain;touch-action:pan-y;user-select:none;-webkit-user-select:none;
|
|
11365
|
-
font:var(--
|
|
11366
|
-
.knobs-bento[data-frame="flat"]{--
|
|
11409
|
+
font:var(--_k-weight) var(--_k-font-size)/1.35 var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left}
|
|
11410
|
+
.knobs-bento[data-frame="flat"]{--_ku-bento-radius:var(--k-ui-bento-radius,0px)}
|
|
11367
11411
|
.knobs-bento[data-pending] .knobs-bento-space{visibility:hidden}
|
|
11368
11412
|
:where(.knobs-bento-space,.knobs-bento-space *){box-sizing:border-box}
|
|
11369
11413
|
.knobs-bento-space{position:relative;width:100%}
|
|
11370
|
-
.knobs-bento-tile{position:absolute;left:0;top:0;transform-origin:0 0;overflow:hidden;border-radius:var(--
|
|
11371
|
-
background:var(--
|
|
11414
|
+
.knobs-bento-tile{position:absolute;left:0;top:0;transform-origin:0 0;overflow:hidden;border-radius:var(--_ku-bento-radius);
|
|
11415
|
+
background:var(--_k-fill);contain:strict;cursor:zoom-in}
|
|
11372
11416
|
.knobs-bento-tile[data-focus]{z-index:2;cursor:zoom-out}
|
|
11373
11417
|
.knobs-bento-tile[data-focus][data-live]{cursor:auto}
|
|
11374
11418
|
.knobs-bento-img{display:block;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .18s cubic-bezier(.2,.8,.2,1);-webkit-user-drag:none}
|
|
@@ -11376,227 +11420,283 @@ var bentoCss = `
|
|
|
11376
11420
|
.knobs-bento-tile[data-instant] .knobs-bento-img{transition:none}
|
|
11377
11421
|
.knobs-bento-body{position:absolute;inset:0;pointer-events:none}
|
|
11378
11422
|
.knobs-bento-tile[data-focus] .knobs-bento-body{pointer-events:auto}
|
|
11379
|
-
.knobs-bento-label{position:absolute;left:9px;right:9px;bottom:7px;color:#fff;font-size:var(--
|
|
11380
|
-
text-shadow:0 0 6px rgba(0,0,0,.55),0 0 1px rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity calc(var(--
|
|
11423
|
+
.knobs-bento-label{position:absolute;left:9px;right:9px;bottom:7px;color:#fff;font-size:var(--_k-text-meta);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
|
|
11424
|
+
text-shadow:0 0 6px rgba(0,0,0,.55),0 0 1px rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity calc(var(--_k-hover-out) * 1ms)}
|
|
11381
11425
|
.knobs-bento:not([data-keyboard]) .knobs-bento-tile:hover .knobs-bento-label,
|
|
11382
11426
|
.knobs-bento[data-keyboard]:focus .knobs-bento-tile[data-active] .knobs-bento-label,
|
|
11383
|
-
.knobs-bento-tile[data-focus] .knobs-bento-label{opacity:1;transition-duration:calc(var(--
|
|
11427
|
+
.knobs-bento-tile[data-focus] .knobs-bento-label{opacity:1;transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11384
11428
|
/* A pick: a small dot in the accent, ringed in the page so it reads on any picture. */
|
|
11385
|
-
.knobs-bento-tile::after{content:"";position:absolute;top:8px;right:8px;width:8px;height:8px;border-radius:50%;background:var(--
|
|
11386
|
-
box-shadow:0 0 0 1.5px color-mix(in srgb,var(--
|
|
11387
|
-
transition:opacity .11s cubic-bezier(.4,0,1,1),scale var(--
|
|
11388
|
-
.knobs-bento-tile[aria-selected="true"]::after{opacity:1;scale:1;transition:opacity .15s cubic-bezier(.2,.8,.2,1),scale var(--
|
|
11389
|
-
.knobs-bento-wash{position:absolute;left:0;top:0;width:100px;height:100px;transform-origin:0 0;z-index:3;pointer-events:none;border-radius:var(--
|
|
11390
|
-
background:color-mix(in srgb,var(--
|
|
11429
|
+
.knobs-bento-tile::after{content:"";position:absolute;top:8px;right:8px;width:8px;height:8px;border-radius:50%;background:var(--_k-accent);
|
|
11430
|
+
box-shadow:0 0 0 1.5px color-mix(in srgb,var(--_k-bg-page) 70%,transparent);opacity:0;scale:.4;pointer-events:none;
|
|
11431
|
+
transition:opacity .11s cubic-bezier(.4,0,1,1),scale var(--_ku-ease-ms) var(--_ku-ease)}
|
|
11432
|
+
.knobs-bento-tile[aria-selected="true"]::after{opacity:1;scale:1;transition:opacity .15s cubic-bezier(.2,.8,.2,1),scale var(--_ku-ease-ms) var(--_ku-ease)}
|
|
11433
|
+
.knobs-bento-wash{position:absolute;left:0;top:0;width:100px;height:100px;transform-origin:0 0;z-index:3;pointer-events:none;border-radius:var(--_ku-bento-radius);
|
|
11434
|
+
background:color-mix(in srgb,var(--_k-accent) 12%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--_k-accent) 45%,transparent);
|
|
11391
11435
|
opacity:0;transition:opacity .15s}
|
|
11392
11436
|
.knobs-bento[data-keyboard]:focus:not([data-zoomed]) .knobs-bento-wash[data-on]{opacity:1}
|
|
11393
|
-
.knobs-bento-scrim{position:absolute;left:0;top:0;width:100%;z-index:1;background:var(--k-ui-scrim,var(--k-ui-bento-bg,var(--
|
|
11437
|
+
.knobs-bento-scrim{position:absolute;left:0;top:0;width:100%;z-index:1;background:var(--k-ui-scrim,var(--k-ui-bento-bg,var(--_k-bg-page)));opacity:0;pointer-events:none;cursor:zoom-out}
|
|
11394
11438
|
.knobs-bento[data-zoomed] .knobs-bento-scrim{pointer-events:auto}
|
|
11395
|
-
.knobs-bento-head{position:absolute;left:0;top:0;display:flex;align-items:flex-end;padding:0 0 6px 2px;color:var(--
|
|
11396
|
-
font-size:var(--
|
|
11439
|
+
.knobs-bento-head{position:absolute;left:0;top:0;display:flex;align-items:flex-end;padding:0 0 6px 2px;color:var(--_k-fg-2);font-weight:var(--_k-weight-label);
|
|
11440
|
+
font-size:var(--_k-text-meta);white-space:nowrap;pointer-events:none}
|
|
11397
11441
|
`;
|
|
11398
11442
|
|
|
11399
11443
|
// src/ui/compare-css.ts
|
|
11400
11444
|
var compareCss = `
|
|
11401
11445
|
:where(.knobs-compare,.knobs-compare *,.knobs-cmp-strip,.knobs-cmp-strip *){box-sizing:border-box}
|
|
11402
|
-
.knobs-ui.knobs-compare{--
|
|
11403
|
-
--
|
|
11446
|
+
.knobs-ui.knobs-compare{--_ku-cmp-diff:var(--k-compare-diff,var(--_k-ok));--_ku-cmp-line:var(--_k-compare-divider);
|
|
11447
|
+
--_ku-cmp-stage:var(--_k-compare-stage);
|
|
11404
11448
|
display:flex;flex-direction:column;gap:6px;width:100%;height:100%;min-height:160px;outline:none;user-select:none;-webkit-user-select:none;
|
|
11405
|
-
font:var(--
|
|
11449
|
+
font:var(--_k-weight) var(--_k-type-small)/var(--_k-leading-small) var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left}
|
|
11406
11450
|
:where(.knobs-ui) :is(.knobs-cmp-mode,.knobs-cmp-toggle){all:revert;box-sizing:border-box;font:inherit;color:inherit;letter-spacing:inherit;background:transparent;border:0;margin:0;padding:0;outline:none;box-shadow:none}
|
|
11407
|
-
.knobs-cmp-bar{flex:none;display:flex;align-items:center;gap:
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
.knobs-
|
|
11412
|
-
|
|
11451
|
+
.knobs-cmp-bar{flex:none;display:flex;align-items:center;gap:var(--_k-gap);height:var(--_k-control-h)}
|
|
11452
|
+
/* The modes: one fill, the selection pill on the one picked; a mode isn't brighter for being
|
|
11453
|
+
picked: the pill's bright copy is. */
|
|
11454
|
+
.knobs-cmp-modes{position:relative;display:inline-flex;height:var(--_k-control-h);border-radius:var(--_k-radius);background:var(--_k-fill)}
|
|
11455
|
+
.knobs-cmp-modes[hidden]{display:none}
|
|
11456
|
+
/* Hover is a quiet fill under the arrow cursor (no hand, no brightening), there at once. */
|
|
11457
|
+
.knobs-ui .knobs-cmp-mode{display:inline-flex;align-items:center;height:100%;padding:0 8px;border-radius:var(--_k-radius);color:var(--_k-fg-2);cursor:default;white-space:nowrap;
|
|
11458
|
+
transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
11459
|
+
.knobs-ui .knobs-cmp-mode:not([aria-checked="true"]):is(:hover,:focus-visible){background:var(--_k-fill-hover);transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11460
|
+
/* Toggles: icon buttons, the accent's wash when on. */
|
|
11461
|
+
.knobs-ui .knobs-cmp-toggle{display:inline-flex;align-items:center;justify-content:center;width:var(--_k-control-h);height:var(--_k-control-h);border-radius:var(--_k-radius);color:var(--_k-fg-2);cursor:default;
|
|
11462
|
+
transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
11463
|
+
.knobs-ui .knobs-cmp-toggle:is(:hover,:focus-visible){background:var(--_k-fill-hover);transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11464
|
+
.knobs-ui .knobs-cmp-toggle[aria-pressed="true"]{color:var(--_k-accent-fg);background:var(--_k-accent-soft)}
|
|
11465
|
+
.knobs-cmp-toggle svg{display:block}
|
|
11413
11466
|
.knobs-cmp-fill{flex:1}
|
|
11414
11467
|
.knobs-cmp-toggle[hidden]{display:none}
|
|
11415
11468
|
/* One surface: on a card (a walkthrough's step, a split's pane, anything .knobs-surface) or marked
|
|
11416
11469
|
data-nested, the stage drops its fill and the sides sit on that card. */
|
|
11417
|
-
:where(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-ui.knobs-compare,.knobs-ui.knobs-compare[data-nested]{--
|
|
11470
|
+
:where(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-ui.knobs-compare,.knobs-ui.knobs-compare[data-nested]{--_ku-cmp-stage:var(--k-compare-stage,transparent)}
|
|
11418
11471
|
/* In a page's flow (a container with no height), it takes the height its sides need. */
|
|
11419
11472
|
.knobs-ui.knobs-compare[data-auto]{height:auto}
|
|
11420
11473
|
.knobs-compare[data-auto] .knobs-cmp-stage{flex:none;min-height:0}
|
|
11421
|
-
.knobs-cmp-stage{position:relative;flex:1;min-height:96px;overflow:hidden;border-radius:var(--
|
|
11474
|
+
.knobs-cmp-stage{position:relative;flex:1;min-height:96px;overflow:hidden;border-radius:var(--_k-radius-panel);background:var(--_ku-cmp-stage);touch-action:pan-y;outline:none}
|
|
11422
11475
|
.knobs-compare[data-frame="flat"] .knobs-cmp-stage{border-radius:0}
|
|
11423
11476
|
.knobs-compare[data-mode="wipe"] .knobs-cmp-stage{cursor:ew-resize}
|
|
11424
11477
|
/* Unzoomed, a finger still scrolls the page up and down; zoomed, the stage takes every gesture. */
|
|
11425
|
-
.
|
|
11426
|
-
.knobs-compare[data-
|
|
11427
|
-
.knobs-compare[data-
|
|
11478
|
+
/* Zoomed, it pans: a move cursor, never a hand. */
|
|
11479
|
+
.knobs-compare[data-zoomed] .knobs-cmp-stage{cursor:move;touch-action:none}
|
|
11480
|
+
.knobs-compare[data-panning],.knobs-compare[data-panning] *{cursor:move!important}
|
|
11481
|
+
/* Wiping, the grip stands in for the cursor. */
|
|
11482
|
+
.knobs-compare[data-dragging],.knobs-compare[data-dragging] *{cursor:none!important}
|
|
11428
11483
|
.knobs-cmp-sizer{position:absolute;left:0;right:0;top:0;height:0;visibility:hidden;pointer-events:none}
|
|
11429
11484
|
.knobs-cmp-canvas{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}
|
|
11430
11485
|
.knobs-cmp-media{position:absolute;left:0;top:0;display:block;max-width:none;margin:0;padding:0;border:0;object-fit:fill;transform-origin:0 0;pointer-events:none;will-change:transform}
|
|
11431
11486
|
.knobs-compare[data-renderer="gpu"] .knobs-cmp-media{opacity:0}
|
|
11432
|
-
/*
|
|
11433
|
-
.knobs-cmp-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
.knobs-cmp-label
|
|
11437
|
-
.
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
.knobs-cmp-
|
|
11441
|
-
.knobs-cmp-
|
|
11442
|
-
|
|
11443
|
-
.knobs-cmp-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
.knobs-cmp-
|
|
11487
|
+
/* The media comes in with its first frames: a fade and a 4px blur on the default spring. */
|
|
11488
|
+
.knobs-cmp-canvas,.knobs-compare[data-renderer="dom"] .knobs-cmp-media{transition:opacity calc(var(--_k-motion-default-ms) * 1ms) var(--_k-motion-default),filter calc(var(--_k-motion-default-ms) * 1ms) var(--_k-motion-default)}
|
|
11489
|
+
.knobs-compare:not([data-ready]) :is(.knobs-cmp-canvas,.knobs-cmp-media){opacity:0;filter:blur(4px)}
|
|
11490
|
+
/* Over the pictures: a quiet scrim, dark in either appearance, blurred, with no ring. */
|
|
11491
|
+
.knobs-cmp-label,.knobs-cmp-zoom,.knobs-cmp-grip{background:var(--_ku-media-scrim);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
|
|
11492
|
+
/* ✗ Before · ✓ After: Before quieter, After in full. Neutral: no colour of its own. */
|
|
11493
|
+
.knobs-cmp-label{position:absolute;left:0;top:0;display:flex;align-items:center;gap:4px;padding:1px 7px 1px 5px;border-radius:999px;font-weight:var(--_k-weight-label);
|
|
11494
|
+
white-space:nowrap;pointer-events:none;will-change:transform}
|
|
11495
|
+
.knobs-cmp-label[data-side="before"]{color:var(--_ku-on-media-2)}
|
|
11496
|
+
.knobs-cmp-label[data-side="after"]{color:var(--_ku-on-media)}
|
|
11497
|
+
/* Fusing, the mark folds away and the label is its name. */
|
|
11498
|
+
.knobs-cmp-mark{flex:none;display:flex;justify-content:flex-end;overflow:hidden}
|
|
11499
|
+
.knobs-cmp-mark svg{display:block;flex:none;width:12px;height:12px}
|
|
11500
|
+
/* The fuse's seam: a blurred strip over where the sides meet, soft at both sides. */
|
|
11501
|
+
.knobs-cmp-seam{position:absolute;left:0;top:0;width:8px;height:0;opacity:0;pointer-events:none;will-change:transform,opacity;
|
|
11502
|
+
-webkit-mask-image:linear-gradient(to right,transparent,#000 35%,#000 65%,transparent);mask-image:linear-gradient(to right,transparent,#000 35%,#000 65%,transparent)}
|
|
11503
|
+
/* The wipe: a hairline down the line with a raised grip in its middle (at the pointer's height
|
|
11504
|
+
while dragged); a wider strip takes the hand and the keys (a slider). It fades in with the
|
|
11505
|
+
fuse; wiping, line and grip brighten. */
|
|
11506
|
+
.knobs-cmp-handle{cursor:ew-resize;position:absolute;left:-12px;top:0;width:24px;height:0;opacity:0;pointer-events:none;outline:none;will-change:transform,opacity}
|
|
11507
|
+
.knobs-cmp-handle[data-on]{pointer-events:auto}
|
|
11508
|
+
.knobs-cmp-handle::before{content:"";position:absolute;top:0;bottom:0;left:11.5px;width:1px;background:color-mix(in srgb,var(--_ku-cmp-line) 72%,transparent);box-shadow:0 0 6px var(--_ku-media-scrim)}
|
|
11509
|
+
.knobs-compare[data-dragging] .knobs-cmp-handle::before{background:var(--_ku-cmp-line)}
|
|
11510
|
+
.knobs-cmp-grip{position:absolute;top:0;left:4px;width:16px;height:28px;border-radius:min(8px,calc(var(--_k-radius) * 999));will-change:transform}
|
|
11511
|
+
.knobs-cmp-grip::before,.knobs-cmp-grip::after{content:"";position:absolute;top:10px;width:1px;height:8px;background:var(--_ku-on-media-2);transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
11512
|
+
.knobs-cmp-grip::before{left:6px}
|
|
11513
|
+
.knobs-cmp-grip::after{left:9px}
|
|
11514
|
+
.knobs-compare[data-dragging] .knobs-cmp-grip::before,.knobs-compare[data-dragging] .knobs-cmp-grip::after{background:var(--_ku-on-media)}
|
|
11515
|
+
.knobs-cmp-handle:focus-visible .knobs-cmp-grip,.knobs-compare[data-keyboard] .knobs-cmp-handle:focus .knobs-cmp-grip{box-shadow:0 0 0 2px var(--_k-accent)}
|
|
11447
11516
|
/* The split's hairline, down the middle side by side. */
|
|
11448
|
-
.knobs-cmp-split{position:absolute;left:0;top:0;width:1px;height:0;margin-left:-.5px;background:color-mix(in srgb,var(--
|
|
11517
|
+
.knobs-cmp-split{position:absolute;left:0;top:0;width:1px;height:0;margin-left:-.5px;background:color-mix(in srgb,var(--_k-bg) 72%,transparent);pointer-events:none;will-change:transform,opacity}
|
|
11449
11518
|
/* Zoomed: how far, and a way back, in the stage's corner; it fades in and out, nothing shifts. */
|
|
11450
11519
|
.knobs-cmp-zoom{position:absolute;right:8px;bottom:8px;display:flex;align-items:center;gap:4px;height:26px;padding:0 3px 0 10px;border-radius:999px;
|
|
11451
|
-
color:var(--
|
|
11520
|
+
color:var(--_ku-on-media);font-variant-numeric:tabular-nums;font-feature-settings:var(--_kr-data,"tnum");white-space:nowrap;
|
|
11452
11521
|
opacity:0;scale:.96;pointer-events:none;transition:opacity .16s cubic-bezier(.4,0,1,1),scale .16s cubic-bezier(.4,0,1,1)}
|
|
11453
11522
|
.knobs-cmp-zoom[data-on]{opacity:1;scale:1;pointer-events:auto;transition:opacity .2s cubic-bezier(.2,.8,.2,1),scale .2s cubic-bezier(.2,.8,.2,1)}
|
|
11454
11523
|
:where(.knobs-ui) .knobs-cmp-zoom-reset{all:revert;box-sizing:border-box;font:inherit;letter-spacing:inherit;margin:0;border:0;outline:none;box-shadow:none;
|
|
11455
|
-
height:20px;padding:0
|
|
11456
|
-
:where(.knobs-ui) .knobs-cmp-zoom-reset:is(:hover,:focus-visible){
|
|
11457
|
-
.knobs-cmp-note{position:absolute;left:50%;top:50%;translate:-50% -50%;color:var(--
|
|
11524
|
+
display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border-radius:999px;background:transparent;color:var(--_ku-on-media-2);cursor:default;transition:background calc(var(--_k-hover-out) * 1ms),color calc(var(--_k-hover-out) * 1ms)}
|
|
11525
|
+
:where(.knobs-ui) .knobs-cmp-zoom-reset:is(:hover,:focus-visible){background:color-mix(in srgb,var(--_ku-on-media) 16%,transparent);color:var(--_ku-on-media);transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11526
|
+
.knobs-cmp-note{position:absolute;left:50%;top:50%;translate:-50% -50%;color:var(--_k-fg-3);pointer-events:none}
|
|
11458
11527
|
.knobs-cmp-note:empty{display:none}
|
|
11459
11528
|
.knobs-cmp-strip-host{flex:none;height:60px;min-height:0}
|
|
11460
|
-
.knobs-cmp-timeline-host{flex:none;
|
|
11529
|
+
.knobs-cmp-timeline-host{flex:none;min-height:0}
|
|
11461
11530
|
/* The frame strip: Before over After per column, a difference bar under them, a dot where it peaks. */
|
|
11462
|
-
.knobs-ui.knobs-cmp-strip{--
|
|
11463
|
-
font:var(--
|
|
11531
|
+
.knobs-ui.knobs-cmp-strip{--_ku-cmp-diff:var(--k-compare-diff,var(--_k-ok));position:relative;width:100%;height:100%;min-height:40px;overflow:hidden;cursor:col-resize;touch-action:none;
|
|
11532
|
+
font:var(--_k-weight) var(--_k-type-small)/var(--_k-leading-small) var(--_k-font);color:var(--_k-fg)}
|
|
11464
11533
|
.knobs-cmp-strip>canvas{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}
|
|
11465
11534
|
@media(prefers-reduced-motion:reduce){:is(.knobs-compare,.knobs-cmp-strip) :where(*,::before,::after){transition-duration:.12s!important}}
|
|
11466
11535
|
`;
|
|
11467
11536
|
|
|
11537
|
+
// src/ui/player-css.ts
|
|
11538
|
+
var playerCss = `
|
|
11539
|
+
:where(.knobs-player,.knobs-player *){box-sizing:border-box}
|
|
11540
|
+
.knobs-ui.knobs-player{--_kp-stage:var(--_k-compare-stage);display:flex;flex-direction:column;gap:6px;width:100%;outline:none;
|
|
11541
|
+
font:var(--_k-weight) var(--_k-type-small)/var(--_k-leading-small) var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left}
|
|
11542
|
+
:where(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-ui.knobs-player,.knobs-ui.knobs-player[data-nested]{--_kp-stage:var(--k-compare-stage,transparent)}
|
|
11543
|
+
.knobs-player-frame{position:relative;width:100%;aspect-ratio:var(--kp-aspect,16/9);overflow:hidden;border-radius:var(--_k-radius-panel);background:var(--_kp-stage)}
|
|
11544
|
+
.knobs-player[data-frame="flat"] .knobs-player-frame{border-radius:0}
|
|
11545
|
+
.knobs-player-media{position:absolute;inset:0;display:block;width:100%;height:100%;margin:0;padding:0;border:0;object-fit:contain;
|
|
11546
|
+
opacity:0;filter:blur(4px);transition:opacity calc(var(--_k-motion-default-ms) * 1ms) var(--_k-motion-default),filter calc(var(--_k-motion-default-ms) * 1ms) var(--_k-motion-default)}
|
|
11547
|
+
.knobs-player[data-ready] .knobs-player-media{opacity:1;filter:none}
|
|
11548
|
+
.knobs-player-line{flex:none;min-height:0}
|
|
11549
|
+
/* The timeline's own stylesheet is look.ts's; what the player's row and every timeline share
|
|
11550
|
+
about the hand is set here, after it. No hand cursor anywhere (the arrow, or a resize where it
|
|
11551
|
+
resizes); hover is a quiet fill (fill-hover), in at once (hover-in, 0 ms), out easing. */
|
|
11552
|
+
.knobs-ui .knobs-tl-play,.knobs-ui.knobs-timeline :is(.knobs-tl-pin,.knobs-tl-rlabel),
|
|
11553
|
+
.knobs-ui.knobs-timeline[data-dragging] .knobs-tl-marker :is(.knobs-tl-pin,.knobs-tl-mlabel){cursor:default}
|
|
11554
|
+
.knobs-ui .knobs-tl-play:hover,.knobs-tl-edge:hover::after,.knobs-tl-rlabel:hover,.knobs-tl-track:hover .knobs-tl-hover,
|
|
11555
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-track:hover .knobs-tl-segs{transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11556
|
+
/* The line's row: a minimal play/pause (the filled pair, a 28px target, no fill at rest), then
|
|
11557
|
+
the line, centred on it. */
|
|
11558
|
+
.knobs-ui.knobs-timeline[data-variant="line"]{gap:4px;align-items:center}
|
|
11559
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-transport{display:flex}
|
|
11560
|
+
.knobs-ui.knobs-timeline[data-variant="line"] .knobs-tl-play{width:28px;height:28px;min-width:28px;min-height:28px;border-radius:var(--_k-radius);background:transparent;color:var(--_k-fg-2);
|
|
11561
|
+
transition:background calc(var(--_k-hover-out) * 1ms),transform .15s var(--_ku-ease)}
|
|
11562
|
+
.knobs-ui.knobs-timeline[data-variant="line"][data-playing] .knobs-tl-play{background:transparent;color:var(--_k-fg-2)}
|
|
11563
|
+
.knobs-ui.knobs-timeline[data-variant="line"] .knobs-tl-play:hover{background:var(--_k-fill-hover);transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11564
|
+
.knobs-ui.knobs-timeline[data-variant="line"] .knobs-tl-track{cursor:default;transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
11565
|
+
.knobs-ui.knobs-timeline[data-variant="line"] .knobs-tl-track:hover{background:var(--_k-fill-hover);transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11566
|
+
`;
|
|
11567
|
+
|
|
11468
11568
|
// src/ui/overlay-css.ts
|
|
11469
11569
|
var overlayCss = `
|
|
11470
11570
|
.knobs-layers{position:fixed;inset:0;z-index:2147480005;pointer-events:none}
|
|
11471
11571
|
.knobs-layers>.knobs-layer,.knobs-ui.knobs-toast{position:fixed;left:0;top:0;box-sizing:border-box;pointer-events:auto;outline:none;
|
|
11472
|
-
font:var(--
|
|
11572
|
+
font:var(--_k-weight) var(--_k-font-size)/1.4 var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left;text-transform:none;
|
|
11473
11573
|
-webkit-font-smoothing:antialiased;will-change:transform,opacity,filter}
|
|
11474
11574
|
/* The overlays' own elements stop a host's element rules; what you put in a popover is yours. */
|
|
11475
11575
|
:where(.knobs-layers,.knobs-toast) :is(.knobs-kbd,.knobs-mitem,.knobs-menu-sep,.knobs-palette-input,.knobs-palette-label>mark,.knobs-confirm-title,.knobs-confirm-body,.knobs-confirm-btn,.knobs-toast-action){all:revert;box-sizing:border-box;font:inherit;color:inherit;letter-spacing:inherit;
|
|
11476
11576
|
background:transparent;border:0;margin:0;padding:0;outline:none;box-shadow:none}
|
|
11477
11577
|
.knobs-layers .knobs-layer *{box-sizing:border-box}
|
|
11478
11578
|
/* A floating surface: frosted, a hairline rim, a soft shadow. */
|
|
11479
|
-
.knobs-layers>:is(.knobs-popover-layer,.knobs-palette,.knobs-confirm,.knobs-menu-layer){background:color-mix(in srgb,var(--
|
|
11480
|
-
-webkit-backdrop-filter:blur(28px) saturate(1.7);backdrop-filter:blur(28px) saturate(1.7);border-radius:var(--
|
|
11481
|
-
box-shadow:0 0 0 .5px var(--
|
|
11579
|
+
.knobs-layers>:is(.knobs-popover-layer,.knobs-palette,.knobs-confirm,.knobs-menu-layer){background:color-mix(in srgb,var(--_k-bg) 88%,transparent);
|
|
11580
|
+
-webkit-backdrop-filter:blur(28px) saturate(1.7);backdrop-filter:blur(28px) saturate(1.7);border-radius:var(--_k-radius-panel);
|
|
11581
|
+
box-shadow:0 0 0 .5px var(--_k-border-strong),inset 0 1px 0 var(--_k-rim),0 12px 40px rgba(0,0,0,calc(.36 * var(--_k-shadow-k,1))),0 2px 8px rgba(0,0,0,calc(.18 * var(--_k-shadow-k,1)))}
|
|
11482
11582
|
.knobs-layers>.knobs-popover-layer{min-width:120px;max-width:min(420px,calc(100vw - 16px));padding:6px}
|
|
11483
|
-
.knobs-popover-layer .knobs-popover-text{padding:4px 6px;color:var(--
|
|
11583
|
+
.knobs-popover-layer .knobs-popover-text{padding:4px 6px;color:var(--_k-fg-2)}
|
|
11484
11584
|
|
|
11485
11585
|
/* Menus: rows of the panel's control height, a soft wash on the active one (never an outline),
|
|
11486
11586
|
concentric corners inside the surface. */
|
|
11487
11587
|
.knobs-layers>.knobs-menu-layer{display:flex;flex-direction:column;min-width:184px;max-width:min(340px,calc(100vw - 16px));max-height:calc(100vh - 16px);overflow:auto;padding:5px;
|
|
11488
11588
|
scrollbar-width:thin;overscroll-behavior:contain;user-select:none;-webkit-user-select:none}
|
|
11489
|
-
.knobs-menu-layer .knobs-mitem{position:relative;display:flex;align-items:center;gap:8px;flex:none;height:max(22px,calc(var(--
|
|
11490
|
-
border-radius:max(0px,calc(var(--
|
|
11491
|
-
.knobs-menu-layer .knobs-mitem[data-active],.knobs-menu-layer .knobs-mitem[data-open]{background:var(--
|
|
11492
|
-
.knobs-menu-layer .knobs-mitem[data-destructive]{color:var(--
|
|
11493
|
-
.knobs-menu-layer .knobs-mitem[data-destructive][data-active]{background:color-mix(in srgb,var(--
|
|
11589
|
+
.knobs-menu-layer .knobs-mitem{position:relative;display:flex;align-items:center;gap:8px;flex:none;height:max(22px,calc(var(--_k-row) - 6px));padding:0 8px;
|
|
11590
|
+
border-radius:max(0px,calc(var(--_k-radius-panel) - 5px));color:var(--_k-fg);cursor:default;white-space:nowrap}
|
|
11591
|
+
.knobs-menu-layer .knobs-mitem[data-active],.knobs-menu-layer .knobs-mitem[data-open]{background:var(--_ku-wash-hi)}
|
|
11592
|
+
.knobs-menu-layer .knobs-mitem[data-destructive]{color:var(--_k-danger)}
|
|
11593
|
+
.knobs-menu-layer .knobs-mitem[data-destructive][data-active]{background:color-mix(in srgb,var(--_k-danger) 16%,transparent)}
|
|
11494
11594
|
.knobs-menu-layer .knobs-mitem[aria-disabled="true"]{opacity:.38}
|
|
11495
|
-
.knobs-menu-layer .knobs-menu-lead{flex:none;display:flex;align-items:center;justify-content:center;width:14px;margin-left:-2px;color:var(--
|
|
11595
|
+
.knobs-menu-layer .knobs-menu-lead{flex:none;display:flex;align-items:center;justify-content:center;width:14px;margin-left:-2px;color:var(--_k-fg-2);font-size:calc(var(--_k-font-size) - 1px)}
|
|
11496
11596
|
.knobs-menu-layer .knobs-mitem[data-destructive] .knobs-menu-lead,.knobs-menu-layer .knobs-mitem[aria-checked="true"] .knobs-menu-lead{color:inherit}
|
|
11497
11597
|
.knobs-menu-layer .knobs-menu-lead svg{width:13px;height:13px}
|
|
11498
11598
|
.knobs-menu-layer .knobs-menu-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
|
|
11499
|
-
.knobs-menu-layer .knobs-menu-hint{flex:none;color:var(--
|
|
11599
|
+
.knobs-menu-layer .knobs-menu-hint{flex:none;color:var(--_k-fg-3)}
|
|
11500
11600
|
.knobs-menu-layer .knobs-menu-keys{display:inline-flex;gap:2px;flex:none;margin-left:12px}
|
|
11501
|
-
.knobs-menu-layer .knobs-mitem[data-active] .knobs-kbd{background:color-mix(in srgb,var(--
|
|
11502
|
-
.knobs-menu-layer .knobs-menu-caret{flex:none;display:flex;margin-left:8px;margin-right:-3px;color:var(--
|
|
11601
|
+
.knobs-menu-layer .knobs-mitem[data-active] .knobs-kbd{background:color-mix(in srgb,var(--_k-fg) 14%,transparent);color:var(--_k-fg)}
|
|
11602
|
+
.knobs-menu-layer .knobs-menu-caret{flex:none;display:flex;margin-left:8px;margin-right:-3px;color:var(--_k-fg-3)}
|
|
11503
11603
|
.knobs-menu-layer .knobs-menu-caret svg{width:10px;height:10px}
|
|
11504
|
-
.knobs-menu-layer .knobs-menu-sep{flex:none;height:1px;margin:4px 8px;background:var(--
|
|
11604
|
+
.knobs-menu-layer .knobs-menu-sep{flex:none;height:1px;margin:4px 8px;background:var(--_k-border)}
|
|
11505
11605
|
|
|
11506
11606
|
.knobs-layers>.knobs-tooltip{display:inline-flex;align-items:center;gap:7px;max-width:300px;padding:4px 8px;pointer-events:none;white-space:nowrap;
|
|
11507
|
-
font-size:calc(var(--
|
|
11508
|
-
box-shadow:0 0 0 .5px var(--
|
|
11607
|
+
font-size:calc(var(--_k-font-size) - .5px);background:var(--_k-bg);color:var(--_k-fg);border-radius:min(var(--_k-radius),6px);
|
|
11608
|
+
box-shadow:0 0 0 .5px var(--_k-border-strong),0 4px 14px rgba(0,0,0,calc(.3 * var(--_k-shadow-k,1)))}
|
|
11509
11609
|
.knobs-tooltip .knobs-tooltip-text{overflow:hidden;text-overflow:ellipsis}
|
|
11510
11610
|
.knobs-layer :is(.knobs-tooltip-keys,.knobs-palette-keys){display:inline-flex;gap:2px;flex:none}
|
|
11511
11611
|
.knobs-layer .knobs-tooltip-keys[hidden]{display:none}
|
|
11512
11612
|
.knobs-layer .knobs-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 4px;
|
|
11513
|
-
border-radius:min(var(--
|
|
11613
|
+
border-radius:min(var(--_k-radius),4px);background:var(--_k-fill-selected);color:var(--_k-fg-2);font:500 calc(var(--_k-font-size) - 1.5px)/1 var(--_k-font)}
|
|
11514
11614
|
|
|
11515
11615
|
.knobs-layers>.knobs-palette{left:50%;top:max(48px,15vh);translate:-50% 0;transform-origin:50% 0;display:flex;flex-direction:column;
|
|
11516
11616
|
width:min(580px,calc(100vw - 32px));max-height:min(460px,72vh);overflow:hidden}
|
|
11517
|
-
.knobs-palette .knobs-palette-field{display:flex;align-items:center;gap:10px;flex:none;height:46px;padding:0 16px;border-bottom:1px solid var(--
|
|
11617
|
+
.knobs-palette .knobs-palette-field{display:flex;align-items:center;gap:10px;flex:none;height:46px;padding:0 16px;border-bottom:1px solid var(--_k-border);color:var(--_k-fg-3)}
|
|
11518
11618
|
.knobs-palette .knobs-palette-field svg{width:15px;height:15px;flex:none}
|
|
11519
|
-
.knobs-palette .knobs-palette-input{flex:1;min-width:0;height:100%;font-size:calc(var(--
|
|
11520
|
-
.knobs-palette .knobs-palette-input::placeholder{color:var(--
|
|
11619
|
+
.knobs-palette .knobs-palette-input{flex:1;min-width:0;height:100%;font-size:calc(var(--_k-font-size) + 3px);color:var(--_k-fg);caret-color:var(--_k-accent)}
|
|
11620
|
+
.knobs-palette .knobs-palette-input::placeholder{color:var(--_k-fg-3)}
|
|
11521
11621
|
.knobs-palette .knobs-palette-list{position:relative;flex:1;min-height:0;overflow:auto;padding:6px;scrollbar-width:thin;overscroll-behavior:contain}
|
|
11522
|
-
.knobs-palette .knobs-palette-hl{position:absolute;left:6px;right:6px;top:0;border-radius:max(0px,calc(var(--
|
|
11523
|
-
transition:transform var(--
|
|
11524
|
-
.knobs-palette .knobs-palette-section{padding:10px 10px 4px;color:var(--
|
|
11622
|
+
.knobs-palette .knobs-palette-hl{position:absolute;left:6px;right:6px;top:0;border-radius:max(0px,calc(var(--_k-radius-panel) - 6px));background:var(--_ku-wash-hi);opacity:0;pointer-events:none;
|
|
11623
|
+
transition:transform var(--_ku-ease-ms) var(--_ku-ease),height var(--_ku-ease-ms) var(--_ku-ease),opacity .12s}
|
|
11624
|
+
.knobs-palette .knobs-palette-section{padding:10px 10px 4px;color:var(--_k-fg-3);font-size:calc(var(--_k-font-size) - 1px);font-weight:var(--_k-weight-label);user-select:none}
|
|
11525
11625
|
.knobs-palette .knobs-palette-section:first-of-type{padding-top:4px}
|
|
11526
|
-
.knobs-palette .knobs-palette-item{position:relative;display:flex;align-items:center;gap:8px;height:max(32px,var(--
|
|
11527
|
-
color:var(--
|
|
11528
|
-
.knobs-palette .knobs-palette-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--
|
|
11626
|
+
.knobs-palette .knobs-palette-item{position:relative;display:flex;align-items:center;gap:8px;height:max(32px,var(--_k-row));padding:0 10px;
|
|
11627
|
+
color:var(--_k-fg-2);cursor:default;user-select:none}
|
|
11628
|
+
.knobs-palette .knobs-palette-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--_k-fg)}
|
|
11529
11629
|
/* Searching, the label dims and its matched letters light up. */
|
|
11530
|
-
.knobs-palette[data-query] .knobs-palette-label{color:var(--
|
|
11531
|
-
.knobs-palette .knobs-palette-label mark{color:var(--
|
|
11532
|
-
.knobs-palette[data-query] .knobs-palette-item[data-active] .knobs-palette-label{color:var(--
|
|
11533
|
-
.knobs-palette .knobs-palette-hint{flex:none;color:var(--
|
|
11630
|
+
.knobs-palette[data-query] .knobs-palette-label{color:var(--_k-fg-2)}
|
|
11631
|
+
.knobs-palette .knobs-palette-label mark{color:var(--_k-accent);font-weight:var(--_k-weight-title)}
|
|
11632
|
+
.knobs-palette[data-query] .knobs-palette-item[data-active] .knobs-palette-label{color:var(--_k-fg)}
|
|
11633
|
+
.knobs-palette .knobs-palette-hint{flex:none;color:var(--_k-fg-3)}
|
|
11534
11634
|
.knobs-palette .knobs-palette-fill{flex:1}
|
|
11535
|
-
.knobs-palette .knobs-palette-tag{flex:none;color:var(--
|
|
11635
|
+
.knobs-palette .knobs-palette-tag{flex:none;color:var(--_k-fg-3);font-size:calc(var(--_k-font-size) - 1px);white-space:nowrap}
|
|
11536
11636
|
.knobs-palette .knobs-palette-item[aria-disabled="true"]{opacity:.4}
|
|
11537
|
-
.knobs-palette .knobs-palette-empty{padding:18px 10px;color:var(--
|
|
11637
|
+
.knobs-palette .knobs-palette-empty{padding:18px 10px;color:var(--_k-fg-3);text-align:center}
|
|
11538
11638
|
|
|
11539
|
-
.knobs-layers>.knobs-scrim{inset:0;width:100%;height:100%;background:
|
|
11639
|
+
.knobs-layers>.knobs-scrim{inset:0;width:100%;height:100%;background:var(--_k-scrim)}
|
|
11540
11640
|
.knobs-layers>.knobs-confirm{left:50%;top:42%;translate:-50% -50%;width:min(340px,calc(100vw - 32px));padding:18px 18px 14px}
|
|
11541
|
-
.knobs-confirm .knobs-confirm-title{margin:0 0 6px;font-size:calc(var(--
|
|
11542
|
-
.knobs-confirm .knobs-confirm-body{margin:0;color:var(--
|
|
11641
|
+
.knobs-confirm .knobs-confirm-title{margin:0 0 6px;font-size:calc(var(--_k-font-size) + 1.5px);font-weight:var(--_k-weight-title);color:var(--_k-fg);line-height:1.3}
|
|
11642
|
+
.knobs-confirm .knobs-confirm-body{margin:0;color:var(--_k-fg-2);line-height:1.45}
|
|
11543
11643
|
.knobs-confirm .knobs-confirm-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
|
|
11544
|
-
.knobs-confirm .knobs-confirm-btn{height:28px;padding:0 14px;border-radius:min(var(--
|
|
11545
|
-
font-weight:var(--
|
|
11546
|
-
.knobs-confirm .knobs-confirm-cancel:is(:hover,:focus-visible){background:color-mix(in srgb,var(--
|
|
11547
|
-
.knobs-confirm .knobs-confirm-ok{background:var(--
|
|
11548
|
-
.knobs-confirm .knobs-confirm-ok[data-destructive]{background:var(--
|
|
11644
|
+
.knobs-confirm .knobs-confirm-btn{height:28px;padding:0 14px;border-radius:min(var(--_k-radius),7px);background:var(--_k-fill-selected);color:var(--_k-fg);
|
|
11645
|
+
font-weight:var(--_k-weight-label);cursor:pointer;transition:background .15s,filter .15s}
|
|
11646
|
+
.knobs-confirm .knobs-confirm-cancel:is(:hover,:focus-visible){background:color-mix(in srgb,var(--_k-fg) 18%,transparent)}
|
|
11647
|
+
.knobs-confirm .knobs-confirm-ok{background:var(--_k-accent);color:var(--_k-bg)}
|
|
11648
|
+
.knobs-confirm .knobs-confirm-ok[data-destructive]{background:var(--_k-danger);color:#fff}
|
|
11549
11649
|
.knobs-confirm .knobs-confirm-ok:is(:hover,:focus-visible){filter:brightness(1.14)}
|
|
11550
11650
|
|
|
11551
11651
|
.knobs-ui.knobs-toast{left:50%;top:auto;bottom:24px;z-index:2147480005;translate:-50% 0;display:inline-flex;align-items:center;gap:10px;
|
|
11552
|
-
max-width:min(480px,80vw);padding:8px 16px;background:var(--
|
|
11553
|
-
box-shadow:0 0 0 .5px var(--
|
|
11652
|
+
max-width:min(480px,80vw);padding:8px 16px;background:var(--_k-bg);color:var(--_k-fg);border-radius:calc(var(--_k-radius) * 999);
|
|
11653
|
+
box-shadow:0 0 0 .5px var(--_k-border-strong),0 8px 28px rgba(0,0,0,calc(.32 * var(--_k-shadow-k,1)))}
|
|
11554
11654
|
.knobs-toast .knobs-toast-text{overflow-wrap:anywhere}
|
|
11555
|
-
.knobs-toast[data-tone="warn"]::before,.knobs-toast[data-tone="error"]::before{content:"";flex:none;width:7px;height:7px;border-radius:50%;background:var(--
|
|
11556
|
-
.knobs-toast[data-tone="error"]::before{background:var(--
|
|
11557
|
-
.knobs-toast .knobs-toast-action{flex:none;color:var(--
|
|
11655
|
+
.knobs-toast[data-tone="warn"]::before,.knobs-toast[data-tone="error"]::before{content:"";flex:none;width:7px;height:7px;border-radius:50%;background:var(--_k-warn)}
|
|
11656
|
+
.knobs-toast[data-tone="error"]::before{background:var(--_k-danger)}
|
|
11657
|
+
.knobs-toast .knobs-toast-action{flex:none;color:var(--_k-accent);font-weight:var(--_k-weight-title);cursor:pointer}
|
|
11558
11658
|
.knobs-toast .knobs-toast-action[hidden]{display:none}
|
|
11559
11659
|
`;
|
|
11560
11660
|
|
|
11561
11661
|
// src/ui/picker-css.ts
|
|
11562
|
-
var snappy =
|
|
11662
|
+
var snappy = springLinear(SPRINGS2.snappy), pickerCss = `
|
|
11563
11663
|
:where(.knobs-picker,.knobs-picker-option,.knobs-picker-head,.knobs-picker-head *,.knobs-picker-card,.knobs-picker-body){box-sizing:border-box}
|
|
11564
11664
|
.knobs-ui.knobs-picker{position:relative;display:flex;flex-direction:column;gap:2px;padding:0;outline:none;
|
|
11565
|
-
font:var(--
|
|
11566
|
-
--kp-card:var(--
|
|
11665
|
+
font:var(--_k-weight) var(--_k-font-size)/1.35 var(--_k-font);color:var(--_k-fg);text-align:left;letter-spacing:normal;-webkit-font-smoothing:antialiased;
|
|
11666
|
+
--kp-card:var(--_k-picker-card);--kp-radius:var(--k-picker-radius,var(--_k-radius-panel));--kp-snappy:${snappy.easing};--kp-snappy-ms:${snappy.ms}ms}
|
|
11567
11667
|
.knobs-picker [hidden]{display:none!important}
|
|
11568
11668
|
/* The selection: one card behind the selected option and its parameters, gliding between them. */
|
|
11569
|
-
.knobs-picker-card{position:absolute;left:0;right:0;top:0;height:0;border-radius:var(--kp-radius);background:var(--kp-card);box-shadow:inset 0 0 0 1px var(--
|
|
11669
|
+
.knobs-picker-card{position:absolute;left:0;right:0;top:0;height:0;border-radius:var(--kp-radius);background:var(--kp-card);box-shadow:inset 0 0 0 1px var(--_k-border);pointer-events:none}
|
|
11570
11670
|
.knobs-picker[data-frame="flat"] .knobs-picker-card{box-shadow:none}
|
|
11571
11671
|
.knobs-picker-option{position:relative;flex:none}
|
|
11572
|
-
:where(.knobs-ui) .knobs-picker-head{all:revert;box-sizing:border-box;position:relative;display:flex;align-items:center;gap:8px;width:100%;height:var(--
|
|
11573
|
-
border:0;margin:0;background:transparent;color:var(--
|
|
11672
|
+
:where(.knobs-ui) .knobs-picker-head{all:revert;box-sizing:border-box;position:relative;display:flex;align-items:center;gap:8px;width:100%;height:var(--_k-row);padding:0 calc(var(--_k-inset) - 2px) 0 calc(var(--_k-inset) - 4px);
|
|
11673
|
+
border:0;margin:0;background:transparent;color:var(--_k-fg-2);font:inherit;letter-spacing:inherit;text-align:left;cursor:default;outline:none;user-select:none;-webkit-user-select:none}
|
|
11574
11674
|
/* Hover: in at once, out over 100 ms. Keyboard focus: the same wash, a little firmer. */
|
|
11575
|
-
.knobs-picker-head::before{content:"";position:absolute;inset:0;border-radius:var(--kp-radius);background:var(--
|
|
11576
|
-
.knobs-picker-option:not([data-selected]) .knobs-picker-head:hover::before{opacity:1;transition-duration:calc(var(--
|
|
11577
|
-
.knobs-picker-head:focus-visible::before{opacity:1;background:var(--
|
|
11675
|
+
.knobs-picker-head::before{content:"";position:absolute;inset:0;border-radius:var(--kp-radius);background:var(--_ku-wash);opacity:0;transition:opacity calc(var(--_k-hover-out,100) * 1ms) ease-out;pointer-events:none}
|
|
11676
|
+
.knobs-picker-option:not([data-selected]) .knobs-picker-head:hover::before{opacity:1;transition-duration:calc(var(--_k-hover-in,0) * 1ms)}
|
|
11677
|
+
.knobs-picker-head:focus-visible::before{opacity:1;background:var(--_ku-wash-hi);transition-duration:0s}
|
|
11578
11678
|
.knobs-picker-head>*{position:relative}
|
|
11579
|
-
.knobs-picker-option[data-selected] .knobs-picker-head{color:var(--
|
|
11679
|
+
.knobs-picker-option[data-selected] .knobs-picker-head{color:var(--_k-fg)}
|
|
11580
11680
|
/* Every row is numbered (only 1–9 are keys): tabular digits in a column two digits wide, so the
|
|
11581
11681
|
names line up past the ninth. */
|
|
11582
|
-
.knobs-picker-key{flex:none;display:inline-flex;align-items:center;justify-content:center;width:max(17px,calc(2ch + 6px));height:17px;padding:0;border-radius:5px;background:var(--
|
|
11583
|
-
color:var(--
|
|
11682
|
+
.knobs-picker-key{flex:none;display:inline-flex;align-items:center;justify-content:center;width:max(17px,calc(2ch + 6px));height:17px;padding:0;border-radius:5px;background:var(--_k-fill);
|
|
11683
|
+
color:var(--_k-fg-3);font:var(--_k-weight-label) calc(var(--_k-font-size) - 1.5px)/1 var(--_k-font);font-variant-numeric:tabular-nums;transition:background .15s,color .15s}
|
|
11584
11684
|
.knobs-picker-key:empty{visibility:hidden}
|
|
11585
11685
|
/* An option's picture: cover-fit, the rows' corner language and a hairline drawn over it. Its
|
|
11586
11686
|
space is kept while it loads (nothing drawn), it fades in once loaded, and one that fails
|
|
11587
11687
|
gives its space back on the same ease. */
|
|
11588
|
-
.knobs-picker-thumb{flex:none;display:block;width:var(--k-picker-thumb,min(24px,calc(var(--
|
|
11589
|
-
object-fit:cover;background:none;outline:1px solid var(--
|
|
11688
|
+
.knobs-picker-thumb{flex:none;display:block;width:var(--k-picker-thumb,min(24px,calc(var(--_k-row) - 10px)));aspect-ratio:1;margin:0;border-radius:max(3px,calc(var(--_k-radius) - 2px));
|
|
11689
|
+
object-fit:cover;background:none;outline:1px solid var(--_k-border);outline-offset:-1px;opacity:0;
|
|
11590
11690
|
transition:opacity .2s ease-out,width .18s ease-out,margin .18s ease-out}
|
|
11591
11691
|
.knobs-picker-thumb[data-state="loaded"]{opacity:1}
|
|
11592
11692
|
.knobs-picker-thumb[data-instant]{transition:none}
|
|
11593
11693
|
.knobs-picker-thumb[data-state="failed"]{width:0;margin-right:-8px;outline-color:transparent}
|
|
11594
|
-
.knobs-picker-option[data-selected] .knobs-picker-key{background:var(--
|
|
11595
|
-
.knobs-picker-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;font-weight:var(--
|
|
11596
|
-
.knobs-picker-suggested{flex:none;color:var(--
|
|
11597
|
-
.knobs-picker-check{flex:none;display:flex;width:14px;height:14px;color:var(--
|
|
11694
|
+
.knobs-picker-option[data-selected] .knobs-picker-key{background:var(--_k-fill-selected);color:var(--_k-fg)}
|
|
11695
|
+
.knobs-picker-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;font-weight:var(--_k-weight-label)}
|
|
11696
|
+
.knobs-picker-suggested{flex:none;color:var(--_k-fg-3);font-size:var(--_k-text-meta)}
|
|
11697
|
+
.knobs-picker-check{flex:none;display:flex;width:14px;height:14px;color:var(--_k-accent);opacity:0;scale:.6;filter:blur(2px);
|
|
11598
11698
|
transition:opacity .11s ease-in,scale .11s ease-in,filter .11s ease-in}
|
|
11599
|
-
.knobs-picker-check svg{display:block;width:
|
|
11699
|
+
.knobs-picker-check svg{display:block;width:12px;height:12px}
|
|
11600
11700
|
.knobs-picker-option[data-chosen] .knobs-picker-check{opacity:1;scale:1;filter:none;transition:opacity .15s ease-out,scale var(--kp-snappy-ms) var(--kp-snappy),filter .15s ease-out}
|
|
11601
11701
|
.knobs-picker-body{position:relative;overflow:visible}
|
|
11602
11702
|
.knobs-picker-body[data-moving]{overflow:hidden}
|
|
@@ -11606,7 +11706,7 @@ var snappy = springEasing(2 * Math.PI / 0.25, 1), pickerCss = `
|
|
|
11606
11706
|
.knobs-picker-inner{padding:var(--k-picker-pad,0 8px 8px)}
|
|
11607
11707
|
.knobs-picker-inner:empty{padding:0}
|
|
11608
11708
|
.knobs-picker-inner .knobs-panel.knobs-inline{--k-chrome:0;padding:0}
|
|
11609
|
-
.knobs-picker-empty{padding:8px var(--
|
|
11709
|
+
.knobs-picker-empty{padding:8px var(--_k-inset);color:var(--_k-fg-3)}
|
|
11610
11710
|
@media(prefers-reduced-motion:reduce){.knobs-picker :where(*,::before,::after){transition-duration:.15s!important;scale:none!important;filter:none!important}}
|
|
11611
11711
|
`;
|
|
11612
11712
|
|
|
@@ -11616,25 +11716,25 @@ var readoutCss = `
|
|
|
11616
11716
|
:where(.knobs-ui) :is(.knobs-rd-chip,.knobs-rd-copy,.knobs-rd-jump,.knobs-rd-find,.knobs-rd-match){all:revert;box-sizing:border-box;
|
|
11617
11717
|
font:inherit;color:inherit;letter-spacing:inherit;background:transparent;border:0;border-radius:0;margin:0;padding:0;min-width:0;box-shadow:none;outline:none}
|
|
11618
11718
|
.knobs-ui.knobs-rd,.knobs-rd *{box-sizing:border-box}
|
|
11619
|
-
.knobs-ui.knobs-rd{display:flex;align-items:center;gap:8px;min-width:0;color:var(--
|
|
11620
|
-
.knobs-rd .knobs-rd-v{font:var(--
|
|
11621
|
-
.knobs-rd .knobs-rd-mono{font:400 var(--
|
|
11622
|
-
.knobs-rd .knobs-rd-meta{font:var(--
|
|
11719
|
+
.knobs-ui.knobs-rd{display:flex;align-items:center;gap:8px;min-width:0;color:var(--_k-fg);letter-spacing:normal}
|
|
11720
|
+
.knobs-rd .knobs-rd-v{font:var(--_k-weight) var(--_k-value-size)/1.25 var(--_k-value-font);font-variant-numeric:tabular-nums;font-feature-settings:"tnum";white-space:nowrap}
|
|
11721
|
+
.knobs-rd .knobs-rd-mono{font:400 var(--_k-text-meta)/1.25 var(--_k-mono);font-variant-numeric:tabular-nums;white-space:pre}
|
|
11722
|
+
.knobs-rd .knobs-rd-meta{font:var(--_k-weight) var(--_k-text-meta)/1.25 var(--_k-font);white-space:nowrap}
|
|
11623
11723
|
.knobs-rd .knobs-rd-value{display:inline-flex;justify-content:flex-end;align-items:baseline;flex:none;margin-left:auto;contain:layout paint style}
|
|
11624
|
-
.knobs-rd .knobs-rd-num{color:var(--
|
|
11625
|
-
.knobs-rd .knobs-rd-unit{margin-left:var(--k-unit-gap,.28em);color:var(--
|
|
11724
|
+
.knobs-rd .knobs-rd-num{color:var(--_k-fg);text-align:right;transition:color .15s}
|
|
11725
|
+
.knobs-rd .knobs-rd-unit{margin-left:var(--k-unit-gap,.28em);color:var(--_k-fg-3)}
|
|
11626
11726
|
.knobs-rd .knobs-rd-unit[hidden]{display:none}
|
|
11627
11727
|
.knobs-rd.knobs-rd-watch{flex:1 1 auto;justify-content:flex-end}
|
|
11628
11728
|
.knobs-rd.knobs-rd-spark,.knobs-rd.knobs-rd-meter{flex:0 1 64%;margin-left:auto}
|
|
11629
|
-
.knobs-rd .knobs-rd-plot{display:block;flex:1 1 0;min-width:24px;height:max(12px,calc(var(--
|
|
11729
|
+
.knobs-rd .knobs-rd-plot{display:block;flex:1 1 0;min-width:24px;height:max(12px,calc(var(--_k-control-h) - 2px))}
|
|
11630
11730
|
.knobs-rd.knobs-rd-meter>.knobs-rd-plot{height:8px}
|
|
11631
|
-
.knobs-rd.knobs-rd-spark[data-hover] .knobs-rd-num{color:var(--
|
|
11632
|
-
.knobs-rd .knobs-rd-cap,.knobs-rd .knobs-rd-head>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--
|
|
11731
|
+
.knobs-rd.knobs-rd-spark[data-hover] .knobs-rd-num{color:var(--_k-fg-2)}
|
|
11732
|
+
.knobs-rd .knobs-rd-cap,.knobs-rd .knobs-rd-head>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--_k-fg-2);font-weight:var(--_k-weight-label)}
|
|
11633
11733
|
|
|
11634
11734
|
/* Blocks: a head line (the label and what goes with it) over a body. In a panel the row grows to fit. */
|
|
11635
11735
|
.knobs-panel .knobs-row.knobs-rd-rowblock{display:block;height:auto}
|
|
11636
11736
|
.knobs-rd.knobs-rd-block{display:flex;flex-direction:column;align-items:stretch;gap:2px;width:100%}
|
|
11637
|
-
.knobs-rd .knobs-rd-head{display:flex;align-items:center;gap:0 10px;min-height:var(--
|
|
11737
|
+
.knobs-rd .knobs-rd-head{display:flex;align-items:center;gap:0 10px;min-height:var(--_k-row);min-width:0}
|
|
11638
11738
|
/* The title keeps its words; the legend or tools beside it give way (see fitHead). */
|
|
11639
11739
|
.knobs-rd .knobs-rd-head>span:first-child{flex:0 0 auto;max-width:100%}
|
|
11640
11740
|
.knobs-rd .knobs-rd-legend{display:flex;align-items:center;gap:12px;margin-left:auto;min-width:0;overflow:hidden}
|
|
@@ -11642,16 +11742,16 @@ var readoutCss = `
|
|
|
11642
11742
|
.knobs-rd .knobs-rd-tools>.knobs-rd-find{flex:1 1 56px;min-width:56px;max-width:84px}
|
|
11643
11743
|
.knobs-rd .knobs-rd-head[data-short] .knobs-rd-legend .knobs-rd-unit{display:none}
|
|
11644
11744
|
.knobs-rd .knobs-rd-head[data-wrap]{flex-wrap:wrap;padding-bottom:4px}
|
|
11645
|
-
.knobs-rd .knobs-rd-head[data-wrap]>span:first-child{display:flex;align-items:center;min-height:var(--
|
|
11745
|
+
.knobs-rd .knobs-rd-head[data-wrap]>span:first-child{display:flex;align-items:center;min-height:var(--_k-row)}
|
|
11646
11746
|
.knobs-rd .knobs-rd-head[data-wrap]>:is(.knobs-rd-legend,.knobs-rd-tools){flex:1 0 100%;margin-left:0}
|
|
11647
11747
|
.knobs-rd .knobs-rd-head[data-wrap]>.knobs-rd-tools{flex-wrap:wrap;row-gap:4px}
|
|
11648
11748
|
.knobs-rd .knobs-rd-key{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
|
|
11649
11749
|
.knobs-rd .knobs-rd-swatch{flex:none;width:8px;height:2px;border-radius:1px}
|
|
11650
|
-
.knobs-rd .knobs-rd-name{color:var(--
|
|
11750
|
+
.knobs-rd .knobs-rd-name{color:var(--_k-fg-2)}
|
|
11651
11751
|
.knobs-rd .knobs-rd-key>.knobs-rd-value{margin-left:2px}
|
|
11652
11752
|
.knobs-rd .knobs-rd-plotbox{position:relative;outline:none;margin-bottom:6px}
|
|
11653
11753
|
.knobs-rd .knobs-rd-plotbox>.knobs-rd-plot{position:absolute;inset:0;width:100%;height:100%;min-width:0}
|
|
11654
|
-
.knobs-rd .knobs-rd-tick,.knobs-rd .knobs-rd-mark{position:absolute;color:var(--
|
|
11754
|
+
.knobs-rd .knobs-rd-tick,.knobs-rd .knobs-rd-mark{position:absolute;color:var(--_k-fg-3);pointer-events:none;line-height:14px;height:14px}
|
|
11655
11755
|
.knobs-rd .knobs-rd-tick{left:0}
|
|
11656
11756
|
.knobs-rd .knobs-rd-tick[data-at="top"]{top:-2px}
|
|
11657
11757
|
.knobs-rd .knobs-rd-tick[data-at="bottom"]{bottom:0}
|
|
@@ -11660,36 +11760,36 @@ var readoutCss = `
|
|
|
11660
11760
|
|
|
11661
11761
|
.knobs-rd .knobs-rd-grid{display:grid;column-gap:14px;align-items:center;outline:none;margin-bottom:4px}
|
|
11662
11762
|
.knobs-rd .knobs-rd-tr{display:contents}
|
|
11663
|
-
.knobs-rd .knobs-rd-tr>*{height:calc(var(--
|
|
11664
|
-
.knobs-rd .knobs-rd-thead>*{height:var(--
|
|
11665
|
-
.knobs-rd .knobs-rd-th{color:var(--
|
|
11666
|
-
.knobs-rd .knobs-rd-td{color:var(--
|
|
11667
|
-
.knobs-rd .knobs-rd-td:first-child{color:var(--
|
|
11763
|
+
.knobs-rd .knobs-rd-tr>*{height:calc(var(--_k-row) * .72);line-height:calc(var(--_k-row) * .72);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
11764
|
+
.knobs-rd .knobs-rd-thead>*{height:var(--_k-row);line-height:var(--_k-row)}
|
|
11765
|
+
.knobs-rd .knobs-rd-th{color:var(--_k-fg-3);text-align:right}
|
|
11766
|
+
.knobs-rd .knobs-rd-td{color:var(--_k-fg)}
|
|
11767
|
+
.knobs-rd .knobs-rd-td:first-child{color:var(--_k-fg-2)}
|
|
11668
11768
|
.knobs-rd .knobs-rd-td[data-num]{text-align:right}
|
|
11669
11769
|
|
|
11670
11770
|
.knobs-rd.knobs-rd-log{--rd-lh:18px}
|
|
11671
11771
|
.knobs-rd .knobs-rd-chips{display:inline-flex;align-items:center;gap:2px;margin-right:auto}
|
|
11672
|
-
.knobs-ui .knobs-rd-chip,.knobs-ui .knobs-rd-copy{height:calc(var(--
|
|
11673
|
-
.knobs-ui .knobs-rd-chip:hover,.knobs-ui .knobs-rd-copy:hover{background:var(--
|
|
11674
|
-
.knobs-ui .knobs-rd-chip[aria-checked="true"]{background:var(--
|
|
11675
|
-
.knobs-ui .knobs-rd-find{width:84px;height:calc(var(--
|
|
11676
|
-
background:color-mix(in srgb,var(--
|
|
11677
|
-
.knobs-rd .knobs-rd-find::placeholder{color:var(--
|
|
11772
|
+
.knobs-ui .knobs-rd-chip,.knobs-ui .knobs-rd-copy{height:calc(var(--_k-control-h) - 2px);padding:0 7px;border-radius:min(var(--_k-radius),5px);color:var(--_k-fg-2);cursor:pointer;transition:background .15s,color .15s}
|
|
11773
|
+
.knobs-ui .knobs-rd-chip:hover,.knobs-ui .knobs-rd-copy:hover{background:var(--_ku-wash);color:var(--_k-fg)}
|
|
11774
|
+
.knobs-ui .knobs-rd-chip[aria-checked="true"]{background:var(--_ku-wash-hi);color:var(--_k-fg)}
|
|
11775
|
+
.knobs-ui .knobs-rd-find{width:84px;height:calc(var(--_k-control-h) - 2px);padding:0 7px;border-radius:min(var(--_k-radius),5px);
|
|
11776
|
+
background:color-mix(in srgb,var(--_k-fill-selected) 60%,transparent);color:var(--_k-fg);caret-color:var(--_k-accent)}
|
|
11777
|
+
.knobs-rd .knobs-rd-find::placeholder{color:var(--_k-fg-3)}
|
|
11678
11778
|
.knobs-rd .knobs-rd-find::-webkit-search-cancel-button{display:none}
|
|
11679
11779
|
.knobs-rd .knobs-rd-logbody{position:relative;margin-bottom:6px}
|
|
11680
11780
|
.knobs-rd .knobs-rd-scroll{position:relative;overflow-x:hidden;overflow-y:auto;height:calc(var(--knobs-rd-lines,8) * var(--rd-lh));outline:none;
|
|
11681
|
-
background:color-mix(in srgb,var(--
|
|
11781
|
+
background:color-mix(in srgb,var(--_k-fill-selected) 45%,transparent);border-radius:min(var(--_k-radius),6px);scrollbar-width:thin;overscroll-behavior:contain}
|
|
11682
11782
|
.knobs-rd .knobs-rd-space{position:relative;width:100%}
|
|
11683
11783
|
.knobs-rd .knobs-rd-line{position:absolute;left:0;right:0;top:0;display:flex;gap:10px;height:var(--rd-lh);line-height:var(--rd-lh);padding:0 8px;contain:layout style;will-change:transform}
|
|
11684
11784
|
.knobs-rd .knobs-rd-line[hidden]{display:none}
|
|
11685
|
-
.knobs-rd .knobs-rd-time{flex:none;color:var(--
|
|
11686
|
-
.knobs-rd .knobs-rd-text{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--
|
|
11687
|
-
.knobs-rd .knobs-rd-line[data-level="warn"]>.knobs-rd-text{color:var(--
|
|
11688
|
-
.knobs-rd .knobs-rd-line[data-level="error"]>.knobs-rd-text{color:var(--
|
|
11689
|
-
.knobs-rd .knobs-rd-line[data-level="debug"]>.knobs-rd-text{color:var(--
|
|
11690
|
-
.knobs-ui .knobs-rd-match{color:var(--
|
|
11691
|
-
.knobs-ui .knobs-rd-jump{position:absolute;left:50%;bottom:6px;height:20px;padding:0 10px;border-radius:calc(var(--
|
|
11692
|
-
background:var(--
|
|
11785
|
+
.knobs-rd .knobs-rd-time{flex:none;color:var(--_k-fg-3)}
|
|
11786
|
+
.knobs-rd .knobs-rd-text{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--_k-fg)}
|
|
11787
|
+
.knobs-rd .knobs-rd-line[data-level="warn"]>.knobs-rd-text{color:var(--_k-warn)}
|
|
11788
|
+
.knobs-rd .knobs-rd-line[data-level="error"]>.knobs-rd-text{color:var(--_k-danger)}
|
|
11789
|
+
.knobs-rd .knobs-rd-line[data-level="debug"]>.knobs-rd-text{color:var(--_k-fg-3)}
|
|
11790
|
+
.knobs-ui .knobs-rd-match{color:var(--_k-accent)}
|
|
11791
|
+
.knobs-ui .knobs-rd-jump{position:absolute;left:50%;bottom:6px;height:20px;padding:0 10px;border-radius:calc(var(--_k-radius) * 999);
|
|
11792
|
+
background:var(--_k-accent);color:var(--_k-bg);opacity:0;transform:translate(-50%,6px);cursor:pointer;white-space:nowrap}
|
|
11693
11793
|
|
|
11694
11794
|
/* Under the GPU overlay the readouts' DOM stays for focus, hit-testing and screen readers; the
|
|
11695
11795
|
overlay draws them. Their filter field sits above it. */
|
|
@@ -11699,96 +11799,62 @@ var readoutCss = `
|
|
|
11699
11799
|
@media(prefers-reduced-motion:reduce){.knobs-rd :where(*){transition:none!important}}
|
|
11700
11800
|
`;
|
|
11701
11801
|
|
|
11802
|
+
// src/ui/selection-pill-css.ts
|
|
11803
|
+
var selectionPillCss = `
|
|
11804
|
+
.knobs-pick-pill,.knobs-pick-copy{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity .1s linear}
|
|
11805
|
+
.knobs-pick-pill{background:var(--_k-fill-selected);will-change:transform}
|
|
11806
|
+
.knobs-pick-copy{overflow:hidden;will-change:transform}
|
|
11807
|
+
.knobs-pick-copy-rows{position:absolute;left:0;top:0;width:0;height:0}
|
|
11808
|
+
:is(.knobs-pick-pill,.knobs-pick-copy)[data-off]{opacity:0}
|
|
11809
|
+
`;
|
|
11702
11810
|
// src/ui/look.ts
|
|
11703
|
-
var
|
|
11704
|
-
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
|
|
11714
|
-
|
|
11715
|
-
|
|
11716
|
-
"font-weight": "400",
|
|
11717
|
-
"label-weight": "500",
|
|
11718
|
-
"title-weight": "600",
|
|
11719
|
-
row: "32px",
|
|
11720
|
-
inset: "10px",
|
|
11721
|
-
radius: "8px",
|
|
11722
|
-
"hover-in": "150",
|
|
11723
|
-
"hover-out": "150",
|
|
11724
|
-
warn: "#ff9f0a",
|
|
11725
|
-
critical: "#ff453a",
|
|
11726
|
-
rim: "rgba(255,255,255,.09)",
|
|
11727
|
-
page: "#101012",
|
|
11728
|
-
"seg-bg": "rgba(0,0,0,.26)",
|
|
11729
|
-
shadow: "0 12px 36px rgba(0,0,0,.52),0 1px 2px rgba(0,0,0,.3)"
|
|
11730
|
-
}, LIGHT = {
|
|
11731
|
-
bg: "#f5f5f7",
|
|
11732
|
-
surface: "rgba(0,0,0,.05)",
|
|
11733
|
-
"surface-hi": "rgba(0,0,0,.095)",
|
|
11734
|
-
line: "rgba(0,0,0,.1)",
|
|
11735
|
-
"line-hi": "rgba(0,0,0,.2)",
|
|
11736
|
-
text: "rgba(0,0,0,.88)",
|
|
11737
|
-
label: "rgba(60,60,67,.68)",
|
|
11738
|
-
dim: "rgba(60,60,67,.5)",
|
|
11739
|
-
accent: "#1c1c1e",
|
|
11740
|
-
warn: "#c56a00",
|
|
11741
|
-
critical: "#e0352b",
|
|
11742
|
-
rim: "rgba(255,255,255,.75)",
|
|
11743
|
-
page: "#e6e6eb",
|
|
11744
|
-
"seg-bg": "rgba(0,0,0,.065)",
|
|
11745
|
-
shadow: "0 10px 32px rgba(0,0,0,.14),0 1px 3px rgba(0,0,0,.08)"
|
|
11746
|
-
}, lightBlock = `${Object.entries(LIGHT).map(([k, v]) => `--k-${k}:${v}`).join(";")};color-scheme:light`, css = `
|
|
11747
|
-
:where(.knobs-ui){${Object.entries(TOKENS2).map(([k, v]) => `--ku-${k}:var(--k-${k},${v})`).join(";")};
|
|
11748
|
-
--ku-control-h:var(--k-control-h,calc(var(--ku-row) - 8px));
|
|
11749
|
-
--ku-value-font:var(--k-value-font,var(--ku-font));
|
|
11750
|
-
--ku-value-size:var(--kc-value-size,calc(var(--ku-font-size) - .5px));
|
|
11751
|
-
--ku-text-meta:var(--k-text-meta,calc(var(--ku-font-size) - 1px));
|
|
11752
|
-
--ku-hit:var(--k-ui-hit,9px);
|
|
11753
|
-
--ku-rail:var(--k-ui-rail,var(--ku-row));
|
|
11754
|
-
--ku-indent:var(--k-ui-indent,14px);
|
|
11755
|
-
--ku-select:var(--k-ui-select,color-mix(in srgb,var(--ku-accent) 13%,transparent));
|
|
11756
|
-
--ku-select-focus:var(--k-ui-select-focus,color-mix(in srgb,var(--ku-accent) 19%,transparent));
|
|
11757
|
-
--ku-wash:var(--k-ui-wash,color-mix(in srgb,var(--ku-surface) 70%,transparent));
|
|
11758
|
-
--ku-wash-hi:var(--k-ui-wash-hi,var(--ku-surface-hi));
|
|
11759
|
-
--ku-ease:${ease.easing};--ku-ease-ms:${ease.ms}ms;
|
|
11811
|
+
var css = `
|
|
11812
|
+
:where(.knobs-ui){
|
|
11813
|
+
--_ku-hit:var(--k-ui-hit,9px);
|
|
11814
|
+
--_ku-rail:var(--k-ui-rail,var(--_k-row));
|
|
11815
|
+
--_ku-indent:var(--k-ui-indent,14px);
|
|
11816
|
+
--_ku-select:var(--k-ui-select,var(--k-selection,color-mix(in srgb,var(--_k-accent) 13%,transparent)));
|
|
11817
|
+
--_ku-select-focus:var(--k-ui-select-focus,color-mix(in srgb,var(--_k-accent) 19%,transparent));
|
|
11818
|
+
--_ku-wash:var(--k-ui-wash,color-mix(in srgb,var(--_k-fill) 70%,transparent));
|
|
11819
|
+
--_ku-wash-hi:var(--k-ui-wash-hi,var(--_k-fill-selected));
|
|
11820
|
+
--_ku-ease:var(--_k-motion-snappy);--_ku-ease-ms:calc(var(--_k-motion-snappy-ms) * 1ms);
|
|
11821
|
+
/* Over a picture: a quiet dark scrim in either appearance (a picture is no lighter in light
|
|
11822
|
+
mode), light type on it, no ring. */
|
|
11823
|
+
--_ku-media-scrim:rgb(0 0 0/.5);--_ku-on-media:#fff;--_ku-on-media-2:color-mix(in srgb,var(--_ku-on-media) 64%,transparent);
|
|
11760
11824
|
/* The card frame (knobs' own look): every leaf pane a rounded card on the page, half a gap
|
|
11761
11825
|
inside its slot, so panes sit a gap apart with the dividers' grips between them; tree rows
|
|
11762
11826
|
inset as soft rounded washes. --k-frame: flat (labPreset) puts panes edge to edge on
|
|
11763
11827
|
hairlines, square, as a dense editor's columns. */
|
|
11764
|
-
--
|
|
11765
|
-
--
|
|
11766
|
-
--
|
|
11767
|
-
--
|
|
11768
|
-
--
|
|
11769
|
-
--
|
|
11770
|
-
--
|
|
11771
|
-
--
|
|
11772
|
-
--ku-row-radius:max(0px,calc(var(--ku-panel-radius) - var(--ku-row-x)));
|
|
11828
|
+
--_ku-gap:var(--k-ui-gap,6px);
|
|
11829
|
+
--_ku-pane-m:calc(var(--_ku-gap) / 2);
|
|
11830
|
+
--_ku-pane-bg:var(--_k-pane-bg);
|
|
11831
|
+
--_ku-pane-radius:var(--_k-radius-panel);
|
|
11832
|
+
--_ku-pane-ring:inset 0 0 0 1px var(--_k-border),inset 0 1px 0 var(--_k-rim);
|
|
11833
|
+
--_ku-divider:var(--k-ui-divider,var(--k-split-gutter,transparent));
|
|
11834
|
+
--_ku-row-x:var(--k-ui-row-x,6px);
|
|
11835
|
+
--_ku-row-radius:max(0px,calc(var(--_ku-pane-radius) - var(--_ku-row-x)));
|
|
11773
11836
|
}
|
|
11774
|
-
:where(.knobs-ui)[data-frame="flat"]{--
|
|
11775
|
-
--
|
|
11776
|
-
--
|
|
11837
|
+
:where(.knobs-ui)[data-frame="flat"]{--_ku-gap:var(--k-ui-gap,0px);--_ku-pane-bg:var(--k-ui-pane,var(--k-pane-bg,transparent));--_ku-pane-radius:0px;--_ku-pane-ring:none;
|
|
11838
|
+
--_ku-divider:var(--_k-split-gutter);--_ku-row-x:var(--k-ui-row-x,0px);--_ku-row-radius:0px;
|
|
11839
|
+
--_ku-select:var(--_k-selection);--_ku-select-focus:var(--k-ui-select-focus,color-mix(in srgb,var(--_k-accent) 34%,transparent))}
|
|
11777
11840
|
/* One surface per thing: a piece on another surface draws no card of its own. Whatever draws a
|
|
11778
11841
|
card (a walkthrough's step, a host's own) carries .knobs-surface, and a split's pane that's a
|
|
11779
11842
|
card (not only a slot for another split) counts as one; any piece inside it, or one
|
|
11780
11843
|
marked data-nested, loses its fill and ring and parts its own panes on hairlines as the flat
|
|
11781
11844
|
frame does, so cards never stack two or three borders deep. Pieces draw their card from
|
|
11782
|
-
--
|
|
11783
|
-
:where(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-ui:not(.knobs-surface),.knobs-ui[data-nested]{--
|
|
11784
|
-
--
|
|
11785
|
-
:
|
|
11786
|
-
|
|
11787
|
-
|
|
11845
|
+
--_ku-pane-bg and --_ku-pane-ring so this reaches them. */
|
|
11846
|
+
:where(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-ui:not(.knobs-surface),.knobs-ui[data-nested]{--_ku-gap:var(--k-ui-gap,0px);--_ku-pane-bg:transparent;--_ku-pane-ring:none;
|
|
11847
|
+
--_ku-divider:var(--_k-split-gutter);--_kd-bg:transparent}
|
|
11848
|
+
/* What draws its box without those: a picker's card keeps its fill as the highlight but drops its
|
|
11849
|
+
ring; a timeline's track drops its well for a hairline under the lane; an inline panel sheds its
|
|
11850
|
+
card (--k-chrome 0). A full-window step is the one raised exception (it is the surface). */
|
|
11851
|
+
:is(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-picker-card,.knobs-ui[data-nested] .knobs-picker-card{box-shadow:none}
|
|
11852
|
+
:is(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-tl-track,.knobs-ui[data-nested] .knobs-tl-track{background:transparent;border-radius:0;box-shadow:inset 0 -1px 0 var(--_k-border-subtle)}
|
|
11853
|
+
:where(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-panel.knobs-inline:not(.knobs-page){--k-chrome:0}
|
|
11788
11854
|
/* Only the pieces' own elements take their type and resets: what you put in a pane is yours. */
|
|
11789
11855
|
.knobs-ui{box-sizing:border-box}
|
|
11790
11856
|
:where(.knobs-split>*,.knobs-pane-clip,.knobs-pane-inner,.knobs-pane-body,.knobs-pane-head,.knobs-pane-head *,.knobs-pane-rail,.knobs-pane-rail *,.knobs-tree,.knobs-tree *,.knobs-tree-ghost){box-sizing:border-box}
|
|
11791
|
-
:is(.knobs-tree,.knobs-pane-head,.knobs-pane-rail,.knobs-tree-ghost){font:var(--
|
|
11857
|
+
:is(.knobs-tree,.knobs-pane-head,.knobs-pane-rail,.knobs-tree-ghost){font:var(--_k-weight) var(--_k-font-size)/1.35 var(--_k-font);color:var(--_k-fg);text-align:left;
|
|
11792
11858
|
letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-shadow:none;font-style:normal;-webkit-font-smoothing:antialiased}
|
|
11793
11859
|
/* A host's element rules (button{padding}, header{margin}, mark{background}) stop at these, as
|
|
11794
11860
|
they do at panels; (0,1,0), so the pieces' own rules after it win. */
|
|
@@ -11826,17 +11892,17 @@ var ease = springEasing(26, 1), TOKENS2 = {
|
|
|
11826
11892
|
:is(.knobs-tree,.knobs-activity)::-webkit-scrollbar{display:none}
|
|
11827
11893
|
.knobs-scrollbar{position:sticky;top:0;z-index:3;height:0;pointer-events:none}
|
|
11828
11894
|
.knobs-scrollbar[hidden]{display:none}
|
|
11829
|
-
.knobs-scrollbar-thumb{position:absolute;top:0;right:2px;width:5px;border-radius:3px;background:color-mix(in srgb,var(--
|
|
11895
|
+
.knobs-scrollbar-thumb{position:absolute;top:0;right:2px;width:5px;border-radius:3px;background:color-mix(in srgb,var(--_k-fg) 30%,transparent);opacity:0;
|
|
11830
11896
|
transition:opacity .3s ease-out,background .15s}
|
|
11831
11897
|
:hover>.knobs-scrollbar>.knobs-scrollbar-thumb,.knobs-scrollbar:is([data-active],[data-dragging])>.knobs-scrollbar-thumb{opacity:1;pointer-events:auto;transition-duration:.12s,.15s}
|
|
11832
|
-
.knobs-scrollbar-thumb:hover,.knobs-scrollbar[data-dragging]>.knobs-scrollbar-thumb{background:color-mix(in srgb,var(--
|
|
11898
|
+
.knobs-scrollbar-thumb:hover,.knobs-scrollbar[data-dragging]>.knobs-scrollbar-thumb{background:color-mix(in srgb,var(--_k-fg) 48%,transparent)}
|
|
11833
11899
|
|
|
11834
11900
|
/* Split: panes along a row or column, hairline dividers with a wider grip. */
|
|
11835
11901
|
.knobs-split{position:relative;display:flex;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden}
|
|
11836
11902
|
.knobs-split[data-direction="column"]{flex-direction:column}
|
|
11837
11903
|
.knobs-pane{position:relative;flex:none;min-width:0;min-height:0;overflow:hidden}
|
|
11838
|
-
.knobs-pane-clip{position:absolute;inset:0;margin:var(--
|
|
11839
|
-
.knobs-pane-clip::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:var(--
|
|
11904
|
+
.knobs-pane-clip{position:absolute;inset:0;margin:var(--_ku-pane-m);overflow:hidden;border-radius:var(--_ku-pane-radius);background:var(--_ku-pane-bg)}
|
|
11905
|
+
.knobs-pane-clip::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:var(--_ku-pane-ring);pointer-events:none}
|
|
11840
11906
|
/* A pane holding another split is only its slot: the split's own panes are the cards. */
|
|
11841
11907
|
.knobs-pane[data-nested]>.knobs-pane-clip{margin:0;background:transparent}
|
|
11842
11908
|
.knobs-pane[data-nested]>.knobs-pane-clip::after{content:none}
|
|
@@ -11844,36 +11910,36 @@ var ease = springEasing(26, 1), TOKENS2 = {
|
|
|
11844
11910
|
.knobs-pane-body{position:relative;flex:1;min-width:0;min-height:0;overflow:hidden}
|
|
11845
11911
|
.knobs-pane[data-scroll] .knobs-pane-body{overflow:auto;scrollbar-width:thin}
|
|
11846
11912
|
.knobs-pane[data-rail][data-collapsed][data-settled]>.knobs-pane-clip>.knobs-pane-inner,.knobs-pane:not([data-rail])[data-collapsed][data-settled]>.knobs-pane-clip>.knobs-pane-inner>.knobs-pane-body{visibility:hidden}
|
|
11847
|
-
.knobs-ui .knobs-pane-head{display:flex;align-items:center;gap:6px;flex:none;height:var(--
|
|
11848
|
-
.knobs-pane-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--
|
|
11849
|
-
.knobs-pane-count{flex:none;color:var(--
|
|
11913
|
+
.knobs-ui .knobs-pane-head{display:flex;align-items:center;gap:6px;flex:none;height:var(--_k-row);padding:0 calc(var(--_k-inset) - 4px) 0 var(--_k-inset);user-select:none;-webkit-user-select:none}
|
|
11914
|
+
.knobs-pane-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--_k-weight-title);color:var(--_k-fg)}
|
|
11915
|
+
.knobs-pane-count{flex:none;color:var(--_k-fg-3);font-variant-numeric:tabular-nums}
|
|
11850
11916
|
.knobs-pane-fill{flex:1}
|
|
11851
|
-
.knobs-ui .knobs-pane-btn{flex:none;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:calc(var(--
|
|
11917
|
+
.knobs-ui .knobs-pane-btn{flex:none;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:calc(var(--_k-radius) * 999);color:var(--_k-fg-3);cursor:pointer;
|
|
11852
11918
|
transition:background var(--hover-t,.15s),color .15s}
|
|
11853
|
-
.knobs-ui .knobs-pane-btn:is(:hover,:focus-visible){background:var(--
|
|
11854
|
-
.knobs-ui .knobs-pane-btn[aria-pressed="true"]{color:var(--
|
|
11919
|
+
.knobs-ui .knobs-pane-btn:is(:hover,:focus-visible){background:var(--_ku-wash-hi);color:var(--_k-fg)}
|
|
11920
|
+
.knobs-ui .knobs-pane-btn[aria-pressed="true"]{color:var(--_k-accent)}
|
|
11855
11921
|
.knobs-pane-btn svg{width:13px;height:13px}
|
|
11856
11922
|
.knobs-pane-head[data-toggles]{cursor:pointer}
|
|
11857
11923
|
/* A collapsed pane's rail: its title along the edge; a click opens it. It holds on to the edge the
|
|
11858
11924
|
pane folds toward, as wide as the rail, over the card (which folds to its size): only its label
|
|
11859
11925
|
and chevron draw, and a nested split's slot, which has no card, gives it one of its own. */
|
|
11860
|
-
.knobs-ui .knobs-pane-rail{position:absolute;margin:var(--
|
|
11861
|
-
font-weight:var(--
|
|
11862
|
-
.knobs-ui .knobs-pane[data-nested]>.knobs-pane-rail{background-color:var(--
|
|
11863
|
-
.knobs-split[data-direction="row"]>.knobs-pane>.knobs-pane-rail{top:0;bottom:0;width:var(--
|
|
11926
|
+
.knobs-ui .knobs-pane-rail{position:absolute;margin:var(--_ku-pane-m);border-radius:var(--_ku-pane-radius);background-color:transparent;display:flex;align-items:center;gap:8px;color:var(--_k-fg-2);cursor:pointer;opacity:0;pointer-events:none;
|
|
11927
|
+
font-weight:var(--_k-weight-title);transition:background .15s,color .15s}
|
|
11928
|
+
.knobs-ui .knobs-pane[data-nested]>.knobs-pane-rail{background-color:var(--_ku-pane-bg);box-shadow:var(--_ku-pane-ring)}
|
|
11929
|
+
.knobs-split[data-direction="row"]>.knobs-pane>.knobs-pane-rail{top:0;bottom:0;width:var(--_ku-rail);writing-mode:vertical-rl;padding:10px 0}
|
|
11864
11930
|
.knobs-split[data-direction="row"]>.knobs-pane[data-edge="start"]>.knobs-pane-rail{right:0}
|
|
11865
11931
|
.knobs-split[data-direction="row"]>.knobs-pane[data-edge="end"]>.knobs-pane-rail{left:0}
|
|
11866
|
-
.knobs-split[data-direction="column"]>.knobs-pane>.knobs-pane-rail{left:0;right:0;height:var(--
|
|
11932
|
+
.knobs-split[data-direction="column"]>.knobs-pane>.knobs-pane-rail{left:0;right:0;height:var(--_ku-rail);padding:0 var(--_k-inset)}
|
|
11867
11933
|
.knobs-split[data-direction="column"]>.knobs-pane[data-edge="start"]>.knobs-pane-rail{bottom:0}
|
|
11868
11934
|
.knobs-split[data-direction="column"]>.knobs-pane[data-edge="end"]>.knobs-pane-rail{top:0}
|
|
11869
11935
|
.knobs-pane[data-collapsed]>.knobs-pane-rail{pointer-events:auto}
|
|
11870
11936
|
/* Its hover wash fades, rather than going in one frame as a click opens the pane. */
|
|
11871
|
-
.knobs-ui .knobs-pane-rail::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--
|
|
11937
|
+
.knobs-ui .knobs-pane-rail::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--_ku-wash);opacity:0;transition:opacity .15s;pointer-events:none}
|
|
11872
11938
|
.knobs-pane-rail>*{position:relative}
|
|
11873
|
-
.knobs-ui .knobs-pane[data-collapsed]>.knobs-pane-rail:is(:hover,:focus-visible){color:var(--
|
|
11939
|
+
.knobs-ui .knobs-pane[data-collapsed]>.knobs-pane-rail:is(:hover,:focus-visible){color:var(--_k-fg)}
|
|
11874
11940
|
.knobs-ui .knobs-pane[data-collapsed]>.knobs-pane-rail:is(:hover,:focus-visible)::before{opacity:1}
|
|
11875
11941
|
.knobs-pane-rail-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
11876
|
-
.knobs-pane-chevron{display:flex;flex:none;width:11px;height:11px;writing-mode:horizontal-tb;color:var(--
|
|
11942
|
+
.knobs-pane-chevron{display:flex;flex:none;width:11px;height:11px;writing-mode:horizontal-tb;color:var(--_k-fg-3)}
|
|
11877
11943
|
.knobs-pane-turn{display:flex;width:100%;height:100%;transform-origin:50% 50%}
|
|
11878
11944
|
.knobs-pane-rail svg{width:11px;height:11px}
|
|
11879
11945
|
/* The rail's chevron stands in for the header's collapse icon (it turns into the rail's), so the
|
|
@@ -11881,26 +11947,26 @@ var ease = springEasing(26, 1), TOKENS2 = {
|
|
|
11881
11947
|
.knobs-pane[data-morph]>.knobs-pane-clip>.knobs-pane-inner>.knobs-pane-head>.knobs-pane-collapse>svg{visibility:hidden}
|
|
11882
11948
|
/* So does the rail's label for the title, when it travels (split's fold: { title: "travel" }). */
|
|
11883
11949
|
.knobs-pane[data-travel]>.knobs-pane-clip>.knobs-pane-inner>.knobs-pane-head>.knobs-pane-title{visibility:hidden}
|
|
11884
|
-
.knobs-pane[data-morph]:not([data-collapsed]):has(>.knobs-pane-clip>.knobs-pane-inner>.knobs-pane-head>.knobs-pane-collapse:is(:hover,:focus-visible))>.knobs-pane-rail .knobs-pane-chevron{color:var(--
|
|
11950
|
+
.knobs-pane[data-morph]:not([data-collapsed]):has(>.knobs-pane-clip>.knobs-pane-inner>.knobs-pane-head>.knobs-pane-collapse:is(:hover,:focus-visible))>.knobs-pane-rail .knobs-pane-chevron{color:var(--_k-fg)}
|
|
11885
11951
|
.knobs-pane[data-morph]:not([data-collapsed])>.knobs-pane-rail .knobs-pane-chevron{transition:color .15s}
|
|
11886
11952
|
|
|
11887
|
-
.knobs-divider{position:relative;z-index:2;flex:none;width:1px;background:var(--
|
|
11953
|
+
.knobs-divider{position:relative;z-index:2;flex:none;width:1px;background:var(--_ku-divider);touch-action:none;outline:none}
|
|
11888
11954
|
.knobs-split[data-direction="column"]>.knobs-divider{width:auto;height:1px}
|
|
11889
|
-
.knobs-divider::before{content:"";position:absolute;top:0;bottom:0;left:calc(50% - var(--
|
|
11890
|
-
.knobs-split[data-direction="column"]>.knobs-divider::before{left:0;right:0;top:calc(50% - var(--
|
|
11955
|
+
.knobs-divider::before{content:"";position:absolute;top:0;bottom:0;left:calc(50% - var(--_ku-hit) / 2);width:var(--_ku-hit);cursor:col-resize}
|
|
11956
|
+
.knobs-split[data-direction="column"]>.knobs-divider::before{left:0;right:0;top:calc(50% - var(--_ku-hit) / 2);bottom:auto;width:auto;height:var(--_ku-hit);cursor:row-resize}
|
|
11891
11957
|
/* Hover, focus and drags draw the hairline in the accent, with a soft wash beside it. */
|
|
11892
|
-
.knobs-divider::after{content:"";position:absolute;inset:0 -1px;background:var(--
|
|
11893
|
-
box-shadow:0 0 0 2px color-mix(in srgb,var(--
|
|
11958
|
+
.knobs-divider::after{content:"";position:absolute;inset:0 -1px;background:var(--_k-accent);opacity:0;pointer-events:none;
|
|
11959
|
+
box-shadow:0 0 0 2px color-mix(in srgb,var(--_k-accent) 18%,transparent);transition:opacity .16s}
|
|
11894
11960
|
.knobs-split[data-direction="column"]>.knobs-divider::after{inset:-1px 0}
|
|
11895
11961
|
.knobs-divider:hover::after{opacity:.7;transition-delay:.12s}
|
|
11896
11962
|
.knobs-divider:focus-visible::after,.knobs-divider[data-active]::after{opacity:1;transition-delay:0s}
|
|
11897
11963
|
/* Between cards, the hairline gives way to a grip: a small capsule in the gap that shows on
|
|
11898
11964
|
hover, and lengthens and takes the accent while dragged or focused. */
|
|
11899
|
-
.knobs-split:not([data-frame="flat"])>.knobs-divider::after{inset:auto;left:50%;top:50%;width:4px;height:28px;margin:-14px 0 0 -2px;border-radius:2px;background:var(--
|
|
11900
|
-
transition:opacity .16s,background .16s,scale var(--
|
|
11965
|
+
.knobs-split:not([data-frame="flat"])>.knobs-divider::after{inset:auto;left:50%;top:50%;width:4px;height:28px;margin:-14px 0 0 -2px;border-radius:2px;background:var(--_k-border-strong);box-shadow:none;
|
|
11966
|
+
transition:opacity .16s,background .16s,scale var(--_ku-ease-ms) var(--_ku-ease)}
|
|
11901
11967
|
.knobs-split[data-direction="column"]:not([data-frame="flat"])>.knobs-divider::after{inset:auto;left:50%;top:50%;width:28px;height:4px;margin:-2px 0 0 -14px}
|
|
11902
11968
|
.knobs-split:not([data-frame="flat"])>.knobs-divider:hover::after{opacity:1}
|
|
11903
|
-
.knobs-split:not([data-frame="flat"])>.knobs-divider:is(:focus-visible,[data-active])::after{background:var(--
|
|
11969
|
+
.knobs-split:not([data-frame="flat"])>.knobs-divider:is(:focus-visible,[data-active])::after{background:var(--_k-accent);opacity:.9;scale:1 1.45}
|
|
11904
11970
|
.knobs-split[data-direction="column"]:not([data-frame="flat"])>.knobs-divider:is(:focus-visible,[data-active])::after{scale:1.45 1}
|
|
11905
11971
|
:root[data-knobs-resizing],:root[data-knobs-resizing] *{user-select:none!important;-webkit-user-select:none!important}
|
|
11906
11972
|
:root[data-knobs-resizing="row"] *{cursor:col-resize!important}
|
|
@@ -11910,135 +11976,150 @@ var ease = springEasing(26, 1), TOKENS2 = {
|
|
|
11910
11976
|
/* Tree: one scroller, rows placed by transform, only those near the view in the DOM. */
|
|
11911
11977
|
.knobs-tree{position:relative;overflow:auto;height:100%;outline:none;scrollbar-width:none;overscroll-behavior:contain;user-select:none;-webkit-user-select:none}
|
|
11912
11978
|
.knobs-tree-space{position:relative;width:100%;pointer-events:none}
|
|
11913
|
-
.knobs-tree-row{position:absolute;left:var(--
|
|
11914
|
-
color:var(--
|
|
11915
|
-
.knobs-tree-row::before{content:"";position:absolute;inset:0;border-radius:var(--
|
|
11916
|
-
.knobs-tree:not([data-keyboard]):not([data-dragging]) .knobs-tree-row:hover::before{opacity:1;transition-duration:calc(var(--
|
|
11917
|
-
.knobs-tree-row[aria-selected="true"]::before{opacity:1;background:var(--
|
|
11918
|
-
.knobs-tree:focus-visible .knobs-tree-row[data-active]::before,.knobs-tree[data-keyboard]:focus .knobs-tree-row[data-active]::before{opacity:1;background:var(--
|
|
11919
|
-
.knobs-tree:focus .knobs-tree-row[data-active][aria-selected="true"]::before{background:var(--
|
|
11920
|
-
.knobs-tree-row[data-drop="into"]::before{opacity:1;background:color-mix(in srgb,var(--
|
|
11979
|
+
.knobs-tree-row{position:absolute;left:var(--_ku-row-x);right:var(--_ku-row-x);top:0;display:flex;align-items:center;height:var(--_k-row);padding-right:calc(var(--_k-inset) - 4px);
|
|
11980
|
+
color:var(--_k-fg);white-space:nowrap;cursor:default;will-change:transform;contain:layout style}
|
|
11981
|
+
.knobs-tree-row::before{content:"";position:absolute;inset:0;border-radius:var(--_ku-row-radius);background:var(--_ku-wash);opacity:0;transition:opacity calc(var(--_k-hover-out) * 1ms),background .12s;pointer-events:none}
|
|
11982
|
+
.knobs-tree:not([data-keyboard]):not([data-dragging]) .knobs-tree-row:hover::before{opacity:1;transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11983
|
+
.knobs-tree-row[aria-selected="true"]::before{opacity:1;background:var(--_ku-select)}
|
|
11984
|
+
.knobs-tree:focus-visible .knobs-tree-row[data-active]::before,.knobs-tree[data-keyboard]:focus .knobs-tree-row[data-active]::before{opacity:1;background:var(--_ku-wash-hi)}
|
|
11985
|
+
.knobs-tree:focus .knobs-tree-row[data-active][aria-selected="true"]::before{background:var(--_ku-select-focus)}
|
|
11986
|
+
.knobs-tree-row[data-drop="into"]::before{opacity:1;background:color-mix(in srgb,var(--_k-accent) 30%,transparent)}
|
|
11921
11987
|
.knobs-tree-row[data-dragged]{opacity:.38}
|
|
11922
|
-
/* glide:
|
|
11923
|
-
.knobs-tree-
|
|
11924
|
-
|
|
11925
|
-
.knobs-tree-cursor[data-on]{opacity:1}
|
|
11926
|
-
.knobs-tree:focus .knobs-tree-cursor{background:var(--ku-select-focus)}
|
|
11988
|
+
/* glide: the selection pill on the selected row, in the selection's colour (the row's own stays off). */
|
|
11989
|
+
.knobs-tree>.knobs-pick-pill{background:var(--_ku-select)}
|
|
11990
|
+
.knobs-tree:focus>.knobs-pick-pill{background:var(--_ku-select-focus)}
|
|
11927
11991
|
.knobs-tree[data-glide] .knobs-tree-row[aria-selected="true"]::before{opacity:0!important}
|
|
11928
11992
|
.knobs-tree-row>*{position:relative}
|
|
11929
|
-
.knobs-tree-caret{flex:none;display:flex;align-items:center;justify-content:center;width:16px;height:100%;color:var(--
|
|
11993
|
+
.knobs-tree-caret{flex:none;display:flex;align-items:center;justify-content:center;width:16px;height:100%;color:var(--_k-fg-3);transition:transform var(--_ku-ease-ms) var(--_ku-ease)}
|
|
11930
11994
|
.knobs-tree-caret svg{width:9px;height:9px}
|
|
11931
11995
|
.knobs-tree-row[aria-expanded="true"]>.knobs-tree-caret{transform:rotate(90deg)}
|
|
11932
11996
|
.knobs-tree-row:not([aria-expanded])>.knobs-tree-caret{visibility:hidden}
|
|
11933
|
-
.knobs-tree-icon{flex:none;display:flex;align-items:center;justify-content:center;width:14px;margin-right:6px;color:var(--
|
|
11934
|
-
.knobs-tree-label{position:relative;flex:1;min-width:0;overflow:hidden;font-weight:var(--
|
|
11935
|
-
.knobs-tree-row[data-ancestor] .knobs-tree-label{color:var(--
|
|
11936
|
-
.knobs-tree-label .knobs-tree-mark{color:var(--
|
|
11997
|
+
.knobs-tree-icon{flex:none;display:flex;align-items:center;justify-content:center;width:14px;margin-right:6px;color:var(--_k-fg-3);font-size:calc(var(--_k-font-size) - 1px)}
|
|
11998
|
+
.knobs-tree-label{position:relative;flex:1;min-width:0;overflow:hidden;font-weight:var(--_k-weight)}
|
|
11999
|
+
.knobs-tree-row[data-ancestor] .knobs-tree-label{color:var(--_k-fg-2)}
|
|
12000
|
+
.knobs-tree-label .knobs-tree-mark{color:var(--_k-accent)}
|
|
11937
12001
|
.knobs-tree-row[data-off~="visible"] :is(.knobs-tree-label,.knobs-tree-icon){opacity:.45}
|
|
11938
|
-
.knobs-tree-row[data-off~="locked"] .knobs-tree-label{color:var(--
|
|
11939
|
-
.knobs-tree-detail{flex:none;margin-left:6px;color:var(--
|
|
12002
|
+
.knobs-tree-row[data-off~="locked"] .knobs-tree-label{color:var(--_k-fg-2)}
|
|
12003
|
+
.knobs-tree-detail{flex:none;margin-left:6px;color:var(--_k-fg-3);font-variant-numeric:tabular-nums}
|
|
11940
12004
|
.knobs-tree-tools{flex:none;display:flex;align-items:center;gap:1px;margin-left:4px}
|
|
11941
|
-
.knobs-ui .knobs-tree-toggle{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:calc(var(--
|
|
12005
|
+
.knobs-ui .knobs-tree-toggle{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:calc(var(--_k-radius) * 999);color:var(--_k-fg-3);cursor:pointer;opacity:0;transition:opacity .12s,color .12s,background .12s}
|
|
11942
12006
|
.knobs-ui .knobs-tree-toggle svg{width:12px;height:12px}
|
|
11943
12007
|
.knobs-tree-row:is(:hover,[data-active],[aria-selected="true"]) .knobs-tree-toggle,.knobs-ui .knobs-tree-toggle[aria-pressed="false"]{opacity:1}
|
|
11944
|
-
.knobs-ui .knobs-tree-toggle:hover{background:var(--
|
|
11945
|
-
.knobs-ui .knobs-tree-toggle[aria-pressed="false"]{color:var(--
|
|
12008
|
+
.knobs-ui .knobs-tree-toggle:hover{background:var(--_ku-wash-hi);color:var(--_k-fg)}
|
|
12009
|
+
.knobs-ui .knobs-tree-toggle[aria-pressed="false"]{color:var(--_k-fg-2)}
|
|
11946
12010
|
/* Renaming in place, as a number is edited in a panel: no box, just the text and an underline. */
|
|
11947
|
-
.knobs-ui .knobs-tree-edit{position:absolute;inset:auto 0 auto 0;top:50%;transform:translateY(-50%);width:100%;height:calc(var(--
|
|
11948
|
-
background:transparent;color:var(--
|
|
11949
|
-
.knobs-tree-edit::selection{background:color-mix(in srgb,var(--
|
|
12011
|
+
.knobs-ui .knobs-tree-edit{position:absolute;inset:auto 0 auto 0;top:50%;transform:translateY(-50%);width:100%;height:calc(var(--_k-font-size) * 1.5);padding:0;
|
|
12012
|
+
background:transparent;color:var(--_k-fg);caret-color:var(--_k-accent);font:inherit;font-weight:var(--_k-weight);border-bottom:1px solid var(--_k-fg)}
|
|
12013
|
+
.knobs-tree-edit::selection{background:color-mix(in srgb,var(--_k-accent) 40%,transparent)}
|
|
11950
12014
|
.knobs-tree-row[data-editing] .knobs-tree-text{visibility:hidden}
|
|
11951
|
-
.knobs-tree-line{position:absolute;left:0;right:6px;top:0;height:2px;margin-top:-1px;border-radius:1px;background:var(--
|
|
11952
|
-
.knobs-tree-line::before{content:"";position:absolute;left:-3px;top:-2px;width:6px;height:6px;border-radius:50%;box-shadow:inset 0 0 0 2px var(--
|
|
12015
|
+
.knobs-tree-line{position:absolute;left:0;right:6px;top:0;height:2px;margin-top:-1px;border-radius:1px;background:var(--_k-accent);pointer-events:none;opacity:0;transition:opacity .1s}
|
|
12016
|
+
.knobs-tree-line::before{content:"";position:absolute;left:-3px;top:-2px;width:6px;height:6px;border-radius:50%;box-shadow:inset 0 0 0 2px var(--_k-accent)}
|
|
11953
12017
|
.knobs-tree[data-dragging] .knobs-tree-line[data-shown]{opacity:1}
|
|
11954
|
-
.knobs-tree-ghost{position:fixed;left:0;top:0;z-index:2147480004;padding:2px 8px;background:var(--
|
|
11955
|
-
box-shadow:0 0 0 1px var(--
|
|
11956
|
-
.knobs-tree-empty{padding:10px var(--
|
|
12018
|
+
.knobs-tree-ghost{position:fixed;left:0;top:0;z-index:2147480004;padding:2px 8px;background:var(--_k-bg);color:var(--_k-fg);border-radius:var(--_k-radius);
|
|
12019
|
+
box-shadow:0 0 0 1px var(--_k-border-strong),0 6px 18px rgba(0,0,0,calc(.35 * var(--_k-shadow-k,1)));pointer-events:none;white-space:nowrap;font:var(--_k-weight) var(--_k-font-size)/1.6 var(--_k-font)}
|
|
12020
|
+
.knobs-tree-empty{padding:10px var(--_k-inset);color:var(--_k-fg-3)}
|
|
11957
12021
|
|
|
11958
|
-
/* Timeline:
|
|
11959
|
-
|
|
12022
|
+
/* Timeline: play beside a track: the ruler's canvas over a lane of markers, ranges as soft bands,
|
|
12023
|
+
and the playhead, a hairline in the accent with a cap. No clock: the time shows under the
|
|
12024
|
+
pointer on the track (the tag), in seconds, while hovering or scrubbing. */
|
|
11960
12025
|
:where(.knobs-timeline,.knobs-timeline *){box-sizing:border-box}
|
|
11961
|
-
.knobs-ui.knobs-timeline{display:flex;align-items:stretch;gap:10px;width:100%;height:100%;min-height:52px;padding:6px var(--
|
|
11962
|
-
font:var(--
|
|
12026
|
+
.knobs-ui.knobs-timeline{display:flex;align-items:stretch;gap:10px;width:100%;height:100%;min-height:52px;padding:6px var(--_k-inset) 8px 8px;outline:none;user-select:none;-webkit-user-select:none;
|
|
12027
|
+
font:var(--_k-weight) var(--_k-font-size)/1.35 var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left}
|
|
11963
12028
|
:where(.knobs-ui) :is(.knobs-tl-play,.knobs-tl-edit){all:revert;box-sizing:border-box;font:inherit;color:inherit;letter-spacing:inherit;background:transparent;border:0;margin:0;padding:0;outline:none;box-shadow:none}
|
|
11964
|
-
.knobs-tl-transport{flex:none;display:flex;align-items:center
|
|
11965
|
-
.knobs-ui .knobs-tl-play{flex:none;display:inline-flex;align-items:center;justify-content:center;width:var(--
|
|
11966
|
-
background:var(--
|
|
11967
|
-
.knobs-ui .knobs-tl-play:hover{background:color-mix(in srgb,var(--
|
|
12029
|
+
.knobs-tl-transport{flex:none;display:flex;align-items:center}
|
|
12030
|
+
.knobs-ui .knobs-tl-play{flex:none;display:inline-flex;align-items:center;justify-content:center;width:var(--_k-control-h);height:var(--_k-control-h);min-width:22px;min-height:22px;border-radius:calc(var(--_k-radius) * 999);
|
|
12031
|
+
background:var(--_k-fill-selected);color:var(--_k-fg);cursor:pointer;transition:background .15s,transform .15s var(--_ku-ease)}
|
|
12032
|
+
.knobs-ui .knobs-tl-play:hover{background:color-mix(in srgb,var(--_k-fg) 16%,transparent)}
|
|
11968
12033
|
.knobs-ui .knobs-tl-play:active{transform:scale(.94)}
|
|
11969
12034
|
.knobs-tl-play svg{width:12px;height:12px}
|
|
11970
|
-
.knobs-timeline[data-playing] .knobs-tl-play{background:var(--
|
|
11971
|
-
.knobs-tl-
|
|
11972
|
-
|
|
11973
|
-
.knobs-tl-
|
|
11974
|
-
.knobs-tl-track{position:relative;flex:1;min-width:0;overflow:hidden;border-radius:var(--ku-radius);background:var(--ku-surface);cursor:col-resize;touch-action:none;
|
|
11975
|
-
transition:background calc(var(--ku-hover-out) * 1ms)}
|
|
11976
|
-
.knobs-timeline:focus-visible .knobs-tl-track,.knobs-timeline[data-keyboard]:focus .knobs-tl-track{background:color-mix(in srgb,var(--ku-surface-hi) 80%,transparent)}
|
|
12035
|
+
.knobs-timeline[data-playing] .knobs-tl-play{background:var(--_k-accent);color:var(--_k-bg)}
|
|
12036
|
+
.knobs-tl-track{position:relative;flex:1;min-width:0;overflow:hidden;border-radius:var(--_k-radius);background:var(--_k-fill);cursor:col-resize;touch-action:none;
|
|
12037
|
+
transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
12038
|
+
.knobs-timeline:focus-visible .knobs-tl-track,.knobs-timeline[data-keyboard]:focus .knobs-tl-track{background:color-mix(in srgb,var(--_k-fill-selected) 80%,transparent)}
|
|
11977
12039
|
.knobs-tl-ruler{position:absolute;left:0;top:0;height:22px;pointer-events:none}
|
|
11978
12040
|
.knobs-tl-lane{position:absolute;left:0;right:0;top:22px;bottom:0;pointer-events:none}
|
|
11979
12041
|
/* Ranges: a soft band through the lane, its edges handles; the loop range in the accent. */
|
|
11980
|
-
.knobs-tl-range{position:absolute;left:0;top:0;bottom:0;width:0;background:color-mix(in srgb,var(--
|
|
11981
|
-
.knobs-tl-range[data-loop]{background:color-mix(in srgb,var(--
|
|
11982
|
-
.knobs-tl-range[data-selected]{background:color-mix(in srgb,var(--
|
|
12042
|
+
.knobs-tl-range{position:absolute;left:0;top:0;bottom:0;width:0;background:color-mix(in srgb,var(--_k-fg) 6%,transparent);will-change:transform}
|
|
12043
|
+
.knobs-tl-range[data-loop]{background:color-mix(in srgb,var(--_k-accent) 11%,transparent)}
|
|
12044
|
+
.knobs-tl-range[data-selected]{background:color-mix(in srgb,var(--_k-accent) 18%,transparent)}
|
|
11983
12045
|
.knobs-tl-edge{position:absolute;top:0;bottom:0;width:9px;cursor:ew-resize}
|
|
11984
12046
|
.knobs-tl-edge[data-edge="start"]{left:-4px}
|
|
11985
12047
|
.knobs-tl-edge[data-edge="end"]{right:-5px}
|
|
11986
|
-
.knobs-tl-edge::after{content:"";position:absolute;top:0;bottom:0;left:4px;width:1px;background:color-mix(in srgb,var(--
|
|
11987
|
-
.knobs-tl-edge:hover::after,.knobs-tl-range[data-selected] .knobs-tl-edge::after{background:var(--
|
|
11988
|
-
.knobs-tl-rlabel{position:absolute;left:5px;bottom:3px;padding:0 5px;border-radius:max(0px,calc(var(--
|
|
12048
|
+
.knobs-tl-edge::after{content:"";position:absolute;top:0;bottom:0;left:4px;width:1px;background:color-mix(in srgb,var(--_k-accent) 55%,transparent);transition:background .15s,box-shadow .15s}
|
|
12049
|
+
.knobs-tl-edge:hover::after,.knobs-tl-range[data-selected] .knobs-tl-edge::after{background:var(--_k-accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--_k-accent) 22%,transparent)}
|
|
12050
|
+
.knobs-tl-rlabel{position:absolute;left:5px;bottom:3px;padding:0 5px;border-radius:max(0px,calc(var(--_k-radius) - 3px));font-size:var(--_k-text-meta);line-height:16px;color:var(--_k-fg-2);cursor:grab;white-space:nowrap}
|
|
11989
12051
|
.knobs-tl-rlabel:empty{display:none}
|
|
11990
|
-
.knobs-tl-rlabel:hover{background:var(--
|
|
12052
|
+
.knobs-tl-rlabel:hover{background:var(--_ku-wash-hi);color:var(--_k-fg)}
|
|
11991
12053
|
/* Markers: a diamond on the ruler's edge and a label chip below it. */
|
|
11992
|
-
.knobs-tl-marker{position:absolute;left:0;top:-22px;bottom:0;width:0;will-change:transform;pointer-events:none;--knobs-tl-c:var(--knobs-tl-color,var(--
|
|
12054
|
+
.knobs-tl-marker{position:absolute;left:0;top:-22px;bottom:0;width:0;will-change:transform;pointer-events:none;--knobs-tl-c:var(--knobs-tl-color,var(--_k-fg-2))}
|
|
11993
12055
|
.knobs-tl-marker::before{content:"";position:absolute;top:22px;bottom:0;left:-.5px;width:1px;background:color-mix(in srgb,var(--knobs-tl-c) 40%,transparent)}
|
|
11994
12056
|
.knobs-tl-pin{position:absolute;top:13px;left:-5px;width:10px;height:10px;pointer-events:auto;cursor:grab}
|
|
11995
|
-
.knobs-tl-pin::after{content:"";position:absolute;inset:1.5px;border-radius:min(2px,var(--
|
|
11996
|
-
.knobs-tl-mlabel{position:absolute;top:26px;left:3px;max-width:140px;padding:0 6px;border-radius:max(0px,calc(var(--
|
|
11997
|
-
font-size:var(--
|
|
11998
|
-
.knobs-tl-
|
|
11999
|
-
.knobs-tl-marker[data-selected]
|
|
12057
|
+
.knobs-tl-pin::after{content:"";position:absolute;inset:1.5px;border-radius:min(2px,var(--_k-radius));background:var(--knobs-tl-c);rotate:45deg;transition:background .15s,scale .2s var(--_ku-ease)}
|
|
12058
|
+
.knobs-tl-mlabel{position:absolute;top:26px;left:3px;max-width:140px;padding:0 6px;border-radius:max(0px,calc(var(--_k-radius) - 3px));background:var(--_k-fill-selected);color:var(--_k-fg);
|
|
12059
|
+
font-size:var(--_k-text-meta);line-height:17px;white-space:nowrap;pointer-events:auto;cursor:grab;transition:background .15s,color .15s}
|
|
12060
|
+
.knobs-tl-mtext{display:block;overflow:hidden;white-space:nowrap}
|
|
12061
|
+
.knobs-tl-marker[data-selected]{--knobs-tl-c:var(--_k-accent)}
|
|
12062
|
+
.knobs-tl-marker[data-selected] .knobs-tl-mlabel{background:color-mix(in srgb,var(--_k-accent) 24%,var(--_k-fill-selected))}
|
|
12000
12063
|
.knobs-tl-marker[data-selected] .knobs-tl-pin::after{scale:1.2}
|
|
12001
12064
|
.knobs-timeline[data-dragging] .knobs-tl-marker[data-selected] :is(.knobs-tl-pin,.knobs-tl-mlabel){cursor:grabbing}
|
|
12002
12065
|
.knobs-tl-marker[data-editing] .knobs-tl-mlabel{visibility:hidden}
|
|
12003
|
-
.knobs-ui .knobs-tl-edit{position:absolute;top:26px;left:3px;width:120px;height:17px;padding:0 6px;font-size:var(--
|
|
12004
|
-
background:var(--
|
|
12066
|
+
.knobs-ui .knobs-tl-edit{position:absolute;top:26px;left:3px;width:120px;height:17px;padding:0 6px;font-size:var(--_k-text-meta);color:var(--_k-fg);caret-color:var(--_k-accent);
|
|
12067
|
+
background:var(--_k-bg);border-radius:max(0px,calc(var(--_k-radius) - 3px));box-shadow:inset 0 -1px 0 var(--_k-fg);pointer-events:auto}
|
|
12005
12068
|
/* The playhead: an accent hairline with a rounded cap in the ruler; it glows a little while held
|
|
12006
12069
|
on a marker. */
|
|
12007
12070
|
.knobs-tl-head{position:absolute;left:0;top:0;bottom:0;width:0;will-change:transform;pointer-events:none}
|
|
12008
|
-
.knobs-tl-head::before{content:"";position:absolute;top:4px;bottom:0;left:-.75px;width:1.5px;background:var(--
|
|
12009
|
-
.knobs-tl-head::after{content:"";position:absolute;top:3px;left:-4.5px;width:9px;height:13px;border-radius:min(4.5px,var(--
|
|
12010
|
-
background:var(--
|
|
12071
|
+
.knobs-tl-head::before{content:"";position:absolute;top:4px;bottom:0;left:-.75px;width:1.5px;background:var(--_k-accent)}
|
|
12072
|
+
.knobs-tl-head::after{content:"";position:absolute;top:3px;left:-4.5px;width:9px;height:13px;border-radius:min(4.5px,var(--_k-radius)) min(4.5px,var(--_k-radius)) min(4.5px,var(--_k-radius)) min(4.5px,var(--_k-radius));
|
|
12073
|
+
background:var(--_k-accent);box-shadow:0 1px 3px rgba(0,0,0,calc(.3 * var(--k-lift,1)));transition:box-shadow .15s,scale .18s var(--_ku-ease)}
|
|
12011
12074
|
.knobs-timeline[data-scrubbing] .knobs-tl-head::after{scale:1.12}
|
|
12012
|
-
.knobs-timeline[data-stuck] .knobs-tl-head::after{box-shadow:0 0 0 3px color-mix(in srgb,var(--
|
|
12013
|
-
.knobs-tl-hover{position:absolute;left:0;top:0;bottom:0;width:1px;margin-left:-.5px;background:var(--
|
|
12075
|
+
.knobs-timeline[data-stuck] .knobs-tl-head::after{box-shadow:0 0 0 3px color-mix(in srgb,var(--_k-accent) 26%,transparent)}
|
|
12076
|
+
.knobs-tl-hover{position:absolute;left:0;top:0;bottom:0;width:1px;margin-left:-.5px;background:var(--_k-border-strong);transform:translateX(-100px);pointer-events:none;opacity:0;transition:opacity .15s}
|
|
12014
12077
|
.knobs-tl-track:hover .knobs-tl-hover{opacity:1}
|
|
12015
12078
|
.knobs-timeline[data-scrubbing] .knobs-tl-hover{opacity:0}
|
|
12079
|
+
.knobs-tl-tag{position:absolute;left:0;bottom:2px;font-size:var(--_k-text-meta);line-height:16px;color:var(--_k-fg);font-variant-numeric:tabular-nums;font-feature-settings:"tnum";white-space:nowrap;pointer-events:none;opacity:0}
|
|
12080
|
+
.knobs-tl-tag[data-on]{opacity:1}
|
|
12081
|
+
/* The lane (variant: "lane"): one slim track of ticks under a compare or a video; markers are
|
|
12082
|
+
faint chapter ticks, the current one in text colour; nothing to edit. */
|
|
12083
|
+
.knobs-ui.knobs-timeline[data-variant="lane"]{height:auto;min-height:0;padding:0;gap:var(--_k-gap)}
|
|
12084
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-track{height:var(--_k-control-h)}
|
|
12085
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-ruler{height:100%}
|
|
12086
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-lane{top:0}
|
|
12087
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-marker{top:0}
|
|
12088
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-marker::before{top:0;bottom:50%;left:-.75px;width:1.5px;background:var(--_k-fg-3)}
|
|
12089
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-marker[data-current]::before{background:var(--_k-fg)}
|
|
12090
|
+
.knobs-timeline[data-variant="lane"] :is(.knobs-tl-pin,.knobs-tl-mlabel,.knobs-tl-rlabel){display:none}
|
|
12091
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-head::before{top:0}
|
|
12092
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-head::after{content:none}
|
|
12093
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-tag{top:2px;bottom:auto}
|
|
12094
|
+
/* The line (variant: "line"): a player's progress under its media. One 2px line, fg-3 with fg
|
|
12095
|
+
filling it, a segment per chapter; it thickens under the pointer and while scrubbing. The
|
|
12096
|
+
chapter and time under the pointer float over it; nothing else shows. */
|
|
12097
|
+
.knobs-ui.knobs-timeline[data-variant="line"]{height:auto;min-height:0;padding:0;gap:0}
|
|
12098
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-transport{display:none}
|
|
12099
|
+
.knobs-ui.knobs-timeline[data-variant="line"] .knobs-tl-track{height:16px;overflow:visible;border-radius:var(--_k-radius);background:transparent;box-shadow:none;cursor:pointer}
|
|
12100
|
+
.knobs-timeline[data-variant="line"] :is(.knobs-tl-ruler,.knobs-tl-lane,.knobs-tl-hover,.knobs-tl-head,.knobs-tl-rlabel){display:none}
|
|
12101
|
+
.knobs-tl-segs{position:absolute;left:0;right:0;top:50%;height:2px;margin-top:-1px;pointer-events:none;transition:scale calc(var(--_k-hover-out) * 1ms) var(--_ku-ease)}
|
|
12102
|
+
.knobs-tl-seg{position:absolute;left:0;top:0;height:100%;overflow:hidden;border-radius:1px;background:var(--_k-fg-3);will-change:transform}
|
|
12103
|
+
.knobs-tl-seg-fill{position:absolute;inset:0;background:var(--_k-fg);transform-origin:0 0;will-change:transform}
|
|
12104
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-track:hover .knobs-tl-segs,.knobs-timeline[data-variant="line"][data-scrubbing] .knobs-tl-segs{scale:1 2}
|
|
12105
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-range{top:3px;bottom:3px;border-radius:3px}
|
|
12106
|
+
.knobs-timeline[data-variant="line"]:focus-visible .knobs-tl-track,.knobs-timeline[data-variant="line"][data-keyboard]:focus .knobs-tl-track{background:transparent;box-shadow:0 0 0 2px color-mix(in srgb,var(--_k-accent) 60%,transparent)}
|
|
12107
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-tag{top:auto;bottom:calc(100% + 2px);display:flex;gap:6px;padding:0 6px;border-radius:calc(var(--_k-radius) * 999);background:var(--_ku-media-scrim);color:var(--_ku-on-media);
|
|
12108
|
+
font-size:var(--_k-type-small);line-height:var(--_k-leading-small);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
|
|
12109
|
+
.knobs-tl-tag-label{color:var(--_k-fg-2)}
|
|
12110
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-tag-label{color:var(--_ku-on-media-2)}
|
|
12111
|
+
.knobs-tl-tag-label:empty{display:none}
|
|
12016
12112
|
@media(prefers-reduced-motion:reduce){.knobs-timeline :where(*,::before,::after){transition:none!important}}
|
|
12017
12113
|
@media(prefers-reduced-motion:reduce){:is(.knobs-tree,.knobs-split>.knobs-divider,.knobs-pane-head,.knobs-pane-rail) :where(*,::before,::after){transition:none!important}}
|
|
12018
|
-
|
|
12114
|
+
`, uiCss = () => aliased(css + readoutCss + overlayCss + bentoCss + activityCss + pickerCss + compareCss + playerCss + selectionPillCss) + rolling_css_default;
|
|
12019
12115
|
function injectUiStyles(doc) {
|
|
12020
|
-
if (doc.querySelector("style[data-knobs-ui]"))
|
|
12116
|
+
if (injectTokens(doc), doc.querySelector("style[data-knobs-ui]"))
|
|
12021
12117
|
return;
|
|
12022
12118
|
let style = doc.createElement("style");
|
|
12023
|
-
style.dataset.knobsUi = "", style.textContent =
|
|
12024
|
-
}
|
|
12025
|
-
function injectUiPreset(doc, preset) {
|
|
12026
|
-
let content = presetCss({ ...preset, css: void 0 }).replaceAll(".knobs-panel", ".knobs-ui"), existing = doc.querySelector(`style[data-knobs-ui-preset="${preset.name}"]`);
|
|
12027
|
-
if (existing) {
|
|
12028
|
-
if (existing.textContent !== content)
|
|
12029
|
-
existing.textContent = content;
|
|
12030
|
-
return;
|
|
12031
|
-
}
|
|
12032
|
-
let style = doc.createElement("style");
|
|
12033
|
-
style.dataset.knobsUiPreset = preset.name, style.textContent = content, doc.head.append(style);
|
|
12119
|
+
style.dataset.knobsUi = "", style.textContent = uiCss(), doc.head.append(style);
|
|
12034
12120
|
}
|
|
12035
|
-
function
|
|
12036
|
-
|
|
12037
|
-
if (injectUiStyles(doc), root.classList.add("knobs-ui"), look.preset)
|
|
12038
|
-
injectUiPreset(doc, look.preset), root.dataset.preset = look.preset.name;
|
|
12039
|
-
if (look.theme)
|
|
12040
|
-
root.dataset.theme = look.theme;
|
|
12041
|
-
syncFrame(root);
|
|
12121
|
+
function applyLook2(root, look) {
|
|
12122
|
+
injectUiStyles(root.ownerDocument), root.classList.add("knobs-root", "knobs-ui"), applyLook(root, resolveLook(look)), syncFrame(root);
|
|
12042
12123
|
}
|
|
12043
12124
|
function syncFrame(root) {
|
|
12044
12125
|
if (!root.isConnected)
|
|
@@ -12049,7 +12130,6 @@ function syncFrame(root) {
|
|
|
12049
12130
|
delete root.dataset.frame;
|
|
12050
12131
|
}
|
|
12051
12132
|
var lookDefaults = { current: {} };
|
|
12052
|
-
var reducedMotion4 = (win) => win?.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
|
|
12053
12133
|
function frameLoop(win, step) {
|
|
12054
12134
|
let raf = 0, last = 0, tick = (now) => {
|
|
12055
12135
|
let dt = last ? Math.min(0.064, (now - last) / 1000) : 0.016666666666666666;
|
|
@@ -12081,7 +12161,14 @@ var svg = (body, box = 16) => `<svg viewBox="0 0 ${box} ${box}" aria-hidden="tru
|
|
|
12081
12161
|
};
|
|
12082
12162
|
|
|
12083
12163
|
// src/ui/readout-model.ts
|
|
12084
|
-
var
|
|
12164
|
+
var SERIES_TOKENS = [
|
|
12165
|
+
"--_k-series-1",
|
|
12166
|
+
"--_k-series-2",
|
|
12167
|
+
"--_k-series-3",
|
|
12168
|
+
"--_k-series-4",
|
|
12169
|
+
"--_k-series-5",
|
|
12170
|
+
"--_k-series-6"
|
|
12171
|
+
], SERIES = ["#5ac8fa", "#ff9f0a", "#bf5af2", "#30d158", "#ff6482", "#64d2ff"];
|
|
12085
12172
|
function formatNumber(v, decimals) {
|
|
12086
12173
|
if (!Number.isFinite(v))
|
|
12087
12174
|
return "—";
|
|
@@ -12401,20 +12488,21 @@ function paletteOf(el, now = performance.now()) {
|
|
|
12401
12488
|
let hit = palettes.get(el);
|
|
12402
12489
|
if (hit && now - hit.at < 8)
|
|
12403
12490
|
return hit.p;
|
|
12404
|
-
let s = getComputedStyle(el), c = (name, fallback) =>
|
|
12405
|
-
accent: c("--
|
|
12406
|
-
text: c("--
|
|
12407
|
-
label: c("--
|
|
12408
|
-
dim: c("--
|
|
12409
|
-
line: c("--
|
|
12410
|
-
surfaceHi: c("--
|
|
12411
|
-
warn: c("--
|
|
12412
|
-
critical: c("--
|
|
12413
|
-
|
|
12491
|
+
let s = getComputedStyle(el), c = (name, fallback) => tokenColor(s, name, fallback), p = {
|
|
12492
|
+
accent: c("--kv-accent", [1, 1, 1, 1]),
|
|
12493
|
+
text: c("--kv-fg", [1, 1, 1, 0.92]),
|
|
12494
|
+
label: c("--kv-fg-2", [1, 1, 1, 0.64]),
|
|
12495
|
+
dim: c("--kv-fg-3", [1, 1, 1, 0.42]),
|
|
12496
|
+
line: c("--kv-border", [1, 1, 1, 0.1]),
|
|
12497
|
+
surfaceHi: c("--kv-fill-selected", [1, 1, 1, 0.11]),
|
|
12498
|
+
warn: c("--_k-warn", [0.96, 0.68, 0.2, 1]),
|
|
12499
|
+
critical: c("--_k-danger", [1, 0.37, 0.34, 1]),
|
|
12500
|
+
series: SERIES_TOKENS.map((name, i) => c(name, parseCssColor(SERIES[i % SERIES.length]))),
|
|
12501
|
+
radius: Number.parseFloat(s.getPropertyValue("--kv-radius")) || 0
|
|
12414
12502
|
};
|
|
12415
12503
|
return palettes.set(el, { at: now, p }), p;
|
|
12416
12504
|
}
|
|
12417
|
-
var reduced2 = (doc) =>
|
|
12505
|
+
var reduced2 = (doc) => reducedMotion(doc.defaultView);
|
|
12418
12506
|
function make2(doc) {
|
|
12419
12507
|
return (tag, cls, text) => {
|
|
12420
12508
|
let node = doc.createElement(tag);
|
|
@@ -12605,7 +12693,7 @@ function valueBox(doc, grew) {
|
|
|
12605
12693
|
};
|
|
12606
12694
|
}
|
|
12607
12695
|
function createWatch(env) {
|
|
12608
|
-
let root = make2(env.doc)("span", "knobs-ui knobs-rd knobs-rd-watch"), field = env.field, value = valueBox(env.doc);
|
|
12696
|
+
let root = make2(env.doc)("span", "knobs-root knobs-ui knobs-rd knobs-rd-watch"), field = env.field, value = valueBox(env.doc);
|
|
12609
12697
|
root.append(value.box);
|
|
12610
12698
|
let seq = -1, text = throttle(() => field.hz ?? 4), rt = runtime(env, root, (now) => {
|
|
12611
12699
|
if (env.state.seq === seq)
|
|
@@ -12632,7 +12720,7 @@ function createWatch(env) {
|
|
|
12632
12720
|
};
|
|
12633
12721
|
}
|
|
12634
12722
|
function createSparkline(env) {
|
|
12635
|
-
let root = make2(env.doc)("span", "knobs-ui knobs-rd knobs-rd-spark"), field = env.field, canvas = plot(env.doc, "knobs-rd-plot", () => {
|
|
12723
|
+
let root = make2(env.doc)("span", "knobs-root knobs-ui knobs-rd knobs-rd-spark"), field = env.field, canvas = plot(env.doc, "knobs-rd-plot", () => {
|
|
12636
12724
|
dirty = !0, rt.request();
|
|
12637
12725
|
}), value = valueBox(env.doc);
|
|
12638
12726
|
root.append(canvas.canvas, value.box);
|
|
@@ -12698,7 +12786,7 @@ function createSparkline(env) {
|
|
|
12698
12786
|
};
|
|
12699
12787
|
}
|
|
12700
12788
|
function createGraph(env) {
|
|
12701
|
-
let el = make2(env.doc), root = el("div", "knobs-ui knobs-rd knobs-rd-graph knobs-rd-block"), field = env.field, head = el("div", "knobs-rd-head");
|
|
12789
|
+
let el = make2(env.doc), root = el("div", "knobs-root knobs-ui knobs-rd knobs-rd-graph knobs-rd-block"), field = env.field, head = el("div", "knobs-rd-head");
|
|
12702
12790
|
if (env.label)
|
|
12703
12791
|
head.append(env.label);
|
|
12704
12792
|
let legend = el("span", "knobs-rd-legend");
|
|
@@ -12724,7 +12812,7 @@ function createGraph(env) {
|
|
|
12724
12812
|
build();
|
|
12725
12813
|
let range = new EasedRange, text = throttle(() => field.hz ?? 4), seq = -1, dirty = !0, hoverX = -1, hoverAt = -1, ops = [], ticks = { top: "", bottom: "" }, shownSeq = -1, rings = () => field.series.map((s) => env.state.series.get(s.id)), colorOf = (p, i) => {
|
|
12726
12814
|
let s = field.series[i];
|
|
12727
|
-
return s.color ? parseCssColor(s.color, p.accent) : i === 0 ? p.accent :
|
|
12815
|
+
return s.color ? parseCssColor(s.color, p.accent) : i === 0 ? p.accent : p.series[(i - 1) % p.series.length];
|
|
12728
12816
|
}, rt = runtime(env, root, (now, dt) => {
|
|
12729
12817
|
let rs = rings(), fresh = env.state.seq !== seq;
|
|
12730
12818
|
seq = env.state.seq;
|
|
@@ -12874,7 +12962,7 @@ function createGraph(env) {
|
|
|
12874
12962
|
};
|
|
12875
12963
|
}
|
|
12876
12964
|
function createMeter(env) {
|
|
12877
|
-
let root = make2(env.doc)("span", "knobs-ui knobs-rd knobs-rd-meter"), field = env.field, canvas = plot(env.doc, "knobs-rd-plot", () => {
|
|
12965
|
+
let root = make2(env.doc)("span", "knobs-root knobs-ui knobs-rd knobs-rd-meter"), field = env.field, canvas = plot(env.doc, "knobs-rd-plot", () => {
|
|
12878
12966
|
dirty = !0, rt.request();
|
|
12879
12967
|
}), value = valueBox(env.doc);
|
|
12880
12968
|
root.append(canvas.canvas, value.box), root.setAttribute("role", "meter");
|
|
@@ -12952,7 +13040,7 @@ function createMeter(env) {
|
|
|
12952
13040
|
}
|
|
12953
13041
|
var isNumeric = (v) => typeof v === "number" || typeof v === "string" && /^[-+]?[\d.,]+\s*\S{0,3}$/.test(v);
|
|
12954
13042
|
function createTable(env) {
|
|
12955
|
-
let el = make2(env.doc), root = el("div", "knobs-ui knobs-rd knobs-rd-table knobs-rd-block"), field = env.field, grid = el("div", "knobs-rd-grid");
|
|
13043
|
+
let el = make2(env.doc), root = el("div", "knobs-root knobs-ui knobs-rd knobs-rd-table knobs-rd-block"), field = env.field, grid = el("div", "knobs-rd-grid");
|
|
12956
13044
|
grid.tabIndex = -1, grid.setAttribute("role", "table"), root.append(grid);
|
|
12957
13045
|
let text = throttle(() => field.hz ?? 4), seq = -1, cols = 0, head, body = [], grows = [], header = (n) => {
|
|
12958
13046
|
let names = field.columns ?? [], key = `${n}\x00${names.join("\x00")}`;
|
|
@@ -13061,7 +13149,7 @@ function logTime(t) {
|
|
|
13061
13149
|
}
|
|
13062
13150
|
var levelColor2 = (p, level) => level === "error" ? p.critical : level === "warn" ? p.warn : level === "debug" ? p.dim : p.text;
|
|
13063
13151
|
function createLog(env) {
|
|
13064
|
-
let doc = env.doc, el = make2(doc), root = el("div", "knobs-ui knobs-rd knobs-rd-log knobs-rd-block"), field = env.field, head = el("div", "knobs-rd-head");
|
|
13152
|
+
let doc = env.doc, el = make2(doc), root = el("div", "knobs-root knobs-ui knobs-rd knobs-rd-log knobs-rd-block"), field = env.field, head = el("div", "knobs-rd-head");
|
|
13065
13153
|
if (env.label)
|
|
13066
13154
|
head.append(env.label);
|
|
13067
13155
|
let chips = el("span", "knobs-rd-chips");
|
|
@@ -13357,11 +13445,11 @@ function layerRoot(doc) {
|
|
|
13357
13445
|
}
|
|
13358
13446
|
function layerElement(doc, cls, look) {
|
|
13359
13447
|
let el = doc.createElement("div");
|
|
13360
|
-
return el.className = cls, layerRoot(doc).append(el),
|
|
13448
|
+
return el.className = cls, layerRoot(doc).append(el), applyLook2(el, lookOf(look)), el;
|
|
13361
13449
|
}
|
|
13362
13450
|
function presence(el, o = {}) {
|
|
13363
13451
|
let win = el.ownerDocument.defaultView, spring = new Spring(0, 1, 1, 0.002), dx = o.dx ?? 0, dy = o.dy ?? 0, gone = [], shown = !1, render = () => {
|
|
13364
|
-
let reduced =
|
|
13452
|
+
let reduced = reducedMotion(win), p = spring.x, q = Math.max(0, Math.min(1, p)), scale = reduced ? 1 : (o.scale ?? 0.94) + (1 - (o.scale ?? 0.94)) * p, blur = reduced ? 0 : (1 - q) * (o.blur ?? 6), t = reduced ? 0 : 1 - p;
|
|
13365
13453
|
el.style.opacity = q.toFixed(3), el.style.transform = p === 1 ? "" : `translate(${(dx * t).toFixed(2)}px,${(dy * t).toFixed(2)}px) scale(${scale.toFixed(4)})`, el.style.filter = blur > 0.05 ? `blur(${blur.toFixed(2)}px)` : "", el.style.pointerEvents = shown ? "" : "none", o.onFrame?.(p);
|
|
13366
13454
|
}, loop = frameLoop(win, (dt) => {
|
|
13367
13455
|
if (spring.step(dt), render(), !spring.resting)
|
|
@@ -13375,8 +13463,8 @@ function presence(el, o = {}) {
|
|
|
13375
13463
|
}
|
|
13376
13464
|
return !1;
|
|
13377
13465
|
}), tune = (seconds, zeta) => {
|
|
13378
|
-
let reduced =
|
|
13379
|
-
spring.omega = 2 * Math.PI / (reduced ?
|
|
13466
|
+
let reduced = reducedMotion(win);
|
|
13467
|
+
spring.omega = 2 * Math.PI / (reduced ? FADE.duration : seconds), spring.zeta = reduced ? 1 : zeta;
|
|
13380
13468
|
};
|
|
13381
13469
|
return render(), {
|
|
13382
13470
|
show() {
|
|
@@ -13415,7 +13503,7 @@ var regions = /* @__PURE__ */ new WeakMap;
|
|
|
13415
13503
|
function toast(message, options = {}) {
|
|
13416
13504
|
let doc = options.within?.ownerDocument ?? options.doc ?? document, win = doc.defaultView, key = options.within ?? doc, r = regions.get(key);
|
|
13417
13505
|
if (!r || !r.el.isConnected) {
|
|
13418
|
-
let el = options.within ? Object.assign(doc.createElement("div"), { className: "knobs-ui knobs-toast" }) : layerElement(doc, "knobs-layer knobs-toast", options.look);
|
|
13506
|
+
let el = options.within ? Object.assign(doc.createElement("div"), { className: "knobs-root knobs-ui knobs-toast" }) : layerElement(doc, "knobs-layer knobs-toast", options.look);
|
|
13419
13507
|
if (options.within)
|
|
13420
13508
|
injectUiStyles(doc), options.within.append(el);
|
|
13421
13509
|
el.setAttribute("role", "status"), el.setAttribute("aria-live", "polite");
|
|
@@ -13552,7 +13640,7 @@ function createTabStrip(doc, choose) {
|
|
|
13552
13640
|
}
|
|
13553
13641
|
|
|
13554
13642
|
// src/panel/tab-transition.ts
|
|
13555
|
-
var LAYOUT = springMotion2(
|
|
13643
|
+
var LAYOUT = springMotion2(SPRINGS2.default), IN = springMotion2({ duration: 0.2, bounce: 0 }), OUT = springMotion2({ duration: 0.14, bounce: 0 }), STAGGER = 18, STAGGER_MAX = 6, RISE = 6;
|
|
13556
13644
|
function tabTransition(body, root, wake) {
|
|
13557
13645
|
let win = body.ownerDocument.defaultView, reduced = win.matchMedia("(prefers-reduced-motion: reduce)"), leavers = /* @__PURE__ */ new Map, arrivals = /* @__PURE__ */ new Map, moves = /* @__PURE__ */ new Map, heights = /* @__PURE__ */ new Map, wanted = /* @__PURE__ */ new Map, raf = 0, then = 0, held = 0, spring = (x, m, eps) => new Spring(x, m.omega, m.zeta, eps), opacityOf = (node) => Number(win.getComputedStyle(node).opacity) || 1, outermost = (nodes) => nodes.filter((node) => !nodes.some((other) => other !== node && other.contains(node))), showing = (node) => !node.hidden && !leavers.has(node), units = () => {
|
|
13558
13646
|
let out = [];
|
|
@@ -13887,7 +13975,7 @@ function createLens(o) {
|
|
|
13887
13975
|
}, all = (r) => [r, r, r, r], panelBox = (inset) => {
|
|
13888
13976
|
let r = root.getBoundingClientRect();
|
|
13889
13977
|
if (o.page) {
|
|
13890
|
-
let top = Math.max(r.top, o.header?.getBoundingClientRect().bottom ?? 0), bottom = Math.min(r.bottom, win?.innerHeight ?? r.bottom), pad = 8 + inset, radius = parseFloat(getComputedStyle(root).getPropertyValue("--kt-panel
|
|
13978
|
+
let top = Math.max(r.top, o.header?.getBoundingClientRect().bottom ?? 0), bottom = Math.min(r.bottom, win?.innerHeight ?? r.bottom), pad = 8 + inset, radius = parseFloat(getComputedStyle(root).getPropertyValue("--kt-radius-panel")) || 0;
|
|
13891
13979
|
return {
|
|
13892
13980
|
x: r.left + pad,
|
|
13893
13981
|
y: top + pad,
|
|
@@ -14192,13 +14280,15 @@ function morphFromChip(chip, root, wake, restored) {
|
|
|
14192
14280
|
}, ensureShape = () => {
|
|
14193
14281
|
if (shape)
|
|
14194
14282
|
return shape;
|
|
14195
|
-
let cs = getComputedStyle(root), r = parseFloat(cs.getPropertyValue("--kv-panel
|
|
14283
|
+
let cs = getComputedStyle(root), r = parseFloat(cs.getPropertyValue("--kv-radius-panel"));
|
|
14196
14284
|
if (Number.isFinite(r))
|
|
14197
14285
|
panelRadius = r;
|
|
14198
|
-
shape = doc.createElement("div"), shape.className = "knobs-morph", shape.setAttribute("aria-hidden", "true");
|
|
14199
|
-
for (let t of ["bg", "
|
|
14286
|
+
shape = doc.createElement("div"), shape.className = "knobs-root knobs-morph", shape.setAttribute("aria-hidden", "true");
|
|
14287
|
+
for (let t of ["bg", "border", "rim", "border-subtle", "glass", "glass-tone"])
|
|
14200
14288
|
shape.style.setProperty(`--kv-${t}`, cs.getPropertyValue(`--kv-${t}`));
|
|
14201
|
-
|
|
14289
|
+
for (let t of ["--_k-shadow-overlay", "--_k-shadow-k", "--_k-light"])
|
|
14290
|
+
shape.style.setProperty(t, cs.getPropertyValue(t));
|
|
14291
|
+
return shape.style.colorScheme = cs.colorScheme, root.before(shape), root.style.animation = "none", root.dataset.morphing = "", chip.dataset.morph = "", shape;
|
|
14202
14292
|
}, clear = () => {
|
|
14203
14293
|
shape?.remove(), shape = void 0, delete root.dataset.morphing;
|
|
14204
14294
|
for (let name of [
|
|
@@ -14388,7 +14478,7 @@ function positionPanel(panel, header, anchor, id, storage) {
|
|
|
14388
14478
|
}
|
|
14389
14479
|
|
|
14390
14480
|
// src/panel/presence.ts
|
|
14391
|
-
var EXIT = springMotion2(
|
|
14481
|
+
var EXIT = springMotion2(SPRINGS2.snappy), ENTER = springMotion2(SPRINGS2.default), FADE2 = springMotion2(FADE), BLUR2 = 4, SCALE = 0.96, LEAD2 = 0.4, FOLDED = [
|
|
14392
14482
|
"height",
|
|
14393
14483
|
"min-height",
|
|
14394
14484
|
"flex",
|
|
@@ -14469,7 +14559,7 @@ function createPresence(root, options) {
|
|
|
14469
14559
|
raf = 0, spring.snap(next ? 1 : 0), settle();
|
|
14470
14560
|
return;
|
|
14471
14561
|
}
|
|
14472
|
-
let m = reduced ?
|
|
14562
|
+
let m = reduced ? FADE2 : next ? ENTER : EXIT;
|
|
14473
14563
|
if (spring.omega = m.omega, spring.zeta = m.zeta, spring.set(next ? 1 : 0), root.dataset.presence = next ? "in" : "out", apply(spring.x), !raf)
|
|
14474
14564
|
last = performance.now(), raf = win.requestAnimationFrame(tick);
|
|
14475
14565
|
options.wake();
|
|
@@ -14478,7 +14568,7 @@ function createPresence(root, options) {
|
|
|
14478
14568
|
if (!root.dataset.presence || root.hidden)
|
|
14479
14569
|
return;
|
|
14480
14570
|
let look = presenceLook(spring.x, inline, reduced), r = root.getBoundingClientRect();
|
|
14481
|
-
radius ??= parseFloat(win.getComputedStyle(root).getPropertyValue("--kv-panel
|
|
14571
|
+
radius ??= parseFloat(win.getComputedStyle(root).getPropertyValue("--kv-radius-panel")) || 12;
|
|
14482
14572
|
let s = look.scale, ox = r.left + r.width / 2, oy = inline ? r.top : r.top + r.height / 2;
|
|
14483
14573
|
return {
|
|
14484
14574
|
x: ox + (r.left - ox) * s,
|
|
@@ -14527,10 +14617,9 @@ function buildPanel(controls, host, options) {
|
|
|
14527
14617
|
node.textContent = text;
|
|
14528
14618
|
return node;
|
|
14529
14619
|
}, inline = Boolean(options.inline), page = options.page, close = options.close ?? options.onClose, root = el(page ? "div" : "aside");
|
|
14530
|
-
root.className = page ? "knobs-panel knobs-inline knobs-page" : inline ? "knobs-panel knobs-inline" : "knobs-panel", root.dataset.controls = controls.id;
|
|
14620
|
+
root.className = page ? "knobs-root knobs-panel knobs-inline knobs-page" : inline ? "knobs-root knobs-panel knobs-inline" : "knobs-root knobs-panel", root.dataset.controls = controls.id;
|
|
14531
14621
|
let untrackHas = trackHas(root);
|
|
14532
|
-
|
|
14533
|
-
injectPreset(doc, options.preset), root.dataset.preset = options.preset.name;
|
|
14622
|
+
applyLook(root, panelLook(controls, options)), root.dataset.density = options.density ?? controls.density;
|
|
14534
14623
|
let titleText = options.title === void 0 ? controls.id : options.title, toggleKey = options.toggleKey !== void 0 ? options.toggleKey : page ? !1 : controls.toggleKey;
|
|
14535
14624
|
if (options.restored)
|
|
14536
14625
|
root.dataset.restored = "";
|
|
@@ -17387,7 +17476,14 @@ function buildPanel(controls, host, options) {
|
|
|
17387
17476
|
}, rowsObserver = new MutationObserver(syncRows);
|
|
17388
17477
|
rowsObserver.observe(root, {
|
|
17389
17478
|
attributes: !0,
|
|
17390
|
-
attributeFilter: [
|
|
17479
|
+
attributeFilter: [
|
|
17480
|
+
"style",
|
|
17481
|
+
"class",
|
|
17482
|
+
"data-appearance",
|
|
17483
|
+
"data-knobs-theme",
|
|
17484
|
+
"data-preset",
|
|
17485
|
+
"data-density"
|
|
17486
|
+
]
|
|
17391
17487
|
}), syncRows(), layoutRows(!1);
|
|
17392
17488
|
let unsubscribe = controls.subscribe(update), unlisten = readoutPort?.listen((key) => readouts.get(key)?.notify()), gpuObserver = new MutationObserver(() => {
|
|
17393
17489
|
for (let r of readouts.values())
|
|
@@ -17486,7 +17582,7 @@ function buildPanel(controls, host, options) {
|
|
|
17486
17582
|
});
|
|
17487
17583
|
modeObserver.observe(doc.documentElement, {
|
|
17488
17584
|
attributes: !0,
|
|
17489
|
-
attributeFilter: ["data-knobs-renderer", "data-theme", "style"]
|
|
17585
|
+
attributeFilter: ["data-knobs-renderer", "data-theme", "data-appearance", "class", "style"]
|
|
17490
17586
|
});
|
|
17491
17587
|
let panel = {
|
|
17492
17588
|
element: root,
|