mind-elixir 4.4.0 → 4.4.2
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 +7 -7
- package/dist/MindElixir.js +162 -158
- package/dist/MindElixirLite.iife.js +7 -7
- package/dist/MindElixirLite.js +127 -123
- package/dist/types/arrow.d.ts +20 -9
- package/dist/types/docs.d.ts +2 -1
- package/dist/types/i18n.d.ts +3 -0
- package/dist/types/index.d.ts +4 -3
- package/dist/types/summary.d.ts +14 -2
- package/dist/types/utils/dragMoveHelper.d.ts +2 -1
- package/dist/types/utils/generateBranch.d.ts +1 -1
- package/package.json +1 -1
- package/readme.md +8 -7
package/dist/types/arrow.d.ts
CHANGED
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
import type { CustomSvg, Topic } from './types/dom';
|
|
2
2
|
import type { MindElixirInstance, Uid } from './index';
|
|
3
|
-
|
|
4
|
-
* FYI
|
|
5
|
-
* p1: starting point
|
|
6
|
-
* p2: control point of starting point
|
|
7
|
-
* p3: control point of ending point
|
|
8
|
-
* p4: ending point
|
|
9
|
-
*/
|
|
10
|
-
export type Arrow = {
|
|
3
|
+
export interface Arrow {
|
|
11
4
|
id: string;
|
|
5
|
+
/**
|
|
6
|
+
* label of arrow
|
|
7
|
+
*/
|
|
12
8
|
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* id of start node
|
|
11
|
+
*/
|
|
13
12
|
from: Uid;
|
|
13
|
+
/**
|
|
14
|
+
* id of end node
|
|
15
|
+
*/
|
|
14
16
|
to: Uid;
|
|
17
|
+
/**
|
|
18
|
+
* offset of control point from start point
|
|
19
|
+
*/
|
|
15
20
|
delta1: {
|
|
16
21
|
x: number;
|
|
17
22
|
y: number;
|
|
18
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* offset of control point from end point
|
|
26
|
+
*/
|
|
19
27
|
delta2: {
|
|
20
28
|
x: number;
|
|
21
29
|
y: number;
|
|
22
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* whether the arrow is bidirectional
|
|
33
|
+
*/
|
|
23
34
|
bidirectional?: boolean;
|
|
24
|
-
}
|
|
35
|
+
}
|
|
25
36
|
export type DivData = {
|
|
26
37
|
cx: number;
|
|
27
38
|
cy: number;
|
package/dist/types/docs.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ import type { MindElixirData, MindElixirInstance, NodeObj, NodeObjExport, Option
|
|
|
6
6
|
import type { MainLineParams, SubLineParams } from './utils/generateBranch';
|
|
7
7
|
import type { Locale } from './i18n';
|
|
8
8
|
export { methods, Theme, Options, MindElixirMethods, MindElixirInstance, MindElixirData, NodeObj, NodeObjExport, Summary, SummarySvgGroup, Arrow, MainLineParams, SubLineParams, Locale, };
|
|
9
|
-
export * from './types/dom';
|
|
9
|
+
export type * from './types/dom';
|
|
10
|
+
export type * from './utils/pubsub';
|
package/dist/types/i18n.d.ts
CHANGED
|
@@ -11,6 +11,9 @@ type LangPack = {
|
|
|
11
11
|
clickTips: string;
|
|
12
12
|
summary: string;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
14
17
|
export type Locale = 'cn' | 'zh_CN' | 'zh_TW' | 'en' | 'ru' | 'ja' | 'pt' | 'it' | 'es' | 'fr' | 'ko';
|
|
15
18
|
declare const i18n: Record<Locale, LangPack>;
|
|
16
19
|
export default i18n;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ import './iconfont/iconfont.js';
|
|
|
3
3
|
import { LEFT, RIGHT, SIDE, DARK_THEME, THEME } from './const';
|
|
4
4
|
import { findEle } from './utils/dom';
|
|
5
5
|
import dragMoveHelper from './utils/dragMoveHelper';
|
|
6
|
-
export * from './types/index';
|
|
7
|
-
export * from './types/dom';
|
|
8
6
|
import type { MindElixirData, MindElixirInstance, MindElixirMethods, Options } from './types/index';
|
|
9
7
|
declare function MindElixir(this: MindElixirInstance, { el, direction, locale, draggable, editable, contextMenu, contextMenuOption, toolBar, keypress, mouseSelectionButton, selectionContainer, before, newTopicName, allowUndo, generateMainBranch, generateSubBranch, overflowHidden, theme, }: Options): void;
|
|
10
8
|
declare namespace MindElixir {
|
|
@@ -93,7 +91,7 @@ declare namespace MindElixir {
|
|
|
93
91
|
export var dragMoveHelper: {
|
|
94
92
|
moved: boolean;
|
|
95
93
|
mousedown: boolean;
|
|
96
|
-
onMove(e: MouseEvent,
|
|
94
|
+
onMove(e: MouseEvent, mind: MindElixirInstance): void;
|
|
97
95
|
clear(): void;
|
|
98
96
|
};
|
|
99
97
|
export { _a as new };
|
|
@@ -113,3 +111,6 @@ export interface MindElixirCtor {
|
|
|
113
111
|
}
|
|
114
112
|
declare const _default: MindElixirCtor;
|
|
115
113
|
export default _default;
|
|
114
|
+
export type * from './utils/pubsub';
|
|
115
|
+
export type * from './types/index';
|
|
116
|
+
export type * from './types/dom';
|
package/dist/types/summary.d.ts
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import type { MindElixirInstance } from '.';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface Summary {
|
|
3
6
|
id: string;
|
|
4
7
|
text: string;
|
|
8
|
+
/**
|
|
9
|
+
* parent node id of the summary
|
|
10
|
+
*/
|
|
5
11
|
parent: string;
|
|
12
|
+
/**
|
|
13
|
+
* start index of the summary
|
|
14
|
+
*/
|
|
6
15
|
start: number;
|
|
16
|
+
/**
|
|
17
|
+
* end index of the summary
|
|
18
|
+
*/
|
|
7
19
|
end: number;
|
|
8
|
-
}
|
|
20
|
+
}
|
|
9
21
|
export type SummarySvgGroup = SVGGElement & {
|
|
10
22
|
children: [SVGPathElement, SVGTextElement];
|
|
11
23
|
summaryObj: Summary;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { MindElixirInstance } from '../types/index';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
moved: boolean;
|
|
3
4
|
mousedown: boolean;
|
|
4
|
-
onMove(e: MouseEvent,
|
|
5
|
+
onMove(e: MouseEvent, mind: MindElixirInstance): void;
|
|
5
6
|
clear(): void;
|
|
6
7
|
};
|
|
7
8
|
export default _default;
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -23,13 +23,14 @@
|
|
|
23
23
|
</a>
|
|
24
24
|
</p>
|
|
25
25
|
|
|
26
|
-
[English](/readme.md)
|
|
27
|
-
[中文](/readme/zh.md)
|
|
28
|
-
[Español](/readme/es.md)
|
|
29
|
-
[Français](/readme/fr.md)
|
|
30
|
-
[Português](/readme/pt.md)
|
|
31
|
-
[Русский](/readme/ru.md)
|
|
32
|
-
[日本語](/readme/ja.md)
|
|
26
|
+
[English](/readme.md) |
|
|
27
|
+
[中文](/readme/zh.md) |
|
|
28
|
+
[Español](/readme/es.md) |
|
|
29
|
+
[Français](/readme/fr.md) |
|
|
30
|
+
[Português](/readme/pt.md) |
|
|
31
|
+
[Русский](/readme/ru.md) |
|
|
32
|
+
[日本語](/readme/ja.md) |
|
|
33
|
+
[한국어](/readme/ko.md)
|
|
33
34
|
|
|
34
35
|
Mind elixir is a open source JavaScript mind map core. You can use it with any frontend framework you like.
|
|
35
36
|
|