@thesage/charts 0.1.1 → 0.1.2

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @thesage/charts@0.1.1 build /home/runner/work/ecosystem/ecosystem/packages/charts
2
+ > @thesage/charts@0.1.2 build /home/runner/work/ecosystem/ecosystem/packages/charts
3
3
  > tsup src/index.ts --format cjs,esm --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  CJS Build start
12
12
  ESM Build start
13
- CJS dist/index.js 4.97 KB
14
- CJS dist/index.js.map 17.17 KB
15
- CJS ⚡️ Build success in 42ms
16
13
  ESM dist/index.mjs 4.07 KB
17
14
  ESM dist/index.mjs.map 17.02 KB
18
- ESM ⚡️ Build success in 44ms
15
+ ESM ⚡️ Build success in 60ms
16
+ CJS dist/index.js 4.97 KB
17
+ CJS dist/index.js.map 17.17 KB
18
+ CJS ⚡️ Build success in 64ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 5281ms
20
+ DTS ⚡️ Build success in 6218ms
21
21
  DTS dist/index.d.ts 2.31 KB
22
22
  DTS dist/index.d.mts 2.31 KB
package/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # @thesage/charts
2
2
 
3
- ## 0.1.1
3
+ ## 0.1.2 - 2026-01-28
4
+
5
+ ### Patch Changes
6
+
7
+ - 90e78f4: docs: add standard README.md with installation and usage instructions
8
+
9
+ ## 0.1.1 - 2026-01-28
4
10
 
5
11
  ### Patch Changes
6
12
 
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+ # Sage Charts (@thesage/charts)
2
+
3
+ <div align="center">
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@thesage/charts?color=indigo&style=flat-square)](https://www.npmjs.com/package/@thesage/charts)
6
+ [![License](https://img.shields.io/npm/l/@thesage/charts?color=blue&style=flat-square)](https://github.com/shalomormsby/ecosystem/blob/main/LICENSE)
7
+
8
+ **Beautiful, responsive charts for Sage UI.**
9
+
10
+ [Documentation](https://thesage.dev) • [GitHub](https://github.com/shalomormsby/ecosystem)
11
+
12
+ </div>
13
+
14
+ ---
15
+
16
+ **Sage Charts** is a high-level wrapper around **Recharts**, configured to integrate seamlessly with the Sage UI design tokens. It provides a standardized `ChartContainer` API that handles theming (colors, fonts, tooltips) automatically, making data visualization beautiful by default.
17
+
18
+ ## ✨ Features
19
+
20
+ - **🎨 Theme Aware**: Automatically picks up Sage UI colors (charts 1-5).
21
+ - **🌗 Mode Ready**: Adapts seamlessly to light and dark modes.
22
+ - **🛠️ Configurable**: Simple configuration object for labels and icons.
23
+ - **🧩 Recharts Power**: Full access to the underlying Recharts primitives.
24
+
25
+ ## 🚀 Installation
26
+
27
+ Install the package and its peer dependencies.
28
+
29
+ ```bash
30
+ pnpm add @thesage/charts recharts
31
+ ```
32
+
33
+ ### ⚠️ React 19 Compatibility Note
34
+ If you are using **React 19**, you may need to add an override for `react-is` to ensure compatibility with Recharts versions prior to explicit React 19 support.
35
+
36
+ In your `package.json`:
37
+ ```json
38
+ "pnpm": {
39
+ "overrides": {
40
+ "react-is": "^19.0.0-rc"
41
+ }
42
+ }
43
+ ```
44
+
45
+ ## 💻 Usage
46
+
47
+ Sage Charts uses a `ChartContainer` to wrap standard Recharts components.
48
+
49
+ ```tsx
50
+ import { Bar, BarChart, CartesianGrid, XAxis } from "recharts"
51
+ import { ChartContainer, ChartTooltip, ChartTooltipContent } from "@thesage/charts"
52
+
53
+ // Define your config (labels and colors)
54
+ const chartConfig = {
55
+ desktop: {
56
+ label: "Desktop",
57
+ color: "hsl(var(--chart-1))",
58
+ },
59
+ mobile: {
60
+ label: "Mobile",
61
+ color: "hsl(var(--chart-2))",
62
+ },
63
+ }
64
+
65
+ export function MyChart() {
66
+ const chartData = [
67
+ { month: "January", desktop: 186, mobile: 80 },
68
+ { month: "February", desktop: 305, mobile: 200 },
69
+ ]
70
+
71
+ return (
72
+ <ChartContainer config={chartConfig} className="min-h-[200px] w-full">
73
+ <BarChart data={chartData}>
74
+ <CartesianGrid vertical={false} />
75
+ <XAxis dataKey="month" />
76
+ <ChartTooltip content={<ChartTooltipContent />} />
77
+ <Bar dataKey="desktop" fill="var(--color-desktop)" radius={4} />
78
+ <Bar dataKey="mobile" fill="var(--color-mobile)" radius={4} />
79
+ </BarChart>
80
+ </ChartContainer>
81
+ )
82
+ }
83
+ ```
84
+
85
+ ## 📄 License
86
+
87
+ MIT © [Shalom Ormsby](https://github.com/shalomormsby)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thesage/charts",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -23,7 +23,7 @@
23
23
  "@types/react": "^18.3.3",
24
24
  "tsup": "^8.0.0",
25
25
  "typescript": "^5.0.0",
26
- "@thesage/config": "0.0.2"
26
+ "@thesage/config": "0.0.3"
27
27
  },
28
28
  "dependencies": {
29
29
  "clsx": "^2.1.1",