basalt-ui 1.32.0 → 1.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/MIGRATING.md +228 -20
  3. package/agent/rules/basalt-mantine.md +2 -2
  4. package/agent/rules/basalt-state.md +2 -2
  5. package/agent/rules/basalt-tokens.md +1 -1
  6. package/configs/oxlint-plugin.js +160 -89
  7. package/configs/oxlint-plugin.test.ts +273 -10
  8. package/configs/oxlint.json +2 -2
  9. package/dist/agent/coalesce.d.ts.map +1 -1
  10. package/dist/agent/coalesce.js +1 -2
  11. package/dist/agent/merge.d.ts.map +1 -1
  12. package/dist/agent/merge.js +1 -2
  13. package/dist/agent-chat/relative-time.d.ts +9 -0
  14. package/dist/agent-chat/relative-time.d.ts.map +1 -1
  15. package/dist/agent-chat/relative-time.js +1 -2
  16. package/dist/agent-chat/thread-message.d.ts.map +1 -1
  17. package/dist/agent-chat/thread-message.js +1 -2
  18. package/dist/charts/kinds/BandStrip.d.ts.map +1 -1
  19. package/dist/charts/kinds/BandStrip.js +3 -3
  20. package/dist/charts/kinds/Bars.d.ts.map +1 -1
  21. package/dist/charts/kinds/Bars.js +1 -2
  22. package/dist/charts/kinds/StackedArea.d.ts.map +1 -1
  23. package/dist/charts/kinds/StackedArea.js +1 -2
  24. package/dist/charts/primitives/legend-disclosure.d.ts.map +1 -1
  25. package/dist/cli/audit-allows.d.ts +1 -1
  26. package/dist/cli/audit-allows.d.ts.map +1 -1
  27. package/dist/cli/audit-allows.js +4 -4
  28. package/dist/cli/check-theme.d.ts.map +1 -1
  29. package/dist/cli/check-theme.js +1 -2
  30. package/dist/cli/config.d.ts +197 -0
  31. package/dist/cli/config.d.ts.map +1 -0
  32. package/dist/cli/config.js +20 -0
  33. package/dist/cli/doctor.js +1 -1
  34. package/dist/cli/guard-hook.d.ts.map +1 -1
  35. package/dist/cli/guard-hook.js +2 -8
  36. package/dist/cli/index.d.ts +2 -196
  37. package/dist/cli/index.d.ts.map +1 -1
  38. package/dist/cli/index.js +1 -18
  39. package/dist/commands/define-commands.d.ts.map +1 -1
  40. package/dist/commands/define-commands.js +2 -2
  41. package/dist/commands/define-overlays.d.ts.map +1 -1
  42. package/dist/commands/define-overlays.js +1 -2
  43. package/dist/common/index.d.ts +0 -1
  44. package/dist/common/index.d.ts.map +1 -1
  45. package/dist/common/index.js +0 -2
  46. package/dist/common/validate.d.ts +2 -2
  47. package/dist/common/validate.d.ts.map +1 -1
  48. package/dist/common/validate.js +2 -3
  49. package/dist/content/article-card.d.ts.map +1 -1
  50. package/dist/content/article-card.js +4 -1
  51. package/dist/controls/enum-filter.d.ts.map +1 -1
  52. package/dist/controls/enum-filter.js +3 -13
  53. package/dist/controls/filter-pill.d.ts +8 -0
  54. package/dist/controls/filter-pill.d.ts.map +1 -1
  55. package/dist/controls/filter-pill.js +15 -0
  56. package/dist/controls/multi-select-filter.d.ts.map +1 -1
  57. package/dist/controls/multi-select-filter.js +3 -13
  58. package/dist/controls/number-filter.d.ts +3 -0
  59. package/dist/controls/number-filter.d.ts.map +1 -1
  60. package/dist/controls/number-filter.js +12 -4
  61. package/dist/controls/range-filter.d.ts.map +1 -1
  62. package/dist/controls/range-filter.js +1 -2
  63. package/dist/data/data-table.d.ts +9 -2
  64. package/dist/data/data-table.d.ts.map +1 -1
  65. package/dist/data/data-table.js +2 -3
  66. package/dist/forms/form-layout.d.ts +6 -1
  67. package/dist/forms/form-layout.d.ts.map +1 -1
  68. package/dist/forms/form-layout.module.css +3 -0
  69. package/dist/guard/index.d.ts +18 -4
  70. package/dist/guard/index.d.ts.map +1 -1
  71. package/dist/guard/index.js +67 -31
  72. package/dist/guard/types.d.ts +3 -3
  73. package/dist/guard/types.d.ts.map +1 -1
  74. package/dist/guard/vx-names.d.ts +3 -0
  75. package/dist/guard/vx-names.d.ts.map +1 -0
  76. package/dist/guard/vx-names.js +257 -0
  77. package/dist/notifications/mount-guard.d.ts.map +1 -1
  78. package/dist/notifications/mount-guard.js +1 -2
  79. package/dist/provider/index.d.ts.map +1 -1
  80. package/dist/provider/index.js +2 -3
  81. package/dist/provider/lab-theme.d.ts +5 -4
  82. package/dist/provider/lab-theme.d.ts.map +1 -1
  83. package/dist/provider/lab-theme.js +1 -3
  84. package/dist/router-tanstack/search-store.d.ts +18 -0
  85. package/dist/router-tanstack/search-store.d.ts.map +1 -1
  86. package/dist/router-tanstack/search-store.js +33 -1
  87. package/dist/shell/mobile-nav-model.d.ts.map +1 -1
  88. package/dist/shell/mobile-nav-model.js +3 -4
  89. package/dist/shell/page-bar.d.ts +24 -0
  90. package/dist/shell/page-bar.d.ts.map +1 -1
  91. package/dist/shell/page-bar.js +1 -2
  92. package/dist/surfaces.d.ts +1 -1
  93. package/dist/surfaces.d.ts.map +1 -1
  94. package/dist/surfaces.js +2 -0
  95. package/dist/tokens/index.d.ts +2 -0
  96. package/dist/tokens/index.d.ts.map +1 -1
  97. package/dist/tokens/index.js +10 -0
  98. package/dist/tokens/size-classes.d.ts +13 -0
  99. package/dist/tokens/size-classes.d.ts.map +1 -1
  100. package/dist/tokens/size-classes.js +8 -0
  101. package/llms.txt +2 -2
  102. package/package.json +1 -1
  103. package/src/agent/coalesce.ts +1 -2
  104. package/src/agent/merge.ts +1 -2
  105. package/src/agent-chat/relative-time.ts +1 -2
  106. package/src/agent-chat/thread-message.tsx +2 -3
  107. package/src/charts/kinds/BandStrip.tsx +7 -3
  108. package/src/charts/kinds/Bars.tsx +1 -2
  109. package/src/charts/kinds/StackedArea.tsx +4 -2
  110. package/src/charts/primitives/legend-disclosure.tsx +1 -0
  111. package/src/cli/audit-allows.ts +10 -9
  112. package/src/cli/check-theme.ts +1 -2
  113. package/src/cli/config.ts +209 -0
  114. package/src/cli/doctor.ts +2 -2
  115. package/src/cli/guard-hook.ts +2 -8
  116. package/src/cli/index.ts +2 -206
  117. package/src/commands/define-commands.ts +2 -2
  118. package/src/commands/define-overlays.ts +1 -2
  119. package/src/common/index.ts +0 -1
  120. package/src/common/validate.ts +4 -5
  121. package/src/content/article-card.tsx +1 -0
  122. package/src/controls/enum-filter.tsx +3 -13
  123. package/src/controls/filter-pill.tsx +20 -0
  124. package/src/controls/multi-select-filter.tsx +3 -13
  125. package/src/controls/number-filter.tsx +24 -3
  126. package/src/controls/range-filter.tsx +1 -2
  127. package/src/data/data-table.tsx +11 -5
  128. package/src/forms/form-layout.module.css +3 -0
  129. package/src/forms/form-layout.tsx +6 -1
  130. package/src/guard/index.ts +151 -62
  131. package/src/guard/types.ts +3 -2
  132. package/src/guard/vx-names.ts +257 -0
  133. package/src/notifications/mount-guard.ts +1 -2
  134. package/src/provider/index.tsx +2 -3
  135. package/src/provider/lab-theme.ts +28 -21
  136. package/src/router-tanstack/search-store.ts +73 -1
  137. package/src/shell/mobile-nav-model.ts +3 -5
  138. package/src/shell/page-bar.tsx +25 -4
  139. package/src/surfaces.ts +2 -0
  140. package/src/tokens/index.ts +10 -0
  141. package/src/tokens/size-classes.ts +14 -0
  142. package/dist/common/is-dev.d.ts +0 -3
  143. package/dist/common/is-dev.d.ts.map +0 -1
  144. package/dist/common/is-dev.js +0 -6
  145. package/src/common/is-dev.ts +0 -4
