@univerjs/preset-sheets-drawing 0.25.0 → 1.0.0-alpha.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 (107) hide show
  1. package/README.md +3 -3
  2. package/lib/cjs/index.js +60 -1
  3. package/lib/cjs/locales/ar-SA.js +11 -1
  4. package/lib/cjs/locales/ca-ES.js +11 -1
  5. package/lib/cjs/locales/de-DE.js +11 -1
  6. package/lib/cjs/locales/en-US.js +11 -1
  7. package/lib/cjs/locales/es-ES.js +11 -1
  8. package/lib/cjs/locales/fa-IR.js +11 -1
  9. package/lib/cjs/locales/fr-FR.js +11 -1
  10. package/lib/cjs/locales/id-ID.js +11 -1
  11. package/lib/cjs/locales/it-IT.js +11 -1
  12. package/lib/cjs/locales/ja-JP.js +11 -1
  13. package/lib/cjs/locales/ko-KR.js +11 -1
  14. package/lib/cjs/locales/pl-PL.js +11 -1
  15. package/lib/cjs/locales/pt-BR.js +11 -1
  16. package/lib/cjs/locales/ru-RU.js +11 -1
  17. package/lib/cjs/locales/sk-SK.js +11 -1
  18. package/lib/cjs/locales/vi-VN.js +11 -1
  19. package/lib/cjs/locales/zh-CN.js +11 -1
  20. package/lib/cjs/locales/zh-HK.js +11 -1
  21. package/lib/cjs/locales/zh-TW.js +11 -1
  22. package/lib/cjs/rolldown-runtime-C_NdSu1c.js +34 -0
  23. package/lib/es/index.js +34 -29
  24. package/lib/es/locales/ar-SA.js +8 -10
  25. package/lib/es/locales/ca-ES.js +8 -10
  26. package/lib/es/locales/de-DE.js +8 -10
  27. package/lib/es/locales/en-US.js +8 -10
  28. package/lib/es/locales/es-ES.js +8 -10
  29. package/lib/es/locales/fa-IR.js +8 -10
  30. package/lib/es/locales/fr-FR.js +8 -10
  31. package/lib/es/locales/id-ID.js +8 -10
  32. package/lib/es/locales/it-IT.js +8 -10
  33. package/lib/es/locales/ja-JP.js +8 -10
  34. package/lib/es/locales/ko-KR.js +8 -10
  35. package/lib/es/locales/pl-PL.js +8 -10
  36. package/lib/es/locales/pt-BR.js +8 -10
  37. package/lib/es/locales/ru-RU.js +8 -10
  38. package/lib/es/locales/sk-SK.js +8 -10
  39. package/lib/es/locales/vi-VN.js +8 -10
  40. package/lib/es/locales/zh-CN.js +8 -10
  41. package/lib/es/locales/zh-HK.js +8 -10
  42. package/lib/es/locales/zh-TW.js +8 -10
  43. package/lib/index.css +365 -1
  44. package/lib/index.js +34 -29
  45. package/lib/locales/ar-SA.js +8 -10
  46. package/lib/locales/ca-ES.js +8 -10
  47. package/lib/locales/de-DE.js +8 -10
  48. package/lib/locales/en-US.js +8 -10
  49. package/lib/locales/es-ES.js +8 -10
  50. package/lib/locales/fa-IR.js +8 -10
  51. package/lib/locales/fr-FR.js +8 -10
  52. package/lib/locales/id-ID.js +8 -10
  53. package/lib/locales/it-IT.js +8 -10
  54. package/lib/locales/ja-JP.js +8 -10
  55. package/lib/locales/ko-KR.js +8 -10
  56. package/lib/locales/pl-PL.js +8 -10
  57. package/lib/locales/pt-BR.js +8 -10
  58. package/lib/locales/ru-RU.js +8 -10
  59. package/lib/locales/sk-SK.js +8 -10
  60. package/lib/locales/vi-VN.js +8 -10
  61. package/lib/locales/zh-CN.js +8 -10
  62. package/lib/locales/zh-HK.js +8 -10
  63. package/lib/locales/zh-TW.js +8 -10
  64. package/lib/types/index.d.ts +16 -1
  65. package/lib/types/locales/ar-SA.d.ts +137 -1
  66. package/lib/types/locales/ca-ES.d.ts +137 -1
  67. package/lib/types/locales/de-DE.d.ts +137 -1
  68. package/lib/types/locales/en-US.d.ts +137 -1
  69. package/lib/types/locales/es-ES.d.ts +137 -1
  70. package/lib/types/locales/fa-IR.d.ts +137 -1
  71. package/lib/types/locales/fr-FR.d.ts +137 -1
  72. package/lib/types/locales/id-ID.d.ts +137 -1
  73. package/lib/types/locales/it-IT.d.ts +137 -1
  74. package/lib/types/locales/ja-JP.d.ts +137 -1
  75. package/lib/types/locales/ko-KR.d.ts +137 -1
  76. package/lib/types/locales/pl-PL.d.ts +137 -1
  77. package/lib/types/locales/pt-BR.d.ts +137 -1
  78. package/lib/types/locales/ru-RU.d.ts +137 -1
  79. package/lib/types/locales/sk-SK.d.ts +137 -1
  80. package/lib/types/locales/vi-VN.d.ts +137 -1
  81. package/lib/types/locales/zh-CN.d.ts +137 -1
  82. package/lib/types/locales/zh-HK.d.ts +137 -1
  83. package/lib/types/locales/zh-TW.d.ts +137 -1
  84. package/lib/types/preset.d.ts +25 -0
  85. package/package.json +16 -18
  86. package/lib/types/types.d.ts +0 -11
  87. package/lib/types/umd.d.ts +0 -12
  88. package/lib/umd/index.js +0 -24
  89. package/lib/umd/locales/ar-SA.js +0 -8
  90. package/lib/umd/locales/ca-ES.js +0 -8
  91. package/lib/umd/locales/de-DE.js +0 -8
  92. package/lib/umd/locales/en-US.js +0 -8
  93. package/lib/umd/locales/es-ES.js +0 -8
  94. package/lib/umd/locales/fa-IR.js +0 -8
  95. package/lib/umd/locales/fr-FR.js +0 -8
  96. package/lib/umd/locales/id-ID.js +0 -8
  97. package/lib/umd/locales/it-IT.js +0 -8
  98. package/lib/umd/locales/ja-JP.js +0 -8
  99. package/lib/umd/locales/ko-KR.js +0 -8
  100. package/lib/umd/locales/pl-PL.js +0 -8
  101. package/lib/umd/locales/pt-BR.js +0 -8
  102. package/lib/umd/locales/ru-RU.js +0 -8
  103. package/lib/umd/locales/sk-SK.js +0 -8
  104. package/lib/umd/locales/vi-VN.js +0 -8
  105. package/lib/umd/locales/zh-CN.js +0 -8
  106. package/lib/umd/locales/zh-HK.js +0 -8
  107. package/lib/umd/locales/zh-TW.js +0 -8
