flow-mindmap 0.3.7 → 0.4.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/dist/flow-mindmap.js +2787 -2463
- package/dist/flow-mindmap.umd.cjs +21 -20
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/dist/components/CanvasContextMenu.vue.d.ts +0 -21
- package/dist/components/DataPanel.vue.d.ts +0 -19
- package/dist/components/Drawer.vue.d.ts +0 -33
- package/dist/components/Icon.vue.d.ts +0 -7
- package/dist/components/JsonTreeViewer.vue.d.ts +0 -25
- package/dist/components/MarkdownPanel.vue.d.ts +0 -12
- package/dist/components/MindMap.vue.d.ts +0 -93
- package/dist/components/NodeContextMenu.vue.d.ts +0 -63
- package/dist/components/NotePanel.vue.d.ts +0 -34
- package/dist/components/Outline.vue.d.ts +0 -45
- package/dist/components/SettingsPanel.vue.d.ts +0 -30
- package/dist/composables/useAutosize.d.ts +0 -21
- package/dist/composables/useHistory.d.ts +0 -19
- package/dist/composables/useKeyboard.d.ts +0 -32
- package/dist/composables/useMarkdown.d.ts +0 -6
- package/dist/composables/usePanZoom.d.ts +0 -35
- package/dist/composables/useRichContent.d.ts +0 -29
- package/dist/core/layout.d.ts +0 -144
- package/dist/core/palettes.d.ts +0 -43
- package/dist/entry.d.ts +0 -11
- package/dist/tree.d.ts +0 -96
- package/dist/types.d.ts +0 -270
package/dist/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.zm-node-menu{position:fixed;z-index:40;min-width:168px;padding:4px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 8px 24px #0f172a24;display:flex;flex-direction:column;gap:2px;font-size:13px;color:#1e293b;-webkit-user-select:none;user-select:none}.zm-node-menu-item{display:flex;align-items:center;gap:8px;padding:6px 10px;border:none;background:transparent;color:inherit;font:inherit;text-align:left;border-radius:4px;cursor:pointer;width:100%;transition:background .1s}.zm-node-menu-item:hover:not(:disabled){background:#f1f5f9}.zm-node-menu-item:active:not(:disabled){background:#e2e8f0}.zm-node-menu-item:disabled{color:#94a3b8;cursor:not-allowed}.zm-node-menu-icon{display:inline-flex;align-items:center;justify-content:center;width:13px;height:13px;font-size:10px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-weight:600;color:#64748b;flex-shrink:0}.zm-node-menu-icon-code{font-size:10px;letter-spacing:-1px}.zm-node-menu-icon-table{font-size:12px;font-family:inherit}.zm-canvas-menu{position:fixed;z-index:40;min-width:140px;padding:4px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 8px 24px #0f172a24;display:flex;flex-direction:column;gap:2px;font-size:13px;color:#1e293b;-webkit-user-select:none;user-select:none}.zm-canvas-menu-item{display:flex;align-items:center;gap:8px;padding:6px 10px;border:none;background:transparent;color:inherit;font:inherit;text-align:left;border-radius:4px;cursor:pointer;width:100%;transition:background .1s}.zm-canvas-menu-item:hover:not(:disabled){background:#f1f5f9}.zm-canvas-menu-item:active:not(:disabled){background:#e2e8f0}.zm-canvas-menu-item:disabled{color:#94a3b8;cursor:not-allowed}.zm-canvas-menu-item-has-submenu{position:relative}.zm-canvas-menu-item-has-submenu.is-open,.zm-canvas-menu-item-has-submenu:hover{background:#f1f5f9}.zm-canvas-menu-caret{margin-left:auto;color:#94a3b8;flex-shrink:0;display:inline-flex;align-items:center}.zm-canvas-submenu{position:fixed;z-index:41;min-width:160px;padding:4px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 8px 24px #0f172a24;display:flex;flex-direction:column;gap:2px;font-size:13px;color:#1e293b;-webkit-user-select:none;user-select:none;animation:zm-submenu-in .12s ease-out}@keyframes zm-submenu-in{0%{opacity:0;transform:translate(-4px)}to{opacity:1;transform:translate(0)}}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
1
|
+
.zm-node-menu{position:fixed;z-index:40;min-width:168px;padding:4px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 8px 24px #0f172a24;display:flex;flex-direction:column;gap:2px;font-size:13px;color:#1e293b;-webkit-user-select:none;user-select:none}.zm-node-menu-item{display:flex;align-items:center;gap:8px;padding:6px 10px;border:none;background:transparent;color:inherit;font:inherit;text-align:left;border-radius:4px;cursor:pointer;width:100%;transition:background .1s}.zm-node-menu-item:hover:not(:disabled){background:#f1f5f9}.zm-node-menu-item:active:not(:disabled){background:#e2e8f0}.zm-node-menu-item:disabled{color:#94a3b8;cursor:not-allowed}.zm-node-menu-icon{display:inline-flex;align-items:center;justify-content:center;width:13px;height:13px;font-size:10px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-weight:600;color:#64748b;flex-shrink:0}.zm-node-menu-icon-code{font-size:10px;letter-spacing:-1px}.zm-node-menu-icon-table{font-size:12px;font-family:inherit}.zm-canvas-menu{position:fixed;z-index:40;min-width:140px;padding:4px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-sizing:border-box;box-shadow:0 8px 24px #0f172a24;display:flex;flex-direction:column;gap:2px;font-size:13px;color:#1e293b;-webkit-user-select:none;user-select:none}.zm-canvas-menu-item{display:flex;align-items:center;gap:8px;padding:6px 10px;border:none;background:transparent;color:inherit;font:inherit;text-align:left;border-radius:4px;cursor:pointer;width:100%;box-sizing:border-box;transition:background .1s}.zm-canvas-menu-item:hover:not(:disabled){background:#f1f5f9}.zm-canvas-menu-item:active:not(:disabled){background:#e2e8f0}.zm-canvas-menu-item:disabled{color:#94a3b8;cursor:not-allowed}.zm-canvas-menu-item-has-submenu{position:relative;box-sizing:border-box}.zm-canvas-menu-item-has-submenu.is-open,.zm-canvas-menu-item-has-submenu:hover{background:#f1f5f9}.zm-canvas-menu-caret{margin-left:auto;color:#94a3b8;flex-shrink:0;display:inline-flex;align-items:center}.zm-canvas-submenu{position:fixed;z-index:41;min-width:160px;padding:4px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-sizing:border-box;box-shadow:0 8px 24px #0f172a24;display:flex;flex-direction:column;gap:2px;font-size:13px;color:#1e293b;-webkit-user-select:none;user-select:none;animation:zm-submenu-in .12s ease-out}@keyframes zm-submenu-in{0%{opacity:0;transform:translate(-4px)}to{opacity:1;transform:translate(0)}}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
2
2
|
Theme: GitHub
|
|
3
3
|
Description: Light theme as seen on github.com
|
|
4
4
|
Author: github.com
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
|
|
8
8
|
Outdated base version: https://github.com/primer/github-syntax-light
|
|
9
9
|
Current colors taken from GitHub's CSS
|
|
10
|
-
*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}.zm-mindmap{position:relative;width:100%;height:100%;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;-webkit-user-select:none;user-select:none}.zm-canvas{position:absolute;top:0;right:0;bottom:0;left:0;cursor:grab}.zm-canvas:active{cursor:grabbing}.zm-world{position:absolute;left:0;top:0;transform-origin:0 0}.zm-svg-layer{position:absolute;pointer-events:none;overflow:visible}.zm-marquee{position:absolute;border:1px dashed #3b82f6;background:#3b82f614;pointer-events:none;z-index:5}.zm-svg{position:absolute;left:0;top:0;pointer-events:none;overflow:visible;shape-rendering:geometricPrecision}.zm-node{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 .8em;box-sizing:border-box;border-radius:8px;border:1px solid;line-height:1.2;cursor:default;transition:box-shadow .15s;box-shadow:0 1px 2px #0000000f;white-space:nowrap;z-index:1}.zm-node:hover{box-shadow:0 4px 12px #0000001a;z-index:2}.zm-node.is-root{font-weight:600}.zm-node.is-selected{outline:2px solid #3b82f6;outline-offset:2px;z-index:3}.zm-text{display:flex;align-items:center;justify-content:center;gap:4px;min-height:1.2em;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.zm-text-label{pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex-shrink:1}.zm-input{border:none;outline:none;background:transparent;color:inherit;font:inherit;text-align:center;width:100%;min-width:40px}.zm-rich{margin-top:6px;width:max-content;overflow:visible;font-size:.78em;line-height:1.35;text-align:left;background:#0000000a;border-radius:4px;padding:4px 6px;color:inherit}.zm-rich-above{margin:0 0 2px}.zm-rich-no-overflow{max-height:none;overflow:visible}.zm-rich-code{margin:0;padding:6px 8px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:.92em;white-space:pre-wrap;word-break:break-word;background:#ffffff8c;border:1px solid currentColor;border-radius:6px;box-shadow:0 1px 2px #0f172a14}.zm-rich-list{margin:0;padding-left:1.2em;list-style:disc}.zm-rich-list li{margin:1px 0}.zm-rich-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.92em;background:#ffffff8c;border:1px solid currentColor;border-radius:6px;overflow:hidden;box-shadow:0 1px 2px #0f172a14}.zm-rich-table td{border-top:1px solid currentColor;border-right:1px solid currentColor;padding:3px 6px;opacity:.9}.zm-rich-table tr:last-child td{border-bottom:none}.zm-rich-table td:last-child{border-right:none}.zm-rich-table-sort{position:relative;background:#fff6;font-weight:600;text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none;padding:3px 6px;border-bottom:1px solid currentColor;border-right:1px solid currentColor;pointer-events:auto}.zm-rich-table-sort:last-child{border-right:none}.zm-rich-table-sort:hover{background:#ffffffa6}.zm-rich-table-sort.is-sorted{background:#ffffffb3}.zm-rich-sort-mark{position:absolute;right:4px;top:50%;transform:translateY(-50%);font-size:9px;color:#94a3b8}.zm-rich-table-sort.is-sorted .zm-rich-sort-mark{color:#1d4ed8}.zm-rich-edit{width:100%;min-height:90px;margin:0;padding:4px 6px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:.92em;line-height:1.4;color:inherit;background:#fff9;border:1px solid currentColor;border-radius:3px;outline:none;resize:vertical;white-space:pre;box-sizing:border-box}.zm-rich-edit:focus{border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f626}.zm-rich-paragraph{white-space:pre-wrap;word-break:break-word}.zm-btn{position:absolute;width:18px;height:18px;border-radius:50%;border:none;background:#3b82f6;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .15s,transform .15s;z-index:4}.zm-node:hover .zm-btn,.zm-node.is-selected .zm-btn{opacity:1}.zm-btn:hover{transform:scale(1.15)}.zm-collapse{right:-8px;top:50%;width:14px;height:14px;background:#fff;border:1.5px solid;transform:translateY(-50%);box-shadow:0 1px 3px #0f172a2e}.zm-collapse.is-on-left{right:auto;left:-8px}.zm-collapse:hover{transform:translateY(-50%) scale(1.15);background:#fff}.zm-collapse-badge{position:absolute;top:50%;transform:translateY(-50%);left:calc(100% + 8px);min-width:18px;height:18px;padding:0 5px;border-radius:5px;color:#fff;font-size:11px;font-weight:600;line-height:18px;text-align:center;box-shadow:0 1px 2px #00000026;cursor:pointer;-webkit-user-select:none;user-select:none;z-index:2;transition:filter .1s}.zm-collapse-badge.is-on-left{left:auto;right:calc(100% + 8px)}.zm-collapse-badge:hover{filter:brightness(.9)}.zm-node.has-image{flex-direction:column;padding:8px;gap:6px;white-space:normal}.zm-node-img{display:block;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;object-fit:contain;border-radius:4px}.zm-node-link,.zm-node-note-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:transparent;color:currentColor;border-radius:3px;cursor:pointer;flex-shrink:0;text-decoration:none;opacity:.75;transition:opacity .1s,background .1s;pointer-events:auto}.zm-node-link:hover,.zm-node-note-btn:hover{opacity:1;background:#0f172a14}.zm-node-link svg,.zm-node-note-btn svg{display:block}.zm-img-resize-handle{position:absolute;right:-5px;bottom:-5px;width:10px;height:10px;background:#fff;border:1.5px solid #3b82f6;border-radius:2px;cursor:nwse-resize;z-index:4;box-shadow:0 1px 3px #0f172a33}.zm-node.is-resizing{cursor:nwse-resize!important}.zm-img-remove-btn{position:absolute;right:-5px;bottom:14px;width:14px;height:14px;background:#fff;border:1px solid #cbd5e1;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#64748b;padding:0;z-index:4;box-shadow:0 1px 2px #0f172a1f}.zm-img-remove-btn:hover{background:#fee2e2;color:#b91c1c;border-color:#fca5a5}.zm-order-badge{display:inline-block;margin-left:6px;padding:0 5px;font-size:10px;font-weight:600;line-height:16px;color:#475569;background:#e2e8f0;border-radius:3px;font-variant-numeric:tabular-nums;pointer-events:none;-webkit-user-select:none;user-select:none;vertical-align:middle}.zm-toolbar{position:absolute;bottom:16px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:4px;padding:6px 10px;background:#fff;border:1px solid #e2e8f0;border-radius:999px;box-shadow:0 4px 12px #0000000f;z-index:10;transition:opacity .18s ease,transform .18s ease}.zm-toolbar.is-preview-only{opacity:0;pointer-events:none;transform:translate(-50%) translateY(8px)}.zm-toolbar.is-preview-only.is-hovered{opacity:1;pointer-events:auto;transform:translate(-50%) translateY(0)}.zm-tb-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:none;background:transparent;border-radius:6px;cursor:pointer;color:#475569}.zm-tb-btn:hover{background:#f1f5f9;color:#1e293b}.zm-tb-btn img{filter:invert(20%) sepia(15%) saturate(500%) hue-rotate(180deg);transition:filter .1s}.zm-tb-btn:hover img{filter:invert(15%) sepia(30%) saturate(800%) hue-rotate(180deg)}.zm-tb-btn.active{background:var(--zm-tb-active, #fff7ed);color:var(--zm-tb-active-fg, #c2410c)}.zm-tb-divider{width:1px;height:18px;background:#e2e8f0;margin:0 4px}.zm-tb-tip{font-size:12px;color:#64748b;min-width:38px;text-align:center}
|
|
10
|
+
*/.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}.zm-mindmap{position:relative;width:100%;height:100%;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;-webkit-user-select:none;user-select:none}.zm-canvas{position:absolute;top:0;right:0;bottom:0;left:0;cursor:grab}.zm-canvas:active{cursor:grabbing}.zm-world{position:absolute;left:0;top:0;transform-origin:0 0}.zm-svg-layer{position:absolute;pointer-events:none;overflow:visible}.zm-marquee{position:absolute;border:1px dashed #3b82f6;background:#3b82f614;pointer-events:none;z-index:5}.zm-svg{position:absolute;left:0;top:0;pointer-events:none;overflow:visible;shape-rendering:geometricPrecision}.zm-node{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 .8em;box-sizing:border-box;border-radius:8px;border:1px solid;line-height:1.2;cursor:default;transition:box-shadow .15s;box-shadow:0 1px 2px #0000000f;white-space:nowrap;z-index:1}.zm-node:hover{box-shadow:0 4px 12px #0000001a;z-index:2}.zm-node.is-root{font-weight:600}.zm-node.is-selected{outline:2px solid #3b82f6;outline-offset:2px;z-index:3}.zm-text{display:flex;align-items:center;justify-content:center;gap:4px;min-height:1.2em;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.zm-text-label{pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex-shrink:1}.zm-input{border:none;outline:none;background:transparent;color:inherit;font:inherit;text-align:center;width:100%;min-width:40px}.zm-rich{margin-top:6px;width:max-content;overflow:visible;font-size:.78em;line-height:1.35;text-align:left;background:#0000000a;border-radius:4px;padding:4px 6px;color:inherit}.zm-rich-above{margin:0 0 2px}.zm-rich-no-overflow{max-height:none;overflow:visible}.zm-rich-code{margin:0;padding:6px 8px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:.92em;white-space:pre-wrap;word-break:break-word;background:#ffffff8c;border:1px solid currentColor;border-radius:6px;box-shadow:0 1px 2px #0f172a14}.zm-rich-list{margin:0;padding-left:1.2em;list-style:disc}.zm-rich-list li{margin:1px 0}.zm-rich-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.92em;background:#ffffff8c;border:1px solid currentColor;border-radius:6px;overflow:hidden;box-shadow:0 1px 2px #0f172a14}.zm-rich-table td{border-top:1px solid currentColor;border-right:1px solid currentColor;padding:3px 6px;opacity:.9}.zm-rich-table tr:last-child td{border-bottom:none}.zm-rich-table td:last-child{border-right:none}.zm-rich-table-sort{position:relative;background:#fff6;font-weight:600;text-align:left;cursor:pointer;-webkit-user-select:none;user-select:none;padding:3px 6px;border-bottom:1px solid currentColor;border-right:1px solid currentColor;pointer-events:auto}.zm-rich-table-sort:last-child{border-right:none}.zm-rich-table-sort:hover{background:#ffffffa6}.zm-rich-table-sort.is-sorted{background:#ffffffb3}.zm-rich-sort-mark{position:absolute;right:4px;top:50%;transform:translateY(-50%);font-size:9px;color:#94a3b8}.zm-rich-table-sort.is-sorted .zm-rich-sort-mark{color:#1d4ed8}.zm-rich-edit{width:100%;min-height:90px;margin:0;padding:4px 6px;font-family:JetBrains Mono,Fira Code,Consolas,monospace;font-size:.92em;line-height:1.4;color:inherit;background:#fff9;border:1px solid currentColor;border-radius:3px;outline:none;resize:vertical;white-space:pre;box-sizing:border-box}.zm-rich-edit:focus{border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f626}.zm-rich-paragraph{white-space:pre-wrap;word-break:break-word}.zm-btn{position:absolute;width:18px;height:18px;border-radius:50%;border:none;background:#3b82f6;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .15s,transform .15s;z-index:4}.zm-node:hover .zm-btn,.zm-node.is-selected .zm-btn{opacity:1}.zm-btn:hover{transform:scale(1.15)}.zm-collapse{right:-8px;top:50%;width:14px;height:14px;background:#fff;border:1.5px solid;transform:translateY(-50%);box-shadow:0 1px 3px #0f172a2e}.zm-collapse.is-on-left{right:auto;left:-8px}.zm-collapse:hover{transform:translateY(-50%) scale(1.15);background:#fff}.zm-collapse-badge{position:absolute;top:50%;transform:translateY(-50%);left:calc(100% + 8px);min-width:18px;height:18px;padding:0 5px;border-radius:5px;color:#fff;font-size:11px;font-weight:600;line-height:18px;text-align:center;box-shadow:0 1px 2px #00000026;cursor:pointer;-webkit-user-select:none;user-select:none;z-index:2;transition:filter .1s}.zm-collapse-badge.is-on-left{left:auto;right:calc(100% + 8px)}.zm-collapse-badge:hover{filter:brightness(.9)}.zm-node.has-image{flex-direction:column;padding:8px;gap:6px;white-space:normal}.zm-node-img{display:block;pointer-events:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;object-fit:contain;border-radius:4px}.zm-node-link,.zm-node-note-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;background:transparent;color:currentColor;border-radius:3px;cursor:pointer;flex-shrink:0;text-decoration:none;opacity:.75;transition:opacity .1s,background .1s;pointer-events:auto}.zm-node-link:hover,.zm-node-note-btn:hover{opacity:1;background:#0f172a14}.zm-node-link svg,.zm-node-note-btn svg{display:block}.zm-img-resize-handle{position:absolute;right:-5px;bottom:-5px;width:10px;height:10px;background:#fff;border:1.5px solid #3b82f6;border-radius:2px;cursor:nwse-resize;z-index:4;box-shadow:0 1px 3px #0f172a33}.zm-node.is-resizing{cursor:nwse-resize!important}.zm-img-remove-btn{position:absolute;right:-5px;bottom:14px;width:14px;height:14px;background:#fff;border:1px solid #cbd5e1;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#64748b;padding:0;z-index:4;box-shadow:0 1px 2px #0f172a1f}.zm-img-remove-btn:hover{background:#fee2e2;color:#b91c1c;border-color:#fca5a5}.zm-order-badge{display:inline-block;margin-left:6px;padding:0 5px;font-size:10px;font-weight:600;line-height:16px;color:#475569;background:#e2e8f0;border-radius:3px;font-variant-numeric:tabular-nums;pointer-events:none;-webkit-user-select:none;user-select:none;vertical-align:middle}.zm-canvas-fab{position:absolute;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:none;background:#fff;border:1px solid #e2e8f0;border-radius:999px;box-shadow:0 2px 8px #0f172a14;color:#475569;cursor:pointer;z-index:11;opacity:0;pointer-events:none;transform:translateY(4px);transition:opacity .18s ease,transform .18s ease,background .1s,color .1s}.zm-canvas-fab.is-visible{opacity:1;pointer-events:auto;transform:translateY(0)}.zm-canvas-fab:hover{background:#f1f5f9;color:#1e293b;box-shadow:0 4px 12px #0f172a1f}.zm-canvas-fab:active{transform:scale(.94)}.zm-canvas-fab-preview{top:16px;right:16px}.zm-canvas-fab-outline{top:16px;left:16px}.zm-toolbar{position:absolute;bottom:16px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:4px;padding:6px 10px;background:#fff;border:1px solid #e2e8f0;border-radius:999px;box-shadow:0 4px 12px #0000000f;z-index:10;transition:opacity .18s ease,transform .18s ease}.zm-toolbar.is-preview-only{opacity:0;pointer-events:none;transform:translate(-50%) translateY(8px)}.zm-toolbar.is-preview-only.is-hovered{opacity:1;pointer-events:auto;transform:translate(-50%) translateY(0)}.zm-tb-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:none;background:transparent;border-radius:6px;cursor:pointer;color:#475569}.zm-tb-btn:hover{background:#f1f5f9;color:#1e293b}.zm-tb-btn img{filter:invert(20%) sepia(15%) saturate(500%) hue-rotate(180deg);transition:filter .1s}.zm-tb-btn:hover img{filter:invert(15%) sepia(30%) saturate(800%) hue-rotate(180deg)}.zm-tb-btn.active{background:var(--zm-tb-active, #fff7ed);color:var(--zm-tb-active-fg, #c2410c)}.zm-tb-divider{width:1px;height:18px;background:#e2e8f0;margin:0 4px}.zm-tb-tip{font-size:12px;color:#64748b;min-width:38px;text-align:center}.zm-outline-root{display:flex;flex-direction:column;height:100%}.zm-outline-actions{display:flex;justify-content:flex-end;padding:8px 10px 4px;flex-shrink:0}.zm-outline-action-btn{display:inline-flex;align-items:center;gap:5px;padding:3px 8px;font-size:11px;font-family:inherit;color:#64748b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:5px;cursor:pointer;transition:all .1s}.zm-outline-action-btn:hover{background:#f1f5f9;color:#1e293b;border-color:#cbd5e1}.zm-outline-action-btn.is-success{background:#ecfdf5;color:#047857;border-color:#a7f3d0}.zm-outline{list-style:none;margin:0;padding:4px 0 8px;font-size:13px;overflow:auto;flex:1;min-height:0}.zm-outline-row{display:flex;align-items:center;gap:6px;padding-right:6px;padding-top:4px;padding-bottom:4px;cursor:grab;color:#334155;border-radius:4px;margin:0 6px;-webkit-user-select:none;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background .1s;position:relative}.zm-outline-row:active{cursor:grabbing}.zm-outline-row:hover{background:#f1f5f9}.zm-outline-row.is-root{font-weight:600;color:#0f172a}.zm-outline-row.is-selected{background:#eff6ff;color:#1d4ed8}.zm-outline-row.is-selected .zm-outline-toggle,.zm-outline-row.is-selected .zm-outline-dot,.zm-outline-row.is-selected .zm-outline-row-copy,.zm-outline-row.is-selected .zm-outline-row-action{color:#1d4ed8}.zm-outline-row.is-drag-over-before:before,.zm-outline-row.is-drag-over-after:after{content:"";position:absolute;left:6px;right:6px;height:2px;background:#3b82f6;border-radius:1px;pointer-events:none}.zm-outline-row.is-drag-over-before:before{top:0}.zm-outline-row.is-drag-over-after:after{bottom:0}.zm-outline-row.is-drag-over-child{background:#dbeafe!important;outline:2px solid #3b82f6;outline-offset:-2px}.zm-outline-toggle{width:16px;height:16px;border:none;background:transparent;color:#94a3b8;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:3px;flex-shrink:0;padding:0}.zm-outline-toggle:hover{background:#e2e8f0;color:#475569}.zm-outline-dot{width:4px;height:4px;border-radius:50%;background:#cbd5e1;flex-shrink:0;margin:0 6px}.zm-outline-index{font-size:11px;color:#94a3b8;font-variant-numeric:tabular-nums;min-width:22px;flex-shrink:0;-webkit-user-select:none;user-select:none}.zm-outline-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.zm-outline-input{flex:1;font:inherit;font-size:13px;color:inherit;background:#fff;border:1px solid #3b82f6;border-radius:3px;padding:1px 4px;margin:-2px 0;outline:none}.zm-outline-row-action{width:20px;height:20px;border:1px solid transparent;background:transparent;color:#94a3b8;cursor:pointer;border-radius:4px;flex-shrink:0;padding:0;display:inline-flex;align-items:center;justify-content:center;opacity:0;transition:opacity .1s,background .1s,color .1s,border-color .1s}.zm-outline-row:hover .zm-outline-row-action,.zm-outline-row.is-selected .zm-outline-row-action{opacity:1}.zm-outline-row-action:hover{background:#e0e7ff;color:#4338ca;border-color:#c7d2fe}.zm-outline-row-action img{filter:invert(38%) sepia(94%) saturate(2417%) hue-rotate(229deg) brightness(91%) contrast(91%)}.zm-outline-row-copy{width:20px;height:20px;border:none;background:transparent;color:#94a3b8;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:3px;flex-shrink:0;padding:0;opacity:0;transition:opacity .1s,background .1s,color .1s}.zm-outline-row:hover .zm-outline-row-copy,.zm-outline-row.is-selected .zm-outline-row-copy{opacity:1}.zm-outline-row-copy:hover{background:#e2e8f0;color:#475569}.zm-outline-row-copy.is-success{opacity:1;color:#047857;background:#ecfdf5}
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
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,19 +0,0 @@
|
|
|
1
|
-
import type { MindMapNode } from '../types';
|
|
2
|
-
type __VLS_Props = {
|
|
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;
|
|
9
|
-
};
|
|
10
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
|
-
import: (data: MindMapNode) => any;
|
|
12
|
-
"consumed-mode": () => any;
|
|
13
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
-
onImport?: ((data: MindMapNode) => any) | undefined;
|
|
15
|
-
"onConsumed-mode"?: (() => any) | undefined;
|
|
16
|
-
}>, {
|
|
17
|
-
pendingMode: "json" | "markdown" | "txt" | null;
|
|
18
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
-
export default _default;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
/** 'left' slides in from the left edge, 'right' from the right. */
|
|
3
|
-
side?: 'left' | 'right';
|
|
4
|
-
/** Pixels wide. */
|
|
5
|
-
width?: number;
|
|
6
|
-
/** Show or hide the panel. Animation handles the transition. */
|
|
7
|
-
open?: boolean;
|
|
8
|
-
/** Optional title shown in the header. */
|
|
9
|
-
title?: string;
|
|
10
|
-
};
|
|
11
|
-
declare var __VLS_5: {}, __VLS_7: {};
|
|
12
|
-
type __VLS_Slots = {} & {
|
|
13
|
-
header?: (props: typeof __VLS_5) => any;
|
|
14
|
-
} & {
|
|
15
|
-
default?: (props: typeof __VLS_7) => any;
|
|
16
|
-
};
|
|
17
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
|
-
"update:open": (value: boolean) => any;
|
|
19
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
21
|
-
}>, {
|
|
22
|
-
title: string;
|
|
23
|
-
width: number;
|
|
24
|
-
side: "left" | "right";
|
|
25
|
-
open: boolean;
|
|
26
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
28
|
-
export default _default;
|
|
29
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
-
new (): {
|
|
31
|
-
$slots: S;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
name: string;
|
|
3
|
-
size?: number | string;
|
|
4
|
-
stroke?: number | string;
|
|
5
|
-
};
|
|
6
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
-
export default _default;
|
|
@@ -1,25 +0,0 @@
|
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { MindMapNode } from '../types';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
/** Current data tree. Used to populate the editor on first mount
|
|
4
|
-
* (as markdown) and as the source of the "export .md" action. */
|
|
5
|
-
data: MindMapNode;
|
|
6
|
-
};
|
|
7
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
|
-
import: (data: MindMapNode) => any;
|
|
9
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
-
onImport?: ((data: MindMapNode) => any) | undefined;
|
|
11
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
-
export default _default;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import type { MindMapNode, MindMapTheme, MindMapSettings, NodeStyle, MindMapImage } from '../types';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
data: MindMapNode;
|
|
4
|
-
theme?: MindMapTheme;
|
|
5
|
-
/**
|
|
6
|
-
* When true, hides the MindMap's own toolbar and disables every
|
|
7
|
-
* edit operation (add/remove/edit/drag/paste/rich-edit/note
|
|
8
|
-
* edit/context menu). Expand/collapse stays available so the
|
|
9
|
-
* user can still navigate a large tree. The app-level top
|
|
10
|
-
* toolbar / drawers are controlled by the parent (App.vue).
|
|
11
|
-
*/
|
|
12
|
-
previewMode?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Optional raw markdown source. When set, the component parses
|
|
15
|
-
* it into the data tree and ignores `data` (use one or the
|
|
16
|
-
* other). Editing nodes on the canvas emits `markdownChange`
|
|
17
|
-
* with the re-serialized form, so the host can keep its
|
|
18
|
-
* markdown source in sync without polling. Pass an empty
|
|
19
|
-
* string to clear.
|
|
20
|
-
*/
|
|
21
|
-
markdown?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Optional per-edge color list. When set, top-level branches
|
|
24
|
-
* draw their edges (and their descendant edges under
|
|
25
|
-
* `rainbowBranch`) using these colors in order, wrapping
|
|
26
|
-
* around. Overrides the palette picked by `branchPaletteId`
|
|
27
|
-
* / `customPalettes`. Pass an empty array to fall back to
|
|
28
|
-
* the palette pipeline.
|
|
29
|
-
*/
|
|
30
|
-
lineColors?: string[];
|
|
31
|
-
};
|
|
32
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
33
|
-
addChild: (parentId: string) => void;
|
|
34
|
-
addSibling: (nodeId: string) => void;
|
|
35
|
-
removeNode: (nodeId: string) => void;
|
|
36
|
-
duplicateNode: (nodeId: string) => void;
|
|
37
|
-
setNodeText: (nodeId: string, text: string) => void;
|
|
38
|
-
moveNode: (srcId: string, targetId: string, position: "before" | "after" | "child") => boolean;
|
|
39
|
-
getData: () => MindMapNode;
|
|
40
|
-
setData: (data: MindMapNode) => void;
|
|
41
|
-
resetView: () => void;
|
|
42
|
-
exportData: () => string;
|
|
43
|
-
importData: (json: string) => boolean;
|
|
44
|
-
getMarkdown: () => string;
|
|
45
|
-
setMarkdown: (md: string, emitMarkdownChange?: boolean) => void;
|
|
46
|
-
setBalanced: (value: boolean) => void;
|
|
47
|
-
isBalanced: () => boolean;
|
|
48
|
-
balance: () => void;
|
|
49
|
-
applyNodeStyle: (nodeId: string, style: NodeStyle) => void;
|
|
50
|
-
getNodeStyle: (nodeId: string) => NodeStyle;
|
|
51
|
-
applyNodeLink: (nodeId: string, url: string) => void;
|
|
52
|
-
removeNodeLink: (nodeId: string) => void;
|
|
53
|
-
applyNodeNote: (nodeId: string, text: string) => void;
|
|
54
|
-
removeNodeNote: (nodeId: string) => void;
|
|
55
|
-
applyNodeImageByUrl: (nodeId: string, url: string) => void;
|
|
56
|
-
applyNodeImage: (nodeId: string, image: MindMapImage) => void;
|
|
57
|
-
removeNodeImage: (nodeId: string) => void;
|
|
58
|
-
applyNodeRichContent: (nodeId: string, content: {
|
|
59
|
-
kind: "code" | "table";
|
|
60
|
-
raw: string;
|
|
61
|
-
lang?: string;
|
|
62
|
-
} | null) => void;
|
|
63
|
-
undo: () => void;
|
|
64
|
-
redo: () => void;
|
|
65
|
-
canUndo: () => boolean;
|
|
66
|
-
canRedo: () => boolean;
|
|
67
|
-
applySettings: (s: Partial<MindMapSettings>) => void;
|
|
68
|
-
getSettings: () => MindMapSettings;
|
|
69
|
-
setBranchPalette: (id: import("../types").BranchPaletteId) => void;
|
|
70
|
-
getBranchPalette: () => import("../types").BranchPaletteId;
|
|
71
|
-
getBranchPalettes: () => import("../types").BranchPalette[];
|
|
72
|
-
lineWidthForDepth: (depth: number) => number;
|
|
73
|
-
endWidthForDepth: (depth: number) => number;
|
|
74
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
75
|
-
select: (node: MindMapNode | null) => any;
|
|
76
|
-
change: (data: MindMapNode) => any;
|
|
77
|
-
"edit-note": (nodeId: string) => any;
|
|
78
|
-
markdownChange: (markdown: string) => any;
|
|
79
|
-
"canvas-settings": () => any;
|
|
80
|
-
"canvas-data": () => any;
|
|
81
|
-
"canvas-import": (mode: "markdown" | "txt" | "json") => any;
|
|
82
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
83
|
-
onSelect?: ((node: MindMapNode | null) => any) | undefined;
|
|
84
|
-
onChange?: ((data: MindMapNode) => any) | undefined;
|
|
85
|
-
"onEdit-note"?: ((nodeId: string) => any) | undefined;
|
|
86
|
-
onMarkdownChange?: ((markdown: string) => any) | undefined;
|
|
87
|
-
"onCanvas-settings"?: (() => any) | undefined;
|
|
88
|
-
"onCanvas-data"?: (() => any) | undefined;
|
|
89
|
-
"onCanvas-import"?: ((mode: "markdown" | "txt" | "json") => any) | undefined;
|
|
90
|
-
}>, {
|
|
91
|
-
previewMode: boolean;
|
|
92
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
93
|
-
export default _default;
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
/** Whether the node already has an image. When true, the
|
|
10
|
-
* "添加图片" action is renamed "替换图片" and a "移除图片"
|
|
11
|
-
* action is appended. */
|
|
12
|
-
hasImage?: boolean;
|
|
13
|
-
/** Whether the node already has a link. Drives the label /
|
|
14
|
-
* presence of the "添加链接" / "编辑链接" / "移除链接"
|
|
15
|
-
* actions. */
|
|
16
|
-
hasLink?: boolean;
|
|
17
|
-
/** Whether the node already has a note. Same role as
|
|
18
|
-
* hasLink for the note action. */
|
|
19
|
-
hasNote?: boolean;
|
|
20
|
-
/** Whether the node already has a code block in its
|
|
21
|
-
* richContent. Drives the code-block action's label and
|
|
22
|
-
* whether a "移除代码块" sub-action shows. */
|
|
23
|
-
hasCode?: boolean;
|
|
24
|
-
/** Whether the node already has a table in its richContent.
|
|
25
|
-
* Same role as hasCode for the table action. */
|
|
26
|
-
hasTable?: boolean;
|
|
27
|
-
};
|
|
28
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
29
|
-
close: () => any;
|
|
30
|
-
pickImage: () => any;
|
|
31
|
-
setLink: () => any;
|
|
32
|
-
removeLink: () => any;
|
|
33
|
-
editNote: () => any;
|
|
34
|
-
removeNote: () => any;
|
|
35
|
-
removeImage: () => any;
|
|
36
|
-
addCode: () => any;
|
|
37
|
-
editCode: () => any;
|
|
38
|
-
removeCode: () => any;
|
|
39
|
-
addTable: () => any;
|
|
40
|
-
editTable: () => any;
|
|
41
|
-
removeTable: () => any;
|
|
42
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
43
|
-
onClose?: (() => any) | undefined;
|
|
44
|
-
onPickImage?: (() => any) | undefined;
|
|
45
|
-
onSetLink?: (() => any) | undefined;
|
|
46
|
-
onRemoveLink?: (() => any) | undefined;
|
|
47
|
-
onEditNote?: (() => any) | undefined;
|
|
48
|
-
onRemoveNote?: (() => any) | undefined;
|
|
49
|
-
onRemoveImage?: (() => any) | undefined;
|
|
50
|
-
onAddCode?: (() => any) | undefined;
|
|
51
|
-
onEditCode?: (() => any) | undefined;
|
|
52
|
-
onRemoveCode?: (() => any) | undefined;
|
|
53
|
-
onAddTable?: (() => any) | undefined;
|
|
54
|
-
onEditTable?: (() => any) | undefined;
|
|
55
|
-
onRemoveTable?: (() => any) | undefined;
|
|
56
|
-
}>, {
|
|
57
|
-
hasImage: boolean;
|
|
58
|
-
hasLink: boolean;
|
|
59
|
-
hasNote: boolean;
|
|
60
|
-
hasCode: boolean;
|
|
61
|
-
hasTable: boolean;
|
|
62
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
|
-
export default _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { MindMapNode } from '../types';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
/** The currently selected node. `null` means nothing is
|
|
4
|
-
* selected; the panel renders an empty-state in that case. */
|
|
5
|
-
selectedNode: MindMapNode | null;
|
|
6
|
-
/** Disable all edit controls (read-only mode). */
|
|
7
|
-
readonly?: boolean;
|
|
8
|
-
/** Bumped by the parent (App.vue) on each select change. The
|
|
9
|
-
* panel uses this as a "focus the textarea" signal so the
|
|
10
|
-
* user can start typing immediately after picking a node. */
|
|
11
|
-
focusTick?: number;
|
|
12
|
-
};
|
|
13
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
-
"set-link": (url: string) => any;
|
|
15
|
-
apply: (text: string) => any;
|
|
16
|
-
remove: () => any;
|
|
17
|
-
"set-image": (src: string) => any;
|
|
18
|
-
"set-rich": (payload: {
|
|
19
|
-
kind: "code" | "table";
|
|
20
|
-
raw: string;
|
|
21
|
-
lang?: string;
|
|
22
|
-
} | null) => any;
|
|
23
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
|
-
"onSet-link"?: ((url: string) => any) | undefined;
|
|
25
|
-
onApply?: ((text: string) => any) | undefined;
|
|
26
|
-
onRemove?: (() => any) | undefined;
|
|
27
|
-
"onSet-image"?: ((src: string) => any) | undefined;
|
|
28
|
-
"onSet-rich"?: ((payload: {
|
|
29
|
-
kind: "code" | "table";
|
|
30
|
-
raw: string;
|
|
31
|
-
lang?: string;
|
|
32
|
-
} | null) => any) | undefined;
|
|
33
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
-
export default _default;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { MindMapNode } from '../types';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
/** Root of the mind map. */
|
|
4
|
-
data: MindMapNode;
|
|
5
|
-
/** Highlight the node with this id (the one selected on the main canvas). */
|
|
6
|
-
selectedId?: string | null;
|
|
7
|
-
/** When true, hide a node's children in the outline. */
|
|
8
|
-
collapsedIds?: Set<string>;
|
|
9
|
-
/** Read-only — disables editing / add / drag. Default false. */
|
|
10
|
-
readonly?: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
|
-
select: (node: MindMapNode) => any;
|
|
14
|
-
edit: (payload: {
|
|
15
|
-
id: string;
|
|
16
|
-
text: string;
|
|
17
|
-
}) => any;
|
|
18
|
-
toggleCollapse: (id: string) => any;
|
|
19
|
-
addChild: (id: string) => any;
|
|
20
|
-
addSibling: (id: string) => any;
|
|
21
|
-
move: (payload: {
|
|
22
|
-
srcId: string;
|
|
23
|
-
targetId: string;
|
|
24
|
-
position: "before" | "after" | "child";
|
|
25
|
-
}) => any;
|
|
26
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
-
onSelect?: ((node: MindMapNode) => any) | undefined;
|
|
28
|
-
onEdit?: ((payload: {
|
|
29
|
-
id: string;
|
|
30
|
-
text: string;
|
|
31
|
-
}) => any) | undefined;
|
|
32
|
-
onToggleCollapse?: ((id: string) => any) | undefined;
|
|
33
|
-
onAddChild?: ((id: string) => any) | undefined;
|
|
34
|
-
onAddSibling?: ((id: string) => any) | undefined;
|
|
35
|
-
onMove?: ((payload: {
|
|
36
|
-
srcId: string;
|
|
37
|
-
targetId: string;
|
|
38
|
-
position: "before" | "after" | "child";
|
|
39
|
-
}) => any) | undefined;
|
|
40
|
-
}>, {
|
|
41
|
-
selectedId: string | null;
|
|
42
|
-
readonly: boolean;
|
|
43
|
-
collapsedIds: Set<string>;
|
|
44
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
|
-
export default _default;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { MindMapSettings } from '../types';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
settings: MindMapSettings;
|
|
4
|
-
/** true when a node is selected — the per-node panel is shown too. */
|
|
5
|
-
hasSelection: boolean;
|
|
6
|
-
selectedNodeText?: string;
|
|
7
|
-
};
|
|
8
|
-
/** Style overrides for a single node. Stored externally (App.vue
|
|
9
|
-
* holds the map) so the per-node state is preserved across
|
|
10
|
-
* selection changes. */
|
|
11
|
-
export interface NodeStyle {
|
|
12
|
-
/** Background colour. undefined = fall back to theme/branch. */
|
|
13
|
-
bg?: string;
|
|
14
|
-
/** Text colour. */
|
|
15
|
-
textColor?: string;
|
|
16
|
-
/** Border colour. */
|
|
17
|
-
borderColor?: string;
|
|
18
|
-
/** Font weight: 400 / 600. undefined = inherit. */
|
|
19
|
-
fontWeight?: 400 | 600;
|
|
20
|
-
}
|
|
21
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
|
-
reset: () => any;
|
|
23
|
-
"update:settings": (s: Partial<MindMapSettings>) => any;
|
|
24
|
-
"update:nodeStyle": (s: Partial<NodeStyle>) => any;
|
|
25
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
26
|
-
onReset?: (() => any) | undefined;
|
|
27
|
-
"onUpdate:settings"?: ((s: Partial<MindMapSettings>) => any) | undefined;
|
|
28
|
-
"onUpdate:nodeStyle"?: ((s: Partial<NodeStyle>) => any) | undefined;
|
|
29
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
|
-
export default _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tiny autosize helper for textareas. Usage:
|
|
3
|
-
*
|
|
4
|
-
* const taRef = ref<HTMLTextAreaElement | null>(null)
|
|
5
|
-
* useAutosize(taRef, { minRows: 4, maxRows: 12 })
|
|
6
|
-
*
|
|
7
|
-
* The composable listens to the textarea's `input` event, sets
|
|
8
|
-
* its height to its scrollHeight (clamped to the row range), and
|
|
9
|
-
* also re-runs when the bound value changes from outside so a
|
|
10
|
-
* parent that resets `.value` (e.g. on node switch) still sizes
|
|
11
|
-
* correctly.
|
|
12
|
-
*/
|
|
13
|
-
import { type Ref } from 'vue';
|
|
14
|
-
export interface AutosizeOptions {
|
|
15
|
-
/** Minimum visible rows when the textarea is empty. Default 3. */
|
|
16
|
-
minRows?: number;
|
|
17
|
-
/** Maximum visible rows before the textarea starts scrolling.
|
|
18
|
-
* Default 12. Set to 0 for "no cap". */
|
|
19
|
-
maxRows?: number;
|
|
20
|
-
}
|
|
21
|
-
export declare function useAutosize(refEl: Ref<HTMLTextAreaElement | null>, options?: AutosizeOptions): void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { MindMapNode } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Linear undo/redo history for the mind map.
|
|
4
|
-
*
|
|
5
|
-
* Each entry stores the data tree (full JSON snapshot).
|
|
6
|
-
* Snapshots are deep-cloned JSON strings (one string per state). The
|
|
7
|
-
* timeline is bounded so a long session doesn't grow without limit.
|
|
8
|
-
*/
|
|
9
|
-
export interface HistoryState {
|
|
10
|
-
data: MindMapNode;
|
|
11
|
-
}
|
|
12
|
-
export declare function useHistory(maxSize?: number): {
|
|
13
|
-
canUndo: () => boolean;
|
|
14
|
-
canRedo: () => boolean;
|
|
15
|
-
record: (snapshot: HistoryState) => void;
|
|
16
|
-
undo: () => HistoryState | null;
|
|
17
|
-
redo: () => HistoryState | null;
|
|
18
|
-
reset: () => void;
|
|
19
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export interface KeyboardOptions {
|
|
2
|
-
isEditing: () => boolean;
|
|
3
|
-
isReadonly: () => boolean;
|
|
4
|
-
getSelectedId: () => string | null;
|
|
5
|
-
getRootId: () => string;
|
|
6
|
-
/**
|
|
7
|
-
* Called when Tab/Enter fires and no node is selected — defaults the
|
|
8
|
-
* action to the root node so the user can build a tree from scratch
|
|
9
|
-
* without first clicking something.
|
|
10
|
-
*/
|
|
11
|
-
defaultTargetId?: () => string;
|
|
12
|
-
onAddChild: (id: string) => void;
|
|
13
|
-
onAddSibling: (id: string) => void;
|
|
14
|
-
onAddSiblingBefore: (id: string) => void;
|
|
15
|
-
onRemove: (id: string) => void;
|
|
16
|
-
onStartEdit: (id: string) => void;
|
|
17
|
-
onClearSelection: () => void;
|
|
18
|
-
onDuplicate: (id: string) => void;
|
|
19
|
-
onUndo: () => void;
|
|
20
|
-
onRedo: () => void;
|
|
21
|
-
/**
|
|
22
|
-
* Move selection to a neighbour. Returns the new selected id (or null
|
|
23
|
-
* if no neighbour exists in that direction).
|
|
24
|
-
* dx = -1 → select first child
|
|
25
|
-
* dx = +1 → select parent
|
|
26
|
-
* dy = -1 → select previous sibling
|
|
27
|
-
* dy = +1 → select next sibling
|
|
28
|
-
*/
|
|
29
|
-
onNavigate: (dx: number, dy: number) => void;
|
|
30
|
-
onSelectRoot: () => void;
|
|
31
|
-
}
|
|
32
|
-
export declare function useKeyboard(opts: KeyboardOptions): void;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
export interface PanZoomOptions {
|
|
3
|
-
minScale?: number;
|
|
4
|
-
maxScale?: number;
|
|
5
|
-
step?: number;
|
|
6
|
-
getContainer: () => HTMLElement | null;
|
|
7
|
-
}
|
|
8
|
-
export interface MarqueeRect {
|
|
9
|
-
x: number;
|
|
10
|
-
y: number;
|
|
11
|
-
width: number;
|
|
12
|
-
height: number;
|
|
13
|
-
}
|
|
14
|
-
export declare function usePanZoom(opts: PanZoomOptions): {
|
|
15
|
-
scale: Ref<number, number>;
|
|
16
|
-
offsetX: Ref<number, number>;
|
|
17
|
-
offsetY: Ref<number, number>;
|
|
18
|
-
isPanning: Ref<boolean, boolean>;
|
|
19
|
-
onWheel: (e: WheelEvent) => void;
|
|
20
|
-
zoomIn: () => void;
|
|
21
|
-
zoomOut: () => void;
|
|
22
|
-
startPan: (e: PointerEvent | MouseEvent) => void;
|
|
23
|
-
startMarquee: (worldX: number, worldY: number) => void;
|
|
24
|
-
updateMarquee: (worldX: number, worldY: number) => void;
|
|
25
|
-
isMarquee: Ref<boolean, boolean>;
|
|
26
|
-
marquee: {
|
|
27
|
-
x: number;
|
|
28
|
-
y: number;
|
|
29
|
-
width: number;
|
|
30
|
-
height: number;
|
|
31
|
-
};
|
|
32
|
-
marqueeVersion: Ref<number, number>;
|
|
33
|
-
setOnMarqueeEnd: (cb: (() => void) | null) => void;
|
|
34
|
-
resetView: (layoutWidth: number, layoutHeight: number, rootY: number, padding?: number) => void;
|
|
35
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/** Strip the opening and closing ``` fences from a code block,
|
|
2
|
-
* returning just the body. Handles both ``` and ~~~ markers. */
|
|
3
|
-
export declare function stripCodeFence(raw: string): string;
|
|
4
|
-
/** Detect the info-string from the opening fence. Returns an
|
|
5
|
-
* empty string when the block has no fence or the language
|
|
6
|
-
* isn't one of our registered ones (so callers can fall back
|
|
7
|
-
* to a plain `<pre>`). */
|
|
8
|
-
export declare function codeLang(raw: string): string;
|
|
9
|
-
/** Run highlight.js on a code body and return sanitized HTML.
|
|
10
|
-
* Falls back to an escaped plain-text version when the language
|
|
11
|
-
* isn't registered — never throws. `body` should already be
|
|
12
|
-
* fence-stripped (see `stripCodeFence`). */
|
|
13
|
-
export declare function highlightCode(body: string, lang: string): string;
|
|
14
|
-
/** Split a pipe-delimited table into rows of cells, dropping the
|
|
15
|
-
* alignment separator row. Each inner array is the cells of one
|
|
16
|
-
* row. The first row is conventionally the header. */
|
|
17
|
-
export declare function tableRows(raw: string): string[][];
|
|
18
|
-
/** Re-join a 2-D cell array into pipe-delimited markdown. Used
|
|
19
|
-
* when the user edits a table in CSV/textarea form and we need
|
|
20
|
-
* to push it back into `richContent.raw`. */
|
|
21
|
-
export declare function rowsToTable(rows: string[][]): string;
|
|
22
|
-
/** Sort a 2-D cell array in place around a chosen column. The
|
|
23
|
-
* first row is the header and stays pinned at the top.
|
|
24
|
-
* Direction is `'asc'` | `'desc'`. When every value in the
|
|
25
|
-
* column parses as a finite number the sort is numeric,
|
|
26
|
-
* otherwise lexical (locale-aware). Stable across equal keys.
|
|
27
|
-
* Doesn't mutate the input. */
|
|
28
|
-
export type SortDir = 'asc' | 'desc';
|
|
29
|
-
export declare function sortTable(rows: string[][], col: number, dir: SortDir): string[][];
|