@yoopta/editor 4.8.4-rc.0 → 4.8.5-rc.1
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/README.md +9 -12
- package/dist/UI/BlockOptions/BlockOptions.d.ts.map +1 -1
- package/dist/UI/BlockOptions/utils.d.ts.map +1 -1
- package/dist/YooptaEditor.d.ts +7 -2
- 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.map +1 -1
- package/dist/components/Editor/Editor.d.ts.map +1 -1
- package/dist/components/Editor/dnd.d.ts.map +1 -1
- package/dist/components/Editor/selection.d.ts +8 -0
- package/dist/components/Editor/selection.d.ts.map +1 -1
- package/dist/components/Editor/utils.d.ts +7 -2
- package/dist/components/Editor/utils.d.ts.map +1 -1
- package/dist/components/SelectionBox/hooks.d.ts.map +1 -1
- package/dist/contexts/YooptaContext/ToolsContext.d.ts.map +1 -1
- package/dist/contexts/YooptaContext/YooptaContext.d.ts +4 -4
- package/dist/contexts/YooptaContext/YooptaContext.d.ts.map +1 -1
- package/dist/editor/blocks/buildBlockData.d.ts +12 -0
- package/dist/editor/blocks/buildBlockData.d.ts.map +1 -0
- package/dist/editor/blocks/decreaseBlockDepth.d.ts +3 -2
- package/dist/editor/blocks/decreaseBlockDepth.d.ts.map +1 -1
- package/dist/editor/blocks/deleteBlock.d.ts +15 -5
- package/dist/editor/blocks/deleteBlock.d.ts.map +1 -1
- package/dist/editor/blocks/duplicateBlock.d.ts +12 -4
- package/dist/editor/blocks/duplicateBlock.d.ts.map +1 -1
- package/dist/editor/blocks/focusBlock.d.ts +4 -2
- package/dist/editor/blocks/focusBlock.d.ts.map +1 -1
- package/dist/editor/blocks/getBlock.d.ts +2 -2
- package/dist/editor/blocks/getSlate.d.ts +2 -2
- package/dist/editor/blocks/increaseBlockDepth.d.ts +6 -2
- package/dist/editor/blocks/increaseBlockDepth.d.ts.map +1 -1
- package/dist/editor/blocks/index.d.ts +8 -6
- package/dist/editor/blocks/index.d.ts.map +1 -1
- package/dist/editor/blocks/insertBlock.d.ts +7 -2
- package/dist/editor/blocks/insertBlock.d.ts.map +1 -1
- package/dist/editor/blocks/insertBlock.test.d.ts +2 -0
- package/dist/editor/blocks/insertBlock.test.d.ts.map +1 -0
- package/dist/editor/blocks/mergeBlock.d.ts +3 -0
- package/dist/editor/blocks/mergeBlock.d.ts.map +1 -0
- package/dist/editor/blocks/moveBlock.d.ts +2 -2
- package/dist/editor/blocks/moveBlock.d.ts.map +1 -1
- package/dist/editor/blocks/splitBlock.d.ts +6 -2
- package/dist/editor/blocks/splitBlock.d.ts.map +1 -1
- package/dist/editor/blocks/toggleBlock.d.ts +7 -3
- package/dist/editor/blocks/toggleBlock.d.ts.map +1 -1
- package/dist/editor/blocks/updateBlock.d.ts +1 -1
- package/dist/editor/blocks/updateBlock.d.ts.map +1 -1
- package/dist/editor/core/applyTransforms.d.ts +86 -0
- package/dist/editor/core/applyTransforms.d.ts.map +1 -0
- package/dist/editor/core/batchOperations.d.ts +3 -0
- package/dist/editor/core/batchOperations.d.ts.map +1 -0
- package/dist/editor/core/blur.d.ts +3 -2
- package/dist/editor/core/blur.d.ts.map +1 -1
- package/dist/editor/core/history.d.ts +23 -0
- package/dist/editor/core/history.d.ts.map +1 -0
- package/dist/editor/elements/index.d.ts +1 -0
- package/dist/editor/elements/index.d.ts.map +1 -1
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/paths/getNextPath.d.ts +3 -0
- package/dist/editor/paths/getNextPath.d.ts.map +1 -0
- package/dist/editor/paths/getPath.d.ts +3 -0
- package/dist/editor/paths/getPath.d.ts.map +1 -0
- package/dist/editor/paths/getPreviousPath.d.ts +3 -0
- package/dist/editor/paths/getPreviousPath.d.ts.map +1 -0
- package/dist/editor/paths/getSelectedPaths.d.ts +3 -0
- package/dist/editor/paths/getSelectedPaths.d.ts.map +1 -0
- package/dist/editor/paths/index.d.ts +20 -0
- package/dist/editor/paths/index.d.ts.map +1 -0
- package/dist/editor/paths/isBlockSelected.d.ts +3 -0
- package/dist/editor/paths/isBlockSelected.d.ts.map +1 -0
- package/dist/editor/paths/isPathEmpty.d.ts +3 -0
- package/dist/editor/paths/isPathEmpty.d.ts.map +1 -0
- package/dist/editor/paths/setPath.d.ts +3 -0
- package/dist/editor/paths/setPath.d.ts.map +1 -0
- package/dist/editor/types.d.ts +43 -34
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/extensions/shortcuts.d.ts +1 -1
- package/dist/extensions/shortcuts.d.ts.map +1 -1
- package/dist/handlers/onKeyDown.d.ts.map +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -9
- package/dist/marks/index.d.ts +0 -1
- package/dist/marks/index.d.ts.map +1 -1
- package/dist/parsers/deserializeHTML.d.ts.map +1 -1
- package/dist/parsers/getHTML.d.ts.map +1 -1
- package/dist/parsers/getMarkdown.d.ts.map +1 -1
- package/dist/plugins/SlateEditorComponent.d.ts.map +1 -1
- package/dist/plugins/createYooptaPlugin.d.ts +0 -1
- package/dist/plugins/createYooptaPlugin.d.ts.map +1 -1
- package/dist/plugins/extenstions/withInlines.d.ts +1 -1
- package/dist/plugins/extenstions/withInlines.d.ts.map +1 -1
- package/dist/plugins/hooks.d.ts +1 -1
- package/dist/plugins/hooks.d.ts.map +1 -1
- package/dist/plugins/types.d.ts +1 -1
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/utils/buildSlate.d.ts.map +1 -1
- package/dist/utils/deepClone.d.ts.map +1 -1
- package/dist/utils/editorBuilders.d.ts.map +1 -1
- package/dist/utils/findPluginBlockByPath.d.ts +5 -0
- package/dist/utils/findPluginBlockByPath.d.ts.map +1 -0
- package/dist/utils/findSlateBySelectionPath.d.ts +4 -2
- package/dist/utils/findSlateBySelectionPath.d.ts.map +1 -1
- package/dist/utils/getLastNodePoint.d.ts +9 -0
- package/dist/utils/getLastNodePoint.d.ts.map +1 -0
- package/dist/utils/types.d.ts +2 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/package.json +3 -4
- package/dist/editor/blocks/createBlock.d.ts +0 -6
- package/dist/editor/blocks/createBlock.d.ts.map +0 -1
- package/dist/editor/blocks/deleteBlocks.d.ts +0 -8
- package/dist/editor/blocks/deleteBlocks.d.ts.map +0 -1
- package/dist/editor/blocks/insertBlocks.d.ts +0 -3
- package/dist/editor/blocks/insertBlocks.d.ts.map +0 -1
- package/dist/editor/selection/setBlockSelected.d.ts +0 -7
- package/dist/editor/selection/setBlockSelected.d.ts.map +0 -1
- package/dist/editor/selection/setSelection.d.ts +0 -6
- package/dist/editor/selection/setSelection.d.ts.map +0 -1
- package/dist/utils/findPluginBlockBySelectionPath.d.ts +0 -3
- package/dist/utils/findPluginBlockBySelectionPath.d.ts.map +0 -1
- package/dist/utils/findPluginBlockByType.d.ts +0 -7
- package/dist/utils/findPluginBlockByType.d.ts.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type EditorBlurOptions =
|
|
1
|
+
import { SlateEditor, YooEditor } from '../types';
|
|
2
|
+
export type EditorBlurOptions = {
|
|
3
3
|
waitExecution?: boolean;
|
|
4
4
|
waitExecutionMs?: number;
|
|
5
|
+
slate?: SlateEditor;
|
|
5
6
|
};
|
|
6
7
|
export declare function blur(editor: YooEditor, options?: EditorBlurOptions): void;
|
|
7
8
|
//# sourceMappingURL=blur.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../src/editor/core/blur.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"blur.d.ts","sourceRoot":"","sources":["../../../src/editor/core/blur.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAaF,wBAAgB,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,GAAE,iBAAsB,QAiBtE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { YooEditor, YooptaPath } from '../types';
|
|
2
|
+
import { YooptaOperation } from './applyTransforms';
|
|
3
|
+
export type HistoryStack = {
|
|
4
|
+
operations: YooptaOperation[];
|
|
5
|
+
path: YooptaPath;
|
|
6
|
+
};
|
|
7
|
+
export type HistoryStackName = 'undos' | 'redos';
|
|
8
|
+
export declare function inverseEditorOperation(editor: YooEditor, op: YooptaOperation): YooptaOperation | YooptaOperation[];
|
|
9
|
+
export type UndoRedoOptions = {
|
|
10
|
+
scroll?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare const SAVING: WeakMap<YooEditor, boolean | undefined>;
|
|
13
|
+
export declare const MERGING: WeakMap<YooEditor, boolean | undefined>;
|
|
14
|
+
export declare const YooptaHistory: {
|
|
15
|
+
isMergingHistory(editor: YooEditor): boolean | undefined;
|
|
16
|
+
isSavingHistory(editor: YooEditor): boolean | undefined;
|
|
17
|
+
withMergingHistory(editor: YooEditor, fn: () => void): void;
|
|
18
|
+
withoutMergingHistory(editor: YooEditor, fn: () => void): void;
|
|
19
|
+
withoutSavingHistory(editor: YooEditor, fn: () => void): void;
|
|
20
|
+
redo: (editor: YooEditor, options?: UndoRedoOptions) => void;
|
|
21
|
+
undo: (editor: YooEditor, options?: UndoRedoOptions) => void;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../src/editor/core/history.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,eAAe,GAAG,eAAe,GAAG,eAAe,EAAE,CAmFlH;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,MAAM,yCAAgD,CAAC;AACpE,eAAO,MAAM,OAAO,yCAAgD,CAAC;AAErE,eAAO,MAAM,aAAa;6BACC,SAAS,GAAG,OAAO,GAAG,SAAS;4BAIhC,SAAS,GAAG,OAAO,GAAG,SAAS;+BAI5B,SAAS,MAAM,MAAM,IAAI,GAAG,IAAI;kCAO7B,SAAS,MAAM,MAAM,IAAI,GAAG,IAAI;iCAOjC,SAAS,MAAM,MAAM,IAAI,GAAG,IAAI;mBAO9C,SAAS,YAAY,eAAe;mBA0BpC,SAAS,YAAY,eAAe;CA4BpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/elements/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/elements/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,QAAQ;;;;;;;;;;;CAWpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editor/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAsB,MAAM,SAAS,CAAC;AAqBxD,wBAAgB,kBAAkB,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/editor/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAsB,MAAM,SAAS,CAAC;AAqBxD,wBAAgB,kBAAkB,IAAI,SAAS,CA8D9C;AAED,eAAO,MAAM,mBAAmB,sBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNextPath.d.ts","sourceRoot":"","sources":["../../../src/editor/paths/getNextPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,CAKpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPath.d.ts","sourceRoot":"","sources":["../../../src/editor/paths/getPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,CAEhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPreviousPath.d.ts","sourceRoot":"","sources":["../../../src/editor/paths/getPreviousPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEtD,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,eAAe,CAKlE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSelectedPaths.d.ts","sourceRoot":"","sources":["../../../src/editor/paths/getSelectedPaths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC,CAE1E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { getPreviousPath } from './getPreviousPath';
|
|
2
|
+
import { getNextPath } from './getNextPath';
|
|
3
|
+
import { isBlockSelected } from './isBlockSelected';
|
|
4
|
+
import { getPath } from './getPath';
|
|
5
|
+
import { getSelectedPaths } from './getSelectedPaths';
|
|
6
|
+
import { isPathEmpty } from './isPathEmpty';
|
|
7
|
+
import { setPath } from './setPath';
|
|
8
|
+
import { getLastNodePoint } from '../../utils/getLastNodePoint';
|
|
9
|
+
export declare const Paths: {
|
|
10
|
+
getPath: typeof getPath;
|
|
11
|
+
getNextPath: typeof getNextPath;
|
|
12
|
+
getPreviousPath: typeof getPreviousPath;
|
|
13
|
+
isBlockSelected: typeof isBlockSelected;
|
|
14
|
+
getSelectedPaths: typeof getSelectedPaths;
|
|
15
|
+
isPathEmpty: typeof isPathEmpty;
|
|
16
|
+
setPath: typeof setPath;
|
|
17
|
+
getLastNodePoint: typeof getLastNodePoint;
|
|
18
|
+
};
|
|
19
|
+
export type Paths = typeof Paths;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/editor/paths/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,eAAO,MAAM,KAAK;;;;;;;;;CASjB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBlockSelected.d.ts","sourceRoot":"","sources":["../../../src/editor/paths/isBlockSelected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAc,MAAM,UAAU,CAAC;AAElE,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAQlF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPathEmpty.d.ts","sourceRoot":"","sources":["../../../src/editor/paths/isPathEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAEtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setPath.d.ts","sourceRoot":"","sources":["../../../src/editor/paths/setPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,QAE1D"}
|
package/dist/editor/types.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Descendant, Path, Point } from 'slate';
|
|
2
2
|
import { Plugin, PluginElementsMap, PluginOptions, PluginElementProps } from '../plugins/types';
|
|
3
3
|
import { EditorBlurOptions } from './core/blur';
|
|
4
|
-
import { BlockSelectedOptions } from './selection/setBlockSelected';
|
|
5
|
-
import { SetSelectionOptions } from './selection/setSelection';
|
|
6
|
-
import { CreateBlockOptions } from './blocks/createBlock';
|
|
7
4
|
import { DeleteBlockOptions } from './blocks/deleteBlock';
|
|
8
5
|
import { DuplicateBlockOptions } from './blocks/duplicateBlock';
|
|
9
6
|
import { FocusBlockOptions } from './blocks/focusBlock';
|
|
10
7
|
import { ToggleBlockOptions } from './blocks/toggleBlock';
|
|
11
|
-
import { DeleteBlocksOptions } from './blocks/deleteBlocks';
|
|
12
8
|
import { GetBlockOptions } from './blocks/getBlock';
|
|
13
9
|
import { ReactEditor } from 'slate-react';
|
|
14
|
-
import {
|
|
15
|
-
|
|
10
|
+
import { ApplyTransformsOptions, YooptaOperation } from './core/applyTransforms';
|
|
11
|
+
import { InsertBlockOptions } from './blocks/insertBlock';
|
|
12
|
+
import { BlockDepthOptions } from './blocks/increaseBlockDepth';
|
|
13
|
+
import { SplitBlockOptions } from './blocks/splitBlock';
|
|
14
|
+
import { HistoryStack, HistoryStackName, YooptaHistory } from './core/history';
|
|
15
|
+
import { WithoutFirstArg } from '../utils/types';
|
|
16
16
|
export type YooptaBlockData<T = Descendant | SlateElement> = {
|
|
17
17
|
id: string;
|
|
18
18
|
value: T[];
|
|
@@ -25,16 +25,14 @@ export type YooptaBlockBaseMeta = {
|
|
|
25
25
|
align?: 'left' | 'center' | 'right' | undefined;
|
|
26
26
|
};
|
|
27
27
|
export type YooptaContentValue = Record<string, YooptaBlockData>;
|
|
28
|
-
export type SlateEditor = ReactEditor
|
|
28
|
+
export type SlateEditor = ReactEditor;
|
|
29
29
|
export type FocusAt = Path | Point;
|
|
30
|
-
export type YooptaEditorTransformOptions = {
|
|
31
|
-
at?: YooptaBlockPath | null;
|
|
32
|
-
focus?: boolean;
|
|
33
|
-
focusAt?: FocusAt;
|
|
34
|
-
slate?: SlateEditor;
|
|
35
|
-
blockId?: string;
|
|
36
|
-
};
|
|
37
30
|
export type YooptaPluginsEditorMap = Record<string, SlateEditor>;
|
|
31
|
+
export type YooptaPathIndex = number | null;
|
|
32
|
+
export type YooptaPath = {
|
|
33
|
+
current: YooptaPathIndex;
|
|
34
|
+
selected?: number[] | null;
|
|
35
|
+
};
|
|
38
36
|
export type TextFormat = {
|
|
39
37
|
type: string;
|
|
40
38
|
hotkey?: string;
|
|
@@ -49,46 +47,41 @@ export type YooptaBlock = {
|
|
|
49
47
|
elements: PluginElementsMap<string>;
|
|
50
48
|
hasCustomEditor?: boolean;
|
|
51
49
|
isActive: () => boolean;
|
|
52
|
-
create: (options?: CreateBlockOptions) => void;
|
|
53
|
-
toggle: (options?: ToggleBlockOptions) => void;
|
|
54
|
-
update: (id: string, data: Partial<YooptaBlockData>) => void;
|
|
55
|
-
delete: (options: DeleteBlockOptions) => void;
|
|
56
50
|
};
|
|
57
51
|
export type YooptaBlocks = Record<string, YooptaBlock>;
|
|
58
52
|
export type YooptaFormats = Record<string, TextFormat>;
|
|
59
|
-
export type YooEditorEvents = 'change' | 'focus' | 'blur' | 'block:copy';
|
|
53
|
+
export type YooEditorEvents = 'change' | 'focus' | 'blur' | 'block:copy' | 'path-change';
|
|
60
54
|
export type BaseCommands = Record<string, (...args: any[]) => any>;
|
|
61
55
|
export type YooEditor = {
|
|
62
56
|
id: string;
|
|
63
57
|
readOnly: boolean;
|
|
64
58
|
isEmpty: () => boolean;
|
|
65
|
-
insertBlock: (
|
|
66
|
-
insertBlocks: (blocks: YooptaBlockData[], options?: YooptaEditorTransformOptions) => void;
|
|
67
|
-
splitBlock: (options?: YooptaEditorTransformOptions) => void;
|
|
59
|
+
insertBlock: (type: string, options?: InsertBlockOptions) => string;
|
|
68
60
|
updateBlock: (id: string, data: Partial<YooptaBlockData>) => void;
|
|
69
|
-
deleteBlock: (options
|
|
70
|
-
|
|
71
|
-
duplicateBlock: (options?: DuplicateBlockOptions) => void;
|
|
61
|
+
deleteBlock: (options: DeleteBlockOptions) => void;
|
|
62
|
+
duplicateBlock: (options: DuplicateBlockOptions) => void;
|
|
72
63
|
toggleBlock: (toBlockType: string, options?: ToggleBlockOptions) => void;
|
|
73
|
-
increaseBlockDepth: (options?:
|
|
74
|
-
decreaseBlockDepth: (options?:
|
|
75
|
-
|
|
76
|
-
moveBlock: (blockId: string, to: YooptaBlockPath) => void;
|
|
64
|
+
increaseBlockDepth: (options?: BlockDepthOptions) => void;
|
|
65
|
+
decreaseBlockDepth: (options?: BlockDepthOptions) => void;
|
|
66
|
+
moveBlock: (blockId: string, to: YooptaPathIndex) => void;
|
|
77
67
|
focusBlock: (id: string, options?: FocusBlockOptions) => void;
|
|
68
|
+
mergeBlock: () => void;
|
|
69
|
+
splitBlock: (options?: SplitBlockOptions) => void;
|
|
78
70
|
getBlock: (options: GetBlockOptions) => YooptaBlockData | null;
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
path: YooptaPath;
|
|
72
|
+
setPath: (path: YooptaPath) => void;
|
|
81
73
|
children: YooptaContentValue;
|
|
82
74
|
getEditorValue: () => YooptaContentValue;
|
|
83
75
|
setEditorValue: (value: YooptaContentValue) => void;
|
|
84
|
-
setSelection: (path: YooptaBlockPath | null, options?: SetSelectionOptions) => void;
|
|
85
|
-
setBlockSelected: (path: number[] | null, options?: BlockSelectedOptions) => void;
|
|
86
76
|
blockEditorsMap: YooptaPluginsEditorMap;
|
|
87
77
|
blocks: YooptaBlocks;
|
|
88
78
|
formats: YooptaFormats;
|
|
89
79
|
shortcuts: Record<string, YooptaBlock>;
|
|
90
80
|
plugins: Record<string, Plugin<Record<string, SlateElement>, unknown>>;
|
|
91
81
|
commands: Record<string, (...args: any[]) => any>;
|
|
82
|
+
applyTransforms: (operations: YooptaOperation[], options?: ApplyTransformsOptions) => void;
|
|
83
|
+
batchOperations: (fn: () => void) => void;
|
|
84
|
+
historyStack: Record<HistoryStackName, HistoryStack[]>;
|
|
92
85
|
on: (event: YooEditorEvents, fn: (payload: any) => void) => void;
|
|
93
86
|
once: (event: YooEditorEvents, fn: (payload: any) => void) => void;
|
|
94
87
|
off: (event: YooEditorEvents, fn: (payload: any) => void) => void;
|
|
@@ -99,12 +92,28 @@ export type YooEditor = {
|
|
|
99
92
|
getHTML: (content: YooptaContentValue) => string;
|
|
100
93
|
getMarkdown: (content: YooptaContentValue) => string;
|
|
101
94
|
getPlainText: (content: YooptaContentValue) => string;
|
|
95
|
+
isSavingHistory: WithoutFirstArg<typeof YooptaHistory.isSavingHistory>;
|
|
96
|
+
isMergingHistory: WithoutFirstArg<typeof YooptaHistory.isMergingHistory>;
|
|
97
|
+
withoutSavingHistory: WithoutFirstArg<typeof YooptaHistory.withoutSavingHistory>;
|
|
98
|
+
withoutMergingHistory: WithoutFirstArg<typeof YooptaHistory.withoutMergingHistory>;
|
|
99
|
+
withMergingHistory: WithoutFirstArg<typeof YooptaHistory.withMergingHistory>;
|
|
100
|
+
redo: WithoutFirstArg<typeof YooptaHistory.redo>;
|
|
101
|
+
undo: WithoutFirstArg<typeof YooptaHistory.undo>;
|
|
102
102
|
refElement: HTMLElement | null;
|
|
103
103
|
};
|
|
104
|
+
export type SlateElementTextNode = {
|
|
105
|
+
text: string;
|
|
106
|
+
bold?: boolean;
|
|
107
|
+
italic?: boolean;
|
|
108
|
+
underline?: boolean;
|
|
109
|
+
code?: boolean;
|
|
110
|
+
strike?: boolean;
|
|
111
|
+
highlight?: any;
|
|
112
|
+
};
|
|
104
113
|
export type SlateElement<K extends string = string, T = any> = {
|
|
105
114
|
id: string;
|
|
106
115
|
type: K;
|
|
107
|
-
children: Descendant[]
|
|
116
|
+
children: Descendant[];
|
|
108
117
|
props?: PluginElementProps<T>;
|
|
109
118
|
};
|
|
110
119
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/editor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAQ,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB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oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB,CAAC;AAGF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAC/B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SlateEditor, YooEditor } from '../editor/types';
|
|
2
|
-
export declare const withShortcuts: (editor: YooEditor, slate: SlateEditor) =>
|
|
2
|
+
export declare const withShortcuts: (editor: YooEditor, slate: SlateEditor) => import("slate-react").ReactEditor;
|
|
3
3
|
//# sourceMappingURL=shortcuts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortcuts.d.ts","sourceRoot":"","sources":["../../src/extensions/shortcuts.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shortcuts.d.ts","sourceRoot":"","sources":["../../src/extensions/shortcuts.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAgB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEvE,eAAO,MAAM,aAAa,WAAY,SAAS,SAAS,WAAW,sCA8ClE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onKeyDown.d.ts","sourceRoot":"","sources":["../../src/handlers/onKeyDown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onKeyDown.d.ts","sourceRoot":"","sources":["../../src/handlers/onKeyDown.ts"],"names":[],"mappings":"AAKA,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAsBzD,MAAM;AAEN,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,WAC1B,mBAAmB,UAwPnC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
export { YooptaPlugin } from './plugins';
|
|
2
2
|
export { useBlockData, useYooptaEditor, useYooptaFocused, useBlockSelected, useYooptaReadOnly, useYooptaPluginOptions, } from './contexts/YooptaContext/YooptaContext';
|
|
3
|
-
import { YooptaEditor } from './YooptaEditor';
|
|
3
|
+
import { YooptaEditor, type YooptaEditorProps, type OnChangeOptions } from './YooptaEditor';
|
|
4
4
|
export { UI } from './UI';
|
|
5
5
|
export { useYooptaTools, Tools } from './contexts/YooptaContext/ToolsContext';
|
|
6
6
|
export { generateId } from './utils/generateId';
|
|
7
7
|
export { HOTKEYS } from './utils/hotkeys';
|
|
8
8
|
export { getRootBlockElementType, getRootBlockElement } from './utils/blockElements';
|
|
9
|
-
export {
|
|
9
|
+
export { findPluginBlockByPath } from './utils/findPluginBlockByPath';
|
|
10
10
|
export { findSlateBySelectionPath } from './utils/findSlateBySelectionPath';
|
|
11
|
-
export { findPluginBlockByType } from './utils/findPluginBlockByType';
|
|
12
11
|
export { deserializeTextNodes } from './parsers/deserializeTextNodes';
|
|
13
12
|
export { serializeTextNodes, serializeTextNodesIntoMarkdown } from './parsers/serializeTextNodes';
|
|
14
13
|
export { createYooptaEditor } from './editor';
|
|
15
14
|
export { createYooptaMark, YooptaMarkParams, YooptaMark } from './marks';
|
|
16
|
-
export { YooEditor, SlateElement, YooptaBlockData, YooptaBlock, YooptaContentValue, SlateEditor,
|
|
15
|
+
export { YooEditor, SlateElement, YooptaBlockData, YooptaBlock, YooptaContentValue, SlateEditor, YooptaPath, YooptaPathIndex, } from './editor/types';
|
|
17
16
|
export { buildBlockData, buildBlockElement } from './components/Editor/utils';
|
|
18
17
|
export { buildBlockElementsStructure } from './utils/blockElements';
|
|
18
|
+
export { buildSlateEditor } from './utils/buildSlate';
|
|
19
19
|
export { PluginElementRenderProps, PluginEventHandlerOptions, PluginCustomEditorRenderProps, PluginDeserializeParser, PluginserializeParser, YooptaMarkProps, PluginOptions, } from './plugins/types';
|
|
20
20
|
export { Elements } from './editor/elements';
|
|
21
21
|
export { Blocks } from './editor/blocks';
|
|
22
|
+
export { Paths } from './editor/paths';
|
|
23
|
+
export { InsertBlockOperation, DeleteBlockOperation, SetSelectionBlockOperation, NormalizePathsBlockOperation, YooptaOperation, SetBlockMetaOperation, SetBlockValueOperation, SetSlateOperation, } from './editor/core/applyTransforms';
|
|
22
24
|
import './styles.css';
|
|
23
25
|
export default YooptaEditor;
|
|
26
|
+
export { YooptaEditorProps, OnChangeOptions };
|
|
24
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,gBA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