@@ -1,4 +1,140 @@
1
1
  declare const _default: {
2
- [x: string]: any;
2
+ 'drawing-ui': {
3
+ 'image-cropper': {
4
+ error: string;
5
+ };
6
+ 'image-panel': {
7
+ arrange: {
8
+ title: string;
9
+ forward: string;
10
+ backward: string;
11
+ front: string;
12
+ back: string;
13
+ };
14
+ transform: {
15
+ title: string;
16
+ rotate: string;
17
+ x: string;
18
+ y: string;
19
+ width: string;
20
+ height: string;
21
+ lock: string;
22
+ };
23
+ crop: {
24
+ title: string;
25
+ start: string;
26
+ mode: string;
27
+ };
28
+ group: {
29
+ title: string;
30
+ group: string;
31
+ unGroup: string;
32
+ };
33
+ align: {
34
+ title: string;
35
+ default: string;
36
+ left: string;
37
+ center: string;
38
+ right: string;
39
+ top: string;
40
+ middle: string;
41
+ bottom: string;
42
+ horizon: string;
43
+ vertical: string;
44
+ };
45
+ null: string;
46
+ };
47
+ 'image-popup': {
48
+ replace: string;
49
+ delete: string;
50
+ edit: string;
51
+ crop: string;
52
+ reset: string;
53
+ };
54
+ 'image-text-wrap': {
55
+ title: string;
56
+ wrappingStyle: string;
57
+ square: string;
58
+ topAndBottom: string;
59
+ inline: string;
60
+ behindText: string;
61
+ inFrontText: string;
62
+ wrapText: string;
63
+ bothSide: string;
64
+ leftOnly: string;
65
+ rightOnly: string;
66
+ distanceFromText: string;
67
+ top: string;
68
+ left: string;
69
+ bottom: string;
70
+ right: string;
71
+ };
72
+ };
73
+ } & {
74
+ 'sheets-drawing-ui': {
75
+ title: string;
76
+ uploadLoading: {
77
+ loading: string;
78
+ };
79
+ upload: {
80
+ float: string;
81
+ cell: string;
82
+ };
83
+ panel: {
84
+ title: string;
85
+ };
86
+ save: {
87
+ title: string;
88
+ menuLabel: string;
89
+ imageCount: string;
90
+ fileNameConfig: string;
91
+ useRowCol: string;
92
+ useColumnValue: string;
93
+ selectColumn: string;
94
+ cancel: string;
95
+ confirm: string;
96
+ saving: string;
97
+ error: string;
98
+ };
99
+ 'image-popup': {
100
+ replace: string;
101
+ delete: string;
102
+ edit: string;
103
+ crop: string;
104
+ reset: string;
105
+ flipH: string;
106
+ flipV: string;
107
+ };
108
+ 'update-status': {
109
+ exceedMaxSize: string;
110
+ invalidImageType: string;
111
+ exceedMaxCount: string;
112
+ invalidImage: string;
113
+ };
114
+ 'drawing-anchor': {
115
+ title: string;
116
+ both: string;
117
+ position: string;
118
+ none: string;
119
+ };
120
+ 'cell-image': {
121
+ pasteTitle: string;
122
+ pasteContent: string;
123
+ pasteError: string;
124
+ };
125
+ permission: {
126
+ dialog: {
127
+ editErr: string;
128
+ };
129
+ };
130
+ shortcut: {
131
+ 'drawing-view': string;
132
+ 'drawing-move-down': string;
133
+ 'drawing-move-up': string;
134
+ 'drawing-move-left': string;
135
+ 'drawing-move-right': string;
136
+ 'drawing-delete': string;
137
+ };
138
+ };
3
139
  };
