@marimo-team/frontend 0.10.16-dev5 → 0.10.16-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.
Files changed (82) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-Bz_uSclk.js → ConnectedDataExplorerComponent-CMn9UGYB.js} +1 -1
  2. package/dist/assets/{VegaLite-NtLob7ZF.js → VegaLite-CzjhCZGj.js} +1 -1
  3. package/dist/assets/{_baseEach-CJvms2XX.js → _baseEach-DqBRKvZu.js} +1 -1
  4. package/dist/assets/_baseMap-G8KYuL5k.js +1 -0
  5. package/dist/assets/{_baseUniq-BTFNh5zb.js → _baseUniq-BZCLAVqW.js} +1 -1
  6. package/dist/assets/{any-language-editor-CJg7BLDS.js → any-language-editor-CFmV9Msp.js} +1 -1
  7. package/dist/assets/{architectureDiagram-IFBEXTG3-De3LVF9i.js → architectureDiagram-IFBEXTG3--3uVB-Zn.js} +1 -1
  8. package/dist/assets/{blockDiagram-TCMKQVZ6-CjgbqmF-.js → blockDiagram-TCMKQVZ6-D70e_MSY.js} +1 -1
  9. package/dist/assets/{c4Diagram-ZCSEYPFN-R9lGVlvP.js → c4Diagram-ZCSEYPFN-D7zxnp2C.js} +1 -1
  10. package/dist/assets/channel-W2HF-ThY.js +1 -0
  11. package/dist/assets/{chunk-4LC2V6XN-eP2Cypzu.js → chunk-4LC2V6XN-ukZs60SV.js} +1 -1
  12. package/dist/assets/{chunk-5RIWM3LS-CKt_Z6uj.js → chunk-5RIWM3LS-DbksIoXo.js} +1 -1
  13. package/dist/assets/{chunk-6JKP7OK7-DEPiOG2D.js → chunk-6JKP7OK7-CwM5m2KQ.js} +1 -1
  14. package/dist/assets/{chunk-NGC4727B-CTqpdKv-.js → chunk-NGC4727B-28e_4zpr.js} +1 -1
  15. package/dist/assets/{chunk-REEJFE46-DS5c1CPg.js → chunk-REEJFE46-B1dLY5nI.js} +1 -1
  16. package/dist/assets/{chunk-RYO7GUH3-D82meyB5.js → chunk-RYO7GUH3-IXFleQ8X.js} +1 -1
  17. package/dist/assets/{chunk-V35ELUW5-CzRWZ-LI.js → chunk-V35ELUW5-B8ISr8Le.js} +1 -1
  18. package/dist/assets/{classDiagram-Q73GJZWF-B8gKI2w4.js → classDiagram-Q73GJZWF-SMD_nkwt.js} +1 -1
  19. package/dist/assets/{classDiagram-v2-C6QPLPW4-JXJNjqEK.js → classDiagram-v2-C6QPLPW4-CvPwpC3Q.js} +1 -1
  20. package/dist/assets/clone-BBta_7b-.js +1 -0
  21. package/dist/assets/{compile-DxIziTav.js → compile-DAAXi62B.js} +1 -1
  22. package/dist/assets/{createWsUrl-BqVE56we.js → createWsUrl-BGZ4f4MG.js} +1 -1
  23. package/dist/assets/{dagre-7KT5K2WU-bp7GUyHf.js → dagre-7KT5K2WU-D7Do1Sjd.js} +1 -1
  24. package/dist/assets/{data-editor-DstFueyp.js → data-editor-BpvoroP9.js} +1 -1
  25. package/dist/assets/{diagram-AVGMFHF7-B_oUKmmS.js → diagram-AVGMFHF7-CA-9lDMc.js} +1 -1
  26. package/dist/assets/{edit-page-CoNMLfpn.js → edit-page-B8MuA3I8.js} +3 -3
  27. package/dist/assets/{erDiagram-DKC2X5TE-BGPdzRjb.js → erDiagram-DKC2X5TE-D-HJDP01.js} +1 -1
  28. package/dist/assets/{flowDiagram-NWEUNK3L-BYabXpgB.js → flowDiagram-NWEUNK3L-CBUyFtm_.js} +1 -1
  29. package/dist/assets/{ganttDiagram-HLVPPPRE-D5gZWDpN.js → ganttDiagram-HLVPPPRE-FutTcSv5.js} +1 -1
  30. package/dist/assets/{gitGraph-YCYPL57B-BtsoiwAP.js → gitGraph-YCYPL57B-DHRFUXv4.js} +1 -1
  31. package/dist/assets/{gitGraphDiagram-JPZ3KUXI-Bg0Rk8me.js → gitGraphDiagram-JPZ3KUXI-C1skk76S.js} +1 -1
  32. package/dist/assets/{graph-B1OsHof8.js → graph-YTrCDQ_q.js} +1 -1
  33. package/dist/assets/{home-page-C6P-SqPX.js → home-page-C15b5FPg.js} +1 -1
  34. package/dist/assets/{index-dSPN7XR9.js → index-B5PQwDv3.js} +1 -1
  35. package/dist/assets/{index-fVeggcQE.js → index-BCMjW2WN.js} +1 -1
  36. package/dist/assets/{index--d_2N_Uv.js → index-BYBCHbnu.js} +1 -1
  37. package/dist/assets/{index-CYXZpa8W.js → index-BZfujDTa.js} +1 -1
  38. package/dist/assets/{index-ByJ17Mu6.js → index-CCTzCOVd.js} +1 -1
  39. package/dist/assets/{index-w5aoqzyH.js → index-CN6IpYiQ.js} +1 -1
  40. package/dist/assets/{index-rzG4SnB9.js → index-Cg77eHqF.js} +1 -1
  41. package/dist/assets/{index-DW4Y8oKo.js → index-Cyie-y9y.js} +1 -1
  42. package/dist/assets/{index-Cb0ovgnp.js → index-D-ieLG55.js} +1 -1
  43. package/dist/assets/{index-Cn-dFzpq.js → index-DCJ8NeHn.js} +1 -1
  44. package/dist/assets/{index-CEd0RGLz.js → index-DFsCnuc7.js} +1 -1
  45. package/dist/assets/{index-CNFdZLE8.js → index-DHOsJnNV.js} +4 -4
  46. package/dist/assets/{index-DhR3tDgS.js → index-DJwxbYwC.js} +1 -1
  47. package/dist/assets/{index-Bs1jcv_l.js → index-D_gK7jYt.js} +1 -1
  48. package/dist/assets/{index-D3ewtDif.js → index-DgZFkG88.js} +1 -1
  49. package/dist/assets/{index-DDv480JZ.js → index-bgILgg2o.js} +1 -1
  50. package/dist/assets/{index-D2qOGSb5.js → index-kEnASGp2.js} +1 -1
  51. package/dist/assets/{infoDiagram-RZZSJVI2-CdhXV3Sl.js → infoDiagram-RZZSJVI2-CM9-Qjhd.js} +1 -1
  52. package/dist/assets/{journeyDiagram-BLD6N6MZ-DNyTWE2m.js → journeyDiagram-BLD6N6MZ-BhWZE0s5.js} +1 -1
  53. package/dist/assets/{json-BFET12Vo.js → json-CJYSw9M4.js} +1 -1
  54. package/dist/assets/{layout-hHqwt1TN.js → layout-CcOiFAkC.js} +1 -1
  55. package/dist/assets/{linear-CwL2uYt-.js → linear-DSnQ1xNq.js} +1 -1
  56. package/dist/assets/{mermaid-Y7RAipZf.js → mermaid-Bzt85ry3.js} +3 -3
  57. package/dist/assets/{min-xOt_t-AD.js → min-DMKBZ5_O.js} +1 -1
  58. package/dist/assets/{mindmap-definition-OEB2RXX2-BO0-S4qR.js → mindmap-definition-OEB2RXX2-CUacYvEo.js} +1 -1
  59. package/dist/assets/{pieDiagram-X7YZ5ZEZ-B3jzoxHZ.js → pieDiagram-X7YZ5ZEZ-ze-xOqqq.js} +1 -1
  60. package/dist/assets/{quadrantDiagram-F36EZAVT-o7K-DrKK.js → quadrantDiagram-F36EZAVT-dIggvtYP.js} +1 -1
  61. package/dist/assets/{react-plotly-BmRQJgGb.js → react-plotly-DvYFKhtr.js} +1 -1
  62. package/dist/assets/{requirementDiagram-JG2LMPGF-CHmvz0fu.js → requirementDiagram-JG2LMPGF-BbKoQgcj.js} +1 -1
  63. package/dist/assets/{run-page-DbEGOolj.js → run-page-Zql-rNcH.js} +1 -1
  64. package/dist/assets/{sankeyDiagram-ATFNWWW6-vNUr0eiF.js → sankeyDiagram-ATFNWWW6-CnDqr_n8.js} +1 -1
  65. package/dist/assets/{sequenceDiagram-WK7YDQ3N-DnQo1y83.js → sequenceDiagram-WK7YDQ3N-CzMTJVPd.js} +1 -1
  66. package/dist/assets/{slides-component-C1owDGhz.js → slides-component-C3TdpXSO.js} +1 -1
  67. package/dist/assets/{sortBy-CQrY7GTB.js → sortBy-Ci_jFO7n.js} +1 -1
  68. package/dist/assets/{stateDiagram-4JV6CC6H-Bs35ss5i.js → stateDiagram-4JV6CC6H-D-05QAIg.js} +1 -1
  69. package/dist/assets/stateDiagram-v2-7KT6RKTD-Vudc7Lq1.js +1 -0
  70. package/dist/assets/{terminal-QnfwbUbX.js → terminal-Dr6qM3-w.js} +1 -1
  71. package/dist/assets/{time-CYWZ-XSe.js → time-AX-TNwZ4.js} +1 -1
  72. package/dist/assets/{timeline-definition-3ZMEY6HS-CNrad5rt.js → timeline-definition-3ZMEY6HS-DZ-JWwMy.js} +1 -1
  73. package/dist/assets/{tree-CbUPO77y.js → tree-BBRDqf3n.js} +2 -2
  74. package/dist/assets/{useMarimoWebSocket-BCGXVR82.js → useMarimoWebSocket-CmRXpYE5.js} +4 -4
  75. package/dist/assets/{vega-component-DjLHgQoU.js → vega-component-DvK4mols.js} +1 -1
  76. package/dist/assets/{xychartDiagram-KECQ2H5Q-fr4JdQIi.js → xychartDiagram-KECQ2H5Q-Cequy5ER.js} +1 -1
  77. package/dist/index.html +1 -1
  78. package/package.json +1 -1
  79. package/dist/assets/_baseMap-CB4KBnTj.js +0 -1
  80. package/dist/assets/channel-CJgI0eG8.js +0 -1
  81. package/dist/assets/clone-D1Q_JaWe.js +0 -1
  82. package/dist/assets/stateDiagram-v2-7KT6RKTD-Bgcy_O73.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-CNFdZLE8.js";import{a as s}from"./_baseEach-CJvms2XX.js";import{b as l}from"./_baseMap-CB4KBnTj.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
