@ones-editor/editor 2.1.8-beta.1 → 2.1.9
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/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -2
- package/@ones-editor/ui/src/tooltips/index.d.ts +9 -21
- package/@ones-editor/versions/src/constant/index.d.ts +0 -1
- package/@ones-editor/versions/src/history-render/index.d.ts +1 -1
- package/@ones-editor/versions/src/version-dialog/index.d.ts +0 -1
- package/dist/index.js +179 -340
- package/package.json +1 -1
- package/@ones-editor/versions/src/history-tooltip/index.d.ts +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './style.scss';
|
|
2
2
|
import OnesEditorToolbar from './toolbar/toolbar-handler';
|
|
3
3
|
import OnesEditorQuickMenu, { getAllQuickMenuItems, getHeadingMenuOptions, QuickMenuCommandBetween, QuickMenuCommandInline, QuickMenuCommandProvider, BasicCommands, GetAllQuickMenuItemsOptions, QuickMenuCommandParams, AddMenuCommand, QuickMenuItemFilter } from './quick-menu';
|
|
4
|
-
import OnesEditorTooltip
|
|
4
|
+
import OnesEditorTooltip from './tooltips';
|
|
5
5
|
import TextStyleShortcuts from './shortcuts';
|
|
6
6
|
import { editLink } from './link-popup';
|
|
7
7
|
import { getToolbar } from './toolbar/helper';
|
|
@@ -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 { QuickMenuItemFilter, QuickMenuCommandParams, QuickMenuCommandProvider, QuickMenuCommandBetween, AddMenuCommand, QuickMenuCommandInline, GetAllQuickMenuItemsOptions, OnesEditorToolbarBase,
|
|
15
|
+
export type { QuickMenuItemFilter, 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,27 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
onBeforeShow?: (instance: EditorTooltipTippyInstance) => void;
|
|
5
|
-
};
|
|
6
|
-
export type EditorTooltipTippyInstance = DelegateInstance;
|
|
7
|
-
export type OnesEditorTooltipProps = Omit<Parameters<typeof delegate>[1], 'onShow' | 'content' | 'onShown' | 'onHide' | 'target'>;
|
|
8
|
-
type DelegateProps = OnesEditorTooltipProps & {
|
|
9
|
-
attributeNames: string[];
|
|
10
|
-
};
|
|
11
|
-
type OnesEditorTooltipOptions = {
|
|
12
|
-
onBeforeTooltipInitialize?: (props: Partial<DelegateProps>) => DelegateProps;
|
|
13
|
-
};
|
|
14
|
-
export default class OnesEditorTooltip extends EventCallbacks<OnesEditorTooltipCallbacks> {
|
|
1
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import { Instance } from 'tippy.js';
|
|
3
|
+
export default class OnesEditorTooltip {
|
|
15
4
|
private editor;
|
|
16
|
-
instance:
|
|
5
|
+
instance: Instance;
|
|
17
6
|
mousedown: boolean;
|
|
18
|
-
currentInstance:
|
|
19
|
-
|
|
7
|
+
currentInstance: Instance | null;
|
|
8
|
+
attributeName: string[];
|
|
20
9
|
attributeDesc: string;
|
|
21
10
|
private _lastClickButtonId;
|
|
22
11
|
private observer;
|
|
23
12
|
private observerCallback;
|
|
24
|
-
constructor(editor: OnesEditor
|
|
13
|
+
constructor(editor: OnesEditor);
|
|
25
14
|
set lastClickButtonId(value: string);
|
|
26
15
|
createContent: (reference: Element) => string | HTMLDivElement;
|
|
27
16
|
visible(): boolean | undefined;
|
|
@@ -31,9 +20,9 @@ export default class OnesEditorTooltip extends EventCallbacks<OnesEditorTooltipC
|
|
|
31
20
|
private destroyObserver;
|
|
32
21
|
handleDocumentMouseDown: () => void;
|
|
33
22
|
handleDocumentMouseUp: () => void;
|
|
34
|
-
handleShown: (a:
|
|
23
|
+
handleShown: (a: Instance) => void;
|
|
35
24
|
handleHidden: () => void;
|
|
36
|
-
handleShow: (instance:
|
|
25
|
+
handleShow: (instance: Instance) => boolean;
|
|
37
26
|
private fixContainerForFullscreen;
|
|
38
27
|
}
|
|
39
28
|
declare global {
|
|
@@ -41,4 +30,3 @@ declare global {
|
|
|
41
30
|
isDragging?: boolean;
|
|
42
31
|
}
|
|
43
32
|
}
|
|
44
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BlockElement, BlockPath, DocBlock, DocBlockTextAttributes, OnesEditor, OnesEditorBlockRenderer, OnesEditorBlockRenderResult } from '../../../../@ones-editor/core';
|
|
2
2
|
export default class OnesEditorHistoryRender implements OnesEditorBlockRenderer {
|
|
3
3
|
renderBox(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
|
|
4
4
|
renderText(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
|
|
@@ -12,7 +12,6 @@ export declare class OnesEditorVersionsDialog implements OnesEditorCustom {
|
|
|
12
12
|
get versionHelper(): import("@ones-editor/core").OnesEditorDocVersionHelper;
|
|
13
13
|
get editor(): OnesEditor | null;
|
|
14
14
|
constructor(server: OnesEditorDocServer, provider: OnesEditorVersionsProvider);
|
|
15
|
-
private handleBeforeShowTooltip;
|
|
16
15
|
private handleRevert;
|
|
17
16
|
private handleSelectVersion;
|
|
18
17
|
private handleCompareWithVersion;
|