4
140
  export default _default;
@@ -1,4 +1,140 @@
1
1
  declare const _default: {
2
- [x: string]: any;
2
+ 'drawing-ui': {
3
+ 'image-cropper': {
4
+ error: string;
5
+ };
6
+ 'image-panel': {
7
+ arrange: {
8
+ title: string;
9
+ forward: string;
10
+ backward: string;
11
+ front: string;
12
+ back: string;
13
+ };
14
+ transform: {
15
+ title: string;
16
+ rotate: string;
17
+ x: string;
18
+ y: string;
19
+ width: string;
20
+ height: string;
21
+ lock: string;
22
+ };
23
+ crop: {
24
+ title: string;
25
+ start: string;
26
+ mode: string;
27
+ };
28
+ group: {
29
+ title: string;
30
+ group: string;
31
+ unGroup: string;
32
+ };
33
+ align: {
34
+ title: string;
35
+ default: string;
36
+ left: string;
37
+ center: string;
38
+ right: string;
39
+ top: string;
40
+ middle: string;
41
+ bottom: string;
42
+ horizon: string;
43
+ vertical: string;
44
+ };
45
+ null: string;
46
+ };
47
+ 'image-popup': {
48
+ replace: string;
49
+ delete: string;
50
+ edit: string;
51
+ crop: string;
52
+ reset: string;
53
+ };
54
+ 'image-text-wrap': {
55
+ title: string;
56
+ wrappingStyle: string;
57
+ square: string;
58
+ topAndBottom: string;
59
+ inline: string;
60
+ behindText: string;
61
+ inFrontText: string;
62
+ wrapText: string;
63
+ bothSide: string;
64
+ leftOnly: string;
65
+ rightOnly: string;
66
+ distanceFromText: string;
67
+ top: string;
68
+ left: string;
69
+ bottom: string;
70
+ right: string;
71
+ };
72
+ };
73
+ } & {
74
+ 'sheets-drawing-ui': {
75
+ title: string;
76
+ uploadLoading: {
77
+ loading: string;
78
+ };
79
+ upload: {
80
+ float: string;
81
+ cell: string;
82
+ };
83
+ panel: {
84
+ title: string;
85
+ };
86
+ save: {
87
+ title: string;
88
+ menuLabel: string;
89
+ imageCount: string;
90
+ fileNameConfig: string;
91
+ useRowCol: string;
92
+ useColumnValue: string;
93
+ selectColumn: string;
94
+ cancel: string;
95
+ confirm: string;
96
+ saving: string;
97
+ error: string;
98
+ };
99
+ 'image-popup': {
100
+ replace: string;
101
+ delete: string;
102
+ edit: string;
103
+ crop: string;
104
+ reset: string;
105
+ flipH: string;
106
+ flipV: string;
107
+ };
108
+ 'update-status': {
109
+ exceedMaxSize: string;
110
+ invalidImageType: string;
111
+ exceedMaxCount: string;
112
+ invalidImage: string;
113
+ };
114
+ 'drawing-anchor': {
115
+ title: string;
116
+ both: string;
117
+ position: string;
118
+ none: string;
119
+ };
120
+ 'cell-image': {
121
+ pasteTitle: string;
122
+ pasteContent: string;
123
+ pasteError: string;
124
+ };
125
+ permission: {
126
+ dialog: {
127
+ editErr: string;
128
+ };
129
+ };
130
+ shortcut: {
131
+ 'drawing-view': string;
132
+ 'drawing-move-down': string;
133
+ 'drawing-move-up': string;
134
+ 'drawing-move-left': string;
135
+ 'drawing-move-right': string;
136
+ 'drawing-delete': string;
137
+ };
138
+ };
3
139
  };
