@ones-editor/editor 1.1.17-beta.5 → 1.1.17-beta.7
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/block-menu/src/block-menu/items/insert-block-items/index.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +1 -0
- package/@ones-editor/core/src/utils/file.d.ts +2 -1
- package/@ones-editor/input-handlers/src/enforce-with-document-title/types.d.ts +2 -0
- package/@ones-editor/templates/src/index.d.ts +2 -2
- package/@ones-editor/templates/src/templates/select-template.d.ts +4 -0
- package/@ones-editor/templates/src/templates/types.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -2
- package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +2 -1
- package/@ones-editor/ui/src/quick-menu/types.d.ts +1 -1
- package/@ones-editor/ui-base/src/command-bar/manual-menu.d.ts +1 -1
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +1 -0
- package/@ones-editor/ui-base/src/popup/popup.d.ts +1 -0
- package/@ones-editor/versions/src/types.d.ts +3 -1
- package/@ones-editor/versions/src/version-dialog/version-list.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +185 -185
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './style.scss';
|
|
2
2
|
import OnesEditorToolbar from './toolbar/toolbar-handler';
|
|
3
|
-
import OnesEditorQuickMenu, { getAllQuickMenuItems, getHeadingMenuOptions, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider, BasicCommands, GetAllQuickMenuItemsOptions, AddMenuCommand } from './quick-menu';
|
|
3
|
+
import OnesEditorQuickMenu, { getAllQuickMenuItems, getHeadingMenuOptions, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider, BasicCommands, GetAllQuickMenuItemsOptions, QuickMenuCommandParams, AddMenuCommand } from './quick-menu';
|
|
4
4
|
import OnesEditorTooltip from './tooltips';
|
|
5
5
|
import TextStyleShortcuts from './shortcuts';
|
|
6
6
|
import { editLink } from './link-popup';
|
|
@@ -12,7 +12,7 @@ import { InlineBoxCommandProvider } from './quick-menu/inline-box-items';
|
|
|
12
12
|
import './locale';
|
|
13
13
|
import type { OnesEditorToolbarBase } from './toolbar/types';
|
|
14
14
|
import type { QuickMenuItem } from './quick-menu';
|
|
15
|
-
export type { QuickMenuCommandProvider, QuickMenuCommandBetween, AddMenuCommand, QuickMenuCommandInline, GetAllQuickMenuItemsOptions, OnesEditorToolbarBase };
|
|
15
|
+
export type { QuickMenuCommandParams, QuickMenuCommandProvider, QuickMenuCommandBetween, AddMenuCommand, QuickMenuCommandInline, GetAllQuickMenuItemsOptions, OnesEditorToolbarBase };
|
|
16
16
|
export { OnesEditorToolbar, OnesEditorQuickMenu, OnesEditorTooltip, getAllQuickMenuItems, QuickMenuItem, editLink, TextStyleShortcuts, getToolbar, getHeadingMenuOptions, BasicCommands, GroupOrder, isSelectBoxOnly, InlineBoxCommandProvider, getReferenceClientRect, };
|
|
17
17
|
export { createTextButton } from './text-button';
|
|
18
18
|
export { mergeCommands } from './toolbar/merge-commands';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
-
import { QuickMenuItem } from './types';
|
|
2
|
+
import { QuickMenuCommandParams, QuickMenuItem } from './types';
|
|
3
3
|
export interface GetAllQuickMenuItemsOptions {
|
|
4
4
|
withPlainText: boolean;
|
|
5
|
+
from: QuickMenuCommandParams['from'];
|
|
5
6
|
}
|
|
6
7
|
export declare function getAllQuickMenuItems(editor: OnesEditor, options?: GetAllQuickMenuItemsOptions): QuickMenuItem[];
|
|
@@ -23,7 +23,7 @@ export interface QuickMenuCommandBetween extends QuickMenuCommandParams {
|
|
|
23
23
|
blockIndex: number;
|
|
24
24
|
}
|
|
25
25
|
export interface QuickMenuCommandProvider {
|
|
26
|
-
getCommands: (editor: OnesEditor) => CommandItem[];
|
|
26
|
+
getCommands: (editor: OnesEditor, params: QuickMenuCommandParams) => CommandItem[];
|
|
27
27
|
executeCommand: (editor: OnesEditor, item: CommandItem, params: QuickMenuCommandInline | QuickMenuCommandBetween | AddMenuCommand) => Promise<BlockElement | null>;
|
|
28
28
|
}
|
|
29
29
|
export interface QuickMenuOptions {
|
|
@@ -8,4 +8,4 @@ export default class ManualMenu extends ManualCommandBar {
|
|
|
8
8
|
protected initItemElement(item: CommandItem, elem: CommandItemElement): void;
|
|
9
9
|
}
|
|
10
10
|
declare function createManualMenu(parentItem: CommandItem, closeable: Closeable, options?: CommandBarOptions): ManualMenu;
|
|
11
|
-
export { createManualMenu
|
|
11
|
+
export { createManualMenu };
|
|
@@ -60,6 +60,7 @@ export interface CommandBarOptions {
|
|
|
60
60
|
header?: HTMLElement | (() => HTMLElement | null);
|
|
61
61
|
footer?: HTMLElement | (() => HTMLElement | null);
|
|
62
62
|
padding?: number;
|
|
63
|
+
beforeClose?: (event?: MouseEvent) => boolean;
|
|
63
64
|
}
|
|
64
65
|
export type CreateManualCommandBarFunction = (parentItem: CommandItem, closeable: Closeable, options?: CommandBarOptions) => AbstractManualCommandBar;
|
|
65
66
|
export type PopoverOptions = {
|
|
@@ -3,6 +3,7 @@ import ManualCommandBar from '../command-bar/manual-command-bar';
|
|
|
3
3
|
import { CommandBarContentElement, CommandItemElement } from '../command-bar/types';
|
|
4
4
|
export type PopupOptions = {
|
|
5
5
|
id?: string;
|
|
6
|
+
beforeClose?: (event?: MouseEvent) => boolean;
|
|
6
7
|
};
|
|
7
8
|
export default class Popup extends ManualCommandBar {
|
|
8
9
|
constructor(content: HTMLElement, options?: PopupOptions);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { OnesEditor, DocVersion, OnesEditorDocHistoryData, OnesEditorDoc } from '../../../@ones-editor/core';
|
|
1
|
+
import type { OnesEditor, DocVersion, OnesEditorDocHistoryData, OnesEditorDoc, OnesEditorBlockRenderer } from '../../../@ones-editor/core';
|
|
2
2
|
export interface VersionDialogOptions {
|
|
3
3
|
container: HTMLElement;
|
|
4
4
|
initSelectedVersion?: VersionNum;
|
|
5
5
|
useCreatedBy?: boolean;
|
|
6
6
|
enableEdit?: boolean;
|
|
7
|
+
textRenders?: OnesEditorBlockRenderer[];
|
|
7
8
|
getDisabledTip?: () => string | undefined;
|
|
8
9
|
onMemoChanged?: (version: DocVersion) => void;
|
|
9
10
|
onBeforeEditMemo?: () => Promise<boolean>;
|
|
@@ -12,6 +13,7 @@ export interface VersionDialogOptions {
|
|
|
12
13
|
onWillChangeVersion?: (sender: unknown, version: DocVersion) => void;
|
|
13
14
|
onVersionChanged?: (sender: unknown, versionEditor: OnesEditor, version: DocVersion) => void;
|
|
14
15
|
onVersionsLoaded?: (sender: unknown, versions: DocVersion[]) => void;
|
|
16
|
+
decorateItem?: (item: HTMLElement, ver: DocVersion) => void;
|
|
15
17
|
}
|
|
16
18
|
export type VersionNum = number | string;
|
|
17
19
|
export interface PlayOptions {
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export * from '../@ones-editor/misc';
|
|
|
15
15
|
export * from '../@ones-editor/versions';
|
|
16
16
|
export * from '../@ones-editor/misc';
|
|
17
17
|
export * from '../@ones-editor/block-locker';
|
|
18
|
-
export { Popup, ManualMenu, OnesEditorAutoSuggest, tippy, ManualToolbar, ManualCloseDialog, TextColorItem } from '../@ones-editor/ui-base';
|
|
18
|
+
export { Popup, ManualMenu, OnesEditorAutoSuggest, tippy, ManualToolbar, ManualCloseDialog, TextColorItem, } from '../@ones-editor/ui-base';
|
|
19
19
|
export * from '../@ones-editor/drawio-embed';
|
|
20
20
|
export * from '../@ones-editor/block-resizer';
|
|
21
21
|
export { editorAddComment } from '../@ones-editor/comments';
|