basalt-ui 1.28.0 → 1.29.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 (455) hide show
  1. package/AGENTS.md +11 -18
  2. package/CHANGELOG.md +13 -0
  3. package/MIGRATING.md +151 -7
  4. package/README.md +23 -66
  5. package/agent/rules/basalt-batteries.md +59 -182
  6. package/agent/rules/basalt-charts.md +56 -75
  7. package/agent/rules/basalt-controls.md +38 -69
  8. package/agent/rules/basalt-mantine.md +58 -103
  9. package/agent/rules/basalt-state.md +42 -60
  10. package/agent/rules/basalt-tokens.md +46 -67
  11. package/agent/skills/basalt-app/SKILL.md +2 -0
  12. package/agent/templates/CLAUDE-block.md.tpl +14 -14
  13. package/configs/oxlint-plugin.js +70 -167
  14. package/configs/oxlint-plugin.test.ts +20 -186
  15. package/configs/oxlint.json +0 -1
  16. package/dist/agent/ai-sdk-transport.d.ts.map +1 -1
  17. package/dist/agent/ai-sdk-transport.js +7 -4
  18. package/dist/agent/coalesce.js +1 -1
  19. package/dist/agent/merge.js +1 -1
  20. package/dist/agent/transport.d.ts +13 -2
  21. package/dist/agent/transport.d.ts.map +1 -1
  22. package/dist/agent/use-agent-thread-runs.d.ts +12 -1
  23. package/dist/agent/use-agent-thread-runs.d.ts.map +1 -1
  24. package/dist/agent/use-agent-thread-runs.js +20 -6
  25. package/dist/agent-chat/index.d.ts +1 -1
  26. package/dist/agent-chat/index.d.ts.map +1 -1
  27. package/dist/agent-chat/relative-time.js +1 -1
  28. package/dist/agent-chat/thread-detail-panel.js +1 -1
  29. package/dist/agent-chat/thread-feed-row.d.ts +32 -7
  30. package/dist/agent-chat/thread-feed-row.d.ts.map +1 -1
  31. package/dist/agent-chat/thread-feed-row.js +121 -86
  32. package/dist/agent-chat/thread-feed.d.ts +11 -1
  33. package/dist/agent-chat/thread-feed.d.ts.map +1 -1
  34. package/dist/agent-chat/thread-feed.js +10 -6
  35. package/dist/agent-chat/thread-message.js +1 -1
  36. package/dist/agent-chat/virtualize.d.ts +39 -0
  37. package/dist/agent-chat/virtualize.d.ts.map +1 -1
  38. package/dist/agent-chat/virtualize.js +15 -0
  39. package/dist/charts/index.d.ts +3 -3
  40. package/dist/charts/index.d.ts.map +1 -1
  41. package/dist/charts/index.js +8 -4
  42. package/dist/charts/kinds/BandStrip.js +1 -1
  43. package/dist/charts/kinds/Bars.d.ts +1 -3
  44. package/dist/charts/kinds/Bars.d.ts.map +1 -1
  45. package/dist/charts/kinds/Bars.js +1 -1
  46. package/dist/charts/kinds/DualPanel.d.ts +3 -1
  47. package/dist/charts/kinds/DualPanel.d.ts.map +1 -1
  48. package/dist/charts/kinds/DualPanel.js +1 -1
  49. package/dist/charts/kinds/StackedArea.js +1 -1
  50. package/dist/charts/kinds/ZonedLine.d.ts +1 -3
  51. package/dist/charts/kinds/ZonedLine.d.ts.map +1 -1
  52. package/dist/charts/primitives/Axes.d.ts +21 -2
  53. package/dist/charts/primitives/Axes.d.ts.map +1 -1
  54. package/dist/charts/primitives/Axes.js +34 -2
  55. package/dist/charts/primitives/ChartCard.d.ts +20 -4
  56. package/dist/charts/primitives/ChartCard.d.ts.map +1 -1
  57. package/dist/charts/primitives/ChartCard.js +62 -33
  58. package/dist/charts/primitives/ChartFrame.d.ts.map +1 -1
  59. package/dist/charts/primitives/ChartFrame.js +8 -1
  60. package/dist/charts/primitives/ChartPending.d.ts +12 -6
  61. package/dist/charts/primitives/ChartPending.d.ts.map +1 -1
  62. package/dist/charts/primitives/ChartPending.js +1 -1
  63. package/dist/charts/utils/format.d.ts +5 -92
  64. package/dist/charts/utils/format.d.ts.map +1 -1
  65. package/dist/charts/utils/format.js +10 -80
  66. package/dist/cli/audit-allows.d.ts +24 -0
  67. package/dist/cli/audit-allows.d.ts.map +1 -0
  68. package/dist/cli/audit-allows.js +240 -0
  69. package/dist/cli/check-theme.d.ts +10 -0
  70. package/dist/cli/check-theme.d.ts.map +1 -0
  71. package/dist/cli/check-theme.js +139 -0
  72. package/dist/cli/doctor.d.ts +47 -0
  73. package/dist/cli/doctor.d.ts.map +1 -0
  74. package/dist/cli/doctor.js +197 -0
  75. package/dist/cli/guard-hook.d.ts +9 -0
  76. package/dist/cli/guard-hook.d.ts.map +1 -0
  77. package/dist/cli/guard-hook.js +93 -0
  78. package/dist/cli/help.d.ts +9 -0
  79. package/dist/cli/help.d.ts.map +1 -0
  80. package/dist/cli/help.js +53 -0
  81. package/dist/cli/index.d.ts +360 -270
  82. package/dist/cli/index.d.ts.map +1 -1
  83. package/dist/cli/index.js +85 -1901
  84. package/dist/cli/init.d.ts +4 -0
  85. package/dist/cli/init.d.ts.map +1 -0
  86. package/dist/cli/init.js +165 -0
  87. package/dist/cli/sync.d.ts +43 -0
  88. package/dist/cli/sync.d.ts.map +1 -0
  89. package/dist/cli/sync.js +206 -0
  90. package/dist/cli/tokens-css.d.ts +51 -0
  91. package/dist/cli/tokens-css.d.ts.map +1 -0
  92. package/dist/cli/tokens-css.js +165 -0
  93. package/dist/commands/define-commands.js +1 -1
  94. package/dist/commands/define-overlays.js +1 -1
  95. package/dist/commands/index.d.ts +2 -1
  96. package/dist/commands/index.d.ts.map +1 -1
  97. package/dist/commands/index.js +6 -0
  98. package/dist/commands/overlays-mount.d.ts +7 -9
  99. package/dist/commands/overlays-mount.d.ts.map +1 -1
  100. package/dist/commands/shell-bridge.d.ts +57 -0
  101. package/dist/commands/shell-bridge.d.ts.map +1 -0
  102. package/dist/commands/shell-bridge.js +32 -0
  103. package/dist/common/errors.d.ts +35 -0
  104. package/dist/common/errors.d.ts.map +1 -1
  105. package/dist/common/errors.js +29 -1
  106. package/dist/common/index.d.ts +2 -0
  107. package/dist/common/index.d.ts.map +1 -1
  108. package/dist/common/index.js +6 -0
  109. package/dist/common/is-dev.d.ts.map +1 -0
  110. package/dist/{motion/index.d.ts → common/motion.d.ts} +1 -1
  111. package/dist/common/motion.d.ts.map +1 -0
  112. package/dist/common/props.d.ts +1 -1
  113. package/dist/common/props.d.ts.map +1 -1
  114. package/dist/common/validate.js +1 -1
  115. package/dist/content/markdown.d.ts +3 -4
  116. package/dist/content/markdown.d.ts.map +1 -1
  117. package/dist/content/markdown.js +1 -4
  118. package/dist/controls/actions.d.ts +1 -1
  119. package/dist/controls/actions.d.ts.map +1 -1
  120. package/dist/controls/panel-row.js +1 -1
  121. package/dist/controls/range-filter.js +1 -1
  122. package/dist/dashboard/delta-badge.d.ts +18 -10
  123. package/dist/dashboard/delta-badge.d.ts.map +1 -1
  124. package/dist/dashboard/delta-badge.js +33 -1
  125. package/dist/dashboard/empty-state.d.ts +1 -4
  126. package/dist/dashboard/empty-state.d.ts.map +1 -1
  127. package/dist/dashboard/empty-state.js +1 -2
  128. package/dist/dashboard/index.d.ts +4 -2
  129. package/dist/dashboard/index.d.ts.map +1 -1
  130. package/dist/dashboard/index.js +7 -1
  131. package/dist/dashboard/query-state.d.ts +4 -13
  132. package/dist/dashboard/query-state.d.ts.map +1 -1
  133. package/dist/dashboard/query-state.js +4 -7
  134. package/dist/{section → dashboard}/section.d.ts +2 -2
  135. package/dist/{section → dashboard}/section.d.ts.map +1 -1
  136. package/dist/{section → dashboard}/section.js +2 -2
  137. package/dist/dashboard/settings-section.d.ts +1 -1
  138. package/dist/dashboard/settings-section.d.ts.map +1 -1
  139. package/dist/dashboard/settings-section.js +1 -1
  140. package/dist/dashboard/stat-card.d.ts +1 -1
  141. package/dist/dashboard/stat-card.d.ts.map +1 -1
  142. package/dist/dashboard/stat-card.js +1 -1
  143. package/dist/dashboard/widget-header.d.ts.map +1 -0
  144. package/dist/data/data-table.js +2 -2
  145. package/dist/data/table.d.ts +1 -1
  146. package/dist/data/table.d.ts.map +1 -1
  147. package/dist/data/table.js +2 -16
  148. package/dist/data/virtual.d.ts +3 -3
  149. package/dist/dev-dock.d.ts +28 -0
  150. package/dist/dev-dock.d.ts.map +1 -0
  151. package/dist/dev-dock.js +85 -0
  152. package/dist/format/date.d.ts +62 -0
  153. package/dist/format/date.d.ts.map +1 -0
  154. package/dist/format/date.js +106 -0
  155. package/dist/format/index.d.ts +39 -0
  156. package/dist/format/index.d.ts.map +1 -0
  157. package/dist/format/index.js +54 -0
  158. package/dist/format/measure.d.ts +15 -0
  159. package/dist/format/measure.d.ts.map +1 -0
  160. package/dist/format/measure.js +16 -0
  161. package/dist/format/number.d.ts +69 -0
  162. package/dist/format/number.d.ts.map +1 -0
  163. package/dist/format/number.js +62 -0
  164. package/dist/format/shared.d.ts +27 -0
  165. package/dist/format/shared.d.ts.map +1 -0
  166. package/dist/format/shared.js +29 -0
  167. package/dist/forms/field.d.ts +4 -20
  168. package/dist/forms/field.d.ts.map +1 -1
  169. package/dist/forms/field.js +0 -4
  170. package/dist/forms/form-layout.d.ts +1 -1
  171. package/dist/forms/form-layout.d.ts.map +1 -1
  172. package/dist/forms/form-layout.js +1 -1
  173. package/dist/forms/index.d.ts +1 -1
  174. package/dist/forms/index.d.ts.map +1 -1
  175. package/dist/forms/index.js +1 -2
  176. package/dist/forms/use-form-submit.js +1 -1
  177. package/dist/guard/index.d.ts +2 -9
  178. package/dist/guard/index.d.ts.map +1 -1
  179. package/dist/guard/index.js +16 -26
  180. package/dist/guard/types.d.ts +8 -10
  181. package/dist/guard/types.d.ts.map +1 -1
  182. package/dist/index.d.ts +16 -11
  183. package/dist/index.d.ts.map +1 -1
  184. package/dist/index.js +23 -29
  185. package/dist/notifications/index.d.ts +5 -5
  186. package/dist/notifications/index.d.ts.map +1 -1
  187. package/dist/notifications/index.js +0 -2
  188. package/dist/notifications/mount-guard.d.ts.map +1 -1
  189. package/dist/notifications/mount-guard.js +2 -2
  190. package/dist/provider/connectivity-indicator.d.ts.map +1 -0
  191. package/dist/{connectivity → provider}/connectivity-provider.d.ts +1 -1
  192. package/dist/provider/connectivity-provider.d.ts.map +1 -0
  193. package/dist/{connectivity/types.d.ts → provider/connectivity-types.d.ts} +1 -1
  194. package/dist/provider/connectivity-types.d.ts.map +1 -0
  195. package/dist/provider/error-fallback.module.css +21 -0
  196. package/dist/provider/error-fallback.module.css.d.ts +9 -0
  197. package/dist/provider/index.d.ts +20 -36
  198. package/dist/provider/index.d.ts.map +1 -1
  199. package/dist/provider/index.js +42 -32
  200. package/dist/provider/lab-theme.js +1 -1
  201. package/dist/provider/use-connectivity.d.ts +3 -0
  202. package/dist/provider/use-connectivity.d.ts.map +1 -0
  203. package/dist/query-client.d.ts +63 -0
  204. package/dist/query-client.d.ts.map +1 -0
  205. package/dist/query-client.js +33 -0
  206. package/dist/{query/devtools.d.ts → query-devtools.d.ts} +2 -2
  207. package/dist/query-devtools.d.ts.map +1 -0
  208. package/dist/register.d.ts +17 -3
  209. package/dist/register.d.ts.map +1 -1
  210. package/dist/router-tanstack/index.d.ts +4 -7
  211. package/dist/router-tanstack/index.d.ts.map +1 -1
  212. package/dist/router-tanstack/index.js +1 -9
  213. package/dist/router-tanstack/nav.d.ts +1 -1
  214. package/dist/router-tanstack/nav.d.ts.map +1 -1
  215. package/dist/router-tanstack/search-store.d.ts +3 -6
  216. package/dist/router-tanstack/search-store.d.ts.map +1 -1
  217. package/dist/router-tanstack/use-nav.d.ts +1 -1
  218. package/dist/router-tanstack/use-nav.d.ts.map +1 -1
  219. package/dist/shell/app-breadcrumbs.d.ts +1 -1
  220. package/dist/shell/app-breadcrumbs.d.ts.map +1 -1
  221. package/dist/shell/app-main.module.css +11 -0
  222. package/dist/shell/app-mobile-nav.d.ts +1 -1
  223. package/dist/shell/app-mobile-nav.d.ts.map +1 -1
  224. package/dist/shell/app-mobile-nav.js +24 -2
  225. package/dist/shell/app-sidebar.d.ts +1 -1
  226. package/dist/shell/app-sidebar.d.ts.map +1 -1
  227. package/dist/shell/app-sidebar.js +31 -2
  228. package/dist/shell/app-sidebar.module.css +10 -0
  229. package/dist/shell/index.d.ts +10 -4
  230. package/dist/shell/index.d.ts.map +1 -1
  231. package/dist/shell/index.js +13 -17
  232. package/dist/shell/mobile-nav-model.d.ts +1 -1
  233. package/dist/shell/mobile-nav-model.d.ts.map +1 -1
  234. package/dist/{nav/types.d.ts → shell/nav-types.d.ts} +1 -1
  235. package/dist/shell/nav-types.d.ts.map +1 -0
  236. package/dist/shell/page-aside.d.ts.map +1 -1
  237. package/dist/shell/page-aside.js +2 -29
  238. package/dist/shell/page-title.d.ts +14 -0
  239. package/dist/shell/page-title.d.ts.map +1 -0
  240. package/dist/shell/page-title.js +25 -0
  241. package/dist/shell/page-title.module.css +33 -0
  242. package/dist/shell/page-title.module.css.d.ts +11 -0
  243. package/dist/shell/sidebar-block-model.d.ts +1 -1
  244. package/dist/shell/sidebar-block-model.d.ts.map +1 -1
  245. package/dist/shell/sidebar-blocks.d.ts +1 -1
  246. package/dist/shell/sidebar-blocks.d.ts.map +1 -1
  247. package/dist/shell/use-breakpoint.d.ts +11 -0
  248. package/dist/shell/use-breakpoint.d.ts.map +1 -0
  249. package/dist/shell/use-breakpoint.js +33 -0
  250. package/dist/state/fields.d.ts +3 -19
  251. package/dist/state/fields.d.ts.map +1 -1
  252. package/dist/state/fields.js +6 -16
  253. package/dist/styles.css +36 -0
  254. package/dist/surfaces.d.ts +18 -41
  255. package/dist/surfaces.d.ts.map +1 -1
  256. package/dist/surfaces.js +46 -59
  257. package/dist/theme/index.d.ts.map +1 -1
  258. package/dist/{theme-toggle/index.d.ts → theme/theme-toggle.d.ts} +1 -1
  259. package/dist/theme/theme-toggle.d.ts.map +1 -0
  260. package/dist/{theme-toggle/index.js → theme/theme-toggle.js} +1 -1
  261. package/dist/tokens/index.d.ts +1 -0
  262. package/dist/tokens/index.d.ts.map +1 -1
  263. package/dist/tokens/index.js +10 -0
  264. package/dist/tokens/palette.d.ts +12 -0
  265. package/dist/tokens/palette.d.ts.map +1 -1
  266. package/dist/tokens/palette.js +13 -1
  267. package/dist/tokens.css +1 -0
  268. package/llms.txt +9 -24
  269. package/package.json +12 -16
  270. package/src/agent/ai-sdk-transport.ts +11 -4
  271. package/src/agent/coalesce.ts +1 -1
  272. package/src/agent/merge.ts +1 -1
  273. package/src/agent/transport.ts +15 -2
  274. package/src/agent/use-agent-thread-runs.ts +65 -15
  275. package/src/agent-chat/index.ts +6 -4
  276. package/src/agent-chat/relative-time.ts +1 -1
  277. package/src/agent-chat/thread-detail-panel.tsx +1 -1
  278. package/src/agent-chat/thread-feed-row.tsx +105 -30
  279. package/src/agent-chat/thread-feed.tsx +51 -25
  280. package/src/agent-chat/thread-message.tsx +1 -1
  281. package/src/agent-chat/virtualize.ts +48 -0
  282. package/src/charts/index.ts +7 -10
  283. package/src/charts/kinds/BandStrip.tsx +1 -1
  284. package/src/charts/kinds/Bars.tsx +2 -5
  285. package/src/charts/kinds/DualPanel.tsx +4 -3
  286. package/src/charts/kinds/StackedArea.tsx +1 -1
  287. package/src/charts/kinds/ZonedLine.tsx +1 -4
  288. package/src/charts/primitives/Axes.tsx +49 -0
  289. package/src/charts/primitives/ChartCard.tsx +49 -6
  290. package/src/charts/primitives/ChartFrame.tsx +5 -1
  291. package/src/charts/primitives/ChartPending.tsx +14 -8
  292. package/src/charts/utils/format.ts +17 -186
  293. package/src/cli/audit-allows.ts +371 -0
  294. package/src/cli/check-theme.ts +197 -0
  295. package/src/cli/doctor.ts +331 -0
  296. package/src/cli/guard-hook.ts +115 -0
  297. package/src/cli/help.ts +101 -0
  298. package/src/cli/index.ts +269 -3439
  299. package/src/cli/init.ts +247 -0
  300. package/src/cli/sync.ts +324 -0
  301. package/src/cli/tokens-css.ts +252 -0
  302. package/src/commands/define-commands.ts +1 -1
  303. package/src/commands/define-overlays.ts +1 -1
  304. package/src/commands/index.ts +10 -1
  305. package/src/commands/overlays-mount.tsx +8 -10
  306. package/src/commands/shell-bridge.ts +86 -0
  307. package/src/common/errors.ts +70 -0
  308. package/src/common/index.ts +2 -0
  309. package/src/common/props.ts +1 -1
  310. package/src/common/validate.ts +1 -1
  311. package/src/content/markdown.tsx +4 -8
  312. package/src/controls/actions.tsx +1 -1
  313. package/src/controls/panel-row.tsx +1 -1
  314. package/src/controls/range-filter.tsx +1 -1
  315. package/src/dashboard/delta-badge.tsx +74 -7
  316. package/src/dashboard/empty-state.tsx +2 -6
  317. package/src/dashboard/index.ts +11 -2
  318. package/src/dashboard/query-state.tsx +5 -18
  319. package/src/{section → dashboard}/section.tsx +4 -4
  320. package/src/dashboard/settings-section.tsx +2 -2
  321. package/src/dashboard/stat-card.tsx +2 -2
  322. package/src/data/data-table.tsx +3 -3
  323. package/src/data/table.ts +6 -25
  324. package/src/data/virtual-list.tsx +1 -1
  325. package/src/data/virtual.ts +3 -3
  326. package/src/dev-dock.tsx +159 -0
  327. package/src/format/date.ts +184 -0
  328. package/src/format/index.ts +69 -0
  329. package/src/format/measure.ts +31 -0
  330. package/src/format/number.ts +129 -0
  331. package/src/format/shared.ts +63 -0
  332. package/src/forms/field.ts +4 -24
  333. package/src/forms/form-layout.tsx +2 -2
  334. package/src/forms/index.ts +1 -2
  335. package/src/forms/use-form-submit.ts +1 -1
  336. package/src/guard/index.ts +30 -56
  337. package/src/guard/types.ts +7 -10
  338. package/src/index.ts +38 -29
  339. package/src/notifications/index.ts +5 -7
  340. package/src/notifications/mount-guard.ts +7 -9
  341. package/src/{connectivity → provider}/connectivity-indicator.tsx +1 -1
  342. package/src/{connectivity → provider}/connectivity-provider.tsx +1 -1
  343. package/src/provider/error-fallback.module.css +21 -0
  344. package/src/provider/error-fallback.module.css.d.ts +9 -0
  345. package/src/provider/index.tsx +71 -71
  346. package/src/provider/lab-theme.ts +1 -1
  347. package/src/{connectivity → provider}/use-connectivity.ts +3 -3
  348. package/src/query-client.ts +100 -0
  349. package/src/{query/devtools.tsx → query-devtools.tsx} +5 -4
  350. package/src/register.ts +20 -4
  351. package/src/router-tanstack/index.ts +4 -15
  352. package/src/router-tanstack/nav.ts +1 -1
  353. package/src/router-tanstack/search-store.ts +3 -4
  354. package/src/router-tanstack/use-nav.ts +1 -1
  355. package/src/shell/app-breadcrumbs.tsx +1 -1
  356. package/src/shell/app-main.module.css +11 -0
  357. package/src/shell/app-mobile-nav.tsx +28 -1
  358. package/src/shell/app-sidebar.module.css +10 -0
  359. package/src/shell/app-sidebar.tsx +31 -2
  360. package/src/shell/index.tsx +23 -28
  361. package/src/shell/mobile-nav-model.ts +1 -1
  362. package/src/shell/page-aside.tsx +2 -52
  363. package/src/shell/page-title.module.css +33 -0
  364. package/src/shell/page-title.module.css.d.ts +11 -0
  365. package/src/shell/page-title.tsx +57 -0
  366. package/src/shell/sidebar-block-model.ts +1 -1
  367. package/src/shell/sidebar-blocks.tsx +1 -1
  368. package/src/shell/use-breakpoint.ts +73 -0
  369. package/src/state/fields.ts +7 -43
  370. package/src/styles.css +36 -0
  371. package/src/surfaces.ts +45 -60
  372. package/src/theme/index.ts +7 -0
  373. package/src/{theme-toggle/index.tsx → theme/theme-toggle.tsx} +1 -1
  374. package/src/tokens/index.ts +10 -0
  375. package/src/tokens/palette.ts +12 -0
  376. package/dist/connectivity/connectivity-indicator.d.ts.map +0 -1
  377. package/dist/connectivity/connectivity-provider.d.ts.map +0 -1
  378. package/dist/connectivity/index.d.ts +0 -14
  379. package/dist/connectivity/index.d.ts.map +0 -1
  380. package/dist/connectivity/index.js +0 -8
  381. package/dist/connectivity/types.d.ts.map +0 -1
  382. package/dist/connectivity/use-connectivity.d.ts +0 -3
  383. package/dist/connectivity/use-connectivity.d.ts.map +0 -1
  384. package/dist/data/index.d.ts +0 -38
  385. package/dist/data/index.d.ts.map +0 -1
  386. package/dist/data/index.js +0 -24
  387. package/dist/motion/index.d.ts.map +0 -1
  388. package/dist/nav/types.d.ts.map +0 -1
  389. package/dist/notifications/overlay.d.ts +0 -20
  390. package/dist/notifications/overlay.d.ts.map +0 -1
  391. package/dist/notifications/overlay.js +0 -14
  392. package/dist/query/devtools.d.ts.map +0 -1
  393. package/dist/query/error-message.d.ts +0 -41
  394. package/dist/query/error-message.d.ts.map +0 -1
  395. package/dist/query/error-message.js +0 -30
  396. package/dist/query/index.d.ts +0 -47
  397. package/dist/query/index.d.ts.map +0 -1
  398. package/dist/query/index.js +0 -56
  399. package/dist/router-tanstack/field.d.ts +0 -14
  400. package/dist/router-tanstack/field.d.ts.map +0 -1
  401. package/dist/router-tanstack/field.js +0 -4
  402. package/dist/router-tanstack/multi-search-param-store.d.ts +0 -43
  403. package/dist/router-tanstack/multi-search-param-store.d.ts.map +0 -1
  404. package/dist/router-tanstack/multi-search-param-store.js +0 -30
  405. package/dist/router-tanstack/search-param-store.d.ts +0 -42
  406. package/dist/router-tanstack/search-param-store.d.ts.map +0 -1
  407. package/dist/router-tanstack/search-param-store.js +0 -25
  408. package/dist/section/index.d.ts +0 -2
  409. package/dist/section/index.d.ts.map +0 -1
  410. package/dist/section/index.js +0 -4
  411. package/dist/theme-toggle/index.d.ts.map +0 -1
  412. package/dist/utils/is-dev.d.ts.map +0 -1
  413. package/dist/widget-header/delta-badge.d.ts +0 -19
  414. package/dist/widget-header/delta-badge.d.ts.map +0 -1
  415. package/dist/widget-header/delta-badge.js +0 -36
  416. package/dist/widget-header/index.d.ts +0 -3
  417. package/dist/widget-header/index.d.ts.map +0 -1
  418. package/dist/widget-header/index.js +0 -8
  419. package/dist/widget-header/widget-header.d.ts.map +0 -1
  420. package/src/connectivity/index.ts +0 -19
  421. package/src/data/index.ts +0 -69
  422. package/src/notifications/overlay.tsx +0 -66
  423. package/src/query/error-message.ts +0 -70
  424. package/src/query/index.ts +0 -97
  425. package/src/router-tanstack/field.ts +0 -36
  426. package/src/router-tanstack/multi-search-param-store.ts +0 -106
  427. package/src/router-tanstack/search-param-store.ts +0 -100
  428. package/src/section/index.ts +0 -1
  429. package/src/widget-header/delta-badge.tsx +0 -77
  430. package/src/widget-header/index.ts +0 -10
  431. /package/dist/{utils → common}/is-dev.d.ts +0 -0
  432. /package/dist/{utils → common}/is-dev.js +0 -0
  433. /package/dist/{motion/index.js → common/motion.js} +0 -0
  434. /package/dist/{section → dashboard}/section.module.css +0 -0
  435. /package/dist/{section → dashboard}/section.module.css.d.ts +0 -0
  436. /package/dist/{widget-header → dashboard}/widget-header.d.ts +0 -0
  437. /package/dist/{widget-header → dashboard}/widget-header.js +0 -0
  438. /package/dist/{widget-header → dashboard}/widget-header.module.css +0 -0
  439. /package/dist/{widget-header → dashboard}/widget-header.module.css.d.ts +0 -0
  440. /package/dist/{connectivity → provider}/connectivity-indicator.d.ts +0 -0
  441. /package/dist/{connectivity → provider}/connectivity-indicator.js +0 -0
  442. /package/dist/{connectivity → provider}/connectivity-provider.js +0 -0
  443. /package/dist/{connectivity/types.js → provider/connectivity-types.js} +0 -0
  444. /package/dist/{connectivity → provider}/use-connectivity.js +0 -0
  445. /package/dist/{query/devtools.js → query-devtools.js} +0 -0
  446. /package/dist/{nav/types.js → shell/nav-types.js} +0 -0
  447. /package/src/{utils → common}/is-dev.ts +0 -0
  448. /package/src/{motion/index.ts → common/motion.ts} +0 -0
  449. /package/src/{section → dashboard}/section.module.css +0 -0
  450. /package/src/{section → dashboard}/section.module.css.d.ts +0 -0
  451. /package/src/{widget-header → dashboard}/widget-header.module.css +0 -0
  452. /package/src/{widget-header → dashboard}/widget-header.module.css.d.ts +0 -0
  453. /package/src/{widget-header → dashboard}/widget-header.tsx +0 -0
  454. /package/src/{connectivity/types.ts → provider/connectivity-types.ts} +0 -0
  455. /package/src/{nav/types.ts → shell/nav-types.ts} +0 -0
