@marimo-team/frontend 0.11.25-dev2 → 0.11.25
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/dist/assets/{ConnectedDataExplorerComponent-CX3PynOv.js → ConnectedDataExplorerComponent-CroJPbot.js} +1 -1
- package/dist/assets/{VegaLite-BESqKjsI.js → VegaLite-CL-9-QyL.js} +1 -1
- package/dist/assets/{_baseEach-BLwYzuPY.js → _baseEach-C4Gv2TKe.js} +1 -1
- package/dist/assets/_baseMap-CLDR0GqA.js +1 -0
- package/dist/assets/{_baseUniq-DdpuRz1K.js → _baseUniq-DaNc0Gt2.js} +1 -1
- package/dist/assets/{any-language-editor-CUBrpNK5.js → any-language-editor-Bv7x1Psl.js} +1 -1
- package/dist/assets/{architectureDiagram-UYN6MBPD-gFLG8yNb.js → architectureDiagram-UYN6MBPD-DqrP6Et1.js} +1 -1
- package/dist/assets/{blockDiagram-ZHA2E4KO-BiJkGY-N.js → blockDiagram-ZHA2E4KO-2FqUqn01.js} +1 -1
- package/dist/assets/{c4Diagram-6F5ED5ID-BFrkZ3bk.js → c4Diagram-6F5ED5ID-2sLIryo_.js} +1 -1
- package/dist/assets/channel-BA57w3ph.js +1 -0
- package/dist/assets/{chunk-5HRBRIJM-nfEs1LTn.js → chunk-5HRBRIJM-BjPnW7nP.js} +1 -1
- package/dist/assets/{chunk-7U56Z5CX-C3W2RAZO.js → chunk-7U56Z5CX-CCxTJlhM.js} +1 -1
- package/dist/assets/{chunk-ASOPGD6M-CM-uVyAZ.js → chunk-ASOPGD6M-nphTjt5X.js} +1 -1
- package/dist/assets/{chunk-KFBOBJHC-4nuneWGp.js → chunk-KFBOBJHC-hXQF65pO.js} +1 -1
- package/dist/assets/{chunk-T2TOU4HS-BOagF2LM.js → chunk-T2TOU4HS-lFwHoIu_.js} +1 -1
- package/dist/assets/{chunk-TMUBEWPD-JT32jznd.js → chunk-TMUBEWPD-DJRqYmW2.js} +1 -1
- package/dist/assets/classDiagram-LNE6IOMH-DecC8RgZ.js +1 -0
- package/dist/assets/classDiagram-v2-MQ7JQ4JX-DecC8RgZ.js +1 -0
- package/dist/assets/clone-CDS1CeAK.js +1 -0
- package/dist/assets/{compile--xaaTZ-4.js → compile-Db8BeCVu.js} +1 -1
- package/dist/assets/{dagre-4EVJKHTY-PoWA-wyO.js → dagre-4EVJKHTY-BXeRoIOd.js} +1 -1
- package/dist/assets/{data-editor-Dv_kLhi7.js → data-editor-BatcjCZ5.js} +1 -1
- package/dist/assets/{diagram-QW4FP2JN-BhGdxM-3.js → diagram-QW4FP2JN-D0NDtG1H.js} +1 -1
- package/dist/assets/edit-page-BNdRA1uC.js +8 -0
- package/dist/assets/{erDiagram-6RL3IURR-DY36nfhQ.js → erDiagram-6RL3IURR-JXCqGLXH.js} +1 -1
- package/dist/assets/{flowDiagram-7ASYPVHJ-CfRts8ET.js → flowDiagram-7ASYPVHJ-lC9DJhRH.js} +1 -1
- package/dist/assets/{ganttDiagram-NTVNEXSI-CDraSgGO.js → ganttDiagram-NTVNEXSI-hkvJoFTW.js} +1 -1
- package/dist/assets/{gitGraph-YCYPL57B-UYf5zAi3.js → gitGraph-YCYPL57B-DTonYtFa.js} +1 -1
- package/dist/assets/{gitGraphDiagram-NRZ2UAAF-Ciuh-IFV.js → gitGraphDiagram-NRZ2UAAF-Bm5LD4Oi.js} +1 -1
- package/dist/assets/{graph-3wtgkpTE.js → graph-a2NuGKIg.js} +1 -1
- package/dist/assets/{home-page-_Yx2GUt8.js → home-page-Cuw02jA1.js} +1 -1
- package/dist/assets/{index-DmEH0uK_.js → index--kjpj8uK.js} +1 -1
- package/dist/assets/{index-BXoaie-J.js → index-BJDotLVd.js} +1 -1
- package/dist/assets/{index-BZWmq3vs.js → index-BzFGlTya.js} +1 -1
- package/dist/assets/{index-BKXdeJDm.js → index-COvKCHk8.js} +1 -1
- package/dist/assets/{index-Lbm1A2Xf.js → index-CW1KDGvy.js} +1 -1
- package/dist/assets/{index-B33pr5Jd.js → index-Cd7-p_xX.js} +1 -1
- package/dist/assets/{index-P0Hca0zN.js → index-CxPTAYf4.js} +1 -1
- package/dist/assets/{index-Cp1cZPM7.js → index-DCHQCt-t.js} +1 -1
- package/dist/assets/{index-CQ6vAlJL.js → index-DKbRhJ9U.js} +1 -1
- package/dist/assets/{index-yofi7MSY.js → index-Dp-c9ENd.js} +1 -1
- package/dist/assets/{index-QvA-ab0K.js → index-Dsn_YCYO.js} +1 -1
- package/dist/assets/{index-C8Bm9HBw.js → index-DzkGrOUn.js} +1 -1
- package/dist/assets/{index-DZ-Icj8X.js → index-XQzsDJto.js} +1 -1
- package/dist/assets/{index-CoI4ARZJ.js → index-bnc3mPN4.js} +1 -1
- package/dist/assets/{index-EuGWxYqb.js → index-kAbxqOS5.js} +4 -4
- package/dist/assets/{index-CCwbozlH.js → index-mHQgIkSO.js} +1 -1
- package/dist/assets/{index-COK488Cz.js → index-xuRWJ2_t.js} +1 -1
- package/dist/assets/{infoDiagram-A4XQUW5V-C-pJLKgO.js → infoDiagram-A4XQUW5V-BirfBVjM.js} +1 -1
- package/dist/assets/{journeyDiagram-G5WM74LC-2tc33zTw.js → journeyDiagram-G5WM74LC-D9BJGMjg.js} +1 -1
- package/dist/assets/{kanban-definition-QRCXZQQD-C4ULxPMx.js → kanban-definition-QRCXZQQD-Q7-ZlrZ-.js} +1 -1
- package/dist/assets/{layout-BMJr6gmv.js → layout-DuMc5IGG.js} +1 -1
- package/dist/assets/{linear-Dn1vsNVl.js → linear-DIA_vzu5.js} +1 -1
- package/dist/assets/{mermaid-yqsC0h2-.js → mermaid-BI-CszJi.js} +3 -3
- package/dist/assets/{min-CZ59Ri_q.js → min-D0K32hqh.js} +1 -1
- package/dist/assets/{mindmap-definition-GWI6TPTV-BszNfp_P.js → mindmap-definition-GWI6TPTV-C4mO_MYN.js} +1 -1
- package/dist/assets/{pieDiagram-YF2LJOPJ-CdcEdsyu.js → pieDiagram-YF2LJOPJ-DjKLWugV.js} +1 -1
- package/dist/assets/{quadrantDiagram-OS5C2QUG-B8uSVTwP.js → quadrantDiagram-OS5C2QUG-DLfun-FB.js} +1 -1
- package/dist/assets/{react-plotly-Bl0JRWyM.js → react-plotly-DDsEj5yL.js} +1 -1
- package/dist/assets/{requirementDiagram-MIRIMTAZ-hZI1D6DF.js → requirementDiagram-MIRIMTAZ-CBaKQb_O.js} +1 -1
- package/dist/assets/{run-page-P_olS3d1.js → run-page-DRGK1sHN.js} +1 -1
- package/dist/assets/{sankeyDiagram-Y46BX6SQ-Ux4ft9TC.js → sankeyDiagram-Y46BX6SQ-C6smhYCC.js} +1 -1
- package/dist/assets/{sequenceDiagram-G6AWOVSC-1qHiGMLg.js → sequenceDiagram-G6AWOVSC-D4JVypeE.js} +1 -1
- package/dist/assets/{slides-component-DJFRKkmy.js → slides-component-17qvnfoB.js} +1 -1
- package/dist/assets/{sortBy-DQ6GZSbx.js → sortBy-BE5ZEccS.js} +1 -1
- package/dist/assets/{stateDiagram-MAYHULR4-BiIOfb_q.js → stateDiagram-MAYHULR4-hGkWxHXn.js} +1 -1
- package/dist/assets/stateDiagram-v2-4JROLMXI-Ddd8UvVg.js +1 -0
- package/dist/assets/{terminal-WFrj8CQI.js → terminal-BL7-7vnM.js} +1 -1
- package/dist/assets/{time-DY2IXEDw.js → time-KyB-1nAK.js} +1 -1
- package/dist/assets/{timeline-definition-U7ZMHBDA-Bx5bXFf5.js → timeline-definition-U7ZMHBDA-j0TskPxO.js} +1 -1
- package/dist/assets/tree-jJgubhmB.js +8 -0
- package/dist/assets/{useMarimoWebSocket-CufuWvyq.js → useMarimoWebSocket-Cs7bCHi1.js} +3 -3
- package/dist/assets/{vega-component-zLmUUm9P.js → vega-component-DENq2UdZ.js} +1 -1
- package/dist/assets/{xychartDiagram-6QU3TZC5-Bx-i4jO9.js → xychartDiagram-6QU3TZC5-BdbHQeAu.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/_baseMap-gJ6kZ3iD.js +0 -1
- package/dist/assets/channel-DaxZ6OIg.js +0 -1
- package/dist/assets/classDiagram-LNE6IOMH-DYnZPCEb.js +0 -1
- package/dist/assets/classDiagram-v2-MQ7JQ4JX-DYnZPCEb.js +0 -1
- package/dist/assets/clone-CIMZpEfW.js +0 -1
- package/dist/assets/edit-page-DhunecoI.js +0 -8
- package/dist/assets/stateDiagram-v2-4JROLMXI-BBP8c15r.js +0 -1
- package/dist/assets/tree-D1cIBfZY.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ad as r,ae as n,af as t,ag as a,ah as e,ai as i,y as u,aj as o,z as f}from"./index-
|
|
1
|
+
import{ad as r,ae as n,af as t,ag as a,ah as e,ai as i,y as u,aj as o,z as f}from"./index-kAbxqOS5.js";import{a as s}from"./_baseEach-C4Gv2TKe.js";import{b as c}from"./_baseMap-CLDR0GqA.js";function l(n,t){if(n!==t){var a=void 0!==n,e=null===n,i=n==n,u=r(n),o=void 0!==t,f=null===t,s=t==t,c=r(t);if(!f&&!c&&!u&&n>t||u&&o&&s&&!f&&!c||e&&o&&s||!a&&s||!i)return 1;if(!e&&!u&&!c&&n<t||c&&a&&i&&!e&&!u||f&&a&&i||!o&&i||!s)return-1}return 0}function v(r,u,o){u=u.length?n(u,(function(r){return t(r)?function(n){return a(n,1===r.length?r[0]:r)}:r})):[e];var f=-1;return u=n(u,i(s)),function(r,n){var t=r.length;for(r.sort(n);t--;)r[t]=r[t].value;return r}(c(r,(function(r,t,a){return{criteria:n(u,(function(n){return n(r)})),index:++f,value:r}})),(function(r,n){return function(r,n,t){for(var a=-1,e=r.criteria,i=n.criteria,u=e.length,o=t.length;++a<u;){var f=l(e[a],i[a]);if(f)return a>=o?f:f*("desc"==t[a]?-1:1)}return r.index-n.index}(r,n,o)}))}var d=u((function(r,n){if(null==r)return[];var t=n.length;return t>1&&o(r,n[0],n[1])?n=[]:t>2&&o(n[0],n[1],n[2])&&(n=[n[0]]),v(r,f(n),[])}));export{d as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as t,a as e,b as a}from"./chunk-7U56Z5CX-C3W2RAZO.js";import{_ as i,c as r,l as n,d,j as s,u as o}from"./mermaid-yqsC0h2-.js";import{s as g}from"./transform-CdY8z5kT.js";import{G as p}from"./graph-3wtgkpTE.js";import{l as h}from"./layout-BMJr6gmv.js";import{l as c,k as l}from"./step-xJWGRC3d.js";import"./chunk-5HRBRIJM-nfEs1LTn.js";import"./index-EuGWxYqb.js";import"./_baseUniq-DdpuRz1K.js";import"./_baseEach-BLwYzuPY.js";import"./min-CZ59Ri_q.js";import"./_baseMap-gJ6kZ3iD.js";import"./sortBy-DQ6GZSbx.js";var x,f={},u=i(((t,e)=>{f[t]=e}),"set"),y=i((t=>f[t]),"get"),m=i((()=>Object.keys(f)),"keys"),w=i((()=>m().length),"size"),b={get:y,set:u,keys:m,size:w},B=i((t=>t.append("circle").attr("class","start-state").attr("r",r().state.sizeUnit).attr("cx",r().state.padding+r().state.sizeUnit).attr("cy",r().state.padding+r().state.sizeUnit)),"drawStartState"),k=i((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",r().state.textHeight).attr("class","divider").attr("x2",2*r().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),S=i(((t,e)=>{const a=t.append("text").attr("x",2*r().state.padding).attr("y",r().state.textHeight+2*r().state.padding).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",i.width+2*r().state.padding).attr("height",i.height+2*r().state.padding).attr("rx",r().state.radius),a}),"drawSimpleState"),E=i(((t,e)=>{const a=i((function(t,e,a){const i=t.append("tspan").attr("x",2*r().state.padding).text(e);a||i.attr("dy",r().state.textHeight)}),"addTspan"),n=t.append("text").attr("x",2*r().state.padding).attr("y",r().state.textHeight+1.3*r().state.padding).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),d=n.height,s=t.append("text").attr("x",r().state.padding).attr("y",d+.4*r().state.padding+r().state.dividerMargin+r().state.textHeight).attr("class","state-description");let o=!0,g=!0;e.descriptions.forEach((function(t){o||(a(s,t,g),g=!1),o=!1}));const p=t.append("line").attr("x1",r().state.padding).attr("y1",r().state.padding+d+r().state.dividerMargin/2).attr("y2",r().state.padding+d+r().state.dividerMargin/2).attr("class","descr-divider"),h=s.node().getBBox(),c=Math.max(h.width,n.width);return p.attr("x2",c+3*r().state.padding),t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",c+2*r().state.padding).attr("height",h.height+d+2*r().state.padding).attr("rx",r().state.radius),t}),"drawDescrState"),N=i(((t,e,a)=>{const i=r().state.padding,n=2*r().state.padding,d=t.node().getBBox(),s=d.width,o=d.x,g=t.append("text").attr("x",0).attr("y",r().state.titleShift).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,s);c===s&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>s&&(h=(s-c)/2+i),Math.abs(o-l.x)<i&&p>s&&(h=o-(p-s)/2);const x=1-r().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+r().state.textHeight+r().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=s&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",c).attr("height",3*r().state.textHeight).attr("rx",r().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",c).attr("height",l.height+3+2*r().state.textHeight).attr("rx",r().state.radius),t}),"addTitleAndBox"),M=i((t=>(t.append("circle").attr("class","end-state-outer").attr("r",r().state.sizeUnit+r().state.miniPadding).attr("cx",r().state.padding+r().state.sizeUnit+r().state.miniPadding).attr("cy",r().state.padding+r().state.sizeUnit+r().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",r().state.sizeUnit).attr("cx",r().state.padding+r().state.sizeUnit+2).attr("cy",r().state.padding+r().state.sizeUnit+2))),"drawEndState"),v=i(((t,e)=>{let a=r().state.forkWidth,i=r().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",r().state.padding).attr("y",r().state.padding)}),"drawForkJoinState"),z=i(((t,e,a,i)=>{let n=0;const d=i.append("text");d.style("text-anchor","start"),d.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");const g=o.split(s.lineBreakRegex);let p=1.25*r().state.noteMargin;for(const s of g){const t=s.trim();if(t.length>0){const i=d.append("tspan");if(i.text(t),0===p){p+=i.node().getBBox().height}n+=p,i.attr("x",e+r().state.noteMargin),i.attr("y",a+n+1.25*r().state.noteMargin)}}return{textWidth:d.node().getBBox().width,textHeight:n}}),"_drawLongText"),H=i(((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",r().state.padding),i=e.append("g"),{textWidth:n,textHeight:d}=z(t,0,0,i);return a.attr("height",d+2*r().state.noteMargin),a.attr("width",n+2*r().state.noteMargin),a}),"drawNote"),j=i((function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&B(n),"end"===e.type&&M(n),"fork"!==e.type&&"join"!==e.type||v(n,e),"note"===e.type&&H(e.note.text,n),"divider"===e.type&&k(n),"default"===e.type&&0===e.descriptions.length&&S(n,e),"default"===e.type&&e.descriptions.length>0&&E(n,e);const d=n.node().getBBox();return i.width=d.width+2*r().state.padding,i.height=d.height+2*r().state.padding,b.set(a,i),i}),"drawState"),T=0,D=i((function(t,a,d){const g=i((function(t){switch(t){case e.relationType.AGGREGATION:return"aggregation";case e.relationType.EXTENSION:return"extension";case e.relationType.COMPOSITION:return"composition";case e.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");a.points=a.points.filter((t=>!Number.isNaN(t.y)));const p=a.points,h=c().x((function(t){return t.x})).y((function(t){return t.y})).curve(l),x=t.append("path").attr("d",h(p)).attr("id","edge"+T).attr("class","transition");let f="";if(r().state.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),x.attr("marker-end","url("+f+"#"+g(e.relationType.DEPENDENCY)+"End)"),void 0!==d.title){const e=t.append("g").attr("class","stateLabel"),{x:i,y:g}=o.calcLabelPosition(a.points),p=s.getRows(d.title);let h=0;const c=[];let l=0,x=0;for(let t=0;t<=p.length;t++){const a=e.append("text").attr("text-anchor","middle").text(p[t]).attr("x",i).attr("y",g+h),r=a.node().getBBox();if(l=Math.max(l,r.width),x=Math.min(x,r.x),n.info(r.x,i,g+h),0===h){const t=a.node().getBBox();h=t.height,n.info("Title height",h,g)}c.push(a)}let f=h*p.length;if(p.length>1){const t=(p.length-1)*h*.5;c.forEach(((e,a)=>e.attr("y",g+a*h-t))),f=h*p.length}const u=e.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",i-l/2-r().state.padding/2).attr("y",g-f/2-r().state.padding/2-3.5).attr("width",l+r().state.padding).attr("height",f+r().state.padding),n.info(u)}T++}),"drawEdge"),L={},G=i((function(){}),"setConf"),R=i((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),U=i((function(t,e,a,i){x=r().state;const s=r().securityLevel;let o;"sandbox"===s&&(o=g("#i"+e));const p=g("sandbox"===s?o.nodes()[0].contentDocument.body:"body"),h="sandbox"===s?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);R(c);const l=i.db.getRootDoc();O(l,c,void 0,!1,p,h,i);const f=x.padding,u=c.node().getBBox(),y=u.width+2*f,m=u.height+2*f;d(c,m,1.75*y,x.useMaxWidth),c.attr("viewBox",`${u.x-x.padding} ${u.y-x.padding} `+y+" "+m)}),"draw"),A=i((t=>t?t.length*x.fontSizeFactor:1),"getLabelWidth"),O=i(((t,e,a,i,r,d,o)=>{const g=new p({compound:!0,multigraph:!0});let c,l=!0;for(c=0;c<t.length;c++)if("relation"===t[c].stmt){l=!1;break}a?g.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:l?1:x.edgeLengthFactor,nodeSep:l?1:50,isMultiGraph:!0}):g.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:l?1:x.edgeLengthFactor,nodeSep:l?1:50,ranker:"tight-tree",isMultiGraph:!0}),g.setDefaultEdgeLabel((function(){return{}})),o.db.extract(t);const f=o.db.getStates(),u=o.db.getRelations(),y=Object.keys(f);for(const n of y){const t=f[n];let s;if(a&&(t.parentId=a),t.doc){let a=e.append("g").attr("id",t.id).attr("class","stateGroup");s=O(t.doc,a,t.id,!i,r,d,o);{a=N(a,t,i);let e=a.node().getBBox();s.width=e.width,s.height=e.height+x.padding/2,L[t.id]={y:x.compositTitleSize}}}else s=j(e,t,g);if(t.note){const a={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},i=j(e,a,g);"left of"===t.note.position?(g.setNode(s.id+"-note",i),g.setNode(s.id,s)):(g.setNode(s.id,s),g.setNode(s.id+"-note",i)),g.setParent(s.id,s.id+"-group"),g.setParent(s.id+"-note",s.id+"-group")}else g.setNode(s.id,s)}n.debug("Count=",g.nodeCount(),g);let m=0;u.forEach((function(t){m++,n.debug("Setting edge",t),g.setEdge(t.id1,t.id2,{relation:t,width:A(t.title),height:x.labelHeight*s.getRows(t.title).length,labelpos:"c"},"id"+m)})),h(g),n.debug("Graph after layout",g.nodes());const w=e.node();g.nodes().forEach((function(t){if(void 0!==t&&void 0!==g.node(t)){n.warn("Node "+t+": "+JSON.stringify(g.node(t))),r.select("#"+w.id+" #"+t).attr("transform","translate("+(g.node(t).x-g.node(t).width/2)+","+(g.node(t).y+(L[t]?L[t].y:0)-g.node(t).height/2)+" )"),r.select("#"+w.id+" #"+t).attr("data-x-shift",g.node(t).x-g.node(t).width/2);d.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach((t=>{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)}))}else n.debug("No Node "+t+": "+JSON.stringify(g.node(t)))}));let b=w.getBBox();g.edges().forEach((function(t){void 0!==t&&void 0!==g.edge(t)&&(n.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(g.edge(t))),D(e,g.edge(t),g.edge(t).relation))})),b=w.getBBox();const B={id:a||"root",label:a||"root",width:0,height:0};return B.width=b.width+2*x.padding,B.height=b.height+2*x.padding,n.debug("Doc rendered",B,g),B}),"renderDoc"),P={parser:a,db:e,renderer:{setConf:G,draw:U},styles:t,init:i((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,e.clear()}),"init")};export{P as diagram};
|
|
1
|
+
import{s as t,a as e,b as a}from"./chunk-7U56Z5CX-CCxTJlhM.js";import{_ as i,c as r,l as n,d,j as s,u as o}from"./mermaid-BI-CszJi.js";import{s as g}from"./transform-CdY8z5kT.js";import{G as p}from"./graph-a2NuGKIg.js";import{l as h}from"./layout-DuMc5IGG.js";import{l as c,k as l}from"./step-xJWGRC3d.js";import"./chunk-5HRBRIJM-BjPnW7nP.js";import"./index-kAbxqOS5.js";import"./_baseUniq-DaNc0Gt2.js";import"./_baseEach-C4Gv2TKe.js";import"./min-D0K32hqh.js";import"./_baseMap-CLDR0GqA.js";import"./sortBy-BE5ZEccS.js";var x,f={},u=i(((t,e)=>{f[t]=e}),"set"),y=i((t=>f[t]),"get"),m=i((()=>Object.keys(f)),"keys"),w=i((()=>m().length),"size"),b={get:y,set:u,keys:m,size:w},B=i((t=>t.append("circle").attr("class","start-state").attr("r",r().state.sizeUnit).attr("cx",r().state.padding+r().state.sizeUnit).attr("cy",r().state.padding+r().state.sizeUnit)),"drawStartState"),k=i((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",r().state.textHeight).attr("class","divider").attr("x2",2*r().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),S=i(((t,e)=>{const a=t.append("text").attr("x",2*r().state.padding).attr("y",r().state.textHeight+2*r().state.padding).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",i.width+2*r().state.padding).attr("height",i.height+2*r().state.padding).attr("rx",r().state.radius),a}),"drawSimpleState"),E=i(((t,e)=>{const a=i((function(t,e,a){const i=t.append("tspan").attr("x",2*r().state.padding).text(e);a||i.attr("dy",r().state.textHeight)}),"addTspan"),n=t.append("text").attr("x",2*r().state.padding).attr("y",r().state.textHeight+1.3*r().state.padding).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),d=n.height,s=t.append("text").attr("x",r().state.padding).attr("y",d+.4*r().state.padding+r().state.dividerMargin+r().state.textHeight).attr("class","state-description");let o=!0,g=!0;e.descriptions.forEach((function(t){o||(a(s,t,g),g=!1),o=!1}));const p=t.append("line").attr("x1",r().state.padding).attr("y1",r().state.padding+d+r().state.dividerMargin/2).attr("y2",r().state.padding+d+r().state.dividerMargin/2).attr("class","descr-divider"),h=s.node().getBBox(),c=Math.max(h.width,n.width);return p.attr("x2",c+3*r().state.padding),t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",c+2*r().state.padding).attr("height",h.height+d+2*r().state.padding).attr("rx",r().state.radius),t}),"drawDescrState"),N=i(((t,e,a)=>{const i=r().state.padding,n=2*r().state.padding,d=t.node().getBBox(),s=d.width,o=d.x,g=t.append("text").attr("x",0).attr("y",r().state.titleShift).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,s);c===s&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>s&&(h=(s-c)/2+i),Math.abs(o-l.x)<i&&p>s&&(h=o-(p-s)/2);const x=1-r().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+r().state.textHeight+r().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=s&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",c).attr("height",3*r().state.textHeight).attr("rx",r().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",c).attr("height",l.height+3+2*r().state.textHeight).attr("rx",r().state.radius),t}),"addTitleAndBox"),M=i((t=>(t.append("circle").attr("class","end-state-outer").attr("r",r().state.sizeUnit+r().state.miniPadding).attr("cx",r().state.padding+r().state.sizeUnit+r().state.miniPadding).attr("cy",r().state.padding+r().state.sizeUnit+r().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",r().state.sizeUnit).attr("cx",r().state.padding+r().state.sizeUnit+2).attr("cy",r().state.padding+r().state.sizeUnit+2))),"drawEndState"),v=i(((t,e)=>{let a=r().state.forkWidth,i=r().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",r().state.padding).attr("y",r().state.padding)}),"drawForkJoinState"),z=i(((t,e,a,i)=>{let n=0;const d=i.append("text");d.style("text-anchor","start"),d.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");const g=o.split(s.lineBreakRegex);let p=1.25*r().state.noteMargin;for(const s of g){const t=s.trim();if(t.length>0){const i=d.append("tspan");if(i.text(t),0===p){p+=i.node().getBBox().height}n+=p,i.attr("x",e+r().state.noteMargin),i.attr("y",a+n+1.25*r().state.noteMargin)}}return{textWidth:d.node().getBBox().width,textHeight:n}}),"_drawLongText"),H=i(((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",r().state.padding),i=e.append("g"),{textWidth:n,textHeight:d}=z(t,0,0,i);return a.attr("height",d+2*r().state.noteMargin),a.attr("width",n+2*r().state.noteMargin),a}),"drawNote"),j=i((function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&B(n),"end"===e.type&&M(n),"fork"!==e.type&&"join"!==e.type||v(n,e),"note"===e.type&&H(e.note.text,n),"divider"===e.type&&k(n),"default"===e.type&&0===e.descriptions.length&&S(n,e),"default"===e.type&&e.descriptions.length>0&&E(n,e);const d=n.node().getBBox();return i.width=d.width+2*r().state.padding,i.height=d.height+2*r().state.padding,b.set(a,i),i}),"drawState"),T=0,D=i((function(t,a,d){const g=i((function(t){switch(t){case e.relationType.AGGREGATION:return"aggregation";case e.relationType.EXTENSION:return"extension";case e.relationType.COMPOSITION:return"composition";case e.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");a.points=a.points.filter((t=>!Number.isNaN(t.y)));const p=a.points,h=c().x((function(t){return t.x})).y((function(t){return t.y})).curve(l),x=t.append("path").attr("d",h(p)).attr("id","edge"+T).attr("class","transition");let f="";if(r().state.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),x.attr("marker-end","url("+f+"#"+g(e.relationType.DEPENDENCY)+"End)"),void 0!==d.title){const e=t.append("g").attr("class","stateLabel"),{x:i,y:g}=o.calcLabelPosition(a.points),p=s.getRows(d.title);let h=0;const c=[];let l=0,x=0;for(let t=0;t<=p.length;t++){const a=e.append("text").attr("text-anchor","middle").text(p[t]).attr("x",i).attr("y",g+h),r=a.node().getBBox();if(l=Math.max(l,r.width),x=Math.min(x,r.x),n.info(r.x,i,g+h),0===h){const t=a.node().getBBox();h=t.height,n.info("Title height",h,g)}c.push(a)}let f=h*p.length;if(p.length>1){const t=(p.length-1)*h*.5;c.forEach(((e,a)=>e.attr("y",g+a*h-t))),f=h*p.length}const u=e.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",i-l/2-r().state.padding/2).attr("y",g-f/2-r().state.padding/2-3.5).attr("width",l+r().state.padding).attr("height",f+r().state.padding),n.info(u)}T++}),"drawEdge"),L={},G=i((function(){}),"setConf"),R=i((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),U=i((function(t,e,a,i){x=r().state;const s=r().securityLevel;let o;"sandbox"===s&&(o=g("#i"+e));const p=g("sandbox"===s?o.nodes()[0].contentDocument.body:"body"),h="sandbox"===s?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);R(c);const l=i.db.getRootDoc();O(l,c,void 0,!1,p,h,i);const f=x.padding,u=c.node().getBBox(),y=u.width+2*f,m=u.height+2*f;d(c,m,1.75*y,x.useMaxWidth),c.attr("viewBox",`${u.x-x.padding} ${u.y-x.padding} `+y+" "+m)}),"draw"),A=i((t=>t?t.length*x.fontSizeFactor:1),"getLabelWidth"),O=i(((t,e,a,i,r,d,o)=>{const g=new p({compound:!0,multigraph:!0});let c,l=!0;for(c=0;c<t.length;c++)if("relation"===t[c].stmt){l=!1;break}a?g.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:l?1:x.edgeLengthFactor,nodeSep:l?1:50,isMultiGraph:!0}):g.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:l?1:x.edgeLengthFactor,nodeSep:l?1:50,ranker:"tight-tree",isMultiGraph:!0}),g.setDefaultEdgeLabel((function(){return{}})),o.db.extract(t);const f=o.db.getStates(),u=o.db.getRelations(),y=Object.keys(f);for(const n of y){const t=f[n];let s;if(a&&(t.parentId=a),t.doc){let a=e.append("g").attr("id",t.id).attr("class","stateGroup");s=O(t.doc,a,t.id,!i,r,d,o);{a=N(a,t,i);let e=a.node().getBBox();s.width=e.width,s.height=e.height+x.padding/2,L[t.id]={y:x.compositTitleSize}}}else s=j(e,t,g);if(t.note){const a={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},i=j(e,a,g);"left of"===t.note.position?(g.setNode(s.id+"-note",i),g.setNode(s.id,s)):(g.setNode(s.id,s),g.setNode(s.id+"-note",i)),g.setParent(s.id,s.id+"-group"),g.setParent(s.id+"-note",s.id+"-group")}else g.setNode(s.id,s)}n.debug("Count=",g.nodeCount(),g);let m=0;u.forEach((function(t){m++,n.debug("Setting edge",t),g.setEdge(t.id1,t.id2,{relation:t,width:A(t.title),height:x.labelHeight*s.getRows(t.title).length,labelpos:"c"},"id"+m)})),h(g),n.debug("Graph after layout",g.nodes());const w=e.node();g.nodes().forEach((function(t){if(void 0!==t&&void 0!==g.node(t)){n.warn("Node "+t+": "+JSON.stringify(g.node(t))),r.select("#"+w.id+" #"+t).attr("transform","translate("+(g.node(t).x-g.node(t).width/2)+","+(g.node(t).y+(L[t]?L[t].y:0)-g.node(t).height/2)+" )"),r.select("#"+w.id+" #"+t).attr("data-x-shift",g.node(t).x-g.node(t).width/2);d.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach((t=>{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)}))}else n.debug("No Node "+t+": "+JSON.stringify(g.node(t)))}));let b=w.getBBox();g.edges().forEach((function(t){void 0!==t&&void 0!==g.edge(t)&&(n.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(g.edge(t))),D(e,g.edge(t),g.edge(t).relation))})),b=w.getBBox();const B={id:a||"root",label:a||"root",width:0,height:0};return B.width=b.width+2*x.padding,B.height=b.height+2*x.padding,n.debug("Doc rendered",B,g),B}),"renderDoc"),P={parser:a,db:e,renderer:{setConf:G,draw:U},styles:t,init:i((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,e.clear()}),"init")};export{P as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,c as s,a as t,b as a}from"./chunk-7U56Z5CX-CCxTJlhM.js";import{_ as e}from"./mermaid-BI-CszJi.js";import"./transform-CdY8z5kT.js";import"./chunk-5HRBRIJM-BjPnW7nP.js";import"./index-kAbxqOS5.js";import"./step-xJWGRC3d.js";var o={parser:a,db:t,renderer:s,styles:r,init:e((r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute,t.clear()}),"init")};export{o as diagram};
|