@graphysdk/react 2.0.0-beta.1786440210947 → 2.0.0-beta.1787253424098

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,17 +1,19 @@
1
1
  # @graphysdk/react
2
2
 
3
- The recommended, batteries-included React entry point for Graphy.
3
+ The Graphy charting SDK for React. Build a chart spec and render it from one package. The "Powered by Graphy" mark is on by default.
4
4
 
5
- ## Docs
5
+ ## Install
6
6
 
7
- - [Quickstart](https://docs.graphy.dev/sdk-next/quickstart)
8
- - [Provider and renderer](https://docs.graphy.dev/sdk-next/rendering/provider-and-renderer)
7
+ ```bash
8
+ npm install @graphysdk/react
9
+ ```
10
+
11
+ Requires React 19. There is no stylesheet to import.
9
12
 
10
- It re-exports the `@graphysdk/react-renderer` surface across the same two entry points — the read-only main entry and `/editable` — with one opinionated default: the **provenance mark is shown by default**.
13
+ ## Usage
11
14
 
12
15
  ```tsx
13
- import { GraphProvider, GraphRenderer } from '@graphysdk/react';
14
- import { createSpec, pipe, geom, scale } from '@graphysdk/viz-engine';
16
+ import { GraphProvider, GraphRenderer, createSpec, pipe, geom, scale } from '@graphysdk/react';
15
17
 
16
18
  const input = pipe(createSpec({ x: 'month', y: 'revenue' }), geom.bar(), scale.x(), scale.y());
17
19
 
@@ -24,14 +26,12 @@ export function Chart({ data }) {
24
26
  }
25
27
  ```
26
28
 
27
- ## Entry points
28
-
29
- Two entries, mirroring `@graphysdk/react-renderer`'s own split:
29
+ ## Docs
30
30
 
31
- - **`@graphysdk/react`** — the read-only surface: `GraphProvider`, `GraphRenderer`, hooks, slots, theme, and types. This is where the batteries-included `GraphProvider` lives.
32
- - **`@graphysdk/react/editable`** — the editing surface: `EditableGraphRenderer`, `EditorPanel`, its sections, and the default controls. Kept separate so a read-only embed never bundles the editor or its stylesheet.
31
+ - [Quickstart](https://docs.graphy.dev/sdk-next/quickstart)
32
+ - [Provider and renderer](https://docs.graphy.dev/sdk-next/rendering/provider-and-renderer)
33
33
 
34
- The provenance default lives on `GraphProvider`, so editable mode inherits it — mount the editor inside the same provider:
34
+ ## Editable charts
35
35
 
36
36
  ```tsx
37
37
  import { GraphProvider } from '@graphysdk/react';
@@ -46,20 +46,11 @@ export function EditableChart({ data, input, isEditing }) {
46
46
  }
47
47
  ```
48
48
 
49
- ## Which package should I use?
50
-
51
- - **`@graphysdk/react` (this package)** — start here. The provenance mark is on by default; everything else is identical to the renderer.
52
- - **`@graphysdk/react-renderer`** — the neutral, unopinionated layer. The mark is **off** by default. Reach for it directly when embedding into another product or building your own opinionated wrapper.
53
-
54
- Both share the same API (same two entry points), so moving between them is a one-line import change.
55
-
56
- ## Turning the mark off
57
-
58
- The mark is a developer config flag, never a paywall. Opt out per chart with either API:
49
+ ## Hiding the mark
59
50
 
60
51
  ```tsx
61
- // Low-level spec config
62
- import { config } from '@graphysdk/viz-engine';
52
+ import { config, createSpec, geom, pipe } from '@graphysdk/react';
53
+
63
54
  const input = pipe(
64
55
  createSpec({ x: 'month', y: 'revenue' }),
65
56
  geom.bar(),
@@ -67,10 +58,17 @@ const input = pipe(
67
58
  );
68
59
  ```
69
60
 
70
- ```tsx
71
- // High-level GraphConfig API
72
- import { convertGraphConfig } from '@graphysdk/viz-engine/graph-config';
73
- const input = convertGraphConfig({ type: 'column', content: { isBrandMarkHidden: true } }, data);
74
- ```
61
+ ## Other packages
75
62
 
76
63
  An explicit setting always wins over this package's default.
64
+
65
+ ## Licence
66
+
67
+ This package is available under PolyForm Noncommercial, Small Business, or a 32-day Free Trial. Free Trial is local or internal evaluation only — it does not cover a public page. See [what you can do under the trial](https://docs.graphy.dev/licence/evaluation).
68
+
69
+ - [`@graphysdk/react-renderer`](https://www.npmjs.com/package/@graphysdk/react-renderer) — same React components, mark off by default
70
+ - [`@graphysdk/viz-engine`](https://www.npmjs.com/package/@graphysdk/viz-engine) — the engine alone, for non-React hosts
71
+
72
+ ## Support
73
+
74
+ Questions and community help: [Discord](https://discord.gg/yGmYCjkSr).
@@ -0,0 +1,3 @@
1
+ /** Viz-engine builders and types for the `@graphysdk/react` entry. */
2
+ export type { Data, Spec, SpecInput } from '@graphysdk/viz-engine';
3
+ export { annotation, config, coord, createSpec, geom, highlight, mapping, pipe, scale, stat, style, styles, token, transform, } from '@graphysdk/viz-engine';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Entry for the `dist/editable.browser.mjs` CDN bundle. A CDN page imports exactly one file, so
3
+ * unlike the npm `/editable` entry this carries the read-only surface too.
4
+ */
5
+ export * from './editable';
6
+ export * from './index';