@sheetwrite/react 0.4.0 → 0.5.1

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
@@ -61,6 +61,12 @@ replace the grid. Live inputs are `theme`, `readOnly`, `config`, `overscan`, and
61
61
 
62
62
  `ref` receives the current `Grid` before `onReady({ grid, generation, reason })` runs and clears on replacement or unmount. Reasons are `initial`, `input-reset`, and `renderer-reset`.
63
63
 
64
+ Readiness observes the latest committed live options. A throwing ref or ready
65
+ callback retires the new Grid; consumer errors are not initialization failures.
66
+ Omitted `renderer` and `"canvas"` are equivalent. Changing an explicit
67
+ `wasmSource` after readiness preserves the Grid and retains the loader's
68
+ first-source warning.
69
+
64
70
  Grid events use collision-free names: `onGridChange`, `onViewportChange`, `onSelectionChange`, `onEditBegin`, `onEditCommit`, `onSearch`, `onCommandStateChange`, `onActiveSheetChange`, `onMutationRejected`, `onRendererFallback`, `onDatasourceError`, and `onExportError`. Native host `onChange` and `onScroll` remain ordinary DOM handlers.
65
71
 
66
72
  For vanilla/preload control, import `initSheetwrite()` and `createGrid()` from `@sheetwrite/core`. See [installation](https://sheetwrite.vercel.app/docs/start/installation/), [React integration](https://sheetwrite.vercel.app/docs/frameworks/react/), and [collaboration](https://sheetwrite.vercel.app/docs/guides/collaboration/).
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type CellScalar, type Grid, type GridOptions } from "@sheetwrite/core";
1
+ import type { CellScalar, Grid, GridOptions } from "@sheetwrite/core";
2
2
  import { createSimpleRowBridge, type GridAdapterEventHandlers, type GridSizeProps, type RowBridge, type RowBridgeHandler, type RowBridgeId, type SheetwriteInitializationProps, type SimpleColumn } from "@sheetwrite/core/adapter";
3
3
  import { type CSSProperties, type ForwardedRef, type HTMLAttributes, type ReactElement, type ReactNode } from "react";
4
4
  type GridAdapterEventHandlerName = "onGridChange" | "onRowDelta" | "onSelectionChange" | "onViewportChange" | "onEditBegin" | "onEditCommit" | "onSearch" | "onCommandStateChange" | "onActiveSheetChange" | "onMutationRejected" | "onRendererFallback" | "onDatasourceError" | "onExportError" | "onReady" | "onInitializationError";
@@ -32,7 +32,21 @@ export interface SheetwriteGridProps<Id extends RowBridgeId = RowBridgeId> exten
32
32
  /** Fills the parent's available width and height, taking precedence over `height`. */
33
33
  fill?: true;
34
34
  }
35
- /** Advanced framework component with inferred row-bridge identity. */
35
+ /**
36
+ * Advanced framework component with inferred row-bridge identity.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * import { SheetwriteGrid } from "@sheetwrite/react";
41
+ * import type { Workbook } from "@sheetwrite/core";
42
+ *
43
+ * export function WorkbookView({ workbook }: { workbook: Workbook }) {
44
+ * return <SheetwriteGrid workbook={workbook} height={400} />;
45
+ * }
46
+ * ```
47
+ * @see Sheetwrite
48
+ * @see /docs/frameworks/react/
49
+ */
36
50
  export declare const SheetwriteGrid: <Id extends RowBridgeId = RowBridgeId>(props: SheetwriteGridProps<Id> & {
37
51
  ref?: ForwardedRef<Grid>;
38
52
  }) => ReactElement;
@@ -54,6 +68,21 @@ export type SheetwriteProps<Row extends Record<string, CellScalar>, Id extends R
54
68
  * `columns`, `defaultRows`, and `sheetName`, initializes Sheetwrite, and owns the `Grid`
55
69
  * through prop-driven resets and unmount cleanup. Pass a `ref` to access the live `Grid`;
56
70
  * use `SheetwriteGrid` when the host already owns a workbook or datasource.