@@ -8,7 +8,7 @@ paths:
8
8
  ---
9
9
 
10
10
  <!-- basalt:coverage -->
11
- <!-- GENERATED from src/surfaces.ts — `basalt-ui check-coverage --write`. Do not hand-edit. -->
11
+ <!-- GENERATED from src/surfaces.ts — `bun scripts/check-coverage.ts --write`. Do not hand-edit. -->
12
12
  <!-- backed by: guard kinds — css-raw-surface, inline-font-size, off-identity-accent, off-system-surface-var, raw-color-fn, raw-font-family, raw-hex, raw-radius, raw-surface, surface-shadow-override, theme-allow-unscoped · oxlint rules — basalt/no-raw-font-size, basalt/raw-size-literal, basalt/token-layer-boundary -->
13
13
  <!-- not guarded: — -->
14
14
  <!-- /basalt:coverage -->
@@ -32,10 +32,9 @@ The accent is **split by ROLE**, and this is the one thing an author gets wrong:
32
32
  control always reads white on either page. **Never fill with `VX.accent`.**
33
33
 
34
34
  **The palette is DERIVED, not authored** (`tokens/derive.ts` from one seed + five bounded knobs), and
35
- a consumer retunes it through `createBasaltTheme(overrides?, { derive, fonts, radius, density })`.
36
- That is why no hex, no shade index and no pixel constant belongs in a rule, a doc or a component:
37
- every one of them is an output of a config the consumer may move. Read the values off `VX.*` and the
38
- theme; read the numbers, when you genuinely need them, off `tokens/palette.ts`.
35
+ a consumer retunes it through `createBasaltTheme(overrides?, { derive, fonts, radius, density })` —
36
+ no hex, shade index or pixel constant belongs in a rule, doc or component. Read values off `VX.*`
37
+ and the theme; read raw numbers, if you need them, off `tokens/palette.ts`.
39
38
 
