@ydesign/react-editor 0.0.9 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.css +1 -1
- package/dist/app.js +1 -1
- package/dist/canvas/workspace.d.ts +6 -4
- package/dist/canvas/workspace.js +1 -1
- package/dist/chunk-2AZQIJ4K.js +1 -0
- package/dist/chunk-45NWLCOP.js +15 -0
- package/dist/chunk-63A6RW6Y.js +21 -0
- package/dist/chunk-EUTDQZKU.js +1 -0
- package/dist/chunk-KERQXVBL.js +1 -0
- package/dist/{chunk-7YLSIB43.js → chunk-RBRSKAZL.js} +1 -1
- package/dist/chunk-SR5OYO6O.js +214 -0
- package/dist/chunk-YBC2DYJX.js +9 -0
- package/dist/config.d.ts +228 -3
- package/dist/config.js +1 -1
- package/dist/model/store.d.ts +5 -346
- package/dist/model/store.js +1 -1
- package/dist/project.d.ts +12 -4
- package/dist/project.js +1 -1
- package/dist/side-panel/index.d.ts +2 -5
- package/dist/side-panel/index.js +1 -1
- package/dist/side-panel/side-panel.d.ts +12 -6
- package/dist/side-panel/side-panel.js +1 -1
- package/dist/store-DfmY1m2j.d.ts +379 -0
- package/dist/toolbar/download-button.d.ts +1 -3
- package/dist/toolbar/download-button.js +1 -1
- package/dist/toolbar/toolbar.d.ts +1 -3
- package/dist/toolbar/toolbar.js +18 -1
- package/dist/toolbar/zoom-buttons.d.ts +1 -3
- package/dist/topbar/topbar.d.ts +19 -6
- package/dist/topbar/topbar.js +158 -8
- package/package.json +2 -2
- package/dist/canvas/context-menu/context-menu.d.ts +0 -2
- package/dist/canvas/context-menu/context-menu.js +0 -0
- package/dist/canvas/hotkeys.d.ts +0 -3
- package/dist/canvas/hotkeys.js +0 -1
- package/dist/canvas/workspace-canvas.d.ts +0 -19
- package/dist/canvas/workspace-canvas.js +0 -1
- package/dist/chunk-2A3HHQ7X.js +0 -1
- package/dist/chunk-2T3O5ZZ2.js +0 -1
- package/dist/chunk-3TO57JPN.js +0 -1
- package/dist/chunk-4HH3B3W3.js +0 -23
- package/dist/chunk-4LUZF4CB.js +0 -2
- package/dist/chunk-5OA2JYPB.js +0 -1
- package/dist/chunk-5X6VER6G.js +0 -1
- package/dist/chunk-62YF5KTO.js +0 -1
- package/dist/chunk-75WC3GVB.js +0 -1
- package/dist/chunk-7NNOHYKX.js +0 -15
- package/dist/chunk-A7SUGNOW.js +0 -1
- package/dist/chunk-AC6CCGZH.js +0 -1
- package/dist/chunk-CB23VFSC.js +0 -1
- package/dist/chunk-DGCF2GDA.js +0 -9
- package/dist/chunk-HHYPIHAP.js +0 -45
- package/dist/chunk-IUFYYEGO.js +0 -1
- package/dist/chunk-IV52R7D7.js +0 -27
- package/dist/chunk-J6PYM4EV.js +0 -1
- package/dist/chunk-JMIN2XMC.js +0 -1
- package/dist/chunk-JPIYZYMQ.js +0 -1
- package/dist/chunk-JUVJJS4T.js +0 -54
- package/dist/chunk-KKA7WASQ.js +0 -16
- package/dist/chunk-KVT25LDU.js +0 -1
- package/dist/chunk-NDZKXZQ2.js +0 -3
- package/dist/chunk-O56ZNYGR.js +0 -1
- package/dist/chunk-O73AAP2K.js +0 -1
- package/dist/chunk-OPXS6VQ6.js +0 -151
- package/dist/chunk-OQ6HU62L.js +0 -1
- package/dist/chunk-P5I43V7X.js +0 -1
- package/dist/chunk-POCSL7OS.js +0 -50
- package/dist/chunk-POWRXH5R.js +0 -1
- package/dist/chunk-PSO4W6J7.js +0 -9
- package/dist/chunk-QWM7VMLQ.js +0 -9
- package/dist/chunk-RSKWMPST.js +0 -1
- package/dist/chunk-SGK2XN5D.js +0 -1
- package/dist/chunk-T3TEB73P.js +0 -1
- package/dist/chunk-TS5CKDHH.js +0 -1
- package/dist/chunk-TTHQXTIX.js +0 -1
- package/dist/chunk-TTK5Z2Z6.js +0 -1
- package/dist/chunk-TZ6B7XDS.js +0 -1
- package/dist/chunk-WCHGSVUC.js +0 -8
- package/dist/chunk-WJT6VPDR.js +0 -9
- package/dist/chunk-XA2G4P2Q.js +0 -1
- package/dist/chunk-XRRO2RT7.js +0 -1
- package/dist/chunk-YCJBBRRT.js +0 -1
- package/dist/chunk-YRJUN267.js +0 -14
- package/dist/chunk-YVBVDUVA.js +0 -1
- package/dist/hooks/use-duplicate-element.d.ts +0 -16
- package/dist/hooks/use-duplicate-element.js +0 -1
- package/dist/hooks/use-lock.d.ts +0 -18
- package/dist/hooks/use-lock.js +0 -1
- package/dist/hooks/use-remove-element.d.ts +0 -16
- package/dist/hooks/use-remove-element.js +0 -1
- package/dist/lib/utils.d.ts +0 -5
- package/dist/lib/utils.js +0 -1
- package/dist/side-panel/background-panel.d.ts +0 -17
- package/dist/side-panel/background-panel.js +0 -1
- package/dist/side-panel/images-grid.d.ts +0 -27
- package/dist/side-panel/images-grid.js +0 -1
- package/dist/side-panel/layers-panel.d.ts +0 -16
- package/dist/side-panel/layers-panel.js +0 -1
- package/dist/side-panel/photos-panel.d.ts +0 -16
- package/dist/side-panel/photos-panel.js +0 -1
- package/dist/side-panel/shapes-panel.d.ts +0 -16
- package/dist/side-panel/shapes-panel.js +0 -1
- package/dist/side-panel/size-panel.d.ts +0 -16
- package/dist/side-panel/size-panel.js +0 -1
- package/dist/side-panel/tab-button.d.ts +0 -12
- package/dist/side-panel/tab-button.js +0 -1
- package/dist/side-panel/templates-panel.d.ts +0 -16
- package/dist/side-panel/templates-panel.js +0 -1
- package/dist/side-panel/text-panel.d.ts +0 -16
- package/dist/side-panel/text-panel.js +0 -1
- package/dist/side-panel/upload-panel.d.ts +0 -17
- package/dist/side-panel/upload-panel.js +0 -1
- package/dist/toolbar/default-toolbar.d.ts +0 -21
- package/dist/toolbar/default-toolbar.js +0 -1
- package/dist/toolbar/duplicate-button.d.ts +0 -16
- package/dist/toolbar/duplicate-button.js +0 -1
- package/dist/toolbar/element-container.d.ts +0 -13
- package/dist/toolbar/element-container.js +0 -1
- package/dist/toolbar/figure-toolbar.d.ts +0 -33
- package/dist/toolbar/figure-toolbar.js +0 -1
- package/dist/toolbar/filters-picker.d.ts +0 -18
- package/dist/toolbar/filters-picker.js +0 -1
- package/dist/toolbar/flip-button.d.ts +0 -18
- package/dist/toolbar/flip-button.js +0 -1
- package/dist/toolbar/group-button.d.ts +0 -16
- package/dist/toolbar/group-button.js +0 -1
- package/dist/toolbar/history-buttons.d.ts +0 -16
- package/dist/toolbar/history-buttons.js +0 -1
- package/dist/toolbar/image-eraser-pen.d.ts +0 -10
- package/dist/toolbar/image-eraser-pen.js +0 -1
- package/dist/toolbar/image-remove-background.d.ts +0 -10
- package/dist/toolbar/image-remove-background.js +0 -1
- package/dist/toolbar/image-toolbar.d.ts +0 -36
- package/dist/toolbar/image-toolbar.js +0 -1
- package/dist/toolbar/lock-button.d.ts +0 -16
- package/dist/toolbar/lock-button.js +0 -1
- package/dist/toolbar/many-toolbar.d.ts +0 -5
- package/dist/toolbar/many-toolbar.js +0 -1
- package/dist/toolbar/opacity-picker.d.ts +0 -16
- package/dist/toolbar/opacity-picker.js +0 -1
- package/dist/toolbar/position-picker.d.ts +0 -16
- package/dist/toolbar/position-picker.js +0 -1
- package/dist/toolbar/remove-button.d.ts +0 -16
- package/dist/toolbar/remove-button.js +0 -1
- package/dist/toolbar/text-ai-write.d.ts +0 -7
- package/dist/toolbar/text-ai-write.js +0 -1
- package/dist/toolbar/text-toolbar.d.ts +0 -19
- package/dist/toolbar/text-toolbar.js +0 -1
- package/dist/topbar/create-design.d.ts +0 -30
- package/dist/topbar/create-design.js +0 -1
- package/dist/topbar/file-menu.d.ts +0 -19
- package/dist/topbar/file-menu.js +0 -1
- package/dist/utils/api.d.ts +0 -14
- package/dist/utils/api.js +0 -1
- package/dist/utils/blob.d.ts +0 -5
- package/dist/utils/blob.js +0 -1
- package/dist/utils/download.d.ts +0 -3
- package/dist/utils/download.js +0 -1
- package/dist/utils/figure-to-svg.d.ts +0 -36
- package/dist/utils/figure-to-svg.js +0 -1
- package/dist/utils/file.d.ts +0 -3
- package/dist/utils/file.js +0 -1
- package/dist/utils/filters.d.ts +0 -2
- package/dist/utils/filters.js +0 -0
- package/dist/utils/fonts.d.ts +0 -68
- package/dist/utils/fonts.js +0 -1
- package/dist/utils/image.d.ts +0 -19
- package/dist/utils/image.js +0 -1
- package/dist/utils/l10n.d.ts +0 -227
- package/dist/utils/l10n.js +0 -1
- package/dist/utils/loader.d.ts +0 -6
- package/dist/utils/loader.js +0 -1
- package/dist/utils/screen.d.ts +0 -6
- package/dist/utils/screen.js +0 -1
- package/dist/utils/svg.d.ts +0 -3
- package/dist/utils/svg.js +0 -1
- package/dist/utils/text.d.ts +0 -3
- package/dist/utils/text.js +0 -1
- package/dist/utils/use-api.d.ts +0 -2
- package/dist/utils/use-api.js +0 -0
- package/dist/utils/use-axios.d.ts +0 -5
- package/dist/utils/use-axios.js +0 -1
- /package/dist/{chunk-MXZ6RXT3.js → chunk-EWOU5F3O.js} +0 -0
- /package/dist/{chunk-YCFED7XQ.js → chunk-WFMCGQ5V.js} +0 -0
package/dist/topbar/topbar.js
CHANGED
|
@@ -1,6 +1,156 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as de}from"../chunk-RBRSKAZL.js";import{a as W,c as K}from"../chunk-2AZQIJ4K.js";import"../chunk-KERQXVBL.js";import"../chunk-YBC2DYJX.js";import{b as U,c as E}from"../chunk-5C2MNUBC.js";import{a as H}from"../chunk-EWOU5F3O.js";import{c as P}from"../chunk-WFMCGQ5V.js";import{a as ae,b as le,e as ce}from"../chunk-EUTDQZKU.js";import"../chunk-O2XFH626.js";import X from"styled-components";import{observer as Ce}from"mobx-react-lite";import{Dropdown as dt,Button as pt,Modal as mt}from"antd";import{Menu as gt,Plus as ht,Languages as ut,Check as be}from"lucide-react";import{useState as ft}from"react";import{observer as xt}from"mobx-react-lite";import{Modal as Fe,Button as Ke,ColorPicker as He,InputNumber as ge,Select as je,Tooltip as he,App as Ve,theme as Ge}from"antd";import{Grid2X2 as Xe,Star as qe,ShoppingBag as Je,FileText as Ze,Presentation as Qe,Share2 as Ye,Printer as et,ImagePlus as tt,FolderPlus as o,LockKeyholeOpen as ot,LockKeyhole as it}from"lucide-react";import{useRef as nt,useState as k,useMemo as ue,useCallback as $}from"react";import G from"styled-components";import{App as We,Modal as Ee,Upload as pe}from"antd";import{Inbox as _e}from"lucide-react";import{useRef as $e,useState as Oe}from"react";import{jsx as d,jsxs as _}from"react/jsx-runtime";var{Dragger:Ae}=pe,me=({visible:n,onClose:s})=>{let{message:u,modal:b}=We.useApp(),[g,v]=Oe(!1),l=$e(null),M=K();return d(Ee,{width:750,title:"\u4E0A\u4F20 PSD \u6587\u4EF6",open:n,onCancel:()=>{if(g){u.warning("\u6587\u4EF6\u6B63\u5728\u89E3\u6790\u4E2D\uFF0C\u8BF7\u7A0D\u5019...");return}s()},footer:null,mask:{closable:!g},styles:{body:{height:"calc(100% - 40px)",padding:"10px 0 0 0"},container:{height:500}},centered:!0,children:d("div",{style:{height:"100%"},children:_(Ae,{...{name:"file-psd",multiple:!1,accept:".psd",showUploadList:!1,beforeUpload(p){return p.name.toLowerCase().endsWith(".psd")?!0:(u.error("\u4EC5\u652F\u6301 .psd \u683C\u5F0F\u6587\u4EF6"),pe.LIST_IGNORE)},customRequest(p){let{file:r,onSuccess:x,onError:c,onProgress:C}=p;v(!0),l.current=u.loading("PSD \u6587\u4EF6\u89E3\u6790\u4E2D\uFF0C\u8BF7\u7A0D\u5019...",0);let h=new FormData;h.append("file",r),W.post(le().url,h,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress(f){f.total&&C&&C({percent:Math.round(f.loaded/f.total*100)})}}).then(f=>{x?.(f)}).catch(f=>{c?.(f)})},async onChange(p){let{status:r}=p.file;if(console.log("info",p),r==="done"){l.current?.(),l.current=null,v(!1),u.success(`${p.file.name} \u89E3\u6790\u6210\u529F`);let x=p.file.response;console.log("PSD \u89E3\u6790\u7ED3\u679C:",x.result);let{thumbnailUrl:c,content:C,name:h,width:f,height:y,filename:q,parseUrl:T}=x.result,O={sourceResourcesId:crypto.randomUUID(),content:C,width:f,height:y,parseUrl:T,thumbnailUrl:c,filename:q,name:h};console.log("postRecord ---> ",O);let S=ce(O);console.log("postData",S);try{let I=await W.post(S.url,S.data);console.log("res ---> ",I.result);let J=I.result,R=`${M.urls.editorUrl}?id=${J.id}&type=record`;console.log("editUrl",R);let B=window.open(R,"_blank");(!B||B.closed)&&b.info({title:"\u5141\u8BB8\u663E\u793A\u5F39\u51FA\u7A97\u53E3",width:480,content:_("div",{style:{padding:"16px 0"},children:[d("p",{style:{marginBottom:8,color:"#666"},children:"\u4F60\u9700\u8981\u6388\u6743\u672C\u7AD9\u5728\u6D4F\u89C8\u5668\u6253\u5F00\u591A\u4E2A\u7A97\u53E3\u3002"}),_("div",{style:{marginBottom:12},children:[d("p",{children:d("b",{children:"\u7B2C1\u6B65"})}),d("p",{children:"\u70B9\u51FB\u6D4F\u89C8\u5668\u53F3\u4FA7\u9876\u90E8\u5F39\u51FA\u7684\u963B\u6B62\u7A0B\u5E8F\u56FE\u6807\u3002"})]}),_("div",{style:{marginBottom:12},children:[d("p",{children:d("b",{children:"\u7B2C2\u6B65"})}),d("p",{children:"\u70B9\u51FB\u59CB\u7EC8\u5141\u8BB8\u663E\u793A\u5F39\u51FA\u5F0F\u7A97\u53E3\u548C\u8FDB\u884C\u91CD\u5B9A\u5411\u3002"})]}),_("div",{style:{marginBottom:12},children:[d("p",{children:d("b",{children:"\u7B2C3\u6B65"})}),d("p",{children:"\u70B9\u51FB\u5B8C\u6210\u6309\u94AE\uFF0C\u5373\u53EF\u6B63\u5E38\u4F7F\u7528\u529F\u80FD\u5566~"})]})]}),okText:"\u6211\u77E5\u9053\u5566"})}catch(I){console.error(I)}}else if(r==="error"){l.current?.(),l.current=null,v(!1);let x=p.file.error?.message||"\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5";u.error(x)}}},disabled:g,children:[d("p",{className:"flex items-center justify-center",children:d(_e,{size:60})}),d("p",{className:"ant-upload-text",children:g?"\u89E3\u6790\u4E2D...":"\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u5904\u4E0A\u4F20\u6216\u70B9\u51FB\u4E0A\u4F20"}),d("p",{className:"ant-upload-hint",children:d("a",{href:"https://www.yuque.com/meitumcp/vvtts5/gfv8e5",target:"_blank",onClick:p=>{p.stopPropagation()},children:"PSD\u6587\u4EF6\u5BFC\u5165\u89C4\u8303"})})]})})})};import{Fragment as ct,jsx as e,jsxs as m}from"react/jsx-runtime";var st=[{key:"all",label:"\u5168\u90E8",icon:Xe},{key:"common",label:"\u5E38\u7528\u5C3A\u5BF8",icon:qe},{key:"ecommerce",label:"\u7535\u5546\u7269\u6599",icon:Je},{key:"office",label:"\u884C\u653F\u529E\u516C",icon:Ze},{key:"presentation",label:"\u6F14\u793A\u6587\u7A3F",icon:Qe},{key:"social",label:"\u793E\u4EA4\u5A92\u4F53",icon:Ye},{key:"print",label:"\u5370\u5237\u7269\u6599",icon:et}],fe=[{key:"common",label:"\u5E38\u7528\u5C3A\u5BF8",sizes:[{icon:e(o,{size:24}),name:"\u7535\u5546\u4E3B\u56FE\uFF081:1\uFF09",desc:"1440x1440px",width:1440,height:1440,unit:"px"},{icon:e(o,{size:24}),name:"\u7535\u5546\u4E3B\u56FE\uFF081:1\uFF09",desc:"800x800px",width:800,height:800,unit:"px"},{icon:e(o,{size:24}),name:"\u624B\u673A\u6D77\u62A5",desc:"1242x2208px",width:1242,height:2208,unit:"px"},{icon:e(o,{size:24}),name:"\u5C0F\u7EA2\u4E66\u5C01\u9762",desc:"1242x1656px",width:1242,height:1656,unit:"px"},{icon:e(o,{size:24}),name:"\u7AD6\u7248\u89C6\u9891\u5C01\u9762",desc:"1080x1920px",width:1080,height:1920,unit:"px"},{icon:e(o,{size:24}),name:"PPT\uFF0816:9\uFF09",desc:"1920x1080px",width:1920,height:1080,unit:"px"}]},{key:"ecommerce",label:"\u7535\u5546\u7269\u6599",sizes:[{icon:e(o,{size:24}),name:"\u7535\u5546\u4E3B\u56FE\uFF081:1\uFF09",desc:"1440x1440px",width:1440,height:1440,unit:"px"},{icon:e(o,{size:24}),name:"\u7535\u5546\u4E3B\u56FE\uFF081:1\uFF09",desc:"800x800px",width:800,height:800,unit:"px"},{icon:e(o,{size:24}),name:"\u7535\u5546\u4E3B\u56FE\uFF083:4\uFF09",desc:"1440x1920px",width:1440,height:1920,unit:"px"},{icon:e(o,{size:24}),name:"\u7535\u5546\u4E3B\u56FE\uFF083:4\uFF09",desc:"750x1000px",width:750,height:1e3,unit:"px"},{icon:e(o,{size:24}),name:"\u76F4\u64AD\u95F4\u80CC\u666F",desc:"1242x2690px",width:1242,height:2690,unit:"px"},{icon:e(o,{size:24}),name:"\u7535\u5546\u8BE6\u60C5\u9875",desc:"750x1000px",width:750,height:1e3,unit:"px"},{icon:e(o,{size:24}),name:"\u7535\u5546\u7AD6\u7248\u6D77\u62A5",desc:"1200x1920px",width:1200,height:1920,unit:"px"}]},{key:"office",label:"\u884C\u653F\u529E\u516C",sizes:[{icon:e(o,{size:24}),name:"\u7B80\u5386",desc:"2480x3507px",width:2480,height:3507,unit:"px"},{icon:e(o,{size:24}),name:"\u5DE5\u724C\u5DE5\u4F5C\u8BC1",desc:"709x1087px",width:709,height:1087,unit:"px"},{icon:e(o,{size:24}),name:"\u5956\u72B6\u8BC1\u4E66",desc:"3437x2550px",width:3437,height:2550,unit:"px"}]},{key:"presentation",label:"\u6F14\u793A\u6587\u7A3F",sizes:[{icon:e(o,{size:24}),name:"PPT\uFF0816:9\uFF09",desc:"1920x1080px",width:1920,height:1080,unit:"px"},{icon:e(o,{size:24}),name:"PPT\uFF084:3\uFF09",desc:"1024x768px",width:1024,height:768,unit:"px"}]},{key:"social",label:"\u793E\u4EA4\u5A92\u4F53",sizes:[{icon:e(o,{size:24}),name:"\u624B\u673A\u6D77\u62A5",desc:"1242x2208px",width:1242,height:2208,unit:"px"},{icon:e(o,{size:24}),name:"\u624B\u673A\u5168\u5C4F\u6D77\u62A5",desc:"1242x2688px",width:1242,height:2688,unit:"px"},{icon:e(o,{size:24}),name:"\u7AD6\u7248\u89C6\u9891\u5C01\u9762",desc:"1080x1920px",width:1080,height:1920,unit:"px"},{icon:e(o,{size:24}),name:"\u6A2A\u7248\u89C6\u9891\u5C01\u9762",desc:"1920x1080px",width:1920,height:1080,unit:"px"},{icon:e(o,{size:24}),name:"\u5C0F\u7EA2\u4E66\u5C01\u9762",desc:"1242x1656px",width:1242,height:1656,unit:"px"},{icon:e(o,{size:24}),name:"\u6296\u97F3\u56FE\u6587\u5E26\u8D27",desc:"1242x1656px",width:1242,height:1656,unit:"px"},{icon:e(o,{size:24}),name:"\u516C\u4F17\u53F7\u9996\u56FE",desc:"900x383px",width:900,height:383,unit:"px"},{icon:e(o,{size:24}),name:"\u516C\u4F17\u53F7\u6B21\u56FE",desc:"900x800px",width:900,height:800,unit:"px"},{icon:e(o,{size:24}),name:"\u957F\u56FE\u6D77\u62A5",desc:"800x2000px",width:800,height:2e3,unit:"px"}]},{key:"print",label:"\u5370\u5237\u7269\u6599",sizes:[{icon:e(o,{size:24}),name:"\u4E00\u5BF8\u8BC1\u4EF6\u7167",desc:"23x35mm",width:25,height:35,unit:"mm"},{icon:e(o,{size:24}),name:"\u4E8C\u5BF8\u8BC1\u4EF6\u7167",desc:"35x53mm",width:35,height:53,unit:"mm"},{icon:e(o,{size:24}),name:"1.8\u7C73\u5C55\u67B6",desc:"80x180cm",width:80,height:180,unit:"cm"},{icon:e(o,{size:24}),name:"2m\u6613\u62C9\u5B9D",desc:"80x200cm",width:80,height:200,unit:"cm"},{icon:e(o,{size:24}),name:"\u540D\u7247",desc:"96x60mm",width:96,height:60,unit:"mm"},{icon:e(o,{size:24}),name:"\u4F18\u60E0\u5238",desc:"186x66mm",width:186,height:66,unit:"mm"},{icon:e(o,{size:24}),name:"\u4F20\u5355",desc:"216x291cm",width:216,height:291,unit:"cm"}]}],xe=G.div`
|
|
2
|
+
padding: 16px 24px;
|
|
3
|
+
height: 60px;
|
|
4
|
+
flex: 1;
|
|
5
|
+
display: flex;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
align-items: center;
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
border: 1px dashed #d0d2d6;
|
|
10
|
+
&:hover {
|
|
11
|
+
background-color: rgba(0, 31, 92, 0.06);
|
|
12
|
+
}
|
|
13
|
+
span {
|
|
14
|
+
margin-left: 8px;
|
|
15
|
+
}
|
|
16
|
+
`,rt=G.div`
|
|
17
|
+
flex: 1;
|
|
18
|
+
margin-left: 14px;
|
|
19
|
+
height: 100%;
|
|
20
|
+
|
|
21
|
+
.createrContentInner {
|
|
22
|
+
margin-bottom: 16px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.scrollbars div:first-child {
|
|
26
|
+
scroll-behavior: smooth;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.Widget.categorySection[data-is-folded='false'] .categoryFoldBtn,
|
|
30
|
+
.Widget.categorySection[data-is-multi-row='false'] .categoryFoldBtn {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.Widget.categorySection[data-is-folded='true'] ul {
|
|
35
|
+
height: 97px;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
}
|
|
38
|
+
`,at=G.div`
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
position: relative;
|
|
42
|
+
padding-top: 16px;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
align-items: center;
|
|
48
|
+
|
|
49
|
+
border-radius: 8px;
|
|
50
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
51
|
+
|
|
52
|
+
.canvasSizeName {
|
|
53
|
+
color: #616366;
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
line-height: 16px;
|
|
57
|
+
margin-top: 8px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.canvasSizeSize {
|
|
61
|
+
height: 14px;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
width: 100%;
|
|
64
|
+
margin-top: 4px;
|
|
65
|
+
|
|
66
|
+
span {
|
|
67
|
+
color: #abadb2;
|
|
68
|
+
display: block;
|
|
69
|
+
font-size: 20px;
|
|
70
|
+
font-weight: 400;
|
|
71
|
+
height: 200%;
|
|
72
|
+
line-height: 26px;
|
|
73
|
+
text-align: center;
|
|
74
|
+
-webkit-transform: scale(0.5);
|
|
75
|
+
transform: scale(0.5);
|
|
76
|
+
-webkit-transform-origin: top left;
|
|
77
|
+
transform-origin: top left;
|
|
78
|
+
width: 200%;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.canvasSizeMask {
|
|
83
|
+
background: rgba(0, 0, 0, 0.25);
|
|
84
|
+
display: none;
|
|
85
|
+
height: 100%;
|
|
86
|
+
left: 0;
|
|
87
|
+
position: absolute;
|
|
88
|
+
top: 0;
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
.canvasSizeMask,
|
|
92
|
+
.canvasSizeMask button {
|
|
93
|
+
justify-content: center;
|
|
94
|
+
align-items: center;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.canvasSizeMask button {
|
|
98
|
+
background-color: #fff;
|
|
99
|
+
width: 66px;
|
|
100
|
+
height: 26px;
|
|
101
|
+
display: flex;
|
|
102
|
+
padding: 0 8px;
|
|
103
|
+
outline: none;
|
|
104
|
+
line-height: 16px;
|
|
105
|
+
font-size: 12px;
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
color: #1c1d1f;
|
|
108
|
+
border-radius: 6px;
|
|
109
|
+
}
|
|
110
|
+
.canvasSizeMask button:active {
|
|
111
|
+
background-color: #f2f2f2;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:hover .canvasSizeMask {
|
|
115
|
+
display: flex;
|
|
116
|
+
}
|
|
117
|
+
`,lt=G.div`
|
|
118
|
+
display: flex;
|
|
119
|
+
margin-top: 20px;
|
|
120
|
+
flex-wrap: wrap;
|
|
121
|
+
align-items: center;
|
|
122
|
+
position: relative;
|
|
123
|
+
|
|
124
|
+
.sizeWarning {
|
|
125
|
+
width: 100%;
|
|
126
|
+
margin-bottom: 8px;
|
|
127
|
+
padding: 4px 8px;
|
|
128
|
+
font-size: 12px;
|
|
129
|
+
color: #ff4d4f;
|
|
130
|
+
background-color: #fff2f0;
|
|
131
|
+
border: 1px solid #ffccc7;
|
|
132
|
+
border-radius: 4px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.Widget.sizeInpueBox {
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
|
|
139
|
+
flex: 1;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.Widget.sizeInpueBox .sizeInput {
|
|
143
|
+
flex: 1;
|
|
144
|
+
}
|
|
145
|
+
.Widget.sizeInpueBox .linkIcon {
|
|
146
|
+
padding: 8px;
|
|
147
|
+
background-color: #001f5c0f;
|
|
148
|
+
border-radius: 8px;
|
|
149
|
+
margin: 0 4px;
|
|
150
|
+
}
|
|
151
|
+
`,L=72,j=130,V=8e3,ye=({project:n,visible:s,onClose:u,onConfirm:b})=>{let{message:g,modal:v}=Ve.useApp(),[l,M]=k("all"),N=nt(null),{token:p}=Ge.useToken(),[r,x]=k(null),[c,C]=k(null),[h,f]=k("px"),[y,q]=k(!1),[T,O]=k(1),[S,I]=k("#ffffff"),[J,R]=k(!1),B=ue(()=>r?E({unitVal:r,dpi:L,unit:h}):0,[r,h]),Z=ue(()=>c?E({unitVal:c,dpi:L,unit:h}):0,[c,h]),Q=r!=null&&c!=null&&r>0&&c>0,A=Q&&(B>V||Z>V),F=Q&&(B<j||Z<j),Y=!Q||A||F,te=A?`\u8D85\u51FA\u753B\u5E03\u5C3A\u5BF8\u9650\u5236\uFF1A${V} * ${V} px`:F?`\u4F4E\u4E8E\u753B\u5E03\u5C3A\u5BF8\u9650\u5236\uFF1A${j} * ${j} px`:"",Se=$(t=>{x(t),y&&t&&t>0&&C(Math.round(t/T))},[y,T]),Pe=$(t=>{C(t),y&&t&&t>0&&x(Math.round(t*T))},[y,T]),Ne=$(()=>{!y&&r&&c&&r>0&&c>0&&O(r/c),q(t=>!t)},[y,r,c]),Te=$(t=>{if(r){let i=E({unitVal:r,dpi:L,unit:h});x(Math.round(U({px:i,dpi:L,unit:t,precious:0})))}if(c){let i=E({unitVal:c,dpi:L,unit:h});C(Math.round(U({px:i,dpi:L,unit:t,precious:0})))}f(t)},[r,c,h]),Ie=$(()=>{if(Y)return;let t=JSON.stringify({bg:{backgroundColor:S}}),i=new URLSearchParams({create:"",createEmptyPoster:"true",createInfo:t,height:String(c),unit:h,width:String(r)});console.log("params \u7684\u53C2\u6570 ---> ",i.toString()),console.log("project ",n.urls.editorUrl),window.open(`${n.urls.editorUrl}?${i.toString()}`,"_blank")},[Y,S,Z,B,h]),Be=t=>{M(t);let i=N.current;if(!i)return;let w=i.querySelector(`[data-category-id="${t}"]`);w&&i.scrollTo({top:w.offsetTop,behavior:"smooth"})},[Ue,Le]=k(()=>{let t={};return fe.forEach(i=>{t[i.key]=i.sizes.length>6}),t});return m(ct,{children:[m(Fe,{title:"\u521B\u5EFA\u8BBE\u8BA1",open:s,onCancel:u,footer:null,width:880,mask:{closable:!1},styles:{body:{display:"flex",flex:1,padding:"20px 0",height:"100%"},container:{height:550}},children:[e("div",{className:"createrSideBar",style:{width:140,"--sidebar-active-bg":p.colorPrimaryBg,"--sidebar-hover-bg":p.colorPrimaryBgHover},children:st.map(t=>m("div",{"data-active":t.key===l,className:H("createrSideBarItem","flex h-[40px] px-2 mb-2 cursor-pointer rounded-md items-center hover:bg-[var(--sidebar-hover-bg)]",{"bg-[var(--sidebar-active-bg)] hover:bg-[var(--sidebar-active-bg)]":t.key===l}),onClick:()=>Be(t.key),children:[e(t.icon,{size:16,className:"ml-2"}),e("span",{className:"ml-2",children:t.label})]},t.key))}),e(rt,{children:e("div",{className:"scrollbars",style:{position:"relative",overflow:"hidden",width:"100%",height:"100%"},children:e("div",{ref:N,style:{position:"absolute",inset:0,overflow:"scroll"},children:m("div",{className:"createrContentInner",children:[e("div",{"data-category-id":"all"}),m("div",{className:"openBtns flex",children:[m(xe,{onClick:()=>{let t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=async()=>{let i=t.files?.[0];if(i)try{g.loading("\u6B63\u5728\u4E0A\u4F20...",0);let w=ae(),D=new FormData;D.append("file",i);let oe=await W.post(w.url,D,{headers:{"Content-Type":"multipart/form-data"}});console.log("res",oe);let{url:ie,width:ne,height:se}=oe.result;console.log("url",ie,ne,se);let Me=encodeURIComponent(encodeURIComponent(ie)),Re=new URLSearchParams({createEmptyPoster:"true",width:String(ne),height:String(se),unit:"px"});g.destroy();let De=`${n.urls.editorUrl}/?${Re.toString()}&open=${Me}`,re=window.open(De,"_blank");(!re||re.closed)&&v.info({title:"\u5141\u8BB8\u663E\u793A\u5F39\u51FA\u7A97\u53E3",width:480,content:m("div",{style:{padding:"16px 0"},children:[e("p",{style:{marginBottom:8,color:"#666"},children:"\u4F60\u9700\u8981\u6388\u6743\u672C\u7AD9\u5728\u6D4F\u89C8\u5668\u6253\u5F00\u591A\u4E2A\u7A97\u53E3\u3002"}),m("div",{style:{marginBottom:12},children:[e("p",{children:e("b",{children:"\u7B2C1\u6B65"})}),e("p",{children:"\u70B9\u51FB\u6D4F\u89C8\u5668\u53F3\u4FA7\u9876\u90E8\u5F39\u51FA\u7684\u963B\u6B62\u7A0B\u5E8F\u56FE\u6807\u3002"})]}),m("div",{style:{marginBottom:12},children:[e("p",{children:e("b",{children:"\u7B2C2\u6B65"})}),e("p",{children:"\u70B9\u51FB\u59CB\u7EC8\u5141\u8BB8\u663E\u793A\u5F39\u51FA\u5F0F\u7A97\u53E3\u548C\u8FDB\u884C\u91CD\u5B9A\u5411\u3002"})]}),m("div",{style:{marginBottom:12},children:[e("p",{children:e("b",{children:"\u7B2C3\u6B65"})}),e("p",{children:"\u70B9\u51FB\u5B8C\u6210\u6309\u94AE\uFF0C\u5373\u53EF\u6B63\u5E38\u4F7F\u7528\u529F\u80FD\u5566~"})]})]}),okText:"\u6211\u77E5\u9053\u5566"})}catch(w){g.destroy();let D=w?.message||"\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5";g.error(D),console.error("\u4E0A\u4F20\u5931\u8D25:",D,w)}},t.click()},children:[e(tt,{style:{color:p.colorPrimary}}),e("span",{children:"\u6253\u5F00\u56FE\u7247"})]}),e(he,{title:"\u4EC5\u652F\u6301psd\u683C\u5F0F\u6587\u4EF6",children:m(xe,{style:{marginLeft:12},onClick:()=>{R(!0),console.log("\u70B9\u51FB")},children:[e(o,{style:{color:p.colorPrimary}}),e("span",{children:"\u6253\u5F00PSD"})]})})]}),fe.map(t=>m("div",{className:H("Widget categorySection","mt-6"),"data-category-id":t.key,"data-is-folded":Ue[t.key]??!1,"data-is-multi-row":t.sizes.length>6,children:[m("div",{className:H("categoryHeader","flex items-center justify-between"),children:[e("div",{className:"categoryTitle text-sm font-semibold",children:t.label}),e("div",{className:"categoryFoldBtn flex items-center cursor-pointer",onClick:()=>Le(i=>({...i,[t.key]:!1})),children:e("span",{className:"text-[#616366]",children:"\u67E5\u770B\u66F4\u591A"})})]}),t.key==="common"&&m(lt,{children:[te&&e("div",{className:"sizeWarning",children:te}),m("div",{className:"Widget sizeInpueBox",children:[e("div",{className:"sizeInput",children:e(ge,{prefix:"\u5BBD",value:r,min:0,precision:0,status:A||F?"error":void 0,onChange:Se,styles:{actions:{opacity:1,width:24}},style:{width:"100%"}})}),e(he,{title:y?"\u89E3\u9501\u6BD4\u4F8B":"\u9501\u5B9A\u6BD4\u4F8B",children:e("div",{className:"linkIcon",style:{cursor:"pointer"},onClick:Ne,children:y?e(it,{size:16}):e(ot,{size:16})})}),e("div",{className:"sizeInput",children:e(ge,{prefix:"\u9AD8",value:c,min:0,precision:0,status:A||F?"error":void 0,onChange:Pe,styles:{actions:{opacity:1,width:24}},style:{width:"100%"}})}),e("div",{className:"sizeUnitSelect",style:{width:98,marginLeft:12},children:e(je,{value:h,style:{width:98},onChange:Te,options:[{label:"px \u50CF\u7D20",value:"px"},{label:"cm \u5398\u7C73",value:"cm"},{label:"mm \u6BEB\u7C73",value:"mm"}]})})]}),e("div",{className:"widgets-color-picker",style:{width:98,marginLeft:12},children:e(He,{mode:"single",format:"hex",value:S,onChange:i=>I(i.toHexString()),styles:{root:{width:98},body:{width:92}}})}),e(Ke,{type:"primary",disabled:Y,style:{width:98,marginLeft:12},onClick:Ie,children:"\u521B\u5EFA"})]}),e("ul",{className:"flex mt-4 flex-wrap gap-3",children:t.sizes.map((i,w)=>e("li",{style:{width:"calc((100% - 60px) / 6)",height:97},children:m(at,{children:[i.icon,e("div",{className:"canvasSizeName",children:i.name}),e("div",{className:"canvasSizeSize",children:e("span",{children:i.desc})}),e("div",{className:"canvasSizeMask",onClick:()=>{b({...i,bgColor:S})},children:e("button",{type:"button",children:"\u521B\u5EFA"})})]})},w))})]},t.key))]})})})})]}),e(me,{visible:J,onClose:()=>R(!1)})]})};import{Fragment as bt,jsx as z,jsxs as vt}from"react/jsx-runtime";var{confirm:yt}=mt,ve=xt(({store:n,project:s})=>{let[u,b]=ft(!1),g=[{label:P("topbar.newDesign"),key:"new_design",icon:z(ht,{size:16})},{label:P("topbar.language"),key:"language",icon:z("div",{style:{height:22,display:"flex",alignItems:"center"},children:z(ut,{size:16})}),children:[{key:"en",label:"English",onClick:()=>{s.setLanguage("en")},extra:s.language==="en"?z(be,{size:16}):null},{key:"zh",label:"\u4E2D\u6587",onClick:()=>{s.setLanguage("zh")},extra:s.language==="zh"?z(be,{size:16}):null}]}];return vt(bt,{children:[z(dt,{menu:{items:g,onClick:({key:l})=>{l==="new_design"&&b(!0)}},trigger:["click"],styles:{root:{width:188}},children:z(pt,{type:"text",children:z(gt,{size:16})})}),z(ye,{visible:u,onClose:()=>b(!1),onConfirm:l=>{yt({title:"\u521B\u5EFA\u8BBE\u8BA1\u540E\uFF0C\u5C06\u65B0\u5EFA\u753B\u5E03\uFF0C\u5F53\u524D\u6D77\u62A5\u5185\u5BB9\u53EF\u5728\u4F5C\u56FE\u8BB0\u5F55\u4E2D\u67E5\u770B\u3002",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk(){console.log("OK"),console.log("size ---> ",l);let M=JSON.stringify({bg:{backgroundColor:l.bgColor}}),N=new URLSearchParams({create:"",createEmptyPoster:"true",createInfo:M,height:String(l.height),unit:l.unit,width:String(l.width)});console.log("params \u7684\u53C2\u6570 ---> ",N.toString()),console.log("\u9700\u8981\u8DF3\u8F6C\u7684\u7F16\u8F91\u5668\u5730\u5740",s.urls.editorUrl),window.open(`${s.urls.editorUrl}?${N.toString()}`,"_blank")}})},store:n,project:s})]})});import{Input as wt,Tooltip as kt,Button as zt,theme as Ct,Divider as St}from"antd";import{CloudUpload as ke,Loader as Pt,Check as Nt}from"lucide-react";var we="https://pub-d7c4dca6f69c4b329766184b707dc826.r2.dev/images/2026-03-17/e406e8b1-eb6d-4d8a-8c22-ddd100a0a40e/1b04fb1b-7275-4123-b495-d205197c21d4/ddc303f2-0cda-4d34-9864-76df19a9e7d6.png";import{jsx as a,jsxs as ee}from"react/jsx-runtime";var Tt=X("div")`
|
|
2
152
|
white-space: nowrap;
|
|
3
|
-
height:
|
|
153
|
+
height: 55px;
|
|
4
154
|
padding: 0 15px;
|
|
5
155
|
position: relative;
|
|
6
156
|
width: 100%;
|
|
@@ -11,18 +161,18 @@ import{a as p}from"../chunk-A7SUGNOW.js";import"../chunk-OPXS6VQ6.js";import{a a
|
|
|
11
161
|
overflow-y: hidden;
|
|
12
162
|
max-width: 100vw;
|
|
13
163
|
}
|
|
14
|
-
`,
|
|
164
|
+
`,It=X("div")`
|
|
15
165
|
@media screen and (max-width: 500px) {
|
|
16
166
|
display: flex;
|
|
17
167
|
}
|
|
18
|
-
`,
|
|
168
|
+
`,Bt=X("div")`
|
|
19
169
|
float: left;
|
|
20
170
|
display: flex;
|
|
21
171
|
align-items: center;
|
|
22
|
-
height:
|
|
23
|
-
`,
|
|
172
|
+
height: 55px;
|
|
173
|
+
`,Ut=X("div")`
|
|
24
174
|
float: right;
|
|
25
175
|
display: flex;
|
|
26
176
|
align-items: center;
|
|
27
|
-
height:
|
|
28
|
-
`,
|
|
177
|
+
height: 55px;
|
|
178
|
+
`,ze={loading:{icon:a(ke,{size:16,style:{display:"flex"}}),textKey:"topbar.statusLoading"},saved:{icon:a(Nt,{size:16,style:{display:"flex",color:"#52c41a"}}),textKey:"topbar.statusSaved",color:"#52c41a"},"has-changes":{icon:a(ke,{size:16,style:{display:"flex",color:"#faad14"}}),textKey:"topbar.statusHasChanges",color:"#faad14"},saving:{icon:a(Pt,{size:16,style:{display:"flex"}}),textKey:"topbar.statusSaving"}},Lt=Ce(({project:n})=>{let s=ze[n.status]||ze.saved;return a(kt,{title:P(s.textKey),children:a(zt,{type:"text",style:{marginLeft:14,color:s.color},icon:s.icon,onClick:()=>{(n.status==="loading"||n.status==="saved")&&n.save()},children:P(s.textKey)})})}),yo=Ce(({store:n,logo:s,logoUrl:u})=>{let b=K(),{token:g}=Ct.useToken(),v=s===void 0?a("img",{src:we,className:"h-[28px]"}):typeof s=="string"?a("img",{src:s,className:"h-[28px]"}):s,l=u?a("a",{href:u,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center"},children:v}):a("div",{style:{display:"flex",alignItems:"center",cursor:"pointer"},onClick:()=>window.history.back(),children:v});return a(Tt,{className:"topbar",style:{backgroundColor:g.colorBgContainer,color:g.colorText,borderBottom:`1px solid ${g.colorBorder}`},children:ee(It,{children:[ee(Bt,{children:[a("div",{style:{display:"flex",alignItems:"center"},children:l}),a(St,{orientation:"vertical",style:{height:"1.3em",borderColor:"#ebe6e7",marginLeft:15}}),a(ve,{store:n,project:b}),a("div",{style:{paddingLeft:10,maxWidth:200},children:a(wt,{placeholder:P("topbar.editableTextPlaceholder")})}),ee("div",{style:{paddingLeft:16,fontSize:14},className:"text-gray-600",children:[U({px:n.width,unit:n.unit,dpi:n.dpi,precious:0})," x"," ",U({px:n.height,unit:n.unit,dpi:n.dpi,precious:0})," ",n.unit]}),a(Lt,{project:b})]}),a(Ut,{children:a(de,{store:n})})]})})});export{yo as Topbar};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ydesign/react-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "设计编辑器UI组件库,基于react版本",
|
|
5
5
|
"main": "dist/app.js",
|
|
6
6
|
"module": "dist/app.js",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"tailwind-merge": "^3.3.1",
|
|
121
121
|
"tailwindcss": "^4.1.17",
|
|
122
122
|
"tw-animate-css": "^1.4.0",
|
|
123
|
-
"@ydesign/core": "^0.0.
|
|
123
|
+
"@ydesign/core": "^0.0.9"
|
|
124
124
|
},
|
|
125
125
|
"browserslist": [
|
|
126
126
|
"> 0.5%",
|
|
File without changes
|
package/dist/canvas/hotkeys.d.ts
DELETED
package/dist/canvas/hotkeys.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunk-O2XFH626.js";var o=()=>{console.log("handleHotkeys")};export{o as handleHotkeys};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { StoreType } from '../model/store.js';
|
|
3
|
-
import 'fabric';
|
|
4
|
-
import 'mobx-state-tree/dist/internal';
|
|
5
|
-
import 'mobx-state-tree';
|
|
6
|
-
import '@ydesign/core';
|
|
7
|
-
import '../utils/fonts.js';
|
|
8
|
-
import 'mobx';
|
|
9
|
-
|
|
10
|
-
type WorkspaceProps = {
|
|
11
|
-
store: StoreType;
|
|
12
|
-
components?: any;
|
|
13
|
-
};
|
|
14
|
-
declare const WorkspaceCanvas: ({ store }: WorkspaceProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
-
declare const _default: (({ store }: WorkspaceProps) => react_jsx_runtime.JSX.Element) & {
|
|
16
|
-
displayName: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export { WorkspaceCanvas, type WorkspaceProps, _default as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"../chunk-XA2G4P2Q.js";import"../chunk-O2XFH626.js";export{a as WorkspaceCanvas,b as default};
|
package/dist/chunk-2A3HHQ7X.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-IUFYYEGO.js";import{c as t}from"./chunk-YCFED7XQ.js";import{Trash2 as i}from"lucide-react";import{Tooltip as l,Button as s}from"antd";import{observer as n}from"mobx-react-lite";import{jsx as o}from"react/jsx-runtime";var T=n(({store:r})=>{let{disabled:m,remove:p}=e({store:r});return o(l,{title:t("toolbar.removeElements"),placement:"bottom",children:o(s,{type:"text",styles:{root:{padding:"0 7px"}},disabled:m,onClick:()=>{p()},children:o(i,{size:16})})})});export{T as a};
|
package/dist/chunk-2T3O5ZZ2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o}from"./chunk-YCFED7XQ.js";import{observer as r}from"mobx-react-lite";import{Popover as e,Button as i}from"antd";import{Pencil as p}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var a=r(()=>t(e,{trigger:"click",content:t("div",{children:"AI write"}),children:t(i,{type:"text",icon:t(p,{size:16,style:{display:"flex"}}),styles:{root:{padding:"0 7px"}},children:o("toolbar.aiText.aiWrite")})}));export{a};
|
package/dist/chunk-3TO57JPN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function s(o){return new Promise((t,r)=>{let h=new Image;h.onload=()=>{t({width:h.width,height:h.height})},h.onerror=()=>{r(new Error("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25"))},h.src=o,h.crossOrigin="anonymous"})}function w(o,t){let r=o.width/o.height,h=t.width/t.height,n,e;r>=h?(n=t.width,e=t.width/r):(n=t.height*r,e=t.height);let i=(t.width-n)/2,c=(t.height-e)/2;return{cropX:i,cropY:c,width:n,height:e}}export{s as a,w as b};
|
package/dist/chunk-4HH3B3W3.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import r from"styled-components";import{jsx as e,jsxs as p}from"react/jsx-runtime";var d=r.div`
|
|
2
|
-
width: 100%;
|
|
3
|
-
min-width: 78px;
|
|
4
|
-
height: 72px;
|
|
5
|
-
padding-top: 15px;
|
|
6
|
-
padding-left: 5px;
|
|
7
|
-
padding-right: 5px;
|
|
8
|
-
text-align: center;
|
|
9
|
-
font-size: 12px;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
white-space: pre;
|
|
12
|
-
|
|
13
|
-
.bp5-dark &:hover,
|
|
14
|
-
.bp5-dark &.active {
|
|
15
|
-
color: #48aff0 !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// 这个看到时候可不可以用 变量来实现,需要让用户能配置
|
|
19
|
-
&:hover,
|
|
20
|
-
&.active {
|
|
21
|
-
background-color: rgba(22, 119, 255, 0.3);
|
|
22
|
-
}
|
|
23
|
-
`,l=({children:i,name:n,iconSize:t,onClick:a,active:o})=>p(d,{className:`design-side-panel-tab ${o?"active":""}`,onClick:a,children:[e("div",{style:{fontSize:t||14},children:i}),e("div",{style:{paddingTop:3,userSelect:"none"},children:n})]});export{l as a};
|
package/dist/chunk-4LUZF4CB.js
DELETED
package/dist/chunk-5OA2JYPB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l}from"./chunk-YCFED7XQ.js";import{Layers as x}from"lucide-react";import{Popover as m,Button as n,Divider as a}from"antd";import{observer as v}from"mobx-react-lite";import{ChevronUp as b,ChevronsUp as g,ChevronDown as y,ChevronsDown as k,AlignStartVertical as w,AlignCenterVertical as f,AlignEndVertical as u,AlignStartHorizontal as z,AlignCenterHorizontal as C,AlignEndHorizontal as B,AlignVerticalSpaceAround as h,AlignHorizontalSpaceAround as E}from"lucide-react";import{Fragment as d,jsx as t,jsxs as o}from"react/jsx-runtime";var S=v(({store:e})=>{let p=e.selectedElements.length>0,i=e.selectedElementsIds,s=e.selectedElements.every(r=>r?.locked),c=!s&&e.selectedElements.length>1;return t(m,{styles:{container:{padding:"10px 5px"}},content:o("div",{style:{width:280},children:[t(a,{size:"small",children:l("toolbar.layering")}),o("div",{style:{display:"flex"},children:[o("div",{style:{width:"50%"},children:[t(n,{type:"text",block:!0,icon:t(b,{size:16}),disabled:!e.canMoveElementsUp(i),onClick:()=>{e.moveElementsUp(i)},children:t("span",{className:"w-[70px] text-left text-xs",children:l("toolbar.up")})}),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:l("toolbar.toForward")})})]}),o("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:l("toolbar.down")})}),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:l("toolbar.toBottom")})})]})]}),!s&&o(d,{children:[t(a,{size:"small",children:l("toolbar.position")}),o("div",{style:{display:"flex"},children:[o("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:l("toolbar.alignLeft")})}),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:l("toolbar.alignCenter")})}),t(n,{type:"text",block:!0,icon:t(u,{size:16}),onClick:()=>{e.editor?.alignmentHandler.alignRight()},children:t("span",{className:"w-[70px] text-left text-xs",children:l("toolbar.alignRight")})})]}),o("div",{style:{width:"50%"},children:[t(n,{type:"text",block:!0,icon:t(z,{size:16}),onClick:()=>{e.editor?.alignmentHandler.alignTop()},children:t("span",{className:"w-[70px] text-left text-xs",children:l("toolbar.alignTop")})}),t(n,{type:"text",block:!0,icon:t(C,{size:16}),onClick:()=>{e.editor?.alignmentHandler.alignMiddle()},children:t("span",{className:"w-[70px] text-left text-xs",children:l("toolbar.alignMiddle")})}),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:l("toolbar.alignBottom")})})]})]})]}),c&&o(d,{children:[t(a,{size:"small",children:l("toolbar.spaceEvenly")}),o("div",{style:{display:"flex"},children:[t("div",{style:{width:"50%"},children:t(n,{type:"text",block:!0,icon:t(h,{size:16}),onClick:()=>{e.editor?.alignmentHandler.yequation()},children:t("span",{className:"w-[70px] text-left text-xs",children:l("toolbar.verticalDistribution")})})}),t("div",{style:{width:"50%"},children:t(n,{type:"text",block:!0,icon:t(E,{size:16}),onClick:()=>{e.editor?.alignmentHandler.xequation()},children:t("span",{className:"w-[70px] text-left text-xs",children:l("toolbar.horizontalDistribution")})})})]})]})]}),trigger:"click",placement:"bottom",children:o(n,{type:"text",disabled:!p,styles:{root:{padding:"0 7px"}},children:[t(x,{size:16}),l("toolbar.position")]})})});export{S as a};
|
package/dist/chunk-5X6VER6G.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as g}from"./chunk-4LUZF4CB.js";import{c as n}from"./chunk-YCFED7XQ.js";import{observer as m}from"mobx-react-lite";import{ReactSortable as u}from"react-sortablejs";import{useState as h}from"react";import{findIndex as v}from"es-toolkit/compat";import{Button as y,Card as f,Input as b}from"antd";import{GripVertical as x,Eye as k,EyeClosed as j,LockKeyholeOpen as C,LockKeyhole as H,Trash as E}from"lucide-react";import{jsx as t,jsxs as c}from"react/jsx-runtime";var T=m(({element:e,store:o})=>{let[r,i]=h(!1),a=v(o.selectedElements,d=>d?.id===e?.id)>=0,p=r?e.name||"":e.name||g(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?[...o.selectedElements]:[];v(s,l=>l.id===e.id)<0&&(s.push(e),o.selectElements(s.map(l=>l.id)),o.editor?.objectsHandler.selectElements(s))},children:c("div",{style:{display:"flex",justifyContent:"space-between"},children:[c("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(b,{style:{minWidth:130},placeholder:n("sidePanel.namePlaceholder"),value:p,onFocus:()=>{i(!0)},onBlur:()=>{i(!1)},onChange:d=>{o.editor?.objectsHandler.update({name:d.target.value},e.id),o._triggerUpdate()}})})]}),c("div",{children:[t(y,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{o.editor?.objectsHandler.update({visible:!e.visible},e.id),o._triggerUpdate()},children:e.visible?t(k,{size:16}):t(j,{size:16})}),t(y,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{e?.lockMovementX?o.editor?.lockHandler.unlock(e.id):o.editor?.lockHandler.lock(e.id)},children:e.lockMovementX?t(H,{size:16}):t(C,{size:16})}),t(y,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{o.editor?.objectsHandler.remove(e.id)},children:t(E,{size:16})})]})]})})}),w=m(({store:e})=>{let r=e.objects.map(i=>({id:i.id,name:i.name,type:i.type,visible:i.visible,lockMovementX:i.lockMovementX})).filter(i=>i.id!=="workarea");return r.reverse(),c("div",{style:{height:"100%",overflow:"auto"},children:[t("div",{style:{height:40,paddingTop:5},children:n("sidePanel.layersTip")}),t("div",{children:r.length===0?t("div",{children:n("sidePanel.noLayers")}):null}),t(u,{list:r,direction:"horizontal",setList:i=>{i.forEach((a,p)=>{let d=i.length-p;v(e.objects,l=>l.id===a.id)!==d&&(e.editor?.layerHandler.updateLayerOrderByTargetIndex(d,!0,a),e._triggerUpdate(),e.editor?.historyHandler.saveDebounced("update"))})},children:r.map(i=>t(T,{element:i,store:e},i.id))})]})});export{w as a};
|
package/dist/chunk-62YF5KTO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as x}from"./chunk-YVBVDUVA.js";import{a as u}from"./chunk-RVXI723F.js";import{a as m,b as w}from"./chunk-YRJUN267.js";import{c as k}from"./chunk-YCFED7XQ.js";import{cssGradient2FabricGradient as F}from"@ydesign/core";import{observer as f}from"mobx-react-lite";import{useState as P,useRef as y,useMemo as B}from"react";import{ColorPicker as S,Popover as j,Button as g,InputNumber as b,Slider as W}from"antd";import{Logs as A,Ban as D}from"lucide-react";import{Fragment as U,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):"",H=f(({store:r,elements:t})=>{let o=t[0],[c,d]=P(()=>u(o.fill)),a=y(!1),s=y(n(o.fill)),p=n(o.fill);p!==s.current&&!a.current&&(s.current=p,d(u(o.fill)));let v=B(()=>c,[n(c)]);return e(S,{value:v,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 C=F(l);r.editor?.objectsHandler.update({fill:C})}else r.editor?.objectsHandler.update({fill:l})}})}),R=f(({store:r,element:t})=>e(j,{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(D,{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:k("toolbar.strokeWidth")}),e("div",{children:e(b,{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(W,{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(U,{children:[h("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:15,paddingBottom:5},children:[e("div",{children:k("toolbar.cornerRadius")}),e("div",{children:e(b,{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(W,{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(A,{size:16,style:{display:"flex"}}),children:k("toolbar.strokeSettings")})})),M=f(({store:r,elements:t})=>{let o=t[0],[c,d]=P(()=>u(o?.stroke)),a=y(!1),s=y(n(o?.stroke)),p=n(o?.stroke);p!==s.current&&!a.current&&(s.current=p,d(u(o?.stroke)));let v=B(()=>c,[n(c)]);return o?.strokeWidth?e(S,{value:v,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 C=F(l);r.editor?.objectsHandler.update({stroke:C})}else r.editor?.objectsHandler.update({stroke:l})}}):null}),_={FigureFill:H,FigureStroke:M,FigureSettings:R,FigureFilters:x},z=f(({store:r,components:t})=>{let o=r.selectedElements[0],d=m({type:"figure",usedItems:["FigureFill","FigureStroke","FigureSettings","FigureFilters"],components:t});return e(w,{items:d,itemRender:a=>{let s=t[a]||_[a];return s&&e(s,{elements:r.selectedElements,element:o,store:r},a)}})});export{n as a,H as b,R as c,M as d,z as e};
|
package/dist/chunk-75WC3GVB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useCallback as l}from"react";var k=({store:e})=>{let c=e.selectedShapes.length>0,o=e.selectedShapes[0]?.locked;return{disabled:!c,lock:l(()=>{e.editor?.lockHandler.lock()},[o,e]),unlock:l(()=>{e.editor?.lockHandler.unlock()},[o,e]),locked:o}};export{k as a};
|
package/dist/chunk-7NNOHYKX.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var P=({width:t,height:e,cornerRadius:r=0})=>{if(r>0){let a=Math.min(r,t/2,e/2);return`M 0 ${a} A ${a} ${a} 0 0 1 ${a} 0 L ${t-a} 0 A ${a} ${a} 0 0 1 ${t} ${a} L ${t} ${e-a} A ${a} ${a} 0 0 1 ${t-a} ${e} L ${a} ${e} A ${a} ${a} 0 0 1 0 ${e-a} Z`}return`M 0 0 L ${t} 0 L ${t} ${e} L 0 ${e} Z`},p=({width:t,height:e})=>{let r=t/2,a=e/2;return`M ${r} ${a} m -${r}, 0 a ${r},${a} 0 1,0 ${t},0 a ${r},${a} 0 1,0 -${t},0`};function m({width:t,height:e}){let r=t/2,a=e/2,o=t/2,c=e/2,$=o/2,h=c/2,s="",i=Math.PI/5;for(let n=0;n<10;n++){let u=n%2==0?c:h,l=r+(n%2==0?o:$)*Math.sin(n*i),g=a-u*Math.cos(n*i);n===0?s=`M ${l} ${g}`:s+=` L ${l} ${g}`}return s+" Z"}var d=({width:t,height:e})=>`M ${t/2} 0 L ${t} ${e} L 0 ${e} Z`,f=({width:t,height:e})=>`M 0 0 L ${t} 0 L 0 ${e} Z`;function M({width:t,height:e}){let r=t/2,a=e/2;return`M ${r} 0 L ${t} ${a} L ${r} ${e} L 0 ${a} Z`}function L({width:t,height:e}){let r=t/2,a=e/2,o=t/2,c=e/2,$="",h=2*Math.PI/5;for(let s=0;s<5;s++){let i=c,n=r+o*Math.sin(s*h),u=a-i*Math.cos(s*h);s===0?$=`M ${n} ${u}`:$+=` L ${n} ${u}`}return $+" Z"}function x({width:t,height:e}){let r=t/2,a=e/2,o=t/2,c=e/2,$="",h=2*Math.PI/6;for(let s=0;s<6;s++){let i=c,n=r+o*Math.sin(s*h),u=a-i*Math.cos(s*h);s===0?$=`M ${n} ${u}`:$+=` L ${n} ${u}`}return $+" Z"}function b({width:t,height:e}){let r=.1*Math.min(t,e),a=.2*t,o=.2*e,c=.5*t,$=`M ${r},0`;return $+=" H "+(t-r),$+=` A ${r},${r} 0 0 1 ${t},${r}`,$+=" V "+(e-r-o),$+=` A ${r},${r} 0 0 1 ${t-r},${e-o}`,$+=` H ${c+a/2}`,$+=` L ${c},${e}`,$+=` L ${c-a/2},${e-o}`,$+=` H ${r}`,$+=` A ${r},${r} 0 0 1 0,${e-r-o}`,$+=` V ${r}`,$+=` A ${r},${r} 0 0 1 ${r},0`,$+=" Z",$}function S({width:t,height:e}){let r=.3*t,a=.3*e,o=t/2,c=e/2,$=o-r/2,h=o+r/2,s=c-a/2,i=c+a/2,n=`M ${$},0 `;return n+=`H ${h} `,n+=`V ${s} `,n+=`H ${t} `,n+=`V ${i} `,n+=`H ${h} `,n+=`V ${e} `,n+=`H ${$} `,n+=`V ${i} `,n+="H 0 ",n+=`V ${s} `,n+=`H ${$} `,n+="V 0 ",n+="Z",n}var w={rect:P,circle:p,star:m,triangle:d,rightTriangle:f,diamond:M,pentagon:L,hexagon:x,speechBubble:b,cross:S};function z(t){return w[t]||P}function F(t,e){let{width:r,height:a,fill:o,stroke:c,strokeWidth:$,dash:h}=t,s=(h||[]).map(g=>g*$),i=e(t),n=1,u=1;typeof i!="string"&&(n=i.scaleX,u=i.scaleY,i=i.path);let l=`clip-${t.id||Math.random()}`;return`
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${a}">
|
|
3
|
-
<defs>
|
|
4
|
-
<clipPath id="${l}">
|
|
5
|
-
<path d="${i}" />
|
|
6
|
-
</clipPath>
|
|
7
|
-
</defs>
|
|
8
|
-
|
|
9
|
-
<!-- Path for the fill -->
|
|
10
|
-
<path d="${i}" fill="${o}" transform="scale(${n}, ${u})"/>
|
|
11
|
-
|
|
12
|
-
<!-- Path for the stroke, clipped by the star path -->
|
|
13
|
-
<path d="${i}" fill="none" stroke="${c}" stroke-width="${2*$}" clip-path="url(#${l})" transform="scale(${n}, ${u})" stroke-dasharray="${s.join(" ")}"/>
|
|
14
|
-
</svg>
|
|
15
|
-
`}function y(t){let{subType:e}=t,r=z(e);return r?F(t,r):(console.error(`error: Can not convert ${e} figure to svg.`),P(t))}export{P as a,p as b,m as c,d,f as e,M as f,L as g,x as h,b as i,S as j,w as k,y as l};
|
package/dist/chunk-A7SUGNOW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-OPXS6VQ6.js";import{c as n}from"./chunk-YCFED7XQ.js";import{Dropdown as m,Button as u,Modal as d}from"antd";import{Menu as y,Plus as f,Languages as h,Check as s}from"lucide-react";import{useState as k}from"react";import{observer as b}from"mobx-react-lite";import{Fragment as C,jsx as e,jsxs as S}from"react/jsx-runtime";var{confirm:w}=d,D=b(({store:a,project:o})=>{let[g,r]=k(!1),c=[{label:n("topbar.newDesign"),key:"new_design",icon:e(f,{size:16})},{label:n("topbar.language"),key:"language",icon:e("div",{style:{height:22,display:"flex",alignItems:"center"},children:e(h,{size:16})}),children:[{key:"en",label:"English",onClick:()=>{o.setLanguage("en")},extra:o.language==="en"?e(s,{size:16}):null},{key:"zh",label:"\u4E2D\u6587",onClick:()=>{o.setLanguage("zh")},extra:o.language==="zh"?e(s,{size:16}):null}]}];return S(C,{children:[e(m,{menu:{items:c,onClick:({key:t})=>{t==="new_design"&&r(!0)}},trigger:["click"],styles:{root:{width:188}},children:e(u,{type:"text",children:e(y,{size:16})})}),e(l,{visible:g,onClose:()=>r(!1),onConfirm:t=>{w({title:"\u521B\u5EFA\u8BBE\u8BA1\u540E\uFF0C\u5C06\u65B0\u5EFA\u753B\u5E03\uFF0C\u5F53\u524D\u6D77\u62A5\u5185\u5BB9\u53EF\u5728\u4F5C\u56FE\u8BB0\u5F55\u4E2D\u67E5\u770B\u3002",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk(){console.log("OK"),console.log("size ---> ",t);let p=JSON.stringify({bg:{backgroundColor:t.bgColor}}),i=new URLSearchParams({create:"",createEmptyPoster:"true",createInfo:p,height:String(t.height),unit:t.unit,width:String(t.width)});console.log("params \u7684\u53C2\u6570 ---> ",i.toString()),console.log("\u9700\u8981\u8DF3\u8F6C\u7684\u7F16\u8F91\u5668\u5730\u5740",o.urls.editorUrl),window.open(`${o.urls.editorUrl}?${i.toString()}`,"_blank")}})},store:a,project:o})]})});export{D as a};
|
package/dist/chunk-AC6CCGZH.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e}from"./chunk-YCFED7XQ.js";import{Button as m,Modal as s}from"antd";import{useState as n,useEffect as d}from"react";import{observer as c}from"mobx-react-lite";import{Fragment as p,jsx as r,jsxs as u}from"react/jsx-runtime";var g=c(({isOpen:a,onClose:t,element:o})=>{let[l,i]=n(o.getSrc());return d(()=>{i(o.getSrc())},[o.id]),r(s,{title:e("toolbar.removeBackgroundTitle"),open:a,onOk:t,onCancel:t,width:{xs:"90%",sm:"80%",md:"70%",lg:"60%",xl:"50%",xxl:"40%"},styles:{body:{padding:"35px 0"}},okText:e("toolbar.confirmRemoveBackground"),cancelText:e("toolbar.cancelRemoveBackground"),children:r("img",{src:l,style:{width:"100%",maxHeight:"400px",objectFit:"contain"}})})}),v=c(({element:a})=>{let[t,o]=n(!1);return u(p,{children:[r(m,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>o(!0),children:e("toolbar.removeBackground")}),r(g,{isOpen:t,onClose:()=>o(!1),element:a})]})});export{v as a};
|
package/dist/chunk-CB23VFSC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(n){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(n)))}export{e as a};
|
package/dist/chunk-DGCF2GDA.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk-MXZ6RXT3.js";import{b as l}from"./chunk-TZ6B7XDS.js";import{c as s}from"./chunk-YCFED7XQ.js";import{observer as d}from"mobx-react-lite";import{jsx as e,jsxs as i}from"react/jsx-runtime";var y=d(({store:a})=>{let n=t=>{a.editor?.objectsHandler.createPathElement(t.path)},c=t=>{a.editor?.objectsHandler.createShapeElement(t.type)};return i("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,m)=>i("div",{className:"category",children:[e("div",{className:r("category-name","text-base px-2 mt-2"),children:s("sidePanel.shapes")},t.name),e("div",{className:r("shape-list","flex flex-wrap content-start mb-2"),children:t.children.map((o,p)=>e("div",{className:r("shape-item","w-[25%] h-0 pb-[25%] relative cursor-pointer shrink-0 mb-[1.2%]"),onClick:()=>{o.type?c(o):n(o)},children:e("div",{className:r("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"})})})})},p))})]},m))]})});export{y as a};
|
package/dist/chunk-HHYPIHAP.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./chunk-POCSL7OS.js";import{c as o}from"./chunk-YCFED7XQ.js";import{Input as i}from"antd";import{observer as r}from"mobx-react-lite";import{jsx as l,jsxs as f}from"react/jsx-runtime";var s=[{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:n}=i,u=r(({store:a})=>f("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[l("div",{style:{padding:"0 4px",marginBottom:10},children:l(n,{placeholder:o("sidePanel.searchPlaceholder")})}),l(t,{shadowEnabled:!1,images:s,getPreview:e=>e.thumb,isLoading:!1,error:!1,onSelect:e=>{console.log("args ---> ",e),a.loadJSON(e.content)}})]}));export{u as a};
|
package/dist/chunk-IUFYYEGO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useCallback as r}from"react";var n=({store:e})=>{let t=e.selectedElements.filter(o=>!o?.locked),l=r(()=>{e.deleteElements(t.map(o=>o.id))},[e,t]);return{disabled:!t.length,remove:l}};export{n as a};
|