mind-elixir 5.2.0 → 5.3.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/LICENSE +21 -21
- package/dist/LayoutSsr.iife.js +1 -1
- package/dist/LayoutSsr.js +32 -31
- package/dist/MindElixir.css +1 -0
- package/dist/MindElixir.iife.js +4 -4
- package/dist/MindElixir.js +911 -954
- package/dist/MindElixirLite.css +1 -0
- package/dist/MindElixirLite.iife.js +4 -4
- package/dist/MindElixirLite.js +528 -585
- package/dist/example.iife.js +3 -3
- package/dist/example.js +1 -1
- package/dist/types/arrow.d.ts +1 -1
- package/dist/types/docs.d.ts +2 -2
- package/dist/types/index.d.ts +11 -11
- package/dist/types/methods.d.ts +39 -39
- package/dist/types/nodeOperation.d.ts +1 -1
- package/dist/types/plugin/keypress.d.ts +1 -1
- package/dist/types/summary.d.ts +1 -1
- package/dist/types/types/index.d.ts +9 -8
- package/dist/types/utils/index.d.ts +4 -404
- package/dist/types/utils/pubsub.d.ts +3 -2
- package/dist/types/utils/svg.d.ts +1 -1
- package/dist/types/viselect/src/EventEmitter.d.ts +13 -0
- package/dist/types/viselect/src/index.d.ts +112 -0
- package/dist/types/viselect/src/types.d.ts +85 -0
- package/dist/types/viselect/src/utils/arrayify.d.ts +1 -0
- package/dist/types/viselect/src/utils/browser.d.ts +2 -0
- package/dist/types/viselect/src/utils/css.d.ts +10 -0
- package/dist/types/viselect/src/utils/domRect.d.ts +1 -0
- package/dist/types/viselect/src/utils/events.d.ts +29 -0
- package/dist/types/viselect/src/utils/frames.d.ts +7 -0
- package/dist/types/viselect/src/utils/intersects.d.ts +9 -0
- package/dist/types/viselect/src/utils/matchesTrigger.d.ts +16 -0
- package/dist/types/viselect/src/utils/selectAll.d.ts +8 -0
- package/package.json +40 -36
- package/readme.md +430 -432
- package/dist/style.css +0 -1
- package/readme/es.md +0 -430
- package/readme/fr.md +0 -430
- package/readme/ja.md +0 -429
- package/readme/ko.md +0 -430
- package/readme/pt.md +0 -430
- package/readme/ru.md +0 -430
- package/readme/zh.md +0 -430
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type Intersection = 'center' | 'cover' | 'touch';
|
|
2
|
+
/**
|
|
3
|
+
* Check if two DOM-Elements intersects each other.
|
|
4
|
+
* @param a BoundingClientRect of the first element.
|
|
5
|
+
* @param b BoundingClientRect of the second element.
|
|
6
|
+
* @param mode Options are center, cover or touch.
|
|
7
|
+
* @returns {boolean} If both elements intersects each other.
|
|
8
|
+
*/
|
|
9
|
+
export declare const intersects: (a: DOMRect, b: DOMRect, mode?: Intersection) => boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type MouseButton = 0 | 1 | 2 | 3 | 4;
|
|
2
|
+
export type Modifier = 'ctrl' | 'alt' | 'shift';
|
|
3
|
+
export type MouseButtonWithModifiers = {
|
|
4
|
+
button: MouseButton;
|
|
5
|
+
modifiers: Modifier[];
|
|
6
|
+
};
|
|
7
|
+
export type Trigger = MouseButton | MouseButtonWithModifiers;
|
|
8
|
+
/**
|
|
9
|
+
* Determines whether a MouseEvent should execute until completion depending on
|
|
10
|
+
* which button and modifier(s) are active for the MouseEvent.
|
|
11
|
+
* The Event will execute to completion if ANY of the triggers "matches"
|
|
12
|
+
* @param event MouseEvent that should be checked
|
|
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
|
|
15
|
+
*/
|
|
16
|
+
export declare const matchesTrigger: (event: MouseEvent, triggers: Trigger[]) => boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type SelectAllSelectors = (string | Element)[] | string | Element;
|
|
2
|
+
/**
|
|
3
|
+
* Takes a selector (or array of selectors) and returns the matched nodes.
|
|
4
|
+
* @param selector The selector or an Array of selectors.
|
|
5
|
+
* @param doc
|
|
6
|
+
* @returns {Array} Array of DOM-Nodes.
|
|
7
|
+
*/
|
|
8
|
+
export declare const selectAll: (selector: SelectAllSelectors, doc?: Document) => Element[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mind-elixir",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Mind elixir is a free open source mind map core.",
|
|
6
6
|
"keywords": [
|
|
@@ -9,6 +9,22 @@
|
|
|
9
9
|
"dom",
|
|
10
10
|
"visualization"
|
|
11
11
|
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"prepare": "husky install",
|
|
14
|
+
"lint": "eslint --cache --max-warnings 0 \"src/**/*.{js,json,ts}\" --fix",
|
|
15
|
+
"dev": "vite",
|
|
16
|
+
"build": "node build.js && tsc",
|
|
17
|
+
"tsc": "tsc",
|
|
18
|
+
"preview": "vite preview",
|
|
19
|
+
"test": "playwright test",
|
|
20
|
+
"test:ui": "playwright test --ui",
|
|
21
|
+
"test:clean": "rimraf .nyc_output coverage",
|
|
22
|
+
"test:coverage": "pnpm test:clean && pnpm test && pnpm nyc && npx http-server ./coverage",
|
|
23
|
+
"nyc": "nyc report --reporter=html",
|
|
24
|
+
"doc": "api-extractor run --local --verbose",
|
|
25
|
+
"doc:md": "api-documenter markdown --input-folder ./api --output-folder ./md",
|
|
26
|
+
"beta": "npm run build && npm publish --tag beta"
|
|
27
|
+
},
|
|
12
28
|
"exports": {
|
|
13
29
|
".": {
|
|
14
30
|
"types": "./dist/types/index.d.ts",
|
|
@@ -62,46 +78,34 @@
|
|
|
62
78
|
"author": "ssshooter",
|
|
63
79
|
"license": "MIT",
|
|
64
80
|
"devDependencies": {
|
|
65
|
-
"@commitlint/cli": "^
|
|
66
|
-
"@commitlint/config-conventional": "^
|
|
67
|
-
"@
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
81
|
+
"@commitlint/cli": "^20.0.0",
|
|
82
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
83
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
84
|
+
"@eslint/js": "^9.36.0",
|
|
85
|
+
"@microsoft/api-documenter": "^7.26.34",
|
|
86
|
+
"@microsoft/api-extractor": "^7.52.13",
|
|
87
|
+
"@playwright/test": "^1.55.1",
|
|
70
88
|
"@rollup/plugin-strip": "^3.0.4",
|
|
71
|
-
"@types/node": "^
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
73
|
-
"@typescript-eslint/parser": "^
|
|
89
|
+
"@types/node": "^24.5.2",
|
|
90
|
+
"@typescript-eslint/eslint-plugin": "^8.44.1",
|
|
91
|
+
"@typescript-eslint/parser": "^8.44.1",
|
|
74
92
|
"@viselect/vanilla": "3.9.0",
|
|
75
|
-
"@zumer/snapdom": "^1.
|
|
76
|
-
"eslint": "^
|
|
77
|
-
"eslint-config-prettier": "^
|
|
78
|
-
"eslint-plugin-prettier": "^
|
|
79
|
-
"
|
|
93
|
+
"@zumer/snapdom": "^1.9.11",
|
|
94
|
+
"eslint": "^9.36.0",
|
|
95
|
+
"eslint-config-prettier": "^10.1.8",
|
|
96
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
97
|
+
"globals": "^16.4.0",
|
|
98
|
+
"husky": "^9.1.7",
|
|
80
99
|
"katex": "^0.16.22",
|
|
81
|
-
"less": "^4.
|
|
82
|
-
"lint-staged": "^
|
|
83
|
-
"marked": "^16.
|
|
100
|
+
"less": "^4.4.1",
|
|
101
|
+
"lint-staged": "^16.2.1",
|
|
102
|
+
"marked": "^16.3.0",
|
|
84
103
|
"nyc": "^17.1.0",
|
|
85
|
-
"prettier": "
|
|
104
|
+
"prettier": "3.6.2",
|
|
86
105
|
"rimraf": "^6.0.1",
|
|
87
106
|
"simple-markdown-to-html": "^1.0.0",
|
|
88
|
-
"typescript": "^5.
|
|
89
|
-
"vite": "^
|
|
90
|
-
"vite-plugin-istanbul": "^7.
|
|
91
|
-
},
|
|
92
|
-
"scripts": {
|
|
93
|
-
"lint": "eslint --cache --max-warnings 0 \"src/**/*.{js,json,ts}\" --fix",
|
|
94
|
-
"dev": "vite",
|
|
95
|
-
"build": "node build.js && tsc",
|
|
96
|
-
"tsc": "tsc",
|
|
97
|
-
"preview": "vite preview",
|
|
98
|
-
"test": "playwright test",
|
|
99
|
-
"test:ui": "playwright test --ui",
|
|
100
|
-
"test:clean": "rimraf .nyc_output coverage",
|
|
101
|
-
"test:coverage": "pnpm test:clean && pnpm test && pnpm nyc && npx http-server ./coverage",
|
|
102
|
-
"nyc": "nyc report --reporter=html",
|
|
103
|
-
"doc": "api-extractor run --local --verbose",
|
|
104
|
-
"doc:md": "api-documenter markdown --input-folder ./api --output-folder ./md",
|
|
105
|
-
"beta": "npm run build && npm publish --tag beta"
|
|
107
|
+
"typescript": "^5.9.2",
|
|
108
|
+
"vite": "^7.1.7",
|
|
109
|
+
"vite-plugin-istanbul": "^7.2.0"
|
|
106
110
|
}
|
|
107
111
|
}
|