40
39
  ## Color — never a raw literal
41
40
 
@@ -44,28 +43,26 @@ theme; read the numbers, when you genuinely need them, off `tokens/palette.ts`.
44
43
  in non-component files) or through the Mantine theme (`color` / `c` / `bg`, `theme.colors`).
45
44
  - **Opacity is `alpha(token, a)`** (`color-mix`), never `rgba()` — so the hue keeps resolving per
46
45
  scheme.
47
- - **No off-identity Mantine accents.** `teal`/`violet`/`grape`/`indigo`/`pink` still render
48
- on-palette (the theme reskins every family), and are rejected anyway because they signal
49
- off-identity intent. Allowed: **`blue`** (the one earned hue), **`gray`**, and the status names
50
- `red`/`green`/`orange`/`yellow`. A positive delta is `color="green"`, never `teal`.
51
- - **Never pin a shade index** — `c="yellow.7"`, `bg="blue.4"`, `var(--mantine-color-red-6)` each name
52
- one fixed swatch that is identical in both schemes, so the shade that is legible on dark is the one
53
- that fails on light. Use `VX.status.*` for a verdict, or the bare hue name and let the theme pick.
46
+ - **No off-identity Mantine accents** — allowed: **`blue`** (the earned hue), **`gray`**, and the
47
+ status names `red`/`green`/`orange`/`yellow`. A positive delta is `color="green"`, never `teal`.
48
+ - **Never pin a shade index** (`c="yellow.7"`, `var(--mantine-color-red-6)`) — one fixed swatch is
49
+ identical in both schemes, so what's legible on dark fails on light. Use `VX.status.*` or the
50
+ bare hue name.
54
51
  - **"Ink earns its color."** Default to neutral. A hue is justified by trend, signal/status, or
