mind-elixir 5.11.0 → 5.11.1-beta.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.
@@ -1,4 +1,4 @@
1
- import type { CustomSvg, Topic } from './types/dom';
1
+ import type { ArrowSvg, Topic } from './types/dom';
2
2
  import { type MindElixirInstance, type Uid } from './index';
3
3
  export interface ArrowStyle {
4
4
  /**
@@ -81,9 +81,9 @@ export interface ArrowOptions {
81
81
  }
82
82
  export declare const createArrow: (this: MindElixirInstance, from: Topic, to: Topic, options?: ArrowOptions) => void;
83
83
  export declare const createArrowFrom: (this: MindElixirInstance, arrow: Omit<Arrow, "id">) => void;
84
- export declare const removeArrow: (this: MindElixirInstance, linkSvg?: CustomSvg) => void;
85
- export declare const selectArrow: (this: MindElixirInstance, link: CustomSvg) => void;
84
+ export declare const removeArrow: (this: MindElixirInstance, linkSvg?: ArrowSvg) => void;
85
+ export declare const selectArrow: (this: MindElixirInstance, link: ArrowSvg) => void;
86
86
  export declare const unselectArrow: (this: MindElixirInstance) => void;
87
87
  export declare function renderArrow(this: MindElixirInstance): void;
88
- export declare function editArrowLabel(this: MindElixirInstance, el: CustomSvg): void;
88
+ export declare function editArrowLabel(this: MindElixirInstance, el: ArrowSvg): void;
89
89
  export declare function tidyArrow(this: MindElixirInstance): void;
@@ -1,10 +1,10 @@
1
1
  import type { Arrow } from './arrow';
2
+ import type { Summary } from './summary';
2
3
  import type methods from './methods';
3
4
  import type { MindElixirMethods } from './methods';
4
- import type { Summary, SummarySvgGroup } from './summary';
5
5
  import type { MindElixirData, MindElixirInstance, NodeObj, NodeObjExport, Options, Theme, TagObj } from './types';
6
6
  import type { MainLineParams, SubLineParams } from './utils/generateBranch';
7
7
  import type { LangPack } from './i18n';
8
- export { methods, Theme, Options, MindElixirMethods, MindElixirInstance, MindElixirData, NodeObj, NodeObjExport, Summary, SummarySvgGroup, Arrow, MainLineParams, SubLineParams, LangPack, TagObj, };
8
+ export { methods, Theme, Options, MindElixirMethods, MindElixirInstance, MindElixirData, NodeObj, NodeObjExport, Summary, Arrow, MainLineParams, SubLineParams, LangPack, TagObj, };
9
9
  export type * from './types/dom';
10
10
  export type * from './utils/pubsub';
@@ -3,42 +3,43 @@ import './markdown.css';
3
3
  import { LEFT, RIGHT, SIDE, DARK_THEME, THEME } from './const';
4
4
  import type { MindElixirData, MindElixirInstance, MindElixirMethods, Options } from './types/index';
5
5
  import type { Topic } from './docs';
6
- declare function MindElixir(this: MindElixirInstance, { el, direction, editable, contextMenu, toolBar, keypress, mouseSelectionButton, selectionContainer, before, newTopicName, allowUndo, generateMainBranch, generateSubBranch, overflowHidden, theme, alignment, scaleSensitivity, scaleMax, scaleMin, handleWheel, markdown, imageProxy, pasteHandler, }: Options): void;
6
+ declare function MindElixir(this: MindElixirInstance, { el, direction, editable, contextMenu, toolBar, keypress, mouseSelectionButton, selectionContainer, before, newTopicName, allowUndo, generateMainBranch, generateSubBranch, overflowHidden, theme, alignment, scaleSensitivity, scaleMax, scaleMin, handleWheel, markdown, imageProxy, pasteHandler, mobileMultiSelect, }: Options): void;
7
7
  declare namespace MindElixir {
8
8
  export var prototype: {
9
9
  init(this: MindElixirInstance, data: MindElixirData): Error | undefined;
10
10
  destroy(this: Partial<MindElixirInstance>): void;
11
+ enableMobileMultiSelect(this: MindElixirInstance, enable: boolean): void;
11
12
  exportSvg: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string) => Blob;
12
13
  exportPng: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string) => Promise<Blob | null>;
13
14
  createSummary: (this: MindElixirInstance, options?: import("./summary").SummaryOptions) => void;
14
15
  createSummaryFrom: (this: MindElixirInstance, summary: Omit<import("./summary").Summary, "id">) => void;
15
16
  removeSummary: (this: MindElixirInstance, id: string) => void;
16
- selectSummary: (this: MindElixirInstance, el: import("./summary").SummarySvgGroup) => void;
17
+ selectSummary: (this: MindElixirInstance, el: import("./docs").SummarySvg) => void;
17
18
  unselectSummary: (this: MindElixirInstance) => void;
18
19
  renderSummary: (this: MindElixirInstance) => void;
19
- editSummary: (this: MindElixirInstance, el: import("./summary").SummarySvgGroup) => void;
20
+ editSummary: (this: MindElixirInstance, el: import("./docs").SummarySvg) => void;
20
21
  renderArrow(this: MindElixirInstance): void;
21
- editArrowLabel(this: MindElixirInstance, el: import("./docs").CustomSvg): void;
22
+ editArrowLabel(this: MindElixirInstance, el: import("./docs").ArrowSvg): void;
22
23
  tidyArrow(this: MindElixirInstance): void;
23
24
  createArrow: (this: MindElixirInstance, from: Topic, to: Topic, options?: import("./arrow").ArrowOptions) => void;
24
25
  createArrowFrom: (this: MindElixirInstance, arrow: Omit<import("./arrow").Arrow, "id">) => void;
25
- removeArrow: (this: MindElixirInstance, linkSvg?: import("./docs").CustomSvg) => void;
26
- selectArrow: (this: MindElixirInstance, link: import("./docs").CustomSvg) => void;
26
+ removeArrow: (this: MindElixirInstance, linkSvg?: import("./docs").ArrowSvg) => void;
27
+ selectArrow: (this: MindElixirInstance, link: import("./docs").ArrowSvg) => void;
27
28
  unselectArrow: (this: MindElixirInstance) => void;
28
- rmSubline: (this: MindElixirInstance, tpc: Topic) => Promise<void>;
29
- reshapeNode: (this: MindElixirInstance, tpc: Topic, patchData: Partial<import("./docs").NodeObj<unknown>>) => Promise<void>;
30
- insertSibling: (this: MindElixirInstance, type: "before" | "after", el?: Topic | undefined, node?: import("./docs").NodeObj<unknown> | undefined) => Promise<void>;
31
- insertParent: (this: MindElixirInstance, el?: Topic | undefined, node?: import("./docs").NodeObj<unknown> | undefined) => Promise<void>;
32
- addChild: (this: MindElixirInstance, el?: Topic | undefined, node?: import("./docs").NodeObj<unknown> | undefined) => Promise<void>;
33
- copyNode: (this: MindElixirInstance, node: Topic, to: Topic) => Promise<void>;
34
- copyNodes: (this: MindElixirInstance, tpcs: Topic[], to: Topic) => Promise<void>;
35
- moveUpNode: (this: MindElixirInstance, el?: Topic | undefined) => Promise<void>;
36
- moveDownNode: (this: MindElixirInstance, el?: Topic | undefined) => Promise<void>;
37
- removeNodes: (this: MindElixirInstance, tpcs: Topic[]) => Promise<void>;
38
29
  moveNodeIn: (this: MindElixirInstance, from: Topic[], to: Topic) => Promise<void>;
39
- moveNodeBefore: (this: MindElixirInstance, from: Topic[], to: Topic) => Promise<void>;
40
- moveNodeAfter: (this: MindElixirInstance, from: Topic[], to: Topic) => Promise<void>;
30
+ moveDownNode: (this: MindElixirInstance, el?: Topic | undefined) => Promise<void>;
31
+ moveUpNode: (this: MindElixirInstance, el?: Topic | undefined) => Promise<void>;
32
+ copyNode: (this: MindElixirInstance, node: Topic, to: Topic) => Promise<void>;
33
+ addChild: (this: MindElixirInstance, el?: Topic | undefined, node?: import("./docs").NodeObj<unknown> | undefined) => Promise<void>;
34
+ insertParent: (this: MindElixirInstance, el?: Topic | undefined, node?: import("./docs").NodeObj<unknown> | undefined) => Promise<void>;
41
35
  beginEdit: (this: MindElixirInstance, el?: Topic | undefined) => Promise<void>;
36
+ insertSibling: (this: MindElixirInstance, type: "before" | "after", el?: Topic | undefined, node?: import("./docs").NodeObj<unknown> | undefined) => Promise<void>;
37
+ reshapeNode: (this: MindElixirInstance, tpc: Topic, patchData: Partial<import("./docs").NodeObj<unknown>>) => Promise<void>;
38
+ moveNodeAfter: (this: MindElixirInstance, from: Topic[], to: Topic) => Promise<void>;
39
+ moveNodeBefore: (this: MindElixirInstance, from: Topic[], to: Topic) => Promise<void>;
40
+ removeNodes: (this: MindElixirInstance, tpcs: Topic[]) => Promise<void>;
41
+ copyNodes: (this: MindElixirInstance, tpcs: Topic[], to: Topic) => Promise<void>;
42
+ rmSubline: (this: MindElixirInstance, tpc: Topic) => Promise<void>;
42
43
  setNodeTopic: (this: MindElixirInstance, el: Topic, topic: string) => Promise<void>;
43
44
  scrollIntoView: (this: MindElixirInstance, el: HTMLElement) => void;
44
45
  selectNode: (this: MindElixirInstance, tpc: Topic, isNewNode?: boolean, e?: MouseEvent) => void;
@@ -13,37 +13,42 @@ export type MindElixirMethods = typeof methods;
13
13
  declare const methods: {
14
14
  init(this: MindElixirInstance, data: MindElixirData): Error | undefined;
15
15
  destroy(this: Partial<MindElixirInstance>): void;
16
+ /**
17
+ * @public
18
+ * @param {boolean} enable
19
+ */
20
+ enableMobileMultiSelect(this: MindElixirInstance, enable: boolean): void;
16
21
  exportSvg: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string) => Blob;
