作者 202304001

增加思维导图工具栏

export function ChartPage() {
return <>zhehzsids</>;
}
... ...
export * from "./chart";
... ...
... ... @@ -109,6 +109,10 @@ const PowerPoint = dynamic(
loading: () => <Loading noLogo />,
},
);
//以下新增图表 页面 20250331
const ChartPage = dynamic(async () => (await import("./chart")).ChartPage, {
loading: () => <Loading noLogo />,
});
export function useSwitchTheme() {
const config = useAppConfig();
... ... @@ -198,6 +202,7 @@ function Screen() {
const isBgRemoval = location.pathname === Path.BgRemoval;
const isWrting = location.pathname === Path.Writing;
const isPowerpoint = location.pathname === Path.Powerpoint;
const isChart = location.pathname === Path.Chart;
const isMobileScreen = useMobileScreen();
const shouldTightBorder =
... ... @@ -226,6 +231,8 @@ function Screen() {
if (isWrting) return <WritingPage />;
//20250328新增ppt制作页面
if (isPowerpoint) return <PowerPoint />;
//20250331新增图标页面
if (isChart) return <ChartPage />;
return (
<>
... ...
import { MindElixirData } from "mind-elixir";
import { useState, useMemo } from "react";
import type { ColorPickerProps, GetProp } from "antd";
export const INITIAL_DATA: MindElixirData = {
nodeData: {
id: "root",
topic: "中心主题",
},
};
export const LOADING_DATA: MindElixirData = {
nodeData: {
id: "root",
topic: "生成中....",
},
};
export const FONT_SIZE_OPTIONS = [
{ value: "10", label: "10" },
{ value: "12", label: "12" },
{ value: "16", label: "16" },
{ value: "18", label: "18" },
{ value: "24", label: "24" },
{ value: "32", label: "32" },
{ value: "48", label: "48" },
];
export const EXPORT_OPTIONS = [
{ value: "png", label: "导出为PNG" },
{ value: "svg", label: "导出为SVG" },
];
type Color = Extract<
GetProp<ColorPickerProps, "value">,
string | { cleared: any }
>;
export const useColor = (initialColor: string) => {
const [color, setColor] = useState<Color>(initialColor);
const hexColor = useMemo(() => {
if (typeof color === "string") {
return color;
}
if (color && "toHexString" in color) {
return color.toHexString();
}
return initialColor;
}, [color, initialColor]);
return [hexColor, setColor] as const;
};
... ...
... ... @@ -6,4 +6,4 @@
height: 100%;
width: 100%;
gap: 5px;
}
\ No newline at end of file
}
... ...
... ... @@ -2,7 +2,11 @@ import chatStyles from "@/app/components/chat.module.scss";
import homeStyles from "@/app/components/home.module.scss";
import { MindSiderBar } from "./mind-siderBar";
import MindElixir, { type Options, type MindElixirData } from "mind-elixir";
import MindElixir, {
type Options,
type MindElixirData,
NodeObj,
} from "mind-elixir";
import { WindowContent } from "@/app/components/home";
import { useMobileScreen } from "@/app/utils";
import { IconButton } from "../button";
... ... @@ -18,22 +22,57 @@ import ReturnIcon from "@/app/icons/return.svg";
import MinIcon from "@/app/icons/min.svg";
import MaxIcon from "@/app/icons/max.svg";
import SDIcon from "@/app/icons/sd.svg";
import BoldIcon from "@/app/icons/bold.svg";
import FontColorIcon from "@/app/icons/fontColor.svg";
import FontBgIcon from "@/app/icons/fontBg.svg";
import CenterIcon from "@/app/icons/center.svg";
import MindIcon from "@/app/icons/mind.svg";
import LeftIcon from "@/app/icons/leftMind.svg";
import RightIcon from "@/app/icons/rightMind.svg";
import LineIcon from "@/app/icons/line.svg";
import InitSideIcon from "@/app/icons/initSide.svg";
import { useChatStore, useMindMapStore } from "@/app/store";
import { message } from "antd";
// 常量配置抽取
const INITIAL_DATA: MindElixirData = {
nodeData: {
id: "root",
topic: "中心主题",
},
};
const LOADING_DATA: MindElixirData = {
nodeData: {
id: "root",
topic: "生成中....",
},
};
import {
message,
Select,
ColorPicker,
Button,
Space,
Slider,
Popover,
} from "antd";
import type { ColorPickerProps, GetProp } from "antd";
import {
INITIAL_DATA,
LOADING_DATA,
FONT_SIZE_OPTIONS,
EXPORT_OPTIONS,
useColor,
} from "./mind-utils";
type Color = Extract<
GetProp<ColorPickerProps, "value">,
string | { cleared: any }
>;
const ScaleControl = ({
value,
onChange,
}: {
value: number;
onChange: (v: number) => void;
}) => (
<Slider
vertical
value={value}
onChange={onChange}
style={{ height: "100px" }}
min={35}
max={200}
tooltip={{ formatter: (v) => `${v}%` }}
/>
);
export function MindPage() {
const isMobileScreen = useMobileScreen();
... ... @@ -43,15 +82,21 @@ export function MindPage() {
const config = useAppConfig();
const scrollRef = useRef<HTMLDivElement>(null);
const isMind = location.pathname === Path.Mind;
const [isLoading, setIsLoading] = useState(false);
const containerRef = useRef<HTMLDivElement>(null);
const mindInstance = useRef<InstanceType<typeof MindElixir> | null>(null);
const [isLoading, setIsLoading] = useState(false); //加载 辅助
const containerRef = useRef<HTMLDivElement>(null); //思维导图容器
const mindInstance = useRef<InstanceType<typeof MindElixir> | null>(null); //思维导图实例
const chatStore = useChatStore();
const { newMessages, content } = useMindMapStore.getState();
const { newMessages, content } = useMindMapStore.getState(); //聊天页面跳转时要生成的信息
const query = useLocation();
let { msg } = query.state || {};
const [data, setData] = useState<MindElixirData>(INITIAL_DATA);
const [data, setData] = useState<MindElixirData>(INITIAL_DATA); //思维导图数据
const [fontColor, setFontColor] = useColor("#1677ff"); //字体颜色
const [nodeBgColor, setNodeBgColor] = useColor("#1677ff"); //节点背景颜色
const [lineColor, setLinrColor] = useColor("#1677ff"); //分支颜色
const [selectedNode, setSelectedNode] = useState<NodeObj | null>(null);
const [scaleValue, setScaleValue] = useState(100);
//如果是在聊天页面跳转过来时需要发起请求
const fetchData = async () => {
if (!msg) return;
if (!content) return;
... ... @@ -84,27 +129,73 @@ export function MindPage() {
const options: Options = {
el: containerRef.current,
locale: "zh_CN",
draggable: false,
draggable: true,
contextMenu: true,
toolBar: true,
nodeMenu: true,
toolBar: false,
nodeMenu: false,
};
// 创建实例
mindInstance.current = new MindElixir(options);
mindInstance.current.init(data);
const el = mindInstance.current?.container.querySelector("me-root");
//添加鼠标移入中心主题时鼠标变手的样式
const style = document.createElement("style");
// 添加 CSS 样式
style.textContent = `
me-root:hover {
cursor: pointer;
}
`;
// 将样式插入到文档中
document.head.appendChild(style);
const handleContainerClick = (e: MouseEvent) => {
const target = e.target as HTMLElement;
// 检查点击的目标是否是某个特定的元素(比如 me-root)
if (target.closest("me-root")) {
console.log("Clicked me-root element!", target);
// 获取 me-nodes 父元素
const parentElement = target.closest("me-nodes");
// 确保父元素存在并且是 HTMLElement 类型
if (parentElement && parentElement instanceof HTMLElement) {
// 鼠标按下时开始跟随
const onMouseDown = (e: MouseEvent) => {
// 记录鼠标按下的初始位置和父元素的初始位置
const initialX = e.clientX;
const initialY = e.clientY;
const initialElementX = parentElement.offsetLeft;
const initialElementY = parentElement.offsetTop;
// 鼠标移动时更新父元素位置
const onMouseMove = (moveEvent: MouseEvent) => {
const deltaX = moveEvent.clientX - initialX;
const deltaY = moveEvent.clientY - initialY;
parentElement.style.position = "absolute";
parentElement.style.left = `${initialElementX + deltaX}px`;
parentElement.style.top = `${initialElementY + deltaY}px`;
};
// 鼠标松开时停止跟随
const onMouseUp = () => {
window.removeEventListener("mousemove", onMouseMove);
window.removeEventListener("mouseup", onMouseUp);
};
// 添加事件监听器
window.addEventListener("mousemove", onMouseMove);
window.addEventListener("mouseup", onMouseUp);
};
// 添加鼠标按下事件监听器
target.addEventListener("mousedown", onMouseDown);
}
}
};
//注册点击事件
mindInstance.current.container.addEventListener(
"click",
handleContainerClick,
);
fetchData();
//设置选择的节点用于调节样式
mindInstance.current?.bus.addListener("selectNode", (node) => {
setSelectedNode(node);
});
return () => {
mindInstance.current?.container.removeEventListener(
... ... @@ -117,6 +208,7 @@ export function MindPage() {
};
}, []);
//data更新思维导图更新数据
useEffect(() => {
mindInstance.current?.refresh(data);
}, [data]);
... ... @@ -127,6 +219,168 @@ export function MindPage() {
}
}, [isLoading]);
useEffect(() => {
if (selectedNode) {
// 更新字体颜色
updateNodeStyle({ color: fontColor });
}
}, [fontColor]);
useEffect(() => {
if (selectedNode) {
// 更新节点背景颜色
updateNodeStyle({ background: nodeBgColor });
}
}, [nodeBgColor]);
// 导出函数
const handleDownload = async (type: "png" | "svg") => {
try {
const blob =
type === "png"
? await mindInstance.current?.exportPng(false)
: await mindInstance.current?.exportSvg(false);
if (!blob) return;
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = `${data.nodeData.topic}.${type}`;
a.click();
URL.revokeObjectURL(url);
} catch (error) {
console.error("导出失败:", error);
message.error("导出失败,请重试");
}
};
//思维导图缩放函数
const handleScaleChange = (value: number) => {
setScaleValue(value);
mindInstance.current?.scale(value / 100);
};
//更新样式
const updateNodeStyle = (style: Partial<NodeObj["style"]>) => {
if (selectedNode) {
mindInstance.current?.reshapeNode(MindElixir.E(selectedNode.id), {
style: { ...selectedNode.style, ...style },
});
}
};
//更新分支颜色
const updateBranchColor = (value: string) => {
if (selectedNode) {
mindInstance.current?.reshapeNode(MindElixir.E(selectedNode.id), {
branchColor: value,
});
}
};
const mindType = (
<div>
<Button
icon={<LeftIcon />}
onClick={() => {
mindInstance.current?.initLeft();
}}
/>
<Button
icon={<RightIcon />}
onClick={() => {
mindInstance.current?.initRight();
}}
/>
<Button
icon={
<InitSideIcon
onClick={() => {
mindInstance.current?.initSide();
}}
/>
}
/>
</div>
);
//工具栏
const renderToolbar = () => (
<Space>
<Popover
content={
<ScaleControl value={scaleValue} onChange={handleScaleChange} />
}
>
<Button>{scaleValue}%</Button>
</Popover>
<Popover content={mindType}>
<Button icon={<MindIcon />}></Button>
</Popover>
<Select
options={EXPORT_OPTIONS}
onSelect={handleDownload}
placeholder="导出"
style={{ width: 120 }}
/>
<Select
options={FONT_SIZE_OPTIONS}
onSelect={(v) => updateNodeStyle({ fontSize: v })}
placeholder="字号"
style={{ width: 100 }}
disabled={!selectedNode}
/>
<Button
icon={<CenterIcon />}
onClick={() => mindInstance.current?.toCenter()}
/>
<Button
icon={<BoldIcon />}
onClick={() =>
updateNodeStyle({
fontWeight:
selectedNode?.style?.fontWeight === "bold" ? "normal" : "bold",
})
}
disabled={!selectedNode}
/>
<ColorPicker
value={fontColor}
onChange={(value) => {
setFontColor(value || "#000000"); // 处理可能的空值
updateNodeStyle({ color: value?.toHexString() || "#000000" });
}}
disabled={!selectedNode}
showText
>
<Button icon={<FontColorIcon />} />
</ColorPicker>
<ColorPicker
value={nodeBgColor}
onChange={(value) => {
setNodeBgColor(value || "#ffffff");
updateNodeStyle({ background: value?.toHexString() || "#ffffff" });
}}
disabled={!selectedNode}
showText
>
<Button icon={<FontBgIcon />} />
</ColorPicker>
<ColorPicker
value={lineColor}
onChange={(value) => {
setLinrColor(value || "#ffffff");
updateBranchColor(value?.toHexString() || "#ffffff");
}}
disabled={!selectedNode}
showText
>
<Button icon={<LineIcon />} />
</ColorPicker>
</Space>
);
return (
<>
<MindSiderBar
... ... @@ -160,12 +414,7 @@ export function MindPage() {
</div>
<div className={chatStyles["chat-message-actions"]}>
<div className={chatStyles["chat-input-actions"]}>
{/* <ChatAction
text={Locale.Chat.Actions.ReWrite}
icon={<ReloadIcon />}
onClick={() => { }
}
/> */}
{renderToolbar()}
</div>
</div>
<div className="window-actions">
... ...
... ... @@ -57,6 +57,7 @@ export enum Path {
BgRemoval = "/background-removal",
Writing = "/aiWriting",
Powerpoint = "/powerpoint",
Chart = "/chart",
}
export enum ApiPath {
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743400745474" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5496" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M768.96 575.072c-22.144-34.112-54.816-56.8-97.984-68.032v-2.176c22.88-10.88 42.112-23.04 57.696-36.48 15.616-12.704 27.584-26.144 35.936-40.288 16.32-29.76 24.128-60.96 23.392-93.632 0-63.872-19.776-115.232-59.328-154.08-39.2-38.464-97.824-58.048-175.84-58.784H215.232v793.728H579.52c62.432 0 114.496-20.864 156.256-62.624 42.112-39.936 63.52-94.176 64.224-162.752 0-41.376-10.336-79.68-31.04-114.88zM344.32 228.832h194.912c43.904 0.736 76.224 11.424 96.896 32.128 21.056 22.144 31.584 49.184 31.584 81.12s-10.528 58.432-31.584 79.488c-20.672 22.848-52.992 34.304-96.896 34.304H344.32V228.832z m304.352 536.256c-20.672 23.584-53.344 35.744-97.984 36.48H344.32v-238.432h206.336c44.64 0.704 77.312 12.512 97.984 35.392 20.672 23.232 31.04 51.168 31.04 83.84 0 31.904-10.336 59.488-31.008 82.72z" p-id="5497"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743412877101" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2349" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M760.663406 528.093537l0.170892 0.096191L593.303724 815.900451l-1.055029 0.696872c-10.000771 23.754007-33.628912 40.461527-61.217247 40.461527-27.585265 0-51.205219-16.70752-61.20906-40.461527l-1.051959-0.696872L301.240879 528.189727c-73.278957-125.832893-29.797653-286.736537 97.115851-359.385137 126.916575-72.65167 289.208844-29.53364 362.476545 96.296183C809.93253 349.420181 806.383704 449.386964 760.663406 528.093537zM531.032472 297.987788c-54.953589 0-99.497085 44.169989-99.497085 98.658997 0 54.485939 44.543496 98.661044 99.497085 98.661044s99.510388-44.175105 99.510388-98.661044C630.54286 342.157777 585.986061 297.987788 531.032472 297.987788z" fill="#272636" p-id="2350"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743400875107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8289" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M64 0h896v1024h-896z" fill="#D8D8D8" p-id="8290"></path><path d="M454.4 192h115.2l262.4 640h-108.8l-64-166.4h-294.4l-64 166.4h-108.8l262.4-640z m-57.6 396.8h230.4l-115.2-288h-6.4l-108.8 288z" fill="#212121" p-id="8291"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743400819471" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6474" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M513.237333 53.333333l0.704 0.021334a53.141333 53.141333 0 0 1 3.52 0.234666l0.810667 0.106667a45.504 45.504 0 0 1 7.466667 1.429333l1.856 0.533334 0.448 0.149333a52.842667 52.842667 0 0 1 20.458666 11.946667 51.2 51.2 0 0 1 7.978667 9.493333c1.557333 2.346667 2.965333 4.864 4.16 7.530667l364.8 810.666666a53.333333 53.333333 0 1 1-97.28 43.776l-101.952-226.517333H297.749333L195.84 939.221333a53.333333 53.333333 0 0 1-97.28-43.776l364.8-810.666666a53.482667 53.482667 0 0 1 16-20.309334 53.333333 53.333333 0 0 1 16.426667-8.618666l0.64-0.192a43.008 43.008 0 0 1 5.056-1.28 84.096 84.096 0 0 1 4.16-0.682667l0.938666-0.085333c0.853333-0.106667 1.706667-0.170667 2.56-0.213334l0.917334-0.042666L512 53.333333l1.237333 0.021334z m164.970667 552.704L512 236.629333l-166.229333 369.408h332.458666z" p-id="6475"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743415911143" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2770" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M512 576m-192 0a192 192 0 1 0 384 0 192 192 0 1 0-384 0Z" fill="#5F6368" p-id="2771"></path><path d="M896 480m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" fill="#5F6368" p-id="2772"></path><path d="M896 608c-70.4 0-128-57.6-128-128s57.6-128 128-128 128 57.6 128 128-57.6 128-128 128z m0-192c-38.4 0-64 25.6-64 64s25.6 64 64 64 64-25.6 64-64-25.6-64-64-64z" fill="#5F6368" p-id="2773"></path><path d="M768 896m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" fill="#5F6368" p-id="2774"></path><path d="M768 1024c-70.4 0-128-57.6-128-128s57.6-128 128-128 128 57.6 128 128-57.6 128-128 128z m0-192c-38.4 0-64 25.6-64 64s25.6 64 64 64 64-25.6 64-64-25.6-64-64-64z" fill="#5F6368" p-id="2775"></path><path d="M256 896m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" fill="#5F6368" p-id="2776"></path><path d="M256 1024c-70.4 0-128-57.6-128-128s57.6-128 128-128 128 57.6 128 128-57.6 128-128 128z m0-192c-38.4 0-64 25.6-64 64s25.6 64 64 64 64-25.6 64-64-25.6-64-64-64z" fill="#5F6368" p-id="2777"></path><path d="M512 128m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" fill="#5F6368" p-id="2778"></path><path d="M512 256c-70.4 0-128-57.6-128-128s57.6-128 128-128 128 57.6 128 128-57.6 128-128 128z m0-192c-38.4 0-64 25.6-64 64s25.6 64 64 64 64-25.6 64-64-25.6-64-64-64z" fill="#5F6368" p-id="2779"></path><path d="M128 480m-96 0a96 96 0 1 0 192 0 96 96 0 1 0-192 0Z" fill="#5F6368" p-id="2780"></path><path d="M128 608c-70.4 0-128-57.6-128-128s57.6-128 128-128 128 57.6 128 128-57.6 128-128 128z m0-192c-38.4 0-64 25.6-64 64s25.6 64 64 64 64-25.6 64-64-25.6-64-64-64zM572.16 745.344l45.184-45.248 90.56 90.56-45.312 45.248zM316.16 790.656l90.432-90.56 45.312 45.248-90.56 90.56zM677.504 508.224l134.08-42.88 19.52 60.992-134.144 42.88z" fill="#5F6368" p-id="2781"></path><path d="M189.568 530.112l18.24-61.312 141.12 42.048-18.304 61.376zM480 230.4h64v166.4h-64z" fill="#5F6368" p-id="2782"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743400663399" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4522" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M809.324 142.941v65.194h-99.109l-247.77 607.244h99.109v65.68H214.676v-65.68h99.109l247.769-607.245h-99.109V142.94h346.879z" p-id="4523"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743415850139" class="icon" viewBox="0 0 1260 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2478" xmlns:xlink="http://www.w3.org/1999/xlink" width="19.6875" height="16"><path d="M696.7684475 549.4167275c0 68.96922656 0.73763906 137.93845313 0 206.90767969l-0.73763906 12.53985937c-1.991625 16.52310844-5.90111063 32.45610656-12.24480375 47.79899344a167.07518531 167.07518531 0 0 1-95.74551469 91.46721c-16.96569187 6.26992969-34.81655062 9.36801281-52.962465 10.0318875-44.47961906 0.36881906-88.88547375 0-133.36509281 0-2.06538844 0-4.05701344-0.44258344-6.04863844-0.73763906l-0.73763813 1.77033281a110.49829031 110.49829031 0 0 1-51.11836781 59.23239469c-14.75277562 7.89273469-30.53824594 11.80222031-47.06135531 13.12997062-51.19213219 1.32774938-102.53179125 0.14752781-153.65015906 0.14752781a115.36670625 115.36670625 0 0 1-52.37235375-13.27749843 112.41615094 112.41615094 0 0 1-54.36397875-69.78062906 109.53936 109.53936 0 0 1 3.31937437-65.64985219 110.49829031 110.49829031 0 0 1 51.11836781-59.15863032c14.75277562-7.96649906 30.53824594-11.80222031 47.06135438-13.27749843a3355.81390031 3355.81390031 0 0 1 158.887395 0 109.17054094 109.17054094 0 0 1 51.70847906 15.93299812c22.12916344 13.49878969 38.65227281 34.44773156 46.98759094 58.27346438 1.03269469 0 2.06538844-0.22129125 2.95055531-0.36882 45.733605-1.991625 91.46721 1.47527719 137.20081407-0.29505563a92.72119594 92.72119594 0 0 0 82.09919718-60.33885281c3.68819437-10.32694312 5.38476281-21.17023312 5.53229063-32.16105094V549.4167275c-75.97679531 0-151.95359063 2.8030275-227.930385 0.95893031v0.22129219a111.75227625 111.75227625 0 0 1-51.19213219 59.23239375c-14.75277562 7.74520688-30.53824594 11.80222031-47.06135437 12.98244281-51.19213219 1.32774938-102.53179125 0.14752781-153.65015907 0.14752782a117.28456687 117.28456687 0 0 1-52.37235375-13.2774975 112.56367875 112.56367875 0 0 1-54.36397875-69.85439344 109.53936 109.53936 0 0 1 3.31937438-65.64985219 110.49829031 110.49829031 0 0 1 51.11836781-59.15863125c14.75277562-7.89273469 30.53824594-11.80222031 47.06135438-13.12996969a3169.41257812 3169.41257812 0 0 1 158.887395 0 111.08840156 111.08840156 0 0 1 51.70847906 15.85923375c21.98163563 13.27749844 38.35721719 34.07891156 46.76629875 57.75711657H623.00456844c0-69.11675437 2.50797187-138.30727312-0.14752782-207.42402657a91.02462656 91.02462656 0 0 0-8.92542937-35.25913406A91.54097344 91.54097344 0 0 0 535.81566406 180.59733406C490.96722594 179.12205594 446.48760687 180.59733406 401.71293219 180.59733406a42.04541063 42.04541063 0 0 1-6.12240188-0.59011125l-0.59011125 1.77033282a112.41615094 112.41615094 0 0 1-51.41342343 59.23239468c-14.75277562 7.74520688-30.53824594 11.80222031-47.06135438 12.98244282-51.19213219 1.32774938-102.53179125 0.14752781-153.65016 0.14752781a117.28456687 117.28456687 0 0 1-52.37235375-13.27749844 112.56367875 112.56367875 0 0 1-54.36397875-69.85439344A109.53936 109.53936 0 0 1 57.9732575 73.41841813C67.26750594 62.2800725 78.40585156 53.20711531 90.8719475 46.34707437c14.75277562-7.89273469 30.53824594-11.80222031 47.06135438-13.12997062a3169.41257812 3169.41257812 0 0 1 158.88739499 0 111.08840156 111.08840156 0 0 1 51.70847907 15.85923375c22.12916344 13.49878969 38.504745 34.44773156 46.84006312 58.42099219 1.03269469-0.44258344 2.06538844-0.59011125 2.95055438-0.73763813 45.733605-1.84409719 91.24591781-0.73763906 136.831995 0 19.39990031 0.73763906 38.504745 4.27830469 56.79818718 11.43340032A167.44400438 167.44400438 0 0 1 688.13807375 219.69218937c5.75358281 17.2607475 8.4090825 35.03784281 8.63037375 53.10999282V475.65284844h153.94521469l0.44258344-1.18022156a111.9735675 111.9735675 0 0 1 51.26589562-59.23239469c14.75277562-7.74520688 30.53824594-11.80222031 47.06135438-12.98244281a3169.41257812 3169.41257812 0 0 1 158.887395 0c5.53229062 0.44258344 11.06458219 0.95893031 16.52310843 2.06538843 12.39233156 2.65549969 24.34207969 7.37638781 35.11160625 13.86760969 34.44773156 20.94894188 55.17538125 60.04379719 53.10999282 100.318875a109.53936 109.53936 0 0 1-57.75711657 91.61473687c-14.75277562 7.89273469-30.53824594 11.80222031-47.06135437 13.12997063-51.33966 1.32774938-102.53179125 0.14752781-153.79768782 0.14752781a115.36670625 115.36670625 0 0 1-52.37235375-13.27749844 112.19485969 112.19485969 0 0 1-51.48718687-60.48638062H696.7684475z m-552.78650719 295.05551531a38.20968937 38.20968937 0 0 0-27.73521844 12.09727594 39.24238313 39.24238313 0 0 0-7.37638875 12.09727594c-5.90111063 16.449345 0.73763906 35.18537062 15.49041469 44.25832687a37.61957812 37.61957812 0 0 0 17.2607475 5.16347157c50.45449312 1.32774938 100.90898625 1.32774938 151.36347938 0a36.14430094 36.14430094 0 0 0 32.75116218-24.04702407 37.54581469 37.54581469 0 0 0-15.49041468-44.25832687 37.61957812 37.61957812 0 0 0-17.2607475-5.16347156C243.341885 843.1444925 193.69879438 844.47224281 143.98194031 844.47224281z m0-368.81939437a38.20968937 38.20968937 0 0 0-27.73521844 12.09727687 39.24238313 39.24238313 0 0 0-7.37638875 12.09727594c-5.90111063 16.449345 0.73763906 35.18537062 15.49041469 44.25832688a37.61957812 37.61957812 0 0 0 17.2607475 5.16347156c50.45449312 1.32774938 100.90898625 1.32774938 151.36347938 0a36.14430094 36.14430094 0 0 0 32.75116218-24.04702406 37.54581469 37.54581469 0 0 0-15.49041468-44.25832782 37.61957812 37.61957812 0 0 0-17.2607475-5.16347156C243.341885 474.32509906 193.69879438 475.65284844 143.98194031 475.65284844z m0-368.81939344a38.20968937 38.20968937 0 0 0-27.73521844 12.09727594 39.24238313 39.24238313 0 0 0-7.37638875 12.09727593c-5.90111063 16.449345 0.73763906 35.18537062 15.49041469 44.25832782a37.61957812 37.61957812 0 0 0 17.2607475 5.16347156c50.45449312 1.32774938 100.90898625 1.32774938 151.36347938 0a36.14430094 36.14430094 0 0 0 32.75116218-24.047025 37.54581469 37.54581469 0 0 0-15.49041468-44.25832687 37.61957812 37.61957812 0 0 0-17.2607475-5.16347157C243.341885 105.50570563 193.69879438 106.833455 143.98194031 106.833455z" fill="" p-id="2479"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743471096346" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1773" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M214.537 487c-13.178 37.286-48.738 64-90.537 64-53.02 0-96-42.981-96-96s42.98-96 96-96c41.799 0 77.359 26.714 90.537 64h594.926c13.178-37.286 48.738-64 90.537-64 53.019 0 96 42.981 96 96s-42.981 96-96 96c-41.799 0-77.359-26.714-90.537-64H214.537z" fill="#707070" p-id="1774"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743415877915" class="icon" viewBox="0 0 1262 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2624" xmlns:xlink="http://www.w3.org/1999/xlink" width="19.71875" height="16"><path d="M870.85087 79.486795l0.783893-2.038123a117.427237 117.427237 0 0 1 54.323815-62.946643c15.677869-7.838934 32.453188-12.542295 50.012402-13.326189 56.283549-1.567787 112.567098-1.567787 168.850647 0l17.637602 2.35168c13.16941 3.135574 25.868484 7.838934 37.313328 14.893976 36.607824 22.73291 58.635229 64.279262 56.440327 106.609508-0.548725 11.758402-2.978795 23.516803-7.05504 34.491311-4.468193 12.542295-11.209676 24.300697-19.597336 34.491311-9.641889 11.758402-21.47868 21.949016-34.72648 29.004058-15.677869 8.622828-32.453188 12.542295-50.012401 14.110081-54.402205 1.567787-108.961188 0.783893-163.285004 0.783894-19.597336 0-38.410779-4.703361-55.656434-14.110082-25.554926-14.110082-45.465819-37.626885-54.872541-65.063156l-3.135573 0.783894c-48.601393 2.35168-97.202786-1.567787-145.80418 0.783893a105.825614 105.825614 0 0 0-30.963791 7.055041 99.005741 99.005741 0 0 0-62.711475 91.401975V470.649621h241.439179v-1.254229c4.703361-12.542295 10.974508-24.143918 19.597336-34.334533 9.406721-11.758402 21.165123-21.400291 34.491311-28.612111 15.677869-7.838934 32.139631-12.542295 49.385287-13.326188 56.440328-1.567787 112.880655-1.567787 168.53709 0l17.559213 2.35168c13.326188 3.135574 25.868484 7.838934 37.626885 14.893976 36.451045 22.73291 58.478451 64.279262 56.440327 106.609507-0.783893 11.758402-3.135574 23.516803-7.055041 34.491312a118.916635 118.916635 0 0 1-54.480594 63.495368c-15.677869 8.622828-32.139631 12.542295-49.855622 14.110082-54.480594 1.567787-108.961188 0.783893-163.363393 0.783894-19.597336 0-38.410779-4.703361-55.656434-14.110082a119.151803 119.151803 0 0 1-54.245426-64.279262H629.254912c0 73.685983-2.665238 147.371967 0.156778 220.274056a96.73245 96.73245 0 0 0 9.485111 37.626885c10.504172 21.949016 29.396004 39.978565 52.207303 48.601394 9.406721 3.919467 20.381229 6.271148 30.571844 7.05504 47.033606 2.35168 94.851106 0.783893 141.884713 0.783894 1.567787 0 3.919467 0 6.271147 0.548725l0.783894-1.802955a115.624282 115.624282 0 0 1 54.088647-62.711475c15.677869-8.38766 32.139631-12.542295 50.16918-14.110082 56.440328-1.17584 112.096762-1.17584 168.53709 0 6.271148 0.783893 11.758402 1.25423 17.245655 2.351681 13.326188 2.900406 25.868484 7.838934 36.842992 14.893975a117.740795 117.740795 0 0 1-4.703361 203.812294c-15.677869 8.622828-32.688356 12.542295-50.16918 14.110082-54.480594 1.097451-108.961188 0-163.049835 0a124.639057 124.639057 0 0 1-55.656435-14.110082c-25.868484-14.110082-45.465819-37.626885-54.87254-65.063155l-3.135574 0.783893c-48.601393 1.567787-97.202786 0.783893-145.569012 0-20.381229-0.783893-40.762459-4.703361-60.359795-12.542295a177.630253 177.630253 0 0 1-111.0777-164.304065V549.038965c-54.872541 0-109.431524 1.332619-164.147286 1.567787-4.546582 12.385516-10.974508 23.90875-19.597336 34.020975-9.406721 11.758402-21.165123 21.400291-34.491312 28.612111-15.677869 7.838934-32.531578 12.542295-50.16918 13.326188-54.088647 1.567787-108.961188 0-163.049835 0-19.597336-0.783893-38.410779-5.487254-55.656434-14.110082a120.71959 120.71959 0 0 1-61.300467-109.745081c0.783893-11.758402 3.135574-23.516803 7.055041-34.491312 4.703361-12.542295 11.758402-24.300697 19.597336-34.491311 10.190615-11.758402 21.949016-21.165123 35.275204-29.004057 15.677869-8.622828 32.453188-12.542295 50.169181-14.110082 56.440328-1.567787 112.880655-1.567787 168.772257 0 6.271148 0 11.758402 0.783893 18.029549 1.567787 13.326188 2.35168 25.868484 7.055041 37.626885 14.110082 23.516803 14.110082 40.762459 36.059098 49.620455 61.143688H550.865568c0-73.685983-0.783893-146.588073 0-220.274057L551.649461 235.481589a177.316696 177.316696 0 0 1 114.762-147.999081 178.727704 178.727704 0 0 1 56.283549-10.73934C769.963784 78.467733 817.154169 78.702901 864.422943 78.702901c2.194902 0 4.311414 0.313557 6.427927 0.783894zM982.477295 862.596341a40.60568 40.60568 0 0 0-29.474393 12.855852 41.703131 41.703131 0 0 0-7.838934 12.855853c-6.271148 17.480824 0.783893 37.391717 16.461762 47.033606a39.978565 39.978565 0 0 0 18.343106 5.487254c53.618311 1.411008 107.236623 1.411008 160.854934 0a38.410779 38.410779 0 0 0 34.804869-25.554926 39.900176 39.900176 0 0 0-16.461762-47.033606 39.978565 39.978565 0 0 0-18.343107-5.487255c-52.756028-1.411008-105.512057-0.156779-158.346475-0.156778z m0-391.94672a40.60568 40.60568 0 0 0-29.474393 12.855852 41.703131 41.703131 0 0 0-7.838934 12.855853c-6.271148 17.480824 0.783893 37.391717 16.461762 47.033606a39.978565 39.978565 0 0 0 18.343106 5.487254c53.618311 1.411008 107.236623 1.411008 160.854934 0a38.410779 38.410779 0 0 0 34.804869-25.554926 39.900176 39.900176 0 0 0-16.461762-47.033606 39.978565 39.978565 0 0 0-18.343107-5.487254C1088.067742 469.238613 1035.311713 470.649621 982.477295 470.649621z m0-391.94672a40.60568 40.60568 0 0 0-29.474393 12.855853 41.703131 41.703131 0 0 0-7.838934 12.855852c-6.271148 17.480824 0.783893 37.391717 16.461762 47.033607a39.978565 39.978565 0 0 0 18.343106 5.487254c53.618311 1.411008 107.236623 1.411008 160.854934 0a38.410779 38.410779 0 0 0 34.804869-25.554927 39.900176 39.900176 0 0 0-16.461762-47.033606 39.978565 39.978565 0 0 0-18.343107-5.487254C1088.067742 77.291893 1035.311713 78.702901 982.477295 78.702901z" fill="" p-id="2625"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743389839319" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4565" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M332.799002 686.081014m-332.799002 0a332.799002 332.799002 0 1 0 665.598003 0 332.799002 332.799002 0 1 0-665.598003 0Z" fill="#DFDFF2" p-id="4566"></path><path d="M290.559128 595.969284l20.991937-25.599923a87.551737 87.551737 0 0 0 60.15982 25.599923c27.391918 0 42.751872-12.799962 42.751872-31.999904s-15.359954-27.135919-36.351891-36.351891l-31.231907-13.567959a65.023805 65.023805 0 0 1-46.079861-59.135823 67.071799 67.071799 0 0 1 74.239777-62.207813 96.76771 96.76771 0 0 1 68.351795 28.671914l-18.687944 22.783932a71.935784 71.935784 0 0 0-49.663851-20.22394c-23.039931 0-38.143886 11.007967-38.143886 29.183913s18.175945 25.599923 36.60789 34.047897l30.975908 13.311961A62.975811 62.975811 0 0 1 450.302649 563.201382c0 36.351891-29.95191 65.791803-79.615761 65.791803a112.639662 112.639662 0 0 1-80.12776-33.023901zM462.846611 399.105875h37.887887l33.535899 116.991649c7.679977 25.599923 12.543962 47.871856 20.479939 73.983778h1.535995c7.679977-25.599923 13.31196-48.127856 20.479939-73.983778l33.535899-116.991649h36.351891l-70.655788 226.047322h-42.239873zM659.96602 512.001536c0-73.727779 45.567863-118.015646 105.215684-118.015646a90.11173 90.11173 0 0 1 67.327798 28.671914l-19.455941 22.783932a61.183816 61.183816 0 0 0-46.59186-20.22394c-41.983874 0-70.14379 32.511902-70.14379 85.759743s25.599923 86.52774 71.423786 86.52774a56.063832 56.063832 0 0 0 35.583893-11.007966v-52.479843h-44.543866v-29.183913h76.799769v98.047706a102.399693 102.399693 0 0 1-71.423785 25.599924c-60.15982 0.767998-104.191687-41.727875-104.191688-116.479651z" fill="#434260" p-id="4567"></path><path d="M883.19735 1024h-639.99808A141.055577 141.055577 0 0 1 102.399693 883.200422v-742.397772A141.055577 141.055577 0 0 1 243.19927 0.003072h516.350451a89.087733 89.087733 0 0 1 63.231811 25.599923l189.695431 189.695431A38.399885 38.399885 0 0 1 1023.996928 243.202342v639.99808a141.055577 141.055577 0 0 1-140.799578 140.799578zM243.19927 76.802842A63.999808 63.999808 0 0 0 179.199462 140.80265v742.397772A63.999808 63.999808 0 0 0 243.19927 947.20023h639.99808a63.999808 63.999808 0 0 0 63.999808-63.999808V259.074295l-179.199462-179.199463a12.799962 12.799962 0 0 0-8.447975-3.07199z" fill="#434260" p-id="4568"></path></svg>
\ No newline at end of file
... ...
... ... @@ -144,6 +144,10 @@ const cn = {
Title: "分享页面",
Error: "分享失败",
},
Mind: {
ExportPng: "导出为PNG图片",
ExportSvg: "导出为SVG",
},
},
Select: {
Search: "搜索消息",
... ...
... ... @@ -49,7 +49,7 @@
"lucide-react": "^0.484.0",
"markdown-to-txt": "^2.0.1",
"mermaid": "^10.6.1",
"mind-elixir": "^4.4.3",
"mind-elixir": "^4.5.0",
"nanoid": "^5.0.3",
"next": "^14.1.1",
"node-fetch": "^3.3.1",
... ...
... ... @@ -7504,10 +7504,10 @@ min-indent@^1.0.0:
resolved "https://registry.npmmirror.com/min-indent/-/min-indent-1.0.1.tgz"
integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
mind-elixir@^4.4.3:
version "4.4.3"
resolved "https://registry.npmmirror.com/mind-elixir/-/mind-elixir-4.4.3.tgz#bef5650a29276856bef089bc54576048c87eeabd"
integrity sha512-i2GBFtZ4Z6pv5z5/QcfQFrbVTNa0OWayfx7OvQpzNn7X62l6xJn0y3dKxQ/KuT50HxgZiyRptY5J0xBc2qeuZw==
mind-elixir@^4.5.0:
version "4.5.0"
resolved "https://registry.npmmirror.com/mind-elixir/-/mind-elixir-4.5.0.tgz#e9cc9dca9e93a22777f5bb83096ba40dd0accd37"
integrity sha512-EyodIX7CK1d3Rq0urT91suZwVGHz7XegfcRiEVVFQfc952gW0xTU9Z5gaEQ4Iukwte5Sex6lOKgyxH8iGp/Puw==
minimalistic-assert@^1.0.1:
version "1.0.1"
... ...