@ydesign/react-editor 0.0.2 → 0.0.4
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/LICENSE +1 -1
- package/dist/app.css +2 -2
- package/dist/app.d.ts +4 -4
- package/dist/app.js +2 -2
- package/dist/canvas/workspace-canvas.d.ts +4 -0
- package/dist/canvas/workspace.d.ts +4 -0
- package/dist/chunk-3TO57JPN.js +1 -0
- package/dist/chunk-3TTTJUTT.js +1 -0
- package/dist/chunk-4FFLRF6N.js +1 -0
- package/dist/{chunk-V5RJX32O.js → chunk-4HEMGHOQ.js} +1 -1
- package/dist/chunk-4LUZF4CB.js +2 -0
- package/dist/chunk-53KFBGJB.js +16 -0
- package/dist/chunk-5C2MNUBC.js +1 -0
- package/dist/chunk-7NNOHYKX.js +15 -0
- package/dist/chunk-AGNRQAPA.js +1 -0
- package/dist/chunk-APQPKBER.js +1 -0
- package/dist/chunk-CB23VFSC.js +1 -0
- package/dist/chunk-CMH73CYQ.js +27 -0
- package/dist/chunk-COQ4GO5N.js +1 -0
- package/dist/{chunk-GMISU6MD.js → chunk-CS6Z4TQU.js} +1 -1
- package/dist/chunk-EOBIVNFF.js +1 -0
- package/dist/chunk-FXO52BV7.js +1 -0
- package/dist/chunk-IQ7O55C5.js +42 -0
- package/dist/chunk-KLZXBPXI.js +1 -0
- package/dist/chunk-LCE6Z46D.js +3 -0
- package/dist/chunk-M4S26KQG.js +1 -0
- package/dist/chunk-MQZE5LZU.js +1 -0
- package/dist/chunk-MXZ6RXT3.js +1 -0
- package/dist/chunk-OV74NBJ5.js +45 -0
- package/dist/{chunk-FIAIYSJ7.js → chunk-PSXS4WMN.js} +1 -1
- package/dist/chunk-Q2L6VKFI.js +9 -0
- package/dist/chunk-RVXI723F.js +1 -0
- package/dist/{chunk-LW2W4B2N.js → chunk-VXTF2OL2.js} +3 -3
- package/dist/{chunk-JWQ2DUXA.js → chunk-WCHGSVUC.js} +1 -1
- package/dist/chunk-WGX437MN.js +9 -0
- package/dist/chunk-XK24AOVW.js +54 -0
- package/dist/chunk-XM3RPIUS.js +9 -0
- package/dist/chunk-XPAHGJGK.js +1 -0
- package/dist/{chunk-3HQUN5MA.js → chunk-YRJUN267.js} +1 -1
- package/dist/config.d.ts +52 -1
- package/dist/config.js +1 -0
- package/dist/hooks/use-duplicate-element.d.ts +4 -0
- package/dist/hooks/use-lock.d.ts +4 -0
- package/dist/hooks/use-remove-element.d.ts +4 -0
- package/dist/lib/utils.js +1 -1
- package/dist/model/store.d.ts +64 -38
- package/dist/model/store.js +1 -1
- package/dist/project.d.ts +10 -1
- package/dist/project.js +1 -1
- package/dist/side-panel/background-panel.d.ts +10 -3
- package/dist/side-panel/background-panel.js +1 -1
- package/dist/side-panel/images-grid.d.ts +25 -0
- package/dist/side-panel/images-grid.js +1 -0
- package/dist/side-panel/index.d.ts +4 -0
- package/dist/side-panel/index.js +1 -1
- package/dist/side-panel/layers-panel.d.ts +8 -2
- package/dist/side-panel/layers-panel.js +1 -1
- package/dist/side-panel/photos-panel.d.ts +4 -0
- package/dist/side-panel/shapes-panel.d.ts +4 -0
- package/dist/side-panel/shapes-panel.js +1 -1
- package/dist/side-panel/side-panel.d.ts +4 -0
- package/dist/side-panel/side-panel.js +1 -1
- package/dist/side-panel/size-panel.d.ts +8 -2
- package/dist/side-panel/size-panel.js +1 -1
- package/dist/side-panel/tab-button.js +1 -1
- package/dist/side-panel/templates-panel.d.ts +8 -2
- package/dist/side-panel/templates-panel.js +1 -1
- package/dist/side-panel/text-panel.d.ts +8 -2
- package/dist/side-panel/text-panel.js +1 -1
- package/dist/side-panel/upload-panel.d.ts +4 -0
- package/dist/toolbar/default-toolbar.d.ts +10 -1
- package/dist/toolbar/default-toolbar.js +1 -1
- package/dist/toolbar/download-button.d.ts +4 -0
- package/dist/toolbar/duplicate-button.d.ts +4 -0
- package/dist/toolbar/element-container.js +1 -1
- package/dist/toolbar/figure-toolbar.d.ts +33 -0
- package/dist/toolbar/figure-toolbar.js +1 -0
- package/dist/toolbar/filters-picker.d.ts +4 -0
- package/dist/toolbar/filters-picker.js +1 -1
- package/dist/toolbar/flip-button.d.ts +4 -0
- package/dist/toolbar/flip-button.js +1 -1
- package/dist/toolbar/group-button.d.ts +4 -0
- package/dist/toolbar/group-button.js +1 -1
- package/dist/toolbar/history-buttons.d.ts +4 -0
- package/dist/toolbar/history-buttons.js +1 -1
- package/dist/toolbar/image-eraser-pen.d.ts +4 -1
- package/dist/toolbar/image-eraser-pen.js +1 -1
- package/dist/toolbar/image-remove-background.d.ts +4 -1
- package/dist/toolbar/image-remove-background.js +1 -1
- package/dist/toolbar/image-toolbar.d.ts +12 -2
- package/dist/toolbar/image-toolbar.js +1 -1
- package/dist/toolbar/lock-button.d.ts +4 -0
- package/dist/toolbar/opacity-picker.d.ts +4 -0
- package/dist/toolbar/opacity-picker.js +1 -1
- package/dist/toolbar/position-picker.d.ts +4 -0
- package/dist/toolbar/remove-button.d.ts +4 -0
- package/dist/toolbar/text-ai-write.js +1 -1
- package/dist/toolbar/text-toolbar.d.ts +4 -0
- package/dist/toolbar/text-toolbar.js +1 -1
- package/dist/toolbar/toolbar.d.ts +6 -2
- package/dist/toolbar/toolbar.js +1 -1
- package/dist/toolbar/zoom-buttons.d.ts +4 -0
- package/dist/toolbar/zoom-buttons.js +2 -2
- package/dist/topbar/file-menu.d.ts +14 -0
- package/dist/topbar/file-menu.js +1 -0
- package/dist/topbar/topbar.d.ts +16 -0
- package/dist/topbar/topbar.js +28 -0
- package/dist/utils/figure-to-svg.d.ts +36 -0
- package/dist/utils/figure-to-svg.js +1 -0
- package/dist/utils/image.d.ts +9 -3
- package/dist/utils/image.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/screen.js +1 -1
- package/dist/utils/svg.d.ts +3 -0
- package/dist/utils/svg.js +1 -0
- package/dist/utils/text.d.ts +3 -0
- package/dist/utils/text.js +1 -0
- package/dist/utils/unit.d.ts +18 -0
- package/dist/utils/unit.js +1 -0
- package/package.json +12 -10
- package/dist/chunk-2AWYWIIK.js +0 -1
- package/dist/chunk-55FJG4FK.js +0 -1
- package/dist/chunk-5MWZMSER.js +0 -1
- package/dist/chunk-6LFGFFHI.js +0 -1
- package/dist/chunk-7LU5UGIG.js +0 -16
- package/dist/chunk-E7ZSWHPU.js +0 -1
- package/dist/chunk-EMAFC3HG.js +0 -1
- package/dist/chunk-JW76IC3E.js +0 -1
- package/dist/chunk-M33EDDXB.js +0 -1
- package/dist/chunk-QJBRJELT.js +0 -1
- package/dist/chunk-TE6HYOIP.js +0 -7
- package/dist/chunk-TX4BNXQC.js +0 -1
- package/dist/chunk-U7HIFGXC.js +0 -1
- package/dist/chunk-V6ZZKUTN.js +0 -1
- package/dist/chunk-WIM26GEM.js +0 -1
- package/dist/chunk-XDLFQXMN.js +0 -54
- package/dist/chunk-XZAP76LL.js +0 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import{a as o}from"./chunk-IQ7O55C5.js";import{Input as a}from"antd";import{observer as i}from"mobx-react-lite";import{jsx as l,jsxs as n}from"react/jsx-runtime";var r=[{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/dba81d9a-9fd0-480b-8738-da150b9f051b.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/4a5725d6176da33dfd1881abcba6ad3b.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:2208,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:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:2208,workareaLeft:-140.5,workareaTop:-713.5,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:2208,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"cc3e2664-b61a-428b-84bd-ae22755701dd",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/fd2fcd137a4e849dd24867c48b3a4cb7.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u80CC\u666F"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:1097.6100000000001,top:1507,width:55.88,height:354.6,fill:{type:"linear",coords:{x1:26.5,y1:342,x2:26.5,y2:0},colorStops:[{offset:0,color:`rgb(255,214,
|
|
2
|
+
116)`,opacity:1},{offset:.49,color:`rgb(255,243,
|
|
3
|
+
225)`,opacity:1},{offset:1,color:`rgb(255,214,
|
|
4
|
+
116)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u65B0\u5C81\u542F\u7965\u745E",fontSize:55.8824459752298,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1.1538462250615245,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!0,id:"47e96074-84e0-4d5e-9e30-e5ba4113adb7",name:"\u65B0\u5C81\u542F\u7965\u745E",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u65B0\u5C81\u542F\u7965\u745E"]},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:995.61,top:1507,width:72,height:354.6,fill:{type:"linear",coords:{x1:27,y1:342,x2:27,y2:0},colorStops:[{offset:0,color:`rgb(255,214,
|
|
5
|
+
116)`,opacity:1},{offset:.49,color:`rgb(255,243,
|
|
6
|
+
225)`,opacity:1},{offset:1,color:`rgb(255,214,
|
|
7
|
+
116)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u6625\u98CE\u5165\u753B\u5802",fontSize:55.8824459752298,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1.1538462250615245,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!0,id:"d32d07c8-5f98-443a-a005-0f4c91281109",name:"\u6625\u98CE\u5165\u753B\u5802",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u6625\u98CE\u5165\u753B\u5802"]},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:915.29,top:1090.5,width:287,height:123.87,fill:{type:"linear",coords:{x1:49.5,y1:287,x2:49.5,y2:0},colorStops:[{offset:0,color:`rgb(255,203,
|
|
8
|
+
131)`,opacity:1},{offset:.49,color:`rgb(255,243,
|
|
9
|
+
225)`,opacity:1},{offset:1,color:`rgb(247,183,
|
|
10
|
+
119)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:90,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"HAPPY\rNEW YEAR",fontSize:54.80779005918938,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"d3d5ca0a-41ad-476e-a2fb-5b3ecd2c08d4",name:"HAPPY NEW YEAR",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["HAPPY NEW YEAR"]},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:918,top:667,width:304,height:839,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"dc15f2c5-3234-46a9-b282-52eeb9014bcb",name:"\u56FE\u5C42 2",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/106d96891e7043150782734dc7fb975b.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 2"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:857.25,top:921.44,width:75,height:124,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1.07,scaleY:1.07,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:"e31de110-8d90-4514-8dc0-4e31d211e9a8",name:"\u56FE\u5C42 1",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/aacbe7a0a73c08faa0c8f643b449d742.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 1"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:871.13,top:947.04,width:44,height:81.36,fill:`rgba(245,
|
|
11
|
+
39,
|
|
12
|
+
15,
|
|
13
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1.07,scaleY:1.07,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u7EB3\u798F",fontSize:36,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!0,id:"d66fcd42-b680-4cb5-a9ee-1dd79955d93e",name:"\u7EB3\u798F",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u7EB3\u798F"],styles:""}],width:1242,height:2208},width:1242,height:2208,name:"\u6625\u8282\u8282\u65E5\u795D\u798F\u901A\u7528\u6D77\u62A5"},{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/938bcbef-83e8-4768-aadb-04eb38acf396.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/e283dd69c51c1e7ade0817995ab24382.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:2208,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:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:2208,workareaLeft:-137,workareaTop:-679.5,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:2208,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"b7c7d6bb-81f2-4eeb-a31d-b3f28fd4d666",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/4bc5e40523b34ed7e597c887ab87343f.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u80CC\u666F"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:56,top:106,width:844,height:346.57,fill:`rgba(149,
|
|
14
|
+
0,
|
|
15
|
+
4,
|
|
16
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"HAPPY\rNEW YEAR",fontSize:144,fontWeight:"normal",fontFamily:"SourceHanSerifCN-Medium",fontStyle:"normal",lineHeight:1.129842863772722,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"a984f412-967c-499e-a5d8-d767efec1d91",name:"HAPPY NEW YEAR",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["HAPPY NEW YEAR"],styles:""},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:203.88,top:824,width:69.1,height:312.33,fill:{type:"linear",coords:{x1:33.5,y1:309,x2:33.5,y2:0},colorStops:[{offset:0,color:`rgb(255,203,
|
|
17
|
+
131)`,opacity:1},{offset:.49,color:`rgb(255,243,
|
|
18
|
+
225)`,opacity:1},{offset:1,color:`rgb(247,183,
|
|
19
|
+
119)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:{blur:0,color:"rgba(148,4,4,0.4)",offsetX:8.356238925925012,offsetY:9.958577760546714,id:5},visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u8FCE\u6625\u7EB3\u798F",fontSize:69.10005533868951,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:40,path:null,minWidth:20,splitByGrapheme:!0,id:"3fca7794-6c56-4da3-b719-f27e7c5eeca6",name:"\u8FCE\u6625\u7EB3\u798F",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u8FCE\u6625\u7EB3\u798F"]},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:107,top:824,width:86,height:312.33,fill:{type:"linear",coords:{x1:31.5,y1:311,x2:31.5,y2:0},colorStops:[{offset:0,color:`rgb(255,203,
|
|
20
|
+
131)`,opacity:1},{offset:.49,color:`rgb(255,243,
|
|
21
|
+
225)`,opacity:1},{offset:1,color:`rgb(247,183,
|
|
22
|
+
119)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:{blur:0,color:"rgba(148,4,4,0.4)",offsetX:8.356238925925012,offsetY:9.958577760546714,id:7},visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u8D3A\u5C81\u5B89\u5EB7",fontSize:69.10005533868951,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:40,path:null,minWidth:20,splitByGrapheme:!0,id:"da4b7baa-6b14-4b26-82f5-0eef069719a6",name:"\u8D3A\u5C81\u5B89\u5EB7",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u8D3A\u5C81\u5B89\u5EB7"]},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:331,top:478,width:52,height:86,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"422f6261-9b75-4c7c-af81-a5585dee69c5",name:"\u56FE\u5C42 1",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/b597fc4b134c82c540ba8a44bfc1bb5e.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 1"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:342,top:485,width:38,height:70.06,fill:`rgba(188,
|
|
23
|
+
5,
|
|
24
|
+
20,
|
|
25
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u4F20\u7EDF",fontSize:31,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:660,path:null,minWidth:20,splitByGrapheme:!0,id:"c35074bd-b77c-4be1-aae6-78a0f9a30eab",name:"\u4F20\u7EDF",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u4F20\u7EDF"],styles:""},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:55,top:457,width:355,height:326,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"328c23d0-fd02-4d70-a604-63125f42ba93",name:"\u56FE\u5C42 4 \u62F7\u8D1D",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/0c8aa7c3a5cde7132f43a6820cad44ee.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 4 \u62F7\u8D1D"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:63,top:146,width:308,height:362,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"2fb75c70-7a9b-4a46-a1a7-660bd397e86e",name:"\u56FE\u5C42 4",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/96f6aa98d97d71b1ffc4e1ba5da6709d.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 4"],crossOrigin:"anonymous"}],width:1242,height:2208},width:1242,height:2208,name:"\u6625\u8282\u8282\u65E5\u795D\u798F\u901A\u7528\u5168\u5C4F\u7AD6\u7248\u6D77\u62A5"},{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/3fb89f34-721e-4ebb-9d7f-eeef63983a7f.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/055f5df108627fc3c7b4d54b76dc4eba.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,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:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:1656,workareaLeft:-166.5,workareaTop:-436,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"f903c578-40ad-4477-8aa5-ddc3dca648f4",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/cd05a3e85500025196d6fa868bb9b11e.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u80CC\u666F"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:1102,top:91,width:40,height:41,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"07470a27-873e-428b-8f6e-31893b6828d0",name:"\u798F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/a43e91d8f722dd53970a647bb6354248.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u798F"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:832,top:144,width:324.95,height:56.5,fill:`rgba(255,
|
|
26
|
+
206,
|
|
27
|
+
110,
|
|
28
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"YEAR OF THE",fontSize:50,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"ec938ae6-1c55-4f45-ad9b-70d1357fab79",name:"YEAR OF THE",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["YEAR OF THE"],styles:""},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:988,top:312,width:175.74,height:49.72,fill:`rgba(255,
|
|
29
|
+
206,
|
|
30
|
+
110,
|
|
31
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u4E19\u5348\u9A6C\u5E74",fontSize:44,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"12f89c95-fd48-43f0-a3f2-6ec2a98f3acb",name:"\u4E19\u5348\u9A6C\u5E74",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u4E19\u5348\u9A6C\u5E74"],styles:""},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:1092,top:382,width:66,height:298.32,fill:`rgba(255,
|
|
32
|
+
206,
|
|
33
|
+
110,
|
|
34
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u65B0\u6625\u5FEB\u4E50",fontSize:66,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!0,id:"957a6535-134b-4b6b-95a5-201577fcc96f",name:"\u65B0\u6625\u5FEB\u4E50",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u65B0\u6625\u5FEB\u4E50"],styles:""},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:878,top:203,width:289.08,height:100.57,fill:`rgba(255,
|
|
35
|
+
206,
|
|
36
|
+
110,
|
|
37
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"HORSE",fontSize:89,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"8099c5d2-192a-4425-a74b-66214e88e0cf",name:"HORSE",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["HORSE"],styles:""}],width:1242,height:1656},width:1242,height:1656,name:"\u7B80\u7EA6\u6625\u8282\u795D\u798F"},{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/7b551060-926d-4daf-b306-4695d4954e1e.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/68700b718337c33ef18d92a9077e7e8e.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,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:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:1656,workareaLeft:-166.5,workareaTop:-436,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"a57f55ca-fa2d-47a6-a092-f0a6672f8284",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/da50ca2f4a0328d4dc542f438e3348ed.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u80CC\u666F"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:1086,width:1242,height:570,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:.83,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"541babd3-8de4-417a-984e-03007892f844",name:"\u56FE\u5C42 5 \u62F7\u8D1D",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/682f5de7812ee79eca8a0621fe1c60d7.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 5 \u62F7\u8D1D"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:109.5,top:1268,width:1023,height:264,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"30c59470-8fb9-48ac-b884-6df5c86908c3",name:"\u56FE\u5C42 8",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/20f72be9f16633ab281f189ee89cf382.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 8"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:939,top:1086,width:183,height:156,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"ed4a416e-82c7-4e1b-bd8f-e582f8b6e6a0",name:"\u56FE\u5C42 15",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/b9f474d2cd572b28715a6557728c1673.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 15"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:282,width:164,height:156,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"cd3e0a42-ad4f-40f0-8359-23856ca293e4",name:"\u56FE\u5C42 15 \u62F7\u8D1D",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/787d47d1feeea30f872960c711907412.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 15 \u62F7\u8D1D"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:422,top:61,width:183,height:156,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"66cea452-81ac-4d76-9b34-10393082364a",name:"\u56FE\u5C42 15 \u62F7\u8D1D 2",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/987e92d69fd77c6e67f18c1503911e97.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 15 \u62F7\u8D1D 2"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:1090,top:632,width:152,height:130,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"78500120-b11f-4473-ab18-4f4b58b0bbc0",name:"\u56FE\u5C42 15 \u62F7\u8D1D 3",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/eaf133de72a39ab439753120a51ec06b.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 15 \u62F7\u8D1D 3"],crossOrigin:"anonymous"}],width:1242,height:1656},width:1242,height:1656,name:"\u7B80\u7EA6\u5149\u70B9\u6625\u8282\u795D\u798F"},{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/e33d5e91-bfab-44bc-807a-7d5498446aba.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/012c42fae1829b6314617544e2511c55.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,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:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:1656,workareaLeft:-166.5,workareaTop:-436,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"2cb7cb9d-80ae-40e7-ac6e-c03988cfd79d",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/58d1ee5fdaaaf9682b04cac623c2e7b0.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u80CC\u666F"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:199.05,top:99,width:842.91,height:101.7,fill:{type:"linear",coords:{x1:474,y1:76,x2:474,y2:0},colorStops:[{offset:0,color:`rgb(207,131,
|
|
38
|
+
26)`,opacity:1},{offset:1,color:`rgb(231,169,
|
|
39
|
+
85)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:{blur:16,color:"rgba(255,255,255,1)",offsetX:0,offsetY:0,id:5},visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"HAPPY NEW YEAR",fontSize:90,fontWeight:"normal",fontFamily:"SourceHanSerifCN-Medium",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"3dde4958-1c05-4320-8c74-fad1c8dc472b",name:"HAPPY NEW YEAR",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["HAPPY NEW YEAR"]},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:488.5,top:215,width:264,height:74.58,fill:{type:"linear",coords:{x1:129,y1:64,x2:129,y2:0},colorStops:[{offset:0,color:`rgb(207,131,
|
|
40
|
+
26)`,opacity:1},{offset:1,color:`rgb(231,169,
|
|
41
|
+
85)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u9A6C\u5E74\u5927\u5409",fontSize:66,fontWeight:"normal",fontFamily:"SourceHanSerifCN-Medium",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"5775d12f-91e1-45ba-8094-6be7918c0d27",name:"\u9A6C\u5E74\u5927\u5409",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u9A6C\u5E74\u5927\u5409"]}],width:1242,height:1656},width:1242,height:1656,name:"\u7B80\u7EA6\u6625\u8282\u795D\u798F"},{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/5d878b65-461f-4182-8dad-cb06a141adf4.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/d2492995c3c66322ce8be8223c938bbc.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,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:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:1656,workareaLeft:-166.5,workareaTop:-436,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,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:"ce855783-d10f-486c-b02b-5b2c194912a3",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/d80864ba9d4adcd5ed0b7765a388cb13.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:353.73,top:129,width:533.55,height:146.4,fill:{type:"linear",coords:{x1:301,y1:102,x2:301,y2:0},colorStops:[{offset:0,color:`rgb(255,243,
|
|
42
|
+
225)`,opacity:1},{offset:.99,color:`rgb(255,205,
|
|
43
|
+
100)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"CHINESE",fontSize:129.5599333919183,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"f4501742-c6e7-4765-ac2d-20cf76a02f73",name:"CHINESE",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:452.61,top:272,width:335.79,height:73.72,fill:{type:"linear",coords:{x1:184,y1:50,x2:184,y2:0},colorStops:[{offset:0,color:`rgb(255,243,
|
|
44
|
+
225)`,opacity:1},{offset:.99,color:`rgb(255,205,
|
|
45
|
+
100)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"NEW YEAR",fontSize:65.23939908387375,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"634cbf93-5e84-425a-ac4e-774527f90bc8",name:"NEW YEAR",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0}],width:1242,height:1656},width:1242,height:1656,name:"\u6625\u8282\u7B80\u7EA6\u98CE\u795D\u798F"}],{Search:s}=a,p=i(({store:t})=>n("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[l("div",{style:{padding:"0 4px",marginBottom:10},children:l(s,{placeholder:"Search templates..."})}),l(o,{shadowEnabled:!1,images:r,getPreview:e=>e.thumb,isLoading:!1,error:!1,onSelect:e=>{console.log("args ---> ",e),t.loadJSON(e.content)}})]}));export{p as a};
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as T,b as w,c as m}from"./chunk-5C2MNUBC.js";import{useState as h,useEffect as z,useRef as N}from"react";import{observer as U}from"mobx-react-lite";import{Button as b,Switch as A,Tooltip as L,InputNumber as M,Select as R}from"antd";import{Info as W,Instagram as y,Linkedin as v,Twitter as g,Video as u,Printer as a}from"lucide-react";import{jsx as i,jsxs as n}from"react/jsx-runtime";var E=[{name:"Instagram",icon:i(y,{size:16}),sizes:[["Post",1080,1080,"px",i(y,{})],["Story",1080,1920,"px",i(y,{})],["Ad",1080,1080,"px",i(y,{})]]},{name:"LinkedIn",icon:i(v,{size:16}),sizes:[["Post",1200,627,"px",i(v,{})],["Banner",1584,396,"px",i(v,{})],["Square",1080,1080,"px",i(v,{})]]},{name:"Twitter",icon:i(g,{size:16}),sizes:[["Post",1600,900,"px",i(g,{})],["Header",1500,500,"px",i(g,{})],["Square",1080,1080,"px",i(g,{})]]},{name:"Video",icon:i(u,{size:16}),sizes:[["Full HD",1920,1080,"px",i(u,{})],["4K UHD",3840,2160,"px",i(u,{})],["Vertical HD",1080,1920,"px",i(u,{})],["Square HD",1080,1080,"px",i(u,{})]]},{name:"Print",icon:i(a,{size:16}),sizes:[["Invitation",14,14,"cm",i(a,{})],["A4 Portrait",21,29.7,"cm",i(a,{})],["A4 Landscape",29.7,21,"cm",i(a,{})],["A3",29.7,42,"cm",i(a,{})],["Letter Portrait",8.5,11,"in",i(a,{})],["Letter Landscape",11,8.5,"in",i(a,{})],["Business card",3.5,2,"in",i(a,{})],["Poster",18,24,"in",i(a,{})]]}],P=t=>{let{value:d,onChange:x}=t;console.log(t,";213");let[o,p]=h(d),s=N(d);s.current=o;let c=()=>{x(Math.max(t.min||0,parseFloat(s.current)))};return z(()=>{p(d)},[d]),i(M,{...t,value:o,onChange:l=>{Number.isNaN(l)||p(l)},onBlur:c,onKeyDown:l=>{l.key==="Enter"&&c()}})},G=U(({store:t})=>{let[d,x]=h(!0),[o,p]=h(t.width),[s,c]=h(t.height),l=T({px:10,unit:t.unit,dpi:t.dpi}),S=t.width,k=t.height;return z(()=>{p(w({px:S,unit:t.unit,dpi:t.dpi}))},[S,t.unit,t.dpi]),z(()=>{c(w({px:k,unit:t.unit,dpi:t.dpi}))},[k,t.unit,t.dpi]),n("div",{className:"no-scrollbar",style:{height:"100%",overflow:"auto",paddingRight:"3px"},children:[i("style",{children:`
|
|
2
|
+
.no-scrollbar::-webkit-scrollbar {
|
|
3
|
+
display: none;
|
|
4
|
+
}
|
|
5
|
+
.no-scrollbar {
|
|
6
|
+
-ms-overflow-style: none;
|
|
7
|
+
scrollbar-width: none;
|
|
8
|
+
}
|
|
9
|
+
`}),n("div",{style:{paddingBottom:"15px"},children:[n("div",{style:{display:"flex",alignItems:"center",marginTop:8,marginBottom:25,justifyContent:"space-between"},children:[n("div",{style:{display:"flex",alignItems:"center"},children:[i("span",{children:"Use magic resize"}),i(L,{title:"Magic resize will automatically resize and move all elements on the canvas",placement:"bottom",children:i(b,{type:"text",styles:{root:{padding:"0 7px"}},children:i(W,{size:16})})})]}),i(A,{checked:d,onChange:x})]}),n("div",{style:{width:"50%",display:"inline-block"},children:["Width",` (${t.unit})`]}),i("div",{style:{width:"50%",display:"inline-block"},children:i(P,{min:l,max:1e4,value:o,style:{width:"100%"},styles:{actions:{opacity:1,width:24}},onChange:e=>{e||(e=o),p(e)}})})]}),n("div",{style:{paddingBottom:"15px"},children:[n("div",{style:{width:"50%",display:"inline-block"},children:["Height",` (${t.unit})`]}),i("div",{style:{width:"50%",display:"inline-block"},children:i(P,{min:l,max:1e4,value:s,style:{width:"100%"},styles:{actions:{opacity:1,width:24}},onChange:e=>{e||(e=s),c(e)}})})]}),n("div",{style:{paddingBottom:"15px"},children:[i("div",{style:{width:"50%",display:"inline-block"},children:"Units"}),i("div",{style:{width:"50%",display:"inline-block"},children:i(R,{value:t.unit,style:{width:"100%"},onChange:e=>{t.setUnit({unit:e,dpi:t.dpi})},options:[{label:"px",value:"px"},{label:"cm",value:"cm"},{label:"in",value:"in"}]})})]}),i("div",{style:{paddingBottom:"15px"},children:i(b,{type:"primary",onClick:()=>{let e=m({unitVal:o,dpi:t.dpi,unit:t.unit}),f=m({unitVal:s,dpi:t.dpi,unit:t.unit});t.setSize({width:e,height:f,useMagic:d})},block:!0,children:"Resize"})}),E.map(e=>n("div",{children:[n("div",{style:{paddingBottom:"15px",paddingTop:"15px",fontWeight:600,display:"flex",alignItems:"center",gap:6},children:[e.icon,e.name]}),i("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"8px",marginBottom:"10px"},children:e.sizes.map(f=>{let[B,C,I,r,H]=f;return n(b,{type:"text",style:{height:"80px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"13px",maxWidth:103},styles:{root:{padding:"0 10px",gap:0}},onClick:()=>{let V=m({unitVal:C,dpi:t.dpi,unit:r}),D=m({unitVal:I,dpi:t.dpi,unit:r});t.setUnit({unit:r,dpi:t.dpi}),t.setSize({width:V,height:D,useMagic:d})},children:[i("div",{style:{fontSize:"22px",marginBottom:"4px"},children:H}),i("div",{style:{fontSize:"12px"},children:B}),n("div",{style:{fontSize:"0.7rem",opacity:.7},children:[C,"x",I," ",r]})]},B)})})]},e.name))]})});export{G as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i=t=>{if(t){if(typeof t=="string")return t;if(typeof t=="object"&&"colorStops"in t&&Array.isArray(t.colorStops))return t.colorStops.map(o=>({color:o.color,percent:o.offset*100}))}},s=()=>{let t="0123456789ABCDEF",o="#";for(let r=0;r<6;r++)o+=t[Math.floor(Math.random()*16)];return o},n=t=>{let o=[];if(!t)return[];for(let r of t){if(r.type==="group"){let e=n(r.objects);o.push(...e)}r.type==="textbox"&&(o.some(e=>e===r.fontFamily)||o.push(r.fontFamily))}return o},c=new Set(["ellipse","triangle","rect","line","circle","polygon","polyline","path"]);function p(t){return!!t&&c.has(t.type)}export{i as a,s as b,n as c,p as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import r from"styled-components";import{jsx as e,jsxs as
|
|
1
|
+
import r from"styled-components";import{jsx as e,jsxs as p}from"react/jsx-runtime";var d=r.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 72px;
|
|
4
4
|
padding-top: 15px;
|
|
@@ -17,6 +17,6 @@ import r from"styled-components";import{jsx as e,jsxs as c}from"react/jsx-runtim
|
|
|
17
17
|
// 这个看到时候可不可以用 变量来实现,需要让用户能配置
|
|
18
18
|
&:hover,
|
|
19
19
|
&.active {
|
|
20
|
-
background-color:
|
|
20
|
+
background-color: rgba(22, 119, 255, 0.3);
|
|
21
21
|
}
|
|
22
|
-
`,l=({children:i,name:n,iconSize:
|
|
22
|
+
`,l=({children:i,name:n,iconSize:a,onClick:t,active:o})=>p(d,{className:`design-side-panel-tab ${o?"active":""}`,onClick:t,children:[e("div",{style:{fontSize:a||14},children:i}),e("div",{style:{paddingTop:3,userSelect:"none"},children:n})]});export{l as a};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as t}from"./chunk-APQPKBER.js";import{a as w}from"./chunk-IQ7O55C5.js";import{observable as f}from"mobx";import{observer as a}from"mobx-react-lite";import M from"styled-components";import{jsx as o,jsxs as s}from"react/jsx-runtime";var l=["https://images.unsplash.com/photo-1579546929518-9e396f3cc809?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxfHxncmFkaWVudHxlbnwwfHx8fDE3NjAwMzAwMjJ8MA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1635776062360-af423602aff3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwyfHxncmFkaWVudHxlbnwwfHx8fDE3NjAwMzAwMjJ8MA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1604079628040-94301bb21b91?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwzfHxncmFkaWVudHxlbnwwfHx8fDE3NjAwMzAwMjJ8MA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1604076913837-52ab5629fba9?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHw0fHxncmFkaWVudHxlbnwwfHx8fDE3NjAwMzAwMjJ8MA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1579547621706-1a9c79d5c9f1?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHw1fHxncmFkaWVudHxlbnwwfHx8fDE3NjAwMzAwMjJ8MA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1635776062127-d379bfcba9f8?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHw2fHxncmFkaWVudHxlbnwwfHx8fDE3NjAwMzAwMjJ8MA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1508614999368-9260051292e5?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHw3fHxncmFkaWVudHxlbnwwfHx8fDE3NjAwMzAwMjJ8MA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHw4fHxncmFkaWVudHxlbnwwfHx8fDE3NjAwMzAwMjJ8MA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1579546928937-641f7ac9bced?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHw5fHxncmFkaWVudHxlbnwwfHx8fDE3NjAwMzAwMjJ8MA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1604076850742-4c7221f3101b?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxMHx8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1618397746666-63405ce5d015?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxMXx8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1557683316-973673baf926?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxMnx8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1554034483-04fda0d3507b?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxM3x8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1579548122080-c35fd6820ecb?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxNHx8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1523821741446-edb2b68bb7a0?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxNXx8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1644426358812-879f02d1d867?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxNnx8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1550859492-d5da9d8e45f3?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxN3x8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1579546929662-711aa81148cf?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxOHx8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1589810264340-0ce27bfbf751?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwxOXx8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400","https://images.unsplash.com/photo-1569982175971-d92b01cf8694?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTY5OTZ8MHwxfHNlYXJjaHwyMHx8Z3JhZGllbnR8ZW58MHx8fHwxNzYwMDMwMDIyfDA&ixlib=rb-4.1.0&q=80&w=400"],r=f(["white","rgb(82, 113, 255)","rgb(255, 145, 77)","rgb(126, 217, 87)","rgb(255, 222, 89)","rgb(203, 108, 230)","rgba(0, 0, 0, 0)"]),n=M.div`
|
|
2
|
+
display: inline-block;
|
|
3
|
+
width: 30px;
|
|
4
|
+
height: 30px;
|
|
5
|
+
border-radius: 3px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
box-shadow: 0 0 2px rgba(16, 22, 26, 0.3);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
`,e=x=>{let{color:i,children:p}=x;return o(n,{...x,style:{background:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 8 8'%3E%3Cg fill='rgba(112, 112, 116, 1)' fill-opacity='1'%3E%3Cpath fill-rule='evenodd' d='M0 0h4v4H0V0zm4 4h4v4H4V4z'/%3E%3C/g%3E%3C/svg%3E")`},children:o("div",{style:{width:"100%",height:"100%",background:i},children:p})})},h=x=>{r.replace(x)},d=a(({store:x})=>s("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[s("div",{style:{display:"flex",justifyContent:"space-around",paddingBottom:10,alignItems:"center"},children:[o(t,{store:x}),r.map(i=>o(e,{color:i,onClick:()=>{}},i))]}),o(w,{images:l,isLoading:!1,getPreview:i=>i,loadMore:!1,onSelect:i=>{console.log(i)}})]}));export{h as a,d as b};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import{a as T}from"./chunk-XM3RPIUS.js";import{a as x}from"./chunk-Q2L6VKFI.js";import{a as o}from"./chunk-VXTF2OL2.js";import{a as P}from"./chunk-OV74NBJ5.js";import{a as u}from"./chunk-CMH73CYQ.js";import{a as h}from"./chunk-DBQHEZPG.js";import{b as S}from"./chunk-WGX437MN.js";import{c as l,d as m}from"./chunk-WCHGSVUC.js";import{a as y}from"./chunk-AGNRQAPA.js";import{a as f}from"./chunk-DJBTBRPS.js";import a from"styled-components";import{useRef as g,useLayoutEffect as C}from"react";import{observer as i}from"mobx-react-lite";import{LayoutTemplate as z,TypeOutline as L,Image as N,Shapes as M,Upload as B,Wallpaper as H,Layers as I,ImageUpscale as E}from"lucide-react";import{clsx as R}from"clsx";import{jsx as n,jsxs as p}from"react/jsx-runtime";var U=a.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100% !important;
|
|
4
|
+
padding: 0px !important;
|
|
5
|
+
position: relative;
|
|
6
|
+
|
|
7
|
+
&.bp5-navbar {
|
|
8
|
+
box-shadow: none;
|
|
9
|
+
}
|
|
10
|
+
`,$=a.div`
|
|
11
|
+
@media screen and (min-width: 501px) {
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
overflow-x: hidden;
|
|
14
|
+
min-width: 72px;
|
|
15
|
+
}
|
|
16
|
+
`,D=a.div`
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
`,F=a.div`
|
|
20
|
+
padding: 10px 10px 0px 10px !important;
|
|
21
|
+
height: 100% !important;
|
|
22
|
+
|
|
23
|
+
&.bp5-navbar {
|
|
24
|
+
width: 350px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.bp5-navbar.collapsed {
|
|
28
|
+
width: 0px;
|
|
29
|
+
}
|
|
30
|
+
`,O=a.div`
|
|
31
|
+
display: none;
|
|
32
|
+
${l(`
|
|
33
|
+
position: absolute;
|
|
34
|
+
bottom: 72px;
|
|
35
|
+
display: block;
|
|
36
|
+
width: 100vw;
|
|
37
|
+
height: 100vh;
|
|
38
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
39
|
+
`)}
|
|
40
|
+
`,W=a.div`
|
|
41
|
+
position: absolute;
|
|
42
|
+
right: 1px;
|
|
43
|
+
top: 50%;
|
|
44
|
+
height: 96px;
|
|
45
|
+
width: 15px;
|
|
46
|
+
fill: white;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
z-index: 10;
|
|
49
|
+
transform: translate(100%, -50%);
|
|
50
|
+
|
|
51
|
+
${l(`
|
|
52
|
+
display: none;
|
|
53
|
+
`)}
|
|
54
|
+
`,A=({onClick:e})=>n(W,{onClick:e,children:n("div",{children:p("button",{className:"grid relative justify-center arrow cursor-pointer",children:[p("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 96",width:"13",height:"96",fill:"none",children:[n("path",{d:"M0,0 h1 c0,20,12,12,12,32 v32 c0,20,-12,12,-12,32 H0 z",className:"fill-white dark:fill-[#0b0809]"}),n("path",{d:"M0.5,0 c0,20,12,12,12,32 v32 c0,20,-12,12,-12,32",className:"fill-white stroke-gray-200 dark:fill-[#0b0809] dark:stroke-[#0b0809]"})]}),n("div",{className:"absolute self-center",children:n("span",{className:"w-3 h-3 text-block inline-flex items-center box-border dark:text-white",children:n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",children:n("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.25",d:"M7 3.17 4.88 5.3a1 1 0 0 0 0 1.42L7 8.83"})})})})]})})}),_={name:"templates",Tab:i(e=>n(o,{name:"templates",...e,children:n(z,{style:{display:"inline-block"},size:20})})),Panel:({store:e})=>n(P,{store:e})},j={name:"text",Tab:i(e=>n(o,{name:"text",...e,children:n(L,{style:{display:"inline-block"},size:20})})),Panel:({store:e})=>n(u,{store:e})},q={name:"photos",Tab:i(e=>n(o,{name:"photos",...e,children:n(N,{style:{display:"inline-block"},size:20})})),Panel:({store:e})=>n(f,{store:e})},G={name:"shapes",Tab:i(e=>n(o,{name:"shapes",...e,children:n(M,{style:{display:"inline-block"},size:20})})),Panel:({store:e})=>n(T,{store:e})},J={name:"upload",Tab:i(e=>n(o,{name:"upload",...e,children:n(B,{style:{display:"inline-block"},size:20})})),Panel:({store:e})=>n(h,{store:e})},K={name:"background",Tab:i(e=>n(o,{name:"background",...e,children:n(H,{style:{display:"inline-block"},size:20})})),Panel:({store:e})=>n(S,{store:e})},Q={name:"layers",Tab:i(e=>n(o,{name:"layers",...e,children:n(I,{style:{display:"inline-block"},size:20})})),Panel:({store:e})=>n(y,{store:e})},V={name:"size",Tab:i(e=>n(o,{name:"size",...e,children:n(E,{style:{display:"inline-block"},size:20})})),Panel:({store:e})=>n(x,{store:e})},X=[_,j,q,G,J,K,Q,V],Y=i(({store:e,sections:v,defaultSection:c="templates"})=>{(()=>{let t=g(!0);t.current&&(t.current=!1,e.openSidePanel(c))})();let r=m();C(()=>{r?e.openSidePanel(""):e.openSidePanel(c)},[r]);let d=[...v||X].filter(t=>t.visibleInList!==!1),b=d.find(t=>t.name===e.openedSidePanel)?.Panel,k=g(null);return p(U,{className:`bp5-navbar design-side-panel ${e.openedSidePanel?"":"collapsed"}`,children:[n($,{className:"design-side-tabs-container border-r-1 border-gray-200 dark:border-gray-800",ref:k,children:n(D,{className:"design-side-tabs-inner",children:d.map(({name:t,Tab:s})=>n(s,{name:t,onClick:()=>{t===e.openedSidePanel?e.openSidePanel(""):e.openSidePanel(t)},active:e.openedSidePanel===t},t))})}),b&&n(F,{className:R("bp5-navbar design-panel-container","border-r-1 border-gray-200 dark:border-gray-800"),onClick:t=>{let s=t.target.closest(".design-close-panel"),w=t.target.closest(".design-mobile");s&&(r||w)&&e.openSidePanel("")},children:n(b,{store:e})}),e.openedSidePanel&&n(O,{onClick:()=>e.openSidePanel("")}),e.openedSidePanel&&n(A,{onClick:()=>e.openSidePanel("")})]})}),Pe=Y;export{_ as a,j as b,q as c,G as d,J as e,K as f,Q as g,V as h,X as i,Y as j,Pe as k};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a}from"./chunk-MXZ6RXT3.js";import{b as l}from"./chunk-MQZE5LZU.js";import{jsx as e,jsxs as s}from"react/jsx-runtime";var h=({store:r})=>{let i=t=>{r.editor?.objectsHandler.createPathElement(t.path)},n=t=>{r.editor?.objectsHandler.createShapeElement(t.type)};return s("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"auto"},className:"no-scrollbar",children:[e("style",{children:`
|
|
2
|
+
.no-scrollbar::-webkit-scrollbar {
|
|
3
|
+
display: none;
|
|
4
|
+
}
|
|
5
|
+
.no-scrollbar {
|
|
6
|
+
-ms-overflow-style: none;
|
|
7
|
+
scrollbar-width: none;
|
|
8
|
+
}
|
|
9
|
+
`}),l.map((t,c)=>s("div",{className:"category",children:[e("div",{className:a("category-name","text-base px-2 mt-2"),children:t.name},t.name),e("div",{className:a("shape-list","flex flex-wrap content-start mb-2"),children:t.children.map((o,m)=>e("div",{className:a("shape-item","w-[25%] h-0 pb-[25%] relative cursor-pointer shrink-0 mb-[1.2%]"),onClick:()=>{o.type?n(o):i(o)},children:e("div",{className:a("shape-content","absolute inset-0 flex justify-center items-center"),children:e("svg",{overflow:"visible",width:"50",height:"50",children:e("g",{transform:`scale(${50/o.viewBox[0]}, ${50/o.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:e("path",{className:"shape-path",d:o.path,fill:"#ccc",strokeMiterlimit:8,strokeLinecap:"butt"})})})})},m))})]},c))]})};export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as w}from"./chunk-4HEMGHOQ.js";import{a as C,b as m}from"./chunk-YRJUN267.js";import{a as u}from"./chunk-RVXI723F.js";import{cssGradient2FabricGradient as W}from"@ydesign/core";import{observer as y}from"mobx-react-lite";import{useState as F,useRef as k,useMemo as P}from"react";import{ColorPicker as S,Popover as B,Button as g,InputNumber as x,Slider as b}from"antd";import{Logs as j,Ban as A}from"lucide-react";import{Fragment as _,jsx as e,jsxs as h}from"react/jsx-runtime";var n=r=>r?typeof r=="string"?r:r.colorStops?JSON.stringify(r.colorStops):JSON.stringify(r):"",D=y(({store:r,elements:t})=>{let o=t[0],[c,d]=F(()=>u(o.fill)),a=k(!1),s=k(n(o.fill)),p=n(o.fill);p!==s.current&&!a.current&&(s.current=p,d(u(o.fill)));let f=P(()=>c,[n(c)]);return e(S,{value:f,allowClear:!0,mode:["single","gradient"],onOpenChange:i=>{a.current=i,i||(s.current=n(o.fill))},onChange:i=>{d(i)},onChangeComplete:i=>{let l=i.toCssString();if(l.includes("gradient")){let v=W(l);r.editor?.objectsHandler.update({fill:v})}else r.editor?.objectsHandler.update({fill:l})}})}),H=y(({store:r,element:t})=>(console.log("element ---> ",t),e(B,{trigger:"click",content:h("div",{style:{width:270},children:[h("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:15},children:[e(g,{color:t?.strokeWidth===0?"primary":"default",variant:"filled",onClick:()=>{r.editor?.objectsHandler.update({strokeWidth:0}),r._triggerUpdate()},children:e(A,{size:16})}),e(g,{color:t?.strokeWidth&&t?.strokeDashArray?.length===0?"primary":"default",variant:"filled",onClick:()=>{r.editor?.objectsHandler.update({strokeDashArray:[],strokeWidth:t?.strokeWidth||10,stroke:t?.stroke||"#000000"}),r._triggerUpdate()},children:e("svg",{width:16,height:16,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e("line",{x2:24,y1:"50%",y2:"50%",stroke:"currentColor",strokeWidth:"2"})})}),e(g,{color:t?.strokeWidth&&Array.isArray(t.strokeDashArray)&&t.strokeDashArray[0]===4?"primary":"default",variant:"filled",onClick:()=>{r.editor?.objectsHandler.update({strokeDashArray:[4,1],strokeWidth:t?.strokeWidth||10,stroke:t?.stroke||"#000000"}),r._triggerUpdate()},children:e("svg",{width:16,height:16,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e("line",{x1:"-1",x2:"25",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"12 2",strokeWidth:"2"})})}),e(g,{color:t?.strokeWidth&&Array.isArray(t.strokeDashArray)&&t.strokeDashArray[0]===2?"primary":"default",variant:"filled",onClick:()=>{r.editor?.objectsHandler.update({strokeDashArray:[2,1],strokeWidth:t?.strokeWidth||10,stroke:t?.stroke||"#000000"}),r._triggerUpdate()},children:e("svg",{width:16,height:16,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e("line",{x1:"1",x2:"23",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"6 2",strokeWidth:"2"})})}),e(g,{color:t?.strokeWidth&&Array.isArray(t.strokeDashArray)&&t.strokeDashArray[0]===1?"primary":"default",variant:"filled",onClick:()=>{r.editor?.objectsHandler.update({strokeDashArray:[1,1],strokeWidth:t?.strokeWidth||10,stroke:t?.stroke||"#000000"}),r._triggerUpdate()},children:e("svg",{width:16,height:16,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:e("line",{x1:"1",x2:"23",y1:"50%",y2:"50%",stroke:"currentColor",strokeDasharray:"2 2",strokeWidth:"2"})})})]}),h("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:5},children:[e("div",{children:"Stroke Width"}),e("div",{children:e(x,{value:t?.strokeWidth,style:{width:60},min:0,max:Math.round(Math.min(t?.width,t?.height)/2),onChange:o=>{r.editor?.objectsHandler.update({strokeWidth:o}),r._triggerUpdate()}})})]}),e(b,{value:t?.strokeWidth,onChange:o=>{r.editor?.objectsHandler.update({strokeWidth:o}),r._triggerUpdate()},min:0,max:Math.round(Math.min(t?.width,t?.height)/2)}),t?.type==="rect"&&h(_,{children:[h("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:15,paddingBottom:5},children:[e("div",{children:"Corner Radius"}),e("div",{children:e(x,{value:t?.rx,style:{width:60},min:0,max:Math.round(Math.min(t?.width,t?.height)/2),onChange:o=>{r.editor?.objectsHandler.update({rx:o,ry:o}),r._triggerUpdate()}})})]}),e(b,{value:t?.rx,onChange:o=>{r.editor?.objectsHandler.update({rx:o,ry:o}),r._triggerUpdate()},min:0,max:Math.round(Math.min(t?.width,t?.height)/2)})]})]}),children:e(g,{type:"text",styles:{root:{padding:"0 7px"}},icon:e(j,{size:16,style:{display:"flex"}}),children:"Stroke settings"})}))),R=y(({store:r,elements:t})=>{let o=t[0],[c,d]=F(()=>u(o?.stroke)),a=k(!1),s=k(n(o?.stroke)),p=n(o?.stroke);p!==s.current&&!a.current&&(s.current=p,d(u(o?.stroke)));let f=P(()=>c,[n(c)]);return o?.strokeWidth?e(S,{value:f,allowClear:!0,mode:["single","gradient"],onOpenChange:i=>{a.current=i,i||(s.current=n(o.stroke))},onChange:i=>{d(i)},onChangeComplete:i=>{let l=i.toCssString();if(l.includes("gradient")){let v=W(l);r.editor?.objectsHandler.update({stroke:v})}else r.editor?.objectsHandler.update({stroke:l})}}):null}),M={FigureFill:D,FigureStroke:R,FigureSettings:H,FigureFilters:w},L=y(({store:r,components:t})=>{let o=r.selectedElements[0],d=C({type:"figure",usedItems:["FigureFill","FigureStroke","FigureSettings","FigureFilters"],components:t});return e(m,{items:d,itemRender:a=>{let s=t[a]||M[a];return s&&e(s,{elements:r.selectedElements,element:o,store:r},a)}})});export{n as a,D as b,H as c,R as d,L as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as u}from"./chunk-
|
|
1
|
+
import{c as u}from"./chunk-WCHGSVUC.js";import{useState as m,useRef as d,useLayoutEffect as p}from"react";import b from"styled-components";import{OverflowList as v}from"react-overflow-list";import{Ellipsis as h}from"lucide-react";import{Popover as w,Button as y}from"antd";import{jsx as s}from"react/jsx-runtime";var g=b.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 50px;
|
|
4
4
|
align-items: center;
|
package/dist/config.d.ts
CHANGED
|
@@ -1,2 +1,53 @@
|
|
|
1
|
+
import { XY } from '@ydesign/core';
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
declare const enum ShapePathFormulasKeys {
|
|
4
|
+
ROUND_RECT = "roundRect",
|
|
5
|
+
ROUND_RECT_DIAGONAL = "roundRectDiagonal",
|
|
6
|
+
ROUND_RECT_SINGLE = "roundRectSingle",
|
|
7
|
+
ROUND_RECT_SAMESIDE = "roundRectSameSide",
|
|
8
|
+
CUT_RECT_DIAGONAL = "cutRectDiagonal",
|
|
9
|
+
CUT_RECT_SINGLE = "cutRectSingle",
|
|
10
|
+
CUT_RECT_SAMESIDE = "cutRectSameSide",
|
|
11
|
+
MESSAGE = "message",
|
|
12
|
+
ROUND_MESSAGE = "roundMessage",
|
|
13
|
+
L = "L",
|
|
14
|
+
RING_RECT = "ringRect",
|
|
15
|
+
PLUS = "plus",
|
|
16
|
+
TRIANGLE = "triangle",
|
|
17
|
+
PARALLELOGRAM_LEFT = "parallelogramLeft",
|
|
18
|
+
PARALLELOGRAM_RIGHT = "parallelogramRight",
|
|
19
|
+
TRAPEZOID = "trapezoid",
|
|
20
|
+
BULLET = "bullet",
|
|
21
|
+
INDICATOR = "indicator"
|
|
22
|
+
}
|
|
23
|
+
interface PathPoolItem {
|
|
24
|
+
viewBox: [number, number];
|
|
25
|
+
path: string;
|
|
26
|
+
special?: boolean;
|
|
27
|
+
pathFormula?: ShapePathFormulasKeys;
|
|
28
|
+
outlined?: boolean;
|
|
29
|
+
type?: string;
|
|
30
|
+
}
|
|
31
|
+
interface PathListItem {
|
|
32
|
+
name: string;
|
|
33
|
+
children: PathPoolItem[];
|
|
34
|
+
}
|
|
35
|
+
declare const PathShapeLibs: PathListItem[];
|
|
36
|
+
type LinePoint = '' | 'arrow' | 'dot';
|
|
37
|
+
interface LinePoolItem {
|
|
38
|
+
path: string;
|
|
39
|
+
style: 'solid' | 'dashed';
|
|
40
|
+
points: [LinePoint, LinePoint];
|
|
41
|
+
data: XY[];
|
|
42
|
+
isBroken?: boolean;
|
|
43
|
+
isCurve?: boolean;
|
|
44
|
+
isCubic?: boolean;
|
|
45
|
+
}
|
|
46
|
+
interface PresetLine {
|
|
47
|
+
name: string;
|
|
48
|
+
children: LinePoolItem[];
|
|
49
|
+
}
|
|
50
|
+
declare const LinePoolItems: LinePoolItem[];
|
|
51
|
+
declare const PathLineLibs: PresetLine[];
|
|
52
|
+
|
|
53
|
+
export { type LinePoint, type LinePoolItem, LinePoolItems, PathLineLibs, type PathListItem, type PathPoolItem, PathShapeLibs, type PresetLine, ShapePathFormulasKeys };
|
package/dist/config.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d}from"./chunk-MQZE5LZU.js";import"./chunk-7NNOHYKX.js";import"./chunk-O2XFH626.js";export{c as LinePoolItems,d as PathLineLibs,b as PathShapeLibs,a as ShapePathFormulasKeys};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { StoreType } from '../model/store.js';
|
|
2
|
+
import 'fabric';
|
|
3
|
+
import 'mobx-state-tree/dist/internal';
|
|
2
4
|
import 'mobx-state-tree';
|
|
3
5
|
import '@ydesign/core';
|
|
6
|
+
import '../utils/fonts.js';
|
|
7
|
+
import 'mobx';
|
|
4
8
|
|
|
5
9
|
declare const useDuplicateElement: ({ store }: {
|
|
6
10
|
store: StoreType;
|
package/dist/hooks/use-lock.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { StoreType } from '../model/store.js';
|
|
2
|
+
import 'fabric';
|
|
3
|
+
import 'mobx-state-tree/dist/internal';
|
|
2
4
|
import 'mobx-state-tree';
|
|
3
5
|
import '@ydesign/core';
|
|
6
|
+
import '../utils/fonts.js';
|
|
7
|
+
import 'mobx';
|
|
4
8
|
|
|
5
9
|
declare const useLock: ({ store }: {
|
|
6
10
|
store: StoreType;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { StoreType } from '../model/store.js';
|
|
2
|
+
import 'fabric';
|
|
3
|
+
import 'mobx-state-tree/dist/internal';
|
|
2
4
|
import 'mobx-state-tree';
|
|
3
5
|
import '@ydesign/core';
|
|
6
|
+
import '../utils/fonts.js';
|
|
7
|
+
import 'mobx';
|
|
4
8
|
|
|
5
9
|
declare const useRemoveElement: ({ store }: {
|
|
6
10
|
store: StoreType;
|
package/dist/lib/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-
|
|
1
|
+
import{a}from"../chunk-MXZ6RXT3.js";import"../chunk-O2XFH626.js";export{a as cn};
|