71
+ *
72
+ * @example
73
+ * ```tsx
74
+ * import { Sheetwrite } from "@sheetwrite/react";
75
+ *
76
+ * export function Sales() {
77
+ * return <Sheetwrite
78
+ * columns={[{ key: "amount", title: "Amount", type: "number" }]}
79
+ * defaultRows={[{ amount: 12 }, { amount: 18 }]}
80
+ * height={400}
81
+ * />;
82
+ * }
83
+ * ```
84
+ * @see SheetwriteGrid
85
+ * @see /docs/frameworks/react/
57
86
  */
58
87
  export declare const Sheetwrite: <Row extends Record<string, CellScalar>, Id extends RowBridgeId = RowBridgeId>(props: SheetwriteProps<Row, Id> & {
59
88
  /** Receives the live Grid after readiness and `null` on reset or unmount. */
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { initSheetwrite, isSheetwriteReady, } from "@sheetwrite/core";
3
- import { createGridController, createSimpleGridInput, createSimpleRowBridge, getGridResetReason, gridSizeStyle, } from "@sheetwrite/core/adapter";
2
+ import { createAdapterGridController, createSimpleGridInput, createSimpleRowBridge, extractGridOptions, gridSizeStyle, } from "@sheetwrite/core/adapter";
4
3
  import { forwardRef, useEffect, useLayoutEffect, useMemo, useRef, useState, } from "react";
5
4
  const useCommitLayoutEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
6
5
  function publishGrid(ref, grid) {
@@ -14,20 +13,9 @@ const SheetwriteGridComponent = forwardRef(function SheetwriteGrid(props, ref) {
14
13
  const { className, style, fallback, wasmSource, onInitializationError, onGridChange, onRowDelta, onSelectionChange, onViewportChange, onEditBegin, onEditCommit, onSearch, onCommandStateChange, onActiveSheetChange, onMutationRejected, onRendererFallback, onDatasourceError, onExportError, onReady, rowBridge, workbook, data, datasource, datasourceStorage, renderer, workerUrl, presentation, theme, readOnly, protectionResolver, mutationPolicy, transactionResourceLimits, hyperlinkActivation, renderers, editors, overscan, minColumns, config, height, fill, ...hostAttributes } = props;
15
14
  const hostRef = useRef(null);
16
15
  const controllerRef = useRef(null);
16
+ const currentGrid = useRef(null);
17
17
  const publishedRef = useRef(null);
18
- const generationRef = useRef(0);
19
- const initializedRef = useRef(isSheetwriteReady());
20
- const mountedRef = useRef(false);
21
- const [initializationState, setInitializationState] = useState(initializedRef.current ? "ready" : "loading");
22
- const previousOptionsRef = useRef(null);
23
- const liveOptionsRef = useRef({
24
- theme,
25
- readOnly,
26
- overscan,
27
- minColumns,
28
- config,
29
- });
30
- liveOptionsRef.current = { theme, readOnly, overscan, minColumns, config };
18
+ const [initializationState, setInitializationState] = useState("loading");
31
19
  const handlers = useRef(null);
32
20
  useCommitLayoutEffect(() => {
33
21
  const committedHandlers = {
@@ -74,7 +62,7 @@ const SheetwriteGridComponent = forwardRef(function SheetwriteGrid(props, ref) {
74
62
  if (previous && previous !== ref)
75
63
  publishGrid(previous, null);
76
64
  publishedRef.current = ref;
77
- publishGrid(ref, controllerRef.current?.grid ?? null);
65
+ publishGrid(ref, currentGrid.current);
78
66
  return () => {
79
67
  if (publishedRef.current !== ref)
80
68
  return;
@@ -82,157 +70,76 @@ const SheetwriteGridComponent = forwardRef(function SheetwriteGrid(props, ref) {
82
70
  publishedRef.current = null;
83
71
  };
84
72
  }, [ref]);
85
- useEffect(() => {
86
- mountedRef.current = true;
87
- return () => {
88
- mountedRef.current = false;
89
- };
90
- }, []);
91
- useEffect(() => {
92
- let current = true;
93
- if (isSheetwriteReady()) {
94
- initializedRef.current = true;
95
- setInitializationState("ready");
96
- return;
97
- }
98
- setInitializationState("loading");
99
- void initSheetwrite(wasmSource).then(() => {
100
- if (!mountedRef.current || !isSheetwriteReady())
101
- return;
102
- initializedRef.current = true;
103
- setInitializationState("ready");
104
- }, (error) => {
105
- if (!current || !mountedRef.current)
106
- return;
107
- initializedRef.current = false;
108
- setInitializationState("error");
109
- handlers.current?.onInitializationError?.(error);
110
- });
111
- return () => {
112
- current = false;
113
- };
114
- }, [wasmSource]);
115
- useEffect(() => {
116
- if (initializationState !== "ready")
117
- return;
118
- const host = hostRef.current;
119
- if (!host)
120
- return;
121
- const options = {
122
- workbook,
123
- data,
124
- datasource,
125
- datasourceStorage,
126
- renderer,
127
- workerUrl,
128
- presentation,
129
- renderers,
130
- editors,
131
- protectionResolver,
132
- mutationPolicy,
133
- transactionResourceLimits,
134
- hyperlinkActivation,
135
- ...liveOptionsRef.current,
136
- };
137
- const previousOptions = previousOptionsRef.current;
138
- const reason = generationRef.current === 0
139
- ? "initial"
140
- : ((previousOptions && getGridResetReason(previousOptions, options)) ?? "input-reset");
141
- const controller = createGridController(host, options, {
73
+ if (!controllerRef.current) {
74
+ const forwardCommandStateChange = (event) => handlers.current?.onCommandStateChange?.(event);
75
+ controllerRef.current = createAdapterGridController({
142
76
  onGridChange: (event) => handlers.current?.onGridChange?.(event),
143
- onRowDelta: (projection) => handlers.current?.onRowDelta?.(projection),
144
- onSelectionChange: (selection) => handlers.current?.onSelectionChange?.(selection),
77
+ onRowDelta: (event) => handlers.current?.onRowDelta?.(event),
78
+ onSelectionChange: (event) => handlers.current?.onSelectionChange?.(event),
145
79
  onViewportChange: (event) => handlers.current?.onViewportChange?.(event),
146
80
  onEditBegin: (event) => handlers.current?.onEditBegin?.(event),
147
81
  onEditCommit: (event) => handlers.current?.onEditCommit?.(event),
148
- onSearch: (result) => handlers.current?.onSearch?.(result),
149
- onCommandStateChange: (event) => handlers.current?.onCommandStateChange?.(event),
82
+ onSearch: (event) => handlers.current?.onSearch?.(event),
83
+ get onCommandStateChange() {
84
+ return handlers.current?.onCommandStateChange ? forwardCommandStateChange : undefined;
85
+ },
150
86
  onActiveSheetChange: (event) => handlers.current?.onActiveSheetChange?.(event),
151
87
  onMutationRejected: (event) => handlers.current?.onMutationRejected?.(event),
152
88
  onRendererFallback: (event) => handlers.current?.onRendererFallback?.(event),
153
89
  onDatasourceError: (event) => handlers.current?.onDatasourceError?.(event),
154
90
  onExportError: (event) => handlers.current?.onExportError?.(event),
155
- }, rowBridge);
156
- controllerRef.current = controller;
157
- generationRef.current += 1;
158
- let destroyed = false;
159
- const teardown = (detachPublishedRef = false) => {
160
- if (destroyed)
161
- return;
162
- destroyed = true;
163
- if (controllerRef.current === controller)
164
- controllerRef.current = null;
165
- const published = publishedRef.current;
166
- let cleanupError;
167
- let cleanupFailed = false;
168
- try {
169
- publishGrid(published, null);
170
- }
171
- catch (error) {
172
- cleanupError = error;
173
- cleanupFailed = true;
174
- }
175
- if (detachPublishedRef && publishedRef.current === published)
176
- publishedRef.current = null;
177
- try {
178
- controller.destroy();
179
- }
180
- catch (error) {
181
- cleanupError = cleanupFailed
182
- ? new AggregateError([cleanupError, error], "Sheetwrite React controller cleanup failed")
183
- : error;
184
- cleanupFailed = true;
185
- }
186
- if (cleanupFailed)
187
- throw cleanupError;
188
- };
189
- try {
190
- publishGrid(publishedRef.current, controller.grid);
191
- handlers.current?.onReady?.({
192
- grid: controller.grid,
193
- generation: generationRef.current,
194
- reason,
195
- });
196
- previousOptionsRef.current = options;
197
- }
198
- catch (error) {
199
- try {
200
- teardown(true);
201
- }
202
- catch (cleanupError) {
203
- throw new AggregateError([error, cleanupError], "Sheetwrite React controller creation and cleanup failed");
204
- }
205
- throw error;
206
- }
207
- return teardown;
208
- }, [
209
- initializationState,
210
- workbook,
211
- data,
212
- datasource,
213
- datasourceStorage,
214
- renderer,
215
- workerUrl,
216
- presentation,
217
- protectionResolver,
218
- mutationPolicy,
219
- transactionResourceLimits,
220
- hyperlinkActivation,
221
- renderers,
222
- editors,
91
+ onReady: (event) => handlers.current?.onReady?.(event),
92
+ onInitializationError: (error) => handlers.current?.onInitializationError?.(error),
93
+ }, {
94
+ publish(grid) {
95
+ currentGrid.current = grid;
96
+ publishGrid(publishedRef.current, grid);
97
+ },
98
+ setInitializationState,
99
+ reportConsumerFailure(thrown) {
100
+ reportError(thrown);
101
+ },
102
+ });
103
+ }
104
+ const committedInput = useRef({
105
+ options: extractGridOptions({ ...props }),
223
106
  rowBridge,
224
- ]);
225
- useEffect(() => controllerRef.current?.setReadOnly(readOnly ?? false), [readOnly]);
226
- useEffect(() => controllerRef.current?.setConfig(config), [config]);
227
- useEffect(() => controllerRef.current?.setTheme(theme), [theme]);
228
- useEffect(() => controllerRef.current?.setOverscan(overscan), [overscan]);
229
- useEffect(() => controllerRef.current?.setMinColumns(minColumns), [minColumns]);
107
+ wasmSource,
108
+ });
109
+ useCommitLayoutEffect(() => {
110
+ committedInput.current = { options: extractGridOptions({ ...props }), rowBridge, wasmSource };
111
+ });
112
+ useEffect(() => {
113
+ const controller = controllerRef.current;
114
+ const host = hostRef.current;
115
+ if (!controller || !host)
116
+ return;
117
+ controller.mount(host, committedInput.current);
118
+ return () => controller.unmount();
119
+ }, []);
120
+ useEffect(() => {
121
+ controllerRef.current?.update(committedInput.current);
122
+ });
230
123
  const hostClassName = className ? `sheetwrite ${className}` : "sheetwrite";
231
124
  const sizing = gridSizeStyle({ height, fill });
232
125
  const hostStyle = { ...style, ...sizing };
233
126
  return (_jsx("div", { ...hostAttributes, ref: hostRef, className: hostClassName, style: hostStyle, children: initializationState === "ready" ? null : fallback }));
234
127
  });
235
- /** Advanced framework component with inferred row-bridge identity. */
128
+ /**
129
+ * Advanced framework component with inferred row-bridge identity.
130
+ *
131
+ * @example
132
+ * ```tsx
133
+ * import { SheetwriteGrid } from "@sheetwrite/react";
134
+ * import type { Workbook } from "@sheetwrite/core";
135
+ *
136
+ * export function WorkbookView({ workbook }: { workbook: Workbook }) {
137
+ * return <SheetwriteGrid workbook={workbook} height={400} />;
138
+ * }
139
+ * ```
140
+ * @see Sheetwrite
141
+ * @see /docs/frameworks/react/
142
+ */
236
143
  export const SheetwriteGrid = SheetwriteGridComponent;
237
144
  const SheetwriteComponent = forwardRef(function Sheetwrite({ columns, defaultRows, sheetName, getRowId, createRowId, ...props }, ref) {
238
145
  const input = useMemo(() => createSimpleGridInput({ columns, defaultRows, sheetName }), [columns, defaultRows, sheetName]);
@@ -249,6 +156,21 @@ const SheetwriteComponent = forwardRef(function Sheetwrite({ columns, defaultRow
249
156
  * `columns`, `defaultRows`, and `sheetName`, initializes Sheetwrite, and owns the `Grid`
250
157
  * through prop-driven resets and unmount cleanup. Pass a `ref` to access the live `Grid`;
251
158
  * use `SheetwriteGrid` when the host already owns a workbook or datasource.
159
+ *
160
+ * @example
161
+ * ```tsx
162
+ * import { Sheetwrite } from "@sheetwrite/react";
163
+ *
164
+ * export function Sales() {
165
+ * return <Sheetwrite
166
+ * columns={[{ key: "amount", title: "Amount", type: "number" }]}
167
+ * defaultRows={[{ amount: 12 }, { amount: 18 }]}
168
+ * height={400}
169
+ * />;
170
+ * }
171
+ * ```
172
+ * @see SheetwriteGrid
173
+ * @see /docs/frameworks/react/
252
174
  */
253
175
  export const Sheetwrite = SheetwriteComponent;
254
176
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheetwrite/react",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "description": "React adapter for Sheetwrite.",
6
6
  "license": "MIT",
@@ -19,6 +19,9 @@
19
19
  "react",
20
20
  "canvas"
21
21
  ],
22
+ "sideEffects": [
23
+ "**/*.css"
24
+ ],
22
25
  "main": "./dist/index.js",
23
26
  "module": "./dist/index.js",
24
27
  "types": "./dist/index.d.ts",
@@ -30,7 +33,8 @@
30
33
  "./styles.css": "./styles.css"
31
34
  },
32
35
  "files": [
33
- "dist",
36
+ "dist/**/*.js",
37
+ "dist/**/*.d.ts",
34
38
  "styles.css"
35
39
  ],
36
40
  "publishConfig": {
@@ -45,6 +49,6 @@
45
49
  "react": ">=18"
46
50
  },
47
51
  "dependencies": {
48
- "@sheetwrite/core": "0.4.0"
52
+ "@sheetwrite/core": "0.5.1"
49
53
  }
50
54
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,WAAW,EAIjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGL,qBAAqB,EACrB,KAAK,wBAAwB,EAG7B,KAAK,aAAa,EAGlB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,6BAA6B,EAClC,KAAK,YAAY,EAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EAEjB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AASf,KAAK,2BAA2B,GAC5B,cAAc,GACd,YAAY,G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MAAM,EAAE,UAAU,CAAC,EACtC,EAAE,SAAS,WAAW,GAAG,WAAW,EAEpC,KAAK,EAAE,eAAe,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG;IAChC,6EAA6E;IAC7E,GAAG,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CAC1B,KACE,YAAY,CAAC;AAElB,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,IAAI,EACJ,eAAe,EACf,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,cAAc,EACd,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,YAAY,GACb,MAAM,0BAA0B,CAAC"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAIL,cAAc,EACd,iBAAiB,GAElB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EAKrB,kBAAkB,EAClB,aAAa,GAMd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,UAAU,EAIV,SAAS,EACT,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,MAAM,qBAAqB,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC;AAE1F,SAAS,WAAW,CAAC,GAAuB,EAAE,IAAiB;IAC7D,IAAI,OAAO,GAAG,KAAK,UAAU;QAAE,GAAG,CAAC,IAAI,CAAC,CAAC;SACpC,IAAI,GAAG;QAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;AACnC,CAAC;AA4DD,0EAA0E;AAC1E,MAAM,uBAAuB,GAAG,UAAU,CACxC,SAAS,cAAc,CAAC,KAAK,EAAE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