Compare commits

..

29 Commits
0.9.2 ... 0.9.3

Author SHA1 Message Date
街角小林
3593990f9b 打包0.9.3 2024-01-05 14:51:48 +08:00
街角小林
eec99c1c43 Doc: update 2024-01-05 14:47:05 +08:00
街角小林
06a777eb64 Merge branch 'feature' into main 2024-01-05 13:51:20 +08:00
街角小林
e3cb7b0a6b Fix:修复导出图片时节点连线的箭头、关联线的箭头、渐变背景丢失的问题 2024-01-05 13:50:05 +08:00
街角小林
163ae6caae Feat:优化节点渐变背景逻辑 2024-01-05 12:19:52 +08:00
街角小林
78d677a00c Merge pull request #510 from lxr-cel/main
Feature: 节点渐变色背景功能实现
2024-01-05 11:06:34 +08:00
街角小林
3a1615f041 Merge pull request #508 from HappyYang233/feature_compatible_qiankun
兼容微前端框架子应用使用此框架时,new MouseEvent函数,view字段取得proxyWindow导致构造失败的问题
2024-01-05 09:16:18 +08:00
街角小林
166f2e0a73 Doc: update 2024-01-05 09:14:30 +08:00
lxr-cel
c62089adb9 节点渐变色web示例更新 2024-01-04 23:37:27 +08:00
lxr-cel
130acff77c 节点渐变色功能实现 2024-01-04 23:36:22 +08:00
lxr-cel
c4713097a0 节点渐变色web示例更新 2024-01-04 23:28:19 +08:00
lxr-cel
c50f278ec1 Merge branch 'wanglin2:main' into main 2024-01-04 22:33:31 +08:00
lxr-cel
9af630e578 节点背景渐变色实现 2024-01-04 22:21:53 +08:00
街角小林
541606b2eb Feat:新增节点数据更新明细事件 2024-01-04 09:39:44 +08:00
HappyYang233
0784eab6d1 兼容微前端框架子应用使用此框架时,new MouseEvent函数,view字段取得proxyWindow导致构造失败的问题 2024-01-03 19:26:10 +08:00
街角小林
1ad1538699 库不再导入katex的css文件,由使用方导入 2024-01-03 18:04:19 +08:00
街角小林
a488b436ee 打包库时自动更新版本号 2024-01-03 17:56:35 +08:00
街角小林
3a6a2544b2 Doc: update 2024-01-03 17:29:22 +08:00
wanglin2
1bb7e431fb Demo:代码优化 2023-12-29 22:04:56 +08:00
wanglin2
0cfa21d4e6 Feat:增加对节点非富文本编辑时的粘贴的拦截操作 2023-12-29 22:02:15 +08:00
街角小林
1409b07fb3 Feat:节点富文本编辑中,如果粘贴的是smm格式的数据,那么取出第一个节点的纯文本进行粘贴 2023-12-29 17:46:58 +08:00
街角小林
c0fb1e8db8 Demo:公式katex库的配置从simple-mind-map库中获取 2023-12-29 16:48:23 +08:00
街角小林
eb50b70214 Fix:修复Chrome低版本公式无法渲染的问题 2023-12-29 16:47:30 +08:00
wanglin2
794d3e9a53 Fix:修复safari浏览器节点存在图标时文字位置错位的问题 2023-12-28 21:36:45 +08:00
街角小林
f087b7102e Fix:优化节点存在超链接、备注时在firefox浏览器中导出图片的宽高不之前的问题 2023-12-28 18:49:31 +08:00
街角小林
ee97731e18 Feat:设置节点文本命令的第二个参数如果没有传递,会使用之前的值 2023-12-28 17:30:58 +08:00
街角小林
7196c37e9a Doc: update 2023-12-28 09:27:43 +08:00
街角小林
2a85a03889 Feat:导出pdf从jspdf库改为pdf-lib库 2023-12-28 09:27:34 +08:00
街角小林
8b99a6c191 Doc: update 2023-12-27 09:57:25 +08:00
155 changed files with 1213 additions and 1127 deletions

View File

