sheetnext 0.2.11 → 0.2.13
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/dist/sheetnext.es.js +3 -3
- package/dist/sheetnext.locale.zh-CN.es.js +3 -3
- package/dist/sheetnext.locale.zh-CN.umd.js +3 -3
- package/dist/sheetnext.umd.js +3 -3
- package/docs/skill/sheetnext-dev/SKILL.md +46 -58
- package/docs/skill/sheetnext-dev/adapters/chatgpt.md +22 -22
- package/docs/skill/sheetnext-dev/adapters/claude.md +21 -21
- package/docs/skill/sheetnext-dev/adapters/codex.md +21 -21
- package/docs/skill/sheetnext-dev/adapters/copilot.md +15 -15
- package/docs/skill/sheetnext-dev/adapters/cursor.md +17 -17
- package/docs/skill/sheetnext-dev/agents/openai.yaml +7 -0
- package/docs/skill/sheetnext-dev/references/core-api.md +3211 -3181
- package/docs/skill/sheetnext-dev/references/enums.md +171 -171
- package/docs/skill/sheetnext-dev/references/events.md +341 -341
- package/docs/skill/sheetnext-dev/references/recipes.md +56 -56
- package/package.json +1 -1
- package/docs/skill/sheetnext-dev/GENERATION.md +0 -18
- package/docs/skill/sheetnext-dev/README.md +0 -44
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
# SheetNext Recipes
|
|
2
|
-
|
|
3
|
-
Short patterns for common SheetNext development tasks. Check `core-api.md` for exact signatures before expanding these examples.
|
|
4
|
-
|
|
5
|
-
## Initialize
|
|
6
|
-
|
|
7
|
-
```js
|
|
8
|
-
import SheetNext from 'sheetnext';
|
|
9
|
-
import 'sheetnext.css';
|
|
10
|
-
|
|
11
|
-
const SN = new SheetNext(document.querySelector('#SNContainer'));
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Insert A Template
|
|
15
|
-
|
|
16
|
-
```js
|
|
17
|
-
const sheet = SN.activeSheet;
|
|
18
|
-
const template = [
|
|
19
|
-
[{ v: 'Title', mr: 2, b: true, s: 16, h: 36 }, '', ''],
|
|
20
|
-
['Name', 'Amount', 'Remark'],
|
|
21
|
-
['Example', 100, '']
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
sheet.insertTemplate(template, 'A1', { border: true, align: 'center', width: 120 });
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Read And Write Cells
|
|
28
|
-
|
|
29
|
-
```js
|
|
30
|
-
const sheet = SN.activeSheet;
|
|
31
|
-
sheet.getCell('A1').value = 'Name';
|
|
32
|
-
sheet.getCell('B1').value = 'Amount';
|
|
33
|
-
sheet.getCell('B2').numFmt = '#,##0.00';
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Listen To Events
|
|
37
|
-
|
|
38
|
-
```js
|
|
39
|
-
SN.Event.on('afterSelectionChange', (e) => {
|
|
40
|
-
console.log(e.data.newCell);
|
|
41
|
-
});
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## JSON Import And Export
|
|
45
|
-
|
|
46
|
-
```js
|
|
47
|
-
const data = await SN.IO.getData();
|
|
48
|
-
SN.IO.setData(data);
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## File Export
|
|
52
|
-
|
|
53
|
-
```js
|
|
54
|
-
await SN.IO.export('XLSX');
|
|
55
|
-
await SN.IO.export('CSV');
|
|
56
|
-
```
|
|
1
|
+
# SheetNext Recipes
|
|
2
|
+
|
|
3
|
+
Short patterns for common SheetNext development tasks. Check `core-api.md` for exact signatures before expanding these examples.
|
|
4
|
+
|
|
5
|
+
## Initialize
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
import SheetNext from 'sheetnext';
|
|
9
|
+
import 'sheetnext.css';
|
|
10
|
+
|
|
11
|
+
const SN = new SheetNext(document.querySelector('#SNContainer'));
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Insert A Template
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
const sheet = SN.activeSheet;
|
|
18
|
+
const template = [
|
|
19
|
+
[{ v: 'Title', mr: 2, b: true, s: 16, h: 36 }, '', ''],
|
|
20
|
+
['Name', 'Amount', 'Remark'],
|
|
21
|
+
['Example', 100, '']
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
sheet.insertTemplate(template, 'A1', { border: true, align: 'center', width: 120 });
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Read And Write Cells
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
const sheet = SN.activeSheet;
|
|
31
|
+
sheet.getCell('A1').value = 'Name';
|
|
32
|
+
sheet.getCell('B1').value = 'Amount';
|
|
33
|
+
sheet.getCell('B2').numFmt = '#,##0.00';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Listen To Events
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
SN.Event.on('afterSelectionChange', (e) => {
|
|
40
|
+
console.log(e.data.newCell);
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## JSON Import And Export
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
const data = await SN.IO.getData();
|
|
48
|
+
SN.IO.setData(data);
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## File Export
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
await SN.IO.export('XLSX');
|
|
55
|
+
await SN.IO.export('CSV');
|
|
56
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sheetnext",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"description": "A pure front-end spreadsheet component with Excel-like capabilities, built-in native AI workflows, and flexible LLM integration for data operations.",
|
|
5
5
|
"homepage": "https://www.sheetnext.com",
|
|
6
6
|
"repository": {
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Generation
|
|
2
|
-
|
|
3
|
-
Generated on 2026-04-28 by `scripts/doc-scanner.js`.
|
|
4
|
-
|
|
5
|
-
## Source Inputs
|
|
6
|
-
|
|
7
|
-
- Public API comments and signatures under `src/core/`.
|
|
8
|
-
- Enum definitions from `src/enum/index.js`.
|
|
9
|
-
- Static protocol references preserved from `docs/static-references/ai-relay.md` and `docs/static-references/json-format.md`.
|
|
10
|
-
- Built-in examples from `scripts/doc-examples.js`.
|
|
11
|
-
|
|
12
|
-
## Output Contract
|
|
13
|
-
|
|
14
|
-
- `SKILL.md` is the portable skill entry point.
|
|
15
|
-
- `references/` contains generated or preserved Markdown references for agent lookup.
|
|
16
|
-
- `adapters/` contains optional tool-specific setup notes.
|
|
17
|
-
|
|
18
|
-
Do not manually edit generated API reference files. Update the documented source or static reference input, then rerun the scanner.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# SheetNext Dev Agent Skill
|
|
2
|
-
|
|
3
|
-
Generated from SheetNext API docs on 2026-04-28.
|
|
4
|
-
|
|
5
|
-
This directory is a portable Agent Skill package for SheetNext development. It is designed to work in two modes:
|
|
6
|
-
|
|
7
|
-
- Skill-aware agents can install or load the whole `sheetnext-dev/` directory.
|
|
8
|
-
- Other AI coding assistants can read `SKILL.md` first, then open the relevant files in `references/`.
|
|
9
|
-
|
|
10
|
-
## Package Layout
|
|
11
|
-
|
|
12
|
-
```text
|
|
13
|
-
sheetnext-dev/
|
|
14
|
-
SKILL.md # Portable skill entry point and operating rules
|
|
15
|
-
README.md # Human-facing usage notes
|
|
16
|
-
GENERATION.md # Regeneration notes and source inputs
|
|
17
|
-
adapters/ # Optional setup notes for specific AI tools
|
|
18
|
-
references/ # Source-of-truth SheetNext API references
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Recommended Use
|
|
22
|
-
|
|
23
|
-
1. Read `SKILL.md` before generating or modifying SheetNext code.
|
|
24
|
-
2. Read only the reference files needed for the task.
|
|
25
|
-
3. Verify exact method names and signatures in `references/core-api.md` before coding.
|
|
26
|
-
4. Treat `references/` as generated documentation; update SheetNext source comments or static docs, then rerun the scanner.
|
|
27
|
-
|
|
28
|
-
## Tool Adapters
|
|
29
|
-
|
|
30
|
-
- Codex: `adapters/codex.md`
|
|
31
|
-
- Claude: `adapters/claude.md`
|
|
32
|
-
- Cursor: `adapters/cursor.md`
|
|
33
|
-
- GitHub Copilot: `adapters/copilot.md`
|
|
34
|
-
- ChatGPT or generic assistants: `adapters/chatgpt.md`
|
|
35
|
-
|
|
36
|
-
The adapters are convenience instructions only. The portable contract is `SKILL.md` plus `references/`.
|
|
37
|
-
|
|
38
|
-
## Regenerate
|
|
39
|
-
|
|
40
|
-
From the `SNEditor` directory:
|
|
41
|
-
|
|
42
|
-
```powershell
|
|
43
|
-
node scripts\doc-scanner.js
|
|
44
|
-
```
|