excel-collab 0.0.3 → 0.0.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.
Files changed (81) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/LICENSE +21 -21
  3. package/README.md +119 -89
  4. package/lib/{Chart-B5P7BSgJ.mjs → Chart-B4zRuRrj.mjs} +4 -4
  5. package/lib/{Chart-B5P7BSgJ.mjs.map → Chart-B4zRuRrj.mjs.map} +1 -1
  6. package/lib/{Chart-ChBHO6oN.js → Chart-DWZZ-CmV.js} +3 -3
  7. package/lib/{Chart-ChBHO6oN.js.map → Chart-DWZZ-CmV.js.map} +1 -1
  8. package/lib/browser-9tvcBhtW.js +2 -0
  9. package/lib/{browser-vV4F0pQh.js.map → browser-9tvcBhtW.js.map} +1 -1
  10. package/lib/{browser-D0mSLGul.mjs → browser-DyM4TSRh.mjs} +2 -2
  11. package/lib/{browser-D0mSLGul.mjs.map → browser-DyM4TSRh.mjs.map} +1 -1
  12. package/lib/demo/index.d.ts +0 -0
  13. package/lib/e2e/util.d.ts +1 -1
  14. package/lib/excel.js +1 -1
  15. package/lib/excel.mjs +184 -186
  16. package/lib/icon/android-icon-144x144.png +0 -0
  17. package/lib/icon/android-icon-192x192.png +0 -0
  18. package/lib/icon/android-icon-36x36.png +0 -0
  19. package/lib/icon/android-icon-48x48.png +0 -0
  20. package/lib/icon/android-icon-72x72.png +0 -0
  21. package/lib/icon/android-icon-96x96.png +0 -0
  22. package/lib/icon/apple-icon-114x114.png +0 -0
  23. package/lib/icon/apple-icon-120x120.png +0 -0
  24. package/lib/icon/apple-icon-144x144.png +0 -0
  25. package/lib/icon/apple-icon-152x152.png +0 -0
  26. package/lib/icon/apple-icon-180x180.png +0 -0
  27. package/lib/icon/apple-icon-57x57.png +0 -0
  28. package/lib/icon/apple-icon-60x60.png +0 -0
  29. package/lib/icon/apple-icon-72x72.png +0 -0
  30. package/lib/icon/apple-icon-76x76.png +0 -0
  31. package/lib/icon/apple-icon-precomposed.png +0 -0
  32. package/lib/icon/apple-icon.png +0 -0
  33. package/lib/icon/browserconfig.xml +11 -0
  34. package/lib/icon/favicon-16x16.png +0 -0
  35. package/lib/icon/favicon-32x32.png +0 -0
  36. package/lib/icon/favicon-96x96.png +0 -0
  37. package/lib/icon/favicon.ico +0 -0
  38. package/lib/icon/manifest.json +41 -0
  39. package/lib/icon/ms-icon-144x144.png +0 -0
  40. package/lib/icon/ms-icon-150x150.png +0 -0
  41. package/lib/icon/ms-icon-310x310.png +0 -0
  42. package/lib/icon/ms-icon-70x70.png +0 -0
  43. package/lib/icon/rotate.png +0 -0
  44. package/lib/{index-DoNF8xMt.mjs → index-DCjSDDwD.mjs} +5523 -5476
  45. package/lib/index-DCjSDDwD.mjs.map +1 -0
  46. package/lib/{index-CqBqm-fX.js → index-Dxm3oBMN.js} +104 -104
  47. package/lib/index-Dxm3oBMN.js.map +1 -0
  48. package/lib/{jszip.min-BM_tHl3X.js → jszip.min-CE0Sw416.js} +2 -2
  49. package/lib/{jszip.min-BM_tHl3X.js.map → jszip.min-CE0Sw416.js.map} +1 -1
  50. package/lib/{jszip.min-BtlodmTS.mjs → jszip.min-oCXO1N8-.mjs} +2 -2
  51. package/lib/{jszip.min-BtlodmTS.mjs.map → jszip.min-oCXO1N8-.mjs.map} +1 -1
  52. package/lib/src/collaboration/index.d.ts +4 -4
  53. package/lib/src/collaboration/local.d.ts +1 -1
  54. package/lib/src/collaboration/server.d.ts +4 -4
  55. package/lib/src/collaboration/type.d.ts +1 -13
  56. package/lib/src/containers/MenuBar/File.d.ts +7 -1
  57. package/lib/src/containers/store/base.d.ts +1 -0
  58. package/lib/src/containers/store/context.d.ts +2 -3
  59. package/lib/src/formula/numberFormat.d.ts +4 -6
  60. package/lib/src/i18n/lang/en.json.d.ts +111 -110
  61. package/lib/src/i18n/lang/zh.json.d.ts +111 -110
  62. package/lib/src/types/components.d.ts +34 -0
  63. package/lib/src/types/controller.d.ts +15 -31
  64. package/lib/src/types/model.d.ts +4 -4
  65. package/lib/style.css +1 -1
  66. package/lib/worker-COTVtn10.mjs +5094 -0
  67. package/lib/worker-COTVtn10.mjs.map +1 -0
  68. package/lib/worker-DBaoNekX.js +12 -0
  69. package/lib/worker-DBaoNekX.js.map +1 -0
  70. package/lib/worker.js +1 -1
  71. package/lib/worker.mjs +1 -1
  72. package/package.json +12 -10
  73. package/lib/browser-vV4F0pQh.js +0 -2
  74. package/lib/index-CqBqm-fX.js.map +0 -1
  75. package/lib/index-DoNF8xMt.mjs.map +0 -1
  76. package/lib/worker-CtkVt1CM.js +0 -12
  77. package/lib/worker-CtkVt1CM.js.map +0 -1
  78. package/lib/worker-Db-VGgf_.mjs +0 -4322
  79. package/lib/worker-Db-VGgf_.mjs.map +0 -1
  80. /package/lib/{playground/index.d.ts → demo/sentry.d.ts} +0 -0
  81. /package/lib/{playground → demo}/worker.d.ts +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,34 @@
