@ydesign/react-editor 0.1.0 → 0.1.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 (191) hide show
  1. package/dist/app.css +1 -1
  2. package/dist/app.js +1 -1
  3. package/dist/canvas/workspace.d.ts +6 -4
  4. package/dist/canvas/workspace.js +1 -1
  5. package/dist/chunk-2AZQIJ4K.js +1 -0
  6. package/dist/chunk-45NWLCOP.js +15 -0
  7. package/dist/chunk-63A6RW6Y.js +21 -0
  8. package/dist/chunk-EUTDQZKU.js +1 -0
  9. package/dist/chunk-KERQXVBL.js +1 -0
  10. package/dist/{chunk-7YLSIB43.js → chunk-RBRSKAZL.js} +1 -1
  11. package/dist/chunk-SR5OYO6O.js +214 -0
  12. package/dist/chunk-YBC2DYJX.js +9 -0
  13. package/dist/config.d.ts +228 -3
  14. package/dist/config.js +1 -1
  15. package/dist/model/store.d.ts +5 -364
  16. package/dist/model/store.js +1 -1
  17. package/dist/project.d.ts +12 -4
  18. package/dist/project.js +1 -1
  19. package/dist/side-panel/index.d.ts +2 -5
  20. package/dist/side-panel/index.js +1 -1
  21. package/dist/side-panel/side-panel.d.ts +12 -6
  22. package/dist/side-panel/side-panel.js +1 -1
  23. package/dist/store-DfmY1m2j.d.ts +379 -0
  24. package/dist/toolbar/download-button.d.ts +1 -3
  25. package/dist/toolbar/download-button.js +1 -1
  26. package/dist/toolbar/toolbar.d.ts +1 -3
  27. package/dist/toolbar/toolbar.js +18 -1
  28. package/dist/toolbar/zoom-buttons.d.ts +1 -3
  29. package/dist/topbar/topbar.d.ts +1 -3
  30. package/dist/topbar/topbar.js +155 -5
  31. package/package.json +2 -2
  32. package/dist/assets/logo.d.ts +0 -7
  33. package/dist/assets/logo.js +0 -1
  34. package/dist/canvas/context-menu/context-menu.d.ts +0 -2
  35. package/dist/canvas/context-menu/context-menu.js +0 -0
  36. package/dist/canvas/hotkeys.d.ts +0 -3
  37. package/dist/canvas/hotkeys.js +0 -1
  38. package/dist/canvas/workspace-canvas.d.ts +0 -19
  39. package/dist/canvas/workspace-canvas.js +0 -1
  40. package/dist/chunk-2A3HHQ7X.js +0 -1
  41. package/dist/chunk-2T3O5ZZ2.js +0 -1
  42. package/dist/chunk-3TO57JPN.js +0 -1
  43. package/dist/chunk-4LUZF4CB.js +0 -2
  44. package/dist/chunk-5CKXOQAT.js +0 -1
  45. package/dist/chunk-5OA2JYPB.js +0 -1
  46. package/dist/chunk-5X6VER6G.js +0 -1
  47. package/dist/chunk-62YF5KTO.js +0 -1
  48. package/dist/chunk-75WC3GVB.js +0 -1
  49. package/dist/chunk-7NNOHYKX.js +0 -15
  50. package/dist/chunk-AC6CCGZH.js +0 -1
  51. package/dist/chunk-BE3YOONJ.js +0 -1
  52. package/dist/chunk-BWST6EER.js +0 -1
  53. package/dist/chunk-CB23VFSC.js +0 -1
  54. package/dist/chunk-DGCF2GDA.js +0 -9
  55. package/dist/chunk-ESNVOB52.js +0 -17
  56. package/dist/chunk-HHYPIHAP.js +0 -45
  57. package/dist/chunk-HOAYYKAZ.js +0 -3
  58. package/dist/chunk-IUFYYEGO.js +0 -1
  59. package/dist/chunk-IV52R7D7.js +0 -27
  60. package/dist/chunk-J6PYM4EV.js +0 -1
  61. package/dist/chunk-JHNSYFB2.js +0 -151
  62. package/dist/chunk-JMIN2XMC.js +0 -1
  63. package/dist/chunk-JPIYZYMQ.js +0 -1
  64. package/dist/chunk-KVT25LDU.js +0 -1
  65. package/dist/chunk-MGTFIE3C.js +0 -1
  66. package/dist/chunk-NLABIDJ5.js +0 -1
  67. package/dist/chunk-O56ZNYGR.js +0 -1
  68. package/dist/chunk-O73AAP2K.js +0 -1
  69. package/dist/chunk-OQ6HU62L.js +0 -1
  70. package/dist/chunk-P5I43V7X.js +0 -1
  71. package/dist/chunk-POCSL7OS.js +0 -50
  72. package/dist/chunk-PSO4W6J7.js +0 -9
  73. package/dist/chunk-QVSJHU2S.js +0 -1
  74. package/dist/chunk-QWM7VMLQ.js +0 -9
  75. package/dist/chunk-SGK2XN5D.js +0 -1
  76. package/dist/chunk-T3TEB73P.js +0 -1
  77. package/dist/chunk-TS5CKDHH.js +0 -1
  78. package/dist/chunk-TTK5Z2Z6.js +0 -1
  79. package/dist/chunk-TZ6B7XDS.js +0 -1
  80. package/dist/chunk-U7TPE4R3.js +0 -54
  81. package/dist/chunk-UCJMXWVT.js +0 -16
  82. package/dist/chunk-WCHGSVUC.js +0 -8
  83. package/dist/chunk-WJT6VPDR.js +0 -9
  84. package/dist/chunk-XA2G4P2Q.js +0 -1
  85. package/dist/chunk-XRRO2RT7.js +0 -1
  86. package/dist/chunk-YCJBBRRT.js +0 -1
  87. package/dist/chunk-YRJUN267.js +0 -14
  88. package/dist/chunk-YVBVDUVA.js +0 -1
  89. package/dist/chunk-Z4QXUZAS.js +0 -1
  90. package/dist/hooks/use-duplicate-element.d.ts +0 -16
  91. package/dist/hooks/use-duplicate-element.js +0 -1
  92. package/dist/hooks/use-lock.d.ts +0 -18
  93. package/dist/hooks/use-lock.js +0 -1
  94. package/dist/hooks/use-remove-element.d.ts +0 -16
  95. package/dist/hooks/use-remove-element.js +0 -1
  96. package/dist/lib/utils.d.ts +0 -5
  97. package/dist/lib/utils.js +0 -1
  98. package/dist/side-panel/background-panel.d.ts +0 -17
  99. package/dist/side-panel/background-panel.js +0 -1
  100. package/dist/side-panel/images-grid.d.ts +0 -27
  101. package/dist/side-panel/images-grid.js +0 -1
  102. package/dist/side-panel/layers-panel.d.ts +0 -16
  103. package/dist/side-panel/layers-panel.js +0 -1
  104. package/dist/side-panel/photos-panel.d.ts +0 -16
  105. package/dist/side-panel/photos-panel.js +0 -1
  106. package/dist/side-panel/shapes-panel.d.ts +0 -16
  107. package/dist/side-panel/shapes-panel.js +0 -1
  108. package/dist/side-panel/size-panel.d.ts +0 -16
  109. package/dist/side-panel/size-panel.js +0 -1
  110. package/dist/side-panel/tab-button.d.ts +0 -12
  111. package/dist/side-panel/tab-button.js +0 -1
  112. package/dist/side-panel/templates-panel.d.ts +0 -16
  113. package/dist/side-panel/templates-panel.js +0 -1
  114. package/dist/side-panel/text-panel.d.ts +0 -16
  115. package/dist/side-panel/text-panel.js +0 -1
  116. package/dist/side-panel/upload-panel.d.ts +0 -17
  117. package/dist/side-panel/upload-panel.js +0 -1
  118. package/dist/toolbar/default-toolbar.d.ts +0 -21
  119. package/dist/toolbar/default-toolbar.js +0 -1
  120. package/dist/toolbar/duplicate-button.d.ts +0 -16
  121. package/dist/toolbar/duplicate-button.js +0 -1
  122. package/dist/toolbar/element-container.d.ts +0 -13
  123. package/dist/toolbar/element-container.js +0 -1
  124. package/dist/toolbar/figure-toolbar.d.ts +0 -33
  125. package/dist/toolbar/figure-toolbar.js +0 -1
  126. package/dist/toolbar/filters-picker.d.ts +0 -18
  127. package/dist/toolbar/filters-picker.js +0 -1
  128. package/dist/toolbar/flip-button.d.ts +0 -18
  129. package/dist/toolbar/flip-button.js +0 -1
  130. package/dist/toolbar/group-button.d.ts +0 -16
  131. package/dist/toolbar/group-button.js +0 -1
  132. package/dist/toolbar/history-buttons.d.ts +0 -16
  133. package/dist/toolbar/history-buttons.js +0 -1
  134. package/dist/toolbar/image-eraser-pen.d.ts +0 -10
  135. package/dist/toolbar/image-eraser-pen.js +0 -1
  136. package/dist/toolbar/image-remove-background.d.ts +0 -10
  137. package/dist/toolbar/image-remove-background.js +0 -1
  138. package/dist/toolbar/image-toolbar.d.ts +0 -36
  139. package/dist/toolbar/image-toolbar.js +0 -1
  140. package/dist/toolbar/lock-button.d.ts +0 -16
  141. package/dist/toolbar/lock-button.js +0 -1
  142. package/dist/toolbar/many-toolbar.d.ts +0 -5
  143. package/dist/toolbar/many-toolbar.js +0 -1
  144. package/dist/toolbar/opacity-picker.d.ts +0 -16
  145. package/dist/toolbar/opacity-picker.js +0 -1
  146. package/dist/toolbar/position-picker.d.ts +0 -16
  147. package/dist/toolbar/position-picker.js +0 -1
  148. package/dist/toolbar/remove-button.d.ts +0 -16
  149. package/dist/toolbar/remove-button.js +0 -1
  150. package/dist/toolbar/text-ai-write.d.ts +0 -7
  151. package/dist/toolbar/text-ai-write.js +0 -1
  152. package/dist/toolbar/text-toolbar.d.ts +0 -19
  153. package/dist/toolbar/text-toolbar.js +0 -1
  154. package/dist/topbar/create-design.d.ts +0 -30
  155. package/dist/topbar/create-design.js +0 -1
  156. package/dist/topbar/file-menu.d.ts +0 -19
  157. package/dist/topbar/file-menu.js +0 -1
  158. package/dist/topbar/psd-parser.d.ts +0 -9
  159. package/dist/topbar/psd-parser.js +0 -1
  160. package/dist/utils/api.d.ts +0 -15
  161. package/dist/utils/api.js +0 -1
  162. package/dist/utils/blob.d.ts +0 -5
  163. package/dist/utils/blob.js +0 -1
  164. package/dist/utils/download.d.ts +0 -3
  165. package/dist/utils/download.js +0 -1
  166. package/dist/utils/figure-to-svg.d.ts +0 -36
  167. package/dist/utils/figure-to-svg.js +0 -1
  168. package/dist/utils/file.d.ts +0 -3
  169. package/dist/utils/file.js +0 -1
  170. package/dist/utils/filters.d.ts +0 -2
  171. package/dist/utils/filters.js +0 -0
  172. package/dist/utils/fonts.d.ts +0 -68
  173. package/dist/utils/fonts.js +0 -1
  174. package/dist/utils/image.d.ts +0 -19
  175. package/dist/utils/image.js +0 -1
  176. package/dist/utils/l10n.d.ts +0 -227
  177. package/dist/utils/l10n.js +0 -1
  178. package/dist/utils/loader.d.ts +0 -6
  179. package/dist/utils/loader.js +0 -1
  180. package/dist/utils/screen.d.ts +0 -6
  181. package/dist/utils/screen.js +0 -1
  182. package/dist/utils/svg.d.ts +0 -3
  183. package/dist/utils/svg.js +0 -1
  184. package/dist/utils/text.d.ts +0 -3
  185. package/dist/utils/text.js +0 -1
  186. package/dist/utils/use-api.d.ts +0 -2
  187. package/dist/utils/use-api.js +0 -0
  188. package/dist/utils/use-axios.d.ts +0 -25
  189. package/dist/utils/use-axios.js +0 -1
  190. /package/dist/{chunk-MXZ6RXT3.js → chunk-EWOU5F3O.js} +0 -0
  191. /package/dist/{chunk-YCFED7XQ.js → chunk-WFMCGQ5V.js} +0 -0
