basalt-ui 2.28.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 +502 -401
- package/MIGRATING.md +1634 -6379
- 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 -19
- 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 +205 -42
- 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 +47 -4
- package/dist/charts/ref-label.d.ts.map +1 -1
- package/dist/charts/ref-label.js +113 -21
- 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 +52 -16
- package/dist/cli/index.d.ts +24 -387
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +41 -815
- 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 +47 -4
- package/dist/cli/router-wiring.d.ts.map +1 -1
- package/dist/cli/router-wiring.js +46 -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 +65 -86
- package/dist/cli/shot/capture.d.ts.map +1 -1
- package/dist/cli/shot/capture.js +431 -413
- package/dist/cli/shot/detect.d.ts +1 -10
- package/dist/cli/shot/detect.d.ts.map +1 -1
- package/dist/cli/shot/detect.js +269 -243
- 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 +123 -211
- 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 -98
- 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 -28
- 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 +25 -28
- package/dist/common/props.d.ts.map +1 -1
- package/dist/common/props.js +13 -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 +26 -21
- 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 +35 -50
- 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 +1959 -943
- 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 +205 -42
- 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 +191 -39
- 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 -27
- 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 +177 -60
- package/src/cli/index.ts +63 -1420
- 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 +58 -7
- package/src/cli/shot/board.ts +59 -106
- package/src/cli/shot/capture.ts +572 -593
- package/src/cli/shot/detect.ts +347 -308
- package/src/cli/shot/facts.ts +266 -0
- package/src/cli/shot/index.ts +145 -251
- package/src/cli/shot/measure.ts +192 -134
- package/src/cli/shot/playwright.ts +37 -39
- package/src/cli/shot/serve.ts +115 -27
- package/src/cli/shot/types.ts +118 -33
- 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 +32 -28
- package/src/common/retry-button.module.css +26 -21
- 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 +52 -98
- 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 -56
- 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 -4381
- package/configs/oxlint-plugin.test.ts +0 -4480
- package/configs/oxlint.json +0 -62
- 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 -87
- package/dist/charts/ChartCard.d.ts.map +0 -1
- package/dist/charts/ChartCard.js +0 -216
- 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 -65
- package/dist/charts/Sparkline.d.ts.map +0 -1
- package/dist/charts/Sparkline.js +0 -604
- 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 -139
- package/dist/charts/chart-card.module.css.d.ts +0 -18
- package/dist/charts/compile.d.ts +0 -146
- package/dist/charts/compile.d.ts.map +0 -1
- package/dist/charts/compile.js +0 -896
- 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 -122
- package/dist/charts/sparkline.module.css.d.ts +0 -13
- 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 -75
- package/dist/cli/doctor-upgrade.d.ts.map +0 -1
- package/dist/cli/doctor-upgrade.js +0 -455
- package/dist/cli/doctor.d.ts +0 -38
- package/dist/cli/doctor.d.ts.map +0 -1
- package/dist/cli/doctor.js +0 -320
- 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 -6
- package/dist/cli/init.d.ts.map +0 -1
- package/dist/cli/init.js +0 -258
- 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 -235
- 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/index.d.ts +0 -17
- package/dist/common/index.d.ts.map +0 -1
- package/dist/common/index.js +0 -27
- 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 -114
- package/dist/dashboard/bar-list.module.css +0 -240
- 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 -228
- package/dist/dashboard/board.module.css +0 -160
- package/dist/dashboard/board.module.css.d.ts +0 -26
- 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 -80
- package/dist/dashboard/event-list-model.d.ts +0 -51
- package/dist/dashboard/event-list-model.d.ts.map +0 -1
- package/dist/dashboard/event-list-model.js +0 -72
- 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 -93
- package/dist/dashboard/event-list-scroll.d.ts +0 -27
- package/dist/dashboard/event-list-scroll.d.ts.map +0 -1
- package/dist/dashboard/event-list-scroll.js +0 -103
- 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 -36
- 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 -178
- package/dist/dashboard/event-list.module.css +0 -283
- package/dist/dashboard/event-list.module.css.d.ts +0 -33
- 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 -297
- package/dist/dashboard/meter-model.d.ts.map +0 -1
- package/dist/dashboard/meter-model.js +0 -479
- package/dist/dashboard/meter-parts.d.ts +0 -58
- package/dist/dashboard/meter-parts.d.ts.map +0 -1
- package/dist/dashboard/meter-parts.js +0 -656
- package/dist/dashboard/meter.d.ts +0 -144
- package/dist/dashboard/meter.d.ts.map +0 -1
- package/dist/dashboard/meter.js +0 -81
- package/dist/dashboard/meter.module.css +0 -463
- package/dist/dashboard/meter.module.css.d.ts +0 -48
- 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 -28
- package/dist/dashboard/page-summary.module.css +0 -89
- package/dist/dashboard/page-summary.module.css.d.ts +0 -15
- package/dist/dashboard/query-state.d.ts +0 -147
- package/dist/dashboard/query-state.d.ts.map +0 -1
- package/dist/dashboard/query-state.js +0 -199
- 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 -87
- package/dist/dashboard/section.d.ts.map +0 -1
- package/dist/dashboard/section.js +0 -135
- 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 -109
- package/dist/dashboard/settings-section.module.css +0 -48
- package/dist/dashboard/settings-section.module.css.d.ts +0 -11
- 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 -265
- package/dist/dashboard/stat-card.module.css +0 -497
- 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 -40
- 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 -92
- package/dist/dashboard/stat-strip.d.ts.map +0 -1
- package/dist/dashboard/stat-strip.js +0 -263
- package/dist/dashboard/stat-strip.module.css +0 -396
- package/dist/dashboard/stat-strip.module.css.d.ts +0 -41
- package/dist/dashboard/visual-slot.d.ts +0 -12
- package/dist/dashboard/visual-slot.d.ts.map +0 -1
- package/dist/dashboard/visual-slot.js +0 -9
- 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 -217
- package/dist/dashboard/widget-header.module.css +0 -505
- 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 -1312
- 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 -454
- package/dist/table/cell-kinds.d.ts +0 -44
- package/dist/table/cell-kinds.d.ts.map +0 -1
- package/dist/table/cell-kinds.js +0 -169
- 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 -147
- package/dist/table/data-table-fold.d.ts.map +0 -1
- package/dist/table/data-table-fold.js +0 -288
- 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 -1037
- package/dist/table/data-table.module.css +0 -402
- package/dist/table/data-table.module.css.d.ts +0 -37
- 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 -412
- 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 -392
- 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 -878
- package/src/charts/StackedArea.tsx +0 -101
- package/src/charts/band-fold.ts +0 -107
- package/src/charts/chart-card.module.css +0 -139
- package/src/charts/chart-card.module.css.d.ts +0 -18
- package/src/charts/compile.ts +0 -1416
- 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 -122
- package/src/charts/sparkline.module.css.d.ts +0 -13
- 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 -662
- package/src/cli/doctor.ts +0 -452
- package/src/cli/guard-hook.ts +0 -82
- package/src/cli/init.ts +0 -374
- package/src/cli/provider-tags.ts +0 -38
- package/src/cli/render-imports.ts +0 -104
- package/src/cli/sync.ts +0 -332
- 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/index.ts +0 -16
- 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 -240
- package/src/dashboard/bar-list.module.css.d.ts +0 -20
- package/src/dashboard/bar-list.tsx +0 -249
- package/src/dashboard/board-nav.ts +0 -67
- package/src/dashboard/board.module.css +0 -160
- package/src/dashboard/board.module.css.d.ts +0 -26
- package/src/dashboard/board.tsx +0 -394
- package/src/dashboard/delta-badge.tsx +0 -103
- package/src/dashboard/empty-state.tsx +0 -125
- package/src/dashboard/event-list-model.ts +0 -113
- package/src/dashboard/event-list-rows.tsx +0 -120
- package/src/dashboard/event-list-scroll.ts +0 -145
- package/src/dashboard/event-list-skeleton.tsx +0 -58
- package/src/dashboard/event-list.module.css +0 -283
- package/src/dashboard/event-list.module.css.d.ts +0 -33
- package/src/dashboard/event-list.tsx +0 -309
- package/src/dashboard/index.ts +0 -14
- package/src/dashboard/meter-model.ts +0 -886
- package/src/dashboard/meter-parts.tsx +0 -983
- package/src/dashboard/meter.module.css +0 -463
- package/src/dashboard/meter.module.css.d.ts +0 -48
- package/src/dashboard/meter.tsx +0 -293
- package/src/dashboard/page-summary.module.css +0 -89
- package/src/dashboard/page-summary.module.css.d.ts +0 -15
- package/src/dashboard/page-summary.tsx +0 -95
- package/src/dashboard/query-state.tsx +0 -384
- 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 -338
- package/src/dashboard/settings-section.module.css +0 -48
- package/src/dashboard/settings-section.module.css.d.ts +0 -11
- package/src/dashboard/settings-section.tsx +0 -178
- package/src/dashboard/stat-card-parts.tsx +0 -149
- package/src/dashboard/stat-card.module.css +0 -497
- package/src/dashboard/stat-card.module.css.d.ts +0 -39
- package/src/dashboard/stat-card.tsx +0 -599
- 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 -105
- package/src/dashboard/stat-strip.module.css +0 -396
- package/src/dashboard/stat-strip.module.css.d.ts +0 -41
- package/src/dashboard/stat-strip.tsx +0 -497
- package/src/dashboard/visual-slot.ts +0 -22
- package/src/dashboard/widget-header.module.css +0 -505
- package/src/dashboard/widget-header.module.css.d.ts +0 -27
- package/src/dashboard/widget-header.tsx +0 -476
- 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 -2844
- 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 -454
- 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 -234
- package/src/table/data-table-fold.tsx +0 -514
- package/src/table/data-table-state.ts +0 -230
- package/src/table/data-table.module.css +0 -402
- package/src/table/data-table.module.css.d.ts +0 -37
- package/src/table/data-table.tsx +0 -2211
- 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 -412
- 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/src/guard/index.ts
DELETED
|
@@ -1,2844 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ./guard — headless policy core. Mantine-free and light: it may import dependency-free leaves
|
|
3
|
-
* (`tokens/space-scale`, `common/*`), never `tokens/palette` or `derive` (colour math on every
|
|
4
|
-
* Write/Edit).
|
|
5
|
-
*
|
|
6
|
-
* GUARD_RULES: the closed registry of all 27 violation kinds.
|
|
7
|
-
* checkSource: pure (text, relPath, cfg) → Finding[]. No FS, no walk, no console.
|
|
8
|
-
*/
|
|
9
|
-
import type { Finding, GuardConfig, GuardKind, GuardSeverity } from './types'
|
|
10
|
-
import { vxFamilyOf } from '../common/vx-family'
|
|
11
|
-
import { BASALT_VX_FAMILIES } from '../common/vx-families'
|
|
12
|
-
import { FONTS_CSS_HINT } from './fonts-hint'
|
|
13
|
-
import { BASALT_VX_NAMES } from './vx-names'
|
|
14
|
-
import { SPACE_SCALE_LEVEL0 } from '../tokens/space-scale'
|
|
15
|
-
|
|
16
|
-
export type { Finding, GuardConfig, GuardKind, GuardSeverity }
|
|
17
|
-
|
|
18
|
-
// ── Static regex consts ──────────────────────────────────────────────────────────────────────────
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* A raw hex color literal.
|
|
22
|
-
*
|
|
23
|
-
* The `(?!(?<=&#)\d+;)` guard drops an HTML NUMERIC CHARACTER REFERENCE. `{` is the escaped
|
|
24
|
-
* `{` and `}` the escaped `}` — the two an Astro/JSX template writes to show a literal brace
|
|
25
|
-
* in prose — and their `#123` / `#125` read as three-digit hex. It is not markup-specific: the same
|
|
26
|
-
* string produced the same two findings in `.html`, `.tsx`, `.css` and `.vue`, so this was a hole
|
|
27
|
-
* in the kind itself that `.astro` merely walked into first (rollhook, round 9).
|
|
28
|
-
*
|
|
29
|
-
* The lookahead is deliberately the FULL reference — `&#`, digits, `;` — not a bare `(?<!&)`. Only
|
|
30
|
-
* the decimal form can collide at all (`😀` never matches: `x` is not a hex digit), and a
|
|
31
|
-
* `#` that follows an `&` without terminating in `;` is not an entity, so `color: red&#fff` still
|
|
32
|
-
* flags. Nothing is exempted by file type; a real `#ff0000` in an `.astro` file fires exactly as it
|
|
33
|
-
* does in a `.tsx` one.
|
|
34
|
-
*
|
|
35
|
-
* The sibling raw-text kinds do NOT share this blind spot, and the reason is structural rather than
|
|
36
|
-
* lucky: a character reference contains no `(`, so `raw-color-fn`'s `rgba?|hsla?\(` anchor cannot
|
|
37
|
-
* occur inside one, and every other raw-text kind is anchored on a property name, `var(`, or a JSX
|
|
38
|
-
* `=`. Probed across `.html`/`.astro`/`.tsx` over 20 entity shapes — `raw-hex` was the only kind
|
|
39
|
-
* that fired.
|
|
40
|
-
*
|
|
41
|
-
* Known and NOT covered, because the fix would cost real findings: an all-hex URL fragment or SVG
|
|
42
|
-
* reference (`href="#cafe"`, `fill="url(#abcdef)"`) is indistinguishable from a color by text
|
|
43
|
-
* alone, and both still report. `theme-allow` is the escape there.
|
|
44
|
-
*/
|
|
45
|
-
const HEX = /#(?!(?<=&#)\d+;)[0-9a-fA-F]{3,8}\b/g
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* A raw `rgb()`/`rgba()`/`hsl()`/`hsla()` color function.
|
|
49
|
-
*
|
|
50
|
-
* The `(?!\s*\$\{)` guard drops a call whose FIRST channel is a `${…}` interpolation — that is a
|
|
51
|
-
* color being COMPUTED, not chosen: an imaging app reporting a sampled pixel
|
|
52
|
-
* (`` `rgb(${px[0]}, ${px[1]}, ${px[2]})` ``), a debug log quoting one, a readout label. There is
|
|
53
|
-
* no token that could be correct for a measurement, and the three cases image-gen reported were
|
|
54
|
-
* all this shape. A literal first channel (`rgba(0, 0, 0, ${o})`) is still a hardcoded color with
|
|
55
|
-
* a variable alpha, and still flags — `alpha(token, a)` is exactly the escape for it.
|
|
56
|
-
*/
|
|
57
|
-
const FUNC = /\b(?:rgba?|hsla?)\((?!\s*\$\{)/g
|
|
58
|
-
const LOCALSTORAGE_THEME = /localStorage\s*\.\s*getItem\s*\(\s*['"]theme['"]\s*\)/g
|
|
59
|
-
|
|
60
|
-
// A hardcoded fontFamily/font-family literal — camelCase (JSX prop / object property, quoted
|
|
61
|
-
// value) or kebab-case (CSS text in a template literal, quoted OR bare value — kebab-case is never
|
|
62
|
-
// a valid unquoted JS identifier, so a bare `font-family: Inter` can only be literal CSS text).
|
|
63
|
-
// The escape is ANY `var(--…)` reference. It used to be restricted to the two entry-point prefixes
|
|
64
|
-
// (`--basalt-font-*` / `--mantine-font-family-*`), which reported `font-family: var(--font-sans)`
|
|
65
|
-
// — a variable REFERENCE — as "a hardcoded fontFamily literal", with a fix pointing at the
|
|
66
|
-
// React-only `createBasaltTheme`. A framework-free consumer defining its own custom property IS
|
|
67
|
-
// routing through a variable; the single-entry-point invariant is a doctrine for basalt's own
|
|
68
|
-
// theme layer, not something this regex can tell apart from a legitimate consumer indirection.
|
|
69
|
-
// A CSS-wide keyword (inherit/initial/unset/revert) never flags either: it defers to the cascade
|
|
70
|
-
// rather than hardcoding a font.
|
|
71
|
-
const RAW_FONT_FAMILY_VAR_ESCAPE = /var\(\s*--/.source
|
|
72
|
-
const RAW_FONT_FAMILY_KEYWORD = /(?:inherit|initial|unset|revert)\b/.source
|
|
73
|
-
const RAW_FONT_FAMILY = new RegExp(
|
|
74
|
-
`\\bfontFamily\\s*[:=]\\s*\\{?(?!['"\`]?\\s*${RAW_FONT_FAMILY_VAR_ESCAPE})(?!['"\`]?\\s*${RAW_FONT_FAMILY_KEYWORD})['"\`][^'"\`]+['"\`]` +
|
|
75
|
-
`|\\bfont-family\\s*:\\s*(?!['"\`]?\\s*${RAW_FONT_FAMILY_VAR_ESCAPE})(?!['"\`]?\\s*${RAW_FONT_FAMILY_KEYWORD})(?:['"\`][^'"\`]+['"\`]|[A-Za-z][\\w-]*)`,
|
|
76
|
-
'g',
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
// Ad-hoc inline surface styling — border* / borderRadius / boxShadow with literal values.
|
|
80
|
-
// Three escapes pass (the value is already system-routed, not a hardcoded surface literal):
|
|
81
|
-
// • a `var(--…)` reference — the CSS-var system itself;
|
|
82
|
-
// • a `${…}` template-literal interpolation — the value is JS-composed, typically from `VX.*`
|
|
83
|
-
// tokens; any raw color inside it is separately caught by raw-hex / raw-color-fn;
|
|
84
|
-
// • for `border*` only, a bare `none`/`transparent`/`inherit`/`unset`/`revert` keyword — a reset,
|
|
85
|
-
// not a surface definition.
|
|
86
|
-
const SURFACE_BORDER =
|
|
87
|
-
/\bborder(?:Top|Bottom|Left|Right)?\s*:\s*(?!['"`]?[^'"`]*(?:var\(|\$\{))(?!['"`]?(?:none|transparent|inherit|unset|revert)\b)['"`][^'"`]+['"`]/g
|
|
88
|
-
const SURFACE_RADIUS = /\bborderRadius\s*:\s*(?:[0-9]+|['"`](?!\s*var\()[^'"`]*[0-9])/g
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* A `boxShadow` / `box-shadow` declaration with its whole value captured, so the value can be
|
|
92
|
-
* JUDGED rather than merely pattern-excluded.
|
|
93
|
-
*
|
|
94
|
-
* The old `SURFACE_SHADOW` skipped any value containing `var(` or `${`, which reads as "already
|
|
95
|
-
* system-routed" and is wrong for the shape a token-fluent consumer actually writes:
|
|
96
|
-
* `` boxShadow: `0 0 0 2px ${VX.accent}` `` on a `Paper` is built entirely from tokens and still
|
|
97
|
-
* REPLACES `--vx-shadow-card`, leaving that one card with no depth while every other card in the
|
|
98
|
-
* app has it. Composing WITH card depth (`` `${VX.shadowCard}, 0 0 0 1px …` ``) is the legitimate
|
|
99
|
-
* shape and the one this must not touch — so the discriminator is whether the value still names
|
|
100
|
-
* card depth, not whether it contains a token at all. See `surface-shadow-override`.
|
|
101
|
-
*/
|
|
102
|
-
const SHADOW_DECL = /\b(?:boxShadow|box-shadow)\s*:\s*(['"`])((?:[^'"`\\]|\\.)*)\1/g
|
|
103
|
-
/** A shadow value that still carries basalt's card depth — composes with it rather than replacing it. */
|
|
104
|
-
const SHADOW_KEEPS_CARD_DEPTH = /--vx-shadow-|\bVX\.shadow/
|
|
105
|
-
/** A shadow value routed through SOME variable/interpolation (vs. a hardcoded literal). */
|
|
106
|
-
const SHADOW_IS_COMPOSED = /var\(|\$\{/
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* The kebab-case surface literals a CSS Module writes. `raw-surface` is camelCase-only — the TSX
|
|
110
|
-
* inline-style dialect — so `border-radius: 4px` beside a flagged `borderRadius: 2` was invisible.
|
|
111
|
-
* `src/guard/index.ts`'s `INLINE_SPACING` records that the same asymmetry was deliberately fixed
|
|
112
|
-
* for spacing; this is that fix for the surface kinds.
|
|
113
|
-
*
|
|
114
|
-
* Reaching CSS is a NEW file type for these checks, so they land under their own kind
|
|
115
|
-
* (`css-raw-surface`, warn for one minor) instead of widening `raw-surface` — see
|
|
116
|
-
* {@link GuardSeverity}. `border`/`border-top` are deliberately NOT covered: nearly every CSS
|
|
117
|
-
* module in every consumer declares one, and the token answer (`var(--vx-surface-border)`) is a
|
|
118
|
-
* COLOR, not a whole shorthand, so the rule would be advice nobody can act on line-by-line.
|
|
119
|
-
*/
|
|
120
|
-
const CSS_SURFACE_RADIUS = /(?<![\w-])border-radius\s*:\s*([^;}]+)/g
|
|
121
|
-
const CSS_SURFACE_SHADOW = /(?<![\w-])box-shadow\s*:\s*([^;}]+)/g
|
|
122
|
-
|
|
123
|
-
/** One numeric width literal — the value half of every shape `CSS_WIDTH_MEDIA_QUERY` matches. */
|
|
124
|
-
const CSS_WIDTH_NUM = '[\\d.]+(?:px|em|rem|vw)'
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* A width `@media` condition — `(min-width: 52.5em)` / `(max-width: 767.9px)`, plus every range-
|
|
128
|
-
* comparison spelling CSS lets an author use instead (the SAME condition, just spelled
|
|
129
|
-
* differently): keyword-first (`width >= 600px`), value-first (`600px <= width`), and CHAINED, both
|
|
130
|
-
* sides at once (`400px <= width <= 700px`, `700px >= width >= 400px`). A regex that only covered
|
|
131
|
-
* the keyword-first comparison form let every value-first or chained range slip past unflagged —
|
|
132
|
-
* the exact shape `width >= 600px` catches that `600px <= width` (the same boundary, spelled the
|
|
133
|
-
* other way round) does not. The size-class axis
|
|
134
|
-
* (`docs/DESIGN-CORE.md` § Layout, elevation, shapes) names its own home (`shell/**`, `@media`
|
|
135
|
-
* against `SIZE_CLASSES` literals); anywhere else a hard-coded viewport breakpoint has skipped the
|
|
136
|
-
* framework's one seam for it (`useSizeClass()`, or the derived `theme.breakpoints`). See
|
|
137
|
-
* `raw-breakpoint`, the oxlint plugin's
|
|
138
|
-
* AST-side twin for the same law over JSX (`configs/oxlint-plugin.js`) — this is the CSS-text half,
|
|
139
|
-
* the shape the plugin cannot see. New file type for this check (CSS, same reasoning as
|
|
140
|
-
* `css-raw-surface`), so it lands under its own kind at `warn` for one minor rather than widening an
|
|
141
|
-
* existing one.
|
|
142
|
-
*/
|
|
143
|
-
const CSS_WIDTH_MEDIA_QUERY = new RegExp(
|
|
144
|
-
'@media[^{]*\\(\\s*(?:' +
|
|
145
|
-
// keyword form: min-width: N / max-width: N
|
|
146
|
-
`(?:min|max)-width\\s*:\\s*${CSS_WIDTH_NUM}` +
|
|
147
|
-
// width-first comparison, with an optional CHAINED second boundary on the other side:
|
|
148
|
-
// width OP N, or N OP width OP N
|
|
149
|
-
`|(?:${CSS_WIDTH_NUM}\\s*[<>]=?\\s*)?width\\s*[<>]=?\\s*${CSS_WIDTH_NUM}` +
|
|
150
|
-
// value-first comparison with NO trailing boundary: N OP width. The lookahead excludes the
|
|
151
|
-
// chained shape (already matched whole by the alternative above) so this only fires for the
|
|
152
|
-
// plain value-first form.
|
|
153
|
-
`|${CSS_WIDTH_NUM}\\s*[<>]=?\\s*width(?!\\s*[<>]=?\\s*${CSS_WIDTH_NUM})` +
|
|
154
|
-
')\\s*\\)',
|
|
155
|
-
'g',
|
|
156
|
-
)
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* An `@container` condition — the declared NAME (optional: `@container (min-width: …)` with no
|
|
160
|
-
* name is legal CSS, scoping to the nearest ancestor container regardless of its name) plus every
|
|
161
|
-
* raw boundary across the WHOLE at-rule, chained `and (...)` clauses included
|
|
162
|
-
* (`@container basalt-grid (min-width: 800px) and (max-width: 1199.9px)` —
|
|
163
|
-
* `stat-group.module.css` ships exactly this shape). Capturing only the first parenthesized clause
|
|
164
|
-
* would silently skip every boundary after the first `and`; group 2 here is the full run of
|
|
165
|
-
* `(...)`/`and` text so `CSS_CONTAINER_LITERAL`'s own `matchAll` below finds all of them.
|
|
166
|
-
*/
|
|
167
|
-
const CSS_CONTAINER_QUERY = /@container(?:\s+([\w-]+))?\s*((?:\([^)]*\)\s*(?:and\s*)?)+)/g
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* One numeric boundary inside an `@container` condition's parens, in either syntax CSS allows: the
|
|
171
|
-
* range-media form (`min-width:`/`max-width:`) and the newer comparison form (`width >= …`).
|
|
172
|
-
*/
|
|
173
|
-
const CSS_CONTAINER_LITERAL = /(?:min-width|max-width|width)\s*(?:[<>]=?|:)\s*([\d.]+)(px|em)?/g
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* A `(pointer: …)` / `(any-pointer: …)` media condition whose value is neither sanctioned tier.
|
|
177
|
-
* `coarse` is the touch tier (`--vx-hit` 44px); `fine` is its standard companion for a hover-only
|
|
178
|
-
* affordance (`(hover: hover) and (pointer: fine)`), so both are legal — anything else is not.
|
|
179
|
-
*/
|
|
180
|
-
const CSS_NON_COARSE_POINTER_QUERY =
|
|
181
|
-
/\(\s*(?:any-)?pointer\s*:\s*(?!(?:coarse|fine)\b)[a-z-]+\s*\)/g
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* The `@container` names the container-class axis declares — a consumer container carrying any
|
|
185
|
-
* other name has invented its own container-query breakpoint instead of using the framework's.
|
|
186
|
-
* `basalt-card` is the one shipped today (`src/dashboard/section.module.css`);
|
|
187
|
-
* `basalt-form`/`basalt-grid` are the declared remaining two, reserved here so a consumer adopting
|
|
188
|
-
* one ahead of the framework does not immediately trip this guard. `basalt-main` was a third until
|
|
189
|
-
* 1.32.1 dropped it: nothing ever declared it, so the guard accepted a query that never matched.
|
|
190
|
-
*
|
|
191
|
-
* `basalt-grid` is also what `StatGroup`/`WidgetGrid` declare (`src/dashboard/*.module.css`) —
|
|
192
|
-
* they shipped as `basalt-stat-group`/`basalt-widget-grid` until 1.32.0 moved them onto this table.
|
|
193
|
-
*/
|
|
194
|
-
const DECLARED_CONTAINER_NAMES = new Set(['basalt-card', 'basalt-form', 'basalt-grid'])
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* `CONTAINER_CLASSES` (`src/tokens/size-classes.ts`) boundaries, duplicated per the `CTL_THEME_TAGS`
|
|
198
|
-
* convention in the oxlint plugin — this module keeps to the leaves its file header names and
|
|
199
|
-
* must not import `../tokens`. Pinned against the real table by `check-source.test.ts`. Judged only
|
|
200
|
-
* against `basalt-card` and unnamed queries: the other declared names have no shipped numeric table
|
|
201
|
-
* yet. `0` is the container's own floor, not a class boundary, but `(width >= 0px)` is a legitimate
|
|
202
|
-
* idiom for "scope this rule to the container, whatever its width" (`widget-header.module.css`'s
|
|
203
|
-
* `cqi` clamp) — allowed for that reason, not because it names a real `CONTAINER_CLASSES` step.
|
|
204
|
-
*/
|
|
205
|
-
const CONTAINER_CLASS_LITERALS_PX = new Set([0, 240, 239.9, 480, 479.9, 800, 799.9])
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* `SIZE_CLASSES`' two boundaries (840/1200px) as the em literals `theme.breakpoints`/`shell/**`
|
|
209
|
-
* actually write (`size-classes.ts`'s `toEm`/`sizeClassMaxEm`, 16px root): `52.5em`/`75em` (the
|
|
210
|
-
* `min-width` boundaries) and their `max-width` companions one hundredth of a px short,
|
|
211
|
-
* `52.49375em`/`74.99375em`. The size-class axis names `shell/**` its one CSS home — a width
|
|
212
|
-
* `@media` there against one of these four is the framework's own sanctioned implementation of the
|
|
213
|
-
* axis, not a raw breakpoint a consumer invented.
|
|
214
|
-
*/
|
|
215
|
-
const SIZE_CLASS_LITERALS = new Set(['52.5em', '75em', '52.49375em', '74.99375em'])
|
|
216
|
-
|
|
217
|
-
/** The size-class axis's one CSS home is `shell/**`. Any `shell/`-pathed CSS, basalt's own or a
|
|
218
|
-
* consumer's own shell chrome alike — not a name list, because a consumer's shell directory is
|
|
219
|
-
* never one of `SHELL_HOME_NAMES`' three (or four) declared components. */
|
|
220
|
-
const SHELL_CSS_PATH = /(?:^|\/)shell\//
|
|
221
|
-
|
|
222
|
-
function isSanctionedShellMediaQuery(relPath: string, query: string): boolean {
|
|
223
|
-
if (!SHELL_CSS_PATH.test(relPath)) return false
|
|
224
|
-
// `query` is always one whole match of `CSS_WIDTH_MEDIA_QUERY`, which only ever matches a WIDTH
|
|
225
|
-
// condition — keyword (`min-width:`/`max-width:`), comparison (`width >= N` / `N <= width`), or
|
|
226
|
-
// chained (`N <= width <= N`) — so every `px`/`em`/`rem`/`vw`-suffixed literal anywhere in it IS a
|
|
227
|
-
// width boundary, regardless of which of those spellings produced it. Extracting every literal
|
|
228
|
-
// this way (rather than a keyword-only `(?:min|max)-width:` scan) is what lets this understand
|
|
229
|
-
// the comparison/chained spellings too, with no shape-specific regex of its own. All four units
|
|
230
|
-
// are captured (not `em` only) so a `px` width — never a `SIZE_CLASS_LITERALS` member — correctly
|
|
231
|
-
// fails the check below, rather than `.every()` vacuously passing on an empty match.
|
|
232
|
-
//
|
|
233
|
-
// But `query` is the whole at-rule prelude up to the width condition, so it can also carry a
|
|
234
|
-
// NON-width clause — the shell's own landscape rule is `(max-height: 480px) and (orientation:
|
|
235
|
-
// landscape) and (max-width: 52.49375em)`, and reading its `480px` height as an off-table width
|
|
236
|
-
// flagged the framework's own sanctioned implementation. Only the parenthesized clauses that name
|
|
237
|
-
// `width` are read.
|
|
238
|
-
const widthClauses = query.match(/\([^()]*\bwidth\b[^()]*\)/g) ?? []
|
|
239
|
-
const widths = widthClauses.flatMap((c) => c.match(new RegExp(CSS_WIDTH_NUM, 'g')) ?? [])
|
|
240
|
-
return widths.length > 0 && widths.every((w) => SIZE_CLASS_LITERALS.has(w))
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
/** The largest CSS radius literal treated as a sub-scale micro-corner, in px — below the 4px floor. */
|
|
244
|
-
const MICRO_RADIUS_CEILING_PX = 3
|
|
245
|
-
/** Radius values that name a SHAPE rather than a surface corner — a circle and the pill idiom. */
|
|
246
|
-
const SHAPE_RADIUS_VALUES = new Set(['50%', '9999px', '999px', '100%'])
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Is this `border-radius` value already system-routed or sub-scale? `var(...)` components are
|
|
250
|
-
* dropped first (same treatment as `isSubScaleCssSpacing`), then a value survives when every
|
|
251
|
-
* remaining literal is a shape keyword or a length at/below {@link MICRO_RADIUS_CEILING_PX}.
|
|
252
|
-
*/
|
|
253
|
-
function isAllowedCssRadius(value: string): boolean {
|
|
254
|
-
const rest = value.replace(/var\([^)]*\)/g, ' ').trim()
|
|
255
|
-
if (rest === '') return true
|
|
256
|
-
return rest.split(/\s+/).every((part) => {
|
|
257
|
-
if (SHAPE_RADIUS_VALUES.has(part)) return true
|
|
258
|
-
const literal = /^[-+]?(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(part)
|
|
259
|
-
if (literal === null) return false
|
|
260
|
-
const px = literal[2] === 'rem' ? Number(literal[1]) * ROOT_FONT_SIZE_PX : Number(literal[1])
|
|
261
|
-
return px <= MICRO_RADIUS_CEILING_PX
|
|
262
|
-
})
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* An inline `fontSize` / `font-size` literal — the `check-theme` counterpart to the oxlint plugin's
|
|
267
|
-
* `basalt/no-raw-font-size`. A consumer whose CI runs only `check-theme` (the documented
|
|
268
|
-
* `configs/check.yml` step) never saw a `style={{ fontSize: 11 }}` at all.
|
|
269
|
-
*
|
|
270
|
-
* Unitless integers and `px` only, matching React's inline-style convention and CSS's absolute
|
|
271
|
-
* form. `rem`/`em`/`%` are deliberately out: they are ratios against something else, and the type
|
|
272
|
-
* scale has no opinion on a relative step.
|
|
273
|
-
*/
|
|
274
|
-
// The `(?<![\w-;])` guard is what keeps this out of query strings and URL fragments: argo builds a
|
|
275
|
-
// Static Maps legend as `…;fontSize:10;dpi:96`, which is a REMOTE renderer's parameter, not a type
|
|
276
|
-
// choice, and no `--vx-text-*` could be correct for it. A declaration written by a formatter always
|
|
277
|
-
// has whitespace or an opening brace in front of the property; a packed key/value string does not.
|
|
278
|
-
const INLINE_FONT_SIZE =
|
|
279
|
-
/(?<![\w-;])font-?[Ss]ize\s*:\s*['"]?(\d+(?:\.\d+)?)(?:px)?['"]?(?=[,;\s}]|$)/g
|
|
280
|
-
|
|
281
|
-
// A `Card` / `Paper` opening tag carrying `withBorder`. Card depth is `--vx-shadow-card`, whose 1px
|
|
282
|
-
// ring lives INSIDE the shadow value; `withBorder` therefore adds a SECOND, real `border` property
|
|
283
|
-
// on top of it (the theme's `styles.root` pins bg/shadow/radius but never clears `border`), and the
|
|
284
|
-
// card reads heavy/boxed. Bounded full-text tag scan, same shape as RAW_FORM_CONTROL_TAG below,
|
|
285
|
-
// so a multi-line-formatted tag still resolves to one match.
|
|
286
|
-
//
|
|
287
|
-
// Two deliberate non-matches:
|
|
288
|
-
// • `<Card.Section withBorder>` — a section DIVIDER, not card depth. Excluded by the `(?![\w.])`
|
|
289
|
-
// lookahead, which also rejects `<CardHeader>`-style names.
|
|
290
|
-
// • `withBorder={false}` — a consumer opt-out; the shell no longer uses it (region edges are
|
|
291
|
-
// painted by the theme's `AppShell.extend`, not by a prop). Excluded by the lookahead on
|
|
292
|
-
// WITH_BORDER_PROP.
|
|
293
|
-
const CARD_SURFACE_TAG = /<(?:Card|Paper)(?![\w.])(?:=>|[^>])*?>/g
|
|
294
|
-
const WITH_BORDER_PROP = /\bwithBorder\b(?!\s*=\s*\{\s*false\s*\})/
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* A `var(--vx-*)` REFERENCE with a literal name. The name must end on an alphanumeric and must not
|
|
298
|
-
* run into a `${…}` interpolation, so `var(--vx-fill-${hue})` — a name computed at runtime — never
|
|
299
|
-
* matches a truncated `--vx-fill`.
|
|
300
|
-
*/
|
|
301
|
-
const VX_VAR_REF = /var\(\s*(--vx-[A-Za-z0-9-]*[A-Za-z0-9])(?![A-Za-z0-9-]|\$\{)/g
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* A `--vx-*` name the file DECLARES — a consumer's own custom property, never unknown. Only a real
|
|
305
|
-
* declaration position counts, because the set is file-wide and one false hit silences every
|
|
306
|
-
* finding for that name in the file:
|
|
307
|
-
*
|
|
308
|
-
* - a CSS declaration (`--vx-x: …`, in a stylesheet or in CSS text inside a template literal),
|
|
309
|
-
* directly after a line start, `{` or `;`;
|
|
310
|
-
* - a quoted style-object key (`{ '--vx-x': … }`), directly after `{` or `,` — but not a TS
|
|
311
|
-
* member key (`'--vx-x'?: …`, or one typed `string`/`number`);
|
|
312
|
-
* - `setProperty('--vx-x', …)`.
|
|
313
|
-
*
|
|
314
|
-
* A quoted name used as an EXPRESSION — a ternary arm, a `case` label, an argument — is a reference,
|
|
315
|
-
* not a declaration, and never matches.
|
|
316
|
-
*/
|
|
317
|
-
const VX_LOCAL_DECLARATION =
|
|
318
|
-
/(?:^|[{;])\s*(--vx-[A-Za-z0-9-]*[A-Za-z0-9])\s*:|[{,]\s*(['"])(--vx-[A-Za-z0-9-]*[A-Za-z0-9])\2\s*:(?!\s*(?:string|number)\b)|\bsetProperty\(\s*['"](--vx-[A-Za-z0-9-]*[A-Za-z0-9])['"]/gm
|
|
319
|
-
|
|
320
|
-
/** The twelve fill families `--vx-fill-<family>` / `--vx-fill-hover-<family>` are emitted for. */
|
|
321
|
-
const VX_FILL_FAMILIES = [
|
|
322
|
-
'gray',
|
|
323
|
-
'red',
|
|
324
|
-
'pink',
|
|
325
|
-
'grape',
|
|
326
|
-
'violet',
|
|
327
|
-
'indigo',
|
|
328
|
-
'cyan',
|
|
329
|
-
'teal',
|
|
330
|
-
'green',
|
|
331
|
-
'lime',
|
|
332
|
-
'yellow',
|
|
333
|
-
'orange',
|
|
334
|
-
] as const
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* `--vx-*` names basalt once emitted and no longer does, with the replacement MIGRATING names
|
|
338
|
-
* (`null`: deleted with no replacement). Hand-kept on purpose: it is history, it only grows, and
|
|
339
|
-
* `vx-names.test.ts` pins that none of these is live and every replacement is. Exported so tests
|
|
340
|
-
* derive their fixtures from it instead of keeping a second copy.
|
|
341
|
-
*/
|
|
342
|
-
export const REMOVED_VX_NAMES: Readonly<Record<string, string | null>> = {
|
|
343
|
-
'--vx-space-touch-target': '--vx-hit',
|
|
344
|
-
'--vx-space-touch-control-height': '--vx-hit',
|
|
345
|
-
'--vx-space-app-header-mobile-actions-height': '--vx-space-sticky-header-clearance',
|
|
346
|
-
'--vx-space-sticky-header-clearance-mobile': '--vx-space-sticky-header-clearance',
|
|
347
|
-
'--vx-space-sidebar-brand-inset-top': null,
|
|
348
|
-
// The 1.4.0 camelCase aliases, deleted from 2.x — each names its kebab canonical.
|
|
349
|
-
'--vx-goodSolid': '--vx-good-solid',
|
|
350
|
-
'--vx-badSolid': '--vx-bad-solid',
|
|
351
|
-
'--vx-warnSolid': '--vx-warn-solid',
|
|
352
|
-
'--vx-axisStroke': '--vx-axis-stroke',
|
|
353
|
-
'--vx-dotStroke': '--vx-dot-stroke',
|
|
354
|
-
'--vx-tooltipBg': '--vx-tooltip-bg',
|
|
355
|
-
'--vx-tooltipText': '--vx-tooltip-text',
|
|
356
|
-
'--vx-tooltipMuted': '--vx-tooltip-muted',
|
|
357
|
-
'--vx-tooltipBorder': '--vx-tooltip-border',
|
|
358
|
-
'--vx-tooltipShadow': '--vx-tooltip-shadow',
|
|
359
|
-
'--vx-legendText': '--vx-legend-text',
|
|
360
|
-
'--vx-accentHover': '--vx-accent-hover',
|
|
361
|
-
'--vx-accentFill': '--vx-accent-fill',
|
|
362
|
-
'--vx-accentFillHover': '--vx-accent-fill-hover',
|
|
363
|
-
'--vx-onAccent': '--vx-on-accent',
|
|
364
|
-
'--vx-surface-panelHover': '--vx-surface-panel-hover',
|
|
365
|
-
'--vx-goodSoft': '--vx-good-soft',
|
|
366
|
-
'--vx-goodRef': '--vx-good-ref',
|
|
367
|
-
'--vx-badRef': '--vx-bad-ref',
|
|
368
|
-
'--vx-warnRef': '--vx-warn-ref',
|
|
369
|
-
...Object.fromEntries(
|
|
370
|
-
VX_FILL_FAMILIES.map((family) => [`--vx-fillHover-${family}`, `--vx-fill-hover-${family}`]),
|
|
371
|
-
),
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
const KNOWN_VX_NAMES: ReadonlySet<string> = new Set(BASALT_VX_NAMES)
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* The families basalt owns (`vxFamilyOf`: `surface`, `space`, `ink`, `keyboard`, …), which the
|
|
378
|
-
* generator reads off every name basalt emits. Every name inside one is judged against the exact
|
|
379
|
-
* emitted set, so `--vx-surface-2` and a bare root like `--vx-space` are both findings.
|
|
380
|
-
*
|
|
381
|
-
* That judgement is honest only because no consumer ref may point into these families:
|
|
382
|
-
* `groupTokens`/`seriesTokens` throw on a name inside one. A name in any OTHER family (argo's
|
|
383
|
-
* `--vx-activity-*`, rb's `--vx-confidence-*`) may be a consumer group declared in a file this scan
|
|
384
|
-
* cannot see, and is never judged.
|
|
385
|
-
*/
|
|
386
|
-
const BASALT_VX_FAMILY_SET: ReadonlySet<string> = new Set(BASALT_VX_FAMILIES)
|
|
387
|
-
|
|
388
|
-
// Raw Mantine ramp step used for surface color — gray/dark + a step digit.
|
|
389
|
-
const OFF_SYSTEM_SURFACE_VAR = /var\(--mantine-color-(gray|dark)-\d/g
|
|
390
|
-
|
|
391
|
-
// A SHADE-PINNED Mantine color: the dotted JSX form (`c="yellow.7"`) or the var() form
|
|
392
|
-
// (`var(--mantine-color-red-6)`). Both name one fixed swatch that does NOT flip across color
|
|
393
|
-
// schemes — see the `mantineShadeIndex` doc in guard/types.ts for why the bare hue name is fine and
|
|
394
|
-
// the pinned step is not.
|
|
395
|
-
//
|
|
396
|
-
// The var() half deliberately excludes gray-/dark-, which `off-system-surface-var` already owns, so
|
|
397
|
-
// a surface violation reports once under one kind rather than twice under two.
|
|
398
|
-
//
|
|
399
|
-
// The JSX half is prop-shaped (`c="yellow.7"` needs the `=`), which CSS text has no syntax for, so
|
|
400
|
-
// it cannot fire in a `.css` file; the var() half is a real violation in CSS and is meant to fire
|
|
401
|
-
// there. That split is why this kind, unlike its prop-only neighbours, carries no `appliesTo` gate.
|
|
402
|
-
const MANTINE_SHADE_INDEX =
|
|
403
|
-
/\b(?:color|c|bg|backgroundColor|borderColor)\s*=\s*\{?\s*['"][a-z]+\.\d\b|var\(--mantine-color-(?!gray-|dark-)[a-z]+-\d/g
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* A raw lowercase JSX layout/surface element's own OPENING TAG — bounded full-text scan, the same
|
|
407
|
-
* shape `CARD_SURFACE_TAG` uses.
|
|
408
|
-
*
|
|
409
|
-
* This kind used to be a three-condition conjunction evaluated per LINE, so the identical
|
|
410
|
-
* violation was reported or not depending purely on how the formatter had broken the tag:
|
|
411
|
-
* `<div style={{ position: 'relative', … }}>` on one line fired, while the same `<div>` with
|
|
412
|
-
* `className=` and `style=` on separate lines did not. `card-with-border` already had the answer.
|
|
413
|
-
*/
|
|
414
|
-
const RAW_HTML_TAG_NAME = '<(?:div|span|section|header|nav|footer|aside|main|article|ul|ol)\\b'
|
|
415
|
-
const RAW_HTML_TAG = new RegExp(RAW_HTML_TAG_NAME)
|
|
416
|
-
const RAW_HTML_LAYOUT_TAG = new RegExp(`${RAW_HTML_TAG_NAME}(?:=>|[^>])*?>`, 'g')
|
|
417
|
-
const INLINE_STYLE = /style=\{\{/
|
|
418
|
-
/** `style={someStyleConst}` — the hoisted form that defeats every text-local check. */
|
|
419
|
-
const STYLE_IDENTIFIER = /style=\{\s*([A-Za-z_$][\w$]*)\s*\}/
|
|
420
|
-
const LAYOUT_SURFACE_PROP =
|
|
421
|
-
/\b(?:display|padding|margin|gap|flex|grid|border|background|width|height)\b/
|
|
422
|
-
|
|
423
|
-
/**
|
|
424
|
-
* The object body of a `const <name> = { … }` declaration, or `''` when there is none.
|
|
425
|
-
*
|
|
426
|
-
* Hoisting the style object out of the tag (`const wrapperStyle: CSSProperties = {…}` then
|
|
427
|
-
* `style={wrapperStyle}`) is the general escape from every text-local kind, and it is what a
|
|
428
|
-
* formatter nudges people toward. One non-nested lookup closes the common case; a style object
|
|
429
|
-
* assembled across statements is out of reach of a regex scanner and stays out of reach.
|
|
430
|
-
*/
|
|
431
|
-
function hoistedObjectBody(codeText: string, name: string): string {
|
|
432
|
-
// `name` comes from source text and reaches a RegExp — a `$`-prefixed identifier is legal JS and
|
|
433
|
-
// is an anchor in a pattern, so it gets escaped rather than trusted.
|
|
434
|
-
const escaped = name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
435
|
-
const decl = new RegExp(`\\b(?:const|let|var)\\s+${escaped}\\b[^=;]*=\\s*\\{([^}]*)\\}`).exec(
|
|
436
|
-
codeText,
|
|
437
|
-
)
|
|
438
|
-
return decl?.[1] ?? ''
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
// Spacing/sizing literals — anchored on the property name; `var()` and a plain `0` pass.
|
|
442
|
-
//
|
|
443
|
-
// Composed rather than written out because it must cover BOTH spellings of the same property: the
|
|
444
|
-
// camelCase form a TSX inline style uses (`paddingInlineStart`) and the kebab form CSS uses
|
|
445
|
-
// (`padding-inline-start`). Enumerating one and not the other is how `padding: 18px` came to flag in
|
|
446
|
-
// a CSS module while `padding-top: 18px` beside it did not — a distinction shaped by regex history
|
|
447
|
-
// rather than by any decision, and invisible from the author's seat.
|
|
448
|
-
//
|
|
449
|
-
// Case-insensitivity would be the short way to unify them and is deliberately not used: it would
|
|
450
|
-
// also match `Padding`/`PADDING`, neither of which is a property in either dialect.
|
|
451
|
-
const BOX_SIDE = '(?:Top|Bottom|Left|Right|Block|Inline)(?:Start|End)?'
|
|
452
|
-
const BOX_SIDE_KEBAB = '(?:top|bottom|left|right|block|inline)(?:-(?:start|end))?'
|
|
453
|
-
const SPACING_PROP = `(?:padding|margin)(?:${BOX_SIDE}|-${BOX_SIDE_KEBAB})?|gap|rowGap|columnGap|row-gap|column-gap`
|
|
454
|
-
// A bare `0` needs no unit and no token, so it is never a finding — but the guard for it has to
|
|
455
|
-
// stop at the zero ITSELF. `(?!0\b)` did not: `\b` sits between `0` and `.`, so every value
|
|
456
|
-
// starting `0.` matched the guard and dropped out of the scan entirely. `0.75rem` is 12px, a real
|
|
457
|
-
// spacing value, and it was invisible. `(?!0(?![.\d]))` excuses only a zero that ends there.
|
|
458
|
-
//
|
|
459
|
-
// The property is preceded by `(?<![\w-])`, not `\b`: a `\b` boundary sits inside a hyphenated
|
|
460
|
-
// identifier, so every custom property whose NAME ends in a spacing word — the token layer's own
|
|
461
|
-
// `--vx-space-article-header-padding-bottom`, a consumer's `--card-padding-inline` — matched as if
|
|
462
|
-
// it were a declaration. A custom property is a definition, not a rendered spacing decision.
|
|
463
|
-
//
|
|
464
|
-
// The number does two things at once. CSS lets a value carry an explicit `+` and omit the integer
|
|
465
|
-
// part, so `.75rem` and `+12px` are the same spacing as `0.75rem` and `12px`; requiring a leading
|
|
466
|
-
// digit skipped both — the same silent-skip the zero guard above was fixed for, one spelling over.
|
|
467
|
-
//
|
|
468
|
-
// But admitting a fractional part also admits values that are not lengths at all. A UNITLESS
|
|
469
|
-
// fraction is never a spacing literal: `padding: 4` in an inline style is 4px by React's convention,
|
|
470
|
-
// while `padding: 0.3` is a RATIO — visx's band padding (`scalePoint({ padding: 0.3 })`) found this,
|
|
471
|
-
// ten times over in one consumer, and the guard's own advice ("use p/m/gap with xs..xl") is
|
|
472
|
-
// meaningless for it. So the discriminator is the UNIT, not the digit shape: a fraction must carry
|
|
473
|
-
// one (`.75rem`), and a unitless number must be an integer (`padding: 4` — still 4px, still a
|
|
474
|
-
// finding). `0.3` matches neither and drops out. `(?=[a-z%])` covers every CSS unit without
|
|
475
|
-
// enumerating them, and the sign stays outside so the zero guard still sees `-0` as a zero.
|
|
476
|
-
const SPACING_NUMBER = '(?:\\d*\\.\\d+(?=[a-z%])|\\d+(?!\\.\\d))'
|
|
477
|
-
const INLINE_SPACING = new RegExp(
|
|
478
|
-
`(?<![\\w-])(?:${SPACING_PROP})\\s*:\\s*(?!var\\()['"]?[-+]?(?!0(?![.\\d]))${SPACING_NUMBER}`,
|
|
479
|
-
'g',
|
|
480
|
-
)
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* The sub-scale micro-spacing ceiling, in px — the largest literal `inline-spacing` tolerates in a
|
|
484
|
-
* CSS file. Below the smallest spacing scale stop (`SPACE_SCALE.xs`), which is the whole point: a
|
|
485
|
-
* value under that stop has NO token to prefer, so flagging it asks for something that does not
|
|
486
|
-
* exist. Pinned against the real scale by `check-source.test.ts` so a density retune of the ladder
|
|
487
|
-
* cannot leave this stranded above it.
|
|
488
|
-
*
|
|
489
|
-
* Deliberately CSS-ONLY. In TSX the same shape means something different: `pl={4}` is a Mantine
|
|
490
|
-
* PROP and never matches this pattern in the first place, while `style={{ paddingLeft: 4 }}` does —
|
|
491
|
-
* and there the finding is right, because the prop form exists and should have been used. In CSS
|
|
492
|
-
* there is no prop form, and the emitted `--vx-space-*` set is basalt's own component one-offs
|
|
493
|
-
* (`--vx-space-toc-sub-indent`), not a consumer surface. Without this escape a consumer's CSS
|
|
494
|
-
* module had no legal way to write a 4px cluster gap: no token to reach for, `theme-allow` on every
|
|
495
|
-
* line (which `basalt-tokens.md` explicitly warns against), or `exemptRules` — which at the time
|
|
496
|
-
* matched whole path segments only and so could not express `*.module.css` (it can now, see
|
|
497
|
-
* `exemptPatternMatches`; the escape stays because a per-file exemption is still the wrong shape
|
|
498
|
-
* for a value that has no token).
|
|
499
|
-
*/
|
|
500
|
-
const MICRO_SPACING_CEILING_PX = SPACE_SCALE_LEVEL0.xs - 1
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* Object-literal openers that make the properties under them CSS.
|
|
504
|
-
*
|
|
505
|
-
* A UNITLESS spacing number is only a length by React's inline-style convention, and that
|
|
506
|
-
* convention only holds inside a style object. `const FIT_BOUNDS_OPTIONS = { padding: 48, duration:
|
|
507
|
-
* 0 }` is a maplibre viewport inset measured in MAP pixels — there is no Mantine token that could
|
|
508
|
-
* express it, and "use p/m/gap with xs..xl" is not a thing that can be done to it. The same shape
|
|
509
|
-
* arrives from every canvas/map/layout library a consumer wraps, so this is a class, not a case.
|
|
510
|
-
*
|
|
511
|
-
* A value carrying a UNIT (`'12px'`, `1.5rem`) is exempt from this test entirely — a unit IS the
|
|
512
|
-
* evidence that the number is CSS, wherever it was written.
|
|
513
|
-
*/
|
|
514
|
-
/** `style={{`, `styles={{`, `sx={{`, `css={{` — the object under it IS CSS by construction. */
|
|
515
|
-
const STYLE_ATTRIBUTE_OPENER = /\b(?:style|styles|sx|css)\s*=\s*\{?\s*$/
|
|
516
|
-
|
|
517
|
-
/** `const wrapperStyle: CSSProperties = {` — the hoisted form; name and type are both evidence. */
|
|
518
|
-
const OBJECT_DECLARATION = /\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*(?::([^=]*))?=\s*$/
|
|
519
|
-
|
|
520
|
-
/** A name that says "these are styles" on its own, without a `style={…}` use site to confirm it. */
|
|
521
|
-
const STYLE_OBJECT_NAME = /(?:Style|Styles|Css)$|^(?:style|styles|css|sx)$/
|
|
522
|
-
|
|
523
|
-
/** A type annotation that says the same thing — `CSSProperties`, `CSSObject`, `MantineStyleProp`. */
|
|
524
|
-
const STYLE_OBJECT_TYPE = /\bCSS(?:Properties|Object)\b|\bStyle(?:s|Prop)?\b/
|
|
525
|
-
|
|
526
|
-
/** `style={someStyleConst}` / `styles={parts}` — collected file-wide, so a hoisted object is known. */
|
|
527
|
-
const STYLE_BOUND_IDENTIFIER = /\b(?:style|styles|sx|css)=\{\s*([A-Za-z_$][\w$]*)\s*\}/g
|
|
528
|
-
|
|
529
|
-
/** A property key introducing a nested object — `input: {`, `'&:hover': {`, `root: {`. */
|
|
530
|
-
const NESTED_OBJECT_KEY = /(?:[\w$]+|'[^']*'|"[^"]*"|\[[^\]]*\])\s*:\s*$/
|
|
531
|
-
|
|
532
|
-
/** How far back {@link isStyleObjectContext} walks before giving up. Bounded so a huge file can't stall. */
|
|
533
|
-
const MAX_STYLE_CONTEXT_SCAN = 4000
|
|
534
|
-
|
|
535
|
-
/**
|
|
536
|
-
* Is the match at `at` inside an inline-style object literal?
|
|
537
|
-
*
|
|
538
|
-
* Walks out through enclosing `{` openers (a nested part like `styles={{ input: { … } }}` keeps
|
|
539
|
-
* walking) and asks what introduced the outermost one: a style ATTRIBUTE, or a `const` whose name
|
|
540
|
-
* says styles or which some `style={…}` in the file binds. Everything else — a call argument, an
|
|
541
|
-
* options bag, a plain record — is not CSS.
|
|
542
|
-
*
|
|
543
|
-
* Consulted only for a UNITLESS number, where the alternative is reporting a violation with no
|
|
544
|
-
* possible remedy. A value carrying a unit is CSS wherever it was written and never reaches here.
|
|
545
|
-
*/
|
|
546
|
-
function isStyleObjectContext(
|
|
547
|
-
codeText: string,
|
|
548
|
-
at: number,
|
|
549
|
-
styleIdentifiers: ReadonlySet<string>,
|
|
550
|
-
): boolean {
|
|
551
|
-
let depth = 0
|
|
552
|
-
const stop = Math.max(0, at - MAX_STYLE_CONTEXT_SCAN)
|
|
553
|
-
for (let i = at - 1; i >= stop; i--) {
|
|
554
|
-
const ch = codeText[i]
|
|
555
|
-
if (ch === '}') depth++
|
|
556
|
-
else if (ch === '{') {
|
|
557
|
-
if (depth > 0) {
|
|
558
|
-
depth--
|
|
559
|
-
continue
|
|
560
|
-
}
|
|
561
|
-
const before = codeText.slice(Math.max(0, i - 120), i)
|
|
562
|
-
if (STYLE_ATTRIBUTE_OPENER.test(before)) return true
|
|
563
|
-
const declaration = OBJECT_DECLARATION.exec(before)
|
|
564
|
-
if (declaration !== null) {
|
|
565
|
-
const [, name = '', annotation = ''] = declaration
|
|
566
|
-
return (
|
|
567
|
-
STYLE_OBJECT_NAME.test(name) ||
|
|
568
|
-
STYLE_OBJECT_TYPE.test(annotation) ||
|
|
569
|
-
styleIdentifiers.has(name)
|
|
570
|
-
)
|
|
571
|
-
}
|
|
572
|
-
// `{{` — a JSX expression container around the style object; keep walking out to the `=`.
|
|
573
|
-
if (before.endsWith('{')) continue
|
|
574
|
-
// A nested style part (`styles={{ input: { … } }}`) — the key names a part, not a context.
|
|
575
|
-
if (NESTED_OBJECT_KEY.test(before)) continue
|
|
576
|
-
return false
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
return false
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
/** The root font size `rem` values resolve against — the same 16 the token layer's `pxRem` uses. */
|
|
583
|
-
const ROOT_FONT_SIZE_PX = 16
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* Is this CSS declaration entirely sub-scale? True when every literal in the value is a bare px (or
|
|
587
|
-
* unitless) number at or below {@link MICRO_SPACING_CEILING_PX}. `var(...)` components are dropped
|
|
588
|
-
* before the check — a value that mixes a token with a micro literal (`padding: 4px var(--x)`) is
|
|
589
|
-
* already tokenized where it counts.
|
|
590
|
-
*
|
|
591
|
-
* Multi-value shorthands are judged as a whole: `padding: 4px 8px` passes, `padding: 4px 16px` does
|
|
592
|
-
* not — the 16 has a scale stop and should use it.
|
|
593
|
-
*
|
|
594
|
-
* `rem` is resolved against the 16px root, the same conversion `pxRem` in the token layer applies,
|
|
595
|
-
* so `0.25rem` and `4px` get the same answer. Writing the identical spacing two ways and having the
|
|
596
|
-
* guard accept one is the same arbitrariness the kebab gap produced. Units that cannot be resolved
|
|
597
|
-
* to px without layout context — `em`, `%`, `ch`, `vw` — are not micro-spacing claims and still
|
|
598
|
-
* flag.
|
|
599
|
-
*/
|
|
600
|
-
function isSubScaleCssSpacing(line: string, matchIndex: number): boolean {
|
|
601
|
-
const colon = line.indexOf(':', matchIndex)
|
|
602
|
-
if (colon === -1) return false
|
|
603
|
-
const rest = line.slice(colon + 1)
|
|
604
|
-
const end = rest.search(/[;}]/)
|
|
605
|
-
const value = (end === -1 ? rest : rest.slice(0, end)).replace(/var\([^)]*\)/g, ' ').trim()
|
|
606
|
-
if (value === '') return true
|
|
607
|
-
return value.split(/\s+/).every((part) => {
|
|
608
|
-
const literal = /^[-+]?(\d+(?:\.\d+)?|\.\d+)(px|rem)?$/.exec(part)
|
|
609
|
-
if (literal === null) return false
|
|
610
|
-
const px = literal[2] === 'rem' ? Number(literal[1]) * ROOT_FONT_SIZE_PX : Number(literal[1])
|
|
611
|
-
return px <= MICRO_SPACING_CEILING_PX
|
|
612
|
-
})
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
// display:flex/grid/inline-flex/inline-grid in an inline style.
|
|
616
|
-
const INLINE_DISPLAY = /\bdisplay\s*:\s*['"](?:inline-)?(?:flex|grid)['"]/g
|
|
617
|
-
|
|
618
|
-
// radius prop with a numeric literal (module-level so it is not re-created per call).
|
|
619
|
-
const RADIUS_PROP_RE = /\bradius=(?:\{[0-9]+\}|"[0-9]+")/g
|
|
620
|
-
|
|
621
|
-
// Hardcoded motion transition params — a duration/spring/ease literal inline in `transition={{}}`
|
|
622
|
-
// instead of the shared MOTION_DURATION / MOTION_SPRING / MOTION_EASE_STANDARD tokens.
|
|
623
|
-
const MOTION_TRANSITION_NUMERIC =
|
|
624
|
-
/\btransition\s*=\s*\{\{[^}]*\b(?:duration|stiffness|damping|mass)\s*:\s*-?\d/g
|
|
625
|
-
const MOTION_TRANSITION_EASE_ARRAY = /\btransition\s*=\s*\{\{[^}]*\bease\s*:\s*\[/g
|
|
626
|
-
|
|
627
|
-
// Raw lowercase form-control element — line-scoped. `\b` after the
|
|
628
|
-
// tag name rejects a same-prefixed custom component (`<inputRef`, `<selectAll`).
|
|
629
|
-
const RAW_FORM_CONTROL = /<(?:input|select|textarea)\b/g
|
|
630
|
-
|
|
631
|
-
// A raw form-control's own opening tag — bounded full-text scan (same shape as CARD_SURFACE_TAG),
|
|
632
|
-
// used ONLY by sub-16-input-font to search the tag's own inline `style` for a sub-floor fontSize.
|
|
633
|
-
const RAW_FORM_CONTROL_TAG = /<(?:input|select|textarea)\b(?:=>|[^>])*?>/g
|
|
634
|
-
|
|
635
|
-
// ── Control-home patterns (docs/CONTROLS-SPEC.md §6 — the text lane of laws C1/C8) ──────────────
|
|
636
|
-
//
|
|
637
|
-
// Bounded full-text tag scans, the CARD_SURFACE_TAG shape: a `<Title>` and a
|
|
638
|
-
// `<Select>` are both routinely formatted across lines, so a per-line regex would see neither.
|
|
639
|
-
|
|
640
|
-
/** A `<Title …>` opening tag, however it is wrapped. `order` is judged separately, on the tag text. */
|
|
641
|
-
const PAGE_TITLE_TAG = /<Title(?![\w.])(?:=>|[^>])*?>/g
|
|
642
|
-
/** `order={1}` / `order={2}` — the two orders that name a PAGE rather than a section. */
|
|
643
|
-
const PAGE_TITLE_ORDER_PROP = /\border\s*=\s*\{\s*([12])\s*\}/
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* The text-lane twin of the plugin's `hasStaticTitleText`: does the body between `<Title …>` and
|
|
647
|
-
* `</Title>` spell a NAME out, or render a value?
|
|
648
|
-
*
|
|
649
|
-
* The law is "one NAME per page", and a name is written in words — so a `<Title order={1}>{
|
|
650
|
-
* knot.title}</Title>` on a nav-less detail route, and a card's hero value
|
|
651
|
-
* `<Title order={2}>{RANK_LABEL[rank]}</Title>`, are data rather than a second page name and stop
|
|
652
|
-
* reporting in BOTH lanes. Kept in step with the plugin deliberately: the two share one id, so one
|
|
653
|
-
* `theme-allow` covers both and they must not disagree about what they cover.
|
|
654
|
-
*
|
|
655
|
-
* Text-lane approximation, and the direction of its error is the safe one: everything outside the
|
|
656
|
-
* outermost `{…}` runs is stripped of braces' contents and what remains has to be blank. A
|
|
657
|
-
* LAUNDERED literal (`{'Users'}`, a substitution-free template) is read as the text it is, so the
|
|
658
|
-
* escape is the expression, not the braces.
|
|
659
|
-
*/
|
|
660
|
-
const PAGE_TITLE_BRACED_RUN = /\{[^{}]*(?:\{[^{}]*\}[^{}]*)*\}/g
|
|
661
|
-
const PAGE_TITLE_LAUNDERED_LITERAL = /^\s*['"`][^'"`]*['"`]\s*$/
|
|
662
|
-
|
|
663
|
-
function titleBodyNamesThePage(body: string): boolean {
|
|
664
|
-
let outsideBraces = body
|
|
665
|
-
for (const braced of body.match(PAGE_TITLE_BRACED_RUN) ?? []) {
|
|
666
|
-
if (PAGE_TITLE_LAUNDERED_LITERAL.test(braced.slice(1, -1))) return true
|
|
667
|
-
outsideBraces = outsideBraces.replace(braced, '')
|
|
668
|
-
}
|
|
669
|
-
return outsideBraces.replace(/<[^>]*>/g, '').trim() !== ''
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* A raw Mantine selection control's opening tag — the text-lane twin of the oxlint plugin's
|
|
674
|
-
* RAW_FILTER_TAGS. `Chip.Group` carries a dot, so the name class allows one.
|
|
675
|
-
*/
|
|
676
|
-
const RAW_SELECTION_CONTROL_TAG =
|
|
677
|
-
/<(SegmentedControl|Select|MultiSelect|NativeSelect|DatePickerInput|DateInput|TagsInput|Chip\.Group)(?![\w])(?:=>|[^>])*?>/g
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* A tag whose presence makes an `order={1|2}` Title a DOCUMENT heading rather than a page title.
|
|
681
|
-
* File-scoped on purpose — see the scan's own comment for why the coarser test is the honest one.
|
|
682
|
-
*/
|
|
683
|
-
const PROSE_CONTEXT_TAG = /<(?:Prose|ArticleLayout|Modal|Drawer)(?![\w])/
|
|
684
|
-
|
|
685
|
-
/**
|
|
686
|
-
* An opening tag for one of the declared non-homes — a settings row, an overlay, a composer — or
|
|
687
|
-
* for one of the basalt SUBTREE homes, where the children ARE the home (`FilterSet` / `PageAside` /
|
|
688
|
-
* `PanelRow`, `docs/ASIDE-SPEC.md` §3). The text lane cannot ask which of the two a tag is, and it
|
|
689
|
-
* does not need to: both mean "a raw control here is not homeless".
|
|
690
|
-
*
|
|
691
|
-
* The three subtree homes are the plugin's `BASALT_HOST_TAGS`, mirrored here so one law does not
|
|
692
|
-
* read differently in the two lanes. The plugin gates them on the tag's basalt IMPORT; a regex walk
|
|
693
|
-
* has no import graph, so this lane matches by name and accepts the missed warn on a
|
|
694
|
-
* consumer's own `PanelRow` — the same direction every approximation in this scan already leans.
|
|
695
|
-
*
|
|
696
|
-
* The name set is the plugin's `CONTROL_HOST_TAGS` ∪ `BASALT_HOST_TAGS`; `oxlint-plugin.test.ts` ›
|
|
697
|
-
* lane parity asserts the two agree (1.32.1 — `FormRow`/`FormGroup` had drifted out of this lane).
|
|
698
|
-
*/
|
|
699
|
-
const CONTROL_HOST_TAG =
|
|
700
|
-
/<(?:SettingsRow|FormRow|FormGroup|Modal|Drawer|Popover\.Dropdown|Menu\.Dropdown|Composer|FilterSet|PageAside|PanelRow)(?![\w])/
|
|
701
|
-
|
|
702
|
-
/** An opening or closing host tag's name — the anchor of the walk in {@link insideHostTag}. */
|
|
703
|
-
const CONTROL_HOST_TAG_NAME = new RegExp(
|
|
704
|
-
`<(/?)(?:${/\(\?:([^)]*)\)/.exec(CONTROL_HOST_TAG.source)?.[1] ?? ''})(?![\\w])`,
|
|
705
|
-
'g',
|
|
706
|
-
)
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* The index of the `>` that ends the opening tag whose attributes start at `from`, or -1 when the
|
|
710
|
-
* text stops first. A `>` inside `{…}` (`=>`, a nested `<Select />`) or a quoted attribute value
|
|
711
|
-
* does not end it, which is what a lazy `[^>]*?>` got wrong: `control={<Select />}` ended at the
|
|
712
|
-
* Select's own `/>`.
|
|
713
|
-
*/
|
|
714
|
-
function openingTagEnd(codeText: string, from: number): number {
|
|
715
|
-
let braces = 0
|
|
716
|
-
let quote = ''
|
|
717
|
-
for (let i = from; i < codeText.length; i++) {
|
|
718
|
-
const ch = codeText[i]
|
|
719
|
-
if (quote !== '') {
|
|
720
|
-
if (ch === quote) quote = ''
|
|
721
|
-
} else if (braces === 0 && (ch === '"' || ch === "'")) quote = ch
|
|
722
|
-
else if (ch === '{') braces += 1
|
|
723
|
-
else if (ch === '}') braces -= 1
|
|
724
|
-
else if (ch === '>' && braces === 0) return i
|
|
725
|
-
}
|
|
726
|
-
return -1
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
/**
|
|
730
|
-
* Whether `offset` sits inside a host tag — in its attributes (`control={<Select />}`) or between
|
|
731
|
-
* its open and close tags. The text lane has no AST, but the nesting of host tags in plain JSX is
|
|
732
|
-
* countable: +1 per opening tag, −1 per closing one, self-closing tags neither. That is what the
|
|
733
|
-
* plugin's `control-outside-home` answers by walking ancestors (a `control=` prop and the children
|
|
734
|
-
* are both descendants of the row), so a control 40 lines under its `<SettingsRow>` is as homed here
|
|
735
|
-
* as there, and one after the row closed is not.
|
|
736
|
-
*/
|
|
737
|
-
function insideHostTag(codeText: string, offset: number): boolean {
|
|
738
|
-
let depth = 0
|
|
739
|
-
for (const m of codeText.matchAll(CONTROL_HOST_TAG_NAME)) {
|
|
740
|
-
if (m.index >= offset) break
|
|
741
|
-
const end = openingTagEnd(codeText, m.index + m[0].length)
|
|
742
|
-
if (end === -1 || end >= offset) return m[1] !== '/'
|
|
743
|
-
if (m[1] === '/') depth = Math.max(0, depth - 1)
|
|
744
|
-
else if (codeText[end - 1] !== '/') depth += 1
|
|
745
|
-
}
|
|
746
|
-
return depth > 0
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
/**
|
|
750
|
-
* A file whose BASENAME declares it is an overlay's or a form's own body — the cross-file half of
|
|
751
|
-
* {@link CONTROL_HOST_TAG}, and the same two dialects the plugin's `isOverlayConventionFile`
|
|
752
|
-
* applies to `basalt/control-outside-home` and `basalt/bound-control-outside-home` (one law, two
|
|
753
|
-
* lanes, one exemption).
|
|
754
|
-
*
|
|
755
|
-
* Law C1's cross-file case is advisory by declaration (`docs/CONTROLS-SPEC.md` §6, "Honest
|
|
756
|
-
* coverage"), and this kind was paying for it: a `<Select>` inside `edit-session-modal.tsx` whose
|
|
757
|
-
* `<Modal>` is rendered by the parent route is outside any
|
|
758
|
-
* ancestry walk, because the host tag is not in the file at all. argo carried 9 of them.
|
|
759
|
-
*
|
|
760
|
-
* KEBAB and PascalCase both count, because a repo picks one file-naming law and the convention has
|
|
761
|
-
* to survive either: `edit-session-modal.tsx`, and `CbbiPanel.tsx` in a repo mandating
|
|
762
|
-
* `PascalCase.tsx` for component files (basalt's own root `AGENTS.md` included). Each needs the
|
|
763
|
-
* leading SUBJECT — a bare `modal.tsx` / `Panel.tsx` is a page module, not the convention.
|
|
764
|
-
*
|
|
765
|
-
* The trade is that a whole file goes unscanned on a naming convention — the same bargain
|
|
766
|
-
* {@link MANTINE_FORM_IMPORT} already buys, and a smaller one than promoting the kind with 9 known
|
|
767
|
-
* false positives. Basename only: a `modal/` DIRECTORY holds the page pieces around the modals too.
|
|
768
|
-
*/
|
|
769
|
-
const OVERLAY_CONVENTION_KEBAB = /^[^/]*-(?:modal|drawer|popover|panel|form)\.[jt]sx$/
|
|
770
|
-
const OVERLAY_CONVENTION_PASCAL = /^[A-Z]\w*(?:Modal|Drawer|Popover|Panel|Form)\.[jt]sx$/
|
|
771
|
-
|
|
772
|
-
/** Does `relPath`'s BASENAME declare the overlay convention, in either dialect? */
|
|
773
|
-
function isOverlayConventionFile(relPath: string): boolean {
|
|
774
|
-
const basename = relPath.slice(relPath.lastIndexOf('/') + 1)
|
|
775
|
-
return OVERLAY_CONVENTION_KEBAB.test(basename) || OVERLAY_CONVENTION_PASCAL.test(basename)
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
/**
|
|
779
|
-
* A name whose DECLARATION means this file DEFINES a basalt control rather than consuming one.
|
|
780
|
-
*
|
|
781
|
-
* Paired with {@link BASALT_ANY_IMPORT}, and the pair is the exemption — see the plugin's
|
|
782
|
-
* `CONTROL_OWNER_NAMES` for the whole reasoning: `PanelRow`, `EnumFilter` and `SliderControl` are
|
|
783
|
-
* names a consumer writes for their own helpers, so a bare-name match let one local
|
|
784
|
-
* `function PanelRow(…)` switch this kind off for the whole file.
|
|
785
|
-
*/
|
|
786
|
-
const CONTROL_OWNER_DEF =
|
|
787
|
-
/\b(?:function|const|class)\s+(?:RangeFilter|CompareFilter|SelectFilter|MultiSelectFilter|NumberFilter|SearchFilter|ToggleFilter|ViewTabs|FilterSet|FilterPill|EnumFilter|PanelRow|SliderControl|SyncButton|ActionGroup|OverflowMenu|CtlSlot)(?![\w])/
|
|
788
|
-
|
|
789
|
-
/**
|
|
790
|
-
* ANY import from `basalt-ui` or one of its subpaths — named, default, namespace or side-effect.
|
|
791
|
-
* A file that CONSUMES basalt is not the module that DEFINES its controls, whatever it names its
|
|
792
|
-
* own helpers; basalt's own control sources import each other relatively and never by package name.
|
|
793
|
-
*/
|
|
794
|
-
const BASALT_ANY_IMPORT = /\b(?:from|import)\s+['"]basalt-ui(?:\/[^'"]*)?['"]/
|
|
795
|
-
|
|
796
|
-
/** `@mantine/form` — a form is C1's third home, and its inputs are not filters. */
|
|
797
|
-
const MANTINE_FORM_IMPORT = /from\s+['"]@mantine\/form['"]/
|
|
798
|
-
|
|
799
|
-
// A Mantine `styles={{ input: {...} }}` per-part style — the `input` key specifically targets the
|
|
800
|
-
// rendered <input>/<textarea> part of TextInput/Select/Textarea/etc. Requires `input` be the FIRST
|
|
801
|
-
// key in the styles object (see the sub-16-input-font doc comment for the scoping trade-off this
|
|
802
|
-
// implies) so an unrelated object that happens to carry an `input` key elsewhere in consumer code
|
|
803
|
-
// is never mistaken for a Mantine per-part style. `[^}]*` stops at the first `}`, i.e. the close of
|
|
804
|
-
// the `input` sub-object (or its first nested object) — either way any fontSize inside is still
|
|
805
|
-
// genuinely part of the input's own styling.
|
|
806
|
-
const STYLES_INPUT_PART = /\bstyles\s*=\s*\{\{\s*input\s*:\s*\{([^}]*)\}/g
|
|
807
|
-
|
|
808
|
-
// A fontSize/font-size value below the 16px floor. Unitless numbers and an explicit `px` suffix
|
|
809
|
-
// both count as px (React inline-style convention); any other unit (rem/em/%) is deliberately NOT
|
|
810
|
-
// matched — ambiguous relative to a *px* floor, and matching it would risk a false positive.
|
|
811
|
-
const SUB_16_FONT_SIZE = /font-?[Ss]ize\s*:\s*['"]?(-?\d+(?:\.\d+)?)(?:px)?['"]?(?=[,\s}]|$)/g
|
|
812
|
-
|
|
813
|
-
// ── Defaults ─────────────────────────────────────────────────────────────────────────────────────
|
|
814
|
-
|
|
815
|
-
/** Default spacing steps (px) flagged as raw spacing props. */
|
|
816
|
-
/**
|
|
817
|
-
* The `xs…xl` spacing scale, as raw numbers — what `raw-spacing` flags, because a prop value that
|
|
818
|
-
* EQUALS a step should be written as the token (`p="md"`, not `p={16}`).
|
|
819
|
-
*
|
|
820
|
-
* Read from `tokens/space-scale` — the dependency-free module the token layer's scale is defined
|
|
821
|
-
* from — so the guard cannot drift from it (a separate copy once did: it read `[10, 12, 16, 20, 32]`
|
|
822
|
-
* after a retune and told consumers to replace `p={16}` with a `p="md"` worth 18). The palette itself
|
|
823
|
-
* stays out of the hook: it would drag `derive.ts` + `hct.ts`'s colour math along.
|
|
824
|
-
*
|
|
825
|
-
* A consumer whose theme moves the scale (`createBasaltTheme({ density })`, or its own overrides)
|
|
826
|
-
* sets `basalt.spacingSteps` in package.json rather than living with this default.
|
|
827
|
-
*/
|
|
828
|
-
const DEFAULT_SPACING_STEPS: readonly number[] = Object.values(SPACE_SCALE_LEVEL0).toSorted(
|
|
829
|
-
(a, b) => a - b,
|
|
830
|
-
)
|
|
831
|
-
/** Default off-identity Mantine accent families. */
|
|
832
|
-
const DEFAULT_FORBIDDEN_ACCENTS: readonly string[] = ['teal', 'violet', 'grape', 'indigo', 'pink']
|
|
833
|
-
|
|
834
|
-
/** Shared default config — CLI and tests import this to avoid duplication. */
|
|
835
|
-
export const DEFAULT_GUARD_CONFIG: GuardConfig = {
|
|
836
|
-
spacingSteps: DEFAULT_SPACING_STEPS,
|
|
837
|
-
rawRadius: true,
|
|
838
|
-
forbiddenAccents: DEFAULT_FORBIDDEN_ACCENTS,
|
|
839
|
-
mantineShadeIndex: true,
|
|
840
|
-
rawSurface: true,
|
|
841
|
-
cardWithBorder: true,
|
|
842
|
-
offSystemSurfaceVar: true,
|
|
843
|
-
rawHtmlLayout: true,
|
|
844
|
-
inlineSpacing: true,
|
|
845
|
-
inlineDisplay: true,
|
|
846
|
-
rawMotionValue: true,
|
|
847
|
-
rawFormControl: true,
|
|
848
|
-
sub16InputFont: true,
|
|
849
|
-
allowComment: 'theme-allow',
|
|
850
|
-
exemptRules: {},
|
|
851
|
-
severity: {},
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
/**
|
|
855
|
-
* A grace-ledger entry: `since` and `promote` are plain `x.y.z` semver strings (C16,
|
|
856
|
-
* `docs/CONTROLS-SPEC.md` §1). `grace.test.ts` fails the build once `package.json`'s version
|
|
857
|
-
* reaches `promote` while the entry is still here — the version-gate that replaces the honor
|
|
858
|
-
* system a bare promotion-note string used to run on. `since` must be strictly before `promote`,
|
|
859
|
-
* also asserted there.
|
|
860
|
-
*/
|
|
861
|
-
export type GraceEntry = { since: string; promote: string; why: string }
|
|
862
|
-
|
|
863
|
-
/**
|
|
864
|
-
* Kinds still inside their grace minor — reported, not fatal, until the next minor promotes them.
|
|
865
|
-
* Empty since 2.24.0: `raw-spacing` and `inline-spacing` (since 2.16.0), the last tenants, promoted.
|
|
866
|
-
* It was empty once before, at 1.36.0, when `unknown-vx-token` promoted.
|
|
867
|
-
* See {@link GuardSeverity} for the doctrine and why basalt-ui in particular needs it.
|
|
868
|
-
*
|
|
869
|
-
* Adding a kind here is part of shipping it; removing the entry IS the promotion, and belongs in
|
|
870
|
-
* its own commit so the changelog says enforcement got stricter. `grace.test.ts` is the other half
|
|
871
|
-
* of "belongs in its own commit": it fails once `package.json`'s version reaches an entry's
|
|
872
|
-
* `promote` while the entry is still here, so a kind can no longer sit at `warn` with nothing
|
|
873
|
-
* tracking it — which is exactly what happened to the five entries this ledger shipped in the
|
|
874
|
-
* round-4 guard minor (D4, `docs/CONTROLS-SPEC.md` §6): all five stayed `warn` for five minors
|
|
875
|
-
* because deleting the entry was the only enforcement, and nothing checked that anyone had.
|
|
876
|
-
*
|
|
877
|
-
* The runway is measured in consumer UPGRADES, not in version numbers: `mantine-shade-index`
|
|
878
|
-
* (the table's first tenant, promoted and gone) sat here across two minors because 1.8.0 shipped
|
|
879
|
-
* the same day as 1.7.0 and 1.9.0 carried the chart batch the same consumer was upgrading for —
|
|
880
|
-
* bundling a build-breaking promotion into the minor they take for the fixes turns a routine bump
|
|
881
|
-
* into an unplanned refactor, which is exactly what the grace minor exists to prevent.
|
|
882
|
-
*
|
|
883
|
-
* **A `SCANNABLE_EXT` widening cannot be expressed here, and 1.23.2's was deliberately not.**
|
|
884
|
-
* Adding `.astro`/`.jsx`/`.vue` widens the FILE SET for all 25 kinds at once — there is no kind to
|
|
885
|
-
* key an entry on, and the nearest one (`raw-hex`, which is what actually fired) is keyed per KIND,
|
|
886
|
-
* not per extension: an entry for it would demote basalt's most load-bearing kind to `warn` in
|
|
887
|
-
* every `.tsx` and `.css` in every consumer for a minor, to buy runway on a file type only one
|
|
888
|
-
* consumer has. `css-raw-surface` is the shape that DOES fit — the new dialect got its own kind
|
|
889
|
-
* because kebab CSS is a distinct pattern set; more files running the same patterns is not.
|
|
890
|
-
*
|
|
891
|
-
* The measurement agreed with the structure. Once the two defects the widening exposed were fixed
|
|
892
|
-
* (`{` read as a hex; `<!-- … -->` never stripped in an SFC), rollhook's marketing site scans
|
|
893
|
-
* 6 files with 0 findings, and no other consumer has a single `.astro`, `.vue` or `.jsx` file — so
|
|
894
|
-
* grace would have covered zero incumbent violations. The doctrine protects code that "passed every
|
|
895
|
-
* previous release"; a violation in a newly-scanned file type is code the consumer is writing now,
|
|
896
|
-
* with `theme-allow`, `basalt.severity` and `exemptRules` all still available.
|
|
897
|
-
*
|
|
898
|
-
* @example
|
|
899
|
-
* const GRACE: Partial<Record<GuardKind, GraceEntry>> = {
|
|
900
|
-
* 'raw-font-family': { since: '1.4.0', promote: '1.5.0', why: 'introduced 1.4.0 — …' },
|
|
901
|
-
* }
|
|
902
|
-
*/
|
|
903
|
-
export const GRACE_PERIOD_KINDS: Partial<Record<GuardKind, GraceEntry>> = {}
|
|
904
|
-
|
|
905
|
-
/** A kind's effective severity: consumer override first, then the grace table, then `error`. */
|
|
906
|
-
export function severityOf(kind: GuardKind, cfg: GuardConfig): GuardSeverity {
|
|
907
|
-
return cfg.severity?.[kind] ?? (Object.hasOwn(GRACE_PERIOD_KINDS, kind) ? 'warn' : 'error')
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
/** The `Finding.text` cap, in characters — a minified CSS line must not blow up the report. */
|
|
911
|
-
const FINDING_TEXT_MAX_LENGTH = 100
|
|
912
|
-
|
|
913
|
-
/**
|
|
914
|
-
* A finding's `text`: the trimmed source line it sits on, capped at {@link FINDING_TEXT_MAX_LENGTH}
|
|
915
|
-
* with a trailing `…`. Falls back to `fallbackToken` when `line` is out of range for the source
|
|
916
|
-
* (should not happen in practice, but a Finding's own `line` must never crash the render).
|
|
917
|
-
*/
|
|
918
|
-
function textForFinding(sourceLine: string | undefined, fallbackToken: string): string {
|
|
919
|
-
if (sourceLine === undefined) return fallbackToken
|
|
920
|
-
const trimmed = sourceLine.trim()
|
|
921
|
-
return trimmed.length > FINDING_TEXT_MAX_LENGTH
|
|
922
|
-
? `${trimmed.slice(0, FINDING_TEXT_MAX_LENGTH)}…`
|
|
923
|
-
: trimmed
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
// ── Path predicate ────────────────────────────────────────────────────────────────────────────────
|
|
927
|
-
|
|
928
|
-
function isChartFile(relPath: string): boolean {
|
|
929
|
-
return relPath.includes('/charts/')
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
/** `./` and any trailing `/` are noise — `'agent'`, `'agent/'` and `'./agent'` are one pattern. */
|
|
933
|
-
function normalizeExemptPattern(pattern: string): string {
|
|
934
|
-
return pattern.trim().replace(/^\.\//, '').replace(/\/+$/, '')
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
/** `*` stops at a `/`, `**` does not, `?` is one non-`/` character. Everything else is literal. */
|
|
938
|
-
function exemptGlobToRegExp(pattern: string): RegExp {
|
|
939
|
-
const body = pattern
|
|
940
|
-
.split(/(\*\*\/|\*\*|\*|\?)/)
|
|
941
|
-
.map((part) => {
|
|
942
|
-
if (part === '**/') return '(?:.*/)?'
|
|
943
|
-
if (part === '**') return '.*'
|
|
944
|
-
if (part === '*') return '[^/]*'
|
|
945
|
-
if (part === '?') return '[^/]'
|
|
946
|
-
return part.replace(/[.+^${}()|[\]\\]/g, '\\$&')
|
|
947
|
-
})
|
|
948
|
-
.join('')
|
|
949
|
-
return new RegExp(`^${body}$`)
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
/**
|
|
953
|
-
* Does one `exemptRules` pattern match `relPath`?
|
|
954
|
-
*
|
|
955
|
-
* Two shapes, tried in the order a consumer reaches for them:
|
|
956
|
-
*
|
|
957
|
-
* 1. **A relative path** — `public/site.webmanifest` for one file, `public` or `src/agent` for
|
|
958
|
-
* everything under a directory.
|
|
959
|
-
* 2. **A glob** — `public/*.webmanifest`, `**\/*.module.css`; a glob with no `/` in it is also
|
|
960
|
-
* tried against the BASENAME, so `*.module.css` works the way `site.webmanifest` does.
|
|
961
|
-
* A bare segment (`agent`) is not a shape: it matches only a root-level path. A pattern that
|
|
962
|
-
* matches nothing is reported by {@link unmatchedExemptPatterns}, never silently ignored.
|
|
963
|
-
*/
|
|
964
|
-
function exemptPatternMatches(pattern: string, relPath: string): boolean {
|
|
965
|
-
const p = normalizeExemptPattern(pattern)
|
|
966
|
-
if (p === '') return false
|
|
967
|
-
if (relPath === p || relPath.startsWith(`${p}/`)) return true
|
|
968
|
-
if (!/[*?]/.test(p)) return false
|
|
969
|
-
const re = exemptGlobToRegExp(p)
|
|
970
|
-
return re.test(relPath) || (!p.includes('/') && re.test(relPath.split('/').pop() ?? ''))
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* Whether `kind` is exempted at `relPath` via `cfg.exemptRules` — the config-driven, per-rule
|
|
975
|
-
* counterpart to `isChartFile`'s hardcoded path scoping.
|
|
976
|
-
*/
|
|
977
|
-
export function isRuleExempt(
|
|
978
|
-
kind: GuardKind,
|
|
979
|
-
relPath: string,
|
|
980
|
-
exemptRules: GuardConfig['exemptRules'],
|
|
981
|
-
): boolean {
|
|
982
|
-
const patterns = exemptRules?.[kind]
|
|
983
|
-
if (patterns === undefined || patterns.length === 0) return false
|
|
984
|
-
return patterns.some((pattern) => exemptPatternMatches(pattern, relPath))
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
/** One `exemptRules` entry that suppressed nothing, and why — see {@link unmatchedExemptPatterns}. */
|
|
988
|
-
export type UnmatchedExemptPattern = {
|
|
989
|
-
readonly kind: string
|
|
990
|
-
readonly pattern: string
|
|
991
|
-
readonly reason: 'unknown-kind' | 'no-match'
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
/**
|
|
995
|
-
* Every `exemptRules` entry that matched no scanned file, so a run can say so instead of passing.
|
|
996
|
-
*
|
|
997
|
-
* An exemption is a claim ("this rule does not apply here"), and a claim that resolves to nothing is
|
|
998
|
-
* not harmless — it reads as coverage in a config review while enforcing exactly as much as an empty
|
|
999
|
-
* object. rollhook's `["public/site.webmanifest"]` was correct, matched nothing under the
|
|
1000
|
-
* segments-only matcher, and reported no diagnostic; the finding it was written for kept failing the
|
|
1001
|
-
* build with the config sitting right there looking like the answer. A silent no-op exemption is the
|
|
1002
|
-
* same false-green family as a guard that reports green while enforcing nothing.
|
|
1003
|
-
*
|
|
1004
|
-
* Called once per run by the CLI with every relative path it scanned. Kind keys are checked too: a
|
|
1005
|
-
* typo'd kind name is an exemption for a rule that does not exist.
|
|
1006
|
-
*/
|
|
1007
|
-
export function unmatchedExemptPatterns(
|
|
1008
|
-
cfg: GuardConfig,
|
|
1009
|
-
scannedRelPaths: readonly string[],
|
|
1010
|
-
): UnmatchedExemptPattern[] {
|
|
1011
|
-
const out: UnmatchedExemptPattern[] = []
|
|
1012
|
-
for (const [kind, patterns] of Object.entries(cfg.exemptRules ?? {})) {
|
|
1013
|
-
const known = Object.hasOwn(GUARD_RULES, kind)
|
|
1014
|
-
for (const pattern of patterns ?? []) {
|
|
1015
|
-
if (!known) {
|
|
1016
|
-
out.push({ kind, pattern, reason: 'unknown-kind' })
|
|
1017
|
-
continue
|
|
1018
|
-
}
|
|
1019
|
-
if (scannedRelPaths.some((relPath) => exemptPatternMatches(pattern, relPath))) continue
|
|
1020
|
-
out.push({ kind, pattern, reason: 'no-match' })
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
return out
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
// ── theme-allow annotations ──────────────────────────────────────────────────────────────────────
|
|
1027
|
-
|
|
1028
|
-
/**
|
|
1029
|
-
* The oxlint plugin's rule ids. Not guard kinds — they can never suppress a `checkSource` finding —
|
|
1030
|
-
* but they ARE valid ids in a `theme-allow`, so an annotation scoped to one of them must parse as
|
|
1031
|
-
* accountable rather than be reported as unscoped. Kept as a literal list because the plugin is a
|
|
1032
|
-
* standalone `.js` file this module must not import (see the plugin's own header).
|
|
1033
|
-
*
|
|
1034
|
-
* Exported for `check-theme --audit-allows`: an annotation naming one of these is outside the
|
|
1035
|
-
* guard's reach, and judging it needs a `oxlint` run rather than a `checkSource` one. Keep in step
|
|
1036
|
-
* with the plugin's own `KNOWN_RULE_IDS`; `configs/oxlint-plugin.test.ts` asserts the two agree.
|
|
1037
|
-
*/
|
|
1038
|
-
export const PLUGIN_RULE_IDS: ReadonlySet<string> = new Set([
|
|
1039
|
-
'no-raw-font-size',
|
|
1040
|
-
'raw-size-literal',
|
|
1041
|
-
'card-inset',
|
|
1042
|
-
'chart-in-raw-surface',
|
|
1043
|
-
'hand-rolled-shell',
|
|
1044
|
-
'shadow-basalt-export',
|
|
1045
|
-
'raw-scroll-container',
|
|
1046
|
-
'hand-rolled-filter',
|
|
1047
|
-
'control-outside-home',
|
|
1048
|
-
// No text-lane twin, by design: a bound control's NAME says nothing without the import graph
|
|
1049
|
-
// and the ancestry, which a 12-line regex window has neither of. See the rule's own JSDoc.
|
|
1050
|
-
'bound-control-outside-home',
|
|
1051
|
-
'control-size-literal',
|
|
1052
|
-
'responsive-twin',
|
|
1053
|
-
'search-literal-link',
|
|
1054
|
-
'use-search-from-literal',
|
|
1055
|
-
// The remaining F5 rules — all AST-only, all outside
|
|
1056
|
-
// `checkSource`'s reach: provenance here is an import graph and a JSX ancestry, neither of which
|
|
1057
|
-
// a 12-line regex window has. Same reason `bound-control-outside-home` has no text-lane twin.
|
|
1058
|
-
'query-fn-unwrap',
|
|
1059
|
-
// Same lane: `{...inputProps(…)}` without a sibling `key` is a JSX-ancestry claim (does this
|
|
1060
|
-
// ELEMENT carry a `key` attribute?) over an import-resolved callee — neither is text.
|
|
1061
|
-
'forms-field-key',
|
|
1062
|
-
// `in-body-page-title` is deliberately ABSENT: it is a plugin rule AND a guard kind under one id
|
|
1063
|
-
// (one law, two lanes, one annotation), and this set is the ids OUTSIDE `checkSource`'s reach.
|
|
1064
|
-
// `check-source.test.ts` asserts the two registries stay disjoint.
|
|
1065
|
-
'chart-engine-boundary',
|
|
1066
|
-
'chart-host-single',
|
|
1067
|
-
'token-layer-boundary',
|
|
1068
|
-
'no-import-meta-env',
|
|
1069
|
-
// AST-only, same reason as `bound-control-outside-home`: a responsive-object prop, a shell-home
|
|
1070
|
-
// exemption and a hook import all need the import graph and JSX ancestry, neither of which a
|
|
1071
|
-
// 12-line text window has. `raw-media-query` is its CSS-text twin and lives in `GUARD_RULES`.
|
|
1072
|
-
'raw-breakpoint',
|
|
1073
|
-
'no-dev-helper',
|
|
1074
|
-
// AST-only: a `<ViewTransition>` ancestor of `<Outlet>` is a JSX-ancestry claim over two import-resolved names.
|
|
1075
|
-
'route-view-transition',
|
|
1076
|
-
// AST-only: a text-colour position (`c=`, a `style` object's `color`) is a JSX/property claim over a member chain.
|
|
1077
|
-
'status-fill-as-text',
|
|
1078
|
-
// These two honour `basalt-agent-allow`, never `theme-allow` — but they are still REAL ids, so
|
|
1079
|
-
// a `theme-allow ai-sdk-major` must parse as a (useless) scoped annotation rather than as prose.
|
|
1080
|
-
'agent-no-raw-usechat',
|
|
1081
|
-
'ai-sdk-major',
|
|
1082
|
-
// Retired guard kinds — `unframed-chart`'s only case (a hand-written legend array) died with
|
|
1083
|
-
// the public legend component (2.0). Kept here (mirrored by the plugin's own
|
|
1084
|
-
// `RETIRED_RULE_IDS`) so an existing `theme-allow unframed-chart` reads as a dead waiver via
|
|
1085
|
-
// `--audit-allows`, never as an unknown-id typo.
|
|
1086
|
-
'unframed-chart',
|
|
1087
|
-
// Retired in 2.0 (V2-SPEC § 9.8): the visx lint/guard layer. Mirrored by the plugin's own
|
|
1088
|
-
// `RETIRED_RULE_IDS`.
|
|
1089
|
-
'visx-boundary',
|
|
1090
|
-
'visx-tooltip',
|
|
1091
|
-
'hand-rolled-plot',
|
|
1092
|
-
'chart-legend-literal',
|
|
1093
|
-
'raw-visx-axis',
|
|
1094
|
-
'chart-missing-aria-label',
|
|
1095
|
-
// Retired plugin rule — `<BasaltNotifications />` mounted beside `<BasaltOverlays
|
|
1096
|
-
// notifications>` is unreachable now that `BasaltNotifications` no longer exists as a
|
|
1097
|
-
// standalone export. Mirrored by the plugin's own `RETIRED_RULE_IDS`.
|
|
1098
|
-
'duplicate-notifications-mount',
|
|
1099
|
-
// Retired plugin rule — its whole premise (a raw `@tanstack/react-query` import beside
|
|
1100
|
-
// `basalt-ui/query`) is unreachable now that C1 (1.29.0) dropped the `./query` subpath.
|
|
1101
|
-
// Mirrored by the plugin's own `RETIRED_RULE_IDS`.
|
|
1102
|
-
'query-dual-import',
|
|
1103
|
-
// Retired in 2.0 (V2-SPEC § 3): the concern is unrepresentable. Mirrored by the plugin's
|
|
1104
|
-
// `RETIRED_RULE_IDS`.
|
|
1105
|
-
'provider-above-router',
|
|
1106
|
-
'page-bar-budget',
|
|
1107
|
-
'agent-resume-guard',
|
|
1108
|
-
'deprecated-export',
|
|
1109
|
-
])
|
|
1110
|
-
|
|
1111
|
-
/**
|
|
1112
|
-
* ONE LAW, TWO RULE IDS — the ids that waive each other, in BOTH directions.
|
|
1113
|
-
*
|
|
1114
|
-
* `raw-selection-control` (this lane) and `basalt/control-outside-home` (the oxlint plugin) are the
|
|
1115
|
-
* same law read by two engines, and this lane's own message already says so. They keep separate ids
|
|
1116
|
-
* because the two engines disagree often enough that a consumer needs to be able to name which one
|
|
1117
|
-
* they are waiving — but a consumer waiving the LAW should not have to know that, and before this
|
|
1118
|
-
* map they did: `theme-allow control-outside-home` parsed here (the plugin's ids are all known,
|
|
1119
|
-
* see {@link PLUGIN_RULE_IDS}) and then covered nothing, so the only working annotation was
|
|
1120
|
-
* `theme-allow raw-selection-control control-outside-home` — two ids, undocumented, one silent
|
|
1121
|
-
* debug cycle per consumer. `in-body-page-title` needs no entry: it is one id in both lanes.
|
|
1122
|
-
*
|
|
1123
|
-
* Mirrored VERBATIM in `configs/oxlint-plugin.js` (which cannot import from this package — see its
|
|
1124
|
-
* header); `check-source.test.ts` asserts the two agree. An alias only ever WIDENS what an
|
|
1125
|
-
* annotation covers, so a waiver can never become stricter by being spelled the other way.
|
|
1126
|
-
*/
|
|
1127
|
-
export const WAIVER_ID_ALIASES: Readonly<Record<string, readonly string[]>> = {
|
|
1128
|
-
'control-outside-home': ['raw-selection-control'],
|
|
1129
|
-
'raw-selection-control': ['control-outside-home'],
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
/**
|
|
1133
|
-
* The ids that are a guard kind AND an oxlint plugin rule — one law, two lanes, one annotation.
|
|
1134
|
-
* {@link PLUGIN_RULE_IDS} leaves them out by design, so `--audit-allows` would otherwise never ask
|
|
1135
|
-
* oxlint about them. `waiver-audit.test.ts` pins this against the plugin's own rule table.
|
|
1136
|
-
*/
|
|
1137
|
-
const DUAL_LANE_IDS: ReadonlySet<string> = new Set(['in-body-page-title'])
|
|
1138
|
-
|
|
1139
|
-
/** The shortest string accepted as a written reason — enough to exclude a stray separator. */
|
|
1140
|
-
const MIN_ALLOW_REASON_LENGTH = 4
|
|
1141
|
-
|
|
1142
|
-
/**
|
|
1143
|
-
* How far one annotation reaches.
|
|
1144
|
-
*
|
|
1145
|
-
* `line` is the default and covers the placements in {@link collectAllowAnnotations}. `file` is the
|
|
1146
|
-
* whole-file declaration, and it has to be SPELLED (`theme-allow-file`) rather than inferred: at
|
|
1147
|
-
* 1.20.0 a `theme-allow <id> — <reason>` written anywhere in a file was silently promoted to a file
|
|
1148
|
-
* declaration by the oxlint plugin, so naming a rule AND giving a reason — the exact shape the
|
|
1149
|
-
* guard's own message asks for — was the only legal annotation and it was always whole-file. A
|
|
1150
|
-
* consumer who wanted to waive one node and stay policed on the rest could not say so.
|
|
1151
|
-
*/
|
|
1152
|
-
type AllowScope = 'line' | 'file'
|
|
1153
|
-
|
|
1154
|
-
/**
|
|
1155
|
-
* One parsed `theme-allow` annotation.
|
|
1156
|
-
*
|
|
1157
|
-
* `rules` empty AND `unknownRules` empty is the bare form: it covers nothing (see
|
|
1158
|
-
* {@link annotationCovers}).
|
|
1159
|
-
* `unknownRules` holds words that occupied the rule-id slot but name no rule — a typo. Its presence
|
|
1160
|
-
* is what makes the parse FAIL CLOSED: `theme-allow raw-hexx — reason` used to consume no id, fall
|
|
1161
|
-
* through to `rules: []`, and be read as the blanket form, so one mistyped character escalated a
|
|
1162
|
-
* scoped waiver into a whole-line one. A waiver that names a rule must never be more permissive
|
|
1163
|
-
* than the same waiver spelled correctly.
|
|
1164
|
-
*/
|
|
1165
|
-
type AllowAnnotation = {
|
|
1166
|
-
readonly rules: readonly string[]
|
|
1167
|
-
readonly unknownRules: readonly string[]
|
|
1168
|
-
readonly hasReason: boolean
|
|
1169
|
-
readonly scope: AllowScope
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
/** One annotation at the (1-based) line it was WRITTEN on — where `theme-allow-unscoped` reports. */
|
|
1173
|
-
type AllowDeclaration = { readonly line: number; readonly annotation: AllowAnnotation }
|
|
1174
|
-
|
|
1175
|
-
/**
|
|
1176
|
-
* Parse the text following the allow token on one line.
|
|
1177
|
-
*
|
|
1178
|
-
* The grammar is `theme-allow [<rule-id>[, <rule-id>]…] [<separator>] <reason>`. Ids are consumed
|
|
1179
|
-
* while they are KNOWN (a guard kind or a plugin rule, optionally `basalt/`-prefixed). A word that
|
|
1180
|
-
* occupies the id slot but names no rule ENDS the list as an UNKNOWN id rather than starting the
|
|
1181
|
-
* reason — see {@link AllowAnnotation.unknownRules} for why that direction is the safe one.
|
|
1182
|
-
*
|
|
1183
|
-
* A prose reason therefore has to be introduced the way every annotation in the wild already writes
|
|
1184
|
-
* it — with a separator (`—`, `–`, `-`, `:`) — which is what keeps `theme-allow: bespoke mono
|
|
1185
|
-
* micro-label` a blanket waiver while `theme-allow raw-hexx — …` waives nothing.
|
|
1186
|
-
*
|
|
1187
|
-
* **The id slot closes at the first space that no comma opened.** The FIRST word after the token
|
|
1188
|
-
* always sits in the id slot, because that is where a typo'd id lands and failing closed there is
|
|
1189
|
-
* the whole point. After a resolved id, only a `,` keeps the list open: an unknown word arriving
|
|
1190
|
-
* across a comma is a claimed id (`raw-hex, raw-surfacee`) and gets recorded, an unknown word
|
|
1191
|
-
* arriving across a space is prose (`raw-surface sub-scale legend corner`, one em-dash away from
|
|
1192
|
-
* annotations this package itself ships) and starts the reason. Reporting the second as a typo was
|
|
1193
|
-
* a live false-positive class on a waiver that was in fact scoped and reasoned.
|
|
1194
|
-
*
|
|
1195
|
-
* `Object.hasOwn`, not `in`: `in` walks the prototype chain, so a reason beginning with the word
|
|
1196
|
-
* `constructor` (or `toString`, `valueOf`, …) resolved as a real rule id and silently scoped the
|
|
1197
|
-
* waiver to a kind that does not exist.
|
|
1198
|
-
*/
|
|
1199
|
-
function parseAllowAnnotation(rest: string, scope: AllowScope): AllowAnnotation {
|
|
1200
|
-
const rules: string[] = []
|
|
1201
|
-
const unknownRules: string[] = []
|
|
1202
|
-
let remainder = rest.replace(/^[\s,]+/, '')
|
|
1203
|
-
let inIdSlot = true
|
|
1204
|
-
for (;;) {
|
|
1205
|
-
const token = /^(?:basalt\/)?([a-z][a-z0-9-]*)(?=$|[\s,:—–])/.exec(remainder)
|
|
1206
|
-
const id = token?.[1]
|
|
1207
|
-
if (token === null || id === undefined) break
|
|
1208
|
-
if (!(Object.hasOwn(GUARD_RULES, id) || PLUGIN_RULE_IDS.has(id))) {
|
|
1209
|
-
if (inIdSlot) unknownRules.push(id)
|
|
1210
|
-
break
|
|
1211
|
-
}
|
|
1212
|
-
rules.push(id)
|
|
1213
|
-
const after = remainder.slice(token[0].length)
|
|
1214
|
-
remainder = after.replace(/^[\s,]+/, '')
|
|
1215
|
-
inIdSlot = /^\s*,/.test(after)
|
|
1216
|
-
}
|
|
1217
|
-
const reason = remainder.replace(/^(?:—|–|-{1,2}|:)\s*/, '').trim()
|
|
1218
|
-
return { rules, unknownRules, hasReason: reason.length >= MIN_ALLOW_REASON_LENGTH, scope }
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
/** How far back a trailing CSS annotation reaches for the declaration it terminates. */
|
|
1222
|
-
const MAX_CSS_CONTINUATION_LINES = 8
|
|
1223
|
-
|
|
1224
|
-
/**
|
|
1225
|
-
* The 0-based line the annotation's OWN comment closes on.
|
|
1226
|
-
*
|
|
1227
|
-
* A comment-only annotation waives the first line below its comment that is not itself comment, so
|
|
1228
|
-
* the walk needs to know how far the annotation's own comment reaches. It used to substitute a
|
|
1229
|
-
* budget — walk forward at most eight lines — which was wrong in two ways nothing could see:
|
|
1230
|
-
*
|
|
1231
|
-
* 1. **A comment block longer than the budget.** A docblock with ~12 lines of reason between the
|
|
1232
|
-
* token and its `*\/` ran the walk out before it reached the code, while the oxlint plugin
|
|
1233
|
-
* (which reads the comment NODE, so length is free) waived it. Nothing about the shape said so;
|
|
1234
|
-
* the annotation just stopped working past a line count nobody could count.
|
|
1235
|
-
* 2. **A blank line inside the block.** Outside a comment a blank line SEPARATES — it is how people
|
|
1236
|
-
* say "this comment is not about the next statement" — but a blank gutter line in the middle of
|
|
1237
|
-
* a docblock is just prose, and ending the walk there dropped the waiver.
|
|
1238
|
-
*
|
|
1239
|
-
* Knowing where the comment ends settles both: inside it, keep going; past it, the ordinary
|
|
1240
|
-
* comment-run rules apply (see the walk in {@link collectAllowAnnotations}, and
|
|
1241
|
-
* {@link isCommentOnly} for the third hole this pass closed).
|
|
1242
|
-
*
|
|
1243
|
-
* An unterminated block comment reports its own line — the conservative answer for a file that does
|
|
1244
|
-
* not parse anyway, and it keeps the walk from running to EOF.
|
|
1245
|
-
*/
|
|
1246
|
-
function commentBlockEnd(
|
|
1247
|
-
lines: readonly string[],
|
|
1248
|
-
index: number,
|
|
1249
|
-
tokenAt: number,
|
|
1250
|
-
syntax: GuardSyntax,
|
|
1251
|
-
): number {
|
|
1252
|
-
const line = lines[index] ?? ''
|
|
1253
|
-
// An SFC carries both dialects, so the closer is resolved from the opener the token actually sits
|
|
1254
|
-
// behind rather than from the extension: whichever of `<!--` / `/*` is NEAREST on its left wins.
|
|
1255
|
-
const markup = syntax === 'markup' || (syntax === 'sfc' && opensMarkupComment(line, tokenAt))
|
|
1256
|
-
// A line comment closes at its own end of line. CSS has no `//`, so the test is TS-only: there,
|
|
1257
|
-
// a `//`-looking sequence is text and the conservative same-line answer is the right one anyway.
|
|
1258
|
-
if (!markup && syntax !== 'css' && /\/\/\s*$/.test(line.slice(0, tokenAt))) return index
|
|
1259
|
-
const closer = markup ? '-->' : '*/'
|
|
1260
|
-
if (line.slice(tokenAt).includes(closer)) return index
|
|
1261
|
-
for (let ahead = index + 1; ahead < lines.length; ahead++) {
|
|
1262
|
-
if ((lines[ahead] ?? '').includes(closer)) return ahead
|
|
1263
|
-
}
|
|
1264
|
-
return index
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
/**
|
|
1268
|
-
* In an `sfc` file, is the comment the token sits in an HTML one?
|
|
1269
|
-
*
|
|
1270
|
-
* Both dialects are legal in the same file, so the extension cannot answer it — the nearest opener
|
|
1271
|
-
* on the token's left does. A tie (neither present) reads as the JS dialect, which is what an
|
|
1272
|
-
* annotation on a bare frontmatter line is.
|
|
1273
|
-
*/
|
|
1274
|
-
function opensMarkupComment(line: string, tokenAt: number): boolean {
|
|
1275
|
-
const before = line.slice(0, tokenAt)
|
|
1276
|
-
return before.lastIndexOf('<!--') > before.lastIndexOf('/*')
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
/**
|
|
1280
|
-
* A comment opener sitting immediately before the annotation token.
|
|
1281
|
-
*
|
|
1282
|
-
* `stripComments` is the primary evidence that an occurrence is inside a comment, but it is
|
|
1283
|
-
* deliberately biased toward treating an ambiguous `/` as division (see its own doc), and JSX makes
|
|
1284
|
-
* that bias fire constantly: in `<Box p={18} /> // theme-allow` the `/` of `/>` follows a `}`, so
|
|
1285
|
-
* the stripper reads a regex literal and the trailing comment survives unstripped. This prefix test
|
|
1286
|
-
* is the second witness — cheap, local, and exact for every shape that actually occurs.
|
|
1287
|
-
*/
|
|
1288
|
-
const COMMENT_OPENER_BEFORE = /(?:\/\/|\/\*|<!--)\s*$/
|
|
1289
|
-
|
|
1290
|
-
/** A line that is NOTHING but a comment — the placement that waives the line below it. */
|
|
1291
|
-
const COMMENT_ONLY_LINE = /^\s*(?:\{\s*\/\*|\/\/|\/\*|\*|<!--)/
|
|
1292
|
-
|
|
1293
|
-
/**
|
|
1294
|
-
* A JSX expression container closing immediately after the comment that filled it — the `*\/}` of a
|
|
1295
|
-
* `{/* … *\/}` whose annotation wrapped onto its own line.
|
|
1296
|
-
*
|
|
1297
|
-
* `stripComments` blanks the comment and leaves the bare `}` behind, so the line read as CODE and
|
|
1298
|
-
* the annotation was classified TRAILING — scoped to a line that holds nothing but a brace, and
|
|
1299
|
-
* therefore waiving nothing. That is the shape linewatch writes for every hand-composed chart axis
|
|
1300
|
-
* (`{/*` on one line, the annotation and `*\/}` on the next), which worked only because the rules it
|
|
1301
|
-
* names live in the oxlint plugin, whose own placement test is comment-node-based and never saw the
|
|
1302
|
-
* brace. Any guard kind annotated this way was silently unwaivable.
|
|
1303
|
-
*
|
|
1304
|
-
* Deliberately narrow: the `}` must abut the comment CLOSE. A `}` that is real code (`} // theme-
|
|
1305
|
-
* allow …` closing a block) keeps its trailing classification, so the annotation stays on its own
|
|
1306
|
-
* line rather than reaching the statement below.
|
|
1307
|
-
*/
|
|
1308
|
-
const JSX_COMMENT_CLOSE = /\*\/\s*\}\s*$/
|
|
1309
|
-
|
|
1310
|
-
/**
|
|
1311
|
-
* Is this line NOTHING but comment? — one definition, used both to classify the annotation's own
|
|
1312
|
-
* line (own-line vs trailing) and to walk the lines under it.
|
|
1313
|
-
*
|
|
1314
|
-
* The two used to be written out separately, and the walk's copy was the one missing the
|
|
1315
|
-
* {@link JSX_COMMENT_CLOSE} clause: a `*\/}` alone on its line read as the code `}`, so the walk
|
|
1316
|
-
* stopped ON the closer and the annotation waived a brace. Two consumers isolated that
|
|
1317
|
-
* independently — `{/* … *\/}` and `{/** … *\/}` — each with a probe pair differing by one newline,
|
|
1318
|
-
* while the oxlint plugin (whose test is comment-node-based and never sees the brace) waived both.
|
|
1319
|
-
* A shared predicate is what stops the two placements from drifting apart again.
|
|
1320
|
-
*/
|
|
1321
|
-
function isCommentOnly(raw: string, stripped: string): boolean {
|
|
1322
|
-
const code = stripped.trim()
|
|
1323
|
-
return code === '' || COMMENT_ONLY_LINE.test(raw) || (code === '}' && JSX_COMMENT_CLOSE.test(raw))
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
/**
|
|
1327
|
-
* Everything allowed between the comment opener (or the start of the line) and the annotation
|
|
1328
|
-
* token, for the token to count as an ANNOTATION rather than prose that mentions one.
|
|
1329
|
-
*
|
|
1330
|
-
* **This gates WAIVING as well as reporting.** It used to gate only `theme-allow-unscoped`, on the
|
|
1331
|
-
* argument that a stricter waiver could take a build down over comment placement. The cost of that
|
|
1332
|
-
* asymmetry was the opposite and worse: a comment that merely MENTIONS the token in prose parsed as
|
|
1333
|
-
* the bare blanket form and switched every kind off on the line below it. linewatch documented its
|
|
1334
|
-
* own waivers in a docblock and thereby disarmed the file — the third hole found in this contract
|
|
1335
|
-
* in two rounds, and the only one that was a false NEGATIVE.
|
|
1336
|
-
*
|
|
1337
|
-
* So an annotation must START its comment, or start a line inside one: after `//`, `/*` (or a
|
|
1338
|
-
* docblock's `/**`), `<!--`, a block-comment gutter `*`, or nothing but leading whitespace.
|
|
1339
|
-
* Everything a consumer actually writes qualifies; a sentence about the escape hatch does not.
|
|
1340
|
-
*
|
|
1341
|
-
* `/**` is in the alternation because the oxlint plugin's copy of this test always accepted it and
|
|
1342
|
-
* this one did not: a one-line `/** theme-allow raw-hex — why *\/` waived under `oxlint` and
|
|
1343
|
-
* reported under `check-theme`. The two halves of one contract must not disagree about what an
|
|
1344
|
-
* annotation IS — only about which rules each can judge.
|
|
1345
|
-
*
|
|
1346
|
-
* What the annotation then WAIVES is a separate, fail-closed question — see
|
|
1347
|
-
* {@link parseAllowAnnotation}. A word in the id slot that names no rule waives nothing, so
|
|
1348
|
-
* `// theme-allow legacy vendor asset` (a prose reason with no separator introducing it) no longer
|
|
1349
|
-
* suppresses. That IS a break, deliberately: the alternative is one mistyped character silently
|
|
1350
|
-
* widening a scoped waiver into a blanket one. No consumer writes that shape today — every
|
|
1351
|
-
* annotation across all seven repos introduces its reason with `—`, `–`, `-` or `:` — which is why
|
|
1352
|
-
* it ships as a documented break rather than a `GRACE_PERIOD_KINDS` entry. Grace could not express
|
|
1353
|
-
* it anyway: the kind that fires is the UNSUPPRESSED one (`raw-hex`), not `theme-allow-unscoped`,
|
|
1354
|
-
* and downgrading `raw-hex` to waive-by-default is the hole this closed.
|
|
1355
|
-
*/
|
|
1356
|
-
const ANNOTATION_PREFIX = /(?:^|\/\/|\/\*\*?|<!--|^\s*\*)\s*$/
|
|
1357
|
-
|
|
1358
|
-
/** Escape a config-supplied string for literal use inside a RegExp. */
|
|
1359
|
-
function escapeRegExp(value: string): string {
|
|
1360
|
-
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
/**
|
|
1364
|
-
* The annotation token itself, with its optional `-file` suffix.
|
|
1365
|
-
*
|
|
1366
|
-
* `(?![\w-])` is what keeps the two forms apart and keeps a longer word from being read as the bare
|
|
1367
|
-
* form: `theme-allow-file` is the file declaration, `theme-allow-unscoped` (the KIND NAME, written
|
|
1368
|
-
* in prose constantly) is neither — before this it consumed no id, fell through to `rules: []` and
|
|
1369
|
-
* parsed as a blanket waiver.
|
|
1370
|
-
*/
|
|
1371
|
-
function allowTokenRe(allowComment: string): RegExp {
|
|
1372
|
-
return new RegExp(`${escapeRegExp(allowComment)}(-file)?(?![\\w-])`, 'g')
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
/**
|
|
1376
|
-
* The JSON dialect of the annotation — `"basalt:theme-allow-file": "<ids> — <why>"`.
|
|
1377
|
-
*
|
|
1378
|
-
* JSON has no comments, so from 1.20.0 (when the scan reached `.webmanifest` / `.json`) every
|
|
1379
|
-
* finding in that file class was permanently unwaivable and the printed remedy prescribed a comment
|
|
1380
|
-
* the file cannot carry. Two consumers were pushed into a blanket `exemptRules` entry instead — the
|
|
1381
|
-
* un-reviewable shape this contract exists to retire. A member key is the one annotation JSON can
|
|
1382
|
-
* hold, it carries ids and a reason exactly like the comment form, and every manifest consumer
|
|
1383
|
-
* ignores members it does not know.
|
|
1384
|
-
*/
|
|
1385
|
-
function jsonAllowKeyRe(allowComment: string): RegExp {
|
|
1386
|
-
return new RegExp(`"basalt:${escapeRegExp(allowComment)}(-file)?"\\s*:\\s*"([^"]*)"`, 'g')
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
/**
|
|
1390
|
-
* Every line an allow annotation WAIVES, keyed by 0-based line index, plus the file-scoped
|
|
1391
|
-
* declarations and every annotation as WRITTEN (for `theme-allow-unscoped`).
|
|
1392
|
-
*
|
|
1393
|
-
* **The grammar, in full:**
|
|
1394
|
-
*
|
|
1395
|
-
* ```text
|
|
1396
|
-
* theme-allow → this placement, EVERY kind (reports unscoped)
|
|
1397
|
-
* theme-allow <id>[, <id>…] [— <why>] → this placement, those kinds (unscoped without a why)
|
|
1398
|
-
* theme-allow-file <id>[, <id>…] — <why> → the WHOLE FILE, those kinds
|
|
1399
|
-
* "basalt:theme-allow[-file]": "<id>… — <why>" → the same two, for JSON/.webmanifest
|
|
1400
|
-
* ```
|
|
1401
|
-
*
|
|
1402
|
-
* Three rules make it unambiguous: the token must START its comment (see {@link ANNOTATION_PREFIX});
|
|
1403
|
-
* `-file` is part of the token, not the first word of the reason (see {@link allowTokenRe}); and a
|
|
1404
|
-
* bare `theme-allow-file` waives NOTHING, because whole-file blanket immunity off one unnamed
|
|
1405
|
-
* comment is the exact thing this contract exists to price (see {@link annotationCovers}).
|
|
1406
|
-
*
|
|
1407
|
-
* Line scope has three placements, each one a shape people actually write — and the union of them
|
|
1408
|
-
* is what makes the escape survive a formatter.
|
|
1409
|
-
*
|
|
1410
|
-
* 1. **Its own line.** The original rule, unchanged.
|
|
1411
|
-
* 2. **The first CODE line below, when the annotation line is a comment and nothing else.** This is
|
|
1412
|
-
* the placement the oxlint plugin has always honored and the only one JSX can express: the
|
|
1413
|
-
* reported line is usually a multi-line opening tag or a `{expr}` child, where a trailing `//` is
|
|
1414
|
-
* a syntax error or renders as visible text. Requiring the annotation line to be comment-ONLY is
|
|
1415
|
-
* what keeps a TRAILING comment scoped to its own line — otherwise
|
|
1416
|
-
* `const a = '#f00' // theme-allow` would silently waive the next line too. The rest of the
|
|
1417
|
-
* comment BLOCK is walked through rather than counted as the target line: a docblock's `*\/`, or
|
|
1418
|
-
* a reason that wrapped onto a second line, used to absorb the whole waiver and the natural
|
|
1419
|
-
* shape silently waived nothing. A blank line ends the block — that separation is how people say
|
|
1420
|
-
* "this comment is not about the next statement".
|
|
1421
|
-
* 3. **The rest of the CSS declaration it terminates.** The shipped `oxfmt` reflows
|
|
1422
|
-
* `background-color: var(--x, #232326); /* theme-allow *\/` into four lines with the hex on one
|
|
1423
|
-
* and the comment on another — two shipped tools pulling in opposite directions, and the
|
|
1424
|
-
* exception silently stopped working. Walking back over the continuation lines (stopping at the
|
|
1425
|
-
* first `;` / `{` / `}`, which CSS actually has) restores it. Deliberately CSS-only: oxfmt emits
|
|
1426
|
-
* NO semicolons in TS, so there is no statement terminator to stop at and the same walk would
|
|
1427
|
-
* waive arbitrary code above.
|
|
1428
|
-
*
|
|
1429
|
-
* An occurrence only counts when it sits inside a COMMENT, which is read off the stripped text:
|
|
1430
|
-
* `stripComments` replaces comment characters 1:1 with spaces, so a position that is non-space in
|
|
1431
|
-
* the source and space in the stripped copy was a comment. That is what keeps a `'theme-allow'`
|
|
1432
|
-
* inside a string literal (or in this file's own rule table) from silently disabling a rule.
|
|
1433
|
-
*/
|
|
1434
|
-
function collectAllowAnnotations(
|
|
1435
|
-
lines: readonly string[],
|
|
1436
|
-
codeLines: readonly string[],
|
|
1437
|
-
allowComment: string,
|
|
1438
|
-
syntax: GuardSyntax,
|
|
1439
|
-
): {
|
|
1440
|
-
waivers: Map<number, AllowAnnotation[]>
|
|
1441
|
-
fileScoped: AllowAnnotation[]
|
|
1442
|
-
declared: AllowDeclaration[]
|
|
1443
|
-
} {
|
|
1444
|
-
const byLine = new Map<number, AllowAnnotation[]>()
|
|
1445
|
-
const fileScoped: AllowAnnotation[] = []
|
|
1446
|
-
const declared: AllowDeclaration[] = []
|
|
1447
|
-
const add = (index: number, annotation: AllowAnnotation): void => {
|
|
1448
|
-
const list = byLine.get(index) ?? []
|
|
1449
|
-
list.push(annotation)
|
|
1450
|
-
byLine.set(index, list)
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
/** Place one parsed annotation: file declarations reach everywhere, line ones the 3 placements. */
|
|
1454
|
-
const record = (
|
|
1455
|
-
index: number,
|
|
1456
|
-
annotation: AllowAnnotation,
|
|
1457
|
-
trailing: boolean,
|
|
1458
|
-
tokenAt: number,
|
|
1459
|
-
): void => {
|
|
1460
|
-
declared.push({ line: index + 1, annotation })
|
|
1461
|
-
if (annotation.scope === 'file') {
|
|
1462
|
-
fileScoped.push(annotation)
|
|
1463
|
-
return
|
|
1464
|
-
}
|
|
1465
|
-
add(index, annotation)
|
|
1466
|
-
if (!trailing) {
|
|
1467
|
-
// The first CODE line below the comment. A docblock's `*/` (or the rest of a wrapped reason)
|
|
1468
|
-
// sits between the annotation and the code it is about, so `index + 1` alone meant the
|
|
1469
|
-
// natural multi-line shape silently waived nothing — argo hit it three times in one upgrade,
|
|
1470
|
-
// each looking like a correct annotation. A BLANK line outside the comment still ends the
|
|
1471
|
-
// block: that is the separation people use to mean "this comment is not about the next
|
|
1472
|
-
// statement". Inside it, a blank gutter line is just prose.
|
|
1473
|
-
const closesAt = commentBlockEnd(lines, index, tokenAt, syntax)
|
|
1474
|
-
for (let ahead = 1; index + ahead < lines.length; ahead++) {
|
|
1475
|
-
const at = index + ahead
|
|
1476
|
-
add(at, annotation)
|
|
1477
|
-
if (at <= closesAt) continue
|
|
1478
|
-
const raw = lines[at] ?? ''
|
|
1479
|
-
if (raw.trim() === '') break
|
|
1480
|
-
if (!isCommentOnly(raw, codeLines[at] ?? '')) break
|
|
1481
|
-
}
|
|
1482
|
-
return
|
|
1483
|
-
}
|
|
1484
|
-
if (syntax !== 'css') return
|
|
1485
|
-
for (let back = 1; back <= MAX_CSS_CONTINUATION_LINES; back++) {
|
|
1486
|
-
const previous = (codeLines[index - back] ?? '').trim()
|
|
1487
|
-
if (previous === '' || /[;{}]$/.test(previous)) break
|
|
1488
|
-
add(index - back, annotation)
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
const token = allowTokenRe(allowComment)
|
|
1493
|
-
const jsonKey = jsonAllowKeyRe(allowComment)
|
|
1494
|
-
|
|
1495
|
-
for (let i = 0; i < lines.length; i++) {
|
|
1496
|
-
const line = lines[i] ?? ''
|
|
1497
|
-
const stripped = codeLines[i] ?? ''
|
|
1498
|
-
const isCommentOnlyLine = isCommentOnly(line, stripped)
|
|
1499
|
-
|
|
1500
|
-
// The JSON member form. Markup-only: in TS/CSS that string would be code, not an annotation.
|
|
1501
|
-
if (syntax === 'markup') {
|
|
1502
|
-
for (const m of line.matchAll(jsonKey)) {
|
|
1503
|
-
record(
|
|
1504
|
-
i,
|
|
1505
|
-
parseAllowAnnotation(m[2] ?? '', m[1] === undefined ? 'line' : 'file'),
|
|
1506
|
-
false,
|
|
1507
|
-
m.index,
|
|
1508
|
-
)
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
for (const m of line.matchAll(token)) {
|
|
1513
|
-
const at = m.index
|
|
1514
|
-
const before = line.slice(0, at)
|
|
1515
|
-
// Not inside a comment (neither witness agrees) → real code, e.g. this file's own rule table.
|
|
1516
|
-
if (stripped[at] !== ' ' && !COMMENT_OPENER_BEFORE.test(before)) continue
|
|
1517
|
-
// Inside a comment, but not at the START of one → prose that mentions the token, not an
|
|
1518
|
-
// annotation. See ANNOTATION_PREFIX: this is what stops a file documenting its own waivers
|
|
1519
|
-
// from disarming itself.
|
|
1520
|
-
if (!ANNOTATION_PREFIX.test(before)) continue
|
|
1521
|
-
const rest = line.slice(at + m[0].length)
|
|
1522
|
-
record(
|
|
1523
|
-
i,
|
|
1524
|
-
parseAllowAnnotation(rest, m[1] === undefined ? 'line' : 'file'),
|
|
1525
|
-
!isCommentOnlyLine,
|
|
1526
|
-
at,
|
|
1527
|
-
)
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
return { waivers: byLine, fileScoped, declared }
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
/**
|
|
1534
|
-
* Does one annotation cover `kind`?
|
|
1535
|
-
*
|
|
1536
|
-
* Only the ids an annotation names (or their {@link WAIVER_ID_ALIASES}) are covered. A bare
|
|
1537
|
-
* annotation, or one whose ids all missed, waives nothing and is reported as `theme-allow-unscoped`;
|
|
1538
|
-
* one that reached for several ids and missed some covers exactly the ids it got right — nothing
|
|
1539
|
-
* widens on a typo.
|
|
1540
|
-
*/
|
|
1541
|
-
function annotationCovers(annotation: AllowAnnotation, kind: GuardKind): boolean {
|
|
1542
|
-
return (
|
|
1543
|
-
annotation.rules.includes(kind) ||
|
|
1544
|
-
(WAIVER_ID_ALIASES[kind] ?? []).some((alias) => annotation.rules.includes(alias))
|
|
1545
|
-
)
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
/** Does any annotation on this line cover `kind`? */
|
|
1549
|
-
function annotationsCover(annotations: AllowAnnotation[] | undefined, kind: GuardKind): boolean {
|
|
1550
|
-
return (annotations ?? []).some((a) => annotationCovers(a, kind))
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
/** The 4 comment dialects the stripper understands, resolved from the file's own extension. */
|
|
1554
|
-
type GuardSyntax = 'ts' | 'css' | 'markup' | 'sfc'
|
|
1555
|
-
|
|
1556
|
-
/**
|
|
1557
|
-
* CSS (including `.module.css`) has no `//` line-comment syntax at all — an unquoted `//`, e.g.
|
|
1558
|
-
* inside `url(https://…)`, is real CSS text, never a comment opener. Match on the `.css` suffix
|
|
1559
|
-
* (not a naive `split('.')`) so `foo.module.css` resolves the same as `foo.css`.
|
|
1560
|
-
*
|
|
1561
|
-
* `markup` covers the two files whose colors nothing re-derives on a theme change and which the
|
|
1562
|
-
* scan never reached — `index.html` and `*.webmanifest` (plus plain `.json`, which a webmanifest
|
|
1563
|
-
* often is). Only the color/typography kinds apply there; see `MARKUP_KINDS`.
|
|
1564
|
-
*
|
|
1565
|
-
* `sfc` is the single-file-component dialect — `.astro` and `.vue`, which carry BOTH regions:
|
|
1566
|
-
* `<!-- … -->` in the template and `//` / `/* … *\/` in the frontmatter/`<script>` fence. They used
|
|
1567
|
-
* to fall through to `ts`, so an HTML comment was never stripped: a `theme-allow` written in one
|
|
1568
|
-
* waived nothing, and a color inside a commented-out block still reported (rollhook, round 9 —
|
|
1569
|
-
* `.astro` became scannable in the same minor that exposed it). They are NOT `markup`: an `.astro`
|
|
1570
|
-
* template is JSX-shaped and a `.vue` `<script setup>` is real TS, so restricting them to
|
|
1571
|
-
* {@link MARKUP_KINDS} would drop 22 of the 25 kinds on a file type that can violate all of them.
|
|
1572
|
-
*
|
|
1573
|
-
* `.jsx` needs no entry — it is TS syntax with no HTML-comment region.
|
|
1574
|
-
*
|
|
1575
|
-
* **Two asserted limits, both false-NEGATIVE-only** (pinned in `check-source.test.ts`):
|
|
1576
|
-
*
|
|
1577
|
-
* 1. The kebab-CSS kinds (`css-raw-surface`) do not fire inside a `<style>` fence — that branch
|
|
1578
|
-
* keys on `syntax === 'css'`, and an SFC is one file with three dialects, not three files. The
|
|
1579
|
-
* color kinds, which are what an unguarded template layer actually leaks, do fire there.
|
|
1580
|
-
* 2. Stripping is region-BLIND: `<!-- … -->` is blanked anywhere in the file, and `//` anywhere
|
|
1581
|
-
* outside a string. A `<!--` inside a script string, or an unquoted `https://` in template
|
|
1582
|
-
* prose, over-strips the rest of that construct. Both directions lose findings rather than
|
|
1583
|
-
* inventing them, which is the side of the trade a release-blocking false positive says to take.
|
|
1584
|
-
*/
|
|
1585
|
-
function guardSyntaxFor(relPath: string): GuardSyntax {
|
|
1586
|
-
if (relPath.endsWith('.css')) return 'css'
|
|
1587
|
-
if (/\.(?:html?|webmanifest|json)$/.test(relPath)) return 'markup'
|
|
1588
|
-
if (/\.(?:astro|vue)$/.test(relPath)) return 'sfc'
|
|
1589
|
-
return 'ts'
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
/**
|
|
1593
|
-
* The comment-stripped twin of `text`, same length and same newline positions, for any dialect.
|
|
1594
|
-
*
|
|
1595
|
-
* One place rather than the two call sites (`checkSource` and `findAllowAnnotations`) that used to
|
|
1596
|
-
* spell the `markup ? … : …` ternary out independently — adding `sfc` to one and not the other is
|
|
1597
|
-
* exactly how the scan and `--audit-allows` drift apart on what counts as a comment.
|
|
1598
|
-
*
|
|
1599
|
-
* The SFC order is markup-first: an HTML comment may legally contain `//` or an unterminated `/*`,
|
|
1600
|
-
* and blanking it before the TS pass keeps that text from opening a comment that runs to EOF.
|
|
1601
|
-
*/
|
|
1602
|
-
function stripGuardComments(text: string, syntax: GuardSyntax): string {
|
|
1603
|
-
if (syntax === 'markup') return stripMarkupComments(text)
|
|
1604
|
-
if (syntax === 'sfc') return stripComments(stripMarkupComments(text), 'ts')
|
|
1605
|
-
return stripComments(text, syntax)
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
/** The only kinds meaningful in an HTML document or a JSON manifest — no JSX, no CSS-in-JS. */
|
|
1609
|
-
const MARKUP_KINDS: ReadonlySet<GuardKind> = new Set(['raw-hex', 'raw-color-fn', 'raw-font-family'])
|
|
1610
|
-
|
|
1611
|
-
/** Blanks out `<!-- … -->` 1:1 with spaces, preserving every offset. JSON has no comment syntax. */
|
|
1612
|
-
function stripMarkupComments(text: string): string {
|
|
1613
|
-
return text.replace(/<!--[\s\S]*?-->/g, (m) => m.replace(/[^\n]/g, ' '))
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
/**
|
|
1617
|
-
* The exact first line of every stylesheet the CLI emits — the contract between `basalt-ui
|
|
1618
|
-
* tokens:css` / `fonts:css` and this scanner, and the single source of truth for it (`src/cli`
|
|
1619
|
-
* imports this rather than keeping its own copy, which is how the two used to drift apart).
|
|
1620
|
-
*
|
|
1621
|
-
* The marker exists because `check-theme` reported the file a sibling command had just written:
|
|
1622
|
-
* 116 of rollhook's 117 violations were inside the emitted token stylesheet, which is nothing but
|
|
1623
|
-
* hex and `rgba()` by construction.
|
|
1624
|
-
*
|
|
1625
|
-
* **Command-NEUTRAL by necessity.** Line 1 is compared verbatim, so it cannot name the command
|
|
1626
|
-
* that produced the file without needing one accepted marker per command — and a second accepted
|
|
1627
|
-
* marker is a second forgery surface. It points at the provenance line instead, which does name
|
|
1628
|
-
* the command. It used to say `regenerate with \`bunx basalt-ui tokens:css\`` on a `fonts:css`
|
|
1629
|
-
* file too: following that instruction overwrote a font sheet with the palette sheet.
|
|
1630
|
-
*/
|
|
1631
|
-
export const GENERATED_HEADER_LINE =
|
|
1632
|
-
'/* @generated basalt-ui — do not edit; regenerate with the command on the next line */'
|
|
1633
|
-
|
|
1634
|
-
/** Line 2 of the header: the emitting version and the exact invocation that produced the file. */
|
|
1635
|
-
const GENERATED_PROVENANCE_LINE =
|
|
1636
|
-
/^\/\* basalt-ui \d+\.\d+\.\d+[^\s]* — `basalt-ui (?:tokens:css|fonts:css)[^`]*` \*\/$/
|
|
1637
|
-
|
|
1638
|
-
/** The header is exactly the two lines `generatedHeader()` writes — nothing further in counts. */
|
|
1639
|
-
const GENERATED_HEADER_LINES = 2
|
|
1640
|
-
|
|
1641
|
-
/** A comment that OPENS AND CLOSES on its own line — the only comment shape the emitters write. */
|
|
1642
|
-
const GENERATED_COMMENT_LINE = /^\/\*(?:[^*]|\*(?!\/))*\*\/$/
|
|
1643
|
-
|
|
1644
|
-
/** Outside a block: a selector, a selector-list continuation ending in `,`, or an at-rule opener. */
|
|
1645
|
-
const GENERATED_SELECTOR_LINE = /^[^{};]*[,{]$/
|
|
1646
|
-
|
|
1647
|
-
/** Inside a block: a declaration of a custom property in basalt's OWN namespace, or the close. */
|
|
1648
|
-
const GENERATED_DECL_LINE = /^(?:--(?:vx|basalt)-[A-Za-z0-9_-]*\s*:[^{};]*;|\})$/
|
|
1649
|
-
|
|
1650
|
-
/** No line is skipped in a file that is not one basalt emitted — the shared empty answer. */
|
|
1651
|
-
const NO_GENERATED_LINES: ReadonlySet<number> = new Set()
|
|
1652
|
-
|
|
1653
|
-
/** Net brace depth a line moves the parser by — CSS blocks, counted the cheap way. */
|
|
1654
|
-
function braceDelta(line: string): number {
|
|
1655
|
-
let delta = 0
|
|
1656
|
-
for (const ch of line) {
|
|
1657
|
-
if (ch === '{') delta++
|
|
1658
|
-
else if (ch === '}') delta--
|
|
1659
|
-
}
|
|
1660
|
-
return delta
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
/**
|
|
1664
|
-
* The (1-based) lines of a stylesheet basalt itself emitted, which the scan may skip. Empty for
|
|
1665
|
-
* every other file.
|
|
1666
|
-
*
|
|
1667
|
-
* The marker used to be honoured on its own: any file whose first five lines contained the string
|
|
1668
|
-
* `@generated basalt-ui` was skipped ENTIRELY. That made a two-word comment a whole-file guard
|
|
1669
|
-
* bypass — prepend it to any `.tsx` and every finding in it disappears. The replacement gated the
|
|
1670
|
-
* whole file on a header plus a line-shape allowlist, and the allowlist was loose enough to forge:
|
|
1671
|
-
* `--vx-pad: 0; box-shadow: 0 0 0 1px #ff0000;` passed as "a basalt custom property" because the
|
|
1672
|
-
* value pattern permitted `;`, and `/* x *\/ .btn { color: #ff0000; }` passed as "a comment"
|
|
1673
|
-
* because the comment pattern never required the comment to close. Both are browser-effective CSS,
|
|
1674
|
-
* and either one bought a whole-file exemption.
|
|
1675
|
-
*
|
|
1676
|
-
* Two changes close that, and the second is the structural one:
|
|
1677
|
-
*
|
|
1678
|
-
* 1. **The exemption is PER LINE, not per file.** A line-shape allowlist that misses now costs one
|
|
1679
|
-
* line, not the whole file — the blast radius of the next mistake is bounded by construction.
|
|
1680
|
-
* It also reports the smuggled line precisely instead of burying it under 300 token values.
|
|
1681
|
-
* 2. **The allowlist is brace-depth-aware.** CSS declarations only take effect INSIDE a block, so
|
|
1682
|
-
* at depth ≥ 1 the only skippable line is a `--vx-*`/`--basalt-*` declaration whose value
|
|
1683
|
-
* carries no `;`, a `}`, a self-closing comment, or a blank. `box-shadow: … #ff0000,` is a
|
|
1684
|
-
* depth-1 line and is scanned no matter how it is shaped. At depth 0 a loose selector pattern
|
|
1685
|
-
* is safe precisely because nothing there is a declaration.
|
|
1686
|
-
*
|
|
1687
|
-
* Three conditions still gate the file itself: a `.css` path (the CLI emits CSS and nothing else,
|
|
1688
|
-
* so the marker is ignored in `.ts`/`.tsx`/`.html`/`.json`, which is where the guard has its
|
|
1689
|
-
* teeth), the canonical header verbatim on line 1, and the provenance line on line 2.
|
|
1690
|
-
*
|
|
1691
|
-
* A line carrying the allow comment is never skipped: an emitted sheet contains no `theme-allow`,
|
|
1692
|
-
* and skipping one would suppress the `theme-allow-unscoped` report of a waiver hidden in a file
|
|
1693
|
-
* wearing the header.
|
|
1694
|
-
*
|
|
1695
|
-
* Residual, knowingly accepted: at depth 0 a forger can hide a finding inside something shaped
|
|
1696
|
-
* like a selector (`.a[data-x='#ff0000'] {`), and inside a block they can hide the value of a
|
|
1697
|
-
* custom property they declare in basalt's own namespace. Neither is browser-effective as a style
|
|
1698
|
-
* and the second IS the artifact class this exemption exists for.
|
|
1699
|
-
*/
|
|
1700
|
-
function generatedTokenLines(
|
|
1701
|
-
relPath: string,
|
|
1702
|
-
lines: readonly string[],
|
|
1703
|
-
allowComment: string,
|
|
1704
|
-
): ReadonlySet<number> {
|
|
1705
|
-
if (!relPath.endsWith('.css')) return NO_GENERATED_LINES
|
|
1706
|
-
if ((lines[0] ?? '').trim() !== GENERATED_HEADER_LINE) return NO_GENERATED_LINES
|
|
1707
|
-
if (!GENERATED_PROVENANCE_LINE.test((lines[1] ?? '').trim())) return NO_GENERATED_LINES
|
|
1708
|
-
|
|
1709
|
-
const skippable = new Set<number>([1, 2])
|
|
1710
|
-
let depth = 0
|
|
1711
|
-
for (let i = GENERATED_HEADER_LINES; i < lines.length; i++) {
|
|
1712
|
-
const line = lines[i] ?? ''
|
|
1713
|
-
const trimmed = line.trim()
|
|
1714
|
-
const shaped =
|
|
1715
|
-
trimmed === '' ||
|
|
1716
|
-
GENERATED_COMMENT_LINE.test(trimmed) ||
|
|
1717
|
-
(depth === 0 ? GENERATED_SELECTOR_LINE : GENERATED_DECL_LINE).test(trimmed)
|
|
1718
|
-
if (shaped && !line.includes(allowComment)) skippable.add(i + 1)
|
|
1719
|
-
depth += braceDelta(line)
|
|
1720
|
-
// Unbalanced braces mean this is not the emitters' output at all — fail closed on the rest.
|
|
1721
|
-
if (depth < 0) return NO_GENERATED_LINES
|
|
1722
|
-
}
|
|
1723
|
-
return skippable
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
/**
|
|
1727
|
-
* Kinds disabled under `profile: 'tokens-only'` — every kind whose remedy is a Mantine component,
|
|
1728
|
-
* a Mantine prop, or the React theme factory. See {@link GuardConfig.profile}.
|
|
1729
|
-
*
|
|
1730
|
-
* Exported so the CLI can name the profile in `--help`/`doctor` output without re-deriving the
|
|
1731
|
-
* list, and so a test can assert the two halves (disabled vs. surviving) partition the registry.
|
|
1732
|
-
*/
|
|
1733
|
-
export const TOKENS_ONLY_DISABLED_KINDS: ReadonlySet<GuardKind> = new Set([
|
|
1734
|
-
'localstorage-theme',
|
|
1735
|
-
'off-identity-accent',
|
|
1736
|
-
'mantine-shade-index',
|
|
1737
|
-
'raw-spacing',
|
|
1738
|
-
'raw-radius',
|
|
1739
|
-
'card-with-border',
|
|
1740
|
-
'off-system-surface-var',
|
|
1741
|
-
'raw-html-layout',
|
|
1742
|
-
// Same remedy as raw-html-layout, word for word ("use a Mantine layout primitive") — it is that
|
|
1743
|
-
// kind's widening, so it has to share its gate here. Splitting them told a Mantine-free
|
|
1744
|
-
// consumer to import Box/Flex.
|
|
1745
|
-
'hidden-inline-style',
|
|
1746
|
-
'inline-spacing',
|
|
1747
|
-
'inline-display',
|
|
1748
|
-
'raw-motion-value',
|
|
1749
|
-
'raw-form-control',
|
|
1750
|
-
'sub-16-input-font',
|
|
1751
|
-
// Both wave-6 control kinds: `<Title>` is a Mantine component and the remedy for either one is a
|
|
1752
|
-
// Mantine-rendered home (PageBar / WidgetHeader) or a basalt control over @mantine/core. Neither
|
|
1753
|
-
// sentence is followable in a consumer that installs the token layer and nothing else.
|
|
1754
|
-
'in-body-page-title',
|
|
1755
|
-
'raw-selection-control',
|
|
1756
|
-
])
|
|
1757
|
-
|
|
1758
|
-
// A `/` opens a regex literal (not division) when the previous significant token is one of these
|
|
1759
|
-
// punctuation marks, or one of the REGEX_PRECEDING_KEYWORDS below, or nothing has been scanned yet
|
|
1760
|
-
// (start of input) — the standard JS lexer disambiguation. `ts`-syntax only; CSS has no regexes.
|
|
1761
|
-
const REGEX_PRECEDING_PUNCT = new Set([
|
|
1762
|
-
'=',
|
|
1763
|
-
'(',
|
|
1764
|
-
',',
|
|
1765
|
-
'[',
|
|
1766
|
-
':',
|
|
1767
|
-
'!',
|
|
1768
|
-
'&',
|
|
1769
|
-
'|',
|
|
1770
|
-
'?',
|
|
1771
|
-
'{',
|
|
1772
|
-
'}',
|
|
1773
|
-
';',
|
|
1774
|
-
'+',
|
|
1775
|
-
'-',
|
|
1776
|
-
'*',
|
|
1777
|
-
'%',
|
|
1778
|
-
'~',
|
|
1779
|
-
'^',
|
|
1780
|
-
'<',
|
|
1781
|
-
])
|
|
1782
|
-
const REGEX_PRECEDING_KEYWORDS = new Set([
|
|
1783
|
-
'return',
|
|
1784
|
-
'typeof',
|
|
1785
|
-
'case',
|
|
1786
|
-
'in',
|
|
1787
|
-
'of',
|
|
1788
|
-
'delete',
|
|
1789
|
-
'void',
|
|
1790
|
-
'throw',
|
|
1791
|
-
'do',
|
|
1792
|
-
'else',
|
|
1793
|
-
])
|
|
1794
|
-
const WORD_CHAR = /[A-Za-z0-9_$]/
|
|
1795
|
-
|
|
1796
|
-
/**
|
|
1797
|
-
* Strip comments out of source text, leaving real comment-awareness in place of the old per-line
|
|
1798
|
-
* prefix heuristic (which only caught a comment when ITS OWN line happened to start with `//` /
|
|
1799
|
-
* `*` / `/*` — a block-comment continuation line that didn't start with `*` slipped straight
|
|
1800
|
-
* through as if it were code).
|
|
1801
|
-
*
|
|
1802
|
-
* Stripped characters are replaced 1:1 with a space (newlines are preserved verbatim), so the
|
|
1803
|
-
* output is the SAME LENGTH as the input and every remaining token keeps its exact original line
|
|
1804
|
-
* number and character offset — callers can keep using `text.slice(0, i).split('\n').length` for
|
|
1805
|
-
* line numbers exactly as before.
|
|
1806
|
-
*
|
|
1807
|
-
* Deliberately does NOT touch string literals (`'`, `"`, backtick, backslash-escaped): a raw hex
|
|
1808
|
-
* or a `//` inside a string is real source text, not a comment, and must still be scanned as-is
|
|
1809
|
-
* (e.g. a URL like `'https://x.com/#abc'` must not have its `//` treated as a line comment).
|
|
1810
|
-
*
|
|
1811
|
-
* `syntax === 'css'` disables `//` line-comment handling entirely (CSS only has `/* *\/`) — an
|
|
1812
|
-
* unquoted `url(https://…)` must never have its rest-of-line blanked (that was the BUG 2 false
|
|
1813
|
-
* negative: a real violation on the same line silently disappearing behind a bogus "comment").
|
|
1814
|
-
*
|
|
1815
|
-
* `syntax === 'ts'` additionally recognizes regex literals (`/…/flags`) via
|
|
1816
|
-
* `REGEX_PRECEDING_PUNCT` / `REGEX_PRECEDING_KEYWORDS` and consumes them VERBATIM — a `/*` or `//`
|
|
1817
|
-
* shaped sequence inside a regex body (e.g. a character class `/[/*]/`) is real regex source, not
|
|
1818
|
-
* a comment opener, and must not open a block comment that then runs away to EOF eating every
|
|
1819
|
-
* subsequent line unrecoverably (that was the BUG 1 false negative — total loss of guard coverage
|
|
1820
|
-
* for the rest of the file). The heuristic is inherently imperfect (full disambiguation needs a
|
|
1821
|
-
* real parser), so it is DELIBERATELY biased toward treating an ambiguous `/` as division, i.e.
|
|
1822
|
-
* NOT a regex, i.e. NOT specially protected: an under-strip here just leaves a `/` as an ordinary
|
|
1823
|
-
* character (worst case a spurious finding a human can `theme-allow`), whereas an over-eager
|
|
1824
|
-
* regex-open would swallow real code as "protected regex content" and could hide a genuine
|
|
1825
|
-
* violation — the failure mode BUG 1 already showed is unacceptable.
|
|
1826
|
-
*/
|
|
1827
|
-
function stripComments(text: string, syntax: 'ts' | 'css'): string {
|
|
1828
|
-
const out: string[] = Array.from<string>({ length: text.length })
|
|
1829
|
-
let inLineComment = false
|
|
1830
|
-
let inBlockComment = false
|
|
1831
|
-
let stringQuote: string | null = null
|
|
1832
|
-
let currentWord = ''
|
|
1833
|
-
let lastUnitType: 'word' | 'punct' | 'none' = 'none'
|
|
1834
|
-
let lastWord = ''
|
|
1835
|
-
let lastPunct = ''
|
|
1836
|
-
let i = 0
|
|
1837
|
-
|
|
1838
|
-
function flushWord(): void {
|
|
1839
|
-
if (currentWord === '') return
|
|
1840
|
-
lastUnitType = 'word'
|
|
1841
|
-
lastWord = currentWord
|
|
1842
|
-
currentWord = ''
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
function canPrecedeRegex(): boolean {
|
|
1846
|
-
if (lastUnitType === 'none') return true
|
|
1847
|
-
if (lastUnitType === 'word') return REGEX_PRECEDING_KEYWORDS.has(lastWord)
|
|
1848
|
-
return REGEX_PRECEDING_PUNCT.has(lastPunct)
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
while (i < text.length) {
|
|
1852
|
-
const ch = text[i] ?? ''
|
|
1853
|
-
|
|
1854
|
-
if (inLineComment) {
|
|
1855
|
-
out[i] = ch === '\n' ? '\n' : ' '
|
|
1856
|
-
if (ch === '\n') inLineComment = false
|
|
1857
|
-
i++
|
|
1858
|
-
continue
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
if (inBlockComment) {
|
|
1862
|
-
if (ch === '*' && text[i + 1] === '/') {
|
|
1863
|
-
out[i] = ' '
|
|
1864
|
-
out[i + 1] = ' '
|
|
1865
|
-
i += 2
|
|
1866
|
-
inBlockComment = false
|
|
1867
|
-
continue
|
|
1868
|
-
}
|
|
1869
|
-
out[i] = ch === '\n' ? '\n' : ' '
|
|
1870
|
-
i++
|
|
1871
|
-
continue
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
if (stringQuote !== null) {
|
|
1875
|
-
out[i] = ch
|
|
1876
|
-
if (ch === '\\' && i + 1 < text.length) {
|
|
1877
|
-
out[i + 1] = text[i + 1] ?? ''
|
|
1878
|
-
i += 2
|
|
1879
|
-
continue
|
|
1880
|
-
}
|
|
1881
|
-
if (ch === stringQuote) stringQuote = null
|
|
1882
|
-
i++
|
|
1883
|
-
continue
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
if (WORD_CHAR.test(ch)) {
|
|
1887
|
-
currentWord += ch
|
|
1888
|
-
out[i] = ch
|
|
1889
|
-
i++
|
|
1890
|
-
continue
|
|
1891
|
-
}
|
|
1892
|
-
flushWord()
|
|
1893
|
-
|
|
1894
|
-
if (ch === "'" || ch === '"' || ch === '`') {
|
|
1895
|
-
stringQuote = ch
|
|
1896
|
-
out[i] = ch
|
|
1897
|
-
lastUnitType = 'punct'
|
|
1898
|
-
lastPunct = ch
|
|
1899
|
-
i++
|
|
1900
|
-
continue
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
if (ch === '/' && text[i + 1] === '*') {
|
|
1904
|
-
inBlockComment = true
|
|
1905
|
-
out[i] = ' '
|
|
1906
|
-
i++
|
|
1907
|
-
continue
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
if (syntax === 'ts' && ch === '/' && text[i + 1] === '/') {
|
|
1911
|
-
inLineComment = true
|
|
1912
|
-
out[i] = ' '
|
|
1913
|
-
i++
|
|
1914
|
-
continue
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
if (syntax === 'ts' && ch === '/' && canPrecedeRegex()) {
|
|
1918
|
-
// Consume the regex literal VERBATIM: backslash escapes and `[...]` character classes never
|
|
1919
|
-
// close it early. A raw newline before the closing `/` means this was never a valid regex
|
|
1920
|
-
// (JS disallows a literal line terminator inside one) — bail out of regex mode right there;
|
|
1921
|
-
// every character up to the newline was already copied through unchanged either way, so
|
|
1922
|
-
// bailing loses nothing.
|
|
1923
|
-
out[i] = ch
|
|
1924
|
-
let j = i + 1
|
|
1925
|
-
let inClass = false
|
|
1926
|
-
while (j < text.length) {
|
|
1927
|
-
const rc = text[j] ?? ''
|
|
1928
|
-
if (rc === '\n') break
|
|
1929
|
-
out[j] = rc
|
|
1930
|
-
if (rc === '\\' && j + 1 < text.length) {
|
|
1931
|
-
out[j + 1] = text[j + 1] ?? ''
|
|
1932
|
-
j += 2
|
|
1933
|
-
continue
|
|
1934
|
-
}
|
|
1935
|
-
if (rc === '[') inClass = true
|
|
1936
|
-
else if (rc === ']') inClass = false
|
|
1937
|
-
else if (rc === '/' && !inClass) {
|
|
1938
|
-
j++
|
|
1939
|
-
break
|
|
1940
|
-
}
|
|
1941
|
-
j++
|
|
1942
|
-
}
|
|
1943
|
-
i = j
|
|
1944
|
-
lastUnitType = 'punct'
|
|
1945
|
-
lastPunct = '/'
|
|
1946
|
-
continue
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
// Plain `/` (division, or any bare `/` in CSS syntax) — or any other punctuation/whitespace.
|
|
1950
|
-
out[i] = ch
|
|
1951
|
-
if (!/\s/.test(ch)) {
|
|
1952
|
-
lastUnitType = 'punct'
|
|
1953
|
-
lastPunct = ch
|
|
1954
|
-
}
|
|
1955
|
-
i++
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
return out.join('')
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
// ── GUARD_RULES registry ─────────────────────────────────────────────────────────────────────────
|
|
1962
|
-
|
|
1963
|
-
type GuardRule = {
|
|
1964
|
-
readonly kind: GuardKind
|
|
1965
|
-
/** Static regex, or a builder over cfg for the 3 dynamic kinds (forbiddenAccent/spacing/radius). */
|
|
1966
|
-
readonly pattern: RegExp | ((cfg: GuardConfig) => RegExp)
|
|
1967
|
-
/** Path-applicability: a kind that only fires in some files. */
|
|
1968
|
-
readonly appliesTo?: (relPath: string) => boolean
|
|
1969
|
-
/** Knob gating; always-on kinds omit this. */
|
|
1970
|
-
readonly enabled?: (cfg: GuardConfig) => boolean
|
|
1971
|
-
/** Per-kind fix-hint message. */
|
|
1972
|
-
readonly message: string
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
/**
|
|
1976
|
-
* The closed registry of all 27 guard kinds. The triad test asserts
|
|
1977
|
-
* `surface.guardKinds ⊆ keyof GUARD_RULES` at runtime.
|
|
1978
|
-
*
|
|
1979
|
-
* raw-surface, raw-html-layout, and sub-16-input-font are handled inline in checkSource
|
|
1980
|
-
* (multi-regex / multi-condition / full-text tag-scoped); all other kinds map to a single pattern
|
|
1981
|
-
* entry.
|
|
1982
|
-
*
|
|
1983
|
-
* This file and `src/cli/index.ts` are `exempt` in the package's own `basalt` config, and must
|
|
1984
|
-
* stay that way: a rule's `pattern` and its `message` both spell the anti-pattern out literally
|
|
1985
|
-
* (`'Raw <input>/<select>/<textarea> …'`), so the guard flags its own definitions when the package
|
|
1986
|
-
* self-scans. Any kind matching a literal tag hits this. Fixture files are already covered by the
|
|
1987
|
-
* scanner's own `SKIP` (`*.test.ts`), for the same reason.
|
|
1988
|
-
*/
|
|
1989
|
-
export const GUARD_RULES = {
|
|
1990
|
-
'raw-hex': {
|
|
1991
|
-
kind: 'raw-hex',
|
|
1992
|
-
pattern: HEX,
|
|
1993
|
-
message: 'Route color through VX.* / the Mantine theme.',
|
|
1994
|
-
},
|
|
1995
|
-
'raw-color-fn': {
|
|
1996
|
-
kind: 'raw-color-fn',
|
|
1997
|
-
pattern: FUNC,
|
|
1998
|
-
message: 'Route color through VX.* / the Mantine theme; for opacity use alpha(token, a).',
|
|
1999
|
-
},
|
|
2000
|
-
'localstorage-theme': {
|
|
2001
|
-
kind: 'localstorage-theme',
|
|
2002
|
-
pattern: LOCALSTORAGE_THEME,
|
|
2003
|
-
// JS-call-shaped (`localStorage.getItem('theme')`) — never appears in CSS text.
|
|
2004
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2005
|
-
message: 'Theme must resolve via the Mantine color scheme + --vx-* vars.',
|
|
2006
|
-
},
|
|
2007
|
-
'raw-font-family': {
|
|
2008
|
-
kind: 'raw-font-family',
|
|
2009
|
-
pattern: RAW_FONT_FAMILY,
|
|
2010
|
-
message: `Route the font stack through createBasaltTheme(overrides, { fonts }) / the shipped --basalt-font-sans|head|mono vars instead of a hardcoded fontFamily literal (${FONTS_CSS_HINT}).`,
|
|
2011
|
-
},
|
|
2012
|
-
'off-identity-accent': {
|
|
2013
|
-
kind: 'off-identity-accent',
|
|
2014
|
-
pattern: (cfg: GuardConfig) =>
|
|
2015
|
-
new RegExp(
|
|
2016
|
-
`\\b(?:color|c|bg|backgroundColor)\\s*=\\s*\\{?\\s*['"](${cfg.forbiddenAccents.join('|')})['"]`,
|
|
2017
|
-
'g',
|
|
2018
|
-
),
|
|
2019
|
-
// JSX-prop-shaped (`color={"teal"}`) — CSS declares `color: teal;` with a bare keyword and
|
|
2020
|
-
// `:`, which the pattern's `=` anchor can never match; gated off explicitly so a future regex
|
|
2021
|
-
// tweak can't silently start false-positiving on consumer CSS.
|
|
2022
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2023
|
-
message: 'For an off-identity accent use blue/gray or a status hue (red/green/orange/yellow).',
|
|
2024
|
-
},
|
|
2025
|
-
'mantine-shade-index': {
|
|
2026
|
-
kind: 'mantine-shade-index',
|
|
2027
|
-
pattern: MANTINE_SHADE_INDEX,
|
|
2028
|
-
enabled: (cfg: GuardConfig) => cfg.mantineShadeIndex,
|
|
2029
|
-
message:
|
|
2030
|
-
'Shade-pinned Mantine color — one fixed swatch in BOTH color schemes, so it cannot stay legible in either. Use VX.status.* / --vx-status-* for a verdict color, or the bare hue name (c="red") to let the theme resolve the shade per scheme.',
|
|
2031
|
-
},
|
|
2032
|
-
'raw-spacing': {
|
|
2033
|
-
kind: 'raw-spacing',
|
|
2034
|
-
pattern: (cfg: GuardConfig) =>
|
|
2035
|
-
new RegExp(
|
|
2036
|
-
`\\b(?:p|px|py|pt|pb|pl|pr|m|mx|my|mt|mb|ml|mr|gap)=\\{(?:${cfg.spacingSteps.join('|')})\\}`,
|
|
2037
|
-
'g',
|
|
2038
|
-
),
|
|
2039
|
-
// JSX-prop-shaped (`p={16}`) — CSS has no `=`/`{}` prop syntax; gated off explicitly (see
|
|
2040
|
-
// off-identity-accent above for why "never matches today" still gets an explicit gate).
|
|
2041
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2042
|
-
message: 'Use the Mantine spacing prop/token (p/m/gap with xs..xl).',
|
|
2043
|
-
},
|
|
2044
|
-
'raw-radius': {
|
|
2045
|
-
kind: 'raw-radius',
|
|
2046
|
-
pattern: RADIUS_PROP_RE,
|
|
2047
|
-
enabled: (cfg: GuardConfig) => cfg.rawRadius,
|
|
2048
|
-
// JSX-prop-shaped (`radius={6}`) — CSS declares `border-radius: 6px;`, never `radius=`.
|
|
2049
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2050
|
-
message: 'Use the radius token (radius="md") instead of a numeric literal.',
|
|
2051
|
-
},
|
|
2052
|
-
'raw-surface': {
|
|
2053
|
-
kind: 'raw-surface',
|
|
2054
|
-
pattern: SURFACE_BORDER, // handled inline; this entry exists so the registry is complete
|
|
2055
|
-
enabled: (cfg: GuardConfig) => cfg.rawSurface,
|
|
2056
|
-
message:
|
|
2057
|
-
'Inline border/radius/shadow on a surface — a card already carries its depth (VX.shadowCard) and shape (var(--vx-radius-card)) from the theme; use VX.surface.* / a radius token instead.',
|
|
2058
|
-
},
|
|
2059
|
-
'card-with-border': {
|
|
2060
|
-
kind: 'card-with-border',
|
|
2061
|
-
pattern: CARD_SURFACE_TAG, // handled inline (full-text tag-scoped scan); entry keeps registry complete
|
|
2062
|
-
enabled: (cfg: GuardConfig) => cfg.cardWithBorder,
|
|
2063
|
-
// JSX-tag-shaped (`<Card withBorder>`) — never appears in CSS text.
|
|
2064
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2065
|
-
message:
|
|
2066
|
-
'withBorder on a Card/Paper double-draws the edge — card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1) — and fix the inset in the same edit: an explicit p/padding or radius on that Card/Paper is the other half of the idiom, which only the oxlint lane sees (basalt/card-inset); the theme owns both, so write neither.',
|
|
2067
|
-
},
|
|
2068
|
-
'off-system-surface-var': {
|
|
2069
|
-
kind: 'off-system-surface-var',
|
|
2070
|
-
pattern: OFF_SYSTEM_SURFACE_VAR,
|
|
2071
|
-
enabled: (cfg: GuardConfig) => cfg.offSystemSurfaceVar,
|
|
2072
|
-
message:
|
|
2073
|
-
'Raw Mantine ramp step bypasses the basalt surface tokens — use VX.surface.* / --vx-surface-* instead.',
|
|
2074
|
-
},
|
|
2075
|
-
'raw-html-layout': {
|
|
2076
|
-
kind: 'raw-html-layout',
|
|
2077
|
-
pattern: RAW_HTML_TAG, // handled inline (3-condition conjunction); entry keeps registry complete
|
|
2078
|
-
enabled: (cfg: GuardConfig) => cfg.rawHtmlLayout,
|
|
2079
|
-
// JSX-tag-shaped (`<div style={{...}}>`) — never appears in CSS text. Also excluded from
|
|
2080
|
-
// chart files: the remedy (Box/Flex/Grid/Stack/Group) is `@mantine/*`, and src/charts/** is a
|
|
2081
|
-
// lint-enforced Mantine-free layer (basalt/token-layer-boundary) — so inside a chart file the
|
|
2082
|
-
// finding is unactionable, not merely inconvenient, and the only "fix" would be a theme-allow
|
|
2083
|
-
// comment written inside the very directory this rule protects.
|
|
2084
|
-
appliesTo: (relPath) => !isChartFile(relPath) && !relPath.endsWith('.css'),
|
|
2085
|
-
message:
|
|
2086
|
-
'Raw HTML element with inline layout/surface styling — use a Mantine layout primitive (Box/Flex/Grid/Stack/Group).',
|
|
2087
|
-
},
|
|
2088
|
-
'inline-spacing': {
|
|
2089
|
-
kind: 'inline-spacing',
|
|
2090
|
-
pattern: INLINE_SPACING,
|
|
2091
|
-
enabled: (cfg: GuardConfig) => cfg.inlineSpacing,
|
|
2092
|
-
message: 'Inline spacing literal — use the Mantine spacing prop/token (p/m/gap with xs..xl).',
|
|
2093
|
-
},
|
|
2094
|
-
'inline-display': {
|
|
2095
|
-
kind: 'inline-display',
|
|
2096
|
-
pattern: INLINE_DISPLAY,
|
|
2097
|
-
enabled: (cfg: GuardConfig) => cfg.inlineDisplay,
|
|
2098
|
-
// JSX-object-shaped (`display: 'flex'`, quoted value) — CSS never quotes a keyword value
|
|
2099
|
-
// (`display: flex;` is bare), so the pattern's quote anchor can never match real CSS. Also
|
|
2100
|
-
// excluded from chart files: the remedy (Flex/Grid/Group) is `@mantine/*`, and src/charts/**
|
|
2101
|
-
// is a lint-enforced Mantine-free layer (basalt/token-layer-boundary) — so inside a chart file
|
|
2102
|
-
// the finding is unactionable, not merely inconvenient, and the only "fix" would be a
|
|
2103
|
-
// theme-allow comment written inside the very directory this rule protects.
|
|
2104
|
-
appliesTo: (relPath) => !isChartFile(relPath) && !relPath.endsWith('.css'),
|
|
2105
|
-
message: 'Use <Flex>/<Grid>/<Group> instead of an inline display:flex/grid.',
|
|
2106
|
-
},
|
|
2107
|
-
'raw-motion-value': {
|
|
2108
|
-
kind: 'raw-motion-value',
|
|
2109
|
-
pattern: MOTION_TRANSITION_NUMERIC, // handled inline (2-regex kind); entry keeps registry complete
|
|
2110
|
-
enabled: (cfg: GuardConfig) => cfg.rawMotionValue,
|
|
2111
|
-
// JSX-prop-shaped (`transition={{ duration: … }}`) — CSS's `transition:` property has no `=`
|
|
2112
|
-
// or `{{`.
|
|
2113
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2114
|
-
message:
|
|
2115
|
-
'Route animation timing through MOTION_DURATION / MOTION_SPRING / MOTION_EASE_STANDARD (basalt-ui motion tokens) instead of a hardcoded duration/spring/ease.',
|
|
2116
|
-
},
|
|
2117
|
-
'raw-form-control': {
|
|
2118
|
-
kind: 'raw-form-control',
|
|
2119
|
-
pattern: RAW_FORM_CONTROL,
|
|
2120
|
-
enabled: (cfg: GuardConfig) => cfg.rawFormControl,
|
|
2121
|
-
// JSX-tag-shaped (`<input …>`) — a CSS element selector (`input, select {…}`) has no leading
|
|
2122
|
-
// `<`, so the pattern's anchor can never match real CSS.
|
|
2123
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2124
|
-
message:
|
|
2125
|
-
'Raw <input>/<select>/<textarea> bypasses the ENTIRE theme, not just the font-size floor — no field surface, no shadow-card depth, no focus ring, no --input-* vars. Use TextInput / NumberInput / Select / Textarea from @mantine/core, or variant="unstyled" for a genuinely borderless/bespoke look.',
|
|
2126
|
-
},
|
|
2127
|
-
'sub-16-input-font': {
|
|
2128
|
-
kind: 'sub-16-input-font',
|
|
2129
|
-
pattern: SUB_16_FONT_SIZE, // handled inline (full-text tag-scoped scan); entry keeps registry complete
|
|
2130
|
-
enabled: (cfg: GuardConfig) => cfg.sub16InputFont,
|
|
2131
|
-
// Only ever fires nested inside a raw-form-control JSX tag or a `styles={{ input: {…} }}`
|
|
2132
|
-
// object literal — both JSX-shaped, neither appears in CSS text.
|
|
2133
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2134
|
-
message:
|
|
2135
|
-
'fontSize below 16 on a form control is dead code — the styles.css iOS floor is `!important` and always wins. Either drop the override, or be honest about 16px in the design.',
|
|
2136
|
-
},
|
|
2137
|
-
'theme-allow-unscoped': {
|
|
2138
|
-
kind: 'theme-allow-unscoped',
|
|
2139
|
-
pattern: /theme-allow/, // handled inline (annotation pass); entry keeps the registry complete
|
|
2140
|
-
message:
|
|
2141
|
-
'theme-allow without a usable rule id and a reason. Write `theme-allow <rule-id> — <why>`: the id scopes the exception to that one kind (a bare comment waives nothing), and the reason is what makes it reviewable in a diff. An id that names no rule is a typo, not a blanket waiver — it suppresses nothing. `theme-allow-file <rule-id> — <why>` declares the whole file, and must name its ids: a bare one waives nothing.',
|
|
2142
|
-
},
|
|
2143
|
-
'surface-shadow-override': {
|
|
2144
|
-
kind: 'surface-shadow-override',
|
|
2145
|
-
pattern: SHADOW_DECL, // handled inline (value is judged, not just matched)
|
|
2146
|
-
enabled: (cfg: GuardConfig) => cfg.rawSurface,
|
|
2147
|
-
message:
|
|
2148
|
-
'Token-composed boxShadow that REPLACES surface depth — a card whose shadow drops --vx-shadow-card is the one card in the app with no depth. Compose with the depth token for its tier (`${VX.shadowCard}, <your ring>`; a fixed/floating surface wants --vx-shadow-overlay) rather than instead of it.',
|
|
2149
|
-
},
|
|
2150
|
-
'css-raw-surface': {
|
|
2151
|
-
kind: 'css-raw-surface',
|
|
2152
|
-
pattern: CSS_SURFACE_RADIUS, // handled inline (value is judged); entry keeps the registry complete
|
|
2153
|
-
enabled: (cfg: GuardConfig) => cfg.rawSurface,
|
|
2154
|
-
// The kebab dialect only exists in CSS text; the camelCase half is `raw-surface`.
|
|
2155
|
-
appliesTo: (relPath) => relPath.endsWith('.css'),
|
|
2156
|
-
message:
|
|
2157
|
-
'Surface literal in CSS — use var(--vx-radius-card|--vx-radius-ctrl) for a corner and var(--vx-shadow-card) for depth, the same tokens the TSX side is held to.',
|
|
2158
|
-
},
|
|
2159
|
-
'hidden-inline-style': {
|
|
2160
|
-
kind: 'hidden-inline-style',
|
|
2161
|
-
pattern: RAW_HTML_LAYOUT_TAG, // handled inline (full-text tag-scoped scan + hoisted-const lookup)
|
|
2162
|
-
enabled: (cfg: GuardConfig) => cfg.rawHtmlLayout,
|
|
2163
|
-
appliesTo: (relPath) => !isChartFile(relPath) && !relPath.endsWith('.css'),
|
|
2164
|
-
message:
|
|
2165
|
-
'Raw HTML element with inline layout/surface styling that the line scan cannot see — the tag is formatted across lines, or the style object is hoisted to a const. Same violation as raw-html-layout: use a Mantine layout primitive (Box/Flex/Grid/Stack/Group). Promoted to error at 1.26.0 (C16) with severity only — the kind stayed standalone rather than folding into raw-html-layout as originally planned; the merge is still open, tracked as a follow-up, not done here.',
|
|
2166
|
-
},
|
|
2167
|
-
'in-body-page-title': {
|
|
2168
|
-
kind: 'in-body-page-title',
|
|
2169
|
-
pattern: PAGE_TITLE_TAG, // handled inline (full-text tag-scoped scan); entry keeps the registry complete
|
|
2170
|
-
// JSX-tag-shaped (`<Title order={1}>`) — never appears in CSS text.
|
|
2171
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2172
|
-
message:
|
|
2173
|
-
'In-body page title — a page is named ONCE: by the breadcrumb (the nav item label), by PageBar.title, or by <PageTitle> on a shell-less surface (a route error, an auth gate, a standalone screen). Every section/card/table title is a WidgetHeader (docs/CONTROLS-SPEC.md law C8). An <Title order={1|2}> spelling a name out in the body is a second name for the same page, and it drifts. A Title rendering a VALUE — {doc.title}, {RANK_LABEL[rank]} — never reports: that is data, not a name. Prose / ArticleLayout / an overlay and anything under a content/ path never report either. Same law the oxlint plugin enforces as basalt/in-body-page-title — one id, two lanes, so one theme-allow covers both.',
|
|
2174
|
-
},
|
|
2175
|
-
'raw-selection-control': {
|
|
2176
|
-
kind: 'raw-selection-control',
|
|
2177
|
-
pattern: RAW_SELECTION_CONTROL_TAG, // handled inline (full-text tag-scoped scan + host ancestry)
|
|
2178
|
-
// JSX-tag-shaped (`<Select …>`) — never appears in CSS text.
|
|
2179
|
-
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2180
|
-
message:
|
|
2181
|
-
'Raw selection control with no store field — bind its state to one: in a page slot (PageBar / Section / WidgetHeader) use the basalt filter with `field={store.field.x}` (`createSearchStore` for URL state); in a `SettingsRow control=` keep the Mantine control and take `[value, setValue]` from a `createLocalStore` field .use(), never useState. Rule: basalt-controls.md. No shell? PageBar needs no BasaltShell: outside one it renders in flow, sticky, with its own title — so its slots are a reachable home for a provider-only app.',
|
|
2182
|
-
},
|
|
2183
|
-
'inline-font-size': {
|
|
2184
|
-
kind: 'inline-font-size',
|
|
2185
|
-
pattern: INLINE_FONT_SIZE,
|
|
2186
|
-
message:
|
|
2187
|
-
'Raw font-size literal — route through VX.text.* (numbers) / --vx-text-* (CSS), or the Mantine fz token. Same rule the oxlint plugin enforces as basalt/no-raw-font-size; this is the half a check-theme-only CI can see.',
|
|
2188
|
-
},
|
|
2189
|
-
'raw-media-query': {
|
|
2190
|
-
kind: 'raw-media-query',
|
|
2191
|
-
pattern: CSS_WIDTH_MEDIA_QUERY, // handled inline (three independent shapes); entry keeps the registry complete
|
|
2192
|
-
// CSS-only: a width @media, an @container name/literal or a non-coarse pointer query has no JSX
|
|
2193
|
-
// spelling — the AST-side twin of this law is the oxlint plugin's basalt/raw-breakpoint.
|
|
2194
|
-
appliesTo: (relPath) => relPath.endsWith('.css'),
|
|
2195
|
-
message: `Raw viewport/container breakpoint in CSS — a width @media belongs to shell/** against SIZE_CLASSES (useSizeClass() is the JS seam); an @container name must be one of ${[...DECLARED_CONTAINER_NAMES].join(' / ')}, and a basalt-card or unnamed @container query must sit at a boundary in ${[...CONTAINER_CLASS_LITERALS_PX].map((px) => `${px}px`).join(' / ')} (the other declared names have no numeric table yet, so their literals are not judged); and a pointer query other than (pointer: coarse) or (pointer: fine) has no framework meaning. Same law the oxlint plugin enforces as basalt/raw-breakpoint over JSX; this is the CSS half.`,
|
|
2196
|
-
},
|
|
2197
|
-
'unknown-vx-token': {
|
|
2198
|
-
kind: 'unknown-vx-token',
|
|
2199
|
-
pattern: VX_VAR_REF, // handled inline (basalt-owned families); entry keeps the registry complete
|
|
2200
|
-
message: `var() names a --vx-* token basalt does not emit, so it resolves to its fallback (or to nothing) with no error anywhere. Judged: every name inside a basalt-owned family (${[...BASALT_VX_FAMILY_SET].join(', ')}), plus any name basalt used to emit in any family — pick the token from the stylesheet basalt-ui tokens:css emits; your own series belong in a family of their own (groupTokens throws on one inside basalt's, in dev builds). A removed name is reported with its replacement on the finding line (MIGRATING.md has the table). Any other name outside a basalt family is never judged, because groupTokens may declare it in a file this scan cannot see.`,
|
|
2201
|
-
},
|
|
2202
|
-
'series-palette': {
|
|
2203
|
-
kind: 'series-palette',
|
|
2204
|
-
pattern: /(?!)/, // never matches: judged over the whole series FILE by `series-file.ts`, not per line
|
|
2205
|
-
appliesTo: () => false,
|
|
2206
|
-
message:
|
|
2207
|
-
"The series file's palette fails a computed check (OKLCH lightness band, chroma floor, colour-blind separation of neighbours, worst-pair separation, 3:1 contrast against the surface, ≤ 8 series without a repeat) — retune the hex in the series file; it is judged per scheme, light against the light panel and dark against the dark one. A deliberately neutral series is keyed `other`.",
|
|
2208
|
-
},
|
|
2209
|
-
} as const satisfies Record<GuardKind, GuardRule>
|
|
2210
|
-
|
|
2211
|
-
/**
|
|
2212
|
-
* The one-line remedy for `kind`, as a report reads it: `raw-hex: Route color through VX.* / …`.
|
|
2213
|
-
*
|
|
2214
|
-
* The registry has always carried a remedy per kind; `check-theme`'s `Fix:` epilogue read a
|
|
2215
|
-
* hand-duplicated subset instead, and the subset was missing every kind added at 1.20.0. Since all
|
|
2216
|
-
* five of those ship `warn` under grace, the findings whose whole argument is "this looks correct
|
|
2217
|
-
* and is not" arrived with no argument at all — just "add a `theme-allow`", which reads as advice to
|
|
2218
|
-
* waive. Sourcing the epilogue from here retires the duplicate rather than extending it.
|
|
2219
|
-
*/
|
|
2220
|
-
export function guardKindRemedy(kind: GuardKind): string {
|
|
2221
|
-
return `${kind}: ${(GUARD_RULES[kind] as GuardRule).message}`
|
|
2222
|
-
}
|
|
2223
|
-
|
|
2224
|
-
/** JSON and its manifest dialect — the file class with no comment syntax to carry an annotation. */
|
|
2225
|
-
const JSON_FAMILY_FILE = /\.(?:webmanifest|json)$/
|
|
2226
|
-
|
|
2227
|
-
/**
|
|
2228
|
-
* How to waive a finding **in this file's syntax** — the closer a report prints under `Fix:`.
|
|
2229
|
-
*
|
|
2230
|
-
* `check-theme` printed one closer for every file class, and from 1.20.0 (when the scan reached
|
|
2231
|
-
* `.webmanifest` / `.json`) it prescribed a `theme-allow` comment to files that cannot hold a
|
|
2232
|
-
* comment. Two consumers read that, found no route, and fell back to a blanket `exemptRules` entry —
|
|
2233
|
-
* the un-reviewable shape the release was spent retiring.
|
|
2234
|
-
*
|
|
2235
|
-
* A manifest gets the sharper answer first, because a hex there can never be *right*: a manifest
|
|
2236
|
-
* cannot reference a CSS custom property, so the value is a hand-copy of a token that drifts the day
|
|
2237
|
-
* the palette moves (which is exactly what both consumers found — two dead colours). The remedy is
|
|
2238
|
-
* to stop hand-writing the file: `basaltAppPlugin` emits it from `SURFACE.bg`. The annotation is the
|
|
2239
|
-
* fallback for a manifest basalt does not generate.
|
|
2240
|
-
*/
|
|
2241
|
-
export function guardWaiverHint(relPath: string): string {
|
|
2242
|
-
if (relPath.endsWith('.webmanifest')) {
|
|
2243
|
-
return (
|
|
2244
|
-
'A manifest cannot reference a CSS variable, so a hex here is a hand-copy that drifts: let ' +
|
|
2245
|
-
'basaltAppPlugin emit it (`manifest: { … }` in vite.config.ts) instead of hand-writing it. ' +
|
|
2246
|
-
'For a manifest basalt does not generate, declare the exception with a ' +
|
|
2247
|
-
'`"basalt:theme-allow-file": "raw-hex — <why>"` member.'
|
|
2248
|
-
)
|
|
2249
|
-
}
|
|
2250
|
-
if (JSON_FAMILY_FILE.test(relPath)) {
|
|
2251
|
-
return (
|
|
2252
|
-
'JSON has no comments — declare a deliberate exception with a ' +
|
|
2253
|
-
'`"basalt:theme-allow-file": "<rule-id> — <why>"` member.'
|
|
2254
|
-
)
|
|
2255
|
-
}
|
|
2256
|
-
return 'Add a `theme-allow <rule-id> — <why>` comment for a deliberate exception (`theme-allow-file` declares the whole file).'
|
|
2257
|
-
}
|
|
2258
|
-
|
|
2259
|
-
/** Whether `kind`'s rule fires for `relPath` — `appliesTo` is opt-in; absent means always applies. */
|
|
2260
|
-
function ruleApplies(kind: GuardKind, relPath: string): boolean {
|
|
2261
|
-
const appliesTo = (GUARD_RULES[kind] as GuardRule).appliesTo
|
|
2262
|
-
return appliesTo === undefined || appliesTo(relPath)
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
// ── checkSource ───────────────────────────────────────────────────────────────────────────────────
|
|
2266
|
-
|
|
2267
|
-
/**
|
|
2268
|
-
* Scan ONE file's text for theme-guard violations. Pure: same (text, relPath, cfg) → same Finding[].
|
|
2269
|
-
* No FS, no walk, no console. The 3 dynamic regexes (forbiddenAccent, spacing, radius) are derived
|
|
2270
|
-
* INTERNALLY from cfg. isChartFile(relPath) is applied internally so the oxlint-plugin /
|
|
2271
|
-
* PreToolUse-hook adapters get correct kind-applicability for free.
|
|
2272
|
-
*
|
|
2273
|
-
* @example
|
|
2274
|
-
* const findings = checkSource(src, 'src/Dashboard.tsx', DEFAULT_GUARD_CONFIG)
|
|
2275
|
-
* if (findings.some((f) => f.kind === 'raw-hex')) { ... }
|
|
2276
|
-
*/
|
|
2277
|
-
export function checkSource(text: string, relPath: string, cfg: GuardConfig): Finding[] {
|
|
2278
|
-
const lines = text.split('\n')
|
|
2279
|
-
|
|
2280
|
-
// Lines basalt itself generated are not consumer source — `tokens:css` emits nothing BUT hex and
|
|
2281
|
-
// rgba() by construction. See generatedTokenLines for why the marker alone is not enough, and
|
|
2282
|
-
// why the exemption is per line rather than per file.
|
|
2283
|
-
const generatedLines = generatedTokenLines(relPath, lines, cfg.allowComment)
|
|
2284
|
-
|
|
2285
|
-
// Severity and text are stamped once at the end rather than at each of the ~20 push sites — both
|
|
2286
|
-
// are derived from state the push sites don't need: severity from the KIND and the config, text
|
|
2287
|
-
// from the finding's own `line` against the source split above.
|
|
2288
|
-
const findings: Omit<Finding, 'severity' | 'text'>[] = []
|
|
2289
|
-
|
|
2290
|
-
// Derive the 3 dynamic regexes via GUARD_RULES pattern builders.
|
|
2291
|
-
const forbiddenAccentRe = (
|
|
2292
|
-
GUARD_RULES['off-identity-accent'].pattern as (cfg: GuardConfig) => RegExp
|
|
2293
|
-
)(cfg)
|
|
2294
|
-
const spacingPropRe = (GUARD_RULES['raw-spacing'].pattern as (cfg: GuardConfig) => RegExp)(cfg)
|
|
2295
|
-
// raw-radius uses a static pattern (module const) — clone via source + flags to reset lastIndex.
|
|
2296
|
-
const radiusPropRe = new RegExp(
|
|
2297
|
-
(GUARD_RULES['raw-radius'].pattern as RegExp).source,
|
|
2298
|
-
(GUARD_RULES['raw-radius'].pattern as RegExp).flags,
|
|
2299
|
-
)
|
|
2300
|
-
|
|
2301
|
-
// Comment-stripped text drives every match below; `lines` (the ORIGINAL, unstripped split) is
|
|
2302
|
-
// kept to resolve the allow-comment escape, since that annotation lives inside a comment the
|
|
2303
|
-
// stripped text has already blanked out. Same length / same newline positions as `text`, so line
|
|
2304
|
-
// numbers computed off either one agree.
|
|
2305
|
-
const syntax = guardSyntaxFor(relPath)
|
|
2306
|
-
const codeText = stripGuardComments(text, syntax)
|
|
2307
|
-
const codeLines = codeText.split('\n')
|
|
2308
|
-
const { waivers, fileScoped, declared } = collectAllowAnnotations(
|
|
2309
|
-
lines,
|
|
2310
|
-
codeLines,
|
|
2311
|
-
cfg.allowComment,
|
|
2312
|
-
syntax,
|
|
2313
|
-
)
|
|
2314
|
-
|
|
2315
|
-
/** Kinds a `theme-allow-file` declared for the whole file — resolved once, not per finding. */
|
|
2316
|
-
const fileWaived = new Set<GuardKind>()
|
|
2317
|
-
for (const annotation of fileScoped) {
|
|
2318
|
-
for (const rule of annotation.rules) {
|
|
2319
|
-
if (Object.hasOwn(GUARD_RULES, rule)) fileWaived.add(rule as GuardKind)
|
|
2320
|
-
// The plugin-id spelling of a shared law reaches file scope too — a `theme-allow-file
|
|
2321
|
-
// control-outside-home — <why>` names a rule this lane knows under another id, and honouring
|
|
2322
|
-
// it on one lane only is the same silent half-application the line scope had.
|
|
2323
|
-
for (const alias of WAIVER_ID_ALIASES[rule] ?? []) {
|
|
2324
|
-
if (Object.hasOwn(GUARD_RULES, alias)) fileWaived.add(alias as GuardKind)
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
/** Is `kind` waived at (1-based) `line`? See `collectAllowAnnotations` for the full grammar. */
|
|
2330
|
-
const isAllowed = (line: number, kind: GuardKind): boolean =>
|
|
2331
|
-
fileWaived.has(kind) || annotationsCover(waivers.get(line - 1), kind)
|
|
2332
|
-
|
|
2333
|
-
const isAllowedInRange = (start: number, end: number, kind: GuardKind): boolean => {
|
|
2334
|
-
for (let n = start; n <= end; n++) if (isAllowed(n, kind)) return true
|
|
2335
|
-
return false
|
|
2336
|
-
}
|
|
2337
|
-
|
|
2338
|
-
const push = (kind: GuardKind, line: number, token: string): void => {
|
|
2339
|
-
if (isAllowed(line, kind)) return
|
|
2340
|
-
findings.push({ relPath, line, token, kind })
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
|
-
// theme-allow accountability. Reported directly rather than through `push`: a bare annotation
|
|
2344
|
-
// covers every kind, so routing it through the waiver check would let it waive the report of its
|
|
2345
|
-
// own unaccountability. `basalt.severity` / `exemptRules` are the ways to turn it down.
|
|
2346
|
-
for (const { line, annotation } of declared) {
|
|
2347
|
-
if (annotation.unknownRules.length === 0 && annotation.rules.length > 0 && annotation.hasReason)
|
|
2348
|
-
continue
|
|
2349
|
-
// "waives nothing" is only true when NO id resolved. With one that did, the typo costs its own
|
|
2350
|
-
// id and nothing else — saying otherwise contradicts the findings the same run suppressed.
|
|
2351
|
-
const unknown = `unknown rule id '${annotation.unknownRules.join("', '")}'`
|
|
2352
|
-
const missing =
|
|
2353
|
-
annotation.unknownRules.length > 0
|
|
2354
|
-
? annotation.rules.length === 0
|
|
2355
|
-
? `${unknown} — waives nothing`
|
|
2356
|
-
: `${unknown} — not waived`
|
|
2357
|
-
: annotation.rules.length === 0
|
|
2358
|
-
? 'no rule id'
|
|
2359
|
-
: 'no reason'
|
|
2360
|
-
findings.push({
|
|
2361
|
-
relPath,
|
|
2362
|
-
line,
|
|
2363
|
-
token: `${cfg.allowComment} (${missing})`,
|
|
2364
|
-
kind: 'theme-allow-unscoped',
|
|
2365
|
-
})
|
|
2366
|
-
}
|
|
2367
|
-
|
|
2368
|
-
/** Lines the line-scoped `raw-html-layout` already owns, so `hidden-inline-style` can't double-report. */
|
|
2369
|
-
const rawHtmlLayoutLines = new Set<number>()
|
|
2370
|
-
|
|
2371
|
-
/** Offset of each line's start in `codeText` — lets a line-scoped match ask about its surroundings. */
|
|
2372
|
-
const lineStarts: number[] = []
|
|
2373
|
-
for (let n = 0, i = 0; i < codeLines.length; i++) {
|
|
2374
|
-
lineStarts.push(n)
|
|
2375
|
-
n += (codeLines[i] ?? '').length + 1
|
|
2376
|
-
}
|
|
2377
|
-
|
|
2378
|
-
/** Every identifier the file hands to a `style=`/`styles=` prop — see `isStyleObjectContext`. */
|
|
2379
|
-
const styleIdentifiers = new Set(
|
|
2380
|
-
[...codeText.matchAll(STYLE_BOUND_IDENTIFIER)].map((m) => m[1] ?? ''),
|
|
2381
|
-
)
|
|
2382
|
-
|
|
2383
|
-
/** `--vx-*` names this file declares — its own custom properties, which `unknown-vx-token` skips. */
|
|
2384
|
-
const locallyDeclaredVx = new Set(
|
|
2385
|
-
[...codeText.matchAll(VX_LOCAL_DECLARATION)].map((m) => m[1] ?? m[3] ?? m[4] ?? ''),
|
|
2386
|
-
)
|
|
2387
|
-
|
|
2388
|
-
// unknown-vx-token: any unemitted name inside a basalt-owned family (BASALT_VX_FAMILY_SET), or any
|
|
2389
|
-
// removed name in ANY family (REMOVED_VX_NAMES).
|
|
2390
|
-
// Scanned over the whole comment-stripped text rather than per line, so a formatter-wrapped
|
|
2391
|
-
// `var(\n --vx-x\n)` is seen; the finding lands on the line the NAME is on.
|
|
2392
|
-
for (const m of codeText.matchAll(VX_VAR_REF)) {
|
|
2393
|
-
const name = m[1] ?? ''
|
|
2394
|
-
if (locallyDeclaredVx.has(name)) continue
|
|
2395
|
-
if (KNOWN_VX_NAMES.has(name)) continue
|
|
2396
|
-
if (!BASALT_VX_FAMILY_SET.has(vxFamilyOf(name)) && !Object.hasOwn(REMOVED_VX_NAMES, name))
|
|
2397
|
-
continue
|
|
2398
|
-
const at = (m.index ?? 0) + m[0].length - name.length
|
|
2399
|
-
push('unknown-vx-token', lineStarts.findLastIndex((start) => start <= at) + 1, name)
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
for (let i = 0; i < lines.length; i++) {
|
|
2403
|
-
const line = codeLines[i] ?? ''
|
|
2404
|
-
|
|
2405
|
-
// Always-on kinds (raw-hex, raw-color-fn, localstorage-theme) — patterns from GUARD_RULES.
|
|
2406
|
-
for (const m of line.matchAll(GUARD_RULES['raw-hex'].pattern as RegExp)) {
|
|
2407
|
-
push('raw-hex', i + 1, m[0])
|
|
2408
|
-
}
|
|
2409
|
-
for (const m of line.matchAll(GUARD_RULES['raw-color-fn'].pattern as RegExp)) {
|
|
2410
|
-
push('raw-color-fn', i + 1, m[0])
|
|
2411
|
-
}
|
|
2412
|
-
if (ruleApplies('localstorage-theme', relPath)) {
|
|
2413
|
-
for (const m of line.matchAll(GUARD_RULES['localstorage-theme'].pattern as RegExp)) {
|
|
2414
|
-
push('localstorage-theme', i + 1, m[0])
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
for (const m of line.matchAll(GUARD_RULES['raw-font-family'].pattern as RegExp)) {
|
|
2418
|
-
push('raw-font-family', i + 1, m[0])
|
|
2419
|
-
}
|
|
2420
|
-
for (const m of line.matchAll(GUARD_RULES['inline-font-size'].pattern as RegExp)) {
|
|
2421
|
-
push('inline-font-size', i + 1, m[0])
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
|
-
// Dynamic-regex kinds — patterns already resolved above.
|
|
2425
|
-
if (ruleApplies('off-identity-accent', relPath)) {
|
|
2426
|
-
for (const m of line.matchAll(forbiddenAccentRe)) {
|
|
2427
|
-
push('off-identity-accent', i + 1, m[1] ?? '')
|
|
2428
|
-
}
|
|
2429
|
-
}
|
|
2430
|
-
if (ruleApplies('raw-spacing', relPath)) {
|
|
2431
|
-
for (const m of line.matchAll(spacingPropRe)) push('raw-spacing', i + 1, m[0])
|
|
2432
|
-
}
|
|
2433
|
-
if (GUARD_RULES['raw-radius'].enabled!(cfg) && ruleApplies('raw-radius', relPath)) {
|
|
2434
|
-
for (const m of line.matchAll(radiusPropRe)) push('raw-radius', i + 1, m[0])
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
// raw-surface + its two younger siblings, all gated on the same `rawSurface` knob:
|
|
2438
|
-
// • raw-surface — the camelCase (TSX inline-style) literals, unchanged;
|
|
2439
|
-
// • css-raw-surface — the kebab dialect, which the camelCase patterns never saw;
|
|
2440
|
-
// • surface-shadow-override — a shadow built FROM tokens that still drops card depth.
|
|
2441
|
-
if (GUARD_RULES['raw-surface'].enabled!(cfg)) {
|
|
2442
|
-
for (const m of line.matchAll(SURFACE_BORDER)) push('raw-surface', i + 1, m[0])
|
|
2443
|
-
for (const m of line.matchAll(SURFACE_RADIUS)) push('raw-surface', i + 1, m[0])
|
|
2444
|
-
|
|
2445
|
-
if (syntax === 'css') {
|
|
2446
|
-
for (const m of line.matchAll(CSS_SURFACE_RADIUS)) {
|
|
2447
|
-
const value = m[1] ?? ''
|
|
2448
|
-
if (!/\d/.test(value) || isAllowedCssRadius(value)) continue
|
|
2449
|
-
push('css-raw-surface', i + 1, m[0].trim())
|
|
2450
|
-
}
|
|
2451
|
-
for (const m of line.matchAll(CSS_SURFACE_SHADOW)) {
|
|
2452
|
-
const value = m[1] ?? ''
|
|
2453
|
-
// A var-composed shadow in a CSS MODULE is deliberately not judged. `surface-shadow-
|
|
2454
|
-
// override` is about a Card/Paper losing `--vx-shadow-card`; a module's own
|
|
2455
|
-
// `box-shadow: var(--field-depth)` is a focus ring, an inset, a notch — component
|
|
2456
|
-
// styling with no card identity at stake. Only the CSS-in-JS dialect, where the shadow
|
|
2457
|
-
// sits on a Mantine surface prop, carries that claim.
|
|
2458
|
-
if (SHADOW_IS_COMPOSED.test(value) || /^\s*none\s*$/.test(value)) continue
|
|
2459
|
-
push('css-raw-surface', i + 1, m[0].trim())
|
|
2460
|
-
}
|
|
2461
|
-
} else {
|
|
2462
|
-
for (const m of line.matchAll(SHADOW_DECL)) {
|
|
2463
|
-
const value = m[2] ?? ''
|
|
2464
|
-
if (!SHADOW_IS_COMPOSED.test(value)) {
|
|
2465
|
-
push('raw-surface', i + 1, m[0])
|
|
2466
|
-
continue
|
|
2467
|
-
}
|
|
2468
|
-
if (SHADOW_KEEPS_CARD_DEPTH.test(value)) continue
|
|
2469
|
-
push('surface-shadow-override', i + 1, m[0])
|
|
2470
|
-
}
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2474
|
-
// raw-media-query: three independent CSS-only shapes — a width @media, an @container
|
|
2475
|
-
// name/literal outside the declared table, and a pointer query that is neither coarse nor fine.
|
|
2476
|
-
if (ruleApplies('raw-media-query', relPath)) {
|
|
2477
|
-
for (const m of line.matchAll(CSS_WIDTH_MEDIA_QUERY)) {
|
|
2478
|
-
if (isSanctionedShellMediaQuery(relPath, m[0])) continue
|
|
2479
|
-
push('raw-media-query', i + 1, m[0].trim())
|
|
2480
|
-
}
|
|
2481
|
-
for (const m of line.matchAll(CSS_CONTAINER_QUERY)) {
|
|
2482
|
-
const name = m[1] ?? ''
|
|
2483
|
-
const body = m[2] ?? ''
|
|
2484
|
-
// An UNNAMED `@container (...)` is legal CSS (scopes to the nearest ancestor container
|
|
2485
|
-
// regardless of its name) — only a name that IS present and NOT in the declared table is a
|
|
2486
|
-
// violation; the empty name itself never is.
|
|
2487
|
-
if (name !== '' && !DECLARED_CONTAINER_NAMES.has(name)) {
|
|
2488
|
-
push('raw-media-query', i + 1, m[0].trim())
|
|
2489
|
-
continue
|
|
2490
|
-
}
|
|
2491
|
-
// Literal boundaries are judged against `basalt-card`'s own table (see
|
|
2492
|
-
// `CONTAINER_CLASS_LITERALS_PX`'s doc) — an unnamed query has no OTHER table to judge
|
|
2493
|
-
// against, so it is judged against this one too; the other declared names stay
|
|
2494
|
-
// unjudged until they ship their own.
|
|
2495
|
-
if (name !== '' && name !== 'basalt-card') continue
|
|
2496
|
-
for (const lit of body.matchAll(CSS_CONTAINER_LITERAL)) {
|
|
2497
|
-
const px = lit[2] === 'em' ? Number(lit[1]) * ROOT_FONT_SIZE_PX : Number(lit[1])
|
|
2498
|
-
if (!CONTAINER_CLASS_LITERALS_PX.has(px)) {
|
|
2499
|
-
push('raw-media-query', i + 1, m[0].trim())
|
|
2500
|
-
break
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
for (const m of line.matchAll(CSS_NON_COARSE_POINTER_QUERY)) {
|
|
2505
|
-
push('raw-media-query', i + 1, m[0].trim())
|
|
2506
|
-
}
|
|
2507
|
-
}
|
|
2508
|
-
|
|
2509
|
-
// off-system-surface-var — pattern + gating from GUARD_RULES.
|
|
2510
|
-
if (GUARD_RULES['off-system-surface-var'].enabled!(cfg)) {
|
|
2511
|
-
for (const m of line.matchAll(GUARD_RULES['off-system-surface-var'].pattern as RegExp)) {
|
|
2512
|
-
push('off-system-surface-var', i + 1, m[0])
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
|
|
2516
|
-
// mantine-shade-index — the sibling of off-system-surface-var above, partitioned by hue: that
|
|
2517
|
-
// kind owns gray/dark (surface color), this one owns every other shade-pinned step (verdict and
|
|
2518
|
-
// accent color). Both halves of the pattern (JSX prop + var()) run in every file type; see the
|
|
2519
|
-
// pattern's own comment for why this kind carries no appliesTo gate.
|
|
2520
|
-
if (GUARD_RULES['mantine-shade-index'].enabled!(cfg)) {
|
|
2521
|
-
for (const m of line.matchAll(GUARD_RULES['mantine-shade-index'].pattern as RegExp)) {
|
|
2522
|
-
push('mantine-shade-index', i + 1, m[0])
|
|
2523
|
-
}
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
// raw-html-layout: 3-condition conjunction on the same line — gated via GUARD_RULES entry.
|
|
2527
|
-
// Its widened, formatting-independent half is `hidden-inline-style`, scanned below.
|
|
2528
|
-
if (
|
|
2529
|
-
GUARD_RULES['raw-html-layout'].enabled!(cfg) &&
|
|
2530
|
-
ruleApplies('raw-html-layout', relPath) &&
|
|
2531
|
-
RAW_HTML_TAG.test(line) &&
|
|
2532
|
-
INLINE_STYLE.test(line) &&
|
|
2533
|
-
LAYOUT_SURFACE_PROP.test(line)
|
|
2534
|
-
) {
|
|
2535
|
-
rawHtmlLayoutLines.add(i + 1)
|
|
2536
|
-
push('raw-html-layout', i + 1, '<raw-html style>')
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
// inline-spacing — pattern + gating from GUARD_RULES, plus the CSS-only sub-scale escape and
|
|
2540
|
-
// the TS-only style-object test for a unitless number (see isStyleObjectContext).
|
|
2541
|
-
if (GUARD_RULES['inline-spacing'].enabled!(cfg)) {
|
|
2542
|
-
for (const m of line.matchAll(GUARD_RULES['inline-spacing'].pattern as RegExp)) {
|
|
2543
|
-
if (syntax === 'css' && isSubScaleCssSpacing(line, m.index)) continue
|
|
2544
|
-
const hasUnit = /^[a-z%]/.test(line.slice(m.index + m[0].length))
|
|
2545
|
-
if (
|
|
2546
|
-
// An SFC's script fence IS TS, so it takes the same gate — without it a unitless
|
|
2547
|
-
// `padding: 8` in `.astro`/`.vue` frontmatter reports with no style-object behind it.
|
|
2548
|
-
(syntax === 'ts' || syntax === 'sfc') &&
|
|
2549
|
-
!hasUnit &&
|
|
2550
|
-
!isStyleObjectContext(codeText, lineStarts[i]! + m.index, styleIdentifiers)
|
|
2551
|
-
)
|
|
2552
|
-
continue
|
|
2553
|
-
push('inline-spacing', i + 1, m[0])
|
|
2554
|
-
}
|
|
2555
|
-
}
|
|
2556
|
-
|
|
2557
|
-
// inline-display — pattern + gating from GUARD_RULES.
|
|
2558
|
-
if (GUARD_RULES['inline-display'].enabled!(cfg) && ruleApplies('inline-display', relPath)) {
|
|
2559
|
-
for (const m of line.matchAll(GUARD_RULES['inline-display'].pattern as RegExp)) {
|
|
2560
|
-
push('inline-display', i + 1, m[0])
|
|
2561
|
-
}
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
|
-
// raw-motion-value: 2 separate regex checks, one kind — gated via GUARD_RULES entry.
|
|
2565
|
-
if (GUARD_RULES['raw-motion-value'].enabled!(cfg) && ruleApplies('raw-motion-value', relPath)) {
|
|
2566
|
-
for (const m of line.matchAll(MOTION_TRANSITION_NUMERIC))
|
|
2567
|
-
push('raw-motion-value', i + 1, m[0])
|
|
2568
|
-
for (const m of line.matchAll(MOTION_TRANSITION_EASE_ARRAY)) {
|
|
2569
|
-
push('raw-motion-value', i + 1, m[0])
|
|
2570
|
-
}
|
|
2571
|
-
}
|
|
2572
|
-
|
|
2573
|
-
// raw-form-control — pattern + gating from GUARD_RULES.
|
|
2574
|
-
if (GUARD_RULES['raw-form-control'].enabled!(cfg) && ruleApplies('raw-form-control', relPath)) {
|
|
2575
|
-
for (const m of line.matchAll(GUARD_RULES['raw-form-control'].pattern as RegExp)) {
|
|
2576
|
-
push('raw-form-control', i + 1, m[0])
|
|
2577
|
-
}
|
|
2578
|
-
}
|
|
2579
|
-
}
|
|
2580
|
-
|
|
2581
|
-
// hidden-inline-style — the formatting-independent half of raw-html-layout. Bounded full-text tag
|
|
2582
|
-
// scan (the `card-with-border` model), plus one hoisted-const lookup, so neither `<div\n style=`
|
|
2583
|
-
// nor `style={wrapperStyle}` walks past a rule that catches the identical single-line form.
|
|
2584
|
-
if (
|
|
2585
|
-
GUARD_RULES['hidden-inline-style'].enabled!(cfg) &&
|
|
2586
|
-
ruleApplies('hidden-inline-style', relPath)
|
|
2587
|
-
) {
|
|
2588
|
-
for (const m of codeText.matchAll(RAW_HTML_LAYOUT_TAG)) {
|
|
2589
|
-
const tagText = m[0]
|
|
2590
|
-
let styleBody = ''
|
|
2591
|
-
if (INLINE_STYLE.test(tagText)) styleBody = tagText
|
|
2592
|
-
else {
|
|
2593
|
-
const ident = STYLE_IDENTIFIER.exec(tagText)?.[1]
|
|
2594
|
-
if (ident !== undefined) styleBody = hoistedObjectBody(codeText, ident)
|
|
2595
|
-
}
|
|
2596
|
-
if (styleBody === '' || !LAYOUT_SURFACE_PROP.test(styleBody)) continue
|
|
2597
|
-
const startLine = codeText.slice(0, m.index ?? 0).split('\n').length
|
|
2598
|
-
if (rawHtmlLayoutLines.has(startLine)) continue
|
|
2599
|
-
const endLine = startLine + (tagText.split('\n').length - 1)
|
|
2600
|
-
if (isAllowedInRange(startLine, endLine, 'hidden-inline-style')) continue
|
|
2601
|
-
findings.push({
|
|
2602
|
-
relPath,
|
|
2603
|
-
line: startLine,
|
|
2604
|
-
token: '<raw-html style>',
|
|
2605
|
-
kind: 'hidden-inline-style',
|
|
2606
|
-
})
|
|
2607
|
-
}
|
|
2608
|
-
}
|
|
2609
|
-
|
|
2610
|
-
// card-with-border — full-text tag-scoped scan (same shape as the two above). Reports at the line
|
|
2611
|
-
// of the `withBorder` token itself (not the end of the tag) so a multi-line-formatted Card points
|
|
2612
|
-
// the fix at the prop to delete.
|
|
2613
|
-
if (GUARD_RULES['card-with-border'].enabled!(cfg) && ruleApplies('card-with-border', relPath)) {
|
|
2614
|
-
for (const m of codeText.matchAll(CARD_SURFACE_TAG)) {
|
|
2615
|
-
const withBorder = WITH_BORDER_PROP.exec(m[0])
|
|
2616
|
-
if (withBorder === null) continue
|
|
2617
|
-
const lineNo = codeText.slice(0, (m.index ?? 0) + withBorder.index).split('\n').length
|
|
2618
|
-
push('card-with-border', lineNo, 'withBorder')
|
|
2619
|
-
}
|
|
2620
|
-
}
|
|
2621
|
-
|
|
2622
|
-
// in-body-page-title — full-text tag scan (the card-with-border shape), because a `<Title>` with
|
|
2623
|
-
// its props on separate lines is the formatted default. `order` is judged on the tag's own text.
|
|
2624
|
-
//
|
|
2625
|
-
// Two file-level exemptions, both deliberately coarser than the plugin's node-level ones and both
|
|
2626
|
-
// false-NEGATIVE-only: anything under a `content/` path segment, and any file that renders
|
|
2627
|
-
// `<Prose>` / `<ArticleLayout>` / an overlay anywhere in it. A text scan has no ancestry, so
|
|
2628
|
-
// "under Prose" is not answerable per node — and a document heading told to become a breadcrumb is
|
|
2629
|
-
// the wrong advice, not merely noise. `basalt/in-body-page-title` (the AST lane, same id) is the
|
|
2630
|
-
// half that scopes this exactly.
|
|
2631
|
-
if (
|
|
2632
|
-
ruleApplies('in-body-page-title', relPath) &&
|
|
2633
|
-
!relPath.split('/').includes('content') &&
|
|
2634
|
-
!PROSE_CONTEXT_TAG.test(codeText)
|
|
2635
|
-
) {
|
|
2636
|
-
for (const m of codeText.matchAll(PAGE_TITLE_TAG)) {
|
|
2637
|
-
const order = PAGE_TITLE_ORDER_PROP.exec(m[0])
|
|
2638
|
-
if (order === null) continue
|
|
2639
|
-
// A self-closing `<Title order={1} />` renders no name at all, so it never reports — and the
|
|
2640
|
-
// test has to be explicit rather than fall out of the body scan, which would otherwise run to
|
|
2641
|
-
// the NEXT `</Title>` in the file and judge unrelated code. The plugin agrees by construction
|
|
2642
|
-
// (an element with no children has no static text), and one id must not mean two verdicts.
|
|
2643
|
-
if (m[0].endsWith('/>')) continue
|
|
2644
|
-
const bodyStart = (m.index ?? 0) + m[0].length
|
|
2645
|
-
const closeAt = codeText.indexOf('</Title>', bodyStart)
|
|
2646
|
-
// No closing tag at all: no body to judge, so nothing names the page. See below for what a
|
|
2647
|
-
// body has to hold before this kind reports.
|
|
2648
|
-
if (closeAt === -1 || !titleBodyNamesThePage(codeText.slice(bodyStart, closeAt))) continue
|
|
2649
|
-
const startLine = codeText.slice(0, m.index ?? 0).split('\n').length
|
|
2650
|
-
const endLine = startLine + (m[0].split('\n').length - 1)
|
|
2651
|
-
if (isAllowedInRange(startLine, endLine, 'in-body-page-title')) continue
|
|
2652
|
-
findings.push({
|
|
2653
|
-
relPath,
|
|
2654
|
-
line: startLine,
|
|
2655
|
-
token: `<Title order={${order[1]}}`,
|
|
2656
|
-
kind: 'in-body-page-title',
|
|
2657
|
-
})
|
|
2658
|
-
}
|
|
2659
|
-
}
|
|
2660
|
-
|
|
2661
|
-
// raw-selection-control — full-text tag scan plus the host ancestry walk (see insideHostTag).
|
|
2662
|
-
// Three file-level exemptions mirror the plugin rule's, so the two lanes agree on the same file:
|
|
2663
|
-
// a file that DEFINES a basalt control (and imports none — see CONTROL_OWNER_DEF) cannot be told
|
|
2664
|
-
// to use one, a file importing `@mantine/form` is a form — C1's third home, whose inputs are not
|
|
2665
|
-
// filters — and a file NAMED as an overlay body carries its `<Modal>` in the parent, where no
|
|
2666
|
-
// scan of this file can reach it.
|
|
2667
|
-
if (
|
|
2668
|
-
ruleApplies('raw-selection-control', relPath) &&
|
|
2669
|
-
!isOverlayConventionFile(relPath) &&
|
|
2670
|
-
!(CONTROL_OWNER_DEF.test(codeText) && !BASALT_ANY_IMPORT.test(codeText)) &&
|
|
2671
|
-
!MANTINE_FORM_IMPORT.test(codeText)
|
|
2672
|
-
) {
|
|
2673
|
-
for (const m of codeText.matchAll(RAW_SELECTION_CONTROL_TAG)) {
|
|
2674
|
-
const startLine = codeText.slice(0, m.index ?? 0).split('\n').length
|
|
2675
|
-
if (insideHostTag(codeText, m.index ?? 0)) continue
|
|
2676
|
-
const endLine = startLine + (m[0].split('\n').length - 1)
|
|
2677
|
-
if (isAllowedInRange(startLine, endLine, 'raw-selection-control')) continue
|
|
2678
|
-
findings.push({
|
|
2679
|
-
relPath,
|
|
2680
|
-
line: startLine,
|
|
2681
|
-
token: `<${m[1] ?? 'Select'}`,
|
|
2682
|
-
kind: 'raw-selection-control',
|
|
2683
|
-
})
|
|
2684
|
-
}
|
|
2685
|
-
}
|
|
2686
|
-
|
|
2687
|
-
// sub-16-input-font — two full-text scans (same shape as the tag-scoped scans above): (a) a raw
|
|
2688
|
-
// form-control's own inline `style={{ fontSize: N }}`, (b) a Mantine `styles={{ input: { fontSize:
|
|
2689
|
-
// N } }}` per-part style. Either shape is now DEAD CODE against the `!important` floor in
|
|
2690
|
-
// styles.css — see the guard's doc comment for exactly which shapes this covers.
|
|
2691
|
-
if (GUARD_RULES['sub-16-input-font'].enabled!(cfg) && ruleApplies('sub-16-input-font', relPath)) {
|
|
2692
|
-
for (const m of codeText.matchAll(RAW_FORM_CONTROL_TAG)) {
|
|
2693
|
-
const tagText = m[0]
|
|
2694
|
-
if (!INLINE_STYLE.test(tagText)) continue
|
|
2695
|
-
const fontSizeMatch = [...tagText.matchAll(SUB_16_FONT_SIZE)][0]
|
|
2696
|
-
if (fontSizeMatch === undefined) continue
|
|
2697
|
-
const value = Number.parseFloat(fontSizeMatch[1] ?? '')
|
|
2698
|
-
if (!Number.isFinite(value) || value >= 16) continue
|
|
2699
|
-
const lineNo = codeText.slice(0, (m.index ?? 0) + tagText.length).split('\n').length
|
|
2700
|
-
push('sub-16-input-font', lineNo, fontSizeMatch[0])
|
|
2701
|
-
}
|
|
2702
|
-
|
|
2703
|
-
for (const m of codeText.matchAll(STYLES_INPUT_PART)) {
|
|
2704
|
-
const inputBody = m[1] ?? ''
|
|
2705
|
-
const fontSizeMatch = [...inputBody.matchAll(SUB_16_FONT_SIZE)][0]
|
|
2706
|
-
if (fontSizeMatch === undefined) continue
|
|
2707
|
-
const value = Number.parseFloat(fontSizeMatch[1] ?? '')
|
|
2708
|
-
if (!Number.isFinite(value) || value >= 16) continue
|
|
2709
|
-
const lineNo = codeText.slice(0, (m.index ?? 0) + m[0].length).split('\n').length
|
|
2710
|
-
push('sub-16-input-font', lineNo, fontSizeMatch[0])
|
|
2711
|
-
}
|
|
2712
|
-
}
|
|
2713
|
-
|
|
2714
|
-
// Post-filters, applied once here so they uniformly cover every kind regardless of whether it was
|
|
2715
|
-
// emitted via the GUARD_RULES registry loop above or one of the inline-handled kinds:
|
|
2716
|
-
// • generated — the lines of a stylesheet basalt itself emitted (empty for every other file);
|
|
2717
|
-
// • §exemptRules — per-rule, per-path consumer exemptions;
|
|
2718
|
-
// • markup — an HTML document / JSON manifest has no JSX and no CSS-in-JS, so only the
|
|
2719
|
-
// color/typography kinds are meaningful there;
|
|
2720
|
-
// • profile — a tokens-only consumer is not told to install @mantine/core.
|
|
2721
|
-
//
|
|
2722
|
-
// `text` is stamped here too, in the same single post-pass, off the ORIGINAL (unstripped) `lines`
|
|
2723
|
-
// split — never `codeLines` — so a finding on a line whose comment was stripped still reports the
|
|
2724
|
-
// real source text a human would read.
|
|
2725
|
-
return findings
|
|
2726
|
-
.filter((f) => !generatedLines.has(f.line))
|
|
2727
|
-
.filter((f) => !isRuleExempt(f.kind, f.relPath, cfg.exemptRules))
|
|
2728
|
-
.filter((f) => syntax !== 'markup' || MARKUP_KINDS.has(f.kind))
|
|
2729
|
-
.filter((f) => cfg.profile !== 'tokens-only' || !TOKENS_ONLY_DISABLED_KINDS.has(f.kind))
|
|
2730
|
-
.map((f) => ({
|
|
2731
|
-
...f,
|
|
2732
|
-
text: textForFinding(lines[f.line - 1], f.token),
|
|
2733
|
-
severity: severityOf(f.kind, cfg),
|
|
2734
|
-
}))
|
|
2735
|
-
}
|
|
2736
|
-
|
|
2737
|
-
// ── Allow-annotation enumeration (check-theme --audit-allows) ─────────────────────────────────────
|
|
2738
|
-
|
|
2739
|
-
/**
|
|
2740
|
-
* One `theme-allow` annotation as WRITTEN, classified by whose reach its ids fall in.
|
|
2741
|
-
*
|
|
2742
|
-
* `guardKinds` is what `checkSource` can judge by re-running itself with the annotation
|
|
2743
|
-
* neutralized. `pluginRules` is what only an `oxlint` run can judge. `unknownRules` names no rule
|
|
2744
|
-
* at all. All three empty is a bare annotation, which waives nothing.
|
|
2745
|
-
*/
|
|
2746
|
-
export type AllowAnnotationSite = {
|
|
2747
|
-
/** 1-based line the annotation is written on. */
|
|
2748
|
-
readonly line: number
|
|
2749
|
-
/** `'file'` for the `theme-allow-file` declaration form, `'line'` otherwise. */
|
|
2750
|
-
readonly scope: 'line' | 'file'
|
|
2751
|
-
/** Every id the annotation names that resolves to a real rule, `basalt/` prefix stripped. */
|
|
2752
|
-
readonly rules: readonly string[]
|
|
2753
|
-
/** The subset of `rules` `checkSource` owns. */
|
|
2754
|
-
readonly guardKinds: readonly GuardKind[]
|
|
2755
|
-
/** The subset of `rules` the oxlint plugin owns — outside `checkSource`'s reach. */
|
|
2756
|
-
readonly pluginRules: readonly string[]
|
|
2757
|
-
/**
|
|
2758
|
-
* Every id an `oxlint` run can prove live: `pluginRules`, plus a guard kind that is ALSO a plugin
|
|
2759
|
-
* rule (`in-body-page-title`) or aliases one ({@link WAIVER_ID_ALIASES}). A waiver is live if
|
|
2760
|
-
* EITHER lane still needs it — judging only `pluginRules` called rb's live `in-body-page-title`
|
|
2761
|
-
* waivers dead, and deleting them made oxlint exit 1. A bare annotation waives nothing in either
|
|
2762
|
-
* lane and lists none.
|
|
2763
|
-
*/
|
|
2764
|
-
readonly oxlintRules: readonly string[]
|
|
2765
|
-
/** Words that occupied the id slot but name no rule. Their presence makes the parse fail closed. */
|
|
2766
|
-
readonly unknownRules: readonly string[]
|
|
2767
|
-
/** A written reason follows the ids. */
|
|
2768
|
-
readonly hasReason: boolean
|
|
2769
|
-
/** The source line, verbatim. */
|
|
2770
|
-
readonly text: string
|
|
2771
|
-
}
|
|
2772
|
-
|
|
2773
|
-
/**
|
|
2774
|
-
* Every allow annotation in one file, with the ids it names classified by reach.
|
|
2775
|
-
*
|
|
2776
|
-
* Pure, and it shares `collectAllowAnnotations` with {@link checkSource} — so a caller enumerating
|
|
2777
|
-
* annotations sees exactly the set the scan honours, rather than a second regex that can drift from
|
|
2778
|
-
* it. `--audit-allows` carried such a mirror and it was already one alternation behind.
|
|
2779
|
-
*
|
|
2780
|
-
* A file-scoped declaration appears once, at the line it is written on.
|
|
2781
|
-
*
|
|
2782
|
-
* @example
|
|
2783
|
-
* for (const site of findAllowAnnotations(text, rel, cfg)) {
|
|
2784
|
-
* if (site.pluginRules.length > 0) probeWithOxlint(neutralizeAllowAnnotation(text, site.line, cfg))
|
|
2785
|
-
* }
|
|
2786
|
-
*/
|
|
2787
|
-
export function findAllowAnnotations(
|
|
2788
|
-
text: string,
|
|
2789
|
-
relPath: string,
|
|
2790
|
-
cfg: GuardConfig,
|
|
2791
|
-
): AllowAnnotationSite[] {
|
|
2792
|
-
const lines = text.split('\n')
|
|
2793
|
-
const syntax = guardSyntaxFor(relPath)
|
|
2794
|
-
const codeText = stripGuardComments(text, syntax)
|
|
2795
|
-
const { declared } = collectAllowAnnotations(
|
|
2796
|
-
lines,
|
|
2797
|
-
codeText.split('\n'),
|
|
2798
|
-
cfg.allowComment,
|
|
2799
|
-
syntax,
|
|
2800
|
-
)
|
|
2801
|
-
return declared.map(({ line, annotation }) => {
|
|
2802
|
-
return {
|
|
2803
|
-
line,
|
|
2804
|
-
scope: annotation.scope,
|
|
2805
|
-
rules: [...annotation.rules],
|
|
2806
|
-
guardKinds: annotation.rules.filter((id): id is GuardKind => Object.hasOwn(GUARD_RULES, id)),
|
|
2807
|
-
pluginRules: annotation.rules.filter(
|
|
2808
|
-
(id) => !Object.hasOwn(GUARD_RULES, id) && PLUGIN_RULE_IDS.has(id),
|
|
2809
|
-
),
|
|
2810
|
-
oxlintRules: [
|
|
2811
|
-
...new Set(
|
|
2812
|
-
annotation.rules
|
|
2813
|
-
.flatMap((id) => [id, ...(WAIVER_ID_ALIASES[id] ?? [])])
|
|
2814
|
-
.filter((id) => PLUGIN_RULE_IDS.has(id) || DUAL_LANE_IDS.has(id)),
|
|
2815
|
-
),
|
|
2816
|
-
],
|
|
2817
|
-
unknownRules: [...annotation.unknownRules],
|
|
2818
|
-
hasReason: annotation.hasReason,
|
|
2819
|
-
text: lines[line - 1] ?? '',
|
|
2820
|
-
}
|
|
2821
|
-
})
|
|
2822
|
-
}
|
|
2823
|
-
|
|
2824
|
-
/** The token a neutralized annotation is rewritten to. Shares no substring with `theme-allow`. */
|
|
2825
|
-
export const NEUTRALIZED_ALLOW_TOKEN = 'basalt-audit-neutralized'
|
|
2826
|
-
|
|
2827
|
-
/**
|
|
2828
|
-
* `text` with the allow token on ONE (1-based) line rewritten to {@link NEUTRALIZED_ALLOW_TOKEN},
|
|
2829
|
-
* leaving every other annotation intact.
|
|
2830
|
-
*
|
|
2831
|
-
* The probe half of an audit: re-scan the result and the findings that appear are exactly what that
|
|
2832
|
-
* one annotation suppresses. Shipped rather than left to each caller so the guard probe and the
|
|
2833
|
-
* oxlint probe neutralize identically — a `--audit-allows` verdict that differs between the two
|
|
2834
|
-
* halves by a substitution detail is worse than no verdict.
|
|
2835
|
-
*
|
|
2836
|
-
* A line with no token comes back unchanged.
|
|
2837
|
-
*/
|
|
2838
|
-
export function neutralizeAllowAnnotation(text: string, line: number, cfg: GuardConfig): string {
|
|
2839
|
-
const lines = text.split('\n')
|
|
2840
|
-
const target = lines[line - 1]
|
|
2841
|
-
if (target === undefined) return text
|
|
2842
|
-
lines[line - 1] = target.replaceAll(cfg.allowComment, NEUTRALIZED_ALLOW_TOKEN)
|
|
2843
|
-
return lines.join('\n')
|
|
2844
|
-
}
|