@worktile/theia 2.4.1 → 2.4.2

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.
@@ -31,6 +31,7 @@ export interface AutoFormatRule {
31
31
  * - inline – insert mark between markups. Should be used with `between`.
32
32
  */
33
33
  mode?: 'block' | 'inline';
34
+ key?: string;
34
35
  /**
35
36
  * When using `inline` mode – if false, do not format when the string can be trimmed.
36
37
  */
@@ -5,12 +5,14 @@ import { ElementOptionsInfo } from './valid-children-types';
5
5
  import { Predicate } from '../utils/match';
6
6
  import { ToolbarOption } from './toolbar';
7
7
  import { FontSizes } from '../constants/node-types';
8
+ import { AutoFormatRule } from './auto-format';
8
9
  export interface TheEditor extends AngularEditor, HistoryEditor {
9
10
  renderElement: (element: Element) => ViewType;
10
11
  renderLeaf: (text: Text) => ViewType;
11
12
  insertElement: (element: Element) => void;
12
13
  isContainer: (element: Element) => boolean;
13
14
  extraElementOptions: ElementOptionsInfo[];
15
+ extraAutoFormatRules: AutoFormatRule[];
14
16
  disabled: boolean;
15
17
  [key: string]: any;
16
18
  }
@@ -81,6 +83,7 @@ export interface TheOptions {
81
83
  toolbar?: ToolbarOption;
82
84
  disablePlugins?: string[];
83
85
  extraElementOptions?: ElementOptionsInfo[];
86
+ extraAutoFormatRules?: AutoFormatRule[];
84
87
  }
85
88
  export declare type NodeMatch<T = Node> = Predicate<T>;
86
89
  export interface MatchOptions<T = Node> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worktile/theia",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "theia editor",
5
5
  "author": "YanDong <nanianqiumo@foxmail.com>",
6
6
  "homepage": "https://github.com/atinc/theia#readme",
@@ -1,2 +1 @@
1
- import { WithAutoFormatOptions } from '../../interfaces/auto-format';
2
- export declare const withAutoFormat: ({ rules }: WithAutoFormatOptions) => <T extends import("@worktile/theia").TheEditor>(editor: T) => T;
1
+ export declare const withAutoFormat: () => <T extends import("@worktile/theia").TheEditor>(editor: T) => T;