@yoopta/editor 4.0.0-rc.16 → 4.0.0-rc.18
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/Editor/Editor.d.ts.map +1 -1
- package/dist/components/Editor/utils.d.ts.map +1 -1
- package/dist/contexts/YooptaContext/YooptaContext.d.ts +1 -1
- package/dist/contexts/YooptaContext/YooptaContext.d.ts.map +1 -1
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/selection/setBlockSelected.d.ts +2 -2
- package/dist/editor/selection/setBlockSelected.d.ts.map +1 -1
- package/dist/editor/transforms/deleteBlock.d.ts +1 -1
- package/dist/editor/transforms/deleteBlock.d.ts.map +1 -1
- package/dist/editor/transforms/insertBlock.d.ts +1 -1
- package/dist/editor/transforms/insertBlock.d.ts.map +1 -1
- package/dist/editor/transforms/insertBlocks.d.ts +3 -0
- package/dist/editor/transforms/insertBlocks.d.ts.map +1 -0
- package/dist/editor/transforms/moveBlock.d.ts.map +1 -1
- package/dist/editor/transforms/toggleBlock.d.ts.map +1 -1
- package/dist/editor/types.d.ts +5 -4
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/parsers/deserializeHTML.d.ts +10 -0
- package/dist/parsers/deserializeHTML.d.ts.map +1 -0
- package/dist/parsers/deserializeMarkdown.d.ts +2 -0
- package/dist/parsers/deserializeMarkdown.d.ts.map +1 -0
- package/dist/parsers/index.d.ts +10 -0
- package/dist/parsers/index.d.ts.map +1 -0
- package/dist/parsers/serializeHTML.d.ts +2 -0
- package/dist/parsers/serializeHTML.d.ts.map +1 -0
- package/dist/parsers/serializeMarkdown.d.ts +2 -0
- package/dist/parsers/serializeMarkdown.d.ts.map +1 -0
- package/dist/plugins/SlateEditorComponent.d.ts +3 -3
- package/dist/plugins/SlateEditorComponent.d.ts.map +1 -1
- package/dist/plugins/createYooptaPlugin.d.ts +3 -3
- package/dist/plugins/createYooptaPlugin.d.ts.map +1 -1
- package/dist/plugins/types.d.ts +15 -10
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/utils/editorBuilders.d.ts +3 -3
- package/dist/utils/editorBuilders.d.ts.map +1 -1
- package/dist/utils/getMaxOffsetInElement.d.ts.map +1 -1
- package/dist/utils/validators.d.ts +2 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { YooEditor, YooptaBlockData } from '../editor/types';
|
|
2
|
+
import { PluginDeserializeParser } from '../plugins/types';
|
|
3
|
+
type PluginsMapByNodeNames = Record<string, {
|
|
4
|
+
type: string;
|
|
5
|
+
parse: PluginDeserializeParser['parse'];
|
|
6
|
+
}>;
|
|
7
|
+
export declare function deserialize(editor: YooEditor, pluginsMap: PluginsMapByNodeNames, el: HTMLElement | ChildNode): any;
|
|
8
|
+
export declare function deserializeHTML(editor: YooEditor, el: HTMLElement): YooptaBlockData<import("slate").Descendant>[];
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=deserializeHTML.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deserializeHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeHTML.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAe3D,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,uBAAuB,CAAC,OAAO,CAAC,CAAA;CAAE,CAAC,CAAC;AAiCvG,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,qBAAqB,EAAE,EAAE,EAAE,WAAW,GAAG,SAAS,OAqE5G;AA6BD,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,WAAW,iDAMjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deserializeMarkdown.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeMarkdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { deserializeHTML } from './deserializeHTML';
|
|
2
|
+
import { serializeHTML } from './serializeHTML';
|
|
3
|
+
export declare const parsers: {
|
|
4
|
+
html: {
|
|
5
|
+
deserialize: typeof deserializeHTML;
|
|
6
|
+
serialize: typeof serializeHTML;
|
|
7
|
+
};
|
|
8
|
+
markdown: {};
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parsers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,OAAO;;;;;;CAMnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializeHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/serializeHTML.ts"],"names":[],"mappings":"AACA,wBAAgB,aAAa,SAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializeMarkdown.d.ts","sourceRoot":"","sources":["../../src/parsers/serializeMarkdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { YooptaMark } from '../marks';
|
|
2
|
-
import {
|
|
3
|
-
type Props<TKeys extends string, TProps, TOptions> =
|
|
2
|
+
import { Plugin } from './types';
|
|
3
|
+
type Props<TKeys extends string, TProps, TOptions> = Plugin<TKeys, TProps, TOptions> & {
|
|
4
4
|
id: string;
|
|
5
5
|
marks?: YooptaMark<any>[];
|
|
6
|
-
options:
|
|
6
|
+
options: Plugin<TKeys, TProps, TOptions>['options'];
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
};
|
|
9
9
|
declare const SlateEditorComponent: <TKeys extends string, TProps, TOptions>({ id, customEditor, elements, marks, events, options, placeholder, }: Props<TKeys, TProps, TOptions>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlateEditorComponent.d.ts","sourceRoot":"","sources":["../../src/plugins/SlateEditorComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAA+E,
|
|
1
|
+
{"version":3,"file":"SlateEditorComponent.d.ts","sourceRoot":"","sources":["../../src/plugins/SlateEditorComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAA+E,MAAM,EAAE,MAAM,SAAS,CAAC;AAa9G,KAAK,KAAK,CAAC,KAAK,SAAS,MAAM,EAAE,MAAM,EAAE,QAAQ,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG;IACrF,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAgBF,QAAA,MAAM,oBAAoB,2LAoNzB,CAAC;AA0EF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Descendant } from 'slate';
|
|
3
|
-
import { PluginElementRenderProps,
|
|
3
|
+
import { PluginElementRenderProps, Plugin } from './types';
|
|
4
4
|
export type ExtendPluginRender<TKeys extends string> = {
|
|
5
5
|
[x in TKeys]: (props: PluginElementRenderProps) => JSX.Element;
|
|
6
6
|
};
|
|
@@ -10,8 +10,8 @@ export type ExtendPlugin<TKeys extends string, TOptions = Record<string, unknown
|
|
|
10
10
|
};
|
|
11
11
|
export declare class YooptaPlugin<TKeys extends string = string, TProps = Descendant, TOptions = Record<string, unknown>> {
|
|
12
12
|
private readonly plugin;
|
|
13
|
-
constructor(plugin:
|
|
14
|
-
get getPlugin():
|
|
13
|
+
constructor(plugin: Plugin<TKeys, TProps, TOptions>);
|
|
14
|
+
get getPlugin(): Plugin<TKeys, TProps, TOptions>;
|
|
15
15
|
extend(extendPlugin: ExtendPlugin<TKeys, TOptions>): YooptaPlugin<TKeys, TProps, TOptions>;
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=createYooptaPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createYooptaPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/createYooptaPlugin.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"createYooptaPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/createYooptaPlugin.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAiB,MAAM,SAAS,CAAC;AAE1E,MAAM,MAAM,kBAAkB,CAAC,KAAK,SAAS,MAAM,IAAI;KACpD,CAAC,IAAI,KAAK,GAAG,CAAC,KAAK,EAAE,wBAAwB,KAAK,GAAG,CAAC,OAAO;CAC/D,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,KAAK,SAAS,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;IACnF,OAAO,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,qBAAa,YAAY,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9G,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkC;gBAE7C,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC;IAInD,IAAI,SAAS,oCAEZ;IAED,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC;CAuB3F"}
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { Descendant, Editor } from 'slate';
|
|
3
3
|
import { RenderElementProps as RenderSlateElementProps, RenderLeafProps } from 'slate-react';
|
|
4
|
-
import { YooEditor, YooptaBlockData } from '../editor/types';
|
|
4
|
+
import { SlateElement, YooEditor, YooptaBlockData } from '../editor/types';
|
|
5
5
|
import { YooptaMark } from '../marks';
|
|
6
6
|
import { EditorEventHandlers } from '../types/eventHandlers';
|
|
7
7
|
import { HOTKEYS_TYPE } from '../utils/hotkeys';
|
|
8
8
|
export type RenderPluginProps<TKeys extends string, TProps, TOptions> = {
|
|
9
9
|
id: string;
|
|
10
|
-
elements:
|
|
10
|
+
elements: Plugin<TKeys, TProps, TOptions>['elements'];
|
|
11
11
|
marks?: YooptaMark<unknown>[];
|
|
12
12
|
};
|
|
13
13
|
export type PluginOptions<T> = {
|
|
@@ -32,7 +32,7 @@ export type PluginDefaultProps = {
|
|
|
32
32
|
nodeType?: 'block' | 'inline' | 'void' | 'inlineVoid';
|
|
33
33
|
};
|
|
34
34
|
export type PluginElementProps<T> = PluginDefaultProps & T;
|
|
35
|
-
export type PluginElement<T
|
|
35
|
+
export type PluginElement<T> = {
|
|
36
36
|
render: (props: PluginElementRenderProps) => JSX.Element;
|
|
37
37
|
props?: PluginElementProps<T>;
|
|
38
38
|
options?: PluginElementOptions;
|
|
@@ -50,19 +50,24 @@ export type PluginEventHandlerOptions = {
|
|
|
50
50
|
defaultBlock: YooptaBlockData;
|
|
51
51
|
currentBlock: YooptaBlockData;
|
|
52
52
|
};
|
|
53
|
-
export type
|
|
53
|
+
export type Plugin<TKeys extends string = string, TProps = Descendant, TOptions = Record<string, unknown>> = {
|
|
54
54
|
type: string;
|
|
55
55
|
customEditor?: (props: PluginCustomEditorRenderProps) => JSX.Element;
|
|
56
56
|
elements: PluginElementsMap<TKeys, TProps>;
|
|
57
57
|
events?: EventHandlers;
|
|
58
58
|
options?: PluginOptions<TOptions>;
|
|
59
|
+
parsers?: Partial<Record<PluginParserTypes, PluginParsers>>;
|
|
59
60
|
};
|
|
60
|
-
export type
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
export type PluginParsers = {
|
|
62
|
+
deserialize?: PluginDeserializeParser;
|
|
63
|
+
serialize?: PluginserializeParser;
|
|
64
|
+
};
|
|
65
|
+
export type PluginParserTypes = 'html' | 'markdown';
|
|
66
|
+
export type PluginParserValues = 'deserialize' | 'serialize';
|
|
67
|
+
export type PluginserializeParser = (block: any) => string;
|
|
68
|
+
export type PluginDeserializeParser = {
|
|
69
|
+
nodeNames: string[];
|
|
70
|
+
parse?: (el: HTMLElement) => SlateElement<string, any> | YooptaBlockData[] | void;
|
|
66
71
|
};
|
|
67
72
|
export type LeafFormats<K extends string, V> = {
|
|
68
73
|
[key in K]: V;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,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F,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAAI;IAAE,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IAAC,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAAE,CAAC;AAEvH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAAI,eAAe,GAAG;IACrE,IAAI,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC1B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
2
|
import { YooEditor } from '../editor/types';
|
|
3
|
-
import {
|
|
3
|
+
import { Plugin, PluginElement } from '../plugins/types';
|
|
4
4
|
import { YooptaMark } from '../marks';
|
|
5
5
|
export declare function buildMarks(editor: any, marks: YooptaMark<any>[]): import("../editor/types").YooptaFormats;
|
|
6
|
-
export declare function buildBlocks(editor: any, plugins:
|
|
6
|
+
export declare function buildBlocks(editor: any, plugins: Plugin<string, PluginElement<unknown>>[]): import("../editor/types").YooptaBlocks;
|
|
7
7
|
export declare function buildBlockSlateEditors(editor: YooEditor): {};
|
|
8
8
|
export declare function buildSlateEditor(editor: YooEditor): Editor;
|
|
9
9
|
export declare function buildBlockShortcuts(editor: YooEditor): {};
|
|
10
|
-
export declare function buildPlugins(plugins:
|
|
10
|
+
export declare function buildPlugins(plugins: Plugin<string, PluginElement<unknown>>[]): Record<string, Plugin<string, unknown>>;
|
|
11
11
|
//# sourceMappingURL=editorBuilders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorBuilders.d.ts","sourceRoot":"","sources":["../../src/utils/editorBuilders.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"editorBuilders.d.ts","sourceRoot":"","sources":["../../src/utils/editorBuilders.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,aAAa,EAAqB,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AActC,wBAAgB,UAAU,CAAC,MAAM,KAAA,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,2CAgB1D;AAED,wBAAgB,WAAW,CAAC,MAAM,KAAA,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,0CAoDpF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,MASvD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAI1D;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,MAepD;AAID,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,GAChD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA2BzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMaxOffsetInElement.d.ts","sourceRoot":"","sources":["../../src/utils/getMaxOffsetInElement.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,MAAM,KAAA,EAAE,WAAW,KAAA,
|
|
1
|
+
{"version":3,"file":"getMaxOffsetInElement.d.ts","sourceRoot":"","sources":["../../src/utils/getMaxOffsetInElement.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,CAAC,MAAM,KAAA,EAAE,WAAW,KAAA,UAUxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/utils/validators.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO,CAEjD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/editor",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.18",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"url": "https://github.com/Darginec05/Yoopta-Editor/issues"
|
|
69
69
|
},
|
|
70
70
|
"homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "763128347c2a617ef07f8f26317f649d9e527c22"
|
|
72
72
|
}
|