@particle-academy/fancy-echarts 4.0.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -5
  2. package/package.json +14 -7
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @particle-academy/fancy-echarts
2
2
 
3
+ [![Fancified](art/fancified.svg)](https://particle.academy)
4
+
3
5
  Typed React wrapper around [Apache ECharts](https://echarts.apache.org/) — every chart type from a single `<EChart>` component, lazy module registration, four built-in themes.
4
6
 
5
7
  > **Breaking change in 4.0** — the hand-rolled diagram subsystem (`<Diagram>`, `<DataDiagram>`, `<OrgChart>`, `<Mindmap>`, `<Flowchart>` and their types) is removed. ECharts and react-flow each own their domain: charts here, node-edge graphs in [`@particle-academy/fancy-flow`](https://github.com/Particle-Academy/fancy-flow). If you used the diagram presets, migrate to fancy-flow — its `<FlowEditor>` + `defineNode` + `<NodePort>` covers org charts, flowcharts, ERDs, and mindmaps cleanly. Real Sankey / sunburst / radial visualizations stay here as proper ECharts series.
@@ -87,12 +89,12 @@ This is consumer responsibility — the wrapper does not introspect `option` to
87
89
 
88
90
  `fancy-echarts` is a thin wrapper — every interaction surface is reachable through `onEvents`, `useECharts().instance`, and `tooltip.formatter`. These recipes cover the patterns that hold up across charts.
89
91
 
90
- ### Wrap any chart with a Popover, ContextMenu, and Action button
92
+ ### Wrap any chart with a Popover, ContextMenu, and Button
91
93
 
92
94
  The pattern that scales: a single `ChartFrame` wrapper that gives every chart an info popover next to the title, action buttons in the header, and a right-click context menu on the body. Build it once, reuse for every chart type:
93
95
 
94
96
  ```tsx
95
- import { Card, Popover, Action, Badge, ContextMenu, Icon, useToast } from "@particle-academy/react-fancy";
97
+ import { Card, Popover, Button, Badge, ContextMenu, Icon, useToast } from "@particle-academy/react-fancy";
96
98
 
97
99
  function ChartFrame({ title, info, actions = [], onExport, extraMenu, children }) {
98
100
  const { toast } = useToast();
@@ -112,7 +114,7 @@ function ChartFrame({ title, info, actions = [], onExport, extraMenu, children }
112
114
  </Popover>
113
115
  </div>
114
116
  <div className="flex gap-2">
115
- {actions.map((a) => <Action key={a.label} size="sm" onClick={a.onClick}>{a.label}</Action>)}
117
+ {actions.map((a) => <Button key={a.label} size="sm" onClick={a.onClick}>{a.label}</Button>)}
116
118
  </div>
117
119
  </div>
118
120
  </Card.Header>
@@ -241,9 +243,9 @@ Pass `theme="dark-preset"` (after `registerBuiltinThemes()`) or `theme="light"`
241
243
  ```tsx
242
244
  const [theme, setTheme] = useState<"light" | "dark-preset">("light");
243
245
 
244
- <Action onClick={() => setTheme((t) => t === "light" ? "dark-preset" : "light")}>
246
+ <Button onClick={() => setTheme((t) => t === "light" ? "dark-preset" : "light")}>
245
247
  Toggle theme
246
- </Action>
248
+ </Button>
247
249
  <EChart theme={theme} option={option} />
248
250
  ```
249
251
 
@@ -432,3 +434,9 @@ registerBuiltinThemes(); // Registers "dark-preset", "vintage", "pastel"
432
434
  ## License
433
435
 
434
436
  MIT
437
+
438
+ ---
439
+
440
+ ## ⭐ Star Fancy UI
441
+
442
+ If this package is useful to you, a quick ⭐ on the repo really helps us build a better kit. Thank you!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-academy/fancy-echarts",
3
- "version": "4.0.1",
3
+ "version": "5.0.0",
4
4
  "description": "Typed React wrapper around Apache ECharts — every chart type from a single <EChart> component, lazy module registration, four built-in themes. Diagram subsystem removed in 4.0; node-edge graphs live in @particle-academy/fancy-flow now.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,10 +44,10 @@
44
44
  "components"
45
45
  ],
46
46
  "peerDependencies": {
47
+ "echarts": "^6.1.0",
48
+ "echarts-gl": "^2.1.0",
47
49
  "react": "^18.0.0 || ^19.0.0",
48
- "react-dom": "^18.0.0 || ^19.0.0",
49
- "echarts": "^5.5.0",
50
- "echarts-gl": "^2.0.0"
50
+ "react-dom": "^18.0.0 || ^19.0.0"
51
51
  },
52
52
  "peerDependenciesMeta": {
53
53
  "echarts-gl": {
@@ -57,8 +57,8 @@
57
57
  "devDependencies": {
58
58
  "@types/react": "^19.0.0",
59
59
  "@types/react-dom": "^19.0.0",
60
- "echarts": "^5.6.0",
61
- "echarts-gl": "^2.0.9",
60
+ "echarts": "^6.1.0",
61
+ "echarts-gl": "^2.1.0",
62
62
  "react": "^19.0.0",
63
63
  "react-dom": "^19.0.0",
64
64
  "tsup": "^8.5.0",
@@ -67,5 +67,12 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "license": "MIT"
70
+ "license": "MIT",
71
+ "overrides": {
72
+ "esbuild": "^0.28.1",
73
+ "picomatch": "^4.0.4",
74
+ "postcss": "^8.5.10",
75
+ "react-router": "^7.15.1",
76
+ "vite": "^6.4.2"
77
+ }
71
78
  }