@zjlab-frontier/markdown 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -19
- package/dist/{arc-hBWWMQsH.mjs → arc-DKypXwU0.mjs} +1 -1
- package/dist/{blockDiagram-c4efeb88-C6pfG9Ck.mjs → blockDiagram-c4efeb88-Bmv13dx4.mjs} +5 -5
- package/dist/{c4Diagram-c83219d4-D9_jGOj0.mjs → c4Diagram-c83219d4-BVqhsFLR.mjs} +2 -2
- package/dist/{channel-B2KIr8h9.mjs → channel-7zK3j7kt.mjs} +1 -1
- package/dist/{classDiagram-beda092f-B51T8VBY.mjs → classDiagram-beda092f-BKWsDFTf.mjs} +5 -5
- package/dist/{classDiagram-v2-2358418a-CU4b2Waq.mjs → classDiagram-v2-2358418a-3xBMvj8E.mjs} +5 -5
- package/dist/{clone-C91NbT9g.mjs → clone-B0fuyzcB.mjs} +1 -1
- package/dist/{createText-1719965b-BP357dSa.mjs → createText-1719965b-CSyMDMQR.mjs} +1 -1
- package/dist/{edges-96097737-CiKz0b-2.mjs → edges-96097737-DpmwvpUn.mjs} +3 -3
- package/dist/{erDiagram-0228fc6a-D2YtCYid.mjs → erDiagram-0228fc6a-CIBOJywz.mjs} +4 -4
- package/dist/{flowDb-c6c81e3f-Cy2RsBB7.mjs → flowDb-c6c81e3f-CtkbhICe.mjs} +1 -1
- package/dist/{flowDiagram-50d868cf-DuaRmGZp.mjs → flowDiagram-50d868cf-CIdsyGhR.mjs} +6 -6
- package/dist/{flowDiagram-v2-4f6560a1-BnpNjba0.mjs → flowDiagram-v2-4f6560a1-Ct07OGu8.mjs} +5 -5
- package/dist/{flowchart-elk-definition-6af322e1-CurcUiBZ.mjs → flowchart-elk-definition-6af322e1-BvNvujwT.mjs} +4 -4
- package/dist/{ganttDiagram-a2739b55-CAMvmp7r.mjs → ganttDiagram-a2739b55-t8PnO4qJ.mjs} +2 -2
- package/dist/{gitGraphDiagram-82fe8481-CIeLBXT5.mjs → gitGraphDiagram-82fe8481-2O1QpluP.mjs} +1 -1
- package/dist/{graph-DGnQ-3dF.mjs → graph-Bm5WX3ra.mjs} +1 -1
- package/dist/{index-5325376f-LPX90pOA.mjs → index-5325376f-B5mSzt7o.mjs} +6 -6
- package/dist/{index-Do6WBYHP.mjs → index-BnNBGBuc.mjs} +39 -34
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +2 -1
- package/dist/{infoDiagram-8eee0895-JT0Hdx8j.mjs → infoDiagram-8eee0895-D2QThG0P.mjs} +1 -1
- package/dist/{journeyDiagram-c64418c1-CklpoZQv.mjs → journeyDiagram-c64418c1-WmlVQfzu.mjs} +3 -3
- package/dist/{layout-BR9KFHR9.mjs → layout-ChS9cApj.mjs} +2 -2
- package/dist/{line-6cN4pofW.mjs → line-DOUvjkH_.mjs} +1 -1
- package/dist/{linear-Cg9A0W-C.mjs → linear-sOBLcyxH.mjs} +1 -1
- package/dist/{mindmap-definition-8da855dc-Cz0GIPoO.mjs → mindmap-definition-8da855dc-dcsxdIKZ.mjs} +2 -2
- package/dist/{pieDiagram-a8764435-vQMGBEcg.mjs → pieDiagram-a8764435-CTTx8sF-.mjs} +2 -2
- package/dist/{quadrantDiagram-1e28029f-BvfnO4Dg.mjs → quadrantDiagram-1e28029f-DaXQ5fa0.mjs} +2 -2
- package/dist/{requirementDiagram-08caed73-Dj6CWtKF.mjs → requirementDiagram-08caed73-BBac8OPq.mjs} +4 -4
- package/dist/{sankeyDiagram-a04cb91d-du0mfspc.mjs → sankeyDiagram-a04cb91d-d7gbMMyp.mjs} +1 -1
- package/dist/{sequenceDiagram-c5b8d532-CI1h9MYJ.mjs → sequenceDiagram-c5b8d532-Dm5wG7x9.mjs} +2 -2
- package/dist/{stateDiagram-1ecb1508-TzVsN4Nk.mjs → stateDiagram-1ecb1508-DHca22Ih.mjs} +5 -5
- package/dist/{stateDiagram-v2-c2b004d7-dXw2DSlw.mjs → stateDiagram-v2-c2b004d7-Dj6-ydPU.mjs} +5 -5
- package/dist/{styles-b4e223ce-B2lr3TRK.mjs → styles-b4e223ce-BxZCziAG.mjs} +1 -1
- package/dist/{styles-ca3715f6-BwE-LTmh.mjs → styles-ca3715f6-ByT_DiA0.mjs} +1 -1
- package/dist/{styles-d45a18b0-CFxfzO5n.mjs → styles-d45a18b0-CVdfFItB.mjs} +4 -4
- package/dist/{svgDrawCommon-b86b1483-ICvpV_Gu.mjs → svgDrawCommon-b86b1483-Dmq3-8p8.mjs} +1 -1
- package/dist/{timeline-definition-faaaa080-t73XO9k4.mjs → timeline-definition-faaaa080-CHVizbUA.mjs} +2 -2
- package/dist/{xychartDiagram-f5964ef8-BhKnY7OQ.mjs → xychartDiagram-f5964ef8-Br5GWkPd.mjs} +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **包名**:`@zjlab-frontier/markdown`
|
|
4
4
|
> **适用框架**:React(支持 React 18+)
|
|
5
|
-
> **核心引擎**:`react-markdown` + `
|
|
6
|
-
> **功能亮点**:支持 **Mermaid 图表**、**LaTeX
|
|
5
|
+
> **核心引擎**:`react-markdown` + `KaTeX` / `MathJax` + `mermaid`
|
|
6
|
+
> **功能亮点**:支持 **Mermaid 图表**、**LaTeX 数学公式**(支持 KaTeX 和 MathJax 双引擎)、**代码高亮**、**GitHub 风格 Markdown(GFM)**、**长代码折叠**、**一键复制**、**媒体自动识别** 等。
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -23,6 +23,8 @@ npm install @zjlab-frontier/markdown
|
|
|
23
23
|
|
|
24
24
|
```tsx
|
|
25
25
|
import { ZJMarkdown } from '@zjlab-frontier/markdown';
|
|
26
|
+
// 引入样式(如果构建工具没有自动处理)
|
|
27
|
+
// import '@zjlab-frontier/markdown/dist/style.css';
|
|
26
28
|
```
|
|
27
29
|
|
|
28
30
|
### 2. 基本使用
|
|
@@ -34,7 +36,7 @@ function App() {
|
|
|
34
36
|
|
|
35
37
|
这是一个功能强大的 React Markdown 组件。
|
|
36
38
|
|
|
37
|
-
- ✅ **数学公式**:$E = mc^2$
|
|
39
|
+
- ✅ **数学公式**:$E = mc^2$
|
|
38
40
|
- ✅ **Mermaid 图表**:流程图、时序图等
|
|
39
41
|
- ✅ **代码增强**:自动识别语言、复制按钮、长代码折叠
|
|
40
42
|
- ✅ **多媒体**:自动识别 mp3/mp4 链接
|
|
@@ -42,6 +44,7 @@ function App() {
|
|
|
42
44
|
|
|
43
45
|
return (
|
|
44
46
|
<div style={{ padding: 20 }}>
|
|
47
|
+
{/* 默认使用 KaTeX 渲染公式 */}
|
|
45
48
|
<ZJMarkdown
|
|
46
49
|
content={markdownContent}
|
|
47
50
|
fontSize={16}
|
|
@@ -55,23 +58,22 @@ function App() {
|
|
|
55
58
|
|
|
56
59
|
## 🧩 功能详解
|
|
57
60
|
|
|
58
|
-
### 1.
|
|
61
|
+
### 1. **数学公式(双引擎支持)**
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
组件支持 `KaTeX`(默认,渲染快)和 `MathJax`(兼容性强)两种引擎。可以通过 `mathEngine` 属性切换。
|
|
61
64
|
|
|
62
65
|
#### ✅ 支持语法:
|
|
63
66
|
|
|
64
|
-
- **行内公式**:`$...$` 或 `\(...\
|
|
67
|
+
- **行内公式**:`$...$` 或 `\(...\]`
|
|
65
68
|
- **块级公式**:`$$...$$` 或 `\[...\]`
|
|
66
|
-
-
|
|
69
|
+
- **化学式支持**:支持 `\ce{...}` (KaTeX 需扩展,MathJax 原生支持更好)
|
|
67
70
|
|
|
68
71
|
#### ⚙️ 预处理增强:
|
|
69
72
|
|
|
70
73
|
组件内置了 **LaTeX 预处理逻辑**,解决了 Markdown 转义字符(如 `\` 和 `_`)与 LaTeX 语法冲突的问题。
|
|
71
74
|
|
|
72
75
|
- 自动保护 `\\` 换行符
|
|
73
|
-
- 自动处理 `\ce{...}`
|
|
74
|
-
- 兼容 `\begin{align}...\end{align}` 等环境写法
|
|
76
|
+
- 自动处理 `\ce{...}` 和 `\boxed{...}` 等裸公式
|
|
75
77
|
|
|
76
78
|
**示例:**
|
|
77
79
|
|
|
@@ -82,14 +84,15 @@ function App() {
|
|
|
82
84
|
$$
|
|
83
85
|
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
|
|
84
86
|
$$
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
#### 切换引擎示例:
|
|
85
90
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
\end{pmatrix}
|
|
92
|
-
\]
|
|
91
|
+
```tsx
|
|
92
|
+
<ZJMarkdown
|
|
93
|
+
content={content}
|
|
94
|
+
mathEngine="mathjax" // 切换为 MathJax 引擎
|
|
95
|
+
/>
|
|
93
96
|
```
|
|
94
97
|
|
|
95
98
|
---
|
|
@@ -117,8 +120,8 @@ graph TD
|
|
|
117
120
|
|
|
118
121
|
- **语言标注**:显示语言类型(如 `typescript`)。
|
|
119
122
|
- **一键复制**:提供复制按钮。
|
|
120
|
-
- **自动折叠**:高度超过 **400px**
|
|
121
|
-
- **自动换行**:对文本类语言(`text`, `md`, `latex
|
|
123
|
+
- **自动折叠**:高度超过 **400px** 自动折叠,点击“查看全部”展开。
|
|
124
|
+
- **自动换行**:对文本类语言(`text`, `md`, `latex` 等)强制换行,避免横向滚动。
|
|
122
125
|
|
|
123
126
|
---
|
|
124
127
|
|
|
@@ -146,6 +149,7 @@ graph TD
|
|
|
146
149
|
| 属性名 | 类型 | 默认值 | 说明 |
|
|
147
150
|
|:---|:---|:---|:---|
|
|
148
151
|
| `content` | `string` | **必填** | Markdown 源码字符串 |
|
|
152
|
+
| `mathEngine` | `'katex' , 'mathjax'` | `'katex'` | 数学公式渲染引擎 |
|
|
149
153
|
| `fontSize` | `number` | `16` | 正文字体大小 (px) |
|
|
150
154
|
| `fontFamily` | `string` | `'inherit'` | 字体设置 |
|
|
151
155
|
| `style` | `CSSProperties` | - | 自定义根元素样式 |
|
|
@@ -163,4 +167,4 @@ npm run build:types # 生成类型定义
|
|
|
163
167
|
|
|
164
168
|
## 📝 License
|
|
165
169
|
|
|
166
|
-
MIT
|
|
170
|
+
MIT
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as ln, c as I } from "./path-DLwuMfdd.mjs";
|
|
2
|
-
import { av as an, aw as j, ax as D, ay as rn, az as y, U as on, aA as K, aB as _, aC as un, aD as t, aE as sn, aF as tn, aG as fn } from "./index-
|
|
2
|
+
import { av as an, aw as j, ax as D, ay as rn, az as y, U as on, aA as K, aB as _, aC as un, aD as t, aE as sn, aF as tn, aG as fn } from "./index-BnNBGBuc.mjs";
|
|
3
3
|
function cn(l) {
|
|
4
4
|
return l.innerRadius;
|
|
5
5
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Z as se, A as ye, d as H, e as Ee, l as S, E as we, k as De, g as he, p as ve } from "./index-
|
|
2
|
-
import { c as Ne } from "./clone-
|
|
3
|
-
import { i as ke, c as Ie, b as Oe, d as Te, a as ge, p as ze } from "./edges-96097737-
|
|
4
|
-
import { G as Ce } from "./graph-
|
|
5
|
-
import { c as Ae } from "./channel-
|
|
1
|
+
import { Z as se, A as ye, d as H, e as Ee, l as S, E as we, k as De, g as he, p as ve } from "./index-BnNBGBuc.mjs";
|
|
2
|
+
import { c as Ne } from "./clone-B0fuyzcB.mjs";
|
|
3
|
+
import { i as ke, c as Ie, b as Oe, d as Te, a as ge, p as ze } from "./edges-96097737-DpmwvpUn.mjs";
|
|
4
|
+
import { G as Ce } from "./graph-Bm5WX3ra.mjs";
|
|
5
|
+
import { c as Ae } from "./channel-7zK3j7kt.mjs";
|
|
6
6
|
import { o as Re } from "./ordinal-C0oynhte.mjs";
|
|
7
7
|
import { s as Be } from "./Tableau10-D7jGxypv.mjs";
|
|
8
8
|
var le, oe, ee = (function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as Dt, s as we, a as Oe, b as Te, c as Re, d as Nt, l as le, e as De, f as Se, h as wt, i as ue, j as Pe, w as Me, k as Kt, m as oe } from "./index-
|
|
2
|
-
import { d as Le, g as Ne } from "./svgDrawCommon-b86b1483-
|
|
1
|
+
import { g as Dt, s as we, a as Oe, b as Te, c as Re, d as Nt, l as le, e as De, f as Se, h as wt, i as ue, j as Pe, w as Me, k as Kt, m as oe } from "./index-BnNBGBuc.mjs";
|
|
2
|
+
import { d as Le, g as Ne } from "./svgDrawCommon-b86b1483-Dmq3-8p8.mjs";
|
|
3
3
|
var Yt = (function() {
|
|
4
4
|
var e = function(bt, _, x, m) {
|
|
5
5
|
for (x = x || {}, m = bt.length; m--; x[bt[m]] = _)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as G, d as S, p as A } from "./styles-b4e223ce-
|
|
2
|
-
import { g as v, l as y, d as B, e as W, F as $, B as M, G as I } from "./index-
|
|
3
|
-
import { G as O } from "./graph-
|
|
4
|
-
import { l as P } from "./layout-
|
|
5
|
-
import { l as X } from "./line-
|
|
1
|
+
import { s as G, d as S, p as A } from "./styles-b4e223ce-BxZCziAG.mjs";
|
|
2
|
+
import { g as v, l as y, d as B, e as W, F as $, B as M, G as I } from "./index-BnNBGBuc.mjs";
|
|
3
|
+
import { G as O } from "./graph-Bm5WX3ra.mjs";
|
|
4
|
+
import { l as P } from "./layout-ChS9cApj.mjs";
|
|
5
|
+
import { l as X } from "./line-DOUvjkH_.mjs";
|
|
6
6
|
let H = 0;
|
|
7
7
|
const Y = function(i, a, t, o, p) {
|
|
8
8
|
const g = function(e) {
|
package/dist/{classDiagram-v2-2358418a-CU4b2Waq.mjs → classDiagram-v2-2358418a-3xBMvj8E.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as M, d as _, p as B } from "./styles-b4e223ce-
|
|
2
|
-
import { l as d, g as c, d as w, B as R, o as G, k as D, p as E, q as C, n as A } from "./index-
|
|
3
|
-
import { G as q } from "./graph-
|
|
4
|
-
import { r as z } from "./index-5325376f-
|
|
5
|
-
import "./layout-
|
|
1
|
+
import { s as M, d as _, p as B } from "./styles-b4e223ce-BxZCziAG.mjs";
|
|
2
|
+
import { l as d, g as c, d as w, B as R, o as G, k as D, p as E, q as C, n as A } from "./index-BnNBGBuc.mjs";
|
|
3
|
+
import { G as q } from "./graph-Bm5WX3ra.mjs";
|
|
4
|
+
import { r as z } from "./index-5325376f-B5mSzt7o.mjs";
|
|
5
|
+
import "./layout-ChS9cApj.mjs";
|
|
6
6
|
const S = (s) => D.sanitizeText(s, c());
|
|
7
7
|
let k = {
|
|
8
8
|
dividerMargin: 10,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b7 as On, l as wt, b6 as At, i as zt, Z as It, b8 as Tt } from "./index-
|
|
1
|
+
import { b7 as On, l as wt, b6 as At, i as zt, Z as It, b8 as Tt } from "./index-BnNBGBuc.mjs";
|
|
2
2
|
const Bt = {};
|
|
3
3
|
function Ot(n, r) {
|
|
4
4
|
const t = Bt, e = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : !0, u = typeof t.includeHtml == "boolean" ? t.includeHtml : !0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as g, F as lt, g as b, r as H, d as E, B as j, i as Q, b6 as V } from "./index-
|
|
2
|
-
import { a as st } from "./createText-1719965b-
|
|
3
|
-
import { l as ct } from "./line-
|
|
1
|
+
import { l as g, F as lt, g as b, r as H, d as E, B as j, i as Q, b6 as V } from "./index-BnNBGBuc.mjs";
|
|
2
|
+
import { a as st } from "./createText-1719965b-CSyMDMQR.mjs";
|
|
3
|
+
import { l as ct } from "./line-DOUvjkH_.mjs";
|
|
4
4
|
const ht = (a, t, e, i) => {
|
|
5
5
|
t.forEach((l) => {
|
|
6
6
|
wt[l](a, e, i);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as Et, D as mt, a as gt, s as kt, b as xt, c as Rt, g as Z, l as V, d as rt, B as Ot, e as bt, E as Nt, F as Tt, G as At } from "./index-
|
|
2
|
-
import { G as Mt } from "./graph-
|
|
3
|
-
import { l as St } from "./layout-
|
|
4
|
-
import { l as wt } from "./line-
|
|
1
|
+
import { C as Et, D as mt, a as gt, s as kt, b as xt, c as Rt, g as Z, l as V, d as rt, B as Ot, e as bt, E as Nt, F as Tt, G as At } from "./index-BnNBGBuc.mjs";
|
|
2
|
+
import { G as Mt } from "./graph-Bm5WX3ra.mjs";
|
|
3
|
+
import { l as St } from "./layout-ChS9cApj.mjs";
|
|
4
|
+
import { l as wt } from "./line-DOUvjkH_.mjs";
|
|
5
5
|
const It = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
6
6
|
function Dt(t) {
|
|
7
7
|
return typeof t == "string" && It.test(t);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as me, D as ye, s as ve, a as Ve, b as Le, c as Ie, aq as Re, k as Ne, l as J1, g as et, E as we, B as dt, d as w1 } from "./index-
|
|
1
|
+
import { C as me, D as ye, s as ve, a as Ve, b as Le, c as Ie, aq as Re, k as Ne, l as J1, g as et, E as we, B as dt, d as w1 } from "./index-BnNBGBuc.mjs";
|
|
2
2
|
var pt = (function() {
|
|
3
3
|
var e = function(f1, a, o, f) {
|
|
4
4
|
for (o = o || {}, f = f1.length; f--; o[f1[f]] = a)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { f as $, p as kt } from "./flowDb-c6c81e3f-
|
|
2
|
-
import { d as m, n as G, l as M, g as D, o as St, p as z, q as W, r as Z, t as tt, k as et } from "./index-
|
|
3
|
-
import { G as Lt } from "./graph-
|
|
4
|
-
import { u as Et, r as _t, p as Tt, l as Nt, d as I } from "./layout-
|
|
5
|
-
import { a as T, b as rt, i as at, c as E, e as nt, d as st, f as At, g as Pt, s as Ct } from "./styles-d45a18b0-
|
|
6
|
-
import { l as It } from "./line-
|
|
1
|
+
import { f as $, p as kt } from "./flowDb-c6c81e3f-CtkbhICe.mjs";
|
|
2
|
+
import { d as m, n as G, l as M, g as D, o as St, p as z, q as W, r as Z, t as tt, k as et } from "./index-BnNBGBuc.mjs";
|
|
3
|
+
import { G as Lt } from "./graph-Bm5WX3ra.mjs";
|
|
4
|
+
import { u as Et, r as _t, p as Tt, l as Nt, d as I } from "./layout-ChS9cApj.mjs";
|
|
5
|
+
import { a as T, b as rt, i as at, c as E, e as nt, d as st, f as At, g as Pt, s as Ct } from "./styles-d45a18b0-CVdfFItB.mjs";
|
|
6
|
+
import { l as It } from "./line-DOUvjkH_.mjs";
|
|
7
7
|
function Bt(r) {
|
|
8
8
|
if (!r.ok) throw new Error(r.status + " " + r.statusText);
|
|
9
9
|
return r.text();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as o, p as a } from "./flowDb-c6c81e3f-
|
|
2
|
-
import { f as t, g as e } from "./styles-d45a18b0-
|
|
3
|
-
import { u as s } from "./index-
|
|
4
|
-
import "./graph-
|
|
5
|
-
import "./layout-
|
|
1
|
+
import { f as o, p as a } from "./flowDb-c6c81e3f-CtkbhICe.mjs";
|
|
2
|
+
import { f as t, g as e } from "./styles-d45a18b0-CVdfFItB.mjs";
|
|
3
|
+
import { u as s } from "./index-BnNBGBuc.mjs";
|
|
4
|
+
import "./graph-Bm5WX3ra.mjs";
|
|
5
|
+
import "./layout-ChS9cApj.mjs";
|
|
6
6
|
const p = {
|
|
7
7
|
parser: a,
|
|
8
8
|
db: o,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as FNe, d as BNe } from "./flowDb-c6c81e3f-
|
|
2
|
-
import { ap as $se, P as RNe, d as IO, l as Ba, Z as xU, o as KNe, p as C0n, q as j0n, n as $U, k as _Ne } from "./index-
|
|
3
|
-
import { i as HNe, a as qNe, l as UNe, b as GNe, k as zNe, m as XNe } from "./edges-96097737-
|
|
4
|
-
import { l as VNe } from "./line-
|
|
1
|
+
import { p as FNe, d as BNe } from "./flowDb-c6c81e3f-CtkbhICe.mjs";
|
|
2
|
+
import { ap as $se, P as RNe, d as IO, l as Ba, Z as xU, o as KNe, p as C0n, q as j0n, n as $U, k as _Ne } from "./index-BnNBGBuc.mjs";
|
|
3
|
+
import { i as HNe, a as qNe, l as UNe, b as GNe, k as zNe, m as XNe } from "./edges-96097737-DpmwvpUn.mjs";
|
|
4
|
+
import { l as VNe } from "./line-DOUvjkH_.mjs";
|
|
5
5
|
function NU(ct) {
|
|
6
6
|
throw new Error('Could not dynamically require "' + ct + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as Ge, J as Sn, K as je, L as $e, M as Je, N as ne, O as _n, P as Te, a as Yn, s as Un, C as Fn, D as En, b as Ln, c as An, g as Dt, d as Rt, e as Wn, Q as nt, l as $t, k as In, j as On, E as Hn, B as Nn } from "./index-
|
|
2
|
-
import { b as Pn, t as Fe, c as Vn, a as zn, l as Rn } from "./linear-
|
|
1
|
+
import { R as Ge, J as Sn, K as je, L as $e, M as Je, N as ne, O as _n, P as Te, a as Yn, s as Un, C as Fn, D as En, b as Ln, c as An, g as Dt, d as Rt, e as Wn, Q as nt, l as $t, k as In, j as On, E as Hn, B as Nn } from "./index-BnNBGBuc.mjs";
|
|
2
|
+
import { b as Pn, t as Fe, c as Vn, a as zn, l as Rn } from "./linear-sOBLcyxH.mjs";
|
|
3
3
|
import { i as Bn } from "./init-DjUOC4st.mjs";
|
|
4
4
|
function Zn(t, e) {
|
|
5
5
|
let n;
|
package/dist/{gitGraphDiagram-82fe8481-CIeLBXT5.mjs → gitGraphDiagram-82fe8481-2O1QpluP.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as vt, D as Ct, s as Ot, a as Pt, b as Gt, c as It, g as C, l as B, d as St, B as At, H as Nt, E as Ht, k as D, I as Bt } from "./index-
|
|
1
|
+
import { C as vt, D as Ct, s as Ot, a as Pt, b as Gt, c as It, g as C, l as B, d as St, B as At, H as Nt, E as Ht, k as D, I as Bt } from "./index-BnNBGBuc.mjs";
|
|
2
2
|
var mt = (function() {
|
|
3
3
|
var r = function(I, o, u, d) {
|
|
4
4
|
for (u = u || {}, d = I.length; d--; u[I[d]] = o)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aJ as $, aK as He, aL as T, af as y, aM as Ye, aN as Ze, ae as Ae, aO as qe, aP as Oe, aQ as D, ac as q, aR as Xe, aS as Te, aT as Je, aU as C, al as Ee, aV as x, a7 as me, aW as Qe, aX as Y, aY as We, aZ as ze, a_ as L, ak as Ve, a$ as ke, ad as en, b0 as ne, b1 as nn, b2 as rn, aj as tn, ai as we, ag as sn, b3 as j, aa as an, b4 as un, am as F, z as re, b5 as te } from "./index-
|
|
1
|
+
import { aJ as $, aK as He, aL as T, af as y, aM as Ye, aN as Ze, ae as Ae, aO as qe, aP as Oe, aQ as D, ac as q, aR as Xe, aS as Te, aT as Je, aU as C, al as Ee, aV as x, a7 as me, aW as Qe, aX as Y, aY as We, aZ as ze, a_ as L, ak as Ve, a$ as ke, ad as en, b0 as ne, b1 as nn, b2 as rn, aj as tn, ai as we, ag as sn, b3 as j, aa as an, b4 as un, am as F, z as re, b5 as te } from "./index-BnNBGBuc.mjs";
|
|
2
2
|
var fn = "[object Symbol]";
|
|
3
3
|
function X(e) {
|
|
4
4
|
return typeof e == "symbol" || $(e) && He(e) == fn;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as N, G as A } from "./graph-
|
|
2
|
-
import { m as $, l as H } from "./layout-
|
|
3
|
-
import { c as V } from "./clone-
|
|
4
|
-
import { i as U, u as W, s as _, a as q, b as z, g as D, p as O, c as K, d as Q, e as p, f as J, h as Y, j as Z } from "./edges-96097737-
|
|
5
|
-
import { l as s, g as T, r as S, d as L } from "./index-
|
|
6
|
-
import { a as I } from "./createText-1719965b-
|
|
1
|
+
import { i as N, G as A } from "./graph-Bm5WX3ra.mjs";
|
|
2
|
+
import { m as $, l as H } from "./layout-ChS9cApj.mjs";
|
|
3
|
+
import { c as V } from "./clone-B0fuyzcB.mjs";
|
|
4
|
+
import { i as U, u as W, s as _, a as q, b as z, g as D, p as O, c as K, d as Q, e as p, f as J, h as Y, j as Z } from "./edges-96097737-DpmwvpUn.mjs";
|
|
5
|
+
import { l as s, g as T, r as S, d as L } from "./index-BnNBGBuc.mjs";
|
|
6
|
+
import { a as I } from "./createText-1719965b-CSyMDMQR.mjs";
|
|
7
7
|
function m(e) {
|
|
8
8
|
var t = {
|
|
9
9
|
options: {
|
|
@@ -6145,7 +6145,7 @@ const C8 = (t, e) => {
|
|
|
6145
6145
|
}, og = (t) => {
|
|
6146
6146
|
t && (t.lazyLoadedDiagrams || t.loadExternalDiagramsAtStartup) && hE("LAZY_LOAD_DEPRECATED");
|
|
6147
6147
|
}, sg = "c4", fE = (t) => /^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t), dE = async () => {
|
|
6148
|
-
const { diagram: t } = await import("./c4Diagram-c83219d4-
|
|
6148
|
+
const { diagram: t } = await import("./c4Diagram-c83219d4-BVqhsFLR.mjs");
|
|
6149
6149
|
return { id: sg, diagram: t };
|
|
6150
6150
|
}, pE = {
|
|
6151
6151
|
id: sg,
|
|
@@ -6155,7 +6155,7 @@ const C8 = (t, e) => {
|
|
|
6155
6155
|
var r, i;
|
|
6156
6156
|
return ((r = e?.flowchart) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" || ((i = e?.flowchart) == null ? void 0 : i.defaultRenderer) === "elk" ? !1 : /^\s*graph/.test(t);
|
|
6157
6157
|
}, vE = async () => {
|
|
6158
|
-
const { diagram: t } = await import("./flowDiagram-50d868cf-
|
|
6158
|
+
const { diagram: t } = await import("./flowDiagram-50d868cf-CIdsyGhR.mjs");
|
|
6159
6159
|
return { id: lg, diagram: t };
|
|
6160
6160
|
}, yE = {
|
|
6161
6161
|
id: lg,
|
|
@@ -6165,70 +6165,70 @@ const C8 = (t, e) => {
|
|
|
6165
6165
|
var r, i, a;
|
|
6166
6166
|
return ((r = e?.flowchart) == null ? void 0 : r.defaultRenderer) === "dagre-d3" || ((i = e?.flowchart) == null ? void 0 : i.defaultRenderer) === "elk" ? !1 : /^\s*graph/.test(t) && ((a = e?.flowchart) == null ? void 0 : a.defaultRenderer) === "dagre-wrapper" ? !0 : /^\s*flowchart/.test(t);
|
|
6167
6167
|
}, bE = async () => {
|
|
6168
|
-
const { diagram: t } = await import("./flowDiagram-v2-4f6560a1-
|
|
6168
|
+
const { diagram: t } = await import("./flowDiagram-v2-4f6560a1-Ct07OGu8.mjs");
|
|
6169
6169
|
return { id: ug, diagram: t };
|
|
6170
6170
|
}, _E = {
|
|
6171
6171
|
id: ug,
|
|
6172
6172
|
detector: LE,
|
|
6173
6173
|
loader: bE
|
|
6174
6174
|
}, HE = _E, Tg = "er", ME = (t) => /^\s*erDiagram/.test(t), CE = async () => {
|
|
6175
|
-
const { diagram: t } = await import("./erDiagram-0228fc6a-
|
|
6175
|
+
const { diagram: t } = await import("./erDiagram-0228fc6a-CIBOJywz.mjs");
|
|
6176
6176
|
return { id: Tg, diagram: t };
|
|
6177
6177
|
}, wE = {
|
|
6178
6178
|
id: Tg,
|
|
6179
6179
|
detector: ME,
|
|
6180
6180
|
loader: CE
|
|
6181
6181
|
}, SE = wE, Qg = "gitGraph", AE = (t) => /^\s*gitGraph/.test(t), EE = async () => {
|
|
6182
|
-
const { diagram: t } = await import("./gitGraphDiagram-82fe8481-
|
|
6182
|
+
const { diagram: t } = await import("./gitGraphDiagram-82fe8481-2O1QpluP.mjs");
|
|
6183
6183
|
return { id: Qg, diagram: t };
|
|
6184
6184
|
}, OE = {
|
|
6185
6185
|
id: Qg,
|
|
6186
6186
|
detector: AE,
|
|
6187
6187
|
loader: EE
|
|
6188
6188
|
}, kE = OE, cg = "gantt", DE = (t) => /^\s*gantt/.test(t), VE = async () => {
|
|
6189
|
-
const { diagram: t } = await import("./ganttDiagram-a2739b55-
|
|
6189
|
+
const { diagram: t } = await import("./ganttDiagram-a2739b55-t8PnO4qJ.mjs");
|
|
6190
6190
|
return { id: cg, diagram: t };
|
|
6191
6191
|
}, BE = {
|
|
6192
6192
|
id: cg,
|
|
6193
6193
|
detector: DE,
|
|
6194
6194
|
loader: VE
|
|
6195
6195
|
}, NE = BE, hg = "info", IE = (t) => /^\s*info/.test(t), PE = async () => {
|
|
6196
|
-
const { diagram: t } = await import("./infoDiagram-8eee0895-
|
|
6196
|
+
const { diagram: t } = await import("./infoDiagram-8eee0895-D2QThG0P.mjs");
|
|
6197
6197
|
return { id: hg, diagram: t };
|
|
6198
6198
|
}, RE = {
|
|
6199
6199
|
id: hg,
|
|
6200
6200
|
detector: IE,
|
|
6201
6201
|
loader: PE
|
|
6202
6202
|
}, fg = "pie", FE = (t) => /^\s*pie/.test(t), jE = async () => {
|
|
6203
|
-
const { diagram: t } = await import("./pieDiagram-a8764435-
|
|
6203
|
+
const { diagram: t } = await import("./pieDiagram-a8764435-CTTx8sF-.mjs");
|
|
6204
6204
|
return { id: fg, diagram: t };
|
|
6205
6205
|
}, qE = {
|
|
6206
6206
|
id: fg,
|
|
6207
6207
|
detector: FE,
|
|
6208
6208
|
loader: jE
|
|
6209
6209
|
}, dg = "quadrantChart", zE = (t) => /^\s*quadrantChart/.test(t), GE = async () => {
|
|
6210
|
-
const { diagram: t } = await import("./quadrantDiagram-1e28029f-
|
|
6210
|
+
const { diagram: t } = await import("./quadrantDiagram-1e28029f-DaXQ5fa0.mjs");
|
|
6211
6211
|
return { id: dg, diagram: t };
|
|
6212
6212
|
}, ZE = {
|
|
6213
6213
|
id: dg,
|
|
6214
6214
|
detector: zE,
|
|
6215
6215
|
loader: GE
|
|
6216
6216
|
}, UE = ZE, pg = "xychart", WE = (t) => /^\s*xychart-beta/.test(t), XE = async () => {
|
|
6217
|
-
const { diagram: t } = await import("./xychartDiagram-f5964ef8-
|
|
6217
|
+
const { diagram: t } = await import("./xychartDiagram-f5964ef8-Br5GWkPd.mjs");
|
|
6218
6218
|
return { id: pg, diagram: t };
|
|
6219
6219
|
}, KE = {
|
|
6220
6220
|
id: pg,
|
|
6221
6221
|
detector: WE,
|
|
6222
6222
|
loader: XE
|
|
6223
6223
|
}, YE = KE, mg = "requirement", JE = (t) => /^\s*requirement(Diagram)?/.test(t), $E = async () => {
|
|
6224
|
-
const { diagram: t } = await import("./requirementDiagram-08caed73-
|
|
6224
|
+
const { diagram: t } = await import("./requirementDiagram-08caed73-BBac8OPq.mjs");
|
|
6225
6225
|
return { id: mg, diagram: t };
|
|
6226
6226
|
}, tO = {
|
|
6227
6227
|
id: mg,
|
|
6228
6228
|
detector: JE,
|
|
6229
6229
|
loader: $E
|
|
6230
6230
|
}, eO = tO, gg = "sequence", rO = (t) => /^\s*sequenceDiagram/.test(t), nO = async () => {
|
|
6231
|
-
const { diagram: t } = await import("./sequenceDiagram-c5b8d532-
|
|
6231
|
+
const { diagram: t } = await import("./sequenceDiagram-c5b8d532-Dm5wG7x9.mjs");
|
|
6232
6232
|
return { id: gg, diagram: t };
|
|
6233
6233
|
}, iO = {
|
|
6234
6234
|
id: gg,
|
|
@@ -6238,7 +6238,7 @@ const C8 = (t, e) => {
|
|
|
6238
6238
|
var r;
|
|
6239
6239
|
return ((r = e?.class) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !1 : /^\s*classDiagram/.test(t);
|
|
6240
6240
|
}, sO = async () => {
|
|
6241
|
-
const { diagram: t } = await import("./classDiagram-beda092f-
|
|
6241
|
+
const { diagram: t } = await import("./classDiagram-beda092f-BKWsDFTf.mjs");
|
|
6242
6242
|
return { id: vg, diagram: t };
|
|
6243
6243
|
}, lO = {
|
|
6244
6244
|
id: vg,
|
|
@@ -6248,7 +6248,7 @@ const C8 = (t, e) => {
|
|
|
6248
6248
|
var r;
|
|
6249
6249
|
return /^\s*classDiagram/.test(t) && ((r = e?.class) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !0 : /^\s*classDiagram-v2/.test(t);
|
|
6250
6250
|
}, QO = async () => {
|
|
6251
|
-
const { diagram: t } = await import("./classDiagram-v2-2358418a-
|
|
6251
|
+
const { diagram: t } = await import("./classDiagram-v2-2358418a-3xBMvj8E.mjs");
|
|
6252
6252
|
return { id: yg, diagram: t };
|
|
6253
6253
|
}, cO = {
|
|
6254
6254
|
id: yg,
|
|
@@ -6258,7 +6258,7 @@ const C8 = (t, e) => {
|
|
|
6258
6258
|
var r;
|
|
6259
6259
|
return ((r = e?.state) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper" ? !1 : /^\s*stateDiagram/.test(t);
|
|
6260
6260
|
}, dO = async () => {
|
|
6261
|
-
const { diagram: t } = await import("./stateDiagram-1ecb1508-
|
|
6261
|
+
const { diagram: t } = await import("./stateDiagram-1ecb1508-DHca22Ih.mjs");
|
|
6262
6262
|
return { id: xg, diagram: t };
|
|
6263
6263
|
}, pO = {
|
|
6264
6264
|
id: xg,
|
|
@@ -6268,14 +6268,14 @@ const C8 = (t, e) => {
|
|
|
6268
6268
|
var r;
|
|
6269
6269
|
return !!(/^\s*stateDiagram-v2/.test(t) || /^\s*stateDiagram/.test(t) && ((r = e?.state) == null ? void 0 : r.defaultRenderer) === "dagre-wrapper");
|
|
6270
6270
|
}, vO = async () => {
|
|
6271
|
-
const { diagram: t } = await import("./stateDiagram-v2-c2b004d7-
|
|
6271
|
+
const { diagram: t } = await import("./stateDiagram-v2-c2b004d7-Dj6-ydPU.mjs");
|
|
6272
6272
|
return { id: Lg, diagram: t };
|
|
6273
6273
|
}, yO = {
|
|
6274
6274
|
id: Lg,
|
|
6275
6275
|
detector: gO,
|
|
6276
6276
|
loader: vO
|
|
6277
6277
|
}, xO = yO, bg = "journey", LO = (t) => /^\s*journey/.test(t), bO = async () => {
|
|
6278
|
-
const { diagram: t } = await import("./journeyDiagram-c64418c1-
|
|
6278
|
+
const { diagram: t } = await import("./journeyDiagram-c64418c1-WmlVQfzu.mjs");
|
|
6279
6279
|
return { id: bg, diagram: t };
|
|
6280
6280
|
}, _O = {
|
|
6281
6281
|
id: bg,
|
|
@@ -6444,35 +6444,35 @@ const ZO = (t) => {
|
|
|
6444
6444
|
/^\s*flowchart|graph/.test(t) && ((r = e?.flowchart) == null ? void 0 : r.defaultRenderer) === "elk")
|
|
6445
6445
|
);
|
|
6446
6446
|
}, JO = async () => {
|
|
6447
|
-
const { diagram: t } = await import("./flowchart-elk-definition-6af322e1-
|
|
6447
|
+
const { diagram: t } = await import("./flowchart-elk-definition-6af322e1-BvNvujwT.mjs");
|
|
6448
6448
|
return { id: Mg, diagram: t };
|
|
6449
6449
|
}, $O = {
|
|
6450
6450
|
id: Mg,
|
|
6451
6451
|
detector: YO,
|
|
6452
6452
|
loader: JO
|
|
6453
6453
|
}, tk = $O, Cg = "timeline", ek = (t) => /^\s*timeline/.test(t), rk = async () => {
|
|
6454
|
-
const { diagram: t } = await import("./timeline-definition-faaaa080-
|
|
6454
|
+
const { diagram: t } = await import("./timeline-definition-faaaa080-CHVizbUA.mjs");
|
|
6455
6455
|
return { id: Cg, diagram: t };
|
|
6456
6456
|
}, nk = {
|
|
6457
6457
|
id: Cg,
|
|
6458
6458
|
detector: ek,
|
|
6459
6459
|
loader: rk
|
|
6460
6460
|
}, ik = nk, wg = "mindmap", ak = (t) => /^\s*mindmap/.test(t), ok = async () => {
|
|
6461
|
-
const { diagram: t } = await import("./mindmap-definition-8da855dc-
|
|
6461
|
+
const { diagram: t } = await import("./mindmap-definition-8da855dc-dcsxdIKZ.mjs");
|
|
6462
6462
|
return { id: wg, diagram: t };
|
|
6463
6463
|
}, sk = {
|
|
6464
6464
|
id: wg,
|
|
6465
6465
|
detector: ak,
|
|
6466
6466
|
loader: ok
|
|
6467
6467
|
}, lk = sk, Sg = "sankey", uk = (t) => /^\s*sankey-beta/.test(t), Tk = async () => {
|
|
6468
|
-
const { diagram: t } = await import("./sankeyDiagram-a04cb91d-
|
|
6468
|
+
const { diagram: t } = await import("./sankeyDiagram-a04cb91d-d7gbMMyp.mjs");
|
|
6469
6469
|
return { id: Sg, diagram: t };
|
|
6470
6470
|
}, Qk = {
|
|
6471
6471
|
id: Sg,
|
|
6472
6472
|
detector: uk,
|
|
6473
6473
|
loader: Tk
|
|
6474
6474
|
}, ck = Qk, Ag = "block", hk = (t) => /^\s*block-beta/.test(t), fk = async () => {
|
|
6475
|
-
const { diagram: t } = await import("./blockDiagram-c4efeb88-
|
|
6475
|
+
const { diagram: t } = await import("./blockDiagram-c4efeb88-Bmv13dx4.mjs");
|
|
6476
6476
|
return { id: Ag, diagram: t };
|
|
6477
6477
|
}, dk = {
|
|
6478
6478
|
id: Ag,
|
|
@@ -43491,22 +43491,27 @@ const o9 = (t) => t.type === "text" || t.type === "inlineCode" ? t.value : t.typ
|
|
|
43491
43491
|
const n = e.length;
|
|
43492
43492
|
return e.push(o), `__CHERRY_STUDIO_PROTECTED_${n}__`;
|
|
43493
43493
|
});
|
|
43494
|
-
const i = (o, n, s, l) => {
|
|
43495
|
-
let
|
|
43496
|
-
for (;
|
|
43497
|
-
const
|
|
43498
|
-
if (!
|
|
43499
|
-
|
|
43494
|
+
const i = (o, n, s, l, u = !1) => {
|
|
43495
|
+
let T = "", Q = o;
|
|
43496
|
+
for (; Q.length > 0; ) {
|
|
43497
|
+
const c = rU(Q, n, s);
|
|
43498
|
+
if (!c) {
|
|
43499
|
+
T += Q;
|
|
43500
43500
|
break;
|
|
43501
43501
|
}
|
|
43502
|
-
|
|
43503
|
-
const
|
|
43504
|
-
e.push(`${l}${
|
|
43502
|
+
T += c.pre;
|
|
43503
|
+
const h = e.length;
|
|
43504
|
+
if (e.push(`${l}${c.body}${l}`), T += `__CHERRY_STUDIO_PROTECTED_${h}__`, u) {
|
|
43505
|
+
const f = c.post.indexOf(`
|
|
43506
|
+
`);
|
|
43507
|
+
f === -1 ? Q = "" : Q = c.post.slice(f);
|
|
43508
|
+
} else
|
|
43509
|
+
Q = c.post;
|
|
43505
43510
|
}
|
|
43506
|
-
return
|
|
43511
|
+
return T;
|
|
43507
43512
|
};
|
|
43508
|
-
let a = i(r, "
|
|
43509
|
-
return a = i(a, "\\(", "\\)", "$"), a = a.replace(/__CHERRY_STUDIO_PROTECTED_(\d+)__/g, (o, n) => {
|
|
43513
|
+
let a = i(r, "$$", "$$", "$$", !0);
|
|
43514
|
+
return a = i(a, "\\[", "\\]", "$$", !0), a = i(a, "\\(", "\\)", "$", !1), a = a.replace(/__CHERRY_STUDIO_PROTECTED_(\d+)__/g, (o, n) => {
|
|
43510
43515
|
const s = parseInt(n, 10);
|
|
43511
43516
|
return s >= 0 && s < e.length ? e[s] : o;
|
|
43512
43517
|
}), a;
|