@kitlangton/knobs 0.4.0-next.3 → 0.4.0-next.5

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/dist/panel.js CHANGED
@@ -1746,6 +1746,22 @@ var init_schema = __esm(() => {
1746
1746
  source: css("var(--k-warn)"),
1747
1747
  doc: "Modified lines."
1748
1748
  },
1749
+ {
1750
+ name: "before",
1751
+ tier: "semantic",
1752
+ type: "color",
1753
+ group: "Data",
1754
+ source: css("var(--k-fg-3)"),
1755
+ doc: "Before in a comparison, and only Before: its label and side of the seam. Neutral unless a theme gives it a colour."
1756
+ },
1757
+ {
1758
+ name: "after",
1759
+ tier: "semantic",
1760
+ type: "color",
1761
+ group: "Data",
1762
+ source: css("var(--k-fg)"),
1763
+ doc: "After in a comparison, and only After."
1764
+ },
1749
1765
  {
1750
1766
  name: "series-1",
1751
1767
  tier: "semantic",
@@ -1836,6 +1852,150 @@ var init_schema = __esm(() => {
1836
1852
  source: value("288px"),
1837
1853
  doc: "Panel width."
1838
1854
  },
1855
+ {
1856
+ name: "space-inside",
1857
+ tier: "semantic",
1858
+ type: "length",
1859
+ group: "Space",
1860
+ source: css("var(--k-unit)"),
1861
+ doc: "Parts of one thing: an icon and its label, a meta line and its title."
1862
+ },
1863
+ {
1864
+ name: "space-sibling",
1865
+ tier: "semantic",
1866
+ type: "length",
1867
+ group: "Space",
1868
+ source: css("calc(var(--k-unit) * 2)"),
1869
+ doc: "Siblings in a group: buttons in a row, a list item's lines."
1870
+ },
1871
+ {
1872
+ name: "space-title",
1873
+ tier: "semantic",
1874
+ type: "length",
1875
+ group: "Space",
1876
+ source: css("calc(var(--k-unit) * 3)"),
1877
+ doc: "A heading and what it heads."
1878
+ },
1879
+ {
1880
+ name: "space-group",
1881
+ tier: "semantic",
1882
+ type: "length",
1883
+ group: "Space",
1884
+ source: css("calc(var(--k-unit) * 12)"),
1885
+ doc: "Groups inside a section (prose, video, diff), stacked media, feed items (a hairline in the middle)."
1886
+ },
1887
+ {
1888
+ name: "space-section",
1889
+ tier: "semantic",
1890
+ type: "length",
1891
+ group: "Space",
1892
+ source: css("calc(var(--k-unit) * 24)"),
1893
+ doc: "Sections of a page (the intro, the updates, each PR), a hairline in the middle."
1894
+ },
1895
+ {
1896
+ name: "space-column",
1897
+ tier: "semantic",
1898
+ type: "length",
1899
+ group: "Space",
1900
+ source: css("calc(var(--k-unit) * 6)"),
1901
+ doc: "Columns: a contents rail and the page, media side by side."
1902
+ },
1903
+ {
1904
+ name: "pad-page",
1905
+ tier: "semantic",
1906
+ type: "length",
1907
+ group: "Space",
1908
+ source: css("calc(var(--k-unit) * 6)"),
1909
+ doc: "A page's edge; 16px under 640px wide."
1910
+ },
1911
+ {
1912
+ name: "pad-card",
1913
+ tier: "semantic",
1914
+ type: "length",
1915
+ group: "Space",
1916
+ source: css("calc(var(--k-unit) * 3)"),
1917
+ doc: "Inside a card or popover."
1918
+ },
1919
+ {
1920
+ name: "type-heading",
1921
+ tier: "semantic",
1922
+ type: "length",
1923
+ group: "Type",
1924
+ source: value("20px"),
1925
+ doc: "A page's title, weight 500."
1926
+ },
1927
+ {
1928
+ name: "leading-heading",
1929
+ tier: "semantic",
1930
+ type: "length",
1931
+ group: "Type",
1932
+ source: value("28px"),
1933
+ doc: "Line height for type-heading."
1934
+ },
1935
+ {
1936
+ name: "type-title",
1937
+ tier: "semantic",
1938
+ type: "length",
1939
+ group: "Type",
1940
+ source: value("16px"),
1941
+ doc: "Section titles (under their kicker), weight 500."
1942
+ },
1943
+ {
1944
+ name: "leading-title",
1945
+ tier: "semantic",
1946
+ type: "length",
1947
+ group: "Type",
1948
+ source: value("24px"),
1949
+ doc: "Line height for type-title."
1950
+ },
1951
+ {
1952
+ name: "type-body",
1953
+ tier: "semantic",
1954
+ type: "length",
1955
+ group: "Type",
1956
+ source: value("13px"),
1957
+ doc: "Prose, questions, list rows, step titles; 400, or 500 for emphasis."
1958
+ },
1959
+ {
1960
+ name: "leading-body",
1961
+ tier: "semantic",
1962
+ type: "length",
1963
+ group: "Type",
1964
+ source: value("20px"),
1965
+ doc: "Line height for type-body."
1966
+ },
1967
+ {
1968
+ name: "type-label",
1969
+ tier: "semantic",
1970
+ type: "length",
1971
+ group: "Type",
1972
+ source: value("12px"),
1973
+ doc: "Mono inside body text: code and paths."
1974
+ },
1975
+ {
1976
+ name: "leading-label",
1977
+ tier: "semantic",
1978
+ type: "length",
1979
+ group: "Type",
1980
+ source: value("16px"),
1981
+ doc: "Line height for type-label."
1982
+ },
1983
+ {
1984
+ name: "type-small",
1985
+ tier: "semantic",
1986
+ type: "length",
1987
+ group: "Type",
1988
+ source: value("11px"),
1989
+ doc: "Meta, controls, keys, timestamps; mono inside labels."
1990
+ },
1991
+ {
1992
+ name: "leading-small",
1993
+ tier: "semantic",
1994
+ type: "length",
1995
+ group: "Type",
1996
+ source: value("16px"),
1997
+ doc: "Line height for type-small."
1998
+ },
1839
1999
  {
1840
2000
  name: "font-size",
1841
2001
  tier: "semantic",
@@ -2800,16 +2960,18 @@ function injectTokens(doc) {
2800
2960
  style.textContent = rootCss;
2801
2961
  doc.head.append(style);
2802
2962
  }
2803
- var ROOT_CLASS = "knobs-root", extras, spring, rootCss;
2963
+ var ROOT_CLASS = "knobs-root", extras, narrow, spring, rootCss;
2804
2964
  var init_root = __esm(() => {
2805
2965
  init_knobs();
2806
2966
  init_css();
2807
2967
  init_glide();
2808
2968
  init_motion();
2809
2969
  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))}`;
2970
+ narrow = `@media(max-width:639.98px){:where(.${ROOT_CLASS}){--_k-pad-page:var(--k-pad-page,calc(var(--_k-unit) * 4))}}`;
2810
2971
  spring = `:where(:root,:host){--k-fill-ease:${DEFAULT_LINEAR.easing};--k-fill-ms:${DEFAULT_LINEAR.ms}}`;
2811
2972
  rootCss = `${tokensCss(knobs)}
2812
2973
  ${extras}
2974
+ ${narrow}
2813
2975
  ${spring}
2814
2976
  ${DRIVERS}
2815
2977
  ${motionCss}`;
@@ -20934,6 +21096,8 @@ var compareCss = `
20934
21096
  .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}
20935
21097
  .knobs-compare[data-frame="flat"] .knobs-cmp-stage{border-radius:0}
20936
21098
  .knobs-compare[data-mode="wipe"] .knobs-cmp-stage{cursor:ew-resize}
21099
+ /* Videos: a click on the stage plays and pauses. */
21100
+ .knobs-compare[data-video]:not([data-mode="wipe"],[data-zoomed]) .knobs-cmp-stage{cursor:pointer}
20937
21101
  /* Unzoomed, a finger still scrolls the page up and down; zoomed, the stage takes every gesture. */
20938
21102
  .knobs-compare[data-zoomed] .knobs-cmp-stage{cursor:grab;touch-action:none}
20939
21103
  .knobs-compare[data-panning],.knobs-compare[data-panning] *{cursor:grabbing!important}
@@ -20943,14 +21107,28 @@ var compareCss = `
20943
21107
  .knobs-cmp-canvas{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}
20944
21108
  .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}
20945
21109
  .knobs-compare[data-renderer="gpu"] .knobs-cmp-media{opacity:0}
21110
+ /* The media comes in with its first frames: a fade and a 4px blur on the default spring. */
21111
+ .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)}
21112
+ .knobs-compare:not([data-ready]) :is(.knobs-cmp-canvas,.knobs-cmp-media){opacity:0;filter:blur(4px)}
20946
21113
  /* Glass: what's behind shows through, blurred, on the knobs tokens. */
20947
21114
  .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);
20948
21115
  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)))}
20949
- .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 calc(var(--_k-hover-out) * 1ms)}
20950
- /* The wipe: a hairline down the line with a raised grip at the pointer's height; a wider strip
20951
- takes the hand and the keys (a slider). It fades with the mode; wiping, line and grip brighten. */
20952
- .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)}
20953
- .knobs-cmp-handle[data-on]{opacity:1;pointer-events:auto;transition:opacity .22s cubic-bezier(.2,.8,.2,1)}
21116
+ /* ✗ Before · ✓ After: Before quieter (fg-3), After in full text. Neutral: no colour of its own. */
21117
+ .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-size:var(--_k-text-meta);line-height:16px;font-weight:var(--_k-weight-label);
21118
+ white-space:nowrap;pointer-events:none;will-change:transform}
21119
+ .knobs-cmp-label[data-side="before"]{color:var(--_k-fg-3)}
21120
+ .knobs-cmp-label[data-side="after"]{color:var(--_k-fg)}
21121
+ /* Fusing, the mark folds away and the label is its name. */
21122
+ .knobs-cmp-mark{flex:none;display:flex;justify-content:flex-end;overflow:hidden}
21123
+ .knobs-cmp-mark svg{display:block;flex:none;width:12px;height:12px}
21124
+ /* The fuse's seam: a blurred strip over where the sides meet, soft at both sides. */
21125
+ .knobs-cmp-seam{position:absolute;left:0;top:0;width:8px;height:0;opacity:0;pointer-events:none;will-change:transform,opacity;
21126
+ -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)}
21127
+ /* The wipe: a hairline down the line with a raised grip in its middle (at the pointer's height
21128
+ while dragged); a wider strip takes the hand and the keys (a slider). It fades in with the
21129
+ fuse; wiping, line and grip brighten. */
21130
+ .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}
21131
+ .knobs-cmp-handle[data-on]{pointer-events:auto}
20954
21132
  .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 0 .5px rgba(0,0,0,.28),0 0 6px rgba(0,0,0,.25)}
20955
21133
  .knobs-compare[data-dragging] .knobs-cmp-handle::before{background:var(--_ku-cmp-line)}
20956
21134
  .knobs-cmp-grip{position:absolute;top:0;left:4px;width:16px;height:28px;border-radius:min(8px,calc(var(--_k-radius) * 999));background:var(--_k-bg-overlay);
@@ -20982,6 +21160,27 @@ var compareCss = `
20982
21160
  @media(prefers-reduced-motion:reduce){:is(.knobs-compare,.knobs-cmp-strip) :where(*,::before,::after){transition-duration:.12s!important}}
20983
21161
  `;
20984
21162
 
21163
+ // src/ui/player-css.ts
21164
+ var playerCss = `
21165
+ :where(.knobs-player,.knobs-player *){box-sizing:border-box}
21166
+ .knobs-ui.knobs-player{--_kp-stage:var(--_k-compare-stage);display:flex;flex-direction:column;gap:6px;width:100%;outline:none;
21167
+ font:var(--_k-weight) var(--_k-font-size)/1.35 var(--_k-font);color:var(--_k-fg);letter-spacing:normal;text-align:left}
21168
+ :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)}
21169
+ .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);cursor:pointer}
21170
+ .knobs-player[data-frame="flat"] .knobs-player-frame{border-radius:0}
21171
+ .knobs-player-media{position:absolute;inset:0;display:block;width:100%;height:100%;margin:0;padding:0;border:0;object-fit:contain;
21172
+ 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)}
21173
+ .knobs-player[data-ready] .knobs-player-media{opacity:1;filter:none}
21174
+ .knobs-player-glyph{position:absolute;left:50%;top:50%;display:grid;place-items:center;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;color:var(--_k-fg);pointer-events:none;
21175
+ opacity:0;filter:blur(4px);scale:.96;
21176
+ 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);
21177
+ box-shadow:inset 0 0 0 .5px var(--_k-border),inset 0 1px 0 var(--_k-rim);
21178
+ transition:opacity calc(var(--_k-motion-snappy-ms) * 1ms) var(--_k-motion-snappy),filter calc(var(--_k-motion-snappy-ms) * 1ms) var(--_k-motion-snappy),scale calc(var(--_k-motion-snappy-ms) * 1ms) var(--_k-motion-snappy)}
21179
+ .knobs-player-glyph svg{width:16px;height:16px}
21180
+ .knobs-player-glyph[data-flash]{opacity:1;filter:none;scale:1}
21181
+ .knobs-player-line{flex:none;min-height:0}
21182
+ `;
21183
+
20985
21184
  // src/ui/overlay-css.ts
20986
21185
  var overlayCss = `
