@ydesign/react-editor 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.css +1 -1
- package/dist/canvas/workspace-canvas.d.ts +4 -0
- package/dist/canvas/workspace.d.ts +4 -0
- package/dist/chunk-4LUZF4CB.js +2 -0
- package/dist/{chunk-YVRHDXYK.js → chunk-53KFBGJB.js} +2 -2
- package/dist/chunk-5C2MNUBC.js +1 -0
- package/dist/chunk-AGNRQAPA.js +1 -0
- package/dist/{chunk-ZVWJRZOZ.js → chunk-APQPKBER.js} +1 -1
- package/dist/chunk-CMH73CYQ.js +27 -0
- package/dist/chunk-COQ4GO5N.js +1 -0
- package/dist/chunk-FXO52BV7.js +1 -0
- package/dist/chunk-IQ7O55C5.js +42 -0
- package/dist/{chunk-RFPYC6DZ.js → chunk-LCE6Z46D.js} +1 -1
- package/dist/chunk-MQZE5LZU.js +1 -0
- package/dist/chunk-OV74NBJ5.js +45 -0
- package/dist/chunk-Q2L6VKFI.js +9 -0
- package/dist/{chunk-LW2W4B2N.js → chunk-VXTF2OL2.js} +3 -3
- package/dist/chunk-WGX437MN.js +9 -0
- package/dist/{chunk-LHQI6WDJ.js → chunk-XK24AOVW.js} +2 -2
- package/dist/chunk-XM3RPIUS.js +9 -0
- package/dist/{chunk-CRTMZEJE.js → chunk-XPAHGJGK.js} +1 -1
- package/dist/config.js +1 -1
- package/dist/hooks/use-duplicate-element.d.ts +4 -0
- package/dist/hooks/use-lock.d.ts +4 -0
- package/dist/hooks/use-remove-element.d.ts +4 -0
- package/dist/model/store.d.ts +55 -44
- package/dist/model/store.js +1 -1
- package/dist/project.d.ts +2 -0
- package/dist/side-panel/background-panel.d.ts +10 -3
- package/dist/side-panel/background-panel.js +1 -1
- package/dist/side-panel/images-grid.d.ts +2 -1
- package/dist/side-panel/images-grid.js +1 -41
- package/dist/side-panel/index.d.ts +4 -0
- package/dist/side-panel/index.js +1 -1
- package/dist/side-panel/layers-panel.d.ts +8 -2
- package/dist/side-panel/layers-panel.js +1 -1
- package/dist/side-panel/photos-panel.d.ts +4 -0
- package/dist/side-panel/shapes-panel.d.ts +4 -0
- package/dist/side-panel/shapes-panel.js +1 -1
- package/dist/side-panel/side-panel.d.ts +4 -0
- package/dist/side-panel/side-panel.js +1 -1
- package/dist/side-panel/size-panel.d.ts +8 -2
- package/dist/side-panel/size-panel.js +1 -1
- package/dist/side-panel/tab-button.js +1 -1
- package/dist/side-panel/templates-panel.d.ts +8 -2
- package/dist/side-panel/templates-panel.js +1 -1
- package/dist/side-panel/text-panel.d.ts +8 -2
- package/dist/side-panel/text-panel.js +1 -1
- package/dist/side-panel/upload-panel.d.ts +4 -0
- package/dist/toolbar/default-toolbar.d.ts +10 -1
- package/dist/toolbar/default-toolbar.js +1 -1
- package/dist/toolbar/download-button.d.ts +4 -0
- package/dist/toolbar/duplicate-button.d.ts +4 -0
- package/dist/toolbar/figure-toolbar.d.ts +4 -0
- package/dist/toolbar/figure-toolbar.js +1 -1
- package/dist/toolbar/filters-picker.d.ts +4 -0
- package/dist/toolbar/flip-button.d.ts +4 -0
- package/dist/toolbar/group-button.d.ts +4 -0
- package/dist/toolbar/history-buttons.d.ts +4 -0
- package/dist/toolbar/history-buttons.js +1 -1
- package/dist/toolbar/image-toolbar.d.ts +4 -0
- package/dist/toolbar/image-toolbar.js +1 -1
- package/dist/toolbar/lock-button.d.ts +4 -0
- package/dist/toolbar/opacity-picker.d.ts +4 -0
- package/dist/toolbar/position-picker.d.ts +4 -0
- package/dist/toolbar/remove-button.d.ts +4 -0
- package/dist/toolbar/text-toolbar.d.ts +4 -0
- package/dist/toolbar/text-toolbar.js +1 -1
- package/dist/toolbar/toolbar.d.ts +4 -0
- package/dist/toolbar/toolbar.js +1 -1
- package/dist/toolbar/zoom-buttons.d.ts +4 -0
- package/dist/topbar/file-menu.d.ts +4 -0
- package/dist/topbar/file-menu.js +1 -1
- package/dist/topbar/topbar.d.ts +4 -0
- package/dist/topbar/topbar.js +5 -5
- package/dist/utils/text.d.ts +3 -0
- package/dist/utils/text.js +1 -0
- package/dist/utils/unit.d.ts +18 -0
- package/dist/utils/unit.js +1 -0
- package/package.json +4 -10
- package/dist/chunk-6BG6R2IO.js +0 -7
- package/dist/chunk-6LFGFFHI.js +0 -1
- package/dist/chunk-LCOWX5JR.js +0 -1
- package/dist/chunk-M33EDDXB.js +0 -1
- package/dist/chunk-MCBL6QAP.js +0 -1
- package/dist/chunk-NX3CGW6Q.js +0 -1
- package/dist/chunk-QJBRJELT.js +0 -1
- package/dist/chunk-TX4BNXQC.js +0 -1
- package/dist/chunk-WIM26GEM.js +0 -1
package/dist/app.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer properties;@layer theme,base,components,utilities;@layer theme{:root,:host{--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-blue-400: oklch(70.7% .165 254.624);--color-blue-500: oklch(62.3% .214 259.815);--color-gray-100: oklch(96.7% .003 264.542);--color-gray-200: oklch(92.8% .006 264.531);--color-gray-400: oklch(70.7% .022 261.325);--color-gray-500: oklch(55.1% .027 264.364);--color-gray-600: oklch(44.6% .03 256.802);--color-gray-700: oklch(37.3% .034 259.733);--color-gray-800: oklch(27.8% .033 256.848);--color-white: #fff;--spacing: .25rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: 1.5 ;--font-weight-medium: 500;--radius-lg: .5rem;--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono)}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:currentcolor;@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.mt-2{margin-top:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-\[1\.2\%\]{margin-bottom:1.2%}.box-border{box-sizing:border-box}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-0{height:calc(var(--spacing) * 0)}.h-3{height:calc(var(--spacing) * 3)}.h-10{height:calc(var(--spacing) * 10)}.h-full{height:100%}.w-3{width:calc(var(--spacing) * 3)}.w-10{width:calc(var(--spacing) * 10)}.w-40{width:calc(var(--spacing) * 40)}.w-80{width:calc(var(--spacing) * 80)}.w-\[25\%\]{width:25%}.w-\[70px\]{width:70px}.w-full{width:100%}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-start{align-content:flex-start}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-r,.border-r-1{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b-1{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-b-gray-200{border-bottom-color:var(--color-gray-200)}.bg-\[\#ecf0f1\]{background-color:#ecf0f1}.bg-blue-500{background-color:var(--color-blue-500)}.fill-white{fill:var(--color-white)}.stroke-gray-200{stroke:var(--color-gray-200)}.p-3{padding:calc(var(--spacing) * 3)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-\[25\%\]{padding-bottom:25%}.pl-6{padding-left:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.text-base{font-size:var(--text-base);line-height:var(--tw-leading, var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading, var(--text-xs--line-height))}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-blue-500{color:var(--color-blue-500)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.italic{font-style:italic}.underline{text-decoration-line:underline}.shadow{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hover\:border-blue-400{&:hover{@media (hover: hover){border-color:var(--color-blue-400)}}}.hover\:bg-gray-100{&:hover{@media (hover: hover){background-color:var(--color-gray-100)}}}.hover\:underline{&:hover{@media (hover: hover){text-decoration-line:underline}}}.hover\:shadow-sm{&:hover{@media (hover: hover){--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.dark\:border-gray-800{@media (prefers-color-scheme: dark){border-color:var(--color-gray-800)}}.dark\:bg-\[\#92969d\]{@media (prefers-color-scheme: dark){background-color:#92969d}}.dark\:fill-\[\#0b0809\]{@media (prefers-color-scheme: dark){fill:#0b0809}}.dark\:stroke-\[\#0b0809\]{@media (prefers-color-scheme: dark){stroke:#0b0809}}.dark\:text-white{@media (prefers-color-scheme: dark){color:var(--color-white)}}}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-blur{syntax: "*"; inherits: false;}@property --tw-brightness{syntax: "*"; inherits: false;}@property --tw-contrast{syntax: "*"; inherits: false;}@property --tw-grayscale{syntax: "*"; inherits: false;}@property --tw-hue-rotate{syntax: "*"; inherits: false;}@property --tw-invert{syntax: "*"; inherits: false;}@property --tw-opacity{syntax: "*"; inherits: false;}@property --tw-saturate{syntax: "*"; inherits: false;}@property --tw-sepia{syntax: "*"; inherits: false;}@property --tw-drop-shadow{syntax: "*"; inherits: false;}@property --tw-drop-shadow-color{syntax: "*"; inherits: false;}@property --tw-drop-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-drop-shadow-size{syntax: "*"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-border-style: solid;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-blur: initial;--tw-brightness: initial;--tw-contrast: initial;--tw-grayscale: initial;--tw-hue-rotate: initial;--tw-invert: initial;--tw-opacity: initial;--tw-saturate: initial;--tw-sepia: initial;--tw-drop-shadow: initial;--tw-drop-shadow-color: initial;--tw-drop-shadow-alpha: 100%;--tw-drop-shadow-size: initial}}}
|
|
1
|
+
@layer properties;@layer theme,base,components,utilities;@layer theme{:root,:host{--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-blue-400: oklch(70.7% .165 254.624);--color-blue-500: oklch(62.3% .214 259.815);--color-gray-100: oklch(96.7% .003 264.542);--color-gray-200: oklch(92.8% .006 264.531);--color-gray-400: oklch(70.7% .022 261.325);--color-gray-500: oklch(55.1% .027 264.364);--color-gray-600: oklch(44.6% .03 256.802);--color-gray-700: oklch(37.3% .034 259.733);--color-gray-800: oklch(27.8% .033 256.848);--color-white: #fff;--spacing: .25rem;--text-xs: .75rem;--text-xs--line-height: calc(1 / .75);--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--text-base: 1rem;--text-base--line-height: 1.5 ;--font-weight-medium: 500;--radius-lg: .5rem;--default-font-family: var(--font-sans);--default-mono-font-family: var(--font-mono)}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings, normal);font-variation-settings:var(--default-font-variation-settings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:currentcolor;@supports (color: color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.mt-2{margin-top:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-\[1\.2\%\]{margin-bottom:1.2%}.box-border{box-sizing:border-box}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-0{height:calc(var(--spacing) * 0)}.h-3{height:calc(var(--spacing) * 3)}.h-10{height:calc(var(--spacing) * 10)}.h-full{height:100%}.w-3{width:calc(var(--spacing) * 3)}.w-10{width:calc(var(--spacing) * 10)}.w-40{width:calc(var(--spacing) * 40)}.w-80{width:calc(var(--spacing) * 80)}.w-\[25\%\]{width:25%}.w-\[70px\]{width:70px}.w-full{width:100%}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-start{align-content:flex-start}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--radius-lg)}.border,.border-1{border-style:var(--tw-border-style);border-width:1px}.border-r,.border-r-1{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b-1{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-b-gray-200{border-bottom-color:var(--color-gray-200)}.bg-\[\#ecf0f1\]{background-color:#ecf0f1}.bg-blue-500{background-color:var(--color-blue-500)}.fill-white{fill:var(--color-white)}.stroke-gray-200{stroke:var(--color-gray-200)}.p-3{padding:calc(var(--spacing) * 3)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-\[25\%\]{padding-bottom:25%}.pl-6{padding-left:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.text-base{font-size:var(--text-base);line-height:var(--tw-leading, var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading, var(--text-xs--line-height))}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-blue-500{color:var(--color-blue-500)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.italic{font-style:italic}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.shadow{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hover\:border-blue-400{&:hover{@media (hover: hover){border-color:var(--color-blue-400)}}}.hover\:bg-gray-100{&:hover{@media (hover: hover){background-color:var(--color-gray-100)}}}.hover\:underline{&:hover{@media (hover: hover){text-decoration-line:underline}}}.hover\:shadow-sm{&:hover{@media (hover: hover){--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.dark\:border-gray-800{@media (prefers-color-scheme: dark){border-color:var(--color-gray-800)}}.dark\:bg-\[\#92969d\]{@media (prefers-color-scheme: dark){background-color:#92969d}}.dark\:fill-\[\#0b0809\]{@media (prefers-color-scheme: dark){fill:#0b0809}}.dark\:stroke-\[\#0b0809\]{@media (prefers-color-scheme: dark){stroke:#0b0809}}.dark\:text-white{@media (prefers-color-scheme: dark){color:var(--color-white)}}}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-blur{syntax: "*"; inherits: false;}@property --tw-brightness{syntax: "*"; inherits: false;}@property --tw-contrast{syntax: "*"; inherits: false;}@property --tw-grayscale{syntax: "*"; inherits: false;}@property --tw-hue-rotate{syntax: "*"; inherits: false;}@property --tw-invert{syntax: "*"; inherits: false;}@property --tw-opacity{syntax: "*"; inherits: false;}@property --tw-saturate{syntax: "*"; inherits: false;}@property --tw-sepia{syntax: "*"; inherits: false;}@property --tw-drop-shadow{syntax: "*"; inherits: false;}@property --tw-drop-shadow-color{syntax: "*"; inherits: false;}@property --tw-drop-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-drop-shadow-size{syntax: "*"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-border-style: solid;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-blur: initial;--tw-brightness: initial;--tw-contrast: initial;--tw-grayscale: initial;--tw-hue-rotate: initial;--tw-invert: initial;--tw-opacity: initial;--tw-saturate: initial;--tw-sepia: initial;--tw-drop-shadow: initial;--tw-drop-shadow-color: initial;--tw-drop-shadow-alpha: 100%;--tw-drop-shadow-size: initial}}}
|
|
2
2
|
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { StoreType } from '../model/store.js';
|
|
3
|
+
import 'fabric';
|
|
4
|
+
import 'mobx-state-tree/dist/internal';
|
|
3
5
|
import 'mobx-state-tree';
|
|
4
6
|
import '@ydesign/core';
|
|
7
|
+
import '../utils/fonts.js';
|
|
8
|
+
import 'mobx';
|
|
5
9
|
|
|
6
10
|
type WorkspaceProps = {
|
|
7
11
|
store: StoreType;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { WorkspaceProps } from './workspace-canvas.js';
|
|
3
3
|
import '../model/store.js';
|
|
4
|
+
import 'fabric';
|
|
5
|
+
import 'mobx-state-tree/dist/internal';
|
|
4
6
|
import 'mobx-state-tree';
|
|
5
7
|
import '@ydesign/core';
|
|
8
|
+
import '../utils/fonts.js';
|
|
9
|
+
import 'mobx';
|
|
6
10
|
|
|
7
11
|
declare const Workspace: ({ components, ...restProps }: WorkspaceProps) => react_jsx_runtime.JSX.Element;
|
|
8
12
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k}from"./chunk-MNACXCF5.js";import{a as N}from"./chunk-R6Z6F447.js";import{c as x}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-MNACXCF5.js";import{a as N}from"./chunk-R6Z6F447.js";import{c as x}from"./chunk-COQ4GO5N.js";import{a as B}from"./chunk-4FFLRF6N.js";import{d as R}from"./chunk-LCE6Z46D.js";import{a as H}from"./chunk-GYDTKPW5.js";import{a as S}from"./chunk-XRRO2RT7.js";import{a as E}from"./chunk-3TTTJUTT.js";import{b as h}from"./chunk-B35ZYWID.js";import{a as C}from"./chunk-H67HTXU4.js";import{e as n}from"./chunk-XPAHGJGK.js";import{b as T}from"./chunk-APQPKBER.js";import y from"styled-components";import{useRef as K}from"react";import{Tooltip as w,Button as D}from"antd";import{Undo2 as M,Redo2 as X}from"lucide-react";import{observer as _}from"mobx-react-lite";import{useEffect as q}from"react";import{jsx as i,jsxs as J}from"react/jsx-runtime";var G=_(({store:o})=>(q(()=>{},[o._updateHistory]),J(u,{style:{float:"left",paddingRight:10},children:[i(w,{title:"\u64A4\u9500",placement:"bottom",children:i(D,{type:"text",disabled:!o.editor?.historyHandler.canUndo(),styles:{root:{padding:"0 7px"}},onClick:()=>{o.editor?.historyHandler.undo()},children:i(M,{size:16})})}),i(w,{title:"\u91CD\u505A",placement:"bottom",children:i(D,{type:"text",disabled:!o.editor?.historyHandler.canRedo(),styles:{root:{padding:"0 7px"}},onClick:()=>{o.editor?.historyHandler.redo()},children:i(X,{size:16})})})]})));import{observer as Q}from"mobx-react-lite";import{Button as P,Divider as V,Space as W}from"antd";import{Check as Y,X as Z}from"lucide-react";import{Fragment as ro,jsx as e,jsxs as l}from"react/jsx-runtime";var $=y.div`
|
|
2
2
|
white-space: nowrap;
|
|
3
3
|
|
|
4
4
|
height: 50px;
|
|
@@ -13,4 +13,4 @@ import{a as k}from"./chunk-MNACXCF5.js";import{a as N}from"./chunk-R6Z6F447.js";
|
|
|
13
13
|
align-items: center;
|
|
14
14
|
display: flex;
|
|
15
15
|
height: 50px;
|
|
16
|
-
`,to=({store:o})=>l(W,{style:{height:50},children:[l(P,{onClick:()=>{o.editor?.imageCropHandler.cropImg.onDeselectEvent()},children:[e(Y,{size:16}),"\u5B8C\u6210"]}),l(P,{onClick:()=>{o.editor?.imageCropHandler.cropCancel()},children:[e(Z,{size:16}),"\u53D6\u6D88"]})]}),c={textbox:x,image:R,path:n,rect:n,circle:n,ellipse:n,triangle:n,cropimage:to,many:S};function wo(o,d){c[o]=d}var eo=Q(({store:o,downloadButtonEnabled:d,components:p={}})=>{let z=new Set(o.selectedElements.map(r=>r?.type)).size===1,f=o.selectedElements.length===1,a=o.selectedElements[0],g=o.selectedElements.length&&o.selectedElements.every(r=>r?.locked),v=f&&a?.isCropping,s=f&&c[a?.type];z?s=c[a?.type]:o.selectedElements.length>1&&(s=c.many);let m=K(p);(Object.keys(p).some(r=>p[r]!==m.current[r])||Object.keys(m.current).some(r=>!(r in p)))&&(m.current=Object.assign({},p));let t=m.current,b=t?.ActionControls||(d?
|
|
16
|
+
`,to=({store:o})=>l(W,{style:{height:50},children:[l(P,{onClick:()=>{o.editor?.imageCropHandler.cropImg.onDeselectEvent()},children:[e(Y,{size:16}),"\u5B8C\u6210"]}),l(P,{onClick:()=>{o.editor?.imageCropHandler.cropCancel()},children:[e(Z,{size:16}),"\u53D6\u6D88"]})]}),c={textbox:x,image:R,path:n,rect:n,circle:n,ellipse:n,triangle:n,cropimage:to,many:S};function wo(o,d){c[o]=d}var eo=Q(({store:o,downloadButtonEnabled:d,components:p={}})=>{let z=new Set(o.selectedElements.map(r=>r?.type)).size===1,f=o.selectedElements.length===1,a=o.selectedElements[0],g=o.selectedElements.length&&o.selectedElements.every(r=>r?.locked),v=f&&a?.isCropping,s=f&&c[a?.type];z?s=c[a?.type]:o.selectedElements.length>1&&(s=c.many);let m=K(p);(Object.keys(p).some(r=>p[r]!==m.current[r])||Object.keys(m.current).some(r=>!(r in p)))&&(m.current=Object.assign({},p));let t=m.current,b=t?.ActionControls||(d?h:null),O=t?.Position||k,I=t?.Opacity||E,L=t?.Lock||H,j=t?.Duplicate||C,A=t?.Remove||N,F=t?.History||G,U=t?.Group||B;return e($,{className:"bp5-navbar design-toolbar",children:l(oo,{children:[!v&&e(F,{store:o}),!a&&e(T,{store:o,components:t}),s&&!g&&e(s,{store:o,components:t}),!v&&l(u,{style:{float:"right"},children:[e(U,{store:o}),e(O,{store:o}),!g&&e(I,{store:o}),e(L,{store:o}),e(j,{store:o}),e(A,{store:o}),b&&l(ro,{children:[e(V,{orientation:"vertical",style:{margin:"0 15px"}}),e(b,{store:o})]})]})]})})}),Do=eo;export{u as a,wo as b,eo as c,Do as d,G as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r({px:t,unit:n="px",dpi:e}){switch(n){case"pt":default:return t;case"mm":return t/(e/25.4);case"cm":return t/(e/2.54);case"in":return t/e}}function o({px:t,precious:n=2,dpi:e=72,unit:u="px"}){return parseFloat(r({px:t,dpi:e,unit:u}).toFixed(n))}function i({unitVal:t,dpi:n,unit:e}){return t/r({px:1,unit:e,dpi:n})}function p(t){let n=parseFloat(r(t).toFixed(1)),{unit:e="px"}=t;switch(e){case"pt":return`${Math.round(n)}pt`;case"mm":return`${n}mm`;case"cm":return`${n}cm`;case"in":return`${n}in`;default:return`${Math.round(n)}px`}}export{r as a,o as b,i as c,p as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as y}from"./chunk-4LUZF4CB.js";import{observer as g}from"mobx-react-lite";import{ReactSortable as m}from"react-sortablejs";import{useState as u}from"react";import{findIndex as v}from"es-toolkit/compat";import{Button as p,Card as f,Input as h}from"antd";import{GripVertical as x,Eye as b,EyeClosed as k,LockKeyholeOpen as C,LockKeyhole as j,Trash as E}from"lucide-react";import{jsx as t,jsxs as l}from"react/jsx-runtime";var H=g(({element:e,store:i})=>{let[r,o]=u(!1),a=v(i.selectedElements,d=>d?.id===e?.id)>=0,n=r?e.name||"":e.name||y(e.text)||`#${e.id||"\u7A7A"}`;return t(f,{className:a?"selected":"",style:{marginBottom:6,backgroundColor:a?"rgba(22, 119, 255, 0.3)":""},styles:{body:{padding:"8px 5px"}},onMouseDown:d=>{let s=d.ctrlKey||d.metaKey||d.shiftKey?[...i.selectedElements]:[];v(s,c=>c.id===e.id)<0&&(s.push(e),i.selectElements(s.map(c=>c.id)),i.editor?.objectsHandler.selectElements(s))},children:l("div",{style:{display:"flex",justifyContent:"space-between"},children:[l("div",{style:{lineHeight:"30px",display:"flex"},children:[t("div",{className:"drag-handle",style:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"move",height:30},children:t(x,{size:16})}),t("div",{style:{padding:"0 7px",opacity:.5,width:65},children:e.type}),t("div",{style:{maxWidth:138},children:t(h,{style:{minWidth:130},placeholder:"Type element name...",value:n,onFocus:()=>{o(!0)},onBlur:()=>{o(!1)},onChange:d=>{i.editor?.objectsHandler.update({name:d.target.value},e.id),i._triggerUpdate()}})})]}),l("div",{children:[t(p,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{i.editor?.objectsHandler.update({visible:!e.visible},e.id),i._triggerUpdate()},children:e.visible?t(b,{size:16}):t(k,{size:16})}),t(p,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{e?.lockMovementX?i.editor?.lockHandler.unlock(e.id):i.editor?.lockHandler.lock(e.id)},children:e.lockMovementX?t(j,{size:16}):t(C,{size:16})}),t(p,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{i.editor?.objectsHandler.remove(e.id)},children:t(E,{size:16})})]})]})})}),w=g(({store:e})=>{let r=e.objects.filter(o=>o?.id!=="workarea").reverse();return l("div",{style:{height:"100%",overflow:"auto"},children:[t("div",{style:{height:40,paddingTop:5},children:"Elements on your active page:"}),t("div",{children:r.length===0?t("div",{children:"No elements on the page..."}):null}),t(m,{list:r,direction:"horizontal",setList:o=>{o.forEach((a,n)=>{let d=o.length-n;e.objects.indexOf(a)!==d&&(e.editor?.layerHandler.updateLayerOrderByTargetIndex(d,!0,a),e._triggerUpdate())})},children:r.map(o=>t(H,{element:o,store:e},o.id))})]})});export{w as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as y}from"./chunk-OQ6HU62L.js";import{a as g,b as m}from"./chunk-YRJUN267.js";import{a as p,b as k}from"./chunk-RVXI723F.js";import{ColorPicker as S,Tooltip as h,Button as P}from"antd";import{CirclePlus as T}from"lucide-react";import{useState as b,useRef as C,useMemo as F}from"react";import{cssGradient2FabricGradient as w}from"@ydesign/core";import{observer as A}from"mobx-react-lite";import{jsx as t,jsxs as u}from"react/jsx-runtime";var B=async e=>y(e),c=e=>e?typeof e=="string"?e:e.colorStops?JSON.stringify(e.colorStops):JSON.stringify(e):"",H=A(({store:e})=>{let r=e.editor?.workareaHandler.workarea?.fill,[o,n]=b(()=>p(r)),i=C(!1),a=C(c(r)),f=c(r);f!==a.current&&!i.current&&(a.current=f,n(p(r)));let x=F(()=>o,[c(o)]);return t(h,{title:"\u80CC\u666F\u989C\u8272",children:t("div",{style:{height:32},children:t(S,{value:x,allowClear:!0,mode:["single","gradient"],onOpenChange:l=>{i.current=l,l||(a.current=c(r))},onChange:l=>{n(l)},onChangeComplete:l=>{let d=l.toCssString();if(d.includes("gradient")){let v=w(d);e.editor?.workareaHandler.setWorkareaBgColor(v)}else e.editor?.workareaHandler.setWorkareaBgColor(d)}})})})}),I=({store:e})=>t("div",{children:u("label",{htmlFor:"input-file",children:[u(P,{type:"text",styles:{root:{padding:"0 8px"}},onClick:()=>{document.querySelector("#input-file")?.click()},children:[t(T,{size:16})," add image"]}),t("input",{type:"file",id:"input-file",style:{display:"none"},onChange:async r=>{let{target:o}=r;if(!(!o.files||o.files.length===0)){for(let n of o.files){let a={type:"image",src:await B(n)};e.editor?.objectsHandler.add(a)}o.value=""}},multiple:!0,accept:"image/*"})]})}),R=({store:e})=>t("div",{children:u(P,{type:"text",styles:{root:{padding:"0 8px"}},onClick:()=>{e.editor?.objectsHandler.add({originX:"left",originY:"top",fontSize:100,textAlign:"left",fill:k(),text:"Hello World",type:"textbox"})},children:[t(T,{size:16}),"add text"]})}),D={DefaultBackgroundPicker:H,DefaultAddImage:I,DefaultAddText:R},E=({store:e,components:s})=>{let o=g({type:"text",usedItems:["DefaultBackgroundPicker","DefaultAddImage","DefaultAddText"],components:s});return t(m,{items:o,itemRender:n=>{let i=s[n]||D[n];return i&&t(i,{store:e},n)}})},V=E;export{
|
|
1
|
+
import{a as y}from"./chunk-OQ6HU62L.js";import{a as g,b as m}from"./chunk-YRJUN267.js";import{a as p,b as k}from"./chunk-RVXI723F.js";import{ColorPicker as S,Tooltip as h,Button as P}from"antd";import{CirclePlus as T}from"lucide-react";import{useState as b,useRef as C,useMemo as F}from"react";import{cssGradient2FabricGradient as w}from"@ydesign/core";import{observer as A}from"mobx-react-lite";import{jsx as t,jsxs as u}from"react/jsx-runtime";var B=async e=>y(e),c=e=>e?typeof e=="string"?e:e.colorStops?JSON.stringify(e.colorStops):JSON.stringify(e):"",H=A(({store:e})=>{let r=e.editor?.workareaHandler.workarea?.fill,[o,n]=b(()=>p(r)),i=C(!1),a=C(c(r)),f=c(r);f!==a.current&&!i.current&&(a.current=f,n(p(r)));let x=F(()=>o,[c(o)]);return t(h,{title:"\u80CC\u666F\u989C\u8272",children:t("div",{style:{height:32},children:t(S,{value:x,allowClear:!0,mode:["single","gradient"],onOpenChange:l=>{i.current=l,l||(a.current=c(r))},onChange:l=>{n(l)},onChangeComplete:l=>{let d=l.toCssString();if(d.includes("gradient")){let v=w(d);e.editor?.workareaHandler.setWorkareaBgColor(v)}else e.editor?.workareaHandler.setWorkareaBgColor(d)}})})})}),I=({store:e})=>t("div",{children:u("label",{htmlFor:"input-file",children:[u(P,{type:"text",styles:{root:{padding:"0 8px"}},onClick:()=>{document.querySelector("#input-file")?.click()},children:[t(T,{size:16})," add image"]}),t("input",{type:"file",id:"input-file",style:{display:"none"},onChange:async r=>{let{target:o}=r;if(!(!o.files||o.files.length===0)){for(let n of o.files){let a={type:"image",src:await B(n)};e.editor?.objectsHandler.add(a)}o.value=""}},multiple:!0,accept:"image/*"})]})}),R=({store:e})=>t("div",{children:u(P,{type:"text",styles:{root:{padding:"0 8px"}},onClick:()=>{e.editor?.objectsHandler.add({originX:"left",originY:"top",fontSize:100,textAlign:"left",fill:k(),text:"Hello World",type:"textbox"})},children:[t(T,{size:16}),"add text"]})}),D={DefaultBackgroundPicker:H,DefaultAddImage:I,DefaultAddText:R},E=({store:e,components:s})=>{let o=g({type:"text",usedItems:["DefaultBackgroundPicker","DefaultAddImage","DefaultAddText"],components:s});return t(m,{items:o,itemRender:n=>{let i=s[n]||D[n];return i&&t(i,{store:e},n)}})},V=E;export{H as a,E as b,V as c};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{a as m}from"./chunk-IQ7O55C5.js";import{useEffect as u,useState as y}from"react";import{Tabs as w,Button as h}from"antd";import k from"styled-components";import{Upload as Y,Trash as X}from"lucide-react";import{observer as d}from"mobx-react-lite";import{jsx as o,jsxs as f}from"react/jsx-runtime";var v=[{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/81b623c61f379f8b6b59d6e3f63c10c8.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:450.5,top:123,width:900,height:245,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:450.5,top:192.5,width:886,height:80,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:26,name:"\u5F62\u72B6 1 \u62F7\u8D1D 7",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/df58054a-786a-4882-8436-f5ffed9c9528.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:448.43054900000004,top:88.84094399999998,width:880,height:124.3,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSansCN-Heavy",fontWeight:"normal",fontSize:110,text:"\u7206\u7B11\u6B63\u5728\u52A0\u8F7D\u4E2D\u2026",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.14184705951538149,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:27,name:"\u7206\u7B11\u6B63\u5728\u52A0\u8F7D\u4E2D\u2026"}],width:900,height:245}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/03d45f72dbd9530e6cdfc2fb063e3b49.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:469.5,top:108.5,width:938,height:216,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:830,top:110.5,width:171,height:190,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:23,name:"\u5F62\u72B6 1",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/cb0c6b84-25e4-45e5-8d6c-d646e45bd265.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:831.238644,top:98.25498600000003,width:147.76459,height:124.3,fill:"rgba(255, 255, 255, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1.044109,scaleY:1.044109,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSansCN-Heavy",fontWeight:"normal",fontSize:110,text:"+1",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:24,name:"+1"},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:360.5,top:102,width:719.390864,height:203.227919,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSansCN-Heavy",fontWeight:"normal",fontSize:179.84771592471296,text:"\u5904\u7406\u6280\u5DE7",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:25,name:"\u5904\u7406\u6280\u5DE7"}],width:938,height:216}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/f8e4c5bfb5bd330058f70c4043c09e6b.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:529,top:130.5,width:1057,height:260,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:638.5,top:132,width:804,height:227,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:10,name:"\u56FE\u5C42 3",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/43641401-44b3-45f8-96c2-1fcab4030c17.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:124,top:132.5,width:225,height:222,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:12,name:"\u56FE\u5C42 4",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/e34eb0b4-0f90-4370-ab17-8e5dc56004f9.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:129.73850000000004,top:137.67086099999995,width:185.9375,height:158.2,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"sucaijishi-kft",fontWeight:"normal",fontSize:140,text:"01",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:13,name:"01"},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:621.209607,top:146.58432800000003,width:640,height:180.8,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"sucaijishi-kft",fontWeight:"normal",fontSize:160,text:"\u88C5\u4FEE\u653B\u7565",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:14,name:"\u88C5\u4FEE\u653B\u7565"}],width:1057,height:260}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/3cf5e63e6fb22ea8c1dc2178667468e4.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:430,top:120,width:859,height:239,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:519.5,top:121.5,width:670,height:170,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:105,name:"\u77E9\u5F62 5",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/b293e875-d051-4c57-b0f3-eadebd23ef43.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:122.5,top:120,width:242,height:239,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:98,name:"\u77E9\u5F62 41",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/8ccee46c-474f-4a72-8084-a92e3cf5cf4a.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:505.27964199999997,top:127.623694,width:480,height:135.6,fill:"rgba(1.989, 1.989, 1.989, 1)",stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"Chusung",fontWeight:"normal",fontSize:120,text:"\u4ECA\u65E5\u5FC3\u60C5",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:106,name:"\u4ECA\u65E5\u5FC3\u60C5"}],width:859,height:239}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/5faf22fa36d4eb06d46d687b5ac9084c.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:555,top:89,width:1109,height:177,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:77.5,top:84.5,width:142,height:138,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:757,name:"\u5F62\u72B6 1",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/5c409304-a874-49b0-a8f7-aea1bfb4d328.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:621.1910109999999,top:99.545797,width:938.019295,height:151.423115,fill:"rgba(255, 255, 255, 1)",stroke:"rgba(0, 0, 0, 1)",strokeWidth:5,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"TsangerYuYangT-W05",fontWeight:"normal",fontSize:134.002756467618,text:"\u56DB\u516D\u7EA7\u9AD8\u6548\u5907\u8003",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.6959459459459459,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:755,name:"\u56DB\u516D\u7EA7\u9AD8\u6548\u5907\u8003"}],width:1109,height:177}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/5bf739287bc1b2f2279709e93453c753.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:597.5,top:260.5,width:1194,height:520,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:132,top:277,width:243,height:419,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:761,name:"\u56FE\u5C42 8",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/25561fa8-4af2-498a-805c-9cd1f85b001c.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:1060.5,top:277,width:244,height:419,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:762,name:"\u56FE\u5C42 9",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/de0e0cbe-900c-43c3-b8bd-55a4080fd8c1.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:594,top:277.5,width:809.75799,height:428.27,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"SourceHanSerifCN-Bold",fontWeight:"normal",fontSize:113,text:`BEST
|
|
2
|
+
OF THE YEAR
|
|
3
|
+
-2024-`,underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:1.176991150442478,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:763,name:"BEST OF THE YEAR -2024-"}],width:1194,height:520}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/0d1c4158adb5b365cfdc07e874a3a8ff.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:474.5,top:172,width:948,height:343,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:504,top:197,width:841,height:239,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:948,name:"\u77E9\u5F62 1",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/bbac0b0e-0a17-4182-be4b-16f4fc1f3545.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:97.5,top:90,width:212,height:211,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:961,name:"\u77E9\u5F62 2 \u62F7\u8D1D",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/c17d7ced-0b31-41d9-9987-7028658dbef2.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:503.5,top:197,width:708,height:200.01,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"TsangerYuYangT-W05",fontWeight:"normal",fontSize:177,text:"\u5E72\u8D27\u5206\u4EAB",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.08135593220338984,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:962,name:"\u5E72\u8D27\u5206\u4EAB"}],width:948,height:343}},{url:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/6160feaaba8103014b0b53b5/3ecefb713c4ef1e0aba8a39c1d4890c0.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"5.4.2",originX:"center",originY:"center",left:436.5,top:100.0000005,width:872,height:199,fill:"rgba(255, 255, 255, 0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,rx:0,ry:0,id:"workarea"},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:486,top:94.0000005,width:767,height:163,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:973,name:"\u77E9\u5F62 3",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/42611a3a-c771-4d7f-aca7-823e52f2da72.png",crossOrigin:"anonymous",filters:[]},{type:"image",version:"5.4.2",originX:"center",originY:"center",left:100,top:100.0000005,width:199,height:199,fill:"rgb(0,0,0)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:970,name:"\u56FE\u5C42 2",src:"https://zh.gtimg.com/m-1/atom-parser/psd/new-upload-parse-only/6160feaaba8103014b0b53b5/workflow/58f14952-740b-4c7c-9930-398e1f74ff72.png",crossOrigin:"anonymous",filters:[]},{type:"textbox",version:"5.4.2",originX:"center",originY:"center",left:527,top:97.0000005,width:640.840645,height:90.518741,fill:"rgba(0, 0, 0, 1)",stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,fontFamily:"tsanger-yumoW04",fontWeight:"normal",fontSize:80.1050805676651,text:"\u9047\u5230\u8FD9\u4E9B\u8D76\u7D27\u56E4\uFF01",underline:!1,overline:!1,linethrough:!1,textAlign:"center",fontStyle:"normal",lineHeight:.23225806451612904,textBackgroundColor:"",charSpacing:0,styles:[],direction:"ltr",path:null,pathStartOffset:0,pathSide:"left",pathAlign:"baseline",minWidth:20,splitByGrapheme:!1,id:971,name:"\u9047\u5230\u8FD9\u4E9B\u8D76\u7D27\u56E4\uFF01"}],width:872,height:199}}],C=k.div`
|
|
4
|
+
height: calc(100vh - 125px);
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
|
|
8
|
+
.bp5-dark & .polotno-text-preview-plain {
|
|
9
|
+
filter: invert(1);
|
|
10
|
+
}
|
|
11
|
+
`,x=k.div`
|
|
12
|
+
height: 100px;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
box-shadow: 0 0 5px rgba(16, 22, 26, 0.3);
|
|
15
|
+
border-radius: 6px;
|
|
16
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
17
|
+
position: relative;
|
|
18
|
+
font-size: 25px;
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
align-content: center;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
text-align: center;
|
|
24
|
+
color: white;
|
|
25
|
+
margin-bottom: 10px;
|
|
26
|
+
user-select: none;
|
|
27
|
+
`,L=t=>new Promise((l,n)=>{let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{l(i.result)},i.onerror=s=>{n(s)}}),O=d(({font:t,onSelect:l,onRemove:n})=>(console.log("font",t),f(x,{style:{fontFamily:t.fontFamily},className:"polotno-font-item",onClick:l,children:[t.fontFamily+" text",o(h,{type:"text",style:{position:"absolute",right:0,bottom:0},onClick:i=>{i.stopPropagation(),n()},children:o(X,{size:16,style:{color:"white"}})})]}))),g=t=>{let{onSelect:l,children:n,...i}=t;return o(h,{type:"text",block:!0,className:"polotno-close-panel",onClick:()=>{l&&l()},...i,children:n})},R=d(({store:t})=>{let[l,n]=y("text");u(()=>{t.loadFont("Roboto")},[]),u(()=>{t.fonts.forEach(e=>t.loadFont(e.fontFamily))},[t.fonts]);let i=e=>{n(e)},s=e=>{let a=e.width||t.width/2,r=e.left||t.width/2-a/2,c=e.top||t.height/2-e.fontSize/2,p=(t.width+t.height)/2160;t.addElement(Object.assign(Object.assign({type:"textbox",fontFamily:"Roboto"},e),{left:r,top:c,width:a,fontSize:e.fontSize*p,splitByGrapheme:!0}))},b=[{key:"text",label:"Text",children:f(C,{children:[o(g,{style:{marginBottom:"5px",width:"100%",fontSize:"25px",fontFamily:"Roboto",padding:"20px 0"},onSelect:e=>{console.log("e ---> Header",e),s({text:"Header",fontSize:76,fontFamily:"Roboto"})},children:"Create header"}),o(g,{style:{marginBottom:"5px",width:"100%",fontSize:"18px",fontFamily:"Roboto",padding:"20px 0"},onSelect:e=>{console.log("e ---> Sub Header",e),s({text:"Sub Header",fontSize:44,fontFamily:"Roboto"})},children:"Create sub header"}),o(g,{style:{marginBottom:"5px",width:"100%",fontSize:"14px",fontFamily:"Roboto",padding:"20px 0"},onSelect:e=>{console.log("e ---> Body Text",e),s({text:"Body Text",fontSize:30,fontFamily:"Roboto"})},children:"Create body text"}),o(m,{shadowEnabled:!1,images:v,getPreview:e=>e.url,isLoading:!1,error:!1,onSelect:(...e)=>{console.log("args ---> ",e)},itemHeight:150,spacing:10})]})},{key:"myFonts",label:"My fonts",children:f("div",{style:{display:"flex",flexDirection:"column",height:"calc(100% - 50px)"},children:[f("label",{htmlFor:"polotno-font-upload",children:[f(h,{block:!0,onClick:()=>{let e=document.querySelector("#polotno-font-upload");e&&e.click()},children:[o(Y,{size:16}),"Upload font"]}),o("input",{type:"file",accept:".ttf, .otf, .woff, .woff2, .eot",id:"polotno-font-upload",style:{display:"none"},onChange:async e=>{let{target:a}=e,r=a.files?.[0];if(r){console.log(r);let c=await L(r),p=r.name.split(".")[0];t.addFont({fontFamily:p,name:p,url:c})}}})]}),o("div",{style:{paddingTop:"20px",overflow:"auto",height:"100%"},children:t.fonts.map((e,a)=>o(O,{font:e,onSelect:()=>{s({fontSize:80,text:"Cool text",fontFamily:e.fontFamily})},onRemove:()=>{t.find(r=>(r.type==="textbox"&&r.fontFamily===e.fontFamily&&t.set(r,{fontFamily:"Roboto"}),!1)),t.removeFont(e.fontFamily)}},a))})]})}];return o("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:o(w,{defaultActiveKey:"text",activeKey:l,items:b,onChange:i,styles:{content:{height:"100%"}}})})});export{R as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as A}from"./chunk-PSXS4WMN.js";import{a as j}from"./chunk-4HEMGHOQ.js";import{a as I,b as H}from"./chunk-YRJUN267.js";import{a as T,c as B}from"./chunk-RVXI723F.js";import{a as b}from"./chunk-WJT6VPDR.js";import{observer as u}from"mobx-react-lite";import{useEffect as S,useState as m,useCallback as O,useRef as L,useMemo as G}from"react";import{ColorPicker as W,Popover as M,Button as g,Input as E,InputNumber as P,Space as V,Slider as N,Tooltip as f}from"antd";import{cssGradient2FabricGradient as R}from"@ydesign/core";import{ChevronDown as _,TextAlignStart as J,TextAlignCenter as K,TextAlignEnd as U,TextAlignJustify as D,Bold as $,Italic as q,Underline as Q,Strikethrough as X,ListChevronsUpDown as Y,TextWrap as Z}from"lucide-react";import{FixedSizeList as tt}from"react-window";import{jsx as t,jsxs as h}from"react/jsx-runtime";var{Search:et}=E,nt=({fontFamily:o,handleClick:i,modifiers:n,store:r,isCustom:c})=>{let[s,a]=m(!c);if(console.log("FontItem ---> ",a),S(()=>{s||r.loadFont(o)},[o,s]),o==="_divider")return t("div",{style:{width:"100%",height:1,background:"#e8e8e8"}});let d=o;return t(g,{type:n.active?"primary":"text",block:!0,style:{justifyContent:"start"},onClick:()=>i(o),disabled:n.disabled,styles:{root:{fontFamily:'"'+o+'"'},content:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},children:d})},ot=({onChange:o,defaultValue:i})=>t(et,{placeholder:i,allowClear:!0,onChange:n=>{o(n.target.value)},style:{width:210}}),it=({store:o,fonts:i,activeFont:n,activeFontLabel:r,onFontSelect:c})=>{let[s,a]=m(""),d=i.filter(y=>y.toLowerCase().includes(s.toLowerCase()));return t(M,{content:h("div",{children:[t(ot,{defaultValue:"\u641C\u7D22\u5B57\u4F53",onChange:y=>a(y??"")}),t("div",{style:{paddingTop:5},children:t(tt,{itemCount:d.length,itemSize:28,width:210,height:Math.min(400,28*d.length)+10,children:({index:y,style:l})=>{let e=d[y];return t("div",{style:{...l,display:"flex",alignItems:"center",justifyContent:"center"},children:t(nt,{fontFamily:e,modifiers:{active:n===e},handleClick:()=>c(e),store:o,isCustom:o.fonts.find(p=>p.fontFamily===e)||b.find(p=>p.fontFamily===e)},e)})}})})]}),trigger:"click",children:t(g,{type:"text",style:{marginRight:5,fontFamily:'"'+n+'"',overflow:"hidden",whiteSpace:"nowrap",maxHeight:30,padding:"0 10px"},icon:t(_,{size:16,style:{display:"flex"}}),iconPlacement:"end",children:r})})},F=["left","center","right","justify"],lt=u(({elements:o,store:i})=>{let n=i.fonts.concat(b).map(a=>a.fontFamily),r=o[0].fontFamily;r.length>15&&(r=r.slice(0,15)+"...");let c=B(i.objects),s=[...new Set(c.concat("_divider").concat(n))];return t(it,{fonts:s,activeFont:o[0].fontFamily,activeFontLabel:r,store:i,onFontSelect:a=>{i.editor?.objectsHandler.setTextStyle({fontFamily:a})}})}),x=o=>o?typeof o=="string"?o:o.colorStops?JSON.stringify(o.colorStops):JSON.stringify(o):"",rt=u(({elements:o,store:i})=>{let n=o[0],r=O(()=>{let{selectionStart:l,selectionEnd:e}=n;if(l!==e&&l!==void 0){let p=n.getSelectionStyles(l,l+1);if(p.length>0&&p[0].fill!==void 0)return p[0].fill}return n.fill},[n]),[c,s]=m(()=>T(r())),a=L(!1),d=L(x(r()));S(()=>{let l=i.editor?.customCanvas?.canvas;if(!l)return;let e=()=>{if(!a.current){let p=r();d.current=x(p),s(T(p))}};return l.on("text:selection:changed",e),l.on("text:editing:entered",e),l.on("text:editing:exited",e),()=>{l.off("text:selection:changed",e),l.off("text:editing:entered",e),l.off("text:editing:exited",e)}},[i.editor?.customCanvas?.canvas,r]),S(()=>{if(!a.current){let l=r(),e=x(l);e!==d.current&&(d.current=e,s(T(l)))}},[n,r]);let y=G(()=>c,[x(c)]);return t(W,{value:y,allowClear:!0,mode:["single","gradient"],onOpenChange:l=>{if(a.current=l,!l){let e=r();d.current=x(e)}},onChange:l=>{s(l)},onChangeComplete:l=>{let e=l.toCssString();if(e.includes("gradient")){let p=R(e);i.editor?.objectsHandler.setTextStyle({fill:p})}else i.editor?.objectsHandler.setTextStyle({fill:e})}})}),st=u(({elements:o,store:i})=>{let[n,r]=m(o[0].fontSize);S(()=>{r(o[0].fontSize)},[o[0]?.fontSize,i._updateFontSize]);let c=s=>{Number.isNaN(s)||(i.editor?.objectsHandler.setTextStyle({fontSize:Number(s)}),r(Number(s)))};return t(P,{min:5,max:4*i.height,value:Math.round(n),onChange:c,style:{width:70}})}),at=u(({elements:o,store:i})=>{let n=o[0],[r,c]=m(n.textAlign),[s,a]=m(n.fontWeight),[d,y]=m(n.fontStyle),[l,e]=m(n.underline),[p,k]=m(n.linethrough),[v,w]=m(n.splitByGrapheme);return S(()=>{c(n.textAlign),a(n.fontWeight),y(n.fontStyle),e(n.underline),k(n.linethrough),w(n.splitByGrapheme)},[n]),h(V.Compact,{children:[t(f,{placement:"bottom",title:`Text align ${r}`,children:t(g,{type:"text",icon:r==="left"?t(J,{size:16,style:{display:"flex"}}):r==="center"?t(K,{size:16,style:{display:"flex"}}):r==="right"?t(U,{size:16,style:{display:"flex"}}):t(D,{size:16,style:{display:"flex"}}),onClick:()=>{let C=(F.indexOf(r)+1+F.length)%F.length,z=F[C];i.editor?.objectsHandler.setTextStyle({textAlign:z}),c(z)}})}),t(f,{placement:"bottom",title:"Bold",children:t(g,{type:s==="bold"||s==="700"?"primary":"text",icon:t($,{size:16,style:{display:"flex"}}),onClick:()=>{s==="bold"||s==="700"?(i.editor?.objectsHandler.setTextStyle({fontWeight:"normal"}),a("normal")):(i.editor?.objectsHandler.setTextStyle({fontWeight:"bold"}),a("bold"))}})}),t(f,{placement:"bottom",title:"Italic",children:t(g,{type:d==="italic"?"primary":"text",icon:t(q,{size:16,style:{display:"flex"}}),onClick:()=>{d==="italic"?(i.editor?.objectsHandler.setTextStyle({fontStyle:"normal"}),y("normal")):(i.editor?.objectsHandler.setTextStyle({fontStyle:"italic"}),y("italic"))}})}),t(f,{placement:"bottom",title:"Underline",children:t(g,{type:l?"primary":"text",icon:t(Q,{size:16,style:{display:"flex"}}),onClick:()=>{i.editor?.objectsHandler.setTextStyle({underline:!l}),e(!l)}})}),t(f,{placement:"bottom",title:"Strikethrough",children:t(g,{type:p?"primary":"text",icon:t(X,{size:16,style:{display:"flex"}}),onClick:()=>{i.editor?.objectsHandler.setTextStyle({linethrough:!p}),k(!p)}})}),t(f,{placement:"bottom",title:"Split by grapheme",children:t(g,{type:v?"primary":"text",icon:t(Z,{size:16,style:{display:"flex"}}),onClick:()=>{i.editor?.objectsHandler.setTextStyle({splitByGrapheme:!v}),w(!v)}})})]})}),ct=u(({elements:o,store:i})=>{let n=o[0],r={display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"5px",paddingBottom:"5px"},c=typeof n.lineHeight=="number"?100*n.lineHeight:120,[s,a]=m(c),[d,y]=m(n.charSpacing),l=e=>{i.editor?.objectsHandler.setTextStyle(e)};return t(M,{trigger:"click",content:h("div",{style:{padding:"0 6px",width:"230px"},children:[h("div",{style:r,children:[t("div",{children:"Line height"}),t("div",{children:t(P,{min:50,max:250,value:Math.round(s),style:{width:80},onChange:e=>{l({lineHeight:e/100}),a(e)}})})]}),t(N,{value:Math.round(s),min:50,max:250,step:1,onChange:e=>{l({lineHeight:e/100}),a(e)}}),h("div",{style:r,children:[t("div",{children:"Letter spacing"}),t("div",{children:t(P,{min:-50,max:250,value:Math.round(d/10),style:{width:80},onChange:e=>{l({charSpacing:(e??0)*10}),y((e??0)*10)}})})]}),t(N,{value:Math.round(d/10),min:-50,max:250,step:1,onChange:e=>{l({charSpacing:(e??0)*10}),y((e??0)*10)}})]}),children:t(g,{type:"text",icon:t(Y,{size:16,style:{display:"flex"}})})})}),dt={TextFill:rt,TextFontFamily:lt,TextFontSize:st,TextFontVariant:at,TextSpacing:ct,TextFilters:j,TextAiWrite:A},pt=u(({store:o,components:i})=>{let n=o.selectedElements,c=I({type:"text",usedItems:["TextFill","TextFontFamily","TextFontSize","TextFontVariant","TextSpacing","TextFilters","TextAiWrite"],components:i});return t(H,{items:c,itemRender:s=>{let a=i[s]||dt[s];return a&&t(a,{elements:n,element:n[0],store:o},s)}})}),bt=pt;export{F as a,pt as b,bt as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dropdown as M,Button as d,Modal as S,Input as g,Select as P}from"antd";import{Menu as I,Plus as B,Grid2X2 as D,Star as T,ShoppingBag as b,FileText as F,Presentation as j,Share2 as H,Printer as L,Link2 as O,Image as W,FileImage as _,Smartphone as q,Monitor as A,Square as E,Languages as G}from"lucide-react";import{useState as l}from"react";import{Fragment as $,jsx as t,jsxs as i}from"react/jsx-runtime";var U=[{key:"all",label:"\u5168\u90E8",icon:D},{key:"common",label:"\u5E38\u7528\u5C3A\u5BF8",icon:T},{key:"ecommerce",label:"\u7535\u5546\u7269\u6599",icon:b},{key:"office",label:"\u884C\u653F\u529E\u516C",icon:F},{key:"presentation",label:"\u6F14\u793A\u6587\u7A3F",icon:j},{key:"social",label:"\u793E\u4EA4\u5A92\u4F53",icon:H},{key:"print",label:"\u5370\u5237\u7269\u6599",icon:L}],x=[{name:"\u7535\u5546\u4E3B\u56FE\uFF081:1\uFF09",width:1440,height:1440,unit:"px"},{name:"\u7535\u5546\u4E3B\u56FE\uFF081:1\uFF09",width:800,height:800,unit:"px"},{name:"\u624B\u673A\u6D77\u62A5",width:1242,height:2208,unit:"px"},{name:"\u5C0F\u7EA2\u4E66\u5C01\u9762",width:1242,height:1656,unit:"px"},{name:"\u7AD6\u7248\u89C6\u9891\u5C01\u9762",width:1080,height:1920,unit:"px"},{name:"PPT\uFF0816:9\uFF09",width:1920,height:1080,unit:"px"}],X=[{label:"\u521B\u5EFA\u8BBE\u8BA1",key:"new_design",icon:t(B,{size:16})},{label:"\u8BED\u8A00",key:"language",icon:t("div",{style:{height:22,display:"flex",alignItems:"center"},children:t(G,{size:16})}),children:[{key:"en",label:"English"},{key:"zh",label:"\u4E2D\u6587"}]}],R=({store:m})=>{let[y,o]=l(!1),[v,f]=l("all"),[s,c]=l(800),[n,h]=l(800),[r,w]=l("px"),N=({key:e})=>{e==="new_design"&&o(!0)},k=()=>{let e=s,a=n;r==="mm"?(e=Math.round(s*3.7795275591),a=Math.round(n*3.7795275591)):r==="cm"&&(e=Math.round(s*37.795275591),a=Math.round(n*37.795275591)),m.setSize({width:e,height:a}),o(!1)},u=e=>{let a=e.width,p=e.height;e.unit==="mm"&&(a=Math.round(e.width*3.7795275591),p=Math.round(e.height*3.7795275591)),m.setSize({width:a,height:p}),o(!1)},C=()=>{o(!1)},z=()=>{c(n),h(s)};return i($,{children:[t(M,{menu:{items:X,onClick:N},trigger:["click"],styles:{root:{width:188}},children:t(d,{type:"text",children:t(I,{size:16})})}),t(S,{title:"\u521B\u5EFA\u8BBE\u8BA1",open:y,onCancel:C,footer:null,maskClosable:!1,width:840,styles:{container:{height:540,overflow:"hidden"},body:{height:488}},children:i("div",{className:"flex",style:{padding:"16px 0px 0px 0px",height:"100%"},children:[t("div",{className:"w-40 border-r border-gray-100 pr-2",children:U.map(e=>{let a=e.icon;return i("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg cursor-pointer mb-1 ${v===e.key?"bg-blue-500 text-white":"hover:bg-gray-100"}`,onClick:()=>f(e.key),children:[t(a,{size:16}),t("span",{className:"text-sm",children:e.label})]},e.key)})}),i("div",{className:"flex-1 pl-6 overflow-y-auto",children:[i("div",{className:"flex gap-4 mb-6",children:[i("div",{className:"flex-1 flex items-center gap-2 px-4 py-3 border border-gray-200 rounded-lg cursor-pointer hover:border-blue-400",children:[t(W,{size:20,className:"text-blue-500"}),t("span",{children:"\u6253\u5F00\u56FE\u7247"})]}),i("div",{className:"flex-1 flex items-center gap-2 px-4 py-3 border border-gray-200 rounded-lg cursor-pointer hover:border-blue-400",children:[t(_,{size:20,className:"text-blue-500"}),t("span",{children:"\u6253\u5F00PSD"})]})]}),i("div",{className:"mb-6",children:[t("h3",{className:"text-base font-medium mb-3",children:"\u5E38\u7528\u5C3A\u5BF8"}),i("div",{className:"flex items-center gap-2 mb-4",children:[t(g,{type:"number",value:s,onChange:e=>c(Number(e.target.value)),suffix:"\u5BBD",style:{width:100}}),t(d,{type:"text",icon:t(O,{size:16}),onClick:z}),t(g,{type:"number",value:n,onChange:e=>h(Number(e.target.value)),suffix:"\u9AD8",style:{width:100}}),t(P,{value:r,onChange:w,style:{width:100},options:[{value:"px",label:"px \u50CF\u7D20"},{value:"mm",label:"mm \u6BEB\u7C73"},{value:"cm",label:"cm \u5398\u7C73"}]}),t(d,{type:"primary",onClick:k,children:"\u521B\u5EFA"})]}),t("div",{className:"grid grid-cols-6 gap-3",children:x.map((e,a)=>i("div",{className:"flex flex-col items-center p-3 border border-gray-200 rounded-lg cursor-pointer hover:border-blue-400 hover:shadow-sm",onClick:()=>u(e),children:[t("div",{className:"w-10 h-10 flex items-center justify-center mb-2 text-gray-400",children:e.width===e.height?t(E,{size:24}):e.width<e.height?t(q,{size:24}):t(A,{size:24})}),t("span",{className:"text-xs text-center text-gray-700",children:e.name}),i("span",{className:"text-xs text-gray-400",children:[e.width,"*",e.height," ",e.unit]})]},a))})]}),i("div",{children:[i("div",{className:"flex items-center justify-between mb-3",children:[t("h3",{className:"text-base font-medium",children:"\u7535\u5546\u7269\u6599"}),t("span",{className:"text-sm text-blue-500 cursor-pointer hover:underline",children:"\u67E5\u770B\u66F4\u591A >"})]}),t("div",{className:"grid grid-cols-6 gap-3",children:x.slice(0,4).map((e,a)=>i("div",{className:"flex flex-col items-center p-3 border border-gray-200 rounded-lg cursor-pointer hover:border-blue-400 hover:shadow-sm",onClick:()=>u(e),children:[t("div",{className:"w-10 h-10 flex items-center justify-center mb-2 text-gray-400",children:t(b,{size:24})}),t("span",{className:"text-xs text-center text-gray-700",children:e.name}),i("span",{className:"text-xs text-gray-400",children:[e.width,"*",e.height," ",e.unit]})]},a))})]})]})]})})]})};export{R as a};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import{c as x}from"./chunk-WCHGSVUC.js";import a from"styled-components";import{useRef as v,useEffect as O}from"react";import{Spin as D}from"antd";import{jsx as n,jsxs as b}from"react/jsx-runtime";var W=a.div`
|
|
2
|
+
height: 100%;
|
|
3
|
+
overflow: auto;
|
|
4
|
+
`,j=a.div`
|
|
5
|
+
width: 33%;
|
|
6
|
+
float: left;
|
|
7
|
+
`,P=a.div`
|
|
8
|
+
padding: 4px;
|
|
9
|
+
width: 100%;
|
|
10
|
+
&:hover .credit {
|
|
11
|
+
opacity: 1;
|
|
12
|
+
}
|
|
13
|
+
${x(".credit {opacity: 1;}")}
|
|
14
|
+
`,z=a.div`
|
|
15
|
+
border-radius: 5px;
|
|
16
|
+
position: relative;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
box-shadow: ${e=>e.$dataShadowenabled?"0 0 5px rgba(16, 22, 26, 0.3)":""};
|
|
19
|
+
padding: ${e=>e.$spacing?e.$spacing+"px":"0px"};
|
|
20
|
+
`,F=a.img`
|
|
21
|
+
width: 100%;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
display: block;
|
|
24
|
+
max-height: 300px;
|
|
25
|
+
min-height: 50px;
|
|
26
|
+
object-fit: contain;
|
|
27
|
+
`,H=a.div`
|
|
28
|
+
position: absolute;
|
|
29
|
+
bottom: 0px;
|
|
30
|
+
left: 0px;
|
|
31
|
+
font-size: 10px;
|
|
32
|
+
padding: 3px;
|
|
33
|
+
padding-top: 10px;
|
|
34
|
+
text-align: center;
|
|
35
|
+
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
|
|
36
|
+
width: 100%;
|
|
37
|
+
opacity: 0;
|
|
38
|
+
color: white;
|
|
39
|
+
`,I=a.p`
|
|
40
|
+
text-align: center;
|
|
41
|
+
padding: 30px;
|
|
42
|
+
`,G=({url:e,onSelect:l,shadowEnabled:t,className:g,itemHeight:i,crossOrigin:s,onLoad:p,credit:d,spacing:m})=>n(P,{className:"ydesign-close-panel",onClick:l,children:b(z,{$spacing:m,$dataShadowenabled:t,className:"border-1 border-gray-200",children:[n(F,{className:g,style:{height:i??"auto "},src:e,draggable:!0,loading:"lazy",crossOrigin:s,onLoad:p}),d&&n(H,{className:"credit",children:d})]})}),J=({images:e,rowsNumber:l,isLoading:t,getPreview:g,getCredit:i,getImageClassName:s,onSelect:p,crossOrigin:d="anonymous",shadowEnabled:m,itemHeight:N,error:y,hideNoResults:S=!1,spacing:$})=>{let c=l||2,T=v(null),f=[];for(let r=0;r<c;r++)f.push((e||[]).filter((w,o)=>o%c===r));let u=v(null),h=()=>{},R=()=>{h()};return O(()=>(h(),()=>{u.current&&(window.clearTimeout(u.current),u.current=null)}),[e?.length,t]),b(W,{ref:T,onScroll:()=>{},children:[f.map((r,w)=>b(j,{style:{width:100/c+"%"},children:[r.map((o,C)=>n(G,{image:o,url:g(o),onSelect:(L,k,E)=>{p(o,L,k,E)},credit:i&&i(o),crossOrigin:d,shadowEnabled:m,itemHeight:N,className:s&&s(o),onLoad:R,spacing:$},C)),t&&n("div",{style:{padding:30},children:n(D,{})})]},w)),!t&&(!e||!e.length)&&!y&&!S&&n(I,{children:"No results found"}),y&&n(I,{children:"Loading is failed..."})]})};export{J as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as x}from"./chunk-CB23VFSC.js";import{b as k}from"./chunk-3TO57JPN.js";import{a as b}from"./chunk-M4S26KQG.js";import{a as I}from"./chunk-EOBIVNFF.js";import{a as
|
|
1
|
+
import{a as x}from"./chunk-CB23VFSC.js";import{b as k}from"./chunk-3TO57JPN.js";import{a as b}from"./chunk-M4S26KQG.js";import{a as I}from"./chunk-EOBIVNFF.js";import{a as f}from"./chunk-4HEMGHOQ.js";import{a as v}from"./chunk-CS6Z4TQU.js";import{a as p}from"./chunk-MXZ6RXT3.js";import{a as y,b as u}from"./chunk-YRJUN267.js";import{b as h}from"./chunk-MQZE5LZU.js";import{k as g,l as d}from"./chunk-7NNOHYKX.js";import{observer as m}from"mobx-react-lite";import{Button as c,Tooltip as T,Popover as P}from"antd";import{Crop as S}from"lucide-react";import w from"styled-components";import{jsx as o}from"react/jsx-runtime";var F=Object.keys(g),E=[{width:300,height:300,fill:"lightgray",stroke:"#0c0c0c",strokeWidth:0,url:""}],C=[];F.forEach(t=>{E.forEach(e=>{C.push(Object.assign({subType:t},e))})});C.forEach(t=>{t.url=x(d(t))});var B=w.div`
|
|
2
2
|
height: 220px;
|
|
3
3
|
`,l={root:{padding:"0 7px"}},R=({element:t,store:e})=>o(c,{type:"text",styles:l,onClick:async()=>{let i=e.width+2*e.bleed,s=e.height+2*e.bleed,r=t.getOriginalSize(),a={width:r.width,height:r.height},n=k({width:i,height:s},a);t.set({cropX:n.cropX,cropY:n.cropY,width:n.width,height:n.height,scaleX:i/n.width,scaleY:s/n.height,left:-e.bleed,top:-e.bleed}),t.setCoords(),e.editor?.customCanvas?.canvas?.requestRenderAll()},children:"Fit to page"}),H=m(({element:t,store:e})=>o(T,{title:"Crop",children:o(c,{type:"text",styles:{root:{padding:"0 7px"}},onClick:()=>{let i=e.editor?.layerHandler.getLayer();e.editor?.imageCropHandler.cropStart(t,i,t.getSrc())},children:o(S,{size:16})})})),U=m(({element:t,store:e})=>{let i=h.reduce((r,a)=>r.concat(a.children),[]),s=Math.ceil(i.length/4)||1;return t.clipPath?o(c,{type:"text",styles:l,onClick:()=>{t.set({clipPath:null}),e.editor?.customCanvas?.canvas?.requestRenderAll(),e._triggerUpdate()},children:"Remove mask"}):o(P,{styles:{container:{padding:"5px 10px"}},content:o("div",{style:{maxHeight:313,overflowY:"auto"},children:o(B,{style:{height:80*s,width:300},children:o("div",{className:p("shape-list","flex flex-wrap content-start mb-2"),children:i.map((r,a)=>o("div",{className:p("shape-item","w-[25%] h-0 pb-[25%] relative cursor-pointer shrink-0 mb-[1.2%]"),onClick:()=>{e.editor?.objectsHandler.createMaskElement(t,r),e._triggerUpdate()},children:o("div",{className:p("shape-content","absolute inset-0 flex justify-center items-center"),children:o("svg",{overflow:"visible",width:"50",height:"50",children:o("g",{transform:`scale(${50/r.viewBox[0]}, ${50/r.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:o("path",{className:"shape-path",d:r.path,fill:"#ccc",strokeMiterlimit:8,strokeLinecap:"butt"})})})})},a))})})}),trigger:"click",children:o(c,{type:"text",styles:l,children:"Apply mask"})})}),A={ImageFlip:v,ImageFilters:f,ImageFitToBackground:R,ImageCrop:H,ImageClip:U,ImageRemoveBackground:I,ImageEraserPen:b},L=m(({store:t,components:e})=>{let i=t.selectedElements,r=y({type:"text",usedItems:["ImageFlip","ImageFilters","ImageFitToBackground","ImageClip","ImageCrop","ImageRemoveBackground","ImageEraserPen"],components:e});return o(u,{items:r,itemRender:a=>{let n=e[a]||A[a];return n&&o(n,{elements:i,element:i[0],store:t},a)}})}),K=L;export{R as a,H as b,U as c,L as d,K as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as t,c as e,d as a,e as i,f as o,g as h,h as p,i as x,j as n}from"./chunk-7NNOHYKX.js";var r=(L=>(L.ROUND_RECT="roundRect",L.ROUND_RECT_DIAGONAL="roundRectDiagonal",L.ROUND_RECT_SINGLE="roundRectSingle",L.ROUND_RECT_SAMESIDE="roundRectSameSide",L.CUT_RECT_DIAGONAL="cutRectDiagonal",L.CUT_RECT_SINGLE="cutRectSingle",L.CUT_RECT_SAMESIDE="cutRectSameSide",L.MESSAGE="message",L.ROUND_MESSAGE="roundMessage",L.L="L",L.RING_RECT="ringRect",L.PLUS="plus",L.TRIANGLE="triangle",L.PARALLELOGRAM_LEFT="parallelogramLeft",L.PARALLELOGRAM_RIGHT="parallelogramRight",L.TRAPEZOID="trapezoid",L.BULLET="bullet",L.INDICATOR="indicator",L))(r||{}),M=[{name:"\u57FA\u7840",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",type:"rect"},{viewBox:[200,200],path:t({width:200,height:200}),type:"circle"},{viewBox:[200,200],path:"M 0,100 A 100,50 0 1 1 200,100 A 100,50 0 1 1 0,100 Z",type:"ellipse"},{viewBox:[200,200],path:"M 100,50 L 200,150 L 0,150 Z",type:"triangle"}]},{name:"\u77E9\u5F62",children:[{viewBox:[200,200],path:"M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z"},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z"},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z"},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 50 200 Q 0 200 0 150 L 0 0 Z"},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z"}]},{name:"\u5E38\u89C4\u5F62\u72B6",children:[{viewBox:[200,200],path:e({width:200,height:200})},{viewBox:[200,200],path:a({width:200,height:200})},{viewBox:[200,200],path:i({width:200,height:200})},{viewBox:[200,200],path:o({width:200,height:200})},{viewBox:[200,200],path:h({width:200,height:200})},{viewBox:[200,200],path:p({width:200,height:200})},{viewBox:[200,200],path:x({width:200,height:200})},{viewBox:[200,200],path:n({width:200,height:200})}]},{name:"\u5E38\u7528\u5F62\u72B6",children:[{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:"triangle"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:"parallelogramLeft"},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:"parallelogramRight"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:"trapezoid"},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:"bullet"},{viewBox:[200,200],path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z",pathFormula:"indicator"},{viewBox:[200,200],path:"M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z"},{viewBox:[200,200],path:"M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z"},{viewBox:[200,200],path:"M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z"},{viewBox:[200,200],path:"M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z",pathFormula:"L"},{viewBox:[200,200],path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z",pathFormula:"ringRect"},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z"},{viewBox:[200,200],path:"M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z",pathFormula:"plus"},{viewBox:[200,200],path:"M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z",pathFormula:"message"},{viewBox:[200,200],path:"M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z",pathFormula:"roundMessage"},{viewBox:[200,200],path:"M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z"},{viewBox:[200,200],path:"M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z"}]}],l=[{path:"M 0 0 L 20 20",style:"solid",points:["",""],data:[{x:0,y:0},{x:200,y:0}]}],B=[{name:"\u76F4\u7EBF",children:[{path:"M 0 0 L 20 20",style:"solid",points:["",""],data:[{x:0,y:0},{x:200,y:0}]},{path:"M 0 0 L 20 20",style:"dashed",points:["",""],data:[{x:0,y:0},{x:200,y:0}]},{path:"M 0 0 L 20 20",style:"solid",points:["","arrow"],data:[{x:0,y:0},{x:200,y:0}]},{path:"M 0 0 L 20 20",style:"dashed",points:["","arrow"],data:[{x:0,y:0},{x:200,y:0}]},{path:"M 0 0 L 20 20",style:"solid",points:["","dot"],data:[{x:0,y:0},{x:200,y:0}]}]},{name:"\u6298\u7EBF\u3001\u66F2\u7EBF",children:[{path:"M 0 0 L 0 20 L 20 20",style:"solid",points:["","arrow"],isBroken:!0,data:[{x:0,y:0},{x:0,y:100},{x:200,y:100}]},{path:"M 0 0 Q 0 20 20 20",style:"solid",points:["","arrow"],isCurve:!0,data:[{x:0,y:0},{x:200,y:0}]},{path:"M 0 0 C 20 0 0 20 20 20",style:"solid",points:["","arrow"],isCubic:!0,data:[{x:0,y:0},{x:200,y:0}]}]}];export{r as a,M as b,l as c,B as d};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import{a as o}from"./chunk-IQ7O55C5.js";import{Input as a}from"antd";import{observer as i}from"mobx-react-lite";import{jsx as l,jsxs as n}from"react/jsx-runtime";var r=[{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/dba81d9a-9fd0-480b-8738-da150b9f051b.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/4a5725d6176da33dfd1881abcba6ad3b.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:2208,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:2208,workareaLeft:-140.5,workareaTop:-713.5,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:2208,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"cc3e2664-b61a-428b-84bd-ae22755701dd",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/fd2fcd137a4e849dd24867c48b3a4cb7.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u80CC\u666F"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:1097.6100000000001,top:1507,width:55.88,height:354.6,fill:{type:"linear",coords:{x1:26.5,y1:342,x2:26.5,y2:0},colorStops:[{offset:0,color:`rgb(255,214,
|
|
2
|
+
116)`,opacity:1},{offset:.49,color:`rgb(255,243,
|
|
3
|
+
225)`,opacity:1},{offset:1,color:`rgb(255,214,
|
|
4
|
+
116)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u65B0\u5C81\u542F\u7965\u745E",fontSize:55.8824459752298,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1.1538462250615245,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!0,id:"47e96074-84e0-4d5e-9e30-e5ba4113adb7",name:"\u65B0\u5C81\u542F\u7965\u745E",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u65B0\u5C81\u542F\u7965\u745E"]},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:995.61,top:1507,width:72,height:354.6,fill:{type:"linear",coords:{x1:27,y1:342,x2:27,y2:0},colorStops:[{offset:0,color:`rgb(255,214,
|
|
5
|
+
116)`,opacity:1},{offset:.49,color:`rgb(255,243,
|
|
6
|
+
225)`,opacity:1},{offset:1,color:`rgb(255,214,
|
|
7
|
+
116)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u6625\u98CE\u5165\u753B\u5802",fontSize:55.8824459752298,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1.1538462250615245,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!0,id:"d32d07c8-5f98-443a-a005-0f4c91281109",name:"\u6625\u98CE\u5165\u753B\u5802",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u6625\u98CE\u5165\u753B\u5802"]},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:915.29,top:1090.5,width:287,height:123.87,fill:{type:"linear",coords:{x1:49.5,y1:287,x2:49.5,y2:0},colorStops:[{offset:0,color:`rgb(255,203,
|
|
8
|
+
131)`,opacity:1},{offset:.49,color:`rgb(255,243,
|
|
9
|
+
225)`,opacity:1},{offset:1,color:`rgb(247,183,
|
|
10
|
+
119)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:90,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"HAPPY\rNEW YEAR",fontSize:54.80779005918938,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"d3d5ca0a-41ad-476e-a2fb-5b3ecd2c08d4",name:"HAPPY NEW YEAR",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["HAPPY NEW YEAR"]},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:918,top:667,width:304,height:839,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"dc15f2c5-3234-46a9-b282-52eeb9014bcb",name:"\u56FE\u5C42 2",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/106d96891e7043150782734dc7fb975b.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 2"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:857.25,top:921.44,width:75,height:124,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1.07,scaleY:1.07,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"e31de110-8d90-4514-8dc0-4e31d211e9a8",name:"\u56FE\u5C42 1",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/aacbe7a0a73c08faa0c8f643b449d742.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 1"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:871.13,top:947.04,width:44,height:81.36,fill:`rgba(245,
|
|
11
|
+
39,
|
|
12
|
+
15,
|
|
13
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1.07,scaleY:1.07,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u7EB3\u798F",fontSize:36,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!0,id:"d66fcd42-b680-4cb5-a9ee-1dd79955d93e",name:"\u7EB3\u798F",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u7EB3\u798F"],styles:""}],width:1242,height:2208},width:1242,height:2208,name:"\u6625\u8282\u8282\u65E5\u795D\u798F\u901A\u7528\u6D77\u62A5"},{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/938bcbef-83e8-4768-aadb-04eb38acf396.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/e283dd69c51c1e7ade0817995ab24382.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:2208,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:2208,workareaLeft:-137,workareaTop:-679.5,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:2208,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"b7c7d6bb-81f2-4eeb-a31d-b3f28fd4d666",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/4bc5e40523b34ed7e597c887ab87343f.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u80CC\u666F"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:56,top:106,width:844,height:346.57,fill:`rgba(149,
|
|
14
|
+
0,
|
|
15
|
+
4,
|
|
16
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"HAPPY\rNEW YEAR",fontSize:144,fontWeight:"normal",fontFamily:"SourceHanSerifCN-Medium",fontStyle:"normal",lineHeight:1.129842863772722,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"a984f412-967c-499e-a5d8-d767efec1d91",name:"HAPPY NEW YEAR",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["HAPPY NEW YEAR"],styles:""},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:203.88,top:824,width:69.1,height:312.33,fill:{type:"linear",coords:{x1:33.5,y1:309,x2:33.5,y2:0},colorStops:[{offset:0,color:`rgb(255,203,
|
|
17
|
+
131)`,opacity:1},{offset:.49,color:`rgb(255,243,
|
|
18
|
+
225)`,opacity:1},{offset:1,color:`rgb(247,183,
|
|
19
|
+
119)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:{blur:0,color:"rgba(148,4,4,0.4)",offsetX:8.356238925925012,offsetY:9.958577760546714,id:5},visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u8FCE\u6625\u7EB3\u798F",fontSize:69.10005533868951,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:40,path:null,minWidth:20,splitByGrapheme:!0,id:"3fca7794-6c56-4da3-b719-f27e7c5eeca6",name:"\u8FCE\u6625\u7EB3\u798F",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u8FCE\u6625\u7EB3\u798F"]},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:107,top:824,width:86,height:312.33,fill:{type:"linear",coords:{x1:31.5,y1:311,x2:31.5,y2:0},colorStops:[{offset:0,color:`rgb(255,203,
|
|
20
|
+
131)`,opacity:1},{offset:.49,color:`rgb(255,243,
|
|
21
|
+
225)`,opacity:1},{offset:1,color:`rgb(247,183,
|
|
22
|
+
119)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:{blur:0,color:"rgba(148,4,4,0.4)",offsetX:8.356238925925012,offsetY:9.958577760546714,id:7},visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u8D3A\u5C81\u5B89\u5EB7",fontSize:69.10005533868951,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:40,path:null,minWidth:20,splitByGrapheme:!0,id:"da4b7baa-6b14-4b26-82f5-0eef069719a6",name:"\u8D3A\u5C81\u5B89\u5EB7",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u8D3A\u5C81\u5B89\u5EB7"]},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:331,top:478,width:52,height:86,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"422f6261-9b75-4c7c-af81-a5585dee69c5",name:"\u56FE\u5C42 1",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/b597fc4b134c82c540ba8a44bfc1bb5e.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 1"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:342,top:485,width:38,height:70.06,fill:`rgba(188,
|
|
23
|
+
5,
|
|
24
|
+
20,
|
|
25
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u4F20\u7EDF",fontSize:31,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:660,path:null,minWidth:20,splitByGrapheme:!0,id:"c35074bd-b77c-4be1-aae6-78a0f9a30eab",name:"\u4F20\u7EDF",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u4F20\u7EDF"],styles:""},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:55,top:457,width:355,height:326,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"328c23d0-fd02-4d70-a604-63125f42ba93",name:"\u56FE\u5C42 4 \u62F7\u8D1D",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/0c8aa7c3a5cde7132f43a6820cad44ee.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 4 \u62F7\u8D1D"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:63,top:146,width:308,height:362,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"2fb75c70-7a9b-4a46-a1a7-660bd397e86e",name:"\u56FE\u5C42 4",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/96f6aa98d97d71b1ffc4e1ba5da6709d.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 4"],crossOrigin:"anonymous"}],width:1242,height:2208},width:1242,height:2208,name:"\u6625\u8282\u8282\u65E5\u795D\u798F\u901A\u7528\u5168\u5C4F\u7AD6\u7248\u6D77\u62A5"},{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/3fb89f34-721e-4ebb-9d7f-eeef63983a7f.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/055f5df108627fc3c7b4d54b76dc4eba.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:1656,workareaLeft:-166.5,workareaTop:-436,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"f903c578-40ad-4477-8aa5-ddc3dca648f4",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/cd05a3e85500025196d6fa868bb9b11e.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u80CC\u666F"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:1102,top:91,width:40,height:41,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"07470a27-873e-428b-8f6e-31893b6828d0",name:"\u798F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/a43e91d8f722dd53970a647bb6354248.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u798F"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:832,top:144,width:324.95,height:56.5,fill:`rgba(255,
|
|
26
|
+
206,
|
|
27
|
+
110,
|
|
28
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"YEAR OF THE",fontSize:50,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"ec938ae6-1c55-4f45-ad9b-70d1357fab79",name:"YEAR OF THE",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["YEAR OF THE"],styles:""},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:988,top:312,width:175.74,height:49.72,fill:`rgba(255,
|
|
29
|
+
206,
|
|
30
|
+
110,
|
|
31
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u4E19\u5348\u9A6C\u5E74",fontSize:44,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"12f89c95-fd48-43f0-a3f2-6ec2a98f3acb",name:"\u4E19\u5348\u9A6C\u5E74",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u4E19\u5348\u9A6C\u5E74"],styles:""},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:1092,top:382,width:66,height:298.32,fill:`rgba(255,
|
|
32
|
+
206,
|
|
33
|
+
110,
|
|
34
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u65B0\u6625\u5FEB\u4E50",fontSize:66,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!0,id:"957a6535-134b-4b6b-95a5-201577fcc96f",name:"\u65B0\u6625\u5FEB\u4E50",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u65B0\u6625\u5FEB\u4E50"],styles:""},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:878,top:203,width:289.08,height:100.57,fill:`rgba(255,
|
|
35
|
+
206,
|
|
36
|
+
110,
|
|
37
|
+
1)`,stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"HORSE",fontSize:89,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"8099c5d2-192a-4425-a74b-66214e88e0cf",name:"HORSE",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["HORSE"],styles:""}],width:1242,height:1656},width:1242,height:1656,name:"\u7B80\u7EA6\u6625\u8282\u795D\u798F"},{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/7b551060-926d-4daf-b306-4695d4954e1e.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/68700b718337c33ef18d92a9077e7e8e.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:1656,workareaLeft:-166.5,workareaTop:-436,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"a57f55ca-fa2d-47a6-a092-f0a6672f8284",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/da50ca2f4a0328d4dc542f438e3348ed.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u80CC\u666F"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:1086,width:1242,height:570,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:.83,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"541babd3-8de4-417a-984e-03007892f844",name:"\u56FE\u5C42 5 \u62F7\u8D1D",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/682f5de7812ee79eca8a0621fe1c60d7.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 5 \u62F7\u8D1D"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:109.5,top:1268,width:1023,height:264,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"30c59470-8fb9-48ac-b884-6df5c86908c3",name:"\u56FE\u5C42 8",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/20f72be9f16633ab281f189ee89cf382.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 8"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:939,top:1086,width:183,height:156,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"ed4a416e-82c7-4e1b-bd8f-e582f8b6e6a0",name:"\u56FE\u5C42 15",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/b9f474d2cd572b28715a6557728c1673.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 15"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:282,width:164,height:156,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"cd3e0a42-ad4f-40f0-8359-23856ca293e4",name:"\u56FE\u5C42 15 \u62F7\u8D1D",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/787d47d1feeea30f872960c711907412.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 15 \u62F7\u8D1D"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:422,top:61,width:183,height:156,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"66cea452-81ac-4d76-9b34-10393082364a",name:"\u56FE\u5C42 15 \u62F7\u8D1D 2",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/987e92d69fd77c6e67f18c1503911e97.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 15 \u62F7\u8D1D 2"],crossOrigin:"anonymous"},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:1090,top:632,width:152,height:130,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"78500120-b11f-4473-ab18-4f4b58b0bbc0",name:"\u56FE\u5C42 15 \u62F7\u8D1D 3",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/eaf133de72a39ab439753120a51ec06b.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u56FE\u5C42 15 \u62F7\u8D1D 3"],crossOrigin:"anonymous"}],width:1242,height:1656},width:1242,height:1656,name:"\u7B80\u7EA6\u5149\u70B9\u6625\u8282\u795D\u798F"},{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/e33d5e91-bfab-44bc-807a-7d5498446aba.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/012c42fae1829b6314617544e2511c55.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:1656,workareaLeft:-166.5,workareaTop:-436,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"2cb7cb9d-80ae-40e7-ac6e-c03988cfd79d",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/58d1ee5fdaaaf9682b04cac623c2e7b0.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,layerPath:["\u80CC\u666F"],crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:199.05,top:99,width:842.91,height:101.7,fill:{type:"linear",coords:{x1:474,y1:76,x2:474,y2:0},colorStops:[{offset:0,color:`rgb(207,131,
|
|
38
|
+
26)`,opacity:1},{offset:1,color:`rgb(231,169,
|
|
39
|
+
85)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:{blur:16,color:"rgba(255,255,255,1)",offsetX:0,offsetY:0,id:5},visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"HAPPY NEW YEAR",fontSize:90,fontWeight:"normal",fontFamily:"SourceHanSerifCN-Medium",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"3dde4958-1c05-4320-8c74-fad1c8dc472b",name:"HAPPY NEW YEAR",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["HAPPY NEW YEAR"]},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:488.5,top:215,width:264,height:74.58,fill:{type:"linear",coords:{x1:129,y1:64,x2:129,y2:0},colorStops:[{offset:0,color:`rgb(207,131,
|
|
40
|
+
26)`,opacity:1},{offset:1,color:`rgb(231,169,
|
|
41
|
+
85)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"\u9A6C\u5E74\u5927\u5409",fontSize:66,fontWeight:"normal",fontFamily:"SourceHanSerifCN-Medium",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"5775d12f-91e1-45ba-8094-6be7918c0d27",name:"\u9A6C\u5E74\u5927\u5409",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0,layerPath:["\u9A6C\u5E74\u5927\u5409"]}],width:1242,height:1656},width:1242,height:1656,name:"\u7B80\u7EA6\u6625\u8282\u795D\u798F"},{url:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/psd/20017af2f28b3047c19c040e39e80611/5d878b65-461f-4182-8dad-cb06a141adf4.png",thumb:"https://zh.gtimg.com/m-1/atom-record/resource/upload-one/616136edba8103014b0b7797/d2492995c3c66322ce8be8223c938bbc.png?imageMogr2/thumbnail/!50p",content:{objects:[{type:"rect",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!1,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"#fff",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"workarea",name:"",src:null,lockMovementX:!0,lockMovementY:!0,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!0,lockScalingY:!0,lockSkewingX:!1,lockSkewingY:!1,hasControls:!1,workareaWidth:1242,workareaHeight:1656,workareaLeft:-166.5,workareaTop:-436,filters:[],selectable:!1,crossOrigin:null,edited:1},{type:"image",version:"4.4.0",originX:"left",originY:"top",left:0,top:0,width:1242,height:1656,stroke:null,strokeWidth:0,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"fill",globalCompositeOperation:"source-over",skewX:0,skewY:0,cropX:0,cropY:0,id:"ce855783-d10f-486c-b02b-5b2c194912a3",name:"\u80CC\u666F",src:"https://zh.gtimg.com/e9/atom-parser/psd/upload-parse-only/616136edba8103014b0b7797/pstemplate/assets/d80864ba9d4adcd5ed0b7765a388cb13.png",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!1,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,filters:[],selectable:!0,crossOrigin:"anonymous"},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:353.73,top:129,width:533.55,height:146.4,fill:{type:"linear",coords:{x1:301,y1:102,x2:301,y2:0},colorStops:[{offset:0,color:`rgb(255,243,
|
|
42
|
+
225)`,opacity:1},{offset:.99,color:`rgb(255,205,
|
|
43
|
+
100)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"CHINESE",fontSize:129.5599333919183,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"f4501742-c6e7-4765-ac2d-20cf76a02f73",name:"CHINESE",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0},{type:"textbox",version:"4.4.0",originX:"left",originY:"top",left:452.61,top:272,width:335.79,height:73.72,fill:{type:"linear",coords:{x1:184,y1:50,x2:184,y2:0},colorStops:[{offset:0,color:`rgb(255,243,
|
|
44
|
+
225)`,opacity:1},{offset:.99,color:`rgb(255,205,
|
|
45
|
+
100)`,opacity:1}],offsetX:0,offsetY:0,gradientUnits:"pixels",gradientTransform:null},stroke:null,strokeWidth:1,strokeDashArray:null,strokeLineCap:"butt",strokeDashOffset:0,strokeLineJoin:"miter",strokeUniform:!0,strokeMiterLimit:4,scaleX:1,scaleY:1,angle:0,flipX:!1,flipY:!1,opacity:1,shadow:null,visible:!0,backgroundColor:"",fillRule:"nonzero",paintFirst:"stroke",globalCompositeOperation:"source-over",skewX:0,skewY:0,text:"NEW YEAR",fontSize:65.23939908387375,fontWeight:"normal",fontFamily:"Huiwen-mingchao",fontStyle:"normal",lineHeight:1,underline:!1,overline:!1,linethrough:!1,textAlign:"left",textBackgroundColor:"",charSpacing:0,path:null,minWidth:20,splitByGrapheme:!1,id:"634cbf93-5e84-425a-ac4e-774527f90bc8",name:"NEW YEAR",blendingMode:"normal",lockMovementX:!1,lockMovementY:!1,lockRotation:!1,lockScalingFlip:!0,lockScalingX:!1,lockScalingY:!1,lockSkewingX:!1,lockSkewingY:!1,hasControls:!0,editable:!0,selectable:!0}],width:1242,height:1656},width:1242,height:1656,name:"\u6625\u8282\u7B80\u7EA6\u98CE\u795D\u798F"}],{Search:s}=a,p=i(({store:t})=>n("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[l("div",{style:{padding:"0 4px",marginBottom:10},children:l(s,{placeholder:"Search templates..."})}),l(o,{shadowEnabled:!1,images:r,getPreview:e=>e.thumb,isLoading:!1,error:!1,onSelect:e=>{console.log("args ---> ",e),t.loadJSON(e.content)}})]}));export{p as a};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as T,b as w,c as m}from"./chunk-5C2MNUBC.js";import{useState as h,useEffect as z,useRef as N}from"react";import{observer as U}from"mobx-react-lite";import{Button as b,Switch as A,Tooltip as L,InputNumber as M,Select as R}from"antd";import{Info as W,Instagram as y,Linkedin as v,Twitter as g,Video as u,Printer as a}from"lucide-react";import{jsx as i,jsxs as n}from"react/jsx-runtime";var E=[{name:"Instagram",icon:i(y,{size:16}),sizes:[["Post",1080,1080,"px",i(y,{})],["Story",1080,1920,"px",i(y,{})],["Ad",1080,1080,"px",i(y,{})]]},{name:"LinkedIn",icon:i(v,{size:16}),sizes:[["Post",1200,627,"px",i(v,{})],["Banner",1584,396,"px",i(v,{})],["Square",1080,1080,"px",i(v,{})]]},{name:"Twitter",icon:i(g,{size:16}),sizes:[["Post",1600,900,"px",i(g,{})],["Header",1500,500,"px",i(g,{})],["Square",1080,1080,"px",i(g,{})]]},{name:"Video",icon:i(u,{size:16}),sizes:[["Full HD",1920,1080,"px",i(u,{})],["4K UHD",3840,2160,"px",i(u,{})],["Vertical HD",1080,1920,"px",i(u,{})],["Square HD",1080,1080,"px",i(u,{})]]},{name:"Print",icon:i(a,{size:16}),sizes:[["Invitation",14,14,"cm",i(a,{})],["A4 Portrait",21,29.7,"cm",i(a,{})],["A4 Landscape",29.7,21,"cm",i(a,{})],["A3",29.7,42,"cm",i(a,{})],["Letter Portrait",8.5,11,"in",i(a,{})],["Letter Landscape",11,8.5,"in",i(a,{})],["Business card",3.5,2,"in",i(a,{})],["Poster",18,24,"in",i(a,{})]]}],P=t=>{let{value:d,onChange:x}=t;console.log(t,";213");let[o,p]=h(d),s=N(d);s.current=o;let c=()=>{x(Math.max(t.min||0,parseFloat(s.current)))};return z(()=>{p(d)},[d]),i(M,{...t,value:o,onChange:l=>{Number.isNaN(l)||p(l)},onBlur:c,onKeyDown:l=>{l.key==="Enter"&&c()}})},G=U(({store:t})=>{let[d,x]=h(!0),[o,p]=h(t.width),[s,c]=h(t.height),l=T({px:10,unit:t.unit,dpi:t.dpi}),S=t.width,k=t.height;return z(()=>{p(w({px:S,unit:t.unit,dpi:t.dpi}))},[S,t.unit,t.dpi]),z(()=>{c(w({px:k,unit:t.unit,dpi:t.dpi}))},[k,t.unit,t.dpi]),n("div",{className:"no-scrollbar",style:{height:"100%",overflow:"auto",paddingRight:"3px"},children:[i("style",{children:`
|
|
2
|
+
.no-scrollbar::-webkit-scrollbar {
|
|
3
|
+
display: none;
|
|
4
|
+
}
|
|
5
|
+
.no-scrollbar {
|
|
6
|
+
-ms-overflow-style: none;
|
|
7
|
+
scrollbar-width: none;
|
|
8
|
+
}
|
|
9
|
+
`}),n("div",{style:{paddingBottom:"15px"},children:[n("div",{style:{display:"flex",alignItems:"center",marginTop:8,marginBottom:25,justifyContent:"space-between"},children:[n("div",{style:{display:"flex",alignItems:"center"},children:[i("span",{children:"Use magic resize"}),i(L,{title:"Magic resize will automatically resize and move all elements on the canvas",placement:"bottom",children:i(b,{type:"text",styles:{root:{padding:"0 7px"}},children:i(W,{size:16})})})]}),i(A,{checked:d,onChange:x})]}),n("div",{style:{width:"50%",display:"inline-block"},children:["Width",` (${t.unit})`]}),i("div",{style:{width:"50%",display:"inline-block"},children:i(P,{min:l,max:1e4,value:o,style:{width:"100%"},styles:{actions:{opacity:1,width:24}},onChange:e=>{e||(e=o),p(e)}})})]}),n("div",{style:{paddingBottom:"15px"},children:[n("div",{style:{width:"50%",display:"inline-block"},children:["Height",` (${t.unit})`]}),i("div",{style:{width:"50%",display:"inline-block"},children:i(P,{min:l,max:1e4,value:s,style:{width:"100%"},styles:{actions:{opacity:1,width:24}},onChange:e=>{e||(e=s),c(e)}})})]}),n("div",{style:{paddingBottom:"15px"},children:[i("div",{style:{width:"50%",display:"inline-block"},children:"Units"}),i("div",{style:{width:"50%",display:"inline-block"},children:i(R,{value:t.unit,style:{width:"100%"},onChange:e=>{t.setUnit({unit:e,dpi:t.dpi})},options:[{label:"px",value:"px"},{label:"cm",value:"cm"},{label:"in",value:"in"}]})})]}),i("div",{style:{paddingBottom:"15px"},children:i(b,{type:"primary",onClick:()=>{let e=m({unitVal:o,dpi:t.dpi,unit:t.unit}),f=m({unitVal:s,dpi:t.dpi,unit:t.unit});t.setSize({width:e,height:f,useMagic:d})},block:!0,children:"Resize"})}),E.map(e=>n("div",{children:[n("div",{style:{paddingBottom:"15px",paddingTop:"15px",fontWeight:600,display:"flex",alignItems:"center",gap:6},children:[e.icon,e.name]}),i("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"8px",marginBottom:"10px"},children:e.sizes.map(f=>{let[B,C,I,r,H]=f;return n(b,{type:"text",style:{height:"80px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"13px",maxWidth:103},styles:{root:{padding:"0 10px",gap:0}},onClick:()=>{let V=m({unitVal:C,dpi:t.dpi,unit:r}),D=m({unitVal:I,dpi:t.dpi,unit:r});t.setUnit({unit:r,dpi:t.dpi}),t.setSize({width:V,height:D,useMagic:d})},children:[i("div",{style:{fontSize:"22px",marginBottom:"4px"},children:H}),i("div",{style:{fontSize:"12px"},children:B}),n("div",{style:{fontSize:"0.7rem",opacity:.7},children:[C,"x",I," ",r]})]},B)})})]},e.name))]})});export{G as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import r from"styled-components";import{jsx as e,jsxs as
|
|
1
|
+
import r from"styled-components";import{jsx as e,jsxs as p}from"react/jsx-runtime";var d=r.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 72px;
|
|
4
4
|
padding-top: 15px;
|
|
@@ -17,6 +17,6 @@ import r from"styled-components";import{jsx as e,jsxs as c}from"react/jsx-runtim
|
|
|
17
17
|
// 这个看到时候可不可以用 变量来实现,需要让用户能配置
|
|
18
18
|
&:hover,
|
|
19
19
|
&.active {
|
|
20
|
-
background-color:
|
|
20
|
+
background-color: rgba(22, 119, 255, 0.3);
|
|
21
21
|
}
|
|
22
|
-
`,l=({children:i,name:n,iconSize:
|
|
22
|
+
`,l=({children:i,name:n,iconSize:a,onClick:t,active:o})=>p(d,{className:`design-side-panel-tab ${o?"active":""}`,onClick:t,children:[e("div",{style:{fontSize:a||14},children:i}),e("div",{style:{paddingTop:3,userSelect:"none"},children:n})]});export{l as a};
|