@ones-editor/editor 2.2.14 → 2.2.15-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.
Files changed (27) hide show
  1. package/@ones-editor/callout-block/src/callout-block/callout-block-content.d.ts +3 -2
  2. package/@ones-editor/callout-block/src/callout-block/callout-icon.d.ts +14 -0
  3. package/@ones-editor/callout-block/src/callout-block/helper.d.ts +4 -2
  4. package/@ones-editor/callout-block/src/locale/en-us.d.ts +3 -0
  5. package/@ones-editor/callout-block/src/locale/ja-jp.d.ts +3 -0
  6. package/@ones-editor/callout-block/src/locale/zh-cn.d.ts +3 -0
  7. package/@ones-editor/comments/src/comments-list/group-list.d.ts +1 -1
  8. package/@ones-editor/core/src/core/blocks/text-blocks/base/text-range.d.ts +1 -1
  9. package/@ones-editor/core/src/core/editor/editor-dom/editor-dom.d.ts +3 -2
  10. package/@ones-editor/core/src/core/selection/range-from-point.d.ts +1 -1
  11. package/@ones-editor/core/src/core/types.d.ts +1 -1
  12. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  13. package/@ones-editor/ui/src/box-helper/standard-box-commands.d.ts +2 -6
  14. package/@ones-editor/ui/src/index.d.ts +0 -1
  15. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +1 -1
  16. package/@ones-editor/ui-base/src/command-bar/types.d.ts +0 -1
  17. package/@ones-editor/ui-base/src/emoji-item/emoji-item.d.ts +1 -2
  18. package/@ones-editor/ui-base/src/emoji-palette/default-emoji-palette.d.ts +3 -0
  19. package/@ones-editor/ui-base/src/emoji-palette/index.d.ts +9 -12
  20. package/@ones-editor/ui-base/src/emoji-palette/types.d.ts +9 -0
  21. package/@ones-editor/ui-base/src/index.d.ts +2 -0
  22. package/@ones-editor/ui-base/src/locale/en-us.d.ts +0 -1
  23. package/@ones-editor/ui-base/src/locale/ja-jp.d.ts +0 -1
  24. package/@ones-editor/ui-base/src/locale/zh-cn.d.ts +0 -1
  25. package/dist/index.js +2129 -2031
  26. package/dist/types.d.ts +2 -1
  27. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
- import type { OnesEditor, BlockPath, BlockElement } from '../../../../@ones-editor/core';
1
+ import type { OnesEditor, BlockPath, BlockElement, BlockContentElement, DocBlock } from '../../../../@ones-editor/core';
2
2
  import type { DocCalloutBlockData } from './types';
3
- export declare function createCalloutBlockContent(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocCalloutBlockData): import("@ones-editor/core").BlockContentElement;
3
+ export declare function createCalloutBlockContent(editor: OnesEditor, path: BlockPath, blockElement: BlockElement, blockData: DocCalloutBlockData): BlockContentElement;
4
+ export declare function handleUpdateCalloutBlock(editor: OnesEditor, block: BlockElement, blockData: DocBlock): boolean;
@@ -0,0 +1,14 @@
1
+ import { OnesEditor, OnesEditorCustom } from '../../../../@ones-editor/core';
2
+ export declare class CalloutIcon implements OnesEditorCustom {
3
+ private editor;
4
+ private blockId;
5
+ private iconElement;
6
+ private emojiPopup;
7
+ private constructor();
8
+ private handleSelectEmoji;
9
+ private handleIconClick;
10
+ render(parent: HTMLElement, icon: string): void;
11
+ updateIcon(icon: string): void;
12
+ destroy(): void;
13
+ static get(editor: OnesEditor, blockId: string): CalloutIcon;
14
+ }
@@ -1,4 +1,6 @@
1
- import { DocBlock } from '../../../../@ones-editor/core';
2
- import { ColorId } from './types';
1
+ import { BlockElement, DocBlock, OnesEditor } from '../../../../@ones-editor/core';
2
+ import { CalloutBlockPayload, ColorId } from './types';
3
3
  export declare function checkBlockAllowInCallout(block: DocBlock): boolean;
4
4
  export declare function getHexBackgroundColor(backgroundColor: ColorId): string;
5
+ export declare function getCalloutBlockData(editor: OnesEditor, block: BlockElement): import("./types").DocCalloutBlockData;
6
+ export declare function updateCalloutBlockData(editor: OnesEditor, block: BlockElement, blockPayload: Partial<CalloutBlockPayload>): void;
@@ -7,6 +7,9 @@ declare const _default: {
7
7
  clearEmoji: string;
8
8
  background: string;
9
9
  };
