dragon-editor 3.8.7 → 4.0.0
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/README.md +10 -9
- package/dist/module.json +1 -1
- package/dist/module.mjs +9 -7
- package/dist/runtime/components/Block/Code.d.vue.ts +13 -0
- package/dist/runtime/components/Block/Code.vue +193 -0
- package/dist/runtime/components/Block/Code.vue.d.ts +13 -0
- package/dist/runtime/components/Block/Custom.d.vue.ts +9 -0
- package/dist/runtime/components/Block/Custom.vue +28 -0
- package/dist/runtime/components/Block/Custom.vue.d.ts +9 -0
- package/dist/runtime/components/Block/Divider.d.vue.ts +9 -0
- package/dist/runtime/components/Block/Divider.vue +27 -0
- package/dist/runtime/components/Block/Divider.vue.d.ts +9 -0
- package/dist/runtime/components/Block/Heading.d.vue.ts +13 -0
- package/dist/runtime/components/Block/Heading.vue +84 -0
- package/dist/runtime/components/Block/Heading.vue.d.ts +13 -0
- package/dist/runtime/components/Block/Image.d.vue.ts +13 -0
- package/dist/runtime/components/Block/Image.vue +146 -0
- package/dist/runtime/components/Block/Image.vue.d.ts +13 -0
- package/dist/runtime/components/Block/List.d.vue.ts +13 -0
- package/dist/runtime/components/Block/List.vue +170 -0
- package/dist/runtime/components/Block/List.vue.d.ts +13 -0
- package/dist/runtime/components/Block/Text.d.vue.ts +13 -0
- package/dist/runtime/components/Block/Text.vue +84 -0
- package/dist/runtime/components/Block/Text.vue.d.ts +13 -0
- package/dist/runtime/components/DragonEditor.d.vue.ts +28 -22
- package/dist/runtime/components/DragonEditor.vue +75 -1225
- package/dist/runtime/components/DragonEditor.vue.d.ts +28 -22
- package/dist/runtime/components/DragonEditorViewer.d.vue.ts +13 -5
- package/dist/runtime/components/DragonEditorViewer.vue +17 -813
- package/dist/runtime/components/DragonEditorViewer.vue.d.ts +13 -5
- package/dist/runtime/components/MenuBar.d.vue.ts +3 -0
- package/dist/runtime/components/MenuBar.vue +385 -0
- package/dist/runtime/components/MenuBar.vue.d.ts +3 -0
- package/dist/runtime/scss/editor.css +237 -283
- package/dist/runtime/scss/viewer.css +184 -210
- package/dist/runtime/store/editor.d.ts +2 -0
- package/dist/runtime/store/editor.js +59 -0
- package/dist/runtime/type.d.mts +101 -124
- package/dist/runtime/utils/data/block.d.ts +20 -0
- package/dist/runtime/utils/data/block.js +663 -0
- package/dist/runtime/utils/data/cursor.d.ts +9 -0
- package/dist/runtime/utils/data/cursor.js +137 -0
- package/dist/runtime/utils/data/index.d.ts +5 -0
- package/dist/runtime/utils/data/index.js +17 -0
- package/dist/runtime/utils/data/node.d.ts +9 -0
- package/dist/runtime/utils/data/node.js +101 -0
- package/dist/runtime/utils/event/cursor.d.ts +3 -6
- package/dist/runtime/utils/event/cursor.js +52 -105
- package/dist/runtime/utils/event/index.d.ts +2 -6
- package/dist/runtime/utils/event/index.js +48 -6
- package/dist/runtime/utils/event/keyboard.d.ts +22 -7
- package/dist/runtime/utils/event/keyboard.js +910 -1406
- package/dist/runtime/utils/layout/body.d.ts +3 -4
- package/dist/runtime/utils/layout/body.js +83 -51
- package/dist/runtime/utils/layout/icon.d.ts +1 -2
- package/dist/runtime/utils/layout/icon.js +64 -67
- package/dist/runtime/utils/layout/index.d.ts +0 -3
- package/dist/runtime/utils/layout/index.js +0 -3
- package/dist/runtime/utils/node/element.d.ts +4 -6
- package/dist/runtime/utils/node/element.js +58 -71
- package/dist/runtime/utils/node/index.d.ts +1 -1
- package/dist/runtime/utils/node/index.js +1 -1
- package/dist/runtime/utils/node/style.d.ts +5 -0
- package/dist/runtime/utils/node/style.js +702 -0
- package/package.json +31 -17
- package/dist/runtime/utils/event/block.d.ts +0 -7
- package/dist/runtime/utils/event/block.js +0 -110
- package/dist/runtime/utils/event/data.d.ts +0 -8
- package/dist/runtime/utils/event/data.js +0 -379
- package/dist/runtime/utils/event/mouse.d.ts +0 -11
- package/dist/runtime/utils/event/mouse.js +0 -85
- package/dist/runtime/utils/event/scroll.d.ts +0 -3
- package/dist/runtime/utils/event/scroll.js +0 -29
- package/dist/runtime/utils/event/touch.d.ts +0 -5
- package/dist/runtime/utils/event/touch.js +0 -10
- package/dist/runtime/utils/event/window.d.ts +0 -5
- package/dist/runtime/utils/event/window.js +0 -47
- package/dist/runtime/utils/layout/block.d.ts +0 -7
- package/dist/runtime/utils/layout/block.js +0 -123
- package/dist/runtime/utils/layout/controlbar.d.ts +0 -3
- package/dist/runtime/utils/layout/controlbar.js +0 -99
- package/dist/runtime/utils/layout/menuBar.d.ts +0 -3
- package/dist/runtime/utils/layout/menuBar.js +0 -408
- package/dist/runtime/utils/node/block.d.ts +0 -19
- package/dist/runtime/utils/node/block.js +0 -256
- package/dist/runtime/utils/style/anchor.d.ts +0 -5
- package/dist/runtime/utils/style/anchor.js +0 -245
- package/dist/runtime/utils/style/decoration.d.ts +0 -4
- package/dist/runtime/utils/style/decoration.js +0 -378
- package/dist/runtime/utils/style/index.d.ts +0 -2
- package/dist/runtime/utils/style/index.js +0 -2
|
@@ -1,33 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import "../scss/editor.scss.js";
|
|
2
|
+
import { _addBlock, _addImageBlock, _checkDataIsEmpty } from "../utils/data/index.js";
|
|
3
|
+
import { _editorMountedEvent } from "../utils/event/index.js";
|
|
4
|
+
import { _setAlign } from "../utils/node/index.js";
|
|
5
|
+
import type { DEContentData } from "../type.d.mts.js";
|
|
6
|
+
interface DragonEditorOption {
|
|
3
7
|
modelValue: DEContentData;
|
|
4
8
|
useMenuBar?: boolean;
|
|
5
|
-
|
|
6
|
-
|
|
9
|
+
mediaHostURL?: string;
|
|
10
|
+
isMobile?: boolean;
|
|
11
|
+
theme?: "dark" | "white";
|
|
12
|
+
codeBlockSpaces?: number;
|
|
13
|
+
acceptImageFormat?: string;
|
|
14
|
+
anchorTagTarget?: string;
|
|
7
15
|
}
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
addBlock: typeof addBlock;
|
|
16
|
-
setDecoration: typeof setDecoration;
|
|
17
|
-
setAlign: typeof setAlign;
|
|
18
|
-
changeEditorData: typeof changeEditorData;
|
|
19
|
-
updateLayout: typeof updateLayout;
|
|
20
|
-
checkDataEmpty: typeof checkDataEmpty;
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<DragonEditorOption, {
|
|
17
|
+
addBlock: typeof _addBlock;
|
|
18
|
+
addImageBlock: typeof _addImageBlock;
|
|
19
|
+
updateLayout: typeof _editorMountedEvent;
|
|
20
|
+
checkDataIsEmpty: typeof _checkDataIsEmpty;
|
|
21
|
+
setDecoration: (type: "bold" | "italic" | "underline" | "strikethrough" | "code") => void;
|
|
22
|
+
setAlign: typeof _setAlign;
|
|
21
23
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
24
|
"update:modelValue": (data: DEContentData) => any;
|
|
23
|
-
uploadImageEvent: (
|
|
24
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
25
|
+
uploadImageEvent: (files: File[]) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<DragonEditorOption> & Readonly<{
|
|
25
27
|
"onUpdate:modelValue"?: ((data: DEContentData) => any) | undefined;
|
|
26
|
-
onUploadImageEvent?: ((
|
|
28
|
+
onUploadImageEvent?: ((files: File[]) => any) | undefined;
|
|
27
29
|
}>, {
|
|
28
|
-
|
|
30
|
+
mediaHostURL: string;
|
|
31
|
+
isMobile: boolean;
|
|
32
|
+
codeBlockSpaces: number;
|
|
33
|
+
acceptImageFormat: string;
|
|
34
|
+
anchorTagTarget: string;
|
|
35
|
+
theme: "dark" | "white";
|
|
29
36
|
useMenuBar: boolean;
|
|
30
|
-
screenChangePoint: number;
|
|
31
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
38
|
declare const _default: typeof __VLS_export;
|
|
33
39
|
export default _default;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import "../scss/viewer.scss.js";
|
|
2
|
+
import type { DEContentData } from "../type.d.mts.js";
|
|
3
|
+
interface DragonEditorViewerOption {
|
|
2
4
|
content: DEContentData;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
mediaHostURL?: string;
|
|
6
|
+
isMobile?: boolean;
|
|
7
|
+
theme?: "dark" | "white";
|
|
8
|
+
codeBlockSpaces?: number;
|
|
9
|
+
}
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<DragonEditorViewerOption, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DragonEditorViewerOption> & Readonly<{}>, {
|
|
11
|
+
mediaHostURL: string;
|
|
12
|
+
isMobile: boolean;
|
|
13
|
+
codeBlockSpaces: number;
|
|
14
|
+
theme: "dark" | "white";
|
|
7
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
16
|
declare const _default: typeof __VLS_export;
|
|
9
17
|
export default _default;
|