@ones-editor/editor 0.0.3-beta.207 → 0.0.3-beta.209

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.
@@ -19,10 +19,12 @@ export default class TextStyleItem implements BlockMenuItem {
19
19
  id: string;
20
20
  name: string;
21
21
  element: HTMLElement;
22
+ private textStylesTooltips;
22
23
  constructor(editor: OnesEditor, block: BlockElement, options: TextStyleItemOptions);
23
24
  createItemElement(editor: OnesEditor, block: BlockElement): HTMLDivElement;
24
25
  private createHeadingItemElement;
25
26
  private createListItemElement;
26
27
  createItem(id: string, icon: string, parent: HTMLElement, active?: boolean): void;
27
28
  handleClick: (editor: OnesEditor, event: Event) => void;
29
+ private calcTextStyleItemTooltipsEnum;
28
30
  }
@@ -2,3 +2,4 @@ import { CodeBlock, CodeLineBlock, CodeTextDecorator } from './code-block';
2
2
  import './locale';
3
3
  export * from './code-block/types';
4
4
  export { CodeBlock, CodeLineBlock, CodeTextDecorator };
5
+ export { isCodeBlock } from './code-block/code-block-dom';
@@ -0,0 +1,2 @@
1
+ import GraphIcon from './graph-icon.svg?raw';
2
+ export { GraphIcon, };
@@ -7,6 +7,8 @@ export default abstract class GraphBase {
7
7
  protected editor: OnesEditor;
8
8
  logger: Logger;
9
9
  editing: boolean;
10
+ private graphEmbedContent;
11
+ private status;
10
12
  constructor(editor: OnesEditor, graphType: GraphType, codeEmbedDataKey: string);
11
13
  protected abstract code2ObjectUrl(code: string): Promise<string>;
12
14
  protected abstract code2ResourceId(code: string): Promise<string>;
@@ -17,10 +19,11 @@ export default abstract class GraphBase {
17
19
  createEmbedContent(content: BlockContentElement, block: DocEmbedBlock): void;
18
20
  updateEmbedContent(content: BlockContentElement, block: DocEmbedBlock): void;
19
21
  protected updateImage(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, err: Error | null): Promise<void>;
20
- protected errorBoundary(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null): void;
21
- protected emptyContent(embed: HTMLDivElement): void;
22
- protected updateClasses(embed: HTMLDivElement, code: string | undefined, err: Error | null): void;
22
+ protected errorBoundary(embed: HTMLDivElement, code: string | undefined, url: string | undefined | null, reason: 'imageLoadError' | 'grammarError'): void;
23
+ protected emptyContent(): void;
24
+ protected updateSpecialClasses(embed: HTMLDivElement, code: string | undefined, err: Error | null): void;
23
25
  editGraph(content: BlockContentElement): void;
24
26
  getBlockProperties(block: BlockElement, properties?: GraphEmbedBlockProperties): BlockProperties;
25
27
  private hasChanged;
28
+ private removeStatusContent;
26
29
  }
@@ -1,4 +1,4 @@
1
- import { MarkdownInputHandler } from './markdown-shortcuts';
1
+ import { MarkdownInputHandler, converterIntercept } from './markdown-shortcuts';
2
2
  import './i18n';
3
3
  export * from './enforce-with-document-title';
4
- export { MarkdownInputHandler };
4
+ export { MarkdownInputHandler, converterIntercept };
@@ -1,2 +1,3 @@
1
1
  import MarkdownInputHandler from './markdown-input-handler';
2
- export { MarkdownInputHandler, };
2
+ import { converterIntercept } from './match-block-convert';
3
+ export { converterIntercept, MarkdownInputHandler, };
@@ -1,2 +1,3 @@
1
1
  import { OnesEditor } from '../../../../@ones-editor/core';
2
+ export declare function converterIntercept(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, type: 'enter' | 'space'): boolean;
2
3
  export declare function matchBlockConvert(editor: OnesEditor, containerId: string, blockIndex: number, offset: number, type: 'enter' | 'space'): boolean;
@@ -1,3 +1,19 @@
1
+ /// <reference types="lodash" />
2
+ import { AbstractCommandBar, Popup } from '../../../../@ones-editor/ui-base';
1
3
  import { OnesEditor } from '../../../../@ones-editor/core';
2
4
  export type OnEditChange = (tex: string, end: boolean) => void;
5
+ export default class MathjaxEditor {
6
+ editMathjaxPopup: Popup | null;
7
+ onChange: OnEditChange | null;
8
+ tex: string;
9
+ private observer;
10
+ editMathjax(elem: HTMLElement, tex: string, onChange: OnEditChange): void;
11
+ handleClose: (commandBar: AbstractCommandBar) => void;
12
+ handleKeyup: (event: KeyboardEvent) => void;
13
+ handleChange: import("lodash").DebouncedFunc<(text: string) => void>;
14
+ createPopupContent(tex: string): HTMLTextAreaElement;
15
+ textareaWatcher(textarea: HTMLTextAreaElement): void;
16
+ getTextarea(): HTMLTextAreaElement;
17
+ destroy(): void;
18
+ }
3
19
  export declare function editMathjax(editor: OnesEditor, elem: HTMLElement, tex: string, onChange: OnEditChange): void;