@univerjs/preset-docs-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 (107) hide show
  1. package/README.md +3 -3
  2. package/lib/cjs/index.js +83 -1
  3. package/lib/cjs/locales/ar-SA.js +13 -1
  4. package/lib/cjs/locales/ca-ES.js +13 -1
  5. package/lib/cjs/locales/de-DE.js +13 -1
  6. package/lib/cjs/locales/en-US.js +13 -1
  7. package/lib/cjs/locales/es-ES.js +13 -1
  8. package/lib/cjs/locales/fa-IR.js +13 -1
  9. package/lib/cjs/locales/fr-FR.js +13 -1
  10. package/lib/cjs/locales/id-ID.js +13 -1
  11. package/lib/cjs/locales/it-IT.js +13 -1
  12. package/lib/cjs/locales/ja-JP.js +13 -1
  13. package/lib/cjs/locales/ko-KR.js +13 -1
  14. package/lib/cjs/locales/pl-PL.js +13 -1
  15. package/lib/cjs/locales/pt-BR.js +13 -1
  16. package/lib/cjs/locales/ru-RU.js +13 -1
  17. package/lib/cjs/locales/sk-SK.js +13 -1
  18. package/lib/cjs/locales/vi-VN.js +13 -1
  19. package/lib/cjs/locales/zh-CN.js +13 -1
  20. package/lib/cjs/locales/zh-HK.js +13 -1
  21. package/lib/cjs/locales/zh-TW.js +13 -1
  22. package/lib/cjs/rolldown-runtime-C_NdSu1c.js +34 -0
  23. package/lib/es/index.js +46 -48
  24. package/lib/es/locales/ar-SA.js +9 -12
  25. package/lib/es/locales/ca-ES.js +9 -12
  26. package/lib/es/locales/de-DE.js +9 -12
  27. package/lib/es/locales/en-US.js +9 -12
  28. package/lib/es/locales/es-ES.js +9 -12
  29. package/lib/es/locales/fa-IR.js +9 -12
  30. package/lib/es/locales/fr-FR.js +9 -12
  31. package/lib/es/locales/id-ID.js +9 -12
  32. package/lib/es/locales/it-IT.js +9 -12
  33. package/lib/es/locales/ja-JP.js +9 -12
  34. package/lib/es/locales/ko-KR.js +9 -12
  35. package/lib/es/locales/pl-PL.js +9 -12
  36. package/lib/es/locales/pt-BR.js +9 -12
  37. package/lib/es/locales/ru-RU.js +9 -12
  38. package/lib/es/locales/sk-SK.js +9 -12
  39. package/lib/es/locales/vi-VN.js +9 -12
  40. package/lib/es/locales/zh-CN.js +9 -12
  41. package/lib/es/locales/zh-HK.js +9 -12
  42. package/lib/es/locales/zh-TW.js +9 -12
  43. package/lib/index.css +5305 -1
  44. package/lib/index.js +46 -48
  45. package/lib/locales/ar-SA.js +9 -12
  46. package/lib/locales/ca-ES.js +9 -12
  47. package/lib/locales/de-DE.js +9 -12
  48. package/lib/locales/en-US.js +9 -12
  49. package/lib/locales/es-ES.js +9 -12
  50. package/lib/locales/fa-IR.js +9 -12
  51. package/lib/locales/fr-FR.js +9 -12
  52. package/lib/locales/id-ID.js +9 -12
  53. package/lib/locales/it-IT.js +9 -12
  54. package/lib/locales/ja-JP.js +9 -12
  55. package/lib/locales/ko-KR.js +9 -12
  56. package/lib/locales/pl-PL.js +9 -12
  57. package/lib/locales/pt-BR.js +9 -12
  58. package/lib/locales/ru-RU.js +9 -12
  59. package/lib/locales/sk-SK.js +9 -12
  60. package/lib/locales/vi-VN.js +9 -12
  61. package/lib/locales/zh-CN.js +9 -12
  62. package/lib/locales/zh-HK.js +9 -12
  63. package/lib/locales/zh-TW.js +9 -12
  64. package/lib/types/index.d.ts +16 -1
  65. package/lib/types/locales/ar-SA.d.ts +302 -1
  66. package/lib/types/locales/ca-ES.d.ts +302 -1
  67. package/lib/types/locales/de-DE.d.ts +302 -1
  68. package/lib/types/locales/en-US.d.ts +302 -1
  69. package/lib/types/locales/es-ES.d.ts +302 -1
  70. package/lib/types/locales/fa-IR.d.ts +302 -1
  71. package/lib/types/locales/fr-FR.d.ts +302 -1
  72. package/lib/types/locales/id-ID.d.ts +302 -1
  73. package/lib/types/locales/it-IT.d.ts +302 -1
  74. package/lib/types/locales/ja-JP.d.ts +302 -1
  75. package/lib/types/locales/ko-KR.d.ts +302 -1
  76. package/lib/types/locales/pl-PL.d.ts +302 -1
  77. package/lib/types/locales/pt-BR.d.ts +302 -1
  78. package/lib/types/locales/ru-RU.d.ts +302 -1
  79. package/lib/types/locales/sk-SK.d.ts +302 -1
  80. package/lib/types/locales/vi-VN.d.ts +302 -1
  81. package/lib/types/locales/zh-CN.d.ts +302 -1
  82. package/lib/types/locales/zh-HK.d.ts +302 -1
  83. package/lib/types/locales/zh-TW.d.ts +302 -1
  84. package/lib/types/preset.d.ts +25 -0
  85. package/package.json +18 -20
  86. package/lib/types/types.d.ts +0 -11
  87. package/lib/types/umd.d.ts +0 -13
  88. package/lib/umd/index.js +0 -358
  89. package/lib/umd/locales/ar-SA.js +0 -11
  90. package/lib/umd/locales/ca-ES.js +0 -11
  91. package/lib/umd/locales/de-DE.js +0 -11
  92. package/lib/umd/locales/en-US.js +0 -11
  93. package/lib/umd/locales/es-ES.js +0 -11
  94. package/lib/umd/locales/fa-IR.js +0 -11
  95. package/lib/umd/locales/fr-FR.js +0 -11
  96. package/lib/umd/locales/id-ID.js +0 -11
  97. package/lib/umd/locales/it-IT.js +0 -11
  98. package/lib/umd/locales/ja-JP.js +0 -11
  99. package/lib/umd/locales/ko-KR.js +0 -11
  100. package/lib/umd/locales/pl-PL.js +0 -11
  101. package/lib/umd/locales/pt-BR.js +0 -11
  102. package/lib/umd/locales/ru-RU.js +0 -11
  103. package/lib/umd/locales/sk-SK.js +0 -11
  104. package/lib/umd/locales/vi-VN.js +0 -11
  105. package/lib/umd/locales/zh-CN.js +0 -11
  106. package/lib/umd/locales/zh-HK.js +0 -11
  107. package/lib/umd/locales/zh-TW.js +0 -11