+ 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-DHOsJnNV.js";import{a as s}from"./_baseEach-DqBRKvZu.js";import{b as l}from"./_baseMap-G8KYuL5k.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-5RIWM3LS-CKt_Z6uj.js";import{_ as i,d as r,l as n,j as d,e as s,u as o}from"./mermaid-Y7RAipZf.js";import{s as g}from"./transform-C6EuPmuu.js";import{G as p}from"./graph-B1OsHof8.js";import{l as c}from"./layout-hHqwt1TN.js";import{l as h,k as l}from"./step-DY8hpDjU.js";import"./chunk-4LC2V6XN-eP2Cypzu.js";import"./index-CNFdZLE8.js";import"./_baseUniq-BTFNh5zb.js";import"./_baseEach-CJvms2XX.js";import"./min-xOt_t-AD.js";import"./_baseMap-CB4KBnTj.js";import"./sortBy-CQrY7GTB.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"),N=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"),E=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&&N(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,L=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"),D={},G=i((function(){}),"setConf"),A=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 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}']`);A(h);const l=i.db.getRootDoc();U(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"),R=i((t=>t?t.length*x.fontSizeFactor:1),"getLabelWidth"),U=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=U(t.doc,a,t.id,!i,r,d,o);{a=E(a,t,i);let e=a.node().getBBox();s.width=e.width,s.height=e.height+x.padding/2,D[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:R(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+(D[t]?D[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))),L(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:O},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-5RIWM3LS-DbksIoXo.js";import{_ as i,d as r,l as n,j as d,e as s,u as o}from"./mermaid-Bzt85ry3.js";import{s as g}from"./transform-C6EuPmuu.js";import{G as p}from"./graph-YTrCDQ_q.js";import{l as c}from"./layout-CcOiFAkC.js";import{l as h,k as l}from"./step-DY8hpDjU.js";import"./chunk-4LC2V6XN-ukZs60SV.js";import"./index-DHOsJnNV.js";import"./_baseUniq-BZCLAVqW.js";import"./_baseEach-DqBRKvZu.js";import"./min-DMKBZ5_O.js";import"./_baseMap-G8KYuL5k.js";import"./sortBy-Ci_jFO7n.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"),N=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"),E=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&&N(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,L=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"),D={},G=i((function(){}),"setConf"),A=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 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}']`);A(h);const l=i.db.getRootDoc();U(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"),R=i((t=>t?t.length*x.fontSizeFactor:1),"getLabelWidth"),U=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=U(t.doc,a,t.id,!i,r,d,o);{a=E(a,t,i);let e=a.node().getBBox();s.width=e.width,s.height=e.height+x.padding/2,D[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:R(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+(D[t]?D[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))),L(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:O},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-5RIWM3LS-DbksIoXo.js";import{_ as e}from"./mermaid-Bzt85ry3.js";import"./transform-C6EuPmuu.js";import"./chunk-4LC2V6XN-ukZs60SV.js";import"./index-DHOsJnNV.js";import"./step-DY8hpDjU.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};