jsmind 0.8.8 → 0.9.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/README.md +2 -2
- package/es6/jsmind.js +1 -1
- package/es6/jsmind.js.map +1 -1
- package/package.json +1 -2
- package/types/generated/jsmind.d.ts +82 -17
- package/types/generated/jsmind.mind.d.ts +13 -13
- package/types/generated/jsmind.option.d.ts +40 -40
- package/types/generated/jsmind.view_provider.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsmind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "jsMind is a pure javascript library for mindmap, it base on html5 canvas. jsMind was released under BSD license, you can embed it in any project, if only you observe the license.",
|
|
5
5
|
"main": "es6/jsmind.js",
|
|
6
6
|
"types": "types/generated/index.d.ts",
|
|
@@ -75,7 +75,6 @@
|
|
|
75
75
|
"prettier": "2.6.2",
|
|
76
76
|
"rollup": "2.79.2",
|
|
77
77
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
78
|
-
"tsd-jsdoc": "^2.5.0",
|
|
79
78
|
"typescript": "^5.9.2"
|
|
80
79
|
},
|
|
81
80
|
"jest": {
|
|
@@ -92,9 +92,9 @@ export default class jsMind {
|
|
|
92
92
|
disable_event_handle(event_handle: "mousedown" | "click" | "dblclick" | "mousewheel"): void;
|
|
93
93
|
/**
|
|
94
94
|
* Set theme name.
|
|
95
|
-
* @param {string|null} theme
|
|
95
|
+
* @param {string|null=} theme
|
|
96
96
|
*/
|
|
97
|
-
set_theme(theme
|
|
97
|
+
set_theme(theme?: (string | null) | undefined): void;
|
|
98
98
|
/** bind internal DOM events */
|
|
99
99
|
_event_bind(): void;
|
|
100
100
|
/** @param {MouseEvent} e */
|
|
@@ -135,7 +135,10 @@ export default class jsMind {
|
|
|
135
135
|
expand_all(): void;
|
|
136
136
|
/** Collapse all nodes */
|
|
137
137
|
collapse_all(): void;
|
|
138
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* Expand nodes up to a specified depth level.
|
|
140
|
+
* @param {number} depth
|
|
141
|
+
*/
|
|
139
142
|
expand_to_depth(depth: number): void;
|
|
140
143
|
/** reset view/layout/data */
|
|
141
144
|
_reset(): void;
|
|
@@ -171,51 +174,107 @@ export default class jsMind {
|
|
|
171
174
|
*/
|
|
172
175
|
get_node(node: string | import("./jsmind.node.js").Node): import("./jsmind.node.js").Node;
|
|
173
176
|
/**
|
|
174
|
-
* Add
|
|
177
|
+
* Add node data to the mind map without triggering UI refresh.
|
|
178
|
+
* @private
|
|
179
|
+
* @param {import('./jsmind.node.js').Node} parent_node
|
|
180
|
+
* @param {string} node_id
|
|
181
|
+
* @param {string} topic
|
|
182
|
+
* @param {Record<string, any>=} data
|
|
183
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction
|
|
184
|
+
* @returns {import('./jsmind.node.js').Node|null}
|
|
185
|
+
*/
|
|
186
|
+
private _add_node_data;
|
|
187
|
+
/**
|
|
188
|
+
* Refresh UI after node changes.
|
|
189
|
+
* @private
|
|
190
|
+
* @param {import('./jsmind.node.js').Node} parent_node
|
|
191
|
+
*/
|
|
192
|
+
private _refresh_node_ui;
|
|
193
|
+
/**
|
|
194
|
+
* Add a new node to the mind map.
|
|
175
195
|
* @param {string | import('./jsmind.node.js').Node} parent_node
|
|
176
196
|
* @param {string} node_id
|
|
177
197
|
* @param {string} topic
|
|
178
198
|
* @param {Record<string, any>=} data
|
|
179
|
-
* @param {number=} direction
|
|
199
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1)
|
|
180
200
|
* @returns {import('./jsmind.node.js').Node|null}
|
|
181
201
|
*/
|
|
182
|
-
add_node(parent_node: string | import("./jsmind.node.js").Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: number | undefined): import("./jsmind.node.js").Node | null;
|
|
202
|
+
add_node(parent_node: string | import("./jsmind.node.js").Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number) | undefined): import("./jsmind.node.js").Node | null;
|
|
203
|
+
/**
|
|
204
|
+
* Add multiple nodes to the mind map with optimized performance.
|
|
205
|
+
* Supports standard jsMind formats: node_tree, node_array, and freemind with nested children structure.
|
|
206
|
+
* @param {string | import('./jsmind.node.js').Node} parent_node - Parent node for all new nodes
|
|
207
|
+
* @param {Array<{id: string, topic: string, data?: Record<string, any>, direction?: ('left'|'center'|'right'|'-1'|'0'|'1'|number), children?: Array}>} nodes_data - Array of node data objects with same format as add_node
|
|
208
|
+
* @returns {Array<import('./jsmind.node.js').Node|null>} Array of created nodes (flattened from all levels)
|
|
209
|
+
*/
|
|
210
|
+
add_nodes(parent_node: string | import("./jsmind.node.js").Node, nodes_data: Array<{
|
|
211
|
+
id: string;
|
|
212
|
+
topic: string;
|
|
213
|
+
data?: Record<string, any>;
|
|
214
|
+
direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number);
|
|
215
|
+
children?: any[];
|
|
216
|
+
}>): Array<import("./jsmind.node.js").Node | null>;
|
|
217
|
+
/**
|
|
218
|
+
* Recursively add nodes using existing format processors.
|
|
219
|
+
* @private
|
|
220
|
+
* @param {import('./jsmind.node.js').Node} parent_node
|
|
221
|
+
* @param {object} node_data
|
|
222
|
+
* @returns {Array<import('./jsmind.node.js').Node|null>}
|
|
223
|
+
*/
|
|
224
|
+
private _add_nodes_recursive;
|
|
225
|
+
/**
|
|
226
|
+
* Count expected nodes recursively.
|
|
227
|
+
* @private
|
|
228
|
+
* @param {Array} nodes_data
|
|
229
|
+
* @returns {number}
|
|
230
|
+
*/
|
|
231
|
+
private _count_expected_nodes;
|
|
232
|
+
/**
|
|
233
|
+
* Clean up partially created nodes without triggering UI refresh for each node.
|
|
234
|
+
* @private
|
|
235
|
+
* @param {Array<import('./jsmind.node.js').Node>} created_nodes
|
|
236
|
+
*/
|
|
237
|
+
private _cleanup_partial_nodes;
|
|
183
238
|
/**
|
|
184
239
|
* Insert a node before target node.
|
|
185
240
|
* @param {string | import('./jsmind.node.js').Node} node_before
|
|
186
241
|
* @param {string} node_id
|
|
187
242
|
* @param {string} topic
|
|
188
243
|
* @param {Record<string, any>=} data
|
|
189
|
-
* @param {number=} direction
|
|
244
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1)
|
|
190
245
|
* @returns {import('./jsmind.node.js').Node|null}
|
|
191
246
|
*/
|
|
192
|
-
insert_node_before(node_before: string | import("./jsmind.node.js").Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: number | undefined): import("./jsmind.node.js").Node | null;
|
|
247
|
+
insert_node_before(node_before: string | import("./jsmind.node.js").Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number) | undefined): import("./jsmind.node.js").Node | null;
|
|
193
248
|
/**
|
|
194
249
|
* Insert a node after target node.
|
|
195
250
|
* @param {string | import('./jsmind.node.js').Node} node_after
|
|
196
251
|
* @param {string} node_id
|
|
197
252
|
* @param {string} topic
|
|
198
253
|
* @param {Record<string, any>=} data
|
|
199
|
-
* @param {number=} direction
|
|
254
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1)
|
|
200
255
|
* @returns {import('./jsmind.node.js').Node|null}
|
|
201
256
|
*/
|
|
202
|
-
insert_node_after(node_after: string | import("./jsmind.node.js").Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: number | undefined): import("./jsmind.node.js").Node | null;
|
|
257
|
+
insert_node_after(node_after: string | import("./jsmind.node.js").Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number) | undefined): import("./jsmind.node.js").Node | null;
|
|
203
258
|
/**
|
|
204
259
|
* Remove a node.
|
|
205
260
|
* @param {string | import('./jsmind.node.js').Node} node
|
|
206
261
|
* @returns {boolean}
|
|
207
262
|
*/
|
|
208
263
|
remove_node(node: string | import("./jsmind.node.js").Node): boolean;
|
|
209
|
-
/**
|
|
264
|
+
/**
|
|
265
|
+
* Update the topic (text content) of a node.
|
|
266
|
+
* @param {string} node_id
|
|
267
|
+
* @param {string} topic
|
|
268
|
+
*/
|
|
210
269
|
update_node(node_id: string, topic: string): void;
|
|
211
270
|
/**
|
|
212
271
|
* Move a node and optionally change direction.
|
|
213
272
|
* @param {string} node_id
|
|
214
|
-
* @param {string=} before_id
|
|
273
|
+
* @param {string=} before_id - The ID of the node before which to place the moved node. Special values: "_first_", "_last_"
|
|
215
274
|
* @param {string=} parent_id
|
|
216
|
-
* @param {number=} direction
|
|
275
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1). Only effective for second-level nodes (children of root). If not provided, direction will be determined automatically.
|
|
217
276
|
*/
|
|
218
|
-
move_node(node_id: string, before_id?: string | undefined, parent_id?: string | undefined, direction?: number | undefined): void;
|
|
277
|
+
move_node(node_id: string, before_id?: string | undefined, parent_id?: string | undefined, direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number) | undefined): void;
|
|
219
278
|
/**
|
|
220
279
|
* @param {string | import('./jsmind.node.js').Node} node
|
|
221
280
|
* @returns {void}
|
|
@@ -227,7 +286,10 @@ export default class jsMind {
|
|
|
227
286
|
select_clear(): void;
|
|
228
287
|
/** @param {string | import('./jsmind.node.js').Node} node */
|
|
229
288
|
is_node_visible(node: string | import("./jsmind.node.js").Node): boolean;
|
|
230
|
-
/**
|
|
289
|
+
/**
|
|
290
|
+
* Scroll the mind map to center the specified node.
|
|
291
|
+
* @param {string | import('./jsmind.node.js').Node} node
|
|
292
|
+
*/
|
|
231
293
|
scroll_node_to_center(node: string | import("./jsmind.node.js").Node): void;
|
|
232
294
|
/**
|
|
233
295
|
* Find the previous sibling node of the given node.
|
|
@@ -243,6 +305,7 @@ export default class jsMind {
|
|
|
243
305
|
*/
|
|
244
306
|
find_node_after(node: string | import("./jsmind.node.js").Node): import("./jsmind.node.js").Node | null;
|
|
245
307
|
/**
|
|
308
|
+
* Set background and foreground colors for a node.
|
|
246
309
|
* @param {string} node_id
|
|
247
310
|
* @param {string=} bg_color
|
|
248
311
|
* @param {string=} fg_color
|
|
@@ -250,6 +313,7 @@ export default class jsMind {
|
|
|
250
313
|
*/
|
|
251
314
|
set_node_color(node_id: string, bg_color?: string | undefined, fg_color?: string | undefined): void;
|
|
252
315
|
/**
|
|
316
|
+
* Set font style for a node.
|
|
253
317
|
* @param {string} node_id
|
|
254
318
|
* @param {number=} size
|
|
255
319
|
* @param {string=} weight
|
|
@@ -258,14 +322,15 @@ export default class jsMind {
|
|
|
258
322
|
*/
|
|
259
323
|
set_node_font_style(node_id: string, size?: number | undefined, weight?: string | undefined, style?: string | undefined): void;
|
|
260
324
|
/**
|
|
325
|
+
* Set background image for a node.
|
|
261
326
|
* @param {string} node_id
|
|
262
|
-
* @param {string} image
|
|
327
|
+
* @param {string=} image
|
|
263
328
|
* @param {number=} width
|
|
264
329
|
* @param {number=} height
|
|
265
330
|
* @param {number=} rotation
|
|
266
331
|
* @returns {void}
|
|
267
332
|
*/
|
|
268
|
-
set_node_background_image(node_id: string, image
|
|
333
|
+
set_node_background_image(node_id: string, image?: string | undefined, width?: number | undefined, height?: number | undefined, rotation?: number | undefined): void;
|
|
269
334
|
/**
|
|
270
335
|
* @param {string} node_id
|
|
271
336
|
* @param {number} rotation
|
|
@@ -31,22 +31,22 @@ export class Mind {
|
|
|
31
31
|
* @param {string} node_id
|
|
32
32
|
* @param {string} topic
|
|
33
33
|
* @param {Record<string, any>=} data
|
|
34
|
-
* @param {number=} direction
|
|
34
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1)
|
|
35
35
|
* @param {boolean=} expanded
|
|
36
36
|
* @param {number=} idx
|
|
37
37
|
* @returns {Node | null}
|
|
38
38
|
*/
|
|
39
|
-
add_node(parent_node: Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: number | undefined, expanded?: boolean | undefined, idx?: number | undefined): Node | null;
|
|
39
|
+
add_node(parent_node: Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number) | undefined, expanded?: boolean | undefined, idx?: number | undefined): Node | null;
|
|
40
40
|
/**
|
|
41
41
|
* Insert a node before target node.
|
|
42
42
|
* @param {Node} node_before
|
|
43
43
|
* @param {string} node_id
|
|
44
44
|
* @param {string} topic
|
|
45
45
|
* @param {Record<string, any>=} data
|
|
46
|
-
* @param {number=} direction
|
|
46
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1)
|
|
47
47
|
* @returns {Node | null}
|
|
48
48
|
*/
|
|
49
|
-
insert_node_before(node_before: Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: number | undefined): Node | null;
|
|
49
|
+
insert_node_before(node_before: Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number) | undefined): Node | null;
|
|
50
50
|
/**
|
|
51
51
|
* Get previous sibling of a node or node id.
|
|
52
52
|
* @param {string | Node} node
|
|
@@ -59,10 +59,10 @@ export class Mind {
|
|
|
59
59
|
* @param {string} node_id
|
|
60
60
|
* @param {string} topic
|
|
61
61
|
* @param {Record<string, any>=} data
|
|
62
|
-
* @param {number=} direction
|
|
62
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1)
|
|
63
63
|
* @returns {Node | null}
|
|
64
64
|
*/
|
|
65
|
-
insert_node_after(node_after: Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: number | undefined): Node | null;
|
|
65
|
+
insert_node_after(node_after: Node, node_id: string, topic: string, data?: Record<string, any> | undefined, direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number) | undefined): Node | null;
|
|
66
66
|
/**
|
|
67
67
|
* Get next sibling of a node or node id.
|
|
68
68
|
* @param {string | Node} node
|
|
@@ -72,18 +72,18 @@ export class Mind {
|
|
|
72
72
|
/**
|
|
73
73
|
* Move a node to new parent/position.
|
|
74
74
|
* @param {Node} node
|
|
75
|
-
* @param {string=} before_id
|
|
75
|
+
* @param {string=} before_id - The ID of the node before which to place the moved node. Special values: "_first_", "_last_"
|
|
76
76
|
* @param {string=} parent_id
|
|
77
|
-
* @param {number=} direction
|
|
77
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1)
|
|
78
78
|
* @returns {Node | null}
|
|
79
79
|
*/
|
|
80
|
-
move_node(node: Node, before_id?: string | undefined, parent_id?: string | undefined, direction?: number | undefined): Node | null;
|
|
80
|
+
move_node(node: Node, before_id?: string | undefined, parent_id?: string | undefined, direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number) | undefined): Node | null;
|
|
81
81
|
/**
|
|
82
82
|
* Propagate direction to descendants.
|
|
83
83
|
* @param {Node} node
|
|
84
|
-
* @param {number=} direction
|
|
84
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1)
|
|
85
85
|
*/
|
|
86
|
-
_flow_node_direction(node: Node, direction?: number | undefined): void;
|
|
86
|
+
_flow_node_direction(node: Node, direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number) | undefined): void;
|
|
87
87
|
/**
|
|
88
88
|
* Re-index node among siblings based on before_id marker.
|
|
89
89
|
* @param {Node} node
|
|
@@ -96,10 +96,10 @@ export class Mind {
|
|
|
96
96
|
* @param {Node} node
|
|
97
97
|
* @param {string} before_id
|
|
98
98
|
* @param {string} parent_id
|
|
99
|
-
* @param {number=} direction
|
|
99
|
+
* @param {('left'|'center'|'right'|'-1'|'0'|'1'|number)=} direction - Direction for node placement. Supports string values ('left', 'center', 'right'), numeric strings ('-1', '0', '1'), and numbers (-1, 0, 1)
|
|
100
100
|
* @returns {Node | null}
|
|
101
101
|
*/
|
|
102
|
-
_move_node(node: Node, before_id: string, parent_id: string, direction?: number | undefined): Node | null;
|
|
102
|
+
_move_node(node: Node, before_id: string, parent_id: string, direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number) | undefined): Node | null;
|
|
103
103
|
/**
|
|
104
104
|
* Remove a node from the mind.
|
|
105
105
|
* @param {Node} node
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Merge user options with defaults. Throws if container missing.
|
|
3
|
-
* @param {
|
|
3
|
+
* @param {JsMindRuntimeOptions} options
|
|
4
4
|
* @returns {JsMindRuntimeOptions}
|
|
5
5
|
*/
|
|
6
|
-
export function merge_option(options:
|
|
6
|
+
export function merge_option(options: JsMindRuntimeOptions): JsMindRuntimeOptions;
|
|
7
7
|
export type JsMindRuntimeOptions = {
|
|
8
8
|
container: string | HTMLElement;
|
|
9
|
-
editable
|
|
10
|
-
theme
|
|
11
|
-
mode
|
|
12
|
-
support_html
|
|
13
|
-
log_level
|
|
14
|
-
view
|
|
15
|
-
engine
|
|
16
|
-
enable_device_pixel_ratio
|
|
17
|
-
hmargin
|
|
18
|
-
vmargin
|
|
19
|
-
line_width
|
|
20
|
-
line_color
|
|
21
|
-
line_style
|
|
9
|
+
editable?: boolean;
|
|
10
|
+
theme?: (string | null);
|
|
11
|
+
mode?: ("full" | "side");
|
|
12
|
+
support_html?: boolean;
|
|
13
|
+
log_level?: "debug" | "info" | "warn" | "error" | "disable";
|
|
14
|
+
view?: {
|
|
15
|
+
engine?: "canvas" | "svg";
|
|
16
|
+
enable_device_pixel_ratio?: boolean;
|
|
17
|
+
hmargin?: number;
|
|
18
|
+
vmargin?: number;
|
|
19
|
+
line_width?: number;
|
|
20
|
+
line_color?: string;
|
|
21
|
+
line_style?: "curved" | "straight";
|
|
22
22
|
custom_line_render?: (this: object, arg: {
|
|
23
23
|
ctx: CanvasRenderingContext2D | SVGPathElement;
|
|
24
24
|
start_point: {
|
|
@@ -30,35 +30,35 @@ export type JsMindRuntimeOptions = {
|
|
|
30
30
|
y: number;
|
|
31
31
|
};
|
|
32
32
|
}) => void;
|
|
33
|
-
draggable
|
|
34
|
-
hide_scrollbars_when_draggable
|
|
35
|
-
node_overflow
|
|
36
|
-
zoom
|
|
37
|
-
min
|
|
38
|
-
max
|
|
39
|
-
step
|
|
40
|
-
mask_key
|
|
33
|
+
draggable?: boolean;
|
|
34
|
+
hide_scrollbars_when_draggable?: boolean;
|
|
35
|
+
node_overflow?: "hidden" | "wrap" | "visible";
|
|
36
|
+
zoom?: {
|
|
37
|
+
min?: number;
|
|
38
|
+
max?: number;
|
|
39
|
+
step?: number;
|
|
40
|
+
mask_key?: number;
|
|
41
41
|
};
|
|
42
|
-
custom_node_render
|
|
43
|
-
expander_style
|
|
42
|
+
custom_node_render?: (null | ((jm: import("./jsmind.js").default, ele: HTMLElement, node: import("./jsmind.node.js").Node) => void));
|
|
43
|
+
expander_style?: "char" | "number";
|
|
44
44
|
};
|
|
45
|
-
layout
|
|
46
|
-
hspace
|
|
47
|
-
vspace
|
|
48
|
-
pspace
|
|
49
|
-
cousin_space
|
|
45
|
+
layout?: {
|
|
46
|
+
hspace?: number;
|
|
47
|
+
vspace?: number;
|
|
48
|
+
pspace?: number;
|
|
49
|
+
cousin_space?: number;
|
|
50
50
|
};
|
|
51
|
-
default_event_handle
|
|
52
|
-
enable_mousedown_handle
|
|
53
|
-
enable_click_handle
|
|
54
|
-
enable_dblclick_handle
|
|
55
|
-
enable_mousewheel_handle
|
|
51
|
+
default_event_handle?: {
|
|
52
|
+
enable_mousedown_handle?: boolean;
|
|
53
|
+
enable_click_handle?: boolean;
|
|
54
|
+
enable_dblclick_handle?: boolean;
|
|
55
|
+
enable_mousewheel_handle?: boolean;
|
|
56
56
|
};
|
|
57
|
-
shortcut
|
|
58
|
-
enable
|
|
59
|
-
handles
|
|
60
|
-
mapping
|
|
57
|
+
shortcut?: {
|
|
58
|
+
enable?: boolean;
|
|
59
|
+
handles?: Record<string, (jm: import("./jsmind.js").default, e: KeyboardEvent) => void>;
|
|
60
|
+
mapping?: Record<string, number | number[]>;
|
|
61
61
|
id_generator?: () => string;
|
|
62
62
|
};
|
|
63
|
-
plugin
|
|
63
|
+
plugin?: Record<string, object>;
|
|
64
64
|
};
|
|
@@ -316,7 +316,7 @@ export class ViewProvider {
|
|
|
316
316
|
y: number;
|
|
317
317
|
}): void;
|
|
318
318
|
/** @param {import('./jsmind.node.js').Node} node */
|
|
319
|
-
_get_expander_text(node: import("./jsmind.node.js").Node): number | "..." | "
|
|
319
|
+
_get_expander_text(node: import("./jsmind.node.js").Node): number | "..." | "−" | "+";
|
|
320
320
|
/** @param {HTMLElement} ele @param {import('./jsmind.node.js').Node} node */
|
|
321
321
|
_default_node_render(ele: HTMLElement, node: import("./jsmind.node.js").Node): void;
|
|
322
322
|
/** @param {HTMLElement} ele @param {import('./jsmind.node.js').Node} node */
|