@univerjs/preset-sheets-node-core 0.25.1 → 1.0.0-alpha.1

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 (111) hide show
  1. package/README.md +3 -3
  2. package/lib/cjs/index.js +135 -1
  3. package/lib/cjs/locales/ar-SA.js +17 -1
  4. package/lib/cjs/locales/ca-ES.js +17 -1
  5. package/lib/cjs/locales/de-DE.js +17 -1
  6. package/lib/cjs/locales/en-US.js +17 -1
  7. package/lib/cjs/locales/es-ES.js +17 -1
  8. package/lib/cjs/locales/fa-IR.js +17 -1
  9. package/lib/cjs/locales/fr-FR.js +17 -1
  10. package/lib/cjs/locales/id-ID.js +17 -1
  11. package/lib/cjs/locales/it-IT.js +17 -1
  12. package/lib/cjs/locales/ja-JP.js +17 -1
  13. package/lib/cjs/locales/ko-KR.js +17 -1
  14. package/lib/cjs/locales/pl-PL.js +17 -1
  15. package/lib/cjs/locales/pt-BR.js +17 -1
  16. package/lib/cjs/locales/ru-RU.js +17 -1
  17. package/lib/cjs/locales/sk-SK.js +17 -1
  18. package/lib/cjs/locales/vi-VN.js +17 -1
  19. package/lib/cjs/locales/zh-CN.js +17 -1
  20. package/lib/cjs/locales/zh-HK.js +17 -1
  21. package/lib/cjs/locales/zh-TW.js +17 -1
  22. package/lib/cjs/rolldown-runtime-C_NdSu1c.js +34 -0
  23. package/lib/cjs/worker.js +46 -1
  24. package/lib/es/index.js +74 -61
  25. package/lib/es/locales/ar-SA.js +11 -16
  26. package/lib/es/locales/ca-ES.js +11 -16
  27. package/lib/es/locales/de-DE.js +11 -16
  28. package/lib/es/locales/en-US.js +11 -16
  29. package/lib/es/locales/es-ES.js +11 -16
  30. package/lib/es/locales/fa-IR.js +11 -16
  31. package/lib/es/locales/fr-FR.js +11 -16
  32. package/lib/es/locales/id-ID.js +11 -16
  33. package/lib/es/locales/it-IT.js +11 -16
  34. package/lib/es/locales/ja-JP.js +11 -16
  35. package/lib/es/locales/ko-KR.js +11 -16
  36. package/lib/es/locales/pl-PL.js +11 -16
  37. package/lib/es/locales/pt-BR.js +11 -16
  38. package/lib/es/locales/ru-RU.js +11 -16
  39. package/lib/es/locales/sk-SK.js +11 -16
  40. package/lib/es/locales/vi-VN.js +11 -16
  41. package/lib/es/locales/zh-CN.js +11 -16
  42. package/lib/es/locales/zh-HK.js +11 -16
  43. package/lib/es/locales/zh-TW.js +11 -16
  44. package/lib/es/worker.js +25 -23
  45. package/lib/index.js +74 -61
  46. package/lib/locales/ar-SA.js +11 -16
  47. package/lib/locales/ca-ES.js +11 -16
  48. package/lib/locales/de-DE.js +11 -16
  49. package/lib/locales/en-US.js +11 -16
  50. package/lib/locales/es-ES.js +11 -16
  51. package/lib/locales/fa-IR.js +11 -16
  52. package/lib/locales/fr-FR.js +11 -16
  53. package/lib/locales/id-ID.js +11 -16
  54. package/lib/locales/it-IT.js +11 -16
  55. package/lib/locales/ja-JP.js +11 -16
  56. package/lib/locales/ko-KR.js +11 -16
  57. package/lib/locales/pl-PL.js +11 -16
  58. package/lib/locales/pt-BR.js +11 -16
  59. package/lib/locales/ru-RU.js +11 -16
  60. package/lib/locales/sk-SK.js +11 -16
  61. package/lib/locales/vi-VN.js +11 -16
  62. package/lib/locales/zh-CN.js +11 -16
  63. package/lib/locales/zh-HK.js +11 -16
  64. package/lib/locales/zh-TW.js +11 -16
  65. package/lib/types/index.d.ts +16 -1
  66. package/lib/types/locales/ar-SA.d.ts +1 -3
  67. package/lib/types/locales/ca-ES.d.ts +1 -3
  68. package/lib/types/locales/de-DE.d.ts +1 -3
  69. package/lib/types/locales/en-US.d.ts +1 -3
  70. package/lib/types/locales/es-ES.d.ts +1 -3
  71. package/lib/types/locales/fa-IR.d.ts +1 -3
  72. package/lib/types/locales/fr-FR.d.ts +1 -3
  73. package/lib/types/locales/id-ID.d.ts +1 -3
  74. package/lib/types/locales/it-IT.d.ts +1 -3
  75. package/lib/types/locales/ja-JP.d.ts +1 -3
  76. package/lib/types/locales/ko-KR.d.ts +1 -3
  77. package/lib/types/locales/pl-PL.d.ts +1 -3
  78. package/lib/types/locales/pt-BR.d.ts +1 -3
  79. package/lib/types/locales/ru-RU.d.ts +1 -3
  80. package/lib/types/locales/sk-SK.d.ts +1 -3
  81. package/lib/types/locales/vi-VN.d.ts +1 -3
  82. package/lib/types/locales/zh-CN.d.ts +1 -3
  83. package/lib/types/locales/zh-HK.d.ts +1 -3
  84. package/lib/types/locales/zh-TW.d.ts +1 -3
  85. package/lib/types/preset.d.ts +46 -0
  86. package/lib/types/types.d.ts +15 -11
  87. package/lib/types/worker.d.ts +17 -1
  88. package/lib/worker.js +25 -23
  89. package/package.json +25 -28
  90. package/lib/types/umd.d.ts +0 -30
  91. package/lib/umd/index.js +0 -66
  92. package/lib/umd/locales/ar-SA.js +0 -60
  93. package/lib/umd/locales/ca-ES.js +0 -55
  94. package/lib/umd/locales/de-DE.js +0 -60
  95. package/lib/umd/locales/en-US.js +0 -60
  96. package/lib/umd/locales/es-ES.js +0 -55
  97. package/lib/umd/locales/fa-IR.js +0 -60
  98. package/lib/umd/locales/fr-FR.js +0 -60
  99. package/lib/umd/locales/id-ID.js +0 -60
  100. package/lib/umd/locales/it-IT.js +0 -60
  101. package/lib/umd/locales/ja-JP.js +0 -59
  102. package/lib/umd/locales/ko-KR.js +0 -53
  103. package/lib/umd/locales/pl-PL.js +0 -60
  104. package/lib/umd/locales/pt-BR.js +0 -60
  105. package/lib/umd/locales/ru-RU.js +0 -47
  106. package/lib/umd/locales/sk-SK.js +0 -55
  107. package/lib/umd/locales/vi-VN.js +0 -59
  108. package/lib/umd/locales/zh-CN.js +0 -60
  109. package/lib/umd/locales/zh-HK.js +0 -60
  110. package/lib/umd/locales/zh-TW.js +0 -60
  111. package/lib/umd/worker.js +0 -1
