basalt-ui 1.0.1 → 1.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.
@@ -4,13 +4,13 @@
4
4
  *
5
5
  * Each fixture repo gets a minimal `.oxlintrc.json` pointing `jsPlugins` at the plugin (absolute
6
6
  * path — verified to resolve the same as the relative path the shipped/repo configs use) and
7
- * enabling all three rules. `runOxlint` shells the workspace-root `node_modules/.bin/oxlint` binary
8
- * and returns the parsed set of `basalt/<rule>` diagnostics it printed.
7
+ * enabling every rule this file tests. `run` shells the workspace-root `node_modules/.bin/oxlint`
8
+ * binary and returns the parsed set of `basalt/<rule>` diagnostics it printed.
9
9
  */
10
10
  import { afterEach, beforeEach, describe, expect, it } from 'bun:test'
11
- import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'
11
+ import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'
12
12
  import { tmpdir } from 'node:os'
13
- import { resolve } from 'node:path'
13
+ import { dirname, resolve } from 'node:path'
14
14
 
15
15
  const PLUGIN_PATH = resolve(import.meta.dirname, 'oxlint-plugin.js')
16
16
  const OXLINT_BIN = resolve(import.meta.dirname, '..', '..', '..', 'node_modules', '.bin', 'oxlint')
@@ -28,6 +28,9 @@ beforeEach(() => {
28
28
  'basalt/no-raw-font-size': 'error',
29
29
  'basalt/card-inset': 'error',
30
30
  'basalt/chart-in-raw-surface': 'error',
31
+ 'basalt/visx-boundary': 'error',
32
+ 'basalt/visx-tooltip': 'error',
33
+ 'basalt/token-layer-boundary': 'error',
31
34
  },
32
35
  }),
33
36
  )
