edytor 0.0.7 → 0.0.8
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 +225 -5
- package/dist/block/block.svelte.d.ts +123 -0
- package/dist/block/block.svelte.js +430 -0
- package/dist/block/block.utils.d.ts +82 -0
- package/dist/block/block.utils.js +499 -0
- package/dist/block/content.svelte.d.ts +14 -0
- package/dist/block/content.svelte.js +40 -0
- package/dist/block/inlineBlock.svelte.d.ts +30 -0
- package/dist/block/inlineBlock.svelte.js +53 -0
- package/dist/components/Block.svelte +27 -0
- package/dist/components/Block.svelte.d.ts +7 -0
- package/dist/components/Content.svelte +44 -0
- package/dist/components/Content.svelte.d.ts +7 -0
- package/dist/components/Edytor.svelte +165 -0
- package/dist/components/Edytor.svelte.d.ts +33 -0
- package/dist/components/InlineBlock.svelte +17 -0
- package/dist/components/InlineBlock.svelte.d.ts +7 -0
- package/dist/components/Mark.svelte +38 -0
- package/dist/components/Mark.svelte.d.ts +11 -0
- package/dist/components/ReadonlyEditor.svelte +46 -0
- package/dist/components/ReadonlyEditor.svelte.d.ts +4 -0
- package/dist/components/Text.svelte +37 -0
- package/dist/components/Text.svelte.d.ts +7 -0
- package/dist/components/readonlyElements.svelte.d.ts +82 -0
- package/dist/components/readonlyElements.svelte.js +144 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +4 -0
- package/dist/dnd.svelte.d.ts +17 -0
- package/dist/dnd.svelte.js +125 -0
- package/dist/edytor.svelte.d.ts +94 -0
- package/dist/edytor.svelte.js +262 -0
- package/dist/edytor.utils.d.ts +3 -0
- package/dist/edytor.utils.js +78 -0
- package/dist/events/onBeforeInput.d.ts +2 -2
- package/dist/events/onBeforeInput.js +338 -0
- package/dist/events/onKeyDown.d.ts +2 -69
- package/dist/events/onKeyDown.js +18 -0
- package/dist/hotkeys.d.ts +27 -0
- package/dist/hotkeys.js +282 -0
- package/dist/index.d.ts +1 -5
- package/dist/index.js +2 -8
- package/dist/localProvider.d.ts +82 -0
- package/dist/localProvider.js +267 -0
- package/dist/plugins/arrowMove/arrowMove.d.ts +2 -0
- package/dist/plugins/arrowMove/arrowMove.js +66 -0
- package/dist/plugins/code/CodePlugin.svelte +218 -0
- package/dist/plugins/code/CodePlugin.svelte.d.ts +23 -0
- package/dist/plugins/code/prism.css +141 -0
- package/dist/plugins/image/ImagePlugin.svelte +22 -0
- package/dist/plugins/image/ImagePlugin.svelte.d.ts +20 -0
- package/dist/plugins/mention/MentionPlugin.svelte +40 -0
- package/dist/plugins/mention/MentionPlugin.svelte.d.ts +20 -0
- package/dist/plugins/richtext/RichTextPlugin.svelte +241 -0
- package/dist/plugins/richtext/RichTextPlugin.svelte.d.ts +26 -0
- package/dist/plugins.d.ts +202 -0
- package/dist/plugins.js +19 -0
- package/dist/selection/selection.svelte.d.ts +68 -0
- package/dist/selection/selection.svelte.js +391 -0
- package/dist/selection/selection.utils.d.ts +14 -0
- package/dist/selection/selection.utils.js +153 -0
- package/dist/text/deltas.d.ts +11 -0
- package/dist/text/deltas.js +109 -0
- package/dist/text/text.svelte.d.ts +70 -0
- package/dist/text/text.svelte.js +119 -0
- package/dist/text/text.utils.d.ts +40 -0
- package/dist/text/text.utils.js +174 -0
- package/dist/utils/json.d.ts +32 -0
- package/dist/utils/json.js +2 -0
- package/dist/utils/jsx.d.ts +25 -0
- package/dist/utils/jsx.js +66 -0
- package/dist/utils/serialize.d.ts +1 -0
- package/dist/utils/serialize.js +1 -0
- package/dist/utils.d.ts +6 -0
- package/dist/utils.js +19 -0
- package/package.json +81 -33
- package/dist/edytor.cjs.development.js +0 -1762
- package/dist/edytor.cjs.development.js.map +0 -1
- package/dist/edytor.cjs.production.min.js +0 -2
- package/dist/edytor.cjs.production.min.js.map +0 -1
- package/dist/edytor.esm.js +0 -1691
- package/dist/edytor.esm.js.map +0 -1
- package/dist/events/index.d.ts +0 -3
- package/dist/events/onDrop.d.ts +0 -3
- package/dist/operations/deleteText.d.ts +0 -7
- package/dist/operations/formatText.d.ts +0 -20
- package/dist/operations/index.d.ts +0 -9
- package/dist/operations/insertText.d.ts +0 -5
- package/dist/operations/merge.d.ts +0 -3
- package/dist/operations/moveNode.d.ts +0 -12
- package/dist/operations/nestNode.d.ts +0 -2
- package/dist/operations/removeEmptyText.d.ts +0 -2
- package/dist/operations/splitLeaf.d.ts +0 -2
- package/dist/operations/splitNode.d.ts +0 -9
- package/dist/types.d.ts +0 -140
- package/dist/utils/common.d.ts +0 -17
- package/dist/utils/dropper.d.ts +0 -26
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/leaves.d.ts +0 -34
- package/dist/utils/nodes.d.ts +0 -14
- package/dist/utils/selection.d.ts +0 -51
- package/dist/utils/yClasses/EdytorDoc.d.ts +0 -16
- package/dist/utils/yClasses/index.d.ts +0 -3
- package/dist/utils/yClasses/yLeaf.d.ts +0 -7
- package/dist/utils/yClasses/yNode.d.ts +0 -12
- package/dist/yjs/index.d.ts +0 -1
- package/dist/yjs/wsProvider.d.ts +0 -1
- package/index.ts +0 -1
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Editor, Position, YLeaf } from "../types";
|
|
2
|
-
import { YNode } from ".";
|
|
3
|
-
export declare class EdytorSelection {
|
|
4
|
-
editor: Editor;
|
|
5
|
-
observers: ((selection: EdytorSelection) => void)[];
|
|
6
|
-
container: HTMLDivElement;
|
|
7
|
-
collaborationPosition: {
|
|
8
|
-
node: string;
|
|
9
|
-
leaf: string;
|
|
10
|
-
offset: number;
|
|
11
|
-
};
|
|
12
|
-
start: Position;
|
|
13
|
-
end: Position;
|
|
14
|
-
selectedText: string;
|
|
15
|
-
arePathsEquals: boolean;
|
|
16
|
-
editorOffset: number;
|
|
17
|
-
length: number;
|
|
18
|
-
range?: Range;
|
|
19
|
-
boundingRect?: DOMRect;
|
|
20
|
-
edges: {
|
|
21
|
-
startDocument: boolean;
|
|
22
|
-
endDocument: boolean;
|
|
23
|
-
startLeaf: boolean;
|
|
24
|
-
startNode: boolean;
|
|
25
|
-
endLeaf: boolean;
|
|
26
|
-
endNode: boolean;
|
|
27
|
-
};
|
|
28
|
-
selection?: Selection;
|
|
29
|
-
focused: boolean;
|
|
30
|
-
type?: "multinodes" | "collapsed" | "singlenode" | "multileaves" | "notInDoc";
|
|
31
|
-
constructor();
|
|
32
|
-
init: (editor: Editor, container: any) => void;
|
|
33
|
-
onFocus: () => void;
|
|
34
|
-
onBlur: () => void;
|
|
35
|
-
destroy: () => void;
|
|
36
|
-
onSelection: (e: any) => void;
|
|
37
|
-
observe: (observer: any) => void;
|
|
38
|
-
unobserve: (observer: any) => void;
|
|
39
|
-
getLeaf: (anchorNode: HTMLElement, current: "anchorNode" | "focusNode") => [YLeaf | undefined, YNode | undefined, number[], HTMLElement | undefined];
|
|
40
|
-
getNodeBoundingRect: (node: YNode) => {
|
|
41
|
-
nodeHtml: HTMLElement;
|
|
42
|
-
};
|
|
43
|
-
getRange: () => EdytorSelection;
|
|
44
|
-
onChange: () => void;
|
|
45
|
-
setPosition: (id: string, { offset, delta, end }: {
|
|
46
|
-
offset?: number;
|
|
47
|
-
delta?: number;
|
|
48
|
-
end?: number;
|
|
49
|
-
select?: boolean;
|
|
50
|
-
}) => void;
|
|
51
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Doc } from "yjs";
|
|
2
|
-
import { YNode } from ".";
|
|
3
|
-
export interface jsonLeaf extends Record<string, any> {
|
|
4
|
-
text: string;
|
|
5
|
-
data?: object;
|
|
6
|
-
}
|
|
7
|
-
export declare type jsonNode = {
|
|
8
|
-
type: string;
|
|
9
|
-
content?: jsonLeaf[];
|
|
10
|
-
data?: object;
|
|
11
|
-
children?: jsonNode[];
|
|
12
|
-
};
|
|
13
|
-
export declare const getChildren: ({ type, content, children, ...props }: jsonNode) => YNode;
|
|
14
|
-
export declare class EdytorDoc extends Doc {
|
|
15
|
-
}
|
|
16
|
-
export declare const DocFromJson: (value: jsonNode[], initialDoc?: Doc) => Doc;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Map } from "yjs";
|
|
2
|
-
import { YArray, YMap } from "yjs/dist/src/internals";
|
|
3
|
-
import { YLeaf } from "../../";
|
|
4
|
-
export declare type YNodeProps = {
|
|
5
|
-
data?: any;
|
|
6
|
-
content?: YLeaf[] | YArray<YLeaf>;
|
|
7
|
-
children?: YNode[] | YArray<YNode>;
|
|
8
|
-
id?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const createNode: (type: string, props?: YNodeProps) => YMap<any>;
|
|
11
|
-
export declare class YNode extends Map<any> {
|
|
12
|
-
}
|
package/dist/yjs/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./wsProvider";
|
package/dist/yjs/wsProvider.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const createWSProvider: (room?: any) => Promise<unknown>;
|
package/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src";
|