17
22
  exportPng: (this: MindElixirInstance, noForeignObject?: boolean, injectCss?: string) => Promise<Blob | null>;
18
23
  createSummary: (this: MindElixirInstance, options?: summary.SummaryOptions) => void;
19
24
  createSummaryFrom: (this: MindElixirInstance, summary: Omit<summary.Summary, "id">) => void;
20
25
  removeSummary: (this: MindElixirInstance, id: string) => void;
21
- selectSummary: (this: MindElixirInstance, el: summary.SummarySvgGroup) => void;
26
+ selectSummary: (this: MindElixirInstance, el: import("./docs").SummarySvg) => void;
22
27
  unselectSummary: (this: MindElixirInstance) => void;
23
28
  renderSummary: (this: MindElixirInstance) => void;
24
- editSummary: (this: MindElixirInstance, el: summary.SummarySvgGroup) => void;
29
+ editSummary: (this: MindElixirInstance, el: import("./docs").SummarySvg) => void;
25
30
  renderArrow(this: MindElixirInstance): void;
26
- editArrowLabel(this: MindElixirInstance, el: import("./docs").CustomSvg): void;
31
+ editArrowLabel(this: MindElixirInstance, el: import("./docs").ArrowSvg): void;
27
32
  tidyArrow(this: MindElixirInstance): void;