55
52
  genuine multi-series separation. The accent lands on the single primary CTA per view, focus rings,
56
53
  links and small status pops — never on borders, large fills, routine icons or secondary buttons.
57
54
  - **Categorical/series color is consumer data**, declared once through `defineSeries` →
58
- `seriesTokens`/`groupTokens` and wired into `buildPaletteCss`, never a Mantine accent prop and
59
- never an inline pair. `groupTokens(GROUP, MAP)` assumes the same map reaches
60
- `BasaltProvider`'s `paletteOptions.groups` under the key `` `${GROUP}-` `` — **with the trailing
61
- dash**, which is a CSS-var prefix and not a group name. Derive both from one `GROUP` constant;
62
- a mismatch emits refs to variables the stylesheet never declares, with no tsc error and no
63
- runtime throw — just unstyled charts.
55
+ `seriesTokens`/`groupTokens` and wired into `buildPaletteCss`, never a Mantine accent prop.
56
+ `groupTokens(GROUP, MAP)` assumes the map reaches `BasaltProvider`'s `paletteOptions.groups`
57
+ under the key `` `${GROUP}-` `` — **with the trailing dash**. Derive both from one `GROUP`
58
+ constant; a mismatch emits refs to variables the stylesheet never declares, silently.
64
59
 
65
60
  ## Surfaces — one collapsed token set
