mind-elixir 4.2.5 → 4.3.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.
- package/dist/MindElixir.iife.js +5 -5
- package/dist/MindElixir.js +558 -553
- package/dist/MindElixirLite.iife.js +5 -5
- package/dist/MindElixirLite.js +357 -352
- package/dist/example.iife.js +1 -1
- package/dist/example.js +3 -2
- package/dist/types/const.d.ts +0 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/methods.d.ts +1 -1
- package/dist/types/nodeOperation.d.ts +1 -1
- package/dist/types/types/dom.d.ts +1 -1
- package/dist/types/types/index.d.ts +14 -0
- package/package.json +3 -3
- package/readme.md +1 -1
package/dist/example.iife.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var example=function(){"use strict";return{nodeData:{id:"me-root",topic:"Mind Elixir",tags:["Mind Map Core"],children:[{topic:"logo2",id:"56dae51a90d350a8",direction:0,expanded:!0,children:[{id:"use-image",topic:"mind-elixir",image:{url:"https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/logo2.png",height:
|
|
1
|
+
var example=function(){"use strict";return{nodeData:{id:"me-root",topic:"Mind Elixir",tags:["Mind Map Core"],children:[{topic:"logo2",id:"56dae51a90d350a8",direction:0,expanded:!0,children:[{id:"use-image",topic:"mind-elixir",image:{url:"https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/logo2.png",height:100,width:90,fit:"contain"}}]},{topic:"What is Mind Elixir",id:"bd4313fbac40284b",direction:0,expanded:!0,children:[{topic:"A mind map core",id:"beeb823afd6d2114"},{topic:"Free",id:"c1f068377de9f3a0"},{topic:"Open-Source",id:"c1f06d38a09f23ca"},{topic:"Use without JavaScript framework",id:"c1f06e4cbcf16463",expanded:!0,children:[]},{topic:"Use in your own project",id:"c1f1f11a7fbf7550",children:[{topic:"import MindElixir from 'mind-elixir'",id:"c1f1e245b0a89f9b"},{topic:"new MindElixir({...}).init(data)",id:"c1f1ebc7072c8928"}]},{topic:"Easy to use",id:"c1f0723c07b408d7",expanded:!0,children:[{topic:"Use it like other mind map application",id:"c1f09612fd89920d"}]}]},{topic:"Basics",id:"bd1b66c4b56754d9",direction:0,expanded:!0,children:[{topic:"tab - Create a child node",id:"bd1b6892bcab126a"},{topic:"enter - Create a sibling node",id:"bd1b6b632a434b27"},{topic:"del - Remove a node",id:"bd1b983085187c0a"}]},{topic:"Focus mode",id:"bd1b9b94a9a7a913",direction:1,expanded:!0,children:[{topic:"Right click and select Focus Mode",id:"bd1bb2ac4bbab458"},{topic:"Right click and select Cancel Focus Mode",id:"bd1bb4b14d6697c3"}]},{topic:"Left menu",id:"bd1b9d1816ede134",direction:0,expanded:!0,children:[{topic:"Node distribution",id:"bd1ba11e620c3c1a",expanded:!0,children:[{topic:"Left",id:"bd1c1cb51e6745d3"},{topic:"Right",id:"bd1c1e12fd603ff6"},{topic:"Both l & r",id:"bd1c1f03def5c97b"}]}]},{topic:"Bottom menu",id:"bd1ba66996df4ba4",direction:1,expanded:!0,children:[{topic:"Full screen",id:"bd1ba81d9bc95a7e"},{topic:"Return to Center",id:"bd1babdd5c18a7a2"},{topic:"Zoom in",id:"bd1bae68e0ab186e"},{topic:"Zoom out",id:"bd1bb06377439977"}]},{topic:"Link",id:"bd1beff607711025",direction:0,expanded:!0,children:[{topic:"Right click and select Link",id:"bd1bf320da90046a"},{topic:"Click the target you want to link",id:"bd1bf6f94ff2e642"},{topic:"Modify link with control points",id:"bd1c0c4a487bd036"}]},{topic:"Node style",id:"bd1c217f9d0b20bd",direction:0,expanded:!0,children:[{topic:"Font Size",id:"bd1c24420cd2c2f5",style:{fontSize:"32",color:"#3298db"}},{topic:"Font Color",id:"bd1c2a59b9a2739c",style:{color:"#c0392c"}},{topic:"Background Color",id:"bd1c2de33f057eb4",style:{color:"#bdc3c7",background:"#2c3e50"}},{topic:"Add tags",id:"bd1cff58364436d0",tags:["Completed"]},{topic:"Add icons",id:"bd1d0317f7e8a61a",icons:["😂"],tags:["www"]},{topic:"Bolder",id:"bd41fd4ca32322a4",style:{fontWeight:"bold"}},{topic:"Hyper link",id:"bd41fd4ca32322a5",hyperLink:"https://github.com/ssshooter/mind-elixir-core"}]},{topic:"Draggable",id:"bd1f03fee1f63bc6",direction:1,expanded:!0,children:[{topic:`Drag a node to another node
|
|
2
2
|
and the former one will become a child node of latter one`,id:"bd1f07c598e729dc"}]},{topic:"Export data",id:"beeb7586973430db",direction:1,expanded:!0,children:[{topic:"JSON",id:"beeb784cc189375f"},{topic:"HTML",id:"beeb7a6bec2d68f5"},{topic:"SVG",id:"beeb7a6bec2d68e6"}]},{topic:"dangerouslySetInnerHTML",id:"c00a1cf60baa44f0",children:[{topic:"Katex",id:"c00a2264f4532611",children:[{topic:"",id:"c00a2264f4532612",dangerouslySetInnerHTML:'<div class="math math-display"><span class="katex-display"><span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:2.4em;vertical-align:-0.95em;"></span><span class="minner"><span class="mopen delimcenter" style="top:0em;"><span class="delimsizing size1">[</span></span><span class="mord"><span class="mtable"><span class="col-align-c"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.85em;"><span style="top:-3.01em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathnormal">x</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.35em;"><span></span></span></span></span></span><span class="arraycolsep" style="width:0.5em;"></span><span class="arraycolsep" style="width:0.5em;"></span><span class="col-align-c"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.85em;"><span style="top:-3.01em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.03588em;">y</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.35em;"><span></span></span></span></span></span></span></span><span class="mclose delimcenter" style="top:0em;"><span class="delimsizing size1">]</span></span></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner"><span class="mopen delimcenter" style="top:0em;"><span class="delimsizing size3">[</span></span><span class="mord"><span class="mtable"><span class="col-align-c"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.45em;"><span style="top:-3.61em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathnormal">a</span></span></span><span style="top:-2.41em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathnormal">b</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.95em;"><span></span></span></span></span></span><span class="arraycolsep" style="width:0.5em;"></span><span class="arraycolsep" style="width:0.5em;"></span><span class="col-align-c"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.45em;"><span style="top:-3.61em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathnormal">c</span></span></span><span style="top:-2.41em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathnormal">d</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.95em;"><span></span></span></span></span></span></span></span><span class="mclose delimcenter" style="top:0em;"><span class="delimsizing size3">]</span></span></span></span></span></span></span></div>'}]},{topic:"Code Block",id:"c00a2264fdaw32612",children:[{topic:"",id:"c00a2264f4532613",dangerouslySetInnerHTML:`<pre class="language-javascript"><code class="language-javascript"><span class="token keyword">let</span> message <span class="token operator">=</span> <span class="token string">'Hello world'</span>
|
|
3
3
|
<span class="token function">alert</span><span class="token punctuation">(</span>message<span class="token punctuation">)</span></code></pre>`}]},{topic:"Customized Div",id:"c00a2264f4532615",children:[{topic:"",id:"c00a2264f4532614",dangerouslySetInnerHTML:'<div><style>.title{font-size:50px}</style><div class="title">Title</div><div style="color: red; font-size: 20px;">Hello world</div></div>'}]}]},{topic:"Caution",id:"bd42dad21aaf6bae",direction:0,style:{background:"#f1c40e"},expanded:!0,children:[{topic:"Only save manually",id:"bd42e1d0163ebf04",expanded:!0,children:[{topic:"Save button in the top-right corner",id:"bd42e619051878b3",branchColor:"green",expanded:!0,children:[]},{topic:"ctrl + S",id:"bd42e97d7ac35e99"}]}]}],expanded:!0},arrows:[{id:"ac5fb1df7345e9c4",label:"Render",from:"beeb784cc189375f",to:"beeb7a6bec2d68f5",delta1:{x:142.8828125,y:-57},delta2:{x:146.1171875,y:45}}],summaries:[{id:"a5e68e6a2ce1b648",parent:"bd42e1d0163ebf04",start:0,end:1,text:"summary"},{id:"a5e6978f1bc69f4a",parent:"bd4313fbac40284b",start:3,end:5,text:"summary"}],direction:2,theme:{name:"Latte",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--main-color":"#444446","--main-bgcolor":"#ffffff","--color":"#777777","--bgcolor":"#f6f6f6","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea"}}}}();
|
package/dist/example.js
CHANGED
|
@@ -16,8 +16,9 @@ const s = '<div class="math math-display"><span class="katex-display"><span clas
|
|
|
16
16
|
topic: "mind-elixir",
|
|
17
17
|
image: {
|
|
18
18
|
url: "https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/logo2.png",
|
|
19
|
-
height:
|
|
20
|
-
width: 90
|
|
19
|
+
height: 100,
|
|
20
|
+
width: 90,
|
|
21
|
+
fit: "contain"
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
]
|
package/dist/types/const.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ declare namespace MindElixir {
|
|
|
26
26
|
selectArrow: (this: MindElixirInstance, link: import("./types/dom").CustomSvg) => void;
|
|
27
27
|
unselectArrow: (this: MindElixirInstance) => void;
|
|
28
28
|
rmSubline: (this: MindElixirInstance, tpc: import("./types/dom").Topic) => Promise<void>;
|
|
29
|
-
reshapeNode: (this: MindElixirInstance, tpc: import("./types/dom").Topic, patchData: import("./types/index").NodeObj) => Promise<void>;
|
|
29
|
+
reshapeNode: (this: MindElixirInstance, tpc: import("./types/dom").Topic, patchData: Partial<import("./types/index").NodeObj>) => Promise<void>;
|
|
30
30
|
insertSibling: (this: MindElixirInstance, type: "before" | "after", el?: import("./types/dom").Topic | undefined, node?: import("./types/index").NodeObj | undefined) => Promise<void>;
|
|
31
31
|
insertParent: (this: MindElixirInstance, el?: import("./types/dom").Topic | undefined, node?: import("./types/index").NodeObj | undefined) => Promise<void>;
|
|
32
32
|
addChild: (this: MindElixirInstance, el?: import("./types/dom").Topic | undefined, node?: import("./types/index").NodeObj | undefined) => Promise<void>;
|
package/dist/types/methods.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare const methods: {
|
|
|
28
28
|
selectArrow: (this: MindElixirInstance, link: import("./index").CustomSvg) => void;
|
|
29
29
|
unselectArrow: (this: MindElixirInstance) => void;
|
|
30
30
|
rmSubline: (this: MindElixirInstance, tpc: import("./index").Topic) => Promise<void>;
|
|
31
|
-
reshapeNode: (this: MindElixirInstance, tpc: import("./index").Topic, patchData: import("./types").NodeObj) => Promise<void>;
|
|
31
|
+
reshapeNode: (this: MindElixirInstance, tpc: import("./index").Topic, patchData: Partial<import("./types").NodeObj>) => Promise<void>;
|
|
32
32
|
insertSibling: (this: MindElixirInstance, type: "before" | "after", el?: import("./index").Topic | undefined, node?: import("./types").NodeObj | undefined) => Promise<void>;
|
|
33
33
|
insertParent: (this: MindElixirInstance, el?: import("./index").Topic | undefined, node?: import("./types").NodeObj | undefined) => Promise<void>;
|
|
34
34
|
addChild: (this: MindElixirInstance, el?: import("./index").Topic | undefined, node?: import("./types").NodeObj | undefined) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Topic } from './types/dom';
|
|
2
2
|
import type { MindElixirInstance, NodeObj } from './types/index';
|
|
3
3
|
export declare const rmSubline: (tpc: Topic) => void;
|
|
4
|
-
export declare const reshapeNode: (this: MindElixirInstance, tpc: Topic, patchData: NodeObj) => void;
|
|
4
|
+
export declare const reshapeNode: (this: MindElixirInstance, tpc: Topic, patchData: Partial<NodeObj>) => void;
|
|
5
5
|
export declare const insertSibling: (this: MindElixirInstance, type: "before" | "after", el?: Topic, node?: NodeObj) => void;
|
|
6
6
|
export declare const insertParent: (this: MindElixirInstance, el?: Topic, node?: NodeObj) => void;
|
|
7
7
|
export declare const addChild: (this: MindElixirInstance, el?: Topic, node?: NodeObj) => void;
|
|
@@ -12,10 +12,23 @@ export * from '../methods';
|
|
|
12
12
|
type Before = Partial<{
|
|
13
13
|
[K in Operations]: (...args: Parameters<OperationMap[K]>) => Promise<boolean> | boolean;
|
|
14
14
|
}>;
|
|
15
|
+
/**
|
|
16
|
+
* MindElixir Theme
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
15
20
|
export type Theme = {
|
|
16
21
|
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* Hint for developers to use the correct theme
|
|
24
|
+
*/
|
|
25
|
+
type?: 'light' | 'dark';
|
|
26
|
+
/**
|
|
27
|
+
* Color palette for main branches
|
|
28
|
+
*/
|
|
17
29
|
palette: string[];
|
|
18
30
|
cssVar: Partial<{
|
|
31
|
+
'--gap': string;
|
|
19
32
|
'--main-color': string;
|
|
20
33
|
'--main-bgcolor': string;
|
|
21
34
|
'--color': string;
|
|
@@ -150,6 +163,7 @@ export type NodeObj = {
|
|
|
150
163
|
url: string;
|
|
151
164
|
width: number;
|
|
152
165
|
height: number;
|
|
166
|
+
fit?: 'fill' | 'contain' | 'cover';
|
|
153
167
|
};
|
|
154
168
|
branchColor?: string;
|
|
155
169
|
parent?: NodeObj;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mind-elixir",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Mind elixir is a free open source mind map core.",
|
|
6
6
|
"keywords": [
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@commitlint/cli": "^17.8.1",
|
|
72
72
|
"@commitlint/config-conventional": "^17.8.1",
|
|
73
|
-
"@microsoft/api-documenter": "^7.25.
|
|
74
|
-
"@microsoft/api-extractor": "^7.47.
|
|
73
|
+
"@microsoft/api-documenter": "^7.25.21",
|
|
74
|
+
"@microsoft/api-extractor": "^7.47.11",
|
|
75
75
|
"@playwright/test": "^1.44.1",
|
|
76
76
|
"@rollup/plugin-strip": "^3.0.4",
|
|
77
77
|
"@types/node": "^20.14.2",
|