@univerjs/preset-sheets-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 (112) hide show
  1. package/README.md +3 -3
  2. package/lib/cjs/index.js +184 -1
  3. package/lib/cjs/locales/ar-SA.js +23 -1
  4. package/lib/cjs/locales/ca-ES.js +23 -1
  5. package/lib/cjs/locales/de-DE.js +23 -1
  6. package/lib/cjs/locales/en-US.js +23 -1
  7. package/lib/cjs/locales/es-ES.js +23 -1
  8. package/lib/cjs/locales/fa-IR.js +23 -1
  9. package/lib/cjs/locales/fr-FR.js +23 -1
  10. package/lib/cjs/locales/id-ID.js +23 -1
  11. package/lib/cjs/locales/it-IT.js +23 -1
  12. package/lib/cjs/locales/ja-JP.js +23 -1
  13. package/lib/cjs/locales/ko-KR.js +23 -1
  14. package/lib/cjs/locales/pl-PL.js +23 -1
  15. package/lib/cjs/locales/pt-BR.js +23 -1
  16. package/lib/cjs/locales/ru-RU.js +23 -1
  17. package/lib/cjs/locales/sk-SK.js +23 -1
  18. package/lib/cjs/locales/vi-VN.js +23 -1
  19. package/lib/cjs/locales/zh-CN.js +23 -1
  20. package/lib/cjs/locales/zh-HK.js +23 -1
  21. package/lib/cjs/locales/zh-TW.js +23 -1
  22. package/lib/cjs/rolldown-runtime-C_NdSu1c.js +34 -0
  23. package/lib/cjs/worker.js +19 -1
  24. package/lib/es/index.js +112 -115
  25. package/lib/es/locales/ar-SA.js +14 -22
  26. package/lib/es/locales/ca-ES.js +14 -22
  27. package/lib/es/locales/de-DE.js +14 -22
  28. package/lib/es/locales/en-US.js +14 -22
  29. package/lib/es/locales/es-ES.js +14 -22
  30. package/lib/es/locales/fa-IR.js +14 -22
  31. package/lib/es/locales/fr-FR.js +14 -22
  32. package/lib/es/locales/id-ID.js +14 -22
  33. package/lib/es/locales/it-IT.js +14 -22
  34. package/lib/es/locales/ja-JP.js +14 -22
  35. package/lib/es/locales/ko-KR.js +14 -22
  36. package/lib/es/locales/pl-PL.js +14 -22
  37. package/lib/es/locales/pt-BR.js +14 -22
  38. package/lib/es/locales/ru-RU.js +14 -22
  39. package/lib/es/locales/sk-SK.js +14 -22
  40. package/lib/es/locales/vi-VN.js +14 -22
  41. package/lib/es/locales/zh-CN.js +14 -22
  42. package/lib/es/locales/zh-HK.js +14 -22
  43. package/lib/es/locales/zh-TW.js +14 -22
  44. package/lib/es/worker.js +17 -19
  45. package/lib/index.css +7177 -1
  46. package/lib/index.js +112 -115
  47. package/lib/locales/ar-SA.js +14 -22
  48. package/lib/locales/ca-ES.js +14 -22
  49. package/lib/locales/de-DE.js +14 -22
  50. package/lib/locales/en-US.js +14 -22
  51. package/lib/locales/es-ES.js +14 -22
  52. package/lib/locales/fa-IR.js +14 -22
  53. package/lib/locales/fr-FR.js +14 -22
  54. package/lib/locales/id-ID.js +14 -22
  55. package/lib/locales/it-IT.js +14 -22
  56. package/lib/locales/ja-JP.js +14 -22
  57. package/lib/locales/ko-KR.js +14 -22
  58. package/lib/locales/pl-PL.js +14 -22
  59. package/lib/locales/pt-BR.js +14 -22
  60. package/lib/locales/ru-RU.js +14 -22
  61. package/lib/locales/sk-SK.js +14 -22
  62. package/lib/locales/vi-VN.js +14 -22
  63. package/lib/locales/zh-CN.js +14 -22
  64. package/lib/locales/zh-HK.js +14 -22
  65. package/lib/locales/zh-TW.js +14 -22
  66. package/lib/types/index.d.ts +16 -1
  67. package/lib/types/locales/ar-SA.d.ts +1 -3
  68. package/lib/types/locales/ca-ES.d.ts +1 -3
  69. package/lib/types/locales/de-DE.d.ts +1 -3
  70. package/lib/types/locales/en-US.d.ts +1 -3
  71. package/lib/types/locales/es-ES.d.ts +1 -3
  72. package/lib/types/locales/fa-IR.d.ts +1 -3
  73. package/lib/types/locales/fr-FR.d.ts +1 -3
  74. package/lib/types/locales/id-ID.d.ts +1 -3
  75. package/lib/types/locales/it-IT.d.ts +1 -3
  76. package/lib/types/locales/ja-JP.d.ts +1 -3
  77. package/lib/types/locales/ko-KR.d.ts +1 -3
  78. package/lib/types/locales/pl-PL.d.ts +1 -3
  79. package/lib/types/locales/pt-BR.d.ts +1 -3
  80. package/lib/types/locales/ru-RU.d.ts +1 -3
  81. package/lib/types/locales/sk-SK.d.ts +1 -3
  82. package/lib/types/locales/vi-VN.d.ts +1 -3
  83. package/lib/types/locales/zh-CN.d.ts +1 -3
  84. package/lib/types/locales/zh-HK.d.ts +1 -3
  85. package/lib/types/locales/zh-TW.d.ts +1 -3
  86. package/lib/types/preset.d.ts +61 -0
  87. package/lib/types/types.d.ts +19 -15
  88. package/lib/types/worker.d.ts +17 -1
  89. package/lib/worker.js +17 -19
  90. package/package.json +26 -28
  91. package/lib/types/umd.d.ts +0 -51
  92. package/lib/umd/index.js +0 -426
  93. package/lib/umd/locales/ar-SA.js +0 -69
  94. package/lib/umd/locales/ca-ES.js +0 -64
  95. package/lib/umd/locales/de-DE.js +0 -69
  96. package/lib/umd/locales/en-US.js +0 -69
  97. package/lib/umd/locales/es-ES.js +0 -64
  98. package/lib/umd/locales/fa-IR.js +0 -69
  99. package/lib/umd/locales/fr-FR.js +0 -69
  100. package/lib/umd/locales/id-ID.js +0 -69
  101. package/lib/umd/locales/it-IT.js +0 -69
  102. package/lib/umd/locales/ja-JP.js +0 -68
  103. package/lib/umd/locales/ko-KR.js +0 -62
  104. package/lib/umd/locales/pl-PL.js +0 -69
  105. package/lib/umd/locales/pt-BR.js +0 -69
  106. package/lib/umd/locales/ru-RU.js +0 -56
  107. package/lib/umd/locales/sk-SK.js +0 -64
  108. package/lib/umd/locales/vi-VN.js +0 -68
  109. package/lib/umd/locales/zh-CN.js +0 -69
  110. package/lib/umd/locales/zh-HK.js +0 -69
  111. package/lib/umd/locales/zh-TW.js +0 -69
  112. package/lib/umd/worker.js +0 -1
