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

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.
@@ -34,3 +34,4 @@ export declare function getNextVisibleBlock(block: BlockElement): BlockElement |
34
34
  export declare function getBlockIndex(block: BlockElement): number;
35
35
  export declare function isInBlock(target: EventTarget | null): boolean;
36
36
  export declare function isInBlockTools(target: EventTarget | null): boolean;
37
+ export declare function isTitleBlock(block: BlockElement): boolean;
@@ -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 {};
@@ -12,7 +12,7 @@ export declare function hashCode(str: string): number;
12
12
  */
13
13
  export declare function abbreviation(name: string, maxLength?: number): string;
14
14
  declare enum EColor {
15
- blue = "#338FE5",
15
+ blue = "#0064FF",
16
16
  cyan = "#34AFDE",
17
17
  teal = "#2CB2AE",
18
18
  green = "#24B47E",
@@ -11,6 +11,6 @@ declare class EnforceWithDocumentTitleHandler implements OnesEditorInputHandler
11
11
  handleUpdateCompositionText(editor: OnesEditor): void;
12
12
  handleSelectionChange: (editor: OnesEditor) => void;
13
13
  private applyPlaceholder;
14
- private static isDocumentTitleBlock;
14
+ private isDocumentTitleBlock;
15
15
  }
16
16
  export default EnforceWithDocumentTitleHandler;
@@ -1,4 +1,5 @@
1
1
  export interface EnforceWithDocumentTitleHandlerOptions {
2
+ hideTitle?: boolean;
2
3
  headingLevel?: number;
3
4
  titlePlaceholder?: string;
4
5
  contentPlaceholder?: string | Element;
@@ -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;
@@ -12,6 +12,5 @@ export type OnesEditorMentionUser = {
12
12
  email?: string;
13
13
  };
14
14
  export type MentionOptions = {
15
- enableFirstBlock?: boolean;
16
15
  queryUsers: (editor: OnesEditor, text: string) => Promise<OnesEditorMentionUser[]>;
17
16
  };
@@ -2,5 +2,4 @@ import TocEmbed from './toc-embed';
2
2
  import './locale';
3
3
  export * from './toc-provider';
4
4
  export * from './heading-scroll';
5
- export * from './types';
6
5
  export { TocEmbed };