basalt-ui 2.29.0 → 3.0.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 +67 -108
- package/CHANGELOG.md +41 -0
- package/MIGRATING.md +1634 -6569
- package/README.md +373 -505
- package/agent/reviewer/basalt-design-reviewer.md +33 -0
- package/agent/reviewer/basalt-site-reviewer.md +27 -0
- package/agent/reviewer/rubric-site.md +98 -0
- package/agent/reviewer/rubric.md +140 -0
- package/agent/rules/basalt-charts.md +25 -23
- package/agent/rules/basalt-page.md +60 -0
- package/agent/rules/basalt-site.md +35 -0
- package/agent/rules/basalt-state.md +37 -30
- package/agent/rules/basalt-tokens.md +25 -37
- package/agent/rules/basalt-ui.md +45 -0
- package/agent/skills/basalt-app/SKILL.md +59 -274
- package/agent/skills/basalt-app/references/live.md +112 -0
- package/agent/skills/basalt-app/references/migrate.md +111 -0
- package/agent/skills/basalt-app/references/performance.md +69 -0
- package/agent/skills/basalt-app/references/recipes.md +50 -0
- package/agent/skills/basalt-app/references/setup.md +101 -0
- package/agent/skills/basalt-app/references/testing.md +35 -0
- package/agent/skills/basalt-charts/SKILL.md +18 -32
- package/agent/skills/basalt-charts/references/advanced.md +43 -0
- package/agent/skills/basalt-charts/references/custom-marks.md +80 -0
- package/agent/skills/basalt-charts/references/linked-parts.md +83 -0
- package/agent/skills/basalt-design/SKILL.md +46 -25
- package/agent/skills/basalt-design/references/ai.md +64 -0
- package/agent/skills/basalt-design/references/anti-defaults.md +54 -18
- package/agent/skills/basalt-design/references/cards.md +73 -0
- package/agent/skills/basalt-design/references/chart-color.md +30 -0
- package/agent/skills/basalt-design/references/chart-form.md +43 -0
- package/agent/skills/basalt-design/references/chart-honest.md +35 -0
- package/agent/skills/basalt-design/references/chart-labels.md +32 -0
- package/agent/skills/basalt-design/references/chart-view.md +40 -0
- package/agent/skills/basalt-design/references/charts.md +15 -0
- package/agent/skills/basalt-design/references/concept.md +55 -27
- package/agent/skills/basalt-design/references/controls.md +28 -0
- package/agent/skills/basalt-design/references/copy.md +65 -0
- package/agent/skills/basalt-design/references/encoding.md +87 -0
- package/agent/skills/basalt-design/references/forms.md +70 -0
- package/agent/skills/basalt-design/references/gaps.md +54 -0
- package/agent/skills/basalt-design/references/ladder.md +60 -0
- package/agent/skills/basalt-design/references/motion.md +73 -0
- package/agent/skills/basalt-design/references/parts.md +199 -0
- package/agent/skills/basalt-design/references/phone.md +53 -0
- package/agent/skills/basalt-design/references/state.md +40 -0
- package/agent/skills/basalt-design/references/states.md +30 -27
- package/agent/skills/basalt-design/references/table.md +141 -0
- package/agent/skills/basalt-site/SKILL.md +43 -0
- package/agent/skills/basalt-site/references/content.md +37 -0
- package/agent/templates/AGENTS-block.md.tpl +18 -21
- package/agent/templates/AGENTS-block.site.md.tpl +28 -0
- package/agent/templates/AGENTS-block.tokens.md.tpl +15 -0
- package/agent/templates/DESIGN.md.tpl +22 -31
- package/agent/templates/__root.start.tpl +64 -0
- package/agent/templates/__root.tpl +9 -18
- package/agent/templates/_app-error.i18n.tpl +69 -0
- package/agent/templates/_app-error.tpl +67 -0
- package/agent/templates/_app-index.i18n.tpl +27 -0
- package/agent/templates/_app-index.tpl +24 -0
- package/agent/templates/_app-missing.i18n.tpl +35 -0
- package/agent/templates/_app-missing.tpl +32 -0
- package/agent/templates/_app-pending.i18n.tpl +17 -0
- package/agent/templates/_app-pending.tpl +15 -0
- package/agent/templates/_app.tpl +23 -0
- package/agent/templates/basalt.tokens.ts.tpl +15 -0
- package/agent/templates/e2e-app.spec.ts.tpl +11 -0
- package/agent/templates/hook-opencode.js.tpl +42 -0
- package/agent/templates/hook-pi.js.tpl +45 -0
- package/agent/templates/hook-run.js.tpl +52 -0
- package/agent/templates/hook.mjs.tpl +45 -0
- package/agent/templates/i18n.ts.tpl +78 -0
- package/agent/templates/lingui.config.ts.tpl +18 -0
- package/agent/templates/localized-provider.tsx.tpl +42 -0
- package/agent/templates/main.i18n.tpl +59 -0
- package/agent/templates/main.tpl +42 -9
- package/agent/templates/nav.i18n.tpl +23 -0
- package/agent/templates/nav.tpl +12 -10
- package/agent/templates/playwright.config.ts.tpl +16 -0
- package/agent/templates/po.d.ts.tpl +4 -0
- package/agent/templates/router.start.tpl +44 -0
- package/agent/templates/seed-messages.json +104 -0
- package/agent/templates/site-index.astro.tpl +11 -0
- package/agent/templates/site-layout.astro.tpl +28 -0
- package/bin/basalt-ui.mjs +7 -3
- package/blocks/assistant/Assistant.tsx +168 -0
- package/blocks/assistant/block.json +23 -0
- package/blocks/assistant/model.ts +15 -0
- package/blocks/assistant/words.ts +18 -0
- package/blocks/create-flow/NewOrderDialog.tsx +300 -0
- package/blocks/create-flow/block.json +31 -0
- package/blocks/create-flow/model.ts +18 -0
- package/blocks/create-flow/words.ts +77 -0
- package/blocks/list-page/ListPage.tsx +318 -0
- package/blocks/list-page/PartRecord.tsx +142 -0
- package/blocks/list-page/block.json +31 -0
- package/blocks/list-page/model.ts +49 -0
- package/blocks/list-page/words.ts +85 -0
- package/blocks/mailbox/Mailbox.tsx +714 -0
- package/blocks/mailbox/block.json +34 -0
- package/blocks/mailbox/model.ts +39 -0
- package/blocks/mailbox/words.ts +60 -0
- package/blocks/notes-list/NotesList.tsx +176 -0
- package/blocks/notes-list/block.json +23 -0
- package/blocks/notes-list/model.ts +16 -0
- package/blocks/notes-list/words.ts +38 -0
- package/blocks/record-page/RecordPage.tsx +575 -0
- package/blocks/record-page/block.json +31 -0
- package/blocks/record-page/model.ts +84 -0
- package/blocks/record-page/words.ts +106 -0
- package/blocks/settings-page/SettingsPage.tsx +372 -0
- package/blocks/settings-page/block.json +31 -0
- package/blocks/settings-page/model.ts +11 -0
- package/blocks/settings-page/words.ts +115 -0
- package/configs/check.yml +2 -4
- package/configs/lefthook.yml +6 -49
- package/configs/oxfmt-tailwind.json +11 -0
- package/configs/oxlint-app.json +795 -0
- package/configs/oxlint-bridge.json +308 -0
- package/configs/oxlint-parts.json +800 -0
- package/configs/oxlint-site.json +351 -0
- package/configs/stylelint.basalt.json +154 -0
- package/dist/ai/caret.d.ts +7 -0
- package/dist/ai/caret.d.ts.map +1 -0
- package/dist/ai/caret.js +47 -0
- package/dist/ai/catalog/block.d.ts +4 -0
- package/dist/ai/catalog/block.d.ts.map +1 -0
- package/dist/ai/catalog/block.js +87 -0
- package/dist/ai/catalog/define.d.ts +53 -0
- package/dist/ai/catalog/define.d.ts.map +1 -0
- package/dist/ai/catalog/define.js +36 -0
- package/dist/ai/catalog/validate.d.ts +24 -0
- package/dist/ai/catalog/validate.d.ts.map +1 -0
- package/dist/ai/catalog/validate.js +95 -0
- package/dist/ai/composer.d.ts +74 -0
- package/dist/ai/composer.d.ts.map +1 -0
- package/dist/ai/composer.js +423 -0
- package/dist/ai/contract.d.ts +162 -0
- package/dist/ai/contract.d.ts.map +1 -0
- package/dist/ai/glyphs.d.ts +19 -0
- package/dist/ai/glyphs.d.ts.map +1 -0
- package/dist/ai/glyphs.js +44 -0
- package/dist/ai/index.d.ts +23 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +16 -0
- package/dist/ai/mention-text.d.ts +49 -0
- package/dist/ai/mention-text.d.ts.map +1 -0
- package/dist/ai/mention-text.js +57 -0
- package/dist/ai/message.d.ts +69 -0
- package/dist/ai/message.d.ts.map +1 -0
- package/dist/ai/message.js +119 -0
- package/dist/ai/model-picker.d.ts +42 -0
- package/dist/ai/model-picker.d.ts.map +1 -0
- package/dist/ai/model-picker.js +98 -0
- package/dist/ai/part-view.d.ts +18 -0
- package/dist/ai/part-view.d.ts.map +1 -0
- package/dist/ai/part-view.js +87 -0
- package/dist/ai/reasoning-trace.d.ts +34 -0
- package/dist/ai/reasoning-trace.d.ts.map +1 -0
- package/dist/ai/reasoning-trace.js +138 -0
- package/dist/ai/tool-view.d.ts +30 -0
- package/dist/ai/tool-view.d.ts.map +1 -0
- package/dist/ai/tool-view.js +29 -0
- package/dist/astro/BasaltFonts.astro +32 -0
- package/dist/astro/SiteHead.astro +21 -0
- package/dist/astro/build.d.ts +17 -0
- package/dist/astro/build.d.ts.map +1 -0
- package/dist/astro/build.js +69 -0
- package/dist/astro/fonts.d.ts +22 -0
- package/dist/astro/fonts.d.ts.map +1 -0
- package/dist/astro/fonts.js +23 -0
- package/dist/astro/head.d.ts +78 -0
- package/dist/astro/head.d.ts.map +1 -0
- package/dist/astro/head.js +84 -0
- package/dist/astro/index.d.ts +76 -0
- package/dist/astro/index.d.ts.map +1 -0
- package/dist/astro/index.js +111 -0
- package/dist/astro/islands.d.ts +22 -0
- package/dist/astro/islands.d.ts.map +1 -0
- package/dist/astro/islands.js +63 -0
- package/dist/astro/mdx/Chart.astro +25 -0
- package/dist/astro/mdx/DataTable.astro +27 -0
- package/dist/astro/mdx/chart-island.d.ts +60 -0
- package/dist/astro/mdx/chart-island.d.ts.map +1 -0
- package/dist/astro/mdx/chart-island.js +94 -0
- package/dist/astro/mdx/messages.d.ts +9 -0
- package/dist/astro/mdx/messages.d.ts.map +1 -0
- package/dist/astro/mdx/table-island.d.ts +27 -0
- package/dist/astro/mdx/table-island.d.ts.map +1 -0
- package/dist/astro/mdx/table-island.js +45 -0
- package/dist/astro/notes.d.ts +30 -0
- package/dist/astro/notes.d.ts.map +1 -0
- package/dist/astro/notes.js +147 -0
- package/dist/astro/parts.d.ts +24 -0
- package/dist/astro/parts.d.ts.map +1 -0
- package/dist/astro/parts.js +492 -0
- package/dist/astro/shiki.d.ts +28 -0
- package/dist/astro/shiki.d.ts.map +1 -0
- package/dist/astro/shiki.js +8 -0
- package/dist/astro/sources.d.ts +18 -0
- package/dist/astro/sources.d.ts.map +1 -0
- package/dist/astro/sources.js +72 -0
- package/dist/cards/bar-list-scroll.d.ts +29 -0
- package/dist/cards/bar-list-scroll.d.ts.map +1 -0
- package/dist/cards/bar-list-scroll.js +53 -0
- package/dist/cards/bar-list.d.ts +107 -0
- package/dist/cards/bar-list.d.ts.map +1 -0
- package/dist/cards/bar-list.js +269 -0
- package/dist/cards/board.d.ts +80 -0
- package/dist/cards/board.d.ts.map +1 -0
- package/dist/cards/board.js +314 -0
- package/dist/cards/chain-layout.d.ts +59 -0
- package/dist/cards/chain-layout.d.ts.map +1 -0
- package/dist/cards/chain-layout.js +211 -0
- package/dist/cards/chain-view.d.ts +73 -0
- package/dist/cards/chain-view.d.ts.map +1 -0
- package/dist/cards/chain-view.js +481 -0
- package/dist/cards/contract.d.ts +180 -0
- package/dist/cards/contract.d.ts.map +1 -0
- package/dist/cards/data-panel.d.ts +54 -0
- package/dist/cards/data-panel.d.ts.map +1 -0
- package/dist/cards/data-panel.js +351 -0
- package/dist/cards/edge-path.d.ts +38 -0
- package/dist/cards/edge-path.d.ts.map +1 -0
- package/dist/cards/edge-path.js +36 -0
- package/dist/cards/event-list-model.d.ts +67 -0
- package/dist/cards/event-list-model.d.ts.map +1 -0
- package/dist/cards/event-list-model.js +98 -0
- package/dist/cards/event-list.d.ts +84 -0
- package/dist/cards/event-list.d.ts.map +1 -0
- package/dist/cards/event-list.js +358 -0
- package/dist/cards/flow-canvas.d.ts +54 -0
- package/dist/cards/flow-canvas.d.ts.map +1 -0
- package/dist/cards/flow-canvas.js +668 -0
- package/dist/cards/flow-checklist.d.ts +25 -0
- package/dist/cards/flow-checklist.d.ts.map +1 -0
- package/dist/cards/flow-checklist.js +67 -0
- package/dist/cards/flow.d.ts +93 -0
- package/dist/cards/flow.d.ts.map +1 -0
- package/dist/cards/flow.js +45 -0
- package/dist/cards/frame-kit.d.ts +67 -0
- package/dist/cards/frame-kit.d.ts.map +1 -0
- package/dist/cards/frame-kit.js +60 -0
- package/dist/cards/frame-types.type-guard.d.ts +17 -0
- package/dist/cards/frame-types.type-guard.d.ts.map +1 -0
- package/dist/cards/frame-types.type-guard.js +29 -0
- package/dist/cards/index.d.ts +41 -0
- package/dist/cards/index.d.ts.map +1 -0
- package/dist/cards/index.js +49 -0
- package/dist/cards/kanban-actions.d.ts +17 -0
- package/dist/cards/kanban-actions.d.ts.map +1 -0
- package/dist/cards/kanban-actions.js +26 -0
- package/dist/cards/kanban-card.d.ts +34 -0
- package/dist/cards/kanban-card.d.ts.map +1 -0
- package/dist/cards/kanban-card.js +264 -0
- package/dist/cards/list-focus.d.ts +76 -0
- package/dist/cards/list-focus.d.ts.map +1 -0
- package/dist/cards/list-focus.js +212 -0
- package/dist/cards/mail-list.d.ts +104 -0
- package/dist/cards/mail-list.d.ts.map +1 -0
- package/dist/cards/mail-list.js +436 -0
- package/dist/cards/mail-thread.d.ts +56 -0
- package/dist/cards/mail-thread.d.ts.map +1 -0
- package/dist/cards/mail-thread.js +142 -0
- package/dist/cards/period-label.d.ts +8 -0
- package/dist/cards/period-label.d.ts.map +1 -0
- package/dist/cards/period-label.js +27 -0
- package/dist/cards/relationship-card.d.ts +67 -0
- package/dist/cards/relationship-card.d.ts.map +1 -0
- package/dist/cards/relationship-card.js +82 -0
- package/dist/cards/row-list.d.ts +98 -0
- package/dist/cards/row-list.d.ts.map +1 -0
- package/dist/cards/row-list.js +190 -0
- package/dist/cards/schedule-model.d.ts +81 -0
- package/dist/cards/schedule-model.d.ts.map +1 -0
- package/dist/cards/schedule-model.js +80 -0
- package/dist/cards/schedule.d.ts +106 -0
- package/dist/cards/schedule.d.ts.map +1 -0
- package/dist/cards/schedule.js +925 -0
- package/dist/cards/stat-card-parts.d.ts +18 -0
- package/dist/cards/stat-card-parts.d.ts.map +1 -0
- package/dist/cards/stat-card-parts.js +56 -0
- package/dist/cards/stat-card.d.ts +37 -0
- package/dist/cards/stat-card.d.ts.map +1 -0
- package/dist/cards/stat-card.js +234 -0
- package/dist/cards/stat-cell.d.ts +56 -0
- package/dist/cards/stat-cell.d.ts.map +1 -0
- package/dist/cards/stat-cell.js +410 -0
- package/dist/cards/stat-group-shared.d.ts +21 -0
- package/dist/cards/stat-group-shared.d.ts.map +1 -0
- package/dist/cards/stat-group-shared.js +26 -0
- package/dist/cards/stat-group.d.ts +44 -0
- package/dist/cards/stat-group.d.ts.map +1 -0
- package/dist/cards/stat-group.js +183 -0
- package/dist/cards/step-rail.d.ts +45 -0
- package/dist/cards/step-rail.d.ts.map +1 -0
- package/dist/cards/step-rail.js +125 -0
- package/dist/cards/viewport.d.ts +66 -0
- package/dist/cards/viewport.d.ts.map +1 -0
- package/dist/cards/viewport.js +219 -0
- package/dist/charts/axis-gaps.d.ts +170 -0
- package/dist/charts/axis-gaps.d.ts.map +1 -0
- package/dist/charts/axis-gaps.js +310 -0
- package/dist/charts/box.d.ts +8 -2
- package/dist/charts/box.d.ts.map +1 -1
- package/dist/charts/box.js +28 -8
- package/dist/charts/canvas.d.ts +45 -0
- package/dist/charts/canvas.d.ts.map +1 -0
- package/dist/charts/canvas.js +103 -0
- package/dist/charts/card-context.d.ts +6 -0
- package/dist/charts/card-context.d.ts.map +1 -1
- package/dist/charts/card-context.js +5 -0
- package/dist/charts/chart-box.module.css +199 -43
- package/dist/charts/chart-box.module.css.d.ts +2 -0
- package/dist/charts/chart-dates.d.ts +8 -6
- package/dist/charts/chart-dates.d.ts.map +1 -1
- package/dist/charts/chart-dates.js +21 -6
- package/dist/charts/chart-labels-widths.gen.d.ts +22 -0
- package/dist/charts/chart-labels-widths.gen.d.ts.map +1 -0
- package/dist/charts/chart-labels-widths.gen.js +879 -0
- package/dist/charts/chart-labels.d.ts +173 -0
- package/dist/charts/chart-labels.d.ts.map +1 -0
- package/dist/charts/chart-labels.js +93 -0
- package/dist/charts/chart-legend.module.css +50 -5
- package/dist/charts/chart-legend.module.css.d.ts +1 -0
- package/dist/charts/contract.d.ts +647 -0
- package/dist/charts/contract.d.ts.map +1 -0
- package/dist/charts/core/axis-ext.d.ts +86 -0
- package/dist/charts/core/axis-ext.d.ts.map +1 -0
- package/dist/charts/core/axis-ext.js +369 -0
- package/dist/charts/core/bar-values.d.ts +44 -0
- package/dist/charts/core/bar-values.d.ts.map +1 -0
- package/dist/charts/core/bar-values.js +682 -0
- package/dist/charts/core/compile.d.ts +258 -0
- package/dist/charts/core/compile.d.ts.map +1 -0
- package/dist/charts/core/compile.js +2234 -0
- package/dist/charts/core/cursor.d.ts +107 -0
- package/dist/charts/core/cursor.d.ts.map +1 -0
- package/dist/charts/core/cursor.js +249 -0
- package/dist/charts/core/curves.d.ts +12 -0
- package/dist/charts/core/curves.d.ts.map +1 -0
- package/dist/charts/core/curves.js +86 -0
- package/dist/charts/core/label-backing.d.ts +29 -0
- package/dist/charts/core/label-backing.d.ts.map +1 -0
- package/dist/charts/core/label-backing.js +40 -0
- package/dist/charts/core/label-ties.d.ts +16 -0
- package/dist/charts/core/label-ties.d.ts.map +1 -0
- package/dist/charts/core/label-ties.js +62 -0
- package/dist/charts/core/plot-context.d.ts +24 -0
- package/dist/charts/core/plot-context.d.ts.map +1 -0
- package/dist/charts/core/plot-context.js +55 -0
- package/dist/charts/core/portal.d.ts +7 -0
- package/dist/charts/core/portal.d.ts.map +1 -0
- package/dist/charts/core/portal.js +124 -0
- package/dist/charts/core/probe/bar.d.ts +2 -0
- package/dist/charts/core/probe/bar.d.ts.map +1 -0
- package/dist/charts/core/probe/bar.js +23 -0
- package/dist/charts/core/probe/base0.d.ts +2 -0
- package/dist/charts/core/probe/base0.d.ts.map +1 -0
- package/dist/charts/core/probe/base0.js +4 -0
- package/dist/charts/core/probe/line.d.ts +2 -0
- package/dist/charts/core/probe/line.d.ts.map +1 -0
- package/dist/charts/core/probe/line.js +19 -0
- package/dist/charts/core/probe/sparkline.d.ts +2 -0
- package/dist/charts/core/probe/sparkline.d.ts.map +1 -0
- package/dist/charts/core/probe/sparkline.js +52 -0
- package/dist/charts/core/readout-clear.d.ts +106 -0
- package/dist/charts/core/readout-clear.d.ts.map +1 -0
- package/dist/charts/core/readout-clear.js +87 -0
- package/dist/charts/core/rich-tooltip.d.ts +56 -0
- package/dist/charts/core/rich-tooltip.d.ts.map +1 -0
- package/dist/charts/core/rich-tooltip.js +71 -0
- package/dist/charts/core/right-pin.d.ts +17 -0
- package/dist/charts/core/right-pin.d.ts.map +1 -0
- package/dist/charts/core/right-pin.js +52 -0
- package/dist/charts/core/scales.d.ts +91 -0
- package/dist/charts/core/scales.d.ts.map +1 -0
- package/dist/charts/core/scales.js +326 -0
- package/dist/charts/core/spread.d.ts +37 -0
- package/dist/charts/core/spread.d.ts.map +1 -0
- package/dist/charts/core/spread.js +98 -0
- package/dist/charts/core/theme.d.ts +88 -0
- package/dist/charts/core/theme.d.ts.map +1 -0
- package/dist/charts/core/theme.js +85 -0
- package/dist/charts/core/ticks.d.ts.map +1 -0
- package/dist/charts/core/ticks.js +42 -0
- package/dist/charts/csv.d.ts +6 -0
- package/dist/charts/csv.d.ts.map +1 -0
- package/dist/charts/csv.js +27 -0
- package/dist/charts/date-tick-format.d.ts +3 -3
- package/dist/charts/date-tick-format.d.ts.map +1 -1
- package/dist/charts/date-tick-format.js +21 -16
- package/dist/charts/engine-marks.d.ts +77 -0
- package/dist/charts/engine-marks.d.ts.map +1 -0
- package/dist/charts/engine-marks.js +20 -0
- package/dist/charts/focus.d.ts +96 -0
- package/dist/charts/focus.d.ts.map +1 -0
- package/dist/charts/focus.js +115 -0
- package/dist/charts/host.d.ts +7 -3
- package/dist/charts/host.d.ts.map +1 -1
- package/dist/charts/host.js +40 -24
- package/dist/charts/index.d.ts +23 -20
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/charts/index.js +36 -21
- package/dist/charts/label-obstacles.d.ts +91 -0
- package/dist/charts/label-obstacles.d.ts.map +1 -0
- package/dist/charts/label-obstacles.js +142 -0
- package/dist/charts/label-place.d.ts +47 -0
- package/dist/charts/label-place.d.ts.map +1 -0
- package/dist/charts/label-place.js +209 -0
- package/dist/charts/label-widths.d.ts +10 -0
- package/dist/charts/label-widths.d.ts.map +1 -0
- package/dist/charts/label-widths.js +14 -0
- package/dist/charts/labels.d.ts +75 -2
- package/dist/charts/labels.d.ts.map +1 -1
- package/dist/charts/labels.js +220 -14
- package/dist/charts/legend.d.ts +25 -4
- package/dist/charts/legend.d.ts.map +1 -1
- package/dist/charts/legend.js +175 -39
- package/dist/charts/marks.d.ts +71 -2
- package/dist/charts/marks.d.ts.map +1 -1
- package/dist/charts/marks.js +123 -12
- package/dist/charts/pane-gutter.d.ts +8 -0
- package/dist/charts/pane-gutter.d.ts.map +1 -0
- package/dist/charts/pane-gutter.js +5 -0
- package/dist/charts/parts/band-fold.d.ts +65 -0
- package/dist/charts/parts/band-fold.d.ts.map +1 -0
- package/dist/charts/parts/band-fold.js +46 -0
- package/dist/charts/parts/band-strip.d.ts +95 -0
- package/dist/charts/parts/band-strip.d.ts.map +1 -0
- package/dist/charts/parts/band-strip.js +434 -0
- package/dist/charts/parts/bars-marks.d.ts +41 -0
- package/dist/charts/parts/bars-marks.d.ts.map +1 -0
- package/dist/charts/parts/bars-marks.js +225 -0
- package/dist/charts/parts/bars.d.ts +39 -0
- package/dist/charts/parts/bars.d.ts.map +1 -0
- package/dist/charts/parts/bars.js +8 -0
- package/dist/charts/parts/cartesian-adapt.d.ts +82 -0
- package/dist/charts/parts/cartesian-adapt.d.ts.map +1 -0
- package/dist/charts/parts/cartesian-adapt.js +277 -0
- package/dist/charts/parts/cartesian-selection.d.ts +12 -0
- package/dist/charts/parts/cartesian-selection.d.ts.map +1 -0
- package/dist/charts/parts/cartesian-selection.js +17 -0
- package/dist/charts/parts/cartesian.d.ts +54 -0
- package/dist/charts/parts/cartesian.d.ts.map +1 -0
- package/dist/charts/parts/cartesian.js +701 -0
- package/dist/charts/parts/chart-card-frame.d.ts +34 -0
- package/dist/charts/parts/chart-card-frame.d.ts.map +1 -0
- package/dist/charts/parts/chart-card-frame.js +112 -0
- package/dist/charts/parts/chart-card.d.ts +95 -0
- package/dist/charts/parts/chart-card.d.ts.map +1 -0
- package/dist/charts/parts/chart-card.js +350 -0
- package/dist/charts/parts/chart-panes.d.ts +26 -0
- package/dist/charts/parts/chart-panes.d.ts.map +1 -0
- package/dist/charts/parts/chart-panes.js +70 -0
- package/dist/charts/parts/heatmap-fill.d.ts.map +1 -0
- package/dist/charts/parts/heatmap-ink.d.ts +9 -0
- package/dist/charts/parts/heatmap-ink.d.ts.map +1 -0
- package/dist/charts/parts/heatmap-ink.js +19 -0
- package/dist/charts/parts/heatmap.d.ts +156 -0
- package/dist/charts/parts/heatmap.d.ts.map +1 -0
- package/dist/charts/parts/heatmap.js +450 -0
- package/dist/charts/parts/interval-layout.d.ts +45 -0
- package/dist/charts/parts/interval-layout.d.ts.map +1 -0
- package/dist/charts/parts/interval-layout.js +45 -0
- package/dist/charts/parts/interval-track.d.ts +109 -0
- package/dist/charts/parts/interval-track.d.ts.map +1 -0
- package/dist/charts/parts/interval-track.js +543 -0
- package/dist/charts/parts/legend.d.ts +33 -0
- package/dist/charts/parts/legend.d.ts.map +1 -0
- package/dist/charts/parts/legend.js +62 -0
- package/dist/charts/parts/lines-marks.d.ts +32 -0
- package/dist/charts/parts/lines-marks.d.ts.map +1 -0
- package/dist/charts/parts/lines-marks.js +175 -0
- package/dist/charts/parts/lines.d.ts +35 -0
- package/dist/charts/parts/lines.d.ts.map +1 -0
- package/dist/charts/parts/lines.js +8 -0
- package/dist/charts/parts/range-navigator.d.ts +70 -0
- package/dist/charts/parts/range-navigator.d.ts.map +1 -0
- package/dist/charts/parts/range-navigator.js +128 -0
- package/dist/charts/parts/range-navigator.module.css +50 -0
- package/dist/charts/parts/range-navigator.module.css.d.ts +9 -0
- package/dist/charts/parts/sparkline-probe/both.d.ts +2 -0
- package/dist/charts/parts/sparkline-probe/both.d.ts.map +1 -0
- package/dist/charts/parts/sparkline-probe/both.js +31 -0
- package/dist/charts/parts/sparkline-probe/mini-bars.d.ts +2 -0
- package/dist/charts/parts/sparkline-probe/mini-bars.d.ts.map +1 -0
- package/dist/charts/parts/sparkline-probe/mini-bars.js +17 -0
- package/dist/charts/parts/sparkline-probe/sparkline.d.ts +2 -0
- package/dist/charts/parts/sparkline-probe/sparkline.d.ts.map +1 -0
- package/dist/charts/parts/sparkline-probe/sparkline.js +19 -0
- package/dist/charts/parts/tooltip.d.ts +41 -0
- package/dist/charts/parts/tooltip.d.ts.map +1 -0
- package/dist/charts/parts/tooltip.js +42 -0
- package/dist/charts/parts/waterfall.d.ts +64 -0
- package/dist/charts/parts/waterfall.d.ts.map +1 -0
- package/dist/charts/parts/waterfall.js +112 -0
- package/dist/charts/plot-context.d.ts +4 -1
- package/dist/charts/plot-context.d.ts.map +1 -1
- package/dist/charts/plot-context.js +1 -1
- package/dist/charts/ref-label.d.ts +41 -4
- package/dist/charts/ref-label.d.ts.map +1 -1
- package/dist/charts/ref-label.js +94 -16
- package/dist/charts/seams/bar-opacity.d.ts +6 -0
- package/dist/charts/seams/bar-opacity.d.ts.map +1 -0
- package/dist/charts/seams/bar-opacity.js +8 -0
- package/dist/charts/seams/define.d.ts +51 -0
- package/dist/charts/seams/define.d.ts.map +1 -0
- package/dist/charts/seams/define.js +25 -0
- package/dist/charts/seams/lone-point.d.ts +3 -0
- package/dist/charts/seams/lone-point.d.ts.map +1 -0
- package/dist/charts/seams/lone-point.js +8 -0
- package/dist/charts/seams/pixel-extent.d.ts +23 -0
- package/dist/charts/seams/pixel-extent.d.ts.map +1 -0
- package/dist/charts/seams/pixel-extent.js +23 -0
- package/dist/charts/seams/plot-data.d.ts +3 -0
- package/dist/charts/seams/plot-data.d.ts.map +1 -0
- package/dist/charts/seams/plot-data.js +8 -0
- package/dist/charts/seams/plot-px.d.ts +11 -0
- package/dist/charts/seams/plot-px.d.ts.map +1 -0
- package/dist/charts/seams/plot-px.js +17 -0
- package/dist/charts/seams/plot-scales.d.ts +29 -0
- package/dist/charts/seams/plot-scales.d.ts.map +1 -0
- package/dist/charts/seams/plot-scales.js +33 -0
- package/dist/charts/seams/series-axis.d.ts +3 -0
- package/dist/charts/seams/series-axis.d.ts.map +1 -0
- package/dist/charts/seams/series-axis.js +8 -0
- package/dist/charts/seams/series-dash.d.ts +3 -0
- package/dist/charts/seams/series-dash.d.ts.map +1 -0
- package/dist/charts/seams/series-dash.js +8 -0
- package/dist/charts/seams/series-format.d.ts +3 -0
- package/dist/charts/seams/series-format.d.ts.map +1 -0
- package/dist/charts/seams/series-format.js +8 -0
- package/dist/charts/seams/series-gaps.d.ts +3 -0
- package/dist/charts/seams/series-gaps.d.ts.map +1 -0
- package/dist/charts/seams/series-gaps.js +8 -0
- package/dist/charts/seams/series-legend-tooltip.d.ts +3 -0
- package/dist/charts/seams/series-legend-tooltip.d.ts.map +1 -0
- package/dist/charts/seams/series-legend-tooltip.js +8 -0
- package/dist/charts/seams/series-marker.d.ts +3 -0
- package/dist/charts/seams/series-marker.d.ts.map +1 -0
- package/dist/charts/seams/series-marker.js +8 -0
- package/dist/charts/seams/series-note.d.ts +3 -0
- package/dist/charts/seams/series-note.d.ts.map +1 -0
- package/dist/charts/seams/series-note.js +8 -0
- package/dist/charts/seams/series-parent.d.ts +3 -0
- package/dist/charts/seams/series-parent.d.ts.map +1 -0
- package/dist/charts/seams/series-parent.js +8 -0
- package/dist/charts/seams/series-role.d.ts +3 -0
- package/dist/charts/seams/series-role.d.ts.map +1 -0
- package/dist/charts/seams/series-role.js +8 -0
- package/dist/charts/seams/series-weight.d.ts +3 -0
- package/dist/charts/seams/series-weight.d.ts.map +1 -0
- package/dist/charts/seams/series-weight.js +8 -0
- package/dist/charts/seams/x-domain.d.ts +3 -0
- package/dist/charts/seams/x-domain.d.ts.map +1 -0
- package/dist/charts/seams/x-domain.js +8 -0
- package/dist/charts/seams/y-domain.d.ts +32 -0
- package/dist/charts/seams/y-domain.d.ts.map +1 -0
- package/dist/charts/seams/y-domain.js +93 -0
- package/dist/charts/seams/y-gutter.d.ts +12 -0
- package/dist/charts/seams/y-gutter.d.ts.map +1 -0
- package/dist/charts/seams/y-gutter.js +18 -0
- package/dist/charts/seams.d.ts +18 -0
- package/dist/charts/seams.d.ts.map +1 -0
- package/dist/charts/seams.js +49 -0
- package/dist/charts/sizing.d.ts +11 -0
- package/dist/charts/sizing.d.ts.map +1 -1
- package/dist/charts/sizing.js +6 -2
- package/dist/charts/state.d.ts +2 -2
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +45 -22
- package/dist/charts/text-measure.d.ts +10 -0
- package/dist/charts/text-measure.d.ts.map +1 -0
- package/dist/charts/text-measure.js +26 -0
- package/dist/charts/tooltip-body.d.ts +16 -0
- package/dist/charts/tooltip-body.d.ts.map +1 -0
- package/dist/charts/tooltip-body.js +59 -0
- package/dist/charts/track.d.ts +101 -0
- package/dist/charts/track.d.ts.map +1 -0
- package/dist/charts/track.js +189 -0
- package/dist/charts/types.d.ts +126 -12
- package/dist/charts/types.d.ts.map +1 -1
- package/dist/cli/add/catalog.d.ts +26 -0
- package/dist/cli/add/catalog.d.ts.map +1 -0
- package/dist/cli/add/catalog.js +70 -0
- package/dist/cli/add/help.d.ts +4 -0
- package/dist/cli/add/help.d.ts.map +1 -0
- package/dist/cli/add/help.js +42 -0
- package/dist/cli/add/index.d.ts +6 -0
- package/dist/cli/add/index.d.ts.map +1 -0
- package/dist/cli/add/index.js +157 -0
- package/dist/cli/agent-note.d.ts +21 -0
- package/dist/cli/agent-note.d.ts.map +1 -0
- package/dist/cli/agent-note.js +107 -0
- package/dist/cli/board-freshness.d.ts +6 -4
- package/dist/cli/board-freshness.d.ts.map +1 -1
- package/dist/cli/board-freshness.js +18 -11
- package/dist/cli/budget/index.d.ts +35 -0
- package/dist/cli/budget/index.d.ts.map +1 -0
- package/dist/cli/budget/index.js +96 -0
- package/dist/cli/config.d.ts +14 -142
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +0 -16
- package/dist/cli/docs/catalog.d.ts +38 -0
- package/dist/cli/docs/catalog.d.ts.map +1 -0
- package/dist/cli/docs/catalog.js +129 -0
- package/dist/cli/docs/index.d.ts +3 -0
- package/dist/cli/docs/index.d.ts.map +1 -0
- package/dist/cli/docs/index.js +56 -0
- package/dist/cli/doctor/app.d.ts +8 -0
- package/dist/cli/doctor/app.d.ts.map +1 -0
- package/dist/cli/doctor/app.js +256 -0
- package/dist/cli/doctor/eject.d.ts +5 -0
- package/dist/cli/doctor/eject.d.ts.map +1 -0
- package/dist/cli/doctor/eject.js +130 -0
- package/dist/cli/doctor/guards.d.ts +3 -0
- package/dist/cli/doctor/guards.d.ts.map +1 -0
- package/dist/cli/doctor/guards.js +111 -0
- package/dist/cli/doctor/hook.d.ts +10 -0
- package/dist/cli/doctor/hook.d.ts.map +1 -0
- package/dist/cli/doctor/hook.js +294 -0
- package/dist/cli/doctor/index.d.ts +8 -0
- package/dist/cli/doctor/index.d.ts.map +1 -0
- package/dist/cli/doctor/index.js +92 -0
- package/dist/cli/doctor/install.d.ts +14 -0
- package/dist/cli/doctor/install.d.ts.map +1 -0
- package/dist/cli/doctor/install.js +266 -0
- package/dist/cli/doctor/legacy.d.ts +3 -0
- package/dist/cli/doctor/legacy.d.ts.map +1 -0
- package/dist/cli/doctor/legacy.js +144 -0
- package/dist/cli/doctor/translations.d.ts +17 -0
- package/dist/cli/doctor/translations.d.ts.map +1 -0
- package/dist/cli/doctor/translations.js +246 -0
- package/dist/cli/doctor/types.d.ts +64 -0
- package/dist/cli/doctor/types.d.ts.map +1 -0
- package/dist/cli/doctor/types.js +110 -0
- package/dist/cli/doctor/wiring.d.ts +10 -0
- package/dist/cli/doctor/wiring.d.ts.map +1 -0
- package/dist/cli/doctor/wiring.js +202 -0
- package/dist/cli/eject/git.d.ts +5 -0
- package/dist/cli/eject/git.d.ts.map +1 -0
- package/dist/cli/eject/git.js +35 -0
- package/dist/cli/eject/help.d.ts +4 -0
- package/dist/cli/eject/help.d.ts.map +1 -0
- package/dist/cli/eject/help.js +57 -0
- package/dist/cli/eject/index.d.ts +6 -0
- package/dist/cli/eject/index.d.ts.map +1 -0
- package/dist/cli/eject/index.js +423 -0
- package/dist/cli/eject/ledger.d.ts +73 -0
- package/dist/cli/eject/ledger.d.ts.map +1 -0
- package/dist/cli/eject/ledger.js +101 -0
- package/dist/cli/eject/tsconfig.d.ts +14 -0
- package/dist/cli/eject/tsconfig.d.ts.map +1 -0
- package/dist/cli/eject/tsconfig.js +207 -0
- package/dist/cli/harness.d.ts +65 -0
- package/dist/cli/harness.d.ts.map +1 -0
- package/dist/cli/harness.js +91 -0
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +51 -20
- package/dist/cli/index.d.ts +24 -387
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +41 -849
- package/dist/cli/init/app-files.d.ts +21 -0
- package/dist/cli/init/app-files.d.ts.map +1 -0
- package/dist/cli/init/app-files.js +99 -0
- package/dist/cli/init/index.d.ts +61 -0
- package/dist/cli/init/index.d.ts.map +1 -0
- package/dist/cli/init/index.js +244 -0
- package/dist/cli/init/locales.d.ts +28 -0
- package/dist/cli/init/locales.d.ts.map +1 -0
- package/dist/cli/init/locales.js +84 -0
- package/dist/cli/init/router-seeds.d.ts +10 -0
- package/dist/cli/init/router-seeds.d.ts.map +1 -0
- package/dist/cli/init/router-seeds.js +201 -0
- package/dist/cli/init/site.d.ts +19 -0
- package/dist/cli/init/site.d.ts.map +1 -0
- package/dist/cli/init/site.js +37 -0
- package/dist/cli/init/steps.d.ts +163 -0
- package/dist/cli/init/steps.d.ts.map +1 -0
- package/dist/cli/init/steps.js +791 -0
- package/dist/cli/init/stock.d.ts +24 -0
- package/dist/cli/init/stock.d.ts.map +1 -0
- package/dist/cli/init/stock.js +50 -0
- package/dist/cli/init/upgrade.d.ts +8 -0
- package/dist/cli/init/upgrade.d.ts.map +1 -0
- package/dist/cli/init/upgrade.js +47 -0
- package/dist/cli/install-root.d.ts +15 -5
- package/dist/cli/install-root.d.ts.map +1 -1
- package/dist/cli/install-root.js +28 -17
- package/dist/cli/legacy-2x-files.d.ts +2 -0
- package/dist/cli/legacy-2x-files.d.ts.map +1 -0
- package/dist/cli/legacy-2x-files.js +25 -0
- package/dist/cli/legacy-2x.d.ts +18 -0
- package/dist/cli/legacy-2x.d.ts.map +1 -0
- package/dist/cli/legacy-2x.js +71 -0
- package/dist/cli/lint/engine.d.ts +51 -0
- package/dist/cli/lint/engine.d.ts.map +1 -0
- package/dist/cli/lint/engine.js +253 -0
- package/dist/cli/lint/hook.d.ts +43 -0
- package/dist/cli/lint/hook.d.ts.map +1 -0
- package/dist/cli/lint/hook.js +222 -0
- package/dist/cli/lint/index.d.ts +22 -0
- package/dist/cli/lint/index.d.ts.map +1 -0
- package/dist/cli/lint/index.js +146 -0
- package/dist/cli/lint/record.d.ts +18 -0
- package/dist/cli/lint/record.d.ts.map +1 -0
- package/dist/cli/lint/record.js +77 -0
- package/dist/cli/lint/seams.d.ts +62 -0
- package/dist/cli/lint/seams.d.ts.map +1 -0
- package/dist/cli/lint/seams.js +351 -0
- package/dist/cli/lint/settings.d.ts +61 -0
- package/dist/cli/lint/settings.d.ts.map +1 -0
- package/dist/cli/lint/settings.js +229 -0
- package/dist/cli/lint/stats.d.ts +36 -0
- package/dist/cli/lint/stats.d.ts.map +1 -0
- package/dist/cli/lint/stats.js +119 -0
- package/dist/cli/lint/template-classes.d.ts +17 -0
- package/dist/cli/lint/template-classes.d.ts.map +1 -0
- package/dist/cli/lint/template-classes.js +91 -0
- package/dist/cli/lint-settings.d.ts +15 -0
- package/dist/cli/lint-settings.d.ts.map +1 -0
- package/dist/cli/lint-settings.js +81 -0
- package/dist/cli/manifest.d.ts +84 -0
- package/dist/cli/manifest.d.ts.map +1 -0
- package/dist/cli/manifest.js +199 -0
- package/dist/cli/merge/formatter.d.ts +12 -0
- package/dist/cli/merge/formatter.d.ts.map +1 -0
- package/dist/cli/merge/formatter.js +44 -0
- package/dist/cli/merge/header.d.ts +20 -0
- package/dist/cli/merge/header.d.ts.map +1 -0
- package/dist/cli/merge/header.js +25 -0
- package/dist/cli/merge/merge-file.d.ts +20 -0
- package/dist/cli/merge/merge-file.d.ts.map +1 -0
- package/dist/cli/merge/merge-file.js +46 -0
- package/dist/cli/merge/seed.d.ts +25 -0
- package/dist/cli/merge/seed.d.ts.map +1 -0
- package/dist/cli/merge/seed.js +72 -0
- package/dist/cli/migrate/census.d.ts +28 -0
- package/dist/cli/migrate/census.d.ts.map +1 -0
- package/dist/cli/migrate/census.js +209 -0
- package/dist/cli/migrate/index.d.ts +75 -0
- package/dist/cli/migrate/index.d.ts.map +1 -0
- package/dist/cli/migrate/index.js +250 -0
- package/dist/cli/migrate/rows.d.ts +120 -0
- package/dist/cli/migrate/rows.d.ts.map +1 -0
- package/dist/cli/migrate/rows.js +207 -0
- package/dist/cli/package-manager.d.ts +11 -0
- package/dist/cli/package-manager.d.ts.map +1 -0
- package/dist/cli/package-manager.js +44 -0
- package/dist/cli/peers.d.ts +21 -0
- package/dist/cli/peers.d.ts.map +1 -0
- package/dist/cli/peers.js +80 -0
- package/dist/cli/presets.d.ts +39 -0
- package/dist/cli/presets.d.ts.map +1 -0
- package/dist/cli/presets.js +118 -0
- package/dist/cli/resolver.d.ts +13 -0
- package/dist/cli/resolver.d.ts.map +1 -0
- package/dist/cli/resolver.js +25 -0
- package/dist/cli/route-tree.d.ts +21 -0
- package/dist/cli/route-tree.d.ts.map +1 -0
- package/dist/cli/route-tree.js +57 -0
- package/dist/cli/router-wiring.d.ts +44 -4
- package/dist/cli/router-wiring.d.ts.map +1 -1
- package/dist/cli/router-wiring.js +44 -4
- package/dist/cli/shot/board.d.ts +4 -2
- package/dist/cli/shot/board.d.ts.map +1 -1
- package/dist/cli/shot/board.js +35 -60
- package/dist/cli/shot/capture.d.ts +62 -110
- package/dist/cli/shot/capture.d.ts.map +1 -1
- package/dist/cli/shot/capture.js +415 -467
- package/dist/cli/shot/detect.d.ts +1 -13
- package/dist/cli/shot/detect.d.ts.map +1 -1
- package/dist/cli/shot/detect.js +260 -256
- package/dist/cli/shot/facts.d.ts +28 -0
- package/dist/cli/shot/facts.d.ts.map +1 -0
- package/dist/cli/shot/facts.js +184 -0
- package/dist/cli/shot/index.d.ts +14 -20
- package/dist/cli/shot/index.d.ts.map +1 -1
- package/dist/cli/shot/index.js +120 -215
- package/dist/cli/shot/measure.d.ts +9 -27
- package/dist/cli/shot/measure.d.ts.map +1 -1
- package/dist/cli/shot/measure.js +140 -107
- package/dist/cli/shot/playwright.d.ts +27 -27
- package/dist/cli/shot/playwright.d.ts.map +1 -1
- package/dist/cli/shot/playwright.js +16 -11
- package/dist/cli/shot/real-data.js +1 -1
- package/dist/cli/shot/serve.d.ts +8 -2
- package/dist/cli/shot/serve.d.ts.map +1 -1
- package/dist/cli/shot/serve.js +92 -21
- package/dist/cli/shot/types.d.ts +89 -31
- package/dist/cli/shot/types.d.ts.map +1 -1
- package/dist/cli/shot/types.js +49 -9
- package/dist/cli/source-text.d.ts +2 -0
- package/dist/cli/source-text.d.ts.map +1 -1
- package/dist/cli/source-text.js +8 -0
- package/dist/cli/sync/block.d.ts +20 -0
- package/dist/cli/sync/block.d.ts.map +1 -0
- package/dist/cli/sync/block.js +51 -0
- package/dist/cli/sync/blocks.d.ts +12 -0
- package/dist/cli/sync/blocks.d.ts.map +1 -0
- package/dist/cli/sync/blocks.js +111 -0
- package/dist/cli/sync/engine.d.ts +37 -0
- package/dist/cli/sync/engine.d.ts.map +1 -0
- package/dist/cli/sync/engine.js +134 -0
- package/dist/cli/sync/formats.d.ts +18 -0
- package/dist/cli/sync/formats.d.ts.map +1 -0
- package/dist/cli/sync/formats.js +64 -0
- package/dist/cli/sync/index.d.ts +17 -0
- package/dist/cli/sync/index.d.ts.map +1 -0
- package/dist/cli/sync/index.js +150 -0
- package/dist/cli/sync/render.d.ts +77 -0
- package/dist/cli/sync/render.d.ts.map +1 -0
- package/dist/cli/sync/render.js +342 -0
- package/dist/cli/sync/sibling.d.ts +28 -0
- package/dist/cli/sync/sibling.d.ts.map +1 -0
- package/dist/cli/sync/sibling.js +41 -0
- package/dist/cli/sync/three-way.d.ts +45 -0
- package/dist/cli/sync/three-way.d.ts.map +1 -0
- package/dist/cli/sync/three-way.js +165 -0
- package/dist/cli/tokens-css-extra.d.ts +26 -0
- package/dist/cli/tokens-css-extra.d.ts.map +1 -0
- package/dist/cli/tokens-css-extra.js +149 -0
- package/dist/cli/tokens-css.d.ts +33 -15
- package/dist/cli/tokens-css.d.ts.map +1 -1
- package/dist/cli/tokens-css.js +178 -75
- package/dist/common/basalt-families.d.ts +6 -0
- package/dist/common/basalt-families.d.ts.map +1 -0
- package/dist/common/basalt-families.js +65 -0
- package/dist/common/basalt-family.d.ts +10 -0
- package/dist/common/basalt-family.d.ts.map +1 -0
- package/dist/common/basalt-family.js +12 -0
- package/dist/common/errors.d.ts +2 -2
- package/dist/common/errors.js +5 -5
- package/dist/common/focus.d.ts +24 -0
- package/dist/common/focus.d.ts.map +1 -0
- package/dist/common/focus.js +47 -0
- package/dist/common/hit-floor.d.ts +1 -1
- package/dist/common/isomorphic-layout-effect.d.ts +3 -3
- package/dist/common/isomorphic-layout-effect.d.ts.map +1 -1
- package/dist/common/nest.d.ts +7 -0
- package/dist/common/nest.d.ts.map +1 -0
- package/dist/common/nest.js +25 -0
- package/dist/common/props.d.ts +7 -30
- package/dist/common/props.d.ts.map +1 -1
- package/dist/common/retry-button.d.ts +4 -2
- package/dist/common/retry-button.d.ts.map +1 -1
- package/dist/common/retry-button.js +3 -2
- package/dist/common/retry-button.module.css +23 -22
- package/dist/common/use-media-query.d.ts +1 -1
- package/dist/common/use-media-query.d.ts.map +1 -1
- package/dist/common/validate.d.ts +1 -1
- package/dist/content/code-block.d.ts +16 -20
- package/dist/content/code-block.d.ts.map +1 -1
- package/dist/content/code-block.js +76 -76
- package/dist/content/contract.d.ts +42 -0
- package/dist/content/contract.d.ts.map +1 -0
- package/dist/content/fence-trust.d.ts +8 -0
- package/dist/content/fence-trust.d.ts.map +1 -0
- package/dist/content/fence-trust.js +5 -0
- package/dist/content/fences.d.ts +42 -0
- package/dist/content/fences.d.ts.map +1 -0
- package/dist/content/fences.js +73 -0
- package/dist/content/headings.d.ts +15 -0
- package/dist/content/headings.d.ts.map +1 -0
- package/dist/content/headings.js +58 -0
- package/dist/content/highlighter.d.ts +20 -1
- package/dist/content/highlighter.d.ts.map +1 -1
- package/dist/content/highlighter.js +57 -6
- package/dist/content/index.d.ts +10 -17
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +4 -15
- package/dist/content/markdown.d.ts +25 -152
- package/dist/content/markdown.d.ts.map +1 -1
- package/dist/content/markdown.js +77 -270
- package/dist/content/mermaid.d.ts +9 -32
- package/dist/content/mermaid.d.ts.map +1 -1
- package/dist/content/mermaid.js +73 -51
- package/dist/content/pele-peer.d.ts +10 -0
- package/dist/content/pele-peer.d.ts.map +1 -0
- package/dist/content/pele-peer.js +19 -0
- package/dist/content/sanitize.d.ts +18 -167
- package/dist/content/sanitize.d.ts.map +1 -1
- package/dist/content/sanitize.js +39 -170
- package/dist/controls/appearance-switcher.d.ts +49 -0
- package/dist/controls/appearance-switcher.d.ts.map +1 -0
- package/dist/controls/appearance-switcher.js +176 -0
- package/dist/controls/contract.d.ts +153 -0
- package/dist/controls/contract.d.ts.map +1 -0
- package/dist/controls/control-home.d.ts +41 -0
- package/dist/controls/control-home.d.ts.map +1 -0
- package/dist/controls/control-home.js +72 -0
- package/dist/controls/control-kind.d.ts +26 -0
- package/dist/controls/control-kind.d.ts.map +1 -0
- package/dist/controls/control-kind.js +6 -0
- package/dist/controls/control-view.d.ts +25 -0
- package/dist/controls/control-view.d.ts.map +1 -0
- package/dist/controls/control-view.handles.d.ts +40 -0
- package/dist/controls/control-view.handles.d.ts.map +1 -0
- package/dist/controls/control-view.handles.js +95 -0
- package/dist/controls/control-view.js +116 -0
- package/dist/controls/draft.d.ts +23 -0
- package/dist/controls/draft.d.ts.map +1 -0
- package/dist/controls/draft.js +94 -0
- package/dist/controls/facets.d.ts +26 -0
- package/dist/controls/facets.d.ts.map +1 -0
- package/dist/controls/facets.js +13 -0
- package/dist/controls/filter-set-census.d.ts +34 -0
- package/dist/controls/filter-set-census.d.ts.map +1 -0
- package/dist/controls/filter-set-census.js +62 -0
- package/dist/controls/filter-set-fold.d.ts +13 -0
- package/dist/controls/filter-set-fold.d.ts.map +1 -0
- package/dist/controls/filter-set-fold.js +59 -0
- package/dist/controls/filter-set-menu.d.ts +30 -0
- package/dist/controls/filter-set-menu.d.ts.map +1 -0
- package/dist/controls/filter-set-menu.js +201 -0
- package/dist/controls/filter-set-spec.d.ts +12 -0
- package/dist/controls/filter-set-spec.d.ts.map +1 -0
- package/dist/controls/filter-set-spec.js +265 -0
- package/dist/controls/filter-set.d.ts +32 -13
- package/dist/controls/filter-set.d.ts.map +1 -1
- package/dist/controls/filter-set.js +4 -144
- package/dist/controls/filter-slot.d.ts +57 -0
- package/dist/controls/filter-slot.d.ts.map +1 -0
- package/dist/controls/filter-slot.js +139 -0
- package/dist/controls/form-field.d.ts +85 -0
- package/dist/controls/form-field.d.ts.map +1 -0
- package/dist/controls/form-field.js +233 -0
- package/dist/controls/form-footer.d.ts +43 -0
- package/dist/controls/form-footer.d.ts.map +1 -0
- package/dist/controls/form-footer.js +134 -0
- package/dist/controls/form-row.d.ts +35 -0
- package/dist/controls/form-row.d.ts.map +1 -0
- package/dist/controls/form-row.js +22 -0
- package/dist/controls/form-section.d.ts +65 -0
- package/dist/controls/form-section.d.ts.map +1 -0
- package/dist/controls/form-section.js +148 -0
- package/dist/controls/globals.d.ts +9 -0
- package/dist/controls/globals.d.ts.map +1 -0
- package/dist/controls/globals.js +20 -0
- package/dist/controls/index.d.ts +33 -11
- package/dist/controls/index.d.ts.map +1 -1
- package/dist/controls/index.js +39 -18
- package/dist/controls/local-control.d.ts +25 -0
- package/dist/controls/local-control.d.ts.map +1 -0
- package/dist/controls/local-control.js +12 -0
- package/dist/controls/renderers.d.ts +26 -0
- package/dist/controls/renderers.d.ts.map +1 -0
- package/dist/controls/renderers.js +415 -0
- package/dist/controls/row-icon.d.ts +10 -0
- package/dist/controls/row-icon.d.ts.map +1 -0
- package/dist/controls/row-icon.js +15 -0
- package/dist/controls/settings-rows.d.ts +84 -0
- package/dist/controls/settings-rows.d.ts.map +1 -0
- package/dist/controls/settings-rows.js +232 -0
- package/dist/controls/spec.d.ts +50 -0
- package/dist/controls/spec.d.ts.map +1 -0
- package/dist/controls/spec.js +12 -0
- package/dist/controls/stepper.d.ts +49 -0
- package/dist/controls/stepper.d.ts.map +1 -0
- package/dist/controls/stepper.js +170 -0
- package/dist/controls/submit.d.ts +27 -0
- package/dist/controls/submit.d.ts.map +1 -0
- package/dist/controls/submit.js +58 -0
- package/dist/controls/use-committed-field.d.ts +37 -0
- package/dist/controls/use-committed-field.d.ts.map +1 -0
- package/dist/controls/use-committed-field.js +66 -0
- package/dist/controls/view-tabs.d.ts +37 -13
- package/dist/controls/view-tabs.d.ts.map +1 -1
- package/dist/controls/view-tabs.js +124 -97
- package/dist/controls/view-tabs.test-support.d.ts +40 -0
- package/dist/controls/view-tabs.test-support.d.ts.map +1 -0
- package/dist/controls/view-tabs.test-support.js +39 -0
- package/dist/controls/wizard-dialog.d.ts +68 -0
- package/dist/controls/wizard-dialog.d.ts.map +1 -0
- package/dist/controls/wizard-dialog.js +243 -0
- package/dist/core/action-menu-items.d.ts +15 -0
- package/dist/core/action-menu-items.d.ts.map +1 -0
- package/dist/core/action-menu-items.js +46 -0
- package/dist/core/action.d.ts +54 -0
- package/dist/core/action.d.ts.map +1 -0
- package/dist/core/action.js +6 -0
- package/dist/core/appearance.d.ts +51 -0
- package/dist/core/appearance.d.ts.map +1 -0
- package/dist/core/appearance.js +117 -0
- package/dist/core/binding.d.ts +16 -0
- package/dist/core/binding.d.ts.map +1 -0
- package/dist/core/binding.js +21 -0
- package/dist/core/card-menu.d.ts +27 -0
- package/dist/core/card-menu.d.ts.map +1 -0
- package/dist/core/card-menu.js +179 -0
- package/dist/core/channel-transport.d.ts +25 -0
- package/dist/core/channel-transport.d.ts.map +1 -0
- package/dist/core/channel-transport.js +52 -0
- package/dist/core/channel.d.ts +111 -0
- package/dist/core/channel.d.ts.map +1 -0
- package/dist/core/channel.js +318 -0
- package/dist/core/chord-keys.d.ts +16 -0
- package/dist/core/chord-keys.d.ts.map +1 -0
- package/dist/core/chord-keys.js +20 -0
- package/dist/core/chord.d.ts +86 -0
- package/dist/core/chord.d.ts.map +1 -0
- package/dist/core/chord.js +129 -0
- package/dist/core/clipboard.d.ts +3 -0
- package/dist/core/clipboard.d.ts.map +1 -0
- package/dist/core/clipboard.js +27 -0
- package/dist/core/cn-theme.d.ts +11 -0
- package/dist/core/cn-theme.d.ts.map +1 -0
- package/dist/core/cn-theme.gen.d.ts +13 -0
- package/dist/core/cn-theme.gen.d.ts.map +1 -0
- package/dist/core/cn-theme.gen.js +59 -0
- package/dist/core/cn-theme.js +62 -0
- package/dist/core/cn.d.ts +10 -0
- package/dist/core/cn.d.ts.map +1 -0
- package/dist/core/cn.js +366 -0
- package/dist/core/commit-key.d.ts +16 -0
- package/dist/core/commit-key.d.ts.map +1 -0
- package/dist/core/commit-key.js +6 -0
- package/dist/core/context-trigger.d.ts +109 -0
- package/dist/core/context-trigger.d.ts.map +1 -0
- package/dist/core/context-trigger.js +175 -0
- package/dist/core/control-scope.d.ts +34 -0
- package/dist/core/control-scope.d.ts.map +1 -0
- package/dist/core/control-scope.js +21 -0
- package/dist/core/could-not-load.d.ts +8 -0
- package/dist/core/could-not-load.d.ts.map +1 -0
- package/dist/core/could-not-load.js +5 -0
- package/dist/core/date-stepper.d.ts +39 -0
- package/dist/core/date-stepper.d.ts.map +1 -0
- package/dist/core/date-stepper.js +83 -0
- package/dist/core/debounce.d.ts +19 -0
- package/dist/core/debounce.d.ts.map +1 -0
- package/dist/core/debounce.js +46 -0
- package/dist/core/drag-landing.d.ts +8 -0
- package/dist/core/drag-landing.d.ts.map +1 -0
- package/dist/core/drag-landing.js +7 -0
- package/dist/core/error-dot.d.ts +7 -0
- package/dist/core/error-dot.d.ts.map +1 -0
- package/dist/core/error-dot.js +14 -0
- package/dist/core/external-field.d.ts +45 -0
- package/dist/core/external-field.d.ts.map +1 -0
- package/dist/core/external-field.js +40 -0
- package/dist/core/focus-handle.d.ts +32 -0
- package/dist/core/focus-handle.d.ts.map +1 -0
- package/dist/core/focus-handle.js +182 -0
- package/dist/core/focus-release.d.ts +19 -0
- package/dist/core/focus-release.d.ts.map +1 -0
- package/dist/core/focus-release.js +10 -0
- package/dist/core/focus-store.d.ts +151 -0
- package/dist/core/focus-store.d.ts.map +1 -0
- package/dist/core/focus-store.js +422 -0
- package/dist/core/form-dirty.d.ts +24 -0
- package/dist/core/form-dirty.d.ts.map +1 -0
- package/dist/core/form-dirty.js +31 -0
- package/dist/core/format.d.ts +80 -0
- package/dist/core/format.d.ts.map +1 -0
- package/dist/core/format.js +188 -0
- package/dist/core/frame-arm.d.ts +19 -0
- package/dist/core/frame-arm.d.ts.map +1 -0
- package/dist/core/frame-arm.js +5 -0
- package/dist/core/frame-figure.d.ts +19 -0
- package/dist/core/frame-figure.d.ts.map +1 -0
- package/dist/core/frame-figure.js +153 -0
- package/dist/core/frame-head.d.ts +51 -0
- package/dist/core/frame-head.d.ts.map +1 -0
- package/dist/core/frame-head.js +331 -0
- package/dist/core/frame-regions.d.ts +101 -0
- package/dist/core/frame-regions.d.ts.map +1 -0
- package/dist/core/frame-regions.js +373 -0
- package/dist/core/frame-spec.test-support.d.ts +43 -0
- package/dist/core/frame-spec.test-support.d.ts.map +1 -0
- package/dist/core/frame-spec.test-support.js +58 -0
- package/dist/core/frame-tiles.d.ts +23 -0
- package/dist/core/frame-tiles.d.ts.map +1 -0
- package/dist/core/frame-tiles.js +79 -0
- package/dist/core/href.d.ts +22 -0
- package/dist/core/href.d.ts.map +1 -0
- package/dist/core/href.js +29 -0
- package/dist/core/info-hint.d.ts +19 -0
- package/dist/core/info-hint.d.ts.map +1 -0
- package/dist/core/info-hint.js +126 -0
- package/dist/core/keyboard.d.ts +16 -0
- package/dist/core/keyboard.d.ts.map +1 -0
- package/dist/core/keyboard.js +50 -0
- package/dist/core/label-text.d.ts +9 -0
- package/dist/core/label-text.d.ts.map +1 -0
- package/dist/core/label-text.js +8 -0
- package/dist/core/label.d.ts +29 -0
- package/dist/core/label.d.ts.map +1 -0
- package/dist/core/label.js +21 -0
- package/dist/core/lanes.d.ts +33 -0
- package/dist/core/lanes.d.ts.map +1 -0
- package/dist/core/lanes.js +58 -0
- package/dist/core/leave-guard.d.ts +61 -0
- package/dist/core/leave-guard.d.ts.map +1 -0
- package/dist/core/leave-guard.js +121 -0
- package/dist/core/link.d.ts +9 -0
- package/dist/core/link.d.ts.map +1 -0
- package/dist/core/link.js +10 -0
- package/dist/core/list/engine.d.ts +138 -0
- package/dist/core/list/engine.d.ts.map +1 -0
- package/dist/core/list/engine.js +397 -0
- package/dist/core/list/option-row.d.ts +63 -0
- package/dist/core/list/option-row.d.ts.map +1 -0
- package/dist/core/list/option-row.js +135 -0
- package/dist/core/list/options.d.ts +91 -0
- package/dist/core/list/options.d.ts.map +1 -0
- package/dist/core/list/options.js +77 -0
- package/dist/core/list/popup.d.ts +18 -0
- package/dist/core/list/popup.d.ts.map +1 -0
- package/dist/core/list/popup.js +57 -0
- package/dist/core/list/rank.d.ts +25 -0
- package/dist/core/list/rank.d.ts.map +1 -0
- package/dist/core/list/rank.js +30 -0
- package/dist/core/list-link.d.ts +43 -0
- package/dist/core/list-link.d.ts.map +1 -0
- package/dist/core/list-link.js +57 -0
- package/dist/core/live-actions.d.ts +46 -0
- package/dist/core/live-actions.d.ts.map +1 -0
- package/dist/core/live-actions.js +72 -0
- package/dist/core/mark-focus.d.ts +26 -0
- package/dist/core/mark-focus.d.ts.map +1 -0
- package/dist/core/mark-focus.js +63 -0
- package/dist/core/mark-tone.d.ts +21 -0
- package/dist/core/mark-tone.d.ts.map +1 -0
- package/dist/core/mark-tone.js +28 -0
- package/dist/core/mark-types.d.ts +87 -0
- package/dist/core/mark-types.d.ts.map +1 -0
- package/dist/core/menu-key.d.ts +6 -0
- package/dist/core/menu-key.d.ts.map +1 -0
- package/dist/core/menu-key.js +4 -0
- package/dist/core/messages/ai.d.ts +40 -0
- package/dist/core/messages/ai.d.ts.map +1 -0
- package/dist/core/messages/ai.js +29 -0
- package/dist/core/messages/base.d.ts +21 -0
- package/dist/core/messages/base.d.ts.map +1 -0
- package/dist/core/messages/base.js +13 -0
- package/dist/core/messages/cards.d.ts +13 -0
- package/dist/core/messages/cards.d.ts.map +1 -0
- package/dist/core/messages/cards.js +7 -0
- package/dist/core/messages/chain.d.ts +17 -0
- package/dist/core/messages/chain.d.ts.map +1 -0
- package/dist/core/messages/chain.js +13 -0
- package/dist/core/messages/charts.d.ts +27 -0
- package/dist/core/messages/charts.d.ts.map +1 -0
- package/dist/core/messages/charts.js +23 -0
- package/dist/core/messages/common.d.ts +96 -0
- package/dist/core/messages/common.d.ts.map +1 -0
- package/dist/core/messages/common.js +93 -0
- package/dist/core/messages/content.d.ts +6 -0
- package/dist/core/messages/content.d.ts.map +1 -0
- package/dist/core/messages/content.js +6 -0
- package/dist/core/messages/controls.d.ts +46 -0
- package/dist/core/messages/controls.d.ts.map +1 -0
- package/dist/core/messages/controls.js +34 -0
- package/dist/core/messages/date.d.ts +15 -0
- package/dist/core/messages/date.d.ts.map +1 -0
- package/dist/core/messages/date.js +11 -0
- package/dist/core/messages/dialogs.d.ts +15 -0
- package/dist/core/messages/dialogs.d.ts.map +1 -0
- package/dist/core/messages/dialogs.js +7 -0
- package/dist/core/messages/filters.d.ts +24 -0
- package/dist/core/messages/filters.d.ts.map +1 -0
- package/dist/core/messages/filters.js +11 -0
- package/dist/core/messages/flow.d.ts +19 -0
- package/dist/core/messages/flow.d.ts.map +1 -0
- package/dist/core/messages/flow.js +15 -0
- package/dist/core/messages/home.d.ts +13 -0
- package/dist/core/messages/home.d.ts.map +1 -0
- package/dist/core/messages/home.js +6 -0
- package/dist/core/messages/index.d.ts +32 -0
- package/dist/core/messages/index.d.ts.map +1 -0
- package/dist/core/messages/index.js +61 -0
- package/dist/core/messages/kanban.d.ts +16 -0
- package/dist/core/messages/kanban.d.ts.map +1 -0
- package/dist/core/messages/kanban.js +11 -0
- package/dist/core/messages/keys.d.ts +16 -0
- package/dist/core/messages/keys.d.ts.map +1 -0
- package/dist/core/messages/keys.js +12 -0
- package/dist/core/messages/lists.d.ts +36 -0
- package/dist/core/messages/lists.d.ts.map +1 -0
- package/dist/core/messages/lists.js +42 -0
- package/dist/core/messages/live.d.ts +26 -0
- package/dist/core/messages/live.d.ts.map +1 -0
- package/dist/core/messages/live.js +28 -0
- package/dist/core/messages/mark.d.ts +22 -0
- package/dist/core/messages/mark.d.ts.map +1 -0
- package/dist/core/messages/mark.js +11 -0
- package/dist/core/messages/menu.d.ts +10 -0
- package/dist/core/messages/menu.d.ts.map +1 -0
- package/dist/core/messages/menu.js +10 -0
- package/dist/core/messages/page.d.ts +40 -0
- package/dist/core/messages/page.d.ts.map +1 -0
- package/dist/core/messages/page.js +31 -0
- package/dist/core/messages/schedule.d.ts +18 -0
- package/dist/core/messages/schedule.d.ts.map +1 -0
- package/dist/core/messages/schedule.js +17 -0
- package/dist/core/messages/select.d.ts +15 -0
- package/dist/core/messages/select.d.ts.map +1 -0
- package/dist/core/messages/select.js +8 -0
- package/dist/core/messages/shell.d.ts +48 -0
- package/dist/core/messages/shell.d.ts.map +1 -0
- package/dist/core/messages/shell.js +34 -0
- package/dist/core/messages/sortable.d.ts +9 -0
- package/dist/core/messages/sortable.d.ts.map +1 -0
- package/dist/core/messages/sortable.js +8 -0
- package/dist/core/messages/status.d.ts +16 -0
- package/dist/core/messages/status.d.ts.map +1 -0
- package/dist/core/messages/status.js +12 -0
- package/dist/core/messages/table.d.ts +170 -0
- package/dist/core/messages/table.d.ts.map +1 -0
- package/dist/core/messages/table.js +165 -0
- package/dist/core/messages/tree.d.ts +29 -0
- package/dist/core/messages/tree.d.ts.map +1 -0
- package/dist/core/messages/tree.js +38 -0
- package/dist/core/messages/upload.d.ts +27 -0
- package/dist/core/messages/upload.d.ts.map +1 -0
- package/dist/core/messages/upload.js +23 -0
- package/dist/core/messages/use-messages.d.ts +12 -0
- package/dist/core/messages/use-messages.d.ts.map +1 -0
- package/dist/core/messages/use-messages.js +26 -0
- package/dist/core/messages/use-text.d.ts +8 -0
- package/dist/core/messages/use-text.d.ts.map +1 -0
- package/dist/core/messages/use-text.js +9 -0
- package/dist/core/notify.d.ts +94 -0
- package/dist/core/notify.d.ts.map +1 -0
- package/dist/core/notify.js +161 -0
- package/dist/core/object-menu-popup.d.ts +18 -0
- package/dist/core/object-menu-popup.d.ts.map +1 -0
- package/dist/core/object-menu-popup.js +32 -0
- package/dist/core/object-menu.d.ts +49 -0
- package/dist/core/object-menu.d.ts.map +1 -0
- package/dist/core/object-menu.js +81 -0
- package/dist/core/offline-line.d.ts +7 -0
- package/dist/core/offline-line.d.ts.map +1 -0
- package/dist/core/offline-line.js +11 -0
- package/dist/core/panel.d.ts +73 -0
- package/dist/core/panel.d.ts.map +1 -0
- package/dist/core/panel.js +172 -0
- package/dist/core/parse-number.d.ts +8 -0
- package/dist/core/parse-number.d.ts.map +1 -0
- package/dist/core/parse-number.js +38 -0
- package/dist/core/persisted.d.ts +59 -0
- package/dist/core/persisted.d.ts.map +1 -0
- package/dist/core/persisted.js +276 -0
- package/dist/core/phase-boundary.d.ts +30 -0
- package/dist/core/phase-boundary.d.ts.map +1 -0
- package/dist/core/phase-boundary.js +18 -0
- package/dist/core/phase.d.ts +354 -0
- package/dist/core/phase.d.ts.map +1 -0
- package/dist/core/phase.js +94 -0
- package/dist/core/popup-position.d.ts +33 -0
- package/dist/core/popup-position.d.ts.map +1 -0
- package/dist/core/popup-position.js +9 -0
- package/dist/core/ports.d.ts +434 -0
- package/dist/core/ports.d.ts.map +1 -0
- package/dist/core/ports.js +0 -0
- package/dist/core/provider-props.d.ts +40 -0
- package/dist/core/provider-props.d.ts.map +1 -0
- package/dist/core/provider-props.js +28 -0
- package/dist/core/provider.d.ts +48 -0
- package/dist/core/provider.d.ts.map +1 -0
- package/dist/core/provider.js +39 -0
- package/dist/core/record-address.d.ts +16 -0
- package/dist/core/record-address.d.ts.map +1 -0
- package/dist/core/record-address.js +17 -0
- package/dist/core/record-steps.d.ts +22 -0
- package/dist/core/record-steps.d.ts.map +1 -0
- package/dist/core/record-steps.js +40 -0
- package/dist/core/resolved-tokens.d.ts +32 -0
- package/dist/core/resolved-tokens.d.ts.map +1 -0
- package/dist/core/resolved-tokens.js +135 -0
- package/dist/core/retry-label.d.ts +5 -0
- package/dist/core/retry-label.d.ts.map +1 -0
- package/dist/core/retry-label.js +10 -0
- package/dist/core/retry-owner.d.ts +31 -0
- package/dist/core/retry-owner.d.ts.map +1 -0
- package/dist/core/retry-owner.js +58 -0
- package/dist/core/rows-shown.d.ts +3 -0
- package/dist/core/rows-shown.d.ts.map +1 -0
- package/dist/core/rows-shown.js +9 -0
- package/dist/core/scheme.d.ts +24 -0
- package/dist/core/scheme.d.ts.map +1 -0
- package/dist/core/scheme.js +62 -0
- package/dist/core/sheet-tools.d.ts +3 -0
- package/dist/core/sheet-tools.d.ts.map +1 -0
- package/dist/core/sheet-tools.js +5 -0
- package/dist/core/slot-home.d.ts +10 -0
- package/dist/core/slot-home.d.ts.map +1 -0
- package/dist/core/slot-home.js +5 -0
- package/dist/core/slug.d.ts.map +1 -0
- package/dist/core/slug.js +22 -0
- package/dist/core/spark/compile-spark.d.ts +59 -0
- package/dist/core/spark/compile-spark.d.ts.map +1 -0
- package/dist/core/spark/compile-spark.js +78 -0
- package/dist/core/spark/mini-bars.d.ts +36 -0
- package/dist/core/spark/mini-bars.d.ts.map +1 -0
- package/dist/core/spark/mini-bars.js +202 -0
- package/dist/core/spark/sparkline-shared.d.ts +99 -0
- package/dist/core/spark/sparkline-shared.d.ts.map +1 -0
- package/dist/core/spark/sparkline-shared.js +257 -0
- package/dist/core/spark/sparkline.d.ts +42 -0
- package/dist/core/spark/sparkline.d.ts.map +1 -0
- package/dist/core/spark/sparkline.js +305 -0
- package/dist/core/standard-actions.d.ts +29 -0
- package/dist/core/standard-actions.d.ts.map +1 -0
- package/dist/core/standard-actions.js +67 -0
- package/dist/core/stat-row.d.ts +9 -0
- package/dist/core/stat-row.d.ts.map +1 -0
- package/dist/core/stat-row.js +14 -0
- package/dist/core/tree-model.d.ts +53 -0
- package/dist/core/tree-model.d.ts.map +1 -0
- package/dist/core/tree-model.js +117 -0
- package/dist/core/url.d.ts +22 -0
- package/dist/core/url.d.ts.map +1 -0
- package/dist/core/url.js +44 -0
- package/dist/core/use-control.d.ts +27 -0
- package/dist/core/use-control.d.ts.map +1 -0
- package/dist/core/use-control.js +6 -0
- package/dist/core/use-locale.d.ts +9 -0
- package/dist/core/use-locale.d.ts.map +1 -0
- package/dist/core/use-locale.js +7 -0
- package/dist/core/use-now.d.ts +10 -0
- package/dist/core/use-now.d.ts.map +1 -0
- package/dist/core/use-now.js +36 -0
- package/dist/core/use-resolved-tokens.d.ts +15 -0
- package/dist/core/use-resolved-tokens.d.ts.map +1 -0
- package/dist/core/use-resolved-tokens.js +8 -0
- package/dist/core/use-standard-actions.d.ts +5 -0
- package/dist/core/use-standard-actions.d.ts.map +1 -0
- package/dist/core/use-standard-actions.js +11 -0
- package/dist/core/write-batch.d.ts +13 -0
- package/dist/core/write-batch.d.ts.map +1 -0
- package/dist/core/write-batch.js +30 -0
- package/dist/core/zoned.d.ts +58 -0
- package/dist/core/zoned.d.ts.map +1 -0
- package/dist/core/zoned.js +128 -0
- package/dist/css/archify.css +37 -0
- package/dist/css/base.css +286 -0
- package/dist/css/cursor.css +119 -0
- package/dist/css/files/hubot-sans-latin-ext-wdth-normal.woff2 +0 -0
- package/dist/css/files/hubot-sans-latin-wdth-normal.woff2 +0 -0
- package/dist/css/files/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist/css/files/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/dist/css/files/nunito-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/css/files/nunito-sans-latin-wght-normal.woff2 +0 -0
- package/dist/css/fonts.css +84 -0
- package/dist/css/generate.d.ts +24 -0
- package/dist/css/generate.d.ts.map +1 -0
- package/dist/css/generate.js +218 -0
- package/dist/css/prose.css +214 -0
- package/dist/css/starlight.css +342 -0
- package/dist/css/static.css +263 -0
- package/dist/css/tailwind.css +254 -0
- package/dist/css/templates/fonts.css +82 -0
- package/dist/css/templates/prose.css +230 -0
- package/dist/css/templates/starlight.css +356 -0
- package/dist/css/templates/typography.css +50 -0
- package/dist/css/theme-script.d.ts +27 -0
- package/dist/css/theme-script.d.ts.map +1 -0
- package/dist/css/theme-script.js +29 -0
- package/dist/css/tokens.css +233 -0
- package/dist/css/touch.css +36 -0
- package/dist/css/typography.css +89 -0
- package/dist/data/index.d.ts +17 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +22 -0
- package/dist/data/live/bind-invalidation.d.ts +77 -0
- package/dist/data/live/bind-invalidation.d.ts.map +1 -0
- package/dist/data/live/bind-invalidation.js +166 -0
- package/dist/data/live/connection.d.ts +47 -0
- package/dist/data/live/connection.d.ts.map +1 -0
- package/dist/data/live/connection.js +181 -0
- package/dist/data/live/freshness.d.ts +30 -0
- package/dist/data/live/freshness.d.ts.map +1 -0
- package/dist/data/live/freshness.js +91 -0
- package/dist/data/live/live-query-runtime.d.ts +39 -0
- package/dist/data/live/live-query-runtime.d.ts.map +1 -0
- package/dist/data/live/live-query-runtime.js +59 -0
- package/dist/data/live/live-query.d.ts +55 -0
- package/dist/data/live/live-query.d.ts.map +1 -0
- package/dist/data/live/live-query.js +127 -0
- package/dist/data/optimistic.d.ts +60 -0
- package/dist/data/optimistic.d.ts.map +1 -0
- package/dist/data/optimistic.js +34 -0
- package/dist/data/query-client.d.ts +29 -0
- package/dist/data/query-client.d.ts.map +1 -0
- package/dist/data/query-client.js +35 -0
- package/dist/data/shot-state.d.ts +68 -0
- package/dist/data/shot-state.d.ts.map +1 -0
- package/dist/data/shot-state.js +59 -0
- package/dist/data/synced-runtime.d.ts +90 -0
- package/dist/data/synced-runtime.d.ts.map +1 -0
- package/dist/data/synced-runtime.js +380 -0
- package/dist/data/synced.d.ts +91 -0
- package/dist/data/synced.d.ts.map +1 -0
- package/dist/data/synced.js +110 -0
- package/dist/data/unwrap.d.ts +45 -0
- package/dist/data/unwrap.d.ts.map +1 -0
- package/dist/data/unwrap.js +28 -0
- package/dist/form/contexts.d.ts +2 -0
- package/dist/form/contexts.d.ts.map +1 -0
- package/dist/form/contexts.js +8 -0
- package/dist/form/hook.d.ts +110 -0
- package/dist/form/hook.d.ts.map +1 -0
- package/dist/form/hook.js +60 -0
- package/dist/form/index.d.ts +9 -0
- package/dist/form/index.d.ts.map +1 -0
- package/dist/form/index.js +6 -0
- package/dist/form/parts.d.ts +48 -0
- package/dist/form/parts.d.ts.map +1 -0
- package/dist/form/parts.js +50 -0
- package/dist/format/locale.d.ts +4 -0
- package/dist/format/locale.d.ts.map +1 -0
- package/dist/format/locale.js +4 -0
- package/dist/format/number.d.ts +2 -46
- package/dist/format/number.d.ts.map +1 -1
- package/dist/format/number.js +4 -57
- package/dist/format/shared.d.ts +8 -45
- package/dist/format/shared.d.ts.map +1 -1
- package/dist/format/shared.js +15 -53
- package/dist/index.d.ts +27 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -72
- package/dist/lint/bin.d.ts +13 -0
- package/dist/lint/bin.d.ts.map +1 -0
- package/dist/lint/bin.js +20 -0
- package/dist/lint/blanket-disable.d.ts +23 -0
- package/dist/lint/blanket-disable.d.ts.map +1 -0
- package/dist/lint/blanket-disable.js +85 -0
- package/dist/lint/check-tokens.d.ts +39 -0
- package/dist/lint/check-tokens.d.ts.map +1 -0
- package/dist/lint/check-tokens.js +160 -0
- package/dist/lint/factory.d.ts +101 -0
- package/dist/lint/factory.d.ts.map +1 -0
- package/dist/lint/factory.js +318 -0
- package/dist/lint/generated/gen-site-classes.d.ts +5 -0
- package/dist/lint/generated/gen-site-classes.d.ts.map +1 -0
- package/dist/lint/generated/gen-site-classes.js +45 -0
- package/dist/lint/generated/gen-zone-a.d.ts +4 -0
- package/dist/lint/generated/gen-zone-a.d.ts.map +1 -0
- package/dist/lint/generated/gen-zone-a.js +62 -0
- package/dist/lint/generated/site-classes.d.ts +2 -0
- package/dist/lint/generated/site-classes.d.ts.map +1 -0
- package/dist/lint/generated/site-classes.js +48 -0
- package/dist/lint/generated/zone-a.d.ts +16 -0
- package/dist/lint/generated/zone-a.d.ts.map +1 -0
- package/dist/lint/generated/zone-a.js +90 -0
- package/dist/lint/index.d.ts +4 -0
- package/dist/lint/index.d.ts.map +1 -0
- package/dist/lint/index.js +37 -0
- package/dist/lint/lintable.d.ts +3 -0
- package/dist/lint/lintable.d.ts.map +1 -0
- package/dist/lint/lintable.js +4 -0
- package/dist/lint/preset.d.ts +189 -0
- package/dist/lint/preset.d.ts.map +1 -0
- package/dist/lint/preset.js +429 -0
- package/dist/lint/renamed-rules.d.ts +7 -0
- package/dist/lint/renamed-rules.d.ts.map +1 -0
- package/dist/lint/renamed-rules.js +9 -0
- package/dist/lint/rule-table.d.ts +125 -0
- package/dist/lint/rule-table.d.ts.map +1 -0
- package/dist/lint/rule-table.js +222 -0
- package/dist/lint/rules/class/detect.d.ts +133 -0
- package/dist/lint/rules/class/detect.d.ts.map +1 -0
- package/dist/lint/rules/class/detect.js +858 -0
- package/dist/lint/rules/class/table.d.ts +296 -0
- package/dist/lint/rules/class/table.d.ts.map +1 -0
- package/dist/lint/rules/class/table.js +453 -0
- package/dist/lint/rules/structure/ast.d.ts +15 -0
- package/dist/lint/rules/structure/ast.d.ts.map +1 -0
- package/dist/lint/rules/structure/ast.js +48 -0
- package/dist/lint/rules/structure/color-literal.d.ts +51 -0
- package/dist/lint/rules/structure/color-literal.d.ts.map +1 -0
- package/dist/lint/rules/structure/color-literal.js +127 -0
- package/dist/lint/rules/structure/control-home.d.ts +10 -0
- package/dist/lint/rules/structure/control-home.d.ts.map +1 -0
- package/dist/lint/rules/structure/control-home.js +246 -0
- package/dist/lint/rules/structure/data-primitive-live.d.ts +5 -0
- package/dist/lint/rules/structure/data-primitive-live.d.ts.map +1 -0
- package/dist/lint/rules/structure/data-primitive-live.js +95 -0
- package/dist/lint/rules/structure/data-primitive.d.ts +38 -0
- package/dist/lint/rules/structure/data-primitive.d.ts.map +1 -0
- package/dist/lint/rules/structure/data-primitive.js +587 -0
- package/dist/lint/rules/structure/format-home.d.ts +15 -0
- package/dist/lint/rules/structure/format-home.d.ts.map +1 -0
- package/dist/lint/rules/structure/format-home.js +416 -0
- package/dist/lint/rules/structure/import-boundary.d.ts +40 -0
- package/dist/lint/rules/structure/import-boundary.d.ts.map +1 -0
- package/dist/lint/rules/structure/import-boundary.js +829 -0
- package/dist/lint/rules/structure/label-literal.d.ts +23 -0
- package/dist/lint/rules/structure/label-literal.d.ts.map +1 -0
- package/dist/lint/rules/structure/label-literal.js +492 -0
- package/dist/lint/rules/structure/motion-literal.d.ts +26 -0
- package/dist/lint/rules/structure/motion-literal.d.ts.map +1 -0
- package/dist/lint/rules/structure/motion-literal.js +147 -0
- package/dist/lint/rules/structure/page-root.d.ts +10 -0
- package/dist/lint/rules/structure/page-root.d.ts.map +1 -0
- package/dist/lint/rules/structure/page-root.js +162 -0
- package/dist/lint/rules/structure/primitive-bypass.d.ts +8 -0
- package/dist/lint/rules/structure/primitive-bypass.d.ts.map +1 -0
- package/dist/lint/rules/structure/primitive-bypass.js +1014 -0
- package/dist/lint/rules/structure/query-home.d.ts +12 -0
- package/dist/lint/rules/structure/query-home.d.ts.map +1 -0
- package/dist/lint/rules/structure/query-home.js +171 -0
- package/dist/lint/rules/structure/router-search.d.ts +10 -0
- package/dist/lint/rules/structure/router-search.d.ts.map +1 -0
- package/dist/lint/rules/structure/router-search.js +321 -0
- package/dist/lint/rules/structure/untrusted-markdown.d.ts +22 -0
- package/dist/lint/rules/structure/untrusted-markdown.d.ts.map +1 -0
- package/dist/lint/rules/structure/untrusted-markdown.js +374 -0
- package/dist/lint/rules/structure/waiver-needs-reason.d.ts +41 -0
- package/dist/lint/rules/structure/waiver-needs-reason.d.ts.map +1 -0
- package/dist/lint/rules/structure/waiver-needs-reason.js +128 -0
- package/dist/lint/stylelint/gen.d.ts +2 -0
- package/dist/lint/stylelint/gen.d.ts.map +1 -0
- package/dist/lint/stylelint/gen.js +28 -0
- package/dist/lint/stylelint/index.d.ts +3 -0
- package/dist/lint/stylelint/index.d.ts.map +1 -0
- package/dist/lint/stylelint/index.js +5 -0
- package/dist/lint/stylelint/render.d.ts +37 -0
- package/dist/lint/stylelint/render.d.ts.map +1 -0
- package/dist/lint/stylelint/render.js +48 -0
- package/dist/lint/stylelint/rules.d.ts +75 -0
- package/dist/lint/stylelint/rules.d.ts.map +1 -0
- package/dist/lint/stylelint/rules.js +239 -0
- package/dist/lint/weakened.d.ts +68 -0
- package/dist/lint/weakened.d.ts.map +1 -0
- package/dist/lint/weakened.js +404 -0
- package/dist/lint/weakening-edit.d.ts +6 -0
- package/dist/lint/weakening-edit.d.ts.map +1 -0
- package/dist/lint/weakening-edit.js +63 -0
- package/dist/messages/de.d.ts +16 -0
- package/dist/messages/de.d.ts.map +1 -0
- package/dist/messages/de.js +621 -0
- package/dist/messages/es.d.ts +16 -0
- package/dist/messages/es.d.ts.map +1 -0
- package/dist/messages/es.js +626 -0
- package/dist/messages/fr.d.ts +16 -0
- package/dist/messages/fr.d.ts.map +1 -0
- package/dist/messages/fr.js +621 -0
- package/dist/messages/zh-hans.d.ts +16 -0
- package/dist/messages/zh-hans.d.ts.map +1 -0
- package/dist/messages/zh-hans.js +628 -0
- package/dist/motion/index.d.ts +20 -0
- package/dist/motion/index.d.ts.map +1 -0
- package/dist/motion/index.js +13 -0
- package/dist/motion/presets.d.ts +45 -0
- package/dist/motion/presets.d.ts.map +1 -0
- package/dist/motion/presets.js +37 -0
- package/dist/page/article-layout.d.ts +67 -0
- package/dist/page/article-layout.d.ts.map +1 -0
- package/dist/page/article-layout.js +127 -0
- package/dist/page/article-progress.d.ts +20 -0
- package/dist/page/article-progress.d.ts.map +1 -0
- package/dist/page/article-progress.js +59 -0
- package/dist/page/callout.d.ts +27 -0
- package/dist/page/callout.d.ts.map +1 -0
- package/dist/page/callout.js +32 -0
- package/dist/page/card-grid.d.ts +42 -0
- package/dist/page/card-grid.d.ts.map +1 -0
- package/dist/page/card-grid.js +41 -0
- package/dist/page/connection-indicator.d.ts +25 -0
- package/dist/page/connection-indicator.d.ts.map +1 -0
- package/dist/page/connection-indicator.js +115 -0
- package/dist/page/contract.d.ts +295 -0
- package/dist/page/contract.d.ts.map +1 -0
- package/dist/page/contract.js +0 -0
- package/dist/page/core/article-date.d.ts +17 -0
- package/dist/page/core/article-date.d.ts.map +1 -0
- package/dist/page/core/article-date.js +13 -0
- package/dist/page/core/bar-measure.d.ts +32 -0
- package/dist/page/core/bar-measure.d.ts.map +1 -0
- package/dist/page/core/bar-measure.js +34 -0
- package/dist/page/core/claims.d.ts +66 -0
- package/dist/page/core/claims.d.ts.map +1 -0
- package/dist/page/core/claims.js +84 -0
- package/dist/page/core/docking.d.ts +66 -0
- package/dist/page/core/docking.d.ts.map +1 -0
- package/dist/page/core/docking.js +26 -0
- package/dist/page/core/panel-store.d.ts +24 -0
- package/dist/page/core/panel-store.d.ts.map +1 -0
- package/dist/page/core/panel-store.js +35 -0
- package/dist/page/define-overlays.d.ts +95 -0
- package/dist/page/define-overlays.d.ts.map +1 -0
- package/dist/page/define-overlays.js +56 -0
- package/dist/page/dock.d.ts +67 -0
- package/dist/page/dock.d.ts.map +1 -0
- package/dist/page/dock.js +179 -0
- package/dist/page/empty-state.d.ts +49 -0
- package/dist/page/empty-state.d.ts.map +1 -0
- package/dist/page/empty-state.js +67 -0
- package/dist/page/error-cause.d.ts +13 -0
- package/dist/page/error-cause.d.ts.map +1 -0
- package/dist/page/error-cause.js +14 -0
- package/dist/page/facts.d.ts +33 -0
- package/dist/page/facts.d.ts.map +1 -0
- package/dist/page/facts.js +16 -0
- package/dist/page/favorites.d.ts +59 -0
- package/dist/page/favorites.d.ts.map +1 -0
- package/dist/page/favorites.js +106 -0
- package/dist/page/index.d.ts +43 -0
- package/dist/page/index.d.ts.map +1 -0
- package/dist/page/index.js +58 -0
- package/dist/page/mdx.d.ts +18 -0
- package/dist/page/mdx.d.ts.map +1 -0
- package/dist/page/mdx.js +86 -0
- package/dist/page/overlay-host.d.ts +23 -0
- package/dist/page/overlay-host.d.ts.map +1 -0
- package/dist/page/overlay-host.js +78 -0
- package/dist/page/page-aside.d.ts +66 -0
- package/dist/page/page-aside.d.ts.map +1 -0
- package/dist/page/page-aside.js +273 -0
- package/dist/page/page-bar.d.ts +85 -0
- package/dist/page/page-bar.d.ts.map +1 -0
- package/dist/page/page-bar.js +512 -0
- package/dist/page/page-summary.d.ts +62 -0
- package/dist/page/page-summary.d.ts.map +1 -0
- package/dist/page/page-summary.js +112 -0
- package/dist/page/page-tabs.d.ts +9 -0
- package/dist/page/page-tabs.d.ts.map +1 -0
- package/dist/page/page-tabs.js +49 -0
- package/dist/page/page.d.ts +87 -0
- package/dist/page/page.d.ts.map +1 -0
- package/dist/page/page.js +101 -0
- package/dist/page/page.test-support.d.ts +25 -0
- package/dist/page/page.test-support.d.ts.map +1 -0
- package/dist/page/page.test-support.js +81 -0
- package/dist/page/panel-steps.d.ts +19 -0
- package/dist/page/panel-steps.d.ts.map +1 -0
- package/dist/page/panel-steps.js +66 -0
- package/dist/page/parts/inner-nav.d.ts +55 -0
- package/dist/page/parts/inner-nav.d.ts.map +1 -0
- package/dist/page/parts/inner-nav.js +261 -0
- package/dist/page/parts/inner-nav.test-support.d.ts +8 -0
- package/dist/page/parts/inner-nav.test-support.d.ts.map +1 -0
- package/dist/page/parts/inner-nav.test-support.js +59 -0
- package/dist/page/parts/split-page.d.ts +35 -0
- package/dist/page/parts/split-page.d.ts.map +1 -0
- package/dist/page/parts/split-page.js +161 -0
- package/dist/page/peek-window.d.ts +38 -0
- package/dist/page/peek-window.d.ts.map +1 -0
- package/dist/page/peek-window.js +226 -0
- package/dist/page/peek.d.ts +112 -0
- package/dist/page/peek.d.ts.map +1 -0
- package/dist/page/peek.js +498 -0
- package/dist/page/present-glyph.d.ts +9 -0
- package/dist/page/present-glyph.d.ts.map +1 -0
- package/dist/page/present-glyph.js +31 -0
- package/dist/page/property-list.d.ts +127 -0
- package/dist/page/property-list.d.ts.map +1 -0
- package/dist/page/property-list.js +335 -0
- package/dist/page/prose.d.ts +28 -0
- package/dist/page/prose.d.ts.map +1 -0
- package/dist/page/prose.js +25 -0
- package/dist/page/query-state.d.ts +41 -0
- package/dist/page/query-state.d.ts.map +1 -0
- package/dist/page/query-state.js +79 -0
- package/dist/page/record-panel.d.ts +106 -0
- package/dist/page/record-panel.d.ts.map +1 -0
- package/dist/page/record-panel.js +242 -0
- package/dist/page/refresh-button.d.ts +41 -0
- package/dist/page/refresh-button.d.ts.map +1 -0
- package/dist/page/refresh-button.js +148 -0
- package/dist/page/search-hint.d.ts +13 -0
- package/dist/page/search-hint.d.ts.map +1 -0
- package/dist/page/search-hint.js +33 -0
- package/dist/page/section.d.ts +30 -0
- package/dist/page/section.d.ts.map +1 -0
- package/dist/page/section.js +96 -0
- package/dist/page/settings-layout.d.ts +36 -0
- package/dist/page/settings-layout.d.ts.map +1 -0
- package/dist/page/settings-layout.js +83 -0
- package/dist/page/toast-host.d.ts +15 -0
- package/dist/page/toast-host.d.ts.map +1 -0
- package/dist/page/toast-host.js +57 -0
- package/dist/page/toc-click-pin.d.ts.map +1 -0
- package/dist/page/toc-click-pin.js +112 -0
- package/dist/page/toc-spy.d.ts.map +1 -0
- package/dist/page/toc.d.ts +43 -0
- package/dist/page/toc.d.ts.map +1 -0
- package/dist/page/toc.js +151 -0
- package/dist/page/use-size-class.d.ts +20 -0
- package/dist/page/use-size-class.d.ts.map +1 -0
- package/dist/page/use-size-class.js +23 -0
- package/dist/register.d.ts +11 -48
- package/dist/register.d.ts.map +1 -1
- package/dist/router/controls/brand.d.ts +72 -0
- package/dist/router/controls/brand.d.ts.map +1 -0
- package/dist/router/controls/brand.js +37 -0
- package/dist/router/controls/codec.d.ts +78 -0
- package/dist/router/controls/codec.d.ts.map +1 -0
- package/dist/router/controls/codec.js +112 -0
- package/dist/router/controls/define.d.ts +234 -0
- package/dist/router/controls/define.d.ts.map +1 -0
- package/dist/router/controls/define.js +379 -0
- package/dist/router/controls/field.d.ts +156 -0
- package/dist/router/controls/field.d.ts.map +1 -0
- package/dist/router/controls/field.js +104 -0
- package/dist/router/controls/href.d.ts +5 -0
- package/dist/router/controls/href.d.ts.map +1 -0
- package/dist/router/controls/href.js +19 -0
- package/dist/router/controls/middleware.d.ts +34 -0
- package/dist/router/controls/middleware.d.ts.map +1 -0
- package/dist/router/controls/middleware.js +41 -0
- package/dist/router/controls/ownership.d.ts +19 -0
- package/dist/router/controls/ownership.d.ts.map +1 -0
- package/dist/router/controls/ownership.js +57 -0
- package/dist/router/controls/precedence.d.ts +16 -0
- package/dist/router/controls/precedence.d.ts.map +1 -0
- package/dist/router/controls/precedence.js +8 -0
- package/dist/router/controls/values.d.ts +24 -0
- package/dist/router/controls/values.d.ts.map +1 -0
- package/dist/router/controls/values.js +0 -0
- package/dist/router/controls/widgets.d.ts +131 -0
- package/dist/router/controls/widgets.d.ts.map +1 -0
- package/dist/router/controls/widgets.js +199 -0
- package/dist/router/defaults.d.ts +74 -0
- package/dist/router/defaults.d.ts.map +1 -0
- package/dist/router/defaults.js +45 -0
- package/dist/router/index.d.ts +17 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router/index.js +19 -0
- package/dist/router/nav/anchor.d.ts +8 -0
- package/dist/router/nav/anchor.d.ts.map +1 -0
- package/dist/router/nav/anchor.js +18 -0
- package/dist/router/nav/define-nav.d.ts +46 -0
- package/dist/router/nav/define-nav.d.ts.map +1 -0
- package/dist/router/nav/define-nav.js +6 -0
- package/dist/router/nav/read-labels.d.ts +4 -0
- package/dist/router/nav/read-labels.d.ts.map +1 -0
- package/dist/router/nav/read-labels.js +72 -0
- package/dist/router/nav/registry.d.ts +9 -0
- package/dist/router/nav/registry.d.ts.map +1 -0
- package/dist/router/nav/registry.js +22 -0
- package/dist/router/nav/resolve-active.d.ts +46 -0
- package/dist/router/nav/resolve-active.d.ts.map +1 -0
- package/dist/router/nav/resolve-active.js +84 -0
- package/dist/router/nav/types.d.ts +274 -0
- package/dist/router/nav/types.d.ts.map +1 -0
- package/dist/router/nav/types.js +0 -0
- package/dist/router/nav-target.d.ts +40 -0
- package/dist/router/nav-target.d.ts.map +1 -0
- package/dist/router/nav-target.js +55 -0
- package/dist/router/peek.d.ts +107 -0
- package/dist/router/peek.d.ts.map +1 -0
- package/dist/router/peek.js +224 -0
- package/dist/router/unsaved-guard.d.ts +30 -0
- package/dist/router/unsaved-guard.d.ts.map +1 -0
- package/dist/router/unsaved-guard.js +30 -0
- package/dist/shell/app-shell-host.d.ts +27 -0
- package/dist/shell/app-shell-host.d.ts.map +1 -0
- package/dist/shell/app-shell-host.js +52 -0
- package/dist/shell/app-shell.d.ts +64 -0
- package/dist/shell/app-shell.d.ts.map +1 -0
- package/dist/shell/app-shell.js +281 -0
- package/dist/shell/chrome.d.ts +45 -0
- package/dist/shell/chrome.d.ts.map +1 -0
- package/dist/shell/chrome.js +63 -0
- package/dist/shell/commands/area.d.ts +6 -0
- package/dist/shell/commands/area.d.ts.map +1 -0
- package/dist/shell/commands/area.js +11 -0
- package/dist/shell/commands/bindings.d.ts +51 -0
- package/dist/shell/commands/bindings.d.ts.map +1 -0
- package/dist/shell/commands/bindings.js +93 -0
- package/dist/shell/commands/command-palette.d.ts +71 -0
- package/dist/shell/commands/command-palette.d.ts.map +1 -0
- package/dist/shell/commands/command-palette.js +269 -0
- package/dist/shell/commands/define-commands.d.ts +127 -0
- package/dist/shell/commands/define-commands.d.ts.map +1 -0
- package/dist/shell/commands/define-commands.js +171 -0
- package/dist/shell/commands/nav-commands.d.ts +14 -0
- package/dist/shell/commands/nav-commands.d.ts.map +1 -0
- package/dist/shell/commands/nav-commands.js +34 -0
- package/dist/shell/commands/palette-sheet.d.ts +13 -0
- package/dist/shell/commands/palette-sheet.d.ts.map +1 -0
- package/dist/shell/commands/palette-sheet.js +23 -0
- package/dist/shell/commands/palette-sources.d.ts +64 -0
- package/dist/shell/commands/palette-sources.d.ts.map +1 -0
- package/dist/shell/commands/palette-sources.js +106 -0
- package/dist/shell/commands/rank.d.ts +23 -0
- package/dist/shell/commands/rank.d.ts.map +1 -0
- package/dist/shell/commands/rank.js +15 -0
- package/dist/shell/commands/runnable.d.ts +8 -0
- package/dist/shell/commands/runnable.d.ts.map +1 -0
- package/dist/shell/commands/runnable.js +71 -0
- package/dist/shell/commands/shortcut-overlay.d.ts +14 -0
- package/dist/shell/commands/shortcut-overlay.d.ts.map +1 -0
- package/dist/shell/commands/shortcut-overlay.js +33 -0
- package/dist/shell/commands/shortcut-rows.d.ts +30 -0
- package/dist/shell/commands/shortcut-rows.d.ts.map +1 -0
- package/dist/shell/commands/shortcut-rows.js +20 -0
- package/dist/shell/contract.d.ts +191 -0
- package/dist/shell/contract.d.ts.map +1 -0
- package/dist/shell/contract.js +0 -0
- package/dist/shell/core/badges.d.ts +32 -0
- package/dist/shell/core/badges.d.ts.map +1 -0
- package/dist/shell/core/badges.js +41 -0
- package/dist/shell/core/block-model.d.ts +100 -0
- package/dist/shell/core/block-model.d.ts.map +1 -0
- package/dist/shell/core/block-model.js +36 -0
- package/dist/shell/core/column.d.ts +24 -0
- package/dist/shell/core/column.d.ts.map +1 -0
- package/dist/shell/core/column.js +33 -0
- package/dist/shell/core/crumbs.d.ts +75 -0
- package/dist/shell/core/crumbs.d.ts.map +1 -0
- package/dist/shell/core/crumbs.js +54 -0
- package/dist/shell/core/header-tiers.d.ts +49 -0
- package/dist/shell/core/header-tiers.d.ts.map +1 -0
- package/dist/shell/core/header-tiers.js +37 -0
- package/dist/shell/core/nav-runtime.d.ts +42 -0
- package/dist/shell/core/nav-runtime.d.ts.map +1 -0
- package/dist/shell/core/nav-runtime.js +44 -0
- package/dist/shell/core/phone-groups.d.ts +41 -0
- package/dist/shell/core/phone-groups.d.ts.map +1 -0
- package/dist/shell/core/phone-groups.js +33 -0
- package/dist/shell/core/projector.d.ts +82 -0
- package/dist/shell/core/projector.d.ts.map +1 -0
- package/dist/shell/core/projector.js +92 -0
- package/dist/shell/core/types.d.ts +70 -0
- package/dist/shell/core/types.d.ts.map +1 -0
- package/dist/shell/core/types.js +0 -0
- package/dist/shell/favorites-host.d.ts +4 -0
- package/dist/shell/favorites-host.d.ts.map +1 -0
- package/dist/shell/favorites-host.js +41 -0
- package/dist/shell/index.d.ts +12 -203
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +12 -253
- package/dist/shell/menu-template.d.ts +42 -0
- package/dist/shell/menu-template.d.ts.map +1 -0
- package/dist/shell/menu-template.js +72 -0
- package/dist/shell/parts/a11y.d.ts +51 -0
- package/dist/shell/parts/a11y.d.ts.map +1 -0
- package/dist/shell/parts/a11y.js +147 -0
- package/dist/shell/parts/account.d.ts +8 -0
- package/dist/shell/parts/account.d.ts.map +1 -0
- package/dist/shell/parts/account.js +115 -0
- package/dist/shell/parts/blocks.d.ts +12 -0
- package/dist/shell/parts/blocks.d.ts.map +1 -0
- package/dist/shell/parts/blocks.js +209 -0
- package/dist/shell/parts/crumbs.d.ts +6 -0
- package/dist/shell/parts/crumbs.d.ts.map +1 -0
- package/dist/shell/parts/crumbs.js +63 -0
- package/dist/shell/parts/grid.d.ts +166 -0
- package/dist/shell/parts/grid.d.ts.map +1 -0
- package/dist/shell/parts/grid.js +395 -0
- package/dist/shell/parts/header-kebab.d.ts +21 -0
- package/dist/shell/parts/header-kebab.d.ts.map +1 -0
- package/dist/shell/parts/header-kebab.js +89 -0
- package/dist/shell/parts/header.d.ts +34 -0
- package/dist/shell/parts/header.d.ts.map +1 -0
- package/dist/shell/parts/header.js +353 -0
- package/dist/shell/parts/mobile/retap.d.ts +42 -0
- package/dist/shell/parts/mobile/retap.d.ts.map +1 -0
- package/dist/shell/parts/mobile/retap.js +52 -0
- package/dist/shell/parts/mobile/section-nav/chrome-state.d.ts +5 -0
- package/dist/shell/parts/mobile/section-nav/chrome-state.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/chrome-state.js +39 -0
- package/dist/shell/parts/mobile/section-nav/drawer.d.ts +4 -0
- package/dist/shell/parts/mobile/section-nav/drawer.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/drawer.js +231 -0
- package/dist/shell/parts/mobile/section-nav/host.d.ts +37 -0
- package/dist/shell/parts/mobile/section-nav/host.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/host.js +52 -0
- package/dist/shell/parts/mobile/section-nav/measure.d.ts +2 -0
- package/dist/shell/parts/mobile/section-nav/measure.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/measure.js +19 -0
- package/dist/shell/parts/mobile/section-nav/model.d.ts +38 -0
- package/dist/shell/parts/mobile/section-nav/model.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/model.js +63 -0
- package/dist/shell/parts/mobile/section-nav/parts.d.ts +34 -0
- package/dist/shell/parts/mobile/section-nav/parts.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/parts.js +86 -0
- package/dist/shell/parts/mobile/section-nav/phone-actions.d.ts +13 -0
- package/dist/shell/parts/mobile/section-nav/phone-actions.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/phone-actions.js +65 -0
- package/dist/shell/parts/mobile/section-nav/phone-rail.d.ts +10 -0
- package/dist/shell/parts/mobile/section-nav/phone-rail.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/phone-rail.js +187 -0
- package/dist/shell/parts/mobile/section-nav/rows.d.ts +5 -0
- package/dist/shell/parts/mobile/section-nav/rows.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/rows.js +63 -0
- package/dist/shell/parts/mobile/section-nav/safe.d.ts +8 -0
- package/dist/shell/parts/mobile/section-nav/safe.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/safe.js +4 -0
- package/dist/shell/parts/mobile/section-nav/section-bar.d.ts +24 -0
- package/dist/shell/parts/mobile/section-nav/section-bar.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/section-bar.js +101 -0
- package/dist/shell/parts/mobile/section-nav/snaps.d.ts +25 -0
- package/dist/shell/parts/mobile/section-nav/snaps.d.ts.map +1 -0
- package/dist/shell/parts/mobile/section-nav/snaps.js +17 -0
- package/dist/shell/parts/mounts.d.ts +14 -0
- package/dist/shell/parts/mounts.d.ts.map +1 -0
- package/dist/shell/parts/mounts.js +29 -0
- package/dist/shell/parts/nav-row-menu.d.ts +17 -0
- package/dist/shell/parts/nav-row-menu.d.ts.map +1 -0
- package/dist/shell/parts/nav-row-menu.js +56 -0
- package/dist/shell/parts/print.d.ts +14 -0
- package/dist/shell/parts/print.d.ts.map +1 -0
- package/dist/shell/parts/print.js +33 -0
- package/dist/shell/parts/rail-favorites.d.ts +4 -0
- package/dist/shell/parts/rail-favorites.d.ts.map +1 -0
- package/dist/shell/parts/rail-favorites.js +118 -0
- package/dist/shell/parts/rail-folds.d.ts +5 -0
- package/dist/shell/parts/rail-folds.d.ts.map +1 -0
- package/dist/shell/parts/rail-folds.js +32 -0
- package/dist/shell/parts/rail-resize.d.ts +3 -0
- package/dist/shell/parts/rail-resize.d.ts.map +1 -0
- package/dist/shell/parts/rail-resize.js +92 -0
- package/dist/shell/parts/rail-rows.d.ts +9 -0
- package/dist/shell/parts/rail-rows.d.ts.map +1 -0
- package/dist/shell/parts/rail-rows.js +169 -0
- package/dist/shell/parts/rail-search.d.ts +10 -0
- package/dist/shell/parts/rail-search.d.ts.map +1 -0
- package/dist/shell/parts/rail-search.js +56 -0
- package/dist/shell/parts/rail-section.d.ts +7 -0
- package/dist/shell/parts/rail-section.d.ts.map +1 -0
- package/dist/shell/parts/rail-section.js +112 -0
- package/dist/shell/parts/rail-test-kit.d.ts +12 -0
- package/dist/shell/parts/rail-test-kit.d.ts.map +1 -0
- package/dist/shell/parts/rail-test-kit.js +38 -0
- package/dist/shell/parts/rail-text.d.ts +9 -0
- package/dist/shell/parts/rail-text.d.ts.map +1 -0
- package/dist/shell/parts/rail-text.js +16 -0
- package/dist/shell/parts/rail.d.ts +19 -0
- package/dist/shell/parts/rail.d.ts.map +1 -0
- package/dist/shell/parts/rail.js +117 -0
- package/dist/shell/parts/section-column.d.ts +11 -0
- package/dist/shell/parts/section-column.d.ts.map +1 -0
- package/dist/shell/parts/section-column.js +89 -0
- package/dist/shell/parts/settings.d.ts +18 -0
- package/dist/shell/parts/settings.d.ts.map +1 -0
- package/dist/shell/parts/settings.js +73 -0
- package/dist/shell/parts/top-nav.d.ts +20 -0
- package/dist/shell/parts/top-nav.d.ts.map +1 -0
- package/dist/shell/parts/top-nav.js +143 -0
- package/dist/shell/parts/workspace-switcher.d.ts +19 -0
- package/dist/shell/parts/workspace-switcher.d.ts.map +1 -0
- package/dist/shell/parts/workspace-switcher.js +98 -0
- package/dist/static/article-layout.d.ts +62 -0
- package/dist/static/article-layout.d.ts.map +1 -0
- package/dist/static/article-layout.js +129 -0
- package/dist/static/bento.d.ts +50 -0
- package/dist/static/bento.d.ts.map +1 -0
- package/dist/static/bento.js +49 -0
- package/dist/static/blocks.d.ts +25 -0
- package/dist/static/blocks.d.ts.map +1 -0
- package/dist/static/blocks.js +34 -0
- package/dist/static/call-to-action.d.ts +23 -0
- package/dist/static/call-to-action.d.ts.map +1 -0
- package/dist/static/call-to-action.js +36 -0
- package/dist/static/callout.d.ts +27 -0
- package/dist/static/callout.d.ts.map +1 -0
- package/dist/static/callout.js +57 -0
- package/dist/static/changelog.d.ts +41 -0
- package/dist/static/changelog.d.ts.map +1 -0
- package/dist/static/changelog.js +47 -0
- package/dist/static/code-block.d.ts +28 -0
- package/dist/static/code-block.d.ts.map +1 -0
- package/dist/static/code-block.js +34 -0
- package/dist/static/comparison.d.ts +55 -0
- package/dist/static/comparison.d.ts.map +1 -0
- package/dist/static/comparison.js +100 -0
- package/dist/static/data-table.d.ts +35 -0
- package/dist/static/data-table.d.ts.map +1 -0
- package/dist/static/data-table.js +46 -0
- package/dist/static/dates.d.ts +5 -0
- package/dist/static/dates.d.ts.map +1 -0
- package/dist/static/dates.js +11 -0
- package/dist/static/form.d.ts +71 -0
- package/dist/static/form.d.ts.map +1 -0
- package/dist/static/form.js +88 -0
- package/dist/static/glyphs.d.ts +20 -0
- package/dist/static/glyphs.d.ts.map +1 -0
- package/dist/static/glyphs.js +33 -0
- package/dist/static/hero.d.ts +36 -0
- package/dist/static/hero.d.ts.map +1 -0
- package/dist/static/hero.js +36 -0
- package/dist/static/index.d.ts +47 -0
- package/dist/static/index.d.ts.map +1 -0
- package/dist/static/index.js +51 -0
- package/dist/static/markup.d.ts +21 -0
- package/dist/static/markup.d.ts.map +1 -0
- package/dist/static/markup.js +17 -0
- package/dist/static/mdx.d.ts +28 -0
- package/dist/static/mdx.d.ts.map +1 -0
- package/dist/static/mdx.js +74 -0
- package/dist/static/post-list.d.ts +43 -0
- package/dist/static/post-list.d.ts.map +1 -0
- package/dist/static/post-list.js +52 -0
- package/dist/static/question-list.d.ts +36 -0
- package/dist/static/question-list.d.ts.map +1 -0
- package/dist/static/question-list.js +43 -0
- package/dist/static/site-footer.d.ts +28 -0
- package/dist/static/site-footer.d.ts.map +1 -0
- package/dist/static/site-footer.js +39 -0
- package/dist/static/site-header.d.ts +57 -0
- package/dist/static/site-header.d.ts.map +1 -0
- package/dist/static/site-header.js +250 -0
- package/dist/static/site-nav.d.ts +38 -0
- package/dist/static/site-nav.d.ts.map +1 -0
- package/dist/static/site-nav.js +29 -0
- package/dist/static/site-script.d.ts +20 -0
- package/dist/static/site-script.d.ts.map +1 -0
- package/dist/static/site-script.js +89 -0
- package/dist/static/tabs.d.ts +46 -0
- package/dist/static/tabs.d.ts.map +1 -0
- package/dist/static/tabs.js +53 -0
- package/dist/static/theme-switch.d.ts +23 -0
- package/dist/static/theme-switch.d.ts.map +1 -0
- package/dist/static/theme-switch.js +35 -0
- package/dist/static/toc.d.ts +23 -0
- package/dist/static/toc.d.ts.map +1 -0
- package/dist/static/toc.js +36 -0
- package/dist/static/types.d.ts +60 -0
- package/dist/static/types.d.ts.map +1 -0
- package/dist/static/types.js +0 -0
- package/dist/surfaces.d.ts +297 -193
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +268 -326
- package/dist/table/contract.d.ts +576 -0
- package/dist/table/contract.d.ts.map +1 -0
- package/dist/table/contract.js +0 -0
- package/dist/table/core/arrange.d.ts +44 -0
- package/dist/table/core/arrange.d.ts.map +1 -0
- package/dist/table/core/arrange.js +51 -0
- package/dist/table/core/cell-parts.d.ts +67 -0
- package/dist/table/core/cell-parts.d.ts.map +1 -0
- package/dist/table/core/cell-parts.js +90 -0
- package/dist/table/core/codec.d.ts +84 -0
- package/dist/table/core/codec.d.ts.map +1 -0
- package/dist/table/core/codec.js +237 -0
- package/dist/table/core/features.d.ts +111 -0
- package/dist/table/core/features.d.ts.map +1 -0
- package/dist/table/core/features.js +81 -0
- package/dist/table/core/filters.d.ts +77 -0
- package/dist/table/core/filters.d.ts.map +1 -0
- package/dist/table/core/filters.js +123 -0
- package/dist/table/core/keyboard.d.ts +64 -0
- package/dist/table/core/keyboard.d.ts.map +1 -0
- package/dist/table/core/keyboard.js +308 -0
- package/dist/table/core/kind-icons.d.ts +5 -0
- package/dist/table/core/kind-icons.d.ts.map +1 -0
- package/dist/table/core/kind-icons.js +94 -0
- package/dist/table/core/kinds-cells.d.ts +325 -0
- package/dist/table/core/kinds-cells.d.ts.map +1 -0
- package/dist/table/core/kinds-cells.js +834 -0
- package/dist/table/core/kinds-codec.d.ts +34 -0
- package/dist/table/core/kinds-codec.d.ts.map +1 -0
- package/dist/table/core/kinds-codec.js +30 -0
- package/dist/table/core/kinds-engine.d.ts +7 -0
- package/dist/table/core/kinds-engine.d.ts.map +1 -0
- package/dist/table/core/kinds-engine.js +37 -0
- package/dist/table/core/kinds-spec.d.ts +253 -0
- package/dist/table/core/kinds-spec.d.ts.map +1 -0
- package/dist/table/core/kinds-spec.js +298 -0
- package/dist/table/core/kinds.d.ts +550 -0
- package/dist/table/core/kinds.d.ts.map +1 -0
- package/dist/table/core/kinds.js +1387 -0
- package/dist/table/core/plan.d.ts +131 -0
- package/dist/table/core/plan.d.ts.map +1 -0
- package/dist/table/core/plan.js +252 -0
- package/dist/table/core/selection.d.ts +47 -0
- package/dist/table/core/selection.d.ts.map +1 -0
- package/dist/table/core/selection.js +85 -0
- package/dist/table/core/state.d.ts +76 -0
- package/dist/table/core/state.d.ts.map +1 -0
- package/dist/table/core/state.js +160 -0
- package/dist/table/index.d.ts +25 -15
- package/dist/table/index.d.ts.map +1 -1
- package/dist/table/index.js +21 -4
- package/dist/table/layouts/add-menu.d.ts +16 -0
- package/dist/table/layouts/add-menu.d.ts.map +1 -0
- package/dist/table/layouts/add-menu.js +35 -0
- package/dist/table/layouts/board-layout.d.ts +11 -0
- package/dist/table/layouts/board-layout.d.ts.map +1 -0
- package/dist/table/layouts/board-layout.js +182 -0
- package/dist/table/layouts/card-tick.d.ts +15 -0
- package/dist/table/layouts/card-tick.d.ts.map +1 -0
- package/dist/table/layouts/card-tick.js +28 -0
- package/dist/table/layouts/gallery-layout.d.ts +6 -0
- package/dist/table/layouts/gallery-layout.d.ts.map +1 -0
- package/dist/table/layouts/gallery-layout.js +135 -0
- package/dist/table/layouts/glyphs.d.ts +14 -0
- package/dist/table/layouts/glyphs.d.ts.map +1 -0
- package/dist/table/layouts/glyphs.js +34 -0
- package/dist/table/layouts/layout-phase.d.ts +18 -0
- package/dist/table/layouts/layout-phase.d.ts.map +1 -0
- package/dist/table/layouts/layout-phase.js +107 -0
- package/dist/table/layouts/model.d.ts +57 -0
- package/dist/table/layouts/model.d.ts.map +1 -0
- package/dist/table/layouts/model.js +109 -0
- package/dist/table/layouts/specs.d.ts +26 -0
- package/dist/table/layouts/specs.d.ts.map +1 -0
- package/dist/table/layouts/specs.js +42 -0
- package/dist/table/layouts/toggle.d.ts +31 -0
- package/dist/table/layouts/toggle.d.ts.map +1 -0
- package/dist/table/layouts/toggle.js +55 -0
- package/dist/table/parts/add-filter.d.ts +7 -0
- package/dist/table/parts/add-filter.d.ts.map +1 -0
- package/dist/table/parts/add-filter.js +47 -0
- package/dist/table/parts/auto-detail.d.ts +17 -0
- package/dist/table/parts/auto-detail.d.ts.map +1 -0
- package/dist/table/parts/auto-detail.js +24 -0
- package/dist/table/parts/body.d.ts +57 -0
- package/dist/table/parts/body.d.ts.map +1 -0
- package/dist/table/parts/body.js +335 -0
- package/dist/table/parts/bulk-bar.d.ts +40 -0
- package/dist/table/parts/bulk-bar.d.ts.map +1 -0
- package/dist/table/parts/bulk-bar.js +172 -0
- package/dist/table/parts/category-order.d.ts +14 -0
- package/dist/table/parts/category-order.d.ts.map +1 -0
- package/dist/table/parts/category-order.js +52 -0
- package/dist/table/parts/cell-filter.d.ts +42 -0
- package/dist/table/parts/cell-filter.d.ts.map +1 -0
- package/dist/table/parts/cell-filter.js +52 -0
- package/dist/table/parts/chips.d.ts +26 -0
- package/dist/table/parts/chips.d.ts.map +1 -0
- package/dist/table/parts/chips.js +81 -0
- package/dist/table/parts/column-actions.d.ts +48 -0
- package/dist/table/parts/column-actions.d.ts.map +1 -0
- package/dist/table/parts/column-actions.js +170 -0
- package/dist/table/parts/data-table.d.ts +37 -0
- package/dist/table/parts/data-table.d.ts.map +1 -0
- package/dist/table/parts/data-table.js +338 -0
- package/dist/table/parts/detail-sheet.d.ts +9 -0
- package/dist/table/parts/detail-sheet.d.ts.map +1 -0
- package/dist/table/parts/detail-sheet.js +102 -0
- package/dist/table/parts/filter-text.d.ts +12 -0
- package/dist/table/parts/filter-text.d.ts.map +1 -0
- package/dist/table/parts/filter-text.js +34 -0
- package/dist/table/parts/footer-model.d.ts +54 -0
- package/dist/table/parts/footer-model.d.ts.map +1 -0
- package/dist/table/parts/footer-model.js +73 -0
- package/dist/table/parts/footer.d.ts +38 -0
- package/dist/table/parts/footer.d.ts.map +1 -0
- package/dist/table/parts/footer.js +131 -0
- package/dist/table/parts/group-row-model.d.ts +36 -0
- package/dist/table/parts/group-row-model.d.ts.map +1 -0
- package/dist/table/parts/group-row-model.js +50 -0
- package/dist/table/parts/group-row.d.ts +32 -0
- package/dist/table/parts/group-row.d.ts.map +1 -0
- package/dist/table/parts/group-row.js +143 -0
- package/dist/table/parts/head.d.ts +53 -0
- package/dist/table/parts/head.d.ts.map +1 -0
- package/dist/table/parts/head.js +462 -0
- package/dist/table/parts/live-row-actions.d.ts +9 -0
- package/dist/table/parts/live-row-actions.d.ts.map +1 -0
- package/dist/table/parts/live-row-actions.js +62 -0
- package/dist/table/parts/order-list.d.ts +22 -0
- package/dist/table/parts/order-list.d.ts.map +1 -0
- package/dist/table/parts/order-list.js +166 -0
- package/dist/table/parts/pager.d.ts +35 -0
- package/dist/table/parts/pager.d.ts.map +1 -0
- package/dist/table/parts/pager.js +184 -0
- package/dist/table/parts/phases.d.ts +50 -0
- package/dist/table/parts/phases.d.ts.map +1 -0
- package/dist/table/parts/phases.js +200 -0
- package/dist/table/parts/plus-glyph.d.ts +6 -0
- package/dist/table/parts/plus-glyph.d.ts.map +1 -0
- package/dist/table/parts/plus-glyph.js +8 -0
- package/dist/table/parts/range-editor.d.ts +17 -0
- package/dist/table/parts/range-editor.d.ts.map +1 -0
- package/dist/table/parts/range-editor.js +153 -0
- package/dist/table/parts/row-focus.d.ts +45 -0
- package/dist/table/parts/row-focus.d.ts.map +1 -0
- package/dist/table/parts/row-focus.js +131 -0
- package/dist/table/parts/row-menu.d.ts +14 -0
- package/dist/table/parts/row-menu.d.ts.map +1 -0
- package/dist/table/parts/row-menu.js +35 -0
- package/dist/table/parts/row-number.d.ts +40 -0
- package/dist/table/parts/row-number.d.ts.map +1 -0
- package/dist/table/parts/row-number.js +48 -0
- package/dist/table/parts/search-label.d.ts +5 -0
- package/dist/table/parts/search-label.d.ts.map +1 -0
- package/dist/table/parts/search-label.js +9 -0
- package/dist/table/parts/select-cell.d.ts +23 -0
- package/dist/table/parts/select-cell.d.ts.map +1 -0
- package/dist/table/parts/select-cell.js +77 -0
- package/dist/table/parts/tick-column.d.ts +29 -0
- package/dist/table/parts/tick-column.d.ts.map +1 -0
- package/dist/table/parts/tick-column.js +40 -0
- package/dist/table/parts/tiers.d.ts +40 -0
- package/dist/table/parts/tiers.d.ts.map +1 -0
- package/dist/table/parts/tiers.js +83 -0
- package/dist/table/parts/toolbar-editor.d.ts +14 -0
- package/dist/table/parts/toolbar-editor.d.ts.map +1 -0
- package/dist/table/parts/toolbar-editor.js +154 -0
- package/dist/table/parts/toolbar-filters.d.ts +35 -0
- package/dist/table/parts/toolbar-filters.d.ts.map +1 -0
- package/dist/table/parts/toolbar-filters.js +31 -0
- package/dist/table/parts/toolbar.d.ts +25 -0
- package/dist/table/parts/toolbar.d.ts.map +1 -0
- package/dist/table/parts/toolbar.js +146 -0
- package/dist/table/parts/tree-row-model.d.ts +38 -0
- package/dist/table/parts/tree-row-model.d.ts.map +1 -0
- package/dist/table/parts/tree-row-model.js +75 -0
- package/dist/table/parts/tri-state-header.d.ts +23 -0
- package/dist/table/parts/tri-state-header.d.ts.map +1 -0
- package/dist/table/parts/tri-state-header.js +40 -0
- package/dist/table/parts/view-door.d.ts +17 -0
- package/dist/table/parts/view-door.d.ts.map +1 -0
- package/dist/table/parts/view-door.js +51 -0
- package/dist/table/parts/view-panel.d.ts +7 -0
- package/dist/table/parts/view-panel.d.ts.map +1 -0
- package/dist/table/parts/view-panel.js +605 -0
- package/dist/table/parts/view-tab-menu.d.ts +17 -0
- package/dist/table/parts/view-tab-menu.d.ts.map +1 -0
- package/dist/table/parts/view-tab-menu.js +47 -0
- package/dist/table/parts/views-model.d.ts +64 -0
- package/dist/table/parts/views-model.d.ts.map +1 -0
- package/dist/table/parts/views-model.js +228 -0
- package/dist/table/parts/views.d.ts +126 -0
- package/dist/table/parts/views.d.ts.map +1 -0
- package/dist/table/parts/views.js +564 -0
- package/dist/table/parts/virtual.d.ts +33 -0
- package/dist/table/parts/virtual.d.ts.map +1 -0
- package/dist/table/parts/virtual.js +120 -0
- package/dist/table/table.css +2688 -0
- package/dist/table/use-data-table.d.ts +284 -0
- package/dist/table/use-data-table.d.ts.map +1 -0
- package/dist/table/use-data-table.js +751 -0
- package/dist/testing/dom-shims.d.ts +29 -0
- package/dist/testing/dom-shims.d.ts.map +1 -0
- package/dist/testing/dom-shims.js +114 -0
- package/dist/testing/expect-catalog.d.ts +30 -0
- package/dist/testing/expect-catalog.d.ts.map +1 -0
- package/dist/testing/expect-catalog.js +102 -0
- package/dist/testing/fake-channel.d.ts +17 -0
- package/dist/testing/fake-channel.d.ts.map +1 -0
- package/dist/testing/fake-channel.js +78 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +14 -0
- package/dist/testing/quality.d.ts +101 -0
- package/dist/testing/quality.d.ts.map +1 -0
- package/dist/testing/quality.js +419 -0
- package/dist/testing/settled.d.ts +37 -0
- package/dist/testing/settled.d.ts.map +1 -0
- package/dist/testing/settled.js +42 -0
- package/dist/testing/shell-invariants.d.ts +134 -0
- package/dist/testing/shell-invariants.d.ts.map +1 -0
- package/dist/testing/shell-invariants.js +274 -0
- package/dist/testing/slots.d.ts +16 -0
- package/dist/testing/slots.d.ts.map +1 -0
- package/dist/testing/slots.js +5 -0
- package/dist/tokens/accents.d.ts +37 -0
- package/dist/tokens/accents.d.ts.map +1 -0
- package/dist/tokens/accents.js +26 -0
- package/dist/tokens/basalt-names.d.ts +3 -0
- package/dist/tokens/basalt-names.d.ts.map +1 -0
- package/dist/tokens/basalt-names.js +367 -0
- package/dist/tokens/chart-vars.d.ts +85 -0
- package/dist/tokens/chart-vars.d.ts.map +1 -0
- package/dist/tokens/chart-vars.js +212 -0
- package/dist/tokens/core.d.ts +68 -124
- package/dist/tokens/core.d.ts.map +1 -1
- package/dist/tokens/core.js +114 -197
- package/dist/tokens/ctl-vars.d.ts +1 -9
- package/dist/tokens/ctl-vars.d.ts.map +1 -1
- package/dist/tokens/ctl-vars.js +1 -11
- package/dist/tokens/derive.d.ts +132 -4
- package/dist/tokens/derive.d.ts.map +1 -1
- package/dist/tokens/derive.js +236 -13
- package/dist/tokens/emit-fallback.d.ts +21 -0
- package/dist/tokens/emit-fallback.d.ts.map +1 -0
- package/dist/tokens/emit-fallback.js +22 -0
- package/dist/tokens/emit-json.d.ts +19 -0
- package/dist/tokens/emit-json.d.ts.map +1 -0
- package/dist/tokens/emit-json.js +29 -0
- package/dist/tokens/emit.d.ts +71 -0
- package/dist/tokens/emit.d.ts.map +1 -0
- package/dist/tokens/emit.js +179 -0
- package/dist/tokens/gates.d.ts +36 -0
- package/dist/tokens/gates.d.ts.map +1 -0
- package/dist/tokens/gates.js +177 -0
- package/dist/tokens/golden/default.css +233 -0
- package/dist/tokens/golden/hue-268-vibrancy-1.css +233 -0
- package/dist/tokens/hct.d.ts +1 -1
- package/dist/tokens/index.d.ts +4 -2
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +19 -5
- package/dist/tokens/motion.d.ts +140 -0
- package/dist/tokens/motion.d.ts.map +1 -0
- package/dist/tokens/motion.js +41 -0
- package/dist/tokens/oklab.d.ts +3 -3
- package/dist/tokens/oklab.d.ts.map +1 -1
- package/dist/tokens/palette.d.ts +122 -146
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +81 -79
- package/dist/tokens/part-vars.d.ts +8 -0
- package/dist/tokens/part-vars.d.ts.map +1 -0
- package/dist/tokens/part-vars.js +72 -0
- package/dist/tokens/ramps.d.ts +44 -0
- package/dist/tokens/ramps.d.ts.map +1 -0
- package/dist/tokens/ramps.js +32 -0
- package/dist/tokens/site-text.d.ts +8 -0
- package/dist/tokens/site-text.d.ts.map +1 -0
- package/dist/tokens/site-text.js +7 -0
- package/dist/tokens/size-classes.d.ts +12 -15
- package/dist/tokens/size-classes.d.ts.map +1 -1
- package/dist/tokens/size-classes.js +4 -4
- package/dist/tokens/space-scale.d.ts +2 -2
- package/dist/tokens/status-text.d.ts +16 -1
- package/dist/tokens/status-text.d.ts.map +1 -1
- package/dist/tokens/status-text.js +15 -0
- package/dist/tokens/table.d.ts +93 -0
- package/dist/tokens/table.d.ts.map +1 -0
- package/dist/tokens/table.js +599 -0
- package/dist/ui/accordion.d.ts +58 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.guard.d.ts +13 -0
- package/dist/ui/accordion.guard.d.ts.map +1 -0
- package/dist/ui/accordion.guard.js +6 -0
- package/dist/ui/accordion.js +96 -0
- package/dist/ui/alert.d.ts +35 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.guard.d.ts +14 -0
- package/dist/ui/alert.guard.d.ts.map +1 -0
- package/dist/ui/alert.guard.js +8 -0
- package/dist/ui/alert.js +76 -0
- package/dist/ui/avatar.d.ts +75 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/avatar.guard.d.ts +29 -0
- package/dist/ui/avatar.guard.d.ts.map +1 -0
- package/dist/ui/avatar.guard.js +14 -0
- package/dist/ui/avatar.js +154 -0
- package/dist/ui/badge.d.ts +95 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.guard.d.ts +16 -0
- package/dist/ui/badge.guard.d.ts.map +1 -0
- package/dist/ui/badge.guard.js +8 -0
- package/dist/ui/badge.js +162 -0
- package/dist/ui/button.d.ts +73 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.guard.d.ts +24 -0
- package/dist/ui/button.guard.d.ts.map +1 -0
- package/dist/ui/button.guard.js +12 -0
- package/dist/ui/button.js +127 -0
- package/dist/ui/calendar-grid.d.ts +31 -0
- package/dist/ui/calendar-grid.d.ts.map +1 -0
- package/dist/ui/calendar-grid.js +133 -0
- package/dist/ui/calendar.d.ts +74 -0
- package/dist/ui/calendar.d.ts.map +1 -0
- package/dist/ui/calendar.guard.d.ts +42 -0
- package/dist/ui/calendar.guard.d.ts.map +1 -0
- package/dist/ui/calendar.guard.js +12 -0
- package/dist/ui/calendar.js +119 -0
- package/dist/ui/card.d.ts +129 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.guard.d.ts +12 -0
- package/dist/ui/card.guard.d.ts.map +1 -0
- package/dist/ui/card.guard.js +6 -0
- package/dist/ui/card.js +202 -0
- package/dist/ui/checkbox-matrix.d.ts +82 -0
- package/dist/ui/checkbox-matrix.d.ts.map +1 -0
- package/dist/ui/checkbox-matrix.guard.d.ts +24 -0
- package/dist/ui/checkbox-matrix.guard.d.ts.map +1 -0
- package/dist/ui/checkbox-matrix.guard.js +6 -0
- package/dist/ui/checkbox-matrix.js +226 -0
- package/dist/ui/checkbox.d.ts +71 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.guard.d.ts +24 -0
- package/dist/ui/checkbox.guard.d.ts.map +1 -0
- package/dist/ui/checkbox.guard.js +8 -0
- package/dist/ui/checkbox.js +110 -0
- package/dist/ui/choice-card.d.ts +41 -0
- package/dist/ui/choice-card.d.ts.map +1 -0
- package/dist/ui/choice-card.guard.d.ts +17 -0
- package/dist/ui/choice-card.guard.d.ts.map +1 -0
- package/dist/ui/choice-card.guard.js +6 -0
- package/dist/ui/choice-card.js +51 -0
- package/dist/ui/collapsible.d.ts +44 -0
- package/dist/ui/collapsible.d.ts.map +1 -0
- package/dist/ui/collapsible.guard.d.ts +13 -0
- package/dist/ui/collapsible.guard.d.ts.map +1 -0
- package/dist/ui/collapsible.guard.js +6 -0
- package/dist/ui/collapsible.js +43 -0
- package/dist/ui/combobox.d.ts +310 -0
- package/dist/ui/combobox.d.ts.map +1 -0
- package/dist/ui/combobox.guard.d.ts +22 -0
- package/dist/ui/combobox.guard.d.ts.map +1 -0
- package/dist/ui/combobox.guard.js +12 -0
- package/dist/ui/combobox.js +642 -0
- package/dist/ui/context-menu.d.ts +66 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/context-menu.js +130 -0
- package/dist/ui/control-group.d.ts +129 -0
- package/dist/ui/control-group.d.ts.map +1 -0
- package/dist/ui/control-group.guard.d.ts +21 -0
- package/dist/ui/control-group.guard.d.ts.map +1 -0
- package/dist/ui/control-group.guard.js +12 -0
- package/dist/ui/control-group.js +132 -0
- package/dist/ui/copy-button.d.ts +35 -0
- package/dist/ui/copy-button.d.ts.map +1 -0
- package/dist/ui/copy-button.js +80 -0
- package/dist/ui/date-picker.d.ts +104 -0
- package/dist/ui/date-picker.d.ts.map +1 -0
- package/dist/ui/date-picker.guard.d.ts +38 -0
- package/dist/ui/date-picker.guard.d.ts.map +1 -0
- package/dist/ui/date-picker.guard.js +13 -0
- package/dist/ui/date-picker.js +265 -0
- package/dist/ui/dialog.d.ts +172 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.guard.d.ts +30 -0
- package/dist/ui/dialog.guard.d.ts.map +1 -0
- package/dist/ui/dialog.guard.js +16 -0
- package/dist/ui/dialog.js +207 -0
- package/dist/ui/drag-auto-scroll.d.ts +31 -0
- package/dist/ui/drag-auto-scroll.d.ts.map +1 -0
- package/dist/ui/drag-auto-scroll.js +78 -0
- package/dist/ui/entity.d.ts +81 -0
- package/dist/ui/entity.d.ts.map +1 -0
- package/dist/ui/entity.guard.d.ts +25 -0
- package/dist/ui/entity.guard.d.ts.map +1 -0
- package/dist/ui/entity.guard.js +14 -0
- package/dist/ui/entity.js +124 -0
- package/dist/ui/field.d.ts +115 -0
- package/dist/ui/field.d.ts.map +1 -0
- package/dist/ui/field.guard.d.ts +16 -0
- package/dist/ui/field.guard.d.ts.map +1 -0
- package/dist/ui/field.guard.js +8 -0
- package/dist/ui/field.js +112 -0
- package/dist/ui/file-upload.d.ts +75 -0
- package/dist/ui/file-upload.d.ts.map +1 -0
- package/dist/ui/file-upload.guard.d.ts +24 -0
- package/dist/ui/file-upload.guard.d.ts.map +1 -0
- package/dist/ui/file-upload.guard.js +10 -0
- package/dist/ui/file-upload.js +330 -0
- package/dist/ui/guard-completeness.d.ts +28 -0
- package/dist/ui/guard-completeness.d.ts.map +1 -0
- package/dist/ui/guard-completeness.js +164 -0
- package/dist/ui/header-actions.d.ts +9 -0
- package/dist/ui/header-actions.d.ts.map +1 -0
- package/dist/ui/header-actions.js +22 -0
- package/dist/ui/info-hint.d.ts +61 -0
- package/dist/ui/info-hint.d.ts.map +1 -0
- package/dist/ui/info-hint.guard.d.ts +23 -0
- package/dist/ui/info-hint.guard.d.ts.map +1 -0
- package/dist/ui/info-hint.guard.js +10 -0
- package/dist/ui/info-hint.js +28 -0
- package/dist/ui/input.d.ts +41 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.guard.d.ts +12 -0
- package/dist/ui/input.guard.d.ts.map +1 -0
- package/dist/ui/input.guard.js +6 -0
- package/dist/ui/input.js +59 -0
- package/dist/ui/kbd.d.ts +30 -0
- package/dist/ui/kbd.d.ts.map +1 -0
- package/dist/ui/kbd.guard.d.ts +13 -0
- package/dist/ui/kbd.guard.d.ts.map +1 -0
- package/dist/ui/kbd.guard.js +6 -0
- package/dist/ui/kbd.js +40 -0
- package/dist/ui/leave-confirm.d.ts +20 -0
- package/dist/ui/leave-confirm.d.ts.map +1 -0
- package/dist/ui/leave-confirm.js +34 -0
- package/dist/ui/list-sheet.d.ts +25 -0
- package/dist/ui/list-sheet.d.ts.map +1 -0
- package/dist/ui/list-sheet.js +8 -0
- package/dist/ui/menu.d.ts +159 -0
- package/dist/ui/menu.d.ts.map +1 -0
- package/dist/ui/menu.guard.d.ts +51 -0
- package/dist/ui/menu.guard.d.ts.map +1 -0
- package/dist/ui/menu.guard.js +18 -0
- package/dist/ui/menu.js +248 -0
- package/dist/ui/meter.d.ts +143 -0
- package/dist/ui/meter.d.ts.map +1 -0
- package/dist/ui/meter.guard.d.ts +26 -0
- package/dist/ui/meter.guard.d.ts.map +1 -0
- package/dist/ui/meter.guard.js +26 -0
- package/dist/ui/meter.js +380 -0
- package/dist/ui/num.d.ts +37 -0
- package/dist/ui/num.d.ts.map +1 -0
- package/dist/ui/num.guard.d.ts +15 -0
- package/dist/ui/num.guard.d.ts.map +1 -0
- package/dist/ui/num.guard.js +8 -0
- package/dist/ui/num.js +36 -0
- package/dist/ui/number-field.d.ts +45 -0
- package/dist/ui/number-field.d.ts.map +1 -0
- package/dist/ui/number-field.guard.d.ts +18 -0
- package/dist/ui/number-field.guard.d.ts.map +1 -0
- package/dist/ui/number-field.guard.js +6 -0
- package/dist/ui/number-field.js +87 -0
- package/dist/ui/one-time-code.d.ts +54 -0
- package/dist/ui/one-time-code.d.ts.map +1 -0
- package/dist/ui/one-time-code.guard.d.ts +18 -0
- package/dist/ui/one-time-code.guard.d.ts.map +1 -0
- package/dist/ui/one-time-code.guard.js +6 -0
- package/dist/ui/one-time-code.js +65 -0
- package/dist/ui/overlay-presenter.d.ts +65 -0
- package/dist/ui/overlay-presenter.d.ts.map +1 -0
- package/dist/ui/overlay-presenter.js +82 -0
- package/dist/ui/overlay-sheet.d.ts +8 -0
- package/dist/ui/overlay-sheet.d.ts.map +1 -0
- package/dist/ui/overlay-sheet.js +37 -0
- package/dist/ui/password-input.d.ts +18 -0
- package/dist/ui/password-input.d.ts.map +1 -0
- package/dist/ui/password-input.js +66 -0
- package/dist/ui/popover.d.ts +77 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.guard.d.ts +31 -0
- package/dist/ui/popover.guard.d.ts.map +1 -0
- package/dist/ui/popover.guard.js +12 -0
- package/dist/ui/popover.js +118 -0
- package/dist/ui/primitive.contract.d.ts +63 -0
- package/dist/ui/primitive.contract.d.ts.map +1 -0
- package/dist/ui/primitive.contract.js +302 -0
- package/dist/ui/progress.d.ts +84 -0
- package/dist/ui/progress.d.ts.map +1 -0
- package/dist/ui/progress.guard.d.ts +27 -0
- package/dist/ui/progress.guard.d.ts.map +1 -0
- package/dist/ui/progress.guard.js +14 -0
- package/dist/ui/progress.js +150 -0
- package/dist/ui/quick-picks.d.ts +46 -0
- package/dist/ui/quick-picks.d.ts.map +1 -0
- package/dist/ui/quick-picks.guard.d.ts +18 -0
- package/dist/ui/quick-picks.guard.d.ts.map +1 -0
- package/dist/ui/quick-picks.guard.js +6 -0
- package/dist/ui/quick-picks.js +45 -0
- package/dist/ui/radio-group.d.ts +79 -0
- package/dist/ui/radio-group.d.ts.map +1 -0
- package/dist/ui/radio-group.guard.d.ts +21 -0
- package/dist/ui/radio-group.guard.d.ts.map +1 -0
- package/dist/ui/radio-group.guard.js +8 -0
- package/dist/ui/radio-group.js +86 -0
- package/dist/ui/resizable.d.ts +62 -0
- package/dist/ui/resizable.d.ts.map +1 -0
- package/dist/ui/resizable.js +42 -0
- package/dist/ui/scroll-area.d.ts +35 -0
- package/dist/ui/scroll-area.d.ts.map +1 -0
- package/dist/ui/scroll-area.guard.d.ts +13 -0
- package/dist/ui/scroll-area.guard.d.ts.map +1 -0
- package/dist/ui/scroll-area.guard.js +8 -0
- package/dist/ui/scroll-area.js +75 -0
- package/dist/ui/segmented.d.ts +102 -0
- package/dist/ui/segmented.d.ts.map +1 -0
- package/dist/ui/segmented.guard.d.ts +22 -0
- package/dist/ui/segmented.guard.d.ts.map +1 -0
- package/dist/ui/segmented.guard.js +8 -0
- package/dist/ui/segmented.js +134 -0
- package/dist/ui/select.d.ts +211 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.guard.d.ts +27 -0
- package/dist/ui/select.guard.d.ts.map +1 -0
- package/dist/ui/select.guard.js +14 -0
- package/dist/ui/select.js +467 -0
- package/dist/ui/separator.d.ts +32 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.guard.d.ts +12 -0
- package/dist/ui/separator.guard.d.ts.map +1 -0
- package/dist/ui/separator.guard.js +6 -0
- package/dist/ui/separator.js +30 -0
- package/dist/ui/sheet.d.ts +150 -0
- package/dist/ui/sheet.d.ts.map +1 -0
- package/dist/ui/sheet.guard.d.ts +28 -0
- package/dist/ui/sheet.guard.d.ts.map +1 -0
- package/dist/ui/sheet.guard.js +15 -0
- package/dist/ui/sheet.js +359 -0
- package/dist/ui/skeleton.d.ts +52 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.guard.d.ts +15 -0
- package/dist/ui/skeleton.guard.d.ts.map +1 -0
- package/dist/ui/skeleton.guard.js +8 -0
- package/dist/ui/skeleton.js +54 -0
- package/dist/ui/slider.d.ts +43 -0
- package/dist/ui/slider.d.ts.map +1 -0
- package/dist/ui/slider.guard.d.ts +20 -0
- package/dist/ui/slider.guard.d.ts.map +1 -0
- package/dist/ui/slider.guard.js +6 -0
- package/dist/ui/slider.js +56 -0
- package/dist/ui/slots.d.ts +60 -0
- package/dist/ui/slots.d.ts.map +1 -0
- package/dist/ui/slots.js +112 -0
- package/dist/ui/sortable-list.d.ts +67 -0
- package/dist/ui/sortable-list.d.ts.map +1 -0
- package/dist/ui/sortable-list.js +275 -0
- package/dist/ui/status.d.ts +62 -0
- package/dist/ui/status.d.ts.map +1 -0
- package/dist/ui/status.guard.d.ts +16 -0
- package/dist/ui/status.guard.d.ts.map +1 -0
- package/dist/ui/status.guard.js +12 -0
- package/dist/ui/status.js +43 -0
- package/dist/ui/swatch-picker.d.ts +59 -0
- package/dist/ui/swatch-picker.d.ts.map +1 -0
- package/dist/ui/swatch-picker.guard.d.ts +20 -0
- package/dist/ui/swatch-picker.guard.d.ts.map +1 -0
- package/dist/ui/swatch-picker.guard.js +6 -0
- package/dist/ui/swatch-picker.js +198 -0
- package/dist/ui/switch.d.ts +31 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.guard.d.ts +16 -0
- package/dist/ui/switch.guard.d.ts.map +1 -0
- package/dist/ui/switch.guard.js +6 -0
- package/dist/ui/switch.js +16 -0
- package/dist/ui/table.d.ts +91 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.guard.d.ts +14 -0
- package/dist/ui/table.guard.d.ts.map +1 -0
- package/dist/ui/table.guard.js +8 -0
- package/dist/ui/table.js +132 -0
- package/dist/ui/tabs.d.ts +103 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.guard.d.ts +12 -0
- package/dist/ui/tabs.guard.d.ts.map +1 -0
- package/dist/ui/tabs.guard.js +6 -0
- package/dist/ui/tabs.js +148 -0
- package/dist/ui/tag-input.d.ts +59 -0
- package/dist/ui/tag-input.d.ts.map +1 -0
- package/dist/ui/tag-input.guard.d.ts +19 -0
- package/dist/ui/tag-input.guard.d.ts.map +1 -0
- package/dist/ui/tag-input.guard.js +6 -0
- package/dist/ui/tag-input.js +191 -0
- package/dist/ui/textarea.d.ts +39 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.guard.d.ts +17 -0
- package/dist/ui/textarea.guard.d.ts.map +1 -0
- package/dist/ui/textarea.guard.js +6 -0
- package/dist/ui/textarea.js +66 -0
- package/dist/ui/toast.d.ts +77 -0
- package/dist/ui/toast.d.ts.map +1 -0
- package/dist/ui/toast.guard.d.ts +12 -0
- package/dist/ui/toast.guard.d.ts.map +1 -0
- package/dist/ui/toast.guard.js +6 -0
- package/dist/ui/toast.js +109 -0
- package/dist/ui/toolbar.d.ts +101 -0
- package/dist/ui/toolbar.d.ts.map +1 -0
- package/dist/ui/toolbar.guard.d.ts +16 -0
- package/dist/ui/toolbar.guard.d.ts.map +1 -0
- package/dist/ui/toolbar.guard.js +10 -0
- package/dist/ui/toolbar.js +68 -0
- package/dist/ui/tooltip.d.ts +48 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.guard.d.ts +19 -0
- package/dist/ui/tooltip.guard.d.ts.map +1 -0
- package/dist/ui/tooltip.guard.js +8 -0
- package/dist/ui/tooltip.js +122 -0
- package/dist/ui/tree.d.ts +170 -0
- package/dist/ui/tree.d.ts.map +1 -0
- package/dist/ui/tree.guard.d.ts +41 -0
- package/dist/ui/tree.guard.d.ts.map +1 -0
- package/dist/ui/tree.guard.js +10 -0
- package/dist/ui/tree.js +1290 -0
- package/dist/ui/virtual-list.d.ts +94 -0
- package/dist/ui/virtual-list.d.ts.map +1 -0
- package/dist/ui/virtual-list.guard.d.ts +20 -0
- package/dist/ui/virtual-list.guard.d.ts.map +1 -0
- package/dist/ui/virtual-list.guard.js +13 -0
- package/dist/ui/virtual-list.js +93 -0
- package/dist/vite/allotment.d.ts +26 -0
- package/dist/vite/allotment.d.ts.map +1 -0
- package/dist/vite/allotment.js +108 -0
- package/dist/vite/doc.d.ts +4 -0
- package/dist/vite/doc.d.ts.map +1 -0
- package/dist/vite/doc.js +92 -0
- package/dist/vite/ejects.d.ts +19 -0
- package/dist/vite/ejects.d.ts.map +1 -0
- package/dist/vite/ejects.js +46 -0
- package/dist/vite/graph.d.ts +36 -0
- package/dist/vite/graph.d.ts.map +1 -0
- package/dist/vite/graph.js +167 -0
- package/dist/vite/head.d.ts +72 -0
- package/dist/vite/head.d.ts.map +1 -0
- package/dist/vite/head.js +201 -0
- package/dist/vite/index.d.ts +25 -0
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/index.js +143 -0
- package/dist/vite/sources.d.ts +16 -0
- package/dist/vite/sources.d.ts.map +1 -0
- package/dist/vite/sources.js +32 -0
- package/dist/vite/table-sheet.d.ts +3 -0
- package/dist/vite/table-sheet.d.ts.map +1 -0
- package/dist/vite/table-sheet.js +12 -0
- package/docs/accordion.md +60 -0
- package/docs/add.md +34 -0
- package/docs/alert.md +37 -0
- package/docs/app-shell.md +71 -0
- package/docs/appearance-switcher.md +38 -0
- package/docs/apply-move.md +28 -0
- package/docs/area-y.md +27 -0
- package/docs/article-layout.md +48 -0
- package/docs/astro-parts.md +22 -0
- package/docs/astro.md +404 -0
- package/docs/avatar.md +63 -0
- package/docs/badge.md +77 -0
- package/docs/band-strip.md +38 -0
- package/docs/bar-list.md +57 -0
- package/docs/bars.md +55 -0
- package/docs/basalt-astro.md +40 -0
- package/docs/basalt-provider.md +40 -0
- package/docs/basalt-shiki.md +27 -0
- package/docs/basalt.md +36 -0
- package/docs/bind-invalidation.md +52 -0
- package/docs/block-frame.md +26 -0
- package/docs/board.md +45 -0
- package/docs/bulk-bar.md +36 -0
- package/docs/button.md +58 -0
- package/docs/calendar.md +49 -0
- package/docs/callout.md +36 -0
- package/docs/card-figure.md +29 -0
- package/docs/card-footer.md +30 -0
- package/docs/card-grid.md +33 -0
- package/docs/card-strip.md +29 -0
- package/docs/card-tabs.md +29 -0
- package/docs/card.md +102 -0
- package/docs/cartesian-chart-guide.md +204 -0
- package/docs/cartesian-chart.md +57 -0
- package/docs/cell-meta.md +28 -0
- package/docs/cell-stack.md +32 -0
- package/docs/chain-view.md +53 -0
- package/docs/chart-card-states.md +52 -0
- package/docs/chart-card.md +79 -0
- package/docs/chart-cursor.md +20 -0
- package/docs/chart-labels.md +62 -0
- package/docs/checkbox-matrix.md +53 -0
- package/docs/checkbox.md +55 -0
- package/docs/choice-card.md +40 -0
- package/docs/code-block.md +37 -0
- package/docs/col.md +113 -0
- package/docs/collapsible.md +50 -0
- package/docs/combobox.md +212 -0
- package/docs/command-palette.md +55 -0
- package/docs/composer.md +41 -0
- package/docs/connection-indicator.md +36 -0
- package/docs/context-menu.md +56 -0
- package/docs/control-group.md +108 -0
- package/docs/control-home.md +31 -0
- package/docs/control-property.md +36 -0
- package/docs/control-view.md +33 -0
- package/docs/copy-button.md +35 -0
- package/docs/create-app-form.md +35 -0
- package/docs/create-channel.md +46 -0
- package/docs/create-format.md +24 -0
- package/docs/create-query-client.md +26 -0
- package/docs/create-synced-state.md +69 -0
- package/docs/data-panel.md +89 -0
- package/docs/data-table-body.md +34 -0
- package/docs/data-table.md +38 -0
- package/docs/date-picker.md +81 -0
- package/docs/date-stepper.md +43 -0
- package/docs/de.md +29 -0
- package/docs/define-block.md +55 -0
- package/docs/define-catalog.md +36 -0
- package/docs/define-commands.md +32 -0
- package/docs/define-control-kind.md +31 -0
- package/docs/define-controls.md +80 -0
- package/docs/define-nav.md +53 -0
- package/docs/define-overlays.md +34 -0
- package/docs/delta.md +31 -0
- package/docs/dialog.md +135 -0
- package/docs/dock.md +56 -0
- package/docs/dot.md +27 -0
- package/docs/eject.md +49 -0
- package/docs/empty-state.md +49 -0
- package/docs/empty.md +33 -0
- package/docs/entity.md +63 -0
- package/docs/es.md +29 -0
- package/docs/event-list.md +55 -0
- package/docs/expect-catalog.md +32 -0
- package/docs/expect-shell-invariants.md +36 -0
- package/docs/external-field.md +33 -0
- package/docs/external-href.md +30 -0
- package/docs/facet-counts.md +28 -0
- package/docs/fact.md +30 -0
- package/docs/facts.md +33 -0
- package/docs/favorite-toggle.md +38 -0
- package/docs/field.md +110 -0
- package/docs/file-upload.md +54 -0
- package/docs/filter-set.md +42 -0
- package/docs/filter-slot.md +32 -0
- package/docs/flow-canvas.md +57 -0
- package/docs/flow-checklist.md +34 -0
- package/docs/foot-facts.md +27 -0
- package/docs/form-action-row.md +38 -0
- package/docs/form-confirm-row.md +40 -0
- package/docs/form-field.md +53 -0
- package/docs/form-footer.md +35 -0
- package/docs/form-group-row.md +44 -0
- package/docs/form-row.md +35 -0
- package/docs/form-section.md +52 -0
- package/docs/fr.md +29 -0
- package/docs/frame-tabs.md +45 -0
- package/docs/frame-tiles.md +47 -0
- package/docs/heatmap.md +44 -0
- package/docs/info-hint.md +32 -0
- package/docs/inner-nav.md +62 -0
- package/docs/input.md +36 -0
- package/docs/install-dom-shims.md +27 -0
- package/docs/interval-track.md +47 -0
- package/docs/intl-scope.md +35 -0
- package/docs/kanban-card.md +52 -0
- package/docs/kbd.md +33 -0
- package/docs/line-y.md +27 -0
- package/docs/lines.md +55 -0
- package/docs/link.md +27 -0
- package/docs/live-query.md +36 -0
- package/docs/mail-list.md +59 -0
- package/docs/mail-thread.md +36 -0
- package/docs/mdx-components.md +30 -0
- package/docs/menu.md +141 -0
- package/docs/message-actions.md +30 -0
- package/docs/message.md +33 -0
- package/docs/meter.md +65 -0
- package/docs/mini-bars.md +58 -0
- package/docs/model-picker.md +39 -0
- package/docs/motion-duration.md +26 -0
- package/docs/motion-ease-enter.md +21 -0
- package/docs/motion-ease-exit.md +21 -0
- package/docs/motion-ease-standard.md +21 -0
- package/docs/motion-preset.md +29 -0
- package/docs/motion-spring.md +26 -0
- package/docs/motion-stagger.md +19 -0
- package/docs/motion.md +82 -0
- package/docs/nav-target.md +29 -0
- package/docs/notify.md +32 -0
- package/docs/num.md +37 -0
- package/docs/number-field.md +41 -0
- package/docs/one-time-code.md +52 -0
- package/docs/optimistic.md +35 -0
- package/docs/overlay-host.md +30 -0
- package/docs/page-aside.md +39 -0
- package/docs/page-bar.md +92 -0
- package/docs/page-summary.md +45 -0
- package/docs/page.md +47 -0
- package/docs/part-view.md +31 -0
- package/docs/password-input.md +29 -0
- package/docs/peek.md +60 -0
- package/docs/period-of.md +29 -0
- package/docs/persisted.md +67 -0
- package/docs/popover.md +60 -0
- package/docs/progress.md +63 -0
- package/docs/property-list.md +37 -0
- package/docs/prose.md +36 -0
- package/docs/quality.md +38 -0
- package/docs/query-state.md +40 -0
- package/docs/quick-picks.md +41 -0
- package/docs/radio-group.md +53 -0
- package/docs/range-navigator.md +34 -0
- package/docs/reasoning-trace.md +31 -0
- package/docs/recipes/.gitkeep +0 -0
- package/docs/recipes/add-page.md +33 -0
- package/docs/recipes/ai-approvals-sources.md +51 -0
- package/docs/recipes/ai-artifacts.md +59 -0
- package/docs/recipes/ai-blocks.md +59 -0
- package/docs/recipes/ai-card.md +47 -0
- package/docs/recipes/ai-external-runtime.md +59 -0
- package/docs/recipes/ai-sdk-tools.md +57 -0
- package/docs/recipes/app-shell.md +27 -0
- package/docs/recipes/band.md +59 -0
- package/docs/recipes/board.md +39 -0
- package/docs/recipes/candlestick.md +50 -0
- package/docs/recipes/card-regions.md +60 -0
- package/docs/recipes/chat-thread-composer.md +43 -0
- package/docs/recipes/chat-thread-scroll.md +45 -0
- package/docs/recipes/chat-thread.md +60 -0
- package/docs/recipes/cursor-table.md +56 -0
- package/docs/recipes/dashboard-cells.md +60 -0
- package/docs/recipes/dependent-validation.md +50 -0
- package/docs/recipes/end-marker.md +54 -0
- package/docs/recipes/export.md +38 -0
- package/docs/recipes/field-array.md +54 -0
- package/docs/recipes/file-drop.md +53 -0
- package/docs/recipes/forecast-segment.md +44 -0
- package/docs/recipes/inner-nav.md +52 -0
- package/docs/recipes/loader-suspense.md +50 -0
- package/docs/recipes/localise-app.md +61 -0
- package/docs/recipes/lollipop.md +56 -0
- package/docs/recipes/markdown.md +40 -0
- package/docs/recipes/mdx.md +33 -0
- package/docs/recipes/memory-state.md +48 -0
- package/docs/recipes/optimistic-list.md +60 -0
- package/docs/recipes/optimistic.md +26 -0
- package/docs/recipes/realtime-client.md +50 -0
- package/docs/recipes/remembered-values.md +47 -0
- package/docs/recipes/saved-views.md +60 -0
- package/docs/recipes/seam-bar.md +59 -0
- package/docs/recipes/seam-linked.md +56 -0
- package/docs/recipes/seam-track.md +61 -0
- package/docs/recipes/shot-state.md +21 -0
- package/docs/recipes/threshold-recolor.md +46 -0
- package/docs/recipes/timeline.md +59 -0
- package/docs/recipes/trend-line.md +43 -0
- package/docs/recipes/two-pane.md +51 -0
- package/docs/recipes/view-switch.md +55 -0
- package/docs/recipes/websocket-transport.md +60 -0
- package/docs/recipes/window-key.md +40 -0
- package/docs/record-at.md +33 -0
- package/docs/rect.md +27 -0
- package/docs/refresh-button.md +45 -0
- package/docs/relationship-card.md +50 -0
- package/docs/resizable.md +58 -0
- package/docs/router-defaults.md +41 -0
- package/docs/row-list.md +66 -0
- package/docs/schedule.md +59 -0
- package/docs/scroll-area.md +36 -0
- package/docs/section.md +40 -0
- package/docs/segmented.md +66 -0
- package/docs/select.md +145 -0
- package/docs/separator.md +33 -0
- package/docs/set-appearance.md +26 -0
- package/docs/set-scheme.md +23 -0
- package/docs/settings-layout.md +40 -0
- package/docs/settled.md +31 -0
- package/docs/sheet.md +95 -0
- package/docs/shot-state.md +49 -0
- package/docs/site-article.md +43 -0
- package/docs/site-bento.md +35 -0
- package/docs/site-call-to-action.md +32 -0
- package/docs/site-callout.md +36 -0
- package/docs/site-changelog.md +32 -0
- package/docs/site-code-block.md +35 -0
- package/docs/site-comparison.md +47 -0
- package/docs/site-data-table.md +34 -0
- package/docs/site-feature.md +31 -0
- package/docs/site-field.md +38 -0
- package/docs/site-footer.md +35 -0
- package/docs/site-form.md +35 -0
- package/docs/site-header.md +59 -0
- package/docs/site-hero.md +41 -0
- package/docs/site-mdx-components.md +37 -0
- package/docs/site-nav.md +34 -0
- package/docs/site-pager.md +32 -0
- package/docs/site-post-list.md +35 -0
- package/docs/site-question-list.md +37 -0
- package/docs/site-script.md +30 -0
- package/docs/site-submit.md +27 -0
- package/docs/site-tab.md +31 -0
- package/docs/site-tabs.md +36 -0
- package/docs/skeleton.md +52 -0
- package/docs/slider.md +40 -0
- package/docs/slots.md +28 -0
- package/docs/sortable-list.md +43 -0
- package/docs/sparkline.md +64 -0
- package/docs/spec.md +41 -0
- package/docs/split-page.md +44 -0
- package/docs/stagger-delay.md +26 -0
- package/docs/stat-card.md +77 -0
- package/docs/stat-cell.md +66 -0
- package/docs/stat-group.md +37 -0
- package/docs/static-site.md +163 -0
- package/docs/status.md +53 -0
- package/docs/step-rail.md +39 -0
- package/docs/stepper.md +35 -0
- package/docs/swatch-picker.md +48 -0
- package/docs/switch.md +33 -0
- package/docs/table-codec.md +39 -0
- package/docs/table-pager.md +29 -0
- package/docs/table-toolbar.md +33 -0
- package/docs/table.md +101 -0
- package/docs/tabs.md +80 -0
- package/docs/tag-input.md +53 -0
- package/docs/testing.md +59 -0
- package/docs/text.md +27 -0
- package/docs/textarea.md +38 -0
- package/docs/theme-script.md +36 -0
- package/docs/theme-switch.md +34 -0
- package/docs/to-menu-template.md +31 -0
- package/docs/to-submit-errors.md +28 -0
- package/docs/toast-host.md +27 -0
- package/docs/toast.md +83 -0
- package/docs/toc.md +37 -0
- package/docs/toolbar.md +87 -0
- package/docs/tooltip.md +39 -0
- package/docs/tree.md +63 -0
- package/docs/unwrap.md +29 -0
- package/docs/use-app-form.md +36 -0
- package/docs/use-appearance.md +27 -0
- package/docs/use-chart-focus.md +54 -0
- package/docs/use-connection.md +30 -0
- package/docs/use-control.md +30 -0
- package/docs/use-data-table.md +85 -0
- package/docs/use-favorite.md +34 -0
- package/docs/use-flow.md +30 -0
- package/docs/use-focus-scope.md +24 -0
- package/docs/use-form-draft.md +40 -0
- package/docs/use-format.md +31 -0
- package/docs/use-freshness.md +33 -0
- package/docs/use-hotkey.md +28 -0
- package/docs/use-local-control.md +28 -0
- package/docs/use-motion-preset.md +29 -0
- package/docs/use-now.md +19 -0
- package/docs/use-peek.md +32 -0
- package/docs/use-resolved-tokens.md +29 -0
- package/docs/use-size-class.md +32 -0
- package/docs/use-table-views.md +39 -0
- package/docs/use-unsaved-guard.md +52 -0
- package/docs/use-window-chrome.md +30 -0
- package/docs/verdict.md +27 -0
- package/docs/view-tabs.md +44 -0
- package/docs/virtual-list.md +51 -0
- package/docs/vite.md +79 -0
- package/docs/waterfall.md +53 -0
- package/docs/widgets.md +79 -0
- package/docs/with-form.md +32 -0
- package/docs/wizard-dialog.md +40 -0
- package/docs/zh-hans.md +29 -0
- package/llms.txt +1924 -1169
- package/migrations/areas/agent.json +10 -0
- package/migrations/areas/ai.json +10 -0
- package/migrations/areas/cards.json +696 -0
- package/migrations/areas/charts.json +898 -0
- package/migrations/areas/cli.json +146 -0
- package/migrations/areas/content.json +268 -0
- package/migrations/areas/controls.json +425 -0
- package/migrations/areas/data.json +133 -0
- package/migrations/areas/legacy-1x.json +663 -0
- package/migrations/areas/lint.json +130 -0
- package/migrations/areas/page.json +251 -0
- package/migrations/areas/removed-2x.json +421 -0
- package/migrations/areas/router.json +144 -0
- package/migrations/areas/shell.json +489 -0
- package/migrations/areas/state.json +511 -0
- package/migrations/areas/table.json +536 -0
- package/migrations/areas/tokens.json +3294 -0
- package/migrations/areas/ui.json +1651 -0
- package/package.json +451 -153
- package/src/ai/caret.ts +51 -0
- package/src/ai/catalog/block.tsx +113 -0
- package/src/ai/catalog/define.ts +86 -0
- package/src/ai/catalog/validate.ts +144 -0
- package/src/ai/composer.tsx +545 -0
- package/src/ai/contract.ts +142 -0
- package/src/ai/glyphs.tsx +89 -0
- package/src/ai/index.ts +31 -0
- package/src/ai/mention-text.ts +106 -0
- package/src/ai/message.tsx +178 -0
- package/src/ai/model-picker.tsx +144 -0
- package/src/ai/part-view.tsx +146 -0
- package/src/ai/reasoning-trace.tsx +190 -0
- package/src/ai/tool-view.ts +54 -0
- package/src/astro/BasaltFonts.astro +32 -0
- package/src/astro/SiteHead.astro +21 -0
- package/src/astro/build.ts +94 -0
- package/src/astro/fonts.ts +25 -0
- package/src/astro/head.ts +157 -0
- package/src/astro/index.ts +227 -0
- package/src/astro/islands.ts +81 -0
- package/src/astro/mdx/Chart.astro +25 -0
- package/src/astro/mdx/DataTable.astro +27 -0
- package/src/astro/mdx/chart-island.tsx +166 -0
- package/src/astro/mdx/css.d.ts +2 -0
- package/src/astro/mdx/messages.ts +9 -0
- package/src/astro/mdx/table-island.tsx +77 -0
- package/src/astro/notes.ts +203 -0
- package/src/astro/parts.ts +514 -0
- package/src/astro/shiki.ts +30 -0
- package/src/astro/sources.ts +103 -0
- package/src/cards/bar-list-scroll.tsx +92 -0
- package/src/cards/bar-list.tsx +453 -0
- package/src/cards/bar-list.type-guard.tsx +107 -0
- package/src/cards/board.tsx +448 -0
- package/src/cards/cards.type-guard.tsx +82 -0
- package/src/cards/chain-layout.ts +291 -0
- package/src/cards/chain-view.tsx +597 -0
- package/src/cards/contract.ts +193 -0
- package/src/cards/data-panel.tsx +557 -0
- package/src/cards/edge-path.ts +70 -0
- package/src/cards/event-list-model.ts +167 -0
- package/src/cards/event-list.tsx +496 -0
- package/src/cards/flow-canvas.tsx +780 -0
- package/src/cards/flow-checklist.tsx +94 -0
- package/src/cards/flow.ts +136 -0
- package/src/cards/frame-caps.type-guard.tsx +94 -0
- package/src/cards/frame-kit.tsx +125 -0
- package/src/cards/frame-types.type-guard.ts +35 -0
- package/src/cards/index.ts +82 -0
- package/src/cards/kanban-actions.ts +41 -0
- package/src/cards/kanban-card.tsx +347 -0
- package/src/cards/kanban-card.type-guard.tsx +57 -0
- package/src/cards/list-focus.ts +304 -0
- package/src/cards/mail-list.tsx +580 -0
- package/src/cards/mail-thread.tsx +219 -0
- package/src/cards/optional-undefined.type-guard.tsx +84 -0
- package/src/cards/period-label.ts +31 -0
- package/src/cards/relationship-card.tsx +161 -0
- package/src/cards/row-list.tsx +326 -0
- package/src/cards/row-list.type-guard.tsx +67 -0
- package/src/cards/schedule-model.ts +178 -0
- package/src/cards/schedule.tsx +1236 -0
- package/src/cards/stat-card-parts.tsx +69 -0
- package/src/cards/stat-card.tsx +303 -0
- package/src/cards/stat-cell.tsx +615 -0
- package/src/cards/stat-group-shared.ts +39 -0
- package/src/cards/stat-group.tsx +356 -0
- package/src/cards/stat-group.type-guard.tsx +146 -0
- package/src/cards/step-rail.tsx +201 -0
- package/src/cards/viewport.ts +310 -0
- package/src/charts/axis-gaps.ts +524 -0
- package/src/charts/box.tsx +44 -10
- package/src/charts/canvas.ts +164 -0
- package/src/charts/card-context.ts +10 -0
- package/src/charts/chart-box.module.css +199 -43
- package/src/charts/chart-box.module.css.d.ts +2 -0
- package/src/charts/chart-dates.ts +32 -14
- package/src/charts/chart-labels-widths.gen.ts +101 -0
- package/src/charts/chart-labels.ts +220 -0
- package/src/charts/chart-legend.module.css +50 -5
- package/src/charts/chart-legend.module.css.d.ts +1 -0
- package/src/charts/contract.ts +707 -0
- package/src/charts/core/axis-ext.ts +569 -0
- package/src/charts/core/bar-values.ts +989 -0
- package/src/charts/core/compile.ts +3412 -0
- package/src/charts/core/cursor.ts +461 -0
- package/src/charts/core/curves.ts +111 -0
- package/src/charts/core/label-backing.ts +75 -0
- package/src/charts/core/label-ties.ts +80 -0
- package/src/charts/core/plot-context.ts +69 -0
- package/src/charts/core/portal.ts +180 -0
- package/src/charts/core/probe/bar.tsx +28 -0
- package/src/charts/core/probe/base0.tsx +4 -0
- package/src/charts/core/probe/line.tsx +22 -0
- package/src/charts/core/probe/sparkline.tsx +59 -0
- package/src/charts/core/readout-clear.ts +244 -0
- package/src/charts/core/rich-tooltip.ts +128 -0
- package/src/charts/core/right-pin.ts +66 -0
- package/src/charts/core/scales.ts +505 -0
- package/src/charts/core/spread.ts +144 -0
- package/src/charts/core/theme.ts +114 -0
- package/src/charts/core/ticks.ts +61 -0
- package/src/charts/csv.ts +40 -0
- package/src/charts/date-tick-format.ts +29 -23
- package/src/charts/engine-marks.ts +82 -0
- package/src/charts/focus.tsx +258 -0
- package/src/charts/host.tsx +64 -41
- package/src/charts/index.ts +94 -38
- package/src/charts/label-obstacles.ts +216 -0
- package/src/charts/label-place.ts +329 -0
- package/src/charts/label-widths.ts +21 -0
- package/src/charts/labels.ts +368 -19
- package/src/charts/legend.tsx +227 -35
- package/src/charts/marks.ts +223 -13
- package/src/charts/optional-undefined.type-guard.tsx +73 -0
- package/src/charts/pane-gutter.ts +16 -0
- package/src/charts/parts/band-fold.ts +107 -0
- package/src/charts/parts/band-strip.tsx +690 -0
- package/src/charts/parts/bars-marks.ts +360 -0
- package/src/charts/parts/bars.tsx +43 -0
- package/src/charts/parts/cartesian-adapt.ts +375 -0
- package/src/charts/parts/cartesian-selection.ts +35 -0
- package/src/charts/parts/cartesian.tsx +894 -0
- package/src/charts/parts/chart-card-frame.tsx +193 -0
- package/src/charts/parts/chart-card.tsx +523 -0
- package/src/charts/parts/chart-panes.tsx +113 -0
- package/src/charts/parts/heatmap-ink.ts +35 -0
- package/src/charts/parts/heatmap.tsx +735 -0
- package/src/charts/parts/interval-layout.ts +103 -0
- package/src/charts/parts/interval-track.tsx +781 -0
- package/src/charts/parts/legend.tsx +97 -0
- package/src/charts/parts/lines-marks.ts +234 -0
- package/src/charts/parts/lines.tsx +39 -0
- package/src/charts/parts/range-navigator.module.css +50 -0
- package/src/charts/parts/range-navigator.module.css.d.ts +9 -0
- package/src/charts/parts/range-navigator.tsx +226 -0
- package/src/charts/parts/sparkline-probe/both.tsx +25 -0
- package/src/charts/parts/sparkline-probe/mini-bars.tsx +14 -0
- package/src/charts/parts/sparkline-probe/sparkline.tsx +16 -0
- package/src/charts/parts/tooltip.ts +85 -0
- package/src/charts/parts/waterfall.tsx +190 -0
- package/src/charts/plot-context.ts +6 -2
- package/src/charts/ref-label.ts +155 -30
- package/src/charts/seams/bar-opacity.ts +11 -0
- package/src/charts/seams/define.ts +68 -0
- package/src/charts/seams/lone-point.ts +8 -0
- package/src/charts/seams/pixel-extent.ts +43 -0
- package/src/charts/seams/plot-data.ts +8 -0
- package/src/charts/seams/plot-px.ts +23 -0
- package/src/charts/seams/plot-scales.ts +62 -0
- package/src/charts/seams/series-axis.ts +8 -0
- package/src/charts/seams/series-dash.ts +8 -0
- package/src/charts/seams/series-format.ts +8 -0
- package/src/charts/seams/series-gaps.ts +8 -0
- package/src/charts/seams/series-legend-tooltip.ts +8 -0
- package/src/charts/seams/series-marker.ts +8 -0
- package/src/charts/seams/series-note.ts +8 -0
- package/src/charts/seams/series-parent.ts +8 -0
- package/src/charts/seams/series-role.ts +8 -0
- package/src/charts/seams/series-weight.ts +8 -0
- package/src/charts/seams/x-domain.ts +8 -0
- package/src/charts/seams/y-domain.ts +139 -0
- package/src/charts/seams/y-gutter.ts +29 -0
- package/src/charts/seams.ts +66 -0
- package/src/charts/sizing.ts +12 -1
- package/src/charts/state.tsx +51 -28
- package/src/charts/text-measure.ts +57 -0
- package/src/charts/tooltip-body.tsx +98 -0
- package/src/charts/track.ts +370 -0
- package/src/charts/types.ts +124 -12
- package/src/cli/add/catalog.ts +101 -0
- package/src/cli/add/help.ts +35 -0
- package/src/cli/add/index.ts +194 -0
- package/src/cli/agent-note.ts +155 -0
- package/src/cli/board-freshness.ts +21 -7
- package/src/cli/budget/index.ts +132 -0
- package/src/cli/config.ts +16 -158
- package/src/cli/docs/catalog.ts +187 -0
- package/src/cli/docs/index.ts +68 -0
- package/src/cli/doctor/app.ts +336 -0
- package/src/cli/doctor/eject.ts +149 -0
- package/src/cli/doctor/guards.ts +136 -0
- package/src/cli/doctor/hook.ts +375 -0
- package/src/cli/doctor/index.ts +114 -0
- package/src/cli/doctor/install.ts +343 -0
- package/src/cli/doctor/legacy.ts +188 -0
- package/src/cli/doctor/translations.ts +310 -0
- package/src/cli/doctor/types.ts +161 -0
- package/src/cli/doctor/wiring.ts +231 -0
- package/src/cli/eject/git.ts +43 -0
- package/src/cli/eject/help.ts +50 -0
- package/src/cli/eject/index.ts +535 -0
- package/src/cli/eject/ledger.ts +159 -0
- package/src/cli/eject/tsconfig.ts +246 -0
- package/src/cli/harness.ts +144 -0
- package/src/cli/help.ts +171 -64
- package/src/cli/index.ts +55 -1418
- package/src/cli/init/app-files.ts +133 -0
- package/src/cli/init/index.ts +323 -0
- package/src/cli/init/locales.ts +124 -0
- package/src/cli/init/router-seeds.ts +278 -0
- package/src/cli/init/site.ts +43 -0
- package/src/cli/init/steps.ts +1088 -0
- package/src/cli/init/stock.ts +88 -0
- package/src/cli/init/upgrade.ts +67 -0
- package/src/cli/install-root.ts +39 -21
- package/src/cli/legacy-2x-files.ts +47 -0
- package/src/cli/legacy-2x.ts +115 -0
- package/src/cli/lint/engine.ts +349 -0
- package/src/cli/lint/hook.ts +325 -0
- package/src/cli/lint/index.ts +178 -0
- package/src/cli/lint/record.ts +99 -0
- package/src/cli/lint/seams.ts +386 -0
- package/src/cli/lint/settings.ts +309 -0
- package/src/cli/lint/stats.ts +198 -0
- package/src/cli/lint/template-classes.ts +127 -0
- package/src/cli/lint-settings.ts +107 -0
- package/src/cli/manifest.ts +304 -0
- package/src/cli/merge/formatter.ts +59 -0
- package/src/cli/merge/header.ts +32 -0
- package/src/cli/merge/merge-file.ts +62 -0
- package/src/cli/merge/seed.ts +109 -0
- package/src/cli/migrate/census.ts +262 -0
- package/src/cli/migrate/index.ts +364 -0
- package/src/cli/migrate/rows.ts +347 -0
- package/src/cli/package-manager.ts +62 -0
- package/src/cli/peers.ts +114 -0
- package/src/cli/presets.ts +175 -0
- package/src/cli/resolver.ts +54 -0
- package/src/cli/route-tree.ts +103 -0
- package/src/cli/router-wiring.ts +56 -5
- package/src/cli/shot/board.ts +59 -106
- package/src/cli/shot/capture.ts +552 -672
- package/src/cli/shot/detect.ts +338 -323
- package/src/cli/shot/facts.ts +266 -0
- package/src/cli/shot/index.ts +142 -254
- package/src/cli/shot/measure.ts +192 -143
- package/src/cli/shot/playwright.ts +37 -39
- package/src/cli/shot/serve.ts +115 -27
- package/src/cli/shot/types.ts +118 -36
- package/src/cli/source-text.ts +11 -0
- package/src/cli/sync/block.ts +59 -0
- package/src/cli/sync/blocks.ts +154 -0
- package/src/cli/sync/engine.ts +189 -0
- package/src/cli/sync/formats.ts +74 -0
- package/src/cli/sync/index.ts +198 -0
- package/src/cli/sync/render.ts +507 -0
- package/src/cli/sync/sibling.ts +67 -0
- package/src/cli/sync/three-way.ts +227 -0
- package/src/cli/tokens-css-extra.ts +205 -0
- package/src/cli/tokens-css.ts +235 -97
- package/src/common/basalt-families.ts +68 -0
- package/src/common/basalt-family.ts +21 -0
- package/src/common/errors.ts +2 -2
- package/src/common/focus.ts +65 -0
- package/src/common/hit-floor.ts +1 -1
- package/src/common/isomorphic-layout-effect.ts +1 -1
- package/src/common/nest.ts +32 -0
- package/src/common/props.ts +7 -33
- package/src/common/retry-button.module.css +23 -22
- package/src/common/retry-button.tsx +5 -2
- package/src/common/use-media-query.ts +2 -3
- package/src/common/validate.ts +1 -1
- package/src/content/code-block.tsx +121 -110
- package/src/content/contract.ts +43 -0
- package/src/content/fence-trust.ts +9 -0
- package/src/content/fences.tsx +143 -0
- package/src/content/headings.tsx +96 -0
- package/src/content/highlighter.ts +112 -17
- package/src/content/index.ts +15 -18
- package/src/content/markdown.tsx +156 -622
- package/src/content/mermaid.tsx +104 -98
- package/src/content/pele-peer.ts +28 -0
- package/src/content/sanitize.ts +64 -488
- package/src/controls/appearance-switcher.tsx +239 -0
- package/src/controls/contract.ts +185 -0
- package/src/controls/control-home.tsx +135 -0
- package/src/controls/control-kind.ts +28 -0
- package/src/controls/control-view.handles.ts +136 -0
- package/src/controls/control-view.tsx +160 -0
- package/src/controls/draft.ts +145 -0
- package/src/controls/facets.ts +35 -0
- package/src/controls/filter-set-census.ts +111 -0
- package/src/controls/filter-set-fold.ts +91 -0
- package/src/controls/filter-set-menu.tsx +258 -0
- package/src/controls/filter-set-spec.tsx +342 -0
- package/src/controls/filter-set.tsx +29 -234
- package/src/controls/filter-slot.tsx +252 -0
- package/src/controls/form-field.tsx +370 -0
- package/src/controls/form-footer.tsx +205 -0
- package/src/controls/form-row.tsx +60 -0
- package/src/controls/form-section.tsx +220 -0
- package/src/controls/globals.tsx +56 -0
- package/src/controls/index.ts +73 -13
- package/src/controls/local-control.ts +34 -0
- package/src/controls/renderers.tsx +514 -0
- package/src/controls/row-icon.tsx +18 -0
- package/src/controls/settings-rows.tsx +326 -0
- package/src/controls/spec.ts +82 -0
- package/src/controls/stepper.tsx +226 -0
- package/src/controls/submit.ts +84 -0
- package/src/controls/use-committed-field.ts +117 -0
- package/src/controls/view-tabs.test-support.tsx +72 -0
- package/src/controls/view-tabs.tsx +184 -153
- package/src/controls/wizard-dialog.tsx +312 -0
- package/src/core/action-menu-items.tsx +73 -0
- package/src/core/action.ts +52 -0
- package/src/core/appearance.ts +166 -0
- package/src/core/binding.ts +41 -0
- package/src/core/card-menu.tsx +230 -0
- package/src/core/channel-transport.ts +74 -0
- package/src/core/channel.ts +454 -0
- package/src/core/chord-keys.tsx +36 -0
- package/src/core/chord.ts +234 -0
- package/src/core/clipboard.ts +27 -0
- package/src/core/cn-theme.gen.ts +57 -0
- package/src/core/cn-theme.ts +60 -0
- package/src/core/cn.ts +407 -0
- package/src/core/commit-key.ts +17 -0
- package/src/core/context-trigger.ts +314 -0
- package/src/core/control-scope.ts +50 -0
- package/src/core/could-not-load.ts +9 -0
- package/src/core/date-stepper.tsx +145 -0
- package/src/core/debounce.ts +80 -0
- package/src/core/drag-landing.ts +11 -0
- package/src/core/error-dot.tsx +15 -0
- package/src/core/external-field.golden.json +34 -0
- package/src/core/external-field.ts +104 -0
- package/src/core/focus-handle.tsx +264 -0
- package/src/core/focus-release.ts +26 -0
- package/src/core/focus-store.ts +696 -0
- package/src/core/form-dirty.ts +47 -0
- package/src/core/format.ts +347 -0
- package/src/core/frame-arm.ts +19 -0
- package/src/core/frame-figure.tsx +193 -0
- package/src/core/frame-head.tsx +418 -0
- package/src/core/frame-regions.tsx +579 -0
- package/src/core/frame-spec.test-support.tsx +81 -0
- package/src/core/frame-tiles.tsx +104 -0
- package/src/core/href.ts +51 -0
- package/src/core/info-hint.tsx +164 -0
- package/src/core/keyboard.ts +65 -0
- package/src/core/label-text.tsx +11 -0
- package/src/core/label.ts +45 -0
- package/src/core/lanes.ts +85 -0
- package/src/core/leave-guard.ts +179 -0
- package/src/core/link-href.type-guard.tsx +45 -0
- package/src/core/link.ts +26 -0
- package/src/core/list/engine.tsx +605 -0
- package/src/core/list/option-row.tsx +204 -0
- package/src/core/list/options.ts +165 -0
- package/src/core/list/popup.tsx +83 -0
- package/src/core/list/rank.ts +65 -0
- package/src/core/list-link.ts +109 -0
- package/src/core/live-actions.ts +131 -0
- package/src/core/mark-focus.ts +94 -0
- package/src/core/mark-tone.ts +42 -0
- package/src/core/mark-types.ts +98 -0
- package/src/core/menu-key.ts +3 -0
- package/src/core/menu.type-guard.tsx +34 -0
- package/src/core/messages/ai.ts +71 -0
- package/src/core/messages/base.ts +31 -0
- package/src/core/messages/cards.ts +16 -0
- package/src/core/messages/chain.ts +27 -0
- package/src/core/messages/charts.ts +54 -0
- package/src/core/messages/common.ts +189 -0
- package/src/core/messages/content.ts +8 -0
- package/src/core/messages/controls.ts +80 -0
- package/src/core/messages/date.ts +22 -0
- package/src/core/messages/dialogs.ts +17 -0
- package/src/core/messages/filters.ts +31 -0
- package/src/core/messages/flow.ts +28 -0
- package/src/core/messages/home.ts +15 -0
- package/src/core/messages/index.ts +129 -0
- package/src/core/messages/kanban.ts +25 -0
- package/src/core/messages/keys.ts +21 -0
- package/src/core/messages/lists.ts +78 -0
- package/src/core/messages/live.ts +54 -0
- package/src/core/messages/mark.ts +27 -0
- package/src/core/messages/menu.ts +13 -0
- package/src/core/messages/page.ts +71 -0
- package/src/core/messages/schedule.ts +34 -0
- package/src/core/messages/select.ts +21 -0
- package/src/core/messages/shell.ts +82 -0
- package/src/core/messages/sortable.ts +13 -0
- package/src/core/messages/status.ts +27 -0
- package/src/core/messages/table.ts +352 -0
- package/src/core/messages/tree.ts +67 -0
- package/src/core/messages/upload.ts +57 -0
- package/src/core/messages/use-messages.ts +59 -0
- package/src/core/messages/use-text.ts +19 -0
- package/src/core/notify.ts +287 -0
- package/src/core/object-menu-popup.tsx +55 -0
- package/src/core/object-menu.tsx +134 -0
- package/src/core/offline-line.tsx +13 -0
- package/src/core/panel.tsx +267 -0
- package/src/core/parse-number.ts +54 -0
- package/src/core/persisted.golden.json +117 -0
- package/src/core/persisted.ts +437 -0
- package/src/core/phase-boundary.tsx +35 -0
- package/src/core/phase.ts +485 -0
- package/src/core/popup-position.ts +31 -0
- package/src/core/ports.ts +432 -0
- package/src/core/provider-props.tsx +71 -0
- package/src/core/provider.tsx +104 -0
- package/src/core/record-address.tsx +31 -0
- package/src/core/record-steps.ts +56 -0
- package/src/core/resolved-tokens.ts +175 -0
- package/src/core/retry-label.ts +10 -0
- package/src/core/retry-owner.tsx +103 -0
- package/src/core/rows-shown.ts +8 -0
- package/src/core/scheme.ts +81 -0
- package/src/core/sheet-tools.ts +10 -0
- package/src/core/slot-home.ts +12 -0
- package/src/core/slug.ts +48 -0
- package/src/core/spark/compile-spark.ts +142 -0
- package/src/core/spark/mini-bars.tsx +266 -0
- package/src/core/spark/sparkline-shared.tsx +391 -0
- package/src/core/spark/sparkline.tsx +377 -0
- package/src/core/standard-actions.ts +103 -0
- package/src/core/stat-row.ts +22 -0
- package/src/core/tree-model.ts +169 -0
- package/src/core/url.ts +63 -0
- package/src/core/use-control.ts +28 -0
- package/src/core/use-locale.ts +12 -0
- package/src/core/use-now.ts +60 -0
- package/src/core/use-resolved-tokens.ts +19 -0
- package/src/core/use-standard-actions.ts +12 -0
- package/src/core/write-batch.ts +40 -0
- package/src/core/zoned.ts +189 -0
- package/src/css/archify.css +37 -0
- package/src/css/base.css +286 -0
- package/src/css/cursor.css +119 -0
- package/src/css/fonts.css +84 -0
- package/src/css/generate.ts +365 -0
- package/src/css/prose.css +214 -0
- package/src/css/starlight.css +342 -0
- package/src/css/static.css +263 -0
- package/src/css/tailwind.css +254 -0
- package/src/css/templates/fonts.css +82 -0
- package/src/css/templates/prose.css +230 -0
- package/src/css/templates/starlight.css +356 -0
- package/src/css/templates/typography.css +50 -0
- package/src/css/theme-script.ts +73 -0
- package/src/css/tokens.css +233 -0
- package/src/css/touch.css +36 -0
- package/src/css/typography.css +89 -0
- package/src/data/index.ts +17 -0
- package/src/data/live/bind-invalidation.ts +263 -0
- package/src/data/live/connection.ts +261 -0
- package/src/data/live/freshness.ts +165 -0
- package/src/data/live/live-query-runtime.ts +96 -0
- package/src/data/live/live-query.ts +214 -0
- package/src/data/optimistic.ts +109 -0
- package/src/data/query-client.ts +61 -0
- package/src/data/shot-state.ts +132 -0
- package/src/data/synced-runtime.ts +516 -0
- package/src/data/synced.ts +236 -0
- package/src/data/unwrap.ts +71 -0
- package/src/form/contexts.ts +9 -0
- package/src/form/hook.ts +410 -0
- package/src/form/index.ts +17 -0
- package/src/form/parts.tsx +99 -0
- package/src/format/locale.ts +3 -0
- package/src/format/number.ts +5 -110
- package/src/format/shared.ts +24 -99
- package/src/index.ts +77 -67
- package/src/lint/bin.ts +34 -0
- package/src/lint/blanket-disable.ts +114 -0
- package/src/lint/check-tokens.ts +245 -0
- package/src/lint/factory.ts +443 -0
- package/src/lint/generated/gen-site-classes.ts +58 -0
- package/src/lint/generated/gen-zone-a.ts +95 -0
- package/src/lint/generated/site-classes.ts +46 -0
- package/src/lint/generated/zone-a.ts +88 -0
- package/src/lint/index.ts +49 -0
- package/src/lint/lintable.ts +2 -0
- package/src/lint/preset.ts +734 -0
- package/src/lint/renamed-rules.ts +11 -0
- package/src/lint/rule-table.ts +334 -0
- package/src/lint/rules/class/detect.ts +1321 -0
- package/src/lint/rules/class/table.ts +565 -0
- package/src/lint/rules/structure/ast.ts +56 -0
- package/src/lint/rules/structure/color-literal.ts +232 -0
- package/src/lint/rules/structure/control-home.ts +379 -0
- package/src/lint/rules/structure/data-primitive-live.ts +153 -0
- package/src/lint/rules/structure/data-primitive.ts +759 -0
- package/src/lint/rules/structure/format-home.ts +544 -0
- package/src/lint/rules/structure/import-boundary.ts +1160 -0
- package/src/lint/rules/structure/label-literal.ts +617 -0
- package/src/lint/rules/structure/motion-literal.ts +195 -0
- package/src/lint/rules/structure/page-root.ts +229 -0
- package/src/lint/rules/structure/primitive-bypass.ts +1430 -0
- package/src/lint/rules/structure/query-home.ts +227 -0
- package/src/lint/rules/structure/router-search.ts +483 -0
- package/src/lint/rules/structure/untrusted-markdown.ts +507 -0
- package/src/lint/rules/structure/waiver-needs-reason.ts +188 -0
- package/src/lint/stylelint/gen.ts +33 -0
- package/src/lint/stylelint/index.ts +10 -0
- package/src/lint/stylelint/render.ts +89 -0
- package/src/lint/stylelint/rules.ts +348 -0
- package/src/lint/weakened.ts +600 -0
- package/src/lint/weakening-edit.ts +95 -0
- package/src/messages/GLOSSARY.md +65 -0
- package/src/messages/de.ts +708 -0
- package/src/messages/es.ts +711 -0
- package/src/messages/fr.ts +717 -0
- package/src/messages/zh-hans.ts +691 -0
- package/src/motion/index.ts +38 -0
- package/src/motion/presets.ts +96 -0
- package/src/page/article-layout.tsx +231 -0
- package/src/page/article-progress.tsx +76 -0
- package/src/page/callout.tsx +57 -0
- package/src/page/card-grid.tsx +97 -0
- package/src/page/connection-indicator.tsx +154 -0
- package/src/page/contract.ts +297 -0
- package/src/page/core/article-date.ts +27 -0
- package/src/page/core/bar-measure.ts +68 -0
- package/src/page/core/claims.ts +153 -0
- package/src/page/core/docking.ts +86 -0
- package/src/page/core/panel-store.ts +66 -0
- package/src/page/define-overlays.ts +150 -0
- package/src/page/dock.tsx +260 -0
- package/src/page/empty-state.tsx +115 -0
- package/src/page/error-cause.ts +18 -0
- package/src/page/facts.tsx +50 -0
- package/src/page/favorites.tsx +180 -0
- package/src/page/index.ts +67 -0
- package/src/page/mdx.tsx +142 -0
- package/src/page/overlay-host.tsx +115 -0
- package/src/page/page-aside.tsx +386 -0
- package/src/page/page-bar.tsx +735 -0
- package/src/page/page-kit.type-guard.tsx +135 -0
- package/src/page/page-summary.tsx +209 -0
- package/src/page/page-tabs.tsx +78 -0
- package/src/page/page.test-support.tsx +103 -0
- package/src/page/page.tsx +193 -0
- package/src/page/panel-steps.tsx +70 -0
- package/src/page/parts/inner-nav.test-support.tsx +78 -0
- package/src/page/parts/inner-nav.tsx +373 -0
- package/src/page/parts/split-page.tsx +228 -0
- package/src/page/peek-window.tsx +297 -0
- package/src/page/peek.tsx +660 -0
- package/src/page/present-glyph.tsx +33 -0
- package/src/page/property-list.tsx +574 -0
- package/src/page/prose.tsx +50 -0
- package/src/page/query-state.tsx +163 -0
- package/src/page/record-panel.tsx +357 -0
- package/src/page/refresh-button.tsx +198 -0
- package/src/page/search-hint.ts +56 -0
- package/src/page/section.tsx +146 -0
- package/src/page/settings-layout.tsx +128 -0
- package/src/page/toast-host.tsx +89 -0
- package/src/page/toc-click-pin.ts +157 -0
- package/src/page/toc.tsx +226 -0
- package/src/page/use-size-class.ts +45 -0
- package/src/register.ts +11 -57
- package/src/router/controls/brand.ts +104 -0
- package/src/router/controls/codec.ts +207 -0
- package/src/router/controls/define.ts +795 -0
- package/src/router/controls/field.ts +314 -0
- package/src/router/controls/fixtures/argo-window-stores.json +76 -0
- package/src/router/controls/fixtures/cases.json +8 -0
- package/src/router/controls/fixtures/linewatch-dashboard.json +20 -0
- package/src/router/controls/fixtures/shutterflow-photos-settings.json +26 -0
- package/src/router/controls/href.ts +37 -0
- package/src/router/controls/middleware.ts +80 -0
- package/src/router/controls/ownership.ts +86 -0
- package/src/router/controls/precedence.ts +26 -0
- package/src/router/controls/values.ts +15 -0
- package/src/router/controls/widgets.ts +403 -0
- package/src/router/defaults.ts +124 -0
- package/src/router/index.ts +18 -0
- package/src/router/nav/anchor.ts +37 -0
- package/src/router/nav/define-nav.ts +52 -0
- package/src/router/nav/read-labels.ts +102 -0
- package/src/router/nav/registry.ts +35 -0
- package/src/router/nav/resolve-active.ts +144 -0
- package/src/router/nav/types.ts +282 -0
- package/src/router/nav-target.ts +126 -0
- package/src/router/peek.ts +400 -0
- package/src/router/unsaved-guard.ts +65 -0
- package/src/shell/app-shell-host.ts +90 -0
- package/src/shell/app-shell.tsx +405 -0
- package/src/shell/chrome.tsx +118 -0
- package/src/shell/commands/area.ts +12 -0
- package/src/shell/commands/bindings.ts +150 -0
- package/src/shell/commands/command-palette.tsx +382 -0
- package/src/shell/commands/define-commands.ts +346 -0
- package/src/shell/commands/nav-commands.ts +54 -0
- package/src/shell/commands/palette-sheet.tsx +35 -0
- package/src/shell/commands/palette-sources.ts +202 -0
- package/src/shell/commands/rank.ts +38 -0
- package/src/shell/commands/runnable.ts +85 -0
- package/src/shell/commands/shortcut-overlay.tsx +61 -0
- package/src/shell/commands/shortcut-rows.ts +46 -0
- package/src/shell/contract.ts +169 -0
- package/src/shell/core/badges.ts +71 -0
- package/src/shell/core/block-model.ts +132 -0
- package/src/shell/core/column.ts +60 -0
- package/src/shell/core/crumbs.ts +132 -0
- package/src/shell/core/header-tiers.ts +76 -0
- package/src/shell/core/nav-runtime.ts +92 -0
- package/src/shell/core/phone-groups.ts +76 -0
- package/src/shell/core/projector.ts +195 -0
- package/src/shell/core/types.ts +58 -0
- package/src/shell/favorites-host.ts +50 -0
- package/src/shell/index.ts +32 -0
- package/src/shell/menu-template.golden.json +52 -0
- package/src/shell/menu-template.ts +138 -0
- package/src/shell/parts/a11y.tsx +210 -0
- package/src/shell/parts/account.tsx +136 -0
- package/src/shell/parts/blocks.tsx +296 -0
- package/src/shell/parts/crumbs.tsx +81 -0
- package/src/shell/parts/grid.tsx +638 -0
- package/src/shell/parts/header-kebab.tsx +132 -0
- package/src/shell/parts/header.tsx +436 -0
- package/src/shell/parts/mobile/retap.ts +94 -0
- package/src/shell/parts/mobile/section-nav/chrome-state.ts +50 -0
- package/src/shell/parts/mobile/section-nav/drawer.tsx +253 -0
- package/src/shell/parts/mobile/section-nav/host.tsx +94 -0
- package/src/shell/parts/mobile/section-nav/measure.ts +22 -0
- package/src/shell/parts/mobile/section-nav/model.ts +100 -0
- package/src/shell/parts/mobile/section-nav/parts.tsx +114 -0
- package/src/shell/parts/mobile/section-nav/phone-actions.tsx +92 -0
- package/src/shell/parts/mobile/section-nav/phone-rail.tsx +239 -0
- package/src/shell/parts/mobile/section-nav/rows.tsx +94 -0
- package/src/shell/parts/mobile/section-nav/safe.ts +8 -0
- package/src/shell/parts/mobile/section-nav/section-bar.tsx +136 -0
- package/src/shell/parts/mobile/section-nav/snaps.ts +45 -0
- package/src/shell/parts/mounts.tsx +44 -0
- package/src/shell/parts/nav-row-menu.tsx +86 -0
- package/src/shell/parts/print.ts +48 -0
- package/src/shell/parts/rail-favorites.tsx +162 -0
- package/src/shell/parts/rail-folds.ts +47 -0
- package/src/shell/parts/rail-resize.tsx +97 -0
- package/src/shell/parts/rail-rows.tsx +217 -0
- package/src/shell/parts/rail-search.tsx +55 -0
- package/src/shell/parts/rail-section.tsx +146 -0
- package/src/shell/parts/rail-test-kit.tsx +50 -0
- package/src/shell/parts/rail-text.ts +26 -0
- package/src/shell/parts/rail.tsx +160 -0
- package/src/shell/parts/section-column.tsx +124 -0
- package/src/shell/parts/settings.tsx +89 -0
- package/src/shell/parts/top-nav.tsx +218 -0
- package/src/shell/parts/workspace-switcher.tsx +109 -0
- package/src/static/article-layout.tsx +201 -0
- package/src/static/bento.tsx +106 -0
- package/src/static/blocks.tsx +62 -0
- package/src/static/call-to-action.tsx +53 -0
- package/src/static/callout.tsx +79 -0
- package/src/static/changelog.tsx +110 -0
- package/src/static/code-block.tsx +60 -0
- package/src/static/comparison.tsx +169 -0
- package/src/static/data-table.tsx +101 -0
- package/src/static/dates.ts +10 -0
- package/src/static/form.tsx +163 -0
- package/src/static/glyphs.tsx +35 -0
- package/src/static/hero.tsx +74 -0
- package/src/static/index.ts +55 -0
- package/src/static/markup.ts +30 -0
- package/src/static/mdx.tsx +135 -0
- package/src/static/post-list.tsx +112 -0
- package/src/static/question-list.tsx +82 -0
- package/src/static/site-footer.tsx +77 -0
- package/src/static/site-header.tsx +349 -0
- package/src/static/site-nav.tsx +93 -0
- package/src/static/site-script.ts +125 -0
- package/src/static/tabs.tsx +103 -0
- package/src/static/theme-switch.tsx +53 -0
- package/src/static/toc.tsx +59 -0
- package/src/static/types.ts +69 -0
- package/src/surfaces.ts +302 -428
- package/src/table/action-id.type-guard.tsx +31 -0
- package/src/table/column-ids.type-test.ts +181 -0
- package/src/table/contract.ts +587 -0
- package/src/table/contract.type-test.ts +118 -0
- package/src/table/core/arrange.ts +89 -0
- package/src/table/core/cell-parts.tsx +157 -0
- package/src/table/core/codec.ts +392 -0
- package/src/table/core/features.ts +120 -0
- package/src/table/core/filters.ts +214 -0
- package/src/table/core/keyboard.ts +441 -0
- package/src/table/core/kind-icons.tsx +112 -0
- package/src/table/core/kinds-cells.tsx +1254 -0
- package/src/table/core/kinds-codec.ts +66 -0
- package/src/table/core/kinds-engine.ts +64 -0
- package/src/table/core/kinds-spec.ts +575 -0
- package/src/table/core/kinds.tsx +2421 -0
- package/src/table/core/plan.ts +416 -0
- package/src/table/core/selection.ts +154 -0
- package/src/table/core/state.ts +284 -0
- package/src/table/index.ts +66 -16
- package/src/table/invariants/api.ts +37 -0
- package/src/table/invariants/harness.tsx +47 -0
- package/src/table/layouts/add-menu.tsx +49 -0
- package/src/table/layouts/board-layout.tsx +227 -0
- package/src/table/layouts/card-tick.tsx +37 -0
- package/src/table/layouts/gallery-layout.tsx +176 -0
- package/src/table/layouts/glyphs.tsx +45 -0
- package/src/table/layouts/layout-phase.tsx +172 -0
- package/src/table/layouts/model.ts +186 -0
- package/src/table/layouts/specs.ts +79 -0
- package/src/table/layouts/toggle.tsx +77 -0
- package/src/table/parts/add-filter.tsx +63 -0
- package/src/table/parts/auto-detail.tsx +42 -0
- package/src/table/parts/body.tsx +464 -0
- package/src/table/parts/bulk-bar.tsx +277 -0
- package/src/table/parts/category-order.tsx +80 -0
- package/src/table/parts/cell-filter.tsx +96 -0
- package/src/table/parts/cell-filter.type-test.ts +24 -0
- package/src/table/parts/chips.tsx +98 -0
- package/src/table/parts/column-actions.tsx +269 -0
- package/src/table/parts/data-table.tsx +480 -0
- package/src/table/parts/detail-sheet.tsx +140 -0
- package/src/table/parts/filter-text.ts +57 -0
- package/src/table/parts/footer-model.ts +127 -0
- package/src/table/parts/footer.tsx +178 -0
- package/src/table/parts/group-row-model.ts +86 -0
- package/src/table/parts/group-row.tsx +173 -0
- package/src/table/parts/head.tsx +596 -0
- package/src/table/parts/live-row-actions.ts +92 -0
- package/src/table/parts/order-list.tsx +226 -0
- package/src/table/parts/pager.tsx +232 -0
- package/src/table/parts/phases.tsx +304 -0
- package/src/table/parts/plus-glyph.tsx +11 -0
- package/src/table/parts/range-editor.tsx +199 -0
- package/src/table/parts/row-focus.tsx +196 -0
- package/src/table/parts/row-menu.ts +68 -0
- package/src/table/parts/row-number.tsx +80 -0
- package/src/table/parts/search-label.ts +11 -0
- package/src/table/parts/select-cell.tsx +135 -0
- package/src/table/parts/tick-column.tsx +67 -0
- package/src/table/parts/tiers.tsx +133 -0
- package/src/table/parts/toolbar-editor.tsx +223 -0
- package/src/table/parts/toolbar-filters.ts +68 -0
- package/src/table/parts/toolbar.tsx +218 -0
- package/src/table/parts/tree-row-model.ts +121 -0
- package/src/table/parts/tri-state-header.tsx +53 -0
- package/src/table/parts/view-door.ts +85 -0
- package/src/table/parts/view-panel.tsx +728 -0
- package/src/table/parts/view-tab-menu.tsx +74 -0
- package/src/table/parts/views-model.ts +356 -0
- package/src/table/parts/views.tsx +795 -0
- package/src/table/parts/virtual.tsx +178 -0
- package/src/table/table.css +2688 -0
- package/src/table/use-data-table.ts +1314 -0
- package/src/testing/dom-shims.ts +148 -0
- package/src/testing/expect-catalog.tsx +156 -0
- package/src/testing/fake-channel.ts +100 -0
- package/src/testing/index.ts +8 -0
- package/src/testing/quality.ts +667 -0
- package/src/testing/settled.ts +94 -0
- package/src/testing/shell-invariants.ts +447 -0
- package/src/testing/slots.ts +17 -0
- package/src/tokens/__snapshots__/emit.test.ts.snap +523 -0
- package/src/tokens/accents.ts +50 -0
- package/src/tokens/basalt-names.ts +367 -0
- package/src/tokens/chart-vars.ts +275 -0
- package/src/tokens/core.ts +202 -306
- package/src/tokens/ctl-vars.ts +2 -20
- package/src/tokens/derive.ts +350 -27
- package/src/tokens/emit-fallback.ts +41 -0
- package/src/tokens/emit-json.ts +64 -0
- package/src/tokens/emit.ts +305 -0
- package/src/tokens/gates.ts +253 -0
- package/src/tokens/golden/default.css +233 -0
- package/src/tokens/golden/hue-268-vibrancy-1.css +233 -0
- package/src/tokens/hct.ts +1 -1
- package/src/tokens/index.ts +15 -3
- package/src/tokens/motion.ts +132 -0
- package/src/tokens/oklab.ts +3 -3
- package/src/tokens/palette.ts +130 -154
- package/src/tokens/part-vars.ts +75 -0
- package/src/tokens/ramps.ts +51 -0
- package/src/tokens/site-text.ts +10 -0
- package/src/tokens/size-classes.ts +14 -17
- package/src/tokens/size-classes.type-guard.tsx +20 -0
- package/src/tokens/space-scale.ts +2 -2
- package/src/tokens/status-text.ts +36 -1
- package/src/tokens/table.ts +698 -0
- package/src/ui/accordion.guard.ts +15 -0
- package/src/ui/accordion.tsx +142 -0
- package/src/ui/alert.guard.ts +21 -0
- package/src/ui/alert.tsx +105 -0
- package/src/ui/avatar.guard.ts +41 -0
- package/src/ui/avatar.tsx +237 -0
- package/src/ui/badge.guard.ts +27 -0
- package/src/ui/badge.tsx +269 -0
- package/src/ui/button.guard.ts +30 -0
- package/src/ui/button.tsx +203 -0
- package/src/ui/calendar-grid.ts +193 -0
- package/src/ui/calendar.guard.ts +54 -0
- package/src/ui/calendar.tsx +200 -0
- package/src/ui/card.guard.ts +15 -0
- package/src/ui/card.tsx +392 -0
- package/src/ui/checkbox-matrix.guard.ts +28 -0
- package/src/ui/checkbox-matrix.tsx +344 -0
- package/src/ui/checkbox.guard.ts +36 -0
- package/src/ui/checkbox.tsx +184 -0
- package/src/ui/choice-card.guard.ts +24 -0
- package/src/ui/choice-card.tsx +100 -0
- package/src/ui/collapsible.guard.ts +17 -0
- package/src/ui/collapsible.tsx +79 -0
- package/src/ui/combobox.guard.ts +26 -0
- package/src/ui/combobox.tsx +1053 -0
- package/src/ui/context-menu.tsx +214 -0
- package/src/ui/control-group.guard.ts +29 -0
- package/src/ui/control-group.tsx +266 -0
- package/src/ui/copy-button.tsx +117 -0
- package/src/ui/date-picker.guard.ts +54 -0
- package/src/ui/date-picker.tsx +394 -0
- package/src/ui/dialog.guard.ts +41 -0
- package/src/ui/dialog.tsx +397 -0
- package/src/ui/drag-auto-scroll.ts +125 -0
- package/src/ui/entity.guard.ts +41 -0
- package/src/ui/entity.tsx +219 -0
- package/src/ui/field.guard.ts +24 -0
- package/src/ui/field.tsx +206 -0
- package/src/ui/file-upload.guard.ts +45 -0
- package/src/ui/file-upload.tsx +462 -0
- package/src/ui/guard-completeness.ts +204 -0
- package/src/ui/header-actions.ts +27 -0
- package/src/ui/info-hint.guard.ts +21 -0
- package/src/ui/info-hint.tsx +98 -0
- package/src/ui/input.guard.ts +15 -0
- package/src/ui/input.tsx +95 -0
- package/src/ui/kbd.guard.ts +16 -0
- package/src/ui/kbd.tsx +74 -0
- package/src/ui/leave-confirm.ts +50 -0
- package/src/ui/list-sheet.ts +29 -0
- package/src/ui/menu.guard.ts +70 -0
- package/src/ui/menu.tsx +437 -0
- package/src/ui/meter.guard.ts +53 -0
- package/src/ui/meter.tsx +551 -0
- package/src/ui/no-restyle.generated.json +652 -0
- package/src/ui/num.guard.ts +22 -0
- package/src/ui/num.tsx +66 -0
- package/src/ui/number-field.guard.ts +26 -0
- package/src/ui/number-field.tsx +141 -0
- package/src/ui/one-time-code.guard.ts +28 -0
- package/src/ui/one-time-code.tsx +121 -0
- package/src/ui/overlay-presenter.ts +138 -0
- package/src/ui/overlay-sheet.ts +47 -0
- package/src/ui/password-input.tsx +74 -0
- package/src/ui/popover.guard.ts +43 -0
- package/src/ui/popover.tsx +210 -0
- package/src/ui/primitive.contract.ts +419 -0
- package/src/ui/progress.guard.ts +40 -0
- package/src/ui/progress.tsx +246 -0
- package/src/ui/quick-picks.guard.ts +22 -0
- package/src/ui/quick-picks.tsx +92 -0
- package/src/ui/radio-group.guard.ts +25 -0
- package/src/ui/radio-group.tsx +177 -0
- package/src/ui/resizable.tsx +99 -0
- package/src/ui/scroll-area.guard.ts +18 -0
- package/src/ui/scroll-area.tsx +110 -0
- package/src/ui/segmented.guard.ts +28 -0
- package/src/ui/segmented.tsx +261 -0
- package/src/ui/select.guard.ts +27 -0
- package/src/ui/select.tsx +765 -0
- package/src/ui/separator.guard.ts +15 -0
- package/src/ui/separator.tsx +53 -0
- package/src/ui/sheet.guard.ts +40 -0
- package/src/ui/sheet.tsx +602 -0
- package/src/ui/skeleton.guard.ts +21 -0
- package/src/ui/skeleton.tsx +95 -0
- package/src/ui/slider.guard.ts +30 -0
- package/src/ui/slider.tsx +114 -0
- package/src/ui/slots.ts +116 -0
- package/src/ui/sortable-list.tsx +382 -0
- package/src/ui/status.guard.ts +27 -0
- package/src/ui/status.tsx +101 -0
- package/src/ui/swatch-picker.guard.ts +27 -0
- package/src/ui/swatch-picker.tsx +263 -0
- package/src/ui/switch.guard.ts +23 -0
- package/src/ui/switch.tsx +44 -0
- package/src/ui/table.guard.ts +18 -0
- package/src/ui/table.tsx +205 -0
- package/src/ui/tabs.guard.ts +15 -0
- package/src/ui/tabs.tsx +257 -0
- package/src/ui/tag-input.guard.ts +29 -0
- package/src/ui/tag-input.tsx +243 -0
- package/src/ui/textarea.guard.ts +24 -0
- package/src/ui/textarea.tsx +115 -0
- package/src/ui/toast.guard.ts +15 -0
- package/src/ui/toast.tsx +173 -0
- package/src/ui/toolbar.guard.ts +25 -0
- package/src/ui/toolbar.tsx +163 -0
- package/src/ui/tooltip.guard.ts +27 -0
- package/src/ui/tooltip.tsx +183 -0
- package/src/ui/tree.guard.ts +72 -0
- package/src/ui/tree.tsx +1690 -0
- package/src/ui/virtual-list.guard.ts +31 -0
- package/src/ui/virtual-list.tsx +200 -0
- package/src/vite/allotment.ts +131 -0
- package/src/vite/doc.ts +94 -0
- package/src/vite/ejects.ts +68 -0
- package/src/vite/graph.ts +215 -0
- package/src/vite/head.ts +297 -0
- package/src/vite/index.ts +230 -0
- package/src/vite/sources.ts +57 -0
- package/src/vite/table-sheet.ts +17 -0
- package/agent/agents/basalt-design-reviewer.md +0 -100
- package/agent/rules/basalt-batteries.md +0 -41
- package/agent/rules/basalt-controls.md +0 -46
- package/agent/rules/basalt-mantine.md +0 -48
- package/agent/skills/basalt-design/references/catalogue.md +0 -58
- package/agent/skills/basalt-design/references/encoding-rules.md +0 -45
- package/agent/skills/basalt-design/references/recipes.md +0 -47
- package/agent/skills/basalt-design/references/stat-tile.md +0 -24
- package/configs/card-inset.test.ts +0 -57
- package/configs/oxlint-basalt.json +0 -28
- package/configs/oxlint-plugin.js +0 -4382
- package/configs/oxlint-plugin.test.ts +0 -4480
- package/configs/oxlint.json +0 -63
- package/dist/agent/ai-sdk-transport.d.ts +0 -48
- package/dist/agent/ai-sdk-transport.d.ts.map +0 -1
- package/dist/agent/ai-sdk-transport.js +0 -206
- package/dist/agent/chat/composer.d.ts +0 -144
- package/dist/agent/chat/composer.d.ts.map +0 -1
- package/dist/agent/chat/composer.js +0 -268
- package/dist/agent/chat/message-affordances.d.ts +0 -60
- package/dist/agent/chat/message-affordances.d.ts.map +0 -1
- package/dist/agent/chat/message-affordances.js +0 -7
- package/dist/agent/chat/thread-feed-row.d.ts +0 -93
- package/dist/agent/chat/thread-feed-row.d.ts.map +0 -1
- package/dist/agent/chat/thread-feed-row.js +0 -192
- package/dist/agent/chat/thread-feed.d.ts +0 -58
- package/dist/agent/chat/thread-feed.d.ts.map +0 -1
- package/dist/agent/chat/thread-feed.js +0 -86
- package/dist/agent/chat/thread-message.d.ts +0 -74
- package/dist/agent/chat/thread-message.d.ts.map +0 -1
- package/dist/agent/chat/thread-message.js +0 -367
- package/dist/agent/chat/thread-outcome-card.d.ts +0 -20
- package/dist/agent/chat/thread-outcome-card.d.ts.map +0 -1
- package/dist/agent/chat/thread-outcome-card.js +0 -112
- package/dist/agent/chat/tool-chip.d.ts +0 -22
- package/dist/agent/chat/tool-chip.d.ts.map +0 -1
- package/dist/agent/chat/tool-chip.js +0 -125
- package/dist/agent/chat/use-keyboard-inset.d.ts +0 -2
- package/dist/agent/chat/use-keyboard-inset.d.ts.map +0 -1
- package/dist/agent/chat/use-keyboard-inset.js +0 -34
- package/dist/agent/chat/virtualize.d.ts +0 -162
- package/dist/agent/chat/virtualize.d.ts.map +0 -1
- package/dist/agent/chat/virtualize.js +0 -24
- package/dist/agent/coalesce.d.ts +0 -42
- package/dist/agent/coalesce.d.ts.map +0 -1
- package/dist/agent/coalesce.js +0 -137
- package/dist/agent/error.d.ts +0 -46
- package/dist/agent/error.d.ts.map +0 -1
- package/dist/agent/error.js +0 -18
- package/dist/agent/foreign.d.ts +0 -98
- package/dist/agent/foreign.d.ts.map +0 -1
- package/dist/agent/foreign.js +0 -18
- package/dist/agent/history.d.ts +0 -23
- package/dist/agent/history.d.ts.map +0 -1
- package/dist/agent/id.d.ts +0 -112
- package/dist/agent/id.d.ts.map +0 -1
- package/dist/agent/id.js +0 -44
- package/dist/agent/index.d.ts +0 -28
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/agent/index.js +0 -18
- package/dist/agent/merge.d.ts +0 -8
- package/dist/agent/merge.d.ts.map +0 -1
- package/dist/agent/merge.js +0 -35
- package/dist/agent/outcome.d.ts +0 -60
- package/dist/agent/outcome.d.ts.map +0 -1
- package/dist/agent/part-list.d.ts +0 -90
- package/dist/agent/part-list.d.ts.map +0 -1
- package/dist/agent/part-list.js +0 -185
- package/dist/agent/parts.d.ts +0 -205
- package/dist/agent/parts.d.ts.map +0 -1
- package/dist/agent/parts.js +0 -176
- package/dist/agent/run-committer.d.ts +0 -23
- package/dist/agent/run-committer.d.ts.map +0 -1
- package/dist/agent/run-committer.js +0 -41
- package/dist/agent/run-records.d.ts +0 -86
- package/dist/agent/run-records.d.ts.map +0 -1
- package/dist/agent/run-records.js +0 -82
- package/dist/agent/stick-to-bottom.d.ts +0 -20
- package/dist/agent/stick-to-bottom.d.ts.map +0 -1
- package/dist/agent/stick-to-bottom.js +0 -77
- package/dist/agent/thread.d.ts +0 -118
- package/dist/agent/thread.d.ts.map +0 -1
- package/dist/agent/thread.js +0 -6
- package/dist/agent/transport.d.ts +0 -78
- package/dist/agent/transport.d.ts.map +0 -1
- package/dist/agent/transport.js +0 -6
- package/dist/agent/use-agent-thread-runs.d.ts +0 -147
- package/dist/agent/use-agent-thread-runs.d.ts.map +0 -1
- package/dist/agent/use-agent-thread-runs.js +0 -476
- package/dist/charts/BandStrip.d.ts +0 -62
- package/dist/charts/BandStrip.d.ts.map +0 -1
- package/dist/charts/BandStrip.js +0 -310
- package/dist/charts/Bars.d.ts +0 -19
- package/dist/charts/Bars.d.ts.map +0 -1
- package/dist/charts/Bars.js +0 -144
- package/dist/charts/CartesianChart.d.ts +0 -72
- package/dist/charts/CartesianChart.d.ts.map +0 -1
- package/dist/charts/CartesianChart.js +0 -139
- package/dist/charts/ChartCard.d.ts +0 -91
- package/dist/charts/ChartCard.d.ts.map +0 -1
- package/dist/charts/ChartCard.js +0 -272
- package/dist/charts/Donut.d.ts +0 -25
- package/dist/charts/Donut.d.ts.map +0 -1
- package/dist/charts/Donut.js +0 -203
- package/dist/charts/DualPanel.d.ts +0 -51
- package/dist/charts/DualPanel.d.ts.map +0 -1
- package/dist/charts/DualPanel.js +0 -246
- package/dist/charts/Heatmap.d.ts +0 -84
- package/dist/charts/Heatmap.d.ts.map +0 -1
- package/dist/charts/Heatmap.js +0 -294
- package/dist/charts/Lines.d.ts +0 -14
- package/dist/charts/Lines.d.ts.map +0 -1
- package/dist/charts/Lines.js +0 -106
- package/dist/charts/MirroredBars.d.ts +0 -55
- package/dist/charts/MirroredBars.d.ts.map +0 -1
- package/dist/charts/MirroredBars.js +0 -221
- package/dist/charts/Sparkline.d.ts +0 -70
- package/dist/charts/Sparkline.d.ts.map +0 -1
- package/dist/charts/Sparkline.js +0 -652
- package/dist/charts/StackedArea.d.ts +0 -18
- package/dist/charts/StackedArea.d.ts.map +0 -1
- package/dist/charts/StackedArea.js +0 -56
- package/dist/charts/band-fold.d.ts +0 -65
- package/dist/charts/band-fold.d.ts.map +0 -1
- package/dist/charts/band-fold.js +0 -46
- package/dist/charts/chart-card.module.css +0 -142
- package/dist/charts/chart-card.module.css.d.ts +0 -20
- package/dist/charts/compile.d.ts +0 -146
- package/dist/charts/compile.d.ts.map +0 -1
- package/dist/charts/compile.js +0 -905
- package/dist/charts/cursor.d.ts +0 -93
- package/dist/charts/cursor.d.ts.map +0 -1
- package/dist/charts/cursor.js +0 -211
- package/dist/charts/donut.module.css +0 -54
- package/dist/charts/donut.module.css.d.ts +0 -9
- package/dist/charts/heatmap-fill.d.ts.map +0 -1
- package/dist/charts/panel.d.ts +0 -65
- package/dist/charts/panel.d.ts.map +0 -1
- package/dist/charts/panel.js +0 -130
- package/dist/charts/scales.d.ts +0 -52
- package/dist/charts/scales.d.ts.map +0 -1
- package/dist/charts/scales.js +0 -194
- package/dist/charts/sparkline.module.css +0 -166
- package/dist/charts/sparkline.module.css.d.ts +0 -16
- package/dist/charts/theme.d.ts +0 -40
- package/dist/charts/theme.d.ts.map +0 -1
- package/dist/charts/theme.js +0 -52
- package/dist/charts/ticks.d.ts.map +0 -1
- package/dist/charts/ticks.js +0 -42
- package/dist/cli/audit-allows.d.ts +0 -11
- package/dist/cli/audit-allows.d.ts.map +0 -1
- package/dist/cli/audit-allows.js +0 -240
- package/dist/cli/check-theme.d.ts +0 -10
- package/dist/cli/check-theme.d.ts.map +0 -1
- package/dist/cli/check-theme.js +0 -154
- package/dist/cli/doctor-upgrade.d.ts +0 -86
- package/dist/cli/doctor-upgrade.d.ts.map +0 -1
- package/dist/cli/doctor-upgrade.js +0 -509
- package/dist/cli/doctor.d.ts +0 -38
- package/dist/cli/doctor.d.ts.map +0 -1
- package/dist/cli/doctor.js +0 -352
- package/dist/cli/guard-hook.d.ts +0 -9
- package/dist/cli/guard-hook.d.ts.map +0 -1
- package/dist/cli/guard-hook.js +0 -59
- package/dist/cli/init.d.ts +0 -12
- package/dist/cli/init.d.ts.map +0 -1
- package/dist/cli/init.js +0 -349
- package/dist/cli/provider-tags.d.ts +0 -12
- package/dist/cli/provider-tags.d.ts.map +0 -1
- package/dist/cli/provider-tags.js +0 -28
- package/dist/cli/render-imports.d.ts +0 -24
- package/dist/cli/render-imports.d.ts.map +0 -1
- package/dist/cli/render-imports.js +0 -74
- package/dist/cli/sync.d.ts +0 -27
- package/dist/cli/sync.d.ts.map +0 -1
- package/dist/cli/sync.js +0 -243
- package/dist/commands/ShortcutsHelp.d.ts +0 -18
- package/dist/commands/ShortcutsHelp.d.ts.map +0 -1
- package/dist/commands/ShortcutsHelp.js +0 -69
- package/dist/commands/command-stash.d.ts +0 -15
- package/dist/commands/command-stash.d.ts.map +0 -1
- package/dist/commands/command-stash.js +0 -31
- package/dist/commands/define-commands.d.ts +0 -123
- package/dist/commands/define-commands.d.ts.map +0 -1
- package/dist/commands/define-commands.js +0 -18
- package/dist/commands/define-overlays.d.ts +0 -221
- package/dist/commands/define-overlays.d.ts.map +0 -1
- package/dist/commands/define-overlays.js +0 -140
- package/dist/commands/index.d.ts +0 -26
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -17
- package/dist/commands/notifications/bell.d.ts +0 -16
- package/dist/commands/notifications/bell.d.ts.map +0 -1
- package/dist/commands/notifications/bell.js +0 -101
- package/dist/commands/notifications/center.d.ts +0 -31
- package/dist/commands/notifications/center.d.ts.map +0 -1
- package/dist/commands/notifications/center.js +0 -130
- package/dist/commands/notifications/define-notifications.d.ts +0 -142
- package/dist/commands/notifications/define-notifications.d.ts.map +0 -1
- package/dist/commands/notifications/define-notifications.js +0 -28
- package/dist/commands/notifications/notify.d.ts +0 -44
- package/dist/commands/notifications/notify.d.ts.map +0 -1
- package/dist/commands/notifications/notify.js +0 -79
- package/dist/commands/notifications/store.d.ts +0 -129
- package/dist/commands/notifications/store.d.ts.map +0 -1
- package/dist/commands/notifications/store.js +0 -117
- package/dist/commands/projectors.d.ts +0 -22
- package/dist/commands/projectors.d.ts.map +0 -1
- package/dist/commands/projectors.js +0 -16
- package/dist/commands/shell-bridge.d.ts +0 -57
- package/dist/commands/shell-bridge.d.ts.map +0 -1
- package/dist/commands/shell-bridge.js +0 -32
- package/dist/commands/shortcut-format.d.ts +0 -54
- package/dist/commands/shortcut-format.d.ts.map +0 -1
- package/dist/commands/shortcut-format.js +0 -63
- package/dist/common/could-not-load.d.ts +0 -13
- package/dist/common/could-not-load.d.ts.map +0 -1
- package/dist/common/could-not-load.js +0 -14
- package/dist/common/index.d.ts +0 -18
- package/dist/common/index.d.ts.map +0 -1
- package/dist/common/index.js +0 -30
- package/dist/common/motion.d.ts +0 -29
- package/dist/common/motion.d.ts.map +0 -1
- package/dist/common/motion.js +0 -12
- package/dist/common/query-state-like.d.ts +0 -43
- package/dist/common/query-state-like.d.ts.map +0 -1
- package/dist/common/query-state-like.js +0 -20
- package/dist/common/refs.d.ts +0 -29
- package/dist/common/refs.d.ts.map +0 -1
- package/dist/common/refs.js +0 -29
- package/dist/common/use-measured-widths.d.ts +0 -37
- package/dist/common/use-measured-widths.d.ts.map +0 -1
- package/dist/common/use-measured-widths.js +0 -53
- package/dist/common/virtual-rows.d.ts +0 -196
- package/dist/common/virtual-rows.d.ts.map +0 -1
- package/dist/common/virtual-rows.js +0 -290
- package/dist/common/vx-families.d.ts +0 -7
- package/dist/common/vx-families.d.ts.map +0 -1
- package/dist/common/vx-families.js +0 -32
- package/dist/common/vx-family.d.ts +0 -11
- package/dist/common/vx-family.d.ts.map +0 -1
- package/dist/common/vx-family.js +0 -12
- package/dist/content/article-layout.d.ts +0 -63
- package/dist/content/article-layout.d.ts.map +0 -1
- package/dist/content/article-layout.js +0 -111
- package/dist/content/article-layout.module.css +0 -183
- package/dist/content/article-layout.module.css.d.ts +0 -23
- package/dist/content/article-model.d.ts +0 -17
- package/dist/content/article-model.d.ts.map +0 -1
- package/dist/content/article-model.js +0 -13
- package/dist/content/callout-alert.d.ts +0 -27
- package/dist/content/callout-alert.d.ts.map +0 -1
- package/dist/content/callout-alert.js +0 -59
- package/dist/content/callout.d.ts +0 -28
- package/dist/content/callout.d.ts.map +0 -1
- package/dist/content/callout.js +0 -75
- package/dist/content/callout.module.css +0 -89
- package/dist/content/callout.module.css.d.ts +0 -17
- package/dist/content/code-block.module.css +0 -135
- package/dist/content/code-block.module.css.d.ts +0 -14
- package/dist/content/copy-action.d.ts +0 -29
- package/dist/content/copy-action.d.ts.map +0 -1
- package/dist/content/copy-action.js +0 -46
- package/dist/content/fence-block.d.ts +0 -46
- package/dist/content/fence-block.d.ts.map +0 -1
- package/dist/content/fence-block.js +0 -89
- package/dist/content/glyphs.d.ts +0 -18
- package/dist/content/glyphs.d.ts.map +0 -1
- package/dist/content/glyphs.js +0 -43
- package/dist/content/guide.d.ts +0 -48
- package/dist/content/guide.d.ts.map +0 -1
- package/dist/content/guide.js +0 -119
- package/dist/content/guide.module.css +0 -62
- package/dist/content/guide.module.css.d.ts +0 -13
- package/dist/content/heading-anchor.d.ts +0 -30
- package/dist/content/heading-anchor.d.ts.map +0 -1
- package/dist/content/heading-anchor.js +0 -37
- package/dist/content/heading-components.d.ts +0 -5
- package/dist/content/heading-components.d.ts.map +0 -1
- package/dist/content/heading-components.js +0 -44
- package/dist/content/mermaid-sanitize.d.ts +0 -15
- package/dist/content/mermaid-sanitize.d.ts.map +0 -1
- package/dist/content/mermaid-sanitize.js +0 -28
- package/dist/content/mermaid.module.css +0 -20
- package/dist/content/mermaid.module.css.d.ts +0 -8
- package/dist/content/prose.d.ts +0 -29
- package/dist/content/prose.d.ts.map +0 -1
- package/dist/content/prose.js +0 -24
- package/dist/content/prose.module.css +0 -346
- package/dist/content/prose.module.css.d.ts +0 -12
- package/dist/content/reading-progress.d.ts +0 -26
- package/dist/content/reading-progress.d.ts.map +0 -1
- package/dist/content/reading-progress.js +0 -54
- package/dist/content/reading-progress.module.css +0 -24
- package/dist/content/reading-progress.module.css.d.ts +0 -9
- package/dist/content/slug.d.ts.map +0 -1
- package/dist/content/slug.js +0 -21
- package/dist/content/toc-click-pin.d.ts.map +0 -1
- package/dist/content/toc-click-pin.js +0 -111
- package/dist/content/toc-spy.d.ts.map +0 -1
- package/dist/content/toc.d.ts +0 -50
- package/dist/content/toc.d.ts.map +0 -1
- package/dist/content/toc.js +0 -136
- package/dist/content/toc.module.css +0 -54
- package/dist/content/toc.module.css.d.ts +0 -13
- package/dist/content/url-hardening.d.ts +0 -23
- package/dist/content/url-hardening.d.ts.map +0 -1
- package/dist/content/url-hardening.js +0 -25
- package/dist/controls/actions.d.ts +0 -250
- package/dist/controls/actions.d.ts.map +0 -1
- package/dist/controls/actions.js +0 -466
- package/dist/controls/actions.module.css +0 -75
- package/dist/controls/actions.module.css.d.ts +0 -14
- package/dist/controls/control-group.d.ts +0 -19
- package/dist/controls/control-group.d.ts.map +0 -1
- package/dist/controls/control-group.js +0 -27
- package/dist/controls/control-name.d.ts +0 -27
- package/dist/controls/control-name.d.ts.map +0 -1
- package/dist/controls/control-name.js +0 -11
- package/dist/controls/controls.module.css +0 -549
- package/dist/controls/controls.module.css.d.ts +0 -35
- package/dist/controls/enum-filter.d.ts +0 -40
- package/dist/controls/enum-filter.d.ts.map +0 -1
- package/dist/controls/enum-filter.js +0 -109
- package/dist/controls/filter-base.d.ts +0 -30
- package/dist/controls/filter-base.d.ts.map +0 -1
- package/dist/controls/filter-context.d.ts +0 -74
- package/dist/controls/filter-context.d.ts.map +0 -1
- package/dist/controls/filter-context.js +0 -73
- package/dist/controls/filter-pill.d.ts +0 -62
- package/dist/controls/filter-pill.d.ts.map +0 -1
- package/dist/controls/filter-pill.js +0 -103
- package/dist/controls/filter-sheet.d.ts +0 -25
- package/dist/controls/filter-sheet.d.ts.map +0 -1
- package/dist/controls/filter-sheet.js +0 -33
- package/dist/controls/form-layout.d.ts +0 -162
- package/dist/controls/form-layout.d.ts.map +0 -1
- package/dist/controls/form-layout.js +0 -172
- package/dist/controls/form-layout.module.css +0 -268
- package/dist/controls/form-layout.module.css.d.ts +0 -22
- package/dist/controls/glyphs.d.ts +0 -37
- package/dist/controls/glyphs.d.ts.map +0 -1
- package/dist/controls/glyphs.js +0 -63
- package/dist/controls/multi-select-filter.d.ts +0 -45
- package/dist/controls/multi-select-filter.d.ts.map +0 -1
- package/dist/controls/multi-select-filter.js +0 -204
- package/dist/controls/number-filter.d.ts +0 -23
- package/dist/controls/number-filter.d.ts.map +0 -1
- package/dist/controls/number-filter.js +0 -195
- package/dist/controls/panel-row.d.ts +0 -129
- package/dist/controls/panel-row.d.ts.map +0 -1
- package/dist/controls/panel-row.js +0 -176
- package/dist/controls/panel-row.module.css +0 -86
- package/dist/controls/panel-row.module.css.d.ts +0 -13
- package/dist/controls/range-filter.d.ts +0 -45
- package/dist/controls/range-filter.d.ts.map +0 -1
- package/dist/controls/range-filter.js +0 -139
- package/dist/controls/search-filter.d.ts +0 -15
- package/dist/controls/search-filter.d.ts.map +0 -1
- package/dist/controls/search-filter.js +0 -135
- package/dist/controls/select-filter.d.ts +0 -63
- package/dist/controls/select-filter.d.ts.map +0 -1
- package/dist/controls/select-filter.js +0 -14
- package/dist/controls/sync-button.d.ts +0 -36
- package/dist/controls/sync-button.d.ts.map +0 -1
- package/dist/controls/sync-button.js +0 -118
- package/dist/controls/sync-button.module.css +0 -96
- package/dist/controls/sync-button.module.css.d.ts +0 -12
- package/dist/controls/toggle-filter.d.ts +0 -11
- package/dist/controls/toggle-filter.d.ts.map +0 -1
- package/dist/controls/toggle-filter.js +0 -60
- package/dist/controls/uncontrolled.d.ts +0 -12
- package/dist/controls/uncontrolled.d.ts.map +0 -1
- package/dist/controls-dates/date-range-picker.d.ts +0 -4
- package/dist/controls-dates/date-range-picker.d.ts.map +0 -1
- package/dist/controls-dates/date-range-picker.js +0 -23
- package/dist/controls-dates/index.d.ts +0 -8
- package/dist/controls-dates/index.d.ts.map +0 -1
- package/dist/controls-dates/index.js +0 -4
- package/dist/dashboard/bar-list.d.ts +0 -48
- package/dist/dashboard/bar-list.d.ts.map +0 -1
- package/dist/dashboard/bar-list.js +0 -117
- package/dist/dashboard/bar-list.module.css +0 -258
- package/dist/dashboard/bar-list.module.css.d.ts +0 -20
- package/dist/dashboard/board-nav.d.ts +0 -22
- package/dist/dashboard/board-nav.d.ts.map +0 -1
- package/dist/dashboard/board-nav.js +0 -49
- package/dist/dashboard/board.d.ts +0 -52
- package/dist/dashboard/board.d.ts.map +0 -1
- package/dist/dashboard/board.js +0 -247
- package/dist/dashboard/board.module.css +0 -179
- package/dist/dashboard/board.module.css.d.ts +0 -28
- package/dist/dashboard/delta-badge.d.ts +0 -24
- package/dist/dashboard/delta-badge.d.ts.map +0 -1
- package/dist/dashboard/delta-badge.js +0 -41
- package/dist/dashboard/empty-state.d.ts +0 -23
- package/dist/dashboard/empty-state.d.ts.map +0 -1
- package/dist/dashboard/empty-state.js +0 -82
- package/dist/dashboard/event-list-model.d.ts +0 -54
- package/dist/dashboard/event-list-model.d.ts.map +0 -1
- package/dist/dashboard/event-list-model.js +0 -76
- package/dist/dashboard/event-list-rows.d.ts +0 -23
- package/dist/dashboard/event-list-rows.d.ts.map +0 -1
- package/dist/dashboard/event-list-rows.js +0 -89
- package/dist/dashboard/event-list-scroll.d.ts +0 -55
- package/dist/dashboard/event-list-scroll.d.ts.map +0 -1
- package/dist/dashboard/event-list-scroll.js +0 -216
- package/dist/dashboard/event-list-skeleton.d.ts +0 -10
- package/dist/dashboard/event-list-skeleton.d.ts.map +0 -1
- package/dist/dashboard/event-list-skeleton.js +0 -34
- package/dist/dashboard/event-list.d.ts +0 -65
- package/dist/dashboard/event-list.d.ts.map +0 -1
- package/dist/dashboard/event-list.js +0 -208
- package/dist/dashboard/event-list.module.css +0 -336
- package/dist/dashboard/event-list.module.css.d.ts +0 -34
- package/dist/dashboard/index.d.ts +0 -15
- package/dist/dashboard/index.d.ts.map +0 -1
- package/dist/dashboard/index.js +0 -28
- package/dist/dashboard/meter-model.d.ts +0 -300
- package/dist/dashboard/meter-model.d.ts.map +0 -1
- package/dist/dashboard/meter-model.js +0 -484
- package/dist/dashboard/meter-parts.d.ts +0 -61
- package/dist/dashboard/meter-parts.d.ts.map +0 -1
- package/dist/dashboard/meter-parts.js +0 -684
- package/dist/dashboard/meter.d.ts +0 -144
- package/dist/dashboard/meter.d.ts.map +0 -1
- package/dist/dashboard/meter.js +0 -89
- package/dist/dashboard/meter.module.css +0 -470
- package/dist/dashboard/meter.module.css.d.ts +0 -47
- package/dist/dashboard/page-summary.d.ts +0 -20
- package/dist/dashboard/page-summary.d.ts.map +0 -1
- package/dist/dashboard/page-summary.js +0 -33
- package/dist/dashboard/page-summary.module.css +0 -92
- package/dist/dashboard/page-summary.module.css.d.ts +0 -15
- package/dist/dashboard/query-state.d.ts +0 -148
- package/dist/dashboard/query-state.d.ts.map +0 -1
- package/dist/dashboard/query-state.js +0 -217
- package/dist/dashboard/scale.d.ts +0 -9
- package/dist/dashboard/scale.d.ts.map +0 -1
- package/dist/dashboard/scale.js +0 -10
- package/dist/dashboard/section.d.ts +0 -95
- package/dist/dashboard/section.d.ts.map +0 -1
- package/dist/dashboard/section.js +0 -162
- package/dist/dashboard/section.module.css +0 -134
- package/dist/dashboard/section.module.css.d.ts +0 -12
- package/dist/dashboard/settings-section.d.ts +0 -39
- package/dist/dashboard/settings-section.d.ts.map +0 -1
- package/dist/dashboard/settings-section.js +0 -113
- package/dist/dashboard/settings-section.module.css +0 -54
- package/dist/dashboard/settings-section.module.css.d.ts +0 -12
- package/dist/dashboard/stat-card-parts.d.ts +0 -46
- package/dist/dashboard/stat-card-parts.d.ts.map +0 -1
- package/dist/dashboard/stat-card-parts.js +0 -75
- package/dist/dashboard/stat-card.d.ts +0 -141
- package/dist/dashboard/stat-card.d.ts.map +0 -1
- package/dist/dashboard/stat-card.js +0 -281
- package/dist/dashboard/stat-card.module.css +0 -508
- package/dist/dashboard/stat-card.module.css.d.ts +0 -39
- package/dist/dashboard/stat-group.d.ts +0 -56
- package/dist/dashboard/stat-group.d.ts.map +0 -1
- package/dist/dashboard/stat-group.js +0 -47
- package/dist/dashboard/stat-group.module.css +0 -124
- package/dist/dashboard/stat-group.module.css.d.ts +0 -9
- package/dist/dashboard/stat-strip.d.ts +0 -93
- package/dist/dashboard/stat-strip.d.ts.map +0 -1
- package/dist/dashboard/stat-strip.js +0 -273
- package/dist/dashboard/stat-strip.module.css +0 -395
- package/dist/dashboard/stat-strip.module.css.d.ts +0 -41
- package/dist/dashboard/visual-slot.d.ts +0 -16
- package/dist/dashboard/visual-slot.d.ts.map +0 -1
- package/dist/dashboard/visual-slot.js +0 -11
- package/dist/dashboard/widget-header.d.ts +0 -142
- package/dist/dashboard/widget-header.d.ts.map +0 -1
- package/dist/dashboard/widget-header.js +0 -219
- package/dist/dashboard/widget-header.module.css +0 -486
- package/dist/dashboard/widget-header.module.css.d.ts +0 -27
- package/dist/dev-dock.d.ts +0 -26
- package/dist/dev-dock.d.ts.map +0 -1
- package/dist/dev-dock.js +0 -90
- package/dist/format/date.d.ts +0 -61
- package/dist/format/date.d.ts.map +0 -1
- package/dist/format/date.js +0 -144
- package/dist/format/index.d.ts +0 -25
- package/dist/format/index.d.ts.map +0 -1
- package/dist/format/index.js +0 -22
- package/dist/format/measure.d.ts +0 -15
- package/dist/format/measure.d.ts.map +0 -1
- package/dist/format/measure.js +0 -27
- package/dist/forms/create-form.d.ts +0 -31
- package/dist/forms/create-form.d.ts.map +0 -1
- package/dist/forms/create-form.js +0 -18
- package/dist/forms/field.d.ts +0 -86
- package/dist/forms/field.d.ts.map +0 -1
- package/dist/forms/field.js +0 -10
- package/dist/forms/form-state.d.ts +0 -42
- package/dist/forms/form-state.d.ts.map +0 -1
- package/dist/forms/form-state.js +0 -26
- package/dist/forms/index.d.ts +0 -18
- package/dist/forms/index.d.ts.map +0 -1
- package/dist/forms/index.js +0 -7
- package/dist/guard/fonts-hint.d.ts +0 -3
- package/dist/guard/fonts-hint.d.ts.map +0 -1
- package/dist/guard/fonts-hint.js +0 -4
- package/dist/guard/guard-hook.d.ts +0 -40
- package/dist/guard/guard-hook.d.ts.map +0 -1
- package/dist/guard/guard-hook.js +0 -57
- package/dist/guard/index.d.ts +0 -431
- package/dist/guard/index.d.ts.map +0 -1
- package/dist/guard/index.js +0 -1313
- package/dist/guard/palette.d.ts +0 -51
- package/dist/guard/palette.d.ts.map +0 -1
- package/dist/guard/palette.js +0 -190
- package/dist/guard/series-file.d.ts +0 -15
- package/dist/guard/series-file.d.ts.map +0 -1
- package/dist/guard/series-file.js +0 -29
- package/dist/guard/types.d.ts +0 -181
- package/dist/guard/types.d.ts.map +0 -1
- package/dist/guard/vx-names.d.ts +0 -3
- package/dist/guard/vx-names.d.ts.map +0 -1
- package/dist/guard/vx-names.js +0 -228
- package/dist/provider/create-router.d.ts +0 -96
- package/dist/provider/create-router.d.ts.map +0 -1
- package/dist/provider/create-router.js +0 -55
- package/dist/provider/error-fallback.module.css +0 -10
- package/dist/provider/error-fallback.module.css.d.ts +0 -8
- package/dist/provider/fallback.module.css +0 -37
- package/dist/provider/fallback.module.css.d.ts +0 -11
- package/dist/provider/hotkeys.d.ts +0 -4
- package/dist/provider/hotkeys.d.ts.map +0 -1
- package/dist/provider/hotkeys.js +0 -45
- package/dist/provider/index.d.ts +0 -120
- package/dist/provider/index.d.ts.map +0 -1
- package/dist/provider/index.js +0 -335
- package/dist/provider/lab-theme.d.ts +0 -40
- package/dist/provider/lab-theme.d.ts.map +0 -1
- package/dist/provider/lab-theme.js +0 -51
- package/dist/provider/modals-mount.d.ts +0 -16
- package/dist/provider/modals-mount.d.ts.map +0 -1
- package/dist/provider/modals-mount.js +0 -42
- package/dist/provider/notifier.d.ts +0 -22
- package/dist/provider/notifier.d.ts.map +0 -1
- package/dist/provider/notifier.js +0 -36
- package/dist/provider/route-defaults.d.ts +0 -10
- package/dist/provider/route-defaults.d.ts.map +0 -1
- package/dist/provider/route-defaults.js +0 -25
- package/dist/provider/route-defaults.module.css +0 -39
- package/dist/provider/route-defaults.module.css.d.ts +0 -10
- package/dist/provider/route-transition.d.ts +0 -76
- package/dist/provider/route-transition.d.ts.map +0 -1
- package/dist/provider/route-transition.js +0 -98
- package/dist/provider/slots.d.ts +0 -25
- package/dist/provider/slots.d.ts.map +0 -1
- package/dist/provider/slots.js +0 -29
- package/dist/provider/spotlight-actions.d.ts +0 -11
- package/dist/provider/spotlight-actions.d.ts.map +0 -1
- package/dist/provider/spotlight-actions.js +0 -56
- package/dist/provider/spotlight-mount.d.ts +0 -3
- package/dist/provider/spotlight-mount.d.ts.map +0 -1
- package/dist/provider/spotlight-mount.js +0 -26
- package/dist/provider/test-router.d.ts +0 -7
- package/dist/provider/test-router.d.ts.map +0 -1
- package/dist/provider/test-router.js +0 -17
- package/dist/query-client.d.ts +0 -9
- package/dist/query-client.d.ts.map +0 -1
- package/dist/query-client.js +0 -30
- package/dist/router-tanstack/index.d.ts +0 -36
- package/dist/router-tanstack/index.d.ts.map +0 -1
- package/dist/router-tanstack/index.js +0 -18
- package/dist/router-tanstack/nav-stash.d.ts +0 -24
- package/dist/router-tanstack/nav-stash.d.ts.map +0 -1
- package/dist/router-tanstack/nav-stash.js +0 -23
- package/dist/router-tanstack/nav.d.ts +0 -169
- package/dist/router-tanstack/nav.d.ts.map +0 -1
- package/dist/router-tanstack/nav.js +0 -35
- package/dist/router-tanstack/search-store-warnings.d.ts +0 -33
- package/dist/router-tanstack/search-store-warnings.d.ts.map +0 -1
- package/dist/router-tanstack/search-store-warnings.js +0 -77
- package/dist/router-tanstack/search-store.d.ts +0 -86
- package/dist/router-tanstack/search-store.d.ts.map +0 -1
- package/dist/router-tanstack/search-store.js +0 -303
- package/dist/router-tanstack/use-nav.d.ts +0 -29
- package/dist/router-tanstack/use-nav.d.ts.map +0 -1
- package/dist/router-tanstack/use-nav.js +0 -149
- package/dist/shell/account-types.d.ts +0 -121
- package/dist/shell/account-types.d.ts.map +0 -1
- package/dist/shell/app-brand.d.ts +0 -13
- package/dist/shell/app-brand.d.ts.map +0 -1
- package/dist/shell/app-brand.js +0 -95
- package/dist/shell/app-brand.module.css +0 -142
- package/dist/shell/app-brand.module.css.d.ts +0 -14
- package/dist/shell/app-breadcrumbs.d.ts +0 -15
- package/dist/shell/app-breadcrumbs.d.ts.map +0 -1
- package/dist/shell/app-breadcrumbs.js +0 -52
- package/dist/shell/app-header.module.css +0 -171
- package/dist/shell/app-header.module.css.d.ts +0 -12
- package/dist/shell/app-main.module.css +0 -215
- package/dist/shell/app-main.module.css.d.ts +0 -12
- package/dist/shell/app-mobile-nav.d.ts +0 -33
- package/dist/shell/app-mobile-nav.d.ts.map +0 -1
- package/dist/shell/app-mobile-nav.js +0 -511
- package/dist/shell/app-mobile-nav.module.css +0 -429
- package/dist/shell/app-mobile-nav.module.css.d.ts +0 -24
- package/dist/shell/app-sidebar-account.d.ts +0 -4
- package/dist/shell/app-sidebar-account.d.ts.map +0 -1
- package/dist/shell/app-sidebar-account.js +0 -123
- package/dist/shell/app-sidebar.d.ts +0 -82
- package/dist/shell/app-sidebar.d.ts.map +0 -1
- package/dist/shell/app-sidebar.js +0 -361
- package/dist/shell/app-sidebar.module.css +0 -812
- package/dist/shell/app-sidebar.module.css.d.ts +0 -50
- package/dist/shell/aside-docking.d.ts +0 -31
- package/dist/shell/aside-docking.d.ts.map +0 -1
- package/dist/shell/aside-docking.js +0 -19
- package/dist/shell/mobile-nav-model.d.ts +0 -71
- package/dist/shell/mobile-nav-model.d.ts.map +0 -1
- package/dist/shell/mobile-nav-model.js +0 -287
- package/dist/shell/nav-count-badge.d.ts +0 -13
- package/dist/shell/nav-count-badge.d.ts.map +0 -1
- package/dist/shell/nav-count-badge.js +0 -31
- package/dist/shell/nav-glyph.d.ts +0 -14
- package/dist/shell/nav-glyph.d.ts.map +0 -1
- package/dist/shell/nav-glyph.js +0 -21
- package/dist/shell/nav-types.d.ts +0 -220
- package/dist/shell/nav-types.d.ts.map +0 -1
- package/dist/shell/page-aside.d.ts +0 -64
- package/dist/shell/page-aside.d.ts.map +0 -1
- package/dist/shell/page-aside.js +0 -226
- package/dist/shell/page-aside.module.css +0 -176
- package/dist/shell/page-aside.module.css.d.ts +0 -14
- package/dist/shell/page-bar.d.ts +0 -134
- package/dist/shell/page-bar.d.ts.map +0 -1
- package/dist/shell/page-bar.js +0 -273
- package/dist/shell/page-bar.module.css +0 -256
- package/dist/shell/page-bar.module.css.d.ts +0 -20
- package/dist/shell/page-title.d.ts +0 -14
- package/dist/shell/page-title.d.ts.map +0 -1
- package/dist/shell/page-title.js +0 -25
- package/dist/shell/page-title.module.css +0 -35
- package/dist/shell/page-title.module.css.d.ts +0 -11
- package/dist/shell/sidebar-block-model.d.ts +0 -48
- package/dist/shell/sidebar-block-model.d.ts.map +0 -1
- package/dist/shell/sidebar-block-model.js +0 -43
- package/dist/shell/sidebar-blocks.d.ts +0 -33
- package/dist/shell/sidebar-blocks.d.ts.map +0 -1
- package/dist/shell/sidebar-blocks.js +0 -177
- package/dist/shell/sidebar-search.d.ts +0 -26
- package/dist/shell/sidebar-search.d.ts.map +0 -1
- package/dist/shell/sidebar-search.js +0 -98
- package/dist/shell/sidebar-search.module.css +0 -102
- package/dist/shell/sidebar-search.module.css.d.ts +0 -13
- package/dist/shell/use-size-class.d.ts +0 -6
- package/dist/shell/use-size-class.d.ts.map +0 -1
- package/dist/shell/use-size-class.js +0 -19
- package/dist/state/fields.d.ts +0 -622
- package/dist/state/fields.d.ts.map +0 -1
- package/dist/state/fields.js +0 -460
- package/dist/state/persisted-or-local.d.ts +0 -12
- package/dist/state/persisted-or-local.d.ts.map +0 -1
- package/dist/state/persisted-or-local.js +0 -25
- package/dist/state/persisted.d.ts +0 -70
- package/dist/state/persisted.d.ts.map +0 -1
- package/dist/state/persisted.js +0 -153
- package/dist/state.d.ts +0 -16
- package/dist/state.d.ts.map +0 -1
- package/dist/state.js +0 -14
- package/dist/styles.css +0 -477
- package/dist/table/cell-kinds.d.ts +0 -47
- package/dist/table/cell-kinds.d.ts.map +0 -1
- package/dist/table/cell-kinds.js +0 -180
- package/dist/table/cell-kinds.module.css +0 -55
- package/dist/table/cell-kinds.module.css.d.ts +0 -15
- package/dist/table/data-table-fold.d.ts +0 -155
- package/dist/table/data-table-fold.d.ts.map +0 -1
- package/dist/table/data-table-fold.js +0 -320
- package/dist/table/data-table-state.d.ts +0 -90
- package/dist/table/data-table-state.d.ts.map +0 -1
- package/dist/table/data-table-state.js +0 -145
- package/dist/table/data-table.d.ts +0 -538
- package/dist/table/data-table.d.ts.map +0 -1
- package/dist/table/data-table.js +0 -1044
- package/dist/table/data-table.module.css +0 -474
- package/dist/table/data-table.module.css.d.ts +0 -41
- package/dist/table/query-branch.d.ts +0 -28
- package/dist/table/query-branch.d.ts.map +0 -1
- package/dist/table/query-branch.js +0 -10
- package/dist/table/table-features.d.ts +0 -99
- package/dist/table/table-features.d.ts.map +0 -1
- package/dist/table/table-features.js +0 -59
- package/dist/telemetry.d.ts +0 -165
- package/dist/telemetry.d.ts.map +0 -1
- package/dist/telemetry.js +0 -61
- package/dist/theme/card-inset.module.css +0 -111
- package/dist/theme/card-inset.module.css.d.ts +0 -9
- package/dist/theme/chrome-vars.d.ts +0 -109
- package/dist/theme/chrome-vars.d.ts.map +0 -1
- package/dist/theme/chrome-vars.js +0 -89
- package/dist/theme/controls.module.css +0 -433
- package/dist/theme/controls.module.css.d.ts +0 -20
- package/dist/theme/ctl-theme.d.ts +0 -33
- package/dist/theme/ctl-theme.d.ts.map +0 -1
- package/dist/theme/ctl-theme.js +0 -54
- package/dist/theme/extend.d.ts +0 -18
- package/dist/theme/extend.d.ts.map +0 -1
- package/dist/theme/extend.js +0 -6
- package/dist/theme/floating.module.css +0 -72
- package/dist/theme/floating.module.css.d.ts +0 -12
- package/dist/theme/icon-slot.d.ts +0 -44
- package/dist/theme/icon-slot.d.ts.map +0 -1
- package/dist/theme/icon-slot.js +0 -21
- package/dist/theme/icon-slot.module.css +0 -47
- package/dist/theme/icon-slot.module.css.d.ts +0 -8
- package/dist/theme/index.d.ts +0 -132
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/index.js +0 -1112
- package/dist/theme/nav-link.module.css +0 -85
- package/dist/theme/nav-link.module.css.d.ts +0 -8
- package/dist/theme/segmented-control.module.css +0 -80
- package/dist/theme/segmented-control.module.css.d.ts +0 -10
- package/dist/theme/status-dot.d.ts +0 -7
- package/dist/theme/status-dot.d.ts.map +0 -1
- package/dist/theme/status-dot.js +0 -18
- package/dist/theme/status-dot.module.css +0 -9
- package/dist/theme/status-dot.module.css.d.ts +0 -8
- package/dist/theme/status-verdict.d.ts +0 -10
- package/dist/theme/status-verdict.d.ts.map +0 -1
- package/dist/theme/status-verdict.js +0 -22
- package/dist/theme/status-verdict.module.css +0 -25
- package/dist/theme/status-verdict.module.css.d.ts +0 -9
- package/dist/theme/theme-toggle.d.ts +0 -9
- package/dist/theme/theme-toggle.d.ts.map +0 -1
- package/dist/theme/theme-toggle.js +0 -136
- package/dist/theme/theme-toggle.module.css +0 -30
- package/dist/theme/theme-toggle.module.css.d.ts +0 -10
- package/dist/theme/timeline.module.css +0 -29
- package/dist/theme/timeline.module.css.d.ts +0 -9
- package/dist/theme/use-basalt-spacing.d.ts +0 -3
- package/dist/theme/use-basalt-spacing.d.ts.map +0 -1
- package/dist/theme/use-basalt-spacing.js +0 -8
- package/dist/theme-lab/boot.d.ts +0 -66
- package/dist/theme-lab/boot.d.ts.map +0 -1
- package/dist/theme-lab/boot.js +0 -82
- package/dist/theme-lab/derive-controls.d.ts +0 -13
- package/dist/theme-lab/derive-controls.d.ts.map +0 -1
- package/dist/theme-lab/derive-controls.js +0 -139
- package/dist/theme-lab/derive-state.d.ts +0 -55
- package/dist/theme-lab/derive-state.d.ts.map +0 -1
- package/dist/theme-lab/derive-state.js +0 -82
- package/dist/theme-lab/index.d.ts +0 -30
- package/dist/theme-lab/index.d.ts.map +0 -1
- package/dist/theme-lab/index.js +0 -154
- package/dist/unwrap.d.ts +0 -29
- package/dist/unwrap.d.ts.map +0 -1
- package/dist/unwrap.js +0 -18
- package/dist/vite-boot.d.ts +0 -25
- package/dist/vite-boot.d.ts.map +0 -1
- package/dist/vite-boot.js +0 -36
- package/dist/vite-color-mix.d.ts +0 -30
- package/dist/vite-color-mix.d.ts.map +0 -1
- package/dist/vite-color-mix.js +0 -80
- package/dist/vite.d.ts +0 -203
- package/dist/vite.d.ts.map +0 -1
- package/dist/vite.js +0 -477
- package/src/agent/ai-sdk-transport.ts +0 -469
- package/src/agent/chat/composer.tsx +0 -648
- package/src/agent/chat/message-affordances.ts +0 -64
- package/src/agent/chat/thread-feed-row.tsx +0 -352
- package/src/agent/chat/thread-feed.tsx +0 -219
- package/src/agent/chat/thread-message.tsx +0 -823
- package/src/agent/chat/thread-outcome-card.tsx +0 -180
- package/src/agent/chat/tool-chip.tsx +0 -225
- package/src/agent/chat/use-keyboard-inset.ts +0 -68
- package/src/agent/chat/virtualize.ts +0 -180
- package/src/agent/coalesce.ts +0 -229
- package/src/agent/error.ts +0 -58
- package/src/agent/foreign.ts +0 -141
- package/src/agent/history.ts +0 -25
- package/src/agent/id.ts +0 -160
- package/src/agent/index.ts +0 -35
- package/src/agent/merge.ts +0 -114
- package/src/agent/outcome.ts +0 -67
- package/src/agent/part-list.tsx +0 -373
- package/src/agent/parts.ts +0 -428
- package/src/agent/run-committer.ts +0 -64
- package/src/agent/run-records.ts +0 -171
- package/src/agent/stick-to-bottom.tsx +0 -153
- package/src/agent/thread.ts +0 -129
- package/src/agent/transport.ts +0 -95
- package/src/agent/use-agent-thread-runs.ts +0 -968
- package/src/charts/BandStrip.tsx +0 -520
- package/src/charts/Bars.tsx +0 -238
- package/src/charts/CartesianChart.tsx +0 -244
- package/src/charts/ChartCard.tsx +0 -474
- package/src/charts/Donut.tsx +0 -264
- package/src/charts/DualPanel.tsx +0 -370
- package/src/charts/Heatmap.tsx +0 -444
- package/src/charts/Lines.tsx +0 -160
- package/src/charts/MirroredBars.tsx +0 -348
- package/src/charts/Sparkline.tsx +0 -957
- package/src/charts/StackedArea.tsx +0 -101
- package/src/charts/band-fold.ts +0 -107
- package/src/charts/chart-card.module.css +0 -142
- package/src/charts/chart-card.module.css.d.ts +0 -20
- package/src/charts/compile.ts +0 -1438
- package/src/charts/cursor.ts +0 -394
- package/src/charts/donut.module.css +0 -54
- package/src/charts/donut.module.css.d.ts +0 -9
- package/src/charts/panel.tsx +0 -245
- package/src/charts/scales.ts +0 -287
- package/src/charts/sparkline.module.css +0 -166
- package/src/charts/sparkline.module.css.d.ts +0 -16
- package/src/charts/theme.ts +0 -65
- package/src/charts/ticks.ts +0 -61
- package/src/cli/audit-allows.ts +0 -348
- package/src/cli/check-theme.ts +0 -244
- package/src/cli/doctor-upgrade.ts +0 -737
- package/src/cli/doctor.ts +0 -488
- package/src/cli/guard-hook.ts +0 -82
- package/src/cli/init.ts +0 -495
- package/src/cli/provider-tags.ts +0 -38
- package/src/cli/render-imports.ts +0 -104
- package/src/cli/sync.ts +0 -342
- package/src/commands/ShortcutsHelp.tsx +0 -135
- package/src/commands/command-stash.ts +0 -44
- package/src/commands/define-commands.ts +0 -150
- package/src/commands/define-overlays.ts +0 -364
- package/src/commands/index.ts +0 -28
- package/src/commands/notifications/bell.tsx +0 -125
- package/src/commands/notifications/center.tsx +0 -248
- package/src/commands/notifications/define-notifications.ts +0 -211
- package/src/commands/notifications/notify.tsx +0 -158
- package/src/commands/notifications/store.ts +0 -302
- package/src/commands/projectors.ts +0 -47
- package/src/commands/shell-bridge.ts +0 -86
- package/src/commands/shortcut-format.ts +0 -123
- package/src/common/could-not-load.ts +0 -22
- package/src/common/index.ts +0 -17
- package/src/common/motion.ts +0 -26
- package/src/common/query-state-like.ts +0 -64
- package/src/common/refs.ts +0 -58
- package/src/common/use-measured-widths.ts +0 -91
- package/src/common/virtual-rows.tsx +0 -682
- package/src/common/vx-families.ts +0 -36
- package/src/common/vx-family.ts +0 -22
- package/src/content/article-layout.module.css +0 -183
- package/src/content/article-layout.module.css.d.ts +0 -23
- package/src/content/article-layout.tsx +0 -221
- package/src/content/article-model.ts +0 -27
- package/src/content/callout-alert.ts +0 -88
- package/src/content/callout.module.css +0 -89
- package/src/content/callout.module.css.d.ts +0 -17
- package/src/content/callout.tsx +0 -115
- package/src/content/code-block.module.css +0 -135
- package/src/content/code-block.module.css.d.ts +0 -14
- package/src/content/copy-action.tsx +0 -79
- package/src/content/fence-block.tsx +0 -265
- package/src/content/glyphs.tsx +0 -53
- package/src/content/guide.module.css +0 -62
- package/src/content/guide.module.css.d.ts +0 -13
- package/src/content/guide.tsx +0 -184
- package/src/content/heading-anchor.tsx +0 -65
- package/src/content/heading-components.tsx +0 -83
- package/src/content/mermaid-sanitize.ts +0 -49
- package/src/content/mermaid.module.css +0 -20
- package/src/content/mermaid.module.css.d.ts +0 -8
- package/src/content/prose.module.css +0 -346
- package/src/content/prose.module.css.d.ts +0 -12
- package/src/content/prose.tsx +0 -53
- package/src/content/reading-progress.module.css +0 -24
- package/src/content/reading-progress.module.css.d.ts +0 -9
- package/src/content/reading-progress.tsx +0 -92
- package/src/content/slug.ts +0 -46
- package/src/content/toc-click-pin.ts +0 -156
- package/src/content/toc.module.css +0 -54
- package/src/content/toc.module.css.d.ts +0 -13
- package/src/content/toc.tsx +0 -220
- package/src/content/url-hardening.ts +0 -52
- package/src/controls/actions.module.css +0 -75
- package/src/controls/actions.module.css.d.ts +0 -14
- package/src/controls/actions.tsx +0 -969
- package/src/controls/control-group.tsx +0 -70
- package/src/controls/control-name.ts +0 -33
- package/src/controls/controls.module.css +0 -549
- package/src/controls/controls.module.css.d.ts +0 -35
- package/src/controls/enum-filter.tsx +0 -188
- package/src/controls/filter-base.ts +0 -31
- package/src/controls/filter-context.tsx +0 -179
- package/src/controls/filter-pill.tsx +0 -203
- package/src/controls/filter-sheet.tsx +0 -79
- package/src/controls/form-layout.module.css +0 -268
- package/src/controls/form-layout.module.css.d.ts +0 -22
- package/src/controls/form-layout.tsx +0 -416
- package/src/controls/glyphs.tsx +0 -114
- package/src/controls/multi-select-filter.tsx +0 -316
- package/src/controls/number-filter.tsx +0 -364
- package/src/controls/panel-row.module.css +0 -86
- package/src/controls/panel-row.module.css.d.ts +0 -13
- package/src/controls/panel-row.tsx +0 -391
- package/src/controls/range-filter.tsx +0 -256
- package/src/controls/search-filter.tsx +0 -200
- package/src/controls/select-filter.tsx +0 -84
- package/src/controls/sync-button.module.css +0 -96
- package/src/controls/sync-button.module.css.d.ts +0 -12
- package/src/controls/sync-button.tsx +0 -211
- package/src/controls/toggle-filter.tsx +0 -83
- package/src/controls/uncontrolled.ts +0 -12
- package/src/controls-dates/date-range-picker.tsx +0 -49
- package/src/controls-dates/index.ts +0 -7
- package/src/dashboard/bar-list.module.css +0 -258
- package/src/dashboard/bar-list.module.css.d.ts +0 -20
- package/src/dashboard/bar-list.tsx +0 -254
- package/src/dashboard/board-nav.ts +0 -67
- package/src/dashboard/board.module.css +0 -179
- package/src/dashboard/board.module.css.d.ts +0 -28
- package/src/dashboard/board.tsx +0 -415
- package/src/dashboard/delta-badge.tsx +0 -103
- package/src/dashboard/empty-state.tsx +0 -128
- package/src/dashboard/event-list-model.ts +0 -125
- package/src/dashboard/event-list-rows.tsx +0 -117
- package/src/dashboard/event-list-scroll.ts +0 -291
- package/src/dashboard/event-list-skeleton.tsx +0 -62
- package/src/dashboard/event-list.module.css +0 -336
- package/src/dashboard/event-list.module.css.d.ts +0 -34
- package/src/dashboard/event-list.tsx +0 -336
- package/src/dashboard/index.ts +0 -14
- package/src/dashboard/meter-model.ts +0 -895
- package/src/dashboard/meter-parts.tsx +0 -1015
- package/src/dashboard/meter.module.css +0 -470
- package/src/dashboard/meter.module.css.d.ts +0 -47
- package/src/dashboard/meter.tsx +0 -311
- package/src/dashboard/page-summary.module.css +0 -92
- package/src/dashboard/page-summary.module.css.d.ts +0 -15
- package/src/dashboard/page-summary.tsx +0 -102
- package/src/dashboard/query-state.tsx +0 -409
- package/src/dashboard/scale.ts +0 -13
- package/src/dashboard/section.module.css +0 -134
- package/src/dashboard/section.module.css.d.ts +0 -12
- package/src/dashboard/section.tsx +0 -380
- package/src/dashboard/settings-section.module.css +0 -54
- package/src/dashboard/settings-section.module.css.d.ts +0 -12
- package/src/dashboard/settings-section.tsx +0 -183
- package/src/dashboard/stat-card-parts.tsx +0 -149
- package/src/dashboard/stat-card.module.css +0 -508
- package/src/dashboard/stat-card.module.css.d.ts +0 -39
- package/src/dashboard/stat-card.tsx +0 -622
- package/src/dashboard/stat-group.module.css +0 -124
- package/src/dashboard/stat-group.module.css.d.ts +0 -9
- package/src/dashboard/stat-group.tsx +0 -113
- package/src/dashboard/stat-strip.module.css +0 -395
- package/src/dashboard/stat-strip.module.css.d.ts +0 -41
- package/src/dashboard/stat-strip.tsx +0 -506
- package/src/dashboard/visual-slot.ts +0 -27
- package/src/dashboard/widget-header.module.css +0 -486
- package/src/dashboard/widget-header.module.css.d.ts +0 -27
- package/src/dashboard/widget-header.tsx +0 -479
- package/src/dev-dock.tsx +0 -149
- package/src/format/date.ts +0 -250
- package/src/format/index.ts +0 -24
- package/src/format/measure.ts +0 -42
- package/src/forms/create-form.ts +0 -57
- package/src/forms/field.ts +0 -134
- package/src/forms/form-state.tsx +0 -94
- package/src/forms/index.ts +0 -18
- package/src/guard/fonts-hint.ts +0 -2
- package/src/guard/guard-hook.ts +0 -129
- package/src/guard/index.ts +0 -2848
- package/src/guard/palette.ts +0 -261
- package/src/guard/series-file.ts +0 -51
- package/src/guard/types.ts +0 -211
- package/src/guard/vx-names.ts +0 -228
- package/src/provider/create-router.tsx +0 -168
- package/src/provider/error-fallback.module.css +0 -10
- package/src/provider/error-fallback.module.css.d.ts +0 -8
- package/src/provider/fallback.module.css +0 -37
- package/src/provider/fallback.module.css.d.ts +0 -11
- package/src/provider/hotkeys.ts +0 -62
- package/src/provider/index.tsx +0 -574
- package/src/provider/lab-theme.ts +0 -175
- package/src/provider/modals-mount.tsx +0 -66
- package/src/provider/notifier.ts +0 -52
- package/src/provider/route-defaults.module.css +0 -39
- package/src/provider/route-defaults.module.css.d.ts +0 -10
- package/src/provider/route-defaults.tsx +0 -39
- package/src/provider/route-transition.ts +0 -199
- package/src/provider/slots.ts +0 -59
- package/src/provider/spotlight-actions.tsx +0 -73
- package/src/provider/spotlight-mount.tsx +0 -33
- package/src/provider/test-router.tsx +0 -25
- package/src/query-client.ts +0 -41
- package/src/router-tanstack/index.ts +0 -51
- package/src/router-tanstack/nav-stash.ts +0 -41
- package/src/router-tanstack/nav.ts +0 -216
- package/src/router-tanstack/search-store-warnings.ts +0 -120
- package/src/router-tanstack/search-store.ts +0 -599
- package/src/router-tanstack/use-nav.ts +0 -283
- package/src/shell/account-types.ts +0 -122
- package/src/shell/app-brand.module.css +0 -142
- package/src/shell/app-brand.module.css.d.ts +0 -14
- package/src/shell/app-brand.tsx +0 -141
- package/src/shell/app-breadcrumbs.tsx +0 -104
- package/src/shell/app-header.module.css +0 -171
- package/src/shell/app-header.module.css.d.ts +0 -12
- package/src/shell/app-main.module.css +0 -215
- package/src/shell/app-main.module.css.d.ts +0 -12
- package/src/shell/app-mobile-nav.module.css +0 -429
- package/src/shell/app-mobile-nav.module.css.d.ts +0 -24
- package/src/shell/app-mobile-nav.tsx +0 -864
- package/src/shell/app-sidebar-account.tsx +0 -180
- package/src/shell/app-sidebar.module.css +0 -812
- package/src/shell/app-sidebar.module.css.d.ts +0 -50
- package/src/shell/app-sidebar.tsx +0 -626
- package/src/shell/aside-docking.ts +0 -54
- package/src/shell/index.tsx +0 -658
- package/src/shell/mobile-nav-model.ts +0 -521
- package/src/shell/nav-count-badge.tsx +0 -44
- package/src/shell/nav-glyph.tsx +0 -38
- package/src/shell/nav-types.ts +0 -232
- package/src/shell/page-aside.module.css +0 -176
- package/src/shell/page-aside.module.css.d.ts +0 -14
- package/src/shell/page-aside.tsx +0 -433
- package/src/shell/page-bar.module.css +0 -256
- package/src/shell/page-bar.module.css.d.ts +0 -20
- package/src/shell/page-bar.tsx +0 -598
- package/src/shell/page-title.module.css +0 -35
- package/src/shell/page-title.module.css.d.ts +0 -11
- package/src/shell/page-title.tsx +0 -57
- package/src/shell/sidebar-block-model.ts +0 -91
- package/src/shell/sidebar-blocks.tsx +0 -326
- package/src/shell/sidebar-search.module.css +0 -102
- package/src/shell/sidebar-search.module.css.d.ts +0 -13
- package/src/shell/sidebar-search.tsx +0 -154
- package/src/shell/use-size-class.ts +0 -33
- package/src/state/fields.ts +0 -1279
- package/src/state/persisted-or-local.ts +0 -56
- package/src/state/persisted.ts +0 -320
- package/src/state.ts +0 -25
- package/src/styles.css +0 -477
- package/src/table/cell-kinds.module.css +0 -55
- package/src/table/cell-kinds.module.css.d.ts +0 -15
- package/src/table/cell-kinds.tsx +0 -263
- package/src/table/data-table-fold.tsx +0 -567
- package/src/table/data-table-state.ts +0 -230
- package/src/table/data-table.module.css +0 -474
- package/src/table/data-table.module.css.d.ts +0 -41
- package/src/table/data-table.tsx +0 -2232
- package/src/table/query-branch.ts +0 -53
- package/src/table/table-features.ts +0 -142
- package/src/telemetry.ts +0 -236
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +0 -2774
- package/src/theme/card-inset.module.css +0 -111
- package/src/theme/card-inset.module.css.d.ts +0 -9
- package/src/theme/chrome-vars.ts +0 -205
- package/src/theme/controls.module.css +0 -433
- package/src/theme/controls.module.css.d.ts +0 -20
- package/src/theme/ctl-theme.tsx +0 -169
- package/src/theme/extend.ts +0 -18
- package/src/theme/floating.module.css +0 -72
- package/src/theme/floating.module.css.d.ts +0 -12
- package/src/theme/icon-slot.module.css +0 -47
- package/src/theme/icon-slot.module.css.d.ts +0 -8
- package/src/theme/icon-slot.tsx +0 -59
- package/src/theme/index.ts +0 -1699
- package/src/theme/nav-link.module.css +0 -85
- package/src/theme/nav-link.module.css.d.ts +0 -8
- package/src/theme/segmented-control.module.css +0 -80
- package/src/theme/segmented-control.module.css.d.ts +0 -10
- package/src/theme/status-dot.module.css +0 -9
- package/src/theme/status-dot.module.css.d.ts +0 -8
- package/src/theme/status-dot.tsx +0 -31
- package/src/theme/status-verdict.module.css +0 -25
- package/src/theme/status-verdict.module.css.d.ts +0 -9
- package/src/theme/status-verdict.tsx +0 -36
- package/src/theme/theme-toggle.module.css +0 -30
- package/src/theme/theme-toggle.module.css.d.ts +0 -10
- package/src/theme/theme-toggle.tsx +0 -164
- package/src/theme/timeline.module.css +0 -29
- package/src/theme/timeline.module.css.d.ts +0 -9
- package/src/theme/use-basalt-spacing.ts +0 -40
- package/src/theme-lab/boot.ts +0 -140
- package/src/theme-lab/derive-controls.tsx +0 -231
- package/src/theme-lab/derive-state.ts +0 -164
- package/src/theme-lab/index.tsx +0 -229
- package/src/unwrap.ts +0 -44
- package/src/vite-boot.ts +0 -109
- package/src/vite-color-mix.ts +0 -137
- package/src/vite.ts +0 -899
- /package/dist/{agent/history.js → ai/contract.js} +0 -0
- /package/dist/{agent/outcome.js → astro/mdx/messages.js} +0 -0
- /package/dist/{controls/filter-base.js → cards/contract.js} +0 -0
- /package/dist/{controls/uncontrolled.js → charts/contract.js} +0 -0
- /package/dist/charts/{ticks.d.ts → core/ticks.d.ts} +0 -0
- /package/dist/charts/{heatmap-fill.d.ts → parts/heatmap-fill.d.ts} +0 -0
- /package/dist/charts/{heatmap-fill.js → parts/heatmap-fill.js} +0 -0
- /package/dist/{guard/types.js → content/contract.js} +0 -0
- /package/dist/{shell/account-types.js → controls/contract.js} +0 -0
- /package/dist/{shell/nav-types.js → core/mark-types.js} +0 -0
- /package/dist/{content → core}/slug.d.ts +0 -0
- /package/dist/{content → page}/toc-click-pin.d.ts +0 -0
- /package/dist/{content → page}/toc-spy.d.ts +0 -0
- /package/dist/{content → page}/toc-spy.js +0 -0
- /package/src/charts/{heatmap-fill.ts → parts/heatmap-fill.ts} +0 -0
- /package/src/{content → page}/toc-spy.ts +0 -0
package/configs/oxlint-plugin.js
DELETED
|
@@ -1,4382 +0,0 @@
|
|
|
1
|
-
// oxlint-disable import/no-default-export -- oxlint's JS plugin loader requires a default export
|
|
2
|
-
/**
|
|
3
|
-
* basalt — the shipped oxlint JS plugin (alpha `jsPlugins`, ESLint-v9-compatible `create(context)`
|
|
4
|
-
* API). Design-guard AST rules steering consumers onto the token/idiom system that `src/guard`
|
|
5
|
-
* (the regex-based `check-theme` CLI) cannot see from a raw-text scan alone, plus three
|
|
6
|
-
* independent architecture-boundary rules (see below).
|
|
7
|
-
*
|
|
8
|
-
* Ships inside `configs/` so the shipped preset (`configs/oxlint.json`) can reference it as
|
|
9
|
-
* `./oxlint-plugin.js` — a consumer `extends`-ing that preset inherits `jsPlugins` too, and the
|
|
10
|
-
* path resolves relative to the preset file, not the consumer's own config.
|
|
11
|
-
*
|
|
12
|
-
* The design-guard rules below support the same `theme-allow` escape as `src/guard`, and the same
|
|
13
|
-
* two-scope grammar: `theme-allow [<id>…] [— <why>]` at the START of a comment on the reported
|
|
14
|
-
* node's own line or the line above skips THAT node; `theme-allow-file <id>… — <why>` anywhere in
|
|
15
|
-
* the file skips every node of the named rules in it. Both halves are load-bearing — see
|
|
16
|
-
* {@link parseThemeAllows} for why the prefix matters and {@link hasFileDeclaration} for why file
|
|
17
|
-
* scope has to be spelled. The three boundary rules deliberately honour neither — see their own
|
|
18
|
-
* comment for why.
|
|
19
|
-
*
|
|
20
|
-
* ── The agent-chat guard rule (`agent-no-raw-usechat`) + `ai-sdk-major` ──
|
|
21
|
-
* These are also correctness/architecture boundaries, not design guidance, so they do NOT honour
|
|
22
|
-
* `theme-allow`. Both instead honour their own line-comment escape, `basalt-agent-allow`
|
|
23
|
-
* (`hasAgentAllow`, a copy of `hasThemeAllow` with a different needle) — deliberately a separate
|
|
24
|
-
* token, so a color exemption can never double as a license to switch off a streaming guard or an
|
|
25
|
-
* intentional `ai` major skew. `ai-sdk-major`'s escape is line-level and per-import, distinct from
|
|
26
|
-
* `basalt.aiMajorSkewReason` — the repo-wide, mandatory-reason config exemption for the SAME skew
|
|
27
|
-
* read by `doctor`'s `ai-major-parity` check (`src/cli/index.ts`): a lint run only ever sees one
|
|
28
|
-
* file, so there's no reason string to echo here, just a marker on the import that intentionally
|
|
29
|
-
* crosses the declared skew. `ai-sdk-major` is the one rule in this file that touches the
|
|
30
|
-
* filesystem (reads ancestor `package.json`s, memoized per directory so a lint run does one walk
|
|
31
|
-
* per directory, not per file) — every other rule here is pure AST + filename-string matching.
|
|
32
|
-
*
|
|
33
|
-
* ── The three boundary rules (`chart-engine-boundary` / `chart-host-single` / `token-layer-boundary`) ─────────
|
|
34
|
-
* These used to be one bundled `import-boundary` rule sharing a single on/off toggle — that meant
|
|
35
|
-
* a consumer disabling the one check they disagreed with silently dropped the other two as well.
|
|
36
|
-
* Each is now its own rule id with its own `meta`/`create`/registration, so a consumer can only
|
|
37
|
-
* turn one off explicitly, by name — never accidentally take out the others with it.
|
|
38
|
-
*
|
|
39
|
-
* `basalt/token-layer-boundary` is registered ONLY in the repo-local `.oxlintrc.json`, NOT in the
|
|
40
|
-
* shipped `configs/oxlint.json` preset — deliberately absent from what consumers inherit. It
|
|
41
|
-
* protects two things.
|
|
42
|
-
*
|
|
43
|
-
* 1. Layering: `src/tokens/**` is pure data (zero React, zero Mantine) that `cssVariablesResolver`
|
|
44
|
-
* (Mantine-coupled, `src/theme/**`) reads to bind Mantine's surfaces to the same `--vx-*` vars
|
|
45
|
-
* `src/charts/**` reads — chrome and charts are ONE source. If `tokens` imported `@mantine/*`
|
|
46
|
-
* that would cycle (`tokens → theme → tokens`); if `charts` imported `@mantine/*` a chart could
|
|
47
|
-
* read Mantine's theme directly instead of going through `--vx-*`, forking chrome and charts
|
|
48
|
-
* apart. The rule keeps that arrow pointing one way.
|
|
49
|
-
* 2. Packaging: `./charts` and `./tokens` resolve and render with NO `@mantine/*` installed — real
|
|
50
|
-
* and CI-tested, not aspirational (`scripts/pack-test.sh`'s "charts/tokens-only (no-Mantine)
|
|
51
|
-
* resolution + render" step scratch-installs the tarball with only react/react-dom and
|
|
52
|
-
* SSR-renders `basalt-ui/charts`; `scripts/check-dist-layering.mjs` walks the built dist graph
|
|
53
|
-
* and fails if those entries reach `@mantine/*`; the root barrel not re-exporting them is the
|
|
54
|
-
* third leg).
|
|
55
|
-
*
|
|
56
|
-
* The LAYER is Mantine-free — the FRAMEWORK is not: `.` requires Mantine (`@mantine/core`/
|
|
57
|
-
* `@mantine/hooks` are required, non-optional peers); it's just `./charts`/`./tokens` that don't.
|
|
58
|
-
* Both consequences govern basalt's OWN internal layering/packaging, not a consumer contract — a
|
|
59
|
-
* consumer's own `charts/`/`tokens/`-named directories carry no such obligation, which is why
|
|
60
|
-
* shipping this rule in the consumer preset would be meaningless.
|
|
61
|
-
*
|
|
62
|
-
* ── About the shipped `configs/oxlint.json` preset ────────────────────────────────────────────
|
|
63
|
-
* Consumers extend it from their own `.oxlintrc.json` via the node_modules-relative path:
|
|
64
|
-
* `{ "extends": ["./node_modules/basalt-ui/configs/oxlint.json"] }` — oxlint rejects bare
|
|
65
|
-
* specifiers, so the relative `./node_modules` path is required. NOTE: oxlint `extends` is
|
|
66
|
-
* per-glob last-writer-wins for `no-restricted-imports` — a base ban does NOT merge into an
|
|
67
|
-
* override glob, so any ban that must also hold inside an override is duplicated into that
|
|
68
|
-
* override, AND a consumer's own `no-restricted-imports` override on an overlapping glob silently
|
|
69
|
-
* REPLACES basalt's ban rather than merging with it. That is exactly why the chart-engine and token-layer charts/tokens boundaries live in plugin rules below instead of
|
|
70
|
-
* `no-restricted-imports`: a jsPlugin rule has its own rule id, so a consumer can only turn it off
|
|
71
|
-
* explicitly, by name — never silently. `configs/oxlint.json` is generated from `SURFACES` by
|
|
72
|
-
* `scripts/gen-oxlint.ts` (`--check` is the CI drift gate) — its top-level keys are limited to what
|
|
73
|
-
* oxlint's own parser accepts (see `ALLOWED_TOP_LEVEL_KEYS` in that script); do not add ad hoc keys
|
|
74
|
-
* to that file.
|
|
75
|
-
*/
|
|
76
|
-
import { existsSync, readFileSync } from 'node:fs'
|
|
77
|
-
import { dirname, resolve as resolvePath } from 'node:path'
|
|
78
|
-
import { fileURLToPath } from 'node:url'
|
|
79
|
-
|
|
80
|
-
// ── Shared helpers ──────────────────────────────────────────────────────────────────────────────
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Guard kinds and plugin rules RETIRED — kept recognized by `KNOWN_RULE_IDS` (below) and the
|
|
84
|
-
* guard's own `PLUGIN_RULE_IDS` copy so an existing `theme-allow <id>` reads as a dead waiver via
|
|
85
|
-
* `check-theme --audit-allows`, never as a typo.
|
|
86
|
-
*
|
|
87
|
-
* - `unframed-chart` (regex: a `<ChartLegend items={[...]}>` array literal) →
|
|
88
|
-
* `basalt/chart-legend-literal`, itself retired in 2.0 with the public `ChartLegend`.
|
|
89
|
-
* - `duplicate-notifications-mount` — its only case, `<BasaltNotifications />` mounted beside
|
|
90
|
-
* `<BasaltOverlays notifications>`, is unreachable now that `BasaltNotifications` no longer
|
|
91
|
-
* exists as a standalone export; the rule had nothing left to fire on.
|
|
92
|
-
* - `query-dual-import` — its whole premise (a raw `@tanstack/react-query` import beside
|
|
93
|
-
* `basalt-ui/query`) is unreachable now that C1 (1.29.0) dropped the `./query` subpath: a
|
|
94
|
-
* consumer MUST import `@tanstack/react-query` directly, so the rule warned on every such
|
|
95
|
-
* import instead of the drift it was written to catch.
|
|
96
|
-
*/
|
|
97
|
-
export const RETIRED_RULE_IDS = new Set([
|
|
98
|
-
'unframed-chart',
|
|
99
|
-
// 2.0 (V2-SPEC § 9.8): the visx lint/guard layer, replaced by `chart-engine-boundary` or made
|
|
100
|
-
// unrepresentable by the rung.
|
|
101
|
-
'visx-boundary',
|
|
102
|
-
'visx-tooltip',
|
|
103
|
-
'hand-rolled-plot',
|
|
104
|
-
'chart-legend-literal',
|
|
105
|
-
'raw-visx-axis',
|
|
106
|
-
'chart-missing-aria-label',
|
|
107
|
-
'duplicate-notifications-mount',
|
|
108
|
-
'query-dual-import',
|
|
109
|
-
// 2.0 (V2-SPEC § 3): the concern is unrepresentable.
|
|
110
|
-
'provider-above-router', // BasaltProvider mounts RouterProvider
|
|
111
|
-
'page-bar-budget', // PageBarActions / SectionActions tuple types
|
|
112
|
-
'agent-resume-guard', // resumeStream only exists on useChat/Chat, banned by agent-no-raw-usechat
|
|
113
|
-
'deprecated-export', // 2.0.0 ships no deprecations; returns with the first 2.x one
|
|
114
|
-
])
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Rule ids a `theme-allow` may name — this plugin's own rules plus `src/guard`'s kinds. Duplicated
|
|
118
|
-
* by hand for the same reason `majorOf` is: this file loads standalone out of a consumer's
|
|
119
|
-
* node_modules and must not import from the package.
|
|
120
|
-
*
|
|
121
|
-
* Exported, and `oxlint-plugin.test.ts` asserts it is EXACTLY the plugin's own rule ids plus
|
|
122
|
-
* `GUARD_RULES`'s keys plus `RETIRED_RULE_IDS`. Forgetting an entry here is not a cosmetic
|
|
123
|
-
* omission — an id this set does not know is treated as a typo, so the annotation naming it waives
|
|
124
|
-
* nothing (see {@link parseThemeAllow}); before the fail-closed change it was worse still, silently
|
|
125
|
-
* widening to a blanket waiver.
|
|
126
|
-
*/
|
|
127
|
-
export const KNOWN_RULE_IDS = new Set([
|
|
128
|
-
// this plugin
|
|
129
|
-
'no-raw-font-size',
|
|
130
|
-
'raw-size-literal',
|
|
131
|
-
'card-inset',
|
|
132
|
-
'chart-in-raw-surface',
|
|
133
|
-
'hand-rolled-shell',
|
|
134
|
-
'shadow-basalt-export',
|
|
135
|
-
'raw-scroll-container',
|
|
136
|
-
'hand-rolled-filter',
|
|
137
|
-
'control-outside-home',
|
|
138
|
-
'bound-control-outside-home',
|
|
139
|
-
'control-size-literal',
|
|
140
|
-
'responsive-twin',
|
|
141
|
-
'search-literal-link',
|
|
142
|
-
'use-search-from-literal',
|
|
143
|
-
'query-dual-import',
|
|
144
|
-
'query-fn-unwrap',
|
|
145
|
-
'forms-field-key',
|
|
146
|
-
// `in-body-page-title` is BOTH a plugin rule and a guard kind — one id, two lanes, so one
|
|
147
|
-
// annotation waives both. It is listed once, below, with the guard kinds.
|
|
148
|
-
'chart-engine-boundary',
|
|
149
|
-
'chart-host-single',
|
|
150
|
-
'token-layer-boundary',
|
|
151
|
-
'no-import-meta-env',
|
|
152
|
-
'raw-breakpoint',
|
|
153
|
-
'no-dev-helper',
|
|
154
|
-
'route-view-transition',
|
|
155
|
-
'status-fill-as-text',
|
|
156
|
-
// These two honour `basalt-agent-allow`, never `theme-allow` — but they are real ids, so an
|
|
157
|
-
// annotation naming one must parse as a (useless) scoped annotation rather than as prose.
|
|
158
|
-
'agent-no-raw-usechat',
|
|
159
|
-
'ai-sdk-major',
|
|
160
|
-
// src/guard kinds
|
|
161
|
-
'raw-hex',
|
|
162
|
-
'raw-color-fn',
|
|
163
|
-
'localstorage-theme',
|
|
164
|
-
'off-identity-accent',
|
|
165
|
-
'mantine-shade-index',
|
|
166
|
-
'raw-spacing',
|
|
167
|
-
'raw-radius',
|
|
168
|
-
'raw-surface',
|
|
169
|
-
'card-with-border',
|
|
170
|
-
'off-system-surface-var',
|
|
171
|
-
'raw-html-layout',
|
|
172
|
-
'inline-spacing',
|
|
173
|
-
'inline-display',
|
|
174
|
-
'raw-motion-value',
|
|
175
|
-
'raw-form-control',
|
|
176
|
-
'sub-16-input-font',
|
|
177
|
-
'raw-font-family',
|
|
178
|
-
'theme-allow-unscoped',
|
|
179
|
-
'surface-shadow-override',
|
|
180
|
-
'css-raw-surface',
|
|
181
|
-
'inline-font-size',
|
|
182
|
-
'hidden-inline-style',
|
|
183
|
-
'in-body-page-title',
|
|
184
|
-
'raw-selection-control',
|
|
185
|
-
'raw-media-query',
|
|
186
|
-
'unknown-vx-token',
|
|
187
|
-
'series-palette',
|
|
188
|
-
// Retired guard kinds — no longer in GUARD_RULES, but a `theme-allow` naming one must still
|
|
189
|
-
// parse as a real (dead) waiver rather than an unknown-id typo. See RETIRED_RULE_IDS above.
|
|
190
|
-
...RETIRED_RULE_IDS,
|
|
191
|
-
])
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* ONE LAW, TWO RULE IDS — the ids that waive each other, in BOTH directions.
|
|
195
|
-
*
|
|
196
|
-
* `basalt/control-outside-home` (this plugin, AST) and `raw-selection-control` (`src/guard`'s text
|
|
197
|
-
* lane) are the same law read by two engines, and the guard's own message says so. They could not
|
|
198
|
-
* share one id the way `in-body-page-title` does, because the two lanes disagree often enough that
|
|
199
|
-
* a consumer needs to be able to name which one they are waiving — but a consumer waiving the law
|
|
200
|
-
* should not have to know that, and before this map they did: `theme-allow control-outside-home`
|
|
201
|
-
* silenced oxlint and left check-theme reporting, so the only working annotation was
|
|
202
|
-
* `theme-allow raw-selection-control control-outside-home` — two ids, undocumented, discovered one
|
|
203
|
-
* debug cycle per consumer.
|
|
204
|
-
*
|
|
205
|
-
* Mirrored VERBATIM by `src/guard`'s copy (this file must not import from the package — see the
|
|
206
|
-
* header); `check-source.test.ts` asserts the two agree. An alias only ever WIDENS what an
|
|
207
|
-
* annotation covers, so a waiver can never become stricter by being spelled the other way.
|
|
208
|
-
*/
|
|
209
|
-
export const WAIVER_ID_ALIASES = {
|
|
210
|
-
'control-outside-home': ['raw-selection-control'],
|
|
211
|
-
'raw-selection-control': ['control-outside-home'],
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
const ALLOW_RULE_TOKEN = /^(?:basalt\/)?([a-z][a-z0-9-]*)(?=$|[\s,:—–])/
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* The annotation token, with its optional `-file` suffix.
|
|
218
|
-
*
|
|
219
|
-
* `(?![\w-])` keeps the two forms apart AND stops a longer word from parsing as the bare form:
|
|
220
|
-
* `theme-allow-unscoped` — the KIND NAME, written in prose constantly — used to consume no id, fall
|
|
221
|
-
* through to `rules: []` and read as a blanket waiver.
|
|
222
|
-
*/
|
|
223
|
-
const ALLOW_TOKEN = /theme-allow(-file)?(?![\w-])/
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Everything permitted between the start of a line INSIDE the comment and the token.
|
|
227
|
-
*
|
|
228
|
-
* The annotation has to START its comment (or a line of one — the `*` is a block-comment gutter).
|
|
229
|
-
* Without this the parser did a bare `indexOf('theme-allow')`, so a comment that merely MENTIONED
|
|
230
|
-
* the token in prose parsed as the blanket form and switched every rule off on the node below it.
|
|
231
|
-
* linewatch documented its own waivers in a docblock and thereby disarmed the file: a false
|
|
232
|
-
* NEGATIVE, and worse than the whole-file hole 1.20.0 closed. `src/guard`'s `ANNOTATION_PREFIX` is
|
|
233
|
-
* the same test against raw source text (which still carries its `//` / `/*` opener; a comment
|
|
234
|
-
* NODE's `value` does not, hence the two spellings).
|
|
235
|
-
*/
|
|
236
|
-
const ALLOW_LINE_PREFIX = /^\s*\*?\s*$/
|
|
237
|
-
|
|
238
|
-
/** Parse the text following the token — the leading known ids; the rest is the reason. */
|
|
239
|
-
function parseAllowBody(rest, scope) {
|
|
240
|
-
let remainder = rest.replace(/^[\s,]+/, '')
|
|
241
|
-
const rules = []
|
|
242
|
-
for (;;) {
|
|
243
|
-
const token = ALLOW_RULE_TOKEN.exec(remainder)
|
|
244
|
-
if (token === null || !KNOWN_RULE_IDS.has(token[1])) break
|
|
245
|
-
rules.push(token[1])
|
|
246
|
-
remainder = remainder.slice(token[0].length).replace(/^[\s,]+/, '')
|
|
247
|
-
}
|
|
248
|
-
return { rules, scope }
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Every annotation one comment carries. A docblock can hold more than one, so this returns a list.
|
|
253
|
-
*
|
|
254
|
-
* The grammar, and it is the same one `src/guard` parses:
|
|
255
|
-
*
|
|
256
|
-
* ```text
|
|
257
|
-
* theme-allow → nothing (a bare annotation waives no rule)
|
|
258
|
-
* theme-allow <id>[, <id>…] [— <why>] → this node, those rules
|
|
259
|
-
* theme-allow-file <id>[, <id>…] — <why> → the WHOLE FILE, those rules
|
|
260
|
-
* ```
|
|
261
|
-
*
|
|
262
|
-
* An empty `rules` is the bare form and covers nothing; a non-empty `rules` scopes the exception to
|
|
263
|
-
* exactly those ids. A word that names no known rule ends the id list, so `theme-allow raw-hexx —
|
|
264
|
-
* reason` waives nothing, and `theme-allow raw-surface sub-scale legend corner` reads `sub-scale`
|
|
265
|
-
* as prose. A prose reason is introduced with a separator (`—`, `–`, `-`, `:`).
|
|
266
|
-
*/
|
|
267
|
-
function parseThemeAllows(commentValue) {
|
|
268
|
-
const out = []
|
|
269
|
-
for (const rawLine of commentValue.split('\n')) {
|
|
270
|
-
const token = ALLOW_TOKEN.exec(rawLine)
|
|
271
|
-
if (token === null) continue
|
|
272
|
-
if (!ALLOW_LINE_PREFIX.test(rawLine.slice(0, token.index))) continue
|
|
273
|
-
const rest = rawLine.slice(token.index + token[0].length)
|
|
274
|
-
out.push(parseAllowBody(rest, token[1] === undefined ? 'line' : 'file'))
|
|
275
|
-
}
|
|
276
|
-
return out
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Does one annotation cover `ruleId`?
|
|
281
|
-
*
|
|
282
|
-
* Only the ids the annotation names (or their {@link WAIVER_ID_ALIASES}). A bare annotation, at
|
|
283
|
-
* node or file scope, covers nothing.
|
|
284
|
-
*/
|
|
285
|
-
function allowCovers(allow, ruleId) {
|
|
286
|
-
return (
|
|
287
|
-
allow.rules.includes(ruleId) ||
|
|
288
|
-
(WAIVER_ID_ALIASES[ruleId] ?? []).some((alias) => allow.rules.includes(alias))
|
|
289
|
-
)
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
function allComments(context) {
|
|
293
|
-
const sourceCode = context.sourceCode ?? context.getSourceCode?.()
|
|
294
|
-
return sourceCode?.getAllComments?.() ?? []
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Every comment that REACHES `nodeLine` — the comment on the node's own line, the one directly
|
|
299
|
-
* above it, and any further comment separated from that one by nothing but comment.
|
|
300
|
-
*
|
|
301
|
-
* This is the plugin's half of "which node does this annotation scope to", and it has to answer the
|
|
302
|
-
* same question `src/guard`'s forward walk answers: **an annotation reaches the first line below its
|
|
303
|
-
* comment that is not itself comment.** The test used to be a flat `end.line === nodeLine ||
|
|
304
|
-
* nodeLine - 1`, which is the same rule only when the annotation is the LAST comment above the node
|
|
305
|
-
* — so anything sitting between the annotation and the node, comment included, was reported here
|
|
306
|
-
* while the guard waived it:
|
|
307
|
-
*
|
|
308
|
-
* ```text
|
|
309
|
-
* // theme-allow raw-hex — the vendor brand hex, kept in sync with ← a reason that wrapped
|
|
310
|
-
* // the marketing site's own palette onto a second comment
|
|
311
|
-
* const BRAND = '#ff0000'
|
|
312
|
-
*
|
|
313
|
-
* {/* theme-allow card-inset — … *\/}
|
|
314
|
-
* {/* 3. the density row *\/} ← an unrelated note
|
|
315
|
-
* <Card p={0} />
|
|
316
|
-
* ```
|
|
317
|
-
*
|
|
318
|
-
* The wrapped-reason one is not hypothetical: it is pinned in the guard's tests as a shape argo
|
|
319
|
-
* writes. A blank line still separates, because a blank line is not comment — which is what makes
|
|
320
|
-
* "this comment is not about the next statement" expressible in both halves.
|
|
321
|
-
*
|
|
322
|
-
* Returned bottom-up, which is also the cheap order to walk: stop at the first gap.
|
|
323
|
-
*/
|
|
324
|
-
function reachingComments(context, nodeLine) {
|
|
325
|
-
const comments = allComments(context).toSorted((a, b) => a.loc.start.line - b.loc.start.line)
|
|
326
|
-
const out = []
|
|
327
|
-
let reach = nodeLine
|
|
328
|
-
for (let i = comments.length - 1; i >= 0; i--) {
|
|
329
|
-
const comment = comments[i]
|
|
330
|
-
if (comment.loc.end.line > nodeLine) continue
|
|
331
|
-
if (comment.loc.end.line < reach - 1) break
|
|
332
|
-
out.push(comment)
|
|
333
|
-
reach = Math.min(reach, comment.loc.start.line)
|
|
334
|
-
}
|
|
335
|
-
return out
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* True when a NODE-scoped `theme-allow` covering `ruleId` reaches `node` (see
|
|
340
|
-
* {@link reachingComments}) — or when the file carries a `theme-allow-file` declaration for it.
|
|
341
|
-
*
|
|
342
|
-
* The `ruleId` argument is what stops one exemption from being a blanket one: a `theme-allow
|
|
343
|
-
* raw-hex — …` written for a color no longer silently switches off `card-inset` on the same line.
|
|
344
|
-
* An annotation that reached for an id and missed covers only the ids it got right.
|
|
345
|
-
*/
|
|
346
|
-
function hasThemeAllow(context, node, ruleId) {
|
|
347
|
-
if (hasFileDeclaration(context, ruleId)) return true
|
|
348
|
-
return reachingComments(context, node.loc.start.line).some((comment) =>
|
|
349
|
-
parseThemeAllows(comment.value).some(
|
|
350
|
-
(allow) => allow.scope === 'line' && allowCovers(allow, ruleId),
|
|
351
|
-
),
|
|
352
|
-
)
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* True when the FILE carries a written declaration for `ruleId` — a `theme-allow-file` naming it,
|
|
357
|
-
* anywhere in the file.
|
|
358
|
-
*
|
|
359
|
-
* File scope has to be SPELLED, and that is the second half of the 1.20.0 fix rather than a new
|
|
360
|
-
* idea. The first half landed: `hand-rolled-plot` stopped granting a whole file permanent immunity
|
|
361
|
-
* off any comment that happened to sit on its first assembly node, and now reports every node. The
|
|
362
|
-
* second half did not, because the promotion rule was "names a rule AND gives a reason" — which is
|
|
363
|
-
* exactly what the rule's own message asks a consumer to write, and what `theme-allow-unscoped`
|
|
364
|
-
* reports them for omitting. So there was one legal annotation shape and it was whole-file:
|
|
365
|
-
* `hasFileDeclaration` still returned early for every node, forever. linewatch ended up with one
|
|
366
|
-
* whole-file declaration per chart file — the thing 1.20.0 set out to eliminate — because per-node
|
|
367
|
-
* scoping was not expressible. Now it is: `theme-allow` is the node, `theme-allow-file` is the file.
|
|
368
|
-
*/
|
|
369
|
-
function hasFileDeclaration(context, ruleId) {
|
|
370
|
-
return allComments(context).some((comment) =>
|
|
371
|
-
parseThemeAllows(comment.value).some(
|
|
372
|
-
(allow) => allow.scope === 'file' && allow.rules.includes(ruleId),
|
|
373
|
-
),
|
|
374
|
-
)
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Test/spec files — design guidance does not apply to a fixture. Mirrors `src/cli`'s own SKIP, plus
|
|
379
|
-
* a `test/`/`tests/` directory (1.32.1): a test-setup polyfill (`tests/setup/dom.ts` stubbing
|
|
380
|
-
* `window.matchMedia`) is neither a `.test` file nor under `__tests__`, and needed a waiver.
|
|
381
|
-
*/
|
|
382
|
-
const TEST_FILE = /\.(?:test|spec)\.[cm]?[jt]sx?$|(?:^|[\\/])(?:__tests__|tests?)[\\/]/
|
|
383
|
-
|
|
384
|
-
function isTestFile(context) {
|
|
385
|
-
return TEST_FILE.test(getFilename(context))
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
/**
|
|
389
|
-
* True when a `basalt-agent-allow` line comment sits on `node`'s own source line or the line above
|
|
390
|
-
* it. A copy of `hasThemeAllow` with a different needle — deliberately NOT the same token, so a
|
|
391
|
-
* color exemption can never double as a license to switch off a streaming guard (see the file-header
|
|
392
|
-
* comment for the two agent-chat rules).
|
|
393
|
-
*/
|
|
394
|
-
function hasAgentAllow(context, node) {
|
|
395
|
-
const sourceCode = context.sourceCode ?? context.getSourceCode?.()
|
|
396
|
-
const comments = sourceCode?.getAllComments?.() ?? []
|
|
397
|
-
const nodeLine = node.loc.start.line
|
|
398
|
-
return comments.some(
|
|
399
|
-
(comment) =>
|
|
400
|
-
comment.value.includes('basalt-agent-allow') &&
|
|
401
|
-
(comment.loc.end.line === nodeLine || comment.loc.end.line === nodeLine - 1),
|
|
402
|
-
)
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
function getFilename(context) {
|
|
406
|
-
return context.filename ?? context.getFilename?.() ?? ''
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
function isNumericLiteral(node) {
|
|
410
|
-
return node !== null && node.type === 'Literal' && typeof node.value === 'number'
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* An absolute CSS length written as a STRING — `'10px'`, `"1.5rem"`, `'0.75em'`.
|
|
415
|
-
*
|
|
416
|
-
* Mantine's `size` / `fz` props accept a scale token (`"xs"`…`"xl"`) OR any CSS length, and the
|
|
417
|
-
* second form is the one that leaves the token system. A string is not a numeric literal, so every
|
|
418
|
-
* `size="10px"` in an app slipped past the numeric-only check these two rules used to be.
|
|
419
|
-
*
|
|
420
|
-
* `em`/relative ratios are included on `size` (a `2em` icon is still an off-scale dimension) but
|
|
421
|
-
* the message names the right escape for each rule, so the two are not merged into one check.
|
|
422
|
-
*/
|
|
423
|
-
const CSS_LENGTH_STRING = /^-?\d*\.?\d+(?:px|rem|em)$/
|
|
424
|
-
|
|
425
|
-
function isCssLengthString(node) {
|
|
426
|
-
return (
|
|
427
|
-
node !== null &&
|
|
428
|
-
node.type === 'Literal' &&
|
|
429
|
-
typeof node.value === 'string' &&
|
|
430
|
-
CSS_LENGTH_STRING.test(node.value.trim())
|
|
431
|
-
)
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
/** Unwraps a JSXExpressionContainer to its inner expression; passes any other node through. */
|
|
435
|
-
function unwrapExpressionContainer(node) {
|
|
436
|
-
return node !== null && node.type === 'JSXExpressionContainer' ? node.expression : node
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
// ── Rule 1 — no-raw-font-size ───────────────────────────────────────────────────────────────────
|
|
440
|
-
|
|
441
|
-
const NO_RAW_FONT_SIZE_MESSAGE =
|
|
442
|
-
'Raw font-size literal — route through VX.text.* (numbers) or --vx-text-* (CSS); em/relative ' +
|
|
443
|
-
'ratios are allowed. (basalt/no-raw-font-size)'
|
|
444
|
-
|
|
445
|
-
/** JSX attributes whose value IS a style object — the only object literals this rule reaches into. */
|
|
446
|
-
const STYLE_ATTRS = new Set(['style', 'styles', 'sx'])
|
|
447
|
-
/** A binding or key whose name says the object is styling — `wrapperStyle`, `styles`, `rowStyles`. */
|
|
448
|
-
const STYLE_NAME = /styles?$/i
|
|
449
|
-
/** How far up the tree the style-context walk goes before giving up. */
|
|
450
|
-
const STYLE_CONTEXT_MAX_DEPTH = 12
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* Is this object property part of a STYLE object?
|
|
454
|
-
*
|
|
455
|
-
* `fontSize` is not a reserved word. The rule used to report every object property spelled that
|
|
456
|
-
* way, which fired on an Obsidian `data.json` fixture — `{ settings: { fontSize: 16 } }` inside a
|
|
457
|
-
* string, in a package with no React and no Mantine — where the "route it through VX.text.*" advice
|
|
458
|
-
* is not merely unhelpful, it is about a different domain. Requiring a style context (a
|
|
459
|
-
* `style`/`styles`/`sx` JSX attribute, a `…Style(s)` binding or key, or a `CSSProperties`
|
|
460
|
-
* annotation) keeps every shape that is really styling and drops the ones that never reach CSS.
|
|
461
|
-
*/
|
|
462
|
-
function isInStyleContext(context, node) {
|
|
463
|
-
const sourceCode = context.sourceCode ?? context.getSourceCode?.()
|
|
464
|
-
let current = node.parent
|
|
465
|
-
for (let depth = 0; current !== undefined && current !== null; depth++) {
|
|
466
|
-
if (depth > STYLE_CONTEXT_MAX_DEPTH) return false
|
|
467
|
-
if (current.type === 'JSXAttribute') return STYLE_ATTRS.has(current.name?.name)
|
|
468
|
-
if (current.type === 'Property') {
|
|
469
|
-
const key = current.key
|
|
470
|
-
const name = key?.type === 'Identifier' ? key.name : key?.value
|
|
471
|
-
if (typeof name === 'string' && STYLE_NAME.test(name)) return true
|
|
472
|
-
}
|
|
473
|
-
if (current.type === 'VariableDeclarator') {
|
|
474
|
-
const id = current.id
|
|
475
|
-
if (typeof id?.name === 'string' && STYLE_NAME.test(id.name)) return true
|
|
476
|
-
const annotation = id?.typeAnnotation
|
|
477
|
-
return (
|
|
478
|
-
annotation !== undefined &&
|
|
479
|
-
annotation !== null &&
|
|
480
|
-
(sourceCode?.getText?.(annotation) ?? '').includes('CSSProperties')
|
|
481
|
-
)
|
|
482
|
-
}
|
|
483
|
-
if (current.type === 'FunctionDeclaration' || current.type === 'Program') return false
|
|
484
|
-
current = current.parent
|
|
485
|
-
}
|
|
486
|
-
return false
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* No `/src/tokens/` exemption, and none is needed: both rules below only ever visit `JSXAttribute`/
|
|
491
|
-
* `Property` nodes, and `src/tokens/**` is pure data — `.ts`, never `.tsx`, zero React — so the
|
|
492
|
-
* visitor structurally cannot fire there. A path-based exemption used to sit here gated on
|
|
493
|
-
* `isBasaltScopedFile`, which tests "does the nearest package.json depend on basalt-ui", not
|
|
494
|
-
* "is this file basalt's own" — a consumer package that merely depends on basalt-ui could put raw
|
|
495
|
-
* literals under its own `src/tokens/` and silence both rules. Deleting the exemption is simpler
|
|
496
|
-
* than re-gating it on package identity: the simplest gate is no gate.
|
|
497
|
-
*/
|
|
498
|
-
// Ships: error
|
|
499
|
-
const noRawFontSize = {
|
|
500
|
-
meta: {
|
|
501
|
-
type: 'suggestion',
|
|
502
|
-
docs: {
|
|
503
|
-
description: 'Disallow hardcoded numeric font sizes outside the token system.',
|
|
504
|
-
},
|
|
505
|
-
schema: [],
|
|
506
|
-
},
|
|
507
|
-
create(context) {
|
|
508
|
-
if (isTestFile(context)) return {}
|
|
509
|
-
|
|
510
|
-
return {
|
|
511
|
-
JSXAttribute(node) {
|
|
512
|
-
const name = node.name?.name
|
|
513
|
-
if (name !== 'fz' && name !== 'fontSize') return
|
|
514
|
-
const value = unwrapExpressionContainer(node.value)
|
|
515
|
-
if (!isNumericLiteral(value)) return
|
|
516
|
-
if (hasThemeAllow(context, node, 'no-raw-font-size')) return
|
|
517
|
-
context.report({ node, message: NO_RAW_FONT_SIZE_MESSAGE })
|
|
518
|
-
},
|
|
519
|
-
Property(node) {
|
|
520
|
-
const key = node.key
|
|
521
|
-
const isFontSizeKey =
|
|
522
|
-
(key.type === 'Identifier' && key.name === 'fontSize') ||
|
|
523
|
-
(key.type === 'Literal' && key.value === 'fontSize')
|
|
524
|
-
if (!isFontSizeKey) return
|
|
525
|
-
if (!isNumericLiteral(node.value)) return
|
|
526
|
-
if (!isInStyleContext(context, node)) return
|
|
527
|
-
if (hasThemeAllow(context, node, 'no-raw-font-size')) return
|
|
528
|
-
context.report({ node, message: NO_RAW_FONT_SIZE_MESSAGE })
|
|
529
|
-
},
|
|
530
|
-
}
|
|
531
|
-
},
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
// ── Rule 2 — raw-size-literal ───────────────────────────────────────────────────────────────────
|
|
535
|
-
|
|
536
|
-
const RAW_SIZE_LITERAL_MESSAGE =
|
|
537
|
-
'Raw CSS length on a size prop — use the scale ("xs".."xl"), or fz={VX.text.*} when the type ' +
|
|
538
|
-
'scale has no step for it. (basalt/raw-size-literal)'
|
|
539
|
-
|
|
540
|
-
/** The size-ish JSX props a CSS-length string can leave the token system through. */
|
|
541
|
-
const SIZE_ATTRS = new Set(['size', 'fz', 'fontSize'])
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* A CSS length written as a STRING on a size prop — `<Text size="10px">`, `<ThemeIcon size="2rem">`,
|
|
545
|
-
* `<Text fz="0.8rem">`. This is the hole `no-raw-font-size` left open: it only ever tested for a
|
|
546
|
-
* NUMERIC literal, so every string form walked straight past it.
|
|
547
|
-
*
|
|
548
|
-
* Its own rule id rather than a widening of `no-raw-font-size`, for two reasons. It covers `size`,
|
|
549
|
-
* which is not always a font size — on `Text` it is, on `ThemeIcon`/`ActionIcon` it is a box
|
|
550
|
-
* dimension — so one shared id would mean a consumer silencing the icon case also silences every
|
|
551
|
-
* off-scale font size, the bundled-rule mistake the three boundary rules were split apart to avoid.
|
|
552
|
-
* And a separate id can carry its own severity: this rule ships `error` in the consumer preset —
|
|
553
|
-
* it is a NEW form the sibling rule never caught (a numeric-only check let every string form walk
|
|
554
|
-
* straight past it), not a narrowing of code that previously passed, so the grace-minor doctrine in
|
|
555
|
-
* the package MAINTAINING.md does not apply to it. Widening `no-raw-font-size` in place would have meant
|
|
556
|
-
* the widened check inherited whatever level the sibling id already carried, with no way to give
|
|
557
|
-
* this specific form its own severity.
|
|
558
|
-
*
|
|
559
|
-
* Numeric `size={32}` is deliberately NOT flagged. It is the documented Mantine idiom for icon
|
|
560
|
-
* dimensions and flagging it would fire on nearly every icon in an app for no design-system gain —
|
|
561
|
-
* the token system has an opinion about type scale and spacing, not about how many pixels wide one
|
|
562
|
-
* glyph box is.
|
|
563
|
-
*/
|
|
564
|
-
// Ships: error
|
|
565
|
-
const rawSizeLiteral = {
|
|
566
|
-
meta: {
|
|
567
|
-
type: 'suggestion',
|
|
568
|
-
docs: {
|
|
569
|
-
description: 'Disallow raw CSS-length strings on size/fz/fontSize props.',
|
|
570
|
-
},
|
|
571
|
-
schema: [],
|
|
572
|
-
},
|
|
573
|
-
create(context) {
|
|
574
|
-
if (isTestFile(context)) return {}
|
|
575
|
-
|
|
576
|
-
return {
|
|
577
|
-
JSXAttribute(node) {
|
|
578
|
-
const name = node.name?.name
|
|
579
|
-
if (typeof name !== 'string' || !SIZE_ATTRS.has(name)) return
|
|
580
|
-
const value = unwrapExpressionContainer(node.value)
|
|
581
|
-
if (!isCssLengthString(value)) return
|
|
582
|
-
if (hasThemeAllow(context, node, 'raw-size-literal')) return
|
|
583
|
-
context.report({ node, message: RAW_SIZE_LITERAL_MESSAGE })
|
|
584
|
-
},
|
|
585
|
-
}
|
|
586
|
-
},
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
// ── Rule 3 — card-inset ─────────────────────────────────────────────────────────────────────────
|
|
590
|
-
|
|
591
|
-
const CARD_TAGS = new Set(['Card', 'Paper'])
|
|
592
|
-
|
|
593
|
-
// The THEME owns the inset (Wave 35): a bare Card/Paper resolves to the level-0 12/16 pair
|
|
594
|
-
// (`cardInsetY`/`cardInsetX` = `SPACE_SCALE.sm`/`.md`; `tokens/space-scale.test.ts` pins that), so
|
|
595
|
-
// the idiom is to write nothing. The pair spelled out (`py="sm" px="md"`) is therefore REDUNDANT, any
|
|
596
|
-
// other explicit inset/radius is off-idiom, and flush is `variant="flush"` (whole card) or
|
|
597
|
-
// `Card.Section` (a full-bleed region of a padded card). `p`/`padding` take one value, so no
|
|
598
|
-
// uniform form can equal the 12/16 pair — they are always off-idiom.
|
|
599
|
-
export const CARD_INSET_PY = 'sm'
|
|
600
|
-
export const CARD_INSET_PX = 'md'
|
|
601
|
-
const CARD_INSET_MESSAGE =
|
|
602
|
-
'Card/Paper is off the card idiom — the theme owns the 12/16 inset and radius, so write no ' +
|
|
603
|
-
'p/padding/py/px/radius. Flush whole card: variant="flush"; full-bleed region in a padded card: ' +
|
|
604
|
-
'<Card.Section>; a deliberate exception: {/* theme-allow card-inset — reason */}. The older ' +
|
|
605
|
-
'py="xs" px="sm" idiom is off-idiom too — delete it. (basalt/card-inset)'
|
|
606
|
-
const CARD_INSET_REDUNDANT_MESSAGE =
|
|
607
|
-
'Card/Paper inset is redundant — the theme owns it (12/16, density-scaled); delete ' +
|
|
608
|
-
'py="sm" px="md". (basalt/card-inset)'
|
|
609
|
-
|
|
610
|
-
function isStringLiteral(node) {
|
|
611
|
-
return node !== null && node.type === 'Literal' && typeof node.value === 'string'
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
function attrValue(attr) {
|
|
615
|
-
return unwrapExpressionContainer(attr.value)
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
// Ships: error
|
|
619
|
-
const cardInset = {
|
|
620
|
-
meta: {
|
|
621
|
-
type: 'suggestion',
|
|
622
|
-
docs: {
|
|
623
|
-
description: 'Steer Card/Paper padding and radius onto the shipped card idiom.',
|
|
624
|
-
},
|
|
625
|
-
schema: [],
|
|
626
|
-
},
|
|
627
|
-
create(context) {
|
|
628
|
-
return {
|
|
629
|
-
JSXOpeningElement(node) {
|
|
630
|
-
if (!CARD_TAGS.has(node.name?.name)) return
|
|
631
|
-
|
|
632
|
-
/** @type {Map<string, any>} */
|
|
633
|
-
const attrs = new Map()
|
|
634
|
-
for (const attr of node.attributes) {
|
|
635
|
-
if (attr.type === 'JSXAttribute' && typeof attr.name?.name === 'string') {
|
|
636
|
-
attrs.set(attr.name.name, attr)
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
const isExactly = (attr, expected) => {
|
|
640
|
-
if (!attr) return false
|
|
641
|
-
const value = attrValue(attr)
|
|
642
|
-
return isStringLiteral(value) && value.value === expected
|
|
643
|
-
}
|
|
644
|
-
const py = attrs.get('py')
|
|
645
|
-
const px = attrs.get('px')
|
|
646
|
-
const offenders = []
|
|
647
|
-
// A uniform inset is never the idiom, in any form (string, number, expression).
|
|
648
|
-
for (const name of ['p', 'padding', 'radius']) {
|
|
649
|
-
if (attrs.has(name)) offenders.push(attrs.get(name))
|
|
650
|
-
}
|
|
651
|
-
// The theme's own pair, restated, is redundant; any other py/px (or a lone half) is
|
|
652
|
-
// off-idiom.
|
|
653
|
-
const isThemePair = isExactly(py, CARD_INSET_PY) && isExactly(px, CARD_INSET_PX)
|
|
654
|
-
const redundant = []
|
|
655
|
-
if (isThemePair) redundant.push(py, px)
|
|
656
|
-
else {
|
|
657
|
-
if (py) offenders.push(py)
|
|
658
|
-
if (px) offenders.push(px)
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
for (const [list, message] of [
|
|
662
|
-
[offenders, CARD_INSET_MESSAGE],
|
|
663
|
-
[redundant, CARD_INSET_REDUNDANT_MESSAGE],
|
|
664
|
-
]) {
|
|
665
|
-
for (const attr of list) {
|
|
666
|
-
if (hasThemeAllow(context, attr, 'card-inset')) continue
|
|
667
|
-
context.report({ node: attr, message })
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
},
|
|
671
|
-
}
|
|
672
|
-
},
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
// ── Rule 3 — chart-in-raw-surface ───────────────────────────────────────────────────────────────
|
|
676
|
-
|
|
677
|
-
const CHART_TAGS = new Set([
|
|
678
|
-
'BandStrip',
|
|
679
|
-
'Bars',
|
|
680
|
-
'Donut',
|
|
681
|
-
'DualPanel',
|
|
682
|
-
'Heatmap',
|
|
683
|
-
'MirroredBars',
|
|
684
|
-
'Lines',
|
|
685
|
-
'StackedArea',
|
|
686
|
-
'Sparkline',
|
|
687
|
-
])
|
|
688
|
-
|
|
689
|
-
const CHART_IN_RAW_SURFACE_MESSAGE =
|
|
690
|
-
'Chart rendered inside a raw Card/Paper — use the shipped ChartCard wrapper (title + ' +
|
|
691
|
-
'info-tooltip + consistent inset). (basalt/chart-in-raw-surface)'
|
|
692
|
-
|
|
693
|
-
/** True when any JSXElement descendant of `node` opens with a chart-kind tag name. */
|
|
694
|
-
function subtreeHasChart(node) {
|
|
695
|
-
if (node === null || node === undefined) return false
|
|
696
|
-
|
|
697
|
-
if (node.type === 'JSXElement') {
|
|
698
|
-
const tagName = node.openingElement?.name?.name
|
|
699
|
-
if (CHART_TAGS.has(tagName)) return true
|
|
700
|
-
return node.children.some((child) => subtreeHasChart(child))
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
if (node.type === 'JSXFragment') {
|
|
704
|
-
return node.children.some((child) => subtreeHasChart(child))
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
if (node.type === 'JSXExpressionContainer') {
|
|
708
|
-
return subtreeHasChart(node.expression)
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
if (node.type === 'ConditionalExpression') {
|
|
712
|
-
return subtreeHasChart(node.consequent) || subtreeHasChart(node.alternate)
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
if (node.type === 'LogicalExpression') {
|
|
716
|
-
return subtreeHasChart(node.left) || subtreeHasChart(node.right)
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
if (node.type === 'ArrayExpression') {
|
|
720
|
-
return node.elements.some((el) => subtreeHasChart(el))
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
return false
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
// Ships: error
|
|
727
|
-
const chartInRawSurface = {
|
|
728
|
-
meta: {
|
|
729
|
-
type: 'suggestion',
|
|
730
|
-
docs: {
|
|
731
|
-
description: 'Disallow rendering a chart kind directly inside a raw Card/Paper.',
|
|
732
|
-
},
|
|
733
|
-
schema: [],
|
|
734
|
-
},
|
|
735
|
-
create(context) {
|
|
736
|
-
return {
|
|
737
|
-
JSXElement(node) {
|
|
738
|
-
const tagName = node.openingElement?.name?.name
|
|
739
|
-
if (!CARD_TAGS.has(tagName)) return
|
|
740
|
-
const hasChartDescendant = node.children.some((child) => subtreeHasChart(child))
|
|
741
|
-
if (!hasChartDescendant) return
|
|
742
|
-
if (hasThemeAllow(context, node, 'chart-in-raw-surface')) return
|
|
743
|
-
context.report({ node, message: CHART_IN_RAW_SURFACE_MESSAGE })
|
|
744
|
-
},
|
|
745
|
-
}
|
|
746
|
-
},
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
// ── Rule 4 — raw-scroll-container ───────────────────────────────────────────────────────────────
|
|
750
|
-
|
|
751
|
-
const RAW_SCROLL_CONTAINER_MESSAGE =
|
|
752
|
-
'Raw overflow: auto/scroll — use Mantine ScrollArea so the bar floats instead of reserving ' +
|
|
753
|
-
'gutter width (AppSidebar nav is the reference). Legitimate where a library owns the scroll ' +
|
|
754
|
-
'node (BasaltStickToBottom, BasaltVirtualList) — add a theme-allow comment there. ' +
|
|
755
|
-
'(basalt/raw-scroll-container)'
|
|
756
|
-
|
|
757
|
-
// `overflowX` is absent from the UNIVERSAL set for the original reason: a horizontal bar doesn't
|
|
758
|
-
// reserve gutter width in a chrome column, so a horizontally-scrolling code block or pinned-column
|
|
759
|
-
// table is its own legitimate pattern, not a ScrollArea candidate. It IS policed inside a home,
|
|
760
|
-
// where the doctrine is the opposite one — see RAW_SCROLL_CONTAINER_HOME_MESSAGE.
|
|
761
|
-
const OVERFLOW_KEYS = new Set(['overflow', 'overflowY'])
|
|
762
|
-
const SCROLLING_VALUES = new Set(['auto', 'scroll'])
|
|
763
|
-
|
|
764
|
-
const RAW_SCROLL_CONTAINER_HOME_MESSAGE =
|
|
765
|
-
'Horizontal scroll region inside a home — a page bar, a section header and a chart card never ' +
|
|
766
|
-
'scroll sideways and never wrap: overflow folds into a `More` menu (actions) or a `Filters (n)` ' +
|
|
767
|
-
'sheet (filters), computed by basalt from the typed BarAction[] (law C7). A sideways-scrolling ' +
|
|
768
|
-
'row of controls is the shape that law replaces. (basalt/raw-scroll-container)'
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* The basalt home SLOT this node is written in — the owner binding of the enclosing `actions` /
|
|
772
|
-
* `filters` / `tabs` / `sync` / `filtersEnd` attribute, or undefined.
|
|
773
|
-
*
|
|
774
|
-
* The C7 widening is scoped to slot VALUES, not to "anywhere under a `Section`/`ChartCard`". It
|
|
775
|
-
* used to accept any such ancestor, body children included, which made every horizontally
|
|
776
|
-
* scrolling `<Table>`, `<pre>` or `CodeBlock` on a page an `error` carrying the C7 message about
|
|
777
|
-
* "a sideways-scrolling row of controls" — a claim that was false for exactly the pattern this
|
|
778
|
-
* rule's own comment above calls legitimate. A section BODY is page content, not a control row, so
|
|
779
|
-
* it is out of scope again, and the walk stops at the slot ATTRIBUTE (the boundary `SLOT_ATTRS`
|
|
780
|
-
* draws for every control rule).
|
|
781
|
-
*
|
|
782
|
-
* Scoped by ANCESTRY only, with no hoisted-binding lookup: a style object hoisted to a `const` has
|
|
783
|
-
* no JSX ancestor at all, so a hoisted `{ overflowX: 'auto' }` handed to a slot is a known false
|
|
784
|
-
* negative here — the same gap the retired `chart-legend-literal` had for a hoisted `items` array, and
|
|
785
|
-
* for the same reason (following it means local flow analysis for a bypass nobody reaches by
|
|
786
|
-
* accident).
|
|
787
|
-
*/
|
|
788
|
-
function enclosingHomeOwner(node) {
|
|
789
|
-
const attr = enclosingSlotAttribute(node)
|
|
790
|
-
return attr === undefined ? undefined : slotOwnerBinding(attr)
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
/**
|
|
794
|
-
* Reports a `style` object property that turns a node into its own scroll container. Whether a raw
|
|
795
|
-
* scroll box is wrong depends on who owns the scroll node, which no AST check can see — so the
|
|
796
|
-
* `theme-allow` comment is a first-class part of the rule, not an escape valve for exceptional
|
|
797
|
-
* cases: a component that legitimately owns its scroll node (`BasaltStickToBottom`,
|
|
798
|
-
* `BasaltVirtualList`, `ThreadTranscript`'s virtualized pane) declares that ownership with the
|
|
799
|
-
* comment and moves on. Severity went `off` → `warn` (1.12.0) → `error` (1.13.0) once every live
|
|
800
|
-
* site in the repo carried that declaration; the opt-out mechanism is identical at either level.
|
|
801
|
-
*
|
|
802
|
-
* **The C7 widening (wave 6) inherits that `error` with no grace runway, and that is a LIMITATION,
|
|
803
|
-
* not a decision.** oxlint severity is per rule ID, so a widened branch cannot ship `warn` while
|
|
804
|
-
* the incumbent branch stays `error` — the only way to buy a runway would have been a second rule
|
|
805
|
-
* id, which is the bundled-vs-split trade the three boundary rules were split apart over, in the
|
|
806
|
-
* opposite direction. What the widening does instead is stay narrow: `overflowX` and
|
|
807
|
-
* `ScrollArea scrollbars="x"` are policed ONLY inside a basalt home SLOT (see
|
|
808
|
-
* {@link enclosingHomeOwner}), which is where C7 actually applies, so the set of newly-rejected
|
|
809
|
-
* code is small enough to fix rather than schedule. A consumer who disagrees turns the whole rule
|
|
810
|
-
* down in their own config.
|
|
811
|
-
*/
|
|
812
|
-
// Ships: error
|
|
813
|
-
const rawScrollContainer = {
|
|
814
|
-
meta: {
|
|
815
|
-
type: 'suggestion',
|
|
816
|
-
docs: {
|
|
817
|
-
description: 'Steer scroll regions onto Mantine ScrollArea instead of raw overflow.',
|
|
818
|
-
},
|
|
819
|
-
schema: [],
|
|
820
|
-
},
|
|
821
|
-
create(context) {
|
|
822
|
-
const homes = new Set()
|
|
823
|
-
const mantineImports = new Map()
|
|
824
|
-
const ownTree = isBasaltOwnSource(getFilename(context))
|
|
825
|
-
// Both halves report at `Program:exit`: whether the enclosing `Section` is BASALT's is an
|
|
826
|
-
// import-list question, and the ancestry that finds the slot is only walkable during the visit.
|
|
827
|
-
const candidates = []
|
|
828
|
-
|
|
829
|
-
return {
|
|
830
|
-
ImportDeclaration(node) {
|
|
831
|
-
collectBasaltImports(node, homes, ownTree)
|
|
832
|
-
collectMantineImports(node, mantineImports)
|
|
833
|
-
},
|
|
834
|
-
Property(node) {
|
|
835
|
-
const key = node.key
|
|
836
|
-
const keyName =
|
|
837
|
-
key.type === 'Identifier' ? key.name : key.type === 'Literal' ? key.value : undefined
|
|
838
|
-
if (typeof keyName !== 'string') return
|
|
839
|
-
const universal = OVERFLOW_KEYS.has(keyName)
|
|
840
|
-
if (!universal && keyName !== 'overflowX') return
|
|
841
|
-
if (!isStringLiteral(node.value) || !SCROLLING_VALUES.has(node.value.value)) return
|
|
842
|
-
candidates.push({ node, universal, home: universal ? undefined : enclosingHomeOwner(node) })
|
|
843
|
-
},
|
|
844
|
-
// `<ScrollArea scrollbars="x">` — the same horizontal scroll region written as a component.
|
|
845
|
-
// Only inside a home, exactly like the `overflowX` half above; a ScrollArea is otherwise the
|
|
846
|
-
// shape this whole rule steers people TOWARD. Mantine-provenanced like every other tag test:
|
|
847
|
-
// a consumer's own `ScrollArea` wrapper is not the component this doctrine is about.
|
|
848
|
-
JSXAttribute(node) {
|
|
849
|
-
if (node.name?.name !== 'scrollbars') return
|
|
850
|
-
const value = unwrapExpressionContainer(node.value)
|
|
851
|
-
if (!isStringLiteral(value) || value.value !== 'x') return
|
|
852
|
-
const owner = node.parent
|
|
853
|
-
if (owner === null || owner === undefined || owner.type !== 'JSXOpeningElement') return
|
|
854
|
-
candidates.push({
|
|
855
|
-
node,
|
|
856
|
-
universal: false,
|
|
857
|
-
home: enclosingHomeOwner(node),
|
|
858
|
-
name: owner.name,
|
|
859
|
-
})
|
|
860
|
-
},
|
|
861
|
-
'Program:exit'() {
|
|
862
|
-
for (const { node, universal, home, name } of candidates) {
|
|
863
|
-
// The C7 widening: only inside a BASALT home slot (see enclosingHomeOwner).
|
|
864
|
-
if (!universal && (home === undefined || !homes.has(home))) continue
|
|
865
|
-
if (name !== undefined && resolveMantineTag(name, mantineImports) !== 'ScrollArea')
|
|
866
|
-
continue
|
|
867
|
-
if (hasThemeAllow(context, node, 'raw-scroll-container')) continue
|
|
868
|
-
context.report({
|
|
869
|
-
node,
|
|
870
|
-
message: universal ? RAW_SCROLL_CONTAINER_MESSAGE : RAW_SCROLL_CONTAINER_HOME_MESSAGE,
|
|
871
|
-
})
|
|
872
|
-
}
|
|
873
|
-
},
|
|
874
|
-
}
|
|
875
|
-
},
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
// ── Rules 5–7 — the three architecture-boundary rules ───────────────────────────────────────────
|
|
879
|
-
|
|
880
|
-
// Message bodies mirror the wording that used to live in the shipped `no-restricted-imports`
|
|
881
|
-
// overrides (configs/oxlint.json) verbatim, so the DX doesn't regress.
|
|
882
|
-
const TOKEN_LAYER_BOUNDARY_MESSAGES = {
|
|
883
|
-
charts:
|
|
884
|
-
'charts must stay upstream-of-Mantine (no Mantine imports) — read color via --vx-* tokens, ' +
|
|
885
|
-
'not the Mantine theme directly. (basalt/token-layer-boundary)',
|
|
886
|
-
tokens:
|
|
887
|
-
'tokens must stay upstream-of-Mantine (no Mantine imports) — importing Mantine here would ' +
|
|
888
|
-
'cycle back through cssVariablesResolver. (basalt/token-layer-boundary)',
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
/** True when any path segment of `filename` equals `segment` (POSIX or Windows separators). */
|
|
892
|
-
function hasPathSegment(filename, segment) {
|
|
893
|
-
return filename.split(/[\\/]/).includes(segment)
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
/** Import specifier for an ImportDeclaration or a dynamic `import()` call; undefined otherwise. */
|
|
897
|
-
function importSource(node) {
|
|
898
|
-
if (node.type === 'ImportDeclaration') return node.source?.value
|
|
899
|
-
if (node.type === 'ImportExpression' && node.source?.type === 'Literal') {
|
|
900
|
-
return node.source.value
|
|
901
|
-
}
|
|
902
|
-
return undefined
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
/**
|
|
906
|
-
* Import specifier for a source-bearing export (`export { x } from '…'` / `export * from '…'`);
|
|
907
|
-
* undefined for a plain local `export { x }` (no `source`) or any other node shape.
|
|
908
|
-
*/
|
|
909
|
-
function exportSource(node) {
|
|
910
|
-
if (node.type === 'ExportNamedDeclaration' || node.type === 'ExportAllDeclaration') {
|
|
911
|
-
return node.source?.value
|
|
912
|
-
}
|
|
913
|
-
return undefined
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* Wires a `reportFor(node, source)` boundary check into the four import/export AST handlers shared
|
|
918
|
-
* by all three boundary rules below.
|
|
919
|
-
*/
|
|
920
|
-
function boundaryVisitor(reportFor) {
|
|
921
|
-
return {
|
|
922
|
-
ImportDeclaration(node) {
|
|
923
|
-
reportFor(node, importSource(node))
|
|
924
|
-
},
|
|
925
|
-
ImportExpression(node) {
|
|
926
|
-
reportFor(node, importSource(node))
|
|
927
|
-
},
|
|
928
|
-
ExportNamedDeclaration(node) {
|
|
929
|
-
reportFor(node, exportSource(node))
|
|
930
|
-
},
|
|
931
|
-
ExportAllDeclaration(node) {
|
|
932
|
-
reportFor(node, exportSource(node))
|
|
933
|
-
},
|
|
934
|
-
// CommonJS `require('<spec>')` with a literal specifier; a computed one cannot be judged.
|
|
935
|
-
CallExpression(node) {
|
|
936
|
-
const [arg] = node.arguments
|
|
937
|
-
if (node.callee?.type !== 'Identifier' || node.callee.name !== 'require') return
|
|
938
|
-
if (arg?.type === 'Literal') reportFor(node, arg.value)
|
|
939
|
-
},
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
// Rule 5 — chart-engine-boundary (V2-SPEC § 9.8): `@visx/*` is banned everywhere; outside basalt's
|
|
944
|
-
// own `src/`, `@tanstack/charts` is an ALLOWLIST of mark/scale/transform subpaths. The bare root
|
|
945
|
-
// re-exports `defineChart`, `createChartRuntime`, `mountChart`, `renderChartSvg` and `createMark`
|
|
946
|
-
// (a second chart runtime), `/react` is the host (basalt owns the one), and any NEW engine
|
|
947
|
-
// subpath is an error until `oxlint-plugin.test.ts` classifies it against the engine's `exports`.
|
|
948
|
-
// Inside `packages/basalt-ui/src/` only the visx ban applies — `basalt/chart-host-single` polices
|
|
949
|
-
// the one place `/react` may be imported. Deliberately NO `hasThemeAllow` escape (see
|
|
950
|
-
// token-layer-boundary below).
|
|
951
|
-
const visxBanned = (source) => source === '@visx' || source.startsWith('@visx/')
|
|
952
|
-
|
|
953
|
-
/** Exact `@tanstack/charts` subpaths a consumer may import. Kept in step with V2-SPEC § 9.8. */
|
|
954
|
-
export const CHART_ENGINE_ALLOWED_SUBPATHS = new Set([
|
|
955
|
-
'line',
|
|
956
|
-
'area',
|
|
957
|
-
'area-x',
|
|
958
|
-
'bar',
|
|
959
|
-
'rect',
|
|
960
|
-
'rule',
|
|
961
|
-
'dot',
|
|
962
|
-
'tick',
|
|
963
|
-
'text',
|
|
964
|
-
'vector',
|
|
965
|
-
'link',
|
|
966
|
-
'arrow',
|
|
967
|
-
'difference',
|
|
968
|
-
'stack',
|
|
969
|
-
'mark/decorative',
|
|
970
|
-
'd3/shape',
|
|
971
|
-
'types',
|
|
972
|
-
])
|
|
973
|
-
|
|
974
|
-
/** Allowed subpath FAMILIES: `scales/*` and `transform/*` (the bare `transform` is not one). */
|
|
975
|
-
export const CHART_ENGINE_ALLOWED_PREFIXES = ['scales/', 'transform/']
|
|
976
|
-
|
|
977
|
-
/**
|
|
978
|
-
* True when `subpath` (the part after `@tanstack/charts/`) is on the allowlist. A `.`, `..` or empty
|
|
979
|
-
* segment is rejected first: `scales/../react` starts with an allowed family but resolves outside
|
|
980
|
-
* it. Within a family the length guard rejects the bare prefix (`scales/`), which names no module.
|
|
981
|
-
*/
|
|
982
|
-
export function isAllowedChartEngineSubpath(subpath) {
|
|
983
|
-
if (subpath.split('/').some((segment) => segment === '' || segment === '.' || segment === '..'))
|
|
984
|
-
return false
|
|
985
|
-
return (
|
|
986
|
-
CHART_ENGINE_ALLOWED_SUBPATHS.has(subpath) ||
|
|
987
|
-
CHART_ENGINE_ALLOWED_PREFIXES.some(
|
|
988
|
-
(prefix) => subpath.startsWith(prefix) && subpath.length > prefix.length,
|
|
989
|
-
)
|
|
990
|
-
)
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
const CHART_ENGINE_ALLOWED_LIST = [
|
|
994
|
-
...CHART_ENGINE_ALLOWED_SUBPATHS,
|
|
995
|
-
...CHART_ENGINE_ALLOWED_PREFIXES.map((p) => `${p}*`),
|
|
996
|
-
].join(', ')
|
|
997
|
-
const CHART_ENGINE_MESSAGE =
|
|
998
|
-
"Import chart kinds from 'basalt-ui/charts', or the rung's `marks` (CartesianChart) for custom " +
|
|
999
|
-
'marks — only these @tanstack/charts subpaths are allowed: ' +
|
|
1000
|
-
CHART_ENGINE_ALLOWED_LIST +
|
|
1001
|
-
". The bare root, /react and every other subpath are basalt's to own. (basalt/chart-engine-boundary)"
|
|
1002
|
-
const VISX_BANNED_MESSAGE =
|
|
1003
|
-
"@visx/* is gone in 2.0 — use 'basalt-ui/charts' kinds, or the rung's `marks` built from the " +
|
|
1004
|
-
'allowed @tanstack/charts subpaths. (basalt/chart-engine-boundary)'
|
|
1005
|
-
|
|
1006
|
-
/** True for basalt's own package source — the one place the engine allowlist does not apply. */
|
|
1007
|
-
function inBasaltSource(filename) {
|
|
1008
|
-
return filename.replaceAll('\\', '/').includes('/packages/basalt-ui/src/')
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
// Ships: error
|
|
1012
|
-
const chartEngineBoundary = {
|
|
1013
|
-
meta: {
|
|
1014
|
-
type: 'problem',
|
|
1015
|
-
docs: {
|
|
1016
|
-
description:
|
|
1017
|
-
'Ban @visx/* everywhere and restrict @tanstack/charts to the allowed mark subpaths.',
|
|
1018
|
-
},
|
|
1019
|
-
schema: [],
|
|
1020
|
-
},
|
|
1021
|
-
create(context) {
|
|
1022
|
-
const ownSource = inBasaltSource(getFilename(context))
|
|
1023
|
-
|
|
1024
|
-
function reportFor(node, source) {
|
|
1025
|
-
if (typeof source !== 'string') return
|
|
1026
|
-
if (visxBanned(source)) {
|
|
1027
|
-
context.report({ node, message: VISX_BANNED_MESSAGE })
|
|
1028
|
-
return
|
|
1029
|
-
}
|
|
1030
|
-
if (ownSource) return
|
|
1031
|
-
if (source !== '@tanstack/charts' && !source.startsWith('@tanstack/charts/')) return
|
|
1032
|
-
const subpath = source.slice('@tanstack/charts/'.length)
|
|
1033
|
-
if (source !== '@tanstack/charts' && isAllowedChartEngineSubpath(subpath)) return
|
|
1034
|
-
context.report({ node, message: CHART_ENGINE_MESSAGE })
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
return boundaryVisitor(reportFor)
|
|
1038
|
-
},
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
// Rule 6 — chart-host-single (V2-SPEC § 9.8): `@tanstack/charts/react` is imported by
|
|
1042
|
-
// `packages/basalt-ui/src/charts/host.tsx` alone, so measured sizing, legend and state chrome live
|
|
1043
|
-
// in one component. Repo-local only, like token-layer-boundary — never in the consumer preset.
|
|
1044
|
-
const CHART_HOST_FILE = 'packages/basalt-ui/src/charts/host.tsx'
|
|
1045
|
-
const CHART_HOST_MESSAGE =
|
|
1046
|
-
'@tanstack/charts/react may only be imported by ' +
|
|
1047
|
-
CHART_HOST_FILE +
|
|
1048
|
-
' — render charts through the host. (basalt/chart-host-single)'
|
|
1049
|
-
// Ships: repo-local only
|
|
1050
|
-
const chartHostSingle = {
|
|
1051
|
-
meta: {
|
|
1052
|
-
type: 'problem',
|
|
1053
|
-
docs: {
|
|
1054
|
-
description: 'Allow @tanstack/charts/react only in packages/basalt-ui/src/charts/host.tsx.',
|
|
1055
|
-
},
|
|
1056
|
-
schema: [],
|
|
1057
|
-
},
|
|
1058
|
-
create(context) {
|
|
1059
|
-
const filename = getFilename(context)
|
|
1060
|
-
// Scoped to basalt source: elsewhere `chart-engine-boundary` already bans /react, one diagnostic.
|
|
1061
|
-
const exempt =
|
|
1062
|
-
!inBasaltSource(filename) || filename.replaceAll('\\', '/').endsWith('/' + CHART_HOST_FILE)
|
|
1063
|
-
|
|
1064
|
-
function reportFor(node, source) {
|
|
1065
|
-
if (typeof source !== 'string' || exempt) return
|
|
1066
|
-
if (source === '@tanstack/charts/react' || source.startsWith('@tanstack/charts/react/')) {
|
|
1067
|
-
context.report({ node, message: CHART_HOST_MESSAGE })
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
return boundaryVisitor(reportFor)
|
|
1072
|
-
},
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
// Rule 7 — token-layer-boundary: @mantine/* banned inside `charts` OR `tokens` path segments —
|
|
1076
|
-
// keeps the token layer upstream of Mantine AND keeps those two subpaths resolving with no
|
|
1077
|
-
// @mantine/* installed (see the file-header comment for the cycle/fork + packaging rationale).
|
|
1078
|
-
// Repo-local only — never registered in the shipped consumer preset, since this governs basalt's
|
|
1079
|
-
// own internal layering/packaging, not a consumer contract.
|
|
1080
|
-
// Ships: repo-local only
|
|
1081
|
-
const tokenLayerBoundary = {
|
|
1082
|
-
meta: {
|
|
1083
|
-
type: 'suggestion',
|
|
1084
|
-
docs: {
|
|
1085
|
-
description: 'Disallow @mantine/* imports inside charts/ or tokens/ directories.',
|
|
1086
|
-
},
|
|
1087
|
-
schema: [],
|
|
1088
|
-
},
|
|
1089
|
-
create(context) {
|
|
1090
|
-
const filename = getFilename(context)
|
|
1091
|
-
const inCharts = hasPathSegment(filename, 'charts')
|
|
1092
|
-
const inTokens = hasPathSegment(filename, 'tokens')
|
|
1093
|
-
|
|
1094
|
-
// Deliberately NO `hasThemeAllow` escape — see the chart-engine-boundary comment above for why.
|
|
1095
|
-
function reportFor(node, source) {
|
|
1096
|
-
if (typeof source !== 'string') return
|
|
1097
|
-
if (
|
|
1098
|
-
source !== '@mantine/core' &&
|
|
1099
|
-
source !== '@mantine/hooks' &&
|
|
1100
|
-
!source.startsWith('@mantine/')
|
|
1101
|
-
)
|
|
1102
|
-
return
|
|
1103
|
-
|
|
1104
|
-
if (inCharts) {
|
|
1105
|
-
context.report({ node, message: TOKEN_LAYER_BOUNDARY_MESSAGES.charts })
|
|
1106
|
-
} else if (inTokens) {
|
|
1107
|
-
context.report({ node, message: TOKEN_LAYER_BOUNDARY_MESSAGES.tokens })
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
return boundaryVisitor(reportFor)
|
|
1112
|
-
},
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
/** The `key` of an object Property as a string, covering both Identifier and Literal keys. */
|
|
1116
|
-
function propertyKeyName(node) {
|
|
1117
|
-
const key = node.key
|
|
1118
|
-
if (key.type === 'Identifier') return key.name
|
|
1119
|
-
if (key.type === 'Literal') return key.value
|
|
1120
|
-
return undefined
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
// ── Rule 9 — agent-no-raw-usechat ───────────────────────────────────────────────────────────────
|
|
1124
|
-
|
|
1125
|
-
const AGENT_NO_RAW_USECHAT_MESSAGE =
|
|
1126
|
-
'Raw @ai-sdk/react useChat / useCompletion / Chat — use useAgentStream / useAgentThreadRuns over aiSdkTransport ' +
|
|
1127
|
-
"(unmount abort, supersede guards, single-consumer resume). Mark the line 'basalt-agent-allow' to " +
|
|
1128
|
-
'opt out. (basalt/agent-no-raw-usechat)'
|
|
1129
|
-
|
|
1130
|
-
const RAW_USE_CHAT_SOURCES = new Set(['@ai-sdk/react', 'ai/react'])
|
|
1131
|
-
const RAW_USE_CHAT_NAMES = new Set(['useChat', 'useCompletion', 'Chat'])
|
|
1132
|
-
|
|
1133
|
-
// Deliberately NO `hasThemeAllow` escape — see the file-header comment.
|
|
1134
|
-
// Ships: error
|
|
1135
|
-
const agentNoRawUseChat = {
|
|
1136
|
-
meta: {
|
|
1137
|
-
type: 'problem',
|
|
1138
|
-
docs: {
|
|
1139
|
-
description:
|
|
1140
|
-
'Disallow importing useChat/useCompletion/Chat directly from @ai-sdk/react or ai/react.',
|
|
1141
|
-
},
|
|
1142
|
-
schema: [],
|
|
1143
|
-
},
|
|
1144
|
-
create(context) {
|
|
1145
|
-
const sourceCode = context.sourceCode ?? context.getSourceCode?.()
|
|
1146
|
-
const nameOf = (node) => (node.type === 'Identifier' ? node.name : node.value)
|
|
1147
|
-
const report = (node) => {
|
|
1148
|
-
if (!hasAgentAllow(context, node)) {
|
|
1149
|
-
context.report({ node, message: AGENT_NO_RAW_USECHAT_MESSAGE })
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
return {
|
|
1153
|
-
ImportDeclaration(node) {
|
|
1154
|
-
const source = node.source?.value
|
|
1155
|
-
if (typeof source !== 'string' || !RAW_USE_CHAT_SOURCES.has(source)) return
|
|
1156
|
-
// A whole `import type { … } from '…'` is erased at compile time — nothing to guard.
|
|
1157
|
-
if (node.importKind === 'type') return
|
|
1158
|
-
|
|
1159
|
-
for (const specifier of node.specifiers) {
|
|
1160
|
-
if (specifier.type !== 'ImportSpecifier') continue
|
|
1161
|
-
// `import { type useChat } from '…'` — the individual specifier is type-only.
|
|
1162
|
-
if (specifier.importKind === 'type') continue
|
|
1163
|
-
const importedName = nameOf(specifier.imported)
|
|
1164
|
-
if (typeof importedName !== 'string' || !RAW_USE_CHAT_NAMES.has(importedName)) continue
|
|
1165
|
-
report(specifier)
|
|
1166
|
-
}
|
|
1167
|
-
},
|
|
1168
|
-
// `import * as AI from '@ai-sdk/react'` then `AI.useChat` / `new AI.Chat`.
|
|
1169
|
-
MemberExpression(node) {
|
|
1170
|
-
if (node.computed || node.object?.type !== 'Identifier') return
|
|
1171
|
-
if (!RAW_USE_CHAT_NAMES.has(node.property?.name)) return
|
|
1172
|
-
const def = soleDefinition(sourceCode, node.object)
|
|
1173
|
-
if (def?.type !== 'ImportBinding' || def.node.type !== 'ImportNamespaceSpecifier') return
|
|
1174
|
-
if (def.parent?.importKind === 'type') return
|
|
1175
|
-
if (!RAW_USE_CHAT_SOURCES.has(def.parent?.source?.value)) return
|
|
1176
|
-
report(node)
|
|
1177
|
-
},
|
|
1178
|
-
// `export { Chat } from '@ai-sdk/react'` and `export * from '@ai-sdk/react'`.
|
|
1179
|
-
ExportNamedDeclaration(node) {
|
|
1180
|
-
if (!RAW_USE_CHAT_SOURCES.has(node.source?.value) || node.exportKind === 'type') return
|
|
1181
|
-
for (const specifier of node.specifiers ?? []) {
|
|
1182
|
-
if (specifier.exportKind === 'type') continue
|
|
1183
|
-
if (RAW_USE_CHAT_NAMES.has(nameOf(specifier.local))) report(specifier)
|
|
1184
|
-
}
|
|
1185
|
-
},
|
|
1186
|
-
ExportAllDeclaration(node) {
|
|
1187
|
-
if (RAW_USE_CHAT_SOURCES.has(node.source?.value) && node.exportKind !== 'type') report(node)
|
|
1188
|
-
},
|
|
1189
|
-
}
|
|
1190
|
-
},
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
// ── Rule 10 — ai-sdk-major ──────────────────────────────────────────────────────────────────────
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* First run of digits in a semver range string (`^7.0.15` → `7`), or null if there is none.
|
|
1197
|
-
*
|
|
1198
|
-
* Duplicated verbatim in `src/cli/index.ts` — kept separate deliberately: this file must stay
|
|
1199
|
-
* import-free from the package (it loads via `jsPlugins` out of a consumer's node_modules), so it
|
|
1200
|
-
* cannot import the CLI's copy. Keep both copies in sync by hand; a future parsing fix (pre-release
|
|
1201
|
-
* suffixes, say) must land in both.
|
|
1202
|
-
*/
|
|
1203
|
-
function majorOf(range) {
|
|
1204
|
-
if (typeof range !== 'string') return null
|
|
1205
|
-
const match = range.match(/\d+/)
|
|
1206
|
-
return match === null ? null : Number(match[0])
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
/**
|
|
1210
|
-
* `ai`'s declared major off one parsed package.json, checked in ONE fixed order shared by every
|
|
1211
|
-
* reader in this file (basalt's own major below, and the linted file's nearest package.json in
|
|
1212
|
-
* `aiMajorAtPackageJson`) — `dependencies` → `devDependencies` → `peerDependencies`. Chosen
|
|
1213
|
-
* deliberately: `dependencies` is what actually gets installed and resolved at runtime, so it wins
|
|
1214
|
-
* over a `devDependencies` pin (test-only) or a `peerDependencies` range (a floor, not a pin). Two
|
|
1215
|
-
* readers disagreeing on this order is exactly the kind of skew this rule exists to catch — see
|
|
1216
|
-
* `cli/index.ts`'s `aiMajorAt`, which uses the same order for doctor's cross-package walk.
|
|
1217
|
-
*/
|
|
1218
|
-
function aiMajorFromPkg(pkg) {
|
|
1219
|
-
return majorOf(pkg.dependencies?.ai ?? pkg.devDependencies?.ai ?? pkg.peerDependencies?.ai)
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
/**
|
|
1223
|
-
* basalt-ui's OWN declared `ai` peer major, read once at module load from the package.json
|
|
1224
|
-
* sitting next to this file's `configs/` directory — `../package.json` relative to this module,
|
|
1225
|
-
* which resolves to `packages/basalt-ui/package.json` repo-locally AND to
|
|
1226
|
-
* `node_modules/basalt-ui/package.json` when this file runs from a consumer's installed copy
|
|
1227
|
-
* (`configs/oxlint-plugin.js` is one directory below the package root in both places). `null` when
|
|
1228
|
-
* unreadable or undeclared — the rule then has nothing to compare against and stays silent.
|
|
1229
|
-
*/
|
|
1230
|
-
const PLUGIN_DIR = dirname(fileURLToPath(import.meta.url))
|
|
1231
|
-
const BASALT_AI_MAJOR = (() => {
|
|
1232
|
-
try {
|
|
1233
|
-
const pkg = JSON.parse(readFileSync(resolvePath(PLUGIN_DIR, '..', 'package.json'), 'utf8'))
|
|
1234
|
-
// Peer-first, unlike aiMajorFromPkg's dependencies-first order: `ai` is an optional PEER of
|
|
1235
|
-
// basalt-ui, never its runtime dependency, so the "dependencies wins because runtime" rationale
|
|
1236
|
-
// above does not apply to this self-read — a devDependencies test pin must not masquerade as
|
|
1237
|
-
// the declared peer major.
|
|
1238
|
-
return majorOf(pkg.peerDependencies?.ai ?? pkg.devDependencies?.ai ?? pkg.dependencies?.ai)
|
|
1239
|
-
} catch {
|
|
1240
|
-
return null
|
|
1241
|
-
}
|
|
1242
|
-
})()
|
|
1243
|
-
|
|
1244
|
-
// One JSON.parse per package.json path, and one directory-walk result per starting directory — so
|
|
1245
|
-
// a lint run over N files in the same package does one filesystem walk total, not N.
|
|
1246
|
-
const packageJsonMajorCache = new Map()
|
|
1247
|
-
const nearestAiMajorCache = new Map()
|
|
1248
|
-
|
|
1249
|
-
function aiMajorAtPackageJson(pkgPath) {
|
|
1250
|
-
if (packageJsonMajorCache.has(pkgPath)) return packageJsonMajorCache.get(pkgPath)
|
|
1251
|
-
let major = null
|
|
1252
|
-
try {
|
|
1253
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'))
|
|
1254
|
-
major = aiMajorFromPkg(pkg)
|
|
1255
|
-
} catch {
|
|
1256
|
-
major = null
|
|
1257
|
-
}
|
|
1258
|
-
packageJsonMajorCache.set(pkgPath, major)
|
|
1259
|
-
return major
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
/** Walks up from `startDir` to the nearest ancestor `package.json`'s declared `ai` major. */
|
|
1263
|
-
function nearestAiMajor(startDir) {
|
|
1264
|
-
if (nearestAiMajorCache.has(startDir)) return nearestAiMajorCache.get(startDir)
|
|
1265
|
-
|
|
1266
|
-
const visited = []
|
|
1267
|
-
let dir = startDir
|
|
1268
|
-
let result = null
|
|
1269
|
-
for (;;) {
|
|
1270
|
-
if (nearestAiMajorCache.has(dir)) {
|
|
1271
|
-
result = nearestAiMajorCache.get(dir)
|
|
1272
|
-
break
|
|
1273
|
-
}
|
|
1274
|
-
visited.push(dir)
|
|
1275
|
-
const pkgPath = resolvePath(dir, 'package.json')
|
|
1276
|
-
if (existsSync(pkgPath)) {
|
|
1277
|
-
result = aiMajorAtPackageJson(pkgPath)
|
|
1278
|
-
break
|
|
1279
|
-
}
|
|
1280
|
-
const parent = dirname(dir)
|
|
1281
|
-
if (parent === dir) break // filesystem root — no package.json found
|
|
1282
|
-
dir = parent
|
|
1283
|
-
}
|
|
1284
|
-
for (const d of visited) nearestAiMajorCache.set(d, result)
|
|
1285
|
-
return result
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
// One parsed manifest per path — the scope walk below re-reads the same ancestors for every file.
|
|
1289
|
-
const packageJsonCache = new Map()
|
|
1290
|
-
|
|
1291
|
-
function readPackageJson(pkgPath) {
|
|
1292
|
-
if (packageJsonCache.has(pkgPath)) return packageJsonCache.get(pkgPath)
|
|
1293
|
-
let pkg = null
|
|
1294
|
-
try {
|
|
1295
|
-
pkg = JSON.parse(readFileSync(pkgPath, 'utf8'))
|
|
1296
|
-
} catch {
|
|
1297
|
-
pkg = null
|
|
1298
|
-
}
|
|
1299
|
-
packageJsonCache.set(pkgPath, pkg)
|
|
1300
|
-
return pkg
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
/**
|
|
1304
|
-
* Is this file inside a package that actually consumes basalt-ui?
|
|
1305
|
-
*
|
|
1306
|
-
* Without this the rule compared EVERY package's `ai` major against basalt's own peer major, and
|
|
1307
|
-
* fired three errors in an rb workspace package (`apps/api`) that has no basalt-ui dependency, is
|
|
1308
|
-
* outside `basalt.roots`, and pins `ai@6` deliberately. `doctor`'s `ai-major-parity` scopes the same
|
|
1309
|
-
* concern correctly — two shipped enforcement surfaces disagreeing about one fact leaves a consumer
|
|
1310
|
-
* unable to tell which is right, which is worse than either being wrong.
|
|
1311
|
-
*
|
|
1312
|
-
* In scope when an ancestor package.json either depends on `basalt-ui`, or declares `basalt.roots`
|
|
1313
|
-
* that the file sits under. A declared `basalt.roots` that the file is NOT under is a positive
|
|
1314
|
-
* statement that this code is not basalt's — the walk stops there rather than continuing up to a
|
|
1315
|
-
* workspace root that happens to carry the dependency.
|
|
1316
|
-
*
|
|
1317
|
-
* **`roots` is consulted BEFORE the dependency, within one manifest**, and that ordering is the
|
|
1318
|
-
* whole fix. `init` produces exactly the layout that breaks the other way round: a monorepo ROOT
|
|
1319
|
-
* carrying `basalt-ui` as the devDependency the CLI is run from, AND `basalt.roots: ["apps/web/
|
|
1320
|
-
* src"]` naming where the app actually is. Dep-first returned in-scope on that root before `roots`
|
|
1321
|
-
* was ever read, so rb's `apps/api` — no basalt dependency, deliberately on a different `ai` major,
|
|
1322
|
-
* explicitly outside the declared roots — took three errors and needed a permanent override. The
|
|
1323
|
-
* more specific statement wins: `roots` says WHERE, the dependency only says whether.
|
|
1324
|
-
*/
|
|
1325
|
-
function isBasaltScopedFile(filename) {
|
|
1326
|
-
let dir = dirname(filename)
|
|
1327
|
-
for (;;) {
|
|
1328
|
-
const pkg = readPackageJson(resolvePath(dir, 'package.json'))
|
|
1329
|
-
if (pkg !== null) {
|
|
1330
|
-
const roots = pkg.basalt?.roots
|
|
1331
|
-
if (Array.isArray(roots) && roots.length > 0) {
|
|
1332
|
-
return roots.some((root) => filename.startsWith(`${resolvePath(dir, root)}/`))
|
|
1333
|
-
}
|
|
1334
|
-
const deps = { ...pkg.dependencies, ...pkg.devDependencies, ...pkg.peerDependencies }
|
|
1335
|
-
if (deps['basalt-ui'] !== undefined) return true
|
|
1336
|
-
}
|
|
1337
|
-
const parent = dirname(dir)
|
|
1338
|
-
if (parent === dir) return false
|
|
1339
|
-
dir = parent
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
function aiSdkMajorMessage(consumerMajor) {
|
|
1344
|
-
return (
|
|
1345
|
-
`This file's nearest package.json declares ai@${consumerMajor}, but basalt-ui declares the ` +
|
|
1346
|
-
`ai@${BASALT_AI_MAJOR} peer major — a producer/consumer pair on different ai majors can throw ` +
|
|
1347
|
-
"'Unknown chunk type' at runtime (argo defect 1: apps/api on ai@5 vs apps/dashboard on ai@7). " +
|
|
1348
|
-
'(basalt/ai-sdk-major)'
|
|
1349
|
-
)
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
// Honours `basalt-agent-allow` (NOT `theme-allow`) like `agent-no-raw-usechat` above — a
|
|
1353
|
-
// version skew is still a fact about two package.json files, but a written, intentional
|
|
1354
|
-
// producer/consumer pair (see `doctor`'s `aiMajorSkewReason`) needs a way to say so at the import
|
|
1355
|
-
// site too, not just be permanently blocked.
|
|
1356
|
-
// Ships: error
|
|
1357
|
-
const aiSdkMajor = {
|
|
1358
|
-
meta: {
|
|
1359
|
-
type: 'problem',
|
|
1360
|
-
docs: {
|
|
1361
|
-
description:
|
|
1362
|
-
"Disallow importing 'ai'/'@ai-sdk/*' from a package whose declared ai major differs from basalt-ui's.",
|
|
1363
|
-
},
|
|
1364
|
-
schema: [],
|
|
1365
|
-
},
|
|
1366
|
-
create(context) {
|
|
1367
|
-
return {
|
|
1368
|
-
ImportDeclaration(node) {
|
|
1369
|
-
if (BASALT_AI_MAJOR === null) return
|
|
1370
|
-
const source = node.source?.value
|
|
1371
|
-
if (typeof source !== 'string') return
|
|
1372
|
-
if (source !== 'ai' && !source.startsWith('@ai-sdk/')) return
|
|
1373
|
-
|
|
1374
|
-
const filename = getFilename(context)
|
|
1375
|
-
if (filename.length === 0) return
|
|
1376
|
-
if (!isBasaltScopedFile(filename)) return
|
|
1377
|
-
const consumerMajor = nearestAiMajor(dirname(filename))
|
|
1378
|
-
if (consumerMajor === null) return // no `ai` in the nearest package.json — nothing to compare
|
|
1379
|
-
if (consumerMajor === BASALT_AI_MAJOR) return
|
|
1380
|
-
if (hasAgentAllow(context, node)) return
|
|
1381
|
-
|
|
1382
|
-
context.report({ node, message: aiSdkMajorMessage(consumerMajor) })
|
|
1383
|
-
},
|
|
1384
|
-
}
|
|
1385
|
-
},
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
// ── Rule 14 — shadow-basalt-export ───────────────────────────────────────────────────────────────
|
|
1389
|
-
|
|
1390
|
-
/** The package root — one directory above `configs/`, repo-locally AND inside node_modules. */
|
|
1391
|
-
const PACKAGE_ROOT = resolvePath(PLUGIN_DIR, '..')
|
|
1392
|
-
|
|
1393
|
-
/**
|
|
1394
|
-
* A component-shaped NAME: starts uppercase and carries a lowercase letter, which excludes the
|
|
1395
|
-
* SCREAMING_CASE constants and the two-letter token namespaces in the same barrel.
|
|
1396
|
-
*
|
|
1397
|
-
* A name test alone is not a component test — see {@link isComponentInit}. Every PascalCase binding
|
|
1398
|
-
* passes this, which is how obsidian's `SlugTracker` (a plain data class in a React-free package)
|
|
1399
|
-
* became a "forked component" the moment 1.21.0 widened the rule to all nine barrels.
|
|
1400
|
-
*/
|
|
1401
|
-
const COMPONENT_NAME = /^[A-Z][A-Za-z0-9]*[a-z][A-Za-z0-9]*$/
|
|
1402
|
-
|
|
1403
|
-
/** The two wrappers a function component is legitimately declared inside. */
|
|
1404
|
-
const COMPONENT_WRAPPERS = new Set(['memo', 'forwardRef'])
|
|
1405
|
-
|
|
1406
|
-
/**
|
|
1407
|
-
* Is this initializer component-SHAPED — a function, an arrow, or one wrapped in `memo` /
|
|
1408
|
-
* `forwardRef`?
|
|
1409
|
-
*
|
|
1410
|
-
* The second half of the fix for obsidian's false positive. `const Foo = new Map()` and
|
|
1411
|
-
* `class SlugTracker {}` share a name with a basalt export and nothing else; a fork of a component
|
|
1412
|
-
* is a function (or, historically, a class that `extends` one). Narrowing here costs the rule
|
|
1413
|
-
* nothing it was ever meant to catch and removes the whole "PascalCase binding" false-positive
|
|
1414
|
-
* class, which the nine-barrel widening made large.
|
|
1415
|
-
*/
|
|
1416
|
-
function isComponentInit(init) {
|
|
1417
|
-
if (init === null || init === undefined) return false
|
|
1418
|
-
if (init.type === 'ArrowFunctionExpression' || init.type === 'FunctionExpression') return true
|
|
1419
|
-
if (init.type !== 'CallExpression') return false
|
|
1420
|
-
const callee = init.callee
|
|
1421
|
-
const name = callee?.type === 'MemberExpression' ? callee.property?.name : callee?.name
|
|
1422
|
-
return typeof name === 'string' && COMPONENT_WRAPPERS.has(name)
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
/**
|
|
1426
|
-
* The barrels a consumer can import a component FROM. The root one is not the whole surface: a
|
|
1427
|
-
* chart-layer fork (`ChartFrame`, `CartesianChart`, `ChartCard`, …) collided with nothing, because
|
|
1428
|
-
* `./charts` is deliberately NOT re-exported from `.` — so a consumer whose forks all live in the
|
|
1429
|
-
* chart layer, which is the layer forks actually live in, could never trip the rule. It was
|
|
1430
|
-
* correctly silent there for the wrong reason.
|
|
1431
|
-
*
|
|
1432
|
-
* Enumerated rather than globbed: `dist/**\/index.d.ts` would also sweep internal directory
|
|
1433
|
-
* barrels that are not published subpaths, and a name that is not importable is not a fork of
|
|
1434
|
-
* anything. Keep this in step with the `exports` map in package.json.
|
|
1435
|
-
*/
|
|
1436
|
-
const BASALT_BARRELS = [
|
|
1437
|
-
['index.d.ts'],
|
|
1438
|
-
['charts', 'index.d.ts'],
|
|
1439
|
-
['content', 'index.d.ts'],
|
|
1440
|
-
['data', 'index.d.ts'],
|
|
1441
|
-
['forms', 'index.d.ts'],
|
|
1442
|
-
['agent', 'index.d.ts'],
|
|
1443
|
-
['commands', 'index.d.ts'],
|
|
1444
|
-
['notifications', 'index.d.ts'],
|
|
1445
|
-
['connectivity', 'index.d.ts'],
|
|
1446
|
-
]
|
|
1447
|
-
|
|
1448
|
-
/**
|
|
1449
|
-
* Every component-shaped VALUE export of basalt's published barrels, read once at module load from
|
|
1450
|
-
* the real `.d.ts` files — not a hand-maintained list that would go stale the first time an export
|
|
1451
|
-
* was renamed. `type` specifiers are skipped: a local `StatCardProps` is a normal thing to write, a
|
|
1452
|
-
* local `StatCard` is not.
|
|
1453
|
-
*
|
|
1454
|
-
* Empty (rule silent) when `dist` is unreadable, exactly like `BASALT_AI_MAJOR` — a lint run must
|
|
1455
|
-
* not depend on a build having happened.
|
|
1456
|
-
*/
|
|
1457
|
-
const BASALT_EXPORTS = (() => {
|
|
1458
|
-
const names = new Set()
|
|
1459
|
-
for (const segments of BASALT_BARRELS) {
|
|
1460
|
-
let text
|
|
1461
|
-
try {
|
|
1462
|
-
text = readFileSync(resolvePath(PACKAGE_ROOT, 'dist', ...segments), 'utf8')
|
|
1463
|
-
} catch {
|
|
1464
|
-
continue
|
|
1465
|
-
}
|
|
1466
|
-
for (const block of text.matchAll(/export\s*\{([^}]*)\}(?:\s*from\s*['"]([^'"]*)['"])?/g)) {
|
|
1467
|
-
// A pass-through re-export of a THIRD-PARTY name is not a basalt composite. `./charts`
|
|
1468
|
-
// re-exports `Bar`, `Line`, `Pie`, `AreaClosed` … straight from `@visx/shape`, and a local
|
|
1469
|
-
// `Bar` is not a fork of anything basalt wrote — the playground's own demo tripped on it the
|
|
1470
|
-
// moment this rule started reading the charts barrel. Relative sources only.
|
|
1471
|
-
const source = block[2]
|
|
1472
|
-
if (source !== undefined && !source.startsWith('.')) continue
|
|
1473
|
-
for (const raw of block[1].split(',')) {
|
|
1474
|
-
const part = raw.trim()
|
|
1475
|
-
if (part === '' || part.startsWith('type ')) continue
|
|
1476
|
-
const name = (part.split(/\s+as\s+/).pop() ?? '').trim()
|
|
1477
|
-
if (COMPONENT_NAME.test(name)) names.add(name)
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
return names
|
|
1482
|
-
})()
|
|
1483
|
-
|
|
1484
|
-
/**
|
|
1485
|
-
* Renames that ARE the collision, spelled out because the name no longer collides.
|
|
1486
|
-
*
|
|
1487
|
-
* `BASALT_EXPORTS` catches a fork that kept basalt's name. The commoner shape is a fork that
|
|
1488
|
-
* renamed it: argo's `PageHeader`, linewatch's `WindowSelector`, rb's `HeroCard`. Each of these is
|
|
1489
|
-
* the same composite under a different word, so the tripwire has to name the words — and unlike the
|
|
1490
|
-
* barrel read, this table is hand-maintained by construction: there is no artifact to derive
|
|
1491
|
-
* "someone else's word for `Section`" from. Keep it in step with `docs/CONTROLS-SPEC.md` §6.
|
|
1492
|
-
*
|
|
1493
|
-
* A name is evidence, never proof — which is why the table is exact, not fuzzy.
|
|
1494
|
-
*/
|
|
1495
|
-
const SHADOW_ALIASES = {
|
|
1496
|
-
PageSection: 'Section',
|
|
1497
|
-
SectionTitle: 'Section',
|
|
1498
|
-
SectionHeading: 'Section',
|
|
1499
|
-
WindowSelector: 'RangeFilter',
|
|
1500
|
-
RangeSelector: 'RangeFilter',
|
|
1501
|
-
DateFilter: 'RangeFilter',
|
|
1502
|
-
ViewSwitch: 'ViewTabs',
|
|
1503
|
-
ViewToggle: 'ViewTabs',
|
|
1504
|
-
RefreshButton: 'SyncButton',
|
|
1505
|
-
SyncControl: 'SyncButton',
|
|
1506
|
-
SyncStatusButton: 'SyncButton',
|
|
1507
|
-
PageHeader: 'PageBar',
|
|
1508
|
-
FilterBar: 'PageBar',
|
|
1509
|
-
HeroCard: 'StatCard',
|
|
1510
|
-
HeroStats: 'StatCard',
|
|
1511
|
-
ButtonGroup: 'ControlGroup',
|
|
1512
|
-
ButtonRow: 'ControlGroup',
|
|
1513
|
-
JoinedButtons: 'ControlGroup',
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
/**
|
|
1517
|
-
* The basalt export NAMES a file imports, each mapped to the LOCAL bindings it arrived under —
|
|
1518
|
-
* `StatCard → {StatCard}` for `import { StatCard }`, `StatCard → {BaseStatCard}` for
|
|
1519
|
-
* `import { StatCard as BaseStatCard }`.
|
|
1520
|
-
*
|
|
1521
|
-
* The counterpart of {@link collectBasaltImports}, keyed the other way round: that one collects
|
|
1522
|
-
* LOCAL names (is this `<Section>` basalt's?), this one is keyed by the CANONICAL export (does this
|
|
1523
|
-
* file compose basalt's `StatCard` at all?). An alias is precisely the case that separates them —
|
|
1524
|
-
* a wrapper importing `StatCard as BaseStatCard` composes `StatCard`, and a set of local names
|
|
1525
|
-
* would answer `BaseStatCard`. The local half is carried alongside because an import alone is not
|
|
1526
|
-
* composition: the caller has to check the binding is REFERENCED (see
|
|
1527
|
-
* {@link isValueReferencePosition}).
|
|
1528
|
-
*
|
|
1529
|
-
* TYPE-ONLY specifiers are skipped, declaration-level and per-specifier, exactly as
|
|
1530
|
-
* `agent-no-raw-usechat` skips them: `import type { StatCard }` is erased at compile time, so a fork
|
|
1531
|
-
* copying the original's props through `ComponentProps<typeof StatCard>` composes nothing at all.
|
|
1532
|
-
*
|
|
1533
|
-
* Only the package name and its subpaths; no relative half, because `shadow-basalt-export` already
|
|
1534
|
-
* returns early inside basalt's own source, where a relative import would be the dogfood lane.
|
|
1535
|
-
*/
|
|
1536
|
-
function collectBasaltImportedNames(node, into) {
|
|
1537
|
-
const source = node.source?.value
|
|
1538
|
-
if (typeof source !== 'string' || !BASALT_IMPORT_SOURCE.test(source)) return
|
|
1539
|
-
if (node.importKind === 'type') return
|
|
1540
|
-
for (const spec of node.specifiers ?? []) {
|
|
1541
|
-
if (spec.importKind === 'type') continue
|
|
1542
|
-
const imported = spec.imported?.name ?? spec.imported?.value
|
|
1543
|
-
const local = spec.local?.name
|
|
1544
|
-
if (typeof imported !== 'string' || typeof local !== 'string') continue
|
|
1545
|
-
const locals = into.get(imported)
|
|
1546
|
-
if (locals === undefined) into.set(imported, new Set([local]))
|
|
1547
|
-
else locals.add(local)
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
/** The positions an `Identifier`/`JSXIdentifier` occupies WITHOUT referencing a value. */
|
|
1552
|
-
const NON_VALUE_IDENTIFIER_PARENTS = new Set([
|
|
1553
|
-
// The binding's own declaration, not a use of it.
|
|
1554
|
-
'ImportSpecifier',
|
|
1555
|
-
'ImportDefaultSpecifier',
|
|
1556
|
-
'ImportNamespaceSpecifier',
|
|
1557
|
-
// A JSX attribute's NAME (`value={…}`), not its value.
|
|
1558
|
-
'JSXAttribute',
|
|
1559
|
-
])
|
|
1560
|
-
|
|
1561
|
-
/**
|
|
1562
|
-
* Does this identifier REFERENCE a value, rather than declare or type-position it?
|
|
1563
|
-
*
|
|
1564
|
-
* The type half matters as much as the import half: `typeof StatCard` parses as a `TSTypeQuery`
|
|
1565
|
-
* around a plain `Identifier`, so a value import used only in a type is indistinguishable from a
|
|
1566
|
-
* rendered one without this test — and that shape (a fork copying the original's props) is the
|
|
1567
|
-
* whole reason the composition check exists.
|
|
1568
|
-
*/
|
|
1569
|
-
function isValueReferencePosition(node) {
|
|
1570
|
-
const parentType = node.parent?.type
|
|
1571
|
-
if (typeof parentType !== 'string') return false
|
|
1572
|
-
return !parentType.startsWith('TS') && !NON_VALUE_IDENTIFIER_PARENTS.has(parentType)
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
function shadowAliasMessage(name, canonical) {
|
|
1576
|
-
return (
|
|
1577
|
-
`Local component '${name}' is a renamed '${canonical}' — basalt ships that composite, and a ` +
|
|
1578
|
-
'renamed fork is the shape the name-collision half of this rule can never see (laws C8/C12). ' +
|
|
1579
|
-
`Import ${canonical} from 'basalt-ui' (or 'basalt-ui/controls') instead of re-rolling it; if ` +
|
|
1580
|
-
'this genuinely is a different component, rename it and the rule goes quiet. ' +
|
|
1581
|
-
'(basalt/shadow-basalt-export)'
|
|
1582
|
-
)
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
function shadowBasaltExportMessage(name) {
|
|
1586
|
-
return (
|
|
1587
|
-
`Local component '${name}' collides with the basalt-ui export of the same name — import it ` +
|
|
1588
|
-
"from 'basalt-ui' instead of re-rolling it. This is the one signal a forked composite emits: " +
|
|
1589
|
-
'the palette guard can never see it, because a fork written by a token-fluent author uses ' +
|
|
1590
|
-
'exactly the right tokens and passes every other check. A NAME collision is the whole of the ' +
|
|
1591
|
-
'signal, so this is a tripwire, not coverage: rename the fork and the rule goes quiet ' +
|
|
1592
|
-
"(linewatch's forks are `Cell` and `Box`, rb's is `Stat`). Silence here is not evidence that " +
|
|
1593
|
-
'nothing is forked. (basalt/shadow-basalt-export)'
|
|
1594
|
-
)
|
|
1595
|
-
}
|
|
1596
|
-
|
|
1597
|
-
/**
|
|
1598
|
-
* Flags a local declaration whose name collides with a live basalt export.
|
|
1599
|
-
*
|
|
1600
|
-
* The cheapest possible detector for the whole absorption class: argo shipped its own `EmptyState`
|
|
1601
|
-
* (a full duplicate of the shipped one) and rb a local `StatCard`, and both passed `check-theme`,
|
|
1602
|
-
* `oxlint` and `doctor` clean — off-palette code fails, a forked component that uses the correct
|
|
1603
|
-
* tokens does not. `error` since 2.0 (the major is the channel); a genuinely different `Composer`
|
|
1604
|
-
* takes a `theme-allow shadow-basalt-export — <why>`.
|
|
1605
|
-
*/
|
|
1606
|
-
// Ships: error
|
|
1607
|
-
const shadowBasaltExport = {
|
|
1608
|
-
meta: {
|
|
1609
|
-
type: 'suggestion',
|
|
1610
|
-
docs: {
|
|
1611
|
-
description: 'Disallow a local component whose name collides with a basalt-ui export.',
|
|
1612
|
-
},
|
|
1613
|
-
schema: [],
|
|
1614
|
-
},
|
|
1615
|
-
create(context) {
|
|
1616
|
-
const filename = getFilename(context)
|
|
1617
|
-
// basalt's own source DEFINES these names; a consumer's does not.
|
|
1618
|
-
if (BASALT_EXPORTS.size === 0 || filename.startsWith(`${PACKAGE_ROOT}/`)) return {}
|
|
1619
|
-
if (isTestFile(context)) return {}
|
|
1620
|
-
// Scoped exactly like `ai-sdk-major`, and for the same reason: a package with no basalt-ui
|
|
1621
|
-
// dependency (or one outside a declared `basalt.roots`) cannot import the export it is accused
|
|
1622
|
-
// of forking, so the advice — "import it from 'basalt-ui' instead" — is not followable there.
|
|
1623
|
-
// obsidian's React-free `obsidian-vault-core` took the report and had to waive it.
|
|
1624
|
-
if (filename.length === 0 || !isBasaltScopedFile(filename)) return {}
|
|
1625
|
-
|
|
1626
|
-
// Candidates are BUFFERED and judged at `Program:exit`, the same shape the chart and control
|
|
1627
|
-
// rules use: the alias exemption below needs the file's whole import list AND every reference in
|
|
1628
|
-
// the file, and a declaration hoisted above its imports would otherwise be judged against an
|
|
1629
|
-
// empty one.
|
|
1630
|
-
/** Canonical basalt export → the local bindings it was imported under (value imports only). */
|
|
1631
|
-
const basaltImportedNames = new Map()
|
|
1632
|
-
/** Every local name the file REFERENCES as a value — the composition half of the exemption. */
|
|
1633
|
-
const referencedLocals = new Set()
|
|
1634
|
-
const candidates = []
|
|
1635
|
-
|
|
1636
|
-
/** Does the file compose basalt's `canonical` — imported as a value AND referenced? */
|
|
1637
|
-
const composes = (canonical) => {
|
|
1638
|
-
const locals = basaltImportedNames.get(canonical)
|
|
1639
|
-
if (locals === undefined) return false
|
|
1640
|
-
for (const local of locals) {
|
|
1641
|
-
if (referencedLocals.has(local)) return true
|
|
1642
|
-
}
|
|
1643
|
-
return false
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
const noteReference = (node) => {
|
|
1647
|
-
if (typeof node.name !== 'string' || !isValueReferencePosition(node)) return
|
|
1648
|
-
referencedLocals.add(node.name)
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
const note = (node, name) => {
|
|
1652
|
-
if (typeof name !== 'string') return
|
|
1653
|
-
const alias = Object.hasOwn(SHADOW_ALIASES, name) ? SHADOW_ALIASES[name] : undefined
|
|
1654
|
-
if (!BASALT_EXPORTS.has(name) && alias === undefined) return
|
|
1655
|
-
candidates.push({ node, name, alias })
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
return {
|
|
1659
|
-
ImportDeclaration(node) {
|
|
1660
|
-
collectBasaltImportedNames(node, basaltImportedNames)
|
|
1661
|
-
},
|
|
1662
|
-
// Both halves are needed and neither subsumes the other: a JSX tag is a `JSXIdentifier`
|
|
1663
|
-
// (`<Base/>`), while every other use of the same binding is an `Identifier`
|
|
1664
|
-
// (`component={Base}`, `createElement(Base)`, `memo(Base)`).
|
|
1665
|
-
Identifier(node) {
|
|
1666
|
-
noteReference(node)
|
|
1667
|
-
},
|
|
1668
|
-
JSXIdentifier(node) {
|
|
1669
|
-
noteReference(node)
|
|
1670
|
-
},
|
|
1671
|
-
FunctionDeclaration(node) {
|
|
1672
|
-
note(node, node.id?.name)
|
|
1673
|
-
},
|
|
1674
|
-
VariableDeclarator(node) {
|
|
1675
|
-
if (!isComponentInit(node.init)) return
|
|
1676
|
-
note(node, node.id?.name)
|
|
1677
|
-
},
|
|
1678
|
-
// A class only counts when it EXTENDS something — a legacy class component. basalt ships no
|
|
1679
|
-
// class components, so a standalone `class X {}` sharing a name with one of its exports is a
|
|
1680
|
-
// collision between two unrelated things, not a fork.
|
|
1681
|
-
ClassDeclaration(node) {
|
|
1682
|
-
if (node.superClass === null || node.superClass === undefined) return
|
|
1683
|
-
note(node, node.id?.name)
|
|
1684
|
-
},
|
|
1685
|
-
'Program:exit'() {
|
|
1686
|
-
for (const { node, name, alias } of candidates) {
|
|
1687
|
-
// A file that COMPOSES the export it renames is a wrapper, not a fork, and the advice
|
|
1688
|
-
// ("import StatCard instead of re-rolling it") is already followed — argo's three hero
|
|
1689
|
-
// cards each imported `StatCard` and wrapped it, and each took a warn for it.
|
|
1690
|
-
//
|
|
1691
|
-
// COMPOSES, not "imports": an import the file never references is not composition, and the
|
|
1692
|
-
// two shapes that reach here silently are the ones a fork actually writes — a type-only
|
|
1693
|
-
// `import type { StatCard }` feeding `ComponentProps<typeof StatCard>` (props copied,
|
|
1694
|
-
// nothing rendered) and a dead import left behind after the body was re-rolled. Both used
|
|
1695
|
-
// to exempt the whole file.
|
|
1696
|
-
//
|
|
1697
|
-
// The collision half is deliberately NOT exempted either way: a local `StatCard` beside an
|
|
1698
|
-
// `import { StatCard as Base }` is a fork that kept the name AND kept a piece of the
|
|
1699
|
-
// original, which is the shape this rule most wants to see.
|
|
1700
|
-
if (alias !== undefined && composes(alias)) continue
|
|
1701
|
-
if (hasThemeAllow(context, node, 'shadow-basalt-export')) continue
|
|
1702
|
-
const message =
|
|
1703
|
-
alias === undefined ? shadowBasaltExportMessage(name) : shadowAliasMessage(name, alias)
|
|
1704
|
-
context.report({ node, message })
|
|
1705
|
-
}
|
|
1706
|
-
},
|
|
1707
|
-
}
|
|
1708
|
-
},
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
// ── Rule 15 — hand-rolled-shell ──────────────────────────────────────────────────────────────────
|
|
1712
|
-
|
|
1713
|
-
/** Mantine parts that only ever appear when someone is assembling an application shell by hand. */
|
|
1714
|
-
// `NavLink` is deliberately NOT here: Mantine's NavLink is a legitimate standalone list row, and a
|
|
1715
|
-
// rule that fires on one inside a settings page would be switched off within a day. `Burger` and the
|
|
1716
|
-
// `AppShell.*` parts have no use outside assembling a shell.
|
|
1717
|
-
const SHELL_ASSEMBLY_TAGS = new Set(['Burger'])
|
|
1718
|
-
const SHELL_ASSEMBLY_MEMBER_OBJECT = 'AppShell'
|
|
1719
|
-
|
|
1720
|
-
const HAND_ROLLED_SHELL_MESSAGE =
|
|
1721
|
-
'Application shell assembled by hand — AppShell parts / Burger / NavLink in a file that does not ' +
|
|
1722
|
-
'render BasaltShell. The shell is the framework: BasaltShell owns the sidebar, the mobile tab ' +
|
|
1723
|
-
'bar and its More sheet, breadcrumbs, the page header and the collapse state, all driven by ONE ' +
|
|
1724
|
-
'typed nav definition (defineNav + BasaltShell nav={NAV}). A hand-rolled AppShell + burger drawer is the exact ' +
|
|
1725
|
-
'layer the 1.19 nav contract replaces, and no palette guard can see it — it uses the right ' +
|
|
1726
|
-
'tokens. Declare a deliberate exception with `theme-allow-file hand-rolled-shell — <why>`. ' +
|
|
1727
|
-
'(basalt/hand-rolled-shell)'
|
|
1728
|
-
|
|
1729
|
-
/**
|
|
1730
|
-
* The `hand-rolled-plot` shape, one layer up. rb shipped 266 lines of `AppShell` + `NavLink` +
|
|
1731
|
-
* `Burger` + `useDisclosure` mobile drawer and every gate passed it green.
|
|
1732
|
-
*
|
|
1733
|
-
* File-scoped and reported once: which shell a file uses is one decision, so one comment settles
|
|
1734
|
-
* it. The module that DEFINES `BasaltShell` is exempt by declaration, not by path — a rule saying
|
|
1735
|
-
* "compose X" cannot fire inside X.
|
|
1736
|
-
*/
|
|
1737
|
-
// Ships: error
|
|
1738
|
-
const handRolledShell = {
|
|
1739
|
-
meta: {
|
|
1740
|
-
type: 'suggestion',
|
|
1741
|
-
docs: { description: 'Disallow assembling an app shell by hand instead of using BasaltShell.' },
|
|
1742
|
-
schema: [],
|
|
1743
|
-
},
|
|
1744
|
-
create(context) {
|
|
1745
|
-
if (isTestFile(context)) return {}
|
|
1746
|
-
|
|
1747
|
-
const assemblyNodes = []
|
|
1748
|
-
let mantineImported = false
|
|
1749
|
-
let ownsShell = false
|
|
1750
|
-
|
|
1751
|
-
const notesOwnerDefinition = (name) => {
|
|
1752
|
-
if (name === 'BasaltShell') ownsShell = true
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
return {
|
|
1756
|
-
ImportDeclaration(node) {
|
|
1757
|
-
if ((node.source?.value ?? '').startsWith('@mantine/')) mantineImported = true
|
|
1758
|
-
},
|
|
1759
|
-
FunctionDeclaration(node) {
|
|
1760
|
-
notesOwnerDefinition(node.id?.name)
|
|
1761
|
-
},
|
|
1762
|
-
VariableDeclarator(node) {
|
|
1763
|
-
notesOwnerDefinition(node.id?.name)
|
|
1764
|
-
},
|
|
1765
|
-
JSXOpeningElement(node) {
|
|
1766
|
-
const name = node.name
|
|
1767
|
-
if (name?.type === 'JSXMemberExpression') {
|
|
1768
|
-
if (name.object?.name === SHELL_ASSEMBLY_MEMBER_OBJECT) assemblyNodes.push(node)
|
|
1769
|
-
return
|
|
1770
|
-
}
|
|
1771
|
-
if (name?.name === 'BasaltShell') ownsShell = true
|
|
1772
|
-
else if (SHELL_ASSEMBLY_TAGS.has(name?.name)) assemblyNodes.push(node)
|
|
1773
|
-
},
|
|
1774
|
-
'Program:exit'() {
|
|
1775
|
-
if (ownsShell || !mantineImported) return
|
|
1776
|
-
const [first] = assemblyNodes
|
|
1777
|
-
if (first === undefined) return
|
|
1778
|
-
if (hasThemeAllow(context, first, 'hand-rolled-shell')) return
|
|
1779
|
-
if (hasFileDeclaration(context, 'hand-rolled-shell')) return
|
|
1780
|
-
context.report({ node: first, message: HAND_ROLLED_SHELL_MESSAGE })
|
|
1781
|
-
},
|
|
1782
|
-
}
|
|
1783
|
-
},
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
// ── Control homes — the shared slot-ancestry walk (C1/C5, docs/CONTROLS-SPEC.md §6) ─────────────
|
|
1787
|
-
|
|
1788
|
-
/**
|
|
1789
|
-
* The slot props a control enters a TIERED home through (law C1). A control is only ever IN one of
|
|
1790
|
-
* these homes by being the value of one of these props — never by sitting in a home's children,
|
|
1791
|
-
* which is the body form (a `Section`'s own content, a `SettingsSection`'s rows) and carries no tier
|
|
1792
|
-
* obligation at all.
|
|
1793
|
-
*
|
|
1794
|
-
* **`control` is deliberately absent, and `SettingsRow` with it** (see {@link SLOT_OWNER_TAGS}):
|
|
1795
|
-
* `SettingsRow.control` is law C1's THIRD home, the form row, and a form keeps Mantine's own `md`
|
|
1796
|
-
* tier (`controlHeight` 42 — `docs/CONTROLS-SPEC.md` §5, unchanged). So a raw `Select` bound to a
|
|
1797
|
-
* setting is legitimate there and a `size` literal there is not a tier violation; only
|
|
1798
|
-
* `control-outside-home` cares about a settings row at all, and it treats it as a home
|
|
1799
|
-
* (`CONTROL_HOST_TAGS`) so nothing fires inside one. The two tier rules would otherwise have told
|
|
1800
|
-
* every settings page in every consumer to drop a prop that is what keeps the row at the form tier
|
|
1801
|
-
* — `src/dashboard/settings-section.tsx` wraps `actions` in `CtlSlot`, never `control`.
|
|
1802
|
-
*/
|
|
1803
|
-
const SLOT_ATTRS = new Set(['actions', 'filters', 'tabs', 'sync', 'filtersEnd'])
|
|
1804
|
-
|
|
1805
|
-
/**
|
|
1806
|
-
* The elements whose slot props ARE tiered homes. All THREE halves of the test matter: `actions` on
|
|
1807
|
-
* a consumer's own `<Toolbar actions={…}>` is not a basalt home, a `Section`'s CHILDREN are not a
|
|
1808
|
-
* slot (so the walk stops at the slot ATTRIBUTE, never at the element), and the tag must resolve to
|
|
1809
|
-
* a component imported FROM basalt ({@link collectBasaltImports}) — `Section` is one of the most
|
|
1810
|
-
* common local component names there is, and matching it by bare name made a consumer's own
|
|
1811
|
-
* section an `error`-level tiered home.
|
|
1812
|
-
*
|
|
1813
|
-
* `SettingsSection` is here for its `actions` header slot (`CtlSlot`-wrapped); `SettingsRow` is
|
|
1814
|
-
* NOT — its `control` is the form-row home and keeps Mantine's `md` tier. See {@link SLOT_ATTRS}.
|
|
1815
|
-
*/
|
|
1816
|
-
const SLOT_OWNER_TAGS = new Set([
|
|
1817
|
-
'PageBar',
|
|
1818
|
-
'Section',
|
|
1819
|
-
'WidgetHeader',
|
|
1820
|
-
'ChartCard',
|
|
1821
|
-
'StatCard',
|
|
1822
|
-
'BasaltDataTable',
|
|
1823
|
-
'SettingsSection',
|
|
1824
|
-
'FilterSet',
|
|
1825
|
-
])
|
|
1826
|
-
|
|
1827
|
-
/**
|
|
1828
|
-
* Raw Mantine selection controls — the shape a store-bound basalt filter replaces. Membership is
|
|
1829
|
-
* checked against the file's `@mantine/*` IMPORTS, not the bare tag name: a consumer's own
|
|
1830
|
-
* `<Select>` (a wrapper, a re-export, a different component entirely) is not the Mantine one, and
|
|
1831
|
-
* these rules ship to consumers.
|
|
1832
|
-
*/
|
|
1833
|
-
const RAW_FILTER_TAGS = new Set([
|
|
1834
|
-
'SegmentedControl',
|
|
1835
|
-
'Select',
|
|
1836
|
-
'MultiSelect',
|
|
1837
|
-
'NativeSelect',
|
|
1838
|
-
'DatePickerInput',
|
|
1839
|
-
'DateInput',
|
|
1840
|
-
'TagsInput',
|
|
1841
|
-
'Chip.Group',
|
|
1842
|
-
])
|
|
1843
|
-
|
|
1844
|
-
/** The bound controls a home is SUPPOSED to hold — `basalt-ui/controls`, each over a FieldHandle. */
|
|
1845
|
-
const BOUND_TAGS = new Set([
|
|
1846
|
-
'RangeFilter',
|
|
1847
|
-
'CompareFilter',
|
|
1848
|
-
'SelectFilter',
|
|
1849
|
-
'MultiSelectFilter',
|
|
1850
|
-
'NumberFilter',
|
|
1851
|
-
'SearchFilter',
|
|
1852
|
-
'ToggleFilter',
|
|
1853
|
-
'ViewTabs',
|
|
1854
|
-
])
|
|
1855
|
-
|
|
1856
|
-
/**
|
|
1857
|
-
* The names whose DECLARATION means this file defines a basalt control rather than consuming one —
|
|
1858
|
-
* the owner exemption, the same shape as `hand-rolled-plot`'s `notesOwnerDefinition`: a rule that
|
|
1859
|
-
* says "use a bound control" cannot fire inside the module that IS the bound control.
|
|
1860
|
-
*
|
|
1861
|
-
* **The declaration alone is not enough, and the second half is what makes the set safe to widen.**
|
|
1862
|
-
* `PanelRow`, `EnumFilter` and `SliderControl` are ordinary names a consumer writes for their own
|
|
1863
|
-
* helpers, and a bare-name match let one local `function PanelRow(…)` switch `control-outside-home`,
|
|
1864
|
-
* `bound-control-outside-home` and `responsive-twin` off for that WHOLE file. So the exemption also
|
|
1865
|
-
* requires the file to import NOTHING from `basalt-ui*`: basalt's own control sources import each
|
|
1866
|
-
* other RELATIVELY, while a consumer of basalt always names the package. A file that consumes
|
|
1867
|
-
* basalt is not the module that defines its controls, whatever it calls its helpers.
|
|
1868
|
-
*/
|
|
1869
|
-
const CONTROL_OWNER_NAMES = new Set([
|
|
1870
|
-
...BOUND_TAGS,
|
|
1871
|
-
'FilterSet',
|
|
1872
|
-
'FilterPill',
|
|
1873
|
-
// The INTERNAL control modules, listed for the same reason the public names are: `EnumFilter` is
|
|
1874
|
-
// the shared body behind SelectFilter/CompareFilter/NumberFilter, and `PanelRow`/`SliderControl`
|
|
1875
|
-
// are the aside's row primitives (`docs/ASIDE-SPEC.md` §3). A module that IS a bound control
|
|
1876
|
-
// cannot be told to use one. This is a RELAXATION, so it needs no grace entry (C16).
|
|
1877
|
-
'EnumFilter',
|
|
1878
|
-
'PanelRow',
|
|
1879
|
-
'SliderControl',
|
|
1880
|
-
'SyncButton',
|
|
1881
|
-
'ActionGroup',
|
|
1882
|
-
'OverflowMenu',
|
|
1883
|
-
'CtlSlot',
|
|
1884
|
-
])
|
|
1885
|
-
|
|
1886
|
-
/**
|
|
1887
|
-
* Where a raw selection control legitimately lives outside a TIERED home: a settings row, a form
|
|
1888
|
-
* row, an overlay, a composer. Every one of these is a place the tier does not apply, so the advice
|
|
1889
|
-
* ("move it into a home slot") would be wrong rather than merely unwelcome.
|
|
1890
|
-
*
|
|
1891
|
-
* `SettingsRow` is the form row — law C1's third home, not an exception to C1 — so
|
|
1892
|
-
* `control-outside-home` treating it as a home is the whole of the enforcement a settings page
|
|
1893
|
-
* gets, and the two tier rules deliberately do not reach inside it (see {@link SLOT_ATTRS}).
|
|
1894
|
-
* `FormRow`/`FormGroup` (`basalt-ui/controls`, `src/controls/form-layout.tsx`; `basalt-ui/forms`
|
|
1895
|
-
* re-exports them until 1.39.0 — the set is NAME-matched, so both subpaths are homes) are the SAME
|
|
1896
|
-
* home written for a `<form>` rather than a settings page — a `TextInput` bound to a field is read and typed
|
|
1897
|
-
* into at Mantine's own tier, not a 30px chrome affordance — so they are added here rather than
|
|
1898
|
-
* given a second walk.
|
|
1899
|
-
*
|
|
1900
|
-
* Declared with the shared slot walk rather than beside `control-outside-home` because three rules
|
|
1901
|
-
* read it: that rule's ancestry exemption, and {@link hostedInsideSlot} for the two tier rules.
|
|
1902
|
-
*/
|
|
1903
|
-
const CONTROL_HOST_TAGS = new Set([
|
|
1904
|
-
'SettingsRow',
|
|
1905
|
-
'FormRow',
|
|
1906
|
-
'FormGroup',
|
|
1907
|
-
'Modal',
|
|
1908
|
-
'Drawer',
|
|
1909
|
-
'Popover.Dropdown',
|
|
1910
|
-
'Menu.Dropdown',
|
|
1911
|
-
'Composer',
|
|
1912
|
-
])
|
|
1913
|
-
|
|
1914
|
-
/**
|
|
1915
|
-
* The basalt elements whose CHILDREN are a home — the SUBTREE homes, where the body IS the surface
|
|
1916
|
-
* (`docs/ASIDE-SPEC.md` §3). `FilterSet` mounts the pill surface, `PageAside` the panel surface,
|
|
1917
|
-
* `PanelRow` the row itself (its `end` prop resolves here too: the attribute hangs off `PanelRow`'s
|
|
1918
|
-
* own opening element, so the ancestry walk reaches the element).
|
|
1919
|
-
*
|
|
1920
|
-
* Read by BOTH C1 rules, because the two must not disagree about what a home IS — before this set
|
|
1921
|
-
* existed `bound-control-outside-home` treated all three as homes and `control-outside-home` knew
|
|
1922
|
-
* none of them, so a raw `<Select>` inside a `<PageAside><PanelRow>` reported while the bound
|
|
1923
|
-
* control beside it did not.
|
|
1924
|
-
*
|
|
1925
|
-
* Unlike {@link CONTROL_HOST_TAGS} these are PROVENANCE-gated, the same test
|
|
1926
|
-
* {@link SLOT_OWNER_TAGS} applies and for the same reason: `PanelRow` is an ordinary name for a
|
|
1927
|
-
* consumer's own layout helper, and reading one as a basalt home would exempt a genuinely homeless
|
|
1928
|
-
* control. The overlay hosts stay name-matched because `Modal`/`Drawer` are Mantine's, not basalt's.
|
|
1929
|
-
*/
|
|
1930
|
-
const BASALT_HOST_TAGS = new Set(['FilterSet', 'PageAside', 'PanelRow'])
|
|
1931
|
-
|
|
1932
|
-
/**
|
|
1933
|
-
* A file whose NAME declares it is an overlay's or a form's own body — the cross-file half of
|
|
1934
|
-
* {@link CONTROL_HOST_TAGS}, and the one exemption here that is a CONVENTION rather than a fact
|
|
1935
|
-
* about the AST.
|
|
1936
|
-
*
|
|
1937
|
-
* It exists because law C1's cross-file case is explicitly advisory (`docs/CONTROLS-SPEC.md` §6,
|
|
1938
|
-
* "Honest coverage") and `control-outside-home` was paying for it in false positives: argo's
|
|
1939
|
-
* wave-7 run left 9 warns, all of them a `Select`/`SegmentedControl` inside a `*-modal.tsx` or
|
|
1940
|
-
* `*-form.tsx` whose `<Modal>` is rendered by the PARENT route. Nothing in the flagged file can see
|
|
1941
|
-
* the overlay, so no ancestry walk — however deep — will ever reach it, and the alternative is 9
|
|
1942
|
-
* `theme-allow-file` comments that say what the filename already says.
|
|
1943
|
-
*
|
|
1944
|
-
* The trade is stated plainly: this exempts a whole file on a naming convention, so a `Select` that
|
|
1945
|
-
* genuinely belongs in a page bar goes unreported if it is written in `filters-panel.tsx`. That is
|
|
1946
|
-
* the same bargain `@mantine/form` already buys and a strictly smaller one than promoting the rule
|
|
1947
|
-
* with 9 known false positives. `-panel.tsx` is the loosest member and the one to reconsider first
|
|
1948
|
-
* if the set ever needs narrowing.
|
|
1949
|
-
*
|
|
1950
|
-
* TWO dialects, because a repo picks one file-naming law and the convention has to survive either:
|
|
1951
|
-
* `edit-session-modal.tsx` (kebab) and `CbbiPanel.tsx` (PascalCase — what a repo mandating
|
|
1952
|
-
* `PascalCase.tsx` for component files writes, basalt's own root `AGENTS.md` included). The kebab
|
|
1953
|
-
* form alone could never match a component file in such a repo, which is exactly how the CBBI panel
|
|
1954
|
-
* — a `PageAside` child whose `<PageAside>` is in the PARENT page — collected four warns that no
|
|
1955
|
-
* ancestry walk in that file could ever have avoided.
|
|
1956
|
-
*
|
|
1957
|
-
* Both dialects require the leading SUBJECT: `Panel.tsx` and `modal.tsx` are page modules in every
|
|
1958
|
-
* consumer that has one, and a bare-noun exemption would switch the rules off wholesale.
|
|
1959
|
-
*
|
|
1960
|
-
* Basename only — a `modal/` DIRECTORY is not the convention, because a directory of modals holds
|
|
1961
|
-
* the page pieces around them too.
|
|
1962
|
-
*/
|
|
1963
|
-
const OVERLAY_CONVENTION_KEBAB = /^[^/]*-(?:modal|drawer|popover|panel|form)\.[jt]sx$/
|
|
1964
|
-
const OVERLAY_CONVENTION_PASCAL = /^[A-Z]\w*(?:Modal|Drawer|Popover|Panel|Form)\.[jt]sx$/
|
|
1965
|
-
|
|
1966
|
-
/**
|
|
1967
|
-
* The single predicate both `control-outside-home` and `bound-control-outside-home` ask — see
|
|
1968
|
-
* {@link OVERLAY_CONVENTION_KEBAB} for the whole trade. One function, so the two rules can never
|
|
1969
|
-
* disagree about what the convention IS; `src/guard/index.ts` carries the text-lane copy of the
|
|
1970
|
-
* same two dialects (`raw-selection-control`), pinned by both test files.
|
|
1971
|
-
*/
|
|
1972
|
-
function isOverlayConventionFile(filename) {
|
|
1973
|
-
const basename = filename.slice(filename.lastIndexOf('/') + 1)
|
|
1974
|
-
return OVERLAY_CONVENTION_KEBAB.test(basename) || OVERLAY_CONVENTION_PASCAL.test(basename)
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
/** How far an ancestry walk climbs before giving up — a JSX tree this deep is not a slot value. */
|
|
1978
|
-
const ANCESTRY_MAX_DEPTH = 60
|
|
1979
|
-
|
|
1980
|
-
/** A JSX tag name as written: `Select`, or `Chip.Group` for a member tag. */
|
|
1981
|
-
function jsxTagName(nameNode) {
|
|
1982
|
-
if (nameNode === null || nameNode === undefined) return undefined
|
|
1983
|
-
if (typeof nameNode.name === 'string') return nameNode.name
|
|
1984
|
-
const object = jsxTagName(nameNode.object)
|
|
1985
|
-
const property = nameNode.property?.name
|
|
1986
|
-
if (typeof object !== 'string' || typeof property !== 'string') return undefined
|
|
1987
|
-
return `${object}.${property}`
|
|
1988
|
-
}
|
|
1989
|
-
|
|
1990
|
-
/** The BINDING a JSX tag resolves through — `Chip` for `<Chip.Group>`, `Select` for `<Select>`. */
|
|
1991
|
-
function jsxRootName(nameNode) {
|
|
1992
|
-
if (nameNode === null || nameNode === undefined) return undefined
|
|
1993
|
-
if (typeof nameNode.name === 'string') return nameNode.name
|
|
1994
|
-
return jsxRootName(nameNode.object)
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
/** The value a namespace import (`import * as M from '@mantine/core'`) records for its local name. */
|
|
1998
|
-
const MANTINE_NAMESPACE = Symbol('mantine-namespace')
|
|
1999
|
-
|
|
2000
|
-
/**
|
|
2001
|
-
* Local name → the `@mantine/*` name it was imported UNDER — the provenance test the tag rules
|
|
2002
|
-
* apply, and a MAP rather than a set because the two are not the same string. `Select as
|
|
2003
|
-
* MantineSelect` is the canonical way a consumer wraps a Mantine component, and keying membership
|
|
2004
|
-
* on the local name meant `<MantineSelect value onChange/>` in a slot — the exact C1/C3 violation
|
|
2005
|
-
* `hand-rolled-filter` exists for — was invisible. A namespace import records
|
|
2006
|
-
* {@link MANTINE_NAMESPACE} so `<M.SegmentedControl>` resolves through the member path instead.
|
|
2007
|
-
*/
|
|
2008
|
-
function collectMantineImports(node, into) {
|
|
2009
|
-
const source = node.source?.value
|
|
2010
|
-
if (typeof source !== 'string' || !source.startsWith('@mantine/')) return
|
|
2011
|
-
for (const spec of node.specifiers ?? []) {
|
|
2012
|
-
const local = spec.local?.name
|
|
2013
|
-
if (typeof local !== 'string') continue
|
|
2014
|
-
if (spec.type === 'ImportNamespaceSpecifier') into.set(local, MANTINE_NAMESPACE)
|
|
2015
|
-
else into.set(local, spec.imported?.name ?? spec.imported?.value ?? local)
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
|
|
2019
|
-
/**
|
|
2020
|
-
* The `@mantine/*` name a JSX tag resolves to, or undefined when the tag is not a Mantine binding.
|
|
2021
|
-
*
|
|
2022
|
-
* `<Select>` → `Select`; `import { Select as MantineSelect }` + `<MantineSelect>` → `Select`;
|
|
2023
|
-
* `import { Chip as C }` + `<C.Group>` → `Chip.Group`; `import * as M` + `<M.SegmentedControl>` →
|
|
2024
|
-
* `SegmentedControl`. Resolution already implies provenance, so a caller tests the RESULT against
|
|
2025
|
-
* `RAW_FILTER_TAGS` and needs no separate import-membership check.
|
|
2026
|
-
*/
|
|
2027
|
-
function resolveMantineTag(nameNode, mantineImports) {
|
|
2028
|
-
const tag = jsxTagName(nameNode)
|
|
2029
|
-
const root = jsxRootName(nameNode)
|
|
2030
|
-
if (tag === undefined || root === undefined) return undefined
|
|
2031
|
-
const imported = mantineImports.get(root)
|
|
2032
|
-
if (imported === undefined) return undefined
|
|
2033
|
-
const member = tag.slice(root.length)
|
|
2034
|
-
if (imported !== MANTINE_NAMESPACE) return `${imported}${member}`
|
|
2035
|
-
return member === '' ? undefined : member.slice(1)
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
/** The package's own `src/` — where a RELATIVE import of `WidgetHeader` is still basalt's own. */
|
|
2039
|
-
const BASALT_OWN_SRC = `${resolvePath(PACKAGE_ROOT, 'src')}/`
|
|
2040
|
-
|
|
2041
|
-
/** `basalt-ui` and every published subpath — the sources a home component is imported FROM. */
|
|
2042
|
-
const BASALT_IMPORT_SOURCE = /^basalt-ui(?:\/|$)/
|
|
2043
|
-
|
|
2044
|
-
/** A relative specifier — `./section`, `../widget-header`. */
|
|
2045
|
-
const RELATIVE_IMPORT_SOURCE = /^\.\.?\//
|
|
2046
|
-
|
|
2047
|
-
/** Is the linted file part of basalt's OWN source tree — the dogfood side of the owner test? */
|
|
2048
|
-
function isBasaltOwnSource(filename) {
|
|
2049
|
-
return filename.startsWith(BASALT_OWN_SRC)
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
/**
|
|
2053
|
-
* Local names that resolve to a basalt HOME component — the owner-tag counterpart of
|
|
2054
|
-
* {@link collectMantineImports}, and for the same reason: `Section` is one of the most common local
|
|
2055
|
-
* component names there is (a marketing page, a docs layout), and reading a consumer's own
|
|
2056
|
-
* `<Section actions={…}>` as a tiered home made two `error`-level rules fire on code basalt has no
|
|
2057
|
-
* claim over.
|
|
2058
|
-
*
|
|
2059
|
-
* A relative import counts only inside basalt's own `src/` (`ownTree`), where `section.tsx` and
|
|
2060
|
-
* `data-table.tsx` render `<WidgetHeader actions={…}>`/`<FilterSet>` through `../widget-header`
|
|
2061
|
-
* rather than through the package name — without that half the dogfood surface goes silent, which
|
|
2062
|
-
* is the blind spot that let the 1.4.0 regression reach consumers.
|
|
2063
|
-
*
|
|
2064
|
-
* Known accepted false negative: a consumer re-exporting basalt's `Section` through their own
|
|
2065
|
-
* barrel (`from '@/ui'`) — the same gap the Mantine provenance test already accepts.
|
|
2066
|
-
*/
|
|
2067
|
-
function collectBasaltImports(node, into, ownTree) {
|
|
2068
|
-
const source = node.source?.value
|
|
2069
|
-
if (typeof source !== 'string') return
|
|
2070
|
-
if (!BASALT_IMPORT_SOURCE.test(source) && !(ownTree && RELATIVE_IMPORT_SOURCE.test(source))) {
|
|
2071
|
-
return
|
|
2072
|
-
}
|
|
2073
|
-
for (const spec of node.specifiers ?? []) {
|
|
2074
|
-
if (spec.local?.name !== undefined) into.add(spec.local.name)
|
|
2075
|
-
}
|
|
2076
|
-
}
|
|
2077
|
-
|
|
2078
|
-
/**
|
|
2079
|
-
* {@link collectBasaltImports} as a local→EXPORTED map — the same provenance test, keyed so a caller
|
|
2080
|
-
* can ask WHICH home it found rather than only whether it found one.
|
|
2081
|
-
*
|
|
2082
|
-
* `control-size-literal` needs the distinction: `ChartCard` is the one slot owner whose slot cannot
|
|
2083
|
-
* mount the tier theme, and `import { ChartCard as Card }` is a normal thing to write, so a
|
|
2084
|
-
* membership Set (which answers `Card`) could not express the exemption at all.
|
|
2085
|
-
*/
|
|
2086
|
-
function collectBasaltImportMap(node, into, ownTree) {
|
|
2087
|
-
const source = node.source?.value
|
|
2088
|
-
if (typeof source !== 'string') return
|
|
2089
|
-
if (!BASALT_IMPORT_SOURCE.test(source) && !(ownTree && RELATIVE_IMPORT_SOURCE.test(source))) {
|
|
2090
|
-
return
|
|
2091
|
-
}
|
|
2092
|
-
for (const spec of node.specifiers ?? []) {
|
|
2093
|
-
const local = spec.local?.name
|
|
2094
|
-
if (typeof local !== 'string') continue
|
|
2095
|
-
into.set(local, spec.imported?.name ?? spec.imported?.value ?? local)
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
|
|
2099
|
-
/**
|
|
2100
|
-
* The BINDING a home's slot prop hangs off — `PageBar` for `<PageBar filters={…}>` — or undefined
|
|
2101
|
-
* when `attr` is not a slot-shaped prop on a home-shaped tag.
|
|
2102
|
-
*
|
|
2103
|
-
* Provenance (is that `Section` basalt's?) is deliberately NOT tested here: the answer needs the
|
|
2104
|
-
* file's import list, which is only complete at `Program:exit`, while the ancestry a caller walks to
|
|
2105
|
-
* reach this attribute is only walkable during the visit. So the walk captures the NAME and the
|
|
2106
|
-
* caller resolves it against {@link collectBasaltImports}'s set afterwards.
|
|
2107
|
-
*/
|
|
2108
|
-
function slotOwnerBinding(attr) {
|
|
2109
|
-
if (attr === null || attr === undefined) return undefined
|
|
2110
|
-
if (attr.type === 'Property') return spreadSlotOwnerBinding(attr)
|
|
2111
|
-
if (attr.type !== 'JSXAttribute') return undefined
|
|
2112
|
-
const name = attr.name?.name
|
|
2113
|
-
if (typeof name !== 'string' || !SLOT_ATTRS.has(name)) return undefined
|
|
2114
|
-
const owner = attr.parent
|
|
2115
|
-
if (owner === null || owner === undefined || owner.type !== 'JSXOpeningElement') return undefined
|
|
2116
|
-
if (!SLOT_OWNER_TAGS.has(jsxTagName(owner.name) ?? '')) return undefined
|
|
2117
|
-
return jsxRootName(owner.name)
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
/**
|
|
2121
|
-
* Everything that may sit between a slot Property and the `{...}` spreading it. A conditional slot
|
|
2122
|
-
* is written as one of `{...obj}`, `{...(cond && { tabs })}` or `{...(cond ? { tabs } : {})}`, and
|
|
2123
|
-
* nothing else reaches a spread without changing what the property MEANS.
|
|
2124
|
-
*/
|
|
2125
|
-
const SPREAD_WRAPPER_TYPES = new Set([
|
|
2126
|
-
'ObjectExpression',
|
|
2127
|
-
'LogicalExpression',
|
|
2128
|
-
'ConditionalExpression',
|
|
2129
|
-
])
|
|
2130
|
-
|
|
2131
|
-
/**
|
|
2132
|
-
* {@link slotOwnerBinding} for a slot written as an OBJECT SPREAD — `<Section {...(cond && { tabs:
|
|
2133
|
-
* <ViewTabs/> })}>` is the same home as `<Section tabs={<ViewTabs/>}>` and used to be invisible,
|
|
2134
|
-
* because every control rule resolved homes off JSXAttribute nodes alone.
|
|
2135
|
-
*
|
|
2136
|
-
* That is not an exotic shape: under `exactOptionalPropertyTypes` a consumer CANNOT write
|
|
2137
|
-
* `tabs={cond ? <X/> : undefined}` at all — `undefined` is not assignable to an optional prop — so
|
|
2138
|
-
* the spread IS the idiom, and linewatch (a strict house-style repo) writes it three times in one
|
|
2139
|
-
* element. `bound-control-outside-home` therefore reported a false positive on every strict
|
|
2140
|
-
* consumer's conditional slot, waivable only by comment, on a rule scheduled to go `error`.
|
|
2141
|
-
*
|
|
2142
|
-
* The walk out is deliberately narrow ({@link SPREAD_WRAPPER_TYPES}): the property has to reach a
|
|
2143
|
-
* `JSXSpreadAttribute` through object/`&&`/`?:` nodes only. A property inside a `.map()`, a call
|
|
2144
|
-
* argument or a hoisted `const` is NOT claimed — that value is not written into this element, and
|
|
2145
|
-
* treating it as a home would exempt controls that really have none.
|
|
2146
|
-
*
|
|
2147
|
-
* A computed key (`{ [k]: <ViewTabs/> }`) is not a slot: the name is not knowable statically, and
|
|
2148
|
-
* guessing one direction or the other is exactly the "looks correct and is not" class the control
|
|
2149
|
-
* rules exist to remove.
|
|
2150
|
-
*/
|
|
2151
|
-
function spreadSlotOwnerBinding(property) {
|
|
2152
|
-
if (property.computed === true) return undefined
|
|
2153
|
-
const name = property.key?.name ?? property.key?.value
|
|
2154
|
-
if (typeof name !== 'string' || !SLOT_ATTRS.has(name)) return undefined
|
|
2155
|
-
let current = property.parent
|
|
2156
|
-
for (let depth = 0; current !== null && current !== undefined; depth++) {
|
|
2157
|
-
if (depth > ANCESTRY_MAX_DEPTH) return undefined
|
|
2158
|
-
if (current.type === 'JSXSpreadAttribute') break
|
|
2159
|
-
if (!SPREAD_WRAPPER_TYPES.has(current.type)) return undefined
|
|
2160
|
-
current = current.parent
|
|
2161
|
-
}
|
|
2162
|
-
if (current === null || current === undefined || current.type !== 'JSXSpreadAttribute') {
|
|
2163
|
-
return undefined
|
|
2164
|
-
}
|
|
2165
|
-
const owner = current.parent
|
|
2166
|
-
if (owner === null || owner === undefined || owner.type !== 'JSXOpeningElement') return undefined
|
|
2167
|
-
if (!SLOT_OWNER_TAGS.has(jsxTagName(owner.name) ?? '')) return undefined
|
|
2168
|
-
return jsxRootName(owner.name)
|
|
2169
|
-
}
|
|
2170
|
-
|
|
2171
|
-
/** The slot's prop name, spelled as {@link slotOwnerBinding} reads it (`tabs=` or `{ 'tabs': … }`). */
|
|
2172
|
-
function slotAttrName(attr) {
|
|
2173
|
-
if (attr === undefined) return undefined
|
|
2174
|
-
return attr.type === 'Property' ? (attr.key?.name ?? attr.key?.value) : attr.name?.name
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
|
-
/** The home slot attribute that ENCLOSES `node`, or undefined. Stops at the attribute, never the element. */
|
|
2178
|
-
function enclosingSlotAttribute(node) {
|
|
2179
|
-
let current = node.parent
|
|
2180
|
-
for (let depth = 0; current !== null && current !== undefined; depth++) {
|
|
2181
|
-
if (depth > ANCESTRY_MAX_DEPTH || current.type === 'Program') return undefined
|
|
2182
|
-
if (slotOwnerBinding(current) !== undefined) return current
|
|
2183
|
-
current = current.parent
|
|
2184
|
-
}
|
|
2185
|
-
return undefined
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
|
-
/**
|
|
2189
|
-
* Does an OVERLAY (or a settings row) sit between `node` and the home slot it is written in?
|
|
2190
|
-
*
|
|
2191
|
-
* Colocating a trigger with its overlay in a slot — a `New` button beside the `<Modal>` it opens, a
|
|
2192
|
-
* `Custom range` button beside its `<Popover.Dropdown>` — is the ordinary way to write both, and
|
|
2193
|
-
* the overlay's own contents are NOT in the bar: they portal out of it, they are not tiered by the
|
|
2194
|
-
* slot's `MantineThemeProvider`, and `control-outside-home` already declares every one of these a
|
|
2195
|
-
* non-home ({@link CONTROL_HOST_TAGS}). Before this test the same overlay was exempt outside a slot
|
|
2196
|
-
* and an `error` inside one.
|
|
2197
|
-
*
|
|
2198
|
-
* The walk stops at the slot attribute so an overlay ABOVE the home (a whole `PageBar` rendered
|
|
2199
|
-
* inside a `Modal`) does not exempt the bar's own controls.
|
|
2200
|
-
*/
|
|
2201
|
-
function hostedInsideSlot(node) {
|
|
2202
|
-
let current = node.parent
|
|
2203
|
-
for (let depth = 0; current !== null && current !== undefined; depth++) {
|
|
2204
|
-
if (depth > ANCESTRY_MAX_DEPTH || current.type === 'Program') return false
|
|
2205
|
-
if (
|
|
2206
|
-
current.type === 'JSXElement' &&
|
|
2207
|
-
CONTROL_HOST_TAGS.has(jsxTagName(current.openingElement?.name) ?? '')
|
|
2208
|
-
) {
|
|
2209
|
-
return true
|
|
2210
|
-
}
|
|
2211
|
-
if (current.type === 'JSXAttribute' && SLOT_ATTRS.has(current.name?.name ?? '')) return false
|
|
2212
|
-
// The object-spread spelling of the same boundary — see {@link spreadSlotOwnerBinding}.
|
|
2213
|
-
if (slotOwnerBinding(current) !== undefined) return false
|
|
2214
|
-
current = current.parent
|
|
2215
|
-
}
|
|
2216
|
-
return false
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
/** The name of the nearest enclosing `const x = …` binding — the hoisted-slot-value lookup. */
|
|
2220
|
-
function enclosingDeclaratorName(node) {
|
|
2221
|
-
let current = node.parent
|
|
2222
|
-
for (let depth = 0; current !== null && current !== undefined; depth++) {
|
|
2223
|
-
if (depth > ANCESTRY_MAX_DEPTH || current.type === 'Program') return undefined
|
|
2224
|
-
if (current.type === 'VariableDeclarator') {
|
|
2225
|
-
return typeof current.id?.name === 'string' ? current.id.name : undefined
|
|
2226
|
-
}
|
|
2227
|
-
current = current.parent
|
|
2228
|
-
}
|
|
2229
|
-
return undefined
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
/** True when any JSX ELEMENT ancestor of `node` opens with one of `tags`. */
|
|
2233
|
-
function hasAncestorTag(node, tags) {
|
|
2234
|
-
let current = node.parent
|
|
2235
|
-
for (let depth = 0; current !== null && current !== undefined; depth++) {
|
|
2236
|
-
if (depth > ANCESTRY_MAX_DEPTH || current.type === 'Program') return false
|
|
2237
|
-
if (current.type === 'JSXElement' && tags.has(jsxTagName(current.openingElement?.name) ?? '')) {
|
|
2238
|
-
return true
|
|
2239
|
-
}
|
|
2240
|
-
current = current.parent
|
|
2241
|
-
}
|
|
2242
|
-
return false
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
/**
|
|
2246
|
-
* The BINDINGS of every JSX ancestor of `node`, nearest first — {@link hasAncestorTag} for a
|
|
2247
|
-
* PROVENANCE-gated set. It returns names rather than a boolean for the same reason
|
|
2248
|
-
* {@link slotOwnerBinding} does: whether that `PanelRow` is basalt's is answered by the import list,
|
|
2249
|
-
* which is only complete at `Program:exit`, while the ancestry is only walkable during the visit.
|
|
2250
|
-
*
|
|
2251
|
-
*/
|
|
2252
|
-
function ancestorTagBindings(node, tags) {
|
|
2253
|
-
const found = []
|
|
2254
|
-
let current = node.parent
|
|
2255
|
-
for (let depth = 0; current !== null && current !== undefined; depth++) {
|
|
2256
|
-
if (depth > ANCESTRY_MAX_DEPTH || current.type === 'Program') break
|
|
2257
|
-
if (current.type === 'JSXElement' && tags.has(jsxTagName(current.openingElement?.name) ?? '')) {
|
|
2258
|
-
const root = jsxRootName(current.openingElement?.name)
|
|
2259
|
-
if (root !== undefined) found.push(root)
|
|
2260
|
-
}
|
|
2261
|
-
current = current.parent
|
|
2262
|
-
}
|
|
2263
|
-
return found
|
|
2264
|
-
}
|
|
2265
|
-
|
|
2266
|
-
/** Identifiers a slot attribute's value resolves through — `filters={pills}`, `actions={[a, b]}`. */
|
|
2267
|
-
function collectSlotValueIdentifiers(node, into, depth = 0) {
|
|
2268
|
-
if (node === null || node === undefined || depth > 8) return
|
|
2269
|
-
if (node.type === 'Identifier') {
|
|
2270
|
-
into.add(node.name)
|
|
2271
|
-
return
|
|
2272
|
-
}
|
|
2273
|
-
if (node.type === 'ArrayExpression') {
|
|
2274
|
-
for (const el of node.elements) collectSlotValueIdentifiers(el, into, depth + 1)
|
|
2275
|
-
return
|
|
2276
|
-
}
|
|
2277
|
-
if (node.type === 'ConditionalExpression') {
|
|
2278
|
-
collectSlotValueIdentifiers(node.consequent, into, depth + 1)
|
|
2279
|
-
collectSlotValueIdentifiers(node.alternate, into, depth + 1)
|
|
2280
|
-
return
|
|
2281
|
-
}
|
|
2282
|
-
if (node.type === 'LogicalExpression') {
|
|
2283
|
-
collectSlotValueIdentifiers(node.left, into, depth + 1)
|
|
2284
|
-
collectSlotValueIdentifiers(node.right, into, depth + 1)
|
|
2285
|
-
}
|
|
2286
|
-
}
|
|
2287
|
-
|
|
2288
|
-
/**
|
|
2289
|
-
* The shared "am I inside a home slot" resolver, and the one piece of state every control rule
|
|
2290
|
-
* needs the WHOLE file to answer: a hoisted `const pills = <Select …/>` handed to `filters={pills}`
|
|
2291
|
-
* further down is inside that slot (argo's hoisted `headerExtra`, `cost-over-time.tsx:54-68`), and
|
|
2292
|
-
* the binding is only known to be slot-bound once the attribute has been seen.
|
|
2293
|
-
*
|
|
2294
|
-
* So the ancestry facts are CAPTURED during the visit — while `node.parent` is walkable — and
|
|
2295
|
-
* resolved at `Program:exit`, when the slot-bound identifier set is complete. `capture()` returns a
|
|
2296
|
-
* descriptor, `resolve()` turns it into a verdict; nothing re-walks the tree after traversal ends.
|
|
2297
|
-
*
|
|
2298
|
-
* The descriptor holds the owner BINDING NAME rather than a boolean for the same reason: whether
|
|
2299
|
-
* that `Section` is basalt's is answered by the import list (`noteImport`), which is also only
|
|
2300
|
-
* complete at exit.
|
|
2301
|
-
*/
|
|
2302
|
-
function createSlotContext(context) {
|
|
2303
|
-
/** Local binding → the basalt export it was imported under. Membership IS the home test. */
|
|
2304
|
-
const homes = new Map()
|
|
2305
|
-
const ownTree = isBasaltOwnSource(getFilename(context))
|
|
2306
|
-
/**
|
|
2307
|
-
* Hoisted identifier → EVERY owner BINDING whose slot it was handed to.
|
|
2308
|
-
*
|
|
2309
|
-
* A Set, not one binding: `const acts = <Button size="xs"/>` handed to both `<Section actions>` and
|
|
2310
|
-
* `<ChartCard actions>` is inside two slots at once, and a last-writer-wins map made the verdict
|
|
2311
|
-
* depend on which attribute came later in the file — the same code went silent or reported
|
|
2312
|
-
* depending on JSX order.
|
|
2313
|
-
*/
|
|
2314
|
-
const slotBoundIdentifiers = new Map()
|
|
2315
|
-
/**
|
|
2316
|
-
* Hoisted identifier → every SUBTREE-home BINDING whose children it was rendered as.
|
|
2317
|
-
*
|
|
2318
|
-
* The same hop `slotBoundIdentifiers` makes, one home shape over: `const rows = <SelectFilter/>`
|
|
2319
|
-
* handed to `<PageAside>{rows}</PageAside>` is inside that aside, and the ancestry walk cannot
|
|
2320
|
-
* see it because at the `const` there is no `PageAside` above the node at all.
|
|
2321
|
-
*/
|
|
2322
|
-
const subtreeHostedIdentifiers = new Map()
|
|
2323
|
-
return {
|
|
2324
|
-
/** Feed every ImportDeclaration here — this is where the owner provenance comes from. */
|
|
2325
|
-
noteImport(node) {
|
|
2326
|
-
collectBasaltImportMap(node, homes, ownTree)
|
|
2327
|
-
},
|
|
2328
|
-
/**
|
|
2329
|
-
* Feed every JSXAttribute AND every ObjectExpression Property here — a slot attribute, in
|
|
2330
|
-
* either spelling, contributes its value's identifiers. A Property's `value` is the expression
|
|
2331
|
-
* directly (no JSX container to unwrap), which `unwrapExpressionContainer` passes through.
|
|
2332
|
-
*/
|
|
2333
|
-
note(attr) {
|
|
2334
|
-
const owner = slotOwnerBinding(attr)
|
|
2335
|
-
if (owner === undefined) return
|
|
2336
|
-
const identifiers = new Set()
|
|
2337
|
-
collectSlotValueIdentifiers(unwrapExpressionContainer(attr.value), identifiers)
|
|
2338
|
-
for (const id of identifiers) {
|
|
2339
|
-
const owners = slotBoundIdentifiers.get(id)
|
|
2340
|
-
if (owners === undefined) slotBoundIdentifiers.set(id, new Set([owner]))
|
|
2341
|
-
else owners.add(owner)
|
|
2342
|
-
}
|
|
2343
|
-
},
|
|
2344
|
-
/**
|
|
2345
|
-
* Feed every JSXExpressionContainer here — a `{expr}` CHILD of a subtree home
|
|
2346
|
-
* ({@link BASALT_HOST_TAGS}) hosts the identifiers that expression resolves through.
|
|
2347
|
-
*/
|
|
2348
|
-
noteChild(node) {
|
|
2349
|
-
const parent = node.parent
|
|
2350
|
-
if (parent === null || parent === undefined || parent.type !== 'JSXElement') return
|
|
2351
|
-
const name = parent.openingElement?.name
|
|
2352
|
-
if (!BASALT_HOST_TAGS.has(jsxTagName(name) ?? '')) return
|
|
2353
|
-
const owner = jsxRootName(name)
|
|
2354
|
-
if (owner === undefined) return
|
|
2355
|
-
const identifiers = new Set()
|
|
2356
|
-
collectSlotValueIdentifiers(node.expression, identifiers)
|
|
2357
|
-
for (const id of identifiers) {
|
|
2358
|
-
const owners = subtreeHostedIdentifiers.get(id)
|
|
2359
|
-
if (owners === undefined) subtreeHostedIdentifiers.set(id, new Set([owner]))
|
|
2360
|
-
else owners.add(owner)
|
|
2361
|
-
}
|
|
2362
|
-
},
|
|
2363
|
-
/** Snapshot `node`'s ancestry while it is walkable — the owner NAME, resolved later. */
|
|
2364
|
-
capture(node) {
|
|
2365
|
-
const attr = enclosingSlotAttribute(node)
|
|
2366
|
-
return {
|
|
2367
|
-
directOwner: attr === undefined ? undefined : slotOwnerBinding(attr),
|
|
2368
|
-
slotName: slotAttrName(attr),
|
|
2369
|
-
declaratorName: enclosingDeclaratorName(node),
|
|
2370
|
-
subtreeHosts: ancestorTagBindings(node, BASALT_HOST_TAGS),
|
|
2371
|
-
}
|
|
2372
|
-
},
|
|
2373
|
-
/** Is a captured node inside a BASALT home slot — directly, or via a hoisted binding? */
|
|
2374
|
-
resolve(captured) {
|
|
2375
|
-
if (captured.directOwner !== undefined) return homes.has(captured.directOwner)
|
|
2376
|
-
if (captured.declaratorName === undefined) return false
|
|
2377
|
-
const hoistedOwners = slotBoundIdentifiers.get(captured.declaratorName)
|
|
2378
|
-
if (hoistedOwners === undefined) return false
|
|
2379
|
-
// ANY basalt owner puts the binding in a home: a node handed to one basalt slot and one
|
|
2380
|
-
// consumer component still renders inside the basalt slot.
|
|
2381
|
-
for (const owner of hoistedOwners) {
|
|
2382
|
-
if (homes.has(owner)) return true
|
|
2383
|
-
}
|
|
2384
|
-
return false
|
|
2385
|
-
},
|
|
2386
|
-
/** The basalt EXPORTS of the subtree homes (`FilterSet`, `PageAside`, …) a captured node sits in. */
|
|
2387
|
-
hostExports(captured) {
|
|
2388
|
-
return captured.subtreeHosts.filter((b) => homes.has(b)).map((b) => homes.get(b))
|
|
2389
|
-
},
|
|
2390
|
-
/** Does `name` resolve to a basalt home component in this file? */
|
|
2391
|
-
isHome(name) {
|
|
2392
|
-
return name !== undefined && homes.has(name)
|
|
2393
|
-
},
|
|
2394
|
-
/**
|
|
2395
|
-
* Is a captured node inside a basalt SUBTREE home — directly by ancestry, or via a hoisted
|
|
2396
|
-
* binding rendered as one's `{expr}` child? Both halves resolve the binding through `homes`,
|
|
2397
|
-
* so a consumer's own `PanelRow` is not one.
|
|
2398
|
-
*/
|
|
2399
|
-
inSubtreeHome(captured) {
|
|
2400
|
-
for (const binding of captured.subtreeHosts) {
|
|
2401
|
-
if (homes.has(binding)) return true
|
|
2402
|
-
}
|
|
2403
|
-
if (captured.declaratorName === undefined) return false
|
|
2404
|
-
for (const owner of subtreeHostedIdentifiers.get(captured.declaratorName) ?? []) {
|
|
2405
|
-
if (homes.has(owner)) return true
|
|
2406
|
-
}
|
|
2407
|
-
return false
|
|
2408
|
-
},
|
|
2409
|
-
/**
|
|
2410
|
-
* EVERY basalt EXPORT whose slot a captured node sits in — `['ChartCard']` for
|
|
2411
|
-
* `<ChartCard actions={…}>` and for `<Card actions={…}>` under an alias, `[]` when the node is in
|
|
2412
|
-
* no basalt slot. Resolves through the same hoisted-binding hop `resolve` does.
|
|
2413
|
-
*
|
|
2414
|
-
* A LIST, because one hoisted binding can be handed to several slots, and an exemption keyed on
|
|
2415
|
-
* the owner is only sound when it holds for all of them — a `size="xs"` shared between
|
|
2416
|
-
* `<ChartCard actions>` and `<Section actions>` really does render inside the Section's tiered
|
|
2417
|
-
* slot. Non-basalt owners are dropped: they are not homes, so they carry no tier either way.
|
|
2418
|
-
*/
|
|
2419
|
-
ownerExports(captured) {
|
|
2420
|
-
const bindings =
|
|
2421
|
-
captured.directOwner !== undefined
|
|
2422
|
-
? [captured.directOwner]
|
|
2423
|
-
: captured.declaratorName === undefined
|
|
2424
|
-
? []
|
|
2425
|
-
: [...(slotBoundIdentifiers.get(captured.declaratorName) ?? [])]
|
|
2426
|
-
return bindings.filter((binding) => homes.has(binding)).map((binding) => homes.get(binding))
|
|
2427
|
-
},
|
|
2428
|
-
}
|
|
2429
|
-
}
|
|
2430
|
-
|
|
2431
|
-
/** Collects the owner-definition verdict for the control layer — see {@link CONTROL_OWNER_NAMES}. */
|
|
2432
|
-
function createControlOwnerProbe() {
|
|
2433
|
-
const state = { definesControl: false, importsBasalt: false }
|
|
2434
|
-
const note = (name) => {
|
|
2435
|
-
if (typeof name === 'string' && CONTROL_OWNER_NAMES.has(name)) state.definesControl = true
|
|
2436
|
-
}
|
|
2437
|
-
return {
|
|
2438
|
-
/** Feed every ImportDeclaration here — a `basalt-ui*` import disqualifies the exemption. */
|
|
2439
|
-
noteImport(node) {
|
|
2440
|
-
const source = node.source?.value
|
|
2441
|
-
if (typeof source === 'string' && BASALT_IMPORT_SOURCE.test(source)) {
|
|
2442
|
-
state.importsBasalt = true
|
|
2443
|
-
}
|
|
2444
|
-
},
|
|
2445
|
-
/** Does this file DEFINE a basalt control rather than consume one? Both halves are required. */
|
|
2446
|
-
isOwner() {
|
|
2447
|
-
return state.definesControl && !state.importsBasalt
|
|
2448
|
-
},
|
|
2449
|
-
visitors: {
|
|
2450
|
-
FunctionDeclaration(node) {
|
|
2451
|
-
note(node.id?.name)
|
|
2452
|
-
},
|
|
2453
|
-
VariableDeclarator(node) {
|
|
2454
|
-
note(node.id?.name)
|
|
2455
|
-
},
|
|
2456
|
-
},
|
|
2457
|
-
}
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
// ── Rule 16 — hand-rolled-filter ────────────────────────────────────────────────────────────────
|
|
2461
|
-
|
|
2462
|
-
const HAND_ROLLED_FILTER_MESSAGE =
|
|
2463
|
-
'Raw Mantine selection control inside a home slot — a filter or tab in a PageBar / Section / ' +
|
|
2464
|
-
'WidgetHeader slot takes a `field` (a FieldHandle) and owns both the URL write and the ' +
|
|
2465
|
-
'localStorage mirror, so it cannot carry value/onChange at all (laws C1–C3). Use ' +
|
|
2466
|
-
'RangeFilter / SelectFilter / MultiSelectFilter / SearchFilter / ToggleFilter / ViewTabs from ' +
|
|
2467
|
-
"basalt-ui/controls. Two shapes are NOT this rule: a control in a home's CHILDREN (a Section " +
|
|
2468
|
-
"body form), and a SettingsRow's `control` — the form-row home, where a raw input at Mantine's " +
|
|
2469
|
-
'md tier is the right answer. (basalt/hand-rolled-filter)'
|
|
2470
|
-
|
|
2471
|
-
/**
|
|
2472
|
-
* A raw Mantine selection control handed to a home slot (laws C1/C3).
|
|
2473
|
-
*
|
|
2474
|
-
* Ships `error` from the start, unlike its sibling `control-outside-home`: "this element is inside
|
|
2475
|
-
* a slot" is a structural fact with no heuristic in it, and the wave-1..4 migrations left no
|
|
2476
|
-
* incumbents. Two shapes are deliberately outside the rule: the body form (the ancestry walk stops
|
|
2477
|
-
* at the slot ATTRIBUTE, so a `<Select>` in a `Section`'s children never reaches it) and
|
|
2478
|
-
* `SettingsRow.control`, the form-row home — see {@link SLOT_ATTRS} for why a raw input is right
|
|
2479
|
-
* there.
|
|
2480
|
-
*/
|
|
2481
|
-
// Ships: error
|
|
2482
|
-
const handRolledFilter = {
|
|
2483
|
-
meta: {
|
|
2484
|
-
type: 'problem',
|
|
2485
|
-
docs: { description: 'Disallow a raw Mantine selection control inside a basalt home slot.' },
|
|
2486
|
-
schema: [],
|
|
2487
|
-
},
|
|
2488
|
-
create(context) {
|
|
2489
|
-
if (isTestFile(context)) return {}
|
|
2490
|
-
const slots = createSlotContext(context)
|
|
2491
|
-
const mantineImports = new Map()
|
|
2492
|
-
const candidates = []
|
|
2493
|
-
|
|
2494
|
-
return {
|
|
2495
|
-
ImportDeclaration(node) {
|
|
2496
|
-
collectMantineImports(node, mantineImports)
|
|
2497
|
-
slots.noteImport(node)
|
|
2498
|
-
},
|
|
2499
|
-
// The object-spread spelling of a slot — see {@link spreadSlotOwnerBinding}. `slots.note`
|
|
2500
|
-
// accepts either node shape; feeding both is what keeps ONE home model across the lanes.
|
|
2501
|
-
Property(node) {
|
|
2502
|
-
slots.note(node)
|
|
2503
|
-
},
|
|
2504
|
-
JSXAttribute(node) {
|
|
2505
|
-
slots.note(node)
|
|
2506
|
-
},
|
|
2507
|
-
JSXOpeningElement(node) {
|
|
2508
|
-
// Cheap pre-filter: the tag as WRITTEN, or any Mantine binding (an alias resolves at exit).
|
|
2509
|
-
const root = jsxRootName(node.name)
|
|
2510
|
-
if (!RAW_FILTER_TAGS.has(jsxTagName(node.name) ?? '') && !mantineImports.has(root)) return
|
|
2511
|
-
candidates.push({
|
|
2512
|
-
node,
|
|
2513
|
-
name: node.name,
|
|
2514
|
-
captured: slots.capture(node),
|
|
2515
|
-
hosted: hostedInsideSlot(node),
|
|
2516
|
-
})
|
|
2517
|
-
},
|
|
2518
|
-
'Program:exit'() {
|
|
2519
|
-
for (const { node, name, captured, hosted } of candidates) {
|
|
2520
|
-
const tag = resolveMantineTag(name, mantineImports)
|
|
2521
|
-
if (tag === undefined || !RAW_FILTER_TAGS.has(tag)) continue
|
|
2522
|
-
if (hosted || !slots.resolve(captured)) continue
|
|
2523
|
-
if (hasThemeAllow(context, node, 'hand-rolled-filter')) continue
|
|
2524
|
-
context.report({ node, message: HAND_ROLLED_FILTER_MESSAGE })
|
|
2525
|
-
}
|
|
2526
|
-
},
|
|
2527
|
-
}
|
|
2528
|
-
},
|
|
2529
|
-
}
|
|
2530
|
-
|
|
2531
|
-
// ── Rule 17 — control-outside-home ──────────────────────────────────────────────────────────────
|
|
2532
|
-
|
|
2533
|
-
/**
|
|
2534
|
-
* The one fact that decides a SHELL-LESS app, and the one neither control-home message used to
|
|
2535
|
-
* state. `PageBar` does not require `BasaltShell`: without a shell it renders both rows in flow,
|
|
2536
|
-
* sticky at the top of the document, with `title` + `icon` leading row 1 (see
|
|
2537
|
-
* `src/shell/page-bar.tsx`'s own header). So a provider-only consumer — image-gen mounts
|
|
2538
|
-
* `BasaltProvider` and a hand-rolled Tauri window header, no shell — has a reachable home, and the
|
|
2539
|
-
* rule is satisfiable there. Both messages read the same sentence so the two lanes cannot drift.
|
|
2540
|
-
*/
|
|
2541
|
-
const SHELL_LESS_HOME_HINT =
|
|
2542
|
-
'No shell? `PageBar` needs no `BasaltShell`: outside one it renders in flow, sticky, with its ' +
|
|
2543
|
-
'own `title` — so its slots are a reachable home for a provider-only app.'
|
|
2544
|
-
|
|
2545
|
-
const CONTROL_OUTSIDE_HOME_MESSAGE =
|
|
2546
|
-
'Raw Mantine selection control with no home — a filter, tab or action belongs in exactly one of ' +
|
|
2547
|
-
'the three homes (a PageBar / Section / WidgetHeader slot, or a form row), and a home is entered ' +
|
|
2548
|
-
'through a slot prop (law C1). A settings row, a form row (FormRow/FormGroup), an overlay ' +
|
|
2549
|
-
'(Modal/Drawer/Popover/Menu) and a form (@mantine/form) are the declared non-homes and never ' +
|
|
2550
|
-
`report. ${SHELL_LESS_HOME_HINT} (basalt/control-outside-home)`
|
|
2551
|
-
|
|
2552
|
-
const ROW_ACTION_IN_CELL_MESSAGE =
|
|
2553
|
-
'A Mantine `Menu`/`ActionIcon` inside a column `cell`/`display` renderer is a per-row action with ' +
|
|
2554
|
-
'no home. Pass `BasaltDataTable rowActions={[{ key, label, icon, onClick: (row) => … }]}` — the ' +
|
|
2555
|
-
'table renders the trailing, pinned actions column, keyboard access and the no-row-activation ' +
|
|
2556
|
-
'guard itself. (basalt/control-outside-home)'
|
|
2557
|
-
|
|
2558
|
-
/** Tags that, in a column `cell` renderer, are a hand-rolled row action. */
|
|
2559
|
-
const ROW_ACTION_TAGS = new Set(['Menu', 'ActionIcon'])
|
|
2560
|
-
|
|
2561
|
-
/** An `ActionIcon` under a `Menu` is that menu's trigger: the `Menu` reports, once, for the pair. */
|
|
2562
|
-
const ROW_MENU_TAGS = new Set(['Menu'])
|
|
2563
|
-
|
|
2564
|
-
/**
|
|
2565
|
-
* True when `node` sits inside a function that is the value of a `cell:` property (a column def).
|
|
2566
|
-
* Only an INLINE renderer is seen: `cell: renderActions` (a reference to a function declared
|
|
2567
|
-
* elsewhere) is a cross-reference no single-file AST walk resolves — the same declared limit as
|
|
2568
|
-
* the rule's cross-file C1 gap.
|
|
2569
|
-
*/
|
|
2570
|
-
function insideCellRenderer(node) {
|
|
2571
|
-
let current = node.parent
|
|
2572
|
-
for (let depth = 0; current !== null && current !== undefined; depth++) {
|
|
2573
|
-
if (depth > ANCESTRY_MAX_DEPTH || current.type === 'Program') return false
|
|
2574
|
-
if (
|
|
2575
|
-
current.type === 'Property' &&
|
|
2576
|
-
(current.key?.name ?? current.key?.value) === 'cell' &&
|
|
2577
|
-
(current.value?.type === 'ArrowFunctionExpression' ||
|
|
2578
|
-
current.value?.type === 'FunctionExpression')
|
|
2579
|
-
) {
|
|
2580
|
-
return true
|
|
2581
|
-
}
|
|
2582
|
-
current = current.parent
|
|
2583
|
-
}
|
|
2584
|
-
return false
|
|
2585
|
-
}
|
|
2586
|
-
|
|
2587
|
-
/**
|
|
2588
|
-
* The cross-file half of C1, and the one rule here that is openly a HEURISTIC: "this control has
|
|
2589
|
-
* no home" is a claim about layout intent, which no AST can see. That is why it sat in grace from
|
|
2590
|
-
* 1.26.0 to 1.33.0, promoting only once basalt's tree and nine consumers measured at zero.
|
|
2591
|
-
*
|
|
2592
|
-
* Four exemptions carry the false-positive load: an overlay/settings-row/form-row ancestor
|
|
2593
|
-
* ({@link CONTROL_HOST_TAGS}, `FormRow`/`FormGroup` included), an {@link isOverlayConventionFile}
|
|
2594
|
-
* basename (the CROSS-FILE case — the `<Modal>` lives in the parent), a file that imports
|
|
2595
|
-
* `@mantine/form` (a form is the third home and its inputs are not filters), and the owner
|
|
2596
|
-
* exemption — a file DEFINING a basalt control cannot be told to use one.
|
|
2597
|
-
*/
|
|
2598
|
-
// Ships: error
|
|
2599
|
-
const controlOutsideHome = {
|
|
2600
|
-
meta: {
|
|
2601
|
-
type: 'suggestion',
|
|
2602
|
-
docs: { description: 'Warn on a raw Mantine selection control that is in no basalt home.' },
|
|
2603
|
-
schema: [],
|
|
2604
|
-
},
|
|
2605
|
-
create(context) {
|
|
2606
|
-
if (isTestFile(context)) return {}
|
|
2607
|
-
if (isOverlayConventionFile(getFilename(context))) return {}
|
|
2608
|
-
const slots = createSlotContext(context)
|
|
2609
|
-
const owner = createControlOwnerProbe()
|
|
2610
|
-
const mantineImports = new Map()
|
|
2611
|
-
const candidates = []
|
|
2612
|
-
let importsMantineForm = false
|
|
2613
|
-
|
|
2614
|
-
return {
|
|
2615
|
-
...owner.visitors,
|
|
2616
|
-
ImportDeclaration(node) {
|
|
2617
|
-
collectMantineImports(node, mantineImports)
|
|
2618
|
-
slots.noteImport(node)
|
|
2619
|
-
owner.noteImport(node)
|
|
2620
|
-
if ((node.source?.value ?? '') === '@mantine/form') importsMantineForm = true
|
|
2621
|
-
},
|
|
2622
|
-
// The object-spread spelling of a slot — see {@link spreadSlotOwnerBinding}. `slots.note`
|
|
2623
|
-
// accepts either node shape; feeding both is what keeps ONE home model across the lanes.
|
|
2624
|
-
Property(node) {
|
|
2625
|
-
slots.note(node)
|
|
2626
|
-
},
|
|
2627
|
-
JSXAttribute(node) {
|
|
2628
|
-
slots.note(node)
|
|
2629
|
-
},
|
|
2630
|
-
JSXExpressionContainer(node) {
|
|
2631
|
-
slots.noteChild(node)
|
|
2632
|
-
},
|
|
2633
|
-
JSXOpeningElement(node) {
|
|
2634
|
-
// Cheap pre-filter: the tag as WRITTEN, or any Mantine binding (an alias resolves at exit).
|
|
2635
|
-
const root = jsxRootName(node.name)
|
|
2636
|
-
if (!RAW_FILTER_TAGS.has(jsxTagName(node.name) ?? '') && !mantineImports.has(root)) return
|
|
2637
|
-
candidates.push({
|
|
2638
|
-
node,
|
|
2639
|
-
name: node.name,
|
|
2640
|
-
captured: slots.capture(node),
|
|
2641
|
-
hosted: hasAncestorTag(node, CONTROL_HOST_TAGS),
|
|
2642
|
-
inCell: insideCellRenderer(node),
|
|
2643
|
-
inMenu: jsxTagName(node.name) !== 'Menu' && hasAncestorTag(node, ROW_MENU_TAGS),
|
|
2644
|
-
})
|
|
2645
|
-
},
|
|
2646
|
-
'Program:exit'() {
|
|
2647
|
-
// Row actions first: a table file that imports `@mantine/form` or defines a basalt control
|
|
2648
|
-
// still hosts column cells, so neither file-level exemption applies to them. An already-homed
|
|
2649
|
-
// element (a form row, a menu dropdown, a slot) is still not a row action.
|
|
2650
|
-
for (const { node, name, captured, hosted, inCell, inMenu } of candidates) {
|
|
2651
|
-
if (!inCell || hosted || inMenu) continue
|
|
2652
|
-
const tag = resolveMantineTag(name, mantineImports)
|
|
2653
|
-
if (tag === undefined || !ROW_ACTION_TAGS.has(tag)) continue
|
|
2654
|
-
if (slots.resolve(captured) || slots.inSubtreeHome(captured)) continue
|
|
2655
|
-
if (hasThemeAllow(context, node, 'control-outside-home')) continue
|
|
2656
|
-
context.report({ node, message: ROW_ACTION_IN_CELL_MESSAGE })
|
|
2657
|
-
}
|
|
2658
|
-
if (importsMantineForm || owner.isOwner()) return
|
|
2659
|
-
for (const { node, name, captured, hosted } of candidates) {
|
|
2660
|
-
const tag = resolveMantineTag(name, mantineImports)
|
|
2661
|
-
if (tag === undefined || !RAW_FILTER_TAGS.has(tag)) continue
|
|
2662
|
-
if (hosted || slots.resolve(captured) || slots.inSubtreeHome(captured)) continue
|
|
2663
|
-
if (hasThemeAllow(context, node, 'control-outside-home')) continue
|
|
2664
|
-
context.report({ node, message: CONTROL_OUTSIDE_HOME_MESSAGE })
|
|
2665
|
-
}
|
|
2666
|
-
},
|
|
2667
|
-
}
|
|
2668
|
-
},
|
|
2669
|
-
}
|
|
2670
|
-
|
|
2671
|
-
// ── Rule 18 — control-size-literal ──────────────────────────────────────────────────────────────
|
|
2672
|
-
|
|
2673
|
-
/** The props a home already owns — the tier, the width, and the responsive swap (laws C5/C9). */
|
|
2674
|
-
const CONTROL_SIZE_ATTRS = new Set(['size', 'w', 'fullWidth', 'visibleFrom', 'hiddenFrom'])
|
|
2675
|
-
|
|
2676
|
-
const CONTROL_SIZE_LITERAL_MESSAGE =
|
|
2677
|
-
'Size/width/breakpoint prop inside a tiered home slot — the HOME sets the tier (`size="ctl"` = 30px, ' +
|
|
2678
|
-
"mounted by the slot's own MantineThemeProvider), the control owns its own responsive swap, and " +
|
|
2679
|
-
'the overflow fold is computed by basalt from typed data. A `size`/`w`/`fullWidth`/`visibleFrom`/' +
|
|
2680
|
-
'`hiddenFrom` written here fights all three (laws C5/C7/C9) — drop the prop. ' +
|
|
2681
|
-
'(basalt/control-size-literal)'
|
|
2682
|
-
|
|
2683
|
-
/**
|
|
2684
|
-
* The elements the slot's own `MantineThemeProvider` actually re-tiers, beyond the raw filters: a
|
|
2685
|
-
* `Button size="xs"` dropped into `PageBar.actions` is the same defect as a `Select size="xs"` there
|
|
2686
|
-
* — one control in the bar that is not 30px.
|
|
2687
|
-
*
|
|
2688
|
-
* This file is plain JS shipped to consumers and `src/theme/ctl-theme.tsx` is Mantine-coupled
|
|
2689
|
-
* TypeScript it may not import, so the list is written out here — and PINNED to
|
|
2690
|
-
* `CTL_THEME.components` by `oxlint-plugin.test.ts`, which can import both. Drift fails that test
|
|
2691
|
-
* rather than silently re-tiering a component the rule still polices (or the reverse).
|
|
2692
|
-
*
|
|
2693
|
-
* The scope IS the rule: an `<IconDownload size={14}/>`, a count `<Badge size="sm">`, a
|
|
2694
|
-
* `<Loader size={14}/>` or a `<Modal size="lg">` colocated in a slot is NOT sized by the slot theme,
|
|
2695
|
-
* so "drop the prop" produced a 24px icon and a message whose promise ("the HOME sets the tier") was
|
|
2696
|
-
* false for every one of them.
|
|
2697
|
-
*
|
|
2698
|
-
* `Switch` USED to be on that not-sized list and is now on this one, together with `Radio`,
|
|
2699
|
-
* `Checkbox` and the three `*Group`s: the tier gained their `-ctl` vars in the same minor this rule
|
|
2700
|
-
* ships in (`theme/ctl-theme.tsx`, `theme/index.ts`'s `ctlSizeVars`), because a 20px indicator beside
|
|
2701
|
-
* the tier's 13.5px option label was what every filter popover and the mobile sheet rendered. The
|
|
2702
|
-
* grace runway in {@link PLUGIN_RULE_GRACE} is unchanged — the rule has never shipped at any level,
|
|
2703
|
-
* so widening it before its first release restarts nothing.
|
|
2704
|
-
*/
|
|
2705
|
-
export const CTL_THEME_TAGS = new Set([
|
|
2706
|
-
'Button',
|
|
2707
|
-
'ActionIcon',
|
|
2708
|
-
'Input',
|
|
2709
|
-
'TextInput',
|
|
2710
|
-
'Select',
|
|
2711
|
-
'MultiSelect',
|
|
2712
|
-
'SegmentedControl',
|
|
2713
|
-
'NativeSelect',
|
|
2714
|
-
'NumberInput',
|
|
2715
|
-
'PasswordInput',
|
|
2716
|
-
'Textarea',
|
|
2717
|
-
'Radio',
|
|
2718
|
-
'RadioGroup',
|
|
2719
|
-
'Checkbox',
|
|
2720
|
-
'CheckboxGroup',
|
|
2721
|
-
'Switch',
|
|
2722
|
-
'SwitchGroup',
|
|
2723
|
-
])
|
|
2724
|
-
|
|
2725
|
-
/**
|
|
2726
|
-
* A size/width/breakpoint prop on a control the slot theme tiers. The slot's hoisted
|
|
2727
|
-
* `MantineThemeProvider` already resolves the tier with no prop. A `SettingsRow`'s `control` is NOT
|
|
2728
|
-
* a tiered slot for this rule (see {@link SLOT_ATTRS}): it mounts its own `CtlSlot` (Wave 46), but a
|
|
2729
|
-
* `size="md"` written there is the documented opt-out back to Mantine's `md`, so it stays legal.
|
|
2730
|
-
*
|
|
2731
|
-
* Scoped to `RAW_FILTER_TAGS` ∪ `BOUND_TAGS` (basalt's own controls, by name) ∪ a Mantine-imported
|
|
2732
|
-
* {@link CTL_THEME_TAGS} member, and skipped under an overlay ({@link hostedInsideSlot}) — see
|
|
2733
|
-
* `CTL_THEME_TAGS` for what firing on everything in the slot cost.
|
|
2734
|
-
*/
|
|
2735
|
-
/**
|
|
2736
|
-
* The home whose slot cannot mount the tier theme, so the CONTROL there has to state its own size.
|
|
2737
|
-
*
|
|
2738
|
-
* `ChartCard` lives inside the Mantine-free chart layer (`src/charts/primitives/`), which means it
|
|
2739
|
-
* cannot render a `MantineThemeProvider` at all — it writes `data-basalt-tier="widget"` by hand and
|
|
2740
|
-
* nothing else (`../MAINTAINING.md`, "A home sizes its own SLOT"; `docs/CONTROLS-SPEC.md` §5). So this
|
|
2741
|
-
* rule's whole message — "the HOME sets the tier, drop the prop" — is FALSE in exactly one slot: a
|
|
2742
|
-
* `Switch` in `ChartCard.actions` with no `size` renders at Mantine's default, not at `ctl`.
|
|
2743
|
-
*
|
|
2744
|
-
* It has to be an exemption rather than a waiver because the rule fires on the `size` ATTRIBUTE and
|
|
2745
|
-
* cannot tell a correct `size="ctl"` from the `size="xs"` it exists to catch. The playground carried
|
|
2746
|
-
* exactly one waiver for this and it was the honest kind — the rule was wrong, not the code.
|
|
2747
|
-
*
|
|
2748
|
-
* `hand-rolled-filter` is deliberately NOT exempted here: a raw `Select` in `ChartCard.actions` is
|
|
2749
|
-
* still a filter that should take a `field`, and the tier is not what makes that true.
|
|
2750
|
-
*/
|
|
2751
|
-
const TIERLESS_SLOT_OWNERS = new Set(['ChartCard'])
|
|
2752
|
-
|
|
2753
|
-
// Ships: error
|
|
2754
|
-
const controlSizeLiteral = {
|
|
2755
|
-
meta: {
|
|
2756
|
-
type: 'suggestion',
|
|
2757
|
-
docs: { description: 'Warn on a size/width/breakpoint prop written inside a home slot.' },
|
|
2758
|
-
schema: [],
|
|
2759
|
-
},
|
|
2760
|
-
create(context) {
|
|
2761
|
-
if (isTestFile(context)) return {}
|
|
2762
|
-
const slots = createSlotContext(context)
|
|
2763
|
-
const mantineImports = new Map()
|
|
2764
|
-
const candidates = []
|
|
2765
|
-
|
|
2766
|
-
return {
|
|
2767
|
-
ImportDeclaration(node) {
|
|
2768
|
-
collectMantineImports(node, mantineImports)
|
|
2769
|
-
slots.noteImport(node)
|
|
2770
|
-
},
|
|
2771
|
-
// The object-spread spelling of a slot — see {@link spreadSlotOwnerBinding}. `slots.note`
|
|
2772
|
-
// accepts either node shape; feeding both is what keeps ONE home model across the lanes.
|
|
2773
|
-
Property(node) {
|
|
2774
|
-
slots.note(node)
|
|
2775
|
-
},
|
|
2776
|
-
JSXAttribute(node) {
|
|
2777
|
-
slots.note(node)
|
|
2778
|
-
const name = node.name?.name
|
|
2779
|
-
if (typeof name !== 'string' || !CONTROL_SIZE_ATTRS.has(name)) return
|
|
2780
|
-
const owner = node.parent
|
|
2781
|
-
if (owner === null || owner === undefined || owner.type !== 'JSXOpeningElement') return
|
|
2782
|
-
candidates.push({
|
|
2783
|
-
node,
|
|
2784
|
-
name: owner.name,
|
|
2785
|
-
captured: slots.capture(node),
|
|
2786
|
-
hosted: hostedInsideSlot(node),
|
|
2787
|
-
})
|
|
2788
|
-
},
|
|
2789
|
-
'Program:exit'() {
|
|
2790
|
-
for (const { node, name, captured, hosted } of candidates) {
|
|
2791
|
-
const written = jsxTagName(name) ?? ''
|
|
2792
|
-
const tiered =
|
|
2793
|
-
RAW_FILTER_TAGS.has(written) ||
|
|
2794
|
-
BOUND_TAGS.has(written) ||
|
|
2795
|
-
CTL_THEME_TAGS.has(resolveMantineTag(name, mantineImports) ?? '')
|
|
2796
|
-
if (!tiered || hosted) continue
|
|
2797
|
-
if (!slots.resolve(captured)) continue
|
|
2798
|
-
// EVERY home the node was handed to has to be tierless. One hoisted `const acts =
|
|
2799
|
-
// <Button size="xs"/>` given to both `<ChartCard actions>` and `<Section actions>` renders
|
|
2800
|
-
// in a tiered slot too, and the prop is redundant there — so the exemption does not apply.
|
|
2801
|
-
const owners = slots.ownerExports(captured)
|
|
2802
|
-
if (owners.length > 0 && owners.every((owner) => TIERLESS_SLOT_OWNERS.has(owner)))
|
|
2803
|
-
continue
|
|
2804
|
-
if (hasThemeAllow(context, node, 'control-size-literal')) continue
|
|
2805
|
-
context.report({ node, message: CONTROL_SIZE_LITERAL_MESSAGE })
|
|
2806
|
-
}
|
|
2807
|
-
},
|
|
2808
|
-
}
|
|
2809
|
-
},
|
|
2810
|
-
}
|
|
2811
|
-
|
|
2812
|
-
// ── Rule 20 — in-body-page-title ────────────────────────────────────────────────────────────────
|
|
2813
|
-
|
|
2814
|
-
/** Where an `order={1|2}` Title is a DOCUMENT heading rather than a page title. */
|
|
2815
|
-
const PAGE_TITLE_HOST_TAGS = new Set(['Prose', 'ArticleLayout', 'Modal', 'Drawer'])
|
|
2816
|
-
|
|
2817
|
-
const IN_BODY_PAGE_TITLE_MESSAGE =
|
|
2818
|
-
'In-body page title — the page is named ONCE: by the breadcrumb (`staticData.title`), by ' +
|
|
2819
|
-
'`PageBar.title`, or by `<PageTitle>` on a shell-less surface (a route error, an auth gate, a ' +
|
|
2820
|
-
'standalone screen — it renders the page name at the right step with no shell above it). Every ' +
|
|
2821
|
-
'section/card/table title is a `WidgetHeader` (law C8). An `<Title order={1|2}>` spelling a name ' +
|
|
2822
|
-
'out in the body is a second, drifting name for the same page. A Title rendering a VALUE — ' +
|
|
2823
|
-
'`{doc.title}`, `{RANK_LABEL[rank]}` — never reports: that is data, not a name. Prose / ' +
|
|
2824
|
-
'ArticleLayout / an overlay and anything under a `content/` path never report either. ' +
|
|
2825
|
-
'(basalt/in-body-page-title)'
|
|
2826
|
-
|
|
2827
|
-
/**
|
|
2828
|
-
* Does this `<Title>` spell a name out, or render a value?
|
|
2829
|
-
*
|
|
2830
|
-
* The narrowing that made C8 satisfiable. The law is "one NAME per page", and a name is written in
|
|
2831
|
-
* words — so the rule now needs static text before it reports. Two shapes were unanswerable without
|
|
2832
|
-
* this, and between them they were 24 of rb's 27 lint errors across 12 files:
|
|
2833
|
-
*
|
|
2834
|
-
* 1. **A nav-less DETAIL route.** On `/knots/$slug` the breadcrumb names the PARENT list ("Learn /
|
|
2835
|
-
* Courses") and the document's own title has to live in the body. `PageTitle` does not help (it
|
|
2836
|
-
* is the shell-less surface primitive) and `PageBar.title` is a `string`. The law was
|
|
2837
|
-
* unsatisfiable and every consumer was going to paper it with the same waiver — which is the
|
|
2838
|
-
* rule losing, not the consumer.
|
|
2839
|
-
* 2. **A card's hero VALUE.** `<Title order={2}>{RANK_LABEL[game.rank]}</Title>` is a number at the
|
|
2840
|
-
* display type step. There is no non-restyling fix: `order={3}` is a different step, `Text`
|
|
2841
|
-
* drops the type scale, and `component="p"` does not help because the rule keys on the tag name
|
|
2842
|
-
* and the `order` prop.
|
|
2843
|
-
*
|
|
2844
|
-
* Both are `{expression}` children, and by construction an expression is not a static page name.
|
|
2845
|
-
* The false negative this accepts is narrow and named: `<Title order={1}>{t('page.users')}</Title>`
|
|
2846
|
-
* is a page name and no longer reports. A LAUNDERED literal still does — `{'Users'}` and a
|
|
2847
|
-
* substitution-free template are read as the text they are, so the escape is the expression, not
|
|
2848
|
-
* the braces.
|
|
2849
|
-
*/
|
|
2850
|
-
function hasStaticTitleText(node, depth = 0) {
|
|
2851
|
-
if (node === null || node === undefined || depth > 4) return false
|
|
2852
|
-
for (const child of node.children ?? []) {
|
|
2853
|
-
if (child.type === 'JSXText' && child.value.trim() !== '') return true
|
|
2854
|
-
if (child.type === 'JSXElement' || child.type === 'JSXFragment') {
|
|
2855
|
-
if (hasStaticTitleText(child, depth + 1)) return true
|
|
2856
|
-
continue
|
|
2857
|
-
}
|
|
2858
|
-
if (child.type !== 'JSXExpressionContainer') continue
|
|
2859
|
-
const expr = child.expression
|
|
2860
|
-
if (typeof expr?.value === 'string' && expr.value.trim() !== '') return true
|
|
2861
|
-
if (expr?.type === 'TemplateLiteral' && (expr.expressions?.length ?? 0) === 0) {
|
|
2862
|
-
if ((expr.quasis ?? []).some((q) => (q.value?.cooked ?? '').trim() !== '')) return true
|
|
2863
|
-
}
|
|
2864
|
-
}
|
|
2865
|
-
return false
|
|
2866
|
-
}
|
|
2867
|
-
|
|
2868
|
-
/** The `order` prop as a number literal, or undefined. */
|
|
2869
|
-
function titleOrderOf(node) {
|
|
2870
|
-
for (const attr of node.attributes ?? []) {
|
|
2871
|
-
if (attr.type !== 'JSXAttribute' || attr.name?.name !== 'order') continue
|
|
2872
|
-
const value = unwrapExpressionContainer(attr.value)
|
|
2873
|
-
return isNumericLiteral(value) ? value.value : undefined
|
|
2874
|
-
}
|
|
2875
|
-
return undefined
|
|
2876
|
-
}
|
|
2877
|
-
|
|
2878
|
-
/**
|
|
2879
|
-
* The AST half of C8. Its text-level twin is the `in-body-page-title` GUARD KIND — same id in both
|
|
2880
|
-
* lanes on purpose, so one `theme-allow in-body-page-title — <why>` waives both rather than
|
|
2881
|
-
* needing a different word per enforcement surface.
|
|
2882
|
-
*/
|
|
2883
|
-
// Ships: error
|
|
2884
|
-
const inBodyPageTitle = {
|
|
2885
|
-
meta: {
|
|
2886
|
-
type: 'suggestion',
|
|
2887
|
-
docs: { description: 'Warn on an in-body <Title order={1|2}> outside prose/overlay context.' },
|
|
2888
|
-
schema: [],
|
|
2889
|
-
},
|
|
2890
|
-
create(context) {
|
|
2891
|
-
if (isTestFile(context) || hasPathSegment(getFilename(context), 'content')) return {}
|
|
2892
|
-
|
|
2893
|
-
return {
|
|
2894
|
-
JSXOpeningElement(node) {
|
|
2895
|
-
if (jsxTagName(node.name) !== 'Title') return
|
|
2896
|
-
const order = titleOrderOf(node)
|
|
2897
|
-
if (order !== 1 && order !== 2) return
|
|
2898
|
-
if (hasAncestorTag(node, PAGE_TITLE_HOST_TAGS)) return
|
|
2899
|
-
// A Title with no static text renders a value, not a name — see hasStaticTitleText.
|
|
2900
|
-
if (!hasStaticTitleText(node.parent)) return
|
|
2901
|
-
if (hasThemeAllow(context, node, 'in-body-page-title')) return
|
|
2902
|
-
context.report({ node, message: IN_BODY_PAGE_TITLE_MESSAGE })
|
|
2903
|
-
},
|
|
2904
|
-
}
|
|
2905
|
-
},
|
|
2906
|
-
}
|
|
2907
|
-
|
|
2908
|
-
// ── Rule 21 — responsive-twin ───────────────────────────────────────────────────────────────────
|
|
2909
|
-
|
|
2910
|
-
const RESPONSIVE_TWIN_MESSAGE =
|
|
2911
|
-
'The same control mounted twice under visibleFrom/hiddenFrom — a responsive swap belongs to the ' +
|
|
2912
|
-
'CONTROL, which owns one mount and switches its own presentation in CSS (law C9). Two mounts are ' +
|
|
2913
|
-
'two states: the hidden half keeps its own value, its own focus and its own store writes. ' +
|
|
2914
|
-
'Render it once. (basalt/responsive-twin)'
|
|
2915
|
-
|
|
2916
|
-
/** The breakpoint a `visibleFrom` / `hiddenFrom` prop names, as a string literal. */
|
|
2917
|
-
function breakpointAttr(element, attrName) {
|
|
2918
|
-
for (const attr of element.openingElement?.attributes ?? []) {
|
|
2919
|
-
if (attr.type !== 'JSXAttribute' || attr.name?.name !== attrName) continue
|
|
2920
|
-
const value = unwrapExpressionContainer(attr.value)
|
|
2921
|
-
return isStringLiteral(value) ? value.value : undefined
|
|
2922
|
-
}
|
|
2923
|
-
return undefined
|
|
2924
|
-
}
|
|
2925
|
-
|
|
2926
|
-
/** Every control tag rendered anywhere in `node`'s subtree, itself included. */
|
|
2927
|
-
function subtreeControlTags(node, into = new Set(), depth = 0) {
|
|
2928
|
-
if (node === null || node === undefined || depth > 16) return into
|
|
2929
|
-
if (node.type === 'JSXElement') {
|
|
2930
|
-
const tag = jsxTagName(node.openingElement?.name)
|
|
2931
|
-
if (tag !== undefined && (RAW_FILTER_TAGS.has(tag) || BOUND_TAGS.has(tag))) into.add(tag)
|
|
2932
|
-
for (const child of node.children ?? []) subtreeControlTags(child, into, depth + 1)
|
|
2933
|
-
return into
|
|
2934
|
-
}
|
|
2935
|
-
if (node.type === 'JSXFragment') {
|
|
2936
|
-
for (const child of node.children ?? []) subtreeControlTags(child, into, depth + 1)
|
|
2937
|
-
return into
|
|
2938
|
-
}
|
|
2939
|
-
if (node.type === 'JSXExpressionContainer')
|
|
2940
|
-
return subtreeControlTags(node.expression, into, depth + 1)
|
|
2941
|
-
if (node.type === 'ConditionalExpression') {
|
|
2942
|
-
subtreeControlTags(node.consequent, into, depth + 1)
|
|
2943
|
-
return subtreeControlTags(node.alternate, into, depth + 1)
|
|
2944
|
-
}
|
|
2945
|
-
if (node.type === 'LogicalExpression') {
|
|
2946
|
-
subtreeControlTags(node.left, into, depth + 1)
|
|
2947
|
-
return subtreeControlTags(node.right, into, depth + 1)
|
|
2948
|
-
}
|
|
2949
|
-
return into
|
|
2950
|
-
}
|
|
2951
|
-
|
|
2952
|
-
/**
|
|
2953
|
-
* Law C9 — linewatch shipped three doubled controls this way. The pair test is deliberately narrow:
|
|
2954
|
-
* two SIBLING elements, one `visibleFrom="X"` and one `hiddenFrom="X"` on the SAME breakpoint, whose
|
|
2955
|
-
* subtrees both render the same control tag. A file that DEFINES a basalt control is exempt — the
|
|
2956
|
-
* one legitimate double mount is the CSS swap inside the control itself.
|
|
2957
|
-
*/
|
|
2958
|
-
// Ships: error
|
|
2959
|
-
const responsiveTwin = {
|
|
2960
|
-
meta: {
|
|
2961
|
-
type: 'suggestion',
|
|
2962
|
-
docs: { description: 'Warn on one control mounted twice under visibleFrom/hiddenFrom.' },
|
|
2963
|
-
schema: [],
|
|
2964
|
-
},
|
|
2965
|
-
create(context) {
|
|
2966
|
-
if (isTestFile(context)) return {}
|
|
2967
|
-
const owner = createControlOwnerProbe()
|
|
2968
|
-
const twins = []
|
|
2969
|
-
|
|
2970
|
-
const inspectChildren = (node) => {
|
|
2971
|
-
const children = (node.children ?? []).filter((child) => child.type === 'JSXElement')
|
|
2972
|
-
for (let i = 0; i < children.length; i++) {
|
|
2973
|
-
for (let j = i + 1; j < children.length; j++) {
|
|
2974
|
-
const a = children[i]
|
|
2975
|
-
const b = children[j]
|
|
2976
|
-
const visibleA = breakpointAttr(a, 'visibleFrom')
|
|
2977
|
-
const hiddenA = breakpointAttr(a, 'hiddenFrom')
|
|
2978
|
-
const visibleB = breakpointAttr(b, 'visibleFrom')
|
|
2979
|
-
const hiddenB = breakpointAttr(b, 'hiddenFrom')
|
|
2980
|
-
const paired =
|
|
2981
|
-
(visibleA !== undefined && visibleA === hiddenB) ||
|
|
2982
|
-
(hiddenA !== undefined && hiddenA === visibleB)
|
|
2983
|
-
if (!paired) continue
|
|
2984
|
-
const tagsA = subtreeControlTags(a)
|
|
2985
|
-
if (tagsA.size === 0) continue
|
|
2986
|
-
const shared = [...subtreeControlTags(b)].some((tag) => tagsA.has(tag))
|
|
2987
|
-
if (!shared) continue
|
|
2988
|
-
twins.push(b)
|
|
2989
|
-
}
|
|
2990
|
-
}
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
return {
|
|
2994
|
-
...owner.visitors,
|
|
2995
|
-
ImportDeclaration(node) {
|
|
2996
|
-
owner.noteImport(node)
|
|
2997
|
-
},
|
|
2998
|
-
JSXElement: inspectChildren,
|
|
2999
|
-
JSXFragment: inspectChildren,
|
|
3000
|
-
'Program:exit'() {
|
|
3001
|
-
if (owner.isOwner()) return
|
|
3002
|
-
for (const node of twins) {
|
|
3003
|
-
if (hasThemeAllow(context, node, 'responsive-twin')) continue
|
|
3004
|
-
context.report({ node, message: RESPONSIVE_TWIN_MESSAGE })
|
|
3005
|
-
}
|
|
3006
|
-
},
|
|
3007
|
-
}
|
|
3008
|
-
},
|
|
3009
|
-
}
|
|
3010
|
-
|
|
3011
|
-
// ── Rule 22 — search-literal-link ───────────────────────────────────────────────────────────────
|
|
3012
|
-
|
|
3013
|
-
/** The two calls that build a typed nav definition — `search:` inside one is a nav link's search. */
|
|
3014
|
-
const NAV_DEFINITION_CALLEES = new Set(['defineNav', 'navGroup'])
|
|
3015
|
-
|
|
3016
|
-
const SEARCH_LITERAL_LINK_MESSAGE =
|
|
3017
|
-
"Object literal as a nav link's `search` — it PINS those values on every click, so a nav link " +
|
|
3018
|
-
'always navigates back to the fallback and the persisted selection is silently discarded (law ' +
|
|
3019
|
-
"C10; argo's reader had zero call sites because of exactly this). Pass `store.linkSearch` BY " +
|
|
3020
|
-
'REFERENCE instead — never a literal, never `search: true`, never a global link callback. ' +
|
|
3021
|
-
'(basalt/search-literal-link)'
|
|
3022
|
-
|
|
3023
|
-
/** True when `node` sits inside a `defineNav()` / `navGroup()` argument. */
|
|
3024
|
-
function insideNavDefinition(node) {
|
|
3025
|
-
let current = node.parent
|
|
3026
|
-
for (let depth = 0; current !== null && current !== undefined; depth++) {
|
|
3027
|
-
if (depth > ANCESTRY_MAX_DEPTH || current.type === 'Program') return false
|
|
3028
|
-
if (
|
|
3029
|
-
current.type === 'CallExpression' &&
|
|
3030
|
-
current.callee?.type === 'Identifier' &&
|
|
3031
|
-
NAV_DEFINITION_CALLEES.has(current.callee.name)
|
|
3032
|
-
) {
|
|
3033
|
-
return true
|
|
3034
|
-
}
|
|
3035
|
-
current = current.parent
|
|
3036
|
-
}
|
|
3037
|
-
return false
|
|
3038
|
-
}
|
|
3039
|
-
|
|
3040
|
-
// Ships: error
|
|
3041
|
-
const searchLiteralLink = {
|
|
3042
|
-
meta: {
|
|
3043
|
-
type: 'suggestion',
|
|
3044
|
-
docs: { description: 'Warn on a `search:` object literal inside defineNav/navGroup.' },
|
|
3045
|
-
schema: [],
|
|
3046
|
-
},
|
|
3047
|
-
create(context) {
|
|
3048
|
-
return {
|
|
3049
|
-
CallExpression(node) {
|
|
3050
|
-
if (node.callee?.type !== 'Identifier' || node.callee.name !== 'linkOptions') return
|
|
3051
|
-
const arg0 = node.arguments?.[0]
|
|
3052
|
-
if (arg0 === undefined || arg0.type !== 'ObjectExpression') return
|
|
3053
|
-
for (const prop of arg0.properties) {
|
|
3054
|
-
if (prop.type !== 'Property' || propertyKeyName(prop) !== 'search') continue
|
|
3055
|
-
if (prop.value?.type !== 'ObjectExpression') continue
|
|
3056
|
-
if (!insideNavDefinition(node)) continue
|
|
3057
|
-
if (hasThemeAllow(context, prop, 'search-literal-link')) continue
|
|
3058
|
-
context.report({ node: prop, message: SEARCH_LITERAL_LINK_MESSAGE })
|
|
3059
|
-
}
|
|
3060
|
-
},
|
|
3061
|
-
}
|
|
3062
|
-
},
|
|
3063
|
-
}
|
|
3064
|
-
|
|
3065
|
-
// ── Rule 23 — use-search-from-literal ───────────────────────────────────────────────────────────
|
|
3066
|
-
|
|
3067
|
-
const USE_SEARCH_FROM_LITERAL_MESSAGE =
|
|
3068
|
-
"useSearch({ from: '<route>' }) — a `from` literal pins the reader to ONE route id, so the same " +
|
|
3069
|
-
'component throws the moment it renders on a sibling or child route. A store field reads ' +
|
|
3070
|
-
'`useSearch({ strict: false })` internally, which sees the merged search of every matched route ' +
|
|
3071
|
-
'(law C10) — take the value as a prop, or read it through the store field. ' +
|
|
3072
|
-
'(basalt/use-search-from-literal)'
|
|
3073
|
-
|
|
3074
|
-
// Ships: error
|
|
3075
|
-
const useSearchFromLiteral = {
|
|
3076
|
-
meta: {
|
|
3077
|
-
type: 'suggestion',
|
|
3078
|
-
docs: { description: "Warn on useSearch({ from: '<literal>' })." },
|
|
3079
|
-
schema: [],
|
|
3080
|
-
},
|
|
3081
|
-
create(context) {
|
|
3082
|
-
return {
|
|
3083
|
-
CallExpression(node) {
|
|
3084
|
-
const callee = node.callee
|
|
3085
|
-
const name =
|
|
3086
|
-
callee?.type === 'MemberExpression' ? callee.property?.name : (callee?.name ?? undefined)
|
|
3087
|
-
if (name !== 'useSearch') return
|
|
3088
|
-
const arg0 = node.arguments?.[0]
|
|
3089
|
-
if (arg0 === undefined || arg0.type !== 'ObjectExpression') return
|
|
3090
|
-
for (const prop of arg0.properties) {
|
|
3091
|
-
if (prop.type !== 'Property' || propertyKeyName(prop) !== 'from') continue
|
|
3092
|
-
if (!isStringLiteral(prop.value)) continue
|
|
3093
|
-
if (hasThemeAllow(context, prop, 'use-search-from-literal')) continue
|
|
3094
|
-
context.report({ node: prop, message: USE_SEARCH_FROM_LITERAL_MESSAGE })
|
|
3095
|
-
}
|
|
3096
|
-
},
|
|
3097
|
-
}
|
|
3098
|
-
},
|
|
3099
|
-
}
|
|
3100
|
-
|
|
3101
|
-
// ── Rule 24 — bound-control-outside-home ────────────────────────────────────────────────────────
|
|
3102
|
-
|
|
3103
|
-
/**
|
|
3104
|
-
* A bound basalt control with no home — the pill-shaped controls, and `SliderControl` is
|
|
3105
|
-
* deliberately NOT among them: it has no pill form at all. It always renders a `PanelRow`
|
|
3106
|
-
* (`docs/ASIDE-SPEC.md` §3), so a `<Section>` body or a plain page stack is a legitimate place to
|
|
3107
|
-
* write one and "this renders as a stray pill" would be false there. {@link BOUND_TAGS} is the
|
|
3108
|
-
* whole set; every member is a `FieldHandle`-bound `basalt-ui/controls` export, so unlike
|
|
3109
|
-
* {@link RAW_FILTER_TAGS} there is no question of what it is FOR — only of where it was written.
|
|
3110
|
-
*/
|
|
3111
|
-
const BOUND_CONTROL_OUTSIDE_HOME_MESSAGE =
|
|
3112
|
-
'Bound basalt control with no home — a SelectFilter / ToggleFilter / RangeFilter / ' +
|
|
3113
|
-
'MultiSelectFilter / NumberFilter / SearchFilter / ViewTabs renders as a stray pill when it is ' +
|
|
3114
|
-
'written into a Section body or a page stack. It belongs in a home slot (`filters` / `tabs` / ' +
|
|
3115
|
-
'`filtersEnd` / `actions` / `sync` / `control`), inside a <FilterSet>, or inside a <PageAside> ' +
|
|
3116
|
-
'— where the panel surface renders it as a row instead (law C1, docs/ASIDE-SPEC.md §3). ' +
|
|
3117
|
-
'SliderControl is not policed: it renders its own PanelRow and has no pill form. An overlay ' +
|
|
3118
|
-
'(Modal/Drawer/Popover/Menu), a settings row and a form row (FormRow/FormGroup) are the ' +
|
|
3119
|
-
`declared non-homes and never report. ${SHELL_LESS_HOME_HINT} ` +
|
|
3120
|
-
'(basalt/bound-control-outside-home)'
|
|
3121
|
-
|
|
3122
|
-
const VIEW_TABS_REFUSED_HOME_MESSAGE =
|
|
3123
|
-
'`ViewTabs` is not in its home. It switches a page or a section from a `tabs` slot ' +
|
|
3124
|
-
"(`PageBar.tabs`, `Section.tabs`), or one card's view from a `ChartCard` / `WidgetHeader` " +
|
|
3125
|
-
'`actions` slot; it is refused outside any slot, in every other `PageBar` slot (`actions`, ' +
|
|
3126
|
-
'`filters`, `filtersEnd`, `sync`), in `Section.actions` and in a `FilterSet` ' +
|
|
3127
|
-
'(agent/rules/basalt-controls.md). (basalt/bound-control-outside-home)'
|
|
3128
|
-
|
|
3129
|
-
/** A `ViewTabs` written directly in a refused slot — see {@link VIEW_TABS_REFUSED_HOME_MESSAGE}. */
|
|
3130
|
-
function viewTabsInRefusedSlot(slots, captured) {
|
|
3131
|
-
if (slots.hostExports(captured).includes('FilterSet')) return true
|
|
3132
|
-
if (captured.directOwner === undefined) return false
|
|
3133
|
-
const owners = slots.ownerExports(captured)
|
|
3134
|
-
return (
|
|
3135
|
-
(owners.includes('PageBar') && captured.slotName !== 'tabs') ||
|
|
3136
|
-
(owners.includes('Section') && captured.slotName === 'actions')
|
|
3137
|
-
)
|
|
3138
|
-
}
|
|
3139
|
-
|
|
3140
|
-
/**
|
|
3141
|
-
* A BOUND basalt control that is in no home at all — ledger G5 (`docs/ASIDE-SPEC.md` §2), the half
|
|
3142
|
-
* of law C1 that had no guard: `control-outside-home` matches raw Mantine tags only, so a
|
|
3143
|
-
* `<SelectFilter field={…}/>` dropped into a `Section` body passed silently and shipped as a stray
|
|
3144
|
-
* pill.
|
|
3145
|
-
*
|
|
3146
|
-
* A NEW id rather than a widening of `control-outside-home`, per C16: a level is per-id, so
|
|
3147
|
-
* widening that rule would have landed this form at whatever level it holds, with no grace of its
|
|
3148
|
-
* own — and widening it in a minor would restart its grace besides.
|
|
3149
|
-
*
|
|
3150
|
-
* Provenance is the tag's basalt IMPORT ({@link collectBasaltImportMap}), never its bare name: a
|
|
3151
|
-
* consumer's own `SelectFilter` is not this one. The exemptions are the sibling rule's minus the
|
|
3152
|
-
* `@mantine/form` one — a form input is a raw input, and a `FieldHandle`-bound filter in a form
|
|
3153
|
-
* module is homeless there exactly as it is anywhere else.
|
|
3154
|
-
*
|
|
3155
|
-
* **There is deliberately NO text-lane twin in `src/guard`.** `raw-selection-control` can key on a
|
|
3156
|
-
* bare Mantine tag name because that name is Mantine's whatever the file does with it; a bound
|
|
3157
|
-
* control's name says nothing without the import graph and the ancestry, and a regex over a
|
|
3158
|
-
* 12-line window has neither. A text heuristic here would report a consumer's own `SelectFilter` in
|
|
3159
|
-
* its own `filters` slot — signal the plugin already has, noise the guard would add.
|
|
3160
|
-
*/
|
|
3161
|
-
// Ships: error
|
|
3162
|
-
const boundControlOutsideHome = {
|
|
3163
|
-
meta: {
|
|
3164
|
-
type: 'suggestion',
|
|
3165
|
-
docs: { description: 'Warn on a bound basalt control that is in no basalt home.' },
|
|
3166
|
-
schema: [],
|
|
3167
|
-
},
|
|
3168
|
-
create(context) {
|
|
3169
|
-
if (isTestFile(context)) return {}
|
|
3170
|
-
if (isOverlayConventionFile(getFilename(context))) return {}
|
|
3171
|
-
const slots = createSlotContext(context)
|
|
3172
|
-
const owner = createControlOwnerProbe()
|
|
3173
|
-
const controls = new Map()
|
|
3174
|
-
const ownTree = isBasaltOwnSource(getFilename(context))
|
|
3175
|
-
const candidates = []
|
|
3176
|
-
|
|
3177
|
-
return {
|
|
3178
|
-
...owner.visitors,
|
|
3179
|
-
ImportDeclaration(node) {
|
|
3180
|
-
collectBasaltImportMap(node, controls, ownTree)
|
|
3181
|
-
slots.noteImport(node)
|
|
3182
|
-
owner.noteImport(node)
|
|
3183
|
-
},
|
|
3184
|
-
// The object-spread spelling of a slot — see {@link spreadSlotOwnerBinding}. `slots.note`
|
|
3185
|
-
// accepts either node shape; feeding both is what keeps ONE home model across the lanes.
|
|
3186
|
-
Property(node) {
|
|
3187
|
-
slots.note(node)
|
|
3188
|
-
},
|
|
3189
|
-
JSXAttribute(node) {
|
|
3190
|
-
slots.note(node)
|
|
3191
|
-
},
|
|
3192
|
-
JSXExpressionContainer(node) {
|
|
3193
|
-
slots.noteChild(node)
|
|
3194
|
-
},
|
|
3195
|
-
JSXOpeningElement(node) {
|
|
3196
|
-
// Cheap pre-filter on the tag as WRITTEN; an alias resolves through `controls` at exit.
|
|
3197
|
-
const root = jsxRootName(node.name)
|
|
3198
|
-
if (root === undefined) return
|
|
3199
|
-
if (!BOUND_TAGS.has(jsxTagName(node.name) ?? '') && !controls.has(root)) return
|
|
3200
|
-
candidates.push({
|
|
3201
|
-
node,
|
|
3202
|
-
root,
|
|
3203
|
-
captured: slots.capture(node),
|
|
3204
|
-
hosted: hasAncestorTag(node, CONTROL_HOST_TAGS),
|
|
3205
|
-
})
|
|
3206
|
-
},
|
|
3207
|
-
'Program:exit'() {
|
|
3208
|
-
if (owner.isOwner()) return
|
|
3209
|
-
for (const { node, root, captured, hosted } of candidates) {
|
|
3210
|
-
const exported = controls.get(root)
|
|
3211
|
-
if (exported === undefined || !BOUND_TAGS.has(exported)) continue
|
|
3212
|
-
if (hosted) continue
|
|
3213
|
-
const refused = exported === 'ViewTabs' && viewTabsInRefusedSlot(slots, captured)
|
|
3214
|
-
if (!refused && (slots.resolve(captured) || slots.inSubtreeHome(captured))) continue
|
|
3215
|
-
if (hasThemeAllow(context, node, 'bound-control-outside-home')) continue
|
|
3216
|
-
context.report({
|
|
3217
|
-
node,
|
|
3218
|
-
message:
|
|
3219
|
-
exported === 'ViewTabs'
|
|
3220
|
-
? VIEW_TABS_REFUSED_HOME_MESSAGE
|
|
3221
|
-
: BOUND_CONTROL_OUTSIDE_HOME_MESSAGE,
|
|
3222
|
-
})
|
|
3223
|
-
}
|
|
3224
|
-
},
|
|
3225
|
-
}
|
|
3226
|
-
},
|
|
3227
|
-
}
|
|
3228
|
-
|
|
3229
|
-
// Rule 27 — query-dual-import — RETIRED. 1.29.0 dropped every raw TanStack re-export from
|
|
3230
|
-
// `basalt-ui/query` (the subpath itself is gone), so "dual-importing `@tanstack/react-query`
|
|
3231
|
-
// beside `basalt-ui/query`" is no longer a thing a consumer can even do — a consumer MUST import
|
|
3232
|
-
// `@tanstack/react-query` directly now, and this rule warned on every such import (90+ false
|
|
3233
|
-
// positives on argo alone). See `RETIRED_RULE_IDS` below.
|
|
3234
|
-
|
|
3235
|
-
/** The `basalt-ui/query` subpath, exactly — kept for `query-fn-unwrap`'s own gate below. */
|
|
3236
|
-
const BASALT_QUERY_SOURCE = 'basalt-ui/query'
|
|
3237
|
-
/** `unwrap` ships from the root since 1.29.0; the `./query` subpath is gone, so the root counts too. */
|
|
3238
|
-
const QUERY_UNWRAP_SOURCES = new Set([BASALT_QUERY_SOURCE, 'basalt-ui'])
|
|
3239
|
-
|
|
3240
|
-
// ── Rule 28 — query-fn-unwrap ───────────────────────────────────────────────────────────────────
|
|
3241
|
-
|
|
3242
|
-
const QUERY_FN_UNWRAP_MESSAGE =
|
|
3243
|
-
'queryFn calls fetch( without unwrap() (scope: an inline queryFn with a literal fetch( call in a ' +
|
|
3244
|
-
'file importing basalt-ui; a mock queryFn returning plain data is exempt) — `unwrap` throws on the error branch AND on a null data with ' +
|
|
3245
|
-
'no error (a 204, a silent transport failure), and both are caller bugs that have to surface as ' +
|
|
3246
|
-
'a rejected query rather than as `data: null` rendered through the success branch ' +
|
|
3247
|
-
'(agent/rules/basalt-batteries.md). Wrap the call: `queryFn: () => unwrap(client.thing.get())`. ' +
|
|
3248
|
-
'(basalt/query-fn-unwrap)'
|
|
3249
|
-
|
|
3250
|
-
/** A bare `fetch(` / `unwrap(` call, as written — the two halves of this rule's text heuristic. */
|
|
3251
|
-
const FETCH_CALL = /\bfetch\s*\(/
|
|
3252
|
-
const UNWRAP_CALL = /\bunwrap\s*\(/
|
|
3253
|
-
|
|
3254
|
-
/**
|
|
3255
|
-
* A `queryFn` that fetches and never `unwrap`s it — F5, the second unguarded `./query` law.
|
|
3256
|
-
*
|
|
3257
|
-
* **The heuristic is deliberately one sentence long, and it is a TEXT test inside a SYNTACTIC
|
|
3258
|
-
* range**: the rule takes the source span of the `queryFn` property's own function value and fires
|
|
3259
|
-
* only when `fetch(` appears in it and `unwrap(` does not. Nothing resolves, nothing follows a
|
|
3260
|
-
* helper out of the span.
|
|
3261
|
-
*
|
|
3262
|
-
* What that buys and what it costs, both stated so neither is a surprise. It sees the two shapes
|
|
3263
|
-
* the doctrine is actually written against — `queryFn: () => fetch(url)` and
|
|
3264
|
-
* `queryFn: async () => (await fetch(url)).json()`. It does NOT see a `queryFn: fetchThing`
|
|
3265
|
-
* reference, an Eden/Treaty call (`client.thing.get()` contains no `fetch(`), or an `unwrap`
|
|
3266
|
-
* applied one frame out; and it counts an `unwrap(` anywhere in the span, including one applied to
|
|
3267
|
-
* something else. A stricter version would need the call graph. The narrow version fires on the
|
|
3268
|
-
* form a consumer writes by reflex on day one, which is the one the law exists for.
|
|
3269
|
-
*
|
|
3270
|
-
* Scoped to files importing `basalt-ui` or `basalt-ui/query` literally, for the reason {@link queryDualImport}
|
|
3271
|
-
* gives: without that gate it is an opinion about `fetch`, which basalt does not have.
|
|
3272
|
-
*/
|
|
3273
|
-
// Ships: error
|
|
3274
|
-
const queryFnUnwrap = {
|
|
3275
|
-
meta: {
|
|
3276
|
-
type: 'suggestion',
|
|
3277
|
-
docs: { description: 'Warn on a queryFn that fetches without wrapping the call in unwrap().' },
|
|
3278
|
-
schema: [],
|
|
3279
|
-
},
|
|
3280
|
-
create(context) {
|
|
3281
|
-
if (isTestFile(context)) return {}
|
|
3282
|
-
const candidates = []
|
|
3283
|
-
let basaltQuery = false
|
|
3284
|
-
|
|
3285
|
-
return {
|
|
3286
|
-
ImportDeclaration(node) {
|
|
3287
|
-
if (QUERY_UNWRAP_SOURCES.has(node.source?.value)) basaltQuery = true
|
|
3288
|
-
},
|
|
3289
|
-
Property(node) {
|
|
3290
|
-
if (propertyKeyName(node) !== 'queryFn') return
|
|
3291
|
-
const value = node.value
|
|
3292
|
-
if (value?.type !== 'ArrowFunctionExpression' && value?.type !== 'FunctionExpression') {
|
|
3293
|
-
return
|
|
3294
|
-
}
|
|
3295
|
-
candidates.push({ node, value })
|
|
3296
|
-
},
|
|
3297
|
-
'Program:exit'() {
|
|
3298
|
-
if (!basaltQuery) return
|
|
3299
|
-
const text = context.sourceCode?.text ?? ''
|
|
3300
|
-
for (const { node, value } of candidates) {
|
|
3301
|
-
const [start, end] = value.range ?? []
|
|
3302
|
-
if (typeof start !== 'number' || typeof end !== 'number') continue
|
|
3303
|
-
const body = text.slice(start, end)
|
|
3304
|
-
if (!FETCH_CALL.test(body) || UNWRAP_CALL.test(body)) continue
|
|
3305
|
-
if (hasThemeAllow(context, node, 'query-fn-unwrap')) continue
|
|
3306
|
-
context.report({ node, message: QUERY_FN_UNWRAP_MESSAGE })
|
|
3307
|
-
}
|
|
3308
|
-
},
|
|
3309
|
-
}
|
|
3310
|
-
},
|
|
3311
|
-
}
|
|
3312
|
-
|
|
3313
|
-
// ── Rule 30 — forms-field-key ───────────────────────────────────────────────────────────────────
|
|
3314
|
-
|
|
3315
|
-
/** The subpath the forms idiom is imported from — the only provenance this rule accepts. */
|
|
3316
|
-
const FORMS_IMPORT_SOURCE = 'basalt-ui/forms'
|
|
3317
|
-
|
|
3318
|
-
/** The spread name this rule resolves (with `fieldKey`) through the local→imported map. */
|
|
3319
|
-
const FORMS_SPREAD_NAMES = new Set(['inputProps'])
|
|
3320
|
-
|
|
3321
|
-
const FORMS_FIELD_KEY_MESSAGES = {
|
|
3322
|
-
missing:
|
|
3323
|
-
'A spread `inputProps(…)` with no sibling `key`. The field loses its reconciler key, so an ' +
|
|
3324
|
-
'uncontrolled input keeps its old text through `form.reset()`, `form.setValues()` and a ' +
|
|
3325
|
-
'removed list row — nothing throws and nothing type-checks differently. Write ' +
|
|
3326
|
-
'`key={fieldKey(form, path)} {...inputProps(form, path)}`: `inputProps` stopped returning ' +
|
|
3327
|
-
'`key` because a spread `key` is a React 19 warning, and a call site that merely kept the ' +
|
|
3328
|
-
'spread compiles unchanged and silently stops resetting. ' +
|
|
3329
|
-
'(basalt/forms-field-key)',
|
|
3330
|
-
}
|
|
3331
|
-
|
|
3332
|
-
/** The `key` attribute among a JSXOpeningElement's attributes, if it has one written literally. */
|
|
3333
|
-
function hasKeyAttribute(opening) {
|
|
3334
|
-
for (const attr of opening?.attributes ?? []) {
|
|
3335
|
-
if (attr?.type === 'JSXAttribute' && attr.name?.name === 'key') return true
|
|
3336
|
-
}
|
|
3337
|
-
return false
|
|
3338
|
-
}
|
|
3339
|
-
|
|
3340
|
-
/**
|
|
3341
|
-
* A field spread that lost its reconciler key — the guard for the one forms change a consumer's
|
|
3342
|
-
* compiler cannot see.
|
|
3343
|
-
*
|
|
3344
|
-
* `inputProps` used to return `getInputProps(path)` AND `key` in one object, so
|
|
3345
|
-
* `<TextInput {...inputProps(form, 'x')} />` covered both. It no longer returns `key` (a spread
|
|
3346
|
-
* `key` is a React 19 warning), and that exact call site still type-checks, still renders and still
|
|
3347
|
-
* validates — it just stops resetting. There is no compile error, no throw and no console line to
|
|
3348
|
-
* find it by, which is precisely the profile a lint rule exists for.
|
|
3349
|
-
*
|
|
3350
|
-
* `{...inputProps(…)}` with no sibling `key` is reported and autofixed: the `key` attribute is
|
|
3351
|
-
* inserted with the SAME arguments, and `fieldKey` is added to the existing `basalt-ui/forms`
|
|
3352
|
-
* import when it is not already there, so `--fix` produces working code rather than an unresolved
|
|
3353
|
-
* identifier.
|
|
3354
|
-
*
|
|
3355
|
-
* Provenance is the `basalt-ui/forms` specifier (plus a relative import inside basalt's own `src/`,
|
|
3356
|
-
* or the dogfood surface goes silent — the same gate `collectBasaltImports` uses), read through the
|
|
3357
|
-
* local→imported map so `import { inputProps as f }` is covered. `inputProps` is an ordinary enough
|
|
3358
|
-
* name that firing on an unimported one would be an opinion about a consumer's own helper.
|
|
3359
|
-
*/
|
|
3360
|
-
// Ships: error
|
|
3361
|
-
const formsFieldKey = {
|
|
3362
|
-
meta: {
|
|
3363
|
-
type: 'suggestion',
|
|
3364
|
-
docs: { description: 'Warn on an inputProps spread that lost its reconciler key.' },
|
|
3365
|
-
schema: [],
|
|
3366
|
-
fixable: 'code',
|
|
3367
|
-
},
|
|
3368
|
-
create(context) {
|
|
3369
|
-
if (isTestFile(context)) return {}
|
|
3370
|
-
const ownTree = isBasaltOwnSource(getFilename(context))
|
|
3371
|
-
/** local name → the name it was imported as, for the forms names this rule reads. */
|
|
3372
|
-
const imported = new Map()
|
|
3373
|
-
/** The forms ImportDeclaration the `fieldKey` specifier is added to, if one exists. */
|
|
3374
|
-
let formsImport
|
|
3375
|
-
const candidates = []
|
|
3376
|
-
|
|
3377
|
-
return {
|
|
3378
|
-
ImportDeclaration(node) {
|
|
3379
|
-
const source = node.source?.value
|
|
3380
|
-
if (typeof source !== 'string') return
|
|
3381
|
-
if (source !== FORMS_IMPORT_SOURCE && !(ownTree && RELATIVE_IMPORT_SOURCE.test(source))) {
|
|
3382
|
-
return
|
|
3383
|
-
}
|
|
3384
|
-
for (const spec of node.specifiers ?? []) {
|
|
3385
|
-
const local = spec.local?.name
|
|
3386
|
-
const name = spec.imported?.name ?? spec.imported?.value
|
|
3387
|
-
if (typeof local !== 'string' || typeof name !== 'string') continue
|
|
3388
|
-
if (name === 'fieldKey' || FORMS_SPREAD_NAMES.has(name)) {
|
|
3389
|
-
imported.set(local, name)
|
|
3390
|
-
if (source === FORMS_IMPORT_SOURCE) formsImport = node
|
|
3391
|
-
}
|
|
3392
|
-
}
|
|
3393
|
-
},
|
|
3394
|
-
JSXSpreadAttribute(node) {
|
|
3395
|
-
const call = node.argument
|
|
3396
|
-
if (call?.type !== 'CallExpression' || call.callee?.type !== 'Identifier') return
|
|
3397
|
-
const opening = node.parent
|
|
3398
|
-
if (opening === null || opening === undefined || opening.type !== 'JSXOpeningElement')
|
|
3399
|
-
return
|
|
3400
|
-
candidates.push({ node, call, local: call.callee.name, opening })
|
|
3401
|
-
},
|
|
3402
|
-
'Program:exit'() {
|
|
3403
|
-
const text = context.sourceCode?.text ?? ''
|
|
3404
|
-
const hasFieldKey = [...imported.values()].includes('fieldKey')
|
|
3405
|
-
let importFixed = false
|
|
3406
|
-
|
|
3407
|
-
for (const { node, call, local, opening } of candidates) {
|
|
3408
|
-
const name = imported.get(local)
|
|
3409
|
-
if (name === undefined) continue
|
|
3410
|
-
if (hasThemeAllow(context, node, 'forms-field-key')) continue
|
|
3411
|
-
|
|
3412
|
-
if (hasKeyAttribute(opening)) continue
|
|
3413
|
-
|
|
3414
|
-
const args = call.arguments ?? []
|
|
3415
|
-
const first = args[0]?.range
|
|
3416
|
-
const last = args[args.length - 1]?.range
|
|
3417
|
-
// No arguments to copy means no honest `fieldKey(…)` to write — report without a fix
|
|
3418
|
-
// rather than emit one that does not compile.
|
|
3419
|
-
if (first === undefined || last === undefined) {
|
|
3420
|
-
context.report({ node, message: FORMS_FIELD_KEY_MESSAGES.missing })
|
|
3421
|
-
continue
|
|
3422
|
-
}
|
|
3423
|
-
const argsText = text.slice(first[0], last[1])
|
|
3424
|
-
// The import specifier is added by the FIRST fixed occurrence only: three fields in one
|
|
3425
|
-
// file would otherwise emit three overlapping edits to one import, and an overlapping
|
|
3426
|
-
// fix is dropped rather than merged.
|
|
3427
|
-
const needsImport = !hasFieldKey && !importFixed && formsImport !== undefined
|
|
3428
|
-
const lastSpec = needsImport
|
|
3429
|
-
? formsImport.specifiers?.[(formsImport.specifiers?.length ?? 0) - 1]
|
|
3430
|
-
: undefined
|
|
3431
|
-
if (needsImport && lastSpec !== undefined) importFixed = true
|
|
3432
|
-
|
|
3433
|
-
context.report({
|
|
3434
|
-
node,
|
|
3435
|
-
message: FORMS_FIELD_KEY_MESSAGES.missing,
|
|
3436
|
-
fix: (fixer) => {
|
|
3437
|
-
const fixes = [fixer.insertTextBefore(node, `key={fieldKey(${argsText})} `)]
|
|
3438
|
-
if (lastSpec !== undefined) fixes.push(fixer.insertTextAfter(lastSpec, ', fieldKey'))
|
|
3439
|
-
return fixes
|
|
3440
|
-
},
|
|
3441
|
-
})
|
|
3442
|
-
}
|
|
3443
|
-
},
|
|
3444
|
-
}
|
|
3445
|
-
},
|
|
3446
|
-
}
|
|
3447
|
-
|
|
3448
|
-
// ── Rule 31 — no-import-meta-env ────────────────────────────────────────────────────────────────
|
|
3449
|
-
|
|
3450
|
-
const NO_IMPORT_META_ENV_MESSAGE =
|
|
3451
|
-
'import.meta.env is banned in shipped basalt-ui source — this package is consumed both as a ' +
|
|
3452
|
-
'Vite-bundled dep AND resolved directly by a consumer whose own bundler may define no ' +
|
|
3453
|
-
'import.meta.env at all (basaltViteConfig defines process.env.NODE_ENV precisely so basalt ' +
|
|
3454
|
-
'code never needs it). Use process.env.NODE_ENV instead. (basalt/no-import-meta-env)'
|
|
3455
|
-
|
|
3456
|
-
/**
|
|
3457
|
-
* `import.meta.env` — a MemberExpression whose object is the `import.meta` MetaProperty and whose
|
|
3458
|
-
* property is `env`. Repo-local only: a CONSUMER's own app code legitimately uses
|
|
3459
|
-
* `import.meta.env.VITE_*`, so it is wired in `/.oxlintrc.json` alone and SELF-SCOPES to
|
|
3460
|
-
* `packages/basalt-ui/src/**` by path (like `token-layer-boundary`): the playground, which is
|
|
3461
|
-
* a consumer, keeps its own `import.meta.env`.
|
|
3462
|
-
*/
|
|
3463
|
-
// Ships: repo-local only
|
|
3464
|
-
const noImportMetaEnv = {
|
|
3465
|
-
meta: {
|
|
3466
|
-
type: 'suggestion',
|
|
3467
|
-
docs: {
|
|
3468
|
-
description: 'Disallow import.meta.env — basalt-ui source must use process.env.NODE_ENV.',
|
|
3469
|
-
},
|
|
3470
|
-
schema: [],
|
|
3471
|
-
},
|
|
3472
|
-
create(context) {
|
|
3473
|
-
if (isTestFile(context) || !isBasaltOwnSource(getFilename(context))) return {}
|
|
3474
|
-
|
|
3475
|
-
return {
|
|
3476
|
-
MemberExpression(node) {
|
|
3477
|
-
const object = node.object
|
|
3478
|
-
if (
|
|
3479
|
-
object?.type !== 'MetaProperty' ||
|
|
3480
|
-
object.meta?.name !== 'import' ||
|
|
3481
|
-
object.property?.name !== 'meta'
|
|
3482
|
-
)
|
|
3483
|
-
return
|
|
3484
|
-
if (node.computed || node.property?.name !== 'env') return
|
|
3485
|
-
if (hasThemeAllow(context, node, 'no-import-meta-env')) return
|
|
3486
|
-
context.report({ node, message: NO_IMPORT_META_ENV_MESSAGE })
|
|
3487
|
-
},
|
|
3488
|
-
}
|
|
3489
|
-
},
|
|
3490
|
-
}
|
|
3491
|
-
|
|
3492
|
-
// ── Rule 32 — raw-breakpoint ─────────────────────────────────────────────────────────────────────
|
|
3493
|
-
|
|
3494
|
-
/** The Mantine responsive-style-prop shorthand keys — `{ base, xs, sm, md, lg, xl }`, never a mix. */
|
|
3495
|
-
const RESPONSIVE_OBJECT_KEYS = new Set(['base', 'xs', 'sm', 'md', 'lg', 'xl'])
|
|
3496
|
-
|
|
3497
|
-
/**
|
|
3498
|
-
* Is `node` a Mantine responsive-style-prop object literal — `{ base: 1, sm: 2 }`? Every property
|
|
3499
|
-
* key has to be one of {@link RESPONSIVE_OBJECT_KEYS}, and there has to be at least one: a random
|
|
3500
|
-
* object that merely happens to have a `sm` key among other, unrelated ones is not this shape, and
|
|
3501
|
-
* an empty object is not a breakpoint decision at all.
|
|
3502
|
-
*/
|
|
3503
|
-
function isResponsiveObjectValue(node, namedOnly = false) {
|
|
3504
|
-
if (node === null || node === undefined || node.type !== 'ObjectExpression') return false
|
|
3505
|
-
if (node.properties.length === 0) return false
|
|
3506
|
-
const names = node.properties.map((prop) =>
|
|
3507
|
-
prop.type === 'Property' ? propertyKeyName(prop) : undefined,
|
|
3508
|
-
)
|
|
3509
|
-
if (!names.every((name) => typeof name === 'string' && RESPONSIVE_OBJECT_KEYS.has(name)))
|
|
3510
|
-
return false
|
|
3511
|
-
// Under `type="container"` a lone `base` is the unconditional value, not a breakpoint decision.
|
|
3512
|
-
return !namedOnly || names.some((name) => name !== 'base')
|
|
3513
|
-
}
|
|
3514
|
-
|
|
3515
|
-
/** The `const` initializers {@link reachableObjects} can resolve an Identifier to. */
|
|
3516
|
-
const RESOLVABLE_INIT_TYPES = new Set([
|
|
3517
|
-
'ObjectExpression',
|
|
3518
|
-
'ConditionalExpression',
|
|
3519
|
-
'LogicalExpression',
|
|
3520
|
-
'Identifier',
|
|
3521
|
-
])
|
|
3522
|
-
|
|
3523
|
-
/**
|
|
3524
|
-
* Every object literal a value can evaluate to: an Identifier resolves through `consts` (the
|
|
3525
|
-
* same-file name→init map) FIRST, then a conditional contributes both branches and a logical both
|
|
3526
|
-
* sides — in any nesting, so `const span = wide ? { base: 12, md: 4 } : 12` then `span={span}` is
|
|
3527
|
-
* the same shape as writing the conditional inline (rb's hero Grid was a false negative until
|
|
3528
|
-
* 1.32.1). `seen` guards an Identifier cycle (`const a = b`, `const b = a`) and a shared object.
|
|
3529
|
-
*/
|
|
3530
|
-
function reachableObjects(node, consts, seen = new Set()) {
|
|
3531
|
-
const resolved = node?.type === 'Identifier' ? consts.get(node.name) : node
|
|
3532
|
-
if (resolved === null || resolved === undefined || seen.has(resolved)) return []
|
|
3533
|
-
seen.add(resolved)
|
|
3534
|
-
switch (resolved.type) {
|
|
3535
|
-
case 'ObjectExpression':
|
|
3536
|
-
return [resolved]
|
|
3537
|
-
case 'Identifier':
|
|
3538
|
-
return reachableObjects(resolved, consts, seen)
|
|
3539
|
-
case 'ConditionalExpression':
|
|
3540
|
-
return [resolved.consequent, resolved.alternate].flatMap((branch) =>
|
|
3541
|
-
reachableObjects(branch, consts, seen),
|
|
3542
|
-
)
|
|
3543
|
-
case 'LogicalExpression':
|
|
3544
|
-
return [resolved.left, resolved.right].flatMap((side) => reachableObjects(side, consts, seen))
|
|
3545
|
-
default:
|
|
3546
|
-
return []
|
|
3547
|
-
}
|
|
3548
|
-
}
|
|
3549
|
-
|
|
3550
|
-
/**
|
|
3551
|
-
* Does this prop value CONTAIN a responsive object — any object it can evaluate to
|
|
3552
|
-
* ({@link reachableObjects}), or one nested one level down in a property of one
|
|
3553
|
-
* (`footer={{ height: { base: 60, sm: 0 } }}`, Mantine's own AppShell idiom), the property value
|
|
3554
|
-
* resolving the same way. Matching only a nested `ObjectExpression` left the Identifier-in-a-
|
|
3555
|
-
* property shape trivially bypassable.
|
|
3556
|
-
*/
|
|
3557
|
-
function containsResponsiveObjectValue(node, consts, namedOnly = false, seen = new Set()) {
|
|
3558
|
-
return reachableObjects(node, consts, seen).some(
|
|
3559
|
-
(object) =>
|
|
3560
|
-
isResponsiveObjectValue(object, namedOnly) ||
|
|
3561
|
-
object.properties.some(
|
|
3562
|
-
(prop) =>
|
|
3563
|
-
prop.type === 'Property' &&
|
|
3564
|
-
containsResponsiveObjectValue(prop.value, consts, namedOnly, seen),
|
|
3565
|
-
),
|
|
3566
|
-
)
|
|
3567
|
-
}
|
|
3568
|
-
|
|
3569
|
-
/**
|
|
3570
|
-
* The props each Mantine grid routes through `@container` queries under `type="container"` —
|
|
3571
|
-
* confirmed in `@mantine/core` 9.3 source: `SimpleGridContainerVariables` reads `cols`/`spacing`/
|
|
3572
|
-
* `verticalSpacing`, `GridVariables` reads `gap`/`rowGap`/`columnGap`, `GridColVariables` reads
|
|
3573
|
-
* `span`/`offset`/`order`/`align`. Every OTHER responsive prop on the same element (`p`, `mt`,
|
|
3574
|
-
* `mih`, …) is a Box style prop and still compiles to viewport `@media`, so the container exemption
|
|
3575
|
-
* stops at this set. `Grid`'s own `breakpoints` is the container scale itself, not a viewport key.
|
|
3576
|
-
*/
|
|
3577
|
-
const CONTAINER_ROUTED_PROPS = {
|
|
3578
|
-
SimpleGrid: new Set(['cols', 'spacing', 'verticalSpacing']),
|
|
3579
|
-
Grid: new Set(['gap', 'rowGap', 'columnGap', 'breakpoints']),
|
|
3580
|
-
'Grid.Col': new Set(['span', 'offset', 'order', 'align']),
|
|
3581
|
-
}
|
|
3582
|
-
|
|
3583
|
-
/**
|
|
3584
|
-
* How Mantine 9 resolves a responsive object on this element's grid, read from `@mantine/core`
|
|
3585
|
-
* 9.3 source — the sanctioned answer to this rule, so it has to be exempt exactly where it works:
|
|
3586
|
-
*
|
|
3587
|
-
* - `'container'` — a `<Grid type="container" breakpoints={…}>` (or a `Grid.Col` inside one) whose
|
|
3588
|
-
* map statically resolves to a non-empty object. Keys resolve through that map into
|
|
3589
|
-
* `@container mantine-grid` queries, so an `sm` key is whatever width the map gives it: exempt.
|
|
3590
|
-
* Mantine types the map as `Record<MantineSize, string>`, so the recipe's keys ARE `xs`–`xl` —
|
|
3591
|
-
* exempting by key name instead of by owner would flag the sanctioned answer itself.
|
|
3592
|
-
* - `'simple-grid'` — `<SimpleGrid type="container">`. `SimpleGridContainerVariables` writes each
|
|
3593
|
-
* key VERBATIM as `@container simple-grid (min-width: <key>)` and never consults
|
|
3594
|
-
* `theme.breakpoints`: a `'480px'` key works (and is not a responsive-object key, so it never
|
|
3595
|
-
* reaches here), while `sm` emits `(min-width: sm)` — invalid CSS, a dead query. Flagged.
|
|
3596
|
-
* - `'fallback'` — `<Grid type="container">` whose `breakpoints` is absent, `undefined`, `{}` or not
|
|
3597
|
-
* statically resolvable (or a `Grid.Col` in one). `Grid` takes its container branch only on a
|
|
3598
|
-
* truthy map, and an empty one emits no query at all — so none of these is the container law,
|
|
3599
|
-
* and an unreadable map is reported rather than trusted. Flagged.
|
|
3600
|
-
* - `undefined` — not a container grid; the ordinary viewport law applies.
|
|
3601
|
-
*
|
|
3602
|
-
* `type` has to be the string literal `"container"`; a dynamic value is not a decision this rule
|
|
3603
|
-
* can read. `Grid.Col` takes its grid's mode by walking to the nearest enclosing `Grid` element.
|
|
3604
|
-
* `consts` is the rule's same-file name→object map, so `breakpoints={map}` resolves like any value.
|
|
3605
|
-
* The one IMPORTED map trusted is basalt's own `CONTAINER_GRID_BREAKPOINTS` ({@link isShippedGridMap}).
|
|
3606
|
-
*/
|
|
3607
|
-
function containerGridMode(opening, mantineImports, consts, sourceCode) {
|
|
3608
|
-
let tag = resolveMantineTag(opening.name, mantineImports)
|
|
3609
|
-
let grid = opening
|
|
3610
|
-
if (tag === 'Grid.Col') {
|
|
3611
|
-
grid = undefined
|
|
3612
|
-
let node = opening.parent?.parent
|
|
3613
|
-
for (let depth = 0; node !== null && node !== undefined; depth++, node = node.parent) {
|
|
3614
|
-
if (depth > ANCESTRY_MAX_DEPTH || node.type === 'Program') break
|
|
3615
|
-
if (node.type !== 'JSXElement') continue
|
|
3616
|
-
if (resolveMantineTag(node.openingElement.name, mantineImports) !== 'Grid') continue
|
|
3617
|
-
grid = node.openingElement
|
|
3618
|
-
tag = 'Grid'
|
|
3619
|
-
break
|
|
3620
|
-
}
|
|
3621
|
-
}
|
|
3622
|
-
if (grid === undefined || (tag !== 'Grid' && tag !== 'SimpleGrid')) return undefined
|
|
3623
|
-
const attr = (name) =>
|
|
3624
|
-
grid.attributes.find((a) => a.type === 'JSXAttribute' && a.name?.name === name)
|
|
3625
|
-
const type = attr('type')
|
|
3626
|
-
if (
|
|
3627
|
-
type === undefined ||
|
|
3628
|
-
!isStringLiteral(attrValue(type)) ||
|
|
3629
|
-
attrValue(type).value !== 'container'
|
|
3630
|
-
)
|
|
3631
|
-
return undefined
|
|
3632
|
-
if (tag === 'SimpleGrid') return 'simple-grid'
|
|
3633
|
-
const breakpoints = attr('breakpoints')
|
|
3634
|
-
if (breakpoints === undefined) return 'fallback'
|
|
3635
|
-
let map = attrValue(breakpoints)
|
|
3636
|
-
if (isShippedGridMap(sourceCode, map)) return 'container'
|
|
3637
|
-
if (map?.type === 'Identifier') map = consts.get(map.name)
|
|
3638
|
-
const nonEmpty =
|
|
3639
|
-
map?.type === 'ObjectExpression' && map.properties.some((prop) => prop.type === 'Property')
|
|
3640
|
-
return nonEmpty ? 'container' : 'fallback'
|
|
3641
|
-
}
|
|
3642
|
-
|
|
3643
|
-
/**
|
|
3644
|
-
* Whether `node` reads basalt's own `CONTAINER_GRID_BREAKPOINTS` — its value is known, so it is
|
|
3645
|
-
* the one imported `breakpoints` map trusted. Resolved through the scope manager to the BINDING the
|
|
3646
|
-
* identifier reads, never by local name: a parameter or inner `const` shadowing the import is not
|
|
3647
|
-
* the import. The binding has to be an `ImportSpecifier` naming it from `basalt-ui/tokens` (any
|
|
3648
|
-
* alias, not type-only), a `.CONTAINER_GRID_BREAKPOINTS` member of that module's namespace import,
|
|
3649
|
-
* or a `const` whose initializer resolves the same way. Without a scope manager nothing is trusted
|
|
3650
|
-
* — reported, the conservative answer.
|
|
3651
|
-
*/
|
|
3652
|
-
function isShippedGridMap(sourceCode, node, seen = new Set()) {
|
|
3653
|
-
if (node?.type === 'MemberExpression') return isShippedGridMapMember(sourceCode, node)
|
|
3654
|
-
if (node?.type !== 'Identifier' || seen.has(node)) return false
|
|
3655
|
-
seen.add(node)
|
|
3656
|
-
const def = soleDefinition(sourceCode, node)
|
|
3657
|
-
if (def?.type === 'ImportBinding') {
|
|
3658
|
-
const spec = def.node
|
|
3659
|
-
const decl = def.parent
|
|
3660
|
-
if (decl?.type !== 'ImportDeclaration' || decl.importKind === 'type') return false
|
|
3661
|
-
if (decl.source?.value !== 'basalt-ui/tokens') return false
|
|
3662
|
-
if (spec.type !== 'ImportSpecifier' || spec.importKind === 'type') return false
|
|
3663
|
-
const imported = spec.imported
|
|
3664
|
-
const importedName = imported.type === 'Identifier' ? imported.name : imported.value
|
|
3665
|
-
return importedName === 'CONTAINER_GRID_BREAKPOINTS'
|
|
3666
|
-
}
|
|
3667
|
-
if (def?.type === 'Variable' && def.parent?.kind === 'const')
|
|
3668
|
-
return isShippedGridMap(sourceCode, def.node.init, seen)
|
|
3669
|
-
return false
|
|
3670
|
-
}
|
|
3671
|
-
|
|
3672
|
-
/** `tokens.CONTAINER_GRID_BREAKPOINTS` (or `tokens['CONTAINER_GRID_BREAKPOINTS']`) on `import * as tokens from 'basalt-ui/tokens'`. */
|
|
3673
|
-
function isShippedGridMapMember(sourceCode, node) {
|
|
3674
|
-
const property = node.property
|
|
3675
|
-
const name = node.computed
|
|
3676
|
-
? isStringLiteral(property) && property.value
|
|
3677
|
-
: property?.type === 'Identifier' && property.name
|
|
3678
|
-
if (name !== 'CONTAINER_GRID_BREAKPOINTS' || node.object?.type !== 'Identifier') return false
|
|
3679
|
-
const def = soleDefinition(sourceCode, node.object)
|
|
3680
|
-
return (
|
|
3681
|
-
def?.type === 'ImportBinding' &&
|
|
3682
|
-
def.node.type === 'ImportNamespaceSpecifier' &&
|
|
3683
|
-
def.parent?.importKind !== 'type' &&
|
|
3684
|
-
def.parent?.source?.value === 'basalt-ui/tokens'
|
|
3685
|
-
)
|
|
3686
|
-
}
|
|
3687
|
-
|
|
3688
|
-
/** The one definition of the variable `identifier` reads, or `undefined` (unresolved, or more than one). */
|
|
3689
|
-
function soleDefinition(sourceCode, identifier) {
|
|
3690
|
-
if (typeof sourceCode?.getScope !== 'function') return undefined
|
|
3691
|
-
for (let scope = sourceCode.getScope(identifier); scope; scope = scope.upper) {
|
|
3692
|
-
const variable = scope.set.get(identifier.name)
|
|
3693
|
-
if (variable === undefined) continue
|
|
3694
|
-
return variable.defs.length === 1 ? variable.defs[0] : undefined
|
|
3695
|
-
}
|
|
3696
|
-
return undefined
|
|
3697
|
-
}
|
|
3698
|
-
|
|
3699
|
-
/**
|
|
3700
|
-
* The shell components that are `visibleFrom`/`hiddenFrom`'s legitimate home — the size-class
|
|
3701
|
-
* axis's one JSX escape hatch, alongside overlays. Matched by DECLARATION name, the same
|
|
3702
|
-
* owner-by-declaration test `hand-rolled-shell`'s
|
|
3703
|
-
* `notesOwnerDefinition` already uses for "this file IS the framework piece, not a consumer of it"
|
|
3704
|
-
* — a file defining one of these is exempt for the whole file, because deciding which JSX line
|
|
3705
|
-
* inside a shell's own render tree is "the shell deciding its own chrome" vs. "a stray breakpoint"
|
|
3706
|
-
* is not a distinction the shell's own implementation can make about itself. The OTHER legitimate
|
|
3707
|
-
* home is a control implementing its own C9 swap (`ViewTabs`, `ActionGroup`, …) — that half reuses
|
|
3708
|
-
* {@link createControlOwnerProbe} (`controlOwner` below) rather than a second name list.
|
|
3709
|
-
*/
|
|
3710
|
-
const SHELL_HOME_NAMES = new Set(['BasaltShell', 'AppSidebar', 'MobileNav', 'AppBrand'])
|
|
3711
|
-
|
|
3712
|
-
/**
|
|
3713
|
-
* The two files exempted by NAME rather than by declaration: `useMediaQuery`'s own implementation
|
|
3714
|
-
* (`common/use-media-query.ts` — the one sanctioned `window.matchMedia` read every other file,
|
|
3715
|
-
* including `useSizeClass`, now funnels through) and `ChartTooltip` (the Mantine-free chart layer's
|
|
3716
|
-
* own pointer-tier read).
|
|
3717
|
-
*/
|
|
3718
|
-
const RAW_BREAKPOINT_EXEMPT_FILE = /(?:^|[\\/])(?:use-media-query\.ts|ChartTooltip\.tsx)$/
|
|
3719
|
-
|
|
3720
|
-
/**
|
|
3721
|
-
* The one recipe every raw-breakpoint message points at. A page's own layout keys on its CONTAINER
|
|
3722
|
-
* (`CONTAINER_CLASSES`, `basalt-ui/tokens`: compact 240 / regular 480 / wide 800), never on the
|
|
3723
|
-
* viewport — `useSizeClass()` is the shell's seam, not a page's. Mantine 9's own `type="container"`
|
|
3724
|
-
* grids are the primitive: both self-wrap in an `inline-size` container, so they need no ancestor.
|
|
3725
|
-
* The px literals are `CONTAINER_KEYS` written out (the plugin cannot import TS source);
|
|
3726
|
-
* `oxlint-plugin.test.ts` asserts every one against it, and the MIGRATING recipe too.
|
|
3727
|
-
*/
|
|
3728
|
-
export const RAW_BREAKPOINT_RECIPE =
|
|
3729
|
-
'A page’s own layout keys on its container: <SimpleGrid type="container" cols={{ base: 1, ' +
|
|
3730
|
-
'[CONTAINER_KEYS.regular]: 2, [CONTAINER_KEYS.wide]: 3 }}> (basalt-ui/tokens; the keys are ' +
|
|
3731
|
-
"the px lengths '480px'/'800px'), or <Grid " +
|
|
3732
|
-
'type="container" breakpoints={CONTAINER_GRID_BREAKPOINTS}> (basalt-ui/tokens), with Grid.Col ' +
|
|
3733
|
-
'span={{ base: 12, sm: 6 }} keyed through that map; a Flex direction swap becomes that SimpleGrid (equal ' +
|
|
3734
|
-
'columns), a wrapping Group, or a CSS-module @container basalt-grid rule. useSizeClass() is for ' +
|
|
3735
|
-
'shell chrome only. Recipes: basalt-ui MIGRATING.md § basalt/raw-breakpoint.'
|
|
3736
|
-
|
|
3737
|
-
const RAW_BREAKPOINT_RESPONSIVE_PROP_MESSAGE =
|
|
3738
|
-
'Responsive-object prop keyed on theme breakpoints — those are viewport widths. ' +
|
|
3739
|
-
`${RAW_BREAKPOINT_RECIPE} (basalt/raw-breakpoint)`
|
|
3740
|
-
|
|
3741
|
-
/** rb r2 #5: a `(hover: none)` read was flagged with advice that only covered widths. */
|
|
3742
|
-
const RAW_BREAKPOINT_POINTER_HINT =
|
|
3743
|
-
'A hover/pointer capability read belongs in CSS: @media (pointer: coarse) in a module (the ' +
|
|
3744
|
-
'query --vx-hit keys on) — (hover: none) is not a sanctioned query. A JS read (mount one of two ' +
|
|
3745
|
-
'branches, a listener) is useCoarsePointer() from basalt-ui.'
|
|
3746
|
-
|
|
3747
|
-
const RAW_BREAKPOINT_BASE_ONLY_MESSAGE =
|
|
3748
|
-
'Responsive-object prop with only a base key — there is no breakpoint in it at all, so drop the ' +
|
|
3749
|
-
'object and write the value: cols={{ base: 3 }} → cols={3}. (basalt/raw-breakpoint)'
|
|
3750
|
-
|
|
3751
|
-
/**
|
|
3752
|
-
* Is every responsive object this value can evaluate to ({@link reachableObjects} — the same
|
|
3753
|
-
* unwrap detection uses) one carrying ONLY `base`? That is no breakpoint decision, and the viewport
|
|
3754
|
-
* recipe is the wrong advice for it — the fix is the bare value. Message-only: the shape still
|
|
3755
|
-
* reports, as it always has.
|
|
3756
|
-
*/
|
|
3757
|
-
function isBaseOnlyResponsiveObject(node, consts) {
|
|
3758
|
-
const responsive = reachableObjects(node, consts).filter((object) =>
|
|
3759
|
-
isResponsiveObjectValue(object),
|
|
3760
|
-
)
|
|
3761
|
-
return (
|
|
3762
|
-
responsive.length > 0 &&
|
|
3763
|
-
responsive.every((object) =>
|
|
3764
|
-
object.properties.every((prop) => propertyKeyName(prop) === 'base'),
|
|
3765
|
-
)
|
|
3766
|
-
)
|
|
3767
|
-
}
|
|
3768
|
-
|
|
3769
|
-
const RAW_BREAKPOINT_CONTAINER_KEY_MESSAGE =
|
|
3770
|
-
'Theme breakpoint name under type="container" — Mantine does not resolve it there: ' +
|
|
3771
|
-
"SimpleGrid uses each key verbatim as a (min-width: …) length, so 'sm' is a dead query, " +
|
|
3772
|
-
'and Grid only goes container with a breakpoints map (without one it silently falls back to ' +
|
|
3773
|
-
`viewport media queries). ${RAW_BREAKPOINT_RECIPE} (basalt/raw-breakpoint)`
|
|
3774
|
-
|
|
3775
|
-
const RAW_BREAKPOINT_VISIBLE_HIDDEN_MESSAGE =
|
|
3776
|
-
"visibleFrom/hiddenFrom outside a shell home or a control's own C9 swap — a viewport " +
|
|
3777
|
-
`breakpoint the framework cannot see or move. ${RAW_BREAKPOINT_RECIPE} (basalt/raw-breakpoint)`
|
|
3778
|
-
|
|
3779
|
-
const RAW_BREAKPOINT_HOOK_MESSAGE =
|
|
3780
|
-
"useMediaQuery/useMatches/useViewportSize — a raw viewport read outside the framework's " +
|
|
3781
|
-
'one seam. Shell chrome reads useSizeClass(); a page swapping its own layout (a table for a card ' +
|
|
3782
|
-
`list, a column count) is a container decision. ${RAW_BREAKPOINT_POINTER_HINT} ` +
|
|
3783
|
-
`${RAW_BREAKPOINT_RECIPE} (basalt/raw-breakpoint)`
|
|
3784
|
-
|
|
3785
|
-
const RAW_BREAKPOINT_GLOBAL_MESSAGE =
|
|
3786
|
-
'window.matchMedia/window.innerWidth read directly — the viewport read useSizeClass() owns ' +
|
|
3787
|
-
`for shell chrome. ${RAW_BREAKPOINT_POINTER_HINT} ${RAW_BREAKPOINT_RECIPE} (basalt/raw-breakpoint)`
|
|
3788
|
-
|
|
3789
|
-
/** The three viewport hooks the law names, whatever module they are imported from. */
|
|
3790
|
-
const RAW_BREAKPOINT_HOOK_NAMES = new Set(['useMediaQuery', 'useMatches', 'useViewportSize'])
|
|
3791
|
-
|
|
3792
|
-
/**
|
|
3793
|
-
* Four independent shapes, one law: a consumer (or basalt itself, outside the shell homes)
|
|
3794
|
-
* reaching past the framework's two sanctioned seams — `useSizeClass()` for shell-only viewport
|
|
3795
|
-
* chrome, a container query for everything else — to read or react to a raw
|
|
3796
|
-
* viewport breakpoint. `visibleFrom`/`hiddenFrom` and the responsive-object shape are reported once
|
|
3797
|
-
* the whole file has been walked ({@link SHELL_HOME_NAMES} may be declared after its first JSX use,
|
|
3798
|
-
* the same ordering hazard `hand-rolled-shell` defers a `Program:exit` report to avoid); the import
|
|
3799
|
-
* and the two global reads carry no such ordering hazard and report immediately. A file that
|
|
3800
|
-
* declares a shell home (or a control's own C9 swap) is exempt for all four shapes uniformly — the
|
|
3801
|
-
* shell's own responsive chrome is the sanctioned use, whatever shape it takes.
|
|
3802
|
-
*/
|
|
3803
|
-
// Ships: error
|
|
3804
|
-
const rawBreakpoint = {
|
|
3805
|
-
meta: {
|
|
3806
|
-
type: 'suggestion',
|
|
3807
|
-
docs: {
|
|
3808
|
-
description:
|
|
3809
|
-
'Disallow a hand-rolled viewport breakpoint — a responsive-object Mantine prop, ' +
|
|
3810
|
-
'visibleFrom/hiddenFrom outside a shell home, useMediaQuery/useMatches/useViewportSize, or ' +
|
|
3811
|
-
'a raw window.matchMedia/innerWidth read. All four shapes are exempt inside a file that ' +
|
|
3812
|
-
'declares a shell-home component (or a control implementing its own C9 swap); a ' +
|
|
3813
|
-
'responsive object on a Mantine type="container" grid is exempt where Mantine resolves it.',
|
|
3814
|
-
},
|
|
3815
|
-
schema: [],
|
|
3816
|
-
},
|
|
3817
|
-
create(context) {
|
|
3818
|
-
if (isTestFile(context)) return {}
|
|
3819
|
-
if (RAW_BREAKPOINT_EXEMPT_FILE.test(getFilename(context))) return {}
|
|
3820
|
-
|
|
3821
|
-
const mantineImports = new Map()
|
|
3822
|
-
// A control implementing its OWN C9 responsive swap (`ViewTabs`, `ActionGroup`'s file, …) is
|
|
3823
|
-
// the other legitimate visibleFrom/hiddenFrom home, alongside the three named shell pieces —
|
|
3824
|
-
// reuse `responsive-twin`'s existing owner probe rather than hand-listing every control file
|
|
3825
|
-
// here too (`view-tabs.tsx`/`actions.tsx` were both false positives before this reuse).
|
|
3826
|
-
const controlOwner = createControlOwnerProbe()
|
|
3827
|
-
let definesShellHome = false
|
|
3828
|
-
const visibleHiddenCandidates = []
|
|
3829
|
-
const responsiveObjectCandidates = []
|
|
3830
|
-
// Same-file `const NAME = { base, sm }` bindings (or a conditional/logical/alias init, see
|
|
3831
|
-
// RESOLVABLE_INIT_TYPES), resolved when a JSX attribute or a nested property passes the
|
|
3832
|
-
// Identifier — no scope manager here, so this is a flat name→init map.
|
|
3833
|
-
// A name declared more than once in the file is ambiguous (its two bindings cannot be told
|
|
3834
|
-
// apart), so it is dropped from the map entirely rather than guessed at last-wins.
|
|
3835
|
-
const responsiveObjectConsts = new Map()
|
|
3836
|
-
const seenDeclaratorNames = new Set()
|
|
3837
|
-
const sourceCode = context.sourceCode ?? context.getSourceCode?.()
|
|
3838
|
-
|
|
3839
|
-
const noteShellHomeOwner = (name) => {
|
|
3840
|
-
if (typeof name === 'string' && SHELL_HOME_NAMES.has(name)) definesShellHome = true
|
|
3841
|
-
}
|
|
3842
|
-
|
|
3843
|
-
return {
|
|
3844
|
-
ImportDeclaration(node) {
|
|
3845
|
-
controlOwner.noteImport(node)
|
|
3846
|
-
collectMantineImports(node, mantineImports)
|
|
3847
|
-
if (node.importKind === 'type') return
|
|
3848
|
-
// `useMatches` collides with `@tanstack/react-router`'s own hook of the same name (basalt's
|
|
3849
|
-
// own `src/router-tanstack/index.ts` imports it) — scope the whole set to a `@mantine/*`
|
|
3850
|
-
// source rather than name alone, the same provenance gate every other Mantine-name rule in
|
|
3851
|
-
// this file already uses (`collectMantineImports`).
|
|
3852
|
-
const source = node.source?.value
|
|
3853
|
-
if (typeof source !== 'string' || !source.startsWith('@mantine/')) return
|
|
3854
|
-
for (const specifier of node.specifiers ?? []) {
|
|
3855
|
-
if (specifier.type !== 'ImportSpecifier') continue
|
|
3856
|
-
if (specifier.importKind === 'type') continue
|
|
3857
|
-
const imported = specifier.imported
|
|
3858
|
-
const importedName = imported.type === 'Identifier' ? imported.name : imported.value
|
|
3859
|
-
if (typeof importedName !== 'string' || !RAW_BREAKPOINT_HOOK_NAMES.has(importedName))
|
|
3860
|
-
continue
|
|
3861
|
-
if (hasThemeAllow(context, specifier, 'raw-breakpoint')) continue
|
|
3862
|
-
context.report({ node: specifier, message: RAW_BREAKPOINT_HOOK_MESSAGE })
|
|
3863
|
-
}
|
|
3864
|
-
},
|
|
3865
|
-
FunctionDeclaration(node) {
|
|
3866
|
-
noteShellHomeOwner(node.id?.name)
|
|
3867
|
-
controlOwner.visitors.FunctionDeclaration(node)
|
|
3868
|
-
},
|
|
3869
|
-
VariableDeclarator(node) {
|
|
3870
|
-
noteShellHomeOwner(node.id?.name)
|
|
3871
|
-
controlOwner.visitors.VariableDeclarator(node)
|
|
3872
|
-
if (node.id?.type !== 'Identifier') return
|
|
3873
|
-
const name = node.id.name
|
|
3874
|
-
if (seenDeclaratorNames.has(name)) {
|
|
3875
|
-
// A redeclared name — drop whatever the first declaration put here, so the ambiguous
|
|
3876
|
-
// binding is never used to flag (or clear) a JSX value it may not even be.
|
|
3877
|
-
responsiveObjectConsts.delete(name)
|
|
3878
|
-
return
|
|
3879
|
-
}
|
|
3880
|
-
seenDeclaratorNames.add(name)
|
|
3881
|
-
if (RESOLVABLE_INIT_TYPES.has(node.init?.type)) responsiveObjectConsts.set(name, node.init)
|
|
3882
|
-
},
|
|
3883
|
-
JSXAttribute(node) {
|
|
3884
|
-
const name = node.name?.name
|
|
3885
|
-
if (typeof name !== 'string') return
|
|
3886
|
-
if (name === 'visibleFrom' || name === 'hiddenFrom') {
|
|
3887
|
-
visibleHiddenCandidates.push(node)
|
|
3888
|
-
return
|
|
3889
|
-
}
|
|
3890
|
-
// Resolved at `Program:exit` so a `const` declared after its first JSX use still resolves.
|
|
3891
|
-
responsiveObjectCandidates.push(node)
|
|
3892
|
-
},
|
|
3893
|
-
CallExpression(node) {
|
|
3894
|
-
if (node.callee?.type !== 'Identifier' || node.callee.name !== 'matchMedia') return
|
|
3895
|
-
if (hasThemeAllow(context, node, 'raw-breakpoint')) return
|
|
3896
|
-
context.report({ node, message: RAW_BREAKPOINT_GLOBAL_MESSAGE })
|
|
3897
|
-
},
|
|
3898
|
-
MemberExpression(node) {
|
|
3899
|
-
if (node.object?.type !== 'Identifier' || node.object.name !== 'window') return
|
|
3900
|
-
if (node.computed) return
|
|
3901
|
-
const property = node.property?.name
|
|
3902
|
-
if (property !== 'matchMedia' && property !== 'innerWidth') return
|
|
3903
|
-
if (hasThemeAllow(context, node, 'raw-breakpoint')) return
|
|
3904
|
-
context.report({ node, message: RAW_BREAKPOINT_GLOBAL_MESSAGE })
|
|
3905
|
-
},
|
|
3906
|
-
'Program:exit'() {
|
|
3907
|
-
// A shell home (or a control implementing its own C9 swap) IS the framework piece — the
|
|
3908
|
-
// shell's own responsive chrome is the sanctioned use, so nothing here reports there.
|
|
3909
|
-
if (definesShellHome || controlOwner.isOwner()) return
|
|
3910
|
-
for (const node of responsiveObjectCandidates) {
|
|
3911
|
-
const value = unwrapExpressionContainer(node.value)
|
|
3912
|
-
const owner = node.parent
|
|
3913
|
-
if (owner === null || owner === undefined || owner.type !== 'JSXOpeningElement') continue
|
|
3914
|
-
const tag = resolveMantineTag(owner.name, mantineImports)
|
|
3915
|
-
if (tag === undefined) continue
|
|
3916
|
-
// The container law reaches only the props Mantine routes through the grid's container
|
|
3917
|
-
// queries; a `p={{ base, lg }}` on the same element is still a viewport @media.
|
|
3918
|
-
const routed = Object.hasOwn(CONTAINER_ROUTED_PROPS, tag)
|
|
3919
|
-
? CONTAINER_ROUTED_PROPS[tag]
|
|
3920
|
-
: undefined
|
|
3921
|
-
const mode = routed?.has(node.name.name)
|
|
3922
|
-
? containerGridMode(owner, mantineImports, responsiveObjectConsts, sourceCode)
|
|
3923
|
-
: undefined
|
|
3924
|
-
if (mode === 'container') continue
|
|
3925
|
-
if (!containsResponsiveObjectValue(value, responsiveObjectConsts, mode !== undefined))
|
|
3926
|
-
continue
|
|
3927
|
-
if (hasThemeAllow(context, node, 'raw-breakpoint')) continue
|
|
3928
|
-
let message = RAW_BREAKPOINT_RESPONSIVE_PROP_MESSAGE
|
|
3929
|
-
if (mode !== undefined) message = RAW_BREAKPOINT_CONTAINER_KEY_MESSAGE
|
|
3930
|
-
else if (isBaseOnlyResponsiveObject(value, responsiveObjectConsts))
|
|
3931
|
-
message = RAW_BREAKPOINT_BASE_ONLY_MESSAGE
|
|
3932
|
-
context.report({ node, message })
|
|
3933
|
-
}
|
|
3934
|
-
for (const node of visibleHiddenCandidates) {
|
|
3935
|
-
if (hasThemeAllow(context, node, 'raw-breakpoint')) continue
|
|
3936
|
-
context.report({ node, message: RAW_BREAKPOINT_VISIBLE_HIDDEN_MESSAGE })
|
|
3937
|
-
}
|
|
3938
|
-
},
|
|
3939
|
-
}
|
|
3940
|
-
},
|
|
3941
|
-
}
|
|
3942
|
-
|
|
3943
|
-
// ── Rule 34 — no-dev-helper ─────────────────────────────────────────────────────────────────────
|
|
3944
|
-
|
|
3945
|
-
const NO_DEV_HELPER_MESSAGE =
|
|
3946
|
-
'Dev-only import() outside a literal `process.env.NODE_ENV` gate — bundlers fold the dev branch ' +
|
|
3947
|
-
"away only for a literal `process.env.NODE_ENV !== 'production'` (or `=== 'development'`) read " +
|
|
3948
|
-
'at the use site; `isDev()` or any helper/const leaks the whole dev module into the production ' +
|
|
3949
|
-
'first-paint chunk (the check-budgets provider-only budget pins it). (basalt/no-dev-helper)'
|
|
3950
|
-
|
|
3951
|
-
/** Specifiers of dev-only modules: the dev dock, the theme lab, any `*-devtools` package. */
|
|
3952
|
-
const DEV_MODULE_SPECIFIER = /(?:^|[/.-])(?:dev-dock|theme-lab|devtools)(?:$|[/.-])/
|
|
3953
|
-
/** TS wrappers that still READ the value they wrap (`Dock as X`, `Dock!`, `Dock satisfies X`). */
|
|
3954
|
-
const TS_VALUE_WRAPPERS = new Set([
|
|
3955
|
-
'TSAsExpression',
|
|
3956
|
-
'TSNonNullExpression',
|
|
3957
|
-
'TSSatisfiesExpression',
|
|
3958
|
-
'TSInstantiationExpression',
|
|
3959
|
-
'TSTypeAssertion',
|
|
3960
|
-
])
|
|
3961
|
-
|
|
3962
|
-
/** The dev modules themselves — reachable only through a gated import, so their own imports are exempt. */
|
|
3963
|
-
const DEV_MODULE_FILE = /(?:^|[\\/])(?:dev-dock\.[cm]?[jt]sx?|theme-lab[\\/])/
|
|
3964
|
-
|
|
3965
|
-
/** `process.env.NODE_ENV` / `process.env['NODE_ENV']` as a literal read. */
|
|
3966
|
-
function isNodeEnvRead(node) {
|
|
3967
|
-
if (node?.type !== 'MemberExpression') return false
|
|
3968
|
-
const property = node.property
|
|
3969
|
-
const named = node.computed
|
|
3970
|
-
? isStringLiteral(property) && property.value === 'NODE_ENV'
|
|
3971
|
-
: property?.name === 'NODE_ENV'
|
|
3972
|
-
const env = node.object
|
|
3973
|
-
return (
|
|
3974
|
-
named &&
|
|
3975
|
-
env?.type === 'MemberExpression' &&
|
|
3976
|
-
!env.computed &&
|
|
3977
|
-
env.property?.name === 'env' &&
|
|
3978
|
-
env.object?.type === 'Identifier' &&
|
|
3979
|
-
env.object.name === 'process'
|
|
3980
|
-
)
|
|
3981
|
-
}
|
|
3982
|
-
|
|
3983
|
-
const flip = (env) => (env === 'dev' ? 'prod' : env === 'prod' ? 'dev' : undefined)
|
|
3984
|
-
|
|
3985
|
-
/** The environment `test` pins when it is TRUTHY: 'dev', 'prod' or undefined. */
|
|
3986
|
-
function truthyEnv(test) {
|
|
3987
|
-
if (test?.type === 'BinaryExpression') return comparisonEnv(test)
|
|
3988
|
-
if (test?.type === 'UnaryExpression' && test.operator === '!') return falsyEnv(test.argument)
|
|
3989
|
-
if (test?.type === 'LogicalExpression' && test.operator === '&&') {
|
|
3990
|
-
return truthyEnv(test.left) ?? truthyEnv(test.right)
|
|
3991
|
-
}
|
|
3992
|
-
return undefined
|
|
3993
|
-
}
|
|
3994
|
-
|
|
3995
|
-
/** The environment `test` pins when it is FALSY — `a && env` pins nothing, `a || env` pins both. */
|
|
3996
|
-
function falsyEnv(test) {
|
|
3997
|
-
if (test?.type === 'BinaryExpression') return flip(comparisonEnv(test))
|
|
3998
|
-
if (test?.type === 'UnaryExpression' && test.operator === '!') return truthyEnv(test.argument)
|
|
3999
|
-
if (test?.type === 'LogicalExpression' && test.operator === '||') {
|
|
4000
|
-
return falsyEnv(test.left) ?? falsyEnv(test.right)
|
|
4001
|
-
}
|
|
4002
|
-
return undefined
|
|
4003
|
-
}
|
|
4004
|
-
|
|
4005
|
-
/** 'dev' when the literal NODE_ENV comparison is true in development, 'prod' when in production. */
|
|
4006
|
-
function comparisonEnv(test) {
|
|
4007
|
-
const [read, literal] = isNodeEnvRead(test.left)
|
|
4008
|
-
? [test.left, test.right]
|
|
4009
|
-
: [test.right, test.left]
|
|
4010
|
-
if (!isNodeEnvRead(read) || !isStringLiteral(literal)) return undefined
|
|
4011
|
-
const equal = test.operator === '===' || test.operator === '=='
|
|
4012
|
-
const unequal = test.operator === '!==' || test.operator === '!='
|
|
4013
|
-
if (!equal && !unequal) return undefined
|
|
4014
|
-
if (literal.value === 'production') return equal ? 'prod' : 'dev'
|
|
4015
|
-
if (literal.value === 'development') return equal ? 'dev' : 'prod'
|
|
4016
|
-
return undefined
|
|
4017
|
-
}
|
|
4018
|
-
|
|
4019
|
-
/** True when `node` sits in a branch that only runs in development, by a literal NODE_ENV test. */
|
|
4020
|
-
function underDevGate(node) {
|
|
4021
|
-
let child = node
|
|
4022
|
-
for (let parent = node.parent; parent; child = parent, parent = parent.parent) {
|
|
4023
|
-
if (parent.type === 'IfStatement' || parent.type === 'ConditionalExpression') {
|
|
4024
|
-
if (parent.consequent === child && truthyEnv(parent.test) === 'dev') return true
|
|
4025
|
-
if (parent.alternate === child && falsyEnv(parent.test) === 'dev') return true
|
|
4026
|
-
}
|
|
4027
|
-
if (parent.type === 'LogicalExpression' && parent.right === child) {
|
|
4028
|
-
if (parent.operator === '&&' && truthyEnv(parent.left) === 'dev') return true
|
|
4029
|
-
if (parent.operator === '||' && falsyEnv(parent.left) === 'dev') return true
|
|
4030
|
-
}
|
|
4031
|
-
}
|
|
4032
|
-
return false
|
|
4033
|
-
}
|
|
4034
|
-
|
|
4035
|
-
const FUNCTION_TYPES = new Set([
|
|
4036
|
-
'ArrowFunctionExpression',
|
|
4037
|
-
'FunctionExpression',
|
|
4038
|
-
'FunctionDeclaration',
|
|
4039
|
-
])
|
|
4040
|
-
|
|
4041
|
-
/**
|
|
4042
|
-
* The identifier a LOADER function is bound to: `const Dock = lazy(() => import(dev))`,
|
|
4043
|
-
* `const load = () => import(dev)`, `function load() { return import(dev) }`. An import with no
|
|
4044
|
-
* function boundary (`const m = import(dev)`) or one inside an anonymous callback is not bound to
|
|
4045
|
-
* anything, so only its own site can gate it.
|
|
4046
|
-
*/
|
|
4047
|
-
function loaderBinding(node) {
|
|
4048
|
-
let fn = node.parent
|
|
4049
|
-
while (fn && !FUNCTION_TYPES.has(fn.type)) fn = fn.parent
|
|
4050
|
-
if (!fn) return undefined
|
|
4051
|
-
if (fn.type === 'FunctionDeclaration') return fn.id ?? undefined
|
|
4052
|
-
let holder = fn.parent
|
|
4053
|
-
if (holder?.type === 'CallExpression') holder = holder.parent
|
|
4054
|
-
return holder?.type === 'VariableDeclarator' && holder.id?.type === 'Identifier'
|
|
4055
|
-
? holder.id
|
|
4056
|
-
: undefined
|
|
4057
|
-
}
|
|
4058
|
-
|
|
4059
|
-
/**
|
|
4060
|
-
* Is this identifier a USE of a loader binding? Stricter than {@link isValueReferencePosition}
|
|
4061
|
-
* (which only has to tell an import from a render): a loader's uses are judged for gating, so
|
|
4062
|
-
* property keys, class member names, JSX closers and declaration ids must not count, while TS
|
|
4063
|
-
* value wrappers (`Dock!`, `Dock as X`) still do.
|
|
4064
|
-
*/
|
|
4065
|
-
function isLoaderUsePosition(node) {
|
|
4066
|
-
const parent = node.parent
|
|
4067
|
-
if (parent === null || parent === undefined) return false
|
|
4068
|
-
switch (parent.type) {
|
|
4069
|
-
case 'MemberExpression':
|
|
4070
|
-
return parent.object === node || parent.computed
|
|
4071
|
-
case 'Property':
|
|
4072
|
-
case 'MethodDefinition':
|
|
4073
|
-
case 'PropertyDefinition':
|
|
4074
|
-
case 'AccessorProperty':
|
|
4075
|
-
return parent.value === node || (parent.computed && parent.key === node)
|
|
4076
|
-
case 'VariableDeclarator':
|
|
4077
|
-
return parent.init === node
|
|
4078
|
-
case 'FunctionDeclaration':
|
|
4079
|
-
case 'ImportSpecifier':
|
|
4080
|
-
case 'ImportDefaultSpecifier':
|
|
4081
|
-
case 'ImportNamespaceSpecifier':
|
|
4082
|
-
case 'JSXAttribute':
|
|
4083
|
-
case 'JSXClosingElement':
|
|
4084
|
-
case 'JSXNamespacedName':
|
|
4085
|
-
case 'LabeledStatement':
|
|
4086
|
-
return false
|
|
4087
|
-
case 'JSXMemberExpression':
|
|
4088
|
-
return parent.object === node
|
|
4089
|
-
default:
|
|
4090
|
-
return TS_VALUE_WRAPPERS.has(parent.type) || !parent.type.startsWith('TS')
|
|
4091
|
-
}
|
|
4092
|
-
}
|
|
4093
|
-
|
|
4094
|
-
// Ships: repo-local only
|
|
4095
|
-
const noDevHelper = {
|
|
4096
|
-
meta: {
|
|
4097
|
-
type: 'problem',
|
|
4098
|
-
docs: {
|
|
4099
|
-
description:
|
|
4100
|
-
'Require a literal process.env.NODE_ENV gate on dynamic import() of dev-only modules.',
|
|
4101
|
-
},
|
|
4102
|
-
schema: [],
|
|
4103
|
-
},
|
|
4104
|
-
create(context) {
|
|
4105
|
-
if (isTestFile(context) || DEV_MODULE_FILE.test(getFilename(context))) return {}
|
|
4106
|
-
const sourceCode = context.sourceCode ?? context.getSourceCode?.()
|
|
4107
|
-
/** Loader bindings whose own references must all sit under the gate. */
|
|
4108
|
-
const loaders = []
|
|
4109
|
-
/** Every reference candidate, by name — judged against its binding at `Program:exit`. */
|
|
4110
|
-
const references = new Map()
|
|
4111
|
-
const addReference = (node) => {
|
|
4112
|
-
if (!isLoaderUsePosition(node)) return
|
|
4113
|
-
const same = references.get(node.name)
|
|
4114
|
-
if (same === undefined) references.set(node.name, [node])
|
|
4115
|
-
else same.push(node)
|
|
4116
|
-
}
|
|
4117
|
-
/** True when `reference` provably resolves to the declaration `id`; unresolvable is NOT a use. */
|
|
4118
|
-
const resolvesTo = (reference, id) => soleDefinition(sourceCode, reference)?.name === id
|
|
4119
|
-
return {
|
|
4120
|
-
Identifier: addReference,
|
|
4121
|
-
JSXIdentifier: addReference,
|
|
4122
|
-
ImportExpression(node) {
|
|
4123
|
-
const source = node.source
|
|
4124
|
-
let specifier
|
|
4125
|
-
if (isStringLiteral(source)) specifier = source.value
|
|
4126
|
-
else if (source?.quasis?.length === 1) specifier = source.quasis[0].value.cooked
|
|
4127
|
-
if (typeof specifier !== 'string' || !DEV_MODULE_SPECIFIER.test(specifier)) return
|
|
4128
|
-
if (underDevGate(node)) return
|
|
4129
|
-
const id = loaderBinding(node)
|
|
4130
|
-
if (id !== undefined) {
|
|
4131
|
-
loaders.push({ node, id })
|
|
4132
|
-
return
|
|
4133
|
-
}
|
|
4134
|
-
if (!hasThemeAllow(context, node, 'no-dev-helper')) {
|
|
4135
|
-
context.report({ node, message: NO_DEV_HELPER_MESSAGE })
|
|
4136
|
-
}
|
|
4137
|
-
},
|
|
4138
|
-
'Program:exit'() {
|
|
4139
|
-
for (const { node, id } of loaders) {
|
|
4140
|
-
const uses = (references.get(id.name) ?? []).filter((use) => resolvesTo(use, id))
|
|
4141
|
-
if (uses.length > 0 && uses.every(underDevGate)) continue
|
|
4142
|
-
if (hasThemeAllow(context, node, 'no-dev-helper')) continue
|
|
4143
|
-
context.report({ node, message: NO_DEV_HELPER_MESSAGE })
|
|
4144
|
-
}
|
|
4145
|
-
},
|
|
4146
|
-
}
|
|
4147
|
-
},
|
|
4148
|
-
}
|
|
4149
|
-
|
|
4150
|
-
// ── Rule 35 — route-view-transition ─────────────────────────────────────────────────────────────
|
|
4151
|
-
|
|
4152
|
-
const ROUTE_VIEW_TRANSITION_MESSAGE =
|
|
4153
|
-
'A React <ViewTransition> around <Outlet> never fires — the router commits through ' +
|
|
4154
|
-
"useSyncExternalStore, which is not a transition — and it competes with the router's own. Route " +
|
|
4155
|
-
"transitions are the router's: createBasaltRouter sets defaultViewTransition. Remove the wrapper. " +
|
|
4156
|
-
'(basalt/route-view-transition)'
|
|
4157
|
-
|
|
4158
|
-
/**
|
|
4159
|
-
* True when the JSX name `nameNode` is `imported` from `source`: a named import (aliased or not),
|
|
4160
|
-
* or `ns.imported` / `Default.imported` off a namespace or default import. Type-only imports never
|
|
4161
|
-
* count. Unresolved or shadowed names do not match.
|
|
4162
|
-
*/
|
|
4163
|
-
function isImportedJsxName(sourceCode, nameNode, source, imported) {
|
|
4164
|
-
const fromSource = (def) =>
|
|
4165
|
-
def?.type === 'ImportBinding' &&
|
|
4166
|
-
def.parent?.importKind !== 'type' &&
|
|
4167
|
-
def.parent?.source?.value === source
|
|
4168
|
-
if (nameNode?.type === 'JSXIdentifier') {
|
|
4169
|
-
const def = soleDefinition(sourceCode, nameNode)
|
|
4170
|
-
if (!fromSource(def) || def.node.type !== 'ImportSpecifier' || def.node.importKind === 'type')
|
|
4171
|
-
return false
|
|
4172
|
-
const name = def.node.imported
|
|
4173
|
-
return (name?.type === 'Identifier' ? name.name : name?.value) === imported
|
|
4174
|
-
}
|
|
4175
|
-
if (nameNode?.type === 'JSXMemberExpression' && nameNode.object?.type === 'JSXIdentifier') {
|
|
4176
|
-
if (nameNode.property?.name !== imported) return false
|
|
4177
|
-
const def = soleDefinition(sourceCode, nameNode.object)
|
|
4178
|
-
return (
|
|
4179
|
-
fromSource(def) &&
|
|
4180
|
-
(def.node.type === 'ImportNamespaceSpecifier' || def.node.type === 'ImportDefaultSpecifier')
|
|
4181
|
-
)
|
|
4182
|
-
}
|
|
4183
|
-
return false
|
|
4184
|
-
}
|
|
4185
|
-
|
|
4186
|
-
// Ships: error
|
|
4187
|
-
const routeViewTransition = {
|
|
4188
|
-
meta: {
|
|
4189
|
-
type: 'problem',
|
|
4190
|
-
docs: {
|
|
4191
|
-
description: "Disallow a React <ViewTransition> around the router's <Outlet>.",
|
|
4192
|
-
},
|
|
4193
|
-
schema: [],
|
|
4194
|
-
},
|
|
4195
|
-
create(context) {
|
|
4196
|
-
if (isTestFile(context)) return {}
|
|
4197
|
-
const sourceCode = context.sourceCode ?? context.getSourceCode?.()
|
|
4198
|
-
const reported = new Set()
|
|
4199
|
-
return {
|
|
4200
|
-
JSXOpeningElement(node) {
|
|
4201
|
-
if (!isImportedJsxName(sourceCode, node.name, '@tanstack/react-router', 'Outlet')) return
|
|
4202
|
-
// Walk up: every enclosing <ViewTransition> has this <Outlet> in its subtree.
|
|
4203
|
-
for (let up = node.parent?.parent; up; up = up.parent) {
|
|
4204
|
-
if (up.type !== 'JSXElement' || reported.has(up)) continue
|
|
4205
|
-
const opening = up.openingElement
|
|
4206
|
-
if (!isImportedJsxName(sourceCode, opening?.name, 'react', 'ViewTransition')) continue
|
|
4207
|
-
reported.add(up)
|
|
4208
|
-
if (hasThemeAllow(context, opening, 'route-view-transition')) continue
|
|
4209
|
-
context.report({ node: opening, message: ROUTE_VIEW_TRANSITION_MESSAGE })
|
|
4210
|
-
}
|
|
4211
|
-
},
|
|
4212
|
-
}
|
|
4213
|
-
},
|
|
4214
|
-
}
|
|
4215
|
-
|
|
4216
|
-
// ── Rule 36 — status-fill-as-text ───────────────────────────────────────────────────────────────
|
|
4217
|
-
|
|
4218
|
-
const STATUS_FILL_AS_TEXT_MESSAGE =
|
|
4219
|
-
'VX.status.excellent is a FILL (about 3:1 on a light card) and fails AA as text. Paint zone words and ' +
|
|
4220
|
-
'numerals with VX.status.good (solved to AA) and keep excellent on a swatch, band or heatmap ' +
|
|
4221
|
-
'cell (bg / fill / backgroundColor). (basalt/status-fill-as-text)'
|
|
4222
|
-
|
|
4223
|
-
const EXCELLENT_CSS_VAR = /var\(\s*--vx-status-excellent\b/
|
|
4224
|
-
|
|
4225
|
-
/** Strips parentheses-equivalent wrappers: TS `as` / `satisfies` / `!` and the JSX expression container. */
|
|
4226
|
-
function unwrapExpression(node) {
|
|
4227
|
-
let current = unwrapExpressionContainer(node)
|
|
4228
|
-
while (
|
|
4229
|
-
current &&
|
|
4230
|
-
(current.type === 'TSAsExpression' ||
|
|
4231
|
-
current.type === 'TSSatisfiesExpression' ||
|
|
4232
|
-
current.type === 'TSNonNullExpression' ||
|
|
4233
|
-
current.type === 'ParenthesizedExpression')
|
|
4234
|
-
) {
|
|
4235
|
-
current = current.expression
|
|
4236
|
-
}
|
|
4237
|
-
return current
|
|
4238
|
-
}
|
|
4239
|
-
|
|
4240
|
-
/** True when `node` is `VX.status.excellent` or the string `var(--vx-status-excellent)`. */
|
|
4241
|
-
function isExcellentToken(node) {
|
|
4242
|
-
if (node?.type === 'MemberExpression' && !node.computed) {
|
|
4243
|
-
const status = node.object
|
|
4244
|
-
return (
|
|
4245
|
-
node.property?.name === 'excellent' &&
|
|
4246
|
-
status?.type === 'MemberExpression' &&
|
|
4247
|
-
!status.computed &&
|
|
4248
|
-
status.property?.name === 'status' &&
|
|
4249
|
-
status.object?.type === 'Identifier' &&
|
|
4250
|
-
status.object.name === 'VX'
|
|
4251
|
-
)
|
|
4252
|
-
}
|
|
4253
|
-
if (isStringLiteral(node)) return EXCELLENT_CSS_VAR.test(node.value)
|
|
4254
|
-
if (node?.type === 'TemplateLiteral') {
|
|
4255
|
-
return node.quasis.some((quasi) => EXCELLENT_CSS_VAR.test(quasi.value.cooked ?? ''))
|
|
4256
|
-
}
|
|
4257
|
-
return false
|
|
4258
|
-
}
|
|
4259
|
-
|
|
4260
|
-
/** True when any value `node` can evaluate to (through ternaries and `??` / `||` / `&&`) is the token. */
|
|
4261
|
-
function mayBeExcellentToken(node) {
|
|
4262
|
-
const value = unwrapExpression(node)
|
|
4263
|
-
if (value?.type === 'ConditionalExpression') {
|
|
4264
|
-
return mayBeExcellentToken(value.consequent) || mayBeExcellentToken(value.alternate)
|
|
4265
|
-
}
|
|
4266
|
-
if (value?.type === 'LogicalExpression') {
|
|
4267
|
-
return mayBeExcellentToken(value.left) || mayBeExcellentToken(value.right)
|
|
4268
|
-
}
|
|
4269
|
-
return isExcellentToken(value)
|
|
4270
|
-
}
|
|
4271
|
-
|
|
4272
|
-
/** True when an object literal is, or sits inside, the value of a `style` / `styles` JSX prop. */
|
|
4273
|
-
function insideStyleProp(objectNode) {
|
|
4274
|
-
for (let up = objectNode.parent; up; up = up.parent) {
|
|
4275
|
-
if (up.type === 'JSXAttribute') {
|
|
4276
|
-
return (
|
|
4277
|
-
up.name?.type === 'JSXIdentifier' && (up.name.name === 'style' || up.name.name === 'styles')
|
|
4278
|
-
)
|
|
4279
|
-
}
|
|
4280
|
-
if (up.type === 'JSXElement' || up.type === 'Program') return false
|
|
4281
|
-
}
|
|
4282
|
-
return false
|
|
4283
|
-
}
|
|
4284
|
-
|
|
4285
|
-
// A static check: it sees the token written at the text position, not a map read later
|
|
4286
|
-
// (`c={ZONE_COLORS[grade]}`). `color=` is deliberately not judged — on a Mantine Badge/Button/
|
|
4287
|
-
// ThemeIcon or a chart mark it is a fill — so a `<Text color=…>` / `<Title color=…>` is a known
|
|
4288
|
-
// false negative. Only `c=` and a `color:` key under a `style`/`styles` prop are text: the key is
|
|
4289
|
-
// the CSS `color` property, so it paints text on whichever part it sits (`styles={{ section: … }}`
|
|
4290
|
-
// included).
|
|
4291
|
-
// Ships: error
|
|
4292
|
-
const statusFillAsText = {
|
|
4293
|
-
meta: {
|
|
4294
|
-
type: 'problem',
|
|
4295
|
-
docs: {
|
|
4296
|
-
description: 'Disallow the fill-only VX.status.excellent in a text-colour position.',
|
|
4297
|
-
},
|
|
4298
|
-
schema: [],
|
|
4299
|
-
},
|
|
4300
|
-
create(context) {
|
|
4301
|
-
if (isTestFile(context)) return {}
|
|
4302
|
-
const report = (node) => {
|
|
4303
|
-
if (hasThemeAllow(context, node, 'status-fill-as-text')) return
|
|
4304
|
-
context.report({ node, message: STATUS_FILL_AS_TEXT_MESSAGE })
|
|
4305
|
-
}
|
|
4306
|
-
return {
|
|
4307
|
-
JSXAttribute(node) {
|
|
4308
|
-
if (node.name?.type !== 'JSXIdentifier' || node.name.name !== 'c') return
|
|
4309
|
-
if (node.value && mayBeExcellentToken(node.value)) report(node)
|
|
4310
|
-
},
|
|
4311
|
-
Property(node) {
|
|
4312
|
-
if (propertyKeyName(node) !== 'color' || !mayBeExcellentToken(node.value)) return
|
|
4313
|
-
if (node.parent?.type === 'ObjectExpression' && insideStyleProp(node.parent)) report(node)
|
|
4314
|
-
},
|
|
4315
|
-
}
|
|
4316
|
-
},
|
|
4317
|
-
}
|
|
4318
|
-
|
|
4319
|
-
// ── Grace ledger ────────────────────────────────────────────────────────────────────────────────
|
|
4320
|
-
|
|
4321
|
-
/**
|
|
4322
|
-
* @typedef {{ since: string; promote: string; why: string }} GraceEntry
|
|
4323
|
-
*/
|
|
4324
|
-
|
|
4325
|
-
/**
|
|
4326
|
-
* Plugin rules still inside their grace minor — `warn` in the shipped consumer preset, `error`
|
|
4327
|
-
* repo-locally. Empty since 2.26.0: `card-inset` (since 2.16.0), the last tenant, promoted. This is the plugin's counterpart to `src/guard`'s `GRACE_PERIOD_KINDS`, and it
|
|
4328
|
-
* exists because its ABSENCE is what let three rules sit at `warn` for up to twelve minors with
|
|
4329
|
-
* nothing tracking them: `configs/oxlint.json` is generated and its top-level keys are fixed by
|
|
4330
|
-
* oxlint's own parser, so the ledger cannot live there.
|
|
4331
|
-
*
|
|
4332
|
-
* `oxlint-plugin.test.ts` asserts the two agree in both directions — a rule listed here must be
|
|
4333
|
-
* `warn` in the shipped preset, and one absent must be `error`. Deleting a `PLUGIN_RULE_GRACE` entry IS the promotion, and the test makes the config
|
|
4334
|
-
* change mandatory in the same commit.
|
|
4335
|
-
*
|
|
4336
|
-
* Each entry is `{ since, promote, why }` (semver strings, C16 — `docs/CONTROLS-SPEC.md` §1): a
|
|
4337
|
-
* version-gated test fails the build once `package.json`'s version reaches `promote` while the
|
|
4338
|
-
* entry is still here — the four entries that used to live here (D4) sat at `warn` for up to five
|
|
4339
|
-
* minors because a bare promotion-note string carried no expiry a test could check. The test gate
|
|
4340
|
-
* fires on the version already published; `scripts/check-grace.ts` is the other end of it, run by
|
|
4341
|
-
* `scripts/release.sh` against the version the dry run COMPUTED, so a release that would ship a
|
|
4342
|
-
* due entry still at `warn` is refused before it is cut (the release commit is `[skip ci]` and
|
|
4343
|
-
* runs no tests, so the test alone would only notice on the next unrelated push).
|
|
4344
|
-
*
|
|
4345
|
-
* @type {Record<string, GraceEntry>}
|
|
4346
|
-
*/
|
|
4347
|
-
export const PLUGIN_RULE_GRACE = {}
|
|
4348
|
-
|
|
4349
|
-
// ── Plugin export ───────────────────────────────────────────────────────────────────────────────
|
|
4350
|
-
|
|
4351
|
-
export default {
|
|
4352
|
-
meta: { name: 'basalt' },
|
|
4353
|
-
rules: {
|
|
4354
|
-
'no-raw-font-size': noRawFontSize,
|
|
4355
|
-
'raw-size-literal': rawSizeLiteral,
|
|
4356
|
-
'card-inset': cardInset,
|
|
4357
|
-
'chart-in-raw-surface': chartInRawSurface,
|
|
4358
|
-
'shadow-basalt-export': shadowBasaltExport,
|
|
4359
|
-
'hand-rolled-shell': handRolledShell,
|
|
4360
|
-
'raw-scroll-container': rawScrollContainer,
|
|
4361
|
-
'hand-rolled-filter': handRolledFilter,
|
|
4362
|
-
'control-outside-home': controlOutsideHome,
|
|
4363
|
-
'bound-control-outside-home': boundControlOutsideHome,
|
|
4364
|
-
'control-size-literal': controlSizeLiteral,
|
|
4365
|
-
'in-body-page-title': inBodyPageTitle,
|
|
4366
|
-
'responsive-twin': responsiveTwin,
|
|
4367
|
-
'search-literal-link': searchLiteralLink,
|
|
4368
|
-
'use-search-from-literal': useSearchFromLiteral,
|
|
4369
|
-
'query-fn-unwrap': queryFnUnwrap,
|
|
4370
|
-
'forms-field-key': formsFieldKey,
|
|
4371
|
-
'chart-engine-boundary': chartEngineBoundary,
|
|
4372
|
-
'chart-host-single': chartHostSingle,
|
|
4373
|
-
'token-layer-boundary': tokenLayerBoundary,
|
|
4374
|
-
'agent-no-raw-usechat': agentNoRawUseChat,
|
|
4375
|
-
'ai-sdk-major': aiSdkMajor,
|
|
4376
|
-
'no-import-meta-env': noImportMetaEnv,
|
|
4377
|
-
'raw-breakpoint': rawBreakpoint,
|
|
4378
|
-
'no-dev-helper': noDevHelper,
|
|
4379
|
-
'route-view-transition': routeViewTransition,
|
|
4380
|
-
'status-fill-as-text': statusFillAsText,
|
|
4381
|
-
},
|
|
4382
|
-
}
|