@ydesign/react-editor 0.0.4 → 0.0.5
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.
- package/dist/app.css +1 -1
- package/dist/app.js +1 -1
- package/dist/chunk-2PAJLUQH.js +1 -0
- package/dist/chunk-2SA3ZNHH.js +9 -0
- package/dist/chunk-4BG4CHIB.js +1 -0
- package/dist/{chunk-VXTF2OL2.js → chunk-4HH3B3W3.js} +2 -1
- package/dist/chunk-4WITBL6X.js +1 -0
- package/dist/chunk-ARZMBVXU.js +1 -0
- package/dist/chunk-BDQSWJYF.js +1 -0
- package/dist/{chunk-MQZE5LZU.js → chunk-DCGJ6RKU.js} +1 -1
- package/dist/{chunk-OV74NBJ5.js → chunk-FGCLY24Q.js} +2 -2
- package/dist/chunk-FOMWIGAQ.js +50 -0
- package/dist/chunk-H6GI5LUP.js +54 -0
- package/dist/chunk-HD2T2D4D.js +1 -0
- package/dist/chunk-HQSM4X2M.js +1 -0
- package/dist/chunk-INRJE7VS.js +1 -0
- package/dist/chunk-ISNCNIFJ.js +27 -0
- package/dist/chunk-KCNKLCD5.js +1 -0
- package/dist/chunk-N5KI6CPA.js +1 -0
- package/dist/chunk-NQYSJ5MN.js +1 -0
- package/dist/chunk-OA7Z7HNL.js +1 -0
- package/dist/chunk-OBJ5NZSC.js +1 -0
- package/dist/chunk-OFA6JIQB.js +9 -0
- package/dist/chunk-ONY3GLGA.js +1 -0
- package/dist/chunk-QX7ZGRSR.js +1 -0
- package/dist/chunk-R452ARGU.js +1 -0
- package/dist/chunk-RUVPKBI5.js +3 -0
- package/dist/chunk-TNBL7KOG.js +1 -0
- package/dist/chunk-TWH7TO5J.js +1 -0
- package/dist/chunk-TYHXQPZQ.js +1 -0
- package/dist/chunk-XXR5YN2B.js +9 -0
- package/dist/chunk-Y7RXJ3FI.js +16 -0
- package/dist/chunk-YLXPQ2GI.js +1 -0
- package/dist/chunk-YOQ663QO.js +1 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.js +1 -1
- package/dist/project.d.ts +9 -2
- package/dist/project.js +1 -1
- package/dist/side-panel/background-panel.js +1 -1
- package/dist/side-panel/images-grid.d.ts +3 -1
- package/dist/side-panel/images-grid.js +1 -1
- package/dist/side-panel/index.js +1 -1
- package/dist/side-panel/layers-panel.js +1 -1
- package/dist/side-panel/photos-panel.d.ts +4 -2
- package/dist/side-panel/photos-panel.js +1 -1
- package/dist/side-panel/shapes-panel.d.ts +4 -2
- package/dist/side-panel/shapes-panel.js +1 -1
- package/dist/side-panel/side-panel.js +1 -1
- package/dist/side-panel/size-panel.js +1 -1
- package/dist/side-panel/tab-button.js +1 -1
- package/dist/side-panel/templates-panel.js +1 -1
- package/dist/side-panel/text-panel.js +1 -1
- package/dist/side-panel/upload-panel.d.ts +6 -3
- package/dist/side-panel/upload-panel.js +1 -1
- package/dist/toolbar/default-toolbar.js +1 -1
- package/dist/toolbar/download-button.d.ts +4 -2
- package/dist/toolbar/download-button.js +1 -1
- package/dist/toolbar/duplicate-button.js +1 -1
- package/dist/toolbar/figure-toolbar.js +1 -1
- package/dist/toolbar/filters-picker.js +1 -1
- package/dist/toolbar/flip-button.d.ts +4 -2
- package/dist/toolbar/flip-button.js +1 -1
- package/dist/toolbar/group-button.js +1 -1
- package/dist/toolbar/history-buttons.js +1 -1
- package/dist/toolbar/image-eraser-pen.d.ts +4 -2
- package/dist/toolbar/image-eraser-pen.js +1 -1
- package/dist/toolbar/image-remove-background.d.ts +4 -2
- package/dist/toolbar/image-remove-background.js +1 -1
- package/dist/toolbar/image-toolbar.d.ts +4 -2
- package/dist/toolbar/image-toolbar.js +1 -1
- package/dist/toolbar/lock-button.js +1 -1
- package/dist/toolbar/opacity-picker.js +1 -1
- package/dist/toolbar/position-picker.js +1 -1
- package/dist/toolbar/remove-button.js +1 -1
- package/dist/toolbar/text-ai-write.js +1 -1
- package/dist/toolbar/text-toolbar.js +1 -1
- package/dist/toolbar/toolbar.js +1 -1
- package/dist/topbar/file-menu.d.ts +7 -2
- package/dist/topbar/file-menu.js +1 -1
- package/dist/topbar/topbar.js +5 -5
- package/dist/utils/l10n.d.ts +205 -3
- package/dist/utils/l10n.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-3TTTJUTT.js +0 -1
- package/dist/chunk-4FFLRF6N.js +0 -1
- package/dist/chunk-4HEMGHOQ.js +0 -1
- package/dist/chunk-53KFBGJB.js +0 -16
- package/dist/chunk-AGNRQAPA.js +0 -1
- package/dist/chunk-APQPKBER.js +0 -1
- package/dist/chunk-B35ZYWID.js +0 -1
- package/dist/chunk-CMH73CYQ.js +0 -27
- package/dist/chunk-COQ4GO5N.js +0 -1
- package/dist/chunk-CS6Z4TQU.js +0 -1
- package/dist/chunk-DBQHEZPG.js +0 -1
- package/dist/chunk-DJBTBRPS.js +0 -1
- package/dist/chunk-EOBIVNFF.js +0 -1
- package/dist/chunk-FXO52BV7.js +0 -1
- package/dist/chunk-GYDTKPW5.js +0 -1
- package/dist/chunk-H67HTXU4.js +0 -1
- package/dist/chunk-IQ7O55C5.js +0 -42
- package/dist/chunk-KLZXBPXI.js +0 -1
- package/dist/chunk-LCE6Z46D.js +0 -3
- package/dist/chunk-M4S26KQG.js +0 -1
- package/dist/chunk-MNACXCF5.js +0 -1
- package/dist/chunk-PSXS4WMN.js +0 -1
- package/dist/chunk-Q2L6VKFI.js +0 -9
- package/dist/chunk-R6Z6F447.js +0 -1
- package/dist/chunk-WGX437MN.js +0 -9
- package/dist/chunk-XK24AOVW.js +0 -54
- package/dist/chunk-XM3RPIUS.js +0 -9
- package/dist/chunk-XPAHGJGK.js +0 -1
package/dist/topbar/topbar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as d}from"../chunk-BDQSWJYF.js";import{a as p}from"../chunk-HQSM4X2M.js";import{c as a}from"../chunk-ARZMBVXU.js";import{b as n}from"../chunk-ONY3GLGA.js";import"../chunk-WJT6VPDR.js";import"../chunk-O2XFH626.js";import i from"styled-components";import{observer as l}from"mobx-react-lite";import{Input as s,Tooltip as h,Button as m}from"antd";import{CloudUpload as g}from"lucide-react";import{jsx as t,jsxs as o}from"react/jsx-runtime";var f=i("div")`
|
|
2
2
|
white-space: nowrap;
|
|
3
3
|
height: 50px;
|
|
4
4
|
padding: 0 15px;
|
|
@@ -11,18 +11,18 @@ import{a as n}from"../chunk-B35ZYWID.js";import{a}from"../chunk-FXO52BV7.js";imp
|
|
|
11
11
|
overflow-y: hidden;
|
|
12
12
|
max-width: 100vw;
|
|
13
13
|
}
|
|
14
|
-
`,
|
|
14
|
+
`,c=i("div")`
|
|
15
15
|
@media screen and (max-width: 500px) {
|
|
16
16
|
display: flex;
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`,v=i("div")`
|
|
19
19
|
float: left;
|
|
20
20
|
display: flex;
|
|
21
21
|
align-items: center;
|
|
22
22
|
height: 50px;
|
|
23
|
-
`,
|
|
23
|
+
`,x=i("div")`
|
|
24
24
|
float: right;
|
|
25
25
|
display: flex;
|
|
26
26
|
align-items: center;
|
|
27
27
|
height: 50px;
|
|
28
|
-
`,
|
|
28
|
+
`,y=l(({project:e})=>(console.log(e.status),t(h,{title:"\u4FDD\u5B58\u4F5C\u56FE\u8BB0\u5F55",children:t(m,{type:"text",style:{marginLeft:14},icon:t(g,{size:16,style:{display:"flex"}}),children:"Save"})}))),B=l(({store:e})=>{let r=n();return t(f,{className:"topbar border-b-1 border-b-gray-200",children:o(c,{children:[o(v,{children:[o("div",{style:{display:"flex",alignItems:"center",gap:10,paddingRight:16,paddingLeft:16,userSelect:"none"},children:[t("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("rect",{width:"20",height:"20",fill:"rgb(22, 119, 255)"})}),t("span",{style:{fontWeight:500,fontSize:20,lineHeight:"100%",letterSpacing:.25},children:"Ydesign"})]}),t(d,{store:e,project:r}),t("div",{style:{paddingLeft:10,maxWidth:200},children:t(s,{placeholder:a("topbar.editableTextPlaceholder")})}),o("div",{style:{paddingLeft:16,fontSize:14},className:"text-gray-600",children:[Math.round(e.width)," x ",Math.round(e.height)," ",e.unit]}),t(y,{project:r})]}),t(x,{children:t(p,{store:e})})]})})});export{B as Topbar};
|
package/dist/utils/l10n.d.ts
CHANGED
|
@@ -1,21 +1,223 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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}
|
|
3
13
|
*/
|
|
4
14
|
declare const getTranslations: () => {
|
|
5
15
|
toolbar: {
|
|
16
|
+
undo: string;
|
|
17
|
+
redo: string;
|
|
18
|
+
duration: string;
|
|
6
19
|
opacity: string;
|
|
7
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;
|
|
8
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;
|
|
9
101
|
ungroupElements: string;
|
|
10
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;
|
|
11
156
|
};
|
|
12
|
-
workspace: {};
|
|
13
157
|
scale: {
|
|
14
158
|
reset: string;
|
|
15
159
|
};
|
|
160
|
+
error: {
|
|
161
|
+
removeBackground: string;
|
|
162
|
+
};
|
|
16
163
|
sidePanel: {
|
|
17
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;
|
|
18
214
|
};
|
|
19
215
|
};
|
|
216
|
+
/**
|
|
217
|
+
* 获取翻译文本
|
|
218
|
+
* @param {string} key - 翻译键,如 'toolbar.opacity'
|
|
219
|
+
* @returns {string} 翻译文本,如果不存在则返回格式化后的键名
|
|
220
|
+
*/
|
|
221
|
+
declare const translate: (key: string) => string;
|
|
20
222
|
|
|
21
|
-
export { getTranslations };
|
|
223
|
+
export { getTranslations, setTranslations, translate };
|
package/dist/utils/l10n.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-O2XFH626.js";
|
|
1
|
+
import{a,b,c}from"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{b as getTranslations,a as setTranslations,c as translate};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ydesign/react-editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "设计编辑器UI组件库,基于react版本",
|
|
5
5
|
"main": "dist/app.js",
|
|
6
6
|
"module": "dist/app.js",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"tailwind-merge": "^3.3.1",
|
|
115
115
|
"tailwindcss": "^4.1.17",
|
|
116
116
|
"tw-animate-css": "^1.4.0",
|
|
117
|
-
"@ydesign/core": "^0.0.
|
|
117
|
+
"@ydesign/core": "^0.0.5"
|
|
118
118
|
},
|
|
119
119
|
"browserslist": [
|
|
120
120
|
"> 0.5%",
|
package/dist/chunk-3TTTJUTT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Blend as d}from"lucide-react";import{Popover as l,Tooltip as c,Button as y,InputNumber as u,Slider as h}from"antd";import{observer as v}from"mobx-react-lite";import{useState as g,useEffect as f}from"react";import{jsx as t,jsxs as p}from"react/jsx-runtime";var T=v(({store:o})=>{let s=o.selectedShapes.length>0,e=o.selectedShapes[0],[i,n]=g(()=>Math.round(100*(e?.opacity??1)));f(()=>{e&&n(Math.round(100*(e.opacity??1)))},[e,e?.opacity]);let r=m=>{let a=Math.max(0,Math.min(m,100));n(a),o.editor?.objectsHandler.update({opacity:a/100})};return t(c,{title:"Opacity",placement:"bottom",children:t(l,{content:p("div",{children:[t("div",{style:{textAlign:"center",marginBottom:10},children:"Transparency"}),p("div",{style:{display:"flex"},children:[t("div",{style:{width:170,paddingRight:20},children:t(h,{min:0,max:100,onChange:r,value:i})}),t(u,{min:0,max:100,value:i,onChange:r,size:"small",styles:{root:{width:65}}})]})]}),trigger:"click",children:t(y,{type:"text",disabled:!s,styles:{root:{padding:"0 7px"}},children:t(d,{size:16})})})})});export{T as a};
|
package/dist/chunk-4FFLRF6N.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Button as e}from"antd";import{observer as p}from"mobx-react-lite";import{Fragment as u,jsx as o,jsxs as l}from"react/jsx-runtime";var i=p(({store:t})=>{let r=t.selectedElements.length>1,n=t.selectedElements.length===1&&t.selectedElements[0]?.type==="group";return l(u,{children:[r&&o(e,{type:"text",onClick:()=>{t.editor?.objectsHandler.group()},children:"Group"}),n&&o(e,{type:"text",onClick:()=>{t.editor?.objectsHandler.ungroup()},children:"Ungroup"})]})});export{i as a};
|
package/dist/chunk-4HEMGHOQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as $}from"./chunk-RVXI723F.js";import{Popover as pe,Button as ye,Switch as z,Slider as k,InputNumber as h,ColorPicker as ee}from"antd";import{observer as xe}from"mobx-react-lite";import{Sparkles as Ce}from"lucide-react";import{useEffect as He,useState as r}from"react";import{Fragment as W,jsx as a,jsxs as l}from"react/jsx-runtime";var f=(u,c,g)=>Math.max(c,Math.min(g,u)),te={display:"inline-flex",justifyContent:"space-between",width:"100%",padding:6},E={display:"flex",alignItems:"center",justifyContent:"space-between",padding:6},d=({label:u,enabled:c,visible:g=!0,onEnabledChange:M,numberValue:n,min:t,max:v,onNumberValueChange:s,step:F})=>g?l(W,{children:[l("div",{style:{display:"inline-flex",justifyContent:"space-between",width:"100%",padding:"6px"},children:[a("span",{children:u}),a(z,{checked:c,onChange:m=>{M(m)}})]}),c?l("div",{style:{display:"flex",width:"100%",justifyContent:"space-between",marginTop:10,marginBottom:10},children:[a("div",{style:{flex:1},children:a(k,{value:n,onChange:m=>{s(m)},min:t,max:v,step:F})}),a(h,{size:"small",style:{width:60,marginLeft:10},value:n,step:F,onChange:m=>{s(f(m,t,v))}})]}):null]}):null,Ie=xe(({element:u,store:c,elements:g})=>{let n=(g||[u])[0],t=c.editor,v=n?.type==="textbox",s=n?.type==="image",F=$(n);console.log("isImageOrShape ---> ",s||F);let p=t?.imageFiltersHandler.getFilter("blur"),y=t?.imageFiltersHandler.getFilter("brightness"),x=t?.imageFiltersHandler.getFilter("contrast"),C=t?.imageFiltersHandler.getFilter("saturation"),H=t?.imageFiltersHandler.getFilter("vibrance"),V=t?.imageFiltersHandler.getFilter("hueRotation"),w=t?.imageFiltersHandler.getFilter("noise"),S=t?.imageFiltersHandler.getFilter("pixelate"),[ae,I]=r(!!p),[ne,L]=r(p?.blur||.5),[ie,_]=r(!!y),[re,q]=r(y?.brightness||.05),[le,N]=r(!!x),[se,D]=r(x?.contrast||.25),[oe,R]=r(!!C),[be,G]=r(C?.saturation||1),[de,B]=r(!!H),[ce,J]=r(H?.vibrance||1),[me,O]=r(!!V),[ue,K]=r(V?.rotation||-.5),[ge,j]=r(!!w),[he,Q]=r(w?.noise||30),[fe,A]=r(!!S),[ve,U]=r(S?.blocksize||30),[Fe,P]=r(n?.stroke),[X,Y]=r(n?.strokeWidth),[o,Z]=r({enabled:!!n?.shadow,offsetX:n?.shadow?.offsetX||15,offsetY:n?.shadow?.offsetY||15,blur:n?.shadow?.blur||25,color:n?.shadow?.color||"rgba(0,0,0,0.45)",affectStroke:!1,nonScaling:!1,type:"shadow"});He(()=>{P(n?.stroke),Y(n?.strokeWidth),Z({enabled:!!n?.shadow,offsetX:n?.shadow?.offsetX||15,offsetY:n?.shadow?.offsetY||15,blur:n?.shadow?.blur||25,color:n?.shadow?.color||"rgba(0,0,0,0.45)",affectStroke:!1,nonScaling:!1,type:"shadow"}),I(!!p),L(p?.blur||.5),_(!!y),q(y?.brightness||.05),N(!!x),D(x?.contrast||.25),R(!!C),G(C?.saturation||1),B(!!H),J(H?.vibrance||1),O(!!V),K(V?.rotation||-.5),j(!!w),Q(w?.noise||30),A(!!S),U(S?.blocksize||30)},[n]);let T=e=>{t?.objectsHandler.setTextStyle(e)},b=(e,i)=>{Z({...o,[e]:i}),t&&t.objectsHandler.setShadow({...o,[e]:i})};return a(pe,{trigger:"click",content:l("div",{style:{width:"280px",maxHeight:"calc(100vh - 150px)",overflow:"auto"},children:[a(d,{label:"Blur",visible:s,enabled:ae,onEnabledChange:e=>{let i=n;e?(t?.imageFiltersHandler._createFilter(i,"blur",{blur:.5}),I(!0)):(t?.imageFiltersHandler._removeFilter(i,"blur"),I(!1))},min:0,max:1,step:.1,numberValue:ne,onNumberValueChange:e=>{t?.imageFiltersHandler._changeAttr("blur","blur",e),L(e)}}),a(d,{label:"Brightness",visible:s,enabled:ie,onEnabledChange:e=>{let i=n;e?(t?.imageFiltersHandler._createFilter(i,"brightness",{brightness:.05}),_(!0)):(t?.imageFiltersHandler._removeFilter(i,"brightness"),_(!1))},min:-1,max:1,step:.01,numberValue:re,onNumberValueChange:e=>{t?.imageFiltersHandler._changeAttr("brightness","brightness",e),q(e)}}),a(d,{label:"Contrast",visible:s,enabled:le,onEnabledChange:e=>{let i=n;e?(t?.imageFiltersHandler._createFilter(i,"contrast",{contrast:.25}),N(!0)):(t?.imageFiltersHandler._removeFilter(i,"contrast"),N(!1))},min:-1,max:1,step:.01,numberValue:se,onNumberValueChange:e=>{t?.imageFiltersHandler._changeAttr("contrast","contrast",e),D(e)}}),a(d,{label:"Saturation",visible:s,enabled:oe,onEnabledChange:e=>{let i=n;e?(t?.imageFiltersHandler._createFilter(i,"saturation",{saturation:1}),R(!0)):(t?.imageFiltersHandler._removeFilter(i,"saturation"),R(!1))},min:-1,max:1,step:.01,numberValue:be,onNumberValueChange:e=>{t?.imageFiltersHandler._changeAttr("saturation","saturation",e),G(e)}}),a(d,{label:"Vibrance",visible:s,enabled:de,onEnabledChange:e=>{let i=n;e?(t?.imageFiltersHandler._createFilter(i,"vibrance",{vibrance:1}),B(!0)):(t?.imageFiltersHandler._removeFilter(i,"vibrance"),B(!1))},min:-1,max:1,step:.01,numberValue:ce,onNumberValueChange:e=>{t?.imageFiltersHandler._changeAttr("vibrance","vibrance",e),J(e)}}),a(d,{label:"HueRotation",visible:s,enabled:me,onEnabledChange:e=>{let i=n;e?(t?.imageFiltersHandler._createFilter(i,"hueRotation",{rotation:-.5}),O(!0)):(t?.imageFiltersHandler._removeFilter(i,"hueRotation"),O(!1))},min:-1,max:1,step:.01,numberValue:ue,onNumberValueChange:e=>{t?.imageFiltersHandler._changeAttr("hueRotation","rotation",e),K(e)}}),a(d,{label:"Noise",visible:s,enabled:ge,onEnabledChange:e=>{let i=n;e?(t?.imageFiltersHandler._createFilter(i,"noise",{noise:30}),j(!0)):(t?.imageFiltersHandler._removeFilter(i,"noise"),j(!1))},min:0,max:1e3,step:1,numberValue:he,onNumberValueChange:e=>{t?.imageFiltersHandler._changeAttr("noise","noise",e),Q(e)}}),a(d,{label:"Pixelate",visible:s,enabled:fe,onEnabledChange:e=>{let i=n;e?(t?.imageFiltersHandler._createFilter(i,"pixelate",{blocksize:10}),A(!0)):(t?.imageFiltersHandler._removeFilter(i,"pixelate"),A(!1))},min:.01,max:100,step:.01,numberValue:ve,onNumberValueChange:e=>{t?.imageFiltersHandler._changeAttr("pixelate","blocksize",e),U(e)}}),v&&l(W,{children:[l("div",{style:te,children:[a("span",{children:"Text Stroke"}),a(z,{checked:!!X,onChange:e=>{T({strokeWidth:e?10:0,stroke:e?"red":null}),Y(e?10:0),P(e?"red":null)}})]}),!!X&&l("div",{style:{display:"flex",justifyContent:"space-between",padding:"6px"},children:[a(ee,{value:Fe,onChange:e=>{let i=e.toCssString();T({stroke:i}),P(i)}}),a(h,{value:X,onChange:e=>{T({strokeWidth:f(e,1,30)}),Y(f(e,1,30))},style:{width:60},min:1,max:Math.round(n.fontSize/2)})]})]}),l("div",{style:te,children:[a("span",{children:"Shadow"}),a(z,{checked:!!o.enabled,onChange:e=>{b("enabled",e)}})]}),o.enabled&&l(W,{children:[l("div",{style:E,children:[a("div",{children:"Blur"}),a("div",{children:a(h,{value:o.blur,style:{width:60},min:0,max:50,onChange:e=>{b("blur",e)}})})]}),a(k,{value:o.blur,onChange:e=>b("blur",e),min:0,max:50}),l("div",{style:E,children:[a("div",{children:"Offset X"}),a("div",{children:a(h,{value:o.offsetX,style:{width:60},min:-50,max:50,onChange:e=>{b("offsetX",f(e,-50,50))}})})]}),a(k,{value:o.offsetX,onChange:e=>b("offsetX",e),min:-50,max:50}),l("div",{style:E,children:[a("div",{children:"Offset Y"}),a("div",{children:a(h,{value:o.offsetY,style:{width:60},min:-50,max:50,onChange:e=>{b("offsetY",f(e,-50,50))}})})]}),a(k,{value:o.offsetY,onChange:e=>b("offsetY",e),min:-50,max:50}),l("div",{style:E,children:[a("div",{children:"Color"}),a(ee,{defaultFormat:"rgb",value:o.color,onChange:e=>{b("color",e.toRgbString())}})]})]})]}),children:a(ye,{type:"text",icon:a(Ce,{size:16,style:{display:"flex"}}),styles:{root:{padding:"0 7px"}},children:"Effects"})})});export{Ie as a};
|
package/dist/chunk-53KFBGJB.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{a as k}from"./chunk-MNACXCF5.js";import{a as N}from"./chunk-R6Z6F447.js";import{c as x}from"./chunk-COQ4GO5N.js";import{a as B}from"./chunk-4FFLRF6N.js";import{d as R}from"./chunk-LCE6Z46D.js";import{a as H}from"./chunk-GYDTKPW5.js";import{a as S}from"./chunk-XRRO2RT7.js";import{a as E}from"./chunk-3TTTJUTT.js";import{b as h}from"./chunk-B35ZYWID.js";import{a as C}from"./chunk-H67HTXU4.js";import{e as n}from"./chunk-XPAHGJGK.js";import{b as T}from"./chunk-APQPKBER.js";import y from"styled-components";import{useRef as K}from"react";import{Tooltip as w,Button as D}from"antd";import{Undo2 as M,Redo2 as X}from"lucide-react";import{observer as _}from"mobx-react-lite";import{useEffect as q}from"react";import{jsx as i,jsxs as J}from"react/jsx-runtime";var G=_(({store:o})=>(q(()=>{},[o._updateHistory]),J(u,{style:{float:"left",paddingRight:10},children:[i(w,{title:"\u64A4\u9500",placement:"bottom",children:i(D,{type:"text",disabled:!o.editor?.historyHandler.canUndo(),styles:{root:{padding:"0 7px"}},onClick:()=>{o.editor?.historyHandler.undo()},children:i(M,{size:16})})}),i(w,{title:"\u91CD\u505A",placement:"bottom",children:i(D,{type:"text",disabled:!o.editor?.historyHandler.canRedo(),styles:{root:{padding:"0 7px"}},onClick:()=>{o.editor?.historyHandler.redo()},children:i(X,{size:16})})})]})));import{observer as Q}from"mobx-react-lite";import{Button as P,Divider as V,Space as W}from"antd";import{Check as Y,X as Z}from"lucide-react";import{Fragment as ro,jsx as e,jsxs as l}from"react/jsx-runtime";var $=y.div`
|
|
2
|
-
white-space: nowrap;
|
|
3
|
-
|
|
4
|
-
height: 50px;
|
|
5
|
-
padding: 0 15px;
|
|
6
|
-
position: relative;
|
|
7
|
-
width: 100%;
|
|
8
|
-
z-index: 10;
|
|
9
|
-
`,oo=y.div`
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`,u=y.div`
|
|
13
|
-
align-items: center;
|
|
14
|
-
display: flex;
|
|
15
|
-
height: 50px;
|
|
16
|
-
`,to=({store:o})=>l(W,{style:{height:50},children:[l(P,{onClick:()=>{o.editor?.imageCropHandler.cropImg.onDeselectEvent()},children:[e(Y,{size:16}),"\u5B8C\u6210"]}),l(P,{onClick:()=>{o.editor?.imageCropHandler.cropCancel()},children:[e(Z,{size:16}),"\u53D6\u6D88"]})]}),c={textbox:x,image:R,path:n,rect:n,circle:n,ellipse:n,triangle:n,cropimage:to,many:S};function wo(o,d){c[o]=d}var eo=Q(({store:o,downloadButtonEnabled:d,components:p={}})=>{let z=new Set(o.selectedElements.map(r=>r?.type)).size===1,f=o.selectedElements.length===1,a=o.selectedElements[0],g=o.selectedElements.length&&o.selectedElements.every(r=>r?.locked),v=f&&a?.isCropping,s=f&&c[a?.type];z?s=c[a?.type]:o.selectedElements.length>1&&(s=c.many);let m=K(p);(Object.keys(p).some(r=>p[r]!==m.current[r])||Object.keys(m.current).some(r=>!(r in p)))&&(m.current=Object.assign({},p));let t=m.current,b=t?.ActionControls||(d?h:null),O=t?.Position||k,I=t?.Opacity||E,L=t?.Lock||H,j=t?.Duplicate||C,A=t?.Remove||N,F=t?.History||G,U=t?.Group||B;return e($,{className:"bp5-navbar design-toolbar",children:l(oo,{children:[!v&&e(F,{store:o}),!a&&e(T,{store:o,components:t}),s&&!g&&e(s,{store:o,components:t}),!v&&l(u,{style:{float:"right"},children:[e(U,{store:o}),e(O,{store:o}),!g&&e(I,{store:o}),e(L,{store:o}),e(j,{store:o}),e(A,{store:o}),b&&l(ro,{children:[e(V,{orientation:"vertical",style:{margin:"0 15px"}}),e(b,{store:o})]})]})]})})}),Do=eo;export{u as a,wo as b,eo as c,Do as d,G as e};
|
package/dist/chunk-AGNRQAPA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as y}from"./chunk-4LUZF4CB.js";import{observer as g}from"mobx-react-lite";import{ReactSortable as m}from"react-sortablejs";import{useState as u}from"react";import{findIndex as v}from"es-toolkit/compat";import{Button as p,Card as f,Input as h}from"antd";import{GripVertical as x,Eye as b,EyeClosed as k,LockKeyholeOpen as C,LockKeyhole as j,Trash as E}from"lucide-react";import{jsx as t,jsxs as l}from"react/jsx-runtime";var H=g(({element:e,store:i})=>{let[r,o]=u(!1),a=v(i.selectedElements,d=>d?.id===e?.id)>=0,n=r?e.name||"":e.name||y(e.text)||`#${e.id||"\u7A7A"}`;return t(f,{className:a?"selected":"",style:{marginBottom:6,backgroundColor:a?"rgba(22, 119, 255, 0.3)":""},styles:{body:{padding:"8px 5px"}},onMouseDown:d=>{let s=d.ctrlKey||d.metaKey||d.shiftKey?[...i.selectedElements]:[];v(s,c=>c.id===e.id)<0&&(s.push(e),i.selectElements(s.map(c=>c.id)),i.editor?.objectsHandler.selectElements(s))},children:l("div",{style:{display:"flex",justifyContent:"space-between"},children:[l("div",{style:{lineHeight:"30px",display:"flex"},children:[t("div",{className:"drag-handle",style:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"move",height:30},children:t(x,{size:16})}),t("div",{style:{padding:"0 7px",opacity:.5,width:65},children:e.type}),t("div",{style:{maxWidth:138},children:t(h,{style:{minWidth:130},placeholder:"Type element name...",value:n,onFocus:()=>{o(!0)},onBlur:()=>{o(!1)},onChange:d=>{i.editor?.objectsHandler.update({name:d.target.value},e.id),i._triggerUpdate()}})})]}),l("div",{children:[t(p,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{i.editor?.objectsHandler.update({visible:!e.visible},e.id),i._triggerUpdate()},children:e.visible?t(b,{size:16}):t(k,{size:16})}),t(p,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{e?.lockMovementX?i.editor?.lockHandler.unlock(e.id):i.editor?.lockHandler.lock(e.id)},children:e.lockMovementX?t(j,{size:16}):t(C,{size:16})}),t(p,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{i.editor?.objectsHandler.remove(e.id)},children:t(E,{size:16})})]})]})})}),w=g(({store:e})=>{let r=e.objects.filter(o=>o?.id!=="workarea").reverse();return l("div",{style:{height:"100%",overflow:"auto"},children:[t("div",{style:{height:40,paddingTop:5},children:"Elements on your active page:"}),t("div",{children:r.length===0?t("div",{children:"No elements on the page..."}):null}),t(m,{list:r,direction:"horizontal",setList:o=>{o.forEach((a,n)=>{let d=o.length-n;e.objects.indexOf(a)!==d&&(e.editor?.layerHandler.updateLayerOrderByTargetIndex(d,!0,a),e._triggerUpdate())})},children:r.map(o=>t(H,{element:o,store:e},o.id))})]})});export{w as a};
|
package/dist/chunk-APQPKBER.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as y}from"./chunk-OQ6HU62L.js";import{a as g,b as m}from"./chunk-YRJUN267.js";import{a as p,b as k}from"./chunk-RVXI723F.js";import{ColorPicker as S,Tooltip as h,Button as P}from"antd";import{CirclePlus as T}from"lucide-react";import{useState as b,useRef as C,useMemo as F}from"react";import{cssGradient2FabricGradient as w}from"@ydesign/core";import{observer as A}from"mobx-react-lite";import{jsx as t,jsxs as u}from"react/jsx-runtime";var B=async e=>y(e),c=e=>e?typeof e=="string"?e:e.colorStops?JSON.stringify(e.colorStops):JSON.stringify(e):"",H=A(({store:e})=>{let r=e.editor?.workareaHandler.workarea?.fill,[o,n]=b(()=>p(r)),i=C(!1),a=C(c(r)),f=c(r);f!==a.current&&!i.current&&(a.current=f,n(p(r)));let x=F(()=>o,[c(o)]);return t(h,{title:"\u80CC\u666F\u989C\u8272",children:t("div",{style:{height:32},children:t(S,{value:x,allowClear:!0,mode:["single","gradient"],onOpenChange:l=>{i.current=l,l||(a.current=c(r))},onChange:l=>{n(l)},onChangeComplete:l=>{let d=l.toCssString();if(d.includes("gradient")){let v=w(d);e.editor?.workareaHandler.setWorkareaBgColor(v)}else e.editor?.workareaHandler.setWorkareaBgColor(d)}})})})}),I=({store:e})=>t("div",{children:u("label",{htmlFor:"input-file",children:[u(P,{type:"text",styles:{root:{padding:"0 8px"}},onClick:()=>{document.querySelector("#input-file")?.click()},children:[t(T,{size:16})," add image"]}),t("input",{type:"file",id:"input-file",style:{display:"none"},onChange:async r=>{let{target:o}=r;if(!(!o.files||o.files.length===0)){for(let n of o.files){let a={type:"image",src:await B(n)};e.editor?.objectsHandler.add(a)}o.value=""}},multiple:!0,accept:"image/*"})]})}),R=({store:e})=>t("div",{children:u(P,{type:"text",styles:{root:{padding:"0 8px"}},onClick:()=>{e.editor?.objectsHandler.add({originX:"left",originY:"top",fontSize:100,textAlign:"left",fill:k(),text:"Hello World",type:"textbox"})},children:[t(T,{size:16}),"add text"]})}),D={DefaultBackgroundPicker:H,DefaultAddImage:I,DefaultAddText:R},E=({store:e,components:s})=>{let o=g({type:"text",usedItems:["DefaultBackgroundPicker","DefaultAddImage","DefaultAddText"],components:s});return t(m,{items:o,itemRender:n=>{let i=s[n]||D[n];return i&&t(i,{store:e},n)}})},V=E;export{H as a,E as b,V as c};
|
package/dist/chunk-B35ZYWID.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Download as s}from"lucide-react";import{useState as l}from"react";import{Button as d,Popover as g,Slider as m,Select as n}from"antd";import{jsx as t,jsxs as e}from"react/jsx-runtime";var u=({store:i})=>{let[a,r]=l("png"),[p,v]=l(1),[o,c]=l(1);return t(g,{content:e("div",{className:"w-80",children:[e("div",{className:"mb-4",children:[t("div",{style:{marginBottom:"8px"},className:"text-gray-500",children:"File type"}),e(n,{value:a,onChange:r,style:{width:"100%"},children:[t(n.Option,{value:"png",children:"PNG"}),t(n.Option,{value:"jpeg",children:"JPEG"})]})]}),e("div",{className:"mb-4",children:[t("div",{style:{marginBottom:"8px"},className:"text-gray-500",children:"Quality"}),t("div",{style:{padding:"0 15px"},children:t(m,{min:.2,max:1,value:p,step:.2,onChange:v,marks:{.2:"20%",.4:"40%",.6:"60%",.8:"80%",1:"100%"}})})]}),e("div",{className:"mb-4",children:[t("div",{style:{marginBottom:"8px"},className:"text-gray-500",children:"Multiplier"}),t("div",{style:{padding:"0 15px"},children:t(m,{min:.5,max:3,value:o,step:.5,onChange:c,marks:{.5:.5,1:1,1.5:1.5,2:2,2.5:2.5,3:3}})}),e("div",{className:"text-sm text-gray-500 py-1",children:["size\uFF1A",Math.round(i.width*o)," x ",Math.round(i.height*o)," px"]})]}),t("div",{children:e(d,{type:"primary",block:!0,onClick:async()=>{let y=i.toJSON();console.log("\u5BFC\u51FAjson",y),i.saveAsImage({format:a,quality:p,multiplier:o})},icon:t(s,{size:16}),children:["Download ",a.toUpperCase()]})})]}),trigger:"click",children:t(d,{type:"primary",icon:t(s,{size:16}),style:{width:155},children:"Download"})})},w=u;export{u as a,w as b};
|
package/dist/chunk-CMH73CYQ.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-IQ7O55C5.js";import{useEffect as u,useState as y}from"react";import{Tabs as w,Button as h}from"antd";import k from"styled-components";import{Upload as Y,Trash as X}from"lucide-react";import{observer as d}from"mobx-react-lite";import{jsx as o,jsxs as f}from"react/jsx-runtime";var v=[{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/81b623c61f379f8b6b59d6e3f63c10c8.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:450.5,top:123,width:900,height:245,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:450.5,top:192.5,width:886,height:80,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:26,name:"\u5F62\u72B6 1 \u62F7\u8D1D 7",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/df58054a-786a-4882-8436-f5ffed9c9528.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:448.43054900000004,top:88.84094399999998,width:880,height:124.3,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSansCN-Heavy",fontWeight:"normal",fontSize:110,text:"\u7206\u7B11\u6B63\u5728\u52A0\u8F7D\u4E2D\u2026",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.14184705951538149,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:27,name:"\u7206\u7B11\u6B63\u5728\u52A0\u8F7D\u4E2D\u2026"}],width:900,height:245}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/03d45f72dbd9530e6cdfc2fb063e3b49.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:469.5,top:108.5,width:938,height:216,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:830,top:110.5,width:171,height:190,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:23,name:"\u5F62\u72B6 1",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/cb0c6b84-25e4-45e5-8d6c-d646e45bd265.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:831.238644,top:98.25498600000003,width:147.76459,height:124.3,fill:"rgba(255, 255, 255, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1.044109,scaleY:1.044109,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSansCN-Heavy",fontWeight:"normal",fontSize:110,text:"+1",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:24,name:"+1"},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:360.5,top:102,width:719.390864,height:203.227919,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSansCN-Heavy",fontWeight:"normal",fontSize:179.84771592471296,text:"\u5904\u7406\u6280\u5DE7",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:25,name:"\u5904\u7406\u6280\u5DE7"}],width:938,height:216}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/f8e4c5bfb5bd330058f70c4043c09e6b.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:529,top:130.5,width:1057,height:260,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:638.5,top:132,width:804,height:227,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:10,name:"\u56FE\u5C42 3",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/43641401-44b3-45f8-96c2-1fcab4030c17.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:124,top:132.5,width:225,height:222,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:12,name:"\u56FE\u5C42 4",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/e34eb0b4-0f90-4370-ab17-8e5dc56004f9.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:129.73850000000004,top:137.67086099999995,width:185.9375,height:158.2,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"sucaijishi-kft",fontWeight:"normal",fontSize:140,text:"01",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:13,name:"01"},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:621.209607,top:146.58432800000003,width:640,height:180.8,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"sucaijishi-kft",fontWeight:"normal",fontSize:160,text:"\u88C5\u4FEE\u653B\u7565",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:14,name:"\u88C5\u4FEE\u653B\u7565"}],width:1057,height:260}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/3cf5e63e6fb22ea8c1dc2178667468e4.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:430,top:120,width:859,height:239,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:519.5,top:121.5,width:670,height:170,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:105,name:"\u77E9\u5F62 5",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/b293e875-d051-4c57-b0f3-eadebd23ef43.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:122.5,top:120,width:242,height:239,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:98,name:"\u77E9\u5F62 41",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/8ccee46c-474f-4a72-8084-a92e3cf5cf4a.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:505.27964199999997,top:127.623694,width:480,height:135.6,fill:"rgba(1.989, 1.989, 1.989, 1)",stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"Chusung",fontWeight:"normal",fontSize:120,text:"\u4ECA\u65E5\u5FC3\u60C5",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:106,name:"\u4ECA\u65E5\u5FC3\u60C5"}],width:859,height:239}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/5faf22fa36d4eb06d46d687b5ac9084c.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:555,top:89,width:1109,height:177,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:77.5,top:84.5,width:142,height:138,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:757,name:"\u5F62\u72B6 1",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/5c409304-a874-49b0-a8f7-aea1bfb4d328.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:621.1910109999999,top:99.545797,width:938.019295,height:151.423115,fill:"rgba(255, 255, 255, 1)",stroke:"rgba(0, 0, 0, 1)",strokeWidth:5,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"TsangerYuYangT-W05",fontWeight:"normal",fontSize:134.002756467618,text:"\u56DB\u516D\u7EA7\u9AD8\u6548\u5907\u8003",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.6959459459459459,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:755,name:"\u56DB\u516D\u7EA7\u9AD8\u6548\u5907\u8003"}],width:1109,height:177}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/5bf739287bc1b2f2279709e93453c753.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:597.5,top:260.5,width:1194,height:520,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:132,top:277,width:243,height:419,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:761,name:"\u56FE\u5C42 8",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/25561fa8-4af2-498a-805c-9cd1f85b001c.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:1060.5,top:277,width:244,height:419,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:762,name:"\u56FE\u5C42 9",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/de0e0cbe-900c-43c3-b8bd-55a4080fd8c1.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:594,top:277.5,width:809.75799,height:428.27,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSerifCN-Bold",fontWeight:"normal",fontSize:113,text:`BEST
|
|
2
|
-
OF THE YEAR
|
|
3
|
-
-2024-`,underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1.176991150442478,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:763,name:"BEST OF THE YEAR -2024-"}],width:1194,height:520}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/0d1c4158adb5b365cfdc07e874a3a8ff.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:474.5,top:172,width:948,height:343,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:504,top:197,width:841,height:239,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:948,name:"\u77E9\u5F62 1",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/bbac0b0e-0a17-4182-be4b-16f4fc1f3545.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:97.5,top:90,width:212,height:211,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:961,name:"\u77E9\u5F62 2 \u62F7\u8D1D",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/c17d7ced-0b31-41d9-9987-7028658dbef2.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:503.5,top:197,width:708,height:200.01,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"TsangerYuYangT-W05",fontWeight:"normal",fontSize:177,text:"\u5E72\u8D27\u5206\u4EAB",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.08135593220338984,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:962,name:"\u5E72\u8D27\u5206\u4EAB"}],width:948,height:343}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/3ecefb713c4ef1e0aba8a39c1d4890c0.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:436.5,top:100.0000005,width:872,height:199,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:486,top:94.0000005,width:767,height:163,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:973,name:"\u77E9\u5F62 3",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/42611a3a-c771-4d7f-aca7-823e52f2da72.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:100,top:100.0000005,width:199,height:199,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:970,name:"\u56FE\u5C42 2",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/58f14952-740b-4c7c-9930-398e1f74ff72.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:527,top:97.0000005,width:640.840645,height:90.518741,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"tsanger-yumoW04",fontWeight:"normal",fontSize:80.1050805676651,text:"\u9047\u5230\u8FD9\u4E9B\u8D76\u7D27\u56E4\uFF01",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.23225806451612904,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:971,name:"\u9047\u5230\u8FD9\u4E9B\u8D76\u7D27\u56E4\uFF01"}],width:872,height:199}}],C=k.div`
|
|
4
|
-
height: calc(100vh - 125px);
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
|
|
8
|
-
.bp5-dark & .polotno-text-preview-plain {
|
|
9
|
-
filter: invert(1);
|
|
10
|
-
}
|
|
11
|
-
`,x=k.div`
|
|
12
|
-
height: 100px;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
box-shadow: 0 0 5px rgba(16, 22, 26, 0.3);
|
|
15
|
-
border-radius: 6px;
|
|
16
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
17
|
-
position: relative;
|
|
18
|
-
font-size: 25px;
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
align-content: center;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
text-align: center;
|
|
24
|
-
color: white;
|
|
25
|
-
margin-bottom: 10px;
|
|
26
|
-
user-select: none;
|
|
27
|
-
`,L=t=>new Promise((l,n)=>{let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{l(i.result)},i.onerror=s=>{n(s)}}),O=d(({font:t,onSelect:l,onRemove:n})=>(console.log("font",t),f(x,{style:{fontFamily:t.fontFamily},className:"polotno-font-item",onClick:l,children:[t.fontFamily+" text",o(h,{type:"text",style:{position:"absolute",right:0,bottom:0},onClick:i=>{i.stopPropagation(),n()},children:o(X,{size:16,style:{color:"white"}})})]}))),g=t=>{let{onSelect:l,children:n,...i}=t;return o(h,{type:"text",block:!0,className:"polotno-close-panel",onClick:()=>{l&&l()},...i,children:n})},R=d(({store:t})=>{let[l,n]=y("text");u(()=>{t.loadFont("Roboto")},[]),u(()=>{t.fonts.forEach(e=>t.loadFont(e.fontFamily))},[t.fonts]);let i=e=>{n(e)},s=e=>{let a=e.width||t.width/2,r=e.left||t.width/2-a/2,c=e.top||t.height/2-e.fontSize/2,p=(t.width+t.height)/2160;t.addElement(Object.assign(Object.assign({type:"textbox",fontFamily:"Roboto"},e),{left:r,top:c,width:a,fontSize:e.fontSize*p,splitByGrapheme:!0}))},b=[{key:"text",label:"Text",children:f(C,{children:[o(g,{style:{marginBottom:"5px",width:"100%",fontSize:"25px",fontFamily:"Roboto",padding:"20px 0"},onSelect:e=>{console.log("e ---> Header",e),s({text:"Header",fontSize:76,fontFamily:"Roboto"})},children:"Create header"}),o(g,{style:{marginBottom:"5px",width:"100%",fontSize:"18px",fontFamily:"Roboto",padding:"20px 0"},onSelect:e=>{console.log("e ---> Sub Header",e),s({text:"Sub Header",fontSize:44,fontFamily:"Roboto"})},children:"Create sub header"}),o(g,{style:{marginBottom:"5px",width:"100%",fontSize:"14px",fontFamily:"Roboto",padding:"20px 0"},onSelect:e=>{console.log("e ---> Body Text",e),s({text:"Body Text",fontSize:30,fontFamily:"Roboto"})},children:"Create body text"}),o(m,{shadowEnabled:!1,images:v,getPreview:e=>e.url,isLoading:!1,error:!1,onSelect:(...e)=>{console.log("args ---> ",e)},itemHeight:150,spacing:10})]})},{key:"myFonts",label:"My fonts",children:f("div",{style:{display:"flex",flexDirection:"column",height:"calc(100% - 50px)"},children:[f("label",{htmlFor:"polotno-font-upload",children:[f(h,{block:!0,onClick:()=>{let e=document.querySelector("#polotno-font-upload");e&&e.click()},children:[o(Y,{size:16}),"Upload font"]}),o("input",{type:"file",accept:".ttf, .otf, .woff, .woff2, .eot",id:"polotno-font-upload",style:{display:"none"},onChange:async e=>{let{target:a}=e,r=a.files?.[0];if(r){console.log(r);let c=await L(r),p=r.name.split(".")[0];t.addFont({fontFamily:p,name:p,url:c})}}})]}),o("div",{style:{paddingTop:"20px",overflow:"auto",height:"100%"},children:t.fonts.map((e,a)=>o(O,{font:e,onSelect:()=>{s({fontSize:80,text:"Cool text",fontFamily:e.fontFamily})},onRemove:()=>{t.find(r=>(r.type==="textbox"&&r.fontFamily===e.fontFamily&&t.set(r,{fontFamily:"Roboto"}),!1)),t.removeFont(e.fontFamily)}},a))})]})}];return o("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:o(w,{defaultActiveKey:"text",activeKey:l,items:b,onChange:i,styles:{content:{height:"100%"}}})})});export{R as a};
|
package/dist/chunk-COQ4GO5N.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as A}from"./chunk-PSXS4WMN.js";import{a as j}from"./chunk-4HEMGHOQ.js";import{a as I,b as H}from"./chunk-YRJUN267.js";import{a as T,c as B}from"./chunk-RVXI723F.js";import{a as b}from"./chunk-WJT6VPDR.js";import{observer as u}from"mobx-react-lite";import{useEffect as S,useState as m,useCallback as O,useRef as L,useMemo as G}from"react";import{ColorPicker as W,Popover as M,Button as g,Input as E,InputNumber as P,Space as V,Slider as N,Tooltip as f}from"antd";import{cssGradient2FabricGradient as R}from"@ydesign/core";import{ChevronDown as _,TextAlignStart as J,TextAlignCenter as K,TextAlignEnd as U,TextAlignJustify as D,Bold as $,Italic as q,Underline as Q,Strikethrough as X,ListChevronsUpDown as Y,TextWrap as Z}from"lucide-react";import{FixedSizeList as tt}from"react-window";import{jsx as t,jsxs as h}from"react/jsx-runtime";var{Search:et}=E,nt=({fontFamily:o,handleClick:i,modifiers:n,store:r,isCustom:c})=>{let[s,a]=m(!c);if(console.log("FontItem ---> ",a),S(()=>{s||r.loadFont(o)},[o,s]),o==="_divider")return t("div",{style:{width:"100%",height:1,background:"#e8e8e8"}});let d=o;return t(g,{type:n.active?"primary":"text",block:!0,style:{justifyContent:"start"},onClick:()=>i(o),disabled:n.disabled,styles:{root:{fontFamily:'"'+o+'"'},content:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},children:d})},ot=({onChange:o,defaultValue:i})=>t(et,{placeholder:i,allowClear:!0,onChange:n=>{o(n.target.value)},style:{width:210}}),it=({store:o,fonts:i,activeFont:n,activeFontLabel:r,onFontSelect:c})=>{let[s,a]=m(""),d=i.filter(y=>y.toLowerCase().includes(s.toLowerCase()));return t(M,{content:h("div",{children:[t(ot,{defaultValue:"\u641C\u7D22\u5B57\u4F53",onChange:y=>a(y??"")}),t("div",{style:{paddingTop:5},children:t(tt,{itemCount:d.length,itemSize:28,width:210,height:Math.min(400,28*d.length)+10,children:({index:y,style:l})=>{let e=d[y];return t("div",{style:{...l,display:"flex",alignItems:"center",justifyContent:"center"},children:t(nt,{fontFamily:e,modifiers:{active:n===e},handleClick:()=>c(e),store:o,isCustom:o.fonts.find(p=>p.fontFamily===e)||b.find(p=>p.fontFamily===e)},e)})}})})]}),trigger:"click",children:t(g,{type:"text",style:{marginRight:5,fontFamily:'"'+n+'"',overflow:"hidden",whiteSpace:"nowrap",maxHeight:30,padding:"0 10px"},icon:t(_,{size:16,style:{display:"flex"}}),iconPlacement:"end",children:r})})},F=["left","center","right","justify"],lt=u(({elements:o,store:i})=>{let n=i.fonts.concat(b).map(a=>a.fontFamily),r=o[0].fontFamily;r.length>15&&(r=r.slice(0,15)+"...");let c=B(i.objects),s=[...new Set(c.concat("_divider").concat(n))];return t(it,{fonts:s,activeFont:o[0].fontFamily,activeFontLabel:r,store:i,onFontSelect:a=>{i.editor?.objectsHandler.setTextStyle({fontFamily:a})}})}),x=o=>o?typeof o=="string"?o:o.colorStops?JSON.stringify(o.colorStops):JSON.stringify(o):"",rt=u(({elements:o,store:i})=>{let n=o[0],r=O(()=>{let{selectionStart:l,selectionEnd:e}=n;if(l!==e&&l!==void 0){let p=n.getSelectionStyles(l,l+1);if(p.length>0&&p[0].fill!==void 0)return p[0].fill}return n.fill},[n]),[c,s]=m(()=>T(r())),a=L(!1),d=L(x(r()));S(()=>{let l=i.editor?.customCanvas?.canvas;if(!l)return;let e=()=>{if(!a.current){let p=r();d.current=x(p),s(T(p))}};return l.on("text:selection:changed",e),l.on("text:editing:entered",e),l.on("text:editing:exited",e),()=>{l.off("text:selection:changed",e),l.off("text:editing:entered",e),l.off("text:editing:exited",e)}},[i.editor?.customCanvas?.canvas,r]),S(()=>{if(!a.current){let l=r(),e=x(l);e!==d.current&&(d.current=e,s(T(l)))}},[n,r]);let y=G(()=>c,[x(c)]);return t(W,{value:y,allowClear:!0,mode:["single","gradient"],onOpenChange:l=>{if(a.current=l,!l){let e=r();d.current=x(e)}},onChange:l=>{s(l)},onChangeComplete:l=>{let e=l.toCssString();if(e.includes("gradient")){let p=R(e);i.editor?.objectsHandler.setTextStyle({fill:p})}else i.editor?.objectsHandler.setTextStyle({fill:e})}})}),st=u(({elements:o,store:i})=>{let[n,r]=m(o[0].fontSize);S(()=>{r(o[0].fontSize)},[o[0]?.fontSize,i._updateFontSize]);let c=s=>{Number.isNaN(s)||(i.editor?.objectsHandler.setTextStyle({fontSize:Number(s)}),r(Number(s)))};return t(P,{min:5,max:4*i.height,value:Math.round(n),onChange:c,style:{width:70}})}),at=u(({elements:o,store:i})=>{let n=o[0],[r,c]=m(n.textAlign),[s,a]=m(n.fontWeight),[d,y]=m(n.fontStyle),[l,e]=m(n.underline),[p,k]=m(n.linethrough),[v,w]=m(n.splitByGrapheme);return S(()=>{c(n.textAlign),a(n.fontWeight),y(n.fontStyle),e(n.underline),k(n.linethrough),w(n.splitByGrapheme)},[n]),h(V.Compact,{children:[t(f,{placement:"bottom",title:`Text align ${r}`,children:t(g,{type:"text",icon:r==="left"?t(J,{size:16,style:{display:"flex"}}):r==="center"?t(K,{size:16,style:{display:"flex"}}):r==="right"?t(U,{size:16,style:{display:"flex"}}):t(D,{size:16,style:{display:"flex"}}),onClick:()=>{let C=(F.indexOf(r)+1+F.length)%F.length,z=F[C];i.editor?.objectsHandler.setTextStyle({textAlign:z}),c(z)}})}),t(f,{placement:"bottom",title:"Bold",children:t(g,{type:s==="bold"||s==="700"?"primary":"text",icon:t($,{size:16,style:{display:"flex"}}),onClick:()=>{s==="bold"||s==="700"?(i.editor?.objectsHandler.setTextStyle({fontWeight:"normal"}),a("normal")):(i.editor?.objectsHandler.setTextStyle({fontWeight:"bold"}),a("bold"))}})}),t(f,{placement:"bottom",title:"Italic",children:t(g,{type:d==="italic"?"primary":"text",icon:t(q,{size:16,style:{display:"flex"}}),onClick:()=>{d==="italic"?(i.editor?.objectsHandler.setTextStyle({fontStyle:"normal"}),y("normal")):(i.editor?.objectsHandler.setTextStyle({fontStyle:"italic"}),y("italic"))}})}),t(f,{placement:"bottom",title:"Underline",children:t(g,{type:l?"primary":"text",icon:t(Q,{size:16,style:{display:"flex"}}),onClick:()=>{i.editor?.objectsHandler.setTextStyle({underline:!l}),e(!l)}})}),t(f,{placement:"bottom",title:"Strikethrough",children:t(g,{type:p?"primary":"text",icon:t(X,{size:16,style:{display:"flex"}}),onClick:()=>{i.editor?.objectsHandler.setTextStyle({linethrough:!p}),k(!p)}})}),t(f,{placement:"bottom",title:"Split by grapheme",children:t(g,{type:v?"primary":"text",icon:t(Z,{size:16,style:{display:"flex"}}),onClick:()=>{i.editor?.objectsHandler.setTextStyle({splitByGrapheme:!v}),w(!v)}})})]})}),ct=u(({elements:o,store:i})=>{let n=o[0],r={display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},c=typeof n.lineHeight=="number"?100*n.lineHeight:120,[s,a]=m(c),[d,y]=m(n.charSpacing),l=e=>{i.editor?.objectsHandler.setTextStyle(e)};return t(M,{trigger:"click",content:h("div",{style:{padding:"0 6px",width:"230px"},children:[h("div",{style:r,children:[t("div",{children:"Line height"}),t("div",{children:t(P,{min:50,max:250,value:Math.round(s),style:{width:80},onChange:e=>{l({lineHeight:e/100}),a(e)}})})]}),t(N,{value:Math.round(s),min:50,max:250,step:1,onChange:e=>{l({lineHeight:e/100}),a(e)}}),h("div",{style:r,children:[t("div",{children:"Letter spacing"}),t("div",{children:t(P,{min:-50,max:250,value:Math.round(d/10),style:{width:80},onChange:e=>{l({charSpacing:(e??0)*10}),y((e??0)*10)}})})]}),t(N,{value:Math.round(d/10),min:-50,max:250,step:1,onChange:e=>{l({charSpacing:(e??0)*10}),y((e??0)*10)}})]}),children:t(g,{type:"text",icon:t(Y,{size:16,style:{display:"flex"}})})})}),dt={TextFill:rt,TextFontFamily:lt,TextFontSize:st,TextFontVariant:at,TextSpacing:ct,TextFilters:j,TextAiWrite:A},pt=u(({store:o,components:i})=>{let n=o.selectedElements,c=I({type:"text",usedItems:["TextFill","TextFontFamily","TextFontSize","TextFontVariant","TextSpacing","TextFilters","TextAiWrite"],components:i});return t(H,{items:c,itemRender:s=>{let a=i[s]||dt[s];return a&&t(a,{elements:n,element:n[0],store:o},s)}})}),bt=pt;export{F as a,pt as b,bt as c};
|
package/dist/chunk-CS6Z4TQU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Popover as a,Button as p}from"antd";import{Rotate3d as c,FlipHorizontal as n,FlipVertical as y}from"lucide-react";import{useState as d,useEffect as u,useCallback as r}from"react";import{jsx as i,jsxs as b}from"react/jsx-runtime";var X=({element:l,store:e})=>{let[t,o]=d({flipX:!1,flipY:!1}),f=r(()=>{e.editor?.objectsHandler.update({flipX:!t.flipX}),o({...t,flipX:!t.flipX})},[e.editor,t]),s=r(()=>{e.editor?.objectsHandler.update({flipY:!t.flipY}),o({...t,flipY:!t.flipY})},[e.editor,t]);return u(()=>{l&&o({flipX:l.flipX,flipY:l.flipY})},[l]),i(a,{trigger:"click",content:b("div",{style:{width:165},children:[i(p,{type:"text",block:!0,style:{justifyContent:"start"},icon:i(n,{size:16,style:{display:"flex"}}),onClick:f,children:"Flip horizontally"}),i(p,{type:"text",block:!0,style:{justifyContent:"start"},icon:i(y,{size:16,style:{display:"flex"}}),onClick:s,children:"Flip vertically"})]}),children:i(p,{type:"text",icon:i(c,{size:16,style:{display:"flex"}}),styles:{root:{padding:"0 7px"}},children:"Flip"})})};export{X as a};
|
package/dist/chunk-DBQHEZPG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";var e=({store:o})=>(console.log("UploadPanel",o),l("div",{children:"\u4E0A\u4F20\u56FE\u7247"})),p=e;export{e as a,p as b};
|
package/dist/chunk-DJBTBRPS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";var t=({store:o})=>(console.log("PhotosPanel",o),e("div",{children:"\u56FE\u7247\u9762\u677F"}));export{t as a};
|
package/dist/chunk-EOBIVNFF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Button as i,Modal as m}from"antd";import{useState as n,useEffect as c}from"react";import{observer as l}from"mobx-react-lite";import{Fragment as g,jsx as t,jsxs as p}from"react/jsx-runtime";var d=l(({isOpen:r,onClose:o,element:e})=>{let[a,s]=n(e.getSrc());return c(()=>{s(e.getSrc())},[e.id]),t(m,{title:"Remove background from image",open:r,onOk:o,onCancel:o,width:{xs:"90%",sm:"80%",md:"70%",lg:"60%",xl:"50%",xxl:"40%"},styles:{body:{padding:"35px 0"}},children:t("img",{src:a,style:{width:"100%",maxHeight:"400px",objectFit:"contain"}})})}),x=({element:r})=>{let[o,e]=n(!1);return p(g,{children:[t(i,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>e(!0),children:"Remove background"}),t(d,{isOpen:o,onClose:()=>e(!1),element:r})]})};export{x as a};
|
package/dist/chunk-FXO52BV7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dropdown as M,Button as d,Modal as S,Input as g,Select as P}from"antd";import{Menu as I,Plus as B,Grid2X2 as D,Star as T,ShoppingBag as b,FileText as F,Presentation as j,Share2 as H,Printer as L,Link2 as O,Image as W,FileImage as _,Smartphone as q,Monitor as A,Square as E,Languages as G}from"lucide-react";import{useState as l}from"react";import{Fragment as $,jsx as t,jsxs as i}from"react/jsx-runtime";var U=[{key:"all",label:"\u5168\u90E8",icon:D},{key:"common",label:"\u5E38\u7528\u5C3A\u5BF8",icon:T},{key:"ecommerce",label:"\u7535\u5546\u7269\u6599",icon:b},{key:"office",label:"\u884C\u653F\u529E\u516C",icon:F},{key:"presentation",label:"\u6F14\u793A\u6587\u7A3F",icon:j},{key:"social",label:"\u793E\u4EA4\u5A92\u4F53",icon:H},{key:"print",label:"\u5370\u5237\u7269\u6599",icon:L}],x=[{name:"\u7535\u5546\u4E3B\u56FE\uFF081:1\uFF09",width:1440,height:1440,unit:"px"},{name:"\u7535\u5546\u4E3B\u56FE\uFF081:1\uFF09",width:800,height:800,unit:"px"},{name:"\u624B\u673A\u6D77\u62A5",width:1242,height:2208,unit:"px"},{name:"\u5C0F\u7EA2\u4E66\u5C01\u9762",width:1242,height:1656,unit:"px"},{name:"\u7AD6\u7248\u89C6\u9891\u5C01\u9762",width:1080,height:1920,unit:"px"},{name:"PPT\uFF0816:9\uFF09",width:1920,height:1080,unit:"px"}],X=[{label:"\u521B\u5EFA\u8BBE\u8BA1",key:"new_design",icon:t(B,{size:16})},{label:"\u8BED\u8A00",key:"language",icon:t("div",{style:{height:22,display:"flex",alignItems:"center"},children:t(G,{size:16})}),children:[{key:"en",label:"English"},{key:"zh",label:"\u4E2D\u6587"}]}],R=({store:m})=>{let[y,o]=l(!1),[v,f]=l("all"),[s,c]=l(800),[n,h]=l(800),[r,w]=l("px"),N=({key:e})=>{e==="new_design"&&o(!0)},k=()=>{let e=s,a=n;r==="mm"?(e=Math.round(s*3.7795275591),a=Math.round(n*3.7795275591)):r==="cm"&&(e=Math.round(s*37.795275591),a=Math.round(n*37.795275591)),m.setSize({width:e,height:a}),o(!1)},u=e=>{let a=e.width,p=e.height;e.unit==="mm"&&(a=Math.round(e.width*3.7795275591),p=Math.round(e.height*3.7795275591)),m.setSize({width:a,height:p}),o(!1)},C=()=>{o(!1)},z=()=>{c(n),h(s)};return i($,{children:[t(M,{menu:{items:X,onClick:N},trigger:["click"],styles:{root:{width:188}},children:t(d,{type:"text",children:t(I,{size:16})})}),t(S,{title:"\u521B\u5EFA\u8BBE\u8BA1",open:y,onCancel:C,footer:null,maskClosable:!1,width:840,styles:{container:{height:540,overflow:"hidden"},body:{height:488}},children:i("div",{className:"flex",style:{padding:"16px 0px 0px 0px",height:"100%"},children:[t("div",{className:"w-40 border-r border-gray-100 pr-2",children:U.map(e=>{let a=e.icon;return i("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg cursor-pointer mb-1 ${v===e.key?"bg-blue-500 text-white":"hover:bg-gray-100"}`,onClick:()=>f(e.key),children:[t(a,{size:16}),t("span",{className:"text-sm",children:e.label})]},e.key)})}),i("div",{className:"flex-1 pl-6 overflow-y-auto",children:[i("div",{className:"flex gap-4 mb-6",children:[i("div",{className:"flex-1 flex items-center gap-2 px-4 py-3 border border-gray-200 rounded-lg cursor-pointer hover:border-blue-400",children:[t(W,{size:20,className:"text-blue-500"}),t("span",{children:"\u6253\u5F00\u56FE\u7247"})]}),i("div",{className:"flex-1 flex items-center gap-2 px-4 py-3 border border-gray-200 rounded-lg cursor-pointer hover:border-blue-400",children:[t(_,{size:20,className:"text-blue-500"}),t("span",{children:"\u6253\u5F00PSD"})]})]}),i("div",{className:"mb-6",children:[t("h3",{className:"text-base font-medium mb-3",children:"\u5E38\u7528\u5C3A\u5BF8"}),i("div",{className:"flex items-center gap-2 mb-4",children:[t(g,{type:"number",value:s,onChange:e=>c(Number(e.target.value)),suffix:"\u5BBD",style:{width:100}}),t(d,{type:"text",icon:t(O,{size:16}),onClick:z}),t(g,{type:"number",value:n,onChange:e=>h(Number(e.target.value)),suffix:"\u9AD8",style:{width:100}}),t(P,{value:r,onChange:w,style:{width:100},options:[{value:"px",label:"px \u50CF\u7D20"},{value:"mm",label:"mm \u6BEB\u7C73"},{value:"cm",label:"cm \u5398\u7C73"}]}),t(d,{type:"primary",onClick:k,children:"\u521B\u5EFA"})]}),t("div",{className:"grid grid-cols-6 gap-3",children:x.map((e,a)=>i("div",{className:"flex flex-col items-center p-3 border border-gray-200 rounded-lg cursor-pointer hover:border-blue-400 hover:shadow-sm",onClick:()=>u(e),children:[t("div",{className:"w-10 h-10 flex items-center justify-center mb-2 text-gray-400",children:e.width===e.height?t(E,{size:24}):e.width<e.height?t(q,{size:24}):t(A,{size:24})}),t("span",{className:"text-xs text-center text-gray-700",children:e.name}),i("span",{className:"text-xs text-gray-400",children:[e.width,"*",e.height," ",e.unit]})]},a))})]}),i("div",{children:[i("div",{className:"flex items-center justify-between mb-3",children:[t("h3",{className:"text-base font-medium",children:"\u7535\u5546\u7269\u6599"}),t("span",{className:"text-sm text-blue-500 cursor-pointer hover:underline",children:"\u67E5\u770B\u66F4\u591A >"})]}),t("div",{className:"grid grid-cols-6 gap-3",children:x.slice(0,4).map((e,a)=>i("div",{className:"flex flex-col items-center p-3 border border-gray-200 rounded-lg cursor-pointer hover:border-blue-400 hover:shadow-sm",onClick:()=>u(e),children:[t("div",{className:"w-10 h-10 flex items-center justify-center mb-2 text-gray-400",children:t(b,{size:24})}),t("span",{className:"text-xs text-center text-gray-700",children:e.name}),i("span",{className:"text-xs text-gray-400",children:[e.width,"*",e.height," ",e.unit]})]},a))})]})]})]})})]})};export{R as a};
|
package/dist/chunk-GYDTKPW5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-75WC3GVB.js";import{LockKeyholeOpen as i,LockKeyhole as n}from"lucide-react";import{Tooltip as m,Button as s}from"antd";import{observer as k}from"mobx-react-lite";import{jsx as o}from"react/jsx-runtime";var b=k(({store:r})=>{let{disabled:p,locked:t,lock:c,unlock:l}=e({store:r});return o(m,{title:"Lock",placement:"bottom",children:o(s,{type:"text",styles:{root:{padding:"0 7px"}},disabled:p,onClick:()=>{t?l():c()},children:o(t?n:i,{size:16})})})});export{b as a};
|
package/dist/chunk-H67HTXU4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-JMIN2XMC.js";import{Copy as i}from"lucide-react";import{Tooltip as l,Button as m}from"antd";import{observer as n}from"mobx-react-lite";import{jsx as t}from"react/jsx-runtime";var d=n(({store:e})=>{let{disabled:p,duplicate:r}=o({store:e});return t(l,{title:"Duplicate",placement:"bottom",children:t(m,{type:"text",styles:{root:{padding:"0 7px"}},disabled:p,onClick:()=>{r()},children:t(i,{size:16})})})});export{d as a};
|
package/dist/chunk-IQ7O55C5.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import{c as x}from"./chunk-WCHGSVUC.js";import a from"styled-components";import{useRef as v,useEffect as O}from"react";import{Spin as D}from"antd";import{jsx as n,jsxs as b}from"react/jsx-runtime";var W=a.div`
|
|
2
|
-
height: 100%;
|
|
3
|
-
overflow: auto;
|
|
4
|
-
`,j=a.div`
|
|
5
|
-
width: 33%;
|
|
6
|
-
float: left;
|
|
7
|
-
`,P=a.div`
|
|
8
|
-
padding: 4px;
|
|
9
|
-
width: 100%;
|
|
10
|
-
&:hover .credit {
|
|
11
|
-
opacity: 1;
|
|
12
|
-
}
|
|
13
|
-
${x(".credit {opacity: 1;}")}
|
|
14
|
-
`,z=a.div`
|
|
15
|
-
border-radius: 5px;
|
|
16
|
-
position: relative;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
box-shadow: ${e=>e.$dataShadowenabled?"0 0 5px rgba(16, 22, 26, 0.3)":""};
|
|
19
|
-
padding: ${e=>e.$spacing?e.$spacing+"px":"0px"};
|
|
20
|
-
`,F=a.img`
|
|
21
|
-
width: 100%;
|
|
22
|
-
cursor: pointer;
|
|
23
|
-
display: block;
|
|
24
|
-
max-height: 300px;
|
|
25
|
-
min-height: 50px;
|
|
26
|
-
object-fit: contain;
|
|
27
|
-
`,H=a.div`
|
|
28
|
-
position: absolute;
|
|
29
|
-
bottom: 0px;
|
|
30
|
-
left: 0px;
|
|
31
|
-
font-size: 10px;
|
|
32
|
-
padding: 3px;
|
|
33
|
-
padding-top: 10px;
|
|
34
|
-
text-align: center;
|
|
35
|
-
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
|
|
36
|
-
width: 100%;
|
|
37
|
-
opacity: 0;
|
|
38
|
-
color: white;
|
|
39
|
-
`,I=a.p`
|
|
40
|
-
text-align: center;
|
|
41
|
-
padding: 30px;
|
|
42
|
-
`,G=({url:e,onSelect:l,shadowEnabled:t,className:g,itemHeight:i,crossOrigin:s,onLoad:p,credit:d,spacing:m})=>n(P,{className:"ydesign-close-panel",onClick:l,children:b(z,{$spacing:m,$dataShadowenabled:t,className:"border-1 border-gray-200",children:[n(F,{className:g,style:{height:i??"auto "},src:e,draggable:!0,loading:"lazy",crossOrigin:s,onLoad:p}),d&&n(H,{className:"credit",children:d})]})}),J=({images:e,rowsNumber:l,isLoading:t,getPreview:g,getCredit:i,getImageClassName:s,onSelect:p,crossOrigin:d="anonymous",shadowEnabled:m,itemHeight:N,error:y,hideNoResults:S=!1,spacing:$})=>{let c=l||2,T=v(null),f=[];for(let r=0;r<c;r++)f.push((e||[]).filter((w,o)=>o%c===r));let u=v(null),h=()=>{},R=()=>{h()};return O(()=>(h(),()=>{u.current&&(window.clearTimeout(u.current),u.current=null)}),[e?.length,t]),b(W,{ref:T,onScroll:()=>{},children:[f.map((r,w)=>b(j,{style:{width:100/c+"%"},children:[r.map((o,C)=>n(G,{image:o,url:g(o),onSelect:(L,k,E)=>{p(o,L,k,E)},credit:i&&i(o),crossOrigin:d,shadowEnabled:m,itemHeight:N,className:s&&s(o),onLoad:R,spacing:$},C)),t&&n("div",{style:{padding:30},children:n(D,{})})]},w)),!t&&(!e||!e.length)&&!y&&!S&&n(I,{children:"No results found"}),y&&n(I,{children:"Loading is failed..."})]})};export{J as a};
|
package/dist/chunk-KLZXBPXI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as s}from"./chunk-WJT6VPDR.js";import{a as e}from"./chunk-O2XFH626.js";import*as n from"mobx";import{createContext as c,useContext as a}from"react";var r=class{constructor({store:t}){e(this,"store");e(this,"status","saved");e(this,"name","");e(this,"id","");e(this,"user",{});e(this,"skipSaving",!1);e(this,"cloudEnabled",!1);n.makeAutoObservable(this),this.store=t}async firstLoad(t){this.store.loadJSON(t)}async getGlobalFont(t){return t?.length?(s(t),t):[]}},p=c(null),j=()=>{let o=a(p);if(!o)throw new Error("useProject must be used within a ProjectProvider");return o},i=o=>new r(o),P=i;export{p as a,j as b,i as c,P as d};
|
package/dist/chunk-LCE6Z46D.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as x}from"./chunk-CB23VFSC.js";import{b as k}from"./chunk-3TO57JPN.js";import{a as b}from"./chunk-M4S26KQG.js";import{a as I}from"./chunk-EOBIVNFF.js";import{a as f}from"./chunk-4HEMGHOQ.js";import{a as v}from"./chunk-CS6Z4TQU.js";import{a as p}from"./chunk-MXZ6RXT3.js";import{a as y,b as u}from"./chunk-YRJUN267.js";import{b as h}from"./chunk-MQZE5LZU.js";import{k as g,l as d}from"./chunk-7NNOHYKX.js";import{observer as m}from"mobx-react-lite";import{Button as c,Tooltip as T,Popover as P}from"antd";import{Crop as S}from"lucide-react";import w from"styled-components";import{jsx as o}from"react/jsx-runtime";var F=Object.keys(g),E=[{width:300,height:300,fill:"lightgray",stroke:"#0c0c0c",strokeWidth:0,url:""}],C=[];F.forEach(t=>{E.forEach(e=>{C.push(Object.assign({subType:t},e))})});C.forEach(t=>{t.url=x(d(t))});var B=w.div`
|
|
2
|
-
height: 220px;
|
|
3
|
-
`,l={root:{padding:"0 7px"}},R=({element:t,store:e})=>o(c,{type:"text",styles:l,onClick:async()=>{let i=e.width+2*e.bleed,s=e.height+2*e.bleed,r=t.getOriginalSize(),a={width:r.width,height:r.height},n=k({width:i,height:s},a);t.set({cropX:n.cropX,cropY:n.cropY,width:n.width,height:n.height,scaleX:i/n.width,scaleY:s/n.height,left:-e.bleed,top:-e.bleed}),t.setCoords(),e.editor?.customCanvas?.canvas?.requestRenderAll()},children:"Fit to page"}),H=m(({element:t,store:e})=>o(T,{title:"Crop",children:o(c,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{let i=e.editor?.layerHandler.getLayer();e.editor?.imageCropHandler.cropStart(t,i,t.getSrc())},children:o(S,{size:16})})})),U=m(({element:t,store:e})=>{let i=h.reduce((r,a)=>r.concat(a.children),[]),s=Math.ceil(i.length/4)||1;return t.clipPath?o(c,{type:"text",styles:l,onClick:()=>{t.set({clipPath:null}),e.editor?.customCanvas?.canvas?.requestRenderAll(),e._triggerUpdate()},children:"Remove mask"}):o(P,{styles:{container:{padding:"5px 10px"}},content:o("div",{style:{maxHeight:313,overflowY:"auto"},children:o(B,{style:{height:80*s,width:300},children:o("div",{className:p("shape-list","flex flex-wrap content-start mb-2"),children:i.map((r,a)=>o("div",{className:p("shape-item","w-[25%] h-0 pb-[25%] relative cursor-pointer shrink-0 mb-[1.2%]"),onClick:()=>{e.editor?.objectsHandler.createMaskElement(t,r),e._triggerUpdate()},children:o("div",{className:p("shape-content","absolute inset-0 flex justify-center items-center"),children:o("svg",{overflow:"visible",width:"50",height:"50",children:o("g",{transform:`scale(${50/r.viewBox[0]}, ${50/r.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:o("path",{className:"shape-path",d:r.path,fill:"#ccc",strokeMiterlimit:8,strokeLinecap:"butt"})})})})},a))})})}),trigger:"click",children:o(c,{type:"text",styles:l,children:"Apply mask"})})}),A={ImageFlip:v,ImageFilters:f,ImageFitToBackground:R,ImageCrop:H,ImageClip:U,ImageRemoveBackground:I,ImageEraserPen:b},L=m(({store:t,components:e})=>{let i=t.selectedElements,r=y({type:"text",usedItems:["ImageFlip","ImageFilters","ImageFitToBackground","ImageClip","ImageCrop","ImageRemoveBackground","ImageEraserPen"],components:e});return o(u,{items:r,itemRender:a=>{let n=e[a]||A[a];return n&&o(n,{elements:i,element:i[0],store:t},a)}})}),K=L;export{R as a,H as b,U as c,L as d,K as e};
|
package/dist/chunk-M4S26KQG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Button as i,Modal as l}from"antd";import{Eraser as p}from"lucide-react";import{useState as s,useEffect as m}from"react";import{observer as c}from"mobx-react-lite";import{Fragment as g,jsx as t,jsxs as f}from"react/jsx-runtime";var d=c(({isOpen:r,onClose:o,element:e})=>{let[n,a]=s(e.getSrc());return m(()=>{a(e.getSrc())},[e.id]),t(l,{title:"Eraser pen",open:r,onOk:o,onCancel:o,width:{xs:"90%",sm:"80%",md:"70%",lg:"60%",xl:"50%",xxl:"40%"},styles:{body:{padding:"35px 0"}},children:t("img",{src:n,style:{width:"100%",maxHeight:"400px",objectFit:"contain"}})})}),E=({element:r})=>{let[o,e]=s(!1);return f(g,{children:[t(i,{type:"text",icon:t(p,{size:16,style:{display:"flex"}}),styles:{root:{padding:"0 7px"}},onClick:()=>e(!0),children:"Eraser pen"}),t(d,{isOpen:o,onClose:()=>e(!1),element:r})]})};export{E as a};
|
package/dist/chunk-MNACXCF5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Layers as x}from"lucide-react";import{Popover as m,Button as n,Divider as o}from"antd";import{observer as r}from"mobx-react-lite";import{ChevronUp as v,ChevronsUp as g,ChevronDown as y,ChevronsDown as k,AlignStartVertical as w,AlignCenterVertical as f,AlignEndVertical as z,AlignStartHorizontal as b,AlignCenterHorizontal as u,AlignEndHorizontal as B,AlignVerticalSpaceAround as C,AlignHorizontalSpaceAround as h}from"lucide-react";import{Fragment as a,jsx as t,jsxs as l}from"react/jsx-runtime";var D=r(({store:e})=>{let d=e.selectedElements.length>0,i=e.selectedElementsIds,s=e.selectedElements.every(p=>p?.locked),c=!s&&e.selectedElements.length>1;return t(m,{styles:{container:{padding:"10px 5px"}},content:l("div",{style:{width:280},children:[t(o,{size:"small",children:"layering"}),l("div",{style:{display:"flex"},children:[l("div",{style:{width:"50%"},children:[t(n,{type:"text",block:!0,icon:t(v,{size:16}),disabled:!e.canMoveElementsUp(i),onClick:()=>{e.moveElementsUp(i)},children:t("span",{className:"w-[70px] text-left text-xs",children:"Forward"})}),t(n,{type:"text",block:!0,icon:t(g,{size:16}),disabled:!e.canMoveElementsTop(i),onClick:()=>{e.moveElementsTop(i)},children:t("span",{className:"w-[70px] text-left text-xs",children:"To Front"})})]}),l("div",{style:{width:"50%"},children:[t(n,{type:"text",block:!0,icon:t(y,{size:16}),disabled:!e.canMoveElementsDown(i),onClick:()=>{e.moveElementsDown(i)},children:t("span",{className:"w-[70px] text-left text-xs",children:"Backward"})}),t(n,{type:"text",block:!0,icon:t(k,{size:16}),disabled:!e.canMoveElementsBottom(i),onClick:()=>{e.moveElementsBottom(i)},children:t("span",{className:"w-[70px] text-left text-xs",children:"To Back"})})]})]}),!s&&l(a,{children:[t(o,{size:"small",children:"Position"}),l("div",{style:{display:"flex"},children:[l("div",{style:{width:"50%"},children:[t(n,{type:"text",block:!0,icon:t(w,{size:16}),onClick:()=>{e.editor?.alignmentHandler.alignLeft()},children:t("span",{className:"w-[70px] text-left text-xs",children:"Align left"})}),t(n,{type:"text",block:!0,icon:t(f,{size:16}),onClick:()=>{e.editor?.alignmentHandler.alignCenter()},children:t("span",{className:"w-[70px] text-left text-xs",children:"Align center"})}),t(n,{type:"text",block:!0,icon:t(z,{size:16}),onClick:()=>{e.editor?.alignmentHandler.alignRight()},children:t("span",{className:"w-[70px] text-left text-xs",children:"Align right"})})]}),l("div",{style:{width:"50%"},children:[t(n,{type:"text",block:!0,icon:t(b,{size:16}),onClick:()=>{e.editor?.alignmentHandler.alignTop()},children:t("span",{className:"w-[70px] text-left text-xs",children:"Align top"})}),t(n,{type:"text",block:!0,icon:t(u,{size:16}),onClick:()=>{e.editor?.alignmentHandler.alignMiddle()},children:t("span",{className:"w-[70px] text-left text-xs",children:"Align middle"})}),t(n,{type:"text",block:!0,icon:t(B,{size:16}),onClick:()=>{e.editor?.alignmentHandler.alignBottom()},children:t("span",{className:"w-[70px] text-left text-xs",children:"Align bottom"})})]})]})]}),c&&l(a,{children:[t(o,{size:"small",children:"Space evenly"}),l("div",{style:{display:"flex"},children:[t("div",{style:{width:"50%"},children:t(n,{type:"text",block:!0,icon:t(C,{size:16}),onClick:()=>{e.editor?.alignmentHandler.yequation()},children:t("span",{className:"w-[70px] text-left text-xs",children:"Vertically"})})}),t("div",{style:{width:"50%"},children:t(n,{type:"text",block:!0,icon:t(h,{size:16}),onClick:()=>{e.editor?.alignmentHandler.xequation()},children:t("span",{className:"w-[70px] text-left text-xs",children:"Horizontally"})})})]})]})]}),trigger:"click",placement:"bottom",children:l(n,{type:"text",disabled:!d,styles:{root:{padding:"0 7px"}},children:[t(x,{size:16})," Position"]})})});export{D as a};
|
package/dist/chunk-PSXS4WMN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{observer as o}from"mobx-react-lite";import{Popover as e,Button as r}from"antd";import{Pencil as i}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var s=o(()=>t(e,{trigger:"click",content:t("div",{children:"AI write"}),children:t(r,{type:"text",icon:t(i,{size:16,style:{display:"flex"}}),styles:{root:{padding:"0 7px"}},children:"AI write"})}));export{s as a};
|