@bkm016/basalt 0.1.6 → 0.1.8
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/README.md +3 -3
- package/{chunk-n981vx1t.js → chunk-0d51ggzj.js} +6 -6
- package/chunk-12trygzx.js +25 -0
- package/{chunk-s6dejhfj.js → chunk-26cz8et8.js} +1 -1
- package/{chunk-zxkq9m8e.js → chunk-2ek3wq4b.js} +2 -2
- package/chunk-2gcp3xdc.js +2 -0
- package/{chunk-x4874m8e.js → chunk-2ks2tnac.js} +2 -2
- package/{chunk-0javrjcm.js → chunk-2nrkqq45.js} +22 -22
- package/chunk-320174qe.js +2 -0
- package/{chunk-ey15ye2h.js → chunk-3hg7yn1t.js} +1 -1
- package/{chunk-benrzwea.js → chunk-3j2kkgsc.js} +1 -1
- package/{chunk-8x21n7y9.js → chunk-47vf66t6.js} +1 -1
- package/chunk-4n49ptbz.js +3 -0
- package/{chunk-7hr6zw2m.js → chunk-5gxj9560.js} +1 -1
- package/{chunk-g0t9c3gv.js → chunk-6vnjg5x9.js} +1 -1
- package/{chunk-dnx91jrd.js → chunk-7kjr9gdx.js} +2 -2
- package/{chunk-y8dkfpmj.js → chunk-7p6e2f5s.js} +3 -3
- package/{chunk-053vb71h.js → chunk-86xhmz7k.js} +1 -1
- package/{chunk-ebpyvs1d.js → chunk-91r5nvth.js} +2 -2
- package/{chunk-c7rcw9fb.js → chunk-adys4qq4.js} +4 -4
- package/{chunk-npez1492.js → chunk-ckjw3b61.js} +2 -2
- package/{chunk-f156y565.js → chunk-d37gemt2.js} +3 -3
- package/{chunk-j7yvh0ae.js → chunk-dcwdmpw2.js} +1 -1
- package/chunk-dvb5nd2x.js +2 -0
- package/{chunk-063vbmtp.js → chunk-e6c2mzxc.js} +2 -2
- package/{chunk-s7skpgm2.js → chunk-ef9yhnk3.js} +1 -1
- package/{chunk-ecf896fz.js → chunk-fpxc6qjr.js} +2 -2
- package/chunk-frt9k18g.js +480 -0
- package/{chunk-bdy4jksd.js → chunk-fzcmzbsq.js} +1 -1
- package/{chunk-q9dd6fhj.js → chunk-g3ed130w.js} +3 -3
- package/{chunk-d48bfd2e.js → chunk-h1kb8b49.js} +2 -2
- package/{chunk-arcqjt91.js → chunk-hd3x1w46.js} +1 -1
- package/{chunk-dpz4hwqb.js → chunk-j781n7ca.js} +2 -2
- package/{chunk-z02sj1je.js → chunk-jp5afrwm.js} +2 -2
- package/{chunk-r8vvcp6c.js → chunk-jyv9cae6.js} +1 -1
- package/{chunk-whj87h4r.js → chunk-k3q5jqjj.js} +3 -3
- package/{chunk-75434aay.js → chunk-k3rmjrf1.js} +1 -1
- package/{chunk-peja51xv.js → chunk-kgkrccr1.js} +2 -2
- package/{chunk-pg5nkf1y.js → chunk-kpvaqb7c.js} +2 -2
- package/{chunk-hksqjts3.js → chunk-ky55taar.js} +332 -289
- package/{chunk-10p3mb40.js → chunk-mr807v9n.js} +1 -1
- package/chunk-n015c8nx.js +2 -0
- package/chunk-ndt6rjt9.js +2 -0
- package/{chunk-gv7wqkey.js → chunk-nmtk9xra.js} +2 -2
- package/{chunk-d6p2hgxh.js → chunk-pehyqj8k.js} +1 -1
- package/{chunk-ca982n62.js → chunk-pkpj7s2k.js} +1 -1
- package/{chunk-fx7f4m3c.js → chunk-pn413hjw.js} +1 -1
- package/{chunk-6ptv4g5e.js → chunk-ppxv5q7y.js} +3 -3
- package/{chunk-8wj32837.js → chunk-qmdpgbg3.js} +1 -1
- package/{chunk-8wv5t0w6.js → chunk-rnt1ckk9.js} +6 -6
- package/{chunk-prgm07j4.js → chunk-t40fag3z.js} +2 -2
- package/{chunk-w67dvqtb.js → chunk-t66jqz12.js} +2 -2
- package/{chunk-39vwrg8n.js → chunk-v2srrqcv.js} +2 -2
- package/{chunk-n85qs7cs.js → chunk-x496kg3v.js} +1 -1
- package/{chunk-6kdgk70p.js → chunk-xjw78yey.js} +4 -4
- package/chunk-xy2bxwq8.js +2 -0
- package/{chunk-y69ewdn2.js → chunk-ypqjfv3a.js} +2 -2
- package/{chunk-f544p9rh.js → chunk-yyy2yp6f.js} +10 -10
- package/{chunk-8gw5bvh3.js → chunk-yzevjkms.js} +5 -5
- package/chunk-z3ch1wg6.js +16 -0
- package/chunk-zdyd8hbn.js +2 -0
- package/compiled.js +6 -6
- package/package.json +1 -1
- package/ui-test-worker.js +19 -19
- package/web/{chunk-rf9dt6bg.js → chunk-0j9a7811.js} +6 -6
- package/web/chunk-0jfda4jw.js +2 -0
- package/web/{chunk-z1geewdf.js → chunk-0zwc2rvh.js} +2 -2
- package/web/{chunk-ht1dzftc.js → chunk-1gx0zpmp.js} +7 -7
- package/web/{chunk-0gg00f86.js → chunk-1s8zg6fb.js} +51 -51
- package/web/chunk-2axwda8c.js +89 -0
- package/web/chunk-2p3fkhy8.js +1 -0
- package/web/{chunk-xvcfp1zh.js → chunk-33w36n91.js} +2 -2
- package/web/{chunk-5v44qv67.js → chunk-3q0v8w45.js} +81 -81
- package/web/chunk-3sz5qcwj.js +1 -0
- package/web/chunk-433c80pc.js +1 -0
- package/web/chunk-48cnmhvd.js +106 -0
- package/web/{chunk-da7m1kva.js → chunk-4anjs6yp.js} +2 -2
- package/web/chunk-5r37rwq1.js +4 -0
- package/web/{chunk-g81h1e6n.js → chunk-6e38yf3a.js} +23 -23
- package/web/{chunk-zp3qrrkb.js → chunk-7a4xk6j9.js} +72 -72
- package/web/chunk-7f1t7z72.js +2 -0
- package/web/chunk-7qq1ypvj.js +1 -0
- package/web/{chunk-h6k1x096.js → chunk-7tkgbbf9.js} +2 -2
- package/web/chunk-7x35g67d.js +78 -0
- package/web/{chunk-n1jpg57t.js → chunk-823b7866.js} +15 -15
- package/web/chunk-85gdsmt4.js +1 -0
- package/web/{chunk-gyp6v7jd.js → chunk-8773nwdc.js} +2 -2
- package/web/{chunk-cktmyc13.js → chunk-8dp7h6w8.js} +24 -24
- package/web/{chunk-czq1yz51.js → chunk-8nv7q5ac.js} +9 -9
- package/web/chunk-8pzg8qw4.js +1 -0
- package/web/chunk-8wg44w91.js +2 -0
- package/web/chunk-9p5dfvav.js +1 -0
- package/web/chunk-9q9w9pay.js +1 -0
- package/web/chunk-a3teqvz2.js +39 -0
- package/web/chunk-bd8ftfxn.js +3 -0
- package/web/chunk-c03bt2pz.js +1 -0
- package/web/chunk-c1ha2xg6.js +8 -0
- package/web/chunk-cez1k71m.js +1 -0
- package/web/chunk-cgng31df.js +1 -0
- package/web/chunk-cn0tmwjs.js +2 -0
- package/web/{chunk-jve1zc80.js → chunk-cn1xpg3q.js} +2 -2
- package/web/chunk-cvd4f51j.js +1 -0
- package/web/chunk-cybvxssy.js +1 -0
- package/web/{chunk-a7gtb4kg.js → chunk-cyjnert7.js} +19 -19
- package/web/{chunk-twdy2f67.js → chunk-d0m0h0eb.js} +1 -1
- package/web/{chunk-hy4m34qp.js → chunk-dgwkqcz6.js} +37 -37
- package/web/{chunk-kyawkpv2.js → chunk-dtg5yhhs.js} +1 -1
- package/web/chunk-dynajx8x.js +2 -0
- package/web/{chunk-t851gdjh.js → chunk-et8q775x.js} +4 -4
- package/web/chunk-f3vv7n52.js +1 -0
- package/web/{chunk-3de552rg.js → chunk-f93pe4kb.js} +15 -15
- package/web/{chunk-5nda24gv.js → chunk-fe31sv6t.js} +1 -1
- package/web/chunk-fpa81dv7.js +62 -0
- package/web/{chunk-nyn9tghz.js → chunk-fx4mackk.js} +9 -9
- package/web/chunk-g17n6asp.js +1 -0
- package/web/chunk-g9dzaw9e.js +30 -0
- package/web/chunk-gcwhx3av.js +1139 -0
- package/web/chunk-gf8vm6b5.js +1 -0
- package/web/chunk-gnmeyy4h.js +1 -0
- package/web/chunk-h5cfg3vv.js +2 -0
- package/web/{chunk-d6tbw8br.js → chunk-hbkasy6c.js} +46 -46
- package/web/chunk-hn7mhsbg.js +1 -0
- package/web/{chunk-12xxh71x.js → chunk-hstbgb83.js} +26 -26
- package/web/chunk-jjjtv2r1.js +2 -0
- package/web/chunk-jzte2phh.js +2 -0
- package/web/chunk-k8h8zx6r.js +24 -0
- package/web/chunk-m3ajw575.js +1 -0
- package/web/chunk-m5y2d4zv.js +1 -0
- package/web/chunk-mbwwj216.js +1 -0
- package/web/chunk-mf6xng5b.js +2 -0
- package/web/chunk-nky3bqfg.js +1 -0
- package/web/chunk-np33kmn4.js +1 -0
- package/web/chunk-nvk8mazs.js +1 -0
- package/web/chunk-nyw5ewgv.js +1 -0
- package/web/{chunk-dwajwrpk.js → chunk-p0cjvjdx.js} +1 -1
- package/web/chunk-p56dcqpr.js +1 -0
- package/web/chunk-pdn4r8x4.js +1 -0
- package/web/chunk-q1xxs319.js +41 -0
- package/web/chunk-qpt34d8d.js +1 -0
- package/web/{chunk-96v2avmw.js → chunk-qq2v8h6d.js} +7 -7
- package/web/chunk-qskt3tqa.js +1 -0
- package/web/chunk-qt3n897m.js +4 -0
- package/web/chunk-r1rt48h9.js +1 -0
- package/web/{chunk-ck8rr0sr.js → chunk-r4ffr96e.js} +1 -1
- package/web/chunk-r7tgd2fm.js +7 -0
- package/web/{chunk-x5s7zr5f.js → chunk-rbdvc8x7.js} +7 -7
- package/web/{chunk-v4yqrx5y.js → chunk-rkjkynm3.js} +33 -33
- package/web/chunk-rznszqmy.js +1 -0
- package/web/chunk-s1pefd34.js +1 -0
- package/web/chunk-s38s9ff9.js +370 -0
- package/web/{chunk-vw1pbv1x.js → chunk-s7e93552.js} +8 -8
- package/web/chunk-sc29azev.js +1 -0
- package/web/{chunk-9c1yt2ex.js → chunk-sda7cyrt.js} +52 -52
- package/web/chunk-svh2gkx8.js +2 -0
- package/web/chunk-t4jc4nac.js +1 -0
- package/web/chunk-t7g366a5.js +24 -0
- package/web/chunk-tj1fn8v2.js +1 -0
- package/web/{chunk-sy7e4dmq.js → chunk-tkp72r9b.js} +1 -1
- package/web/{chunk-xc2sq3t5.js → chunk-v14s4vgc.js} +1 -1
- package/web/chunk-v94v68xg.js +36 -0
- package/web/{chunk-0whceqes.js → chunk-vvvd3grf.js} +2 -2
- package/web/chunk-w37n09px.js +21 -0
- package/web/chunk-wcphswcx.js +2 -0
- package/web/{chunk-fxs4nb93.js → chunk-wj3ymejj.js} +38 -38
- package/web/chunk-wwcnvyjh.css +1 -0
- package/web/{chunk-s2920f21.js → chunk-xabcx3ry.js} +6 -6
- package/web/chunk-xb9m0092.js +1 -0
- package/web/chunk-xfd3b01q.js +1 -0
- package/web/{chunk-03dmzvaq.js → chunk-xqyazzm7.js} +17 -17
- package/web/{chunk-prvh9syp.js → chunk-xsz1dfm2.js} +23 -23
- package/web/chunk-z0zrp8n8.js +1 -0
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-8saewt61.js +0 -3
- package/chunk-a0c989ky.js +0 -2
- package/chunk-a5apjjcn.js +0 -16
- package/chunk-a81p46j7.js +0 -2
- package/chunk-agsfy9w7.js +0 -2
- package/chunk-d20p02ny.js +0 -2
- package/chunk-ejsneb6f.js +0 -2
- package/chunk-fmq3zwzk.js +0 -2
- package/chunk-rfb85nj7.js +0 -2
- package/chunk-rfdt992v.js +0 -25
- package/chunk-tgfbtehh.js +0 -480
- package/web/chunk-0fgaepwm.js +0 -3
- package/web/chunk-0pecj6d7.js +0 -1
- package/web/chunk-0wt1dgny.js +0 -1
- package/web/chunk-1ves7sq5.js +0 -1
- package/web/chunk-1yj79b48.js +0 -1
- package/web/chunk-296hgy6k.js +0 -370
- package/web/chunk-2bmq1whf.js +0 -1
- package/web/chunk-2wqxhqr9.js +0 -1
- package/web/chunk-30zfw7zg.js +0 -1
- package/web/chunk-39ng8zwx.css +0 -1
- package/web/chunk-3nbzj48p.js +0 -36
- package/web/chunk-3zebd9fq.js +0 -7
- package/web/chunk-4r1n98zx.js +0 -2
- package/web/chunk-59678wmg.js +0 -1
- package/web/chunk-5wdk97mk.js +0 -4
- package/web/chunk-64rafq66.js +0 -78
- package/web/chunk-6kkw9ptc.js +0 -1
- package/web/chunk-718mr5gc.js +0 -2
- package/web/chunk-7hs57qdr.js +0 -1
- package/web/chunk-7kp237t3.js +0 -106
- package/web/chunk-86p42kym.js +0 -1
- package/web/chunk-8n79cqyd.js +0 -1
- package/web/chunk-9an6wcnr.js +0 -1
- package/web/chunk-9w5tf22s.js +0 -1
- package/web/chunk-b985y17w.js +0 -2
- package/web/chunk-bz2v64xe.js +0 -1
- package/web/chunk-c3nn0vvc.js +0 -1
- package/web/chunk-cb2rxtq9.js +0 -2
- package/web/chunk-cm92fyr3.js +0 -2
- package/web/chunk-cwtn2kdm.js +0 -1
- package/web/chunk-d4z2rgpx.js +0 -1
- package/web/chunk-dpkyygej.js +0 -1
- package/web/chunk-et5ess72.js +0 -1
- package/web/chunk-ez8b6neq.js +0 -1
- package/web/chunk-f5txt81n.js +0 -2
- package/web/chunk-fd1kqwe3.js +0 -1
- package/web/chunk-fp48zz2e.js +0 -2
- package/web/chunk-fx0n2g22.js +0 -89
- package/web/chunk-g6k9z8zt.js +0 -1
- package/web/chunk-gsh80797.js +0 -41
- package/web/chunk-hs5x78fb.js +0 -1
- package/web/chunk-hyd5hzpa.js +0 -1
- package/web/chunk-hyt1nkaw.js +0 -1
- package/web/chunk-j6a4z530.js +0 -1139
- package/web/chunk-kegv14sg.js +0 -2
- package/web/chunk-kw9emsqw.js +0 -1
- package/web/chunk-m2prjwk3.js +0 -4
- package/web/chunk-m9bzz9m0.js +0 -19
- package/web/chunk-mqsyzzgt.js +0 -30
- package/web/chunk-nywdeb4m.js +0 -2
- package/web/chunk-pxkhm40r.js +0 -2
- package/web/chunk-q9ekgjh6.js +0 -62
- package/web/chunk-r3mj50zs.js +0 -1
- package/web/chunk-sc0ghp25.js +0 -24
- package/web/chunk-t74r2n8h.js +0 -1
- package/web/chunk-t9mvsgt9.js +0 -1
- package/web/chunk-vf4vkcf9.js +0 -24
- package/web/chunk-vnt34mkb.js +0 -1
- package/web/chunk-vtxw9rmr.js +0 -1
- package/web/chunk-x19v2sxv.js +0 -1
- package/web/chunk-y21zy3eh.js +0 -1
- package/web/chunk-ya3ghn3n.js +0 -2
- package/web/chunk-yd74yxzt.js +0 -8
- package/web/chunk-z4ha8181.js +0 -1
- package/web/chunk-z8rarqe6.js +0 -1
- package/web/chunk-zsxw5fj7.js +0 -39
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import{G}from"./chunk-jzte2phh.js";import{t,a,ke,x,B,C,S,E,T,A,L,R,l,V,U}from"./chunk-3q0v8w45.js";import{ee}from"./chunk-8dp7h6w8.js";var rt=t((r,i)=>{let n=r<=1?r*100:r;if(n<0||n>100)throw Error(`${i} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${r}`);return n},"toPercent"),q=t((r,i,n)=>({x:rt(i,`${n} evolution`),y:rt(r,`${n} visibility`)}),"toCoordinates"),ct=t((r)=>{if(!r)return;if(r==="+<>")return"bidirectional";if(r==="+<")return"backward";if(r==="+>")return"forward";return},"getFlowFromPort"),It=t((r)=>{if(!r?.startsWith("+"))return{};let n=/^\+'([^']*)'/.exec(r)?.[1];if(r.includes("<>"))return{flow:"bidirectional",label:n};if(r.includes("<"))return{flow:"backward",label:n};if(r.includes(">"))return{flow:"forward",label:n};return{label:n}},"extractFlowFromArrow"),Bt=t((r,i)=>{if(G(r,i),r.size)i.setSize(r.size.width,r.size.height);if(r.evolution){let n=r.evolution.stages.map((o)=>{if(o.secondName)return`${o.name.trim()} / ${o.secondName.trim()}`;return o.name.trim()}),u=r.evolution.stages.filter((o)=>o.boundary!==void 0).map((o)=>o.boundary);i.updateAxes({stages:n,stageBoundaries:u})}if(r.anchors.forEach((n)=>{let u=q(n.visibility,n.evolution,`Anchor "${n.name}"`);i.addNode(n.name,n.name,u.x,u.y,"anchor")}),r.components.forEach((n)=>{let u=q(n.visibility,n.evolution,`Component "${n.name}"`),o=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,p=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,b=n.decorator?.strategy;i.addNode(n.name,n.name,u.x,u.y,"component",o,p,n.inertia,b)}),r.notes.forEach((n)=>{let u=q(n.visibility,n.evolution,`Note "${n.text}"`);i.addNote(n.text,u.x,u.y)}),r.pipelines.forEach((n)=>{let u=i.getNode(n.parent);if(!u||typeof u.y!=="number")throw Error(`Pipeline "${n.parent}" must reference an existing component with coordinates.`);let o=u.y;i.startPipeline(n.parent),n.components.forEach((p)=>{let b=`${n.parent}_${p.name}`,X=p.label?(p.label.negX?-1:1)*p.label.offsetX:void 0,m=p.label?(p.label.negY?-1:1)*p.label.offsetY:void 0,Q=rt(p.evolution,`Pipeline component "${p.name}" evolution`);i.addNode(b,p.name,Q,o,"pipeline-component",X,m),i.addPipelineComponent(n.parent,b)})}),r.links.forEach((n)=>{let u=!!n.arrow&&(n.arrow.includes("-.->")||n.arrow.includes(".-.")),o=ct(n.fromPort)??ct(n.toPort),{flow:p,label:b}=It(n.arrow);if(!o&&p)o=p;let X=n.linkLabel,m=b??X;i.addLink(i.resolveNodeId(n.from),i.resolveNodeId(n.to),u,m,o)}),r.evolves.forEach((n)=>{let u=i.getNode(n.component);if(u?.y!==void 0){let o=rt(n.target,`Evolve target for "${n.component}"`);i.addTrend(n.component,o,u.y)}}),r.annotations.length>0){let n=r.annotations[0],u=q(n.x,n.y,"Annotations box");i.setAnnotationsBox(u.x,u.y)}r.annotation.forEach((n)=>{let u=q(n.x,n.y,`Annotation ${n.number}`);i.addAnnotation(n.number,[{x:u.x,y:u.y}],n.text)}),r.accelerators.forEach((n)=>{let u=q(n.x,n.y,`Accelerator "${n.name}"`);i.addAccelerator(n.name,u.x,u.y)}),r.deaccelerators.forEach((n)=>{let u=q(n.x,n.y,`Deaccelerator "${n.name}"`);i.addDeaccelerator(n.name,u.x,u.y)})},"populateDb"),pt={parser:{yy:void 0},parse:t(async(r)=>{let i=await ee("wardley",r);a.debug(i);let n=pt.parser?.yy;if(!n||typeof n.addNode!=="function")throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Bt(i,n)},"parse")},Ft=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t(this,"WardleyBuilder")}addNode(r){let i=this.nodes.get(r.id)??{id:r.id,label:r.label},n={...i,...r,className:r.className??i.className,labelOffsetX:r.labelOffsetX??i.labelOffsetX,labelOffsetY:r.labelOffsetY??i.labelOffsetY};this.nodes.set(r.id,n)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});let i=this.nodes.get(r);if(i)i.isPipelineParent=!0}addPipelineComponent(r,i){let n=this.pipelines.get(r);if(n)n.componentIds.push(i);let u=this.nodes.get(i);if(u)u.inPipeline=!0}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,i){this.annotationsBox={x:r,y:i}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,i){this.size={width:r,height:i}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(let[i,n]of this.nodes)if(n.label===r)return i;return r}build(){let r=[];for(let i of this.nodes.values()){if(typeof i.x!=="number"||typeof i.y!=="number")throw Error(`Node "${i.label}" is missing coordinates`);r.push(i)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},P=new Ft;function ht(){return l()["wardley-beta"]}t(ht,"getConfig");function ft(r,i,n,u,o,p,b,X,m){P.addNode({id:r,label:i,x:n,y:u,className:o,labelOffsetX:p,labelOffsetY:b,inertia:X,sourceStrategy:m})}t(ft,"addNode");function xt(r,i,n=!1,u,o){P.addLink({source:r,target:i,dashed:n,label:u,flow:o})}t(xt,"addLink");function gt(r,i,n){P.addTrend({nodeId:r,targetX:i,targetY:n})}t(gt,"addTrend");function yt(r,i,n){P.addAnnotation({number:r,coordinates:i,text:n})}t(yt,"addAnnotation");function ut(r,i,n){P.addNote({text:r,x:i,y:n})}t(ut,"addNote");function wt(r,i,n){P.addAccelerator({name:r,x:i,y:n})}t(wt,"addAccelerator");function mt(r,i,n){P.addDeaccelerator({name:r,x:i,y:n})}t(mt,"addDeaccelerator");function kt(r,i){P.setAnnotationsBox(r,i)}t(kt,"setAnnotationsBox");function bt(r,i){P.setSize(r,i)}t(bt,"setSize");function $t(r){P.startPipeline(r)}t($t,"startPipeline");function vt(r,i){P.addPipelineComponent(r,i)}t(vt,"addPipelineComponent");function Pt(r){P.setAxes(r)}t(Pt,"updateAxes");function Ct(r){return P.getNode(r)}t(Ct,"getNode");function St(r){return P.resolveNodeId(r)}t(St,"resolveNodeId");function Mt(){return P.build()}t(Mt,"getWardleyData");function Nt(){P.clear(),C()}t(Nt,"clear");var Rt={getConfig:ht,addNode:ft,addLink:xt,addTrend:gt,addAnnotation:yt,addNote:ut,addAccelerator:wt,addDeaccelerator:mt,setAnnotationsBox:kt,setSize:bt,startPipeline:$t,addPipelineComponent:vt,updateAxes:Pt,getNode:Ct,resolveNodeId:St,getWardleyData:Mt,clear:Nt,setAccTitle:S,getAccTitle:E,setDiagramTitle:L,getDiagramTitle:R,getAccDescription:A,setAccDescription:T},Ot=["Genesis","Custom Built","Product","Commodity"],Dt=t(()=>{let{themeVariables:r}=l();return{backgroundColor:r.wardley?.backgroundColor??r.background??"#fff",axisColor:r.wardley?.axisColor??"#000",axisTextColor:r.wardley?.axisTextColor??r.primaryTextColor??"#222",gridColor:r.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:r.wardley?.componentFill??"#fff",componentStroke:r.wardley?.componentStroke??"#000",componentLabelColor:r.wardley?.componentLabelColor??r.primaryTextColor??"#222",linkStroke:r.wardley?.linkStroke??"#000",evolutionStroke:r.wardley?.evolutionStroke??"#dc3545",annotationStroke:r.wardley?.annotationStroke??"#000",annotationTextColor:r.wardley?.annotationTextColor??r.primaryTextColor??"#222",annotationFill:r.wardley?.annotationFill??r.background??"#fff"}},"getTheme"),Gt=t(()=>{let r=l()["wardley-beta"];return{width:r?.width??900,height:r?.height??600,padding:r?.padding??48,nodeRadius:r?.nodeRadius??6,nodeLabelOffset:r?.nodeLabelOffset??8,axisFontSize:r?.axisFontSize??12,labelFontSize:r?.labelFontSize??10,showGrid:r?.showGrid??!1,useMaxWidth:r?.useMaxWidth??!0}},"getConfigValues"),qt=t((r,i,n,u)=>{a.debug(`Rendering Wardley map
|
|
2
|
+
`+r);let o=Gt(),p=Dt(),b=o.nodeRadius*1.6,X=u.db,m=X.getWardleyData(),Q=X.getDiagramTitle(),H=m.size?.width??o.width,M=m.size?.height??o.height,_=V(i);_.selectAll("*").remove(),B(_,M,H,o.useMaxWidth),_.attr("viewBox",`0 0 ${H} ${M}`);let z=_.append("g").attr("class","wardley-map"),ot=_.append("defs");ot.append("marker").attr("id",`arrow-${i}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",p.evolutionStroke).attr("stroke","none"),ot.append("marker").attr("id",`link-arrow-end-${i}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",p.linkStroke).attr("stroke","none"),ot.append("marker").attr("id",`link-arrow-start-${i}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",p.linkStroke).attr("stroke","none"),z.append("rect").attr("class","wardley-background").attr("width",H).attr("height",M).attr("fill",p.backgroundColor);let Z=H-o.padding*2,J=M-o.padding*2;if(Q)z.append("text").attr("class","wardley-title").attr("x",H/2).attr("y",o.padding/2).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(Q);let F=t((e)=>o.padding+e/100*Z,"projectX"),O=t((e)=>M-o.padding-e/100*J,"projectY"),tt=z.append("g").attr("class","wardley-axes");tt.append("line").attr("x1",o.padding).attr("x2",H-o.padding).attr("y1",M-o.padding).attr("y2",M-o.padding).attr("stroke",p.axisColor).attr("stroke-width",1),tt.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke",p.axisColor).attr("stroke-width",1);let zt=m.axes.xLabel??"Evolution",Lt=m.axes.yLabel??"Visibility";tt.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+Z/2).attr("y",M-o.padding/4).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(zt),tt.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+J/2).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+J/2})`).text(Lt);let K=m.axes.stages&&m.axes.stages.length>0?m.axes.stages:Ot;if(K.length>0){let e=z.append("g").attr("class","wardley-stages"),d=m.axes.stageBoundaries,s=[];if(d&&d.length===K.length){let c=0;d.forEach((f)=>{s.push({start:c,end:f}),c=f})}else{let c=1/K.length;K.forEach((f,g)=>{s.push({start:g*c,end:(g+1)*c})})}K.forEach((c,f)=>{let g=s[f],w=o.padding+g.start*Z,y=o.padding+g.end*Z,k=(w+y)/2;if(f>0)e.append("line").attr("x1",w).attr("x2",w).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",0.8);e.append("text").attr("class","wardley-stage-label").attr("x",k).attr("y",M-o.padding/1.5).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(c)})}if(o.showGrid){let e=z.append("g").attr("class","wardley-grid");for(let d=1;d<4;d++){let s=d/4,c=o.padding+Z*s;e.append("line").attr("x1",c).attr("x2",c).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6"),e.append("line").attr("x1",o.padding).attr("x2",H-o.padding).attr("y1",M-o.padding-J*s).attr("y2",M-o.padding-J*s).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6")}}let h=new Map;if(m.nodes.forEach((e)=>{h.set(e.id,{x:F(e.x),y:O(e.y),node:e})}),m.pipelines.length>0){let e=z.append("g").attr("class","wardley-pipelines"),d=z.append("g").attr("class","wardley-pipeline-links");m.pipelines.forEach((s)=>{if(s.componentIds.length===0)return;let c=s.componentIds.map((y)=>({id:y,pos:h.get(y),node:m.nodes.find((k)=>k.id===y)})).filter((y)=>y.pos&&y.node).sort((y,k)=>y.node.x-k.node.x);for(let y=0;y<c.length-1;y++){let k=c[y],v=c[y+1];d.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",k.pos.x).attr("y1",k.pos.y).attr("x2",v.pos.x).attr("y2",v.pos.y).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let f=1/0,g=-1/0,w=0;if(s.componentIds.forEach((y)=>{let k=h.get(y);if(k)f=Math.min(f,k.x),g=Math.max(g,k.x),w=k.y}),f!==1/0&&g!==-1/0){let k=o.nodeRadius*4,v=w-k/2,W=h.get(s.nodeId);if(W){let I=(f+g)/2;W.x=I,W.y=v-b/6}e.append("rect").attr("class","wardley-pipeline-box").attr("x",f-15).attr("y",v).attr("width",g-f+30).attr("height",k).attr("fill","none").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let it=z.append("g").attr("class","wardley-links"),dt=new Map;m.pipelines.forEach((e)=>{dt.set(e.nodeId,new Set(e.componentIds))});let lt=m.links.filter((e)=>{if(!h.has(e.source)||!h.has(e.target))return!1;if(dt.get(e.target)?.has(e.source))return!1;return!0});it.selectAll("line").data(lt).enter().append("line").attr("class",(e)=>`wardley-link${e.dashed?" wardley-link--dashed":""}`).attr("x1",(e)=>{let d=h.get(e.source),s=h.get(e.target),f=m.nodes.find((k)=>k.id===e.source).isPipelineParent?b/Math.sqrt(2):o.nodeRadius,g=s.x-d.x,w=s.y-d.y,y=Math.sqrt(g*g+w*w);return d.x+g/y*f}).attr("y1",(e)=>{let d=h.get(e.source),s=h.get(e.target),f=m.nodes.find((k)=>k.id===e.source).isPipelineParent?b/Math.sqrt(2):o.nodeRadius,g=s.x-d.x,w=s.y-d.y,y=Math.sqrt(g*g+w*w);return d.y+w/y*f}).attr("x2",(e)=>{let d=h.get(e.source),s=h.get(e.target),f=m.nodes.find((k)=>k.id===e.target).isPipelineParent?b/Math.sqrt(2):o.nodeRadius,g=d.x-s.x,w=d.y-s.y,y=Math.sqrt(g*g+w*w);return s.x+g/y*f}).attr("y2",(e)=>{let d=h.get(e.source),s=h.get(e.target),f=m.nodes.find((k)=>k.id===e.target).isPipelineParent?b/Math.sqrt(2):o.nodeRadius,g=d.x-s.x,w=d.y-s.y,y=Math.sqrt(g*g+w*w);return s.y+w/y*f}).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",(e)=>e.dashed?"6 6":null).attr("marker-end",(e)=>{if(e.flow==="forward"||e.flow==="bidirectional")return`url(#link-arrow-end-${i})`;return null}).attr("marker-start",(e)=>{if(e.flow==="backward"||e.flow==="bidirectional")return`url(#link-arrow-start-${i})`;return null}),it.selectAll("text").data(lt.filter((e)=>e.label)).enter().append("text").attr("class","wardley-link-label").attr("x",(e)=>{let d=h.get(e.source),s=h.get(e.target),c=(d.x+s.x)/2,f=s.y-d.y,g=s.x-d.x,w=Math.sqrt(g*g+f*f),y=8,k=f/w;return c+k*8}).attr("y",(e)=>{let d=h.get(e.source),s=h.get(e.target),c=(d.y+s.y)/2,f=s.x-d.x,g=s.y-d.y,w=Math.sqrt(f*f+g*g),y=8,k=-f/w;return c+k*8}).attr("fill",p.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",(e)=>{let d=h.get(e.source),s=h.get(e.target),c=(d.x+s.x)/2,f=(d.y+s.y)/2,g=s.x-d.x,w=s.y-d.y,y=Math.sqrt(g*g+w*w),k=8,v=w/y,W=-g/y,I=c+v*8,et=f+W*8,j=Math.atan2(w,g)*180/Math.PI;if(j>90||j<-90)j+=180;return`rotate(${j} ${I} ${et})`}).text((e)=>e.label);let Tt=z.append("g").attr("class","wardley-trends"),Wt=m.trends.map((e)=>{let d=h.get(e.nodeId);if(!d)return null;let s=F(e.targetX),c=O(e.targetY),f=s-d.x,g=c-d.y,w=Math.sqrt(f*f+g*g),y=o.nodeRadius+2,k=w>y?s-f/w*y:s,v=w>y?c-g/w*y:c;return{origin:d,targetX:s,targetY:c,adjustedX2:k,adjustedY2:v}}).filter((e)=>e!==null);Tt.selectAll("line").data(Wt).enter().append("line").attr("class","wardley-trend").attr("x1",(e)=>e.origin.x).attr("y1",(e)=>e.origin.y).attr("x2",(e)=>e.adjustedX2).attr("y2",(e)=>e.adjustedY2).attr("stroke",p.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${i})`);let Y=z.append("g").attr("class","wardley-nodes").selectAll("g").data(m.nodes).enter().append("g").attr("class",(e)=>["wardley-node",e.className?`wardley-node--${e.className}`:""].filter(Boolean).join(" "));Y.filter((e)=>e.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",p.componentStroke).attr("stroke-width",1),Y.filter((e)=>e.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",p.componentStroke).attr("stroke-width",1),Y.filter((e)=>e.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let D=Y.filter((e)=>e.sourceStrategy==="market");D.append("circle").attr("class","wardley-market-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),Y.filter((e)=>!e.isPipelineParent&&e.sourceStrategy!=="market"&&e.className!=="anchor").append("circle").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",o.nodeRadius).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1);let nt=o.nodeRadius*0.7,N=o.nodeRadius*1.2;if(D.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x).attr("y1",(e)=>h.get(e.id).y-N).attr("x2",(e)=>h.get(e.id).x-N*Math.cos(Math.PI/6)).attr("y2",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),D.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x-N*Math.cos(Math.PI/6)).attr("y1",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("x2",(e)=>h.get(e.id).x+N*Math.cos(Math.PI/6)).attr("y2",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),D.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x+N*Math.cos(Math.PI/6)).attr("y1",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("x2",(e)=>h.get(e.id).x).attr("y2",(e)=>h.get(e.id).y-N).attr("stroke",p.componentStroke).attr("stroke-width",1),D.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y-N).attr("r",nt).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),D.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x-N*Math.cos(Math.PI/6)).attr("cy",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("r",nt).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),D.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x+N*Math.cos(Math.PI/6)).attr("cy",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("r",nt).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),Y.filter((e)=>e.isPipelineParent===!0).append("rect").attr("x",(e)=>h.get(e.id).x-b/2).attr("y",(e)=>h.get(e.id).y-b/2).attr("width",b).attr("height",b).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1),Y.filter((e)=>e.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",(e)=>{let d=h.get(e.id),s=e.isPipelineParent?b/2+15:o.nodeRadius+15;if(e.sourceStrategy)s+=o.nodeRadius+10;return d.x+s}).attr("y1",(e)=>{let d=h.get(e.id),s=e.isPipelineParent?b:o.nodeRadius*2;return d.y-s/2}).attr("x2",(e)=>{let d=h.get(e.id),s=e.isPipelineParent?b/2+15:o.nodeRadius+15;if(e.sourceStrategy)s+=o.nodeRadius+10;return d.x+s}).attr("y2",(e)=>{let d=h.get(e.id),s=e.isPipelineParent?b:o.nodeRadius*2;return d.y+s/2}).attr("stroke",p.componentStroke).attr("stroke-width",6),Y.append("text").attr("x",(e)=>{let d=h.get(e.id);if(e.className==="anchor")return e.labelOffsetX!==void 0?d.x+e.labelOffsetX:d.x;let s=o.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetX===void 0)s+=10;let c=e.labelOffsetX??s;return d.x+c}).attr("y",(e)=>{let d=h.get(e.id);if(e.className==="anchor")return e.labelOffsetY!==void 0?d.y+e.labelOffsetY:d.y-3;let s=-o.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetY===void 0)s-=10;let c=e.labelOffsetY??s;return d.y+c}).attr("class","wardley-node-label").attr("fill",(e)=>{if(e.className==="evolved")return p.evolutionStroke;if(e.className==="anchor")return"#000";return p.componentLabelColor}).attr("font-size",o.labelFontSize).attr("font-weight",(e)=>e.className==="anchor"?"bold":"normal").attr("text-anchor",(e)=>e.className==="anchor"?"middle":"start").attr("dominant-baseline",(e)=>e.className==="anchor"?"middle":"auto").text((e)=>e.label),m.annotations.length>0){let e=z.append("g").attr("class","wardley-annotations");if(m.annotations.forEach((d)=>{let s=d.coordinates.map((c)=>({x:F(c.x),y:O(c.y)}));if(s.length>1)for(let c=0;c<s.length-1;c++)e.append("line").attr("class","wardley-annotation-line").attr("x1",s[c].x).attr("y1",s[c].y).attr("x2",s[c+1].x).attr("y2",s[c+1].y).attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach((c)=>{let f=e.append("g").attr("class","wardley-annotation");f.append("circle").attr("cx",c.x).attr("cy",c.y).attr("r",10).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5),f.append("text").attr("x",c.x).attr("y",c.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.number)})}),m.annotationsBox){let d=F(m.annotationsBox.x),s=O(m.annotationsBox.y),c=10,f=16,g=11,w=e.append("g").attr("class","wardley-annotations-box"),y=[...m.annotations].filter((v)=>v.text).sort((v,W)=>v.number-W.number),k=[];if(y.forEach((v,W)=>{let I=w.append("text").attr("x",d+c).attr("y",s+c+(W+1)*f).attr("font-size",g).attr("fill",p.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${v.number}. ${v.text}`);k.push(I)}),k.length>0){let v=0,W=0;k.forEach((st)=>{let at=st.node(),Ht=at.getComputedTextLength();v=Math.max(v,Ht);let Yt=at.getBBox();W=Math.max(W,Yt.height)});let I=v+c*2+105,et=y.length*f+c*2+W/2,j=o.padding,At=H-o.padding-I,Xt=o.padding,Et=M-o.padding-et;d=Math.max(j,Math.min(d,At)),s=Math.max(Xt,Math.min(s,Et)),k.forEach((st,at)=>{st.attr("x",d+c).attr("y",s+c+(at+1)*f)}),w.insert("rect","text").attr("x",d).attr("y",s).attr("width",I).attr("height",et).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(m.notes.length>0){let e=z.append("g").attr("class","wardley-notes");m.notes.forEach((d)=>{let s=F(d.x),c=O(d.y);e.append("text").attr("x",s).attr("y",c).attr("text-anchor","start").attr("font-size",11).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.text)})}if(m.accelerators.length>0){let e=z.append("g").attr("class","wardley-accelerators");m.accelerators.forEach((d)=>{let s=F(d.x),c=O(d.y),f=60,g=30,w=20,y=`
|
|
3
|
+
M ${s} ${c-15}
|
|
4
|
+
L ${s+60-20} ${c-15}
|
|
5
|
+
L ${s+60-20} ${c-15-8}
|
|
6
|
+
L ${s+60} ${c}
|
|
7
|
+
L ${s+60-20} ${c+15+8}
|
|
8
|
+
L ${s+60-20} ${c+15}
|
|
9
|
+
L ${s} ${c+15}
|
|
10
|
+
Z
|
|
11
|
+
`;e.append("path").attr("d",y).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),e.append("text").attr("x",s+30).attr("y",c+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.name)})}if(m.deaccelerators.length>0){let e=z.append("g").attr("class","wardley-deaccelerators");m.deaccelerators.forEach((d)=>{let s=F(d.x),c=O(d.y),f=60,g=30,w=20,y=`
|
|
12
|
+
M ${s+60} ${c-15}
|
|
13
|
+
L ${s+20} ${c-15}
|
|
14
|
+
L ${s+20} ${c-15-8}
|
|
15
|
+
L ${s} ${c}
|
|
16
|
+
L ${s+20} ${c+15+8}
|
|
17
|
+
L ${s+20} ${c+15}
|
|
18
|
+
L ${s+60} ${c+15}
|
|
19
|
+
Z
|
|
20
|
+
`;e.append("path").attr("d",y).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),e.append("text").attr("x",s+30).attr("y",c+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.name)})}},"draw"),jt={draw:qt},Vt=t(({wardley:r}={})=>{let i=ke(),n=x(),u=U(i,n.themeVariables),o=U(u.wardley,r);return`
|
|
21
|
+
.wardley-background {
|
|
22
|
+
fill: ${o.backgroundColor};
|
|
23
|
+
}
|
|
24
|
+
.wardley-axes line, .wardley-axes path {
|
|
25
|
+
stroke: ${o.axisColor};
|
|
26
|
+
}
|
|
27
|
+
.wardley-axis-label {
|
|
28
|
+
fill: ${o.axisTextColor};
|
|
29
|
+
}
|
|
30
|
+
.wardley-stage-label {
|
|
31
|
+
fill: ${o.axisTextColor};
|
|
32
|
+
}
|
|
33
|
+
.wardley-grid line {
|
|
34
|
+
stroke: ${o.gridColor};
|
|
35
|
+
}
|
|
36
|
+
.wardley-node circle {
|
|
37
|
+
fill: ${o.componentFill};
|
|
38
|
+
stroke: ${o.componentStroke};
|
|
39
|
+
}
|
|
40
|
+
.wardley-node-label {
|
|
41
|
+
fill: ${o.componentLabelColor};
|
|
42
|
+
}
|
|
43
|
+
.wardley-link {
|
|
44
|
+
stroke: ${o.linkStroke};
|
|
45
|
+
}
|
|
46
|
+
.wardley-link--dashed {
|
|
47
|
+
stroke-dasharray: 4 4;
|
|
48
|
+
}
|
|
49
|
+
.wardley-link-label {
|
|
50
|
+
fill: ${o.axisTextColor};
|
|
51
|
+
}
|
|
52
|
+
.wardley-trend line {
|
|
53
|
+
stroke: ${o.evolutionStroke};
|
|
54
|
+
}
|
|
55
|
+
.wardley-annotation-line {
|
|
56
|
+
stroke: ${o.annotationStroke};
|
|
57
|
+
}
|
|
58
|
+
.wardley-annotation circle {
|
|
59
|
+
fill: ${o.annotationFill};
|
|
60
|
+
stroke: ${o.annotationStroke};
|
|
61
|
+
}
|
|
62
|
+
.wardley-annotation text {
|
|
63
|
+
fill: ${o.annotationTextColor};
|
|
64
|
+
}
|
|
65
|
+
.wardley-annotations-box rect {
|
|
66
|
+
fill: ${o.annotationFill};
|
|
67
|
+
stroke: ${o.annotationStroke};
|
|
68
|
+
}
|
|
69
|
+
.wardley-annotations-box text {
|
|
70
|
+
fill: ${o.annotationTextColor};
|
|
71
|
+
}
|
|
72
|
+
.wardley-pipeline-box {
|
|
73
|
+
stroke: ${o.componentStroke};
|
|
74
|
+
}
|
|
75
|
+
.wardley-notes text {
|
|
76
|
+
fill: ${o.axisTextColor};
|
|
77
|
+
}
|
|
78
|
+
`},"styles"),re={parser:pt,db:Rt,renderer:jt,styles:Vt};export{re as diagram};
|