@@ -1,227 +0,0 @@
1
- /**
2
- * 设置/更新翻译
3
- * @param {object} newTranslations - 新的翻译对象
4
- * @param {object} options - 配置选项
5
- * @param {boolean} options.validate - 是否验证翻译完整性
6
- */
7
- declare const setTranslations: (newTranslations: any, { validate }?: {
8
- validate?: boolean | undefined;
9
- }) => void;
10
- /**
11
- * 获取所有翻译(返回普通 JS 对象)
12
- * @returns {object}
13
- */
14
- declare const getTranslations: () => {
15
- toolbar: {
16
- undo: string;
17
- redo: string;
18
- duration: string;
19
- opacity: string;
20
- effects: string;
21
- blur: string;
22
- textBackground: string;
23
- backgroundCornerRadius: string;
24
- backgroundOpacity: string;
25
- backgroundPadding: string;
26
- backgroundColor: string;
27
- brightness: string;
28
- filters: string;
29
- sepia: string;
30
- grayscale: string;
31
- contrast: string;
32
- saturation: string;
33
- vibrance: string;
34
- hueRotation: string;
35
- noise: string;
36
- pixelate: string;
37
- textStroke: string;
38
- shadow: string;
39
- border: string;
40
- cornerRadius: string;
41
- textleft: string;
42
- textcenter: string;
43
- textright: string;
44
- textjustify: string;
45
- textBold: string;
46
- textItalic: string;
47
- textUnderline: string;
48
- textStrikethrough: string;
49
- splitByGrapheme: string;
50
- position: string;
51
- layering: string;
52
- toForward: string;
53
- up: string;
54
- down: string;
55
- toBottom: string;
56
- alignLeft: string;
57
- alignCenter: string;
58
- alignRight: string;
59
- alignTop: string;
60
- alignMiddle: string;
61
- alignBottom: string;
62
- flip: string;
63
- flipHorizontally: string;
64
- flipVertically: string;
65
- fitToBackground: string;
66
- removeBackground: string;
67
- removeBackgroundTitle: string;
68
- cancelRemoveBackground: string;
69
- confirmRemoveBackground: string;
70
- eraserPen: string;
71
- eraserPenTitle: string;
72
- cancelEraserPen: string;
73
- confirmEraserPen: string;
74
- crop: string;
75
- cropDone: string;
76
- cropCancel: string;
77
- clip: string;
78
- removeClip: string;
79
- removeMask: string;
80
- transparency: string;
81
- lockedDescription: string;
82
- unlockedDescription: string;
83
- removeElements: string;
84
- duplicateElements: string;
85
- download: string;
86
- saveAsImage: string;
87
- saveAsPDF: string;
88
- lineHeight: string;
89
- letterSpacing: string;
90
- offsetX: string;
91
- offsetY: string;
92
- color: string;
93
- selectable: string;
94
- draggable: string;
95
- removable: string;
96
- resizable: string;
97
- contentEditable: string;
98
- styleEditable: string;
99
- alwaysOnTop: string;
100
- showInExport: string;
101
- ungroupElements: string;
102
- groupElements: string;
103
- lineSize: string;
104
- fade: string;
105
- move: string;
106
- zoom: string;
107
- rotate: string;
108
- none: string;
109
- bounce: string;
110
- blink: string;
111
- strength: string;
112
- spaceEvenly: string;
113
- horizontalDistribution: string;
114
- verticalDistribution: string;
115
- strokeWidth: string;
116
- strokeSettings: string;
117
- colorPicker: {
118
- solid: string;
119
- linear: string;
120
- angle: string;
121
- };
122
- aiText: {
123
- aiWrite: string;
124
- rewrite: string;
125
- shorten: string;
126
- continue: string;
127
- proofread: string;
128
- tones: string;
129
- friendly: string;
130
- professional: string;
131
- humorous: string;
132
- formal: string;
133
- customPrompt: string;
134
- generatedResult: string;
135
- cancel: string;
136
- generate: string;
137
- back: string;
138
- tryAgain: string;
139
- insert: string;
140
- promptPlaceholder: string;
141
- };
142
- addImage: string;
143
- addText: string;
144
- fileType: string;
145
- quality: string;
146
- multiplier: string;
147
- size: string;
148
- };
149
- workspace: {
150
- noPages: string;
151
- addPage: string;
152
- removePage: string;
153
- duplicatePage: string;
154
- moveUp: string;
155
- moveDown: string;
156
- };
157
- scale: {
158
- reset: string;
159
- };
160
- error: {
161
- removeBackground: string;
162
- };
163
- sidePanel: {
164
- templates: string;
165
- searchTemplatesWithSameSize: string;
166
- searchPlaceholder: string;
167
- otherFormats: string;
168
- noResults: string;
169
- error: string;
170
- text: string;
171
- uploadFont: string;
172
- myFonts: string;
173
- photos: string;
174
- videos: string;
175
- animations: string;
176
- effects: string;
177
- elements: string;
178
- shapes: string;
179
- lines: string;
180
- upload: string;
181
- uploadImage: string;
182
- uploadTip: string;
183
- background: string;
184
- resize: string;
185
- layers: string;
186
- layerTypes: {
187
- image: string;
188
- text: string;
189
- svg: string;
190
- line: string;
191
- figure: string;
192
- group: string;
193
- };
194
- layersTip: string;
195
- noLayers: string;
196
- namePlaceholder: string;
197
- useMagicResize: string;
198
- clipImage: string;
199
- width: string;
200
- height: string;
201
- magicResizeDescription: string;
202
- headerText: string;
203
- createHeader: string;
204
- subHeaderText: string;
205
- createSubHeader: string;
206
- bodyText: string;
207
- createBody: string;
208
- units: string;
209
- };
210
- topbar: {
211
- newDesign: string;
212
- language: string;
213
- editableTextPlaceholder: string;
214
- statusLoading: string;
215
- statusSaved: string;
216
- statusHasChanges: string;
217
- statusSaving: string;
218
- };
219
- };
220
- /**
221
- * 获取翻译文本
222
- * @param {string} key - 翻译键,如 'toolbar.opacity'
223
- * @returns {string} 翻译文本,如果不存在则返回格式化后的键名
224
- */
225
- declare const translate: (key: string) => string;
226
-
227
- export { getTranslations, setTranslations, translate };
@@ -1 +0,0 @@
1
- import{a,b,c}from"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{b as getTranslations,a as setTranslations,c as translate};
@@ -1,6 +0,0 @@
1
- declare const setAssetLoadTimeout: (e: number) => void;
2
- declare const getAssetLoadTimeout: () => number;
3
- declare const setFontLoadTimeout: (e: number) => void;
4
- declare const getFontLoadTimeout: () => number;
5
-
6
- export { getAssetLoadTimeout, getFontLoadTimeout, setAssetLoadTimeout, setFontLoadTimeout };
@@ -1 +0,0 @@
1
- import"../chunk-O2XFH626.js";var e=3e4,s=t=>{e=t},n=()=>e,o=6e3,r=t=>{o=t},m=()=>o;export{n as getAssetLoadTimeout,m as getFontLoadTimeout,s as setAssetLoadTimeout,r as setFontLoadTimeout};
@@ -1,6 +0,0 @@
1
- declare const MOBILE_BREAKPOINT = 768;
2
- declare const isMobile: () => boolean;
3
- declare const mobileStyle: (e: string) => string;
4
- declare const useMobile: () => boolean;
5
-
6
- export { MOBILE_BREAKPOINT, isMobile, mobileStyle, useMobile };
@@ -1 +0,0 @@
1
- import{a,b,c,d}from"../chunk-WCHGSVUC.js";import"../chunk-O2XFH626.js";export{a as MOBILE_BREAKPOINT,b as isMobile,c as mobileStyle,d as useMobile};
@@ -1,3 +0,0 @@
1
- declare function svgToURL(svg: string): string;
2
-
3
- export { svgToURL };
package/dist/utils/svg.js DELETED
@@ -1 +0,0 @@
1
- import{a}from"../chunk-CB23VFSC.js";import"../chunk-O2XFH626.js";export{a as svgToURL};
@@ -1,3 +0,0 @@
1
- declare function removeTags(e?: string): string;
2
-
3
- export { removeTags };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-4LUZF4CB.js";import"../chunk-O2XFH626.js";export{a as removeTags};
@@ -1,2 +0,0 @@
1
-
2
- export { }
File without changes
@@ -1,25 +0,0 @@
1
- import * as axios from 'axios';
2
-
3
- interface ApiResponse<T = any> {
4
- status: number;
5
- result: T;
6
- }
7
- interface UploadImageResult {
8
- id: string;
9
- userId: string;
10
- organizationId: string;
11
- url: string;
12
- filename: string;
13
- mimeType: string;
14
- size: number;
15
- width: number;
16
- height: number;
17
- description: string | null;
18
- tags: string | null;
19
- categoryId: string | null;
20
- createdAt: string;
21
- updatedAt: string;
22
- }
23
- declare const instance: axios.AxiosInstance;
24
-
25
- export { type ApiResponse, type UploadImageResult, instance as default };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-NLABIDJ5.js";import"../chunk-QVSJHU2S.js";import"../chunk-P5I43V7X.js";import"../chunk-WJT6VPDR.js";import"../chunk-O2XFH626.js";export{a as default};
File without changes
File without changes