66
61
 
67
62
  `VX.surface` is exactly: `bg` · `panel` · `panelHover` · `elevated` · `subtle` · `overlay` ·
68
- `field` · `border` · `hairline`. Plus `VX.divider` — NOT a surface, the ONE seam/line token (every `AppShell` region edge + between-rows rule, ink-/white-alpha, holds under the derive knobs); `hairline` is the card ring, `border` the control/overlay line — neither is ever a seam.
63
+ `field` · `border` · `hairline`. `VX.divider` is NOT a surface — the one seam/line token (every
64
+ `AppShell` region edge + between-rows rule); `hairline` is the card ring, `border` the
65
+ control/overlay line — neither is ever a seam.
69
66
 
70
67
  The theme **collapses Mantine's raw ramp steps onto those tokens** (`cssVariablesResolver` + theme
71
68
  `styles`), so every Mantine component — AppShell, Table, Input, Divider, Tabs, Popover, Accordion,
@@ -79,13 +76,12 @@ and never reach for a raw ramp-step var (`var(--mantine-color-gray-N)`).
79
76
  the integer that happens to equal `md` today; `radius="sm"`, never a numeric radius.
80
77
  - **Card radius has one source**, `VX.radiusCard` / `--vx-radius-card`: the Mantine chrome and the
81
78
  Mantine-free `ChartCard` resolve to the same token. Cards must never diverge.
82
- - **Sub-scale micro-spacing is legitimate and allowed raw** — a tight cluster below the scale's
83
- first step has no token, so use the raw number rather than inventing a micro-token or peppering
84
- `theme-allow`. The same permission holds in CSS modules: a declaration whose every literal is
85
- micro does not fire. One non-micro value makes the whole declaration a finding, and an inline
86
- style OBJECT in TSX still fires, because there the Mantine prop existed.
87
- - **Dense by default** — the framework targets compact surfaces; reach for the tighter step.
88
- - **Icons size through the icon's own `size` prop**, which is not spacing.
79
+ - **Sub-scale micro-spacing is legitimate and allowed raw** — below the scale's first step, use the
80
+ raw number rather than inventing a micro-token. A CSS-module declaration whose every literal is
81
+ micro does not fire; one non-micro value makes it a finding, and an inline style OBJECT in TSX
82
+ still fires (there the Mantine prop existed).
83
+ - **Dense by default** — reach for the tighter step. Icons size through their own `size` prop,
84
+ which is not spacing.
89
85
 
90
86
  ## Type
91
87
 
@@ -113,48 +109,31 @@ An id is a guard kind (`raw-surface`, `inline-spacing`, …) or an oxlint plugin
113
109
  <Widget style={{ borderRadius: 3 }} />
114
110
  ```
115
111
 
116
- - **An annotation must START its comment** — after `//`, `/*`, `<!--`, a block gutter `*`, or
117
- nothing but whitespace. Prose that merely MENTIONS the token waives nothing; a file documenting
118
- its own waivers used to disarm itself.
119
- - **File scope is spelled, never inferred**: `theme-allow-file <id>… — <why>`, anywhere in the file.
120
- A bare `theme-allow-file` waives nothing at all.
121
- - **A typo waives nothing.** A word in the id slot naming no rule is recorded as unknown; the
122
- annotation still covers the ids it got right. Because the id slot is read strictly, a bare reason
123
- needs a separator — `theme-allow: <why>` or `theme-allow <id> — <why>`, never `theme-allow <why>`.
124
- - **Three placements work, and both engines agree on all three**: the reported line, a comment-ONLY
125
- line directly above it (reaching the first CODE line below, through the rest of its comment
126
- block), and in CSS a trailing annotation reaching back over the declaration it terminates. A blank
127
- line ends the reach — that is how you say "this comment is not about the next statement".
128
- - **JSON and `.webmanifest` take a member key**, since they cannot hold a comment. For a manifest
129
- the first remedy is `basaltAppPlugin`, not a waiver: a hand-copied hex drifts from the palette.
130
- - **The three import-boundary rules honour no escape at all** (`visx-boundary`, `visx-tooltip`,
131
- `token-layer-boundary`) — an architecture boundary a stray comment can switch off is the bypass
132
- they exist to prevent. The agent-chat guards honour `basalt-agent-allow`, a separate token that
133
- never waives a `theme-allow` finding, or the reverse.
134
-
135
- Unsupported shapes are asserted as unsupported in both engines' test grids (`src/guard/
136
- check-source.test.ts`, `configs/oxlint-plugin.test.ts`), so "unsupported" and "silently broken"
137
- cannot read the same. **Audit them**: `basalt-ui check-theme --audit-allows` re-runs the scan with each waiver
138
- neutralized, one at a time, and **exits 1 on a waiver that suppresses nothing** — a dead waiver
139
- silently covers the next real finding on that line. It judges plugin-rule waivers too, by re-running
140
- oxlint; where oxlint is unreachable the verdict is "cannot judge", never "dead". Its scope line is
141
- part of the report: `0 dead` is not `0 dead anywhere`.
112
+ - **An annotation must START its comment** (`//`, `/*`, `<!--`, a `*` gutter, or bare whitespace) —
113
+ a mention mid-prose waives nothing.
114
+ - **File scope is spelled, never inferred**: `theme-allow-file <id>… — <why>`, anywhere in the
115
+ file; a bare one waives nothing.
116
+ - **A typo waives nothing** — an unrecognized id is recorded unknown, the rest of the annotation
117
+ still covers the ids it got right.
118
+ - **Three placements agree in both engines**: the reported line, a comment-only line directly
119
+ above it, and (CSS) a trailing annotation reaching back over the declaration it terminates. A
120
+ blank line ends the reach.
121
+ - **JSON/`.webmanifest` take a member key** — first remedy is `basaltAppPlugin`, not a waiver.
122
+ - **The three import-boundary rules honour no escape at all**; the agent-chat guards honour
123
+ `basalt-agent-allow`, a separate token that never waives a `theme-allow` finding, or the reverse.
124
+
125
+ **Audit them**: `basalt-ui check-theme --audit-allows` re-runs the scan with each waiver
126
+ neutralized and **exits 1 on a waiver that suppresses nothing**; it judges plugin-rule waivers too
127
+ by re-running oxlint. Scope is part of the report — `0 dead` is not `0 dead anywhere`.
142
128
 
