@hufe921/canvas-editor 0.9.82 → 0.9.83

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.
@@ -113,5 +113,6 @@ export declare class Command {
113
113
  getControlList: CommandAdapt['getControlList'];
114
114
  getContainer: CommandAdapt['getContainer'];
115
115
  getTitleValue: CommandAdapt['getTitleValue'];
116
+ getPositionContextByEvent: CommandAdapt['getPositionContextByEvent'];
116
117
  constructor(adapt: CommandAdapt);
117
118
  }
@@ -11,7 +11,7 @@ import { IGetControlValueOption, IGetControlValueResult, ISetControlExtensionOpt
11
11
  import { IAppendElementListOption, IDrawImagePayload, IForceUpdateOption, IGetImageOption, IGetValueOption, IPainterOption } from '../../interface/Draw';
12
12
  import { IEditorData, IEditorHTML, IEditorOption, IEditorResult, IEditorText, IUpdateOption } from '../../interface/Editor';
13
13
  import { IElement, IUpdateElementByIdOption } from '../../interface/Element';
14
- import { IPasteOption } from '../../interface/Event';
14
+ import { IPasteOption, IPositionContextByEvent } from '../../interface/Event';
15
15
  import { IMargin } from '../../interface/Margin';
16
16
  import { IRange, RangeContext } from '../../interface/Range';
17
17
  import { ITextDecoration } from '../../interface/Text';
@@ -31,6 +31,7 @@ export declare class CommandAdapt {
31
31
  private workerManager;
32
32
  private searchManager;
33
33
  private i18n;
34
+ private zone;
34
35
  constructor(draw: Draw);
35
36
  mode(payload: EditorMode): void;
36
37
  cut(): void;
@@ -145,5 +146,6 @@ export declare class CommandAdapt {
145
146
  locationControl(controlId: string): void;
146
147
  getContainer(): HTMLDivElement;
147
148
  getTitleValue(payload: IGetTitleValueOption): IGetTitleValueResult | null;
149
+ getPositionContextByEvent(evt: MouseEvent): IPositionContextByEvent | null;
148
150
  insertTitle(payload: IElement): void;
149
151
  }
@@ -0,0 +1,10 @@
1
+ import { Draw } from '../draw/Draw';
2
+ export declare class MouseObserver {
3
+ private draw;
4
+ private eventBus;
5
+ private pageContainer;
6
+ constructor(draw: Draw);
7
+ private _mousemove;
8
+ private _mouseenter;
9
+ private _mouseleave;
10
+ }
@@ -23,6 +23,7 @@ export declare class RangeManager {
23
23
  getRangeParagraph(): RangeRowArray | null;
24
24
  getRangeParagraphInfo(): IRangeParagraphInfo | null;
25
25
  getRangeParagraphElementList(): IElement[] | null;
26
+ getRangeTableElement(): IElement | null;
26
27
  getIsSelectAll(): boolean;
27
28
  getIsPointInRange(x: number, y: number): boolean;
28
29
  getKeywordRangeList(payload: string): IRange[];
@@ -1,3 +1,10 @@
1
+ import { IElement } from './Element';
2
+ import { RangeRect } from './Range';
1
3
  export interface IPasteOption {
2
4
  isPlainText: boolean;
3
5
  }
6
+ export interface IPositionContextByEvent {
7
+ pageNo: number;
8
+ element: IElement | null;
9
+ rangeRect: RangeRect | null;
10
+ }
@@ -1,4 +1,4 @@
1
- import { IContentChange, IControlChange, IIntersectionPageNoChange, IPageModeChange, IPageScaleChange, IPageSizeChange, IRangeStyleChange, ISaved, IVisiblePageNoListChange, IZoneChange } from './Listener';
1
+ import { IContentChange, IControlChange, IIntersectionPageNoChange, IMouseEventChange, IPageModeChange, IPageScaleChange, IPageSizeChange, IRangeStyleChange, ISaved, IVisiblePageNoListChange, IZoneChange } from './Listener';
2
2
  export interface EventBusMap {
3
3
  rangeStyleChange: IRangeStyleChange;
4
4
  visiblePageNoListChange: IVisiblePageNoListChange;
@@ -10,4 +10,7 @@ export interface EventBusMap {
10
10
  controlChange: IControlChange;
11
11
  pageModeChange: IPageModeChange;
12
12
  zoneChange: IZoneChange;
13
+ mousemove: IMouseEventChange;
14
+ mouseleave: IMouseEventChange;
15
+ mouseenter: IMouseEventChange;
13
16
  }
@@ -36,3 +36,4 @@ export type IContentChange = () => void;
36
36
  export type IControlChange = (payload: IControl | null) => void;
37
37
  export type IPageModeChange = (payload: PageMode) => void;
38
38
  export type IZoneChange = (payload: EditorZone) => void;
39
+ export type IMouseEventChange = (evt: MouseEvent) => void;
@@ -3,6 +3,7 @@ import { TdBorder, TdSlash } from '../../dataset/enum/table/Table';
3
3
  import { IElement, IElementPosition } from '../Element';
4
4
  import { IRow } from '../Row';
5
5
  export interface ITd {
6
+ conceptId?: string;
6
7
  id?: string;
7
8
  x?: number;
8
9
  y?: number;
@@ -1,5 +1,5 @@
1
- export declare function debounce(func: Function, delay: number): (this: any, ...args: any[]) => void;
2
- export declare function throttle(func: Function, delay: number): (this: any, ...args: any[]) => void;
1
+ export declare function debounce<T extends unknown[]>(func: (...arg: T) => unknown, delay: number): (this: unknown, ...args: T) => void;
2
+ export declare function throttle<T extends unknown[]>(func: (...arg: T) => unknown, delay: number): (this: unknown, ...args: T) => void;
3
3
  export declare function deepCloneOmitKeys<T, K>(obj: T, omitKeys: (keyof K)[]): T;
4
4
  export declare function deepClone<T>(obj: T): T;
5
5
  export declare function isBody(node: Element): boolean;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@hufe921/canvas-editor",
3
3
  "author": "Hufe",
4
4
  "license": "MIT",
5
- "version": "0.9.82",
5
+ "version": "0.9.83",
6
6
  "description": "rich text editor by canvas/svg",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/",