basalt-ui 1.1.1 → 1.3.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/AGENTS.md +2 -2
- package/CHANGELOG.md +46 -0
- package/README.md +64 -8
- package/agent/rules/basalt-app.md +126 -0
- package/agent/rules/basalt-content.md +3 -1
- package/agent/rules/basalt-tokens.md +14 -5
- package/agent/skills/basalt-app/SKILL.md +28 -7
- package/dist/agent/part-list.d.ts.map +1 -1
- package/dist/agent/part-list.js +17 -7
- package/dist/agent/stick-to-bottom.js +2 -2
- package/dist/agent-chat/thread-detail-panel.d.ts.map +1 -1
- package/dist/agent-chat/thread-detail-panel.js +37 -33
- package/dist/agent-chat/thread-message.d.ts.map +1 -1
- package/dist/agent-chat/thread-message.js +8 -5
- package/dist/agent-chat/thread-outcome-card.js +3 -3
- package/dist/agent-chat/thread-workspace.js +1 -1
- package/dist/charts/primitives/ChartLegend.js +2 -0
- package/dist/charts/primitives/ChartTooltip.js +2 -1
- package/dist/cli/index.d.ts +29 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +80 -9
- package/dist/connectivity/connectivity-indicator.d.ts.map +1 -1
- package/dist/connectivity/connectivity-indicator.js +3 -3
- package/dist/content/article-card.module.css +7 -5
- package/dist/content/article-layout.module.css +16 -12
- package/dist/content/callout.module.css +4 -4
- package/dist/content/code-block.module.css +8 -7
- package/dist/content/guide.module.css +3 -3
- package/dist/content/mermaid.module.css +2 -2
- package/dist/content/prose.module.css +59 -29
- package/dist/content/reading-progress.module.css +2 -0
- package/dist/content/toc.module.css +6 -3
- package/dist/dashboard/delta-badge.d.ts.map +1 -1
- package/dist/dashboard/delta-badge.js +10 -2
- package/dist/dashboard/empty-state.d.ts.map +1 -1
- package/dist/dashboard/empty-state.js +3 -16
- package/dist/dashboard/settings-section.js +2 -2
- package/dist/dashboard/settings-section.module.css +2 -2
- package/dist/dashboard/stat-card.js +2 -1
- package/dist/data/virtual-list.d.ts.map +1 -1
- package/dist/data/virtual-list.js +12 -2
- package/dist/forms/FormErrorSummary.js +2 -2
- package/dist/guard/index.d.ts +20 -4
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +266 -38
- package/dist/guard/types.d.ts +24 -3
- package/dist/guard/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/provider/index.d.ts +30 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +32 -7
- package/dist/provider/lab-theme.d.ts +39 -0
- package/dist/provider/lab-theme.d.ts.map +1 -0
- package/dist/provider/lab-theme.js +52 -0
- package/dist/shell/app-header.module.css +2 -2
- package/dist/shell/app-mobile-nav.module.css +1 -1
- package/dist/shell/app-sidebar-account.d.ts.map +1 -1
- package/dist/shell/app-sidebar-account.js +4 -2
- package/dist/shell/app-sidebar.d.ts.map +1 -1
- package/dist/shell/app-sidebar.js +4 -2
- package/dist/shell/app-sidebar.module.css +36 -26
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +11 -4
- package/dist/shell/sidebar-search.module.css +16 -4
- package/dist/styles.css +22 -11
- package/dist/surfaces.d.ts +21 -11
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +10 -3
- package/dist/theme/controls.module.css +1 -1
- package/dist/theme/floating.module.css +1 -1
- package/dist/theme/index.d.ts +116 -11
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +703 -566
- package/dist/theme/nav-link.module.css +1 -1
- package/dist/theme/use-basalt-spacing.d.ts +3 -0
- package/dist/theme/use-basalt-spacing.d.ts.map +1 -0
- package/dist/theme/use-basalt-spacing.js +8 -0
- package/dist/theme-lab/derive-controls.d.ts +13 -0
- package/dist/theme-lab/derive-controls.d.ts.map +1 -0
- package/dist/theme-lab/derive-controls.js +137 -0
- package/dist/theme-lab/derive-state.d.ts +55 -0
- package/dist/theme-lab/derive-state.d.ts.map +1 -0
- package/dist/theme-lab/derive-state.js +81 -0
- package/dist/theme-lab/index.d.ts +12 -2
- package/dist/theme-lab/index.d.ts.map +1 -1
- package/dist/theme-lab/index.js +13 -62
- package/dist/theme-toggle/index.d.ts.map +1 -1
- package/dist/theme-toggle/index.js +3 -2
- package/dist/tokens/derive.d.ts +89 -0
- package/dist/tokens/derive.d.ts.map +1 -0
- package/dist/tokens/derive.js +250 -0
- package/dist/tokens/hct.d.ts +34 -0
- package/dist/tokens/hct.d.ts.map +1 -0
- package/dist/tokens/hct.js +159 -0
- package/dist/tokens/index.d.ts +143 -7
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +322 -48
- package/dist/tokens/palette.d.ts +984 -167
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +617 -119
- package/dist/tokens.css +248 -0
- package/dist/vite-color-mix.d.ts +30 -0
- package/dist/vite-color-mix.d.ts.map +1 -0
- package/dist/vite-color-mix.js +80 -0
- package/dist/vite.d.ts +82 -1
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +312 -0
- package/llms.txt +14 -4
- package/package.json +41 -10
- package/src/agent/part-list.tsx +13 -7
- package/src/agent/stick-to-bottom.tsx +2 -2
- package/src/agent-chat/thread-detail-panel.tsx +13 -10
- package/src/agent-chat/thread-message.tsx +8 -5
- package/src/agent-chat/thread-outcome-card.tsx +2 -2
- package/src/agent-chat/thread-workspace.tsx +2 -2
- package/src/charts/primitives/ChartLegend.tsx +2 -2
- package/src/charts/primitives/ChartTooltip.tsx +2 -2
- package/src/cli/check-theme.test.ts +18 -0
- package/src/cli/index.ts +129 -6
- package/src/cli/tokens-css.test.ts +90 -0
- package/src/connectivity/connectivity-indicator.tsx +8 -2
- package/src/content/article-card.module.css +7 -5
- package/src/content/article-layout.module.css +16 -12
- package/src/content/callout.module.css +4 -4
- package/src/content/code-block.module.css +8 -7
- package/src/content/guide.module.css +3 -3
- package/src/content/mermaid.module.css +2 -2
- package/src/content/prose.module.css +59 -29
- package/src/content/prose.module.css.test.ts +55 -0
- package/src/content/reading-progress.module.css +2 -0
- package/src/content/toc.module.css +6 -3
- package/src/dashboard/delta-badge.tsx +10 -4
- package/src/dashboard/empty-state.tsx +3 -16
- package/src/dashboard/settings-section.module.css +2 -2
- package/src/dashboard/settings-section.tsx +2 -2
- package/src/dashboard/stat-card.tsx +2 -2
- package/src/data/virtual-list.tsx +12 -2
- package/src/forms/FormErrorSummary.tsx +1 -1
- package/src/guard/check-source.test.ts +483 -15
- package/src/guard/index.ts +426 -47
- package/src/guard/types.ts +24 -2
- package/src/index.ts +1 -0
- package/src/provider/index.test.tsx +100 -0
- package/src/provider/index.tsx +79 -7
- package/src/provider/lab-theme.test.ts +147 -0
- package/src/provider/lab-theme.ts +166 -0
- package/src/shell/app-header.module.css +2 -2
- package/src/shell/app-mobile-nav.module.css +1 -1
- package/src/shell/app-sidebar-account.tsx +9 -2
- package/src/shell/app-sidebar.module.css +36 -26
- package/src/shell/app-sidebar.tsx +12 -2
- package/src/shell/index.tsx +14 -3
- package/src/shell/sidebar-search.module.css +16 -4
- package/src/styles.css +22 -11
- package/src/surfaces.ts +24 -10
- package/src/theme/contrast.test.ts +19 -3
- package/src/theme/controls.module.css +1 -1
- package/src/theme/density-option.test.ts +96 -0
- package/src/theme/density-relations.test.ts +428 -0
- package/src/theme/derive-theme.test.ts +101 -0
- package/src/theme/floating.module.css +1 -1
- package/src/theme/fonts-option.test.ts +69 -0
- package/src/theme/index.ts +930 -563
- package/src/theme/nav-link.module.css +1 -1
- package/src/theme/radius-option.test.ts +86 -0
- package/src/theme/radius.test.ts +132 -0
- package/src/theme/spacing.test.ts +432 -0
- package/src/theme/use-basalt-spacing.test.tsx +51 -0
- package/src/theme/use-basalt-spacing.ts +38 -0
- package/src/theme-lab/derive-controls.test.ts +94 -0
- package/src/theme-lab/derive-controls.tsx +227 -0
- package/src/theme-lab/derive-state.test.ts +71 -0
- package/src/theme-lab/derive-state.ts +163 -0
- package/src/theme-lab/index.tsx +29 -68
- package/src/theme-lab/theme-lab.test.ts +4 -18
- package/src/theme-toggle/index.tsx +9 -4
- package/src/tokens/build-fonts-css.test.ts +51 -0
- package/src/tokens/build-radius-css.test.ts +25 -0
- package/src/tokens/density.test.ts +274 -0
- package/src/tokens/derive-radius.test.ts +62 -0
- package/src/tokens/derive.test.ts +30 -0
- package/src/tokens/derive.ts +481 -0
- package/src/tokens/hct.ts +231 -0
- package/src/tokens/index.ts +534 -48
- package/src/tokens/palette.test.ts +114 -0
- package/src/tokens/palette.ts +1118 -180
- package/src/vite-color-mix.test.ts +46 -0
- package/src/vite-color-mix.ts +137 -0
- package/src/vite.test.ts +192 -0
- package/src/vite.ts +502 -1
package/dist/guard/index.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
const HEX = /#[0-9a-fA-F]{3,8}\b/g;
|
|
2
2
|
const FUNC = /\b(?:rgba?|hsla?)\(/g;
|
|
3
3
|
const LOCALSTORAGE_THEME = /localStorage\s*\.\s*getItem\s*\(\s*['"]theme['"]\s*\)/g;
|
|
4
|
-
const
|
|
4
|
+
const RAW_FONT_FAMILY_VAR_ESCAPE = /var\(\s*--(?:basalt-font-|mantine-font-family-)/.source;
|
|
5
|
+
const RAW_FONT_FAMILY_KEYWORD = /(?:inherit|initial|unset|revert)\b/.source;
|
|
6
|
+
const RAW_FONT_FAMILY = new RegExp(
|
|
7
|
+
`\\bfontFamily\\s*[:=]\\s*\\{?(?!['"\`]?\\s*${RAW_FONT_FAMILY_VAR_ESCAPE})(?!['"\`]?\\s*${RAW_FONT_FAMILY_KEYWORD})['"\`][^'"\`]+['"\`]|\\bfont-family\\s*:\\s*(?!['"\`]?\\s*${RAW_FONT_FAMILY_VAR_ESCAPE})(?!['"\`]?\\s*${RAW_FONT_FAMILY_KEYWORD})(?:['"\`][^'"\`]+['"\`]|[A-Za-z][\\w-]*)`,
|
|
8
|
+
"g"
|
|
9
|
+
);
|
|
10
|
+
const SURFACE_BORDER = /\bborder(?:Top|Bottom|Left|Right)?\s*:\s*(?!['"`]?[^'"`]*(?:var\(|\$\{))(?!['"`]?(?:none|transparent|inherit|unset|revert)\b)['"`][^'"`]+['"`]/g;
|
|
5
11
|
const SURFACE_RADIUS = /\bborderRadius\s*:\s*(?:[0-9]+|['"`](?!\s*var\()[^'"`]*[0-9])/g;
|
|
6
|
-
const SURFACE_SHADOW = /\bboxShadow\s*:\s*(?!['"`]?[^'"`]*var\()['"`][^'"`]+['"`]/g;
|
|
12
|
+
const SURFACE_SHADOW = /\bboxShadow\s*:\s*(?!['"`]?[^'"`]*(?:var\(|\$\{))['"`][^'"`]+['"`]/g;
|
|
7
13
|
const CARD_SURFACE_TAG = /<(?:Card|Paper)(?![\w.])(?:=>|[^>])*?>/g;
|
|
8
14
|
const WITH_BORDER_PROP = /\bwithBorder\b(?!\s*=\s*\{\s*false\s*\})/;
|
|
9
15
|
const OFF_SYSTEM_SURFACE_VAR = /var\(--mantine-color-(gray|dark)-\d/g;
|
|
@@ -11,6 +17,19 @@ const RAW_HTML_TAG = /<(?:div|span|section|header|nav|footer|aside|main|article|
|
|
|
11
17
|
const INLINE_STYLE = /style=\{\{/;
|
|
12
18
|
const LAYOUT_SURFACE_PROP = /\b(?:display|padding|margin|gap|flex|grid|border|background|width|height)\b/;
|
|
13
19
|
const INLINE_SPACING = /\b(?:padding(?:Top|Bottom|Left|Right)?|margin(?:Top|Bottom|Left|Right)?|gap|rowGap|columnGap)\s*:\s*(?!var\()['"]?-?(?!0\b)\d/g;
|
|
20
|
+
const MICRO_SPACING_CEILING_PX = 10;
|
|
21
|
+
function isSubScaleCssSpacing(line, matchIndex) {
|
|
22
|
+
const colon = line.indexOf(":", matchIndex);
|
|
23
|
+
if (colon === -1) return false;
|
|
24
|
+
const rest = line.slice(colon + 1);
|
|
25
|
+
const end = rest.search(/[;}]/);
|
|
26
|
+
const value = (end === -1 ? rest : rest.slice(0, end)).replace(/var\([^)]*\)/g, " ").trim();
|
|
27
|
+
if (value === "") return true;
|
|
28
|
+
return value.split(/\s+/).every((part) => {
|
|
29
|
+
const literal = /^-?(\d+(?:\.\d+)?)(?:px)?$/.exec(part);
|
|
30
|
+
return literal !== null && Number(literal[1]) <= MICRO_SPACING_CEILING_PX;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
14
33
|
const INLINE_DISPLAY = /\bdisplay\s*:\s*['"](?:inline-)?(?:flex|grid)['"]/g;
|
|
15
34
|
const RAW_VISX_AXIS = /<Axis(?:Left|Bottom|Right)\b/g;
|
|
16
35
|
const AXIS_WRAPPER_FILE = /(?:^|\/)Axes\.tsx$/;
|
|
@@ -24,7 +43,7 @@ const RAW_FORM_CONTROL = /<(?:input|select|textarea)\b/g;
|
|
|
24
43
|
const RAW_FORM_CONTROL_TAG = /<(?:input|select|textarea)\b(?:=>|[^>])*?>/g;
|
|
25
44
|
const STYLES_INPUT_PART = /\bstyles\s*=\s*\{\{\s*input\s*:\s*\{([^}]*)\}/g;
|
|
26
45
|
const SUB_16_FONT_SIZE = /font-?[Ss]ize\s*:\s*['"]?(-?\d+(?:\.\d+)?)(?:px)?['"]?(?=[,\s}]|$)/g;
|
|
27
|
-
const DEFAULT_SPACING_STEPS = [
|
|
46
|
+
const DEFAULT_SPACING_STEPS = [11, 13, 18, 20, 26];
|
|
28
47
|
const DEFAULT_FORBIDDEN_ACCENTS = ["teal", "violet", "grape", "indigo", "pink"];
|
|
29
48
|
const DEFAULT_GUARD_CONFIG = {
|
|
30
49
|
spacingSteps: DEFAULT_SPACING_STEPS,
|
|
@@ -42,15 +61,171 @@ const DEFAULT_GUARD_CONFIG = {
|
|
|
42
61
|
chartMissingAriaLabel: true,
|
|
43
62
|
rawFormControl: true,
|
|
44
63
|
sub16InputFont: true,
|
|
45
|
-
allowComment: "theme-allow"
|
|
64
|
+
allowComment: "theme-allow",
|
|
65
|
+
exemptRules: {}
|
|
46
66
|
};
|
|
47
67
|
function isChartFile(relPath) {
|
|
48
68
|
return relPath.includes("/charts/") && !AXIS_WRAPPER_FILE.test(relPath);
|
|
49
69
|
}
|
|
70
|
+
function isRuleExempt(kind, relPath, exemptRules) {
|
|
71
|
+
const patterns = exemptRules?.[kind];
|
|
72
|
+
if (patterns === void 0 || patterns.length === 0) return false;
|
|
73
|
+
const segments = relPath.split("/");
|
|
74
|
+
return patterns.some((pattern) => segments.includes(pattern.replace(/\/$/, "")));
|
|
75
|
+
}
|
|
50
76
|
function isSkippedLine(line, cfg) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
77
|
+
return line.includes(cfg.allowComment);
|
|
78
|
+
}
|
|
79
|
+
function guardSyntaxFor(relPath) {
|
|
80
|
+
return relPath.endsWith(".css") ? "css" : "ts";
|
|
81
|
+
}
|
|
82
|
+
const REGEX_PRECEDING_PUNCT = /* @__PURE__ */ new Set([
|
|
83
|
+
"=",
|
|
84
|
+
"(",
|
|
85
|
+
",",
|
|
86
|
+
"[",
|
|
87
|
+
":",
|
|
88
|
+
"!",
|
|
89
|
+
"&",
|
|
90
|
+
"|",
|
|
91
|
+
"?",
|
|
92
|
+
"{",
|
|
93
|
+
"}",
|
|
94
|
+
";",
|
|
95
|
+
"+",
|
|
96
|
+
"-",
|
|
97
|
+
"*",
|
|
98
|
+
"%",
|
|
99
|
+
"~",
|
|
100
|
+
"^",
|
|
101
|
+
"<"
|
|
102
|
+
]);
|
|
103
|
+
const REGEX_PRECEDING_KEYWORDS = /* @__PURE__ */ new Set([
|
|
104
|
+
"return",
|
|
105
|
+
"typeof",
|
|
106
|
+
"case",
|
|
107
|
+
"in",
|
|
108
|
+
"of",
|
|
109
|
+
"delete",
|
|
110
|
+
"void",
|
|
111
|
+
"throw",
|
|
112
|
+
"do",
|
|
113
|
+
"else"
|
|
114
|
+
]);
|
|
115
|
+
const WORD_CHAR = /[A-Za-z0-9_$]/;
|
|
116
|
+
function stripComments(text, syntax) {
|
|
117
|
+
const out = Array.from({ length: text.length });
|
|
118
|
+
let inLineComment = false;
|
|
119
|
+
let inBlockComment = false;
|
|
120
|
+
let stringQuote = null;
|
|
121
|
+
let currentWord = "";
|
|
122
|
+
let lastUnitType = "none";
|
|
123
|
+
let lastWord = "";
|
|
124
|
+
let lastPunct = "";
|
|
125
|
+
let i = 0;
|
|
126
|
+
function flushWord() {
|
|
127
|
+
if (currentWord === "") return;
|
|
128
|
+
lastUnitType = "word";
|
|
129
|
+
lastWord = currentWord;
|
|
130
|
+
currentWord = "";
|
|
131
|
+
}
|
|
132
|
+
function canPrecedeRegex() {
|
|
133
|
+
if (lastUnitType === "none") return true;
|
|
134
|
+
if (lastUnitType === "word") return REGEX_PRECEDING_KEYWORDS.has(lastWord);
|
|
135
|
+
return REGEX_PRECEDING_PUNCT.has(lastPunct);
|
|
136
|
+
}
|
|
137
|
+
while (i < text.length) {
|
|
138
|
+
const ch = text[i] ?? "";
|
|
139
|
+
if (inLineComment) {
|
|
140
|
+
out[i] = ch === "\n" ? "\n" : " ";
|
|
141
|
+
if (ch === "\n") inLineComment = false;
|
|
142
|
+
i++;
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if (inBlockComment) {
|
|
146
|
+
if (ch === "*" && text[i + 1] === "/") {
|
|
147
|
+
out[i] = " ";
|
|
148
|
+
out[i + 1] = " ";
|
|
149
|
+
i += 2;
|
|
150
|
+
inBlockComment = false;
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
out[i] = ch === "\n" ? "\n" : " ";
|
|
154
|
+
i++;
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
if (stringQuote !== null) {
|
|
158
|
+
out[i] = ch;
|
|
159
|
+
if (ch === "\\" && i + 1 < text.length) {
|
|
160
|
+
out[i + 1] = text[i + 1] ?? "";
|
|
161
|
+
i += 2;
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (ch === stringQuote) stringQuote = null;
|
|
165
|
+
i++;
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
if (WORD_CHAR.test(ch)) {
|
|
169
|
+
currentWord += ch;
|
|
170
|
+
out[i] = ch;
|
|
171
|
+
i++;
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
flushWord();
|
|
175
|
+
if (ch === "'" || ch === '"' || ch === "`") {
|
|
176
|
+
stringQuote = ch;
|
|
177
|
+
out[i] = ch;
|
|
178
|
+
lastUnitType = "punct";
|
|
179
|
+
lastPunct = ch;
|
|
180
|
+
i++;
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
if (ch === "/" && text[i + 1] === "*") {
|
|
184
|
+
inBlockComment = true;
|
|
185
|
+
out[i] = " ";
|
|
186
|
+
i++;
|
|
187
|
+
continue;
|
|
188
|
+
}
|
|
189
|
+
if (syntax === "ts" && ch === "/" && text[i + 1] === "/") {
|
|
190
|
+
inLineComment = true;
|
|
191
|
+
out[i] = " ";
|
|
192
|
+
i++;
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
if (syntax === "ts" && ch === "/" && canPrecedeRegex()) {
|
|
196
|
+
out[i] = ch;
|
|
197
|
+
let j = i + 1;
|
|
198
|
+
let inClass = false;
|
|
199
|
+
while (j < text.length) {
|
|
200
|
+
const rc = text[j] ?? "";
|
|
201
|
+
if (rc === "\n") break;
|
|
202
|
+
out[j] = rc;
|
|
203
|
+
if (rc === "\\" && j + 1 < text.length) {
|
|
204
|
+
out[j + 1] = text[j + 1] ?? "";
|
|
205
|
+
j += 2;
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
if (rc === "[") inClass = true;
|
|
209
|
+
else if (rc === "]") inClass = false;
|
|
210
|
+
else if (rc === "/" && !inClass) {
|
|
211
|
+
j++;
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
j++;
|
|
215
|
+
}
|
|
216
|
+
i = j;
|
|
217
|
+
lastUnitType = "punct";
|
|
218
|
+
lastPunct = "/";
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
out[i] = ch;
|
|
222
|
+
if (!/\s/.test(ch)) {
|
|
223
|
+
lastUnitType = "punct";
|
|
224
|
+
lastPunct = ch;
|
|
225
|
+
}
|
|
226
|
+
i++;
|
|
227
|
+
}
|
|
228
|
+
return out.join("");
|
|
54
229
|
}
|
|
55
230
|
const GUARD_RULES = {
|
|
56
231
|
"raw-hex": {
|
|
@@ -66,14 +241,25 @@ const GUARD_RULES = {
|
|
|
66
241
|
"localstorage-theme": {
|
|
67
242
|
kind: "localstorage-theme",
|
|
68
243
|
pattern: LOCALSTORAGE_THEME,
|
|
244
|
+
// JS-call-shaped (`localStorage.getItem('theme')`) — never appears in CSS text.
|
|
245
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
69
246
|
message: "Theme must resolve via the Mantine color scheme + --vx-* vars."
|
|
70
247
|
},
|
|
248
|
+
"raw-font-family": {
|
|
249
|
+
kind: "raw-font-family",
|
|
250
|
+
pattern: RAW_FONT_FAMILY,
|
|
251
|
+
message: "Route the font stack through createBasaltTheme(overrides, { fonts }) / the shipped --basalt-font-sans|head|mono vars instead of a hardcoded fontFamily literal."
|
|
252
|
+
},
|
|
71
253
|
"off-identity-accent": {
|
|
72
254
|
kind: "off-identity-accent",
|
|
73
255
|
pattern: (cfg) => new RegExp(
|
|
74
256
|
`\\b(?:color|c|bg|backgroundColor)\\s*=\\s*\\{?\\s*['"](${cfg.forbiddenAccents.join("|")})['"]`,
|
|
75
257
|
"g"
|
|
76
258
|
),
|
|
259
|
+
// JSX-prop-shaped (`color={"teal"}`) — CSS declares `color: teal;` with a bare keyword and
|
|
260
|
+
// `:`, which the pattern's `=` anchor can never match; gated off explicitly so a future regex
|
|
261
|
+
// tweak can't silently start false-positiving on consumer CSS.
|
|
262
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
77
263
|
message: "For an off-identity accent use blue/gray or a status hue (red/green/orange/yellow)."
|
|
78
264
|
},
|
|
79
265
|
"raw-spacing": {
|
|
@@ -82,12 +268,17 @@ const GUARD_RULES = {
|
|
|
82
268
|
`\\b(?:p|px|py|pt|pb|pl|pr|m|mx|my|mt|mb|ml|mr|gap)=\\{(?:${cfg.spacingSteps.join("|")})\\}`,
|
|
83
269
|
"g"
|
|
84
270
|
),
|
|
271
|
+
// JSX-prop-shaped (`p={16}`) — CSS has no `=`/`{}` prop syntax; gated off explicitly (see
|
|
272
|
+
// off-identity-accent above for why "never matches today" still gets an explicit gate).
|
|
273
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
85
274
|
message: "Use the Mantine spacing prop/token (p/m/gap with xs..xl)."
|
|
86
275
|
},
|
|
87
276
|
"raw-radius": {
|
|
88
277
|
kind: "raw-radius",
|
|
89
278
|
pattern: RADIUS_PROP_RE,
|
|
90
279
|
enabled: (cfg) => cfg.rawRadius,
|
|
280
|
+
// JSX-prop-shaped (`radius={6}`) — CSS declares `border-radius: 6px;`, never `radius=`.
|
|
281
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
91
282
|
message: 'Use the radius token (radius="md") instead of a numeric literal.'
|
|
92
283
|
},
|
|
93
284
|
"raw-surface": {
|
|
@@ -102,6 +293,8 @@ const GUARD_RULES = {
|
|
|
102
293
|
pattern: CARD_SURFACE_TAG,
|
|
103
294
|
// handled inline (full-text tag-scoped scan); entry keeps registry complete
|
|
104
295
|
enabled: (cfg) => cfg.cardWithBorder,
|
|
296
|
+
// JSX-tag-shaped (`<Card withBorder>`) — never appears in CSS text.
|
|
297
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
105
298
|
message: "withBorder on a Card/Paper double-draws the edge \u2014 card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1)."
|
|
106
299
|
},
|
|
107
300
|
"off-system-surface-var": {
|
|
@@ -115,6 +308,8 @@ const GUARD_RULES = {
|
|
|
115
308
|
pattern: RAW_HTML_TAG,
|
|
116
309
|
// handled inline (3-condition conjunction); entry keeps registry complete
|
|
117
310
|
enabled: (cfg) => cfg.rawHtmlLayout,
|
|
311
|
+
// JSX-tag-shaped (`<div style={{...}}>`) — never appears in CSS text.
|
|
312
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
118
313
|
message: "Raw HTML element with inline layout/surface styling \u2014 use a Mantine layout primitive (Box/Flex/Grid/Stack/Group)."
|
|
119
314
|
},
|
|
120
315
|
"inline-spacing": {
|
|
@@ -127,13 +322,18 @@ const GUARD_RULES = {
|
|
|
127
322
|
kind: "inline-display",
|
|
128
323
|
pattern: INLINE_DISPLAY,
|
|
129
324
|
enabled: (cfg) => cfg.inlineDisplay,
|
|
325
|
+
// JSX-object-shaped (`display: 'flex'`, quoted value) — CSS never quotes a keyword value
|
|
326
|
+
// (`display: flex;` is bare), so the pattern's quote anchor can never match real CSS.
|
|
327
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
130
328
|
message: "Use <Flex>/<Grid>/<Group> instead of an inline display:flex/grid."
|
|
131
329
|
},
|
|
132
330
|
"raw-visx-axis": {
|
|
133
331
|
kind: "raw-visx-axis",
|
|
134
332
|
pattern: RAW_VISX_AXIS,
|
|
135
333
|
enabled: (cfg) => cfg.rawVisxAxis,
|
|
136
|
-
|
|
334
|
+
// Compose the existing chart-file scope with the CSS gate — a chart-file CSS module (none
|
|
335
|
+
// exist today, but the boundary should hold regardless) still can't carry a JSX axis tag.
|
|
336
|
+
appliesTo: (relPath) => isChartFile(relPath) && !relPath.endsWith(".css"),
|
|
137
337
|
message: "Raw <AxisLeft>/<AxisBottom>/<AxisRight> in a chart file \u2014 use AxisLeftNumeric / AxisBottomDate / AxisRightNumeric."
|
|
138
338
|
},
|
|
139
339
|
"raw-motion-value": {
|
|
@@ -141,6 +341,9 @@ const GUARD_RULES = {
|
|
|
141
341
|
pattern: MOTION_TRANSITION_NUMERIC,
|
|
142
342
|
// handled inline (2-regex kind); entry keeps registry complete
|
|
143
343
|
enabled: (cfg) => cfg.rawMotionValue,
|
|
344
|
+
// JSX-prop-shaped (`transition={{ duration: … }}`) — CSS's `transition:` property has no `=`
|
|
345
|
+
// or `{{`.
|
|
346
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
144
347
|
message: "Route animation timing through MOTION_DURATION / MOTION_SPRING / MOTION_EASE_STANDARD (basalt-ui motion tokens) instead of a hardcoded duration/spring/ease."
|
|
145
348
|
},
|
|
146
349
|
"unframed-chart": {
|
|
@@ -148,6 +351,8 @@ const GUARD_RULES = {
|
|
|
148
351
|
pattern: RAW_CHART_LEGEND_ARRAY,
|
|
149
352
|
// handled inline (full-text tag-scoped scan); entry keeps registry complete
|
|
150
353
|
enabled: (cfg) => cfg.unframedChart,
|
|
354
|
+
// JSX-tag-shaped (`<ChartLegend items={[…]}>`) — never appears in CSS text.
|
|
355
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
151
356
|
message: "Hand-rolled ChartLegend built from an inline array literal \u2014 pass a derived legend (deriveLegend(series)), or compose ChartFrame, which derives it for you."
|
|
152
357
|
},
|
|
153
358
|
"chart-missing-aria-label": {
|
|
@@ -155,12 +360,17 @@ const GUARD_RULES = {
|
|
|
155
360
|
pattern: CHART_ENTRY_POINT_TAG,
|
|
156
361
|
// handled inline (full-text tag-scoped scan); entry keeps registry complete
|
|
157
362
|
enabled: (cfg) => cfg.chartMissingAriaLabel,
|
|
363
|
+
// JSX-tag-shaped (`<MultiLine …>`) — never appears in CSS text.
|
|
364
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
158
365
|
message: 'Chart has no accessible text alternative \u2014 pass ariaLabel="\u2026" so screen readers get more than an unlabeled graphic.'
|
|
159
366
|
},
|
|
160
367
|
"raw-form-control": {
|
|
161
368
|
kind: "raw-form-control",
|
|
162
369
|
pattern: RAW_FORM_CONTROL,
|
|
163
370
|
enabled: (cfg) => cfg.rawFormControl,
|
|
371
|
+
// JSX-tag-shaped (`<input …>`) — a CSS element selector (`input, select {…}`) has no leading
|
|
372
|
+
// `<`, so the pattern's anchor can never match real CSS.
|
|
373
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
164
374
|
message: 'Raw <input>/<select>/<textarea> bypasses the ENTIRE theme, not just the font-size floor \u2014 no field surface, no shadow-card depth, no focus ring, no --input-* vars. Use TextInput / NumberInput / Select / Textarea from @mantine/core, or variant="unstyled" for a genuinely borderless/bespoke look.'
|
|
165
375
|
},
|
|
166
376
|
"sub-16-input-font": {
|
|
@@ -168,9 +378,16 @@ const GUARD_RULES = {
|
|
|
168
378
|
pattern: SUB_16_FONT_SIZE,
|
|
169
379
|
// handled inline (full-text tag-scoped scan); entry keeps registry complete
|
|
170
380
|
enabled: (cfg) => cfg.sub16InputFont,
|
|
381
|
+
// Only ever fires nested inside a raw-form-control JSX tag or a `styles={{ input: {…} }}`
|
|
382
|
+
// object literal — both JSX-shaped, neither appears in CSS text.
|
|
383
|
+
appliesTo: (relPath) => !relPath.endsWith(".css"),
|
|
171
384
|
message: "fontSize below 16 on a form control is dead code \u2014 the styles.css iOS floor is `!important` and always wins. Either drop the override, or be honest about 16px in the design."
|
|
172
385
|
}
|
|
173
386
|
};
|
|
387
|
+
function ruleApplies(kind, relPath) {
|
|
388
|
+
const appliesTo = GUARD_RULES[kind].appliesTo;
|
|
389
|
+
return appliesTo === void 0 || appliesTo(relPath);
|
|
390
|
+
}
|
|
174
391
|
function checkSource(text, relPath, cfg) {
|
|
175
392
|
const findings = [];
|
|
176
393
|
const forbiddenAccentRe = GUARD_RULES["off-identity-accent"].pattern(cfg);
|
|
@@ -180,27 +397,37 @@ function checkSource(text, relPath, cfg) {
|
|
|
180
397
|
GUARD_RULES["raw-radius"].pattern.flags
|
|
181
398
|
);
|
|
182
399
|
const lines = text.split("\n");
|
|
400
|
+
const syntax = guardSyntaxFor(relPath);
|
|
401
|
+
const codeText = stripComments(text, syntax);
|
|
402
|
+
const codeLines = codeText.split("\n");
|
|
183
403
|
for (let i = 0; i < lines.length; i++) {
|
|
184
|
-
const line =
|
|
185
|
-
if (
|
|
186
|
-
const trimmed = line.trimStart();
|
|
187
|
-
if (trimmed.startsWith("//") || trimmed.startsWith("*") || trimmed.startsWith("/*")) continue;
|
|
404
|
+
const line = codeLines[i] ?? "";
|
|
405
|
+
if ((lines[i] ?? "").includes(cfg.allowComment)) continue;
|
|
188
406
|
for (const m of line.matchAll(GUARD_RULES["raw-hex"].pattern)) {
|
|
189
407
|
findings.push({ relPath, line: i + 1, token: m[0], kind: "raw-hex" });
|
|
190
408
|
}
|
|
191
409
|
for (const m of line.matchAll(GUARD_RULES["raw-color-fn"].pattern)) {
|
|
192
410
|
findings.push({ relPath, line: i + 1, token: m[0], kind: "raw-color-fn" });
|
|
193
411
|
}
|
|
194
|
-
|
|
195
|
-
|
|
412
|
+
if (ruleApplies("localstorage-theme", relPath)) {
|
|
413
|
+
for (const m of line.matchAll(GUARD_RULES["localstorage-theme"].pattern)) {
|
|
414
|
+
findings.push({ relPath, line: i + 1, token: m[0], kind: "localstorage-theme" });
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
for (const m of line.matchAll(GUARD_RULES["raw-font-family"].pattern)) {
|
|
418
|
+
findings.push({ relPath, line: i + 1, token: m[0], kind: "raw-font-family" });
|
|
196
419
|
}
|
|
197
|
-
|
|
198
|
-
|
|
420
|
+
if (ruleApplies("off-identity-accent", relPath)) {
|
|
421
|
+
for (const m of line.matchAll(forbiddenAccentRe)) {
|
|
422
|
+
findings.push({ relPath, line: i + 1, token: m[1] ?? "", kind: "off-identity-accent" });
|
|
423
|
+
}
|
|
199
424
|
}
|
|
200
|
-
|
|
201
|
-
|
|
425
|
+
if (ruleApplies("raw-spacing", relPath)) {
|
|
426
|
+
for (const m of line.matchAll(spacingPropRe)) {
|
|
427
|
+
findings.push({ relPath, line: i + 1, token: m[0], kind: "raw-spacing" });
|
|
428
|
+
}
|
|
202
429
|
}
|
|
203
|
-
if (GUARD_RULES["raw-radius"].enabled(cfg)) {
|
|
430
|
+
if (GUARD_RULES["raw-radius"].enabled(cfg) && ruleApplies("raw-radius", relPath)) {
|
|
204
431
|
for (const m of line.matchAll(radiusPropRe)) {
|
|
205
432
|
findings.push({ relPath, line: i + 1, token: m[0], kind: "raw-radius" });
|
|
206
433
|
}
|
|
@@ -221,15 +448,16 @@ function checkSource(text, relPath, cfg) {
|
|
|
221
448
|
findings.push({ relPath, line: i + 1, token: m[0], kind: "off-system-surface-var" });
|
|
222
449
|
}
|
|
223
450
|
}
|
|
224
|
-
if (GUARD_RULES["raw-html-layout"].enabled(cfg) && RAW_HTML_TAG.test(line) && INLINE_STYLE.test(line) && LAYOUT_SURFACE_PROP.test(line)) {
|
|
451
|
+
if (GUARD_RULES["raw-html-layout"].enabled(cfg) && ruleApplies("raw-html-layout", relPath) && RAW_HTML_TAG.test(line) && INLINE_STYLE.test(line) && LAYOUT_SURFACE_PROP.test(line)) {
|
|
225
452
|
findings.push({ relPath, line: i + 1, token: "<raw-html style>", kind: "raw-html-layout" });
|
|
226
453
|
}
|
|
227
454
|
if (GUARD_RULES["inline-spacing"].enabled(cfg)) {
|
|
228
455
|
for (const m of line.matchAll(GUARD_RULES["inline-spacing"].pattern)) {
|
|
456
|
+
if (syntax === "css" && isSubScaleCssSpacing(line, m.index)) continue;
|
|
229
457
|
findings.push({ relPath, line: i + 1, token: m[0], kind: "inline-spacing" });
|
|
230
458
|
}
|
|
231
459
|
}
|
|
232
|
-
if (GUARD_RULES["inline-display"].enabled(cfg)) {
|
|
460
|
+
if (GUARD_RULES["inline-display"].enabled(cfg) && ruleApplies("inline-display", relPath)) {
|
|
233
461
|
for (const m of line.matchAll(GUARD_RULES["inline-display"].pattern)) {
|
|
234
462
|
findings.push({ relPath, line: i + 1, token: m[0], kind: "inline-display" });
|
|
235
463
|
}
|
|
@@ -239,7 +467,7 @@ function checkSource(text, relPath, cfg) {
|
|
|
239
467
|
findings.push({ relPath, line: i + 1, token: m[0], kind: "raw-visx-axis" });
|
|
240
468
|
}
|
|
241
469
|
}
|
|
242
|
-
if (GUARD_RULES["raw-motion-value"].enabled(cfg)) {
|
|
470
|
+
if (GUARD_RULES["raw-motion-value"].enabled(cfg) && ruleApplies("raw-motion-value", relPath)) {
|
|
243
471
|
for (const m of line.matchAll(MOTION_TRANSITION_NUMERIC)) {
|
|
244
472
|
findings.push({ relPath, line: i + 1, token: m[0], kind: "raw-motion-value" });
|
|
245
473
|
}
|
|
@@ -247,24 +475,24 @@ function checkSource(text, relPath, cfg) {
|
|
|
247
475
|
findings.push({ relPath, line: i + 1, token: m[0], kind: "raw-motion-value" });
|
|
248
476
|
}
|
|
249
477
|
}
|
|
250
|
-
if (GUARD_RULES["raw-form-control"].enabled(cfg)) {
|
|
478
|
+
if (GUARD_RULES["raw-form-control"].enabled(cfg) && ruleApplies("raw-form-control", relPath)) {
|
|
251
479
|
for (const m of line.matchAll(GUARD_RULES["raw-form-control"].pattern)) {
|
|
252
480
|
findings.push({ relPath, line: i + 1, token: m[0], kind: "raw-form-control" });
|
|
253
481
|
}
|
|
254
482
|
}
|
|
255
483
|
}
|
|
256
|
-
if (GUARD_RULES["unframed-chart"].enabled(cfg)) {
|
|
257
|
-
for (const m of
|
|
258
|
-
const lineNo =
|
|
484
|
+
if (GUARD_RULES["unframed-chart"].enabled(cfg) && ruleApplies("unframed-chart", relPath)) {
|
|
485
|
+
for (const m of codeText.matchAll(RAW_CHART_LEGEND_ARRAY)) {
|
|
486
|
+
const lineNo = codeText.slice(0, (m.index ?? 0) + m[0].length).split("\n").length;
|
|
259
487
|
if (isSkippedLine(lines[lineNo - 1] ?? "", cfg)) continue;
|
|
260
488
|
findings.push({ relPath, line: lineNo, token: "items={[", kind: "unframed-chart" });
|
|
261
489
|
}
|
|
262
490
|
}
|
|
263
|
-
if (GUARD_RULES["chart-missing-aria-label"].enabled(cfg)) {
|
|
264
|
-
for (const m of
|
|
491
|
+
if (GUARD_RULES["chart-missing-aria-label"].enabled(cfg) && ruleApplies("chart-missing-aria-label", relPath)) {
|
|
492
|
+
for (const m of codeText.matchAll(CHART_ENTRY_POINT_TAG)) {
|
|
265
493
|
const tagText = m[0];
|
|
266
494
|
if (HAS_ARIA_LABEL_PROP.test(tagText)) continue;
|
|
267
|
-
const lineNo =
|
|
495
|
+
const lineNo = codeText.slice(0, (m.index ?? 0) + tagText.length).split("\n").length;
|
|
268
496
|
if (isSkippedLine(lines[lineNo - 1] ?? "", cfg)) continue;
|
|
269
497
|
findings.push({
|
|
270
498
|
relPath,
|
|
@@ -274,39 +502,39 @@ function checkSource(text, relPath, cfg) {
|
|
|
274
502
|
});
|
|
275
503
|
}
|
|
276
504
|
}
|
|
277
|
-
if (GUARD_RULES["card-with-border"].enabled(cfg)) {
|
|
278
|
-
for (const m of
|
|
505
|
+
if (GUARD_RULES["card-with-border"].enabled(cfg) && ruleApplies("card-with-border", relPath)) {
|
|
506
|
+
for (const m of codeText.matchAll(CARD_SURFACE_TAG)) {
|
|
279
507
|
const withBorder = WITH_BORDER_PROP.exec(m[0]);
|
|
280
508
|
if (withBorder === null) continue;
|
|
281
|
-
const lineNo =
|
|
509
|
+
const lineNo = codeText.slice(0, (m.index ?? 0) + withBorder.index).split("\n").length;
|
|
282
510
|
if (isSkippedLine(lines[lineNo - 1] ?? "", cfg)) continue;
|
|
283
511
|
findings.push({ relPath, line: lineNo, token: "withBorder", kind: "card-with-border" });
|
|
284
512
|
}
|
|
285
513
|
}
|
|
286
|
-
if (GUARD_RULES["sub-16-input-font"].enabled(cfg)) {
|
|
287
|
-
for (const m of
|
|
514
|
+
if (GUARD_RULES["sub-16-input-font"].enabled(cfg) && ruleApplies("sub-16-input-font", relPath)) {
|
|
515
|
+
for (const m of codeText.matchAll(RAW_FORM_CONTROL_TAG)) {
|
|
288
516
|
const tagText = m[0];
|
|
289
517
|
if (!INLINE_STYLE.test(tagText)) continue;
|
|
290
518
|
const fontSizeMatch = [...tagText.matchAll(SUB_16_FONT_SIZE)][0];
|
|
291
519
|
if (fontSizeMatch === void 0) continue;
|
|
292
520
|
const value = Number.parseFloat(fontSizeMatch[1] ?? "");
|
|
293
521
|
if (!Number.isFinite(value) || value >= 16) continue;
|
|
294
|
-
const lineNo =
|
|
522
|
+
const lineNo = codeText.slice(0, (m.index ?? 0) + tagText.length).split("\n").length;
|
|
295
523
|
if (isSkippedLine(lines[lineNo - 1] ?? "", cfg)) continue;
|
|
296
524
|
findings.push({ relPath, line: lineNo, token: fontSizeMatch[0], kind: "sub-16-input-font" });
|
|
297
525
|
}
|
|
298
|
-
for (const m of
|
|
526
|
+
for (const m of codeText.matchAll(STYLES_INPUT_PART)) {
|
|
299
527
|
const inputBody = m[1] ?? "";
|
|
300
528
|
const fontSizeMatch = [...inputBody.matchAll(SUB_16_FONT_SIZE)][0];
|
|
301
529
|
if (fontSizeMatch === void 0) continue;
|
|
302
530
|
const value = Number.parseFloat(fontSizeMatch[1] ?? "");
|
|
303
531
|
if (!Number.isFinite(value) || value >= 16) continue;
|
|
304
|
-
const lineNo =
|
|
532
|
+
const lineNo = codeText.slice(0, (m.index ?? 0) + m[0].length).split("\n").length;
|
|
305
533
|
if (isSkippedLine(lines[lineNo - 1] ?? "", cfg)) continue;
|
|
306
534
|
findings.push({ relPath, line: lineNo, token: fontSizeMatch[0], kind: "sub-16-input-font" });
|
|
307
535
|
}
|
|
308
536
|
}
|
|
309
|
-
return findings;
|
|
537
|
+
return findings.filter((f) => !isRuleExempt(f.kind, f.relPath, cfg.exemptRules));
|
|
310
538
|
}
|
|
311
539
|
export {
|
|
312
540
|
DEFAULT_GUARD_CONFIG,
|
package/dist/guard/types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Guard types — Mantine-free, dependency-free (zero imports beyond TS types).
|
|
3
3
|
*
|
|
4
|
-
* GuardKind is the closed set of
|
|
4
|
+
* GuardKind is the closed set of 19 violation kinds the theme guard can emit.
|
|
5
5
|
* Finding is the structured result per violation, replacing the old `Violation` shape.
|
|
6
6
|
* GuardConfig is the per-run configuration that drives checkSource.
|
|
7
7
|
*/
|
|
8
|
-
/** The
|
|
9
|
-
export type GuardKind = 'raw-hex' | 'raw-color-fn' | 'localstorage-theme' | 'off-identity-accent' | 'raw-spacing' | 'raw-radius' | 'raw-surface' | 'card-with-border' | 'off-system-surface-var' | 'raw-html-layout' | 'inline-spacing' | 'inline-display' | 'raw-visx-axis' | 'raw-motion-value' | 'unframed-chart' | 'chart-missing-aria-label' | 'raw-form-control' | 'sub-16-input-font';
|
|
8
|
+
/** The 19 theme-guard violation kinds. */
|
|
9
|
+
export type GuardKind = 'raw-hex' | 'raw-color-fn' | 'localstorage-theme' | 'off-identity-accent' | 'raw-spacing' | 'raw-radius' | 'raw-surface' | 'card-with-border' | 'off-system-surface-var' | 'raw-html-layout' | 'inline-spacing' | 'inline-display' | 'raw-visx-axis' | 'raw-motion-value' | 'unframed-chart' | 'chart-missing-aria-label' | 'raw-form-control' | 'sub-16-input-font' | 'raw-font-family';
|
|
10
10
|
/**
|
|
11
11
|
* A structured finding — the chosen testable surface (§C.4). Replaces the old `Violation` type.
|
|
12
12
|
* `relPath` + `line` + `token` + `kind` uniquely identify the violation.
|
|
@@ -93,5 +93,26 @@ export type GuardConfig = {
|
|
|
93
93
|
* Default 'theme-allow'. Pure-comment lines (// * /\*) are always skipped.
|
|
94
94
|
*/
|
|
95
95
|
readonly allowComment: string;
|
|
96
|
+
/**
|
|
97
|
+
* Per-rule, per-path exemptions — complements whole-file `exempt` (BasaltConfig, which skips
|
|
98
|
+
* ALL rules for a file) and code-level `appliesTo` (hardcoded per-kind path scoping, e.g.
|
|
99
|
+
* raw-visx-axis → chart files only). This is the config-driven counterpart: a consumer can say
|
|
100
|
+
* "kind K does not apply under path P" without exempting the whole file or forking the rule.
|
|
101
|
+
*
|
|
102
|
+
* Each value is a list of path-segment patterns matched against a finding's `relPath`. A pattern
|
|
103
|
+
* matches when `relPath.split('/')` includes it as a WHOLE segment — `'agent'` matches
|
|
104
|
+
* `src/agent/part-list.tsx` but not `src/agenting.ts`. A trailing `/` is stripped before
|
|
105
|
+
* matching, so `'agent'` and `'agent/'` behave identically. Applied as a post-filter over the
|
|
106
|
+
* final findings, so it uniformly covers every kind — both the GUARD_RULES registry loop and the
|
|
107
|
+
* inline-handled kinds (raw-surface, raw-html-layout, sub-16-input-font, …).
|
|
108
|
+
*
|
|
109
|
+
* Required (like every other GuardConfig field, defaulted via DEFAULT_GUARD_CONFIG to `{}`) —
|
|
110
|
+
* `exactOptionalPropertyTypes` rejects the `?? DEFAULT_GUARD_CONFIG.x` pattern used to build a
|
|
111
|
+
* GuardConfig from BasaltConfig (where the field IS optional) if this were optional too.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* { exemptRules: { 'inline-display': ['agent'] } } // inline-display never fires under src/agent/**
|
|
115
|
+
*/
|
|
116
|
+
readonly exemptRules: Partial<Record<GuardKind, string[]>>;
|
|
96
117
|
};
|
|
97
118
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/guard/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,0CAA0C;AAC1C,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,oBAAoB,GACpB,qBAAqB,GACrB,aAAa,GACb,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,wBAAwB,GACxB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,gBAAgB,GAChB,0BAA0B,GAC1B,kBAAkB,GAClB,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/guard/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,0CAA0C;AAC1C,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,oBAAoB,GACpB,qBAAqB,GACrB,aAAa,GACb,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,wBAAwB,GACxB,iBAAiB,GACjB,gBAAgB,GAChB,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Ac,EAAE,OAAO,CAAA;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAA;IAChC;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;CAC3D,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { BasaltProvider, type BasaltProviderProps, BasaltErrorBoundary, type BasaltErrorContext, } from './provider/index.js';
|
|
9
9
|
export { createBasaltTheme, baseTheme, cssVariablesResolver } from './theme/index.js';
|
|
10
|
+
export type { BasaltFontsConfig, CreateBasaltThemeOptions } from './theme/index.js';
|
|
10
11
|
export { ThemeToggle, type ThemeToggleProps } from './theme-toggle/index.js';
|
|
11
12
|
export { MOTION_DURATION, MOTION_SPRING, MOTION_EASE_STANDARD } from './motion/index.js';
|
|
12
13
|
export { BasaltShell, NavCountBadge, AppSidebar, SidebarSearch, type SidebarSearchConfig, SidebarAccount, MobileNav, AppBreadcrumbs, type BreadcrumbLinkRenderer, PageHeaderProvider, PageActions, PageActionsOutlet, type SidebarSection, type SidebarItem, type BasaltShellProps, type BrandConfig, type SettingsMenuItem, type AppSidebarProps, type MobileNavItem, type MobileNavSection, type NavLinkRenderer, type MobileNavLinkRenderer, type AccountBadgeTone, type BasaltIdentity, type BasaltRole, type BasaltPlan, type AccountMenuItem, type BasaltAccountState, type BasaltAccountActions, type BasaltAccountProps, } from './shell/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,mBAAmB,EAC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B,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAClE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAU9C,OAAO,EACL,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,EACb,qBAAqB,GACtB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAClF,YAAY,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,SAAS,EACT,cAAc,GACf,MAAM,SAAS,CAAA"}
|
package/dist/provider/index.d.ts
CHANGED
|
@@ -29,7 +29,22 @@ export type BasaltProviderProps = {
|
|
|
29
29
|
theme?: MantineProviderProps['theme'];
|
|
30
30
|
/**
|
|
31
31
|
* Inject the `--vx-*` palette stylesheet once via an inline `<style>`. Default `true`. Set
|
|
32
|
-
* `false` to skip it (SSR / head injection — emit `buildPaletteCss(paletteOptions)` yourself
|
|
32
|
+
* `false` to skip it (SSR / head injection — emit `buildPaletteCss(paletteOptions)` yourself, all
|
|
33
|
+
* three builders importable from `basalt-ui/tokens`).
|
|
34
|
+
* A `{ fonts }` config passed to `createBasaltTheme` rides this SAME injection (its
|
|
35
|
+
* `--basalt-font-*` declarations are appended to the same `<style>`), so `injectPalette={false}`
|
|
36
|
+
* opts fonts out too — emit `buildFontsCss(theme.other.basaltFonts)` yourself alongside the
|
|
37
|
+
* palette CSS in that case.
|
|
38
|
+
* A `{ radius }` config rides the SAME injection too (its `--vx-radius-*` override declarations
|
|
39
|
+
* are appended alongside), so `injectPalette={false}` opts radius out just the same — an SSR
|
|
40
|
+
* consumer disabling injection must also emit `buildRadiusCss(theme.other.basaltRadius)`
|
|
41
|
+
* themselves, or `var(--vx-radius-*)` consumers render at their defaults instead of the retuned
|
|
42
|
+
* level.
|
|
43
|
+
* A `{ density }` config rides the SAME injection too (its `--vx-space-*` override declarations
|
|
44
|
+
* are appended alongside), so `injectPalette={false}` opts density out just the same — an SSR
|
|
45
|
+
* consumer disabling injection must also emit `buildDensityCss(theme.other.basaltDensity)`
|
|
46
|
+
* themselves, or `var(--vx-space-*)` consumers render at their defaults instead of the retuned
|
|
47
|
+
* level.
|
|
33
48
|
*/
|
|
34
49
|
injectPalette?: boolean;
|
|
35
50
|
/**
|
|
@@ -88,6 +103,20 @@ export declare class BasaltErrorBoundary extends Component<BoundaryProps, Bounda
|
|
|
88
103
|
componentDidCatch(error: unknown, info: ErrorInfo): void;
|
|
89
104
|
render(): ReactNode;
|
|
90
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Compose the four independently-built override CSS blocks into ONE injected `<style>` body, in
|
|
108
|
+
* cascade-winning order. Every builder (`buildPaletteCss`/`buildFontsCss`/`buildRadiusCss`/
|
|
109
|
+
* `buildDensityCss`) emits its declarations under a bare `:root { ... }` block — EQUAL selector
|
|
110
|
+
* specificity across all four — so nothing but DOCUMENT ORDER decides which value a browser paints
|
|
111
|
+
* when two blocks declare the same custom property. `density` must come LAST (its `--vx-space-*`
|
|
112
|
+
* overrides must out-cascade the base palette's own defaults), `radius` after `fonts`, `fonts` after
|
|
113
|
+
* `base` — reorder this array and the density/radius/fonts knobs silently stop working, with every
|
|
114
|
+
* OTHER existing test still green (each builder is tested for its OWN output in isolation, not for
|
|
115
|
+
* where it lands in the concatenated string). Exported as a pure function (not inlined in
|
|
116
|
+
* `BasaltBridge`'s `useMemo`) purely so `provider/index.test.ts` can assert the ORDER holds without
|
|
117
|
+
* rendering a React tree.
|
|
118
|
+
*/
|
|
119
|
+
export declare function composeInjectedCss(base: string, fontsCss: string, radiusCss: string, densityCss: string): string;
|
|
91
120
|
export declare function BasaltProvider({ children, theme, injectPalette, paletteOptions, defaultColorScheme, onError, nonce, sseUrl, healthUrl, healthIntervalMs, ...rest }: BasaltProviderProps): import("react").JSX.Element;
|
|
92
121
|
export {};
|
|
93
122
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,SAAS,EAAsB,MAAM,OAAO,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAIjD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAA;AAEnD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,SAAS,CAAA;IACnB,oFAAoF;IACpF,KAAK,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAA;IACrC;;;;;;;;;;;;;;;;;;OAkBG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAA;IACjC,8CAA8C;IAC9C,kBA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