@yoopta/editor 4.0.0-rc.1 → 4.0.0-rc.11
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/LICENSE +21 -0
- package/dist/UI/BlockOptions/BlockOptions.d.ts +12 -11
- package/dist/UI/BlockOptions/BlockOptions.d.ts.map +1 -1
- package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts +1 -1
- package/dist/UI/ExtendedBlockActions/ExtendedBlockActions.d.ts.map +1 -1
- package/dist/UI/index.d.ts +11 -11
- package/dist/YooptaEditor.d.ts +6 -7
- package/dist/YooptaEditor.d.ts.map +1 -1
- package/dist/components/Block/Block.d.ts +1 -2
- package/dist/components/Block/Block.d.ts.map +1 -1
- package/dist/components/Block/BlockActions.d.ts +1 -2
- package/dist/components/Block/BlockActions.d.ts.map +1 -1
- package/dist/components/Editor/Editor.d.ts +1 -1
- package/dist/components/Editor/Editor.d.ts.map +1 -1
- package/dist/components/Editor/RenderBlocks.d.ts +1 -2
- package/dist/components/Editor/RenderBlocks.d.ts.map +1 -1
- package/dist/components/Editor/utils.d.ts +6 -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/TextLeaf/TextLeaf.d.ts +1 -2
- package/dist/components/TextLeaf/TextLeaf.d.ts.map +1 -1
- package/dist/contexts/UltraYooptaContext/ToolsContext.d.ts +17 -19
- package/dist/contexts/UltraYooptaContext/ToolsContext.d.ts.map +1 -1
- package/dist/contexts/UltraYooptaContext/UltraYooptaContext.d.ts +4 -4
- package/dist/contexts/UltraYooptaContext/UltraYooptaContext.d.ts.map +1 -1
- package/dist/editor/selection/setSelection.d.ts +4 -1
- package/dist/editor/selection/setSelection.d.ts.map +1 -1
- package/dist/editor/transforms/createBlock.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 +1 -0
- package/dist/editor/transforms/focusBlock.d.ts.map +1 -1
- package/dist/editor/transforms/moveBlock.d.ts.map +1 -1
- package/dist/editor/transforms/updateBlock.d.ts +1 -1
- package/dist/editor/transforms/updateBlock.d.ts.map +1 -1
- package/dist/editor/types.d.ts +5 -5
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -8
- package/dist/plugins/SlateEditorComponent.d.ts +1 -2
- package/dist/plugins/SlateEditorComponent.d.ts.map +1 -1
- package/dist/plugins/createYooptaPlugin.d.ts.map +1 -1
- package/dist/plugins/types.d.ts +6 -2
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/utils/editorBuilders.d.ts.map +1 -1
- package/dist/utils/findSlateBySelectionPath.d.ts +2 -1
- package/dist/utils/findSlateBySelectionPath.d.ts.map +1 -1
- package/dist/utils/hotkeys.d.ts +40 -40
- package/dist/utils/hotkeys.d.ts.map +1 -1
- package/package.json +7 -9
- package/dist/components/Editor/defaultValue.d.ts +0 -7
- package/dist/components/Editor/defaultValue.d.ts.map +0 -1
- package/dist/tools/ActionMenuList/ActionMenuComponent.d.ts +0 -14
- package/dist/tools/ActionMenuList/ActionMenuComponent.d.ts.map +0 -1
- package/dist/tools/ActionMenuList/ActionMenuList.d.ts +0 -10
- package/dist/tools/ActionMenuList/ActionMenuList.d.ts.map +0 -1
- package/dist/tools/ActionMenuList/events.d.ts +0 -12
- package/dist/tools/ActionMenuList/events.d.ts.map +0 -1
- package/dist/tools/Toolbar/HighlightColor.d.ts +0 -14
- package/dist/tools/Toolbar/HighlightColor.d.ts.map +0 -1
- package/dist/tools/Toolbar/Toolbar.d.ts +0 -4
- package/dist/tools/Toolbar/Toolbar.d.ts.map +0 -1
- package/dist/tools/Toolbar/ToolbarComponent.d.ts +0 -9
- package/dist/tools/Toolbar/ToolbarComponent.d.ts.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { YooptaMark } from '../marks';
|
|
3
2
|
import { PluginParams } from './types';
|
|
4
3
|
type Props<TKeys extends string, TProps, TOptions> = PluginParams<TKeys, TProps, TOptions> & {
|
|
@@ -7,6 +6,6 @@ type Props<TKeys extends string, TProps, TOptions> = PluginParams<TKeys, TProps,
|
|
|
7
6
|
options: PluginParams<TKeys, TProps, TOptions>['options'];
|
|
8
7
|
placeholder?: string;
|
|
9
8
|
};
|
|
10
|
-
declare const SlateEditorComponent: <TKeys extends string, TProps, TOptions>({ id, customEditor, elements, marks, events, options, placeholder, }: Props<TKeys, TProps, TOptions>) => JSX.Element;
|
|
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;
|
|
11
10
|
export { SlateEditorComponent };
|
|
12
11
|
//# sourceMappingURL=SlateEditorComponent.d.ts.map
|
|
@@ -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,EAIL,YAAY,EAEb,MAAM,SAAS,CAAC;AAYjB,KAAK,KAAK,CAAC,KAAK,SAAS,MAAM,EAAE,MAAM,EAAE,QAAQ,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG;IAC3F,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAgBF,QAAA,MAAM,oBAAoB,2LAyKzB,CAAC;AA+EF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -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,YAAY,
|
|
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,YAAY,EAAE,MAAM,SAAS,CAAC;AAEtD,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,CAAwC;gBAEnD,MAAM,EAAE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC;IAIzD,IAAI,SAAS,0CAEZ;IAED,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC;CAUzF"}
|
package/dist/plugins/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
4
|
import { YooEditor, YooptaBlockData } from '../editor/types';
|
|
@@ -11,7 +11,11 @@ export type RenderPluginProps<TKeys extends string, TProps, TOptions> = {
|
|
|
11
11
|
marks?: YooptaMark<unknown>[];
|
|
12
12
|
};
|
|
13
13
|
export type PluginOptions<T> = {
|
|
14
|
-
|
|
14
|
+
display?: {
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
icon?: string | ReactNode | ReactElement;
|
|
18
|
+
};
|
|
15
19
|
shortcuts?: string[];
|
|
16
20
|
align?: 'left' | 'center' | 'right';
|
|
17
21
|
} & T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"
|
|
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;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAyB,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,kBAAkB,IAAI,uBAAuB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7D,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,EAAE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC;IAC5D,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;CAC/B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AAI;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 +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":"AACA,OAAO,EAAgB,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAoC,MAAM,kBAAkB,CAAC;AACjG,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,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,0CAoD1F;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,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,GACtD,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA2B/C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Editor } from 'slate';
|
|
1
2
|
import { YooEditor, YooptaEditorTransformOptions } from '../editor/types';
|
|
2
|
-
export declare function findSlateBySelectionPath(editor: YooEditor, options?: Pick<YooptaEditorTransformOptions, 'at'>):
|
|
3
|
+
export declare function findSlateBySelectionPath(editor: YooEditor, options?: Pick<YooptaEditorTransformOptions, 'at'>): Editor | undefined;
|
|
3
4
|
//# sourceMappingURL=findSlateBySelectionPath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findSlateBySelectionPath.d.ts","sourceRoot":"","sources":["../../src/utils/findSlateBySelectionPath.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE1E,wBAAgB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"findSlateBySelectionPath.d.ts","sourceRoot":"","sources":["../../src/utils/findSlateBySelectionPath.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAE1E,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,IAAI,CAAC,4BAA4B,EAAE,IAAI,CAAM,GACrD,MAAM,GAAG,SAAS,CAWpB"}
|
package/dist/utils/hotkeys.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export declare const HOTKEYS: {
|
|
3
|
-
isBold: (event: KeyboardEvent) => boolean;
|
|
4
|
-
isCompose: (event: KeyboardEvent) => boolean;
|
|
5
|
-
isArrowLeft: (event: KeyboardEvent) => boolean;
|
|
6
|
-
isArrowRight: (event: KeyboardEvent) => boolean;
|
|
7
|
-
isArrowUp: (event: KeyboardEvent) => boolean;
|
|
8
|
-
isArrowDown: (event: KeyboardEvent) => boolean;
|
|
9
|
-
isDeleteBackward: (event: KeyboardEvent) => boolean;
|
|
10
|
-
isDeleteForward: (event: KeyboardEvent) => boolean;
|
|
11
|
-
isDeleteLineBackward: (event: KeyboardEvent) => boolean;
|
|
12
|
-
isDeleteLineForward: (event: KeyboardEvent) => boolean;
|
|
13
|
-
isDeleteWordBackward: (event: KeyboardEvent) => boolean;
|
|
14
|
-
isDeleteWordForward: (event: KeyboardEvent) => boolean;
|
|
15
|
-
isExtendBackward: (event: KeyboardEvent) => boolean;
|
|
16
|
-
isExtendForward: (event: KeyboardEvent) => boolean;
|
|
17
|
-
isExtendLineBackward: (event: KeyboardEvent) => boolean;
|
|
18
|
-
isExtendLineForward: (event: KeyboardEvent) => boolean;
|
|
19
|
-
isItalic: (event: KeyboardEvent) => boolean;
|
|
20
|
-
isMoveLineBackward: (event: KeyboardEvent) => boolean;
|
|
21
|
-
isMoveLineForward: (event: KeyboardEvent) => boolean;
|
|
22
|
-
isCtrlLeft: (event: KeyboardEvent) => boolean;
|
|
23
|
-
isCtrlRight: (event: KeyboardEvent) => boolean;
|
|
24
|
-
isRedo: (event: KeyboardEvent) => boolean;
|
|
25
|
-
isShiftEnter: (event: KeyboardEvent) => boolean;
|
|
26
|
-
isEnter: (event: KeyboardEvent) => boolean;
|
|
27
|
-
isTransposeCharacter: (event: KeyboardEvent) => boolean;
|
|
28
|
-
isUndo: (event: KeyboardEvent) => boolean;
|
|
29
|
-
isSpace: (event: KeyboardEvent) => boolean;
|
|
30
|
-
isSelect: (event: KeyboardEvent) => boolean;
|
|
31
|
-
isTab: (event: KeyboardEvent) => boolean;
|
|
32
|
-
isShiftTab: (event: KeyboardEvent) => boolean;
|
|
33
|
-
isBackspace: (event: KeyboardEvent) => boolean;
|
|
34
|
-
isCmdEnter: (event: KeyboardEvent) => boolean;
|
|
35
|
-
isCmd: (event: KeyboardEvent) => boolean;
|
|
36
|
-
isEscape: (event: KeyboardEvent) => boolean;
|
|
37
|
-
isSlashCommand: (event: KeyboardEvent) => boolean;
|
|
38
|
-
isShiftArrowUp: (event: KeyboardEvent) => boolean;
|
|
39
|
-
isShiftArrowDown: (event: KeyboardEvent) => boolean;
|
|
40
|
-
isKekceburek: (event: KeyboardEvent) => boolean;
|
|
3
|
+
isBold: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
4
|
+
isCompose: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
5
|
+
isArrowLeft: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
6
|
+
isArrowRight: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
7
|
+
isArrowUp: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
8
|
+
isArrowDown: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
9
|
+
isDeleteBackward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
10
|
+
isDeleteForward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
11
|
+
isDeleteLineBackward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
12
|
+
isDeleteLineForward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
13
|
+
isDeleteWordBackward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
14
|
+
isDeleteWordForward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
15
|
+
isExtendBackward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
16
|
+
isExtendForward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
17
|
+
isExtendLineBackward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
18
|
+
isExtendLineForward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
19
|
+
isItalic: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
20
|
+
isMoveLineBackward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
21
|
+
isMoveLineForward: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
22
|
+
isCtrlLeft: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
23
|
+
isCtrlRight: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
24
|
+
isRedo: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
25
|
+
isShiftEnter: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
26
|
+
isEnter: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
27
|
+
isTransposeCharacter: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
28
|
+
isUndo: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
29
|
+
isSpace: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
30
|
+
isSelect: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
31
|
+
isTab: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
32
|
+
isShiftTab: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
33
|
+
isBackspace: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
34
|
+
isCmdEnter: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
35
|
+
isCmd: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
36
|
+
isEscape: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
37
|
+
isSlashCommand: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
38
|
+
isShiftArrowUp: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
39
|
+
isShiftArrowDown: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
40
|
+
isKekceburek: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
41
41
|
};
|
|
42
42
|
export type HOTKEYS_TYPE = {
|
|
43
|
-
[key in keyof typeof HOTKEYS]: (event: KeyboardEvent) => boolean;
|
|
43
|
+
[key in keyof typeof HOTKEYS]: (event: React.KeyboardEvent | KeyboardEvent) => boolean;
|
|
44
44
|
};
|
|
45
45
|
//# sourceMappingURL=hotkeys.d.ts.map
|
|
@@ -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":";AAwEA,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,aAAa;6BAAnC,mBAAmB,GAAG,aAAa;kCAAnC,mBAAmB,GAAG,aAAa;iCAAnC,mBAAmB,GAAG,aAAa;sBAAnC,mBAAmB,GAAG,aAAa;gCAAnC,mBAAmB,GAAG,aAAa;+BAAnC,mBAAmB,GAAG,aAAa;wBAAnC,mBAAmB,GAAG,aAAa;yBAAnC,mBAAmB,GAAG,aAAa;oBAAnC,mBAAmB,GAAG,aAAa;0BAAnC,mBAAmB,GAAG,aAAa;qBAAnC,mBAAmB,GAAG,aAAa;kCAAnC,mBAAmB,GAAG,aAAa;oBAAnC,mBAAmB,GAAG,aAAa;qBAAnC,mBAAmB,GAAG,aAAa;sBAAnC,mBAAmB,GAAG,aAAa;mBAAnC,mBAAmB,GAAG,aAAa;wBAAnC,mBAAmB,GAAG,aAAa;yBAAnC,mBAAmB,GAAG,aAAa;wBAAnC,mBAAmB,GAAG,aAAa;mBAAnC,mBAAmB,GAAG,aAAa;sBAAnC,mBAAmB,GAAG,aAAa;4BAAnC,mBAAmB,GAAG,aAAa;4BAAnC,mBAAmB,GAAG,aAAa;8BAAnC,mBAAmB,GAAG,aAAa;0BAAnC,mBAAmB,GAAG,aAAa;CA+CnD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;KACxB,GAAG,IAAI,MAAM,OAAO,OAAO,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,GAAG,aAAa,KAAK,OAAO;CACvF,CAAC"}
|
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.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -13,24 +13,21 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@dnd-kit/core": "^6.1.0",
|
|
15
15
|
"@dnd-kit/sortable": "^8.0.0",
|
|
16
|
-
"@dnd-kit/utilities": "^3.2.2",
|
|
17
16
|
"@floating-ui/react": "^0.26.9",
|
|
18
17
|
"@radix-ui/react-icons": "^1.3.0",
|
|
19
|
-
"@radix-ui/react-toolbar": "^1.0.4",
|
|
20
18
|
"copy-to-clipboard": "^3.3.2",
|
|
21
19
|
"eventemitter3": "^5.0.1",
|
|
22
20
|
"immer": "^10.0.3",
|
|
23
21
|
"is-hotkey": "^0.2.0",
|
|
24
22
|
"lodash.clonedeep": "^4.5.0",
|
|
25
23
|
"nanoid": "^4.0.1",
|
|
26
|
-
"slate": "
|
|
27
|
-
"slate-history": "^0.66.0",
|
|
28
|
-
"slate-hyperscript": "^0.77.0",
|
|
29
|
-
"slate-react": ">=0.95.0"
|
|
24
|
+
"slate-history": "^0.100.0"
|
|
30
25
|
},
|
|
31
26
|
"peerDependencies": {
|
|
32
27
|
"react": ">=17.0.2",
|
|
33
|
-
"react-dom": ">=17.0.2"
|
|
28
|
+
"react-dom": ">=17.0.2",
|
|
29
|
+
"slate": "^0.102.0",
|
|
30
|
+
"slate-react": "^0.102.0"
|
|
34
31
|
},
|
|
35
32
|
"scripts": {
|
|
36
33
|
"start": "rollup --config rollup.config.js --watch --bundleConfigAsCjs --environment NODE_ENV:development",
|
|
@@ -70,5 +67,6 @@
|
|
|
70
67
|
"bugs": {
|
|
71
68
|
"url": "https://github.com/Darginec05/Yoopta-Editor/issues"
|
|
72
69
|
},
|
|
73
|
-
"homepage": "https://github.com/Darginec05/Yoopta-Editor#readme"
|
|
70
|
+
"homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
|
|
71
|
+
"gitHead": "2eb6cce66e21d10f315003f78baceac9b1d51200"
|
|
74
72
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { YooptaBlockData, SlateElement } from '../../editor/types';
|
|
2
|
-
export declare const getDefaultParagraphPluginElement: () => SlateElement;
|
|
3
|
-
export declare const getDefaultParagraphBlock: (id?: string) => YooptaBlockData;
|
|
4
|
-
export declare const getDefaultYooptaChildren: () => {
|
|
5
|
-
[x: string]: YooptaBlockData<import("slate").Descendant>;
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=defaultValue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultValue.d.ts","sourceRoot":"","sources":["../../../src/components/Editor/defaultValue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGnE,eAAO,MAAM,gCAAgC,QAAO,YAOlD,CAAC;AAEH,eAAO,MAAM,wBAAwB,QAAS,MAAM,KAAG,eAQrD,CAAC;AAEH,eAAO,MAAM,wBAAwB;;CAQpC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { YooEditor } from '../../editor/types';
|
|
3
|
-
type Props = {
|
|
4
|
-
actions: string[];
|
|
5
|
-
editor: YooEditor;
|
|
6
|
-
onMouseEnter?: (e: React.MouseEvent) => void;
|
|
7
|
-
selectedAction: string;
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
empty: boolean;
|
|
10
|
-
mode?: 'toggle' | 'create';
|
|
11
|
-
};
|
|
12
|
-
declare const ActionMenuComponent: ({ actions: actionsProps, editor, onMouseEnter, selectedAction, onClose, empty, mode, }: Props) => JSX.Element;
|
|
13
|
-
export { ActionMenuComponent };
|
|
14
|
-
//# sourceMappingURL=ActionMenuComponent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionMenuComponent.d.ts","sourceRoot":"","sources":["../../../src/tools/ActionMenuList/ActionMenuComponent.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAe,MAAM,oBAAoB,CAAC;AAG5D,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC5B,CAAC;AAUF,QAAA,MAAM,mBAAmB,2FAQtB,KAAK,gBAuDP,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { YooptaBlock } from '../../editor/types';
|
|
3
|
-
type Props = {
|
|
4
|
-
trigger?: string;
|
|
5
|
-
actions?: YooptaBlock[];
|
|
6
|
-
render?: (props: any) => JSX.Element;
|
|
7
|
-
};
|
|
8
|
-
declare const ActionMenuList: ({ trigger, render }: Props) => JSX.Element | null;
|
|
9
|
-
export { ActionMenuList };
|
|
10
|
-
//# sourceMappingURL=ActionMenuList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionMenuList.d.ts","sourceRoot":"","sources":["../../../src/tools/ActionMenuList/ActionMenuList.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAiBjD,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IAQjB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC,OAAO,CAAC;CACtC,CAAC;AAEF,QAAA,MAAM,cAAc,wBAA+B,KAAK,uBA+GvD,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Editor } from 'slate';
|
|
2
|
-
import { YooEditor } from '../../editor/types';
|
|
3
|
-
export declare const events: {
|
|
4
|
-
onKeyDown: (editor: YooEditor, slate: Editor, options: any) => (event: React.KeyboardEvent) => any;
|
|
5
|
-
onKeyUp: (editor: YooEditor, slate: Editor, { open, close, change, state }: {
|
|
6
|
-
open: any;
|
|
7
|
-
close: any;
|
|
8
|
-
change: any;
|
|
9
|
-
state: any;
|
|
10
|
-
}) => (event: React.KeyboardEvent) => any;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/tools/ActionMenuList/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAQ,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA2F/C,eAAO,MAAM,MAAM;wBAxFsB,SAAS,SAAS,MAAM,2BAAsB,mBAAmB;sBA6E/F,SAAS,SAAS,MAAM;;;;;kBACzB,mBAAmB;CAa5B,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { YooEditor } from '../../editor/types';
|
|
3
|
-
type Props = {
|
|
4
|
-
editor: YooEditor;
|
|
5
|
-
highlightColors: CSSProperties;
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
refs: {
|
|
8
|
-
setFloating: (el: HTMLElement) => void;
|
|
9
|
-
};
|
|
10
|
-
floatingStyles: React.CSSProperties;
|
|
11
|
-
};
|
|
12
|
-
declare const HighlightColor: ({ editor, highlightColors, onClose, refs, floatingStyles }: Props) => JSX.Element;
|
|
13
|
-
export { HighlightColor };
|
|
14
|
-
//# sourceMappingURL=HighlightColor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HighlightColor.d.ts","sourceRoot":"","sources":["../../../src/tools/Toolbar/HighlightColor.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAc,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AA6C/C,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,eAAe,EAAE,aAAa,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE;QAAE,WAAW,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAA;KAAE,CAAC;IACjD,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,cAAc,+DAAgE,KAAK,gBAgExF,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/tools/Toolbar/Toolbar.tsx"],"names":[],"mappings":";AAMA,QAAA,MAAM,OAAO,0BAqDZ,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { YooEditor, YooptaBlock } from '../../editor/types';
|
|
3
|
-
type ToolbarComponentProps = {
|
|
4
|
-
activeBlock?: YooptaBlock;
|
|
5
|
-
editor: YooEditor;
|
|
6
|
-
};
|
|
7
|
-
declare const ToolbarComponent: ({ activeBlock, editor }: ToolbarComponentProps) => JSX.Element;
|
|
8
|
-
export { ToolbarComponent };
|
|
9
|
-
//# sourceMappingURL=ToolbarComponent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarComponent.d.ts","sourceRoot":"","sources":["../../../src/tools/Toolbar/ToolbarComponent.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAe5D,KAAK,qBAAqB,GAAG;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAMF,QAAA,MAAM,gBAAgB,4BAA6B,qBAAqB,gBAgKvE,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|