@filipgutica/design-system 1.1.0 → 2.0.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/README.md +2 -2
- package/dist/themes/graphite-indigo.css +3 -3
- package/dist/tokens.d.ts +57 -57
- package/dist/tokens.js +113 -113
- package/dist/tokens.json +112 -112
- package/language/DESIGN.md +29 -29
- package/language/components.html +189 -189
- package/language/components.md +55 -55
- package/language/decisions.md +96 -18
- package/language/docs.html +20 -20
- package/language/product.html +22 -22
- package/language/reference.html +213 -213
- package/language/tokens.css +138 -137
- package/language/visualizations/build-count-report.mjs +4 -2
- package/language/visualizations/report.css +2 -2
- package/package.json +1 -1
- /package/language/{themes → editor-themes}/graphite-indigo/LICENSE +0 -0
- /package/language/{themes → editor-themes}/graphite-indigo/README.md +0 -0
- /package/language/{themes → editor-themes}/graphite-indigo/SOURCE.json +0 -0
- /package/language/{themes → editor-themes}/graphite-indigo/THIRD_PARTY_NOTICES.md +0 -0
- /package/language/{themes → editor-themes}/graphite-indigo/graphite-indigo.t3-theme.json +0 -0
- /package/language/{themes → editor-themes}/graphite-indigo/package.json +0 -0
- /package/language/{themes → editor-themes}/graphite-indigo/themes/graphite-indigo-dark-color-theme.json +0 -0
- /package/language/{themes → editor-themes}/graphite-indigo/themes/graphite-indigo-light-color-theme.json +0 -0
package/language/tokens.css
CHANGED
|
@@ -6,15 +6,16 @@
|
|
|
6
6
|
* Two layers. The identity block at the top of :root is the project's own: its hue
|
|
7
7
|
* pair and fonts. A new project keeps this file unchanged and sets those lines on
|
|
8
8
|
* :root in its own stylesheet, loaded after this one. The dark blocks switch
|
|
9
|
-
* --project to --project-dark, so the override needs no dark rule. Check
|
|
10
|
-
* --accent-text at 4.5:1 on the new hue and override it too when it falls short.
|
|
9
|
+
* --color-project to --color-project-dark, so the override needs no dark rule. Check
|
|
10
|
+
* --color-accent-text at 4.5:1 on the new hue and override it too when it falls short.
|
|
11
11
|
* The terminal plate tokens also belong to the identity layer; every other line is core.
|
|
12
12
|
*
|
|
13
13
|
* Standalone HTML: import or inline this file.
|
|
14
14
|
* Inline visuals: inherit the host font and theme variables; see DESIGN.md.
|
|
15
15
|
* Repos: map these names onto the repository's own token system.
|
|
16
|
-
* Sites on @filipgutica/ui:
|
|
17
|
-
*
|
|
16
|
+
* Sites on @filipgutica/ui: the names are the same. Each line's "ui:" comment lists the ui
|
|
17
|
+
* variables that carry its value, its own name first; the others are component roles with the same
|
|
18
|
+
* value. A var(…) comment is a fallback ui writes where it reads the role. ui's build reads these comments.
|
|
18
19
|
*
|
|
19
20
|
* Theme states: bare :root is light. prefers-color-scheme picks dark unless
|
|
20
21
|
* data-theme="light" is set. data-theme="dark" forces dark.
|
|
@@ -23,83 +24,83 @@
|
|
|
23
24
|
:root {
|
|
24
25
|
color-scheme: light;
|
|
25
26
|
|
|
26
|
-
/* Identity layer: a project swaps these four lines. --project is the light-theme hue;
|
|
27
|
-
--project-dark is the dark-theme hue, also used on dark plates in both themes. */
|
|
28
|
-
--project: #4b45d1; /* ui: --color-project */
|
|
29
|
-
--project-dark: #a5a1ff; /* ui: --color-project-dark */
|
|
30
|
-
--font-
|
|
27
|
+
/* Identity layer: a project swaps these four lines. --color-project is the light-theme hue;
|
|
28
|
+
--color-project-dark is the dark-theme hue, also used on dark plates in both themes. */
|
|
29
|
+
--color-project: #4b45d1; /* ui: --color-project */
|
|
30
|
+
--color-project-dark: #a5a1ff; /* ui: --color-project-dark */
|
|
31
|
+
--font-ui: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif; /* ui: --font-ui */
|
|
31
32
|
--font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; /* ui: --font-mono */
|
|
32
33
|
|
|
33
34
|
/* Core roles: only the identity lines above feed them. Neutral paper and graphite surfaces. */
|
|
34
|
-
--bg: #f4f5f6; /* ui: --color-bg */
|
|
35
|
-
--surface: #e9ebed; /* ui: --color-surface */
|
|
36
|
-
--surface-raised: #fbfbfc; /* ui: --color-surface-raised, --color-input-bg */
|
|
37
|
-
--surface-
|
|
35
|
+
--color-bg: #f4f5f6; /* ui: --color-bg */
|
|
36
|
+
--color-surface: #e9ebed; /* ui: --color-surface */
|
|
37
|
+
--color-surface-raised: #fbfbfc; /* ui: --color-surface-raised, --color-input-bg */
|
|
38
|
+
--color-surface-muted: #e2e5e8; /* ui: --color-surface-muted */
|
|
38
39
|
/* The well: segmented and switch tracks, pressed buttons, selected radio cards, and disabled fields. */
|
|
39
|
-
--
|
|
40
|
+
--color-well: var(--color-surface-muted); /* ui: --color-well */
|
|
40
41
|
/* Fields (input, select, textarea, search): a white fill with a faint edge in light, the sunk well in dark.
|
|
41
42
|
Dark fields stay sunk in the well. It sits within about 1.01:1 of the canvas, so the edge carries the shape. */
|
|
42
|
-
--field-bg: var(--surface-raised); /* ui: --color-field-bg */
|
|
43
|
-
--field-edge: var(--border-subtle); /* ui: --color-field-edge */
|
|
44
|
-
--field
|
|
45
|
-
--control-thumb: var(--surface-raised); /* ui: --color-control-thumb */
|
|
43
|
+
--color-field-bg: var(--color-surface-raised); /* ui: --color-field-bg */
|
|
44
|
+
--color-field-edge: var(--color-border-subtle); /* ui: --color-field-edge */
|
|
45
|
+
--shadow-field: none; /* ui: --shadow-field */
|
|
46
|
+
--color-control-thumb: var(--color-surface-raised); /* ui: --color-control-thumb */
|
|
46
47
|
/* Selected rows lift and take a faint accent tint, so the selection reads on near-white panels too. */
|
|
47
|
-
--nav-current: color-mix(in srgb, var(--accent) 14%, var(--surface-raised)); /* ui: --color-nav-current */
|
|
48
|
-
/* Text on the current nav row, selected tab, and selected list row: the first of --accent, --text, black, and white
|
|
49
|
-
that reaches 4.5:1 over --nav-current, on the page and on a surface. */
|
|
50
|
-
--nav-current-text: var(--accent); /* ui: var(--color-nav-current-text, var(--color-accent)) */
|
|
51
|
-
/* The selected segmented label: the first of --accent, --text, black, and white that reaches
|
|
48
|
+
--color-nav-current: color-mix(in srgb, var(--color-accent) 14%, var(--color-surface-raised)); /* ui: --color-nav-current */
|
|
49
|
+
/* Text on the current nav row, selected tab, and selected list row: the first of --color-accent, --color-text, black, and white
|
|
50
|
+
that reaches 4.5:1 over --color-nav-current, on the page and on a surface. */
|
|
51
|
+
--color-nav-current-text: var(--color-accent); /* ui: var(--color-nav-current-text, var(--color-accent)) */
|
|
52
|
+
/* The selected segmented label: the first of --color-accent, --color-text, black, and white that reaches
|
|
52
53
|
4.5:1 on the thumb. An icon-only option needs 3:1. */
|
|
53
|
-
--segmented-current-text: var(--accent); /* ui: var(--color-segmented-current-text, var(--color-accent)) */
|
|
54
|
-
--row-hover: #e2e5e8; /* ui: --color-row-hover */
|
|
55
|
-
--row-selected: var(--surface-raised); /* ui: --color-row-selected */
|
|
56
|
-
--border-subtle: #d3d8dd; /* ui: --color-border-subtle */
|
|
57
|
-
--border: #6d747b; /* ui: --color-border, --color-input-border */
|
|
58
|
-
--text: #101315; /* ui: --color-text, --color-input-text, --color-row-selected-text, --color-status-text */
|
|
59
|
-
--
|
|
60
|
-
--overlay: rgb(0 0 0 / 42%); /* ui: --color-overlay */
|
|
54
|
+
--color-segmented-current-text: var(--color-accent); /* ui: var(--color-segmented-current-text, var(--color-accent)) */
|
|
55
|
+
--color-row-hover: #e2e5e8; /* ui: --color-row-hover */
|
|
56
|
+
--color-row-selected: var(--color-surface-raised); /* ui: --color-row-selected */
|
|
57
|
+
--color-border-subtle: #d3d8dd; /* ui: --color-border-subtle */
|
|
58
|
+
--color-border: #6d747b; /* ui: --color-border, --color-input-border */
|
|
59
|
+
--color-text: #101315; /* ui: --color-text, --color-input-text, --color-row-selected-text, --color-status-text */
|
|
60
|
+
--color-muted: #50575e; /* ui: --color-muted, --color-input-placeholder, --color-syntax-operator, --color-syntax-punctuation */
|
|
61
|
+
--color-overlay: rgb(0 0 0 / 42%); /* ui: --color-overlay */
|
|
61
62
|
|
|
62
|
-
/* The hue fills primary actions and marks selection; links keep --link. */
|
|
63
|
-
--accent: var(--project); /* ui: --color-accent, --color-button-bg, --color-progress */
|
|
64
|
-
--accent-text: var(--bg); /* ui: --color-accent-text, --color-button-text */
|
|
65
|
-
--accent-hover: var(--text); /* ui: --color-accent-hover */
|
|
66
|
-
--button-hover: color-mix(in srgb, var(--accent) 85%, var(--text)); /* ui: --color-button-hover */
|
|
67
|
-
--link: #0b5f7c; /* ui: --color-link */
|
|
68
|
-
/* One focus ring for every role: the accent, at 3:1 or more on --bg, --surface, and --surface-raised
|
|
63
|
+
/* The hue fills primary actions and marks selection; links keep --color-link. */
|
|
64
|
+
--color-accent: var(--color-project); /* ui: --color-accent, --color-button-bg, --color-progress */
|
|
65
|
+
--color-accent-text: var(--color-bg); /* ui: --color-accent-text, --color-button-text */
|
|
66
|
+
--color-accent-hover: var(--color-text); /* ui: --color-accent-hover */
|
|
67
|
+
--color-button-hover: color-mix(in srgb, var(--color-accent) 85%, var(--color-text)); /* ui: --color-button-hover */
|
|
68
|
+
--color-link: #0b5f7c; /* ui: --color-link */
|
|
69
|
+
/* One focus ring for every role: the accent, at 3:1 or more on --color-bg, --color-surface, and --color-surface-raised
|
|
69
70
|
in both themes. Fields mark focus with their own accent edge instead; see components.md. */
|
|
70
|
-
--focus: var(--accent); /* ui: --color-focus */
|
|
71
|
+
--color-focus: var(--color-accent); /* ui: --color-focus */
|
|
71
72
|
--focus-width: 2px; /* ui: --focus-width */
|
|
72
73
|
--focus-offset: 3px; /* ui: --focus-offset */
|
|
73
74
|
|
|
74
75
|
/* Status: only for state, never for decoration. */
|
|
75
|
-
--success: #157249; /* ui: --color-success */
|
|
76
|
-
--warning: #86532e; /* ui: --color-warning */
|
|
77
|
-
--
|
|
78
|
-
--info: #175cd3; /* ui: --color-info */
|
|
79
|
-
--success-
|
|
80
|
-
--warning-
|
|
81
|
-
--
|
|
82
|
-
--info-
|
|
76
|
+
--color-success: #157249; /* ui: --color-success */
|
|
77
|
+
--color-warning: #86532e; /* ui: --color-warning */
|
|
78
|
+
--color-error: #bd342b; /* ui: --color-error */
|
|
79
|
+
--color-info: #175cd3; /* ui: --color-info */
|
|
80
|
+
--color-success-surface: #d9e5e1; /* ui: --color-success-surface */
|
|
81
|
+
--color-warning-surface: #e7e2de; /* ui: --color-warning-surface */
|
|
82
|
+
--color-error-surface: #efe4e4; /* ui: --color-error-surface */
|
|
83
|
+
--color-info-surface: #d9e3f2; /* ui: --color-info-surface */
|
|
83
84
|
|
|
84
85
|
/* Identity layer, derived: terminal folio plates. Commands take the hue; captures stay neutral.
|
|
85
86
|
A project without terminal plates leaves these unused. */
|
|
86
|
-
--command-bg: color-mix(in srgb, var(--project) 25%, #101010); /* ui: --color-command-bg */
|
|
87
|
-
--command-border: transparent; /* ui: --color-command-border */
|
|
88
|
-
--terminal: #0a0c0e; /* ui: --color-terminal */
|
|
89
|
-
--terminal-text: #e6e9eb; /* ui: --color-terminal-text */
|
|
90
|
-
--terminal-border: #2a3036; /* ui: --color-terminal-border */
|
|
91
|
-
--terminal-caption: #13171a; /* ui: --color-terminal-caption */
|
|
92
|
-
--terminal-caption-text: #c9d0d6; /* ui: --color-terminal-caption-text */
|
|
87
|
+
--color-command-bg: color-mix(in srgb, var(--color-project) 25%, #101010); /* ui: --color-command-bg */
|
|
88
|
+
--color-command-border: transparent; /* ui: --color-command-border */
|
|
89
|
+
--color-terminal: #0a0c0e; /* ui: --color-terminal */
|
|
90
|
+
--color-terminal-text: #e6e9eb; /* ui: --color-terminal-text */
|
|
91
|
+
--color-terminal-border: #2a3036; /* ui: --color-terminal-border */
|
|
92
|
+
--color-terminal-caption: #13171a; /* ui: --color-terminal-caption */
|
|
93
|
+
--color-terminal-caption-text: #c9d0d6; /* ui: --color-terminal-caption-text */
|
|
93
94
|
/* The terminal capture's header stays dark in both appearances, so its selected tab keeps the dark lift. */
|
|
94
|
-
--
|
|
95
|
+
--shadow-nav-current-dark: 0 1px 2px rgb(0 0 0 / 25%); /* ui: --shadow-nav-current-dark */
|
|
95
96
|
|
|
96
97
|
/* Source code wells */
|
|
97
|
-
--code
|
|
98
|
-
--code-text: var(--text); /* ui: --color-code-text, --color-syntax-variable */
|
|
99
|
-
--
|
|
100
|
-
--
|
|
101
|
-
--
|
|
102
|
-
--
|
|
98
|
+
--color-code: var(--color-surface); /* ui: --color-code */
|
|
99
|
+
--color-code-text: var(--color-text); /* ui: --color-code-text, --color-syntax-variable */
|
|
100
|
+
--color-syntax-keyword: #715b42; /* ui: --color-syntax-keyword, --color-syntax-function, --color-syntax-tag */
|
|
101
|
+
--color-syntax-string: #346347; /* ui: --color-syntax-string */
|
|
102
|
+
--color-syntax-number: #86532e; /* ui: --color-syntax-number, --color-syntax-type, --color-syntax-attribute */
|
|
103
|
+
--color-syntax-comment: #626772; /* ui: --color-syntax-comment */
|
|
103
104
|
|
|
104
105
|
/* Type scale. The identity block names the families. */
|
|
105
106
|
--text-xs: 0.75rem; /* ui: --text-xs */
|
|
@@ -144,9 +145,9 @@
|
|
|
144
145
|
--sidebar: 224px; /* ui: --sidebar */
|
|
145
146
|
|
|
146
147
|
/* Shape */
|
|
147
|
-
--radius-
|
|
148
|
-
--radius-
|
|
149
|
-
--radius-
|
|
148
|
+
--radius-inline: 6px; /* ui: --radius-inline */
|
|
149
|
+
--radius-control: 999px; /* ui: --radius-control */
|
|
150
|
+
--radius-panel: 16px; /* ui: --radius-panel */
|
|
150
151
|
--radius-field: 10px; /* ui: --radius-field */
|
|
151
152
|
--radius-pill: 999px; /* ui: --radius-pill */
|
|
152
153
|
|
|
@@ -155,11 +156,11 @@
|
|
|
155
156
|
--shadow-raise: 0 1px 2px rgb(16 24 40 / 12%), 0 0 0 1px rgb(16 24 40 / 6%); /* ui: --shadow-raise */
|
|
156
157
|
--shadow-surface: 0 1px 2px rgb(16 24 40 / 6%), 0 0 0 1px rgb(16 24 40 / 6%); /* ui: --shadow-surface */
|
|
157
158
|
--shadow-sink: inset 1.2px 1.2px 3.6px rgb(130 142 158 / 35%), inset -1.2px -1.2px 3.6px rgb(255 255 255 / 80%); /* ui: --shadow-sink */
|
|
158
|
-
--shadow-
|
|
159
|
+
--shadow-dialog: 0 8px 24px rgb(16 16 24 / 12%), 0 0 0 1px var(--color-border-subtle); /* ui: --shadow-dialog */
|
|
159
160
|
--shadow-nav-current: 0 1px 3px rgb(130 142 158 / 40%); /* ui: --shadow-nav-current */
|
|
160
161
|
/* A focused field's inset line inside its accent or danger edge. It takes each theme's accent and danger. */
|
|
161
|
-
--field-
|
|
162
|
-
--field-
|
|
162
|
+
--shadow-field-focus: inset 0 0 0 2px color-mix(in srgb, var(--color-accent) 18%, transparent); /* ui: --shadow-field-focus */
|
|
163
|
+
--shadow-field-focus-invalid: inset 0 0 0 2px color-mix(in srgb, var(--color-error) 18%, transparent); /* ui: --shadow-field-focus-invalid */
|
|
163
164
|
|
|
164
165
|
/* Motion */
|
|
165
166
|
--duration-fast: 120ms; /* ui: --duration-fast */
|
|
@@ -170,83 +171,83 @@
|
|
|
170
171
|
@media (prefers-color-scheme: dark) {
|
|
171
172
|
:root:not([data-theme="light"]) {
|
|
172
173
|
color-scheme: dark;
|
|
173
|
-
--project: var(--project-dark);
|
|
174
|
-
--bg: #0d1012;
|
|
175
|
-
--surface: #13171a;
|
|
176
|
-
--surface-raised: #181d21;
|
|
177
|
-
--surface-
|
|
178
|
-
--
|
|
179
|
-
--field-bg: var(--
|
|
180
|
-
--field
|
|
181
|
-
--control-thumb: color-mix(in srgb, var(--surface-raised) 88%, white);
|
|
182
|
-
--nav-current: color-mix(in srgb, var(--accent) 20%, transparent);
|
|
183
|
-
--row-hover: #20262b;
|
|
184
|
-
--border-subtle: #262d33;
|
|
185
|
-
--border: #78818a;
|
|
186
|
-
--text: #e6e9eb;
|
|
187
|
-
--
|
|
188
|
-
--overlay: rgb(0 0 0 / 62%);
|
|
189
|
-
--link: #67c1df;
|
|
190
|
-
--success: #4cc38a;
|
|
191
|
-
--warning: #e2a54b;
|
|
192
|
-
--
|
|
193
|
-
--info: #84adff;
|
|
194
|
-
--success-
|
|
195
|
-
--warning-
|
|
196
|
-
--
|
|
197
|
-
--info-
|
|
198
|
-
--command-bg: color-mix(in srgb, var(--project) 16%, black);
|
|
199
|
-
--command-border: color-mix(in srgb, var(--project) 28%, black);
|
|
200
|
-
--
|
|
201
|
-
--
|
|
202
|
-
--
|
|
203
|
-
--
|
|
174
|
+
--color-project: var(--color-project-dark);
|
|
175
|
+
--color-bg: #0d1012;
|
|
176
|
+
--color-surface: #13171a;
|
|
177
|
+
--color-surface-raised: #181d21;
|
|
178
|
+
--color-surface-muted: #20262b;
|
|
179
|
+
--color-well: color-mix(in srgb, var(--color-bg) 87.5%, black);
|
|
180
|
+
--color-field-bg: var(--color-well);
|
|
181
|
+
--shadow-field: var(--shadow-sink);
|
|
182
|
+
--color-control-thumb: color-mix(in srgb, var(--color-surface-raised) 88%, white);
|
|
183
|
+
--color-nav-current: color-mix(in srgb, var(--color-accent) 20%, transparent);
|
|
184
|
+
--color-row-hover: #20262b;
|
|
185
|
+
--color-border-subtle: #262d33;
|
|
186
|
+
--color-border: #78818a;
|
|
187
|
+
--color-text: #e6e9eb;
|
|
188
|
+
--color-muted: #9aa3ab;
|
|
189
|
+
--color-overlay: rgb(0 0 0 / 62%);
|
|
190
|
+
--color-link: #67c1df;
|
|
191
|
+
--color-success: #4cc38a;
|
|
192
|
+
--color-warning: #e2a54b;
|
|
193
|
+
--color-error: #f0776c;
|
|
194
|
+
--color-info: #84adff;
|
|
195
|
+
--color-success-surface: #172d25;
|
|
196
|
+
--color-warning-surface: #2f281b;
|
|
197
|
+
--color-error-surface: #312020;
|
|
198
|
+
--color-info-surface: #202938;
|
|
199
|
+
--color-command-bg: color-mix(in srgb, var(--color-project) 16%, black);
|
|
200
|
+
--color-command-border: color-mix(in srgb, var(--color-project) 28%, black);
|
|
201
|
+
--color-syntax-keyword: #d8c2a5;
|
|
202
|
+
--color-syntax-string: #a8bd9c;
|
|
203
|
+
--color-syntax-number: #d5b98c;
|
|
204
|
+
--color-syntax-comment: #a0a6b1;
|
|
204
205
|
--shadow-raise: inset 0 1px 0 rgb(255 255 255 / 7%), 0 1px 2px rgb(0 0 0 / 45%);
|
|
205
206
|
--shadow-surface: 0 0 0 1px rgb(255 255 255 / 6%);
|
|
206
207
|
--shadow-sink: inset 1.2px 1.2px 3.6px rgb(0 0 0 / 55%), inset -1.2px -1.2px 3.6px rgb(255 255 255 / 5%);
|
|
207
|
-
--shadow-
|
|
208
|
-
--shadow-nav-current: var(--
|
|
208
|
+
--shadow-dialog: 0 8px 24px rgb(0 0 0 / 45%), 0 0 0 1px var(--color-border-subtle);
|
|
209
|
+
--shadow-nav-current: var(--shadow-nav-current-dark);
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
:root[data-theme="dark"] {
|
|
213
214
|
color-scheme: dark;
|
|
214
|
-
--project: var(--project-dark);
|
|
215
|
-
--bg: #0d1012;
|
|
216
|
-
--surface: #13171a;
|
|
217
|
-
--surface-raised: #181d21;
|
|
218
|
-
--surface-
|
|
219
|
-
--
|
|
220
|
-
--field-bg: var(--
|
|
221
|
-
--field
|
|
222
|
-
--control-thumb: color-mix(in srgb, var(--surface-raised) 88%, white);
|
|
223
|
-
--nav-current: color-mix(in srgb, var(--accent) 20%, transparent);
|
|
224
|
-
--row-hover: #20262b;
|
|
225
|
-
--border-subtle: #262d33;
|
|
226
|
-
--border: #78818a;
|
|
227
|
-
--text: #e6e9eb;
|
|
228
|
-
--
|
|
229
|
-
--overlay: rgb(0 0 0 / 62%);
|
|
230
|
-
--link: #67c1df;
|
|
231
|
-
--success: #4cc38a;
|
|
232
|
-
--warning: #e2a54b;
|
|
233
|
-
--
|
|
234
|
-
--info: #84adff;
|
|
235
|
-
--success-
|
|
236
|
-
--warning-
|
|
237
|
-
--
|
|
238
|
-
--info-
|
|
239
|
-
--command-bg: color-mix(in srgb, var(--project) 16%, black);
|
|
240
|
-
--command-border: color-mix(in srgb, var(--project) 28%, black);
|
|
241
|
-
--
|
|
242
|
-
--
|
|
243
|
-
--
|
|
244
|
-
--
|
|
215
|
+
--color-project: var(--color-project-dark);
|
|
216
|
+
--color-bg: #0d1012;
|
|
217
|
+
--color-surface: #13171a;
|
|
218
|
+
--color-surface-raised: #181d21;
|
|
219
|
+
--color-surface-muted: #20262b;
|
|
220
|
+
--color-well: color-mix(in srgb, var(--color-bg) 87.5%, black);
|
|
221
|
+
--color-field-bg: var(--color-well);
|
|
222
|
+
--shadow-field: var(--shadow-sink);
|
|
223
|
+
--color-control-thumb: color-mix(in srgb, var(--color-surface-raised) 88%, white);
|
|
224
|
+
--color-nav-current: color-mix(in srgb, var(--color-accent) 20%, transparent);
|
|
225
|
+
--color-row-hover: #20262b;
|
|
226
|
+
--color-border-subtle: #262d33;
|
|
227
|
+
--color-border: #78818a;
|
|
228
|
+
--color-text: #e6e9eb;
|
|
229
|
+
--color-muted: #9aa3ab;
|
|
230
|
+
--color-overlay: rgb(0 0 0 / 62%);
|
|
231
|
+
--color-link: #67c1df;
|
|
232
|
+
--color-success: #4cc38a;
|
|
233
|
+
--color-warning: #e2a54b;
|
|
234
|
+
--color-error: #f0776c;
|
|
235
|
+
--color-info: #84adff;
|
|
236
|
+
--color-success-surface: #172d25;
|
|
237
|
+
--color-warning-surface: #2f281b;
|
|
238
|
+
--color-error-surface: #312020;
|
|
239
|
+
--color-info-surface: #202938;
|
|
240
|
+
--color-command-bg: color-mix(in srgb, var(--color-project) 16%, black);
|
|
241
|
+
--color-command-border: color-mix(in srgb, var(--color-project) 28%, black);
|
|
242
|
+
--color-syntax-keyword: #d8c2a5;
|
|
243
|
+
--color-syntax-string: #a8bd9c;
|
|
244
|
+
--color-syntax-number: #d5b98c;
|
|
245
|
+
--color-syntax-comment: #a0a6b1;
|
|
245
246
|
--shadow-raise: inset 0 1px 0 rgb(255 255 255 / 7%), 0 1px 2px rgb(0 0 0 / 45%);
|
|
246
247
|
--shadow-surface: 0 0 0 1px rgb(255 255 255 / 6%);
|
|
247
248
|
--shadow-sink: inset 1.2px 1.2px 3.6px rgb(0 0 0 / 55%), inset -1.2px -1.2px 3.6px rgb(255 255 255 / 5%);
|
|
248
|
-
--shadow-
|
|
249
|
-
--shadow-nav-current: var(--
|
|
249
|
+
--shadow-dialog: 0 8px 24px rgb(0 0 0 / 45%), 0 0 0 1px var(--color-border-subtle);
|
|
250
|
+
--shadow-nav-current: var(--shadow-nav-current-dark);
|
|
250
251
|
}
|
|
251
252
|
|
|
252
253
|
/* Minimal base. Component styles live in components.html. The base sits in a layer, so any
|
|
@@ -255,23 +256,23 @@
|
|
|
255
256
|
/* The page's own background and text colour stay outside the layer. A host that wraps the page in
|
|
256
257
|
its own unlayered reset, such as an artifact viewer, would otherwise keep its body colours while
|
|
257
258
|
the tokens switch to dark, leaving token-coloured text on the wrong background. */
|
|
258
|
-
body { background: var(--bg); color: var(--text); }
|
|
259
|
+
body { background: var(--color-bg); color: var(--color-text); }
|
|
259
260
|
@layer base {
|
|
260
261
|
*, *::before, *::after { box-sizing: border-box; }
|
|
261
262
|
[hidden] { display: none !important; }
|
|
262
263
|
body {
|
|
263
264
|
margin: 0;
|
|
264
|
-
font: var(--weight-regular) var(--text-md) / var(--leading) var(--font-
|
|
265
|
+
font: var(--weight-regular) var(--text-md) / var(--leading) var(--font-ui);
|
|
265
266
|
-webkit-font-smoothing: antialiased;
|
|
266
267
|
}
|
|
267
268
|
h1, h2, h3, h4, p { margin: 0; }
|
|
268
269
|
h1, h2, h3, h4 { font-weight: var(--weight-semibold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); text-wrap: balance; }
|
|
269
270
|
code, kbd, pre { font-family: var(--font-mono); }
|
|
270
271
|
table, .num { font-variant-numeric: tabular-nums; }
|
|
271
|
-
a { color: var(--link); text-decoration: none; }
|
|
272
|
+
a { color: var(--color-link); text-decoration: none; }
|
|
272
273
|
a:hover { text-decoration: underline; }
|
|
273
274
|
p a, dd a { text-decoration: underline; text-underline-offset: 0.18em; }
|
|
274
|
-
:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--focus-offset); }
|
|
275
|
+
:focus-visible { outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
|
|
275
276
|
@media (prefers-reduced-motion: reduce) {
|
|
276
277
|
*, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
|
|
277
278
|
/* A busy spinner slows instead of stopping, so the busy state stays visible. */
|
|
@@ -134,12 +134,14 @@ export async function renderReport(snapshot, { mode = 'inline', tokens = '' } =
|
|
|
134
134
|
// JSON.parse keeps a category key such as __proto__ as data; an object literal would not.
|
|
135
135
|
const data = JSON.stringify(JSON.stringify(snapshot)).replaceAll('<', '\\u003c')
|
|
136
136
|
const script = `(()=>{const snapshot=JSON.parse(${data}),root=document.getElementById('ov-report'),region=root.querySelector('#ov-region'),windowPicker=root.querySelector('#ov-window');const percent=${formatPercent.toString()},escape=${escapeHtml.toString()},build=${buildView.toString()};windowPicker.value=snapshot.defaultWindow;function update(){const view=build({snapshot,windowKey:windowPicker.value,region:region.value,percent,escape});root.querySelector('#ov-summary').innerHTML=view.summary;root.querySelector('#ov-rows').innerHTML=view.table;root.querySelector('#ov-mobile').innerHTML=view.mobile;root.querySelector('#ov-bars').innerHTML=view.bars;root.querySelector('#ov-caption').textContent=view.caption;root.querySelector('#ov-announcement').textContent=view.announcement;root.querySelector('#ov-reference').textContent=view.reference;}region.addEventListener('change',update);windowPicker.addEventListener('change',update);update();})();`
|
|
137
|
+
// report.css reads the host's variables (--foreground, --border, --font-sans, ...), so a standalone page maps
|
|
138
|
+
// the design language's tokens onto them.
|
|
137
139
|
// Standalone pages own their tokens, so the pickers take the design language's field recipe: the field
|
|
138
140
|
// fill and edge, and on keyboard focus an accent edge with a muted accent line inside instead of a ring.
|
|
139
141
|
// Forced colors drop that line, so the system ring returns there. Inline reports keep the host's look.
|
|
140
|
-
const standalone = mode === 'standalone' ? `${tokens}\n:root{--foreground:var(--text);--muted-foreground:var(--
|
|
142
|
+
const standalone = mode === 'standalone' ? `${tokens}\n:root{--foreground:var(--color-text);--muted-foreground:var(--color-muted);--background:var(--color-bg);--card:var(--color-surface-raised);--destructive:var(--color-error);--primary:var(--color-link);--ring:var(--color-focus);--radius:var(--radius-inline);--border:var(--color-border);--success:var(--color-success);--warning:var(--color-warning);--info:var(--color-info);--font-sans:var(--font-ui)}body{background:var(--color-bg);padding:1.5rem}.ov-report{max-width:1100px;margin-inline:auto}` : ''
|
|
141
143
|
// The field recipe follows report.css, whose own picker rule would otherwise win the cascade.
|
|
142
|
-
const standaloneFields = mode === 'standalone' ? '.ov-controls select{background:var(--field-bg);border-color:var(--field-edge);border-radius:var(--radius-field);box-shadow:var(--field
|
|
144
|
+
const standaloneFields = mode === 'standalone' ? '.ov-controls select{background:var(--color-field-bg);border-color:var(--color-field-edge);border-radius:var(--radius-field);box-shadow:var(--shadow-field)}.ov-controls select:focus-visible{outline:none;border-color:var(--color-accent);box-shadow:var(--shadow-field-focus)}@media (forced-colors:active){.ov-controls select:focus-visible{outline:var(--focus-width) solid Highlight;outline-offset:-1px}}' : ''
|
|
143
145
|
const link = snapshot.source.url ? `<a href="${escapeHtml(snapshot.source.url)}">Source</a> · ` : ''
|
|
144
146
|
const other = snapshot.categories.some((c) => c.key === 'other') ? `<p class="ov-muted">Other = categories outside ${snapshot.categories.filter((c) => c.key !== 'other').map((c) => escapeHtml(c.label)).join(', ')}.</p>` : ''
|
|
145
147
|
return `<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(snapshot.title)}</title><style>${standalone}\n${css}\n${standaloneFields}</style></head><body><main id="ov-report" class="ov-report">
|
|
@@ -15,7 +15,7 @@ body{margin:0;color:var(--foreground);font:0.8125rem var(--font-sans);font-varia
|
|
|
15
15
|
#ov-bars{display:block;width:100%;height:6px;margin-bottom:0.875rem}
|
|
16
16
|
.ov-table-heading{display:flex;justify-content:space-between;gap:0.75rem;margin-bottom:0.3125rem}.ov-table-heading span{font-size:0.75rem}
|
|
17
17
|
.ov-scroll{overflow-x:auto}.ov-report table{width:100%;border-collapse:collapse;font-size:0.75rem}
|
|
18
|
-
.ov-report th,.ov-report td{padding:0.3125rem 0.375rem;text-align:right;white-space:nowrap;border-bottom:1px solid var(--border-subtle,var(--border));font-weight:400;line-height:1rem}
|
|
18
|
+
.ov-report th,.ov-report td{padding:0.3125rem 0.375rem;text-align:right;white-space:nowrap;border-bottom:1px solid var(--color-border-subtle,var(--border));font-weight:400;line-height:1rem}
|
|
19
19
|
.ov-report th{color:var(--muted-foreground)}.ov-report th:first-child{text-align:left;min-width:170px;padding-left:0;white-space:normal}
|
|
20
20
|
.ov-report tbody th{color:var(--foreground)}.ov-report td:last-child,.ov-report thead th:last-child{padding-right:0}
|
|
21
21
|
.ov-report code{font:0.75rem var(--font-mono);overflow-wrap:normal;white-space:normal}
|
|
@@ -31,7 +31,7 @@ body{margin:0;color:var(--foreground);font:0.8125rem var(--font-sans);font-varia
|
|
|
31
31
|
.ov-mobile{display:none}
|
|
32
32
|
@media(max-width:800px){
|
|
33
33
|
.ov-scroll{display:none}.ov-mobile{display:block}
|
|
34
|
-
.ov-entry{padding:0.75rem 0;border-bottom:1px solid var(--border-subtle,var(--border))}
|
|
34
|
+
.ov-entry{padding:0.75rem 0;border-bottom:1px solid var(--color-border-subtle,var(--border))}
|
|
35
35
|
.ov-entry-heading{display:flex;justify-content:space-between;gap:0.75rem;align-items:baseline}
|
|
36
36
|
.ov-entry-heading code{min-width:0;flex:1;overflow-wrap:anywhere}.ov-entry-heading>span{white-space:nowrap;font-size:0.75rem}
|
|
37
37
|
.ov-entry dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:0.5rem;margin:0.625rem 0 0}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|