28
33
  createArrow: (this: MindElixirInstance, from: import("./docs").Topic, to: import("./docs").Topic, options?: arrow.ArrowOptions) => void;
29
34
  createArrowFrom: (this: MindElixirInstance, arrow: Omit<arrow.Arrow, "id">) => void;
30
- removeArrow: (this: MindElixirInstance, linkSvg?: import("./docs").CustomSvg) => void;
31
- selectArrow: (this: MindElixirInstance, link: import("./docs").CustomSvg) => void;
35
+ removeArrow: (this: MindElixirInstance, linkSvg?: import("./docs").ArrowSvg) => void;
36
+ selectArrow: (this: MindElixirInstance, link: import("./docs").ArrowSvg) => void;
32
37
  unselectArrow: (this: MindElixirInstance) => void;
33
- rmSubline: (this: MindElixirInstance, tpc: import("./docs").Topic) => Promise<void>;
34
- reshapeNode: (this: MindElixirInstance, tpc: import("./docs").Topic, patchData: Partial<import("./types").NodeObj<unknown>>) => Promise<void>;
35
- insertSibling: (this: MindElixirInstance, type: "before" | "after", el?: import("./docs").Topic | undefined, node?: import("./types").NodeObj<unknown> | undefined) => Promise<void>;
36
- insertParent: (this: MindElixirInstance, el?: import("./docs").Topic | undefined, node?: import("./types").NodeObj<unknown> | undefined) => Promise<void>;
37
- addChild: (this: MindElixirInstance, el?: import("./docs").Topic | undefined, node?: import("./types").NodeObj<unknown> | undefined) => Promise<void>;
38
- copyNode: (this: MindElixirInstance, node: import("./docs").Topic, to: import("./docs").Topic) => Promise<void>;
39
- copyNodes: (this: MindElixirInstance, tpcs: import("./docs").Topic[], to: import("./docs").Topic) => Promise<void>;
40
- moveUpNode: (this: MindElixirInstance, el?: import("./docs").Topic | undefined) => Promise<void>;
41
- moveDownNode: (this: MindElixirInstance, el?: import("./docs").Topic | undefined) => Promise<void>;
42
- removeNodes: (this: MindElixirInstance, tpcs: import("./docs").Topic[]) => Promise<void>;
43
38
  moveNodeIn: (this: MindElixirInstance, from: import("./docs").Topic[], to: import("./docs").Topic) => Promise<void>;
