frizz-server 0.14.0 → 0.14.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.
- package/dist/claude-agent-broker.js +10859 -10590
- package/dist/dev-child.js +91 -57
- package/package.json +1 -1
- package/web-dist/assets/{TerminalPane-DcNJcvz9.js → TerminalPane-ftTy20h9.js} +1 -1
- package/web-dist/assets/{abnfDiagram-VRR7QNED-BFKPkR0J.js → abnfDiagram-VRR7QNED-DPYIADCF.js} +1 -1
- package/web-dist/assets/architecture-TIHT7OUA-C4ce4EvA.js +1 -0
- package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-BugbGvF7.js → architectureDiagram-ZJ3FMSHR-CslwHJ59.js} +1 -1
- package/web-dist/assets/{blockDiagram-677ZJIJ3-B1drPHOm.js → blockDiagram-677ZJIJ3-C_YKDTK3.js} +1 -1
- package/web-dist/assets/{c4Diagram-LMCZKHZV-jA8etf56.js → c4Diagram-LMCZKHZV-CN2XoHEM.js} +1 -1
- package/web-dist/assets/channel-46DdEyrY.js +1 -0
- package/web-dist/assets/{chunk-32BRIVSS-BfMUf_Yy.js → chunk-32BRIVSS-CqQFWcuW.js} +1 -1
- package/web-dist/assets/{chunk-52WLFC77-Fo52YmmC.js → chunk-52WLFC77-DIA4ep-j.js} +1 -1
- package/web-dist/assets/{chunk-C7G6YPKG-CPiVGUnC.js → chunk-C7G6YPKG-uYEufieL.js} +1 -1
- package/web-dist/assets/{chunk-EX3LRPZG-DllbzsPn.js → chunk-EX3LRPZG-Ctuj9M07.js} +1 -1
- package/web-dist/assets/{chunk-FWX5IMBZ-Cr7SCNOQ.js → chunk-FWX5IMBZ-BSeGDrvG.js} +2 -2
- package/web-dist/assets/{chunk-HOUHSVGY-D2qjbRMK.js → chunk-HOUHSVGY-DFtB1XOE.js} +1 -1
- package/web-dist/assets/{chunk-ICXQ74PX-Dl8ZZqX4.js → chunk-ICXQ74PX-DvvNMH3B.js} +1 -1
- package/web-dist/assets/{chunk-MOJQB5TN-C7X9x33F.js → chunk-MOJQB5TN-blCgZYTp.js} +1 -1
- package/web-dist/assets/{chunk-OGEWGWER-DrlPoLRT.js → chunk-OGEWGWER-DiKWBhls.js} +1 -1
- package/web-dist/assets/{chunk-PUDLZKDR-C1WS3qVH.js → chunk-PUDLZKDR-CEZ-LRny.js} +1 -1
- package/web-dist/assets/{chunk-Q4XR5HBZ-CNhqnN4i.js → chunk-Q4XR5HBZ-BO1Y_Z4a.js} +1 -1
- package/web-dist/assets/{chunk-V7JOEXUC-BQsiP60Y.js → chunk-V7JOEXUC-ouWDihRg.js} +1 -1
- package/web-dist/assets/{chunk-VAUOI2AC-DeQswo6G.js → chunk-VAUOI2AC-DCCN8ceH.js} +1 -1
- package/web-dist/assets/{chunk-VR4S4FIN-QCzpzy3F.js → chunk-VR4S4FIN-D8VxxNLW.js} +1 -1
- package/web-dist/assets/{chunk-WYO6CB5R-DYEAXxaM.js → chunk-WYO6CB5R-_B7FSzZM.js} +1 -1
- package/web-dist/assets/{chunk-ZGVPDNZ5-BRwJsVqD.js → chunk-ZGVPDNZ5-BErRylCv.js} +1 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-BvKONN2o.js +1 -0
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-BvKONN2o.js +1 -0
- package/web-dist/assets/{cynefin-VYW2F7L2-DFY4wScy.js → cynefin-VYW2F7L2-CgH8n1RK.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-TSTJHNR4-BFd6vF05.js → cynefinDiagram-TSTJHNR4-Cp3iB5ig.js} +1 -1
- package/web-dist/assets/{dagre-VKFMJZFB-BTSZ-kNz.js → dagre-VKFMJZFB-DEJ5M2UQ.js} +1 -1
- package/web-dist/assets/{diagram-FQU43EPY-CM5L_Teo.js → diagram-FQU43EPY-B7TBBYyA.js} +1 -1
- package/web-dist/assets/{diagram-G47NLZAW-DMEMjhev.js → diagram-G47NLZAW-Djy0qteu.js} +1 -1
- package/web-dist/assets/{diagram-NH7WQ7WH-BINXDe2x.js → diagram-NH7WQ7WH-C7ASxlCE.js} +1 -1
- package/web-dist/assets/{diagram-OA4YK3LP-DhKBXS5G.js → diagram-OA4YK3LP-DQs7Hn4c.js} +1 -1
- package/web-dist/assets/{diagram-WEI45ONY-QaICPLa1.js → diagram-WEI45ONY-DvjYq10q.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-CCIWWBDH-DDQ6NAEt.js → ebnfDiagram-CCIWWBDH-D5dvO41S.js} +1 -1
- package/web-dist/assets/{erDiagram-Q63AITRT-eftnFvxT.js → erDiagram-Q63AITRT-DGMDAMz2.js} +1 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-eNNW0zlr.js +1 -0
- package/web-dist/assets/flowDiagram-23GEKE2U-C5RJ-lqT.js +1 -0
- package/web-dist/assets/{ganttDiagram-NO4QXBWP-CBUUxbvO.js → ganttDiagram-NO4QXBWP-DE4sBbug.js} +1 -1
- package/web-dist/assets/{gitGraph-TEB2WS4Q-B4j6N6bC.js → gitGraph-TEB2WS4Q-6iwymAqh.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-mrIlQ6c3.js → gitGraphDiagram-IHSO6WYX-B8M8HMMa.js} +1 -1
- package/web-dist/assets/{index-BI0k4RW8.js → index-C-jkL60P.js} +85 -85
- package/web-dist/assets/index-D0gz-Bx-.css +1 -0
- package/web-dist/assets/{info-DKCQHKI2-Dj4G-7Y8.js → info-DKCQHKI2-D1rdRKv2.js} +1 -1
- package/web-dist/assets/{infoDiagram-FWYZ7A6U-Baz07f6h.js → infoDiagram-FWYZ7A6U-DfXxAWG-.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-C4og8CF4.js → ishikawaDiagram-FXEZZL3T-C6huyjB4.js} +1 -1
- package/web-dist/assets/{journeyDiagram-5HDEW3XC-B0WV30vH.js → journeyDiagram-5HDEW3XC-Cz0dAdxo.js} +1 -1
- package/web-dist/assets/{kanban-definition-HUTT4EX6-BgDiY6B1.js → kanban-definition-HUTT4EX6-CnOJ2JGq.js} +1 -1
- package/web-dist/assets/{line-D0SxxXfr.js → line-BsyJpb4L.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-CWj7pjCH.js → mermaid-parser.core-B2YDnnfc.js} +3 -3
- package/web-dist/assets/{mermaid.core-Dpi4Z-WK.js → mermaid.core-DZmxOzX_.js} +3 -3
- package/web-dist/assets/{mindmap-definition-LN4V7U3C-DLmQQ7LC.js → mindmap-definition-LN4V7U3C-C-cB8iLg.js} +1 -1
- package/web-dist/assets/{packet-7NZHBO7P-T7pVIfFz.js → packet-7NZHBO7P-ByYSVaHA.js} +1 -1
- package/web-dist/assets/{pegDiagram-2B236MQR-BvVxzZmj.js → pegDiagram-2B236MQR-CiIbvo6V.js} +1 -1
- package/web-dist/assets/{pie-RZYD4A2V-BGz-hjIz.js → pie-RZYD4A2V-DT0L5Lbg.js} +1 -1
- package/web-dist/assets/{pieDiagram-ENE6RG2P-pdOHyNTd.js → pieDiagram-ENE6RG2P-BpX1rkMn.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-fLy3coW3.js → quadrantDiagram-ABIIQ3AL-Bl6eITpX.js} +1 -1
- package/web-dist/assets/{radar-I7S5WNFK-C-VKX4OE.js → radar-I7S5WNFK-Dc5znSZ_.js} +1 -1
- package/web-dist/assets/{railroad-3IZDKUUU-BwC-mtji.js → railroad-3IZDKUUU-Ho4iVXCL.js} +1 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-JkQWwE17.js +1 -0
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-grVU10Bk.js +1 -0
- package/web-dist/assets/railroad-peg-LSFZ7HO6-BTqoHLa0.js +1 -0
- package/web-dist/assets/{railroadDiagram-RFXS5EU6-BxPp9neb.js → railroadDiagram-RFXS5EU6-D5afWytG.js} +1 -1
- package/web-dist/assets/{requirementDiagram-TGXJPOKE-P_BvOjKp.js → requirementDiagram-TGXJPOKE-0L5V-_bC.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-HTMAVEWB-DUv1nZCv.js → sankeyDiagram-HTMAVEWB-CH-xRkM4.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-DWNx793M.js → sequenceDiagram-DBY2YBRQ-CMUPviAU.js} +1 -1
- package/web-dist/assets/{stateDiagram-2N3HPSRC-CaOUtkvy.js → stateDiagram-2N3HPSRC-ayE6u0KZ.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-DAjtM6iw.js +1 -0
- package/web-dist/assets/{swimlanes-5IMT3BWC-D764GMah.js → swimlanes-5IMT3BWC-BggKIJzJ.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-BS0jxTx_.js +8 -0
- package/web-dist/assets/{timeline-definition-FHXFAJF6-DeKz_jJG.js → timeline-definition-FHXFAJF6-B4mcBscv.js} +1 -1
- package/web-dist/assets/{treeView-QDETBFTQ-D3UnDOk3.js → treeView-QDETBFTQ-DAH6PHIx.js} +1 -1
- package/web-dist/assets/{treemap-6X3UGDF4-VItEAzU3.js → treemap-6X3UGDF4-CUipyr2w.js} +1 -1
- package/web-dist/assets/{vennDiagram-L72KCM5P-DuzNjZFZ.js → vennDiagram-L72KCM5P-CuKqAm0J.js} +1 -1
- package/web-dist/assets/{wardley-OPB4EBWU-B1uIoPVb.js → wardley-OPB4EBWU-D5Wfkjy9.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-EHGQE667-H60TjU5y.js → wardleyDiagram-EHGQE667-M5MDAf53.js} +1 -1
- package/web-dist/assets/{xychartDiagram-FW5EYKEG-BqTqYEwv.js → xychartDiagram-FW5EYKEG-BaSJmtNq.js} +1 -1
- package/web-dist/index.html +2 -2
- package/web-dist/assets/architecture-TIHT7OUA-3cEHc0mh.js +0 -1
- package/web-dist/assets/channel-BYQQkw21.js +0 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-BgM58S9B.js +0 -1
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-BgM58S9B.js +0 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-KZNoVoEu.js +0 -1
- package/web-dist/assets/flowDiagram-23GEKE2U-m4sDfmpP.js +0 -1
- package/web-dist/assets/index-CzN-tCOl.css +0 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-CNsCN0k6.js +0 -1
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-Bjabtkan.js +0 -1
- package/web-dist/assets/railroad-peg-LSFZ7HO6-DjPlt8Lc.js +0 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-CbgDxwEv.js +0 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-QPzvJba6.js +0 -8
package/web-dist/assets/{stateDiagram-2N3HPSRC-CaOUtkvy.js → stateDiagram-2N3HPSRC-ayE6u0KZ.js}
RENAMED
|
@@ -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-DYEAXxaM.js";import{et as s,g as c}from"./chunk-ICXQ74PX-Dl8ZZqX4.js";import{t as l}from"./line-D0SxxXfr.js";import"./chunk-HOUHSVGY-D2qjbRMK.js";import"./chunk-Q4XR5HBZ-CNhqnN4i.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-DrlPoLRT.js";import{t as u}from"./graphlib-B8gBHxth.js";import{t as d}from"./dagre-CXRCoUWR.js";import"./chunk-32BRIVSS-BfMUf_Yy.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-QCzpzy3F.js";import"./chunk-C7G6YPKG-CPiVGUnC.js";import"./chunk-ZGVPDNZ5-BRwJsVqD.js";import"./chunk-52WLFC77-Fo52YmmC.js";import"./chunk-FWX5IMBZ-Cr7SCNOQ.js";import{i as f,n as p,t as m}from"./chunk-EX3LRPZG-DllbzsPn.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-_B7FSzZM.js";import{et as s,g as c}from"./chunk-ICXQ74PX-DvvNMH3B.js";import{t as l}from"./line-BsyJpb4L.js";import"./chunk-HOUHSVGY-DFtB1XOE.js";import"./chunk-Q4XR5HBZ-BO1Y_Z4a.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-DiKWBhls.js";import{t as u}from"./graphlib-B8gBHxth.js";import{t as d}from"./dagre-CXRCoUWR.js";import"./chunk-32BRIVSS-CqQFWcuW.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-D8VxxNLW.js";import"./chunk-C7G6YPKG-uYEufieL.js";import"./chunk-ZGVPDNZ5-BErRylCv.js";import"./chunk-52WLFC77-DIA4ep-j.js";import"./chunk-FWX5IMBZ-BSeGDrvG.js";import{i as f,n as p,t as m}from"./chunk-EX3LRPZG-Ctuj9M07.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-_B7FSzZM.js";import"./chunk-ICXQ74PX-DvvNMH3B.js";import"./chunk-HOUHSVGY-DFtB1XOE.js";import"./chunk-Q4XR5HBZ-BO1Y_Z4a.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-DiKWBhls.js";import"./chunk-32BRIVSS-CqQFWcuW.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-D8VxxNLW.js";import"./chunk-C7G6YPKG-uYEufieL.js";import"./chunk-ZGVPDNZ5-BErRylCv.js";import"./chunk-52WLFC77-DIA4ep-j.js";import"./chunk-FWX5IMBZ-BSeGDrvG.js";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-Ctuj9M07.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};
|