@@ -1,4 +1,305 @@
1
1
  declare const _default: {
2
- [x: string]: any;
2
+ design: {
3
+ Confirm: {
4
+ cancel: string;
5
+ confirm: string;
6
+ };
7
+ CascaderList: {
8
+ empty: string;
9
+ };
10
+ Calendar: {
11
+ year: string;
12
+ weekDays: string[];
13
+ months: string[];
14
+ ariaLabels: {
15
+ previousMonth: string;
16
+ nextMonth: string;
17
+ selectYear: string;
18
+ selectMonth: string;
19
+ };
20
+ };
21
+ Select: {
22
+ empty: string;
23
+ };
24
+ ColorPicker: {
25
+ more: string;
26
+ cancel: string;
27
+ confirm: string;
28
+ };
29
+ GradientColorPicker: {
30
+ linear: string;
31
+ radial: string;
32
+ angular: string;
33
+ diamond: string;
34
+ offset: string;
35
+ angle: string;
36
+ flip: string;
37
+ delete: string;
38
+ transparency: string;
39
+ };
40
+ };
41
+ } & {
42
+ 'docs-ui': {
43
+ toolbar: {
44
+ undo: string;
45
+ redo: string;
46
+ font: string;
47
+ fontSize: string;
48
+ bold: string;
49
+ italic: string;
50
+ strikethrough: string;
51
+ subscript: string;
52
+ superscript: string;
53
+ underline: string;
54
+ textColor: {
55
+ main: string;
56
+ };
57
+ fillColor: {
58
+ main: string;
59
+ };
60
+ table: {
61
+ main: string;
62
+ insert: string;
63
+ colCount: string;
64
+ rowCount: string;
65
+ };
66
+ resetColor: string;
67
+ order: string;
68
+ unorder: string;
69
+ checklist: string;
70
+ documentFlavor: string;
71
+ alignLeft: string;
72
+ alignCenter: string;
73
+ alignRight: string;
74
+ alignJustify: string;
75
+ horizontalLine: string;
76
+ headerFooter: string;
77
+ pageSetup: string;
78
+ heading: {
79
+ tooltip: string;
80
+ normal: string;
81
+ leading1: string;
82
+ leading2: string;
83
+ leading3: string;
84
+ leading4: string;
85
+ leading5: string;
86
+ title: string;
87
+ subTitle: string;
88
+ };
89
+ };
90
+ table: {
91
+ insert: string;
92
+ insertRowAbove: string;
93
+ insertRowBelow: string;
94
+ insertColumnLeft: string;
95
+ insertColumnRight: string;
96
+ delete: string;
97
+ deleteRows: string;
98
+ deleteColumns: string;
99
+ deleteTable: string;
100
+ };
101
+ headerFooter: {
102
+ header: string;
103
+ footer: string;
104
+ panel: string;
105
+ firstPageCheckBox: string;
106
+ oddEvenCheckBox: string;
107
+ headerTopMargin: string;
108
+ footerBottomMargin: string;
109
+ closeHeaderFooter: string;
110
+ disableText: string;
111
+ };
112
+ placeholder: {
113
+ heading1: string;
114
+ heading2: string;
115
+ heading3: string;
116
+ heading4: string;
117
+ heading5: string;
118
+ normalText: string;
119
+ listItem: string;
120
+ };
121
+ doc: {
122
+ menu: {
123
+ paragraphSetting: string;
124
+ };
125
+ slider: {
126
+ paragraphSetting: string;
127
+ };
128
+ paragraphSetting: {
129
+ alignment: string;
130
+ indentation: string;
131
+ left: string;
132
+ right: string;
133
+ firstLine: string;
134
+ hanging: string;
135
+ spacing: string;
136
+ before: string;
137
+ after: string;
138
+ lineSpace: string;
139
+ multiSpace: string;
140
+ atLeast: string;
141
+ exactly: string;
142
+ fixedValue: string;
143
+ };
144
+ };
145
+ rightClick: {
146
+ copy: string;
147
+ cut: string;
148
+ paste: string;
149
+ delete: string;
150
+ bulletList: string;
151
+ orderList: string;
152
+ checkList: string;
153
+ insertBellow: string;
154
+ };
155
+ paragraphMenu: {
156
+ alignAndIndent: string;
157
+ align: string;
158
+ indent: string;
159
+ color: string;
160
+ increase: string;
161
+ decrease: string;
162
+ increaseIndent: string;
163
+ decreaseIndent: string;
164
+ defaultTextColor: string;
165
+ noBackground: string;
166
+ };
167
+ 'page-settings': {
168
+ 'document-setting': string;
169
+ mode: string;
170
+ 'modern-mode': string;
171
+ 'classic-mode': string;
172
+ 'modern-width': string;
173
+ 'modern-width-narrow': string;
174
+ 'modern-width-medium': string;
175
+ 'modern-width-wide': string;
176
+ 'paper-size': string;
177
+ 'page-size': {
178
+ main: string;
179
+ a4: string;
180
+ a3: string;
181
+ a5: string;
182
+ b4: string;
183
+ b5: string;
184
+ letter: string;
185
+ legal: string;
186
+ tabloid: string;
187
+ statement: string;
188
+ executive: string;
189
+ folio: string;
190
+ };
191
+ orientation: string;
192
+ portrait: string;
193
+ landscape: string;
194
+ 'custom-paper-size': string;
195
+ top: string;
196
+ bottom: string;
197
+ left: string;
198
+ right: string;
199
+ cancel: string;
200
+ confirm: string;
201
+ };
202
+ };
203
+ } & {
204
+ ui: {
205
+ emojiPicker: {
206
+ emojiSearchIndex: Record<string, string>;
207
+ emojiTitles: Record<string, string>;
208
+ search: string;
209
+ random: string;
210
+ recents: string;
211
+ emojis: string;
212
+ animals: string;
213
+ food: string;
214
+ activities: string;
215
+ places: string;
216
+ objects: string;
217
+ symbols: string;
218
+ searchResults: string;
219
+ noResults: string;
220
+ };
221
+ toolbar: {
222
+ heading: {
223
+ normal: string;
224
+ title: string;
225
+ subTitle: string;
226
+ 1: string;
227
+ 2: string;
228
+ 3: string;
229
+ 4: string;
230
+ 5: string;
231
+ 6: string;
232
+ tooltip: string;
233
+ };
234
+ };
235
+ ribbon: {
236
+ start: string;
237
+ startDesc: string;
238
+ insert: string;
239
+ insertDesc: string;
240
+ formulas: string;
241
+ formulasDesc: string;
242
+ data: string;
243
+ dataDesc: string;
244
+ view: string;
245
+ viewDesc: string;
246
+ others: string;
247
+ othersDesc: string;
248
+ more: string;
249
+ };
250
+ fontFamily: {
251
+ 'not-supported': string;
252
+ arial: string;
253
+ 'times-new-roman': string;
254
+ tahoma: string;
255
+ verdana: string;
256
+ 'microsoft-yahei': string;
257
+ simsun: string;
258
+ simhei: string;
259
+ kaiti: string;
260
+ fangsong: string;
261
+ nsimsun: string;
262
+ stxinwei: string;
263
+ stxingkai: string;
264
+ stliti: string;
265
+ };
266
+ 'shortcut-panel': {
267
+ title: string;
268
+ };
269
+ shortcut: {
270
+ undo: string;
271
+ redo: string;
272
+ cut: string;
273
+ copy: string;
274
+ paste: string;
275
+ 'shortcut-panel': string;
276
+ };
277
+ 'common-edit': string;
278
+ 'toggle-shortcut-panel': string;
279
+ clipboard: {
280
+ authentication: {
281
+ title: string;
282
+ content: string;
283
+ };
284
+ };
285
+ textEditor: {
286
+ formulaError: string;
287
+ rangeError: string;
288
+ };
289
+ rangeSelector: {
290
+ title: string;
291
+ addAnotherRange: string;
292
+ buttonTooltip: string;
293
+ placeHolder: string;
294
+ confirm: string;
295
+ cancel: string;
296
+ };
297
+ 'global-shortcut': string;
298
+ 'zoom-slider': {
299
+ resetTo: string;
300
+ };
301
+ row: string;
302
+ column: string;
303
+ };
3
304
  };