44
- moveNodeBefore: (this: MindElixirInstance, from: import("./docs").Topic[], to: import("./docs").Topic) => Promise<void>;
45
- moveNodeAfter: (this: MindElixirInstance, from: import("./docs").Topic[], to: import("./docs").Topic) => Promise<void>;
39
+ moveDownNode: (this: MindElixirInstance, el?: import("./docs").Topic | undefined) => Promise<void>;
40
+ moveUpNode: (this: MindElixirInstance, el?: import("./docs").Topic | undefined) => Promise<void>;
41
+ copyNode: (this: MindElixirInstance, node: import("./docs").Topic, to: import("./docs").Topic) => Promise<void>;
42
+ addChild: (this: MindElixirInstance, el?: import("./docs").Topic | undefined, node?: import("./types").NodeObj<unknown> | undefined) => Promise<void>;
43
+ insertParent: (this: MindElixirInstance, el?: import("./docs").Topic | undefined, node?: import("./types").NodeObj<unknown> | undefined) => Promise<void>;
46
44
  beginEdit: (this: MindElixirInstance, el?: import("./docs").Topic | undefined) => Promise<void>;
45
+ insertSibling: (this: MindElixirInstance, type: "before" | "after", el?: import("./docs").Topic | undefined, node?: import("./types").NodeObj<unknown> | undefined) => Promise<void>;
46
+ reshapeNode: (this: MindElixirInstance, tpc: import("./docs").Topic, patchData: Partial<import("./types").NodeObj<unknown>>) => Promise<void>;
47
+ moveNodeAfter: (this: MindElixirInstance, from: import("./docs").Topic[], to: import("./docs").Topic) => Promise<void>;
48
+ moveNodeBefore: (this: MindElixirInstance, from: import("./docs").Topic[], to: import("./docs").Topic) => Promise<void>;
49
+ removeNodes: (this: MindElixirInstance, tpcs: import("./docs").Topic[]) => Promise<void>;
50
+ copyNodes: (this: MindElixirInstance, tpcs: import("./docs").Topic[], to: import("./docs").Topic) => Promise<void>;
51
+ rmSubline: (this: MindElixirInstance, tpc: import("./docs").Topic) => Promise<void>;
47
52
  setNodeTopic: (this: MindElixirInstance, el: import("./docs").Topic, topic: string) => Promise<void>;
48
53
  scrollIntoView: (this: MindElixirInstance, el: HTMLElement) => void;
