@kitlangton/knobs 0.4.0-next.1 → 0.4.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -12
- package/dist/dev/{chunk-1qzffbpa.js → chunk-5pb7ymrd.js} +150 -46
- package/dist/dev/{chunk-ayb292zj.js → chunk-a7cjgy8x.js} +2 -2
- package/dist/dev/{chunk-8mabjeyk.js → chunk-dyq4m24m.js} +162 -1
- package/dist/dev/index.js +3 -3
- package/dist/panel.js +312 -46
- package/dist/review-react.js +18580 -0
- package/dist/review-solid.js +18482 -0
- package/dist/review.js +18488 -0
- package/dist/themes.js +281 -23
- package/dist/types/review/font.d.ts +13 -0
- package/dist/types/review/foundations.d.ts +175 -0
- package/dist/types/review/index.d.ts +13 -0
- package/dist/types/review/react.d.ts +1 -0
- package/dist/types/review/solid.d.ts +1 -0
- package/dist/types/themes/index.d.ts +7 -2
- package/dist/types/themes/review.d.ts +8 -0
- package/dist/types/tokens/schema.d.ts +180 -0
- package/dist/types/ui/compare-css.d.ts +1 -1
- package/dist/types/ui/compare-gpu.d.ts +6 -6
- package/dist/types/ui/compare-model.d.ts +85 -2
- package/dist/types/ui/compare.d.ts +18 -4
- package/dist/types/ui/diff.d.ts +4 -5
- package/dist/types/ui/history-css.d.ts +1 -0
- package/dist/types/ui/history-model.d.ts +249 -0
- package/dist/types/ui/history.d.ts +38 -0
- package/dist/types/ui/icons.d.ts +40 -0
- package/dist/types/ui/index.d.ts +8 -4
- package/dist/types/ui/player-css.d.ts +1 -0
- package/dist/types/ui/player.d.ts +51 -0
- package/dist/types/ui/review-look.d.ts +6 -0
- package/dist/types/ui/review-options.d.ts +28 -0
- package/dist/types/ui/selection-pill-css.d.ts +1 -0
- package/dist/types/ui/selection-pill.d.ts +106 -0
- package/dist/types/ui/timeline-model.d.ts +27 -0
- package/dist/types/ui/timeline.d.ts +16 -1
- package/dist/types/ui/tree.d.ts +3 -2
- package/dist/types/ui/walkthrough-annotations.d.ts +42 -0
- package/dist/types/ui/walkthrough-blocks.d.ts +87 -0
- package/dist/types/ui/walkthrough-media.d.ts +30 -1
- package/dist/types/ui/walkthrough-model.d.ts +469 -5
- package/dist/types/ui/walkthrough.d.ts +27 -5
- package/dist/ui-react.js +5124 -1031
- package/dist/ui-solid.js +5136 -1043
- package/dist/ui.js +6411 -2269
- package/package.json +13 -1
|
@@ -116,7 +116,7 @@ import {
|
|
|
116
116
|
createHintController,
|
|
117
117
|
pageHints,
|
|
118
118
|
toggleLayer
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-dyq4m24m.js";
|
|
120
120
|
|
|
121
121
|
// src/panel/die.ts
|
|
122
122
|
var ROUND = 16 * Math.sqrt(5), DIE = { half: 64 + ROUND, round: ROUND, pip: 12 }, PIPS = {
|
|
@@ -11446,14 +11446,23 @@ var compareCss = `
|
|
|
11446
11446
|
.knobs-ui.knobs-compare{--_ku-cmp-diff:var(--k-compare-diff,var(--_k-ok));--_ku-cmp-line:var(--_k-compare-divider);
|
|
11447
11447
|
--_ku-cmp-stage:var(--_k-compare-stage);
|
|
11448
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-
|
|
11449
|
+
font:var(--_k-weight) var(--_k-type-small)/var(--_k-leading-small) var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left}
|
|
11450
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:
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
.knobs-
|
|
11456
|
-
|
|
11451
|
+
.knobs-cmp-bar{flex:none;display:flex;align-items:center;gap:var(--_k-gap);height:var(--_k-control-h)}
|
|
11452
|
+
/* The modes: one fill, the selection pill on the one picked; a mode isn't brighter for being
|
|
11453
|
+
picked: the pill's bright copy is. */
|
|
11454
|
+
.knobs-cmp-modes{position:relative;display:inline-flex;height:var(--_k-control-h);border-radius:var(--_k-radius);background:var(--_k-fill)}
|
|
11455
|
+
.knobs-cmp-modes[hidden]{display:none}
|
|
11456
|
+
/* Hover is a quiet fill under the arrow cursor (no hand, no brightening), there at once. */
|
|
11457
|
+
.knobs-ui .knobs-cmp-mode{display:inline-flex;align-items:center;height:100%;padding:0 8px;border-radius:var(--_k-radius);color:var(--_k-fg-2);cursor:default;white-space:nowrap;
|
|
11458
|
+
transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
11459
|
+
.knobs-ui .knobs-cmp-mode:not([aria-checked="true"]):is(:hover,:focus-visible){background:var(--_k-fill-hover);transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11460
|
+
/* Toggles: icon buttons, the accent's wash when on. */
|
|
11461
|
+
.knobs-ui .knobs-cmp-toggle{display:inline-flex;align-items:center;justify-content:center;width:var(--_k-control-h);height:var(--_k-control-h);border-radius:var(--_k-radius);color:var(--_k-fg-2);cursor:default;
|
|
11462
|
+
transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
11463
|
+
.knobs-ui .knobs-cmp-toggle:is(:hover,:focus-visible){background:var(--_k-fill-hover);transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11464
|
+
.knobs-ui .knobs-cmp-toggle[aria-pressed="true"]{color:var(--_k-accent-fg);background:var(--_k-accent-soft)}
|
|
11465
|
+
.knobs-cmp-toggle svg{display:block}
|
|
11457
11466
|
.knobs-cmp-fill{flex:1}
|
|
11458
11467
|
.knobs-cmp-toggle[hidden]{display:none}
|
|
11459
11468
|
/* One surface: on a card (a walkthrough's step, a split's pane, anything .knobs-surface) or marked
|
|
@@ -11466,49 +11475,96 @@ var compareCss = `
|
|
|
11466
11475
|
.knobs-compare[data-frame="flat"] .knobs-cmp-stage{border-radius:0}
|
|
11467
11476
|
.knobs-compare[data-mode="wipe"] .knobs-cmp-stage{cursor:ew-resize}
|
|
11468
11477
|
/* Unzoomed, a finger still scrolls the page up and down; zoomed, the stage takes every gesture. */
|
|
11469
|
-
.
|
|
11470
|
-
.knobs-compare[data-
|
|
11471
|
-
.knobs-compare[data-
|
|
11478
|
+
/* Zoomed, it pans: a move cursor, never a hand. */
|
|
11479
|
+
.knobs-compare[data-zoomed] .knobs-cmp-stage{cursor:move;touch-action:none}
|
|
11480
|
+
.knobs-compare[data-panning],.knobs-compare[data-panning] *{cursor:move!important}
|
|
11481
|
+
/* Wiping, the grip stands in for the cursor. */
|
|
11482
|
+
.knobs-compare[data-dragging],.knobs-compare[data-dragging] *{cursor:none!important}
|
|
11472
11483
|
.knobs-cmp-sizer{position:absolute;left:0;right:0;top:0;height:0;visibility:hidden;pointer-events:none}
|
|
11473
11484
|
.knobs-cmp-canvas{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}
|
|
11474
11485
|
.knobs-cmp-media{position:absolute;left:0;top:0;display:block;max-width:none;margin:0;padding:0;border:0;object-fit:fill;transform-origin:0 0;pointer-events:none;will-change:transform}
|
|
11475
11486
|
.knobs-compare[data-renderer="gpu"] .knobs-cmp-media{opacity:0}
|
|
11476
|
-
/*
|
|
11477
|
-
.knobs-cmp-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
.knobs-cmp-label
|
|
11481
|
-
.
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
.knobs-cmp-
|
|
11485
|
-
.knobs-cmp-
|
|
11486
|
-
|
|
11487
|
-
.knobs-cmp-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
.knobs-cmp-
|
|
11487
|
+
/* The media comes in with its first frames: a fade and a 4px blur on the default spring. */
|
|
11488
|
+
.knobs-cmp-canvas,.knobs-compare[data-renderer="dom"] .knobs-cmp-media{transition:opacity calc(var(--_k-motion-default-ms) * 1ms) var(--_k-motion-default),filter calc(var(--_k-motion-default-ms) * 1ms) var(--_k-motion-default)}
|
|
11489
|
+
.knobs-compare:not([data-ready]) :is(.knobs-cmp-canvas,.knobs-cmp-media){opacity:0;filter:blur(4px)}
|
|
11490
|
+
/* Over the pictures: a quiet scrim, dark in either appearance, blurred, with no ring. */
|
|
11491
|
+
.knobs-cmp-label,.knobs-cmp-zoom,.knobs-cmp-grip{background:var(--_ku-media-scrim);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
|
|
11492
|
+
/* ✗ Before · ✓ After: Before quieter, After in full. Neutral: no colour of its own. */
|
|
11493
|
+
.knobs-cmp-label{position:absolute;left:0;top:0;display:flex;align-items:center;gap:4px;padding:1px 7px 1px 5px;border-radius:999px;font-weight:var(--_k-weight-label);
|
|
11494
|
+
white-space:nowrap;pointer-events:none;will-change:transform}
|
|
11495
|
+
.knobs-cmp-label[data-side="before"]{color:var(--_ku-on-media-2)}
|
|
11496
|
+
.knobs-cmp-label[data-side="after"]{color:var(--_ku-on-media)}
|
|
11497
|
+
/* Fusing, the mark folds away and the label is its name. */
|
|
11498
|
+
.knobs-cmp-mark{flex:none;display:flex;justify-content:flex-end;overflow:hidden}
|
|
11499
|
+
.knobs-cmp-mark svg{display:block;flex:none;width:12px;height:12px}
|
|
11500
|
+
/* The fuse's seam: a blurred strip over where the sides meet, soft at both sides. */
|
|
11501
|
+
.knobs-cmp-seam{position:absolute;left:0;top:0;width:8px;height:0;opacity:0;pointer-events:none;will-change:transform,opacity;
|
|
11502
|
+
-webkit-mask-image:linear-gradient(to right,transparent,#000 35%,#000 65%,transparent);mask-image:linear-gradient(to right,transparent,#000 35%,#000 65%,transparent)}
|
|
11503
|
+
/* The wipe: a hairline down the line with a raised grip in its middle (at the pointer's height
|
|
11504
|
+
while dragged); a wider strip takes the hand and the keys (a slider). It fades in with the
|
|
11505
|
+
fuse; wiping, line and grip brighten. */
|
|
11506
|
+
.knobs-cmp-handle{cursor:ew-resize;position:absolute;left:-12px;top:0;width:24px;height:0;opacity:0;pointer-events:none;outline:none;will-change:transform,opacity}
|
|
11507
|
+
.knobs-cmp-handle[data-on]{pointer-events:auto}
|
|
11508
|
+
.knobs-cmp-handle::before{content:"";position:absolute;top:0;bottom:0;left:11.5px;width:1px;background:color-mix(in srgb,var(--_ku-cmp-line) 72%,transparent);box-shadow:0 0 6px var(--_ku-media-scrim)}
|
|
11509
|
+
.knobs-compare[data-dragging] .knobs-cmp-handle::before{background:var(--_ku-cmp-line)}
|
|
11510
|
+
.knobs-cmp-grip{position:absolute;top:0;left:4px;width:16px;height:28px;border-radius:min(8px,calc(var(--_k-radius) * 999));will-change:transform}
|
|
11511
|
+
.knobs-cmp-grip::before,.knobs-cmp-grip::after{content:"";position:absolute;top:10px;width:1px;height:8px;background:var(--_ku-on-media-2);transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
11512
|
+
.knobs-cmp-grip::before{left:6px}
|
|
11513
|
+
.knobs-cmp-grip::after{left:9px}
|
|
11514
|
+
.knobs-compare[data-dragging] .knobs-cmp-grip::before,.knobs-compare[data-dragging] .knobs-cmp-grip::after{background:var(--_ku-on-media)}
|
|
11515
|
+
.knobs-cmp-handle:focus-visible .knobs-cmp-grip,.knobs-compare[data-keyboard] .knobs-cmp-handle:focus .knobs-cmp-grip{box-shadow:0 0 0 2px var(--_k-accent)}
|
|
11491
11516
|
/* The split's hairline, down the middle side by side. */
|
|
11492
11517
|
.knobs-cmp-split{position:absolute;left:0;top:0;width:1px;height:0;margin-left:-.5px;background:color-mix(in srgb,var(--_k-bg) 72%,transparent);pointer-events:none;will-change:transform,opacity}
|
|
11493
11518
|
/* Zoomed: how far, and a way back, in the stage's corner; it fades in and out, nothing shifts. */
|
|
11494
11519
|
.knobs-cmp-zoom{position:absolute;right:8px;bottom:8px;display:flex;align-items:center;gap:4px;height:26px;padding:0 3px 0 10px;border-radius:999px;
|
|
11495
|
-
color:var(--
|
|
11520
|
+
color:var(--_ku-on-media);font-variant-numeric:tabular-nums;font-feature-settings:var(--_kr-data,"tnum");white-space:nowrap;
|
|
11496
11521
|
opacity:0;scale:.96;pointer-events:none;transition:opacity .16s cubic-bezier(.4,0,1,1),scale .16s cubic-bezier(.4,0,1,1)}
|
|
11497
11522
|
.knobs-cmp-zoom[data-on]{opacity:1;scale:1;pointer-events:auto;transition:opacity .2s cubic-bezier(.2,.8,.2,1),scale .2s cubic-bezier(.2,.8,.2,1)}
|
|
11498
11523
|
:where(.knobs-ui) .knobs-cmp-zoom-reset{all:revert;box-sizing:border-box;font:inherit;letter-spacing:inherit;margin:0;border:0;outline:none;box-shadow:none;
|
|
11499
|
-
height:20px;padding:0
|
|
11500
|
-
:where(.knobs-ui) .knobs-cmp-zoom-reset:is(:hover,:focus-visible){
|
|
11501
|
-
.knobs-cmp-note{position:absolute;left:50%;top:50%;translate:-50% -50%;color:var(--_k-fg-3);
|
|
11524
|
+
display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border-radius:999px;background:transparent;color:var(--_ku-on-media-2);cursor:default;transition:background calc(var(--_k-hover-out) * 1ms),color calc(var(--_k-hover-out) * 1ms)}
|
|
11525
|
+
:where(.knobs-ui) .knobs-cmp-zoom-reset:is(:hover,:focus-visible){background:color-mix(in srgb,var(--_ku-on-media) 16%,transparent);color:var(--_ku-on-media);transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11526
|
+
.knobs-cmp-note{position:absolute;left:50%;top:50%;translate:-50% -50%;color:var(--_k-fg-3);pointer-events:none}
|
|
11502
11527
|
.knobs-cmp-note:empty{display:none}
|
|
11503
11528
|
.knobs-cmp-strip-host{flex:none;height:60px;min-height:0}
|
|
11504
|
-
.knobs-cmp-timeline-host{flex:none;
|
|
11529
|
+
.knobs-cmp-timeline-host{flex:none;min-height:0}
|
|
11505
11530
|
/* The frame strip: Before over After per column, a difference bar under them, a dot where it peaks. */
|
|
11506
11531
|
.knobs-ui.knobs-cmp-strip{--_ku-cmp-diff:var(--k-compare-diff,var(--_k-ok));position:relative;width:100%;height:100%;min-height:40px;overflow:hidden;cursor:col-resize;touch-action:none;
|
|
11507
|
-
font:var(--_k-weight) var(--_k-
|
|
11532
|
+
font:var(--_k-weight) var(--_k-type-small)/var(--_k-leading-small) var(--_k-font);color:var(--_k-fg)}
|
|
11508
11533
|
.knobs-cmp-strip>canvas{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}
|
|
11509
11534
|
@media(prefers-reduced-motion:reduce){:is(.knobs-compare,.knobs-cmp-strip) :where(*,::before,::after){transition-duration:.12s!important}}
|
|
11510
11535
|
`;
|
|
11511
11536
|
|
|
11537
|
+
// src/ui/player-css.ts
|
|
11538
|
+
var playerCss = `
|
|
11539
|
+
:where(.knobs-player,.knobs-player *){box-sizing:border-box}
|
|
11540
|
+
.knobs-ui.knobs-player{--_kp-stage:var(--_k-compare-stage);display:flex;flex-direction:column;gap:6px;width:100%;outline:none;
|
|
11541
|
+
font:var(--_k-weight) var(--_k-type-small)/var(--_k-leading-small) var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left}
|
|
11542
|
+
:where(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-ui.knobs-player,.knobs-ui.knobs-player[data-nested]{--_kp-stage:var(--k-compare-stage,transparent)}
|
|
11543
|
+
.knobs-player-frame{position:relative;width:100%;aspect-ratio:var(--kp-aspect,16/9);overflow:hidden;border-radius:var(--_k-radius-panel);background:var(--_kp-stage)}
|
|
11544
|
+
.knobs-player[data-frame="flat"] .knobs-player-frame{border-radius:0}
|
|
11545
|
+
.knobs-player-media{position:absolute;inset:0;display:block;width:100%;height:100%;margin:0;padding:0;border:0;object-fit:contain;
|
|
11546
|
+
opacity:0;filter:blur(4px);transition:opacity calc(var(--_k-motion-default-ms) * 1ms) var(--_k-motion-default),filter calc(var(--_k-motion-default-ms) * 1ms) var(--_k-motion-default)}
|
|
11547
|
+
.knobs-player[data-ready] .knobs-player-media{opacity:1;filter:none}
|
|
11548
|
+
.knobs-player-line{flex:none;min-height:0}
|
|
11549
|
+
/* The timeline's own stylesheet is look.ts's; what the player's row and every timeline share
|
|
11550
|
+
about the hand is set here, after it. No hand cursor anywhere (the arrow, or a resize where it
|
|
11551
|
+
resizes); hover is a quiet fill (fill-hover), in at once (hover-in, 0 ms), out easing. */
|
|
11552
|
+
.knobs-ui .knobs-tl-play,.knobs-ui.knobs-timeline :is(.knobs-tl-pin,.knobs-tl-rlabel),
|
|
11553
|
+
.knobs-ui.knobs-timeline[data-dragging] .knobs-tl-marker :is(.knobs-tl-pin,.knobs-tl-mlabel){cursor:default}
|
|
11554
|
+
.knobs-ui .knobs-tl-play:hover,.knobs-tl-edge:hover::after,.knobs-tl-rlabel:hover,.knobs-tl-track:hover .knobs-tl-hover,
|
|
11555
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-track:hover .knobs-tl-segs{transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11556
|
+
/* The line's row: a minimal play/pause (the filled pair, a 28px target, no fill at rest), then
|
|
11557
|
+
the line, centred on it. */
|
|
11558
|
+
.knobs-ui.knobs-timeline[data-variant="line"]{gap:4px;align-items:center}
|
|
11559
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-transport{display:flex}
|
|
11560
|
+
.knobs-ui.knobs-timeline[data-variant="line"] .knobs-tl-play{width:28px;height:28px;min-width:28px;min-height:28px;border-radius:var(--_k-radius);background:transparent;color:var(--_k-fg-2);
|
|
11561
|
+
transition:background calc(var(--_k-hover-out) * 1ms),transform .15s var(--_ku-ease)}
|
|
11562
|
+
.knobs-ui.knobs-timeline[data-variant="line"][data-playing] .knobs-tl-play{background:transparent;color:var(--_k-fg-2)}
|
|
11563
|
+
.knobs-ui.knobs-timeline[data-variant="line"] .knobs-tl-play:hover{background:var(--_k-fill-hover);transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11564
|
+
.knobs-ui.knobs-timeline[data-variant="line"] .knobs-tl-track{cursor:default;transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
11565
|
+
.knobs-ui.knobs-timeline[data-variant="line"] .knobs-tl-track:hover{background:var(--_k-fill-hover);transition-duration:calc(var(--_k-hover-in) * 1ms)}
|
|
11566
|
+
`;
|
|
11567
|
+
|
|
11512
11568
|
// src/ui/overlay-css.ts
|
|
11513
11569
|
var overlayCss = `
|
|
11514
11570
|
.knobs-layers{position:fixed;inset:0;z-index:2147480005;pointer-events:none}
|
|
@@ -11640,7 +11696,7 @@ var snappy = springLinear(SPRINGS2.snappy), pickerCss = `
|
|
|
11640
11696
|
.knobs-picker-suggested{flex:none;color:var(--_k-fg-3);font-size:var(--_k-text-meta)}
|
|
11641
11697
|
.knobs-picker-check{flex:none;display:flex;width:14px;height:14px;color:var(--_k-accent);opacity:0;scale:.6;filter:blur(2px);
|
|
11642
11698
|
transition:opacity .11s ease-in,scale .11s ease-in,filter .11s ease-in}
|
|
11643
|
-
.knobs-picker-check svg{display:block;width:
|
|
11699
|
+
.knobs-picker-check svg{display:block;width:12px;height:12px}
|
|
11644
11700
|
.knobs-picker-option[data-chosen] .knobs-picker-check{opacity:1;scale:1;filter:none;transition:opacity .15s ease-out,scale var(--kp-snappy-ms) var(--kp-snappy),filter .15s ease-out}
|
|
11645
11701
|
.knobs-picker-body{position:relative;overflow:visible}
|
|
11646
11702
|
.knobs-picker-body[data-moving]{overflow:hidden}
|
|
@@ -11742,6 +11798,15 @@ var readoutCss = `
|
|
|
11742
11798
|
.knobs-panel[data-gpu-active="true"] .knobs-rd-find{position:relative;z-index:2147480003}
|
|
11743
11799
|
@media(prefers-reduced-motion:reduce){.knobs-rd :where(*){transition:none!important}}
|
|
11744
11800
|
`;
|
|
11801
|
+
|
|
11802
|
+
// src/ui/selection-pill-css.ts
|
|
11803
|
+
var selectionPillCss = `
|
|
11804
|
+
.knobs-pick-pill,.knobs-pick-copy{position:absolute;left:0;top:0;width:0;height:0;pointer-events:none;transition:opacity .1s linear}
|
|
11805
|
+
.knobs-pick-pill{background:var(--_k-fill-selected);will-change:transform}
|
|
11806
|
+
.knobs-pick-copy{overflow:hidden;will-change:transform}
|
|
11807
|
+
.knobs-pick-copy-rows{position:absolute;left:0;top:0;width:0;height:0}
|
|
11808
|
+
:is(.knobs-pick-pill,.knobs-pick-copy)[data-off]{opacity:0}
|
|
11809
|
+
`;
|
|
11745
11810
|
// src/ui/look.ts
|
|
11746
11811
|
var css = `
|
|
11747
11812
|
:where(.knobs-ui){
|
|
@@ -11753,6 +11818,9 @@ var css = `
|
|
|
11753
11818
|
--_ku-wash:var(--k-ui-wash,color-mix(in srgb,var(--_k-fill) 70%,transparent));
|
|
11754
11819
|
--_ku-wash-hi:var(--k-ui-wash-hi,var(--_k-fill-selected));
|
|
11755
11820
|
--_ku-ease:var(--_k-motion-snappy);--_ku-ease-ms:calc(var(--_k-motion-snappy-ms) * 1ms);
|
|
11821
|
+
/* Over a picture: a quiet dark scrim in either appearance (a picture is no lighter in light
|
|
11822
|
+
mode), light type on it, no ring. */
|
|
11823
|
+
--_ku-media-scrim:rgb(0 0 0/.5);--_ku-on-media:#fff;--_ku-on-media-2:color-mix(in srgb,var(--_ku-on-media) 64%,transparent);
|
|
11756
11824
|
/* The card frame (knobs' own look): every leaf pane a rounded card on the page, half a gap
|
|
11757
11825
|
inside its slot, so panes sit a gap apart with the dividers' grips between them; tree rows
|
|
11758
11826
|
inset as soft rounded washes. --k-frame: flat (labPreset) puts panes edge to edge on
|
|
@@ -11777,6 +11845,12 @@ var css = `
|
|
|
11777
11845
|
--_ku-pane-bg and --_ku-pane-ring so this reaches them. */
|
|
11778
11846
|
:where(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-ui:not(.knobs-surface),.knobs-ui[data-nested]{--_ku-gap:var(--k-ui-gap,0px);--_ku-pane-bg:transparent;--_ku-pane-ring:none;
|
|
11779
11847
|
--_ku-divider:var(--_k-split-gutter);--_kd-bg:transparent}
|
|
11848
|
+
/* What draws its box without those: a picker's card keeps its fill as the highlight but drops its
|
|
11849
|
+
ring; a timeline's track drops its well for a hairline under the lane; an inline panel sheds its
|
|
11850
|
+
card (--k-chrome 0). A full-window step is the one raised exception (it is the surface). */
|
|
11851
|
+
:is(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-picker-card,.knobs-ui[data-nested] .knobs-picker-card{box-shadow:none}
|
|
11852
|
+
:is(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-tl-track,.knobs-ui[data-nested] .knobs-tl-track{background:transparent;border-radius:0;box-shadow:inset 0 -1px 0 var(--_k-border-subtle)}
|
|
11853
|
+
:where(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-panel.knobs-inline:not(.knobs-page){--k-chrome:0}
|
|
11780
11854
|
/* Only the pieces' own elements take their type and resets: what you put in a pane is yours. */
|
|
11781
11855
|
.knobs-ui{box-sizing:border-box}
|
|
11782
11856
|
:where(.knobs-split>*,.knobs-pane-clip,.knobs-pane-inner,.knobs-pane-body,.knobs-pane-head,.knobs-pane-head *,.knobs-pane-rail,.knobs-pane-rail *,.knobs-tree,.knobs-tree *,.knobs-tree-ghost){box-sizing:border-box}
|
|
@@ -11911,11 +11985,9 @@ var css = `
|
|
|
11911
11985
|
.knobs-tree:focus .knobs-tree-row[data-active][aria-selected="true"]::before{background:var(--_ku-select-focus)}
|
|
11912
11986
|
.knobs-tree-row[data-drop="into"]::before{opacity:1;background:color-mix(in srgb,var(--_k-accent) 30%,transparent)}
|
|
11913
11987
|
.knobs-tree-row[data-dragged]{opacity:.38}
|
|
11914
|
-
/* glide:
|
|
11915
|
-
.knobs-tree-
|
|
11916
|
-
|
|
11917
|
-
.knobs-tree-cursor[data-on]{opacity:1}
|
|
11918
|
-
.knobs-tree:focus .knobs-tree-cursor{background:var(--_ku-select-focus)}
|
|
11988
|
+
/* glide: the selection pill on the selected row, in the selection's colour (the row's own stays off). */
|
|
11989
|
+
.knobs-tree>.knobs-pick-pill{background:var(--_ku-select)}
|
|
11990
|
+
.knobs-tree:focus>.knobs-pick-pill{background:var(--_ku-select-focus)}
|
|
11919
11991
|
.knobs-tree[data-glide] .knobs-tree-row[aria-selected="true"]::before{opacity:0!important}
|
|
11920
11992
|
.knobs-tree-row>*{position:relative}
|
|
11921
11993
|
.knobs-tree-caret{flex:none;display:flex;align-items:center;justify-content:center;width:16px;height:100%;color:var(--_k-fg-3);transition:transform var(--_ku-ease-ms) var(--_ku-ease)}
|
|
@@ -11947,22 +12019,20 @@ var css = `
|
|
|
11947
12019
|
box-shadow:0 0 0 1px var(--_k-border-strong),0 6px 18px rgba(0,0,0,calc(.35 * var(--_k-shadow-k,1)));pointer-events:none;white-space:nowrap;font:var(--_k-weight) var(--_k-font-size)/1.6 var(--_k-font)}
|
|
11948
12020
|
.knobs-tree-empty{padding:10px var(--_k-inset);color:var(--_k-fg-3)}
|
|
11949
12021
|
|
|
11950
|
-
/* Timeline:
|
|
11951
|
-
|
|
12022
|
+
/* Timeline: play beside a track: the ruler's canvas over a lane of markers, ranges as soft bands,
|
|
12023
|
+
and the playhead, a hairline in the accent with a cap. No clock: the time shows under the
|
|
12024
|
+
pointer on the track (the tag), in seconds, while hovering or scrubbing. */
|
|
11952
12025
|
:where(.knobs-timeline,.knobs-timeline *){box-sizing:border-box}
|
|
11953
12026
|
.knobs-ui.knobs-timeline{display:flex;align-items:stretch;gap:10px;width:100%;height:100%;min-height:52px;padding:6px var(--_k-inset) 8px 8px;outline:none;user-select:none;-webkit-user-select:none;
|
|
11954
12027
|
font:var(--_k-weight) var(--_k-font-size)/1.35 var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left}
|
|
11955
12028
|
:where(.knobs-ui) :is(.knobs-tl-play,.knobs-tl-edit){all:revert;box-sizing:border-box;font:inherit;color:inherit;letter-spacing:inherit;background:transparent;border:0;margin:0;padding:0;outline:none;box-shadow:none}
|
|
11956
|
-
.knobs-tl-transport{flex:none;display:flex;align-items:center
|
|
12029
|
+
.knobs-tl-transport{flex:none;display:flex;align-items:center}
|
|
11957
12030
|
.knobs-ui .knobs-tl-play{flex:none;display:inline-flex;align-items:center;justify-content:center;width:var(--_k-control-h);height:var(--_k-control-h);min-width:22px;min-height:22px;border-radius:calc(var(--_k-radius) * 999);
|
|
11958
12031
|
background:var(--_k-fill-selected);color:var(--_k-fg);cursor:pointer;transition:background .15s,transform .15s var(--_ku-ease)}
|
|
11959
12032
|
.knobs-ui .knobs-tl-play:hover{background:color-mix(in srgb,var(--_k-fg) 16%,transparent)}
|
|
11960
12033
|
.knobs-ui .knobs-tl-play:active{transform:scale(.94)}
|
|
11961
12034
|
.knobs-tl-play svg{width:12px;height:12px}
|
|
11962
12035
|
.knobs-timeline[data-playing] .knobs-tl-play{background:var(--_k-accent);color:var(--_k-bg)}
|
|
11963
|
-
.knobs-tl-time{display:flex;flex-direction:column;line-height:1.2;font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}
|
|
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
12036
|
.knobs-tl-track{position:relative;flex:1;min-width:0;overflow:hidden;border-radius:var(--_k-radius);background:var(--_k-fill);cursor:col-resize;touch-action:none;
|
|
11967
12037
|
transition:background calc(var(--_k-hover-out) * 1ms)}
|
|
11968
12038
|
.knobs-timeline:focus-visible .knobs-tl-track,.knobs-timeline[data-keyboard]:focus .knobs-tl-track{background:color-mix(in srgb,var(--_k-fill-selected) 80%,transparent)}
|
|
@@ -11986,7 +12056,8 @@ var css = `
|
|
|
11986
12056
|
.knobs-tl-pin{position:absolute;top:13px;left:-5px;width:10px;height:10px;pointer-events:auto;cursor:grab}
|
|
11987
12057
|
.knobs-tl-pin::after{content:"";position:absolute;inset:1.5px;border-radius:min(2px,var(--_k-radius));background:var(--knobs-tl-c);rotate:45deg;transition:background .15s,scale .2s var(--_ku-ease)}
|
|
11988
12058
|
.knobs-tl-mlabel{position:absolute;top:26px;left:3px;max-width:140px;padding:0 6px;border-radius:max(0px,calc(var(--_k-radius) - 3px));background:var(--_k-fill-selected);color:var(--_k-fg);
|
|
11989
|
-
font-size:var(--_k-text-meta);line-height:17px;white-space:nowrap;
|
|
12059
|
+
font-size:var(--_k-text-meta);line-height:17px;white-space:nowrap;pointer-events:auto;cursor:grab;transition:background .15s,color .15s}
|
|
12060
|
+
.knobs-tl-mtext{display:block;overflow:hidden;white-space:nowrap}
|
|
11990
12061
|
.knobs-tl-marker[data-selected]{--knobs-tl-c:var(--_k-accent)}
|
|
11991
12062
|
.knobs-tl-marker[data-selected] .knobs-tl-mlabel{background:color-mix(in srgb,var(--_k-accent) 24%,var(--_k-fill-selected))}
|
|
11992
12063
|
.knobs-tl-marker[data-selected] .knobs-tl-pin::after{scale:1.2}
|
|
@@ -12005,9 +12076,42 @@ var css = `
|
|
|
12005
12076
|
.knobs-tl-hover{position:absolute;left:0;top:0;bottom:0;width:1px;margin-left:-.5px;background:var(--_k-border-strong);transform:translateX(-100px);pointer-events:none;opacity:0;transition:opacity .15s}
|
|
12006
12077
|
.knobs-tl-track:hover .knobs-tl-hover{opacity:1}
|
|
12007
12078
|
.knobs-timeline[data-scrubbing] .knobs-tl-hover{opacity:0}
|
|
12079
|
+
.knobs-tl-tag{position:absolute;left:0;bottom:2px;font-size:var(--_k-text-meta);line-height:16px;color:var(--_k-fg);font-variant-numeric:tabular-nums;font-feature-settings:"tnum";white-space:nowrap;pointer-events:none;opacity:0}
|
|
12080
|
+
.knobs-tl-tag[data-on]{opacity:1}
|
|
12081
|
+
/* The lane (variant: "lane"): one slim track of ticks under a compare or a video; markers are
|
|
12082
|
+
faint chapter ticks, the current one in text colour; nothing to edit. */
|
|
12083
|
+
.knobs-ui.knobs-timeline[data-variant="lane"]{height:auto;min-height:0;padding:0;gap:var(--_k-gap)}
|
|
12084
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-track{height:var(--_k-control-h)}
|
|
12085
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-ruler{height:100%}
|
|
12086
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-lane{top:0}
|
|
12087
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-marker{top:0}
|
|
12088
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-marker::before{top:0;bottom:50%;left:-.75px;width:1.5px;background:var(--_k-fg-3)}
|
|
12089
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-marker[data-current]::before{background:var(--_k-fg)}
|
|
12090
|
+
.knobs-timeline[data-variant="lane"] :is(.knobs-tl-pin,.knobs-tl-mlabel,.knobs-tl-rlabel){display:none}
|
|
12091
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-head::before{top:0}
|
|
12092
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-head::after{content:none}
|
|
12093
|
+
.knobs-timeline[data-variant="lane"] .knobs-tl-tag{top:2px;bottom:auto}
|
|
12094
|
+
/* The line (variant: "line"): a player's progress under its media. One 2px line, fg-3 with fg
|
|
12095
|
+
filling it, a segment per chapter; it thickens under the pointer and while scrubbing. The
|
|
12096
|
+
chapter and time under the pointer float over it; nothing else shows. */
|
|
12097
|
+
.knobs-ui.knobs-timeline[data-variant="line"]{height:auto;min-height:0;padding:0;gap:0}
|
|
12098
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-transport{display:none}
|
|
12099
|
+
.knobs-ui.knobs-timeline[data-variant="line"] .knobs-tl-track{height:16px;overflow:visible;border-radius:var(--_k-radius);background:transparent;box-shadow:none;cursor:pointer}
|
|
12100
|
+
.knobs-timeline[data-variant="line"] :is(.knobs-tl-ruler,.knobs-tl-lane,.knobs-tl-hover,.knobs-tl-head,.knobs-tl-rlabel){display:none}
|
|
12101
|
+
.knobs-tl-segs{position:absolute;left:0;right:0;top:50%;height:2px;margin-top:-1px;pointer-events:none;transition:scale calc(var(--_k-hover-out) * 1ms) var(--_ku-ease)}
|
|
12102
|
+
.knobs-tl-seg{position:absolute;left:0;top:0;height:100%;overflow:hidden;border-radius:1px;background:var(--_k-fg-3);will-change:transform}
|
|
12103
|
+
.knobs-tl-seg-fill{position:absolute;inset:0;background:var(--_k-fg);transform-origin:0 0;will-change:transform}
|
|
12104
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-track:hover .knobs-tl-segs,.knobs-timeline[data-variant="line"][data-scrubbing] .knobs-tl-segs{scale:1 2}
|
|
12105
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-range{top:3px;bottom:3px;border-radius:3px}
|
|
12106
|
+
.knobs-timeline[data-variant="line"]:focus-visible .knobs-tl-track,.knobs-timeline[data-variant="line"][data-keyboard]:focus .knobs-tl-track{background:transparent;box-shadow:0 0 0 2px color-mix(in srgb,var(--_k-accent) 60%,transparent)}
|
|
12107
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-tag{top:auto;bottom:calc(100% + 2px);display:flex;gap:6px;padding:0 6px;border-radius:calc(var(--_k-radius) * 999);background:var(--_ku-media-scrim);color:var(--_ku-on-media);
|
|
12108
|
+
font-size:var(--_k-type-small);line-height:var(--_k-leading-small);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
|
|
12109
|
+
.knobs-tl-tag-label{color:var(--_k-fg-2)}
|
|
12110
|
+
.knobs-timeline[data-variant="line"] .knobs-tl-tag-label{color:var(--_ku-on-media-2)}
|
|
12111
|
+
.knobs-tl-tag-label:empty{display:none}
|
|
12008
12112
|
@media(prefers-reduced-motion:reduce){.knobs-timeline :where(*,::before,::after){transition:none!important}}
|
|
12009
12113
|
@media(prefers-reduced-motion:reduce){:is(.knobs-tree,.knobs-split>.knobs-divider,.knobs-pane-head,.knobs-pane-rail) :where(*,::before,::after){transition:none!important}}
|
|
12010
|
-
`, uiCss = () => aliased(css + readoutCss + overlayCss + bentoCss + activityCss + pickerCss + compareCss) + rolling_css_default;
|
|
12114
|
+
`, uiCss = () => aliased(css + readoutCss + overlayCss + bentoCss + activityCss + pickerCss + compareCss + playerCss + selectionPillCss) + rolling_css_default;
|
|
12011
12115
|
function injectUiStyles(doc) {
|
|
12012
12116
|
if (injectTokens(doc), doc.querySelector("style[data-knobs-ui]"))
|
|
12013
12117
|
return;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
writeSession,
|
|
10
10
|
injectStyles,
|
|
11
11
|
toggleLayer
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-dyq4m24m.js";
|
|
13
13
|
|
|
14
14
|
// src/panel/attach.ts
|
|
15
15
|
function attach(controls, element, options = {}) {
|
|
@@ -85,7 +85,7 @@ function attach(controls, element, options = {}) {
|
|
|
85
85
|
return;
|
|
86
86
|
loading = !0;
|
|
87
87
|
try {
|
|
88
|
-
let { createPanel } = await (__preload("
|
|
88
|
+
let { createPanel } = await (__preload("5pb7ymrd"), import("./chunk-5pb7ymrd.js"));
|
|
89
89
|
if (disposed || !controls.enabled || panel)
|
|
90
90
|
return;
|
|
91
91
|
if (panel = createPanel(controls, element, close, { restored, chip }), remember)
|
|
@@ -1194,6 +1194,22 @@ var theme = { from: "theme" }, css = (s) => ({ css: s }), value = (s) => ({ valu
|
|
|
1194
1194
|
source: css("var(--k-warn)"),
|
|
1195
1195
|
doc: "Modified lines."
|
|
1196
1196
|
},
|
|
1197
|
+
{
|
|
1198
|
+
name: "before",
|
|
1199
|
+
tier: "semantic",
|
|
1200
|
+
type: "color",
|
|
1201
|
+
group: "Data",
|
|
1202
|
+
source: css("var(--k-fg-3)"),
|
|
1203
|
+
doc: "Before in a comparison, and only Before: its label and side of the seam. Neutral unless a theme gives it a colour."
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
name: "after",
|
|
1207
|
+
tier: "semantic",
|
|
1208
|
+
type: "color",
|
|
1209
|
+
group: "Data",
|
|
1210
|
+
source: css("var(--k-fg)"),
|
|
1211
|
+
doc: "After in a comparison, and only After."
|
|
1212
|
+
},
|
|
1197
1213
|
{
|
|
1198
1214
|
name: "series-1",
|
|
1199
1215
|
tier: "semantic",
|
|
@@ -1284,6 +1300,150 @@ var theme = { from: "theme" }, css = (s) => ({ css: s }), value = (s) => ({ valu
|
|
|
1284
1300
|
source: value("288px"),
|
|
1285
1301
|
doc: "Panel width."
|
|
1286
1302
|
},
|
|
1303
|
+
{
|
|
1304
|
+
name: "space-inside",
|
|
1305
|
+
tier: "semantic",
|
|
1306
|
+
type: "length",
|
|
1307
|
+
group: "Space",
|
|
1308
|
+
source: css("var(--k-unit)"),
|
|
1309
|
+
doc: "Parts of one thing: an icon and its label, a meta line and its title."
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
name: "space-sibling",
|
|
1313
|
+
tier: "semantic",
|
|
1314
|
+
type: "length",
|
|
1315
|
+
group: "Space",
|
|
1316
|
+
source: css("calc(var(--k-unit) * 2)"),
|
|
1317
|
+
doc: "Siblings in a group: buttons in a row, a list item's lines."
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
name: "space-title",
|
|
1321
|
+
tier: "semantic",
|
|
1322
|
+
type: "length",
|
|
1323
|
+
group: "Space",
|
|
1324
|
+
source: css("calc(var(--k-unit) * 3)"),
|
|
1325
|
+
doc: "A heading and what it heads."
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
name: "space-group",
|
|
1329
|
+
tier: "semantic",
|
|
1330
|
+
type: "length",
|
|
1331
|
+
group: "Space",
|
|
1332
|
+
source: css("calc(var(--k-unit) * 12)"),
|
|
1333
|
+
doc: "Groups inside a section (prose, video, diff), stacked media, feed items (a hairline in the middle)."
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
name: "space-section",
|
|
1337
|
+
tier: "semantic",
|
|
1338
|
+
type: "length",
|
|
1339
|
+
group: "Space",
|
|
1340
|
+
source: css("calc(var(--k-unit) * 24)"),
|
|
1341
|
+
doc: "Sections of a page (the intro, the updates, each PR), a hairline in the middle."
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
name: "space-column",
|
|
1345
|
+
tier: "semantic",
|
|
1346
|
+
type: "length",
|
|
1347
|
+
group: "Space",
|
|
1348
|
+
source: css("calc(var(--k-unit) * 6)"),
|
|
1349
|
+
doc: "Columns: a contents rail and the page, media side by side."
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
name: "pad-page",
|
|
1353
|
+
tier: "semantic",
|
|
1354
|
+
type: "length",
|
|
1355
|
+
group: "Space",
|
|
1356
|
+
source: css("calc(var(--k-unit) * 6)"),
|
|
1357
|
+
doc: "A page's edge; 16px under 640px wide."
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
name: "pad-card",
|
|
1361
|
+
tier: "semantic",
|
|
1362
|
+
type: "length",
|
|
1363
|
+
group: "Space",
|
|
1364
|
+
source: css("calc(var(--k-unit) * 3)"),
|
|
1365
|
+
doc: "Inside a card or popover."
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
name: "type-heading",
|
|
1369
|
+
tier: "semantic",
|
|
1370
|
+
type: "length",
|
|
1371
|
+
group: "Type",
|
|
1372
|
+
source: value("20px"),
|
|
1373
|
+
doc: "A page's title, weight 500."
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
name: "leading-heading",
|
|
1377
|
+
tier: "semantic",
|
|
1378
|
+
type: "length",
|
|
1379
|
+
group: "Type",
|
|
1380
|
+
source: value("28px"),
|
|
1381
|
+
doc: "Line height for type-heading."
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
name: "type-title",
|
|
1385
|
+
tier: "semantic",
|
|
1386
|
+
type: "length",
|
|
1387
|
+
group: "Type",
|
|
1388
|
+
source: value("16px"),
|
|
1389
|
+
doc: "Section titles (under their kicker), weight 500."
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
name: "leading-title",
|
|
1393
|
+
tier: "semantic",
|
|
1394
|
+
type: "length",
|
|
1395
|
+
group: "Type",
|
|
1396
|
+
source: value("24px"),
|
|
1397
|
+
doc: "Line height for type-title."
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
name: "type-body",
|
|
1401
|
+
tier: "semantic",
|
|
1402
|
+
type: "length",
|
|
1403
|
+
group: "Type",
|
|
1404
|
+
source: value("13px"),
|
|
1405
|
+
doc: "Prose, questions, list rows, step titles; 400, or 500 for emphasis."
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
name: "leading-body",
|
|
1409
|
+
tier: "semantic",
|
|
1410
|
+
type: "length",
|
|
1411
|
+
group: "Type",
|
|
1412
|
+
source: value("20px"),
|
|
1413
|
+
doc: "Line height for type-body."
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
name: "type-label",
|
|
1417
|
+
tier: "semantic",
|
|
1418
|
+
type: "length",
|
|
1419
|
+
group: "Type",
|
|
1420
|
+
source: value("12px"),
|
|
1421
|
+
doc: "Mono inside body text: code and paths."
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
name: "leading-label",
|
|
1425
|
+
tier: "semantic",
|
|
1426
|
+
type: "length",
|
|
1427
|
+
group: "Type",
|
|
1428
|
+
source: value("16px"),
|
|
1429
|
+
doc: "Line height for type-label."
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
name: "type-small",
|
|
1433
|
+
tier: "semantic",
|
|
1434
|
+
type: "length",
|
|
1435
|
+
group: "Type",
|
|
1436
|
+
source: value("11px"),
|
|
1437
|
+
doc: "Meta, controls, keys, timestamps; mono inside labels."
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
name: "leading-small",
|
|
1441
|
+
tier: "semantic",
|
|
1442
|
+
type: "length",
|
|
1443
|
+
group: "Type",
|
|
1444
|
+
source: value("16px"),
|
|
1445
|
+
doc: "Line height for type-small."
|
|
1446
|
+
},
|
|
1287
1447
|
{
|
|
1288
1448
|
name: "font-size",
|
|
1289
1449
|
tier: "semantic",
|
|
@@ -2141,8 +2301,9 @@ ${register(["width"], "<length-percentage>", "288px")}
|
|
|
2141
2301
|
@media(prefers-reduced-motion:reduce){:where(.knobs-chip,.knobs-ui){--k-token-t:0s}}`, aliased = (css) => css.replace(new RegExp(`var\\(--_k-(${ANIMATED.join("|")})\\)`, "g"), "var(--kv-$1)").replace(/var\(--k-blur\)/g, "var(--kv-blur)");
|
|
2142
2302
|
|
|
2143
2303
|
// src/core/root.ts
|
|
2144
|
-
var ROOT_CLASS = "knobs-root", extras = `:where(.${ROOT_CLASS}){--_k-shadow-k:calc(var(--k-shadow-strength,calc(.48 - .32 * var(--_k-light,0))) / .48);--_k-glass-tone:var(--k-glass-tone,calc(.5 + .58 * var(--_k-light,0)));--_k-fill-base:var(--k-fill-base,var(--_k-fill-selected));--_k-fill-hover-mix:var(--k-fill-hover-mix,var(--k-fill-rest-mix,20%));--_k-reveal-ease:var(--k-ease,cubic-bezier(.2,.8,.2,1))}`, spring = `:where(:root,:host){--k-fill-ease:${DEFAULT_LINEAR.easing};--k-fill-ms:${DEFAULT_LINEAR.ms}}`, rootCss = `${tokensCss(knobs)}
|
|
2304
|
+
var ROOT_CLASS = "knobs-root", extras = `:where(.${ROOT_CLASS}){--_k-shadow-k:calc(var(--k-shadow-strength,calc(.48 - .32 * var(--_k-light,0))) / .48);--_k-glass-tone:var(--k-glass-tone,calc(.5 + .58 * var(--_k-light,0)));--_k-fill-base:var(--k-fill-base,var(--_k-fill-selected));--_k-fill-hover-mix:var(--k-fill-hover-mix,var(--k-fill-rest-mix,20%));--_k-reveal-ease:var(--k-ease,cubic-bezier(.2,.8,.2,1))}`, narrow = `@media(max-width:639.98px){:where(.${ROOT_CLASS}){--_k-pad-page:var(--k-pad-page,calc(var(--_k-unit) * 4))}}`, spring = `:where(:root,:host){--k-fill-ease:${DEFAULT_LINEAR.easing};--k-fill-ms:${DEFAULT_LINEAR.ms}}`, rootCss = `${tokensCss(knobs)}
|
|
2145
2305
|
${extras}
|
|
2306
|
+
${narrow}
|
|
2146
2307
|
${spring}
|
|
2147
2308
|
${DRIVERS}
|
|
2148
2309
|
${motionCss}`;
|
package/dist/dev/index.js
CHANGED
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
urlFlag2,
|
|
77
77
|
storageKey
|
|
78
78
|
} from "./chunk-3ygqgy1x.js";
|
|
79
|
-
__chunks(import.meta.url,["
|
|
79
|
+
__chunks(import.meta.url,["kdk2476q","5pb7ymrd","a7cjgy8x","3ygqgy1x","dyq4m24m"],[["./index.js",3],["./chunk-5pb7ymrd.js",3,4],["./chunk-a7cjgy8x.js",3,4],["./chunk-3ygqgy1x.js"],["./chunk-dyq4m24m.js",3]],0);
|
|
80
80
|
// src/core/random.ts
|
|
81
81
|
var lattice = (min, max, step, r) => min + Math.floor(r * (Math.floor((max - min) / step + 0.000000001) + 1)) * step, between = (min, max, r) => min + (max - min) * r;
|
|
82
82
|
function pick(field, random) {
|
|
@@ -1378,11 +1378,11 @@ function defineControls(id, input, options = {}) {
|
|
|
1378
1378
|
code: (format, values) => formatCode(values ?? get(), format),
|
|
1379
1379
|
variants,
|
|
1380
1380
|
attach(element, chip) {
|
|
1381
|
-
let load = options.ship ? () => options.ship().then((m) => m.attach) : () => (__preload("
|
|
1381
|
+
let load = options.ship ? () => options.ship().then((m) => m.attach) : () => (__preload("a7cjgy8x"), import("./chunk-a7cjgy8x.js")).then((m) => m.attach);
|
|
1382
1382
|
return live(load, (attach) => attach(controls, element, chip), (detach) => detach());
|
|
1383
1383
|
},
|
|
1384
1384
|
mount(container, mountOptions) {
|
|
1385
|
-
let load = options.ship ? () => options.ship().then((m) => m.mountPanel) : () => (__preload("
|
|
1385
|
+
let load = options.ship ? () => options.ship().then((m) => m.mountPanel) : () => (__preload("5pb7ymrd"), import("./chunk-5pb7ymrd.js")).then((m) => m.mountPanel);
|
|
1386
1386
|
return live(load, (mountPanel) => {
|
|
1387
1387
|
let panel = mountPanel(controls, container, mountOptions);
|
|
1388
1388
|
return mountOptions?.onReady?.(panel), panel;
|