4
305
  export default _default;
@@ -0,0 +1,25 @@
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 { IUniverUIConfig } from '@univerjs/ui';
18
+ import '@univerjs/network/facade';
19
+ import '@univerjs/docs-ui/facade';
20
+ export type * from '@univerjs/docs-ui/facade';
21
+ export type * from '@univerjs/network/facade';
22
+ export interface IUniverDocsCorePresetConfig extends Pick<IUniverUIConfig, 'container' | 'header' | 'footer' | 'toolbar' | 'ribbonType' | 'menu' | 'contextMenu' | 'disableAutoFocus'> {
23
+ collaboration?: true;
24
+ }
25
+ export declare function UniverDocsCorePreset(config?: Partial<IUniverDocsCorePresetConfig>): IPreset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/preset-docs-core",
3
- "version": "0.25.1",
3
+ "version": "1.0.0-alpha.1",
4
4
  "private": false,
5
5
  "description": "Preset for core Univer Docs editing and UI 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,11 +32,6 @@
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
  "./locales/*": {
41
36
  "import": "./lib/es/locales/*.js",
42
37
  "require": "./lib/cjs/locales/*.js",
@@ -51,6 +46,7 @@
51
46
  "directories": {
52
47
  "lib": "lib"
53
48
  },
49
+ "types": "./lib/types/index.d.ts",
54
50
  "files": [
55
51
  "lib"
56
52
  ],
@@ -60,25 +56,27 @@
60
56
  "rxjs": ">=7.0.0"
61
57
  },
