feat(mindmap): 引入官方工具栏/侧栏并修复节点选择

This commit is contained in:
liaibo
2025-12-28 22:05:37 +08:00
parent bddef15242
commit af58c12d81
24 changed files with 2548 additions and 211 deletions
@@ -0,0 +1,32 @@
"use client";
import { MindmapBlockView } from "@/components/editor/blocks/MindmapBlock";
import type { BlockNoteEditor, Block } from "@blocknote/core";
import type { CustomBlockSchema } from "@/components/editor/schema";
const stubBlock: Block<CustomBlockSchema, "mindmap"> = {
id: "dev-mindmap",
type: "mindmap",
props: {
data: {
data: { text: "中心主题" },
children: [],
},
},
content: [],
children: [],
};
const editorStub = {
updateBlock: () => {
/* 开发沙盒中跳过持久化 */
},
} as unknown as BlockNoteEditor<CustomBlockSchema>;
export default function MindmapDevPage() {
return (
<div className="fixed inset-0 bg-white">
<MindmapBlockView block={stubBlock} editor={editorStub} fullscreen />
</div>
);
}
+1
View File
@@ -1,6 +1,7 @@
@import url("https://rsms.me/inter/inter.css");
@import "tailwindcss";
@import "tw-animate-css";
@import "./iconfont.css";
@custom-variant dark (&:is(.dark *));
+430
View File
@@ -0,0 +1,430 @@
@font-face {
font-family: "iconfont"; /* Project id 2479351 */
src: url('/mindmap-iconfont/iconfont.woff2?t=1719815803051') format('woff2'),
url('/mindmap-iconfont/iconfont.woff?t=1719815803051') format('woff'),
url('/mindmap-iconfont/iconfont.ttf?t=1719815803051') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.iconwaikuang:before {
content: "\e640";
}
.iconhighlight:before {
content: "\e6b8";
}
.iconyanshibofang:before {
content: "\e648";
}
.iconfujian:before {
content: "\e88a";
}
.icongeshihua:before {
content: "\e7a3";
}
.iconyuanma:before {
content: "\e658";
}
.icongundongtiao:before {
content: "\e670";
}
.iconxietongwendang:before {
content: "\e60d";
}
.iconTXT:before {
content: "\e6e1";
}
.iconwenjian1:before {
content: "\e69f";
}
.icondodeparent:before {
content: "\e70f";
}
.icongongshi:before {
content: "\e617";
}
.icontouming:before {
content: "\e60c";
}
.iconlieri:before {
content: "\e60b";
}
.iconmoon_line:before {
content: "\e745";
}
.iconsousuo:before {
content: "\e693";
}
.iconjiantouyou:before {
content: "\e62d";
}
.iconbianji1:before {
content: "\e60a";
}
.icondaohang1:before {
content: "\e632";
}
.iconyanjing:before {
content: "\e8bf";
}
.iconwangzhan:before {
content: "\e628";
}
.iconcsdn:before {
content: "\e608";
}
.iconshejiaotubiao-10:before {
content: "\e644";
}
.iconstar:before {
content: "\e7df";
}
.iconfork:before {
content: "\e641";
}
.iconxiazai:before {
content: "\e613";
}
.iconteamwork:before {
content: "\e870";
}
.iconshuiyin:before {
content: "\e67a";
}
.iconxmind:before {
content: "\ea57";
}
.iconmouseR:before {
content: "\e6bd";
}
.iconmouseL:before {
content: "\e6c0";
}
.iconwenjian:before {
content: "\e607";
}
.iconpdf:before {
content: "\e740";
}
.iconPNG:before {
content: "\ec18";
}
.iconSVG:before {
content: "\e621";
}
.iconmarkdown:before {
content: "\ec04";
}
.iconjson:before {
content: "\ea42";
}
.iconlianjiexian:before {
content: "\e75b";
}
.iconbangzhu:before {
content: "\e620";
}
.iconshezhi:before {
content: "\e8b7";
}
.iconwushuju:before {
content: "\e643";
}
.iconzuijinliulan:before {
content: "\e62f";
}
.icon3zuidahua-3:before {
content: "\e692";
}
.iconzuixiaohua:before {
content: "\e650";
}
.iconzuidahua:before {
content: "\e651";
}
.iconguanbi:before {
content: "\e652";
}
.icondiannao:before {
content: "\eac0";
}
.iconzhuye:before {
content: "\e65c";
}
.iconbendi1x:before {
content: "\e606";
}
.iconbeijingyanse:before {
content: "\e6f8";
}
.iconqingchu:before {
content: "\e605";
}
.iconcase:before {
content: "\e6c6";
}
.iconxingzhuang-wenzi:before {
content: "\eb99";
}
.iconzitijiacu:before {
content: "\ec83";
}
.iconzitixiahuaxian:before {
content: "\ec85";
}
.iconzitixieti:before {
content: "\ec86";
}
.iconshanchuxian:before {
content: "\e612";
}
.iconzitiyanse:before {
content: "\e854";
}
.icongithub:before {
content: "\e64f";
}
.iconchoose1:before {
content: "\e6c5";
}
.iconzhuti:before {
content: "\e7aa";
}
.icondaochu1:before {
content: "\e63e";
}
.iconlingcunwei:before {
content: "\e657";
}
.iconexport:before {
content: "\e642";
}
.icondakai:before {
content: "\ebdf";
}
.iconxinjian:before {
content: "\e64e";
}
.iconjianqie:before {
content: "\e601";
}
.iconzhengli:before {
content: "\e83b";
}
.iconfuzhi:before {
content: "\e604";
}
.iconniantie:before {
content: "\e63f";
}
.iconshangyi:before {
content: "\e6be";
}
.iconxiayi:before {
content: "\e6bf";
}
.icongaikuozonglan:before {
content: "\e609";
}
.iconquanxuan:before {
content: "\f199";
}
.icondaoru:before {
content: "\e6a3";
}
.iconhoutui-shi:before {
content: "\e656";
}
.iconqianjin1:before {
content: "\e654";
}
.iconwithdraw:before {
content: "\e603";
}
.iconqianjin:before {
content: "\e600";
}
.iconhuifumoren:before {
content: "\e60e";
}
.iconhuanhang:before {
content: "\e61e";
}
.iconsuoxiao:before {
content: "\ec13";
}
.iconbianji:before {
content: "\e626";
}
.iconfangda:before {
content: "\e663";
}
.iconquanping1:before {
content: "\e664";
}
.icondingwei:before {
content: "\e616";
}
.icondaohang:before {
content: "\e611";
}
.iconjianpan:before {
content: "\e64d";
}
.iconquanping:before {
content: "\e602";
}
.icondaochu:before {
content: "\e63d";
}
.iconbiaoqian:before {
content: "\e63c";
}
.iconflow-Mark:before {
content: "\e65b";
}
.iconchaolianjie:before {
content: "\e6f4";
}
.iconjingzi:before {
content: "\e610";
}
.iconxiaolian:before {
content: "\e60f";
}
.iconimage:before {
content: "\e629";
}
.iconjiegou:before {
content: "\e61d";
}
.iconyangshi:before {
content: "\e631";
}
.iconfuhao-dagangshu:before {
content: "\e71f";
}
.icontianjiazijiedian:before {
content: "\e622";
}
.iconjiedian:before {
content: "\e655";
}
.iconshanchu:before {
content: "\e696";
}
.iconzhankai:before {
content: "\e64c";
}
.iconzhankai1:before {
content: "\e673";
}