@@ -1,16 +1,11 @@
1
- import { mergeLocales as e } from "@univerjs/core";
2
- import r from "@univerjs/sheets/locale/pl-PL";
3
- import s from "@univerjs/sheets-data-validation/locale/pl-PL";
4
- import o from "@univerjs/sheets-filter/locale/pl-PL";
5
- import t from "@univerjs/sheets-formula/locale/pl-PL";
6
- import i from "@univerjs/sheets-hyper-link/locale/pl-PL";
7
- const u = e(
8
- r,
9
- s,
10
- o,
11
- t,
12
- i
13
- );
14
- export {
15
- u as default
16
- };
1
+ import univerjssheets from "@univerjs/sheets/locale/pl-PL";
2
+ import univerjssheetsdatavalidation from "@univerjs/sheets-data-validation/locale/pl-PL";
3
+ import univerjssheetsfilter from "@univerjs/sheets-filter/locale/pl-PL";
4
+ import univerjssheetsformula from "@univerjs/sheets-formula/locale/pl-PL";
5
+ import univerjssheetshyperlink from "@univerjs/sheets-hyper-link/locale/pl-PL";
6
+
7
+ //#region src/locales/pl-PL.ts
8
+ var pl_PL_default = Object.assign({}, univerjssheets, univerjssheetsdatavalidation, univerjssheetsfilter, univerjssheetsformula, univerjssheetshyperlink);
9
+
10
+ //#endregion
11
+ export { pl_PL_default as default };
@@ -1,16 +1,11 @@
1
- import { mergeLocales as e } from "@univerjs/core";
2
- import r from "@univerjs/sheets/locale/pt-BR";
3
- import s from "@univerjs/sheets-data-validation/locale/pt-BR";
4
- import t from "@univerjs/sheets-filter/locale/pt-BR";
5
- import o from "@univerjs/sheets-formula/locale/pt-BR";
6
- import i from "@univerjs/sheets-hyper-link/locale/pt-BR";
7
- const h = e(
8
- r,
9
- s,
10
- t,
11
- o,
12
- i
13
- );
14
- export {
15
- h as default
16
- };
1
+ import univerjssheets from "@univerjs/sheets/locale/pt-BR";
2
+ import univerjssheetsdatavalidation from "@univerjs/sheets-data-validation/locale/pt-BR";
3
+ import univerjssheetsfilter from "@univerjs/sheets-filter/locale/pt-BR";
4
+ import univerjssheetsformula from "@univerjs/sheets-formula/locale/pt-BR";
5
+ import univerjssheetshyperlink from "@univerjs/sheets-hyper-link/locale/pt-BR";
6
+
7
+ //#region src/locales/pt-BR.ts
8
+ var pt_BR_default = Object.assign({}, univerjssheets, univerjssheetsdatavalidation, univerjssheetsfilter, univerjssheetsformula, univerjssheetshyperlink);
9
+
10
+ //#endregion
11
+ export { pt_BR_default as default };
@@ -1,16 +1,11 @@
1
- import { mergeLocales as r } from "@univerjs/core";
2
- import e from "@univerjs/sheets/locale/ru-RU";
3
- import s from "@univerjs/sheets-data-validation/locale/ru-RU";
4
- import o from "@univerjs/sheets-filter/locale/ru-RU";
5
- import t from "@univerjs/sheets-formula/locale/ru-RU";
6
- import i from "@univerjs/sheets-hyper-link/locale/ru-RU";
7
- const h = r(
8
- e,
9
- s,
10
- o,
11
- t,
12
- i
13
- );
14
- export {
15
- h as default
16
- };
1
+ import univerjssheets from "@univerjs/sheets/locale/ru-RU";
2
+ import univerjssheetsdatavalidation from "@univerjs/sheets-data-validation/locale/ru-RU";
3
+ import univerjssheetsfilter from "@univerjs/sheets-filter/locale/ru-RU";
4
+ import univerjssheetsformula from "@univerjs/sheets-formula/locale/ru-RU";
5
+ import univerjssheetshyperlink from "@univerjs/sheets-hyper-link/locale/ru-RU";
6
+
7
+ //#region src/locales/ru-RU.ts
8
+ var ru_RU_default = Object.assign({}, univerjssheets, univerjssheetsdatavalidation, univerjssheetsfilter, univerjssheetsformula, univerjssheetshyperlink);
9
+
10
+ //#endregion
11
+ export { ru_RU_default as default };
@@ -1,16 +1,11 @@
1
- import { mergeLocales as e } from "@univerjs/core";
2
- import r from "@univerjs/sheets/locale/sk-SK";
3
- import s from "@univerjs/sheets-data-validation/locale/sk-SK";
4
- import o from "@univerjs/sheets-filter/locale/sk-SK";
5
- import t from "@univerjs/sheets-formula/locale/sk-SK";
6
- import i from "@univerjs/sheets-hyper-link/locale/sk-SK";
7
- const h = e(
8
- r,
9
- s,
10
- o,
11
- t,
12
- i
13
- );
14
- export {
15
- h as default
16
- };
1
+ import univerjssheets from "@univerjs/sheets/locale/sk-SK";
2
+ import univerjssheetsdatavalidation from "@univerjs/sheets-data-validation/locale/sk-SK";
3
+ import univerjssheetsfilter from "@univerjs/sheets-filter/locale/sk-SK";
4
+ import univerjssheetsformula from "@univerjs/sheets-formula/locale/sk-SK";
5
+ import univerjssheetshyperlink from "@univerjs/sheets-hyper-link/locale/sk-SK";
6
+
7
+ //#region src/locales/sk-SK.ts
8
+ var sk_SK_default = Object.assign({}, univerjssheets, univerjssheetsdatavalidation, univerjssheetsfilter, univerjssheetsformula, univerjssheetshyperlink);
9
+
10
+ //#endregion
11
+ export { sk_SK_default as default };
@@ -1,16 +1,11 @@
1
- import { mergeLocales as e } from "@univerjs/core";
2
- import r from "@univerjs/sheets/locale/vi-VN";
3
- import s from "@univerjs/sheets-data-validation/locale/vi-VN";
4
- import o from "@univerjs/sheets-filter/locale/vi-VN";
5
- import t from "@univerjs/sheets-formula/locale/vi-VN";
6
- import i from "@univerjs/sheets-hyper-link/locale/vi-VN";
7
- const v = e(
8
- r,
9
- s,
10
- o,
11
- t,
12
- i
13
- );
14
- export {
15
- v as default
16
- };
1
+ import univerjssheets from "@univerjs/sheets/locale/vi-VN";
2
+ import univerjssheetsdatavalidation from "@univerjs/sheets-data-validation/locale/vi-VN";
3
+ import univerjssheetsfilter from "@univerjs/sheets-filter/locale/vi-VN";
4
+ import univerjssheetsformula from "@univerjs/sheets-formula/locale/vi-VN";
5
+ import univerjssheetshyperlink from "@univerjs/sheets-hyper-link/locale/vi-VN";
6
+
7
+ //#region src/locales/vi-VN.ts
8
+ var vi_VN_default = Object.assign({}, univerjssheets, univerjssheetsdatavalidation, univerjssheetsfilter, univerjssheetsformula, univerjssheetshyperlink);
9
+
10
+ //#endregion
11
+ export { vi_VN_default as default };
@@ -1,16 +1,11 @@
1
- import { mergeLocales as e } from "@univerjs/core";
2
- import r from "@univerjs/sheets/locale/zh-CN";
3
- import s from "@univerjs/sheets-data-validation/locale/zh-CN";
4
- import o from "@univerjs/sheets-filter/locale/zh-CN";
5
- import t from "@univerjs/sheets-formula/locale/zh-CN";
6
- import i from "@univerjs/sheets-hyper-link/locale/zh-CN";
7
- const u = e(
8
- r,
9
- s,
10
- o,
11
- t,
12
- i
13
- );
14
- export {
15
- u as default
16
- };
1
+ import univerjssheets from "@univerjs/sheets/locale/zh-CN";
2
+ import univerjssheetsdatavalidation from "@univerjs/sheets-data-validation/locale/zh-CN";
3
+ import univerjssheetsfilter from "@univerjs/sheets-filter/locale/zh-CN";
4
+ import univerjssheetsformula from "@univerjs/sheets-formula/locale/zh-CN";
5
+ import univerjssheetshyperlink from "@univerjs/sheets-hyper-link/locale/zh-CN";
6
+
7
+ //#region src/locales/zh-CN.ts
8
+ var zh_CN_default = Object.assign({}, univerjssheets, univerjssheetsdatavalidation, univerjssheetsfilter, univerjssheetsformula, univerjssheetshyperlink);
9
+
10
+ //#endregion
11
+ export { zh_CN_default as default };
@@ -1,16 +1,11 @@
1
- import { mergeLocales as e } from "@univerjs/core";
2
- import r from "@univerjs/sheets/locale/zh-HK";
3
- import s from "@univerjs/sheets-data-validation/locale/zh-HK";
4
- import o from "@univerjs/sheets-filter/locale/zh-HK";
5
- import t from "@univerjs/sheets-formula/locale/zh-HK";
6
- import i from "@univerjs/sheets-hyper-link/locale/zh-HK";
7
- const u = e(
8
- r,
9
- s,
10
- o,
11
- t,
12
- i
13
- );
14
- export {
15
- u as default
16
- };
1
+ import univerjssheets from "@univerjs/sheets/locale/zh-HK";
2
+ import univerjssheetsdatavalidation from "@univerjs/sheets-data-validation/locale/zh-HK";
3
+ import univerjssheetsfilter from "@univerjs/sheets-filter/locale/zh-HK";
4
+ import univerjssheetsformula from "@univerjs/sheets-formula/locale/zh-HK";
5
+ import univerjssheetshyperlink from "@univerjs/sheets-hyper-link/locale/zh-HK";
6
+
7
+ //#region src/locales/zh-HK.ts
8
+ var zh_HK_default = Object.assign({}, univerjssheets, univerjssheetsdatavalidation, univerjssheetsfilter, univerjssheetsformula, univerjssheetshyperlink);
9
+
10
+ //#endregion
11
+ export { zh_HK_default as default };
@@ -1,16 +1,11 @@
1
- import { mergeLocales as e } from "@univerjs/core";
2
- import r from "@univerjs/sheets/locale/zh-TW";
3
- import s from "@univerjs/sheets-data-validation/locale/zh-TW";
4
- import o from "@univerjs/sheets-filter/locale/zh-TW";
5
- import t from "@univerjs/sheets-formula/locale/zh-TW";
6
- import i from "@univerjs/sheets-hyper-link/locale/zh-TW";
7
- const u = e(
8
- r,
9
- s,
10
- o,
11
- t,
12
- i
13
- );
14
- export {
15
- u as default
16
- };
1
+ import univerjssheets from "@univerjs/sheets/locale/zh-TW";
2
+ import univerjssheetsdatavalidation from "@univerjs/sheets-data-validation/locale/zh-TW";
3
+ import univerjssheetsfilter from "@univerjs/sheets-filter/locale/zh-TW";
4
+ import univerjssheetsformula from "@univerjs/sheets-formula/locale/zh-TW";
5
+ import univerjssheetshyperlink from "@univerjs/sheets-hyper-link/locale/zh-TW";
6
+
7
+ //#region src/locales/zh-TW.ts
8
+ var zh_TW_default = Object.assign({}, univerjssheets, univerjssheetsdatavalidation, univerjssheetsfilter, univerjssheetsformula, univerjssheetshyperlink);
9
+
10
+ //#endregion
11
+ export { zh_TW_default as default };
@@ -1,4 +1,19 @@
1
- export * from './umd';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * from './preset';
2
17
  export * from '@univerjs/docs';