49
54
  selectNode: (this: MindElixirInstance, tpc: import("./docs").Topic, isNewNode?: boolean, e?: MouseEvent) => void;
@@ -1,4 +1,4 @@
1
- import type { MindElixirInstance } from '.';
1
+ import type { MindElixirInstance, SummarySvg } from '.';
2
2
  export interface SummaryStyle {
3
3
  /**
4
4
  * stroke color of the summary
@@ -35,15 +35,10 @@ export interface Summary {
35
35
  */
36
36
  style?: SummaryStyle;
37
37
  }
38
- export type SummarySvgGroup = SVGGElement & {
39
- children: [SVGPathElement];
40
- summaryObj: Summary;
41
- labelEl?: HTMLDivElement;
42
- };
43
38
  export declare const createSummary: (this: MindElixirInstance, options?: SummaryOptions) => void;
44
39
  export declare const createSummaryFrom: (this: MindElixirInstance, summary: Omit<Summary, "id">) => void;
45
40
  export declare const removeSummary: (this: MindElixirInstance, id: string) => void;
46
- export declare const selectSummary: (this: MindElixirInstance, el: SummarySvgGroup) => void;
41
+ export declare const selectSummary: (this: MindElixirInstance, el: SummarySvg) => void;
47
42
  export declare const unselectSummary: (this: MindElixirInstance) => void;
48
43
  export declare const renderSummary: (this: MindElixirInstance) => void;
49
- export declare const editSummary: (this: MindElixirInstance, el: SummarySvgGroup) => void;
44
+ export declare const editSummary: (this: MindElixirInstance, el: SummarySvg) => void;
@@ -1,4 +1,5 @@
1
1
  import type { Arrow } from '../arrow';
2
+ import type { Summary } from '../summary';
2
3
  import type { NodeObj } from './index';
3
4
  export interface Wrapper extends HTMLElement {
4
5
  firstChild: Parent;
@@ -42,12 +43,14 @@ export interface Expander extends HTMLElement {
42
43
  parentElement: Parent;
43
44
  previousSibling: Topic;
44
45
  }
45
- export type CustomLine = SVGPathElement;
46
- export type CustomArrow = SVGPathElement;
47
- export interface CustomSvg extends SVGGElement {
46
+ export interface ArrowSvg extends SVGGElement {
48
47
  arrowObj: Arrow;
49
48
  labelEl?: HTMLDivElement;
50
49
  line: SVGPathElement;
51
50
  arrow1: SVGPathElement;
52
51
  arrow2: SVGPathElement;
53
52
  }
53
+ export interface SummarySvg extends SVGGElement {
54
+ summaryObj: Summary;
55
+ labelEl?: HTMLDivElement;
56
+ }
@@ -1,9 +1,9 @@
1
- import type { Topic, CustomSvg } from './dom';
1
+ import type { Topic, ArrowSvg, SummarySvg } from './dom';
2
2
  import type { createBus, EventMap, Operation } from '../utils/pubsub';
3
3
  import type { MindElixirMethods, OperationMap, Operations } from '../methods';
4
4
  import type { LinkPanHelperInstance } from '../utils/LinkPanHelper';
5
5
  import type { Arrow } from '../arrow';
6
- import type { Summary, SummarySvgGroup } from '../summary';
6
+ import type { Summary } from '../summary';
7
7
  import type { MainLineParams, SubLineParams } from '../utils/generateBranch';
8
8
  import type { ContextMenuOption } from '../plugin/contextMenu';
9
9
  import type { createPanHelper } from '../utils/panHelper';
@@ -79,8 +79,8 @@ export interface MindElixirInstance extends Omit<Required<Options>, 'markdown' |
79
79
  summaries: Summary[];
80
80
  readonly currentNode: Topic | null;
81
81
  currentNodes: Topic[];
82
- currentSummary: SummarySvgGroup | null;
83
- currentArrow: CustomSvg | null;
82
+ currentSummary: SummarySvg | null;
83
+ currentArrow: ArrowSvg | null;
84
84
  scaleVal: number;
85
85
  tempDirection: 0 | 1 | 2 | null;
86
86
  container: HTMLElement;
@@ -95,7 +95,7 @@ export interface MindElixirInstance extends Omit<Required<Options>, 'markdown' |
95
95
  P3: HTMLElement;
96
96
  line1: SVGElement;
97
97
  line2: SVGElement;
98
- linkSvgGroup: SVGElement;
98
+ arrowSvg: SVGElement;
99
99
  /**
100
100
  * @internal
101
101
  */
@@ -119,6 +119,8 @@ export interface MindElixirInstance extends Omit<Required<Options>, 'markdown' |
119
119
  clearHistory?: () => void;
120
120
  selection: SelectionArea;
121
121
  panHelper: ReturnType<typeof createPanHelper>;
122
+ ptState?: number;
123
+ mobileMultiSelect: boolean;
122
124
  }
123
125
  type PathString = string;
124
126
  /**
@@ -172,6 +174,11 @@ export interface Options {
172
174
  * @default undefined
173
175
  */
174
176
  pasteHandler?: (e: ClipboardEvent) => void;
177
+ /**
178
+ * Enable mobile multi-select mode
179
+ * @default false
180
+ */
181
+ mobileMultiSelect?: boolean;
175
182
  }
