@ydesign/react-editor 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/dist/app.css +1 -1
  2. package/dist/app.js +1 -1
  3. package/dist/canvas/workspace.d.ts +6 -4
  4. package/dist/canvas/workspace.js +1 -1
  5. package/dist/chunk-2AZQIJ4K.js +1 -0
  6. package/dist/chunk-45NWLCOP.js +15 -0
  7. package/dist/chunk-63A6RW6Y.js +21 -0
  8. package/dist/chunk-6XGFXDKJ.js +151 -0
  9. package/dist/chunk-EUTDQZKU.js +1 -0
  10. package/dist/chunk-KERQXVBL.js +1 -0
  11. package/dist/chunk-QALZ5CAJ.js +214 -0
  12. package/dist/{chunk-7YLSIB43.js → chunk-RBRSKAZL.js} +1 -1
  13. package/dist/chunk-YBC2DYJX.js +9 -0
  14. package/dist/config.d.ts +228 -3
  15. package/dist/config.js +1 -1
  16. package/dist/model/store.d.ts +5 -364
  17. package/dist/model/store.js +1 -1
  18. package/dist/project.d.ts +12 -4
  19. package/dist/project.js +1 -1
  20. package/dist/side-panel/index.d.ts +2 -5
  21. package/dist/side-panel/index.js +1 -1
  22. package/dist/side-panel/side-panel.d.ts +12 -6
  23. package/dist/side-panel/side-panel.js +1 -1
  24. package/dist/store-DfmY1m2j.d.ts +379 -0
  25. package/dist/toolbar/download-button.d.ts +1 -3
  26. package/dist/toolbar/download-button.js +1 -1
  27. package/dist/toolbar/toolbar.d.ts +1 -3
  28. package/dist/toolbar/toolbar.js +18 -1
  29. package/dist/toolbar/zoom-buttons.d.ts +1 -3
  30. package/dist/topbar/create-design.d.ts +1 -3
  31. package/dist/topbar/create-design.js +1 -1
  32. package/dist/topbar/topbar.d.ts +1 -3
  33. package/dist/topbar/topbar.js +5 -5
  34. package/package.json +2 -2
  35. package/dist/assets/logo.d.ts +0 -7
  36. package/dist/assets/logo.js +0 -1
  37. package/dist/canvas/context-menu/context-menu.d.ts +0 -2
  38. package/dist/canvas/context-menu/context-menu.js +0 -0
  39. package/dist/canvas/hotkeys.d.ts +0 -3
  40. package/dist/canvas/hotkeys.js +0 -1
  41. package/dist/canvas/workspace-canvas.d.ts +0 -19
  42. package/dist/canvas/workspace-canvas.js +0 -1
  43. package/dist/chunk-2A3HHQ7X.js +0 -1
  44. package/dist/chunk-2T3O5ZZ2.js +0 -1
  45. package/dist/chunk-3TO57JPN.js +0 -1
  46. package/dist/chunk-4LUZF4CB.js +0 -2
  47. package/dist/chunk-5CKXOQAT.js +0 -1
  48. package/dist/chunk-5OA2JYPB.js +0 -1
  49. package/dist/chunk-5X6VER6G.js +0 -1
  50. package/dist/chunk-62YF5KTO.js +0 -1
  51. package/dist/chunk-75WC3GVB.js +0 -1
  52. package/dist/chunk-7NNOHYKX.js +0 -15
  53. package/dist/chunk-AC6CCGZH.js +0 -1
  54. package/dist/chunk-BE3YOONJ.js +0 -1
  55. package/dist/chunk-BWST6EER.js +0 -1
  56. package/dist/chunk-CB23VFSC.js +0 -1
  57. package/dist/chunk-DGCF2GDA.js +0 -9
  58. package/dist/chunk-ESNVOB52.js +0 -17
  59. package/dist/chunk-HHYPIHAP.js +0 -45
  60. package/dist/chunk-HOAYYKAZ.js +0 -3
  61. package/dist/chunk-IUFYYEGO.js +0 -1
  62. package/dist/chunk-IV52R7D7.js +0 -27
  63. package/dist/chunk-J6PYM4EV.js +0 -1
  64. package/dist/chunk-JHNSYFB2.js +0 -151
  65. package/dist/chunk-JMIN2XMC.js +0 -1
  66. package/dist/chunk-JPIYZYMQ.js +0 -1
  67. package/dist/chunk-KVT25LDU.js +0 -1
  68. package/dist/chunk-MGTFIE3C.js +0 -1
  69. package/dist/chunk-NLABIDJ5.js +0 -1
  70. package/dist/chunk-O56ZNYGR.js +0 -1
  71. package/dist/chunk-O73AAP2K.js +0 -1
  72. package/dist/chunk-OQ6HU62L.js +0 -1
  73. package/dist/chunk-P5I43V7X.js +0 -1
  74. package/dist/chunk-POCSL7OS.js +0 -50
  75. package/dist/chunk-PSO4W6J7.js +0 -9
  76. package/dist/chunk-QVSJHU2S.js +0 -1
  77. package/dist/chunk-QWM7VMLQ.js +0 -9
  78. package/dist/chunk-SGK2XN5D.js +0 -1
  79. package/dist/chunk-T3TEB73P.js +0 -1
  80. package/dist/chunk-TS5CKDHH.js +0 -1
  81. package/dist/chunk-TTK5Z2Z6.js +0 -1
  82. package/dist/chunk-TZ6B7XDS.js +0 -1
  83. package/dist/chunk-U7TPE4R3.js +0 -54
  84. package/dist/chunk-UCJMXWVT.js +0 -16
  85. package/dist/chunk-WCHGSVUC.js +0 -8
  86. package/dist/chunk-WJT6VPDR.js +0 -9
  87. package/dist/chunk-XA2G4P2Q.js +0 -1
  88. package/dist/chunk-XRRO2RT7.js +0 -1
  89. package/dist/chunk-YCJBBRRT.js +0 -1
  90. package/dist/chunk-YRJUN267.js +0 -14
  91. package/dist/chunk-YVBVDUVA.js +0 -1
  92. package/dist/chunk-Z4QXUZAS.js +0 -1
  93. package/dist/hooks/use-duplicate-element.d.ts +0 -16
  94. package/dist/hooks/use-duplicate-element.js +0 -1
  95. package/dist/hooks/use-lock.d.ts +0 -18
  96. package/dist/hooks/use-lock.js +0 -1
  97. package/dist/hooks/use-remove-element.d.ts +0 -16
  98. package/dist/hooks/use-remove-element.js +0 -1
  99. package/dist/lib/utils.d.ts +0 -5
  100. package/dist/lib/utils.js +0 -1
  101. package/dist/side-panel/background-panel.d.ts +0 -17
  102. package/dist/side-panel/background-panel.js +0 -1
  103. package/dist/side-panel/images-grid.d.ts +0 -27
  104. package/dist/side-panel/images-grid.js +0 -1
  105. package/dist/side-panel/layers-panel.d.ts +0 -16
  106. package/dist/side-panel/layers-panel.js +0 -1
  107. package/dist/side-panel/photos-panel.d.ts +0 -16
  108. package/dist/side-panel/photos-panel.js +0 -1
  109. package/dist/side-panel/shapes-panel.d.ts +0 -16
  110. package/dist/side-panel/shapes-panel.js +0 -1
  111. package/dist/side-panel/size-panel.d.ts +0 -16
  112. package/dist/side-panel/size-panel.js +0 -1
  113. package/dist/side-panel/tab-button.d.ts +0 -12
  114. package/dist/side-panel/tab-button.js +0 -1
  115. package/dist/side-panel/templates-panel.d.ts +0 -16
  116. package/dist/side-panel/templates-panel.js +0 -1
  117. package/dist/side-panel/text-panel.d.ts +0 -16
  118. package/dist/side-panel/text-panel.js +0 -1
  119. package/dist/side-panel/upload-panel.d.ts +0 -17
  120. package/dist/side-panel/upload-panel.js +0 -1
  121. package/dist/toolbar/default-toolbar.d.ts +0 -21
  122. package/dist/toolbar/default-toolbar.js +0 -1
  123. package/dist/toolbar/duplicate-button.d.ts +0 -16
  124. package/dist/toolbar/duplicate-button.js +0 -1
  125. package/dist/toolbar/element-container.d.ts +0 -13
  126. package/dist/toolbar/element-container.js +0 -1
  127. package/dist/toolbar/figure-toolbar.d.ts +0 -33
  128. package/dist/toolbar/figure-toolbar.js +0 -1
  129. package/dist/toolbar/filters-picker.d.ts +0 -18
  130. package/dist/toolbar/filters-picker.js +0 -1
  131. package/dist/toolbar/flip-button.d.ts +0 -18
  132. package/dist/toolbar/flip-button.js +0 -1
  133. package/dist/toolbar/group-button.d.ts +0 -16
  134. package/dist/toolbar/group-button.js +0 -1
  135. package/dist/toolbar/history-buttons.d.ts +0 -16
  136. package/dist/toolbar/history-buttons.js +0 -1
  137. package/dist/toolbar/image-eraser-pen.d.ts +0 -10
  138. package/dist/toolbar/image-eraser-pen.js +0 -1
  139. package/dist/toolbar/image-remove-background.d.ts +0 -10
  140. package/dist/toolbar/image-remove-background.js +0 -1
  141. package/dist/toolbar/image-toolbar.d.ts +0 -36
  142. package/dist/toolbar/image-toolbar.js +0 -1
  143. package/dist/toolbar/lock-button.d.ts +0 -16
  144. package/dist/toolbar/lock-button.js +0 -1
  145. package/dist/toolbar/many-toolbar.d.ts +0 -5
  146. package/dist/toolbar/many-toolbar.js +0 -1
  147. package/dist/toolbar/opacity-picker.d.ts +0 -16
  148. package/dist/toolbar/opacity-picker.js +0 -1
  149. package/dist/toolbar/position-picker.d.ts +0 -16
  150. package/dist/toolbar/position-picker.js +0 -1
  151. package/dist/toolbar/remove-button.d.ts +0 -16
  152. package/dist/toolbar/remove-button.js +0 -1
  153. package/dist/toolbar/text-ai-write.d.ts +0 -7
  154. package/dist/toolbar/text-ai-write.js +0 -1
  155. package/dist/toolbar/text-toolbar.d.ts +0 -19
  156. package/dist/toolbar/text-toolbar.js +0 -1
  157. package/dist/topbar/file-menu.d.ts +0 -19
  158. package/dist/topbar/file-menu.js +0 -1
  159. package/dist/topbar/psd-parser.d.ts +0 -9
  160. package/dist/topbar/psd-parser.js +0 -1
  161. package/dist/utils/api.d.ts +0 -15
  162. package/dist/utils/api.js +0 -1
  163. package/dist/utils/blob.d.ts +0 -5
  164. package/dist/utils/blob.js +0 -1
  165. package/dist/utils/download.d.ts +0 -3
  166. package/dist/utils/download.js +0 -1
  167. package/dist/utils/figure-to-svg.d.ts +0 -36
  168. package/dist/utils/figure-to-svg.js +0 -1
  169. package/dist/utils/file.d.ts +0 -3
  170. package/dist/utils/file.js +0 -1
  171. package/dist/utils/filters.d.ts +0 -2
  172. package/dist/utils/filters.js +0 -0
  173. package/dist/utils/fonts.d.ts +0 -68
  174. package/dist/utils/fonts.js +0 -1
  175. package/dist/utils/image.d.ts +0 -19
  176. package/dist/utils/image.js +0 -1
  177. package/dist/utils/l10n.d.ts +0 -227
  178. package/dist/utils/l10n.js +0 -1
  179. package/dist/utils/loader.d.ts +0 -6
  180. package/dist/utils/loader.js +0 -1
  181. package/dist/utils/screen.d.ts +0 -6
  182. package/dist/utils/screen.js +0 -1
  183. package/dist/utils/svg.d.ts +0 -3
  184. package/dist/utils/svg.js +0 -1
  185. package/dist/utils/text.d.ts +0 -3
  186. package/dist/utils/text.js +0 -1
  187. package/dist/utils/use-api.d.ts +0 -2
  188. package/dist/utils/use-api.js +0 -0
  189. package/dist/utils/use-axios.d.ts +0 -25
  190. package/dist/utils/use-axios.js +0 -1
  191. /package/dist/{chunk-MXZ6RXT3.js → chunk-EWOU5F3O.js} +0 -0
  192. /package/dist/{chunk-YCFED7XQ.js → chunk-WFMCGQ5V.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as y}from"../chunk-BWST6EER.js";import"../chunk-JHNSYFB2.js";import"../chunk-5CKXOQAT.js";import"../chunk-NLABIDJ5.js";import{a as f}from"../chunk-7YLSIB43.js";import"../chunk-QVSJHU2S.js";import"../chunk-P5I43V7X.js";import{b as n}from"../chunk-5C2MNUBC.js";import"../chunk-MXZ6RXT3.js";import"../chunk-BE3YOONJ.js";import{c as i}from"../chunk-YCFED7XQ.js";import{b as c}from"../chunk-SGK2XN5D.js";import"../chunk-WJT6VPDR.js";import{a as m}from"../chunk-MGTFIE3C.js";import"../chunk-O2XFH626.js";import a from"styled-components";import{observer as v}from"mobx-react-lite";import{Input as h,Tooltip as b,Button as N,theme as w,Divider as T}from"antd";import{CloudUpload as x,Loader as C,Check as L}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";var k=a("div")`
