@ones-editor/editor 3.0.15-beta.1 → 3.0.16-beta.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.
@@ -132,9 +132,7 @@ export interface CommandItem {
132
132
  value?: string;
133
133
  order?: number;
134
134
  type?: CommandItemType;
135
- className?: string;
136
135
  element?: HTMLElement | ((item: CommandItem) => HTMLElement);
137
- useDefaultClickHandler?: boolean;
138
136
  icon?: string;
139
137
  childrenType?: 'menu' | 'toolbar' | 'mobile-bottom-menu';
140
138
  children?: CommandItem[];
@@ -24,7 +24,6 @@ export type GraphDataType = XmlData | XmlSvgData | SrcData;
24
24
  export type LANG = Record<string, string | Record<string, string>>;
25
25
  export type OnesEditorLang = 'zh-CN' | 'zh-HK' | 'ja-JP' | 'en-US';
26
26
  export interface DrawIoOptions {
27
- visible?: boolean;
28
27
  lang?: OnesEditorLang;
29
28
  cdn?: {
30
29
  drawioBaseUrl?: string;
@@ -32,9 +31,7 @@ export interface DrawIoOptions {
32
31
  drawioJs?: string;
33
32
  pako?: string;
34
33
  };
35
- menuItemSuffix?: (editor: OnesEditor) => Element;
36
34
  callbacks?: {
37
- onBeforeInsertDrawio?: (editor: OnesEditor) => boolean | undefined;
38
35
  onError?: (editor: OnesEditor, error: Error) => void;
39
36
  onCreateDrawIoFrame?: (editor: OnesEditor) => Promise<HTMLIFrameElement>;
40
37
  onCloseDrawIoFrame?: (editor: OnesEditor, iframe: HTMLIFrameElement) => boolean;
@@ -1,8 +1,5 @@
1
1
  import { OnesEditor, OnesEditorInputHandler } from '../../../../@ones-editor/core';
2
- import { MarkdownInputHandlerOptions } from './types';
3
2
  declare class MarkdownInputHandler implements OnesEditorInputHandler {
4
- private options?;
5
- constructor(options?: MarkdownInputHandlerOptions | undefined);
6
3
  handleAfterInsertText(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, text: string): boolean;
7
4
  handleBeforeKeyDown(editor: OnesEditor, event: KeyboardEvent): boolean;
8
5
  }
@@ -1,3 +1,2 @@
1
1
  import { OnesEditor } from '../../../../@ones-editor/core';
2
- import { MarkdownInputHandlerOptions } from './types';
3
- export declare function matchBlockStyle(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, options?: MarkdownInputHandlerOptions): boolean;
2
+ export declare function matchBlockStyle(editor: OnesEditor, containerId: string, blockIndex: number, offset: number): boolean;
@@ -15,9 +15,7 @@ export declare class ColorItem extends TextColorItem implements ToolbarItem {
15
15
  value?: string | undefined;
16
16
  order?: number | undefined;
17
17
  type?: import("@ones-editor/core").CommandItemType | undefined;
18
- className?: string | undefined;
19
18
  element?: HTMLElement | ((item: import("@ones-editor/core").CommandItem) => HTMLElement) | undefined;
20
- useDefaultClickHandler?: boolean | undefined;
21
19
  icon?: string | undefined;
22
20
  childrenType?: "menu" | "toolbar" | "mobile-bottom-menu" | undefined;
23
21
  children?: import("@ones-editor/core").CommandItem[] | undefined;
@@ -1,10 +1,8 @@
1
- import { DocBlockText, DocBlockTextAttributes, DocObject } from '../../../@ones-editor/core';
1
+ import { DocObject } from '../../../@ones-editor/core';
2
2
  import './types/marked-extended-latex.d';
3
- import { CustomTagToken } from './custom/tag';
4
3
  export { getBlocksWidth } from './tokens/block-tokens/table';
5
4
  interface MarkdownToDocOptions {
6
5
  font?: string | Element;
7
6
  htmlToDoc?: (html: string) => DocObject | null;
8
- customTagProcess?: (token: CustomTagToken, attributes: DocBlockTextAttributes) => DocBlockText | null | undefined;
9
7
  }
10
8
  export declare function markdownToDoc(markdown: string, options?: MarkdownToDocOptions): DocObject | null;
@@ -1,6 +1,5 @@
1
1
  import { marked } from 'marked';
2
2
  import { DocBlock, DocBlockText, DocBlockTextAttributes, DocObject } from '../../../../@ones-editor/core';
3
- import { CustomTagToken } from '../custom/tag';
4
3
  export type TextAndChildren = {
5
4
  text: DocBlockText;
6
5
  children: DocBlock[];
@@ -8,7 +7,6 @@ export type TextAndChildren = {
8
7
  export type TokensToText = (tokens: marked.Token[], attributes: DocBlockTextAttributes, options: TokenToBlockOptions) => DocBlockText;
9
8
  export type TokensToBlocks = (tokens: marked.Token[], options: TokenToBlockOptions) => DocBlock[];
10
9
  export type TokensToTextWithChildren = (tokens: marked.Token[], options: TokenToBlockOptions) => TextAndChildren;
11
- export type CustomTagProcess = (token: CustomTagToken, attributes: DocBlockTextAttributes) => DocBlockText | null | undefined;
12
10
  export type HtmlToDoc = (html: string) => DocObject | null;
13
11
  export type TokenToBlockOptions = {
14
12
  font?: string | Element;
@@ -18,5 +16,4 @@ export type TokenToBlockOptions = {
18
16
  tokensToTextWithChildren: TokensToTextWithChildren;
19
17
  htmlToDoc?: HtmlToDoc;
20
18
  listLevel: number;
21
- customTagProcess?: CustomTagProcess;
22
19
  };