@gridsheet/react-dev 3.0.0-rc.0 → 3.0.0-rc.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.
Files changed (2) hide show
  1. package/README.md +75 -0
  2. package/package.json +11 -4
package/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # @gridsheet/react-dev
2
+
3
+ Development tools for [GridSheet](https://github.com/walkframe/gridsheet).
4
+
5
+ ## Overview
6
+
7
+ `@gridsheet/react-dev` provides a `Debugger` component that gives you real-time visibility into the internal state of a GridSheet instance. It is intended for use during development only and should **not** be included in production builds.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install --save-dev @gridsheet/react-dev
13
+ # or
14
+ pnpm add -D @gridsheet/react-dev
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ Pass a `hub` object (created via `createConnector` from `@gridsheet/react-core`) to the `Debugger` component.
20
+
21
+ ```tsx
22
+ import React from 'react';
23
+ import { GridSheet, createConnector } from '@gridsheet/react-core';
24
+ import { Debugger } from '@gridsheet/react-dev';
25
+
26
+ const hub = createConnector();
27
+
28
+ export default function App() {
29
+ return (
30
+ <>
31
+ <GridSheet hub={hub} />
32
+ <Debugger hub={hub} />
33
+ </>
34
+ );
35
+ }
36
+ ```
37
+
38
+ ## Props
39
+
40
+ ### `Debugger`
41
+
42
+ | Prop | Type | Default | Description |
43
+ |--------------|-----------|---------|-------------------------------------------------------|
44
+ | `hub` | `HubType` | — | The hub object connected to a `GridSheet` instance. |
45
+ | `intervalMs` | `number` | `500` | Polling interval (ms) for refreshing the state view. |
46
+
47
+ ## Panel Layout
48
+
49
+ The `Debugger` renders a resizable panel divided into two rows:
50
+
51
+ ### Top row (resizable height)
52
+
53
+ | Panel | Description |
54
+ |------------------------|------------------------------------------------------------------------|
55
+ | **Wire State** | Snapshot of the shared wire state (choosing address, history, etc.). |
56
+ | **Cell** | Data of the currently selected cell (value, style, meta, etc.). |
57
+ | **Formula Expressions**| Parsed AST of the formula in the selected cell (if any). |
58
+ | **Formula Tokens** | Tokenized result of the formula lexer for the selected cell (if any). |
59
+
60
+ ### Sheet tabs
61
+
62
+ Tabs to switch which sheet's internal data is shown in the bottom row.
63
+
64
+ ### Bottom row (resizable height)
65
+
66
+ | Panel | Description |
67
+ |----------------|--------------------------------------------------|
68
+ | **Table Data** | Raw table instance data for the selected sheet. |
69
+ | **Store Data** | Internal store state for the selected sheet. |
70
+
71
+ Both rows can be resized by dragging the divider between them. Heights are persisted in `sessionStorage`.
72
+
73
+ ## License
74
+
75
+ Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridsheet/react-dev",
3
- "version": "3.0.0-rc.0",
3
+ "version": "3.0.0-rc.1",
4
4
  "description": "Development tools for GridSheet",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -24,12 +24,19 @@
24
24
  "README.md",
25
25
  "LICENSE"
26
26
  ],
27
- "dependencies": {
28
- "@gridsheet/react-core": "^3.0.0-rc.0"
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/walkframe/gridsheet.git"
29
30
  },
31
+ "bugs": {
32
+ "url": "https://github.com/walkframe/gridsheet/issues"
33
+ },
34
+ "homepage": "https://gridsheet.walkframe.com/",
35
+ "packageManager": "pnpm@10.6.5",
30
36
  "peerDependencies": {
31
37
  "react": ">=16.9.0",
32
- "react-dom": ">=16.9.0"
38
+ "react-dom": ">=16.9.0",
39
+ "@gridsheet/react-core": ">=3.0.0-rc.1"
33
40
  },
34
41
  "devDependencies": {
35
42
  "@types/react": "^16.9.24",