@cascivo/mcp 0.2.0 → 0.3.3

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.
Files changed (205) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +53 -23
  3. package/dist/context/accordion.md +93 -0
  4. package/dist/context/action-sheet.md +117 -0
  5. package/dist/context/alert-dialog.md +122 -0
  6. package/dist/context/alert.md +110 -0
  7. package/dist/context/app-shell.md +98 -0
  8. package/dist/context/aspect-ratio.md +92 -0
  9. package/dist/context/avatar-group.md +111 -0
  10. package/dist/context/avatar.md +100 -0
  11. package/dist/context/badge.md +119 -0
  12. package/dist/context/block/console-app.md +66 -0
  13. package/dist/context/block/dashboard-charts.md +61 -0
  14. package/dist/context/block/empty-dashboard.md +60 -0
  15. package/dist/context/block/login-page.md +60 -0
  16. package/dist/context/block/notification-center.md +61 -0
  17. package/dist/context/block/page-with-breadcrumb.md +54 -0
  18. package/dist/context/block/settings-form-page.md +60 -0
  19. package/dist/context/block/sidebar-app.md +55 -0
  20. package/dist/context/block/stats-cards.md +61 -0
  21. package/dist/context/block/users-table-page.md +61 -0
  22. package/dist/context/blockquote.md +95 -0
  23. package/dist/context/bottom-sheet.md +112 -0
  24. package/dist/context/breadcrumb.md +106 -0
  25. package/dist/context/button-group.md +100 -0
  26. package/dist/context/button.md +117 -0
  27. package/dist/context/calendar.md +118 -0
  28. package/dist/context/card.md +90 -0
  29. package/dist/context/carousel.md +101 -0
  30. package/dist/context/chart/area-chart.md +99 -0
  31. package/dist/context/chart/bar-chart.md +114 -0
  32. package/dist/context/chart/boxplot.md +82 -0
  33. package/dist/context/chart/bubble-chart.md +80 -0
  34. package/dist/context/chart/bullet.md +75 -0
  35. package/dist/context/chart/calendar.md +79 -0
  36. package/dist/context/chart/candlestick.md +104 -0
  37. package/dist/context/chart/combo-chart.md +78 -0
  38. package/dist/context/chart/funnel.md +87 -0
  39. package/dist/context/chart/gauge.md +87 -0
  40. package/dist/context/chart/heatmap.md +77 -0
  41. package/dist/context/chart/histogram.md +74 -0
  42. package/dist/context/chart/kpi.md +70 -0
  43. package/dist/context/chart/line-chart.md +113 -0
  44. package/dist/context/chart/meter.md +71 -0
  45. package/dist/context/chart/pie-chart.md +126 -0
  46. package/dist/context/chart/polar.md +92 -0
  47. package/dist/context/chart/radar.md +81 -0
  48. package/dist/context/chart/radial-bar.md +96 -0
  49. package/dist/context/chart/sankey.md +89 -0
  50. package/dist/context/chart/scatter-chart.md +90 -0
  51. package/dist/context/chart/sparkline.md +69 -0
  52. package/dist/context/chart/stream.md +88 -0
  53. package/dist/context/chart/sunburst.md +93 -0
  54. package/dist/context/chart/treemap.md +84 -0
  55. package/dist/context/chat-bubble.md +116 -0
  56. package/dist/context/checkbox-card.md +104 -0
  57. package/dist/context/checkbox.md +104 -0
  58. package/dist/context/code-snippet.md +118 -0
  59. package/dist/context/code.md +103 -0
  60. package/dist/context/collapsible.md +104 -0
  61. package/dist/context/color-picker.md +101 -0
  62. package/dist/context/combobox.md +125 -0
  63. package/dist/context/command-menu.md +121 -0
  64. package/dist/context/comparison.md +117 -0
  65. package/dist/context/contained-list.md +103 -0
  66. package/dist/context/context-menu.md +103 -0
  67. package/dist/context/copy-button.md +106 -0
  68. package/dist/context/data-list.md +99 -0
  69. package/dist/context/data-table.md +149 -0
  70. package/dist/context/date-picker.md +116 -0
  71. package/dist/context/date-range-picker.md +113 -0
  72. package/dist/context/dock.md +117 -0
  73. package/dist/context/drawer.md +111 -0
  74. package/dist/context/dropdown.md +96 -0
  75. package/dist/context/editable.md +101 -0
  76. package/dist/context/editor/code-editor.md +146 -0
  77. package/dist/context/editor/highlight.md +74 -0
  78. package/dist/context/empty-state.md +101 -0
  79. package/dist/context/fab.md +128 -0
  80. package/dist/context/field.md +118 -0
  81. package/dist/context/file-uploader.md +121 -0
  82. package/dist/context/filter.md +129 -0
  83. package/dist/context/flow/flow-background.md +103 -0
  84. package/dist/context/flow/flow-canvas.md +82 -0
  85. package/dist/context/flow/flow-controls.md +84 -0
  86. package/dist/context/flow/flow-edge.md +128 -0
  87. package/dist/context/flow/flow-handle.md +83 -0
  88. package/dist/context/flow/flow-minimap.md +89 -0
  89. package/dist/context/flow/flow-node.md +97 -0
  90. package/dist/context/flow/flow-panel.md +75 -0
  91. package/dist/context/flow/flow-story.md +145 -0
  92. package/dist/context/flow/flow.md +139 -0
  93. package/dist/context/form.md +104 -0
  94. package/dist/context/header-panel.md +96 -0
  95. package/dist/context/header.md +104 -0
  96. package/dist/context/heading.md +107 -0
  97. package/dist/context/hover-card.md +108 -0
  98. package/dist/context/icon-button.md +115 -0
  99. package/dist/context/image.md +115 -0
  100. package/dist/context/indicator.md +95 -0
  101. package/dist/context/inline-loading.md +101 -0
  102. package/dist/context/input-group.md +122 -0
  103. package/dist/context/input.md +101 -0
  104. package/dist/context/item.md +109 -0
  105. package/dist/context/join.md +97 -0
  106. package/dist/context/kbd.md +100 -0
  107. package/dist/context/label.md +117 -0
  108. package/dist/context/layout/app-shell.md +85 -0
  109. package/dist/context/layout/auth-layout.md +74 -0
  110. package/dist/context/layout/auto-grid.md +69 -0
  111. package/dist/context/layout/center.md +67 -0
  112. package/dist/context/layout/columns.md +70 -0
  113. package/dist/context/layout/dashboard-layout.md +68 -0
  114. package/dist/context/layout/grid.md +70 -0
  115. package/dist/context/layout/masonry.md +70 -0
  116. package/dist/context/layout/page-header.md +75 -0
  117. package/dist/context/layout/section.md +69 -0
  118. package/dist/context/layout/settings-layout.md +68 -0
  119. package/dist/context/layout/spacer.md +64 -0
  120. package/dist/context/layout/split-view.md +71 -0
  121. package/dist/context/layout/stack.md +93 -0
  122. package/dist/context/link.md +112 -0
  123. package/dist/context/list.md +109 -0
  124. package/dist/context/log-viewer.md +124 -0
  125. package/dist/context/menu-button.md +137 -0
  126. package/dist/context/menu.md +108 -0
  127. package/dist/context/menubar.md +92 -0
  128. package/dist/context/modal.md +96 -0
  129. package/dist/context/multi-select.md +104 -0
  130. package/dist/context/native-select.md +118 -0
  131. package/dist/context/navigation-menu.md +95 -0
  132. package/dist/context/notification.md +116 -0
  133. package/dist/context/number-input.md +117 -0
  134. package/dist/context/otp-input.md +98 -0
  135. package/dist/context/overflow-menu.md +107 -0
  136. package/dist/context/pagination.md +123 -0
  137. package/dist/context/password-input.md +100 -0
  138. package/dist/context/popover.md +108 -0
  139. package/dist/context/progress-bar.md +107 -0
  140. package/dist/context/progress-circle.md +101 -0
  141. package/dist/context/progress-indicator.md +105 -0
  142. package/dist/context/progress.md +109 -0
  143. package/dist/context/prose.md +110 -0
  144. package/dist/context/pull-to-refresh.md +101 -0
  145. package/dist/context/qr-code.md +101 -0
  146. package/dist/context/radial-progress.md +117 -0
  147. package/dist/context/radio-card.md +95 -0
  148. package/dist/context/radio.md +94 -0
  149. package/dist/context/rating-group.md +97 -0
  150. package/dist/context/relative-time.md +90 -0
  151. package/dist/context/resizable.md +102 -0
  152. package/dist/context/scroll-area.md +101 -0
  153. package/dist/context/search.md +113 -0
  154. package/dist/context/section/cta.md +83 -0
  155. package/dist/context/section/feature-grid.md +98 -0
  156. package/dist/context/section/hero.md +101 -0
  157. package/dist/context/section/media-masonry.md +77 -0
  158. package/dist/context/section/page-footer.md +101 -0
  159. package/dist/context/section/stats-band.md +81 -0
  160. package/dist/context/segmented-control.md +101 -0
  161. package/dist/context/select.md +101 -0
  162. package/dist/context/separator.md +88 -0
  163. package/dist/context/sheet.md +100 -0
  164. package/dist/context/shell-header.md +105 -0
  165. package/dist/context/side-nav.md +134 -0
  166. package/dist/context/skeleton.md +101 -0
  167. package/dist/context/skip-nav.md +103 -0
  168. package/dist/context/slider.md +98 -0
  169. package/dist/context/spinner.md +89 -0
  170. package/dist/context/stack.md +96 -0
  171. package/dist/context/stat.md +101 -0
  172. package/dist/context/status.md +105 -0
  173. package/dist/context/steps.md +124 -0
  174. package/dist/context/structured-list.md +107 -0
  175. package/dist/context/swap.md +100 -0
  176. package/dist/context/swipe-item.md +110 -0
  177. package/dist/context/switcher.md +97 -0
  178. package/dist/context/tabs.md +93 -0
  179. package/dist/context/tag.md +110 -0
  180. package/dist/context/tags-input.md +94 -0
  181. package/dist/context/text.md +111 -0
  182. package/dist/context/textarea.md +98 -0
  183. package/dist/context/tile.md +116 -0
  184. package/dist/context/time-picker.md +102 -0
  185. package/dist/context/timeline.md +93 -0
  186. package/dist/context/toast.md +91 -0
  187. package/dist/context/toc.md +110 -0
  188. package/dist/context/toggle-group.md +118 -0
  189. package/dist/context/toggle.md +103 -0
  190. package/dist/context/toggletip.md +119 -0
  191. package/dist/context/tooltip.md +92 -0
  192. package/dist/context/tree-view.md +107 -0
  193. package/dist/context/user.md +100 -0
  194. package/dist/context/visually-hidden.md +90 -0
  195. package/dist/context.json +22456 -0
  196. package/dist/index.d.mts +3 -1
  197. package/dist/index.d.mts.map +1 -1
  198. package/dist/index.mjs +73 -32
  199. package/dist/index.mjs.map +1 -1
  200. package/dist/marketplace.json +70 -0
  201. package/dist/registry.json +2832 -358
  202. package/dist/tokens.catalog.json +2375 -0
  203. package/dist/tokens.variants.json +3291 -0
  204. package/package.json +4 -3
  205. package/readme.body.md +53 -23
