@gridsheet/react-dev 3.0.0-rc.1 → 3.0.0-rc.10
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/LICENSE +190 -0
- package/README.md +10 -39
- package/dist/{react-dev/src/Debugger.d.ts → Debugger.d.ts} +2 -2
- package/dist/Debugger.d.ts.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +273 -237
- package/dist/index.js.map +1 -1
- package/package.json +13 -9
- package/dist/react-dev/src/Debugger.d.ts.map +0 -1
- package/dist/react-dev/src/index.d.ts +0 -3
- package/dist/react-dev/src/index.d.ts.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2020 righ
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Development tools for [GridSheet](https://github.com/walkframe/gridsheet).
|
|
4
4
|
|
|
5
|
-
|
|
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.
|
|
5
|
+
> **Note:** Intended for use during development only. Do not include in production builds.
|
|
8
6
|
|
|
9
7
|
## Installation
|
|
10
8
|
|
|
@@ -16,20 +14,19 @@ pnpm add -D @gridsheet/react-dev
|
|
|
16
14
|
|
|
17
15
|
## Usage
|
|
18
16
|
|
|
19
|
-
Pass a `
|
|
17
|
+
Pass a `book` object (created via `useBook` from `@gridsheet/react-core`) to the `Debugger` component.
|
|
20
18
|
|
|
21
19
|
```tsx
|
|
22
20
|
import React from 'react';
|
|
23
|
-
import { GridSheet,
|
|
21
|
+
import { GridSheet, useBook } from '@gridsheet/react-core';
|
|
24
22
|
import { Debugger } from '@gridsheet/react-dev';
|
|
25
23
|
|
|
26
|
-
const hub = createConnector();
|
|
27
|
-
|
|
28
24
|
export default function App() {
|
|
25
|
+
const book = useBook();
|
|
29
26
|
return (
|
|
30
27
|
<>
|
|
31
|
-
<GridSheet
|
|
32
|
-
<Debugger
|
|
28
|
+
<GridSheet book={book} />
|
|
29
|
+
<Debugger book={book} />
|
|
33
30
|
</>
|
|
34
31
|
);
|
|
35
32
|
}
|
|
@@ -39,36 +36,10 @@ export default function App() {
|
|
|
39
36
|
|
|
40
37
|
### `Debugger`
|
|
41
38
|
|
|
42
|
-
| Prop | Type
|
|
43
|
-
|
|
44
|
-
| `
|
|
45
|
-
| `intervalMs` | `number`
|
|
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`.
|
|
39
|
+
| Prop | Type | Default | Description |
|
|
40
|
+
|--------------|------------|---------|------------------------------------------------------|
|
|
41
|
+
| `book` | `BookType` | — | The book object connected to a `GridSheet` instance. |
|
|
42
|
+
| `intervalMs` | `number` | `500` | Polling interval (ms) for refreshing the state view. |
|
|
72
43
|
|
|
73
44
|
## License
|
|
74
45
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BookType } from '@gridsheet/core';
|
|
3
3
|
export type DebuggerProps = {
|
|
4
|
-
|
|
4
|
+
book: BookType;
|
|
5
5
|
intervalMs?: number;
|
|
6
6
|
};
|
|
7
7
|
export declare const Debugger: React.FC<DebuggerProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Debugger.d.ts","sourceRoot":"","sources":["../src/Debugger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AA6ChD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAshB5C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {}
|
|
1
|
+
export { Debugger } from './Debugger';
|
|
2
|
+
export type { DebuggerProps } from './Debugger';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,181 +1,159 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from "react";
|
|
3
|
-
import { a2p, x2c, Lexer, FormulaParser } from "@gridsheet/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as L, useEffect as N } from "react";
|
|
3
|
+
import { a2p as X, x2c as ee, Lexer as te, FormulaParser as oe, Sheet as re } from "@gridsheet/core";
|
|
4
|
+
import { Light as Y } from "react-syntax-highlighter";
|
|
5
|
+
import ne from "react-syntax-highlighter/dist/esm/languages/hljs/json";
|
|
6
|
+
import ie from "react-syntax-highlighter/dist/esm/styles/hljs/atom-one-light";
|
|
7
|
+
import se from "react-syntax-highlighter/dist/esm/styles/hljs/tomorrow-night";
|
|
8
|
+
import de from "react-syntax-highlighter/dist/esm/styles/hljs/solarized-dark";
|
|
9
|
+
import le from "react-syntax-highlighter/dist/esm/styles/hljs/solarized-light";
|
|
10
|
+
import ae from "react-syntax-highlighter/dist/esm/styles/hljs/docco";
|
|
11
|
+
import ce from "react-syntax-highlighter/dist/esm/styles/hljs/atelier-seaside-light";
|
|
12
|
+
import pe from "react-syntax-highlighter/dist/esm/styles/hljs/atelier-heath-light";
|
|
13
|
+
Y.registerLanguage("json", ne);
|
|
14
|
+
const x = {
|
|
15
|
+
get: (c) => typeof window < "u" ? sessionStorage.getItem(c) : null,
|
|
16
|
+
set: (c, h) => {
|
|
17
|
+
typeof window < "u" && sessionStorage.setItem(c, h);
|
|
18
|
+
}
|
|
19
|
+
}, b = ({
|
|
20
|
+
data: c,
|
|
21
|
+
replacer: h,
|
|
22
|
+
theme: o
|
|
23
|
+
}) => {
|
|
24
|
+
const y = JSON.stringify(c, h, 2) ?? "";
|
|
25
|
+
return /* @__PURE__ */ r(
|
|
26
|
+
Y,
|
|
27
|
+
{
|
|
28
|
+
language: "json",
|
|
29
|
+
style: o,
|
|
30
|
+
showLineNumbers: !0,
|
|
31
|
+
customStyle: { margin: 0, fontSize: "10px", minHeight: "100%", borderRadius: 0, whiteSpace: "pre" },
|
|
32
|
+
codeTagProps: { style: { display: "block", whiteSpace: "pre", fontSize: "10px" } },
|
|
33
|
+
children: y
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}, Ie = ({ book: c, intervalMs: h = 500 }) => {
|
|
37
|
+
const { registry: o } = c, [y, $] = L({}), [u, E] = L(null), [H, R] = L(200), [j, F] = L(200), [p, W] = L("expressions");
|
|
38
|
+
N(() => {
|
|
39
|
+
const e = x.get("gs-debugger-top-height");
|
|
40
|
+
e && R(Number(e));
|
|
41
|
+
const t = x.get("gs-debugger-bottom-height");
|
|
42
|
+
t && F(Number(t));
|
|
43
|
+
const n = x.get("gs-debugger-formula-view");
|
|
44
|
+
n && W(n);
|
|
45
|
+
}, []), N(() => {
|
|
46
|
+
const e = () => {
|
|
47
|
+
if (!o)
|
|
19
48
|
return;
|
|
20
|
-
}
|
|
21
49
|
const {
|
|
22
|
-
choosingAddress,
|
|
23
|
-
choosingSheetId,
|
|
24
|
-
editingAddress,
|
|
25
|
-
editingSheetId,
|
|
26
|
-
ready,
|
|
27
|
-
sheetIdsByName,
|
|
28
|
-
sheetHead,
|
|
29
|
-
cellHead,
|
|
30
|
-
paletteBySheetName,
|
|
31
|
-
solvedCaches,
|
|
32
|
-
copyingSheetId,
|
|
33
|
-
copyingZone,
|
|
34
|
-
cutting,
|
|
35
|
-
historyIndex,
|
|
36
|
-
historyLimit,
|
|
37
|
-
histories,
|
|
38
|
-
asyncPending,
|
|
39
|
-
asyncInflight
|
|
40
|
-
} =
|
|
41
|
-
|
|
42
|
-
asyncPending,
|
|
43
|
-
asyncInflight,
|
|
44
|
-
ready,
|
|
45
|
-
sheetIdsByName,
|
|
46
|
-
sheetHead,
|
|
47
|
-
cellHead,
|
|
48
|
-
paletteBySheetName,
|
|
49
|
-
solvedCaches,
|
|
50
|
-
choosingAddress,
|
|
51
|
-
choosingSheetId,
|
|
52
|
-
editingAddress,
|
|
53
|
-
editingSheetId,
|
|
54
|
-
copyingSheetId,
|
|
55
|
-
copyingZone,
|
|
56
|
-
cutting,
|
|
57
|
-
historyIndex,
|
|
58
|
-
historyLimit,
|
|
59
|
-
histories
|
|
50
|
+
choosingAddress: n,
|
|
51
|
+
choosingSheetId: i,
|
|
52
|
+
editingAddress: l,
|
|
53
|
+
editingSheetId: a,
|
|
54
|
+
ready: d,
|
|
55
|
+
sheetIdsByName: B,
|
|
56
|
+
sheetHead: m,
|
|
57
|
+
cellHead: w,
|
|
58
|
+
paletteBySheetName: I,
|
|
59
|
+
solvedCaches: f,
|
|
60
|
+
copyingSheetId: O,
|
|
61
|
+
copyingZone: U,
|
|
62
|
+
cutting: V,
|
|
63
|
+
historyIndex: Z,
|
|
64
|
+
historyLimit: q,
|
|
65
|
+
histories: G,
|
|
66
|
+
asyncPending: K,
|
|
67
|
+
asyncInflight: Q
|
|
68
|
+
} = o;
|
|
69
|
+
$({
|
|
70
|
+
asyncPending: K,
|
|
71
|
+
asyncInflight: Q,
|
|
72
|
+
ready: d,
|
|
73
|
+
sheetIdsByName: B,
|
|
74
|
+
sheetHead: m,
|
|
75
|
+
cellHead: w,
|
|
76
|
+
paletteBySheetName: I,
|
|
77
|
+
solvedCaches: f,
|
|
78
|
+
choosingAddress: n,
|
|
79
|
+
choosingSheetId: i,
|
|
80
|
+
editingAddress: l,
|
|
81
|
+
editingSheetId: a,
|
|
82
|
+
copyingSheetId: O,
|
|
83
|
+
copyingZone: U,
|
|
84
|
+
cutting: V,
|
|
85
|
+
historyIndex: Z,
|
|
86
|
+
historyLimit: q,
|
|
87
|
+
histories: G
|
|
60
88
|
});
|
|
61
89
|
};
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
return () => clearInterval(
|
|
65
|
-
}, [
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
let wireFormulaExpr = null;
|
|
78
|
-
let wireFormulaTokens = null;
|
|
79
|
-
if (wire && activeTabId !== null) {
|
|
80
|
-
const { contextsBySheetId } = wire;
|
|
81
|
-
const context = contextsBySheetId[activeTabId];
|
|
82
|
-
if (context) {
|
|
83
|
-
activeStoreData = context.store;
|
|
84
|
-
const table = context.store.tableReactive.current;
|
|
85
|
-
if (table) {
|
|
86
|
-
activeTableData = table;
|
|
87
|
-
}
|
|
90
|
+
e();
|
|
91
|
+
const t = setInterval(e, h);
|
|
92
|
+
return () => clearInterval(t);
|
|
93
|
+
}, [o, h]);
|
|
94
|
+
const v = y.sheetIdsByName ? Object.entries(y.sheetIdsByName).map(([e, t]) => ({ id: t, name: e })).sort((e, t) => e.id - t.id) : [];
|
|
95
|
+
N(() => {
|
|
96
|
+
u === null && v.length > 0 && E(v[0].id);
|
|
97
|
+
}, [v.length, u]);
|
|
98
|
+
let z = null, T = null, g = null, D = null, C = (o == null ? void 0 : o.choosingAddress) || "", S = "", M = null, _ = null;
|
|
99
|
+
if (o && u !== null) {
|
|
100
|
+
const { contextsBySheetId: e } = o, t = e[u];
|
|
101
|
+
if (t) {
|
|
102
|
+
z = t.store;
|
|
103
|
+
const n = t.store.sheetReactive.current;
|
|
104
|
+
n && (T = n);
|
|
88
105
|
}
|
|
89
106
|
}
|
|
90
|
-
if (
|
|
91
|
-
const { contextsBySheetId } =
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (entry) {
|
|
96
|
-
wireCellSheetName = entry[0];
|
|
97
|
-
}
|
|
107
|
+
if (o && o.choosingSheetId != null) {
|
|
108
|
+
const { contextsBySheetId: e } = o, t = e[o.choosingSheetId];
|
|
109
|
+
if (o.sheetIdsByName) {
|
|
110
|
+
const n = Object.entries(o.sheetIdsByName).find(([, i]) => i === o.choosingSheetId);
|
|
111
|
+
n && (S = n[0]);
|
|
98
112
|
}
|
|
99
|
-
if (
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
wireCellAddress = `header:${x2c(store.choosing.x)}`;
|
|
110
|
-
} else if (isLeftHeaderSelecting) {
|
|
111
|
-
wireCellAddress = `header:${store.choosing.y}`;
|
|
112
|
-
}
|
|
113
|
-
if (pos && idMatrix[pos.y]) {
|
|
114
|
-
const id = idMatrix[pos.y][pos.x];
|
|
115
|
-
if (id) {
|
|
116
|
-
wireCellData = wire.data[id];
|
|
117
|
-
const text = wireCellData == null ? void 0 : wireCellData.value;
|
|
118
|
-
if (typeof text === "string" && text.startsWith("=")) {
|
|
113
|
+
if (t) {
|
|
114
|
+
const n = t.store.sheetReactive.current, i = t.store;
|
|
115
|
+
if (n) {
|
|
116
|
+
const a = (n.__raw__ || n).idMatrix, d = i.topHeaderSelecting, B = i.leftHeaderSelecting, m = d ? { y: 0, x: i.choosing.x } : B ? { y: i.choosing.y, x: 0 } : X(o.choosingAddress);
|
|
117
|
+
if (d ? C = `header:${ee(i.choosing.x)}` : B && (C = `header:${i.choosing.y}`), m && a[m.y]) {
|
|
118
|
+
const w = a[m.y][m.x];
|
|
119
|
+
if (w) {
|
|
120
|
+
g = o.data[w], D = o.systems[w] ?? null;
|
|
121
|
+
const I = g == null ? void 0 : g.value;
|
|
122
|
+
if (typeof I == "string" && I.startsWith("="))
|
|
119
123
|
try {
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
wireFormulaExpr = parser.build();
|
|
125
|
-
} catch (e) {
|
|
126
|
-
wireFormulaExpr = { error: String(e) };
|
|
124
|
+
const f = new te(I.substring(1));
|
|
125
|
+
f.tokenize(), _ = f.tokens, M = new oe(f.tokens).build();
|
|
126
|
+
} catch (f) {
|
|
127
|
+
M = { error: String(f) };
|
|
127
128
|
}
|
|
128
|
-
}
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
136
|
-
return
|
|
137
|
-
|
|
138
|
-
if (value instanceof Map) {
|
|
139
|
-
return Object.fromEntries(value.entries());
|
|
140
|
-
}
|
|
141
|
-
if (value instanceof Set) {
|
|
142
|
-
return Array.from(value);
|
|
143
|
-
}
|
|
144
|
-
return value;
|
|
145
|
-
};
|
|
146
|
-
const startDrag = (e) => {
|
|
134
|
+
const k = (e, t) => {
|
|
135
|
+
if (!(e === "registry" || e === "__raw__" || t && typeof t == "object" && "current" in t && Object.keys(t).length === 1))
|
|
136
|
+
return t instanceof Map ? Object.fromEntries(t.entries()) : t instanceof Set ? Array.from(t) : t;
|
|
137
|
+
}, A = (e, t) => t instanceof re ? t.toString() : k(e, t), P = (e) => {
|
|
147
138
|
e.preventDefault();
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
sessionStorage.setItem("debugger_top_height", String(h));
|
|
154
|
-
};
|
|
155
|
-
const onMouseUp = () => {
|
|
156
|
-
document.removeEventListener("mousemove", onMouseMove);
|
|
157
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
139
|
+
const t = e.clientY, n = H, i = (a) => {
|
|
140
|
+
const d = Math.max(100, n + a.clientY - t);
|
|
141
|
+
R(d), x.set("gs-debugger-top-height", String(d));
|
|
142
|
+
}, l = () => {
|
|
143
|
+
document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", l);
|
|
158
144
|
};
|
|
159
|
-
document.addEventListener("mousemove",
|
|
160
|
-
|
|
161
|
-
};
|
|
162
|
-
const startDragBottom = (e) => {
|
|
145
|
+
document.addEventListener("mousemove", i), document.addEventListener("mouseup", l);
|
|
146
|
+
}, J = (e) => {
|
|
163
147
|
e.preventDefault();
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
sessionStorage.setItem("debugger_bottom_height", String(h));
|
|
170
|
-
};
|
|
171
|
-
const onMouseUp = () => {
|
|
172
|
-
document.removeEventListener("mousemove", onMouseMove);
|
|
173
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
148
|
+
const t = e.clientY, n = j, i = (a) => {
|
|
149
|
+
const d = Math.max(100, n + a.clientY - t);
|
|
150
|
+
F(d), x.set("gs-debugger-bottom-height", String(d));
|
|
151
|
+
}, l = () => {
|
|
152
|
+
document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", l);
|
|
174
153
|
};
|
|
175
|
-
document.addEventListener("mousemove",
|
|
176
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
154
|
+
document.addEventListener("mousemove", i), document.addEventListener("mouseup", l);
|
|
177
155
|
};
|
|
178
|
-
return /* @__PURE__ */
|
|
156
|
+
return /* @__PURE__ */ s(
|
|
179
157
|
"div",
|
|
180
158
|
{
|
|
181
159
|
style: {
|
|
@@ -189,17 +167,17 @@ const Debugger = ({ hub, intervalMs = 500 }) => {
|
|
|
189
167
|
overflow: "hidden"
|
|
190
168
|
},
|
|
191
169
|
children: [
|
|
192
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ s(
|
|
193
171
|
"div",
|
|
194
172
|
{
|
|
195
173
|
style: {
|
|
196
174
|
display: "flex",
|
|
197
175
|
flexDirection: "row",
|
|
198
|
-
height: `${
|
|
176
|
+
height: `${H}px`,
|
|
199
177
|
overflow: "hidden"
|
|
200
178
|
},
|
|
201
179
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ s(
|
|
203
181
|
"div",
|
|
204
182
|
{
|
|
205
183
|
style: {
|
|
@@ -210,7 +188,7 @@ const Debugger = ({ hub, intervalMs = 500 }) => {
|
|
|
210
188
|
position: "relative"
|
|
211
189
|
},
|
|
212
190
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ r(
|
|
214
192
|
"div",
|
|
215
193
|
{
|
|
216
194
|
style: {
|
|
@@ -222,14 +200,14 @@ const Debugger = ({ hub, intervalMs = 500 }) => {
|
|
|
222
200
|
fontWeight: "bold",
|
|
223
201
|
borderBottom: "2px solid #ccc"
|
|
224
202
|
},
|
|
225
|
-
children: "
|
|
203
|
+
children: "Registry State"
|
|
226
204
|
}
|
|
227
205
|
),
|
|
228
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ r(b, { data: y, replacer: A, theme: ie })
|
|
229
207
|
]
|
|
230
208
|
}
|
|
231
209
|
),
|
|
232
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ s(
|
|
233
211
|
"div",
|
|
234
212
|
{
|
|
235
213
|
style: {
|
|
@@ -240,7 +218,7 @@ const Debugger = ({ hub, intervalMs = 500 }) => {
|
|
|
240
218
|
position: "relative"
|
|
241
219
|
},
|
|
242
220
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ s(
|
|
244
222
|
"div",
|
|
245
223
|
{
|
|
246
224
|
style: {
|
|
@@ -254,72 +232,116 @@ const Debugger = ({ hub, intervalMs = 500 }) => {
|
|
|
254
232
|
},
|
|
255
233
|
children: [
|
|
256
234
|
"Cell: ",
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
" ",
|
|
260
|
-
(wire == null ? void 0 : wire.choosingSheetId) != null && `(SheetID: ${wire.choosingSheetId})`
|
|
235
|
+
S && `'${S}'!`,
|
|
236
|
+
C
|
|
261
237
|
]
|
|
262
238
|
}
|
|
263
239
|
),
|
|
264
|
-
|
|
240
|
+
g ? /* @__PURE__ */ r(b, { data: g, replacer: k, theme: ce }) : /* @__PURE__ */ r("div", { style: { fontStyle: "italic", color: "#6c757d", padding: "12px" }, children: "No cell data" })
|
|
265
241
|
]
|
|
266
242
|
}
|
|
267
243
|
),
|
|
268
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ s(
|
|
269
245
|
"div",
|
|
270
246
|
{
|
|
271
247
|
style: {
|
|
272
248
|
flex: 1,
|
|
273
249
|
borderRight: "1px solid #dee2e6",
|
|
274
250
|
overflow: "auto",
|
|
275
|
-
backgroundColor: "#
|
|
251
|
+
backgroundColor: "#fdf0f2",
|
|
276
252
|
position: "relative"
|
|
277
253
|
},
|
|
278
254
|
children: [
|
|
279
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ s(
|
|
280
256
|
"div",
|
|
281
257
|
{
|
|
282
258
|
style: {
|
|
283
259
|
position: "sticky",
|
|
284
260
|
top: 0,
|
|
285
|
-
background: "#
|
|
261
|
+
background: "#fdf0f2",
|
|
286
262
|
zIndex: 1,
|
|
287
263
|
padding: "8px 12px",
|
|
288
264
|
fontWeight: "bold",
|
|
289
265
|
borderBottom: "2px solid #ccc"
|
|
290
266
|
},
|
|
291
|
-
children:
|
|
267
|
+
children: [
|
|
268
|
+
"System: ",
|
|
269
|
+
S && `'${S}'!`,
|
|
270
|
+
C
|
|
271
|
+
]
|
|
292
272
|
}
|
|
293
273
|
),
|
|
294
|
-
|
|
274
|
+
D ? /* @__PURE__ */ r(b, { data: D, replacer: k, theme: pe }) : /* @__PURE__ */ r("div", { style: { fontStyle: "italic", color: "#6c757d", padding: "12px" }, children: "No system data" })
|
|
295
275
|
]
|
|
296
276
|
}
|
|
297
277
|
),
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
{
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
278
|
+
/* @__PURE__ */ s(
|
|
279
|
+
"div",
|
|
280
|
+
{
|
|
281
|
+
style: {
|
|
282
|
+
flex: 1,
|
|
283
|
+
overflow: "auto",
|
|
284
|
+
backgroundColor: p === "expressions" ? "#fffbf0" : "#f5f0ff",
|
|
285
|
+
position: "relative"
|
|
286
|
+
},
|
|
287
|
+
children: [
|
|
288
|
+
/* @__PURE__ */ s(
|
|
289
|
+
"div",
|
|
290
|
+
{
|
|
291
|
+
style: {
|
|
292
|
+
position: "sticky",
|
|
293
|
+
top: 0,
|
|
294
|
+
background: p === "expressions" ? "#fffbf0" : "#f5f0ff",
|
|
295
|
+
zIndex: 1,
|
|
296
|
+
padding: "6px 12px",
|
|
297
|
+
fontWeight: "bold",
|
|
298
|
+
borderBottom: "2px solid #ccc",
|
|
299
|
+
display: "flex",
|
|
300
|
+
alignItems: "center",
|
|
301
|
+
gap: "8px"
|
|
302
|
+
},
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ r("span", { children: p === "expressions" ? "Formula Expressions" : "Formula Tokens" }),
|
|
305
|
+
/* @__PURE__ */ r(
|
|
306
|
+
"button",
|
|
307
|
+
{
|
|
308
|
+
onClick: () => {
|
|
309
|
+
const e = p === "expressions" ? "tokens" : "expressions";
|
|
310
|
+
W(e), x.set("gs-debugger-formula-view", e);
|
|
311
|
+
},
|
|
312
|
+
style: {
|
|
313
|
+
marginLeft: "auto",
|
|
314
|
+
fontSize: "11px",
|
|
315
|
+
padding: "2px 8px",
|
|
316
|
+
cursor: "pointer",
|
|
317
|
+
border: "1px solid #aaa",
|
|
318
|
+
borderRadius: "4px",
|
|
319
|
+
background: "#fff"
|
|
320
|
+
},
|
|
321
|
+
children: p === "expressions" ? "→ Tokens" : "→ Expressions"
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
),
|
|
327
|
+
g ? /* @__PURE__ */ r(
|
|
328
|
+
b,
|
|
329
|
+
{
|
|
330
|
+
data: p === "expressions" ? M : _,
|
|
331
|
+
replacer: k,
|
|
332
|
+
theme: p === "expressions" ? le : ae
|
|
333
|
+
}
|
|
334
|
+
) : /* @__PURE__ */ r("div", { style: { fontStyle: "italic", color: "#6c757d", padding: "12px" }, children: "No cell selected" })
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
)
|
|
316
338
|
]
|
|
317
339
|
}
|
|
318
340
|
),
|
|
319
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ r(
|
|
320
342
|
"div",
|
|
321
343
|
{
|
|
322
|
-
onMouseDown:
|
|
344
|
+
onMouseDown: P,
|
|
323
345
|
style: {
|
|
324
346
|
height: "6px",
|
|
325
347
|
backgroundColor: "#dee2e6",
|
|
@@ -335,7 +357,7 @@ const Debugger = ({ hub, intervalMs = 500 }) => {
|
|
|
335
357
|
}
|
|
336
358
|
}
|
|
337
359
|
),
|
|
338
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ s(
|
|
339
361
|
"div",
|
|
340
362
|
{
|
|
341
363
|
style: {
|
|
@@ -345,95 +367,109 @@ const Debugger = ({ hub, intervalMs = 500 }) => {
|
|
|
345
367
|
backgroundColor: "#f8f9fa"
|
|
346
368
|
},
|
|
347
369
|
children: [
|
|
348
|
-
|
|
370
|
+
v.map((e) => /* @__PURE__ */ s(
|
|
349
371
|
"div",
|
|
350
372
|
{
|
|
351
|
-
onClick: () =>
|
|
373
|
+
onClick: () => E(e.id),
|
|
352
374
|
style: {
|
|
353
375
|
padding: "8px 16px",
|
|
354
376
|
cursor: "pointer",
|
|
355
377
|
fontWeight: "bold",
|
|
356
|
-
borderBottom:
|
|
357
|
-
color:
|
|
378
|
+
borderBottom: u === e.id ? "2px solid #0d6efd" : "2px solid transparent",
|
|
379
|
+
color: u === e.id ? "#0d6efd" : "#495057"
|
|
358
380
|
},
|
|
359
381
|
children: [
|
|
360
|
-
|
|
382
|
+
e.name,
|
|
361
383
|
" (ID: ",
|
|
362
|
-
|
|
384
|
+
e.id,
|
|
363
385
|
")"
|
|
364
386
|
]
|
|
365
387
|
},
|
|
366
|
-
|
|
388
|
+
e.id
|
|
367
389
|
)),
|
|
368
|
-
|
|
390
|
+
v.length === 0 && /* @__PURE__ */ r("div", { style: { padding: "8px 16px", color: "#6c757d" }, children: "No sheets detected" })
|
|
369
391
|
]
|
|
370
392
|
}
|
|
371
393
|
),
|
|
372
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ s(
|
|
373
395
|
"div",
|
|
374
396
|
{
|
|
375
397
|
style: {
|
|
376
398
|
display: "flex",
|
|
377
399
|
flexDirection: "row",
|
|
378
|
-
height: `${
|
|
379
|
-
backgroundColor: "#
|
|
400
|
+
height: `${j}px`,
|
|
401
|
+
backgroundColor: "#282c34",
|
|
380
402
|
overflow: "hidden"
|
|
381
403
|
},
|
|
382
404
|
children: [
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */ jsx(
|
|
385
|
-
"div",
|
|
386
|
-
{
|
|
387
|
-
style: {
|
|
388
|
-
position: "sticky",
|
|
389
|
-
top: 0,
|
|
390
|
-
background: "#fff",
|
|
391
|
-
zIndex: 1,
|
|
392
|
-
padding: "8px 12px",
|
|
393
|
-
fontWeight: "bold",
|
|
394
|
-
borderBottom: "2px solid #ccc"
|
|
395
|
-
},
|
|
396
|
-
children: "Table Data"
|
|
397
|
-
}
|
|
398
|
-
),
|
|
399
|
-
activeTableData ? /* @__PURE__ */ jsx("pre", { style: { margin: 0, padding: "12px" }, children: JSON.stringify(activeTableData, jsonReplacer, 2) }) : /* @__PURE__ */ jsx("div", { style: { fontStyle: "italic", color: "#6c757d", padding: "12px" }, children: "Table instance not found" })
|
|
400
|
-
] }),
|
|
401
|
-
/* @__PURE__ */ jsxs(
|
|
405
|
+
/* @__PURE__ */ s(
|
|
402
406
|
"div",
|
|
403
407
|
{
|
|
404
408
|
style: {
|
|
405
409
|
flex: 1,
|
|
410
|
+
borderRight: "1px solid #3a3a3a",
|
|
406
411
|
overflow: "auto",
|
|
407
|
-
|
|
412
|
+
position: "relative",
|
|
413
|
+
backgroundColor: "#282c34"
|
|
414
|
+
},
|
|
415
|
+
children: [
|
|
416
|
+
/* @__PURE__ */ r(
|
|
417
|
+
"div",
|
|
418
|
+
{
|
|
419
|
+
style: {
|
|
420
|
+
position: "sticky",
|
|
421
|
+
top: 0,
|
|
422
|
+
background: "#21252b",
|
|
423
|
+
zIndex: 1,
|
|
424
|
+
padding: "8px 12px",
|
|
425
|
+
fontWeight: "bold",
|
|
426
|
+
borderBottom: "2px solid #3a3a3a",
|
|
427
|
+
color: "#abb2bf"
|
|
428
|
+
},
|
|
429
|
+
children: "Sheet Data"
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
T ? /* @__PURE__ */ r(b, { data: T, replacer: k, theme: se }) : /* @__PURE__ */ r("div", { style: { fontStyle: "italic", color: "#6c757d", padding: "12px" }, children: "Sheet instance not found" })
|
|
433
|
+
]
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
/* @__PURE__ */ s(
|
|
437
|
+
"div",
|
|
438
|
+
{
|
|
439
|
+
style: {
|
|
440
|
+
flex: 1,
|
|
441
|
+
overflow: "auto",
|
|
442
|
+
backgroundColor: "#282c34",
|
|
408
443
|
position: "relative"
|
|
409
444
|
},
|
|
410
445
|
children: [
|
|
411
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ r(
|
|
412
447
|
"div",
|
|
413
448
|
{
|
|
414
449
|
style: {
|
|
415
450
|
position: "sticky",
|
|
416
451
|
top: 0,
|
|
417
|
-
background: "#
|
|
452
|
+
background: "#21252b",
|
|
418
453
|
zIndex: 1,
|
|
419
454
|
padding: "8px 12px",
|
|
420
455
|
fontWeight: "bold",
|
|
421
|
-
borderBottom: "2px solid #
|
|
456
|
+
borderBottom: "2px solid #3a3a3a",
|
|
457
|
+
color: "#abb2bf"
|
|
422
458
|
},
|
|
423
459
|
children: "Store Data"
|
|
424
460
|
}
|
|
425
461
|
),
|
|
426
|
-
|
|
462
|
+
z ? /* @__PURE__ */ r(b, { data: z, replacer: A, theme: de }) : /* @__PURE__ */ r("div", { style: { fontStyle: "italic", color: "#6c757d", padding: "12px" }, children: "Store state not found" })
|
|
427
463
|
]
|
|
428
464
|
}
|
|
429
465
|
)
|
|
430
466
|
]
|
|
431
467
|
}
|
|
432
468
|
),
|
|
433
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ r(
|
|
434
470
|
"div",
|
|
435
471
|
{
|
|
436
|
-
onMouseDown:
|
|
472
|
+
onMouseDown: J,
|
|
437
473
|
style: {
|
|
438
474
|
height: "6px",
|
|
439
475
|
backgroundColor: "#dee2e6",
|
|
@@ -454,6 +490,6 @@ const Debugger = ({ hub, intervalMs = 500 }) => {
|
|
|
454
490
|
);
|
|
455
491
|
};
|
|
456
492
|
export {
|
|
457
|
-
Debugger
|
|
493
|
+
Ie as Debugger
|
|
458
494
|
};
|
|
459
495
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/Debugger.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport type { HubType } from '@gridsheet/react-core';\nimport { a2p, x2c, Lexer, FormulaParser } from '@gridsheet/react-core';\n\nexport type DebuggerProps = {\n hub: HubType;\n intervalMs?: number;\n};\n\nexport const Debugger: React.FC<DebuggerProps> = ({ hub, intervalMs = 500 }) => {\n const { wire } = hub;\n const [snapshot, setSnapshot] = useState<any>({});\n const [activeTabId, setActiveTabId] = useState<number | null>(null);\n const [topHeight, setTopHeight] = useState<number>(() => {\n const saved = sessionStorage.getItem('debugger_top_height');\n return saved ? Number(saved) : 200;\n });\n const [bottomHeight, setBottomHeight] = useState<number>(() => {\n const saved = sessionStorage.getItem('debugger_bottom_height');\n return saved ? Number(saved) : 200;\n });\n\n useEffect(() => {\n const updateSnapshot = () => {\n if (!wire) {\n return;\n }\n\n const {\n choosingAddress,\n choosingSheetId,\n editingAddress,\n editingSheetId,\n ready,\n sheetIdsByName,\n sheetHead,\n cellHead,\n paletteBySheetName,\n solvedCaches,\n copyingSheetId,\n copyingZone,\n cutting,\n historyIndex,\n historyLimit,\n histories,\n asyncPending,\n asyncInflight,\n } = wire;\n\n setSnapshot({\n asyncPending,\n asyncInflight,\n ready,\n sheetIdsByName,\n sheetHead,\n cellHead,\n paletteBySheetName,\n solvedCaches,\n choosingAddress,\n choosingSheetId,\n editingAddress,\n editingSheetId,\n copyingSheetId,\n copyingZone,\n cutting,\n historyIndex,\n historyLimit,\n histories,\n });\n };\n\n updateSnapshot();\n\n const intervalId = setInterval(updateSnapshot, intervalMs);\n return () => clearInterval(intervalId);\n }, [wire, intervalMs]);\n\n const sheets = snapshot.sheetIdsByName\n ? Object.entries(snapshot.sheetIdsByName)\n .map(([name, id]) => ({ id: id as number, name }))\n .sort((a, b) => a.id - b.id)\n : [];\n\n useEffect(() => {\n if (activeTabId === null && sheets.length > 0) {\n setActiveTabId(sheets[0].id);\n }\n }, [sheets.length, activeTabId]);\n\n let activeStoreData = null;\n let activeTableData = null;\n\n // Cell data for wire.choosingSheetId / choosingAddress\n let wireCellData = null;\n let wireCellAddress = wire?.choosingAddress || '';\n let wireCellSheetName = '';\n let wireFormulaExpr = null;\n let wireFormulaTokens = null;\n\n if (wire && activeTabId !== null) {\n const { contextsBySheetId } = wire;\n const context = contextsBySheetId[activeTabId];\n\n if (context) {\n activeStoreData = context.store;\n\n const table = context.store.tableReactive.current;\n if (table) {\n activeTableData = table;\n }\n }\n }\n\n // Resolve cell data for wire.choosingSheetId / choosingAddress\n if (wire && wire.choosingSheetId != null) {\n const { contextsBySheetId } = wire;\n const choosingContext = contextsBySheetId[wire.choosingSheetId];\n\n // Resolve sheet name\n if (wire.sheetIdsByName) {\n const entry = Object.entries(wire.sheetIdsByName).find(([, id]) => id === wire.choosingSheetId);\n if (entry) {\n wireCellSheetName = entry[0];\n }\n }\n\n if (choosingContext) {\n const table = choosingContext.store.tableReactive.current;\n const store = choosingContext.store;\n if (table) {\n const rawTable = (table as any).__raw__ || table;\n const idMatrix = rawTable.idMatrix;\n\n // When a header is selected, refer to y=0 (top) or x=0 (left) header cell\n const isTopHeaderSelecting = store.topHeaderSelecting;\n const isLeftHeaderSelecting = store.leftHeaderSelecting;\n const pos = isTopHeaderSelecting\n ? { y: 0, x: store.choosing.x }\n : isLeftHeaderSelecting\n ? { y: store.choosing.y, x: 0 }\n : a2p(wire.choosingAddress);\n\n if (isTopHeaderSelecting) {\n wireCellAddress = `header:${x2c(store.choosing.x)}`;\n } else if (isLeftHeaderSelecting) {\n wireCellAddress = `header:${store.choosing.y}`;\n }\n\n if (pos && idMatrix[pos.y]) {\n const id = idMatrix[pos.y][pos.x];\n if (id) {\n wireCellData = wire.data[id];\n\n // Parse formula\n const text = wireCellData?.value;\n if (typeof text === 'string' && text.startsWith('=')) {\n try {\n const lexer = new Lexer(text.substring(1));\n lexer.tokenize();\n wireFormulaTokens = lexer.tokens;\n const parser = new FormulaParser(lexer.tokens);\n wireFormulaExpr = parser.build();\n } catch (e) {\n wireFormulaExpr = { error: String(e) };\n }\n }\n }\n }\n }\n }\n }\n\n const jsonReplacer = (key: string, value: any) => {\n // Avoid circular refs, noise, and React RefObjects\n if (\n key === 'wire' ||\n key === '__raw__' ||\n (value && typeof value === 'object' && 'current' in value && Object.keys(value).length === 1) // basic heuristic to skip ref objects\n ) {\n return undefined;\n }\n if (value instanceof Map) {\n return Object.fromEntries(value.entries());\n }\n if (value instanceof Set) {\n return Array.from(value);\n }\n return value;\n };\n\n const startDrag = (e: React.MouseEvent) => {\n e.preventDefault();\n const startY = e.clientY;\n const startHeight = topHeight;\n const onMouseMove = (moveEvent: MouseEvent) => {\n const h = Math.max(100, startHeight + moveEvent.clientY - startY);\n setTopHeight(h);\n sessionStorage.setItem('debugger_top_height', String(h));\n };\n const onMouseUp = () => {\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n };\n\n const startDragBottom = (e: React.MouseEvent) => {\n e.preventDefault();\n const startY = e.clientY;\n const startHeight = bottomHeight;\n const onMouseMove = (moveEvent: MouseEvent) => {\n const h = Math.max(100, startHeight + moveEvent.clientY - startY);\n setBottomHeight(h);\n sessionStorage.setItem('debugger_bottom_height', String(h));\n };\n const onMouseUp = () => {\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n };\n\n return (\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n fontFamily: 'monospace',\n fontSize: '12px',\n color: '#212529',\n border: '1px solid #dee2e6',\n borderRadius: '6px',\n overflow: 'hidden',\n }}\n >\n {/* 上段: Wire State | Wire Cell | Formula Expressions | Formula Tokens */}\n <div\n style={{\n display: 'flex',\n flexDirection: 'row',\n height: `${topHeight}px`,\n overflow: 'hidden',\n }}\n >\n {/* Wire State */}\n <div\n style={{\n flex: 1,\n borderRight: '1px solid #dee2e6',\n backgroundColor: '#fafafa',\n overflow: 'auto',\n position: 'relative',\n }}\n >\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#fafafa',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #ccc',\n }}\n >\n Wire State\n </div>\n <pre style={{ margin: 0, padding: '12px' }}>{JSON.stringify(snapshot, jsonReplacer, 2)}</pre>\n </div>\n\n {/* Wire Cell Value: wire.choosingSheetId / choosingAddress のセルデータ */}\n <div\n style={{\n flex: 1,\n borderRight: '1px solid #dee2e6',\n overflow: 'auto',\n backgroundColor: '#f0f8f0',\n position: 'relative',\n }}\n >\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#f0f8f0',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #ccc',\n }}\n >\n Cell: {wireCellSheetName && `${wireCellSheetName}!`}\n {wireCellAddress} {wire?.choosingSheetId != null && `(SheetID: ${wire.choosingSheetId})`}\n </div>\n {wireCellData ? (\n <pre style={{ margin: 0, padding: '12px' }}>{JSON.stringify(wireCellData, null, 2)}</pre>\n ) : (\n <div style={{ fontStyle: 'italic', color: '#6c757d', padding: '12px' }}>No cell data</div>\n )}\n </div>\n\n {/* Formula Expressions */}\n <div\n style={{\n flex: 1,\n borderRight: '1px solid #dee2e6',\n overflow: 'auto',\n backgroundColor: '#fffbf0',\n position: 'relative',\n }}\n >\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#fffbf0',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #ccc',\n }}\n >\n Formula Expressions\n </div>\n {wireFormulaExpr ? (\n <pre style={{ margin: 0, padding: '12px' }}>{JSON.stringify(wireFormulaExpr, null, 2)}</pre>\n ) : (\n <div style={{ fontStyle: 'italic', color: '#6c757d', padding: '12px' }}>\n {wireCellData ? 'Not a formula' : 'No cell selected'}\n </div>\n )}\n </div>\n\n {/* Formula Tokens: lexer.tokens */}\n <div style={{ flex: 1, overflow: 'auto', backgroundColor: '#f5f0ff', position: 'relative' }}>\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#f5f0ff',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #ccc',\n }}\n >\n Formula Tokens\n </div>\n {wireFormulaTokens ? (\n <pre style={{ margin: 0, padding: '12px' }}>{JSON.stringify(wireFormulaTokens, null, 2)}</pre>\n ) : (\n <div style={{ fontStyle: 'italic', color: '#6c757d', padding: '12px' }}>\n {wireCellData ? 'Not a formula' : 'No cell selected'}\n </div>\n )}\n </div>\n </div>\n\n {/* Resizer for Top Pane */}\n <div\n onMouseDown={startDrag}\n style={{\n height: '6px',\n backgroundColor: '#dee2e6',\n cursor: 'row-resize',\n transition: 'background-color 0.2s',\n zIndex: 10,\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.backgroundColor = '#adb5bd';\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = '#dee2e6';\n }}\n />\n\n {/* Sheet Tabs */}\n <div\n style={{\n display: 'flex',\n borderBottom: '1px solid #dee2e6',\n borderTop: '1px solid #dee2e6',\n backgroundColor: '#f8f9fa',\n }}\n >\n {sheets.map((sheet) => (\n <div\n key={sheet.id}\n onClick={() => setActiveTabId(sheet.id)}\n style={{\n padding: '8px 16px',\n cursor: 'pointer',\n fontWeight: 'bold',\n borderBottom: activeTabId === sheet.id ? '2px solid #0d6efd' : '2px solid transparent',\n color: activeTabId === sheet.id ? '#0d6efd' : '#495057',\n }}\n >\n {sheet.name} (ID: {sheet.id})\n </div>\n ))}\n {sheets.length === 0 && <div style={{ padding: '8px 16px', color: '#6c757d' }}>No sheets detected</div>}\n </div>\n\n {/* 下段: Table Data | Store Data */}\n <div\n style={{\n display: 'flex',\n flexDirection: 'row',\n height: `${bottomHeight}px`,\n backgroundColor: '#fff',\n overflow: 'hidden',\n }}\n >\n <div style={{ flex: 1, borderRight: '1px solid #dee2e6', overflow: 'auto', position: 'relative' }}>\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#fff',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #ccc',\n }}\n >\n Table Data\n </div>\n {activeTableData ? (\n <pre style={{ margin: 0, padding: '12px' }}>{JSON.stringify(activeTableData, jsonReplacer, 2)}</pre>\n ) : (\n <div style={{ fontStyle: 'italic', color: '#6c757d', padding: '12px' }}>Table instance not found</div>\n )}\n </div>\n\n <div\n style={{\n flex: 1,\n overflow: 'auto',\n backgroundColor: '#fdfdfe',\n position: 'relative',\n }}\n >\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#fdfdfe',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #ccc',\n }}\n >\n Store Data\n </div>\n {activeStoreData ? (\n <pre style={{ margin: 0, padding: '12px' }}>{JSON.stringify(activeStoreData, jsonReplacer, 2)}</pre>\n ) : (\n <div style={{ fontStyle: 'italic', color: '#6c757d', padding: '12px' }}>Store state not found</div>\n )}\n </div>\n </div>\n\n {/* Resizer for Bottom Pane */}\n <div\n onMouseDown={startDragBottom}\n style={{\n height: '6px',\n backgroundColor: '#dee2e6',\n cursor: 'row-resize',\n transition: 'background-color 0.2s',\n zIndex: 10,\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.backgroundColor = '#adb5bd';\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = '#dee2e6';\n }}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;AASO,MAAM,WAAoC,CAAC,EAAE,KAAK,aAAa,UAAU;AACxE,QAAA,EAAE,SAAS;AACjB,QAAM,CAAC,UAAU,WAAW,IAAI,SAAc,CAAA,CAAE;AAChD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAwB,IAAI;AAClE,QAAM,CAAC,WAAW,YAAY,IAAI,SAAiB,MAAM;AACjD,UAAA,QAAQ,eAAe,QAAQ,qBAAqB;AACnD,WAAA,QAAQ,OAAO,KAAK,IAAI;AAAA,EAAA,CAChC;AACD,QAAM,CAAC,cAAc,eAAe,IAAI,SAAiB,MAAM;AACvD,UAAA,QAAQ,eAAe,QAAQ,wBAAwB;AACtD,WAAA,QAAQ,OAAO,KAAK,IAAI;AAAA,EAAA,CAChC;AAED,YAAU,MAAM;AACd,UAAM,iBAAiB,MAAM;AAC3B,UAAI,CAAC,MAAM;AACT;AAAA,MAAA;AAGI,YAAA;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,IACE;AAEQ,kBAAA;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACD;AAAA,IACH;AA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ACjB,UAAU;AAAA,kBACZ;AAAA,kBAEA,UAAA;AAAA,oBAAA;AAAA,sBAAC;AAAA,sBAAA;AAAA,wBACC,OAAO;AAAA,0BACL,UAAU;AAAA,0BACV,KAAK;AAAA,0BACL,YAAY;AAAA,0BACZ,QAAQ;AAAA,0BACR,SAAS;AAAA,0BACT,YAAY;AAAA,0BACZ,cAAc;AAAA,wBAChB;AAAA,wBACD,UAAA;AAAA,sBAAA;AAAA,oBAED;AAAA,oBACC,kBACC,oBAAC,OAAI,EAAA,OAAO,EAAE,QAAQ,GAAG,SAAS,OAAO,GAAI,UAAK,KAAA,UAAU,iBAAiB,cAAc,CAAC,EAAA,CAAE,IAE9F,oBAAC,OAAI,EAAA,OAAO,EAAE,WAAW,UAAU,OAAO,WAAW,SAAS,OAAO,GAAG,UAAqB,wBAAA,CAAA;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAAA;AAAA,YAEjG;AAAA,UAAA;AAAA,QACF;AAAA,QAGA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,aAAa;AAAA,YACb,OAAO;AAAA,cACL,QAAQ;AAAA,cACR,iBAAiB;AAAA,cACjB,QAAQ;AAAA,cACR,YAAY;AAAA,cACZ,QAAQ;AAAA,YACV;AAAA,YACA,cAAc,CAAC,MAAM;AACjB,gBAAA,cAAc,MAAM,kBAAkB;AAAA,YAC1C;AAAA,YACA,cAAc,CAAC,MAAM;AACjB,gBAAA,cAAc,MAAM,kBAAkB;AAAA,YAAA;AAAA,UAC1C;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/Debugger.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport type { BookType } from '@gridsheet/core';\nimport { a2p, x2c, Lexer, FormulaParser, Sheet } from '@gridsheet/core';\nimport { Light as SyntaxHighlighter } from 'react-syntax-highlighter';\nimport type { SyntaxHighlighterProps } from 'react-syntax-highlighter';\nimport jsonLang from 'react-syntax-highlighter/dist/esm/languages/hljs/json';\nimport atomOneLight from 'react-syntax-highlighter/dist/esm/styles/hljs/atom-one-light';\nimport tomorrowNight from 'react-syntax-highlighter/dist/esm/styles/hljs/tomorrow-night';\nimport solarizedDark from 'react-syntax-highlighter/dist/esm/styles/hljs/solarized-dark';\nimport solarizedLight from 'react-syntax-highlighter/dist/esm/styles/hljs/solarized-light';\nimport docco from 'react-syntax-highlighter/dist/esm/styles/hljs/docco';\nimport atelierSeasideLight from 'react-syntax-highlighter/dist/esm/styles/hljs/atelier-seaside-light';\nimport atelierHeathLight from 'react-syntax-highlighter/dist/esm/styles/hljs/atelier-heath-light';\n\nSyntaxHighlighter.registerLanguage('json', jsonLang);\n\nconst ss = {\n get: (key: string) => (typeof window !== 'undefined' ? sessionStorage.getItem(key) : null),\n set: (key: string, value: string) => {\n if (typeof window !== 'undefined') {\n sessionStorage.setItem(key, value);\n }\n },\n};\n\ntype HljsStyle = SyntaxHighlighterProps['style'];\n\nconst JsonCode: React.FC<{ data: any; replacer?: (k: string, v: any) => any; theme: HljsStyle }> = ({\n data,\n replacer,\n theme,\n}) => {\n const code = JSON.stringify(data, replacer, 2) ?? '';\n return (\n <SyntaxHighlighter\n language=\"json\"\n style={theme}\n showLineNumbers\n customStyle={{ margin: 0, fontSize: '10px', minHeight: '100%', borderRadius: 0, whiteSpace: 'pre' }}\n codeTagProps={{ style: { display: 'block', whiteSpace: 'pre', fontSize: '10px' } }}\n >\n {code}\n </SyntaxHighlighter>\n );\n};\n\nexport type DebuggerProps = {\n book: BookType;\n intervalMs?: number;\n};\n\nexport const Debugger: React.FC<DebuggerProps> = ({ book, intervalMs = 500 }) => {\n const { registry } = book;\n const [snapshot, setSnapshot] = useState<any>({});\n const [activeTabId, setActiveTabId] = useState<number | null>(null);\n const [topHeight, setTopHeight] = useState<number>(200);\n const [bottomHeight, setBottomHeight] = useState<number>(200);\n const [formulaView, setFormulaView] = useState<'expressions' | 'tokens'>('expressions');\n\n useEffect(() => {\n const savedTop = ss.get('gs-debugger-top-height');\n if (savedTop) {\n setTopHeight(Number(savedTop));\n }\n const savedBottom = ss.get('gs-debugger-bottom-height');\n if (savedBottom) {\n setBottomHeight(Number(savedBottom));\n }\n const savedFormula = ss.get('gs-debugger-formula-view') as 'expressions' | 'tokens';\n if (savedFormula) {\n setFormulaView(savedFormula);\n }\n }, []);\n\n useEffect(() => {\n const updateSnapshot = () => {\n if (!registry) {\n return;\n }\n\n const {\n choosingAddress,\n choosingSheetId,\n editingAddress,\n editingSheetId,\n ready,\n sheetIdsByName,\n sheetHead,\n cellHead,\n paletteBySheetName,\n solvedCaches,\n copyingSheetId,\n copyingZone,\n cutting,\n historyIndex,\n historyLimit,\n histories,\n asyncPending,\n asyncInflight,\n } = registry;\n\n setSnapshot({\n asyncPending,\n asyncInflight,\n ready,\n sheetIdsByName,\n sheetHead,\n cellHead,\n paletteBySheetName,\n solvedCaches,\n choosingAddress,\n choosingSheetId,\n editingAddress,\n editingSheetId,\n copyingSheetId,\n copyingZone,\n cutting,\n historyIndex,\n historyLimit,\n histories,\n });\n };\n\n updateSnapshot();\n\n const intervalId = setInterval(updateSnapshot, intervalMs);\n return () => clearInterval(intervalId);\n }, [registry, intervalMs]);\n\n const sheets = snapshot.sheetIdsByName\n ? Object.entries(snapshot.sheetIdsByName)\n .map(([name, id]) => ({ id: id as number, name }))\n .sort((a, b) => a.id - b.id)\n : [];\n\n useEffect(() => {\n if (activeTabId === null && sheets.length > 0) {\n setActiveTabId(sheets[0].id);\n }\n }, [sheets.length, activeTabId]);\n\n let activeStoreData = null;\n let activeTableData = null;\n\n // Cell data for the currently selected cell (registry.choosingSheetId / choosingAddress)\n let registryCellData = null;\n let registrySystemData = null;\n let registryCellAddress = registry?.choosingAddress || '';\n let registryCellSheetName = '';\n let registryFormulaExpr = null;\n let registryFormulaTokens = null;\n\n if (registry && activeTabId !== null) {\n const { contextsBySheetId } = registry;\n const context = contextsBySheetId[activeTabId];\n\n if (context) {\n activeStoreData = context.store;\n\n const sheet = context.store.sheetReactive.current;\n if (sheet) {\n activeTableData = sheet;\n }\n }\n }\n\n // Resolve cell data for the currently selected cell (registry.choosingSheetId / choosingAddress)\n if (registry && registry.choosingSheetId != null) {\n const { contextsBySheetId } = registry;\n const choosingContext = contextsBySheetId[registry.choosingSheetId];\n\n // Resolve sheet name\n if (registry.sheetIdsByName) {\n const entry = Object.entries(registry.sheetIdsByName).find(([, id]) => id === registry.choosingSheetId);\n if (entry) {\n registryCellSheetName = entry[0];\n }\n }\n\n if (choosingContext) {\n const sheet = choosingContext.store.sheetReactive.current;\n const store = choosingContext.store;\n if (sheet) {\n const rawTable = (sheet as any).__raw__ || sheet;\n const idMatrix = rawTable.idMatrix;\n\n // When a header cell is selected, use y=0 (top header) or x=0 (left header)\n const isTopHeaderSelecting = store.topHeaderSelecting;\n const isLeftHeaderSelecting = store.leftHeaderSelecting;\n const pos = isTopHeaderSelecting\n ? { y: 0, x: store.choosing.x }\n : isLeftHeaderSelecting\n ? { y: store.choosing.y, x: 0 }\n : a2p(registry.choosingAddress);\n\n if (isTopHeaderSelecting) {\n registryCellAddress = `header:${x2c(store.choosing.x)}`;\n } else if (isLeftHeaderSelecting) {\n registryCellAddress = `header:${store.choosing.y}`;\n }\n\n if (pos && idMatrix[pos.y]) {\n const id = idMatrix[pos.y][pos.x];\n if (id) {\n registryCellData = registry.data[id];\n registrySystemData = registry.systems[id] ?? null;\n\n // Parse formula\n const text = registryCellData?.value;\n if (typeof text === 'string' && text.startsWith('=')) {\n try {\n const lexer = new Lexer(text.substring(1));\n lexer.tokenize();\n registryFormulaTokens = lexer.tokens;\n const parser = new FormulaParser(lexer.tokens);\n registryFormulaExpr = parser.build();\n } catch (e) {\n registryFormulaExpr = { error: String(e) };\n }\n }\n }\n }\n }\n }\n }\n\n const baseReplacer = (key: string, value: any) => {\n // Avoid circular refs, noisy internals, and React RefObjects\n if (\n key === 'registry' ||\n key === '__raw__' ||\n (value && typeof value === 'object' && 'current' in value && Object.keys(value).length === 1) // heuristic to skip React ref objects\n ) {\n return undefined;\n }\n if (value instanceof Map) {\n return Object.fromEntries(value.entries());\n }\n if (value instanceof Set) {\n return Array.from(value);\n }\n return value;\n };\n\n // Replace nested Sheet instances with their string representation (for Registry State / Store Data panels)\n const jsonReplacer = (key: string, value: any) => {\n if (value instanceof Sheet) {\n return value.toString();\n }\n return baseReplacer(key, value);\n };\n\n const startDrag = (e: React.MouseEvent) => {\n e.preventDefault();\n const startY = e.clientY;\n const startHeight = topHeight;\n const onMouseMove = (moveEvent: MouseEvent) => {\n const h = Math.max(100, startHeight + moveEvent.clientY - startY);\n setTopHeight(h);\n ss.set('gs-debugger-top-height', String(h));\n };\n const onMouseUp = () => {\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n };\n\n const startDragBottom = (e: React.MouseEvent) => {\n e.preventDefault();\n const startY = e.clientY;\n const startHeight = bottomHeight;\n const onMouseMove = (moveEvent: MouseEvent) => {\n const h = Math.max(100, startHeight + moveEvent.clientY - startY);\n setBottomHeight(h);\n ss.set('gs-debugger-bottom-height', String(h));\n };\n const onMouseUp = () => {\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', onMouseUp);\n };\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', onMouseUp);\n };\n\n return (\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n fontFamily: 'monospace',\n fontSize: '12px',\n color: '#212529',\n border: '1px solid #dee2e6',\n borderRadius: '6px',\n overflow: 'hidden',\n }}\n >\n {/* Top pane: Registry State | Cell | System | Formula */}\n <div\n style={{\n display: 'flex',\n flexDirection: 'row',\n height: `${topHeight}px`,\n overflow: 'hidden',\n }}\n >\n {/* Registry State panel */}\n <div\n style={{\n flex: 1,\n borderRight: '1px solid #dee2e6',\n backgroundColor: '#fafafa',\n overflow: 'auto',\n position: 'relative',\n }}\n >\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#fafafa',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #ccc',\n }}\n >\n Registry State\n </div>\n <JsonCode data={snapshot} replacer={jsonReplacer} theme={atomOneLight} />\n </div>\n\n {/* Registry Cell Value: cell data for registry.choosingSheetId / choosingAddress */}\n <div\n style={{\n flex: 1,\n borderRight: '1px solid #dee2e6',\n overflow: 'auto',\n backgroundColor: '#f0f8f0',\n position: 'relative',\n }}\n >\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#f0f8f0',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #ccc',\n }}\n >\n Cell: {registryCellSheetName && `'${registryCellSheetName}'!`}\n {registryCellAddress}\n </div>\n {registryCellData ? (\n <JsonCode data={registryCellData} replacer={baseReplacer} theme={atelierSeasideLight} />\n ) : (\n <div style={{ fontStyle: 'italic', color: '#6c757d', padding: '12px' }}>No cell data</div>\n )}\n </div>\n\n {/* System: systems[id] for the choosing cell */}\n <div\n style={{\n flex: 1,\n borderRight: '1px solid #dee2e6',\n overflow: 'auto',\n backgroundColor: '#fdf0f2',\n position: 'relative',\n }}\n >\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#fdf0f2',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #ccc',\n }}\n >\n System: {registryCellSheetName && `'${registryCellSheetName}'!`}\n {registryCellAddress}\n </div>\n {registrySystemData ? (\n <JsonCode data={registrySystemData} replacer={baseReplacer} theme={atelierHeathLight} />\n ) : (\n <div style={{ fontStyle: 'italic', color: '#6c757d', padding: '12px' }}>No system data</div>\n )}\n </div>\n\n {/* Formula: toggling between Expressions and Tokens */}\n <div\n style={{\n flex: 1,\n overflow: 'auto',\n backgroundColor: formulaView === 'expressions' ? '#fffbf0' : '#f5f0ff',\n position: 'relative',\n }}\n >\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: formulaView === 'expressions' ? '#fffbf0' : '#f5f0ff',\n zIndex: 1,\n padding: '6px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #ccc',\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n }}\n >\n <span>{formulaView === 'expressions' ? 'Formula Expressions' : 'Formula Tokens'}</span>\n <button\n onClick={() => {\n const next = formulaView === 'expressions' ? 'tokens' : 'expressions';\n setFormulaView(next);\n ss.set('gs-debugger-formula-view', next);\n }}\n style={{\n marginLeft: 'auto',\n fontSize: '11px',\n padding: '2px 8px',\n cursor: 'pointer',\n border: '1px solid #aaa',\n borderRadius: '4px',\n background: '#fff',\n }}\n >\n {formulaView === 'expressions' ? '→ Tokens' : '→ Expressions'}\n </button>\n </div>\n {registryCellData ? (\n <JsonCode\n data={formulaView === 'expressions' ? registryFormulaExpr : registryFormulaTokens}\n replacer={baseReplacer}\n theme={formulaView === 'expressions' ? solarizedLight : docco}\n />\n ) : (\n <div style={{ fontStyle: 'italic', color: '#6c757d', padding: '12px' }}>No cell selected</div>\n )}\n </div>\n </div>\n\n {/* Resizer for top pane */}\n <div\n onMouseDown={startDrag}\n style={{\n height: '6px',\n backgroundColor: '#dee2e6',\n cursor: 'row-resize',\n transition: 'background-color 0.2s',\n zIndex: 10,\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.backgroundColor = '#adb5bd';\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = '#dee2e6';\n }}\n />\n\n {/* Sheet tabs */}\n <div\n style={{\n display: 'flex',\n borderBottom: '1px solid #dee2e6',\n borderTop: '1px solid #dee2e6',\n backgroundColor: '#f8f9fa',\n }}\n >\n {sheets.map((sheet) => (\n <div\n key={sheet.id}\n onClick={() => setActiveTabId(sheet.id)}\n style={{\n padding: '8px 16px',\n cursor: 'pointer',\n fontWeight: 'bold',\n borderBottom: activeTabId === sheet.id ? '2px solid #0d6efd' : '2px solid transparent',\n color: activeTabId === sheet.id ? '#0d6efd' : '#495057',\n }}\n >\n {sheet.name} (ID: {sheet.id})\n </div>\n ))}\n {sheets.length === 0 && <div style={{ padding: '8px 16px', color: '#6c757d' }}>No sheets detected</div>}\n </div>\n\n {/* Bottom pane: Sheet Data | Store Data */}\n <div\n style={{\n display: 'flex',\n flexDirection: 'row',\n height: `${bottomHeight}px`,\n backgroundColor: '#282c34',\n overflow: 'hidden',\n }}\n >\n <div\n style={{\n flex: 1,\n borderRight: '1px solid #3a3a3a',\n overflow: 'auto',\n position: 'relative',\n backgroundColor: '#282c34',\n }}\n >\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#21252b',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #3a3a3a',\n color: '#abb2bf',\n }}\n >\n Sheet Data\n </div>\n {activeTableData ? (\n <JsonCode data={activeTableData} replacer={baseReplacer} theme={tomorrowNight} />\n ) : (\n <div style={{ fontStyle: 'italic', color: '#6c757d', padding: '12px' }}>Sheet instance not found</div>\n )}\n </div>\n\n <div\n style={{\n flex: 1,\n overflow: 'auto',\n backgroundColor: '#282c34',\n position: 'relative',\n }}\n >\n <div\n style={{\n position: 'sticky',\n top: 0,\n background: '#21252b',\n zIndex: 1,\n padding: '8px 12px',\n fontWeight: 'bold',\n borderBottom: '2px solid #3a3a3a',\n color: '#abb2bf',\n }}\n >\n Store Data\n </div>\n {activeStoreData ? (\n <JsonCode data={activeStoreData} replacer={jsonReplacer} theme={solarizedDark} />\n ) : (\n <div style={{ fontStyle: 'italic', color: '#6c757d', padding: '12px' }}>Store state not found</div>\n )}\n </div>\n </div>\n\n {/* Resizer for bottom pane */}\n <div\n onMouseDown={startDragBottom}\n style={{\n height: '6px',\n backgroundColor: '#dee2e6',\n cursor: 'row-resize',\n transition: 'background-color 0.2s',\n zIndex: 10,\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.backgroundColor = '#adb5bd';\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = '#dee2e6';\n }}\n />\n </div>\n );\n};\n"],"names":["SyntaxHighlighter","jsonLang","ss","key","value","JsonCode","data","replacer","theme","code","jsx","Debugger","book","intervalMs","registry","snapshot","setSnapshot","useState","activeTabId","setActiveTabId","topHeight","setTopHeight","bottomHeight","setBottomHeight","formulaView","setFormulaView","useEffect","savedTop","savedBottom","savedFormula","updateSnapshot","choosingAddress","choosingSheetId","editingAddress","editingSheetId","ready","sheetIdsByName","sheetHead","cellHead","paletteBySheetName","solvedCaches","copyingSheetId","copyingZone","cutting","historyIndex","historyLimit","histories","asyncPending","asyncInflight","intervalId","sheets","name","id","a","b","activeStoreData","activeTableData","registryCellData","registrySystemData","registryCellAddress","registryCellSheetName","registryFormulaExpr","registryFormulaTokens","contextsBySheetId","context","sheet","choosingContext","entry","store","idMatrix","isTopHeaderSelecting","isLeftHeaderSelecting","pos","a2p","x2c","text","lexer","Lexer","FormulaParser","e","baseReplacer","jsonReplacer","Sheet","startDrag","startY","startHeight","onMouseMove","moveEvent","h","onMouseUp","startDragBottom","jsxs","atomOneLight","atelierSeasideLight","atelierHeathLight","next","solarizedLight","docco","tomorrowNight","solarizedDark"],"mappings":";;;;;;;;;;;;AAcAA,EAAkB,iBAAiB,QAAQC,EAAQ;AAEnD,MAAMC,IAAK;AAAA,EACT,KAAK,CAACC,MAAiB,OAAO,SAAW,MAAc,eAAe,QAAQA,CAAG,IAAI;AAAA,EACrF,KAAK,CAACA,GAAaC,MAAkB;AAC/B,IAAA,OAAO,SAAW,OACL,eAAA,QAAQD,GAAKC,CAAK;AAAA,EACnC;AAEJ,GAIMC,IAA6F,CAAC;AAAA,EAClG,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AACF,MAAM;AACJ,QAAMC,IAAO,KAAK,UAAUH,GAAMC,GAAU,CAAC,KAAK;AAEhD,SAAA,gBAAAG;AAAA,IAACV;AAAAA,IAAA;AAAA,MACC,UAAS;AAAA,MACT,OAAOQ;AAAA,MACP,iBAAe;AAAA,M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.0-rc.10",
|
|
4
4
|
"description": "Development tools for GridSheet",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -12,10 +12,6 @@
|
|
|
12
12
|
"default": "./dist/index.js"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "rm -rf ./dist || true && vite build",
|
|
17
|
-
"typecheck": "pnpm tsc --noEmit"
|
|
18
|
-
},
|
|
19
15
|
"author": "righ",
|
|
20
16
|
"license": "Apache-2.0",
|
|
21
17
|
"files": [
|
|
@@ -32,11 +28,10 @@
|
|
|
32
28
|
"url": "https://github.com/walkframe/gridsheet/issues"
|
|
33
29
|
},
|
|
34
30
|
"homepage": "https://gridsheet.walkframe.com/",
|
|
35
|
-
"packageManager": "pnpm@10.6.5",
|
|
36
31
|
"peerDependencies": {
|
|
32
|
+
"@gridsheet/core": ">=3.0.0-rc.10",
|
|
37
33
|
"react": ">=16.9.0",
|
|
38
|
-
"react-dom": ">=16.9.0"
|
|
39
|
-
"@gridsheet/react-core": ">=3.0.0-rc.1"
|
|
34
|
+
"react-dom": ">=16.9.0"
|
|
40
35
|
},
|
|
41
36
|
"devDependencies": {
|
|
42
37
|
"@types/react": "^16.9.24",
|
|
@@ -44,6 +39,15 @@
|
|
|
44
39
|
"@vitejs/plugin-react": "^4.3.4",
|
|
45
40
|
"typescript": "^5.8.2",
|
|
46
41
|
"vite": "^6.2.2",
|
|
47
|
-
"vite-plugin-dts": "^4.5.3"
|
|
42
|
+
"vite-plugin-dts": "^4.5.3",
|
|
43
|
+
"@gridsheet/core": "3.0.0-rc.10"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
47
|
+
"react-syntax-highlighter": "^16.1.1"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "rm -rf ./dist || true && vite build",
|
|
51
|
+
"typecheck": "pnpm tsc --noEmit"
|
|
48
52
|
}
|
|
49
53
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Debugger.d.ts","sourceRoot":"","sources":["../../../src/Debugger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGrD,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA2d5C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|