@ones-editor/editor 2.1.7-beta.20 → 2.1.7-beta.21
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/blocks/complex-blocks/complex-block-helper.d.ts +2 -5
- package/@ones-editor/core/src/core/blocks/text-blocks/base/child.d.ts +1 -2
- package/@ones-editor/core/src/core/blocks/text-blocks/base/line-breaks.d.ts +1 -2
- package/@ones-editor/core/src/core/blocks/text-blocks/base/range.d.ts +1 -2
- package/@ones-editor/core/src/core/blocks/text-blocks/base/text-offset.d.ts +1 -2
- package/@ones-editor/core/src/core/insertions/editor-insertions.d.ts +1 -0
- package/@ones-editor/core/src/core/selection/adjust-selection-pos.d.ts +5 -1
- package/@ones-editor/core/src/core/types.d.ts +1 -0
- package/@ones-editor/core/src/helper/hovering-block.d.ts +1 -2
- package/@ones-editor/excalidraw/package.json +4 -0
- package/@ones-editor/mobile-helper/src/fixed-toolbar/toolbar-handler.d.ts +1 -0
- package/@ones-editor/to-docx/src/doc2other/core.d.ts +1 -1
- package/@ones-editor/to-docx/src/doc2other/table.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/input/create-input.d.ts +1 -0
- package/dist/index.js +557 -442
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement, BlockPosition, ContainerElement,
|
|
1
|
+
import { OnesEditor, BlockElement, BlockPosition, ContainerElement, GetChildContainerOptions, ComplexSelectionRange } from '../../types';
|
|
2
|
+
export declare const logger: import("../../../utils").Logger;
|
|
2
3
|
export declare function complexBlockGetAllChildContainers(editor: OnesEditor, block: BlockElement, options?: GetChildContainerOptions): ContainerElement[];
|
|
3
4
|
export declare function complexBlockGetSelectedContainers(editor: OnesEditor, block: BlockElement, start: BlockPosition, end: BlockPosition): ContainerElement[];
|
|
4
5
|
export declare function isFirstChildBlockInComplexBlock(editor: OnesEditor, childBlock: BlockElement): boolean;
|
|
@@ -9,8 +10,4 @@ export declare function findPrevSimpleBlockBeforeChildContainer(editor: OnesEdit
|
|
|
9
10
|
export declare function complexBlockGetTopChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
|
|
10
11
|
export declare function complexBlockGetBottomChildContainers(editor: OnesEditor, complexBlock: BlockElement): ContainerElement[];
|
|
11
12
|
export declare function complexBlockFindNearestChildBlock(editor: OnesEditor, complexBlock: BlockElement, x: number, y: number): BlockElement;
|
|
12
|
-
export declare function complexBlockAdjustSelectionPos(editor: OnesEditor, complexBlock: BlockElement, anchor: ComplexBlockPosition, focus: ComplexBlockPosition): {
|
|
13
|
-
anchor: ComplexBlockPosition;
|
|
14
|
-
focus: ComplexBlockPosition;
|
|
15
|
-
};
|
|
16
13
|
export declare function isFullSelectedOneComplexBlock(editor: OnesEditor, complexRange?: ComplexSelectionRange): boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BlockElement,
|
|
2
|
-
export type { TextBlockContentTextChild, TextBlockContentBoxChild, TextBlockContentInsertionChild, TextBlockContentChild };
|
|
1
|
+
import { BlockElement, TextBlockContentChild } from '../../../types';
|
|
3
2
|
export type TextBlockContentChildren = TextBlockContentChild[];
|
|
4
3
|
export type TextBlockContentChildType = 'text' | 'box' | 'insertion';
|
|
5
4
|
export declare function isTextBlockContentChild(elem: Element): boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BlockElement, SimpleBlockPosition } from '../../../types';
|
|
2
|
-
import { TextBlockContentChild } from './child';
|
|
1
|
+
import { BlockElement, SimpleBlockPosition, TextBlockContentChild } from '../../../types';
|
|
3
2
|
export interface LineBreakInfo {
|
|
4
3
|
offset: number;
|
|
5
4
|
type: 'betweenChild' | 'textBreakWord';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BlockElement, BoxElement, InsertionElement } from '../../../types';
|
|
2
|
-
import { TextBlockContentChild } from './child';
|
|
1
|
+
import { BlockElement, BoxElement, InsertionElement, TextBlockContentChild } from '../../../types';
|
|
3
2
|
export interface BlockRangeInfo {
|
|
4
3
|
child: TextBlockContentChild;
|
|
5
4
|
container: Text | BoxElement | HTMLBRElement | InsertionElement;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BlockElement } from '../../../types';
|
|
2
|
-
import { TextBlockContentChild } from './child';
|
|
1
|
+
import { BlockElement, TextBlockContentChild } from '../../../types';
|
|
3
2
|
export declare function getChildOffset(block: BlockElement, child: TextBlockContentChild): {
|
|
4
3
|
start: number;
|
|
5
4
|
end: number;
|
|
@@ -6,5 +6,6 @@ export default class EditorInsertions {
|
|
|
6
6
|
constructor(editor: OnesEditor);
|
|
7
7
|
registerInsertionClass(insertionClass: Insertion): void;
|
|
8
8
|
getInsertionClass(type: string): Insertion;
|
|
9
|
+
private createInsertionElement;
|
|
9
10
|
createInsertion(blockContent: BlockContentElement, insertion: DocInsertion): InsertionElement;
|
|
10
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockPosition, OnesEditor } from '../types';
|
|
1
|
+
import { BlockElement, BlockPosition, OnesEditor, ComplexBlockPosition } from '../types';
|
|
2
2
|
import { EditorComplexBlockPosition, EditorSimpleBlockPosition } from './editor-position';
|
|
3
3
|
type AdjustSelectionPosResult = {
|
|
4
4
|
anchor: EditorSimpleBlockPosition;
|
|
@@ -7,5 +7,9 @@ type AdjustSelectionPosResult = {
|
|
|
7
7
|
anchor: EditorComplexBlockPosition;
|
|
8
8
|
focus: EditorComplexBlockPosition;
|
|
9
9
|
};
|
|
10
|
+
export declare function complexBlockAdjustSelectionPos(editor: OnesEditor, complexBlock: BlockElement, anchor: ComplexBlockPosition, focus: ComplexBlockPosition): {
|
|
11
|
+
anchor: ComplexBlockPosition;
|
|
12
|
+
focus: ComplexBlockPosition;
|
|
13
|
+
};
|
|
10
14
|
export declare function adjustSelectionPos(editor: OnesEditor, anchor: BlockPosition, focus: BlockPosition): AdjustSelectionPosResult | null;
|
|
11
15
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
2
|
-
import
|
|
3
|
-
import { BlockElement, OnesEditor, OnesEditorCustom } from '../core/types';
|
|
2
|
+
import { BlockElement, OnesEditor, OnesEditorCustom, TextBlockContentChild } from '../core/types';
|
|
4
3
|
export interface OnesEditorHoveringBlockEvents {
|
|
5
4
|
change: (block: BlockElement | null, old: BlockElement | null, event: MouseEvent) => void;
|
|
6
5
|
targetChange: (block: BlockElement | null, old: BlockElement | null, target: EventTarget | null, oldTarget: EventTarget | null) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocBlock, DocObject } from '../../../../@ones-editor/core';
|
|
2
|
-
import { CalcCell } from './table';
|
|
3
2
|
import { CalcCol } from './layout';
|
|
3
|
+
import { CalcCell } from './table';
|
|
4
4
|
import { BlockObject, CodeObject, ExportState, GetDocByBlockFunc, GetTextsByBoxFunc, MD5Func } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* 生成docx/html blocks的接口
|