@ones-editor/editor 2.2.15-beta.4 → 2.2.16-beta.10

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 (28) hide show
  1. package/@ones-editor/callout-block/src/callout-block/callout-block-content.d.ts +2 -3
  2. package/@ones-editor/callout-block/src/callout-block/helper.d.ts +2 -4
  3. package/@ones-editor/callout-block/src/locale/en-us.d.ts +0 -3
  4. package/@ones-editor/callout-block/src/locale/ja-jp.d.ts +0 -3
  5. package/@ones-editor/callout-block/src/locale/zh-cn.d.ts +0 -3
  6. package/@ones-editor/core/src/core/command-providers/block-attributes.d.ts +1 -0
  7. package/@ones-editor/drawio-embed/src/dom/toast.d.ts +2 -0
  8. package/@ones-editor/drawio-embed/src/helper/paste-handler.d.ts +8 -0
  9. package/@ones-editor/drawio-embed/src/index.d.ts +2 -1
  10. package/@ones-editor/drawio-embed/src/lang/en-us.d.ts +1 -0
  11. package/@ones-editor/drawio-embed/src/lang/ja-jp.d.ts +1 -0
  12. package/@ones-editor/drawio-embed/src/lang/zh-cn.d.ts +1 -0
  13. package/@ones-editor/drawio-embed/src/utils/misc.d.ts +6 -0
  14. package/@ones-editor/mobile-helper/src/selection-gripper/select-handle.d.ts +2 -2
  15. package/@ones-editor/paste-special/src/paste-special-handler.d.ts +2 -2
  16. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  17. package/@ones-editor/ui-base/src/color-button/text-color-item.d.ts +2 -1
  18. package/@ones-editor/ui-base/src/emoji-item/emoji-item.d.ts +2 -1
  19. package/@ones-editor/ui-base/src/emoji-palette/index.d.ts +12 -9
  20. package/@ones-editor/ui-base/src/emoji-palette/types.d.ts +0 -9
  21. package/@ones-editor/ui-base/src/index.d.ts +0 -2
  22. package/@ones-editor/ui-base/src/toast/index.d.ts +2 -1
  23. package/dist/index.d.ts +2 -1
  24. package/dist/index.js +2590 -2625
  25. package/dist/types.d.ts +1 -2
  26. package/package.json +1 -1
  27. package/@ones-editor/callout-block/src/callout-block/callout-icon.d.ts +0 -14
  28. package/@ones-editor/ui-base/src/emoji-palette/default-emoji-palette.d.ts +0 -3
@@ -20,10 +20,11 @@ export declare class TextColorItem extends TypedEmitter<ColorPaletteEvents> impl
20
20
  latestColors: Colors;
21
21
  private currentTextColors;
22
22
  constructor(editor: OnesEditor, storageName?: string);
23
+ private bindColorButtonEvents;
23
24
  getColorsFromLocalStorage(): Colors;
24
25
  destroy(): void;
25
26
  handlePaletteClick: (type: ColorAction, value: number) => void;
26
- handleButtonClick: (event: MouseEvent) => void;
27
+ handleButtonClick: () => void;
27
28
  private setLatestColors;
28
29
  beforePopup: () => void;
29
30
  updatePaletteColor(): void;
@@ -11,8 +11,9 @@ export declare class EmojiItem implements CommandItem, OnesEditorCustom {
11
11
  childrenPlacement: "bottom-start";
12
12
  childrenMenuId: string;
13
13
  closeable: Closeable;
14
- constructor(editor: OnesEditor);
14
+ constructor();
15
15
  beforePopup(): void;
16
16
  setCloseable(closeable: Closeable): void;
17
17
  destroy(): void;
18
+ static get(editor: OnesEditor): EmojiItem;
18
19
  }
@@ -1,20 +1,23 @@
1
- import { CommandItem, OnesEditor } from '../../../../@ones-editor/core';
1
+ import { CommandItem } from '../../../../@ones-editor/core';
2
2
  import { TypedEmitter } from 'tiny-typed-emitter';
3
3
  import './index.scss';
