@ones-editor/editor 2.0.6-beta.4 → 2.0.7-beta.0
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/block-menu/src/block-menu-button/drag-preview/element-to-data-url.d.ts +1 -1
- package/@ones-editor/block-menu/src/block-menu-button/index.d.ts +15 -4
- package/@ones-editor/{layout-block → column-block}/package.json +1 -1
- package/@ones-editor/column-block/src/child-containers.d.ts +2 -0
- package/@ones-editor/column-block/src/columns-options.d.ts +2 -0
- package/@ones-editor/column-block/src/columns-properties.d.ts +15 -0
- package/@ones-editor/column-block/src/index.d.ts +4 -0
- package/@ones-editor/column-block/src/types.d.ts +11 -0
- package/@ones-editor/context-menu/src/locale/en-us.d.ts +1 -0
- package/@ones-editor/context-menu/src/locale/ja-jp.d.ts +1 -0
- package/@ones-editor/context-menu/src/locale/zh-cn.d.ts +1 -0
- package/@ones-editor/core/src/core/blocks/common/block-wrapper.d.ts +1 -2
- package/@ones-editor/core/src/core/blocks/common/insert-empty-block.d.ts +2 -3
- package/@ones-editor/core/src/core/blocks/embed-blocks/embed-block/common.d.ts +0 -1
- package/@ones-editor/core/src/core/composition/editor-input.d.ts +1 -1
- package/@ones-editor/core/src/core/containers/children.d.ts +2 -5
- package/@ones-editor/core/src/core/containers/element.d.ts +0 -1
- package/@ones-editor/core/src/core/doc/container.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/actions/insert-doc/insert-doc.d.ts +1 -1
- package/@ones-editor/core/src/core/editor-doc/handle-block-data-changed.d.ts +1 -2
- package/@ones-editor/core/src/core/selection/editor-selection.d.ts +3 -1
- package/@ones-editor/core/src/core/types.d.ts +9 -61
- package/@ones-editor/core/src/helper/hovering-block.d.ts +1 -3
- package/@ones-editor/core/src/i18n/en-us.d.ts +0 -1
- package/@ones-editor/core/src/i18n/i18n.d.ts +0 -3
- package/@ones-editor/core/src/i18n/ja-jp.d.ts +0 -1
- package/@ones-editor/core/src/i18n/zh-cn.d.ts +0 -1
- package/@ones-editor/core/src/utils/data-url.d.ts +0 -1
- package/@ones-editor/drop-target/src/drop-indicator.d.ts +2 -3
- package/@ones-editor/drop-target/src/drop-target.d.ts +1 -8
- package/@ones-editor/drop-target/src/find-drop-target.d.ts +1 -1
- package/@ones-editor/drop-target/src/index.d.ts +1 -3
- package/@ones-editor/find-dialog/src/shortcuts.d.ts +2 -0
- package/@ones-editor/graph-embed/src/helper/graph-base.d.ts +1 -1
- package/@ones-editor/graph-embed/src/helper/graph-block-commands.d.ts +1 -3
- package/@ones-editor/heading-collapse/src/heading-collapse-button/heading-utils.d.ts +1 -2
- package/@ones-editor/heading-collapse/src/index.d.ts +0 -1
- package/@ones-editor/image-embed/src/drag-drop/handle-drop-over.d.ts +4 -1
- package/@ones-editor/image-embed/src/drag-drop/handle-drop.d.ts +0 -1
- package/@ones-editor/image-embed/src/image-dom/download-image.d.ts +0 -2
- package/@ones-editor/image-embed/src/image-object.d.ts +0 -3
- package/@ones-editor/image-embed/src/index.d.ts +1 -5
- package/@ones-editor/image-embed/src/types.d.ts +0 -1
- package/@ones-editor/input-handlers/src/enforce-with-document-title/enforce-with-document-title-handler.d.ts +1 -0
- package/@ones-editor/input-handlers/src/enforce-with-document-title/placeholder.d.ts +1 -0
- package/@ones-editor/list-block/src/converter/selection-to-doc.d.ts +2 -0
- package/@ones-editor/misc/src/image.d.ts +1 -2
- package/@ones-editor/table-block/src/index.d.ts +0 -1
- package/@ones-editor/table-block/src/table-block/table-creator/index.d.ts +1 -1
- package/@ones-editor/to-docx/src/doc2other/colors.d.ts +1 -1
- package/@ones-editor/to-docx/src/doc2other/core.d.ts +0 -2
- package/@ones-editor/toc/src/build-toc.d.ts +0 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -2
- package/@ones-editor/ui/src/quick-menu/basic-menu-items.d.ts +1 -1
- package/@ones-editor/ui/src/quick-menu/index.d.ts +2 -9
- package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +2 -4
- package/@ones-editor/ui/src/quick-menu/types.d.ts +0 -5
- package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +0 -1
- package/@ones-editor/ui-base/src/color-palette/color-palette.d.ts +1 -2
- package/@ones-editor/ui-base/src/color-palette/create-palette.d.ts +0 -6
- package/@ones-editor/ui-base/src/color-palette/index.d.ts +2 -2
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +0 -1
- package/@ones-editor/ui-base/src/icons/index.d.ts +1 -10
- package/@ones-editor/ui-base/src/index.d.ts +0 -1
- package/@ones-editor/ui-base/src/input/create-input.d.ts +0 -1
- package/@ones-editor/ui-base/src/locale/en-us.d.ts +0 -16
- package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +0 -16
- package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +0 -16
- package/@ones-editor/versions/src/types.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +212 -251
- package/dist/types.d.ts +0 -2
- package/package.json +2 -2
- package/@ones-editor/block-menu/src/block-menu-button/menu-button/index.d.ts +0 -23
- package/@ones-editor/callout-block/package.json +0 -11
- package/@ones-editor/callout-block/src/callout-block/callout-block-content.d.ts +0 -3
- package/@ones-editor/callout-block/src/callout-block/callout-block-doc.d.ts +0 -2
- package/@ones-editor/callout-block/src/callout-block/callout-block.d.ts +0 -3
- package/@ones-editor/callout-block/src/callout-block/callout-drop-target-finder.d.ts +0 -10
- package/@ones-editor/callout-block/src/callout-block/callout-input-handler.d.ts +0 -9
- package/@ones-editor/callout-block/src/callout-block/callout-last-callout-payload.d.ts +0 -3
- package/@ones-editor/callout-block/src/callout-block/callout-options.d.ts +0 -2
- package/@ones-editor/callout-block/src/callout-block/callout-properties.d.ts +0 -2
- package/@ones-editor/callout-block/src/callout-block/callout-quick-menu-item-filter.d.ts +0 -8
- package/@ones-editor/callout-block/src/callout-block/command-items/bg-color-item.d.ts +0 -20
- package/@ones-editor/callout-block/src/callout-block/command-items/delete-icon-item.d.ts +0 -3
- package/@ones-editor/callout-block/src/callout-block/command-items/preset-item.d.ts +0 -10
- package/@ones-editor/callout-block/src/callout-block/covert-to.d.ts +0 -2
- package/@ones-editor/callout-block/src/callout-block/helper.d.ts +0 -2
- package/@ones-editor/callout-block/src/callout-block/index.d.ts +0 -1
- package/@ones-editor/callout-block/src/callout-block/types.d.ts +0 -9
- package/@ones-editor/callout-block/src/index.d.ts +0 -3
- package/@ones-editor/callout-block/src/locale/en-us.d.ts +0 -12
- package/@ones-editor/callout-block/src/locale/index.d.ts +0 -1
- package/@ones-editor/callout-block/src/locale/ja-jp.d.ts +0 -12
- package/@ones-editor/callout-block/src/locale/zh-cn.d.ts +0 -12
- package/@ones-editor/image-embed/src/hovering-toolbar/index.d.ts +0 -22
- package/@ones-editor/layout-block/src/block-drop.d.ts +0 -3
- package/@ones-editor/layout-block/src/caption.d.ts +0 -8
- package/@ones-editor/layout-block/src/child-containers.d.ts +0 -3
- package/@ones-editor/layout-block/src/column-resizer/index.d.ts +0 -2
- package/@ones-editor/layout-block/src/constants.d.ts +0 -32
- package/@ones-editor/layout-block/src/index.d.ts +0 -6
- package/@ones-editor/layout-block/src/layout-creator/index.d.ts +0 -27
- package/@ones-editor/layout-block/src/layout-operations.d.ts +0 -11
- package/@ones-editor/layout-block/src/locale/en-us.d.ts +0 -10
- package/@ones-editor/layout-block/src/locale/index.d.ts +0 -1
- package/@ones-editor/layout-block/src/locale/ja-jp.d.ts +0 -10
- package/@ones-editor/layout-block/src/locale/zh-cn.d.ts +0 -10
- package/@ones-editor/layout-block/src/options.d.ts +0 -2
- package/@ones-editor/layout-block/src/percent-bar.d.ts +0 -3
- package/@ones-editor/layout-block/src/selection.d.ts +0 -5
- package/@ones-editor/layout-block/src/toolbar.d.ts +0 -33
- package/@ones-editor/layout-block/src/types.d.ts +0 -17
- package/@ones-editor/layout-block/src/utils.d.ts +0 -6
- package/@ones-editor/media-embed/src/core/hovering-toolbar/index.d.ts +0 -22
- package/@ones-editor/to-docx/src/doc2other/layout.d.ts +0 -10
- package/@ones-editor/ui-base/src/emoji-item/emoji-item.d.ts +0 -18
- package/@ones-editor/ui-base/src/emoji-item/index.d.ts +0 -2
- package/@ones-editor/ui-base/src/emoji-palette/emoji-content.d.ts +0 -20
- package/@ones-editor/ui-base/src/emoji-palette/emoji-data.d.ts +0 -34
- package/@ones-editor/ui-base/src/emoji-palette/emoji-navigation.d.ts +0 -15
- package/@ones-editor/ui-base/src/emoji-palette/emoji-search.d.ts +0 -11
- package/@ones-editor/ui-base/src/emoji-palette/index.d.ts +0 -25
- package/@ones-editor/ui-base/src/emoji-palette/types.d.ts +0 -0
package/dist/types.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ import { CodeBlockExternalOptions } from '../@ones-editor/code-block';
|
|
|
15
15
|
import { MentionOptions } from '../@ones-editor/mention';
|
|
16
16
|
import { MathjaxOptions } from '../@ones-editor/mathjax';
|
|
17
17
|
import { LinkOptions } from '../@ones-editor/ui/src/link-popup';
|
|
18
|
-
import { EditorConfigLayoutOptions } from '../@ones-editor/layout-block/src/types';
|
|
19
18
|
export interface RemoteCaretsOptions {
|
|
20
19
|
onUserChanged?: (editor: OnesEditor, users: OnesEditorUser[]) => void;
|
|
21
20
|
}
|
|
@@ -41,7 +40,6 @@ export type EditorComponentOptions = {
|
|
|
41
40
|
code?: CodeBlockExternalOptions;
|
|
42
41
|
mathjax?: MathjaxOptions;
|
|
43
42
|
link?: LinkOptions;
|
|
44
|
-
columns?: EditorConfigLayoutOptions;
|
|
45
43
|
};
|
|
46
44
|
export type EditorEvents = {
|
|
47
45
|
onClickLink?: (editor: OnesEditor, event: MouseEvent, link: Element) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ones-editor/editor",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"marked": "^4.2.1",
|
|
39
39
|
"marked-extended-latex": "^1.1.0",
|
|
40
40
|
"markmap-common": "^0.15.0",
|
|
41
|
-
"markmap-view": "
|
|
41
|
+
"markmap-view": "0.15.4",
|
|
42
42
|
"mermaid": "^9.1.0",
|
|
43
43
|
"mime-db": "^1.52.0",
|
|
44
44
|
"nanoid": "^3.2.0",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BlockElement, OnesEditor } from '../../../../../@ones-editor/core';
|
|
2
|
-
import EmptyBlockMenu from '../../empty-block-menu';
|
|
3
|
-
import BlockMenu from '../../block-menu';
|
|
4
|
-
export default class OnesEditorBlockMenuButton {
|
|
5
|
-
private editor;
|
|
6
|
-
buttonElement: HTMLButtonElement;
|
|
7
|
-
emptyBlockMenu: EmptyBlockMenu;
|
|
8
|
-
blockMenu: BlockMenu;
|
|
9
|
-
private dragHandler;
|
|
10
|
-
constructor(editor: OnesEditor);
|
|
11
|
-
destroy(): void;
|
|
12
|
-
handleHoverBlock: (hoverBlock: BlockElement | null, oldBlock: BlockElement | null, target: EventTarget | null, oldTarget: EventTarget | null) => void;
|
|
13
|
-
showRootButton(hoverBlock: BlockElement): void;
|
|
14
|
-
showParentButton(hoverBlock: BlockElement): boolean;
|
|
15
|
-
removeParentButton: () => void;
|
|
16
|
-
addButtonToView(block: BlockElement): void;
|
|
17
|
-
handleButtonClick: () => void;
|
|
18
|
-
updatePlaceholder: (block: BlockElement) => void;
|
|
19
|
-
handleChanged: () => void;
|
|
20
|
-
createButton(): HTMLButtonElement;
|
|
21
|
-
setButtonType(type: 'move' | 'insert'): void;
|
|
22
|
-
updateButton(block: BlockElement): void;
|
|
23
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { OnesEditor, BlockPath, BlockElement } from '../../../../@ones-editor/core';
|
|
2
|
-
import type { DocCalloutBlockData } from './types';
|
|
3
|
-
export declare function createCalloutBlockContent(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocCalloutBlockData): import("@ones-editor/core").BlockContentElement;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DropTargetFinder } from '../../../../@ones-editor/drop-target';
|
|
2
|
-
import { BlockElement, OnesEditor } from '../../../../@ones-editor/core';
|
|
3
|
-
export declare class CalloutDropTargetFinder implements DropTargetFinder {
|
|
4
|
-
private editor;
|
|
5
|
-
constructor(editor: OnesEditor);
|
|
6
|
-
private checkBlockAllowToDrop;
|
|
7
|
-
finder(editor: OnesEditor, source: BlockElement | null, x: number, y: number): BlockElement | null;
|
|
8
|
-
destroy(): void;
|
|
9
|
-
static init(editor: OnesEditor): CalloutDropTargetFinder;
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { OnesEditorInputHandler, OnesEditor, OnesEditorCustom, DocObject } from '../../../../@ones-editor/core';
|
|
2
|
-
export declare class CalloutInputHandler implements OnesEditorInputHandler, OnesEditorCustom {
|
|
3
|
-
constructor(editor: OnesEditor);
|
|
4
|
-
private handleBackspaceEvent;
|
|
5
|
-
handleBeforeKeyDown(editor: OnesEditor, event: KeyboardEvent): boolean;
|
|
6
|
-
handleBeforePasteDoc(editor: OnesEditor, doc: DocObject): Promise<boolean>;
|
|
7
|
-
destroy(): void;
|
|
8
|
-
static init(editor: OnesEditor): void;
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
|
|
2
|
-
import type { QuickMenuItem, QuickMenuItemFilter } from '../../../../@ones-editor/ui';
|
|
3
|
-
export declare class CalloutQuickMenuItemFilter implements QuickMenuItemFilter, OnesEditorCustom {
|
|
4
|
-
constructor(editor: OnesEditor);
|
|
5
|
-
filter(editor: OnesEditor, items: QuickMenuItem[], from: string): QuickMenuItem[];
|
|
6
|
-
destroy(): void;
|
|
7
|
-
static init(editor: OnesEditor): CalloutQuickMenuItemFilter;
|
|
8
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BlockElement, CommandItem, OnesEditor, OnesEditorCustom } from '../../../../../@ones-editor/core';
|
|
2
|
-
import { ColorPaletteItem } from '../../../../../@ones-editor/ui-base';
|
|
3
|
-
export declare class BgColorItem implements CommandItem, OnesEditorCustom {
|
|
4
|
-
private editor;
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
manualShowChildren: boolean;
|
|
8
|
-
dropdown: boolean;
|
|
9
|
-
childrenPlacement: "bottom-start";
|
|
10
|
-
private bgColorButton;
|
|
11
|
-
bgColorPaletteItem: ColorPaletteItem;
|
|
12
|
-
element: HTMLButtonElement;
|
|
13
|
-
children: CommandItem[];
|
|
14
|
-
private constructor();
|
|
15
|
-
private createPaletteButton;
|
|
16
|
-
private getBgColorFromBlock;
|
|
17
|
-
updateItem(block: BlockElement): void;
|
|
18
|
-
destroy(): void;
|
|
19
|
-
static get(editor: OnesEditor): BgColorItem;
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BlockElement, CommandItem, OnesEditor } from '../../../../../@ones-editor/core';
|
|
2
|
-
export type PresetId = `preset-${0 | 1}`;
|
|
3
|
-
export declare function isPresetId(id: string): id is PresetId;
|
|
4
|
-
export declare function getPresetId(id: PresetId): string;
|
|
5
|
-
export declare function getPresetIcon(id: string): string;
|
|
6
|
-
export declare function getPresetPayload(presetId: PresetId): {
|
|
7
|
-
backgroundColor: number;
|
|
8
|
-
icon: "preset-0" | "preset-1";
|
|
9
|
-
};
|
|
10
|
-
export declare function createPresetItem(presetId: PresetId, editor: OnesEditor, block: BlockElement): CommandItem;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CalloutBlock } from './callout-block';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DocBlock } from '../../../../@ones-editor/core';
|
|
2
|
-
export type ColorId = number;
|
|
3
|
-
export interface DocCalloutBlockData extends DocBlock {
|
|
4
|
-
type: 'callout';
|
|
5
|
-
icon: string;
|
|
6
|
-
backgroundColor: ColorId;
|
|
7
|
-
children: string[];
|
|
8
|
-
}
|
|
9
|
-
export type CalloutBlockPayload = Pick<DocCalloutBlockData, 'icon' | 'backgroundColor'>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BlockCommands, BlockElement, CommandItem, OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
-
import type { CommandItemType } from '../../../../@ones-editor/core';
|
|
3
|
-
export default class ImageHoveringToolbarCommands implements BlockCommands {
|
|
4
|
-
protected editor: OnesEditor;
|
|
5
|
-
protected block: BlockElement;
|
|
6
|
-
group: string;
|
|
7
|
-
constructor(editor: OnesEditor, block: BlockElement);
|
|
8
|
-
_commands: ({
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
icon: string;
|
|
12
|
-
type?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
type: CommandItemType;
|
|
17
|
-
icon?: undefined;
|
|
18
|
-
})[];
|
|
19
|
-
private createIconItem;
|
|
20
|
-
get commands(): CommandItem[];
|
|
21
|
-
executeCommand(editor: OnesEditor, block: BlockElement, item: CommandItem): void;
|
|
22
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { OnesEditorInputHandler, OnesEditorCustom, OnesEditor, OnesEditorDocs } from '../../../@ones-editor/core';
|
|
2
|
-
export declare class LayoutBlockCaptionInputHandler implements OnesEditorInputHandler, OnesEditorCustom {
|
|
3
|
-
private editor;
|
|
4
|
-
private skipForRootContainer;
|
|
5
|
-
constructor(editor: OnesEditor, skipForRootContainer?: boolean);
|
|
6
|
-
destroy(): void;
|
|
7
|
-
handleBeforePaste(editor: OnesEditor, event: ClipboardEvent | null, docs: OnesEditorDocs): Promise<boolean>;
|
|
8
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { BlockElement, ContainerElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
-
export declare function getChildContainers(editor: OnesEditor, block: BlockElement, from?: string, to?: string): ContainerElement[];
|
|
3
|
-
export declare function getChildSeparators(block: BlockElement): HTMLElement[];
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 名称
|
|
3
|
-
*/
|
|
4
|
-
export declare const LAYOUT_NAME = "LayoutBlock";
|
|
5
|
-
/**
|
|
6
|
-
* 快捷键
|
|
7
|
-
*/
|
|
8
|
-
export declare const LAYOUT_SHORTCUT_ID = "insert-layout";
|
|
9
|
-
/**
|
|
10
|
-
* 快捷键提示
|
|
11
|
-
*/
|
|
12
|
-
export declare const LAYOUT_SHORTCUT_SUBTEXT = "/column";
|
|
13
|
-
export declare const LAYOUT_BLOCK_TYPE = "layout";
|
|
14
|
-
/**
|
|
15
|
-
* 最大分栏数
|
|
16
|
-
*/
|
|
17
|
-
export declare const MAX_LAYOUT_COLUMNS = 6;
|
|
18
|
-
/**
|
|
19
|
-
* 最小分栏数
|
|
20
|
-
*/
|
|
21
|
-
export declare const MIN_LAYOUT_COLUMNS = 2;
|
|
22
|
-
/**
|
|
23
|
-
* 分栏最小宽度,百分比
|
|
24
|
-
*/
|
|
25
|
-
export declare const MIN_LAYOUT_WIDTH_PERCENT = 0.08;
|
|
26
|
-
export declare const DROP_BLOCK_TYPE_BLACK_LIST: string[];
|
|
27
|
-
/**
|
|
28
|
-
* custom dom
|
|
29
|
-
*/
|
|
30
|
-
export declare const LAYOUT_SEPARATOR_CLASS_NAME = "layout-separator";
|
|
31
|
-
export declare const LAYOUT_COLUMN_CONTAINER_CLASS_NAME = "layout-column-container";
|
|
32
|
-
export declare const LAYOUT_SEPARATOR_INDEX_ATTRIBUTE_KEY = "layoutSeparatorIndex";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Closeable, CommandItem } from '../../../../@ones-editor/core';
|
|
2
|
-
import { CreateLayoutData } from '../types';
|
|
3
|
-
declare class LayoutCreatorItem implements CommandItem, CreateLayoutData {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
colCount?: number | undefined;
|
|
7
|
-
classPrefix: {
|
|
8
|
-
container: string;
|
|
9
|
-
title: string;
|
|
10
|
-
column: string;
|
|
11
|
-
};
|
|
12
|
-
element: HTMLElement;
|
|
13
|
-
closeable: Closeable | null;
|
|
14
|
-
columnsArray: number[];
|
|
15
|
-
constructor();
|
|
16
|
-
setCloseable: (closeable: Closeable) => void;
|
|
17
|
-
destroy: () => void;
|
|
18
|
-
createLayoutCreatorElement(): HTMLDivElement;
|
|
19
|
-
handleCreatorClick: (event: MouseEvent) => void;
|
|
20
|
-
handleCreatorLeave: () => void;
|
|
21
|
-
handleLayoutCreatorColumnEnter: (event: MouseEvent) => void;
|
|
22
|
-
highlightLayoutCreatorColumn: (colIndex: number) => void;
|
|
23
|
-
setColumnClassByIndex: (column: HTMLElement | null, index: number, targetIndex: number) => void;
|
|
24
|
-
showCreateLayoutCount: (colIndex: number) => void;
|
|
25
|
-
}
|
|
26
|
-
export declare function getLayoutCreatorItem(): LayoutCreatorItem;
|
|
27
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { BlockElement, OnesEditor, InsertEmptyBlockOptions, BlockPathComponent, DocBlock } from '../../../@ones-editor/core';
|
|
2
|
-
export declare function handleInsertEmptyBlock(editor: OnesEditor, options: InsertEmptyBlockOptions): Promise<BlockElement>;
|
|
3
|
-
export declare function createLayout(editor: OnesEditor, col: number | (BlockElement | DocBlock)[], path: BlockPathComponent, dataOverriding?: (DocBlock | undefined)[]): BlockElement;
|
|
4
|
-
export declare function selectContainer(editor: OnesEditor, layoutBlockElement: BlockElement, startContainerID: string, endContainerID?: string): void;
|
|
5
|
-
export declare function reorderColumns(editor: OnesEditor, layoutBlock: BlockElement, sourceContainerID: string, position: number): void;
|
|
6
|
-
export declare function combineLayoutBlock(editor: OnesEditor, from: BlockElement, to: BlockElement, position?: number): void;
|
|
7
|
-
export declare function addColumn(editor: OnesEditor, targetBlock: BlockElement, options?: {
|
|
8
|
-
sourceBlock?: BlockElement;
|
|
9
|
-
position?: number;
|
|
10
|
-
}): import("@ones-editor/core").ContainerElement | undefined;
|
|
11
|
-
export declare function deleteColumn(editor: OnesEditor, columnContainerID: string, layoutBlock: BlockElement): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { LayoutKindBlock } from './types';
|
|
2
|
-
export declare const updateSelection: LayoutKindBlock['updateSelection'];
|
|
3
|
-
export declare const clearSelection: LayoutKindBlock['clearSelection'];
|
|
4
|
-
export declare const getSelectedContainers: LayoutKindBlock['getSelectedContainers'];
|
|
5
|
-
export declare const getTextToolbarReferenceClient: LayoutKindBlock['getTextToolbarReferenceClient'];
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement, AutoScroll, OnesEditorCustom, ContainerElement } from '../../../@ones-editor/core';
|
|
2
|
-
import { Instance } from 'tippy.js';
|
|
3
|
-
export declare function createSeparatorContainer(editor: OnesEditor, blockElement: BlockElement, index: number): HTMLDivElement;
|
|
4
|
-
export declare function createActionBar(editor: OnesEditor, containerID: string, _blockElement: BlockElement, columnRemovable?: boolean): {
|
|
5
|
-
actionBarContainer: HTMLDivElement;
|
|
6
|
-
tippyInstance?: undefined;
|
|
7
|
-
} | {
|
|
8
|
-
actionBarContainer: HTMLDivElement;
|
|
9
|
-
tippyInstance: Instance<import("tippy.js").Props>;
|
|
10
|
-
};
|
|
11
|
-
export declare function elementToDataUrl(editor: OnesEditor, element: HTMLElement): Promise<string>;
|
|
12
|
-
export declare class OnesEditorCustomLayoutDragHandler implements OnesEditorCustom {
|
|
13
|
-
private editor;
|
|
14
|
-
activeLayoutBlock?: BlockElement;
|
|
15
|
-
columnContainer?: ContainerElement;
|
|
16
|
-
draggingContainer?: HTMLElement;
|
|
17
|
-
autoScroll?: AutoScroll;
|
|
18
|
-
startPosition?: {
|
|
19
|
-
x: number;
|
|
20
|
-
y: number;
|
|
21
|
-
};
|
|
22
|
-
get separators(): HTMLElement[] | undefined;
|
|
23
|
-
get draggingContainerIndex(): number | undefined;
|
|
24
|
-
constructor(editor: OnesEditor);
|
|
25
|
-
destroy(): void;
|
|
26
|
-
private handleMouseDown;
|
|
27
|
-
private previewShouldScale;
|
|
28
|
-
private initContainerPreview;
|
|
29
|
-
private handleDragStart;
|
|
30
|
-
private handleDrag;
|
|
31
|
-
private handleDragEnd;
|
|
32
|
-
private getClosetSeparator;
|
|
33
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ComplexKindBlock, DocBlock, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
-
export interface LayoutDocBlock extends DocBlock {
|
|
3
|
-
children: string[];
|
|
4
|
-
colsWidth: number[];
|
|
5
|
-
}
|
|
6
|
-
export type LayoutKindBlock = ComplexKindBlock;
|
|
7
|
-
export type LayoutDropData = {
|
|
8
|
-
isValidColumnDragging: boolean;
|
|
9
|
-
position: number;
|
|
10
|
-
};
|
|
11
|
-
export interface CreateLayoutData {
|
|
12
|
-
colCount?: number;
|
|
13
|
-
}
|
|
14
|
-
export interface EditorConfigLayoutOptions {
|
|
15
|
-
onColumnCreated?: (editor: OnesEditor, count: number) => void;
|
|
16
|
-
onColumnWidthChange?: (editor: OnesEditor, count: number, index: number, colsWidth: number[]) => void;
|
|
17
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BlockElement, ContainerElement, DocBlock, DocObject, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
-
export declare function isBlockElement(item: unknown): item is BlockElement;
|
|
3
|
-
export declare function isLayoutBlock(block: BlockElement): boolean;
|
|
4
|
-
export declare function flattenLayoutBlockIfExists(_docObject: DocObject, containerID?: string): DocBlock[];
|
|
5
|
-
export declare function currentCaptionInRootContainer(editor: OnesEditor): boolean;
|
|
6
|
-
export declare function getClosetLayoutContainer(block: BlockElement | undefined): ContainerElement | undefined;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BlockCommands, BlockElement, CommandItem, OnesEditor } from '../../../../../@ones-editor/core';
|
|
2
|
-
import type { CommandItemType } from '../../../../../@ones-editor/core';
|
|
3
|
-
export default class ImageHoveringToolbarCommands implements BlockCommands {
|
|
4
|
-
protected editor: OnesEditor;
|
|
5
|
-
protected block: BlockElement;
|
|
6
|
-
group: string;
|
|
7
|
-
constructor(editor: OnesEditor, block: BlockElement);
|
|
8
|
-
_commands: ({
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
icon: string;
|
|
12
|
-
type?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
type: CommandItemType;
|
|
17
|
-
icon?: undefined;
|
|
18
|
-
})[];
|
|
19
|
-
private createIconItem;
|
|
20
|
-
get commands(): CommandItem[];
|
|
21
|
-
executeCommand(editor: OnesEditor, block: BlockElement, item: CommandItem): void;
|
|
22
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DocBlock } from '../../../../@ones-editor/core';
|
|
2
|
-
export interface CalcCol {
|
|
3
|
-
cellId: string | undefined;
|
|
4
|
-
originalWidth: number;
|
|
5
|
-
width: number;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* 处理分栏数据结构:实际就是一行多列的表格数据
|
|
9
|
-
*/
|
|
10
|
-
export declare function buildLayoutMatrix(block: DocBlock, maxWidth: number): CalcCol[];
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Closeable, CommandItem, OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
|
|
2
|
-
import { EmojiPalette } from '../emoji-palette';
|
|
3
|
-
export declare class EmojiItem implements CommandItem, OnesEditorCustom {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
element: HTMLButtonElement;
|
|
7
|
-
dropdown: boolean;
|
|
8
|
-
children: CommandItem[];
|
|
9
|
-
palette: EmojiPalette;
|
|
10
|
-
manualShowChildren: boolean;
|
|
11
|
-
childrenPlacement: "bottom-start";
|
|
12
|
-
closeable: Closeable;
|
|
13
|
-
constructor();
|
|
14
|
-
beforePopup(): void;
|
|
15
|
-
setCloseable(closeable: Closeable): void;
|
|
16
|
-
destroy(): void;
|
|
17
|
-
static get(editor: OnesEditor): EmojiItem;
|
|
18
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Emojis } from './emoji-data';
|
|
2
|
-
interface EmojiContentOptions {
|
|
3
|
-
emojis: Emojis;
|
|
4
|
-
onSelectEmoji: (emoji: string) => void;
|
|
5
|
-
onCategoryReach: (category: string) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare class EmojiContent {
|
|
8
|
-
private parent;
|
|
9
|
-
private options;
|
|
10
|
-
private root;
|
|
11
|
-
private observer;
|
|
12
|
-
constructor(parent: HTMLElement, options: EmojiContentOptions);
|
|
13
|
-
private handleIntersectionObserver;
|
|
14
|
-
private handleRootClick;
|
|
15
|
-
private createCategoryGroup;
|
|
16
|
-
updateContent: (emojis: Emojis) => void;
|
|
17
|
-
scrollToCategory(categoryId: string): void;
|
|
18
|
-
destroy(): void;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export type Emoji = string;
|
|
2
|
-
export type EmojiCategory = string;
|
|
3
|
-
export type Emojis = EmojiMetaData['emojis'];
|
|
4
|
-
interface EmojiMetaData {
|
|
5
|
-
emojis: Record<EmojiCategory, Emoji[]>;
|
|
6
|
-
keywords: Record<Emoji, string[]>;
|
|
7
|
-
}
|
|
8
|
-
type EmojiEntity = {
|
|
9
|
-
category: EmojiCategory;
|
|
10
|
-
emoji: Emoji;
|
|
11
|
-
keyword: string;
|
|
12
|
-
};
|
|
13
|
-
export declare class EmojiData {
|
|
14
|
-
static metaData: EmojiMetaData | null;
|
|
15
|
-
private emojiEntities;
|
|
16
|
-
private localMetaData;
|
|
17
|
-
constructor();
|
|
18
|
-
get recentlyUsedEmojis(): EmojiMetaData['emojis'];
|
|
19
|
-
get emojis(): {
|
|
20
|
-
[x: string]: string[];
|
|
21
|
-
};
|
|
22
|
-
get categories(): EmojiCategory[];
|
|
23
|
-
saveEmojiToRecentlyUsed(emoji: Emoji): void;
|
|
24
|
-
filterEmojis(v: string): {
|
|
25
|
-
emojis: {
|
|
26
|
-
[x: string]: string[];
|
|
27
|
-
};
|
|
28
|
-
categories: string[];
|
|
29
|
-
};
|
|
30
|
-
getEmojiEntity(emoji: string): EmojiEntity | null;
|
|
31
|
-
static loadData(): Promise<EmojiMetaData>;
|
|
32
|
-
}
|
|
33
|
-
export declare function isEmptyEmojiData(emojis: Emojis): boolean;
|
|
34
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EmojiCategory } from './emoji-data';
|
|
2
|
-
interface EmojiNavigationOptions {
|
|
3
|
-
categories: EmojiCategory[];
|
|
4
|
-
onSelectCategory: (category: string) => void;
|
|
5
|
-
}
|
|
6
|
-
export declare class EmojiNavigation {
|
|
7
|
-
private parent;
|
|
8
|
-
private options;
|
|
9
|
-
private root;
|
|
10
|
-
constructor(parent: HTMLElement, options: EmojiNavigationOptions);
|
|
11
|
-
private handleRootClick;
|
|
12
|
-
updateContent(categories: EmojiCategory[]): void;
|
|
13
|
-
updateActiveCategory(category: string): void;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createInput } from '../input/create-input';
|
|
2
|
-
interface EmojiSearchOptions {
|
|
3
|
-
onSearch: (value: string) => void;
|
|
4
|
-
}
|
|
5
|
-
export declare class EmojiSearch {
|
|
6
|
-
private parent;
|
|
7
|
-
private options;
|
|
8
|
-
input: ReturnType<typeof createInput>;
|
|
9
|
-
constructor(parent: HTMLElement, options: EmojiSearchOptions);
|
|
10
|
-
}
|
|
11
|
-
export {};
|