@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-VXTF2OL2.js";import"../chunk-O2XFH626.js";export{a as SectionTab};
|
|
@@ -1,10 +1,16 @@
|
|
|
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
|
-
declare const TemplatesPanel: ({ store }: {
|
|
10
|
+
declare const TemplatesPanel: (({ store }: {
|
|
7
11
|
store: StoreType;
|
|
8
|
-
}) => react_jsx_runtime.JSX.Element
|
|
12
|
+
}) => react_jsx_runtime.JSX.Element) & {
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
9
15
|
|
|
10
16
|
export { TemplatesPanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-OV74NBJ5.js";import"../chunk-IQ7O55C5.js";import"../chunk-WCHGSVUC.js";import"../chunk-O2XFH626.js";export{a as TemplatesPanel};
|
|
@@ -1,10 +1,16 @@
|
|
|
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
|
-
declare const TextPanel: ({ store }: {
|
|
10
|
+
declare const TextPanel: (({ store }: {
|
|
7
11
|
store: StoreType;
|
|
8
|
-
}) => react_jsx_runtime.JSX.Element
|
|
12
|
+
}) => react_jsx_runtime.JSX.Element) & {
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
9
15
|
|
|
10
16
|
export { TextPanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-CMH73CYQ.js";import"../chunk-IQ7O55C5.js";import"../chunk-WCHGSVUC.js";import"../chunk-O2XFH626.js";export{a as TextPanel};
|
|
@@ -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
|
declare const UploadPanel: ({ store }: {
|
|
7
11
|
store: StoreType;
|
|
@@ -1,12 +1,21 @@
|
|
|
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
|
|
|
10
|
+
declare const BackgroundPicker: (({ store }: {
|
|
11
|
+
store: StoreType;
|
|
12
|
+
}) => react_jsx_runtime.JSX.Element) & {
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
6
15
|
type PageProps = {
|
|
7
16
|
store: StoreType;
|
|
8
17
|
components?: any;
|
|
9
18
|
};
|
|
10
19
|
declare const DefaultToolbar: ({ store, components }: PageProps) => react_jsx_runtime.JSX.Element;
|
|
11
20
|
|
|
12
|
-
export { DefaultToolbar, DefaultToolbar as default };
|
|
21
|
+
export { BackgroundPicker, DefaultToolbar, DefaultToolbar as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-APQPKBER.js";import"../chunk-OQ6HU62L.js";import"../chunk-YRJUN267.js";import"../chunk-RVXI723F.js";import"../chunk-WCHGSVUC.js";import"../chunk-O2XFH626.js";export{a as BackgroundPicker,b as DefaultToolbar,c as default};
|
|
@@ -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
|
declare const DownloadButton: ({ store }: {
|
|
7
11
|
store: StoreType;
|
|
@@ -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
|
declare const DuplicateButton: (({ store }: {
|
|
7
11
|
store: StoreType;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { StoreType } from '../model/store.js';
|
|
3
3
|
import { FabricObject } from '@ydesign/core';
|
|
4
|
+
import 'fabric';
|
|
5
|
+
import 'mobx-state-tree/dist/internal';
|
|
4
6
|
import 'mobx-state-tree';
|
|
7
|
+
import '../utils/fonts.js';
|
|
8
|
+
import 'mobx';
|
|
5
9
|
|
|
6
10
|
type Props = {
|
|
7
11
|
store: StoreType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-XPAHGJGK.js";import"../chunk-4HEMGHOQ.js";import"../chunk-YRJUN267.js";import"../chunk-RVXI723F.js";import"../chunk-WCHGSVUC.js";import"../chunk-O2XFH626.js";export{b as FigureFill,c as FigureSettings,d as FigureStroke,e as FigureToolbar,a as getFillKey};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { StoreType } from '../model/store.js';
|
|
3
3
|
import { FabricObject } from '@ydesign/core';
|
|
4
|
+
import 'fabric';
|
|
5
|
+
import 'mobx-state-tree/dist/internal';
|
|
4
6
|
import 'mobx-state-tree';
|
|
7
|
+
import '../utils/fonts.js';
|
|
8
|
+
import 'mobx';
|
|
5
9
|
|
|
6
10
|
declare const FiltersPicker: (({ element, store, elements }: {
|
|
7
11
|
elements?: Array<FabricObject>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { FabricObject } from '@ydesign/core';
|
|
3
3
|
import { StoreType } from '../model/store.js';
|
|
4
|
+
import 'fabric';
|
|
5
|
+
import 'mobx-state-tree/dist/internal';
|
|
4
6
|
import 'mobx-state-tree';
|
|
7
|
+
import '../utils/fonts.js';
|
|
8
|
+
import 'mobx';
|
|
5
9
|
|
|
6
10
|
declare const FlipButton: ({ element, store }: {
|
|
7
11
|
elements?: Array<FabricObject>;
|
|
@@ -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
|
declare const GroupButton: (({ store }: {
|
|
7
11
|
store: StoreType;
|
|
@@ -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
|
declare const HistoryButtons: (({ store }: {
|
|
7
11
|
store: StoreType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a}from"../chunk-
|
|
1
|
+
import{e as a}from"../chunk-53KFBGJB.js";import"../chunk-MNACXCF5.js";import"../chunk-R6Z6F447.js";import"../chunk-COQ4GO5N.js";import"../chunk-PSXS4WMN.js";import"../chunk-4FFLRF6N.js";import"../chunk-LCE6Z46D.js";import"../chunk-CB23VFSC.js";import"../chunk-3TO57JPN.js";import"../chunk-M4S26KQG.js";import"../chunk-EOBIVNFF.js";import"../chunk-GYDTKPW5.js";import"../chunk-XRRO2RT7.js";import"../chunk-3TTTJUTT.js";import"../chunk-B35ZYWID.js";import"../chunk-H67HTXU4.js";import"../chunk-XPAHGJGK.js";import"../chunk-4HEMGHOQ.js";import"../chunk-CS6Z4TQU.js";import"../chunk-IUFYYEGO.js";import"../chunk-MXZ6RXT3.js";import"../chunk-APQPKBER.js";import"../chunk-OQ6HU62L.js";import"../chunk-YRJUN267.js";import"../chunk-RVXI723F.js";import"../chunk-WCHGSVUC.js";import"../chunk-MQZE5LZU.js";import"../chunk-7NNOHYKX.js";import"../chunk-WJT6VPDR.js";import"../chunk-JMIN2XMC.js";import"../chunk-75WC3GVB.js";import"../chunk-O2XFH626.js";export{a as HistoryButtons};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { FabricImage } from '@ydesign/core';
|
|
3
3
|
import { StoreType } from '../model/store.js';
|
|
4
|
+
import 'fabric';
|
|
5
|
+
import 'mobx-state-tree/dist/internal';
|
|
4
6
|
import 'mobx-state-tree';
|
|
7
|
+
import '../utils/fonts.js';
|
|
8
|
+
import 'mobx';
|
|
5
9
|
|
|
6
10
|
type Props = {
|
|
7
11
|
store: StoreType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../chunk-LCE6Z46D.js";import"../chunk-CB23VFSC.js";import"../chunk-3TO57JPN.js";import"../chunk-M4S26KQG.js";import"../chunk-EOBIVNFF.js";import"../chunk-4HEMGHOQ.js";import"../chunk-CS6Z4TQU.js";import"../chunk-MXZ6RXT3.js";import"../chunk-YRJUN267.js";import"../chunk-RVXI723F.js";import"../chunk-WCHGSVUC.js";import"../chunk-MQZE5LZU.js";import"../chunk-7NNOHYKX.js";import"../chunk-O2XFH626.js";export{c as ImageClip,b as ImageCrop,a as ImageFitToBackground,d as ImageToolbar,e as default};
|
|
@@ -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
|
declare const LockButton: (({ store }: {
|
|
7
11
|
store: StoreType;
|
|
@@ -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
|
declare const OpacityPicker: (({ store }: {
|
|
7
11
|
store: StoreType;
|
|
@@ -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
|
declare const PositionPicker: (({ store }: {
|
|
7
11
|
store: StoreType;
|
|
@@ -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
|
declare const RemoveButton: (({ store }: {
|
|
7
11
|
store: StoreType;
|
|
@@ -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 PageProps = {
|
|
7
11
|
store: StoreType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-COQ4GO5N.js";import"../chunk-PSXS4WMN.js";import"../chunk-4HEMGHOQ.js";import"../chunk-YRJUN267.js";import"../chunk-RVXI723F.js";import"../chunk-WCHGSVUC.js";import"../chunk-WJT6VPDR.js";import"../chunk-O2XFH626.js";export{a as ALIGN_OPTIONS,b as TextToolbar,c as default};
|
|
@@ -3,8 +3,12 @@ import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
|
3
3
|
import * as styled_components from 'styled-components';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { StoreType } from '../model/store.js';
|
|
6
|
+
import 'fabric';
|
|
7
|
+
import 'mobx-state-tree/dist/internal';
|
|
6
8
|
import 'mobx-state-tree';
|
|
7
9
|
import '@ydesign/core';
|
|
10
|
+
import '../utils/fonts.js';
|
|
11
|
+
import 'mobx';
|
|
8
12
|
|
|
9
13
|
declare const NavBarGroup: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
14
|
declare function registerToolbarComponent(type: string, reactComponent: any): void;
|
package/dist/toolbar/toolbar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"../chunk-
|
|
1
|
+
import{a,b,c,d}from"../chunk-53KFBGJB.js";import"../chunk-MNACXCF5.js";import"../chunk-R6Z6F447.js";import"../chunk-COQ4GO5N.js";import"../chunk-PSXS4WMN.js";import"../chunk-4FFLRF6N.js";import"../chunk-LCE6Z46D.js";import"../chunk-CB23VFSC.js";import"../chunk-3TO57JPN.js";import"../chunk-M4S26KQG.js";import"../chunk-EOBIVNFF.js";import"../chunk-GYDTKPW5.js";import"../chunk-XRRO2RT7.js";import"../chunk-3TTTJUTT.js";import"../chunk-B35ZYWID.js";import"../chunk-H67HTXU4.js";import"../chunk-XPAHGJGK.js";import"../chunk-4HEMGHOQ.js";import"../chunk-CS6Z4TQU.js";import"../chunk-IUFYYEGO.js";import"../chunk-MXZ6RXT3.js";import"../chunk-APQPKBER.js";import"../chunk-OQ6HU62L.js";import"../chunk-YRJUN267.js";import"../chunk-RVXI723F.js";import"../chunk-WCHGSVUC.js";import"../chunk-MQZE5LZU.js";import"../chunk-7NNOHYKX.js";import"../chunk-WJT6VPDR.js";import"../chunk-JMIN2XMC.js";import"../chunk-75WC3GVB.js";import"../chunk-O2XFH626.js";export{a as NavBarGroup,c as Toolbar,d as default,b as registerToolbarComponent};
|
|
@@ -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
|
declare const ZoomGroup: (({ store }: {
|
|
7
11
|
store: StoreType;
|
|
@@ -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
|
declare const FileMenu: ({ store }: {
|
|
7
11
|
store: StoreType;
|
package/dist/topbar/file-menu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-FXO52BV7.js";import"../chunk-O2XFH626.js";export{a as FileMenu};
|
package/dist/topbar/topbar.d.ts
CHANGED
|
@@ -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
|
declare const Topbar: (({ store }: {
|
|
7
11
|
store: StoreType;
|
package/dist/topbar/topbar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as n}from"../chunk-B35ZYWID.js";import{a}from"../chunk-
|
|
1
|
+
import{a as n}from"../chunk-B35ZYWID.js";import{a}from"../chunk-FXO52BV7.js";import{b as r}from"../chunk-KLZXBPXI.js";import"../chunk-WJT6VPDR.js";import"../chunk-O2XFH626.js";import i from"styled-components";import{observer as p}from"mobx-react-lite";import{Input as l,Tooltip as s,Button as g}from"antd";import{CloudUpload as h}from"lucide-react";import{jsx as t,jsxs as o}from"react/jsx-runtime";var m=i("div")`
|
|
2
2
|
white-space: nowrap;
|
|
3
3
|
height: 50px;
|
|
4
4
|
padding: 0 15px;
|
|
@@ -11,18 +11,18 @@ import{a as n}from"../chunk-B35ZYWID.js";import{a}from"../chunk-LCOWX5JR.js";imp
|
|
|
11
11
|
overflow-y: hidden;
|
|
12
12
|
max-width: 100vw;
|
|
13
13
|
}
|
|
14
|
-
`,f=
|
|
14
|
+
`,f=i("div")`
|
|
15
15
|
@media screen and (max-width: 500px) {
|
|
16
16
|
display: flex;
|
|
17
17
|
}
|
|
18
|
-
`,c=
|
|
18
|
+
`,c=i("div")`
|
|
19
19
|
float: left;
|
|
20
20
|
display: flex;
|
|
21
21
|
align-items: center;
|
|
22
22
|
height: 50px;
|
|
23
|
-
`,
|
|
23
|
+
`,v=i("div")`
|
|
24
24
|
float: right;
|
|
25
25
|
display: flex;
|
|
26
26
|
align-items: center;
|
|
27
27
|
height: 50px;
|
|
28
|
-
`,
|
|
28
|
+
`,x=p(({project:e})=>(console.log(e.status),t(s,{title:"\u4FDD\u5B58\u4F5C\u56FE\u8BB0\u5F55",children:t(g,{type:"text",style:{marginLeft:16},icon:t(h,{size:16,style:{display:"flex"}}),children:"Save"})}))),j=p(({store:e})=>{let d=r();return t(m,{className:"topbar border-b-1 border-b-gray-200",children:o(f,{children:[o(c,{children:[o("div",{style:{display:"flex",alignItems:"center",gap:10,paddingRight:16,paddingLeft:16,userSelect:"none"},children:[t("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t("rect",{width:"20",height:"20",fill:"rgb(22, 119, 255)"})}),t("span",{style:{fontWeight:500,fontSize:20,lineHeight:"100%",letterSpacing:.25},children:"Ydesign"})]}),t(a,{store:e}),t("div",{style:{paddingLeft:10,maxWidth:200},children:t(l,{placeholder:"Design name"})}),o("div",{style:{paddingLeft:16},className:"text-gray-600",children:[Math.round(e.width)," x ",Math.round(e.height)," px"]}),t(x,{project:d})]}),t(v,{children:t(n,{store:e})})]})})});export{j as Topbar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../chunk-4LUZF4CB.js";import"../chunk-O2XFH626.js";export{a as removeTags};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type UnitType = 'pt' | 'mm' | 'cm' | 'in' | 'px';
|
|
2
|
+
type fromPx = {
|
|
3
|
+
px: number;
|
|
4
|
+
unit: UnitType;
|
|
5
|
+
dpi: number;
|
|
6
|
+
};
|
|
7
|
+
declare function pxToUnit({ px, unit, dpi }: fromPx): number;
|
|
8
|
+
declare function pxToUnitRounded({ px, precious, dpi, unit, }: fromPx & {
|
|
9
|
+
precious?: number;
|
|
10
|
+
}): number;
|
|
11
|
+
declare function unitToPx({ unitVal, dpi, unit }: {
|
|
12
|
+
unitVal: any;
|
|
13
|
+
dpi: any;
|
|
14
|
+
unit: any;
|
|
15
|
+
}): number;
|
|
16
|
+
declare function pxToUnitString(params: fromPx): string;
|
|
17
|
+
|
|
18
|
+
export { type UnitType, pxToUnit, pxToUnitRounded, pxToUnitString, unitToPx };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d}from"../chunk-5C2MNUBC.js";import"../chunk-O2XFH626.js";export{a as pxToUnit,b as pxToUnitRounded,d as pxToUnitString,c as unitToPx};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ydesign/react-editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "设计编辑器UI组件库,基于react版本",
|
|
5
5
|
"main": "dist/app.js",
|
|
6
6
|
"module": "dist/app.js",
|
|
@@ -100,27 +100,21 @@
|
|
|
100
100
|
},
|
|
101
101
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
104
|
-
"@radix-ui/react-popover": "^1.1.15",
|
|
105
|
-
"@radix-ui/react-select": "^2.2.6",
|
|
106
|
-
"@radix-ui/react-separator": "^1.1.8",
|
|
107
|
-
"@radix-ui/react-slot": "^1.2.4",
|
|
108
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
109
103
|
"antd": "^6.0.0",
|
|
110
|
-
"class-variance-authority": "^0.7.1",
|
|
111
104
|
"clsx": "^2.1.1",
|
|
112
|
-
"
|
|
105
|
+
"es-toolkit": "^1.44.0",
|
|
113
106
|
"lucide-react": "^0.553.0",
|
|
114
107
|
"mobx": "^6.15.0",
|
|
115
108
|
"mobx-react-lite": "^4.1.1",
|
|
116
109
|
"mobx-state-tree": "^6.0.1",
|
|
117
110
|
"react-overflow-list": "^0.5.0",
|
|
111
|
+
"react-sortablejs": "^6.1.4",
|
|
118
112
|
"react-window": "^1.8.11",
|
|
119
113
|
"styled-components": "^6.1.19",
|
|
120
114
|
"tailwind-merge": "^3.3.1",
|
|
121
115
|
"tailwindcss": "^4.1.17",
|
|
122
116
|
"tw-animate-css": "^1.4.0",
|
|
123
|
-
"@ydesign/core": "^0.0.
|
|
117
|
+
"@ydesign/core": "^0.0.4"
|
|
124
118
|
},
|
|
125
119
|
"browserslist": [
|
|
126
120
|
"> 0.5%",
|
package/dist/chunk-6BG6R2IO.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{a as A}from"./chunk-PSXS4WMN.js";import{a as I,b as H}from"./chunk-YRJUN267.js";import{a as j}from"./chunk-4HEMGHOQ.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 et from"styled-components";import{jsx as t,jsxs as h}from"react/jsx-runtime";var nt=et.img`
|
|
2
|
-
height: 20px;
|
|
3
|
-
|
|
4
|
-
.bp5-dark & {
|
|
5
|
-
filter: invert(1);
|
|
6
|
-
}
|
|
7
|
-
`,{Search:ot}=E,it=({fontFamily:o,handleClick:i,modifiers:n,store:r,isCustom:c})=>{let[s,a]=m(!c);if(console.log(a,nt),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})},lt=({onChange:o,defaultValue:i})=>t(ot,{placeholder:i,allowClear:!0,onChange:n=>{o(n.target.value)},style:{width:210}}),rt=({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(lt,{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(it,{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"],st=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(rt,{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):"",at=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})}})}),ct=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}})}),dt=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)}})})]})}),pt=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"}})})})}),yt={TextFill:at,TextFontFamily:st,TextFontSize:ct,TextFontVariant:dt,TextSpacing:pt,TextFilters:j,TextAiWrite:A},mt=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]||yt[s];return a&&t(a,{elements:n,element:n[0],store:o},s)}})}),wt=mt;export{F as a,mt as b,wt as c};
|
package/dist/chunk-6LFGFFHI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";var t=({store:e})=>(console.log("TextPanel",e),o("div",{children:"\u6587\u672C\u9762\u677F"}));export{t as a};
|
package/dist/chunk-LCOWX5JR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Dropdown as S,Button as d,Modal as z,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 O,Link2 as W,Image as _,FileImage as q,Smartphone as A,Monitor as G,Square as L}from"lucide-react";import{useState as o}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:O}],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})}],Q=({store:m})=>{let[v,l]=o(!1),[y,f]=o("all"),[s,c]=o(800),[n,h]=o(800),[r,w]=o("px"),N=({key:e})=>{e==="new_design"&&l(!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,isClear:!0}),l(!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,isClear:!0}),l(!1)},C=()=>{l(!1)},M=()=>{c(n),h(s)};return i($,{children:[t(S,{menu:{items:X,onClick:N},trigger:["click"],styles:{root:{width:168}},children:t(d,{type:"text",children:t(I,{size:16})})}),t(z,{title:"\u521B\u5EFA\u8BBE\u8BA1",open:v,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 ${y===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(_,{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(q,{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(W,{size:16}),onClick:M}),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(L,{size:24}):e.width<e.height?t(A,{size:24}):t(G,{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{Q as a};
|
package/dist/chunk-M33EDDXB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";var r=({store:e})=>(console.log("LayersPanel",e),o("div",{children:"\u56FE\u5C42"}));export{r as a};
|
package/dist/chunk-MCBL6QAP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-MXZ6RXT3.js";import{b as i}from"./chunk-NX3CGW6Q.js";import{jsx as e,jsxs as m}from"react/jsx-runtime";var h=({store:r})=>{let s=t=>{r.editor?.objectsHandler.createPathElement(t.path)},l=t=>{r.editor?.objectsHandler.createShapeElement(t.type)};return e("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"auto"},children:i.map((t,n)=>m("div",{className:"category",children:[e("div",{className:o("category-name","text-base px-2 mt-2"),children:t.name},t.name),e("div",{className:o("shape-list","flex flex-wrap content-start mb-2"),children:t.children.map((a,c)=>e("div",{className:o("shape-item","w-[25%] h-0 pb-[25%] relative cursor-pointer shrink-0 mb-[1.2%]"),onClick:()=>{a.type?l(a):s(a)},children:e("div",{className:o("shape-content","absolute inset-0 flex justify-center items-center"),children:e("svg",{overflow:"visible",width:"50",height:"50",children:e("g",{transform:`scale(${50/a.viewBox[0]}, ${50/a.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`,children:e("path",{className:"shape-path",d:a.path,fill:"#ccc",strokeMiterlimit:8,strokeLinecap:"butt"})})})})},c))})]},n))})};export{h as a};
|
package/dist/chunk-NX3CGW6Q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e,c as i,d as o,e as n,f as L,g as a,h as r,i as d,j as h}from"./chunk-7NNOHYKX.js";var p=(t=>(t.ROUND_RECT="roundRect",t.ROUND_RECT_DIAGONAL="roundRectDiagonal",t.ROUND_RECT_SINGLE="roundRectSingle",t.ROUND_RECT_SAMESIDE="roundRectSameSide",t.CUT_RECT_DIAGONAL="cutRectDiagonal",t.CUT_RECT_SINGLE="cutRectSingle",t.CUT_RECT_SAMESIDE="cutRectSameSide",t.MESSAGE="message",t.ROUND_MESSAGE="roundMessage",t.L="L",t.RING_RECT="ringRect",t.PLUS="plus",t.TRIANGLE="triangle",t.PARALLELOGRAM_LEFT="parallelogramLeft",t.PARALLELOGRAM_RIGHT="parallelogramRight",t.TRAPEZOID="trapezoid",t.BULLET="bullet",t.INDICATOR="indicator",t))(p||{}),l=[{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:e({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\u7528\u5F62\u72B6",children:[{viewBox:[200,200],path:i({width:200,height:200})},{viewBox:[200,200],path:o({width:200,height:200})},{viewBox:[200,200],path:n({width:200,height:200})},{viewBox:[200,200],path:L({width:200,height:200})},{viewBox:[200,200],path:a({width:200,height:200})},{viewBox:[200,200],path:r({width:200,height:200})},{viewBox:[200,200],path:d({width:200,height:200})},{viewBox:[200,200],path:h({width:200,height:200})}]}],c=[{path:"M 0 0 L 20 20",style:"solid",points:["",""],data:[{x:0,y:0},{x:200,y:0}]}],w=[{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{p as a,l as b,c,w as d};
|
package/dist/chunk-QJBRJELT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Button as o}from"antd";import{jsx as l,jsxs as i}from"react/jsx-runtime";var a=({store:t})=>i("div",{onClick:()=>{console.log("TemplatesPanel",t)},style:{display:"flex",flexDirection:"column",gap:10},children:["\u6A21\u677F\u4E2D\u5FC3",l(o,{onClick:()=>{},children:"\u6DFB\u52A0\u6587\u5B57"}),l(o,{onClick:()=>{let e=t.editor?.customCanvas.canvas.getActiveObject();if(e){let{selectionStart:n,selectionEnd:c}=e;n!==c?(console.log("\u6709\u5C40\u90E8\u6587\u5B57\u9009\u4E2D"),e.setSelectionStyles({fill:"red"},n,c)):e.set({fill:"red"}),t.editor?.customCanvas.canvas.requestRenderAll()}},children:"\u8BBE\u7F6E\u5C40\u90E8\u6587\u5B57\u4E3A\u7EA2\u8272"}),l(o,{children:"\u6DFB\u52A0\u56FE\u7247"})]});export{a};
|
package/dist/chunk-TX4BNXQC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";var r=({store:o})=>(console.log("BackgroundPanel",o),e("div",{children:"\u80CC\u666F"}));export{r as a};
|
package/dist/chunk-WIM26GEM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";var r=({store:e})=>(console.log("SizePanel",e),o("div",{children:"\u5C3A\u5BF8\u8C03\u6574"}));export{r as a};
|