@luci-dev/ui 0.0.0-stage → 0.5.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.
Files changed (56) hide show
  1. package/LICENSE +21 -0
  2. package/dist/about.d.ts +10 -0
  3. package/dist/about.d.ts.map +1 -0
  4. package/dist/about.js +10 -0
  5. package/dist/about.js.map +1 -0
  6. package/dist/components.d.ts +80 -0
  7. package/dist/components.d.ts.map +1 -0
  8. package/dist/components.js +59 -0
  9. package/dist/components.js.map +1 -0
  10. package/dist/copy.d.ts +88 -0
  11. package/dist/copy.d.ts.map +1 -0
  12. package/dist/copy.js +64 -0
  13. package/dist/copy.js.map +1 -0
  14. package/dist/fonts.d.ts +4 -0
  15. package/dist/fonts.d.ts.map +1 -0
  16. package/dist/fonts.data.d.ts +18 -0
  17. package/dist/fonts.data.d.ts.map +1 -0
  18. package/dist/fonts.data.js +23 -0
  19. package/dist/fonts.data.js.map +1 -0
  20. package/dist/fonts.js +38 -0
  21. package/dist/fonts.js.map +1 -0
  22. package/dist/icon.d.ts +14 -0
  23. package/dist/icon.d.ts.map +1 -0
  24. package/dist/icon.js +12 -0
  25. package/dist/icon.js.map +1 -0
  26. package/dist/icons.d.ts +52 -0
  27. package/dist/icons.d.ts.map +1 -0
  28. package/dist/icons.js +53 -0
  29. package/dist/icons.js.map +1 -0
  30. package/dist/index.d.ts +12 -0
  31. package/dist/index.d.ts.map +1 -0
  32. package/dist/index.js +12 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/mascot/art.d.ts +46 -0
  35. package/dist/mascot/art.d.ts.map +1 -0
  36. package/dist/mascot/art.js +47 -0
  37. package/dist/mascot/art.js.map +1 -0
  38. package/dist/mascot/mascot.d.ts +37 -0
  39. package/dist/mascot/mascot.d.ts.map +1 -0
  40. package/dist/mascot/mascot.js +72 -0
  41. package/dist/mascot/mascot.js.map +1 -0
  42. package/dist/shortcuts.d.ts +12 -0
  43. package/dist/shortcuts.d.ts.map +1 -0
  44. package/dist/shortcuts.js +38 -0
  45. package/dist/shortcuts.js.map +1 -0
  46. package/dist/styles.d.ts +5 -0
  47. package/dist/styles.d.ts.map +1 -0
  48. package/dist/styles.js +236 -0
  49. package/dist/styles.js.map +1 -0
  50. package/dist/tokens.d.ts +174 -0
  51. package/dist/tokens.d.ts.map +1 -0
  52. package/dist/tokens.js +222 -0
  53. package/dist/tokens.js.map +1 -0
  54. package/package.json +22 -3
  55. package/src/tokens.css +200 -0
  56. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"art.js","sourceRoot":"","sources":["../../src/mascot/art.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,uGAAuG;AACvG,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,SAAS,EAAE,uqTAAuqT;IAClrT,SAAS,EAAE,46VAA46V;IACv7V,KAAK,EAAE,o1OAAo1O;IAC31O,SAAS,EAAE,yyVAAyyV;IACpzV,SAAS,EAAE,0rMAA0rM;IACrsM,MAAM,EAAE,q7LAAq7L;IAC77L,SAAS,EAAE,grUAAgrU;IAC3rU,MAAM,EAAE,qmUAAqmU;IAC7mU,KAAK,EAAE,uwBAAuwB;IAC9wB,MAAM,EAAE,qxNAAqxN;IAC7xN,OAAO,EAAE,uuUAAuuU;IAChvU,OAAO,EAAE,00UAA00U;IACn1U,MAAM,EAAE,4kVAA4kV;IACplV,KAAK,EAAE,kgTAAkgT;IACzgT,QAAQ,EAAE,+sUAA+sU;IACztU,OAAO,EAAE,2wMAA2wM;IACpxM,WAAW,EAAE,+nRAA+nR;IAC5oR,QAAQ,EAAE,+oVAA+oV;IACzpV,QAAQ,EAAE,2/HAA2/H;CAC7/H,CAAC;AACX,kFAAkF;AAClF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,OAAO,EAAE,y6KAAy6K;IACl7K,SAAS,EAAE,spMAAspM;IACjqM,QAAQ,EAAE,qwJAAqwJ;IAC/wJ,MAAM,EAAE,+8LAA+8L;IACv9L,SAAS,EAAE,67LAA67L;IACx8L,WAAW,EAAE,oiKAAoiK;IACjjK,aAAa,EAAE,k+LAAk+L;CACz+L,CAAC;AACX,qCAAqC;AACrC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,sBAAsB,EAAE,u6MAAu6M;IAC/7M,iBAAiB,EAAE,01MAA01M;IAC72M,cAAc,EAAE,u1MAAu1M;IACv2M,WAAW,EAAE,g9LAAg9L;IAC79L,MAAM,EAAE,u1LAAu1L;IAC/1L,eAAe,EAAE,2mBAA2mB;IAC5nB,eAAe,EAAE,qiBAAqiB;IACtjB,UAAU,EAAE,qiBAAqiB;CACziB,CAAC;AACX,gCAAgC;AAChC,MAAM,CAAC,MAAM,cAAc,GAAG,qhQAAqhQ,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { FACE_SVG } from './art.js';
2
+ /** brand/BRAND.md section 5. "hello" is the sitting pose with the slow-blink greeting. */
3
+ export type MascotPose = 'sit' | 'hello' | 'head' | 'peek' | 'measure' | 'box' | 'sleep' | 'content' | 'annoyed' | 'turned' | 'slowblink' | 'press' | 'read' | 'swatch' | 'compare' | 'note' | 'arrange' | 'place' | 'sketch';
4
+ export type MascotFace = keyof typeof FACE_SVG;
5
+ /** Below this width "Lucifer" on the collar cannot be read, so the art leaves it out (BRAND.md section 5). */
6
+ export declare const COLLAR_NAME_MIN_SIZE = 200;
7
+ export interface MascotArtOptions {
8
+ /** false renders him still. Under prefers-reduced-motion the kit's CSS stops every loop anyway. */
9
+ animated?: boolean;
10
+ /** Meaningful use: role="img" with this label. Without it the art is decorative (aria-hidden). */
11
+ label?: string;
12
+ /** false leaves the collar name out (for small sizes). Default: kept, as in the kit. */
13
+ name?: boolean;
14
+ }
15
+ /** The pose as an SVG string, ready to inline. */
16
+ export declare function mascotSvg(pose: MascotPose, opts?: MascotArtOptions): string;
17
+ /** A small face (48 px) for toasts and inline messages, as an SVG string. */
18
+ export declare function faceSvg(face: MascotFace, opts?: MascotArtOptions): string;
19
+ export interface MascotProps extends MascotArtOptions {
20
+ pose: MascotPose;
21
+ /** Width in px (the kit's minimum for full-body poses is 96; avatars may be smaller). */
22
+ size?: number;
23
+ class?: string;
24
+ }
25
+ export declare function Mascot(props: MascotProps): import("preact").JSX.Element;
26
+ export declare function Face(props: {
27
+ face: MascotFace;
28
+ size?: number;
29
+ label?: string;
30
+ animated?: boolean;
31
+ }): import("preact").JSX.Element;
32
+ /** Luci's head in a Ginger 500 circle: the menu button and avatar (BRAND.md section 8). */
33
+ export declare function LuciAvatar(props: {
34
+ size?: number;
35
+ animated?: boolean;
36
+ }): import("preact").JSX.Element;
37
+ //# sourceMappingURL=mascot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mascot.d.ts","sourceRoot":"","sources":["../../src/mascot/mascot.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAY,MAAM,UAAU,CAAC;AAE9C,0FAA0F;AAC1F,MAAM,MAAM,UAAU,GAClB,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAC7C,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAEhE,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AACtF,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE/C,8GAA8G;AAC9G,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,MAAM,WAAW,gBAAgB;IAC/B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kGAAkG;IAClG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAiCD,kDAAkD;AAClD,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,GAAE,gBAAqB,GAAG,MAAM,CAK/E;AAED,6EAA6E;AAC7E,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,GAAE,gBAAqB,GAAG,MAAM,CAE7E;AAED,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACnD,IAAI,EAAE,UAAU,CAAC;IACjB,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAOD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,gCAKxC;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,gCAIlG;AAED,2FAA2F;AAC3F,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,gCAOtE"}
@@ -0,0 +1,72 @@
1
+ import { jsx as _jsx } from "preact/jsx-runtime";
2
+ /**
3
+ * Luci, inline. One component for every mascot use (brand/CLAUDE-CODE-GUIDE.md section 5): the kit's
4
+ * layered SVGs are inlined unchanged so luci-animations.css can move their named parts. Only the
5
+ * root's size, accessibility attributes and (per instance) clip-path ids are rewritten.
6
+ */
7
+ import { useMemo } from 'preact/hooks';
8
+ import { FACE_SVG, POSE_SVG } from './art.js';
9
+ /** Below this width "Lucifer" on the collar cannot be read, so the art leaves it out (BRAND.md section 5). */
10
+ export const COLLAR_NAME_MIN_SIZE = 200;
11
+ let instances = 0;
12
+ /** Give every id in the SVG (and every reference to one) a prefix unique to this instance. */
13
+ function uniqueIds(svg) {
14
+ const prefix = `luci${++instances}-`;
15
+ const ids = [...svg.matchAll(/\sid="([^"]+)"/g)].map(m => m[1]);
16
+ let out = svg;
17
+ for (const id of ids) {
18
+ const esc = id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
19
+ out = out
20
+ .replace(new RegExp(`(\\sid=")${esc}(")`, 'g'), `$1${prefix}${id}$2`)
21
+ .replace(new RegExp(`url\\(#${esc}\\)`, 'g'), `url(#${prefix}${id})`)
22
+ .replace(new RegExp(`(href=")#${esc}(")`, 'g'), `$1#${prefix}${id}$2`);
23
+ }
24
+ return out;
25
+ }
26
+ /** Rewrite the root element: classes, no fixed pixel size, accessibility. */
27
+ function rootAttributes(svg, extraClass, opts) {
28
+ return svg.replace(/^<svg\b([^>]*)>/, (_m, attrs) => {
29
+ let a = attrs
30
+ .replace(/\s(width|height)="[^"]*"/g, '')
31
+ .replace(/\srole="[^"]*"/, '')
32
+ .replace(/\saria-label="[^"]*"/, '')
33
+ .replace(/\sclass="([^"]*)"/, (_c, cls) => ` class="${cls}${extraClass}"`);
34
+ if (!/\sclass="/.test(a))
35
+ a += ` class="luci${extraClass}"`;
36
+ a += opts.label ? ` role="img" aria-label="${opts.label.replace(/"/g, '&quot;')}"` : ' aria-hidden="true" focusable="false"';
37
+ return `<svg${a}>`;
38
+ });
39
+ }
40
+ /** The pose as an SVG string, ready to inline. */
41
+ export function mascotSvg(pose, opts = {}) {
42
+ const file = pose === 'hello' ? POSE_SVG.sit : POSE_SVG[pose];
43
+ const extra = `${pose === 'hello' ? ' luci-hello' : ''}${opts.animated === false ? ' luci-still' : ''}`;
44
+ const art = opts.name === false ? file.replace(/<g class="luci-name"[^>]*>.*?<\/g>/, '') : file;
45
+ return uniqueIds(rootAttributes(art, extra, opts));
46
+ }
47
+ /** A small face (48 px) for toasts and inline messages, as an SVG string. */
48
+ export function faceSvg(face, opts = {}) {
49
+ return uniqueIds(rootAttributes(FACE_SVG[face], opts.animated === false ? ' luci-still' : '', opts));
50
+ }
51
+ /*
52
+ * The SVG is built once per instance and kept while the pose stays the same. Building it on every
53
+ * render would give it new ids, so Preact would replace the SVG each time: Luci's loops would restart
54
+ * on every state change, and a fresh (running) copy would undo Feedback's Pause.
55
+ */
56
+ export function Mascot(props) {
57
+ const { pose, size = 96, animated, label } = props;
58
+ const name = size >= COLLAR_NAME_MIN_SIZE;
59
+ const html = useMemo(() => mascotSvg(pose, { ...(animated === undefined ? {} : { animated }), ...(label ? { label } : {}), name }), [pose, animated, label, name]);
60
+ return _jsx("span", { class: `mascot${props.class ? ` ${props.class}` : ''}`, "data-pose": pose, style: { width: `${size}px` }, dangerouslySetInnerHTML: { __html: html } });
61
+ }
62
+ export function Face(props) {
63
+ const { face, size = 48, label, animated } = props;
64
+ const html = useMemo(() => faceSvg(face, { ...(animated === undefined ? {} : { animated }), ...(label ? { label } : {}) }), [face, animated, label]);
65
+ return _jsx("span", { class: "mascot face", "data-face": face, style: { width: `${size}px` }, dangerouslySetInnerHTML: { __html: html } });
66
+ }
67
+ /** Luci's head in a Ginger 500 circle: the menu button and avatar (BRAND.md section 8). */
68
+ export function LuciAvatar(props) {
69
+ const size = props.size ?? 32;
70
+ return (_jsx("span", { class: "luci-avatar", style: { width: `${size}px`, height: `${size}px` }, children: _jsx(Mascot, { pose: "head", size: Math.round(size * 0.78), ...(props.animated === undefined ? {} : { animated: props.animated }) }) }));
71
+ }
72
+ //# sourceMappingURL=mascot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mascot.js","sourceRoot":"","sources":["../../src/mascot/mascot.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,12 @@
1
+ export interface Shortcut {
2
+ /** One letter, upper case ("C"), or a key name ("Escape"). */
3
+ key: string;
4
+ run: () => void;
5
+ enabled?: boolean;
6
+ }
7
+ /** Is the key going into a field, a text area or editable content (the page's or Luci's own)? */
8
+ export declare function typingIn(e: KeyboardEvent): boolean;
9
+ /** The shortcut a key press means, if any (exported for tests). */
10
+ export declare function shortcutFor(e: KeyboardEvent, shortcuts: readonly Shortcut[]): Shortcut | undefined;
11
+ export declare function useShortcuts(doc: Document, shortcuts: readonly Shortcut[], active?: boolean): void;
12
+ //# sourceMappingURL=shortcuts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortcuts.d.ts","sourceRoot":"","sources":["../src/shortcuts.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,QAAQ;IACvB,8DAA8D;IAC9D,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iGAAiG;AACjG,wBAAgB,QAAQ,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO,CAGlD;AAED,mEAAmE;AACnE,wBAAgB,WAAW,CAAC,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,QAAQ,EAAE,GAAG,QAAQ,GAAG,SAAS,CAIlG;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,QAAQ,EAAE,EAAE,MAAM,UAAO,GAAG,IAAI,CAe/F"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Single-key shortcuts for Luci's toolbars (DESIGN.md section 7: tooltips show the name and the
3
+ * key). A key works only while that surface is open, never while the person types (in the page or in
4
+ * Luci), and never with Ctrl, Alt, Meta or Shift, so the page's own shortcuts keep working. A key Luci
5
+ * handles stops there; every other key reaches the page.
6
+ */
7
+ import { useEffect, useRef } from 'preact/hooks';
8
+ /** Is the key going into a field, a text area or editable content (the page's or Luci's own)? */
9
+ export function typingIn(e) {
10
+ const t = e.composedPath()[0];
11
+ return Boolean(t && ((t.tagName && /^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)) || t.isContentEditable));
12
+ }
13
+ /** The shortcut a key press means, if any (exported for tests). */
14
+ export function shortcutFor(e, shortcuts) {
15
+ if (e.defaultPrevented || e.repeat || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey || typingIn(e))
16
+ return undefined;
17
+ const key = e.key.length === 1 ? e.key.toUpperCase() : e.key;
18
+ return shortcuts.find(s => s.key === key && s.enabled !== false);
19
+ }
20
+ export function useShortcuts(doc, shortcuts, active = true) {
21
+ const current = useRef(shortcuts);
22
+ current.current = shortcuts;
23
+ useEffect(() => {
24
+ if (!active)
25
+ return;
26
+ const onKey = (e) => {
27
+ const s = shortcutFor(e, current.current);
28
+ if (!s)
29
+ return;
30
+ e.preventDefault();
31
+ e.stopPropagation();
32
+ s.run();
33
+ };
34
+ doc.addEventListener('keydown', onKey, true);
35
+ return () => doc.removeEventListener('keydown', onKey, true);
36
+ }, [doc, active]);
37
+ }
38
+ //# sourceMappingURL=shortcuts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shortcuts.js","sourceRoot":"","sources":["../src/shortcuts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AASjD,iGAAiG;AACjG,MAAM,UAAU,QAAQ,CAAC,CAAgB;IACvC,MAAM,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CAAkE,CAAC;IAC/F,OAAO,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC3G,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,WAAW,CAAC,CAAgB,EAAE,SAA8B;IAC1E,IAAI,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IACxH,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IAC7D,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,GAAa,EAAE,SAA8B,EAAE,MAAM,GAAG,IAAI;IACvF,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAClC,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAC5B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,MAAM,KAAK,GAAG,CAAC,CAAgB,EAAE,EAAE;YACjC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YAC1C,IAAI,CAAC,CAAC;gBAAE,OAAO;YACf,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,CAAC,CAAC,GAAG,EAAE,CAAC;QACV,CAAC,CAAC;QACF,GAAG,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC7C,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,mBAAmB,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC/D,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AACpB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const BASE_CSS = "\n.luci-theme {\n /* Buttons: md is 40 px with 15 px labels (DESIGN.md section 6); a compact surface sets sm as its default */\n --luci-btn-h: 40px;\n --luci-btn-font: 15px;\n --luci-btn-line: 20px;\n --luci-btn-pad: var(--luci-space-16);\n font-family: var(--luci-font-body);\n font-size: var(--luci-type-body-size);\n line-height: var(--luci-type-body-line);\n font-weight: var(--luci-type-body-weight);\n color: var(--luci-color-ink);\n -webkit-font-smoothing: antialiased;\n}\n.luci-theme *, .luci-theme *::before, .luci-theme *::after { box-sizing: border-box; }\n.luci-theme :where(button, input, select, textarea) { font: inherit; color: inherit; }\n.luci-theme :where(code, kbd, pre, samp) { font-family: var(--luci-font-code); }\n.luci-theme :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {\n outline: 2px solid var(--luci-color-focus);\n outline-offset: 2px;\n}\n/* Type roles */\n.t-display { font: var(--luci-type-display-weight) var(--luci-type-display-size)/var(--luci-type-display-line) var(--luci-font-display); }\n.t-title { font: var(--luci-type-title-weight) var(--luci-type-title-size)/var(--luci-type-title-line) var(--luci-font-display); margin: 0; }\n.t-heading { font: var(--luci-type-heading-weight) var(--luci-type-heading-size)/var(--luci-type-heading-line) var(--luci-font-body); margin: 0; }\n.t-small { font-size: var(--luci-type-small-size); line-height: var(--luci-type-small-line); font-weight: var(--luci-type-small-weight); }\n.t-micro { font-size: var(--luci-type-micro-size); line-height: var(--luci-type-micro-line); font-weight: var(--luci-type-micro-weight); }\n.t-code { font: var(--luci-type-code-weight) var(--luci-type-code-size)/var(--luci-type-code-line) var(--luci-font-code); }\n.overline { font-size: var(--luci-type-micro-size); line-height: var(--luci-type-micro-line); font-weight: var(--luci-type-micro-weight);\n letter-spacing: 0.06em; text-transform: uppercase; color: var(--luci-color-link); }\n/* Icons follow the text colour */\n.icon { flex: none; display: block; }\n/* The mascot */\n.mascot { display: inline-block; flex: none; line-height: 0; }\n.mascot svg { display: block; width: 100%; height: auto; }\n.luci-still, .luci-still * { animation: none !important; }\n.luci-avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: var(--luci-radius-full);\n background: var(--luci-color-primary); overflow: hidden; }\n/* Reduced motion: UI transitions become instant; the kit's CSS stops the mascot loops */\n@media (prefers-reduced-motion: reduce) {\n .luci-theme *, .luci-theme *::before, .luci-theme *::after { transition-duration: 0s !important; }\n}\n";
2
+ export declare const COMPONENTS_CSS = "\n/*\n * Button (DESIGN.md section 6). Variants: btn-primary, btn-secondary, btn-outline, btn-ghost (also a\n * bare button), btn-danger, btn-link; btn-icon for icon-only (square, round). Sizes: btn-sm 32,\n * btn-md 40, btn-lg 48 (default: the surface's). States: hover, :active (pressed), :focus-visible,\n * :disabled, aria-pressed=\"true\" (toggled on), aria-busy=\"true\" (working).\n */\n.luci-theme button {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n min-height: var(--luci-btn-h);\n padding: calc((var(--luci-btn-h) - var(--luci-btn-line)) / 2) var(--luci-btn-pad);\n border: 0;\n border-radius: var(--luci-radius-full);\n background: transparent;\n color: var(--luci-color-ink);\n font-size: var(--luci-btn-font);\n font-weight: 600;\n line-height: var(--luci-btn-line);\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n transition: background-color var(--luci-motion-fast), color var(--luci-motion-fast), transform var(--luci-motion-fast);\n}\n/* Every button is a 44 px target, even when it is drawn 32 px tall */\n.luci-theme button::before { content: \"\"; position: absolute; inset: min(0px, calc((var(--luci-btn-h) - var(--luci-size-touch-target)) / 2)) 0; }\n.luci-theme button:hover:not(:disabled) { background: var(--luci-color-ghost-hover); }\n.luci-theme button:active:not(:disabled) { transform: translateY(1px); }\n.luci-theme button:disabled { color: var(--luci-color-ink-disabled); background: transparent; cursor: not-allowed; }\n.luci-theme button[aria-busy=\"true\"] { cursor: progress; }\n/* On (a tool, a toggle, a segment): one look everywhere, the kit's active tool fill (ginger-400, Charcoal text, 6.9:1) */\n.luci-theme button[aria-pressed=\"true\"]:not(.btn-primary),\n.luci-theme button[aria-pressed=\"true\"]:not(.btn-primary):hover:not(:disabled) { background: var(--luci-color-tool-active); color: var(--luci-color-on-tool-active); }\n/* A small count on a button */\n.btn-badge { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--luci-radius-full);\n background: var(--luci-color-accent); color: var(--luci-color-on-accent); font: 600 11px/18px var(--luci-font-body); text-align: center; pointer-events: none; }\n\n/* Sizes */\n.luci-theme .btn-sm { --luci-btn-h: 32px; --luci-btn-font: var(--luci-type-small-size); --luci-btn-line: var(--luci-type-small-line); --luci-btn-pad: var(--luci-space-12); }\n.luci-theme .btn-md { --luci-btn-h: 40px; --luci-btn-font: 15px; --luci-btn-line: 20px; --luci-btn-pad: var(--luci-space-16); }\n.luci-theme .btn-lg { --luci-btn-h: 48px; --luci-btn-font: 15px; --luci-btn-line: 20px; --luci-btn-pad: var(--luci-space-20); }\n\n/* Text with an icon, and icon only */\n.luci-theme .btn-with-ico { display: inline-flex; align-items: center; justify-content: center; gap: var(--luci-space-8); padding-block: 0; }\n.luci-theme .btn-with-ico .icon { margin-inline-start: calc(var(--luci-space-4) * -1); }\n.luci-theme .btn-icon { display: inline-flex; align-items: center; justify-content: center; width: var(--luci-btn-h); height: var(--luci-btn-h); padding: 0; }\n.luci-theme .btn-icon::before { inset: min(0px, calc((var(--luci-btn-h) - var(--luci-size-touch-target)) / 2)); }\n\n/* Variants */\n.luci-theme .btn-primary { background: var(--luci-color-primary); color: var(--luci-color-on-primary); }\n.luci-theme .btn-primary:hover:not(:disabled) { background: var(--luci-color-primary-hover); }\n.luci-theme .btn-primary:disabled { background: var(--luci-color-surface-sunken); color: var(--luci-color-ink-disabled); }\n.luci-theme .btn-secondary { background: var(--luci-color-surface-raised); border: 1px solid var(--luci-color-stroke-subtle);\n padding-block: calc((var(--luci-btn-h) - var(--luci-btn-line)) / 2 - 1px); }\n.luci-theme .btn-secondary:hover:not(:disabled) { background: var(--luci-color-secondary-hover); }\n.luci-theme .btn-secondary:disabled { background: var(--luci-color-surface-raised); }\n.luci-theme .btn-outline { background: transparent; border: 1px solid var(--luci-color-stroke-subtle);\n padding-block: calc((var(--luci-btn-h) - var(--luci-btn-line)) / 2 - 1px); }\n.luci-theme .btn-outline:hover:not(:disabled) { background: var(--luci-color-ghost-hover); border-color: var(--luci-color-stroke-strong); }\n.luci-theme :is(.btn-secondary, .btn-outline):is(.btn-with-ico, .btn-icon) { padding-block: 0; }\n.luci-theme .btn-ghost { background: transparent; }\n.luci-theme .btn-danger { background: var(--luci-color-danger-bg); color: var(--luci-color-danger); }\n.luci-theme .btn-danger:hover:not(:disabled) { background: var(--luci-color-danger-hover); }\n.luci-theme .btn-danger:disabled { background: var(--luci-color-danger-bg); color: var(--luci-color-danger); opacity: 0.5; }\n.luci-theme .btn-link { min-height: 0; padding: 0; border-radius: var(--luci-radius-sm); background: transparent; color: var(--luci-color-link);\n font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;\n transition: text-decoration-color var(--luci-motion-fast); }\n.luci-theme .btn-link:hover:not(:disabled) { background: transparent; text-decoration-color: currentColor; }\n.luci-theme .btn-link:active:not(:disabled) { transform: none; }\n.luci-theme .btn-link::before { inset: -8px -4px; }\n/* Working: the label stays for layout, a ring turns over it */\n.luci-theme button[aria-busy=\"true\"] > * { opacity: 0.4; }\n.badge, .count { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 var(--luci-space-8);\n border-radius: var(--luci-radius-full); font-size: var(--luci-type-micro-size); line-height: var(--luci-type-micro-line);\n font-weight: var(--luci-type-micro-weight); white-space: nowrap; }\n.badge { background: var(--luci-color-surface-sunken); color: var(--luci-color-ink); }\n.badge.brand { background: var(--luci-color-primary-soft); color: var(--luci-color-link); }\n.count { min-width: 22px; background: var(--luci-color-accent); color: var(--luci-color-on-accent); }\n\n/* Status message and toast: tinted fill, the status icon and coloured title, Charcoal detail, no stroke */\n.status-msg { display: flex; gap: var(--luci-space-12); align-items: flex-start; margin: 0; padding: var(--luci-space-12) var(--luci-space-16);\n border-radius: var(--luci-radius-lg); background: var(--status-bg); color: var(--luci-color-muzzle-900); }\n.status-msg.success { --status: var(--luci-color-success); --status-bg: var(--luci-color-success-bg); }\n.status-msg.warning { --status: var(--luci-color-warning); --status-bg: var(--luci-color-warning-bg); }\n.status-msg.danger { --status: var(--luci-color-danger); --status-bg: var(--luci-color-danger-bg); }\n.status-msg.info { --status: var(--luci-color-info); --status-bg: var(--luci-color-info-bg); }\n.status-msg > .icon { color: var(--status); margin-top: 2px; }\n.status-msg .status-body { display: flex; flex-direction: column; gap: var(--luci-space-4); min-width: 0; }\n.status-msg .status-title { margin: 0; color: var(--status); font-size: var(--luci-type-heading-size); line-height: var(--luci-type-heading-line); font-weight: var(--luci-type-heading-weight); }\n.status-msg .status-detail { margin: 0; }\n.status-msg .mascot { width: 48px; }\n.toast { position: fixed; z-index: 2147483647; box-shadow: var(--luci-shadow-float); }\n\n/* Card and panel */\n.card { padding: var(--luci-space-24); border: 1px solid var(--luci-color-stroke-subtle); border-radius: var(--luci-radius-xl); background: var(--luci-color-surface-raised); }\n\n/* Input, select and text area */\n.luci-theme :where(input[type=\"text\"], input[type=\"search\"], input[type=\"number\"], input[type=\"url\"], input:not([type]), select, textarea) {\n min-height: var(--luci-btn-h);\n padding: 0 var(--luci-space-12);\n border: 1px solid var(--luci-color-stroke-subtle);\n border-radius: var(--luci-radius-sm);\n background-color: var(--luci-color-surface-raised);\n color: var(--luci-color-ink);\n transition: border-color var(--luci-motion-fast);\n}\n.luci-theme :where(textarea) { padding: var(--luci-space-8) var(--luci-space-12); resize: vertical; }\n/* Select: the component wraps it with the kit's chevron icon, 12 px from the edge */\n.luci-theme :where(select) { appearance: none; padding-inline-end: 36px; text-overflow: ellipsis; cursor: pointer; }\n.select { position: relative; display: inline-flex; vertical-align: middle; min-width: 0; }\n.select > select { flex: 1 1 auto; min-width: 0; }\n.select > .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }\n.luci-theme :where(input, select, textarea):hover:not(:disabled) { border-color: var(--luci-color-stroke-strong); }\n.luci-theme ::placeholder { color: var(--luci-color-ink-secondary); opacity: 1; }\n.luci-theme :where(input[type=\"checkbox\"], input[type=\"radio\"]) { accent-color: var(--luci-color-primary); }\n.field-error { display: flex; gap: var(--luci-space-4); align-items: center; margin: 0; color: var(--luci-color-danger);\n font-size: var(--luci-type-small-size); line-height: var(--luci-type-small-line); }\n\n/* The repository pill: GitHub's mark and Luci's version, in the code font (a link once the repository is public) */\n.luci-theme .repo-btn { position: relative; display: inline-flex; flex: none; align-items: center; gap: 6px; height: 32px; padding: 0 var(--luci-space-12);\n border: 1px solid var(--luci-color-stroke-subtle); border-radius: var(--luci-radius-full); background: var(--luci-color-surface-raised);\n color: var(--luci-color-ink); font: 600 13px/1 var(--luci-font-code); text-decoration: none; white-space: nowrap; }\n.luci-theme a.repo-btn:hover { background: var(--luci-color-ghost-hover); }\n.luci-theme a.repo-btn:focus-visible { outline: 2px solid var(--luci-color-focus); outline-offset: 2px; }\n.luci-theme .repo-btn .gh-mark { display: block; width: 16px; height: 16px; line-height: 0; }\n.luci-theme .repo-btn .gh-mark svg { display: block; width: 16px; height: 16px; }\n/* Tooltip host: relative positioning and raised z-index on hover so tooltips render above sibling elements */\n.luci-theme [data-tip] { position: relative; }\n.luci-theme [data-tip]:is(:hover, :focus-visible) { z-index: 10; }\n\n/* Tooltip: the text in data-tip; below the element, or above with data-tip-pos=\"above\". Shows after 300 ms. */\n.luci-theme [data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + var(--luci-space-8)); z-index: 10;\n width: max-content; max-width: 340px; box-sizing: border-box; padding: 6px 10px; border-radius: var(--luci-radius-md); background: var(--luci-color-ink);\n color: var(--luci-color-surface); font-size: var(--luci-type-small-size); line-height: var(--luci-type-small-line); font-weight: var(--luci-type-small-weight);\n white-space: pre-wrap; word-break: normal; overflow-wrap: break-word; text-align: left; pointer-events: none; opacity: 0; transform: translate(-50%, -4px);\n transition: opacity var(--luci-motion-exit), transform var(--luci-motion-exit); }\n.luci-theme [data-tip][data-tip-pos=\"above\"]::after { top: auto; bottom: calc(100% + var(--luci-space-8)); transform: translate(-50%, 4px); }\n.luci-theme [data-tip]:is(:hover, :focus-visible)::after { opacity: 1; transform: translate(-50%, 0);\n transition: opacity var(--luci-motion-base) 300ms, transform var(--luci-motion-base) 300ms; }\n\n/* Left-aligned tooltips (first button in rows, cards, or explicit data-tip-align=\"left\") open rightwards to prevent clipping inside cards/panels */\n.luci-theme [data-tip][data-tip-align=\"left\"]::after,\n.luci-theme .panel .actions > [data-tip]:first-child::after,\n.luci-theme .panel .row > [data-tip]:first-child::after {\n left: 0; right: auto; transform: translate(0, -4px);\n}\n.luci-theme [data-tip][data-tip-pos=\"above\"][data-tip-align=\"left\"]::after,\n.luci-theme .panel .actions > [data-tip]:first-child[data-tip-pos=\"above\"]::after,\n.luci-theme .panel .row > [data-tip]:first-child[data-tip-pos=\"above\"]::after {\n top: auto; bottom: calc(100% + var(--luci-space-8)); left: 0; right: auto; transform: translate(0, 4px);\n}\n.luci-theme [data-tip][data-tip-align=\"left\"]:is(:hover, :focus-visible)::after,\n.luci-theme .panel .actions > [data-tip]:first-child:is(:hover, :focus-visible)::after,\n.luci-theme .panel .row > [data-tip]:first-child:is(:hover, :focus-visible)::after {\n transform: translate(0, 0);\n}\n\n/* Right-aligned tooltips (repo button, last button in rows, cards, or explicit data-tip-align=\"right\") open leftwards */\n.luci-theme .repo-btn[data-tip]::after,\n.luci-theme [data-tip][data-tip-align=\"right\"]::after,\n.luci-theme .panel .actions > [data-tip]:last-child::after,\n.luci-theme .panel .row > [data-tip]:last-child::after {\n left: auto; right: 0; transform: translate(0, -4px);\n}\n.luci-theme .repo-btn[data-tip][data-tip-pos=\"above\"]::after,\n.luci-theme [data-tip][data-tip-pos=\"above\"][data-tip-align=\"right\"]::after,\n.luci-theme .panel .actions > [data-tip]:last-child[data-tip-pos=\"above\"]::after,\n.luci-theme .panel .row > [data-tip]:last-child[data-tip-pos=\"above\"]::after {\n top: auto; bottom: calc(100% + var(--luci-space-8)); left: auto; right: 0; transform: translate(0, 4px);\n}\n.luci-theme .repo-btn[data-tip]:is(:hover, :focus-visible)::after,\n.luci-theme [data-tip][data-tip-align=\"right\"]:is(:hover, :focus-visible)::after,\n.luci-theme .panel .actions > [data-tip]:last-child:is(:hover, :focus-visible)::after,\n.luci-theme .panel .row > [data-tip]:last-child:is(:hover, :focus-visible)::after {\n transform: translate(0, 0);\n}\n\n/* Empty state: Luci, a title, one line, an optional primary button */\n.empty { display: flex; flex-direction: column; align-items: center; gap: var(--luci-space-12); padding: var(--luci-space-24) var(--luci-space-16); text-align: center; }\n.empty .t-title { margin: 0; }\n.empty p:not(.t-title) { margin: 0; color: var(--luci-color-ink-secondary); }\n";
3
+ /** Everything a Luci surface needs in its shadow root, in order. */
4
+ export declare const UI_CSS = "/* Generated by scripts/brand-sync.mjs from brand/. Do not edit: run `pnpm brand:sync`. */\n:host, :root {\n --luci-color-ginger-50: #FEF5E8;\n --luci-color-ginger-100: #FEEBD1;\n --luci-color-ginger-200: #FCD7AA;\n --luci-color-ginger-300: #FBBE7A;\n --luci-color-ginger-400: #F6A24F;\n --luci-color-ginger-500: #EC862B;\n --luci-color-ginger-600: #D86D1D;\n --luci-color-ginger-700: #AD4F1A;\n --luci-color-ginger-800: #893D1B;\n --luci-color-ginger-900: #652D18;\n --luci-color-ginger-950: #451F12;\n --luci-color-collar-lime-100: #EAF5C7;\n --luci-color-collar-lime-300: #CBE66D;\n --luci-color-collar-lime-500: #B4D43C;\n --luci-color-collar-lime-700: #547617;\n --luci-color-nose-pink-100: #FFE4E1;\n --luci-color-nose-pink-300: #F5B9B4;\n --luci-color-nose-pink-500: #E79993;\n --luci-color-nose-pink-700: #AB5050;\n --luci-color-iris-gold-100: #F7F0CA;\n --luci-color-iris-gold-300: #E6D17A;\n --luci-color-iris-gold-500: #CBB042;\n --luci-color-iris-gold-700: #7B6813;\n --luci-color-success-100: #DFF3D5;\n --luci-color-success-700: #3F7932;\n --luci-color-warning-100: #FEEDC9;\n --luci-color-warning-700: #975F03;\n --luci-color-danger-100: #FFE3DF;\n --luci-color-danger-700: #C5372F;\n --luci-color-info-100: #D9F0F3;\n --luci-color-info-700: #1E767F;\n --luci-color-muzzle-0: #FDF9F6;\n --luci-color-muzzle-50: #F5EFEA;\n --luci-color-muzzle-100: #EBE5E0;\n --luci-color-muzzle-200: #DBD4CF;\n --luci-color-muzzle-300: #C2BCB8;\n --luci-color-muzzle-400: #A29D99;\n --luci-color-muzzle-500: #837F7C;\n --luci-color-muzzle-600: #656360;\n --luci-color-muzzle-700: #4F4D4B;\n --luci-color-muzzle-800: #3B3A39;\n --luci-color-muzzle-900: #2B2B2B;\n --luci-radius-sm: 8px;\n --luci-radius-md: 12px;\n --luci-radius-lg: 16px;\n --luci-radius-xl: 24px;\n --luci-radius-full: 9999px;\n --luci-space-4: 4px;\n --luci-space-8: 8px;\n --luci-space-12: 12px;\n --luci-space-16: 16px;\n --luci-space-20: 20px;\n --luci-space-24: 24px;\n --luci-space-32: 32px;\n --luci-space-40: 40px;\n --luci-space-48: 48px;\n --luci-space-64: 64px;\n --luci-space-80: 80px;\n --luci-font-display: \"Luci Fredoka\", Fredoka, \"Luci Inter\", Inter, sans-serif;\n --luci-font-body: \"Luci Inter\", Inter, system-ui, sans-serif;\n --luci-font-code: \"Luci JetBrains Mono\", 'JetBrains Mono', ui-monospace, monospace;\n --luci-type-display-size: 40px;\n --luci-type-display-line: 44px;\n --luci-type-display-weight: 600;\n --luci-type-title-size: 24px;\n --luci-type-title-line: 30px;\n --luci-type-title-weight: 600;\n --luci-type-heading-size: 17px;\n --luci-type-heading-line: 24px;\n --luci-type-heading-weight: 600;\n --luci-type-body-size: 15px;\n --luci-type-body-line: 22px;\n --luci-type-body-weight: 400;\n --luci-type-small-size: 13px;\n --luci-type-small-line: 18px;\n --luci-type-small-weight: 500;\n --luci-type-micro-size: 12px;\n --luci-type-micro-line: 16px;\n --luci-type-micro-weight: 600;\n --luci-type-code-size: 13px;\n --luci-type-code-line: 20px;\n --luci-type-code-weight: 500;\n --luci-shadow-float: 0 8px 24px rgba(43, 43, 43, 0.14);\n --luci-motion-fast: 150ms ease-out;\n --luci-motion-base: 200ms ease-out;\n --luci-motion-exit: 150ms ease-in;\n --luci-size-touch-target: 44px;\n --luci-size-toolbar-button: 48px;\n --luci-size-toolbar-icon: 22px;\n --luci-size-mascot-min: 96px;\n --luci-size-toast-face: 48px;\n --luci-color-surface: var(--luci-color-muzzle-50);\n --luci-color-surface-raised: var(--luci-color-muzzle-0);\n --luci-color-surface-sunken: var(--luci-color-muzzle-100);\n --luci-color-ink: var(--luci-color-muzzle-900);\n --luci-color-ink-secondary: var(--luci-color-muzzle-600);\n --luci-color-ink-disabled: var(--luci-color-muzzle-400);\n --luci-color-primary: var(--luci-color-ginger-500);\n --luci-color-on-primary: var(--luci-color-muzzle-900);\n --luci-color-primary-hover: var(--luci-color-ginger-600);\n --luci-color-primary-soft: var(--luci-color-ginger-100);\n --luci-color-link: var(--luci-color-ginger-700);\n --luci-color-accent: var(--luci-color-collar-lime-500);\n --luci-color-on-accent: var(--luci-color-muzzle-900);\n --luci-color-success: var(--luci-color-success-700);\n --luci-color-success-bg: var(--luci-color-success-100);\n --luci-color-warning: var(--luci-color-warning-700);\n --luci-color-warning-bg: var(--luci-color-warning-100);\n --luci-color-danger: var(--luci-color-danger-700);\n --luci-color-danger-bg: var(--luci-color-danger-100);\n --luci-color-danger-hover: #FFD3CD;\n --luci-color-info: var(--luci-color-info-700);\n --luci-color-info-bg: var(--luci-color-info-100);\n --luci-color-secondary-hover: var(--luci-color-muzzle-100);\n --luci-color-ghost-hover: color-mix(in srgb, var(--luci-color-muzzle-900) 6%, transparent);\n --luci-color-stroke-subtle: color-mix(in srgb, var(--luci-color-muzzle-900) 12%, transparent);\n --luci-color-stroke-muzzle: var(--luci-color-muzzle-200);\n --luci-color-stroke-strong: color-mix(in srgb, var(--luci-color-muzzle-900) 24%, transparent);\n --luci-color-focus: var(--luci-color-muzzle-900);\n --luci-color-bar: var(--luci-color-muzzle-900);\n --luci-color-bar-ink: var(--luci-color-muzzle-50);\n --luci-color-bar-ink-secondary: var(--luci-color-muzzle-300);\n --luci-color-bar-hover: var(--luci-color-muzzle-700);\n --luci-color-bar-stroke: color-mix(in srgb, var(--luci-color-muzzle-50) 16%, transparent);\n --luci-color-tool-active: var(--luci-color-ginger-400);\n --luci-color-on-tool-active: var(--luci-color-muzzle-900);\n --luci-color-pick: var(--luci-color-ginger-500);\n --luci-color-pick-fill: color-mix(in srgb, var(--luci-color-ginger-500) 14%, transparent);\n --luci-color-pick-blocked: var(--luci-color-danger-700);\n --luci-color-pick-blocked-fill: color-mix(in srgb, var(--luci-color-muzzle-500) 35%, transparent);\n --luci-color-pad-fill: color-mix(in srgb, var(--luci-color-collar-lime-500) 35%, transparent);\n --luci-color-margin-fill: color-mix(in srgb, var(--luci-color-ginger-300) 35%, transparent);\n --luci-color-insert: var(--luci-color-nose-pink-500);\n --luci-color-insert-fill: color-mix(in srgb, var(--luci-color-nose-pink-500) 16%, transparent);\n --luci-color-insert-ink: var(--luci-color-nose-pink-100);\n}\n@media (prefers-color-scheme: dark) {\n .luci-theme:not([data-theme=\"light\"]) {\n --luci-color-surface: var(--luci-color-muzzle-900);\n --luci-color-surface-raised: var(--luci-color-muzzle-800);\n --luci-color-surface-sunken: var(--luci-color-muzzle-800);\n --luci-color-ink: var(--luci-color-muzzle-50);\n --luci-color-ink-secondary: var(--luci-color-muzzle-300);\n --luci-color-ink-disabled: var(--luci-color-muzzle-500);\n --luci-color-primary: var(--luci-color-ginger-400);\n --luci-color-on-primary: var(--luci-color-muzzle-900);\n --luci-color-primary-hover: var(--luci-color-ginger-300);\n --luci-color-primary-soft: color-mix(in srgb, var(--luci-color-ginger-400) 18%, transparent);\n --luci-color-link: var(--luci-color-ginger-300);\n --luci-color-accent: var(--luci-color-collar-lime-500);\n --luci-color-on-accent: var(--luci-color-muzzle-900);\n --luci-color-success: var(--luci-color-success-700);\n --luci-color-success-bg: var(--luci-color-success-100);\n --luci-color-warning: var(--luci-color-warning-700);\n --luci-color-warning-bg: var(--luci-color-warning-100);\n --luci-color-danger: var(--luci-color-danger-700);\n --luci-color-danger-bg: var(--luci-color-danger-100);\n --luci-color-danger-hover: #FFD3CD;\n --luci-color-info: var(--luci-color-info-700);\n --luci-color-info-bg: var(--luci-color-info-100);\n --luci-color-secondary-hover: var(--luci-color-muzzle-700);\n --luci-color-ghost-hover: color-mix(in srgb, var(--luci-color-muzzle-50) 8%, transparent);\n --luci-color-stroke-subtle: color-mix(in srgb, var(--luci-color-muzzle-50) 16%, transparent);\n --luci-color-stroke-muzzle: var(--luci-color-muzzle-700);\n --luci-color-stroke-strong: color-mix(in srgb, var(--luci-color-muzzle-50) 28%, transparent);\n --luci-color-focus: var(--luci-color-muzzle-50);\n }\n}\n.luci-theme[data-theme=\"dark\"] {\n --luci-color-surface: var(--luci-color-muzzle-900);\n --luci-color-surface-raised: var(--luci-color-muzzle-800);\n --luci-color-surface-sunken: var(--luci-color-muzzle-800);\n --luci-color-ink: var(--luci-color-muzzle-50);\n --luci-color-ink-secondary: var(--luci-color-muzzle-300);\n --luci-color-ink-disabled: var(--luci-color-muzzle-500);\n --luci-color-primary: var(--luci-color-ginger-400);\n --luci-color-on-primary: var(--luci-color-muzzle-900);\n --luci-color-primary-hover: var(--luci-color-ginger-300);\n --luci-color-primary-soft: color-mix(in srgb, var(--luci-color-ginger-400) 18%, transparent);\n --luci-color-link: var(--luci-color-ginger-300);\n --luci-color-accent: var(--luci-color-collar-lime-500);\n --luci-color-on-accent: var(--luci-color-muzzle-900);\n --luci-color-success: var(--luci-color-success-700);\n --luci-color-success-bg: var(--luci-color-success-100);\n --luci-color-warning: var(--luci-color-warning-700);\n --luci-color-warning-bg: var(--luci-color-warning-100);\n --luci-color-danger: var(--luci-color-danger-700);\n --luci-color-danger-bg: var(--luci-color-danger-100);\n --luci-color-danger-hover: #FFD3CD;\n --luci-color-info: var(--luci-color-info-700);\n --luci-color-info-bg: var(--luci-color-info-100);\n --luci-color-secondary-hover: var(--luci-color-muzzle-700);\n --luci-color-ghost-hover: color-mix(in srgb, var(--luci-color-muzzle-50) 8%, transparent);\n --luci-color-stroke-subtle: color-mix(in srgb, var(--luci-color-muzzle-50) 16%, transparent);\n --luci-color-stroke-muzzle: var(--luci-color-muzzle-700);\n --luci-color-stroke-strong: color-mix(in srgb, var(--luci-color-muzzle-50) 28%, transparent);\n --luci-color-focus: var(--luci-color-muzzle-50);\n}\n\n/* Luci mascot animations. Works on the layered SVGs (inline) or inside the animated SVG files. */\n.luci .luci-ear,.luci .luci-eye,.luci .luci-tail,.luci .luci-body,.luci .luci-head,.luci .luci-z,.luci .luci-pupil,.luci .luci-arm,.luci .luci-ruler-line{transform-box:fill-box}\n.luci .luci-ear-l{transform-origin:70% 100%}\n.luci .luci-ear-r{transform-origin:30% 100%}\n.luci .luci-eye{transform-origin:50% 50%}\n.luci .luci-body{transform-origin:50% 100%}\n.luci .luci-head{transform-origin:50% 85%}\n.luci .luci-tail-wrap{transform-origin:92% 20%}\n.luci .luci-tail-up{transform-origin:5% 95%}\n.luci .luci-arm{transform-origin:10% 90%}\n.luci .luci-z{transform-origin:50% 50%}\n\n@keyframes luci-breathe{0%,100%{transform:scaleY(1)}50%{transform:scaleY(1.025)}}\n@keyframes luci-blink{0%,90%,100%{transform:scaleY(1)}94%{transform:scaleY(.08)}}\n@keyframes luci-slowblink{0%,25%{transform:scaleY(1)}42%,68%{transform:scaleY(.08)}85%,100%{transform:scaleY(1)}}\n@keyframes luci-twitch{0%,86%,100%{transform:rotate(0)}89%{transform:rotate(-12deg)}92%{transform:rotate(5deg)}95%{transform:rotate(-6deg)}98%{transform:rotate(0)}}\n@keyframes luci-sway{0%,100%{transform:rotate(-2.5deg)}50%{transform:rotate(2.5deg)}}\n@keyframes luci-lash{0%{transform:rotate(-9deg)}100%{transform:rotate(9deg)}}\n@keyframes luci-look{0%,18%{transform:translateX(0)}30%,50%{transform:translateX(-4px)}62%,82%{transform:translateX(4px)}94%,100%{transform:translateX(0)}}\n@keyframes luci-z{0%{opacity:0;transform:translate(0,6px) scale(.8)}25%{opacity:1}100%{opacity:0;transform:translate(10px,-20px) scale(1.1)}}\n@keyframes luci-tap{0%,100%{transform:rotate(0)}50%{transform:rotate(-7deg)}}\n@keyframes luci-pulse{0%,100%{opacity:1}50%{opacity:.3}}\n@keyframes luci-tilt{0%,100%{transform:rotate(0)}50%{transform:rotate(3deg)}}\n@keyframes luci-bristle{0%{transform:rotate(-2deg)}100%{transform:rotate(2deg)}}\n\n/* Idle: sitting tall */\n.luci-pose-sit .luci-body{animation:luci-breathe 4.5s ease-in-out infinite}\n.luci-pose-sit .luci-eye{animation:luci-blink 6s ease-in-out infinite}\n.luci-pose-sit .luci-ear-r{animation:luci-twitch 7s ease-in-out infinite}\n.luci-pose-sit .luci-tail{animation:luci-sway 5s ease-in-out infinite}\n/* Hello: slow blink (add class luci-hello to the sitting pose) */\n.luci-hello .luci-eye{animation:luci-slowblink 5s ease-in-out infinite}\n.luci-hello .luci-head{animation:luci-tilt 5s ease-in-out infinite}\n/* Avatar head */\n.luci-pose-head .luci-eye{animation:luci-blink 6s ease-in-out infinite}\n.luci-pose-head .luci-ear-l{animation:luci-twitch 8s ease-in-out infinite 2s}\n/* Watching (empty state) */\n.luci-pose-peek .luci-pupil{animation:luci-look 7s ease-in-out infinite}\n.luci-pose-peek .luci-eye{animation:luci-blink 7s ease-in-out infinite 3s}\n.luci-pose-peek .luci-ear-l{animation:luci-twitch 6s ease-in-out infinite 1s}\n/* Measuring (spacing tool) */\n.luci-pose-measure .luci-ruler-line{animation:luci-pulse 1.6s ease-in-out infinite}\n.luci-pose-measure .luci-arm{animation:luci-tap 1.6s ease-in-out infinite}\n.luci-pose-measure .luci-eye{animation:luci-blink 5s ease-in-out infinite}\n/* In the box (capture basket) */\n.luci-pose-box .luci-eye{animation:luci-blink 6s ease-in-out infinite}\n.luci-pose-box .luci-pupil{animation:luci-look 9s ease-in-out infinite 1s}\n.luci-pose-box .luci-ear-r{animation:luci-twitch 5s ease-in-out infinite}\n/* Asleep (loading) */\n.luci-pose-sleep .luci-body{animation:luci-breathe 3.5s ease-in-out infinite}\n.luci-pose-sleep .luci-z1{animation:luci-z 3s ease-out infinite}\n.luci-pose-sleep .luci-z2{animation:luci-z 3s ease-out infinite 1.5s}\n/* Content (success) */\n.luci-pose-content .luci-body{animation:luci-breathe 4s ease-in-out infinite}\n.luci-pose-content .luci-tail{animation:luci-sway 6s ease-in-out infinite}\n.luci-pose-content .luci-ear-r{animation:luci-twitch 6s ease-in-out infinite 2s}\n/* Annoyed (error) */\n.luci-pose-annoyed .luci-tail{animation:luci-lash .9s ease-in-out infinite alternate}\n.luci-pose-annoyed .luci-ear{animation:luci-bristle .35s ease-in-out infinite alternate}\n.luci-pose-annoyed .luci-body{animation:luci-breathe 1.8s ease-in-out infinite}\n/* Turned away (not now) */\n.luci-pose-turned .luci-tail{animation:luci-sway 4s ease-in-out infinite}\n.luci-pose-turned .luci-ear-r{animation:luci-twitch 5s ease-in-out infinite}\n.luci-pose-turned .luci-head{animation:luci-tilt 6s ease-in-out infinite}\n\n/* Tool poses: Pressing, Reading, Swatch, Comparing, Noting, Arranging, Placing, Sketching */\n.luci .luci-button-cap,.luci .luci-highlight,.luci .luci-chip-lift,.luci .luci-tick,.luci .luci-marker,.luci .luci-select-box,.luci .luci-block,.luci .luci-draft{transform-box:fill-box}\n.luci .luci-highlight{transform-origin:0 50%}\n.luci .luci-tick{transform-origin:50% 50%}\n.luci .luci-select-box{transform-origin:0 100%}\n\n@keyframes luci-press{0%,100%{transform:translateY(3px)}50%{transform:translateY(0)}}\n@keyframes luci-select{0%{transform:scaleX(.05);opacity:1}45%,85%{transform:scaleX(1);opacity:1}100%{transform:scaleX(1);opacity:0}}\n@keyframes luci-scan{0%,15%{transform:translateX(-3px)}50%,65%{transform:translateX(3px)}100%{transform:translateX(-3px)}}\n@keyframes luci-lift{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}\n@keyframes luci-glance{0%,40%{transform:translateX(-3px)}50%,90%{transform:translateX(3px)}100%{transform:translateX(-3px)}}\n@keyframes luci-pop{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}\n@keyframes luci-drop{0%{transform:translateY(-8px);opacity:0}20%{opacity:1}35%,85%{transform:translateY(0);opacity:1}100%{transform:translateY(0);opacity:0}}\n@keyframes luci-resize{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}\n@keyframes luci-settle{0%,100%{transform:translateY(0)}50%{transform:translateY(5px)}}\n@keyframes luci-push{0%,100%{transform:rotate(0)}50%{transform:rotate(5deg)}}\n\n/* Pressing (Component tool) */\n.luci-pose-press .luci-arm{animation:luci-tap 1.6s ease-in-out infinite}\n.luci-pose-press .luci-button-cap{animation:luci-press 1.6s ease-in-out infinite}\n.luci-pose-press .luci-click{animation:luci-pulse 1.6s ease-in-out infinite}\n.luci-pose-press .luci-eye{animation:luci-blink 5s ease-in-out infinite}\n/* Reading (Text tool) */\n.luci-pose-read .luci-highlight{animation:luci-select 3.2s ease-in-out infinite}\n.luci-pose-read .luci-pupil{animation:luci-scan 3.2s ease-in-out infinite}\n.luci-pose-read .luci-eye{animation:luci-blink 6s ease-in-out infinite 2s}\n/* Swatch (Colour tool) */\n.luci-pose-swatch .luci-chip-lift{animation:luci-lift 2s ease-in-out infinite}\n.luci-pose-swatch .luci-arm{animation:luci-tap 2s ease-in-out infinite}\n.luci-pose-swatch .luci-eye{animation:luci-blink 6s ease-in-out infinite}\n/* Comparing (Check) */\n.luci-pose-compare .luci-pupil{animation:luci-glance 4s ease-in-out infinite}\n.luci-pose-compare .luci-tick{animation:luci-pop 4s ease-in-out infinite}\n.luci-pose-compare .luci-head{animation:luci-tilt 6s ease-in-out infinite}\n.luci-pose-compare .luci-tail{animation:luci-sway 5s ease-in-out infinite}\n/* Noting (Feedback: Annotate) */\n.luci-pose-note .luci-marker{animation:luci-drop 3s ease-out infinite}\n.luci-pose-note .luci-arm{animation:luci-tap 3s ease-in-out infinite}\n.luci-pose-note .luci-eye{animation:luci-blink 6s ease-in-out infinite 1s}\n/* Arranging (Layout: Select) */\n.luci-pose-arrange .luci-select-box{animation:luci-resize 2.4s ease-in-out infinite}\n.luci-pose-arrange .luci-ear-r{animation:luci-twitch 6s ease-in-out infinite}\n.luci-pose-arrange .luci-eye{animation:luci-blink 5s ease-in-out infinite}\n/* Placing (Layout: Insert) */\n.luci-pose-place .luci-block{animation:luci-settle 2s ease-in-out infinite}\n.luci-pose-place .luci-arm{animation:luci-push 2s ease-in-out infinite}\n.luci-pose-place .luci-arrow{animation:luci-pulse 2s ease-in-out infinite}\n/* Sketching (Layout: New page) */\n.luci-pose-sketch .luci-draft{animation:luci-pulse 2.4s ease-in-out infinite}\n.luci-pose-sketch .luci-arm{animation:luci-tap 1.2s ease-in-out infinite}\n.luci-pose-sketch .luci-eye{animation:luci-blink 6s ease-in-out infinite}\n\n@media (prefers-reduced-motion: reduce){.luci *{animation:none!important}}\n\n.luci-theme {\n /* Buttons: md is 40 px with 15 px labels (DESIGN.md section 6); a compact surface sets sm as its default */\n --luci-btn-h: 40px;\n --luci-btn-font: 15px;\n --luci-btn-line: 20px;\n --luci-btn-pad: var(--luci-space-16);\n font-family: var(--luci-font-body);\n font-size: var(--luci-type-body-size);\n line-height: var(--luci-type-body-line);\n font-weight: var(--luci-type-body-weight);\n color: var(--luci-color-ink);\n -webkit-font-smoothing: antialiased;\n}\n.luci-theme *, .luci-theme *::before, .luci-theme *::after { box-sizing: border-box; }\n.luci-theme :where(button, input, select, textarea) { font: inherit; color: inherit; }\n.luci-theme :where(code, kbd, pre, samp) { font-family: var(--luci-font-code); }\n.luci-theme :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {\n outline: 2px solid var(--luci-color-focus);\n outline-offset: 2px;\n}\n/* Type roles */\n.t-display { font: var(--luci-type-display-weight) var(--luci-type-display-size)/var(--luci-type-display-line) var(--luci-font-display); }\n.t-title { font: var(--luci-type-title-weight) var(--luci-type-title-size)/var(--luci-type-title-line) var(--luci-font-display); margin: 0; }\n.t-heading { font: var(--luci-type-heading-weight) var(--luci-type-heading-size)/var(--luci-type-heading-line) var(--luci-font-body); margin: 0; }\n.t-small { font-size: var(--luci-type-small-size); line-height: var(--luci-type-small-line); font-weight: var(--luci-type-small-weight); }\n.t-micro { font-size: var(--luci-type-micro-size); line-height: var(--luci-type-micro-line); font-weight: var(--luci-type-micro-weight); }\n.t-code { font: var(--luci-type-code-weight) var(--luci-type-code-size)/var(--luci-type-code-line) var(--luci-font-code); }\n.overline { font-size: var(--luci-type-micro-size); line-height: var(--luci-type-micro-line); font-weight: var(--luci-type-micro-weight);\n letter-spacing: 0.06em; text-transform: uppercase; color: var(--luci-color-link); }\n/* Icons follow the text colour */\n.icon { flex: none; display: block; }\n/* The mascot */\n.mascot { display: inline-block; flex: none; line-height: 0; }\n.mascot svg { display: block; width: 100%; height: auto; }\n.luci-still, .luci-still * { animation: none !important; }\n.luci-avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: var(--luci-radius-full);\n background: var(--luci-color-primary); overflow: hidden; }\n/* Reduced motion: UI transitions become instant; the kit's CSS stops the mascot loops */\n@media (prefers-reduced-motion: reduce) {\n .luci-theme *, .luci-theme *::before, .luci-theme *::after { transition-duration: 0s !important; }\n}\n\n\n/*\n * Button (DESIGN.md section 6). Variants: btn-primary, btn-secondary, btn-outline, btn-ghost (also a\n * bare button), btn-danger, btn-link; btn-icon for icon-only (square, round). Sizes: btn-sm 32,\n * btn-md 40, btn-lg 48 (default: the surface's). States: hover, :active (pressed), :focus-visible,\n * :disabled, aria-pressed=\"true\" (toggled on), aria-busy=\"true\" (working).\n */\n.luci-theme button {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n min-height: var(--luci-btn-h);\n padding: calc((var(--luci-btn-h) - var(--luci-btn-line)) / 2) var(--luci-btn-pad);\n border: 0;\n border-radius: var(--luci-radius-full);\n background: transparent;\n color: var(--luci-color-ink);\n font-size: var(--luci-btn-font);\n font-weight: 600;\n line-height: var(--luci-btn-line);\n text-align: center;\n white-space: nowrap;\n cursor: pointer;\n transition: background-color var(--luci-motion-fast), color var(--luci-motion-fast), transform var(--luci-motion-fast);\n}\n/* Every button is a 44 px target, even when it is drawn 32 px tall */\n.luci-theme button::before { content: \"\"; position: absolute; inset: min(0px, calc((var(--luci-btn-h) - var(--luci-size-touch-target)) / 2)) 0; }\n.luci-theme button:hover:not(:disabled) { background: var(--luci-color-ghost-hover); }\n.luci-theme button:active:not(:disabled) { transform: translateY(1px); }\n.luci-theme button:disabled { color: var(--luci-color-ink-disabled); background: transparent; cursor: not-allowed; }\n.luci-theme button[aria-busy=\"true\"] { cursor: progress; }\n/* On (a tool, a toggle, a segment): one look everywhere, the kit's active tool fill (ginger-400, Charcoal text, 6.9:1) */\n.luci-theme button[aria-pressed=\"true\"]:not(.btn-primary),\n.luci-theme button[aria-pressed=\"true\"]:not(.btn-primary):hover:not(:disabled) { background: var(--luci-color-tool-active); color: var(--luci-color-on-tool-active); }\n/* A small count on a button */\n.btn-badge { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--luci-radius-full);\n background: var(--luci-color-accent); color: var(--luci-color-on-accent); font: 600 11px/18px var(--luci-font-body); text-align: center; pointer-events: none; }\n\n/* Sizes */\n.luci-theme .btn-sm { --luci-btn-h: 32px; --luci-btn-font: var(--luci-type-small-size); --luci-btn-line: var(--luci-type-small-line); --luci-btn-pad: var(--luci-space-12); }\n.luci-theme .btn-md { --luci-btn-h: 40px; --luci-btn-font: 15px; --luci-btn-line: 20px; --luci-btn-pad: var(--luci-space-16); }\n.luci-theme .btn-lg { --luci-btn-h: 48px; --luci-btn-font: 15px; --luci-btn-line: 20px; --luci-btn-pad: var(--luci-space-20); }\n\n/* Text with an icon, and icon only */\n.luci-theme .btn-with-ico { display: inline-flex; align-items: center; justify-content: center; gap: var(--luci-space-8); padding-block: 0; }\n.luci-theme .btn-with-ico .icon { margin-inline-start: calc(var(--luci-space-4) * -1); }\n.luci-theme .btn-icon { display: inline-flex; align-items: center; justify-content: center; width: var(--luci-btn-h); height: var(--luci-btn-h); padding: 0; }\n.luci-theme .btn-icon::before { inset: min(0px, calc((var(--luci-btn-h) - var(--luci-size-touch-target)) / 2)); }\n\n/* Variants */\n.luci-theme .btn-primary { background: var(--luci-color-primary); color: var(--luci-color-on-primary); }\n.luci-theme .btn-primary:hover:not(:disabled) { background: var(--luci-color-primary-hover); }\n.luci-theme .btn-primary:disabled { background: var(--luci-color-surface-sunken); color: var(--luci-color-ink-disabled); }\n.luci-theme .btn-secondary { background: var(--luci-color-surface-raised); border: 1px solid var(--luci-color-stroke-subtle);\n padding-block: calc((var(--luci-btn-h) - var(--luci-btn-line)) / 2 - 1px); }\n.luci-theme .btn-secondary:hover:not(:disabled) { background: var(--luci-color-secondary-hover); }\n.luci-theme .btn-secondary:disabled { background: var(--luci-color-surface-raised); }\n.luci-theme .btn-outline { background: transparent; border: 1px solid var(--luci-color-stroke-subtle);\n padding-block: calc((var(--luci-btn-h) - var(--luci-btn-line)) / 2 - 1px); }\n.luci-theme .btn-outline:hover:not(:disabled) { background: var(--luci-color-ghost-hover); border-color: var(--luci-color-stroke-strong); }\n.luci-theme :is(.btn-secondary, .btn-outline):is(.btn-with-ico, .btn-icon) { padding-block: 0; }\n.luci-theme .btn-ghost { background: transparent; }\n.luci-theme .btn-danger { background: var(--luci-color-danger-bg); color: var(--luci-color-danger); }\n.luci-theme .btn-danger:hover:not(:disabled) { background: var(--luci-color-danger-hover); }\n.luci-theme .btn-danger:disabled { background: var(--luci-color-danger-bg); color: var(--luci-color-danger); opacity: 0.5; }\n.luci-theme .btn-link { min-height: 0; padding: 0; border-radius: var(--luci-radius-sm); background: transparent; color: var(--luci-color-link);\n font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;\n transition: text-decoration-color var(--luci-motion-fast); }\n.luci-theme .btn-link:hover:not(:disabled) { background: transparent; text-decoration-color: currentColor; }\n.luci-theme .btn-link:active:not(:disabled) { transform: none; }\n.luci-theme .btn-link::before { inset: -8px -4px; }\n/* Working: the label stays for layout, a ring turns over it */\n.luci-theme button[aria-busy=\"true\"] > * { opacity: 0.4; }\n.badge, .count { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 var(--luci-space-8);\n border-radius: var(--luci-radius-full); font-size: var(--luci-type-micro-size); line-height: var(--luci-type-micro-line);\n font-weight: var(--luci-type-micro-weight); white-space: nowrap; }\n.badge { background: var(--luci-color-surface-sunken); color: var(--luci-color-ink); }\n.badge.brand { background: var(--luci-color-primary-soft); color: var(--luci-color-link); }\n.count { min-width: 22px; background: var(--luci-color-accent); color: var(--luci-color-on-accent); }\n\n/* Status message and toast: tinted fill, the status icon and coloured title, Charcoal detail, no stroke */\n.status-msg { display: flex; gap: var(--luci-space-12); align-items: flex-start; margin: 0; padding: var(--luci-space-12) var(--luci-space-16);\n border-radius: var(--luci-radius-lg); background: var(--status-bg); color: var(--luci-color-muzzle-900); }\n.status-msg.success { --status: var(--luci-color-success); --status-bg: var(--luci-color-success-bg); }\n.status-msg.warning { --status: var(--luci-color-warning); --status-bg: var(--luci-color-warning-bg); }\n.status-msg.danger { --status: var(--luci-color-danger); --status-bg: var(--luci-color-danger-bg); }\n.status-msg.info { --status: var(--luci-color-info); --status-bg: var(--luci-color-info-bg); }\n.status-msg > .icon { color: var(--status); margin-top: 2px; }\n.status-msg .status-body { display: flex; flex-direction: column; gap: var(--luci-space-4); min-width: 0; }\n.status-msg .status-title { margin: 0; color: var(--status); font-size: var(--luci-type-heading-size); line-height: var(--luci-type-heading-line); font-weight: var(--luci-type-heading-weight); }\n.status-msg .status-detail { margin: 0; }\n.status-msg .mascot { width: 48px; }\n.toast { position: fixed; z-index: 2147483647; box-shadow: var(--luci-shadow-float); }\n\n/* Card and panel */\n.card { padding: var(--luci-space-24); border: 1px solid var(--luci-color-stroke-subtle); border-radius: var(--luci-radius-xl); background: var(--luci-color-surface-raised); }\n\n/* Input, select and text area */\n.luci-theme :where(input[type=\"text\"], input[type=\"search\"], input[type=\"number\"], input[type=\"url\"], input:not([type]), select, textarea) {\n min-height: var(--luci-btn-h);\n padding: 0 var(--luci-space-12);\n border: 1px solid var(--luci-color-stroke-subtle);\n border-radius: var(--luci-radius-sm);\n background-color: var(--luci-color-surface-raised);\n color: var(--luci-color-ink);\n transition: border-color var(--luci-motion-fast);\n}\n.luci-theme :where(textarea) { padding: var(--luci-space-8) var(--luci-space-12); resize: vertical; }\n/* Select: the component wraps it with the kit's chevron icon, 12 px from the edge */\n.luci-theme :where(select) { appearance: none; padding-inline-end: 36px; text-overflow: ellipsis; cursor: pointer; }\n.select { position: relative; display: inline-flex; vertical-align: middle; min-width: 0; }\n.select > select { flex: 1 1 auto; min-width: 0; }\n.select > .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }\n.luci-theme :where(input, select, textarea):hover:not(:disabled) { border-color: var(--luci-color-stroke-strong); }\n.luci-theme ::placeholder { color: var(--luci-color-ink-secondary); opacity: 1; }\n.luci-theme :where(input[type=\"checkbox\"], input[type=\"radio\"]) { accent-color: var(--luci-color-primary); }\n.field-error { display: flex; gap: var(--luci-space-4); align-items: center; margin: 0; color: var(--luci-color-danger);\n font-size: var(--luci-type-small-size); line-height: var(--luci-type-small-line); }\n\n/* The repository pill: GitHub's mark and Luci's version, in the code font (a link once the repository is public) */\n.luci-theme .repo-btn { position: relative; display: inline-flex; flex: none; align-items: center; gap: 6px; height: 32px; padding: 0 var(--luci-space-12);\n border: 1px solid var(--luci-color-stroke-subtle); border-radius: var(--luci-radius-full); background: var(--luci-color-surface-raised);\n color: var(--luci-color-ink); font: 600 13px/1 var(--luci-font-code); text-decoration: none; white-space: nowrap; }\n.luci-theme a.repo-btn:hover { background: var(--luci-color-ghost-hover); }\n.luci-theme a.repo-btn:focus-visible { outline: 2px solid var(--luci-color-focus); outline-offset: 2px; }\n.luci-theme .repo-btn .gh-mark { display: block; width: 16px; height: 16px; line-height: 0; }\n.luci-theme .repo-btn .gh-mark svg { display: block; width: 16px; height: 16px; }\n/* Tooltip host: relative positioning and raised z-index on hover so tooltips render above sibling elements */\n.luci-theme [data-tip] { position: relative; }\n.luci-theme [data-tip]:is(:hover, :focus-visible) { z-index: 10; }\n\n/* Tooltip: the text in data-tip; below the element, or above with data-tip-pos=\"above\". Shows after 300 ms. */\n.luci-theme [data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + var(--luci-space-8)); z-index: 10;\n width: max-content; max-width: 340px; box-sizing: border-box; padding: 6px 10px; border-radius: var(--luci-radius-md); background: var(--luci-color-ink);\n color: var(--luci-color-surface); font-size: var(--luci-type-small-size); line-height: var(--luci-type-small-line); font-weight: var(--luci-type-small-weight);\n white-space: pre-wrap; word-break: normal; overflow-wrap: break-word; text-align: left; pointer-events: none; opacity: 0; transform: translate(-50%, -4px);\n transition: opacity var(--luci-motion-exit), transform var(--luci-motion-exit); }\n.luci-theme [data-tip][data-tip-pos=\"above\"]::after { top: auto; bottom: calc(100% + var(--luci-space-8)); transform: translate(-50%, 4px); }\n.luci-theme [data-tip]:is(:hover, :focus-visible)::after { opacity: 1; transform: translate(-50%, 0);\n transition: opacity var(--luci-motion-base) 300ms, transform var(--luci-motion-base) 300ms; }\n\n/* Left-aligned tooltips (first button in rows, cards, or explicit data-tip-align=\"left\") open rightwards to prevent clipping inside cards/panels */\n.luci-theme [data-tip][data-tip-align=\"left\"]::after,\n.luci-theme .panel .actions > [data-tip]:first-child::after,\n.luci-theme .panel .row > [data-tip]:first-child::after {\n left: 0; right: auto; transform: translate(0, -4px);\n}\n.luci-theme [data-tip][data-tip-pos=\"above\"][data-tip-align=\"left\"]::after,\n.luci-theme .panel .actions > [data-tip]:first-child[data-tip-pos=\"above\"]::after,\n.luci-theme .panel .row > [data-tip]:first-child[data-tip-pos=\"above\"]::after {\n top: auto; bottom: calc(100% + var(--luci-space-8)); left: 0; right: auto; transform: translate(0, 4px);\n}\n.luci-theme [data-tip][data-tip-align=\"left\"]:is(:hover, :focus-visible)::after,\n.luci-theme .panel .actions > [data-tip]:first-child:is(:hover, :focus-visible)::after,\n.luci-theme .panel .row > [data-tip]:first-child:is(:hover, :focus-visible)::after {\n transform: translate(0, 0);\n}\n\n/* Right-aligned tooltips (repo button, last button in rows, cards, or explicit data-tip-align=\"right\") open leftwards */\n.luci-theme .repo-btn[data-tip]::after,\n.luci-theme [data-tip][data-tip-align=\"right\"]::after,\n.luci-theme .panel .actions > [data-tip]:last-child::after,\n.luci-theme .panel .row > [data-tip]:last-child::after {\n left: auto; right: 0; transform: translate(0, -4px);\n}\n.luci-theme .repo-btn[data-tip][data-tip-pos=\"above\"]::after,\n.luci-theme [data-tip][data-tip-pos=\"above\"][data-tip-align=\"right\"]::after,\n.luci-theme .panel .actions > [data-tip]:last-child[data-tip-pos=\"above\"]::after,\n.luci-theme .panel .row > [data-tip]:last-child[data-tip-pos=\"above\"]::after {\n top: auto; bottom: calc(100% + var(--luci-space-8)); left: auto; right: 0; transform: translate(0, 4px);\n}\n.luci-theme .repo-btn[data-tip]:is(:hover, :focus-visible)::after,\n.luci-theme [data-tip][data-tip-align=\"right\"]:is(:hover, :focus-visible)::after,\n.luci-theme .panel .actions > [data-tip]:last-child:is(:hover, :focus-visible)::after,\n.luci-theme .panel .row > [data-tip]:last-child:is(:hover, :focus-visible)::after {\n transform: translate(0, 0);\n}\n\n/* Empty state: Luci, a title, one line, an optional primary button */\n.empty { display: flex; flex-direction: column; align-items: center; gap: var(--luci-space-12); padding: var(--luci-space-24) var(--luci-space-16); text-align: center; }\n.empty .t-title { margin: 0; }\n.empty p:not(.t-title) { margin: 0; color: var(--luci-color-ink-secondary); }\n";
5
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,QAAQ,4pFA0CpB,CAAC;AAEF,eAAO,MAAM,cAAc,swbAsL1B,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,MAAM,4okCAAqE,CAAC"}
package/dist/styles.js ADDED
@@ -0,0 +1,236 @@
1
+ /**
2
+ * Base and component styles for every Luci surface (brand/DESIGN.md sections 4 to 9). Colours,
3
+ * sizes and motion come only from the tokens (var(--luci-*)); this file holds no colour values.
4
+ * Surfaces render inside a shadow root: put UI_CSS in it and class "luci-theme" on their root.
5
+ */
6
+ import { TOKENS_CSS } from './tokens.js';
7
+ import { ANIMATIONS_CSS } from './mascot/art.js';
8
+ export const BASE_CSS = `
9
+ .luci-theme {
10
+ /* Buttons: md is 40 px with 15 px labels (DESIGN.md section 6); a compact surface sets sm as its default */
11
+ --luci-btn-h: 40px;
12
+ --luci-btn-font: 15px;
13
+ --luci-btn-line: 20px;
14
+ --luci-btn-pad: var(--luci-space-16);
15
+ font-family: var(--luci-font-body);
16
+ font-size: var(--luci-type-body-size);
17
+ line-height: var(--luci-type-body-line);
18
+ font-weight: var(--luci-type-body-weight);
19
+ color: var(--luci-color-ink);
20
+ -webkit-font-smoothing: antialiased;
21
+ }
22
+ .luci-theme *, .luci-theme *::before, .luci-theme *::after { box-sizing: border-box; }
23
+ .luci-theme :where(button, input, select, textarea) { font: inherit; color: inherit; }
24
+ .luci-theme :where(code, kbd, pre, samp) { font-family: var(--luci-font-code); }
25
+ .luci-theme :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
26
+ outline: 2px solid var(--luci-color-focus);
27
+ outline-offset: 2px;
28
+ }
29
+ /* Type roles */
30
+ .t-display { font: var(--luci-type-display-weight) var(--luci-type-display-size)/var(--luci-type-display-line) var(--luci-font-display); }
31
+ .t-title { font: var(--luci-type-title-weight) var(--luci-type-title-size)/var(--luci-type-title-line) var(--luci-font-display); margin: 0; }
32
+ .t-heading { font: var(--luci-type-heading-weight) var(--luci-type-heading-size)/var(--luci-type-heading-line) var(--luci-font-body); margin: 0; }
33
+ .t-small { font-size: var(--luci-type-small-size); line-height: var(--luci-type-small-line); font-weight: var(--luci-type-small-weight); }
34
+ .t-micro { font-size: var(--luci-type-micro-size); line-height: var(--luci-type-micro-line); font-weight: var(--luci-type-micro-weight); }
35
+ .t-code { font: var(--luci-type-code-weight) var(--luci-type-code-size)/var(--luci-type-code-line) var(--luci-font-code); }
36
+ .overline { font-size: var(--luci-type-micro-size); line-height: var(--luci-type-micro-line); font-weight: var(--luci-type-micro-weight);
37
+ letter-spacing: 0.06em; text-transform: uppercase; color: var(--luci-color-link); }
38
+ /* Icons follow the text colour */
39
+ .icon { flex: none; display: block; }
40
+ /* The mascot */
41
+ .mascot { display: inline-block; flex: none; line-height: 0; }
42
+ .mascot svg { display: block; width: 100%; height: auto; }
43
+ .luci-still, .luci-still * { animation: none !important; }
44
+ .luci-avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: var(--luci-radius-full);
45
+ background: var(--luci-color-primary); overflow: hidden; }
46
+ /* Reduced motion: UI transitions become instant; the kit's CSS stops the mascot loops */
47
+ @media (prefers-reduced-motion: reduce) {
48
+ .luci-theme *, .luci-theme *::before, .luci-theme *::after { transition-duration: 0s !important; }
49
+ }
50
+ `;
51
+ export const COMPONENTS_CSS = `
52
+ /*
53
+ * Button (DESIGN.md section 6). Variants: btn-primary, btn-secondary, btn-outline, btn-ghost (also a
54
+ * bare button), btn-danger, btn-link; btn-icon for icon-only (square, round). Sizes: btn-sm 32,
55
+ * btn-md 40, btn-lg 48 (default: the surface's). States: hover, :active (pressed), :focus-visible,
56
+ * :disabled, aria-pressed="true" (toggled on), aria-busy="true" (working).
57
+ */
58
+ .luci-theme button {
59
+ position: relative;
60
+ display: inline-block;
61
+ vertical-align: middle;
62
+ min-height: var(--luci-btn-h);
63
+ padding: calc((var(--luci-btn-h) - var(--luci-btn-line)) / 2) var(--luci-btn-pad);
64
+ border: 0;
65
+ border-radius: var(--luci-radius-full);
66
+ background: transparent;
67
+ color: var(--luci-color-ink);
68
+ font-size: var(--luci-btn-font);
69
+ font-weight: 600;
70
+ line-height: var(--luci-btn-line);
71
+ text-align: center;
72
+ white-space: nowrap;
73
+ cursor: pointer;
74
+ transition: background-color var(--luci-motion-fast), color var(--luci-motion-fast), transform var(--luci-motion-fast);
75
+ }
76
+ /* Every button is a 44 px target, even when it is drawn 32 px tall */
77
+ .luci-theme button::before { content: ""; position: absolute; inset: min(0px, calc((var(--luci-btn-h) - var(--luci-size-touch-target)) / 2)) 0; }
78
+ .luci-theme button:hover:not(:disabled) { background: var(--luci-color-ghost-hover); }
79
+ .luci-theme button:active:not(:disabled) { transform: translateY(1px); }
80
+ .luci-theme button:disabled { color: var(--luci-color-ink-disabled); background: transparent; cursor: not-allowed; }
81
+ .luci-theme button[aria-busy="true"] { cursor: progress; }
82
+ /* On (a tool, a toggle, a segment): one look everywhere, the kit's active tool fill (ginger-400, Charcoal text, 6.9:1) */
83
+ .luci-theme button[aria-pressed="true"]:not(.btn-primary),
84
+ .luci-theme button[aria-pressed="true"]:not(.btn-primary):hover:not(:disabled) { background: var(--luci-color-tool-active); color: var(--luci-color-on-tool-active); }
85
+ /* A small count on a button */
86
+ .btn-badge { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--luci-radius-full);
87
+ background: var(--luci-color-accent); color: var(--luci-color-on-accent); font: 600 11px/18px var(--luci-font-body); text-align: center; pointer-events: none; }
88
+
89
+ /* Sizes */
90
+ .luci-theme .btn-sm { --luci-btn-h: 32px; --luci-btn-font: var(--luci-type-small-size); --luci-btn-line: var(--luci-type-small-line); --luci-btn-pad: var(--luci-space-12); }
91
+ .luci-theme .btn-md { --luci-btn-h: 40px; --luci-btn-font: 15px; --luci-btn-line: 20px; --luci-btn-pad: var(--luci-space-16); }
92
+ .luci-theme .btn-lg { --luci-btn-h: 48px; --luci-btn-font: 15px; --luci-btn-line: 20px; --luci-btn-pad: var(--luci-space-20); }
93
+
94
+ /* Text with an icon, and icon only */
95
+ .luci-theme .btn-with-ico { display: inline-flex; align-items: center; justify-content: center; gap: var(--luci-space-8); padding-block: 0; }
96
+ .luci-theme .btn-with-ico .icon { margin-inline-start: calc(var(--luci-space-4) * -1); }
97
+ .luci-theme .btn-icon { display: inline-flex; align-items: center; justify-content: center; width: var(--luci-btn-h); height: var(--luci-btn-h); padding: 0; }
98
+ .luci-theme .btn-icon::before { inset: min(0px, calc((var(--luci-btn-h) - var(--luci-size-touch-target)) / 2)); }
99
+
100
+ /* Variants */
101
+ .luci-theme .btn-primary { background: var(--luci-color-primary); color: var(--luci-color-on-primary); }
102
+ .luci-theme .btn-primary:hover:not(:disabled) { background: var(--luci-color-primary-hover); }
103
+ .luci-theme .btn-primary:disabled { background: var(--luci-color-surface-sunken); color: var(--luci-color-ink-disabled); }
104
+ .luci-theme .btn-secondary { background: var(--luci-color-surface-raised); border: 1px solid var(--luci-color-stroke-subtle);
105
+ padding-block: calc((var(--luci-btn-h) - var(--luci-btn-line)) / 2 - 1px); }
106
+ .luci-theme .btn-secondary:hover:not(:disabled) { background: var(--luci-color-secondary-hover); }
107
+ .luci-theme .btn-secondary:disabled { background: var(--luci-color-surface-raised); }
108
+ .luci-theme .btn-outline { background: transparent; border: 1px solid var(--luci-color-stroke-subtle);
109
+ padding-block: calc((var(--luci-btn-h) - var(--luci-btn-line)) / 2 - 1px); }
110
+ .luci-theme .btn-outline:hover:not(:disabled) { background: var(--luci-color-ghost-hover); border-color: var(--luci-color-stroke-strong); }
111
+ .luci-theme :is(.btn-secondary, .btn-outline):is(.btn-with-ico, .btn-icon) { padding-block: 0; }
112
+ .luci-theme .btn-ghost { background: transparent; }
113
+ .luci-theme .btn-danger { background: var(--luci-color-danger-bg); color: var(--luci-color-danger); }
114
+ .luci-theme .btn-danger:hover:not(:disabled) { background: var(--luci-color-danger-hover); }
115
+ .luci-theme .btn-danger:disabled { background: var(--luci-color-danger-bg); color: var(--luci-color-danger); opacity: 0.5; }
116
+ .luci-theme .btn-link { min-height: 0; padding: 0; border-radius: var(--luci-radius-sm); background: transparent; color: var(--luci-color-link);
117
+ font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
118
+ transition: text-decoration-color var(--luci-motion-fast); }
119
+ .luci-theme .btn-link:hover:not(:disabled) { background: transparent; text-decoration-color: currentColor; }
120
+ .luci-theme .btn-link:active:not(:disabled) { transform: none; }
121
+ .luci-theme .btn-link::before { inset: -8px -4px; }
122
+ /* Working: the label stays for layout, a ring turns over it */
123
+ .luci-theme button[aria-busy="true"] > * { opacity: 0.4; }
124
+ .badge, .count { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 var(--luci-space-8);
125
+ border-radius: var(--luci-radius-full); font-size: var(--luci-type-micro-size); line-height: var(--luci-type-micro-line);
126
+ font-weight: var(--luci-type-micro-weight); white-space: nowrap; }
127
+ .badge { background: var(--luci-color-surface-sunken); color: var(--luci-color-ink); }
128
+ .badge.brand { background: var(--luci-color-primary-soft); color: var(--luci-color-link); }
129
+ .count { min-width: 22px; background: var(--luci-color-accent); color: var(--luci-color-on-accent); }
130
+
131
+ /* Status message and toast: tinted fill, the status icon and coloured title, Charcoal detail, no stroke */
132
+ .status-msg { display: flex; gap: var(--luci-space-12); align-items: flex-start; margin: 0; padding: var(--luci-space-12) var(--luci-space-16);
133
+ border-radius: var(--luci-radius-lg); background: var(--status-bg); color: var(--luci-color-muzzle-900); }
134
+ .status-msg.success { --status: var(--luci-color-success); --status-bg: var(--luci-color-success-bg); }
135
+ .status-msg.warning { --status: var(--luci-color-warning); --status-bg: var(--luci-color-warning-bg); }
136
+ .status-msg.danger { --status: var(--luci-color-danger); --status-bg: var(--luci-color-danger-bg); }
137
+ .status-msg.info { --status: var(--luci-color-info); --status-bg: var(--luci-color-info-bg); }
138
+ .status-msg > .icon { color: var(--status); margin-top: 2px; }
139
+ .status-msg .status-body { display: flex; flex-direction: column; gap: var(--luci-space-4); min-width: 0; }
140
+ .status-msg .status-title { margin: 0; color: var(--status); font-size: var(--luci-type-heading-size); line-height: var(--luci-type-heading-line); font-weight: var(--luci-type-heading-weight); }
141
+ .status-msg .status-detail { margin: 0; }
142
+ .status-msg .mascot { width: 48px; }
143
+ .toast { position: fixed; z-index: 2147483647; box-shadow: var(--luci-shadow-float); }
144
+
145
+ /* Card and panel */
146
+ .card { padding: var(--luci-space-24); border: 1px solid var(--luci-color-stroke-subtle); border-radius: var(--luci-radius-xl); background: var(--luci-color-surface-raised); }
147
+
148
+ /* Input, select and text area */
149
+ .luci-theme :where(input[type="text"], input[type="search"], input[type="number"], input[type="url"], input:not([type]), select, textarea) {
150
+ min-height: var(--luci-btn-h);
151
+ padding: 0 var(--luci-space-12);
152
+ border: 1px solid var(--luci-color-stroke-subtle);
153
+ border-radius: var(--luci-radius-sm);
154
+ background-color: var(--luci-color-surface-raised);
155
+ color: var(--luci-color-ink);
156
+ transition: border-color var(--luci-motion-fast);
157
+ }
158
+ .luci-theme :where(textarea) { padding: var(--luci-space-8) var(--luci-space-12); resize: vertical; }
159
+ /* Select: the component wraps it with the kit's chevron icon, 12 px from the edge */
160
+ .luci-theme :where(select) { appearance: none; padding-inline-end: 36px; text-overflow: ellipsis; cursor: pointer; }
161
+ .select { position: relative; display: inline-flex; vertical-align: middle; min-width: 0; }
162
+ .select > select { flex: 1 1 auto; min-width: 0; }
163
+ .select > .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
164
+ .luci-theme :where(input, select, textarea):hover:not(:disabled) { border-color: var(--luci-color-stroke-strong); }
165
+ .luci-theme ::placeholder { color: var(--luci-color-ink-secondary); opacity: 1; }
166
+ .luci-theme :where(input[type="checkbox"], input[type="radio"]) { accent-color: var(--luci-color-primary); }
167
+ .field-error { display: flex; gap: var(--luci-space-4); align-items: center; margin: 0; color: var(--luci-color-danger);
168
+ font-size: var(--luci-type-small-size); line-height: var(--luci-type-small-line); }
169
+
170
+ /* The repository pill: GitHub's mark and Luci's version, in the code font (a link once the repository is public) */
171
+ .luci-theme .repo-btn { position: relative; display: inline-flex; flex: none; align-items: center; gap: 6px; height: 32px; padding: 0 var(--luci-space-12);
172
+ border: 1px solid var(--luci-color-stroke-subtle); border-radius: var(--luci-radius-full); background: var(--luci-color-surface-raised);
173
+ color: var(--luci-color-ink); font: 600 13px/1 var(--luci-font-code); text-decoration: none; white-space: nowrap; }
174
+ .luci-theme a.repo-btn:hover { background: var(--luci-color-ghost-hover); }
175
+ .luci-theme a.repo-btn:focus-visible { outline: 2px solid var(--luci-color-focus); outline-offset: 2px; }
176
+ .luci-theme .repo-btn .gh-mark { display: block; width: 16px; height: 16px; line-height: 0; }
177
+ .luci-theme .repo-btn .gh-mark svg { display: block; width: 16px; height: 16px; }
178
+ /* Tooltip host: relative positioning and raised z-index on hover so tooltips render above sibling elements */
179
+ .luci-theme [data-tip] { position: relative; }
180
+ .luci-theme [data-tip]:is(:hover, :focus-visible) { z-index: 10; }
181
+
182
+ /* Tooltip: the text in data-tip; below the element, or above with data-tip-pos="above". Shows after 300 ms. */
183
+ .luci-theme [data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + var(--luci-space-8)); z-index: 10;
184
+ width: max-content; max-width: 340px; box-sizing: border-box; padding: 6px 10px; border-radius: var(--luci-radius-md); background: var(--luci-color-ink);
185
+ color: var(--luci-color-surface); font-size: var(--luci-type-small-size); line-height: var(--luci-type-small-line); font-weight: var(--luci-type-small-weight);
186
+ white-space: pre-wrap; word-break: normal; overflow-wrap: break-word; text-align: left; pointer-events: none; opacity: 0; transform: translate(-50%, -4px);
187
+ transition: opacity var(--luci-motion-exit), transform var(--luci-motion-exit); }
188
+ .luci-theme [data-tip][data-tip-pos="above"]::after { top: auto; bottom: calc(100% + var(--luci-space-8)); transform: translate(-50%, 4px); }
189
+ .luci-theme [data-tip]:is(:hover, :focus-visible)::after { opacity: 1; transform: translate(-50%, 0);
190
+ transition: opacity var(--luci-motion-base) 300ms, transform var(--luci-motion-base) 300ms; }
191
+
192
+ /* Left-aligned tooltips (first button in rows, cards, or explicit data-tip-align="left") open rightwards to prevent clipping inside cards/panels */
193
+ .luci-theme [data-tip][data-tip-align="left"]::after,
194
+ .luci-theme .panel .actions > [data-tip]:first-child::after,
195
+ .luci-theme .panel .row > [data-tip]:first-child::after {
196
+ left: 0; right: auto; transform: translate(0, -4px);
197
+ }
198
+ .luci-theme [data-tip][data-tip-pos="above"][data-tip-align="left"]::after,
199
+ .luci-theme .panel .actions > [data-tip]:first-child[data-tip-pos="above"]::after,
200
+ .luci-theme .panel .row > [data-tip]:first-child[data-tip-pos="above"]::after {
201
+ top: auto; bottom: calc(100% + var(--luci-space-8)); left: 0; right: auto; transform: translate(0, 4px);
202
+ }
203
+ .luci-theme [data-tip][data-tip-align="left"]:is(:hover, :focus-visible)::after,
204
+ .luci-theme .panel .actions > [data-tip]:first-child:is(:hover, :focus-visible)::after,
205
+ .luci-theme .panel .row > [data-tip]:first-child:is(:hover, :focus-visible)::after {
206
+ transform: translate(0, 0);
207
+ }
208
+
209
+ /* Right-aligned tooltips (repo button, last button in rows, cards, or explicit data-tip-align="right") open leftwards */
210
+ .luci-theme .repo-btn[data-tip]::after,
211
+ .luci-theme [data-tip][data-tip-align="right"]::after,
212
+ .luci-theme .panel .actions > [data-tip]:last-child::after,
213
+ .luci-theme .panel .row > [data-tip]:last-child::after {
214
+ left: auto; right: 0; transform: translate(0, -4px);
215
+ }
216
+ .luci-theme .repo-btn[data-tip][data-tip-pos="above"]::after,
217
+ .luci-theme [data-tip][data-tip-pos="above"][data-tip-align="right"]::after,
218
+ .luci-theme .panel .actions > [data-tip]:last-child[data-tip-pos="above"]::after,
219
+ .luci-theme .panel .row > [data-tip]:last-child[data-tip-pos="above"]::after {
220
+ top: auto; bottom: calc(100% + var(--luci-space-8)); left: auto; right: 0; transform: translate(0, 4px);
221
+ }
222
+ .luci-theme .repo-btn[data-tip]:is(:hover, :focus-visible)::after,
223
+ .luci-theme [data-tip][data-tip-align="right"]:is(:hover, :focus-visible)::after,
224
+ .luci-theme .panel .actions > [data-tip]:last-child:is(:hover, :focus-visible)::after,
225
+ .luci-theme .panel .row > [data-tip]:last-child:is(:hover, :focus-visible)::after {
226
+ transform: translate(0, 0);
227
+ }
228
+
229
+ /* Empty state: Luci, a title, one line, an optional primary button */
230
+ .empty { display: flex; flex-direction: column; align-items: center; gap: var(--luci-space-12); padding: var(--luci-space-24) var(--luci-space-16); text-align: center; }
231
+ .empty .t-title { margin: 0; }
232
+ .empty p:not(.t-title) { margin: 0; color: var(--luci-color-ink-secondary); }
233
+ `;
234
+ /** Everything a Luci surface needs in its shadow root, in order. */
235
+ export const UI_CSS = `${TOKENS_CSS}\n${ANIMATIONS_CSS}\n${BASE_CSS}\n${COMPONENTS_CSS}`;
236
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CvB,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsL7B,CAAC;AAEF,oEAAoE;AACpE,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,UAAU,KAAK,cAAc,KAAK,QAAQ,KAAK,cAAc,EAAE,CAAC"}