@ones-editor/editor 2.5.1-beta.15 → 2.5.1-beta.16
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/common/block-dom.d.ts +3 -2
- package/@ones-editor/core/src/core/blocks/text-blocks/base/block-text.d.ts +1 -1
- package/@ones-editor/core/src/core/input-handler/actions.d.ts +4 -0
- package/@ones-editor/core/src/core/input-handler/handle-delete.d.ts +4 -0
- package/@ones-editor/core/src/core/selection/actions/index.d.ts +3 -1
- package/@ones-editor/core/src/core/selection/actions/move-block-end.d.ts +2 -0
- package/@ones-editor/core/src/core/selection/actions/move-block-start.d.ts +2 -0
- package/@ones-editor/core/src/utils/character.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -2
- package/@ones-editor/ui/src/shortcuts/align-shortcuts.d.ts +2 -0
- package/@ones-editor/ui/src/shortcuts/index.d.ts +3 -2
- package/@ones-editor/ui/src/shortcuts/text-color-shortcuts.d.ts +2 -0
- package/@ones-editor/ui/src/shortcuts/text-style-shortcuts.d.ts +1 -2
- package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +3 -0
- package/@ones-editor/ui-base/src/color-button/index.d.ts +1 -2
- package/@ones-editor/ui-base/src/color-button/text-color-item.d.ts +2 -0
- package/dist/index.js +860 -489
- package/package.json +1 -1
|
@@ -30,8 +30,9 @@ export declare function createInsertionContentElement(insertionElement: Insertio
|
|
|
30
30
|
export declare function getInsertionContent(insertion: InsertionElement): InsertionContentElement;
|
|
31
31
|
export declare function getPrevBlock(block: BlockElement): BlockElement | null;
|
|
32
32
|
export declare function getNextBlock(block: BlockElement): BlockElement | null;
|
|
33
|
-
export declare function getPrevVisibleBlock(block: BlockElement): BlockElement | null;
|
|
34
|
-
export declare function getNextVisibleBlock(block: BlockElement): BlockElement | null;
|
|
33
|
+
export declare function getPrevVisibleBlock(block: BlockElement, matcher?: (block: BlockElement) => boolean): BlockElement | null;
|
|
34
|
+
export declare function getNextVisibleBlock(block: BlockElement, matcher?: (block: BlockElement) => boolean): BlockElement | null;
|
|
35
|
+
export declare function getBlocksBetween(start: BlockElement, end: BlockElement, matcher: (block: BlockElement) => boolean): BlockElement[];
|
|
35
36
|
export declare function getBlockIndex(block: BlockElement): number;
|
|
36
37
|
export declare function isInBlock(target: EventTarget | null): boolean;
|
|
37
38
|
export declare function isInBlockTools(target: EventTarget | null): boolean;
|
|
@@ -2,7 +2,7 @@ import { BlockElement, OnesEditor } from '../../../types';
|
|
|
2
2
|
import { DocBlockTextOp } from '../../../doc';
|
|
3
3
|
export declare function getTextAfterOffset(editor: OnesEditor, block: BlockElement, offset: number): string;
|
|
4
4
|
export declare function getTextBeforeOffset(editor: OnesEditor, block: BlockElement, offset: number): string;
|
|
5
|
-
export type OffsetCharType = 'box' | 'text' | 'space';
|
|
5
|
+
export type OffsetCharType = 'box' | 'text' | 'space' | 'cjk' | 'cjk_punctuation';
|
|
6
6
|
export interface OffsetInfo {
|
|
7
7
|
op: DocBlockTextOp;
|
|
8
8
|
charType: OffsetCharType;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { OnesEditor } from '../types';
|
|
2
2
|
export declare function editorHandleEnter(editor: OnesEditor, event: Event): boolean;
|
|
3
3
|
export declare function editorHandleDelete(editor: OnesEditor, event: Event): boolean;
|
|
4
|
+
export declare function editorHandleDeleteLeftWord(editor: OnesEditor, event: Event): boolean;
|
|
5
|
+
export declare function editorHandleDeleteRightWord(editor: OnesEditor, event: Event): boolean;
|
|
6
|
+
export declare function editorHandleDeleteAfterWords(editor: OnesEditor, event: Event): boolean;
|
|
7
|
+
export declare function editorHandleDeleteRightChar(editor: OnesEditor, event: Event): boolean;
|
|
4
8
|
export declare function editorHandleBackspace(editor: OnesEditor, event: Event): boolean;
|
|
5
9
|
export declare function editorHandleInsertBr(editor: OnesEditor, event: Event): boolean;
|
|
6
10
|
export declare function editorHandlePastePlainText(editor: OnesEditor): boolean;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { OnesEditor } from '../types';
|
|
2
2
|
export declare function handleEditorDelete(editor: OnesEditor, event: Event): void;
|
|
3
|
+
export declare function handleEditorDeleteLeftWord(editor: OnesEditor, event: Event): boolean;
|
|
4
|
+
export declare function handleEditorDeleteRightWord(editor: OnesEditor, event: Event): boolean;
|
|
5
|
+
export declare function handleEditorDeleteAfterWords(editor: OnesEditor): void;
|
|
6
|
+
export declare function handleEditorDeleteRightChar(editor: OnesEditor): void;
|
|
@@ -24,4 +24,6 @@ import { editorSelectPageUp } from './select-page-up';
|
|
|
24
24
|
import { editorSelectPageDown } from './select-page-down';
|
|
25
25
|
import { editorSelectAll, editorSelectContainer, isContainerSelectedAllChildBlocks } from './select-all';
|
|
26
26
|
import { editorSelectWord } from './select-word';
|
|
27
|
-
|
|
27
|
+
import { editorMoveBlockStart } from './move-block-start';
|
|
28
|
+
import { editorMoveBlockEnd } from './move-block-end';
|
|
29
|
+
export { editorMoveLeft, editorMoveRight, editorMoveUp, editorMoveDown, editorSelectDown, editorSelectUp, editorSelectLeft, editorSelectRight, editorSelectWord, editorMoveWordLeft, editorMoveWordEnd, editorSelectWordLeft, editorSelectWordEnd, editorMoveHome, editorMoveEnd, editorSelectHome, editorSelectEnd, editorMovePageUp, editorMovePageDown, editorSelectPageUp, editorSelectPageDown, editorSelectLineHome, editorSelectLineEnd, editorMoveLineHome, editorMoveLineEnd, editorMoveBlockStart, editorMoveBlockEnd, editorSelectAll, editorSelectContainer, isContainerSelectedAllChildBlocks, };
|
|
@@ -2,4 +2,5 @@ export declare function isNumber(str: string): boolean;
|
|
|
2
2
|
export declare function isLetter(str: string): boolean;
|
|
3
3
|
export declare function isSpace(str: string): boolean;
|
|
4
4
|
export declare function isCJK(str: string): boolean;
|
|
5
|
+
export declare function isCJKPunctuation(char: string): boolean;
|
|
5
6
|
export declare function trimChar(s: string, char: string): string;
|