sheetnext 0.2.9 → 0.2.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/README.md +18 -18
- package/README_CN.md +18 -18
- package/dist/sheetnext.css +1 -1
- package/dist/sheetnext.es.js +3 -3
- package/dist/sheetnext.locale.zh-CN.es.js +2 -2
- package/dist/sheetnext.locale.zh-CN.umd.js +3 -3
- package/dist/sheetnext.umd.js +3 -3
- package/docs/skill/sheetnext-dev/GENERATION.md +18 -18
- package/docs/skill/sheetnext-dev/README.md +44 -44
- package/docs/skill/sheetnext-dev/SKILL.md +58 -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/references/ai-relay.md +284 -284
- package/docs/skill/sheetnext-dev/references/core-api.md +3181 -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/json-format.md +426 -426
- package/docs/skill/sheetnext-dev/references/recipes.md +56 -56
- package/package.json +1 -1
|
@@ -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.10",
|
|
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": {
|