@xiangfa/mindmap 0.4.0 → 0.5.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/README.md +32 -0
- package/README.zh-CN.md +32 -0
- package/dist/components/MindMapContextMenu.d.ts +1 -1
- package/dist/components/MindMapControls.d.ts +1 -1
- package/dist/esm/MindMap2.js +321 -333
- package/dist/esm/components/MindMapAIInput.js +2 -12
- package/dist/esm/components/MindMapContextMenu.js +28 -57
- package/dist/esm/components/MindMapControls.js +14 -27
- package/dist/esm/components/MindMapNode.js +8 -27
- package/dist/esm/style.css +1 -1
- package/dist/esm/utils/export.js +25 -25
- package/dist/esm/utils/layout.js +26 -18
- package/dist/esm/utils/theme.js +44 -1
- package/dist/mindmap.umd.cjs +22 -25
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/utils/export.d.ts +2 -1
- package/dist/utils/theme.d.ts +10 -0
- package/package.json +1 -1
package/dist/utils/export.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ interface ExportOptions {
|
|
|
9
9
|
pngSafe?: boolean;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Build SVG string for export.
|
|
12
|
+
* Build SVG string for export. Embeds a <style> block with resolved values
|
|
13
|
+
* and applies semantic CSS classes to elements for external customization.
|
|
13
14
|
* Works for both SVG file export and PNG conversion.
|
|
14
15
|
*/
|
|
15
16
|
export declare function buildExportSVG(nodes: LayoutNode[], edges: Edge[], options?: ExportOptions, theme?: ThemeColors, plugins?: MindMapPlugin[]): string;
|
package/dist/utils/theme.d.ts
CHANGED
|
@@ -60,3 +60,13 @@ export interface ThemeColors {
|
|
|
60
60
|
}
|
|
61
61
|
export declare function getTheme(mode: "light" | "dark"): ThemeColors;
|
|
62
62
|
export declare const THEME: ThemeColors;
|
|
63
|
+
/**
|
|
64
|
+
* Generate CSS custom properties from theme for the container element.
|
|
65
|
+
* Users can override these to customize the mind map appearance.
|
|
66
|
+
*/
|
|
67
|
+
export declare function generateCSSVariables(theme: ThemeColors, branchColors?: string[]): Record<string, string>;
|
|
68
|
+
/**
|
|
69
|
+
* Generate a CSS style string with resolved values for SVG export.
|
|
70
|
+
* Uses concrete values (not CSS variables) for maximum compatibility.
|
|
71
|
+
*/
|
|
72
|
+
export declare function generateExportStyles(theme: ThemeColors): string;
|
package/package.json
CHANGED