20987
21186
  .knobs-layers{position:fixed;inset:0;z-index:2147480005;pointer-events:none}
@@ -21316,6 +21515,12 @@ var css3 = `
21316
21515
  --_ku-pane-bg and --_ku-pane-ring so this reaches them. */
21317
21516
  :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;
21318
21517
  --_ku-divider:var(--_k-split-gutter);--_kd-bg:transparent}
21518
+ /* What draws its box without those: a picker's card keeps its fill as the highlight but drops its
21519
+ ring; a timeline's track drops its well for a hairline under the lane; an inline panel sheds its
21520
+ card (--k-chrome 0). A full-window step is the one raised exception (it is the surface). */
21521
+ :is(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-picker-card,.knobs-ui[data-nested] .knobs-picker-card{box-shadow:none}
21522
+ :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)}
21523
+ :where(.knobs-surface,.knobs-pane:not([data-nested])>.knobs-pane-clip) .knobs-panel.knobs-inline:not(.knobs-page){--k-chrome:0}
21319
21524
  /* Only the pieces' own elements take their type and resets: what you put in a pane is yours. */
21320
21525
  .knobs-ui{box-sizing:border-box}
21321
21526
  :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}
@@ -21541,8 +21746,6 @@ var css3 = `
21541
21746
  .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}
