mind-elixir 3.0.2 → 3.0.3

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.
@@ -12,6 +12,9 @@ export declare const THEME: {
12
12
  '--main-bgcolor': string;
13
13
  '--color': string;
14
14
  '--bgcolor': string;
15
+ '--panel-color': string;
16
+ '--panel-bgcolor': string;
17
+ '--panel-border-color': string;
15
18
  };
16
19
  };
17
20
  export declare const DARK_THEME: {
@@ -22,5 +25,8 @@ export declare const DARK_THEME: {
22
25
  '--main-bgcolor': string;
23
26
  '--color': string;
24
27
  '--bgcolor': string;
28
+ '--panel-color': string;
29
+ '--panel-bgcolor': string;
30
+ '--panel-border-color': string;
25
31
  };
26
32
  };
@@ -80,6 +80,9 @@ declare namespace MindElixir {
80
80
  '--main-bgcolor': string;
81
81
  '--color': string;
82
82
  '--bgcolor': string;
83
+ '--panel-color': string;
84
+ '--panel-bgcolor': string;
85
+ '--panel-border-color': string;
83
86
  };
84
87
  };
85
88
  export var DARK_THEME: {
@@ -90,6 +93,9 @@ declare namespace MindElixir {
90
93
  '--main-bgcolor': string;
91
94
  '--color': string;
92
95
  '--bgcolor': string;
96
+ '--panel-color': string;
97
+ '--panel-bgcolor': string;
98
+ '--panel-border-color': string;
93
99
  };
94
100
  };
95
101
  export var version: string;
@@ -19,7 +19,7 @@ export type Operation = {
19
19
  } | {
20
20
  name: 'removeNode';
21
21
  obj: NodeObj;
22
- originSiblingId?: string;
22
+ originIndex?: number;
23
23
  originParentId?: string;
24
24
  };
25
25
  export type EventMap = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mind-elixir",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "type": "module",
5
5
  "description": "Mind elixir is a free open source mind map core.",
