basalt-ui 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -0
- package/CHANGELOG.md +72 -39
- package/MIGRATING.md +44 -2
- package/README.md +39 -12
- package/agent/rules/basalt-tokens.md +1 -1
- package/agent/rules/basalt-ui.md +3 -3
- package/agent/skills/basalt-app/references/live.md +4 -4
- package/agent/skills/basalt-app/references/migrate.md +2 -2
- package/agent/skills/basalt-app/references/setup.md +17 -8
- package/agent/skills/basalt-app/references/testing.md +8 -6
- package/agent/skills/basalt-design/SKILL.md +2 -1
- package/agent/skills/basalt-design/references/controls.md +1 -0
- package/agent/skills/basalt-design/references/parts.md +5 -1
- package/agent/templates/AGENTS-block.md.tpl +6 -23
- package/agent/templates/AGENTS-block.site.md.tpl +5 -18
- package/agent/templates/AGENTS-block.tokens.md.tpl +3 -7
- package/agent/templates/DESIGN.md.tpl +1 -1
- package/agent/templates/_app-error.i18n.tpl +8 -32
- package/agent/templates/_app-error.tpl +8 -32
- package/agent/templates/_app-pending.i18n.tpl +5 -3
- package/agent/templates/_app-pending.tpl +5 -4
- package/agent/templates/main.i18n.tpl +8 -3
- package/agent/templates/main.tpl +8 -3
- package/agent/templates/router.start.tpl +8 -3
- package/agent/templates/seed-messages.json +0 -30
- package/configs/oxlint-app.json +9 -1
- package/configs/oxlint-bridge.json +3 -1
- package/configs/oxlint-parts.json +9 -1
- package/configs/oxlint-site.json +3 -1
- package/dist/astro/shiki.d.ts +3 -2
- package/dist/astro/shiki.d.ts.map +1 -1
- package/dist/cards/bar-list.d.ts.map +1 -1
- package/dist/cards/bar-list.js +2 -1
- package/dist/cards/chain-view.d.ts +37 -8
- package/dist/cards/chain-view.d.ts.map +1 -1
- package/dist/cards/chain-view.js +105 -38
- package/dist/cards/contract.d.ts +8 -1
- package/dist/cards/contract.d.ts.map +1 -1
- package/dist/cards/data-panel.d.ts.map +1 -1
- package/dist/cards/data-panel.js +1 -0
- package/dist/cards/event-list.d.ts.map +1 -1
- package/dist/cards/event-list.js +3 -2
- package/dist/cards/index.d.ts +1 -1
- package/dist/cards/index.d.ts.map +1 -1
- package/dist/cards/row-list.d.ts.map +1 -1
- package/dist/cards/row-list.js +2 -1
- package/dist/cards/stat-card-parts.d.ts +3 -3
- package/dist/cards/stat-card-parts.d.ts.map +1 -1
- package/dist/cards/stat-card-parts.js +8 -2
- package/dist/cards/stat-card.d.ts.map +1 -1
- package/dist/cards/stat-card.js +34 -9
- package/dist/charts/core/compile.d.ts +2 -0
- package/dist/charts/core/compile.d.ts.map +1 -1
- package/dist/charts/core/compile.js +16 -8
- package/dist/charts/core/cursor.d.ts +2 -1
- package/dist/charts/core/cursor.d.ts.map +1 -1
- package/dist/charts/core/cursor.js +8 -1
- package/dist/charts/core/tooltip-said.d.ts +16 -0
- package/dist/charts/core/tooltip-said.d.ts.map +1 -0
- package/dist/charts/core/tooltip-said.js +39 -0
- package/dist/charts/focus.d.ts.map +1 -1
- package/dist/charts/focus.js +1 -1
- package/dist/charts/parts/chart-card.d.ts.map +1 -1
- package/dist/charts/parts/chart-card.js +1 -0
- package/dist/cli/agent-note.d.ts +3 -3
- package/dist/cli/agent-note.d.ts.map +1 -1
- package/dist/cli/agent-note.js +5 -5
- package/dist/cli/budget/index.d.ts +7 -0
- package/dist/cli/budget/index.d.ts.map +1 -1
- package/dist/cli/budget/index.js +11 -5
- package/dist/cli/config.d.ts +1 -1
- package/dist/cli/doctor/app.d.ts.map +1 -1
- package/dist/cli/doctor/app.js +53 -24
- package/dist/cli/doctor/eject.d.ts.map +1 -1
- package/dist/cli/doctor/eject.js +16 -9
- package/dist/cli/doctor/guards.d.ts.map +1 -1
- package/dist/cli/doctor/guards.js +11 -8
- package/dist/cli/doctor/hook.js +1 -1
- package/dist/cli/doctor/install.d.ts.map +1 -1
- package/dist/cli/doctor/install.js +46 -22
- package/dist/cli/doctor/translations.d.ts.map +1 -1
- package/dist/cli/doctor/translations.js +11 -4
- package/dist/cli/doctor/types.d.ts +2 -2
- package/dist/cli/doctor/types.d.ts.map +1 -1
- package/dist/cli/doctor/types.js +1 -1
- package/dist/cli/doctor/wiring.d.ts.map +1 -1
- package/dist/cli/doctor/wiring.js +26 -15
- package/dist/cli/eject/dropped-slots.d.ts +6 -0
- package/dist/cli/eject/dropped-slots.d.ts.map +1 -0
- package/dist/cli/eject/dropped-slots.js +9 -0
- package/dist/cli/eject/index.d.ts.map +1 -1
- package/dist/cli/eject/index.js +9 -8
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +7 -2
- package/dist/cli/index.d.ts +6 -5
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +38 -7
- package/dist/cli/init/index.d.ts +10 -0
- package/dist/cli/init/index.d.ts.map +1 -1
- package/dist/cli/init/index.js +61 -10
- package/dist/cli/init/locales.d.ts +7 -0
- package/dist/cli/init/locales.d.ts.map +1 -1
- package/dist/cli/init/locales.js +21 -6
- package/dist/cli/init/router-seeds.d.ts.map +1 -1
- package/dist/cli/init/router-seeds.js +16 -3
- package/dist/cli/init/steps.d.ts +36 -3
- package/dist/cli/init/steps.d.ts.map +1 -1
- package/dist/cli/init/steps.js +201 -34
- package/dist/cli/lint/baseline.d.ts +27 -0
- package/dist/cli/lint/baseline.d.ts.map +1 -0
- package/dist/cli/lint/baseline.js +96 -0
- package/dist/cli/lint/engine.d.ts +2 -0
- package/dist/cli/lint/engine.d.ts.map +1 -1
- package/dist/cli/lint/engine.js +18 -8
- package/dist/cli/lint/hook.d.ts.map +1 -1
- package/dist/cli/lint/hook.js +8 -3
- package/dist/cli/lint/index.d.ts +3 -0
- package/dist/cli/lint/index.d.ts.map +1 -1
- package/dist/cli/lint/index.js +67 -8
- package/dist/cli/manifest.d.ts +46 -3
- package/dist/cli/manifest.d.ts.map +1 -1
- package/dist/cli/manifest.js +71 -1
- package/dist/cli/migrate/census.d.ts +6 -0
- package/dist/cli/migrate/census.d.ts.map +1 -1
- package/dist/cli/migrate/census.js +22 -1
- package/dist/cli/migrate/index.d.ts +5 -0
- package/dist/cli/migrate/index.d.ts.map +1 -1
- package/dist/cli/migrate/index.js +36 -3
- package/dist/cli/migrate/lost-classes.d.ts +20 -0
- package/dist/cli/migrate/lost-classes.d.ts.map +1 -0
- package/dist/cli/migrate/lost-classes.js +145 -0
- package/dist/cli/migrate/rows.d.ts +10 -0
- package/dist/cli/migrate/rows.d.ts.map +1 -1
- package/dist/cli/migrate/rows.js +15 -0
- package/dist/cli/package-manager.d.ts.map +1 -1
- package/dist/cli/package-manager.js +2 -1
- package/dist/cli/peers.d.ts +2 -0
- package/dist/cli/peers.d.ts.map +1 -1
- package/dist/cli/peers.js +7 -0
- package/dist/cli/presets.d.ts.map +1 -1
- package/dist/cli/presets.js +27 -11
- package/dist/cli/resolver.d.ts +13 -4
- package/dist/cli/resolver.d.ts.map +1 -1
- package/dist/cli/resolver.js +39 -5
- package/dist/cli/router-wiring.d.ts +1 -0
- package/dist/cli/router-wiring.d.ts.map +1 -1
- package/dist/cli/router-wiring.js +1 -1
- package/dist/cli/sync/engine.d.ts +8 -1
- package/dist/cli/sync/engine.d.ts.map +1 -1
- package/dist/cli/sync/engine.js +25 -14
- package/dist/cli/sync/index.d.ts.map +1 -1
- package/dist/cli/sync/index.js +7 -4
- package/dist/cli/sync/render.d.ts.map +1 -1
- package/dist/cli/sync/render.js +21 -28
- package/dist/cli/tokens-css.d.ts +2 -0
- package/dist/cli/tokens-css.d.ts.map +1 -1
- package/dist/cli/tokens-css.js +28 -6
- package/dist/controls/contract.d.ts +2 -1
- package/dist/controls/contract.d.ts.map +1 -1
- package/dist/controls/control-home.d.ts +4 -1
- package/dist/controls/control-home.d.ts.map +1 -1
- package/dist/controls/control-home.js +5 -3
- package/dist/controls/local-control.d.ts +28 -1
- package/dist/controls/local-control.d.ts.map +1 -1
- package/dist/controls/local-control.js +14 -2
- package/dist/core/cn.d.ts.map +1 -1
- package/dist/core/cn.js +6 -5
- package/dist/core/frame-figure.d.ts +2 -0
- package/dist/core/frame-figure.d.ts.map +1 -1
- package/dist/core/frame-figure.js +5 -2
- package/dist/core/frame-head.d.ts +3 -1
- package/dist/core/frame-head.d.ts.map +1 -1
- package/dist/core/frame-head.js +28 -7
- package/dist/core/frame-regions.d.ts +1 -1
- package/dist/core/frame-regions.d.ts.map +1 -1
- package/dist/core/frame-regions.js +18 -8
- package/dist/core/info-hint.d.ts +5 -0
- package/dist/core/info-hint.d.ts.map +1 -1
- package/dist/core/info-hint.js +22 -1
- package/dist/core/mark-tone.d.ts +6 -2
- package/dist/core/mark-tone.d.ts.map +1 -1
- package/dist/core/mark-tone.js +1 -1
- package/dist/core/mark-types.d.ts +4 -2
- package/dist/core/mark-types.d.ts.map +1 -1
- package/dist/core/messages/chain.d.ts +2 -1
- package/dist/core/messages/chain.d.ts.map +1 -1
- package/dist/core/messages/chain.js +1 -0
- package/dist/core/messages/index.d.ts +2 -1
- package/dist/core/messages/index.d.ts.map +1 -1
- package/dist/core/messages/index.js +2 -0
- package/dist/core/messages/runs.d.ts +20 -0
- package/dist/core/messages/runs.d.ts.map +1 -0
- package/dist/core/messages/runs.js +18 -0
- package/dist/core/phase.d.ts +25 -2
- package/dist/core/phase.d.ts.map +1 -1
- package/dist/core/ports.d.ts +4 -1
- package/dist/core/ports.d.ts.map +1 -1
- package/dist/core/provider.d.ts +3 -1
- package/dist/core/provider.d.ts.map +1 -1
- package/dist/core/provider.js +5 -3
- package/dist/core/scheme.d.ts +2 -1
- package/dist/core/scheme.d.ts.map +1 -1
- package/dist/core/scheme.js +1 -0
- package/dist/core/spark/mini-bars.d.ts +6 -4
- package/dist/core/spark/mini-bars.d.ts.map +1 -1
- package/dist/core/spark/mini-bars.js +36 -11
- package/dist/core/spark/sparkline.d.ts +2 -2
- package/dist/core/spark/sparkline.d.ts.map +1 -1
- package/dist/core/spark/sparkline.js +21 -2
- package/dist/css/bridge.css +63 -0
- package/dist/css/generate.d.ts +2 -2
- package/dist/css/generate.d.ts.map +1 -1
- package/dist/css/generate.js +25 -0
- package/dist/data/live/live-query.d.ts +2 -2
- package/dist/data/live/live-query.d.ts.map +1 -1
- package/dist/data/live/live-query.js +2 -1
- package/dist/lint/preset.d.ts +12 -3
- package/dist/lint/preset.d.ts.map +1 -1
- package/dist/lint/preset.js +30 -10
- package/dist/lint/rules/class/table.d.ts.map +1 -1
- package/dist/lint/rules/class/table.js +3 -1
- package/dist/lint/rules/structure/control-home.js +1 -1
- package/dist/lint/rules/structure/import-boundary.d.ts.map +1 -1
- package/dist/lint/rules/structure/import-boundary.js +2 -0
- package/dist/lint/rules/structure/label-literal.d.ts.map +1 -1
- package/dist/lint/rules/structure/label-literal.js +1 -1
- package/dist/lint/shadcn.d.ts +562 -0
- package/dist/lint/shadcn.d.ts.map +1 -0
- package/dist/lint/shadcn.js +52 -0
- package/dist/lint/stylelint/render.d.ts +3 -1
- package/dist/lint/stylelint/render.d.ts.map +1 -1
- package/dist/lint/stylelint/render.js +23 -2
- package/dist/lint/stylelint/rules.d.ts +3 -2
- package/dist/lint/stylelint/rules.d.ts.map +1 -1
- package/dist/lint/stylelint/rules.js +11 -6
- package/dist/lint/weakened.d.ts +8 -0
- package/dist/lint/weakened.d.ts.map +1 -1
- package/dist/lint/weakened.js +44 -1
- package/dist/messages/de.d.ts.map +1 -1
- package/dist/messages/de.js +15 -0
- package/dist/messages/es.d.ts.map +1 -1
- package/dist/messages/es.js +15 -0
- package/dist/messages/fr.d.ts.map +1 -1
- package/dist/messages/fr.js +15 -0
- package/dist/messages/zh-hans.d.ts.map +1 -1
- package/dist/messages/zh-hans.js +15 -0
- package/dist/page/bar-title.d.ts +25 -0
- package/dist/page/bar-title.d.ts.map +1 -0
- package/dist/page/bar-title.js +10 -0
- package/dist/page/contract.d.ts +11 -1
- package/dist/page/contract.d.ts.map +1 -1
- package/dist/page/empty-state.d.ts +5 -2
- package/dist/page/empty-state.d.ts.map +1 -1
- package/dist/page/empty-state.js +14 -3
- package/dist/page/facts.d.ts +19 -2
- package/dist/page/facts.d.ts.map +1 -1
- package/dist/page/facts.js +26 -5
- package/dist/page/index.d.ts +8 -0
- package/dist/page/index.d.ts.map +1 -1
- package/dist/page/index.js +9 -0
- package/dist/page/page-bar.d.ts.map +1 -1
- package/dist/page/page-bar.js +2 -7
- package/dist/page/page-summary.d.ts +2 -1
- package/dist/page/page-summary.d.ts.map +1 -1
- package/dist/page/page-summary.js +1 -1
- package/dist/page/run-button.d.ts +26 -0
- package/dist/page/run-button.d.ts.map +1 -0
- package/dist/page/run-button.js +31 -0
- package/dist/page/run-list.d.ts +28 -0
- package/dist/page/run-list.d.ts.map +1 -0
- package/dist/page/run-list.js +88 -0
- package/dist/page/run-queue.d.ts +78 -0
- package/dist/page/run-queue.d.ts.map +1 -0
- package/dist/page/run-queue.js +93 -0
- package/dist/page/section.d.ts +6 -1
- package/dist/page/section.d.ts.map +1 -1
- package/dist/page/section.js +34 -16
- package/dist/shell/commands/command-palette.d.ts.map +1 -1
- package/dist/shell/commands/command-palette.js +5 -1
- package/dist/shell/parts/header.js +1 -1
- package/dist/surfaces.d.ts +15 -1
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +19 -2
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +3 -0
- package/dist/testing/pseudo-locale.d.ts +41 -0
- package/dist/testing/pseudo-locale.d.ts.map +1 -0
- package/dist/testing/pseudo-locale.js +74 -0
- package/dist/testing/quality.d.ts +6 -0
- package/dist/testing/quality.d.ts.map +1 -1
- package/dist/testing/quality.js +139 -1
- package/dist/tokens/bridge-sheet.d.ts +21 -0
- package/dist/tokens/bridge-sheet.d.ts.map +1 -0
- package/dist/tokens/bridge-sheet.js +68 -0
- package/dist/tokens/emit.d.ts +6 -1
- package/dist/tokens/emit.d.ts.map +1 -1
- package/dist/tokens/emit.js +26 -1
- package/dist/ui/accordion.js +1 -1
- package/dist/ui/card.d.ts +32 -4
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +26 -3
- package/dist/ui/collapsible.d.ts +4 -2
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +1 -1
- package/dist/ui/combobox.js +1 -1
- package/dist/ui/meter.d.ts +34 -3
- package/dist/ui/meter.d.ts.map +1 -1
- package/dist/ui/meter.guard.d.ts +2 -0
- package/dist/ui/meter.guard.d.ts.map +1 -1
- package/dist/ui/meter.guard.js +20 -0
- package/dist/ui/meter.js +23 -7
- package/dist/ui/primitive.contract.d.ts.map +1 -1
- package/dist/ui/primitive.contract.js +7 -0
- package/dist/ui/remote-pad.d.ts +62 -0
- package/dist/ui/remote-pad.d.ts.map +1 -0
- package/dist/ui/remote-pad.guard.d.ts +21 -0
- package/dist/ui/remote-pad.guard.d.ts.map +1 -0
- package/dist/ui/remote-pad.guard.js +6 -0
- package/dist/ui/remote-pad.js +148 -0
- package/dist/ui/segmented.d.ts.map +1 -1
- package/dist/ui/segmented.js +4 -0
- package/dist/ui/skeleton.d.ts +9 -4
- package/dist/ui/skeleton.d.ts.map +1 -1
- package/dist/ui/skeleton.guard.d.ts +6 -2
- package/dist/ui/skeleton.guard.d.ts.map +1 -1
- package/dist/ui/skeleton.guard.js +4 -0
- package/dist/ui/skeleton.js +2 -1
- package/dist/ui/slots.d.ts +2 -1
- package/dist/ui/slots.d.ts.map +1 -1
- package/dist/ui/slots.js +2 -1
- package/dist/vite/allotment.d.ts +1 -1
- package/dist/vite/allotment.d.ts.map +1 -1
- package/dist/vite/allotment.js +15 -1
- package/dist/vite/doc.d.ts +1 -1
- package/dist/vite/doc.d.ts.map +1 -1
- package/dist/vite/doc.js +12 -2
- package/dist/vite/head.d.ts +4 -3
- package/dist/vite/head.d.ts.map +1 -1
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +4 -1
- package/dist/vite/shell-worker.d.ts +6 -0
- package/dist/vite/shell-worker.d.ts.map +1 -0
- package/dist/vite/shell-worker.js +92 -0
- package/docs/astro.md +19 -4
- package/docs/bar-list.md +3 -2
- package/docs/bar-title.md +33 -0
- package/docs/basalt-provider.md +2 -1
- package/docs/card.md +24 -4
- package/docs/chain-view.md +12 -7
- package/docs/chart-card.md +3 -2
- package/docs/collapsible.md +4 -2
- package/docs/control-home.md +4 -2
- package/docs/create-run-queue.md +40 -0
- package/docs/data-panel.md +3 -2
- package/docs/de.md +1 -1
- package/docs/empty-state.md +3 -1
- package/docs/es.md +1 -1
- package/docs/event-list.md +3 -2
- package/docs/fact.md +6 -1
- package/docs/facts.md +5 -1
- package/docs/fr.md +1 -1
- package/docs/live-query.md +1 -1
- package/docs/meter.md +17 -13
- package/docs/mini-bars.md +7 -5
- package/docs/pseudo-basalt-messages.md +30 -0
- package/docs/pseudo-messages.md +27 -0
- package/docs/quality.md +2 -1
- package/docs/recipes/localise-app.md +2 -2
- package/docs/remote-pad.md +40 -0
- package/docs/row-list.md +3 -2
- package/docs/run-button.md +45 -0
- package/docs/run-list.md +71 -0
- package/docs/section.md +7 -1
- package/docs/set-scheme.md +2 -2
- package/docs/skeleton.md +4 -3
- package/docs/slots.md +1 -1
- package/docs/sparkline.md +5 -2
- package/docs/stat-card.md +6 -4
- package/docs/testing.md +64 -0
- package/docs/use-local-control.md +8 -1
- package/docs/use-runs.md +32 -0
- package/docs/vite.md +12 -2
- package/docs/zh-hans.md +1 -1
- package/llms.txt +88 -21
- package/migrations/areas/shadcn.json +338 -0
- package/package.json +9 -2
- package/src/astro/shiki.ts +3 -1
- package/src/cards/bar-list.tsx +2 -1
- package/src/cards/chain-view.tsx +167 -55
- package/src/cards/contract.ts +8 -1
- package/src/cards/data-panel.tsx +1 -0
- package/src/cards/event-list.tsx +2 -1
- package/src/cards/index.ts +1 -0
- package/src/cards/row-list.tsx +2 -1
- package/src/cards/stat-card-parts.tsx +9 -7
- package/src/cards/stat-card.tsx +39 -12
- package/src/charts/core/compile.ts +31 -19
- package/src/charts/core/cursor.ts +11 -3
- package/src/charts/core/tooltip-said.ts +55 -0
- package/src/charts/focus.tsx +4 -1
- package/src/charts/parts/chart-card.tsx +1 -0
- package/src/cli/agent-note.ts +12 -5
- package/src/cli/budget/index.ts +22 -5
- package/src/cli/config.ts +1 -1
- package/src/cli/doctor/app.ts +75 -23
- package/src/cli/doctor/eject.ts +30 -10
- package/src/cli/doctor/guards.ts +11 -8
- package/src/cli/doctor/hook.ts +1 -1
- package/src/cli/doctor/install.ts +61 -24
- package/src/cli/doctor/translations.ts +13 -4
- package/src/cli/doctor/types.ts +2 -3
- package/src/cli/doctor/wiring.ts +30 -16
- package/src/cli/eject/dropped-slots.ts +11 -0
- package/src/cli/eject/index.ts +13 -9
- package/src/cli/help.ts +34 -10
- package/src/cli/index.ts +56 -14
- package/src/cli/init/index.ts +64 -5
- package/src/cli/init/locales.ts +41 -8
- package/src/cli/init/router-seeds.ts +17 -3
- package/src/cli/init/steps.ts +308 -41
- package/src/cli/lint/baseline.ts +141 -0
- package/src/cli/lint/engine.ts +33 -10
- package/src/cli/lint/hook.ts +11 -3
- package/src/cli/lint/index.ts +77 -12
- package/src/cli/manifest.ts +132 -4
- package/src/cli/migrate/census.ts +35 -1
- package/src/cli/migrate/index.ts +46 -3
- package/src/cli/migrate/lost-classes.ts +203 -0
- package/src/cli/migrate/rows.ts +21 -0
- package/src/cli/package-manager.ts +4 -1
- package/src/cli/peers.ts +11 -0
- package/src/cli/presets.ts +32 -11
- package/src/cli/resolver.ts +58 -10
- package/src/cli/router-wiring.ts +3 -1
- package/src/cli/sync/engine.ts +30 -14
- package/src/cli/sync/index.ts +7 -4
- package/src/cli/sync/render.ts +29 -37
- package/src/cli/tokens-css.ts +42 -5
- package/src/controls/contract.ts +2 -0
- package/src/controls/control-home.tsx +15 -4
- package/src/controls/local-control.ts +49 -3
- package/src/core/cn.ts +9 -5
- package/src/core/frame-figure.tsx +7 -1
- package/src/core/frame-head.tsx +32 -6
- package/src/core/frame-regions.tsx +18 -8
- package/src/core/info-hint.tsx +26 -0
- package/src/core/mark-tone.ts +10 -3
- package/src/core/mark-types.ts +4 -2
- package/src/core/messages/chain.ts +2 -1
- package/src/core/messages/index.ts +4 -0
- package/src/core/messages/runs.ts +40 -0
- package/src/core/phase.ts +22 -2
- package/src/core/ports.ts +13 -1
- package/src/core/provider.tsx +7 -3
- package/src/core/scheme.ts +6 -2
- package/src/core/spark/mini-bars.tsx +59 -15
- package/src/core/spark/sparkline.tsx +26 -4
- package/src/css/bridge.css +63 -0
- package/src/css/generate.ts +40 -3
- package/src/data/live/live-query.ts +4 -3
- package/src/lint/preset.ts +52 -13
- package/src/lint/rules/class/table.ts +3 -1
- package/src/lint/rules/structure/control-home.ts +1 -1
- package/src/lint/rules/structure/import-boundary.ts +2 -0
- package/src/lint/rules/structure/label-literal.ts +3 -1
- package/src/lint/shadcn.ts +91 -0
- package/src/lint/stylelint/render.ts +31 -1
- package/src/lint/stylelint/rules.ts +19 -7
- package/src/lint/weakened.ts +59 -1
- package/src/messages/de.ts +20 -0
- package/src/messages/es.ts +20 -0
- package/src/messages/fr.ts +20 -0
- package/src/messages/zh-hans.ts +20 -0
- package/src/page/bar-title.tsx +35 -0
- package/src/page/contract.ts +11 -1
- package/src/page/empty-state.tsx +18 -8
- package/src/page/facts.tsx +43 -5
- package/src/page/index.ts +8 -0
- package/src/page/page-bar.tsx +2 -9
- package/src/page/page-summary.tsx +4 -3
- package/src/page/run-button.tsx +52 -0
- package/src/page/run-list.tsx +151 -0
- package/src/page/run-queue.ts +185 -0
- package/src/page/section.tsx +30 -5
- package/src/shell/commands/command-palette.tsx +10 -1
- package/src/shell/parts/header.tsx +1 -1
- package/src/surfaces.ts +18 -1
- package/src/testing/index.ts +1 -0
- package/src/testing/pseudo-locale.ts +149 -0
- package/src/testing/quality.ts +188 -0
- package/src/tokens/bridge-sheet.ts +80 -0
- package/src/tokens/emit.ts +45 -6
- package/src/ui/accordion.tsx +1 -1
- package/src/ui/card.tsx +56 -6
- package/src/ui/collapsible.tsx +5 -3
- package/src/ui/combobox.tsx +1 -1
- package/src/ui/meter.guard.ts +23 -0
- package/src/ui/meter.tsx +76 -27
- package/src/ui/no-restyle.generated.json +8 -0
- package/src/ui/primitive.contract.ts +7 -0
- package/src/ui/remote-pad.guard.ts +24 -0
- package/src/ui/remote-pad.tsx +249 -0
- package/src/ui/segmented.tsx +6 -0
- package/src/ui/skeleton.guard.ts +7 -2
- package/src/ui/skeleton.tsx +10 -4
- package/src/ui/slots.ts +2 -1
- package/src/vite/allotment.ts +15 -1
- package/src/vite/doc.ts +12 -2
- package/src/vite/head.ts +4 -3
- package/src/vite/index.ts +4 -1
- package/src/vite/shell-worker.ts +115 -0
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
useSparkFormat,
|
|
21
21
|
} from './sparkline-shared'
|
|
22
22
|
import type { Row } from './sparkline-shared'
|
|
23
|
+
import type { Tone } from '../ports'
|
|
23
24
|
import { mark } from '../../core/messages/mark'
|
|
24
25
|
import { useMessages } from '../../core/messages/use-messages'
|
|
25
26
|
|
|
@@ -40,6 +41,24 @@ const DIMMED = 0.5
|
|
|
40
41
|
const COMPARE_INK = 0.45
|
|
41
42
|
/** The smallest plot, px, that names its threshold. */
|
|
42
43
|
const LABELLED_PLOT = 40
|
|
44
|
+
/** The line and the area's ink per tone: the svg stays muted, so only these elements take the tone. */
|
|
45
|
+
const SPARK_INK: Readonly<Record<Tone, string>> = {
|
|
46
|
+
neutral: 'text-muted-foreground',
|
|
47
|
+
accent: 'text-brand',
|
|
48
|
+
good: 'text-good',
|
|
49
|
+
warn: 'text-warn',
|
|
50
|
+
bad: 'text-bad',
|
|
51
|
+
info: 'text-info',
|
|
52
|
+
}
|
|
53
|
+
/** The now dot's fill per tone, behind the host's `--basalt-spark-now` override. */
|
|
54
|
+
const SPARK_NOW: Readonly<Record<Tone, string>> = {
|
|
55
|
+
neutral: 'var(--color-foreground)',
|
|
56
|
+
accent: 'var(--basalt-brand)',
|
|
57
|
+
good: 'var(--basalt-good)',
|
|
58
|
+
warn: 'var(--basalt-warn)',
|
|
59
|
+
bad: 'var(--basalt-bad)',
|
|
60
|
+
info: 'var(--basalt-info)',
|
|
61
|
+
}
|
|
43
62
|
|
|
44
63
|
const isFinite = (v: number | null): v is number => v !== null && Number.isFinite(v)
|
|
45
64
|
|
|
@@ -52,8 +71,8 @@ const isFinite = (v: number | null): v is number => v !== null && Number.isFinit
|
|
|
52
71
|
* crosses it to both edges. `cap` holds an outlier on the top edge under an
|
|
53
72
|
* off-scale caret. `compare` draws a second series in muted ink on the same scale; `threshold` draws a
|
|
54
73
|
* dashed rule, names it where the plot is 40 px or taller and dots every breach. With a `focus`
|
|
55
|
-
* (`useChartFocus` over the same items) the points walk the page's one focus, and a held run (a table row that stands for several points) is a band over them.
|
|
56
|
-
*
|
|
74
|
+
* (`useChartFocus` over the same items) the points walk the page's one focus, and a held run (a table row that stands for several points) is a band over them. `tone` paints the line, its area and the now dot in a status tone (default `neutral`, the muted ink);
|
|
75
|
+
* a host may still set `--basalt-spark-now` to recolor the dot. `sentence` says what the line shows and is its name; the drawing is hidden
|
|
57
76
|
* from it.
|
|
58
77
|
*
|
|
59
78
|
* @useWhen a card, a table row or a strip shows the trend of one metric in a small box
|
|
@@ -88,6 +107,7 @@ export function SparklineView(
|
|
|
88
107
|
const t = useMessages(mark)
|
|
89
108
|
const { points, height, width, form = 'line', reference, cap, axisLabels, format } = props
|
|
90
109
|
const { compare, threshold, focus } = props
|
|
110
|
+
const tone = props.tone ?? 'neutral'
|
|
91
111
|
const gradient = useId().replaceAll(':', '')
|
|
92
112
|
const { f, fmt } = useSparkFormat(format)
|
|
93
113
|
// A shared focus indexes the points as given, so they are not pooled under it.
|
|
@@ -208,7 +228,7 @@ export function SparklineView(
|
|
|
208
228
|
>
|
|
209
229
|
{form === 'area' && (
|
|
210
230
|
<>
|
|
211
|
-
<defs>
|
|
231
|
+
<defs className={SPARK_INK[tone]}>
|
|
212
232
|
<linearGradient id={gradient} x1="0" y1="0" x2="0" y2="1">
|
|
213
233
|
<stop offset="0" stopColor="currentColor" stopOpacity="0.22" />
|
|
214
234
|
<stop offset="1" stopColor="currentColor" stopOpacity="0" />
|
|
@@ -306,6 +326,8 @@ export function SparklineView(
|
|
|
306
326
|
))}
|
|
307
327
|
<path
|
|
308
328
|
data-slot="spark-line"
|
|
329
|
+
data-tone={tone}
|
|
330
|
+
className={SPARK_INK[tone]}
|
|
309
331
|
d={g.line}
|
|
310
332
|
fill="none"
|
|
311
333
|
stroke="currentColor"
|
|
@@ -365,7 +387,7 @@ export function SparklineView(
|
|
|
365
387
|
style={{
|
|
366
388
|
left: `${(now.x / plotW) * 100}%`,
|
|
367
389
|
top: `${(now.y / plotH) * 100}%`,
|
|
368
|
-
background:
|
|
390
|
+
background: `var(--basalt-spark-now, ${SPARK_NOW[tone]})`,
|
|
369
391
|
}}
|
|
370
392
|
/>
|
|
371
393
|
)}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* @generated basalt-ui — do not edit; regenerate with the command on the next line */
|
|
2
|
+
/* basalt-ui 3.0.0 — `bun packages/basalt-ui/src/css/generate.ts` */
|
|
3
|
+
/* Opt-in, imported after tailwind.css (or static.css): the Tailwind scale names the basalt theme
|
|
4
|
+
clears (sm, lg and 2xl; radius; shadow; text-xl and up) and the shadcn color names. md and xl stay
|
|
5
|
+
840px and 1200px. primary becomes the brand fill, for basalt parts too: brand text is text-brand. */
|
|
6
|
+
@theme {
|
|
7
|
+
--breakpoint-sm: 640px;
|
|
8
|
+
--breakpoint-lg: 1024px;
|
|
9
|
+
--breakpoint-2xl: 1536px;
|
|
10
|
+
--radius: var(--basalt-radius-chip);
|
|
11
|
+
--radius-xs: var(--basalt-radius-chip);
|
|
12
|
+
--radius-sm: var(--basalt-radius-chip);
|
|
13
|
+
--radius-md: var(--basalt-radius-chip);
|
|
14
|
+
--radius-lg: var(--basalt-radius-ctrl);
|
|
15
|
+
--radius-xl: var(--basalt-radius-card);
|
|
16
|
+
--radius-2xl: var(--basalt-radius-card);
|
|
17
|
+
--radius-3xl: var(--basalt-radius-card);
|
|
18
|
+
--radius-4xl: calc(infinity * 1px);
|
|
19
|
+
--text-xl: 1.25rem;
|
|
20
|
+
--text-xl--line-height: calc(1.75 / 1.25);
|
|
21
|
+
--text-2xl: 1.5rem;
|
|
22
|
+
--text-2xl--line-height: calc(2 / 1.5);
|
|
23
|
+
--text-3xl: 1.875rem;
|
|
24
|
+
--text-3xl--line-height: calc(2.25 / 1.875);
|
|
25
|
+
--text-4xl: 2.25rem;
|
|
26
|
+
--text-4xl--line-height: calc(2.5 / 2.25);
|
|
27
|
+
--text-5xl: 3rem;
|
|
28
|
+
--text-5xl--line-height: 1;
|
|
29
|
+
--text-6xl: 3.75rem;
|
|
30
|
+
--text-6xl--line-height: 1;
|
|
31
|
+
--text-7xl: 4.5rem;
|
|
32
|
+
--text-7xl--line-height: 1;
|
|
33
|
+
--text-8xl: 6rem;
|
|
34
|
+
--text-8xl--line-height: 1;
|
|
35
|
+
--text-9xl: 8rem;
|
|
36
|
+
--text-9xl--line-height: 1;
|
|
37
|
+
}
|
|
38
|
+
@theme inline {
|
|
39
|
+
--shadow: var(--basalt-shadow-raised);
|
|
40
|
+
--shadow-2xs: var(--basalt-shadow-raised);
|
|
41
|
+
--shadow-xs: var(--basalt-shadow-raised);
|
|
42
|
+
--shadow-sm: var(--basalt-shadow-raised);
|
|
43
|
+
--shadow-md: var(--basalt-shadow-overlay);
|
|
44
|
+
--shadow-lg: var(--basalt-shadow-overlay);
|
|
45
|
+
--shadow-xl: var(--basalt-shadow-overlay);
|
|
46
|
+
--shadow-2xl: var(--basalt-shadow-overlay);
|
|
47
|
+
--color-primary: var(--basalt-brand-fill);
|
|
48
|
+
--color-primary-foreground: var(--basalt-on-brand);
|
|
49
|
+
--color-card-foreground: var(--basalt-ink);
|
|
50
|
+
--color-popover-foreground: var(--basalt-ink);
|
|
51
|
+
--color-secondary-foreground: var(--basalt-ink);
|
|
52
|
+
--color-accent-foreground: var(--basalt-ink);
|
|
53
|
+
--color-destructive-foreground: var(--basalt-canvas);
|
|
54
|
+
--color-sidebar: var(--basalt-card);
|
|
55
|
+
--color-sidebar-foreground: var(--basalt-ink);
|
|
56
|
+
--color-sidebar-primary: var(--basalt-brand-fill);
|
|
57
|
+
--color-sidebar-primary-foreground: var(--basalt-on-brand);
|
|
58
|
+
--color-sidebar-accent: var(--basalt-hover);
|
|
59
|
+
--color-sidebar-accent-foreground: var(--basalt-ink);
|
|
60
|
+
--color-sidebar-border: var(--basalt-hairline);
|
|
61
|
+
--color-sidebar-ring: var(--basalt-brand);
|
|
62
|
+
--font-heading: var(--basalt-font-head);
|
|
63
|
+
}
|
package/src/css/generate.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Renders the
|
|
3
|
-
* `starlight`, `archify`) from
|
|
2
|
+
* Renders the nine committed CSS entries (`tokens`, `typography`, `prose`, `fonts`, `tailwind`, `static`,
|
|
3
|
+
* `starlight`, `archify`, `bridge`) from
|
|
4
4
|
* the token table. Pure and deterministic: no clock, no environment. The provenance version is the
|
|
5
5
|
* fixed contract major, so a release bump never dirties a committed file.
|
|
6
6
|
*
|
|
@@ -10,6 +10,13 @@ import { readFileSync, writeFileSync } from 'node:fs'
|
|
|
10
10
|
import { join } from 'node:path'
|
|
11
11
|
import { emitTokensCss, provenanceHeader } from '../tokens/emit'
|
|
12
12
|
import { bridgeEntries, resolveTokens } from '../tokens/table'
|
|
13
|
+
import {
|
|
14
|
+
BRIDGE_BREAKPOINTS,
|
|
15
|
+
BRIDGE_COLORS,
|
|
16
|
+
BRIDGE_RADII,
|
|
17
|
+
BRIDGE_SHADOWS,
|
|
18
|
+
BRIDGE_TYPE_STEPS,
|
|
19
|
+
} from '../tokens/bridge-sheet'
|
|
13
20
|
import { MOTION_ENTER_FROM } from '../tokens/motion'
|
|
14
21
|
import { SITE_TEXT_STEPS } from '../tokens/site-text'
|
|
15
22
|
import type { MotionPresetName } from '../tokens/motion'
|
|
@@ -23,6 +30,7 @@ export type CssFileName =
|
|
|
23
30
|
| 'static.css'
|
|
24
31
|
| 'starlight.css'
|
|
25
32
|
| 'archify.css'
|
|
33
|
+
| 'bridge.css'
|
|
26
34
|
|
|
27
35
|
const CONTRACT_VERSION = '3.0.0'
|
|
28
36
|
const COMMAND = 'bun packages/basalt-ui/src/css/generate.ts'
|
|
@@ -327,16 +335,45 @@ const archifyCss = (): string =>
|
|
|
327
335
|
.join(''),
|
|
328
336
|
)
|
|
329
337
|
|
|
338
|
+
// ── bridge.css ──────────────────────────────────────────────────────────────────────────────────
|
|
339
|
+
|
|
340
|
+
const scaled = (namespace: string, values: Readonly<Record<string, string>>): string[] =>
|
|
341
|
+
Object.entries(values).map(
|
|
342
|
+
([step, value]) => `--${namespace}${step === '' ? '' : `-${step}`}: ${value}`,
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
const bridgeCss = (): string =>
|
|
346
|
+
header() +
|
|
347
|
+
'/* Opt-in, imported after tailwind.css (or static.css): the Tailwind scale names the basalt theme\n' +
|
|
348
|
+
' clears (sm, lg and 2xl; radius; shadow; text-xl and up) and the shadcn color names. md and xl stay\n' +
|
|
349
|
+
' 840px and 1200px. primary becomes the brand fill, for basalt parts too: brand text is text-brand. */\n' +
|
|
350
|
+
block('@theme', [
|
|
351
|
+
...scaled('breakpoint', BRIDGE_BREAKPOINTS),
|
|
352
|
+
...scaled('radius', BRIDGE_RADII),
|
|
353
|
+
...Object.entries(BRIDGE_TYPE_STEPS).flatMap(([step, [size, lineHeight]]) => [
|
|
354
|
+
`--text-${step}: ${size}`,
|
|
355
|
+
`--text-${step}--line-height: ${lineHeight}`,
|
|
356
|
+
]),
|
|
357
|
+
]) +
|
|
358
|
+
block('@theme inline', [
|
|
359
|
+
...scaled('shadow', BRIDGE_SHADOWS),
|
|
360
|
+
...Object.entries(BRIDGE_COLORS).map(
|
|
361
|
+
([name, token]) => `--color-${name}: var(--basalt-${token})`,
|
|
362
|
+
),
|
|
363
|
+
'--font-heading: var(--basalt-font-head)',
|
|
364
|
+
])
|
|
365
|
+
|
|
330
366
|
// ── entry ───────────────────────────────────────────────────────────────────────────────────────
|
|
331
367
|
|
|
332
368
|
const staticCss = (): string => tailwindCss('static')
|
|
333
369
|
|
|
334
370
|
const starlightCss = (): string => header() + template('starlight')
|
|
335
371
|
|
|
336
|
-
/** The
|
|
372
|
+
/** The nine CSS entries, byte for byte as committed. */
|
|
337
373
|
export function generateCss(): Record<CssFileName, string> {
|
|
338
374
|
return {
|
|
339
375
|
'archify.css': archifyCss(),
|
|
376
|
+
'bridge.css': bridgeCss(),
|
|
340
377
|
'tokens.css': emitTokensCss({ version: CONTRACT_VERSION }),
|
|
341
378
|
'typography.css': typographyCss(),
|
|
342
379
|
'prose.css': proseCss(),
|
|
@@ -33,7 +33,7 @@ export type Freshness =
|
|
|
33
33
|
/** A third-party source: its failures never count toward Offline. */
|
|
34
34
|
external?: true
|
|
35
35
|
}
|
|
36
|
-
| { class: 'pushed'; fallback: number; safety: number }
|
|
36
|
+
| { class: 'pushed'; fallback: number; safety: number | false }
|
|
37
37
|
|
|
38
38
|
/** The shape `liveQuery` reads and returns: any `queryOptions()` result satisfies it. */
|
|
39
39
|
export type QueryOptionsLike = {
|
|
@@ -106,7 +106,8 @@ function planOf(freshness: Freshness): Plan {
|
|
|
106
106
|
if (freshness.class === 'pushed') {
|
|
107
107
|
const { fallback, safety } = freshness
|
|
108
108
|
return {
|
|
109
|
-
staleTime
|
|
109
|
+
// `false` polls nothing while the stream is live; Query reads a `false` staleTime as 0, so it takes `fallback`.
|
|
110
|
+
staleTime: safety === false ? fallback : safety,
|
|
110
111
|
refetchInterval: (query: AnyQuery) =>
|
|
111
112
|
skipsTimer(query, 'pushed') ? false : isStreamLive(query) ? safety : fallback,
|
|
112
113
|
refetchOnWindowFocus: true,
|
|
@@ -168,7 +169,7 @@ function withDevAsserts(options: QueryOptionsLike): unknown {
|
|
|
168
169
|
* `{ class: 'pushed', fallback, safety }` (objects).
|
|
169
170
|
* A ticker runs `every` after the previous result, skips while hidden (unless `background`),
|
|
170
171
|
* offline, mutating (`pauseWhileMutating`) or after a 401/403, and a function `every` returning
|
|
171
|
-
* `false` means idle (staleness 30 s, not 0). Needs a client from `createQueryClient`.
|
|
172
|
+
* `false` means idle (staleness 30 s, not 0). A `pushed` query polls at `fallback` while the stream is down and at `safety` while it is live; `safety: false` never polls while live. Needs a client from `createQueryClient`.
|
|
172
173
|
*
|
|
173
174
|
* @useWhen a query is polled, pushed, cross-device or static and its cadence belongs in the factory, not the component
|
|
174
175
|
* @neverWhen an observer would set its own `staleTime` or `refetchInterval`; the class owns both
|
package/src/lint/preset.ts
CHANGED
|
@@ -122,7 +122,7 @@ const CORE_PROFILES: readonly PresetProfile[] = ['parts', 'app']
|
|
|
122
122
|
const SHADCN_RULES = [...SHADCN_TOKEN_RULES, SHADCN_RESTYLE] as const
|
|
123
123
|
|
|
124
124
|
/** The npm specifiers oxlint loads as JS plugins; the shipped file extends from a consumer's tree. */
|
|
125
|
-
export const JS_PLUGINS = ['basalt-ui/lint', '
|
|
125
|
+
export const JS_PLUGINS = ['basalt-ui/lint', 'basalt-ui/lint/shadcn'] as const
|
|
126
126
|
|
|
127
127
|
/** `no-restyle` recognises primitives by import specifier: basalt's own at parts and app. */
|
|
128
128
|
export const PARTS_COMPONENT_IMPORTS = ['^basalt-ui/ui/'] as const
|
|
@@ -285,6 +285,12 @@ export type PresetInputs = {
|
|
|
285
285
|
readonly profile: PresetProfile
|
|
286
286
|
/** `manifest.roots`: a path to the profile its files lint at (E6). */
|
|
287
287
|
readonly roots?: Readonly<Record<string, PresetProfile>>
|
|
288
|
+
/**
|
|
289
|
+
* The preset applies to `roots` only: the top level turns every rule it owns off, and each root
|
|
290
|
+
* (one at the default profile too) switches its profile's rules on through an override. Server, CLI
|
|
291
|
+
* and test code beside the app then stays on the base. Unset, the default profile covers every file.
|
|
292
|
+
*/
|
|
293
|
+
readonly scoped?: boolean
|
|
288
294
|
/** Zone E: `manifest.ejected[*].path`. */
|
|
289
295
|
readonly ejected?: readonly string[]
|
|
290
296
|
/** Zone S: seeds, in basalt-ui's own repo only. */
|
|
@@ -293,6 +299,8 @@ export type PresetInputs = {
|
|
|
293
299
|
readonly bespoke?: readonly string[]
|
|
294
300
|
/** The manifest declares two or more `locales`: the literal-text guards run. */
|
|
295
301
|
readonly translated?: boolean
|
|
302
|
+
/** `manifest.wordModules`: a site root's words modules, where the literal-text guards stand down. */
|
|
303
|
+
readonly wordModules?: readonly string[]
|
|
296
304
|
/** `manifest.classPrefixes`: third-party class prefixes (`maplibregl-`) `no-unknown-classes` lets through. */
|
|
297
305
|
readonly classPrefixes?: readonly string[]
|
|
298
306
|
}
|
|
@@ -518,6 +526,17 @@ const offAll = (names: readonly string[]): Rules => Object.fromEntries(names.map
|
|
|
518
526
|
const literalsOff = (inputs: PresetInputs): Rules =>
|
|
519
527
|
inputs.translated === true ? { [JSX_LITERALS_RULE]: 'off' } : {}
|
|
520
528
|
|
|
529
|
+
/**
|
|
530
|
+
* `manifest.wordModules`: the modules a site root keeps a language's words in, off for both halves of
|
|
531
|
+
* the literal-text guard.
|
|
532
|
+
*/
|
|
533
|
+
function wordModuleZone(files: readonly string[]): Override {
|
|
534
|
+
return {
|
|
535
|
+
files: [...files],
|
|
536
|
+
rules: { [JSX_LITERALS_RULE]: 'off', [`${PLUGIN_NAME}/label-literal`]: 'off' },
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
521
540
|
/**
|
|
522
541
|
* Zones E and S: eject transfers structure, never tokens. The file is the primitive, so the rules that
|
|
523
542
|
* police how a primitive is built from structure go off: the ones in the table, `no-restyle`, and the
|
|
@@ -554,7 +573,10 @@ function vendoredZone(files: string, inputs: PresetInputs): Override {
|
|
|
554
573
|
}
|
|
555
574
|
}
|
|
556
575
|
|
|
557
|
-
const rootGlob = (root: string): string =>
|
|
576
|
+
const rootGlob = (root: string): string => {
|
|
577
|
+
const clean = root.replace(/\/+$/, '')
|
|
578
|
+
return clean === '.' || clean === '' ? '**' : `${clean}/**`
|
|
579
|
+
}
|
|
558
580
|
|
|
559
581
|
/** The profile an ejected file lints at: its longest declared root, else the default. */
|
|
560
582
|
function profileOfPath(path: string, inputs: PresetInputs): PresetProfile {
|
|
@@ -626,9 +648,12 @@ const ROUTE_FILE_OVERRIDE: Override = {
|
|
|
626
648
|
rules: { 'react/only-export-components': 'off' },
|
|
627
649
|
}
|
|
628
650
|
|
|
651
|
+
const depth = (root: string): number => (root === '.' ? 0 : root.split('/').length)
|
|
652
|
+
|
|
629
653
|
/**
|
|
630
654
|
* The preset for a manifest: the default profile's rules at the top, one `overrides` block per
|
|
631
|
-
* root whose profile differs (E6), then the zone blocks. `
|
|
655
|
+
* root whose profile differs (E6), then the zone blocks. With `scoped` the top level holds every rule
|
|
656
|
+
* off and each root, one at the default profile too, carries its rules in its own block. `undefined` when every file lints at
|
|
632
657
|
* `tokens`: that profile ships no oxlint preset.
|
|
633
658
|
*/
|
|
634
659
|
export function buildPreset(inputs: PresetInputs): PresetConfig | undefined {
|
|
@@ -638,18 +663,32 @@ export function buildPreset(inputs: PresetInputs): PresetConfig | undefined {
|
|
|
638
663
|
|
|
639
664
|
// Route files keep their component unexported so the router splits it; the rule would warn on `Route`.
|
|
640
665
|
const overrides: Override[] = [ROUTE_FILE_OVERRIDE]
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
666
|
+
const scoped = inputs.scoped === true
|
|
667
|
+
// Zone V first: a root at another profile then re-enables its own `components/ui` files. A scoped
|
|
668
|
+
// preset has no repo-wide profile, so each bridge-like root carries its own zone below.
|
|
669
|
+
if (!scoped && BRIDGE_LIKE.includes(inputs.profile))
|
|
670
|
+
overrides.push(vendoredZone(VENDORED_GLOB, inputs))
|
|
671
|
+
// A nested root comes after the root that holds it, so the narrower profile wins.
|
|
672
|
+
const ordered = scoped ? roots.toSorted(([a], [b]) => depth(a) - depth(b)) : roots
|
|
673
|
+
const rootZone = (root: string): Override =>
|
|
674
|
+
vendoredZone(`${rootGlob(root)}/components/ui/**`, inputs)
|
|
675
|
+
for (const [root, profile] of ordered) {
|
|
676
|
+
if (scoped || profile !== inputs.profile) {
|
|
645
677
|
overrides.push({ files: [rootGlob(root)], rules: rulesFor(profile, inputs) })
|
|
646
678
|
}
|
|
679
|
+
// Scoped, a root's zone follows its own block, so a root nested in it at another profile still wins.
|
|
680
|
+
if (scoped && BRIDGE_LIKE.includes(profile)) overrides.push(rootZone(root))
|
|
681
|
+
}
|
|
682
|
+
if (!scoped) {
|
|
683
|
+
for (const [root, profile] of roots) {
|
|
684
|
+
if (BRIDGE_LIKE.includes(profile)) overrides.push(rootZone(root))
|
|
685
|
+
}
|
|
647
686
|
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
687
|
+
if (inputs.translated === true) {
|
|
688
|
+
overrides.push({ files: TEST_GLOBS, rules: literalsOff(inputs) })
|
|
689
|
+
const words = inputs.wordModules ?? []
|
|
690
|
+
if (words.length > 0) overrides.push(wordModuleZone(words))
|
|
651
691
|
}
|
|
652
|
-
if (inputs.translated === true) overrides.push({ files: TEST_GLOBS, rules: literalsOff(inputs) })
|
|
653
692
|
// Zone B before E and S: an ejected file inside a bespoke directory keeps the rule off.
|
|
654
693
|
overrides.push(...bespokeZones(inputs.bespoke ?? [], inputs))
|
|
655
694
|
const ejected = inputs.ejected ?? []
|
|
@@ -664,7 +703,7 @@ export function buildPreset(inputs: PresetInputs): PresetConfig | undefined {
|
|
|
664
703
|
...ruleSettings(inputs.uiSlots),
|
|
665
704
|
basalt: { pins: { oxlint: inputs.pins.oxlint, '@shadcn/lint': inputs.pins.shadcnLint } },
|
|
666
705
|
},
|
|
667
|
-
rules: { ...rulesFor(inputs.profile, inputs), ...A11Y_OFF },
|
|
706
|
+
rules: { ...(scoped ? allOff(inputs) : rulesFor(inputs.profile, inputs)), ...A11Y_OFF },
|
|
668
707
|
overrides,
|
|
669
708
|
}
|
|
670
709
|
}
|
|
@@ -712,7 +751,7 @@ export function overBase(preset: PresetConfig, base: string): PresetConfig {
|
|
|
712
751
|
*/
|
|
713
752
|
export const shippedPreset = (
|
|
714
753
|
profile: (typeof SHIPPED_PROFILES)[number],
|
|
715
|
-
inputs: Omit<PresetInputs, 'profile' | 'roots' | 'ejected' | 'seeds' | 'bespoke'>,
|
|
754
|
+
inputs: Omit<PresetInputs, 'profile' | 'roots' | 'ejected' | 'seeds' | 'bespoke' | 'wordModules'>,
|
|
716
755
|
): PresetConfig => {
|
|
717
756
|
const preset = buildPreset({ ...inputs, profile })
|
|
718
757
|
if (!preset) throw new Error(`no preset for profile ${profile}`)
|
|
@@ -475,8 +475,10 @@ export const CLASS_RULES = defineRules({
|
|
|
475
475
|
id: 'off-scale',
|
|
476
476
|
// A duration or delay that is not a scale step (`duration-300`, `delay-[120ms]`), or an
|
|
477
477
|
// easing that is not the stylesheet's (`ease-linear`, `ease-in`, `ease-[…]`), with or without variants.
|
|
478
|
+
// A duration needs a value shape (a number, `[…]`, `(…)`, `${…}`, `initial`): the walker also reads
|
|
479
|
+
// class-shaped strings in constants, where a data id such as `duration-bands` is no class.
|
|
478
480
|
pattern:
|
|
479
|
-
/(?:^|:)!?(?:(?:duration|delay)-(?!(
|
|
481
|
+
/(?:^|:)!?(?:(?:duration|delay)-(?!0!?$)(?:\d|[[(]|\$\{|initial!?$)|ease-(?:(?:linear|in-out|in|out)(?![\w-])|[[(]))/,
|
|
480
482
|
fix: 'Duration and delay from the motion scale: duration-fast, duration-base, duration-slow, duration-0; easing from ease-standard, ease-enter, ease-exit; the stagger utility for a list',
|
|
481
483
|
next: 'A cva variant over those steps, or a reasoned waiver',
|
|
482
484
|
fixture: 'class/motion-off-scale/off-scale.tsx',
|
|
@@ -224,7 +224,7 @@ type Use = {
|
|
|
224
224
|
const outsideHome: AstForm = {
|
|
225
225
|
id: 'outside-home',
|
|
226
226
|
fix: 'Put the control in a home: FormField (or f.FormField from basalt-ui/form), FilterSet, ViewTabs or ControlHome around it, or filterSlot.custom(handle, label, render) over a field handle',
|
|
227
|
-
next: 'A value that lives as long as its dialog is useLocalControl(...) bound through FormField control= or a handle prop; a panel-local value of another store takes <ControlHome home="..."> with externalField; a counted line waiver names why no home fits',
|
|
227
|
+
next: 'A value that lives as long as its dialog is useLocalControl(...) bound through FormField control= or a handle prop; a panel-local value of another store takes <ControlHome home="..."> with externalField; a control that sends a request and stores nothing (a volume sent on release) takes <ControlHome home="command">; a counted line waiver names why no home fits',
|
|
228
228
|
fixture: 'control-home/outside-home.tsx',
|
|
229
229
|
detect: ({ report }): Visitor => {
|
|
230
230
|
/** Local names bound to a control primitive. */
|
|
@@ -379,6 +379,7 @@ export const SHIPPED_PRIMITIVES: ReadonlySet<string> = new Set([
|
|
|
379
379
|
'progress',
|
|
380
380
|
'quick-picks',
|
|
381
381
|
'radio-group',
|
|
382
|
+
'remote-pad',
|
|
382
383
|
'resizable',
|
|
383
384
|
'scroll-area',
|
|
384
385
|
'segmented',
|
|
@@ -792,6 +793,7 @@ const STACK_PACKAGES: ReadonlySet<string> = new Set([
|
|
|
792
793
|
'shiki',
|
|
793
794
|
'pele',
|
|
794
795
|
'eventsource-parser',
|
|
796
|
+
'yaml',
|
|
795
797
|
'tailwindcss',
|
|
796
798
|
'vite',
|
|
797
799
|
'vite-plugin-pwa',
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
*
|
|
20
20
|
* Text is a string that holds a letter, so a dash or a separator passes, as does what a catalogue
|
|
21
21
|
* produces: a tagged template (`t\`Revenue\``), a call (`i18n._(…)`) and anything inside `<Trans>`.
|
|
22
|
+
* A `site` root has no catalogue: the preset turns both halves off in the `.ts` modules its manifest
|
|
23
|
+
* names under `wordModules`.
|
|
22
24
|
* A module named `untranslated` or `words` (a block's default words, which a consumer passes
|
|
23
25
|
* `words` over) is not read for module constants.
|
|
24
26
|
* Known limits: a label built in a function the declaration calls, a constant imported from another
|
|
@@ -244,7 +246,7 @@ function inCatalogue(node: Node): boolean {
|
|
|
244
246
|
const FIX =
|
|
245
247
|
'The app declares more than one language (manifest locales): take the text from its message catalogue, for example title={t`Revenue`} or <Trans>Revenue</Trans>'
|
|
246
248
|
const NEXT =
|
|
247
|
-
'Text no reader translates (a brand, a unit, a code sample) is a constant imported from one untranslated module, or a waiver that says why'
|
|
249
|
+
'Text no reader translates (a brand, a unit, a code sample) is a constant imported from one untranslated module, or a waiver that says why. A site root that keeps its words in a module per language names those .ts modules in manifest wordModules, then runs basalt-ui sync'
|
|
248
250
|
|
|
249
251
|
export const textProp: AstForm = {
|
|
250
252
|
id: 'text-prop',
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `basalt-ui/lint/shadcn` — the bought `@shadcn/lint` plugin with one false positive closed (tooling,
|
|
3
|
+
* no app bundle). Peers: `@shadcn/lint`.
|
|
4
|
+
*
|
|
5
|
+
* The bought rules read the arguments of a call named cva or tv as Tailwind classes by the callee's
|
|
6
|
+
* name alone, so a file's own tv helper, `(room, command) => ...`, has every string argument reported as
|
|
7
|
+
* "no class or variant". Their settings only add helper names, none removes one. This wrapper keeps the
|
|
8
|
+
* plugin name (so rule ids, waivers and messages are unchanged) and drops a report that sits
|
|
9
|
+
* inside a call to a tv or cva the file itself defines as a function. An import of either name, or a
|
|
10
|
+
* binding built by a factory call, stays read as the library's.
|
|
11
|
+
*/
|
|
12
|
+
import shadcn from '@shadcn/lint'
|
|
13
|
+
|
|
14
|
+
/** The variant factories the bought rules match by name. */
|
|
15
|
+
const VARIANT_FACTORIES: ReadonlySet<string> = new Set(['cva', 'tv'])
|
|
16
|
+
|
|
17
|
+
interface AstNode {
|
|
18
|
+
type: string
|
|
19
|
+
parent?: AstNode | null
|
|
20
|
+
name?: string
|
|
21
|
+
callee?: AstNode
|
|
22
|
+
id?: AstNode | null
|
|
23
|
+
init?: AstNode | null
|
|
24
|
+
declaration?: AstNode | null
|
|
25
|
+
declarations?: AstNode[]
|
|
26
|
+
body?: AstNode[]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface Context {
|
|
30
|
+
report: (descriptor: { node?: AstNode }) => void
|
|
31
|
+
sourceCode?: { ast?: AstNode }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const FUNCTION_VALUES: ReadonlySet<string> = new Set([
|
|
35
|
+
'ArrowFunctionExpression',
|
|
36
|
+
'FunctionExpression',
|
|
37
|
+
])
|
|
38
|
+
|
|
39
|
+
/** The factory names the program's own top level defines as a function (declared or assigned). */
|
|
40
|
+
function localFactories(program: AstNode | undefined): ReadonlySet<string> {
|
|
41
|
+
const local = new Set<string>()
|
|
42
|
+
for (const statement of program?.body ?? []) {
|
|
43
|
+
const node = statement.type === 'ExportNamedDeclaration' ? statement.declaration : statement
|
|
44
|
+
if (!node) continue
|
|
45
|
+
if (node.type === 'FunctionDeclaration' && node.id?.name) local.add(node.id.name)
|
|
46
|
+
if (node.type !== 'VariableDeclaration') continue
|
|
47
|
+
for (const declarator of node.declarations ?? []) {
|
|
48
|
+
const name = declarator.id?.type === 'Identifier' ? declarator.id.name : undefined
|
|
49
|
+
if (name && declarator.init && FUNCTION_VALUES.has(declarator.init.type)) local.add(name)
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return new Set([...local].filter((name) => VARIANT_FACTORIES.has(name)))
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function insideLocalFactory(node: AstNode | undefined, local: ReadonlySet<string>): boolean {
|
|
56
|
+
for (let at = node; at; at = at.parent ?? undefined) {
|
|
57
|
+
const callee = at.type === 'CallExpression' ? at.callee : undefined
|
|
58
|
+
if (callee?.type === 'Identifier' && callee.name && local.has(callee.name)) return true
|
|
59
|
+
}
|
|
60
|
+
return false
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function guarded(context: Context): Context {
|
|
64
|
+
let local: ReadonlySet<string> | undefined
|
|
65
|
+
// oxlint freezes its context, so a Proxy cannot answer `report` differently; a child object can.
|
|
66
|
+
return Object.create(context, {
|
|
67
|
+
report: {
|
|
68
|
+
value: (descriptor: { node?: AstNode }) => {
|
|
69
|
+
local ??= localFactories(context.sourceCode?.ast)
|
|
70
|
+
if (!insideLocalFactory(descriptor.node, local)) context.report(descriptor)
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
}) as Context
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const rules = Object.fromEntries(
|
|
77
|
+
Object.entries(shadcn.rules).map(([id, rule]) => [
|
|
78
|
+
id,
|
|
79
|
+
{
|
|
80
|
+
...rule,
|
|
81
|
+
create: (context: Context) =>
|
|
82
|
+
(rule.create as (context: Context) => unknown)(guarded(context)),
|
|
83
|
+
},
|
|
84
|
+
]),
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
/** The plugin oxlint loads through `jsPlugins: ["basalt-ui/lint/shadcn"]`; rules report as `shadcn/<id>`. */
|
|
88
|
+
const plugin = { meta: shadcn.meta, rules }
|
|
89
|
+
|
|
90
|
+
// oxlint-disable-next-line import/no-default-export -- oxlint loads a JS plugin's default export
|
|
91
|
+
export default plugin
|
|
@@ -31,6 +31,8 @@ export type RenderOptions = {
|
|
|
31
31
|
* files outside every root, and each root's own flag. Absent, the ban holds everywhere.
|
|
32
32
|
*/
|
|
33
33
|
scroll?: { base: boolean; roots: Record<string, boolean> }
|
|
34
|
+
/** The manifest's `bespoke` directories: no status, chart or brand color ban and no raw-track ban. */
|
|
35
|
+
bespoke?: readonly string[]
|
|
34
36
|
/** Generated token sheets (the manifest's `tokens[].out` paths, css only): stylelint cannot read a line-1 marker. */
|
|
35
37
|
ignoreFiles?: readonly string[]
|
|
36
38
|
}
|
|
@@ -61,14 +63,42 @@ function scrollOverrides({ base, roots }: NonNullable<RenderOptions['scroll']>):
|
|
|
61
63
|
})
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
/** One override per bespoke directory, keeping the scroll flag of the root that holds it. */
|
|
67
|
+
function bespokeOverrides(
|
|
68
|
+
dirs: readonly string[],
|
|
69
|
+
{ base, roots }: NonNullable<RenderOptions['scroll']>,
|
|
70
|
+
): Override[] {
|
|
71
|
+
return dirs.map((raw) => {
|
|
72
|
+
const dir = raw.replace(/^\.\//, '').replace(/\/+$/, '')
|
|
73
|
+
const root = Object.keys(roots)
|
|
74
|
+
.toSorted((a, b) => a.length - b.length)
|
|
75
|
+
.findLast((r) => r === dir || encloses(r, dir))
|
|
76
|
+
return {
|
|
77
|
+
files: [rootGlob(dir)],
|
|
78
|
+
rules: {
|
|
79
|
+
'declaration-property-value-disallowed-list': disallowedValueList(
|
|
80
|
+
root === undefined ? base : (roots[root] ?? base),
|
|
81
|
+
true,
|
|
82
|
+
),
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
|
|
64
88
|
/** The config as an object, with `ignoreFiles` listing the generated sheets. */
|
|
65
|
-
export function stylelintConfig({
|
|
89
|
+
export function stylelintConfig({
|
|
90
|
+
ignoreFiles = [],
|
|
91
|
+
scroll,
|
|
92
|
+
bespoke = [],
|
|
93
|
+
}: RenderOptions = {}): StylelintConfig {
|
|
66
94
|
const base = scroll?.base ?? true
|
|
67
95
|
return {
|
|
68
96
|
...REPORT_OPTIONS,
|
|
69
97
|
overrides: [
|
|
70
98
|
{ files: HTML_STYLE_FILES, customSyntax: 'postcss-html' },
|
|
71
99
|
...(scroll === undefined ? [] : scrollOverrides(scroll)),
|
|
100
|
+
// last: a bespoke directory sits inside a root and wins over its flag
|
|
101
|
+
...bespokeOverrides(bespoke, scroll ?? { base: true, roots: {} }),
|
|
72
102
|
],
|
|
73
103
|
ignoreFiles: [...ignoreFiles],
|
|
74
104
|
rules: base
|
|
@@ -100,6 +100,8 @@ type ValueGroup = {
|
|
|
100
100
|
clause: string
|
|
101
101
|
roles?: readonly { value: string; clause: string }[]
|
|
102
102
|
scrollOnly?: true
|
|
103
|
+
/** Off in a `bespoke` directory, which draws its own surface. */
|
|
104
|
+
surfaceOff?: true
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
/** A transition or animation timing longhand, or the shorthands that carry one. */
|
|
@@ -141,6 +143,7 @@ const VALUE_GROUPS: readonly ValueGroup[] = [
|
|
|
141
143
|
{
|
|
142
144
|
properties: DECORATION_PROPERTIES,
|
|
143
145
|
values: [`/${DECORATIVE_ROLE}/i`],
|
|
146
|
+
surfaceOff: true,
|
|
144
147
|
clause: `${DECORATION_LEAD}, never a status, chart or brand color: a status color or tint is Status, Badge, DeltaBadge or a Num tone, a chart color belongs to a chart kind, and only a brand tint is var(--basalt-selected) or a surface token`,
|
|
145
148
|
roles: [
|
|
146
149
|
{
|
|
@@ -173,6 +176,7 @@ const VALUE_GROUPS: readonly ValueGroup[] = [
|
|
|
173
176
|
{
|
|
174
177
|
properties: TRACK_PROPERTIES,
|
|
175
178
|
values: [`/${RAW_LENGTH}/i`],
|
|
179
|
+
surfaceOff: true,
|
|
176
180
|
clause:
|
|
177
181
|
'grid-template, grid-template-columns and -rows, grid-auto-columns and -rows size tracks by fr, auto or minmax(0,1fr), never a raw length',
|
|
178
182
|
},
|
|
@@ -198,29 +202,33 @@ const VALUE_GROUPS: readonly ValueGroup[] = [
|
|
|
198
202
|
},
|
|
199
203
|
]
|
|
200
204
|
|
|
201
|
-
const groupsFor = (scroll: boolean): readonly ValueGroup[] =>
|
|
202
|
-
VALUE_GROUPS.filter(
|
|
205
|
+
const groupsFor = (scroll: boolean, bespoke: boolean): readonly ValueGroup[] =>
|
|
206
|
+
VALUE_GROUPS.filter(
|
|
207
|
+
(group) => (scroll || group.scrollOnly !== true) && (!bespoke || group.surfaceOff !== true),
|
|
208
|
+
)
|
|
203
209
|
|
|
204
210
|
/**
|
|
205
211
|
* `%s` takes the property, then the value. The rendered config is JSON, so the message cannot be a
|
|
206
212
|
* function of the property: it carries every clause, each led by the properties it answers, and
|
|
207
213
|
* `basalt-ui lint` narrows a report to its own clause (`valueListMessage`).
|
|
208
214
|
*/
|
|
209
|
-
const fullMessage = (scroll: boolean): string =>
|
|
210
|
-
`Disallowed \`%s: %s\`. By property: ${groupsFor(scroll)
|
|
215
|
+
const fullMessage = (scroll: boolean, bespoke: boolean): string =>
|
|
216
|
+
`Disallowed \`%s: %s\`. By property: ${groupsFor(scroll, bespoke)
|
|
211
217
|
.map((group) => group.clause)
|
|
212
218
|
.join('; ')}.`
|
|
213
219
|
|
|
214
220
|
/**
|
|
215
221
|
* The value-disallowed list. `scroll` adds the bans that hold from `parts` up; a `tokens` or
|
|
216
|
-
* `bridge` file omits both.
|
|
222
|
+
* `bridge` file omits both. `bespoke` drops the status, chart and brand color ban and the raw-track
|
|
223
|
+
* ban: a surface the app draws itself (a felt, a seating plan) spends them. Colors stay tokens.
|
|
217
224
|
*/
|
|
218
225
|
export function disallowedValueList(
|
|
219
226
|
scroll: boolean,
|
|
227
|
+
bespoke = false,
|
|
220
228
|
): readonly [Record<string, string[]>, { message: string }] {
|
|
221
229
|
return [
|
|
222
|
-
Object.fromEntries(groupsFor(scroll).map((group) => [group.properties, group.values])),
|
|
223
|
-
{ message: fullMessage(scroll) },
|
|
230
|
+
Object.fromEntries(groupsFor(scroll, bespoke).map((group) => [group.properties, group.values])),
|
|
231
|
+
{ message: fullMessage(scroll, bespoke) },
|
|
224
232
|
]
|
|
225
233
|
}
|
|
226
234
|
|
|
@@ -243,8 +251,12 @@ export function valueListMessage(text: string): string {
|
|
|
243
251
|
const match = REPORTED.exec(text)
|
|
244
252
|
if (!match) return text
|
|
245
253
|
const [head, property = '', value = ''] = match
|
|
254
|
+
// The configured message holds the spacing clause always, and a ban only where it runs: a bespoke
|
|
255
|
+
// directory's report must not quote the bans that are off there.
|
|
256
|
+
const configured = text.includes(VALUE_GROUPS[0]?.clause ?? '')
|
|
246
257
|
const clauses = VALUE_GROUPS.filter(
|
|
247
258
|
(group) =>
|
|
259
|
+
(group.surfaceOff !== true || !configured || text.includes(group.clause)) &&
|
|
248
260
|
regexOf(group.properties).test(property) &&
|
|
249
261
|
group.values.some((pattern) => regexOf(pattern).test(value)),
|
|
250
262
|
).map(
|