@zipify/wysiwyg 4.2.2 → 4.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/.release-it.json +1 -0
- package/config/build/cli.config.js +9 -6
- package/config/build/node.config.js +50 -0
- package/dist/cli.js +61 -24
- package/dist/node.js +40 -0
- package/dist/types/Wysiwyg.vue.d.ts +2 -2
- package/dist/types/composables/useEditor.d.ts +3 -4
- package/dist/types/entryLib.d.ts +1 -1
- package/dist/types/entryNode.d.ts +2 -0
- package/dist/types/node/NodeDomParser.d.ts +5 -0
- package/dist/types/node/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -2
- package/dist/types/utils/isWysiwygContent.d.ts +0 -5
- package/dist/wysiwyg.mjs +209 -367
- package/lib/cli/commands/ToJsonCommand.js +2 -2
- package/lib/composables/__tests__/__snapshots__/useEditor.test.js.snap +0 -1
- package/lib/composables/useEditor.ts +7 -14
- package/lib/entryLib.ts +1 -1
- package/lib/entryNode.ts +2 -0
- package/lib/node/NodeDomParser.ts +16 -0
- package/lib/node/index.ts +1 -0
- package/lib/utils/index.ts +1 -2
- package/lib/utils/isWysiwygContent.ts +1 -14
- package/package.json +20 -12
- package/lib/cli/NodeDomParser.js +0 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Content } from '@tiptap/core';
|
|
1
|
+
import type { Content, JSONContent } from '@tiptap/core';
|
|
2
2
|
import type { PropType } from 'vue';
|
|
3
3
|
import { type IFontJson } from './models';
|
|
4
4
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -79,7 +79,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
79
|
};
|
|
80
80
|
}, {
|
|
81
81
|
getContentCustomization: () => any;
|
|
82
|
-
getContent: () =>
|
|
82
|
+
getContent: () => JSONContent;
|
|
83
83
|
editor: import("@tiptap/vue-3").Editor;
|
|
84
84
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
85
85
|
"update:modelValue": (modelValue: Content) => void;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { type AnyExtension, Editor } from '@tiptap/vue-3';
|
|
2
|
-
import type { Content } from '@tiptap/core';
|
|
2
|
+
import type { Content, JSONContent } from '@tiptap/core';
|
|
3
3
|
import type { Ref } from 'vue';
|
|
4
|
-
import type { WysiwygContent } from '@/utils';
|
|
5
4
|
export interface IUseEditorProps {
|
|
6
5
|
content: Ref<Content>;
|
|
7
|
-
onChange: (content:
|
|
6
|
+
onChange: (content: JSONContent) => void;
|
|
8
7
|
extensions: AnyExtension[];
|
|
9
8
|
isReadonlyRef: Ref<boolean>;
|
|
10
9
|
}
|
|
11
10
|
export interface IUseEditorReturn {
|
|
12
11
|
editor: Editor;
|
|
13
|
-
getContent():
|
|
12
|
+
getContent(): JSONContent;
|
|
14
13
|
}
|
|
15
14
|
export declare function useEditor({ content, onChange, extensions, isReadonlyRef }: IUseEditorProps): IUseEditorReturn;
|
package/dist/types/entryLib.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as Wysiwyg } from './Wysiwyg.vue';
|
|
2
2
|
export { NodeFactory, HtmlToJsonParser } from './services';
|
|
3
3
|
export { NodeTypes, TextSettings, Alignments } from './enums';
|
|
4
|
-
export { isWysiwygContent
|
|
4
|
+
export { isWysiwygContent } from './utils';
|
|
5
5
|
export * from './components/base';
|
|
6
6
|
export { InjectionTokens } from './injectionTokens';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NodeDomParser';
|
|
@@ -7,8 +7,7 @@ export { convertLineHeight } from './convertLineHeight';
|
|
|
7
7
|
export { convertFontSize } from './convertFontSize';
|
|
8
8
|
export { convertAlignment } from './convertAlignment';
|
|
9
9
|
export { importIcon } from './importIcon';
|
|
10
|
-
export { isWysiwygContent
|
|
11
|
-
export type { WysiwygContent } from './isWysiwygContent';
|
|
10
|
+
export { isWysiwygContent } from './isWysiwygContent';
|
|
12
11
|
export { resolveTextPosition } from './resolveTextPosition';
|
|
13
12
|
export { resolvePositionOffset } from './resolvePositionOffset';
|
|
14
13
|
export { isNodeFullySelected } from './isNodeFullySelected';
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import type { JSONContent } from '@tiptap/core';
|
|
2
|
-
export interface WysiwygContent extends JSONContent {
|
|
3
|
-
__wswg__: true;
|
|
4
|
-
}
|
|
5
2
|
export declare function isWysiwygContent(content: string | object): content is JSONContent;
|
|
6
|
-
export declare function unmarkWysiwygContent({ __wswg__, ...content }: WysiwygContent): JSONContent;
|
|
7
|
-
export declare function markWysiwygContent(content: JSONContent): WysiwygContent;
|