143
129
  ## Wiring the guard
144
130
 
145
131
  `check-theme` reads `package.json`'s `"basalt"` key (`roots`, `exempt`, `include`, `profile`,
146
- `severity`, `exemptRules`, …). **`roots` is not optional in practice** — omitted, it falls back to
147
- `src` relative to cwd, which is zero files for anything under `apps/*/src`; `init` writes a real one
148
- and `doctor`'s `guard-scan` fails when it resolves to nothing. The scan also reaches each root's
149
- PARENT for its `index.html` and `public/` tree, because that is where a `theme-color` meta and a
150
- webmanifest's `background_color` live. Wire it as `oxlint . && basalt-ui check-theme` — what `init`
151
- seeds as `lint:basalt`.
152
-
153
- **When it fires, fix the source** — the right token first. `theme-allow` is for a documented
154
- exception; a palette-definition file belongs in `exempt`, not behind a comment.
155
-
156
- **The guard sees palette, not vocabulary.** A fork written by a token-fluent author uses exactly the
157
- right tokens, so no palette guard can see it — `basalt/shadow-basalt-export` catches an exact name
158
- collision and nothing else, and renaming the fork is what a fork's author does anyway. It is a
159
- tripwire, not coverage. The habit is the control: **check whether basalt already ships the thing
160
- before building it.**
132
+ `severity`, `exemptRules`). **`roots` is not optional in practice** — omitted, it falls back to
133
+ `src` relative to cwd (zero files under `apps/*/src`); `init` writes a real one. Wire it as
134
+ `oxlint . && basalt-ui check-theme` — what `init` seeds as `lint:basalt`.
135
+
136
+ **When it fires, fix the source** — the right token first; a palette-definition file belongs in
137
+ `exempt`, not behind a comment. **The guard sees palette, not vocabulary** — a token-fluent fork
138
+ uses exactly the right tokens, so `basalt/shadow-basalt-export` (an exact name collision) is a
139
+ tripwire, not coverage. Check whether basalt already ships the thing before building it.
@@ -36,6 +36,8 @@ own `.oxlintrc.json` costs.
36
36
  ```tsx
37
37
  // main.tsx — CSS order is load-bearing: every @mantine/*/styles.layer.css, THEN basalt's
38
38
  import '@mantine/core/styles.layer.css'
39
+ import '@mantine/notifications/styles.layer.css' // one per MOUNTED battery: notifications, spotlight…
40
+ import '@mantine/spotlight/styles.layer.css'
39
41
  import 'basalt-ui/styles.css'
40
42
  import { BasaltProvider, createBasaltTheme } from 'basalt-ui'
41
43
  import { BasaltOverlays } from 'basalt-ui/commands'
@@ -2,32 +2,29 @@
2
2
 
3
3
  ## basalt-ui (managed — do not hand-edit)
4
4
 
5
- Placed by `bunx basalt-ui init` and refreshed by `basalt-ui sync` after every upgrade
6
- (`sync --check` gates drift in CI). Framework-owned: edit `DESIGN.md` or your own files instead —
7
- changes here are overwritten on the next sync.
5
+ Placed by `bunx basalt-ui init`, refreshed by `basalt-ui sync` (`sync --check` gates drift in CI).
6
+ Framework-owned: edit `DESIGN.md` or your own files — this block is overwritten on the next sync.
8
7
 
9
- **Stack:** React 19 + Mantine v9, themed by `basalt-ui` (`BasaltProvider` + `createBasaltTheme`), Bun
10
- runtime, oxlint + oxfmt (no ESLint/Biome/Prettier), no Tailwind. Color comes from the three-tier
11
- `--vx-*` token system — read `VX.*` or a series token, never a raw hex/`rgb()`/`hsl()`. Charts are
12
- visx via `basalt-ui/charts`. `basalt-ui check-theme` plus the `basalt/*` oxlint rules are the teeth.
8
+ **Stack:** React 19 + Mantine v9 themed by `basalt-ui` (`BasaltProvider` + `createBasaltTheme`), Bun,
9
+ oxlint + oxfmt (no ESLint/Biome/Prettier), no Tailwind. Color is the three-tier `--vx-*` token system —
10
+ `VX.*` or a series token, never a raw hex. Charts are visx via `basalt-ui/charts`; `check-theme` + the
11
+ `basalt/*` oxlint rules are the teeth.
13
12
 
14
13
  **Precedence — the only statement of it.** Highest wins; a lower layer fills gaps and never
15
14
  overrides a higher one:
16
15
 
17
16
  > consumer `DESIGN.md` (app deltas) > the six shipped `basalt-*` rules > the `basalt-*` skills
18
17
 
19
- **All six rules are law** — `basalt-tokens`, `basalt-mantine`, `basalt-charts`, `basalt-state`,
20
- `basalt-controls`, `basalt-batteries` in `.claude/rules/`, each carrying a generated
21
- `<!-- basalt:coverage -->` header naming what enforces it and what is only advisory. The skills
22
- (`/basalt-app`, `/basalt-design`, `/basalt-charts`) are the METHOD that obeys them, never law.
18
+ **All six rules are law** — `basalt-{tokens,mantine,charts,state,controls,batteries}` in
19
+ `.claude/rules/`, each with a generated `<!-- basalt:coverage -->` header naming what enforces it and
20
+ what is only advisory. The skills (`/basalt-app`, `/basalt-design`, `/basalt-charts`) are METHOD, never law.
23
21
 
24
22
  **Run the LOCAL bin, not `bunx`** — `./node_modules/.bin/basalt-ui`, or a `package.json` script.
25
23
  `bunx` does not re-resolve a cached package, so it can answer for a version you upgraded away from;
26
24
  `init` is the one legitimate `bunx` invocation, because nothing is installed yet.
27
25
 
28
- **Before guessing an import, read the installed package's machine docs** — `llms.txt` (per-subpath
29
- import map) and `AGENTS.md`, at the install directory. In a workspace that is under the package that
30
- depends on basalt, not the repo root; `basalt-ui doctor`'s `basalt-resolves` line prints where.
26
+ **Before guessing an import, read the installed package's `llms.txt` and `AGENTS.md`** — at the
27
+ install directory (in a workspace, under the depending package; `basalt-ui doctor` prints where).
31
28
 
32
29
  @./DESIGN.md
33
30
 
@@ -37,4 +34,7 @@ noise/grain and dramatic motion. Here: the shipped three-font system, depth from
37
34
  with a 1px ring, neutral-by-default with the single accent spent only when earned — trend, signal,
38
35
  or genuine categorical separation. Restraint **is** the identity.
39
36
 
37
+ **Chart-doctrine override.** A global `visx-charts` rule auto-loading on `**/charts/**` is generic
38
+ non-basalt discipline; here `basalt-charts` supersedes it — compose `CartesianChart`.
39
+
40
40
  <!-- basalt:end -->
@@ -80,16 +80,30 @@ import { fileURLToPath } from 'node:url'
80
80
 
81
81
  // ── Shared helpers ──────────────────────────────────────────────────────────────────────────────
82
82
 
83
+ /**
84
+ * Guard kinds and plugin rules RETIRED — kept recognized by `KNOWN_RULE_IDS` (below) and the
85
+ * guard's own `PLUGIN_RULE_IDS` copy so an existing `theme-allow <id>` reads as a dead waiver via
86
+ * `check-theme --audit-allows`, never as a typo.
87
+ *
88
+ * - `unframed-chart` (regex: a `<ChartLegend items={[...]}>` array literal) →
89
+ * `basalt/chart-legend-literal`, which also catches the `.map()`-over-a-non-series form the
90
+ * regex never could reach.
91
+ * - `duplicate-notifications-mount` — its only case, `<BasaltNotifications />` mounted beside
92
+ * `<BasaltOverlays notifications>`, is unreachable now that `BasaltNotifications` no longer
93
+ * exists as a standalone export; the rule had nothing left to fire on.
94
+ */
95
+ export const RETIRED_RULE_IDS = new Set(['unframed-chart', 'duplicate-notifications-mount'])
96
+
83
97
  /**
84
98
  * Rule ids a `theme-allow` may name — this plugin's own rules plus `src/guard`'s kinds. Duplicated
85
99
  * by hand for the same reason `majorOf` is: this file loads standalone out of a consumer's
86
100
  * node_modules and must not import from the package.
87
101
  *
88
102
  * Exported, and `oxlint-plugin.test.ts` asserts it is EXACTLY the plugin's own rule ids plus
89
- * `GUARD_RULES`'s keys. Forgetting an entry here is not a cosmetic omission — an id this set does
90
- * not know is treated as a typo, so the annotation naming it waives nothing (see
91
- * {@link parseThemeAllow}); before the fail-closed change it was worse still, silently widening to
92
- * a blanket waiver.
103
+ * `GUARD_RULES`'s keys plus `RETIRED_RULE_IDS`. Forgetting an entry here is not a cosmetic
104
+ * omission — an id this set does not know is treated as a typo, so the annotation naming it waives
105
+ * nothing (see {@link parseThemeAllow}); before the fail-closed change it was worse still, silently
106
+ * widening to a blanket waiver.
93
107
  */