@@ -7,7 +7,7 @@
[![GitHub forks](https://img.shields.io/github/forks/wanglin2/mind-map)](https://github.com/wanglin2/mind-map/network/members)
![license](https://img.shields.io/npm/l/express.svg)
> 一个简单&强大的Web思维导图
> 一个简单&强大的 Web 思维导图
本项目包含两部分:
@@ -27,6 +27,8 @@ Github[releases](https://github.com/wanglin2/mind-map/releases)。
> 客户端版本会落后于在线版本,尝试最新功能请优先使用在线版。
> 如果访问 github 比较慢可以使用http://lxqnsys.com/simple-mind-map/#/index
# 特性
- [x] 插件化架构,除核心功能外,其他功能作为插件提供,按需使用,减小打包体积
@@ -35,7 +37,7 @@ Github[releases](https://github.com/wanglin2/mind-map/releases)。
- [x] 节点内容支持文本(普通文本、富文本)、图片、图标、超链接、备注、标签、概要、数学公式
- [x] 节点支持拖拽(拖拽移动、自由调整)、多种节点形状,支持使用 DDM 完全自定义节点内容
- [x] 支持画布拖动、缩放
- [x] 支持鼠标按键拖动选择和Ctrl+左键两种多选节点方式
- [x] 支持鼠标按键拖动选择和 Ctrl+左键两种多选节点方式
- [x] 支持导出为`json``png``svg``pdf``markdown``xmind`,支持从`json``xmind``markdown`导入
- [x] 支持快捷键、前进后退、关联线、搜索替换、小地图、水印、滚动条
- [x] 提供丰富的配置,满足各种场景各种使用习惯
@@ -49,7 +51,7 @@ npm i simple-mind-map
# 使用
提供一个宽高不为0的容器元素:
提供一个宽高不为 0 的容器元素:
```html
<div id="mindMapContainer"></div>
@@ -70,13 +72,13 @@ npm i simple-mind-map
import MindMap from "simple-mind-map";
const mindMap = new MindMap({
el: document.getElementById('mindMapContainer'),
el: document.getElementById("mindMapContainer"),
data: {
"data": {
"text": "根节点"
data: {
text: "根节点",
},
"children": []
}
children: [],
},
});
```
@@ -242,4 +244,12 @@ const mindMap = new MindMap({
<img src="./web/src/assets/avatar/继龙.jpg" style="width: 50px;height: 50px;" />
<span>继龙</span>
</span>
</p>
<span>
<img src="./web/src/assets/avatar/欣.jpg" style="width: 50px;height: 50px;" />
<span>欣</span>
</span>
<span>
<img src="./web/src/assets/avatar/default.png" style="width: 50px;height: 50px;" />
<span>易空小易</span>
</span>
</p>

File diff suppressed because one or more lines are too long

BIN
dist/fonts/KaTeX_AMS-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_AMS-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_AMS-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Caligraphic-Bold.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Caligraphic-Bold.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Caligraphic-Bold.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Caligraphic-Regular.ttf vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Bold.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Bold.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Bold.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Fraktur-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Bold.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Bold.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Bold.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-BoldItalic.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-BoldItalic.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-BoldItalic.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Italic.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Italic.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Italic.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Main-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-BoldItalic.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-BoldItalic.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-BoldItalic.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-Italic.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-Italic.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Math-Italic.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Bold.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Bold.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Bold.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Italic.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Italic.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Italic.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_SansSerif-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Script-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Script-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Script-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size1-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size1-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size1-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size2-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size2-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size2-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size3-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size3-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size4-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size4-Regular.woff vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Size4-Regular.woff2 vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Typewriter-Regular.ttf vendored Normal file

Binary file not shown.

BIN
dist/fonts/KaTeX_Typewriter-Regular.woff vendored Normal file

Binary file not shown.

Binary file not shown.

BIN
dist/img/欣.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

2
dist/js/app.js vendored

File diff suppressed because one or more lines are too long

83
dist/js/chunk-1066cf58.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21e399"],{d53e:function(s,a,t){"use strict";t.r(a);var _=function(){var s=this;s._self._c;return s._m(0)},v=[function(){var s=this,a=s._self._c;return a("div",[a("h1",[s._v("Formula 插件")]),a("blockquote",[a("p",[s._v("v0.7.2+")])]),a("blockquote",[a("p",[s._v("该插件仅在富文本模式下支持所以需要在注册了RichText插件的前提下使用")])]),a("p",[s._v("该插件用于支持给节点插入公式。")]),a("blockquote",[a("p",[s._v("注意:公式是通过"),a("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[s._v("KaTeX")]),s._v("库实现的,"),a("code",[s._v("KaTeX")]),s._v("提供了一些配置,插件默认的一个配置是:")])]),a("pre",{staticClass:"hljs"},[a("code",[s._v("{\n "),a("span",{staticClass:"hljs-attr"},[s._v("output")]),s._v(": "),a("span",{staticClass:"hljs-string"},[s._v("'mathml'")]),s._v("\n}\n")])]),a("blockquote",[a("p",[s._v("这在少数浏览器上公式可能无法成功渲染,如果你需要兼容这部分浏览器,你可以考虑把该配置改为"),a("code",[s._v("html")]),s._v(",详细文档可以参考:"),a("a",{attrs:{href:"https://katex.org/docs/options"}},[s._v("Options")]),s._v("。使用这个配置可能还需要再引入"),a("code",[s._v("KaTeX")]),s._v("的样式文件,你可以自行测试。")])]),a("h2",[s._v("注册")]),a("pre",{staticClass:"hljs"},[a("code",[a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),a("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Formula "),a("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),a("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Formula.js'")]),s._v("\n\nMindMap.usePlugin(Formula)\n")])]),a("p",[s._v("注册完且实例化"),a("code",[s._v("MindMap")]),s._v("后可通过"),a("code",[s._v("mindMap.formula")]),s._v("获取到该实例。")]),a("h2",[s._v("使用")]),a("p",[s._v("注册了该插件后,可以使用命令"),a("code",[s._v("INSERT_FORMULA")]),s._v("来给节点插入指定公式:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.execCommand("),a("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),a("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(")\n")])]),a("p",[s._v("上述命令会给当前激活的节点插入"),a("code",[s._v("a^2")]),s._v("公式。")]),a("p",[s._v("如果要指定给某个或某些节点插入公式,可以传递第二个参数:")]),a("pre",{staticClass:"hljs"},[a("code",[s._v("mindMap.execCommand("),a("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),a("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(", [Node])\n")])]),a("p",[s._v("通过第二个参数传入指定的节点实例即可。")])])}],n={},l=n,e=t("2877"),i=Object(e["a"])(l,_,v,!1,null,null,null);a["default"]=i.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21e399"],{d53e:function(s,_,t){"use strict";t.r(_);var a=function(){var s=this;s._self._c;return s._m(0)},v=[function(){var s=this,_=s._self._c;return _("div",[_("h1",[s._v("Formula 插件")]),_("blockquote",[_("p",[s._v("v0.7.2+")])]),_("blockquote",[_("p",[s._v("该插件仅在富文本模式下支持所以需要在注册了RichText插件的前提下使用")])]),_("p",[s._v("该插件用于支持给节点插入公式。")]),_("blockquote",[_("p",[s._v("注意:公式是通过"),_("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[s._v("KaTeX")]),s._v("库实现的,"),_("code",[s._v("KaTeX")]),s._v("提供了一些配置,插件默认的一个配置是:")])]),_("pre",{staticClass:"hljs"},[_("code",[s._v("{\n "),_("span",{staticClass:"hljs-attr"},[s._v("output")]),s._v(": "),_("span",{staticClass:"hljs-string"},[s._v("'mathml'")]),s._v("\n}\n")])]),_("blockquote",[_("p",[s._v("这在少数浏览器上公式可能无法成功渲染,如果你需要兼容这部分浏览器,你可以考虑把该配置改为"),_("code",[s._v("html")]),s._v(",详细文档可以参考:"),_("a",{attrs:{href:"https://katex.org/docs/options"}},[s._v("Options")]),s._v("。使用这个配置可能还需要再引入"),_("code",[s._v("KaTeX")]),s._v("的样式文件,你可以自行测试。")])]),_("blockquote",[_("p",[s._v("v.0.9.3+版本内部会判断当前浏览器的Chrome内核版本是否低于100是的话会自动将"),_("code",[s._v("output")]),s._v("由"),_("code",[s._v("mathml")]),s._v("转为"),_("code",[s._v("html")]),s._v(",此时需要引入"),_("code",[s._v("KaTeX")]),s._v("的样式文件,库内部没有引入,所以需要你手动在项目中引入。如果你是通过"),_("code",[s._v("npm")]),s._v("方式引入"),_("code",[s._v("simple-mind-map")]),s._v(",那么你可以这么引入:")]),_("pre",{staticClass:"hljs"},[_("code",[_("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" "),_("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/node_modules/katex/dist/katex.min.css'")]),s._v("\n")])]),_("p",[s._v("如果你使用的是"),_("code",[s._v(".umd.js")]),s._v("、"),_("code",[s._v(".esm.js")]),s._v("之类的打包后的文件那么可以通过在线的CDN服务来引入比如"),_("code",[s._v("https://unpkg.com/browse/katex@0.16.9/dist/")]),s._v(",当然,最好是把"),_("code",[s._v("katex")]),s._v("的"),_("code",[s._v("css")]),s._v("文件,以及对应的"),_("code",[s._v("fonts")]),s._v("目录下的字体文件上传到你自己的服务器上。")])]),_("h2",[s._v("注册")]),_("pre",{staticClass:"hljs"},[_("code",[_("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),_("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),_("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),_("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Formula "),_("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),_("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Formula.js'")]),s._v("\n\nMindMap.usePlugin(Formula)\n")])]),_("p",[s._v("注册完且实例化"),_("code",[s._v("MindMap")]),s._v("后可通过"),_("code",[s._v("mindMap.formula")]),s._v("获取到该实例。")]),_("h2",[s._v("使用")]),_("p",[s._v("注册了该插件后,可以使用命令"),_("code",[s._v("INSERT_FORMULA")]),s._v("来给节点插入指定公式:")]),_("pre",{staticClass:"hljs"},[_("code",[s._v("mindMap.execCommand("),_("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),_("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(")\n")])]),_("p",[s._v("上述命令会给当前激活的节点插入"),_("code",[s._v("a^2")]),s._v("公式。")]),_("p",[s._v("如果要指定给某个或某些节点插入公式,可以传递第二个参数:")]),_("pre",{staticClass:"hljs"},[_("code",[s._v("mindMap.execCommand("),_("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),_("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(", [Node])\n")])]),_("p",[s._v("通过第二个参数传入指定的节点实例即可。")]),_("h2",[s._v("方法")]),_("h3",[s._v("getKatexConfig()")]),_("p",[s._v("获取当前传递给"),_("code",[s._v("Katex")]),s._v("的配置。")])])}],e={},o=e,n=t("2877"),c=Object(n["a"])(o,a,v,!1,null,null,null);_["default"]=c.exports}}]);

View File

@@ -1 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d229d67"],{dec3:function(s,t,e){"use strict";e.r(t);var a=function(){var s=this;s._self._c;return s._m(0)},n=[function(){var s=this,t=s._self._c;return t("div",[t("h1",[s._v("Formula plugin")]),t("blockquote",[t("p",[s._v("v0.7.2+")])]),t("blockquote",[t("p",[s._v("This plugin is only supported in rich text mode, so it needs to be used after registering the RichText plugin")])]),t("p",[s._v("This plugin is used to support inserting formulas into nodes.")]),t("blockquote",[t("p",[s._v("注意:公式是通过"),t("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[s._v("KaTeX")]),s._v("库实现的,"),t("code",[s._v("KaTeX")]),s._v("提供了一些配置,插件默认的一个配置是:")])]),t("blockquote",[t("p",[s._v("Note: The formula is implemented through the "),t("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[s._v("KaTeX")]),s._v(" library, and 'KaTeX' provides some configurations. The default configuration for the plugin is:")])]),t("pre",{staticClass:"hljs"},[t("code",[s._v("{\n "),t("span",{staticClass:"hljs-attr"},[s._v("output")]),s._v(": "),t("span",{staticClass:"hljs-string"},[s._v("'mathml'")]),s._v("\n}\n")])]),t("blockquote",[t("p",[s._v("This formula may not render successfully on a few browsers. If you need to be compatible with these browsers, you can consider changing the configuration to 'HTML'. For detailed documentation, please refer to "),t("a",{attrs:{href:"https://katex.org/docs/options"}},[s._v("Options")]),s._v(". Using this configuration may require the introduction of a 'KaTeX' style file, which you can test on your own.")])]),t("h2",[s._v("Register")]),t("pre",{staticClass:"hljs"},[t("code",[t("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" MindMap "),t("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),t("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map'")]),s._v("\n"),t("span",{staticClass:"hljs-keyword"},[s._v("import")]),s._v(" Formula "),t("span",{staticClass:"hljs-keyword"},[s._v("from")]),s._v(" "),t("span",{staticClass:"hljs-string"},[s._v("'simple-mind-map/src/plugins/Formula.js'")]),s._v("\n\nMindMap.usePlugin(Formula)\n")])]),t("p",[s._v("After registration and instantiation of "),t("code",[s._v("MindMap")]),s._v(", the instance can be obtained through "),t("code",[s._v("mindMap.formula")]),s._v(".")]),t("h2",[s._v("Usage")]),t("p",[s._v("After registering the plugin, you can use the command 'INSERT_FORMULA' to insert the specified formula for the node:")]),t("pre",{staticClass:"hljs"},[t("code",[s._v("mindMap.execCommand("),t("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),t("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(")\n")])]),t("p",[s._v("The above command will insert the 'a^2' formula into the currently active node.")]),t("p",[s._v("If you want to assign a formula to a node or nodes, you can pass the second parameter:")]),t("pre",{staticClass:"hljs"},[t("code",[s._v("mindMap.execCommand("),t("span",{staticClass:"hljs-string"},[s._v("'INSERT_FORMULA'")]),s._v(", "),t("span",{staticClass:"hljs-string"},[s._v("'a^2'")]),s._v(", [Node])\n")])]),t("p",[s._v("Pass in the specified node instance through the second parameter.")])])}],o={},i=o,r=e("2877"),l=Object(r["a"])(i,a,n,!1,null,null,null);t["default"]=l.exports}}]);
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d229d67"],{dec3:function(t,e,s){"use strict";s.r(e);var o=function(){var t=this;t._self._c;return t._m(0)},a=[function(){var t=this,e=t._self._c;return e("div",[e("h1",[t._v("Formula plugin")]),e("blockquote",[e("p",[t._v("v0.7.2+")])]),e("blockquote",[e("p",[t._v("This plugin is only supported in rich text mode, so it needs to be used after registering the RichText plugin")])]),e("p",[t._v("This plugin is used to support inserting formulas into nodes.")]),e("blockquote",[e("p",[t._v("注意:公式是通过"),e("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[t._v("KaTeX")]),t._v("库实现的,"),e("code",[t._v("KaTeX")]),t._v("提供了一些配置,插件默认的一个配置是:")])]),e("blockquote",[e("p",[t._v("Note: The formula is implemented through the "),e("a",{attrs:{href:"https://github.com/KaTeX/KaTeX"}},[t._v("KaTeX")]),t._v(" library, and 'KaTeX' provides some configurations. The default configuration for the plugin is:")])]),e("pre",{staticClass:"hljs"},[e("code",[t._v("{\n "),e("span",{staticClass:"hljs-attr"},[t._v("output")]),t._v(": "),e("span",{staticClass:"hljs-string"},[t._v("'mathml'")]),t._v("\n}\n")])]),e("blockquote",[e("p",[t._v("This formula may not render successfully on a few browsers. If you need to be compatible with these browsers, you can consider changing the configuration to 'HTML'. For detailed documentation, please refer to "),e("a",{attrs:{href:"https://katex.org/docs/options"}},[t._v("Options")]),t._v(". Using this configuration may require the introduction of a 'KaTeX' style file, which you can test on your own.")])]),e("blockquote",[e("p",[t._v("v0.9.3+will internally determine whether the current Chrome kernel version of the browser is lower than 100, If so, it will automatically convert 'output' from 'mathml' to 'html', At this point, the style file for 'KaTeX' needs to be imported, but it is not imported within the library, so you need to manually import it in the project. If you introduced 'simple-mind-map' through the 'npm' method, you can introduce it as follows:")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-keyword"},[t._v("import")]),t._v(" "),e("span",{staticClass:"hljs-string"},[t._v("'simple-mind-map/node_modules/katex/dist/katex.min.css'")]),t._v("\n")])]),e("p",[t._v("If you are using packaged files such as '.umd.js' or '.esm.js', you can import them through online CDN services, such as "),e("code",[t._v("https://unpkg.com/browse/katex@0.16.9/dist/")]),t._v(", Of course, it is best to upload the 'css' file of the 'katex' and the corresponding font files in the 'fonts' directory to your own server.")])]),e("h2",[t._v("Register")]),e("pre",{staticClass:"hljs"},[e("code",[e("span",{staticClass:"hljs-keyword"},[t._v("import")]),t._v(" MindMap "),e("span",{staticClass:"hljs-keyword"},[t._v("from")]),t._v(" "),e("span",{staticClass:"hljs-string"},[t._v("'simple-mind-map'")]),t._v("\n"),e("span",{staticClass:"hljs-keyword"},[t._v("import")]),t._v(" Formula "),e("span",{staticClass:"hljs-keyword"},[t._v("from")]),t._v(" "),e("span",{staticClass:"hljs-string"},[t._v("'simple-mind-map/src/plugins/Formula.js'")]),t._v("\n\nMindMap.usePlugin(Formula)\n")])]),e("p",[t._v("After registration and instantiation of "),e("code",[t._v("MindMap")]),t._v(", the instance can be obtained through "),e("code",[t._v("mindMap.formula")]),t._v(".")]),e("h2",[t._v("Usage")]),e("p",[t._v("After registering the plugin, you can use the command 'INSERT_FORMULA' to insert the specified formula for the node:")]),e("pre",{staticClass:"hljs"},[e("code",[t._v("mindMap.execCommand("),e("span",{staticClass:"hljs-string"},[t._v("'INSERT_FORMULA'")]),t._v(", "),e("span",{staticClass:"hljs-string"},[t._v("'a^2'")]),t._v(")\n")])]),e("p",[t._v("The above command will insert the 'a^2' formula into the currently active node.")]),e("p",[t._v("If you want to assign a formula to a node or nodes, you can pass the second parameter:")]),e("pre",{staticClass:"hljs"},[e("code",[t._v("mindMap.execCommand("),e("span",{staticClass:"hljs-string"},[t._v("'INSERT_FORMULA'")]),t._v(", "),e("span",{staticClass:"hljs-string"},[t._v("'a^2'")]),t._v(", [Node])\n")])]),e("p",[t._v("Pass in the specified node instance through the second parameter.")]),e("h2",[t._v("Methods")]),e("h3",[t._v("getKatexConfig()")]),e("p",[t._v("Get the current configuration passed to "),e("code",[t._v("Katex")]),t._v(".")])])}],n={},i=n,r=s("2877"),l=Object(r["a"])(i,o,a,!1,null,null,null);e["default"]=l.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/js/chunk-76a82238.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><link rel="icon" href="dist/logo.ico"><title>思绪思维导图</title><script>// 自定义静态资源的路径
window.externalPublicPath = './dist/'
// 接管应用
window.takeOverApp = false</script><link href="dist/css/chunk-vendors.css?dc223b3a0a24b7dd7194" rel="stylesheet"><link href="dist/css/app.css?dc223b3a0a24b7dd7194" rel="stylesheet"></head><body><noscript><strong>We're sorry but thoughts doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script>const getDataFromBackend = () => {
window.takeOverApp = false</script><link href="dist/css/chunk-vendors.css?b288d0464b34253181aa" rel="stylesheet"><link href="dist/css/app.css?b288d0464b34253181aa" rel="stylesheet"></head><body><noscript><strong>We're sorry but thoughts doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script>const getDataFromBackend = () => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve({
@@ -66,4 +66,4 @@
// 可以通过window.$bus.$on()来监听应用的一些事件
// 实例化页面
window.initApp()
}</script><script src="dist/js/chunk-vendors.js?dc223b3a0a24b7dd7194"></script><script src="dist/js/app.js?dc223b3a0a24b7dd7194"></script></body></html>
}</script><script src="dist/js/chunk-vendors.js?b288d0464b34253181aa"></script><script src="dist/js/app.js?b288d0464b34253181aa"></script></body></html>

View File

@@ -28,6 +28,7 @@ MindMap.iconList = icons.nodeIconList
MindMap.constants = constants
MindMap.themes = themes
MindMap.defaultTheme = defaultTheme
MindMap.version = '0.9.3'
MindMap.usePlugin(MiniMap)
.usePlugin(Watermark)

View File

@@ -438,14 +438,22 @@ class MindMap {
}
// 添加必要的样式
clone.add(SVG(`<style>${cssContent}</style>`))
// 修正关联线箭头marker的id
const markerList = svg.find('marker')
if (markerList && markerList.length > 0) {
const id = markerList[0].attr('id')
clone.find('marker').forEach(item => {
item.attr('id', id)
})
}
// 修正defs里定义的元素的id因为clone时defs里的元素的id会继续递增导致和内容中引用的id对不上
const defs = svg.find('defs')
const defs2 = clone.find('defs')
defs.forEach((def, defIndex) => {
const def2 = defs2[defIndex]
if (!def2) return
const children = def.children()
const children2 = def2.children()
for (let i = 0; i < children.length; i++) {
const child = children[i]
const child2 = children2[i]
if (child && child2) {
child2.attr('id', child.attr('id'))
}
}
})
// 恢复原先的大小和变换信息
svg.size(origWidth, origHeight)
draw.transform(origTransform)

View File

@@ -1,20 +1,20 @@
{
"name": "simple-mind-map",
"version": "0.9.1",
"version": "0.9.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",
"dependencies": {
"@svgdotjs/svg.js": "^3.0.16",
"deepmerge": "^1.5.2",
"eventemitter3": "^4.0.7",
"jspdf": "^2.5.1",
"jszip": "^3.10.1",
"katex": "^0.16.8",
"mdast-util-from-markdown": "^1.3.0",
"pdf-lib": "^1.17.1",
"quill": "^1.3.6",
"tern": "^0.24.3",
"uuid": "^9.0.0",
@@ -27,17 +27,6 @@
"prettier": "^2.7.1"
}
},
"node_modules/@babel/runtime": {
"version": "7.23.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz",
"integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==",
"dependencies": {
"regenerator-runtime": "^0.14.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@eslint/eslintrc": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz",
@@ -129,6 +118,22 @@
"node": ">= 8"
}
},
"node_modules/@pdf-lib/standard-fonts": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0.tgz",
"integrity": "sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA==",
"dependencies": {
"pako": "^1.0.6"
}
},
"node_modules/@pdf-lib/upng": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@pdf-lib/upng/-/upng-1.0.1.tgz",
"integrity": "sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==",
"dependencies": {
"pako": "^1.0.10"
}
},
"node_modules/@svgdotjs/svg.js": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@svgdotjs/svg.js/-/svg.js-3.1.2.tgz",
@@ -159,12 +164,6 @@
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz",
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="
},
"node_modules/@types/raf": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.3.tgz",
"integrity": "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==",
"optional": true
},
"node_modules/@types/unist": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz",
@@ -267,31 +266,11 @@
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
},
"node_modules/atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
"bin": {
"atob": "bin/atob.js"
},
"engines": {
"node": ">= 4.5.0"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"node_modules/base64-arraybuffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
"optional": true,
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -320,17 +299,6 @@
"concat-map": "0.0.1"
}
},
"node_modules/btoa": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
"integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==",
"bin": {
"btoa": "bin/btoa.js"
},
"engines": {
"node": ">= 0.4.0"
}
},
"node_modules/buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
@@ -375,31 +343,6 @@
"node": ">=6"
}
},
"node_modules/canvg": {
"version": "3.0.10",
"resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz",
"integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==",
"optional": true,
"dependencies": {
"@babel/runtime": "^7.12.5",
"@types/raf": "^3.4.0",
"core-js": "^3.8.3",
"raf": "^3.4.1",
"regenerator-runtime": "^0.13.7",
"rgbcolor": "^1.0.1",
"stackblur-canvas": "^2.0.0",
"svg-pathdata": "^6.0.3"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/canvg/node_modules/regenerator-runtime": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
"optional": true
},
"node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
@@ -464,17 +407,6 @@
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"node_modules/core-js": {
"version": "3.33.3",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.3.tgz",
"integrity": "sha512-lo0kOocUlLKmm6kv/FswQL8zbkH7mVsLJ/FULClOhv8WRVmKLVcs6XPNQAzstfeJTCHMyButEwG+z1kHxHoDZw==",
"hasInstallScript": true,
"optional": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/core-js"
}
},
"node_modules/core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
@@ -494,15 +426,6 @@
"node": ">= 8"
}
},
"node_modules/css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
"optional": true,
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -604,12 +527,6 @@
"node": ">=6.0.0"
}
},
"node_modules/dompurify": {
"version": "2.4.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz",
"integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ==",
"optional": true
},
"node_modules/enhanced-resolve": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-2.3.0.tgz",
@@ -858,11 +775,6 @@
"reusify": "^1.0.4"
}
},
"node_modules/fflate": {
"version": "0.4.8",
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz",
"integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA=="
},
"node_modules/file-entry-cache": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -1059,19 +971,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/html2canvas": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz",
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
"optional": true,
"dependencies": {
"css-line-break": "^2.1.0",
"text-segmentation": "^1.0.3"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
@@ -1272,23 +1171,6 @@
"integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
"dev": true
},
"node_modules/jspdf": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.5.1.tgz",
"integrity": "sha512-hXObxz7ZqoyhxET78+XR34Xu2qFGrJJ2I2bE5w4SM8eFaFEkW2xcGRVUss360fYelwRSid/jT078kbNvmoW0QA==",
"dependencies": {
"@babel/runtime": "^7.14.0",
"atob": "^2.1.2",
"btoa": "^1.2.1",
"fflate": "^0.4.8"
},
"optionalDependencies": {
"canvg": "^3.0.6",
"core-js": "^3.6.0",
"dompurify": "^2.2.0",
"html2canvas": "^1.0.0-rc.5"
}
},
"node_modules/jszip": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz",
@@ -2014,11 +1896,16 @@
"node": ">=8"
}
},
"node_modules/performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==",
"optional": true
"node_modules/pdf-lib": {
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/pdf-lib/-/pdf-lib-1.17.1.tgz",
"integrity": "sha512-V/mpyJAoTsN4cnP31vc0wfNA1+p20evqqnap0KLoRUN0Yk/p3wN52DOEsL4oBFcLdb76hlpKPtzJIgo67j/XLw==",
"dependencies": {
"@pdf-lib/standard-fonts": "^1.0.0",
"@pdf-lib/upng": "^1.0.1",
"pako": "^1.0.11",
"tslib": "^1.11.1"
}
},
"node_modules/prelude-ls": {
"version": "1.2.1",
@@ -2113,15 +2000,6 @@
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz",
"integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg=="
},
"node_modules/raf": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
"integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
"optional": true,
"dependencies": {
"performance-now": "^2.1.0"
}
},
"node_modules/randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@@ -2144,11 +2022,6 @@
"util-deprecate": "~1.0.1"
}
},
"node_modules/regenerator-runtime": {
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
"integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="
},
"node_modules/regexp.prototype.flags": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz",
@@ -2196,15 +2069,6 @@
"node": ">=0.10.0"
}
},
"node_modules/rgbcolor": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz",
"integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==",
"optional": true,
"engines": {
"node": ">= 0.8.15"
}
},
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -2331,15 +2195,6 @@
"node": ">= 6"
}
},
"node_modules/stackblur-canvas": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.6.0.tgz",
"integrity": "sha512-8S1aIA+UoF6erJYnglGPug6MaHYGo1Ot7h5fuXx4fUPvcvQfcdw2o/ppCse63+eZf8PPidSu4v1JnmEVtEDnpg==",
"optional": true,
"engines": {
"node": ">=0.1.14"
}
},
"node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -2384,15 +2239,6 @@
"node": ">=8"
}
},
"node_modules/svg-pathdata": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz",
"integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==",
"optional": true,
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/tapable": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.9.tgz",
@@ -2437,21 +2283,17 @@
"node": ">=0.10.0"
}
},
"node_modules/text-segmentation": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
"optional": true,
"dependencies": {
"utrie": "^1.0.2"
}
},
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
"integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
"dev": true
},
"node_modules/tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@@ -2502,15 +2344,6 @@
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"node_modules/utrie": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
"optional": true,
"dependencies": {
"base64-arraybuffer": "^1.0.2"
}
},
"node_modules/uuid": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
@@ -2670,14 +2503,6 @@
}
},
"dependencies": {
"@babel/runtime": {
"version": "7.23.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz",
"integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==",
"requires": {
"regenerator-runtime": "^0.14.0"
}
},
"@eslint/eslintrc": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz",
@@ -2744,6 +2569,22 @@
"fastq": "^1.6.0"
}
},
"@pdf-lib/standard-fonts": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0.tgz",
"integrity": "sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA==",
"requires": {
"pako": "^1.0.6"
}
},
"@pdf-lib/upng": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@pdf-lib/upng/-/upng-1.0.1.tgz",
"integrity": "sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==",
"requires": {
"pako": "^1.0.10"
}
},
"@svgdotjs/svg.js": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@svgdotjs/svg.js/-/svg.js-3.1.2.tgz",
@@ -2770,12 +2611,6 @@
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz",
"integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA=="
},
"@types/raf": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.3.tgz",
"integrity": "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==",
"optional": true
},
"@types/unist": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz",
@@ -2847,22 +2682,11 @@
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"dev": true
},
"atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
},
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"base64-arraybuffer": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
"optional": true
},
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -2877,11 +2701,6 @@
"concat-map": "0.0.1"
}
},
"btoa": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
"integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g=="
},
"buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
@@ -2906,30 +2725,6 @@
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"dev": true
},
"canvg": {
"version": "3.0.10",
"resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz",
"integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==",
"optional": true,
"requires": {
"@babel/runtime": "^7.12.5",
"@types/raf": "^3.4.0",
"core-js": "^3.8.3",
"raf": "^3.4.1",
"regenerator-runtime": "^0.13.7",
"rgbcolor": "^1.0.1",
"stackblur-canvas": "^2.0.0",
"svg-pathdata": "^6.0.3"
},
"dependencies": {
"regenerator-runtime": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==",
"optional": true
}
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
@@ -2975,12 +2770,6 @@
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"core-js": {
"version": "3.33.3",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.3.tgz",
"integrity": "sha512-lo0kOocUlLKmm6kv/FswQL8zbkH7mVsLJ/FULClOhv8WRVmKLVcs6XPNQAzstfeJTCHMyButEwG+z1kHxHoDZw==",
"optional": true
},
"core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
@@ -2997,15 +2786,6 @@
"which": "^2.0.1"
}
},
"css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
"optional": true,
"requires": {
"utrie": "^1.0.2"
}
},
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -3074,12 +2854,6 @@
"esutils": "^2.0.2"
}
},
"dompurify": {
"version": "2.4.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.4.7.tgz",
"integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ==",
"optional": true
},
"enhanced-resolve": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-2.3.0.tgz",
@@ -3273,11 +3047,6 @@
"reusify": "^1.0.4"
}
},
"fflate": {
"version": "0.4.8",
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz",
"integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA=="
},
"file-entry-cache": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -3420,16 +3189,6 @@
"has-symbols": "^1.0.2"
}
},
"html2canvas": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz",
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
"optional": true,
"requires": {
"css-line-break": "^2.1.0",
"text-segmentation": "^1.0.3"
}
},
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
@@ -3566,21 +3325,6 @@
"integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
"dev": true
},
"jspdf": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.5.1.tgz",
"integrity": "sha512-hXObxz7ZqoyhxET78+XR34Xu2qFGrJJ2I2bE5w4SM8eFaFEkW2xcGRVUss360fYelwRSid/jT078kbNvmoW0QA==",
"requires": {
"@babel/runtime": "^7.14.0",
"atob": "^2.1.2",
"btoa": "^1.2.1",
"canvg": "^3.0.6",
"core-js": "^3.6.0",
"dompurify": "^2.2.0",
"fflate": "^0.4.8",
"html2canvas": "^1.0.0-rc.5"
}
},
"jszip": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz",
@@ -4013,11 +3757,16 @@
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true
},
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==",
"optional": true
"pdf-lib": {
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/pdf-lib/-/pdf-lib-1.17.1.tgz",
"integrity": "sha512-V/mpyJAoTsN4cnP31vc0wfNA1+p20evqqnap0KLoRUN0Yk/p3wN52DOEsL4oBFcLdb76hlpKPtzJIgo67j/XLw==",
"requires": {
"@pdf-lib/standard-fonts": "^1.0.0",
"@pdf-lib/upng": "^1.0.1",
"pako": "^1.0.11",
"tslib": "^1.11.1"
}
},
"prelude-ls": {
"version": "1.2.1",
@@ -4082,15 +3831,6 @@
"fast-diff": "1.1.2"
}
},
"raf": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
"integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
"optional": true,
"requires": {
"performance-now": "^2.1.0"
}
},
"randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@@ -4113,11 +3853,6 @@
"util-deprecate": "~1.0.1"
}
},
"regenerator-runtime": {
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
"integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="
},
"regexp.prototype.flags": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz",
@@ -4146,12 +3881,6 @@
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
"dev": true
},
"rgbcolor": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz",
"integrity": "sha512-9aZLIrhRaD97sgVhtJOW6ckOEh6/GnvQtdVNfdZ6s67+3/XwLS9lBcQYzEEhYVeUowN7pRzMLsyGhK2i/xvWbw==",
"optional": true
},
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -4234,12 +3963,6 @@
}
}
},
"stackblur-canvas": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.6.0.tgz",
"integrity": "sha512-8S1aIA+UoF6erJYnglGPug6MaHYGo1Ot7h5fuXx4fUPvcvQfcdw2o/ppCse63+eZf8PPidSu4v1JnmEVtEDnpg==",
"optional": true
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -4272,12 +3995,6 @@
"has-flag": "^4.0.0"
}
},
"svg-pathdata": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-6.0.3.tgz",
"integrity": "sha512-qsjeeq5YjBZ5eMdFuUa4ZosMLxgr5RZ+F+Y1OrDhuOCEInRMA3x74XdBtggJcj9kOeInz0WE+LgCPDkZFlBYJw==",
"optional": true
},
"tapable": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.9.tgz",
@@ -4309,21 +4026,17 @@
}
}
},
"text-segmentation": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
"optional": true,
"requires": {
"utrie": "^1.0.2"
}
},
"text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
"integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
"dev": true
},
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@@ -4361,15 +4074,6 @@
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"utrie": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
"optional": true,
"requires": {
"base64-arraybuffer": "^1.0.2"
}
},
"uuid": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",

