@univerjs/sheets 1.3.1 → 1.5.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.
Files changed (92) hide show
  1. package/README.md +21 -5
  2. package/lib/cjs/facade.js +246 -57
  3. package/lib/cjs/index.js +1143 -21533
  4. package/lib/cjs/locale/ar-SA.js +1 -2
  5. package/lib/cjs/locale/ca-ES.js +1 -2
  6. package/lib/cjs/locale/de-DE.js +1 -2
  7. package/lib/cjs/locale/en-US.js +1 -2
  8. package/lib/cjs/locale/es-ES.js +1 -2
  9. package/lib/cjs/locale/fa-IR.js +1 -2
  10. package/lib/cjs/locale/fr-FR.js +1 -2
  11. package/lib/cjs/locale/id-ID.js +1 -2
  12. package/lib/cjs/locale/it-IT.js +1 -2
  13. package/lib/cjs/locale/ja-JP.js +1 -2
  14. package/lib/cjs/locale/ko-KR.js +1 -2
  15. package/lib/cjs/locale/pl-PL.js +1 -2
  16. package/lib/cjs/locale/pt-BR.js +1 -2
  17. package/lib/cjs/locale/ru-RU.js +1 -2
  18. package/lib/cjs/locale/sk-SK.js +1 -2
  19. package/lib/cjs/locale/vi-VN.js +1 -2
  20. package/lib/cjs/locale/zh-CN.js +1 -2
  21. package/lib/cjs/locale/zh-HK.js +1 -2
  22. package/lib/cjs/locale/zh-TW.js +1 -2
  23. package/lib/cjs/plugin-tI5Deb_a.js +22421 -0
  24. package/lib/cjs/worker.js +9 -0
  25. package/lib/es/facade.js +256 -67
  26. package/lib/es/index.js +719 -21110
  27. package/lib/es/locale/ar-SA.js +1 -2
  28. package/lib/es/locale/ca-ES.js +1 -2
  29. package/lib/es/locale/de-DE.js +1 -2
  30. package/lib/es/locale/en-US.js +1 -2
  31. package/lib/es/locale/es-ES.js +1 -2
  32. package/lib/es/locale/fa-IR.js +1 -2
  33. package/lib/es/locale/fr-FR.js +1 -2
  34. package/lib/es/locale/id-ID.js +1 -2
  35. package/lib/es/locale/it-IT.js +1 -2
  36. package/lib/es/locale/ja-JP.js +1 -2
  37. package/lib/es/locale/ko-KR.js +1 -2
  38. package/lib/es/locale/pl-PL.js +1 -2
  39. package/lib/es/locale/pt-BR.js +1 -2
  40. package/lib/es/locale/ru-RU.js +1 -2
  41. package/lib/es/locale/sk-SK.js +1 -2
  42. package/lib/es/locale/vi-VN.js +1 -2
  43. package/lib/es/locale/zh-CN.js +1 -2
  44. package/lib/es/locale/zh-HK.js +1 -2
  45. package/lib/es/locale/zh-TW.js +1 -2
  46. package/lib/es/plugin-Bmc8YRpc.js +20148 -0
  47. package/lib/es/worker.js +3 -0
  48. package/lib/facade.js +256 -67
  49. package/lib/index.js +719 -21110
  50. package/lib/locale/ar-SA.js +1 -2
  51. package/lib/locale/ca-ES.js +1 -2
  52. package/lib/locale/de-DE.js +1 -2
  53. package/lib/locale/en-US.js +1 -2
  54. package/lib/locale/es-ES.js +1 -2
  55. package/lib/locale/fa-IR.js +1 -2
  56. package/lib/locale/fr-FR.js +1 -2
  57. package/lib/locale/id-ID.js +1 -2
  58. package/lib/locale/it-IT.js +1 -2
  59. package/lib/locale/ja-JP.js +1 -2
  60. package/lib/locale/ko-KR.js +1 -2
  61. package/lib/locale/pl-PL.js +1 -2
  62. package/lib/locale/pt-BR.js +1 -2
  63. package/lib/locale/ru-RU.js +1 -2
  64. package/lib/locale/sk-SK.js +1 -2
  65. package/lib/locale/vi-VN.js +1 -2
  66. package/lib/locale/zh-CN.js +1 -2
  67. package/lib/locale/zh-HK.js +1 -2
  68. package/lib/locale/zh-TW.js +1 -2
  69. package/lib/plugin-Bmc8YRpc.js +20148 -0
  70. package/lib/types/commands/commands/move-rows-cols.command.d.ts +2 -2
  71. package/lib/types/commands/commands/reorder-range.command.d.ts +1 -1
  72. package/lib/types/commands/commands/set-border.command.d.ts +1 -1
  73. package/lib/types/commands/mutations/numfmt.mutation.d.ts +1 -1
  74. package/lib/types/controllers/permission/sheet-permission-init.controller.d.ts +3 -2
  75. package/lib/types/facade/f-range.d.ts +154 -7
  76. package/lib/types/facade/f-worksheet.d.ts +76 -2
  77. package/lib/types/index.d.ts +1 -1
  78. package/lib/types/models/range-protection.cache.d.ts +9 -9
  79. package/lib/types/models/range-theme-model.d.ts +1 -1
  80. package/lib/types/services/auto-fill/auto-fill.service.d.ts +1 -1
  81. package/lib/types/services/auto-fill/tools.d.ts +6 -6
  82. package/lib/types/services/exclusive-range/exclusive-range.service.d.ts +1 -1
  83. package/lib/types/services/numfmt/type.d.ts +1 -1
  84. package/lib/types/services/permission/range-permission/range-protection.ref-range.d.ts +13 -4
  85. package/lib/types/services/ref-range/util.d.ts +31 -16
  86. package/lib/types/services/selections/ref-selections.service.d.ts +1 -1
  87. package/lib/types/services/sheet-interceptor/interceptor-const.d.ts +2 -1
  88. package/lib/types/worker.d.ts +16 -0
  89. package/lib/umd/facade.js +1 -1
  90. package/lib/umd/index.js +2 -2
  91. package/lib/worker.js +3 -0
  92. package/package.json +17 -12
