@ydesign/react-editor 0.0.9 → 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 (184) 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 -346
  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 +19 -6
  30. package/dist/topbar/topbar.js +158 -8
  31. package/package.json +2 -2
  32. package/dist/canvas/context-menu/context-menu.d.ts +0 -2
  33. package/dist/canvas/context-menu/context-menu.js +0 -0
  34. package/dist/canvas/hotkeys.d.ts +0 -3
  35. package/dist/canvas/hotkeys.js +0 -1
  36. package/dist/canvas/workspace-canvas.d.ts +0 -19
  37. package/dist/canvas/workspace-canvas.js +0 -1
  38. package/dist/chunk-2A3HHQ7X.js +0 -1
  39. package/dist/chunk-2T3O5ZZ2.js +0 -1
  40. package/dist/chunk-3TO57JPN.js +0 -1
  41. package/dist/chunk-4HH3B3W3.js +0 -23
  42. package/dist/chunk-4LUZF4CB.js +0 -2
  43. package/dist/chunk-5OA2JYPB.js +0 -1
  44. package/dist/chunk-5X6VER6G.js +0 -1
  45. package/dist/chunk-62YF5KTO.js +0 -1
  46. package/dist/chunk-75WC3GVB.js +0 -1
  47. package/dist/chunk-7NNOHYKX.js +0 -15
  48. package/dist/chunk-A7SUGNOW.js +0 -1
  49. package/dist/chunk-AC6CCGZH.js +0 -1
  50. package/dist/chunk-CB23VFSC.js +0 -1
  51. package/dist/chunk-DGCF2GDA.js +0 -9
  52. package/dist/chunk-HHYPIHAP.js +0 -45
  53. package/dist/chunk-IUFYYEGO.js +0 -1
  54. package/dist/chunk-IV52R7D7.js +0 -27
  55. package/dist/chunk-J6PYM4EV.js +0 -1
  56. package/dist/chunk-JMIN2XMC.js +0 -1
  57. package/dist/chunk-JPIYZYMQ.js +0 -1
  58. package/dist/chunk-JUVJJS4T.js +0 -54
  59. package/dist/chunk-KKA7WASQ.js +0 -16
  60. package/dist/chunk-KVT25LDU.js +0 -1
  61. package/dist/chunk-NDZKXZQ2.js +0 -3
  62. package/dist/chunk-O56ZNYGR.js +0 -1
  63. package/dist/chunk-O73AAP2K.js +0 -1
  64. package/dist/chunk-OPXS6VQ6.js +0 -151
  65. package/dist/chunk-OQ6HU62L.js +0 -1
  66. package/dist/chunk-P5I43V7X.js +0 -1
  67. package/dist/chunk-POCSL7OS.js +0 -50
  68. package/dist/chunk-POWRXH5R.js +0 -1
  69. package/dist/chunk-PSO4W6J7.js +0 -9
  70. package/dist/chunk-QWM7VMLQ.js +0 -9
  71. package/dist/chunk-RSKWMPST.js +0 -1
  72. package/dist/chunk-SGK2XN5D.js +0 -1
  73. package/dist/chunk-T3TEB73P.js +0 -1
  74. package/dist/chunk-TS5CKDHH.js +0 -1
  75. package/dist/chunk-TTHQXTIX.js +0 -1
  76. package/dist/chunk-TTK5Z2Z6.js +0 -1
  77. package/dist/chunk-TZ6B7XDS.js +0 -1
  78. package/dist/chunk-WCHGSVUC.js +0 -8
  79. package/dist/chunk-WJT6VPDR.js +0 -9
  80. package/dist/chunk-XA2G4P2Q.js +0 -1
  81. package/dist/chunk-XRRO2RT7.js +0 -1
  82. package/dist/chunk-YCJBBRRT.js +0 -1
  83. package/dist/chunk-YRJUN267.js +0 -14
  84. package/dist/chunk-YVBVDUVA.js +0 -1
  85. package/dist/hooks/use-duplicate-element.d.ts +0 -16
  86. package/dist/hooks/use-duplicate-element.js +0 -1
  87. package/dist/hooks/use-lock.d.ts +0 -18
  88. package/dist/hooks/use-lock.js +0 -1
  89. package/dist/hooks/use-remove-element.d.ts +0 -16
  90. package/dist/hooks/use-remove-element.js +0 -1
  91. package/dist/lib/utils.d.ts +0 -5
  92. package/dist/lib/utils.js +0 -1
  93. package/dist/side-panel/background-panel.d.ts +0 -17
  94. package/dist/side-panel/background-panel.js +0 -1
  95. package/dist/side-panel/images-grid.d.ts +0 -27
  96. package/dist/side-panel/images-grid.js +0 -1
  97. package/dist/side-panel/layers-panel.d.ts +0 -16
  98. package/dist/side-panel/layers-panel.js +0 -1
  99. package/dist/side-panel/photos-panel.d.ts +0 -16
  100. package/dist/side-panel/photos-panel.js +0 -1
  101. package/dist/side-panel/shapes-panel.d.ts +0 -16
  102. package/dist/side-panel/shapes-panel.js +0 -1
  103. package/dist/side-panel/size-panel.d.ts +0 -16
  104. package/dist/side-panel/size-panel.js +0 -1
  105. package/dist/side-panel/tab-button.d.ts +0 -12
  106. package/dist/side-panel/tab-button.js +0 -1
  107. package/dist/side-panel/templates-panel.d.ts +0 -16
  108. package/dist/side-panel/templates-panel.js +0 -1
  109. package/dist/side-panel/text-panel.d.ts +0 -16
  110. package/dist/side-panel/text-panel.js +0 -1
  111. package/dist/side-panel/upload-panel.d.ts +0 -17
  112. package/dist/side-panel/upload-panel.js +0 -1
  113. package/dist/toolbar/default-toolbar.d.ts +0 -21
  114. package/dist/toolbar/default-toolbar.js +0 -1
  115. package/dist/toolbar/duplicate-button.d.ts +0 -16
  116. package/dist/toolbar/duplicate-button.js +0 -1
  117. package/dist/toolbar/element-container.d.ts +0 -13
  118. package/dist/toolbar/element-container.js +0 -1
  119. package/dist/toolbar/figure-toolbar.d.ts +0 -33
  120. package/dist/toolbar/figure-toolbar.js +0 -1
  121. package/dist/toolbar/filters-picker.d.ts +0 -18
  122. package/dist/toolbar/filters-picker.js +0 -1
  123. package/dist/toolbar/flip-button.d.ts +0 -18
  124. package/dist/toolbar/flip-button.js +0 -1
  125. package/dist/toolbar/group-button.d.ts +0 -16
  126. package/dist/toolbar/group-button.js +0 -1
  127. package/dist/toolbar/history-buttons.d.ts +0 -16
  128. package/dist/toolbar/history-buttons.js +0 -1
  129. package/dist/toolbar/image-eraser-pen.d.ts +0 -10
  130. package/dist/toolbar/image-eraser-pen.js +0 -1
  131. package/dist/toolbar/image-remove-background.d.ts +0 -10
  132. package/dist/toolbar/image-remove-background.js +0 -1
  133. package/dist/toolbar/image-toolbar.d.ts +0 -36
  134. package/dist/toolbar/image-toolbar.js +0 -1
  135. package/dist/toolbar/lock-button.d.ts +0 -16
  136. package/dist/toolbar/lock-button.js +0 -1
  137. package/dist/toolbar/many-toolbar.d.ts +0 -5
  138. package/dist/toolbar/many-toolbar.js +0 -1
  139. package/dist/toolbar/opacity-picker.d.ts +0 -16
  140. package/dist/toolbar/opacity-picker.js +0 -1
  141. package/dist/toolbar/position-picker.d.ts +0 -16
  142. package/dist/toolbar/position-picker.js +0 -1
  143. package/dist/toolbar/remove-button.d.ts +0 -16
  144. package/dist/toolbar/remove-button.js +0 -1
  145. package/dist/toolbar/text-ai-write.d.ts +0 -7
  146. package/dist/toolbar/text-ai-write.js +0 -1
  147. package/dist/toolbar/text-toolbar.d.ts +0 -19
  148. package/dist/toolbar/text-toolbar.js +0 -1
  149. package/dist/topbar/create-design.d.ts +0 -30
  150. package/dist/topbar/create-design.js +0 -1
  151. package/dist/topbar/file-menu.d.ts +0 -19
  152. package/dist/topbar/file-menu.js +0 -1
  153. package/dist/utils/api.d.ts +0 -14
  154. package/dist/utils/api.js +0 -1
  155. package/dist/utils/blob.d.ts +0 -5
  156. package/dist/utils/blob.js +0 -1
  157. package/dist/utils/download.d.ts +0 -3
  158. package/dist/utils/download.js +0 -1
  159. package/dist/utils/figure-to-svg.d.ts +0 -36
  160. package/dist/utils/figure-to-svg.js +0 -1
  161. package/dist/utils/file.d.ts +0 -3
  162. package/dist/utils/file.js +0 -1
  163. package/dist/utils/filters.d.ts +0 -2
  164. package/dist/utils/filters.js +0 -0
  165. package/dist/utils/fonts.d.ts +0 -68
  166. package/dist/utils/fonts.js +0 -1
  167. package/dist/utils/image.d.ts +0 -19
  168. package/dist/utils/image.js +0 -1
  169. package/dist/utils/l10n.d.ts +0 -227
  170. package/dist/utils/l10n.js +0 -1
  171. package/dist/utils/loader.d.ts +0 -6
  172. package/dist/utils/loader.js +0 -1
  173. package/dist/utils/screen.d.ts +0 -6
  174. package/dist/utils/screen.js +0 -1
  175. package/dist/utils/svg.d.ts +0 -3
  176. package/dist/utils/svg.js +0 -1
  177. package/dist/utils/text.d.ts +0 -3
  178. package/dist/utils/text.js +0 -1
  179. package/dist/utils/use-api.d.ts +0 -2
  180. package/dist/utils/use-api.js +0 -0
  181. package/dist/utils/use-axios.d.ts +0 -5
  182. package/dist/utils/use-axios.js +0 -1
  183. /package/dist/{chunk-MXZ6RXT3.js → chunk-EWOU5F3O.js} +0 -0
  184. /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,5 +0,0 @@
1
- import * as axios from 'axios';
2
-
3
- declare const instance: axios.AxiosInstance;
4
-
5
- export { instance as default };
@@ -1 +0,0 @@
1
- import{d as o}from"../chunk-POWRXH5R.js";import"../chunk-P5I43V7X.js";import"../chunk-WJT6VPDR.js";import"../chunk-O2XFH626.js";import a from"axios";var t=a.create({timeout:6e4});t.interceptors.request.use(e=>{let r=o();return r.value&&(e.headers.Authorization=`Bearer ${r.value}`),e},e=>Promise.reject(e));t.interceptors.response.use(e=>{let{data:r}=e;if(r&&r.statusCode&&r.statusCode<=201)return r;let s=new Error(e.data.message||"An error occurred");return Promise.reject(s)},e=>Promise.reject(e));var i=t;export{i as default};
File without changes
File without changes