@@ -0,0 +1,71 @@
1
+ # Meter
2
+
3
+ **Category:** chart
4
+ **Description:** Progress meter in bar or gauge variant with threshold coloring.
5
+
6
+ ## When to use
7
+
8
+ - Showing a rated or gauged value within a known min/max range
9
+ - Surfacing threshold-based status (e.g. CPU, disk, score) as a bar or gauge
10
+
11
+ ## When NOT to use
12
+
13
+ - Showing task completion progress — use a ProgressBar
14
+ - Comparing a value against a target with range bands — use Bullet
15
+
16
+ ## Related components
17
+
18
+ - **Bullet** (alternative): Use when a target marker and qualitative bands are needed
19
+ - **Kpi** (alternative): Use for a headline metric without a bounded range
20
+
21
+ ## Accessibility rationale
22
+
23
+ Renders with role="meter" exposing min, max, and current value to assistive tech.
24
+
25
+ ## Props
26
+
27
+ | Name | Type | Required | Default | Description |
28
+ | ------------ | ------------------ | -------- | ------- | --------------------------------- |
29
+ | `value` | `number` | Yes | — | Current value |
30
+ | `label` | `string` | Yes | — | Text label for the control. |
31
+ | `min` | `number` | No | 0 | Minimum allowed value. |
32
+ | `max` | `number` | No | 100 | Maximum allowed value. |
33
+ | `variant` | `'bar' \| 'gauge'` | No | bar | Selects the visual style variant. |
34
+ | `thresholds` | `MeterThresholds` | No | — | Color breakpoints |
35
+ | `width` | `number` | No | — | Width of the component. |
36
+ | `height` | `number` | No | — | Height of the component. |
37
+
38
+ ## Tokens
39
+
40
+ - `--cascivo-chart-1`
41
+
42
+ ## Examples
43
+
44
+ ### Basic meter
45
+
46
+ ```jsx
47
+ import { Meter } from '@cascivo/charts'
48
+ ;<Meter value={72} label="CPU usage" />
49
+ ```
50
+
51
+ ## AI context prompt
52
+
53
+ Copy this into an LLM context bar before editing this component:
54
+
55
+ ```text
56
+ I am modifying the cascivo Meter component (chart). Progress meter in bar or gauge variant with threshold coloring.
57
+
58
+ Architecture constraints — follow exactly:
59
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
60
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
61
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
62
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
63
+ - CSS logical properties only (RTL-safe).
64
+
65
+ Meter is strictly bound to these tokens — use only these, do not invent token names:
66
+ --cascivo-chart-1
67
+
68
+ Accessibility: role "meter", WCAG 2.1-AA. Keep it AA.
69
+
70
+ Do not invent props, tokens, or global viewport media queries.
71
+ ```
@@ -0,0 +1,126 @@
1
+ # PieChart
2
+
3
+ **Category:** chart
4
+ **Description:** Pie or donut chart with hover segments and optional legend.
5
+
6
+ ## When to use
7
+
8
+ - Showing part-of-whole proportions with five or fewer slices
9
+ - A single composition at one point in time
10
+
11
+ ## When NOT to use
12
+
13
+ - Comparing precise values or many categories — use BarChart
14
+ - Showing change over time — use LineChart or AreaChart
15
+
16
+ ## Related components
17
+
18
+ - **BarChart** (alternative): Use when comparing more than five categories or precise values
19
+ - **Treemap** (alternative): Use for part-to-whole with many or hierarchical segments
20
+
21
+ ## Accessibility rationale
22
+
23
+ Renders with role="img" and requires a title prop for screen reader labeling.
24
+
25
+ ## Props
26
+
27
+ | Name | Type | Required | Default | Description |
28
+ | --------------- | ------------------------------------------------------------------ | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | `data` | `PieChartDatum[]` | Yes | — | Array of { id, label, value, color? } datums. Optional per-datum `color` (any CSS color) overrides the positional palette for that slice. |
30
+ | `title` | `string` | Yes | — | Title text for the component. |
31
+ | `description` | `string` | No | — | Supporting description text. |
32
+ | `donut` | `boolean` | No | — | Render as donut chart |
33
+ | `width` | `number` | No | — | Width of the component. |
34
+ | `height` | `number` | No | 300 | Height of the component. |
35
+ | `size` | `number` | No | — | Square shorthand: sets width === height. Explicit width/height win. |
36
+ | `thickness` | `number` | No | — | Ring width in px (donut only); defaults to 0.4 × radius. |
37
+ | `innerRadius` | `number` | No | — | Inner radius in px (donut only); takes precedence over thickness; clamped to [0, outerRadius). |
38
+ | `centerValue` | `string` | No | — | Center value text rendered in the donut hole (donut only). |
39
+ | `centerLabel` | `string` | No | — | Center label text rendered below the value (donut only). |
40
+ | `centerSlot` | `ReactNode` | No | — | Arbitrary content for the donut hole; takes precedence over centerValue/centerLabel. |
41
+ | `emptyLabel` | `string` | No | — | Visible placeholder text when data is empty. Defaults to the i18n "No data". |
42
+ | `tooltipFormat` | `(p: ChartPoint) => string` | No | — | Custom tooltip formatter. Defaults to "value (pct%)" in the slice color. |
43
+ | `legend` | `boolean` | No | — | Whether to show the legend. |
44
+ | `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
45
+ | `plain` | `boolean` | No | false | Marks only — no axes, grid lines, or legend. For micro/inline charts. |
46
+ | `labels` | `boolean \| { format?: (v: number) => string; position?: string }` | No | — | Print each value as a label on the mark (collision-aware, decorative/aria-hidden). |
47
+ | `onSelect` | `(point: ChartPoint) => void` | No | — | Fired when a point is clicked or activated (Enter/Space) — for drill-down. |
48
+
49
+ ## Tokens
50
+
51
+ - `--cascivo-chart-1`
52
+ - `--cascivo-chart-2`
53
+ - `--cascivo-chart-3`
54
+ - `--cascivo-chart-4`
55
+ - `--cascivo-chart-5`
56
+ - `--cascivo-chart-6`
57
+ - `--cascivo-chart-7`
58
+ - `--cascivo-chart-8`
59
+
60
+ ## Examples
61
+
62
+ ### Basic pie chart
63
+
64
+ ```jsx
65
+ import { PieChart } from '@cascivo/charts'
66
+ ;<PieChart
67
+ data={[
68
+ { label: 'A', value: 60 },
69
+ { label: 'B', value: 40 },
70
+ ]}
71
+ title="Market share"
72
+ />
73
+ ```
74
+
75
+ ### Donut with center total and custom thickness
76
+
77
+ ```jsx
78
+ import { PieChart } from '@cascivo/charts'
79
+ ;<PieChart
80
+ donut
81
+ size={220}
82
+ thickness={28}
83
+ centerValue="142"
84
+ centerLabel="Total tasks"
85
+ data={[
86
+ { id: 'done', label: 'Done', value: 92, color: 'var(--cascivo-color-success)' },
87
+ { id: 'wip', label: 'In progress', value: 34, color: 'var(--cascivo-color-warning)' },
88
+ { id: 'blocked', label: 'Blocked', value: 16, color: 'var(--cascivo-color-destructive)' },
89
+ ]}
90
+ title="Task status"
91
+ />
92
+ ```
93
+
94
+ ### Percentage tooltip + empty state
95
+
96
+ ```jsx
97
+ import { PieChart } from '@cascivo/charts'
98
+
99
+ // Default tooltip shows "value (pct%)" in the slice color; pass tooltipFormat to override.
100
+ <PieChart data={[{id:'a',label:'A',value:60},{id:'b',label:'B',value:40}]} title="Share" />
101
+
102
+ // Empty data renders a visible "No data" placeholder (override via emptyLabel).
103
+ <PieChart data={[]} title="Share" emptyLabel="Nothing tracked yet" />
104
+ ```
105
+
106
+ ## AI context prompt
107
+
108
+ Copy this into an LLM context bar before editing this component:
109
+
110
+ ```text
111
+ I am modifying the cascivo PieChart component (chart). Pie or donut chart with hover segments and optional legend.
112
+
113
+ Architecture constraints — follow exactly:
114
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
115
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
116
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
117
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
118
+ - CSS logical properties only (RTL-safe).
119
+
120
+ PieChart is strictly bound to these tokens — use only these, do not invent token names:
121
+ --cascivo-chart-1, --cascivo-chart-2, --cascivo-chart-3, --cascivo-chart-4, --cascivo-chart-5, --cascivo-chart-6, --cascivo-chart-7, --cascivo-chart-8
122
+
123
+ Accessibility: role "img", WCAG 2.1-AA. Keep it AA.
124
+
125
+ Do not invent props, tokens, or global viewport media queries.
126
+ ```
@@ -0,0 +1,92 @@
1
+ # Polar
2
+
3
+ **Category:** chart
4
+ **Description:** A polar coordinate plot — categories around the circle, value as radius. Bars (a rose), or a polar line/area.
5
+
6
+ ## When to use
7
+
8
+ - Cyclical/directional categories where the circle is meaningful (wind, hours, months)
9
+ - A rose chart comparing a value across directions
10
+
11
+ ## When NOT to use
12
+
13
+ - Precise magnitude comparison — use BarChart
14
+ - Multi-metric profiles on shared axes — use Radar
15
+
16
+ ## Related components
17
+
18
+ - **Radar** (alternative): Use to compare several series across the same axes
19
+ - **RadialBar** (alternative): Use concentric rings for progress-to-goal
20
+
21
+ ## Accessibility rationale
22
+
23
+ Renders with role="img"; values are in the fallback table.
24
+
25
+ ## Props
26
+
27
+ | Name | Type | Required | Default | Description |
28
+ | ------------- | --------------------------- | -------- | ------- | --------------------------------------------------------- |
29
+ | `data` | `PolarDatum[]` | Yes | — | One entry per category: { label, value, color? }. |
30
+ | `title` | `string` | Yes | — | Chart title (also aria-label). |
31
+ | `description` | `string` | No | — | Supporting description text. |
32
+ | `mode` | `'bar' \| 'line' \| 'area'` | No | bar | Bars (rose), a polar line, or a filled polar area. |
33
+ | `width` | `number` | No | — | Width of the component. |
34
+ | `height` | `number` | No | 320 | Height of the component. |
35
+ | `rings` | `number` | No | 4 | Radial ring count. |
36
+ | `max` | `number` | No | — | Domain top (full radius). Defaults to the largest value. |
37
+ | `tooltip` | `boolean` | No | — | Enable hover tooltip. |
38
+ | `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
39
+ | `plain` | `boolean` | No | false | Marks only — no rings or labels. For micro/inline charts. |
40
+
41
+ ## Tokens
42
+
43
+ - `--cascivo-chart-1`
44
+ - `--cascivo-chart-2`
45
+ - `--cascivo-chart-3`
46
+ - `--cascivo-chart-4`
47
+ - `--cascivo-chart-5`
48
+ - `--cascivo-chart-6`
49
+ - `--cascivo-chart-7`
50
+ - `--cascivo-chart-8`
51
+ - `--cascivo-chart-grid`
52
+
53
+ ## Examples
54
+
55
+ ### Wind rose
56
+
57
+ ```jsx
58
+ import { Polar } from '@cascivo/charts'
59
+ ;<Polar
60
+ title="Wind by direction"
61
+ mode="bar"
62
+ tooltip
63
+ data={[
64
+ { label: 'N', value: 12 },
65
+ { label: 'E', value: 8 },
66
+ { label: 'S', value: 5 },
67
+ { label: 'W', value: 15 },
68
+ ]}
69
+ />
70
+ ```
71
+
72
+ ## AI context prompt
73
+
74
+ Copy this into an LLM context bar before editing this component:
75
+
76
+ ```text
77
+ I am modifying the cascivo Polar component (chart). A polar coordinate plot — categories around the circle, value as radius. Bars (a rose), or a polar line/area.
78
+
79
+ Architecture constraints — follow exactly:
80
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
81
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
82
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
83
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
84
+ - CSS logical properties only (RTL-safe).
85
+
86
+ Polar is strictly bound to these tokens — use only these, do not invent token names:
87
+ --cascivo-chart-1, --cascivo-chart-2, --cascivo-chart-3, --cascivo-chart-4, --cascivo-chart-5, --cascivo-chart-6, --cascivo-chart-7, --cascivo-chart-8, --cascivo-chart-grid
88
+
89
+ Accessibility: role "img", WCAG 2.1-AA, keyboard: Tab (focus chart)/ArrowLeft/ArrowRight (navigate)/Escape (clear focus). Keep it AA.
90
+
91
+ Do not invent props, tokens, or global viewport media queries.
92
+ ```
@@ -0,0 +1,81 @@
1
+ # Radar
2
+
3
+ **Category:** chart
4
+ **Description:** Radar / spider chart with polar grid rings, spokes, and multi-series polygon overlays.
5
+
6
+ ## When to use
7
+
8
+ - Comparing several entities across the same set of quantitative dimensions
9
+ - Showing a multi-attribute profile or balance at a glance
10
+
11
+ ## When NOT to use
12
+
13
+ - Precise value reading — polar axes distort comparison
14
+ - More than a few series — overlapping polygons become unreadable
15
+
16
+ ## Related components
17
+
18
+ - **BarChart** (alternative): Use when precise per-dimension comparison matters
19
+
20
+ ## Accessibility rationale
21
+
22
+ Renders with role="img" and requires a title prop for screen reader labeling.
23
+
24
+ ## Props
25
+
26
+ | Name | Type | Required | Default | Description |
27
+ | ------------- | --------------------------------------------------- | -------- | ------- | --------------------------------------------------------------------- |
28
+ | `axes` | `string[]` | Yes | — | Axis labels (one per dimension) |
29
+ | `series` | `{ id: string; label: string; values: number[] }[]` | Yes | — | One value per axis per series |
30
+ | `max` | `number` | No | — | Maximum value (defaults to data max) |
31
+ | `title` | `string` | Yes | — | Title text for the component. |
32
+ | `description` | `string` | No | — | Supporting description text. |
33
+ | `width` | `number` | No | — | Width of the component. |
34
+ | `height` | `number` | No | 320 | Height of the component. |
35
+ | `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
36
+ | `plain` | `boolean` | No | false | Marks only — no axes, grid lines, or legend. For micro/inline charts. |
37
+
38
+ ## Tokens
39
+
40
+ - `--cascivo-chart-1`
41
+ - `--cascivo-chart-2`
42
+ - `--cascivo-chart-3`
43
+ - `--cascivo-chart-4`
44
+ - `--cascivo-chart-5`
45
+ - `--cascivo-chart-6`
46
+ - `--cascivo-chart-7`
47
+ - `--cascivo-chart-8`
48
+
49
+ ## Examples
50
+
51
+ ### Basic radar chart
52
+
53
+ ```jsx
54
+ import { Radar } from '@cascivo/charts'
55
+
56
+ const axes = ['Speed','Power','Range','Efficiency','Cost']
57
+ const series = [{ id:'a', label:'Model A', values:[80,70,60,90,50] }]
58
+ <Radar axes={axes} series={series} title="Model comparison" />
59
+ ```
60
+
61
+ ## AI context prompt
62
+
63
+ Copy this into an LLM context bar before editing this component:
64
+
65
+ ```text
66
+ I am modifying the cascivo Radar component (chart). Radar / spider chart with polar grid rings, spokes, and multi-series polygon overlays.
67
+
68
+ Architecture constraints — follow exactly:
69
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
70
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
71
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
72
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
73
+ - CSS logical properties only (RTL-safe).
74
+
75
+ Radar is strictly bound to these tokens — use only these, do not invent token names:
76
+ --cascivo-chart-1, --cascivo-chart-2, --cascivo-chart-3, --cascivo-chart-4, --cascivo-chart-5, --cascivo-chart-6, --cascivo-chart-7, --cascivo-chart-8
77
+
78
+ Accessibility: role "img", WCAG 2.1-AA. Keep it AA.
79
+
80
+ Do not invent props, tokens, or global viewport media queries.
81
+ ```
@@ -0,0 +1,96 @@
1
+ # RadialBar
2
+
3
+ **Category:** chart
4
+ **Description:** Concentric radial bars (a circular gauge family) — each datum is a ring whose sweep is proportional to its value.
5
+
6
+ ## When to use
7
+
8
+ - Showing a few progress-to-goal values in a compact circular form
9
+ - A dashboard KPI cluster where each metric is a ring toward its target
10
+
11
+ ## When NOT to use
12
+
13
+ - Comparing many categories precisely — use BarChart
14
+ - Part-of-whole of a single total — use PieChart
15
+
16
+ ## Related components
17
+
18
+ - **Meter** (alternative): Use for a single value against thresholds
19
+ - **PieChart** (alternative): Use for part-of-whole proportions of one total
20
+
21
+ ## Accessibility rationale
22
+
23
+ Renders with role="img" and requires a title prop for screen reader labeling.
24
+
25
+ ## Props
26
+
27
+ | Name | Type | Required | Default | Description |
28
+ | ------------- | ------------------ | -------- | ------- | ------------------------------------------------------------------------------ |
29
+ | `data` | `RadialBarDatum[]` | Yes | — | One ring per datum: { id, label, value, color? }. |
30
+ | `title` | `string` | Yes | — | Chart title (also used as aria-label). |
31
+ | `description` | `string` | No | — | Subtitle below the title. |
32
+ | `size` | `number` | No | — | Square shorthand (width === height). Explicit width/height win. |
33
+ | `width` | `number` | No | — | Width of the component. |
34
+ | `height` | `number` | No | 300 | Height of the component. |
35
+ | `max` | `number` | No | — | Domain top — the value a full sweep represents. Defaults to the largest datum. |
36
+ | `sweep` | `number` | No | 270 | Sweep angle in degrees (270 = a gauge arc; 360 = a full ring). |
37
+ | `centerValue` | `string` | No | — | Text in the hole. |
38
+ | `centerLabel` | `string` | No | — | Caption below centerValue. |
39
+ | `centerSlot` | `ReactNode` | No | — | Arbitrary hole content; wins over centerValue/centerLabel. |
40
+ | `tooltip` | `boolean` | No | — | Enable hover tooltip. |
41
+ | `legend` | `boolean` | No | — | Show ring legend. |
42
+ | `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
43
+ | `plain` | `boolean` | No | false | Marks only — no legend. For micro/inline charts. |
44
+
45
+ ## Tokens
46
+
47
+ - `--cascivo-chart-1`
48
+ - `--cascivo-chart-2`
49
+ - `--cascivo-chart-3`
50
+ - `--cascivo-chart-4`
51
+ - `--cascivo-chart-5`
52
+ - `--cascivo-chart-6`
53
+ - `--cascivo-chart-7`
54
+ - `--cascivo-chart-8`
55
+ - `--cascivo-chart-grid`
56
+
57
+ ## Examples
58
+
59
+ ### Goal progress rings
60
+
61
+ ```jsx
62
+ import { RadialBar } from '@cascivo/charts'
63
+ ;<RadialBar
64
+ title="Quarterly goals"
65
+ max={100}
66
+ centerValue="72%"
67
+ centerLabel="On track"
68
+ data={[
69
+ { id: 'rev', label: 'Revenue', value: 84 },
70
+ { id: 'nps', label: 'NPS', value: 61 },
71
+ { id: 'ret', label: 'Retention', value: 72 },
72
+ ]}
73
+ />
74
+ ```
75
+
76
+ ## AI context prompt
77
+
78
+ Copy this into an LLM context bar before editing this component:
79
+
80
+ ```text
81
+ I am modifying the cascivo RadialBar component (chart). Concentric radial bars (a circular gauge family) — each datum is a ring whose sweep is proportional to its value.
82
+
83
+ Architecture constraints — follow exactly:
84
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
85
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
86
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
87
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
88
+ - CSS logical properties only (RTL-safe).
89
+
90
+ RadialBar is strictly bound to these tokens — use only these, do not invent token names:
91
+ --cascivo-chart-1, --cascivo-chart-2, --cascivo-chart-3, --cascivo-chart-4, --cascivo-chart-5, --cascivo-chart-6, --cascivo-chart-7, --cascivo-chart-8, --cascivo-chart-grid
92
+
93
+ Accessibility: role "img", WCAG 2.1-AA, keyboard: Tab (focus chart)/ArrowLeft/ArrowRight (navigate rings)/Escape (clear focus). Keep it AA.
94
+
95
+ Do not invent props, tokens, or global viewport media queries.
96
+ ```
@@ -0,0 +1,89 @@
1
+ # Sankey
2
+
3
+ **Category:** chart
4
+ **Description:** Flow diagram — ranked nodes connected by throughput-sized link ribbons.
5
+
6
+ ## When to use
7
+
8
+ - Showing flow/throughput between stages or categories
9
+ - Visualizing where volume splits and merges
10
+
11
+ ## When NOT to use
12
+
13
+ - Strict ordered stages with one path — use Funnel
14
+ - Arbitrary node/edge graphs — use @cascivo/flow
15
+
16
+ ## Related components
17
+
18
+ - **Funnel** (alternative): Use for a single decreasing path
19
+
20
+ ## Accessibility rationale
21
+
22
+ Renders role="img" with a title and a fallback from/to/value table.
23
+
24
+ ## Props
25
+
26
+ | Name | Type | Required | Default | Description |
27
+ | ------------- | -------------- | -------- | ------- | ---------------------------------------------------------- |
28
+ | `nodes` | `SankeyNode[]` | Yes | — | Nodes: { id, label, color? }. |
29
+ | `links` | `SankeyLink[]` | Yes | — | Links: { source, target, value }. |
30
+ | `title` | `string` | Yes | — | Title text for the component. |
31
+ | `description` | `string` | No | — | Supporting description text. |
32
+ | `width` | `number` | No | — | Width of the component. |
33
+ | `height` | `number` | No | 320 | Height of the component. |
34
+ | `tooltip` | `boolean` | No | — | Whether to show tooltips on hover. |
35
+ | `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
36
+ | `plain` | `boolean` | No | false | When true, renders a minimal variant without chart chrome. |
37
+
38
+ ## Tokens
39
+
40
+ - `--cascivo-chart-1`
41
+ - `--cascivo-chart-2`
42
+ - `--cascivo-chart-3`
43
+ - `--cascivo-chart-4`
44
+ - `--cascivo-chart-5`
45
+ - `--cascivo-chart-6`
46
+ - `--cascivo-chart-7`
47
+ - `--cascivo-chart-8`
48
+
49
+ ## Examples
50
+
51
+ ### Sankey flow
52
+
53
+ ```jsx
54
+ import { Sankey } from '@cascivo/charts'
55
+ ;<Sankey
56
+ title="Traffic flow"
57
+ nodes={[
58
+ { id: 'a', label: 'Search' },
59
+ { id: 'b', label: 'Home' },
60
+ { id: 'c', label: 'Signup' },
61
+ ]}
62
+ links={[
63
+ { source: 'a', target: 'b', value: 30 },
64
+ { source: 'b', target: 'c', value: 12 },
65
+ ]}
66
+ />
67
+ ```
68
+
69
+ ## AI context prompt
70
+
71
+ Copy this into an LLM context bar before editing this component:
72
+
73
+ ```text
74
+ I am modifying the cascivo Sankey component (chart). Flow diagram — ranked nodes connected by throughput-sized link ribbons.
75
+
76
+ Architecture constraints — follow exactly:
77
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
78
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
79
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
80
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
81
+ - CSS logical properties only (RTL-safe).
82
+
83
+ Sankey is strictly bound to these tokens — use only these, do not invent token names:
84
+ --cascivo-chart-1, --cascivo-chart-2, --cascivo-chart-3, --cascivo-chart-4, --cascivo-chart-5, --cascivo-chart-6, --cascivo-chart-7, --cascivo-chart-8
85
+
86
+ Accessibility: role "img", WCAG 2.1-AA, keyboard: Tab (focus chart)/ArrowLeft/ArrowRight (navigate nodes)/Escape (clear focus). Keep it AA.
87
+
88
+ Do not invent props, tokens, or global viewport media queries.
89
+ ```
@@ -0,0 +1,90 @@
1
+ # ScatterChart
2
+
3
+ **Category:** chart
4
+ **Description:** Scatter plot with variable point radius, multi-series, and hover tooltip.
5
+
6
+ ## When to use
7
+
8
+ - Revealing correlation or clustering between two numeric variables
9
+ - Plotting many individual observations across a 2D space
10
+
11
+ ## When NOT to use
12
+
13
+ - Encoding a third magnitude dimension — use BubbleChart
14
+ - Showing a trend over ordered time — use LineChart
15
+
16
+ ## Related components
17
+
18
+ - **BubbleChart** (alternative): Use when a third size dimension must be encoded
19
+ - **LineChart** (alternative): Use when points form an ordered trend over time
20
+
21
+ ## Accessibility rationale
22
+
23
+ Renders with role="img" and requires a title prop for screen reader labeling.
24
+
25
+ ## Props
26
+
27
+ | Name | Type | Required | Default | Description |
28
+ | ------------- | --------------------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | `series` | `ScatterChartSeries[]` | Yes | — | The data series to plot. |
30
+ | `title` | `string` | Yes | — | Title text for the component. |
31
+ | `description` | `string` | No | — | Supporting description text. |
32
+ | `r` | `number \| ((d: ScatterDatum) => number)` | No | 4 | Point radius or accessor |
33
+ | `width` | `number` | No | — | Width of the component. |
34
+ | `height` | `number` | No | 300 | Height of the component. |
35
+ | `xTicks` | `number` | No | 5 | Approximate number of ticks on the x-axis. |
36
+ | `yTicks` | `number` | No | 5 | Approximate number of ticks on the y-axis. |
37
+ | `legend` | `boolean` | No | — | Whether to show the legend. |
38
+ | `tooltip` | `boolean` | No | — | Enable hover/keyboard tooltip |
39
+ | `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
40
+ | `plain` | `boolean` | No | false | Marks only — no axes, grid lines, or legend. For micro/inline charts. |
41
+ | `annotations` | `Annotation[]` | No | — | Reference lines, shaded bands, and markers drawn over the plot (e.g. a target/threshold line). |
42
+ | `onSelect` | `(point: ChartPoint) => void` | No | — | Fired when a point is clicked or activated (Enter/Space) — for drill-down. |
43
+ | `glyph` | `GlyphShape \| ((d, seriesId) => GlyphShape)` | No | — | Point glyph shape (circle/square/diamond/triangle/cross/star) — a fixed shape or a function to encode a category by shape. |
44
+ | `renderer` | `'svg' \| 'canvas' \| 'auto'` | No | svg | Renderer — svg (default), canvas (force), or auto (canvas past ~2000 points). Canvas keeps the full a11y fallback table + keyboard layer. |
45
+ | `visualMap` | `VisualMapOptions` | No | — | Map each point’s y → CVD-safe colour and/or size via a keyboard-operable legend that filters the visible range. |
46
+ | `toolbox` | `boolean \| ToolboxOptions` | No | — | Render a keyboard-reachable toolbox — PNG/SVG export, a data-view table toggle, and restore (reset the visualMap filter). |
47
+
48
+ ## Tokens
49
+
50
+ - `--cascivo-chart-1`
51
+ - `--cascivo-chart-2`
52
+ - `--cascivo-chart-3`
53
+ - `--cascivo-chart-4`
54
+ - `--cascivo-chart-5`
55
+ - `--cascivo-chart-6`
56
+ - `--cascivo-chart-7`
57
+ - `--cascivo-chart-8`
58
+
59
+ ## Examples
60
+
61
+ ### Basic scatter chart
62
+
63
+ ```jsx
64
+ import { ScatterChart } from '@cascivo/charts'
65
+
66
+ const series = [{ id: 'a', label: 'Group A', data: [{x:1,y:2},{x:3,y:4}] }]
67
+ <ScatterChart series={series} title="Scatter" />
68
+ ```
69
+
70
+ ## AI context prompt
71
+
72
+ Copy this into an LLM context bar before editing this component:
73
+
74
+ ```text
75
+ I am modifying the cascivo ScatterChart component (chart). Scatter plot with variable point radius, multi-series, and hover tooltip.
76
+
77
+ Architecture constraints — follow exactly:
78
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
79
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
80
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
81
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
82
+ - CSS logical properties only (RTL-safe).
83
+
84
+ ScatterChart is strictly bound to these tokens — use only these, do not invent token names:
85
+ --cascivo-chart-1, --cascivo-chart-2, --cascivo-chart-3, --cascivo-chart-4, --cascivo-chart-5, --cascivo-chart-6, --cascivo-chart-7, --cascivo-chart-8
86
+
87
+ Accessibility: role "img", WCAG 2.1-AA, keyboard: Tab (focus chart)/ArrowLeft/ArrowRight (navigate points)/Home/End (first/last point)/Escape (clear focus). Keep it AA.
88
+
89
+ Do not invent props, tokens, or global viewport media queries.
90
+ ```