3
18
  export * from '@univerjs/engine-formula';
4
19
  export * from '@univerjs/rpc-node';
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -1,4 +1,2 @@
1
- declare const _default: {
2
- [x: string]: any;
3
- };
1
+ declare const _default: any;
4
2
  export default _default;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IPreset } from '@univerjs/presets';
17
+ import type { IUniverFormulaConfig } from './types';
18
+ import '@univerjs/sheets/facade';
19
+ import '@univerjs/sheets-formula/facade';
20
+ import '@univerjs/sheets-data-validation/facade';
21
+ import '@univerjs/engine-formula/facade';
22
+ import '@univerjs/sheets-filter/facade';
23
+ import '@univerjs/sheets-hyper-link/facade';
24
+ import '@univerjs/sheets-numfmt/facade';
25
+ import '@univerjs/sheets-sort/facade';
26
+ import '@univerjs/sheets-thread-comment/facade';
27
+ export type * from '@univerjs/engine-formula/facade';
28
+ export type * from '@univerjs/sheets-data-validation/facade';
29
+ export type * from '@univerjs/sheets-filter/facade';
30
+ export type * from '@univerjs/sheets-formula/facade';
31
+ export type * from '@univerjs/sheets-hyper-link/facade';
32
+ export type * from '@univerjs/sheets-numfmt/facade';
33
+ export type * from '@univerjs/sheets-sort/facade';
34
+ export type * from '@univerjs/sheets-thread-comment/facade';
35
+ export type * from '@univerjs/sheets/facade';
36
+ export interface IUniverSheetsNodeCorePresetConfig {
37
+ /**
38
+ * The formula configuration.
39
+ */
40
+ formula?: IUniverFormulaConfig;
41
+ /**
42
+ * The URL of the worker script.
43
+ */
44
+ workerSrc?: string;
45
+ }
46
+ export declare function UniverSheetsNodeCorePreset(config?: Partial<IUniverSheetsNodeCorePresetConfig>): IPreset;
@@ -1,16 +1,20 @@
1
- import { IUniverConfig, Plugin, PluginCtor } from '@univerjs/core';
2
- import { IUniverEngineFormulaConfig } from '@univerjs/engine-formula';
3
- import { IUniverSheetsFormulaBaseConfig } from '@univerjs/sheets-formula';
4
1
  /**
5
- * A collection of plugins and their default configs.
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
6
15
  */
