@yoopta/editor 4.0.0-rc.9 → 4.1.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/dist/UI/BlockOptions/BlockOptions.d.ts.map +1 -1
- package/dist/UI/BlockOptions/utils.d.ts +32 -0
- package/dist/UI/BlockOptions/utils.d.ts.map +1 -0
- package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts +2 -1
- package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts.map +1 -1
- package/dist/UI/index.d.ts +3 -2
- package/dist/UI/index.d.ts.map +1 -1
- package/dist/YooptaEditor.d.ts +8 -5
- package/dist/YooptaEditor.d.ts.map +1 -1
- package/dist/components/Block/Block.d.ts.map +1 -1
- package/dist/components/Block/BlockActions.d.ts +1 -1
- package/dist/components/Block/BlockActions.d.ts.map +1 -1
- package/dist/components/Block/hooks.d.ts +865 -0
- package/dist/components/Block/hooks.d.ts.map +1 -0
- package/dist/components/Editor/Editor.d.ts +4 -2
- package/dist/components/Editor/Editor.d.ts.map +1 -1
- package/dist/components/Editor/RenderBlocks.d.ts +2 -1
- package/dist/components/Editor/RenderBlocks.d.ts.map +1 -1
- package/dist/components/Editor/utils.d.ts.map +1 -1
- package/dist/components/SelectionBox/SelectionBox.d.ts +1 -1
- package/dist/components/SelectionBox/SelectionBox.d.ts.map +1 -1
- package/dist/components/SelectionBox/hooks.d.ts.map +1 -1
- package/dist/contexts/YooptaContext/ToolsContext.d.ts.map +1 -0
- package/dist/contexts/{UltraYooptaContext/UltraYooptaContext.d.ts → YooptaContext/YooptaContext.d.ts} +7 -8
- package/dist/contexts/YooptaContext/YooptaContext.d.ts.map +1 -0
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/selection/setBlockSelected.d.ts +1 -1
- package/dist/editor/selection/setBlockSelected.d.ts.map +1 -1
- package/dist/editor/textFormats/toggle.d.ts.map +1 -1
- package/dist/editor/textFormats/update.d.ts.map +1 -1
- package/dist/editor/transforms/createBlock.d.ts.map +1 -1
- package/dist/editor/transforms/decreaseBlockDepth.d.ts.map +1 -1
- package/dist/editor/transforms/deleteBlock.d.ts.map +1 -1
- package/dist/editor/transforms/duplicateBlock.d.ts.map +1 -1
- package/dist/editor/transforms/focusBlock.d.ts.map +1 -1
- package/dist/editor/transforms/getBlock.d.ts +2 -0
- package/dist/editor/transforms/getBlock.d.ts.map +1 -0
- package/dist/editor/transforms/increaseBlockDepth.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/splitBlock.d.ts.map +1 -1
- package/dist/editor/transforms/toggleBlock.d.ts +4 -2
- package/dist/editor/transforms/toggleBlock.d.ts.map +1 -1
- package/dist/editor/transforms/updateBlock.d.ts.map +1 -1
- package/dist/editor/transforms/updateBlockElement.d.ts.map +1 -1
- package/dist/editor/types.d.ts +15 -13
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/handlers/onKeyDown.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -7
- package/dist/marks/FakeSelectionMark.d.ts +5 -0
- package/dist/marks/FakeSelectionMark.d.ts.map +1 -0
- 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 +12 -4
- package/dist/plugins/createYooptaPlugin.d.ts.map +1 -1
- package/dist/plugins/extenstions/withInlines.d.ts.map +1 -1
- package/dist/plugins/types.d.ts +24 -14
- 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/generateId.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 +8 -10
- package/dist/contexts/UltraYooptaContext/ToolsContext.d.ts.map +0 -1
- package/dist/contexts/UltraYooptaContext/UltraYooptaContext.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- /package/dist/contexts/{UltraYooptaContext → YooptaContext}/ToolsContext.d.ts +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { YooptaMarkProps } from '../plugins/types';
|
|
2
|
+
type FakeSelectionMarkProps = YooptaMarkProps<'italic', boolean>;
|
|
3
|
+
declare const FakeSelectionMark: import(".").YooptaMark<FakeSelectionMarkProps>;
|
|
4
|
+
export { FakeSelectionMark };
|
|
5
|
+
//# sourceMappingURL=FakeSelectionMark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FakeSelectionMark.d.ts","sourceRoot":"","sources":["../../src/marks/FakeSelectionMark.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,KAAK,sBAAsB,GAAG,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAEjE,QAAA,MAAM,iBAAiB,gDAKrB,CAAC;AAEH,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -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, html: 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,IAAI,EAAE,WAAW,iDAOnE"}
|
|
@@ -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":"
|
|
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,2LAsOzB,CAAC;AAwEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Descendant } from 'slate';
|
|
2
|
-
import {
|
|
3
|
+
import { PluginElementRenderProps, Plugin, PluginOptions } from './types';
|
|
4
|
+
export type ExtendPluginRender<TKeys extends string> = {
|
|
5
|
+
[x in TKeys]: (props: PluginElementRenderProps) => JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export type ExtendPlugin<TKeys extends string, TOptions> = {
|
|
8
|
+
renders?: ExtendPluginRender<TKeys>;
|
|
9
|
+
options?: Partial<PluginOptions<TOptions>>;
|
|
10
|
+
};
|
|
3
11
|
export declare class YooptaPlugin<TKeys extends string = string, TProps = Descendant, TOptions = Record<string, unknown>> {
|
|
4
12
|
private readonly plugin;
|
|
5
|
-
constructor(plugin:
|
|
6
|
-
get getPlugin():
|
|
7
|
-
extend(
|
|
13
|
+
constructor(plugin: Plugin<TKeys, TProps, TOptions>);
|
|
14
|
+
get getPlugin(): Plugin<TKeys, TProps, TOptions>;
|
|
15
|
+
extend(extendPlugin: ExtendPlugin<TKeys, TOptions>): YooptaPlugin<TKeys, TProps, TOptions>;
|
|
8
16
|
}
|
|
9
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,aAAa,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,EAAE,aAAa,EAAE,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,IAAI;IACzD,OAAO,CAAC,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC5C,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;CAqB3F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withInlines.d.ts","sourceRoot":"","sources":["../../../src/plugins/extenstions/withInlines.ts"],"names":[],"mappings":"AAmDA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"withInlines.d.ts","sourceRoot":"","sources":["../../../src/plugins/extenstions/withInlines.ts"],"names":[],"mappings":"AAmDA,eAAO,MAAM,WAAW,sBAwBvB,CAAC"}
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
1
|
+
import { HTMLAttributes, 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> = {
|
|
@@ -18,20 +18,24 @@ export type PluginOptions<T> = {
|
|
|
18
18
|
};
|
|
19
19
|
shortcuts?: string[];
|
|
20
20
|
align?: 'left' | 'center' | 'right';
|
|
21
|
+
HTMLAttributes?: HTMLAttributes<HTMLElement>;
|
|
21
22
|
} & T;
|
|
22
23
|
export type PluginElementOptions = {
|
|
23
24
|
draggable?: boolean;
|
|
24
25
|
};
|
|
25
|
-
export type PluginElementRenderProps
|
|
26
|
+
export type PluginElementRenderProps = RenderSlateElementProps & {
|
|
27
|
+
blockId: string;
|
|
28
|
+
HTMLAttributes?: HTMLAttributes<HTMLElement>;
|
|
29
|
+
};
|
|
30
|
+
export type PluginCustomEditorRenderProps = {
|
|
26
31
|
blockId: string;
|
|
27
|
-
options?: TPluginOptions;
|
|
28
32
|
};
|
|
29
33
|
export type PluginDefaultProps = {
|
|
30
34
|
nodeType?: 'block' | 'inline' | 'void' | 'inlineVoid';
|
|
31
35
|
};
|
|
32
36
|
export type PluginElementProps<T> = PluginDefaultProps & T;
|
|
33
|
-
export type PluginElement<T
|
|
34
|
-
render: (props: PluginElementRenderProps
|
|
37
|
+
export type PluginElement<T> = {
|
|
38
|
+
render: (props: PluginElementRenderProps) => JSX.Element;
|
|
35
39
|
props?: PluginElementProps<T>;
|
|
36
40
|
options?: PluginElementOptions;
|
|
37
41
|
asRoot?: boolean;
|
|
@@ -48,18 +52,24 @@ export type PluginEventHandlerOptions = {
|
|
|
48
52
|
defaultBlock: YooptaBlockData;
|
|
49
53
|
currentBlock: YooptaBlockData;
|
|
50
54
|
};
|
|
51
|
-
export type
|
|
55
|
+
export type Plugin<TKeys extends string = string, TProps = Descendant, TOptions = Record<string, unknown>> = {
|
|
52
56
|
type: string;
|
|
53
|
-
customEditor?: (props:
|
|
57
|
+
customEditor?: (props: PluginCustomEditorRenderProps) => JSX.Element;
|
|
54
58
|
elements: PluginElementsMap<TKeys, TProps>;
|
|
55
59
|
events?: EventHandlers;
|
|
56
60
|
options?: PluginOptions<TOptions>;
|
|
61
|
+
parsers?: Partial<Record<PluginParserTypes, PluginParsers>>;
|
|
57
62
|
};
|
|
58
|
-
export type
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
export type PluginParsers = {
|
|
64
|
+
deserialize?: PluginDeserializeParser;
|
|
65
|
+
serialize?: PluginserializeParser;
|
|
66
|
+
};
|
|
67
|
+
export type PluginParserTypes = 'html' | 'markdown';
|
|
68
|
+
export type PluginParserValues = 'deserialize' | 'serialize';
|
|
69
|
+
export type PluginserializeParser = (block: any) => string;
|
|
70
|
+
export type PluginDeserializeParser = {
|
|
71
|
+
nodeNames: string[];
|
|
72
|
+
parse?: (el: HTMLElement) => SlateElement<string, any> | YooptaBlockData[] | void;
|
|
63
73
|
};
|
|
64
74
|
export type LeafFormats<K extends string, V> = {
|
|
65
75
|
[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,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,MAAM,EAAE,MAAM,EAAE,QAAQ,IAAI;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ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AC;CACnC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,UAAU,CAAC;AACpD,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,WAAW,CAAC;AAE7D,MAAM,MAAM,qBAAqB,GAAG,CAAC,KAAK,KAAA,KAAK,MAAM,CAAC;AAEtD,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,eAAe,EAAE,GAAG,IAAI,CAAC;CACnF,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAAI;KAC5C,GAAG,IAAI,CAAC,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5F,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":"
|
|
1
|
+
{"version":3,"file":"editorBuilders.d.ts","sourceRoot":"","sources":["../../src/utils/editorBuilders.ts"],"names":[],"mappings":"AAEA,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,CAG1D;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":"generateId.d.ts","sourceRoot":"","sources":["../../src/utils/generateId.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateId.d.ts","sourceRoot":"","sources":["../../src/utils/generateId.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU,cAKtB,CAAC"}
|
|
@@ -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,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/editor",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
|
-
"type": "module",
|
|
7
6
|
"main": "dist/index.js",
|
|
7
|
+
"type": "module",
|
|
8
8
|
"module": "dist/index.js",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"files": [
|
|
@@ -15,20 +15,18 @@
|
|
|
15
15
|
"@dnd-kit/sortable": "^8.0.0",
|
|
16
16
|
"@floating-ui/react": "^0.26.9",
|
|
17
17
|
"@radix-ui/react-icons": "^1.3.0",
|
|
18
|
-
"copy-to-clipboard": "^3.3.
|
|
18
|
+
"copy-to-clipboard": "^3.3.3",
|
|
19
19
|
"eventemitter3": "^5.0.1",
|
|
20
20
|
"immer": "^10.0.3",
|
|
21
21
|
"is-hotkey": "^0.2.0",
|
|
22
22
|
"lodash.clonedeep": "^4.5.0",
|
|
23
|
-
"
|
|
24
|
-
"react-error-boundary": "^4.0.13",
|
|
25
|
-
"slate": "^0.102.0",
|
|
26
|
-
"slate-history": "^0.100.0",
|
|
27
|
-
"slate-react": "^0.102.0"
|
|
23
|
+
"slate-history": "^0.100.0"
|
|
28
24
|
},
|
|
29
25
|
"peerDependencies": {
|
|
30
26
|
"react": ">=17.0.2",
|
|
31
|
-
"react-dom": ">=17.0.2"
|
|
27
|
+
"react-dom": ">=17.0.2",
|
|
28
|
+
"slate": "^0.102.0",
|
|
29
|
+
"slate-react": "^0.102.0"
|
|
32
30
|
},
|
|
33
31
|
"scripts": {
|
|
34
32
|
"start": "rollup --config rollup.config.js --watch --bundleConfigAsCjs --environment NODE_ENV:development",
|
|
@@ -69,5 +67,5 @@
|
|
|
69
67
|
"url": "https://github.com/Darginec05/Yoopta-Editor/issues"
|
|
70
68
|
},
|
|
71
69
|
"homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
|
|
72
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "fb3d4ab03c9b43feb2258d8cb1dcd5959bf726ca"
|
|
73
71
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolsContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/UltraYooptaContext/ToolsContext.tsx"],"names":[],"mappings":";AAEA,MAAM,MAAM,SAAS,CAAC,WAAW,GAAG,GAAG,EAAE,SAAS,GAAG,G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