package/lib/worker.js CHANGED
@@ -1,20 +1,18 @@
1
- import { UniverFormulaEnginePlugin as n } from "@univerjs/engine-formula";
2
- import { UniverRPCWorkerThreadPlugin as o } from "@univerjs/rpc";
3
- import { UniverSheetsPlugin as i } from "@univerjs/sheets";
4
- import { UniverRemoteSheetsFormulaPlugin as t } from "@univerjs/sheets-formula";
5
- function g(r = {}) {
6
- const {
7
- formula: e
8
- } = r;
9
- return {
10
- plugins: [
11
- [i, { onlyRegisterFormulaRelatedMutations: !0 }],
12
- [n, { function: e == null ? void 0 : e.function }],
13
- o,
14
- t
15
- ]
16
- };
1
+ import { UniverFormulaEnginePlugin } from "@univerjs/engine-formula";
2
+ import { UniverRPCWorkerThreadPlugin } from "@univerjs/rpc";
3
+ import { UniverSheetsPlugin } from "@univerjs/sheets";
4
+ import { UniverRemoteSheetsFormulaPlugin } from "@univerjs/sheets-formula";
5
+
6
+ //#region src/worker.ts
7
+ function UniverSheetsCoreWorkerPreset(config = {}) {
8
+ const { formula } = config;
9
+ return { plugins: [
10
+ [UniverSheetsPlugin, { onlyRegisterFormulaRelatedMutations: true }],
11
+ [UniverFormulaEnginePlugin, { function: formula === null || formula === void 0 ? void 0 : formula.function }],
12
+ UniverRPCWorkerThreadPlugin,
13
+ UniverRemoteSheetsFormulaPlugin
14
+ ] };
17
15
  }
18
- export {
19
- g as UniverSheetsCoreWorkerPreset
20
- };
16
+
17
+ //#endregion
18
+ export { UniverSheetsCoreWorkerPreset };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/preset-sheets-core",
3
- "version": "0.25.1",
3
+ "version": "1.0.0-alpha.1",
4
4
  "private": false,
5
5
  "description": "Preset for core Univer Sheets spreadsheet features.",
6
6
  "author": "DreamNum Co., Ltd. <developer@univer.ai>",
@@ -12,10 +12,10 @@
12
12
  "homepage": "https://univer.ai",
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "https://github.com/dream-num/univer-presets"
15
+ "url": "https://github.com/dream-num/univer"
16
16
  },
