@ydesign/react-editor 0.0.9 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/dist/app.css +1 -1
  2. package/dist/app.js +1 -1
  3. package/dist/canvas/workspace.d.ts +6 -4
  4. package/dist/canvas/workspace.js +1 -1
  5. package/dist/chunk-2AZQIJ4K.js +1 -0
  6. package/dist/chunk-45NWLCOP.js +15 -0
  7. package/dist/chunk-63A6RW6Y.js +21 -0
  8. package/dist/chunk-EUTDQZKU.js +1 -0
  9. package/dist/chunk-KERQXVBL.js +1 -0
  10. package/dist/{chunk-7YLSIB43.js → chunk-RBRSKAZL.js} +1 -1
  11. package/dist/chunk-SR5OYO6O.js +214 -0
  12. package/dist/chunk-YBC2DYJX.js +9 -0
  13. package/dist/config.d.ts +228 -3
  14. package/dist/config.js +1 -1
  15. package/dist/model/store.d.ts +5 -346
  16. package/dist/model/store.js +1 -1
  17. package/dist/project.d.ts +12 -4
  18. package/dist/project.js +1 -1
  19. package/dist/side-panel/index.d.ts +2 -5
  20. package/dist/side-panel/index.js +1 -1
  21. package/dist/side-panel/side-panel.d.ts +12 -6
  22. package/dist/side-panel/side-panel.js +1 -1
  23. package/dist/store-DfmY1m2j.d.ts +379 -0
  24. package/dist/toolbar/download-button.d.ts +1 -3
  25. package/dist/toolbar/download-button.js +1 -1
  26. package/dist/toolbar/toolbar.d.ts +1 -3
  27. package/dist/toolbar/toolbar.js +18 -1
  28. package/dist/toolbar/zoom-buttons.d.ts +1 -3
  29. package/dist/topbar/topbar.d.ts +19 -6
  30. package/dist/topbar/topbar.js +158 -8
  31. package/package.json +2 -2
  32. package/dist/canvas/context-menu/context-menu.d.ts +0 -2
  33. package/dist/canvas/context-menu/context-menu.js +0 -0
  34. package/dist/canvas/hotkeys.d.ts +0 -3
  35. package/dist/canvas/hotkeys.js +0 -1
  36. package/dist/canvas/workspace-canvas.d.ts +0 -19
  37. package/dist/canvas/workspace-canvas.js +0 -1
  38. package/dist/chunk-2A3HHQ7X.js +0 -1
  39. package/dist/chunk-2T3O5ZZ2.js +0 -1
  40. package/dist/chunk-3TO57JPN.js +0 -1
  41. package/dist/chunk-4HH3B3W3.js +0 -23
  42. package/dist/chunk-4LUZF4CB.js +0 -2
  43. package/dist/chunk-5OA2JYPB.js +0 -1
  44. package/dist/chunk-5X6VER6G.js +0 -1
  45. package/dist/chunk-62YF5KTO.js +0 -1
  46. package/dist/chunk-75WC3GVB.js +0 -1
  47. package/dist/chunk-7NNOHYKX.js +0 -15
  48. package/dist/chunk-A7SUGNOW.js +0 -1
  49. package/dist/chunk-AC6CCGZH.js +0 -1
  50. package/dist/chunk-CB23VFSC.js +0 -1
  51. package/dist/chunk-DGCF2GDA.js +0 -9
  52. package/dist/chunk-HHYPIHAP.js +0 -45
  53. package/dist/chunk-IUFYYEGO.js +0 -1
  54. package/dist/chunk-IV52R7D7.js +0 -27
  55. package/dist/chunk-J6PYM4EV.js +0 -1
  56. package/dist/chunk-JMIN2XMC.js +0 -1
  57. package/dist/chunk-JPIYZYMQ.js +0 -1
  58. package/dist/chunk-JUVJJS4T.js +0 -54
  59. package/dist/chunk-KKA7WASQ.js +0 -16
  60. package/dist/chunk-KVT25LDU.js +0 -1
  61. package/dist/chunk-NDZKXZQ2.js +0 -3
  62. package/dist/chunk-O56ZNYGR.js +0 -1
  63. package/dist/chunk-O73AAP2K.js +0 -1
  64. package/dist/chunk-OPXS6VQ6.js +0 -151
  65. package/dist/chunk-OQ6HU62L.js +0 -1
  66. package/dist/chunk-P5I43V7X.js +0 -1
  67. package/dist/chunk-POCSL7OS.js +0 -50
  68. package/dist/chunk-POWRXH5R.js +0 -1
  69. package/dist/chunk-PSO4W6J7.js +0 -9
  70. package/dist/chunk-QWM7VMLQ.js +0 -9
  71. package/dist/chunk-RSKWMPST.js +0 -1
  72. package/dist/chunk-SGK2XN5D.js +0 -1
  73. package/dist/chunk-T3TEB73P.js +0 -1
  74. package/dist/chunk-TS5CKDHH.js +0 -1
  75. package/dist/chunk-TTHQXTIX.js +0 -1
  76. package/dist/chunk-TTK5Z2Z6.js +0 -1
  77. package/dist/chunk-TZ6B7XDS.js +0 -1
  78. package/dist/chunk-WCHGSVUC.js +0 -8
  79. package/dist/chunk-WJT6VPDR.js +0 -9
  80. package/dist/chunk-XA2G4P2Q.js +0 -1
  81. package/dist/chunk-XRRO2RT7.js +0 -1
  82. package/dist/chunk-YCJBBRRT.js +0 -1
  83. package/dist/chunk-YRJUN267.js +0 -14
  84. package/dist/chunk-YVBVDUVA.js +0 -1
  85. package/dist/hooks/use-duplicate-element.d.ts +0 -16
  86. package/dist/hooks/use-duplicate-element.js +0 -1
  87. package/dist/hooks/use-lock.d.ts +0 -18
  88. package/dist/hooks/use-lock.js +0 -1
  89. package/dist/hooks/use-remove-element.d.ts +0 -16
  90. package/dist/hooks/use-remove-element.js +0 -1
  91. package/dist/lib/utils.d.ts +0 -5
  92. package/dist/lib/utils.js +0 -1
  93. package/dist/side-panel/background-panel.d.ts +0 -17
  94. package/dist/side-panel/background-panel.js +0 -1
  95. package/dist/side-panel/images-grid.d.ts +0 -27
  96. package/dist/side-panel/images-grid.js +0 -1
  97. package/dist/side-panel/layers-panel.d.ts +0 -16
  98. package/dist/side-panel/layers-panel.js +0 -1
  99. package/dist/side-panel/photos-panel.d.ts +0 -16
  100. package/dist/side-panel/photos-panel.js +0 -1
  101. package/dist/side-panel/shapes-panel.d.ts +0 -16
  102. package/dist/side-panel/shapes-panel.js +0 -1
  103. package/dist/side-panel/size-panel.d.ts +0 -16
  104. package/dist/side-panel/size-panel.js +0 -1
  105. package/dist/side-panel/tab-button.d.ts +0 -12
  106. package/dist/side-panel/tab-button.js +0 -1
  107. package/dist/side-panel/templates-panel.d.ts +0 -16
  108. package/dist/side-panel/templates-panel.js +0 -1
  109. package/dist/side-panel/text-panel.d.ts +0 -16
  110. package/dist/side-panel/text-panel.js +0 -1
  111. package/dist/side-panel/upload-panel.d.ts +0 -17
  112. package/dist/side-panel/upload-panel.js +0 -1
  113. package/dist/toolbar/default-toolbar.d.ts +0 -21
  114. package/dist/toolbar/default-toolbar.js +0 -1
  115. package/dist/toolbar/duplicate-button.d.ts +0 -16
  116. package/dist/toolbar/duplicate-button.js +0 -1
  117. package/dist/toolbar/element-container.d.ts +0 -13
  118. package/dist/toolbar/element-container.js +0 -1
  119. package/dist/toolbar/figure-toolbar.d.ts +0 -33
  120. package/dist/toolbar/figure-toolbar.js +0 -1
  121. package/dist/toolbar/filters-picker.d.ts +0 -18
  122. package/dist/toolbar/filters-picker.js +0 -1
  123. package/dist/toolbar/flip-button.d.ts +0 -18
  124. package/dist/toolbar/flip-button.js +0 -1
  125. package/dist/toolbar/group-button.d.ts +0 -16
  126. package/dist/toolbar/group-button.js +0 -1
  127. package/dist/toolbar/history-buttons.d.ts +0 -16
  128. package/dist/toolbar/history-buttons.js +0 -1
  129. package/dist/toolbar/image-eraser-pen.d.ts +0 -10
  130. package/dist/toolbar/image-eraser-pen.js +0 -1
  131. package/dist/toolbar/image-remove-background.d.ts +0 -10
  132. package/dist/toolbar/image-remove-background.js +0 -1
  133. package/dist/toolbar/image-toolbar.d.ts +0 -36
  134. package/dist/toolbar/image-toolbar.js +0 -1
  135. package/dist/toolbar/lock-button.d.ts +0 -16
  136. package/dist/toolbar/lock-button.js +0 -1
  137. package/dist/toolbar/many-toolbar.d.ts +0 -5
  138. package/dist/toolbar/many-toolbar.js +0 -1
  139. package/dist/toolbar/opacity-picker.d.ts +0 -16
  140. package/dist/toolbar/opacity-picker.js +0 -1
  141. package/dist/toolbar/position-picker.d.ts +0 -16
  142. package/dist/toolbar/position-picker.js +0 -1
  143. package/dist/toolbar/remove-button.d.ts +0 -16
  144. package/dist/toolbar/remove-button.js +0 -1
  145. package/dist/toolbar/text-ai-write.d.ts +0 -7
  146. package/dist/toolbar/text-ai-write.js +0 -1
  147. package/dist/toolbar/text-toolbar.d.ts +0 -19
  148. package/dist/toolbar/text-toolbar.js +0 -1
  149. package/dist/topbar/create-design.d.ts +0 -30
  150. package/dist/topbar/create-design.js +0 -1
  151. package/dist/topbar/file-menu.d.ts +0 -19
  152. package/dist/topbar/file-menu.js +0 -1
  153. package/dist/utils/api.d.ts +0 -14
  154. package/dist/utils/api.js +0 -1
  155. package/dist/utils/blob.d.ts +0 -5
  156. package/dist/utils/blob.js +0 -1
  157. package/dist/utils/download.d.ts +0 -3
  158. package/dist/utils/download.js +0 -1
  159. package/dist/utils/figure-to-svg.d.ts +0 -36
  160. package/dist/utils/figure-to-svg.js +0 -1
  161. package/dist/utils/file.d.ts +0 -3
  162. package/dist/utils/file.js +0 -1
  163. package/dist/utils/filters.d.ts +0 -2
  164. package/dist/utils/filters.js +0 -0
  165. package/dist/utils/fonts.d.ts +0 -68
  166. package/dist/utils/fonts.js +0 -1
  167. package/dist/utils/image.d.ts +0 -19
  168. package/dist/utils/image.js +0 -1
  169. package/dist/utils/l10n.d.ts +0 -227
  170. package/dist/utils/l10n.js +0 -1
  171. package/dist/utils/loader.d.ts +0 -6
  172. package/dist/utils/loader.js +0 -1
  173. package/dist/utils/screen.d.ts +0 -6
  174. package/dist/utils/screen.js +0 -1
  175. package/dist/utils/svg.d.ts +0 -3
  176. package/dist/utils/svg.js +0 -1
  177. package/dist/utils/text.d.ts +0 -3
  178. package/dist/utils/text.js +0 -1
  179. package/dist/utils/use-api.d.ts +0 -2
  180. package/dist/utils/use-api.js +0 -0
  181. package/dist/utils/use-axios.d.ts +0 -5
  182. package/dist/utils/use-axios.js +0 -1
  183. /package/dist/{chunk-MXZ6RXT3.js → chunk-EWOU5F3O.js} +0 -0
  184. /package/dist/{chunk-YCFED7XQ.js → chunk-WFMCGQ5V.js} +0 -0
