ts-graphviz
Advanced tools
Comparing version 0.10.0 to 0.11.0
@@ -16,2 +16,2 @@ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).graphviz={})}(this,(function(t){"use strict";var e,r,o,n;(e=t.attribute||(t.attribute={})).Damping="Damping",e.K="K",e.URL="URL",e._background="_background",e.area="area",e.arrowhead="arrowhead",e.arrowsize="arrowsize",e.arrowtail="arrowtail",e.bb="bb",e.bgcolor="bgcolor",e.center="center",e.charset="charset",e.clusterrank="clusterrank",e.color="color",e.colorscheme="colorscheme",e.comment="comment",e.compound="compound",e.concentrate="concentrate",e.constraint="constraint",e.decorate="decorate",e.defaultdist="defaultdist",e.dim="dim",e.dimen="dimen",e.dir="dir",e.diredgeconstraints="diredgeconstraints",e.distortion="distortion",e.dpi="dpi",e.edgeURL="edgeURL",e.edgehref="edgehref",e.edgetarget="edgetarget",e.edgetooltip="edgetooltip",e.epsilon="epsilon",e.esep="esep",e.fillcolor="fillcolor",e.fixedsize="fixedsize",e.fontcolor="fontcolor",e.fontname="fontname",e.fontnames="fontnames",e.fontpath="fontpath",e.fontsize="fontsize",e.forcelabels="forcelabels",e.gradientangle="gradientangle",e.group="group",e.headURL="headURL",e.head_lp="head_lp",e.headclip="headclip",e.headhref="headhref",e.headlabel="headlabel",e.headport="headport",e.headtarget="headtarget",e.headtooltip="headtooltip",e.height="height",e.href="href",e.id="id",e.image="image",e.imagepath="imagepath",e.imagepos="imagepos",e.imagescale="imagescale",e.inputscale="inputscale",e.label="label",e.labelURL="labelURL",e.label_scheme="label_scheme",e.labelangle="labelangle",e.labeldistance="labeldistance",e.labelfloat="labelfloat",e.labelfontcolor="labelfontcolor",e.labelfontname="labelfontname",e.labelfontsize="labelfontsize",e.labelhref="labelhref",e.labeljust="labeljust",e.labelloc="labelloc",e.labeltarget="labeltarget",e.labeltooltip="labeltooltip",e.landscape="landscape",e.layer="layer",e.layerlistsep="layerlistsep",e.layers="layers",e.layerselect="layerselect",e.layersep="layersep",e.layout="layout",e.len="len",e.levels="levels",e.levelsgap="levelsgap",e.lhead="lhead",e.lheight="lheight",e.lp="lp",e.ltail="ltail",e.lwidth="lwidth",e.margin="margin",e.maxiter="maxiter",e.mclimit="mclimit",e.mindist="mindist",e.minlen="minlen",e.mode="mode",e.model="model",e.mosek="mosek",e.newrank="newrank",e.nodesep="nodesep",e.nojustify="nojustify",e.normalize="normalize",e.notranslate="notranslate",e.nslimit="nslimit",e.nslimit1="nslimit1",e.ordering="ordering",e.orientation="orientation",e.outputorder="outputorder",e.overlap="overlap",e.overlap_scaling="overlap_scaling",e.overlap_shrink="overlap_shrink",e.pack="pack",e.packmode="packmode",e.pad="pad",e.page="page",e.pagedir="pagedir",e.pencolor="pencolor",e.penwidth="penwidth",e.peripheries="peripheries",e.pin="pin",e.pos="pos",e.quadtree="quadtree",e.quantum="quantum",e.rank="rank",e.rankdir="rankdir",e.ranksep="ranksep",e.ratio="ratio",e.rects="rects",e.regular="regular",e.remincross="remincross",e.repulsiveforce="repulsiveforce",e.resolution="resolution",e.root="root",e.rotate="rotate",e.rotation="rotation",e.samehead="samehead",e.sametail="sametail",e.samplepoints="samplepoints",e.scale="scale",e.searchsize="searchsize",e.sep="sep",e.shape="shape",e.shapefile="shapefile",e.showboxes="showboxes",e.sides="sides",e.size="size",e.skew="skew",e.smoothing="smoothing",e.sortv="sortv",e.splines="splines",e.start="start",e.style="style",e.stylesheet="stylesheet",e.tailURL="tailURL",e.tail_lp="tail_lp",e.tailclip="tailclip",e.tailhref="tailhref",e.taillabel="taillabel",e.tailport="tailport",e.tailtarget="tailtarget",e.tailtooltip="tailtooltip",e.target="target",e.tooltip="tooltip",e.truecolor="truecolor",e.vertices="vertices",e.viewport="viewport",e.voro_margin="voro_margin",e.weight="weight",e.width="width",e.xdotversion="xdotversion",e.xlabel="xlabel",e.xlp="xlp",e.z="z",(r=t.RootClusterType||(t.RootClusterType={})).digraph="digraph",r.graph="graph",(o=t.ClusterType||(t.ClusterType={})).digraph="digraph",o.graph="graph",o.subgraph="subgraph",(n=t.DotEntityType||(t.DotEntityType={})).digraph="digraph",n.graph="graph",n.subgraph="subgraph",n.node="node",n.edge="edge",function(t){t.n="n",t.ne="ne",t.e="e",t.se="se",t.s="s",t.sw="sw",t.w="w",t.nw="nw",t.c="c";var e=[t.n,t.ne,t.e,t.se,t.s,t.sw,t.w,t.nw,t.c];t.is=function(t){return e.includes(t)}}(t.Compass||(t.Compass={})); | ||
***************************************************************************** */ | ||
var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function a(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function s(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var o=Array(t),n=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,n++)o[n]=i[a];return o}var p=function(){},l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e}(p);function u(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.filter((function(t){return"string"==typeof t})).join(t)}}var c=u(" "),h=u(":"),d=u("\n");function f(t){return t.split("\n").map((function(t){return" "+t})).join("\n")}function g(t){return t.split("\n").map((function(t){return("// "+t).trim()})).join("\n")}var m=function(t){function e(e){var r=t.call(this)||this;r.isNotString="string"!=typeof e;var o="string"==typeof e?e:e.toString();if(r.isNotString)r.isHTMLLike=!1,r.isQuoteRequired=!1;else{var n=o.trim();r.isHTMLLike=/^<.+>$/ms.test(n),r.isHTMLLike?(o=n,r.isQuoteRequired=!1):r.isQuoteRequired=!0}return r.value=o,r}return a(e,t),e.prototype.toDot=function(){if(this.isNotString||this.isHTMLLike)return this.value;var t=this.value;return this.isQuoteRequired&&(t='"'+t.replace(/\n/g,"\\n").replace(/"/g,'\\"')+'"'),t},e}(l),y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrs=new Map,e}return a(e,t),Object.defineProperty(e.prototype,"size",{get:function(){return this.attrs.size},enumerable:!0,configurable:!0}),e.prototype.get=function(t){return this.attrs.get(t)},e.prototype.set=function(t,e){this.attrs.set(t,new m(e))},e.prototype.delete=function(t){this.attrs.delete(t)},e.prototype.apply=function(t){for(var e=0,r=Object.entries(t);e<r.length;e++){var o=r[e],n=o[0],i=o[1];this.set(n,i)}},e.prototype.clear=function(){this.attrs.clear()},e}(l),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.toDot=function(){return 0===this.size?"":d("[",f(d.apply(void 0,s([this.comment?g(this.comment):void 0],Array.from(this.attrs.entries()).map((function(t){return t[0]+" = "+t[1].toDot()+","}))))),"]")},e}(y),v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.nodes=new Map,e.edges=new Set,e.subgraphs=new Set,e}return a(e,t),Object.defineProperty(e.prototype,"id",{get:function(){var t;return null===(t=this.internalID)||void 0===t?void 0:t.value},set:function(t){this.internalID="string"==typeof t?new m(t):void 0},enumerable:!0,configurable:!0}),e.prototype.addNode=function(t){this.nodes.set(t.id,t)},e.prototype.addEdge=function(t){this.edges.add(t)},e.prototype.addSubgraph=function(t){this.subgraphs.add(t)},e.prototype.existNode=function(t){return this.nodes.has(t)},e.prototype.existEdge=function(t){return this.edges.has(t)},e.prototype.existSubgraph=function(t){return this.subgraphs.has(t)},e.prototype.createSubgraph=function(t){var e=this.context.createSubgraph(t);return this.subgraphs.add(e),e},e.prototype.removeNode=function(t){this.nodes.delete("string"==typeof t?t:t.id)},e.prototype.removeEdge=function(t){this.edges.delete(t)},e.prototype.removeSubgraph=function(t){this.subgraphs.delete(t)},e.prototype.createNode=function(t){var e=this.context.createNode(t);return this.nodes.set(t,e),e},e.prototype.getSubgraph=function(t){return Array.from(this.subgraphs.values()).find((function(e){return e.id===t}))},e.prototype.getNode=function(t){return this.nodes.get(t)},e.prototype.createEdge=function(t,e){for(var r,o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];var i=(r=this.context).createEdge.apply(r,s([this,t,e],o));return this.edges.add(i),i},e.prototype.subgraph=function(t,e){var r,o=t?null!==(r=this.getSubgraph(t))&&void 0!==r?r:this.createSubgraph(t):this.createSubgraph();return e&&e(o),o},e.prototype.node=function(t,e){var r,o=null!==(r=this.getNode(t))&&void 0!==r?r:this.createNode(t);return e&&e(o),o},e.prototype.edge=function(t,e){var r=this.createEdge.apply(this,t);return e&&e(r),r},e.prototype.toDot=function(){var t=this.comment?g(this.comment):void 0;return d(t,this.toDotWithoutComment())},e.prototype.toDotWithoutComment=function(){var t,e=this.type,r=null===(t=this.internalID)||void 0===t?void 0:t.toDot(),o=Array.from(this.attrs.entries()).map((function(t){return t[0]+" = "+t[1].toDot()+";"})),n=Object.entries(this.attributes).filter((function(t){t[0];return t[1].size>0})).map((function(t){return t[0]+" "+t[1].toDot()+";"})),i=Array.from(this.nodes.values()).map((function(t){return t.toDot()})),a=Array.from(this.subgraphs.values()).map((function(t){return t.toDot()})),p=Array.from(this.edges.values()).map((function(t){return t.toDot()})),l=d.apply(void 0,s(o,n,i,a,p));return d(c(e,r,"{"),l?f(l):void 0,"}")},e}(y),w=function(e){function r(r){var o=e.call(this)||this;return o.context=r,o.type=t.ClusterType.subgraph,o.attributes={graph:o.context.createAttributes(),edge:o.context.createAttributes(),node:o.context.createAttributes()},o}return a(r,e),r.prototype.isSubgraphCluster=function(){return"string"==typeof this.id&&this.id.startsWith("cluster")},r}(v),D=function(t){function e(e,r){var o=t.call(this)||this;return o.context=e,o.strict=!1,o.attributes={graph:o.context.createAttributes(),edge:o.context.createAttributes(),node:o.context.createAttributes()},o.id=r,o.context.root=o,o}return a(e,t),e.prototype.toDot=function(){var t=this.comment?g(this.comment):void 0,e=c(this.strict?"strict":void 0,this.toDotWithoutComment());return d(t,e)},e}(v),x=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.RootClusterType.graph,r}return a(r,e),r}(D),k=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.RootClusterType.digraph,r}return a(r,e),r}(D),L=function(t){function e(e){var r=t.call(this)||this;return r.id=e,r.attributes=new b,r.idLiteral=new m(e),r}return a(e,t),e.prototype.toDot=function(){var t=this.comment?g(this.comment):void 0,e=this.toEdgeTargetDot(),r=this.attributes.size>0?" "+this.attributes.toDot():"";return d(t,""+e+r+";")},e.prototype.toEdgeTargetDot=function(){return this.idLiteral.toDot()},e.prototype.port=function(t){return new T(this,"string"==typeof t?{port:t}:t)},e}(l),T=function(){function t(t,e){this.node=t,this.port=e.port?new m(e.port):void 0,this.compass=e.compass}return t.prototype.toEdgeTargetDot=function(){var t;return h(this.node.toEdgeTargetDot(),null===(t=this.port)||void 0===t?void 0:t.toDot(),this.compass)},t}();function z(t){return t instanceof L||t instanceof T}function _(t){return"string"==typeof t||z(t)}var j=function(e){function r(t,r,o){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];var a=e.call(this)||this;return a.context=t,a.attributes=new b,a.targets=s([r,o],n).filter((function(t){return z(t)})),a}return a(r,e),Object.defineProperty(r.prototype,"dotArrow",{get:function(){switch(this.context.graphType){case t.RootClusterType.graph:return"--";case t.RootClusterType.digraph:default:return"->"}},enumerable:!0,configurable:!0}),r.prototype.toDot=function(){var t=this.comment?g(this.comment):void 0,e=" "+this.dotArrow+" ",r=this.targets.map((function(t){return t.toEdgeTargetDot()})).join(e),o=this.attributes.size>0?" "+this.attributes.toDot():"";return d(t,""+r+o+";")},r}(l),R=function(){function e(){}return Object.defineProperty(e.prototype,"graphType",{get:function(){var t;return null===(t=this.root)||void 0===t?void 0:t.type},enumerable:!0,configurable:!0}),e.prototype.createSubgraph=function(t){var e=new w(this);return e.id=t,e},e.prototype.createAttributes=function(){return new b},e.prototype.createNode=function(t){return new L(t)},e.prototype.createEdge=function(t,e,r){for(var o=this,n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];if(!1===(_(e)&&_(r)))throw new Error("The element of Edge target is missing or not satisfied as Edge target.");var a=new(j.bind.apply(j,s([void 0,this,this.toNodeLikeObject(t,e),this.toNodeLikeObject(t,r)],n.map((function(e){return o.toNodeLikeObject(t,e)})))));return a},e.prototype.toNodeLikeObject=function(e,r){if(z(r))return r;var o=r.split(":"),n=o[0],i=o[1],a=o[2],s=e.node(n);return i&&(void 0===a||t.Compass.is(a))?s.port({port:i,compass:a}):s},e}(),E=function(t,e){return void 0===e&&(e=!1),function(r,o){var n=new R,i=new t(n,r);return"function"==typeof o&&o(i),e&&(i.strict=e),i}},C=E(k),A=E(x),N={digraph:E(k,!0),graph:E(x,!0)};t.Attributes=b,t.Cluster=v,t.Context=R,t.Digraph=k,t.DotBase=l,t.Edge=j,t.Graph=x,t.GraphvizObject=p,t.ID=m,t.Node=L,t.NodeWithPort=T,t.RootCluster=D,t.Subgraph=w,t.digraph=C,t.graph=A,t.isEdgeTarget=z,t.isEdgeTargetLike=_,t.strict=N,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function a(t,e){function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function s(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var o=Array(t),n=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,n++)o[n]=i[a];return o}var p=function(){},l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e}(p);function u(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.filter((function(t){return"string"==typeof t})).join(t)}}var c=u(" "),h=u(":"),d=u("\n");function f(t){return t.split("\n").map((function(t){return" "+t})).join("\n")}function g(t){return t.split("\n").map((function(t){return("// "+t).trim()})).join("\n")}var m=function(t){function e(e){var r=t.call(this)||this;r.isNotString="string"!=typeof e;var o="string"==typeof e?e:e.toString();if(r.isNotString)r.isHTMLLike=!1,r.isQuoteRequired=!1;else{var n=o.trim();r.isHTMLLike=/^<.+>$/ms.test(n),r.isHTMLLike?(o=n,r.isQuoteRequired=!1):r.isQuoteRequired=!0}return r.value=o,r}return a(e,t),e.prototype.toDot=function(){if(this.isNotString||this.isHTMLLike)return this.value;var t=this.value;return this.isQuoteRequired&&(t='"'+t.replace(/\n/g,"\\n").replace(/"/g,'\\"')+'"'),t},e}(l),y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrs=new Map,e}return a(e,t),Object.defineProperty(e.prototype,"size",{get:function(){return this.attrs.size},enumerable:!0,configurable:!0}),e.prototype.get=function(t){return this.attrs.get(t)},e.prototype.set=function(t,e){this.attrs.set(t,new m(e))},e.prototype.delete=function(t){this.attrs.delete(t)},e.prototype.apply=function(t){for(var e=0,r=Object.entries(t);e<r.length;e++){var o=r[e],n=o[0],i=o[1];this.set(n,i)}},e.prototype.clear=function(){this.attrs.clear()},e}(l),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.toDot=function(){return 0===this.size?"":d("[",f(d.apply(void 0,s([this.comment?g(this.comment):void 0],Array.from(this.attrs.entries()).map((function(t){return t[0]+" = "+t[1].toDot()+","}))))),"]")},e}(y),v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.nodes=new Map,e.edges=new Set,e.subgraphs=new Set,e}return a(e,t),Object.defineProperty(e.prototype,"id",{get:function(){var t;return null===(t=this.internalID)||void 0===t?void 0:t.value},set:function(t){this.internalID="string"==typeof t?new m(t):void 0},enumerable:!0,configurable:!0}),e.prototype.addNode=function(t){this.nodes.set(t.id,t)},e.prototype.addEdge=function(t){this.edges.add(t)},e.prototype.addSubgraph=function(t){this.subgraphs.add(t)},e.prototype.existNode=function(t){return this.nodes.has(t)},e.prototype.existEdge=function(t){return this.edges.has(t)},e.prototype.existSubgraph=function(t){return this.subgraphs.has(t)},e.prototype.createSubgraph=function(t){var e=this.context.createSubgraph(t);return this.subgraphs.add(e),e},e.prototype.removeNode=function(t){this.nodes.delete("string"==typeof t?t:t.id)},e.prototype.removeEdge=function(t){this.edges.delete(t)},e.prototype.removeSubgraph=function(t){this.subgraphs.delete(t)},e.prototype.createNode=function(t){var e=this.context.createNode(t);return this.nodes.set(t,e),e},e.prototype.getSubgraph=function(t){return Array.from(this.subgraphs.values()).find((function(e){return e.id===t}))},e.prototype.getNode=function(t){return this.nodes.get(t)},e.prototype.createEdge=function(t,e){for(var r,o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];var i=(r=this.context).createEdge.apply(r,s([this,t,e],o));return this.edges.add(i),i},e.prototype.subgraph=function(t,e){var r,o=t?null!==(r=this.getSubgraph(t))&&void 0!==r?r:this.createSubgraph(t):this.createSubgraph();return e&&e(o),o},e.prototype.node=function(t,e){var r,o=null!==(r=this.getNode(t))&&void 0!==r?r:this.createNode(t);return e&&e(o),o},e.prototype.edge=function(t,e){var r=this.createEdge.apply(this,t);return e&&e(r),r},e.prototype.toDot=function(){var t=this.comment?g(this.comment):void 0;return d(t,this.toDotWithoutComment())},e.prototype.toDotWithoutComment=function(){var t,e=this.type,r=null===(t=this.internalID)||void 0===t?void 0:t.toDot(),o=Array.from(this.attrs.entries()).map((function(t){return t[0]+" = "+t[1].toDot()+";"})),n=Object.entries(this.attributes).filter((function(t){t[0];return t[1].size>0})).map((function(t){return t[0]+" "+t[1].toDot()+";"})),i=Array.from(this.nodes.values()).map((function(t){return t.toDot()})),a=Array.from(this.subgraphs.values()).map((function(t){return t.toDot()})),p=Array.from(this.edges.values()).map((function(t){return t.toDot()})),l=d.apply(void 0,s(o,n,i,a,p));return d(c(e,r,"{"),l?f(l):void 0,"}")},e}(y),w=function(e){function r(r){var o=e.call(this)||this;return o.context=r,o.type=t.ClusterType.subgraph,o.attributes={graph:o.context.createAttributes(),edge:o.context.createAttributes(),node:o.context.createAttributes()},o}return a(r,e),r.prototype.isSubgraphCluster=function(){return"string"==typeof this.id&&this.id.startsWith("cluster")},r}(v),D=function(t){function e(e,r){var o=t.call(this)||this;return o.context=e,o.strict=!1,o.attributes={graph:o.context.createAttributes(),edge:o.context.createAttributes(),node:o.context.createAttributes()},o.id=r,o.context.root=o,o}return a(e,t),e.prototype.toDot=function(){var t=this.comment?g(this.comment):void 0,e=c(this.strict?"strict":void 0,this.toDotWithoutComment());return d(t,e)},e}(v),x=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.RootClusterType.graph,r}return a(r,e),r}(D),k=function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.type=t.RootClusterType.digraph,r}return a(r,e),r}(D),T=function(t){function e(e){var r=t.call(this)||this;return r.id=e,r.attributes=new b,r.idLiteral=new m(e),r}return a(e,t),e.prototype.toDot=function(){var t=this.comment?g(this.comment):void 0,e=this.toEdgeTargetDot(),r=this.attributes.size>0?" "+this.attributes.toDot():"";return d(t,""+e+r+";")},e.prototype.toEdgeTargetDot=function(){return this.idLiteral.toDot()},e.prototype.port=function(t){return new L(this,"string"==typeof t?{port:t}:t)},e}(l),L=function(){function t(t,e){this.node=t,this.port=e.port?new m(e.port):void 0,this.compass=e.compass}return t.prototype.toEdgeTargetDot=function(){var t;return h(this.node.toEdgeTargetDot(),null===(t=this.port)||void 0===t?void 0:t.toDot(),this.compass)},t}(),z=function(){function t(t,e){this.id=new m(t),this.port=e.port?new m(e.port):void 0,this.compass=e.compass}return t.prototype.toEdgeTargetDot=function(){var t;return h(this.id.toDot(),null===(t=this.port)||void 0===t?void 0:t.toDot(),this.compass)},t}();function _(t){return t instanceof T||t instanceof L||t instanceof z}function j(t){return"string"==typeof t||_(t)}var R=function(e){function r(t,r,o){for(var n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];var a=e.call(this)||this;return a.context=t,a.attributes=new b,a.targets=s([r,o],n).filter((function(t){return _(t)})),a}return a(r,e),Object.defineProperty(r.prototype,"dotArrow",{get:function(){switch(this.context.graphType){case t.RootClusterType.graph:return"--";case t.RootClusterType.digraph:default:return"->"}},enumerable:!0,configurable:!0}),r.prototype.toDot=function(){var t=this.comment?g(this.comment):void 0,e=" "+this.dotArrow+" ",r=this.targets.map((function(t){return t.toEdgeTargetDot()})).join(e),o=this.attributes.size>0?" "+this.attributes.toDot():"";return d(t,""+r+o+";")},r}(l),E=function(){function e(){}return Object.defineProperty(e.prototype,"graphType",{get:function(){var t;return null===(t=this.root)||void 0===t?void 0:t.type},enumerable:!0,configurable:!0}),e.prototype.createSubgraph=function(t){var e=new w(this);return e.id=t,e},e.prototype.createAttributes=function(){return new b},e.prototype.createNode=function(t){return new T(t)},e.prototype.createEdge=function(t,e,r){for(var o=this,n=[],i=3;i<arguments.length;i++)n[i-3]=arguments[i];if(!1===(j(e)&&j(r)))throw new Error("The element of Edge target is missing or not satisfied as Edge target.");var a=new(R.bind.apply(R,s([void 0,this,this.toNodeLikeObject(t,e),this.toNodeLikeObject(t,r)],n.map((function(e){return o.toNodeLikeObject(t,e)})))));return a},e.prototype.toNodeLikeObject=function(e,r){if(_(r))return r;var o=r.split(":"),n=o[0],i=o[1],a=o[2],s=e.getNode(n);return void 0!==s?i&&(void 0===a||t.Compass.is(a))?s.port({port:i,compass:a}):s:t.Compass.is(a)?new z(n,{port:i,compass:a}):new z(n,{port:i})},e}(),C=function(t,e){return void 0===e&&(e=!1),function(r,o){var n=new E,i=new t(n,r);return"function"==typeof o&&o(i),e&&(i.strict=e),i}},N=C(k),A=C(x),S={digraph:C(k,!0),graph:C(x,!0)};t.Attributes=b,t.Cluster=v,t.Context=E,t.Digraph=k,t.DotBase=l,t.Edge=R,t.ForwardRefNode=z,t.Graph=x,t.GraphvizObject=p,t.ID=m,t.Node=T,t.NodeWithPort=L,t.RootCluster=D,t.Subgraph=w,t.digraph=N,t.graph=A,t.isEdgeTarget=_,t.isEdgeTargetLike=j,t.strict=S,Object.defineProperty(t,"__esModule",{value:!0})})); |
@@ -40,4 +40,17 @@ import { DotBase } from '../abstract'; | ||
/** | ||
* @category Primary | ||
* @hidden | ||
*/ | ||
export declare class ForwardRefNode implements INodeWithPort { | ||
readonly id: ID; | ||
readonly port?: ID; | ||
/** Specify the direction of the edge. */ | ||
readonly compass?: Compass; | ||
constructor(id: string, port: Partial<IPort>); | ||
/** Converts a NodeWithPort to an EdgeTarget. */ | ||
toEdgeTargetDot(): string; | ||
} | ||
/** | ||
* @hidden | ||
*/ | ||
export declare function isEdgeTarget(node: any): node is IEdgeTarget; | ||
@@ -44,0 +57,0 @@ /** |
{ | ||
"name": "ts-graphviz", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"author": "kamiazya <yuki@kamiazya.tech>", | ||
"description": "Graphviz library for TypeScript.", | ||
"homepage": "https://kamiazya.github.io/ts-graphviz/", | ||
"homepage": "https://ts-graphviz.github.io/ts-graphviz/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/kamiazya/ts-graphviz.git" | ||
"url": "https://github.com/ts-graphviz/ts-graphviz.git" | ||
}, | ||
@@ -16,3 +16,3 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/kamiazya/ts-graphviz/issues" | ||
"url": "https://github.com/ts-graphviz/ts-graphviz/issues" | ||
}, | ||
@@ -40,3 +40,3 @@ "funding": { | ||
"jest": "^25.1.0", | ||
"jest-graphviz": "^0.2.0", | ||
"jest-graphviz": "^0.3.1", | ||
"prettier": "^1.18.2", | ||
@@ -43,0 +43,0 @@ "rollup": "^2.0.6", |
@@ -109,3 +109,5 @@ [![GitHub Action](https://github.com/kamiazya/ts-graphviz/workflows/NodeCI/badge.svg)](https://github.com/kamiazya/ts-graphviz/actions?workflow=NodeCI) [![npm version](https://badge.fury.io/js/ts-graphviz.svg)](https://badge.fury.io/js/ts-graphviz) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) [![Maintainability](https://api.codeclimate.com/v1/badges/12a586dde710859d58c7/maintainability)](https://codeclimate.com/github/kamiazya/ts-graphviz/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/12a586dde710859d58c7/test_coverage)](https://codeclimate.com/github/kamiazya/ts-graphviz/test_coverage) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> | ||
- [jest-graphviz](https://github.com/kamiazya/jest-graphviz) | ||
- [@ts-graphviz/react](https://github.com/ts-graphviz/react) | ||
- Graphviz-dot Renderer for React. | ||
- [jest-graphviz](https://github.com/ts-graphviz/jest-graphviz) | ||
- Jest matchers that supports graphviz integration. | ||
@@ -142,2 +144,2 @@ - [setup-graphviz](https://github.com/kamiazya/setup-graphviz) | ||
This software is released under the MIT License, see LICENSE. | ||
This software is released under the MIT License, see [LICENSE](./LICENSE). |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
666949
13288
1
144