176
183
  export type Uid = string;
177
184
  export type Left = 0;
@@ -4,6 +4,8 @@ export declare function createPanHelper(mei: MindElixirInstance): {
4
4
  y: number;
5
5
  moved: boolean;
6
6
  mousedown: boolean;
7
- onMove(deltaX: number, deltaY: number): void;
7
+ handlePointerDown(e: PointerEvent): void;
8
+ handlePointerMove(e: PointerEvent): boolean;
9
+ handlePointerUp(e: PointerEvent): void;
8
10
  clear(): void;
9
11
  };
@@ -71,6 +71,10 @@ export type EventMap = {
71
71
  * please use throttling to prevent performance degradation
72
72
  */
73
73
  updateArrowDelta: (arrow: Arrow) => void;
74
+ selectArrow: (arrow: Arrow) => void;
75
+ unselectArrow: () => void;
76
+ selectSummary: (summary: Summary) => void;
77
+ unselectSummary: () => void;
74
78
  showContextMenu: (e: MouseEvent) => void;
75
79
  };
76
80
  export declare function createBus<T extends Record<string, (...args: any[]) => void> = EventMap>(): {
@@ -1,7 +1,7 @@
1
1
  import type { Arrow } from '../arrow';
2
2
  import type { Summary } from '../summary';
3
3
  import type { MindElixirInstance } from '../types';
4
- import type { CustomSvg } from '../types/dom';
4
+ import type { ArrowSvg } from '../types/dom';
5
5
  export declare const svgNS = "http://www.w3.org/2000/svg";
6
6
  export interface SvgTextOptions {
7
7
  anchor?: 'start' | 'middle' | 'end';
@@ -31,5 +31,5 @@ export declare const createArrowGroup: (d: string, arrowd1: string, arrowd2: str
31
31
  strokeDasharray?: string;
32
32
  strokeLinecap?: "butt" | "round" | "square";
33
33
  opacity?: string | number;
34
- }) => CustomSvg;
34
+ }) => ArrowSvg;
35
35
  export declare const editSvgText: (mei: MindElixirInstance, textEl: HTMLDivElement, node: Summary | Arrow) => void;
