lakelib 0.1.22 → 0.1.23
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 +4 -4
- package/dist/lake.css +45 -36
- package/dist/lake.min.js +37 -29
- package/dist/lake.min.js.map +1 -1
- package/lib/lake.css +45 -36
- package/lib/lake.js +924 -227
- package/lib/lake.js.map +1 -1
- package/lib/types/boxes/code-block.d.ts +2 -1
- package/lib/types/boxes/emoji.d.ts +2 -1
- package/lib/types/boxes/equation.d.ts +2 -1
- package/lib/types/boxes/file.d.ts +2 -1
- package/lib/types/boxes/hr.d.ts +2 -1
- package/lib/types/boxes/image.d.ts +2 -1
- package/lib/types/boxes/video.d.ts +2 -1
- package/lib/types/config/slash-items.d.ts +2 -0
- package/lib/types/css/index.d.ts +1 -1
- package/lib/types/editor.d.ts +2 -0
- package/lib/types/i18n/en-US/index.d.ts +36 -0
- package/lib/types/i18n/ja/index.d.ts +36 -0
- package/lib/types/i18n/ko/index.d.ts +36 -0
- package/lib/types/i18n/types.d.ts +278 -2
- package/lib/types/i18n/zh-CN/index.d.ts +36 -0
- package/lib/types/index.d.ts +3 -2
- package/lib/types/managers/keystroke.d.ts +0 -1
- package/lib/types/managers/plugin.d.ts +4 -5
- package/lib/types/managers/selection.d.ts +1 -1
- package/lib/types/models/box.d.ts +1 -1
- package/lib/types/models/nodes.d.ts +2 -0
- package/lib/types/plugins/slash.d.ts +3 -0
- package/lib/types/types/plugin.d.ts +3 -0
- package/lib/types/types/{commands.d.ts → slash.d.ts} +4 -4
- package/lib/types/ui/box-toolbar.d.ts +2 -1
- package/lib/types/ui/dropdown.d.ts +1 -0
- package/lib/types/ui/link-popup.d.ts +2 -3
- package/lib/types/ui/slash-popup.d.ts +34 -0
- package/lib/types/ui/toolbar.d.ts +5 -3
- package/lib/types/utils/index.d.ts +2 -1
- package/lib/types/utils/{node-and-view.d.ts → node-position.d.ts} +1 -1
- package/lib/types/utils/scroll-to-node.d.ts +2 -0
- package/package.json +1 -1
- package/lib/types/ui/commands-popup.d.ts +0 -24
|
@@ -19,10 +19,9 @@ export declare class LinkPopup {
|
|
|
19
19
|
private appendOpenButton;
|
|
20
20
|
private appendSaveButton;
|
|
21
21
|
private appendUnlinkButton;
|
|
22
|
-
|
|
23
|
-
setInputValue(name: string, value: string): void;
|
|
22
|
+
get visible(): boolean;
|
|
24
23
|
save(): void;
|
|
25
|
-
|
|
24
|
+
position(): void;
|
|
26
25
|
render(): void;
|
|
27
26
|
show(linkNode: Nodes): void;
|
|
28
27
|
hide(): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Editor } from '../editor';
|
|
2
|
+
import { SlashItem } from '../types/slash';
|
|
3
|
+
import { Nodes } from '../models/nodes';
|
|
4
|
+
import { Range } from '../models/range';
|
|
5
|
+
type SlashPopupConfig = {
|
|
6
|
+
editor: Editor;
|
|
7
|
+
items: (string | SlashItem)[];
|
|
8
|
+
};
|
|
9
|
+
export declare class SlashPopup {
|
|
10
|
+
private editor;
|
|
11
|
+
private items;
|
|
12
|
+
private root;
|
|
13
|
+
private range;
|
|
14
|
+
private noMouseEvent;
|
|
15
|
+
private keyword;
|
|
16
|
+
container: Nodes;
|
|
17
|
+
constructor(config: SlashPopupConfig);
|
|
18
|
+
private getItem;
|
|
19
|
+
private emptyBlock;
|
|
20
|
+
private appendItem;
|
|
21
|
+
private keydownListener;
|
|
22
|
+
private clickListener;
|
|
23
|
+
private scrollListener;
|
|
24
|
+
private resizeListener;
|
|
25
|
+
get visible(): boolean;
|
|
26
|
+
search(keyword: string): (string | SlashItem)[];
|
|
27
|
+
position(): void;
|
|
28
|
+
render(): void;
|
|
29
|
+
update(keyword?: string | null): void;
|
|
30
|
+
show(range: Range, keyword?: string): void;
|
|
31
|
+
hide(): void;
|
|
32
|
+
unmount(): void;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -9,19 +9,21 @@ type ToolbarConfig = {
|
|
|
9
9
|
placement?: ToolbarPlacement;
|
|
10
10
|
};
|
|
11
11
|
export declare class Toolbar {
|
|
12
|
-
|
|
12
|
+
root: Nodes;
|
|
13
13
|
private items;
|
|
14
14
|
private placement;
|
|
15
15
|
private allMenuMap;
|
|
16
16
|
private buttonItemList;
|
|
17
17
|
private dropdownItemList;
|
|
18
|
+
private dropdownList;
|
|
18
19
|
container: Nodes;
|
|
19
20
|
constructor(config: ToolbarConfig);
|
|
20
21
|
private appendDivider;
|
|
21
|
-
private
|
|
22
|
+
private appendNormalButton;
|
|
22
23
|
private appendDropdown;
|
|
23
|
-
private
|
|
24
|
+
private appendUploadButton;
|
|
24
25
|
updateState(state: SelectionState): void;
|
|
25
26
|
render(editor: Editor): void;
|
|
27
|
+
unmount(): void;
|
|
26
28
|
}
|
|
27
29
|
export {};
|
|
@@ -25,7 +25,8 @@ export * from './append-break';
|
|
|
25
25
|
export * from './remove-break';
|
|
26
26
|
export * from './set-block-indent';
|
|
27
27
|
export * from './morph';
|
|
28
|
-
export * from './node-
|
|
28
|
+
export * from './node-position';
|
|
29
|
+
export * from './scroll-to-node';
|
|
29
30
|
export * from './get-box';
|
|
30
31
|
export * from './request';
|
|
31
32
|
export * from './upload-file';
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Editor } from '../editor';
|
|
2
|
-
import { TranslationFunctions } from '../i18n/types';
|
|
3
|
-
import { CommandItem } from '../types/commands';
|
|
4
|
-
import { Nodes } from '../models/nodes';
|
|
5
|
-
import { Range } from '../models/range';
|
|
6
|
-
type CommandsPopupConfig = {
|
|
7
|
-
editor: Editor;
|
|
8
|
-
locale?: TranslationFunctions;
|
|
9
|
-
items?: (string | CommandItem)[];
|
|
10
|
-
};
|
|
11
|
-
export declare class CommandsPopup {
|
|
12
|
-
private editor;
|
|
13
|
-
private items;
|
|
14
|
-
private root;
|
|
15
|
-
private range;
|
|
16
|
-
container: Nodes;
|
|
17
|
-
constructor(config: CommandsPopupConfig);
|
|
18
|
-
private appendButton;
|
|
19
|
-
updatePosition(): void;
|
|
20
|
-
render(): void;
|
|
21
|
-
show(range: Range): void;
|
|
22
|
-
hide(): void;
|
|
23
|
-
}
|
|
24
|
-
export {};
|