@ones-editor/editor 0.0.3-beta.95 → 0.0.3-beta.96
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/code-block/src/locale/en-us.d.ts +2 -0
- package/@ones-editor/code-block/src/locale/ja-jp.d.ts +2 -0
- package/@ones-editor/code-block/src/locale/zh-cn.d.ts +2 -0
- package/@ones-editor/core/src/core/composition/clipboard/paste.d.ts +2 -2
- package/@ones-editor/core/src/core/types.d.ts +1 -1
- package/@ones-editor/core/src/i18n/i18n.d.ts +16 -0
- package/@ones-editor/core/src/i18n/ja-jp.d.ts +17 -0
- package/@ones-editor/image-embed/src/image-data.d.ts +4 -4
- package/@ones-editor/image-embed/src/image-dom/image-item.d.ts +1 -3
- package/@ones-editor/image-embed/src/image-object.d.ts +1 -1
- package/@ones-editor/image-embed/src/paste-handler.d.ts +7 -0
- package/@ones-editor/image-embed/src/shortcuts/image-clipboard-data.d.ts +5 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +12 -0
- package/dist/index.js +133 -133
- package/package.json +1 -1
- package/@ones-editor/dividing-line-embed/src/i18n/ja-jp.d.ts +0 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnesEditor, OnesEditorDocs } from '../../types';
|
|
1
|
+
import { CloneBlockResultInfo, OnesEditor, OnesEditorDocs } from '../../types';
|
|
2
2
|
import { DocObject } from '../../doc';
|
|
3
|
-
export declare function editorInsertDocWithResources(editor: OnesEditor, doc: DocObject): Promise<void>;
|
|
3
|
+
export declare function editorInsertDocWithResources(editor: OnesEditor, doc: DocObject, cloneDocResult?: CloneBlockResultInfo): Promise<void>;
|
|
4
4
|
export declare function getDocFromDocs(docs: OnesEditorDocs): DocObject | null;
|
|
@@ -592,7 +592,7 @@ export interface OnesEditorInputHandler {
|
|
|
592
592
|
handleBeforePaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs) => Promise<boolean>;
|
|
593
593
|
handleAfterPaste?: (editor: OnesEditor, event: ClipboardEvent | null, doc: OnesEditorDocs) => Promise<boolean>;
|
|
594
594
|
handleBeforePasteDoc?: (editor: OnesEditor, doc: DocObject) => Promise<boolean>;
|
|
595
|
-
handleAfterPasteDoc?: (editor: OnesEditor, doc: DocObject) => Promise<boolean>;
|
|
595
|
+
handleAfterPasteDoc?: (editor: OnesEditor, doc: DocObject, cloneDocResult: CloneBlockResultInfo) => Promise<boolean>;
|
|
596
596
|
handleChanged?: (editor: OnesEditor, action: OnesEditorUndoAction) => void;
|
|
597
597
|
handleRemoteChanged?: (editor: OnesEditor, type: RemoteChangeType) => void;
|
|
598
598
|
handleCompositionStart?: (editor: OnesEditor, containerId: string, blockIndex: number, offset: number) => void;
|
|
@@ -31,6 +31,22 @@ declare const langs: {
|
|
|
31
31
|
cancel: string;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
|
+
'ja-JP': {
|
|
35
|
+
name: string;
|
|
36
|
+
date: {
|
|
37
|
+
dateFromFuture: string;
|
|
38
|
+
dateJustNow: string;
|
|
39
|
+
dateYesterday: string;
|
|
40
|
+
dateMinutesAgo: string;
|
|
41
|
+
date1HourAgo: string;
|
|
42
|
+
dateHoursAgo: string;
|
|
43
|
+
dateDaysAgo: string;
|
|
44
|
+
dateWeeksAgo: string;
|
|
45
|
+
};
|
|
46
|
+
common: {
|
|
47
|
+
cancel: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
34
50
|
};
|
|
35
51
|
export declare function setLang(lang?: string | null | undefined): void;
|
|
36
52
|
export declare function mergeLang(l: any): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
name: string;
|
|
3
|
+
date: {
|
|
4
|
+
dateFromFuture: string;
|
|
5
|
+
dateJustNow: string;
|
|
6
|
+
dateYesterday: string;
|
|
7
|
+
dateMinutesAgo: string;
|
|
8
|
+
date1HourAgo: string;
|
|
9
|
+
dateHoursAgo: string;
|
|
10
|
+
dateDaysAgo: string;
|
|
11
|
+
dateWeeksAgo: string;
|
|
12
|
+
};
|
|
13
|
+
common: {
|
|
14
|
+
cancel: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -4,8 +4,8 @@ export declare function isEmptyImage(data: ImageItemData): boolean;
|
|
|
4
4
|
export declare function isRemoteImage(data: ImageItemData): boolean;
|
|
5
5
|
export declare function calcImagesFlexIfNeeded(images: ImageItemData[]): void;
|
|
6
6
|
export declare function getImages(data: ImageEmbedData): ImageItemData[];
|
|
7
|
-
export declare function getWidthPercent(blockData: DocEmbedBlock): number;
|
|
8
|
-
export declare function calImageBlockStyleWidth(editor: OnesEditor, blockData: DocEmbedBlock): string;
|
|
9
|
-
export declare function toImageEmbedData(images: ImageItemData[], widthPercent
|
|
10
|
-
export declare function calBlockHeight(editor: OnesEditor, imageData: DocEmbedBlock, parentContainerElement: ContainerElement): number | "";
|
|
7
|
+
export declare function getWidthPercent(blockData: DocEmbedBlock): number | undefined;
|
|
8
|
+
export declare function calImageBlockStyleWidth(editor: OnesEditor, blockData: DocEmbedBlock, failedLoad?: boolean): string;
|
|
9
|
+
export declare function toImageEmbedData(images: ImageItemData[], widthPercent?: number): ImageEmbedData;
|
|
10
|
+
export declare function calBlockHeight(editor: OnesEditor, imageData: DocEmbedBlock, parentContainerElement: ContainerElement, failedLoad?: boolean): number | "";
|
|
11
11
|
export declare function getTotalFlex(images: ImageItemData[]): number;
|
|
@@ -4,9 +4,7 @@ export declare function getImageContainers(eventTarget: EventTarget | null): HTM
|
|
|
4
4
|
export declare function getParentImageContainer(target: EventTarget | null): HTMLElement | null;
|
|
5
5
|
export declare function getParentImageIndex(target: EventTarget | null): number;
|
|
6
6
|
export declare function handleUploadError(editor: OnesEditor, block: BlockElement, index: number, err: Error, file: File): void;
|
|
7
|
-
export declare function createImageEmbedContent(editor: OnesEditor, block: BlockElement, blockContent: BlockContentElement, images: ImageItemData[], selectedIndex: number
|
|
8
|
-
autoFix: boolean;
|
|
9
|
-
}): HTMLDivElement;
|
|
7
|
+
export declare function createImageEmbedContent(editor: OnesEditor, block: BlockElement, blockContent: BlockContentElement, images: ImageItemData[], selectedIndex: number): HTMLDivElement;
|
|
10
8
|
export declare function updateImageItem(editor: OnesEditor, block: BlockElement, imageData: ImageItemData, index: number, selectedIndex: number, images: ImageItemData[]): void;
|
|
11
9
|
export declare function getImageContainer(block: BlockElement, index: number): HTMLElement;
|
|
12
10
|
export declare function reloadImageItem(editor: OnesEditor, eventTarget: EventTarget | null): void;
|
|
@@ -16,7 +16,7 @@ export declare class ImageObject implements ImageObjectBase {
|
|
|
16
16
|
isAutoFix(): boolean;
|
|
17
17
|
createContent(parentContainer: ContainerElement, block: BlockElement, blockContent: BlockContentElement): void;
|
|
18
18
|
getImages(): ImageItemData[];
|
|
19
|
-
getWidthPercent(): number;
|
|
19
|
+
getWidthPercent(): number | undefined;
|
|
20
20
|
isEmpty(): boolean;
|
|
21
21
|
setResizing(resizing: boolean): void;
|
|
22
22
|
getSelectedIndex(): number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CloneBlockResultInfo, DocObject, OnesEditor, OnesEditorCustom, OnesEditorInputHandler } from '../../../@ones-editor/core';
|
|
2
|
+
export declare class ImagePasteHandler implements OnesEditorInputHandler, OnesEditorCustom {
|
|
3
|
+
private editor;
|
|
4
|
+
constructor(editor: OnesEditor);
|
|
5
|
+
handleAfterPasteDoc(editor: OnesEditor, doc: DocObject, cloneDocResult: CloneBlockResultInfo): Promise<boolean>;
|
|
6
|
+
destroy(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
|
+
import { ImageObject } from '../image-object';
|
|
3
|
+
export declare function getImageClipboardData(editor: OnesEditor, img: HTMLImageElement, imageObject: ImageObject, index: number): {
|
|
4
|
+
[key: string]: string | Blob;
|
|
5
|
+
} | undefined;
|