@marimo-team/frontend 0.13.4-dev10 → 0.13.4-dev11
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-CRZq4k8K.js → ConnectedDataExplorerComponent-a_CQMI1w.js} +1 -1
- package/dist/assets/{VegaLite-BYHxOfZz.js → VegaLite-C3rSd6cX.js} +1 -1
- package/dist/assets/{_baseEach-BbvNE0u0.js → _baseEach-jzx_aXcN.js} +1 -1
- package/dist/assets/_baseMap-BaboG7sp.js +1 -0
- package/dist/assets/{_baseUniq-t6ElO-9x.js → _baseUniq-BXyj56Tx.js} +1 -1
- package/dist/assets/{_createAggregator-BPmcOOvl.js → _createAggregator-HxzkVvwO.js} +1 -1
- package/dist/assets/{any-language-editor-VG_GbM0J.js → any-language-editor-BhMa3wxM.js} +1 -1
- package/dist/assets/{architectureDiagram-IEHRJDOE-BqDTU-HK.js → architectureDiagram-IEHRJDOE-yHDqLdFv.js} +1 -1
- package/dist/assets/{blockDiagram-JOT3LUYC-vnXoJ0d-.js → blockDiagram-JOT3LUYC-BFovozfS.js} +1 -1
- package/dist/assets/{c4Diagram-VJAJSXHY-3J97GKQy.js → c4Diagram-VJAJSXHY-CReoHo9Q.js} +1 -1
- package/dist/assets/channel-BKo61XSG.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-DDq4seu7.js → chunk-4BMEZGHF-B0i15DLf.js} +1 -1
- package/dist/assets/{chunk-A2AXSNBT-Bl_IELkU.js → chunk-A2AXSNBT-CLJ6bs-v.js} +1 -1
- package/dist/assets/{chunk-AEK57VVT-Bfd5ODjP.js → chunk-AEK57VVT-BIvPAgeG.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-CjBgIoU6.js → chunk-D6G4REZN-BJ1CCYfU.js} +1 -1
- package/dist/assets/{chunk-RZ5BOZE2-DrmmI8Wu.js → chunk-RZ5BOZE2-BiFJlO8Y.js} +1 -1
- package/dist/assets/{chunk-XZIHB7SX-gp3VHcra.js → chunk-XZIHB7SX-Cx793NwY.js} +1 -1
- package/dist/assets/{circle-play-D48j1tXn.js → circle-play-DhMmKBJB.js} +1 -1
- package/dist/assets/classDiagram-GIVACNV2-DIiMuu0O.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-DIiMuu0O.js +1 -0
- package/dist/assets/clone-B0UB2tkg.js +1 -0
- package/dist/assets/{compile-DcDxOHrp.js → compile-BvSXKv6j.js} +1 -1
- package/dist/assets/{dagre-OKDRZEBW-r3TkVr3k.js → dagre-OKDRZEBW-BFh8T0ZY.js} +1 -1
- package/dist/assets/{data-editor-CLZncTXn.js → data-editor-DF_Q7R3T.js} +1 -1
- package/dist/assets/{diagram-SSKATNLV-JBxUbE1-.js → diagram-SSKATNLV-Dd7yr5t8.js} +1 -1
- package/dist/assets/{diagram-VNBRO52H-Bcn4Ix2u.js → diagram-VNBRO52H-tWI7_sUF.js} +1 -1
- package/dist/assets/{edit-page-C7X_93kl.js → edit-page-BwJJvKD6.js} +3 -3
- package/dist/assets/{erDiagram-Q7BY3M3F-CIVRjyTX.js → erDiagram-Q7BY3M3F-BMGe0ozf.js} +1 -1
- package/dist/assets/{flowDiagram-4HSFHLVR-Dv-3Qk-A.js → flowDiagram-4HSFHLVR-B0Tf1B0M.js} +1 -1
- package/dist/assets/{ganttDiagram-APWFNJXF-CdLG4hL5.js → ganttDiagram-APWFNJXF-BhVumdgS.js} +1 -1
- package/dist/assets/{gitGraphDiagram-7IBYFJ6S-exod67MT.js → gitGraphDiagram-7IBYFJ6S-Dlew6ywp.js} +1 -1
- package/dist/assets/{graph-CNRO7n5G.js → graph-yBqyK557.js} +1 -1
- package/dist/assets/{home-page-DPc9jzgK.js → home-page-DC-SKWlU.js} +1 -1
- package/dist/assets/{index-B87kAQz4.js → index-4wfL6kM1.js} +1 -1
- package/dist/assets/{index-y0qqwv_n.js → index-5kMLPMnE.js} +7 -7
- package/dist/assets/{index-DJWPdpg1.js → index-B4S3e1g3.js} +1 -1
- package/dist/assets/{index-wJdEOtLS.js → index-B8vCOks2.js} +1 -1
- package/dist/assets/{index-Bl7KSgYF.js → index-BNCdCpCo.js} +1 -1
- package/dist/assets/{index-CTms_tOA.js → index-BWCqRsNY.js} +1 -1
- package/dist/assets/{index-7WmOAJ2V.js → index-BlHKpGM6.js} +1 -1
- package/dist/assets/{index-jwgKQg6q.js → index-BwJkMxiZ.js} +1 -1
- package/dist/assets/{index-yrRh5KlF.js → index-CAbAInRY.js} +1 -1
- package/dist/assets/{index-K1v0Fxv7.js → index-CviL4p8b.js} +1 -1
- package/dist/assets/{index-CINalrMx.js → index-DBFDxR71.js} +1 -1
- package/dist/assets/{index-DImBnX4-.js → index-DyCuzqiB.js} +1 -1
- package/dist/assets/{index-uPFi6miG.js → index-aIbv25xe.js} +1 -1
- package/dist/assets/{index-B-rknAhm.js → index-ioOL_Ku8.js} +1 -1
- package/dist/assets/{index-g1L9X85C.js → index-jdJFOl_X.js} +1 -1
- package/dist/assets/{index-CaqXpojc.js → index-q7DNpHA7.js} +1 -1
- package/dist/assets/{index-CQr3sztY.js → index-x0MxrSXH.js} +1 -1
- package/dist/assets/{index-DIcjXu_c.js → index-xTaY03zG.js} +1 -1
- package/dist/assets/infoDiagram-PH2N3AL5-DR4cD1vI.js +1 -0
- package/dist/assets/{journeyDiagram-U35MCT3I-DM1zQocV.js → journeyDiagram-U35MCT3I-CD-8kARI.js} +1 -1
- package/dist/assets/{kanban-definition-NDS4AKOZ-DJBpxS3s.js → kanban-definition-NDS4AKOZ-Jlc_o24a.js} +1 -1
- package/dist/assets/{layout-uBpRKkHB.js → layout-BDTIBmJl.js} +1 -1
- package/dist/assets/{linear-ClWSccVi.js → linear-BvFPvKUM.js} +1 -1
- package/dist/assets/{mermaid-DHc4NkXl.js → mermaid-BZNnZOMt.js} +2 -2
- package/dist/assets/{min-1bMSGCPp.js → min-C5aIXrw4.js} +1 -1
- package/dist/assets/{mindmap-definition-ALO5MXBD-BJKhsQfZ.js → mindmap-definition-ALO5MXBD-BUSDK9gL.js} +1 -1
- package/dist/assets/{pieDiagram-IB7DONF6-JQTaWxhU.js → pieDiagram-IB7DONF6-DisNLgtS.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-Co8BNAt3.js → quadrantDiagram-7GDLP6J5-yIxkTJ7H.js} +1 -1
- package/dist/assets/{radar-MK3ICKWK-D0BV-el_.js → radar-MK3ICKWK-BHq7NP75.js} +1 -1
- package/dist/assets/{react-plotly-C5J0eIHi.js → react-plotly-i9bWXaNO.js} +1 -1
- package/dist/assets/{requirementDiagram-KVF5MWMF-C19zTgiq.js → requirementDiagram-KVF5MWMF-BjMZovM1.js} +1 -1
- package/dist/assets/{run-page-BDyFK2Mk.js → run-page-B2_qXRqq.js} +1 -1
- package/dist/assets/{sankeyDiagram-QLVOVGJD-CqaSfVdy.js → sankeyDiagram-QLVOVGJD-Cs2scg2l.js} +1 -1
- package/dist/assets/{sequenceDiagram-X6HHIX6F-R8XzI3q9.js → sequenceDiagram-X6HHIX6F-Dzk-zL7I.js} +1 -1
- package/dist/assets/{slides-component-DSdsvxI7.js → slides-component-C8NWJoFc.js} +1 -1
- package/dist/assets/{sortBy-DfLjg596.js → sortBy-YxnhyBB5.js} +1 -1
- package/dist/assets/{stateDiagram-DGXRK772-Cq65JWup.js → stateDiagram-DGXRK772-DbOSzWzt.js} +1 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-DEdPFJ3v.js +1 -0
- package/dist/assets/{terminal-BR48HSnL.js → terminal-D2F2Lqlz.js} +1 -1
- package/dist/assets/{time-CldQfF33.js → time-D35-ROKB.js} +1 -1
- package/dist/assets/{timeline-definition-BDJGKUSR-oFbjFulK.js → timeline-definition-BDJGKUSR-CoRN5ibT.js} +1 -1
- package/dist/assets/{tracing-BV_8p66P.js → tracing-854x0RUK.js} +3 -3
- package/dist/assets/{tree-CnN2BNmV.js → tree-DHHaWHJ1.js} +1 -1
- package/dist/assets/{useMarimoWebSocket-qg7Ko91c.js → useMarimoWebSocket-d8jECpSy.js} +3 -3
- package/dist/assets/{vega-component-CZ0Wc38y.js → vega-component-BHwEuJf9.js} +1 -1
- package/dist/assets/{xychartDiagram-VJFVF3MP-D8MwezNt.js → xychartDiagram-VJFVF3MP-Bj1PQ-If.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/_baseMap-Vfry3tFM.js +0 -1
- package/dist/assets/channel-3y9jn9pu.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-WjNz9-Bb.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-WjNz9-Bb.js +0 -1
- package/dist/assets/clone-EIVnPM7y.js +0 -1
- package/dist/assets/infoDiagram-PH2N3AL5-BSD2-I5o.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-VX3af-nG.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ap as r,aq as n,ae as t,ar as a,as as e,at as i,z as u,au as o,A as s}from"./index-
|
|
1
|
+
import{ap as r,aq as n,ae as t,ar as a,as as e,at as i,z as u,au as o,A as s}from"./index-5kMLPMnE.js";import{a as f}from"./_baseEach-jzx_aXcN.js";import{b as c}from"./_baseMap-BaboG7sp.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,s=null===t,f=t==t,c=r(t);if(!s&&!c&&!u&&n>t||u&&o&&f&&!s&&!c||e&&o&&f||!a&&f||!i)return 1;if(!e&&!u&&!c&&n<t||c&&a&&i&&!e&&!u||s&&a&&i||!o&&i||!f)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 s=-1;return u=n(u,i(f)),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:++s,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 s=l(e[a],i[a]);if(s)return a>=o?s:s*("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,s(n),[])}));export{d as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as t,a as e,S as a}from"./chunk-AEK57VVT-Bfd5ODjP.js";import{_ as i,c as r,l as n,d as s,j as d,u as o}from"./mermaid-DHc4NkXl.js";import{s as g}from"./transform-DjHZbYKP.js";import{G as p}from"./graph-CNRO7n5G.js";import{l as h}from"./layout-uBpRKkHB.js";import{l as c,k as l}from"./step-BwsUM5iJ.js";import"./chunk-RZ5BOZE2-DrmmI8Wu.js";import"./index-y0qqwv_n.js";import"./timer-DFzT7np-.js";import"./_baseUniq-t6ElO-9x.js";import"./_baseEach-BbvNE0u0.js";import"./min-1bMSGCPp.js";import"./_baseMap-Vfry3tFM.js";import"./sortBy-DfLjg596.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"),E=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"),S=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(),s=n.height,d=t.append("text").attr("x",r().state.padding).attr("y",s+.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(d,t,g),g=!1),o=!1}));const p=t.append("line").attr("x1",r().state.padding).attr("y1",r().state.padding+s+r().state.dividerMargin/2).attr("y2",r().state.padding+s+r().state.dividerMargin/2).attr("class","descr-divider"),h=d.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+s+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,s=t.node().getBBox(),d=s.width,o=s.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,d);c===d&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>d&&(h=(d-c)/2+i),Math.abs(o-l.x)<i&&p>d&&(h=o-(p-d)/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<=d&&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"),j=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"),v=i(((t,e,a,i)=>{let n=0;const s=i.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");const g=o.split(d.lineBreakRegex);let p=1.25*r().state.noteMargin;for(const d of g){const t=d.trim();if(t.length>0){const i=s.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:s.node().getBBox().width,textHeight:n}}),"_drawLongText"),z=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:s}=v(t,0,0,i);return a.attr("height",s+2*r().state.noteMargin),a.attr("width",n+2*r().state.noteMargin),a}),"drawNote"),H=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||j(n,e),"note"===e.type&&z(e.note.text,n),"divider"===e.type&&k(n),"default"===e.type&&0===e.descriptions.length&&E(n,e),"default"===e.type&&e.descriptions.length>0&&S(n,e);const s=n.node().getBBox();return i.width=s.width+2*r().state.padding,i.height=s.height+2*r().state.padding,b.set(a,i),i}),"drawState"),T=0,D=i((function(t,e,s){const g=i((function(t){switch(t){case a.relationType.AGGREGATION:return"aggregation";case a.relationType.EXTENSION:return"extension";case a.relationType.COMPOSITION:return"composition";case a.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const p=e.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(a.relationType.DEPENDENCY)+"End)"),void 0!==s.title){const a=t.append("g").attr("class","stateLabel"),{x:i,y:g}=o.calcLabelPosition(e.points),p=d.getRows(s.title);let h=0;const c=[];let l=0,x=0;for(let t=0;t<=p.length;t++){const e=a.append("text").attr("text-anchor","middle").text(p[t]).attr("x",i).attr("y",g+h),r=e.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=e.node().getBBox();h=t.height,n.info("Title height",h,g)}c.push(e)}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=a.node().getBBox();a.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={},A=i((function(){}),"setConf"),G=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"),O=i((function(t,e,a,i){x=r().state;const d=r().securityLevel;let o;"sandbox"===d&&(o=g("#i"+e));const p=g("sandbox"===d?o.nodes()[0].contentDocument.body:"body"),h="sandbox"===d?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);G(c);const l=i.db.getRootDoc();U(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;s(c,m,1.75*y,x.useMaxWidth),c.attr("viewBox",`${u.x-x.padding} ${u.y-x.padding} `+y+" "+m)}),"draw"),R=i((t=>t?t.length*x.fontSizeFactor:1),"getLabelWidth"),U=i(((t,e,a,i,r,s,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{}}));const f=o.db.getStates(),u=o.db.getRelations(),y=Object.keys(f);for(const n of y){const t=f[n];let d;if(a&&(t.parentId=a),t.doc){let a=e.append("g").attr("id",t.id).attr("class","stateGroup");d=U(t.doc,a,t.id,!i,r,s,o);{a=N(a,t,i);let e=a.node().getBBox();d.width=e.width,d.height=e.height+x.padding/2,L[t.id]={y:x.compositTitleSize}}}else d=H(e,t,g);if(t.note){const a={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},i=H(e,a,g);"left of"===t.note.position?(g.setNode(d.id+"-note",i),g.setNode(d.id,d)):(g.setNode(d.id,d),g.setNode(d.id+"-note",i)),g.setParent(d.id,d.id+"-group"),g.setParent(d.id+"-note",d.id+"-group")}else g.setNode(d.id,d)}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:R(t.title),height:x.labelHeight*d.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);s.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={setConf:A,draw:O},C={parser:e,get db(){return new a(1)},renderer:P,styles:t,init:i((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute}),"init")};export{C as diagram};
|
|
1
|
+
import{s as t,a as e,S as a}from"./chunk-AEK57VVT-BIvPAgeG.js";import{_ as i,c as r,l as n,d as s,j as d,u as o}from"./mermaid-BZNnZOMt.js";import{s as g}from"./transform-DjHZbYKP.js";import{G as p}from"./graph-yBqyK557.js";import{l as h}from"./layout-BDTIBmJl.js";import{l as c,k as l}from"./step-BwsUM5iJ.js";import"./chunk-RZ5BOZE2-BiFJlO8Y.js";import"./index-5kMLPMnE.js";import"./timer-DFzT7np-.js";import"./_baseUniq-BXyj56Tx.js";import"./_baseEach-jzx_aXcN.js";import"./min-C5aIXrw4.js";import"./_baseMap-BaboG7sp.js";import"./sortBy-YxnhyBB5.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"),E=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"),S=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(),s=n.height,d=t.append("text").attr("x",r().state.padding).attr("y",s+.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(d,t,g),g=!1),o=!1}));const p=t.append("line").attr("x1",r().state.padding).attr("y1",r().state.padding+s+r().state.dividerMargin/2).attr("y2",r().state.padding+s+r().state.dividerMargin/2).attr("class","descr-divider"),h=d.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+s+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,s=t.node().getBBox(),d=s.width,o=s.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,d);c===d&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>d&&(h=(d-c)/2+i),Math.abs(o-l.x)<i&&p>d&&(h=o-(p-d)/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<=d&&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"),j=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"),v=i(((t,e,a,i)=>{let n=0;const s=i.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");const g=o.split(d.lineBreakRegex);let p=1.25*r().state.noteMargin;for(const d of g){const t=d.trim();if(t.length>0){const i=s.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:s.node().getBBox().width,textHeight:n}}),"_drawLongText"),z=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:s}=v(t,0,0,i);return a.attr("height",s+2*r().state.noteMargin),a.attr("width",n+2*r().state.noteMargin),a}),"drawNote"),H=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||j(n,e),"note"===e.type&&z(e.note.text,n),"divider"===e.type&&k(n),"default"===e.type&&0===e.descriptions.length&&E(n,e),"default"===e.type&&e.descriptions.length>0&&S(n,e);const s=n.node().getBBox();return i.width=s.width+2*r().state.padding,i.height=s.height+2*r().state.padding,b.set(a,i),i}),"drawState"),T=0,D=i((function(t,e,s){const g=i((function(t){switch(t){case a.relationType.AGGREGATION:return"aggregation";case a.relationType.EXTENSION:return"extension";case a.relationType.COMPOSITION:return"composition";case a.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const p=e.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(a.relationType.DEPENDENCY)+"End)"),void 0!==s.title){const a=t.append("g").attr("class","stateLabel"),{x:i,y:g}=o.calcLabelPosition(e.points),p=d.getRows(s.title);let h=0;const c=[];let l=0,x=0;for(let t=0;t<=p.length;t++){const e=a.append("text").attr("text-anchor","middle").text(p[t]).attr("x",i).attr("y",g+h),r=e.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=e.node().getBBox();h=t.height,n.info("Title height",h,g)}c.push(e)}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=a.node().getBBox();a.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={},A=i((function(){}),"setConf"),G=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"),O=i((function(t,e,a,i){x=r().state;const d=r().securityLevel;let o;"sandbox"===d&&(o=g("#i"+e));const p=g("sandbox"===d?o.nodes()[0].contentDocument.body:"body"),h="sandbox"===d?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);G(c);const l=i.db.getRootDoc();U(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;s(c,m,1.75*y,x.useMaxWidth),c.attr("viewBox",`${u.x-x.padding} ${u.y-x.padding} `+y+" "+m)}),"draw"),R=i((t=>t?t.length*x.fontSizeFactor:1),"getLabelWidth"),U=i(((t,e,a,i,r,s,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{}}));const f=o.db.getStates(),u=o.db.getRelations(),y=Object.keys(f);for(const n of y){const t=f[n];let d;if(a&&(t.parentId=a),t.doc){let a=e.append("g").attr("id",t.id).attr("class","stateGroup");d=U(t.doc,a,t.id,!i,r,s,o);{a=N(a,t,i);let e=a.node().getBBox();d.width=e.width,d.height=e.height+x.padding/2,L[t.id]={y:x.compositTitleSize}}}else d=H(e,t,g);if(t.note){const a={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},i=H(e,a,g);"left of"===t.note.position?(g.setNode(d.id+"-note",i),g.setNode(d.id,d)):(g.setNode(d.id,d),g.setNode(d.id+"-note",i)),g.setParent(d.id,d.id+"-group"),g.setParent(d.id+"-note",d.id+"-group")}else g.setNode(d.id,d)}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:R(t.title),height:x.labelHeight*d.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);s.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={setConf:A,draw:O},C={parser:e,get db(){return new a(1)},renderer:P,styles:t,init:i((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute}),"init")};export{C as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,b as t,a as s,S as e}from"./chunk-AEK57VVT-BIvPAgeG.js";import{_ as a}from"./mermaid-BZNnZOMt.js";import"./transform-DjHZbYKP.js";import"./chunk-RZ5BOZE2-BiFJlO8Y.js";import"./index-5kMLPMnE.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";var i={parser:s,get db(){return new e(2)},renderer:t,styles:r,init:a((r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute}),"init")};export{i as diagram};
|