basalt-ui 2.29.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +68 -108
- package/CHANGELOG.md +113 -39
- package/MIGRATING.md +1682 -6575
- package/README.md +400 -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 +110 -0
- package/agent/skills/basalt-app/references/testing.md +37 -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 +47 -25
- package/agent/skills/basalt-design/references/ai.md +64 -0
- package/agent/skills/basalt-design/references/anti-defaults.md +54 -18
- package/agent/skills/basalt-design/references/cards.md +73 -0
- package/agent/skills/basalt-design/references/chart-color.md +30 -0
- package/agent/skills/basalt-design/references/chart-form.md +43 -0
- package/agent/skills/basalt-design/references/chart-honest.md +35 -0
- package/agent/skills/basalt-design/references/chart-labels.md +32 -0
- package/agent/skills/basalt-design/references/chart-view.md +40 -0
- package/agent/skills/basalt-design/references/charts.md +15 -0
- package/agent/skills/basalt-design/references/concept.md +55 -27
- package/agent/skills/basalt-design/references/controls.md +29 -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 +203 -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 +6 -26
- package/agent/templates/AGENTS-block.site.md.tpl +15 -0
- package/agent/templates/AGENTS-block.tokens.md.tpl +11 -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 +45 -0
- package/agent/templates/_app-error.tpl +43 -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 +19 -0
- package/agent/templates/_app-pending.tpl +16 -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 +64 -0
- package/agent/templates/main.tpl +47 -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 +49 -0
- package/agent/templates/seed-messages.json +74 -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 +803 -0
- package/configs/oxlint-bridge.json +310 -0
- package/configs/oxlint-parts.json +808 -0
- package/configs/oxlint-site.json +353 -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 +29 -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 +270 -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 +102 -0
- package/dist/cards/chain-view.d.ts.map +1 -0
- package/dist/cards/chain-view.js +548 -0
- package/dist/cards/contract.d.ts +187 -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 +352 -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 +359 -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 +191 -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 +62 -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 +259 -0
- package/dist/cards/stat-cell.d.ts +56 -0
- package/dist/cards/stat-cell.d.ts.map +1 -0
- package/dist/cards/stat-cell.js +410 -0
- package/dist/cards/stat-group-shared.d.ts +21 -0
- package/dist/cards/stat-group-shared.d.ts.map +1 -0
- package/dist/cards/stat-group-shared.js +26 -0
- package/dist/cards/stat-group.d.ts +44 -0
- package/dist/cards/stat-group.d.ts.map +1 -0
- package/dist/cards/stat-group.js +183 -0
- package/dist/cards/step-rail.d.ts +45 -0
- package/dist/cards/step-rail.d.ts.map +1 -0
- package/dist/cards/step-rail.js +125 -0
- package/dist/cards/viewport.d.ts +66 -0
- package/dist/cards/viewport.d.ts.map +1 -0
- package/dist/cards/viewport.js +219 -0
- package/dist/charts/axis-gaps.d.ts +170 -0
- package/dist/charts/axis-gaps.d.ts.map +1 -0
- package/dist/charts/axis-gaps.js +310 -0
- package/dist/charts/box.d.ts +8 -2
- package/dist/charts/box.d.ts.map +1 -1
- package/dist/charts/box.js +28 -8
- package/dist/charts/canvas.d.ts +45 -0
- package/dist/charts/canvas.d.ts.map +1 -0
- package/dist/charts/canvas.js +103 -0
- package/dist/charts/card-context.d.ts +6 -0
- package/dist/charts/card-context.d.ts.map +1 -1
- package/dist/charts/card-context.js +5 -0
- package/dist/charts/chart-box.module.css +199 -43
- package/dist/charts/chart-box.module.css.d.ts +2 -0
- package/dist/charts/chart-dates.d.ts +8 -6
- package/dist/charts/chart-dates.d.ts.map +1 -1
- package/dist/charts/chart-dates.js +21 -6
- package/dist/charts/chart-labels-widths.gen.d.ts +22 -0
- package/dist/charts/chart-labels-widths.gen.d.ts.map +1 -0
- package/dist/charts/chart-labels-widths.gen.js +879 -0
- package/dist/charts/chart-labels.d.ts +173 -0
- package/dist/charts/chart-labels.d.ts.map +1 -0
- package/dist/charts/chart-labels.js +93 -0
- package/dist/charts/chart-legend.module.css +50 -5
- package/dist/charts/chart-legend.module.css.d.ts +1 -0
- package/dist/charts/contract.d.ts +647 -0
- package/dist/charts/contract.d.ts.map +1 -0
- package/dist/charts/core/axis-ext.d.ts +86 -0
- package/dist/charts/core/axis-ext.d.ts.map +1 -0
- package/dist/charts/core/axis-ext.js +369 -0
- package/dist/charts/core/bar-values.d.ts +44 -0
- package/dist/charts/core/bar-values.d.ts.map +1 -0
- package/dist/charts/core/bar-values.js +682 -0
- package/dist/charts/core/compile.d.ts +260 -0
- package/dist/charts/core/compile.d.ts.map +1 -0
- package/dist/charts/core/compile.js +2242 -0
- package/dist/charts/core/cursor.d.ts +108 -0
- package/dist/charts/core/cursor.d.ts.map +1 -0
- package/dist/charts/core/cursor.js +256 -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/core/tooltip-said.d.ts +16 -0
- package/dist/charts/core/tooltip-said.d.ts.map +1 -0
- package/dist/charts/core/tooltip-said.js +39 -0
- package/dist/charts/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 +351 -0
- package/dist/charts/parts/chart-panes.d.ts +26 -0
- package/dist/charts/parts/chart-panes.d.ts.map +1 -0
- package/dist/charts/parts/chart-panes.js +70 -0
- package/dist/charts/parts/heatmap-fill.d.ts.map +1 -0
- package/dist/charts/parts/heatmap-ink.d.ts +9 -0
- package/dist/charts/parts/heatmap-ink.d.ts.map +1 -0
- package/dist/charts/parts/heatmap-ink.js +19 -0
- package/dist/charts/parts/heatmap.d.ts +156 -0
- package/dist/charts/parts/heatmap.d.ts.map +1 -0
- package/dist/charts/parts/heatmap.js +450 -0
- package/dist/charts/parts/interval-layout.d.ts +45 -0
- package/dist/charts/parts/interval-layout.d.ts.map +1 -0
- package/dist/charts/parts/interval-layout.js +45 -0
- package/dist/charts/parts/interval-track.d.ts +109 -0
- package/dist/charts/parts/interval-track.d.ts.map +1 -0
- package/dist/charts/parts/interval-track.js +543 -0
- package/dist/charts/parts/legend.d.ts +33 -0
- package/dist/charts/parts/legend.d.ts.map +1 -0
- package/dist/charts/parts/legend.js +62 -0
- package/dist/charts/parts/lines-marks.d.ts +32 -0
- package/dist/charts/parts/lines-marks.d.ts.map +1 -0
- package/dist/charts/parts/lines-marks.js +175 -0
- package/dist/charts/parts/lines.d.ts +35 -0
- package/dist/charts/parts/lines.d.ts.map +1 -0
- package/dist/charts/parts/lines.js +8 -0
- package/dist/charts/parts/range-navigator.d.ts +70 -0
- package/dist/charts/parts/range-navigator.d.ts.map +1 -0
- package/dist/charts/parts/range-navigator.js +128 -0
- package/dist/charts/parts/range-navigator.module.css +50 -0
- package/dist/charts/parts/range-navigator.module.css.d.ts +9 -0
- package/dist/charts/parts/sparkline-probe/both.d.ts +2 -0
- package/dist/charts/parts/sparkline-probe/both.d.ts.map +1 -0
- package/dist/charts/parts/sparkline-probe/both.js +31 -0
- package/dist/charts/parts/sparkline-probe/mini-bars.d.ts +2 -0
- package/dist/charts/parts/sparkline-probe/mini-bars.d.ts.map +1 -0
- package/dist/charts/parts/sparkline-probe/mini-bars.js +17 -0
- package/dist/charts/parts/sparkline-probe/sparkline.d.ts +2 -0
- package/dist/charts/parts/sparkline-probe/sparkline.d.ts.map +1 -0
- package/dist/charts/parts/sparkline-probe/sparkline.js +19 -0
- package/dist/charts/parts/tooltip.d.ts +41 -0
- package/dist/charts/parts/tooltip.d.ts.map +1 -0
- package/dist/charts/parts/tooltip.js +42 -0
- package/dist/charts/parts/waterfall.d.ts +64 -0
- package/dist/charts/parts/waterfall.d.ts.map +1 -0
- package/dist/charts/parts/waterfall.js +112 -0
- package/dist/charts/plot-context.d.ts +4 -1
- package/dist/charts/plot-context.d.ts.map +1 -1
- package/dist/charts/plot-context.js +1 -1
- package/dist/charts/ref-label.d.ts +41 -4
- package/dist/charts/ref-label.d.ts.map +1 -1
- package/dist/charts/ref-label.js +94 -16
- package/dist/charts/seams/bar-opacity.d.ts +6 -0
- package/dist/charts/seams/bar-opacity.d.ts.map +1 -0
- package/dist/charts/seams/bar-opacity.js +8 -0
- package/dist/charts/seams/define.d.ts +51 -0
- package/dist/charts/seams/define.d.ts.map +1 -0
- package/dist/charts/seams/define.js +25 -0
- package/dist/charts/seams/lone-point.d.ts +3 -0
- package/dist/charts/seams/lone-point.d.ts.map +1 -0
- package/dist/charts/seams/lone-point.js +8 -0
- package/dist/charts/seams/pixel-extent.d.ts +23 -0
- package/dist/charts/seams/pixel-extent.d.ts.map +1 -0
- package/dist/charts/seams/pixel-extent.js +23 -0
- package/dist/charts/seams/plot-data.d.ts +3 -0
- package/dist/charts/seams/plot-data.d.ts.map +1 -0
- package/dist/charts/seams/plot-data.js +8 -0
- package/dist/charts/seams/plot-px.d.ts +11 -0
- package/dist/charts/seams/plot-px.d.ts.map +1 -0
- package/dist/charts/seams/plot-px.js +17 -0
- package/dist/charts/seams/plot-scales.d.ts +29 -0
- package/dist/charts/seams/plot-scales.d.ts.map +1 -0
- package/dist/charts/seams/plot-scales.js +33 -0
- package/dist/charts/seams/series-axis.d.ts +3 -0
- package/dist/charts/seams/series-axis.d.ts.map +1 -0
- package/dist/charts/seams/series-axis.js +8 -0
- package/dist/charts/seams/series-dash.d.ts +3 -0
- package/dist/charts/seams/series-dash.d.ts.map +1 -0
- package/dist/charts/seams/series-dash.js +8 -0
- package/dist/charts/seams/series-format.d.ts +3 -0
- package/dist/charts/seams/series-format.d.ts.map +1 -0
- package/dist/charts/seams/series-format.js +8 -0
- package/dist/charts/seams/series-gaps.d.ts +3 -0
- package/dist/charts/seams/series-gaps.d.ts.map +1 -0
- package/dist/charts/seams/series-gaps.js +8 -0
- package/dist/charts/seams/series-legend-tooltip.d.ts +3 -0
- package/dist/charts/seams/series-legend-tooltip.d.ts.map +1 -0
- package/dist/charts/seams/series-legend-tooltip.js +8 -0
- package/dist/charts/seams/series-marker.d.ts +3 -0
- package/dist/charts/seams/series-marker.d.ts.map +1 -0
- package/dist/charts/seams/series-marker.js +8 -0
- package/dist/charts/seams/series-note.d.ts +3 -0
- package/dist/charts/seams/series-note.d.ts.map +1 -0
- package/dist/charts/seams/series-note.js +8 -0
- package/dist/charts/seams/series-parent.d.ts +3 -0
- package/dist/charts/seams/series-parent.d.ts.map +1 -0
- package/dist/charts/seams/series-parent.js +8 -0
- package/dist/charts/seams/series-role.d.ts +3 -0
- package/dist/charts/seams/series-role.d.ts.map +1 -0
- package/dist/charts/seams/series-role.js +8 -0
- package/dist/charts/seams/series-weight.d.ts +3 -0
- package/dist/charts/seams/series-weight.d.ts.map +1 -0
- package/dist/charts/seams/series-weight.js +8 -0
- package/dist/charts/seams/x-domain.d.ts +3 -0
- package/dist/charts/seams/x-domain.d.ts.map +1 -0
- package/dist/charts/seams/x-domain.js +8 -0
- package/dist/charts/seams/y-domain.d.ts +32 -0
- package/dist/charts/seams/y-domain.d.ts.map +1 -0
- package/dist/charts/seams/y-domain.js +93 -0
- package/dist/charts/seams/y-gutter.d.ts +12 -0
- package/dist/charts/seams/y-gutter.d.ts.map +1 -0
- package/dist/charts/seams/y-gutter.js +18 -0
- package/dist/charts/seams.d.ts +18 -0
- package/dist/charts/seams.d.ts.map +1 -0
- package/dist/charts/seams.js +49 -0
- package/dist/charts/sizing.d.ts +11 -0
- package/dist/charts/sizing.d.ts.map +1 -1
- package/dist/charts/sizing.js +6 -2
- package/dist/charts/state.d.ts +2 -2
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +45 -22
- package/dist/charts/text-measure.d.ts +10 -0
- package/dist/charts/text-measure.d.ts.map +1 -0
- package/dist/charts/text-measure.js +26 -0
- package/dist/charts/tooltip-body.d.ts +16 -0
- package/dist/charts/tooltip-body.d.ts.map +1 -0
- package/dist/charts/tooltip-body.js +59 -0
- package/dist/charts/track.d.ts +101 -0
- package/dist/charts/track.d.ts.map +1 -0
- package/dist/charts/track.js +189 -0
- package/dist/charts/types.d.ts +126 -12
- package/dist/charts/types.d.ts.map +1 -1
- package/dist/cli/add/catalog.d.ts +26 -0
- package/dist/cli/add/catalog.d.ts.map +1 -0
- package/dist/cli/add/catalog.js +70 -0
- package/dist/cli/add/help.d.ts +4 -0
- package/dist/cli/add/help.d.ts.map +1 -0
- package/dist/cli/add/help.js +42 -0
- package/dist/cli/add/index.d.ts +6 -0
- package/dist/cli/add/index.d.ts.map +1 -0
- package/dist/cli/add/index.js +157 -0
- package/dist/cli/agent-note.d.ts +21 -0
- package/dist/cli/agent-note.d.ts.map +1 -0
- package/dist/cli/agent-note.js +107 -0
- package/dist/cli/board-freshness.d.ts +6 -4
- package/dist/cli/board-freshness.d.ts.map +1 -1
- package/dist/cli/board-freshness.js +18 -11
- package/dist/cli/budget/index.d.ts +42 -0
- package/dist/cli/budget/index.d.ts.map +1 -0
- package/dist/cli/budget/index.js +102 -0
- package/dist/cli/config.d.ts +15 -143
- 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 +285 -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 +137 -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 +114 -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 +290 -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 +253 -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 +213 -0
- package/dist/cli/eject/dropped-slots.d.ts +6 -0
- package/dist/cli/eject/dropped-slots.d.ts.map +1 -0
- package/dist/cli/eject/dropped-slots.js +9 -0
- package/dist/cli/eject/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 +424 -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 +56 -20
- package/dist/cli/index.d.ts +25 -387
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +78 -855
- 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 +71 -0
- package/dist/cli/init/index.d.ts.map +1 -0
- package/dist/cli/init/index.js +295 -0
- package/dist/cli/init/locales.d.ts +35 -0
- package/dist/cli/init/locales.d.ts.map +1 -0
- package/dist/cli/init/locales.js +99 -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 +214 -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 +196 -0
- package/dist/cli/init/steps.d.ts.map +1 -0
- package/dist/cli/init/steps.js +958 -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/baseline.d.ts +27 -0
- package/dist/cli/lint/baseline.d.ts.map +1 -0
- package/dist/cli/lint/baseline.js +96 -0
- package/dist/cli/lint/engine.d.ts +53 -0
- package/dist/cli/lint/engine.d.ts.map +1 -0
- package/dist/cli/lint/engine.js +263 -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 +227 -0
- package/dist/cli/lint/index.d.ts +25 -0
- package/dist/cli/lint/index.d.ts.map +1 -0
- package/dist/cli/lint/index.js +205 -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 +127 -0
- package/dist/cli/manifest.d.ts.map +1 -0
- package/dist/cli/manifest.js +269 -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 +34 -0
- package/dist/cli/migrate/census.d.ts.map +1 -0
- package/dist/cli/migrate/census.js +230 -0
- package/dist/cli/migrate/index.d.ts +80 -0
- package/dist/cli/migrate/index.d.ts.map +1 -0
- package/dist/cli/migrate/index.js +283 -0
- package/dist/cli/migrate/lost-classes.d.ts +20 -0
- package/dist/cli/migrate/lost-classes.d.ts.map +1 -0
- package/dist/cli/migrate/lost-classes.js +145 -0
- package/dist/cli/migrate/rows.d.ts +130 -0
- package/dist/cli/migrate/rows.d.ts.map +1 -0
- package/dist/cli/migrate/rows.js +222 -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 +45 -0
- package/dist/cli/peers.d.ts +23 -0
- package/dist/cli/peers.d.ts.map +1 -0
- package/dist/cli/peers.js +87 -0
- package/dist/cli/presets.d.ts +39 -0
- package/dist/cli/presets.d.ts.map +1 -0
- package/dist/cli/presets.js +134 -0
- package/dist/cli/resolver.d.ts +22 -0
- package/dist/cli/resolver.d.ts.map +1 -0
- package/dist/cli/resolver.js +59 -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 +45 -4
- package/dist/cli/router-wiring.d.ts.map +1 -1
- package/dist/cli/router-wiring.js +45 -5
- package/dist/cli/shot/board.d.ts +4 -2
- package/dist/cli/shot/board.d.ts.map +1 -1
- package/dist/cli/shot/board.js +35 -60
- package/dist/cli/shot/capture.d.ts +62 -110
- package/dist/cli/shot/capture.d.ts.map +1 -1
- package/dist/cli/shot/capture.js +415 -467
- package/dist/cli/shot/detect.d.ts +1 -13
- package/dist/cli/shot/detect.d.ts.map +1 -1
- package/dist/cli/shot/detect.js +260 -256
- package/dist/cli/shot/facts.d.ts +28 -0
- package/dist/cli/shot/facts.d.ts.map +1 -0
- package/dist/cli/shot/facts.js +184 -0
- package/dist/cli/shot/index.d.ts +14 -20
- package/dist/cli/shot/index.d.ts.map +1 -1
- package/dist/cli/shot/index.js +120 -215
- package/dist/cli/shot/measure.d.ts +9 -27
- package/dist/cli/shot/measure.d.ts.map +1 -1
- package/dist/cli/shot/measure.js +140 -107
- package/dist/cli/shot/playwright.d.ts +27 -27
- package/dist/cli/shot/playwright.d.ts.map +1 -1
- package/dist/cli/shot/playwright.js +16 -11
- package/dist/cli/shot/real-data.js +1 -1
- package/dist/cli/shot/serve.d.ts +8 -2
- package/dist/cli/shot/serve.d.ts.map +1 -1
- package/dist/cli/shot/serve.js +92 -21
- package/dist/cli/shot/types.d.ts +89 -31
- package/dist/cli/shot/types.d.ts.map +1 -1
- package/dist/cli/shot/types.js +49 -9
- package/dist/cli/source-text.d.ts +2 -0
- package/dist/cli/source-text.d.ts.map +1 -1
- package/dist/cli/source-text.js +8 -0
- package/dist/cli/sync/block.d.ts +20 -0
- package/dist/cli/sync/block.d.ts.map +1 -0
- package/dist/cli/sync/block.js +51 -0
- package/dist/cli/sync/blocks.d.ts +12 -0
- package/dist/cli/sync/blocks.d.ts.map +1 -0
- package/dist/cli/sync/blocks.js +111 -0
- package/dist/cli/sync/engine.d.ts +44 -0
- package/dist/cli/sync/engine.d.ts.map +1 -0
- package/dist/cli/sync/engine.js +145 -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 +153 -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 +335 -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 +35 -15
- package/dist/cli/tokens-css.d.ts.map +1 -1
- package/dist/cli/tokens-css.js +202 -77
- package/dist/common/basalt-families.d.ts +6 -0
- package/dist/common/basalt-families.d.ts.map +1 -0
- package/dist/common/basalt-families.js +65 -0
- package/dist/common/basalt-family.d.ts +10 -0
- package/dist/common/basalt-family.d.ts.map +1 -0
- package/dist/common/basalt-family.js +12 -0
- package/dist/common/errors.d.ts +2 -2
- package/dist/common/errors.js +5 -5
- package/dist/common/focus.d.ts +24 -0
- package/dist/common/focus.d.ts.map +1 -0
- package/dist/common/focus.js +47 -0
- package/dist/common/hit-floor.d.ts +1 -1
- package/dist/common/isomorphic-layout-effect.d.ts +3 -3
- package/dist/common/isomorphic-layout-effect.d.ts.map +1 -1
- package/dist/common/nest.d.ts +7 -0
- package/dist/common/nest.d.ts.map +1 -0
- package/dist/common/nest.js +25 -0
- package/dist/common/props.d.ts +7 -30
- package/dist/common/props.d.ts.map +1 -1
- package/dist/common/retry-button.d.ts +4 -2
- package/dist/common/retry-button.d.ts.map +1 -1
- package/dist/common/retry-button.js +3 -2
- package/dist/common/retry-button.module.css +23 -22
- package/dist/common/use-media-query.d.ts +1 -1
- package/dist/common/use-media-query.d.ts.map +1 -1
- package/dist/common/validate.d.ts +1 -1
- package/dist/content/code-block.d.ts +16 -20
- package/dist/content/code-block.d.ts.map +1 -1
- package/dist/content/code-block.js +76 -76
- package/dist/content/contract.d.ts +42 -0
- package/dist/content/contract.d.ts.map +1 -0
- package/dist/content/fence-trust.d.ts +8 -0
- package/dist/content/fence-trust.d.ts.map +1 -0
- package/dist/content/fence-trust.js +5 -0
- package/dist/content/fences.d.ts +42 -0
- package/dist/content/fences.d.ts.map +1 -0
- package/dist/content/fences.js +73 -0
- package/dist/content/headings.d.ts +15 -0
- package/dist/content/headings.d.ts.map +1 -0
- package/dist/content/headings.js +58 -0
- package/dist/content/highlighter.d.ts +20 -1
- package/dist/content/highlighter.d.ts.map +1 -1
- package/dist/content/highlighter.js +57 -6
- package/dist/content/index.d.ts +10 -17
- package/dist/content/index.d.ts.map +1 -1
- package/dist/content/index.js +4 -15
- package/dist/content/markdown.d.ts +25 -152
- package/dist/content/markdown.d.ts.map +1 -1
- package/dist/content/markdown.js +77 -270
- package/dist/content/mermaid.d.ts +9 -32
- package/dist/content/mermaid.d.ts.map +1 -1
- package/dist/content/mermaid.js +73 -51
- package/dist/content/pele-peer.d.ts +10 -0
- package/dist/content/pele-peer.d.ts.map +1 -0
- package/dist/content/pele-peer.js +19 -0
- package/dist/content/sanitize.d.ts +18 -167
- package/dist/content/sanitize.d.ts.map +1 -1
- package/dist/content/sanitize.js +39 -170
- package/dist/controls/appearance-switcher.d.ts +49 -0
- package/dist/controls/appearance-switcher.d.ts.map +1 -0
- package/dist/controls/appearance-switcher.js +176 -0
- package/dist/controls/contract.d.ts +154 -0
- package/dist/controls/contract.d.ts.map +1 -0
- package/dist/controls/control-home.d.ts +44 -0
- package/dist/controls/control-home.d.ts.map +1 -0
- package/dist/controls/control-home.js +74 -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 +52 -0
- package/dist/controls/local-control.d.ts.map +1 -0
- package/dist/controls/local-control.js +24 -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 +367 -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 +21 -0
- package/dist/core/frame-figure.d.ts.map +1 -0
- package/dist/core/frame-figure.js +156 -0
- package/dist/core/frame-head.d.ts +53 -0
- package/dist/core/frame-head.d.ts.map +1 -0
- package/dist/core/frame-head.js +352 -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 +383 -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 +24 -0
- package/dist/core/info-hint.d.ts.map +1 -0
- package/dist/core/info-hint.js +147 -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 +25 -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 +89 -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 +18 -0
- package/dist/core/messages/chain.d.ts.map +1 -0
- package/dist/core/messages/chain.js +14 -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 +33 -0
- package/dist/core/messages/index.d.ts.map +1 -0
- package/dist/core/messages/index.js +63 -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/runs.d.ts +20 -0
- package/dist/core/messages/runs.d.ts.map +1 -0
- package/dist/core/messages/runs.js +18 -0
- package/dist/core/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 +377 -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 +437 -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 +50 -0
- package/dist/core/provider.d.ts.map +1 -0
- package/dist/core/provider.js +41 -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 +25 -0
- package/dist/core/scheme.d.ts.map +1 -0
- package/dist/core/scheme.js +63 -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 +38 -0
- package/dist/core/spark/mini-bars.d.ts.map +1 -0
- package/dist/core/spark/mini-bars.js +227 -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 +324 -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/bridge.css +63 -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 +243 -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 +128 -0
- package/dist/data/optimistic.d.ts +60 -0
- package/dist/data/optimistic.d.ts.map +1 -0
- package/dist/data/optimistic.js +34 -0
- package/dist/data/query-client.d.ts +29 -0
- package/dist/data/query-client.d.ts.map +1 -0
- package/dist/data/query-client.js +35 -0
- package/dist/data/shot-state.d.ts +68 -0
- package/dist/data/shot-state.d.ts.map +1 -0
- package/dist/data/shot-state.js +59 -0
- package/dist/data/synced-runtime.d.ts +90 -0
- package/dist/data/synced-runtime.d.ts.map +1 -0
- package/dist/data/synced-runtime.js +380 -0
- package/dist/data/synced.d.ts +91 -0
- package/dist/data/synced.d.ts.map +1 -0
- package/dist/data/synced.js +110 -0
- package/dist/data/unwrap.d.ts +45 -0
- package/dist/data/unwrap.d.ts.map +1 -0
- package/dist/data/unwrap.js +28 -0
- package/dist/form/contexts.d.ts +2 -0
- package/dist/form/contexts.d.ts.map +1 -0
- package/dist/form/contexts.js +8 -0
- package/dist/form/hook.d.ts +110 -0
- package/dist/form/hook.d.ts.map +1 -0
- package/dist/form/hook.js +60 -0
- package/dist/form/index.d.ts +9 -0
- package/dist/form/index.d.ts.map +1 -0
- package/dist/form/index.js +6 -0
- package/dist/form/parts.d.ts +48 -0
- package/dist/form/parts.d.ts.map +1 -0
- package/dist/form/parts.js +50 -0
- package/dist/format/locale.d.ts +4 -0
- package/dist/format/locale.d.ts.map +1 -0
- package/dist/format/locale.js +4 -0
- package/dist/format/number.d.ts +2 -46
- package/dist/format/number.d.ts.map +1 -1
- package/dist/format/number.js +4 -57
- package/dist/format/shared.d.ts +8 -45
- package/dist/format/shared.d.ts.map +1 -1
- package/dist/format/shared.js +15 -53
- package/dist/index.d.ts +27 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -72
- package/dist/lint/bin.d.ts +13 -0
- package/dist/lint/bin.d.ts.map +1 -0
- package/dist/lint/bin.js +20 -0
- package/dist/lint/blanket-disable.d.ts +23 -0
- package/dist/lint/blanket-disable.d.ts.map +1 -0
- package/dist/lint/blanket-disable.js +85 -0
- package/dist/lint/check-tokens.d.ts +39 -0
- package/dist/lint/check-tokens.d.ts.map +1 -0
- package/dist/lint/check-tokens.js +160 -0
- package/dist/lint/factory.d.ts +101 -0
- package/dist/lint/factory.d.ts.map +1 -0
- package/dist/lint/factory.js +318 -0
- package/dist/lint/generated/gen-site-classes.d.ts +5 -0
- package/dist/lint/generated/gen-site-classes.d.ts.map +1 -0
- package/dist/lint/generated/gen-site-classes.js +45 -0
- package/dist/lint/generated/gen-zone-a.d.ts +4 -0
- package/dist/lint/generated/gen-zone-a.d.ts.map +1 -0
- package/dist/lint/generated/gen-zone-a.js +62 -0
- package/dist/lint/generated/site-classes.d.ts +2 -0
- package/dist/lint/generated/site-classes.d.ts.map +1 -0
- package/dist/lint/generated/site-classes.js +48 -0
- package/dist/lint/generated/zone-a.d.ts +16 -0
- package/dist/lint/generated/zone-a.d.ts.map +1 -0
- package/dist/lint/generated/zone-a.js +90 -0
- package/dist/lint/index.d.ts +4 -0
- package/dist/lint/index.d.ts.map +1 -0
- package/dist/lint/index.js +37 -0
- package/dist/lint/lintable.d.ts +3 -0
- package/dist/lint/lintable.d.ts.map +1 -0
- package/dist/lint/lintable.js +4 -0
- package/dist/lint/preset.d.ts +198 -0
- package/dist/lint/preset.d.ts.map +1 -0
- package/dist/lint/preset.js +449 -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 +455 -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 +831 -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/shadcn.d.ts +562 -0
- package/dist/lint/shadcn.d.ts.map +1 -0
- package/dist/lint/shadcn.js +52 -0
- package/dist/lint/stylelint/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 +39 -0
- package/dist/lint/stylelint/render.d.ts.map +1 -0
- package/dist/lint/stylelint/render.js +69 -0
- package/dist/lint/stylelint/rules.d.ts +76 -0
- package/dist/lint/stylelint/rules.d.ts.map +1 -0
- package/dist/lint/stylelint/rules.js +244 -0
- package/dist/lint/weakened.d.ts +76 -0
- package/dist/lint/weakened.d.ts.map +1 -0
- package/dist/lint/weakened.js +447 -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 +636 -0
- package/dist/messages/es.d.ts +16 -0
- package/dist/messages/es.d.ts.map +1 -0
- package/dist/messages/es.js +641 -0
- package/dist/messages/fr.d.ts +16 -0
- package/dist/messages/fr.d.ts.map +1 -0
- package/dist/messages/fr.js +636 -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 +643 -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/bar-title.d.ts +25 -0
- package/dist/page/bar-title.d.ts.map +1 -0
- package/dist/page/bar-title.js +10 -0
- package/dist/page/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 +305 -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 +52 -0
- package/dist/page/empty-state.d.ts.map +1 -0
- package/dist/page/empty-state.js +78 -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 +50 -0
- package/dist/page/facts.d.ts.map +1 -0
- package/dist/page/facts.js +37 -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 +51 -0
- package/dist/page/index.d.ts.map +1 -0
- package/dist/page/index.js +67 -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 +507 -0
- package/dist/page/page-summary.d.ts +63 -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/run-button.d.ts +26 -0
- package/dist/page/run-button.d.ts.map +1 -0
- package/dist/page/run-button.js +31 -0
- package/dist/page/run-list.d.ts +28 -0
- package/dist/page/run-list.d.ts.map +1 -0
- package/dist/page/run-list.js +88 -0
- package/dist/page/run-queue.d.ts +78 -0
- package/dist/page/run-queue.d.ts.map +1 -0
- package/dist/page/run-queue.js +93 -0
- package/dist/page/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 +35 -0
- package/dist/page/section.d.ts.map +1 -0
- package/dist/page/section.js +114 -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 +273 -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 +311 -193
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +285 -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 +9 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +17 -0
- package/dist/testing/pseudo-locale.d.ts +41 -0
- package/dist/testing/pseudo-locale.d.ts.map +1 -0
- package/dist/testing/pseudo-locale.js +74 -0
- package/dist/testing/quality.d.ts +107 -0
- package/dist/testing/quality.d.ts.map +1 -0
- package/dist/testing/quality.js +557 -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/bridge-sheet.d.ts +21 -0
- package/dist/tokens/bridge-sheet.d.ts.map +1 -0
- package/dist/tokens/bridge-sheet.js +68 -0
- package/dist/tokens/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 +76 -0
- package/dist/tokens/emit.d.ts.map +1 -0
- package/dist/tokens/emit.js +204 -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 +157 -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 +225 -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 +46 -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 +174 -0
- package/dist/ui/meter.d.ts.map +1 -0
- package/dist/ui/meter.guard.d.ts +28 -0
- package/dist/ui/meter.guard.d.ts.map +1 -0
- package/dist/ui/meter.guard.js +46 -0
- package/dist/ui/meter.js +396 -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 +309 -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/remote-pad.d.ts +62 -0
- package/dist/ui/remote-pad.d.ts.map +1 -0
- package/dist/ui/remote-pad.guard.d.ts +21 -0
- package/dist/ui/remote-pad.guard.d.ts.map +1 -0
- package/dist/ui/remote-pad.guard.js +6 -0
- package/dist/ui/remote-pad.js +148 -0
- package/dist/ui/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 +138 -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 +57 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.guard.d.ts +19 -0
- package/dist/ui/skeleton.guard.d.ts.map +1 -0
- package/dist/ui/skeleton.guard.js +12 -0
- package/dist/ui/skeleton.js +55 -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 +61 -0
- package/dist/ui/slots.d.ts.map +1 -0
- package/dist/ui/slots.js +113 -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 +122 -0
- package/dist/vite/doc.d.ts +4 -0
- package/dist/vite/doc.d.ts.map +1 -0
- package/dist/vite/doc.js +102 -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 +73 -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 +146 -0
- package/dist/vite/shell-worker.d.ts +6 -0
- package/dist/vite/shell-worker.d.ts.map +1 -0
- package/dist/vite/shell-worker.js +92 -0
- package/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 +419 -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 +58 -0
- package/docs/bar-title.md +33 -0
- package/docs/bars.md +55 -0
- package/docs/basalt-astro.md +40 -0
- package/docs/basalt-provider.md +41 -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 +122 -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 +58 -0
- package/docs/chart-card-states.md +52 -0
- package/docs/chart-card.md +80 -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 +52 -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 +33 -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-run-queue.md +40 -0
- package/docs/create-synced-state.md +69 -0
- package/docs/data-panel.md +90 -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 +51 -0
- package/docs/empty.md +33 -0
- package/docs/entity.md +63 -0
- package/docs/es.md +29 -0
- package/docs/event-list.md +56 -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 +35 -0
- package/docs/facts.md +37 -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 +69 -0
- package/docs/mini-bars.md +60 -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/pseudo-basalt-messages.md +30 -0
- package/docs/pseudo-messages.md +27 -0
- package/docs/quality.md +39 -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/remote-pad.md +40 -0
- package/docs/resizable.md +58 -0
- package/docs/router-defaults.md +41 -0
- package/docs/row-list.md +67 -0
- package/docs/run-button.md +45 -0
- package/docs/run-list.md +71 -0
- package/docs/schedule.md +59 -0
- package/docs/scroll-area.md +36 -0
- package/docs/section.md +46 -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 +53 -0
- package/docs/slider.md +40 -0
- package/docs/slots.md +28 -0
- package/docs/sortable-list.md +43 -0
- package/docs/sparkline.md +67 -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 +79 -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 +123 -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 +35 -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-runs.md +32 -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 +89 -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 +1991 -1169
- package/migrations/areas/agent.json +10 -0
- package/migrations/areas/ai.json +10 -0
- package/migrations/areas/cards.json +696 -0
- package/migrations/areas/charts.json +898 -0
- package/migrations/areas/cli.json +146 -0
- package/migrations/areas/content.json +268 -0
- package/migrations/areas/controls.json +425 -0
- package/migrations/areas/data.json +133 -0
- package/migrations/areas/legacy-1x.json +663 -0
- package/migrations/areas/lint.json +130 -0
- package/migrations/areas/page.json +251 -0
- package/migrations/areas/removed-2x.json +421 -0
- package/migrations/areas/router.json +144 -0
- package/migrations/areas/shadcn.json +338 -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 +458 -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 +32 -0
- package/src/astro/sources.ts +103 -0
- package/src/cards/bar-list-scroll.tsx +92 -0
- package/src/cards/bar-list.tsx +454 -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 +709 -0
- package/src/cards/contract.ts +200 -0
- package/src/cards/data-panel.tsx +558 -0
- package/src/cards/edge-path.ts +70 -0
- package/src/cards/event-list-model.ts +167 -0
- package/src/cards/event-list.tsx +497 -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 +83 -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 +327 -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 +71 -0
- package/src/cards/stat-card.tsx +330 -0
- package/src/cards/stat-cell.tsx +615 -0
- package/src/cards/stat-group-shared.ts +39 -0
- package/src/cards/stat-group.tsx +356 -0
- package/src/cards/stat-group.type-guard.tsx +146 -0
- package/src/cards/step-rail.tsx +201 -0
- package/src/cards/viewport.ts +310 -0
- package/src/charts/axis-gaps.ts +524 -0
- package/src/charts/box.tsx +44 -10
- package/src/charts/canvas.ts +164 -0
- package/src/charts/card-context.ts +10 -0
- package/src/charts/chart-box.module.css +199 -43
- package/src/charts/chart-box.module.css.d.ts +2 -0
- package/src/charts/chart-dates.ts +32 -14
- package/src/charts/chart-labels-widths.gen.ts +101 -0
- package/src/charts/chart-labels.ts +220 -0
- package/src/charts/chart-legend.module.css +50 -5
- package/src/charts/chart-legend.module.css.d.ts +1 -0
- package/src/charts/contract.ts +707 -0
- package/src/charts/core/axis-ext.ts +569 -0
- package/src/charts/core/bar-values.ts +989 -0
- package/src/charts/core/compile.ts +3424 -0
- package/src/charts/core/cursor.ts +469 -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/core/tooltip-said.ts +55 -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 +261 -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 +524 -0
- package/src/charts/parts/chart-panes.tsx +113 -0
- package/src/charts/parts/heatmap-ink.ts +35 -0
- package/src/charts/parts/heatmap.tsx +735 -0
- package/src/charts/parts/interval-layout.ts +103 -0
- package/src/charts/parts/interval-track.tsx +781 -0
- package/src/charts/parts/legend.tsx +97 -0
- package/src/charts/parts/lines-marks.ts +234 -0
- package/src/charts/parts/lines.tsx +39 -0
- package/src/charts/parts/range-navigator.module.css +50 -0
- package/src/charts/parts/range-navigator.module.css.d.ts +9 -0
- package/src/charts/parts/range-navigator.tsx +226 -0
- package/src/charts/parts/sparkline-probe/both.tsx +25 -0
- package/src/charts/parts/sparkline-probe/mini-bars.tsx +14 -0
- package/src/charts/parts/sparkline-probe/sparkline.tsx +16 -0
- package/src/charts/parts/tooltip.ts +85 -0
- package/src/charts/parts/waterfall.tsx +190 -0
- package/src/charts/plot-context.ts +6 -2
- package/src/charts/ref-label.ts +155 -30
- package/src/charts/seams/bar-opacity.ts +11 -0
- package/src/charts/seams/define.ts +68 -0
- package/src/charts/seams/lone-point.ts +8 -0
- package/src/charts/seams/pixel-extent.ts +43 -0
- package/src/charts/seams/plot-data.ts +8 -0
- package/src/charts/seams/plot-px.ts +23 -0
- package/src/charts/seams/plot-scales.ts +62 -0
- package/src/charts/seams/series-axis.ts +8 -0
- package/src/charts/seams/series-dash.ts +8 -0
- package/src/charts/seams/series-format.ts +8 -0
- package/src/charts/seams/series-gaps.ts +8 -0
- package/src/charts/seams/series-legend-tooltip.ts +8 -0
- package/src/charts/seams/series-marker.ts +8 -0
- package/src/charts/seams/series-note.ts +8 -0
- package/src/charts/seams/series-parent.ts +8 -0
- package/src/charts/seams/series-role.ts +8 -0
- package/src/charts/seams/series-weight.ts +8 -0
- package/src/charts/seams/x-domain.ts +8 -0
- package/src/charts/seams/y-domain.ts +139 -0
- package/src/charts/seams/y-gutter.ts +29 -0
- package/src/charts/seams.ts +66 -0
- package/src/charts/sizing.ts +12 -1
- package/src/charts/state.tsx +51 -28
- package/src/charts/text-measure.ts +57 -0
- package/src/charts/tooltip-body.tsx +98 -0
- package/src/charts/track.ts +370 -0
- package/src/charts/types.ts +124 -12
- package/src/cli/add/catalog.ts +101 -0
- package/src/cli/add/help.ts +35 -0
- package/src/cli/add/index.ts +194 -0
- package/src/cli/agent-note.ts +162 -0
- package/src/cli/board-freshness.ts +21 -7
- package/src/cli/budget/index.ts +149 -0
- package/src/cli/config.ts +17 -159
- package/src/cli/docs/catalog.ts +187 -0
- package/src/cli/docs/index.ts +68 -0
- package/src/cli/doctor/app.ts +388 -0
- package/src/cli/doctor/eject.ts +169 -0
- package/src/cli/doctor/guards.ts +139 -0
- package/src/cli/doctor/hook.ts +375 -0
- package/src/cli/doctor/index.ts +114 -0
- package/src/cli/doctor/install.ts +380 -0
- package/src/cli/doctor/legacy.ts +188 -0
- package/src/cli/doctor/translations.ts +319 -0
- package/src/cli/doctor/types.ts +160 -0
- package/src/cli/doctor/wiring.ts +245 -0
- package/src/cli/eject/dropped-slots.ts +11 -0
- package/src/cli/eject/git.ts +43 -0
- package/src/cli/eject/help.ts +50 -0
- package/src/cli/eject/index.ts +539 -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 +195 -64
- package/src/cli/index.ts +107 -1428
- package/src/cli/init/app-files.ts +133 -0
- package/src/cli/init/index.ts +382 -0
- package/src/cli/init/locales.ts +157 -0
- package/src/cli/init/router-seeds.ts +292 -0
- package/src/cli/init/site.ts +43 -0
- package/src/cli/init/steps.ts +1355 -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/baseline.ts +141 -0
- package/src/cli/lint/engine.ts +372 -0
- package/src/cli/lint/hook.ts +333 -0
- package/src/cli/lint/index.ts +243 -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 +432 -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 +296 -0
- package/src/cli/migrate/index.ts +407 -0
- package/src/cli/migrate/lost-classes.ts +203 -0
- package/src/cli/migrate/rows.ts +368 -0
- package/src/cli/package-manager.ts +65 -0
- package/src/cli/peers.ts +125 -0
- package/src/cli/presets.ts +196 -0
- package/src/cli/resolver.ts +102 -0
- package/src/cli/route-tree.ts +103 -0
- package/src/cli/router-wiring.ts +59 -6
- package/src/cli/shot/board.ts +59 -106
- package/src/cli/shot/capture.ts +552 -672
- package/src/cli/shot/detect.ts +338 -323
- package/src/cli/shot/facts.ts +266 -0
- package/src/cli/shot/index.ts +142 -254
- package/src/cli/shot/measure.ts +192 -143
- package/src/cli/shot/playwright.ts +37 -39
- package/src/cli/shot/serve.ts +115 -27
- package/src/cli/shot/types.ts +118 -36
- package/src/cli/source-text.ts +11 -0
- package/src/cli/sync/block.ts +59 -0
- package/src/cli/sync/blocks.ts +154 -0
- package/src/cli/sync/engine.ts +205 -0
- package/src/cli/sync/formats.ts +74 -0
- package/src/cli/sync/index.ts +201 -0
- package/src/cli/sync/render.ts +499 -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 +271 -96
- package/src/common/basalt-families.ts +68 -0
- package/src/common/basalt-family.ts +21 -0
- package/src/common/errors.ts +2 -2
- package/src/common/focus.ts +65 -0
- package/src/common/hit-floor.ts +1 -1
- package/src/common/isomorphic-layout-effect.ts +1 -1
- package/src/common/nest.ts +32 -0
- package/src/common/props.ts +7 -33
- package/src/common/retry-button.module.css +23 -22
- package/src/common/retry-button.tsx +5 -2
- package/src/common/use-media-query.ts +2 -3
- package/src/common/validate.ts +1 -1
- package/src/content/code-block.tsx +121 -110
- package/src/content/contract.ts +43 -0
- package/src/content/fence-trust.ts +9 -0
- package/src/content/fences.tsx +143 -0
- package/src/content/headings.tsx +96 -0
- package/src/content/highlighter.ts +112 -17
- package/src/content/index.ts +15 -18
- package/src/content/markdown.tsx +156 -622
- package/src/content/mermaid.tsx +104 -98
- package/src/content/pele-peer.ts +28 -0
- package/src/content/sanitize.ts +64 -488
- package/src/controls/appearance-switcher.tsx +239 -0
- package/src/controls/contract.ts +187 -0
- package/src/controls/control-home.tsx +146 -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 +80 -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 +411 -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 +199 -0
- package/src/core/frame-head.tsx +444 -0
- package/src/core/frame-regions.tsx +589 -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 +190 -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 +49 -0
- package/src/core/mark-types.ts +100 -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 +28 -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 +133 -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/runs.ts +40 -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 +505 -0
- package/src/core/popup-position.ts +31 -0
- package/src/core/ports.ts +444 -0
- package/src/core/provider-props.tsx +71 -0
- package/src/core/provider.tsx +108 -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 +85 -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 +310 -0
- package/src/core/spark/sparkline-shared.tsx +391 -0
- package/src/core/spark/sparkline.tsx +399 -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/bridge.css +63 -0
- package/src/css/cursor.css +119 -0
- package/src/css/fonts.css +84 -0
- package/src/css/generate.ts +402 -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 +215 -0
- package/src/data/optimistic.ts +109 -0
- package/src/data/query-client.ts +61 -0
- package/src/data/shot-state.ts +132 -0
- package/src/data/synced-runtime.ts +516 -0
- package/src/data/synced.ts +236 -0
- package/src/data/unwrap.ts +71 -0
- package/src/form/contexts.ts +9 -0
- package/src/form/hook.ts +410 -0
- package/src/form/index.ts +17 -0
- package/src/form/parts.tsx +99 -0
- package/src/format/locale.ts +3 -0
- package/src/format/number.ts +5 -110
- package/src/format/shared.ts +24 -99
- package/src/index.ts +77 -67
- package/src/lint/bin.ts +34 -0
- package/src/lint/blanket-disable.ts +114 -0
- package/src/lint/check-tokens.ts +245 -0
- package/src/lint/factory.ts +443 -0
- package/src/lint/generated/gen-site-classes.ts +58 -0
- package/src/lint/generated/gen-zone-a.ts +95 -0
- package/src/lint/generated/site-classes.ts +46 -0
- package/src/lint/generated/zone-a.ts +88 -0
- package/src/lint/index.ts +49 -0
- package/src/lint/lintable.ts +2 -0
- package/src/lint/preset.ts +773 -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 +567 -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 +1162 -0
- package/src/lint/rules/structure/label-literal.ts +619 -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/shadcn.ts +91 -0
- package/src/lint/stylelint/gen.ts +33 -0
- package/src/lint/stylelint/index.ts +10 -0
- package/src/lint/stylelint/render.ts +119 -0
- package/src/lint/stylelint/rules.ts +360 -0
- package/src/lint/weakened.ts +658 -0
- package/src/lint/weakening-edit.ts +95 -0
- package/src/messages/GLOSSARY.md +65 -0
- package/src/messages/de.ts +728 -0
- package/src/messages/es.ts +731 -0
- package/src/messages/fr.ts +737 -0
- package/src/messages/zh-hans.ts +711 -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/bar-title.tsx +35 -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 +307 -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 +125 -0
- package/src/page/error-cause.ts +18 -0
- package/src/page/facts.tsx +88 -0
- package/src/page/favorites.tsx +180 -0
- package/src/page/index.ts +75 -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 +728 -0
- package/src/page/page-kit.type-guard.tsx +135 -0
- package/src/page/page-summary.tsx +210 -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/run-button.tsx +52 -0
- package/src/page/run-list.tsx +151 -0
- package/src/page/run-queue.ts +185 -0
- package/src/page/search-hint.ts +56 -0
- package/src/page/section.tsx +171 -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 +391 -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 +321 -430
- 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 +9 -0
- package/src/testing/pseudo-locale.ts +149 -0
- package/src/testing/quality.ts +855 -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/bridge-sheet.ts +80 -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 +344 -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 +442 -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 +81 -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 +76 -0
- package/src/ui/meter.tsx +600 -0
- package/src/ui/no-restyle.generated.json +660 -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 +426 -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/remote-pad.guard.ts +24 -0
- package/src/ui/remote-pad.tsx +249 -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 +267 -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 +26 -0
- package/src/ui/skeleton.tsx +101 -0
- package/src/ui/slider.guard.ts +30 -0
- package/src/ui/slider.tsx +114 -0
- package/src/ui/slots.ts +117 -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 +145 -0
- package/src/vite/doc.ts +104 -0
- package/src/vite/ejects.ts +68 -0
- package/src/vite/graph.ts +215 -0
- package/src/vite/head.ts +298 -0
- package/src/vite/index.ts +233 -0
- package/src/vite/shell-worker.ts +115 -0
- package/src/vite/sources.ts +57 -0
- package/src/vite/table-sheet.ts +17 -0
- package/agent/agents/basalt-design-reviewer.md +0 -100
- package/agent/rules/basalt-batteries.md +0 -41
- package/agent/rules/basalt-controls.md +0 -46
- package/agent/rules/basalt-mantine.md +0 -48
- package/agent/skills/basalt-design/references/catalogue.md +0 -58
- package/agent/skills/basalt-design/references/encoding-rules.md +0 -45
- package/agent/skills/basalt-design/references/recipes.md +0 -47
- package/agent/skills/basalt-design/references/stat-tile.md +0 -24
- package/configs/card-inset.test.ts +0 -57
- package/configs/oxlint-basalt.json +0 -28
- package/configs/oxlint-plugin.js +0 -4382
- package/configs/oxlint-plugin.test.ts +0 -4480
- package/configs/oxlint.json +0 -63
- package/dist/agent/ai-sdk-transport.d.ts +0 -48
- package/dist/agent/ai-sdk-transport.d.ts.map +0 -1
- package/dist/agent/ai-sdk-transport.js +0 -206
- package/dist/agent/chat/composer.d.ts +0 -144
- package/dist/agent/chat/composer.d.ts.map +0 -1
- package/dist/agent/chat/composer.js +0 -268
- package/dist/agent/chat/message-affordances.d.ts +0 -60
- package/dist/agent/chat/message-affordances.d.ts.map +0 -1
- package/dist/agent/chat/message-affordances.js +0 -7
- package/dist/agent/chat/thread-feed-row.d.ts +0 -93
- package/dist/agent/chat/thread-feed-row.d.ts.map +0 -1
- package/dist/agent/chat/thread-feed-row.js +0 -192
- package/dist/agent/chat/thread-feed.d.ts +0 -58
- package/dist/agent/chat/thread-feed.d.ts.map +0 -1
- package/dist/agent/chat/thread-feed.js +0 -86
- package/dist/agent/chat/thread-message.d.ts +0 -74
- package/dist/agent/chat/thread-message.d.ts.map +0 -1
- package/dist/agent/chat/thread-message.js +0 -367
- package/dist/agent/chat/thread-outcome-card.d.ts +0 -20
- package/dist/agent/chat/thread-outcome-card.d.ts.map +0 -1
- package/dist/agent/chat/thread-outcome-card.js +0 -112
- package/dist/agent/chat/tool-chip.d.ts +0 -22
- package/dist/agent/chat/tool-chip.d.ts.map +0 -1
- package/dist/agent/chat/tool-chip.js +0 -125
- package/dist/agent/chat/use-keyboard-inset.d.ts +0 -2
- package/dist/agent/chat/use-keyboard-inset.d.ts.map +0 -1
- package/dist/agent/chat/use-keyboard-inset.js +0 -34
- package/dist/agent/chat/virtualize.d.ts +0 -162
- package/dist/agent/chat/virtualize.d.ts.map +0 -1
- package/dist/agent/chat/virtualize.js +0 -24
- package/dist/agent/coalesce.d.ts +0 -42
- package/dist/agent/coalesce.d.ts.map +0 -1
- package/dist/agent/coalesce.js +0 -137
- package/dist/agent/error.d.ts +0 -46
- package/dist/agent/error.d.ts.map +0 -1
- package/dist/agent/error.js +0 -18
- package/dist/agent/foreign.d.ts +0 -98
- package/dist/agent/foreign.d.ts.map +0 -1
- package/dist/agent/foreign.js +0 -18
- package/dist/agent/history.d.ts +0 -23
- package/dist/agent/history.d.ts.map +0 -1
- package/dist/agent/id.d.ts +0 -112
- package/dist/agent/id.d.ts.map +0 -1
- package/dist/agent/id.js +0 -44
- package/dist/agent/index.d.ts +0 -28
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/agent/index.js +0 -18
- package/dist/agent/merge.d.ts +0 -8
- package/dist/agent/merge.d.ts.map +0 -1
- package/dist/agent/merge.js +0 -35
- package/dist/agent/outcome.d.ts +0 -60
- package/dist/agent/outcome.d.ts.map +0 -1
- package/dist/agent/part-list.d.ts +0 -90
- package/dist/agent/part-list.d.ts.map +0 -1
- package/dist/agent/part-list.js +0 -185
- package/dist/agent/parts.d.ts +0 -205
- package/dist/agent/parts.d.ts.map +0 -1
- package/dist/agent/parts.js +0 -176
- package/dist/agent/run-committer.d.ts +0 -23
- package/dist/agent/run-committer.d.ts.map +0 -1
- package/dist/agent/run-committer.js +0 -41
- package/dist/agent/run-records.d.ts +0 -86
- package/dist/agent/run-records.d.ts.map +0 -1
- package/dist/agent/run-records.js +0 -82
- package/dist/agent/stick-to-bottom.d.ts +0 -20
- package/dist/agent/stick-to-bottom.d.ts.map +0 -1
- package/dist/agent/stick-to-bottom.js +0 -77
- package/dist/agent/thread.d.ts +0 -118
- package/dist/agent/thread.d.ts.map +0 -1
- package/dist/agent/thread.js +0 -6
- package/dist/agent/transport.d.ts +0 -78
- package/dist/agent/transport.d.ts.map +0 -1
- package/dist/agent/transport.js +0 -6
- package/dist/agent/use-agent-thread-runs.d.ts +0 -147
- package/dist/agent/use-agent-thread-runs.d.ts.map +0 -1
- package/dist/agent/use-agent-thread-runs.js +0 -476
- package/dist/charts/BandStrip.d.ts +0 -62
- package/dist/charts/BandStrip.d.ts.map +0 -1
- package/dist/charts/BandStrip.js +0 -310
- package/dist/charts/Bars.d.ts +0 -19
- package/dist/charts/Bars.d.ts.map +0 -1
- package/dist/charts/Bars.js +0 -144
- package/dist/charts/CartesianChart.d.ts +0 -72
- package/dist/charts/CartesianChart.d.ts.map +0 -1
- package/dist/charts/CartesianChart.js +0 -139
- package/dist/charts/ChartCard.d.ts +0 -91
- package/dist/charts/ChartCard.d.ts.map +0 -1
- package/dist/charts/ChartCard.js +0 -272
- package/dist/charts/Donut.d.ts +0 -25
- package/dist/charts/Donut.d.ts.map +0 -1
- package/dist/charts/Donut.js +0 -203
- package/dist/charts/DualPanel.d.ts +0 -51
- package/dist/charts/DualPanel.d.ts.map +0 -1
- package/dist/charts/DualPanel.js +0 -246
- package/dist/charts/Heatmap.d.ts +0 -84
- package/dist/charts/Heatmap.d.ts.map +0 -1
- package/dist/charts/Heatmap.js +0 -294
- package/dist/charts/Lines.d.ts +0 -14
- package/dist/charts/Lines.d.ts.map +0 -1
- package/dist/charts/Lines.js +0 -106
- package/dist/charts/MirroredBars.d.ts +0 -55
- package/dist/charts/MirroredBars.d.ts.map +0 -1
- package/dist/charts/MirroredBars.js +0 -221
- package/dist/charts/Sparkline.d.ts +0 -70
- package/dist/charts/Sparkline.d.ts.map +0 -1
- package/dist/charts/Sparkline.js +0 -652
- package/dist/charts/StackedArea.d.ts +0 -18
- package/dist/charts/StackedArea.d.ts.map +0 -1
- package/dist/charts/StackedArea.js +0 -56
- package/dist/charts/band-fold.d.ts +0 -65
- package/dist/charts/band-fold.d.ts.map +0 -1
- package/dist/charts/band-fold.js +0 -46
- package/dist/charts/chart-card.module.css +0 -142
- package/dist/charts/chart-card.module.css.d.ts +0 -20
- package/dist/charts/compile.d.ts +0 -146
- package/dist/charts/compile.d.ts.map +0 -1
- package/dist/charts/compile.js +0 -905
- package/dist/charts/cursor.d.ts +0 -93
- package/dist/charts/cursor.d.ts.map +0 -1
- package/dist/charts/cursor.js +0 -211
- package/dist/charts/donut.module.css +0 -54
- package/dist/charts/donut.module.css.d.ts +0 -9
- package/dist/charts/heatmap-fill.d.ts.map +0 -1
- package/dist/charts/panel.d.ts +0 -65
- package/dist/charts/panel.d.ts.map +0 -1
- package/dist/charts/panel.js +0 -130
- package/dist/charts/scales.d.ts +0 -52
- package/dist/charts/scales.d.ts.map +0 -1
- package/dist/charts/scales.js +0 -194
- package/dist/charts/sparkline.module.css +0 -166
- package/dist/charts/sparkline.module.css.d.ts +0 -16
- package/dist/charts/theme.d.ts +0 -40
- package/dist/charts/theme.d.ts.map +0 -1
- package/dist/charts/theme.js +0 -52
- package/dist/charts/ticks.d.ts.map +0 -1
- package/dist/charts/ticks.js +0 -42
- package/dist/cli/audit-allows.d.ts +0 -11
- package/dist/cli/audit-allows.d.ts.map +0 -1
- package/dist/cli/audit-allows.js +0 -240
- package/dist/cli/check-theme.d.ts +0 -10
- package/dist/cli/check-theme.d.ts.map +0 -1
- package/dist/cli/check-theme.js +0 -154
- package/dist/cli/doctor-upgrade.d.ts +0 -86
- package/dist/cli/doctor-upgrade.d.ts.map +0 -1
- package/dist/cli/doctor-upgrade.js +0 -509
- package/dist/cli/doctor.d.ts +0 -38
- package/dist/cli/doctor.d.ts.map +0 -1
- package/dist/cli/doctor.js +0 -352
- package/dist/cli/guard-hook.d.ts +0 -9
- package/dist/cli/guard-hook.d.ts.map +0 -1
- package/dist/cli/guard-hook.js +0 -59
- package/dist/cli/init.d.ts +0 -12
- package/dist/cli/init.d.ts.map +0 -1
- package/dist/cli/init.js +0 -349
- package/dist/cli/provider-tags.d.ts +0 -12
- package/dist/cli/provider-tags.d.ts.map +0 -1
- package/dist/cli/provider-tags.js +0 -28
- package/dist/cli/render-imports.d.ts +0 -24
- package/dist/cli/render-imports.d.ts.map +0 -1
- package/dist/cli/render-imports.js +0 -74
- package/dist/cli/sync.d.ts +0 -27
- package/dist/cli/sync.d.ts.map +0 -1
- package/dist/cli/sync.js +0 -243
- package/dist/commands/ShortcutsHelp.d.ts +0 -18
- package/dist/commands/ShortcutsHelp.d.ts.map +0 -1
- package/dist/commands/ShortcutsHelp.js +0 -69
- package/dist/commands/command-stash.d.ts +0 -15
- package/dist/commands/command-stash.d.ts.map +0 -1
- package/dist/commands/command-stash.js +0 -31
- package/dist/commands/define-commands.d.ts +0 -123
- package/dist/commands/define-commands.d.ts.map +0 -1
- package/dist/commands/define-commands.js +0 -18
- package/dist/commands/define-overlays.d.ts +0 -221
- package/dist/commands/define-overlays.d.ts.map +0 -1
- package/dist/commands/define-overlays.js +0 -140
- package/dist/commands/index.d.ts +0 -26
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -17
- package/dist/commands/notifications/bell.d.ts +0 -16
- package/dist/commands/notifications/bell.d.ts.map +0 -1
- package/dist/commands/notifications/bell.js +0 -101
- package/dist/commands/notifications/center.d.ts +0 -31
- package/dist/commands/notifications/center.d.ts.map +0 -1
- package/dist/commands/notifications/center.js +0 -130
- package/dist/commands/notifications/define-notifications.d.ts +0 -142
- package/dist/commands/notifications/define-notifications.d.ts.map +0 -1
- package/dist/commands/notifications/define-notifications.js +0 -28
- package/dist/commands/notifications/notify.d.ts +0 -44
- package/dist/commands/notifications/notify.d.ts.map +0 -1
- package/dist/commands/notifications/notify.js +0 -79
- package/dist/commands/notifications/store.d.ts +0 -129
- package/dist/commands/notifications/store.d.ts.map +0 -1
- package/dist/commands/notifications/store.js +0 -117
- package/dist/commands/projectors.d.ts +0 -22
- package/dist/commands/projectors.d.ts.map +0 -1
- package/dist/commands/projectors.js +0 -16
- package/dist/commands/shell-bridge.d.ts +0 -57
- package/dist/commands/shell-bridge.d.ts.map +0 -1
- package/dist/commands/shell-bridge.js +0 -32
- package/dist/commands/shortcut-format.d.ts +0 -54
- package/dist/commands/shortcut-format.d.ts.map +0 -1
- package/dist/commands/shortcut-format.js +0 -63
- package/dist/common/could-not-load.d.ts +0 -13
- package/dist/common/could-not-load.d.ts.map +0 -1
- package/dist/common/could-not-load.js +0 -14
- package/dist/common/index.d.ts +0 -18
- package/dist/common/index.d.ts.map +0 -1
- package/dist/common/index.js +0 -30
- package/dist/common/motion.d.ts +0 -29
- package/dist/common/motion.d.ts.map +0 -1
- package/dist/common/motion.js +0 -12
- package/dist/common/query-state-like.d.ts +0 -43
- package/dist/common/query-state-like.d.ts.map +0 -1
- package/dist/common/query-state-like.js +0 -20
- package/dist/common/refs.d.ts +0 -29
- package/dist/common/refs.d.ts.map +0 -1
- package/dist/common/refs.js +0 -29
- package/dist/common/use-measured-widths.d.ts +0 -37
- package/dist/common/use-measured-widths.d.ts.map +0 -1
- package/dist/common/use-measured-widths.js +0 -53
- package/dist/common/virtual-rows.d.ts +0 -196
- package/dist/common/virtual-rows.d.ts.map +0 -1
- package/dist/common/virtual-rows.js +0 -290
- package/dist/common/vx-families.d.ts +0 -7
- package/dist/common/vx-families.d.ts.map +0 -1
- package/dist/common/vx-families.js +0 -32
- package/dist/common/vx-family.d.ts +0 -11
- package/dist/common/vx-family.d.ts.map +0 -1
- package/dist/common/vx-family.js +0 -12
- package/dist/content/article-layout.d.ts +0 -63
- package/dist/content/article-layout.d.ts.map +0 -1
- package/dist/content/article-layout.js +0 -111
- package/dist/content/article-layout.module.css +0 -183
- package/dist/content/article-layout.module.css.d.ts +0 -23
- package/dist/content/article-model.d.ts +0 -17
- package/dist/content/article-model.d.ts.map +0 -1
- package/dist/content/article-model.js +0 -13
- package/dist/content/callout-alert.d.ts +0 -27
- package/dist/content/callout-alert.d.ts.map +0 -1
- package/dist/content/callout-alert.js +0 -59
- package/dist/content/callout.d.ts +0 -28
- package/dist/content/callout.d.ts.map +0 -1
- package/dist/content/callout.js +0 -75
- package/dist/content/callout.module.css +0 -89
- package/dist/content/callout.module.css.d.ts +0 -17
- package/dist/content/code-block.module.css +0 -135
- package/dist/content/code-block.module.css.d.ts +0 -14
- package/dist/content/copy-action.d.ts +0 -29
- package/dist/content/copy-action.d.ts.map +0 -1
- package/dist/content/copy-action.js +0 -46
- package/dist/content/fence-block.d.ts +0 -46
- package/dist/content/fence-block.d.ts.map +0 -1
- package/dist/content/fence-block.js +0 -89
- package/dist/content/glyphs.d.ts +0 -18
- package/dist/content/glyphs.d.ts.map +0 -1
- package/dist/content/glyphs.js +0 -43
- package/dist/content/guide.d.ts +0 -48
- package/dist/content/guide.d.ts.map +0 -1
- package/dist/content/guide.js +0 -119
- package/dist/content/guide.module.css +0 -62
- package/dist/content/guide.module.css.d.ts +0 -13
- package/dist/content/heading-anchor.d.ts +0 -30
- package/dist/content/heading-anchor.d.ts.map +0 -1
- package/dist/content/heading-anchor.js +0 -37
- package/dist/content/heading-components.d.ts +0 -5
- package/dist/content/heading-components.d.ts.map +0 -1
- package/dist/content/heading-components.js +0 -44
- package/dist/content/mermaid-sanitize.d.ts +0 -15
- package/dist/content/mermaid-sanitize.d.ts.map +0 -1
- package/dist/content/mermaid-sanitize.js +0 -28
- package/dist/content/mermaid.module.css +0 -20
- package/dist/content/mermaid.module.css.d.ts +0 -8
- package/dist/content/prose.d.ts +0 -29
- package/dist/content/prose.d.ts.map +0 -1
- package/dist/content/prose.js +0 -24
- package/dist/content/prose.module.css +0 -346
- package/dist/content/prose.module.css.d.ts +0 -12
- package/dist/content/reading-progress.d.ts +0 -26
- package/dist/content/reading-progress.d.ts.map +0 -1
- package/dist/content/reading-progress.js +0 -54
- package/dist/content/reading-progress.module.css +0 -24
- package/dist/content/reading-progress.module.css.d.ts +0 -9
- package/dist/content/slug.d.ts.map +0 -1
- package/dist/content/slug.js +0 -21
- package/dist/content/toc-click-pin.d.ts.map +0 -1
- package/dist/content/toc-click-pin.js +0 -111
- package/dist/content/toc-spy.d.ts.map +0 -1
- package/dist/content/toc.d.ts +0 -50
- package/dist/content/toc.d.ts.map +0 -1
- package/dist/content/toc.js +0 -136
- package/dist/content/toc.module.css +0 -54
- package/dist/content/toc.module.css.d.ts +0 -13
- package/dist/content/url-hardening.d.ts +0 -23
- package/dist/content/url-hardening.d.ts.map +0 -1
- package/dist/content/url-hardening.js +0 -25
- package/dist/controls/actions.d.ts +0 -250
- package/dist/controls/actions.d.ts.map +0 -1
- package/dist/controls/actions.js +0 -466
- package/dist/controls/actions.module.css +0 -75
- package/dist/controls/actions.module.css.d.ts +0 -14
- package/dist/controls/control-group.d.ts +0 -19
- package/dist/controls/control-group.d.ts.map +0 -1
- package/dist/controls/control-group.js +0 -27
- package/dist/controls/control-name.d.ts +0 -27
- package/dist/controls/control-name.d.ts.map +0 -1
- package/dist/controls/control-name.js +0 -11
- package/dist/controls/controls.module.css +0 -549
- package/dist/controls/controls.module.css.d.ts +0 -35
- package/dist/controls/enum-filter.d.ts +0 -40
- package/dist/controls/enum-filter.d.ts.map +0 -1
- package/dist/controls/enum-filter.js +0 -109
- package/dist/controls/filter-base.d.ts +0 -30
- package/dist/controls/filter-base.d.ts.map +0 -1
- package/dist/controls/filter-context.d.ts +0 -74
- package/dist/controls/filter-context.d.ts.map +0 -1
- package/dist/controls/filter-context.js +0 -73
- package/dist/controls/filter-pill.d.ts +0 -62
- package/dist/controls/filter-pill.d.ts.map +0 -1
- package/dist/controls/filter-pill.js +0 -103
- package/dist/controls/filter-sheet.d.ts +0 -25
- package/dist/controls/filter-sheet.d.ts.map +0 -1
- package/dist/controls/filter-sheet.js +0 -33
- package/dist/controls/form-layout.d.ts +0 -162
- package/dist/controls/form-layout.d.ts.map +0 -1
- package/dist/controls/form-layout.js +0 -172
- package/dist/controls/form-layout.module.css +0 -268
- package/dist/controls/form-layout.module.css.d.ts +0 -22
- package/dist/controls/glyphs.d.ts +0 -37
- package/dist/controls/glyphs.d.ts.map +0 -1
- package/dist/controls/glyphs.js +0 -63
- package/dist/controls/multi-select-filter.d.ts +0 -45
- package/dist/controls/multi-select-filter.d.ts.map +0 -1
- package/dist/controls/multi-select-filter.js +0 -204
- package/dist/controls/number-filter.d.ts +0 -23
- package/dist/controls/number-filter.d.ts.map +0 -1
- package/dist/controls/number-filter.js +0 -195
- package/dist/controls/panel-row.d.ts +0 -129
- package/dist/controls/panel-row.d.ts.map +0 -1
- package/dist/controls/panel-row.js +0 -176
- package/dist/controls/panel-row.module.css +0 -86
- package/dist/controls/panel-row.module.css.d.ts +0 -13
- package/dist/controls/range-filter.d.ts +0 -45
- package/dist/controls/range-filter.d.ts.map +0 -1
- package/dist/controls/range-filter.js +0 -139
- package/dist/controls/search-filter.d.ts +0 -15
- package/dist/controls/search-filter.d.ts.map +0 -1
- package/dist/controls/search-filter.js +0 -135
- package/dist/controls/select-filter.d.ts +0 -63
- package/dist/controls/select-filter.d.ts.map +0 -1
- package/dist/controls/select-filter.js +0 -14
- package/dist/controls/sync-button.d.ts +0 -36
- package/dist/controls/sync-button.d.ts.map +0 -1
- package/dist/controls/sync-button.js +0 -118
- package/dist/controls/sync-button.module.css +0 -96
- package/dist/controls/sync-button.module.css.d.ts +0 -12
- package/dist/controls/toggle-filter.d.ts +0 -11
- package/dist/controls/toggle-filter.d.ts.map +0 -1
- package/dist/controls/toggle-filter.js +0 -60
- package/dist/controls/uncontrolled.d.ts +0 -12
- package/dist/controls/uncontrolled.d.ts.map +0 -1
- package/dist/controls-dates/date-range-picker.d.ts +0 -4
- package/dist/controls-dates/date-range-picker.d.ts.map +0 -1
- package/dist/controls-dates/date-range-picker.js +0 -23
- package/dist/controls-dates/index.d.ts +0 -8
- package/dist/controls-dates/index.d.ts.map +0 -1
- package/dist/controls-dates/index.js +0 -4
- package/dist/dashboard/bar-list.d.ts +0 -48
- package/dist/dashboard/bar-list.d.ts.map +0 -1
- package/dist/dashboard/bar-list.js +0 -117
- package/dist/dashboard/bar-list.module.css +0 -258
- package/dist/dashboard/bar-list.module.css.d.ts +0 -20
- package/dist/dashboard/board-nav.d.ts +0 -22
- package/dist/dashboard/board-nav.d.ts.map +0 -1
- package/dist/dashboard/board-nav.js +0 -49
- package/dist/dashboard/board.d.ts +0 -52
- package/dist/dashboard/board.d.ts.map +0 -1
- package/dist/dashboard/board.js +0 -247
- package/dist/dashboard/board.module.css +0 -179
- package/dist/dashboard/board.module.css.d.ts +0 -28
- package/dist/dashboard/delta-badge.d.ts +0 -24
- package/dist/dashboard/delta-badge.d.ts.map +0 -1
- package/dist/dashboard/delta-badge.js +0 -41
- package/dist/dashboard/empty-state.d.ts +0 -23
- package/dist/dashboard/empty-state.d.ts.map +0 -1
- package/dist/dashboard/empty-state.js +0 -82
- package/dist/dashboard/event-list-model.d.ts +0 -54
- package/dist/dashboard/event-list-model.d.ts.map +0 -1
- package/dist/dashboard/event-list-model.js +0 -76
- package/dist/dashboard/event-list-rows.d.ts +0 -23
- package/dist/dashboard/event-list-rows.d.ts.map +0 -1
- package/dist/dashboard/event-list-rows.js +0 -89
- package/dist/dashboard/event-list-scroll.d.ts +0 -55
- package/dist/dashboard/event-list-scroll.d.ts.map +0 -1
- package/dist/dashboard/event-list-scroll.js +0 -216
- package/dist/dashboard/event-list-skeleton.d.ts +0 -10
- package/dist/dashboard/event-list-skeleton.d.ts.map +0 -1
- package/dist/dashboard/event-list-skeleton.js +0 -34
- package/dist/dashboard/event-list.d.ts +0 -65
- package/dist/dashboard/event-list.d.ts.map +0 -1
- package/dist/dashboard/event-list.js +0 -208
- package/dist/dashboard/event-list.module.css +0 -336
- package/dist/dashboard/event-list.module.css.d.ts +0 -34
- package/dist/dashboard/index.d.ts +0 -15
- package/dist/dashboard/index.d.ts.map +0 -1
- package/dist/dashboard/index.js +0 -28
- package/dist/dashboard/meter-model.d.ts +0 -300
- package/dist/dashboard/meter-model.d.ts.map +0 -1
- package/dist/dashboard/meter-model.js +0 -484
- package/dist/dashboard/meter-parts.d.ts +0 -61
- package/dist/dashboard/meter-parts.d.ts.map +0 -1
- package/dist/dashboard/meter-parts.js +0 -684
- package/dist/dashboard/meter.d.ts +0 -144
- package/dist/dashboard/meter.d.ts.map +0 -1
- package/dist/dashboard/meter.js +0 -89
- package/dist/dashboard/meter.module.css +0 -470
- package/dist/dashboard/meter.module.css.d.ts +0 -47
- package/dist/dashboard/page-summary.d.ts +0 -20
- package/dist/dashboard/page-summary.d.ts.map +0 -1
- package/dist/dashboard/page-summary.js +0 -33
- package/dist/dashboard/page-summary.module.css +0 -92
- package/dist/dashboard/page-summary.module.css.d.ts +0 -15
- package/dist/dashboard/query-state.d.ts +0 -148
- package/dist/dashboard/query-state.d.ts.map +0 -1
- package/dist/dashboard/query-state.js +0 -217
- package/dist/dashboard/scale.d.ts +0 -9
- package/dist/dashboard/scale.d.ts.map +0 -1
- package/dist/dashboard/scale.js +0 -10
- package/dist/dashboard/section.d.ts +0 -95
- package/dist/dashboard/section.d.ts.map +0 -1
- package/dist/dashboard/section.js +0 -162
- package/dist/dashboard/section.module.css +0 -134
- package/dist/dashboard/section.module.css.d.ts +0 -12
- package/dist/dashboard/settings-section.d.ts +0 -39
- package/dist/dashboard/settings-section.d.ts.map +0 -1
- package/dist/dashboard/settings-section.js +0 -113
- package/dist/dashboard/settings-section.module.css +0 -54
- package/dist/dashboard/settings-section.module.css.d.ts +0 -12
- package/dist/dashboard/stat-card-parts.d.ts +0 -46
- package/dist/dashboard/stat-card-parts.d.ts.map +0 -1
- package/dist/dashboard/stat-card-parts.js +0 -75
- package/dist/dashboard/stat-card.d.ts +0 -141
- package/dist/dashboard/stat-card.d.ts.map +0 -1
- package/dist/dashboard/stat-card.js +0 -281
- package/dist/dashboard/stat-card.module.css +0 -508
- package/dist/dashboard/stat-card.module.css.d.ts +0 -39
- package/dist/dashboard/stat-group.d.ts +0 -56
- package/dist/dashboard/stat-group.d.ts.map +0 -1
- package/dist/dashboard/stat-group.js +0 -47
- package/dist/dashboard/stat-group.module.css +0 -124
- package/dist/dashboard/stat-group.module.css.d.ts +0 -9
- package/dist/dashboard/stat-strip.d.ts +0 -93
- package/dist/dashboard/stat-strip.d.ts.map +0 -1
- package/dist/dashboard/stat-strip.js +0 -273
- package/dist/dashboard/stat-strip.module.css +0 -395
- package/dist/dashboard/stat-strip.module.css.d.ts +0 -41
- package/dist/dashboard/visual-slot.d.ts +0 -16
- package/dist/dashboard/visual-slot.d.ts.map +0 -1
- package/dist/dashboard/visual-slot.js +0 -11
- package/dist/dashboard/widget-header.d.ts +0 -142
- package/dist/dashboard/widget-header.d.ts.map +0 -1
- package/dist/dashboard/widget-header.js +0 -219
- package/dist/dashboard/widget-header.module.css +0 -486
- package/dist/dashboard/widget-header.module.css.d.ts +0 -27
- package/dist/dev-dock.d.ts +0 -26
- package/dist/dev-dock.d.ts.map +0 -1
- package/dist/dev-dock.js +0 -90
- package/dist/format/date.d.ts +0 -61
- package/dist/format/date.d.ts.map +0 -1
- package/dist/format/date.js +0 -144
- package/dist/format/index.d.ts +0 -25
- package/dist/format/index.d.ts.map +0 -1
- package/dist/format/index.js +0 -22
- package/dist/format/measure.d.ts +0 -15
- package/dist/format/measure.d.ts.map +0 -1
- package/dist/format/measure.js +0 -27
- package/dist/forms/create-form.d.ts +0 -31
- package/dist/forms/create-form.d.ts.map +0 -1
- package/dist/forms/create-form.js +0 -18
- package/dist/forms/field.d.ts +0 -86
- package/dist/forms/field.d.ts.map +0 -1
- package/dist/forms/field.js +0 -10
- package/dist/forms/form-state.d.ts +0 -42
- package/dist/forms/form-state.d.ts.map +0 -1
- package/dist/forms/form-state.js +0 -26
- package/dist/forms/index.d.ts +0 -18
- package/dist/forms/index.d.ts.map +0 -1
- package/dist/forms/index.js +0 -7
- package/dist/guard/fonts-hint.d.ts +0 -3
- package/dist/guard/fonts-hint.d.ts.map +0 -1
- package/dist/guard/fonts-hint.js +0 -4
- package/dist/guard/guard-hook.d.ts +0 -40
- package/dist/guard/guard-hook.d.ts.map +0 -1
- package/dist/guard/guard-hook.js +0 -57
- package/dist/guard/index.d.ts +0 -431
- package/dist/guard/index.d.ts.map +0 -1
- package/dist/guard/index.js +0 -1313
- package/dist/guard/palette.d.ts +0 -51
- package/dist/guard/palette.d.ts.map +0 -1
- package/dist/guard/palette.js +0 -190
- package/dist/guard/series-file.d.ts +0 -15
- package/dist/guard/series-file.d.ts.map +0 -1
- package/dist/guard/series-file.js +0 -29
- package/dist/guard/types.d.ts +0 -181
- package/dist/guard/types.d.ts.map +0 -1
- package/dist/guard/vx-names.d.ts +0 -3
- package/dist/guard/vx-names.d.ts.map +0 -1
- package/dist/guard/vx-names.js +0 -228
- package/dist/provider/create-router.d.ts +0 -96
- package/dist/provider/create-router.d.ts.map +0 -1
- package/dist/provider/create-router.js +0 -55
- package/dist/provider/error-fallback.module.css +0 -10
- package/dist/provider/error-fallback.module.css.d.ts +0 -8
- package/dist/provider/fallback.module.css +0 -37
- package/dist/provider/fallback.module.css.d.ts +0 -11
- package/dist/provider/hotkeys.d.ts +0 -4
- package/dist/provider/hotkeys.d.ts.map +0 -1
- package/dist/provider/hotkeys.js +0 -45
- package/dist/provider/index.d.ts +0 -120
- package/dist/provider/index.d.ts.map +0 -1
- package/dist/provider/index.js +0 -335
- package/dist/provider/lab-theme.d.ts +0 -40
- package/dist/provider/lab-theme.d.ts.map +0 -1
- package/dist/provider/lab-theme.js +0 -51
- package/dist/provider/modals-mount.d.ts +0 -16
- package/dist/provider/modals-mount.d.ts.map +0 -1
- package/dist/provider/modals-mount.js +0 -42
- package/dist/provider/notifier.d.ts +0 -22
- package/dist/provider/notifier.d.ts.map +0 -1
- package/dist/provider/notifier.js +0 -36
- package/dist/provider/route-defaults.d.ts +0 -10
- package/dist/provider/route-defaults.d.ts.map +0 -1
- package/dist/provider/route-defaults.js +0 -25
- package/dist/provider/route-defaults.module.css +0 -39
- package/dist/provider/route-defaults.module.css.d.ts +0 -10
- package/dist/provider/route-transition.d.ts +0 -76
- package/dist/provider/route-transition.d.ts.map +0 -1
- package/dist/provider/route-transition.js +0 -98
- package/dist/provider/slots.d.ts +0 -25
- package/dist/provider/slots.d.ts.map +0 -1
- package/dist/provider/slots.js +0 -29
- package/dist/provider/spotlight-actions.d.ts +0 -11
- package/dist/provider/spotlight-actions.d.ts.map +0 -1
- package/dist/provider/spotlight-actions.js +0 -56
- package/dist/provider/spotlight-mount.d.ts +0 -3
- package/dist/provider/spotlight-mount.d.ts.map +0 -1
- package/dist/provider/spotlight-mount.js +0 -26
- package/dist/provider/test-router.d.ts +0 -7
- package/dist/provider/test-router.d.ts.map +0 -1
- package/dist/provider/test-router.js +0 -17
- package/dist/query-client.d.ts +0 -9
- package/dist/query-client.d.ts.map +0 -1
- package/dist/query-client.js +0 -30
- package/dist/router-tanstack/index.d.ts +0 -36
- package/dist/router-tanstack/index.d.ts.map +0 -1
- package/dist/router-tanstack/index.js +0 -18
- package/dist/router-tanstack/nav-stash.d.ts +0 -24
- package/dist/router-tanstack/nav-stash.d.ts.map +0 -1
- package/dist/router-tanstack/nav-stash.js +0 -23
- package/dist/router-tanstack/nav.d.ts +0 -169
- package/dist/router-tanstack/nav.d.ts.map +0 -1
- package/dist/router-tanstack/nav.js +0 -35
- package/dist/router-tanstack/search-store-warnings.d.ts +0 -33
- package/dist/router-tanstack/search-store-warnings.d.ts.map +0 -1
- package/dist/router-tanstack/search-store-warnings.js +0 -77
- package/dist/router-tanstack/search-store.d.ts +0 -86
- package/dist/router-tanstack/search-store.d.ts.map +0 -1
- package/dist/router-tanstack/search-store.js +0 -303
- package/dist/router-tanstack/use-nav.d.ts +0 -29
- package/dist/router-tanstack/use-nav.d.ts.map +0 -1
- package/dist/router-tanstack/use-nav.js +0 -149
- package/dist/shell/account-types.d.ts +0 -121
- package/dist/shell/account-types.d.ts.map +0 -1
- package/dist/shell/app-brand.d.ts +0 -13
- package/dist/shell/app-brand.d.ts.map +0 -1
- package/dist/shell/app-brand.js +0 -95
- package/dist/shell/app-brand.module.css +0 -142
- package/dist/shell/app-brand.module.css.d.ts +0 -14
- package/dist/shell/app-breadcrumbs.d.ts +0 -15
- package/dist/shell/app-breadcrumbs.d.ts.map +0 -1
- package/dist/shell/app-breadcrumbs.js +0 -52
- package/dist/shell/app-header.module.css +0 -171
- package/dist/shell/app-header.module.css.d.ts +0 -12
- package/dist/shell/app-main.module.css +0 -215
- package/dist/shell/app-main.module.css.d.ts +0 -12
- package/dist/shell/app-mobile-nav.d.ts +0 -33
- package/dist/shell/app-mobile-nav.d.ts.map +0 -1
- package/dist/shell/app-mobile-nav.js +0 -511
- package/dist/shell/app-mobile-nav.module.css +0 -429
- package/dist/shell/app-mobile-nav.module.css.d.ts +0 -24
- package/dist/shell/app-sidebar-account.d.ts +0 -4
- package/dist/shell/app-sidebar-account.d.ts.map +0 -1
- package/dist/shell/app-sidebar-account.js +0 -123
- package/dist/shell/app-sidebar.d.ts +0 -82
- package/dist/shell/app-sidebar.d.ts.map +0 -1
- package/dist/shell/app-sidebar.js +0 -361
- package/dist/shell/app-sidebar.module.css +0 -812
- package/dist/shell/app-sidebar.module.css.d.ts +0 -50
- package/dist/shell/aside-docking.d.ts +0 -31
- package/dist/shell/aside-docking.d.ts.map +0 -1
- package/dist/shell/aside-docking.js +0 -19
- package/dist/shell/mobile-nav-model.d.ts +0 -71
- package/dist/shell/mobile-nav-model.d.ts.map +0 -1
- package/dist/shell/mobile-nav-model.js +0 -287
- package/dist/shell/nav-count-badge.d.ts +0 -13
- package/dist/shell/nav-count-badge.d.ts.map +0 -1
- package/dist/shell/nav-count-badge.js +0 -31
- package/dist/shell/nav-glyph.d.ts +0 -14
- package/dist/shell/nav-glyph.d.ts.map +0 -1
- package/dist/shell/nav-glyph.js +0 -21
- package/dist/shell/nav-types.d.ts +0 -220
- package/dist/shell/nav-types.d.ts.map +0 -1
- package/dist/shell/page-aside.d.ts +0 -64
- package/dist/shell/page-aside.d.ts.map +0 -1
- package/dist/shell/page-aside.js +0 -226
- package/dist/shell/page-aside.module.css +0 -176
- package/dist/shell/page-aside.module.css.d.ts +0 -14
- package/dist/shell/page-bar.d.ts +0 -134
- package/dist/shell/page-bar.d.ts.map +0 -1
- package/dist/shell/page-bar.js +0 -273
- package/dist/shell/page-bar.module.css +0 -256
- package/dist/shell/page-bar.module.css.d.ts +0 -20
- package/dist/shell/page-title.d.ts +0 -14
- package/dist/shell/page-title.d.ts.map +0 -1
- package/dist/shell/page-title.js +0 -25
- package/dist/shell/page-title.module.css +0 -35
- package/dist/shell/page-title.module.css.d.ts +0 -11
- package/dist/shell/sidebar-block-model.d.ts +0 -48
- package/dist/shell/sidebar-block-model.d.ts.map +0 -1
- package/dist/shell/sidebar-block-model.js +0 -43
- package/dist/shell/sidebar-blocks.d.ts +0 -33
- package/dist/shell/sidebar-blocks.d.ts.map +0 -1
- package/dist/shell/sidebar-blocks.js +0 -177
- package/dist/shell/sidebar-search.d.ts +0 -26
- package/dist/shell/sidebar-search.d.ts.map +0 -1
- package/dist/shell/sidebar-search.js +0 -98
- package/dist/shell/sidebar-search.module.css +0 -102
- package/dist/shell/sidebar-search.module.css.d.ts +0 -13
- package/dist/shell/use-size-class.d.ts +0 -6
- package/dist/shell/use-size-class.d.ts.map +0 -1
- package/dist/shell/use-size-class.js +0 -19
- package/dist/state/fields.d.ts +0 -622
- package/dist/state/fields.d.ts.map +0 -1
- package/dist/state/fields.js +0 -460
- package/dist/state/persisted-or-local.d.ts +0 -12
- package/dist/state/persisted-or-local.d.ts.map +0 -1
- package/dist/state/persisted-or-local.js +0 -25
- package/dist/state/persisted.d.ts +0 -70
- package/dist/state/persisted.d.ts.map +0 -1
- package/dist/state/persisted.js +0 -153
- package/dist/state.d.ts +0 -16
- package/dist/state.d.ts.map +0 -1
- package/dist/state.js +0 -14
- package/dist/styles.css +0 -477
- package/dist/table/cell-kinds.d.ts +0 -47
- package/dist/table/cell-kinds.d.ts.map +0 -1
- package/dist/table/cell-kinds.js +0 -180
- package/dist/table/cell-kinds.module.css +0 -55
- package/dist/table/cell-kinds.module.css.d.ts +0 -15
- package/dist/table/data-table-fold.d.ts +0 -155
- package/dist/table/data-table-fold.d.ts.map +0 -1
- package/dist/table/data-table-fold.js +0 -320
- package/dist/table/data-table-state.d.ts +0 -90
- package/dist/table/data-table-state.d.ts.map +0 -1
- package/dist/table/data-table-state.js +0 -145
- package/dist/table/data-table.d.ts +0 -538
- package/dist/table/data-table.d.ts.map +0 -1
- package/dist/table/data-table.js +0 -1044
- package/dist/table/data-table.module.css +0 -474
- package/dist/table/data-table.module.css.d.ts +0 -41
- package/dist/table/query-branch.d.ts +0 -28
- package/dist/table/query-branch.d.ts.map +0 -1
- package/dist/table/query-branch.js +0 -10
- package/dist/table/table-features.d.ts +0 -99
- package/dist/table/table-features.d.ts.map +0 -1
- package/dist/table/table-features.js +0 -59
- package/dist/telemetry.d.ts +0 -165
- package/dist/telemetry.d.ts.map +0 -1
- package/dist/telemetry.js +0 -61
- package/dist/theme/card-inset.module.css +0 -111
- package/dist/theme/card-inset.module.css.d.ts +0 -9
- package/dist/theme/chrome-vars.d.ts +0 -109
- package/dist/theme/chrome-vars.d.ts.map +0 -1
- package/dist/theme/chrome-vars.js +0 -89
- package/dist/theme/controls.module.css +0 -433
- package/dist/theme/controls.module.css.d.ts +0 -20
- package/dist/theme/ctl-theme.d.ts +0 -33
- package/dist/theme/ctl-theme.d.ts.map +0 -1
- package/dist/theme/ctl-theme.js +0 -54
- package/dist/theme/extend.d.ts +0 -18
- package/dist/theme/extend.d.ts.map +0 -1
- package/dist/theme/extend.js +0 -6
- package/dist/theme/floating.module.css +0 -72
- package/dist/theme/floating.module.css.d.ts +0 -12
- package/dist/theme/icon-slot.d.ts +0 -44
- package/dist/theme/icon-slot.d.ts.map +0 -1
- package/dist/theme/icon-slot.js +0 -21
- package/dist/theme/icon-slot.module.css +0 -47
- package/dist/theme/icon-slot.module.css.d.ts +0 -8
- package/dist/theme/index.d.ts +0 -132
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/index.js +0 -1112
- package/dist/theme/nav-link.module.css +0 -85
- package/dist/theme/nav-link.module.css.d.ts +0 -8
- package/dist/theme/segmented-control.module.css +0 -80
- package/dist/theme/segmented-control.module.css.d.ts +0 -10
- package/dist/theme/status-dot.d.ts +0 -7
- package/dist/theme/status-dot.d.ts.map +0 -1
- package/dist/theme/status-dot.js +0 -18
- package/dist/theme/status-dot.module.css +0 -9
- package/dist/theme/status-dot.module.css.d.ts +0 -8
- package/dist/theme/status-verdict.d.ts +0 -10
- package/dist/theme/status-verdict.d.ts.map +0 -1
- package/dist/theme/status-verdict.js +0 -22
- package/dist/theme/status-verdict.module.css +0 -25
- package/dist/theme/status-verdict.module.css.d.ts +0 -9
- package/dist/theme/theme-toggle.d.ts +0 -9
- package/dist/theme/theme-toggle.d.ts.map +0 -1
- package/dist/theme/theme-toggle.js +0 -136
- package/dist/theme/theme-toggle.module.css +0 -30
- package/dist/theme/theme-toggle.module.css.d.ts +0 -10
- package/dist/theme/timeline.module.css +0 -29
- package/dist/theme/timeline.module.css.d.ts +0 -9
- package/dist/theme/use-basalt-spacing.d.ts +0 -3
- package/dist/theme/use-basalt-spacing.d.ts.map +0 -1
- package/dist/theme/use-basalt-spacing.js +0 -8
- package/dist/theme-lab/boot.d.ts +0 -66
- package/dist/theme-lab/boot.d.ts.map +0 -1
- package/dist/theme-lab/boot.js +0 -82
- package/dist/theme-lab/derive-controls.d.ts +0 -13
- package/dist/theme-lab/derive-controls.d.ts.map +0 -1
- package/dist/theme-lab/derive-controls.js +0 -139
- package/dist/theme-lab/derive-state.d.ts +0 -55
- package/dist/theme-lab/derive-state.d.ts.map +0 -1
- package/dist/theme-lab/derive-state.js +0 -82
- package/dist/theme-lab/index.d.ts +0 -30
- package/dist/theme-lab/index.d.ts.map +0 -1
- package/dist/theme-lab/index.js +0 -154
- package/dist/unwrap.d.ts +0 -29
- package/dist/unwrap.d.ts.map +0 -1
- package/dist/unwrap.js +0 -18
- package/dist/vite-boot.d.ts +0 -25
- package/dist/vite-boot.d.ts.map +0 -1
- package/dist/vite-boot.js +0 -36
- package/dist/vite-color-mix.d.ts +0 -30
- package/dist/vite-color-mix.d.ts.map +0 -1
- package/dist/vite-color-mix.js +0 -80
- package/dist/vite.d.ts +0 -203
- package/dist/vite.d.ts.map +0 -1
- package/dist/vite.js +0 -477
- package/src/agent/ai-sdk-transport.ts +0 -469
- package/src/agent/chat/composer.tsx +0 -648
- package/src/agent/chat/message-affordances.ts +0 -64
- package/src/agent/chat/thread-feed-row.tsx +0 -352
- package/src/agent/chat/thread-feed.tsx +0 -219
- package/src/agent/chat/thread-message.tsx +0 -823
- package/src/agent/chat/thread-outcome-card.tsx +0 -180
- package/src/agent/chat/tool-chip.tsx +0 -225
- package/src/agent/chat/use-keyboard-inset.ts +0 -68
- package/src/agent/chat/virtualize.ts +0 -180
- package/src/agent/coalesce.ts +0 -229
- package/src/agent/error.ts +0 -58
- package/src/agent/foreign.ts +0 -141
- package/src/agent/history.ts +0 -25
- package/src/agent/id.ts +0 -160
- package/src/agent/index.ts +0 -35
- package/src/agent/merge.ts +0 -114
- package/src/agent/outcome.ts +0 -67
- package/src/agent/part-list.tsx +0 -373
- package/src/agent/parts.ts +0 -428
- package/src/agent/run-committer.ts +0 -64
- package/src/agent/run-records.ts +0 -171
- package/src/agent/stick-to-bottom.tsx +0 -153
- package/src/agent/thread.ts +0 -129
- package/src/agent/transport.ts +0 -95
- package/src/agent/use-agent-thread-runs.ts +0 -968
- package/src/charts/BandStrip.tsx +0 -520
- package/src/charts/Bars.tsx +0 -238
- package/src/charts/CartesianChart.tsx +0 -244
- package/src/charts/ChartCard.tsx +0 -474
- package/src/charts/Donut.tsx +0 -264
- package/src/charts/DualPanel.tsx +0 -370
- package/src/charts/Heatmap.tsx +0 -444
- package/src/charts/Lines.tsx +0 -160
- package/src/charts/MirroredBars.tsx +0 -348
- package/src/charts/Sparkline.tsx +0 -957
- package/src/charts/StackedArea.tsx +0 -101
- package/src/charts/band-fold.ts +0 -107
- package/src/charts/chart-card.module.css +0 -142
- package/src/charts/chart-card.module.css.d.ts +0 -20
- package/src/charts/compile.ts +0 -1438
- package/src/charts/cursor.ts +0 -394
- package/src/charts/donut.module.css +0 -54
- package/src/charts/donut.module.css.d.ts +0 -9
- package/src/charts/panel.tsx +0 -245
- package/src/charts/scales.ts +0 -287
- package/src/charts/sparkline.module.css +0 -166
- package/src/charts/sparkline.module.css.d.ts +0 -16
- package/src/charts/theme.ts +0 -65
- package/src/charts/ticks.ts +0 -61
- package/src/cli/audit-allows.ts +0 -348
- package/src/cli/check-theme.ts +0 -244
- package/src/cli/doctor-upgrade.ts +0 -737
- package/src/cli/doctor.ts +0 -488
- package/src/cli/guard-hook.ts +0 -82
- package/src/cli/init.ts +0 -495
- package/src/cli/provider-tags.ts +0 -38
- package/src/cli/render-imports.ts +0 -104
- package/src/cli/sync.ts +0 -342
- package/src/commands/ShortcutsHelp.tsx +0 -135
- package/src/commands/command-stash.ts +0 -44
- package/src/commands/define-commands.ts +0 -150
- package/src/commands/define-overlays.ts +0 -364
- package/src/commands/index.ts +0 -28
- package/src/commands/notifications/bell.tsx +0 -125
- package/src/commands/notifications/center.tsx +0 -248
- package/src/commands/notifications/define-notifications.ts +0 -211
- package/src/commands/notifications/notify.tsx +0 -158
- package/src/commands/notifications/store.ts +0 -302
- package/src/commands/projectors.ts +0 -47
- package/src/commands/shell-bridge.ts +0 -86
- package/src/commands/shortcut-format.ts +0 -123
- package/src/common/could-not-load.ts +0 -22
- package/src/common/index.ts +0 -17
- package/src/common/motion.ts +0 -26
- package/src/common/query-state-like.ts +0 -64
- package/src/common/refs.ts +0 -58
- package/src/common/use-measured-widths.ts +0 -91
- package/src/common/virtual-rows.tsx +0 -682
- package/src/common/vx-families.ts +0 -36
- package/src/common/vx-family.ts +0 -22
- package/src/content/article-layout.module.css +0 -183
- package/src/content/article-layout.module.css.d.ts +0 -23
- package/src/content/article-layout.tsx +0 -221
- package/src/content/article-model.ts +0 -27
- package/src/content/callout-alert.ts +0 -88
- package/src/content/callout.module.css +0 -89
- package/src/content/callout.module.css.d.ts +0 -17
- package/src/content/callout.tsx +0 -115
- package/src/content/code-block.module.css +0 -135
- package/src/content/code-block.module.css.d.ts +0 -14
- package/src/content/copy-action.tsx +0 -79
- package/src/content/fence-block.tsx +0 -265
- package/src/content/glyphs.tsx +0 -53
- package/src/content/guide.module.css +0 -62
- package/src/content/guide.module.css.d.ts +0 -13
- package/src/content/guide.tsx +0 -184
- package/src/content/heading-anchor.tsx +0 -65
- package/src/content/heading-components.tsx +0 -83
- package/src/content/mermaid-sanitize.ts +0 -49
- package/src/content/mermaid.module.css +0 -20
- package/src/content/mermaid.module.css.d.ts +0 -8
- package/src/content/prose.module.css +0 -346
- package/src/content/prose.module.css.d.ts +0 -12
- package/src/content/prose.tsx +0 -53
- package/src/content/reading-progress.module.css +0 -24
- package/src/content/reading-progress.module.css.d.ts +0 -9
- package/src/content/reading-progress.tsx +0 -92
- package/src/content/slug.ts +0 -46
- package/src/content/toc-click-pin.ts +0 -156
- package/src/content/toc.module.css +0 -54
- package/src/content/toc.module.css.d.ts +0 -13
- package/src/content/toc.tsx +0 -220
- package/src/content/url-hardening.ts +0 -52
- package/src/controls/actions.module.css +0 -75
- package/src/controls/actions.module.css.d.ts +0 -14
- package/src/controls/actions.tsx +0 -969
- package/src/controls/control-group.tsx +0 -70
- package/src/controls/control-name.ts +0 -33
- package/src/controls/controls.module.css +0 -549
- package/src/controls/controls.module.css.d.ts +0 -35
- package/src/controls/enum-filter.tsx +0 -188
- package/src/controls/filter-base.ts +0 -31
- package/src/controls/filter-context.tsx +0 -179
- package/src/controls/filter-pill.tsx +0 -203
- package/src/controls/filter-sheet.tsx +0 -79
- package/src/controls/form-layout.module.css +0 -268
- package/src/controls/form-layout.module.css.d.ts +0 -22
- package/src/controls/form-layout.tsx +0 -416
- package/src/controls/glyphs.tsx +0 -114
- package/src/controls/multi-select-filter.tsx +0 -316
- package/src/controls/number-filter.tsx +0 -364
- package/src/controls/panel-row.module.css +0 -86
- package/src/controls/panel-row.module.css.d.ts +0 -13
- package/src/controls/panel-row.tsx +0 -391
- package/src/controls/range-filter.tsx +0 -256
- package/src/controls/search-filter.tsx +0 -200
- package/src/controls/select-filter.tsx +0 -84
- package/src/controls/sync-button.module.css +0 -96
- package/src/controls/sync-button.module.css.d.ts +0 -12
- package/src/controls/sync-button.tsx +0 -211
- package/src/controls/toggle-filter.tsx +0 -83
- package/src/controls/uncontrolled.ts +0 -12
- package/src/controls-dates/date-range-picker.tsx +0 -49
- package/src/controls-dates/index.ts +0 -7
- package/src/dashboard/bar-list.module.css +0 -258
- package/src/dashboard/bar-list.module.css.d.ts +0 -20
- package/src/dashboard/bar-list.tsx +0 -254
- package/src/dashboard/board-nav.ts +0 -67
- package/src/dashboard/board.module.css +0 -179
- package/src/dashboard/board.module.css.d.ts +0 -28
- package/src/dashboard/board.tsx +0 -415
- package/src/dashboard/delta-badge.tsx +0 -103
- package/src/dashboard/empty-state.tsx +0 -128
- package/src/dashboard/event-list-model.ts +0 -125
- package/src/dashboard/event-list-rows.tsx +0 -117
- package/src/dashboard/event-list-scroll.ts +0 -291
- package/src/dashboard/event-list-skeleton.tsx +0 -62
- package/src/dashboard/event-list.module.css +0 -336
- package/src/dashboard/event-list.module.css.d.ts +0 -34
- package/src/dashboard/event-list.tsx +0 -336
- package/src/dashboard/index.ts +0 -14
- package/src/dashboard/meter-model.ts +0 -895
- package/src/dashboard/meter-parts.tsx +0 -1015
- package/src/dashboard/meter.module.css +0 -470
- package/src/dashboard/meter.module.css.d.ts +0 -47
- package/src/dashboard/meter.tsx +0 -311
- package/src/dashboard/page-summary.module.css +0 -92
- package/src/dashboard/page-summary.module.css.d.ts +0 -15
- package/src/dashboard/page-summary.tsx +0 -102
- package/src/dashboard/query-state.tsx +0 -409
- package/src/dashboard/scale.ts +0 -13
- package/src/dashboard/section.module.css +0 -134
- package/src/dashboard/section.module.css.d.ts +0 -12
- package/src/dashboard/section.tsx +0 -380
- package/src/dashboard/settings-section.module.css +0 -54
- package/src/dashboard/settings-section.module.css.d.ts +0 -12
- package/src/dashboard/settings-section.tsx +0 -183
- package/src/dashboard/stat-card-parts.tsx +0 -149
- package/src/dashboard/stat-card.module.css +0 -508
- package/src/dashboard/stat-card.module.css.d.ts +0 -39
- package/src/dashboard/stat-card.tsx +0 -622
- package/src/dashboard/stat-group.module.css +0 -124
- package/src/dashboard/stat-group.module.css.d.ts +0 -9
- package/src/dashboard/stat-group.tsx +0 -113
- package/src/dashboard/stat-strip.module.css +0 -395
- package/src/dashboard/stat-strip.module.css.d.ts +0 -41
- package/src/dashboard/stat-strip.tsx +0 -506
- package/src/dashboard/visual-slot.ts +0 -27
- package/src/dashboard/widget-header.module.css +0 -486
- package/src/dashboard/widget-header.module.css.d.ts +0 -27
- package/src/dashboard/widget-header.tsx +0 -479
- package/src/dev-dock.tsx +0 -149
- package/src/format/date.ts +0 -250
- package/src/format/index.ts +0 -24
- package/src/format/measure.ts +0 -42
- package/src/forms/create-form.ts +0 -57
- package/src/forms/field.ts +0 -134
- package/src/forms/form-state.tsx +0 -94
- package/src/forms/index.ts +0 -18
- package/src/guard/fonts-hint.ts +0 -2
- package/src/guard/guard-hook.ts +0 -129
- package/src/guard/index.ts +0 -2848
- package/src/guard/palette.ts +0 -261
- package/src/guard/series-file.ts +0 -51
- package/src/guard/types.ts +0 -211
- package/src/guard/vx-names.ts +0 -228
- package/src/provider/create-router.tsx +0 -168
- package/src/provider/error-fallback.module.css +0 -10
- package/src/provider/error-fallback.module.css.d.ts +0 -8
- package/src/provider/fallback.module.css +0 -37
- package/src/provider/fallback.module.css.d.ts +0 -11
- package/src/provider/hotkeys.ts +0 -62
- package/src/provider/index.tsx +0 -574
- package/src/provider/lab-theme.ts +0 -175
- package/src/provider/modals-mount.tsx +0 -66
- package/src/provider/notifier.ts +0 -52
- package/src/provider/route-defaults.module.css +0 -39
- package/src/provider/route-defaults.module.css.d.ts +0 -10
- package/src/provider/route-defaults.tsx +0 -39
- package/src/provider/route-transition.ts +0 -199
- package/src/provider/slots.ts +0 -59
- package/src/provider/spotlight-actions.tsx +0 -73
- package/src/provider/spotlight-mount.tsx +0 -33
- package/src/provider/test-router.tsx +0 -25
- package/src/query-client.ts +0 -41
- package/src/router-tanstack/index.ts +0 -51
- package/src/router-tanstack/nav-stash.ts +0 -41
- package/src/router-tanstack/nav.ts +0 -216
- package/src/router-tanstack/search-store-warnings.ts +0 -120
- package/src/router-tanstack/search-store.ts +0 -599
- package/src/router-tanstack/use-nav.ts +0 -283
- package/src/shell/account-types.ts +0 -122
- package/src/shell/app-brand.module.css +0 -142
- package/src/shell/app-brand.module.css.d.ts +0 -14
- package/src/shell/app-brand.tsx +0 -141
- package/src/shell/app-breadcrumbs.tsx +0 -104
- package/src/shell/app-header.module.css +0 -171
- package/src/shell/app-header.module.css.d.ts +0 -12
- package/src/shell/app-main.module.css +0 -215
- package/src/shell/app-main.module.css.d.ts +0 -12
- package/src/shell/app-mobile-nav.module.css +0 -429
- package/src/shell/app-mobile-nav.module.css.d.ts +0 -24
- package/src/shell/app-mobile-nav.tsx +0 -864
- package/src/shell/app-sidebar-account.tsx +0 -180
- package/src/shell/app-sidebar.module.css +0 -812
- package/src/shell/app-sidebar.module.css.d.ts +0 -50
- package/src/shell/app-sidebar.tsx +0 -626
- package/src/shell/aside-docking.ts +0 -54
- package/src/shell/index.tsx +0 -658
- package/src/shell/mobile-nav-model.ts +0 -521
- package/src/shell/nav-count-badge.tsx +0 -44
- package/src/shell/nav-glyph.tsx +0 -38
- package/src/shell/nav-types.ts +0 -232
- package/src/shell/page-aside.module.css +0 -176
- package/src/shell/page-aside.module.css.d.ts +0 -14
- package/src/shell/page-aside.tsx +0 -433
- package/src/shell/page-bar.module.css +0 -256
- package/src/shell/page-bar.module.css.d.ts +0 -20
- package/src/shell/page-bar.tsx +0 -598
- package/src/shell/page-title.module.css +0 -35
- package/src/shell/page-title.module.css.d.ts +0 -11
- package/src/shell/page-title.tsx +0 -57
- package/src/shell/sidebar-block-model.ts +0 -91
- package/src/shell/sidebar-blocks.tsx +0 -326
- package/src/shell/sidebar-search.module.css +0 -102
- package/src/shell/sidebar-search.module.css.d.ts +0 -13
- package/src/shell/sidebar-search.tsx +0 -154
- package/src/shell/use-size-class.ts +0 -33
- package/src/state/fields.ts +0 -1279
- package/src/state/persisted-or-local.ts +0 -56
- package/src/state/persisted.ts +0 -320
- package/src/state.ts +0 -25
- package/src/styles.css +0 -477
- package/src/table/cell-kinds.module.css +0 -55
- package/src/table/cell-kinds.module.css.d.ts +0 -15
- package/src/table/cell-kinds.tsx +0 -263
- package/src/table/data-table-fold.tsx +0 -567
- package/src/table/data-table-state.ts +0 -230
- package/src/table/data-table.module.css +0 -474
- package/src/table/data-table.module.css.d.ts +0 -41
- package/src/table/data-table.tsx +0 -2232
- package/src/table/query-branch.ts +0 -53
- package/src/table/table-features.ts +0 -142
- package/src/telemetry.ts +0 -236
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +0 -2774
- package/src/theme/card-inset.module.css +0 -111
- package/src/theme/card-inset.module.css.d.ts +0 -9
- package/src/theme/chrome-vars.ts +0 -205
- package/src/theme/controls.module.css +0 -433
- package/src/theme/controls.module.css.d.ts +0 -20
- package/src/theme/ctl-theme.tsx +0 -169
- package/src/theme/extend.ts +0 -18
- package/src/theme/floating.module.css +0 -72
- package/src/theme/floating.module.css.d.ts +0 -12
- package/src/theme/icon-slot.module.css +0 -47
- package/src/theme/icon-slot.module.css.d.ts +0 -8
- package/src/theme/icon-slot.tsx +0 -59
- package/src/theme/index.ts +0 -1699
- package/src/theme/nav-link.module.css +0 -85
- package/src/theme/nav-link.module.css.d.ts +0 -8
- package/src/theme/segmented-control.module.css +0 -80
- package/src/theme/segmented-control.module.css.d.ts +0 -10
- package/src/theme/status-dot.module.css +0 -9
- package/src/theme/status-dot.module.css.d.ts +0 -8
- package/src/theme/status-dot.tsx +0 -31
- package/src/theme/status-verdict.module.css +0 -25
- package/src/theme/status-verdict.module.css.d.ts +0 -9
- package/src/theme/status-verdict.tsx +0 -36
- package/src/theme/theme-toggle.module.css +0 -30
- package/src/theme/theme-toggle.module.css.d.ts +0 -10
- package/src/theme/theme-toggle.tsx +0 -164
- package/src/theme/timeline.module.css +0 -29
- package/src/theme/timeline.module.css.d.ts +0 -9
- package/src/theme/use-basalt-spacing.ts +0 -40
- package/src/theme-lab/boot.ts +0 -140
- package/src/theme-lab/derive-controls.tsx +0 -231
- package/src/theme-lab/derive-state.ts +0 -164
- package/src/theme-lab/index.tsx +0 -229
- package/src/unwrap.ts +0 -44
- package/src/vite-boot.ts +0 -109
- package/src/vite-color-mix.ts +0 -137
- package/src/vite.ts +0 -899
- /package/dist/{agent/history.js → ai/contract.js} +0 -0
- /package/dist/{agent/outcome.js → astro/mdx/messages.js} +0 -0
- /package/dist/{controls/filter-base.js → cards/contract.js} +0 -0
- /package/dist/{controls/uncontrolled.js → charts/contract.js} +0 -0
- /package/dist/charts/{ticks.d.ts → core/ticks.d.ts} +0 -0
- /package/dist/charts/{heatmap-fill.d.ts → parts/heatmap-fill.d.ts} +0 -0
- /package/dist/charts/{heatmap-fill.js → parts/heatmap-fill.js} +0 -0
- /package/dist/{guard/types.js → content/contract.js} +0 -0
- /package/dist/{shell/account-types.js → controls/contract.js} +0 -0
- /package/dist/{shell/nav-types.js → core/mark-types.js} +0 -0
- /package/dist/{content → core}/slug.d.ts +0 -0
- /package/dist/{content → page}/toc-click-pin.d.ts +0 -0
- /package/dist/{content → page}/toc-spy.d.ts +0 -0
- /package/dist/{content → page}/toc-spy.js +0 -0
- /package/src/charts/{heatmap-fill.ts → parts/heatmap-fill.ts} +0 -0
- /package/src/{content → page}/toc-spy.ts +0 -0
|
@@ -0,0 +1,3424 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `compileCartesian` — basalt's chart spec in, a TanStack definition out (`docs/V2-SPEC.md` § 9.2).
|
|
3
|
+
* Pure and React-free: the host memoizes it, the tests call it directly. It owns the scales and
|
|
4
|
+
* domains, the theme bridge, zones / x-zones / reference lines, the crosshair, the shared cursor
|
|
5
|
+
* binding, the tooltip content, and the container-class guide ladder.
|
|
6
|
+
* TanStack owns margins (measured), layout, focus and keyboard, the tooltip surface and SSR.
|
|
7
|
+
*/
|
|
8
|
+
import { headerDay, readoutClock } from '../chart-dates'
|
|
9
|
+
import { dateTickFormat, utcAxisDate } from '../date-tick-format'
|
|
10
|
+
import { crosshair } from '@tanstack/charts/crosshair'
|
|
11
|
+
import { yPinOn } from './right-pin'
|
|
12
|
+
import { decorative } from '@tanstack/charts/mark/decorative'
|
|
13
|
+
import { dot } from '@tanstack/charts/dot'
|
|
14
|
+
import { rect } from '@tanstack/charts/rect'
|
|
15
|
+
import { text } from '@tanstack/charts/text'
|
|
16
|
+
import { ruleX, ruleY } from '@tanstack/charts/rule'
|
|
17
|
+
import { scaleLinear } from '@tanstack/charts/scales/linear'
|
|
18
|
+
import { scaleUtc } from '@tanstack/charts/scales/time'
|
|
19
|
+
import { cardPortal } from './portal'
|
|
20
|
+
import { mark } from '../../core/messages/mark'
|
|
21
|
+
import { plainMessages } from '../../core/messages/use-messages'
|
|
22
|
+
import type {
|
|
23
|
+
ChartBuildContext,
|
|
24
|
+
ChartTooltipAnchorContext,
|
|
25
|
+
ChartGradient,
|
|
26
|
+
ChartPoint,
|
|
27
|
+
ChartPositionScaleOptions,
|
|
28
|
+
ChartTooltipRow as EngineTooltipRow,
|
|
29
|
+
ChartValue,
|
|
30
|
+
ResponsiveChartDefinition,
|
|
31
|
+
StoredChartSpec,
|
|
32
|
+
} from '@tanstack/charts/types/core'
|
|
33
|
+
import { compact } from '../../format/number'
|
|
34
|
+
import { NON_FINITE, numberFormat } from '../../format/shared'
|
|
35
|
+
import { BASALT } from '../../tokens'
|
|
36
|
+
import type { ContainerClass } from '../../tokens/size-classes'
|
|
37
|
+
import { cursorBinding, followerOptions, followsChart, quietWhileFollowing } from './cursor'
|
|
38
|
+
import { cursorDots } from '../marks'
|
|
39
|
+
import { changeOf, markRich, rampColor, rampShare } from './rich-tooltip'
|
|
40
|
+
import type { RichRow, RowDetail } from './rich-tooltip'
|
|
41
|
+
import { bucketTicks, strideEvery } from './ticks'
|
|
42
|
+
import {
|
|
43
|
+
clampToDomain,
|
|
44
|
+
edgeFraction,
|
|
45
|
+
matchBandKeys,
|
|
46
|
+
offScaleMarks,
|
|
47
|
+
stackCapMarks,
|
|
48
|
+
CARET_SIZE,
|
|
49
|
+
offScaleSide,
|
|
50
|
+
xRoomForDots,
|
|
51
|
+
strideKeepEnds,
|
|
52
|
+
} from './axis-ext'
|
|
53
|
+
import { barValueLabels } from './bar-values'
|
|
54
|
+
import { MAIN_PANE, plotAccess, plotContext } from './plot-context'
|
|
55
|
+
import { spreadPoints } from './spread'
|
|
56
|
+
import type { SpreadPlace } from './spread'
|
|
57
|
+
import { claimedLabelBoxes, endLabelGutter } from '../labels'
|
|
58
|
+
import type { LinesNaming } from '../labels'
|
|
59
|
+
import { estimateWidth, lineHeight } from '../label-place'
|
|
60
|
+
import type { LabelBox as PxBox } from '../chart-labels'
|
|
61
|
+
import {
|
|
62
|
+
captionPx,
|
|
63
|
+
claimInsideTicks,
|
|
64
|
+
markDot,
|
|
65
|
+
pathBoxes,
|
|
66
|
+
pxBox,
|
|
67
|
+
ruleBoxes,
|
|
68
|
+
valueBox,
|
|
69
|
+
withHostObstacles,
|
|
70
|
+
xRuleBoxes,
|
|
71
|
+
} from '../label-obstacles'
|
|
72
|
+
import { measureChartText } from '../text-measure'
|
|
73
|
+
import type { PlotPx } from '../label-obstacles'
|
|
74
|
+
import { boxesMeet, dotBox, placeRefLabel, refLabelDy, yRangeWithin } from '../ref-label'
|
|
75
|
+
import type { DotMark, LabelBox, RefLabelPoint } from '../ref-label'
|
|
76
|
+
import type { PlotAccess, PlotSizes } from './plot-context'
|
|
77
|
+
import { resolveContainerClass } from '../../tokens/size-classes'
|
|
78
|
+
import {
|
|
79
|
+
resolveYDomain,
|
|
80
|
+
xScaleFor,
|
|
81
|
+
xZoneBound,
|
|
82
|
+
xZoneFractions,
|
|
83
|
+
xZoneWiden,
|
|
84
|
+
yScaleFor,
|
|
85
|
+
warpFor,
|
|
86
|
+
} from './scales'
|
|
87
|
+
import type { XScaleModel } from './scales'
|
|
88
|
+
import {
|
|
89
|
+
captionWidth,
|
|
90
|
+
dotSwatch,
|
|
91
|
+
logTicks,
|
|
92
|
+
ringSwatch,
|
|
93
|
+
withLogX,
|
|
94
|
+
withLogY,
|
|
95
|
+
withLogY2,
|
|
96
|
+
logYTicks,
|
|
97
|
+
xRefLabelBoxes,
|
|
98
|
+
xRefLabelSpots,
|
|
99
|
+
xRefLineMarks,
|
|
100
|
+
xTitleLabel,
|
|
101
|
+
yTitleScale,
|
|
102
|
+
} from '../axis-gaps'
|
|
103
|
+
import type { XRefLabelBox } from '../axis-gaps'
|
|
104
|
+
import { chipCoversTick, chipRepeatsTick, xTickOpacity, yTickOpacity } from './readout-clear'
|
|
105
|
+
import type { Corner, XTickLabel } from './readout-clear'
|
|
106
|
+
import {
|
|
107
|
+
AREA_BOTTOM,
|
|
108
|
+
AREA_TOP,
|
|
109
|
+
AXIS_LINE,
|
|
110
|
+
CHART_THEME,
|
|
111
|
+
CROSSHAIR,
|
|
112
|
+
CV,
|
|
113
|
+
DASH,
|
|
114
|
+
GRID_LINE,
|
|
115
|
+
LINE_STROKE_WIDTH,
|
|
116
|
+
} from './theme'
|
|
117
|
+
import type {
|
|
118
|
+
AxisConfig,
|
|
119
|
+
CartesianChartProps,
|
|
120
|
+
ChartMarks,
|
|
121
|
+
ChartSeries,
|
|
122
|
+
ChartTooltipRow,
|
|
123
|
+
ChartX,
|
|
124
|
+
PlotRow,
|
|
125
|
+
RefLine,
|
|
126
|
+
ZoneEdge,
|
|
127
|
+
ZoneSpec,
|
|
128
|
+
} from '../types'
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The compiled definition. Annotated on purpose: TanStack's inferred definition type names internal
|
|
132
|
+
* modules (`dist/scene`, `cursor-host-contract`) and fails declaration emit (TS2883 / TS4058).
|
|
133
|
+
*/
|
|
134
|
+
export type CartesianDefinition = ResponsiveChartDefinition<unknown, ChartValue, number, 'dom'>
|
|
135
|
+
|
|
136
|
+
/** Everything the rung compiles: the public props minus React chrome, plus the host's state. */
|
|
137
|
+
export type CartesianInput<T, X extends ChartX> = Pick<
|
|
138
|
+
CartesianChartProps<T, X>,
|
|
139
|
+
| 'data'
|
|
140
|
+
| 'x'
|
|
141
|
+
| 'series'
|
|
142
|
+
| 'marks'
|
|
143
|
+
| 'y'
|
|
144
|
+
| 'y2'
|
|
145
|
+
| 'xTicks'
|
|
146
|
+
| 'xDomain'
|
|
147
|
+
| 'formatX'
|
|
148
|
+
| 'formatXTick'
|
|
149
|
+
| 'zones'
|
|
150
|
+
| 'xZones'
|
|
151
|
+
| 'refLines'
|
|
152
|
+
| 'xRefLines'
|
|
153
|
+
| 'events'
|
|
154
|
+
| 'xTitle'
|
|
155
|
+
| 'xScale'
|
|
156
|
+
| 'cursorGroup'
|
|
157
|
+
| 'cursorResolution'
|
|
158
|
+
| 'tooltip'
|
|
159
|
+
> & {
|
|
160
|
+
/** Unique per mounted chart (React `useId`): owns what this chart publishes to the cursor. */
|
|
161
|
+
chartId: string
|
|
162
|
+
/** The locale of every default chart text: ticks, tooltip header, y numbers (the provider's). */
|
|
163
|
+
locale?: string
|
|
164
|
+
/** How a band's readout joins its two edges (`mark.rangeBetween`). */
|
|
165
|
+
rangeText?: (from: string, to: string) => string
|
|
166
|
+
/** The largest radius a dot series draws, px by series key: the plot keeps room for it at its edge. */
|
|
167
|
+
dotRadius?: ReadonlyMap<string, number>
|
|
168
|
+
/** The axis a dot series moves its coincident dots along (`Series.spread`), by series key. */
|
|
169
|
+
dotSpread?: ReadonlyMap<string, 'x' | 'y'>
|
|
170
|
+
/** Series keys the legend has toggled off. */
|
|
171
|
+
hidden?: ReadonlySet<string>
|
|
172
|
+
/** The legend entry under the pointer. */
|
|
173
|
+
highlighted?: string | null
|
|
174
|
+
/** The datum the chart's `focus` holds (`plot.focused`). */
|
|
175
|
+
focused?: T | null
|
|
176
|
+
/** `false`: the engine takes no tab stop or keys (a `focus` wrapper owns them). */
|
|
177
|
+
keyboard?: boolean
|
|
178
|
+
/** A band x scale (bar kinds), whatever `x` returns. */
|
|
179
|
+
band?: boolean
|
|
180
|
+
/** A coarse primary pointer: tap pins the cursor. */
|
|
181
|
+
coarse?: boolean
|
|
182
|
+
/** Tooltip series rows bottom-up (a stack reads top-down in the plot). */
|
|
183
|
+
reverseRows?: boolean
|
|
184
|
+
/** Bar kinds: how the left-axis `mark: 'bar'` series combine for the auto domain. */
|
|
185
|
+
stack?: 'stacked' | 'normalized'
|
|
186
|
+
/** The plot area the engine last laid out; `null` before the first layout (the frame stands in). */
|
|
187
|
+
plot?: PlotSizes | null
|
|
188
|
+
/** The tooltip opens below the chart (a strip of cells), above only when there is no room. */
|
|
189
|
+
tooltipBelow?: boolean
|
|
190
|
+
/** The vertical rule under the cursor. Default `true`; a bar kind has none (its hover is the bar). */
|
|
191
|
+
crosshair?: boolean
|
|
192
|
+
/** The engine's point marker on the focused datum. Default `true`; a bar kind has none (its hover is the bar). */
|
|
193
|
+
focusRing?: boolean
|
|
194
|
+
/** No axes, grid or margin: the plot is the whole box (a visual slot's bars, as `Sparkline`). */
|
|
195
|
+
bare?: boolean
|
|
196
|
+
/** `y.gutter` (the seam): a fixed left margin in px, so stacked panes share one plot x. */
|
|
197
|
+
yGutter?: number
|
|
198
|
+
/**
|
|
199
|
+
* The narrow class draws the y tick labels inside the plot, above their grid line, and reserves no axis column
|
|
200
|
+
* (the plot is the frame). Set by a chart that owns its y axis; a pane of stacked charts (they share one gutter),
|
|
201
|
+
* a fixed `y.gutter` and a right axis keep the labels in the gutter.
|
|
202
|
+
*/
|
|
203
|
+
yInside?: boolean
|
|
204
|
+
/** `auto` names the lines with end labels on the narrow class too: the chart's lines passed `phoneNamesFit`. */
|
|
205
|
+
endLabelsNarrow?: boolean
|
|
206
|
+
/** Engine controls on the definition (`RangeNavigator`'s brush). */
|
|
207
|
+
controls?: CartesianDefinition['controls']
|
|
208
|
+
/** `false`: no y axis, no grid (an overview strip). */
|
|
209
|
+
yAxis?: false
|
|
210
|
+
/** How the lines are named (`Lines`' `naming`, resolved): with end labels the point scale keeps them a gutter right of the last points. */
|
|
211
|
+
endLabels?: LinesNaming
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** An inside y label's inset from the plot's left edge, px: clear of the keyboard ring, as the y title is. */
|
|
215
|
+
const INSIDE_DX = 4
|
|
216
|
+
/** An inside label's lift above its grid line, px (negative is up). */
|
|
217
|
+
const INSIDE_ABOVE = -4
|
|
218
|
+
/** A label this close to the plot's top edge, px, sits under its line instead, so the plot's edge never clips it. */
|
|
219
|
+
const INSIDE_TOP_PX = 14
|
|
220
|
+
/** An inside label drawn under its line, px. */
|
|
221
|
+
const INSIDE_BELOW = 11
|
|
222
|
+
|
|
223
|
+
/** Where an inside label stands from its grid line at `position`, px: the top one under its line, the rest above theirs. */
|
|
224
|
+
const insideShift = (position: number): number =>
|
|
225
|
+
position < INSIDE_TOP_PX ? INSIDE_BELOW : INSIDE_ABOVE
|
|
226
|
+
|
|
227
|
+
/** The weight of a y tick that writes a reference line's value (`onAxis`): the value reads before the scale. */
|
|
228
|
+
const STRONG_TICK_WEIGHT = 600
|
|
229
|
+
|
|
230
|
+
/** The one tick-label size, at every container width: the caption size, so a card never mixes sizes. */
|
|
231
|
+
const TICK_FONT = BASALT.text.micro
|
|
232
|
+
|
|
233
|
+
/** Tick counts per container class (§ 9.6). */
|
|
234
|
+
const LADDER = {
|
|
235
|
+
micro: { xTicks: 2, yTicks: 0 },
|
|
236
|
+
narrow: { xTicks: 3, yTicks: 3 },
|
|
237
|
+
regular: { xTicks: 5, yTicks: 5 },
|
|
238
|
+
wide: { xTicks: 6, yTicks: 5 },
|
|
239
|
+
} as const satisfies Record<ContainerClass, { xTicks: number; yTicks: number }>
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* A tick within this share of the x domain from its start counts as on the left edge: half a
|
|
243
|
+
* day label is ~15 px, 4–5% of a compact plot. Round ticks rarely land on the domain start
|
|
244
|
+
* exactly, so an equality test would miss the common case.
|
|
245
|
+
*/
|
|
246
|
+
const LEFT_EDGE_SHARE = 0.05
|
|
247
|
+
|
|
248
|
+
/** Air the engine keeps between two x tick labels, px: at 4 a date pair reads as one string (`27 Sep 4 Oct`). */
|
|
249
|
+
const TICK_MIN_GAP = 8
|
|
250
|
+
/** The width a y axis takes from the chart's width: what the x tick anchors count against, px. */
|
|
251
|
+
const Y_GUTTER = 44
|
|
252
|
+
|
|
253
|
+
/** Whether the y tick labels sit inside the plot: the narrow class of a chart that owns a lone left axis. */
|
|
254
|
+
const yInsideOf = (
|
|
255
|
+
input: {
|
|
256
|
+
yInside?: boolean | undefined
|
|
257
|
+
yGutter?: number | undefined
|
|
258
|
+
bare?: boolean | undefined
|
|
259
|
+
y?: { side?: 'left' | 'right' | undefined } | undefined
|
|
260
|
+
},
|
|
261
|
+
cls: ContainerClass,
|
|
262
|
+
hasRight: boolean,
|
|
263
|
+
): boolean =>
|
|
264
|
+
input.yInside === true &&
|
|
265
|
+
cls === 'narrow' &&
|
|
266
|
+
!hasRight &&
|
|
267
|
+
input.y?.side !== 'right' &&
|
|
268
|
+
input.bare !== true &&
|
|
269
|
+
input.yGutter === undefined
|
|
270
|
+
|
|
271
|
+
/** The boxes of the y labels standing inside a plot `height` px tall, in plot px. */
|
|
272
|
+
function insideTickBoxes<T, X extends ChartX>(
|
|
273
|
+
input: CartesianInput<T, X>,
|
|
274
|
+
axes: Axes<T>,
|
|
275
|
+
cls: ContainerClass,
|
|
276
|
+
height: number,
|
|
277
|
+
): PxBox[] {
|
|
278
|
+
const warp = warpFor(axes.left.log)
|
|
279
|
+
const [lo, hi] = [
|
|
280
|
+
Math.min(...warp.domain(axes.left.domain)),
|
|
281
|
+
Math.max(...warp.domain(axes.left.domain)),
|
|
282
|
+
]
|
|
283
|
+
if (input.yAxis === false || height <= 0 || hi === lo) return []
|
|
284
|
+
const edges = zoneEdgesOn(input, axes, 'left')
|
|
285
|
+
return yTickValues({ cfg: input.y, axis: axes.left, cls, edges }).map((value) => {
|
|
286
|
+
const position = ((hi - warp.to(value)) / (hi - lo)) * height
|
|
287
|
+
return {
|
|
288
|
+
left: INSIDE_DX,
|
|
289
|
+
top: position + insideShift(position) - TICK_FONT / 2,
|
|
290
|
+
width: captionWidth(axes.left.format(value), TICK_FONT),
|
|
291
|
+
height: TICK_FONT,
|
|
292
|
+
}
|
|
293
|
+
})
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* A narrow chart under this width, px, is a phone's: it spends no axis column on any data, the plot takes
|
|
298
|
+
* the frame. From here up the column costs a tenth of it at most, so data under a label keeps the column.
|
|
299
|
+
*/
|
|
300
|
+
const INSIDE_PHONE_WIDTH = 400
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Whether a line or a dot runs under one of the y labels standing inside the plot. The label's halo
|
|
304
|
+
* would cover the data (and a stub of line left of `0.20` reads as a minus).
|
|
305
|
+
*/
|
|
306
|
+
function insideLabelsStruck<T, X extends ChartX>(opts: {
|
|
307
|
+
input: CartesianInput<T, X>
|
|
308
|
+
axes: Axes<T>
|
|
309
|
+
cls: ContainerClass
|
|
310
|
+
/** One polyline per visible series, as (x share of the plot, warped value). */
|
|
311
|
+
lines: readonly (readonly RefLabelPoint[])[]
|
|
312
|
+
width: number
|
|
313
|
+
height: number
|
|
314
|
+
}): boolean {
|
|
315
|
+
const { input, axes, cls, lines, width, height } = opts
|
|
316
|
+
const domain = warpFor(axes.left.log).domain(axes.left.domain)
|
|
317
|
+
const [lo, hi] = [Math.min(...domain), Math.max(...domain)]
|
|
318
|
+
if (width <= 0) return false
|
|
319
|
+
return insideTickBoxes(input, axes, cls, height).some((box) => {
|
|
320
|
+
const [top, bottom] = [box.top, box.top + box.height].map(
|
|
321
|
+
(px) => hi - (px / height) * (hi - lo),
|
|
322
|
+
) as [number, number]
|
|
323
|
+
return lines.some((points) => {
|
|
324
|
+
const range = yRangeWithin(points, 0, (box.left + box.width) / width)
|
|
325
|
+
return range !== null && range[1] >= bottom && range[0] <= top
|
|
326
|
+
})
|
|
327
|
+
})
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** The width the y axis takes from a frame of this class: none while its labels sit inside the plot. */
|
|
331
|
+
const yRoomPx = (inside: boolean): number => (inside ? 0 : Y_GUTTER)
|
|
332
|
+
|
|
333
|
+
export function defaultNumberFormat(v: number, locale?: string): string {
|
|
334
|
+
return compact(v, { digits: Math.abs(v) >= 1000 ? 1 : 2, locale })
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* The UTC midnight of the day a day-keyed instant stands for. A key at LOCAL midnight is that local
|
|
339
|
+
* calendar date (east of UTC it is `22:00` UTC of the day before); any other key is its UTC date, so
|
|
340
|
+
* a key at 12:00 UTC or later never rolls to the next day.
|
|
341
|
+
*/
|
|
342
|
+
export function bucketDay(d: Date): Date {
|
|
343
|
+
const local = d.getHours() === 0 && d.getMinutes() === 0 && d.getSeconds() === 0
|
|
344
|
+
return new Date(
|
|
345
|
+
local
|
|
346
|
+
? Date.UTC(d.getFullYear(), d.getMonth(), d.getDate())
|
|
347
|
+
: Math.floor(d.getTime() / DAY_MS) * DAY_MS,
|
|
348
|
+
)
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* The tooltip's date: weekday, day, month and year in the chart's `locale` (the provider's, else
|
|
353
|
+
* `en`), read in UTC like the time scale; a non-midnight instant adds `HH:MM`. With
|
|
354
|
+
* `dayOnly` (a day-granular series) the instant is its bucket's DAY, never a clock time: see
|
|
355
|
+
* {@link bucketDay}.
|
|
356
|
+
*/
|
|
357
|
+
export function utcHeaderDate(d: Date, dayOnly = false, locale?: string): string {
|
|
358
|
+
if (!Number.isFinite(d.getTime())) return NON_FINITE
|
|
359
|
+
const date = headerDay(dayOnly ? bucketDay(d) : d, locale)
|
|
360
|
+
if (dayOnly || d.getTime() % DAY_MS === 0) return date
|
|
361
|
+
return `${date} ${readoutClock(d, locale)}`
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
const DAY_MS = 86_400_000
|
|
365
|
+
|
|
366
|
+
/** The fewest Date ticks an axis spanning at least this many whole days keeps. */
|
|
367
|
+
const MIN_DATE_TICKS = 3
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Default Date tick values: the time scale's own ticks, kept to whole UTC days once the data is
|
|
371
|
+
* daily or coarser — d3 picks 12-hour steps for a short daily series, which label one day twice. A
|
|
372
|
+
* span of several days never keeps fewer than {@link MIN_DATE_TICKS}: d3 steps by weeks when asked
|
|
373
|
+
* for 3 over twelve days and leaves one tick, so the count is raised until three land.
|
|
374
|
+
*/
|
|
375
|
+
export function dateTicks(domain: readonly [Date, Date], count: number, stepMs: number): Date[] {
|
|
376
|
+
const scale = scaleUtc().domain([domain[0], domain[1]])
|
|
377
|
+
const ticksFor = (n: number): Date[] => {
|
|
378
|
+
const ticks = scale.ticks(n)
|
|
379
|
+
if (stepMs < DAY_MS) return ticks
|
|
380
|
+
const days = ticks.filter((t) => t.getTime() % DAY_MS === 0)
|
|
381
|
+
return days.length >= 2 ? days : ticks.filter((_, i, all) => i === 0 || i === all.length - 1)
|
|
382
|
+
}
|
|
383
|
+
const span = Math.abs(domain[1].getTime() - domain[0].getTime())
|
|
384
|
+
const floor = Math.min(MIN_DATE_TICKS, Math.floor(span / DAY_MS))
|
|
385
|
+
let ticks = ticksFor(count)
|
|
386
|
+
// One more tick asked for at a time, so the fewest that reach the floor; 12 bounds the loop.
|
|
387
|
+
for (let n = count + 1; ticks.length < floor && n <= count + 12; n++) ticks = ticksFor(n)
|
|
388
|
+
return ticks
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export function defaultFormatX(v: ChartValue, locale?: string): string {
|
|
392
|
+
if (v instanceof Date) return utcAxisDate(v, locale)
|
|
393
|
+
if (typeof v === 'number') return defaultNumberFormat(v, locale)
|
|
394
|
+
return String(v)
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
const clampTo = (v: number, [lo, hi]: readonly [number, number]): number =>
|
|
398
|
+
Math.min(Math.max(v, Math.min(lo, hi)), Math.max(lo, hi))
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* A tooltip swatch is the engine's `background` shorthand, so a dashed one is a gradient: a 2px
|
|
402
|
+
* dashed line across the swatch's middle, in the row color.
|
|
403
|
+
*/
|
|
404
|
+
export const dashedSwatch = (color: string): string =>
|
|
405
|
+
`repeating-linear-gradient(90deg, ${color} 0 2px, transparent 2px 4px) center / 100% 2px no-repeat`
|
|
406
|
+
|
|
407
|
+
/** A basalt tooltip row as the engine's: the swatch shape folded into the row color. */
|
|
408
|
+
export function engineRow(
|
|
409
|
+
row: ChartTooltipRow & { active?: boolean | undefined },
|
|
410
|
+
): EngineTooltipRow {
|
|
411
|
+
const { label, value, color, swatch, active } = row
|
|
412
|
+
return {
|
|
413
|
+
label,
|
|
414
|
+
value,
|
|
415
|
+
...(color !== undefined && { color: swatch === 'dashed' ? dashedSwatch(color) : color }),
|
|
416
|
+
...(active && { active }),
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/** A series row of a tooltip: the label with its note, the swatch following the series' dash. */
|
|
421
|
+
export function seriesRow(
|
|
422
|
+
s: Pick<ChartSeries<never>, 'label' | 'note' | 'color' | 'dash' | 'mark'>,
|
|
423
|
+
value: string,
|
|
424
|
+
active: boolean,
|
|
425
|
+
): EngineTooltipRow {
|
|
426
|
+
return engineRow({
|
|
427
|
+
label: s.note === undefined ? s.label : `${s.label} · ${s.note}`,
|
|
428
|
+
value,
|
|
429
|
+
color:
|
|
430
|
+
s.mark === 'dot' ? dotSwatch(s.color) : s.mark === 'ring' ? ringSwatch(s.color) : s.color,
|
|
431
|
+
swatch: s.dash === 'dashed' ? 'dashed' : 'solid',
|
|
432
|
+
active,
|
|
433
|
+
})
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/** Keys the compiler reserves for the legend entries it derives from `refLines`. */
|
|
437
|
+
const REF_KEY_PREFIX = '__ref-'
|
|
438
|
+
const ZONE_KEY_PREFIX = '__zone-'
|
|
439
|
+
|
|
440
|
+
/** The legend key of a reference line that names itself (`RefLine.legend`). */
|
|
441
|
+
const refLegendKey = (index: number): string => `${REF_KEY_PREFIX}${index}`
|
|
442
|
+
|
|
443
|
+
/** Legend-only entries for the reference lines that name themselves, in line order. */
|
|
444
|
+
export function refLegendSeries<T>(refLines: readonly RefLine[] | undefined): ChartSeries<T>[] {
|
|
445
|
+
return (refLines ?? []).flatMap((r, i) =>
|
|
446
|
+
r.legend === undefined
|
|
447
|
+
? []
|
|
448
|
+
: [
|
|
449
|
+
{
|
|
450
|
+
key: refLegendKey(i),
|
|
451
|
+
label: r.legend.label,
|
|
452
|
+
color: r.color,
|
|
453
|
+
role: 'reference' as const,
|
|
454
|
+
tooltip: false,
|
|
455
|
+
getValue: () => null,
|
|
456
|
+
...(r.legend.mark !== undefined && { mark: r.legend.mark }),
|
|
457
|
+
...(r.dashed && { dash: 'dashed' as const }),
|
|
458
|
+
},
|
|
459
|
+
],
|
|
460
|
+
)
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/** Legend-only entries for the zones that name themselves (`ZoneSpec.legend`), in zone order. */
|
|
464
|
+
export function zoneLegendSeries<T>(zones: readonly ZoneSpec[] | undefined): ChartSeries<T>[] {
|
|
465
|
+
return (zones ?? []).flatMap((z, i) =>
|
|
466
|
+
z.legend === undefined
|
|
467
|
+
? []
|
|
468
|
+
: [
|
|
469
|
+
{
|
|
470
|
+
key: `${ZONE_KEY_PREFIX}${i}`,
|
|
471
|
+
label: z.legend.label,
|
|
472
|
+
color: z.legend.color ?? z.fill,
|
|
473
|
+
mark: z.legend.mark ?? 'bar',
|
|
474
|
+
role: 'reference' as const,
|
|
475
|
+
tooltip: false,
|
|
476
|
+
getValue: () => null,
|
|
477
|
+
},
|
|
478
|
+
],
|
|
479
|
+
)
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/** The visible series: not toggled off, and not a companion whose parent is. */
|
|
483
|
+
export function visibleSeries<T>(
|
|
484
|
+
series: readonly ChartSeries<T>[],
|
|
485
|
+
hidden: ReadonlySet<string>,
|
|
486
|
+
): ChartSeries<T>[] {
|
|
487
|
+
return series.filter(
|
|
488
|
+
(s) => !hidden.has(s.key) && !(s.parent !== undefined && hidden.has(s.parent)),
|
|
489
|
+
)
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
type YAxis = {
|
|
493
|
+
domain: readonly [number, number]
|
|
494
|
+
format: (v: number) => string
|
|
495
|
+
/** Every value on this axis is a whole number and a bar draws it (a count): ticks land on integers. */
|
|
496
|
+
whole?: boolean
|
|
497
|
+
/** The axis is logarithmic: label placement works in decades (`warpFor`). */
|
|
498
|
+
log?: boolean
|
|
499
|
+
/** The domain is fixed or bounded: a datum past it is drawn on the edge, with a caret. */
|
|
500
|
+
bounded?: boolean
|
|
501
|
+
/**
|
|
502
|
+
* Every value is zero and the page set no domain: the engine still needs a span to draw a flat
|
|
503
|
+
* line on, but the axis labels the zero baseline alone and invents no scale (never a lone `1`).
|
|
504
|
+
*/
|
|
505
|
+
flat?: boolean
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/** Whether every finite value of `series` (and every bound) is zero, with at least one present. */
|
|
509
|
+
function allZero<T>(
|
|
510
|
+
data: readonly T[],
|
|
511
|
+
series: readonly ChartSeries<T>[],
|
|
512
|
+
bounds: readonly number[],
|
|
513
|
+
): boolean {
|
|
514
|
+
let seen = false
|
|
515
|
+
const zero = (v: number | null): boolean => {
|
|
516
|
+
if (v === null || !Number.isFinite(v)) return true
|
|
517
|
+
seen = true
|
|
518
|
+
return v === 0
|
|
519
|
+
}
|
|
520
|
+
if (!bounds.every(zero)) return false
|
|
521
|
+
for (const d of data) for (const s of series) if (!zero(s.getValue(d))) return false
|
|
522
|
+
return seen
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/** The page locale's decimal separator (`.` or `,`). */
|
|
526
|
+
const decimalSeparator = (locale?: string): string =>
|
|
527
|
+
numberFormat(locale, {})
|
|
528
|
+
.formatToParts(1.1)
|
|
529
|
+
.find((p) => p.type === 'decimal')?.value ?? '.'
|
|
530
|
+
|
|
531
|
+
/** A trailing zero fraction behind a digit (`2.0`, `2,00`), the separator being a decimal one. */
|
|
532
|
+
const zeroFraction = (separator: string): RegExp =>
|
|
533
|
+
new RegExp(`(\\d)${separator.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}0+(?!\\d)`, 'g')
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* The tick formatter. When every tick is a whole number (a whole step), a formatter that pads
|
|
537
|
+
* decimals (`toFixed(1)`) prints integers: `2 s`, not `2.0 s`. Only the page locale's decimal
|
|
538
|
+
* separator is read as one, so a thousands group (`1,000`, `1.000` in de) is never cut; a formatter
|
|
539
|
+
* that writes `.` under a `,` locale keeps its padding. The tooltip keeps the full format. The
|
|
540
|
+
* ticks are the engine's own (`count` goes through the same linear scale the engine builds).
|
|
541
|
+
*/
|
|
542
|
+
function wholeStepFormat<T>(
|
|
543
|
+
axis: YAxis,
|
|
544
|
+
cfg: AxisConfig<T> | undefined,
|
|
545
|
+
ticks: { values: readonly number[] } | { count: number },
|
|
546
|
+
locale?: string,
|
|
547
|
+
): (v: number) => string {
|
|
548
|
+
const [lo, hi] = [Math.min(...axis.domain), Math.max(...axis.domain)]
|
|
549
|
+
const values =
|
|
550
|
+
'values' in ticks ? ticks.values : scaleLinear().domain([lo, hi]).ticks(ticks.count)
|
|
551
|
+
if (values.length === 0 || !values.every(Number.isInteger)) return axis.format
|
|
552
|
+
const padded = zeroFraction(decimalSeparator(locale))
|
|
553
|
+
return (v) => axis.format(v).replace(padded, '$1')
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/** A fixed domain's end this near the last round tick (as a share of the tick step) stays unlabelled. */
|
|
557
|
+
const END_TICK_MIN_GAP = 0.4
|
|
558
|
+
|
|
559
|
+
/** A label without its digits (any script), separators and spaces: the unit or symbol text it carries. */
|
|
560
|
+
const labelShape = (label: string): string => label.replace(/[\p{Nd}.,\s]/gu, '')
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* The compact ladder's few ticks can stop short of a fixed domain's end (`[0, 25]` ticks `0 10 20`).
|
|
564
|
+
* The end joins them only when it carries something the round ticks do not: a formatter that states
|
|
565
|
+
* the unit on the end alone (`25 days`) would lose it otherwise. A uniform formatter (`77 kg` beside
|
|
566
|
+
* `76 kg`) gains nothing from a tick off the step, so the end stays unlabelled and every label sits
|
|
567
|
+
* on an even step.
|
|
568
|
+
*/
|
|
569
|
+
function withEndTick<T>(
|
|
570
|
+
cfg: AxisConfig<T> | undefined,
|
|
571
|
+
axis: YAxis,
|
|
572
|
+
count: number,
|
|
573
|
+
): { values: readonly number[] } | null {
|
|
574
|
+
if (!Array.isArray(cfg?.domain) || cfg.nice === true || cfg.scale === 'log') return null
|
|
575
|
+
const [lo, hi] = [Math.min(...axis.domain), Math.max(...axis.domain)]
|
|
576
|
+
const round = scaleLinear().domain([lo, hi]).ticks(count)
|
|
577
|
+
const [first, next, last] = [round.at(0), round.at(1), round.at(-1)]
|
|
578
|
+
if (first === undefined || next === undefined || last === undefined || last >= hi) return null
|
|
579
|
+
if (hi - last < (next - first) * END_TICK_MIN_GAP) return null
|
|
580
|
+
return labelShape(axis.format(hi)) === labelShape(axis.format(last))
|
|
581
|
+
? null
|
|
582
|
+
: { values: [...round, hi] }
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* A count axis never labels a fraction: `0, 0.5, 1` over a day's two events becomes `0, 1, 2`. The
|
|
587
|
+
* count's own ticks keep the integers; fewer than two leave the plan as it was. A tick list the caller
|
|
588
|
+
* wrote, a log axis and a plan that is all integers already stay as they are.
|
|
589
|
+
*/
|
|
590
|
+
function wholeTicks<T>(
|
|
591
|
+
axis: YAxis,
|
|
592
|
+
cfg: AxisConfig<T> | undefined,
|
|
593
|
+
planned: { values: readonly number[] } | { count: number },
|
|
594
|
+
): { values: readonly number[] } | { count: number } {
|
|
595
|
+
if ('values' in planned || cfg?.scale === 'log') return planned
|
|
596
|
+
const [lo, hi] = [Math.min(...axis.domain), Math.max(...axis.domain)]
|
|
597
|
+
const all = scaleLinear().domain([lo, hi]).ticks(planned.count)
|
|
598
|
+
if (all.every(Number.isInteger)) return planned
|
|
599
|
+
const whole = all.filter(Number.isInteger)
|
|
600
|
+
return whole.length >= 2 ? { values: whole } : planned
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* A zone or band drawn on a y axis puts a tick on each of its edges, so the rules land on labels: the
|
|
605
|
+
* round ticks that sit within half a step of an edge give way to it. An edge on or past the domain's
|
|
606
|
+
* end, a non-finite one, and (on a count axis) a fraction stay off. A tick list the caller wrote is
|
|
607
|
+
* never changed (the caller checks `cfg.ticks`).
|
|
608
|
+
*/
|
|
609
|
+
function withEdgeTicks(
|
|
610
|
+
axis: YAxis,
|
|
611
|
+
planned: { values: readonly number[] } | { count: number },
|
|
612
|
+
edges: readonly number[],
|
|
613
|
+
): { values: readonly number[] } | { count: number } {
|
|
614
|
+
const [lo, hi] = [Math.min(...axis.domain), Math.max(...axis.domain)]
|
|
615
|
+
const inside = [...new Set(edges)].filter(
|
|
616
|
+
(e) => Number.isFinite(e) && e > lo && e < hi && (axis.whole !== true || Number.isInteger(e)),
|
|
617
|
+
)
|
|
618
|
+
if (inside.length === 0) return planned
|
|
619
|
+
const base =
|
|
620
|
+
'values' in planned ? planned.values : scaleLinear().domain([lo, hi]).ticks(planned.count)
|
|
621
|
+
const step = base.length > 1 ? Math.abs((base[1] as number) - (base[0] as number)) : hi - lo
|
|
622
|
+
const kept = base.filter((t) => inside.every((e) => Math.abs(t - e) >= step / 2))
|
|
623
|
+
return { values: [...kept, ...inside].toSorted((a, b) => a - b) }
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/** Listed tick values with the strong ones joined, ascending and once each. */
|
|
627
|
+
const withStrong = (values: readonly number[], strong: readonly number[]): number[] =>
|
|
628
|
+
[...new Set([...values, ...strong])].toSorted((a, b) => a - b)
|
|
629
|
+
|
|
630
|
+
export function yGuide<T>(opts: {
|
|
631
|
+
cfg: AxisConfig<T> | undefined
|
|
632
|
+
axis: YAxis
|
|
633
|
+
cls: ContainerClass
|
|
634
|
+
side: 'left' | 'right'
|
|
635
|
+
grid: boolean
|
|
636
|
+
/** The locale the default tick numbers read; absent, the format defaults'. */
|
|
637
|
+
locale?: string | undefined
|
|
638
|
+
/** The edges of the zones drawn on this axis: a tick sits on each when the domain allows. */
|
|
639
|
+
edges?: readonly number[] | undefined
|
|
640
|
+
/** The hover pins its y value beside this axis: the tick on the readout's row is blanked while it shows. */
|
|
641
|
+
readout?: boolean | undefined
|
|
642
|
+
/** The plot's lower-left corner: the lowest tick is blanked while the x chip hangs over it. */
|
|
643
|
+
corner?: Corner | undefined
|
|
644
|
+
/** The labels sit inside the plot, above their grid line, and reserve no gutter (see `CartesianInput.yInside`). */
|
|
645
|
+
inside?: boolean | undefined
|
|
646
|
+
/** Values written in the strong weight and kept when the labels thin: the reference lines drawn `onAxis`. */
|
|
647
|
+
strong?: readonly number[] | undefined
|
|
648
|
+
}): Omit<ChartPositionScaleOptions<number>, 'scale'> {
|
|
649
|
+
const { cfg, axis, cls, side, grid, locale, edges = [], readout = false, corner, inside } = opts
|
|
650
|
+
const ladder = LADDER[cls]
|
|
651
|
+
const planned =
|
|
652
|
+
typeof cfg?.ticks === 'object'
|
|
653
|
+
? { values: cfg.ticks }
|
|
654
|
+
: ((cls === 'narrow' && cfg?.ticks === undefined
|
|
655
|
+
? withEndTick(cfg, axis, ladder.yTicks)
|
|
656
|
+
: null) ?? { count: typeof cfg?.ticks === 'number' ? cfg.ticks : ladder.yTicks })
|
|
657
|
+
const [domLo, domHi] = [Math.min(...axis.domain), Math.max(...axis.domain)]
|
|
658
|
+
const ticks =
|
|
659
|
+
cfg?.scale === 'log' && cfg.ticks === undefined
|
|
660
|
+
? {
|
|
661
|
+
values: logYTicks(
|
|
662
|
+
domLo,
|
|
663
|
+
domHi,
|
|
664
|
+
typeof planned === 'object' && 'count' in planned ? planned.count : ladder.yTicks,
|
|
665
|
+
),
|
|
666
|
+
}
|
|
667
|
+
: axis.flat === true
|
|
668
|
+
? { values: [0] }
|
|
669
|
+
: axis.whole === true
|
|
670
|
+
? wholeTicks(axis, cfg, planned)
|
|
671
|
+
: cfg?.ticks === undefined && cfg?.scale !== 'log'
|
|
672
|
+
? withEdgeTicks(axis, planned, edges)
|
|
673
|
+
: planned
|
|
674
|
+
const gridLine = grid ? { grid: GRID_LINE } : {}
|
|
675
|
+
if (cls === 'micro') return { ...gridLine, axis: false }
|
|
676
|
+
const [lo, hi] = [Math.min(...axis.domain), Math.max(...axis.domain)]
|
|
677
|
+
const strong = (opts.strong ?? []).filter((v) => v > lo && v < hi)
|
|
678
|
+
// A listed or log axis keeps every tick it was given: the strong values join it, never thinning it.
|
|
679
|
+
const written =
|
|
680
|
+
strong.length === 0
|
|
681
|
+
? ticks
|
|
682
|
+
: (typeof cfg?.ticks === 'object' || cfg?.scale === 'log') && 'values' in ticks
|
|
683
|
+
? { ...ticks, values: withStrong(ticks.values, strong) }
|
|
684
|
+
: cfg?.scale === 'log' && 'count' in ticks
|
|
685
|
+
? { values: withStrong(logYTicks(domLo, domHi, ticks.count), strong) }
|
|
686
|
+
: withEdgeTicks(axis, ticks, strong)
|
|
687
|
+
// Read on the values written, the strong ones included: a `38.50` among whole ticks keeps their decimals.
|
|
688
|
+
const tickFormat = wholeStepFormat(axis, cfg, written, locale)
|
|
689
|
+
// Labels sit in a gutter OUTSIDE the plot, against its edge: a line never runs through one. A narrow chart
|
|
690
|
+
// takes no gutter: each label stands inside the plot on its grid line (the top one under its line, where the
|
|
691
|
+
// plot ends), the way the y title does, so the plot takes the whole frame.
|
|
692
|
+
return {
|
|
693
|
+
...gridLine,
|
|
694
|
+
...(side === 'right' && { side: 'right' as const }),
|
|
695
|
+
axis: {
|
|
696
|
+
line: false,
|
|
697
|
+
ticks: {
|
|
698
|
+
...written,
|
|
699
|
+
format: tickFormat,
|
|
700
|
+
line: false,
|
|
701
|
+
...(inside === true && { size: 0, padding: 0 }),
|
|
702
|
+
},
|
|
703
|
+
tickLabels: {
|
|
704
|
+
fontSize: TICK_FONT,
|
|
705
|
+
opacity:
|
|
706
|
+
readout || corner !== undefined
|
|
707
|
+
? yTickOpacity({
|
|
708
|
+
fontSize: TICK_FONT,
|
|
709
|
+
chip: readout,
|
|
710
|
+
corner,
|
|
711
|
+
shift: inside === true ? insideShift : undefined,
|
|
712
|
+
})
|
|
713
|
+
: 1,
|
|
714
|
+
...(inside === true && {
|
|
715
|
+
anchor: 'start' as const,
|
|
716
|
+
dx: INSIDE_DX,
|
|
717
|
+
dy: ({ position }: { position: number }) => insideShift(position),
|
|
718
|
+
}),
|
|
719
|
+
...(strong.length > 0 && {
|
|
720
|
+
fontWeight: ({ value }: { value: number }) =>
|
|
721
|
+
strong.includes(value) ? STRONG_TICK_WEIGHT : undefined,
|
|
722
|
+
thin: { keep: strong },
|
|
723
|
+
}),
|
|
724
|
+
},
|
|
725
|
+
},
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* The values the y axis of `side` labels, as `yGuide` plans them: a written list, else the ticks of the
|
|
731
|
+
* planned count on the axis' domain, with the zone edges `yGuide` adds. Empty on the micro class.
|
|
732
|
+
*/
|
|
733
|
+
export function yTickValues<T>(opts: {
|
|
734
|
+
cfg: AxisConfig<T> | undefined
|
|
735
|
+
axis: YAxis
|
|
736
|
+
cls: ContainerClass
|
|
737
|
+
/** The edges of the zones drawn on this axis: `yGuide` puts a tick on each. */
|
|
738
|
+
edges?: readonly number[] | undefined
|
|
739
|
+
}): number[] {
|
|
740
|
+
if (opts.cls === 'micro') return []
|
|
741
|
+
const guide = yGuide({ ...opts, side: 'left', grid: false })
|
|
742
|
+
const axisSpec = guide.axis
|
|
743
|
+
if (axisSpec === undefined || axisSpec === false) return []
|
|
744
|
+
const ticks = axisSpec.ticks as { values?: readonly number[]; count?: number } | undefined
|
|
745
|
+
if (ticks === undefined) return []
|
|
746
|
+
if (ticks.values !== undefined) return [...ticks.values]
|
|
747
|
+
const [lo, hi] = [Math.min(...opts.axis.domain), Math.max(...opts.axis.domain)]
|
|
748
|
+
return scaleLinear()
|
|
749
|
+
.domain([lo, hi])
|
|
750
|
+
.ticks(ticks.count ?? LADDER[opts.cls].yTicks)
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Where a band or category label centred on its tick would hang past a plot edge: past the right one the
|
|
755
|
+
* engine would shrink the plot to make room for it, past the left one it covers the lowest y label. Such a
|
|
756
|
+
* label is aligned to that edge instead (its anchor, and the shift from its centre to the edge, px).
|
|
757
|
+
* `undefined` when it fits or the width is not known.
|
|
758
|
+
*/
|
|
759
|
+
function bandEdge<X extends ChartX>(
|
|
760
|
+
model: XScaleModel<X>,
|
|
761
|
+
value: ChartValue,
|
|
762
|
+
text: string,
|
|
763
|
+
width: number | undefined,
|
|
764
|
+
yRoom: number,
|
|
765
|
+
): { anchor: 'start' | 'end'; dx: number } | undefined {
|
|
766
|
+
if (width === undefined || !Number.isFinite(width)) return undefined
|
|
767
|
+
const plotWidth = Math.max(0, width - yRoom)
|
|
768
|
+
const centre = model.fraction(value as X)
|
|
769
|
+
if (centre === null || plotWidth <= 0) return undefined
|
|
770
|
+
const half = captionWidth(text, TICK_FONT) / 2
|
|
771
|
+
const toRight = (1 - centre) * plotWidth
|
|
772
|
+
if (half > toRight) return { anchor: 'end', dx: toRight }
|
|
773
|
+
const toLeft = centre * plotWidth
|
|
774
|
+
return half > toLeft ? { anchor: 'start', dx: -toLeft } : undefined
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/** The buckets of a band Date axis, or `null` for any other axis. */
|
|
778
|
+
function bucketDates<X extends ChartX>(model: XScaleModel<X>): readonly Date[] | null {
|
|
779
|
+
if (!model.band || model.kind !== 'date') return null
|
|
780
|
+
const dates = model.values.filter((v): v is X & Date => v instanceof Date)
|
|
781
|
+
return dates.length === model.values.length ? dates : null
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
function xTickPolicy<X extends ChartX>(
|
|
785
|
+
model: XScaleModel<X>,
|
|
786
|
+
xTicks: number | readonly X[],
|
|
787
|
+
/** The caller wrote `ticks`: a band axis honours the number (first and last kept), not its own ladder. */
|
|
788
|
+
explicit = false,
|
|
789
|
+
): { values: readonly ChartValue[] } | { count: number } {
|
|
790
|
+
if (typeof xTicks === 'object')
|
|
791
|
+
return {
|
|
792
|
+
values: model.band || model.kind === 'string' ? matchBandKeys(model.values, xTicks) : xTicks,
|
|
793
|
+
}
|
|
794
|
+
const buckets = typeof xTicks === 'number' && Number.isFinite(xTicks) ? bucketDates(model) : null
|
|
795
|
+
if (buckets !== null && typeof xTicks === 'number')
|
|
796
|
+
return { values: explicit ? strideKeepEnds(buckets, xTicks) : bucketTicks(buckets, xTicks) }
|
|
797
|
+
if (model.log && model.extent) return { values: logTicks(model.extent[0], model.extent[1]) }
|
|
798
|
+
if (model.band || model.kind === 'string')
|
|
799
|
+
return { values: explicit ? strideKeepEnds(model.values, xTicks) : model.values }
|
|
800
|
+
if (model.kind === 'date' && model.extent)
|
|
801
|
+
return {
|
|
802
|
+
values: dateTicks([new Date(model.extent[0]), new Date(model.extent[1])], xTicks, model.step),
|
|
803
|
+
}
|
|
804
|
+
return { count: xTicks }
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Every n-th value, n the smallest stride that leaves at most the class's x tick count (the same
|
|
809
|
+
* ladder a continuous x axis counts to). A band axis labels every value it is given and only drops
|
|
810
|
+
* the ones that collide, so a short-label grid (18 hour columns) would otherwise draw all of them.
|
|
811
|
+
*/
|
|
812
|
+
export function strideTicks<V>(values: readonly V[], cls: ContainerClass): V[] {
|
|
813
|
+
return strideEvery(values, LADDER[cls].xTicks)
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* The one decision between a consumer's x format and the default: the consumer's wins; else dates
|
|
818
|
+
* read span-aware from the given tick values; else the plain default (numbers, strings, and a lone
|
|
819
|
+
* Date with no ticks to read a span from).
|
|
820
|
+
*/
|
|
821
|
+
export function xTickFormat(
|
|
822
|
+
consumer: ((v: ChartValue) => string) | undefined,
|
|
823
|
+
tickValues: readonly ChartValue[],
|
|
824
|
+
locale?: string,
|
|
825
|
+
): (v: ChartValue) => string {
|
|
826
|
+
if (consumer) return consumer
|
|
827
|
+
const plain = (v: ChartValue): string => defaultFormatX(v, locale)
|
|
828
|
+
if (tickValues.length === 0 || !tickValues.every((v): v is Date => v instanceof Date))
|
|
829
|
+
return plain
|
|
830
|
+
const dateFormat = dateTickFormat(tickValues, locale)
|
|
831
|
+
return (v) => (v instanceof Date ? dateFormat(v) : plain(v))
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
/** A tick label's width as the engine measures it for thinning: a centred label carries its glyph room. */
|
|
835
|
+
function tickWidth(text: string, anchor: 'start' | 'end' | 'middle'): number {
|
|
836
|
+
return measureChartText(text, {
|
|
837
|
+
fontSize: TICK_FONT,
|
|
838
|
+
fontWeight: 400,
|
|
839
|
+
fontScale: 1,
|
|
840
|
+
anchor,
|
|
841
|
+
} as Parameters<typeof measureChartText>[1]).width
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
/** The fewest characters a shortened name keeps before its ellipsis: under it the name reads as noise and is thinned instead. */
|
|
845
|
+
const MIN_NAME_CHARS = 3
|
|
846
|
+
|
|
847
|
+
/** `text` cut to an ellipsis where it would overrun a slot of `slot` px (less the gap two labels keep), or whole where no cut keeps enough of it. */
|
|
848
|
+
export function fitToSlot(text: string, slot: number): string {
|
|
849
|
+
const room = slot - TICK_MIN_GAP
|
|
850
|
+
const widthOf = (t: string): number => tickWidth(t, 'middle')
|
|
851
|
+
if (widthOf(text) <= room) return text
|
|
852
|
+
for (let n = text.length - 1; n >= MIN_NAME_CHARS; n--) {
|
|
853
|
+
const cut = `${text.slice(0, n).trimEnd()}…`
|
|
854
|
+
if (widthOf(cut) <= room) return cut
|
|
855
|
+
}
|
|
856
|
+
return text
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/** Whether cutting every name with `cut` keeps as many distinct texts as the names have: no two names read alike after it. */
|
|
860
|
+
export function cutKeepsNamesApart<T>(
|
|
861
|
+
names: readonly T[],
|
|
862
|
+
written: (v: T) => string,
|
|
863
|
+
cut: (v: T) => string,
|
|
864
|
+
): boolean {
|
|
865
|
+
const whole = new Set(names.map((v) => written(v))).size
|
|
866
|
+
return new Set(names.map((v) => cut(v))).size === whole
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/** What the x axis' tick labels are built from: the scale, the caller's ticks and format, the class and the chart's width. */
|
|
870
|
+
type XTickSetupOpts<X extends ChartX> = {
|
|
871
|
+
model: XScaleModel<X>
|
|
872
|
+
xTicks: number | readonly X[] | undefined
|
|
873
|
+
/** A consumer's formatter; absent, Date ticks get the span-aware {@link xTickFormat}. */
|
|
874
|
+
format?: ((v: ChartValue) => string) | undefined
|
|
875
|
+
cls: ContainerClass
|
|
876
|
+
/** The locale the default tick text reads; absent, the format defaults'. */
|
|
877
|
+
locale?: string | undefined
|
|
878
|
+
/** The chart's width in px: a band axis anchors a label wider than its slot to the plot edge. */
|
|
879
|
+
width?: number | undefined
|
|
880
|
+
/** What the y axis takes of the width, px: {@link Y_GUTTER}, or 0 while its labels sit inside the plot (then no gutter takes a label hung past the left edge either). */
|
|
881
|
+
yRoom?: number | undefined
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
function xTickSetup<X extends ChartX>(opts: XTickSetupOpts<X>) {
|
|
885
|
+
const { model, xTicks, cls } = opts
|
|
886
|
+
const ladder = LADDER[cls]
|
|
887
|
+
const ticks = xTickPolicy(model, xTicks ?? ladder.xTicks, xTicks !== undefined)
|
|
888
|
+
// A Date axis always resolves to `values` (the time scale has an extent; a band axis lists its
|
|
889
|
+
// buckets), so `{ count }` is only ever a number axis and never needs the date formatter.
|
|
890
|
+
const written = xTickFormat(opts.format, 'values' in ticks ? ticks.values : [], opts.locale)
|
|
891
|
+
// A continuous scale's domain start and span; a band scale pads its first slot, so none applies.
|
|
892
|
+
const [leftEdgeX, spanX] =
|
|
893
|
+
!model.band && model.extent
|
|
894
|
+
? [model.extent[0], model.extent[1] - model.extent[0]]
|
|
895
|
+
: [Number.NaN, Number.NaN]
|
|
896
|
+
// A label centred on a tick near the plot's left edge hangs left of it, under the gutter's
|
|
897
|
+
// lowest y label: start-anchor it. `+value` is a Date's timestamp, or the number itself.
|
|
898
|
+
// A band or category label that hangs over a plot edge is aligned to that edge instead (see `bandEdge`).
|
|
899
|
+
const yRoom = opts.yRoom ?? Y_GUTTER
|
|
900
|
+
const layout = (format: (v: ChartValue) => string) => {
|
|
901
|
+
// With no y gutter (the labels sit inside the plot) and no margin, a label centred nearer an edge than half its
|
|
902
|
+
// width would hang out of the frame: it starts (left edge) or ends (right edge) at its tick instead.
|
|
903
|
+
const edgeAnchor = (value: ChartValue): 'start' | 'end' | undefined => {
|
|
904
|
+
if (yRoom > 0 || opts.width === undefined || !Number.isFinite(opts.width)) return undefined
|
|
905
|
+
const centre = model.fraction(value as X)
|
|
906
|
+
if (centre === null) return undefined
|
|
907
|
+
const half = captionWidth(format(value), TICK_FONT) / 2
|
|
908
|
+
if (centre * opts.width < half) return 'start'
|
|
909
|
+
return (1 - centre) * opts.width < half ? 'end' : undefined
|
|
910
|
+
}
|
|
911
|
+
const anchor = ({ value }: { value: ChartValue }) => {
|
|
912
|
+
const edge = edgeAnchor(value)
|
|
913
|
+
if (edge !== undefined) return edge
|
|
914
|
+
if (model.band || model.kind === 'string')
|
|
915
|
+
return bandEdge(model, value, format(value), opts.width, yRoom)?.anchor
|
|
916
|
+
const share = model.log
|
|
917
|
+
? (model.fraction(value as X) ?? Number.NaN)
|
|
918
|
+
: (+value - leftEdgeX) / spanX
|
|
919
|
+
return share >= 0 && share <= LEFT_EDGE_SHARE ? ('start' as const) : undefined
|
|
920
|
+
}
|
|
921
|
+
const dx = ({ value }: { value: ChartValue }) =>
|
|
922
|
+
(model.band || model.kind === 'string') && edgeAnchor(value) === undefined
|
|
923
|
+
? bandEdge(model, value, format(value), opts.width, yRoom)?.dx
|
|
924
|
+
: undefined
|
|
925
|
+
return { anchor, dx }
|
|
926
|
+
}
|
|
927
|
+
// A band axis of names keeps every name: where the engine would thin them (two neighbours' boxes meet), a name
|
|
928
|
+
// wider than its slot is cut to an ellipsis instead, so none is dropped; where a cut would make two names read alike,
|
|
929
|
+
// the whole axis keeps its whole names instead (see the gate below).
|
|
930
|
+
const named = 'values' in ticks ? ticks.values : model.values
|
|
931
|
+
const places = named.flatMap((v) => model.fraction(v as X) ?? [])
|
|
932
|
+
const plotWidth = Math.max(0, (opts.width ?? 0) - yRoom)
|
|
933
|
+
// The room one name has: the least gap between two named ticks.
|
|
934
|
+
const slot =
|
|
935
|
+
model.band && model.kind === 'string' && opts.width !== undefined && places.length > 0
|
|
936
|
+
? plotWidth *
|
|
937
|
+
Math.min(
|
|
938
|
+
1,
|
|
939
|
+
...places
|
|
940
|
+
.toSorted((a, b) => a - b)
|
|
941
|
+
.flatMap((f, i, all) => (i === 0 ? [] : [f - (all[i - 1] as number)])),
|
|
942
|
+
)
|
|
943
|
+
: undefined
|
|
944
|
+
const natural = layout(written)
|
|
945
|
+
const thins = (): boolean => {
|
|
946
|
+
let right = Number.NEGATIVE_INFINITY
|
|
947
|
+
for (const value of named) {
|
|
948
|
+
const centre = model.fraction(value as X)
|
|
949
|
+
if (centre === null) continue
|
|
950
|
+
const side = natural.anchor({ value })
|
|
951
|
+
const width = tickWidth(written(value), side ?? 'middle')
|
|
952
|
+
const at = centre * plotWidth + (natural.dx({ value }) ?? 0)
|
|
953
|
+
const left = side === 'start' ? at : side === 'end' ? at - width : at - width / 2
|
|
954
|
+
if (left < right + TICK_MIN_GAP) return true
|
|
955
|
+
right = left + width
|
|
956
|
+
}
|
|
957
|
+
return false
|
|
958
|
+
}
|
|
959
|
+
// A cut that would make two names read alike is no cut: the whole axis keeps its whole names and the engine thins them.
|
|
960
|
+
const cut = slot === undefined ? undefined : (v: ChartValue) => fitToSlot(written(v), slot)
|
|
961
|
+
const format =
|
|
962
|
+
cut === undefined || !thins() || !cutKeepsNamesApart(named, written, cut) ? written : cut
|
|
963
|
+
const { anchor, dx } = format === written ? natural : layout(format)
|
|
964
|
+
return { ticks, format, anchor, dx }
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* The x tick labels the axis prints, as the readout's coverage check reads them: each tick's value, text,
|
|
969
|
+
* anchor and shift. A number axis with a tick count has the ticks d3 picks for it (the engine may thin them).
|
|
970
|
+
*/
|
|
971
|
+
export function xTickLabelList<X extends ChartX>(opts: XTickSetupOpts<X>): readonly XTickLabel[] {
|
|
972
|
+
return tickLabelsOf(opts.model, xTickSetup(opts))
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
function tickLabelsOf<X extends ChartX>(
|
|
976
|
+
model: XScaleModel<X>,
|
|
977
|
+
{ ticks, format, anchor, dx }: ReturnType<typeof xTickSetup>,
|
|
978
|
+
): readonly XTickLabel[] {
|
|
979
|
+
const { extent } = model
|
|
980
|
+
const values: readonly ChartValue[] =
|
|
981
|
+
'values' in ticks
|
|
982
|
+
? ticks.values
|
|
983
|
+
: extent === undefined
|
|
984
|
+
? []
|
|
985
|
+
: scaleLinear().domain([extent[0], extent[1]]).ticks(ticks.count)
|
|
986
|
+
return values.map((value) => ({
|
|
987
|
+
value,
|
|
988
|
+
text: format(value),
|
|
989
|
+
anchor: anchor({ value }),
|
|
990
|
+
dx: dx({ value }),
|
|
991
|
+
}))
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
export function xGuide<X extends ChartX>(
|
|
995
|
+
opts: XTickSetupOpts<X> & {
|
|
996
|
+
/** The axis name, drawn centred under the ticks by the engine's own axis label. */
|
|
997
|
+
title?: string | undefined
|
|
998
|
+
/** What the hover's x readout prints; given, the tick under the readout is blanked while it shows. */
|
|
999
|
+
readout?: ((v: ChartValue) => string) | undefined
|
|
1000
|
+
/** The plot's lower-left corner; given with `readout`, the first tick is blanked while the y chip sits over it. */
|
|
1001
|
+
corner?: Corner | undefined
|
|
1002
|
+
},
|
|
1003
|
+
): Omit<ChartPositionScaleOptions<ChartValue>, 'scale'> {
|
|
1004
|
+
const setup = xTickSetup(opts)
|
|
1005
|
+
const { ticks, format, anchor, dx } = setup
|
|
1006
|
+
return {
|
|
1007
|
+
axis: {
|
|
1008
|
+
line: AXIS_LINE,
|
|
1009
|
+
ticks: { ...ticks, format, line: false, size: 0 },
|
|
1010
|
+
...(opts.title && { label: xTitleLabel(opts.title) }),
|
|
1011
|
+
tickLabels: {
|
|
1012
|
+
fontSize: TICK_FONT,
|
|
1013
|
+
opacity: opts.readout
|
|
1014
|
+
? xTickOpacity({
|
|
1015
|
+
tick: {
|
|
1016
|
+
text: format,
|
|
1017
|
+
anchor: (value) => anchor({ value }),
|
|
1018
|
+
dx: (value) => dx({ value }),
|
|
1019
|
+
},
|
|
1020
|
+
readoutText: opts.readout,
|
|
1021
|
+
fontSize: TICK_FONT,
|
|
1022
|
+
width: opts.width,
|
|
1023
|
+
corner: opts.corner,
|
|
1024
|
+
ticks: tickLabelsOf(opts.model, setup),
|
|
1025
|
+
})
|
|
1026
|
+
: 1,
|
|
1027
|
+
thin: { minGap: TICK_MIN_GAP },
|
|
1028
|
+
anchor,
|
|
1029
|
+
dx,
|
|
1030
|
+
},
|
|
1031
|
+
},
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
/** Gradient resource id for a series' area fill; the host's `idPrefix` scopes it per chart. */
|
|
1036
|
+
export const areaGradientId = (index: number): string => `basalt-area-${index}`
|
|
1037
|
+
|
|
1038
|
+
export function areaGradient(index: number, color: string): ChartGradient {
|
|
1039
|
+
return {
|
|
1040
|
+
id: areaGradientId(index),
|
|
1041
|
+
x1: 0,
|
|
1042
|
+
y1: 0,
|
|
1043
|
+
x2: 0,
|
|
1044
|
+
y2: 1,
|
|
1045
|
+
stops: [
|
|
1046
|
+
{ offset: 0, color: `color-mix(in srgb, ${color} ${AREA_TOP}, transparent)` },
|
|
1047
|
+
{ offset: 1, color: `color-mix(in srgb, ${color} ${AREA_BOTTOM}, transparent)` },
|
|
1048
|
+
],
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
const areaTint = (color: string): string => `color-mix(in srgb, ${color} ${AREA_TOP}, transparent)`
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* A series area filled by value zone: a vertical gradient whose stops sit at the zone boundaries.
|
|
1056
|
+
* The engine writes `<linearGradient>` in the default `objectBoundingBox` units, so offsets are
|
|
1057
|
+
* fractions of the AREA's own box, not of the plot: from the larger of the series' maximum and 0 down
|
|
1058
|
+
* to the smaller of its minimum and 0, the baseline the area closes to even when the y domain
|
|
1059
|
+
* excludes 0. A boundary at value `v` sits at `(ceiling - v) / (ceiling - floor)`. Hard edges:
|
|
1060
|
+
* neighbouring zones meet at one offset; overlapping zones never run backwards. `null` when no zone
|
|
1061
|
+
* reaches the area (the caller keeps the plain series-color fade). Linear axes only.
|
|
1062
|
+
*/
|
|
1063
|
+
export function zoneAreaGradient(
|
|
1064
|
+
index: number,
|
|
1065
|
+
zones: readonly ZoneSpec[],
|
|
1066
|
+
values: readonly (number | null)[],
|
|
1067
|
+
): ChartGradient | null {
|
|
1068
|
+
let floor = 0
|
|
1069
|
+
let ceiling = 0
|
|
1070
|
+
for (const v of values) {
|
|
1071
|
+
if (v === null || !Number.isFinite(v)) continue
|
|
1072
|
+
if (v < floor) floor = v
|
|
1073
|
+
if (v > ceiling) ceiling = v
|
|
1074
|
+
}
|
|
1075
|
+
const span = ceiling - floor
|
|
1076
|
+
if (span <= 0) return null
|
|
1077
|
+
const offsetOf = (v: number): number => (ceiling - Math.min(ceiling, Math.max(floor, v))) / span
|
|
1078
|
+
const reaching = zones
|
|
1079
|
+
.filter((z) => !Number.isNaN(z.from) && !Number.isNaN(z.to) && z.to > floor && z.from < ceiling)
|
|
1080
|
+
.toSorted((p, q) => q.to - p.to)
|
|
1081
|
+
let previous = 0
|
|
1082
|
+
const stops = reaching.flatMap((z) =>
|
|
1083
|
+
[offsetOf(z.to), offsetOf(z.from)].map((raw) => {
|
|
1084
|
+
previous = Math.max(previous, raw)
|
|
1085
|
+
return { offset: previous, color: areaTint(z.fill) }
|
|
1086
|
+
}),
|
|
1087
|
+
)
|
|
1088
|
+
if (stops.length === 0) return null
|
|
1089
|
+
return { id: areaGradientId(index), x1: 0, y1: 0, x2: 0, y2: 1, stops }
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
/** The gradient resource for a series' `area` fill: zones, a color ref, or the series color. */
|
|
1093
|
+
function seriesAreaGradient<T, X extends ChartX>(
|
|
1094
|
+
s: ChartSeries<T>,
|
|
1095
|
+
index: number,
|
|
1096
|
+
input: CartesianInput<T, X>,
|
|
1097
|
+
axes: Axes<T>,
|
|
1098
|
+
): ChartGradient {
|
|
1099
|
+
const plain = areaGradient(
|
|
1100
|
+
index,
|
|
1101
|
+
typeof s.area === 'string' && s.area !== 'zones' ? s.area : s.color,
|
|
1102
|
+
)
|
|
1103
|
+
if (s.area !== 'zones') return plain
|
|
1104
|
+
const side = axes.onRight(s) ? 'right' : 'left'
|
|
1105
|
+
const zones = (input.zones ?? []).filter((z) => axes.scaleId(z.axisSide) === axes.scaleId(side))
|
|
1106
|
+
return (
|
|
1107
|
+
zoneAreaGradient(
|
|
1108
|
+
index,
|
|
1109
|
+
zones,
|
|
1110
|
+
input.data.map((d) => s.getValue(d)),
|
|
1111
|
+
) ?? plain
|
|
1112
|
+
)
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
const isBar = <T>(s: ChartSeries<T>): boolean => s.mark === 'bar'
|
|
1116
|
+
|
|
1117
|
+
/** The two synthetic totals standing in for a stack's bars in its AUTO domain only: the positive
|
|
1118
|
+
* sum and the negative sum per x; every other series counts as itself. */
|
|
1119
|
+
const STACK_POSITIVE_KEY = '__stack+'
|
|
1120
|
+
const STACK_NEGATIVE_KEY = '__stack-'
|
|
1121
|
+
|
|
1122
|
+
function stackedSeries<T>(series: readonly ChartSeries<T>[]): ChartSeries<T>[] {
|
|
1123
|
+
const bars = series.filter(isBar)
|
|
1124
|
+
if (bars.length === 0) return [...series]
|
|
1125
|
+
const sum = (d: T, sign: 1 | -1): number | null => {
|
|
1126
|
+
let total = 0
|
|
1127
|
+
let summed = false
|
|
1128
|
+
for (const s of bars) {
|
|
1129
|
+
const v = s.getValue(d)
|
|
1130
|
+
if (v === null || !Number.isFinite(v) || Math.sign(v) !== sign) continue
|
|
1131
|
+
total += v
|
|
1132
|
+
summed = true
|
|
1133
|
+
}
|
|
1134
|
+
return summed ? total : null
|
|
1135
|
+
}
|
|
1136
|
+
const base = bars[0] as ChartSeries<T>
|
|
1137
|
+
return [
|
|
1138
|
+
...series.filter((s) => !isBar(s)),
|
|
1139
|
+
{ ...base, key: STACK_POSITIVE_KEY, getValue: (d) => sum(d, 1) },
|
|
1140
|
+
{ ...base, key: STACK_NEGATIVE_KEY, getValue: (d) => sum(d, -1) },
|
|
1141
|
+
]
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
/** A normalized stack spans [0, 1], or [-1, 1] when a share is negative. */
|
|
1145
|
+
function normalizedDomain<T>(
|
|
1146
|
+
data: readonly T[],
|
|
1147
|
+
series: readonly ChartSeries<T>[],
|
|
1148
|
+
): readonly [number, number] {
|
|
1149
|
+
const negative = data.some((d) => series.some((s) => isBar(s) && (s.getValue(d) ?? 0) < 0))
|
|
1150
|
+
return negative ? [-1, 1] : [0, 1]
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
type Axes<T> = {
|
|
1154
|
+
left: YAxis
|
|
1155
|
+
right: YAxis | null
|
|
1156
|
+
onRight: (s: ChartSeries<T>) => boolean
|
|
1157
|
+
axisOf: (side: 'left' | 'right' | undefined) => YAxis
|
|
1158
|
+
scaleId: (side: 'left' | 'right' | undefined) => 'y' | 'y2'
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
/** The ring a dot draws round its radius, px: the room a dot needs is its radius and this. */
|
|
1162
|
+
const DOT_RING = 1
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* `axis` with its domain grown so every dot (`dots`: its value and radius) sits whole inside the
|
|
1166
|
+
* plot, which clips its marks at the edge: a dot centred on the floor draws half. Grown only on a
|
|
1167
|
+
* side a dot reaches, by the radius in px of the grown plot (`plotHeight`). A domain with a bar on it
|
|
1168
|
+
* keeps its floor: the bars stand on it.
|
|
1169
|
+
*/
|
|
1170
|
+
function roomForDots(
|
|
1171
|
+
axis: YAxis,
|
|
1172
|
+
dots: readonly { y: number; r: number; caret?: boolean }[],
|
|
1173
|
+
plotHeight: number,
|
|
1174
|
+
): YAxis {
|
|
1175
|
+
const [lo, hi] = [Math.min(...axis.domain), Math.max(...axis.domain)]
|
|
1176
|
+
if (dots.length === 0 || plotHeight <= 0 || hi === lo) return axis
|
|
1177
|
+
const r = Math.max(...dots.map((d) => d.r)) + DOT_RING
|
|
1178
|
+
const [low, high] = [Math.min(...dots.map((d) => d.y)), Math.max(...dots.map((d) => d.y))]
|
|
1179
|
+
// A dot capped at an end also keeps the off-scale caret clear of itself, on the plot's side of the edge.
|
|
1180
|
+
const caret = (end: number): number =>
|
|
1181
|
+
dots.some((d) => d.caret === true && d.y === end) ? CARET_SIZE : 0
|
|
1182
|
+
let [from, to] = [lo, hi]
|
|
1183
|
+
// The room is a share of the grown span, so it is found by settling: a few passes converge.
|
|
1184
|
+
for (let i = 0; i < 4; i++) {
|
|
1185
|
+
const per = (to - from) / plotHeight
|
|
1186
|
+
from = Math.min(lo, low - (r + caret(lo)) * per)
|
|
1187
|
+
to = Math.max(hi, high + (r + caret(hi)) * per)
|
|
1188
|
+
}
|
|
1189
|
+
if (from === lo && to === hi) return axis
|
|
1190
|
+
return { ...axis, domain: axis.domain[0] <= axis.domain[1] ? [from, to] : [to, from] }
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* `axis` with its floor lowered so the value label of its most negative bar fits under the bar's end:
|
|
1195
|
+
* a negative bar's label stands outside it, below, as a positive one stands above, so the plot keeps
|
|
1196
|
+
* the label's line and its air (`VALUE_HEAD_PX`) under the longest bar. The room is a share of the grown
|
|
1197
|
+
* span, found by settling. A floor already further down is kept.
|
|
1198
|
+
*/
|
|
1199
|
+
function roomForValues(axis: YAxis, floor: number | null, plotHeight: number): YAxis {
|
|
1200
|
+
const [lo, hi] = [Math.min(...axis.domain), Math.max(...axis.domain)]
|
|
1201
|
+
if (floor === null || floor >= 0 || plotHeight <= 0 || hi === lo) return axis
|
|
1202
|
+
let from = lo
|
|
1203
|
+
for (let i = 0; i < 4; i++)
|
|
1204
|
+
from = Math.min(lo, floor - (VALUE_ROOM_PX * (hi - from)) / plotHeight)
|
|
1205
|
+
if (from === lo) return axis
|
|
1206
|
+
return { ...axis, domain: axis.domain[0] <= axis.domain[1] ? [from, hi] : [hi, from] }
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/** Only a dot within a tenth of the span of an end can touch the plot's edge: the rest never read the size. */
|
|
1210
|
+
const nearEnd = (axis: YAxis, dots: readonly { y: number }[]): boolean => {
|
|
1211
|
+
const [lo, hi] = [Math.min(...axis.domain), Math.max(...axis.domain)]
|
|
1212
|
+
return dots.some((d) => d.y - lo < (hi - lo) * 0.1 || hi - d.y < (hi - lo) * 0.1)
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
/** Overlay bounds per axis; `'right'` without a `y2` lands on the left. */
|
|
1216
|
+
function overlayBounds<T, X extends ChartX>(
|
|
1217
|
+
input: CartesianInput<T, X>,
|
|
1218
|
+
): { left: number[]; right: number[] } {
|
|
1219
|
+
const bounds = { left: [] as number[], right: [] as number[] }
|
|
1220
|
+
const sideOf = (side: 'left' | 'right' | undefined): 'left' | 'right' =>
|
|
1221
|
+
side === 'right' && input.y2 !== undefined ? 'right' : 'left'
|
|
1222
|
+
for (const z of input.zones ?? []) bounds[sideOf(z.axisSide)].push(z.from, z.to)
|
|
1223
|
+
for (const l of input.refLines ?? []) bounds[sideOf(l.axis)].push(l.value)
|
|
1224
|
+
return bounds
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
/** A stack changes only the AUTO rule; a tuple is fixed and a domain function gets the real series. */
|
|
1228
|
+
function leftDomain<T, X extends ChartX>(
|
|
1229
|
+
input: CartesianInput<T, X>,
|
|
1230
|
+
series: readonly ChartSeries<T>[],
|
|
1231
|
+
bounds: readonly number[],
|
|
1232
|
+
tickCount: number,
|
|
1233
|
+
): readonly [number, number] {
|
|
1234
|
+
const auto = input.y?.domain === undefined || input.y.domain === 'auto'
|
|
1235
|
+
if (auto && input.stack === 'normalized') return normalizedDomain(input.data, series)
|
|
1236
|
+
return resolveYDomain(
|
|
1237
|
+
input.y,
|
|
1238
|
+
input.data,
|
|
1239
|
+
auto && input.stack ? stackedSeries(series) : series,
|
|
1240
|
+
bounds,
|
|
1241
|
+
tickCount,
|
|
1242
|
+
)
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
/** Whether the left axis shows counts: a bar draws it, no stack shares it out, every value is whole. */
|
|
1246
|
+
function wholeCounts<T, X extends ChartX>(
|
|
1247
|
+
input: CartesianInput<T, X>,
|
|
1248
|
+
series: readonly ChartSeries<T>[],
|
|
1249
|
+
): boolean {
|
|
1250
|
+
if (input.stack === 'normalized' || !series.some(isBar)) return false
|
|
1251
|
+
return series.every((s) =>
|
|
1252
|
+
input.data.every((d) => {
|
|
1253
|
+
const v = s.getValue(d)
|
|
1254
|
+
return v === null || !Number.isFinite(v) || Number.isInteger(v)
|
|
1255
|
+
}),
|
|
1256
|
+
)
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* An explicit domain (a tuple, or the one the `y.domain` seam wrote): the data may lie past it. An
|
|
1261
|
+
* auto domain always holds its data. A stack of two or more bar series is not bounded per series
|
|
1262
|
+
* (a part's value is not the height it reaches): `clampStacks` and `stackCapMarks` cap its total
|
|
1263
|
+
* instead. A normalized one never clamps (it shares out the raw values); a lone bar series in the
|
|
1264
|
+
* default `stacked` layout is no stack and clamps here.
|
|
1265
|
+
*/
|
|
1266
|
+
const isBounded = <T, X extends ChartX>(
|
|
1267
|
+
input: CartesianInput<T, X>,
|
|
1268
|
+
cfg: AxisConfig<T> | undefined,
|
|
1269
|
+
): boolean => {
|
|
1270
|
+
const stacks =
|
|
1271
|
+
input.stack === 'normalized' ||
|
|
1272
|
+
(input.stack === 'stacked' && input.series.filter(isBar).length > 1)
|
|
1273
|
+
return !stacks && cfg?.domain !== undefined && cfg.domain !== 'auto'
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
/** An auto-domain axis whose every value is zero: it labels the baseline and invents no scale. */
|
|
1277
|
+
const flatAxis = <T, X extends ChartX>(
|
|
1278
|
+
input: CartesianInput<T, X>,
|
|
1279
|
+
cfg: AxisConfig<T> | undefined,
|
|
1280
|
+
series: readonly ChartSeries<T>[],
|
|
1281
|
+
bounds: readonly number[],
|
|
1282
|
+
): boolean =>
|
|
1283
|
+
cfg?.scale !== 'log' &&
|
|
1284
|
+
(cfg?.domain === undefined || cfg.domain === 'auto') &&
|
|
1285
|
+
input.stack !== 'normalized' &&
|
|
1286
|
+
allZero(input.data, series, bounds)
|
|
1287
|
+
|
|
1288
|
+
/** Both y domains (basalt's, from the VISIBLE series plus this axis' overlay bounds) and scales. */
|
|
1289
|
+
function resolveAxes<T, X extends ChartX>(
|
|
1290
|
+
input: CartesianInput<T, X>,
|
|
1291
|
+
visible: readonly ChartSeries<T>[],
|
|
1292
|
+
cls: ContainerClass,
|
|
1293
|
+
): Axes<T> {
|
|
1294
|
+
const hasY2 = input.y2 !== undefined
|
|
1295
|
+
// Ticks the axis draws at this class: a domain that ends on one never leaves the data above the top label.
|
|
1296
|
+
const tickCount = (cfg: AxisConfig<T> | undefined): number =>
|
|
1297
|
+
typeof cfg?.ticks === 'object' ? 0 : (cfg?.ticks ?? LADDER[cls].yTicks)
|
|
1298
|
+
const bounds = overlayBounds(input)
|
|
1299
|
+
const onRight = (s: ChartSeries<T>): boolean => hasY2 && s.axis === 'right'
|
|
1300
|
+
const left: YAxis = {
|
|
1301
|
+
domain: leftDomain(
|
|
1302
|
+
input,
|
|
1303
|
+
visible.filter((s) => !onRight(s)),
|
|
1304
|
+
bounds.left,
|
|
1305
|
+
tickCount(input.y),
|
|
1306
|
+
),
|
|
1307
|
+
format: input.y?.format ?? ((v) => defaultNumberFormat(v, input.locale)),
|
|
1308
|
+
bounded: isBounded(input, input.y),
|
|
1309
|
+
...(input.y?.scale === 'log' && { log: true }),
|
|
1310
|
+
...(flatAxis(
|
|
1311
|
+
input,
|
|
1312
|
+
input.y,
|
|
1313
|
+
visible.filter((s) => !onRight(s)),
|
|
1314
|
+
bounds.left,
|
|
1315
|
+
) && { flat: true }),
|
|
1316
|
+
whole: wholeCounts(
|
|
1317
|
+
input,
|
|
1318
|
+
visible.filter((s) => !onRight(s)),
|
|
1319
|
+
),
|
|
1320
|
+
}
|
|
1321
|
+
const right: YAxis | null = hasY2
|
|
1322
|
+
? {
|
|
1323
|
+
domain: resolveYDomain(
|
|
1324
|
+
input.y2,
|
|
1325
|
+
input.data,
|
|
1326
|
+
visible.filter(onRight),
|
|
1327
|
+
bounds.right,
|
|
1328
|
+
tickCount(input.y2),
|
|
1329
|
+
),
|
|
1330
|
+
format: input.y2?.format ?? ((v) => defaultNumberFormat(v, input.locale)),
|
|
1331
|
+
bounded: isBounded(input, input.y2),
|
|
1332
|
+
...(input.y2?.scale === 'log' && { log: true }),
|
|
1333
|
+
...(flatAxis(input, input.y2, visible.filter(onRight), bounds.right) && { flat: true }),
|
|
1334
|
+
}
|
|
1335
|
+
: null
|
|
1336
|
+
return {
|
|
1337
|
+
left,
|
|
1338
|
+
right,
|
|
1339
|
+
onRight,
|
|
1340
|
+
axisOf: (side) => (side === 'right' && right ? right : left),
|
|
1341
|
+
scaleId: (side) => (side === 'right' && hasY2 ? 'y2' : 'y'),
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
/** The sides a `ZoneEdge` names, in a fixed order: the lower bound first. */
|
|
1346
|
+
const edgeSides = <A extends string, B extends string>(
|
|
1347
|
+
edge: ZoneEdge<A | B> | undefined,
|
|
1348
|
+
lower: A,
|
|
1349
|
+
upper: B,
|
|
1350
|
+
): { lower: boolean; upper: boolean } => ({
|
|
1351
|
+
lower: edge !== undefined && (edge.side === lower || edge.side === 'both'),
|
|
1352
|
+
upper: edge !== undefined && (edge.side === upper || edge.side === 'both'),
|
|
1353
|
+
})
|
|
1354
|
+
|
|
1355
|
+
const edgePaint = (edge: ZoneEdge<string>) => ({
|
|
1356
|
+
stroke: edge.color,
|
|
1357
|
+
strokeOpacity: 1,
|
|
1358
|
+
strokeWidth: edge.width ?? 1,
|
|
1359
|
+
...(edge.dashed && { strokeDasharray: DASH }),
|
|
1360
|
+
})
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* An edge rule at `position` when it lies strictly inside `(lo, hi)`: a bound at or past the plot
|
|
1364
|
+
* edge (infinite, outside the domain, exactly on it) has no rule, for y- and x-zones alike.
|
|
1365
|
+
*/
|
|
1366
|
+
const edgeRule = (
|
|
1367
|
+
position: number | null,
|
|
1368
|
+
[lo, hi]: readonly [number, number],
|
|
1369
|
+
make: (at: number) => ChartMarks[number],
|
|
1370
|
+
): ChartMarks => (position !== null && position > lo && position < hi ? [make(position)] : [])
|
|
1371
|
+
|
|
1372
|
+
/** Fixed paint under the kind's marks: zones, then x-zones, each with its edge rules. */
|
|
1373
|
+
function underlayMarks<T, X extends ChartX>(
|
|
1374
|
+
input: CartesianInput<T, X>,
|
|
1375
|
+
model: XScaleModel<X>,
|
|
1376
|
+
axes: Axes<T>,
|
|
1377
|
+
): ChartMarks {
|
|
1378
|
+
const fractionRows = [{ f0: 0, f1: 1 }]
|
|
1379
|
+
const zones = (input.zones ?? []).flatMap((z, i) => {
|
|
1380
|
+
const domain = axes.axisOf(z.axisSide).domain
|
|
1381
|
+
const [lo, hi] = [Math.min(...domain), Math.max(...domain)]
|
|
1382
|
+
const rule = (value: number, name: string) =>
|
|
1383
|
+
edgeRule(value, [lo, hi], (at) =>
|
|
1384
|
+
decorative(
|
|
1385
|
+
ruleY([at], {
|
|
1386
|
+
id: `zone-${i}-${name}`,
|
|
1387
|
+
yScale: axes.scaleId(z.axisSide),
|
|
1388
|
+
...(z.edge && edgePaint(z.edge)),
|
|
1389
|
+
}),
|
|
1390
|
+
),
|
|
1391
|
+
)
|
|
1392
|
+
const sides = edgeSides(z.edge, 'bottom', 'top')
|
|
1393
|
+
return [
|
|
1394
|
+
decorative(
|
|
1395
|
+
rect(fractionRows, {
|
|
1396
|
+
id: `zone-${i}`,
|
|
1397
|
+
x1: 'f0',
|
|
1398
|
+
x2: 'f1',
|
|
1399
|
+
y1: () => clampTo(z.from, domain),
|
|
1400
|
+
y2: () => clampTo(z.to, domain),
|
|
1401
|
+
xScale: 'zx',
|
|
1402
|
+
yScale: axes.scaleId(z.axisSide),
|
|
1403
|
+
fill: z.fill,
|
|
1404
|
+
inset: 0,
|
|
1405
|
+
}),
|
|
1406
|
+
),
|
|
1407
|
+
...(sides.lower ? rule(Math.min(z.from, z.to), 'bottom') : []),
|
|
1408
|
+
...(sides.upper ? rule(Math.max(z.from, z.to), 'top') : []),
|
|
1409
|
+
]
|
|
1410
|
+
})
|
|
1411
|
+
const xZones = (input.xZones ?? []).flatMap((z, i) => {
|
|
1412
|
+
const f = xZoneFractions(z, model)
|
|
1413
|
+
if (!f) return []
|
|
1414
|
+
const sides = edgeSides(z.edge, 'start', 'end')
|
|
1415
|
+
// The bound's own plot fraction (widened like the band), unclamped: `f` is clamped to the plot.
|
|
1416
|
+
const widen = xZoneWiden(z, model)
|
|
1417
|
+
const bound = (value: X | undefined, sign: 1 | -1): number | null => {
|
|
1418
|
+
const fraction =
|
|
1419
|
+
value === undefined ? null : xZoneBound(value, sign === 1 ? 'to' : 'from', model)
|
|
1420
|
+
return fraction === null ? null : fraction + sign * widen
|
|
1421
|
+
}
|
|
1422
|
+
const rule = (value: X | undefined, sign: 1 | -1, name: string) =>
|
|
1423
|
+
edgeRule(bound(value, sign), [0, 1], (at) =>
|
|
1424
|
+
decorative(
|
|
1425
|
+
ruleX([at], {
|
|
1426
|
+
id: `xzone-${i}-${name}`,
|
|
1427
|
+
x: (v: number) => v,
|
|
1428
|
+
xScale: 'zx',
|
|
1429
|
+
...(z.edge && edgePaint(z.edge)),
|
|
1430
|
+
}),
|
|
1431
|
+
),
|
|
1432
|
+
)
|
|
1433
|
+
return [
|
|
1434
|
+
decorative(
|
|
1435
|
+
rect([{ f0: f[0], f1: f[1] }], {
|
|
1436
|
+
id: `xzone-${i}`,
|
|
1437
|
+
x1: 'f0',
|
|
1438
|
+
x2: 'f1',
|
|
1439
|
+
y1: () => (z.y ? clampTo(z.y.from, axes.left.domain) : axes.left.domain[0]),
|
|
1440
|
+
y2: () => (z.y ? clampTo(z.y.to, axes.left.domain) : axes.left.domain[1]),
|
|
1441
|
+
xScale: 'zx',
|
|
1442
|
+
fill: z.fill,
|
|
1443
|
+
inset: 0,
|
|
1444
|
+
}),
|
|
1445
|
+
),
|
|
1446
|
+
// An omitted bound is the plot edge: nothing to draw a rule on.
|
|
1447
|
+
...(sides.lower ? rule(z.from, -1, 'start') : []),
|
|
1448
|
+
...(sides.upper ? rule(z.to, 1, 'end') : []),
|
|
1449
|
+
]
|
|
1450
|
+
})
|
|
1451
|
+
return [...zones, ...xZones]
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
/** A band's bar spans this share of its half step (`paddingInner` 0.2 leaves 0.8 of the step). */
|
|
1455
|
+
const BAR_BODY = 0.8
|
|
1456
|
+
const REF_LABEL_DX = 6
|
|
1457
|
+
/** The hairline that ties a caption stepped off its rule back to it: its width at the plot's edge and its reach into the caption's box, px. */
|
|
1458
|
+
const REF_LABEL_LEADER_INSET = 1
|
|
1459
|
+
const REF_LABEL_LEADER_PAD = 4
|
|
1460
|
+
/** The most rows a zone caption tries down the inside of its zone. */
|
|
1461
|
+
const MAX_ZONE_ROWS = 24
|
|
1462
|
+
/** The most rows a zone caption tries down the side of its zone, after and before it. */
|
|
1463
|
+
const MAX_ZONE_SIDE_ROWS = 6
|
|
1464
|
+
/** A plot narrower than this (a phone's) keeps a zone caption inside its zone, over its own columns, or drops it: beside the zone it reads as the next thing's, px. */
|
|
1465
|
+
const ZONE_SIDE_MIN_PLOT_PX = 400
|
|
1466
|
+
/** A caption this wide or less (a run's '5 h') still stands beside its zone on a phone's plot, px. */
|
|
1467
|
+
const ZONE_SHORT_CAPTION_PX = 40
|
|
1468
|
+
/** Whether a zone's caption of this width may stand beside the zone on a plot of this width: a phone's plot keeps a longer caption inside its zone or drops it (a plot not yet measured keeps its first spot). */
|
|
1469
|
+
export const zoneSideSpotsFit = (plotWidth: number, captionPx: number): boolean =>
|
|
1470
|
+
plotWidth <= 0 || plotWidth >= ZONE_SIDE_MIN_PLOT_PX || captionPx <= ZONE_SHORT_CAPTION_PX
|
|
1471
|
+
/** How many rows above its top edge and under its bottom edge a zone bounded in y tries for its caption. */
|
|
1472
|
+
const MAX_ZONE_EDGE_ROWS = 3
|
|
1473
|
+
/** The room a bar's value label takes above its end (below a negative bar's), px: its line and the air under it. */
|
|
1474
|
+
const VALUE_HEAD_PX = lineHeight(BASALT.text.micro) + 3
|
|
1475
|
+
/** The room kept under the longest negative bar for its value label, px: the label's line, its gap to the bar and the air the placer keeps round it. */
|
|
1476
|
+
const VALUE_ROOM_PX = VALUE_HEAD_PX + 6
|
|
1477
|
+
/** The px an x axis takes off the frame, until the plot is measured: a first pass reads the plot's height as the frame's less this. */
|
|
1478
|
+
const X_AXIS_PX = 40
|
|
1479
|
+
/** The share of a bar slot kept between two grouped bars (`group({ padding })` in `bars-marks`). */
|
|
1480
|
+
const GROUP_PADDING = 0.1
|
|
1481
|
+
|
|
1482
|
+
/** What a reference line's caption needs to choose its spot: the plot in px and the data on its axis. */
|
|
1483
|
+
type RefLabelContext<T, X extends ChartX> = {
|
|
1484
|
+
plotWidth: number
|
|
1485
|
+
plotHeight: number
|
|
1486
|
+
/** One polyline per visible series on the line's axis. */
|
|
1487
|
+
lines: (side: 'left' | 'right' | undefined) => readonly (readonly RefLabelPoint[])[]
|
|
1488
|
+
/** Whether a bar or a dot on the left axis fills a box of a rule caption (px across, px below the plot top). */
|
|
1489
|
+
xBlocked: NonNullable<Parameters<typeof xRefLabelSpots>[0]['blocked']>
|
|
1490
|
+
/** The bar bodies and dots on the line's axis: a caption keeps off them. */
|
|
1491
|
+
marks: (side: 'left' | 'right' | undefined) => { bars: LabelBox[]; dots: DotMark[] }
|
|
1492
|
+
/** Whether a line path crosses a caption box (px across, px below the plot top). */
|
|
1493
|
+
lineHits: (box: { x0: number; x1: number; top: number; bottom: number }) => boolean
|
|
1494
|
+
/** The end labels placed on the left axis: a caption there keeps clear of them. */
|
|
1495
|
+
claimed: readonly LabelBox[]
|
|
1496
|
+
/** The vertical rules' captions, px below the plot top: a reference caption keeps clear of them. */
|
|
1497
|
+
xCaptions: readonly XRefLabelBox[]
|
|
1498
|
+
/** The captions already placed, by axis: the next one keeps clear of them. */
|
|
1499
|
+
placed: Record<'left' | 'right', LabelBox[]>
|
|
1500
|
+
axes: Axes<T>
|
|
1501
|
+
model: XScaleModel<X>
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
/** A caption box taken from the plot top in px, as a span of values on an axis with `domain`. */
|
|
1505
|
+
function xCaptionOn(
|
|
1506
|
+
box: XRefLabelBox,
|
|
1507
|
+
domain: readonly [number, number],
|
|
1508
|
+
plotHeight: number,
|
|
1509
|
+
): LabelBox {
|
|
1510
|
+
const [lo, hi] = [Math.min(...domain), Math.max(...domain)]
|
|
1511
|
+
const perPx = plotHeight > 0 ? (hi - lo) / plotHeight : 0
|
|
1512
|
+
return { fx0: box.fx0, fx1: box.fx1, y0: hi - box.bottom * perPx, y1: hi - box.top * perPx }
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
/** Half the height of another rule's claim, px: its half stroke and a pixel of air. */
|
|
1516
|
+
const RULE_CLAIM_PX = 2
|
|
1517
|
+
|
|
1518
|
+
/** Other reference rules as boxes across the plot's width, for a caption to keep off. */
|
|
1519
|
+
function ruleClaims(
|
|
1520
|
+
values: readonly number[],
|
|
1521
|
+
domain: readonly [number, number],
|
|
1522
|
+
plotHeight: number,
|
|
1523
|
+
): LabelBox[] {
|
|
1524
|
+
const [lo, hi] = [Math.min(...domain), Math.max(...domain)]
|
|
1525
|
+
const perPx = plotHeight > 0 ? (hi - lo) / plotHeight : 0
|
|
1526
|
+
return values.map((v) => ({
|
|
1527
|
+
fx0: 0,
|
|
1528
|
+
fx1: 1,
|
|
1529
|
+
y0: v - RULE_CLAIM_PX * perPx,
|
|
1530
|
+
y1: v + RULE_CLAIM_PX * perPx,
|
|
1531
|
+
}))
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
/** The caption naming a reference line, at the spot {@link placeRefLabel} picks; none when no spot is clear of the other captions. */
|
|
1535
|
+
const refLabelMark = <T, X extends ChartX>(
|
|
1536
|
+
r: RefLine,
|
|
1537
|
+
i: number,
|
|
1538
|
+
ctx: RefLabelContext<T, X>,
|
|
1539
|
+
/** The values of the other rules on this line's axis: a caption never crosses one. */
|
|
1540
|
+
others: readonly number[] = [],
|
|
1541
|
+
): ChartMarks => {
|
|
1542
|
+
const { axes } = ctx
|
|
1543
|
+
const startFirst = r.axis === 'right' && axes.scaleId(r.axis) === 'y2'
|
|
1544
|
+
const side = startFirst ? 'right' : 'left'
|
|
1545
|
+
const axis = axes.axisOf(r.axis)
|
|
1546
|
+
const warp = warpFor(axis.log)
|
|
1547
|
+
const domain = warp.domain(axis.domain)
|
|
1548
|
+
const placed = placeRefLabel({
|
|
1549
|
+
pinned: r.labelPosition,
|
|
1550
|
+
startFirst,
|
|
1551
|
+
value: warp.to(r.value),
|
|
1552
|
+
domain,
|
|
1553
|
+
plotWidth: ctx.plotWidth,
|
|
1554
|
+
plotHeight: ctx.plotHeight,
|
|
1555
|
+
label: r.label ?? '',
|
|
1556
|
+
fontSize: BASALT.text.micro,
|
|
1557
|
+
series: ctx.lines(r.axis),
|
|
1558
|
+
...ctx.marks(r.axis),
|
|
1559
|
+
claimed: [
|
|
1560
|
+
...(startFirst ? [] : ctx.claimed),
|
|
1561
|
+
...ctx.xCaptions.map((b) => xCaptionOn(b, domain, ctx.plotHeight)),
|
|
1562
|
+
...ctx.placed[side],
|
|
1563
|
+
...ruleClaims(others.map(warp.to), domain, ctx.plotHeight),
|
|
1564
|
+
],
|
|
1565
|
+
})
|
|
1566
|
+
if (placed === null) return []
|
|
1567
|
+
ctx.placed[side].push(placed.box)
|
|
1568
|
+
const { position, shift, slide } = placed
|
|
1569
|
+
const atStart = position.startsWith('start')
|
|
1570
|
+
const above = position.endsWith('above')
|
|
1571
|
+
const dy = refLabelDy(position, BASALT.text.micro) + (above ? -shift : shift)
|
|
1572
|
+
const label = decorative(
|
|
1573
|
+
text([{ f: atStart ? slide : 1 - slide }], {
|
|
1574
|
+
id: `ref-${i}-label`,
|
|
1575
|
+
x: (d: { f: number }) => d.f,
|
|
1576
|
+
y: () => r.value,
|
|
1577
|
+
xScale: 'zx',
|
|
1578
|
+
yScale: axes.scaleId(r.axis),
|
|
1579
|
+
text: () => r.label ?? '',
|
|
1580
|
+
fill: CV.inkMuted,
|
|
1581
|
+
fontSize: BASALT.text.micro,
|
|
1582
|
+
anchor: atStart ? 'start' : 'end',
|
|
1583
|
+
dx: atStart ? REF_LABEL_DX : -REF_LABEL_DX,
|
|
1584
|
+
dy,
|
|
1585
|
+
}),
|
|
1586
|
+
)
|
|
1587
|
+
if (shift === 0) return [label]
|
|
1588
|
+
// A caption stepped off its rule is tied back to it by a hairline at the plot's edge.
|
|
1589
|
+
const [lo, hi] = [Math.min(...domain), Math.max(...domain)]
|
|
1590
|
+
const perPx = ctx.plotHeight > 0 ? (hi - lo) / ctx.plotHeight : 0
|
|
1591
|
+
const reach = (shift + REF_LABEL_LEADER_PAD) * perPx
|
|
1592
|
+
const edge = (atStart ? 1 : -1) * (REF_LABEL_LEADER_INSET / Math.max(ctx.plotWidth, 1))
|
|
1593
|
+
const f = atStart ? 0 : 1
|
|
1594
|
+
return [
|
|
1595
|
+
decorative(
|
|
1596
|
+
rect(
|
|
1597
|
+
[
|
|
1598
|
+
{
|
|
1599
|
+
f0: f,
|
|
1600
|
+
f1: f + edge,
|
|
1601
|
+
y0: r.value,
|
|
1602
|
+
y1: warp.from(warp.to(r.value) + (above ? reach : -reach)),
|
|
1603
|
+
},
|
|
1604
|
+
],
|
|
1605
|
+
{
|
|
1606
|
+
id: `ref-${i}-leader`,
|
|
1607
|
+
x1: 'f0',
|
|
1608
|
+
x2: 'f1',
|
|
1609
|
+
y1: 'y0',
|
|
1610
|
+
y2: 'y1',
|
|
1611
|
+
xScale: 'zx',
|
|
1612
|
+
yScale: axes.scaleId(r.axis),
|
|
1613
|
+
fill: CV.inkMuted,
|
|
1614
|
+
inset: 0,
|
|
1615
|
+
},
|
|
1616
|
+
),
|
|
1617
|
+
),
|
|
1618
|
+
label,
|
|
1619
|
+
]
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* The captions of the x zones that carry a `label`, over the marks, muted like a reference
|
|
1624
|
+
* caption: inside the zone at its top-start corner; after the zone, then before it, when the
|
|
1625
|
+
* caption is wider than the zone, and never over another zone; slid along the zone in 10 px steps (the first
|
|
1626
|
+
* inside rows, then the edge rows) when the corner, the edges and the sides are all taken; dropped when no spot stays in the
|
|
1627
|
+
* plot clear of the reference captions, the zone captions placed before it, the end labels, the
|
|
1628
|
+
* page's own labels, every line and rule, every bar and dot and the room a bar's value label takes. Reads the plot size,
|
|
1629
|
+
* so only a chart with a zone caption pays the measured re-render.
|
|
1630
|
+
*/
|
|
1631
|
+
const xZoneLabelMarks = <T, X extends ChartX>(
|
|
1632
|
+
input: CartesianInput<T, X>,
|
|
1633
|
+
ctx: RefLabelContext<T, X>,
|
|
1634
|
+
): ChartMarks => {
|
|
1635
|
+
const { plotWidth, plotHeight, axes, model } = ctx
|
|
1636
|
+
const fontSize = BASALT.text.micro
|
|
1637
|
+
const warp = warpFor(axes.left.log)
|
|
1638
|
+
const domain = warp.domain(axes.left.domain)
|
|
1639
|
+
const [lo, hi] = [Math.min(...domain), Math.max(...domain)]
|
|
1640
|
+
const perPx = plotHeight > 0 && hi > lo ? (hi - lo) / plotHeight : 0
|
|
1641
|
+
const inDomain = (v: number): number => warp.to(clampTo(v, axes.left.domain))
|
|
1642
|
+
const avoid = (): LabelBox[] => [
|
|
1643
|
+
...ctx.xCaptions.map((b) => xCaptionOn(b, domain, plotHeight)),
|
|
1644
|
+
...ctx.placed.left,
|
|
1645
|
+
...ctx.claimed,
|
|
1646
|
+
]
|
|
1647
|
+
return (input.xZones ?? []).flatMap((z, i) => {
|
|
1648
|
+
const f = z.label ? xZoneFractions(z, model) : null
|
|
1649
|
+
if (!z.label || f === null) return []
|
|
1650
|
+
const top = z.y ? inDomain(Math.max(z.y.from, z.y.to)) : hi
|
|
1651
|
+
const bottom = z.y ? inDomain(Math.min(z.y.from, z.y.to)) : lo
|
|
1652
|
+
const width = estimateWidth(z.label, fontSize)
|
|
1653
|
+
const [x0, x1] = [f[0] * plotWidth, f[1] * plotWidth]
|
|
1654
|
+
// A line box from the zone's top: its first row sits in the corner, each next one a row lower.
|
|
1655
|
+
const rowTop = fontSize / 2 - 2
|
|
1656
|
+
const rowBottom = fontSize * 1.5 + 2
|
|
1657
|
+
const stepPx = rowBottom - rowTop + 2
|
|
1658
|
+
const zoneHeightPx = perPx > 0 ? (top - bottom) / perPx : 0
|
|
1659
|
+
const rows =
|
|
1660
|
+
perPx > 0
|
|
1661
|
+
? Math.min(MAX_ZONE_ROWS, Math.max(1, Math.floor((zoneHeightPx - rowTop) / stepPx)))
|
|
1662
|
+
: 1
|
|
1663
|
+
const inside = Array.from({ length: rows }, (_, row) => ({
|
|
1664
|
+
at: f[0],
|
|
1665
|
+
side: 1 as const,
|
|
1666
|
+
left: x0 + REF_LABEL_DX,
|
|
1667
|
+
inside: true,
|
|
1668
|
+
row,
|
|
1669
|
+
}))
|
|
1670
|
+
// A zone bounded in y has room above its top edge and under its bottom one, over its own columns.
|
|
1671
|
+
const edge = z.y
|
|
1672
|
+
? [
|
|
1673
|
+
// The first row clears the zone's own edge rule by a pixel or two, the next ones step away.
|
|
1674
|
+
...Array.from({ length: MAX_ZONE_EDGE_ROWS }, (_, k) => -(rowBottom + 2.5) / stepPx - k),
|
|
1675
|
+
...Array.from(
|
|
1676
|
+
{ length: MAX_ZONE_EDGE_ROWS },
|
|
1677
|
+
(_, k) => (zoneHeightPx + 3 - rowTop) / stepPx + k,
|
|
1678
|
+
),
|
|
1679
|
+
].map((row) => ({
|
|
1680
|
+
at: f[0],
|
|
1681
|
+
side: 1 as const,
|
|
1682
|
+
left: x0 + REF_LABEL_DX,
|
|
1683
|
+
inside: false,
|
|
1684
|
+
row,
|
|
1685
|
+
}))
|
|
1686
|
+
: []
|
|
1687
|
+
// The same rows, slid along the zone's own span: a zone that bars or lines fill from its corner to
|
|
1688
|
+
// its far end still has a gap somewhere along it, so its caption moves there (10 px a try, the first
|
|
1689
|
+
// three inside rows and the edge rows) rather than drop. A caption that fits its corner or sits
|
|
1690
|
+
// beside its zone never moves.
|
|
1691
|
+
const slid = [...inside.slice(0, 3), ...edge].flatMap((row) =>
|
|
1692
|
+
Array.from({ length: Math.floor((x1 - x0 - width) / 10) }, (_, k) => ({
|
|
1693
|
+
...row,
|
|
1694
|
+
at: f[0] + ((k + 1) * 10) / plotWidth,
|
|
1695
|
+
left: row.left + (k + 1) * 10,
|
|
1696
|
+
})),
|
|
1697
|
+
)
|
|
1698
|
+
// Inside the zone, top to bottom, then above and under it, then after it and before it on the top
|
|
1699
|
+
// row, then lower down beside it: a zone that lines cross keeps its caption beside it rather
|
|
1700
|
+
// than lose it. Then the same rows along the zone.
|
|
1701
|
+
const spots = [
|
|
1702
|
+
...inside,
|
|
1703
|
+
...edge,
|
|
1704
|
+
...(!zoneSideSpotsFit(plotWidth, width)
|
|
1705
|
+
? []
|
|
1706
|
+
: Array.from({ length: MAX_ZONE_SIDE_ROWS }, (_, row) => [
|
|
1707
|
+
{ at: f[1], side: 1 as const, left: x1 + REF_LABEL_DX, inside: false, row },
|
|
1708
|
+
{ at: f[0], side: -1 as const, left: x0 - REF_LABEL_DX - width, inside: false, row },
|
|
1709
|
+
]).flat()),
|
|
1710
|
+
...slid,
|
|
1711
|
+
]
|
|
1712
|
+
type Spot = (typeof spots)[number]
|
|
1713
|
+
const offset = (spot: Spot): number => spot.row * stepPx
|
|
1714
|
+
// Every other zone as a box (its x span, its y span or the plot's): a caption beside its zone never lies over one.
|
|
1715
|
+
const neighbours = (input.xZones ?? []).flatMap((o, j): LabelBox[] => {
|
|
1716
|
+
const g = j === i ? null : xZoneFractions(o, model)
|
|
1717
|
+
if (g === null) return []
|
|
1718
|
+
const [from, to] = o.y ? [warp.to(o.y.from), warp.to(o.y.to)] : [lo, hi]
|
|
1719
|
+
return [{ fx0: g[0], fx1: g[1], y0: Math.min(from, to), y1: Math.max(from, to) }]
|
|
1720
|
+
})
|
|
1721
|
+
// The caption's line box from the zone's top, in values, for the collision pass.
|
|
1722
|
+
const boxOf = (spot: Spot): LabelBox => ({
|
|
1723
|
+
fx0: spot.left / plotWidth,
|
|
1724
|
+
fx1: (spot.left + width) / plotWidth,
|
|
1725
|
+
y0: top - (rowBottom + offset(spot)) * perPx,
|
|
1726
|
+
y1: top - (rowTop + offset(spot)) * perPx,
|
|
1727
|
+
})
|
|
1728
|
+
// The same box in px below the plot top, for the marks: no bar, dot or line path under it.
|
|
1729
|
+
const pxOf = (spot: Spot): { x0: number; x1: number; top: number; bottom: number } => {
|
|
1730
|
+
const edge = perPx > 0 ? (hi - top) / perPx : 0
|
|
1731
|
+
return {
|
|
1732
|
+
x0: spot.left,
|
|
1733
|
+
x1: spot.left + width,
|
|
1734
|
+
top: edge + rowTop + offset(spot),
|
|
1735
|
+
bottom: edge + rowBottom + offset(spot),
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
// A caption sits where no line, rule, bar, dot or bar value passes through its box, or it is dropped: a
|
|
1739
|
+
// struck-through or overprinted caption reads worse than none, and the zone's fill still shows what it spans.
|
|
1740
|
+
const fits = (s: Spot): boolean =>
|
|
1741
|
+
s.left >= 0 &&
|
|
1742
|
+
s.left + width <= (s.inside ? x1 - REF_LABEL_DX : plotWidth) &&
|
|
1743
|
+
(s.inside || !neighbours.some((o) => boxesMeet(boxOf(s), o))) &&
|
|
1744
|
+
(s.inside || (pxOf(s).top >= 0 && pxOf(s).bottom <= plotHeight)) &&
|
|
1745
|
+
!avoid().some((b) => boxesMeet(boxOf(s), b)) &&
|
|
1746
|
+
!ctx.xBlocked(pxOf(s)) &&
|
|
1747
|
+
!ctx.lineHits(pxOf(s))
|
|
1748
|
+
// Before the plot is measured the caption keeps its first spot.
|
|
1749
|
+
const spot = plotWidth <= 0 ? spots[0] : spots.find(fits)
|
|
1750
|
+
if (spot === undefined) return []
|
|
1751
|
+
if (plotWidth > 0) ctx.placed.left.push(boxOf(spot))
|
|
1752
|
+
return [
|
|
1753
|
+
decorative(
|
|
1754
|
+
text([{ f: spot.at }], {
|
|
1755
|
+
id: `xzone-${i}-label`,
|
|
1756
|
+
x: (d: { f: number }) => d.f,
|
|
1757
|
+
y: () => warp.from(top),
|
|
1758
|
+
xScale: 'zx',
|
|
1759
|
+
yScale: 'y',
|
|
1760
|
+
text: () => z.label ?? '',
|
|
1761
|
+
fill: CV.inkMuted,
|
|
1762
|
+
fontSize,
|
|
1763
|
+
anchor: spot.side === 1 ? 'start' : 'end',
|
|
1764
|
+
dx: spot.side * REF_LABEL_DX,
|
|
1765
|
+
dy: fontSize + offset(spot),
|
|
1766
|
+
}),
|
|
1767
|
+
),
|
|
1768
|
+
]
|
|
1769
|
+
})
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
/** Reference lines, over the marks. `label` reads the plot size, so only a chart with an unpinned caption pays for it. */
|
|
1773
|
+
const refLineMarks = <T, X extends ChartX>(
|
|
1774
|
+
input: CartesianInput<T, X>,
|
|
1775
|
+
axes: Axes<T>,
|
|
1776
|
+
label: () => RefLabelContext<T, X>,
|
|
1777
|
+
): ChartMarks =>
|
|
1778
|
+
(input.refLines ?? []).flatMap((r, i) =>
|
|
1779
|
+
// A line that names itself in the legend can be toggled off there.
|
|
1780
|
+
input.hidden?.has(refLegendKey(i))
|
|
1781
|
+
? []
|
|
1782
|
+
: [
|
|
1783
|
+
ruleY([r.value], {
|
|
1784
|
+
id: `ref-${i}`,
|
|
1785
|
+
stroke: r.color,
|
|
1786
|
+
strokeOpacity: 1,
|
|
1787
|
+
strokeWidth: 1,
|
|
1788
|
+
yScale: axes.scaleId(r.axis),
|
|
1789
|
+
...(r.dashed && { strokeDasharray: DASH }),
|
|
1790
|
+
}),
|
|
1791
|
+
...(r.label
|
|
1792
|
+
? refLabelMark(
|
|
1793
|
+
r,
|
|
1794
|
+
i,
|
|
1795
|
+
label(),
|
|
1796
|
+
(input.refLines ?? []).flatMap((o, j) =>
|
|
1797
|
+
j === i ||
|
|
1798
|
+
input.hidden?.has(refLegendKey(j)) ||
|
|
1799
|
+
axes.scaleId(o.axis) !== axes.scaleId(r.axis)
|
|
1800
|
+
? []
|
|
1801
|
+
: [o.value],
|
|
1802
|
+
),
|
|
1803
|
+
)
|
|
1804
|
+
: []),
|
|
1805
|
+
],
|
|
1806
|
+
)
|
|
1807
|
+
|
|
1808
|
+
/** The edges of the zones drawn against one axis: a tick sits on each. */
|
|
1809
|
+
function zoneEdgesOn<T, X extends ChartX>(
|
|
1810
|
+
input: CartesianInput<T, X>,
|
|
1811
|
+
axes: Axes<T>,
|
|
1812
|
+
side: 'left' | 'right',
|
|
1813
|
+
): number[] {
|
|
1814
|
+
return (input.zones ?? [])
|
|
1815
|
+
.filter((z) => axes.scaleId(z.axisSide) === axes.scaleId(side))
|
|
1816
|
+
.flatMap((z) => [z.from, z.to])
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
function buildScales<T, X extends ChartX>(opts: {
|
|
1820
|
+
input: CartesianInput<T, X>
|
|
1821
|
+
model: XScaleModel<X>
|
|
1822
|
+
axes: Axes<T>
|
|
1823
|
+
formatX: (v: ChartValue) => string
|
|
1824
|
+
cls: ContainerClass
|
|
1825
|
+
zoneScale: boolean
|
|
1826
|
+
/** The chart's width in px. */
|
|
1827
|
+
width?: number
|
|
1828
|
+
}): StoredChartSpec['scales'] {
|
|
1829
|
+
const { input, model, axes, formatX, cls, zoneScale, width } = opts
|
|
1830
|
+
const edgesOn = (side: 'left' | 'right'): number[] => zoneEdgesOn(input, axes, side)
|
|
1831
|
+
const strongOn = (side: 'left' | 'right'): number[] =>
|
|
1832
|
+
(input.refLines ?? []).flatMap((r) =>
|
|
1833
|
+
r.onAxis === true && axes.scaleId(r.axis) === axes.scaleId(side) ? [r.value] : [],
|
|
1834
|
+
)
|
|
1835
|
+
const { left, right } = axes
|
|
1836
|
+
const leftWarp = warpFor(left.log)
|
|
1837
|
+
const [warpLo, warpHi] = leftWarp.domain(left.domain)
|
|
1838
|
+
const yFloor = Math.min(warpLo, warpHi)
|
|
1839
|
+
const ySpan = Math.max(warpLo, warpHi) - yFloor
|
|
1840
|
+
// The x chip hangs left of the plot only where it is drawn: on a chart that labels its x axis and does not
|
|
1841
|
+
// follow another chart's cursor. The y chip pins only without a right axis.
|
|
1842
|
+
const corner: Corner = {
|
|
1843
|
+
x: (value) => model.fraction(value as X),
|
|
1844
|
+
xChip: () => labelsX(input) && !followsChart(input.cursorGroup, input.chartId),
|
|
1845
|
+
y: (value) =>
|
|
1846
|
+
typeof value === 'number' && ySpan > 0 ? (leftWarp.to(value) - yFloor) / ySpan : null,
|
|
1847
|
+
}
|
|
1848
|
+
if (input.bare === true) {
|
|
1849
|
+
return {
|
|
1850
|
+
x: { scale: model.scale, axis: false as const },
|
|
1851
|
+
y: { scale: yScaleFor(input.y, left.domain), axis: false as const },
|
|
1852
|
+
// A right-axis series still needs its scale, drawn or not.
|
|
1853
|
+
...(right && {
|
|
1854
|
+
y2: {
|
|
1855
|
+
channel: 'y' as const,
|
|
1856
|
+
scale: yScaleFor(input.y2, right.domain),
|
|
1857
|
+
axis: false as const,
|
|
1858
|
+
},
|
|
1859
|
+
}),
|
|
1860
|
+
...(zoneScale && {
|
|
1861
|
+
zx: { channel: 'x' as const, scale: scaleLinear().domain([0, 1]), axis: false as const },
|
|
1862
|
+
}),
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
return {
|
|
1866
|
+
x: {
|
|
1867
|
+
scale: model.scale,
|
|
1868
|
+
...xGuide({
|
|
1869
|
+
model,
|
|
1870
|
+
xTicks: input.xTicks,
|
|
1871
|
+
format: tickFormatOf(input, formatX),
|
|
1872
|
+
title: cls === 'micro' ? undefined : input.xTitle,
|
|
1873
|
+
cls,
|
|
1874
|
+
locale: input.locale,
|
|
1875
|
+
width,
|
|
1876
|
+
yRoom: yRoomPx(yInsideOf(input, cls, right !== null)),
|
|
1877
|
+
readout: cls === 'micro' ? undefined : formatX,
|
|
1878
|
+
corner: right === null ? corner : undefined,
|
|
1879
|
+
}),
|
|
1880
|
+
},
|
|
1881
|
+
y: {
|
|
1882
|
+
scale: yScaleFor(input.y, left.domain),
|
|
1883
|
+
...(input.yAxis === false
|
|
1884
|
+
? { axis: false as const }
|
|
1885
|
+
: yGuide({
|
|
1886
|
+
cfg: input.y,
|
|
1887
|
+
axis: left,
|
|
1888
|
+
cls,
|
|
1889
|
+
// A chart with one y axis may stand it on the right; beside a `y2` the left stays left.
|
|
1890
|
+
side: rightAlone(input, axes) ? 'right' : 'left',
|
|
1891
|
+
grid: input.y?.grid ?? true,
|
|
1892
|
+
locale: input.locale,
|
|
1893
|
+
edges: edgesOn('left'),
|
|
1894
|
+
strong: strongOn('left'),
|
|
1895
|
+
// The hover pins the y value only without a right axis (see `crosshairGuide`).
|
|
1896
|
+
readout: right === null,
|
|
1897
|
+
// The x chip hangs over the plot's lower left, where a right axis has no tick to give way.
|
|
1898
|
+
...(!rightAlone(input, axes) && { corner }),
|
|
1899
|
+
inside: yInsideOf(input, cls, right !== null),
|
|
1900
|
+
})),
|
|
1901
|
+
},
|
|
1902
|
+
...(right && {
|
|
1903
|
+
y2: {
|
|
1904
|
+
channel: 'y' as const,
|
|
1905
|
+
scale: yScaleFor(input.y2, right.domain),
|
|
1906
|
+
...yGuide({
|
|
1907
|
+
cfg: input.y2,
|
|
1908
|
+
axis: right,
|
|
1909
|
+
cls,
|
|
1910
|
+
side: 'right',
|
|
1911
|
+
grid: input.y2?.grid ?? false,
|
|
1912
|
+
locale: input.locale,
|
|
1913
|
+
edges: edgesOn('right'),
|
|
1914
|
+
strong: strongOn('right'),
|
|
1915
|
+
}),
|
|
1916
|
+
},
|
|
1917
|
+
}),
|
|
1918
|
+
...(zoneScale && {
|
|
1919
|
+
zx: { channel: 'x' as const, scale: scaleLinear().domain([0, 1]), axis: false as const },
|
|
1920
|
+
}),
|
|
1921
|
+
// A y title is a caption above the tick column; the micro class draws no axes, so no titles.
|
|
1922
|
+
...(cls !== 'micro' && input.y?.title && { ytitle: yTitleScale(input.y.title, 'left') }),
|
|
1923
|
+
...(cls !== 'micro' &&
|
|
1924
|
+
right &&
|
|
1925
|
+
input.y2?.title && { y2title: yTitleScale(input.y2.title, 'right') }),
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
/** A chart's lone y axis standing on the right. Beside a `y2` the left axis stays left. */
|
|
1930
|
+
const rightAlone = <T, X extends ChartX>(input: CartesianInput<T, X>, axes: Axes<T>): boolean =>
|
|
1931
|
+
axes.right === null && input.y?.side === 'right'
|
|
1932
|
+
|
|
1933
|
+
/** The x tick text: the consumer's tick format, else its readout format, else the default (`undefined`). */
|
|
1934
|
+
function tickFormatOf<T, X extends ChartX>(
|
|
1935
|
+
input: CartesianInput<T, X>,
|
|
1936
|
+
formatX: (v: ChartValue) => string,
|
|
1937
|
+
): ((v: ChartValue) => string) | undefined {
|
|
1938
|
+
const tick = input.formatXTick
|
|
1939
|
+
if (tick !== undefined) return (v) => tick(v as X)
|
|
1940
|
+
return input.formatX ? formatX : undefined
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* The tooltip title: the consumer's header, a long UTC date for a Date x, else the axis format. A
|
|
1945
|
+
* day-granular series keeps its long date under a consumer `formatX` too: that formatter shortens
|
|
1946
|
+
* the ticks (`2 Sep`), it does not rename the day.
|
|
1947
|
+
*/
|
|
1948
|
+
function tooltipHeader<T, X extends ChartX>(
|
|
1949
|
+
input: CartesianInput<T, X>,
|
|
1950
|
+
formatX: (v: ChartValue) => string,
|
|
1951
|
+
dayOnly: boolean,
|
|
1952
|
+
v: ChartValue,
|
|
1953
|
+
d: T,
|
|
1954
|
+
): string {
|
|
1955
|
+
if (input.tooltip && input.tooltip.formatHeader) return input.tooltip.formatHeader(v as X, d)
|
|
1956
|
+
if (v instanceof Date && (!input.formatX || dayOnly))
|
|
1957
|
+
return utcHeaderDate(v, dayOnly, input.locale)
|
|
1958
|
+
return formatX(v)
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* A day-granular x: every step between its distinct instants is a whole day or more (23 h: a DST
|
|
1963
|
+
* day), or its one instant is a UTC midnight. The tooltip header of such a series is its date, never
|
|
1964
|
+
* a clock time (a bucket keyed by local midnight is `22:00` UTC in a UTC+2 zone).
|
|
1965
|
+
*/
|
|
1966
|
+
export function dayGranular(values: readonly ChartX[]): boolean {
|
|
1967
|
+
const times = values.flatMap((v) => (v instanceof Date ? [v.getTime()] : []))
|
|
1968
|
+
if (times.length === 0 || times.length !== values.length) return false
|
|
1969
|
+
const sorted = times.toSorted((a, b) => a - b)
|
|
1970
|
+
if (sorted.length === 1) return (sorted[0] as number) % DAY_MS === 0
|
|
1971
|
+
// 23 h, not 24: a local-midnight key is only 23 h after the previous one across a spring-forward DST.
|
|
1972
|
+
return sorted.every((t, i) => i === 0 || t - (sorted[i - 1] as number) >= DAY_MS - HOUR_MS)
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
const HOUR_MS = 3_600_000
|
|
1976
|
+
|
|
1977
|
+
/** The word without its case or a plural `s`: `Sessions` and `session` are one unit. */
|
|
1978
|
+
const stem = (w: string): string => w.toLowerCase().replace(/s$/, '')
|
|
1979
|
+
|
|
1980
|
+
/** A row's label repeats the unit its value already carries (`Sessions` / `27 sessions`). */
|
|
1981
|
+
function unitIsName(label: string, value: string): string | null {
|
|
1982
|
+
const words = value.trim().split(/\s+/)
|
|
1983
|
+
const unit = words.at(-1)
|
|
1984
|
+
if (words.length < 2 || unit === undefined || stem(unit) !== stem(label.trim())) return null
|
|
1985
|
+
return words.slice(0, -1).join(' ')
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
/** `plot.rows`: one row per datum for a visible series, `[]` for a hidden one, a throw for a typo. */
|
|
1989
|
+
function rowsOf<T, X extends ChartX>(
|
|
1990
|
+
input: CartesianInput<T, X>,
|
|
1991
|
+
visibleKeys: ReadonlySet<string>,
|
|
1992
|
+
axes: Axes<T>,
|
|
1993
|
+
): (key: string) => PlotRow<T, X>[] {
|
|
1994
|
+
const seriesBy = new Map(input.series.map((s) => [s.key, s]))
|
|
1995
|
+
return (key) => {
|
|
1996
|
+
const s = seriesBy.get(key)
|
|
1997
|
+
if (!s)
|
|
1998
|
+
throw new Error(`[basalt] CartesianChart: marks asked for series "${key}", not in \`series\``)
|
|
1999
|
+
if (!visibleKeys.has(key)) return []
|
|
2000
|
+
// A datum past a bounded domain is drawn on the plot's edge; the tooltip reads `getValue`.
|
|
2001
|
+
const axis = axes.axisOf(axes.onRight(s) ? 'right' : 'left')
|
|
2002
|
+
return input.data.map((d) => {
|
|
2003
|
+
const v = s.getValue(d)
|
|
2004
|
+
return {
|
|
2005
|
+
x: input.x(d),
|
|
2006
|
+
y:
|
|
2007
|
+
v === null || !Number.isFinite(v)
|
|
2008
|
+
? null
|
|
2009
|
+
: axis.bounded
|
|
2010
|
+
? clampToDomain(v, axis.domain)
|
|
2011
|
+
: v,
|
|
2012
|
+
series: s.key,
|
|
2013
|
+
datum: d,
|
|
2014
|
+
}
|
|
2015
|
+
})
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
/**
|
|
2020
|
+
* `rows` with each `spread` dot series' rows moved apart where they would overlap
|
|
2021
|
+
* (`spreadPoints`, in plot pixels). Only the drawn position moves: `datum` still reads the true value
|
|
2022
|
+
* for the tooltip and the readout. An x spread needs a linear x (a number or a time); on a band, point
|
|
2023
|
+
* or log x the dots stay where they are. A y spread of a column too dense to part along y also steps
|
|
2024
|
+
* its dots sideways on a linear x, so the column swells to a swarm instead of drawing one solid bar.
|
|
2025
|
+
*/
|
|
2026
|
+
function spreadRowsOf<T, X extends ChartX>(
|
|
2027
|
+
rows: (key: string) => PlotRow<T, X>[],
|
|
2028
|
+
input: CartesianInput<T, X>,
|
|
2029
|
+
at: {
|
|
2030
|
+
visible: readonly ChartSeries<T>[]
|
|
2031
|
+
model: XScaleModel<X>
|
|
2032
|
+
axes: Axes<T>
|
|
2033
|
+
plotWidth: number
|
|
2034
|
+
plotHeight: number
|
|
2035
|
+
},
|
|
2036
|
+
): (key: string) => PlotRow<T, X>[] {
|
|
2037
|
+
const spread = input.dotSpread
|
|
2038
|
+
if (spread === undefined || spread.size === 0) return rows
|
|
2039
|
+
const { model, axes, plotWidth, plotHeight } = at
|
|
2040
|
+
if (plotWidth <= 0 || plotHeight <= 0) return rows
|
|
2041
|
+
const memo = new Map<string, PlotRow<T, X>[]>()
|
|
2042
|
+
return (key) => {
|
|
2043
|
+
const drawn = rows(key)
|
|
2044
|
+
const axis = spread.get(key)
|
|
2045
|
+
const s = at.visible.find((v) => v.key === key)
|
|
2046
|
+
if (axis === undefined || s === undefined || drawn.length === 0) return drawn
|
|
2047
|
+
const known = memo.get(key)
|
|
2048
|
+
if (known !== undefined) return known
|
|
2049
|
+
const extent = model.extent
|
|
2050
|
+
const xLinear = extent !== undefined && model.log !== true && !model.band
|
|
2051
|
+
if (axis === 'x' && !xLinear) return drawn
|
|
2052
|
+
const yAxis = axes.axisOf(axes.onRight(s) ? 'right' : 'left')
|
|
2053
|
+
const warp = warpFor(yAxis.log)
|
|
2054
|
+
const domain = warp.domain(yAxis.domain)
|
|
2055
|
+
const [lo, hi] = [Math.min(...domain), Math.max(...domain)]
|
|
2056
|
+
if (hi === lo) return drawn
|
|
2057
|
+
const yPx = (y: number): number => ((hi - warp.to(y)) / (hi - lo)) * plotHeight
|
|
2058
|
+
const r = input.dotRadius?.get(key) ?? BASALT.dotR
|
|
2059
|
+
const live: { row: PlotRow<T, X>; px: number; py: number }[] = []
|
|
2060
|
+
for (const row of drawn) {
|
|
2061
|
+
const f = model.fraction(row.x)
|
|
2062
|
+
if (row.y === null || f === null) continue
|
|
2063
|
+
live.push({ row, px: f * plotWidth, py: yPx(row.y) })
|
|
2064
|
+
}
|
|
2065
|
+
const placed = spreadPoints(
|
|
2066
|
+
live.map((p) =>
|
|
2067
|
+
axis === 'x' ? { along: p.px, across: p.py, r } : { along: p.py, across: p.px, r },
|
|
2068
|
+
),
|
|
2069
|
+
axis === 'x'
|
|
2070
|
+
? { along: plotWidth, across: plotHeight }
|
|
2071
|
+
: { along: plotHeight, across: xLinear ? plotWidth : 0 },
|
|
2072
|
+
)
|
|
2073
|
+
const moved = new Map(live.map((p, i) => [p.row, { to: placed[i] as SpreadPlace, p }]))
|
|
2074
|
+
const toX = (px: number): X => {
|
|
2075
|
+
const [from, to] = extent ?? [0, 1]
|
|
2076
|
+
const v = from + (px / plotWidth) * (to - from)
|
|
2077
|
+
return (model.kind === 'date' ? new Date(v) : v) as unknown as X
|
|
2078
|
+
}
|
|
2079
|
+
const toY = (py: number): number => warp.from(hi - (py / plotHeight) * (hi - lo))
|
|
2080
|
+
const out = drawn.map((row) => {
|
|
2081
|
+
const at = moved.get(row)
|
|
2082
|
+
if (at === undefined) return row
|
|
2083
|
+
const { to, p } = at
|
|
2084
|
+
if (axis === 'x')
|
|
2085
|
+
return {
|
|
2086
|
+
...row,
|
|
2087
|
+
x: toX(to.along),
|
|
2088
|
+
...(to.across !== p.py && { y: toY(to.across) }),
|
|
2089
|
+
}
|
|
2090
|
+
return {
|
|
2091
|
+
...row,
|
|
2092
|
+
y: toY(to.along),
|
|
2093
|
+
...(to.across !== p.px && { x: toX(to.across) }),
|
|
2094
|
+
}
|
|
2095
|
+
})
|
|
2096
|
+
memo.set(key, out)
|
|
2097
|
+
return out
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
/** The cursor dots of the visible series that opt in with `cursorValue`. */
|
|
2102
|
+
function cursorDotMarks<T, X extends ChartX>(
|
|
2103
|
+
input: CartesianInput<T, X>,
|
|
2104
|
+
visible: readonly ChartSeries<T>[],
|
|
2105
|
+
axes: Axes<T>,
|
|
2106
|
+
): ChartMarks {
|
|
2107
|
+
return visible.flatMap((s) => {
|
|
2108
|
+
const { cursorValue } = s
|
|
2109
|
+
if (!cursorValue) return []
|
|
2110
|
+
// The dot sits where its mark does: on the edge for a datum past a bounded domain.
|
|
2111
|
+
const axis = axes.axisOf(axes.onRight(s) ? 'right' : 'left')
|
|
2112
|
+
const rows = input.data.flatMap((d): PlotRow<T, X>[] => {
|
|
2113
|
+
const v = cursorValue(d)
|
|
2114
|
+
if (v === null || !Number.isFinite(v)) return []
|
|
2115
|
+
const y = axis.bounded ? clampToDomain(v, axis.domain) : v
|
|
2116
|
+
return [{ x: input.x(d), y, series: s.key, datum: d }]
|
|
2117
|
+
})
|
|
2118
|
+
return cursorDots(s, rows, axes.onRight(s) ? 'y2' : undefined)
|
|
2119
|
+
})
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
/**
|
|
2123
|
+
* `tooltipBelow` (a `BandStrip`, a short bar of cells under a hero value and beside its neighbours):
|
|
2124
|
+
* the tooltip opens below the strip, above only when there is no room, so it never covers the
|
|
2125
|
+
* cell's own value, with a gap clear of the cell edge.
|
|
2126
|
+
*/
|
|
2127
|
+
/** The hovered cell's centre x, on the strip's bottom edge: `bottom` opens just under the strip. */
|
|
2128
|
+
const stripAnchor = (
|
|
2129
|
+
points: readonly ChartPoint[],
|
|
2130
|
+
{ plot }: ChartTooltipAnchorContext,
|
|
2131
|
+
): { x: number; y: number } => {
|
|
2132
|
+
const xs = points.map((p) => p.x)
|
|
2133
|
+
return { x: (Math.min(...xs) + Math.max(...xs)) / 2, y: plot.y + plot.height }
|
|
2134
|
+
}
|
|
2135
|
+
const STRIP_TOOLTIP_PLACEMENT = ['bottom', 'top'] as const
|
|
2136
|
+
const STRIP_TOOLTIP_OFFSET = 8
|
|
2137
|
+
/**
|
|
2138
|
+
* A slotted `Bars` (`tooltipBelow` and `bare`): a micro-visual whose tooltip is the one-line chip
|
|
2139
|
+
* (`chart-box.module.css`, `data-basalt-slot`) in the line the cell reserves above the plot. It
|
|
2140
|
+
* anchors to the plot's top edge, clear of the focus ring, and opens upward, never below the plot and never over the
|
|
2141
|
+
* bars; the card clamp's vertical flip does not apply to it.
|
|
2142
|
+
*/
|
|
2143
|
+
const slotAnchor = (
|
|
2144
|
+
points: readonly ChartPoint[],
|
|
2145
|
+
{ plot }: ChartTooltipAnchorContext,
|
|
2146
|
+
): { x: number; y: number } => {
|
|
2147
|
+
const xs = points.map((p) => p.x)
|
|
2148
|
+
return { x: (Math.min(...xs) + Math.max(...xs)) / 2, y: plot.y }
|
|
2149
|
+
}
|
|
2150
|
+
const SLOT_TOOLTIP_PLACEMENT = ['top'] as const
|
|
2151
|
+
|
|
2152
|
+
/**
|
|
2153
|
+
* A point's tooltip opens off the mark, never on it: anchored at the topmost mark of the group (a
|
|
2154
|
+
* dot's centre, a column's top for {@link pointerAnchor} without a pointer), over it, then below it.
|
|
2155
|
+
*/
|
|
2156
|
+
const markAnchor = (points: readonly ChartPoint[]): { x: number; y: number } => {
|
|
2157
|
+
const xs = points.map((p) => p.x)
|
|
2158
|
+
return { x: (Math.min(...xs) + Math.max(...xs)) / 2, y: Math.min(...points.map((p) => p.y)) }
|
|
2159
|
+
}
|
|
2160
|
+
const MARK_TOOLTIP_OFFSET = 12
|
|
2161
|
+
/**
|
|
2162
|
+
* A line's, an area's or a column's tooltip sits at the group's x and the pointer's height, so a sweep
|
|
2163
|
+
* along the plot keeps it on one side however the data climbs and falls (owner review 2: anchored at
|
|
2164
|
+
* the data, a line's flipped above and below each next point). A column's opens beside it, right of
|
|
2165
|
+
* it, left once the right side would leave the plot: over the column first put it above a short bar
|
|
2166
|
+
* and beside a tall one. A focus with no pointer (keys, a linked list, a shared cursor) anchors at the
|
|
2167
|
+
* group's topmost mark.
|
|
2168
|
+
*/
|
|
2169
|
+
const pointerAnchor = (
|
|
2170
|
+
points: readonly ChartPoint[],
|
|
2171
|
+
{ pointer }: ChartTooltipAnchorContext,
|
|
2172
|
+
): { x: number; y: number } => {
|
|
2173
|
+
const at = markAnchor(points)
|
|
2174
|
+
return { x: at.x, y: pointer?.y ?? at.y }
|
|
2175
|
+
}
|
|
2176
|
+
const BAR_TOOLTIP_PLACEMENT = ['right', 'left'] as const
|
|
2177
|
+
const DOT_TOOLTIP_PLACEMENT = ['top', 'bottom'] as const
|
|
2178
|
+
|
|
2179
|
+
/**
|
|
2180
|
+
* A series row's detail at a datum: its change over the period (`tooltip.change`), its `compare`
|
|
2181
|
+
* reading and its `status`. `undefined` when it has none. The change base is the series' first
|
|
2182
|
+
* finite value in `data` (`'start'`), or its last finite value before the datum (`'previous'`).
|
|
2183
|
+
*/
|
|
2184
|
+
function rowDetail<T, X extends ChartX>(
|
|
2185
|
+
input: CartesianInput<T, X>,
|
|
2186
|
+
axes: Axes<T>,
|
|
2187
|
+
): (s: ChartSeries<T>, v: number, d: T) => RowDetail | undefined {
|
|
2188
|
+
const mode = (input.tooltip || undefined)?.change
|
|
2189
|
+
const index = new Map(input.data.map((d, i) => [d, i]))
|
|
2190
|
+
const starts = new Map<string, number | undefined>()
|
|
2191
|
+
const finiteOf = (s: ChartSeries<T>, d: T | undefined): number | undefined => {
|
|
2192
|
+
const v = d === undefined ? null : s.getValue(d)
|
|
2193
|
+
return v !== null && Number.isFinite(v) ? v : undefined
|
|
2194
|
+
}
|
|
2195
|
+
const baseOf = (s: ChartSeries<T>, d: T): number | undefined => {
|
|
2196
|
+
if (mode === 'start') {
|
|
2197
|
+
if (!starts.has(s.key))
|
|
2198
|
+
starts.set(
|
|
2199
|
+
s.key,
|
|
2200
|
+
finiteOf(
|
|
2201
|
+
s,
|
|
2202
|
+
input.data.find((e) => finiteOf(s, e) !== undefined),
|
|
2203
|
+
),
|
|
2204
|
+
)
|
|
2205
|
+
return starts.get(s.key)
|
|
2206
|
+
}
|
|
2207
|
+
for (let i = (index.get(d) ?? 0) - 1; i >= 0; i -= 1) {
|
|
2208
|
+
const v = finiteOf(s, input.data[i])
|
|
2209
|
+
if (v !== undefined) return v
|
|
2210
|
+
}
|
|
2211
|
+
return undefined
|
|
2212
|
+
}
|
|
2213
|
+
return (s, v, d) => {
|
|
2214
|
+
const base = mode === undefined ? undefined : baseOf(s, d)
|
|
2215
|
+
const change = base === undefined ? undefined : changeOf(v, base, input.locale)
|
|
2216
|
+
const compared = s.compare?.getValue(d) ?? null
|
|
2217
|
+
const format = (n: number): string =>
|
|
2218
|
+
s.formatValue
|
|
2219
|
+
? s.formatValue(n, d)
|
|
2220
|
+
: axes.axisOf(axes.onRight(s) ? 'right' : 'left').format(n)
|
|
2221
|
+
const reference =
|
|
2222
|
+
s.compare === undefined || compared === null || !Number.isFinite(compared)
|
|
2223
|
+
? undefined
|
|
2224
|
+
: `${s.compare.label} ${format(compared)}`
|
|
2225
|
+
const status = s.status?.(v, d)
|
|
2226
|
+
if (change === undefined && reference === undefined && status === undefined) return undefined
|
|
2227
|
+
return {
|
|
2228
|
+
...(change !== undefined && { change }),
|
|
2229
|
+
...(reference !== undefined && { reference }),
|
|
2230
|
+
...(status !== undefined && { status }),
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
function tooltipSpec<T, X extends ChartX>(opts: {
|
|
2236
|
+
input: CartesianInput<T, X>
|
|
2237
|
+
axes: Axes<T>
|
|
2238
|
+
visible: readonly ChartSeries<T>[]
|
|
2239
|
+
keys: ReadonlySet<string>
|
|
2240
|
+
visibleKeys: ReadonlySet<string>
|
|
2241
|
+
formatX: (v: ChartValue) => string
|
|
2242
|
+
/** The x is day-granular: the header is a date, not a clock time. */
|
|
2243
|
+
dayOnly: boolean
|
|
2244
|
+
}): NonNullable<CartesianDefinition['tooltip']> {
|
|
2245
|
+
const { input, axes, visible, keys, visibleKeys, formatX, dayOnly } = opts
|
|
2246
|
+
const hidden = input.series.filter((s) => !visibleKeys.has(s.key))
|
|
2247
|
+
const slot = input.tooltipBelow === true && input.bare === true
|
|
2248
|
+
// Columns and points have a body to keep off; a line is crossed by its own tooltip's anchor line.
|
|
2249
|
+
const onMarks = visible.length > 0 && visible.every((s) => isBar(s) || s.mark === 'dot')
|
|
2250
|
+
const rowSeries = (input.reverseRows ? visible.toReversed() : visible).filter(
|
|
2251
|
+
(s) => s.tooltip !== false,
|
|
2252
|
+
)
|
|
2253
|
+
const detailOf = rowDetail(input, axes)
|
|
2254
|
+
// A `colorBy` line whose reading is another series' row (the score a price is colored by) adds no row of its own.
|
|
2255
|
+
const rampRows = new Set(
|
|
2256
|
+
rowSeries.filter((s) =>
|
|
2257
|
+
rowSeries.some((o) => {
|
|
2258
|
+
const by = s.colorBy
|
|
2259
|
+
if (by === undefined || o === s) return false
|
|
2260
|
+
let same = false
|
|
2261
|
+
for (const d of input.data) {
|
|
2262
|
+
const [reading, value] = [by.value(d), o.getValue(d)]
|
|
2263
|
+
if (reading === null || value === null) continue
|
|
2264
|
+
if (reading !== value) return false
|
|
2265
|
+
same = true
|
|
2266
|
+
}
|
|
2267
|
+
return same
|
|
2268
|
+
}),
|
|
2269
|
+
),
|
|
2270
|
+
)
|
|
2271
|
+
const rangeText =
|
|
2272
|
+
input.rangeText ??
|
|
2273
|
+
((from: string, to: string) => plainMessages(mark)('mark.rangeBetween', from, to))
|
|
2274
|
+
const events = eventsByDatum(input)
|
|
2275
|
+
return {
|
|
2276
|
+
use: quietWhileFollowing,
|
|
2277
|
+
...followerOptions(input.tooltip, input.cursorGroup, input.chartId),
|
|
2278
|
+
portal: cardPortal(slot ? 'slot' : input.tooltipBelow === true ? 'strip' : 'card'),
|
|
2279
|
+
anchor: input.tooltipBelow
|
|
2280
|
+
? slot
|
|
2281
|
+
? slotAnchor
|
|
2282
|
+
: stripAnchor
|
|
2283
|
+
: onMarks && !visible.some(isBar)
|
|
2284
|
+
? markAnchor
|
|
2285
|
+
: pointerAnchor,
|
|
2286
|
+
...(input.tooltipBelow &&
|
|
2287
|
+
(slot
|
|
2288
|
+
? { placement: SLOT_TOOLTIP_PLACEMENT, offset: 0 }
|
|
2289
|
+
: { placement: STRIP_TOOLTIP_PLACEMENT, offset: STRIP_TOOLTIP_OFFSET })),
|
|
2290
|
+
...(!input.tooltipBelow &&
|
|
2291
|
+
onMarks && {
|
|
2292
|
+
placement: visible.some(isBar) ? BAR_TOOLTIP_PLACEMENT : DOT_TOOLTIP_PLACEMENT,
|
|
2293
|
+
offset: MARK_TOOLTIP_OFFSET,
|
|
2294
|
+
}),
|
|
2295
|
+
content: (points: readonly ChartPoint[]) => {
|
|
2296
|
+
const first = points[0]
|
|
2297
|
+
if (!first) return { rows: [] }
|
|
2298
|
+
// A point's datum is a `plot.rows()` row, or a consumer mark's own datum (taken as `T`).
|
|
2299
|
+
const rowOf = (point: ChartPoint): PlotRow<T, X> | undefined => {
|
|
2300
|
+
const datum = point.datum
|
|
2301
|
+
return typeof datum === 'object' && datum !== null && 'datum' in datum && 'series' in datum
|
|
2302
|
+
? (datum as PlotRow<T, X>)
|
|
2303
|
+
: undefined
|
|
2304
|
+
}
|
|
2305
|
+
// A held focus names the tooltip: the cursor carries only an x, so at a gap or where several
|
|
2306
|
+
// data share one x the engine's nearest point is another datum than the one the hero reads.
|
|
2307
|
+
const held = input.focused ?? null
|
|
2308
|
+
const heldPoint =
|
|
2309
|
+
held === null ? undefined : points.find((point) => rowOf(point)?.datum === held)
|
|
2310
|
+
const primary = heldPoint ?? first
|
|
2311
|
+
const row = rowOf(primary)
|
|
2312
|
+
const [x, d] =
|
|
2313
|
+
held !== null && heldPoint === undefined
|
|
2314
|
+
? [input.x(held), held]
|
|
2315
|
+
: row && keys.has(row.series)
|
|
2316
|
+
? // The datum's own x: a `spread` dot draws off it, and the header names the true value.
|
|
2317
|
+
[input.x(row.datum), row.datum]
|
|
2318
|
+
: [primary.xValue, primary.datum as T]
|
|
2319
|
+
const rows: EngineTooltipRow[] = []
|
|
2320
|
+
for (const s of rowSeries) {
|
|
2321
|
+
const v = s.getValue(d)
|
|
2322
|
+
if (v === null || !Number.isFinite(v)) continue
|
|
2323
|
+
const write = (n: number): string =>
|
|
2324
|
+
s.formatValue
|
|
2325
|
+
? s.formatValue(n, d)
|
|
2326
|
+
: axes.axisOf(axes.onRight(s) ? 'right' : 'left').format(n)
|
|
2327
|
+
// A band reads its range: "low to high"; a datum without its low edge reads nothing.
|
|
2328
|
+
const low = s.getLow === undefined ? undefined : s.getLow(d)
|
|
2329
|
+
if (low === null || (low !== undefined && !Number.isFinite(low))) continue
|
|
2330
|
+
const text = low === undefined ? write(v) : rangeText(write(low), write(v))
|
|
2331
|
+
// A lone series whose value already ends in its own name (`27 sessions`) prints the name once.
|
|
2332
|
+
const bare = input.series.length === 1 ? unitIsName(s.label, text) : null
|
|
2333
|
+
// A highlighted datum's swatch wears the accent, as its bar does; a `colorBy` line's, the point's ramp step.
|
|
2334
|
+
const swatch = s.highlight?.(d)
|
|
2335
|
+
? { ...s, color: CV.brand }
|
|
2336
|
+
: s.colorBy
|
|
2337
|
+
? { ...s, color: rampColorAt(s, d) }
|
|
2338
|
+
: s
|
|
2339
|
+
const row: RichRow = seriesRow(swatch, bare ?? text, input.highlighted === s.key)
|
|
2340
|
+
const detail = detailOf(s, v, d)
|
|
2341
|
+
rows.push(detail === undefined ? row : { ...row, detail })
|
|
2342
|
+
const by = s.colorBy
|
|
2343
|
+
const reading = by?.value(d) ?? null
|
|
2344
|
+
if (by !== undefined && reading !== null && Number.isFinite(reading) && !rampRows.has(s))
|
|
2345
|
+
rows.push({
|
|
2346
|
+
label: by.label,
|
|
2347
|
+
value: (by.format ?? ((n: number) => defaultNumberFormat(n, input.locale)))(reading),
|
|
2348
|
+
color: rampColorAt(s, d),
|
|
2349
|
+
})
|
|
2350
|
+
}
|
|
2351
|
+
const extra: readonly ChartTooltipRow[] =
|
|
2352
|
+
(input.tooltip || undefined)?.rows?.(d, { visible, hidden }) ?? []
|
|
2353
|
+
const marked = (events.get(d) ?? []).map((e): RichRow => ({
|
|
2354
|
+
label: e.label,
|
|
2355
|
+
value: e.note ?? formatX(e.at),
|
|
2356
|
+
color: CV.axis,
|
|
2357
|
+
}))
|
|
2358
|
+
return {
|
|
2359
|
+
title: tooltipHeader(input, formatX, dayOnly, x, d),
|
|
2360
|
+
rows: [
|
|
2361
|
+
...rows,
|
|
2362
|
+
...extra.map((r): RichRow => {
|
|
2363
|
+
const row = engineRow(r)
|
|
2364
|
+
return r.status === undefined ? row : { ...row, detail: { status: r.status } }
|
|
2365
|
+
}),
|
|
2366
|
+
...marked,
|
|
2367
|
+
],
|
|
2368
|
+
}
|
|
2369
|
+
},
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
/** A consumer key in the legend's reserved `__ref-` namespace would collide with a reference line. */
|
|
2374
|
+
function guardReservedKeys<T>(series: readonly ChartSeries<T>[]): void {
|
|
2375
|
+
if (process.env.NODE_ENV === 'production') return
|
|
2376
|
+
const clash = series.find((s) => s.key.startsWith(REF_KEY_PREFIX))
|
|
2377
|
+
if (clash)
|
|
2378
|
+
throw new Error(
|
|
2379
|
+
`[basalt] CartesianChart: the series key "${clash.key}" is reserved (\`${REF_KEY_PREFIX}\` prefix names reference-line legend entries)`,
|
|
2380
|
+
)
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
/**
|
|
2384
|
+
* The value labels a hover pins to the axes: the tick size in the ink, on a wide halo of the surface the
|
|
2385
|
+
* plot sits on (`--basalt-chart-guide-halo`, the inset inside a card), so it covers the tick label under it.
|
|
2386
|
+
*/
|
|
2387
|
+
const GUIDE_LABEL = {
|
|
2388
|
+
fontSize: TICK_FONT,
|
|
2389
|
+
fontWeight: 500,
|
|
2390
|
+
fill: CV.ink,
|
|
2391
|
+
stroke: 'var(--basalt-chart-guide-halo, var(--basalt-card))',
|
|
2392
|
+
strokeWidth: 6,
|
|
2393
|
+
offset: 5,
|
|
2394
|
+
} as const
|
|
2395
|
+
|
|
2396
|
+
/** Whether the chart labels its x axis: the panel that does carries the hover's x chip. */
|
|
2397
|
+
const labelsX = (input: { xTicks?: unknown }): boolean =>
|
|
2398
|
+
!(Array.isArray(input.xTicks) && input.xTicks.length === 0)
|
|
2399
|
+
|
|
2400
|
+
/**
|
|
2401
|
+
* The hover's guide: the x rule (a bar kind has none, its hover is the bar) and the y rule through the
|
|
2402
|
+
* focused point, each with its value pinned on its axis, so a hover reads x and y where the ticks do.
|
|
2403
|
+
* Unpinned (a micro plot without axes, a bare slot) the line keeps its x rule alone. The y label is the
|
|
2404
|
+
* left axis' and only drawn without a right axis, where one y value cannot name both scales. An x axis
|
|
2405
|
+
* with no tick labels (`x.ticks: []`, the upper panels of charts stacked on one x) pins no x value: the
|
|
2406
|
+
* chip would sit on the plot's baseline over the marks, once per panel; the panel that labels the axis
|
|
2407
|
+
* carries it. A chart that follows another's shared cursor pins none either (its chip text is empty),
|
|
2408
|
+
* so the one the pointer is on carries the value; a leader with no x chip leaves it to the labelled follower.
|
|
2409
|
+
*/
|
|
2410
|
+
export function crosshairGuide<T, X extends ChartX>(opts: {
|
|
2411
|
+
input: CartesianInput<T, X>
|
|
2412
|
+
pinned: boolean
|
|
2413
|
+
formatX: (v: ChartValue) => string
|
|
2414
|
+
formatY: ((v: number) => string) | null
|
|
2415
|
+
/** What the chip text `text` of `v` does to the x tick labels: it only repeats one, or it would cover one. */
|
|
2416
|
+
clashOf?: ((v: ChartValue, text: string) => 'repeats' | 'covers' | null) | undefined
|
|
2417
|
+
}): { x: object | false; y: object | false } | null {
|
|
2418
|
+
const { input, pinned, formatX, formatY, clashOf } = opts
|
|
2419
|
+
const xLabelled = labelsX(input)
|
|
2420
|
+
const rule = input.crosshair !== false
|
|
2421
|
+
if (!pinned) return rule ? { x: CROSSHAIR, y: false } : null
|
|
2422
|
+
const x = {
|
|
2423
|
+
...(rule ? CROSSHAIR : { strokeOpacity: 0 }),
|
|
2424
|
+
// A chart that follows another's cursor draws the rule alone: the chip is the hovered chart's, not one per panel.
|
|
2425
|
+
label: xLabelled
|
|
2426
|
+
? {
|
|
2427
|
+
...GUIDE_LABEL,
|
|
2428
|
+
format: (v: ChartValue) => {
|
|
2429
|
+
if (followsChart(input.cursorGroup, input.chartId)) return ''
|
|
2430
|
+
const text = formatX(v)
|
|
2431
|
+
const clash = clashOf?.(v, text)
|
|
2432
|
+
// The engine blanks a tick under the chip only for the chart that holds the focus; any other chart
|
|
2433
|
+
// drawing a chip (a follower, a chart the keys moved) drops it where it would cover a tick, or
|
|
2434
|
+
// sit over the tick that already prints the reading.
|
|
2435
|
+
if (clash === undefined || clash === null) return text
|
|
2436
|
+
// The engine blanks a tick under the chip only while this chart holds the focus. A chart that tracks
|
|
2437
|
+
// its focus (a `focus` owns its keys: `keyboard` is `false`) and holds none (the pointer is between
|
|
2438
|
+
// its data, or the focused datum is another pane's) has no callback to blank the tick: no chip there.
|
|
2439
|
+
const tracks = input.keyboard === false
|
|
2440
|
+
const { focused } = input
|
|
2441
|
+
const holds =
|
|
2442
|
+
focused !== undefined &&
|
|
2443
|
+
focused !== null &&
|
|
2444
|
+
input.data.includes(focused) &&
|
|
2445
|
+
visibleSeries(input.series, input.hidden ?? new Set<string>()).some((s) => {
|
|
2446
|
+
const v = s.getValue(focused)
|
|
2447
|
+
return v !== null && Number.isFinite(v)
|
|
2448
|
+
})
|
|
2449
|
+
return tracks && !holds ? '' : text
|
|
2450
|
+
},
|
|
2451
|
+
}
|
|
2452
|
+
: false,
|
|
2453
|
+
}
|
|
2454
|
+
// A bar that prints its value labels needs no read-across: the guide at the focused value would run through
|
|
2455
|
+
// the labels of the bars beside it (it struck a neighbour's '4 · 3.4%'), so its chip stands alone.
|
|
2456
|
+
const valued = input.series.some(
|
|
2457
|
+
(s) => s.mark === 'bar' && s.values !== undefined && s.values !== false,
|
|
2458
|
+
)
|
|
2459
|
+
const y =
|
|
2460
|
+
formatY === null
|
|
2461
|
+
? false
|
|
2462
|
+
: {
|
|
2463
|
+
...(valued ? { strokeOpacity: 0 } : CROSSHAIR),
|
|
2464
|
+
label: { ...GUIDE_LABEL, format: (v: ChartValue) => formatY(Number(v)) },
|
|
2465
|
+
}
|
|
2466
|
+
return { x, y }
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
export function compileCartesian<T, X extends ChartX>(
|
|
2470
|
+
given: CartesianInput<T, X>,
|
|
2471
|
+
): CartesianDefinition {
|
|
2472
|
+
const input = withLogY2<T, CartesianInput<T, X>>(
|
|
2473
|
+
withLogY<T, CartesianInput<T, X>>(
|
|
2474
|
+
withLogX<T, CartesianInput<T, X>>(given, given.band === true),
|
|
2475
|
+
),
|
|
2476
|
+
)
|
|
2477
|
+
guardReservedKeys(input.series)
|
|
2478
|
+
const visible = visibleSeries(input.series, input.hidden ?? new Set<string>())
|
|
2479
|
+
const visibleKeys = new Set(visible.map((s) => s.key))
|
|
2480
|
+
const keys = new Set(input.series.map((s) => s.key))
|
|
2481
|
+
const baseModel = xScaleFor(
|
|
2482
|
+
input.data.map(input.x),
|
|
2483
|
+
input.band === true,
|
|
2484
|
+
input.xDomain,
|
|
2485
|
+
input.xScale === 'log',
|
|
2486
|
+
)
|
|
2487
|
+
// The x scale of the build in hand: `baseModel`, or one grown so an edge dot draws whole (`dotRoomX`).
|
|
2488
|
+
let model = baseModel
|
|
2489
|
+
// Whether this chart draws an x chip while it leads: set at each layout (a micro plot draws none).
|
|
2490
|
+
let xChipDrawn = input.bare !== true && labelsX(input)
|
|
2491
|
+
// The y domain depends on the tick count, so on the class; everything else about the axes
|
|
2492
|
+
// (formats, sides) does not, and `shared` stands for it.
|
|
2493
|
+
const byClass = new Map<ContainerClass, Axes<T>>()
|
|
2494
|
+
const axesAt = (cls: ContainerClass): Axes<T> => {
|
|
2495
|
+
const found = byClass.get(cls)
|
|
2496
|
+
if (found) return found
|
|
2497
|
+
const made = resolveAxes(input, visible, cls)
|
|
2498
|
+
byClass.set(cls, made)
|
|
2499
|
+
return made
|
|
2500
|
+
}
|
|
2501
|
+
const shared = axesAt('regular')
|
|
2502
|
+
const dots = cursorDotMarks(input, visible, shared)
|
|
2503
|
+
const rows = rowsOf(input, visibleKeys, shared)
|
|
2504
|
+
const formatX = (v: ChartValue): string =>
|
|
2505
|
+
input.formatX ? input.formatX(v as X) : defaultFormatX(v, input.locale)
|
|
2506
|
+
const gradients = [
|
|
2507
|
+
...input.series.flatMap((s, i) => (s.area ? [seriesAreaGradient(s, i, input, shared)] : [])),
|
|
2508
|
+
...input.series.flatMap((s, i) => {
|
|
2509
|
+
const ramp = s.colorBy && rampGradient(s, i, input, baseModel)
|
|
2510
|
+
return ramp ? [ramp] : []
|
|
2511
|
+
}),
|
|
2512
|
+
]
|
|
2513
|
+
const dayOnly = dayGranular(model.values)
|
|
2514
|
+
const names = (input.refLines ?? []).some((r) => r.label !== undefined && r.label !== '')
|
|
2515
|
+
// What an unpinned reference caption avoids: each visible series as (x share, y) points. A bar is
|
|
2516
|
+
// a filled column from zero, so it walks round its body instead of through its top centre.
|
|
2517
|
+
const barHalf = model.halfStep * BAR_BODY
|
|
2518
|
+
const warpOn = (side: 'left' | 'right' | undefined) =>
|
|
2519
|
+
warpFor(shared.axisOf(side === 'right' ? 'right' : 'left').log)
|
|
2520
|
+
const linesOn = (side: 'left' | 'right' | undefined): RefLabelPoint[][] =>
|
|
2521
|
+
visible
|
|
2522
|
+
.filter((s) => shared.onRight(s) === (side === 'right' && shared.right !== null))
|
|
2523
|
+
.map((s) =>
|
|
2524
|
+
rows(s.key).flatMap((r) => {
|
|
2525
|
+
const fx = model.fraction(r.x)
|
|
2526
|
+
if (fx === null || r.y === null) return []
|
|
2527
|
+
if (!(model.band && s.mark === 'bar')) return [{ fx, y: warpOn(side).to(r.y) }]
|
|
2528
|
+
return [
|
|
2529
|
+
{ fx: fx - barHalf, y: 0 },
|
|
2530
|
+
{ fx: fx - barHalf, y: r.y },
|
|
2531
|
+
{ fx: fx + barHalf, y: r.y },
|
|
2532
|
+
{ fx: fx + barHalf, y: 0 },
|
|
2533
|
+
]
|
|
2534
|
+
}),
|
|
2535
|
+
)
|
|
2536
|
+
|
|
2537
|
+
// The dots of one axis side: their value and radius. A side with a bar keeps its floor, so none.
|
|
2538
|
+
const dotsOn = (side: 'left' | 'right'): { y: number; r: number; caret: boolean }[] => {
|
|
2539
|
+
const onSide = visible.filter((s) => shared.onRight(s) === (side === 'right'))
|
|
2540
|
+
if (onSide.some(isBar)) return []
|
|
2541
|
+
const axis = shared.axisOf(side)
|
|
2542
|
+
return onSide
|
|
2543
|
+
.filter((s) => s.mark === 'dot')
|
|
2544
|
+
.flatMap((s) =>
|
|
2545
|
+
rows(s.key).flatMap((row) => {
|
|
2546
|
+
if (row.y === null) return []
|
|
2547
|
+
const v = s.getValue(row.datum)
|
|
2548
|
+
const caret = axis.bounded === true && v !== null && offScaleSide(v, axis.domain) !== null
|
|
2549
|
+
return [{ y: row.y, r: input.dotRadius?.get(s.key) ?? BASALT.dotR, caret }]
|
|
2550
|
+
}),
|
|
2551
|
+
)
|
|
2552
|
+
}
|
|
2553
|
+
// The room the value label of the largest bar on one axis takes above its end: the label that names the
|
|
2554
|
+
// answer. A caption keeps off it as it keeps off the bar, so no caption takes the spot that value needs
|
|
2555
|
+
// (the other values give way to a caption, as before).
|
|
2556
|
+
const valueHeads = (
|
|
2557
|
+
side: 'left' | 'right' | undefined,
|
|
2558
|
+
domain: readonly [number, number],
|
|
2559
|
+
plotHeight: number,
|
|
2560
|
+
): LabelBox[] => {
|
|
2561
|
+
const [lo, hi] = [Math.min(...domain), Math.max(...domain)]
|
|
2562
|
+
if (plotHeight <= 0 || hi === lo || input.stack === 'normalized') return []
|
|
2563
|
+
const onSide = visible.filter(
|
|
2564
|
+
(s) => shared.onRight(s) === (side === 'right' && shared.right !== null),
|
|
2565
|
+
)
|
|
2566
|
+
if (!onSide.some((s) => isBar(s) && s.values !== undefined && s.values !== false)) return []
|
|
2567
|
+
const head = (VALUE_HEAD_PX * (hi - lo)) / plotHeight
|
|
2568
|
+
const largest = marksOn(side).bars.reduce<LabelBox | undefined>(
|
|
2569
|
+
(best, b) => (best === undefined || b.y1 > best.y1 ? b : best),
|
|
2570
|
+
undefined,
|
|
2571
|
+
)
|
|
2572
|
+
return largest === undefined || largest.y1 <= 0
|
|
2573
|
+
? []
|
|
2574
|
+
: [{ fx0: largest.fx0, fx1: largest.fx1, y0: largest.y1, y1: largest.y1 + head }]
|
|
2575
|
+
}
|
|
2576
|
+
// The end labels' gutter: room right of the last points of a point-scale line chart when the labels
|
|
2577
|
+
// would otherwise sit over the lines (`endLabelGutter`). Read on the measured plot, so a first frame
|
|
2578
|
+
// takes the frame less the y gutter.
|
|
2579
|
+
const endRoomPx = (access: PlotAccess, frameWidth: number, cls: ContainerClass): number => {
|
|
2580
|
+
const naming = input.endLabels
|
|
2581
|
+
if (naming === undefined || input.band === true || input.y2 !== undefined) return 0
|
|
2582
|
+
if (baseModel.kind !== 'string' || baseModel.band) return 0
|
|
2583
|
+
const lines = visible.filter((s) => s.mark === 'line' && s.role !== 'reference')
|
|
2584
|
+
if (lines.length === 0 || lines.length !== visible.length) return 0
|
|
2585
|
+
access.read()
|
|
2586
|
+
return endLabelGutter({
|
|
2587
|
+
naming,
|
|
2588
|
+
phoneNames: input.endLabelsNarrow,
|
|
2589
|
+
containerClass: cls,
|
|
2590
|
+
plotWidth:
|
|
2591
|
+
access.size()?.width ??
|
|
2592
|
+
Math.max(frameWidth - yRoomPx(yInsideOf(input, cls, axesAt(cls).right !== null)), 0),
|
|
2593
|
+
labels: lines.flatMap((s) => {
|
|
2594
|
+
const last = input.data.findLast((d) => s.getValue(d) !== null)
|
|
2595
|
+
const fraction = last === undefined ? null : baseModel.fraction(input.x(last))
|
|
2596
|
+
return fraction === null ? [] : [{ label: s.label, fraction }]
|
|
2597
|
+
}),
|
|
2598
|
+
})
|
|
2599
|
+
}
|
|
2600
|
+
// A point chart's x domain grown so the dot at either end sits whole inside the clipped plot.
|
|
2601
|
+
const dotRoomX = (access: PlotAccess, frameWidth: number): XScaleModel<X> => {
|
|
2602
|
+
const { extent } = baseModel
|
|
2603
|
+
if (extent === undefined || baseModel.log === true || visible.length === 0) return baseModel
|
|
2604
|
+
// Dots among lines keep their room too; a bar on the plot has a band (or a floor) of its own.
|
|
2605
|
+
const pointed = visible.filter((s) => s.mark === 'dot')
|
|
2606
|
+
if (pointed.length === 0 || visible.some(isBar)) return baseModel
|
|
2607
|
+
access.read()
|
|
2608
|
+
const drawn = input.data.filter((d) => pointed.some((s) => s.getValue(d) !== null))
|
|
2609
|
+
const r = Math.max(...pointed.map((s) => input.dotRadius?.get(s.key) ?? BASALT.dotR)) + DOT_RING
|
|
2610
|
+
const grown = xRoomForDots(
|
|
2611
|
+
extent,
|
|
2612
|
+
drawn.map((d) => Number(input.x(d))),
|
|
2613
|
+
r,
|
|
2614
|
+
access.size()?.width ?? frameWidth,
|
|
2615
|
+
)
|
|
2616
|
+
if (grown === null) return baseModel
|
|
2617
|
+
const domain = baseModel.kind === 'date' ? grown.map((t) => new Date(t)) : grown
|
|
2618
|
+
return xScaleFor(input.data.map(input.x), false, domain as unknown as readonly [X, X])
|
|
2619
|
+
}
|
|
2620
|
+
const dotRoomAxes = (base: Axes<T>, access: PlotAccess, frameHeight: number): Axes<T> => {
|
|
2621
|
+
// The room is linear value space: a log axis (either side) keeps its decades as they are.
|
|
2622
|
+
const leftLinear = base.left.log !== true
|
|
2623
|
+
const rightLinear = base.right !== null && base.right.log !== true
|
|
2624
|
+
const onLeft = leftLinear ? dotsOn('left') : []
|
|
2625
|
+
const onRight = rightLinear ? dotsOn('right') : []
|
|
2626
|
+
const leftNear = leftLinear && nearEnd(base.left, onLeft)
|
|
2627
|
+
const rightNear = rightLinear && base.right !== null && nearEnd(base.right, onRight)
|
|
2628
|
+
if (!leftNear && !rightNear) return base
|
|
2629
|
+
access.read()
|
|
2630
|
+
const plotHeight = access.size()?.height ?? frameHeight
|
|
2631
|
+
const left = leftLinear ? roomForDots(base.left, onLeft, plotHeight) : base.left
|
|
2632
|
+
const right =
|
|
2633
|
+
base.right && (rightLinear ? roomForDots(base.right, onRight, plotHeight) : base.right)
|
|
2634
|
+
if (left === base.left && right === base.right) return base
|
|
2635
|
+
return { ...base, left, right, axisOf: (side) => (side === 'right' && right ? right : left) }
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2638
|
+
// The bar bodies and dots a caption must not sit on, on one axis. A stack's body runs to the sum
|
|
2639
|
+
// of its positive parts (and down to its negative ones); a grouped bar is taken at the band's full
|
|
2640
|
+
// width at its own height, which over-covers by a slot and never under-covers.
|
|
2641
|
+
const marksOn = (
|
|
2642
|
+
side: 'left' | 'right' | undefined,
|
|
2643
|
+
/** The rows a dot is drawn at: a spread series' dots are where the spread put them. */
|
|
2644
|
+
dotRows: (key: string) => PlotRow<T, X>[] = rows,
|
|
2645
|
+
): { bars: LabelBox[]; dots: DotMark[] } => {
|
|
2646
|
+
const onSide = visible.filter(
|
|
2647
|
+
(s) => shared.onRight(s) === (side === 'right' && shared.right !== null),
|
|
2648
|
+
)
|
|
2649
|
+
const bodies = new Map<number, { fx: number; up: number; down: number }>()
|
|
2650
|
+
const dotMarks: DotMark[] = []
|
|
2651
|
+
for (const s of onSide) {
|
|
2652
|
+
for (const r of s.mark === 'dot' ? dotRows(s.key) : rows(s.key)) {
|
|
2653
|
+
const fx = model.fraction(r.x)
|
|
2654
|
+
if (fx === null || r.y === null) continue
|
|
2655
|
+
if (s.mark === 'dot')
|
|
2656
|
+
dotMarks.push({
|
|
2657
|
+
fx,
|
|
2658
|
+
y: warpOn(side).to(r.y),
|
|
2659
|
+
r: input.dotRadius?.get(s.key) ?? BASALT.dotR,
|
|
2660
|
+
})
|
|
2661
|
+
if (!(model.band && s.mark === 'bar')) continue
|
|
2662
|
+
const at = bodies.get(fx) ?? { fx, up: 0, down: 0 }
|
|
2663
|
+
const stacked = input.stack !== undefined
|
|
2664
|
+
at.up = stacked ? at.up + Math.max(r.y, 0) : Math.max(at.up, r.y)
|
|
2665
|
+
at.down = stacked ? at.down + Math.min(r.y, 0) : Math.min(at.down, r.y)
|
|
2666
|
+
bodies.set(fx, at)
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
const normalized = input.stack === 'normalized'
|
|
2670
|
+
return {
|
|
2671
|
+
dots: dotMarks,
|
|
2672
|
+
bars: [...bodies.values()].map((b) => ({
|
|
2673
|
+
fx0: b.fx - barHalf,
|
|
2674
|
+
fx1: b.fx + barHalf,
|
|
2675
|
+
y0: normalized ? 0 : b.down,
|
|
2676
|
+
y1: normalized ? 1 : b.up,
|
|
2677
|
+
})),
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
// The axes with room under the most negative bar of a series that prints its values. A domain the page
|
|
2682
|
+
// fixed as a tuple is the page's; a log axis has no bars.
|
|
2683
|
+
const valueRoomAxes = (base: Axes<T>, access: PlotAccess, frameHeight: number): Axes<T> => {
|
|
2684
|
+
if (input.y?.scale === 'log' || input.stack === 'normalized') return base
|
|
2685
|
+
const floorOn = (side: 'left' | 'right'): number | null => {
|
|
2686
|
+
const fixed = side === 'left' ? input.y?.domain : input.y2?.domain
|
|
2687
|
+
if (Array.isArray(fixed)) return null
|
|
2688
|
+
const onSide = visible.filter(
|
|
2689
|
+
(s) => shared.onRight(s) === (side === 'right' && shared.right !== null),
|
|
2690
|
+
)
|
|
2691
|
+
if (!onSide.some((s) => isBar(s) && s.values !== undefined && s.values !== false)) return null
|
|
2692
|
+
const low = Math.min(0, ...marksOn(side).bars.map((b) => b.y0))
|
|
2693
|
+
return low < 0 ? low : null
|
|
2694
|
+
}
|
|
2695
|
+
const [onLeft, onRight] = [floorOn('left'), base.right === null ? null : floorOn('right')]
|
|
2696
|
+
if (onLeft === null && onRight === null) return base
|
|
2697
|
+
access.read()
|
|
2698
|
+
const plotHeight = access.size()?.height ?? Math.max(frameHeight - X_AXIS_PX, 1)
|
|
2699
|
+
const left = roomForValues(base.left, onLeft, plotHeight)
|
|
2700
|
+
const right = base.right && roomForValues(base.right, onRight, plotHeight)
|
|
2701
|
+
if (left === base.left && right === base.right) return base
|
|
2702
|
+
return { ...base, left, right, axisOf: (side) => (side === 'right' && right ? right : left) }
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
const definition: CartesianDefinition = {
|
|
2706
|
+
chart: ({ width, height }: ChartBuildContext): StoredChartSpec => {
|
|
2707
|
+
const cls = resolveContainerClass(width)
|
|
2708
|
+
// On a phone, two or more dated events keep their rules, dots and tooltip rows but drop their
|
|
2709
|
+
// captions: the captions of a few years' events pile up over a 300 px plot.
|
|
2710
|
+
const xRefLines =
|
|
2711
|
+
cls === 'narrow' && (input.events?.length ?? 0) > 1
|
|
2712
|
+
? input.xRefLines?.map((l) =>
|
|
2713
|
+
input.events?.some((e) => e.label === l.label && timeOf(e.at) === timeOf(l.x))
|
|
2714
|
+
? { ...l, label: undefined }
|
|
2715
|
+
: l,
|
|
2716
|
+
)
|
|
2717
|
+
: input.xRefLines
|
|
2718
|
+
const access = plotAccess(definition, input.plot, MAIN_PANE)
|
|
2719
|
+
// `capped` holds the page's domain; `axes` may grow it so an edge dot draws whole. A datum
|
|
2720
|
+
// past the cap is clamped to the cap, so the growth keeps it whole too.
|
|
2721
|
+
model = dotRoomX(access, width)
|
|
2722
|
+
const gutter = model === baseModel ? endRoomPx(access, width, cls) : 0
|
|
2723
|
+
if (gutter > 0)
|
|
2724
|
+
model = xScaleFor(input.data.map(input.x), false, input.xDomain, input.xScale === 'log', {
|
|
2725
|
+
px: gutter,
|
|
2726
|
+
plotWidth:
|
|
2727
|
+
access.size()?.width ??
|
|
2728
|
+
Math.max(width - yRoomPx(yInsideOf(input, cls, axesAt(cls).right !== null)), 0),
|
|
2729
|
+
})
|
|
2730
|
+
const capped = axesAt(cls)
|
|
2731
|
+
const axes = valueRoomAxes(dotRoomAxes(capped, access, height), access, height) // A spread reads the plot's size: dots move apart in pixels, so it recompiles once measured.
|
|
2732
|
+
const spreads = visible.some((s) => input.dotSpread?.has(s.key) === true)
|
|
2733
|
+
if (spreads) access.read()
|
|
2734
|
+
const plot = plotContext(
|
|
2735
|
+
{
|
|
2736
|
+
rows: spreads
|
|
2737
|
+
? spreadRowsOf(rowsOf(input, visibleKeys, capped), input, {
|
|
2738
|
+
visible,
|
|
2739
|
+
model,
|
|
2740
|
+
axes,
|
|
2741
|
+
plotWidth: access.size()?.width ?? width,
|
|
2742
|
+
plotHeight: access.size()?.height ?? height,
|
|
2743
|
+
})
|
|
2744
|
+
: rowsOf(input, visibleKeys, capped),
|
|
2745
|
+
visible,
|
|
2746
|
+
highlighted: input.highlighted ?? null,
|
|
2747
|
+
focused: input.focused ?? null,
|
|
2748
|
+
containerClass: cls,
|
|
2749
|
+
width,
|
|
2750
|
+
height,
|
|
2751
|
+
data: input.data,
|
|
2752
|
+
xFraction: model.fraction,
|
|
2753
|
+
y2: axes.right ? 'y2' : undefined,
|
|
2754
|
+
yDomain: axes.left.domain,
|
|
2755
|
+
y2Domain: axes.right?.domain,
|
|
2756
|
+
...(axes.left.log === true && { yLog: true }),
|
|
2757
|
+
...(axes.right?.log === true && { y2Log: true }),
|
|
2758
|
+
...(input.locale !== undefined && { locale: input.locale }),
|
|
2759
|
+
...(gutter > 0 && { endRoom: true }),
|
|
2760
|
+
...(input.endLabelsNarrow === true && { phoneNames: true }),
|
|
2761
|
+
},
|
|
2762
|
+
access,
|
|
2763
|
+
)
|
|
2764
|
+
// A narrow chart stands its y labels inside the plot; one wider than a phone's does so only while no
|
|
2765
|
+
// data runs under them.
|
|
2766
|
+
const mayStandInside =
|
|
2767
|
+
width >= INSIDE_PHONE_WIDTH && yInsideOf(input, cls, axes.right !== null)
|
|
2768
|
+
if (mayStandInside) access.read()
|
|
2769
|
+
const laid =
|
|
2770
|
+
mayStandInside &&
|
|
2771
|
+
insideLabelsStruck({
|
|
2772
|
+
input,
|
|
2773
|
+
axes,
|
|
2774
|
+
cls,
|
|
2775
|
+
lines: linesOn(undefined),
|
|
2776
|
+
width: access.size()?.width ?? width,
|
|
2777
|
+
height: access.size()?.height ?? Math.max(height - X_AXIS_PX, 1),
|
|
2778
|
+
})
|
|
2779
|
+
? { ...input, yInside: false }
|
|
2780
|
+
: input
|
|
2781
|
+
const under = underlayMarks(input, model, axes)
|
|
2782
|
+
// Reading the plot size recompiles once on the measured area; the frame stands in before it.
|
|
2783
|
+
// Only a chart with a caption pays for it, and the one context serves every caption: the
|
|
2784
|
+
// vertical rules' captions are placed first, and a reference caption keeps clear of them and of
|
|
2785
|
+
// the captions placed before it.
|
|
2786
|
+
// Whether a bar or a dot on the left axis fills a rule caption's box: it moves or drops.
|
|
2787
|
+
const xBlocked =
|
|
2788
|
+
(plotWidth: number, plotHeight: number): RefLabelContext<T, X>['xBlocked'] =>
|
|
2789
|
+
(box) => {
|
|
2790
|
+
const warped = warpFor(axes.left.log).domain(axes.left.domain)
|
|
2791
|
+
const [lo, hi] = [Math.min(...warped), Math.max(...warped)]
|
|
2792
|
+
if (plotWidth <= 0 || plotHeight <= 0 || hi === lo) return false
|
|
2793
|
+
const perPx = (hi - lo) / plotHeight
|
|
2794
|
+
const at = {
|
|
2795
|
+
fx0: box.x0 / plotWidth,
|
|
2796
|
+
fx1: box.x1 / plotWidth,
|
|
2797
|
+
y0: hi - box.bottom * perPx,
|
|
2798
|
+
y1: hi - box.top * perPx,
|
|
2799
|
+
}
|
|
2800
|
+
const { bars, dots } = marksOn('left', spreadDrawn(plotWidth, plotHeight))
|
|
2801
|
+
return (
|
|
2802
|
+
bars.some((b) => boxesMeet(at, b)) ||
|
|
2803
|
+
valueHeads('left', axes.left.domain, plotHeight).some((b) => boxesMeet(at, b)) ||
|
|
2804
|
+
dots.some((d) => boxesMeet(at, dotBox(d, plotWidth, perPx)))
|
|
2805
|
+
)
|
|
2806
|
+
}
|
|
2807
|
+
// The rows the dots are drawn at in a plot of this size: a spread series' dots are moved apart.
|
|
2808
|
+
const spreadDrawn = (plotWidth: number, plotHeight: number) =>
|
|
2809
|
+
spreadRowsOf(rows, input, { visible, model, axes, plotWidth, plotHeight })
|
|
2810
|
+
let captions: RefLabelContext<T, X> | undefined
|
|
2811
|
+
let lineMemo: PxBox[] | undefined
|
|
2812
|
+
// The labels a page's own marks landed: the captions placed after them keep clear of these.
|
|
2813
|
+
const pageLabels: PxBox[] = []
|
|
2814
|
+
const captionContext = (): RefLabelContext<T, X> => {
|
|
2815
|
+
if (captions !== undefined) return captions
|
|
2816
|
+
access.read()
|
|
2817
|
+
const size = access.size()
|
|
2818
|
+
const plotWidth = size?.width ?? width
|
|
2819
|
+
// A reference rule is a line a caption keeps off too, level with the series lines.
|
|
2820
|
+
const lineHits: RefLabelContext<T, X>['lineHits'] = (box) => {
|
|
2821
|
+
const frame = { width: plotWidth, height: size?.height ?? height }
|
|
2822
|
+
lineMemo ??= [...lineBoxes(frame), ...refRuleBoxes(frame)]
|
|
2823
|
+
return lineMemo.some(
|
|
2824
|
+
(b) =>
|
|
2825
|
+
b.left < box.x1 &&
|
|
2826
|
+
b.left + b.width > box.x0 &&
|
|
2827
|
+
b.top < box.bottom &&
|
|
2828
|
+
b.top + b.height > box.top,
|
|
2829
|
+
)
|
|
2830
|
+
}
|
|
2831
|
+
const marksBlock = xBlocked(plotWidth, size?.height ?? height)
|
|
2832
|
+
const xSpots = xRefLabelSpots({
|
|
2833
|
+
lines: xRefLines,
|
|
2834
|
+
fraction: (x, at) => edgeFraction(model, x, at),
|
|
2835
|
+
plotWidth,
|
|
2836
|
+
fontSize: BASALT.text.micro,
|
|
2837
|
+
// A line path or a horizontal rule through a rule's caption strikes it as a bar or a dot does.
|
|
2838
|
+
blocked: (box) => marksBlock(box) || lineHits(box),
|
|
2839
|
+
plotHeight: size?.height ?? height,
|
|
2840
|
+
})
|
|
2841
|
+
captions = {
|
|
2842
|
+
plotWidth,
|
|
2843
|
+
plotHeight: size?.height ?? height,
|
|
2844
|
+
lines: linesOn,
|
|
2845
|
+
marks: (side) => {
|
|
2846
|
+
const found = marksOn(side, spreadDrawn(plotWidth, size?.height ?? height))
|
|
2847
|
+
const heads = valueHeads(
|
|
2848
|
+
side,
|
|
2849
|
+
axes.axisOf(side === 'right' ? 'right' : 'left').domain,
|
|
2850
|
+
size?.height ?? height,
|
|
2851
|
+
)
|
|
2852
|
+
return heads.length === 0 ? found : { ...found, bars: [...found.bars, ...heads] }
|
|
2853
|
+
},
|
|
2854
|
+
xBlocked: marksBlock,
|
|
2855
|
+
lineHits,
|
|
2856
|
+
get claimed() {
|
|
2857
|
+
return [...claimedLabelBoxes(plot), ...pageClaims(), ...insideTickClaims()]
|
|
2858
|
+
},
|
|
2859
|
+
xCaptions: xRefLabelBoxes(xSpots, { plotWidth, fontSize: BASALT.text.micro }),
|
|
2860
|
+
placed: { left: [], right: [] },
|
|
2861
|
+
axes,
|
|
2862
|
+
model,
|
|
2863
|
+
}
|
|
2864
|
+
return captions
|
|
2865
|
+
}
|
|
2866
|
+
// The y labels a narrow chart stands inside the plot: a caption keeps off them as off any label.
|
|
2867
|
+
const insideTickClaims = (): LabelBox[] => {
|
|
2868
|
+
if (!yInsideOf(laid, cls, axes.right !== null)) return []
|
|
2869
|
+
const frame = { width: captions?.plotWidth ?? 0, height: captions?.plotHeight ?? 0 }
|
|
2870
|
+
const domain = warpFor(axes.left.log).domain(axes.left.domain)
|
|
2871
|
+
return insideTickBoxes(input, axes, cls, frame.height).map((b) =>
|
|
2872
|
+
valueBox(b, domain, frame),
|
|
2873
|
+
)
|
|
2874
|
+
}
|
|
2875
|
+
const pageClaims = (): LabelBox[] => {
|
|
2876
|
+
const frame = { width: captions?.plotWidth ?? 0, height: captions?.plotHeight ?? 0 }
|
|
2877
|
+
const domain = warpFor(axes.left.log).domain(axes.left.domain)
|
|
2878
|
+
return pageLabels.map((b) => valueBox(b, domain, frame))
|
|
2879
|
+
}
|
|
2880
|
+
const hasXCaption = (xRefLines ?? []).some((l) => l.label)
|
|
2881
|
+
// The captions are placed once, in one order: the vertical rules', then the reference
|
|
2882
|
+
// lines', then the zones'. A page's own labels read the result (`hostBoxes`) while its marks
|
|
2883
|
+
// build, which is after the end labels have claimed their room and before the rest of this pass.
|
|
2884
|
+
let placedCaptions:
|
|
2885
|
+
| { xPlotWidth: number; over: ChartMarks; zoneCaptions: ChartMarks }
|
|
2886
|
+
| undefined
|
|
2887
|
+
const captionMarks = () => {
|
|
2888
|
+
if (placedCaptions !== undefined) return placedCaptions
|
|
2889
|
+
const xPlotWidth = hasXCaption ? captionContext().plotWidth : 0
|
|
2890
|
+
const over = refLineMarks(input, axes, captionContext)
|
|
2891
|
+
const zoneCaptions = (input.xZones ?? []).some((z) => z.label)
|
|
2892
|
+
? xZoneLabelMarks(input, captionContext())
|
|
2893
|
+
: []
|
|
2894
|
+
placedCaptions = { xPlotWidth, over, zoneCaptions }
|
|
2895
|
+
return placedCaptions
|
|
2896
|
+
}
|
|
2897
|
+
/** The line paths on both axes, as boxes in plot px. */
|
|
2898
|
+
const lineBoxes = (frame: PlotPx): PxBox[] =>
|
|
2899
|
+
visible.flatMap((s) => {
|
|
2900
|
+
if (s.mark !== 'line') return []
|
|
2901
|
+
const axis = axes.axisOf(axes.onRight(s) ? 'right' : 'left')
|
|
2902
|
+
const warp = warpFor(axis.log)
|
|
2903
|
+
const [lo, hi] = warp.domain(axis.domain)
|
|
2904
|
+
const span = Math.max(lo, hi) - Math.min(lo, hi) || 1
|
|
2905
|
+
const runs: { x: number; y: number }[][] = [[]]
|
|
2906
|
+
for (const r of rows(s.key)) {
|
|
2907
|
+
const fx = model.fraction(r.x)
|
|
2908
|
+
if (r.y === null || fx === null || !Number.isFinite(r.y)) {
|
|
2909
|
+
if (s.gaps !== 'connect' && runs.at(-1)?.length !== 0) runs.push([])
|
|
2910
|
+
continue
|
|
2911
|
+
}
|
|
2912
|
+
runs.at(-1)?.push({
|
|
2913
|
+
x: fx * frame.width,
|
|
2914
|
+
y: ((Math.max(lo, hi) - warp.to(r.y)) / span) * frame.height,
|
|
2915
|
+
})
|
|
2916
|
+
}
|
|
2917
|
+
return pathBoxes(runs, s.strokeWidth ?? LINE_STROKE_WIDTH)
|
|
2918
|
+
})
|
|
2919
|
+
/** The dots of a spread series at their drawn (spread) positions, as boxes in plot px: a page's label keeps off the dots it sees. */
|
|
2920
|
+
const spreadDotBoxes = (frame: PlotPx): PxBox[] => {
|
|
2921
|
+
const spread = spreadRowsOf(rows, input, {
|
|
2922
|
+
visible,
|
|
2923
|
+
model,
|
|
2924
|
+
axes,
|
|
2925
|
+
plotWidth: frame.width,
|
|
2926
|
+
plotHeight: frame.height,
|
|
2927
|
+
})
|
|
2928
|
+
return visible.flatMap((s) => {
|
|
2929
|
+
if (s.mark !== 'dot' || input.dotSpread?.has(s.key) !== true) return []
|
|
2930
|
+
const r = input.dotRadius?.get(s.key) ?? BASALT.dotR
|
|
2931
|
+
const axis = axes.axisOf(axes.onRight(s) ? 'right' : 'left')
|
|
2932
|
+
const warp = warpFor(axis.log)
|
|
2933
|
+
const [lo, hi] = warp.domain(axis.domain)
|
|
2934
|
+
const span = Math.max(lo, hi) - Math.min(lo, hi) || 1
|
|
2935
|
+
return spread(s.key).flatMap((row) => {
|
|
2936
|
+
const fx = model.fraction(row.x)
|
|
2937
|
+
if (row.y === null || fx === null || !Number.isFinite(row.y)) return []
|
|
2938
|
+
const cx = fx * frame.width
|
|
2939
|
+
const cy = ((Math.max(lo, hi) - warp.to(row.y)) / span) * frame.height
|
|
2940
|
+
return [markDot({ left: cx - r, top: cy - r, width: 2 * r, height: 2 * r })]
|
|
2941
|
+
})
|
|
2942
|
+
})
|
|
2943
|
+
}
|
|
2944
|
+
/** The bodies of the bars of a band axis, as boxes in plot px: a group splits its band, a stack is one body. */
|
|
2945
|
+
const barBoxes = (frame: PlotPx): PxBox[] => {
|
|
2946
|
+
if (!model.band) return []
|
|
2947
|
+
const bars = visible.filter(isBar)
|
|
2948
|
+
const out: PxBox[] = []
|
|
2949
|
+
for (const side of axes.right === null
|
|
2950
|
+
? (['left'] as const)
|
|
2951
|
+
: (['left', 'right'] as const)) {
|
|
2952
|
+
const domain = axes.axisOf(side).domain
|
|
2953
|
+
const onSide = bars.filter(
|
|
2954
|
+
(s) => axes.onRight(s) === (side === 'right' && axes.right !== null),
|
|
2955
|
+
)
|
|
2956
|
+
const bodies = new Map<number, { fx: number; up: number; down: number }>()
|
|
2957
|
+
for (const s of onSide) {
|
|
2958
|
+
for (const r of rows(s.key)) {
|
|
2959
|
+
const fx = model.fraction(r.x)
|
|
2960
|
+
if (fx === null || r.y === null || !Number.isFinite(r.y)) continue
|
|
2961
|
+
if (input.stack === undefined) {
|
|
2962
|
+
// Grouped: the body splits into one slot per bar series, 0.1 of a slot between them.
|
|
2963
|
+
const step = (2 * barHalf) / (bars.length - GROUP_PADDING)
|
|
2964
|
+
const at = fx - barHalf + bars.indexOf(s) * step
|
|
2965
|
+
out.push(
|
|
2966
|
+
pxBox(
|
|
2967
|
+
{
|
|
2968
|
+
fx0: at,
|
|
2969
|
+
fx1: at + step * (1 - GROUP_PADDING),
|
|
2970
|
+
y0: Math.min(r.y, 0),
|
|
2971
|
+
y1: Math.max(r.y, 0),
|
|
2972
|
+
},
|
|
2973
|
+
domain,
|
|
2974
|
+
frame,
|
|
2975
|
+
),
|
|
2976
|
+
)
|
|
2977
|
+
continue
|
|
2978
|
+
}
|
|
2979
|
+
const body = bodies.get(fx) ?? { fx, up: 0, down: 0 }
|
|
2980
|
+
body.up += Math.max(r.y, 0)
|
|
2981
|
+
body.down += Math.min(r.y, 0)
|
|
2982
|
+
bodies.set(fx, body)
|
|
2983
|
+
}
|
|
2984
|
+
}
|
|
2985
|
+
for (const b of bodies.values()) {
|
|
2986
|
+
const normalized = input.stack === 'normalized'
|
|
2987
|
+
out.push(
|
|
2988
|
+
pxBox(
|
|
2989
|
+
{
|
|
2990
|
+
fx0: b.fx - barHalf,
|
|
2991
|
+
fx1: b.fx + barHalf,
|
|
2992
|
+
y0: normalized ? 0 : b.down,
|
|
2993
|
+
y1: normalized ? 1 : b.up,
|
|
2994
|
+
},
|
|
2995
|
+
domain,
|
|
2996
|
+
frame,
|
|
2997
|
+
),
|
|
2998
|
+
)
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
return out.filter((b) => b.width > 0 && b.height > 0)
|
|
3002
|
+
}
|
|
3003
|
+
/** The drawn horizontal reference rules, as boxes in plot px. */
|
|
3004
|
+
const refRuleBoxes = (frame: PlotPx): PxBox[] =>
|
|
3005
|
+
ruleBoxes(
|
|
3006
|
+
(input.refLines ?? []).flatMap((r, i) =>
|
|
3007
|
+
input.hidden?.has(refLegendKey(i))
|
|
3008
|
+
? []
|
|
3009
|
+
: [
|
|
3010
|
+
{
|
|
3011
|
+
value: warpFor(axes.axisOf(r.axis).log).to(r.value),
|
|
3012
|
+
domain: warpFor(axes.axisOf(r.axis).log).domain(axes.axisOf(r.axis).domain),
|
|
3013
|
+
},
|
|
3014
|
+
],
|
|
3015
|
+
),
|
|
3016
|
+
frame,
|
|
3017
|
+
)
|
|
3018
|
+
/** Everything a label keeps clear of but the bar bodies, in plot px. */
|
|
3019
|
+
const hostBoxesBesidesBars = (): PxBox[] => {
|
|
3020
|
+
const ctx = captionContext()
|
|
3021
|
+
const frame = { width: ctx.plotWidth, height: ctx.plotHeight }
|
|
3022
|
+
captionMarks()
|
|
3023
|
+
const rightAxis = axes.right ?? axes.left
|
|
3024
|
+
return [
|
|
3025
|
+
...ctx.placed.left.map((b) =>
|
|
3026
|
+
pxBox(b, warpFor(axes.left.log).domain(axes.left.domain), frame),
|
|
3027
|
+
),
|
|
3028
|
+
...ctx.placed.right.map((b) =>
|
|
3029
|
+
pxBox(b, warpFor(rightAxis.log).domain(rightAxis.domain), frame),
|
|
3030
|
+
),
|
|
3031
|
+
...hostBoxesBeforeCaptions(),
|
|
3032
|
+
]
|
|
3033
|
+
}
|
|
3034
|
+
/**
|
|
3035
|
+
* What a label keeps clear of before the reference and zone captions are placed: the vertical
|
|
3036
|
+
* rules' captions, the end labels, the lines and the rules. A page's own labels are placed
|
|
3037
|
+
* against these alone, and the captions that come after give way to them.
|
|
3038
|
+
*/
|
|
3039
|
+
const hostBoxesBeforeCaptions = (): PxBox[] => {
|
|
3040
|
+
const ctx = captionContext()
|
|
3041
|
+
const frame = { width: ctx.plotWidth, height: ctx.plotHeight }
|
|
3042
|
+
return [
|
|
3043
|
+
...ctx.xCaptions.map((b) => captionPx(b, frame)),
|
|
3044
|
+
...ctx.claimed.map((b) =>
|
|
3045
|
+
pxBox(b, warpFor(axes.left.log).domain(axes.left.domain), frame),
|
|
3046
|
+
),
|
|
3047
|
+
...lineBoxes(frame),
|
|
3048
|
+
...spreadDotBoxes(frame),
|
|
3049
|
+
...refRuleBoxes(frame),
|
|
3050
|
+
...xRuleBoxes(
|
|
3051
|
+
(input.xRefLines ?? []).flatMap((l) => edgeFraction(model, l.x, l.at) ?? []),
|
|
3052
|
+
frame,
|
|
3053
|
+
),
|
|
3054
|
+
]
|
|
3055
|
+
}
|
|
3056
|
+
const hostBoxes = (): PxBox[] => {
|
|
3057
|
+
const ctx = captionContext()
|
|
3058
|
+
return [
|
|
3059
|
+
...hostBoxesBesidesBars(),
|
|
3060
|
+
...barBoxes({ width: ctx.plotWidth, height: ctx.plotHeight }),
|
|
3061
|
+
]
|
|
3062
|
+
}
|
|
3063
|
+
// The value labels of the bars that ask for them, placed before the page's own marks so those
|
|
3064
|
+
// keep clear of the labels too. Reading the plot size recompiles once on the measured area.
|
|
3065
|
+
const valueLabels = (() => {
|
|
3066
|
+
const bars = visible.filter(isBar)
|
|
3067
|
+
const none = {
|
|
3068
|
+
marks: [] as ChartMarks,
|
|
3069
|
+
boxes: [] as PxBox[],
|
|
3070
|
+
written: new Set<string>(),
|
|
3071
|
+
backed: false,
|
|
3072
|
+
}
|
|
3073
|
+
if (!model.band || !bars.some((s) => s.values !== undefined && s.values !== false))
|
|
3074
|
+
return none
|
|
3075
|
+
const ctx = captionContext()
|
|
3076
|
+
const onRight = (s: ChartSeries<T>): 'left' | 'right' =>
|
|
3077
|
+
axes.onRight(s) && axes.right !== null ? 'right' : 'left'
|
|
3078
|
+
return barValueLabels<T, X>({
|
|
3079
|
+
series: bars,
|
|
3080
|
+
data: input.data,
|
|
3081
|
+
x: input.x,
|
|
3082
|
+
fraction: model.fraction,
|
|
3083
|
+
barHalf,
|
|
3084
|
+
stack: input.stack,
|
|
3085
|
+
sideOf: onRight,
|
|
3086
|
+
domainOf: (side) => axes.axisOf(side).domain,
|
|
3087
|
+
scaleOf: (side) => axes.scaleId(side),
|
|
3088
|
+
formatOf: (side) => axes.axisOf(side).format,
|
|
3089
|
+
frame: { width: ctx.plotWidth, height: ctx.plotHeight },
|
|
3090
|
+
focused: input.focused ?? null,
|
|
3091
|
+
ticks: (['left', 'right'] as const).flatMap((side) =>
|
|
3092
|
+
side === 'right' && axes.right === null
|
|
3093
|
+
? []
|
|
3094
|
+
: yTickValues({
|
|
3095
|
+
cfg: side === 'right' ? input.y2 : input.y,
|
|
3096
|
+
axis: axes.axisOf(side),
|
|
3097
|
+
cls: resolveContainerClass(width),
|
|
3098
|
+
edges: zoneEdgesOn(input, axes, side),
|
|
3099
|
+
}).map((value) => ({ side, value })),
|
|
3100
|
+
),
|
|
3101
|
+
obstacles: hostBoxes(),
|
|
3102
|
+
clear: hostBoxesBesidesBars(),
|
|
3103
|
+
})
|
|
3104
|
+
})()
|
|
3105
|
+
// A named bar's value label is never dropped for what the host drew, so it may land over a caption
|
|
3106
|
+
// placed before it: the captions are then placed again around the value labels (n68 at 390).
|
|
3107
|
+
if (valueLabels.boxes.length > 0) {
|
|
3108
|
+
const ctx = captionContext()
|
|
3109
|
+
captionMarks()
|
|
3110
|
+
const frame = { width: ctx.plotWidth, height: ctx.plotHeight }
|
|
3111
|
+
const labels = valueLabels.boxes.map((b) => valueBox(b, axes.left.domain, frame))
|
|
3112
|
+
if (ctx.placed.left.some((caption) => labels.some((l) => boxesMeet(caption, l)))) {
|
|
3113
|
+
pageLabels.push(...valueLabels.boxes)
|
|
3114
|
+
captions = lineMemo = placedCaptions = undefined
|
|
3115
|
+
captionMarks()
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
// The page's own labels come before the captions unless a value label already placed them: a
|
|
3119
|
+
// caption is the first thing to give way to a data label.
|
|
3120
|
+
const captionsFirst = placedCaptions !== undefined
|
|
3121
|
+
if (yInsideOf(laid, cls, axes.right !== null)) {
|
|
3122
|
+
claimInsideTicks(plot, () => insideTickBoxes(input, axes, cls, plot.plotHeight))
|
|
3123
|
+
}
|
|
3124
|
+
const kindMarks = withHostObstacles(
|
|
3125
|
+
captionsFirst
|
|
3126
|
+
? () => [...hostBoxes(), ...valueLabels.boxes]
|
|
3127
|
+
: () => [
|
|
3128
|
+
...hostBoxesBeforeCaptions(),
|
|
3129
|
+
...barBoxes({
|
|
3130
|
+
width: captionContext().plotWidth,
|
|
3131
|
+
height: captionContext().plotHeight,
|
|
3132
|
+
}),
|
|
3133
|
+
],
|
|
3134
|
+
() => input.marks(plot),
|
|
3135
|
+
captionsFirst ? undefined : pageLabels,
|
|
3136
|
+
)
|
|
3137
|
+
const { xPlotWidth, over, zoneCaptions } = captionMarks()
|
|
3138
|
+
// A stack's bars are capped together: its total past the edge is one caret, not one per segment.
|
|
3139
|
+
const stacked = input.stack === 'stacked'
|
|
3140
|
+
const stackedBars = stacked ? visible.filter((s) => isBar(s) && !axes.onRight(s)) : []
|
|
3141
|
+
// `isBounded` leaves a stack out (a stack's domain grows to its totals), so a page's own
|
|
3142
|
+
// domain is the cap here: a total past it is what the plot's edge clips.
|
|
3143
|
+
const stackCapped = input.y?.domain !== undefined && input.y.domain !== 'auto'
|
|
3144
|
+
const capLabels = {
|
|
3145
|
+
frame: () => {
|
|
3146
|
+
const ctx = captionContext()
|
|
3147
|
+
return { width: ctx.plotWidth, height: ctx.plotHeight }
|
|
3148
|
+
},
|
|
3149
|
+
obstacles: () => [...hostBoxes(), ...valueLabels.boxes],
|
|
3150
|
+
clear: () => [...hostBoxesBesidesBars(), ...valueLabels.boxes],
|
|
3151
|
+
}
|
|
3152
|
+
const stackCaps =
|
|
3153
|
+
stackedBars.length === 0 || !stackCapped
|
|
3154
|
+
? []
|
|
3155
|
+
: stackCapMarks({
|
|
3156
|
+
series: stackedBars,
|
|
3157
|
+
data: input.data,
|
|
3158
|
+
x: input.x,
|
|
3159
|
+
fraction: model.fraction,
|
|
3160
|
+
domain: capped.axisOf('left').domain,
|
|
3161
|
+
edge: axes.left.domain,
|
|
3162
|
+
format: axes.axisOf('left').format,
|
|
3163
|
+
labels: capLabels,
|
|
3164
|
+
})
|
|
3165
|
+
xChipDrawn = cls !== 'micro' && input.bare !== true && labelsX(input)
|
|
3166
|
+
// The tick labels the chip may cover, read the first time a chip is drawn.
|
|
3167
|
+
let tickLabels: ReturnType<typeof xTickLabelList> | undefined
|
|
3168
|
+
const guide = crosshairGuide({
|
|
3169
|
+
input,
|
|
3170
|
+
pinned: cls !== 'micro' && input.bare !== true,
|
|
3171
|
+
formatX,
|
|
3172
|
+
formatY: axes.right === null ? axes.axisOf('left').format : null,
|
|
3173
|
+
clashOf: (v, text) => {
|
|
3174
|
+
tickLabels ??= xTickLabelList({
|
|
3175
|
+
model,
|
|
3176
|
+
xTicks: input.xTicks,
|
|
3177
|
+
format: tickFormatOf(input, formatX),
|
|
3178
|
+
cls,
|
|
3179
|
+
locale: input.locale,
|
|
3180
|
+
width,
|
|
3181
|
+
yRoom: yRoomPx(yInsideOf(laid, cls, axes.right !== null)),
|
|
3182
|
+
})
|
|
3183
|
+
if (chipRepeatsTick(v, text, tickLabels)) return 'repeats'
|
|
3184
|
+
return chipCoversTick({
|
|
3185
|
+
value: v,
|
|
3186
|
+
readoutText: text,
|
|
3187
|
+
fontSize: TICK_FONT,
|
|
3188
|
+
plotWidth: Math.max(0, width - yRoomPx(yInsideOf(laid, cls, axes.right !== null))),
|
|
3189
|
+
share: (value) => model.fraction(value as X),
|
|
3190
|
+
ticks: tickLabels,
|
|
3191
|
+
})
|
|
3192
|
+
? 'covers'
|
|
3193
|
+
: null
|
|
3194
|
+
},
|
|
3195
|
+
})
|
|
3196
|
+
const offScale = offScaleMarks({
|
|
3197
|
+
labels: capLabels,
|
|
3198
|
+
formatOf: (s) => (v, d) =>
|
|
3199
|
+
s.formatValue
|
|
3200
|
+
? s.formatValue(v, d)
|
|
3201
|
+
: axes.axisOf(axes.onRight(s) ? 'right' : 'left').format(v),
|
|
3202
|
+
series: stacked ? visible.filter((s) => !stackedBars.includes(s)) : visible,
|
|
3203
|
+
data: input.data,
|
|
3204
|
+
x: input.x,
|
|
3205
|
+
fraction: model.fraction,
|
|
3206
|
+
// Past the cap the page set (before the dot room grew it); the caret sits on the plot's edge.
|
|
3207
|
+
domainOf: (s) => {
|
|
3208
|
+
const axis = capped.axisOf(capped.onRight(s) ? 'right' : 'left')
|
|
3209
|
+
return axis.bounded ? axis.domain : null
|
|
3210
|
+
},
|
|
3211
|
+
edgeOf: (s) => axes.axisOf(axes.onRight(s) ? 'right' : 'left').domain,
|
|
3212
|
+
// A grouped bar's room: its slot of the group (as `barBoxes` and the value labels cut it).
|
|
3213
|
+
written: valueLabels.written,
|
|
3214
|
+
nameLines: visible.some(isBar) && visible.some((s) => !isBar(s)),
|
|
3215
|
+
slotOf: (s) => {
|
|
3216
|
+
if (!model.band || input.stack !== undefined || !isBar(s)) return undefined
|
|
3217
|
+
const bars = visible.filter(isBar)
|
|
3218
|
+
const step = (2 * barHalf) / (bars.length - GROUP_PADDING)
|
|
3219
|
+
const width = step * (1 - GROUP_PADDING)
|
|
3220
|
+
return { shift: -barHalf + bars.indexOf(s) * step + width / 2, width }
|
|
3221
|
+
},
|
|
3222
|
+
yScaleOf: (s) => axes.scaleId(axes.onRight(s) ? 'right' : 'left'),
|
|
3223
|
+
})
|
|
3224
|
+
return {
|
|
3225
|
+
marks: [
|
|
3226
|
+
...under,
|
|
3227
|
+
...kindMarks,
|
|
3228
|
+
...dots,
|
|
3229
|
+
...over,
|
|
3230
|
+
...zoneCaptions,
|
|
3231
|
+
// The rules are drawn under the value labels: a label a rule crosses sits on its backing, and the rule gives way.
|
|
3232
|
+
...xRefLineMarks({
|
|
3233
|
+
lines: xRefLines,
|
|
3234
|
+
fraction: (x, at) => edgeFraction(model, x, at),
|
|
3235
|
+
top: Math.max(...axes.left.domain),
|
|
3236
|
+
plotWidth: xPlotWidth,
|
|
3237
|
+
blocked: hasXCaption
|
|
3238
|
+
? (box) => captionContext().xBlocked(box) || captionContext().lineHits(box)
|
|
3239
|
+
: undefined,
|
|
3240
|
+
plotHeight: hasXCaption ? captionContext().plotHeight : undefined,
|
|
3241
|
+
domain: warpFor(axes.left.log).domain(axes.left.domain),
|
|
3242
|
+
unwarp: warpFor(axes.left.log).from,
|
|
3243
|
+
}),
|
|
3244
|
+
...eventDots(input, axes),
|
|
3245
|
+
...offScale,
|
|
3246
|
+
...stackCaps,
|
|
3247
|
+
...valueLabels.marks,
|
|
3248
|
+
...(guide === null ? [] : [yPinOn(rightAlone(input, axes), crosshair(guide))]),
|
|
3249
|
+
],
|
|
3250
|
+
scales: buildScales({
|
|
3251
|
+
input: laid,
|
|
3252
|
+
model,
|
|
3253
|
+
axes,
|
|
3254
|
+
formatX,
|
|
3255
|
+
cls,
|
|
3256
|
+
width,
|
|
3257
|
+
zoneScale:
|
|
3258
|
+
under.length > 0 ||
|
|
3259
|
+
names ||
|
|
3260
|
+
(input.xRefLines?.length ?? 0) > 0 ||
|
|
3261
|
+
offScale.length > 0 ||
|
|
3262
|
+
stackCaps.length > 0 ||
|
|
3263
|
+
valueLabels.backed ||
|
|
3264
|
+
visible.some((s) => s.mark === 'line'),
|
|
3265
|
+
}),
|
|
3266
|
+
theme: CHART_THEME,
|
|
3267
|
+
...(input.bare === true
|
|
3268
|
+
? { guides: false as const, margin: 0 }
|
|
3269
|
+
: input.yGutter !== undefined
|
|
3270
|
+
? { margin: { left: input.yGutter } }
|
|
3271
|
+
: yInsideOf(laid, cls, axes.right !== null) && { margin: { left: 0, right: 0 } }),
|
|
3272
|
+
...(gradients.length > 0 && { gradients }),
|
|
3273
|
+
clip: true,
|
|
3274
|
+
}
|
|
3275
|
+
},
|
|
3276
|
+
// Followers resolve the leader's group, so they draw its dots; `quietWhileFollowing` mutes the
|
|
3277
|
+
// tooltip unless the chart opts into following tooltips.
|
|
3278
|
+
focus: 'group-x',
|
|
3279
|
+
...(input.focusRing === false && { focusRing: false as const }),
|
|
3280
|
+
...(input.keyboard === false && { keyboard: false as const }),
|
|
3281
|
+
maxFocusDistance: Number.POSITIVE_INFINITY,
|
|
3282
|
+
cursor: cursorBinding({
|
|
3283
|
+
group: input.cursorGroup,
|
|
3284
|
+
chartId: input.chartId,
|
|
3285
|
+
keys: model.values,
|
|
3286
|
+
extent: model.extent,
|
|
3287
|
+
mode: input.cursorResolution ?? 'nearest',
|
|
3288
|
+
pin: input.coarse === true,
|
|
3289
|
+
xChip: () => xChipDrawn,
|
|
3290
|
+
}),
|
|
3291
|
+
tooltip:
|
|
3292
|
+
input.tooltip === false
|
|
3293
|
+
? false
|
|
3294
|
+
: tooltipSpec({ input, axes: shared, visible, keys, visibleKeys, formatX, dayOnly }),
|
|
3295
|
+
...(input.controls !== undefined && { controls: input.controls }),
|
|
3296
|
+
}
|
|
3297
|
+
return input.tooltip !== false && richTooltip(input) ? markRich(definition) : definition
|
|
3298
|
+
}
|
|
3299
|
+
|
|
3300
|
+
/**
|
|
3301
|
+
* Whether a row of the chart's tooltip can carry a change, a reference, a status or an event. Extra
|
|
3302
|
+
* `rows` are a function whose rows may carry a `status`, so they take the rich body too.
|
|
3303
|
+
*/
|
|
3304
|
+
function richTooltip<T, X extends ChartX>(input: CartesianInput<T, X>): boolean {
|
|
3305
|
+
const config = input.tooltip || undefined
|
|
3306
|
+
return (
|
|
3307
|
+
config?.change !== undefined ||
|
|
3308
|
+
config?.rows !== undefined ||
|
|
3309
|
+
(input.events?.length ?? 0) > 0 ||
|
|
3310
|
+
input.series.some(
|
|
3311
|
+
(s) => s.compare !== undefined || s.status !== undefined || s.colorBy !== undefined,
|
|
3312
|
+
)
|
|
3313
|
+
)
|
|
3314
|
+
}
|
|
3315
|
+
|
|
3316
|
+
/** Gradient resource id for a `colorBy` line's stroke; the host's `idPrefix` scopes it. */
|
|
3317
|
+
export const rampGradientId = (index: number): string => `basalt-ramp-${index}`
|
|
3318
|
+
|
|
3319
|
+
/**
|
|
3320
|
+
* A `colorBy` line's stroke: a horizontal gradient across the line's own box (the engine's default
|
|
3321
|
+
* `objectBoundingBox` units), one color per drawn point by its reading on the status ramp. The line's
|
|
3322
|
+
* box runs from its first drawn point to its last, so a point's offset is its share of that run on
|
|
3323
|
+
* the x scale (any linear rescale of the axis keeps it). A stop is written only where the ramp
|
|
3324
|
+
* steps, so a long series holds few. `null` for a line with fewer than two drawn points.
|
|
3325
|
+
*/
|
|
3326
|
+
export function rampGradient<T, X extends ChartX>(
|
|
3327
|
+
s: ChartSeries<T>,
|
|
3328
|
+
index: number,
|
|
3329
|
+
input: Pick<CartesianInput<T, X>, 'data' | 'x'>,
|
|
3330
|
+
model: Pick<XScaleModel<X>, 'fraction'>,
|
|
3331
|
+
): ChartGradient | null {
|
|
3332
|
+
const by = s.colorBy
|
|
3333
|
+
if (by === undefined) return null
|
|
3334
|
+
const points = input.data.flatMap((d) => {
|
|
3335
|
+
const v = s.getValue(d)
|
|
3336
|
+
const f = model.fraction(input.x(d))
|
|
3337
|
+
if (v === null || !Number.isFinite(v) || f === null) return []
|
|
3338
|
+
const reading = by.value(d)
|
|
3339
|
+
const color =
|
|
3340
|
+
reading === null || !Number.isFinite(reading)
|
|
3341
|
+
? s.color
|
|
3342
|
+
: rampColor(rampShare(reading, by.domain), by.ramp)
|
|
3343
|
+
return [{ f, color }]
|
|
3344
|
+
})
|
|
3345
|
+
const first = points[0]
|
|
3346
|
+
const last = points.at(-1)
|
|
3347
|
+
if (first === undefined || last === undefined || last.f === first.f) return null
|
|
3348
|
+
const span = last.f - first.f
|
|
3349
|
+
const stops: { offset: number; color: string }[] = []
|
|
3350
|
+
points.forEach((p, i) => {
|
|
3351
|
+
const prev = points[i - 1]
|
|
3352
|
+
const next = points[i + 1]
|
|
3353
|
+
// A run of one color needs its two ends only: the ramp steps between a run's end and the next start.
|
|
3354
|
+
if (prev?.color === p.color && next?.color === p.color) return
|
|
3355
|
+
stops.push({ offset: (p.f - first.f) / span, color: p.color })
|
|
3356
|
+
})
|
|
3357
|
+
return { id: rampGradientId(index), x1: 0, y1: 0, x2: 1, y2: 0, stops }
|
|
3358
|
+
}
|
|
3359
|
+
|
|
3360
|
+
/** The color a `colorBy` series takes at a datum: its ramp step, else the series color. */
|
|
3361
|
+
export function rampColorAt<T>(s: ChartSeries<T>, d: T): string {
|
|
3362
|
+
const by = s.colorBy
|
|
3363
|
+
const reading = by?.value(d) ?? null
|
|
3364
|
+
if (by === undefined || reading === null || !Number.isFinite(reading)) return s.color
|
|
3365
|
+
return rampColor(rampShare(reading, by.domain), by.ramp)
|
|
3366
|
+
}
|
|
3367
|
+
|
|
3368
|
+
/** Radius of an event's dot on the x axis line, px. */
|
|
3369
|
+
const EVENT_DOT_R = 3.5
|
|
3370
|
+
|
|
3371
|
+
/** A dot on the x axis line under each event's rule (the rule and its caption are `xRefLines`). */
|
|
3372
|
+
function eventDots<T, X extends ChartX>(input: CartesianInput<T, X>, axes: Axes<T>): ChartMarks {
|
|
3373
|
+
const events = input.events ?? []
|
|
3374
|
+
if (events.length === 0) return []
|
|
3375
|
+
const floor = Math.min(...axes.left.domain)
|
|
3376
|
+
return [
|
|
3377
|
+
decorative(
|
|
3378
|
+
dot(
|
|
3379
|
+
events.map((e) => ({ x: e.at, y: floor })),
|
|
3380
|
+
{
|
|
3381
|
+
id: 'basalt-events',
|
|
3382
|
+
x: (p: { x: X }) => p.x,
|
|
3383
|
+
y: 'y',
|
|
3384
|
+
r: EVENT_DOT_R,
|
|
3385
|
+
fill: CV.axis,
|
|
3386
|
+
stroke: CV.surface,
|
|
3387
|
+
strokeWidth: 1.5,
|
|
3388
|
+
},
|
|
3389
|
+
),
|
|
3390
|
+
),
|
|
3391
|
+
]
|
|
3392
|
+
}
|
|
3393
|
+
|
|
3394
|
+
const timeOf = (v: ChartX): number | string => (v instanceof Date ? v.getTime() : v)
|
|
3395
|
+
|
|
3396
|
+
/**
|
|
3397
|
+
* Each event by the datum nearest its x (a string x: the datum at it): the datum the cursor rests on
|
|
3398
|
+
* when it names the event. An event past the data's ends names none.
|
|
3399
|
+
*/
|
|
3400
|
+
export function eventsByDatum<T, X extends ChartX>(
|
|
3401
|
+
input: Pick<CartesianInput<T, X>, 'data' | 'x' | 'events'>,
|
|
3402
|
+
): Map<T, { label: string; note?: string | undefined; at: X }[]> {
|
|
3403
|
+
const out = new Map<T, { label: string; note?: string | undefined; at: X }[]>()
|
|
3404
|
+
const xs = input.data.map((d) => timeOf(input.x(d)))
|
|
3405
|
+
for (const e of input.events ?? []) {
|
|
3406
|
+
const at = timeOf(e.at)
|
|
3407
|
+
let best = -1
|
|
3408
|
+
if (typeof at === 'string') best = xs.indexOf(at)
|
|
3409
|
+
else {
|
|
3410
|
+
const nums = xs.filter((v): v is number => typeof v === 'number')
|
|
3411
|
+
if (nums.length === 0 || at < Math.min(...nums) || at > Math.max(...nums)) continue
|
|
3412
|
+
let gap = Infinity
|
|
3413
|
+
xs.forEach((v, i) => {
|
|
3414
|
+
if (typeof v !== 'number' || Math.abs(v - at) >= gap) return
|
|
3415
|
+
gap = Math.abs(v - at)
|
|
3416
|
+
best = i
|
|
3417
|
+
})
|
|
3418
|
+
}
|
|
3419
|
+
const d = input.data[best]
|
|
3420
|
+
if (d === undefined) continue
|
|
3421
|
+
out.set(d, [...(out.get(d) ?? []), e])
|
|
3422
|
+
}
|
|
3423
|
+
return out
|
|
3424
|
+
}
|