@@ -1 +0,0 @@
1
- import{a}from"../chunk-YVBVDUVA.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{a as FiltersPicker};
@@ -1,18 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { FabricObject } from '@ydesign/core';
3
- import { StoreType } from '../model/store.js';
4
- import 'fabric';
5
- import 'mobx-state-tree/dist/internal';
6
- import 'mobx-state-tree';
7
- import '../utils/fonts.js';
8
- import 'mobx';
9
-
10
- declare const FlipButton: (({ element, store }: {
11
- elements?: Array<FabricObject>;
12
- element?: FabricObject;
13
- store: StoreType;
14
- }) => react_jsx_runtime.JSX.Element) & {
15
- displayName: string;
16
- };
17
-
18
- export { FlipButton };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-TTK5Z2Z6.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{a as FlipButton};
@@ -1,16 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { StoreType } from '../model/store.js';
3
- import 'fabric';
4
- import 'mobx-state-tree/dist/internal';
5
- import 'mobx-state-tree';
6
- import '@ydesign/core';
7
- import '../utils/fonts.js';
8
- import 'mobx';
9
-
10
- declare const GroupButton: (({ store }: {
11
- store: StoreType;
12
- }) => react_jsx_runtime.JSX.Element) & {
13
- displayName: string;
14
- };
15
-
16
- export { GroupButton };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-T3TEB73P.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{a as GroupButton};
@@ -1,16 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { StoreType } from '../model/store.js';
3
- import 'fabric';
4
- import 'mobx-state-tree/dist/internal';
5
- import 'mobx-state-tree';
6
- import '@ydesign/core';
7
- import '../utils/fonts.js';
8
- import 'mobx';
9
-
10
- declare const HistoryButtons: (({ store }: {
11
- store: StoreType;
12
- }) => react_jsx_runtime.JSX.Element) & {
13
- displayName: string;
14
- };
15
-
16
- export { HistoryButtons };
@@ -1 +0,0 @@
1
- import{e as a}from"../chunk-KKA7WASQ.js";import"../chunk-KVT25LDU.js";import"../chunk-2T3O5ZZ2.js";import"../chunk-NDZKXZQ2.js";import"../chunk-CB23VFSC.js";import"../chunk-3TO57JPN.js";import"../chunk-O73AAP2K.js";import"../chunk-AC6CCGZH.js";import"../chunk-RSKWMPST.js";import"../chunk-XRRO2RT7.js";import"../chunk-YCJBBRRT.js";import"../chunk-5OA2JYPB.js";import"../chunk-2A3HHQ7X.js";import"../chunk-7YLSIB43.js";import"../chunk-J6PYM4EV.js";import"../chunk-62YF5KTO.js";import"../chunk-YVBVDUVA.js";import"../chunk-TTK5Z2Z6.js";import"../chunk-T3TEB73P.js";import"../chunk-IUFYYEGO.js";import"../chunk-MXZ6RXT3.js";import"../chunk-O56ZNYGR.js";import"../chunk-RVXI723F.js";import"../chunk-YRJUN267.js";import"../chunk-OQ6HU62L.js";import"../chunk-WCHGSVUC.js";import"../chunk-TZ6B7XDS.js";import"../chunk-7NNOHYKX.js";import"../chunk-TTHQXTIX.js";import"../chunk-YCFED7XQ.js";import"../chunk-WJT6VPDR.js";import"../chunk-JMIN2XMC.js";import"../chunk-75WC3GVB.js";import"../chunk-O2XFH626.js";export{a as HistoryButtons};
@@ -1,10 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { FabricImage } from '@ydesign/core';
3
-
4
- declare const ImageEraserPen: (({ element }: {
5
- element: FabricImage;
6
- }) => react_jsx_runtime.JSX.Element) & {
7
- displayName: string;
8
- };
9
-
10
- export { ImageEraserPen };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-O73AAP2K.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{a as ImageEraserPen};
@@ -1,10 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { FabricImage } from '@ydesign/core';
3
-
4
- declare const ImageRemoveBackground: (({ element }: {
5
- element: FabricImage;
6
- }) => react_jsx_runtime.JSX.Element) & {
7
- displayName: string;
8
- };
9
-
10
- export { ImageRemoveBackground };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-AC6CCGZH.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{a as ImageRemoveBackground};
@@ -1,36 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { FabricImage } from '@ydesign/core';
3
- import { StoreType } from '../model/store.js';
4
- import 'fabric';
5
- import 'mobx-state-tree/dist/internal';
6
- import 'mobx-state-tree';
7
- import '../utils/fonts.js';
8
- import 'mobx';
9
-
10
- type Props = {
11
- store: StoreType;
12
- components?: any;
13
- };
14
- declare const ImageFitToBackground: (({ element, store }: {
15
- element: FabricImage;
16
- store: StoreType;
17
- }) => react_jsx_runtime.JSX.Element) & {
18
- displayName: string;
19
- };
20
- declare const ImageCrop: (({ element, store }: {
21
- element: FabricImage;
22
- store: StoreType;
23
- }) => react_jsx_runtime.JSX.Element) & {
24
- displayName: string;
25
- };
26
- declare const ImageClip: (({ element, store }: {
27
- element: FabricImage;
28
- store: StoreType;
29
- }) => react_jsx_runtime.JSX.Element) & {
30
- displayName: string;
31
- };
32
- declare const ImageToolbar: (({ store, components }: Props) => react_jsx_runtime.JSX.Element) & {
33
- displayName: string;
34
- };
35
-
36
- export { ImageClip, ImageCrop, ImageFitToBackground, ImageToolbar, ImageToolbar as default };
@@ -1 +0,0 @@
1
- import{a,b,c,d,e}from"../chunk-NDZKXZQ2.js";import"../chunk-CB23VFSC.js";import"../chunk-3TO57JPN.js";import"../chunk-O73AAP2K.js";import"../chunk-AC6CCGZH.js";import"../chunk-YVBVDUVA.js";import"../chunk-TTK5Z2Z6.js";import"../chunk-MXZ6RXT3.js";import"../chunk-YRJUN267.js";import"../chunk-WCHGSVUC.js";import"../chunk-TZ6B7XDS.js";import"../chunk-7NNOHYKX.js";import"../chunk-TTHQXTIX.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{c as ImageClip,b as ImageCrop,a as ImageFitToBackground,d as ImageToolbar,e as default};
@@ -1,16 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { StoreType } from '../model/store.js';
3
- import 'fabric';
4
- import 'mobx-state-tree/dist/internal';
5
- import 'mobx-state-tree';
6
- import '@ydesign/core';
7
- import '../utils/fonts.js';
8
- import 'mobx';
9
-
10
- declare const LockButton: (({ store }: {
11
- store: StoreType;
12
- }) => react_jsx_runtime.JSX.Element) & {
13
- displayName: string;
14
- };
15
-
16
- export { LockButton };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-RSKWMPST.js";import"../chunk-YCFED7XQ.js";import"../chunk-75WC3GVB.js";import"../chunk-O2XFH626.js";export{a as LockButton};
@@ -1,5 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare const ManyToolbar: () => react_jsx_runtime.JSX.Element;
4
-
5
- export { ManyToolbar, ManyToolbar as default };
@@ -1 +0,0 @@
1
- import{a,b}from"../chunk-XRRO2RT7.js";import"../chunk-O2XFH626.js";export{a as ManyToolbar,b as default};
@@ -1,16 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { StoreType } from '../model/store.js';
3
- import 'fabric';
4
- import 'mobx-state-tree/dist/internal';
5
- import 'mobx-state-tree';
6
- import '@ydesign/core';
7
- import '../utils/fonts.js';
8
- import 'mobx';
9
-
10
- declare const OpacityPicker: (({ store }: {
11
- store: StoreType;
12
- }) => react_jsx_runtime.JSX.Element) & {
13
- displayName: string;
14
- };
15
-
16
- export { OpacityPicker };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-YCJBBRRT.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{a as OpacityPicker};
@@ -1,16 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { StoreType } from '../model/store.js';
3
- import 'fabric';
4
- import 'mobx-state-tree/dist/internal';
5
- import 'mobx-state-tree';
6
- import '@ydesign/core';
7
- import '../utils/fonts.js';
8
- import 'mobx';
9
-
10
- declare const PositionPicker: (({ store }: {
11
- store: StoreType;
12
- }) => react_jsx_runtime.JSX.Element) & {
13
- displayName: string;
14
- };
15
-
16
- export { PositionPicker };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-5OA2JYPB.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{a as PositionPicker};
@@ -1,16 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { StoreType } from '../model/store.js';
3
- import 'fabric';
4
- import 'mobx-state-tree/dist/internal';
5
- import 'mobx-state-tree';
6
- import '@ydesign/core';
7
- import '../utils/fonts.js';
8
- import 'mobx';
9
-
10
- declare const RemoveButton: (({ store }: {
11
- store: StoreType;
12
- }) => react_jsx_runtime.JSX.Element) & {
13
- displayName: string;
14
- };
15
-
16
- export { RemoveButton };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-2A3HHQ7X.js";import"../chunk-IUFYYEGO.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{a as RemoveButton};
@@ -1,7 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare const TextAiWrite: (() => react_jsx_runtime.JSX.Element) & {
4
- displayName: string;
5
- };
6
-
7
- export { TextAiWrite };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-2T3O5ZZ2.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{a as TextAiWrite};
@@ -1,19 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { StoreType } from '../model/store.js';
3
- import 'fabric';
4
- import 'mobx-state-tree/dist/internal';
5
- import 'mobx-state-tree';
6
- import '@ydesign/core';
7
- import '../utils/fonts.js';
8
- import 'mobx';
9
-
10
- type PageProps = {
11
- store: StoreType;
12
- components?: any;
13
- };
14
- declare const ALIGN_OPTIONS: string[];
15
- declare const TextToolbar: (({ store, components }: PageProps) => react_jsx_runtime.JSX.Element) & {
16
- displayName: string;
17
- };
18
-
19
- export { ALIGN_OPTIONS, TextToolbar, TextToolbar as default };
@@ -1 +0,0 @@
1
- import{a,b,c}from"../chunk-KVT25LDU.js";import"../chunk-2T3O5ZZ2.js";import"../chunk-YVBVDUVA.js";import"../chunk-RVXI723F.js";import"../chunk-YRJUN267.js";import"../chunk-WCHGSVUC.js";import"../chunk-YCFED7XQ.js";import"../chunk-WJT6VPDR.js";import"../chunk-O2XFH626.js";export{a as ALIGN_OPTIONS,b as TextToolbar,c as default};
@@ -1,30 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { StoreType } from '../model/store.js';
3
- import { ProjectType } from '../project.js';
4
- import 'fabric';
5
- import 'mobx-state-tree/dist/internal';
6
- import 'mobx-state-tree';
7
- import '@ydesign/core';
8
- import '../utils/fonts.js';
9
- import 'mobx';
10
- import 'react';
11
-
12
- type Size = {
13
- name: string;
14
- desc: string;
15
- width: number;
16
- height: number;
17
- unit: string;
18
- bgColor?: string;
19
- };
20
- interface CreateDesignProps {
21
- store: StoreType;
22
- project: ProjectType;
23
- visible: boolean;
24
- onClose: () => void;
25
- onConfirm: (size: Size) => void;
26
- mode?: 'create' | 'open';
27
- }
28
- declare const CreateDesign: ({ project, visible, onClose, onConfirm }: CreateDesignProps) => react_jsx_runtime.JSX.Element;
29
-
30
- export { CreateDesign };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-OPXS6VQ6.js";import"../chunk-5C2MNUBC.js";import"../chunk-MXZ6RXT3.js";import"../chunk-O2XFH626.js";export{a as CreateDesign};
@@ -1,19 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { StoreType } from '../model/store.js';
3
- import { ProjectType } from '../project.js';
4
- import 'fabric';
5
- import 'mobx-state-tree/dist/internal';
6
- import 'mobx-state-tree';
7
- import '@ydesign/core';
8
- import '../utils/fonts.js';
9
- import 'mobx';
10
- import 'react';
11
-
12
- declare const FileMenu: (({ store, project }: {
13
- store: StoreType;
14
- project: ProjectType;
15
- }) => react_jsx_runtime.JSX.Element) & {
16
- displayName: string;
17
- };
18
-
19
- export { FileMenu };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-A7SUGNOW.js";import"../chunk-OPXS6VQ6.js";import"../chunk-5C2MNUBC.js";import"../chunk-MXZ6RXT3.js";import"../chunk-YCFED7XQ.js";import"../chunk-O2XFH626.js";export{a as FileMenu};
@@ -1,14 +0,0 @@
1
- /**
2
- * 后台的接口汇总
3
- */
4
- declare const URL = "https://api.yitupic.com";
5
- declare const API = "https://api.yitupic.com/api";
6
- declare const getAPI: () => string;
7
- declare const URLS: Record<string, (...args: any[]) => string>;
8
- declare const getFontList: () => string;
9
- declare const templateList: () => string;
10
- declare const templateDetail: (id: string) => string;
11
- declare const uploadImage: () => string;
12
- declare const setAPI: (o: string, t: (...args: any[]) => string) => void;
13
-
14
- export { API, URL, URLS, getAPI, getFontList, setAPI, templateDetail, templateList, uploadImage };
package/dist/utils/api.js DELETED
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h,i}from"../chunk-TTHQXTIX.js";import"../chunk-O2XFH626.js";export{b as API,a as URL,d as URLS,c as getAPI,e as getFontList,i as setAPI,g as templateDetail,f as templateList,h as uploadImage};
@@ -1,5 +0,0 @@
1
- declare function dataURLtoBlob(dataurl: string): Blob;
2
- declare function blobToDataURL(blob: Blob, callback: (dataUrl: string) => void): void;
3
- declare function blobToDataURLAsync(blob: Blob): Promise<string>;
4
-
5
- export { blobToDataURL, blobToDataURLAsync, dataURLtoBlob };
@@ -1 +0,0 @@
1
- import"../chunk-O2XFH626.js";function l(n){let e=n.split(","),r=e[0].match(/:(.*?);/)?.[1]||"application/octet-stream",o=atob(e[1]),t=o.length,a=new Uint8Array(t);for(;t--;)a[t]=o.charCodeAt(t);return new Blob([a],{type:r})}function s(n,e){let r=new FileReader;r.onload=o=>{let t=o.target?.result;typeof t=="string"&&e(t)},r.readAsDataURL(n)}function i(n){return new Promise((e,r)=>{let o=new FileReader;o.onload=t=>{let a=t.target?.result;typeof a=="string"?e(a):r(new Error("Failed to convert blob to data URL"))},o.onerror=()=>r(new Error("Failed to read blob")),o.readAsDataURL(n)})}export{s as blobToDataURL,i as blobToDataURLAsync,l as dataURLtoBlob};
@@ -1,3 +0,0 @@
1
- declare function downloadFile(file: Blob, fileName: string): Promise<void>;
2
-
3
- export { downloadFile };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-P5I43V7X.js";import"../chunk-O2XFH626.js";export{a as downloadFile};
@@ -1,36 +0,0 @@
1
- interface SizeParams {
2
- width: number;
3
- height: number;
4
- }
5
- interface RectParams extends SizeParams {
6
- cornerRadius?: number;
7
- }
8
- interface FigureParams extends SizeParams {
9
- id?: string;
10
- fill: string;
11
- stroke: string;
12
- strokeWidth: number;
13
- dash?: number[];
14
- subType: string;
15
- cornerRadius?: number;
16
- }
17
- type PathResult = string | {
18
- path: string;
19
- scaleX: number;
20
- scaleY: number;
21
- };
22
- type PathDataFunc = (params: FigureParams) => PathResult;
23
- declare const rectData: ({ width, height, cornerRadius }: RectParams) => string;
24
- declare const circleData: ({ width, height }: SizeParams) => string;
25
- declare function starPath({ width: t, height: h }: SizeParams): string;
26
- declare const triangleData: ({ width: t, height: h }: SizeParams) => string;
27
- declare const rightTriangleData: ({ width: t, height: h }: SizeParams) => string;
28
- declare function diamondPath({ width: t, height: h }: SizeParams): string;
29
- declare function pentagonPath({ width: t, height: h }: SizeParams): string;
30
- declare function hexagonPath({ width: t, height: h }: SizeParams): string;
31
- declare function speechBubblePath({ width: t, height: h }: SizeParams): string;
32
- declare function crossPath({ width: t, height: h }: SizeParams): string;
33
- declare const TYPES: Record<string, PathDataFunc>;
34
- declare function figureToSvg(params: FigureParams): string;
35
-
36
- export { TYPES, circleData, crossPath, diamondPath, figureToSvg, hexagonPath, pentagonPath, rectData, rightTriangleData, speechBubblePath, starPath, triangleData };
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l}from"../chunk-7NNOHYKX.js";import"../chunk-O2XFH626.js";export{k as TYPES,b as circleData,j as crossPath,f as diamondPath,l as figureToSvg,h as hexagonPath,g as pentagonPath,a as rectData,e as rightTriangleData,i as speechBubblePath,c as starPath,d as triangleData};
@@ -1,3 +0,0 @@
1
- declare function localFileToURL(e: File): Promise<unknown>;
2
-
3
- export { localFileToURL };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-OQ6HU62L.js";import"../chunk-O2XFH626.js";export{a as localFileToURL};
@@ -1,2 +0,0 @@
1
-
2
- export { }
File without changes
@@ -1,68 +0,0 @@
1
- import * as mobx from 'mobx';
2
-
3
- type FONT = {
4
- fontFamily: string;
5
- url?: string;
6
- img?: string;
7
- name?: string;
8
- styles?: Array<{
9
- src: string;
10
- fontStyle?: string;
11
- fontWeight?: string;
12
- }>;
13
- };
14
- declare const globalFonts: mobx.IObservableArray<FONT>;
15
- declare function addGlobalFont(font: FONT): void;
16
- declare function removeGlobalFont(fontFamily: string): void;
17
- declare function replaceGlobalFonts(fonts: Array<FONT>): void;
18
- /**
19
- * 检查字体是否已加载
20
- */
21
- declare const isFontLoaded: (fontFamily: string) => boolean;
22
- /**
23
- * 设置字体加载超时回调
24
- */
25
- declare const setFontLoadTimeoutCallback: (callback: (message: string) => void) => void;
26
- declare const setTimeoutGetter: (getter: () => number) => void;
27
- /**
28
- * 加载字体并等待其可用
29
- *
30
- * 策略:
31
- * 1. 优先使用 document.fonts.load() API(现代浏览器)
32
- * 2. 降级方案:轮询检测字体宽度变化
33
- *
34
- * @param fontFamily - 字体名称
35
- * @param fontStyle - 字体样式 (normal/italic)
36
- * @param fontWeight - 字体粗细 (normal/bold/100-900)
37
- */
38
- declare function loadFont(fontFamily: string, fontStyle?: string, fontWeight?: string): Promise<void>;
39
- /**
40
- * 注入自定义字体到页面
41
- * 通过动态创建 @font-face 规则实现
42
- *
43
- * @param font - 字体配置对象
44
- */
45
- declare function injectCustomFont(font: FONT): void;
46
- /**
47
- * 设置 Google Fonts 字体变体
48
- * @param variants - 变体字符串,如 '400,700,900'
49
- */
50
- declare function setGoogleFontsVariants(variants: string): void;
51
- /**
52
- * 获取当前 Google Fonts 字体变体配置
53
- */
54
- declare function getGoogleFontsVariants(): string;
55
- /**
56
- * 生成 Google Fonts CSS URL
57
- * @param fontFamily - 字体名称
58
- */
59
- declare function getGoogleFontsUrl(fontFamily: string): string;
60
- /**
61
- * 注入 Google 字体到页面
62
- * 通过动态创建 <link> 标签加载 Google Fonts CSS
63
- *
64
- * @param fontFamily - 字体名称
65
- */
66
- declare function injectGoogleFont(fontFamily: string): void;
67
-
68
- export { type FONT, addGlobalFont, getGoogleFontsUrl, getGoogleFontsVariants, globalFonts, injectCustomFont, injectGoogleFont, isFontLoaded, loadFont, removeGlobalFont, replaceGlobalFonts, setFontLoadTimeoutCallback, setGoogleFontsVariants, setTimeoutGetter };
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../chunk-WJT6VPDR.js";import"../chunk-O2XFH626.js";export{b as addGlobalFont,l as getGoogleFontsUrl,k as getGoogleFontsVariants,a as globalFonts,i as injectCustomFont,m as injectGoogleFont,e as isFontLoaded,h as loadFont,c as removeGlobalFont,d as replaceGlobalFonts,f as setFontLoadTimeoutCallback,j as setGoogleFontsVariants,g as setTimeoutGetter};
@@ -1,19 +0,0 @@
1
- declare function getImageSize(url: string): Promise<any>;
2
- type Size = {
3
- width: number;
4
- height: number;
5
- };
6
- /**
7
- * 计算图片适配到目标尺寸的裁剪参数(Cover 模式,居中裁剪)
8
- * @param targetSize 目标尺寸(画布/workarea)
9
- * @param imageSize 原始图片尺寸
10
- * @returns Fabric.js v6 裁剪参数(像素值)
11
- */
12
- declare function getCrop(targetSize: Size, imageSize: Size): {
13
- cropX: number;
14
- cropY: number;
15
- width: number;
16
- height: number;
17
- };
18
-
19
- export { getCrop, getImageSize };
@@ -1 +0,0 @@
1
- import{a,b}from"../chunk-3TO57JPN.js";import"../chunk-O2XFH626.js";export{b as getCrop,a as getImageSize};