@ones-editor/editor 2.8.37-beta.2 → 2.8.37-beta.21
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/@ones-editor/core/src/core/selection/range/simple-range.d.ts +2 -2
- package/@ones-editor/core/src/core/types.d.ts +2 -0
- package/@ones-editor/main-toolbar/src/index.d.ts +1 -0
- package/@ones-editor/main-toolbar/src/items/comment.d.ts +1 -0
- package/@ones-editor/main-toolbar/src/items/file.d.ts +8 -0
- package/@ones-editor/main-toolbar/src/items/index.d.ts +3 -2
- package/@ones-editor/main-toolbar/src/locale/en-us.d.ts +2 -0
- package/@ones-editor/main-toolbar/src/locale/ja-jp.d.ts +2 -0
- package/@ones-editor/main-toolbar/src/locale/zh-cn.d.ts +2 -0
- package/@ones-editor/main-toolbar/src/locale/zh-hant-hk.d.ts +2 -0
- package/@ones-editor/scroll-container/src/scroll-bar-handle.d.ts +1 -4
- package/@ones-editor/sharedb-doc/src/doc/auth-connection.d.ts +1 -0
- package/@ones-editor/sharedb-doc/src/doc/edit-status.d.ts +1 -1
- package/@ones-editor/sharedb-doc/src/doc/sharedb-doc.d.ts +1 -0
- package/@ones-editor/to-docx/src/index.d.ts +1 -0
- package/@ones-editor/to-docx/src/locale/en-us.d.ts +7 -0
- package/@ones-editor/to-docx/src/locale/index.d.ts +1 -0
- package/@ones-editor/to-docx/src/locale/ja-jp.d.ts +7 -0
- package/@ones-editor/to-docx/src/locale/zh-cn.d.ts +7 -0
- package/@ones-editor/to-docx/src/locale/zh-hant-hk.d.ts +7 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/icons/index.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +544 -349
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnesEditorDocRange } from '../../doc';
|
|
2
|
-
import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement, SimpleSelectionRange } from '../../types';
|
|
2
|
+
import { OnesEditor, SelectionRange, SelectedBlock, ContainerElement, SimpleSelectionRange, SimpleBlockPosition } from '../../types';
|
|
3
3
|
import { EditorSimpleBlockPosition } from '../editor-position';
|
|
4
4
|
interface SimpleRangeOptions {
|
|
5
5
|
anchor: EditorSimpleBlockPosition;
|
|
@@ -13,7 +13,7 @@ export default class EditorSimpleSelectionRange implements SelectionRange {
|
|
|
13
13
|
constructor(editor: OnesEditor, options: SimpleRangeOptions);
|
|
14
14
|
isCollapsed(): boolean;
|
|
15
15
|
isEqual(other: SelectionRange): boolean;
|
|
16
|
-
isSimple():
|
|
16
|
+
isSimple(): this is SimpleBlockPosition;
|
|
17
17
|
isReverse(): boolean;
|
|
18
18
|
getEditor(): OnesEditor;
|
|
19
19
|
get start(): EditorSimpleBlockPosition;
|
|
@@ -586,6 +586,8 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
586
586
|
getParentContainer: (block: BlockElement) => ContainerElement;
|
|
587
587
|
reloadBlock: (block: BlockElement) => void;
|
|
588
588
|
contains: (node: Node) => boolean;
|
|
589
|
+
scrollable: () => boolean;
|
|
590
|
+
setScrollable: (scrollable: boolean) => void;
|
|
589
591
|
getSelectedText: () => string;
|
|
590
592
|
clearSelectedContents: () => void;
|
|
591
593
|
insertBlock: (containerId: string, blockIndex: number, blockData: DocBlock, newRange?: OnesEditorDocRange, options?: InsertBlockOptions) => BlockElement;
|
|
@@ -14,6 +14,7 @@ export declare class MainToolbar implements OnesEditorCustom {
|
|
|
14
14
|
private options;
|
|
15
15
|
toolbar: FixedToolbar;
|
|
16
16
|
toolbarFullScreen?: FixedToolbar;
|
|
17
|
+
root: HTMLElement;
|
|
17
18
|
constructor(editor: OnesEditor, parent: HTMLElement, options?: MainToolbarOptions);
|
|
18
19
|
destroy(): void;
|
|
19
20
|
setItems(items: ToolbarItem[]): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ToolbarItem } from '../types';
|
|
3
|
+
export declare class InsertFileItem implements ToolbarItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
onClick(editor: OnesEditor, item: ToolbarItem): Promise<void>;
|
|
8
|
+
}
|
|
@@ -13,5 +13,6 @@ import { FindReplaceItem } from './find';
|
|
|
13
13
|
import { CommentItem } from './comment';
|
|
14
14
|
import { ColorItem } from './text-color';
|
|
15
15
|
import { MoreItem } from './more-item';
|
|
16
|
-
|
|
17
|
-
export
|
|
16
|
+
import { InsertFileItem } from './file';
|
|
17
|
+
export declare function getToolbarDefaultItems(editor: OnesEditor): (FontBoldItem | FontItalicItem | FontUnderlineItem | FontStrikethroughItem | InlineCodeItem | SuperscriptItem | SubscriptItem | InsertLinkItem | OrderedListItem | UnorderedListItem | CheckListItem | ParagraphItem | QuoteItem | SeparatorItem | AlignLeftItem | AlignCenterItem | AlignRightItem | UndoItem | RedoItem | InsertItem | FindReplaceItem | ColorItem)[];
|
|
18
|
+
export { UndoItem, RedoItem, FontBoldItem, FontItalicItem, FontUnderlineItem, FontStrikethroughItem, ColorItem, InlineCodeItem, SuperscriptItem, SubscriptItem, AlignLeftItem, AlignCenterItem, AlignRightItem, ParagraphItem, SeparatorItem, OrderedListItem, UnorderedListItem, CheckListItem, InsertImageItem, InsertFileItem, InsertLinkItem, QuoteItem, InsertItem, FindReplaceItem, CommentItem, MoreItem, };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/// <reference types="lodash" />
|
|
2
1
|
import { ScrollAreaElement, ScrollContainerElement, ScrollCore } from './common-types';
|
|
3
2
|
export declare function getScrollbarContainer(scrollContainer: ScrollContainerElement): HTMLDivElement;
|
|
4
|
-
declare
|
|
5
|
-
export declare const resetScrollbar: import("lodash").DebouncedFunc<typeof resetScrollbarCore>;
|
|
3
|
+
export declare const resetScrollbar: (scrollCore: ScrollCore, scrollWrap: ScrollAreaElement) => void | undefined;
|
|
6
4
|
export declare function calcScrollbarPos(scrollCore: ScrollCore, scrollContainer: ScrollContainerElement): void;
|
|
7
|
-
export {};
|
|
@@ -15,6 +15,7 @@ export interface AutoConnectionEvents {
|
|
|
15
15
|
writeConflictError: (error: Error) => void;
|
|
16
16
|
maxUsersError: () => void;
|
|
17
17
|
requestReloadError: (error: Error) => void;
|
|
18
|
+
opReceived: () => void;
|
|
18
19
|
ready: () => void;
|
|
19
20
|
}
|
|
20
21
|
export declare class AuthConnection extends TypedEmitter<AutoConnectionEvents> {
|
|
@@ -26,6 +26,7 @@ export default class ShareDBDoc extends EventCallbacks<ShareDBDocCallbacks> impl
|
|
|
26
26
|
private handleReload;
|
|
27
27
|
private handleReset;
|
|
28
28
|
private handleWriteConflictError;
|
|
29
|
+
private handleOpReceived;
|
|
29
30
|
private setStatus;
|
|
30
31
|
initEvents(): void;
|
|
31
32
|
clearEvents(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|