sheetnext 0.1.8 → 0.2.0

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 CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2025 SheetNext
189
+ Copyright 2025-2026 SheetNext
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -1,76 +1,161 @@
1
- <div align="center">
2
- <div><img src="docs/logo.png" alt="SheetNext Logo" width="100" style="vertical-align: middle;"/></div>
3
- <h1>SheetNext</h1>
4
- <div>✨ 数行代码可集成一个纯前端高性能 Excel 编辑器。</div>
5
- <div>🤖 内置超级AI工作流程,目标用 AI 操纵 Excel 表格完成所有任务。</div>
6
- <div>
7
- <a href="https://www.sheetnext.com/">🏠 官网</a> |
8
- <a href="https://www.sheetnext.com/editor">🎯 在线体验</a> |
9
- <a href="https://github.com/wyyazlz/sheetnext/blob/master/DOCS.md">📖 文档</a> |
10
- <a href="https://github.com/wyyazlz/sheetnext/blob/master/AGENT.md">🤖 AI中转文档</a>
11
- </div>
12
- </div>
13
-
14
- ---
15
-
16
- <div align="center">
17
- <img src="docs/demo.png" alt="SheetNext Demo" />
18
- </div>
19
-
20
- ## ✨ 特点
21
-
22
- - 📊 **电子表格功能** - 支持电子表格核心功能如:单元格编辑、样式、公式引擎、图表、排序、筛选等
23
- - 🤖 **AI 工作流** - 内置 AI 全自动操作工作流,简单配置可以生成模板、数据分析、公式编写、跨表逻辑操纵等
24
- - 📁 **导入导出** - 原生支持 Excel (.xlsx) 文件的导入和导出,无需插件前端秒操作
25
- - 🚀 **开箱即用** - 不用单独配置任何库和插件,安装后简单配置即用所有功能
26
- - 🔄 **快速迭代** - 版本快速迭代更新,有问题可随时联系或提交 issue
27
-
28
- ## 🚀 快速开始
29
-
30
- ### 📦 使用 npm 安装
31
-
32
- ```bash
33
- npm install sheetnext
34
- ```
35
- ```html
36
- <div id="SNContainer" style="width:100vw;height:100vh;padding:0 7px 7px"></div>
37
- ```
38
- ```javascript
39
- import SheetNext from 'sheetnext';
40
- import 'sheetnext.css';
41
-
42
- // 注意设置容器#SNContainer宽高
43
- const SN = new SheetNext(document.querySelector('#SNContainer'));
44
- ```
45
-
46
- ### 🌐 浏览器直接引入
47
-
48
- ```html
49
- <!-- 引入样式 -->
50
- <link rel="stylesheet" href="dist/sheetnext.css">
51
-
52
- <!-- 编辑器容器 -->
53
- <div id="SNContainer" style="width: 100vw; height: 100vh;padding:0 7px 7px"></div>
54
-
55
- <!-- 引入脚本 -->
56
- <script src="dist/sheetnext.umd.js"></script>
57
-
58
- <!-- 初始化,注意设置宽高 -->
59
- <script>
60
- const SN = new SheetNext(document.querySelector('#SNContainer'));
61
- </script>
62
- ```
63
-
64
- ## ⚙️ 初始化配置
65
-
66
- ```javascript
67
- const SN = new SheetNext(document.querySelector('#container'), {
68
- AI_URL: "http://localhost:3000/sheetnextAI", // AI 中转地址(可选)
69
- AI_TOKEN: "your-token" // 中转 token(可选)
70
- });
71
- ```
72
-
73
- ## 🔗 相关链接
74
-
75
- - 🏠 [官网](https://www.sheetnext.com)
76
- - 📦 [npm 包地址](https://www.npmjs.com/package/sheetnext)
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 Screenshot" 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/dist/sheetnext.css';
58
+
59
+ const SN = new SheetNext(document.querySelector('#SNContainer'));
60
+ ```
61
+
62
+ #### Browser Direct Import (UMD)
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="dist/sheetnext.css">
72
+ </head>
73
+ <body>
74
+ <div id="SNContainer" style="width:100vw;height:100vh;padding:0 7px 7px"></div>
75
+ <script src="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 UMD:
101
+
102
+ ```html
103
+ <script src="dist/sheetnext.umd.js"></script>
104
+ <script src="dist/locales/zh-CN.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
+ - Download `docs-detail.md` from the repository root: [docs-detail.md](https://github.com/wyyazlz/sheetnext/blob/master/docs/docs-detail.md)
117
+
118
+ #### Step 2: Feed `docs-detail` to Your AI Tool
119
+
120
+ Use Cursor / Claude / ChatGPT / Copilot or any AI coding assistant. Provide `docs-detail` first, then describe your requirements.
121
+
122
+ Recommended prompt template:
123
+
124
+ ```text
125
+ You are a senior SheetNext AI development expert. Please read and understand the documentation I provide, then give a directly implementable solution.
126
+ Execution order:
127
+ 1) Read: docs-detail
128
+ 2) Identify user goals (business goals + technical goals)
129
+ 3) Output a minimum viable implementation (get it running first, then optimize)
130
+ 4) All APIs and code must strictly follow the documentation
131
+ 5) Provide verification steps and risk points
132
+ Constraints:
133
+ - Do not fabricate APIs
134
+ - Do not skip edge cases
135
+ - Prioritize reusing existing capabilities, avoid over-engineering
136
+ ```
137
+
138
+ #### Step 3: Describe Your Business Goal
139
+
140
+ For example:
141
+
142
+ - "Build a sales pivot analysis template with charts and slicers"
143
+ - "Build a multi-sheet budget entry system with permissions and printing"
144
+ - "Migrate an existing Excel template to an online editable version"
145
+
146
+ ## 🎯 Use Cases
147
+
148
+ - Online reporting systems, BI analytics front-ends, business dashboards
149
+ - Spreadsheet engine modules in ERP / CRM / Finance / Supply Chain systems
150
+ - Complex business forms for budgets, settlements, reconciliation, planning, and scheduling
151
+ - AI-powered scenarios: auto-generate tables, analysis, templates, and logic
152
+
153
+ ## Browser Support
154
+
155
+ | Chrome | Firefox | Safari | Edge |
156
+ |--------|---------|--------|------|
157
+ | 80+ | 75+ | 13+ | 80+ |
158
+
159
+ ## License
160
+
161
+ Apache-2.0. See [LICENSE](./LICENSE).
package/README_CN.md ADDED
@@ -0,0 +1,161 @@
1
+ <p align="center">
2
+ <img src="docs/logo.png" alt="SheetNext Logo" width="80" />
3
+ </p>
4
+
5
+ <p align="center">
6
+ 一款纯前端、媲美 Excel 的电子表格控件,内置原生 AI 工作流,可灵活接入大模型进行数据操作。
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="./README.md">English</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 Screenshot" width="100%" />
24
+ </p>
25
+
26
+ - SheetNext 是一款纯前端、高性能的电子表格引擎,为企业提供开箱即用的智能表格能力底座。
27
+ - 提供AI开发方案,一个人 + AI,即可完成企业级复杂表格业务的集成与交付。
28
+ - 台账、预算、分析、填报、审批等常见场景,几分钟产出首版。
29
+
30
+ ## ✨ 核心特点
31
+
32
+ - 📊 完整的电子表格功能 — 公式引擎、图表、数据透视表、超级表、切片器、条件格式、数据验证、迷你图、冻结窗格、排序筛选等高级能力全覆盖
33
+ - 🤖 AI 智能工作流 — 内置 AI 全自动操作流程,模板生成、数据分析、公式编写、跨表逻辑轻松实现
34
+ - 📁 原生文件支持 — 原生支持 Excel (.xlsx)、CSV、JSON 导入导出,无需额外插件
35
+ - 🚀 开箱即用 — 零配置启动,所有功能内置,无需单独安装依赖库
36
+ - ⚡ 高性能渲染 — 基于 Canvas 虚拟滚动,轻松处理大数据量表格
37
+
38
+ ## 🚀 快速开始
39
+
40
+ SheetNext 只需数行代码即可引入完整功能,支持 Vue、React、Angular 等任意前端框架。
41
+
42
+ ### 方案一:传统开发集成
43
+
44
+ #### 使用 npm 安装
45
+
46
+ ```bash
47
+ npm install sheetnext
48
+ ```
49
+
50
+ ```html
51
+ <!-- 放置编辑器的容器 -->
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/dist/sheetnext.css';
58
+
59
+ const SN = new SheetNext(document.querySelector('#SNContainer'));
60
+ ```
61
+
62
+ #### 浏览器直接引入(UMD)
63
+
64
+ ```html
65
+ <!DOCTYPE html>
66
+ <html lang="zh-CN">
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="dist/sheetnext.css">
72
+ </head>
73
+ <body>
74
+ <div id="SNContainer" style="width:100vw;height:100vh;padding:0 7px 7px"></div>
75
+ <script src="dist/sheetnext.umd.js"></script>
76
+ <script>
77
+ const SN = new SheetNext(document.querySelector('#SNContainer'));
78
+ </script>
79
+ </body>
80
+ </html>
81
+ ```
82
+
83
+ #### 国际化配置
84
+
85
+ 默认语言为英文(en-US),内置中文(zh-CN)语言包。
86
+
87
+ 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
+ UMD 方式引入语言包:
101
+
102
+ ```html
103
+ <script src="dist/sheetnext.umd.js"></script>
104
+ <script src="dist/locales/zh-CN.js"></script>
105
+ <script>
106
+ const SN = new SheetNext(document.querySelector('#SNContainer'), {
107
+ locale: 'zh-CN'
108
+ });
109
+ </script>
110
+ ```
111
+
112
+ ### 方案二:AI 驱动开发(推荐)
113
+
114
+ #### Step 1:下载 AI 开发资料
115
+
116
+ - 下载仓库根目录的 `docs-detail.md`:[docs-detail.md](https://github.com/wyyazlz/sheetnext/blob/master/docs/docs-detail.md)
117
+
118
+ #### Step 2:把 `docs-detail` 交给 AI
119
+
120
+ 可使用 Cursor / Claude / ChatGPT / Copilot 等工具,先喂 `docs-detail` 再提需求。
121
+
122
+ 推荐指令模板:
123
+
124
+ ```text
125
+ 你是资深 SheetNext AI 开发专家,请先阅读并理解我提供的文档,再给出可直接落地的方案。
126
+ 执行顺序:
127
+ 1) 先阅读:docs-detail
128
+ 2) 识别用户目标(业务目标 + 技术目标)
129
+ 3) 输出最小可行实现(先能跑,再优化)
130
+ 4) 所有 API 与代码写法必须严格对齐文档
131
+ 5) 给出验证步骤和风险点
132
+ 约束:
133
+ - 不编造 API
134
+ - 不跳过边界条件
135
+ - 优先复用已有能力,避免过度设计
136
+ ```
137
+
138
+ #### Step 3:给出你的业务目标
139
+
140
+ 例如:
141
+
142
+ - "做一个销售数据透视分析模板,包含图表和切片器"
143
+ - "做一个多 sheet 的预算填报系统,带权限和打印"
144
+ - "把现有 Excel 模板迁移成在线可编辑版本"
145
+
146
+ ## 🎯 适用场景
147
+
148
+ - 在线报表系统、BI 分析前端、经营驾驶舱
149
+ - ERP/CRM/财务/供应链系统中的表格引擎模块
150
+ - 预算、结算、对账、计划、排产等复杂业务表单
151
+ - AI 自动做表、自动分析、自动生成模板与逻辑的场景
152
+
153
+ ## 浏览器支持
154
+
155
+ | Chrome | Firefox | Safari | Edge |
156
+ |--------|---------|--------|------|
157
+ | 80+ | 75+ | 13+ | 80+ |
158
+
159
+ ## 许可证
160
+
161
+ Apache-2.0,详见 [LICENSE](./LICENSE)。