94
108
  export const KNOWN_RULE_IDS = new Set([
95
109
  // this plugin
@@ -111,7 +125,6 @@ export const KNOWN_RULE_IDS = new Set([
111
125
  'search-literal-link',
112
126
  'use-search-from-literal',
113
127
  'provider-above-router',
114
- 'duplicate-notifications-mount',
115
128
  'query-dual-import',
116
129
  'query-fn-unwrap',
117
130
  'deprecated-export',
@@ -121,6 +134,7 @@ export const KNOWN_RULE_IDS = new Set([
121
134
  'visx-boundary',
122
135
  'visx-tooltip',
123
136
  'token-layer-boundary',
137
+ 'no-import-meta-env',
124
138
  // These three honour `basalt-agent-allow`, never `theme-allow` — but they are real ids, so an
125
139
  // annotation naming one must parse as a (useless) scoped annotation rather than as prose.
126
140
  'agent-resume-guard',
@@ -142,7 +156,6 @@ export const KNOWN_RULE_IDS = new Set([
142
156
  'inline-display',
143
157
  'raw-visx-axis',
144
158
  'raw-motion-value',
145
- 'unframed-chart',
146
159
  'chart-missing-aria-label',
147
160
  'raw-form-control',
148
161
  'sub-16-input-font',
@@ -154,6 +167,9 @@ export const KNOWN_RULE_IDS = new Set([
154
167
  'hidden-inline-style',
155
168
  'in-body-page-title',
156
169
  'raw-selection-control',
170
+ // Retired guard kinds — no longer in GUARD_RULES, but a `theme-allow` naming one must still
171
+ // parse as a real (dead) waiver rather than an unknown-id typo. See RETIRED_RULE_IDS above.
172
+ ...RETIRED_RULE_IDS,
157
173
  ])
158
174
 
159
175
  const ALLOW_RULE_TOKEN = /^(?:basalt\/)?([a-z][a-z0-9-]*)(?=$|[\s,:—–])/
@@ -3338,125 +3354,6 @@ const providerAboveRouter = {
3338
3354
  },
3339
3355
  }
3340
3356
 
3341
- // ── Rule 26 — duplicate-notifications-mount ─────────────────────────────────────────────────────
3342
-
3343
- const DUPLICATE_NOTIFICATIONS_MOUNT_MESSAGE =
3344
- '<BasaltNotifications /> mounted alongside <BasaltOverlays notifications> — the two double-mount ' +
3345
- "Mantine's <Notifications>, so a single notify() renders twice. BasaltOverlays already composes " +
3346
- 'the notifications layer; drop the standalone mount, or pass `notifications={false}` to ' +
3347
- 'BasaltOverlays if the standalone one is the mount you want. ' +
3348
- '(basalt/duplicate-notifications-mount)'
3349
-
3350
- /**
3351
- * The ancestor chain from `node` up to its `Program`, OUTERMOST first — captured during the visit,
3352
- * because `node.parent` is only walkable then, and compared at `Program:exit`. Unlike
3353
- * {@link ancestorTagBindings} it keeps the NODES, which is what makes a nearest-common-ancestor
3354
- * question answerable at all.
3355
- */
3356
- function ancestorChain(node) {
3357
- const chain = []
3358
- let current = node
3359
- for (let depth = 0; current !== null && current !== undefined; depth++) {
3360
- if (depth > ANCESTRY_MAX_DEPTH) break
3361
- chain.push(current)
3362
- if (current.type === 'Program') break
3363
- current = current.parent
3364
- }
3365
- return chain.toReversed()
3366
- }
3367
-
3368
- /**
3369
- * True when two nodes sit in DIFFERENT branches of ONE conditional — `a ? <X/> : <Y/>`, or the two
3370
- * operands of one `&&`/`||`. Exactly one of the pair ever renders, so a double-mount rule firing on
3371
- * them would be reporting a mount that cannot happen.
3372
- *
3373
- * Deliberately the NEAREST common ancestor only, and deliberately expression-level: two separate
3374
- * `cond && <X/>` expressions under one parent are NOT exclusive (both conditions can hold), and an
3375
- * `if`/`return` split across statements is a control-flow question this does not pretend to answer.
3376
- * The runtime guard in `src/commands/overlays-mount.tsx` is the lane that counts real mounts.
3377
- */
3378
- function mutuallyExclusive(chainA, chainB) {
3379
- let i = 0
3380
- while (i < chainA.length && i < chainB.length && chainA[i] === chainB[i]) i++
3381
- const ancestor = chainA[i - 1]
3382
- const branchA = chainA[i]
3383
- const branchB = chainB[i]
3384
- if (ancestor === undefined || branchA === undefined || branchB === undefined) return false
3385
- const [first, second] =
3386
- ancestor.type === 'ConditionalExpression'
3387
- ? [ancestor.consequent, ancestor.alternate]
3388
- : ancestor.type === 'LogicalExpression'
3389
- ? [ancestor.left, ancestor.right]
3390
- : [undefined, undefined]
3391
- if (first === undefined || second === undefined) return false
3392
- return (branchA === first && branchB === second) || (branchA === second && branchB === first)
3393
- }
3394
-
3395
- /**
3396
- * `<BasaltOverlays notifications>` and `<BasaltNotifications />` in ONE file — F5, the second
3397
- * `basalt-mantine.md` law with no guard, and the static half of a warning that already exists at
3398
- * runtime (`src/commands/overlays-mount.tsx` warns in dev when both mount).
3399
- *
3400
- * A pair split across the two branches of one conditional is EXEMPT: `a ? <BasaltNotifications/> :
3401
- * <BasaltOverlays/>` is a file with two mounts written and one mount rendered, and reporting it
3402
- * taught a consumer to reach for a waiver over code that was already right.
3403
- *
3404
- * `notifications` DEFAULTS to true on `BasaltOverlays`, so the absence of the attribute counts as
3405
- * enabled and only an explicit `notifications={false}` clears it — the same polarity the component
3406
- * itself reads. Both tags are provenance-gated through {@link collectBasaltImportMap}.
3407
- *
3408
- * Same-FILE only, and deliberately so: the runtime warning is the lane that sees a cross-file
3409
- * double mount, because it counts real mounts rather than JSX. This is the cheap half that catches
3410
- * it before the app runs, which is the whole reason a static twin is worth having.
3411
- */
3412
- // Ships: warn (grace → 1.30.0)
3413
- const duplicateNotificationsMount = {
3414
- meta: {
3415
- type: 'suggestion',
3416
- docs: {
3417
- description: 'Warn when BasaltOverlays and a standalone BasaltNotifications both mount.',
3418
- },
3419
- schema: [],
3420
- },
3421
- create(context) {
3422
- if (isTestFile(context)) return {}
3423
- const ownTree = isBasaltOwnSource(getFilename(context))
3424
- const basalt = new Map()
3425
- const mounts = []
3426
-
3427
- return {
3428
- ImportDeclaration(node) {
3429
- collectBasaltImportMap(node, basalt, ownTree)
3430
- },
3431
- JSXOpeningElement(node) {
3432
- const root = jsxRootName(node.name)
3433
- if (root === undefined || !basalt.has(root)) return
3434
- // `notifications` DEFAULTS to true, so only an explicit `={false}` clears the layer.
3435
- const disabled = (node.attributes ?? []).some(
3436
- (attr) =>
3437
- attr.type === 'JSXAttribute' &&
3438
- attr.name?.name === 'notifications' &&
3439
- unwrapExpressionContainer(attr.value)?.value === false,
3440
- )
3441
- mounts.push({ node, root, disabled, chain: ancestorChain(node) })
3442
- },
3443
- 'Program:exit'() {
3444
- const overlays = mounts.filter(
3445
- ({ root, disabled }) => basalt.get(root) === 'BasaltOverlays' && !disabled,
3446
- )
3447
- if (overlays.length === 0) return
3448
- for (const { node, root, chain } of mounts) {
3449
- if (basalt.get(root) !== 'BasaltNotifications') continue
3450
- // Every enabled overlays mount on the other branch of one conditional → nothing to report.
3451
- if (overlays.every((overlay) => mutuallyExclusive(overlay.chain, chain))) continue
3452
- if (hasThemeAllow(context, node, 'duplicate-notifications-mount')) continue
3453
- context.report({ node, message: DUPLICATE_NOTIFICATIONS_MOUNT_MESSAGE })
3454
- }
3455
- },
3456
- }
3457
- },
3458
- }
3459
-
3460
3357
  // ── Rule 27 — query-dual-import ─────────────────────────────────────────────────────────────────
3461
3358
 
3462
3359
  /** `@tanstack/react-query` and its subpaths — never `@tanstack/react-query-devtools`. */
@@ -3643,36 +3540,8 @@ const queryFnUnwrap = {
3643
3540
  * @type {readonly DeprecatedExport[]}
3644
3541
  */
3645
3542
  export const DEPRECATED_EXPORTS = [
3646
- {
3647
- subpath: 'basalt-ui/forms',
3648
- name: 'field',
3649
- replacement: 'inputProps',
3650
- removeIn: '1.29.0',
3651
- // Not a drop-in: `inputProps` no longer returns `key`, so a rename alone would silently drop
3652
- // the reconciler key. The nudge stays; the rewrite is `basalt/forms-field-key`'s job.
3653
- fix: false,
3654
- },
3655
- {
3656
- subpath: 'basalt-ui',
3657
- name: 'BasaltProvider',
3658
- prop: 'sseUrl',
3659
- replacement: 'connectivity={{ sseUrl }}',
3660
- removeIn: '1.29.0',
3661
- },
3662
- {
3663
- subpath: 'basalt-ui',
3664
- name: 'BasaltProvider',
3665
- prop: 'healthUrl',
3666
- replacement: 'connectivity={{ healthUrl }}',
3667
- removeIn: '1.29.0',
3668
- },
3669
- {
3670
- subpath: 'basalt-ui',
3671
- name: 'BasaltProvider',
3672
- prop: 'healthIntervalMs',
3673
- replacement: 'connectivity={{ healthIntervalMs }}',
3674
- removeIn: '1.29.0',
3675
- },
3543
+ // Empty since 1.29.0: every 1.28.x deprecation was removed on schedule. The next
3544
+ // deprecation adds a row here in the same commit as its @deprecated JSDoc and MIGRATING entry.
3676
3545
  ]
3677
3546
 
3678
3547
  function deprecatedExportMessage(row) {
@@ -3914,6 +3783,51 @@ const formsFieldKey = {
3914
3783
  },
3915
3784
  }
3916
3785
 
3786
+ // ── Rule 31 — no-import-meta-env ────────────────────────────────────────────────────────────────
3787
+
3788
+ const NO_IMPORT_META_ENV_MESSAGE =
3789
+ 'import.meta.env is banned in shipped basalt-ui source — this package is consumed both as a ' +
3790
+ 'Vite-bundled dep AND resolved directly by a consumer whose own bundler may define no ' +
3791
+ 'import.meta.env at all (basaltViteConfig defines process.env.NODE_ENV precisely so basalt ' +
3792
+ 'code never needs it). Use process.env.NODE_ENV instead. (basalt/no-import-meta-env)'
3793
+
3794
+ /**
3795
+ * `import.meta.env` — a MemberExpression whose object is the `import.meta` MetaProperty and whose
3796
+ * property is `env`. Repo-local only: a CONSUMER's own app code legitimately uses
3797
+ * `import.meta.env.VITE_*` for its own config, so this must never reach the shipped preset — only
3798
+ * `/.oxlintrc.json` wires it, scoped to `packages/basalt-ui/src/**` the same way the Mantine-free
3799
+ * boundaries above are scoped, rather than through path logic in the rule itself (unlike
3800
+ * `token-layer-boundary`, which every package resolves the plugin from and so has to self-scope).
3801
+ */
3802
+ // Ships: repo-local only
3803
+ const noImportMetaEnv = {
3804
+ meta: {
3805
+ type: 'suggestion',
3806
+ docs: {
3807
+ description: 'Disallow import.meta.env — basalt-ui source must use process.env.NODE_ENV.',
3808
+ },
3809
+ schema: [],
3810
+ },
3811
+ create(context) {
3812
+ if (isTestFile(context)) return {}
3813
+
3814
+ return {
3815
+ MemberExpression(node) {
3816
+ const object = node.object
3817
+ if (
3818
+ object?.type !== 'MetaProperty' ||
3819
+ object.meta?.name !== 'import' ||
3820
+ object.property?.name !== 'meta'
3821
+ )
3822
+ return
3823
+ if (node.computed || node.property?.name !== 'env') return
3824
+ if (hasThemeAllow(context, node, 'no-import-meta-env')) return
3825
+ context.report({ node, message: NO_IMPORT_META_ENV_MESSAGE })
3826
+ },
3827
+ }
3828
+ },
3829
+ }
3830
+
3917
3831
  // ── Grace ledger ────────────────────────────────────────────────────────────────────────────────
3918
3832
 
3919
3833
  /**
@@ -3990,17 +3904,6 @@ export const PLUGIN_RULE_GRACE = {
3990
3904
  'image-gen and the playground is measured — every one of them mounts a router, so the ' +
3991
3905
  'false-positive question has a real sample.',
3992
3906
  },
3993
- 'duplicate-notifications-mount': {
3994
- since: '1.28.0',
3995
- promote: '1.30.0',
3996
- why:
3997
- 'F5 — the static half of a double-mount the runtime already warns about in dev ' +
3998
- '(`src/commands/overlays-mount.tsx`). Same-file only, so like its sibling it guards a ' +
3999
- 'fraction of the law and cannot claim `error`. It also reads a prop DEFAULT (`notifications` ' +
4000
- 'is true when unwritten), which is the kind of polarity a consumer disagrees with exactly ' +
4001
- 'once before it is worth knowing about — a minor at `warn` is how that disagreement arrives ' +
4002
- 'as feedback rather than as a broken build.',
4003
- },
4004
3907
  'query-dual-import': {
4005
3908
  since: '1.28.0',
4006
3909
  promote: '1.30.0',
@@ -4097,7 +4000,6 @@ export default {
4097
4000
  'search-literal-link': searchLiteralLink,
4098
4001
  'use-search-from-literal': useSearchFromLiteral,
4099
4002
  'provider-above-router': providerAboveRouter,
4100
- 'duplicate-notifications-mount': duplicateNotificationsMount,
4101
4003
  'query-dual-import': queryDualImport,
4102
4004
  'query-fn-unwrap': queryFnUnwrap,
4103
4005
  'deprecated-export': deprecatedExport,
@@ -4108,5 +4010,6 @@ export default {
4108
4010
  'agent-resume-guard': agentResumeGuard,
4109
4011
  'agent-no-raw-usechat': agentNoRawUseChat,
4110
4012
  'ai-sdk-major': aiSdkMajor,
4013
+ 'no-import-meta-env': noImportMetaEnv,
4111
4014
  },
4112
4015
  }