@chances-ai/design-system 21.0.0 → 24.2.0

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 (95) hide show
  1. package/dist/cn.d.ts +11 -0
  2. package/dist/cn.d.ts.map +1 -0
  3. package/dist/cn.js +14 -0
  4. package/dist/cn.js.map +1 -0
  5. package/dist/diff/change-bar.d.ts +30 -0
  6. package/dist/diff/change-bar.d.ts.map +1 -0
  7. package/dist/diff/change-bar.js +55 -0
  8. package/dist/diff/change-bar.js.map +1 -0
  9. package/dist/diff/monaco-theme.d.ts +32 -0
  10. package/dist/diff/monaco-theme.d.ts.map +1 -0
  11. package/dist/diff/monaco-theme.js +70 -0
  12. package/dist/diff/monaco-theme.js.map +1 -0
  13. package/dist/heroui-theme.d.ts +37 -0
  14. package/dist/heroui-theme.d.ts.map +1 -0
  15. package/dist/heroui-theme.js +77 -0
  16. package/dist/heroui-theme.js.map +1 -0
  17. package/dist/icon/icon.d.ts +41 -0
  18. package/dist/icon/icon.d.ts.map +1 -0
  19. package/dist/icon/icon.js +41 -0
  20. package/dist/icon/icon.js.map +1 -0
  21. package/dist/icon/sprite-sheet.d.ts +13 -0
  22. package/dist/icon/sprite-sheet.d.ts.map +1 -0
  23. package/dist/icon/sprite-sheet.js +8 -0
  24. package/dist/icon/sprite-sheet.js.map +1 -0
  25. package/dist/icon/sprite.d.ts +42 -0
  26. package/dist/icon/sprite.d.ts.map +1 -0
  27. package/dist/icon/sprite.js +23 -0
  28. package/dist/icon/sprite.js.map +1 -0
  29. package/dist/index.d.ts +25 -7
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +38 -7
  32. package/dist/index.js.map +1 -1
  33. package/dist/motion/animated.d.ts +34 -0
  34. package/dist/motion/animated.d.ts.map +1 -0
  35. package/dist/motion/animated.js +39 -0
  36. package/dist/motion/animated.js.map +1 -0
  37. package/dist/primitives/button.d.ts +52 -0
  38. package/dist/primitives/button.d.ts.map +1 -0
  39. package/dist/primitives/button.js +20 -0
  40. package/dist/primitives/button.js.map +1 -0
  41. package/dist/primitives/card.d.ts +7 -0
  42. package/dist/primitives/card.d.ts.map +1 -0
  43. package/dist/primitives/card.js +10 -0
  44. package/dist/primitives/card.js.map +1 -0
  45. package/dist/primitives/scroll-area.d.ts +7 -0
  46. package/dist/primitives/scroll-area.d.ts.map +1 -0
  47. package/dist/primitives/scroll-area.js +10 -0
  48. package/dist/primitives/scroll-area.js.map +1 -0
  49. package/dist/primitives/stack.d.ts +9 -0
  50. package/dist/primitives/stack.d.ts.map +1 -0
  51. package/dist/primitives/stack.js +14 -0
  52. package/dist/primitives/stack.js.map +1 -0
  53. package/dist/primitives/status-badge.d.ts +42 -0
  54. package/dist/primitives/status-badge.d.ts.map +1 -0
  55. package/dist/primitives/status-badge.js +23 -0
  56. package/dist/primitives/status-badge.js.map +1 -0
  57. package/dist/primitives/surface.d.ts +201 -0
  58. package/dist/primitives/surface.d.ts.map +1 -0
  59. package/dist/primitives/surface.js +39 -0
  60. package/dist/primitives/surface.js.map +1 -0
  61. package/dist/primitives/tabs.d.ts +31 -0
  62. package/dist/primitives/tabs.d.ts.map +1 -0
  63. package/dist/primitives/tabs.js +70 -0
  64. package/dist/primitives/tabs.js.map +1 -0
  65. package/dist/primitives/text.d.ts +124 -0
  66. package/dist/primitives/text.d.ts.map +1 -0
  67. package/dist/primitives/text.js +36 -0
  68. package/dist/primitives/text.js.map +1 -0
  69. package/dist/theme-vars.d.ts +25 -0
  70. package/dist/theme-vars.d.ts.map +1 -0
  71. package/dist/theme-vars.js +24 -0
  72. package/dist/theme-vars.js.map +1 -0
  73. package/dist/widgets/filter-autocomplete.d.ts +21 -0
  74. package/dist/widgets/filter-autocomplete.d.ts.map +1 -0
  75. package/dist/widgets/filter-autocomplete.js +30 -0
  76. package/dist/widgets/filter-autocomplete.js.map +1 -0
  77. package/dist/widgets/index.d.ts +17 -0
  78. package/dist/widgets/index.d.ts.map +1 -0
  79. package/dist/widgets/index.js +17 -0
  80. package/dist/widgets/index.js.map +1 -0
  81. package/package.json +67 -7
  82. package/src/heroui-theme.css +42 -0
  83. package/src/tokens.css +147 -0
  84. package/dist/tamagui.config.d.ts +0 -117
  85. package/dist/tamagui.config.d.ts.map +0 -1
  86. package/dist/tamagui.config.js +0 -35
  87. package/dist/tamagui.config.js.map +0 -1
  88. package/dist/themes.d.ts +0 -5
  89. package/dist/themes.d.ts.map +0 -1
  90. package/dist/themes.js +0 -35
  91. package/dist/themes.js.map +0 -1
  92. package/dist/tokens.d.ts +0 -90
  93. package/dist/tokens.d.ts.map +0 -1
  94. package/dist/tokens.js +0 -34
  95. package/dist/tokens.js.map +0 -1