10
+ icon: {
11
+ toggleIcon: string;
12
+ };
10
13
  };
11
14
  };
12
15
  export default _default;
@@ -7,6 +7,9 @@ declare const _default: {
7
7
  clearEmoji: string;
8
8
  background: string;
9
9
  };
10
+ icon: {
11
+ toggleIcon: string;
12
+ };
10
13
  };
11
14
  };
12
15
  export default _default;
@@ -7,6 +7,9 @@ declare const _default: {
7
7
  clearEmoji: string;
8
8
  background: string;
9
9
  };
10
+ icon: {
11
+ toggleIcon: string;
12
+ };
10
13
  };
11
14
  };
12
15
  export default _default;
@@ -15,7 +15,7 @@ export default class CommentGroupList extends ListBase<CommentWithChildren, Comm
15
15
  constructor(editor: OnesEditor, commentsProvider: OnesEditorCommentsProvider, parent: HTMLElement);
16
16
  destroy(): void;
17
17
  dispatchScroll: import("lodash").DebouncedFunc<() => void>;
18
- updateItemsLayout(dispatchScroll?: boolean): void;
18
+ updateItemsLayout(): void;
19
19
  private bindEvents;
20
20
  private unbindEvents;
21
21
  protected createItem(data: CommentWithChildren, reason: 'init' | 'insert'): CommentGroupItem;
@@ -1,3 +1,3 @@
1
1
  import { BlockElement, OnesEditor } from '../../../types';
2
2
  import EditorSimpleSelectionRange from '../../../selection/range/simple-range';
3
- export declare function getTextBlockRangeFromPoint(editor: OnesEditor, block: BlockElement, xOrign: number, yOrign: number, dragging?: boolean): EditorSimpleSelectionRange | null;
3
+ export declare function getTextBlockRangeFromPoint(editor: OnesEditor, block: BlockElement, xOrign: number, yOrign: number): EditorSimpleSelectionRange | null;
@@ -1,4 +1,3 @@
1
- import { IUserOptions } from '../../../utils/animate-scroll';
2
1
  import { OnesEditor, SimpleBlockPosition } from '../../types';
3
2
  export declare function editorGetClientHeight(editor: OnesEditor): number;
4
3
  export declare function editorGetClientTop(editor: OnesEditor): number;
@@ -7,5 +6,7 @@ export declare function editorGetVisibleRect(editor: OnesEditor): DOMRect;
7
6
  export declare function isBlockPositionVisible(editor: OnesEditor, pos: SimpleBlockPosition): boolean;
8
7
  export declare function scrollIntoView(editor: OnesEditor, target: HTMLElement, options?: {
9
8
  animation?: boolean;
10
- } & Pick<IUserOptions, 'elementToScroll' | 'verticalOffset' | 'speed'>): void;
9
+ verticalOffset?: number;
10
+ elementToScroll?: HTMLElement;
11
+ }): void;
11
12
  export declare function editorScrollIntoView(editor: OnesEditor): void;
@@ -1,4 +1,4 @@
1
1
  import { SelectionRange, OnesEditor } from '../types';
2
2
  import EditorSimpleSelectionRange from './range/simple-range';
3
- export declare function getBlockRangeFromPoint(editor: OnesEditor, pointX: number, pointY: number, dragging?: boolean): SelectionRange | null;
3
+ export declare function getBlockRangeFromPoint(editor: OnesEditor, pointX: number, pointY: number): SelectionRange | null;
4
4
  export declare function getBlockNearestRangeFromPoint(editor: OnesEditor, x: number, y: number): EditorSimpleSelectionRange | null;
@@ -261,7 +261,7 @@ export interface Block {
261
261
  blockKind: BlockKind;
262
262
  createBlockContent: (editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock) => BlockContentElement;
263
263
  getBlockTextLength: (block: BlockElement) => number;
264
- getRangeFromPoint: (editor: OnesEditor, block: BlockElement, x: number, y: number, dragging?: boolean) => SelectionRange | null;
264
+ getRangeFromPoint: (editor: OnesEditor, block: BlockElement, x: number, y: number) => SelectionRange | null;
265
265
  moveCaret: (editor: OnesEditor, block: BlockElement, position: SimpleBlockPosition, direction: MoveDirection) => SimpleBlockPosition | null;
266
266
  getCaretRect: (block: BlockElement, pos: SimpleBlockPosition) => DOMRect;
267
267
  updateSelection: (editor: OnesEditor, block: BlockElement, from: BlockPosition, to: BlockPosition) => void;