@ydesign/react-editor 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.css +1 -1
- package/dist/app.js +1 -1
- package/dist/canvas/workspace-canvas.d.ts +4 -0
- package/dist/canvas/workspace.d.ts +4 -0
- package/dist/chunk-2PAJLUQH.js +1 -0
- package/dist/chunk-2SA3ZNHH.js +9 -0
- package/dist/chunk-4BG4CHIB.js +1 -0
- package/dist/{chunk-LW2W4B2N.js → chunk-4HH3B3W3.js} +4 -3
- package/dist/chunk-4LUZF4CB.js +2 -0
- package/dist/chunk-4WITBL6X.js +1 -0
- package/dist/chunk-5C2MNUBC.js +1 -0
- package/dist/chunk-ARZMBVXU.js +1 -0
- package/dist/chunk-BDQSWJYF.js +1 -0
- package/dist/chunk-DCGJ6RKU.js +1 -0
- package/dist/chunk-FGCLY24Q.js +45 -0
- package/dist/chunk-FOMWIGAQ.js +50 -0
- package/dist/chunk-H6GI5LUP.js +54 -0
- package/dist/chunk-HD2T2D4D.js +1 -0
- package/dist/chunk-HQSM4X2M.js +1 -0
- package/dist/chunk-INRJE7VS.js +1 -0
- package/dist/chunk-ISNCNIFJ.js +27 -0
- package/dist/chunk-KCNKLCD5.js +1 -0
- package/dist/chunk-N5KI6CPA.js +1 -0
- package/dist/chunk-NQYSJ5MN.js +1 -0
- package/dist/chunk-OA7Z7HNL.js +1 -0
- package/dist/chunk-OBJ5NZSC.js +1 -0
- package/dist/chunk-OFA6JIQB.js +9 -0
- package/dist/chunk-ONY3GLGA.js +1 -0
- package/dist/chunk-QX7ZGRSR.js +1 -0
- package/dist/chunk-R452ARGU.js +1 -0
- package/dist/chunk-RUVPKBI5.js +3 -0
- package/dist/chunk-TNBL7KOG.js +1 -0
- package/dist/chunk-TWH7TO5J.js +1 -0
- package/dist/chunk-TYHXQPZQ.js +1 -0
- package/dist/chunk-XXR5YN2B.js +9 -0
- package/dist/chunk-Y7RXJ3FI.js +16 -0
- package/dist/chunk-YLXPQ2GI.js +1 -0
- package/dist/chunk-YOQ663QO.js +1 -0
- package/dist/config.d.ts +1 -0
- 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 +11 -2
- package/dist/project.js +1 -1
- package/dist/side-panel/background-panel.d.ts +10 -3
- package/dist/side-panel/background-panel.js +1 -1
- package/dist/side-panel/images-grid.d.ts +4 -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 +8 -2
- package/dist/side-panel/photos-panel.js +1 -1
- package/dist/side-panel/shapes-panel.d.ts +8 -2
- 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 +10 -3
- package/dist/side-panel/upload-panel.js +1 -1
- package/dist/toolbar/default-toolbar.d.ts +10 -1
- package/dist/toolbar/default-toolbar.js +1 -1
- package/dist/toolbar/download-button.d.ts +8 -2
- package/dist/toolbar/download-button.js +1 -1
- package/dist/toolbar/duplicate-button.d.ts +4 -0
- package/dist/toolbar/duplicate-button.js +1 -1
- 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/filters-picker.js +1 -1
- package/dist/toolbar/flip-button.d.ts +8 -2
- package/dist/toolbar/flip-button.js +1 -1
- package/dist/toolbar/group-button.d.ts +4 -0
- package/dist/toolbar/group-button.js +1 -1
- package/dist/toolbar/history-buttons.d.ts +4 -0
- package/dist/toolbar/history-buttons.js +1 -1
- package/dist/toolbar/image-eraser-pen.d.ts +4 -2
- package/dist/toolbar/image-eraser-pen.js +1 -1
- package/dist/toolbar/image-remove-background.d.ts +4 -2
- package/dist/toolbar/image-remove-background.js +1 -1
- package/dist/toolbar/image-toolbar.d.ts +8 -2
- package/dist/toolbar/image-toolbar.js +1 -1
- package/dist/toolbar/lock-button.d.ts +4 -0
- package/dist/toolbar/lock-button.js +1 -1
- package/dist/toolbar/opacity-picker.d.ts +4 -0
- package/dist/toolbar/opacity-picker.js +1 -1
- package/dist/toolbar/position-picker.d.ts +4 -0
- package/dist/toolbar/position-picker.js +1 -1
- package/dist/toolbar/remove-button.d.ts +4 -0
- package/dist/toolbar/remove-button.js +1 -1
- package/dist/toolbar/text-ai-write.js +1 -1
- package/dist/toolbar/text-toolbar.d.ts +4 -0
- package/dist/toolbar/text-toolbar.js +1 -1
- package/dist/toolbar/toolbar.d.ts +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 +11 -2
- 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/l10n.d.ts +205 -3
- package/dist/utils/l10n.js +1 -1
- 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-3TTTJUTT.js +0 -1
- package/dist/chunk-4FFLRF6N.js +0 -1
- package/dist/chunk-4HEMGHOQ.js +0 -1
- package/dist/chunk-6BG6R2IO.js +0 -7
- package/dist/chunk-6LFGFFHI.js +0 -1
- package/dist/chunk-B35ZYWID.js +0 -1
- package/dist/chunk-CRTMZEJE.js +0 -1
- package/dist/chunk-CS6Z4TQU.js +0 -1
- package/dist/chunk-DBQHEZPG.js +0 -1
- package/dist/chunk-DJBTBRPS.js +0 -1
- package/dist/chunk-EOBIVNFF.js +0 -1
- package/dist/chunk-GYDTKPW5.js +0 -1
- package/dist/chunk-H67HTXU4.js +0 -1
- package/dist/chunk-KLZXBPXI.js +0 -1
- package/dist/chunk-LCOWX5JR.js +0 -1
- package/dist/chunk-LHQI6WDJ.js +0 -54
- package/dist/chunk-M33EDDXB.js +0 -1
- package/dist/chunk-M4S26KQG.js +0 -1
- package/dist/chunk-MCBL6QAP.js +0 -1
- package/dist/chunk-MNACXCF5.js +0 -1
- package/dist/chunk-NX3CGW6Q.js +0 -1
- package/dist/chunk-PSXS4WMN.js +0 -1
- package/dist/chunk-QJBRJELT.js +0 -1
- package/dist/chunk-R6Z6F447.js +0 -1
- package/dist/chunk-RFPYC6DZ.js +0 -3
- package/dist/chunk-TX4BNXQC.js +0 -1
- package/dist/chunk-WIM26GEM.js +0 -1
- package/dist/chunk-YVRHDXYK.js +0 -16
- package/dist/chunk-ZVWJRZOZ.js +0 -1
package/dist/model/store.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import * as fabric from 'fabric';
|
|
2
|
+
import * as mobx_state_tree_dist_internal from 'mobx-state-tree/dist/internal';
|
|
1
3
|
import * as mobx_state_tree from 'mobx-state-tree';
|
|
2
4
|
import { Instance } from 'mobx-state-tree';
|
|
3
|
-
import { Editor } from '@ydesign/core';
|
|
5
|
+
import { Editor, FabricObject } from '@ydesign/core';
|
|
6
|
+
import { FONT } from '../utils/fonts.js';
|
|
7
|
+
import 'mobx';
|
|
4
8
|
|
|
5
9
|
interface ExportOptions {
|
|
6
10
|
multiplier: number;
|
|
@@ -13,24 +17,7 @@ interface ExportOptions {
|
|
|
13
17
|
height?: number;
|
|
14
18
|
filter?: (object: any) => boolean;
|
|
15
19
|
}
|
|
16
|
-
|
|
17
|
-
id: string;
|
|
18
|
-
type: string;
|
|
19
|
-
locked?: boolean;
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}
|
|
22
|
-
type ElementType = (BaseElement & {
|
|
23
|
-
type: 'textbox';
|
|
24
|
-
text: string;
|
|
25
|
-
}) | (BaseElement & {
|
|
26
|
-
type: 'image';
|
|
27
|
-
src: string;
|
|
28
|
-
}) | (BaseElement & {
|
|
29
|
-
type: 'group';
|
|
30
|
-
objects: ElementsArray;
|
|
31
|
-
}) | BaseElement;
|
|
32
|
-
type ElementsArray = ElementType[];
|
|
33
|
-
declare const forEveryChild: (e: any, callback: (e: ElementType) => boolean | void) => void;
|
|
20
|
+
declare const forEveryChild: (node: any, cb: any) => void;
|
|
34
21
|
declare const Font: mobx_state_tree.IModelType<{
|
|
35
22
|
fontFamily: mobx_state_tree.ISimpleType<string>;
|
|
36
23
|
name: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<string>, [undefined]>;
|
|
@@ -64,6 +51,7 @@ declare const Store: mobx_state_tree.IModelType<{
|
|
|
64
51
|
rulesVisible: mobx_state_tree.IType<boolean | undefined, boolean, boolean>;
|
|
65
52
|
openedSidePanel: mobx_state_tree.IType<string | undefined, string, string>;
|
|
66
53
|
selectedElementsIds: mobx_state_tree.IArrayType<mobx_state_tree.ISimpleType<string>>;
|
|
54
|
+
backgroundColor: mobx_state_tree.IOptionalIType<mobx_state_tree_dist_internal.IUnionType<[mobx_state_tree.ISimpleType<string>, mobx_state_tree.IType<Record<string, any>, Record<string, any>, Record<string, any>>]>, [undefined]>;
|
|
67
55
|
fonts: mobx_state_tree.IArrayType<mobx_state_tree.IModelType<{
|
|
68
56
|
fontFamily: mobx_state_tree.ISimpleType<string>;
|
|
69
57
|
name: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<string>, [undefined]>;
|
|
@@ -79,32 +67,39 @@ declare const Store: mobx_state_tree.IModelType<{
|
|
|
79
67
|
}>, mobx_state_tree._NotCustomized>>;
|
|
80
68
|
editor: mobx_state_tree.IType<Editor | null | undefined, Editor | null, Editor | null>;
|
|
81
69
|
custom: mobx_state_tree.IType<any, any, any>;
|
|
82
|
-
objects: mobx_state_tree.IType<any, any, any>;
|
|
70
|
+
objects: mobx_state_tree.IType<any[] | null | undefined, any[], any[]>;
|
|
83
71
|
_key: mobx_state_tree.IType<string | undefined, string, string>;
|
|
84
72
|
_updateTrigger: mobx_state_tree.IType<number | undefined, number, number>;
|
|
85
73
|
_updateHistory: mobx_state_tree.IType<number | undefined, number, number>;
|
|
86
74
|
_updateFontSize: mobx_state_tree.IType<number | undefined, number, number>;
|
|
87
75
|
}, {
|
|
88
|
-
readonly selectedElements:
|
|
76
|
+
readonly selectedElements: FabricObject[];
|
|
89
77
|
} & {
|
|
90
|
-
readonly selectedShapes:
|
|
78
|
+
readonly selectedShapes: FabricObject<Partial<fabric.FabricObjectProps>, fabric.SerializedObjectProps, fabric.ObjectEvents>[];
|
|
79
|
+
find(callback: (e: any) => boolean): any;
|
|
80
|
+
getElementById(): void;
|
|
91
81
|
} & {
|
|
92
82
|
_setEditor(editor: Editor): void;
|
|
93
83
|
_triggerUpdate(): void;
|
|
94
84
|
_historyUpdate(): void;
|
|
95
85
|
_fontSizeUpdate(): void;
|
|
96
86
|
} & {
|
|
87
|
+
set(e: FabricObject, options: any): void;
|
|
88
|
+
setUnit({ unit, dpi }: {
|
|
89
|
+
unit: any;
|
|
90
|
+
dpi: any;
|
|
91
|
+
}): void;
|
|
97
92
|
setObjects(objects: any): void;
|
|
98
93
|
selectElements(ids: string[]): void;
|
|
99
94
|
openSidePanel(t: string): void;
|
|
100
95
|
deleteElements(ids: string[]): void;
|
|
101
96
|
setScale(scale: number): void;
|
|
102
97
|
clone(): void;
|
|
103
|
-
addElement(): void;
|
|
104
|
-
setSize({ width, height,
|
|
98
|
+
addElement(options: any): void;
|
|
99
|
+
setSize({ width, height, useMagic }: {
|
|
105
100
|
width: number;
|
|
106
101
|
height: number;
|
|
107
|
-
|
|
102
|
+
useMagic?: boolean;
|
|
108
103
|
}): void;
|
|
109
104
|
setupEditorListeners(): void;
|
|
110
105
|
} & {
|
|
@@ -131,8 +126,8 @@ declare const Store: mobx_state_tree.IModelType<{
|
|
|
131
126
|
loadJSON: (data: any) => Promise<void>;
|
|
132
127
|
clear(): void;
|
|
133
128
|
} & {
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
removeFont(fontFamily: string): void;
|
|
130
|
+
addFont(font: FONT): void;
|
|
136
131
|
/**
|
|
137
132
|
* 加载字体(注入 CSS 并等待字体可用)
|
|
138
133
|
* @param fontFamily - 字体名称
|
|
@@ -156,6 +151,7 @@ declare function createStore({ key }: StoreProps): mobx_state_tree.ModelInstance
|
|
|
156
151
|
rulesVisible: mobx_state_tree.IType<boolean | undefined, boolean, boolean>;
|
|
157
152
|
openedSidePanel: mobx_state_tree.IType<string | undefined, string, string>;
|
|
158
153
|
selectedElementsIds: mobx_state_tree.IArrayType<mobx_state_tree.ISimpleType<string>>;
|
|
154
|
+
backgroundColor: mobx_state_tree.IOptionalIType<mobx_state_tree_dist_internal.IUnionType<[mobx_state_tree.ISimpleType<string>, mobx_state_tree.IType<Record<string, any>, Record<string, any>, Record<string, any>>]>, [undefined]>;
|
|
159
155
|
fonts: mobx_state_tree.IArrayType<mobx_state_tree.IModelType<{
|
|
160
156
|
fontFamily: mobx_state_tree.ISimpleType<string>;
|
|
161
157
|
name: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<string>, [undefined]>;
|
|
@@ -171,32 +167,39 @@ declare function createStore({ key }: StoreProps): mobx_state_tree.ModelInstance
|
|
|
171
167
|
}>, mobx_state_tree._NotCustomized>>;
|
|
172
168
|
editor: mobx_state_tree.IType<Editor | null | undefined, Editor | null, Editor | null>;
|
|
173
169
|
custom: mobx_state_tree.IType<any, any, any>;
|
|
174
|
-
objects: mobx_state_tree.IType<any, any, any>;
|
|
170
|
+
objects: mobx_state_tree.IType<any[] | null | undefined, any[], any[]>;
|
|
175
171
|
_key: mobx_state_tree.IType<string | undefined, string, string>;
|
|
176
172
|
_updateTrigger: mobx_state_tree.IType<number | undefined, number, number>;
|
|
177
173
|
_updateHistory: mobx_state_tree.IType<number | undefined, number, number>;
|
|
178
174
|
_updateFontSize: mobx_state_tree.IType<number | undefined, number, number>;
|
|
179
175
|
}> & {
|
|
180
|
-
readonly selectedElements:
|
|
176
|
+
readonly selectedElements: FabricObject[];
|
|
181
177
|
} & {
|
|
182
|
-
readonly selectedShapes:
|
|
178
|
+
readonly selectedShapes: FabricObject<Partial<fabric.FabricObjectProps>, fabric.SerializedObjectProps, fabric.ObjectEvents>[];
|
|
179
|
+
find(callback: (e: any) => boolean): any;
|
|
180
|
+
getElementById(): void;
|
|
183
181
|
} & {
|
|
184
182
|
_setEditor(editor: Editor): void;
|
|
185
183
|
_triggerUpdate(): void;
|
|
186
184
|
_historyUpdate(): void;
|
|
187
185
|
_fontSizeUpdate(): void;
|
|
188
186
|
} & {
|
|
187
|
+
set(e: FabricObject, options: any): void;
|
|
188
|
+
setUnit({ unit, dpi }: {
|
|
189
|
+
unit: any;
|
|
190
|
+
dpi: any;
|
|
191
|
+
}): void;
|
|
189
192
|
setObjects(objects: any): void;
|
|
190
193
|
selectElements(ids: string[]): void;
|
|
191
194
|
openSidePanel(t: string): void;
|
|
192
195
|
deleteElements(ids: string[]): void;
|
|
193
196
|
setScale(scale: number): void;
|
|
194
197
|
clone(): void;
|
|
195
|
-
addElement(): void;
|
|
196
|
-
setSize({ width, height,
|
|
198
|
+
addElement(options: any): void;
|
|
199
|
+
setSize({ width, height, useMagic }: {
|
|
197
200
|
width: number;
|
|
198
201
|
height: number;
|
|
199
|
-
|
|
202
|
+
useMagic?: boolean;
|
|
200
203
|
}): void;
|
|
201
204
|
setupEditorListeners(): void;
|
|
202
205
|
} & {
|
|
@@ -223,8 +226,8 @@ declare function createStore({ key }: StoreProps): mobx_state_tree.ModelInstance
|
|
|
223
226
|
loadJSON: (data: any) => Promise<void>;
|
|
224
227
|
clear(): void;
|
|
225
228
|
} & {
|
|
226
|
-
|
|
227
|
-
|
|
229
|
+
removeFont(fontFamily: string): void;
|
|
230
|
+
addFont(font: FONT): void;
|
|
228
231
|
/**
|
|
229
232
|
* 加载字体(注入 CSS 并等待字体可用)
|
|
230
233
|
* @param fontFamily - 字体名称
|
|
@@ -243,6 +246,7 @@ declare function createStore({ key }: StoreProps): mobx_state_tree.ModelInstance
|
|
|
243
246
|
rulesVisible: mobx_state_tree.IType<boolean | undefined, boolean, boolean>;
|
|
244
247
|
openedSidePanel: mobx_state_tree.IType<string | undefined, string, string>;
|
|
245
248
|
selectedElementsIds: mobx_state_tree.IArrayType<mobx_state_tree.ISimpleType<string>>;
|
|
249
|
+
backgroundColor: mobx_state_tree.IOptionalIType<mobx_state_tree_dist_internal.IUnionType<[mobx_state_tree.ISimpleType<string>, mobx_state_tree.IType<Record<string, any>, Record<string, any>, Record<string, any>>]>, [undefined]>;
|
|
246
250
|
fonts: mobx_state_tree.IArrayType<mobx_state_tree.IModelType<{
|
|
247
251
|
fontFamily: mobx_state_tree.ISimpleType<string>;
|
|
248
252
|
name: mobx_state_tree.IOptionalIType<mobx_state_tree.ISimpleType<string>, [undefined]>;
|
|
@@ -258,32 +262,39 @@ declare function createStore({ key }: StoreProps): mobx_state_tree.ModelInstance
|
|
|
258
262
|
}>, mobx_state_tree._NotCustomized>>;
|
|
259
263
|
editor: mobx_state_tree.IType<Editor | null | undefined, Editor | null, Editor | null>;
|
|
260
264
|
custom: mobx_state_tree.IType<any, any, any>;
|
|
261
|
-
objects: mobx_state_tree.IType<any, any, any>;
|
|
265
|
+
objects: mobx_state_tree.IType<any[] | null | undefined, any[], any[]>;
|
|
262
266
|
_key: mobx_state_tree.IType<string | undefined, string, string>;
|
|
263
267
|
_updateTrigger: mobx_state_tree.IType<number | undefined, number, number>;
|
|
264
268
|
_updateHistory: mobx_state_tree.IType<number | undefined, number, number>;
|
|
265
269
|
_updateFontSize: mobx_state_tree.IType<number | undefined, number, number>;
|
|
266
270
|
}, {
|
|
267
|
-
readonly selectedElements:
|
|
271
|
+
readonly selectedElements: FabricObject[];
|
|
268
272
|
} & {
|
|
269
|
-
readonly selectedShapes:
|
|
273
|
+
readonly selectedShapes: FabricObject<Partial<fabric.FabricObjectProps>, fabric.SerializedObjectProps, fabric.ObjectEvents>[];
|
|
274
|
+
find(callback: (e: any) => boolean): any;
|
|
275
|
+
getElementById(): void;
|
|
270
276
|
} & {
|
|
271
277
|
_setEditor(editor: Editor): void;
|
|
272
278
|
_triggerUpdate(): void;
|
|
273
279
|
_historyUpdate(): void;
|
|
274
280
|
_fontSizeUpdate(): void;
|
|
275
281
|
} & {
|
|
282
|
+
set(e: FabricObject, options: any): void;
|
|
283
|
+
setUnit({ unit, dpi }: {
|
|
284
|
+
unit: any;
|
|
285
|
+
dpi: any;
|
|
286
|
+
}): void;
|
|
276
287
|
setObjects(objects: any): void;
|
|
277
288
|
selectElements(ids: string[]): void;
|
|
278
289
|
openSidePanel(t: string): void;
|
|
279
290
|
deleteElements(ids: string[]): void;
|
|
280
291
|
setScale(scale: number): void;
|
|
281
292
|
clone(): void;
|
|
282
|
-
addElement(): void;
|
|
283
|
-
setSize({ width, height,
|
|
293
|
+
addElement(options: any): void;
|
|
294
|
+
setSize({ width, height, useMagic }: {
|
|
284
295
|
width: number;
|
|
285
296
|
height: number;
|
|
286
|
-
|
|
297
|
+
useMagic?: boolean;
|
|
287
298
|
}): void;
|
|
288
299
|
setupEditorListeners(): void;
|
|
289
300
|
} & {
|
|
@@ -310,8 +321,8 @@ declare function createStore({ key }: StoreProps): mobx_state_tree.ModelInstance
|
|
|
310
321
|
loadJSON: (data: any) => Promise<void>;
|
|
311
322
|
clear(): void;
|
|
312
323
|
} & {
|
|
313
|
-
|
|
314
|
-
|
|
324
|
+
removeFont(fontFamily: string): void;
|
|
325
|
+
addFont(font: FONT): void;
|
|
315
326
|
/**
|
|
316
327
|
* 加载字体(注入 CSS 并等待字体可用)
|
|
317
328
|
* @param fontFamily - 字体名称
|
|
@@ -319,4 +330,4 @@ declare function createStore({ key }: StoreProps): mobx_state_tree.ModelInstance
|
|
|
319
330
|
loadFont(fontFamily: string): Promise<void[]>;
|
|
320
331
|
}, mobx_state_tree._NotCustomized, mobx_state_tree._NotCustomized>>;
|
|
321
332
|
|
|
322
|
-
export { type
|
|
333
|
+
export { type ExportOptions, Font, Store, type StoreProps, type StoreType, createStore, createStore as default, forEveryChild };
|
package/dist/model/store.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as u}from"../chunk-P5I43V7X.js";import{a as l,h as p,i as m,m as g}from"../chunk-WJT6VPDR.js";import"../chunk-O2XFH626.js";import{types as i,cast as y,flow as b,destroy as f}from"mobx-state-tree";var c=(e,t)=>{if(e?.objects)for(let r of e.objects){if(t(r)===!0)break;c(r,t)}},E=i.model("Font",{fontFamily:i.string,name:i.optional(i.string,""),url:i.optional(i.string,""),img:i.optional(i.string,""),styles:i.frozen()}).preProcessSnapshot(e=>Object.assign(Object.assign({},e),{fontFamily:e.fontFamily||e.name})),h=i.model("Store",{name:"yitu-design",width:1080,height:1080,scale:1,scaleToFit:1,unit:"px",dpi:72,bleed:0,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",selectedElementsIds:i.array(i.string),backgroundColor:i.optional(i.union(i.string,i.frozen()),"#fff"),fonts:i.array(E),editor:i.frozen(null),custom:i.frozen(),objects:i.frozen([]),_key:"",_updateTrigger:0,_updateHistory:0,_updateFontSize:0}).views(e=>({get selectedElements(){let t=e._updateTrigger;return console.log("_trigger\u90FD\u53D8\u5316\u662F\u89E6\u53D1\u805A\u7126\u5143\u7D20\u7684\u5237\u65B0 ---> ",t,e.selectedElementsIds.toJSON()),e.selectedElementsIds.map(r=>e.editor?.objectsHandler.findOneById(r))}})).views(e=>({get selectedShapes(){let t=[];return c({objects:e.selectedElements},r=>{r?.type!=="group"&&t.push(r)}),t},find(t){let r,a=e.editor?.customCanvas.canvas.getObjects();if(a)return c({objects:a},o=>{if(!r&&t(o))return r=o,!0}),r},getElementById(){}})).actions(e=>({_setEditor(t){e.editor=t},_triggerUpdate(){e._updateTrigger=e._updateTrigger+1},_historyUpdate(){e._updateHistory=e._updateHistory+1},_fontSizeUpdate(){e._updateFontSize=e._updateFontSize+1}})).actions(e=>({set(t,r){e.editor?.objectsHandler.update(r,t.id)},setUnit({unit:t,dpi:r}){e.unit=t||e.unit,e.dpi=r||e.dpi},setObjects(t){e.objects=t},selectElements(t){e.selectedElementsIds=y(t)},openSidePanel(t){e.openedSidePanel!==t&&(e.openedSidePanel=t)},deleteElements(t){t.forEach(r=>{e.editor?.objectsHandler.remove(r)})},setScale(t){e.scale=t},clone(){e.editor?.objectsHandler.clone()},addElement(t){console.log("\u6DFB\u52A0json\u6570\u636E",t),e.editor?.objectsHandler.addJson(t)},setSize({width:t,height:r,useMagic:a}){console.log("\u8BBE\u7F6E\u753B\u5E03\u5C3A\u5BF8: ---> ",t,r,a),e.width=t,e.height=r,e.editor?.workareaHandler.setSize({width:t,height:r})},setupEditorListeners(){e.editor&&(e.editor.on("object:modified",()=>{e._triggerUpdate()}),e.editor.on("history:change",()=>{e._historyUpdate()}),e.editor.on("textbox:modified",()=>{e._fontSizeUpdate()}))}})).actions(e=>({_forEachElementUp(t,r){if(!e.editor)return;let a=e.editor.layerHandler.getEffectiveLayers(),o=t.map(n=>({id:n,index:a.findIndex(d=>d.id===n)}));o.sort((n,d)=>d.index-n.index);for(let{index:n}of o){if(n==-1)continue;let d=n<a.length-1&&a[n+1],s=t.indexOf(d?.id)>=0;n===a.length-1||s||r(n)}},_forEachElementDown(t,r){if(!e.editor)return;let a=e.editor.layerHandler.getEffectiveLayers(),o=t.map(n=>({id:n,index:a.findIndex(d=>d.id===n)}));o.sort((n,d)=>d.index-n.index);for(let{index:n}of o){if(n==-1)continue;let d=n>0&&a[n-1],s=t.indexOf(d?.id)>=0;n===0||s||r(n)}return!1}})).actions(e=>({canMoveElementsUp(t){let r=!1;return e._forEachElementUp(t,()=>{r=!0}),r},moveElementsUp(t){if(!e.editor)return;let r=e.editor.layerHandler.getEffectiveLayers();[...t].map(o=>({id:o,index:r.findIndex(n=>n.id===o)})).filter(o=>o.index!==-1).sort((o,n)=>n.index-o.index).map(o=>o.id).forEach(o=>{e.editor?.layerHandler.bringForward(o)}),e._triggerUpdate()},canMoveElementsTop(t){return this.canMoveElementsUp(t)},moveElementsTop(t){e.editor&&(t.forEach(r=>{e.editor?.layerHandler.bringToFront(r)}),e._triggerUpdate())},canMoveElementsDown(t){let r=!1;return e._forEachElementDown(t,()=>{r=!0}),r},moveElementsDown(t){if(!e.editor)return;let r=e.editor.layerHandler.getEffectiveLayers();[...t].map(o=>({id:o,index:r.findIndex(n=>n.id===o)})).filter(o=>o.index!==-1).sort((o,n)=>o.index-n.index).map(o=>o.id).forEach(o=>{e.editor?.layerHandler.sendBackwards(o)}),e._triggerUpdate()},canMoveElementsBottom(t){return this.canMoveElementsDown(t)},moveElementsBottom(t){e.editor&&(t.forEach(r=>{e.editor?.layerHandler.sendToBack(r)}),e._triggerUpdate())},setElementZIndex(){}})).actions(e=>({async toDataURL(t){return e.editor?.rendererHandler.toDataURL(t)},async toBlob(t){return e.editor?.rendererHandler.toBlob(t)},async saveAsImage(t){if(!e.editor)return;let{fileName:r,...a}=t||{multiplier:1},o=await e.editor.rendererHandler.toBlob(a);o&&u(o,r||"yitu."+a.format)},toJSON(){return e.editor?.rendererHandler.toJSON()},toObject(){return e.editor?.rendererHandler.toObject()},loadJSON:b(function*(t){if(!e.editor)return;let r=yield e.editor.sceneHandler.importFromJSON(t);r&&(e.width=r.width,e.height=r.height,e.backgroundColor=r.fill)}),clear(){}})).actions(e=>({removeFont(t){e.fonts.filter(r=>r.fontFamily===t).forEach(r=>{f(r)})},addFont(t){this.removeFont(t.fontFamily),e.fonts.push(t),this.loadFont(t.fontFamily)},async loadFont(t){let r=e.fonts.find(n=>n.fontFamily===t)||l.find(n=>n.fontFamily===t),o=[{fontStyle:"normal",fontWeight:"normal"},{fontStyle:"normal",fontWeight:"bold"}];return r?(r.styles&&(o=r.styles.map(n=>({fontStyle:n.fontStyle||"normal",fontWeight:n.fontWeight||"normal"}))),m(r)):g(t),Promise.all(o.map(n=>p(t,n.fontStyle,n.fontWeight)))}}));function x({key:e}){return h.create({_key:e})}var v=x;export{E as Font,h as Store,x as createStore,v as default,c as forEveryChild};
|
package/dist/project.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { StoreType } from './model/store.js';
|
|
3
3
|
import { FONT } from './utils/fonts.js';
|
|
4
|
+
import 'fabric';
|
|
5
|
+
import 'mobx-state-tree/dist/internal';
|
|
4
6
|
import 'mobx-state-tree';
|
|
5
7
|
import '@ydesign/core';
|
|
6
8
|
import 'mobx';
|
|
@@ -10,14 +12,21 @@ interface ProjectOptions {
|
|
|
10
12
|
}
|
|
11
13
|
declare class Project {
|
|
12
14
|
store: StoreType;
|
|
13
|
-
status: string;
|
|
14
|
-
name: string;
|
|
15
15
|
id: string;
|
|
16
|
+
name: string;
|
|
16
17
|
user: {};
|
|
17
18
|
skipSaving: boolean;
|
|
18
19
|
cloudEnabled: boolean;
|
|
20
|
+
status: string;
|
|
21
|
+
language: string;
|
|
22
|
+
designsLength: number;
|
|
19
23
|
constructor({ store }: ProjectOptions);
|
|
24
|
+
setLanguage(lang: string): void;
|
|
25
|
+
requestSave(): void;
|
|
20
26
|
firstLoad(data?: any): Promise<void>;
|
|
27
|
+
loadById(id: string): Promise<void>;
|
|
28
|
+
updateUrlWithProjectId(): void;
|
|
29
|
+
save(): Promise<void>;
|
|
21
30
|
getGlobalFont(fonts?: FONT[]): Promise<FONT[]>;
|
|
22
31
|
}
|
|
23
32
|
declare const ProjectContext: react.Context<Project | null>;
|
package/dist/project.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-
|
|
1
|
+
import{a,b,c,d}from"./chunk-ONY3GLGA.js";import"./chunk-WJT6VPDR.js";import"./chunk-O2XFH626.js";export{a as ProjectContext,c as createProject,d as default,b as useProject};
|
|
@@ -1,10 +1,17 @@
|
|
|
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
|
|
10
|
+
declare const setBackgroundColorsPreset: (newColors: string[]) => void;
|
|
11
|
+
declare const BackgroundPanel: (({ store }: {
|
|
7
12
|
store: StoreType;
|
|
8
|
-
}) => react_jsx_runtime.JSX.Element
|
|
13
|
+
}) => react_jsx_runtime.JSX.Element) & {
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
9
16
|
|
|
10
|
-
export { BackgroundPanel };
|
|
17
|
+
export { BackgroundPanel, setBackgroundColorsPreset };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-XXR5YN2B.js";import"../chunk-N5KI6CPA.js";import"../chunk-YRJUN267.js";import"../chunk-RVXI723F.js";import"../chunk-OQ6HU62L.js";import"../chunk-FOMWIGAQ.js";import"../chunk-WCHGSVUC.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{b as BackgroundPanel,a as setBackgroundColorsPreset};
|
|
@@ -16,9 +16,12 @@ type Props<ImageType> = {
|
|
|
16
16
|
crossOrigin?: string;
|
|
17
17
|
shadowEnabled?: boolean;
|
|
18
18
|
itemHeight?: number;
|
|
19
|
+
spacing?: number;
|
|
19
20
|
error?: any;
|
|
20
21
|
hideNoResults?: boolean;
|
|
21
22
|
};
|
|
22
|
-
declare const ImagesGrid: <ImageType>({ images, rowsNumber, isLoading, getPreview, getCredit, getImageClassName, onSelect, crossOrigin, shadowEnabled, itemHeight, error, hideNoResults, }: Props<ImageType>) => react_jsx_runtime.JSX.Element
|
|
23
|
+
declare const ImagesGrid: (<ImageType>({ images, rowsNumber, isLoading, getPreview, getCredit, getImageClassName, onSelect, crossOrigin, shadowEnabled, itemHeight, error, hideNoResults, spacing, }: Props<ImageType>) => react_jsx_runtime.JSX.Element) & {
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
23
26
|
|
|
24
27
|
export { ImagesGrid };
|
|
@@ -1,41 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
height: 100%;
|
|
3
|
-
overflow: auto;
|
|
4
|
-
`,W=a.div`
|
|
5
|
-
width: 33%;
|
|
6
|
-
float: left;
|
|
7
|
-
`,j=a.div`
|
|
8
|
-
padding: 6px;
|
|
9
|
-
width: 100%;
|
|
10
|
-
&:hover .credit {
|
|
11
|
-
opacity: 1;
|
|
12
|
-
}
|
|
13
|
-
${w(".credit {opacity: 1;}")}
|
|
14
|
-
`,P=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
|
-
`,z=a.img`
|
|
20
|
-
width: 100%;
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
display: block;
|
|
23
|
-
max-height: 300px;
|
|
24
|
-
min-height: 50px;
|
|
25
|
-
object-fit: contain;
|
|
26
|
-
`,F=a.div`
|
|
27
|
-
position: absolute;
|
|
28
|
-
bottom: 0px;
|
|
29
|
-
left: 0px;
|
|
30
|
-
font-size: 10px;
|
|
31
|
-
padding: 3px;
|
|
32
|
-
padding-top: 10px;
|
|
33
|
-
text-align: center;
|
|
34
|
-
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
|
|
35
|
-
width: 100%;
|
|
36
|
-
opacity: 0;
|
|
37
|
-
color: white;
|
|
38
|
-
`,I=a.p`
|
|
39
|
-
text-align: center;
|
|
40
|
-
padding: 30px;
|
|
41
|
-
`,H=({url:e,onSelect:d,shadowEnabled:i,className:g,itemHeight:r,crossOrigin:s,onLoad:m,credit:l})=>o(j,{className:"ydesign-close-panel",onClick:d,children:u(P,{$dataShadowenabled:i,children:[o(z,{className:g,style:{height:r??"auto "},src:e,draggable:!0,loading:"lazy",crossOrigin:s,onLoad:m}),l&&o(F,{className:"credit",children:l})]})}),B=({images:e,rowsNumber:d,isLoading:i,getPreview:g,getCredit:r,getImageClassName:s,onSelect:m,crossOrigin:l="anonymous",shadowEnabled:x,itemHeight:N,error:b,hideNoResults:S=!1})=>{let p=d||2,T=v(null),y=[];for(let t=0;t<p;t++)y.push((e||[]).filter((h,n)=>n%p===t));let c=v(null),f=()=>{},R=()=>{f()};return O(()=>(f(),()=>{c.current&&(window.clearTimeout(c.current),c.current=null)}),[e?.length,i]),u(D,{ref:T,onScroll:t=>{console.log(t)},children:[y.map((t,h)=>u(W,{style:{width:100/p+"%"},children:[t.map((n,C)=>o(H,{image:n,url:g(n),onSelect:(L,k,E)=>{m(n,L,k,E)},credit:r&&r(n),crossOrigin:l,shadowEnabled:x,itemHeight:N,className:s&&s(n),onLoad:R},C)),i&&o("div",{style:{padding:30},children:o($,{})})]},h)),!i&&(!e||!e.length)&&!b&&!S&&o(I,{children:"No results found"}),b&&o(I,{children:"Loading is failed..."})]})};export{B as ImagesGrid};
|
|
1
|
+
import{a}from"../chunk-FOMWIGAQ.js";import"../chunk-WCHGSVUC.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{a as ImagesGrid};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export { BackgroundSection, DEFAULT_SECTIONS, LayersSection, PhotosSection, Section, ShapesSection, default as SidePanel, SizeSection, TemplatesSection, TextSection, UploadSection } from './side-panel.js';
|
|
2
2
|
export { SectionTab } from './tab-button.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
|
import 'react/jsx-runtime';
|
package/dist/side-panel/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r,b as e,c as f,d as m,e as p,f as t,g as x,h as a,i as b,j as c}from"../chunk-
|
|
1
|
+
import{a as r,b as e,c as f,d as m,e as p,f as t,g as x,h as a,i as b,j as c}from"../chunk-H6GI5LUP.js";import"../chunk-OFA6JIQB.js";import"../chunk-2SA3ZNHH.js";import"../chunk-5C2MNUBC.js";import{a as o}from"../chunk-4HH3B3W3.js";import"../chunk-FGCLY24Q.js";import"../chunk-ISNCNIFJ.js";import"../chunk-NQYSJ5MN.js";import"../chunk-MXZ6RXT3.js";import"../chunk-XXR5YN2B.js";import"../chunk-N5KI6CPA.js";import"../chunk-YRJUN267.js";import"../chunk-RVXI723F.js";import"../chunk-OQ6HU62L.js";import"../chunk-YLXPQ2GI.js";import"../chunk-4LUZF4CB.js";import"../chunk-R452ARGU.js";import"../chunk-FOMWIGAQ.js";import"../chunk-WCHGSVUC.js";import"../chunk-DCGJ6RKU.js";import"../chunk-7NNOHYKX.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{t as BackgroundSection,b as DEFAULT_SECTIONS,x as LayersSection,f as PhotosSection,o as SectionTab,m as ShapesSection,c as SidePanel,a as SizeSection,r as TemplatesSection,e as TextSection,p as UploadSection};
|
|
@@ -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 LayersPanel: ({ store }: {
|
|
10
|
+
declare const LayersPanel: (({ 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 { LayersPanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-YLXPQ2GI.js";import"../chunk-4LUZF4CB.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{a as LayersPanel};
|
|
@@ -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 PhotosPanel: ({ store }: {
|
|
10
|
+
declare const PhotosPanel: (({ 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 { PhotosPanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-R452ARGU.js";import"../chunk-FOMWIGAQ.js";import"../chunk-WCHGSVUC.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{a as PhotosPanel};
|
|
@@ -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 ShapesPanel: ({ store }: {
|
|
10
|
+
declare const ShapesPanel: (({ 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 { ShapesPanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-OFA6JIQB.js";import"../chunk-MXZ6RXT3.js";import"../chunk-DCGJ6RKU.js";import"../chunk-7NNOHYKX.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{a as ShapesPanel};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { StoreType } from '../model/store.js';
|
|
2
2
|
export { SectionTab } from './tab-button.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
|
import 'react/jsx-runtime';
|
|
6
10
|
|
|
7
11
|
interface SectionTabProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l}from"../chunk-
|
|
1
|
+
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l}from"../chunk-H6GI5LUP.js";import"../chunk-OFA6JIQB.js";import"../chunk-2SA3ZNHH.js";import"../chunk-5C2MNUBC.js";import{a}from"../chunk-4HH3B3W3.js";import"../chunk-FGCLY24Q.js";import"../chunk-ISNCNIFJ.js";import"../chunk-NQYSJ5MN.js";import"../chunk-MXZ6RXT3.js";import"../chunk-XXR5YN2B.js";import"../chunk-N5KI6CPA.js";import"../chunk-YRJUN267.js";import"../chunk-RVXI723F.js";import"../chunk-OQ6HU62L.js";import"../chunk-YLXPQ2GI.js";import"../chunk-4LUZF4CB.js";import"../chunk-R452ARGU.js";import"../chunk-FOMWIGAQ.js";import"../chunk-WCHGSVUC.js";import"../chunk-DCGJ6RKU.js";import"../chunk-7NNOHYKX.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{g as BackgroundSection,j as DEFAULT_SECTIONS,h as LayersSection,d as PhotosSection,a as SectionTab,e as ShapesSection,k as SidePanel,i as SizeSection,b as TemplatesSection,c as TextSection,f as UploadSection,l as default};
|
|
@@ -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 SizePanel: ({ store }: {
|
|
10
|
+
declare const SizePanel: (({ 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 { SizePanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-2SA3ZNHH.js";import"../chunk-5C2MNUBC.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{a as SizePanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-4HH3B3W3.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-FGCLY24Q.js";import"../chunk-FOMWIGAQ.js";import"../chunk-WCHGSVUC.js";import"../chunk-ARZMBVXU.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-ISNCNIFJ.js";import"../chunk-FOMWIGAQ.js";import"../chunk-WCHGSVUC.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{a as TextPanel};
|
|
@@ -1,10 +1,17 @@
|
|
|
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
|
|
10
|
+
declare function setUploadFunc(func: any): void;
|
|
11
|
+
declare const UploadPanel: (({ store }: {
|
|
7
12
|
store: StoreType;
|
|
8
|
-
}) => react_jsx_runtime.JSX.Element
|
|
13
|
+
}) => react_jsx_runtime.JSX.Element) & {
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
9
16
|
|
|
10
|
-
export { UploadPanel, UploadPanel as default };
|
|
17
|
+
export { UploadPanel, UploadPanel as default, setUploadFunc };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-NQYSJ5MN.js";import"../chunk-OQ6HU62L.js";import"../chunk-FOMWIGAQ.js";import"../chunk-WCHGSVUC.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{b as UploadPanel,c as default,a as setUploadFunc};
|
|
@@ -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-N5KI6CPA.js";import"../chunk-YRJUN267.js";import"../chunk-RVXI723F.js";import"../chunk-OQ6HU62L.js";import"../chunk-WCHGSVUC.js";import"../chunk-ARZMBVXU.js";import"../chunk-O2XFH626.js";export{a as BackgroundPicker,b as DefaultToolbar,c as default};
|