@chances-ai/design-system 21.0.0 → 24.1.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.
- package/dist/cn.d.ts +11 -0
- package/dist/cn.d.ts.map +1 -0
- package/dist/cn.js +14 -0
- package/dist/cn.js.map +1 -0
- package/dist/diff/change-bar.d.ts +30 -0
- package/dist/diff/change-bar.d.ts.map +1 -0
- package/dist/diff/change-bar.js +55 -0
- package/dist/diff/change-bar.js.map +1 -0
- package/dist/diff/monaco-theme.d.ts +32 -0
- package/dist/diff/monaco-theme.d.ts.map +1 -0
- package/dist/diff/monaco-theme.js +70 -0
- package/dist/diff/monaco-theme.js.map +1 -0
- package/dist/heroui-theme.d.ts +37 -0
- package/dist/heroui-theme.d.ts.map +1 -0
- package/dist/heroui-theme.js +77 -0
- package/dist/heroui-theme.js.map +1 -0
- package/dist/icon/icon.d.ts +41 -0
- package/dist/icon/icon.d.ts.map +1 -0
- package/dist/icon/icon.js +41 -0
- package/dist/icon/icon.js.map +1 -0
- package/dist/icon/sprite.d.ts +30 -0
- package/dist/icon/sprite.d.ts.map +1 -0
- package/dist/icon/sprite.js +16 -0
- package/dist/icon/sprite.js.map +1 -0
- package/dist/index.d.ts +23 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -7
- package/dist/index.js.map +1 -1
- package/dist/primitives/button.d.ts +52 -0
- package/dist/primitives/button.d.ts.map +1 -0
- package/dist/primitives/button.js +20 -0
- package/dist/primitives/button.js.map +1 -0
- package/dist/primitives/card.d.ts +7 -0
- package/dist/primitives/card.d.ts.map +1 -0
- package/dist/primitives/card.js +10 -0
- package/dist/primitives/card.js.map +1 -0
- package/dist/primitives/scroll-area.d.ts +7 -0
- package/dist/primitives/scroll-area.d.ts.map +1 -0
- package/dist/primitives/scroll-area.js +10 -0
- package/dist/primitives/scroll-area.js.map +1 -0
- package/dist/primitives/stack.d.ts +9 -0
- package/dist/primitives/stack.d.ts.map +1 -0
- package/dist/primitives/stack.js +14 -0
- package/dist/primitives/stack.js.map +1 -0
- package/dist/primitives/status-badge.d.ts +42 -0
- package/dist/primitives/status-badge.d.ts.map +1 -0
- package/dist/primitives/status-badge.js +21 -0
- package/dist/primitives/status-badge.js.map +1 -0
- package/dist/primitives/surface.d.ts +201 -0
- package/dist/primitives/surface.d.ts.map +1 -0
- package/dist/primitives/surface.js +39 -0
- package/dist/primitives/surface.js.map +1 -0
- package/dist/primitives/text.d.ts +124 -0
- package/dist/primitives/text.d.ts.map +1 -0
- package/dist/primitives/text.js +30 -0
- package/dist/primitives/text.js.map +1 -0
- package/dist/theme-vars.d.ts +25 -0
- package/dist/theme-vars.d.ts.map +1 -0
- package/dist/theme-vars.js +24 -0
- package/dist/theme-vars.js.map +1 -0
- package/dist/widgets/filter-autocomplete.d.ts +21 -0
- package/dist/widgets/filter-autocomplete.d.ts.map +1 -0
- package/dist/widgets/filter-autocomplete.js +30 -0
- package/dist/widgets/filter-autocomplete.js.map +1 -0
- package/dist/widgets/index.d.ts +17 -0
- package/dist/widgets/index.d.ts.map +1 -0
- package/dist/widgets/index.js +17 -0
- package/dist/widgets/index.js.map +1 -0
- package/package.json +60 -7
- package/src/heroui-theme.css +40 -0
- package/src/tokens.css +143 -0
- package/dist/tamagui.config.d.ts +0 -117
- package/dist/tamagui.config.d.ts.map +0 -1
- package/dist/tamagui.config.js +0 -35
- package/dist/tamagui.config.js.map +0 -1
- package/dist/themes.d.ts +0 -5
- package/dist/themes.d.ts.map +0 -1
- package/dist/themes.js +0 -35
- package/dist/themes.js.map +0 -1
- package/dist/tokens.d.ts +0 -90
- package/dist/tokens.d.ts.map +0 -1
- package/dist/tokens.js +0 -34
- 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
|
package/dist/cn.d.ts.map
ADDED
|
@@ -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,MA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EAAE,CAAC,CACxB,eAAc,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,IAArD,CAAC,CAAwD,CACrE,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { 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;AACH,OAAO,EAAE,kBAAkB,EAA0D,MAAM,qBAAqB,CAAC;AAiBjH,kEAAkE;AAClE,MAAM,YAAY,GAAqE;IACrF,EAAE,KA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,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,CA0BtD,CAAC;AAEF;;sEAEsE;AACtE,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAa5D,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
|
+
"--success": "success",
|
|
37
|
+
"--success-foreground": "textOnSuccess",
|
|
38
|
+
"--warning": "warning",
|
|
39
|
+
"--warning-foreground": "textOnWarning",
|
|
40
|
+
"--danger": "error",
|
|
41
|
+
"--danger-foreground": "textOnError",
|
|
42
|
+
"--border": "borderBase",
|
|
43
|
+
"--separator": "borderWeak",
|
|
44
|
+
"--field-background": "inputBase",
|
|
45
|
+
"--field-foreground": "textBase",
|
|
46
|
+
"--segment": "surfaceRaised",
|
|
47
|
+
"--segment-foreground": "textBase",
|
|
48
|
+
};
|
|
49
|
+
/** HeroUI color base vars we deliberately leave at HeroUI's defaults, each with
|
|
50
|
+
* its reason. The test asserts every key here still exists in HeroUI's
|
|
51
|
+
* `variables.css` (so a stale exclusion gets flagged on upgrade). */
|
|
52
|
+
export const HEROUI_BASE_VARS_UNMAPPED = {
|
|
53
|
+
"--accent": "action/interactive color — kept as HeroUI's blue. It already sits in our `permission` periwinkle family AND ships a contrast-correct `--accent-foreground`; overriding it without a matching `on(permission)` token would risk illegible button/focus text. Revisit when a `textOnPermission` token lands.",
|
|
54
|
+
"--accent-foreground": "paired with --accent (see above).",
|
|
55
|
+
"--focus": "= --accent by default; follows the accent decision.",
|
|
56
|
+
"--link": "= --foreground by default, which is already our text color.",
|
|
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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,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,a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aco file-type tree, provider logos) will ship as a build-time
|
|
4
|
+
* SVG spritesheet (opencode `vite` spritesheet plugin pattern): `src/icons/*.svg`
|
|
5
|
+
* → one `<symbol>` sheet → a `<use href="#id">` component, so hundreds of glyphs
|
|
6
|
+
* cost one request and tree-shake by id.
|
|
7
|
+
*
|
|
8
|
+
* Per the W2 scope cut (docs/7.3 §3.4): the build-time plugin + the full
|
|
9
|
+
* file-type icon set land with **task 05** (the Monaco file tree that consumes
|
|
10
|
+
* them) — building them now would pre-create glyphs nothing renders yet. W2 ships
|
|
11
|
+
* the CONCRETE, in-use bit only: the git-status indicator below (the IDE git
|
|
12
|
+
* surface uses it today). NOT a silent truncation — the file-type set is tracked
|
|
13
|
+
* to task 05.
|
|
14
|
+
*/
|
|
15
|
+
import type { LucideProps } from "lucide-react";
|
|
16
|
+
/** Git working-tree status → a curated chrome glyph + tone token class.
|
|
17
|
+
* (5-block change-bar density lives in the diff module; this is the tree/sidebar
|
|
18
|
+
* per-file marker.) */
|
|
19
|
+
export declare const GIT_STATUS_ICON: {
|
|
20
|
+
readonly added: "plus";
|
|
21
|
+
readonly modified: "file-pen";
|
|
22
|
+
readonly deleted: "minus";
|
|
23
|
+
readonly untracked: "circle-dot";
|
|
24
|
+
readonly renamed: "chevron-right";
|
|
25
|
+
};
|
|
26
|
+
export interface GitStatusIconProps extends Omit<LucideProps, "ref" | "name"> {
|
|
27
|
+
status: keyof typeof GIT_STATUS_ICON;
|
|
28
|
+
}
|
|
29
|
+
export declare function GitStatusIcon({ status, ...rest }: GitStatusIconProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
//# 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;AAGhD;;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,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from "./icon.js";
|
|
3
|
+
/** Git working-tree status → a curated chrome glyph + tone token class.
|
|
4
|
+
* (5-block change-bar density lives in the diff module; this is the tree/sidebar
|
|
5
|
+
* per-file marker.) */
|
|
6
|
+
export const GIT_STATUS_ICON = {
|
|
7
|
+
added: "plus",
|
|
8
|
+
modified: "file-pen",
|
|
9
|
+
deleted: "minus",
|
|
10
|
+
untracked: "circle-dot",
|
|
11
|
+
renamed: "chevron-right",
|
|
12
|
+
};
|
|
13
|
+
export function GitStatusIcon({ status, ...rest }) {
|
|
14
|
+
return _jsx(Icon, { name: GIT_STATUS_ICON[status], ...rest });
|
|
15
|
+
}
|
|
16
|
+
//# 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;AAEhD;;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,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@chances-ai/design-system` — the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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 {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
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 { StatusBadge, statusBadge, type StatusBadgeProps, type StatusBadgeVariants } from "./primitives/status-badge.js";
|
|
21
|
+
export { Icon, ICON_REGISTRY, type IconName, type IconProps } from "./icon/icon.js";
|
|
22
|
+
export { GitStatusIcon, GIT_STATUS_ICON, type GitStatusIconProps } from "./icon/sprite.js";
|
|
23
|
+
export { HEROUI_BASE_VAR_MAP, HEROUI_BASE_VARS_UNMAPPED, heroUiThemeClassName, } from "./heroui-theme.js";
|
|
24
|
+
export { ChangeBar, changeBarBlocks, type ChangeBarProps, type ChangeBarBlocks } from "./diff/change-bar.js";
|
|
25
|
+
export { seedThemeToMonaco, type MonacoThemeData, type MonacoTokenRule } from "./diff/monaco-theme.js";
|
|
10
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGzH,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAM3F,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `@chances-ai/design-system` — the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
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 {
|
|
8
|
-
export {
|
|
9
|
-
|
|
12
|
+
export { cn } from "./cn.js";
|
|
13
|
+
export { themeVars, applyThemeVars } from "./theme-vars.js";
|
|
14
|
+
// (W2) Self-built chrome primitives (tailwind-variants) — the inline-style
|
|
15
|
+
// Box/Txt replacements + the chrome kit consumed by the W4 web-ui migration.
|
|
16
|
+
export { Surface, surface } from "./primitives/surface.js";
|
|
17
|
+
export { Stack, Row } from "./primitives/stack.js";
|
|
18
|
+
export { Text, text } from "./primitives/text.js";
|
|
19
|
+
export { Button, button } from "./primitives/button.js";
|
|
20
|
+
export { Card } from "./primitives/card.js";
|
|
21
|
+
export { ScrollArea } from "./primitives/scroll-area.js";
|
|
22
|
+
export { StatusBadge, statusBadge } from "./primitives/status-badge.js";
|
|
23
|
+
// (W2) Icons: typed lucide facade (general tier) + git-status domain glyph.
|
|
24
|
+
export { Icon, ICON_REGISTRY } from "./icon/icon.js";
|
|
25
|
+
export { GitStatusIcon, GIT_STATUS_ICON } from "./icon/sprite.js";
|
|
26
|
+
// (W3a) HeroUI theme wiring — the base-var override map + the panel-root class
|
|
27
|
+
// helper. HeroUI-FREE (just the map + a kebab string), so it lives in the main
|
|
28
|
+
// barrel; the HeroUI widget wrappers themselves are the separate `./widgets`
|
|
29
|
+
// entry. The `.chances-theme` override rules ship as `./heroui-theme.css`.
|
|
30
|
+
export { HEROUI_BASE_VAR_MAP, HEROUI_BASE_VARS_UNMAPPED, heroUiThemeClassName, } from "./heroui-theme.js";
|
|
31
|
+
// (W3b) diff visuals — the 5-block change-bar + the seed→Monaco theme deriver
|
|
32
|
+
// (both browser-safe; the deriver pulls no monaco runtime).
|
|
33
|
+
export { ChangeBar, changeBarBlocks } from "./diff/change-bar.js";
|
|
34
|
+
export { seedThemeToMonaco } from "./diff/monaco-theme.js";
|
|
10
35
|
//# sourceMappingURL=index.js.map
|