@ones-editor/editor 0.0.3-beta.57 → 0.0.3-beta.58

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.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@ones-editor/auto-link",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./src/index.ts",
7
+ "types": "src/index.d.ts"
8
+ }
@@ -0,0 +1,3 @@
1
+ import { ShortcutRecords } from '../../../@ones-editor/core';
2
+ declare const AutoLinkShortcuts: ShortcutRecords;
3
+ export { AutoLinkShortcuts, };
@@ -4,7 +4,7 @@ export declare class DragPreviewImage {
4
4
  private startPosition;
5
5
  constructor(editor: OnesEditor);
6
6
  private dragContainer;
7
- handleDragStart: (e: DragEvent, pendingUrl: string | PromiseLike<string>) => Promise<void>;
7
+ handleDragStart: (e: DragEvent, preview: HTMLElement) => Promise<void>;
8
8
  handleDrag: (e: DragEvent) => void;
9
9
  handleDragEnd: () => void;
10
10
  }
@@ -1,5 +1,6 @@
1
1
  import { DocObject } from '../../doc';
2
2
  import { BlockElement, OnesEditor } from '../../types';
3
+ export declare function injectDocToHtmlFragment(htmlFragment: string, doc: DocObject): string;
3
4
  export declare function addMetaToDoc(editor: OnesEditor, doc: DocObject): void;
4
5
  export type BeforeCopyCallback = (editor: OnesEditor, event: ClipboardEvent, doc: DocObject) => DocObject | boolean | undefined;
5
6
  export declare function editorCopy(editor: OnesEditor, event: ClipboardEvent, beforeCopy?: BeforeCopyCallback): void;
@@ -1 +1 @@
1
- export { editorCopyBlock } from './clipboard/copy';
1
+ export { editorCopyBlock, addMetaToDoc, injectDocToHtmlFragment } from './clipboard/copy';
@@ -3,3 +3,4 @@ export declare const FILL_CHAR = "\u200B";
3
3
  export declare function toPlainText(ops: Op[], options?: {
4
4
  boxReplacement: string;
5
5
  }): string;
6
+ export declare function toPlainTextKeepLength(ops: Op[]): string;
@@ -95,6 +95,7 @@ export interface Embed {
95
95
  offset: number;
96
96
  data?: DocBlockAttributes;
97
97
  }) => ConvertBlockResult | null;
98
+ toStandardDoc?: (editor: OnesEditor, blockData: DocBlock, doc: DocObject) => Promise<DocObject | undefined>;
98
99
  }
99
100
  export interface ConvertBlockResult {
100
101
  blockData: DocBlock;
@@ -2,7 +2,7 @@ import { BlockElement, OnesEditor, OnesEditorCustom } from '../../../../@ones-ed
2
2
  import './mindmap.scss';
3
3
  export default class OnesEditorListMindmap implements OnesEditorCustom {
4
4
  private editor;
5
- toMindmapButton: HTMLButtonElement;
5
+ toMindmapButton: HTMLElement;
6
6
  currentBlock: BlockElement | null;
7
7
  constructor(editor: OnesEditor);
8
8
  static get(editor: OnesEditor): OnesEditorListMindmap | null;
@@ -1,2 +1,2 @@
1
1
  import type { OnesEditor } from '../../../../../@ones-editor/core';
2
- export declare function createToMindmapButton(editor: OnesEditor): HTMLButtonElement;
2
+ export declare function createToMindmapButton(editor: OnesEditor): HTMLDivElement;
@@ -2,3 +2,4 @@ import { marked } from 'marked';
2
2
  import { DocBlock } from '../../../../../@ones-editor/core';
3
3
  import { TokenToBlockOptions } from '../base';
4
4
  export declare function paragraphToBlocks(token: marked.Tokens.Paragraph, options: TokenToBlockOptions): DocBlock[];
5
+ export declare function textToBlocks(token: marked.Tokens.Text, options: TokenToBlockOptions): DocBlock[];
@@ -1,3 +1,3 @@
1
1
  import { OnesEditor } from '../../../../@ones-editor/core';
2
- export type OnEditChange = (tex: string) => void;
2
+ export type OnEditChange = (tex: string, end: boolean) => void;
3
3
  export declare function editMathjax(editor: OnesEditor, elem: HTMLElement, tex: string, onChange: OnEditChange): void;
@@ -1,7 +1,7 @@
1
1
  import type { OnesEditorCustom, OnesEditor } from '../../../@ones-editor/core';
2
2
  export default class OnesEditorBlockMention implements OnesEditorCustom {
3
3
  private editor;
4
- mentionButton: HTMLButtonElement;
4
+ mentionButton: HTMLElement;
5
5
  constructor(editor: OnesEditor);
6
6
  private shouldBlockShowMention;
7
7
  private handleHoveringBlock;
@@ -1,2 +1,2 @@
1
1
  import type { OnesEditor } from '../../../../@ones-editor/core';
2
- export declare function createMentionButton(editor: OnesEditor): HTMLButtonElement;
2
+ export declare function createMentionButton(editor: OnesEditor): HTMLDivElement;
@@ -6,3 +6,4 @@ export declare enum TABLE_CLASS {
6
6
  }
7
7
  export declare const TABLE_BAR_WIDTH = 6;
8
8
  export declare const INSERT_BUTTON_SIZE = 20;
9
+ export declare const TABLE_CELL_MENU_BUTTON_CLASS = "table-cell-menu-btn";