6
6
  "keywords": [
package/readme.md CHANGED
@@ -34,37 +34,29 @@ Mind elixir is a free open source mind map core.
34
34
  - Pluginable
35
35
  - Build-in drag and drop / node edit plugin
36
36
  - Styling your node with CSS
37
+ - Undo / Redo
37
38
 
38
39
  <details>
39
40
  <summary>Table of Contents</summary>
40
41
 
41
- - [Doc](#doc)
42
42
  - [Try now](#try-now)
43
43
  - [Playground](#playground)
44
- - [Vanilla JS](#vanilla-js)
45
- - [Use with React](#use-with-react)
46
- - [Use with Vue](#use-with-vue)
47
- - [Use with Vue3](#use-with-vue3)
48
44
  - [Usage](#usage)
49
45
  - [Install](#install)
50
46
  - [NPM](#npm)
51
47
  - [Script tag](#script-tag)
52
- - [HTML structure](#html-structure)
53
48
  - [Init](#init)
54
49
  - [Data Structure](#data-structure)
55
50
  - [Event Handling](#event-handling)
56
51
  - [Data Export And Import](#data-export-and-import)
57
52
  - [Operation Guards](#operation-guards)
53
+ - [Methods](#methods)
58
54
  - [Theme](#theme)
59
55
  - [Not only core](#not-only-core)
60
56
  - [Development](#development)
61
57
 
62
58
  </details>
63
59
 
64
- ## Doc
65
-
66
- https://doc.mind-elixir.com/
67
-
68
60
  ## Try now
69
61
 
70
62
  ![mindelixir](https://raw.githubusercontent.com/ssshooter/mind-elixir-core/master/images/screenshot2.png)
@@ -73,21 +65,10 @@ https://mind-elixir.com/
73
65
 
74
66
  ### Playground
75
67
 
76
- #### Vanilla JS
77
-
78
- https://codepen.io/ssshooter/pen/rNqGpwW
79
-
80
- #### Use with React
81
-
82
- https://codesandbox.io/s/mind-elixir-2-x-react-q9glxt
83
-
84
- #### Use with Vue
85
-
86
- https://codesandbox.io/s/mind-elixir-vue-nqjjl
87
-
88
- #### Use with Vue3
89
-
90
- https://codesandbox.io/s/mind-elixir-vue3-dtcq6u
68
+ - Vanilla JS - https://codepen.io/ssshooter/pen/OJrJowN
69
+ - React - https://codesandbox.io/s/mind-elixir-3-x-react-18-x-vy9fcq
70
+ - Vue3 - https://codesandbox.io/s/mind-elixir-3-x-vue3-lth484
71
+ - Vue2 - https://codesandbox.io/s/mind-elixir-3-x-vue-2-x-5kdfjp
91
72
 
92
73
  ## Usage
93
74
 
@@ -100,7 +81,7 @@ npm i mind-elixir -S
100
81
  ```
101
82
 
102
83
  ```javascript
103
- import MindElixir, { E } from 'mind-elixir'
84
+ import MindElixir from 'mind-elixir'
104
85
  ```
105
86
 
106
87
  #### Script tag
@@ -109,7 +90,7 @@ import MindElixir, { E } from 'mind-elixir'
109
90
  <script src="https://cdn.jsdelivr.net/npm/mind-elixir/dist/MindElixir.js"></script>
110
91
  ```
111
92
 
112
- ### HTML structure
93
+ ### Init
113
94
 
114
95
  ```html
115
96
  <div id="map"></div>
@@ -121,12 +102,10 @@ import MindElixir, { E } from 'mind-elixir'
121
102
  </style>
122
103
  ```
123
104
 
124
- ### Init
125
-
126
105
  **Breaking Change** since 1.0.0, `data` should be passed to `init()`, not `options`.
127
106
 
128
107
  ```javascript
129
- import MindElixir, { E } from 'mind-elixir'
108
+ import MindElixir from 'mind-elixir'
130
109
  import example from 'mind-elixir/dist/example1'
131
110
 
132
111
  let options = {
@@ -174,7 +153,7 @@ const data = MindElixir.new('new topic')
174
153
  mind.init(data)
175
154
 
176
155
  // get a node
177
- E('node-id')
156
+ MindElixir.E('node-id')
178
157
  ```
179
158
 
180
159
  ### Data Structure
@@ -272,6 +251,10 @@ let mind = new MindElixir({
272
251
  })
273
252
  ```
274
253
 
254
+ ## Methods
255
+
256
+ https://github.com/ssshooter/mind-elixir-core/blob/master/api/mind-elixir.api.md
257
+
275
258
  ## Theme
276
259
 
277
260
  ```javascript
@@ -287,6 +270,8 @@ const options = {
287
270
  '--main-bgcolor': '#4c4f69',
288
271
  '--color': '#cccccc',
289
272
  '--bgcolor': '#252526',
273
+ '--panel-color': '255, 255, 255',
274
+ '--panel-bgcolor': '45, 55, 72',
290
275
  },
291
276
  // all variables see /src/index.less
292
277
  },
@@ -307,11 +292,12 @@ mind.changeTheme({
307
292
  })
308
293
  ```
309
294
 
310
- Be aware that Mind Elixir will not observe the change of `prefers-color-scheme`. Please change the theme manually when the scheme changes.
295
+ Be aware that Mind Elixir will not observe the change of `prefers-color-scheme`. Please change the theme **manually** when the scheme changes.
311
296
 
312
297
  ## Not only core
313
298
 
314
299
  - [@mind-elixir/node-menu](https://github.com/ssshooter/node-menu)
300
+ - [@mind-elixir/node-menu-neo](https://github.com/ssshooter/node-menu-neo)
315
301
  - [@mind-elixir/export-xmind](https://github.com/ssshooter/export-xmind)
316
302
  - [@mind-elixir/export-html](https://github.com/ssshooter/export-html)
317
303
  - [@mind-elixir/export-image](https://github.com/ssshooter/export-image) (WIP🚧)
@@ -320,7 +306,7 @@ Be aware that Mind Elixir will not observe the change of `prefers-color-scheme`.
320
306
  ## Development
321
307
 
322
308
  ```
323
- yarn
309
+ pnpm i
324
310
  npm start
325
311
  ```
326
312
 
@@ -330,5 +316,4 @@ Test generated files with `dev.dist.ts`:
330
316
  npm run build
331
317
  npm link
332
318
  npm link mind-elixir
333
- npm run startd
334
319
  ```