flow-mindmap 0.5.5 → 0.5.6
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/flow-mindmap.js
CHANGED
|
@@ -14800,7 +14800,7 @@ function walk(n: Node) {
|
|
|
14800
14800
|
}, 8, ["open"])
|
|
14801
14801
|
]));
|
|
14802
14802
|
}
|
|
14803
|
-
}), Im = "0.5.
|
|
14803
|
+
}), Im = "0.5.6", Om = {
|
|
14804
14804
|
install(e) {
|
|
14805
14805
|
e.component("FlowMindMap", Cs), e.component("FlowMindMapOutline", as), e.component("FlowMindMapDrawer", hn), e.component("FlowMindMapDataPanel", cs), e.component("FlowMindMapMarkdownPanel", us), e.component("FlowMindMapSettingsPanel", ds), e.component("FlowMindMapNotePanel", _s), e.component("FlowMindMapApp", Am);
|
|
14806
14806
|
}
|
|
@@ -167,4 +167,4 @@ function walk(n: Node) {
|
|
|
167
167
|
| --- | --- | --- | --- | --- |
|
|
168
168
|
| 1 | 2 | 3 | 4 | 5 |
|
|
169
169
|
| 6 | 7 | 8 | 9 | 10 |`},children:[]}]},{id:"r_note",text:"笔记 (note)",note:{text:`节点右上角的便签图标。
|
|
170
|
-
鼠标悬浮预览前 60 字,点击打开完整笔记编辑器。`},children:[{id:"r_note_a",text:"悬浮预览",children:[]},{id:"r_note_b",text:"点击展开编辑",children:[]},{id:"r_note_c",text:"export → ```note 围栏",children:[]}]},{id:"r_link",text:"链接 (link)",link:{url:"https://github.com/xz333221/flow-mindmap"},children:[{id:"r_link_a",text:"节点右侧的小图标",children:[]},{id:"r_link_b",text:"点击在新 tab 打开",children:[]},{id:"r_link_c",text:"export → [label](url)",children:[]}]},{id:"r_para",text:"段落 / 列表 (子节点)",children:[{id:"r_para_a",text:"段落不再是父节点框内文字",children:[]},{id:"r_para_b",text:"列表每项一个子节点",children:[]},{id:"r_para_c",text:"节点框大小保持一致,边线对齐",children:[]}]}]};function n(){return typeof location<"u"&&location.hash==="#fan"?i:typeof location<"u"&&location.hash==="#stress"?a:(typeof location<"u"&&location.hash==="#rich",o)}const i={id:"root",text:"flow-mindmap 思维导图",children:[{id:"n_a",text:"主题一",children:[]},{id:"n_b",text:"主题二",children:[]},{id:"n_c",text:"主题三",children:[]},{id:"n_d",text:"主题四",children:[]},{id:"n_e",text:"主题五",children:[]},{id:"n_f",text:"主题六",children:[]},{id:"n_g",text:"主题七",children:[]},{id:"n_h",text:"主题八",children:[]},{id:"n_i",text:"主题九",children:[]}]},a=(()=>{const y=(V,ee)=>({id:V,text:ee,children:[]}),p=[y("s_l1","左一"),y("s_l2","左二"),y("s_l3","左三"),y("s_l4","左四"),y("s_l5","左五"),y("s_l6","左六"),y("s_l7","左七")],D=[y("s_r1","右一"),y("s_r2","右二"),y("s_r3","右三"),y("s_r4","右四"),y("s_r5","右五"),y("s_r6","右六"),y("s_r7","右七")];return{id:"root",text:"flow-mindmap 思维导图",children:[...p,...D]}})(),c=e.ref(o),s=e.ref(null),u=e.ref(new Set),d=e.ref(!1),g=e.ref(!1),h=e.ref(!1),w=e.ref(!1),C=e.ref(0),P=e.ref(!1),R=e.ref(!1),U=e.ref(null);function I(){c.value=n()}function A(){g.value=!0,h.value=!1,w.value=!1}function x(y){A()}const k=e.reactive({autoBalanceOnChange:!0,lineWidthStart:12,lineWidthEnd:3.6,rainbowBranch:!0,branchPaletteId:"default",customPalettes:[],lineStyle:"rounded-elbow",rootLineStyle:"arc",lineOrigin:"proportional",layoutMode:"mindmap",taperedEdge:!0,lineWidthTaper:.67,showOrderBadge:!1,canvasBg:void 0}),m=e.computed(()=>{var y;return s.value?((y=U.value)==null?void 0:y.getNodeStyle(s.value.id))??{}:{}});function F(y){var p;Object.assign(k,y),(p=U.value)==null||p.applySettings(y)}function W(y){var p;s.value&&((p=U.value)==null||p.applyNodeStyle(s.value.id,y))}function K(){var p;const y={autoBalanceOnChange:!0,lineWidthStart:12,lineWidthEnd:.6,rainbowBranch:!0,branchPaletteId:"default",customPalettes:[],lineStyle:"rounded-elbow",rootLineStyle:"arc",lineOrigin:"proportional",layoutMode:"mindmap",taperedEdge:!0,lineWidthTaper:.67,showOrderBadge:!1,canvasBg:void 0};Object.assign(k,y),(p=U.value)==null||p.applySettings(y)}function S(y){if(y.key==="Escape"){if(P.value){P.value=!1,y.stopPropagation();return}R.value&&(R.value=!1,y.stopPropagation())}}e.onMounted(()=>{var y;document.addEventListener("keydown",S),window.addEventListener("hashchange",I),(y=U.value)==null||y.applySettings({rainbowBranch:k.rainbowBranch,branchPaletteId:k.branchPaletteId,customPalettes:k.customPalettes,lineWidthStart:k.lineWidthStart,lineWidthEnd:k.lineWidthEnd,lineStyle:k.lineStyle,rootLineStyle:k.rootLineStyle,lineOrigin:k.lineOrigin})}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",S),window.removeEventListener("hashchange",I)});function ne(y){c.value=y}function se(y){var D;const p=y&&y.length>0?y[0]:null;s.value=p,p?!w.value&&((D=U.value)!=null&&D.nodeHasContent(p.id))&&(g.value=!1,h.value=!1,w.value=!0):w.value=!1}e.watch(c,y=>{if(!s.value)return;const p=Z(y,s.value.id);p?p!==s.value&&(s.value=p):s.value=null},{deep:!1});function re(y){if(!s.value||s.value.id!==y){const p=Z(c.value,y);p&&(s.value=p)}g.value=!1,h.value=!1,w.value=!0,C.value++}function Z(y,p){if(y.id===p)return y;for(const D of y.children){const V=Z(D,p);if(V)return V}return null}function ce(y){var p;s.value&&((p=U.value)==null||p.applyNodeNote(s.value.id,y))}function ie(){var y;s.value&&((y=U.value)==null||y.removeNodeNote(s.value.id))}function me(y){var p;s.value&&((p=U.value)==null||p.applyNodeLink(s.value.id,y))}function v(y){var p;s.value&&((p=U.value)==null||p.applyNodeImageByUrl(s.value.id,y))}function E(y){var p;s.value&&((p=U.value)==null||p.applyNodeRichContent(s.value.id,y))}function $(y){const p=document.querySelector(`[data-node-id="${y.id}"]`);p&&p.click()}function X(y){const p=new Set(u.value);p.has(y)?p.delete(y):p.add(y),u.value=p}function fe(y){var p;(p=U.value)==null||p.setNodeText(y.id,y.text)}function Ae(y){var p;(p=U.value)==null||p.addChild(y)}function De(y){var p;(p=U.value)==null||p.addSibling(y)}function Pe(y){var p;(p=U.value)==null||p.moveNode(y.srcId,y.targetId,y.position)}const Me=e.computed(()=>{var y;return((y=s.value)==null?void 0:y.id)??null});return(y,p)=>(e.openBlock(),e.createElementBlock("div",ig,[e.createVNode(Lt,{side:"left",width:300,open:d.value,title:"大纲","onUpdate:open":p[0]||(p[0]=D=>d.value=D)},{default:e.withCtx(()=>[e.createVNode(Oo,{data:c.value,"selected-id":Me.value,"collapsed-ids":u.value,onSelect:$,onToggleCollapse:X,onEdit:fe,onAddChild:Ae,onAddSibling:De,onMove:Pe},null,8,["data","selected-id","collapsed-ids"])]),_:1},8,["open"]),e.createElementVNode("main",rg,[R.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"zm-app-preview-exit",title:"退出预览 (Esc)",onClick:p[1]||(p[1]=D=>R.value=!1)},[...p[11]||(p[11]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.createElementVNode("line",{x1:"2",y1:"2",x2:"22",y2:"22"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",lg,[e.createVNode(Qo,{ref_key:"mindMapRef",ref:U,data:c.value,"preview-mode":R.value,"built-in-drawers":!1,onChange:ne,onSelect:se,onEditNote:re,onCanvasSettings:p[2]||(p[2]=D=>P.value=!0),onCanvasData:A,onCanvasImport:x,onCanvasTogglePreview:p[3]||(p[3]=D=>R.value=!R.value),onCanvasOutline:p[4]||(p[4]=D=>d.value=!0)},null,8,["data","preview-mode"])])]),e.createVNode(Lt,{side:"right",width:360,open:g.value&&!R.value,title:"数据","onUpdate:open":p[6]||(p[6]=D=>g.value=D)},{default:e.withCtx(()=>[e.createVNode(Lo,{data:c.value,onImport:p[5]||(p[5]=D=>c.value=D)},null,8,["data"])]),_:1},8,["open"]),e.createVNode(Lt,{side:"right",width:420,open:h.value&&!R.value,title:"Markdown","onUpdate:open":p[8]||(p[8]=D=>h.value=D)},{default:e.withCtx(()=>[e.createVNode(Do,{data:c.value,onImport:p[7]||(p[7]=D=>c.value=D)},null,8,["data"])]),_:1},8,["open"]),e.createVNode(Lt,{side:"right",width:360,open:w.value&&!R.value,title:"节点内容","onUpdate:open":p[9]||(p[9]=D=>w.value=D)},{default:e.withCtx(()=>[e.createVNode(Jo,{"selected-node":s.value,readonly:!1,"focus-tick":C.value,onApply:ce,onRemove:ie,onSetLink:me,onSetImage:v,onSetRich:E},null,8,["selected-node","focus-tick"])]),_:1},8,["open"]),e.createVNode(Lt,{side:"right",width:340,open:P.value&&!R.value,title:"设置","onUpdate:open":p[10]||(p[10]=D=>P.value=D)},{default:e.withCtx(()=>{var D;return[e.createVNode($o,{settings:k,"has-selection":s.value!==null,"selected-node-text":(D=s.value)==null?void 0:D.text,"node-style":m.value,"onUpdate:settings":F,"onUpdate:nodeStyle":W,onReset:K},null,8,["settings","has-selection","selected-node-text","node-style"])]}),_:1},8,["open"])]))}}),ag="0.5.
|
|
170
|
+
鼠标悬浮预览前 60 字,点击打开完整笔记编辑器。`},children:[{id:"r_note_a",text:"悬浮预览",children:[]},{id:"r_note_b",text:"点击展开编辑",children:[]},{id:"r_note_c",text:"export → ```note 围栏",children:[]}]},{id:"r_link",text:"链接 (link)",link:{url:"https://github.com/xz333221/flow-mindmap"},children:[{id:"r_link_a",text:"节点右侧的小图标",children:[]},{id:"r_link_b",text:"点击在新 tab 打开",children:[]},{id:"r_link_c",text:"export → [label](url)",children:[]}]},{id:"r_para",text:"段落 / 列表 (子节点)",children:[{id:"r_para_a",text:"段落不再是父节点框内文字",children:[]},{id:"r_para_b",text:"列表每项一个子节点",children:[]},{id:"r_para_c",text:"节点框大小保持一致,边线对齐",children:[]}]}]};function n(){return typeof location<"u"&&location.hash==="#fan"?i:typeof location<"u"&&location.hash==="#stress"?a:(typeof location<"u"&&location.hash==="#rich",o)}const i={id:"root",text:"flow-mindmap 思维导图",children:[{id:"n_a",text:"主题一",children:[]},{id:"n_b",text:"主题二",children:[]},{id:"n_c",text:"主题三",children:[]},{id:"n_d",text:"主题四",children:[]},{id:"n_e",text:"主题五",children:[]},{id:"n_f",text:"主题六",children:[]},{id:"n_g",text:"主题七",children:[]},{id:"n_h",text:"主题八",children:[]},{id:"n_i",text:"主题九",children:[]}]},a=(()=>{const y=(V,ee)=>({id:V,text:ee,children:[]}),p=[y("s_l1","左一"),y("s_l2","左二"),y("s_l3","左三"),y("s_l4","左四"),y("s_l5","左五"),y("s_l6","左六"),y("s_l7","左七")],D=[y("s_r1","右一"),y("s_r2","右二"),y("s_r3","右三"),y("s_r4","右四"),y("s_r5","右五"),y("s_r6","右六"),y("s_r7","右七")];return{id:"root",text:"flow-mindmap 思维导图",children:[...p,...D]}})(),c=e.ref(o),s=e.ref(null),u=e.ref(new Set),d=e.ref(!1),g=e.ref(!1),h=e.ref(!1),w=e.ref(!1),C=e.ref(0),P=e.ref(!1),R=e.ref(!1),U=e.ref(null);function I(){c.value=n()}function A(){g.value=!0,h.value=!1,w.value=!1}function x(y){A()}const k=e.reactive({autoBalanceOnChange:!0,lineWidthStart:12,lineWidthEnd:3.6,rainbowBranch:!0,branchPaletteId:"default",customPalettes:[],lineStyle:"rounded-elbow",rootLineStyle:"arc",lineOrigin:"proportional",layoutMode:"mindmap",taperedEdge:!0,lineWidthTaper:.67,showOrderBadge:!1,canvasBg:void 0}),m=e.computed(()=>{var y;return s.value?((y=U.value)==null?void 0:y.getNodeStyle(s.value.id))??{}:{}});function F(y){var p;Object.assign(k,y),(p=U.value)==null||p.applySettings(y)}function W(y){var p;s.value&&((p=U.value)==null||p.applyNodeStyle(s.value.id,y))}function K(){var p;const y={autoBalanceOnChange:!0,lineWidthStart:12,lineWidthEnd:.6,rainbowBranch:!0,branchPaletteId:"default",customPalettes:[],lineStyle:"rounded-elbow",rootLineStyle:"arc",lineOrigin:"proportional",layoutMode:"mindmap",taperedEdge:!0,lineWidthTaper:.67,showOrderBadge:!1,canvasBg:void 0};Object.assign(k,y),(p=U.value)==null||p.applySettings(y)}function S(y){if(y.key==="Escape"){if(P.value){P.value=!1,y.stopPropagation();return}R.value&&(R.value=!1,y.stopPropagation())}}e.onMounted(()=>{var y;document.addEventListener("keydown",S),window.addEventListener("hashchange",I),(y=U.value)==null||y.applySettings({rainbowBranch:k.rainbowBranch,branchPaletteId:k.branchPaletteId,customPalettes:k.customPalettes,lineWidthStart:k.lineWidthStart,lineWidthEnd:k.lineWidthEnd,lineStyle:k.lineStyle,rootLineStyle:k.rootLineStyle,lineOrigin:k.lineOrigin})}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",S),window.removeEventListener("hashchange",I)});function ne(y){c.value=y}function se(y){var D;const p=y&&y.length>0?y[0]:null;s.value=p,p?!w.value&&((D=U.value)!=null&&D.nodeHasContent(p.id))&&(g.value=!1,h.value=!1,w.value=!0):w.value=!1}e.watch(c,y=>{if(!s.value)return;const p=Z(y,s.value.id);p?p!==s.value&&(s.value=p):s.value=null},{deep:!1});function re(y){if(!s.value||s.value.id!==y){const p=Z(c.value,y);p&&(s.value=p)}g.value=!1,h.value=!1,w.value=!0,C.value++}function Z(y,p){if(y.id===p)return y;for(const D of y.children){const V=Z(D,p);if(V)return V}return null}function ce(y){var p;s.value&&((p=U.value)==null||p.applyNodeNote(s.value.id,y))}function ie(){var y;s.value&&((y=U.value)==null||y.removeNodeNote(s.value.id))}function me(y){var p;s.value&&((p=U.value)==null||p.applyNodeLink(s.value.id,y))}function v(y){var p;s.value&&((p=U.value)==null||p.applyNodeImageByUrl(s.value.id,y))}function E(y){var p;s.value&&((p=U.value)==null||p.applyNodeRichContent(s.value.id,y))}function $(y){const p=document.querySelector(`[data-node-id="${y.id}"]`);p&&p.click()}function X(y){const p=new Set(u.value);p.has(y)?p.delete(y):p.add(y),u.value=p}function fe(y){var p;(p=U.value)==null||p.setNodeText(y.id,y.text)}function Ae(y){var p;(p=U.value)==null||p.addChild(y)}function De(y){var p;(p=U.value)==null||p.addSibling(y)}function Pe(y){var p;(p=U.value)==null||p.moveNode(y.srcId,y.targetId,y.position)}const Me=e.computed(()=>{var y;return((y=s.value)==null?void 0:y.id)??null});return(y,p)=>(e.openBlock(),e.createElementBlock("div",ig,[e.createVNode(Lt,{side:"left",width:300,open:d.value,title:"大纲","onUpdate:open":p[0]||(p[0]=D=>d.value=D)},{default:e.withCtx(()=>[e.createVNode(Oo,{data:c.value,"selected-id":Me.value,"collapsed-ids":u.value,onSelect:$,onToggleCollapse:X,onEdit:fe,onAddChild:Ae,onAddSibling:De,onMove:Pe},null,8,["data","selected-id","collapsed-ids"])]),_:1},8,["open"]),e.createElementVNode("main",rg,[R.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"zm-app-preview-exit",title:"退出预览 (Esc)",onClick:p[1]||(p[1]=D=>R.value=!1)},[...p[11]||(p[11]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.createElementVNode("line",{x1:"2",y1:"2",x2:"22",y2:"22"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("div",lg,[e.createVNode(Qo,{ref_key:"mindMapRef",ref:U,data:c.value,"preview-mode":R.value,"built-in-drawers":!1,onChange:ne,onSelect:se,onEditNote:re,onCanvasSettings:p[2]||(p[2]=D=>P.value=!0),onCanvasData:A,onCanvasImport:x,onCanvasTogglePreview:p[3]||(p[3]=D=>R.value=!R.value),onCanvasOutline:p[4]||(p[4]=D=>d.value=!0)},null,8,["data","preview-mode"])])]),e.createVNode(Lt,{side:"right",width:360,open:g.value&&!R.value,title:"数据","onUpdate:open":p[6]||(p[6]=D=>g.value=D)},{default:e.withCtx(()=>[e.createVNode(Lo,{data:c.value,onImport:p[5]||(p[5]=D=>c.value=D)},null,8,["data"])]),_:1},8,["open"]),e.createVNode(Lt,{side:"right",width:420,open:h.value&&!R.value,title:"Markdown","onUpdate:open":p[8]||(p[8]=D=>h.value=D)},{default:e.withCtx(()=>[e.createVNode(Do,{data:c.value,onImport:p[7]||(p[7]=D=>c.value=D)},null,8,["data"])]),_:1},8,["open"]),e.createVNode(Lt,{side:"right",width:360,open:w.value&&!R.value,title:"节点内容","onUpdate:open":p[9]||(p[9]=D=>w.value=D)},{default:e.withCtx(()=>[e.createVNode(Jo,{"selected-node":s.value,readonly:!1,"focus-tick":C.value,onApply:ce,onRemove:ie,onSetLink:me,onSetImage:v,onSetRich:E},null,8,["selected-node","focus-tick"])]),_:1},8,["open"]),e.createVNode(Lt,{side:"right",width:340,open:P.value&&!R.value,title:"设置","onUpdate:open":p[10]||(p[10]=D=>P.value=D)},{default:e.withCtx(()=>{var D;return[e.createVNode($o,{settings:k,"has-selection":s.value!==null,"selected-node-text":(D=s.value)==null?void 0:D.text,"node-style":m.value,"onUpdate:settings":F,"onUpdate:nodeStyle":W,onReset:K},null,8,["settings","has-selection","selected-node-text","node-style"])]}),_:1},8,["open"])]))}}),ag="0.5.6",sg={install(t){t.component("FlowMindMap",Qo),t.component("FlowMindMapOutline",Oo),t.component("FlowMindMapDrawer",Lt),t.component("FlowMindMapDataPanel",Lo),t.component("FlowMindMapMarkdownPanel",Do),t.component("FlowMindMapSettingsPanel",$o),t.component("FlowMindMapNotePanel",Jo),t.component("FlowMindMapApp",jl)}};Ne.DataPanel=Lo,Ne.Drawer=Lt,Ne.MARKER_LIB=gi,Ne.MarkdownPanel=Do,Ne.MindMap=Qo,Ne.MindMapApp=jl,Ne.NotePanel=Jo,Ne.Outline=Oo,Ne.SettingsPanel=$o,Ne.VERSION=ag,Ne.addChild=kr,Ne.addSibling=yr,Ne.clone=Ot,Ne.default=sg,Ne.findNode=ue,Ne.findParent=Gt,Ne.markdownToMindMap=zn,Ne.markdownToRichMindMap=Qa,Ne.markerDef=ds,Ne.markerLabel=wr,Ne.markerSvg=zo,Ne.mindMapToMarkdown=On,Ne.removeNode=Ro,Ne.richBlockToMarkdown=es,Ne.tagColor=hi,Ne.uid=Xt,Object.defineProperties(Ne,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flow-mindmap",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "A modern, minimalist mind mapping tool
|
|
3
|
+
"version": "0.5.6",
|
|
4
|
+
"description": "A modern, minimalist mind mapping tool — xmind-style, embeddable as a Vue component.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": {
|