mind-elixir 5.10.0 → 5.11.0
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.
- package/dist/MindElixir.iife.js +4 -4
- package/dist/MindElixir.js +748 -741
- package/dist/MindElixirLite.iife.js +4 -4
- package/dist/MindElixirLite.js +679 -664
- package/dist/types/plugin/keypress.d.ts +13 -2
- package/dist/types/types/index.d.ts +5 -5
- package/dist/types/utils/{LinkDragMoveHelper.d.ts → LinkPanHelper.d.ts} +3 -3
- package/dist/types/utils/{dragMoveHelper.d.ts → panHelper.d.ts} +1 -1
- package/dist/types/viselect/src/index.d.ts +1 -4
- package/dist/types/viselect/src/types.d.ts +0 -5
- package/package.json +2 -2
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import type { KeypressOptions, MindElixirInstance } from '../types/index';
|
|
2
|
-
|
|
2
|
+
type ZoomOffset = {
|
|
3
3
|
x: number;
|
|
4
4
|
y: number;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
|
+
type WheelZoomStepInput = {
|
|
7
|
+
deltaMode: number;
|
|
8
|
+
deltaY: number;
|
|
9
|
+
scaleSensitivity: number;
|
|
10
|
+
viewportHeight: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const normalizeWheelDelta: ({ deltaMode, deltaY, viewportHeight }: Omit<WheelZoomStepInput, "scaleSensitivity">) => number;
|
|
13
|
+
export declare const getWheelZoomScaleDelta: ({ deltaMode, deltaY, scaleSensitivity, viewportHeight }: WheelZoomStepInput) => number;
|
|
14
|
+
export declare const handleKeypressZoom: (mei: MindElixirInstance, direction: "in" | "out", offset?: ZoomOffset) => void;
|
|
15
|
+
export declare const handleWheelZoom: (mei: MindElixirInstance, e: WheelEvent) => void;
|
|
6
16
|
export default function (mind: MindElixirInstance, options: boolean | KeypressOptions): void;
|
|
17
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Topic, CustomSvg } from './dom';
|
|
2
2
|
import type { createBus, EventMap, Operation } from '../utils/pubsub';
|
|
3
3
|
import type { MindElixirMethods, OperationMap, Operations } from '../methods';
|
|
4
|
-
import type {
|
|
4
|
+
import type { LinkPanHelperInstance } from '../utils/LinkPanHelper';
|
|
5
5
|
import type { Arrow } from '../arrow';
|
|
6
6
|
import type { Summary, SummarySvgGroup } from '../summary';
|
|
7
7
|
import type { MainLineParams, SubLineParams } from '../utils/generateBranch';
|
|
8
8
|
import type { ContextMenuOption } from '../plugin/contextMenu';
|
|
9
|
-
import type {
|
|
9
|
+
import type { createPanHelper } from '../utils/panHelper';
|
|
10
10
|
import type SelectionArea from '../viselect/src';
|
|
11
11
|
export { type MindElixirMethods } from '../methods';
|
|
12
12
|
export declare const DirectionClass: {
|
|
@@ -99,11 +99,11 @@ export interface MindElixirInstance extends Omit<Required<Options>, 'markdown' |
|
|
|
99
99
|
/**
|
|
100
100
|
* @internal
|
|
101
101
|
*/
|
|
102
|
-
helper1?:
|
|
102
|
+
helper1?: LinkPanHelperInstance;
|
|
103
103
|
/**
|
|
104
104
|
* @internal
|
|
105
105
|
*/
|
|
106
|
-
helper2?:
|
|
106
|
+
helper2?: LinkPanHelperInstance;
|
|
107
107
|
bus: ReturnType<typeof createBus<EventMap>>;
|
|
108
108
|
history: Operation[];
|
|
109
109
|
undo: () => void;
|
|
@@ -118,7 +118,7 @@ export interface MindElixirInstance extends Omit<Required<Options>, 'markdown' |
|
|
|
118
118
|
*/
|
|
119
119
|
clearHistory?: () => void;
|
|
120
120
|
selection: SelectionArea;
|
|
121
|
-
|
|
121
|
+
panHelper: ReturnType<typeof createPanHelper>;
|
|
122
122
|
}
|
|
123
123
|
type PathString = string;
|
|
124
124
|
/**
|
|
@@ -12,7 +12,7 @@ declare const create: (dom: HTMLElement) => {
|
|
|
12
12
|
destroy: (() => void) | null;
|
|
13
13
|
clear(): void;
|
|
14
14
|
};
|
|
15
|
-
declare const
|
|
15
|
+
declare const LinkPanHelper: {
|
|
16
16
|
create: (dom: HTMLElement) => {
|
|
17
17
|
dom: HTMLElement;
|
|
18
18
|
moved: boolean;
|
|
@@ -28,5 +28,5 @@ declare const LinkDragMoveHelper: {
|
|
|
28
28
|
clear(): void;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
export type
|
|
32
|
-
export default
|
|
31
|
+
export type LinkPanHelperInstance = ReturnType<typeof create>;
|
|
32
|
+
export default LinkPanHelper;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventTarget } from './EventEmitter';
|
|
2
|
-
import type { AreaLocation,
|
|
2
|
+
import type { AreaLocation, SelectionEvents } from './types';
|
|
3
3
|
import type { PartialSelectionOptions } from './types';
|
|
4
4
|
import type { SelectAllSelectors } from './utils/selectAll';
|
|
5
5
|
export * from './types';
|
|
@@ -23,7 +23,6 @@ export default class SelectionArea extends EventTarget<SelectionEvents> {
|
|
|
23
23
|
private _scrollingActive;
|
|
24
24
|
private _scrollSpeed;
|
|
25
25
|
private _scrollDelta;
|
|
26
|
-
private _lastMousePosition;
|
|
27
26
|
constructor(opt: PartialSelectionOptions);
|
|
28
27
|
_toggleStartEvents(activate?: boolean): void;
|
|
29
28
|
_onTapStart(evt: MouseEvent | TouchEvent, silent?: boolean): void;
|
|
@@ -34,8 +33,6 @@ export default class SelectionArea extends EventTarget<SelectionEvents> {
|
|
|
34
33
|
_handleMoveEvent(evt: MouseEvent | TouchEvent): void;
|
|
35
34
|
_onScroll(): void;
|
|
36
35
|
_onStartAreaScroll(): void;
|
|
37
|
-
_wheelScroll(evt: ScrollEvent): void;
|
|
38
|
-
_keyboardScroll(evt: KeyboardEvent): void;
|
|
39
36
|
_recalculateSelectionAreaRect(): void;
|
|
40
37
|
_redrawSelectionArea(): void;
|
|
41
38
|
_onTapStop(evt: MouseEvent | TouchEvent | null, silent: boolean): void;
|
|
@@ -5,10 +5,6 @@ export type DeepPartial<T> = T extends unknown[] ? T : T extends HTMLElement ? T
|
|
|
5
5
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
6
6
|
};
|
|
7
7
|
export type Quantify<T> = T[] | T;
|
|
8
|
-
export interface ScrollEvent extends MouseEvent {
|
|
9
|
-
deltaY: number;
|
|
10
|
-
deltaX: number;
|
|
11
|
-
}
|
|
12
8
|
export interface ChangedElements {
|
|
13
9
|
added: Element[];
|
|
14
10
|
removed: Element[];
|
|
@@ -45,7 +41,6 @@ export type TapMode = 'touch' | 'native';
|
|
|
45
41
|
export type OverlapMode = 'keep' | 'drop' | 'invert';
|
|
46
42
|
export interface Scrolling {
|
|
47
43
|
speedDivider: number;
|
|
48
|
-
manualSpeed: number;
|
|
49
44
|
startScrollMargins: {
|
|
50
45
|
x: number;
|
|
51
46
|
y: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mind-elixir",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Mind elixir is a free open source mind map core.",
|
|
6
6
|
"keywords": [
|
|
@@ -102,4 +102,4 @@
|
|
|
102
102
|
"vite": "^7.1.7",
|
|
103
103
|
"vite-plugin-istanbul": "^7.2.0"
|
|
104
104
|
}
|
|
105
|
-
}
|
|
105
|
+
}
|