62
58
  "dependencies": {
63
- "@univerjs/design": "0.25.1",
64
- "@univerjs/docs": "0.25.1",
65
- "@univerjs/docs-ui": "0.25.1",
66
- "@univerjs/engine-formula": "0.25.1",
67
- "@univerjs/engine-render": "0.25.1",
68
- "@univerjs/network": "0.25.1",
69
- "@univerjs/ui": "0.25.1"
59
+ "@univerjs/docs-ui": "1.0.0-alpha.1",
60
+ "@univerjs/design": "1.0.0-alpha.1",
61
+ "@univerjs/docs": "1.0.0-alpha.1",
62
+ "@univerjs/engine-formula": "1.0.0-alpha.1",
63
+ "@univerjs/engine-render": "1.0.0-alpha.1",
64
+ "@univerjs/network": "1.0.0-alpha.1",
65
+ "@univerjs/ui": "1.0.0-alpha.1"
70
66
  },
71
67
  "devDependencies": {
72
- "@univerjs/core": "0.25.1",
73
68
  "react": "18.3.1",
74
69
  "react-dom": "18.3.1",
75
- "rxjs": "7.8.2",
70
+ "rxjs": "^7.8.2",
76
71
  "typescript": "^6.0.3",
77
- "@univerjs-infra/shared": "0.25.1"
72
+ "@univerjs-infra/shared": "1.0.0-alpha.1",
73
+ "@univerjs/presets": "1.0.0-alpha.1",
74
+ "@univerjs/core": "1.0.0-alpha.1"
78
75
  },
