flow-mindmap 0.4.1 → 0.4.2
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/dist/App.vue.d.ts +20 -0
- package/dist/components/CanvasContextMenu.vue.d.ts +21 -0
- package/dist/components/DataPanel.vue.d.ts +10 -1
- package/dist/components/JsonTreeViewer.vue.d.ts +25 -0
- package/dist/components/MindMap.vue.d.ts +20 -0
- package/dist/components/Outline.vue.d.ts +1 -1
- package/dist/entry.d.ts +8 -1
- package/dist/flow-mindmap.js +834 -829
- package/dist/flow-mindmap.umd.cjs +39 -39
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Show the "显示大纲" button in the top bar. */
|
|
3
|
+
showOutlineBtn?: boolean;
|
|
4
|
+
/** Show the "显示数据" button in the top bar. */
|
|
5
|
+
showDataBtn?: boolean;
|
|
6
|
+
/** Show the "显示 Markdown" button in the top bar. */
|
|
7
|
+
showMarkdownBtn?: boolean;
|
|
8
|
+
/** Show the "显示设置" button in the top bar. */
|
|
9
|
+
showSettingsBtn?: boolean;
|
|
10
|
+
/** Show the "进入预览模式" button in the top bar. */
|
|
11
|
+
showPreviewModeBtn?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
showOutlineBtn: boolean;
|
|
15
|
+
showDataBtn: boolean;
|
|
16
|
+
showMarkdownBtn: boolean;
|
|
17
|
+
showSettingsBtn: boolean;
|
|
18
|
+
showPreviewModeBtn: boolean;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Cursor X in viewport coords (clientX). */
|
|
3
|
+
x: number;
|
|
4
|
+
/** Cursor Y in viewport coords (clientY). */
|
|
5
|
+
y: number;
|
|
6
|
+
/** Container the menu should not escape. Used to clamp the
|
|
7
|
+
* position so the menu stays on-screen. */
|
|
8
|
+
container: HTMLElement | null;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
+
close: () => any;
|
|
12
|
+
openSettings: () => any;
|
|
13
|
+
openData: () => any;
|
|
14
|
+
openImport: (mode: "markdown" | "txt" | "json") => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onClose?: (() => any) | undefined;
|
|
17
|
+
onOpenSettings?: (() => any) | undefined;
|
|
18
|
+
onOpenData?: (() => any) | undefined;
|
|
19
|
+
onOpenImport?: ((mode: "markdown" | "txt" | "json") => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import type { MindMapNode } from '../types';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
data: MindMapNode;
|
|
4
|
+
/** Optional hint from the parent: when set, the paste panel
|
|
5
|
+
* auto-opens on next mount with this mode preselected. Used
|
|
6
|
+
* by the canvas right-click 'Import' submenu. Cleared by
|
|
7
|
+
* the parent after we emit 'consumed-mode'. */
|
|
8
|
+
pendingMode?: 'json' | 'markdown' | 'txt' | null;
|
|
4
9
|
};
|
|
5
10
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
11
|
import: (data: MindMapNode) => any;
|
|
12
|
+
"consumed-mode": () => any;
|
|
7
13
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
14
|
onImport?: ((data: MindMapNode) => any) | undefined;
|
|
9
|
-
|
|
15
|
+
"onConsumed-mode"?: (() => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
pendingMode: "json" | "markdown" | "txt" | null;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
19
|
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value: unknown;
|
|
3
|
+
/** Initial key for this node; empty string when rendering the root. */
|
|
4
|
+
keyName?: string;
|
|
5
|
+
/** When true, the node is at the root of the tree. */
|
|
6
|
+
isRoot?: boolean;
|
|
7
|
+
/** Dot-separated path from the root. Auto-derived when nested. */
|
|
8
|
+
path?: string;
|
|
9
|
+
/** Current depth in the tree (root = 0). */
|
|
10
|
+
depth?: number;
|
|
11
|
+
/** Current filter query (case-insensitive substring). */
|
|
12
|
+
query?: string;
|
|
13
|
+
/** Pre-computed set of collapsed paths (so the parent's state survives
|
|
14
|
+
* across re-renders when a different subtree is expanded). */
|
|
15
|
+
collapsedPaths?: Set<string>;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
path: string;
|
|
19
|
+
depth: number;
|
|
20
|
+
isRoot: boolean;
|
|
21
|
+
keyName: string;
|
|
22
|
+
query: string;
|
|
23
|
+
collapsedPaths: Set<string>;
|
|
24
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -28,6 +28,15 @@ type __VLS_Props = {
|
|
|
28
28
|
* the palette pipeline.
|
|
29
29
|
*/
|
|
30
30
|
lineColors?: string[];
|
|
31
|
+
/**
|
|
32
|
+
* When true, hides the built-in canvas action buttons
|
|
33
|
+
* (top-right preview toggle, top-left outline view). Use this
|
|
34
|
+
* when the consumer already exposes equivalent controls in
|
|
35
|
+
* their surrounding chrome and doesn't want duplicates. Default
|
|
36
|
+
* false so the npm package ships with a discoverable, ready-to-use
|
|
37
|
+
* UI.
|
|
38
|
+
*/
|
|
39
|
+
hideCanvasActions?: boolean;
|
|
31
40
|
};
|
|
32
41
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
33
42
|
addChild: (parentId: string) => void;
|
|
@@ -76,12 +85,23 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
|
76
85
|
change: (data: MindMapNode) => any;
|
|
77
86
|
"edit-note": (nodeId: string) => any;
|
|
78
87
|
markdownChange: (markdown: string) => any;
|
|
88
|
+
"canvas-toggle-preview": () => any;
|
|
89
|
+
"canvas-outline": () => any;
|
|
90
|
+
"canvas-settings": () => any;
|
|
91
|
+
"canvas-data": () => any;
|
|
92
|
+
"canvas-import": (mode: "markdown" | "txt" | "json") => any;
|
|
79
93
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
80
94
|
onSelect?: ((node: MindMapNode | null) => any) | undefined;
|
|
81
95
|
onChange?: ((data: MindMapNode) => any) | undefined;
|
|
82
96
|
"onEdit-note"?: ((nodeId: string) => any) | undefined;
|
|
83
97
|
onMarkdownChange?: ((markdown: string) => any) | undefined;
|
|
98
|
+
"onCanvas-toggle-preview"?: (() => any) | undefined;
|
|
99
|
+
"onCanvas-outline"?: (() => any) | undefined;
|
|
100
|
+
"onCanvas-settings"?: (() => any) | undefined;
|
|
101
|
+
"onCanvas-data"?: (() => any) | undefined;
|
|
102
|
+
"onCanvas-import"?: ((mode: "markdown" | "txt" | "json") => any) | undefined;
|
|
84
103
|
}>, {
|
|
85
104
|
previewMode: boolean;
|
|
105
|
+
hideCanvasActions: boolean;
|
|
86
106
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
87
107
|
export default _default;
|
|
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
39
39
|
}) => any) | undefined;
|
|
40
40
|
}>, {
|
|
41
41
|
selectedId: string | null;
|
|
42
|
-
readonly: boolean;
|
|
43
42
|
collapsedIds: Set<string>;
|
|
43
|
+
readonly: boolean;
|
|
44
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
45
|
export default _default;
|
package/dist/entry.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import MindMap from './components/MindMap.vue';
|
|
2
|
+
import Outline from './components/Outline.vue';
|
|
3
|
+
import Drawer from './components/Drawer.vue';
|
|
4
|
+
import DataPanel from './components/DataPanel.vue';
|
|
5
|
+
import MarkdownPanel from './components/MarkdownPanel.vue';
|
|
6
|
+
import SettingsPanel from './components/SettingsPanel.vue';
|
|
7
|
+
import NotePanel from './components/NotePanel.vue';
|
|
8
|
+
import MindMapApp from './App.vue';
|
|
2
9
|
import type { App } from 'vue';
|
|
3
10
|
import type { MindMapNode, MindMapOptions, MindMapTheme, MindMapExpose, MindMapSettings, NodeStyle, LineStyle, LayoutMode, BranchPalette, BranchPaletteId, RichContent } from './types';
|
|
4
11
|
import { uid, clone, findNode, findParent, removeNode, addChild, addSibling, markdownToMindMap, mindMapToMarkdown, markdownToRichMindMap, richBlockToMarkdown } from './tree';
|
|
5
12
|
export type { MindMapNode, MindMapOptions, MindMapTheme, MindMapExpose, MindMapSettings, NodeStyle, LineStyle, LayoutMode, BranchPalette, BranchPaletteId, RichContent };
|
|
6
|
-
export { MindMap };
|
|
13
|
+
export { MindMap, Outline, Drawer, DataPanel, MarkdownPanel, SettingsPanel, NotePanel, MindMapApp };
|
|
7
14
|
export { uid, clone, findNode, findParent, removeNode, addChild, addSibling, markdownToMindMap, mindMapToMarkdown, markdownToRichMindMap, richBlockToMarkdown };
|
|
8
15
|
declare const plugin: {
|
|
9
16
|
install(app: App): void;
|