package/README.md CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  ## Package Overview
10
10
 
11
- | Package | UMD global | CSS | Locales | Facade entry |
12
- | --- | --- | :---: | :---: | :---: |
13
- | `@univerjs/sheets` | `UniverSheets` | No | Yes | Yes |
11
+ | Package | UMD global | CSS | Locales | Facade entry | Worker entry |
12
+ | --- | --- | :---: | :---: | :---: | :---: |
13
+ | `@univerjs/sheets` | `UniverSheets` | No | Yes | Yes | Yes |
14
14
 
15
15
  ## Installation
16
16
 
@@ -20,10 +20,10 @@ pnpm add @univerjs/sheets
20
20
  npm install @univerjs/sheets
21
21
  ```
22
22
 
23
- Keep all `@univerjs/*` packages on the same version.
24
-
25
23
  ## Usage
26
24
 
25
+ Start with the [integration setup](https://docs.univer.ai/) for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
26
+
27
27
  ```ts
28
28
  import EnUS from '@univerjs/sheets/locale/en-US';
29
29
  import { UniverSheetsPlugin } from '@univerjs/sheets';
@@ -33,6 +33,22 @@ univer.registerPlugin(UniverSheetsPlugin);
33
33
  // Merge EnUS into your Univer locale map when this package contributes UI text.
34
34
  ```
35
35
 
36
+ ### Worker usage
37
+
38
+ On the main thread, import `UniverSheetsPlugin` from `@univerjs/sheets`. Set `notExecuteFormula: true` to delegate calculation to the worker.
39
+
40
+ In the worker entry, import `UniverSheetsPlugin` from `@univerjs/sheets/worker`:
41
+
42
+ ```ts
43
+ import { UniverSheetsPlugin } from '@univerjs/sheets/worker';
44
+
45
+ univer.registerPlugin(UniverSheetsPlugin, { onlyRegisterFormulaRelatedMutations: true });
46
+ ```
47
+
48
+ ## Integration Notes
49
+
50
+ - Import `@univerjs/sheets/facade` when using this package through Univer Facade APIs.
51
+
36
52
  ## Resources
37
53
 
38
54
  - [Documentation](https://docs.univer.ai)