@kitlangton/knobs 0.3.0 → 0.4.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +350 -45
- package/dist/dev/{chunk-jx1ktap3.js → chunk-1qzffbpa.js} +497 -422
- package/dist/dev/{chunk-7xgkerd2.js → chunk-3ygqgy1x.js} +23 -1
- package/dist/dev/{chunk-pmkvb9ep.js → chunk-8mabjeyk.js} +1920 -507
- package/dist/dev/{chunk-v8ssbcbk.js → chunk-ayb292zj.js} +13 -11
- package/dist/dev/index.js +10 -5
- package/dist/index.js +25 -1
- package/dist/panel.js +2954 -1291
- package/dist/react.js +294 -6
- package/dist/solid.js +292 -4
- package/dist/themes.js +1509 -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/themes/define.d.ts +104 -0
- package/dist/types/themes/index.d.ts +11 -0
- package/dist/types/themes/knobs.d.ts +5 -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 +1100 -0
- package/dist/types/ui/bento-css.d.ts +1 -1
- package/dist/types/ui/compare-css.d.ts +1 -0
- package/dist/types/ui/compare-frames.d.ts +41 -0
- package/dist/types/ui/compare-gpu.d.ts +58 -0
- package/dist/types/ui/compare-model.d.ts +169 -0
- package/dist/types/ui/compare-mp4.d.ts +29 -0
- package/dist/types/ui/compare-strip.d.ts +28 -0
- package/dist/types/ui/compare.d.ts +103 -0
- package/dist/types/ui/diff-css.d.ts +1 -0
- package/dist/types/ui/diff-model.d.ts +128 -0
- package/dist/types/ui/diff-scroll.d.ts +29 -0
- package/dist/types/ui/diff.d.ts +158 -0
- package/dist/types/ui/index.d.ts +10 -2
- package/dist/types/ui/look.d.ts +18 -13
- package/dist/types/ui/overlay-css.d.ts +1 -1
- package/dist/types/ui/react.d.ts +66 -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/rgba.d.ts +11 -0
- package/dist/types/ui/scrollbar.d.ts +2 -2
- package/dist/types/ui/solid.d.ts +52 -0
- package/dist/types/ui/timeline.d.ts +35 -2
- package/dist/types/ui/tree.d.ts +7 -2
- package/dist/types/ui/walkthrough-css.d.ts +1 -0
- package/dist/types/ui/walkthrough-media.d.ts +29 -0
- package/dist/types/ui/walkthrough-model.d.ts +447 -0
- package/dist/types/ui/walkthrough.d.ts +63 -0
- package/dist/ui-react.js +18352 -8462
- package/dist/ui-solid.js +17947 -8148
- package/dist/ui.js +19240 -9701
- package/package.json +6 -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-8mabjeyk.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,156 +11420,225 @@ 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}
|
|
11441
|
+
`;
|
|
11442
|
+
|
|
11443
|
+
// src/ui/compare-css.ts
|
|
11444
|
+
var compareCss = `
|
|
11445
|
+
:where(.knobs-compare,.knobs-compare *,.knobs-cmp-strip,.knobs-cmp-strip *){box-sizing:border-box}
|
|
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);
|
|
11448
|
+
display:flex;flex-direction:column;gap:6px;width:100%;height:100%;min-height:160px;outline:none;user-select:none;-webkit-user-select:none;
|
|
11449
|
+
font:var(--_k-weight) var(--_k-font-size)/1.35 var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left}
|
|
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}
|
|
11451
|
+
.knobs-cmp-bar{flex:none;display:flex;align-items:center;gap:2px;height:24px;padding:0 2px}
|
|
11452
|
+
.knobs-cmp-modes{display:flex;align-items:center;gap:2px}
|
|
11453
|
+
.knobs-ui .knobs-cmp-mode,.knobs-ui .knobs-cmp-toggle{height:22px;padding:0 7px;border-radius:max(0px,calc(var(--_k-radius) - 2px));color:var(--_k-fg-3);cursor:pointer;white-space:nowrap;
|
|
11454
|
+
transition:color .15s,background .15s}
|
|
11455
|
+
.knobs-ui .knobs-cmp-mode:is(:hover,:focus-visible),.knobs-ui .knobs-cmp-toggle:is(:hover,:focus-visible){color:var(--_k-fg);background:var(--_ku-wash)}
|
|
11456
|
+
.knobs-ui .knobs-cmp-mode[aria-checked="true"],.knobs-ui .knobs-cmp-toggle[aria-pressed="true"]{color:var(--_k-fg);font-weight:var(--_k-weight-label)}
|
|
11457
|
+
.knobs-cmp-fill{flex:1}
|
|
11458
|
+
.knobs-cmp-toggle[hidden]{display:none}
|
|
11459
|
+
/* One surface: on a card (a walkthrough's step, a split's pane, anything .knobs-surface) or marked
|
|
11460
|
+
data-nested, the stage drops its fill and the sides sit on that card. */
|
|
11461
|
+
: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)}
|
|
11462
|
+
/* In a page's flow (a container with no height), it takes the height its sides need. */
|
|
11463
|
+
.knobs-ui.knobs-compare[data-auto]{height:auto}
|
|
11464
|
+
.knobs-compare[data-auto] .knobs-cmp-stage{flex:none;min-height:0}
|
|
11465
|
+
.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}
|
|
11466
|
+
.knobs-compare[data-frame="flat"] .knobs-cmp-stage{border-radius:0}
|
|
11467
|
+
.knobs-compare[data-mode="wipe"] .knobs-cmp-stage{cursor:ew-resize}
|
|
11468
|
+
/* Unzoomed, a finger still scrolls the page up and down; zoomed, the stage takes every gesture. */
|
|
11469
|
+
.knobs-compare[data-zoomed] .knobs-cmp-stage{cursor:grab;touch-action:none}
|
|
11470
|
+
.knobs-compare[data-panning],.knobs-compare[data-panning] *{cursor:grabbing!important}
|
|
11471
|
+
.knobs-compare[data-dragging],.knobs-compare[data-dragging] *{cursor:ew-resize!important}
|
|
11472
|
+
.knobs-cmp-sizer{position:absolute;left:0;right:0;top:0;height:0;visibility:hidden;pointer-events:none}
|
|
11473
|
+
.knobs-cmp-canvas{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}
|
|
11474
|
+
.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}
|
|
11475
|
+
.knobs-compare[data-renderer="gpu"] .knobs-cmp-media{opacity:0}
|
|
11476
|
+
/* Glass: what's behind shows through, blurred, on the knobs tokens. */
|
|
11477
|
+
.knobs-cmp-label,.knobs-cmp-zoom{background:color-mix(in srgb,var(--_k-bg) 52%,transparent);-webkit-backdrop-filter:blur(14px) saturate(1.6);backdrop-filter:blur(14px) saturate(1.6);
|
|
11478
|
+
box-shadow:inset 0 0 0 .5px var(--_k-border),inset 0 1px 0 var(--_k-rim),0 2px 10px rgba(0,0,0,calc(.18 * var(--_k-shadow-k,1)))}
|
|
11479
|
+
.knobs-cmp-label{position:absolute;left:0;top:0;padding:1px 7px;border-radius:999px;font-size:var(--_k-text-meta);line-height:16px;color:var(--_k-fg-2);white-space:nowrap;pointer-events:none;will-change:transform;transition:color .15s}
|
|
11480
|
+
.knobs-cmp-label[data-lit]{color:var(--_k-fg)}
|
|
11481
|
+
.knobs-cmp-label[data-dim]{color:var(--_k-fg-3)}
|
|
11482
|
+
/* The wipe: a hairline down the line with a grip at its middle; a wider strip takes the hand and
|
|
11483
|
+
the keys (a slider). It fades with the mode. */
|
|
11484
|
+
.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;transition:opacity .18s cubic-bezier(.4,0,1,1)}
|
|
11485
|
+
.knobs-cmp-handle[data-on]{opacity:1;pointer-events:auto;transition:opacity .22s cubic-bezier(.2,.8,.2,1)}
|
|
11486
|
+
.knobs-cmp-handle::before{content:"";position:absolute;top:0;bottom:0;left:11.5px;width:1px;background:var(--_ku-cmp-line);box-shadow:0 0 0 .5px rgba(0,0,0,.28),0 0 6px rgba(0,0,0,.25)}
|
|
11487
|
+
.knobs-cmp-handle::after{content:"";position:absolute;top:50%;left:9px;width:6px;height:28px;margin-top:-14px;border-radius:3px;background:var(--_ku-cmp-line);
|
|
11488
|
+
box-shadow:0 1px 3px rgba(0,0,0,.35),0 0 0 .5px rgba(0,0,0,.2);transition:scale .18s var(--_ku-ease),box-shadow .15s}
|
|
11489
|
+
.knobs-compare[data-dragging] .knobs-cmp-handle::after{scale:1.12}
|
|
11490
|
+
.knobs-cmp-handle:focus-visible::after,.knobs-compare[data-keyboard] .knobs-cmp-handle:focus::after{box-shadow:0 1px 3px rgba(0,0,0,.35),0 0 0 3px color-mix(in srgb,var(--_k-accent) 40%,transparent)}
|
|
11491
|
+
/* The split's hairline, down the middle side by side. */
|
|
11492
|
+
.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}
|
|
11493
|
+
/* Zoomed: how far, and a way back, in the stage's corner; it fades in and out, nothing shifts. */
|
|
11494
|
+
.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;
|
|
11495
|
+
color:var(--_k-fg);font-size:var(--_k-text-meta);font-variant-numeric:tabular-nums;font-feature-settings:"tnum";white-space:nowrap;
|
|
11496
|
+
opacity:0;scale:.96;pointer-events:none;transition:opacity .16s cubic-bezier(.4,0,1,1),scale .16s cubic-bezier(.4,0,1,1)}
|
|
11497
|
+
.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)}
|
|
11498
|
+
: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;
|
|
11499
|
+
height:20px;padding:0 8px;border-radius:999px;background:transparent;color:var(--_k-fg-2);cursor:pointer;transition:color .15s,background .15s}
|
|
11500
|
+
:where(.knobs-ui) .knobs-cmp-zoom-reset:is(:hover,:focus-visible){color:var(--_k-fg);background:color-mix(in srgb,var(--_k-fg) 12%,transparent)}
|
|
11501
|
+
.knobs-cmp-note{position:absolute;left:50%;top:50%;translate:-50% -50%;color:var(--_k-fg-3);font-size:var(--_k-text-meta);pointer-events:none}
|
|
11502
|
+
.knobs-cmp-note:empty{display:none}
|
|
11503
|
+
.knobs-cmp-strip-host{flex:none;height:60px;min-height:0}
|
|
11504
|
+
.knobs-cmp-timeline-host{flex:none;height:56px;min-height:0}
|
|
11505
|
+
/* The frame strip: Before over After per column, a difference bar under them, a dot where it peaks. */
|
|
11506
|
+
.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;
|
|
11507
|
+
font:var(--_k-weight) var(--_k-font-size)/1.35 var(--_k-font);color:var(--_k-fg)}
|
|
11508
|
+
.knobs-cmp-strip>canvas{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}
|
|
11509
|
+
@media(prefers-reduced-motion:reduce){:is(.knobs-compare,.knobs-cmp-strip) :where(*,::before,::after){transition-duration:.12s!important}}
|
|
11397
11510
|
`;
|
|
11398
11511
|
|
|
11399
11512
|
// src/ui/overlay-css.ts
|
|
11400
11513
|
var overlayCss = `
|
|
11401
11514
|
.knobs-layers{position:fixed;inset:0;z-index:2147480005;pointer-events:none}
|
|
11402
11515
|
.knobs-layers>.knobs-layer,.knobs-ui.knobs-toast{position:fixed;left:0;top:0;box-sizing:border-box;pointer-events:auto;outline:none;
|
|
11403
|
-
font:var(--
|
|
11516
|
+
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;
|
|
11404
11517
|
-webkit-font-smoothing:antialiased;will-change:transform,opacity,filter}
|
|
11405
11518
|
/* The overlays' own elements stop a host's element rules; what you put in a popover is yours. */
|
|
11406
11519
|
: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;
|
|
11407
11520
|
background:transparent;border:0;margin:0;padding:0;outline:none;box-shadow:none}
|
|
11408
11521
|
.knobs-layers .knobs-layer *{box-sizing:border-box}
|
|
11409
11522
|
/* A floating surface: frosted, a hairline rim, a soft shadow. */
|
|
11410
|
-
.knobs-layers>:is(.knobs-popover-layer,.knobs-palette,.knobs-confirm,.knobs-menu-layer){background:color-mix(in srgb,var(--
|
|
11411
|
-
-webkit-backdrop-filter:blur(28px) saturate(1.7);backdrop-filter:blur(28px) saturate(1.7);border-radius:var(--
|
|
11412
|
-
box-shadow:0 0 0 .5px var(--
|
|
11523
|
+
.knobs-layers>:is(.knobs-popover-layer,.knobs-palette,.knobs-confirm,.knobs-menu-layer){background:color-mix(in srgb,var(--_k-bg) 88%,transparent);
|
|
11524
|
+
-webkit-backdrop-filter:blur(28px) saturate(1.7);backdrop-filter:blur(28px) saturate(1.7);border-radius:var(--_k-radius-panel);
|
|
11525
|
+
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)))}
|
|
11413
11526
|
.knobs-layers>.knobs-popover-layer{min-width:120px;max-width:min(420px,calc(100vw - 16px));padding:6px}
|
|
11414
|
-
.knobs-popover-layer .knobs-popover-text{padding:4px 6px;color:var(--
|
|
11527
|
+
.knobs-popover-layer .knobs-popover-text{padding:4px 6px;color:var(--_k-fg-2)}
|
|
11415
11528
|
|
|
11416
11529
|
/* Menus: rows of the panel's control height, a soft wash on the active one (never an outline),
|
|
11417
11530
|
concentric corners inside the surface. */
|
|
11418
11531
|
.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;
|
|
11419
11532
|
scrollbar-width:thin;overscroll-behavior:contain;user-select:none;-webkit-user-select:none}
|
|
11420
|
-
.knobs-menu-layer .knobs-mitem{position:relative;display:flex;align-items:center;gap:8px;flex:none;height:max(22px,calc(var(--
|
|
11421
|
-
border-radius:max(0px,calc(var(--
|
|
11422
|
-
.knobs-menu-layer .knobs-mitem[data-active],.knobs-menu-layer .knobs-mitem[data-open]{background:var(--
|
|
11423
|
-
.knobs-menu-layer .knobs-mitem[data-destructive]{color:var(--
|
|
11424
|
-
.knobs-menu-layer .knobs-mitem[data-destructive][data-active]{background:color-mix(in srgb,var(--
|
|
11533
|
+
.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;
|
|
11534
|
+
border-radius:max(0px,calc(var(--_k-radius-panel) - 5px));color:var(--_k-fg);cursor:default;white-space:nowrap}
|
|
11535
|
+
.knobs-menu-layer .knobs-mitem[data-active],.knobs-menu-layer .knobs-mitem[data-open]{background:var(--_ku-wash-hi)}
|
|
11536
|
+
.knobs-menu-layer .knobs-mitem[data-destructive]{color:var(--_k-danger)}
|
|
11537
|
+
.knobs-menu-layer .knobs-mitem[data-destructive][data-active]{background:color-mix(in srgb,var(--_k-danger) 16%,transparent)}
|
|
11425
11538
|
.knobs-menu-layer .knobs-mitem[aria-disabled="true"]{opacity:.38}
|
|
11426
|
-
.knobs-menu-layer .knobs-menu-lead{flex:none;display:flex;align-items:center;justify-content:center;width:14px;margin-left:-2px;color:var(--
|
|
11539
|
+
.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)}
|
|
11427
11540
|
.knobs-menu-layer .knobs-mitem[data-destructive] .knobs-menu-lead,.knobs-menu-layer .knobs-mitem[aria-checked="true"] .knobs-menu-lead{color:inherit}
|
|
11428
11541
|
.knobs-menu-layer .knobs-menu-lead svg{width:13px;height:13px}
|
|
11429
11542
|
.knobs-menu-layer .knobs-menu-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
|
|
11430
|
-
.knobs-menu-layer .knobs-menu-hint{flex:none;color:var(--
|
|
11543
|
+
.knobs-menu-layer .knobs-menu-hint{flex:none;color:var(--_k-fg-3)}
|
|
11431
11544
|
.knobs-menu-layer .knobs-menu-keys{display:inline-flex;gap:2px;flex:none;margin-left:12px}
|
|
11432
|
-
.knobs-menu-layer .knobs-mitem[data-active] .knobs-kbd{background:color-mix(in srgb,var(--
|
|
11433
|
-
.knobs-menu-layer .knobs-menu-caret{flex:none;display:flex;margin-left:8px;margin-right:-3px;color:var(--
|
|
11545
|
+
.knobs-menu-layer .knobs-mitem[data-active] .knobs-kbd{background:color-mix(in srgb,var(--_k-fg) 14%,transparent);color:var(--_k-fg)}
|
|
11546
|
+
.knobs-menu-layer .knobs-menu-caret{flex:none;display:flex;margin-left:8px;margin-right:-3px;color:var(--_k-fg-3)}
|
|
11434
11547
|
.knobs-menu-layer .knobs-menu-caret svg{width:10px;height:10px}
|
|
11435
|
-
.knobs-menu-layer .knobs-menu-sep{flex:none;height:1px;margin:4px 8px;background:var(--
|
|
11548
|
+
.knobs-menu-layer .knobs-menu-sep{flex:none;height:1px;margin:4px 8px;background:var(--_k-border)}
|
|
11436
11549
|
|
|
11437
11550
|
.knobs-layers>.knobs-tooltip{display:inline-flex;align-items:center;gap:7px;max-width:300px;padding:4px 8px;pointer-events:none;white-space:nowrap;
|
|
11438
|
-
font-size:calc(var(--
|
|
11439
|
-
box-shadow:0 0 0 .5px var(--
|
|
11551
|
+
font-size:calc(var(--_k-font-size) - .5px);background:var(--_k-bg);color:var(--_k-fg);border-radius:min(var(--_k-radius),6px);
|
|
11552
|
+
box-shadow:0 0 0 .5px var(--_k-border-strong),0 4px 14px rgba(0,0,0,calc(.3 * var(--_k-shadow-k,1)))}
|
|
11440
11553
|
.knobs-tooltip .knobs-tooltip-text{overflow:hidden;text-overflow:ellipsis}
|
|
11441
11554
|
.knobs-layer :is(.knobs-tooltip-keys,.knobs-palette-keys){display:inline-flex;gap:2px;flex:none}
|
|
11442
11555
|
.knobs-layer .knobs-tooltip-keys[hidden]{display:none}
|
|
11443
11556
|
.knobs-layer .knobs-kbd{display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 4px;
|
|
11444
|
-
border-radius:min(var(--
|
|
11557
|
+
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)}
|
|
11445
11558
|
|
|
11446
11559
|
.knobs-layers>.knobs-palette{left:50%;top:max(48px,15vh);translate:-50% 0;transform-origin:50% 0;display:flex;flex-direction:column;
|
|
11447
11560
|
width:min(580px,calc(100vw - 32px));max-height:min(460px,72vh);overflow:hidden}
|
|
11448
|
-
.knobs-palette .knobs-palette-field{display:flex;align-items:center;gap:10px;flex:none;height:46px;padding:0 16px;border-bottom:1px solid var(--
|
|
11561
|
+
.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)}
|
|
11449
11562
|
.knobs-palette .knobs-palette-field svg{width:15px;height:15px;flex:none}
|
|
11450
|
-
.knobs-palette .knobs-palette-input{flex:1;min-width:0;height:100%;font-size:calc(var(--
|
|
11451
|
-
.knobs-palette .knobs-palette-input::placeholder{color:var(--
|
|
11563
|
+
.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)}
|
|
11564
|
+
.knobs-palette .knobs-palette-input::placeholder{color:var(--_k-fg-3)}
|
|
11452
11565
|
.knobs-palette .knobs-palette-list{position:relative;flex:1;min-height:0;overflow:auto;padding:6px;scrollbar-width:thin;overscroll-behavior:contain}
|
|
11453
|
-
.knobs-palette .knobs-palette-hl{position:absolute;left:6px;right:6px;top:0;border-radius:max(0px,calc(var(--
|
|
11454
|
-
transition:transform var(--
|
|
11455
|
-
.knobs-palette .knobs-palette-section{padding:10px 10px 4px;color:var(--
|
|
11566
|
+
.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;
|
|
11567
|
+
transition:transform var(--_ku-ease-ms) var(--_ku-ease),height var(--_ku-ease-ms) var(--_ku-ease),opacity .12s}
|
|
11568
|
+
.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}
|
|
11456
11569
|
.knobs-palette .knobs-palette-section:first-of-type{padding-top:4px}
|
|
11457
|
-
.knobs-palette .knobs-palette-item{position:relative;display:flex;align-items:center;gap:8px;height:max(32px,var(--
|
|
11458
|
-
color:var(--
|
|
11459
|
-
.knobs-palette .knobs-palette-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--
|
|
11570
|
+
.knobs-palette .knobs-palette-item{position:relative;display:flex;align-items:center;gap:8px;height:max(32px,var(--_k-row));padding:0 10px;
|
|
11571
|
+
color:var(--_k-fg-2);cursor:default;user-select:none}
|
|
11572
|
+
.knobs-palette .knobs-palette-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--_k-fg)}
|
|
11460
11573
|
/* Searching, the label dims and its matched letters light up. */
|
|
11461
|
-
.knobs-palette[data-query] .knobs-palette-label{color:var(--
|
|
11462
|
-
.knobs-palette .knobs-palette-label mark{color:var(--
|
|
11463
|
-
.knobs-palette[data-query] .knobs-palette-item[data-active] .knobs-palette-label{color:var(--
|
|
11464
|
-
.knobs-palette .knobs-palette-hint{flex:none;color:var(--
|
|
11574
|
+
.knobs-palette[data-query] .knobs-palette-label{color:var(--_k-fg-2)}
|
|
11575
|
+
.knobs-palette .knobs-palette-label mark{color:var(--_k-accent);font-weight:var(--_k-weight-title)}
|
|
11576
|
+
.knobs-palette[data-query] .knobs-palette-item[data-active] .knobs-palette-label{color:var(--_k-fg)}
|
|
11577
|
+
.knobs-palette .knobs-palette-hint{flex:none;color:var(--_k-fg-3)}
|
|
11465
11578
|
.knobs-palette .knobs-palette-fill{flex:1}
|
|
11466
|
-
.knobs-palette .knobs-palette-tag{flex:none;color:var(--
|
|
11579
|
+
.knobs-palette .knobs-palette-tag{flex:none;color:var(--_k-fg-3);font-size:calc(var(--_k-font-size) - 1px);white-space:nowrap}
|
|
11467
11580
|
.knobs-palette .knobs-palette-item[aria-disabled="true"]{opacity:.4}
|
|
11468
|
-
.knobs-palette .knobs-palette-empty{padding:18px 10px;color:var(--
|
|
11581
|
+
.knobs-palette .knobs-palette-empty{padding:18px 10px;color:var(--_k-fg-3);text-align:center}
|
|
11469
11582
|
|
|
11470
|
-
.knobs-layers>.knobs-scrim{inset:0;width:100%;height:100%;background:
|
|
11583
|
+
.knobs-layers>.knobs-scrim{inset:0;width:100%;height:100%;background:var(--_k-scrim)}
|
|
11471
11584
|
.knobs-layers>.knobs-confirm{left:50%;top:42%;translate:-50% -50%;width:min(340px,calc(100vw - 32px));padding:18px 18px 14px}
|
|
11472
|
-
.knobs-confirm .knobs-confirm-title{margin:0 0 6px;font-size:calc(var(--
|
|
11473
|
-
.knobs-confirm .knobs-confirm-body{margin:0;color:var(--
|
|
11585
|
+
.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}
|
|
11586
|
+
.knobs-confirm .knobs-confirm-body{margin:0;color:var(--_k-fg-2);line-height:1.45}
|
|
11474
11587
|
.knobs-confirm .knobs-confirm-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
|
|
11475
|
-
.knobs-confirm .knobs-confirm-btn{height:28px;padding:0 14px;border-radius:min(var(--
|
|
11476
|
-
font-weight:var(--
|
|
11477
|
-
.knobs-confirm .knobs-confirm-cancel:is(:hover,:focus-visible){background:color-mix(in srgb,var(--
|
|
11478
|
-
.knobs-confirm .knobs-confirm-ok{background:var(--
|
|
11479
|
-
.knobs-confirm .knobs-confirm-ok[data-destructive]{background:var(--
|
|
11588
|
+
.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);
|
|
11589
|
+
font-weight:var(--_k-weight-label);cursor:pointer;transition:background .15s,filter .15s}
|
|
11590
|
+
.knobs-confirm .knobs-confirm-cancel:is(:hover,:focus-visible){background:color-mix(in srgb,var(--_k-fg) 18%,transparent)}
|
|
11591
|
+
.knobs-confirm .knobs-confirm-ok{background:var(--_k-accent);color:var(--_k-bg)}
|
|
11592
|
+
.knobs-confirm .knobs-confirm-ok[data-destructive]{background:var(--_k-danger);color:#fff}
|
|
11480
11593
|
.knobs-confirm .knobs-confirm-ok:is(:hover,:focus-visible){filter:brightness(1.14)}
|
|
11481
11594
|
|
|
11482
11595
|
.knobs-ui.knobs-toast{left:50%;top:auto;bottom:24px;z-index:2147480005;translate:-50% 0;display:inline-flex;align-items:center;gap:10px;
|
|
11483
|
-
max-width:min(480px,80vw);padding:8px 16px;background:var(--
|
|
11484
|
-
box-shadow:0 0 0 .5px var(--
|
|
11596
|
+
max-width:min(480px,80vw);padding:8px 16px;background:var(--_k-bg);color:var(--_k-fg);border-radius:calc(var(--_k-radius) * 999);
|
|
11597
|
+
box-shadow:0 0 0 .5px var(--_k-border-strong),0 8px 28px rgba(0,0,0,calc(.32 * var(--_k-shadow-k,1)))}
|
|
11485
11598
|
.knobs-toast .knobs-toast-text{overflow-wrap:anywhere}
|
|
11486
|
-
.knobs-toast[data-tone="warn"]::before,.knobs-toast[data-tone="error"]::before{content:"";flex:none;width:7px;height:7px;border-radius:50%;background:var(--
|
|
11487
|
-
.knobs-toast[data-tone="error"]::before{background:var(--
|
|
11488
|
-
.knobs-toast .knobs-toast-action{flex:none;color:var(--
|
|
11599
|
+
.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)}
|
|
11600
|
+
.knobs-toast[data-tone="error"]::before{background:var(--_k-danger)}
|
|
11601
|
+
.knobs-toast .knobs-toast-action{flex:none;color:var(--_k-accent);font-weight:var(--_k-weight-title);cursor:pointer}
|
|
11489
11602
|
.knobs-toast .knobs-toast-action[hidden]{display:none}
|
|
11490
11603
|
`;
|
|
11491
11604
|
|
|
11492
11605
|
// src/ui/picker-css.ts
|
|
11493
|
-
var snappy =
|
|
11606
|
+
var snappy = springLinear(SPRINGS2.snappy), pickerCss = `
|
|
11494
11607
|
:where(.knobs-picker,.knobs-picker-option,.knobs-picker-head,.knobs-picker-head *,.knobs-picker-card,.knobs-picker-body){box-sizing:border-box}
|
|
11495
11608
|
.knobs-ui.knobs-picker{position:relative;display:flex;flex-direction:column;gap:2px;padding:0;outline:none;
|
|
11496
|
-
font:var(--
|
|
11497
|
-
--kp-card:var(--
|
|
11609
|
+
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;
|
|
11610
|
+
--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}
|
|
11498
11611
|
.knobs-picker [hidden]{display:none!important}
|
|
11499
11612
|
/* The selection: one card behind the selected option and its parameters, gliding between them. */
|
|
11500
|
-
.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(--
|
|
11613
|
+
.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}
|
|
11501
11614
|
.knobs-picker[data-frame="flat"] .knobs-picker-card{box-shadow:none}
|
|
11502
11615
|
.knobs-picker-option{position:relative;flex:none}
|
|
11503
|
-
: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(--
|
|
11504
|
-
border:0;margin:0;background:transparent;color:var(--
|
|
11616
|
+
: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);
|
|
11617
|
+
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}
|
|
11505
11618
|
/* Hover: in at once, out over 100 ms. Keyboard focus: the same wash, a little firmer. */
|
|
11506
|
-
.knobs-picker-head::before{content:"";position:absolute;inset:0;border-radius:var(--kp-radius);background:var(--
|
|
11507
|
-
.knobs-picker-option:not([data-selected]) .knobs-picker-head:hover::before{opacity:1;transition-duration:calc(var(--
|
|
11508
|
-
.knobs-picker-head:focus-visible::before{opacity:1;background:var(--
|
|
11619
|
+
.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}
|
|
11620
|
+
.knobs-picker-option:not([data-selected]) .knobs-picker-head:hover::before{opacity:1;transition-duration:calc(var(--_k-hover-in,0) * 1ms)}
|
|
11621
|
+
.knobs-picker-head:focus-visible::before{opacity:1;background:var(--_ku-wash-hi);transition-duration:0s}
|
|
11509
11622
|
.knobs-picker-head>*{position:relative}
|
|
11510
|
-
.knobs-picker-option[data-selected] .knobs-picker-head{color:var(--
|
|
11623
|
+
.knobs-picker-option[data-selected] .knobs-picker-head{color:var(--_k-fg)}
|
|
11511
11624
|
/* Every row is numbered (only 1–9 are keys): tabular digits in a column two digits wide, so the
|
|
11512
11625
|
names line up past the ninth. */
|
|
11513
|
-
.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(--
|
|
11514
|
-
color:var(--
|
|
11626
|
+
.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);
|
|
11627
|
+
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}
|
|
11515
11628
|
.knobs-picker-key:empty{visibility:hidden}
|
|
11516
11629
|
/* An option's picture: cover-fit, the rows' corner language and a hairline drawn over it. Its
|
|
11517
11630
|
space is kept while it loads (nothing drawn), it fades in once loaded, and one that fails
|
|
11518
11631
|
gives its space back on the same ease. */
|
|
11519
|
-
.knobs-picker-thumb{flex:none;display:block;width:var(--k-picker-thumb,min(24px,calc(var(--
|
|
11520
|
-
object-fit:cover;background:none;outline:1px solid var(--
|
|
11632
|
+
.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));
|
|
11633
|
+
object-fit:cover;background:none;outline:1px solid var(--_k-border);outline-offset:-1px;opacity:0;
|
|
11521
11634
|
transition:opacity .2s ease-out,width .18s ease-out,margin .18s ease-out}
|
|
11522
11635
|
.knobs-picker-thumb[data-state="loaded"]{opacity:1}
|
|
11523
11636
|
.knobs-picker-thumb[data-instant]{transition:none}
|
|
11524
11637
|
.knobs-picker-thumb[data-state="failed"]{width:0;margin-right:-8px;outline-color:transparent}
|
|
11525
|
-
.knobs-picker-option[data-selected] .knobs-picker-key{background:var(--
|
|
11526
|
-
.knobs-picker-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;font-weight:var(--
|
|
11527
|
-
.knobs-picker-suggested{flex:none;color:var(--
|
|
11528
|
-
.knobs-picker-check{flex:none;display:flex;width:14px;height:14px;color:var(--
|
|
11638
|
+
.knobs-picker-option[data-selected] .knobs-picker-key{background:var(--_k-fill-selected);color:var(--_k-fg)}
|
|
11639
|
+
.knobs-picker-name{flex:1;min-width:0;overflow:hidden;white-space:nowrap;font-weight:var(--_k-weight-label)}
|
|
11640
|
+
.knobs-picker-suggested{flex:none;color:var(--_k-fg-3);font-size:var(--_k-text-meta)}
|
|
11641
|
+
.knobs-picker-check{flex:none;display:flex;width:14px;height:14px;color:var(--_k-accent);opacity:0;scale:.6;filter:blur(2px);
|
|
11529
11642
|
transition:opacity .11s ease-in,scale .11s ease-in,filter .11s ease-in}
|
|
11530
11643
|
.knobs-picker-check svg{display:block;width:14px;height:14px}
|
|
11531
11644
|
.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}
|
|
@@ -11537,7 +11650,7 @@ var snappy = springEasing(2 * Math.PI / 0.25, 1), pickerCss = `
|
|
|
11537
11650
|
.knobs-picker-inner{padding:var(--k-picker-pad,0 8px 8px)}
|
|
11538
11651
|
.knobs-picker-inner:empty{padding:0}
|
|
11539
11652
|
.knobs-picker-inner .knobs-panel.knobs-inline{--k-chrome:0;padding:0}
|
|
11540
|
-
.knobs-picker-empty{padding:8px var(--
|
|
11653
|
+
.knobs-picker-empty{padding:8px var(--_k-inset);color:var(--_k-fg-3)}
|
|
11541
11654
|
@media(prefers-reduced-motion:reduce){.knobs-picker :where(*,::before,::after){transition-duration:.15s!important;scale:none!important;filter:none!important}}
|
|
11542
11655
|
`;
|
|
11543
11656
|
|
|
@@ -11547,25 +11660,25 @@ var readoutCss = `
|
|
|
11547
11660
|
: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;
|
|
11548
11661
|
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}
|
|
11549
11662
|
.knobs-ui.knobs-rd,.knobs-rd *{box-sizing:border-box}
|
|
11550
|
-
.knobs-ui.knobs-rd{display:flex;align-items:center;gap:8px;min-width:0;color:var(--
|
|
11551
|
-
.knobs-rd .knobs-rd-v{font:var(--
|
|
11552
|
-
.knobs-rd .knobs-rd-mono{font:400 var(--
|
|
11553
|
-
.knobs-rd .knobs-rd-meta{font:var(--
|
|
11663
|
+
.knobs-ui.knobs-rd{display:flex;align-items:center;gap:8px;min-width:0;color:var(--_k-fg);letter-spacing:normal}
|
|
11664
|
+
.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}
|
|
11665
|
+
.knobs-rd .knobs-rd-mono{font:400 var(--_k-text-meta)/1.25 var(--_k-mono);font-variant-numeric:tabular-nums;white-space:pre}
|
|
11666
|
+
.knobs-rd .knobs-rd-meta{font:var(--_k-weight) var(--_k-text-meta)/1.25 var(--_k-font);white-space:nowrap}
|
|
11554
11667
|
.knobs-rd .knobs-rd-value{display:inline-flex;justify-content:flex-end;align-items:baseline;flex:none;margin-left:auto;contain:layout paint style}
|
|
11555
|
-
.knobs-rd .knobs-rd-num{color:var(--
|
|
11556
|
-
.knobs-rd .knobs-rd-unit{margin-left:var(--k-unit-gap,.28em);color:var(--
|
|
11668
|
+
.knobs-rd .knobs-rd-num{color:var(--_k-fg);text-align:right;transition:color .15s}
|
|
11669
|
+
.knobs-rd .knobs-rd-unit{margin-left:var(--k-unit-gap,.28em);color:var(--_k-fg-3)}
|
|
11557
11670
|
.knobs-rd .knobs-rd-unit[hidden]{display:none}
|
|
11558
11671
|
.knobs-rd.knobs-rd-watch{flex:1 1 auto;justify-content:flex-end}
|
|
11559
11672
|
.knobs-rd.knobs-rd-spark,.knobs-rd.knobs-rd-meter{flex:0 1 64%;margin-left:auto}
|
|
11560
|
-
.knobs-rd .knobs-rd-plot{display:block;flex:1 1 0;min-width:24px;height:max(12px,calc(var(--
|
|
11673
|
+
.knobs-rd .knobs-rd-plot{display:block;flex:1 1 0;min-width:24px;height:max(12px,calc(var(--_k-control-h) - 2px))}
|
|
11561
11674
|
.knobs-rd.knobs-rd-meter>.knobs-rd-plot{height:8px}
|
|
11562
|
-
.knobs-rd.knobs-rd-spark[data-hover] .knobs-rd-num{color:var(--
|
|
11563
|
-
.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(--
|
|
11675
|
+
.knobs-rd.knobs-rd-spark[data-hover] .knobs-rd-num{color:var(--_k-fg-2)}
|
|
11676
|
+
.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)}
|
|
11564
11677
|
|
|
11565
11678
|
/* Blocks: a head line (the label and what goes with it) over a body. In a panel the row grows to fit. */
|
|
11566
11679
|
.knobs-panel .knobs-row.knobs-rd-rowblock{display:block;height:auto}
|
|
11567
11680
|
.knobs-rd.knobs-rd-block{display:flex;flex-direction:column;align-items:stretch;gap:2px;width:100%}
|
|
11568
|
-
.knobs-rd .knobs-rd-head{display:flex;align-items:center;gap:0 10px;min-height:var(--
|
|
11681
|
+
.knobs-rd .knobs-rd-head{display:flex;align-items:center;gap:0 10px;min-height:var(--_k-row);min-width:0}
|
|
11569
11682
|
/* The title keeps its words; the legend or tools beside it give way (see fitHead). */
|
|
11570
11683
|
.knobs-rd .knobs-rd-head>span:first-child{flex:0 0 auto;max-width:100%}
|
|
11571
11684
|
.knobs-rd .knobs-rd-legend{display:flex;align-items:center;gap:12px;margin-left:auto;min-width:0;overflow:hidden}
|
|
@@ -11573,16 +11686,16 @@ var readoutCss = `
|
|
|
11573
11686
|
.knobs-rd .knobs-rd-tools>.knobs-rd-find{flex:1 1 56px;min-width:56px;max-width:84px}
|
|
11574
11687
|
.knobs-rd .knobs-rd-head[data-short] .knobs-rd-legend .knobs-rd-unit{display:none}
|
|
11575
11688
|
.knobs-rd .knobs-rd-head[data-wrap]{flex-wrap:wrap;padding-bottom:4px}
|
|
11576
|
-
.knobs-rd .knobs-rd-head[data-wrap]>span:first-child{display:flex;align-items:center;min-height:var(--
|
|
11689
|
+
.knobs-rd .knobs-rd-head[data-wrap]>span:first-child{display:flex;align-items:center;min-height:var(--_k-row)}
|
|
11577
11690
|
.knobs-rd .knobs-rd-head[data-wrap]>:is(.knobs-rd-legend,.knobs-rd-tools){flex:1 0 100%;margin-left:0}
|
|
11578
11691
|
.knobs-rd .knobs-rd-head[data-wrap]>.knobs-rd-tools{flex-wrap:wrap;row-gap:4px}
|
|
11579
11692
|
.knobs-rd .knobs-rd-key{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
|
|
11580
11693
|
.knobs-rd .knobs-rd-swatch{flex:none;width:8px;height:2px;border-radius:1px}
|
|
11581
|
-
.knobs-rd .knobs-rd-name{color:var(--
|
|
11694
|
+
.knobs-rd .knobs-rd-name{color:var(--_k-fg-2)}
|
|
11582
11695
|
.knobs-rd .knobs-rd-key>.knobs-rd-value{margin-left:2px}
|
|
11583
11696
|
.knobs-rd .knobs-rd-plotbox{position:relative;outline:none;margin-bottom:6px}
|
|
11584
11697
|
.knobs-rd .knobs-rd-plotbox>.knobs-rd-plot{position:absolute;inset:0;width:100%;height:100%;min-width:0}
|
|
11585
|
-
.knobs-rd .knobs-rd-tick,.knobs-rd .knobs-rd-mark{position:absolute;color:var(--
|
|
11698
|
+
.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}
|
|
11586
11699
|
.knobs-rd .knobs-rd-tick{left:0}
|
|
11587
11700
|
.knobs-rd .knobs-rd-tick[data-at="top"]{top:-2px}
|
|
11588
11701
|
.knobs-rd .knobs-rd-tick[data-at="bottom"]{bottom:0}
|
|
@@ -11591,36 +11704,36 @@ var readoutCss = `
|
|
|
11591
11704
|
|
|
11592
11705
|
.knobs-rd .knobs-rd-grid{display:grid;column-gap:14px;align-items:center;outline:none;margin-bottom:4px}
|
|
11593
11706
|
.knobs-rd .knobs-rd-tr{display:contents}
|
|
11594
|
-
.knobs-rd .knobs-rd-tr>*{height:calc(var(--
|
|
11595
|
-
.knobs-rd .knobs-rd-thead>*{height:var(--
|
|
11596
|
-
.knobs-rd .knobs-rd-th{color:var(--
|
|
11597
|
-
.knobs-rd .knobs-rd-td{color:var(--
|
|
11598
|
-
.knobs-rd .knobs-rd-td:first-child{color:var(--
|
|
11707
|
+
.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}
|
|
11708
|
+
.knobs-rd .knobs-rd-thead>*{height:var(--_k-row);line-height:var(--_k-row)}
|
|
11709
|
+
.knobs-rd .knobs-rd-th{color:var(--_k-fg-3);text-align:right}
|
|
11710
|
+
.knobs-rd .knobs-rd-td{color:var(--_k-fg)}
|
|
11711
|
+
.knobs-rd .knobs-rd-td:first-child{color:var(--_k-fg-2)}
|
|
11599
11712
|
.knobs-rd .knobs-rd-td[data-num]{text-align:right}
|
|
11600
11713
|
|
|
11601
11714
|
.knobs-rd.knobs-rd-log{--rd-lh:18px}
|
|
11602
11715
|
.knobs-rd .knobs-rd-chips{display:inline-flex;align-items:center;gap:2px;margin-right:auto}
|
|
11603
|
-
.knobs-ui .knobs-rd-chip,.knobs-ui .knobs-rd-copy{height:calc(var(--
|
|
11604
|
-
.knobs-ui .knobs-rd-chip:hover,.knobs-ui .knobs-rd-copy:hover{background:var(--
|
|
11605
|
-
.knobs-ui .knobs-rd-chip[aria-checked="true"]{background:var(--
|
|
11606
|
-
.knobs-ui .knobs-rd-find{width:84px;height:calc(var(--
|
|
11607
|
-
background:color-mix(in srgb,var(--
|
|
11608
|
-
.knobs-rd .knobs-rd-find::placeholder{color:var(--
|
|
11716
|
+
.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}
|
|
11717
|
+
.knobs-ui .knobs-rd-chip:hover,.knobs-ui .knobs-rd-copy:hover{background:var(--_ku-wash);color:var(--_k-fg)}
|
|
11718
|
+
.knobs-ui .knobs-rd-chip[aria-checked="true"]{background:var(--_ku-wash-hi);color:var(--_k-fg)}
|
|
11719
|
+
.knobs-ui .knobs-rd-find{width:84px;height:calc(var(--_k-control-h) - 2px);padding:0 7px;border-radius:min(var(--_k-radius),5px);
|
|
11720
|
+
background:color-mix(in srgb,var(--_k-fill-selected) 60%,transparent);color:var(--_k-fg);caret-color:var(--_k-accent)}
|
|
11721
|
+
.knobs-rd .knobs-rd-find::placeholder{color:var(--_k-fg-3)}
|
|
11609
11722
|
.knobs-rd .knobs-rd-find::-webkit-search-cancel-button{display:none}
|
|
11610
11723
|
.knobs-rd .knobs-rd-logbody{position:relative;margin-bottom:6px}
|
|
11611
11724
|
.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;
|
|
11612
|
-
background:color-mix(in srgb,var(--
|
|
11725
|
+
background:color-mix(in srgb,var(--_k-fill-selected) 45%,transparent);border-radius:min(var(--_k-radius),6px);scrollbar-width:thin;overscroll-behavior:contain}
|
|
11613
11726
|
.knobs-rd .knobs-rd-space{position:relative;width:100%}
|
|
11614
11727
|
.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}
|
|
11615
11728
|
.knobs-rd .knobs-rd-line[hidden]{display:none}
|
|
11616
|
-
.knobs-rd .knobs-rd-time{flex:none;color:var(--
|
|
11617
|
-
.knobs-rd .knobs-rd-text{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--
|
|
11618
|
-
.knobs-rd .knobs-rd-line[data-level="warn"]>.knobs-rd-text{color:var(--
|
|
11619
|
-
.knobs-rd .knobs-rd-line[data-level="error"]>.knobs-rd-text{color:var(--
|
|
11620
|
-
.knobs-rd .knobs-rd-line[data-level="debug"]>.knobs-rd-text{color:var(--
|
|
11621
|
-
.knobs-ui .knobs-rd-match{color:var(--
|
|
11622
|
-
.knobs-ui .knobs-rd-jump{position:absolute;left:50%;bottom:6px;height:20px;padding:0 10px;border-radius:calc(var(--
|
|
11623
|
-
background:var(--
|
|
11729
|
+
.knobs-rd .knobs-rd-time{flex:none;color:var(--_k-fg-3)}
|
|
11730
|
+
.knobs-rd .knobs-rd-text{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--_k-fg)}
|
|
11731
|
+
.knobs-rd .knobs-rd-line[data-level="warn"]>.knobs-rd-text{color:var(--_k-warn)}
|
|
11732
|
+
.knobs-rd .knobs-rd-line[data-level="error"]>.knobs-rd-text{color:var(--_k-danger)}
|
|
11733
|
+
.knobs-rd .knobs-rd-line[data-level="debug"]>.knobs-rd-text{color:var(--_k-fg-3)}
|
|
11734
|
+
.knobs-ui .knobs-rd-match{color:var(--_k-accent)}
|
|
11735
|
+
.knobs-ui .knobs-rd-jump{position:absolute;left:50%;bottom:6px;height:20px;padding:0 10px;border-radius:calc(var(--_k-radius) * 999);
|
|
11736
|
+
background:var(--_k-accent);color:var(--_k-bg);opacity:0;transform:translate(-50%,6px);cursor:pointer;white-space:nowrap}
|
|
11624
11737
|
|
|
11625
11738
|
/* Under the GPU overlay the readouts' DOM stays for focus, hit-testing and screen readers; the
|
|
11626
11739
|
overlay draws them. Their filter field sits above it. */
|
|
@@ -11629,89 +11742,45 @@ var readoutCss = `
|
|
|
11629
11742
|
.knobs-panel[data-gpu-active="true"] .knobs-rd-find{position:relative;z-index:2147480003}
|
|
11630
11743
|
@media(prefers-reduced-motion:reduce){.knobs-rd :where(*){transition:none!important}}
|
|
11631
11744
|
`;
|
|
11632
|
-
|
|
11633
11745
|
// src/ui/look.ts
|
|
11634
|
-
var
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
font: 'system-ui,-apple-system,"SF Pro Text",sans-serif',
|
|
11645
|
-
mono: '"SF Mono",SFMono-Regular,ui-monospace,Menlo,monospace',
|
|
11646
|
-
"font-size": "12px",
|
|
11647
|
-
"font-weight": "400",
|
|
11648
|
-
"label-weight": "500",
|
|
11649
|
-
"title-weight": "600",
|
|
11650
|
-
row: "32px",
|
|
11651
|
-
inset: "10px",
|
|
11652
|
-
radius: "8px",
|
|
11653
|
-
"hover-in": "150",
|
|
11654
|
-
"hover-out": "150",
|
|
11655
|
-
warn: "#ff9f0a",
|
|
11656
|
-
critical: "#ff453a",
|
|
11657
|
-
rim: "rgba(255,255,255,.09)",
|
|
11658
|
-
page: "#101012",
|
|
11659
|
-
"seg-bg": "rgba(0,0,0,.26)",
|
|
11660
|
-
shadow: "0 12px 36px rgba(0,0,0,.52),0 1px 2px rgba(0,0,0,.3)"
|
|
11661
|
-
}, LIGHT = {
|
|
11662
|
-
bg: "#f5f5f7",
|
|
11663
|
-
surface: "rgba(0,0,0,.05)",
|
|
11664
|
-
"surface-hi": "rgba(0,0,0,.095)",
|
|
11665
|
-
line: "rgba(0,0,0,.1)",
|
|
11666
|
-
"line-hi": "rgba(0,0,0,.2)",
|
|
11667
|
-
text: "rgba(0,0,0,.88)",
|
|
11668
|
-
label: "rgba(60,60,67,.68)",
|
|
11669
|
-
dim: "rgba(60,60,67,.5)",
|
|
11670
|
-
accent: "#1c1c1e",
|
|
11671
|
-
warn: "#c56a00",
|
|
11672
|
-
critical: "#e0352b",
|
|
11673
|
-
rim: "rgba(255,255,255,.75)",
|
|
11674
|
-
page: "#e6e6eb",
|
|
11675
|
-
"seg-bg": "rgba(0,0,0,.065)",
|
|
11676
|
-
shadow: "0 10px 32px rgba(0,0,0,.14),0 1px 3px rgba(0,0,0,.08)"
|
|
11677
|
-
}, lightBlock = `${Object.entries(LIGHT).map(([k, v]) => `--k-${k}:${v}`).join(";")};color-scheme:light`, css = `
|
|
11678
|
-
:where(.knobs-ui){${Object.entries(TOKENS2).map(([k, v]) => `--ku-${k}:var(--k-${k},${v})`).join(";")};
|
|
11679
|
-
--ku-control-h:var(--k-control-h,calc(var(--ku-row) - 8px));
|
|
11680
|
-
--ku-value-font:var(--k-value-font,var(--ku-font));
|
|
11681
|
-
--ku-value-size:var(--kc-value-size,calc(var(--ku-font-size) - .5px));
|
|
11682
|
-
--ku-text-meta:var(--k-text-meta,calc(var(--ku-font-size) - 1px));
|
|
11683
|
-
--ku-hit:var(--k-ui-hit,9px);
|
|
11684
|
-
--ku-rail:var(--k-ui-rail,var(--ku-row));
|
|
11685
|
-
--ku-indent:var(--k-ui-indent,14px);
|
|
11686
|
-
--ku-select:var(--k-ui-select,color-mix(in srgb,var(--ku-accent) 13%,transparent));
|
|
11687
|
-
--ku-select-focus:var(--k-ui-select-focus,color-mix(in srgb,var(--ku-accent) 19%,transparent));
|
|
11688
|
-
--ku-wash:var(--k-ui-wash,color-mix(in srgb,var(--ku-surface) 70%,transparent));
|
|
11689
|
-
--ku-wash-hi:var(--k-ui-wash-hi,var(--ku-surface-hi));
|
|
11690
|
-
--ku-ease:${ease.easing};--ku-ease-ms:${ease.ms}ms;
|
|
11746
|
+
var css = `
|
|
11747
|
+
:where(.knobs-ui){
|
|
11748
|
+
--_ku-hit:var(--k-ui-hit,9px);
|
|
11749
|
+
--_ku-rail:var(--k-ui-rail,var(--_k-row));
|
|
11750
|
+
--_ku-indent:var(--k-ui-indent,14px);
|
|
11751
|
+
--_ku-select:var(--k-ui-select,var(--k-selection,color-mix(in srgb,var(--_k-accent) 13%,transparent)));
|
|
11752
|
+
--_ku-select-focus:var(--k-ui-select-focus,color-mix(in srgb,var(--_k-accent) 19%,transparent));
|
|
11753
|
+
--_ku-wash:var(--k-ui-wash,color-mix(in srgb,var(--_k-fill) 70%,transparent));
|
|
11754
|
+
--_ku-wash-hi:var(--k-ui-wash-hi,var(--_k-fill-selected));
|
|
11755
|
+
--_ku-ease:var(--_k-motion-snappy);--_ku-ease-ms:calc(var(--_k-motion-snappy-ms) * 1ms);
|
|
11691
11756
|
/* The card frame (knobs' own look): every leaf pane a rounded card on the page, half a gap
|
|
11692
11757
|
inside its slot, so panes sit a gap apart with the dividers' grips between them; tree rows
|
|
11693
11758
|
inset as soft rounded washes. --k-frame: flat (labPreset) puts panes edge to edge on
|
|
11694
11759
|
hairlines, square, as a dense editor's columns. */
|
|
11695
|
-
--
|
|
11696
|
-
--
|
|
11697
|
-
--
|
|
11698
|
-
--
|
|
11699
|
-
--
|
|
11700
|
-
--
|
|
11701
|
-
--
|
|
11702
|
-
--
|
|
11703
|
-
--ku-row-radius:max(0px,calc(var(--ku-panel-radius) - var(--ku-row-x)));
|
|
11760
|
+
--_ku-gap:var(--k-ui-gap,6px);
|
|
11761
|
+
--_ku-pane-m:calc(var(--_ku-gap) / 2);
|
|
11762
|
+
--_ku-pane-bg:var(--_k-pane-bg);
|
|
11763
|
+
--_ku-pane-radius:var(--_k-radius-panel);
|
|
11764
|
+
--_ku-pane-ring:inset 0 0 0 1px var(--_k-border),inset 0 1px 0 var(--_k-rim);
|
|
11765
|
+
--_ku-divider:var(--k-ui-divider,var(--k-split-gutter,transparent));
|
|
11766
|
+
--_ku-row-x:var(--k-ui-row-x,6px);
|
|
11767
|
+
--_ku-row-radius:max(0px,calc(var(--_ku-pane-radius) - var(--_ku-row-x)));
|
|
11704
11768
|
}
|
|
11705
|
-
:where(.knobs-ui)[data-frame="flat"]{--
|
|
11706
|
-
--
|
|
11707
|
-
--
|
|
11708
|
-
:
|
|
11709
|
-
|
|
11710
|
-
|
|
11769
|
+
: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;
|
|
11770
|
+
--_ku-divider:var(--_k-split-gutter);--_ku-row-x:var(--k-ui-row-x,0px);--_ku-row-radius:0px;
|
|
11771
|
+
--_ku-select:var(--_k-selection);--_ku-select-focus:var(--k-ui-select-focus,color-mix(in srgb,var(--_k-accent) 34%,transparent))}
|
|
11772
|
+
/* One surface per thing: a piece on another surface draws no card of its own. Whatever draws a
|
|
11773
|
+
card (a walkthrough's step, a host's own) carries .knobs-surface, and a split's pane that's a
|
|
11774
|
+
card (not only a slot for another split) counts as one; any piece inside it, or one
|
|
11775
|
+
marked data-nested, loses its fill and ring and parts its own panes on hairlines as the flat
|
|
11776
|
+
frame does, so cards never stack two or three borders deep. Pieces draw their card from
|
|
11777
|
+
--_ku-pane-bg and --_ku-pane-ring so this reaches them. */
|
|
11778
|
+
: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;
|
|
11779
|
+
--_ku-divider:var(--_k-split-gutter);--_kd-bg:transparent}
|
|
11711
11780
|
/* Only the pieces' own elements take their type and resets: what you put in a pane is yours. */
|
|
11712
11781
|
.knobs-ui{box-sizing:border-box}
|
|
11713
11782
|
: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}
|
|
11714
|
-
:is(.knobs-tree,.knobs-pane-head,.knobs-pane-rail,.knobs-tree-ghost){font:var(--
|
|
11783
|
+
: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;
|
|
11715
11784
|
letter-spacing:normal;word-spacing:normal;text-transform:none;text-indent:0;text-shadow:none;font-style:normal;-webkit-font-smoothing:antialiased}
|
|
11716
11785
|
/* A host's element rules (button{padding}, header{margin}, mark{background}) stop at these, as
|
|
11717
11786
|
they do at panels; (0,1,0), so the pieces' own rules after it win. */
|
|
@@ -11749,17 +11818,17 @@ var ease = springEasing(26, 1), TOKENS2 = {
|
|
|
11749
11818
|
:is(.knobs-tree,.knobs-activity)::-webkit-scrollbar{display:none}
|
|
11750
11819
|
.knobs-scrollbar{position:sticky;top:0;z-index:3;height:0;pointer-events:none}
|
|
11751
11820
|
.knobs-scrollbar[hidden]{display:none}
|
|
11752
|
-
.knobs-scrollbar-thumb{position:absolute;top:0;right:2px;width:5px;border-radius:3px;background:color-mix(in srgb,var(--
|
|
11821
|
+
.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;
|
|
11753
11822
|
transition:opacity .3s ease-out,background .15s}
|
|
11754
11823
|
: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}
|
|
11755
|
-
.knobs-scrollbar-thumb:hover,.knobs-scrollbar[data-dragging]>.knobs-scrollbar-thumb{background:color-mix(in srgb,var(--
|
|
11824
|
+
.knobs-scrollbar-thumb:hover,.knobs-scrollbar[data-dragging]>.knobs-scrollbar-thumb{background:color-mix(in srgb,var(--_k-fg) 48%,transparent)}
|
|
11756
11825
|
|
|
11757
11826
|
/* Split: panes along a row or column, hairline dividers with a wider grip. */
|
|
11758
11827
|
.knobs-split{position:relative;display:flex;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden}
|
|
11759
11828
|
.knobs-split[data-direction="column"]{flex-direction:column}
|
|
11760
11829
|
.knobs-pane{position:relative;flex:none;min-width:0;min-height:0;overflow:hidden}
|
|
11761
|
-
.knobs-pane-clip{position:absolute;inset:0;margin:var(--
|
|
11762
|
-
.knobs-pane-clip::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:var(--
|
|
11830
|
+
.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)}
|
|
11831
|
+
.knobs-pane-clip::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:var(--_ku-pane-ring);pointer-events:none}
|
|
11763
11832
|
/* A pane holding another split is only its slot: the split's own panes are the cards. */
|
|
11764
11833
|
.knobs-pane[data-nested]>.knobs-pane-clip{margin:0;background:transparent}
|
|
11765
11834
|
.knobs-pane[data-nested]>.knobs-pane-clip::after{content:none}
|
|
@@ -11767,36 +11836,36 @@ var ease = springEasing(26, 1), TOKENS2 = {
|
|
|
11767
11836
|
.knobs-pane-body{position:relative;flex:1;min-width:0;min-height:0;overflow:hidden}
|
|
11768
11837
|
.knobs-pane[data-scroll] .knobs-pane-body{overflow:auto;scrollbar-width:thin}
|
|
11769
11838
|
.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}
|
|
11770
|
-
.knobs-ui .knobs-pane-head{display:flex;align-items:center;gap:6px;flex:none;height:var(--
|
|
11771
|
-
.knobs-pane-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--
|
|
11772
|
-
.knobs-pane-count{flex:none;color:var(--
|
|
11839
|
+
.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}
|
|
11840
|
+
.knobs-pane-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--_k-weight-title);color:var(--_k-fg)}
|
|
11841
|
+
.knobs-pane-count{flex:none;color:var(--_k-fg-3);font-variant-numeric:tabular-nums}
|
|
11773
11842
|
.knobs-pane-fill{flex:1}
|
|
11774
|
-
.knobs-ui .knobs-pane-btn{flex:none;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:calc(var(--
|
|
11843
|
+
.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;
|
|
11775
11844
|
transition:background var(--hover-t,.15s),color .15s}
|
|
11776
|
-
.knobs-ui .knobs-pane-btn:is(:hover,:focus-visible){background:var(--
|
|
11777
|
-
.knobs-ui .knobs-pane-btn[aria-pressed="true"]{color:var(--
|
|
11845
|
+
.knobs-ui .knobs-pane-btn:is(:hover,:focus-visible){background:var(--_ku-wash-hi);color:var(--_k-fg)}
|
|
11846
|
+
.knobs-ui .knobs-pane-btn[aria-pressed="true"]{color:var(--_k-accent)}
|
|
11778
11847
|
.knobs-pane-btn svg{width:13px;height:13px}
|
|
11779
11848
|
.knobs-pane-head[data-toggles]{cursor:pointer}
|
|
11780
11849
|
/* A collapsed pane's rail: its title along the edge; a click opens it. It holds on to the edge the
|
|
11781
11850
|
pane folds toward, as wide as the rail, over the card (which folds to its size): only its label
|
|
11782
11851
|
and chevron draw, and a nested split's slot, which has no card, gives it one of its own. */
|
|
11783
|
-
.knobs-ui .knobs-pane-rail{position:absolute;margin:var(--
|
|
11784
|
-
font-weight:var(--
|
|
11785
|
-
.knobs-ui .knobs-pane[data-nested]>.knobs-pane-rail{background-color:var(--
|
|
11786
|
-
.knobs-split[data-direction="row"]>.knobs-pane>.knobs-pane-rail{top:0;bottom:0;width:var(--
|
|
11852
|
+
.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;
|
|
11853
|
+
font-weight:var(--_k-weight-title);transition:background .15s,color .15s}
|
|
11854
|
+
.knobs-ui .knobs-pane[data-nested]>.knobs-pane-rail{background-color:var(--_ku-pane-bg);box-shadow:var(--_ku-pane-ring)}
|
|
11855
|
+
.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}
|
|
11787
11856
|
.knobs-split[data-direction="row"]>.knobs-pane[data-edge="start"]>.knobs-pane-rail{right:0}
|
|
11788
11857
|
.knobs-split[data-direction="row"]>.knobs-pane[data-edge="end"]>.knobs-pane-rail{left:0}
|
|
11789
|
-
.knobs-split[data-direction="column"]>.knobs-pane>.knobs-pane-rail{left:0;right:0;height:var(--
|
|
11858
|
+
.knobs-split[data-direction="column"]>.knobs-pane>.knobs-pane-rail{left:0;right:0;height:var(--_ku-rail);padding:0 var(--_k-inset)}
|
|
11790
11859
|
.knobs-split[data-direction="column"]>.knobs-pane[data-edge="start"]>.knobs-pane-rail{bottom:0}
|
|
11791
11860
|
.knobs-split[data-direction="column"]>.knobs-pane[data-edge="end"]>.knobs-pane-rail{top:0}
|
|
11792
11861
|
.knobs-pane[data-collapsed]>.knobs-pane-rail{pointer-events:auto}
|
|
11793
11862
|
/* Its hover wash fades, rather than going in one frame as a click opens the pane. */
|
|
11794
|
-
.knobs-ui .knobs-pane-rail::before{content:"";position:absolute;inset:0;border-radius:inherit;background:var(--
|
|
11863
|
+
.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}
|
|
11795
11864
|
.knobs-pane-rail>*{position:relative}
|
|
11796
|
-
.knobs-ui .knobs-pane[data-collapsed]>.knobs-pane-rail:is(:hover,:focus-visible){color:var(--
|
|
11865
|
+
.knobs-ui .knobs-pane[data-collapsed]>.knobs-pane-rail:is(:hover,:focus-visible){color:var(--_k-fg)}
|
|
11797
11866
|
.knobs-ui .knobs-pane[data-collapsed]>.knobs-pane-rail:is(:hover,:focus-visible)::before{opacity:1}
|
|
11798
11867
|
.knobs-pane-rail-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
11799
|
-
.knobs-pane-chevron{display:flex;flex:none;width:11px;height:11px;writing-mode:horizontal-tb;color:var(--
|
|
11868
|
+
.knobs-pane-chevron{display:flex;flex:none;width:11px;height:11px;writing-mode:horizontal-tb;color:var(--_k-fg-3)}
|
|
11800
11869
|
.knobs-pane-turn{display:flex;width:100%;height:100%;transform-origin:50% 50%}
|
|
11801
11870
|
.knobs-pane-rail svg{width:11px;height:11px}
|
|
11802
11871
|
/* The rail's chevron stands in for the header's collapse icon (it turns into the rail's), so the
|
|
@@ -11804,26 +11873,26 @@ var ease = springEasing(26, 1), TOKENS2 = {
|
|
|
11804
11873
|
.knobs-pane[data-morph]>.knobs-pane-clip>.knobs-pane-inner>.knobs-pane-head>.knobs-pane-collapse>svg{visibility:hidden}
|
|
11805
11874
|
/* So does the rail's label for the title, when it travels (split's fold: { title: "travel" }). */
|
|
11806
11875
|
.knobs-pane[data-travel]>.knobs-pane-clip>.knobs-pane-inner>.knobs-pane-head>.knobs-pane-title{visibility:hidden}
|
|
11807
|
-
.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(--
|
|
11876
|
+
.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)}
|
|
11808
11877
|
.knobs-pane[data-morph]:not([data-collapsed])>.knobs-pane-rail .knobs-pane-chevron{transition:color .15s}
|
|
11809
11878
|
|
|
11810
|
-
.knobs-divider{position:relative;z-index:2;flex:none;width:1px;background:var(--
|
|
11879
|
+
.knobs-divider{position:relative;z-index:2;flex:none;width:1px;background:var(--_ku-divider);touch-action:none;outline:none}
|
|
11811
11880
|
.knobs-split[data-direction="column"]>.knobs-divider{width:auto;height:1px}
|
|
11812
|
-
.knobs-divider::before{content:"";position:absolute;top:0;bottom:0;left:calc(50% - var(--
|
|
11813
|
-
.knobs-split[data-direction="column"]>.knobs-divider::before{left:0;right:0;top:calc(50% - var(--
|
|
11881
|
+
.knobs-divider::before{content:"";position:absolute;top:0;bottom:0;left:calc(50% - var(--_ku-hit) / 2);width:var(--_ku-hit);cursor:col-resize}
|
|
11882
|
+
.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}
|
|
11814
11883
|
/* Hover, focus and drags draw the hairline in the accent, with a soft wash beside it. */
|
|
11815
|
-
.knobs-divider::after{content:"";position:absolute;inset:0 -1px;background:var(--
|
|
11816
|
-
box-shadow:0 0 0 2px color-mix(in srgb,var(--
|
|
11884
|
+
.knobs-divider::after{content:"";position:absolute;inset:0 -1px;background:var(--_k-accent);opacity:0;pointer-events:none;
|
|
11885
|
+
box-shadow:0 0 0 2px color-mix(in srgb,var(--_k-accent) 18%,transparent);transition:opacity .16s}
|
|
11817
11886
|
.knobs-split[data-direction="column"]>.knobs-divider::after{inset:-1px 0}
|
|
11818
11887
|
.knobs-divider:hover::after{opacity:.7;transition-delay:.12s}
|
|
11819
11888
|
.knobs-divider:focus-visible::after,.knobs-divider[data-active]::after{opacity:1;transition-delay:0s}
|
|
11820
11889
|
/* Between cards, the hairline gives way to a grip: a small capsule in the gap that shows on
|
|
11821
11890
|
hover, and lengthens and takes the accent while dragged or focused. */
|
|
11822
|
-
.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(--
|
|
11823
|
-
transition:opacity .16s,background .16s,scale var(--
|
|
11891
|
+
.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;
|
|
11892
|
+
transition:opacity .16s,background .16s,scale var(--_ku-ease-ms) var(--_ku-ease)}
|
|
11824
11893
|
.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}
|
|
11825
11894
|
.knobs-split:not([data-frame="flat"])>.knobs-divider:hover::after{opacity:1}
|
|
11826
|
-
.knobs-split:not([data-frame="flat"])>.knobs-divider:is(:focus-visible,[data-active])::after{background:var(--
|
|
11895
|
+
.knobs-split:not([data-frame="flat"])>.knobs-divider:is(:focus-visible,[data-active])::after{background:var(--_k-accent);opacity:.9;scale:1 1.45}
|
|
11827
11896
|
.knobs-split[data-direction="column"]:not([data-frame="flat"])>.knobs-divider:is(:focus-visible,[data-active])::after{scale:1.45 1}
|
|
11828
11897
|
:root[data-knobs-resizing],:root[data-knobs-resizing] *{user-select:none!important;-webkit-user-select:none!important}
|
|
11829
11898
|
:root[data-knobs-resizing="row"] *{cursor:col-resize!important}
|
|
@@ -11833,129 +11902,120 @@ var ease = springEasing(26, 1), TOKENS2 = {
|
|
|
11833
11902
|
/* Tree: one scroller, rows placed by transform, only those near the view in the DOM. */
|
|
11834
11903
|
.knobs-tree{position:relative;overflow:auto;height:100%;outline:none;scrollbar-width:none;overscroll-behavior:contain;user-select:none;-webkit-user-select:none}
|
|
11835
11904
|
.knobs-tree-space{position:relative;width:100%;pointer-events:none}
|
|
11836
|
-
.knobs-tree-row{position:absolute;left:var(--
|
|
11837
|
-
color:var(--
|
|
11838
|
-
.knobs-tree-row::before{content:"";position:absolute;inset:0;border-radius:var(--
|
|
11839
|
-
.knobs-tree:not([data-keyboard]):not([data-dragging]) .knobs-tree-row:hover::before{opacity:1;transition-duration:calc(var(--
|
|
11840
|
-
.knobs-tree-row[aria-selected="true"]::before{opacity:1;background:var(--
|
|
11841
|
-
.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(--
|
|
11842
|
-
.knobs-tree:focus .knobs-tree-row[data-active][aria-selected="true"]::before{background:var(--
|
|
11843
|
-
.knobs-tree-row[data-drop="into"]::before{opacity:1;background:color-mix(in srgb,var(--
|
|
11905
|
+
.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);
|
|
11906
|
+
color:var(--_k-fg);white-space:nowrap;cursor:default;will-change:transform;contain:layout style}
|
|
11907
|
+
.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}
|
|
11908
|
+
.knobs-tree:not([data-keyboard]):not([data-dragging]) .knobs-tree-row:hover::before{opacity:1;transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11909
|
+
.knobs-tree-row[aria-selected="true"]::before{opacity:1;background:var(--_ku-select)}
|
|
11910
|
+
.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)}
|
|
11911
|
+
.knobs-tree:focus .knobs-tree-row[data-active][aria-selected="true"]::before{background:var(--_ku-select-focus)}
|
|
11912
|
+
.knobs-tree-row[data-drop="into"]::before{opacity:1;background:color-mix(in srgb,var(--_k-accent) 30%,transparent)}
|
|
11844
11913
|
.knobs-tree-row[data-dragged]{opacity:.38}
|
|
11914
|
+
/* glide: one highlight under the selected row that glides between rows (the row's own stays off). */
|
|
11915
|
+
.knobs-tree-cursor{position:absolute;left:var(--_ku-row-x);right:var(--_ku-row-x);top:0;height:var(--_k-row);border-radius:var(--_ku-row-radius);background:var(--_ku-select);
|
|
11916
|
+
opacity:0;pointer-events:none;will-change:transform;transition:opacity .15s ease-out,background .12s}
|
|
11917
|
+
.knobs-tree-cursor[data-on]{opacity:1}
|
|
11918
|
+
.knobs-tree:focus .knobs-tree-cursor{background:var(--_ku-select-focus)}
|
|
11919
|
+
.knobs-tree[data-glide] .knobs-tree-row[aria-selected="true"]::before{opacity:0!important}
|
|
11845
11920
|
.knobs-tree-row>*{position:relative}
|
|
11846
|
-
.knobs-tree-caret{flex:none;display:flex;align-items:center;justify-content:center;width:16px;height:100%;color:var(--
|
|
11921
|
+
.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)}
|
|
11847
11922
|
.knobs-tree-caret svg{width:9px;height:9px}
|
|
11848
11923
|
.knobs-tree-row[aria-expanded="true"]>.knobs-tree-caret{transform:rotate(90deg)}
|
|
11849
11924
|
.knobs-tree-row:not([aria-expanded])>.knobs-tree-caret{visibility:hidden}
|
|
11850
|
-
.knobs-tree-icon{flex:none;display:flex;align-items:center;justify-content:center;width:14px;margin-right:6px;color:var(--
|
|
11851
|
-
.knobs-tree-label{position:relative;flex:1;min-width:0;overflow:hidden;font-weight:var(--
|
|
11852
|
-
.knobs-tree-row[data-ancestor] .knobs-tree-label{color:var(--
|
|
11853
|
-
.knobs-tree-label .knobs-tree-mark{color:var(--
|
|
11925
|
+
.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)}
|
|
11926
|
+
.knobs-tree-label{position:relative;flex:1;min-width:0;overflow:hidden;font-weight:var(--_k-weight)}
|
|
11927
|
+
.knobs-tree-row[data-ancestor] .knobs-tree-label{color:var(--_k-fg-2)}
|
|
11928
|
+
.knobs-tree-label .knobs-tree-mark{color:var(--_k-accent)}
|
|
11854
11929
|
.knobs-tree-row[data-off~="visible"] :is(.knobs-tree-label,.knobs-tree-icon){opacity:.45}
|
|
11855
|
-
.knobs-tree-row[data-off~="locked"] .knobs-tree-label{color:var(--
|
|
11856
|
-
.knobs-tree-detail{flex:none;margin-left:6px;color:var(--
|
|
11930
|
+
.knobs-tree-row[data-off~="locked"] .knobs-tree-label{color:var(--_k-fg-2)}
|
|
11931
|
+
.knobs-tree-detail{flex:none;margin-left:6px;color:var(--_k-fg-3);font-variant-numeric:tabular-nums}
|
|
11857
11932
|
.knobs-tree-tools{flex:none;display:flex;align-items:center;gap:1px;margin-left:4px}
|
|
11858
|
-
.knobs-ui .knobs-tree-toggle{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:calc(var(--
|
|
11933
|
+
.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}
|
|
11859
11934
|
.knobs-ui .knobs-tree-toggle svg{width:12px;height:12px}
|
|
11860
11935
|
.knobs-tree-row:is(:hover,[data-active],[aria-selected="true"]) .knobs-tree-toggle,.knobs-ui .knobs-tree-toggle[aria-pressed="false"]{opacity:1}
|
|
11861
|
-
.knobs-ui .knobs-tree-toggle:hover{background:var(--
|
|
11862
|
-
.knobs-ui .knobs-tree-toggle[aria-pressed="false"]{color:var(--
|
|
11936
|
+
.knobs-ui .knobs-tree-toggle:hover{background:var(--_ku-wash-hi);color:var(--_k-fg)}
|
|
11937
|
+
.knobs-ui .knobs-tree-toggle[aria-pressed="false"]{color:var(--_k-fg-2)}
|
|
11863
11938
|
/* Renaming in place, as a number is edited in a panel: no box, just the text and an underline. */
|
|
11864
|
-
.knobs-ui .knobs-tree-edit{position:absolute;inset:auto 0 auto 0;top:50%;transform:translateY(-50%);width:100%;height:calc(var(--
|
|
11865
|
-
background:transparent;color:var(--
|
|
11866
|
-
.knobs-tree-edit::selection{background:color-mix(in srgb,var(--
|
|
11939
|
+
.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;
|
|
11940
|
+
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)}
|
|
11941
|
+
.knobs-tree-edit::selection{background:color-mix(in srgb,var(--_k-accent) 40%,transparent)}
|
|
11867
11942
|
.knobs-tree-row[data-editing] .knobs-tree-text{visibility:hidden}
|
|
11868
|
-
.knobs-tree-line{position:absolute;left:0;right:6px;top:0;height:2px;margin-top:-1px;border-radius:1px;background:var(--
|
|
11869
|
-
.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(--
|
|
11943
|
+
.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}
|
|
11944
|
+
.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)}
|
|
11870
11945
|
.knobs-tree[data-dragging] .knobs-tree-line[data-shown]{opacity:1}
|
|
11871
|
-
.knobs-tree-ghost{position:fixed;left:0;top:0;z-index:2147480004;padding:2px 8px;background:var(--
|
|
11872
|
-
box-shadow:0 0 0 1px var(--
|
|
11873
|
-
.knobs-tree-empty{padding:10px var(--
|
|
11946
|
+
.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);
|
|
11947
|
+
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)}
|
|
11948
|
+
.knobs-tree-empty{padding:10px var(--_k-inset);color:var(--_k-fg-3)}
|
|
11874
11949
|
|
|
11875
11950
|
/* Timeline: a transport (play, the time) beside a track: the ruler's canvas over a lane of
|
|
11876
11951
|
markers, ranges as soft bands, and the playhead, a hairline in the accent with a cap. */
|
|
11877
11952
|
:where(.knobs-timeline,.knobs-timeline *){box-sizing:border-box}
|
|
11878
|
-
.knobs-ui.knobs-timeline{display:flex;align-items:stretch;gap:10px;width:100%;height:100%;min-height:52px;padding:6px var(--
|
|
11879
|
-
font:var(--
|
|
11953
|
+
.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;
|
|
11954
|
+
font:var(--_k-weight) var(--_k-font-size)/1.35 var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left}
|
|
11880
11955
|
: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}
|
|
11881
11956
|
.knobs-tl-transport{flex:none;display:flex;align-items:center;gap:8px;min-width:96px}
|
|
11882
|
-
.knobs-ui .knobs-tl-play{flex:none;display:inline-flex;align-items:center;justify-content:center;width:var(--
|
|
11883
|
-
background:var(--
|
|
11884
|
-
.knobs-ui .knobs-tl-play:hover{background:color-mix(in srgb,var(--
|
|
11957
|
+
.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);
|
|
11958
|
+
background:var(--_k-fill-selected);color:var(--_k-fg);cursor:pointer;transition:background .15s,transform .15s var(--_ku-ease)}
|
|
11959
|
+
.knobs-ui .knobs-tl-play:hover{background:color-mix(in srgb,var(--_k-fg) 16%,transparent)}
|
|
11885
11960
|
.knobs-ui .knobs-tl-play:active{transform:scale(.94)}
|
|
11886
11961
|
.knobs-tl-play svg{width:12px;height:12px}
|
|
11887
|
-
.knobs-timeline[data-playing] .knobs-tl-play{background:var(--
|
|
11962
|
+
.knobs-timeline[data-playing] .knobs-tl-play{background:var(--_k-accent);color:var(--_k-bg)}
|
|
11888
11963
|
.knobs-tl-time{display:flex;flex-direction:column;line-height:1.2;font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}
|
|
11889
|
-
.knobs-tl-now{font:var(--
|
|
11890
|
-
.knobs-tl-sub{font-size:var(--
|
|
11891
|
-
.knobs-tl-track{position:relative;flex:1;min-width:0;overflow:hidden;border-radius:var(--
|
|
11892
|
-
transition:background calc(var(--
|
|
11893
|
-
.knobs-timeline:focus-visible .knobs-tl-track,.knobs-timeline[data-keyboard]:focus .knobs-tl-track{background:color-mix(in srgb,var(--
|
|
11964
|
+
.knobs-tl-now{font:var(--_k-weight) var(--_k-value-size)/1.2 var(--_k-value-font);font-variant-numeric:tabular-nums;font-feature-settings:"tnum";color:var(--_k-fg);white-space:nowrap}
|
|
11965
|
+
.knobs-tl-sub{font-size:var(--_k-text-meta);color:var(--_k-fg-3);white-space:nowrap}
|
|
11966
|
+
.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;
|
|
11967
|
+
transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
11968
|
+
.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)}
|
|
11894
11969
|
.knobs-tl-ruler{position:absolute;left:0;top:0;height:22px;pointer-events:none}
|
|
11895
11970
|
.knobs-tl-lane{position:absolute;left:0;right:0;top:22px;bottom:0;pointer-events:none}
|
|
11896
11971
|
/* Ranges: a soft band through the lane, its edges handles; the loop range in the accent. */
|
|
11897
|
-
.knobs-tl-range{position:absolute;left:0;top:0;bottom:0;width:0;background:color-mix(in srgb,var(--
|
|
11898
|
-
.knobs-tl-range[data-loop]{background:color-mix(in srgb,var(--
|
|
11899
|
-
.knobs-tl-range[data-selected]{background:color-mix(in srgb,var(--
|
|
11972
|
+
.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}
|
|
11973
|
+
.knobs-tl-range[data-loop]{background:color-mix(in srgb,var(--_k-accent) 11%,transparent)}
|
|
11974
|
+
.knobs-tl-range[data-selected]{background:color-mix(in srgb,var(--_k-accent) 18%,transparent)}
|
|
11900
11975
|
.knobs-tl-edge{position:absolute;top:0;bottom:0;width:9px;cursor:ew-resize}
|
|
11901
11976
|
.knobs-tl-edge[data-edge="start"]{left:-4px}
|
|
11902
11977
|
.knobs-tl-edge[data-edge="end"]{right:-5px}
|
|
11903
|
-
.knobs-tl-edge::after{content:"";position:absolute;top:0;bottom:0;left:4px;width:1px;background:color-mix(in srgb,var(--
|
|
11904
|
-
.knobs-tl-edge:hover::after,.knobs-tl-range[data-selected] .knobs-tl-edge::after{background:var(--
|
|
11905
|
-
.knobs-tl-rlabel{position:absolute;left:5px;bottom:3px;padding:0 5px;border-radius:max(0px,calc(var(--
|
|
11978
|
+
.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}
|
|
11979
|
+
.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)}
|
|
11980
|
+
.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}
|
|
11906
11981
|
.knobs-tl-rlabel:empty{display:none}
|
|
11907
|
-
.knobs-tl-rlabel:hover{background:var(--
|
|
11982
|
+
.knobs-tl-rlabel:hover{background:var(--_ku-wash-hi);color:var(--_k-fg)}
|
|
11908
11983
|
/* Markers: a diamond on the ruler's edge and a label chip below it. */
|
|
11909
|
-
.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(--
|
|
11984
|
+
.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))}
|
|
11910
11985
|
.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)}
|
|
11911
11986
|
.knobs-tl-pin{position:absolute;top:13px;left:-5px;width:10px;height:10px;pointer-events:auto;cursor:grab}
|
|
11912
|
-
.knobs-tl-pin::after{content:"";position:absolute;inset:1.5px;border-radius:min(2px,var(--
|
|
11913
|
-
.knobs-tl-mlabel{position:absolute;top:26px;left:3px;max-width:140px;padding:0 6px;border-radius:max(0px,calc(var(--
|
|
11914
|
-
font-size:var(--
|
|
11915
|
-
.knobs-tl-marker[data-selected]{--knobs-tl-c:var(--
|
|
11916
|
-
.knobs-tl-marker[data-selected] .knobs-tl-mlabel{background:color-mix(in srgb,var(--
|
|
11987
|
+
.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)}
|
|
11988
|
+
.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);
|
|
11989
|
+
font-size:var(--_k-text-meta);line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:auto;cursor:grab;transition:background .15s,color .15s}
|
|
11990
|
+
.knobs-tl-marker[data-selected]{--knobs-tl-c:var(--_k-accent)}
|
|
11991
|
+
.knobs-tl-marker[data-selected] .knobs-tl-mlabel{background:color-mix(in srgb,var(--_k-accent) 24%,var(--_k-fill-selected))}
|
|
11917
11992
|
.knobs-tl-marker[data-selected] .knobs-tl-pin::after{scale:1.2}
|
|
11918
11993
|
.knobs-timeline[data-dragging] .knobs-tl-marker[data-selected] :is(.knobs-tl-pin,.knobs-tl-mlabel){cursor:grabbing}
|
|
11919
11994
|
.knobs-tl-marker[data-editing] .knobs-tl-mlabel{visibility:hidden}
|
|
11920
|
-
.knobs-ui .knobs-tl-edit{position:absolute;top:26px;left:3px;width:120px;height:17px;padding:0 6px;font-size:var(--
|
|
11921
|
-
background:var(--
|
|
11995
|
+
.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);
|
|
11996
|
+
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}
|
|
11922
11997
|
/* The playhead: an accent hairline with a rounded cap in the ruler; it glows a little while held
|
|
11923
11998
|
on a marker. */
|
|
11924
11999
|
.knobs-tl-head{position:absolute;left:0;top:0;bottom:0;width:0;will-change:transform;pointer-events:none}
|
|
11925
|
-
.knobs-tl-head::before{content:"";position:absolute;top:4px;bottom:0;left:-.75px;width:1.5px;background:var(--
|
|
11926
|
-
.knobs-tl-head::after{content:"";position:absolute;top:3px;left:-4.5px;width:9px;height:13px;border-radius:min(4.5px,var(--
|
|
11927
|
-
background:var(--
|
|
12000
|
+
.knobs-tl-head::before{content:"";position:absolute;top:4px;bottom:0;left:-.75px;width:1.5px;background:var(--_k-accent)}
|
|
12001
|
+
.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));
|
|
12002
|
+
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)}
|
|
11928
12003
|
.knobs-timeline[data-scrubbing] .knobs-tl-head::after{scale:1.12}
|
|
11929
|
-
.knobs-timeline[data-stuck] .knobs-tl-head::after{box-shadow:0 0 0 3px color-mix(in srgb,var(--
|
|
11930
|
-
.knobs-tl-hover{position:absolute;left:0;top:0;bottom:0;width:1px;margin-left:-.5px;background:var(--
|
|
12004
|
+
.knobs-timeline[data-stuck] .knobs-tl-head::after{box-shadow:0 0 0 3px color-mix(in srgb,var(--_k-accent) 26%,transparent)}
|
|
12005
|
+
.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}
|
|
11931
12006
|
.knobs-tl-track:hover .knobs-tl-hover{opacity:1}
|
|
11932
12007
|
.knobs-timeline[data-scrubbing] .knobs-tl-hover{opacity:0}
|
|
11933
12008
|
@media(prefers-reduced-motion:reduce){.knobs-timeline :where(*,::before,::after){transition:none!important}}
|
|
11934
12009
|
@media(prefers-reduced-motion:reduce){:is(.knobs-tree,.knobs-split>.knobs-divider,.knobs-pane-head,.knobs-pane-rail) :where(*,::before,::after){transition:none!important}}
|
|
11935
|
-
|
|
12010
|
+
`, uiCss = () => aliased(css + readoutCss + overlayCss + bentoCss + activityCss + pickerCss + compareCss) + rolling_css_default;
|
|
11936
12011
|
function injectUiStyles(doc) {
|
|
11937
|
-
if (doc.querySelector("style[data-knobs-ui]"))
|
|
12012
|
+
if (injectTokens(doc), doc.querySelector("style[data-knobs-ui]"))
|
|
11938
12013
|
return;
|
|
11939
12014
|
let style = doc.createElement("style");
|
|
11940
|
-
style.dataset.knobsUi = "", style.textContent =
|
|
11941
|
-
}
|
|
11942
|
-
function injectUiPreset(doc, preset) {
|
|
11943
|
-
let content = presetCss({ ...preset, css: void 0 }).replaceAll(".knobs-panel", ".knobs-ui"), existing = doc.querySelector(`style[data-knobs-ui-preset="${preset.name}"]`);
|
|
11944
|
-
if (existing) {
|
|
11945
|
-
if (existing.textContent !== content)
|
|
11946
|
-
existing.textContent = content;
|
|
11947
|
-
return;
|
|
11948
|
-
}
|
|
11949
|
-
let style = doc.createElement("style");
|
|
11950
|
-
style.dataset.knobsUiPreset = preset.name, style.textContent = content, doc.head.append(style);
|
|
12015
|
+
style.dataset.knobsUi = "", style.textContent = uiCss(), doc.head.append(style);
|
|
11951
12016
|
}
|
|
11952
|
-
function
|
|
11953
|
-
|
|
11954
|
-
if (injectUiStyles(doc), root.classList.add("knobs-ui"), look.preset)
|
|
11955
|
-
injectUiPreset(doc, look.preset), root.dataset.preset = look.preset.name;
|
|
11956
|
-
if (look.theme)
|
|
11957
|
-
root.dataset.theme = look.theme;
|
|
11958
|
-
syncFrame(root);
|
|
12017
|
+
function applyLook2(root, look) {
|
|
12018
|
+
injectUiStyles(root.ownerDocument), root.classList.add("knobs-root", "knobs-ui"), applyLook(root, resolveLook(look)), syncFrame(root);
|
|
11959
12019
|
}
|
|
11960
12020
|
function syncFrame(root) {
|
|
11961
12021
|
if (!root.isConnected)
|
|
@@ -11966,7 +12026,6 @@ function syncFrame(root) {
|
|
|
11966
12026
|
delete root.dataset.frame;
|
|
11967
12027
|
}
|
|
11968
12028
|
var lookDefaults = { current: {} };
|
|
11969
|
-
var reducedMotion4 = (win) => win?.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
|
|
11970
12029
|
function frameLoop(win, step) {
|
|
11971
12030
|
let raf = 0, last = 0, tick = (now) => {
|
|
11972
12031
|
let dt = last ? Math.min(0.064, (now - last) / 1000) : 0.016666666666666666;
|
|
@@ -11998,7 +12057,14 @@ var svg = (body, box = 16) => `<svg viewBox="0 0 ${box} ${box}" aria-hidden="tru
|
|
|
11998
12057
|
};
|
|
11999
12058
|
|
|
12000
12059
|
// src/ui/readout-model.ts
|
|
12001
|
-
var
|
|
12060
|
+
var SERIES_TOKENS = [
|
|
12061
|
+
"--_k-series-1",
|
|
12062
|
+
"--_k-series-2",
|
|
12063
|
+
"--_k-series-3",
|
|
12064
|
+
"--_k-series-4",
|
|
12065
|
+
"--_k-series-5",
|
|
12066
|
+
"--_k-series-6"
|
|
12067
|
+
], SERIES = ["#5ac8fa", "#ff9f0a", "#bf5af2", "#30d158", "#ff6482", "#64d2ff"];
|
|
12002
12068
|
function formatNumber(v, decimals) {
|
|
12003
12069
|
if (!Number.isFinite(v))
|
|
12004
12070
|
return "—";
|
|
@@ -12318,20 +12384,21 @@ function paletteOf(el, now = performance.now()) {
|
|
|
12318
12384
|
let hit = palettes.get(el);
|
|
12319
12385
|
if (hit && now - hit.at < 8)
|
|
12320
12386
|
return hit.p;
|
|
12321
|
-
let s = getComputedStyle(el), c = (name, fallback) =>
|
|
12322
|
-
accent: c("--
|
|
12323
|
-
text: c("--
|
|
12324
|
-
label: c("--
|
|
12325
|
-
dim: c("--
|
|
12326
|
-
line: c("--
|
|
12327
|
-
surfaceHi: c("--
|
|
12328
|
-
warn: c("--
|
|
12329
|
-
critical: c("--
|
|
12330
|
-
|
|
12387
|
+
let s = getComputedStyle(el), c = (name, fallback) => tokenColor(s, name, fallback), p = {
|
|
12388
|
+
accent: c("--kv-accent", [1, 1, 1, 1]),
|
|
12389
|
+
text: c("--kv-fg", [1, 1, 1, 0.92]),
|
|
12390
|
+
label: c("--kv-fg-2", [1, 1, 1, 0.64]),
|
|
12391
|
+
dim: c("--kv-fg-3", [1, 1, 1, 0.42]),
|
|
12392
|
+
line: c("--kv-border", [1, 1, 1, 0.1]),
|
|
12393
|
+
surfaceHi: c("--kv-fill-selected", [1, 1, 1, 0.11]),
|
|
12394
|
+
warn: c("--_k-warn", [0.96, 0.68, 0.2, 1]),
|
|
12395
|
+
critical: c("--_k-danger", [1, 0.37, 0.34, 1]),
|
|
12396
|
+
series: SERIES_TOKENS.map((name, i) => c(name, parseCssColor(SERIES[i % SERIES.length]))),
|
|
12397
|
+
radius: Number.parseFloat(s.getPropertyValue("--kv-radius")) || 0
|
|
12331
12398
|
};
|
|
12332
12399
|
return palettes.set(el, { at: now, p }), p;
|
|
12333
12400
|
}
|
|
12334
|
-
var reduced2 = (doc) =>
|
|
12401
|
+
var reduced2 = (doc) => reducedMotion(doc.defaultView);
|
|
12335
12402
|
function make2(doc) {
|
|
12336
12403
|
return (tag, cls, text) => {
|
|
12337
12404
|
let node = doc.createElement(tag);
|
|
@@ -12522,7 +12589,7 @@ function valueBox(doc, grew) {
|
|
|
12522
12589
|
};
|
|
12523
12590
|
}
|
|
12524
12591
|
function createWatch(env) {
|
|
12525
|
-
let root = make2(env.doc)("span", "knobs-ui knobs-rd knobs-rd-watch"), field = env.field, value = valueBox(env.doc);
|
|
12592
|
+
let root = make2(env.doc)("span", "knobs-root knobs-ui knobs-rd knobs-rd-watch"), field = env.field, value = valueBox(env.doc);
|
|
12526
12593
|
root.append(value.box);
|
|
12527
12594
|
let seq = -1, text = throttle(() => field.hz ?? 4), rt = runtime(env, root, (now) => {
|
|
12528
12595
|
if (env.state.seq === seq)
|
|
@@ -12549,7 +12616,7 @@ function createWatch(env) {
|
|
|
12549
12616
|
};
|
|
12550
12617
|
}
|
|
12551
12618
|
function createSparkline(env) {
|
|
12552
|
-
let root = make2(env.doc)("span", "knobs-ui knobs-rd knobs-rd-spark"), field = env.field, canvas = plot(env.doc, "knobs-rd-plot", () => {
|
|
12619
|
+
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", () => {
|
|
12553
12620
|
dirty = !0, rt.request();
|
|
12554
12621
|
}), value = valueBox(env.doc);
|
|
12555
12622
|
root.append(canvas.canvas, value.box);
|
|
@@ -12615,7 +12682,7 @@ function createSparkline(env) {
|
|
|
12615
12682
|
};
|
|
12616
12683
|
}
|
|
12617
12684
|
function createGraph(env) {
|
|
12618
|
-
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");
|
|
12685
|
+
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");
|
|
12619
12686
|
if (env.label)
|
|
12620
12687
|
head.append(env.label);
|
|
12621
12688
|
let legend = el("span", "knobs-rd-legend");
|
|
@@ -12641,7 +12708,7 @@ function createGraph(env) {
|
|
|
12641
12708
|
build();
|
|
12642
12709
|
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) => {
|
|
12643
12710
|
let s = field.series[i];
|
|
12644
|
-
return s.color ? parseCssColor(s.color, p.accent) : i === 0 ? p.accent :
|
|
12711
|
+
return s.color ? parseCssColor(s.color, p.accent) : i === 0 ? p.accent : p.series[(i - 1) % p.series.length];
|
|
12645
12712
|
}, rt = runtime(env, root, (now, dt) => {
|
|
12646
12713
|
let rs = rings(), fresh = env.state.seq !== seq;
|
|
12647
12714
|
seq = env.state.seq;
|
|
@@ -12791,7 +12858,7 @@ function createGraph(env) {
|
|
|
12791
12858
|
};
|
|
12792
12859
|
}
|
|
12793
12860
|
function createMeter(env) {
|
|
12794
|
-
let root = make2(env.doc)("span", "knobs-ui knobs-rd knobs-rd-meter"), field = env.field, canvas = plot(env.doc, "knobs-rd-plot", () => {
|
|
12861
|
+
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", () => {
|
|
12795
12862
|
dirty = !0, rt.request();
|
|
12796
12863
|
}), value = valueBox(env.doc);
|
|
12797
12864
|
root.append(canvas.canvas, value.box), root.setAttribute("role", "meter");
|
|
@@ -12869,7 +12936,7 @@ function createMeter(env) {
|
|
|
12869
12936
|
}
|
|
12870
12937
|
var isNumeric = (v) => typeof v === "number" || typeof v === "string" && /^[-+]?[\d.,]+\s*\S{0,3}$/.test(v);
|
|
12871
12938
|
function createTable(env) {
|
|
12872
|
-
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");
|
|
12939
|
+
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");
|
|
12873
12940
|
grid.tabIndex = -1, grid.setAttribute("role", "table"), root.append(grid);
|
|
12874
12941
|
let text = throttle(() => field.hz ?? 4), seq = -1, cols = 0, head, body = [], grows = [], header = (n) => {
|
|
12875
12942
|
let names = field.columns ?? [], key = `${n}\x00${names.join("\x00")}`;
|
|
@@ -12978,7 +13045,7 @@ function logTime(t) {
|
|
|
12978
13045
|
}
|
|
12979
13046
|
var levelColor2 = (p, level) => level === "error" ? p.critical : level === "warn" ? p.warn : level === "debug" ? p.dim : p.text;
|
|
12980
13047
|
function createLog(env) {
|
|
12981
|
-
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");
|
|
13048
|
+
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");
|
|
12982
13049
|
if (env.label)
|
|
12983
13050
|
head.append(env.label);
|
|
12984
13051
|
let chips = el("span", "knobs-rd-chips");
|
|
@@ -13274,11 +13341,11 @@ function layerRoot(doc) {
|
|
|
13274
13341
|
}
|
|
13275
13342
|
function layerElement(doc, cls, look) {
|
|
13276
13343
|
let el = doc.createElement("div");
|
|
13277
|
-
return el.className = cls, layerRoot(doc).append(el),
|
|
13344
|
+
return el.className = cls, layerRoot(doc).append(el), applyLook2(el, lookOf(look)), el;
|
|
13278
13345
|
}
|
|
13279
13346
|
function presence(el, o = {}) {
|
|
13280
13347
|
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 = () => {
|
|
13281
|
-
let reduced =
|
|
13348
|
+
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;
|
|
13282
13349
|
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);
|
|
13283
13350
|
}, loop = frameLoop(win, (dt) => {
|
|
13284
13351
|
if (spring.step(dt), render(), !spring.resting)
|
|
@@ -13292,8 +13359,8 @@ function presence(el, o = {}) {
|
|
|
13292
13359
|
}
|
|
13293
13360
|
return !1;
|
|
13294
13361
|
}), tune = (seconds, zeta) => {
|
|
13295
|
-
let reduced =
|
|
13296
|
-
spring.omega = 2 * Math.PI / (reduced ?
|
|
13362
|
+
let reduced = reducedMotion(win);
|
|
13363
|
+
spring.omega = 2 * Math.PI / (reduced ? FADE.duration : seconds), spring.zeta = reduced ? 1 : zeta;
|
|
13297
13364
|
};
|
|
13298
13365
|
return render(), {
|
|
13299
13366
|
show() {
|
|
@@ -13332,7 +13399,7 @@ var regions = /* @__PURE__ */ new WeakMap;
|
|
|
13332
13399
|
function toast(message, options = {}) {
|
|
13333
13400
|
let doc = options.within?.ownerDocument ?? options.doc ?? document, win = doc.defaultView, key = options.within ?? doc, r = regions.get(key);
|
|
13334
13401
|
if (!r || !r.el.isConnected) {
|
|
13335
|
-
let el = options.within ? Object.assign(doc.createElement("div"), { className: "knobs-ui knobs-toast" }) : layerElement(doc, "knobs-layer knobs-toast", options.look);
|
|
13402
|
+
let el = options.within ? Object.assign(doc.createElement("div"), { className: "knobs-root knobs-ui knobs-toast" }) : layerElement(doc, "knobs-layer knobs-toast", options.look);
|
|
13336
13403
|
if (options.within)
|
|
13337
13404
|
injectUiStyles(doc), options.within.append(el);
|
|
13338
13405
|
el.setAttribute("role", "status"), el.setAttribute("aria-live", "polite");
|
|
@@ -13469,7 +13536,7 @@ function createTabStrip(doc, choose) {
|
|
|
13469
13536
|
}
|
|
13470
13537
|
|
|
13471
13538
|
// src/panel/tab-transition.ts
|
|
13472
|
-
var LAYOUT = springMotion2(
|
|
13539
|
+
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;
|
|
13473
13540
|
function tabTransition(body, root, wake) {
|
|
13474
13541
|
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 = () => {
|
|
13475
13542
|
let out = [];
|
|
@@ -13804,7 +13871,7 @@ function createLens(o) {
|
|
|
13804
13871
|
}, all = (r) => [r, r, r, r], panelBox = (inset) => {
|
|
13805
13872
|
let r = root.getBoundingClientRect();
|
|
13806
13873
|
if (o.page) {
|
|
13807
|
-
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
|
|
13874
|
+
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;
|
|
13808
13875
|
return {
|
|
13809
13876
|
x: r.left + pad,
|
|
13810
13877
|
y: top + pad,
|
|
@@ -14109,13 +14176,15 @@ function morphFromChip(chip, root, wake, restored) {
|
|
|
14109
14176
|
}, ensureShape = () => {
|
|
14110
14177
|
if (shape)
|
|
14111
14178
|
return shape;
|
|
14112
|
-
let cs = getComputedStyle(root), r = parseFloat(cs.getPropertyValue("--kv-panel
|
|
14179
|
+
let cs = getComputedStyle(root), r = parseFloat(cs.getPropertyValue("--kv-radius-panel"));
|
|
14113
14180
|
if (Number.isFinite(r))
|
|
14114
14181
|
panelRadius = r;
|
|
14115
|
-
shape = doc.createElement("div"), shape.className = "knobs-morph", shape.setAttribute("aria-hidden", "true");
|
|
14116
|
-
for (let t of ["bg", "
|
|
14182
|
+
shape = doc.createElement("div"), shape.className = "knobs-root knobs-morph", shape.setAttribute("aria-hidden", "true");
|
|
14183
|
+
for (let t of ["bg", "border", "rim", "border-subtle", "glass", "glass-tone"])
|
|
14117
14184
|
shape.style.setProperty(`--kv-${t}`, cs.getPropertyValue(`--kv-${t}`));
|
|
14118
|
-
|
|
14185
|
+
for (let t of ["--_k-shadow-overlay", "--_k-shadow-k", "--_k-light"])
|
|
14186
|
+
shape.style.setProperty(t, cs.getPropertyValue(t));
|
|
14187
|
+
return shape.style.colorScheme = cs.colorScheme, root.before(shape), root.style.animation = "none", root.dataset.morphing = "", chip.dataset.morph = "", shape;
|
|
14119
14188
|
}, clear = () => {
|
|
14120
14189
|
shape?.remove(), shape = void 0, delete root.dataset.morphing;
|
|
14121
14190
|
for (let name of [
|
|
@@ -14305,7 +14374,7 @@ function positionPanel(panel, header, anchor, id, storage) {
|
|
|
14305
14374
|
}
|
|
14306
14375
|
|
|
14307
14376
|
// src/panel/presence.ts
|
|
14308
|
-
var EXIT = springMotion2(
|
|
14377
|
+
var EXIT = springMotion2(SPRINGS2.snappy), ENTER = springMotion2(SPRINGS2.default), FADE2 = springMotion2(FADE), BLUR2 = 4, SCALE = 0.96, LEAD2 = 0.4, FOLDED = [
|
|
14309
14378
|
"height",
|
|
14310
14379
|
"min-height",
|
|
14311
14380
|
"flex",
|
|
@@ -14386,7 +14455,7 @@ function createPresence(root, options) {
|
|
|
14386
14455
|
raf = 0, spring.snap(next ? 1 : 0), settle();
|
|
14387
14456
|
return;
|
|
14388
14457
|
}
|
|
14389
|
-
let m = reduced ?
|
|
14458
|
+
let m = reduced ? FADE2 : next ? ENTER : EXIT;
|
|
14390
14459
|
if (spring.omega = m.omega, spring.zeta = m.zeta, spring.set(next ? 1 : 0), root.dataset.presence = next ? "in" : "out", apply(spring.x), !raf)
|
|
14391
14460
|
last = performance.now(), raf = win.requestAnimationFrame(tick);
|
|
14392
14461
|
options.wake();
|
|
@@ -14395,7 +14464,7 @@ function createPresence(root, options) {
|
|
|
14395
14464
|
if (!root.dataset.presence || root.hidden)
|
|
14396
14465
|
return;
|
|
14397
14466
|
let look = presenceLook(spring.x, inline, reduced), r = root.getBoundingClientRect();
|
|
14398
|
-
radius ??= parseFloat(win.getComputedStyle(root).getPropertyValue("--kv-panel
|
|
14467
|
+
radius ??= parseFloat(win.getComputedStyle(root).getPropertyValue("--kv-radius-panel")) || 12;
|
|
14399
14468
|
let s = look.scale, ox = r.left + r.width / 2, oy = inline ? r.top : r.top + r.height / 2;
|
|
14400
14469
|
return {
|
|
14401
14470
|
x: ox + (r.left - ox) * s,
|
|
@@ -14444,10 +14513,9 @@ function buildPanel(controls, host, options) {
|
|
|
14444
14513
|
node.textContent = text;
|
|
14445
14514
|
return node;
|
|
14446
14515
|
}, inline = Boolean(options.inline), page = options.page, close = options.close ?? options.onClose, root = el(page ? "div" : "aside");
|
|
14447
|
-
root.className = page ? "knobs-panel knobs-inline knobs-page" : inline ? "knobs-panel knobs-inline" : "knobs-panel", root.dataset.controls = controls.id;
|
|
14516
|
+
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;
|
|
14448
14517
|
let untrackHas = trackHas(root);
|
|
14449
|
-
|
|
14450
|
-
injectPreset(doc, options.preset), root.dataset.preset = options.preset.name;
|
|
14518
|
+
applyLook(root, panelLook(controls, options)), root.dataset.density = options.density ?? controls.density;
|
|
14451
14519
|
let titleText = options.title === void 0 ? controls.id : options.title, toggleKey = options.toggleKey !== void 0 ? options.toggleKey : page ? !1 : controls.toggleKey;
|
|
14452
14520
|
if (options.restored)
|
|
14453
14521
|
root.dataset.restored = "";
|
|
@@ -17304,7 +17372,14 @@ function buildPanel(controls, host, options) {
|
|
|
17304
17372
|
}, rowsObserver = new MutationObserver(syncRows);
|
|
17305
17373
|
rowsObserver.observe(root, {
|
|
17306
17374
|
attributes: !0,
|
|
17307
|
-
attributeFilter: [
|
|
17375
|
+
attributeFilter: [
|
|
17376
|
+
"style",
|
|
17377
|
+
"class",
|
|
17378
|
+
"data-appearance",
|
|
17379
|
+
"data-knobs-theme",
|
|
17380
|
+
"data-preset",
|
|
17381
|
+
"data-density"
|
|
17382
|
+
]
|
|
17308
17383
|
}), syncRows(), layoutRows(!1);
|
|
17309
17384
|
let unsubscribe = controls.subscribe(update), unlisten = readoutPort?.listen((key) => readouts.get(key)?.notify()), gpuObserver = new MutationObserver(() => {
|
|
17310
17385
|
for (let r of readouts.values())
|
|
@@ -17403,7 +17478,7 @@ function buildPanel(controls, host, options) {
|
|
|
17403
17478
|
});
|
|
17404
17479
|
modeObserver.observe(doc.documentElement, {
|
|
17405
17480
|
attributes: !0,
|
|
17406
|
-
attributeFilter: ["data-knobs-renderer", "data-theme", "style"]
|
|
17481
|
+
attributeFilter: ["data-knobs-renderer", "data-theme", "data-appearance", "class", "style"]
|
|
17407
17482
|
});
|
|
17408
17483
|
let panel = {
|
|
17409
17484
|
element: root,
|