@contui/ui 0.0.0-stage → 0.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/LICENSE +30 -0
- package/README.md +150 -2
- package/cli/contui.mjs +250 -0
- package/dist/charts/area-chart.d.ts +8 -0
- package/dist/charts/area-chart.js +9 -0
- package/dist/charts/bar-chart.d.ts +9 -0
- package/dist/charts/bar-chart.js +10 -0
- package/dist/charts/bubble-chart.d.ts +60 -0
- package/dist/charts/bubble-chart.js +392 -0
- package/dist/charts/bullet-chart.d.ts +53 -0
- package/dist/charts/bullet-chart.js +123 -0
- package/dist/charts/candlestick-chart.d.ts +77 -0
- package/dist/charts/candlestick-chart.js +558 -0
- package/dist/charts/cartesian.d.ts +121 -0
- package/dist/charts/cartesian.js +625 -0
- package/dist/charts/chart-card.d.ts +80 -0
- package/dist/charts/chart-card.js +114 -0
- package/dist/charts/donut-chart.d.ts +40 -0
- package/dist/charts/donut-chart.js +88 -0
- package/dist/charts/funnel-chart.d.ts +16 -0
- package/dist/charts/funnel-chart.js +164 -0
- package/dist/charts/horizontal-bar-chart.d.ts +67 -0
- package/dist/charts/horizontal-bar-chart.js +481 -0
- package/dist/charts/index.d.ts +21 -0
- package/dist/charts/index.js +32 -0
- package/dist/charts/legend.d.ts +23 -0
- package/dist/charts/legend.js +22 -0
- package/dist/charts/lib/candlestick-window.d.ts +15 -0
- package/dist/charts/lib/candlestick-window.js +23 -0
- package/dist/charts/lib/color.d.ts +39 -0
- package/dist/charts/lib/color.js +83 -0
- package/dist/charts/lib/format.d.ts +11 -0
- package/dist/charts/lib/format.js +33 -0
- package/dist/charts/lib/frame.d.ts +6 -0
- package/dist/charts/lib/frame.js +6 -0
- package/dist/charts/lib/layout.d.ts +11 -0
- package/dist/charts/lib/layout.js +71 -0
- package/dist/charts/lib/path.d.ts +35 -0
- package/dist/charts/lib/path.js +203 -0
- package/dist/charts/lib/scale.d.ts +41 -0
- package/dist/charts/lib/scale.js +80 -0
- package/dist/charts/lib/use-active.d.ts +18 -0
- package/dist/charts/lib/use-active.js +71 -0
- package/dist/charts/lib/use-size.d.ts +9 -0
- package/dist/charts/lib/use-size.js +40 -0
- package/dist/charts/line-chart.d.ts +7 -0
- package/dist/charts/line-chart.js +8 -0
- package/dist/charts/radar-chart.d.ts +27 -0
- package/dist/charts/radar-chart.js +165 -0
- package/dist/charts/rose-chart.d.ts +35 -0
- package/dist/charts/rose-chart.js +242 -0
- package/dist/charts/sparkline.d.ts +35 -0
- package/dist/charts/sparkline.js +110 -0
- package/dist/charts/tooltip.d.ts +35 -0
- package/dist/charts/tooltip.js +22 -0
- package/dist/charts/treemap.d.ts +28 -0
- package/dist/charts/treemap.js +103 -0
- package/dist/charts/uptime-strip.d.ts +40 -0
- package/dist/charts/uptime-strip.js +178 -0
- package/dist/components/accordion.d.ts +31 -0
- package/dist/components/accordion.js +34 -0
- package/dist/components/activity-item.d.ts +12 -0
- package/dist/components/activity-item.js +6 -0
- package/dist/components/alert.d.ts +21 -0
- package/dist/components/alert.js +58 -0
- package/dist/components/assistant-answer.d.ts +52 -0
- package/dist/components/assistant-answer.js +40 -0
- package/dist/components/assistant-prompt.d.ts +63 -0
- package/dist/components/assistant-prompt.js +122 -0
- package/dist/components/avatar.d.ts +28 -0
- package/dist/components/avatar.js +75 -0
- package/dist/components/badge.d.ts +16 -0
- package/dist/components/badge.js +33 -0
- package/dist/components/bar-list.d.ts +65 -0
- package/dist/components/bar-list.js +119 -0
- package/dist/components/block-slider.d.ts +43 -0
- package/dist/components/block-slider.js +63 -0
- package/dist/components/branch-graph.d.ts +87 -0
- package/dist/components/branch-graph.js +231 -0
- package/dist/components/breadcrumb.d.ts +41 -0
- package/dist/components/breadcrumb.js +53 -0
- package/dist/components/button.d.ts +23 -0
- package/dist/components/button.js +108 -0
- package/dist/components/calendar.d.ts +5 -0
- package/dist/components/calendar.js +90 -0
- package/dist/components/card.d.ts +65 -0
- package/dist/components/card.js +104 -0
- package/dist/components/chat-attachment.d.ts +47 -0
- package/dist/components/chat-attachment.js +63 -0
- package/dist/components/chat-event.d.ts +7 -0
- package/dist/components/chat-event.js +7 -0
- package/dist/components/chat-message.d.ts +59 -0
- package/dist/components/chat-message.js +91 -0
- package/dist/components/chat-reference.d.ts +20 -0
- package/dist/components/chat-reference.js +41 -0
- package/dist/components/chat-shared.d.ts +21 -0
- package/dist/components/chat-shared.js +23 -0
- package/dist/components/chat-suggestions.d.ts +59 -0
- package/dist/components/chat-suggestions.js +88 -0
- package/dist/components/chat-thread.d.ts +39 -0
- package/dist/components/chat-thread.js +172 -0
- package/dist/components/chat-typing.d.ts +35 -0
- package/dist/components/chat-typing.js +66 -0
- package/dist/components/checkbox.d.ts +18 -0
- package/dist/components/checkbox.js +33 -0
- package/dist/components/checklist.d.ts +26 -0
- package/dist/components/checklist.js +18 -0
- package/dist/components/chip.d.ts +29 -0
- package/dist/components/chip.js +61 -0
- package/dist/components/code-input.d.ts +40 -0
- package/dist/components/code-input.js +285 -0
- package/dist/components/color-picker.d.ts +38 -0
- package/dist/components/color-picker.js +855 -0
- package/dist/components/combobox.d.ts +75 -0
- package/dist/components/combobox.js +112 -0
- package/dist/components/command-menu.d.ts +58 -0
- package/dist/components/command-menu.js +166 -0
- package/dist/components/copy-button.d.ts +16 -0
- package/dist/components/copy-button.js +31 -0
- package/dist/components/data-grid.d.ts +50 -0
- package/dist/components/data-grid.js +599 -0
- package/dist/components/date-picker.d.ts +109 -0
- package/dist/components/date-picker.js +268 -0
- package/dist/components/description-list.d.ts +12 -0
- package/dist/components/description-list.js +10 -0
- package/dist/components/dialog.d.ts +57 -0
- package/dist/components/dialog.js +140 -0
- package/dist/components/dock.d.ts +45 -0
- package/dist/components/dock.js +79 -0
- package/dist/components/drop-zone.d.ts +46 -0
- package/dist/components/drop-zone.js +101 -0
- package/dist/components/dropdown-menu.d.ts +50 -0
- package/dist/components/dropdown-menu.js +78 -0
- package/dist/components/editable-cell.d.ts +34 -0
- package/dist/components/editable-cell.js +89 -0
- package/dist/components/empty-state.d.ts +17 -0
- package/dist/components/empty-state.js +9 -0
- package/dist/components/field.d.ts +43 -0
- package/dist/components/field.js +75 -0
- package/dist/components/filter-condition.d.ts +188 -0
- package/dist/components/filter-condition.js +113 -0
- package/dist/components/filter-menu.d.ts +57 -0
- package/dist/components/filter-menu.js +46 -0
- package/dist/components/header-bar.d.ts +84 -0
- package/dist/components/header-bar.js +94 -0
- package/dist/components/hold-button.d.ts +15 -0
- package/dist/components/hold-button.js +88 -0
- package/dist/components/icon-tile.d.ts +12 -0
- package/dist/components/icon-tile.js +29 -0
- package/dist/components/info-tip.d.ts +13 -0
- package/dist/components/info-tip.js +26 -0
- package/dist/components/input.d.ts +17 -0
- package/dist/components/input.js +83 -0
- package/dist/components/kbd.d.ts +6 -0
- package/dist/components/kbd.js +7 -0
- package/dist/components/menu-item.d.ts +56 -0
- package/dist/components/menu-item.js +94 -0
- package/dist/components/message-composer.d.ts +75 -0
- package/dist/components/message-composer.js +199 -0
- package/dist/components/nav-rail.d.ts +31 -0
- package/dist/components/nav-rail.js +85 -0
- package/dist/components/notice.d.ts +45 -0
- package/dist/components/notice.js +66 -0
- package/dist/components/optimistic-undo.d.ts +28 -0
- package/dist/components/optimistic-undo.js +43 -0
- package/dist/components/option-row.d.ts +15 -0
- package/dist/components/option-row.js +14 -0
- package/dist/components/page-content.d.ts +11 -0
- package/dist/components/page-content.js +31 -0
- package/dist/components/pagination.d.ts +34 -0
- package/dist/components/pagination.js +41 -0
- package/dist/components/popover.d.ts +27 -0
- package/dist/components/popover.js +25 -0
- package/dist/components/progress.d.ts +33 -0
- package/dist/components/progress.js +75 -0
- package/dist/components/radio-group.d.ts +7 -0
- package/dist/components/radio-group.js +33 -0
- package/dist/components/readonly-field.d.ts +33 -0
- package/dist/components/readonly-field.js +80 -0
- package/dist/components/segmented-control.d.ts +21 -0
- package/dist/components/segmented-control.js +108 -0
- package/dist/components/select.d.ts +42 -0
- package/dist/components/select.js +86 -0
- package/dist/components/separator.d.ts +10 -0
- package/dist/components/separator.js +7 -0
- package/dist/components/setting-row.d.ts +53 -0
- package/dist/components/setting-row.js +93 -0
- package/dist/components/sidebar-switcher.d.ts +47 -0
- package/dist/components/sidebar-switcher.js +20 -0
- package/dist/components/sidebar.d.ts +220 -0
- package/dist/components/sidebar.js +327 -0
- package/dist/components/skeleton.d.ts +18 -0
- package/dist/components/skeleton.js +23 -0
- package/dist/components/slider.d.ts +15 -0
- package/dist/components/slider.js +28 -0
- package/dist/components/spinner.d.ts +14 -0
- package/dist/components/spinner.js +19 -0
- package/dist/components/status-dot.d.ts +24 -0
- package/dist/components/status-dot.js +35 -0
- package/dist/components/stepper.d.ts +60 -0
- package/dist/components/stepper.js +197 -0
- package/dist/components/switch.d.ts +9 -0
- package/dist/components/switch.js +26 -0
- package/dist/components/table-cell.d.ts +38 -0
- package/dist/components/table-cell.js +107 -0
- package/dist/components/table-context.d.ts +48 -0
- package/dist/components/table-context.js +69 -0
- package/dist/components/table-head.d.ts +42 -0
- package/dist/components/table-head.js +188 -0
- package/dist/components/table-tree.d.ts +96 -0
- package/dist/components/table-tree.js +137 -0
- package/dist/components/table.d.ts +78 -0
- package/dist/components/table.js +119 -0
- package/dist/components/tabs.d.ts +27 -0
- package/dist/components/tabs.js +79 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.js +20 -0
- package/dist/components/theme.d.ts +41 -0
- package/dist/components/theme.js +60 -0
- package/dist/components/thinking.d.ts +68 -0
- package/dist/components/thinking.js +94 -0
- package/dist/components/toast.d.ts +39 -0
- package/dist/components/toast.js +110 -0
- package/dist/components/toolbar.d.ts +25 -0
- package/dist/components/toolbar.js +92 -0
- package/dist/components/tooltip.d.ts +23 -0
- package/dist/components/tooltip.js +27 -0
- package/dist/components/top-nav.d.ts +129 -0
- package/dist/components/top-nav.js +211 -0
- package/dist/components/truncate.d.ts +29 -0
- package/dist/components/truncate.js +138 -0
- package/dist/deprecated.d.ts +43 -0
- package/dist/deprecated.js +47 -0
- package/dist/index.d.ts +93 -0
- package/dist/index.js +93 -0
- package/dist/lib/cn.d.ts +5 -0
- package/dist/lib/cn.js +14 -0
- package/dist/lib/color.d.ts +136 -0
- package/dist/lib/color.js +307 -0
- package/dist/lib/contrast.d.ts +53 -0
- package/dist/lib/contrast.js +169 -0
- package/dist/lib/create-theme.d.ts +240 -0
- package/dist/lib/create-theme.js +461 -0
- package/dist/lib/harmony.d.ts +102 -0
- package/dist/lib/harmony.js +426 -0
- package/dist/lib/import-theme.d.ts +22 -0
- package/dist/lib/import-theme.js +221 -0
- package/dist/lib/overflow-scroll.d.ts +25 -0
- package/dist/lib/overflow-scroll.js +66 -0
- package/dist/lib/radio-toggle-render.d.ts +3 -0
- package/dist/lib/radio-toggle-render.js +9 -0
- package/dist/lib/reorder.d.ts +38 -0
- package/dist/lib/reorder.js +193 -0
- package/dist/lib/spacing.d.ts +101 -0
- package/dist/lib/spacing.js +118 -0
- package/dist/lib/tailwind-palette.d.ts +5 -0
- package/dist/lib/tailwind-palette.js +351 -0
- package/dist/lib/truncate.d.ts +18 -0
- package/dist/lib/truncate.js +69 -0
- package/dist/lib/use-single-value.d.ts +5 -0
- package/dist/lib/use-single-value.js +17 -0
- package/dist/styles.css +7988 -0
- package/mcp/server.mjs +87590 -0
- package/package.json +58 -5
- package/skills/continuum-fix-padding/SKILL.md +69 -0
- package/skills/continuum-fix-padding/scripts/compute.ts +155 -0
- package/skills/continuum-fix-padding/scripts/spacing.ts +189 -0
- package/skills/continuum-taste/SKILL.md +186 -0
- package/skills/continuum-taste/assets/tokens.css +647 -0
- package/skills/continuum-taste/references/charts.md +375 -0
- package/skills/continuum-taste/references/components.md +1369 -0
- package/skills/continuum-taste/references/foundations.md +539 -0
- package/skills/continuum-taste/references/media/canvas.md +75 -0
- package/skills/continuum-taste/references/media/css.md +61 -0
- package/skills/continuum-taste/references/media/react.md +161 -0
- package/skills/continuum-taste/references/method.md +87 -0
- package/skills/continuum-taste/references/pages.md +391 -0
- package/skills/continuum-taste/references/patterns.md +77 -0
- package/skills/continuum-taste/references/screens/agent.tsx +450 -0
- package/skills/continuum-taste/references/screens/analytics-overview.tsx +377 -0
- package/skills/continuum-taste/references/screens/checkout-funnel.tsx +193 -0
- package/skills/continuum-taste/references/screens/customer.tsx +475 -0
- package/skills/continuum-taste/references/screens/customers.tsx +608 -0
- package/skills/continuum-taste/references/screens/index.tsx +72 -0
- package/skills/continuum-taste/references/screens/invoice-editor.tsx +558 -0
- package/skills/continuum-taste/references/screens/new-customer.tsx +205 -0
- package/skills/continuum-taste/references/screens/overview.tsx +196 -0
- package/skills/continuum-taste/references/screens/report-generator.tsx +329 -0
- package/skills/continuum-taste/references/screens/risk-report.tsx +577 -0
- package/skills/continuum-taste/references/screens/sequence-editor.tsx +455 -0
- package/skills/continuum-taste/references/screens/settings.tsx +288 -0
- package/skills/continuum-taste/references/screens/shared.tsx +204 -0
- package/skills/continuum-taste/references/screens/sign-in.tsx +104 -0
- package/skills/continuum-taste/references/screens/workspace.tsx +596 -0
- package/skills/continuum-taste/references/theming.md +95 -0
- package/src/charts/area-chart.tsx +17 -0
- package/src/charts/bar-chart.tsx +15 -0
- package/src/charts/bubble-chart.tsx +913 -0
- package/src/charts/bullet-chart.tsx +419 -0
- package/src/charts/candlestick-chart.tsx +1242 -0
- package/src/charts/cartesian.tsx +1437 -0
- package/src/charts/chart-card.tsx +394 -0
- package/src/charts/donut-chart.tsx +299 -0
- package/src/charts/funnel-chart.tsx +373 -0
- package/src/charts/horizontal-bar-chart.tsx +991 -0
- package/src/charts/index.ts +76 -0
- package/src/charts/legend.tsx +59 -0
- package/src/charts/lib/candlestick-window.ts +42 -0
- package/src/charts/lib/color.ts +110 -0
- package/src/charts/lib/format.ts +42 -0
- package/src/charts/lib/frame.ts +6 -0
- package/src/charts/lib/layout.ts +78 -0
- package/src/charts/lib/path.ts +225 -0
- package/src/charts/lib/scale.ts +91 -0
- package/src/charts/lib/use-active.ts +87 -0
- package/src/charts/lib/use-size.ts +45 -0
- package/src/charts/line-chart.tsx +16 -0
- package/src/charts/radar-chart.tsx +485 -0
- package/src/charts/rose-chart.tsx +553 -0
- package/src/charts/sparkline.tsx +293 -0
- package/src/charts/tooltip.tsx +105 -0
- package/src/charts/treemap.tsx +271 -0
- package/src/charts/uptime-strip.tsx +469 -0
- package/src/components/accordion.tsx +136 -0
- package/src/components/activity-item.tsx +43 -0
- package/src/components/alert.tsx +135 -0
- package/src/components/assistant-answer.tsx +185 -0
- package/src/components/assistant-prompt.tsx +352 -0
- package/src/components/avatar.tsx +157 -0
- package/src/components/badge.tsx +55 -0
- package/src/components/bar-list.tsx +350 -0
- package/src/components/block-slider.tsx +189 -0
- package/src/components/branch-graph.tsx +580 -0
- package/src/components/breadcrumb.tsx +173 -0
- package/src/components/button.tsx +157 -0
- package/src/components/calendar.tsx +154 -0
- package/src/components/card.tsx +296 -0
- package/src/components/chat-attachment.tsx +255 -0
- package/src/components/chat-event.tsx +34 -0
- package/src/components/chat-message.tsx +332 -0
- package/src/components/chat-reference.tsx +100 -0
- package/src/components/chat-shared.ts +41 -0
- package/src/components/chat-suggestions.tsx +188 -0
- package/src/components/chat-thread.tsx +348 -0
- package/src/components/chat-typing.tsx +155 -0
- package/src/components/checkbox.tsx +83 -0
- package/src/components/checklist.tsx +146 -0
- package/src/components/chip.tsx +152 -0
- package/src/components/code-input.tsx +406 -0
- package/src/components/color-picker.tsx +1385 -0
- package/src/components/combobox.tsx +420 -0
- package/src/components/command-menu.tsx +405 -0
- package/src/components/copy-button.tsx +87 -0
- package/src/components/data-grid.tsx +965 -0
- package/src/components/date-picker.tsx +652 -0
- package/src/components/description-list.tsx +39 -0
- package/src/components/dialog.tsx +367 -0
- package/src/components/dock.tsx +192 -0
- package/src/components/drop-zone.tsx +283 -0
- package/src/components/dropdown-menu.tsx +323 -0
- package/src/components/editable-cell.tsx +219 -0
- package/src/components/empty-state.tsx +50 -0
- package/src/components/field.tsx +148 -0
- package/src/components/filter-condition.tsx +463 -0
- package/src/components/filter-menu.tsx +196 -0
- package/src/components/header-bar.tsx +220 -0
- package/src/components/hold-button.tsx +146 -0
- package/src/components/icon-tile.tsx +43 -0
- package/src/components/info-tip.tsx +87 -0
- package/src/components/input.tsx +136 -0
- package/src/components/kbd.tsx +17 -0
- package/src/components/menu-item.tsx +216 -0
- package/src/components/message-composer.tsx +458 -0
- package/src/components/nav-rail.tsx +235 -0
- package/src/components/notice.tsx +133 -0
- package/src/components/optimistic-undo.ts +68 -0
- package/src/components/option-row.tsx +54 -0
- package/src/components/page-content.tsx +44 -0
- package/src/components/pagination.tsx +182 -0
- package/src/components/popover.tsx +113 -0
- package/src/components/progress.tsx +222 -0
- package/src/components/radio-group.tsx +80 -0
- package/src/components/readonly-field.tsx +251 -0
- package/src/components/segmented-control.tsx +205 -0
- package/src/components/select.tsx +259 -0
- package/src/components/separator.tsx +30 -0
- package/src/components/setting-row.tsx +277 -0
- package/src/components/sidebar-switcher.tsx +134 -0
- package/src/components/sidebar.tsx +804 -0
- package/src/components/skeleton.tsx +57 -0
- package/src/components/slider.tsx +106 -0
- package/src/components/spinner.tsx +43 -0
- package/src/components/status-dot.tsx +100 -0
- package/src/components/stepper.tsx +459 -0
- package/src/components/switch.tsx +54 -0
- package/src/components/table-cell.tsx +239 -0
- package/src/components/table-context.ts +135 -0
- package/src/components/table-head.tsx +393 -0
- package/src/components/table-tree.tsx +357 -0
- package/src/components/table.tsx +295 -0
- package/src/components/tabs.tsx +191 -0
- package/src/components/textarea.tsx +44 -0
- package/src/components/theme.tsx +120 -0
- package/src/components/thinking.tsx +295 -0
- package/src/components/toast.tsx +308 -0
- package/src/components/toolbar.tsx +166 -0
- package/src/components/tooltip.tsx +84 -0
- package/src/components/top-nav.tsx +660 -0
- package/src/components/truncate.tsx +234 -0
- package/src/deprecated.ts +61 -0
- package/src/index.ts +184 -0
- package/src/lib/cn.ts +22 -0
- package/src/lib/color.ts +469 -0
- package/src/lib/contrast.ts +220 -0
- package/src/lib/create-theme.ts +659 -0
- package/src/lib/harmony.ts +609 -0
- package/src/lib/import-theme.ts +272 -0
- package/src/lib/overflow-scroll.tsx +108 -0
- package/src/lib/radio-toggle-render.tsx +15 -0
- package/src/lib/reorder.ts +222 -0
- package/src/lib/spacing.ts +189 -0
- package/src/lib/tailwind-palette.ts +355 -0
- package/src/lib/truncate.ts +79 -0
- package/src/lib/use-single-value.ts +23 -0
- package/src/styles/continuum.css +3 -0
- package/src/styles/theme.css +524 -0
- package/src/styles/tokens.css +647 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Continuum Licence
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Joan Verhulst. All rights reserved, except as granted below.
|
|
4
|
+
|
|
5
|
+
"The Software" means Continuum: the @contui/ui and contui packages and their source,
|
|
6
|
+
including the components, charts, styles, themes, Claude skills, MCP server and
|
|
7
|
+
documentation that come with them, in this repository or from a package registry.
|
|
8
|
+
|
|
9
|
+
1. Use. You may use the Software free of charge to build, run and ship your own
|
|
10
|
+
products and products you make for others, commercial or not. You may modify
|
|
11
|
+
it for that purpose.
|
|
12
|
+
|
|
13
|
+
2. No resale. You may not sell, sublicense, publish or otherwise distribute the
|
|
14
|
+
Software, or a modified copy of it, on its own or as part of anything whose
|
|
15
|
+
main purpose is to offer what the Software offers: a component library, design
|
|
16
|
+
system, UI kit, theme, template, Claude skill, MCP server or similar tool.
|
|
17
|
+
Shipping the Software inside a product of your own, as a dependency or as
|
|
18
|
+
compiled code, is allowed.
|
|
19
|
+
|
|
20
|
+
3. Notice. Keep this licence and the copyright notice with any copy of the
|
|
21
|
+
Software's source.
|
|
22
|
+
|
|
23
|
+
4. Later versions. This licence covers the versions it ships with. Later versions
|
|
24
|
+
may come under different terms.
|
|
25
|
+
|
|
26
|
+
5. No warranty. The Software is provided "as is", without warranty of any kind,
|
|
27
|
+
express or implied, including the warranties of merchantability, fitness for a
|
|
28
|
+
particular purpose and non-infringement. In no event shall the copyright holder
|
|
29
|
+
be liable for any claim, damages or other liability arising from the Software
|
|
30
|
+
or its use.
|
package/README.md
CHANGED
|
@@ -1,3 +1,151 @@
|
|
|
1
|
-
|
|
1
|
+
<img alt="Continuum" height="48" src="brand/continuum-mark-round.svg" width="48">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Continuum
|
|
4
|
+
|
|
5
|
+
A design system for quiet, dense tool UI: 13px type in two weights, hairline borders, one action colour, controls
|
|
6
|
+
on two heights, light and dark. It comes as a React component library (Base UI, Tailwind CSS v4), a theme
|
|
7
|
+
builder, Claude skills and an MCP server that bring the system to other projects.
|
|
8
|
+
|
|
9
|
+
## Get started
|
|
10
|
+
|
|
11
|
+
In your project (Node 20 or newer):
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npx contui init
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
It installs `@contui/ui` as a dependency, with the project's own package manager, and wires it in:
|
|
18
|
+
|
|
19
|
+
- copies the two Claude skills into `.claude/skills` and keeps them out of git;
|
|
20
|
+
- registers the MCP server in `.mcp.json`, run from `node_modules`;
|
|
21
|
+
- adds `contui sync` to the project's `postinstall`, so every install copies the skills of the version in
|
|
22
|
+
`package.json` again.
|
|
23
|
+
|
|
24
|
+
The package is the source: the version in `package.json` decides the components, the skills and the server
|
|
25
|
+
alike, for everyone on the project. Restart Claude Code and approve the `continuum` server; `claude mcp list`
|
|
26
|
+
should say it's connected. To update, update `@contui/ui` like any other dependency.
|
|
27
|
+
|
|
28
|
+
## Use it with Claude
|
|
29
|
+
|
|
30
|
+
**Skills.** Ask for UI "in Continuum" and Claude uses the `continuum-taste` skill, or call it by name:
|
|
31
|
+
`/continuum-taste build the invoices page`. `/continuum-fix-padding <file>` works out padding and gaps with the
|
|
32
|
+
spacing formula.
|
|
33
|
+
|
|
34
|
+
**MCP server.** Gives any agent the system as tools: a plan for a screen before any code, component specs, page
|
|
35
|
+
anatomies, patterns, tokens, the spacing formula, the theme builder, and an audit of the rendered page or the
|
|
36
|
+
source that says what to fix, in any stack (React, Angular, Vue, plain CSS, Qt, a Paper or Figma canvas). It
|
|
37
|
+
serves the same text as the skill, so the two work together: the skill carries the decisions, the server plans
|
|
38
|
+
from them and checks the result. Building a screen runs in that order: load the skill, `plan_screen`, build,
|
|
39
|
+
then `audit_ui` on the rendered page. Try it:
|
|
40
|
+
|
|
41
|
+
- "Using Continuum, what's the spec of a Select?"
|
|
42
|
+
- "Audit `src/components/Header.tsx` against Continuum and fix what it finds."
|
|
43
|
+
- `/mcp__continuum__improve_ui` runs the audit-and-fix loop.
|
|
44
|
+
|
|
45
|
+
For Cursor, VS Code or another client, add a server with command `node` and argument
|
|
46
|
+
`node_modules/@contui/ui/mcp/server.mjs`, or command `npx` and arguments `contui mcp`.
|
|
47
|
+
|
|
48
|
+
## Use the library in a React project
|
|
49
|
+
|
|
50
|
+
`npx contui init` installs it; `pnpm add @contui/ui` (or npm, yarn, bun) does the same without the skills. It
|
|
51
|
+
needs React 19, and `lucide-react` for icons.
|
|
52
|
+
|
|
53
|
+
Then pick one of two ways to load the styles.
|
|
54
|
+
|
|
55
|
+
**With Tailwind v4** (recommended): in your Tailwind entry CSS,
|
|
56
|
+
|
|
57
|
+
```css
|
|
58
|
+
@import "tailwindcss";
|
|
59
|
+
@import "@contui/ui/theme.css";
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Without Tailwind**: import the prebuilt stylesheet once.
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
import '@contui/ui/styles.css';
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Load the font and wrap your app in `Theme`:
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import '@fontsource-variable/geist';
|
|
72
|
+
import { Button, Theme } from '@contui/ui';
|
|
73
|
+
|
|
74
|
+
export const App = () => (
|
|
75
|
+
<Theme mode="light">
|
|
76
|
+
<Button>Save</Button>
|
|
77
|
+
</Theme>
|
|
78
|
+
);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Everything Continuum styles must sit inside a `Theme`. Charts are a separate entry: `import { ChartCard } from
|
|
82
|
+
'@contui/ui/charts'`.
|
|
83
|
+
|
|
84
|
+
## Give a product its own look
|
|
85
|
+
|
|
86
|
+
In the playground, open **Projects** and build a theme in five steps: colour, type, controls, sizes, review. The
|
|
87
|
+
review checks contrast in light and dark, then **Export** gives you two files:
|
|
88
|
+
|
|
89
|
+
- `app.css`: the whole theme as a Tailwind v4 entry. Put it at `src/app.css`, in place of `@contui/ui/theme.css`.
|
|
90
|
+
- `DESIGN.md`: a brief for Claude. Put it at the project's root and add `@DESIGN.md` to `CLAUDE.md`.
|
|
91
|
+
|
|
92
|
+
The MCP server's `create_theme` tool writes the same two files from a prompt.
|
|
93
|
+
|
|
94
|
+
## Work on Continuum itself
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
git clone git@github.com:joan-verhulst/continuum.git
|
|
98
|
+
cd continuum
|
|
99
|
+
pnpm install
|
|
100
|
+
pnpm dev
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`pnpm dev` starts the site and the app: open localhost:3100 (the app is at /app). `pnpm install:skill` installs
|
|
104
|
+
this clone's skills to `~/.claude/skills` and registers its MCP server for every project, for trying a change
|
|
105
|
+
before it's published.
|
|
106
|
+
|
|
107
|
+
**Publishing.** Raise `version` in `package.json`, run `pnpm build:package`, then publish both packages:
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
npm publish pack/ui
|
|
111
|
+
npm publish pack/contui
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
`pack/ui` is `@contui/ui`: the library, the stylesheet, both skills, the MCP server and the CLI. `pack/contui` is
|
|
115
|
+
the CLI alone, so `npx contui init` works anywhere.
|
|
116
|
+
|
|
117
|
+
## Commands
|
|
118
|
+
|
|
119
|
+
| Command | What it does |
|
|
120
|
+
| -------------------- | --------------------------------------------------------------------- |
|
|
121
|
+
| `pnpm dev` | Starts the site and the app: open localhost:3100, the app at /app. |
|
|
122
|
+
| `pnpm dev:web` | Starts the site alone. |
|
|
123
|
+
| `pnpm install:skill` | Builds and installs this clone's skills, and registers its MCP server. |
|
|
124
|
+
| `pnpm build` | Builds the stylesheet and the playground. |
|
|
125
|
+
| `pnpm build:mcp` | Builds the MCP server. |
|
|
126
|
+
| `pnpm build:package` | Builds the two npm packages into `pack/`. |
|
|
127
|
+
| `pnpm check` | Type-checks, lints, builds the skills and the server, runs the tests. Run it before a commit. |
|
|
128
|
+
|
|
129
|
+
## What's where
|
|
130
|
+
|
|
131
|
+
| Path | What it is |
|
|
132
|
+
| ----------------- | --------------------------------------------------------------------------- |
|
|
133
|
+
| `src` | The library: components, charts, helpers and the token sheets. |
|
|
134
|
+
| `dist/styles.css` | The prebuilt stylesheet. |
|
|
135
|
+
| `playground` | The playground: foundations, components, patterns, projects, install guides. |
|
|
136
|
+
| `mcp` | The MCP server. |
|
|
137
|
+
| `cli` | `contui`: `init`, `sync` and `mcp`. |
|
|
138
|
+
| `.claude/skills` | The Claude skills. The rules of the system are written in `continuum-taste/references`. |
|
|
139
|
+
| `web` | The public site, every page generated from the sources above; the app at `/app`. |
|
|
140
|
+
| `scripts` | The stylesheet, skill and package builds. |
|
|
141
|
+
|
|
142
|
+
## Credits
|
|
143
|
+
|
|
144
|
+
Built on [Base UI](https://base-ui.com/) and [react-day-picker](https://daypicker.dev/) (MIT), Tailwind CSS,
|
|
145
|
+
class-variance-authority, clsx and tailwind-merge (MIT), and lucide-react (ISC).
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
Copyright © 2026 Joan Verhulst. Free to use in your own products and in products you make for others, commercial
|
|
150
|
+
or not. Not to be resold or redistributed, on its own or as another component library, design system, theme, skill
|
|
151
|
+
or MCP server. See [LICENSE](LICENSE).
|
package/cli/contui.mjs
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* contui: sets Continuum up in a project as a dependency, and keeps it there.
|
|
4
|
+
*
|
|
5
|
+
* npx contui init installs @contui/ui, copies its skills into .claude/skills, registers its MCP
|
|
6
|
+
* server in .mcp.json, and adds `contui sync` to the project's postinstall
|
|
7
|
+
* contui sync copies the installed version's skills into .claude/skills (every install runs it)
|
|
8
|
+
* contui mcp runs the installed version's MCP server
|
|
9
|
+
*
|
|
10
|
+
* The installed package is the source of truth: the version is the one in package.json, the skills
|
|
11
|
+
* are copies of that version, refreshed on every install and kept out of git, and the MCP server
|
|
12
|
+
* runs from node_modules. The same file ships in both packages: `contui` (this CLI alone, so npx
|
|
13
|
+
* finds it) and `@contui/ui` (the library, the skills and the server, with this as its bin).
|
|
14
|
+
*/
|
|
15
|
+
import { spawnSync } from 'node:child_process';
|
|
16
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
17
|
+
import { cp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
18
|
+
import { dirname, join, relative, resolve, sep } from 'node:path';
|
|
19
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
20
|
+
|
|
21
|
+
const library = '@contui/ui';
|
|
22
|
+
const skills = ['continuum-taste', 'continuum-fix-padding'];
|
|
23
|
+
const serverName = 'continuum';
|
|
24
|
+
|
|
25
|
+
/** The package this file is in: `contui` when run through npx, `@contui/ui` once installed. */
|
|
26
|
+
const self = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
27
|
+
|
|
28
|
+
const readJson = path => JSON.parse(readFileSync(path, 'utf8'));
|
|
29
|
+
const versionOf = dir => readJson(join(dir, 'package.json')).version;
|
|
30
|
+
|
|
31
|
+
const fail = message => {
|
|
32
|
+
console.error(`contui: ${message}`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** The nearest folder at or above `from` that passes `test`. */
|
|
37
|
+
const up = (from, test) => {
|
|
38
|
+
let dir = resolve(from);
|
|
39
|
+
while (true) {
|
|
40
|
+
if (test(dir)) return dir;
|
|
41
|
+
const parent = dirname(dir);
|
|
42
|
+
if (parent === dir) return undefined;
|
|
43
|
+
dir = parent;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** The project: the nearest folder with a package.json. */
|
|
48
|
+
const projectOf = cwd => up(cwd, dir => existsSync(join(dir, 'package.json')));
|
|
49
|
+
|
|
50
|
+
/** Where Claude Code runs: the repository's root, or the project when it is not in one. */
|
|
51
|
+
const rootOf = project => up(project, dir => existsSync(join(dir, '.git'))) ?? project;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The installed library, found the way Node finds it (node_modules at or above the project). The
|
|
55
|
+
* path is kept as found, never resolved through a link, so it holds when the version changes.
|
|
56
|
+
*/
|
|
57
|
+
const installedFrom = project => {
|
|
58
|
+
const at = up(project, dir => existsSync(join(dir, 'node_modules', library, 'package.json')));
|
|
59
|
+
return at && join(at, 'node_modules', library);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** The project's package manager: its lockfile, then package.json's field, then the one running. */
|
|
63
|
+
const packageManagerOf = (project, root) => {
|
|
64
|
+
const locks = [
|
|
65
|
+
['pnpm-lock.yaml', 'pnpm'],
|
|
66
|
+
['yarn.lock', 'yarn'],
|
|
67
|
+
['bun.lock', 'bun'],
|
|
68
|
+
['bun.lockb', 'bun'],
|
|
69
|
+
['package-lock.json', 'npm'],
|
|
70
|
+
];
|
|
71
|
+
for (let dir = project; dir; dir = dir === root ? undefined : dirname(dir)) {
|
|
72
|
+
const lock = locks.find(([file]) => existsSync(join(dir, file)));
|
|
73
|
+
if (lock) return lock[1];
|
|
74
|
+
}
|
|
75
|
+
const field = readJson(join(project, 'package.json')).packageManager;
|
|
76
|
+
const named = (field ?? process.env.npm_config_user_agent ?? '').split(/[@/]/)[0];
|
|
77
|
+
return ['pnpm', 'yarn', 'bun'].includes(named) ? named : 'npm';
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const run = (command, args, cwd) => {
|
|
81
|
+
const options = { cwd, stdio: 'inherit' };
|
|
82
|
+
// Windows runs package managers through their .cmd shims, which need a shell: one command line.
|
|
83
|
+
const quote = arg => (/[\s"&|<>^]/.test(arg) ? `"${arg.replaceAll('"', '""')}"` : arg);
|
|
84
|
+
const result =
|
|
85
|
+
process.platform === 'win32'
|
|
86
|
+
? spawnSync([command, ...args].map(quote).join(' '), { ...options, shell: true })
|
|
87
|
+
: spawnSync(command, args, options);
|
|
88
|
+
return result.status === 0;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/** Writes JSON the way the file already is: its indent, and a final newline. */
|
|
92
|
+
const writeJson = async (path, value, existing) => {
|
|
93
|
+
const indent = existing?.match(/^([ \t]+)"/m)?.[1] ?? ' ';
|
|
94
|
+
await writeFile(path, `${JSON.stringify(value, null, indent)}\n`);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/** Copies the skills of the installed version into .claude/skills, replacing older copies. */
|
|
98
|
+
const syncSkills = async (source, root) => {
|
|
99
|
+
const copied = [];
|
|
100
|
+
for (const name of skills) {
|
|
101
|
+
const from = join(source, 'skills', name);
|
|
102
|
+
if (!existsSync(from)) continue;
|
|
103
|
+
const to = join(root, '.claude', 'skills', name);
|
|
104
|
+
await rm(to, { recursive: true, force: true });
|
|
105
|
+
await cp(from, to, { recursive: true });
|
|
106
|
+
copied.push(name);
|
|
107
|
+
}
|
|
108
|
+
return copied;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/** The copies are built from the package on every install, so git keeps only the version. */
|
|
112
|
+
const ignoreSkills = async root => {
|
|
113
|
+
const path = join(root, '.gitignore');
|
|
114
|
+
const existing = existsSync(path) ? await readFile(path, 'utf8') : '';
|
|
115
|
+
const lines = skills.map(name => `.claude/skills/${name}/`);
|
|
116
|
+
const missing = lines.filter(line => !existing.split(/\r?\n/).includes(line));
|
|
117
|
+
if (!missing.length) return false;
|
|
118
|
+
const block = [
|
|
119
|
+
'# Continuum’s skills, copied from @contui/ui on every install (contui sync)',
|
|
120
|
+
...missing,
|
|
121
|
+
];
|
|
122
|
+
const gap = existing && !existing.endsWith('\n') ? '\n\n' : existing ? '\n' : '';
|
|
123
|
+
await writeFile(path, `${existing}${gap}${block.join('\n')}\n`);
|
|
124
|
+
return true;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** Runs `contui sync` after every install, so the skills follow the version in package.json. */
|
|
128
|
+
const addPostinstall = async project => {
|
|
129
|
+
const path = join(project, 'package.json');
|
|
130
|
+
const text = await readFile(path, 'utf8');
|
|
131
|
+
const manifest = JSON.parse(text);
|
|
132
|
+
const current = manifest.scripts?.postinstall;
|
|
133
|
+
if (current?.includes('contui sync')) return false;
|
|
134
|
+
manifest.scripts = {
|
|
135
|
+
...manifest.scripts,
|
|
136
|
+
postinstall: current ? `${current} && contui sync` : 'contui sync',
|
|
137
|
+
};
|
|
138
|
+
await writeJson(path, manifest, text);
|
|
139
|
+
return true;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/** Registers the server in the project's .mcp.json, run with node from node_modules. */
|
|
143
|
+
const registerServer = async (source, root) => {
|
|
144
|
+
const path = join(root, '.mcp.json');
|
|
145
|
+
const text = existsSync(path) ? await readFile(path, 'utf8') : undefined;
|
|
146
|
+
const config = text ? JSON.parse(text) : {};
|
|
147
|
+
const server = relative(root, join(source, 'mcp', 'server.mjs'))
|
|
148
|
+
.split(sep)
|
|
149
|
+
.join('/');
|
|
150
|
+
config.mcpServers = {
|
|
151
|
+
...config.mcpServers,
|
|
152
|
+
[serverName]: { type: 'stdio', command: 'node', args: [server] },
|
|
153
|
+
};
|
|
154
|
+
await writeJson(path, config, text);
|
|
155
|
+
return server;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const option = (args, name) => {
|
|
159
|
+
const at = args.indexOf(name);
|
|
160
|
+
return at === -1 ? undefined : args[at + 1];
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const init = async args => {
|
|
164
|
+
const project = projectOf(process.cwd());
|
|
165
|
+
if (!project)
|
|
166
|
+
fail('no package.json here or above. Run this inside a project (npm init -y makes one).');
|
|
167
|
+
const root = rootOf(project);
|
|
168
|
+
const manifest = readJson(join(project, 'package.json'));
|
|
169
|
+
const listed = { ...manifest.dependencies, ...manifest.devDependencies }[library];
|
|
170
|
+
// --from installs another spec than the registry's: a tarball, a folder, a git URL.
|
|
171
|
+
const from = option(args, '--from');
|
|
172
|
+
|
|
173
|
+
const manager = packageManagerOf(project, root);
|
|
174
|
+
if (!listed || from) {
|
|
175
|
+
const spec = from ?? library;
|
|
176
|
+
console.log(`Installing ${library} with ${manager}…`);
|
|
177
|
+
const verb = manager === 'npm' ? 'install' : 'add';
|
|
178
|
+
if (!run(manager, [verb, spec], project)) fail(`${manager} could not install ${spec}.`);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const source = installedFrom(project);
|
|
182
|
+
if (!source)
|
|
183
|
+
fail(
|
|
184
|
+
`${library} is not in node_modules. Install it (${manager} install), then run init again.`,
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
const copied = await syncSkills(source, root);
|
|
188
|
+
const ignored = await ignoreSkills(root);
|
|
189
|
+
const hooked = await addPostinstall(project);
|
|
190
|
+
const server = await registerServer(source, root);
|
|
191
|
+
|
|
192
|
+
const at = path => relative(process.cwd(), path).split(sep).join('/') || '.';
|
|
193
|
+
console.log(`
|
|
194
|
+
Continuum ${versionOf(source)} is set up.
|
|
195
|
+
${library.padEnd(16)} a dependency in ${at(join(project, 'package.json'))}
|
|
196
|
+
${'skills'.padEnd(16)} ${copied.join(', ')} in ${at(join(root, '.claude/skills'))}${ignored ? ' (ignored by git)' : ''}
|
|
197
|
+
${'MCP server'.padEnd(16)} '${serverName}' in ${at(join(root, '.mcp.json'))}, running ${server}
|
|
198
|
+
${'postinstall'.padEnd(16)} ${hooked ? 'runs contui sync, so the skills follow the installed version' : 'already runs contui sync'}
|
|
199
|
+
|
|
200
|
+
Next:
|
|
201
|
+
- Restart Claude Code and approve the '${serverName}' server.
|
|
202
|
+
- Ask for a screen "in Continuum": the skill sets up the styles and the Theme.
|
|
203
|
+
`);
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
const sync = async () => {
|
|
207
|
+
// Runs inside every install: it reports, and never fails the install.
|
|
208
|
+
try {
|
|
209
|
+
const project = projectOf(process.cwd()) ?? process.cwd();
|
|
210
|
+
const source =
|
|
211
|
+
installedFrom(project) ?? (existsSync(join(self, 'skills')) ? self : undefined);
|
|
212
|
+
if (!source) {
|
|
213
|
+
console.warn(`contui: ${library} is not installed, so there are no skills to sync.`);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
const copied = await syncSkills(source, rootOf(project));
|
|
217
|
+
console.log(`contui: ${copied.join(', ')} synced from ${library} ${versionOf(source)}`);
|
|
218
|
+
} catch (error) {
|
|
219
|
+
console.warn(`contui: could not sync the skills (${error.message})`);
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
const mcp = async () => {
|
|
224
|
+
const own = join(self, 'mcp', 'server.mjs');
|
|
225
|
+
const project = projectOf(process.cwd());
|
|
226
|
+
const installed = project && installedFrom(project);
|
|
227
|
+
const server = existsSync(own) ? own : installed && join(installed, 'mcp', 'server.mjs');
|
|
228
|
+
if (!server || !existsSync(server))
|
|
229
|
+
fail(`${library} is not installed here. Run npx contui init first.`);
|
|
230
|
+
await import(pathToFileURL(server).href);
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const help = `contui ${versionOf(self)}: Continuum in a project, as a dependency.
|
|
234
|
+
|
|
235
|
+
npx contui init install ${library}, add its skills and MCP server, keep them on its version
|
|
236
|
+
contui sync copy the installed version's skills into .claude/skills
|
|
237
|
+
contui mcp run the installed version's MCP server
|
|
238
|
+
`;
|
|
239
|
+
|
|
240
|
+
const [command, ...args] = process.argv.slice(2);
|
|
241
|
+
|
|
242
|
+
if (command === 'init') await init(args);
|
|
243
|
+
else if (command === 'sync') await sync();
|
|
244
|
+
else if (command === 'mcp') await mcp();
|
|
245
|
+
else if (command === '--version' || command === '-v') console.log(versionOf(self));
|
|
246
|
+
else {
|
|
247
|
+
console.log(help);
|
|
248
|
+
if (command && command !== 'help' && command !== '--help' && command !== '-h')
|
|
249
|
+
process.exitCode = 1;
|
|
250
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type CartesianProps, type ChartRow } from './cartesian.js';
|
|
2
|
+
export type AreaChartProps<Row extends ChartRow, X = unknown> = Omit<CartesianProps<Row, X>, 'kind' | 'stacked'>;
|
|
3
|
+
/**
|
|
4
|
+
* A measure over time, drawn as a line over a wash of its own colour: the chart a page
|
|
5
|
+
* leads with. One or two series take the fill; past that they are lines, because two
|
|
6
|
+
* washes over each other read as a third colour.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AreaChart: <Row extends ChartRow, X = unknown>(props: AreaChartProps<Row, X>) => import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Cartesian } from './cartesian.js';
|
|
4
|
+
/**
|
|
5
|
+
* A measure over time, drawn as a line over a wash of its own colour: the chart a page
|
|
6
|
+
* leads with. One or two series take the fill; past that they are lines, because two
|
|
7
|
+
* washes over each other read as a third colour.
|
|
8
|
+
*/
|
|
9
|
+
export const AreaChart = (props) => (_jsx(Cartesian, { kind: "area", ...props }));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CartesianProps, type ChartRow } from './cartesian.js';
|
|
2
|
+
export type BarChartProps<Row extends ChartRow, X = unknown> = Omit<CartesianProps<Row, X>, 'kind'>;
|
|
3
|
+
/**
|
|
4
|
+
* A comparison across categories or whole periods: revenue by plan, sessions by month.
|
|
5
|
+
* Several series stand side by side, or stack with `stacked` where they add up to
|
|
6
|
+
* something the reader is meant to total. A ranked list of names is a `BarList`, not
|
|
7
|
+
* this: there the labels are the point.
|
|
8
|
+
*/
|
|
9
|
+
export declare const BarChart: <Row extends ChartRow, X = unknown>(props: BarChartProps<Row, X>) => import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Cartesian } from './cartesian.js';
|
|
4
|
+
/**
|
|
5
|
+
* A comparison across categories or whole periods: revenue by plan, sessions by month.
|
|
6
|
+
* Several series stand side by side, or stack with `stacked` where they add up to
|
|
7
|
+
* something the reader is meant to total. A ranked list of names is a `BarList`, not
|
|
8
|
+
* this: there the labels are the point.
|
|
9
|
+
*/
|
|
10
|
+
export const BarChart = (props) => (_jsx(Cartesian, { kind: "bar", ...props }));
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ChartRow, ChartSeries } from './cartesian.js';
|
|
2
|
+
export type BubbleChartProps<Row extends ChartRow> = {
|
|
3
|
+
/** Says what the chart shows; it names the chart for a screen reader. */
|
|
4
|
+
'aria-label': string;
|
|
5
|
+
/** One row per bubble. */
|
|
6
|
+
data: readonly Row[];
|
|
7
|
+
/** The field naming each bubble: "Northwind". */
|
|
8
|
+
name: string;
|
|
9
|
+
/** The field read across. */
|
|
10
|
+
x: string;
|
|
11
|
+
/** The field read up. */
|
|
12
|
+
y: string;
|
|
13
|
+
/** The field each bubble's area shows. */
|
|
14
|
+
size: string;
|
|
15
|
+
/** The field a bubble's group is read from; its colour follows the group. */
|
|
16
|
+
group?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The groups in their order, with their names and colours: `series-1` to `series-5` by
|
|
19
|
+
* place unless given. Each `key` is a value of the `group` field. The groups found in the
|
|
20
|
+
* data are used, in the order met, when this is left out.
|
|
21
|
+
*/
|
|
22
|
+
groups?: readonly ChartSeries[];
|
|
23
|
+
/** What each measure is called in the readout and on its axis: "Seats". */
|
|
24
|
+
xLabel?: string;
|
|
25
|
+
yLabel?: string;
|
|
26
|
+
sizeLabel?: string;
|
|
27
|
+
formatX?: (value: number) => string;
|
|
28
|
+
formatY?: (value: number) => string;
|
|
29
|
+
formatSize?: (value: number) => string;
|
|
30
|
+
/**
|
|
31
|
+
* `log` for a measure that runs over several powers of ten, so the small ones are not
|
|
32
|
+
* all pressed into a corner; each step of the axis is then ten times the one before.
|
|
33
|
+
*/
|
|
34
|
+
xScale?: 'linear' | 'log';
|
|
35
|
+
yScale?: 'linear' | 'log';
|
|
36
|
+
/** How many of the largest bubbles have their names written beside them, where they fit. */
|
|
37
|
+
labels?: number;
|
|
38
|
+
/** A key of two or three circles, under the plot, saying what a bubble's size stands for. */
|
|
39
|
+
sizeKey?: boolean;
|
|
40
|
+
height?: number;
|
|
41
|
+
/** `tint`, the kit's look, a tint of each colour with a solid edge; `solid` fills each bubble. */
|
|
42
|
+
fill?: 'tint' | 'solid';
|
|
43
|
+
/** While the data loads: the chart's own shape stands in, in the skeleton wash, at the size it will have. */
|
|
44
|
+
loading?: boolean;
|
|
45
|
+
/** What the chart says when there is nothing to draw. */
|
|
46
|
+
emptyLabel?: string;
|
|
47
|
+
className?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Things that have three measures, as bubbles: one measure across, one up, and the third in
|
|
51
|
+
* each bubble's area, which grows as the value so a bubble twice the value is twice the ink.
|
|
52
|
+
* A fourth, a group, may colour them.
|
|
53
|
+
*
|
|
54
|
+
* The largest bubbles are drawn first, so a small one is never hidden under a large one, and
|
|
55
|
+
* the few largest have their names written beside them wherever a name fits clear of the
|
|
56
|
+
* others. The largest bubble's radius is taken from the room the plot has, so a phone draws
|
|
57
|
+
* smaller bubbles rather than a heap. Pointing at a bubble reads all of it out while the rest
|
|
58
|
+
* step back.
|
|
59
|
+
*/
|
|
60
|
+
export declare const BubbleChart: <Row extends ChartRow>({ "aria-label": label, data: given, name: nameKey, x: xKey, y: yKey, size: sizeKey, group: groupKey, groups: givenGroups, xLabel, yLabel, sizeLabel, formatX, formatY, formatSize, xScale, yScale, labels, sizeKey: showSizeKey, height, fill, loading, emptyLabel, className, }: BubbleChartProps<Row>) => import("react").JSX.Element;
|