sheetnext 0.2.3 → 0.2.5
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 +171 -164
- package/README_CN.md +171 -163
- package/dist/sheetnext.css +1 -1
- package/dist/sheetnext.es.js +20 -20
- package/dist/sheetnext.locale.zh-CN.es.js +20 -20
- package/dist/sheetnext.locale.zh-CN.umd.js +20 -20
- package/dist/sheetnext.umd.js +20 -20
- package/docs/ai-relay.md +284 -284
- package/docs/core-api.md +3181 -2980
- package/docs/enums.md +171 -171
- package/docs/events.md +341 -331
- package/docs/image_en.png +0 -0
- package/docs/json-format.md +426 -426
- package/docs/recipes.md +56 -0
- package/package.json +58 -58
package/README.md
CHANGED
|
@@ -1,164 +1,171 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="docs/logo.png" alt="SheetNext Logo" width="80" />
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<p align="center">
|
|
6
|
-
A pure front-end spreadsheet component with Excel-like capabilities, built-in native AI workflows, and flexible LLM integration for data operations.
|
|
7
|
-
</p>
|
|
8
|
-
|
|
9
|
-
<p align="center">
|
|
10
|
-
English | <a href="./README_CN.md">简体中文</a>
|
|
11
|
-
</p>
|
|
12
|
-
|
|
13
|
-
<p align="center">
|
|
14
|
-
<a href="https://www.npmjs.com/package/sheetnext"><img src="https://img.shields.io/npm/v/sheetnext.svg" alt="npm version" /></a>
|
|
15
|
-
<a href="https://www.npmjs.com/package/sheetnext"><img src="https://img.shields.io/npm/dm/sheetnext.svg" alt="npm downloads" /></a>
|
|
16
|
-
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="license" /></a>
|
|
17
|
-
<img src="https://img.shields.io/badge/rendering-Canvas-ff8c00.svg" alt="Canvas rendering" />
|
|
18
|
-
<img src="https://img.shields.io/badge/workflow-AI%20Ready-00A67E.svg" alt="AI ready" />
|
|
19
|
-
<img src="https://img.shields.io/badge/file%20support-XLSX%20%7C%20CSV%20%7C%20JSON-1f6feb.svg" alt="file support" />
|
|
20
|
-
</p>
|
|
21
|
-
|
|
22
|
-
<p align="center">
|
|
23
|
-
<img src="docs/image_en.png" alt="SheetNext
|
|
24
|
-
</p>
|
|
25
|
-
|
|
26
|
-
- SheetNext is a pure front-end, high-performance spreadsheet engine that provides enterprises with a ready-to-use intelligent spreadsheet foundation.
|
|
27
|
-
- With the AI-driven development approach, a single developer + AI can integrate and deliver complex enterprise spreadsheet solutions.
|
|
28
|
-
- Common scenarios like ledgers, budgets, analytics, data entry, and approvals can produce a first version in minutes.
|
|
29
|
-
|
|
30
|
-
## ✨ Key Features
|
|
31
|
-
|
|
32
|
-
- 📊 Full Spreadsheet Capabilities — Formula engine, charts, pivot tables, super tables, slicers, conditional formatting, data validation, sparklines, freeze panes, sorting & filtering, and more
|
|
33
|
-
- 🤖 AI-Powered Workflow — Built-in AI automation for template generation, data analysis, formula writing, and cross-sheet logic
|
|
34
|
-
- 📁 Native File Support — Import/export Excel (.xlsx), CSV, and JSON out of the box, no extra plugins needed
|
|
35
|
-
- 🚀 Zero-Config Setup — All features built in, no additional dependencies required
|
|
36
|
-
- ⚡ High-Performance Rendering — Canvas-based virtual scrolling handles large datasets with ease
|
|
37
|
-
|
|
38
|
-
## 🚀 Quick Start
|
|
39
|
-
|
|
40
|
-
SheetNext can be integrated with just a few lines of code and works with any front-end framework (Vue, React, Angular, etc.).
|
|
41
|
-
|
|
42
|
-
### Option 1: Traditional Integration
|
|
43
|
-
|
|
44
|
-
#### Install via npm
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
npm install sheetnext
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
```html
|
|
51
|
-
<!-- Container for the editor -->
|
|
52
|
-
<div id="SNContainer" style="width:100vw;height:100vh;padding:0 7px 7px"></div>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
```javascript
|
|
56
|
-
import SheetNext from 'sheetnext';
|
|
57
|
-
import 'sheetnext.css';
|
|
58
|
-
|
|
59
|
-
const SN = new SheetNext(document.querySelector('#SNContainer'));
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
#### Browser Direct Import (CDN)
|
|
63
|
-
|
|
64
|
-
```html
|
|
65
|
-
<!DOCTYPE html>
|
|
66
|
-
<html lang="en">
|
|
67
|
-
<head>
|
|
68
|
-
<meta charset="UTF-8">
|
|
69
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
70
|
-
<title>SheetNext Demo</title>
|
|
71
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sheetnext
|
|
72
|
-
</head>
|
|
73
|
-
<body>
|
|
74
|
-
<div id="SNContainer" style="width:100vw;height:100vh;padding:0 7px 7px"></div>
|
|
75
|
-
<script src="https://cdn.jsdelivr.net/npm/sheetnext
|
|
76
|
-
<script>
|
|
77
|
-
const SN = new SheetNext(document.querySelector('#SNContainer'));
|
|
78
|
-
</script>
|
|
79
|
-
</body>
|
|
80
|
-
</html>
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
#### Internationalization (i18n)
|
|
84
|
-
|
|
85
|
-
The default language is English (en-US). A built-in Chinese (zh-CN) locale is available.
|
|
86
|
-
|
|
87
|
-
Import locale via npm:
|
|
88
|
-
|
|
89
|
-
```javascript
|
|
90
|
-
import SheetNext from 'sheetnext';
|
|
91
|
-
import zhCN from 'sheetnext/locales/zh-CN.js';
|
|
92
|
-
|
|
93
|
-
SheetNext.registerLocale('zh-CN', zhCN);
|
|
94
|
-
|
|
95
|
-
const SN = new SheetNext(document.querySelector('#SNContainer'), {
|
|
96
|
-
locale: 'zh-CN'
|
|
97
|
-
});
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Import locale via CDN:
|
|
101
|
-
|
|
102
|
-
```html
|
|
103
|
-
<script src="https://cdn.jsdelivr.net/npm/sheetnext
|
|
104
|
-
<script src="https://cdn.jsdelivr.net/npm/sheetnext
|
|
105
|
-
<script>
|
|
106
|
-
const SN = new SheetNext(document.querySelector('#SNContainer'), {
|
|
107
|
-
locale: 'zh-CN'
|
|
108
|
-
});
|
|
109
|
-
</script>
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### Option 2: AI-Driven Development (Recommended)
|
|
113
|
-
|
|
114
|
-
#### Step 1: Download the AI Development Reference
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
##
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/logo.png" alt="SheetNext Logo" width="80" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
A pure front-end spreadsheet component with Excel-like capabilities, built-in native AI workflows, and flexible LLM integration for data operations.
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
English | <a href="./README_CN.md">简体中文</a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://www.npmjs.com/package/sheetnext"><img src="https://img.shields.io/npm/v/sheetnext.svg" alt="npm version" /></a>
|
|
15
|
+
<a href="https://www.npmjs.com/package/sheetnext"><img src="https://img.shields.io/npm/dm/sheetnext.svg" alt="npm downloads" /></a>
|
|
16
|
+
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="license" /></a>
|
|
17
|
+
<img src="https://img.shields.io/badge/rendering-Canvas-ff8c00.svg" alt="Canvas rendering" />
|
|
18
|
+
<img src="https://img.shields.io/badge/workflow-AI%20Ready-00A67E.svg" alt="AI ready" />
|
|
19
|
+
<img src="https://img.shields.io/badge/file%20support-XLSX%20%7C%20CSV%20%7C%20JSON-1f6feb.svg" alt="file support" />
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<img src="docs/image_en.png" alt="SheetNext demo" width="100%" />
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
- SheetNext is a pure front-end, high-performance spreadsheet engine that provides enterprises with a ready-to-use intelligent spreadsheet foundation.
|
|
27
|
+
- With the AI-driven development approach, a single developer + AI can integrate and deliver complex enterprise spreadsheet solutions.
|
|
28
|
+
- Common scenarios like ledgers, budgets, analytics, data entry, and approvals can produce a first version in minutes.
|
|
29
|
+
|
|
30
|
+
## ✨ Key Features
|
|
31
|
+
|
|
32
|
+
- 📊 Full Spreadsheet Capabilities — Formula engine, charts, pivot tables, super tables, slicers, conditional formatting, data validation, sparklines, freeze panes, sorting & filtering, and more
|
|
33
|
+
- 🤖 AI-Powered Workflow — Built-in AI automation for template generation, data analysis, formula writing, and cross-sheet logic
|
|
34
|
+
- 📁 Native File Support — Import/export Excel (.xlsx), CSV, and JSON out of the box, no extra plugins needed
|
|
35
|
+
- 🚀 Zero-Config Setup — All features built in, no additional dependencies required
|
|
36
|
+
- ⚡ High-Performance Rendering — Canvas-based virtual scrolling handles large datasets with ease
|
|
37
|
+
|
|
38
|
+
## 🚀 Quick Start
|
|
39
|
+
|
|
40
|
+
SheetNext can be integrated with just a few lines of code and works with any front-end framework (Vue, React, Angular, etc.).
|
|
41
|
+
|
|
42
|
+
### Option 1: Traditional Integration
|
|
43
|
+
|
|
44
|
+
#### Install via npm
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install sheetnext
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```html
|
|
51
|
+
<!-- Container for the editor -->
|
|
52
|
+
<div id="SNContainer" style="width:100vw;height:100vh;padding:0 7px 7px"></div>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```javascript
|
|
56
|
+
import SheetNext from 'sheetnext';
|
|
57
|
+
import 'sheetnext.css';
|
|
58
|
+
|
|
59
|
+
const SN = new SheetNext(document.querySelector('#SNContainer'));
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### Browser Direct Import (CDN)
|
|
63
|
+
|
|
64
|
+
```html
|
|
65
|
+
<!DOCTYPE html>
|
|
66
|
+
<html lang="en">
|
|
67
|
+
<head>
|
|
68
|
+
<meta charset="UTF-8">
|
|
69
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
70
|
+
<title>SheetNext Demo</title>
|
|
71
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sheetnext/dist/sheetnext.css">
|
|
72
|
+
</head>
|
|
73
|
+
<body>
|
|
74
|
+
<div id="SNContainer" style="width:100vw;height:100vh;padding:0 7px 7px"></div>
|
|
75
|
+
<script src="https://cdn.jsdelivr.net/npm/sheetnext/dist/sheetnext.umd.js"></script>
|
|
76
|
+
<script>
|
|
77
|
+
const SN = new SheetNext(document.querySelector('#SNContainer'));
|
|
78
|
+
</script>
|
|
79
|
+
</body>
|
|
80
|
+
</html>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
#### Internationalization (i18n)
|
|
84
|
+
|
|
85
|
+
The default language is English (en-US). A built-in Chinese (zh-CN) locale is available.
|
|
86
|
+
|
|
87
|
+
Import locale via npm:
|
|
88
|
+
|
|
89
|
+
```javascript
|
|
90
|
+
import SheetNext from 'sheetnext';
|
|
91
|
+
import zhCN from 'sheetnext/locales/zh-CN.js';
|
|
92
|
+
|
|
93
|
+
SheetNext.registerLocale('zh-CN', zhCN);
|
|
94
|
+
|
|
95
|
+
const SN = new SheetNext(document.querySelector('#SNContainer'), {
|
|
96
|
+
locale: 'zh-CN'
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Import locale via CDN:
|
|
101
|
+
|
|
102
|
+
```html
|
|
103
|
+
<script src="https://cdn.jsdelivr.net/npm/sheetnext/dist/sheetnext.umd.js"></script>
|
|
104
|
+
<script src="https://cdn.jsdelivr.net/npm/sheetnext/dist/sheetnext.locale.zh-CN.umd.js"></script>
|
|
105
|
+
<script>
|
|
106
|
+
const SN = new SheetNext(document.querySelector('#SNContainer'), {
|
|
107
|
+
locale: 'zh-CN'
|
|
108
|
+
});
|
|
109
|
+
</script>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Option 2: AI-Driven Development (Recommended)
|
|
113
|
+
|
|
114
|
+
#### Step 1: Download the AI Development Reference
|
|
115
|
+
|
|
116
|
+
- For Codex Skills, use the ready-to-install skill directory: `docs/skill/sheetnext-dev/`.
|
|
117
|
+
- For other AI tools, open `docs/skill/sheetnext-dev/references/` in the repository.
|
|
118
|
+
- The core references are `docs/skill/sheetnext-dev/references/core-api.md`, `docs/skill/sheetnext-dev/references/events.md`, and `docs/skill/sheetnext-dev/references/enums.md`.
|
|
119
|
+
- Protocol supplements are `docs/skill/sheetnext-dev/references/ai-relay.md` and `docs/skill/sheetnext-dev/references/json-format.md`.
|
|
120
|
+
|
|
121
|
+
#### Step 2: Use the Skill or Feed `references` to Your AI Tool
|
|
122
|
+
|
|
123
|
+
For Codex, copy the generated skill into your Codex skills directory, then restart Codex:
|
|
124
|
+
|
|
125
|
+
```powershell
|
|
126
|
+
Copy-Item -Recurse -Force .\docs\skill\sheetnext-dev "$env:USERPROFILE\.codex\skills\sheetnext-dev"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
For Cursor / Claude / ChatGPT / Copilot or any AI coding assistant, provide the `docs/skill/sheetnext-dev/references/` reference set first, then describe your requirements.
|
|
130
|
+
|
|
131
|
+
Recommended prompt template:
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
You are a senior SheetNext AI development expert. Please read and understand the documentation I provide, then give a directly implementable solution.
|
|
135
|
+
Execution order:
|
|
136
|
+
1) Read: docs/skill/sheetnext-dev/references/core-api.md
|
|
137
|
+
2) Read as needed: docs/skill/sheetnext-dev/references/events.md, docs/skill/sheetnext-dev/references/enums.md, docs/skill/sheetnext-dev/references/ai-relay.md, and docs/skill/sheetnext-dev/references/json-format.md
|
|
138
|
+
3) Identify user goals (business goals + technical goals)
|
|
139
|
+
4) Output a minimum viable implementation (get it running first, then optimize)
|
|
140
|
+
5) All APIs and code must strictly follow the documentation
|
|
141
|
+
6) Provide verification steps and risk points
|
|
142
|
+
Constraints:
|
|
143
|
+
- Do not fabricate APIs
|
|
144
|
+
- Do not skip edge cases
|
|
145
|
+
- Prioritize reusing existing capabilities, avoid over-engineering
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
#### Step 3: Describe Your Business Goal
|
|
149
|
+
|
|
150
|
+
For example:
|
|
151
|
+
|
|
152
|
+
- "Build a sales pivot analysis template with charts and slicers"
|
|
153
|
+
- "Build a multi-sheet budget entry system with permissions and printing"
|
|
154
|
+
- "Migrate an existing Excel template to an online editable version"
|
|
155
|
+
|
|
156
|
+
## 🎯 Use Cases
|
|
157
|
+
|
|
158
|
+
- Online reporting systems, BI analytics front-ends, business dashboards
|
|
159
|
+
- Spreadsheet engine modules in ERP / CRM / Finance / Supply Chain systems
|
|
160
|
+
- Complex business forms for budgets, settlements, reconciliation, planning, and scheduling
|
|
161
|
+
- AI-powered scenarios: auto-generate tables, analysis, templates, and logic
|
|
162
|
+
|
|
163
|
+
## Browser Support
|
|
164
|
+
|
|
165
|
+
| Chrome | Firefox | Safari | Edge |
|
|
166
|
+
|--------|---------|--------|------|
|
|
167
|
+
| 80+ | 75+ | 13+ | 80+ |
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
Apache-2.0. See [LICENSE](./LICENSE).
|