jsmind 0.8.8-patch → 0.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsmind",
3
- "version": "0.8.8-patch",
3
+ "version": "0.9.0",
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",
@@ -173,6 +173,23 @@ export default class jsMind {
173
173
  * @returns {import('./jsmind.node.js').Node}
174
174
  */
175
175
  get_node(node: string | import("./jsmind.node.js").Node): import("./jsmind.node.js").Node;
176
+ /**
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;
176
193
  /**
177
194
  * Add a new node to the mind map.
178
195
  * @param {string | import('./jsmind.node.js').Node} parent_node
@@ -183,6 +200,18 @@ export default class jsMind {
183
200
  * @returns {import('./jsmind.node.js').Node|null}
184
201
  */
185
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
+ * @param {string | import('./jsmind.node.js').Node} parent_node - Parent node for all new nodes
206
+ * @param {Array<{node_id: string, topic: string, data?: Record<string, any>, direction?: ('left'|'center'|'right'|'-1'|'0'|'1'|number)}>} nodes_data - Array of node data objects
207
+ * @returns {Array<import('./jsmind.node.js').Node|null>} Array of created nodes
208
+ */
209
+ add_nodes(parent_node: string | import("./jsmind.node.js").Node, nodes_data: Array<{
210
+ node_id: string;
211
+ topic: string;
212
+ data?: Record<string, any>;
213
+ direction?: ("left" | "center" | "right" | "-1" | "0" | "1" | number);
214
+ }>): Array<import("./jsmind.node.js").Node | null>;
186
215
  /**
187
216
  * Insert a node before target node.
188
217
  * @param {string | import('./jsmind.node.js').Node} node_before