package/dist/cn.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * (7.3 / task 03 — W1) `cn` — the class-name combinator `[11.3]`. `clsx` for
3
+ * conditional joining + `tailwind-merge` for last-wins conflict resolution (so a
4
+ * later `bg-surface-raised` overrides an earlier `bg-surface-base`). Ported from
5
+ * OpenHands `openhands-ui/shared/utils/cn.ts`. The single styling primitive every
6
+ * self-built chrome component (tailwind-variants) and every consumer composes
7
+ * with. Browser-safe; no `node:*`.
8
+ */
9
+ import { type ClassValue } from "clsx";
10
+ export declare function cn(...inputs: ClassValue[]): string;
11
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD"}
package/dist/cn.js ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ * (7.3 / task 03 — W1) `cn` — the class-name combinator `[11.3]`. `clsx` for
3
+ * conditional joining + `tailwind-merge` for last-wins conflict resolution (so a
4
+ * later `bg-surface-raised` overrides an earlier `bg-surface-base`). Ported from
5
+ * OpenHands `openhands-ui/shared/utils/cn.ts`. The single styling primitive every
6
+ * self-built chrome component (tailwind-variants) and every consumer composes
7
+ * with. Browser-safe; no `node:*`.
8
+ */
9
+ import { clsx } from "clsx";
10
+ import { twMerge } from "tailwind-merge";
11
+ export function cn(...inputs) {
12
+ return twMerge(clsx(inputs));
13
+ }
14
+ //# sourceMappingURL=cn.js.map
package/dist/cn.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.js","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * (7.3 / task 03 — W3b) The 5-block change-bar `[11.10]` — the compact
3
+ * file-list / sidebar density indicator (GitHub-style), distinct from the
4
+ * full-line + word-level `DiffBlock` (which stays in the client, fed by
5
+ * ui-core's `parseDiff`). Five fixed cells colored add / delete / neutral in
6
+ * proportion to the change magnitude.
7
+ *
8
+ * `changeBarBlocks` is ported verbatim from opencode
9
+ * (`packages/ui/src/components/diff-changes.tsx`, MIT) — the allocation rules
10
+ * (cap small changes to 1–2 cells, drop a cell to neutral for lopsided diffs)
11
+ * are theirs; it's a pure function, unit-tested in isolation. Colors come from
12
+ * the seed engine's `diff-change-bar-*` tokens via `--ch-*` vars (set by the
13
+ * panel's `applyThemeVars`). Browser-safe (react + inline SVG only).
14
+ */
15
+ export interface ChangeBarBlocks {
16
+ added: number;
17
+ deleted: number;
18
+ neutral: number;
19
+ }
20
+ /** Allocate the 5 cells across add / delete / neutral. Always sums to 5. */
21
+ export declare function changeBarBlocks(additions: number, deletions: number): ChangeBarBlocks;
22
+ export interface ChangeBarProps {
23
+ additions: number;
24
+ deletions: number;
25
+ className?: string;
26
+ }
27
+ /** Render the 5-block bar as inline SVG rects (matches opencode's `bars`
28
+ * variant geometry: 18×14, 2px cells on a 4px pitch, 1px radius). */
29
+ export declare function ChangeBar({ additions, deletions, className }: ChangeBarProps): import("react/jsx-runtime").JSX.Element;
30
+ //# sourceMappingURL=change-bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-bar.d.ts","sourceRoot":"","sources":["../../src/diff/change-bar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,eAAe,CAuCrF;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;sEACsE;AACtE,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,cAAc,2CAwB5E"}
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ const TOTAL_BLOCKS = 5;
3
+ /** Allocate the 5 cells across add / delete / neutral. Always sums to 5. */
4
+ export function changeBarBlocks(additions, deletions) {
5
+ const adds = additions ?? 0;
6
+ const dels = deletions ?? 0;
7
+ if (adds === 0 && dels === 0)
8
+ return { added: 0, deleted: 0, neutral: TOTAL_BLOCKS };
9
+ const total = adds + dels;
10
+ if (total < 5) {
11
+ const added = adds > 0 ? 1 : 0;
12
+ const deleted = dels > 0 ? 1 : 0;
13
+ return { added, deleted, neutral: TOTAL_BLOCKS - added - deleted };
14
+ }
15
+ const ratio = adds > dels ? adds / dels : dels / adds;
16
+ let blocksForColors = TOTAL_BLOCKS;
17
+ if (total < 20)
18
+ blocksForColors = TOTAL_BLOCKS - 1;
19
+ else if (ratio < 4)
20
+ blocksForColors = TOTAL_BLOCKS - 1;
21
+ const addedRaw = (adds / total) * blocksForColors;
22
+ const deletedRaw = (dels / total) * blocksForColors;
23
+ let added = adds > 0 ? Math.max(1, Math.round(addedRaw)) : 0;
24
+ let deleted = dels > 0 ? Math.max(1, Math.round(deletedRaw)) : 0;
25
+ // Cap cells by the actual magnitude so a few lines never look like a flood.
26
+ if (adds > 0 && adds <= 5)
27
+ added = Math.min(added, 1);
28
+ if (adds > 5 && adds <= 10)
29
+ added = Math.min(added, 2);
30
+ if (dels > 0 && dels <= 5)
31
+ deleted = Math.min(deleted, 1);
32
+ if (dels > 5 && dels <= 10)
33
+ deleted = Math.min(deleted, 2);
34
+ let allocated = added + deleted;
35
+ if (allocated > blocksForColors) {
36
+ if (addedRaw > deletedRaw)
37
+ added = blocksForColors - deleted;
38
+ else
39
+ deleted = blocksForColors - added;
40
+ allocated = added + deleted;
41
+ }
42
+ return { added, deleted, neutral: Math.max(0, TOTAL_BLOCKS - allocated) };
43
+ }
44
+ /** Render the 5-block bar as inline SVG rects (matches opencode's `bars`
45
+ * variant geometry: 18×14, 2px cells on a 4px pitch, 1px radius). */
46
+ export function ChangeBar({ additions, deletions, className }) {
47
+ const { added, deleted, neutral } = changeBarBlocks(additions, deletions);
48
+ const colors = [
49
+ ...Array(added).fill("var(--ch-diff-change-bar-add)"),
50
+ ...Array(deleted).fill("var(--ch-diff-change-bar-delete)"),
51
+ ...Array(neutral).fill("var(--ch-icon-weak)"),
52
+ ].slice(0, TOTAL_BLOCKS);
53
+ return (_jsx("svg", { className: className, width: 18, height: 14, viewBox: "0 0 18 14", fill: "none", role: "img", "aria-label": `+${additions} -${deletions}`, xmlns: "http://www.w3.org/2000/svg", children: colors.map((color, i) => (_jsx("rect", { x: i * 4, width: 2, height: 14, rx: 1, fill: color }, i))) }));
54
+ }
55
+ //# sourceMappingURL=change-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-bar.js","sourceRoot":"","sources":["../../src/diff/change-bar.tsx"],"names":[],"mappings":";AAqBA,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,4EAA4E;AAC5E,MAAM,UAAU,eAAe,CAAC,SAAiB,EAAE,SAAiB;IAClE,MAAM,IAAI,GAAG,SAAS,IAAI,CAAC,CAAC;IAC5B,MAAM,IAAI,GAAG,SAAS,IAAI,CAAC,CAAC;IAE5B,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IAErF,MAAM,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAE1B,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACd,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,GAAG,KAAK,GAAG,OAAO,EAAE,CAAC;IACrE,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;IACtD,IAAI,eAAe,GAAG,YAAY,CAAC;IACnC,IAAI,KAAK,GAAG,EAAE;QAAE,eAAe,GAAG,YAAY,GAAG,CAAC,CAAC;SAC9C,IAAI,KAAK,GAAG,CAAC;QAAE,eAAe,GAAG,YAAY,GAAG,CAAC,CAAC;IAEvD,MAAM,QAAQ,GAAG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+ web chrome `[11.10]`, so inline
4
+ * Monaco diffs and the transcript share one palette. Monaco's runtime is NOT a
5
+ * dependency here: we emit a plain object matching `monaco.editor`'s
6
+ * `IStandaloneThemeData` shape, and task 05 (which mounts Monaco) feeds it to
7
+ * `monaco.editor.defineTheme`. Pure / browser-safe (ui-core only).
8
+ *
9
+ * Monaco quirk encoded below: token `rules[].foreground` is a 6-digit hex with
10
+ * NO leading `#`, while `colors[...]` values KEEP the `#`. Only `#`-hex token
11
+ * values are usable (the `default`/`daltonized` themes resolve to hex; the
12
+ * `ansi` theme is TUI-only and never reaches here).
13
+ */
14
+ import { type ThemeMode } from "@chances-ai/ui-core";
15
+ export interface MonacoTokenRule {
16
+ /** Monaco scope, e.g. "keyword", "string", "comment". */
17
+ token: string;
18
+ /** 6-digit hex WITHOUT a leading `#`. */
19
+ foreground?: string;
20
+ fontStyle?: string;
21
+ }
22
+ export interface MonacoThemeData {
23
+ base: "vs" | "vs-dark";
24
+ inherit: boolean;
25
+ rules: MonacoTokenRule[];
26
+ colors: Record<string, string>;
27
+ }
28
+ /** Build a Monaco `IStandaloneThemeData`-shaped object from a built-in theme id
29
+ * (or `ChancesTheme`) + mode. Tokens that aren't `#`-hex (none, for the web
30
+ * themes) are skipped rather than emitted invalid. */
31
+ export declare function seedThemeToMonaco(themeId: string, mode: ThemeMode): MonacoThemeData;
32
+ //# sourceMappingURL=monaco-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-theme.d.ts","sourceRoot":"","sources":["../../src/diff/monaco-theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAA8D,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEjH,MAAM,WAAW,eAAe;IAC9B,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAqCD;;uDAEuD;AACvD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,eAAe,CAmBnF"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * (7.3 / task 03 — W3b) `seedThemeToMonaco` — derives a Monaco editor theme from
3
+ * the SAME seed engine that paints the TUI + web chrome `[11.10]`, so inline
4
+ * Monaco diffs and the transcript share one palette. Monaco's runtime is NOT a
5
+ * dependency here: we emit a plain object matching `monaco.editor`'s
6
+ * `IStandaloneThemeData` shape, and task 05 (which mounts Monaco) feeds it to
7
+ * `monaco.editor.defineTheme`. Pure / browser-safe (ui-core only).
8
+ *
9
+ * Monaco quirk encoded below: token `rules[].foreground` is a 6-digit hex with
10
+ * NO leading `#`, while `colors[...]` values KEEP the `#`. Only `#`-hex token
11
+ * values are usable (the `default`/`daltonized` themes resolve to hex; the
12
+ * `ansi` theme is TUI-only and never reaches here).
13
+ */
14
+ import { resolveThemeTokens } from "@chances-ai/ui-core";
15
+ /** Monaco scope → chances syntax token (+ optional fontStyle). */
16
+ const SYNTAX_RULES = [
17
+ { scope: "keyword", token: "synKeyword" },
18
+ { scope: "keyword.operator", token: "synKeyword" },
19
+ { scope: "string", token: "synString" },
20
+ { scope: "comment", token: "synComment", fontStyle: "italic" },
21
+ { scope: "number", token: "synNumber" },
22
+ { scope: "constant", token: "synLiteral" },
23
+ { scope: "type", token: "synType" },
24
+ { scope: "function", token: "synFunction" },
25
+ { scope: "tag", token: "synTitle" },
26
+ { scope: "attribute.name", token: "synAttr" },
27
+ ];
28
+ /** Monaco `colors[...]` key → chances token (values keep the `#`). */
29
+ const COLOR_RULES = [
30
+ { key: "editor.background", token: "bgBase" },
31
+ { key: "editor.foreground", token: "textBase" },
32
+ { key: "editorLineNumber.foreground", token: "synComment" },
33
+ { key: "editorLineNumber.activeForeground", token: "textBase" },
34
+ { key: "editorCursor.foreground", token: "accent" },
35
+ { key: "editor.selectionBackground", token: "userMessageBg" },
36
+ { key: "diffEditor.insertedLineBackground", token: "diffAddedBg" },
37
+ { key: "diffEditor.removedLineBackground", token: "diffRemovedBg" },
38
+ { key: "diffEditor.insertedTextBackground", token: "diffAddedWordBg" },
39
+ { key: "diffEditor.removedTextBackground", token: "diffRemovedWordBg" },
40
+ ];
41
+ function hex6(v) {
42
+ return v.startsWith("#") ? v.slice(1) : undefined;
43
+ }
44
+ function hexHash(v) {
45
+ return v.startsWith("#") ? v : undefined;
46
+ }
47
+ /** Build a Monaco `IStandaloneThemeData`-shaped object from a built-in theme id
48
+ * (or `ChancesTheme`) + mode. Tokens that aren't `#`-hex (none, for the web
49
+ * themes) are skipped rather than emitted invalid. */
50
+ export function seedThemeToMonaco(themeId, mode) {
51
+ const tokens = resolveThemeTokens(themeId, mode);
52
+ const rules = [];
53
+ // A base rule so untokenized text uses our foreground.
54
+ const baseFg = hex6(tokens.textBase);
55
+ if (baseFg)
56
+ rules.push({ token: "", foreground: baseFg });
57
+ for (const { scope, token, fontStyle } of SYNTAX_RULES) {
58
+ const fg = hex6(tokens[token]);
59
+ if (fg)
60
+ rules.push(fontStyle ? { token: scope, foreground: fg, fontStyle } : { token: scope, foreground: fg });
61
+ }
62
+ const colors = {};
63
+ for (const { key, token } of COLOR_RULES) {
64
+ const v = hexHash(tokens[token]);
65
+ if (v)
66
+ colors[key] = v;
67
+ }
68
+ return { base: mode === "dark" ? "vs-dark" : "vs", inherit: true, rules, colors };
69
+ }
70
+ //# sourceMappingURL=monaco-theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monaco-theme.js","sourceRoot":"","sources":["../../src/diff/monaco-theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;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,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;IACjH,CAAC;IAED,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,WAAW,EAAE,CAAC;QACzC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACjC,IAAI,CAAC;YAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AACpF,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * (7.3 / task 03 — W3a) HeroUI v3 theme wiring `[11.2]` (R1 MUST-1; design §3.3).
3
+ *
4
+ * HeroUI v3's entire look is driven by a set of named CSS variables (defined in
5
+ * `@layer base` under `:root,.light` / `.dark`). Its "calculated" variables
6
+ * (`--surface-hover`, `--*-soft`, `--border-secondary`, …) are ALL derived via
7
+ * `color-mix(in oklab, var(--<base>) …)` from a handful of BASE variables. So we
8
+ * only override the bases — to our seed-engine `--ch-*` vars — and HeroUI
9
+ * re-tints the whole widget set for free. The override lives in
10
+ * `heroui-theme.css`, UNLAYERED (it therefore beats HeroUI's `@layer base`).
11
+ *
12
+ * `HEROUI_BASE_VAR_MAP` is the single source of truth: `heroui-theme.test.ts`
13
+ * asserts (a) every key is a real var in the installed `@heroui/styles@3.1.0`
14
+ * `themes/default/variables.css` (so a HeroUI upgrade that renames/removes a var
15
+ * fails the gate), (b) every value is a real chances token, and (c) the CSS file
16
+ * has a matching line for each entry. Browser-safe (only ui-core + a string map).
17
+ */
18
+ import { type ThemeMode } from "@chances-ai/ui-core";
19
+ /** HeroUI base CSS var → the chances token whose `--ch-<kebab>` var supplies its
20
+ * value. Calculated HeroUI vars are intentionally absent (color-mix derives
21
+ * them from these bases). The CSS class scope is `.chances-theme`. */
22
+ export declare const HEROUI_BASE_VAR_MAP: Record<string, string>;
23
+ /** HeroUI color base vars we deliberately leave at HeroUI's defaults, each with
24
+ * its reason. The test asserts every key here still exists in HeroUI's
25
+ * `variables.css` (so a stale exclusion gets flagged on upgrade). */
26
+ export declare const HEROUI_BASE_VARS_UNMAPPED: Record<string, string>;
27
+ /** The class a consumer puts on the panel root, e.g.
28
+ * `<div className={heroUiThemeClassName(mode)} style={themeVars(id, mode)}>`.
29
+ * `chances-theme` pulls in the base-var overrides (heroui-theme.css); the mode
30
+ * class (`dark`/`light`) drives HeroUI's own calculated-var block + `color-scheme`. */
31
+ export declare function heroUiThemeClassName(mode: ThemeMode): string;
32
+ /** The set of `--ch-*` var names the override map references — used by the test
33
+ * to validate every mapped token exists. */
34
+ export declare const HEROUI_REFERENCED_CH_VARS: ReadonlySet<string>;
35
+ /** Every valid `--ch-*` var name (for the test's token-existence check). */
36
+ export declare const ALL_CH_VARS: ReadonlySet<string>;
37
+ //# sourceMappingURL=heroui-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heroui-theme.d.ts","sourceRoot":"","sources":["../src/heroui-theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAExE;;uEAEuE;AACvE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4BtD,CAAC;AAEF;;sEAEsE;AACtE,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW5D,CAAC;AAEF;;;wFAGwF;AACxF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAE5D;AAED;6CAC6C;AAC7C,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,CAEzD,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,MAAM,CAAsD,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * (7.3 / task 03 — W3a) HeroUI v3 theme wiring `[11.2]` (R1 MUST-1; design §3.3).
3
+ *
4
+ * HeroUI v3's entire look is driven by a set of named CSS variables (defined in
5
+ * `@layer base` under `:root,.light` / `.dark`). Its "calculated" variables
6
+ * (`--surface-hover`, `--*-soft`, `--border-secondary`, …) are ALL derived via
7
+ * `color-mix(in oklab, var(--<base>) …)` from a handful of BASE variables. So we
8
+ * only override the bases — to our seed-engine `--ch-*` vars — and HeroUI
9
+ * re-tints the whole widget set for free. The override lives in
10
+ * `heroui-theme.css`, UNLAYERED (it therefore beats HeroUI's `@layer base`).
11
+ *
12
+ * `HEROUI_BASE_VAR_MAP` is the single source of truth: `heroui-theme.test.ts`
13
+ * asserts (a) every key is a real var in the installed `@heroui/styles@3.1.0`
14
+ * `themes/default/variables.css` (so a HeroUI upgrade that renames/removes a var
15
+ * fails the gate), (b) every value is a real chances token, and (c) the CSS file
16
+ * has a matching line for each entry. Browser-safe (only ui-core + a string map).
17
+ */
18
+ import { ALL_TOKENS, kebab } from "@chances-ai/ui-core";
19
+ /** HeroUI base CSS var → the chances token whose `--ch-<kebab>` var supplies its
20
+ * value. Calculated HeroUI vars are intentionally absent (color-mix derives
21
+ * them from these bases). The CSS class scope is `.chances-theme`. */
22
+ export const HEROUI_BASE_VAR_MAP = {
23
+ "--background": "bgBase",
24
+ "--foreground": "textBase",
25
+ "--surface": "surfaceBase",
26
+ "--surface-foreground": "textBase",
27
+ "--surface-secondary": "surfaceRaised",
28
+ "--surface-secondary-foreground": "textBase",
29
+ "--surface-tertiary": "bgWeak",
30
+ "--surface-tertiary-foreground": "textBase",
31
+ "--overlay": "surfaceRaised",
32
+ "--overlay-foreground": "textBase",
33
+ "--muted": "textWeak",
34
+ "--default": "bgWeak",
35
+ "--default-foreground": "textBase",
36
+ "--accent": "interactive",
37
+ "--accent-foreground": "textOnInteractive",
38
+ "--success": "success",
39
+ "--success-foreground": "textOnSuccess",
40
+ "--warning": "warning",
41
+ "--warning-foreground": "textOnWarning",
42
+ "--danger": "error",
43
+ "--danger-foreground": "textOnError",
44
+ "--border": "borderBase",
45
+ "--separator": "borderWeak",
46
+ "--field-background": "inputBase",
47
+ "--field-foreground": "textBase",
48
+ "--segment": "surfaceRaised",
49
+ "--segment-foreground": "textBase",
50
+ };
51
+ /** HeroUI color base vars we deliberately leave at HeroUI's defaults, each with
52
+ * its reason. The test asserts every key here still exists in HeroUI's
53
+ * `variables.css` (so a stale exclusion gets flagged on upgrade). */
54
+ export const HEROUI_BASE_VARS_UNMAPPED = {
55
+ "--focus": "= var(--accent) in HeroUI's own variables.css → automatically resolves to our overridden --accent at use-time (CSS var refs resolve against the cascade), so no explicit override needed. Same mechanism as the --accent-hover/--accent-soft calculated vars.",
56
+ "--link": "= --foreground by default, which is already our text color (links are body text → must stay legible on bg; the interactive fill is not).",
57
+ "--field-placeholder": "= --muted by default; --muted IS mapped, so the placeholder inherits our value.",
58
+ "--field-border": "transparent by default (HeroUI fields are borderless); chrome borders come from --border.",
59
+ "--backdrop": "a fixed translucent-black scrim; mode-agnostic, not a themed surface.",
60
+ "--white": "primitive (constant across light/dark).",
61
+ "--black": "primitive (constant across light/dark).",
62
+ "--snow": "primitive (constant across light/dark).",
63
+ "--eclipse": "primitive (constant across light/dark).",
64
+ };
65
+ /** The class a consumer puts on the panel root, e.g.
66
+ * `<div className={heroUiThemeClassName(mode)} style={themeVars(id, mode)}>`.
67
+ * `chances-theme` pulls in the base-var overrides (heroui-theme.css); the mode
68
+ * class (`dark`/`light`) drives HeroUI's own calculated-var block + `color-scheme`. */
69
+ export function heroUiThemeClassName(mode) {
70
+ return `chances-theme ${mode}`;
71
+ }
72
+ /** The set of `--ch-*` var names the override map references — used by the test
73
+ * to validate every mapped token exists. */
74
+ export const HEROUI_REFERENCED_CH_VARS = new Set(Object.values(HEROUI_BASE_VAR_MAP).map((t) => `--ch-${kebab(t)}`));
75
+ /** Every valid `--ch-*` var name (for the test's token-existence check). */
76
+ export const ALL_CH_VARS = new Set(ALL_TOKENS.map((t) => `--ch-${kebab(t)}`));
77
+ //# sourceMappingURL=heroui-theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heroui-theme.js","sourceRoot":"","sources":["../src/heroui-theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,UAAU,EAAE,KAAK,EAAkB,MAAM,qBAAqB,CAAC;AAExE;;uEAEuE;AACvE,MAAM,CAAC,MAAM,mBAAmB,GAA2B;IACzD,cAAc,EAAE,QAAQ;IACxB,cAAc,EAAE,UAAU;IAC1B,WAAW,EAAE,aAAa;IAC1B,sBAAsB,EAAE,UAAU;IAClC,qBAAqB,EAAE,eAAe;IACtC,gCAAgC,EAAE,UAAU;IAC5C,oBAAoB,EAAE,QAAQ;IAC9B,+BAA+B,EAAE,UAAU;IAC3C,WAAW,EAAE,eAAe;IAC5B,sBAAsB,EAAE,UAAU;IAClC,SAAS,EAAE,UAAU;IACrB,WAAW,EAAE,QAAQ;IACrB,sBAAsB,EAAE,UAAU;IAClC,UAAU,EAAE,aAAa;IACzB,qBAAqB,EAAE,mBAAmB;IAC1C,WAAW,EAAE,SAAS;IACtB,sBAAsB,EAAE,eAAe;IACvC,WAAW,EAAE,SAAS;IACtB,sBAAsB,EAAE,eAAe;IACvC,UAAU,EAAE,OAAO;IACnB,qBAAqB,EAAE,aAAa;IACpC,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,YAAY;IAC3B,oBAAoB,EAAE,WAAW;IACjC,oBAAoB,EAAE,UAAU;IAChC,WAAW,EAAE,eAAe;IAC5B,sBAAsB,EAAE,UAAU;CACnC,CAAC;AAEF;;sEAEsE;AACtE,MAAM,CAAC,MAAM,yBAAyB,GAA2B;IAC/D,SAAS,EACP,+PAA+P;IACjQ,QAAQ,EAAE,0IAA0I;IACpJ,qBAAqB,EAAE,iFAAiF;IACxG,gBAAgB,EAAE,2FAA2F;IAC7G,YAAY,EAAE,uEAAuE;IACrF,SAAS,EAAE,yCAAyC;IACpD,SAAS,EAAE,yCAAyC;IACpD,QAAQ,EAAE,yCAAyC;IACnD,WAAW,EAAE,yCAAyC;CACvD,CAAC;AAEF;;;wFAGwF;AACxF,MAAM,UAAU,oBAAoB,CAAC,IAAe;IAClD,OAAO,iBAAiB,IAAI,EAAE,CAAC;AACjC,CAAC;AAED;6CAC6C;AAC7C,MAAM,CAAC,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CACnE,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAClE,CAAC;AAEF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * (7.3 / task 03 — W2) `Icon` — the typed lucide facade `[11.7]` (general-icon
3
+ * tier; the high-cardinality domain icons — Monaco file-type tree / provider
4
+ * logos / git status — go through the build-time SVG spritesheet, scaffolded in
5
+ * `./sprite.ts`). A CURATED registry (not the full ~1500-icon `icons` map) keeps
6
+ * the bundle tree-shakeable: only the icons listed below ship. `name` is a typed
7
+ * union over the registry (OpenHands `keyof typeof icons` discipline). Extend the
8
+ * registry as chrome needs more glyphs. Browser-safe.
9
+ */
10
+ import { type LucideProps } from "lucide-react";
11
+ /** The curated icon set (tree-shakeable). Keys are the public `Icon` names. */
12
+ export declare const ICON_REGISTRY: {
13
+ check: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
14
+ x: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
15
+ "chevron-down": import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
16
+ "chevron-up": import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
17
+ "chevron-left": import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
18
+ "chevron-right": import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
19
+ circle: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
20
+ "circle-dot": import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
21
+ "alert-triangle": import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
22
+ info: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
23
+ file: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
24
+ "file-pen": import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
25
+ folder: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
26
+ "folder-open": import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
27
+ "git-branch": import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
28
+ terminal: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
29
+ search: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
30
+ loader: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
31
+ plus: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
32
+ minus: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
33
+ copy: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
34
+ settings: import("react").ForwardRefExoticComponent<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
35
+ };
36
+ export type IconName = keyof typeof ICON_REGISTRY;
37
+ export interface IconProps extends Omit<LucideProps, "ref"> {
38
+ name: IconName;
39
+ }
40
+ export declare function Icon({ name, size, ...rest }: IconProps): import("react/jsx-runtime").JSX.Element;
41
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/icon/icon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAuBL,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAGtB,+EAA+E;AAC/E,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;CAuB4B,CAAC;AAEvD,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,aAAa,CAAC;AAElD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;IACzD,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,IAAS,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAG3D"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * (7.3 / task 03 — W2) `Icon` — the typed lucide facade `[11.7]` (general-icon
4
+ * tier; the high-cardinality domain icons — Monaco file-type tree / provider
5
+ * logos / git status — go through the build-time SVG spritesheet, scaffolded in
6
+ * `./sprite.ts`). A CURATED registry (not the full ~1500-icon `icons` map) keeps
7
+ * the bundle tree-shakeable: only the icons listed below ship. `name` is a typed
8
+ * union over the registry (OpenHands `keyof typeof icons` discipline). Extend the
9
+ * registry as chrome needs more glyphs. Browser-safe.
10
+ */
11
+ import { AlertTriangle, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Circle, CircleDot, Copy, File, FilePen, Folder, FolderOpen, GitBranch, Info, Loader, Minus, Plus, Search, Settings, Terminal, X, } from "lucide-react";
12
+ /** The curated icon set (tree-shakeable). Keys are the public `Icon` names. */
13
+ export const ICON_REGISTRY = {
14
+ check: Check,
15
+ x: X,
16
+ "chevron-down": ChevronDown,
17
+ "chevron-up": ChevronUp,
18
+ "chevron-left": ChevronLeft,
19
+ "chevron-right": ChevronRight,
20
+ circle: Circle,
21
+ "circle-dot": CircleDot,
22
+ "alert-triangle": AlertTriangle,
23
+ info: Info,
24
+ file: File,
25
+ "file-pen": FilePen,
26
+ folder: Folder,
27
+ "folder-open": FolderOpen,
28
+ "git-branch": GitBranch,
29
+ terminal: Terminal,
30
+ search: Search,
31
+ loader: Loader,
32
+ plus: Plus,
33
+ minus: Minus,
34
+ copy: Copy,
35
+ settings: Settings,
36
+ };
37
+ export function Icon({ name, size = 16, ...rest }) {
38
+ const Glyph = ICON_REGISTRY[name];
39
+ return _jsx(Glyph, { size: size, ...rest });
40
+ }
41
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../src/icon/icon.tsx"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,aAAa,EACb,KAAK,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,EACT,MAAM,EACN,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,CAAC,GAEF,MAAM,cAAc,CAAC;AAGtB,+EAA+E;AAC/E,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,KAAK;IACZ,CAAC,EAAE,CAAC;IACJ,cAAc,EAAE,WAAW;IAC3B,YAAY,EAAE,SAAS;IACvB,cAAc,EAAE,WAAW;IAC3B,eAAe,EAAE,YAAY;IAC7B,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,SAAS;IACvB,gBAAgB,EAAE,aAAa;IAC/B,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,OAAO;IACnB,MAAM,EAAE,MAAM;IACd,aAAa,EAAE,UAAU;IACzB,YAAY,EAAE,SAAS;IACvB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,QAAQ;CACkC,CAAC;AAQvD,MAAM,UAAU,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,IAAI,EAAa;IAC1D,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,KAAC,KAAK,IAAC,IAAI,EAAE,IAAI,KAAM,IAAI,GAAI,CAAC;AACzC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * GENERATED by scripts/gen-sprite.ts — DO NOT EDIT. Run `bun run gen:sprite`.
3
+ * The build-time SVG spritesheet `[11.7]` (design §3.4). Mount <SpriteSheet/>
4
+ * once near the app root; reference glyphs by id via <Sprite name=…> (icon/sprite).
5
+ */
6
+ import type { JSX } from "react";
7
+ export declare const SPRITE_PREFIX = "ch-sprite-";
8
+ /** The domain glyph ids baked into the sheet (sorted). */
9
+ export type SpriteName = "file" | "folder";
10
+ export declare const SPRITE_IDS: readonly SpriteName[];
11
+ /** Hidden <symbol> defs — mount ONCE (e.g. at the panel root). */
12
+ export declare function SpriteSheet(): JSX.Element;
13
+ //# sourceMappingURL=sprite-sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sprite-sheet.d.ts","sourceRoot":"","sources":["../../src/icon/sprite-sheet.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,eAAO,MAAM,aAAa,eAAe,CAAC;AAE1C,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC3C,eAAO,MAAM,UAAU,EAAE,SAAS,UAAU,EAAuB,CAAC;AAEpE,kEAAkE;AAClE,wBAAgB,WAAW,IAAI,GAAG,CAAC,OAAO,CAOzC"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export const SPRITE_PREFIX = "ch-sprite-";
3
+ export const SPRITE_IDS = ["file", "folder"];
4
+ /** Hidden <symbol> defs — mount ONCE (e.g. at the panel root). */
5
+ export function SpriteSheet() {
6
+ return (_jsxs("svg", { width: 0, height: 0, "aria-hidden": "true", focusable: "false", style: { position: "absolute" }, children: [_jsxs("symbol", { id: `${SPRITE_PREFIX}file`, viewBox: "0 0 16 16", children: [_jsx("path", { d: "M4 2h5l3 3v9H4z" }), _jsx("path", { d: "M9 2v3h3" })] }), _jsx("symbol", { id: `${SPRITE_PREFIX}folder`, viewBox: "0 0 16 16", children: _jsx("path", { d: "M2 4h4l1.5 1.5H14v8H2z" }) })] }));
7
+ }
8
+ //# sourceMappingURL=sprite-sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sprite-sheet.js","sourceRoot":"","sources":["../../src/icon/sprite-sheet.tsx"],"names":[],"mappings":";AAOA,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAI1C,MAAM,CAAC,MAAM,UAAU,GAA0B,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAEpE,kEAAkE;AAClE,MAAM,UAAU,WAAW;IACzB,OAAO,CACL,eAAK,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,iBAAc,MAAM,EAAC,SAAS,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,aAC5F,kBAAQ,EAAE,EAAE,GAAG,aAAa,MAAM,EAAE,OAAO,EAAC,WAAW,aAAC,eAAM,CAAC,EAAC,iBAAiB,GAAE,EAAA,eAAM,CAAC,EAAC,UAAU,GAAE,IAAS,EAChH,iBAAQ,EAAE,EAAE,GAAG,aAAa,QAAQ,EAAE,OAAO,EAAC,WAAW,YAAC,eAAM,CAAC,EAAC,wBAAwB,GAAE,GAAS,IACjG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * (7.3 / task 03 — W2 + followup) Domain-icon tier `[11.7]` (design §3.4). The
3
+ * build-time SVG spritesheet is now WIRED: `scripts/gen-sprite.ts` reads
4
+ * `src/icons/*.svg` → `sprite-sheet.tsx` (one hidden `<symbol>` sheet), and
5
+ * `<Sprite name=…>` references a glyph by id via `<use>`, so high-cardinality
6
+ * domain glyphs (Monaco file-type tree, provider logos) cost one request +
7
+ * tree-shake by id, themed by `currentColor`.
8
+ *
9
+ * SCAFFOLD scope (docs/7.3 §3.4): the mechanism + example glyphs (file/folder) +
10
+ * the in-use `GitStatusIcon`. The FULL file-type set lands with **task 05** (the
11
+ * Monaco file tree that consumes it) — tracked, not a silent truncation.
12
+ * (Divergence from opencode's vite virtual-module plugin: a committed generated
13
+ * sheet is build-time-equivalent but safe under `bun test`/`tsc` — see gen-sprite.)
14
+ */
15
+ import type { LucideProps } from "lucide-react";
16
+ import { type SpriteName } from "./sprite-sheet.js";
17
+ export interface SpriteProps {
18
+ name: SpriteName;
19
+ size?: number;
20
+ className?: string;
21
+ /** Provide for a meaningful glyph; omit to mark decorative (aria-hidden). */
22
+ "aria-label"?: string;
23
+ }
24
+ /** Render a domain glyph from the spritesheet by id. Requires <SpriteSheet/> to
25
+ * be mounted once in the tree (icon/sprite-sheet). */
26
+ export declare function Sprite({ name, size, className, "aria-label": ariaLabel }: SpriteProps): import("react/jsx-runtime").JSX.Element;
27
+ export { SpriteSheet, SPRITE_IDS, type SpriteName } from "./sprite-sheet.js";
28
+ /** Git working-tree status → a curated chrome glyph + tone token class.
29
+ * (5-block change-bar density lives in the diff module; this is the tree/sidebar
30
+ * per-file marker.) */
31
+ export declare const GIT_STATUS_ICON: {
32
+ readonly added: "plus";
33
+ readonly modified: "file-pen";
34
+ readonly deleted: "minus";
35
+ readonly untracked: "circle-dot";
36
+ readonly renamed: "chevron-right";
37
+ };
38
+ export interface GitStatusIconProps extends Omit<LucideProps, "ref" | "name"> {
39
+ status: keyof typeof GIT_STATUS_ICON;
40
+ }
41
+ export declare function GitStatusIcon({ status, ...rest }: GitStatusIconProps): import("react/jsx-runtime").JSX.Element;
42
+ //# sourceMappingURL=sprite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sprite.d.ts","sourceRoot":"","sources":["../../src/icon/sprite.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;uDACuD;AACvD,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,IAAS,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,WAAW,2CAa1F;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE7E;;wBAEwB;AACxB,eAAO,MAAM,eAAe;;;;;;CAMqE,CAAC;AAElG,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,MAAM,CAAC;IAC3E,MAAM,EAAE,MAAM,OAAO,eAAe,CAAC;CACtC;AAED,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,2CAEpE"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Icon } from "./icon.js";
3
+ import { SPRITE_PREFIX } from "./sprite-sheet.js";
4
+ /** Render a domain glyph from the spritesheet by id. Requires <SpriteSheet/> to
5
+ * be mounted once in the tree (icon/sprite-sheet). */
6
+ export function Sprite({ name, size = 16, className, "aria-label": ariaLabel }) {
7
+ return (_jsx("svg", { width: size, height: size, className: className, role: ariaLabel ? "img" : undefined, "aria-label": ariaLabel, "aria-hidden": ariaLabel ? undefined : true, children: _jsx("use", { href: `#${SPRITE_PREFIX}${name}` }) }));
8
+ }
9
+ export { SpriteSheet, SPRITE_IDS } from "./sprite-sheet.js";
10
+ /** Git working-tree status → a curated chrome glyph + tone token class.
11
+ * (5-block change-bar density lives in the diff module; this is the tree/sidebar
12
+ * per-file marker.) */
13
+ export const GIT_STATUS_ICON = {
14
+ added: "plus",
15
+ modified: "file-pen",
16
+ deleted: "minus",
17
+ untracked: "circle-dot",
18
+ renamed: "chevron-right",
19
+ };
20
+ export function GitStatusIcon({ status, ...rest }) {
21
+ return _jsx(Icon, { name: GIT_STATUS_ICON[status], ...rest });
22
+ }
23
+ //# sourceMappingURL=sprite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sprite.js","sourceRoot":"","sources":["../../src/icon/sprite.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,IAAI,EAAiB,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAmB,MAAM,mBAAmB,CAAC;AAUnE;uDACuD;AACvD,MAAM,UAAU,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAe;IACzF,OAAO,CACL,cACE,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,gBACvB,SAAS,iBACR,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,YAEzC,cAAK,IAAI,EAAE,IAAI,aAAa,GAAG,IAAI,EAAE,GAAI,GACrC,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAmB,MAAM,mBAAmB,CAAC;AAE7E;;wBAEwB;AACxB,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,eAAe;CACuE,CAAC;AAMlG,MAAM,UAAU,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAsB;IACnE,OAAO,KAAC,IAAI,IAAC,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,KAAM,IAAI,GAAI,CAAC;AAC3D,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,28 @@
1
1
  /**
2
- * `@chances-ai/design-system` — the SOLE cross-platform design system (Tamagui,
3
- * res #1), consumed by `web-ui` (web/Electron) and the future mobile app. Its
4
- * tokens + themes are derived from `@chances-ai/ui-core` so all surfaces TUI,
5
- * web, desktop, mobile share one palette. v17 M0 ships config + tokens only.
2
+ * `@chances-ai/design-system` — the browser-safe UI kit (task 03 / docs/7.3).
3
+ * Self-built chrome (tailwind-variants) + HeroUI v3 widget wrappers + the seed
4
+ * OKLCH `@theme` bridge, consumed by apps/web + apps/desktop (one UI tree, four
5
+ * surfaces). Depends on `@chances-ai/ui-core` (the token engine) + HeroUI; NO
6
+ * `node:*` (cruiser browser-safe rule). `./styles` exports the generated
7
+ * `tokens.css` (the @theme bindings).
8
+ *
9
+ * W1 lands the foundation (cn + @theme bridge + theme-vars); chrome components
10
+ * (W2), HeroUI widgets (W3a) and the diff/Monaco deriver (W3b) build on it.
6
11
  */