79
76
  "scripts": {
80
- "prebuild:preset": "tsx prepare.ts",
81
- "build:preset": "tsx build.ts",
77
+ "build:bundle": "univer-cli preset build --cleanup",
78
+ "build:types": "tsc -p tsconfig.node.json",
79
+ "build": "pnpm run build:bundle && pnpm run build:types",
82
80
  "typecheck": "tsc --noEmit"
83
81
  },
84
82
  "module": "./lib/es/index.js"
@@ -1,11 +0,0 @@
1
- import { IUniverConfig, Plugin, PluginCtor } from '@univerjs/core';
2
- /**
3
- * A collection of plugins and their default configs.
4
- */
5
- export interface IPreset {
6
- plugins: Array<PluginCtor<Plugin> | [PluginCtor<Plugin>, ConstructorParameters<PluginCtor<Plugin>>[0]]>;
7
- locales?: IUniverConfig['locales'];
8
- }
9
- export interface IPresetOptions {
10
- lazy?: boolean;
11
- }
@@ -1,13 +0,0 @@
1
- import { IUniverUIConfig } from '@univerjs/ui';
2
- import { IPreset } from './types';
3
- import '@univerjs/network/lib/facade';
4
- import '@univerjs/docs-ui/lib/facade';
5
- import '@univerjs/design/lib/index.css';
6
- import '@univerjs/ui/lib/index.css';
7
- import '@univerjs/docs-ui/lib/index.css';
8
- export type * from '@univerjs/docs-ui/lib/facade';
9
- export type * from '@univerjs/network/lib/facade';
10
- export interface IUniverDocsCorePresetConfig extends Pick<IUniverUIConfig, 'container' | 'header' | 'footer' | 'toolbar' | 'ribbonType' | 'menu' | 'contextMenu' | 'disableAutoFocus'> {
11
- collaboration?: true;
12
- }
13
- export declare function UniverDocsCorePreset(config?: Partial<IUniverDocsCorePresetConfig>): IPreset;