@yoopta/editor 6.0.0-beta.1 → 6.0.0-beta.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/README.md +1 -2
- package/dist/components/Editor/render-blocks.d.ts +4 -2
- package/dist/components/Editor/render-blocks.d.ts.map +1 -1
- package/dist/components/Editor/render-editor.d.ts +3 -5
- package/dist/components/Editor/render-editor.d.ts.map +1 -1
- package/dist/editor/elements/create-element-structure.d.ts.map +1 -1
- package/dist/editor/elements/getElementRect.d.ts +28 -0
- package/dist/editor/elements/getElementRect.d.ts.map +1 -0
- package/dist/editor/elements/index.d.ts +4 -2
- package/dist/editor/elements/index.d.ts.map +1 -1
- package/dist/editor/index.d.ts +11 -2
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/paths/isBlockSelected.d.ts.map +1 -1
- package/dist/editor/types.d.ts +6 -1
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/parsers/deserializeHTML.d.ts +9 -1
- package/dist/parsers/deserializeHTML.d.ts.map +1 -1
- package/dist/parsers/deserializeHTML.test.d.ts +2 -0
- package/dist/parsers/deserializeHTML.test.d.ts.map +1 -0
- package/dist/parsers/deserializeYooptaJSON.d.ts +16 -0
- package/dist/parsers/deserializeYooptaJSON.d.ts.map +1 -0
- package/dist/parsers/getHTML.d.ts.map +1 -1
- package/dist/parsers/getYooptaJSON.d.ts +20 -0
- package/dist/parsers/getYooptaJSON.d.ts.map +1 -0
- package/dist/plugins/hooks.d.ts.map +1 -1
- package/dist/plugins/slate-editor-component.d.ts.map +1 -1
- package/dist/utils/block-elements.d.ts.map +1 -1
- package/dist/utils/editor-builders.d.ts +0 -1
- package/dist/utils/editor-builders.d.ts.map +1 -1
- package/dist/yoopta-editor.d.ts +11 -12
- package/dist/yoopta-editor.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/components/SelectionBox/SelectionBox.d.ts +0 -19
- package/dist/components/SelectionBox/SelectionBox.d.ts.map +0 -1
- package/dist/components/SelectionBox/hooks.d.ts +0 -7
- package/dist/components/SelectionBox/hooks.d.ts.map +0 -1
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
import type { YooEditor, YooptaBlockData } from '../editor/types';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Clears the cached plugins map for the editor.
|
|
4
|
+
* Call this when plugins are modified.
|
|
5
|
+
*/
|
|
6
|
+
export declare function clearDeserializeCache(editor: YooEditor): void;
|
|
7
|
+
/**
|
|
8
|
+
* Deserializes HTML into Yoopta blocks.
|
|
9
|
+
*/
|
|
10
|
+
export declare function deserializeHTML(editor: YooEditor, html: HTMLElement): YooptaBlockData[];
|
|
3
11
|
//# sourceMappingURL=deserializeHTML.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializeHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeHTML.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,SAAS,EAET,eAAe,EAChB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"deserializeHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeHTML.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,SAAS,EAET,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAiQzB;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAE7D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,GAAG,eAAe,EAAE,CASvF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deserializeHTML.test.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeHTML.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { YooEditor, YooptaBlockData } from '../editor/types';
|
|
2
|
+
/**
|
|
3
|
+
* Deserializes Yoopta JSON clipboard data back to blocks.
|
|
4
|
+
* This is the inverse of getYooptaJSON and preserves all block data exactly.
|
|
5
|
+
*
|
|
6
|
+
* @param editor - The Yoopta editor instance
|
|
7
|
+
* @param jsonString - The JSON string from clipboard
|
|
8
|
+
* @returns Array of YooptaBlockData ready to be inserted
|
|
9
|
+
*/
|
|
10
|
+
export declare function deserializeYooptaJSON(editor: YooEditor, jsonString: string): YooptaBlockData[] | null;
|
|
11
|
+
/**
|
|
12
|
+
* Check if a string looks like Yoopta clipboard data.
|
|
13
|
+
* Quick validation before attempting full parse.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isYooptaClipboardData(data: string): boolean;
|
|
16
|
+
//# sourceMappingURL=deserializeYooptaJSON.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deserializeYooptaJSON.d.ts","sourceRoot":"","sources":["../../src/parsers/deserializeYooptaJSON.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AA4GhF;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,MAAM,GACjB,eAAe,EAAE,GAAG,IAAI,CAwC1B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAS3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/getHTML.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"getHTML.d.ts","sourceRoot":"","sources":["../../src/parsers/getHTML.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,SAAS,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA8CnF,wBAAgB,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAwC9E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { YooEditor, YooptaBlockData, YooptaContentValue } from '../editor/types';
|
|
2
|
+
export type YooptaClipboardData = {
|
|
3
|
+
version: number;
|
|
4
|
+
editorId: string;
|
|
5
|
+
blocks: YooptaBlockData[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Serializes Yoopta content to JSON format for clipboard.
|
|
9
|
+
* This preserves all block data including complex props, marks, and metadata.
|
|
10
|
+
*
|
|
11
|
+
* @param editor - The Yoopta editor instance
|
|
12
|
+
* @param content - The content to serialize
|
|
13
|
+
* @returns JSON string with full block data
|
|
14
|
+
*/
|
|
15
|
+
export declare function getYooptaJSON(editor: YooEditor, content: YooptaContentValue): string;
|
|
16
|
+
/**
|
|
17
|
+
* The data attribute name used to store JSON in HTML clipboard
|
|
18
|
+
*/
|
|
19
|
+
export declare const YOOPTA_JSON_DATA_ATTR = "data-yoopta-json";
|
|
20
|
+
//# sourceMappingURL=getYooptaJSON.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getYooptaJSON.d.ts","sourceRoot":"","sources":["../../src/parsers/getYooptaJSON.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGtF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B,CAAC;AAIF;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,GAAG,MAAM,CA4BpF;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/plugins/hooks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAA6B,MAAM,SAAS,CAAC;AAI1E,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/plugins/hooks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAA6B,MAAM,SAAS,CAAC;AAI1E,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAyClE,eAAO,MAAM,cAAc,OACrB,MAAM,UACF,SAAS,SACV,eAAe,YACZ,GAAG,kBACG,GAAG,sCA2JmC,CAAC;AAEzD,eAAO,MAAM,gBAAgB,WACnB,eAAe,GAAG,SAAS,UAC3B,SAAS,SACV,eAAe,SACf,WAAW,wBAgEQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slate-editor-component.d.ts","sourceRoot":"","sources":["../../src/plugins/slate-editor-component.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAqB,MAAM,EAAE,eAAe,EAA2B,MAAM,SAAS,CAAC;AAGnG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"slate-editor-component.d.ts","sourceRoot":"","sources":["../../src/plugins/slate-editor-component.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAqB,MAAM,EAAE,eAAe,EAA2B,MAAM,SAAS,CAAC;AAGnG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAS3C,KAAK,KAAK,CAAC,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,IAAI,MAAM,CAC7E,WAAW,EACX,QAAQ,CACT,GAAG;IACF,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B,CAAC;AAoBF,QAAA,MAAM,oBAAoB,kNA2PzB,CAAC;AAkEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-elements.d.ts","sourceRoot":"","sources":["../../src/utils/block-elements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAmB,IAAI,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"block-elements.d.ts","sourceRoot":"","sources":["../../src/utils/block-elements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAmB,IAAI,EAAE,MAAM,OAAO,CAAC;AAO9C,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAE1B,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACpD,MAAM,GAAG,SAAS,CAQpB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACpD,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAO5C;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;AAiCD,KAAK,0BAA0B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEzD,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,MAAM,EACjB,0BAA0B,CAAC,EAAE,0BAA0B,GACtD,YAAY,CAkCd;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,CAM3D;AAED;;;GAGG;AACH;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,WAAW,GACjB,MAAM,EAAE,GAAG,IAAI,CAgDjB"}
|
|
@@ -4,5 +4,4 @@ import type { Plugin } from '../plugins/types';
|
|
|
4
4
|
export declare function buildMarks(editor: any, marks: YooptaMark<any>[]): import("../editor/types").YooptaFormats;
|
|
5
5
|
export declare function buildBlockSlateEditors(editor: YooEditor): {};
|
|
6
6
|
export declare function buildPlugins(plugins: Plugin<Record<string, SlateElement>>[]): Record<string, Plugin<Record<string, SlateElement>>>;
|
|
7
|
-
export declare function buildCommands(editor: YooEditor, plugins: Plugin<Record<string, SlateElement>>[]): Record<string, (...args: any[]) => any>;
|
|
8
7
|
//# sourceMappingURL=editor-builders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-builders.d.ts","sourceRoot":"","sources":["../../src/utils/editor-builders.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAqB,MAAM,kBAAkB,CAAC;AAElE,wBAAgB,UAAU,CAAC,MAAM,KAAA,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,2CAgB1D;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,MAkBvD;
|
|
1
|
+
{"version":3,"file":"editor-builders.d.ts","sourceRoot":"","sources":["../../src/utils/editor-builders.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAqB,MAAM,kBAAkB,CAAC;AAElE,wBAAgB,UAAU,CAAC,MAAM,KAAA,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,2CAgB1D;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,MAkBvD;AA0CD,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,CA6ItD"}
|
package/dist/yoopta-editor.d.ts
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import type { CSSProperties } from 'react';
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import type { YooptaOperation } from './editor/core/applyTransforms';
|
|
3
|
-
import type {
|
|
4
|
-
import type { YooptaMark } from './marks';
|
|
5
|
-
import type { YooptaPlugin } from './plugins';
|
|
3
|
+
import type { YooEditor, YooptaBlockData, YooptaContentValue, YooptaPath } from './editor/types';
|
|
6
4
|
export type YooptaOnChangeOptions = {
|
|
7
5
|
operations: YooptaOperation[];
|
|
8
6
|
};
|
|
7
|
+
export type RenderBlockProps = {
|
|
8
|
+
block: YooptaBlockData;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
blockId: string;
|
|
11
|
+
index: number;
|
|
12
|
+
};
|
|
9
13
|
export type YooptaEditorProps = {
|
|
10
|
-
id?: string;
|
|
11
14
|
editor: YooEditor;
|
|
12
|
-
plugins: readonly YooptaPlugin<Record<string, SlateElement>>[];
|
|
13
|
-
marks?: YooptaMark<any>[];
|
|
14
|
-
value?: YooptaContentValue;
|
|
15
15
|
onChange?: (value: YooptaContentValue, options: YooptaOnChangeOptions) => void;
|
|
16
16
|
onPathChange?: (path: YooptaPath) => void;
|
|
17
17
|
autoFocus?: boolean;
|
|
18
18
|
className?: string;
|
|
19
|
-
selectionBoxRoot?: HTMLElement | React.MutableRefObject<HTMLElement | null> | false;
|
|
20
19
|
children?: React.ReactNode;
|
|
21
20
|
placeholder?: string;
|
|
22
|
-
readOnly?: boolean;
|
|
23
|
-
width?: number | string;
|
|
24
21
|
style?: CSSProperties;
|
|
22
|
+
/** Custom render wrapper for each block. Useful for drag-and-drop integration. */
|
|
23
|
+
renderBlock?: (props: RenderBlockProps) => ReactNode;
|
|
25
24
|
};
|
|
26
|
-
declare const YooptaEditor: ({
|
|
25
|
+
declare const YooptaEditor: ({ editor, autoFocus, className, children, placeholder, style, onChange, onPathChange, renderBlock, }: YooptaEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
26
|
export { YooptaEditor };
|
|
28
27
|
//# sourceMappingURL=yoopta-editor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yoopta-editor.d.ts","sourceRoot":"","sources":["../src/yoopta-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"yoopta-editor.d.ts","sourceRoot":"","sources":["../src/yoopta-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjG,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC/E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,kFAAkF;IAClF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,SAAS,CAAC;CACtD,CAAC;AAOF,QAAA,MAAM,YAAY,yGAUf,iBAAiB,4CAiDnB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/editor",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"registry": "https://registry.npmjs.org",
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "328b04fa6481a487b434708338f56057792aafa4"
|
|
72
72
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { YooEditor } from '../../editor/types';
|
|
3
|
-
export type RectangeSelectionProps = {
|
|
4
|
-
editor: YooEditor;
|
|
5
|
-
root?: HTMLElement | React.MutableRefObject<HTMLElement | null> | false;
|
|
6
|
-
};
|
|
7
|
-
export type RectangeSelectionState = {
|
|
8
|
-
origin: [number, number];
|
|
9
|
-
coords: [number, number];
|
|
10
|
-
selection: boolean;
|
|
11
|
-
};
|
|
12
|
-
export type SelectionBoxProps = {
|
|
13
|
-
origin: RectangeSelectionState['origin'];
|
|
14
|
-
coords: RectangeSelectionState['coords'];
|
|
15
|
-
isOpen: boolean;
|
|
16
|
-
};
|
|
17
|
-
declare const SelectionBox: ({ origin, coords, isOpen }: SelectionBoxProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
|
-
export { SelectionBox };
|
|
19
|
-
//# sourceMappingURL=SelectionBox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionBox.d.ts","sourceRoot":"","sources":["../../../src/components/SelectionBox/SelectionBox.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;CACzE,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,QAAA,MAAM,YAAY,+BAAgC,iBAAiB,mDAyBlE,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { RectangeSelectionProps, RectangeSelectionState } from './SelectionBox';
|
|
2
|
-
type RectangeSelectionReturn = RectangeSelectionState & {
|
|
3
|
-
onClose: () => void;
|
|
4
|
-
};
|
|
5
|
-
export declare const useRectangeSelectionBox: ({ editor, root, }: RectangeSelectionProps) => RectangeSelectionReturn;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/SelectionBox/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAkCrF,KAAK,uBAAuB,GAAG,sBAAsB,GAAG;IACtD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAIF,eAAO,MAAM,uBAAuB,sBAGjC,sBAAsB,KAAG,uBAwG3B,CAAC"}
|