@marimo-team/frontend 0.11.6-dev4 → 0.11.6-dev6
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-BKW0VVLp.js → ConnectedDataExplorerComponent-gu0MNu1i.js} +1 -1
- package/dist/assets/{VegaLite-By_E-0eL.js → VegaLite-PK0_zLay.js} +1 -1
- package/dist/assets/{_baseEach-DF2lMatG.js → _baseEach-BJ5y-ZxJ.js} +1 -1
- package/dist/assets/_baseMap-B_HyW58m.js +1 -0
- package/dist/assets/{_baseUniq-PgltSSM2.js → _baseUniq-BjYK0W5u.js} +1 -1
- package/dist/assets/{any-language-editor-Cf2XEEN0.js → any-language-editor-CgICLdW3.js} +1 -1
- package/dist/assets/{architectureDiagram-UYN6MBPD-BQEIECau.js → architectureDiagram-UYN6MBPD-C88y-Ytg.js} +1 -1
- package/dist/assets/{blockDiagram-ZHA2E4KO-zy9Jpss7.js → blockDiagram-ZHA2E4KO-CK9BE6s8.js} +1 -1
- package/dist/assets/{c4Diagram-6F5ED5ID-DxgLMHQF.js → c4Diagram-6F5ED5ID-BB4_UC9o.js} +1 -1
- package/dist/assets/channel-DDB4gjP1.js +1 -0
- package/dist/assets/{chunk-5HRBRIJM-C8b1q02j.js → chunk-5HRBRIJM-vVQxt81S.js} +1 -1
- package/dist/assets/{chunk-7U56Z5CX-CMnWW1Q5.js → chunk-7U56Z5CX-o41W7yhU.js} +1 -1
- package/dist/assets/{chunk-ASOPGD6M-BjDNxzq7.js → chunk-ASOPGD6M-D2Xt0rr4.js} +1 -1
- package/dist/assets/{chunk-KFBOBJHC-CKNjePvk.js → chunk-KFBOBJHC-B3Y1DRrB.js} +1 -1
- package/dist/assets/{chunk-T2TOU4HS-DsKgt2ZA.js → chunk-T2TOU4HS-Wo8pi8zO.js} +1 -1
- package/dist/assets/{chunk-TMUBEWPD-Chlga08K.js → chunk-TMUBEWPD-BIFz1lDs.js} +1 -1
- package/dist/assets/classDiagram-LNE6IOMH-BDk6eDmu.js +1 -0
- package/dist/assets/classDiagram-v2-MQ7JQ4JX-BDk6eDmu.js +1 -0
- package/dist/assets/clone-CLQE6CSF.js +1 -0
- package/dist/assets/{compile-DyqDLFuZ.js → compile-BmKIMqO9.js} +1 -1
- package/dist/assets/{createWsUrl-RJs09Kmj.js → createWsUrl-BPPmyA_4.js} +1 -1
- package/dist/assets/{dagre-4EVJKHTY-DhkjMkul.js → dagre-4EVJKHTY-BDCmMNZ0.js} +1 -1
- package/dist/assets/{data-editor-CpXZg-C-.js → data-editor-DCmltGQP.js} +1 -1
- package/dist/assets/{diagram-QW4FP2JN-DGrGdkZp.js → diagram-QW4FP2JN-BTej6yUl.js} +1 -1
- package/dist/assets/{edit-page-D7OY_9v5.js → edit-page-CgT3oOtb.js} +3 -3
- package/dist/assets/{erDiagram-6RL3IURR-CEdwoQP2.js → erDiagram-6RL3IURR-CKWGcBEa.js} +1 -1
- package/dist/assets/{flowDiagram-7ASYPVHJ-DZ5FvSEM.js → flowDiagram-7ASYPVHJ-D3Q3hl5h.js} +1 -1
- package/dist/assets/{ganttDiagram-NTVNEXSI-BIDl85YD.js → ganttDiagram-NTVNEXSI-BO0r2J5G.js} +1 -1
- package/dist/assets/{gitGraph-YCYPL57B-04U27GVQ.js → gitGraph-YCYPL57B-Dc5E8VKl.js} +1 -1
- package/dist/assets/{gitGraphDiagram-NRZ2UAAF-DDpT7UJU.js → gitGraphDiagram-NRZ2UAAF-BZKCMWge.js} +1 -1
- package/dist/assets/{graph-BaBU5kNK.js → graph-DDFc4wH6.js} +1 -1
- package/dist/assets/{home-page-CCSaKt1C.js → home-page-BD_PuM_F.js} +1 -1
- package/dist/assets/{index-B8D-eVPw.js → index-B0lYilNT.js} +1 -1
- package/dist/assets/{index-jSLzHFVU.js → index-BxGw0l4Y.js} +1 -1
- package/dist/assets/{index-BnYzd2X3.js → index-ByC_2aW9.js} +1 -1
- package/dist/assets/{index-yUr0bKOa.js → index-CHnJHqN7.js} +1 -1
- package/dist/assets/{index-Ccv4W_Bg.js → index-CLwDXyha.js} +1 -1
- package/dist/assets/{index-CaCDIPhE.js → index-COdqxymz.js} +1 -1
- package/dist/assets/{index-sUOTmutM.js → index-Ca_W_ZNV.js} +1 -1
- package/dist/assets/{index-DgK5Iajq.js → index-CgQHaqf6.js} +1 -1
- package/dist/assets/{index-Ca7eaXdk.js → index-CnBbKLZ-.js} +1 -1
- package/dist/assets/{index-6rsTvEWg.js → index-Cs-wOJQ8.js} +1 -1
- package/dist/assets/{index-D7v8RQc-.js → index-DMfM6Ke7.js} +1 -1
- package/dist/assets/{index-DFmYBu3Y.js → index-DjPS3eU5.js} +1 -1
- package/dist/assets/{index-xxpjQ2lI.js → index-DjbUGbMz.js} +1 -1
- package/dist/assets/{index-bBRIUKAN.js → index-DqRdPlP8.js} +6 -6
- package/dist/assets/{index-C-111bQw.js → index-HqvFQzDY.js} +1 -1
- package/dist/assets/{index-BYPIi4Aa.js → index-cgO1pgjA.js} +1 -1
- package/dist/assets/{index-A6Pbcks5.js → index-hczJCcil.js} +1 -1
- package/dist/assets/{infoDiagram-A4XQUW5V-CQ_gqUgb.js → infoDiagram-A4XQUW5V-CdVQtZoZ.js} +1 -1
- package/dist/assets/{journeyDiagram-G5WM74LC-Cq6Decau.js → journeyDiagram-G5WM74LC-N_5nNExd.js} +1 -1
- package/dist/assets/{kanban-definition-QRCXZQQD-DN8oQjxC.js → kanban-definition-QRCXZQQD-D4IOPo7T.js} +1 -1
- package/dist/assets/{layout-C8I0UdqO.js → layout-DC3rCxfP.js} +1 -1
- package/dist/assets/{linear-DhXjXuha.js → linear-BHvAfUan.js} +1 -1
- package/dist/assets/{mermaid-Bu9eLlNE.js → mermaid-BdciemuK.js} +3 -3
- package/dist/assets/{min-Bjoph6T1.js → min-8C8YA5QL.js} +1 -1
- package/dist/assets/{mindmap-definition-GWI6TPTV-CloBacUO.js → mindmap-definition-GWI6TPTV-fByAN2td.js} +1 -1
- package/dist/assets/{pieDiagram-YF2LJOPJ-D0EgqadI.js → pieDiagram-YF2LJOPJ-sEgioMLP.js} +1 -1
- package/dist/assets/{quadrantDiagram-OS5C2QUG-C2-6xMx6.js → quadrantDiagram-OS5C2QUG-BSI3skdy.js} +1 -1
- package/dist/assets/{react-plotly-C01b6TFd.js → react-plotly-BRz5MY0y.js} +1 -1
- package/dist/assets/{requirementDiagram-MIRIMTAZ-BtqgW8UI.js → requirementDiagram-MIRIMTAZ-BgORSqRB.js} +1 -1
- package/dist/assets/{run-page-D_zc3zAl.js → run-page--xpvnppn.js} +1 -1
- package/dist/assets/{sankeyDiagram-Y46BX6SQ-D-eqHIzs.js → sankeyDiagram-Y46BX6SQ-ChGTAvQe.js} +1 -1
- package/dist/assets/{sequenceDiagram-G6AWOVSC-CwFso4tO.js → sequenceDiagram-G6AWOVSC-E4zcjI5U.js} +1 -1
- package/dist/assets/{slides-component-WwfGDCyr.js → slides-component-CAKTiRis.js} +1 -1
- package/dist/assets/{sortBy-B6dyzMNp.js → sortBy-BrhXKAr3.js} +1 -1
- package/dist/assets/{stateDiagram-MAYHULR4-BAYst6o4.js → stateDiagram-MAYHULR4-e_D3Hq4h.js} +1 -1
- package/dist/assets/stateDiagram-v2-4JROLMXI-BKkvSRRk.js +1 -0
- package/dist/assets/{terminal-MXg7LE9T.js → terminal-BI5IHv5q.js} +1 -1
- package/dist/assets/{time-BXwQtuRS.js → time-BoSzef17.js} +1 -1
- package/dist/assets/{timeline-definition-U7ZMHBDA-8Krb_Ob1.js → timeline-definition-U7ZMHBDA-B4vV5-2T.js} +1 -1
- package/dist/assets/{tree-gVKyHBoX.js → tree-CnM2kcDb.js} +1 -1
- package/dist/assets/{useMarimoWebSocket-BlrXa45k.js → useMarimoWebSocket-DzDC-h_8.js} +3 -3
- package/dist/assets/{vega-component-4q-dkMWy.js → vega-component-aPfyE_vV.js} +1 -1
- package/dist/assets/{xychartDiagram-6QU3TZC5-Dm5KTWuG.js → xychartDiagram-6QU3TZC5-hCmPccpK.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/_baseMap-BlK-P_Bv.js +0 -1
- package/dist/assets/channel-CkyO4pwN.js +0 -1
- package/dist/assets/classDiagram-LNE6IOMH-DfQbr5HY.js +0 -1
- package/dist/assets/classDiagram-v2-MQ7JQ4JX-DfQbr5HY.js +0 -1
- package/dist/assets/clone-JnMG0QEx.js +0 -1
- package/dist/assets/stateDiagram-v2-4JROLMXI-C5CqepzN.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{af as r,ag as n,ah as t,ai as a,aj as e,ak as i,y as u,al as o,z as f}from"./index-
|
|
1
|
+
import{af as r,ag as n,ah as t,ai as a,aj as e,ak as i,y as u,al as o,z as f}from"./index-DqRdPlP8.js";import{a as s}from"./_baseEach-BJ5y-ZxJ.js";import{b as l}from"./_baseMap-B_HyW58m.js";function c(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,l=r(t);if(!f&&!l&&!u&&n>t||u&&o&&s&&!f&&!l||e&&o&&s||!a&&s||!i)return 1;if(!e&&!u&&!l&&n<t||l&&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}(l(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=c(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 h=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{h as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as t,a as e,b as a}from"./chunk-7U56Z5CX-CMnWW1Q5.js";import{_ as i,d as r,l as n,j as d,e as s,u as o}from"./mermaid-Bu9eLlNE.js";import{s as g}from"./transform-D6ULhE8R.js";import{G as p}from"./graph-BaBU5kNK.js";import{l as c}from"./layout-C8I0UdqO.js";import{l as h,k as l}from"./step-CaHXtLdi.js";import"./chunk-5HRBRIJM-C8b1q02j.js";import"./index-bBRIUKAN.js";import"./_baseUniq-PgltSSM2.js";import"./_baseEach-DF2lMatG.js";import"./min-Bjoph6T1.js";import"./_baseMap-BlK-P_Bv.js";import"./sortBy-B6dyzMNp.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"),c=s.node().getBBox(),h=Math.max(c.width,n.width);return p.attr("x2",h+3*r().state.padding),t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",h+2*r().state.padding).attr("height",c.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 c,h=Math.max(p,s);h===s&&(h+=n);const l=t.node().getBBox();e.doc,c=o-i,p>s&&(c=(s-h)/2+i),Math.abs(o-l.x)<i&&p>s&&(c=o-(p-s)/2);const x=1-r().state.textHeight;return t.insert("rect",":first-child").attr("x",c).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+r().state.textHeight+r().state.titleShift+1).attr("rx","0"),g.attr("x",c+i),p<=s&&g.attr("x",o+(h-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",c).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",h).attr("height",3*r().state.textHeight).attr("rx",r().state.radius),t.insert("rect",":first-child").attr("x",c).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",h).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"),j=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"),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||v(n,e),"note"===e.type&&j(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,c=h().x((function(t){return t.x})).y((function(t){return t.y})).curve(l),x=t.append("path").attr("d",c(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 c=0;const h=[];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+c),r=a.node().getBBox();if(l=Math.max(l,r.width),x=Math.min(x,r.x),n.info(r.x,i,g+c),0===c){const t=a.node().getBBox();c=t.height,n.info("Title height",c,g)}h.push(a)}let f=c*p.length;if(p.length>1){const t=(p.length-1)*c*.5;h.forEach(((e,a)=>e.attr("y",g+a*c-t))),f=c*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"),c="sandbox"===s?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t);const h=p.select(`[id='${e}']`);R(h);const l=i.db.getRootDoc();O(l,h,void 0,!1,p,c,i);const f=x.padding,u=h.node().getBBox(),y=u.width+2*f,m=u.height+2*f;d(h,m,1.75*y,x.useMaxWidth),h.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 h,l=!0;for(h=0;h<t.length;h++)if("relation"===t[h].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=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(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)})),c(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:t,db:e,renderer:{setConf:G,draw:U},styles:a,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-o41W7yhU.js";import{_ as i,d as r,l as n,j as d,e as s,u as o}from"./mermaid-BdciemuK.js";import{s as g}from"./transform-D6ULhE8R.js";import{G as p}from"./graph-DDFc4wH6.js";import{l as c}from"./layout-DC3rCxfP.js";import{l as h,k as l}from"./step-CaHXtLdi.js";import"./chunk-5HRBRIJM-vVQxt81S.js";import"./index-DqRdPlP8.js";import"./_baseUniq-BjYK0W5u.js";import"./_baseEach-BJ5y-ZxJ.js";import"./min-8C8YA5QL.js";import"./_baseMap-B_HyW58m.js";import"./sortBy-BrhXKAr3.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"),c=s.node().getBBox(),h=Math.max(c.width,n.width);return p.attr("x2",h+3*r().state.padding),t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",h+2*r().state.padding).attr("height",c.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 c,h=Math.max(p,s);h===s&&(h+=n);const l=t.node().getBBox();e.doc,c=o-i,p>s&&(c=(s-h)/2+i),Math.abs(o-l.x)<i&&p>s&&(c=o-(p-s)/2);const x=1-r().state.textHeight;return t.insert("rect",":first-child").attr("x",c).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+r().state.textHeight+r().state.titleShift+1).attr("rx","0"),g.attr("x",c+i),p<=s&&g.attr("x",o+(h-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",c).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",h).attr("height",3*r().state.textHeight).attr("rx",r().state.radius),t.insert("rect",":first-child").attr("x",c).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",h).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"),j=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"),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||v(n,e),"note"===e.type&&j(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,c=h().x((function(t){return t.x})).y((function(t){return t.y})).curve(l),x=t.append("path").attr("d",c(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 c=0;const h=[];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+c),r=a.node().getBBox();if(l=Math.max(l,r.width),x=Math.min(x,r.x),n.info(r.x,i,g+c),0===c){const t=a.node().getBBox();c=t.height,n.info("Title height",c,g)}h.push(a)}let f=c*p.length;if(p.length>1){const t=(p.length-1)*c*.5;h.forEach(((e,a)=>e.attr("y",g+a*c-t))),f=c*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"),c="sandbox"===s?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t);const h=p.select(`[id='${e}']`);R(h);const l=i.db.getRootDoc();O(l,h,void 0,!1,p,c,i);const f=x.padding,u=h.node().getBBox(),y=u.width+2*f,m=u.height+2*f;d(h,m,1.75*y,x.useMaxWidth),h.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 h,l=!0;for(h=0;h<t.length;h++)if("relation"===t[h].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=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(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)})),c(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:t,db:e,renderer:{setConf:G,draw:U},styles:a,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,a as s,c as t,b as a}from"./chunk-7U56Z5CX-o41W7yhU.js";import{_ as e}from"./mermaid-BdciemuK.js";import"./transform-D6ULhE8R.js";import"./chunk-5HRBRIJM-vVQxt81S.js";import"./index-DqRdPlP8.js";import"./step-CaHXtLdi.js";var o={parser:r,db:s,renderer:t,styles:a,init:e((r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute,s.clear()}),"init")};export{o as diagram};
|