@ones-editor/editor 2.4.0 → 2.4.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.
@@ -2,6 +2,7 @@ import { OnesEditorComments } from './comments';
2
2
  import './style.scss';
3
3
  import CommentsCommandProvider from './text-comments/comments-command-provider';
4
4
  import './locale';
5
+ export { activeComment } from './comments-helper';
5
6
  export * from './types';
6
7
  export { OnesEditorCommentsRender } from './comments-render';
7
8
  export { OnesEditorCommentPlaceholderHandler } from './comment-placeholder-handler';
@@ -3,4 +3,5 @@ import { FileEmbedData } from '../../types';
3
3
  export declare function renderFileCard(editor: OnesEditor, content: BlockContentElement, data: FileEmbedData): Promise<{
4
4
  card: HTMLDivElement;
5
5
  downloadButton: HTMLElement | undefined;
6
+ copilotButton: HTMLButtonElement | undefined;
6
7
  }>;
@@ -8,6 +8,8 @@ declare const _default: {
8
8
  comment: string;
9
9
  preview: string;
10
10
  };
11
+ uploadedTime: string;
12
+ askAi: string;
11
13
  };
12
14
  };
13
15
  export default _default;
@@ -8,6 +8,8 @@ declare const _default: {
8
8
  comment: string;
9
9
  preview: string;
10
10
  };
11
+ uploadedTime: string;
12
+ askAi: string;
11
13
  };
12
14
  };
13
15
  export default _default;
@@ -8,6 +8,8 @@ declare const _default: {
8
8
  comment: string;
9
9
  preview: string;
10
10
  };
11
+ uploadedTime: string;
12
+ askAi: string;
11
13
  };
12
14
  };
13
15
  export default _default;
@@ -4,6 +4,8 @@ export interface FileData {
4
4
  fileName: string;
5
5
  fileSize: number;
6
6
  fileType: string;
7
+ created: number;
8
+ creator: string;
7
9
  }
8
10
  export interface FileBoxData extends DocBox, FileData {
9
11
  }
@@ -17,9 +19,10 @@ export interface FileEmbedData extends DocEmbedData, FileData {
17
19
  previewType?: FilePreviewType;
18
20
  }
19
21
  export interface FileOptions {
20
- onClick?: (editor: OnesEditor, elem: BlockElement | BoxElement, event: MouseEvent) => void;
22
+ onClick?: (editor: OnesEditor, elem: BlockElement | BoxElement, event: MouseEvent, commandId?: string) => void;
21
23
  canDownload?: boolean;
22
24
  onDownloadFile?: (editor: OnesEditor, data: FileData | FileBoxData, source: 'embed' | 'box') => void;
23
25
  renderFileCardIcon?: (editor: OnesEditor, blockData: FileEmbedData) => Promise<false | HTMLImageElement>;
24
26
  onGetFileDownloadUrl?: (editor: OnesEditor, data: FileBoxData | FileEmbedData) => Promise<string | undefined>;
27
+ newCardUI?: boolean;
25
28
  }
@@ -1,6 +1,7 @@
1
1
  import type { OnesEditor, BlockContentElement } from '../../../../@ones-editor/core';
2
2
  import { TypedEmitter } from 'tiny-typed-emitter';
3
3
  import type { MediaOptions, MediaBlockData, MediaAbstract } from '../types';
4
+ import './hovering-toolbar/toolbar.scss';
4
5
  export interface MediaEvent {
5
6
  mediaError: (editor: OnesEditor, type: 'upload_error' | 'load_error' | 'empty', blockId: string) => void;
6
7
  }
@@ -1,4 +1,4 @@
1
- import type { OnesEditor, DocEmbedBlock, DocEmbedData } from '../../../@ones-editor/core';
1
+ import type { OnesEditor, DocEmbedBlock, DocEmbedData, BlockElement } from '../../../@ones-editor/core';
2
2
  import { MediaType } from './constant';
3
3
  export type MediaKeys = `${MediaType}`;
4
4
  export interface MediaEmbedOptions {
@@ -11,6 +11,7 @@ export interface MediaEmbedOptions {
11
11
  callbacks?: {
12
12
  onError?: (editor: OnesEditor, error: Error) => void;
13
13
  };
14
+ onMediaPreview?: (editor: OnesEditor, block: BlockElement, itemId: string) => void;
14
15
  }
15
16
  export interface MediaEmbedData extends DocEmbedData {
16
17
  fileName?: string;