@umbraci/jsmind 0.10.14 → 0.10.15

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.
Files changed (69) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +116 -116
  3. package/dist/jsmind.copy-paste.js +9 -0
  4. package/dist/jsmind.copy-paste.js.map +1 -0
  5. package/dist/jsmind.draggable-node.js +1 -1
  6. package/dist/jsmind.draggable-node.js.map +1 -1
  7. package/dist/jsmind.history.js +1 -1
  8. package/dist/jsmind.history.js.map +1 -1
  9. package/dist/jsmind.js +1 -1
  10. package/dist/jsmind.js.map +1 -1
  11. package/dist/jsmind.multi-select.js +1 -1
  12. package/dist/jsmind.multi-select.js.map +1 -1
  13. package/dist/jsmind.multiline-text.js +1 -1
  14. package/dist/jsmind.multiline-text.js.map +1 -1
  15. package/dist/jsmind.screenshot.js +1 -1
  16. package/dist/jsmind.screenshot.js.map +1 -1
  17. package/es/jsmind.copy-paste.js +9 -0
  18. package/es/jsmind.copy-paste.js.map +1 -0
  19. package/es/jsmind.draggable-node.js +1 -1
  20. package/es/jsmind.draggable-node.js.map +1 -1
  21. package/es/jsmind.history.js +1 -1
  22. package/es/jsmind.history.js.map +1 -1
  23. package/es/jsmind.js +1 -1
  24. package/es/jsmind.js.map +1 -1
  25. package/es/jsmind.multi-select.js +1 -1
  26. package/es/jsmind.multi-select.js.map +1 -1
  27. package/es/jsmind.multiline-text.js +1 -1
  28. package/es/jsmind.multiline-text.js.map +1 -1
  29. package/es/jsmind.screenshot.js +1 -1
  30. package/es/jsmind.screenshot.js.map +1 -1
  31. package/lib/jsmind.copy-paste.js +9 -0
  32. package/lib/jsmind.copy-paste.js.map +1 -0
  33. package/lib/jsmind.draggable-node.js +1 -1
  34. package/lib/jsmind.draggable-node.js.map +1 -1
  35. package/lib/jsmind.history.js +1 -1
  36. package/lib/jsmind.history.js.map +1 -1
  37. package/lib/jsmind.js +1 -1
  38. package/lib/jsmind.js.map +1 -1
  39. package/lib/jsmind.multi-select.js +1 -1
  40. package/lib/jsmind.multi-select.js.map +1 -1
  41. package/lib/jsmind.multiline-text.js +1 -1
  42. package/lib/jsmind.multiline-text.js.map +1 -1
  43. package/lib/jsmind.screenshot.js +1 -1
  44. package/lib/jsmind.screenshot.js.map +1 -1
  45. package/package.json +115 -115
  46. package/style/jsmind.css +408 -408
  47. package/types/generated/index.d.ts +8 -0
  48. package/types/generated/jsmind.common.d.ts +68 -0
  49. package/types/generated/jsmind.d.ts +632 -0
  50. package/types/generated/jsmind.data_provider.d.ts +56 -0
  51. package/types/generated/jsmind.dom.d.ts +59 -0
  52. package/types/generated/jsmind.enhanced-plugin.d.ts +103 -0
  53. package/types/generated/jsmind.format.d.ts +113 -0
  54. package/types/generated/jsmind.graph.d.ts +180 -0
  55. package/types/generated/jsmind.layout_provider.d.ts +182 -0
  56. package/types/generated/jsmind.mind.d.ts +129 -0
  57. package/types/generated/jsmind.node.d.ts +69 -0
  58. package/types/generated/jsmind.option.d.ts +78 -0
  59. package/types/generated/jsmind.plugin.d.ts +21 -0
  60. package/types/generated/jsmind.shortcut_provider.d.ts +52 -0
  61. package/types/generated/jsmind.util.d.ts +26 -0
  62. package/types/generated/jsmind.view_provider.d.ts +374 -0
  63. package/types/generated/plugins/history/history-diff.d.ts +310 -0
  64. package/types/generated/plugins/history/jsmind.history.d.ts +87 -0
  65. package/types/generated/plugins/jsmind.draggable-node.d.ts +262 -0
  66. package/types/generated/plugins/jsmind.multiline-text-v2.d.ts +58 -0
  67. package/types/generated/plugins/jsmind.multiline-text.d.ts +43 -0
  68. package/types/generated/plugins/jsmind.screenshot.d.ts +83 -0
  69. package/types/tsconfig.declaration.json +19 -19
