frayui 0.1.1 → 0.1.2

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 (92) hide show
  1. package/dist/dev-child.js +21 -3
  2. package/package.json +7 -6
  3. package/runtime/cc-worker/skills/gh/SKILL.md +22 -0
  4. package/web-dist/assets/{TerminalPane-C3CC9EFZ.js → TerminalPane-DyK0ncN8.js} +1 -1
  5. package/web-dist/assets/{abnfDiagram-VRR7QNED-DqX9eyjt.js → abnfDiagram-VRR7QNED-DtotTgyK.js} +1 -1
  6. package/web-dist/assets/architecture-TIHT7OUA-B23bEjC4.js +1 -0
  7. package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-M8pzerdN.js → architectureDiagram-ZJ3FMSHR-CVl8mUt0.js} +1 -1
  8. package/web-dist/assets/{blockDiagram-677ZJIJ3-DqR6Y2LC.js → blockDiagram-677ZJIJ3-VUZEsYBW.js} +1 -1
  9. package/web-dist/assets/{c4Diagram-LMCZKHZV-BVYFjsdW.js → c4Diagram-LMCZKHZV-Dlg18lBF.js} +1 -1
  10. package/web-dist/assets/channel-BMFwXMMq.js +1 -0
  11. package/web-dist/assets/{chunk-32BRIVSS-DFjDHOoM.js → chunk-32BRIVSS-DG8gd151.js} +1 -1
  12. package/web-dist/assets/{chunk-52WLFC77-CgT8QhTR.js → chunk-52WLFC77-DKlahFJ2.js} +1 -1
  13. package/web-dist/assets/{chunk-C7G6YPKG-CzJ6LiOY.js → chunk-C7G6YPKG-Bk-BFDsQ.js} +1 -1
  14. package/web-dist/assets/{chunk-EX3LRPZG-BxLQFQHC.js → chunk-EX3LRPZG-DnXqd-jJ.js} +1 -1
  15. package/web-dist/assets/{chunk-FWX5IMBZ-Dph1CDtO.js → chunk-FWX5IMBZ-ujYyBebT.js} +2 -2
  16. package/web-dist/assets/{chunk-HOUHSVGY-DkAureev.js → chunk-HOUHSVGY-Dk2XhPWQ.js} +1 -1
  17. package/web-dist/assets/{chunk-ICXQ74PX-Cz4NMI__.js → chunk-ICXQ74PX-DoseDoV4.js} +1 -1
  18. package/web-dist/assets/{chunk-MOJQB5TN-CsLU1DoU.js → chunk-MOJQB5TN-B8dog4zz.js} +1 -1
  19. package/web-dist/assets/{chunk-OGEWGWER-Aylt7fzg.js → chunk-OGEWGWER-D4GkHktS.js} +1 -1
  20. package/web-dist/assets/{chunk-PUDLZKDR-BFErObxQ.js → chunk-PUDLZKDR-ChEIayRe.js} +1 -1
  21. package/web-dist/assets/{chunk-Q4XR5HBZ-Bv6INKwj.js → chunk-Q4XR5HBZ-BtzMOr97.js} +1 -1
  22. package/web-dist/assets/{chunk-V7JOEXUC-DfztwFA4.js → chunk-V7JOEXUC-DQ7c8QAd.js} +1 -1
  23. package/web-dist/assets/{chunk-VAUOI2AC-B0f7ZK3T.js → chunk-VAUOI2AC-6jWzOU_J.js} +1 -1
  24. package/web-dist/assets/{chunk-VR4S4FIN-G-Gcy_AM.js → chunk-VR4S4FIN-TB0TNuya.js} +1 -1
  25. package/web-dist/assets/{chunk-WYO6CB5R-CMp0iowL.js → chunk-WYO6CB5R-CY7fL6F5.js} +1 -1
  26. package/web-dist/assets/{chunk-ZGVPDNZ5-CSWMiX8t.js → chunk-ZGVPDNZ5-vZO6zPtA.js} +1 -1
  27. package/web-dist/assets/classDiagram-OUVF2IWQ-DiWatUgG.js +1 -0
  28. package/web-dist/assets/classDiagram-v2-EOCWNBFH-DiWatUgG.js +1 -0
  29. package/web-dist/assets/{cynefin-VYW2F7L2-CUMD23BD.js → cynefin-VYW2F7L2-D4NcAp7V.js} +1 -1
  30. package/web-dist/assets/{cynefinDiagram-TSTJHNR4-fZTm6GyW.js → cynefinDiagram-TSTJHNR4-hLO8f53U.js} +1 -1
  31. package/web-dist/assets/{dagre-VKFMJZFB-CUCi5JnH.js → dagre-VKFMJZFB-86z9AWRw.js} +1 -1
  32. package/web-dist/assets/{diagram-FQU43EPY-C87Fqvwa.js → diagram-FQU43EPY-DXw3bj8G.js} +1 -1
  33. package/web-dist/assets/{diagram-G47NLZAW-CDxQ-BXA.js → diagram-G47NLZAW-BtH3_eiQ.js} +1 -1
  34. package/web-dist/assets/{diagram-NH7WQ7WH-Uceffn93.js → diagram-NH7WQ7WH-BxWq2H6D.js} +1 -1
  35. package/web-dist/assets/{diagram-OA4YK3LP-CSSp0Fa1.js → diagram-OA4YK3LP-BoU3I6Xx.js} +1 -1
  36. package/web-dist/assets/{diagram-WEI45ONY-DS5sAZPp.js → diagram-WEI45ONY-CkPD-vrA.js} +1 -1
  37. package/web-dist/assets/{ebnfDiagram-CCIWWBDH-aM331oVj.js → ebnfDiagram-CCIWWBDH-BudQTnvf.js} +1 -1
  38. package/web-dist/assets/{erDiagram-Q63AITRT-d0i1kydx.js → erDiagram-Q63AITRT-CRFLgkaW.js} +1 -1
  39. package/web-dist/assets/eventmodeling-45OFAUF4-C7ZRnE7-.js +1 -0
  40. package/web-dist/assets/flowDiagram-23GEKE2U-DKS-kFcF.js +1 -0
  41. package/web-dist/assets/{ganttDiagram-NO4QXBWP-Cd0OpzcB.js → ganttDiagram-NO4QXBWP-DFmOc45y.js} +1 -1
  42. package/web-dist/assets/{gitGraph-TEB2WS4Q-BeI6iDaZ.js → gitGraph-TEB2WS4Q-CMW6meDa.js} +1 -1
  43. package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-QvePTKQE.js → gitGraphDiagram-IHSO6WYX-CHelbJfg.js} +1 -1
  44. package/web-dist/assets/{index-CJ-cmbhi.js → index-C2Tf3Ihs.js} +65 -65
  45. package/web-dist/assets/index-CeAC3wUW.css +1 -0
  46. package/web-dist/assets/{info-DKCQHKI2-WwdGk87J.js → info-DKCQHKI2-DZT4W61r.js} +1 -1
  47. package/web-dist/assets/{infoDiagram-FWYZ7A6U-C3ARX7jm.js → infoDiagram-FWYZ7A6U-Dj0tLhVO.js} +1 -1
  48. package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-C_zMKLif.js → ishikawaDiagram-FXEZZL3T-D825ES0c.js} +1 -1
  49. package/web-dist/assets/{journeyDiagram-5HDEW3XC-BcIZu4Cm.js → journeyDiagram-5HDEW3XC-D53Igq5c.js} +1 -1
  50. package/web-dist/assets/{kanban-definition-HUTT4EX6-wwc4iI2z.js → kanban-definition-HUTT4EX6-CJ-F0vAo.js} +1 -1
  51. package/web-dist/assets/{line-BCQpqxAq.js → line-CuiC27jO.js} +1 -1
  52. package/web-dist/assets/{mermaid-parser.core-8y_8tv09.js → mermaid-parser.core-rG6qAIn0.js} +3 -3
  53. package/web-dist/assets/{mermaid.core-gXHP6zd5.js → mermaid.core-DzNUOuDq.js} +3 -3
  54. package/web-dist/assets/{mindmap-definition-LN4V7U3C-DtTZ-e8A.js → mindmap-definition-LN4V7U3C-DHfhQue9.js} +1 -1
  55. package/web-dist/assets/{packet-7NZHBO7P-DZbgcVcI.js → packet-7NZHBO7P-BiUlKhVG.js} +1 -1
  56. package/web-dist/assets/{pegDiagram-2B236MQR-DHtrQw0R.js → pegDiagram-2B236MQR-MQdiKZx3.js} +1 -1
  57. package/web-dist/assets/{pie-RZYD4A2V-CBwiKeCv.js → pie-RZYD4A2V-dNHUvvE3.js} +1 -1
  58. package/web-dist/assets/{pieDiagram-ENE6RG2P-B-gKjdFc.js → pieDiagram-ENE6RG2P-BwFxe1x1.js} +1 -1
  59. package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-C3h180Er.js → quadrantDiagram-ABIIQ3AL-9dic-8vv.js} +1 -1
  60. package/web-dist/assets/{radar-I7S5WNFK-BTAfmGFj.js → radar-I7S5WNFK-CK3dl20X.js} +1 -1
  61. package/web-dist/assets/{railroad-3IZDKUUU-DjkPg0H7.js → railroad-3IZDKUUU-BuB2LkFj.js} +1 -1
  62. package/web-dist/assets/railroad-abnf-AHOZXSZD-C1-MJAeY.js +1 -0
  63. package/web-dist/assets/railroad-ebnf-EBAXGLYW-crQCD9rJ.js +1 -0
  64. package/web-dist/assets/railroad-peg-LSFZ7HO6-Ba-_QGKi.js +1 -0
  65. package/web-dist/assets/{railroadDiagram-RFXS5EU6-FVI9rArP.js → railroadDiagram-RFXS5EU6-CuuspS_3.js} +1 -1
  66. package/web-dist/assets/{requirementDiagram-TGXJPOKE-Cp3pp65R.js → requirementDiagram-TGXJPOKE-DHAILLdh.js} +1 -1
  67. package/web-dist/assets/{sankeyDiagram-HTMAVEWB-B-EVqI0F.js → sankeyDiagram-HTMAVEWB-CztQ2t1b.js} +1 -1
  68. package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-Bov70rRs.js → sequenceDiagram-DBY2YBRQ-jk56eo0l.js} +1 -1
  69. package/web-dist/assets/{stateDiagram-2N3HPSRC-BW7fwttw.js → stateDiagram-2N3HPSRC-uwqBWnrI.js} +1 -1
  70. package/web-dist/assets/stateDiagram-v2-6OUMAXLB-DOPbAEV3.js +1 -0
  71. package/web-dist/assets/{swimlanes-5IMT3BWC-BUOdjOgW.js → swimlanes-5IMT3BWC-BzuJ77j6.js} +1 -1
  72. package/web-dist/assets/swimlanesDiagram-G3AALYLV-BRh1ca21.js +8 -0
  73. package/web-dist/assets/{timeline-definition-FHXFAJF6-C20Ho0e9.js → timeline-definition-FHXFAJF6-CVDNkzi9.js} +1 -1
  74. package/web-dist/assets/{treeView-QDETBFTQ-DHg1NMOK.js → treeView-QDETBFTQ-CdkPxaDl.js} +1 -1
  75. package/web-dist/assets/{treemap-6X3UGDF4-B-aFFjeG.js → treemap-6X3UGDF4-lnksCHdn.js} +1 -1
  76. package/web-dist/assets/{vennDiagram-L72KCM5P-CEWY6HTS.js → vennDiagram-L72KCM5P-B533fRM0.js} +1 -1
  77. package/web-dist/assets/{wardley-OPB4EBWU-BpAKElbJ.js → wardley-OPB4EBWU-DwKf-2YJ.js} +1 -1
  78. package/web-dist/assets/{wardleyDiagram-EHGQE667-CYer_Ry4.js → wardleyDiagram-EHGQE667-BDDN72B1.js} +1 -1
  79. package/web-dist/assets/{xychartDiagram-FW5EYKEG-BxMRGqds.js → xychartDiagram-FW5EYKEG-CkvHmNVt.js} +1 -1
  80. package/web-dist/index.html +2 -2
  81. package/web-dist/assets/architecture-TIHT7OUA-Dp81OE9d.js +0 -1
  82. package/web-dist/assets/channel-BLJ4T4FR.js +0 -1
  83. package/web-dist/assets/classDiagram-OUVF2IWQ-BQSt_EhF.js +0 -1
  84. package/web-dist/assets/classDiagram-v2-EOCWNBFH-BQSt_EhF.js +0 -1
  85. package/web-dist/assets/eventmodeling-45OFAUF4-qO9fgTC2.js +0 -1
  86. package/web-dist/assets/flowDiagram-23GEKE2U-BUHZX4Ft.js +0 -1
  87. package/web-dist/assets/index-LON0oNCJ.css +0 -1
  88. package/web-dist/assets/railroad-abnf-AHOZXSZD-DlUkYI_B.js +0 -1
  89. package/web-dist/assets/railroad-ebnf-EBAXGLYW-DptyGTmD.js +0 -1
  90. package/web-dist/assets/railroad-peg-LSFZ7HO6-xPHpoacS.js +0 -1
  91. package/web-dist/assets/stateDiagram-v2-6OUMAXLB-BtaoEJDP.js +0 -1
  92. package/web-dist/assets/swimlanesDiagram-G3AALYLV-Bpiu68M1.js +0 -8