7
- export { config, default, type AppConfig } from "./tamagui.config.js";
8
- export { tokens } from "./tokens.js";
9
- export { themes } from "./themes.js";
12
+ export { cn } from "./cn.js";
13
+ export { themeVars, applyThemeVars, type StyleTarget } from "./theme-vars.js";
14
+ export { Surface, surface, type SurfaceProps, type SurfaceVariants } from "./primitives/surface.js";
15
+ export { Stack, Row } from "./primitives/stack.js";
16
+ export { Text, text, type TextProps, type TextVariants } from "./primitives/text.js";
17
+ export { Button, button, type ButtonProps, type ButtonVariants } from "./primitives/button.js";
18
+ export { Card } from "./primitives/card.js";
19
+ export { ScrollArea } from "./primitives/scroll-area.js";
20
+ export { Tabs, type TabItem, type TabsProps } from "./primitives/tabs.js";
21
+ export { StatusBadge, statusBadge, type StatusBadgeProps, type StatusBadgeVariants } from "./primitives/status-badge.js";
22
+ export { Icon, ICON_REGISTRY, type IconName, type IconProps } from "./icon/icon.js";
23
+ export { GitStatusIcon, GIT_STATUS_ICON, type GitStatusIconProps } from "./icon/sprite.js";
24
+ export { Sprite, SpriteSheet, SPRITE_IDS, type SpriteName, type SpriteProps } from "./icon/sprite.js";
25
+ export { HEROUI_BASE_VAR_MAP, HEROUI_BASE_VARS_UNMAPPED, heroUiThemeClassName, } from "./heroui-theme.js";
26
+ export { ChangeBar, changeBarBlocks, type ChangeBarProps, type ChangeBarBlocks } from "./diff/change-bar.js";
27
+ export { seedThemeToMonaco, type MonacoThemeData, type MonacoTokenRule } from "./diff/monaco-theme.js";
10
28
  //# sourceMappingURL=index.d.ts.map