@@ -39,7 +42,9 @@ afterEach(() => {
39
42
 
40
43
  /** Writes `source` as the sole fixture file and runs oxlint against the temp fixture repo. */
41
44
  function run(source: string, filename = 'fixture.tsx'): { code: number; rules: Set<string> } {
42
- writeFileSync(resolve(dir, filename), source)
45
+ const filePath = resolve(dir, filename)
46
+ mkdirSync(dirname(filePath), { recursive: true })
47
+ writeFileSync(filePath, source)
43
48
  const result = Bun.spawnSync([OXLINT_BIN, '-c', '.oxlintrc.json', filename], { cwd: dir })
44
49
  const output = `${result.stdout}${result.stderr}`
45
50
  const rules = new Set(
@@ -105,3 +110,125 @@ describe('basalt/chart-in-raw-surface', () => {
105
110
  expect(rules).not.toContain('chart-in-raw-surface')
106
111
  })
107
112
  })
113
+
114
+ // ── visx-boundary ────────────────────────────────────────────────────────────
115
+
116
+ describe('basalt/visx-boundary', () => {
117
+ it('flags a @visx/* import outside charts', () => {
118
+ const { code, rules } = run(`import { scaleLinear } from '@visx/scale'\n`, 'lib.ts')
119
+ expect(code).toBe(1)
120
+ expect(rules).toContain('visx-boundary')
121
+ })
122
+
123
+ it('does NOT flag a @visx/* import inside charts', () => {
124
+ const { code, rules } = run(`import { scaleLinear } from '@visx/scale'\n`, 'charts/lib.ts')
125
+ expect(code).toBe(0)
126
+ expect(rules).not.toContain('visx-boundary')
127
+ })
128
+
129
+ it('does NOT flag a @mantine/* import (out of scope for this rule)', () => {
130
+ const { code, rules } = run(`import { Button } from '@mantine/core'\n`, 'lib.tsx')
131
+ expect(code).toBe(0)
132
+ expect(rules).not.toContain('visx-boundary')
133
+ })
134
+
135
+ it('still flags a @visx/* import outside charts carrying a theme-allow comment (no escape hatch)', () => {
136
+ const { code, rules } = run(
137
+ `// theme-allow: legacy\nimport { scaleLinear } from '@visx/scale'\n`,
138
+ 'lib.ts',
139
+ )
140
+ expect(code).toBe(1)
141
+ expect(rules).toContain('visx-boundary')
142
+ })
143
+
144
+ it('flags a source-bearing named re-export of @visx/* outside charts', () => {
145
+ const { code, rules } = run(`export { scaleLinear } from '@visx/scale'\n`, 'lib.ts')
146
+ expect(code).toBe(1)
147
+ expect(rules).toContain('visx-boundary')
148
+ })
149
+
150
+ it('flags a wildcard re-export of @visx/* outside charts', () => {
151
+ const { code, rules } = run(`export * from '@visx/scale'\n`, 'lib.ts')
152
+ expect(code).toBe(1)
153
+ expect(rules).toContain('visx-boundary')
154
+ })
155
+
156
+ it('does NOT flag a plain local named export (no source)', () => {
157
+ const { code, rules } = run(`const x = 1\nexport { x }\n`, 'lib.ts')
158
+ expect(code).toBe(0)
159
+ expect(rules).not.toContain('visx-boundary')
160
+ })
161
+ })
162
+
163
+ // ── visx-tooltip ─────────────────────────────────────────────────────────────
164
+
165
+ describe('basalt/visx-tooltip', () => {
166
+ it('flags @visx/tooltip even inside charts', () => {
167
+ const { code, rules } = run(`import { Tooltip } from '@visx/tooltip'\n`, 'charts/lib.tsx')
168
+ expect(code).toBe(1)
169
+ expect(rules).toContain('visx-tooltip')
170
+ })
171
+
172
+ it('flags @visx/tooltip outside charts too', () => {
173
+ const { code, rules } = run(`import { Tooltip } from '@visx/tooltip'\n`, 'lib.tsx')
174
+ expect(code).toBe(1)
175
+ expect(rules).toContain('visx-tooltip')
176
+ })
177
+
178
+ it('takes precedence over basalt/visx-boundary for @visx/tooltip specifically', () => {
179
+ const { rules } = run(`import { Tooltip } from '@visx/tooltip'\n`, 'lib.tsx')
180
+ expect(rules).toContain('visx-tooltip')
181
+ expect(rules).not.toContain('visx-boundary')
182
+ })
183
+ })
184
+
185
+ // ── token-layer-boundary ─────────────────────────────────────────────────────
186
+
187
+ describe('basalt/token-layer-boundary', () => {
188
+ it('flags a @mantine/* import inside charts', () => {
189
+ const { code, rules } = run(`import { Button } from '@mantine/core'\n`, 'charts/lib.tsx')
190
+ expect(code).toBe(1)
191
+ expect(rules).toContain('token-layer-boundary')
192
+ })
193
+
194
+ it('flags a @mantine/* import inside tokens', () => {
195
+ const { code, rules } = run(`import { Button } from '@mantine/core'\n`, 'tokens/lib.ts')
196
+ expect(code).toBe(1)
197
+ expect(rules).toContain('token-layer-boundary')
198
+ })
199
+
200
+ it('does NOT flag a @mantine/* import outside charts/tokens', () => {
201
+ const { code, rules } = run(`import { Button } from '@mantine/core'\n`, 'lib.tsx')
202
+ expect(code).toBe(0)
203
+ expect(rules).not.toContain('token-layer-boundary')
204
+ })
205
+ })
206
+
207
+ // ── rule independence ──────────────────────────────────────────────────────────
208
+ // The three rules used to be one bundled `import-boundary` rule with a single on/off toggle — a
209
+ // consumer disabling the one check they disagreed with silently dropped the other two. Proves
210
+ // disabling one of the three leaves the other two enforced.
211
+
212
+ describe('rule independence', () => {
213
+ it('disabling basalt/visx-boundary leaves basalt/visx-tooltip enforced', () => {
214
+ writeFileSync(
215
+ resolve(dir, '.oxlintrc.json'),
216
+ JSON.stringify({
217
+ plugins: [],
218
+ jsPlugins: [PLUGIN_PATH],
219
+ rules: {
220
+ 'basalt/visx-boundary': 'off',
221
+ 'basalt/visx-tooltip': 'error',
222
+ 'basalt/token-layer-boundary': 'error',
223
+ },
224
+ }),
225
+ )
226
+ const { code, rules } = run(
227
+ `import { scaleLinear } from '@visx/scale'\nimport { Tooltip } from '@visx/tooltip'\n`,
228
+ 'lib.ts',
229
+ )
230
+ expect(code).toBe(1)
231
+ expect(rules).not.toContain('visx-boundary')
232
+ expect(rules).toContain('visx-tooltip')
233
+ })
234
+ })
@@ -19,7 +19,9 @@
19
19
  "basalt/no-raw-font-size": "error",
20
20
  "basalt/card-inset": "error",
21
21
  "basalt/chart-in-raw-surface": "error",
22
- "basalt/raw-scroll-container": "off"
22
+ "basalt/raw-scroll-container": "off",
23
+ "basalt/visx-boundary": "error",
24
+ "basalt/visx-tooltip": "error"
23
25
  },
24
26
  "overrides": [
25
27
  {
@@ -33,80 +35,10 @@
33
35
  "name": "antd",
34
36
  "message": "Use Mantine — antd is not part of the basalt-ui stack."
35
37
  },
36
- {
37
- "name": "@visx/tooltip",
38
- "message": "Use ChartTooltip + TooltipHeader/Row/Body from basalt-ui charts primitives."
39
- },
40
38
  {
41
39
  "name": "framer-motion",
42
40
  "message": "Import from 'motion/react', not the raw framer-motion package."
43
41
  }
44
- ],
45
- "patterns": [
46
- {
47
- "group": ["@visx/*"],
48
- "message": "Direct @visx/* imports are only allowed inside the charts boundary (**/charts/**)."
49
- }
50
- ]
51
- }
52
- ]
53
- }
54
- },
55
- {
56
- "files": ["**/charts/**"],
57
- "rules": {
58
- "no-restricted-imports": [
59
- "error",
60
- {
61
- "paths": [
62
- {
63
- "name": "@mantine/core",
64
- "message": "charts must be Mantine-free — no Mantine imports allowed."
65
- },
66
- {
67
- "name": "@mantine/hooks",
68
- "message": "charts must be Mantine-free — no Mantine imports allowed."
69
- },
70
- {
71
- "name": "@visx/tooltip",
72
- "message": "Use ChartTooltip + TooltipHeader/Row/Body from basalt-ui charts primitives."
73
- }
74
- ],
75
- "patterns": [
76
- {
77
- "group": ["@mantine/*"],
78
- "message": "charts must be Mantine-free — no Mantine imports allowed."
79
- }
80
- ]
81
- }
82
- ]
83
- }
84
- },
85
- {
86
- "files": ["**/tokens/**"],
87
- "rules": {
88
- "no-restricted-imports": [
89
- "error",
90
- {
91
- "paths": [
92
- {
93
- "name": "@mantine/core",
94
- "message": "tokens must be Mantine-free — no Mantine imports allowed."
95
- },
96
- {
97
- "name": "@mantine/hooks",
98
- "message": "tokens must be Mantine-free — no Mantine imports allowed."
99
- }
100
- ],
101
- "patterns": [
102
- {
103
- "group": ["@mantine/*"],
104
- "message": "tokens must be Mantine-free — no Mantine imports allowed."
105
- },
106
- {
107
- "group": ["@visx/*"],
108
- "message": "Direct @visx/* imports are only allowed inside the charts boundary (**/charts/**)."
109
- }
110
42
  ]
111
43
  }
112
44
  ]
@@ -184,6 +184,28 @@ type Manifest = {
184
184
  /** dest path → sha256 of the managed unit (file bytes, block body, or stanza) at last write. */
185
185
  files: Record<string, string>;
186
186
  };
187
+ /**
188
+ * Normalize a managed unit's rendered bytes for the ledger comparison below — makes a delta that is
189
+ * PURELY formatting or a version bump invisible to drift detection, while a real prose/content edit
190
+ * stays fully visible:
191
+ *
192
+ * - Blank out the per-release `BASALT_VERSION` token in a marker's begin line
193
+ * (`<!-- basalt:begin 1.0.1 -->` → `<!-- basalt:begin -->`). It changes on every release and is
194
+ * the only per-release variable that lands INSIDE the hashed region (the rest of
195
+ * `CLAUDE-block.md.tpl` has no other `{{…}}` placeholders today), so stripping it is what lets
196
+ * one normalized rendering stand in for every version of a given template body instead of
197
+ * needing one ledger entry per release. If a future marker template interpolates another
198
+ * per-release var inside its region, extend this normalization the same way.
199
+ * - Trim trailing whitespace per line and collapse every run of blank lines to none. This is the
200
+ * fix for the actual argo repro: lefthook's oxfmt reformats a spliced block (or a whole managed
201
+ * file) AFTER `writeUnit` has already exited and the manifest hash was recorded, so the manifest
202
+ * can never account for the reformat up front — normalizing it away here is the only place that
203
+ * can.
204
+ *
205
+ * Deliberately whitespace-only — word content is untouched, so a genuine hand-edit inside the block
206
+ * still changes the normalized text and still classifies `drifted`.
207
+ */
208
+ declare function normalizeForLedger(text: string): string;
187
209
  /** Scaffold all managed files into the consumer repo, then write the manifest. Idempotent. Returns 0. */
188
210
  export declare function init(cwd?: string, scaffoldFlags?: ScaffoldFlags): number;
189
211
  type SyncOptions = {
@@ -209,7 +231,12 @@ export declare function sync(opts?: SyncOptions, cwd?: string): number;
209
231
  * 4. Every non-#, non-'.' JS-subpath SURFACES key has a package.json exports entry.
210
232
  * 5. Every real package.json exports key has a SURFACES entry.
211
233
  * 6. Every surface with non-empty forbiddenImports has a globs field.
212
- * 7. Every headless surface carries all 3 Mantine bans (Mantine-free boundary).
234
+ * 7. Every headless surface is Mantine-free — via all 3 `forbiddenImports` bans, OR (for
235
+ * `TOKEN_LAYER_BOUNDARY_SURFACES` members, `./charts`/`./tokens`) exemption, since their
236
+ * Mantine-free guarantee is covered by the repo-local-only `basalt/token-layer-boundary`
237
+ * plugin rule instead — this assertion cannot verify that rule's live registration itself (see
238
+ * the assertion's own comment below for why); basalt's own CI does
239
+ * (`tests/surfaces-coverage.test.ts`).
213
240
  * 8. Every doctrine optionalPeers entry exists in peerDependencies AND peerDependenciesMeta.
214
241
  *
215
242
  * Tooling surfaces are exempt from assertions 1–3 by the discriminant.
@@ -287,6 +314,6 @@ export declare function guardHook(cwd?: string): Promise<number>;
287
314
  * The `guard-hook` subcommand is async (reads stdin); all others are synchronous.
288
315
  */
289
316
  export declare function run(argv: string[], cwd?: string): number | Promise<number>;
290
- export { managedFiles, MANIFEST_PATH, RULE_NAMES, SKILL_NAMES };
317
+ export { managedFiles, MANIFEST_PATH, normalizeForLedger, RULE_NAMES, SKILL_NAMES };
291
318
  export type { ManagedFile, Manifest, SyncOptions, DoctorResult };
292
319
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAqCA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAY,MAAM,aAAa,CAAA;AAG/D,yEAAyE;AACzE,MAAM,MAAM,YAAY,GAAG;IACzB,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,4FAA4F;IAC5F,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,uGAAuG;IACvG,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,6FAA6F;IAC7F,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;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CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,CAyF1D;AAMD,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;IACzB,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB,CAAA;AAED,sDAAsD;AACtD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,WAAW,EAAE,CAAA;CACxB,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CA8F5C;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAoF5E;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,GAAE,MAAsB,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAkCzF;AAKD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,UAAU,EAAE,WAAW,EAAE,CAAA;AACnF,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,CAAA"}
package/dist/cli/index.js CHANGED
@@ -12,7 +12,7 @@ import { dirname, isAbsolute, relative, resolve } from "node:path";
12
12
  import { fileURLToPath } from "node:url";
13
13
  import { checkSource, DEFAULT_GUARD_CONFIG, GUARD_RULES } from "../guard/index.js";
14
14
  import { evaluateGuardHook } from "../guard/guard-hook.js";
15
- import { RULE_NAMES, SKILL_NAMES, SURFACES } from "../surfaces.js";
15
+ import { RULE_NAMES, SKILL_NAMES, SURFACES, TOKEN_LAYER_BOUNDARY_SURFACES } from "../surfaces.js";
16
16
  const DEFAULT_ROOTS = ["src"];
17
17
  const DEFAULT_SERIES_MODULE_PATH = "src/lib/series.ts";
18
18
  function defaultExempt(cfg) {
@@ -359,21 +359,28 @@ function unitState(file, cwd, ctx) {
359
359
  }
360
360
  return { current: onDisk, desired };
361
361
  }
362
+ function normalizeForLedger(text) {
363
+ return text.replace(/(<!-- basalt:begin)\s+\S+(\s*-->)/, "$1$2").split("\n").map((line) => line.replace(/[ \t]+$/, "")).join("\n").replace(/\n{2,}/g, "\n").trim();
364
+ }
362
365
  function writeUnit(file, cwd, desired) {
363
366
  const destAbs = resolve(cwd, file.dest);
364
367
  if (file.markers) {
365
368
  const host = readIfExists(destAbs) ?? "";
366
369
  writeFileEnsuringDir(destAbs, applyBlock(host, desired));
367
- return sha256(desired);
370
+ } else {
371
+ writeFileEnsuringDir(destAbs, desired);
368
372
  }
369
- writeFileEnsuringDir(destAbs, desired);
370
- return sha256(desired);
373
+ return sha256(normalizeForLedger(desired));
371
374
  }
372
375
  function classify(state, manifestHash) {
373
376
  if (state.current === null) return "missing";
374
377
  if (state.desired !== null && state.current === state.desired) return "current";
375
378
  const currentHash = sha256(state.current);
376
379
  if (currentHash === manifestHash) return "unchanged";
380
+ if (sha256(normalizeForLedger(state.current)) === manifestHash) return "unchanged";
381
+ if (state.desired !== null && normalizeForLedger(state.current) === normalizeForLedger(state.desired)) {
382
+ return "unchanged";
383
+ }
377
384
  return "drifted";
378
385
  }
379
386
  function diffSummary(file, state) {
@@ -404,7 +411,7 @@ function init(cwd = process.cwd(), scaffoldFlags = {}) {
404
411
  }
405
412
  const destExists = existsSync(resolve(cwd, file.dest));
406
413
  if (!file.markers && destExists) {
407
- manifest.files[file.dest] = sha256(state.desired);
414
+ manifest.files[file.dest] = sha256(normalizeForLedger(state.desired));
408
415
  skipped++;
409
416
  continue;
410
417
  }
@@ -475,7 +482,7 @@ function sync(opts = {}, cwd = process.cwd()) {
475
482
  }
476
483
  const kind = classify(state, manifest.files[file.dest]);
477
484
  if (kind === "current") {
478
- manifest.files[file.dest] = sha256(state.desired);
485
+ manifest.files[file.dest] = sha256(normalizeForLedger(state.desired));
479
486
  continue;
480
487
  }
481
488
  if (kind === "drifted" && !opts.force) {
@@ -587,6 +594,7 @@ function checkCoverage() {
587
594
  const REQUIRED_MANTINE_BANS = ["@mantine/core", "@mantine/hooks", "@mantine/*"];
588
595
  for (const [key, spec] of allSpecs) {
589
596
  if (spec.layer !== "headless") continue;
597
+ if (TOKEN_LAYER_BOUNDARY_SURFACES.has(key)) continue;
590
598
  for (const required of REQUIRED_MANTINE_BANS) {
591
599
  const hasBan = spec.forbiddenImports.some((fi) => fi.spec === required);
592
600
  if (!hasBan) {
@@ -884,6 +892,7 @@ export {
884
892
  info,
885
893
  init,
886
894
  managedFiles,
895
+ normalizeForLedger,
887
896
  run,
888
897
  sync
889
898
  };
@@ -60,13 +60,6 @@ type BaseSurface = {
60
60
  readonly layer: Layer;
61
61
  readonly forbiddenImports: readonly ForbiddenImport[];
62
62
  readonly ruleOverrides?: readonly RuleOverride[];
63
- /**
64
- * REPLACE-not-inherit-and-add. When true, this surface's forbiddenImports are the COMPLETE ban
65
- * set for its glob — the generator MUST NOT inherit-and-add the parent (src/**) bans. Charts sets
66
- * this so the @visx/* ban from src/** does NOT leak into the charts override (which would re-ban
67
- * visx). The projection emits the full list.
68
- */
69
- readonly replaceBans?: true;
70
63
  /**
71
64
  * Human-readable description of this surface — single source for llms.txt and info output.
72
65
  * Optional on tooling surfaces (they have no llms.txt row).
@@ -150,8 +143,7 @@ export declare const SURFACES: {
150
143
  readonly shipped: readonly ["**/charts/**"];
151
144
  readonly repo: readonly ["packages/basalt-ui/src/charts/**"];
152
145
  };
153
- readonly replaceBans: true;
154
- readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport, ForbiddenImport];
146
+ readonly forbiddenImports: readonly [];
155
147
  readonly ruleOverrides: readonly [{
156
148
  readonly rule: "no-underscore-dangle";
157
149
  readonly level: "off";
@@ -169,7 +161,7 @@ export declare const SURFACES: {
169
161
  readonly shipped: readonly ["**/tokens/**"];
170
162
  readonly repo: readonly ["packages/basalt-ui/src/tokens/**"];
171
163
  };
172
- readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport, ForbiddenImport];
164
+ readonly forbiddenImports: readonly [];
173
165
  };
174
166
  readonly './theme-lab': {
175
167
  readonly kind: "tooling";
@@ -191,7 +183,7 @@ export declare const SURFACES: {
191
183
  readonly shipped: readonly [];
192
184
  readonly repo: readonly ["packages/basalt-ui/src/guard/**"];
193
185
  };
194
- readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport, ForbiddenImport];
186
+ readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport];
195
187
  };
196
188
  readonly './query': {
197
189
  readonly kind: "doctrine";
@@ -205,7 +197,7 @@ export declare const SURFACES: {
205
197
  readonly shipped: readonly [];
206
198
  readonly repo: readonly ["packages/basalt-ui/src/query/**"];
207
199
  };
208
- readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport, ForbiddenImport];
200
+ readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport];
209
201
  };
210
202
  readonly './router-tanstack': {
211
203
  readonly kind: "doctrine";
@@ -219,7 +211,7 @@ export declare const SURFACES: {
219
211
  readonly shipped: readonly [];
220
212
  readonly repo: readonly ["packages/basalt-ui/src/router-tanstack/**"];
221
213
  };
222
- readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport, ForbiddenImport];
214
+ readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport];
223
215
  };
224
216
  readonly './forms': {
225
217
  readonly kind: "doctrine";
@@ -293,7 +285,7 @@ export declare const SURFACES: {
293
285
  readonly shipped: readonly [];
294
286
  readonly repo: readonly ["packages/basalt-ui/src/agent/**"];
295
287
  };
296
- readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport, ForbiddenImport];
288
+ readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport];
297
289
  };
298
290
  readonly './content': {
299
291
  readonly kind: "doctrine";
@@ -317,7 +309,7 @@ export declare const SURFACES: {
317
309
  readonly shipped: readonly [];
318
310
  readonly repo: readonly ["packages/basalt-ui/src/state.ts"];
319
311
  };
320
- readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport, ForbiddenImport];
312
+ readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport];
321
313
  };
322
314
  readonly './connectivity': {
323
315
  readonly kind: "doctrine";
@@ -362,7 +354,7 @@ export declare const SURFACES: {
362
354
  readonly level: "off";
363
355
  readonly target: "repo";
364
356
  }];
365
- readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport, ForbiddenImport, ForbiddenImport];
357
+ readonly forbiddenImports: readonly [ForbiddenImport, ForbiddenImport];
366
358
  };
367
359
  };
368
360
  /**
@@ -382,5 +374,45 @@ export declare const RULE_NAMES: readonly RuleName[];
382
374
  * SKILL_NAMES.includes('basalt-design') // true
383
375
  */
384
376
  export declare const SKILL_NAMES: readonly SkillName[];
377
+ /**
378
+ * Headless SURFACES keys whose Mantine-free guarantee is enforced by the `basalt/token-layer-
379
+ * boundary` oxlint plugin rule (`configs/oxlint-plugin.js`) instead of a `forbiddenImports`
380
+ * no-restricted-imports ban — the rule fires on `charts`/`tokens` path segments only, so ONLY
381
+ * these two surfaces qualify (every other headless surface still carries its Mantine ban in
382
+ * `forbiddenImports`).
383
+ *
384
+ * `basalt/token-layer-boundary` is registered ONLY in the repo-local `.oxlintrc.json`, never the
385
+ * shipped consumer preset. It protects two things: layering — `tokens` is pure data that
386
+ * `cssVariablesResolver` (Mantine-coupled) reads to bind Mantine's surfaces to the same `--vx-*`
387
+ * vars `charts` reads, so an `@mantine/*` import in either would cycle back through the theme
388
+ * layer or let a chart bypass `--vx-*` and fork chrome/charts apart — and packaging: `./charts`
389
+ * and `./tokens` resolve and render with NO `@mantine/*` installed, real and CI-tested
390
+ * (`scripts/pack-test.sh`'s "charts/tokens-only (no-Mantine) resolution + render" step,
391
+ * `scripts/check-dist-layering.mjs`'s dist-graph walk). The LAYER is Mantine-free — the FRAMEWORK
392
+ * is not (`.` requires Mantine as a non-optional peer; these two subpaths don't). Both are a
393
+ * basalt-internal invariant, not a consumer contract (a consumer's own `charts/`/`tokens/`-named
394
+ * directories carry no such obligation), which is why it stays repo-local. Because
395
+ * of that, `checkCoverage()`'s assertion 7 treats membership here as a pure EXEMPTION from the
396
+ * forbiddenImports requirement — it does NOT (and, being a shipped CLI subcommand that must run
397
+ * from inside a consumer's node_modules, CANNOT) verify the rule's live registration itself. That
398
+ * "fails loudly if enforcement is removed" guarantee lives in basalt's own CI instead
399
+ * (`tests/surfaces-coverage.test.ts`, via `hasTokenLayerBoundaryRegistered` against
400
+ * `.oxlintrc.json`).
401
+ */
402
+ export declare const TOKEN_LAYER_BOUNDARY_SURFACES: ReadonlySet<string>;
403
+ /**
404
+ * True when a parsed oxlint config's `rules` object registers `basalt/token-layer-boundary` as
405
+ * `'error'` — the live signal (not just a hardcoded assumption) that `TOKEN_LAYER_BOUNDARY_SURFACES`
406
+ * are actually enforced. Pure — callers read + JSON.parse the config file themselves (surfaces.ts
407
+ * stays dependency-free, no fs access here). Consumed only by basalt's own CI
408
+ * (`tests/surfaces-coverage.test.ts`) against the repo-local `.oxlintrc.json` — NOT by
409
+ * `checkCoverage()`, which cannot read that repo-local file from an installed package (see
410
+ * `TOKEN_LAYER_BOUNDARY_SURFACES`'s doc comment).
411
+ *
412
+ * @example
413
+ * hasTokenLayerBoundaryRegistered({ 'basalt/token-layer-boundary': 'error' }) // true
414
+ * hasTokenLayerBoundaryRegistered({}) // false
415
+ */
416
+ export declare function hasTokenLayerBoundaryRegistered(rules: Record<string, unknown> | undefined): boolean;
385
417
  export {};
386
418
  //# sourceMappingURL=surfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../src/surfaces.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAI9C;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAChB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,OAAO,GACP,OAAO,GACP,eAAe,GACf,UAAU,GACV,MAAM,GACN,OAAO,GACP,SAAS,CAAA;AAEb;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,eAAe,GAAG,eAAe,CAAA;AAExE;;;;GAIG;AACH,MAAM,MAAM,KAAK,GAAG,iBAAiB,GAAG,UAAU,GAAG,YAAY,GAAG,cAAc,CAAA;AAElF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,wFAAwF;IACxF,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;IAChC,oFAAoF;IACpF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,oFAAoF;IACpF,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,CAAA;IAC3B,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAA;CACzB,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;IACxC,QAAQ,CAAC,MAAM,CAAC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