1
+ # Changelog
2
+
3
+ ## [0.0.5](https://github.com/nusr/excel/compare/v0.0.4...v0.0.5) (2024-12-24)
4
+
5
+ ### Bug Fixes
6
+
7
+ * toggle sheet ([a9f1f12](https://github.com/nusr/excel/commit/a9f1f12dba58be7f04e0dfe150bf0d69b181a31c))
8
+
9
+ ## [0.0.4](https://github.com/nusr/excel/compare/v0.0.3...v0.0.4) (2024-12-24)
10
+
11
+ ### Bug Fixes
12
+
13
+ * number format ([f62f605](https://github.com/nusr/excel/commit/f62f605bef9b10e67a6107680911d80b7c4f3f65))
14
+ * publish ([ec540a1](https://github.com/nusr/excel/commit/ec540a1ea9b6c3059048e6f4972aebc4ce97747e))
15
+ * remove examples ([8846b18](https://github.com/nusr/excel/commit/8846b1851fdf06d04e16e71c3ad17599d8b4cf65))
16
+ * render loop ([744811f](https://github.com/nusr/excel/commit/744811f06433a71497a7036fe6b77ae7bcedc03a))
17
+ * supbase ([c14c6ba](https://github.com/nusr/excel/commit/c14c6ba4562335a8f57b9ceadc0a7ce7b0eadd83))
18
+
19
+ ## [0.0.3](https://github.com/nusr/excel/compare/v0.0.2...v0.0.3) (2024-12-21)
20
+
21
+ ## [0.0.2](https://github.com/nusr/excel/compare/v0.0.1...v0.0.2) (2024-12-21)
22
+
23
+ ### Features
24
+
25
+ * add examples ([33b4475](https://github.com/nusr/excel/commit/33b44751142d816df45efaba0980a6f4a3cb1f3a))
26
+ * library mode ([4bfbeb4](https://github.com/nusr/excel/commit/4bfbeb48d5635bf063172660a2757eed848ac479))
27
+
28
+ ### Bug Fixes
29
+
30
+ * ci ([3b5865d](https://github.com/nusr/excel/commit/3b5865dd7d58926f75481e328a770cdb0ccf6c46))
31
+ * remove console.log ([3b3aaef](https://github.com/nusr/excel/commit/3b3aaefb45d6a0d18978d022af5ccb1f6f4134e7))
32
+ * setCurrentSheetId ([3e3d9e7](https://github.com/nusr/excel/commit/3e3d9e73694fe24abf37d7be93693d72cf3b4daf))
33
+ * supabase ([41902b2](https://github.com/nusr/excel/commit/41902b23f80b8d5142061f5948e32fdba546d8e4))
34
+ * update README.md ([d0c6ccc](https://github.com/nusr/excel/commit/d0c6cccca04de164cea8ebceb71c222d8c1a1517))
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Steve Xu
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Steve Xu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,92 +1,122 @@
1
- # Online Collaboration Excel
2
-
3
- [![CI](https://github.com/nusr/excel/actions/workflows/main.yml/badge.svg)](https://github.com/nusr/excel/actions/workflows/main.yml)
4
- [![codecov](https://codecov.io/gh/nusr/excel/branch/main/graph/badge.svg?token=ZOC8RHD3Z1)](https://codecov.io/gh/nusr/excel)
5
- ![GitHub](https://img.shields.io/github/license/nusr/excel.svg)
6
- ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/nusr/excel.svg)
7
-
8
- [online demo](https://nusr.github.io/excel/)
9
-
10
- ![demo](./scripts/demo.gif)
11
-
12
- ## Install
13
-
14
- ```bash
15
- npm i --save excel-collab
16
- ```
17
-
18
- ## Examples
19
-
20
- [Simple Example](https://github.com/nusr/excel/tree/main/examples/simple)
21
-
22
- [Custom Example](https://github.com/nusr/excel/tree/main/examples/custom)
23
-
24
- [Collaboration Example](https://github.com/nusr/excel/tree/main/examples/collaboration)
25
-
26
- ## Unit Test
27
-
28
- ```bash
29
- npm run test
30
- ```
31
-
32
- ## E2E Test
33
-
34
- ```bash
35
- pnpm exec playwright install
36
- npm run e2e
37
- ```
38
-
39
- ## Supported Features
40
-
41
- - [x] Online Collaboration
42
- - [x] Create File
43
- - [x] Change File Name
44
- - [x] Web Worker parse formulas
45
- - [x] OffScreenCanvas Render
46
- - [x] Undo
47
- - [x] Redo
48
- - [x] Copy
49
- - [x] Cut
50
- - [x] Paste
51
- - [x] Formulas
52
- - [x] Font Family
53
- - [x] Font Size
54
- - [x] Font Color
55
- - [x] Fill Color
56
- - [x] Bold
57
- - [x] Italic
58
- - [x] Strike
59
- - [x] Underline
60
- - [x] Border
61
- - [x] Text Vertical Align
62
- - [x] Text Horizontal Align
63
- - [x] Text Wrapping
64
- - [x] Number Format
65
- - [x] AutoFilter
66
- - [x] Merge Cells
67
- - [x] Chart
68
- - [x] Floating Picture
69
- - [x] Define Name
70
- - [x] Insert Row
71
- - [x] Insert Column
72
- - [x] Delete Row
73
- - [x] Delete Column
74
- - [x] Hide Row
75
- - [x] Hide Column
76
- - [x] Row Height
77
- - [x] Column Width
78
- - [x] Insert Sheet
79
- - [x] Delete Sheet
80
- - [x] Rename Sheet
81
- - [x] Hide Sheet
82
- - [x] Unhide Sheet
83
- - [x] Import XLSX
84
- - [x] Export XLSX
85
- - [x] Import CSV
86
- - [x] Export CSV
87
- - [x] Dark Mode
88
- - [x] I18N
89
-
1
+ # Online Collaboration Excel
2
+
3
+ [![CI](https://github.com/nusr/excel/actions/workflows/main.yml/badge.svg)](https://github.com/nusr/excel/actions/workflows/main.yml)
4
+ [![codecov](https://codecov.io/gh/nusr/excel/branch/main/graph/badge.svg?token=ZOC8RHD3Z1)](https://codecov.io/gh/nusr/excel)
5
+ ![GitHub](https://img.shields.io/github/license/nusr/excel.svg)
6
+ ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/nusr/excel.svg)
7
+
8
+ [online demo](https://nusr.github.io/excel/)
9
+
10
+ ![demo](./scripts/demo.gif)
11
+
12
+ ## Installation
13
+
14
+ ```
15
+ npm i --save excel-collab
16
+ ```
17
+
18
+ ## Examples
19
+
20
+ [Simple Example](https://stackblitz.com/edit/nusr-excel-simple)
21
+
22
+ [Custom Example](https://stackblitz.com/edit/nusr-excel-custom)
23
+
24
+ [Collaboration Example](https://stackblitz.com/edit/nusr-excel-collaboration)
25
+
26
+ ## Developing
27
+
28
+ ```bash
29
+ git clone https://github.com/nusr/excel.git
30
+ cd excel
31
+
32
+ npm i -g pnpm
33
+ pnpm i
34
+ npm run start
35
+ ```
36
+
37
+ ## Environment
38
+
39
+ Create an `.env` file and modify it as the `.env.example` file
40
+
41
+ | Key | Required | Description |
42
+ | ---------------------- | -------- | ------------------ |
43
+ | VITE_SUPABASE_URL | optional | Supbase url |
44
+ | VITE_SUPABASE_ANON_KEY | optional | Supbase anon key |
45
+ | VITE_DEFAULT_EXCEL_ID | optional | default excel uuid |
46
+
47
+ ## Supbase
48
+
49
+ Collaborative editing uses [Supabase](https://supabase.com/) as backend.
50
+ You need to configure `VITE_SUPABASE_URL` and `VITE_SUPABASE_ANON_KEY`.
51
+ With Row Level Security (RLS) disabled, anonymous users will be able to read/write data in the table.
52
+
53
+ ```sql
54
+ CREATE TABLE IF NOT EXISTS history (
55
+ id SERIAL PRIMARY KEY,
56
+ doc_id UUID,
57
+ update TEXT,
58
+ create_time TIMESTAMP WITH TIME ZONE NULL DEFAULT NOW(),
59
+ );
60
+
61
+ -- document table need to enable real time
62
+ CREATE TABLE IF NOT EXISTS document (
63
+ id UUID DEFAULT uuid_generate_v4() PRIMARY KEY,
64
+ name VARCHAR(20),
65
+ create_time TIMESTAMP WITH TIME ZONE NULL DEFAULT NOW(),
66
+ );
67
+ ```
68
+
69
+ ## Supported Features
70
+
71
+ - [x] Online Collaboration
72
+ - [x] Create File
73
+ - [x] Change File Name
74
+ - [x] Web Worker parse formulas
75
+ - [x] OffScreenCanvas Render
76
+ - [x] Undo
77
+ - [x] Redo
78
+ - [x] Copy
79
+ - [x] Cut
80
+ - [x] Paste
81
+ - [x] Formulas
82
+ - [x] Font Family
83
+ - [x] Font Size
84
+ - [x] Font Color
85
+ - [x] Fill Color
86
+ - [x] Bold
87
+ - [x] Italic
88
+ - [x] Strike
89
+ - [x] Underline
90
+ - [x] Border
91
+ - [x] Text Vertical Align
92
+ - [x] Text Horizontal Align
93
+ - [x] Text Wrapping
94
+ - [x] Number Format
95
+ - [x] AutoFilter
96
+ - [x] Merge Cells
97
+ - [x] Chart
98
+ - [x] Floating Picture
99
+ - [x] Define Name
100
+ - [x] Insert Row
101
+ - [x] Insert Column
102
+ - [x] Delete Row
103
+ - [x] Delete Column
104
+ - [x] Hide Row
105
+ - [x] Hide Column
106
+ - [x] Row Height
107
+ - [x] Column Width
108
+ - [x] Insert Sheet
109
+ - [x] Delete Sheet
110
+ - [x] Rename Sheet
111
+ - [x] Hide Sheet
112
+ - [x] Unhide Sheet
113
+ - [x] Import XLSX
114
+ - [x] Export XLSX
115
+ - [x] Import CSV
116
+ - [x] Export CSV
117
+ - [x] Dark Mode
118
+ - [x] I18N
119
+
90
120
  ## Supported Formulas
91
121
 
92
122
  ### Math
@@ -1,9 +1,9 @@
1
1
  var go = Object.defineProperty;
2
2
  var po = (i, t, e) => t in i ? go(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
3
  var k = (i, t, e) => po(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { j as bt } from "./index-DoNF8xMt.mjs";
4
+ import { j as bt } from "./index-DCjSDDwD.mjs";
5
5
  import { memo as _n, useRef as qi, useEffect as Gi } from "react";
6
- import { a as Zi, p as mo, C as Ji, d as Qi } from "./worker-Db-VGgf_.mjs";
6
+ import { g as Zi, p as mo, C as Ji, d as Qi } from "./worker-COTVtn10.mjs";
7
7
  /*!
8
8
  * @kurkle/color v0.3.4
9
9
  * https://github.com/kurkle/color#readme
@@ -8626,7 +8626,7 @@ class xn extends Ze {
8626
8626
  }
8627
8627
  }
8628
8628
  k(xn, "id", "timeseries"), k(xn, "defaults", Ze.defaults);
8629
- const oh = "_chart_14rmf_1", rh = {
8629
+ const oh = "_chart_j1hte_1", rh = {
8630
8630
  chart: oh
8631
8631
  };
8632
8632
  ii.register(
@@ -8788,4 +8788,4 @@ mh.displayName = "Chart";
8788
8788
  export {
8789
8789
  mh as default
8790
8790
  };
8791
- //# sourceMappingURL=Chart-B5P7BSgJ.mjs.map
8791
+ //# sourceMappingURL=Chart-B4zRuRrj.mjs.map