@ones-editor/editor 0.0.7-beta.1 → 0.0.7-beta.10

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.
@@ -1,8 +1,11 @@
1
+ import ResizeObserver from 'resize-observer-polyfill';
1
2
  import { OnesEditor, ContainerElement, BlockElement } from '../types';
2
3
  export declare class RootContainer {
3
4
  private editor;
4
5
  rootContainer: ContainerElement;
5
6
  resizeObserver: ResizeObserver;
7
+ private isMouseDown;
8
+ private bindEvent;
6
9
  constructor(editor: OnesEditor, rootContainer: ContainerElement);
7
10
  private bindEvents;
8
11
  private unbindEvents;
@@ -1,3 +1,4 @@
1
+ export type LANGS = keyof typeof langs;
1
2
  declare const langs: {
2
3
  'en-US': {
3
4
  name: string;
@@ -57,8 +58,8 @@ declare const langs: {
57
58
  };
58
59
  };
59
60
  };
60
- export declare function setLang(lang?: string | null | undefined): void;
61
+ export declare function setLang(lang?: LANGS | null | undefined): void;
61
62
  export declare function mergeLang(l: any): void;
62
63
  export declare function t(key: string, args?: Record<string, string>): string;
63
- export type LANGS = keyof typeof langs;
64
+ export declare function getCurrentLang(): "en-US" | "zh-CN" | "ja-JP";
64
65
  export {};
@@ -0,0 +1,2 @@
1
+ import GraphIcon from './graph-icon.svg?raw';
2
+ export { GraphIcon, };
@@ -3,6 +3,7 @@ export declare class HeadingBlockCollapseButton implements OnesEditorCustom {
3
3
  private editor;
4
4
  constructor(editor: OnesEditor);
5
5
  handleLoad: () => void;
6
+ handleReadonlyChanged: () => void;
6
7
  handleHoverBlock: (hoveringBlock: BlockElement | null, oldHoveringBlock: BlockElement | null) => void;
7
8
  handleClick: (editor: OnesEditor, event: MouseEvent) => void;
8
9
  showCollapseButtons(): void;
@@ -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;
@@ -7,6 +7,7 @@ import './sharedb-ext';
7
7
  export declare class AuthConnection {
8
8
  url: string;
9
9
  private reauthFunc?;
10
+ enabled: boolean;
10
11
  connection?: Connection;
11
12
  ws?: ReconnectingWebSocket;
12
13
  retryCount: number;
@@ -5,4 +5,3 @@ export declare function updateBarsDangerStatus(editor: OnesEditor, tableBlock: B
5
5
  export declare function updateCellsDangerStatus(editor: OnesEditor, tableBlock: BlockElement, isDanger?: boolean, isCol?: boolean): void;
6
6
  export declare function updateCellBarsDangerStatus(editor: OnesEditor, tableBlock: BlockElement, isDanger?: boolean, isCol?: boolean): void;
7
7
  export declare function createEntireRowAndColumnRange(editor: OnesEditor, tableBlock: BlockElement, isCol: boolean): import("@ones-editor/core").EditorSimpleSelectionRange | import("@ones-editor/core").EditorComplexSelectionRange;
8
- export declare function getHandlerContainers(editor: OnesEditor, block: BlockElement): import("@ones-editor/core").ContainerElement[];