@@ -25,26 +25,26 @@ export default class SelectionArea extends EventTarget<SelectionEvents> {
25
25
  private _scrollDelta;
26
26
  constructor(opt: PartialSelectionOptions);
27
27
  _toggleStartEvents(activate?: boolean): void;
28
- _onTapStart(evt: MouseEvent | TouchEvent, silent?: boolean): void;
29
- _onSingleTap(evt: MouseEvent | TouchEvent): void;
30
- _delayedTapMove(evt: MouseEvent | TouchEvent): void;
28
+ _onTapStart(evt: PointerEvent, silent?: boolean): void;
29
+ _onSingleTap(evt: PointerEvent): void;
30
+ _delayedTapMove(evt: PointerEvent): void;
31
31
  _setupSelectionArea(): void;
32
- _onTapMove(evt: MouseEvent | TouchEvent): void;
33
- _handleMoveEvent(evt: MouseEvent | TouchEvent): void;
32
+ _onTapMove(evt: PointerEvent): void;
33
+ _handleMoveEvent(evt: PointerEvent): void;
34
34
  _onScroll(): void;
35
35
  _onStartAreaScroll(): void;
36
36
  _recalculateSelectionAreaRect(): void;
37
37
  _redrawSelectionArea(): void;
38
- _onTapStop(evt: MouseEvent | TouchEvent | null, silent: boolean): void;
38
+ _onTapStop(evt: PointerEvent | null, silent: boolean): void;
39
39
  _updateElementSelection(): void;
40
- _emitEvent(name: keyof SelectionEvents, evt: MouseEvent | TouchEvent | null): unknown;
40
+ _emitEvent(name: keyof SelectionEvents, evt: PointerEvent | null): unknown;
41
41
  _keepSelection(): void;
42
42
  /**
43
43
  * Manually triggers the start of a selection
44
- * @param evt A MouseEvent / TouchEvent-like object
44
+ * @param evt A PointerEvent-like object
45
45
  * @param silent If beforestart should be fired
46
46
  */
47
- trigger(evt: MouseEvent | TouchEvent, silent?: boolean): void;
47
+ trigger(evt: PointerEvent, silent?: boolean): void;
48
48
  /**
49
49
  * Can be used if during a selection elements have been added
50
50
  * Will update everything that can be selected
@@ -16,7 +16,7 @@ export interface SelectionStore {
16
16
  changed: ChangedElements;
17
17
  }
18
18
  export interface SelectionEvent {
19
- event: MouseEvent | TouchEvent | null;
19
+ event: PointerEvent | null;
20
20
  store: SelectionStore;
21
21
  selection: SelectionArea;
22
22
  }
@@ -18,7 +18,7 @@ export declare const on: (items: (EventTarget | undefined) | (EventTarget | unde
18
18
  */
19
19
  export declare const off: (items: (EventTarget | undefined) | (EventTarget | undefined)[], events: string | string[], fn: AnyFunction, options?: {}) => void;
20
20
  /**
21
- * Simplifies a touch / mouse-event
21
+ * Simplifies a pointer / touch / mouse-event
22
22
  * @param evt
23
23
  */
24
24
  export declare const simplifyEvent: (evt: any) => {
@@ -6,11 +6,11 @@ export type MouseButtonWithModifiers = {
6
6
  };
7
7
  export type Trigger = MouseButton | MouseButtonWithModifiers;
8
8
  /**
9
- * Determines whether a MouseEvent should execute until completion depending on
10
- * which button and modifier(s) are active for the MouseEvent.
9
+ * Determines whether a PointerEvent/MouseEvent should execute until completion depending on
10
+ * which button and modifier(s) are active for the event.
11
11
  * The Event will execute to completion if ANY of the triggers "matches"
12
- * @param event MouseEvent that should be checked
12
+ * @param event PointerEvent or MouseEvent that should be checked
13
13
  * @param triggers A list of Triggers that signify that the event should execute until completion
14
- * @returns Whether the MouseEvent should execute until completion
14
+ * @returns Whether the event should execute until completion
15
15
  */
16
- export declare const matchesTrigger: (event: MouseEvent, triggers: Trigger[]) => boolean;
16
+ export declare const matchesTrigger: (event: PointerEvent | MouseEvent, triggers: Trigger[]) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mind-elixir",
3
- "version": "5.11.0",
3
+ "version": "5.11.1-beta.1",
4
4
  "type": "module",
5
5
  "description": "Mind elixir is a free open source mind map core.",
6
6
  "keywords": [
@@ -85,6 +85,7 @@
85
85
  "@typescript-eslint/parser": "^8.44.1",
86
86
  "@viselect/vanilla": "3.9.0",
87
87
  "@zumer/snapdom": "^1.9.11",
88
+ "baseline-browser-mapping": "^2.10.21",
88
89
  "eslint": "^9.36.0",
89
90
  "eslint-config-prettier": "^10.1.8",
90
91
  "eslint-plugin-prettier": "^5.5.4",