@ones-editor/editor 1.1.8-beta.8 → 1.1.8-beta.9
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/code-block/languages.d.ts +1 -1
- package/@ones-editor/code-block/src/locale/en-us.d.ts +0 -1
- package/@ones-editor/code-block/src/locale/ja-jp.d.ts +0 -1
- package/@ones-editor/code-block/src/locale/zh-cn.d.ts +0 -1
- package/@ones-editor/comments/src/comments-render/index.d.ts +0 -1
- package/@ones-editor/core/src/core/containers/root-container.d.ts +1 -0
- package/@ones-editor/core/src/core/doc/rich-text/replace-text.d.ts +0 -8
- package/@ones-editor/core/src/core/editor/actions/index.d.ts +1 -0
- package/@ones-editor/core/src/core/editor/actions/replace-text.d.ts +10 -0
- package/@ones-editor/core/src/core/editor/actions/update-block-text.d.ts +3 -3
- package/@ones-editor/core/src/core/editor/actions/update-box-data.d.ts +2 -2
- package/@ones-editor/core/src/core/editor/editor-dom/editor-dom.d.ts +3 -1
- package/@ones-editor/core/src/core/editor/index.d.ts +1 -0
- package/@ones-editor/core/src/core/selection/actions/move-simple-block-position.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +3 -2
- package/@ones-editor/core/src/utils/animate-scroll.d.ts +4 -0
- package/@ones-editor/find-dialog/src/find-dialog.d.ts +4 -1
- package/@ones-editor/find-dialog/src/highlights/highlight-dom.d.ts +4 -0
- package/@ones-editor/mathjax/src/index.d.ts +2 -0
- package/@ones-editor/paste-special/src/paste-special-button.d.ts +1 -0
- package/@ones-editor/table-block/src/index.d.ts +2 -2
- package/@ones-editor/table-block/src/table-block/index.d.ts +1 -0
- package/@ones-editor/table-block/src/table-block/table-dom.d.ts +1 -0
- package/@ones-editor/table-block/src/types.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui-base/src/icons/index.d.ts +1 -2
- package/@ones-editor/ui-base/src/input/create-input.d.ts +1 -2
- package/@ones-editor/versions/src/types.d.ts +1 -0
- package/@ones-editor/versions/src/version-dialog/version-list.d.ts +1 -0
- package/dist/index.js +185 -196
- package/dist/lang/en-us.d.ts +1 -0
- package/dist/lang/ja-jp.d.ts +1 -0
- package/dist/lang/zh-cn.d.ts +1 -0
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/@ones-editor/status/package.json +0 -7
- package/@ones-editor/status/src/dom/input.d.ts +0 -1
- package/@ones-editor/status/src/dom/overflow-tooltip-tag.d.ts +0 -10
- package/@ones-editor/status/src/dom/status-palette.d.ts +0 -6
- package/@ones-editor/status/src/index.d.ts +0 -4
- package/@ones-editor/status/src/locale/en-us.d.ts +0 -25
- package/@ones-editor/status/src/locale/index.d.ts +0 -1
- package/@ones-editor/status/src/locale/ja-jp.d.ts +0 -25
- package/@ones-editor/status/src/locale/zh-cn.d.ts +0 -25
- package/@ones-editor/status/src/status-box-command.d.ts +0 -7
- package/@ones-editor/status/src/status-box-data.d.ts +0 -5
- package/@ones-editor/status/src/status-box-editor.d.ts +0 -21
- package/@ones-editor/status/src/status-box.d.ts +0 -4
- package/@ones-editor/status/src/types.d.ts +0 -8
|
@@ -67,7 +67,7 @@ import 'prismjs/components/prism-vhdl';
|
|
|
67
67
|
import 'prismjs/components/prism-visual-basic';
|
|
68
68
|
import 'prismjs/components/prism-wasm';
|
|
69
69
|
import 'prismjs/components/prism-yaml';
|
|
70
|
-
declare const SUPPORTED_LANGUAGES:
|
|
70
|
+
declare const SUPPORTED_LANGUAGES: {
|
|
71
71
|
abap: {
|
|
72
72
|
name: string;
|
|
73
73
|
aliases: string[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BlockElement, BlockPath, DocBlock, DocBlockTextAttributes, OnesEditor, OnesEditorBlockRenderer, OnesEditorBlockRenderResult } from '../../../../@ones-editor/core';
|
|
2
2
|
export declare class OnesEditorCommentsRender implements OnesEditorBlockRenderer {
|
|
3
3
|
renderText(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
|
|
4
|
-
renderBox(editor: OnesEditor, path: BlockPath, attributes: DocBlockTextAttributes): OnesEditorBlockRenderResult;
|
|
5
4
|
renderBlock(editor: OnesEditor, path: BlockPath, blockData: DocBlock): OnesEditorBlockRenderResult;
|
|
6
5
|
updateBlock(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocBlock): void;
|
|
7
6
|
}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import { DocBlockText } from '../doc';
|
|
2
2
|
export declare function replaceText(text: DocBlockText, start: number, end: number, replaceWith: string): DocBlockText;
|
|
3
|
-
export interface FindTextRange {
|
|
4
|
-
start: number;
|
|
5
|
-
end: number;
|
|
6
|
-
}
|
|
7
|
-
export declare function findAllText(text: DocBlockText, find: string): FindTextRange[];
|
|
8
|
-
export declare function replaceAllText(text: DocBlockText, find: string, replaceWith: string, replaceResult?: {
|
|
9
|
-
count: number;
|
|
10
|
-
}): DocBlockText;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OnesEditor } from '../../types';
|
|
2
|
+
import { DocBlockText } from '../../doc';
|
|
3
|
+
export interface FindTextRange {
|
|
4
|
+
start: number;
|
|
5
|
+
end: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function findAllText(editor: OnesEditor, text: DocBlockText, find: string, ignoreBox?: boolean): FindTextRange[];
|
|
8
|
+
export declare function replaceAllText(editor: OnesEditor, text: DocBlockText, find: string, replaceWith: string, replaceResult?: {
|
|
9
|
+
count: number;
|
|
10
|
+
}): DocBlockText;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnesEditor, BlockElement
|
|
1
|
+
import { OnesEditor, BlockElement } from '../../types';
|
|
2
2
|
import { DocBlockText, DocBlockTextActions } from '../../doc';
|
|
3
|
-
export declare function editorUpdateBlockText(editor: OnesEditor, block: BlockElement, ops: DocBlockTextActions
|
|
4
|
-
export declare function editorSetBlockText(editor: OnesEditor, block: BlockElement, newText: DocBlockText
|
|
3
|
+
export declare function editorUpdateBlockText(editor: OnesEditor, block: BlockElement, ops: DocBlockTextActions): DocBlockText;
|
|
4
|
+
export declare function editorSetBlockText(editor: OnesEditor, block: BlockElement, newText: DocBlockText): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnesEditor } from '../../types';
|
|
2
2
|
import { DocBox } from '../../doc';
|
|
3
|
-
export declare function editorUpdateBoxData(editor: OnesEditor, boxData: DocBox
|
|
3
|
+
export declare function editorUpdateBoxData(editor: OnesEditor, boxData: DocBox): void;
|
|
@@ -5,5 +5,7 @@ export declare function editorGetClientBottom(editor: OnesEditor): number;
|
|
|
5
5
|
export declare function editorGetVisibleRect(editor: OnesEditor): DOMRect;
|
|
6
6
|
export declare function isBlockPositionVisible(editor: OnesEditor, pos: SimpleBlockPosition): boolean;
|
|
7
7
|
export declare function isChildContainerVisible(editor: OnesEditor, container: ContainerElement): boolean;
|
|
8
|
+
export declare function scrollIntoView(editor: OnesEditor, target: HTMLElement, options?: {
|
|
9
|
+
animation?: boolean;
|
|
10
|
+
}): void;
|
|
8
11
|
export declare function editorScrollIntoView(editor: OnesEditor): void;
|
|
9
|
-
export declare function scrollIntoView(dom: Element, options?: any): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BlockPosition, OnesEditor, SimpleBlockPosition, MoveDirection } from '../../types';
|
|
2
|
-
export declare function moveSimpleBlockPosition(editor: OnesEditor, old: SimpleBlockPosition, type:
|
|
2
|
+
export declare function moveSimpleBlockPosition(editor: OnesEditor, old: SimpleBlockPosition, direction: MoveDirection, type: 'select' | 'move'): BlockPosition | null;
|
|
@@ -67,6 +67,7 @@ export interface Box {
|
|
|
67
67
|
toStandardText?: (editor: OnesEditor, box: DocBox) => Promise<DocBlockText | undefined>;
|
|
68
68
|
getBoxProperties?: (editor: OnesEditor, boxElement: BoxElement) => BoxProperties;
|
|
69
69
|
getResources?: (editor: OnesEditor, box: DocBox) => string[] | null;
|
|
70
|
+
matchText?: (editor: OnesEditor, box: DocBox, keyword: string) => boolean;
|
|
70
71
|
}
|
|
71
72
|
export interface Insertion {
|
|
72
73
|
insertionType: string;
|
|
@@ -77,6 +78,7 @@ export interface InsertEmptyBlockOptions {
|
|
|
77
78
|
containerId: string;
|
|
78
79
|
blockIndex: number;
|
|
79
80
|
data?: Record<string, unknown>;
|
|
81
|
+
from?: 'block-menu' | 'quick-menu';
|
|
80
82
|
}
|
|
81
83
|
export interface EmbedOptions {
|
|
82
84
|
name: string;
|
|
@@ -440,7 +442,6 @@ export type OnesEditorCustomCreator = (editor: OnesEditor) => OnesEditorCustom;
|
|
|
440
442
|
export interface CloneBlockResultInfo {
|
|
441
443
|
containerIdMap: Map<string, string>;
|
|
442
444
|
blockIdMap: Map<string, string>;
|
|
443
|
-
boxIdMap: Map<string, string>;
|
|
444
445
|
}
|
|
445
446
|
export interface OnesEditorDomEvents extends OnesEditorCustom {
|
|
446
447
|
addEventListener: <T = Event>(element: Element | Document | Window, eventName: string, eventHandler: (editor: OnesEditor, event: T) => void) => void;
|
|
@@ -541,7 +542,7 @@ export interface OnesEditor extends TypedEmitter<OnesEditorEvents> {
|
|
|
541
542
|
deleteChildContainers: (containerIds: string[]) => void;
|
|
542
543
|
updateBlockData: (block: BlockElement, data: DocBlockAttributes, newRange?: SelectionRange) => DocBlock;
|
|
543
544
|
updateEmbedData: (block: BlockElement, data: DocEmbedData, newRange?: SelectionRange) => DocBlock;
|
|
544
|
-
updateBoxData: (boxData: DocBox
|
|
545
|
+
updateBoxData: (boxData: DocBox) => void;
|
|
545
546
|
updateCompositionText: (text: string, end: boolean) => void;
|
|
546
547
|
getColor: (index: number, type?: string) => string;
|
|
547
548
|
}
|
|
@@ -8,6 +8,8 @@ export interface IUserOptions {
|
|
|
8
8
|
minDuration?: number;
|
|
9
9
|
speed?: number;
|
|
10
10
|
verticalOffset?: number;
|
|
11
|
+
disableHorizontal?: boolean;
|
|
12
|
+
disableVertical?: boolean;
|
|
11
13
|
}
|
|
12
14
|
export interface IOptions {
|
|
13
15
|
cancelOnUserAction: boolean;
|
|
@@ -18,6 +20,8 @@ export interface IOptions {
|
|
|
18
20
|
minDuration: number;
|
|
19
21
|
speed: number;
|
|
20
22
|
verticalOffset: number;
|
|
23
|
+
disableHorizontal?: boolean;
|
|
24
|
+
disableVertical?: boolean;
|
|
21
25
|
}
|
|
22
26
|
declare function animateScrollTo(y: number, userOptions?: IUserOptions): Promise<boolean>;
|
|
23
27
|
declare function animateScrollTo(coords: TCoords, userOptions?: IUserOptions): Promise<boolean>;
|
|
@@ -41,7 +41,10 @@ export default class FindDialog {
|
|
|
41
41
|
}): void;
|
|
42
42
|
gotoNext(): void;
|
|
43
43
|
gotoPrev(): void;
|
|
44
|
-
updateSearchStatus(curr: number,
|
|
44
|
+
updateSearchStatus(curr: number, highlights: {
|
|
45
|
+
ele: HTMLElement;
|
|
46
|
+
type: 'text' | 'box';
|
|
47
|
+
}[]): void;
|
|
45
48
|
doSearch: import("lodash").DebouncedFunc<(options: {
|
|
46
49
|
keepReplaceResult: boolean;
|
|
47
50
|
gotoFirstSearchResult: boolean;
|
|
@@ -6,6 +6,10 @@ export declare function getAllReplaceResultHighlights(editor: OnesEditor): HTMLE
|
|
|
6
6
|
export declare function getBlockHighlight(block: BlockElement): HTMLElement[];
|
|
7
7
|
export declare function clearBlockHighlight(block: BlockElement): void;
|
|
8
8
|
export declare function getHighlightCount(editor: OnesEditor): number;
|
|
9
|
+
export declare function getHighlightInfo(editor: OnesEditor): {
|
|
10
|
+
ele: HTMLElement;
|
|
11
|
+
type: 'text' | 'box';
|
|
12
|
+
}[];
|
|
9
13
|
export declare function getHighlightByIndex(editor: OnesEditor, index: number): HTMLElement | null;
|
|
10
14
|
export declare function createFindHighlight(editor: OnesEditor, block: BlockElement, start: number, end: number): void;
|
|
11
15
|
export declare function createReplaceResultHighligh(editor: OnesEditor, block: BlockElement, start: number, end: number): void;
|
|
@@ -4,4 +4,6 @@ import MathjaxEmbed from './mathjax-embed';
|
|
|
4
4
|
import './mathjax-style.scss';
|
|
5
5
|
import './locale';
|
|
6
6
|
import ConvertEmptyMathjaxBoxInputHandler from './mathjax-box/convert-mathjax';
|
|
7
|
+
import { MathjaxOptions } from './mathjax/convert';
|
|
8
|
+
export type { MathjaxOptions };
|
|
7
9
|
export { MathjaxBox, MathjaxEmbed, createEmptyMathjaxBox, editMathjaxBox, ConvertEmptyMathjaxBoxInputHandler, };
|
|
@@ -14,6 +14,7 @@ export default class PasteSpecialButton {
|
|
|
14
14
|
private cleaningDoc;
|
|
15
15
|
handlePasteSpecial: (bar: AbstractCommandBar, item: CommandItem) => void;
|
|
16
16
|
handleClose: () => void;
|
|
17
|
+
handleSelectionChange: () => void;
|
|
17
18
|
hide(): void;
|
|
18
19
|
clearCheckedState(): void;
|
|
19
20
|
destroy(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import TableBlock from './table-block';
|
|
1
|
+
import TableBlock, { includeBigTable } from './table-block';
|
|
2
2
|
import { TableBlockCommandProvider } from './commands';
|
|
3
3
|
import './locale';
|
|
4
4
|
import './table-style.scss';
|
|
5
5
|
import TableShortcuts from './table-block/table-shortcuts';
|
|
6
6
|
export * from './types';
|
|
7
|
-
export { TableBlock, TableBlockCommandProvider, TableShortcuts };
|
|
7
|
+
export { TableBlock, TableBlockCommandProvider, TableShortcuts, includeBigTable };
|
|
@@ -15,3 +15,4 @@ export declare function getParentTableBlock(block: BlockElement): BlockElement |
|
|
|
15
15
|
export declare function getTableCol(table: HTMLTableElement, colIndex: number): HTMLTableColElement;
|
|
16
16
|
export declare function isValid(tableBlock: BlockElement): boolean;
|
|
17
17
|
export declare function resetBlockHelperPos(scrollContainer: ScrollContainer): void;
|
|
18
|
+
export declare function includeBigTable(editor: OnesEditor): boolean;
|