4
140
  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 { IUniverDrawingConfig } from '@univerjs/drawing';
17
+ import type { IPreset } from '@univerjs/presets';
18
+ import '@univerjs/sheets-drawing/facade';
19
+ import '@univerjs/sheets-drawing-ui/facade';
20
+ export type * from '@univerjs/sheets-drawing-ui/facade';
21
+ export type * from '@univerjs/sheets-drawing/facade';
22
+ export interface IUniverSheetsDrawingPresetConfig extends Pick<IUniverDrawingConfig, 'allowImageSize'> {
23
+ collaboration?: boolean;
24
+ }
25
+ export declare function UniverSheetsDrawingPreset(config?: Partial<IUniverSheetsDrawingPresetConfig>): IPreset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/preset-sheets-drawing",
3
- "version": "0.25.0",
3
+ "version": "1.0.0-alpha.0",
4
4
  "private": false,
5
5
  "description": "Preset for drawing capabilities in Univer Sheets.",
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,23 +56,25 @@
60
56
  "rxjs": ">=7.0.0"
61
57
  },
62
58
  "dependencies": {
63
- "@univerjs/docs-drawing": "0.25.0",
64
- "@univerjs/drawing": "0.25.0",
65
- "@univerjs/drawing-ui": "0.25.0",
66
- "@univerjs/sheets-drawing": "0.25.0",
67
- "@univerjs/sheets-drawing-ui": "0.25.0"
59
+ "@univerjs/docs-drawing": "1.0.0-alpha.0",
60
+ "@univerjs/sheets-drawing": "1.0.0-alpha.0",
61
+ "@univerjs/drawing-ui": "1.0.0-alpha.0",
62
+ "@univerjs/sheets-drawing-ui": "1.0.0-alpha.0",
63
+ "@univerjs/drawing": "1.0.0-alpha.0"
68
64
  },
69
65
  "devDependencies": {
70
- "@univerjs/core": "0.25.0",
71
66
  "react": "18.3.1",
72
67
  "react-dom": "18.3.1",
73
- "rxjs": "7.8.2",
68
+ "rxjs": "^7.8.2",
74
69
  "typescript": "^6.0.3",
75
- "@univerjs-infra/shared": "0.25.0"
70
+ "@univerjs/core": "1.0.0-alpha.0",
71
+ "@univerjs/presets": "1.0.0-alpha.0",
72
+ "@univerjs-infra/shared": "1.0.0-alpha.0"
76
73
  },
77
74
  "scripts": {
78
- "prebuild:preset": "tsx prepare.ts",
79
- "build:preset": "tsx build.ts",
75
+ "build:bundle": "univer-cli preset build --cleanup",
76
+ "build:types": "tsc -p tsconfig.node.json",
77
+ "build": "pnpm run build:bundle && pnpm run build:types",
80
78
  "typecheck": "tsc --noEmit"
81
79
  },
82
80
  "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,12 +0,0 @@
1
- import { IUniverDrawingConfig } from '@univerjs/drawing';
2
- import { IPreset } from './types';
3
- import '@univerjs/sheets-drawing/lib/facade';
4
- import '@univerjs/sheets-drawing-ui/lib/facade';
5
- import '@univerjs/drawing-ui/lib/index.css';
6
- import '@univerjs/sheets-drawing-ui/lib/index.css';
7
- export type * from '@univerjs/sheets-drawing-ui/lib/facade';
8
- export type * from '@univerjs/sheets-drawing/lib/facade';
9
- export interface IUniverSheetsDrawingPresetConfig extends Pick<IUniverDrawingConfig, 'allowImageSize'> {
10
- collaboration?: boolean;
11
- }
12
- export declare function UniverSheetsDrawingPreset(config?: Partial<IUniverSheetsDrawingPresetConfig>): IPreset;