@yoopta/editor 4.7.0 → 4.7.1-rc.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 +3 -2
- package/dist/UI/BlockOptions/BlockOptions.d.ts.map +1 -1
- package/dist/UI/BlockOptions/utils.d.ts +1 -1
- package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts.map +1 -1
- package/dist/UI/index.d.ts +3 -7
- package/dist/UI/index.d.ts.map +1 -1
- package/dist/YooptaEditor.d.ts +2 -3
- package/dist/YooptaEditor.d.ts.map +1 -1
- package/dist/components/Block/Block.d.ts +8 -5
- package/dist/components/Block/Block.d.ts.map +1 -1
- package/dist/components/Block/hooks.d.ts +14 -1
- package/dist/components/Block/hooks.d.ts.map +1 -1
- package/dist/components/Editor/Editor.d.ts.map +1 -1
- package/dist/components/Editor/RenderBlocks.d.ts.map +1 -1
- package/dist/components/SelectionBox/hooks.d.ts.map +1 -1
- package/dist/contexts/YooptaContext/YooptaContext.d.ts +9 -1
- package/dist/contexts/YooptaContext/YooptaContext.d.ts.map +1 -1
- package/dist/editor/blocks/createBlock.d.ts.map +1 -1
- package/dist/editor/blocks/deleteBlock.d.ts.map +1 -1
- package/dist/editor/blocks/duplicateBlock.d.ts.map +1 -1
- package/dist/editor/blocks/getSlate.d.ts +7 -0
- package/dist/editor/blocks/getSlate.d.ts.map +1 -0
- package/dist/editor/blocks/index.d.ts +2 -0
- package/dist/editor/blocks/index.d.ts.map +1 -1
- package/dist/editor/blocks/insertBlock.d.ts +1 -1
- package/dist/editor/blocks/insertBlock.d.ts.map +1 -1
- package/dist/editor/blocks/insertBlocks.d.ts.map +1 -1
- package/dist/editor/blocks/updateBlock.d.ts.map +1 -1
- package/dist/editor/elements/getElementEntry.d.ts +2 -2
- package/dist/editor/elements/getElementEntry.d.ts.map +1 -1
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/types.d.ts +5 -3
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/handlers/onKeyDown.d.ts.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/parsers/deserializeHTML.d.ts +0 -8
- package/dist/parsers/deserializeHTML.d.ts.map +1 -1
- package/dist/parsers/deserializeTextNodes.d.ts +4 -0
- package/dist/parsers/deserializeTextNodes.d.ts.map +1 -0
- package/dist/parsers/serializeTextNodes.d.ts +2 -0
- package/dist/parsers/serializeTextNodes.d.ts.map +1 -0
- package/dist/plugins/SlateEditorComponent.d.ts +6 -4
- package/dist/plugins/SlateEditorComponent.d.ts.map +1 -1
- package/dist/plugins/createYooptaPlugin.d.ts +16 -9
- package/dist/plugins/createYooptaPlugin.d.ts.map +1 -1
- package/dist/plugins/hooks.d.ts +6 -0
- package/dist/plugins/hooks.d.ts.map +1 -0
- package/dist/plugins/types.d.ts +22 -13
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/utils/blockElements.d.ts +1 -1
- package/dist/utils/blockElements.d.ts.map +1 -1
- package/dist/utils/editorBuilders.d.ts +5 -4
- package/dist/utils/editorBuilders.d.ts.map +1 -1
- package/dist/utils/hotkeys.d.ts +6 -0
- package/dist/utils/hotkeys.d.ts.map +1 -1
- package/dist/utils/weakMaps.d.ts +1 -1
- package/dist/utils/weakMaps.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/components/NoSsr/NoSsr.d.ts +0 -8
- package/dist/components/NoSsr/NoSsr.d.ts.map +0 -1
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
import { YooEditor, YooptaBlockData } from '../editor/types';
|
|
2
|
-
import { PluginDeserializeParser } from '../plugins/types';
|
|
3
|
-
type PluginsMapByNode = {
|
|
4
|
-
type: string;
|
|
5
|
-
parse: PluginDeserializeParser['parse'];
|
|
6
|
-
};
|
|
7
|
-
type PluginsMapByNodeNames = Record<string, PluginsMapByNode | PluginsMapByNode[]>;
|
|
8
|
-
export declare function deserialize(editor: YooEditor, pluginsMap: PluginsMapByNodeNames, el: HTMLElement | ChildNode): any;
|
|
9
2
|
export declare function deserializeHTML(editor: YooEditor, html: HTMLElement): YooptaBlockData<import("slate").Descendant>[];
|
|
10
|
-
export {};
|
|
11
3
|
//# sourceMappingURL=deserializeHTML.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializeHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeHTML.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,SAAS,EAAuB,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"deserializeHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeHTML.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,SAAS,EAAuB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AA8LhG,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,iDAUnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deserializeTextNodes.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeTextNodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,UAAU,EAAE,CA0ElG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializeTextNodes.d.ts","sourceRoot":"","sources":["../../src/parsers/serializeTextNodes.ts"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,CAmCvD"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { YooptaMark } from '../marks';
|
|
2
|
-
import { Plugin } from './types';
|
|
3
|
-
|
|
2
|
+
import { Plugin, PluginEvents } from './types';
|
|
3
|
+
import { SlateElement } from '../editor/types';
|
|
4
|
+
type Props<TElementMap extends Record<string, SlateElement>, TOptions> = Plugin<TElementMap, TOptions> & {
|
|
4
5
|
id: string;
|
|
5
6
|
marks?: YooptaMark<any>[];
|
|
6
|
-
options: Plugin<
|
|
7
|
+
options: Plugin<TElementMap, TOptions>['options'];
|
|
7
8
|
placeholder?: string;
|
|
9
|
+
events?: PluginEvents;
|
|
8
10
|
};
|
|
9
|
-
declare const SlateEditorComponent: <
|
|
11
|
+
declare const SlateEditorComponent: <TElementMap extends Record<string, SlateElement<string, any>>, TOptions>({ id, customEditor, elements, marks, events, options, extensions: withExtensions, placeholder, }: Props<TElementMap, TOptions>) => import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export { SlateEditorComponent };
|
|
11
13
|
//# sourceMappingURL=SlateEditorComponent.d.ts.map
|
|
@@ -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,
|
|
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,EAAoD,MAAM,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQjG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,KAAK,KAAK,CAAC,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG;IACvG,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC;AAgBF,QAAA,MAAM,oBAAoB,sPAkMzB,CAAC;AAuEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import { PluginElementRenderProps, Plugin, PluginOptions } from './types';
|
|
2
|
+
import { SlateElement } from '../editor/types';
|
|
3
|
+
import { PluginElementRenderProps, Plugin, PluginOptions, PluginEvents } from './types';
|
|
4
4
|
export type ExtendPluginRender<TKeys extends string> = {
|
|
5
5
|
[x in TKeys]: (props: PluginElementRenderProps) => JSX.Element;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type ExtractProps<T> = T extends SlateElement<string, infer P> ? P : never;
|
|
8
|
+
export type ExtendPlugin<TElementMap extends Record<string, SlateElement>, TOptions> = {
|
|
9
|
+
renders?: {
|
|
10
|
+
[K in keyof TElementMap]?: (props: PluginElementRenderProps) => JSX.Element;
|
|
11
|
+
};
|
|
9
12
|
options?: Partial<PluginOptions<TOptions>>;
|
|
10
|
-
elementProps?:
|
|
13
|
+
elementProps?: {
|
|
14
|
+
[K in keyof TElementMap]?: (props: ExtractProps<TElementMap[K]>) => ExtractProps<TElementMap[K]>;
|
|
15
|
+
};
|
|
16
|
+
events?: Partial<PluginEvents>;
|
|
11
17
|
};
|
|
12
|
-
export declare class YooptaPlugin<
|
|
18
|
+
export declare class YooptaPlugin<TElementMap extends Record<string, SlateElement>, TOptions = Record<string, unknown>> {
|
|
13
19
|
private readonly plugin;
|
|
14
|
-
constructor(plugin: Plugin<
|
|
15
|
-
get getPlugin(): Plugin<
|
|
16
|
-
extend(extendPlugin: ExtendPlugin<
|
|
20
|
+
constructor(plugin: Plugin<TElementMap, TOptions>);
|
|
21
|
+
get getPlugin(): Plugin<TElementMap, TOptions>;
|
|
22
|
+
extend(extendPlugin: ExtendPlugin<TElementMap, TOptions>): YooptaPlugin<TElementMap, TOptions>;
|
|
17
23
|
}
|
|
24
|
+
export {};
|
|
18
25
|
//# 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,
|
|
1
|
+
{"version":3,"file":"createYooptaPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/createYooptaPlugin.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAExF,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,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAE3E,MAAM,MAAM,YAAY,CAAC,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,IAAI;IACrF,OAAO,CAAC,EAAE;SACP,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,GAAG,CAAC,OAAO;KAC5E,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE;SACZ,CAAC,IAAI,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;KACjG,CAAC;IACF,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAChC,CAAC;AAEF,qBAAa,YAAY,CAAC,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC5G,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgC;gBAC3C,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC;IAIjD,IAAI,SAAS,IAAI,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAE7C;IAOD,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC;CAqD/F"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SlateEditor, YooEditor, YooptaBlockData } from '../editor/types';
|
|
2
|
+
import { EditorEventHandlers } from '../types/eventHandlers';
|
|
3
|
+
import { PluginEvents } from './types';
|
|
4
|
+
export declare const useSlateEditor: (id: string, editor: YooEditor, block: YooptaBlockData, elements: any, withExtensions: any) => SlateEditor;
|
|
5
|
+
export declare const useEventHandlers: (events: PluginEvents | undefined, editor: YooEditor, block: YooptaBlockData, slate: SlateEditor) => EditorEventHandlers;
|
|
6
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/plugins/hooks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAgB,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,OAAO,EAAqC,YAAY,EAAE,MAAM,SAAS,CAAC;AAE1E,eAAO,MAAM,cAAc,OACrB,MAAM,UACF,SAAS,SACV,eAAe,YACZ,GAAG,kBACG,GAAG,gBAwEpB,CAAC;AAEF,eAAO,MAAM,gBAAgB,WACnB,YAAY,GAAG,SAAS,UACxB,SAAS,SACV,eAAe,SACf,WAAW,wBAwBnB,CAAC"}
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { Descendant } from 'slate';
|
|
3
2
|
import { RenderElementProps as RenderSlateElementProps, RenderLeafProps } from 'slate-react';
|
|
4
3
|
import { SlateEditor, SlateElement, YooEditor, YooptaBlockBaseMeta, YooptaBlockData } from '../editor/types';
|
|
5
|
-
import { YooptaMark } from '../marks';
|
|
6
4
|
import { EditorEventHandlers } from '../types/eventHandlers';
|
|
7
5
|
import { HOTKEYS_TYPE } from '../utils/hotkeys';
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
export declare enum NodeType {
|
|
7
|
+
Block = "block",
|
|
8
|
+
Inline = "inline",
|
|
9
|
+
Void = "void",
|
|
10
|
+
InlineVoid = "inlineVoid"
|
|
11
|
+
}
|
|
12
|
+
export type PluginOptions<T> = Partial<{
|
|
14
13
|
display?: {
|
|
15
14
|
title?: string;
|
|
16
15
|
description?: string;
|
|
@@ -18,7 +17,7 @@ export type PluginOptions<T> = {
|
|
|
18
17
|
};
|
|
19
18
|
shortcuts?: string[];
|
|
20
19
|
HTMLAttributes?: HTMLAttributes<HTMLElement>;
|
|
21
|
-
} & T
|
|
20
|
+
} & T>;
|
|
22
21
|
export type PluginElementOptions = {
|
|
23
22
|
draggable?: boolean;
|
|
24
23
|
};
|
|
@@ -55,12 +54,22 @@ export type PluginEventHandlerOptions = {
|
|
|
55
54
|
defaultBlock: YooptaBlockData;
|
|
56
55
|
currentBlock: YooptaBlockData;
|
|
57
56
|
};
|
|
58
|
-
export type
|
|
57
|
+
export type ElementPropsMap = Record<string, Record<string, unknown>>;
|
|
58
|
+
export type PluginEvents = {
|
|
59
|
+
onBeforeCreate?: (editor: YooEditor, blockId: string) => SlateElement;
|
|
60
|
+
onCreate?: (editor: YooEditor, blockId: string) => void;
|
|
61
|
+
onDestroy?: (editor: YooEditor, blockId: string) => void;
|
|
62
|
+
} & EventHandlers;
|
|
63
|
+
export type Plugin<TElementMap extends Record<string, SlateElement>, TPluginOptions = Record<string, unknown>> = {
|
|
59
64
|
type: string;
|
|
60
65
|
customEditor?: (props: PluginCustomEditorRenderProps) => JSX.Element;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
66
|
+
extensions?: (slate: SlateEditor, editor: YooEditor, blockId: string) => SlateEditor;
|
|
67
|
+
commands?: Record<string, (editor: YooEditor, ...args: any[]) => any>;
|
|
68
|
+
elements: {
|
|
69
|
+
[K in keyof TElementMap]: PluginElement<TElementMap[K]['props']>;
|
|
70
|
+
};
|
|
71
|
+
events?: PluginEvents;
|
|
72
|
+
options?: PluginOptions<TPluginOptions>;
|
|
64
73
|
parsers?: Partial<Record<PluginParserTypes, PluginParsers>>;
|
|
65
74
|
};
|
|
66
75
|
export type PluginParsers = {
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,kBAAk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AAO,EAAE,YAAY,EACrB,IAAI,EAAE,MAAM,EACZ,aAAa,CAAC,EAAE,mBAAmB,KAChC,MAAM,CAAC;AAEZ,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,KAAK,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,eAAe,EAAE,GAAG,IAAI,CAAC;CACtG,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"}
|
|
@@ -14,6 +14,6 @@ type ElementsMapWithTextContent = {
|
|
|
14
14
|
[key: string]: string;
|
|
15
15
|
};
|
|
16
16
|
export declare function buildBlockElementsStructure(editor: YooEditor, blockType: string, elementsMapWithTextContent?: ElementsMapWithTextContent): SlateElement;
|
|
17
|
-
export declare function getPluginByInlineElement(plugins: YooEditor['plugins'], elementType: string): Plugin<string, unknown> | undefined;
|
|
17
|
+
export declare function getPluginByInlineElement(plugins: YooEditor['plugins'], elementType: string): Plugin<Record<string, SlateElement>, unknown> | undefined;
|
|
18
18
|
export {};
|
|
19
19
|
//# sourceMappingURL=blockElements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockElements.d.ts","sourceRoot":"","sources":["../../src/utils/blockElements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,SAAS,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"blockElements.d.ts","sourceRoot":"","sources":["../../src/utils/blockElements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,SAAS,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAgC,MAAM,iBAAiB,CAAC;AACrG,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGhG,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAOjH;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACpD,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,CAOpC;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,OAAO,CAGhG;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,EAAE,CAAC,EAAE,IAAI,CAAC;IACV,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,WAAW,EAClB,OAAO,GAAE,0BAA+B,GACvC,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAuBrC;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,kBAAkB,CAAC,OAAO,CAAyB,GACzD,YAAY,CAAC,GAAG,CAAC,CAEnB;AA6BD,KAAK,0BAA0B,GAAG;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,0BAA0B,CAAC,EAAE,0BAA0B,GACtD,YAAY,CAsBd;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,EAC7B,WAAW,EAAE,MAAM,GAClB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,GAAG,SAAS,CAK3D"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { YooEditor } from '../editor/types';
|
|
2
|
-
import { Plugin
|
|
1
|
+
import { SlateElement, YooEditor } from '../editor/types';
|
|
2
|
+
import { Plugin } from '../plugins/types';
|
|
3
3
|
import { YooptaMark } from '../marks';
|
|
4
4
|
export declare function buildMarks(editor: any, marks: YooptaMark<any>[]): import("../editor/types").YooptaFormats;
|
|
5
|
-
export declare function buildBlocks(editor: any, plugins: Plugin<string,
|
|
5
|
+
export declare function buildBlocks(editor: any, plugins: Plugin<Record<string, SlateElement>>[]): import("../editor/types").YooptaBlocks;
|
|
6
6
|
export declare function buildBlockSlateEditors(editor: YooEditor): {};
|
|
7
7
|
export declare function buildBlockShortcuts(editor: YooEditor): {};
|
|
8
|
-
export declare function buildPlugins(plugins: Plugin<string,
|
|
8
|
+
export declare function buildPlugins(plugins: Plugin<Record<string, SlateElement>>[]): Record<string, Plugin<Record<string, SlateElement>>>;
|
|
9
|
+
export declare function buildCommands(editor: YooEditor, plugins: Plugin<Record<string, SlateElement>>[]): Record<string, (...args: any[]) => any>;
|
|
9
10
|
//# sourceMappingURL=editorBuilders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorBuilders.d.ts","sourceRoot":"","sources":["../../src/utils/editorBuilders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"editorBuilders.d.ts","sourceRoot":"","sources":["../../src/utils/editorBuilders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAqB,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAatC,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,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,EAAE,0CA8ClF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,MASvD;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,MAepD;AAID,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,EAAE,GAC9C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CA4BtD;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,EAAE,GAC9C,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,CAczC"}
|
package/dist/utils/hotkeys.d.ts
CHANGED
|
@@ -39,6 +39,12 @@ export declare const HOTKEYS: {
|
|
|
39
39
|
isShiftArrowDown: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
40
40
|
isCopy: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
41
41
|
isCut: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
42
|
+
isShiftDelete: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
43
|
+
isCmdShiftEnter: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
44
|
+
isCmdShiftRight: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
45
|
+
isCmdShiftLeft: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
46
|
+
isCmdShiftDelete: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
47
|
+
isCmdAltDelete: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
42
48
|
};
|
|
43
49
|
export type HOTKEYS_TYPE = {
|
|
44
50
|
[key in keyof typeof HOTKEYS]: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hotkeys.d.ts","sourceRoot":"","sources":["../../src/utils/hotkeys.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"hotkeys.d.ts","sourceRoot":"","sources":["../../src/utils/hotkeys.ts"],"names":[],"mappings":";AA+EA,eAAO,MAAM,OAAO;oBARH,mBAAmB,GAAG,aAAa;uBAAnC,mBAAmB,GAAG,aAAa;yBAAnC,mBAAmB,GAAG,aAAa;0BAAnC,mBAAmB,GAAG,aAAa;uBAAnC,mBAAmB,GAAG,aAAa;yBAAnC,mBAAmB,GAAG,aAAa;8BAAnC,mBAAmB,GAAG,aAAa;6BAAnC,mBAAmB,GAAG,aAAa;kCAAnC,mBAAmB,GAAG,aAAa;iCAAnC,mBAAmB,GAAG,aAAa;kCAAnC,mBAAmB,GAAG,aAAa;iCAAnC,mBAAmB,GAAG,aAAa;8BAAnC,mBAAmB,GAAG,aA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,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"weakMaps.d.ts","sourceRoot":"","sources":["../../src/utils/weakMaps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,iBAAiB,6BAAoC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/editor",
|
|
3
|
-
"version": "4.7.0",
|
|
3
|
+
"version": "4.7.1-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"url": "https://github.com/Darginec05/Yoopta-Editor/issues"
|
|
68
68
|
},
|
|
69
69
|
"homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "63bfe2afb5f9d7b3a8c49584d0ac8bdc5b2dcf1f"
|
|
71
71
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NoSsr.d.ts","sourceRoot":"","sources":["../../../src/components/NoSsr/NoSsr.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAEvD,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,QAAA,MAAM,KAAK,2BAAmC,KAAK,QAUlD,CAAC;AAEF,eAAe,KAAK,CAAC"}
|