7
- export interface IPreset {
8
- plugins: Array<PluginCtor<Plugin> | [PluginCtor<Plugin>, ConstructorParameters<PluginCtor<Plugin>>[0]]>;
9
- locales?: IUniverConfig['locales'];
10
- }
11
- export interface IPresetOptions {
12
- lazy?: boolean;
13
- }
16
+ import type { IUniverEngineFormulaConfig } from '@univerjs/engine-formula';
17
+ import type { IUniverSheetsFormulaBaseConfig } from '@univerjs/sheets-formula';
14
18
  export interface IUniverFormulaConfig extends Pick<IUniverEngineFormulaConfig, 'function'>, Pick<IUniverSheetsFormulaBaseConfig, 'description' | 'initialFormulaComputing'> {
15
19
  }
16
20
  export interface IUniverFormulaWorkerConfig extends Pick<IUniverEngineFormulaConfig, 'function'> {
@@ -1,4 +1,20 @@
1
- import { IPreset, IUniverFormulaWorkerConfig } from './types';
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { IPreset } from '@univerjs/presets';
17
+ import type { IUniverFormulaWorkerConfig } from './types';
2
18
  export * from '@univerjs/engine-formula';
3
19
  export * from '@univerjs/rpc-node';
4
20
  export * from '@univerjs/sheets';
package/lib/worker.js CHANGED
@@ -1,24 +1,26 @@
1
- import { UniverFormulaEnginePlugin as o } from "@univerjs/engine-formula";
2
- export * from "@univerjs/engine-formula";
3
- import { UniverRPCNodeWorkerPlugin as t } from "@univerjs/rpc-node";
4
- export * from "@univerjs/rpc-node";
5
- import { UniverSheetsPlugin as n } from "@univerjs/sheets";
6
- export * from "@univerjs/sheets";
7
- import { UniverRemoteSheetsFormulaPlugin as i } from "@univerjs/sheets-formula";
8
- export * from "@univerjs/sheets-formula";
9
- function l(e = {}) {
10
- const {
11
- formula: r
12
- } = e;
13
- return {
14
- plugins: [
15
- [n, { onlyRegisterFormulaRelatedMutations: !0 }],
16
- [o, { function: r == null ? void 0 : r.function }],
17
- t,
18
- i
19
- ]
20
- };
1
+ import { UniverFormulaEnginePlugin } from "@univerjs/engine-formula";
2
+ import { UniverRPCNodeWorkerPlugin } from "@univerjs/rpc-node";
3
+ import { UniverSheetsPlugin } from "@univerjs/sheets";
4
+ import { UniverRemoteSheetsFormulaPlugin } from "@univerjs/sheets-formula";
5
+
6
+ export * from "@univerjs/engine-formula"
7
+
8
+ export * from "@univerjs/rpc-node"
9
+
10
+ export * from "@univerjs/sheets"
11
+
12
+ export * from "@univerjs/sheets-formula"
13
+
14
+ //#region src/worker.ts
15
+ function UniverSheetsNodeCoreWorkerPreset(config = {}) {
16
+ const { formula } = config;
17
+ return { plugins: [
18
+ [UniverSheetsPlugin, { onlyRegisterFormulaRelatedMutations: true }],
19
+ [UniverFormulaEnginePlugin, { function: formula === null || formula === void 0 ? void 0 : formula.function }],
20
+ UniverRPCNodeWorkerPlugin,
21
+ UniverRemoteSheetsFormulaPlugin
22
+ ] };
21
23
  }
22
- export {
23
- l as UniverSheetsNodeCoreWorkerPreset
24
- };
24
+
25
+ //#endregion
26
+ export { UniverSheetsNodeCoreWorkerPreset };