View File

@@ -1,6 +1,6 @@
{
"name": "simple-mind-map",
"version": "0.9.2",
"version": "0.9.3",
"description": "一个简单的web在线思维导图",
"authors": [
{
@@ -31,10 +31,10 @@
"@svgdotjs/svg.js": "^3.0.16",
"deepmerge": "^1.5.2",
"eventemitter3": "^4.0.7",
"jspdf": "^2.5.1",
"jszip": "^3.10.1",
"katex": "^0.16.8",
"mdast-util-from-markdown": "^1.3.0",
"pdf-lib": "^1.17.1",
"quill": "^1.3.6",
"tern": "^0.24.3",
"uuid": "^9.0.0",

View File

@@ -1,4 +1,10 @@
import { copyRenderTree, simpleDeepClone, throttle } from '../../utils'
import {
copyRenderTree,
simpleDeepClone,
throttle,
isSameObject,
transformTreeDataToObject
} from '../../utils'
// 命令类
class Command {
@@ -84,15 +90,14 @@ class Command {
if (this.mindMap.opt.readonly) {
return
}
let data = this.getCopyData()
const lastData =
this.history.length > 0 ? this.history[this.history.length - 1] : null
const data = this.getCopyData()
// 此次数据和上次一样则不重复添加
if (
this.history.length > 0 &&
JSON.stringify(this.history[this.history.length - 1]) ===
JSON.stringify(data)
) {
if (lastData && JSON.stringify(lastData) === JSON.stringify(data)) {
return
}
this.emitDataUpdatesEvent(lastData, data)
// 删除当前历史指针后面的数据
this.history = this.history.slice(0, this.activeHistoryIndex + 1)
this.history.push(simpleDeepClone(data))
@@ -115,13 +120,15 @@ class Command {
return
}
if (this.activeHistoryIndex - step >= 0) {
const lastData = this.history[this.activeHistoryIndex]
this.activeHistoryIndex -= step
this.mindMap.emit(
'back_forward',
this.activeHistoryIndex,
this.history.length
)
let data = simpleDeepClone(this.history[this.activeHistoryIndex])
const data = simpleDeepClone(this.history[this.activeHistoryIndex])
this.emitDataUpdatesEvent(lastData, data)
this.mindMap.emit('data_change', data)
return data
}
@@ -134,13 +141,15 @@ class Command {
}
let len = this.history.length
if (this.activeHistoryIndex + step <= len - 1) {
const lastData = this.history[this.activeHistoryIndex]
this.activeHistoryIndex += step
this.mindMap.emit(
'back_forward',
this.activeHistoryIndex,
this.history.length
)
let data = simpleDeepClone(this.history[this.activeHistoryIndex])
const data = simpleDeepClone(this.history[this.activeHistoryIndex])
this.emitDataUpdatesEvent(lastData, data)
this.mindMap.emit('data_change', data)
return data
}
@@ -165,6 +174,53 @@ class Command {
walk(data)
return data
}
// 派发思维导图更新明细事件
emitDataUpdatesEvent(lastData, data) {
// 如果data_change_detail没有监听者那么不进行计算节省性能
const eventName = 'data_change_detail'
const count = this.mindMap.event.listenerCount(eventName)
if (count > 0 && lastData && data) {
const lastDataObj = simpleDeepClone(transformTreeDataToObject(lastData))
const dataObj = simpleDeepClone(transformTreeDataToObject(data))
const res = []
const walkReplace = (root, obj) => {
if (root.children && root.children.length > 0) {
root.children.forEach((childUid, index) => {
root.children[index] = obj[childUid]
walkReplace(root.children[index], obj)
})
}
return root
}
// 找出新增的或修改的
Object.keys(dataObj).forEach(uid => {
// 新增的或已经存在的,如果数据发生了改变
if (!lastDataObj[uid]) {
res.push({
action: 'create',
data: walkReplace(dataObj[uid], dataObj)
})
} else if (!isSameObject(lastDataObj[uid], dataObj[uid])) {
res.push({
action: 'update',
oldData: walkReplace(lastDataObj[uid], lastDataObj),
data: walkReplace(dataObj[uid], dataObj)
})
}
})
// 找出删除的
Object.keys(lastDataObj).forEach(uid => {
if (!dataObj[uid]) {
res.push({
action: 'delete',
data: walkReplace(lastDataObj[uid], lastDataObj)
})
}
})
this.mindMap.emit(eventName, res)
}
}
}
export default Command

View File

@@ -1,4 +1,5 @@
import { keyMap } from './keyMap'
// 快捷按键、命令处理类
export default class KeyCommand {
// 构造函数

View File

@@ -26,7 +26,9 @@ import {
getDataFromClipboard,
htmlEscape,
parseAddGeneralizationNodeList,
checkNodeListIsEqual
checkNodeListIsEqual,
createSmmFormatData,
checkSmmFormatData
} from '../../utils'
import { shapeList } from './node/Shape'
import { lineStyleProps } from '../../themes/default'
@@ -876,20 +878,14 @@ class Render {
copy() {
this.beingCopyData = this.copyNode()
if (!this.beingCopyData) return
setDataToClipboard({
simpleMindMap: true,
data: this.beingCopyData
})
setDataToClipboard(createSmmFormatData(this.beingCopyData))
}
// 剪切节点
cut() {
this.mindMap.execCommand('CUT_NODE', copyData => {
this.beingCopyData = copyData
setDataToClipboard({
simpleMindMap: true,
data: copyData
})
setDataToClipboard(createSmmFormatData(copyData))
})
}
@@ -936,10 +932,11 @@ class Render {
const res = await this.mindMap.opt.customHandleClipboardText(text)
if (!isUndef(res)) {
useDefault = false
if (typeof res === 'object' && res.simpleMindMap) {
smmData = res.data
const checkRes = checkSmmFormatData(res)
if (checkRes.isSmm) {
smmData = checkRes.data
} else {
text = String(res)
text = checkRes.data
}
}
} catch (error) {
@@ -948,13 +945,11 @@ class Render {
}
// 默认处理
if (useDefault) {
try {
const parsedData = JSON.parse(text)
if (parsedData && parsedData.simpleMindMap) {
smmData = parsedData.data
}
} catch (error) {
errorHandler(ERROR_TYPES.PARSE_PASTE_DATA_ERROR, error)
const checkRes = checkSmmFormatData(text)
if (checkRes.isSmm) {
smmData = checkRes.data
} else {
text = checkRes.data
}
}
if (smmData) {
@@ -1419,6 +1414,7 @@ class Render {
// 设置节点文本
setNodeText(node, text, richText, resetRichText) {
richText = richText === undefined ? node.getData('richText') : richText
this.setNodeDataRender(node, {
text,
richText,

View File

@@ -3,7 +3,10 @@ import {
checkNodeOuter,
focusInput,
selectAllInput,
htmlEscape
htmlEscape,
handleInputPasteText,
checkSmmFormatData,
getTextFromHtml
} from '../../utils'
import { ERROR_TYPES, CONSTANTS } from '../../constants/constant'
@@ -226,6 +229,16 @@ export default class TextEdit {
e.stopPropagation()
}
})
this.textEditNode.addEventListener('paste', e => {
const text = e.clipboardData.getData('text')
const { isSmm, data } = checkSmmFormatData(text)
if (isSmm && data[0] && data[0].data) {
// 只取第一个节点的纯文本
handleInputPasteText(e, getTextFromHtml(data[0].data.text))
} else {
handleInputPasteText(e)
}
})
const targetNode =
this.mindMap.opt.customInnerElsAppendTo || document.body
targetNode.appendChild(this.textEditNode)

View File

@@ -360,7 +360,10 @@ class Node {
// 文字
if (this._textData) {
this._textData.node.attr('data-offsetx', textContentOffsetX)
this._textData.node.x(textContentOffsetX).y(0)
// 修复safari浏览器节点存在图标时文字位置不正确的问题
;(this._textData.nodeContent || this._textData.node)
.x(textContentOffsetX)
.y(0)
textContentNested.add(this._textData.node)
textContentOffsetX += this._textData.width + textContentItemMargin
}
@@ -710,6 +713,7 @@ class Node {
if (this.parent) {
this.parent.removeLine()
}
this.style.onRemove()
}
// 隐藏节点

View File

@@ -2,6 +2,7 @@ import {
checkIsNodeStyleDataKey,
generateColorByContent
} from '../../../utils/index'
import { Gradient } from '@svgdotjs/svg.js'
const rootProp = ['paddingX', 'paddingY']
const backgroundStyleProps = [
@@ -58,6 +59,8 @@ class Style {
// 箭头图标
this._markerPath = null
this._marker = null
// 渐变背景
this._gradient = null
}
// 合并样式
@@ -100,11 +103,22 @@ class Style {
node.radius(this.merge('borderRadius'))
}
// 矩形外的其他形状
// 形状
shape(node) {
node.fill({
color: this.merge('fillColor')
})
if (this.merge('gradientStyle')) {
if (!this._gradient) {
this._gradient = this.ctx.nodeDraw.gradient('linear')
}
this._gradient.update(add => {
add.stop(0, this.merge('startColor'))
add.stop(1, this.merge('endColor'))
})
node.fill(this._gradient)
} else {
node.fill({
color: this.merge('fillColor')
})
}
// 节点使用横线样式,不需要渲染非激活状态的边框样式
// if (
// !this.ctx.isRoot &&
@@ -273,6 +287,22 @@ class Style {
color: hoverRectColor
})
}
// 所属节点被删除时的操作
onRemove() {
if (this._marker) {
this._marker.remove()
this._marker = null
}
if (this._markerPath) {
this._markerPath.remove()
this._markerPath = null
}
if (this._gradient) {
this._gradient.remove()
this._gradient = null
}
}
}
Style.cacheStyle = null

View File

@@ -170,6 +170,7 @@ function createRichTextNode() {
g.add(foreignObject)
return {
node: g,
nodeContent: foreignObject,
width,
height
}
@@ -240,7 +241,7 @@ function createHyperlinkNode() {
return
}
let iconSize = this.mindMap.themeConfig.iconSize
let node = new SVG()
let node = new SVG().size(iconSize, iconSize)
// 超链接节点
let a = new A().to(hyperlink).target('_blank')
a.node.addEventListener('click', e => {
@@ -298,7 +299,7 @@ function createNoteNode() {
return null
}
let iconSize = this.mindMap.themeConfig.iconSize
let node = new SVG().attr('cursor', 'pointer')
let node = new SVG().attr('cursor', 'pointer').size(iconSize, iconSize)
// 透明的层,用来作为鼠标区域
node.add(new Rect().size(iconSize, iconSize).fill({ color: 'transparent' }))
// 备注图标

Some files were not shown because too many files have changed in this diff Show More