@@ -7,7 +7,7 @@
7
7
  * enabling every rule this file tests. `run` shells the workspace-root `node_modules/.bin/oxlint`
8
8
  * binary and returns the parsed set of `basalt/<rule>` diagnostics it printed.
9
9
  */
10
- import { afterEach, beforeEach, describe, expect, it } from 'bun:test'
10
+ import { afterEach, beforeAll, beforeEach, describe, expect, it } from 'bun:test'
11
11
  import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
12
12
  import { tmpdir } from 'node:os'
13
13
  import { dirname, resolve } from 'node:path'
@@ -100,12 +100,37 @@ function run(
100
100
  writeFileSync(filePath, source)
101
101
  const result = Bun.spawnSync([OXLINT_BIN, '-c', '.oxlintrc.json', filename], { cwd: dir })
102
102
  const output = `${result.stdout}${result.stderr}`
103
+ // A plugin that fails to load must fail the run, not read as "no findings" — otherwise every
104
+ // `not.toContain` below is false-green.
105
+ if (/Failed to (?:load JS plugin|parse oxlint configuration)/.test(output))
106
+ throw new Error(`oxlint could not load the basalt plugin:\n${output}`)
103
107
  const rules = new Set(
104
108
  [...output.matchAll(/\(basalt\/([\w-]+)\)/g)].map((match) => match[1] as string),
105
109
  )
106
110
  return { code: result.exitCode ?? 0, rules, output }
107
111
  }
108
112
 
113
+ // The sentinel: one fixture every working plugin reports. If it does not, the plugin is not loaded
114
+ // (or not registered under `basalt/`) and nothing else in this file means anything.
115
+ beforeAll(() => {
116
+ const sentinelDir = mkdtempSync(resolve(tmpdir(), 'basalt-oxlint-sentinel-'))
117
+ try {
118
+ writeFileSync(
119
+ resolve(sentinelDir, '.oxlintrc.json'),
120
+ JSON.stringify({ jsPlugins: [PLUGIN_PATH], rules: { 'basalt/no-raw-font-size': 'error' } }),
121
+ )
122
+ writeFileSync(resolve(sentinelDir, 'sentinel.tsx'), 'export const C = () => <Text fz={10} />\n')
123
+ const result = Bun.spawnSync([OXLINT_BIN, '-c', '.oxlintrc.json', 'sentinel.tsx'], {
124
+ cwd: sentinelDir,
125
+ })
126
+ const output = `${result.stdout}${result.stderr}`
127
+ if (!output.includes('(basalt/no-raw-font-size)'))
128
+ throw new Error(`basalt oxlint plugin did not load — sentinel rule never fired:\n${output}`)
129
+ } finally {
130
+ rmSync(sentinelDir, { recursive: true, force: true })
131
+ }
132
+ })
133
+
109
134
  // ── no-raw-font-size ─────────────────────────────────────────────────────────
110
135
 