@@ -1 +1 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-C4XfhTaE.js";import{O as r,c as i,s as a,x as o}from"./chunk-WYO6CB5R-CMp0iowL.js";import{et as s,g as c}from"./chunk-ICXQ74PX-Cz4NMI__.js";import{t as l}from"./line-BCQpqxAq.js";import"./chunk-HOUHSVGY-DkAureev.js";import"./chunk-Q4XR5HBZ-Bv6INKwj.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-Aylt7fzg.js";import{t as u}from"./graphlib-B8gBHxth.js";import{t as d}from"./dagre-CXRCoUWR.js";import"./chunk-32BRIVSS-DFjDHOoM.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-G-Gcy_AM.js";import"./chunk-C7G6YPKG-CzJ6LiOY.js";import"./chunk-ZGVPDNZ5-CSWMiX8t.js";import"./chunk-52WLFC77-CgT8QhTR.js";import"./chunk-FWX5IMBZ-Dph1CDtO.js";import{i as f,n as p,t as m}from"./chunk-EX3LRPZG-BxLQFQHC.js";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=t.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=e(function(n,i,u){let d=e(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=n.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=n.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let n=0;n<=l.length;n++){let i=e.append(`text`).attr(`text-anchor`,`middle`).text(l[n]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),t.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,t.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),t.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.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`),j=e(function(e,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=n(`#i`+r));let u=n(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;t.debug(`Rendering diagram `+e);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;i(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,n,r,i,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<e.length;f++)if(e[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let t=m[e];r&&(t.parentId=r);let a;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);a=N(t.doc,e,t.id,!i,o,s,c);{e=y(e,t,i);let n=e.node().getBBox();a.width=n.width,a.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else a=w(n,t,l);if(t.note){let e=w(n,{descriptions:[],id:t.id+`-note`,note:t.note,type:`note`},l);t.note.position===`left of`?(l.setNode(a.id+`-note`,e),l.setNode(a.id,a)):(l.setNode(a.id,a),l.setNode(a.id+`-note`,e)),l.setParent(a.id,a.id+`-group`),l.setParent(a.id+`-note`,a.id+`-group`)}else l.setNode(a.id,a)}t.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(e){_++,t.debug(`Setting edge`,e),l.setEdge(e.id1,e.id2,{relation:e,width:M(e.title),height:D.labelHeight*a.getRows(e.title).length,labelpos:`c`},`id`+_)}),d(l),t.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(e){e!==void 0&&l.node(e)!==void 0?(t.warn(`Node `+e+`: `+JSON.stringify(l.node(e))),o.select(`#`+v.id+` #`+e).attr(`transform`,`translate(`+(l.node(e).x-l.node(e).width/2)+`,`+(l.node(e).y+(O[e]?O[e].y:0)-l.node(e).height/2)+` )`),o.select(`#`+v.id+` #`+e).attr(`data-x-shift`,l.node(e).x-l.node(e).width/2),s.querySelectorAll(`#`+v.id+` #`+e+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):t.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(t.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(n,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,t.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-C4XfhTaE.js";import{O as r,c as i,s as a,x as o}from"./chunk-WYO6CB5R-CY7fL6F5.js";import{et as s,g as c}from"./chunk-ICXQ74PX-DoseDoV4.js";import{t as l}from"./line-CuiC27jO.js";import"./chunk-HOUHSVGY-Dk2XhPWQ.js";import"./chunk-Q4XR5HBZ-BtzMOr97.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-D4GkHktS.js";import{t as u}from"./graphlib-B8gBHxth.js";import{t as d}from"./dagre-CXRCoUWR.js";import"./chunk-32BRIVSS-DG8gd151.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-TB0TNuya.js";import"./chunk-C7G6YPKG-Bk-BFDsQ.js";import"./chunk-ZGVPDNZ5-vZO6zPtA.js";import"./chunk-52WLFC77-DKlahFJ2.js";import"./chunk-FWX5IMBZ-ujYyBebT.js";import{i as f,n as p,t as m}from"./chunk-EX3LRPZG-DnXqd-jJ.js";var h=e(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=t.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=e(function(n,i,u){let d=e(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=n.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=n.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let n=0;n<=l.length;n++){let i=e.append(`text`).attr(`text-anchor`,`middle`).text(l[n]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),t.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,t.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),t.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.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`),j=e(function(e,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=n(`#i`+r));let u=n(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;t.debug(`Rendering diagram `+e);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;i(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,n,r,i,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<e.length;f++)if(e[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let t=m[e];r&&(t.parentId=r);let a;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);a=N(t.doc,e,t.id,!i,o,s,c);{e=y(e,t,i);let n=e.node().getBBox();a.width=n.width,a.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else a=w(n,t,l);if(t.note){let e=w(n,{descriptions:[],id:t.id+`-note`,note:t.note,type:`note`},l);t.note.position===`left of`?(l.setNode(a.id+`-note`,e),l.setNode(a.id,a)):(l.setNode(a.id,a),l.setNode(a.id+`-note`,e)),l.setParent(a.id,a.id+`-group`),l.setParent(a.id+`-note`,a.id+`-group`)}else l.setNode(a.id,a)}t.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(e){_++,t.debug(`Setting edge`,e),l.setEdge(e.id1,e.id2,{relation:e,width:M(e.title),height:D.labelHeight*a.getRows(e.title).length,labelpos:`c`},`id`+_)}),d(l),t.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(e){e!==void 0&&l.node(e)!==void 0?(t.warn(`Node `+e+`: `+JSON.stringify(l.node(e))),o.select(`#`+v.id+` #`+e).attr(`transform`,`translate(`+(l.node(e).x-l.node(e).width/2)+`,`+(l.node(e).y+(O[e]?O[e].y:0)-l.node(e).height/2)+` )`),o.select(`#`+v.id+` #`+e).attr(`data-x-shift`,l.node(e).x-l.node(e).width/2),s.querySelectorAll(`#`+v.id+` #`+e+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):t.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(t.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(n,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,t.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-C4XfhTaE.js";import"./chunk-WYO6CB5R-CY7fL6F5.js";import"./chunk-ICXQ74PX-DoseDoV4.js";import"./chunk-HOUHSVGY-Dk2XhPWQ.js";import"./chunk-Q4XR5HBZ-BtzMOr97.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-D4GkHktS.js";import"./chunk-32BRIVSS-DG8gd151.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-TB0TNuya.js";import"./chunk-C7G6YPKG-Bk-BFDsQ.js";import"./chunk-ZGVPDNZ5-vZO6zPtA.js";import"./chunk-52WLFC77-DKlahFJ2.js";import"./chunk-FWX5IMBZ-ujYyBebT.js";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-DnXqd-jJ.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};