@ones-editor/editor 0.0.3-beta.56 → 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.
Files changed (27) hide show
  1. package/@ones-editor/auto-link/package.json +8 -0
  2. package/@ones-editor/auto-link/src/index.d.ts +3 -0
  3. package/@ones-editor/block-locker/src/index.d.ts +2 -0
  4. package/@ones-editor/block-menu/src/block-menu-button/drag-preview/index.d.ts +1 -1
  5. package/@ones-editor/core/src/core/composition/clipboard/copy.d.ts +1 -0
  6. package/@ones-editor/core/src/core/composition/index.d.ts +1 -1
  7. package/@ones-editor/core/src/core/doc/to-plain-text.d.ts +1 -0
  8. package/@ones-editor/core/src/core/types.d.ts +1 -0
  9. package/@ones-editor/drawio-embed/src/helper/index.d.ts +3 -3
  10. package/@ones-editor/list-block/src/mindmap/index.d.ts +1 -1
  11. package/@ones-editor/list-block/src/mindmap/to-mindmap/index.d.ts +1 -1
  12. package/@ones-editor/markdown-to-doc/src/tokens/block-tokens/paragraph.d.ts +1 -0
  13. package/@ones-editor/mathjax/src/mathjax-box/mathjax-editor.d.ts +1 -1
  14. package/@ones-editor/mention/src/block-mention.d.ts +1 -1
  15. package/@ones-editor/mention/src/dom/mention-button.d.ts +1 -1
  16. package/@ones-editor/table-block/src/constant/index.d.ts +1 -0
  17. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  18. package/@ones-editor/ui/src/index.d.ts +2 -3
  19. package/@ones-editor/ui/src/quick-menu/basic-commands.d.ts +5 -0
  20. package/@ones-editor/ui/src/quick-menu/index.d.ts +3 -0
  21. package/@ones-editor/ui/src/quick-menu/inline-box-items.d.ts +8 -15
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +147 -145
  24. package/dist/lang/en-us.d.ts +1 -0
  25. package/dist/lang/zh-cn.d.ts +1 -0
  26. package/package.json +1 -1
  27. /package/@ones-editor/block-menu/src/block-menu-button/{drag-drop → drag-preview}/element-to-data-url.d.ts +0 -0
@@ -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, };
@@ -2,4 +2,6 @@ import BlockLockerHook from './hook';
2
2
  import './style.scss';
3
3
  import './i18n';
4
4
  export * from './helper';
5
+ export * from './actions/lock-block';
6
+ export * from './actions/unlock-block';
5
7
  export { BlockLockerHook };
@@ -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;
@@ -1,4 +1,4 @@
1
- import type { OnesEditor, BlockContentElement } from '../../../../@ones-editor/core';
1
+ import type { OnesEditor, BlockElement } from '../../../../@ones-editor/core';
2
2
  import { type EmbedElement, DrawIoData, GraphDataType, XmlData, XmlSvgData, SrcData, DrawIoOptions } from '../../types';
3
3
  import '../../types/window.d';
4
4
  export declare function getDrawioOptions(editor: OnesEditor): DrawIoOptions;
@@ -11,8 +11,8 @@ export declare function initializeDrawioIframe(editor: OnesEditor): Promise<{
11
11
  drawioIframe: HTMLIFrameElement;
12
12
  exit: () => void;
13
13
  }>;
14
- export declare function contactWithIframe(editor: OnesEditor, block: BlockContentElement, drawIoData: DrawIoData, iframe: HTMLIFrameElement, loaded: () => void, exit: () => void, isInitializationCompleted: boolean): void;
15
- export declare function editGraph(editor: OnesEditor, block: BlockContentElement, data: DrawIoData, isInitializationCompleted: boolean): Promise<void>;
14
+ export declare function contactWithIframe(editor: OnesEditor, block: BlockElement, drawIoData: DrawIoData, iframe: HTMLIFrameElement, loaded: () => void, exit: () => void, isInitializationCompleted: boolean): void;
15
+ export declare function editGraph(editor: OnesEditor, block: BlockElement, data: DrawIoData, isInitializationCompleted: boolean): Promise<void>;
16
16
  export declare function initDrawIo(editor: OnesEditor): Promise<void>;
17
17
  export declare function removeDrawioEmptyStatus(el: HTMLElement): void;
18
18
  export declare function addDrawioEmptyStatus(el: HTMLElement): void;
@@ -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";