111
136
  describe('basalt/no-raw-font-size', () => {
@@ -1339,8 +1364,10 @@ describe('assertGraceLedger', () => {
1339
1364
  // A guard kind and a plugin rule that enforce ONE law in two lanes (CSS/text vs. JSX AST) must
1340
1365
  // promote together — a consumer failing one spelling and warned on the other is the confusion the
1341
1366
  // pairing exists to prevent. `raw-media-query` split from `basalt/raw-breakpoint` exactly that way
1342
- // (1.32.0 vs 1.33.0). Twins are DERIVED, not hand-listed, from the two places they are declared: a
1343
- // `WAIVER_ID_ALIASES` pair, and a guard entry whose `why` calls itself the twin of `basalt/<id>`.
1367
+ // (1.32.0 vs 1.33.0). Twins are DERIVED from declarations that outlive the grace window: a
1368
+ // `WAIVER_ID_ALIASES` pair, and a guard kind whose registry message names its `basalt/<id>` twin.
1369
+ // (Deriving them from the ledger, as this did until 1.33.0, went vacuous the moment the last pair
1370
+ // promoted.)
1344
1371
 
1345
1372
  const pluginGrace = PLUGIN_RULE_GRACE as Record<string, GraceEntry>
1346
1373
  const guardGrace = GRACE_PERIOD_KINDS as Record<string, GraceEntry>
@@ -1348,21 +1375,24 @@ const guardGrace = GRACE_PERIOD_KINDS as Record<string, GraceEntry>
1348
1375
  function twinLanes(): Array<[kind: string, rule: string]> {
1349
1376
  const pairs = new Map<string, string>()
1350
1377
  for (const [kind, aliases] of Object.entries(WAIVER_ID_ALIASES)) {
1351
- for (const rule of aliases) if (kind in guardGrace || rule in pluginGrace) pairs.set(kind, rule)
1378
+ if (!Object.hasOwn(GUARD_RULES, kind)) continue
1379
+ for (const rule of aliases) pairs.set(kind, rule)
1352
1380
  }
1353
- for (const [kind, entry] of Object.entries(guardGrace)) {
1354
- const match = /twin of the oxlint plugin's `basalt\/([a-z-]+)`/.exec(entry.why)
1355
- if (match?.[1] !== undefined) pairs.set(kind, match[1])
1381
+ for (const [kind, rule] of Object.entries(GUARD_RULES)) {
1382
+ for (const m of rule.message.matchAll(/basalt\/([a-z-]+)/g)) {
1383
+ if (m[1] !== undefined && m[1] in basaltPlugin.rules) pairs.set(kind, m[1])
1384
+ }
1356
1385
  }
1357
- return [...pairs].filter(([kind]) => kind in guardGrace)
1386
+ return [...pairs]
1358
1387
  }
1359
1388
 
1360
1389
  describe('twin lanes share one promotion', () => {
1361
- it('derives the raw-media-query ↔ raw-breakpoint pair (the derivation is not silently empty)', () => {
1390
+ it('derives the known pairs (the derivation is not silently empty)', () => {
1362
1391
  expect(twinLanes()).toContainEqual(['raw-media-query', 'raw-breakpoint'])
1392
+ expect(twinLanes()).toContainEqual(['raw-selection-control', 'control-outside-home'])
1363
1393
  })
1364
1394
 
1365
- it.each(twinLanes())('%s and basalt/%s are both in grace with the same promote', (kind, rule) => {
1395
+ it.each(twinLanes())('%s and basalt/%s share one grace state and promote', (kind, rule) => {
1366
1396
  expect([kind, rule, guardGrace[kind]?.promote]).toEqual([
1367
1397
  kind,
1368
1398
  rule,
@@ -3614,6 +3644,118 @@ describe('basalt/raw-breakpoint', () => {
3614
3644
  expect(rules).not.toContain('raw-breakpoint')
3615
3645
  })
3616
3646
 
3647
+ // The shipped map is the one IMPORTED map trusted: its value is known, so five route files no
3648
+ // longer copy the same literal. Provenance-gated on `basalt-ui/tokens`, alias-safe.
3649
+ const SPAN = `<Grid.Col span={{ base: 12, sm: 6 }}>x</Grid.Col>`
3650
+ it.each([
3651
+ [
3652
+ 'the named import',
3653
+ `import { CONTAINER_GRID_BREAKPOINTS } from 'basalt-ui/tokens'`,
3654
+ 'CONTAINER_GRID_BREAKPOINTS',
3655
+ ],
3656
+ [
3657
+ 'an aliased import',
3658
+ `import { CONTAINER_GRID_BREAKPOINTS as bp } from 'basalt-ui/tokens'`,
3659
+ 'bp',
3660
+ ],
3661
+ [
3662
+ 'a same-file alias of it',
3663
+ `import { CONTAINER_GRID_BREAKPOINTS } from 'basalt-ui/tokens'\nconst bp = CONTAINER_GRID_BREAKPOINTS`,
3664
+ 'bp',
3665
+ ],
3666
+ ])(
3667
+ 'does NOT flag Grid.Col spans under breakpoints={CONTAINER_GRID_BREAKPOINTS} (%s)',
3668
+ (_, imp, ref) => {
3669
+ const { rules } = run(
3670
+ `import { Grid } from '@mantine/core'\n${imp}\n` +
3671
+ `export const C = () => <Grid type="container" breakpoints={${ref}}>${SPAN}</Grid>\n`,
3672
+ )
3673
+ expect(rules).not.toContain('raw-breakpoint')
3674
+ },
3675
+ )
3676
+
3677
+ it.each([
3678
+ ['another module', `import { CONTAINER_GRID_BREAKPOINTS } from './tokens'`],
3679
+ ['a type-only import', `import type { CONTAINER_GRID_BREAKPOINTS } from 'basalt-ui/tokens'`],
3680
+ [
3681
+ 'another basalt-ui/tokens name',
3682
+ `import { CONTAINER_CLASSES as CONTAINER_GRID_BREAKPOINTS } from 'basalt-ui/tokens'`,
3683
+ ],
3684
+ ])('still flags an imported map of the same name from %s', (_, imp) => {
3685
+ const { rules, output } = run(
3686
+ `import { Grid } from '@mantine/core'\n${imp}\n` +
3687
+ `export const C = () => <Grid type="container" breakpoints={CONTAINER_GRID_BREAKPOINTS}>${SPAN}</Grid>\n`,
3688
+ )
3689
+ expect(rules).toContain('raw-breakpoint')
3690
+ expect(CONTAINER_MESSAGE.test(output)).toBe(true)
3691
+ })
3692
+
3693
+ const NS = `import * as tokens from 'basalt-ui/tokens'`
3694
+ it.each([
3695
+ ['a member of the namespace import', NS, 'tokens.CONTAINER_GRID_BREAKPOINTS'],
3696
+ ['a computed member', NS, `tokens['CONTAINER_GRID_BREAKPOINTS']`],
3697
+ ['a const alias of the member', `${NS}\nconst bp = tokens.CONTAINER_GRID_BREAKPOINTS`, 'bp'],
3698
+ ])('does NOT flag Grid.Col spans under %s', (_, imp, ref) => {
3699
+ const { rules } = run(
3700
+ `import { Grid } from '@mantine/core'\n${imp}\n` +
3701
+ `export const C = () => <Grid type="container" breakpoints={${ref}}>${SPAN}</Grid>\n`,
3702
+ )
3703
+ expect(rules).not.toContain('raw-breakpoint')
3704
+ })
3705
+
3706
+ it.each([
3707
+ ['another module', `import * as tokens from './tokens'`, 'tokens.CONTAINER_GRID_BREAKPOINTS'],
3708
+ ['another member', NS, 'tokens.CONTAINER_CLASSES'],
3709
+ [
3710
+ 'a parameter shadowing the namespace',
3711
+ `${NS}\nexport const Used = () => tokens.VX`,
3712
+ 'tokens.CONTAINER_GRID_BREAKPOINTS',
3713
+ '({ tokens }: { tokens: { CONTAINER_GRID_BREAKPOINTS: Record<string, string> } })',
3714
+ ],
3715
+ ])('still flags a namespace member from %s', (_, imp, ref, params = '()') => {
3716
+ const { rules, output } = run(
3717
+ `import { Grid } from '@mantine/core'\n${imp}\n` +
3718
+ `export const C = ${params} => <Grid type="container" breakpoints={${ref}}>${SPAN}</Grid>\n`,
3719
+ )
3720
+ expect(rules).toContain('raw-breakpoint')
3721
+ expect(CONTAINER_MESSAGE.test(output)).toBe(true)
3722
+ })
3723
+
3724
+ // Trust follows the BINDING, not the name: a shadow of the import is someone else's value.
3725
+ it.each([
3726
+ [
3727
+ 'a parameter',
3728
+ `export const C = ({ bp }: { bp: Record<string, string> }) => <Grid type="container" breakpoints={bp}>${SPAN}</Grid>`,
3729
+ ],
3730
+ [
3731
+ 'an inner const',
3732
+ `export const C = () => {\n const bp = pick()\n return <Grid type="container" breakpoints={bp}>${SPAN}</Grid>\n}`,
3733
+ ],
3734
+ [
3735
+ 'an inner const aliasing a parameter',
3736
+ `export function C(props: { m: Record<string, string> }) {\n const bp = props.m\n return <Grid type="container" breakpoints={bp}>${SPAN}</Grid>\n}`,
3737
+ ],
3738
+ ])('flags breakpoints={bp} when bp is %s shadowing the aliased import', (_, component) => {
3739
+ const { rules, output } = run(
3740
+ `import { Grid } from '@mantine/core'\n` +
3741
+ `import { CONTAINER_GRID_BREAKPOINTS as bp } from 'basalt-ui/tokens'\n` +
3742
+ `export const Used = () => <Grid type="container" breakpoints={bp}>x</Grid>\n` +
3743
+ `${component}\n`,
3744
+ )
3745
+ expect(rules).toContain('raw-breakpoint')
3746
+ expect(CONTAINER_MESSAGE.test(output)).toBe(true)
3747
+ })
3748
+
3749
+ it('flags a parameter shadowing the unaliased import name', () => {
3750
+ const { rules } = run(
3751
+ `import { Grid } from '@mantine/core'\n` +
3752
+ `import { CONTAINER_GRID_BREAKPOINTS } from 'basalt-ui/tokens'\n` +
3753
+ `export const C = ({ CONTAINER_GRID_BREAKPOINTS }: { CONTAINER_GRID_BREAKPOINTS: Record<string, string> }) =>\n` +
3754
+ ` <Grid type="container" breakpoints={CONTAINER_GRID_BREAKPOINTS}>${SPAN}</Grid>\n`,
3755
+ )
3756
+ expect(rules).toContain('raw-breakpoint')
3757
+ })
3758
+
3617
3759
  // Only the grid-keyed props route through the container queries; Box style props on the same
3618
3760
  // element still compile to viewport @media, so they keep the ordinary viewport message.
3619
3761
  it.each([
@@ -3723,6 +3865,127 @@ describe('basalt/raw-breakpoint', () => {
3723
3865
  )
3724
3866
  expect(rules).not.toContain('raw-breakpoint')
3725
3867
  })
3868
+
3869
+ // rb r2 #11: the object sat inside a conditional, so the rule never saw it.
3870
+ it('flags a responsive object inside a conditional prop value (Grid.Col, no container)', () => {
3871
+ const { rules } = run(
3872
+ `import { Grid } from '@mantine/core'\n` +
3873
+ `export const C = ({ wide }: { wide: boolean }) => (\n` +
3874
+ ` <Grid><Grid.Col span={wide ? { base: 12, md: 4 } : 12}>x</Grid.Col></Grid>\n)\n`,
3875
+ )
3876
+ expect(rules).toContain('raw-breakpoint')
3877
+ })
3878
+
3879
+ // Review r1: the unwrap ran before const resolution, so hoisting the conditional bypassed it.
3880
+ it('flags a conditional responsive object behind a same-file const', () => {
3881
+ const { rules } = run(
3882
+ `import { Grid } from '@mantine/core'\n` +
3883
+ `export const C = ({ wide }: { wide: boolean }) => {\n` +
3884
+ ` const span = wide ? { base: 12, md: 4 } : 12\n` +
3885
+ ` return <Grid><Grid.Col span={span}>x</Grid.Col></Grid>\n}\n`,
3886
+ )
3887
+ expect(rules).toContain('raw-breakpoint')
3888
+ })
3889
+
3890
+ it('flags through a const alias chain and survives an alias cycle', () => {
3891
+ const chained = run(
3892
+ `import { SimpleGrid } from '@mantine/core'\n` +
3893
+ `const base = { base: 1, sm: 2 }\nconst cols = base\n` +
3894
+ `export const C = () => <SimpleGrid cols={cols} />\n`,
3895
+ )
3896
+ expect(chained.rules).toContain('raw-breakpoint')
3897
+ const cyclic = run(
3898
+ `import { SimpleGrid } from '@mantine/core'\n` +
3899
+ `const a = b\nconst b = a\n` +
3900
+ `export const C = () => <SimpleGrid cols={a} />\n`,
3901
+ )
3902
+ expect(cyclic.rules).not.toContain('raw-breakpoint')
3903
+ })
3904
+
3905
+ it('flags a responsive object on either side of a logical prop value', () => {
3906
+ const { rules } = run(
3907
+ `import { SimpleGrid } from '@mantine/core'\n` +
3908
+ `export const C = ({ c }: { c?: number }) => <SimpleGrid cols={c ?? { base: 1, sm: 2 }} />\n`,
3909
+ )
3910
+ expect(rules).toContain('raw-breakpoint')
3911
+ })
3912
+
3913
+ // rb r2 #13: a base-only object is no breakpoint at all — the message says to write the value.
3914
+ it('tells a base-only responsive object to write the bare value', () => {
3915
+ const { rules, output } = run(
3916
+ `import { SimpleGrid } from '@mantine/core'\n` +
3917
+ `export const C = () => <SimpleGrid cols={{ base: 3 }} />\n`,
3918
+ )
3919
+ expect(rules).toContain('raw-breakpoint')
3920
+ expect(output).toContain('cols={3}')
3921
+ expect(output).not.toContain('keyed on theme breakpoints')
3922
+ })
3923
+
3924
+ it('gives the base-only message through a const-bound conditional too', () => {
3925
+ const { output } = run(
3926
+ `import { SimpleGrid } from '@mantine/core'\n` +
3927
+ `export const C = ({ d }: { d: boolean }) => {\n` +
3928
+ ` const cols = d ? { base: 3 } : 2\n return <SimpleGrid cols={cols} />\n}\n`,
3929
+ )
3930
+ expect(output).toContain('cols={3}')
3931
+ expect(output).not.toContain('keyed on theme breakpoints')
3932
+ })
3933
+
3934
+ it('keeps the viewport message when any branch carries a real breakpoint', () => {
3935
+ const { output } = run(
3936
+ `import { SimpleGrid } from '@mantine/core'\n` +
3937
+ `export const C = ({ d }: { d: boolean }) => <SimpleGrid cols={d ? { base: 3 } : { base: 1, sm: 2 }} />\n`,
3938
+ )
3939
+ expect(output).toContain('keyed on theme breakpoints')
3940
+ })
3941
+
3942
+ // rb r2 #5.
3943
+ it('points a useMediaQuery read at the (pointer: coarse) CSS home', () => {
3944
+ const { output } = run(
3945
+ `import { useMediaQuery } from '@mantine/hooks'\n` +
3946
+ `export const useTouch = () => useMediaQuery('(hover: none)')\n`,
3947
+ )
3948
+ expect(output).toContain('@media (pointer: coarse)')
3949
+ })
3950
+
3951
+ // obsidian r2 #7: a test-setup polyfill lives in `tests/`, not in a `.test` file.
3952
+ it.each(['tests/setup/dom.ts', 'test/setup.ts', 'src/__tests__/setup.ts'])(
3953
+ 'does NOT flag a matchMedia stub under %s',
3954
+ (filename) => {
3955
+ const { rules } = run(`window.matchMedia = () => ({ matches: false })\n`, filename)
3956
+ expect(rules).not.toContain('raw-breakpoint')
3957
+ },
3958
+ )
3959
+
3960
+ it('still flags a file whose name merely contains "test" outside a test dir', () => {
3961
+ const { rules } = run(`const mq = window.matchMedia('(max-width: 600px)')\n`, 'src/latest/a.ts')
3962
+ expect(rules).toContain('raw-breakpoint')
3963
+ })
3964
+ })
3965
+
3966
+ // ── control homes: text lane ≡ plugin ────────────────────────────────────────
3967
+
3968
+ // 1.32.1 (B2): the plugin homed FormRow/FormGroup while check-theme's `raw-selection-control` did
3969
+ // not, so a correctly migrated form reported in one lane only. Both lists are module-private (the
3970
+ // guard is dependency-free, the plugin cannot import TS), so this reads them out of the source.
3971
+ describe('control homes — lane parity', () => {
3972
+ const pluginSource = readFileSync(PLUGIN_PATH, 'utf8')
3973
+ const guardSource = readFileSync(resolve(import.meta.dirname, '../src/guard/index.ts'), 'utf8')
3974
+
3975
+ const pluginSet = (name: string): string[] => {
3976
+ const body = pluginSource.match(new RegExp(`const ${name} = new Set\\(\\[([^\\]]*)\\]`))?.[1]
3977
+ if (body === undefined) throw new Error(`${name} not found in oxlint-plugin.js`)
3978
+ return [...body.matchAll(/'([^']+)'/g)].map((m) => m[1] as string)
3979
+ }
3980
+
3981
+ it('check-theme CONTROL_HOST_TAG names exactly CONTROL_HOST_TAGS ∪ BASALT_HOST_TAGS', () => {
3982
+ const alternation = guardSource.match(/const CONTROL_HOST_TAG =\s*\/<\(\?:([^)]*)\)/)?.[1]
3983
+ if (alternation === undefined) throw new Error('CONTROL_HOST_TAG not found in guard/index.ts')
3984
+ const textLane = alternation.split('|').map((tag) => tag.replaceAll('\\.', '.'))
3985
+ const pluginLane = [...pluginSet('CONTROL_HOST_TAGS'), ...pluginSet('BASALT_HOST_TAGS')]
3986
+ expect(pluginLane).toContain('FormRow')
3987
+ expect(textLane.toSorted()).toEqual(pluginLane.toSorted())
3988
+ })
3726
3989
  })
3727
3990
 
3728
3991
  // ── the deprecation ledger (B4) ──────────────────────────────────────────────
@@ -33,7 +33,7 @@
33
33
  "basalt/hand-rolled-shell": "error",
34
34
  "basalt/raw-scroll-container": "error",
35
35
  "basalt/hand-rolled-filter": "error",
36
- "basalt/control-outside-home": "warn",
36
+ "basalt/control-outside-home": "error",
37
37
  "basalt/bound-control-outside-home": "error",
38
38
  "basalt/control-size-literal": "error",
39
39
  "basalt/page-bar-budget": "error",
@@ -50,7 +50,7 @@
50
50
  "basalt/agent-resume-guard": "error",
51
51
  "basalt/agent-no-raw-usechat": "error",
52
52
  "basalt/ai-sdk-major": "error",
53
- "basalt/raw-breakpoint": "warn"
53
+ "basalt/raw-breakpoint": "error"
54
54
  },
55
55
  "overrides": [
56
56
  {
@@ -1 +1 @@
1
- {"version":3,"file":"coalesce.d.ts","sourceRoot":"","sources":["../../src/agent/coalesce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,KAAK,EAAE,SAAS,EAAyC,MAAM,SAAS,CAAA;AA+I/E,wBAAgB,aAAa,CAAC,KAAK,SAAS,SAAS,EAAE,KAAK,EAAE,SAAS,KAAK,EAAE,GAAG,KAAK,EAAE,CA+CvF"}
1
+ {"version":3,"file":"coalesce.d.ts","sourceRoot":"","sources":["../../src/agent/coalesce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,KAAK,EAAE,SAAS,EAAyC,MAAM,SAAS,CAAA;AA8I/E,wBAAgB,aAAa,CAAC,KAAK,SAAS,SAAS,EAAE,KAAK,EAAE,SAAS,KAAK,EAAE,GAAG,KAAK,EAAE,CA+CvF"}
@@ -1,4 +1,3 @@
1
- import { isDev } from "../common/is-dev.js";
2
1
  function isTextLikeType(type) {
3
2
  return type === "text" || type === "reasoning";
4
3
  }
@@ -84,7 +83,7 @@ function mergeToolPart(existing, next) {
84
83
  default: {
85
84
  const unhandled = next;
86
85
  const fallback = unhandled;
87
- if (isDev()) {
86
+ if (process.env.NODE_ENV !== "production") {
88
87
  console.warn(
89
88
  `[basalt] coalesceParts: unrecognized tool state ${JSON.stringify(fallback.state)} \u2014 kept, merged best-effort`
90
89
  );
@@ -1 +1 @@
1
- {"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../src/agent/merge.ts"],"names":[],"mappings":"AAmCA;iGACiG;AACjG,MAAM,MAAM,QAAQ,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAoDrE,wBAAgB,SAAS,CAAC,KAAK,SAAS,QAAQ,EAAE,KAAK,EAAE,SAAS,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE,CAyB/F"}
1
+ {"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../src/agent/merge.ts"],"names":[],"mappings":"AAkCA;iGACiG;AACjG,MAAM,MAAM,QAAQ,GAAG;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAoDrE,wBAAgB,SAAS,CAAC,KAAK,SAAS,QAAQ,EAAE,KAAK,EAAE,SAAS,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE,CAyB/F"}
@@ -1,4 +1,3 @@
1
- import { isDev } from "../common/is-dev.js";
2
1
  function isTextLikeType(type) {
3
2
  return type === "text" || type === "reasoning";
4
3
  }
@@ -8,7 +7,7 @@ function spliceText(existingText, next) {
8
7
  }
9
8
  function clampOffset(offset, length) {
10
9
  const clamped = Number.isFinite(offset) ? Math.min(Math.max(offset, 0), length) : length;
11
- if (clamped !== offset && isDev()) {
10
+ if (clamped !== offset && process.env.NODE_ENV !== "production") {
12
11
  console.warn(
13
12
  `[basalt] mergePart: text offset ${offset} out of range [0, ${length}] \u2014 clamped to ${clamped}`
14
13
  );
@@ -1,3 +1,12 @@
1
+ /**
2
+ * formatRelativeTime — dependency-free relative-time formatting (no date-fns).
3
+ *
4
+ * Shared between `ThreadOutcomeCard` (inbox row timestamps) and `ThreadTranscript` (per-message
5
+ * timestamps). 'en'-hardcoded for now — see the module-level note below for the deferred locale
6
+ * seam.
7
+ *
8
+ * Internal to `agent-chat/` — not part of the public barrel.
9
+ */
1
10
  /**
2
11
  * Formats an epoch-ms timestamp as a short relative string ("3 hours ago", "just now").
3
12
  *
@@ -1 +1 @@
1
- {"version":3,"file":"relative-time.d.ts","sourceRoot":"","sources":["../../src/agent-chat/relative-time.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAc5D"}
1
+ {"version":3,"file":"relative-time.d.ts","sourceRoot":"","sources":["../../src/agent-chat/relative-time.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgBH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAc5D"}
@@ -1,4 +1,3 @@
1
- import { isDev } from "../common/is-dev.js";
2
1
  const RELATIVE_TIME_FORMAT = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
3
2
  const RELATIVE_TIME_UNITS = [
4
3
  { unit: "year", ms: 31536e6 },
@@ -10,7 +9,7 @@ const RELATIVE_TIME_UNITS = [
10
9
  ];
11
10
  function formatRelativeTime(timestamp) {
12
11
  if (!Number.isFinite(timestamp)) {
13
- if (isDev()) {
12
+ if (process.env.NODE_ENV !== "production") {
14
13
  console.warn(
15
14
  `[basalt] formatRelativeTime: non-finite timestamp ${String(timestamp)} \u2014 rendering empty string`
16
15
  );
@@ -1 +1 @@
1
- {"version":3,"file":"thread-message.d.ts","sourceRoot":"","sources":["../../src/agent-chat/thread-message.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,KAAK,EAEV,kBAAkB,EAClB,WAAW,EAEX,WAAW,EACX,YAAY,EACZ,aAAa,EAGb,YAAY,EAGZ,cAAc,EACf,MAAM,UAAU,CAAA;AAGjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAMlD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAI/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAmGtE;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,kBAAkB,CAM3D,CAAA;AAiPD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;CAAe,CAAA;AAqKrD;;;;;;;qGAOqG;AACrG,eAAO,MAAM,2BAA2B,IAAI,CAAA;AAE5C,KAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAA;CAC3B,CAAA;AAED,KAAK,0BAA0B,GAAG,WAAW,GAAG;IAC9C,QAAQ,CAAC,IAAI,EAAE,SAAS,aAAa,EAAE,CAAA;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC,CAAA;CACxE,CAAA;AAED;;;;;;;;;;GAUG;A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;IACzD,4FAA4F;IAC5F,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,cAAc,EAAE,CAAA;IAC9C,kFAAkF;IAClF,QAAQ,CAAC,UAAU,CAAC,EAAE,YAAY,CAAA;IAClC,kFAAkF;IAClF,QAAQ,CAAC,SAAS,CAAC,EAAE,aAAa,CAAA;IAClC;iGAC6F;IAC7F,QAAQ,CAAC,gBAAgB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAA;IACrD;;0CAEsC;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,CAAA;IACzC;;uBAEmB;IACnB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,GAAG,eAAe,CAAA;AA2C1E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CA6I1E"}
@@ -22,7 +22,6 @@ import { DEFAULT_AFFORDANCES } from "./message-affordances.js";
22
22
  import { formatRelativeTime } from "./relative-time.js";
23
23
  import { ToolChip } from "./tool-chip.js";
24
24
  import { resolveVirtualize } from "./virtualize.js";
25
- import { isDev } from "../common/is-dev.js";
26
25
  const MICRO_LABEL_STYLE = {
27
26
  fontFamily: "var(--basalt-font-mono)",
28
27
  fontSize: VX.text.micro,
@@ -67,7 +66,7 @@ const threadPartRenderers = {
67
66
  function UnknownPartChip({ part }) {
68
67
  return /* @__PURE__ */ jsx(Box, { style: RAIL_STYLE, children: /* @__PURE__ */ jsx(Text, { style: MICRO_LABEL_STYLE, children: `Unknown part: ${part.type}` }) });
69
68
  }
70
- const DEFAULT_FALLBACK_RENDERER = ({ part }) => isDev() ? /* @__PURE__ */ jsx(UnknownPartChip, { part }) : null;
69
+ const DEFAULT_FALLBACK_RENDERER = ({ part }) => process.env.NODE_ENV !== "production" ? /* @__PURE__ */ jsx(UnknownPartChip, { part }) : null;
71
70
  function resolveSegments(parts, renderers, fallbackRenderer) {
72
71
  const segments = [];
73
72
  let buffer = [];
@@ -1 +1 @@
1
- {"version":3,"file":"BandStrip.d.ts","sourceRoot":"","sources":["../../../src/charts/kinds/BandStrip.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEzD,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAIrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAK/D;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,WAAW,GAAG;IAC7C;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,CAAA;CACtC,CAAA;AAED,0FAA0F;AAC1F,MAAM,MAAM,QAAQ,GAAG;IACrB;;;;;;;;;OASG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE;QACP,iFAAiF;QACjF,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,uEAAuE;QACvE,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACF,CAAA;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,WAAW,GAAG;IAC5C,IAAI,EAAE,SAAS,CAAC,EAAE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OD,eAAO,MAAM,SAAS,EAAoB,OAAO,cAAc,CAAA"}
@@ -10,7 +10,6 @@ import { Crosshair } from "../primitives/Crosshair.js";
10
10
  import { HatchPattern, hatchFill, hatchSizeFor } from "../primitives/HatchPattern.js";
11
11
  import { fmtAxisDate } from "../utils/format.js";
12
12
  import { BandAxisOverlay, BandTooltip, clampFraction } from "./band-chrome.js";
13
- import { isDev } from "../../common/is-dev.js";
14
13
  const DEFAULT_MARKER_INSET = 6;
15
14
  const NO_READING = "\u2014";
16
15
  const UNKNOWN_MARK = {
@@ -93,7 +92,8 @@ function BandStripPlot(props) {
93
92
  const style = styleByKey.get(span.state);
94
93
  const x = i * step;
95
94
  if (style === void 0) {
96
- if (isDev()) throw unknownStateError("BandSpan.state", span.state, styleByKey.keys());
95
+ if (process.env.NODE_ENV !== "production")
96
+ throw unknownStateError("BandSpan.state", span.state, styleByKey.keys());
97
97
  out.push(
98
98
  /* @__PURE__ */ jsx(
99
99
  "rect",
@@ -117,7 +117,7 @@ function BandStripPlot(props) {
117
117
  const hatchWidth = bandWidth - measuredWidth;
118
118
  const markerKey = span.marker?.state ?? span.state;
119
119
  const markerColor = styleByKey.get(markerKey)?.color;
120
- if (span.marker !== void 0 && markerColor === void 0 && isDev()) {
120
+ if (span.marker !== void 0 && markerColor === void 0 && process.env.NODE_ENV !== "production") {
121
121
  throw unknownStateError("BandSpan.marker.state", markerKey, styleByKey.keys());
122
122
  }
123
123
  const inset = span.marker?.inset ?? DEFAULT_MARKER_INSET;
@@ -1 +1 @@
1
- {"version":3,"file":"Bars.d.ts","sourceRoot":"","sources":["../../../src/charts/kinds/Bars.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,OAAO,KAAK,EAAE,UAAU,EA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CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAEjC,iFAAiF;IACjF,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;IAE1C,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;wBAEoB;IACpB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,SAAS,MAAM,EAAE,CAAA;IAC1E,6DAA6D;IAC7D,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;IACjC;iDAC6C;IAC7C,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAA;IAC1B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IAEnC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;IAC3C,mFAAmF;IACnF,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC7B;4CACwC;IACxC,MAAM,CAAC,EAAE,iBAAiB,GAAG,KAAK,CAAA;IAClC,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gGAAgG;IAChG,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;4FACwF;IACxF,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,iBAAS,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,+BA2LxC;AAmPD,eAAO,MAAM,IAAI,EAAe,OAAO,SAAS,CAAA"}
@@ -6,7 +6,6 @@ import { VX } from "../../tokens/index.js";
6
6
  import { CartesianChart } from "../primitives/CartesianChart.js";
7
7
  import { curveFor, LINE_OVERLAY_STROKE_WIDTH } from "../series.js";
8
8
  import { padAutoLower } from "../utils/domain.js";
9
- import { isDev } from "../../common/is-dev.js";
10
9
  function BarsInner(props) {
11
10
  assertRequiredProps("Bars", props, ["data", "getX", "getValue", "positiveBars"]);
12
11
  const {
@@ -39,7 +38,7 @@ function BarsInner(props) {
39
38
  className,
40
39
  style
41
40
  } = props;
42
- if (isDev() && barLayout === "stacked" && y?.scale === "log") {
41
+ if (process.env.NODE_ENV !== "production" && barLayout === "stacked" && y?.scale === "log") {
43
42
  throw new Error(
44
43
  `Bars: stacked bars cannot use a log axis (y.scale: "log") \u2014 the stack sums bar heights, and a log axis has no additive zero to sum from. Use barLayout: 'grouped' instead.`
45
44
  );
@@ -1 +1 @@
1
- {"version":3,"file":"StackedArea.d.ts","sourceRoot":"","sources":["../../../src/charts/kinds/StackedArea.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,8BAA8B,CAAA;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAG/D,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,WAAW,GAAG;IAC9C,IAAI,EAAE,CAAC,EAAE,CAAA;IACT;kGAC8F;IAC9F,MAAM,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAA;IACvC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,CAAA;IACtB;4FACwF;IACxF,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAA;IACxB;;;;2EAIuE;IACvE,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,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EAAsB,OAAO,gBAAgB,CAAA"}
@@ -4,7 +4,6 @@ import { memo, useCallback, useMemo } from "react";
4
4
  import { assertRequiredProps } from "../../common/validate.js";
5
5
  import { CartesianChart } from "../primitives/CartesianChart.js";
6
6
  import { curveFor } from "../series.js";
7
- import { isDev } from "../../common/is-dev.js";
8
7
  function rowIsDense(d, bands) {
9
8
  return bands.every((s) => s.getValue(d) !== null);
10
9
  }
@@ -29,7 +28,7 @@ function StackedAreaInner(props) {
29
28
  className,
30
29
  style
31
30
  } = props;
32
- if (isDev() && y?.scale === "log") {
31
+ if (process.env.NODE_ENV !== "production" && y?.scale === "log") {
33
32
  throw new Error(
34
33
  'StackedArea: cannot use a log axis (y.scale: "log") \u2014 the stack sums band heights, and a log axis has no additive zero to sum from.'
35
34
  );
@@ -1 +1 @@
1
- {"version":3,"file":"legend-disclosure.d.ts","sourceRoot":"","sources":["../../../src/charts/primitives/legend-disclosure.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAwDrD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO;;;wBAQtB,iBAAiB;;;;;;;;;EAuD7C;AAED;wFACwF;AACxF,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,OAAO,CAAC,GAAG;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;CACpB,sCAoCA"}
1
+ {"version":3,"file":"legend-disclosure.d.ts","sourceRoot":"","sources":["../../../src/charts/primitives/legend-disclosure.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAyDrD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO;;;wBAQtB,iBAAiB;;;;;;;;;EAuD7C;AAED;wFACwF;AACxF,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,OAAO,CAAC,GAAG;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;CACpB,sCAoCA"}
@@ -1,5 +1,5 @@
1
1
  import type { GuardConfig } from '../guard/index.js';
2
- import type { BasaltConfig } from './index.js';
2
+ import type { BasaltConfig } from './config.js';
3
3
  /**
4
4
  * `check-theme --audit-allows` — list every active waiver and prove, per waiver, whether it still
5
5
  * suppresses anything.
@@ -1 +1 @@
1
- {"version":3,"file":"audit-allows.d.ts","sourceRoot":"","sources":["../../src/cli/audit-allows.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAW,WAAW,EAAa,MAAM,UAAU,CAAA;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,SAAS,CAAA;AAqJ5D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,YAAY,EACjB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,MAAM,EAAE,GAChB,MAAM,CAqLR"}
1
+ {"version":3,"file":"audit-allows.d.ts","sourceRoot":"","sources":["../../src/cli/audit-allows.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAW,WAAW,EAAa,MAAM,UAAU,CAAA;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,UAAU,CAAA;AAoJ7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,YAAY,EACjB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,MAAM,EAAE,GAChB,MAAM,CAsLR"}
@@ -7,7 +7,7 @@ import {
7
7
  neutralizeAllowAnnotation,
8
8
  unmatchedExemptPatterns
9
9
  } from "../guard/index.js";
10
- import { exemptRulePaths, exemptRuleReason, resolveRoots } from "./index.js";
10
+ import { exemptRulePaths, exemptRuleReason, resolveRoots } from "./config.js";
11
11
  function findingKey(f) {
12
12
  return `${f.relPath}:${f.line}:${f.kind}`;
13
13
  }
@@ -130,12 +130,12 @@ basalt-ui check-theme --audit-allows \u2014 ${cwd}
130
130
  waiverLines.push(`${label} suppresses ${[...new Set(revealed)].join(", ")}${suffix}`);
131
131
  continue;
132
132
  }
133
- if (site.pluginRules.length > 0 && site.guardKinds.length === 0) {
133
+ if (site.oxlintRules.length > 0) {
134
134
  pluginProbes.push({
135
135
  slot: waiverLines.length,
136
136
  rel,
137
137
  line: site.line,
138
- ids: site.pluginRules,
138
+ reach: site.bare ? "a bare annotation, waiving every oxlint plugin rule on its line" : `scoped to ${site.oxlintRules.join(", ")}, which oxlint judges`,
139
139
  site: label,
140
140
  suffix
141
141
  });
@@ -158,7 +158,7 @@ basalt-ui check-theme --audit-allows \u2014 ${cwd}
158
158
  const revealed = pluginVerdicts?.get(probe.slot);
159
159
  if (revealed === void 0) {
160
160
  outOfReach++;
161
- waiverLines[probe.slot] = `${probe.site} scoped to ${probe.ids.join(", ")} \u2014 an oxlint plugin rule, and oxlint could not be run here, so this audit cannot judge it${probe.suffix}`;
161
+ waiverLines[probe.slot] = `${probe.site} ${probe.reach} \u2014 and oxlint could not be run here, so this audit cannot judge it${probe.suffix}`;
162
162
  continue;
163
163
  }
164
164
  if (revealed.length > 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"check-theme.d.ts","sourceRoot":"","sources":["../../src/cli/check-theme.ts"],"names":[],"mappings":"AA+BA;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,aAAa,GAAE,MAAsB,EACrC,KAAK,GAAE,SAAS,MAAM,EAAO,GAC5B,MAAM,CAuKR"}
1
+ {"version":3,"file":"check-theme.d.ts","sourceRoot":"","sources":["../../src/cli/check-theme.ts"],"names":[],"mappings":"AA8BA;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,aAAa,GAAE,MAAsB,EACrC,KAAK,GAAE,SAAS,MAAM,EAAO,GAC5B,MAAM,CAuKR"}