@ones-editor/editor 2.0.5-beta.9 → 2.0.6-beta.1
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/composition/editor-input.d.ts +1 -1
- package/@ones-editor/core/src/core/containers/element.d.ts +0 -1
- package/@ones-editor/core/src/core/types.d.ts +8 -4
- package/@ones-editor/core/src/utils/data-url.d.ts +1 -0
- package/@ones-editor/drop-target/src/drop-target.d.ts +0 -6
- package/@ones-editor/drop-target/src/index.d.ts +0 -1
- package/@ones-editor/graph-embed/src/helper/dom.d.ts +3 -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 +3 -1
- package/@ones-editor/image-embed/src/image-dom/download-image.d.ts +2 -0
- package/@ones-editor/input-handlers/src/index.d.ts +1 -4
- package/@ones-editor/input-handlers/src/markdown-shortcuts/match-block-convert.d.ts +1 -9
- package/@ones-editor/misc/src/image.d.ts +1 -0
- package/@ones-editor/paste-special/src/paste-special-handler.d.ts +0 -1
- package/@ones-editor/to-docx/src/doc2other/colors.d.ts +1 -7
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -2
- package/@ones-editor/ui/src/quick-menu/index.d.ts +1 -3
- package/@ones-editor/ui/src/quick-menu/types.d.ts +0 -4
- 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 -8
- 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 +2 -17
- 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 -20
- package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +0 -20
- package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +0 -20
- package/dist/index.js +206 -282
- package/dist/lang/en-us.d.ts +0 -1
- package/dist/lang/ja-jp.d.ts +0 -1
- package/dist/lang/zh-cn.d.ts +0 -1
- package/package.json +1 -1
- 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-converter-interceptor.d.ts +0 -8
- 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 -11
- package/@ones-editor/callout-block/src/callout-block/callout-last-callout-payload.d.ts +0 -11
- 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 -22
- 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 -16
- 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 -4
- 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/input-handlers/src/markdown-shortcuts/converter-interceptors.d.ts +0 -12
- package/@ones-editor/ui-base/src/emoji-item/emoji-item.d.ts +0 -19
- 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 -21
- package/@ones-editor/ui-base/src/emoji-palette/emoji-data.d.ts +0 -60
- package/@ones-editor/ui-base/src/emoji-palette/emoji-navigation.d.ts +0 -16
- 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 -23
- package/@ones-editor/ui-base/src/emoji-palette/types.d.ts +0 -0
package/dist/lang/en-us.d.ts
CHANGED
package/dist/lang/ja-jp.d.ts
CHANGED
package/dist/lang/zh-cn.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -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,8 +0,0 @@
|
|
|
1
|
-
import { BlockConverter, ConverterInterceptor } from '../../../../@ones-editor/input-handlers';
|
|
2
|
-
import { OnesEditor, BlockElement, OnesEditorCustom } from '../../../../@ones-editor/core';
|
|
3
|
-
export declare class CalloutConverterInterceptor implements ConverterInterceptor, OnesEditorCustom {
|
|
4
|
-
constructor(editor: OnesEditor);
|
|
5
|
-
handler(editor: OnesEditor, block: BlockElement, converter: BlockConverter): boolean;
|
|
6
|
-
destroy(): void;
|
|
7
|
-
static init(editor: OnesEditor): CalloutConverterInterceptor;
|
|
8
|
-
}
|
|
@@ -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,11 +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 pasteHasForbidden;
|
|
5
|
-
private handleBackspaceEvent;
|
|
6
|
-
handleBeforeKeyDown(editor: OnesEditor, event: KeyboardEvent): boolean;
|
|
7
|
-
handleBeforePasteDoc(editor: OnesEditor, doc: DocObject): Promise<boolean>;
|
|
8
|
-
handleAfterPaste(): Promise<boolean>;
|
|
9
|
-
destroy(): void;
|
|
10
|
-
static init(editor: OnesEditor): void;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
|
|
2
|
-
import { CalloutBlockPayload } from './types';
|
|
3
|
-
export declare function getLastCalloutData(): CalloutBlockPayload;
|
|
4
|
-
export declare function updateLastCalloutData(payload: Partial<CalloutBlockPayload>): void;
|
|
5
|
-
export declare class CalloutLastUpdateData implements OnesEditorCustom {
|
|
6
|
-
private lastCalloutBlockPayload;
|
|
7
|
-
get(): CalloutBlockPayload;
|
|
8
|
-
update(payload: Partial<CalloutBlockPayload>): void;
|
|
9
|
-
destroy(): void;
|
|
10
|
-
static init(editor: OnesEditor): CalloutLastUpdateData;
|
|
11
|
-
}
|
|
@@ -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,22 +0,0 @@
|
|
|
1
|
-
import { BlockElement, CommandItem, OnesEditor, OnesEditorCustom } from '../../../../../@ones-editor/core';
|
|
2
|
-
import { ColorPaletteItem } from '../../../../../@ones-editor/ui-base';
|
|
3
|
-
import { ColorId } from '../types';
|
|
4
|
-
export declare class BgColorItem implements CommandItem, OnesEditorCustom {
|
|
5
|
-
private editor;
|
|
6
|
-
id: string;
|
|
7
|
-
name: string;
|
|
8
|
-
manualShowChildren: boolean;
|
|
9
|
-
dropdown: boolean;
|
|
10
|
-
childrenPlacement: "bottom-start";
|
|
11
|
-
private bgColorButton;
|
|
12
|
-
bgColorPaletteItem: ColorPaletteItem;
|
|
13
|
-
element: HTMLButtonElement;
|
|
14
|
-
children: CommandItem[];
|
|
15
|
-
private constructor();
|
|
16
|
-
private createPaletteButton;
|
|
17
|
-
private getBgColorFromBlock;
|
|
18
|
-
updateButtonColor(bgColor: ColorId): void;
|
|
19
|
-
updateItem(block: BlockElement): void;
|
|
20
|
-
destroy(): void;
|
|
21
|
-
static get(editor: OnesEditor): BgColorItem;
|
|
22
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BlockElement, CommandItem, OnesEditor } from '../../../../../@ones-editor/core';
|
|
2
|
-
import { CalloutBlockPayload } from '../types';
|
|
3
|
-
export type PresetId = `preset-${0 | 1}`;
|
|
4
|
-
type Preset = CalloutBlockPayload & {
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function isPresetId(id: string): id is PresetId;
|
|
8
|
-
export declare function getPresetId(id: PresetId): string;
|
|
9
|
-
export declare function getPreset(id: PresetId): Preset;
|
|
10
|
-
export declare function getPresetIcon(id: string): string;
|
|
11
|
-
export declare function getPresetPayload(presetId: PresetId): {
|
|
12
|
-
backgroundColor: number;
|
|
13
|
-
icon: "preset-0" | "preset-1";
|
|
14
|
-
};
|
|
15
|
-
export declare function createPresetItem(presetId: PresetId, editor: OnesEditor, block: BlockElement): CommandItem;
|
|
16
|
-
export {};
|
|
@@ -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,12 +0,0 @@
|
|
|
1
|
-
import { BlockElement, OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
|
|
2
|
-
import type { BlockConverter } from './match-block-convert';
|
|
3
|
-
export interface ConverterInterceptor {
|
|
4
|
-
handler: (editor: OnesEditor, block: BlockElement, converter: BlockConverter) => boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare class MarkdownConverterInterceptors implements OnesEditorCustom {
|
|
7
|
-
private interceptors;
|
|
8
|
-
addInterceptor(interceptor: ConverterInterceptor): void;
|
|
9
|
-
runInterceptors(editor: OnesEditor, block: BlockElement, converter: BlockConverter): boolean;
|
|
10
|
-
destroy(): void;
|
|
11
|
-
static get(editor: OnesEditor): MarkdownConverterInterceptors;
|
|
12
|
-
}
|
|
@@ -1,19 +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
|
-
childrenMenuId: string;
|
|
13
|
-
closeable: Closeable;
|
|
14
|
-
constructor();
|
|
15
|
-
beforePopup(): void;
|
|
16
|
-
setCloseable(closeable: Closeable): void;
|
|
17
|
-
destroy(): void;
|
|
18
|
-
static get(editor: OnesEditor): EmojiItem;
|
|
19
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Emojis } from './emoji-data';
|
|
2
|
-
interface EmojiContentOptions {
|
|
3
|
-
onSelectEmoji: (emoji: string) => void;
|
|
4
|
-
onCategoryReach: (category: string) => void;
|
|
5
|
-
}
|
|
6
|
-
export declare class EmojiContent {
|
|
7
|
-
private parent;
|
|
8
|
-
private options;
|
|
9
|
-
private root;
|
|
10
|
-
private observer;
|
|
11
|
-
constructor(parent: HTMLElement, options: EmojiContentOptions);
|
|
12
|
-
private handleIntersectionObserver;
|
|
13
|
-
private handleRootClick;
|
|
14
|
-
private updateCategoryGroupContent;
|
|
15
|
-
private createCategoryGroup;
|
|
16
|
-
updateFrequentlyUsedContent(emojis: Emojis): void;
|
|
17
|
-
updateContent: (emojis: Emojis) => void;
|
|
18
|
-
scrollToCategory(categoryId: string): void;
|
|
19
|
-
destroy(): void;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1,60 +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 function getCategoryInfo(category: string): {
|
|
14
|
-
icon: string;
|
|
15
|
-
label: string;
|
|
16
|
-
} | {
|
|
17
|
-
icon: string;
|
|
18
|
-
label: string;
|
|
19
|
-
} | {
|
|
20
|
-
icon: string;
|
|
21
|
-
label: string;
|
|
22
|
-
} | {
|
|
23
|
-
icon: string;
|
|
24
|
-
label: string;
|
|
25
|
-
} | {
|
|
26
|
-
icon: string;
|
|
27
|
-
label: string;
|
|
28
|
-
} | {
|
|
29
|
-
icon: string;
|
|
30
|
-
label: string;
|
|
31
|
-
} | {
|
|
32
|
-
icon: string;
|
|
33
|
-
label: string;
|
|
34
|
-
} | {
|
|
35
|
-
icon: string;
|
|
36
|
-
label: string;
|
|
37
|
-
};
|
|
38
|
-
export declare class EmojiData {
|
|
39
|
-
static metaData: EmojiMetaData | null;
|
|
40
|
-
private emojiEntities;
|
|
41
|
-
private localMetaData;
|
|
42
|
-
constructor();
|
|
43
|
-
get recentlyUsedEmojis(): EmojiMetaData['emojis'];
|
|
44
|
-
get emojis(): {
|
|
45
|
-
[x: string]: string[];
|
|
46
|
-
};
|
|
47
|
-
get categories(): EmojiCategory[];
|
|
48
|
-
static get loaded(): boolean;
|
|
49
|
-
saveEmojiToRecentlyUsed(emoji: Emoji): void;
|
|
50
|
-
filterEmojis(v: string): {
|
|
51
|
-
emojis: {
|
|
52
|
-
[x: string]: string[];
|
|
53
|
-
};
|
|
54
|
-
categories: string[];
|
|
55
|
-
};
|
|
56
|
-
getEmojiEntity(emoji: string): EmojiEntity | null;
|
|
57
|
-
static loadData(): Promise<EmojiMetaData>;
|
|
58
|
-
}
|
|
59
|
-
export declare function isEmptyEmojiData(emojis: Emojis): boolean;
|
|
60
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { EmojiCategory } from './emoji-data';
|
|
2
|
-
interface EmojiNavigationOptions {
|
|
3
|
-
onSelectCategory: (category: string) => void;
|
|
4
|
-
}
|
|
5
|
-
export declare class EmojiNavigation {
|
|
6
|
-
private parent;
|
|
7
|
-
private options;
|
|
8
|
-
private root;
|
|
9
|
-
constructor(parent: HTMLElement, options: EmojiNavigationOptions);
|
|
10
|
-
private handleRootClick;
|
|
11
|
-
private createCategoryItem;
|
|
12
|
-
updateFrequentlyUsedItem(): void;
|
|
13
|
-
updateContent(categories: EmojiCategory[]): void;
|
|
14
|
-
updateActiveCategory(category: string): void;
|
|
15
|
-
}
|
|
16
|
-
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 {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { CommandItem } from '../../../../@ones-editor/core';
|
|
2
|
-
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
3
|
-
import './index.scss';
|
|
4
|
-
export interface EmojiPaletteEvents {
|
|
5
|
-
onSelectEmoji: (emoji: string) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare class EmojiPalette extends TypedEmitter<EmojiPaletteEvents> implements CommandItem {
|
|
8
|
-
id: string;
|
|
9
|
-
name: string;
|
|
10
|
-
element: HTMLDivElement;
|
|
11
|
-
private emojiData;
|
|
12
|
-
private emojiSearch;
|
|
13
|
-
private emojiContent;
|
|
14
|
-
private emojiNavigation;
|
|
15
|
-
constructor();
|
|
16
|
-
private initEmojiData;
|
|
17
|
-
private handleSearch;
|
|
18
|
-
private handleEmojiSelect;
|
|
19
|
-
private handleSelectCategory;
|
|
20
|
-
private handleCategoryReach;
|
|
21
|
-
updateComponents(): void;
|
|
22
|
-
destroy(): void;
|
|
23
|
-
}
|
|
File without changes
|