21542
21747
  .knobs-tl-track:hover .knobs-tl-hover{opacity:1}
21543
21748
  .knobs-timeline[data-scrubbing] .knobs-tl-hover{opacity:0}
21544
- @media(prefers-reduced-motion:reduce){.knobs-timeline :where(*,::before,::after){transition:none!important}}
21545
- @media(prefers-reduced-motion:reduce){:is(.knobs-tree,.knobs-split>.knobs-divider,.knobs-pane-head,.knobs-pane-rail) :where(*,::before,::after){transition:none!important}}
21546
21749
  .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}
21547
21750
  .knobs-tl-tag[data-on]{opacity:1}
21548
21751
  /* The lane (variant: "lane"): one slim track of ticks under a compare or a video; markers are
@@ -21558,7 +21761,26 @@ var css3 = `
21558
21761
  .knobs-timeline[data-variant="lane"] .knobs-tl-head::before{top:0}
21559
21762
  .knobs-timeline[data-variant="lane"] .knobs-tl-head::after{content:none}
21560
21763
  .knobs-timeline[data-variant="lane"] .knobs-tl-tag{top:2px;bottom:auto}
21561
- `, uiCss = () => aliased(css3 + readoutCss + overlayCss + bentoCss + activityCss + pickerCss + compareCss + selectionPillCss) + rolling_css_default, lookDefaults, svg = (body, box = 16) => `<svg viewBox="0 0 ${box} ${box}" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`, ICONS2;
21764
+ /* The line (variant: "line"): a player's progress under its media. One 2px line, fg-3 with fg
21765
+ filling it, a segment per chapter; it thickens under the pointer and while scrubbing. The
21766
+ chapter and time under the pointer float over it; nothing else shows. */
21767
+ .knobs-ui.knobs-timeline[data-variant="line"]{height:auto;min-height:0;padding:0;gap:0}
21768
+ .knobs-timeline[data-variant="line"] .knobs-tl-transport{display:none}
21769
+ .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}
21770
+ .knobs-timeline[data-variant="line"] :is(.knobs-tl-ruler,.knobs-tl-lane,.knobs-tl-hover,.knobs-tl-head,.knobs-tl-rlabel){display:none}
21771
+ .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)}
21772
+ .knobs-tl-seg{position:absolute;left:0;top:0;height:100%;overflow:hidden;border-radius:1px;background:var(--_k-fg-3);will-change:transform}
21773
+ .knobs-tl-seg-fill{position:absolute;inset:0;background:var(--_k-fg);transform-origin:0 0;will-change:transform}
21774
+ .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}
21775
+ .knobs-timeline[data-variant="line"] .knobs-tl-range{top:3px;bottom:3px;border-radius:3px}
21776
+ .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)}
21777
+ .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:color-mix(in srgb,var(--_k-bg) 72%,transparent);
21778
+ -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:inset 0 0 0 .5px var(--_k-border)}
21779
+ .knobs-tl-tag-label{color:var(--_k-fg-2)}
21780
+ .knobs-tl-tag-label:empty{display:none}
21781
+ @media(prefers-reduced-motion:reduce){.knobs-timeline :where(*,::before,::after){transition:none!important}}
21782
+ @media(prefers-reduced-motion:reduce){:is(.knobs-tree,.knobs-split>.knobs-divider,.knobs-pane-head,.knobs-pane-rail) :where(*,::before,::after){transition:none!important}}
21783
+ `, uiCss = () => aliased(css3 + readoutCss + overlayCss + bentoCss + activityCss + pickerCss + compareCss + playerCss + selectionPillCss) + rolling_css_default, lookDefaults, svg = (body, box = 16) => `<svg viewBox="0 0 ${box} ${box}" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`, ICONS2;
21562
21784
  var init_look = __esm(() => {
21563
21785
  init_appearance();
21564
21786
  init_activity_css();
package/dist/themes.js CHANGED
@@ -447,6 +447,22 @@ var TOKENS = [
447
447
  source: css("var(--k-warn)"),
448
448
  doc: "Modified lines."
449
449
  },
450
+ {
451
+ name: "before",
452
+ tier: "semantic",
453
+ type: "color",
454
+ group: "Data",
455
+ source: css("var(--k-fg-3)"),
456
+ doc: "Before in a comparison, and only Before: its label and side of the seam. Neutral unless a theme gives it a colour."
457
+ },
458
+ {
459
+ name: "after",
460
+ tier: "semantic",
461
+ type: "color",
462
+ group: "Data",
463
+ source: css("var(--k-fg)"),
464
+ doc: "After in a comparison, and only After."
465
+ },
450
466
  {
451
467
  name: "series-1",
452
468
  tier: "semantic",
@@ -537,6 +553,150 @@ var TOKENS = [
537
553
  source: value("288px"),
538
554
  doc: "Panel width."
539
555
  },
556
+ {
557
+ name: "space-inside",
558
+ tier: "semantic",
559
+ type: "length",
560
+ group: "Space",
561
+ source: css("var(--k-unit)"),
562
+ doc: "Parts of one thing: an icon and its label, a meta line and its title."
563
+ },
564
+ {
565
+ name: "space-sibling",
566
+ tier: "semantic",
567
+ type: "length",
568
+ group: "Space",
569
+ source: css("calc(var(--k-unit) * 2)"),
570
+ doc: "Siblings in a group: buttons in a row, a list item's lines."
571
+ },
572
+ {
573
+ name: "space-title",
574
+ tier: "semantic",
575
+ type: "length",
576
+ group: "Space",
577
+ source: css("calc(var(--k-unit) * 3)"),
578
+ doc: "A heading and what it heads."
579
+ },
580
+ {
581
+ name: "space-group",
582
+ tier: "semantic",
583
+ type: "length",
584
+ group: "Space",
585
+ source: css("calc(var(--k-unit) * 12)"),
586
+ doc: "Groups inside a section (prose, video, diff), stacked media, feed items (a hairline in the middle)."
587
+ },
588
+ {
589
+ name: "space-section",
590
+ tier: "semantic",
591
+ type: "length",
592
+ group: "Space",
593
+ source: css("calc(var(--k-unit) * 24)"),
594
+ doc: "Sections of a page (the intro, the updates, each PR), a hairline in the middle."
595
+ },
596
+ {
597
+ name: "space-column",
598
+ tier: "semantic",
599
+ type: "length",
600
+ group: "Space",
601
+ source: css("calc(var(--k-unit) * 6)"),
602
+ doc: "Columns: a contents rail and the page, media side by side."
603
+ },
604
+ {
605
+ name: "pad-page",
606
+ tier: "semantic",
607
+ type: "length",
608
+ group: "Space",
609
+ source: css("calc(var(--k-unit) * 6)"),
610
+ doc: "A page's edge; 16px under 640px wide."
611
+ },
612
+ {
613
+ name: "pad-card",
614
+ tier: "semantic",
615
+ type: "length",
616
+ group: "Space",
617
+ source: css("calc(var(--k-unit) * 3)"),
618
+ doc: "Inside a card or popover."
619
+ },
620
+ {
621
+ name: "type-heading",
622
+ tier: "semantic",
623
+ type: "length",
624
+ group: "Type",
625
+ source: value("20px"),
626
+ doc: "A page's title, weight 500."
627
+ },
628
+ {
629
+ name: "leading-heading",
630
+ tier: "semantic",
631
+ type: "length",
632
+ group: "Type",
633
+ source: value("28px"),
634
+ doc: "Line height for type-heading."
635
+ },
636
+ {
637
+ name: "type-title",
638
+ tier: "semantic",
639
+ type: "length",
640
+ group: "Type",
641
+ source: value("16px"),
642
+ doc: "Section titles (under their kicker), weight 500."
643
+ },
644
+ {
645
+ name: "leading-title",
646
+ tier: "semantic",
647
+ type: "length",
648
+ group: "Type",
649
+ source: value("24px"),
650
+ doc: "Line height for type-title."
651
+ },
652
+ {
653
+ name: "type-body",
654
+ tier: "semantic",
655
+ type: "length",
656
+ group: "Type",
657
+ source: value("13px"),
658
+ doc: "Prose, questions, list rows, step titles; 400, or 500 for emphasis."
659
+ },
660
+ {
661
+ name: "leading-body",
662
+ tier: "semantic",
663
+ type: "length",
664
+ group: "Type",
665
+ source: value("20px"),
666
+ doc: "Line height for type-body."
667
+ },
668
+ {
669
+ name: "type-label",
670
+ tier: "semantic",
671
+ type: "length",
672
+ group: "Type",
673
+ source: value("12px"),
674
+ doc: "Mono inside body text: code and paths."
675
+ },
676
+ {
677
+ name: "leading-label",
678
+ tier: "semantic",
679
+ type: "length",
680
+ group: "Type",
681
+ source: value("16px"),
682
+ doc: "Line height for type-label."
683
+ },
684
+ {
685
+ name: "type-small",
686
+ tier: "semantic",
687
+ type: "length",
688
+ group: "Type",
689
+ source: value("11px"),
690
+ doc: "Meta, controls, keys, timestamps; mono inside labels."
691
+ },
692
+ {
693
+ name: "leading-small",
694
+ tier: "semantic",
695
+ type: "length",
696
+ group: "Type",
697
+ source: value("16px"),
698
+ doc: "Line height for type-small."
699
+ },
540
700
  {
541
701
  name: "font-size",
542
702
  tier: "semantic",
@@ -409,6 +409,24 @@ export declare const TOKENS: readonly [{
409
409
  readonly css: "var(--k-warn)";
410
410
  };
411
411
  readonly doc: "Modified lines.";
412
+ }, {
413
+ readonly name: "before";
414
+ readonly tier: "semantic";
415
+ readonly type: "color";
416
+ readonly group: "Data";
417
+ readonly source: {
418
+ readonly css: "var(--k-fg-3)";
419
+ };
420
+ readonly doc: "Before in a comparison, and only Before: its label and side of the seam. Neutral unless a theme gives it a colour.";
421
+ }, {
422
+ readonly name: "after";
423
+ readonly tier: "semantic";
424
+ readonly type: "color";
425
+ readonly group: "Data";
426
+ readonly source: {
427
+ readonly css: "var(--k-fg)";
428
+ };
429
+ readonly doc: "After in a comparison, and only After.";
412
430
  }, {
413
431
  readonly name: "series-1";
414
432
  readonly tier: "semantic";
@@ -510,6 +528,168 @@ export declare const TOKENS: readonly [{
510
528
  readonly value: "288px";
511
529
  };
512
530
  readonly doc: "Panel width.";
531
+ }, {
532
+ readonly name: "space-inside";
533
+ readonly tier: "semantic";
534
+ readonly type: "length";
535
+ readonly group: "Space";
536
+ readonly source: {
537
+ readonly css: "var(--k-unit)";
538
+ };
539
+ readonly doc: "Parts of one thing: an icon and its label, a meta line and its title.";
540
+ }, {
541
+ readonly name: "space-sibling";
542
+ readonly tier: "semantic";
543
+ readonly type: "length";
544
+ readonly group: "Space";
545
+ readonly source: {
546
+ readonly css: "calc(var(--k-unit) * 2)";
547
+ };
548
+ readonly doc: "Siblings in a group: buttons in a row, a list item's lines.";
549
+ }, {
550
+ readonly name: "space-title";
551
+ readonly tier: "semantic";
552
+ readonly type: "length";
553
+ readonly group: "Space";
554
+ readonly source: {
555
+ readonly css: "calc(var(--k-unit) * 3)";
556
+ };
557
+ readonly doc: "A heading and what it heads.";
558
+ }, {
559
+ readonly name: "space-group";
560
+ readonly tier: "semantic";
561
+ readonly type: "length";
562
+ readonly group: "Space";
563
+ readonly source: {
564
+ readonly css: "calc(var(--k-unit) * 12)";
565
+ };
566
+ readonly doc: "Groups inside a section (prose, video, diff), stacked media, feed items (a hairline in the middle).";
567
+ }, {
568
+ readonly name: "space-section";
569
+ readonly tier: "semantic";
570
+ readonly type: "length";
571
+ readonly group: "Space";
572
+ readonly source: {
573
+ readonly css: "calc(var(--k-unit) * 24)";
574
+ };
575
+ readonly doc: "Sections of a page (the intro, the updates, each PR), a hairline in the middle.";
576
+ }, {
577
+ readonly name: "space-column";
578
+ readonly tier: "semantic";
579
+ readonly type: "length";
580
+ readonly group: "Space";
581
+ readonly source: {
582
+ readonly css: "calc(var(--k-unit) * 6)";
583
+ };
584
+ readonly doc: "Columns: a contents rail and the page, media side by side.";
585
+ }, {
586
+ readonly name: "pad-page";
587
+ readonly tier: "semantic";
588
+ readonly type: "length";
589
+ readonly group: "Space";
590
+ readonly source: {
591
+ readonly css: "calc(var(--k-unit) * 6)";
592
+ };
593
+ readonly doc: "A page's edge; 16px under 640px wide.";
594
+ }, {
595
+ readonly name: "pad-card";
596
+ readonly tier: "semantic";
597
+ readonly type: "length";
598
+ readonly group: "Space";
599
+ readonly source: {
600
+ readonly css: "calc(var(--k-unit) * 3)";
601
+ };
602
+ readonly doc: "Inside a card or popover.";
603
+ }, {
604
+ readonly name: "type-heading";
605
+ readonly tier: "semantic";
606
+ readonly type: "length";
607
+ readonly group: "Type";
608
+ readonly source: {
609
+ readonly value: "20px";
610
+ };
611
+ readonly doc: "A page's title, weight 500.";
612
+ }, {
613
+ readonly name: "leading-heading";
614
+ readonly tier: "semantic";
615
+ readonly type: "length";
616
+ readonly group: "Type";
617
+ readonly source: {
618
+ readonly value: "28px";
619
+ };
620
+ readonly doc: "Line height for type-heading.";
621
+ }, {
622
+ readonly name: "type-title";
623
+ readonly tier: "semantic";
624
+ readonly type: "length";
625
+ readonly group: "Type";
626
+ readonly source: {
627
+ readonly value: "16px";
628
+ };
629
+ readonly doc: "Section titles (under their kicker), weight 500.";
630
+ }, {
631
+ readonly name: "leading-title";
632
+ readonly tier: "semantic";
633
+ readonly type: "length";
634
+ readonly group: "Type";
635
+ readonly source: {
636
+ readonly value: "24px";
637
+ };
638
+ readonly doc: "Line height for type-title.";
639
+ }, {
640
+ readonly name: "type-body";
641
+ readonly tier: "semantic";
642
+ readonly type: "length";
643
+ readonly group: "Type";
644
+ readonly source: {
645
+ readonly value: "13px";
646
+ };
647
+ readonly doc: "Prose, questions, list rows, step titles; 400, or 500 for emphasis.";
648
+ }, {
649
+ readonly name: "leading-body";
650
+ readonly tier: "semantic";
651
+ readonly type: "length";
652
+ readonly group: "Type";
653
+ readonly source: {
654
+ readonly value: "20px";
655
+ };
656
+ readonly doc: "Line height for type-body.";
657
+ }, {
658
+ readonly name: "type-label";
659
+ readonly tier: "semantic";
660
+ readonly type: "length";
661
+ readonly group: "Type";
662
+ readonly source: {
663
+ readonly value: "12px";
664
+ };
665
+ readonly doc: "Mono inside body text: code and paths.";
666
+ }, {
667
+ readonly name: "leading-label";
668
+ readonly tier: "semantic";
669
+ readonly type: "length";
670
+ readonly group: "Type";
671
+ readonly source: {
672
+ readonly value: "16px";
673
+ };
674
+ readonly doc: "Line height for type-label.";
675
+ }, {
676
+ readonly name: "type-small";
677
+ readonly tier: "semantic";
678
+ readonly type: "length";
679
+ readonly group: "Type";
680
+ readonly source: {
681
+ readonly value: "11px";
682
+ };
683
+ readonly doc: "Meta, controls, keys, timestamps; mono inside labels.";
684
+ }, {
685
+ readonly name: "leading-small";
686
+ readonly tier: "semantic";
687
+ readonly type: "length";
688
+ readonly group: "Type";
689
+ readonly source: {
690
+ readonly value: "16px";
691
+ };
692
+ readonly doc: "Line height for type-small.";
513
693
  }, {
514
694
  readonly name: "font-size";
515
695
  readonly tier: "semantic";