@ones-editor/editor 0.0.5 → 0.0.6-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.
@@ -1,4 +1,3 @@
1
- import ResizeObserver from 'resize-observer-polyfill';
2
1
  import { OnesEditor, ContainerElement, BlockElement } from '../types';
3
2
  export declare class RootContainer {
4
3
  private editor;
@@ -1,4 +1,3 @@
1
- export type LANGS = keyof typeof langs;
2
1
  declare const langs: {
3
2
  'en-US': {
4
3
  name: string;
@@ -58,8 +57,8 @@ declare const langs: {
58
57
  };
59
58
  };
60
59
  };
61
- export declare function setLang(lang?: LANGS | null | undefined): void;
60
+ export declare function setLang(lang?: string | null | undefined): void;
62
61
  export declare function mergeLang(l: any): void;
63
62
  export declare function t(key: string, args?: Record<string, string>): string;
64
- export declare function getCurrentLang(): "en-US" | "zh-CN" | "ja-JP";
63
+ export type LANGS = keyof typeof langs;
65
64
  export {};
@@ -14,7 +14,7 @@ export interface ImageEmbedData extends DocEmbedData {
14
14
  }
15
15
  export interface ImageItemData {
16
16
  src: string;
17
- width: number;
17
+ width: number | 'auto';
18
18
  height: number | 'auto';
19
19
  flex: number;
20
20
  virtualSize: boolean;
@@ -1,19 +1,3 @@
1
- /// <reference types="lodash" />
2
- import { AbstractCommandBar, Popup } from '../../../../@ones-editor/ui-base';
3
1
  import { OnesEditor } from '../../../../@ones-editor/core';
4
2
  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
- }
19
3
  export declare function editMathjax(editor: OnesEditor, elem: HTMLElement, tex: string, onChange: OnEditChange): void;
@@ -3,7 +3,7 @@ export interface DocTableBlockData extends DocBlock {
3
3
  rows: number;
4
4
  cols: number;
5
5
  children: string[];
6
- colsWidth: number[];
6
+ colsWidth?: number[];
7
7
  showChart?: boolean;
8
8
  noBorder?: boolean;
9
9
  hasRowTitle?: boolean;