4
- export type { OnesEditorEmojiPaletteOptions } from './types';
5
4
  export interface EmojiPaletteEvents {
6
5
  onSelectEmoji: (emoji: string) => void;
7
6
  }
8
7
  export declare class EmojiPalette extends TypedEmitter<EmojiPaletteEvents> implements CommandItem {
9
- private editor;
10
8
  id: string;
11
9
  name: string;
12
10
  element: HTMLDivElement;
13
- private currentEmoji;
14
- private unmountPalette;
15
- constructor(editor: OnesEditor);
16
- private renderPalette;
17
- render(): Promise<void>;
18
- setCurrentEmoji(emoji: string): void;
11
+ private emojiData;
12
+ private emojiSearch;
13
+ private emojiContent;
14
+ private emojiNavigation;
15
+ constructor();
16
+ private initEmojiData;
17
+ private handleSearch;
18
+ private handleEmojiSelect;
19
+ private handleSelectCategory;
20
+ private handleCategoryReach;
21
+ updateComponents(): void;
19
22
  destroy(): void;
20
23
  }
@@ -1,9 +0,0 @@
1
- export type EmojiPaletteOptions = {
2
- emoji: string;
3
- onSelectEmoji: (emoji: string) => void;
4
- };
5
- export type UnmountPalette = () => void;
6
- export type EmojiPaletteRenderer = (parent: HTMLDivElement, options: EmojiPaletteOptions) => UnmountPalette;
7
- export type OnesEditorEmojiPaletteOptions = {
8
- emojiPaletteRenderer: EmojiPaletteRenderer;
9
- };
@@ -18,6 +18,4 @@ export * from './emoji-item';
18
18
  export * from './mobile-command-bar/mobile-bottom-menu';
19
19
  export * from './text-button';
20
20
  export { scrollBarIntoView } from './mobile-command-bar/scroll-into-view';
21
- export { EmojiPalette } from './emoji-palette';
22
- export type { OnesEditorEmojiPaletteOptions } from './emoji-palette';
23
21
  export { tippy, };
@@ -2,6 +2,7 @@ import './toast.scss';
2
2
  export type ToastOptions = {
3
3
  html: boolean;
4
4
  duration: number;
5
+ autoClose: boolean;
5
6
  theme: string;
6
7
  id: string;
7
8
  position: {
@@ -9,4 +10,4 @@ export type ToastOptions = {
9
10
  y: number;
10
11
  };
11
12
  };
12
- export declare function showToast(text: string, options?: Partial<ToastOptions>): void;
13
+ export declare function showToast(text: string, options?: Partial<ToastOptions>): () => void;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { OnesEditor, DocObject, OnesEditorDoc } from '../@ones-editor/core';
2
+ import { PasteSpecialHandler } from '../@ones-editor/paste-special';
2
3
  import * as OnesEditorIcons from '../@ones-editor/ui-base/src/icons';
3
4
  import { OnesEditorVersionsDialog, VersionDialogOptions } from '../@ones-editor/versions';
4
5
  import { CalloutQuickMenuItemFilter } from '../@ones-editor/callout-block';
@@ -34,7 +35,7 @@ export { resetListStart, getListAllNextBrothers, toMindmap, Mindmap } from '../@
34
35
  export * from '../@ones-editor/exclusive-block';
35
36
  export * from '../@ones-editor/templates';
36
37
  export * from 'tiny-typed-emitter';
37
- export { ShareDBDocVersionsProvider, OnesEditorIcons, isLayoutBlock, LayoutQuickMenuItemFilter, CalloutQuickMenuItemFilter, MobileCommandHandler };
38
+ export { ShareDBDocVersionsProvider, OnesEditorIcons, isLayoutBlock, LayoutQuickMenuItemFilter, CalloutQuickMenuItemFilter, MobileCommandHandler, PasteSpecialHandler };
38
39
  export type { FileBoxData, FileEmbedData } from '../@ones-editor/file';
39
40
  export { type DocListBlock } from '../@ones-editor/list-block';
40
41
  export declare function createOnesEditor(root: HTMLElement, options: CreateOnesEditorOptions): Promise<OnesEditor>;