17
17
  "bugs": {
18
- "url": "https://github.com/dream-num/univer-presets/issues"
18
+ "url": "https://github.com/dream-num/univer/issues"
19
19
  },
20
20
  "keywords": [
21
21
  "univer",
@@ -32,14 +32,9 @@
32
32
  "require": "./lib/cjs/index.js",
33
33
  "types": "./lib/types/index.d.ts"
34
34
  },
35
- "./*": {
36
- "import": "./lib/es/*",
37
- "require": "./lib/cjs/*",
38
- "types": "./lib/types/index.d.ts"
39
- },
40
35
  "./worker": {
41
36
  "import": "./lib/es/worker.js",
42
- "require": "./lib/cjs/locales/*.js",
37
+ "require": "./lib/cjs/worker.js",
43
38
  "types": "./lib/types/worker.d.ts"
44
39
  },
45
40
  "./locales/*": {
@@ -56,6 +51,7 @@
56
51
  "directories": {
57
52
  "lib": "lib"
58
53
  },
54
+ "types": "./lib/types/index.d.ts",
59
55
  "files": [
60
56
  "lib"
61
57
  ],
@@ -65,32 +61,34 @@
65
61
  "rxjs": ">=7.0.0"
66
62
  },
67
63
  "dependencies": {
68
- "@univerjs/design": "0.25.1",
69
- "@univerjs/docs": "0.25.1",
70
- "@univerjs/docs-ui": "0.25.1",
71
- "@univerjs/engine-formula": "0.25.1",
72
- "@univerjs/engine-render": "0.25.1",
73
- "@univerjs/network": "0.25.1",
74
- "@univerjs/rpc": "0.25.1",
75
- "@univerjs/sheets": "0.25.1",
76
- "@univerjs/sheets-formula": "0.25.1",
77
- "@univerjs/sheets-formula-ui": "0.25.1",
78
- "@univerjs/sheets-numfmt": "0.25.1",
79
- "@univerjs/sheets-numfmt-ui": "0.25.1",
80
- "@univerjs/sheets-ui": "0.25.1",
81
- "@univerjs/ui": "0.25.1"
64
+ "@univerjs/design": "1.0.0-alpha.1",
65
+ "@univerjs/docs": "1.0.0-alpha.1",
66
+ "@univerjs/docs-ui": "1.0.0-alpha.1",
67
+ "@univerjs/engine-formula": "1.0.0-alpha.1",
68
+ "@univerjs/network": "1.0.0-alpha.1",
69
+ "@univerjs/rpc": "1.0.0-alpha.1",
70
+ "@univerjs/engine-render": "1.0.0-alpha.1",
71
+ "@univerjs/sheets-formula": "1.0.0-alpha.1",
72
+ "@univerjs/sheets": "1.0.0-alpha.1",
73
+ "@univerjs/sheets-formula-ui": "1.0.0-alpha.1",
74
+ "@univerjs/sheets-numfmt": "1.0.0-alpha.1",
75
+ "@univerjs/sheets-numfmt-ui": "1.0.0-alpha.1",
76
+ "@univerjs/sheets-ui": "1.0.0-alpha.1",
77
+ "@univerjs/ui": "1.0.0-alpha.1"
82
78
  },