@@ -0,0 +1,59 @@
1
+ export const $: Dom;
2
+ /**
3
+ * @license BSD
4
+ * @copyright 2014-2025 UmbraCi
5
+ *
6
+ * Project Home:
7
+ * https://github.com/UmbraCi/jsmind/
8
+ */
9
+ /**
10
+ * Lightweight DOM helpers bound to a window.
11
+ */
12
+ declare class Dom {
13
+ /**
14
+ * @param {Window} w
15
+ */
16
+ constructor(w: Window);
17
+ /** @type {Window} */
18
+ w: Window;
19
+ /** @type {Document} */
20
+ d: Document;
21
+ /**
22
+ * Get element by id.
23
+ * @param {string} id
24
+ * @returns {HTMLElement|null}
25
+ */
26
+ g: (id: string) => HTMLElement | null;
27
+ /**
28
+ * Create element with given tag.
29
+ * @param {string} tag
30
+ * @returns {HTMLElement}
31
+ */
32
+ c: (tag: string) => HTMLElement;
33
+ /**
34
+ * Set text content for element.
35
+ * @param {HTMLElement} n
36
+ * @param {string} t
37
+ */
38
+ t: (n: HTMLElement, t: string) => void;
39
+ /**
40
+ * Set inner HTML or append element.
41
+ * @param {HTMLElement} n
42
+ * @param {string|HTMLElement} t
43
+ */
44
+ h: (n: HTMLElement, t: string | HTMLElement) => void;
45
+ /**
46
+ * Runtime check for HTMLElement.
47
+ * @param {unknown} el
48
+ * @returns {el is HTMLElement}
49
+ */
50
+ i: (el: unknown) => el is HTMLElement;
51
+ /**
52
+ * Add event listener with legacy fallback.
53
+ * @param {HTMLElement} t
54
+ * @param {string} e
55
+ * @param {(ev:Event)=>void} h
56
+ */
57
+ on: (t: HTMLElement, e: string, h: (ev: Event) => void) => void;
58
+ }
59
+ export {};
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Enhanced Plugin Manager
3
+ * Manages the lifecycle of enhanced plugins with synchronous initialization,
4
+ * preload support, and lifecycle hooks.
5
+ */
6
+ export class EnhancedPluginManager {
7
+ /**
8
+ * @param {import('./jsmind.js').default} jm - jsMind instance
9
+ */
10
+ constructor(jm: import("./jsmind.js").default);
11
+ jm: import("./jsmind.js").default;
12
+ /** @type {Map<string, EnhancedPlugin>} */
13
+ plugins: Map<string, EnhancedPlugin>;
14
+ /**
15
+ * Initialize preload plugins (before core modules)
16
+ */
17
+ initPreloadPlugins(): void;
18
+ /**
19
+ * Initialize normal plugins (after core modules)
20
+ */
21
+ initNormalPlugins(): void;
22
+ /**
23
+ * Internal method: Initialize a single plugin
24
+ * @param {PluginDescriptor} descriptor
25
+ * @private
26
+ */
27
+ private _initPlugin;
28
+ /**
29
+ * Remove a plugin
30
+ * @param {typeof EnhancedPlugin} PluginClass
31
+ */
32
+ removePlugin(PluginClass: typeof EnhancedPlugin): void;
33
+ /**
34
+ * Destroy all plugins
35
+ */
36
+ destroyAllPlugins(): void;
37
+ /**
38
+ * Get plugin instance by name
39
+ * @param {string} instanceName
40
+ * @returns {EnhancedPlugin | undefined}
41
+ */
42
+ getPlugin(instanceName: string): EnhancedPlugin | undefined;
43
+ }
44
+ /**
45
+ * Enhanced Plugin Base Class
46
+ * Provides standard interface for enhanced plugins
47
+ */
48
+ export class EnhancedPlugin {
49
+ /**
50
+ * Plugin instance name (must be defined by subclass)
51
+ * @type {string}
52
+ */
53
+ static instanceName: string;
54
+ /**
55
+ * Whether to initialize before core modules
56
+ * @type {boolean}
57
+ */
58
+ static preload: boolean;
59
+ /**
60
+ * @param {{ jm: import('./jsmind.js').default, pluginOpt: object }} params
61
+ */
62
+ constructor({ jm, pluginOpt }: {
63
+ jm: import("./jsmind.js").default;
64
+ pluginOpt: object;
65
+ });
66
+ jm: import("./jsmind.js").default;
67
+ options: any;
68
+ /**
69
+ * Called before plugin is removed
70
+ * Override this method to clean up resources
71
+ */
72
+ beforePluginRemove(): void;
73
+ /**
74
+ * Called before jsMind instance is destroyed
75
+ * Override this method to clean up resources
76
+ */
77
+ beforePluginDestroy(): void;
78
+ }
79
+ /**
80
+ * Plugin descriptor
81
+ */
82
+ export type PluginDescriptor = {
83
+ /**
84
+ * - Plugin class
85
+ */
86
+ PluginClass: typeof EnhancedPlugin;
87
+ /**
88
+ * - Plugin instance name
89
+ */
90
+ instanceName: string;
91
+ /**
92
+ * - Whether to preload
93
+ */
94
+ preload: boolean;
95
+ /**
96
+ * - Plugin options
97
+ */
98
+ pluginOpt: object;
99
+ /**
100
+ * - Plugin instance (after initialization)
101
+ */
102
+ instance: EnhancedPlugin | null;
103
+ };
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Mind data format handlers.
3
+ * @type {{
4
+ * node_tree: { example:NodeTreeFormat, get_mind:(src:NodeTreeFormat)=>Mind, get_data:(mind:Mind)=>NodeTreeFormat },
5
+ * node_array: { example:NodeArrayFormat, get_mind:(src:NodeArrayFormat)=>Mind, get_data:(mind:Mind)=>NodeArrayFormat },
6
+ * freemind: { example:{meta:MindMapMeta,format:'freemind',data:string}, get_mind:(src:{meta?:MindMapMeta,format:'freemind',data:string})=>Mind, get_data:(mind:Mind)=>{meta:MindMapMeta,format:'freemind',data:string} },
7
+ * text: { example:{meta:MindMapMeta,format:'text',data:string}, get_mind:(src:{meta?:MindMapMeta,format:'text',data:string})=>Mind, get_data:(mind:Mind)=>{meta:MindMapMeta,format:'text',data:string} }
8
+ * }}
9
+ */
10
+ export const format: {
11
+ node_tree: {
12
+ example: NodeTreeFormat;
13
+ get_mind: (src: NodeTreeFormat) => Mind;
14
+ get_data: (mind: Mind) => NodeTreeFormat;
15
+ };
16
+ node_array: {
17
+ example: NodeArrayFormat;
18
+ get_mind: (src: NodeArrayFormat) => Mind;
19
+ get_data: (mind: Mind) => NodeArrayFormat;
20
+ };
21
+ freemind: {
22
+ example: {
23
+ meta: MindMapMeta;
24
+ format: "freemind";
25
+ data: string;
26
+ };
27
+ get_mind: (src: {
28
+ meta?: MindMapMeta;
29
+ format: "freemind";
30
+ data: string;
31
+ }) => Mind;
32
+ get_data: (mind: Mind) => {
33
+ meta: MindMapMeta;
34
+ format: "freemind";
35
+ data: string;
36
+ };
37
+ };
38
+ text: {
39
+ example: {
40
+ meta: MindMapMeta;
41
+ format: "text";
42
+ data: string;
43
+ };
44
+ get_mind: (src: {
45
+ meta?: MindMapMeta;
46
+ format: "text";
47
+ data: string;
48
+ }) => Mind;
49
+ get_data: (mind: Mind) => {
50
+ meta: MindMapMeta;
51
+ format: "text";
52
+ data: string;
53
+ };
54
+ };
55
+ };
56
+ export type MindMapMeta = {
57
+ name: string;
58
+ author: string;
59
+ version: string;
60
+ };
61
+ /**
62
+ * Node tree data item
63
+ *
64
+ * Note: When using custom fieldNames configuration, the actual property names
65
+ * in your data may differ from these type definitions. For example, if you
66
+ * configure `fieldNames: { topic: 'name' }`, your data should use 'name'
67
+ * instead of 'topic'. The types shown here represent the default field names.
68
+ */
69
+ export type NodeTreeData = {
70
+ id?: string;
71
+ topic?: string;
72
+ data?: Record<string, any>;
73
+ direction?: (number | string);
74
+ expanded?: boolean;
75
+ children?: NodeTreeData[];
76
+ [key: string]: any;
77
+ };
78
+ /**
79
+ * Node tree formatted payload
80
+ */
81
+ export type NodeTreeFormat = {
82
+ meta?: MindMapMeta;
83
+ format: "node_tree";
84
+ data: NodeTreeData;
85
+ };
86
+ /**
87
+ * Node array data item
88
+ *
89
+ * Note: When using custom fieldNames configuration, the actual property names
90
+ * in your data may differ from these type definitions. For example, if you
91
+ * configure `fieldNames: { topic: 'name', parentid: 'parent' }`, your data
92
+ * should use 'name' and 'parent' instead of 'topic' and 'parentid'. The types
93
+ * shown here represent the default field names.
94
+ */
95
+ export type NodeArrayItem = {
96
+ id?: string;
97
+ topic?: string;
98
+ parentid?: string;
99
+ data?: Record<string, any>;
100
+ direction?: (number | string);
101
+ expanded?: boolean;
102
+ isroot?: boolean;
103
+ [key: string]: any;
104
+ };
105
+ /**
106
+ * Node array formatted payload
107
+ */
108
+ export type NodeArrayFormat = {
109
+ meta?: MindMapMeta;
110
+ format: "node_array";
111
+ data: NodeArrayItem[];
112
+ };
113
+ import { Mind } from './jsmind.mind.js';
@@ -0,0 +1,180 @@
1
+ /**
2
+ * Initialize graph renderer based on engine type.
3
+ * @param {import('./jsmind.view_provider.js').ViewProvider} view - View provider instance
4
+ * @param {'canvas'|'svg'} engine - Rendering engine type
5
+ * @returns {SvgGraph|CanvasGraph} Graph renderer instance
6
+ */
7
+ export function init_graph(view: import("./jsmind.view_provider.js").ViewProvider, engine: "canvas" | "svg"): SvgGraph | CanvasGraph;
8
+ /**
9
+ * SVG-based graph renderer.
10
+ */
11
+ declare class SvgGraph {
12
+ /** @param {string} tag */
13
+ static c(tag: string): SVGElement;
14
+ /**
15
+ * Create SVG graph renderer.
16
+ * @param {import('./jsmind.view_provider.js').ViewProvider} view - View provider instance
17
+ */
18
+ constructor(view: import("./jsmind.view_provider.js").ViewProvider);
19
+ view: import("./jsmind.view_provider.js").ViewProvider;
20
+ opts: {
21
+ engine: "canvas" | "svg";
22
+ enable_device_pixel_ratio: boolean;
23
+ hmargin: number;
24
+ vmargin: number;
25
+ line_width: number;
26
+ line_color: string;
27
+ line_style: "curved" | "straight";
28
+ custom_line_render?: Function;
29
+ draggable: boolean;
30
+ hide_scrollbars_when_draggable: boolean;
31
+ node_overflow: "hidden" | "wrap";
32
+ zoom: {
33
+ min: number;
34
+ max: number;
35
+ step: number;
36
+ mask_key: number;
37
+ };
38
+ custom_node_render?: Function;
39
+ expander_style: "char" | "number";
40
+ };
41
+ e_svg: SVGElement;
42
+ size: {
43
+ w: number;
44
+ h: number;
45
+ };
46
+ /** @type {SVGPathElement[]} */
47
+ lines: SVGPathElement[];
48
+ line_drawing: {
49
+ straight: (path: SVGPathElement, x1: number, y1: number, x2: number, y2: number) => void;
50
+ curved: (path: SVGPathElement, x1: number, y1: number, x2: number, y2: number) => void;
51
+ };
52
+ /** Choose line drawing renderer. */
53
+ init_line_render(): void;
54
+ /** @type {(path:SVGPathElement,x1:number,y1:number,x2:number,y2:number)=>void} */
55
+ drawing: (path: SVGPathElement, x1: number, y1: number, x2: number, y2: number) => void;
56
+ /** @returns {SVGSVGElement} */
57
+ element(): SVGSVGElement;
58
+ /** @param {number} w @param {number} h */
59
+ set_size(w: number, h: number): void;
60
+ clear(): void;
61
+ /** @param {{x:number,y:number}} pout @param {{x:number,y:number}} pin @param {{x:number,y:number}} offset @param {string=} color */
62
+ draw_line(pout: {
63
+ x: number;
64
+ y: number;
65
+ }, pin: {
66
+ x: number;
67
+ y: number;
68
+ }, offset: {
69
+ x: number;
70
+ y: number;
71
+ }, color?: string | undefined): void;
72
+ /** @param {CanvasRenderingContext2D} dest_canvas_ctx @param {(()=>void)=} callback */
73
+ copy_to(dest_canvas_ctx: CanvasRenderingContext2D, callback?: (() => void) | undefined): void;
74
+ /**
75
+ * Draw bezier curve to SVG path.
76
+ * @internal
77
+ * @param {SVGPathElement} path - SVG path element
78
+ * @param {number} x1 - Start x coordinate
79
+ * @param {number} y1 - Start y coordinate
80
+ * @param {number} x2 - End x coordinate
81
+ * @param {number} y2 - End y coordinate
82
+ */
83
+ _bezier_to(path: SVGPathElement, x1: number, y1: number, x2: number, y2: number): void;
84
+ /**
85
+ * Draw straight line to SVG path.
86
+ * @internal
87
+ * @param {SVGPathElement} path - SVG path element
88
+ * @param {number} x1 - Start x coordinate
89
+ * @param {number} y1 - Start y coordinate
90
+ * @param {number} x2 - End x coordinate
91
+ * @param {number} y2 - End y coordinate
92
+ */
93
+ _line_to(path: SVGPathElement, x1: number, y1: number, x2: number, y2: number): void;
94
+ }
95
+ /**
96
+ * Canvas-based graph renderer.
97
+ */
98
+ declare class CanvasGraph {
99
+ /**
100
+ * Create canvas graph renderer.
101
+ * @param {import('./jsmind.view_provider.js').ViewProvider} view - View provider instance
102
+ */
103
+ constructor(view: import("./jsmind.view_provider.js").ViewProvider);
104
+ opts: {
105
+ engine: "canvas" | "svg";
106
+ enable_device_pixel_ratio: boolean;
107
+ hmargin: number;
108
+ vmargin: number;
109
+ line_width: number;
110
+ line_color: string;
111
+ line_style: "curved" | "straight";
112
+ custom_line_render?: Function;
113
+ draggable: boolean;
114
+ hide_scrollbars_when_draggable: boolean;
115
+ node_overflow: "hidden" | "wrap";
116
+ zoom: {
117
+ min: number;
118
+ max: number;
119
+ step: number;
120
+ mask_key: number;
121
+ };
122
+ custom_node_render?: Function;
123
+ expander_style: "char" | "number";
124
+ };
125
+ e_canvas: HTMLElement;
126
+ canvas_ctx: CanvasRenderingContext2D;
127
+ size: {
128
+ w: number;
129
+ h: number;
130
+ };
131
+ line_drawing: {
132
+ straight: (ctx: CanvasRenderingContext2D, x1: number, y1: number, x2: number, y2: number) => void;
133
+ curved: (ctx: CanvasRenderingContext2D, x1: number, y1: number, x2: number, y2: number) => void;
134
+ };
135
+ dpr: number;
136
+ /** Choose line drawing renderer. */
137
+ init_line_render(): void;
138
+ /** @type {(ctx:CanvasRenderingContext2D,x1:number,y1:number,x2:number,y2:number)=>void} */
139
+ drawing: (ctx: CanvasRenderingContext2D, x1: number, y1: number, x2: number, y2: number) => void;
140
+ /** @returns {HTMLCanvasElement} */
141
+ element(): HTMLCanvasElement;
142
+ /** @param {number} w @param {number} h */
143
+ set_size(w: number, h: number): void;
144
+ /** Clear the canvas. */
145
+ clear(): void;
146
+ /** @param {{x:number,y:number}} pout @param {{x:number,y:number}} pin @param {{x:number,y:number}} offset @param {string=} color */
147
+ draw_line(pout: {
148
+ x: number;
149
+ y: number;
150
+ }, pin: {
151
+ x: number;
152
+ y: number;
153
+ }, offset: {
154
+ x: number;
155
+ y: number;
156
+ }, color?: string | undefined): void;
157
+ /** @param {CanvasRenderingContext2D} dest_canvas_ctx @param {(()=>void)=} callback */
158
+ copy_to(dest_canvas_ctx: CanvasRenderingContext2D, callback?: (() => void) | undefined): void;
159
+ /**
160
+ * Draw bezier curve on canvas.
161
+ * @internal
162
+ * @param {CanvasRenderingContext2D} ctx - Canvas context
163
+ * @param {number} x1 - Start x coordinate
164
+ * @param {number} y1 - Start y coordinate
165
+ * @param {number} x2 - End x coordinate
166
+ * @param {number} y2 - End y coordinate
167
+ */
168
+ _bezier_to(ctx: CanvasRenderingContext2D, x1: number, y1: number, x2: number, y2: number): void;
169
+ /**
170
+ * Draw straight line on canvas.
171
+ * @internal
172
+ * @param {CanvasRenderingContext2D} ctx - Canvas context
173
+ * @param {number} x1 - Start x coordinate
174
+ * @param {number} y1 - Start y coordinate
175
+ * @param {number} x2 - End x coordinate
176
+ * @param {number} y2 - End y coordinate
177
+ */
178
+ _line_to(ctx: CanvasRenderingContext2D, x1: number, y1: number, x2: number, y2: number): void;
179
+ }
180
+ export {};
@@ -0,0 +1,182 @@
1
+ export class LayoutProvider {
2
+ /**
3
+ * Layout engine for positioning nodes and lines.
4
+ * @param {import('./jsmind.js').default} jm - jsMind instance
5
+ * @param {{mode:'full'|'side', hspace:number, vspace:number, pspace:number, cousin_space:number}} options - Layout configuration options
6
+ */
7
+ constructor(jm: import("./jsmind.js").default, options: {
8
+ mode: "full" | "side";
9
+ hspace: number;
10
+ vspace: number;
11
+ pspace: number;
12
+ cousin_space: number;
13
+ });
14
+ opts: {
15
+ mode: "full" | "side";
16
+ hspace: number;
17
+ vspace: number;
18
+ pspace: number;
19
+ cousin_space: number;
20
+ };
21
+ jm: import("./jsmind.js").default;
22
+ isside: boolean;
23
+ bounds: {
24
+ n: number;
25
+ s: number;
26
+ w: number;
27
+ e: number;
28
+ };
29
+ cache_valid: boolean;
30
+ /** Initialize layout provider. */
31
+ init(): void;
32
+ /** Reset layout state and bounds. */
33
+ reset(): void;
34
+ /**
35
+ * Decide the next child's direction for a parent node.
36
+ * @param {import('./jsmind.node.js').Node} node
37
+ * @returns {number}
38
+ */
39
+ calculate_next_child_direction(node: import("./jsmind.node.js").Node): number;
40
+ /** Perform layout and offsets recalculation. */
41
+ layout(): void;
42
+ /** Calculate and set direction for all nodes. */
43
+ layout_direction(): void;
44
+ /**
45
+ * Set direction layout for root node and its children.
46
+ * @private
47
+ */
48
+ private _layout_direction_root;
49
+ /**
50
+ * Set direction layout for a node and its descendants.
51
+ * @private
52
+ * @param {import('./jsmind.node.js').Node} node - Target node
53
+ * @param {number} direction - Direction constant (-1, 0, 1)
54
+ * @param {number} side_index - Index among siblings
55
+ */
56
+ private _layout_direction_side;
57
+ /** Calculate and set position offsets for all nodes. */
58
+ layout_offset(): void;
59
+ /**
60
+ * Layout both the x and y axis for subnodes.
61
+ * @private
62
+ * @param {import('./jsmind.node.js').Node[]} nodes - Array of nodes to layout
63
+ * @returns {number} Total height of all nodes
64
+ */
65
+ private _layout_offset_subnodes;
66
+ /**
67
+ * Layout the y axis only, for collapse/expand a node.
68
+ * @private
69
+ * @param {import('./jsmind.node.js').Node[]} nodes - Array of nodes to layout
70
+ * @returns {number} Total height of all nodes
71
+ */
72
+ private _layout_offset_subnodes_height;
73
+ /**
74
+ * Check if node should reserve cousin space.
75
+ * @private
76
+ * @param {import('./jsmind.node.js').Node} node - Node to check
77
+ * @returns {boolean} True if cousin space should be reserved
78
+ */
79
+ private _should_reserve_cousin_space;
80
+ /**
81
+ * Get absolute offset for a node.
82
+ * @param {import('./jsmind.node.js').Node} node - Target node
83
+ * @returns {{x:number, y:number}} Absolute position offset
84
+ */
85
+ get_node_offset(node: import("./jsmind.node.js").Node): {
86
+ x: number;
87
+ y: number;
88
+ };
89
+ /**
90
+ * Get anchor point for lines on a node.
91
+ * @param {import('./jsmind.node.js').Node} node - Target node
92
+ * @returns {{x:number, y:number}} Anchor point coordinates
93
+ */
94
+ get_node_point(node: import("./jsmind.node.js").Node): {
95
+ x: number;
96
+ y: number;
97
+ };
98
+ /**
99
+ * Get input point for lines on a node.
100
+ * @param {import('./jsmind.node.js').Node} node - Target node
101
+ * @returns {{x:number, y:number}} Input point coordinates
102
+ */
103
+ get_node_point_in(node: import("./jsmind.node.js").Node): {
104
+ x: number;
105
+ y: number;
106
+ };
107
+ /**
108
+ * Get output point for lines on a node.
109
+ * @param {import('./jsmind.node.js').Node} node - Target node
110
+ * @returns {{x:number, y:number}} Output point coordinates
111
+ */
112
+ get_node_point_out(node: import("./jsmind.node.js").Node): {
113
+ x: number;
114
+ y: number;
115
+ };
116
+ /**
117
+ * Get expander point for a node.
118
+ * @param {import('./jsmind.node.js').Node} node - Target node
119
+ * @returns {{x:number, y:number}} Expander point coordinates
120
+ */
121
+ get_expander_point(node: import("./jsmind.node.js").Node): {
122
+ x: number;
123
+ y: number;
124
+ };
125
+ /**
126
+ * Get minimal canvas size to contain all nodes.
127
+ * @returns {{w:number, h:number}} Minimum size required
128
+ */
129
+ get_min_size(): {
130
+ w: number;
131
+ h: number;
132
+ };
133
+ /**
134
+ * Toggle node expanded/collapsed state.
135
+ * @param {import('./jsmind.node.js').Node} node - Target node
136
+ */
137
+ toggle_node(node: import("./jsmind.node.js").Node): void;
138
+ /**
139
+ * Expand a node and show its children.
140
+ * @param {import('./jsmind.node.js').Node} node - Target node
141
+ */
142
+ expand_node(node: import("./jsmind.node.js").Node): void;
143
+ /**
144
+ * Collapse a node and hide its children.
145
+ * @param {import('./jsmind.node.js').Node} node - Target node
146
+ */
147
+ collapse_node(node: import("./jsmind.node.js").Node): void;
148
+ /** Expand all nodes in the mind map. */
149
+ expand_all(): void;
150
+ /** Collapse all nodes in the mind map. */
151
+ collapse_all(): void;
152
+ /**
153
+ * Expand nodes to a specific depth level.
154
+ * @param {number} target_depth - Target depth level
155
+ * @param {import('./jsmind.node.js').Node[]=} curr_nodes - Current nodes to process
156
+ * @param {number=} curr_depth - Current depth level
157
+ */
158
+ expand_to_depth(target_depth: number, curr_nodes?: import("./jsmind.node.js").Node[] | undefined, curr_depth?: number | undefined): void;
159
+ /**
160
+ * Perform partial layout for a node and its subtree.
161
+ * @param {import('./jsmind.node.js').Node} node - Target node
162
+ */
163
+ part_layout(node: import("./jsmind.node.js").Node): void;
164
+ /**
165
+ * Set visibility for nodes and their children.
166
+ * @param {import('./jsmind.node.js').Node[]} nodes - Array of nodes
167
+ * @param {boolean} visible - Visibility state
168
+ */
169
+ set_visible(nodes: import("./jsmind.node.js").Node[], visible: boolean): void;
170
+ /**
171
+ * Check if a node is expanded.
172
+ * @param {import('./jsmind.node.js').Node} node - Target node
173
+ * @returns {boolean} True if node is expanded
174
+ */
175
+ is_expand(node: import("./jsmind.node.js").Node): boolean;
176
+ /**
177
+ * Check if a node is visible.
178
+ * @param {import('./jsmind.node.js').Node} node - Target node
179
+ * @returns {boolean} True if node is visible
180
+ */
181
+ is_visible(node: import("./jsmind.node.js").Node): boolean;
182
+ }