1
+ import{a as u}from"../chunk-6XGFXDKJ.js";import{c as f}from"../chunk-2AZQIJ4K.js";import"../chunk-KERQXVBL.js";import"../chunk-YBC2DYJX.js";import"../chunk-EWOU5F3O.js";import{b as c}from"../chunk-5C2MNUBC.js";import"../chunk-EUTDQZKU.js";import{a as y}from"../chunk-RBRSKAZL.js";import{c as n}from"../chunk-WFMCGQ5V.js";import"../chunk-O2XFH626.js";import d from"styled-components";import{observer as k}from"mobx-react-lite";import{Dropdown as T,Button as L,Modal as N}from"antd";import{Menu as S,Plus as P,Languages as z,Check as h}from"lucide-react";import{useState as I}from"react";import{observer as B}from"mobx-react-lite";import{Fragment as M,jsx as i,jsxs as O}from"react/jsx-runtime";var{confirm:D}=N,x=B(({store:o,project:t})=>{let[l,a]=I(!1),s=[{label:n("topbar.newDesign"),key:"new_design",icon:i(P,{size:16})},{label:n("topbar.language"),key:"language",icon:i("div",{style:{height:22,display:"flex",alignItems:"center"},children:i(z,{size:16})}),children:[{key:"en",label:"English",onClick:()=>{t.setLanguage("en")},extra:t.language==="en"?i(h,{size:16}):null},{key:"zh",label:"\u4E2D\u6587",onClick:()=>{t.setLanguage("zh")},extra:t.language==="zh"?i(h,{size:16}):null}]}];return O(M,{children:[i(T,{menu:{items:s,onClick:({key:r})=>{r==="new_design"&&a(!0)}},trigger:["click"],styles:{root:{width:188}},children:i(L,{type:"text",children:i(S,{size:16})})}),i(u,{visible:l,onClose:()=>a(!1),onConfirm:r=>{D({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 ---> ",r);let C=JSON.stringify({bg:{backgroundColor:r.bgColor}}),m=new URLSearchParams({create:"",createEmptyPoster:"true",createInfo:C,height:String(r.height),unit:r.unit,width:String(r.width)});console.log("params \u7684\u53C2\u6570 ---> ",m.toString()),console.log("\u9700\u8981\u8DF3\u8F6C\u7684\u7F16\u8F91\u5668\u5730\u5740",t.urls.editorUrl),window.open(`${t.urls.editorUrl}?${m.toString()}`,"_blank")}})},store:o,project:t})]})});import{Input as R,Tooltip as K,Button as U,theme as _,Divider as E}from"antd";import{CloudUpload as v,Loader as F,Check as $}from"lucide-react";var b="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 e,jsxs as g}from"react/jsx-runtime";var j=d("div")`
2
2
  white-space: nowrap;
3
3
  height: 55px;
4
4
  padding: 0 15px;
@@ -11,18 +11,18 @@ import{a as y}from"../chunk-BWST6EER.js";import"../chunk-JHNSYFB2.js";import"../
11
11
  overflow-y: hidden;
12
12
  max-width: 100vw;
13
13
  }
14
- `,R=a("div")`
14
+ `,A=d("div")`
15
15
  @media screen and (max-width: 500px) {
16
16
  display: flex;
17
17
  }
18
- `,B=a("div")`
18
+ `,G=d("div")`
19
19
  float: left;
20
20
  display: flex;
21
21
  align-items: center;
22
22
  height: 55px;
23
- `,I=a("div")`
23
+ `,H=d("div")`
24
24
  float: right;
25
25
  display: flex;
26
26
  align-items: center;
27
27
  height: 55px;
28
- `,g={loading:{icon:t(x,{size:16,style:{display:"flex"}}),textKey:"topbar.statusLoading"},saved:{icon:t(L,{size:16,style:{display:"flex",color:"#52c41a"}}),textKey:"topbar.statusSaved",color:"#52c41a"},"has-changes":{icon:t(x,{size:16,style:{display:"flex",color:"#faad14"}}),textKey:"topbar.statusHasChanges",color:"#faad14"},saving:{icon:t(C,{size:16,style:{display:"flex"}}),textKey:"topbar.statusSaving"}},K=v(({project:e})=>{let o=g[e.status]||g.saved;return t(b,{title:i(o.textKey),children:t(N,{type:"text",style:{marginLeft:14,color:o.color},icon:o.icon,onClick:()=>{(e.status==="loading"||e.status==="saved")&&e.save()},children:i(o.textKey)})})}),A=v(({store:e,logo:o,logoUrl:l})=>{let d=c(),{token:r}=w.useToken(),p=o===void 0?t("img",{src:m,className:"h-[28px]"}):typeof o=="string"?t("img",{src:o,className:"h-[28px]"}):o,u=l?t("a",{href:l,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center"},children:p}):t("div",{style:{display:"flex",alignItems:"center",cursor:"pointer"},onClick:()=>window.history.back(),children:p});return t(k,{className:"topbar",style:{backgroundColor:r.colorBgContainer,color:r.colorText,borderBottom:`1px solid ${r.colorBorder}`},children:s(R,{children:[s(B,{children:[t("div",{style:{display:"flex",alignItems:"center"},children:u}),t(T,{orientation:"vertical",style:{height:"1.3em",borderColor:"#ebe6e7",marginLeft:15}}),t(y,{store:e,project:d}),t("div",{style:{paddingLeft:10,maxWidth:200},children:t(h,{placeholder:i("topbar.editableTextPlaceholder")})}),s("div",{style:{paddingLeft:16,fontSize:14},className:"text-gray-600",children:[n({px:e.width,unit:e.unit,dpi:e.dpi,precious:0})," x"," ",n({px:e.height,unit:e.unit,dpi:e.dpi,precious:0})," ",e.unit]}),t(K,{project:d})]}),t(I,{children:t(f,{store:e})})]})})});export{A as Topbar};
28
+ `,w={loading:{icon:e(v,{size:16,style:{display:"flex"}}),textKey:"topbar.statusLoading"},saved:{icon:e($,{size:16,style:{display:"flex",color:"#52c41a"}}),textKey:"topbar.statusSaved",color:"#52c41a"},"has-changes":{icon:e(v,{size:16,style:{display:"flex",color:"#faad14"}}),textKey:"topbar.statusHasChanges",color:"#faad14"},saving:{icon:e(F,{size:16,style:{display:"flex"}}),textKey:"topbar.statusSaving"}},J=k(({project:o})=>{let t=w[o.status]||w.saved;return e(K,{title:n(t.textKey),children:e(U,{type:"text",style:{marginLeft:14,color:t.color},icon:t.icon,onClick:()=>{(o.status==="loading"||o.status==="saved")&&o.save()},children:n(t.textKey)})})}),ge=k(({store:o,logo:t,logoUrl:l})=>{let a=f(),{token:s}=_.useToken(),p=t===void 0?e("img",{src:b,className:"h-[28px]"}):typeof t=="string"?e("img",{src:t,className:"h-[28px]"}):t,r=l?e("a",{href:l,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center"},children:p}):e("div",{style:{display:"flex",alignItems:"center",cursor:"pointer"},onClick:()=>window.history.back(),children:p});return e(j,{className:"topbar",style:{backgroundColor:s.colorBgContainer,color:s.colorText,borderBottom:`1px solid ${s.colorBorder}`},children:g(A,{children:[g(G,{children:[e("div",{style:{display:"flex",alignItems:"center"},children:r}),e(E,{orientation:"vertical",style:{height:"1.3em",borderColor:"#ebe6e7",marginLeft:15}}),e(x,{store:o,project:a}),e("div",{style:{paddingLeft:10,maxWidth:200},children:e(R,{placeholder:n("topbar.editableTextPlaceholder")})}),g("div",{style:{paddingLeft:16,fontSize:14},className:"text-gray-600",children:[c({px:o.width,unit:o.unit,dpi:o.dpi,precious:0})," x"," ",c({px:o.height,unit:o.unit,dpi:o.dpi,precious:0})," ",o.unit]}),e(J,{project:a})]}),e(H,{children:e(y,{store:o})})]})})});export{ge as Topbar};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ydesign/react-editor",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
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.8"
123
+ "@ydesign/core": "^0.0.9"
124
124
  },
125
125
  "browserslist": [
126
126
  "> 0.5%",
@@ -1,7 +0,0 @@
1
- /**
2
- * 默认 Logo(base64 编码)
3
- * 独立文件存放,避免大字符串污染组件代码
4
- */
5
- declare const DEFAULT_LOGO = "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";
6
-
7
- export { DEFAULT_LOGO };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-MGTFIE3C.js";import"../chunk-O2XFH626.js";export{a as DEFAULT_LOGO};
@@ -1,2 +0,0 @@
1
-
2
- export { }
File without changes
@@ -1,3 +0,0 @@
1
- declare const handleHotkeys: () => void;
2
-
3
- export { handleHotkeys };
@@ -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};
@@ -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};
@@ -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};
@@ -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};
@@ -1,2 +0,0 @@
1
- function r(e=""){return(e=e.replace(/<\/p>/gi,`
2
- `)).replace(/(<([^>]+)>)/gi,"")}export{r as a};
@@ -1 +0,0 @@
1
- import{a as u}from"./chunk-NLABIDJ5.js";import{i as c}from"./chunk-BE3YOONJ.js";import{App as h,Modal as D,Upload as f}from"antd";import{Inbox as S}from"lucide-react";import{useRef as b,useState as v}from"react";import{jsx as r,jsxs as y}from"react/jsx-runtime";var{Dragger:w}=f,R=({visible:m,onClose:g})=>{let{message:t}=h.useApp(),[n,l]=v(!1),s=b(null);return r(D,{width:750,title:"\u4E0A\u4F20 PSD \u6587\u4EF6",open:m,onCancel:()=>{if(n){t.warning("\u6587\u4EF6\u6B63\u5728\u89E3\u6790\u4E2D\uFF0C\u8BF7\u7A0D\u5019...");return}g()},footer:null,mask:{closable:!n},styles:{body:{height:"calc(100% - 40px)",padding:"10px 0 0 0"},container:{height:500}},centered:!0,children:r("div",{style:{height:"100%"},children:y(w,{...{name:"file-psd",multiple:!1,accept:".psd",showUploadList:!1,beforeUpload(e){return e.name.toLowerCase().endsWith(".psd")?!0:(t.error("\u4EC5\u652F\u6301 .psd \u683C\u5F0F\u6587\u4EF6"),f.LIST_IGNORE)},customRequest(e){let{file:a,onSuccess:p,onError:P,onProgress:i}=e;l(!0),s.current=t.loading("PSD \u6587\u4EF6\u89E3\u6790\u4E2D\uFF0C\u8BF7\u7A0D\u5019...",0);let d=new FormData;d.append("file",a),u.post(c(),d,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress(o){o.total&&i&&i({percent:Math.round(o.loaded/o.total*100)})}}).then(o=>{p?.(o)}).catch(o=>{P?.(o)})},onChange(e){let{status:a}=e.file;if(console.log("info",e),a==="done")s.current?.(),s.current=null,l(!1),t.success(`${e.file.name} \u89E3\u6790\u6210\u529F`);else if(a==="error"){s.current?.(),s.current=null,l(!1);let p=e.file.error?.message||"\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5";t.error(p)}}},disabled:n,children:[r("p",{className:"flex items-center justify-center",children:r(S,{size:60})}),r("p",{className:"ant-upload-text",children:n?"\u89E3\u6790\u4E2D...":"\u62D6\u62FD\u6587\u4EF6\u5230\u6B64\u5904\u4E0A\u4F20\u6216\u70B9\u51FB\u4E0A\u4F20"}),r("p",{className:"ant-upload-hint",children:r("a",{href:"https://www.yuque.com/meitumcp/vvtts5/gfv8e5",target:"_blank",onClick:e=>{e.stopPropagation()},children:"PSD\u6587\u4EF6\u5BFC\u5165\u89C4\u8303"})})]})})})};export{R as a};
@@ -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};
@@ -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};
@@ -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};
@@ -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};
@@ -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};
@@ -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};
@@ -1 +0,0 @@
1
- var a="http://219.151.185.37:9003",o=`${a}/api`,s=()=>a+"/api",t={fontList:()=>`${s()}/fonts`,templateList:()=>`${s()}/templates/list`,templateDetail:e=>`${s()}/templates/detail/${e}`,uploadImage:()=>`${s()}/images/upload`,psdParse:()=>`${s()}/psd/parser`},r=()=>t.fontList(),n=()=>t.templateList(),i=e=>t.templateDetail(e),l=()=>t.uploadImage(),g=()=>t.psdParse(),m=(e,p)=>{t[e]=p};export{a,o as b,s as c,t as d,r as e,n as f,i as g,l as h,g as i,m as j};
@@ -1 +0,0 @@
1
- import{a as l}from"./chunk-JHNSYFB2.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};
@@ -1 +0,0 @@
1
- function e(n){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(n)))}export{e as a};
@@ -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};
@@ -1,17 +0,0 @@
1
- import c from"styled-components";import{theme as d}from"antd";import{jsx as e,jsxs as s}from"react/jsx-runtime";var p=c.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
- &:hover,
14
- &.active {
15
- background-color: var(--side-panel-tab-active-bg);
16
- }
17
- `,g=({children:i,name:t,iconSize:n,onClick:a,active:o})=>{let{token:r}=d.useToken();return s(p,{className:`design-side-panel-tab ${o?"active":""}`,onClick:a,style:{"--side-panel-tab-active-bg":r.colorPrimaryBg},children:[e("div",{style:{fontSize:n||14},children:i}),e("div",{style:{paddingTop:3,userSelect:"none"},children:t})]})};export{g as a};
@@ -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};
@@ -1,3 +0,0 @@
1
- import{b as C}from"./chunk-3TO57JPN.js";import{a as T}from"./chunk-CB23VFSC.js";import{a as k}from"./chunk-O73AAP2K.js";import{a as x}from"./chunk-AC6CCGZH.js";import{a as b}from"./chunk-YVBVDUVA.js";import{a as I}from"./chunk-TTK5Z2Z6.js";import{a as p}from"./chunk-MXZ6RXT3.js";import{a as f,b as v}from"./chunk-YRJUN267.js";import{b as u}from"./chunk-TZ6B7XDS.js";import{k as h,l as y}from"./chunk-7NNOHYKX.js";import{c as l}from"./chunk-YCFED7XQ.js";import{observer as g}from"mobx-react-lite";import{Button as m,Tooltip as S,Popover as w}from"antd";import{Crop as F}from"lucide-react";import B from"styled-components";import{jsx as o}from"react/jsx-runtime";var E=Object.keys(h),R=[{width:300,height:300,fill:"lightgray",stroke:"#0c0c0c",strokeWidth:0,url:""}],P=[];E.forEach(t=>{R.forEach(e=>{P.push(Object.assign({subType:t},e))})});P.forEach(t=>{t.url=T(y(t))});var H=B.div`
2
- height: 220px;
3
- `,d={root:{padding:"0 7px"}},U=g(({element:t,store:e})=>{let i=e.editor;return o(m,{type:"text",styles:d,onClick:async()=>{let s=e.width+2*e.bleed,r=e.height+2*e.bleed,a=t.getOriginalSize(),c={width:a.width,height:a.height},n=C({width:s,height:r},c);t.set({cropX:n.cropX,cropY:n.cropY,width:n.width,height:n.height,scaleX:s/n.width,scaleY:r/n.height,left:-e.bleed,top:-e.bleed}),t.setCoords(),i?.customCanvas?.canvas?.requestRenderAll(),i?.historyHandler.save("update")},children:l("toolbar.fitToBackground")})}),L=g(({element:t,store:e})=>o(S,{title:l("toolbar.crop"),children:o(m,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{let i=e.editor?.layerHandler.getLayer();e.editor?.imageCropHandler.cropStart(t,i,t.getSrc())},children:o(F,{size:16})})})),Y=g(({element:t,store:e})=>{let i=u.reduce((r,a)=>r.concat(a.children),[]),s=Math.ceil(i.length/4)||1;return t.clipPath?o(m,{type:"text",styles:d,onClick:()=>{t.set({clipPath:null}),e.editor?.customCanvas?.canvas?.requestRenderAll(),e._triggerUpdate(),e.editor?.historyHandler.save("update")},children:l("toolbar.removeClip")}):o(w,{styles:{container:{padding:"5px 10px"}},content:o("div",{style:{maxHeight:313,overflowY:"auto"},children:o(H,{style:{height:80*s,width:300},children:o("div",{className:p("shape-list","flex flex-wrap content-start mb-2"),children:i.map((r,a)=>o("div",{className:p("shape-item","w-[25%] h-0 pb-[25%] relative cursor-pointer shrink-0 mb-[1.2%]"),onClick:()=>{e.editor?.objectsHandler.createMaskElement(t,r),e._triggerUpdate()},children:o("div",{className:p("shape-content","absolute inset-0 flex justify-center items-center"),children:o("svg",{overflow:"visible",width:"50",height:"50",children:o("g",{transform:`scale(${50/r.viewBox[0]}, ${50/r.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:o("path",{className:"shape-path",d:r.path,fill:"#ccc",strokeMiterlimit:8,strokeLinecap:"butt"})})})})},a))})})}),trigger:"click",children:o(m,{type:"text",styles:d,children:l("toolbar.clip")})})}),A={ImageFlip:I,ImageFilters:b,ImageFitToBackground:U,ImageCrop:L,ImageClip:Y,ImageRemoveBackground:x,ImageEraserPen:k},M=g(({store:t,components:e})=>{let i=t.selectedElements,r=f({type:"text",usedItems:["ImageFlip","ImageFilters","ImageFitToBackground","ImageClip","ImageCrop","ImageRemoveBackground","ImageEraserPen"],components:e});return o(v,{items:r,itemRender:a=>{let c=e[a]||A[a];return c&&o(c,{elements:i,element:i[0],store:t},a)}})}),Z=M;export{U as a,L as b,Y as c,M as d,Z as e};
@@ -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};
@@ -1,27 +0,0 @@
1
- import{a as d}from"./chunk-POCSL7OS.js";import{c as r}from"./chunk-YCFED7XQ.js";import{useEffect as k,useState as Y}from"react";import{Tabs as X,Button as m,message as h}from"antd";import b from"styled-components";import{Upload as v,Trash as C}from"lucide-react";import{observer as y}from"mobx-react-lite";import{jsx as o,jsxs as p}from"react/jsx-runtime";var x=[{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/81b623c61f379f8b6b59d6e3f63c10c8.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:450.5,top:123,width:900,height:245,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:450.5,top:192.5,width:886,height:80,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:26,name:"\u5F62\u72B6 1 \u62F7\u8D1D 7",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/df58054a-786a-4882-8436-f5ffed9c9528.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:448.43054900000004,top:88.84094399999998,width:880,height:124.3,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSansCN-Heavy",fontWeight:"normal",fontSize:110,text:"\u7206\u7B11\u6B63\u5728\u52A0\u8F7D\u4E2D\u2026",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.14184705951538149,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:27,name:"\u7206\u7B11\u6B63\u5728\u52A0\u8F7D\u4E2D\u2026"}],width:900,height:245}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/03d45f72dbd9530e6cdfc2fb063e3b49.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:469.5,top:108.5,width:938,height:216,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:830,top:110.5,width:171,height:190,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:23,name:"\u5F62\u72B6 1",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/cb0c6b84-25e4-45e5-8d6c-d646e45bd265.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:831.238644,top:98.25498600000003,width:147.76459,height:124.3,fill:"rgba(255, 255, 255, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1.044109,scaleY:1.044109,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSansCN-Heavy",fontWeight:"normal",fontSize:110,text:"+1",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:24,name:"+1"},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:360.5,top:102,width:719.390864,height:203.227919,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSansCN-Heavy",fontWeight:"normal",fontSize:179.84771592471296,text:"\u5904\u7406\u6280\u5DE7",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:25,name:"\u5904\u7406\u6280\u5DE7"}],width:938,height:216}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/f8e4c5bfb5bd330058f70c4043c09e6b.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:529,top:130.5,width:1057,height:260,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:638.5,top:132,width:804,height:227,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:10,name:"\u56FE\u5C42 3",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/43641401-44b3-45f8-96c2-1fcab4030c17.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:124,top:132.5,width:225,height:222,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:12,name:"\u56FE\u5C42 4",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/e34eb0b4-0f90-4370-ab17-8e5dc56004f9.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:129.73850000000004,top:137.67086099999995,width:185.9375,height:158.2,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"sucaijishi-kft",fontWeight:"normal",fontSize:140,text:"01",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:13,name:"01"},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:621.209607,top:146.58432800000003,width:640,height:180.8,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"sucaijishi-kft",fontWeight:"normal",fontSize:160,text:"\u88C5\u4FEE\u653B\u7565",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:14,name:"\u88C5\u4FEE\u653B\u7565"}],width:1057,height:260}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/3cf5e63e6fb22ea8c1dc2178667468e4.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:430,top:120,width:859,height:239,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:519.5,top:121.5,width:670,height:170,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:105,name:"\u77E9\u5F62 5",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/b293e875-d051-4c57-b0f3-eadebd23ef43.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:122.5,top:120,width:242,height:239,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:98,name:"\u77E9\u5F62 41",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/8ccee46c-474f-4a72-8084-a92e3cf5cf4a.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:505.27964199999997,top:127.623694,width:480,height:135.6,fill:"rgba(1.989, 1.989, 1.989, 1)",stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"Chusung",fontWeight:"normal",fontSize:120,text:"\u4ECA\u65E5\u5FC3\u60C5",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:106,name:"\u4ECA\u65E5\u5FC3\u60C5"}],width:859,height:239}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/5faf22fa36d4eb06d46d687b5ac9084c.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:555,top:89,width:1109,height:177,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:77.5,top:84.5,width:142,height:138,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:757,name:"\u5F62\u72B6 1",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/5c409304-a874-49b0-a8f7-aea1bfb4d328.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:621.1910109999999,top:99.545797,width:938.019295,height:151.423115,fill:"rgba(255, 255, 255, 1)",stroke:"rgba(0, 0, 0, 1)",strokeWidth:5,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"TsangerYuYangT-W05",fontWeight:"normal",fontSize:134.002756467618,text:"\u56DB\u516D\u7EA7\u9AD8\u6548\u5907\u8003",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.6959459459459459,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:755,name:"\u56DB\u516D\u7EA7\u9AD8\u6548\u5907\u8003"}],width:1109,height:177}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/5bf739287bc1b2f2279709e93453c753.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:597.5,top:260.5,width:1194,height:520,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:132,top:277,width:243,height:419,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:761,name:"\u56FE\u5C42 8",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/25561fa8-4af2-498a-805c-9cd1f85b001c.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:1060.5,top:277,width:244,height:419,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:762,name:"\u56FE\u5C42 9",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/de0e0cbe-900c-43c3-b8bd-55a4080fd8c1.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:594,top:277.5,width:809.75799,height:428.27,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSerifCN-Bold",fontWeight:"normal",fontSize:113,text:`BEST
2
- OF THE YEAR
3
- -2024-`,underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1.176991150442478,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:763,name:"BEST OF THE YEAR -2024-"}],width:1194,height:520}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/0d1c4158adb5b365cfdc07e874a3a8ff.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:474.5,top:172,width:948,height:343,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:504,top:197,width:841,height:239,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:948,name:"\u77E9\u5F62 1",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/bbac0b0e-0a17-4182-be4b-16f4fc1f3545.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:97.5,top:90,width:212,height:211,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:961,name:"\u77E9\u5F62 2 \u62F7\u8D1D",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/c17d7ced-0b31-41d9-9987-7028658dbef2.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:503.5,top:197,width:708,height:200.01,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"TsangerYuYangT-W05",fontWeight:"normal",fontSize:177,text:"\u5E72\u8D27\u5206\u4EAB",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.08135593220338984,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:962,name:"\u5E72\u8D27\u5206\u4EAB"}],width:948,height:343}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/3ecefb713c4ef1e0aba8a39c1d4890c0.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:436.5,top:100.0000005,width:872,height:199,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:486,top:94.0000005,width:767,height:163,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:973,name:"\u77E9\u5F62 3",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/42611a3a-c771-4d7f-aca7-823e52f2da72.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:100,top:100.0000005,width:199,height:199,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:970,name:"\u56FE\u5C42 2",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/58f14952-740b-4c7c-9930-398e1f74ff72.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:527,top:97.0000005,width:640.840645,height:90.518741,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"tsanger-yumoW04",fontWeight:"normal",fontSize:80.1050805676651,text:"\u9047\u5230\u8FD9\u4E9B\u8D76\u7D27\u56E4\uFF01",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.23225806451612904,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:971,name:"\u9047\u5230\u8FD9\u4E9B\u8D76\u7D27\u56E4\uFF01"}],width:872,height:199}}],L=b.div`
4
- height: calc(100vh - 125px);
5
- display: flex;
6
- flex-direction: column;
7
-
8
- .bp5-dark & .polotno-text-preview-plain {
9
- filter: invert(1);
10
- }
11
- `,O=b.div`
12
- height: 100px;
13
- cursor: pointer;
14
- box-shadow: 0 0 5px rgba(16, 22, 26, 0.3);
15
- border-radius: 6px;
16
- background-color: rgba(0, 0, 0, 0.4);
17
- position: relative;
18
- font-size: 25px;
19
- display: flex;
20
- justify-content: center;
21
- align-content: center;
22
- flex-direction: column;
23
- text-align: center;
24
- color: white;
25
- margin-bottom: 10px;
26
- user-select: none;
27
- `,S=t=>new Promise((n,s)=>{let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{n(i.result)},i.onerror=a=>{s(a)}}),F=y(({font:t,onSelect:n,onRemove:s})=>(console.log("font",t),p(O,{style:{fontFamily:t.fontFamily},className:"polotno-font-item",onClick:n,children:[t.fontFamily+" text",o(m,{type:"text",style:{position:"absolute",right:0,bottom:0},onClick:i=>{i.stopPropagation(),s()},children:o(C,{size:16,style:{color:"white"}})})]}))),u=t=>{let{onSelect:n,children:s,...i}=t;return o(m,{type:"text",block:!0,className:"polotno-close-panel",onClick:()=>{n&&n()},...i,children:s})},U=y(({store:t})=>{let[n,s]=Y("text");k(()=>{t.loadFont("Roboto")},[]),k(()=>{t.fonts.forEach(e=>t.loadFont(e.fontFamily))},[t.fonts]);let i=e=>{s(e)},a=e=>{let f=e.width||t.width/2,l=e.left||t.width/2-f/2,g=e.top||t.height/2-e.fontSize/2,c=(t.width+t.height)/2160;t.addElement(Object.assign(Object.assign({type:"textbox",fontFamily:"Roboto"},e),{left:l,top:g,width:f,fontSize:e.fontSize*c,splitByGrapheme:!0}))},w=[{key:"text",label:r("sidePanel.text"),children:p(L,{children:[o(u,{style:{marginBottom:"5px",width:"100%",fontSize:"25px",fontFamily:"Roboto",padding:"20px 0"},onSelect:e=>{console.log("e ---> Header",e),a({text:r("sidePanel.headerText"),fontSize:76,fontFamily:"Roboto"})},children:r("sidePanel.createHeader")}),o(u,{style:{marginBottom:"5px",width:"100%",fontSize:"18px",fontFamily:"Roboto",padding:"20px 0"},onSelect:e=>{console.log("e ---> Sub Header",e),a({text:r("sidePanel.subHeaderText"),fontSize:44,fontFamily:"Roboto"})},children:r("sidePanel.createSubHeader")}),o(u,{style:{marginBottom:"5px",width:"100%",fontSize:"14px",fontFamily:"Roboto",padding:"20px 0"},onSelect:e=>{console.log("e ---> Body Text",e),a({text:r("sidePanel.bodyText"),fontSize:30,fontFamily:"Roboto"})},children:r("sidePanel.createBody")}),o(d,{shadowEnabled:!1,images:x,getPreview:e=>e.url,isLoading:!1,error:!1,onSelect:(...e)=>{console.log("args ---> ",e)},itemHeight:150,spacing:10})]})},{key:"myFonts",label:r("sidePanel.myFonts"),children:p("div",{style:{display:"flex",flexDirection:"column",height:"calc(100% - 50px)"},children:[p("label",{htmlFor:"polotno-font-upload",children:[p(m,{block:!0,onClick:()=>{let e=document.querySelector("#polotno-font-upload");e&&e.click()},children:[o(v,{size:16}),r("sidePanel.uploadFont")]}),o("input",{type:"file",accept:".ttf, .otf, .woff, .woff2, .eot",id:"polotno-font-upload",style:{display:"none"},onChange:async e=>{let{target:f}=e,l=f.files?.[0];if(l){h.loading("Uploading font...",0);let g=await S(l),c=l.name.split(".")[0];t.addFont({fontFamily:c,name:c,url:g}),h.destroy(),h.success("Font uploaded successfully!")}}})]}),o("div",{style:{paddingTop:"20px",overflow:"auto",height:"100%"},children:t.fonts.map((e,f)=>o(F,{font:e,onSelect:()=>{a({fontSize:80,text:"Cool text",fontFamily:e.fontFamily})},onRemove:()=>{t.find(l=>(l.type==="textbox"&&l.fontFamily===e.fontFamily&&t.set({fontFamily:"Roboto"},l),!1)),t.removeFont(e.fontFamily)}},f))})]})}];return o("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:o(X,{defaultActiveKey:"text",activeKey:n,items:w,onChange:i,styles:{content:{height:"100%"}}})})});export{U as a};
@@ -1 +0,0 @@
1
- import{c as o}from"./chunk-YCFED7XQ.js";import{a as e}from"./chunk-JMIN2XMC.js";import{Copy as l}from"lucide-react";import{Tooltip as m,Button as n}from"antd";import{observer as s}from"mobx-react-lite";import{jsx as t}from"react/jsx-runtime";var b=s(({store:r})=>{let{disabled:p,duplicate:i}=e({store:r});return t(m,{title:o("toolbar.duplicateElements"),placement:"bottom",children:t(n,{type:"text",styles:{root:{padding:"0 7px"}},disabled:p,onClick:()=>{i()},children:t(l,{size:16})})})});export{b as a};