83
79
  "devDependencies": {
84
- "@univerjs/core": "0.25.1",
85
80
  "react": "18.3.1",
86
81
  "react-dom": "18.3.1",
87
- "rxjs": "7.8.2",
82
+ "rxjs": "^7.8.2",
88
83
  "typescript": "^6.0.3",
89
- "@univerjs-infra/shared": "0.25.1"
84
+ "@univerjs-infra/shared": "1.0.0-alpha.1",
85
+ "@univerjs/core": "1.0.0-alpha.1",
86
+ "@univerjs/presets": "1.0.0-alpha.1"
90
87
  },
91
88
  "scripts": {
92
- "prebuild:preset": "tsx prepare.ts",
93
- "build:preset": "tsx build.ts",
89
+ "build:bundle": "univer-cli preset build --cleanup",
90
+ "build:types": "tsc -p tsconfig.node.json",
91
+ "build": "pnpm run build:bundle && pnpm run build:types",
94
92
  "typecheck": "tsc --noEmit"
95
93
  },
96
94
  "module": "./lib/es/index.js"
@@ -1,51 +0,0 @@
1
- import { IUniverRPCMainThreadConfig } from '@univerjs/rpc';
2
- import { IUniverSheetsNumfmtConfig } from '@univerjs/sheets-numfmt';
3
- import { IUniverSheetsUIConfig } from '@univerjs/sheets-ui';
4
- import { IUniverUIConfig } from '@univerjs/ui';
5
- import { IPreset, IUniverDocsPresetConfig, IUniverFormulaConfig, IUniverSheetsPresetConfig } from './types';
6
- import '@univerjs/network/lib/facade';
7
- import '@univerjs/sheets/lib/facade';
8
- import '@univerjs/ui/lib/facade';
9
- import '@univerjs/docs-ui/lib/facade';
10
- import '@univerjs/sheets-ui/lib/facade';
11
- import '@univerjs/engine-formula/lib/facade';
12
- import '@univerjs/sheets-formula/lib/facade';
13
- import '@univerjs/sheets-numfmt/lib/facade';
14
- import '@univerjs/sheets-formula-ui/lib/facade';
15
- import '@univerjs/design/lib/index.css';
16
- import '@univerjs/ui/lib/index.css';
17
- import '@univerjs/docs-ui/lib/index.css';
18
- import '@univerjs/sheets-ui/lib/index.css';
19
- import '@univerjs/sheets-formula-ui/lib/index.css';
20
- import '@univerjs/sheets-numfmt-ui/lib/index.css';
21
- export type * from '@univerjs/docs-ui/lib/facade';
22
- export type * from '@univerjs/engine-formula/lib/facade';
23
- export type * from '@univerjs/network/lib/facade';
24
- export type * from '@univerjs/sheets-formula-ui/lib/facade';
25
- export type * from '@univerjs/sheets-formula/lib/facade';
26
- export type * from '@univerjs/sheets-numfmt/lib/facade';
27
- export type * from '@univerjs/sheets-ui/lib/facade';
28
- export type * from '@univerjs/sheets/lib/facade';
29
- export type * from '@univerjs/ui/lib/facade';
30
- export interface IUniverSheetsCorePresetConfig extends Pick<IUniverUIConfig, 'container' | 'header' | 'toolbar' | 'ribbonType' | 'menu' | 'contextMenu' | 'disableAutoFocus' | 'customFontFamily'>, Pick<IUniverSheetsUIConfig, 'formulaBar' | 'statusBarStatistic' | 'footer'>, IUniverSheetsNumfmtConfig {
31
- /**
32
- * The docs related configuration.
33
- */
34
- docs?: IUniverDocsPresetConfig;
35
- /**
36
- * The sheets related configuration.
37
- */
38
- sheets?: IUniverSheetsPresetConfig;
39
- /**
40
- * The formula related configuration.
41
- */
42
- formula?: IUniverFormulaConfig;
43
- /**
44
- * The URL of the worker script.
45
- */
46
- workerURL: IUniverRPCMainThreadConfig['workerURL'];
47
- }
48
- /**
49
- * This presets helps you to create a Univer sheet with open sourced features.
50
- */
51
- export declare function UniverSheetsCorePreset(config?: Partial<IUniverSheetsCorePresetConfig>): IPreset;