@ones-editor/editor 2.1.1-beta.50 → 2.1.1-beta.51
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/command-providers/commands/merge-commands.d.ts +1 -0
- package/@ones-editor/core/src/core/command-providers/editor-command-providers.d.ts +2 -1
- package/@ones-editor/input-handlers/src/i18n/en-us.d.ts +1 -0
- package/@ones-editor/input-handlers/src/i18n/ja-jp.d.ts +1 -0
- package/@ones-editor/input-handlers/src/i18n/zh-cn.d.ts +1 -0
- package/@ones-editor/list-block/src/index.d.ts +2 -1
- package/@ones-editor/mention/src/locale/en-us.d.ts +2 -0
- package/@ones-editor/mention/src/locale/ja-jp.d.ts +2 -0
- package/@ones-editor/mention/src/locale/zh-cn.d.ts +2 -0
- package/@ones-editor/mention/src/mention.d.ts +1 -0
- package/@ones-editor/mobile-helper/src/cursor-toolbar.d.ts +14 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert-menu.d.ts +1 -1
- package/@ones-editor/{ui/src → mobile-helper/src/fixed-toolbar}/providers/tab-provider.d.ts +1 -1
- package/@ones-editor/mobile-helper/src/index.d.ts +3 -0
- package/@ones-editor/mobile-helper/src/locale/en-us.d.ts +6 -0
- package/@ones-editor/mobile-helper/src/locale/index.d.ts +1 -0
- package/@ones-editor/mobile-helper/src/locale/ja-jp.d.ts +6 -0
- package/@ones-editor/mobile-helper/src/locale/zh-cn.d.ts +6 -0
- package/@ones-editor/table-block/src/locale/en-us.d.ts +5 -0
- package/@ones-editor/table-block/src/locale/ja-jp.d.ts +5 -0
- package/@ones-editor/table-block/src/locale/zh-cn.d.ts +5 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/box-helper/standard-box-commands.d.ts +10 -0
- package/@ones-editor/ui/src/box-helper/standard-box-provider.d.ts +9 -0
- package/@ones-editor/ui/src/index.d.ts +4 -2
- package/@ones-editor/ui/src/locale/en-us.d.ts +4 -0
- package/@ones-editor/ui/src/locale/ja-jp.d.ts +4 -0
- package/@ones-editor/ui/src/locale/zh-cn.d.ts +4 -0
- package/@ones-editor/ui/src/providers/clipboard-provider.d.ts +11 -2
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +1 -1
- package/@ones-editor/ui-base/src/command-bar/init-toolbar-item.d.ts +1 -0
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +1 -0
- package/@ones-editor/ui-base/src/icons/index.d.ts +5 -1
- package/@ones-editor/ui-base/src/mobile-command-bar/mobile-bottom-menu.d.ts +3 -2
- package/dist/index.js +2688 -2216
- package/package.json +1 -1
- package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/table-provider.d.ts +0 -9
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BlockElement, BoxCommands, BoxElement, CommandItem, OnesEditor, OnesEditorCommandProvider } from '../../../../@ones-editor/core';
|
|
2
|
+
export declare class StandardBoxCommands implements BoxCommands {
|
|
3
|
+
private editor;
|
|
4
|
+
group: string;
|
|
5
|
+
providers: OnesEditorCommandProvider[];
|
|
6
|
+
constructor(editor: OnesEditor);
|
|
7
|
+
get commands(): CommandItem[];
|
|
8
|
+
executeCommand(editor: OnesEditor, block: BlockElement, box: BoxElement, item: CommandItem): void;
|
|
9
|
+
static create(editor: OnesEditor): StandardBoxCommands;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange, CommandParams } from '../../../../@ones-editor/core';
|
|
2
|
+
export default class StandardBoxProvider implements OnesEditorCommandProvider {
|
|
3
|
+
private editor;
|
|
4
|
+
id: string;
|
|
5
|
+
constructor(editor: OnesEditor);
|
|
6
|
+
getAvailableCommands(editor: OnesEditor, blockElement: BlockElement, range: SelectionRange, params?: CommandParams): CommandItem[];
|
|
7
|
+
getInsertCommands: () => never[];
|
|
8
|
+
executeCommand(editor: OnesEditor, blockElement: BlockElement, range: SelectionRange, command: CommandItem): boolean;
|
|
9
|
+
}
|
|
@@ -23,7 +23,6 @@ import ParagraphProvider from './providers/paragraph';
|
|
|
23
23
|
import AlignProvider from './providers/align';
|
|
24
24
|
import { InlineBoxCommandProvider } from './providers/insert-box-provider';
|
|
25
25
|
import { LinkProvider } from './providers/link';
|
|
26
|
-
import TabProvider from './providers/tab-provider';
|
|
27
26
|
import InsertMenuProvider from './providers/insert-menu';
|
|
28
27
|
import { injectBlockOptions } from './providers/utils/inject-block-options';
|
|
29
28
|
import TextCommandProvider from './providers/text-command-provider';
|
|
@@ -34,7 +33,10 @@ import QuotedProvider from './providers/quoted';
|
|
|
34
33
|
import { ReadonlyToolbar } from './readonly-toolbar';
|
|
35
34
|
import { ReadonlyToolbarCommandProvider, ReadonlyCommandOptions } from './readonly-toolbar/types';
|
|
36
35
|
import { AddCommentToOldDocCommandProvider } from './readonly-toolbar/add-comment-to-old-doc';
|
|
37
|
-
|
|
36
|
+
import ClipboardProvider from './providers/clipboard-provider';
|
|
37
|
+
export * from './providers/utils/clipboard';
|
|
38
|
+
export * from './providers/utils';
|
|
39
|
+
export { ClipboardProvider, ListProvider, QuotedProvider, TextCommandProvider, injectBlockOptions, LinkProvider, InlineBoxCommandProvider, AlignProvider, ParagraphProvider, ProxyProvider, InlineCodeProvider, InlineStyleProvider, ColorStyleProvider, ScriptDropdownProvider, TextScriptProvider, HeadingProvider, MobileLinkProvider, InsertMenuProvider, };
|
|
38
40
|
export type { QuickMenuCommandParams, QuickMenuCommandProvider, QuickMenuCommandBetween, AddMenuCommand, QuickMenuCommandInline, OnesEditorToolbarBase, QuickMenuItem, QuickMenuOptions, ReadonlyToolbarCommandProvider, ReadonlyCommandOptions, };
|
|
39
41
|
export { BlockMenu, BlockCommandProviders, OnesEditorToolbar, OnesEditorQuickMenu, OnesEditorTooltip, editLink, TextStyleShortcuts, getToolbar, BasicCommands, isSelectBoxOnly, getReferenceClientRect, ReadonlyToolbar, AddCommentToOldDocCommandProvider, };
|
|
40
42
|
export * from './utils/hide-toolbar';
|
|
@@ -25,6 +25,7 @@ declare const _default: {
|
|
|
25
25
|
edit: string;
|
|
26
26
|
remove: string;
|
|
27
27
|
title: string;
|
|
28
|
+
openLink: string;
|
|
28
29
|
};
|
|
29
30
|
commands: {
|
|
30
31
|
unordered: string;
|
|
@@ -39,6 +40,9 @@ declare const _default: {
|
|
|
39
40
|
heading: string;
|
|
40
41
|
headingGroup: string;
|
|
41
42
|
text: string;
|
|
43
|
+
paste: string;
|
|
44
|
+
tab: string;
|
|
45
|
+
shiftTab: string;
|
|
42
46
|
};
|
|
43
47
|
};
|
|
44
48
|
export default _default;
|
|
@@ -25,6 +25,7 @@ declare const _default: {
|
|
|
25
25
|
edit: string;
|
|
26
26
|
remove: string;
|
|
27
27
|
title: string;
|
|
28
|
+
openLink: string;
|
|
28
29
|
};
|
|
29
30
|
commands: {
|
|
30
31
|
unordered: string;
|
|
@@ -39,6 +40,9 @@ declare const _default: {
|
|
|
39
40
|
heading: string;
|
|
40
41
|
headingGroup: string;
|
|
41
42
|
text: string;
|
|
43
|
+
paste: string;
|
|
44
|
+
tab: string;
|
|
45
|
+
shiftTab: string;
|
|
42
46
|
};
|
|
43
47
|
};
|
|
44
48
|
export default _default;
|
|
@@ -25,6 +25,7 @@ declare const _default: {
|
|
|
25
25
|
edit: string;
|
|
26
26
|
remove: string;
|
|
27
27
|
title: string;
|
|
28
|
+
openLink: string;
|
|
28
29
|
};
|
|
29
30
|
commands: {
|
|
30
31
|
unordered: string;
|
|
@@ -39,6 +40,9 @@ declare const _default: {
|
|
|
39
40
|
heading: string;
|
|
40
41
|
headingGroup: string;
|
|
41
42
|
text: string;
|
|
43
|
+
paste: string;
|
|
44
|
+
tab: string;
|
|
45
|
+
shiftTab: string;
|
|
42
46
|
};
|
|
43
47
|
};
|
|
44
48
|
export default _default;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { BlockElement, CommandItem, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../@ones-editor/core';
|
|
2
2
|
export default class ClipboardProvider implements OnesEditorCommandProvider {
|
|
3
3
|
private editor;
|
|
4
|
+
private options;
|
|
4
5
|
id: string;
|
|
5
|
-
constructor(editor: OnesEditor
|
|
6
|
-
|
|
6
|
+
constructor(editor: OnesEditor, options: {
|
|
7
|
+
withPaste: boolean;
|
|
8
|
+
});
|
|
9
|
+
private clipboardPermission;
|
|
10
|
+
private isSecureContext;
|
|
11
|
+
get hasClipboardReadPermission(): boolean;
|
|
12
|
+
get hasClipboardWritePermission(): boolean;
|
|
13
|
+
clipboardSupport(): void;
|
|
14
|
+
canPaste(): boolean;
|
|
15
|
+
getAvailableCommands: (editor: OnesEditor, blockElement: BlockElement) => CommandItem[];
|
|
7
16
|
getInsertCommands: () => never[];
|
|
8
17
|
copyRange(editor: OnesEditor, range: SelectionRange): void;
|
|
9
18
|
executeCommand(editor: OnesEditor, block: BlockElement, range: SelectionRange, command: CommandItem): boolean;
|
|
@@ -43,7 +43,7 @@ declare class OnesEditorAutoSuggest implements OnesEditorInputHandler {
|
|
|
43
43
|
handleUpdateCompositionText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, end: boolean): boolean;
|
|
44
44
|
handleSelectionChanged: (editor: OnesEditor) => void;
|
|
45
45
|
private resetItems;
|
|
46
|
-
|
|
46
|
+
deleteTrigger: () => boolean;
|
|
47
47
|
private onClose;
|
|
48
48
|
private onShow;
|
|
49
49
|
private onClickItem;
|
|
@@ -2,5 +2,6 @@ import { CommandItem } from '../../../../@ones-editor/core';
|
|
|
2
2
|
import { CommandItemElement } from './types';
|
|
3
3
|
export type InitToolbarItemOptions = {
|
|
4
4
|
tooltipId?: string;
|
|
5
|
+
showName?: boolean;
|
|
5
6
|
};
|
|
6
7
|
export declare function initToolbarItem(item: CommandItem, elem: CommandItemElement, options: InitToolbarItemOptions): void;
|
|
@@ -64,6 +64,7 @@ export interface CommandBarOptions {
|
|
|
64
64
|
footer?: HTMLElement | (() => HTMLElement | null);
|
|
65
65
|
padding?: number;
|
|
66
66
|
beforeClose?: (event?: MouseEvent | TouchEvent) => boolean;
|
|
67
|
+
showName?: boolean;
|
|
67
68
|
}
|
|
68
69
|
export type CreateManualCommandBarFunction = (parentItem: CommandItem, closeable: Closeable, options?: CommandBarOptions) => AbstractManualCommandBar;
|
|
69
70
|
export type PopoverOptions = {
|
|
@@ -120,4 +120,8 @@ import SymbolIcon from './symbol.svg?raw';
|
|
|
120
120
|
import TreeIcon from './tree.svg?raw';
|
|
121
121
|
import TimeIcon from './time.svg?raw';
|
|
122
122
|
import SearchIcon from './search.svg?raw';
|
|
123
|
-
|
|
123
|
+
import TextGroupIcon from './text-group.svg?raw';
|
|
124
|
+
import TabIcon from './tab.svg?raw';
|
|
125
|
+
import ShiftTabIcon from './shift-tab.svg?raw';
|
|
126
|
+
import TableEditIcon from './table-edit.svg?raw';
|
|
127
|
+
export { TableEditIcon, TabIcon, ShiftTabIcon, DownloadIcon, AddEmojiIcon, BallIcon, CardIcon, FoodIcon, LightIcon, SmileIcon, SymbolIcon, TreeIcon, TimeIcon, ClearIcon, CloseIcon, PrevIcon, NextIcon, MoreIcon, TextColorIcon, AddIcon, ArrowDownIcon, ArrowUpIcon, ArrowLeftIcon, ArrowRightIcon, DeleteRowIcon, DeleteColIcon, MergeCellIcon, SplitCellIcon, DeleteTableIcon, Heading1Icon, Heading2Icon, Heading3Icon, Heading4Icon, Heading5Icon, Heading6Icon, Heading7Icon, Heading8Icon, HeadingNIcon, OrderedListIcon, UnorderedListIcon, CheckListIcon, BlockquoteIcon, AlignCenterIcon, AlignLeftIcon, AlignRightIcon, ImageIcon, ImageMenuIcon, ImageErrorIcon, ImageEmptyIcon, LinkIcon, LinkOffIcon, WarningIcon, PasteSpecialIcon, LaunchIcon, CodeIcon, LayoutIcon, AudioIcon, GraphIcon, VideoIcon, FileIcon, MathIcon, MathMenuIcon, TableIcon, TableMenuIcon, BilibiliIcon, YoukuIcon, ModaoIcon, FigmaIcon, EditIcon, CommentIcon, RefreshIcon, HelpIcon, CheckMarkIcon, TextIcon, RightArrowIcon, TencentVideoIcon, WebPageIcon, UmlIcon, DividingLineIcon, HeadingH1Icon, HeadingH2Icon, HeadingH3Icon, HeadingH4Icon, HeadingH5Icon, HeadingH6Icon, HeadingH7Icon, HeadingH8Icon, CheckboxIcon, QuoteIcon, LinkHrefIcon, OrderedIcon, UnorderedIcon, CopyIcon, CutIcon, DeleteIcon, LockBlockIcon, UnLockBlockIcon, InsertBeforeIcon, InsertAfterIcon, MentionIcon, CircleAddIcon, LoadingIcon, DragIcon, UmlBrandIcon, OnesLoadingIcon, BoldIcon, ItalicIcon, UnderlineIcon, LineThroughIcon, SubscriptIcon, SuperscriptIcon, InlineCodeIcon, ToMindMapIcon, FitIcon, FullScreenIcon, ExitFullScreenIcon, CaretDownIcon, StatusIcon, AlertEmojiIcon, ForbiddenIcon, WarningFilledIcon, InformationFilledIcon, SearchIcon, CalloutIcon, LoadingCircleIcon, TextGroupIcon, };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { CloseReason, CommandItem } from '../../../../@ones-editor/core';
|
|
1
|
+
import { Closeable, CloseReason, CommandItem } from '../../../../@ones-editor/core';
|
|
2
2
|
import { Instance } from 'tippy.js';
|
|
3
3
|
import './mobile-bottom-menu.scss';
|
|
4
|
-
import { AbstractManualCommandBar, CommandBar, CommandBarContentElement, CommandItemElement, ManualShowCommandBarOptions } from '../command-bar';
|
|
4
|
+
import { AbstractManualCommandBar, CommandBar, CommandBarContentElement, CommandBarOptions, CommandItemElement, ManualShowCommandBarOptions } from '../command-bar';
|
|
5
5
|
declare class MobileBottomMenu extends CommandBar implements AbstractManualCommandBar {
|
|
6
6
|
tippyInstance: Instance | null;
|
|
7
|
+
constructor(items: CommandItem[], closeable?: Closeable, options?: CommandBarOptions);
|
|
7
8
|
createContentWithHeader: () => HTMLDivElement;
|
|
8
9
|
handleClose: () => void;
|
|
9
10
|
oldActiveElement: HTMLElement | null;
|