mio-previewer 0.1.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/LICENSE +21 -0
- package/README.md +218 -0
- package/README.zh-CN.md +206 -0
- package/dist/MdRenderer.vue_vue_type_style_index_0_lang-ClzqKjX4.js +4562 -0
- package/dist/MdRenderer.vue_vue_type_style_index_0_lang-Dpnz3CdM.cjs +16 -0
- package/dist/_basePickBy-CZxbwAvt.cjs +1 -0
- package/dist/_basePickBy-nvL1-X4h.js +151 -0
- package/dist/_baseUniq-Cwhfu1XM.js +614 -0
- package/dist/_baseUniq-DunUk-cd.cjs +1 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/arc-C9I4pYLv.js +83 -0
- package/dist/arc-fCflz0gB.cjs +1 -0
- package/dist/architecture-O4VJ6CD3-D00QJU0o.js +5 -0
- package/dist/architecture-O4VJ6CD3-dKuizgWO.cjs +1 -0
- package/dist/architectureDiagram-VXUJARFQ-DQ-YD3RX.cjs +36 -0
- package/dist/architectureDiagram-VXUJARFQ-VWr1UuPv.js +4662 -0
- package/dist/assets/parser.worker-67NQKZt5.js +16 -0
- package/dist/blockDiagram-VD42YOAC-DuC96I2Q.js +2261 -0
- package/dist/blockDiagram-VD42YOAC-EC2x5LwN.cjs +122 -0
- package/dist/c4Diagram-YG6GDRKO-Dm5d0BWL.cjs +10 -0
- package/dist/c4Diagram-YG6GDRKO-OB8wIuF8.js +1580 -0
- package/dist/channel-C-uR528Z.js +5 -0
- package/dist/channel-YfH5CBV-.cjs +1 -0
- package/dist/chunk-4BX2VUAB-3Liht_XN.cjs +1 -0
- package/dist/chunk-4BX2VUAB-j8LeaMvy.js +8 -0
- package/dist/chunk-55IACEB6-Dm3mi3ha.cjs +1 -0
- package/dist/chunk-55IACEB6-IYAIzfR4.js +8 -0
- package/dist/chunk-B4BG7PRW-CpqTB0S5.cjs +165 -0
- package/dist/chunk-B4BG7PRW-DB5df3Iz.js +1375 -0
- package/dist/chunk-DI55MBZ5-BoFZpvY3.js +1370 -0
- package/dist/chunk-DI55MBZ5-wqsoqtNw.cjs +220 -0
- package/dist/chunk-FMBD7UC4-BZS_4hun.cjs +15 -0
- package/dist/chunk-FMBD7UC4-CdmoYYnM.js +19 -0
- package/dist/chunk-QN33PNHL-BuyP9RXS.js +19 -0
- package/dist/chunk-QN33PNHL-CHI_-zix.cjs +1 -0
- package/dist/chunk-QZHKN3VN-15dJyQk0.js +15 -0
- package/dist/chunk-QZHKN3VN-DfH9qQ3T.cjs +1 -0
- package/dist/chunk-TZMSLE5B-BgFWf03M.js +64 -0
- package/dist/chunk-TZMSLE5B-qIo1h7Gz.cjs +1 -0
- package/dist/classDiagram-2ON5EDUG-BQz3UzKi.js +16 -0
- package/dist/classDiagram-2ON5EDUG-CZWeacVd.cjs +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-BQz3UzKi.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-CZWeacVd.cjs +1 -0
- package/dist/clone-ByeQKKoW.cjs +1 -0
- package/dist/clone-D6h_cwF4.js +8 -0
- package/dist/cose-bilkent-S5V4N54A-5dO3qpr4.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-D2q7jBXB.js +2609 -0
- package/dist/cytoscape.esm-DHF7mANN.cjs +331 -0
- package/dist/cytoscape.esm-DfdJODL8.js +18735 -0
- package/dist/dagre-6UL2VRFP-Cfh4UdSr.js +444 -0
- package/dist/dagre-6UL2VRFP-DS2Ki9Dv.cjs +4 -0
- package/dist/defaultLocale-D7EN2tov.js +171 -0
- package/dist/defaultLocale-DIVzfLaQ.cjs +1 -0
- package/dist/diagram-PSM6KHXK-BZDEX43o.js +531 -0
- package/dist/diagram-PSM6KHXK-CTsP6f2a.cjs +24 -0
- package/dist/diagram-QEK2KX5R-BDKMNi97.cjs +43 -0
- package/dist/diagram-QEK2KX5R-Dda_FEDc.js +217 -0
- package/dist/diagram-S2PKOQOG-CmfsKOvs.cjs +24 -0
- package/dist/diagram-S2PKOQOG-Cnw4b7LB.js +142 -0
- package/dist/entries/md.cjs.js +1 -0
- package/dist/entries/md.es.js +5 -0
- package/dist/entries/plugin-alert.cjs.js +1 -0
- package/dist/entries/plugin-alert.es.js +27 -0
- package/dist/entries/plugin-codeblock.cjs.js +9 -0
- package/dist/entries/plugin-codeblock.es.js +3441 -0
- package/dist/entries/plugin-emoji.cjs.js +1 -0
- package/dist/entries/plugin-emoji.es.js +28 -0
- package/dist/entries/plugin-katex.cjs.js +1 -0
- package/dist/entries/plugin-katex.es.js +92 -0
- package/dist/entries/plugin-mermaid.cjs.js +1 -0
- package/dist/entries/plugin-mermaid.es.js +4 -0
- package/dist/erDiagram-Q2GNP2WA-DE4JLeNF.cjs +60 -0
- package/dist/erDiagram-Q2GNP2WA-qAdA8fbE.js +841 -0
- package/dist/favicon.ico +0 -0
- package/dist/flowDiagram-NV44I4VS-C7YBx4JP.js +1620 -0
- package/dist/flowDiagram-NV44I4VS-j3dB-fjF.cjs +162 -0
- package/dist/ganttDiagram-LVOFAZNH-BL-Yjadx.js +2506 -0
- package/dist/ganttDiagram-LVOFAZNH-CBhzET57.cjs +267 -0
- package/dist/gitGraph-ZV4HHKMB-Dr9sn7R3.js +5 -0
- package/dist/gitGraph-ZV4HHKMB-DyXW77WY.cjs +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-DDklxVnY.cjs +65 -0
- package/dist/gitGraphDiagram-NY62KEGX-DFn7h5BH.js +699 -0
- package/dist/graph-CHoeKkVR.cjs +1 -0
- package/dist/graph-DiGqaw_6.js +247 -0
- package/dist/info-63CPKGFF-BGxbI0Qv.cjs +1 -0
- package/dist/info-63CPKGFF-xflgSxfH.js +5 -0
- package/dist/infoDiagram-F6ZHWCRC-DOtGa28U.js +24 -0
- package/dist/infoDiagram-F6ZHWCRC-Duylo4r7.cjs +2 -0
- package/dist/init-CHZsXQcr.cjs +1 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q-bJncB3oe.js +834 -0
- package/dist/journeyDiagram-XKPGCS4Q-h-CtcfbS.cjs +139 -0
- package/dist/kanban-definition-3W4ZIXB7-C3y0C_bw.cjs +89 -0
- package/dist/kanban-definition-3W4ZIXB7-nMPCi8GW.js +719 -0
- package/dist/katex-CmGeg_OO.js +11692 -0
- package/dist/katex-DEiiRhcn.cjs +261 -0
- package/dist/layout-BG4AbhIW.cjs +1 -0
- package/dist/layout-CHaNS4g6.js +1324 -0
- package/dist/linear-Bqd4C_Yb.cjs +1 -0
- package/dist/linear-CPFNaVnw.js +259 -0
- package/dist/mermaid-parser.core-CR8Rcyps.cjs +128 -0
- package/dist/mermaid-parser.core-CkQKh-yb.js +12966 -0
- package/dist/mindmap-definition-VGOIOE7T-C63AEIdU.js +784 -0
- package/dist/mindmap-definition-VGOIOE7T-CHI9UFtA.cjs +68 -0
- package/dist/mio-previewer.cjs.js +3 -0
- package/dist/mio-previewer.css +1 -0
- package/dist/mio-previewer.es.js +25 -0
- package/dist/ordinal-CagbB1m8.cjs +1 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/packet-HUATNLJX-BeAGxpDF.cjs +1 -0
- package/dist/packet-HUATNLJX-dnmrn2-l.js +5 -0
- package/dist/parser.worker.js +21 -0
- package/dist/pie-WTHONI2E-BKoHQt0i.js +5 -0
- package/dist/pie-WTHONI2E-BifrFKgo.cjs +1 -0
- package/dist/pieDiagram-ADFJNKIX-B9OONHi_.cjs +30 -0
- package/dist/pieDiagram-ADFJNKIX-CEMFAt9B.js +161 -0
- package/dist/plugin-mermaid-FTki7cN8.cjs +255 -0
- package/dist/plugin-mermaid-y4lbJ7sL.js +15369 -0
- package/dist/quadrantDiagram-AYHSOK5B-DobvzsAU.js +1022 -0
- package/dist/quadrantDiagram-AYHSOK5B-DqXDgyBD.cjs +7 -0
- package/dist/radar-NJJJXTRR-BPN19Spv.cjs +1 -0
- package/dist/radar-NJJJXTRR-Bj9rI8mr.js +5 -0
- package/dist/requirementDiagram-UZGBJVZJ-CVbmNF7M.cjs +64 -0
- package/dist/requirementDiagram-UZGBJVZJ-M-MPvTnX.js +850 -0
- package/dist/sankeyDiagram-TZEHDZUN-C-ESiLJA.cjs +10 -0
- package/dist/sankeyDiagram-TZEHDZUN-Czsin99f.js +810 -0
- package/dist/sequenceDiagram-WL72ISMW-BJByNQsK.js +2511 -0
- package/dist/sequenceDiagram-WL72ISMW-DApIQwP-.cjs +145 -0
- package/dist/stateDiagram-FKZM4ZOC-BuKL2w66.cjs +1 -0
- package/dist/stateDiagram-FKZM4ZOC-jAiBDhVn.js +263 -0
- package/dist/stateDiagram-v2-4FDKWEC3-Ct5PFxdd.cjs +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-umSVoFht.js +16 -0
- package/dist/timeline-definition-IT6M3QCI-BfAvK0gf.cjs +61 -0
- package/dist/timeline-definition-IT6M3QCI-I--lBLTi.js +795 -0
- package/dist/treemap-75Q7IDZK-DNt-zuL8.cjs +1 -0
- package/dist/treemap-75Q7IDZK-bjql9DgL.js +5 -0
- package/dist/types/entries/md.d.ts +3 -0
- package/dist/types/entries/plugin-alert.d.ts +1 -0
- package/dist/types/entries/plugin-codeblock.d.ts +1 -0
- package/dist/types/entries/plugin-emoji.d.ts +1 -0
- package/dist/types/entries/plugin-katex.d.ts +1 -0
- package/dist/types/entries/plugin-mermaid.d.ts +1 -0
- package/dist/types/helpers/containerHelpers.d.ts +47 -0
- package/dist/types/helpers/index.d.ts +4 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/main-plugin-demo.d.ts +1 -0
- package/dist/types/main.d.ts +1 -0
- package/dist/types/plugins/AlertPlugin.d.ts +16 -0
- package/dist/types/plugins/CodeBlockPlugin.d.ts +9 -0
- package/dist/types/plugins/EmojiPlugin.d.ts +11 -0
- package/dist/types/plugins/katexPlugin.d.ts +8 -0
- package/dist/types/plugins/mermaidPlugin.d.ts +13 -0
- package/dist/types/types.d.ts +77 -0
- package/dist/xychartDiagram-PRI3JC2R-BN9e47xe.cjs +7 -0
- package/dist/xychartDiagram-PRI3JC2R-XrOK_egj.js +1340 -0
- package/package.json +114 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("./plugin-mermaid-FTki7cN8.cjs"),n=require("./_baseUniq-DunUk-cd.cjs");var b=u.baseRest(function(o){return n.baseUniq(n.baseFlatten(o,1,u.isArrayLikeObject,!0))}),E="\0",a="\0",g="";class f{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=u.constant$1(void 0),this._defaultEdgeLabelFn=u.constant$1(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return u.isFunction(e)||(e=u.constant$1(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return n.keys(this._nodes)}sources(){var e=this;return n.filter(this.nodes(),function(t){return u.isEmpty(e._in[t])})}sinks(){var e=this;return n.filter(this.nodes(),function(t){return u.isEmpty(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return n.forEach(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],n.forEach(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),n.forEach(n.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],n.forEach(n.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n.isUndefined(t))t=a;else{t+="";for(var s=t;!n.isUndefined(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(n.isUndefined(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return n.keys(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return n.keys(t)}successors(e){var t=this._sucs[e];if(t)return n.keys(t)}neighbors(e){var t=this.predecessors(e);if(t)return b(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;n.forEach(this._nodes,function(h,d){e(d)&&t.setNode(d,h)}),n.forEach(this._edgeObjs,function(h){t.hasNode(h.v)&&t.hasNode(h.w)&&t.setEdge(h,s.edge(h))});var i={};function r(h){var d=s.parent(h);return d===void 0||t.hasNode(d)?(i[h]=d,d):d in i?i[d]:r(d)}return this._isCompound&&n.forEach(t.nodes(),function(h){t.setParent(h,r(h))}),t}setDefaultEdgeLabel(e){return u.isFunction(e)||(e=u.constant$1(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return n.values(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return n.reduce(e,function(r,h){return i.length>1?s.setEdge(r,h,t):s.setEdge(r,h),h}),this}setEdge(){var e,t,s,i,r=!1,h=arguments[0];typeof h=="object"&&h!==null&&"v"in h?(e=h.v,t=h.w,s=h.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=h,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,n.isUndefined(s)||(s=""+s);var d=_(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,d))return r&&(this._edgeLabels[d]=i),this;if(!n.isUndefined(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[d]=r?i:this._defaultEdgeLabelFn(e,t,s);var l=y(this._isDirected,e,t,s);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[d]=l,p(this._preds[t],e),p(this._sucs[e],t),this._in[t][d]=l,this._out[e][d]=l,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?c(this._isDirected,arguments[0]):_(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?c(this._isDirected,arguments[0]):_(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?c(this._isDirected,arguments[0]):_(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],m(this._preds[t],e),m(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=n.values(s);return t?n.filter(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=n.values(s);return t?n.filter(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}f.prototype._nodeCount=0;f.prototype._edgeCount=0;function p(o,e){o[e]?o[e]++:o[e]=1}function m(o,e){--o[e]||delete o[e]}function _(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var h=i;i=r,r=h}return i+g+r+g+(n.isUndefined(s)?E:s)}function y(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var h=i;i=r,r=h}var d={v:i,w:r};return s&&(d.name=s),d}function c(o,e){return _(o,e.v,e.w,e.name)}exports.Graph=f;
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { ar as N, as as v, at as f, au as b, av as E } from "./plugin-mermaid-y4lbJ7sL.js";
|
|
2
|
+
import { a as j, c as P, k as _, f as g, d, i as l, v as p, r as D } from "./_baseUniq-Cwhfu1XM.js";
|
|
3
|
+
var w = N(function(o) {
|
|
4
|
+
return j(P(o, 1, v, !0));
|
|
5
|
+
}), F = "\0", a = "\0", O = "";
|
|
6
|
+
class L {
|
|
7
|
+
constructor(e = {}) {
|
|
8
|
+
this._isDirected = Object.prototype.hasOwnProperty.call(e, "directed") ? e.directed : !0, this._isMultigraph = Object.prototype.hasOwnProperty.call(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.prototype.hasOwnProperty.call(e, "compound") ? e.compound : !1, this._label = void 0, this._defaultNodeLabelFn = f(void 0), this._defaultEdgeLabelFn = f(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[a] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
|
|
9
|
+
}
|
|
10
|
+
/* === Graph functions ========= */
|
|
11
|
+
isDirected() {
|
|
12
|
+
return this._isDirected;
|
|
13
|
+
}
|
|
14
|
+
isMultigraph() {
|
|
15
|
+
return this._isMultigraph;
|
|
16
|
+
}
|
|
17
|
+
isCompound() {
|
|
18
|
+
return this._isCompound;
|
|
19
|
+
}
|
|
20
|
+
setGraph(e) {
|
|
21
|
+
return this._label = e, this;
|
|
22
|
+
}
|
|
23
|
+
graph() {
|
|
24
|
+
return this._label;
|
|
25
|
+
}
|
|
26
|
+
/* === Node functions ========== */
|
|
27
|
+
setDefaultNodeLabel(e) {
|
|
28
|
+
return b(e) || (e = f(e)), this._defaultNodeLabelFn = e, this;
|
|
29
|
+
}
|
|
30
|
+
nodeCount() {
|
|
31
|
+
return this._nodeCount;
|
|
32
|
+
}
|
|
33
|
+
nodes() {
|
|
34
|
+
return _(this._nodes);
|
|
35
|
+
}
|
|
36
|
+
sources() {
|
|
37
|
+
var e = this;
|
|
38
|
+
return g(this.nodes(), function(t) {
|
|
39
|
+
return E(e._in[t]);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
sinks() {
|
|
43
|
+
var e = this;
|
|
44
|
+
return g(this.nodes(), function(t) {
|
|
45
|
+
return E(e._out[t]);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
setNodes(e, t) {
|
|
49
|
+
var s = arguments, i = this;
|
|
50
|
+
return d(e, function(r) {
|
|
51
|
+
s.length > 1 ? i.setNode(r, t) : i.setNode(r);
|
|
52
|
+
}), this;
|
|
53
|
+
}
|
|
54
|
+
setNode(e, t) {
|
|
55
|
+
return Object.prototype.hasOwnProperty.call(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = a, this._children[e] = {}, this._children[a][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
|
|
56
|
+
}
|
|
57
|
+
node(e) {
|
|
58
|
+
return this._nodes[e];
|
|
59
|
+
}
|
|
60
|
+
hasNode(e) {
|
|
61
|
+
return Object.prototype.hasOwnProperty.call(this._nodes, e);
|
|
62
|
+
}
|
|
63
|
+
removeNode(e) {
|
|
64
|
+
if (Object.prototype.hasOwnProperty.call(this._nodes, e)) {
|
|
65
|
+
var t = (s) => this.removeEdge(this._edgeObjs[s]);
|
|
66
|
+
delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], d(this.children(e), (s) => {
|
|
67
|
+
this.setParent(s);
|
|
68
|
+
}), delete this._children[e]), d(_(this._in[e]), t), delete this._in[e], delete this._preds[e], d(_(this._out[e]), t), delete this._out[e], delete this._sucs[e], --this._nodeCount;
|
|
69
|
+
}
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
setParent(e, t) {
|
|
73
|
+
if (!this._isCompound)
|
|
74
|
+
throw new Error("Cannot set parent in a non-compound graph");
|
|
75
|
+
if (l(t))
|
|
76
|
+
t = a;
|
|
77
|
+
else {
|
|
78
|
+
t += "";
|
|
79
|
+
for (var s = t; !l(s); s = this.parent(s))
|
|
80
|
+
if (s === e)
|
|
81
|
+
throw new Error("Setting " + t + " as parent of " + e + " would create a cycle");
|
|
82
|
+
this.setNode(t);
|
|
83
|
+
}
|
|
84
|
+
return this.setNode(e), this._removeFromParentsChildList(e), this._parent[e] = t, this._children[t][e] = !0, this;
|
|
85
|
+
}
|
|
86
|
+
_removeFromParentsChildList(e) {
|
|
87
|
+
delete this._children[this._parent[e]][e];
|
|
88
|
+
}
|
|
89
|
+
parent(e) {
|
|
90
|
+
if (this._isCompound) {
|
|
91
|
+
var t = this._parent[e];
|
|
92
|
+
if (t !== a)
|
|
93
|
+
return t;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
children(e) {
|
|
97
|
+
if (l(e) && (e = a), this._isCompound) {
|
|
98
|
+
var t = this._children[e];
|
|
99
|
+
if (t)
|
|
100
|
+
return _(t);
|
|
101
|
+
} else {
|
|
102
|
+
if (e === a)
|
|
103
|
+
return this.nodes();
|
|
104
|
+
if (this.hasNode(e))
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
predecessors(e) {
|
|
109
|
+
var t = this._preds[e];
|
|
110
|
+
if (t)
|
|
111
|
+
return _(t);
|
|
112
|
+
}
|
|
113
|
+
successors(e) {
|
|
114
|
+
var t = this._sucs[e];
|
|
115
|
+
if (t)
|
|
116
|
+
return _(t);
|
|
117
|
+
}
|
|
118
|
+
neighbors(e) {
|
|
119
|
+
var t = this.predecessors(e);
|
|
120
|
+
if (t)
|
|
121
|
+
return w(t, this.successors(e));
|
|
122
|
+
}
|
|
123
|
+
isLeaf(e) {
|
|
124
|
+
var t;
|
|
125
|
+
return this.isDirected() ? t = this.successors(e) : t = this.neighbors(e), t.length === 0;
|
|
126
|
+
}
|
|
127
|
+
filterNodes(e) {
|
|
128
|
+
var t = new this.constructor({
|
|
129
|
+
directed: this._isDirected,
|
|
130
|
+
multigraph: this._isMultigraph,
|
|
131
|
+
compound: this._isCompound
|
|
132
|
+
});
|
|
133
|
+
t.setGraph(this.graph());
|
|
134
|
+
var s = this;
|
|
135
|
+
d(this._nodes, function(n, h) {
|
|
136
|
+
e(h) && t.setNode(h, n);
|
|
137
|
+
}), d(this._edgeObjs, function(n) {
|
|
138
|
+
t.hasNode(n.v) && t.hasNode(n.w) && t.setEdge(n, s.edge(n));
|
|
139
|
+
});
|
|
140
|
+
var i = {};
|
|
141
|
+
function r(n) {
|
|
142
|
+
var h = s.parent(n);
|
|
143
|
+
return h === void 0 || t.hasNode(h) ? (i[n] = h, h) : h in i ? i[h] : r(h);
|
|
144
|
+
}
|
|
145
|
+
return this._isCompound && d(t.nodes(), function(n) {
|
|
146
|
+
t.setParent(n, r(n));
|
|
147
|
+
}), t;
|
|
148
|
+
}
|
|
149
|
+
/* === Edge functions ========== */
|
|
150
|
+
setDefaultEdgeLabel(e) {
|
|
151
|
+
return b(e) || (e = f(e)), this._defaultEdgeLabelFn = e, this;
|
|
152
|
+
}
|
|
153
|
+
edgeCount() {
|
|
154
|
+
return this._edgeCount;
|
|
155
|
+
}
|
|
156
|
+
edges() {
|
|
157
|
+
return p(this._edgeObjs);
|
|
158
|
+
}
|
|
159
|
+
setPath(e, t) {
|
|
160
|
+
var s = this, i = arguments;
|
|
161
|
+
return D(e, function(r, n) {
|
|
162
|
+
return i.length > 1 ? s.setEdge(r, n, t) : s.setEdge(r, n), n;
|
|
163
|
+
}), this;
|
|
164
|
+
}
|
|
165
|
+
/*
|
|
166
|
+
* setEdge(v, w, [value, [name]])
|
|
167
|
+
* setEdge({ v, w, [name] }, [value])
|
|
168
|
+
*/
|
|
169
|
+
setEdge() {
|
|
170
|
+
var e, t, s, i, r = !1, n = arguments[0];
|
|
171
|
+
typeof n == "object" && n !== null && "v" in n ? (e = n.v, t = n.w, s = n.name, arguments.length === 2 && (i = arguments[1], r = !0)) : (e = n, t = arguments[1], s = arguments[3], arguments.length > 2 && (i = arguments[2], r = !0)), e = "" + e, t = "" + t, l(s) || (s = "" + s);
|
|
172
|
+
var h = c(this._isDirected, e, t, s);
|
|
173
|
+
if (Object.prototype.hasOwnProperty.call(this._edgeLabels, h))
|
|
174
|
+
return r && (this._edgeLabels[h] = i), this;
|
|
175
|
+
if (!l(s) && !this._isMultigraph)
|
|
176
|
+
throw new Error("Cannot set a named edge when isMultigraph = false");
|
|
177
|
+
this.setNode(e), this.setNode(t), this._edgeLabels[h] = r ? i : this._defaultEdgeLabelFn(e, t, s);
|
|
178
|
+
var u = M(this._isDirected, e, t, s);
|
|
179
|
+
return e = u.v, t = u.w, Object.freeze(u), this._edgeObjs[h] = u, y(this._preds[t], e), y(this._sucs[e], t), this._in[t][h] = u, this._out[e][h] = u, this._edgeCount++, this;
|
|
180
|
+
}
|
|
181
|
+
edge(e, t, s) {
|
|
182
|
+
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s);
|
|
183
|
+
return this._edgeLabels[i];
|
|
184
|
+
}
|
|
185
|
+
hasEdge(e, t, s) {
|
|
186
|
+
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s);
|
|
187
|
+
return Object.prototype.hasOwnProperty.call(this._edgeLabels, i);
|
|
188
|
+
}
|
|
189
|
+
removeEdge(e, t, s) {
|
|
190
|
+
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s), r = this._edgeObjs[i];
|
|
191
|
+
return r && (e = r.v, t = r.w, delete this._edgeLabels[i], delete this._edgeObjs[i], C(this._preds[t], e), C(this._sucs[e], t), delete this._in[t][i], delete this._out[e][i], this._edgeCount--), this;
|
|
192
|
+
}
|
|
193
|
+
inEdges(e, t) {
|
|
194
|
+
var s = this._in[e];
|
|
195
|
+
if (s) {
|
|
196
|
+
var i = p(s);
|
|
197
|
+
return t ? g(i, function(r) {
|
|
198
|
+
return r.v === t;
|
|
199
|
+
}) : i;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
outEdges(e, t) {
|
|
203
|
+
var s = this._out[e];
|
|
204
|
+
if (s) {
|
|
205
|
+
var i = p(s);
|
|
206
|
+
return t ? g(i, function(r) {
|
|
207
|
+
return r.w === t;
|
|
208
|
+
}) : i;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
nodeEdges(e, t) {
|
|
212
|
+
var s = this.inEdges(e, t);
|
|
213
|
+
if (s)
|
|
214
|
+
return s.concat(this.outEdges(e, t));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
L.prototype._nodeCount = 0;
|
|
218
|
+
L.prototype._edgeCount = 0;
|
|
219
|
+
function y(o, e) {
|
|
220
|
+
o[e] ? o[e]++ : o[e] = 1;
|
|
221
|
+
}
|
|
222
|
+
function C(o, e) {
|
|
223
|
+
--o[e] || delete o[e];
|
|
224
|
+
}
|
|
225
|
+
function c(o, e, t, s) {
|
|
226
|
+
var i = "" + e, r = "" + t;
|
|
227
|
+
if (!o && i > r) {
|
|
228
|
+
var n = i;
|
|
229
|
+
i = r, r = n;
|
|
230
|
+
}
|
|
231
|
+
return i + O + r + O + (l(s) ? F : s);
|
|
232
|
+
}
|
|
233
|
+
function M(o, e, t, s) {
|
|
234
|
+
var i = "" + e, r = "" + t;
|
|
235
|
+
if (!o && i > r) {
|
|
236
|
+
var n = i;
|
|
237
|
+
i = r, r = n;
|
|
238
|
+
}
|
|
239
|
+
var h = { v: i, w: r };
|
|
240
|
+
return s && (h.name = s), h;
|
|
241
|
+
}
|
|
242
|
+
function m(o, e) {
|
|
243
|
+
return c(o, e.v, e.w, e.name);
|
|
244
|
+
}
|
|
245
|
+
export {
|
|
246
|
+
L as G
|
|
247
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./mermaid-parser.core-CR8Rcyps.cjs");exports.InfoModule=e.InfoModule;exports.createInfoServices=e.createInfoServices;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { _ as e, l as s, H as o, e as i, I as g } from "./plugin-mermaid-y4lbJ7sL.js";
|
|
2
|
+
import { p } from "./mermaid-parser.core-CkQKh-yb.js";
|
|
3
|
+
var v = {
|
|
4
|
+
parse: /* @__PURE__ */ e(async (r) => {
|
|
5
|
+
const a = await p("info", r);
|
|
6
|
+
s.debug(a);
|
|
7
|
+
}, "parse")
|
|
8
|
+
}, d = {
|
|
9
|
+
version: g.version + ""
|
|
10
|
+
}, c = /* @__PURE__ */ e(() => d.version, "getVersion"), m = {
|
|
11
|
+
getVersion: c
|
|
12
|
+
}, l = /* @__PURE__ */ e((r, a, n) => {
|
|
13
|
+
s.debug(`rendering info diagram
|
|
14
|
+
` + r);
|
|
15
|
+
const t = o(a);
|
|
16
|
+
i(t, 100, 400, !0), t.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${n}`);
|
|
17
|
+
}, "draw"), f = { draw: l }, b = {
|
|
18
|
+
parser: v,
|
|
19
|
+
db: m,
|
|
20
|
+
renderer: f
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
b as diagram
|
|
24
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./plugin-mermaid-FTki7cN8.cjs"),s=require("./mermaid-parser.core-CR8Rcyps.cjs");var i={parse:e.__name(async r=>{const a=await s.parse("info",r);e.log.debug(a)},"parse")},o={version:e.package_default.version+""},g=e.__name(()=>o.version,"getVersion"),d={getVersion:g},v=e.__name((r,a,n)=>{e.log.debug(`rendering info diagram
|
|
2
|
+
`+r);const t=e.selectSvgElement(a);e.configureSvgSize(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),c={draw:v},p={parser:i,db:d,renderer:c};exports.diagram=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function a(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}exports.initRange=a;
|