mce 0.13.5 → 0.13.7
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/components/EditorLayout.vue.d.ts +7 -5
- package/dist/components/Floatbar.vue.d.ts +2 -9
- package/dist/components/MadeWith.vue.d.ts +3 -0
- package/dist/components/shared/Cropper.vue.d.ts +89 -0
- package/dist/composables/editor.d.ts +0 -1
- package/dist/editor.d.ts +2 -0
- package/dist/index.css +138 -79
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2138 -1698
- package/dist/mixins/0.context.d.ts +25 -3
- package/dist/mixins/2.box.d.ts +4 -4
- package/dist/mixins/4.0.text.d.ts +6 -1
- package/dist/mixins/snapshot.d.ts +1 -1
- package/dist/typed-plugins.d.ts +0 -1
- package/package.json +1 -1
- package/dist/mixins/0.helper.d.ts +0 -30
- /package/dist/components/{Setup.vue.d.ts → ForegroundCropper.vue.d.ts} +0 -0
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
import type { Cursor,
|
|
1
|
+
import type { Cursor, Vector2Data } from 'modern-canvas';
|
|
2
|
+
import type { IndexCharacter } from 'modern-text/web-components';
|
|
2
3
|
import type { ComputedRef, Ref } from 'vue';
|
|
3
4
|
import type { AxisAlignedBoundingBox } from '../types';
|
|
4
|
-
import { Camera2D, DrawboardEffect, Element2D, Engine, Timeline } from 'modern-canvas';
|
|
5
|
+
import { Camera2D, DrawboardEffect, Element2D, Engine, Node, Timeline } from 'modern-canvas';
|
|
5
6
|
import { Fonts } from 'modern-font';
|
|
6
7
|
import { Doc } from '../models';
|
|
7
8
|
declare global {
|
|
8
9
|
namespace Mce {
|
|
10
|
+
type Tblock = 'top' | 'bottom';
|
|
11
|
+
type Tinline = 'start' | 'end' | 'left' | 'right';
|
|
12
|
+
type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
|
|
13
|
+
type ParsedAnchor = {
|
|
14
|
+
side: 'center';
|
|
15
|
+
align: 'center';
|
|
16
|
+
} | {
|
|
17
|
+
side: Tblock;
|
|
18
|
+
align: 'left' | 'right' | 'center';
|
|
19
|
+
} | {
|
|
20
|
+
side: 'left' | 'right';
|
|
21
|
+
align: Tblock | 'center';
|
|
22
|
+
};
|
|
9
23
|
interface Editor {
|
|
10
24
|
fonts: Fonts;
|
|
11
25
|
renderEngine: Ref<Engine>;
|
|
@@ -22,12 +36,20 @@ declare global {
|
|
|
22
36
|
nodeIndexMap: Map<string, number>;
|
|
23
37
|
selection: Ref<Node[]>;
|
|
24
38
|
elementSelection: Ref<Element2D[]>;
|
|
25
|
-
textSelection: Ref<
|
|
39
|
+
textSelection: Ref<IndexCharacter[] | undefined>;
|
|
26
40
|
hoverElement: Ref<Element2D | undefined>;
|
|
27
41
|
state: Ref<State | undefined>;
|
|
28
42
|
setState: (state: State, context?: StateContext) => void;
|
|
29
43
|
stateContext: Ref<StateContext | undefined>;
|
|
30
44
|
getGlobalPointer: () => Vector2Data;
|
|
45
|
+
parseAnchor: (anchor: Anchor, isRtl?: boolean) => ParsedAnchor;
|
|
46
|
+
isRoot: (value: any) => value is Node;
|
|
47
|
+
isElement: (value: any) => value is Element2D;
|
|
48
|
+
isFrame: (value: any) => value is Element2D;
|
|
49
|
+
isVisible: (node: Node) => boolean;
|
|
50
|
+
setVisible: (node: Node, visible: boolean) => void;
|
|
51
|
+
isLock: (node: Node) => boolean;
|
|
52
|
+
setLock: (node: Node, lock: boolean) => void;
|
|
31
53
|
}
|
|
32
54
|
interface Events {
|
|
33
55
|
setState: [state: State];
|
package/dist/mixins/2.box.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { Node } from 'modern-canvas';
|
|
1
|
+
import type { Element2D, Node } from 'modern-canvas';
|
|
2
2
|
import type { ComputedRef } from 'vue';
|
|
3
3
|
import type { AxisAlignedBoundingBox, OrientedBoundingBox } from '../types';
|
|
4
|
-
import { Element2D } from 'modern-canvas';
|
|
5
4
|
declare global {
|
|
6
5
|
namespace Mce {
|
|
7
6
|
interface Editor {
|
|
8
7
|
obbToFit: (element: Element2D) => void;
|
|
9
8
|
getObb: (node: Node | Node[] | undefined, inTarget?: 'drawboard' | 'frame' | 'parent') => OrientedBoundingBox;
|
|
10
|
-
getObbInDrawboard: (node?: Node | Node[]) => OrientedBoundingBox;
|
|
11
9
|
getAabb: (node: Node | Node[] | undefined, inTarget?: 'drawboard' | 'frame' | 'parent') => AxisAlignedBoundingBox;
|
|
12
|
-
getAabbInDrawboard: (node?: Node | Node[]) => AxisAlignedBoundingBox;
|
|
13
10
|
aabbToDrawboardAabb: (aabb: AxisAlignedBoundingBox) => AxisAlignedBoundingBox;
|
|
14
11
|
rootAabb: ComputedRef<AxisAlignedBoundingBox>;
|
|
15
12
|
selectionAabb: ComputedRef<AxisAlignedBoundingBox>;
|
|
13
|
+
selectionAabbInDrawboard: ComputedRef<AxisAlignedBoundingBox>;
|
|
14
|
+
selectionObb: ComputedRef<OrientedBoundingBox>;
|
|
15
|
+
selectionObbInDrawboard: ComputedRef<OrientedBoundingBox>;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { Element2D } from 'modern-canvas';
|
|
1
|
+
import type { Element2D } from 'modern-canvas';
|
|
2
|
+
import type { NormalizedFill } from 'modern-idoc';
|
|
2
3
|
declare global {
|
|
3
4
|
namespace Mce {
|
|
4
5
|
interface Editor {
|
|
5
6
|
textFontSizeToFit: (element: Element2D, scale?: number) => void;
|
|
6
7
|
textToFit: (element: Element2D, typography?: Mce.TypographyStrategy) => void;
|
|
8
|
+
getTextStyle: (key: string) => any;
|
|
9
|
+
setTextStyle: (key: string, value: any) => void;
|
|
10
|
+
getTextFill: () => NormalizedFill | undefined;
|
|
11
|
+
setTextFill: (value: NormalizedFill | undefined) => void;
|
|
7
12
|
}
|
|
8
13
|
}
|
|
9
14
|
}
|
package/dist/typed-plugins.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Element2D, Node } from 'modern-canvas';
|
|
2
|
-
declare global {
|
|
3
|
-
namespace Mce {
|
|
4
|
-
type Tblock = 'top' | 'bottom';
|
|
5
|
-
type Tinline = 'start' | 'end' | 'left' | 'right';
|
|
6
|
-
type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
|
|
7
|
-
type ParsedAnchor = {
|
|
8
|
-
side: 'center';
|
|
9
|
-
align: 'center';
|
|
10
|
-
} | {
|
|
11
|
-
side: Tblock;
|
|
12
|
-
align: 'left' | 'right' | 'center';
|
|
13
|
-
} | {
|
|
14
|
-
side: 'left' | 'right';
|
|
15
|
-
align: Tblock | 'center';
|
|
16
|
-
};
|
|
17
|
-
interface Editor {
|
|
18
|
-
parseAnchor: (anchor: Anchor, isRtl?: boolean) => ParsedAnchor;
|
|
19
|
-
isRoot: (value: any) => value is Node;
|
|
20
|
-
isElement: (value: any) => value is Element2D;
|
|
21
|
-
isFrame: (value: any) => value is Element2D;
|
|
22
|
-
isVisible: (node: Node) => boolean;
|
|
23
|
-
setVisible: (node: Node, visible: boolean) => void;
|
|
24
|
-
isLock: (node: Node) => boolean;
|
|
25
|
-
setLock: (node: Node, lock: boolean) => void;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
declare const _default: import("..").Mixin;
|
|
30
|
-
export default _default;
|
|
File without changes
|