@particle-academy/fancy-echarts 3.0.1 → 4.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.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @particle-academy/fancy-echarts
2
2
 
3
- React component library wrapping [Apache ECharts](https://echarts.apache.org/) with typed components for every chart type 2D, 3D, and graphic layers.
3
+ 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
+
5
+ > **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.
4
6
 
5
7
  ## Installation
6
8
 
@@ -261,6 +263,24 @@ import { DataDiagram, Flowchart, Mindmap, OrgChart } from "@particle-academy/fan
261
263
 
262
264
  See [docs/Diagram.md](docs/Diagram.md) for schemas, props, and layout details.
263
265
 
266
+ ## Inertia.js integration
267
+
268
+ If your app uses Inertia, install [`@particle-academy/fancy-inertia`](https://github.com/Particle-Academy/fancy-inertia). Three things to know:
269
+
270
+ 1. **`<FancyAppRoot withECharts>`** auto-calls `registerAll()` and `registerBuiltinThemes()` on the client only — drop it once at app entry and every page below it has charts ready.
271
+ 2. **SSR**: every fancy-echarts component (`<EChart>`, `<EChart3D>`, `<EChartGraphic>`, and the diagram presets) needs `window` to initialize. Wrap in `<FancyClientOnly>` if Inertia SSR is enabled.
272
+ 3. **Schema mode**: pass `withECharts: true` to `registerFancyComponents()` and your fancy-screens schemas can reference `EChart`, `DataDiagram`, `Flowchart`, `Mindmap`, `OrgChart` by name from server-supplied JSON.
273
+
274
+ ```tsx
275
+ import { FancyAppRoot, FancyClientOnly } from "@particle-academy/fancy-inertia";
276
+
277
+ <FancyAppRoot withECharts>
278
+ <FancyClientOnly fallback={<div className="h-80 animate-pulse rounded bg-zinc-100" />}>
279
+ <EChart option={option} />
280
+ </FancyClientOnly>
281
+ </FancyAppRoot>
282
+ ```
283
+
264
284
  ## Documentation
265
285
 
266
286
  Full component documentation is available in the [docs/](docs/) folder: