@ones-editor/editor 2.1.1-beta.62 → 2.1.1-beta.66

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 (30) hide show
  1. package/@ones-editor/core/src/core/containers/root-container.d.ts +3 -0
  2. package/@ones-editor/core/src/core/types.d.ts +6 -4
  3. package/@ones-editor/core/src/utils/dom.d.ts +2 -2
  4. package/@ones-editor/mention/src/mention.d.ts +2 -0
  5. package/@ones-editor/mobile-helper/src/fixed-toolbar/index.d.ts +3 -6
  6. package/@ones-editor/mobile-helper/src/fixed-toolbar/providers/insert-menu.d.ts +3 -3
  7. package/@ones-editor/mobile-helper/src/fixed-toolbar/toolbar-handler.d.ts +1 -0
  8. package/@ones-editor/scroll-container/src/utils.d.ts +1 -1
  9. package/@ones-editor/tsconfig.tsbuildinfo +1 -1
  10. package/@ones-editor/ui/src/link-popup/mobile-link-popup.d.ts +22 -0
  11. package/@ones-editor/ui/src/link-popup/types.d.ts +34 -0
  12. package/@ones-editor/ui/src/link-popup/web-link-popup.d.ts +19 -0
  13. package/@ones-editor/ui/src/providers/insert-above.d.ts +2 -2
  14. package/@ones-editor/ui/src/providers/insert-after.d.ts +2 -2
  15. package/@ones-editor/ui/src/providers/insert-box-provider.d.ts +3 -3
  16. package/@ones-editor/ui/src/providers/insert-menu.d.ts +3 -3
  17. package/@ones-editor/ui/src/providers/mobile-link-provider.d.ts +2 -2
  18. package/@ones-editor/ui/src/providers/proxy-provider.d.ts +3 -3
  19. package/@ones-editor/ui/src/providers/text-command-provider.d.ts +2 -2
  20. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest-menu.d.ts +2 -0
  21. package/@ones-editor/ui-base/src/auto-suggest/auto-suggest.d.ts +2 -0
  22. package/@ones-editor/ui-base/src/command-bar/command-bar.d.ts +1 -0
  23. package/@ones-editor/ui-base/src/command-bar/fixed-toolbar.d.ts +1 -2
  24. package/@ones-editor/ui-base/src/command-bar/types.d.ts +2 -1
  25. package/@ones-editor/ui-base/src/index.d.ts +1 -0
  26. package/@ones-editor/ui-base/src/mobile-command-bar/mobile-bottom-menu.d.ts +0 -1
  27. package/@ones-editor/ui-base/src/mobile-command-bar/scroll-into-view.d.ts +3 -0
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +1261 -1126
  30. package/package.json +1 -1
@@ -8,6 +8,9 @@ export declare class RootContainer {
8
8
  private mouseDownEvent;
9
9
  private dbClickRef;
10
10
  constructor(editor: OnesEditor, rootContainer: ContainerElement);
11
+ private isMove;
12
+ handleTouchMove: (e: TouchEvent) => void;
13
+ handleTouchEnd: (e: TouchEvent) => void;
11
14
  private bindEvents;
12
15
  private unbindEvents;
13
16
  destroy(): void;
@@ -640,6 +640,7 @@ export type PasteOptions = {
640
640
  };
641
641
  export interface OnesEditorInput {
642
642
  readonly inputElement: HTMLTextAreaElement;
643
+ getInput: () => HTMLTextAreaElement;
643
644
  destroy: () => void;
644
645
  focus: () => void;
645
646
  handleDocumentSelectionChange: () => void;
@@ -716,6 +717,7 @@ export type CommandParams = {
716
717
  [index: string]: unknown;
717
718
  } & {
718
719
  source?: string[];
720
+ isFilter?: boolean;
719
721
  };
720
722
  export type CommandResult = {
721
723
  [index: string]: unknown;
@@ -725,12 +727,12 @@ export interface OnesEditorCommandProvider {
725
727
  groupIndex?: number;
726
728
  getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
727
729
  getInsertCommands?: (editor: OnesEditor, containerId: string) => CommandItem[];
728
- executeInsertCommand?: (editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItem, params: CommandParams, result?: CommandResult) => boolean;
730
+ executeInsertCommand?: (editor: OnesEditor, containerId: string, blockIndex: number, item: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
729
731
  executeRangeCommand?: (editor: OnesEditor, range: SelectionRange, command: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
730
- executeCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result?: CommandResult) => boolean;
732
+ executeCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams, result?: CommandResult) => boolean;
731
733
  filterCommands?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, commands: CommandItemWithSource[]) => CommandItemWithSource[] | undefined;
732
- beforeExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams) => boolean | undefined;
733
- afterExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams, result: CommandResult) => void;
734
+ beforeExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => boolean | undefined;
735
+ afterExecuteCommand?: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams, result: CommandResult) => void;
734
736
  }
735
737
  export interface CommandItemWithSource extends CommandItem {
736
738
  source: string;
@@ -37,7 +37,7 @@ export declare function bindKeyDownEvent(input: HTMLInputElement | HTMLTextAreaE
37
37
  export declare function getElementFromPoint(x: number, y: number, options?: {
38
38
  noFilter: boolean;
39
39
  }): Element;
40
- export declare function ensureIsMobileEvent(events: MouseEvent | TouchEvent): events is TouchEvent;
41
40
  export declare function createMouseEventFromTouchEvent(event: TouchEvent, type: 'mousedown' | 'mousemove' | 'mouseup' | 'click'): MouseEvent;
42
- export declare function bindTouchEnd(elem: HTMLElement | Document, callback: (e: any) => void): void;
41
+ export declare function ensureIsMobileEvent(events: MouseEvent | TouchEvent): events is TouchEvent;
42
+ export declare function bindDbClick(elem: HTMLElement, handler: (event: MouseEvent) => void): () => void;
43
43
  export {};
@@ -13,12 +13,14 @@ export default class OnesEditorMention implements OnesEditorCustom {
13
13
  onClose: () => void;
14
14
  destroy(): void;
15
15
  onShow: (suggest: OnesEditorAutoSuggest, containerId: string, blockIndex: number, offset: number) => boolean;
16
+ onShown: (bar: OnesEditorAutoSuggest) => void;
16
17
  handleClickItem: (item: CommandItem) => void;
17
18
  handleMobileWrapClick: (e: Event) => void;
18
19
  onClickItem: (menu: OnesEditorAutoSuggest, item: CommandItem, anchor: AutoSuggestAnchor) => void;
19
20
  createItemElement: (item: CommandItem, find: string) => HTMLElement;
20
21
  createMobileItems: (content: HTMLElement, items: CommandItem[], find: string) => void;
21
22
  onInputChanged: import("lodash").DebouncedFunc<(content: HTMLElement, e: Event) => void>;
23
+ getMobileCommandElement: () => HTMLElement;
22
24
  createMobileCommandItem: (items: CommandItem[]) => {
23
25
  id: string;
24
26
  name: string;
@@ -6,17 +6,14 @@ export declare class MobileCommandHandler {
6
6
  private commandBar;
7
7
  private observer;
8
8
  constructor(editor: OnesEditor);
9
- destroy(): void;
10
9
  private showKeyboard;
11
- private initViewportHeight;
12
- private get isKeyboardShow();
10
+ private get window();
13
11
  private get virtualViewportHeight();
14
12
  private get clientHeight();
15
- private get virtualViewportOffsetTop();
16
- private get window();
17
- private setDebugInfo;
18
13
  private toggleDelay;
19
14
  toggle: import("lodash").DebouncedFunc<() => void>;
15
+ handScroll: import("lodash").DebouncedFunc<() => void>;
16
+ destroy(): void;
20
17
  handleFocusIn: () => void;
21
18
  handleFocusOut: () => void;
22
19
  }
@@ -1,4 +1,4 @@
1
- import { BlockElement, CommandItem, CommandParams, ContainerElement, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
1
+ import { BlockElement, CommandItem, CommandItemWithSource, CommandParams, ContainerElement, OnesEditor, OnesEditorCommandProvider, SelectionRange } from '../../../../../@ones-editor/core';
2
2
  import { ProxyProvider } from '../../../../../@ones-editor/ui';
3
3
  export default class InsertMenuProvider extends ProxyProvider {
4
4
  private editor;
@@ -8,8 +8,8 @@ export default class InsertMenuProvider extends ProxyProvider {
8
8
  constructor(editor: OnesEditor);
9
9
  getNextBlock(container: ContainerElement, block: BlockElement): number;
10
10
  getInsertCommands: () => CommandItem[];
11
- getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange) => CommandItem[];
11
+ getAvailableCommands: (editor: OnesEditor, block: BlockElement, range: SelectionRange, params?: CommandParams) => CommandItem[];
12
12
  executeInsertCommand: () => boolean;
13
13
  getNextBlockIndex: (container: ContainerElement, block: BlockElement) => number;
14
- executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItem, params: CommandParams) => boolean;
14
+ executeCommand: (editor: OnesEditor, block: BlockElement, range: SelectionRange, item: CommandItemWithSource, params: CommandParams) => boolean;
15
15
  }
@@ -5,6 +5,7 @@ export declare class MobileToolbarHandler {
5
5
  private fixedProviders;
6
6
  bar: HTMLElement;
7
7
  constructor(editor: OnesEditor, parent: HTMLElement);
8
+ private handleSubBarShow;
8
9
  private handleSelectionChange;
9
10
  handleClick: (_: any, item: CommandItem) => void;
10
11
  destroy(): void;
@@ -1,5 +1,5 @@
1
1
  import { ContainerElement, ScrollAreaElement, ScrollContainerElement, ScrollCore } from './common-types';
2
- export declare function getContainerOption(scrollCore: ScrollCore, container: ContainerElement): import("./types").ScrollContainerOptions | undefined;
2
+ export declare function getContainerOption(scrollCore: ScrollCore, container: ContainerElement): import("@ones-editor/editor").ScrollContainerOptions | undefined;
3
3
  export declare function getScrollContainer(scrollChild: HTMLElement): ScrollContainerElement;
4
4
  export declare function getContainerScrollArea(scrollContainer: ScrollContainerElement): ScrollAreaElement;
5
5
  export declare function getContainer(scrollChild: HTMLElement): ContainerElement;