@bkm016/basalt 0.1.4 → 0.1.5
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 +53 -5
- package/{chunk-y648fzx0.js → chunk-0039s4jt.js} +3 -3
- package/{chunk-m40gxwq4.js → chunk-00gwse5r.js} +3 -3
- package/{chunk-t6zs4kw0.js → chunk-0fwdxd45.js} +2 -2
- package/{chunk-nmca5h6m.js → chunk-0j0qggej.js} +1 -1
- package/chunk-0n99m9m4.js +2 -0
- package/{chunk-pjyn2s97.js → chunk-0stvywr8.js} +1 -1
- package/{chunk-ztsjgssj.js → chunk-1xa7d5mh.js} +1 -1
- package/chunk-2nb3d92s.js +2 -0
- package/chunk-2nkfxhef.js +3868 -0
- package/chunk-2pa1z37c.js +2 -0
- package/{chunk-fw2bpqmw.js → chunk-2qcpq99g.js} +1 -1
- package/{chunk-981f9dw8.js → chunk-36cqq0ga.js} +6 -6
- package/{chunk-whvj83b7.js → chunk-3c330qna.js} +2 -2
- package/chunk-3k627vf2.js +3 -0
- package/{chunk-r7fpkb49.js → chunk-3k7ejpkc.js} +1 -1
- package/chunk-4g5f43ea.js +3 -0
- package/{chunk-fjtvjrkg.js → chunk-539ekagy.js} +4 -4
- package/{chunk-97rzj7f6.js → chunk-5v4g21rw.js} +1 -1
- package/{chunk-r0scgfwx.js → chunk-6dsq0fns.js} +2 -2
- package/{chunk-pbcy6zdt.js → chunk-7as47pcw.js} +1 -1
- package/{chunk-g2t6t8fk.js → chunk-7jezts2n.js} +2 -2
- package/{chunk-8wc8qdx8.js → chunk-7qq99360.js} +6 -6
- package/{chunk-9rmqgc3c.js → chunk-7tgqhveh.js} +15 -15
- package/{chunk-mvfsxdx6.js → chunk-7w0mefgk.js} +10 -10
- package/{chunk-y58ygzn9.js → chunk-818nd6s1.js} +3 -3
- package/{chunk-vv7fp27r.js → chunk-8mezk0cb.js} +2 -2
- package/{chunk-q7t30zz2.js → chunk-8xb636vr.js} +5 -5
- package/{chunk-ev6yvy5y.js → chunk-980drajf.js} +15 -15
- package/{chunk-3x94302m.js → chunk-9z7sdh5e.js} +3 -3
- package/{chunk-zggzfa7j.js → chunk-a4b75ekk.js} +2 -2
- package/{chunk-2zp1mv3q.js → chunk-ar3dbfp9.js} +1 -1
- package/{chunk-vk1gxk1t.js → chunk-aw65h276.js} +1 -1
- package/{chunk-f3xadvab.js → chunk-b9fqretv.js} +2 -2
- package/{chunk-7tbya5b5.js → chunk-bgkegf0k.js} +22 -22
- package/{chunk-0y7ne3d0.js → chunk-bwawt15q.js} +2 -2
- package/{chunk-pxsrqrd0.js → chunk-c4qr1f41.js} +2 -2
- package/chunk-dddsrff6.js +478 -0
- package/{chunk-xfvvh1s5.js → chunk-e63c1186.js} +1 -1
- package/{chunk-em187cy3.js → chunk-ebzkckyw.js} +2 -2
- package/chunk-eegztdzb.js +2 -0
- package/{chunk-rmj5b73e.js → chunk-gw05p4g3.js} +1 -1
- package/{chunk-k23t7vhs.js → chunk-h1rypb99.js} +5 -5
- package/{chunk-akr0a8nc.js → chunk-hq5ke1yp.js} +1 -1
- package/{chunk-jwdb0ccj.js → chunk-jvwg4rn1.js} +3 -3
- package/{chunk-7afmgncg.js → chunk-jyrwk08p.js} +1 -1
- package/chunk-kns4kv7b.js +3 -0
- package/{chunk-8d46jtbj.js → chunk-mat08ab1.js} +2 -2
- package/{chunk-jk25nt60.js → chunk-mkp28k1x.js} +2 -2
- package/{chunk-3ct2tkr8.js → chunk-npez1492.js} +2 -2
- package/{chunk-shadcb9z.js → chunk-nx3jnbv8.js} +2 -2
- package/{chunk-ykens1hy.js → chunk-nxkmd29x.js} +1 -1
- package/{chunk-y7nma9rk.js → chunk-pjr91g6k.js} +2 -2
- package/{chunk-m8vkwdgr.js → chunk-r0jc8e7t.js} +4 -4
- package/chunk-rxj6tct8.js +2 -0
- package/{chunk-362g64pd.js → chunk-sqaam5ak.js} +1 -1
- package/{chunk-4w17tzp5.js → chunk-srjgvdvs.js} +12 -12
- package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
- package/{chunk-k6w6y71k.js → chunk-t7sc0wwc.js} +2 -2
- package/{chunk-kp22kaez.js → chunk-v4k3qmdm.js} +2 -2
- package/{chunk-1vd0f74z.js → chunk-vt1anydc.js} +4 -4
- package/chunk-wd3z74av.js +2 -0
- package/{chunk-xh3vr5vz.js → chunk-wfyrfvfn.js} +1 -1
- package/{chunk-2hbfk5xd.js → chunk-wnzvnskb.js} +2 -2
- package/{chunk-cjc90f84.js → chunk-x89em726.js} +3 -3
- package/{chunk-vexrrw1b.js → chunk-xtq1xpq0.js} +2 -2
- package/chunk-yna8bwqc.js +2 -0
- package/{chunk-aky4tztg.js → chunk-zn0g0859.js} +2 -2
- package/{chunk-qe0teyn1.js → chunk-zrkh5dw7.js} +1 -1
- package/chunk-zzwjt7fp.js +2 -0
- package/compiled.js +12 -12
- package/package.json +1 -1
- package/ui-test-worker.js +20 -20
- package/web/chunk-01hcjafh.js +2 -0
- package/web/{chunk-n8sky2q6.js → chunk-07agqp8h.js} +1 -1
- package/web/{chunk-hvw3gn2a.js → chunk-0k9aec1s.js} +20 -20
- package/web/{chunk-74j07k8k.js → chunk-0p1nmj5n.js} +2 -2
- package/web/chunk-0qr891eq.js +70 -0
- package/web/{chunk-ts7zrf5b.js → chunk-0whceqes.js} +2 -2
- package/web/chunk-0ytga215.js +1 -0
- package/web/{chunk-0z0y25zf.js → chunk-12z7d0hp.js} +3 -3
- package/web/chunk-14bad871.js +2 -0
- package/web/chunk-1amzv4ha.js +1 -0
- package/web/chunk-1cfh0e2e.js +324 -0
- package/web/chunk-1pasbxwh.js +89 -0
- package/web/{chunk-4d3a7xs2.js → chunk-1s2hp6h1.js} +1 -1
- package/web/chunk-26bwh1sb.js +169 -0
- package/web/{chunk-wnskxerq.js → chunk-2nht58dc.js} +5 -5
- package/web/chunk-2y0rc1fe.js +1 -0
- package/web/chunk-3hkgdw6f.js +36 -0
- package/web/chunk-4a4j030b.js +1 -0
- package/web/{chunk-nvhmq4z5.js → chunk-4m3zdd41.js} +6 -6
- package/web/chunk-4w298aqs.js +1 -0
- package/web/{chunk-t4c8xavd.js → chunk-56krfj3b.js} +7 -7
- package/web/{chunk-ds7srg4p.js → chunk-5nda24gv.js} +1 -1
- package/web/{chunk-42e3b9hv.js → chunk-5shygfgb.js} +19 -19
- package/web/chunk-65nwc4cf.js +1 -0
- package/web/chunk-6bwgdvf6.js +1 -0
- package/web/chunk-6enn8p66.js +1 -0
- package/web/chunk-6stt9d18.js +1 -0
- package/web/{chunk-4gavbw65.js → chunk-7a3c137d.js} +1 -1
- package/web/chunk-7e47b1sn.js +1 -0
- package/web/chunk-7pypx5h8.js +2 -0
- package/web/chunk-7znyd1mj.js +39 -0
- package/web/{chunk-3re8y26v.js → chunk-892nf39p.js} +7 -7
- package/web/chunk-8r0s8tx7.js +1 -0
- package/web/chunk-9dy7z3ej.js +2 -0
- package/web/chunk-9mq2cdtq.js +1 -0
- package/web/chunk-9w5tf22s.js +1 -0
- package/web/{chunk-bhsaj6qq.js → chunk-9xgspn75.js} +2 -2
- package/web/{chunk-zx8zec24.js → chunk-abhad4zj.js} +56 -56
- package/web/chunk-advfpyb9.js +140 -0
- package/web/chunk-affear07.js +3 -0
- package/web/chunk-ahztazsg.js +1 -0
- package/web/chunk-aqt7kc3s.js +106 -0
- package/web/chunk-b5hah4mf.js +1 -0
- package/web/chunk-b8tfetd8.js +1 -0
- package/web/{chunk-9cx1be43.js → chunk-bnb9xhgw.js} +15 -15
- package/web/{chunk-n1dmrz44.js → chunk-c01176kn.js} +2 -2
- package/web/chunk-c3nn0vvc.js +1 -0
- package/web/chunk-c53xmf48.js +30 -0
- package/web/chunk-ckgpy4r4.js +1 -0
- package/web/chunk-crzseqbx.js +24 -0
- package/web/chunk-d22wq71s.js +1 -0
- package/web/{chunk-pws2seas.js → chunk-d60dpf69.js} +19 -19
- package/web/{chunk-6cnek1xh.js → chunk-d6ddkh6e.js} +1 -1
- package/web/{chunk-cg3jterp.js → chunk-d9wdsjkk.js} +2 -2
- package/web/{chunk-ttg6tbwx.js → chunk-da7m1kva.js} +2 -2
- package/web/chunk-dbnrfxt1.js +8 -0
- package/web/chunk-ddxf8e84.js +1 -0
- package/web/chunk-dzg1pv80.js +200 -0
- package/web/{chunk-yqbnps3a.js → chunk-e8h45nyr.js} +1 -1
- package/web/chunk-ej9vb61c.js +1 -0
- package/web/chunk-f9k3xrwb.js +2 -0
- package/web/{chunk-fh2vj0wv.js → chunk-fjag6yg8.js} +2 -2
- package/web/chunk-fnnrrzqa.js +78 -0
- package/web/{chunk-n90cqdvg.js → chunk-fv6vm14n.js} +2 -2
- package/web/{chunk-b1bgzz66.js → chunk-g5jxwkdh.js} +1 -1
- package/web/{chunk-sspfxp5e.js → chunk-g8kkc6vz.js} +1 -1
- package/web/chunk-g9sqbafw.js +2 -0
- package/web/{chunk-0h0vb6gt.js → chunk-gcv91974.js} +4 -4
- package/web/{chunk-sfg2wkhe.js → chunk-gxqaa4sv.js} +7 -7
- package/web/chunk-gxsb5tx3.js +1 -0
- package/web/{chunk-54thej0t.js → chunk-gyp6v7jd.js} +2 -2
- package/web/chunk-h0c42zy3.js +1 -0
- package/web/chunk-h2ag4kvz.js +2 -0
- package/web/{chunk-kmr7r9xj.js → chunk-h6gh63xj.js} +2 -2
- package/web/{chunk-6m69hczt.js → chunk-h6k1x096.js} +2 -2
- package/web/{chunk-24mfx6w1.js → chunk-j1bw5v1g.js} +2 -2
- package/web/chunk-j34q5jn6.js +1 -0
- package/web/{chunk-0pbjgdgp.js → chunk-ja7w629n.js} +2 -2
- package/web/{chunk-zbj1trar.js → chunk-jam45rqg.js} +2 -2
- package/web/{chunk-f4tacm06.js → chunk-jcdw85mv.js} +1 -1
- package/web/chunk-jfvxxp5c.js +1 -0
- package/web/chunk-jg6fmz2d.js +1 -0
- package/web/{chunk-92ssjk2y.js → chunk-k67v6dyg.js} +40 -40
- package/web/chunk-ka7c5rhx.js +99 -0
- package/web/{chunk-df5zx17h.js → chunk-kza0t0gj.js} +1 -1
- package/web/{chunk-0b47eyrf.js → chunk-m8knte9z.js} +1 -1
- package/web/{chunk-v5cnt7c8.js → chunk-mnzramhc.js} +1 -1
- package/web/{chunk-a408enpy.js → chunk-mpfgr049.js} +1 -1
- package/web/chunk-mz1dabxh.js +1 -0
- package/web/chunk-mz9b5bsa.js +1 -0
- package/web/chunk-p53n0hwr.js +1 -0
- package/web/chunk-paywgcf7.js +40 -0
- package/web/chunk-pfcnr9tw.js +1 -0
- package/web/chunk-pyg1mr80.js +303 -0
- package/web/chunk-q7xkscc5.js +1 -0
- package/web/{chunk-xzp7jf7e.js → chunk-qcge7d6s.js} +2 -2
- package/web/chunk-qmbgb79a.js +1139 -0
- package/web/{chunk-pjkdrgm0.js → chunk-qq5gh5zr.js} +1 -1
- package/web/chunk-qrdh9j62.js +1 -0
- package/web/{chunk-9t5dnjaz.js → chunk-s24qs1bn.js} +9 -9
- package/web/chunk-sd22cnjy.js +1 -0
- package/web/{chunk-ydtrc1ay.js → chunk-sd3cdqcm.js} +2 -2
- package/web/{chunk-rykfak98.js → chunk-sf101c23.js} +2 -2
- package/web/{chunk-1gbd61z0.js → chunk-sfq6cw45.js} +2 -2
- package/web/chunk-svqj4az8.js +1 -0
- package/web/chunk-t7jwyvvr.js +1 -0
- package/web/{chunk-rvrf0f3h.js → chunk-tcp77cp2.js} +2 -2
- package/web/chunk-tf18d2dk.css +1 -0
- package/web/chunk-thbqwq6b.js +1 -0
- package/web/chunk-v0g4cqc1.js +4 -0
- package/web/chunk-vhzys0rr.js +292 -0
- package/web/chunk-vnt34mkb.js +1 -0
- package/web/chunk-vqfz99ff.js +1 -0
- package/web/chunk-vttgyb5v.js +2 -0
- package/web/chunk-x7sb3bwf.js +370 -0
- package/web/chunk-xce8n339.js +1 -0
- package/web/{chunk-kwccs9f6.js → chunk-xk1t58c4.js} +12 -12
- package/web/chunk-xsrvw7dt.js +4 -0
- package/web/chunk-xtss82z2.js +1 -0
- package/web/{chunk-2j4m0bh1.js → chunk-y7jq61nv.js} +2 -2
- package/web/{chunk-1eg9sbbt.js → chunk-ybw6vgf6.js} +2 -2
- package/web/{chunk-ybrf9mhz.js → chunk-yvgs6bm3.js} +4 -4
- package/web/{chunk-b53bfkys.js → chunk-z4aj066q.js} +1 -1
- package/web/chunk-zazs8p6c.js +1 -0
- package/web/{chunk-aqfpnhmt.js → chunk-zc1mk10n.js} +19 -19
- package/web/{chunk-d11v5s7w.js → chunk-zqht0jzx.js} +6 -6
- package/web/{chunk-pz9ps2jm.js → chunk-zz397b0v.js} +12 -12
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-06hdzq5n.js +0 -2
- package/chunk-5dfbezv9.js +0 -2
- package/chunk-5x1sankd.js +0 -3753
- package/chunk-71h08f4g.js +0 -2
- package/chunk-7nzhdrv9.js +0 -2
- package/chunk-7q51n619.js +0 -2
- package/chunk-9mmz6wt3.js +0 -2
- package/chunk-bpw6q7g0.js +0 -3
- package/chunk-fvn32nzj.js +0 -478
- package/chunk-n6e43rvk.js +0 -3
- package/chunk-ry0z4ev6.js +0 -2
- package/chunk-vkpvcxjr.js +0 -2
- package/web/chunk-0rmkpsgp.js +0 -1
- package/web/chunk-0s80zw00.js +0 -1
- package/web/chunk-0xkyryrq.js +0 -1
- package/web/chunk-2s0bmrkv.js +0 -39
- package/web/chunk-2z1rwr28.js +0 -2
- package/web/chunk-344bq59c.js +0 -89
- package/web/chunk-3t0211rw.js +0 -1
- package/web/chunk-44rmrmcn.js +0 -1
- package/web/chunk-4bzqrwr0.js +0 -1139
- package/web/chunk-4jmazh6x.js +0 -370
- package/web/chunk-4re74xwm.js +0 -140
- package/web/chunk-4rm1vy7w.js +0 -1
- package/web/chunk-59kqahb3.js +0 -1
- package/web/chunk-5qtyq3ce.js +0 -292
- package/web/chunk-5z4jcqct.js +0 -200
- package/web/chunk-5z6x2n5h.js +0 -1
- package/web/chunk-6beqrmtq.js +0 -1
- package/web/chunk-6f5ke0x9.js +0 -1
- package/web/chunk-6xaqxcq8.js +0 -1
- package/web/chunk-7q6wvv2x.js +0 -1
- package/web/chunk-7qsa4p8h.js +0 -1
- package/web/chunk-8nja0ygy.js +0 -1
- package/web/chunk-8y64fkpz.js +0 -24
- package/web/chunk-9ad7v7bm.js +0 -8
- package/web/chunk-9dzxv335.js +0 -4
- package/web/chunk-a497tykb.js +0 -70
- package/web/chunk-b6k9w215.js +0 -2
- package/web/chunk-cjfssg3m.js +0 -2
- package/web/chunk-cqp1d4p0.js +0 -1
- package/web/chunk-dy2gm1fs.js +0 -1
- package/web/chunk-e0zre35a.js +0 -1
- package/web/chunk-e9twvs9n.js +0 -3
- package/web/chunk-f2kgtyfp.js +0 -1
- package/web/chunk-f8bn5tzf.js +0 -1
- package/web/chunk-f91wzwtk.js +0 -1
- package/web/chunk-fdp9bsj7.js +0 -1
- package/web/chunk-g1ev11wx.js +0 -1
- package/web/chunk-gmzqdm7v.js +0 -1
- package/web/chunk-hfaffkrh.js +0 -1
- package/web/chunk-j2vt8c8v.js +0 -1
- package/web/chunk-ka3q31t1.js +0 -1
- package/web/chunk-khxcn8tt.js +0 -106
- package/web/chunk-kqqmp1am.js +0 -1
- package/web/chunk-m2d1sp30.js +0 -1
- package/web/chunk-nbgqbxcy.js +0 -1
- package/web/chunk-ncpnpe9w.js +0 -99
- package/web/chunk-ne0v8mfb.js +0 -2
- package/web/chunk-ngx2cp8x.js +0 -2
- package/web/chunk-nxcgf7ec.js +0 -1
- package/web/chunk-p0kvmf28.js +0 -2
- package/web/chunk-p3k7m5nr.js +0 -1
- package/web/chunk-pggaffrh.js +0 -169
- package/web/chunk-pxe3vna4.js +0 -1
- package/web/chunk-qh15dxav.css +0 -1
- package/web/chunk-qpmbxhh6.js +0 -1
- package/web/chunk-r0rctnxz.js +0 -1
- package/web/chunk-rn3dnqm8.js +0 -1
- package/web/chunk-rtf2zzzv.js +0 -1
- package/web/chunk-srrfphes.js +0 -1
- package/web/chunk-tdr6x2xc.js +0 -1
- package/web/chunk-tncvg1nn.js +0 -1
- package/web/chunk-vyp0ns1f.js +0 -2
- package/web/chunk-wvdehm9y.js +0 -303
- package/web/chunk-x7ahcpj7.js +0 -1
- package/web/chunk-y38bf0wm.js +0 -1
- package/web/chunk-y56aaba5.js +0 -2
- package/web/chunk-ye58t45p.js +0 -4
- package/web/chunk-z1h20s8c.js +0 -78
- package/web/chunk-zj4q9jth.js +0 -36
- package/web/chunk-zj5k94dk.js +0 -40
- package/web/chunk-zqch0sc8.js +0 -30
- package/web/install.ps1 +0 -91
- package/web/install.sh +0 -177
package/chunk-n6e43rvk.js
DELETED
package/chunk-ry0z4ev6.js
DELETED
package/chunk-vkpvcxjr.js
DELETED
package/web/chunk-0rmkpsgp.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P,a,t,n,Ee,Lt,q,pe,Zi}from"./chunk-4bzqrwr0.js";function T(s){let i=P(Ee);i?.useTheme?.();let e=s.payload,[o,m]=a(!1);if(!e||e.state==="pending")return null;let h=e.questions.map((r)=>r.header).join(" · "),l=e.state==="answered",u=l?q:Lt,d=l?"text-success":"text-faint",f=l?"已回答":e.state==="dismissed"?"已忽略提问":"提问已取消",p=l?g(e):h;if(i){let{Collapsible:r,CollapsibleTrigger:y,CollapsibleContent:N,Chevron:v,cn:b}=i;return n(r,{open:o,onOpenChange:m,className:"w-full text-xs text-ink/90 animate-fade",children:[n(y,{className:i.style("chat.timelineRow","cursor-pointer select-none"),children:[t("span",{className:"flex size-4 shrink-0 items-center justify-center",children:t(u,{className:b("size-3.5",d)})}),t("span",{className:"shrink-0",children:f}),t("span",{className:"min-w-0 flex-1 truncate opacity-80",title:p,children:p}),t(v,{className:"size-3.5 shrink-0 text-faint opacity-0 transition-opacity group-hover/collapsible:opacity-100 group-data-[state=open]/collapsible:opacity-100"})]}),t(N,{children:t("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px]",children:t(x,{question:e})})})]})}return n("div",{role:"status",className:"w-full animate-fade",children:[n("button",{type:"button","aria-expanded":o,className:"group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-lg px-2 py-1 text-left text-[12.5px] text-faint transition-colors select-none hover:bg-raised/60 hover:text-dim",onClick:()=>m((r)=>!r),children:[t("span",{className:"flex size-4 shrink-0 items-center justify-center",children:t(u,{className:`size-3.5 shrink-0 ${d}`})}),t("span",{className:"shrink-0",children:f}),t("span",{className:"min-w-0 flex-1 truncate opacity-80",title:p,children:p}),t(pe,{className:`size-3.5 shrink-0 text-faint opacity-0 transition-[opacity,transform] group-hover:opacity-100 ${o?"rotate-180 opacity-100":""}`})]}),o&&t("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px]",children:t(x,{question:e})})]})}function c(s){if(!s)return"未作答";let i=s.selected.map((e)=>Zi(e).title);if(s.other)i.push(`其他:${s.other}`);return i.length?i.join("、"):"未作答"}function g(s){if(s.questions.length===1)return`${s.questions[0]?.header??""} · ${c(s.answers?.[0])}`;return s.questions.map((i,e)=>`${i.header} → ${c(s.answers?.[e])}`).join(";")}function x(s){let i=s.question;return t("div",{className:"space-y-2 text-xs",children:i.questions.map((e,o)=>n("div",{className:"space-y-0.5",children:[n("div",{className:"text-dim",children:[t("span",{className:"font-medium text-ink/90",children:e.header})," · ",e.question]}),t("div",{className:"text-ink",children:c(i.answers?.[o])})]},e.header))})}export{T as QuestionCard};
|
package/web/chunk-0s80zw00.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Kn}from"./chunk-54thej0t.js";export{Kn as default};
|
package/web/chunk-0xkyryrq.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e,r}from"./chunk-wvdehm9y.js";import{K,It,Rt}from"./chunk-344bq59c.js";import{W}from"./chunk-y56aaba5.js";import{or,_t}from"./chunk-aqfpnhmt.js";var i=or().RailroadPeg.parser.LangiumParser,s=e((t)=>{let a=t.alternatives.map(l);if(a.length===1)return a[0];return{type:"choice",alternatives:a}},"transformOrderedChoice"),l=e((t)=>{let a=t.elements.map(m);if(a.length===1)return a[0];return{type:"sequence",elements:a}},"transformSequence"),m=e((t)=>{let a=p(t.suffix);if(!t.operator)return a;return{type:"special",text:t.operator==="&"?`&${o(a)}`:`!${o(a)}`}},"transformPrefix"),o=e((t)=>{switch(t.type){case"terminal":return`"${t.value}"`;case"nonterminal":return t.name;case"special":return t.text;default:return"(...)"}},"nodeToLabel"),p=e((t)=>{let a=u(t.primary);if(!t.operator)return a;switch(t.operator){case"?":return{type:"optional",element:a};case"*":return{type:"repetition",element:a,min:0,max:1/0};case"+":return{type:"repetition",element:a,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${t.operator}`)}},"transformSuffix"),u=e((t)=>{switch(t.$type){case"PegLiteral":return{type:"terminal",value:t.value};case"PegIdentifier":return{type:"nonterminal",name:t.name};case"PegGroup":return s(t.element);case"PegAny":return{type:"special",text:t.dot};default:throw Error(`Unsupported PEG primary node: ${t.$type}`)}},"transformPrimary"),c=e((t)=>({name:t.name,definition:s(t.definition)}),"transformRule"),f=e((t)=>{if(W(t,K),t.title)K.setTitle(t.title);t.rules.map((a)=>K.addRule(c(a)))},"populateDb"),d={parse:e((t)=>{K.clear(),r.debug("[PEG Parser] Starting Langium parse");let a=i.parse(t);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new _t(a);let n=a.value;r.debug("[PEG Parser] Parsed rules:",n.rules.length),f(n),r.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:K}},w={parser:d,db:K,renderer:Rt,styles:It};export{w as diagram};
|
package/web/chunk-2s0bmrkv.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import{W}from"./chunk-y56aaba5.js";import{e,r,D,B,C,S,E,T,A,I,L,s,J,Un,Gr,V,Ge,U}from"./chunk-wvdehm9y.js";import{X}from"./chunk-aqfpnhmt.js";import{bt}from"./chunk-b6k9w215.js";import{Xe}from"./chunk-n8sky2q6.js";function at(t,o){return o<t?-1:o>t?1:o>=t?0:NaN}function nt(t){return t}function it(){var t=nt,o=at,k=null,H=J(0),g=J(Un),h=J(0);function l(a){var i,u=(a=Gr(a)).length,m,z,O=0,v=Array(u),c=Array(u),F=+H.apply(this,arguments),_=Math.min(Un,Math.max(-Un,g.apply(this,arguments)-F)),N,Z=Math.min(Math.abs(_)/u,h.apply(this,arguments)),p=Z*(_<0?-1:1),M;for(i=0;i<u;++i)if((M=c[v[i]=i]=+t(a[i],i,a))>0)O+=M;if(o!=null)v.sort(function(G,x){return o(c[G],c[x])});else if(k!=null)v.sort(function(G,x){return k(a[G],a[x])});for(i=0,z=O?(_-u*p)/O:0;i<u;++i,F=N)m=v[i],M=c[m],N=F+(M>0?M*z:0)+p,c[m]={data:a[m],index:i,value:M,startAngle:F,endAngle:N,padAngle:Z};return c}return l.value=function(a){return arguments.length?(t=typeof a==="function"?a:J(+a),l):t},l.sortValues=function(a){return arguments.length?(o=a,k=null,l):o},l.sort=function(a){return arguments.length?(k=a,o=null,l):k},l.startAngle=function(a){return arguments.length?(H=typeof a==="function"?a:J(+a),l):H},l.endAngle=function(a){return arguments.length?(g=typeof a==="function"?a:J(+a),l):g},l.padAngle=function(a){return arguments.length?(h=typeof a==="function"?a:J(+a),l):h},l}var dt=D.pie,ot={sections:new Map,showData:!1,config:dt},{sections:Q,showData:lt}=ot,St=structuredClone(dt),yt=e(()=>structuredClone(St),"getConfig"),wt=e(()=>{Q=new Map,lt=ot.showData,C()},"clear"),At=e(({label:t,value:o})=>{if(o<0)throw Error(`"${t}" has invalid value: ${o}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);if(!Q.has(t))Q.set(t,o),r.debug(`added new section: ${t}, with value: ${o}`)},"addSection"),Ct=e(()=>Q,"getSections"),$t=e((t)=>{lt=t},"setShowData"),Dt=e(()=>lt,"getShowData"),pt={getConfig:yt,clear:wt,setDiagramTitle:I,getDiagramTitle:L,setAccTitle:S,getAccTitle:E,setAccDescription:T,getAccDescription:A,addSection:At,getSections:Ct,setShowData:$t,getShowData:Dt},Tt=e((t,o)=>{W(t,o),o.setShowData(t.showData),t.sections.map(o.addSection)},"populateDb"),kt={parse:e(async(t)=>{let o=await X("pie",t);r.debug(o),Tt(o,pt)},"parse")},zt=e((t)=>`
|
|
2
|
-
.pieCircle{
|
|
3
|
-
stroke: ${t.pieStrokeColor};
|
|
4
|
-
stroke-width : ${t.pieStrokeWidth};
|
|
5
|
-
opacity : ${t.pieOpacity};
|
|
6
|
-
}
|
|
7
|
-
.pieCircle.highlighted{
|
|
8
|
-
scale: 1.05;
|
|
9
|
-
opacity: 1;
|
|
10
|
-
}
|
|
11
|
-
.pieCircle.highlightedOnHover:hover{
|
|
12
|
-
transition-duration: 250ms;
|
|
13
|
-
scale: 1.05;
|
|
14
|
-
opacity: 1;
|
|
15
|
-
}
|
|
16
|
-
.pieOuterCircle{
|
|
17
|
-
stroke: ${t.pieOuterStrokeColor};
|
|
18
|
-
stroke-width: ${t.pieOuterStrokeWidth};
|
|
19
|
-
fill: none;
|
|
20
|
-
}
|
|
21
|
-
.pieTitleText {
|
|
22
|
-
text-anchor: middle;
|
|
23
|
-
font-size: ${t.pieTitleTextSize};
|
|
24
|
-
fill: ${t.pieTitleTextColor};
|
|
25
|
-
font-family: ${t.fontFamily};
|
|
26
|
-
}
|
|
27
|
-
.slice {
|
|
28
|
-
font-family: ${t.fontFamily};
|
|
29
|
-
fill: ${t.pieSectionTextColor};
|
|
30
|
-
font-size:${t.pieSectionTextSize};
|
|
31
|
-
// fill: white;
|
|
32
|
-
}
|
|
33
|
-
.legend text {
|
|
34
|
-
fill: ${t.pieLegendTextColor};
|
|
35
|
-
font-family: ${t.fontFamily};
|
|
36
|
-
font-size: ${t.pieLegendTextSize};
|
|
37
|
-
}
|
|
38
|
-
`,"getStyles"),Et=zt,Mt=e((t)=>{let o=[...t.values()].reduce((g,h)=>g+h,0),k=[...t.entries()].map(([g,h])=>({label:g,value:h})).filter((g)=>g.value/o*100>=1);return it().value((g)=>g.value).sort(null)(k)},"createPieArcs"),Rt=e((t,o,k,H)=>{r.debug(`rendering pie chart
|
|
39
|
-
`+t);let g=H.db,h=s(),l=U(g.getConfig(),h.pie),a=40,i=18,u=4,m=450,z=m,O=V(o),v=O.append("g");v.attr("transform","translate("+z/2+","+m/2+")");let{themeVariables:c}=h,[F]=Ge(c.pieOuterStrokeWidth);F??=2;let{legendPosition:_,textPosition:N}=l,Z=l.donutHole>0&&l.donutHole<=0.9?l.donutHole:0,p=Math.min(z,m)/2-a,M=bt().innerRadius(Z*p).outerRadius(p),G=bt().innerRadius(p*N).outerRadius(p*N),x=v.append("g");x.append("circle").attr("cx",0).attr("cy",0).attr("r",p+F/2).attr("class","pieOuterCircle");let q=g.getSections(),ft=Mt(q),ht=[c.pie1,c.pie2,c.pie3,c.pie4,c.pie5,c.pie6,c.pie7,c.pie8,c.pie9,c.pie10,c.pie11,c.pie12],Y=0;q.forEach((n)=>{Y+=n});let st=ft.filter((n)=>(n.data.value/Y*100).toFixed(0)!=="0"),tt=Xe(ht).domain([...q.keys()]);x.selectAll("mySlices").data(st).enter().append("path").attr("d",M).attr("fill",(n)=>tt(n.data.label)).attr("class",(n)=>{let d="pieCircle";if(l.highlightSlice==="hover")d+=" highlightedOnHover";else if(l.highlightSlice===n.data.label)d+=" highlighted";return d}),x.selectAll("mySlices").data(st).enter().append("text").text((n)=>(n.data.value/Y*100).toFixed(0)+"%").attr("transform",(n)=>"translate("+G.centroid(n)+")").style("text-anchor","middle").attr("class","slice");let mt=v.append("text").text(g.getDiagramTitle()).attr("x",0).attr("y",-(m-50)/2).attr("class","pieTitleText"),j=[...q.entries()].map(([n,d])=>({label:n,value:d})),R=v.selectAll(".legend").data(j).enter().append("g").attr("class","legend");R.append("rect").attr("width",i).attr("height",i).style("fill",(n)=>tt(n.label)).style("stroke",(n)=>tt(n.label)),R.append("text").attr("x",i+u).attr("y",i-u).text((n)=>{if(g.getShowData())return`${n.label} [${n.value}]`;return n.label});let P=Math.max(...R.selectAll("text").nodes().map((n)=>n?.getBoundingClientRect().width??0)),K=m,et=z+a,f=i+u,rt=j.length*f;switch(_){case"center":R.attr("transform",(n,d)=>{let y=f*j.length/2,w=-P/2-(i+u),b=d*f-y;return"translate("+w+","+b+")"});break;case"top":K+=rt,R.attr("transform",(n,d)=>{let y=p,w=-P/2-(i+u),b=d*f-y;return`translate(${w}, ${b})`}),x.attr("transform",()=>`translate(0, ${rt+f})`);break;case"bottom":K+=rt,R.attr("transform",(n,d)=>{let y=-p-f,w=-P/2-(i+u),b=d*f-y;return"translate("+w+","+b+")"});break;case"left":et+=i+u+P,R.attr("transform",(n,d)=>{let y=f*j.length/2,w=-p-(i+u),b=d*f-y;return"translate("+w+","+b+")"}),x.attr("transform",()=>`translate(${P+i+u}, 0)`);break;case"right":default:et+=i+u+P,R.attr("transform",(n,d)=>{let y=f*j.length/2,w=12*i,b=d*f-y;return"translate("+w+","+b+")"});break}let ct=mt.node()?.getBoundingClientRect().width??0,vt=z/2-ct/2,xt=z/2+ct/2,ut=Math.min(0,vt),gt=Math.max(et,xt)-ut;O.attr("viewBox",`${ut} 0 ${gt} ${K}`),B(O,K,gt,l.useMaxWidth)},"draw"),Lt={draw:Rt},Kt={parser:kt,db:pt,renderer:Lt,styles:Et};export{Kt as diagram};
|
package/web/chunk-2z1rwr28.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e,r,B,V}from"./chunk-wvdehm9y.js";import{X}from"./chunk-aqfpnhmt.js";var i={parse:e(async(t)=>{let a=await X("info",t);r.debug(a)},"parse")},s={version:"12.2.0"},p=e(()=>s.version,"getVersion"),g={getVersion:p},m=e((t,a,n)=>{r.debug(`rendering info diagram
|
|
2
|
-
`+t);let o=V(a);B(o,100,400,!0),o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),v={draw:m},y={parser:i,db:g,renderer:v};export{y as diagram};
|
package/web/chunk-344bq59c.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import{e,r,we,b,O,B,C,s,V}from"./chunk-wvdehm9y.js";var M="",D="",E="",W=[],N=new Map,S=e((t)=>O(t,s()),"sanitizeText"),R=e((t)=>{switch(t.type){case"terminal":return{...t,value:S(t.value)};case"nonterminal":return{...t,name:S(t.name)};case"sequence":return{...t,elements:t.elements.map(R)};case"choice":return{...t,alternatives:t.alternatives.map(R)};case"optional":return{...t,element:R(t.element)};case"repetition":return{...t,element:R(t.element),separator:t.separator?R(t.separator):void 0};case"special":return{...t,text:S(t.text)}}},"sanitizeAstNode"),G=e(()=>{M="",D="",E="",W.length=0,N.clear(),C(),r.debug("[Railroad] Database cleared")},"clear"),L=e((t)=>{M=S(t),r.debug("[Railroad] Title set:",t)},"setTitle"),I=e(()=>M,"getTitle"),U=e((t)=>{let a={...t,name:S(t.name),definition:R(t.definition),comment:t.comment?S(t.comment):void 0};if(r.debug("[Railroad] Adding rule:",a.name),N.has(a.name))r.warn(`[Railroad] Rule '${a.name}' is already defined. Overwriting.`);W.push(a),N.set(a.name,a)},"addRule"),j=e(()=>W,"getRules"),J=e((t)=>N.get(t),"getRule"),Q=e((t)=>{D=S(t).replace(/^\s+/g,""),r.debug("[Railroad] Accessibility title set:",t)},"setAccTitle"),Z=e(()=>D,"getAccTitle"),ee=e((t)=>{E=S(t).replace(/\n\s+/g,`
|
|
2
|
-
`),r.debug("[Railroad] Accessibility description set:",t)},"setAccDescription"),te=e(()=>E,"getAccDescription"),re=L,ie=I,K={clear:G,setTitle:L,getTitle:I,addRule:U,getRules:j,getRule:J,setAccTitle:Q,getAccTitle:Z,setAccDescription:ee,getAccDescription:te,setDiagramTitle:re,getDiagramTitle:ie},T={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),X=e((t)=>{if(!t)return!1;return Object.keys(t).every((a)=>a==="railroad"||oe.has(a))},"isRailroadStyleOptions"),le=e((t)=>{if(!t)return{};if("railroad"in t&&t.railroad)return t.railroad;return X(t)?t:{}},"extractRailroadOverrides"),se=e((t)=>{if(!t||X(t))return{};let{railroad:a,svgId:l,theme:n,look:i,...o}=t;return o},"extractThemeOverrides"),u=e((t,a)=>{if(typeof t!=="string")return a;let l=t.trim();return ne.test(l)?l:a},"sanitizeColorValue"),H=e((t,a)=>{if(typeof t!=="string")return a;let l=t.trim();return ae.test(l)?l:a},"sanitizeFontFamilyValue"),y=e((t,a)=>{let l=typeof t==="number"?t:typeof t==="string"?Number.parseFloat(t):Number.NaN;return Number.isFinite(l)&&l>=0?l:a},"sanitizeNumberValue"),de=e((t)=>{let a=typeof t==="number"?t:typeof t==="string"?Number.parseFloat(t):Number.NaN;return Number.isFinite(a)&&a>0?a:void 0},"parseThemeFontSize"),ce=e((t)=>{let a=H(t.fontFamily,T.fontFamily),l=de(t.fontSize)??T.fontSize;return{...T,fontFamily:a,fontSize:l,terminalFill:u(t.secondBkg??t.secondaryColor,T.terminalFill),terminalStroke:u(t.secondaryBorderColor??t.lineColor,T.terminalStroke),terminalTextColor:u(t.secondaryTextColor??t.textColor,T.terminalTextColor),nonTerminalFill:u(t.mainBkg??t.background,T.nonTerminalFill),nonTerminalStroke:u(t.primaryBorderColor??t.lineColor,T.nonTerminalStroke),nonTerminalTextColor:u(t.primaryTextColor??t.textColor,T.nonTerminalTextColor),lineColor:u(t.lineColor,T.lineColor),markerFill:u(t.lineColor,T.markerFill),commentFill:u(t.labelBackground??t.tertiaryColor,T.commentFill),commentStroke:u(t.tertiaryBorderColor??t.lineColor,T.commentStroke),commentTextColor:u(t.tertiaryTextColor??t.textColor,T.commentTextColor),specialFill:u(t.tertiaryColor??t.secondaryColor,T.specialFill),specialStroke:u(t.tertiaryBorderColor??t.secondaryBorderColor,T.specialStroke),ruleNameColor:u(t.titleColor??t.textColor,T.ruleNameColor)}},"buildThemeDefaults"),_=e((t)=>{let a=b(),l={...we(),...a.themeVariables??{},...se(t)},n=ce(l),i={...a.railroad??{},...le(t)};return{compactMode:i.compactMode??n.compactMode,padding:y(i.padding,n.padding),verticalSeparation:y(i.verticalSeparation,n.verticalSeparation),horizontalSeparation:y(i.horizontalSeparation,n.horizontalSeparation),arcRadius:y(i.arcRadius,n.arcRadius),fontSize:y(i.fontSize,n.fontSize),fontFamily:H(i.fontFamily,n.fontFamily),terminalFill:u(i.terminalFill,n.terminalFill),terminalStroke:u(i.terminalStroke,n.terminalStroke),terminalTextColor:u(i.terminalTextColor,n.terminalTextColor),nonTerminalFill:u(i.nonTerminalFill,n.nonTerminalFill),nonTerminalStroke:u(i.nonTerminalStroke,n.nonTerminalStroke),nonTerminalTextColor:u(i.nonTerminalTextColor,n.nonTerminalTextColor),lineColor:u(i.lineColor,n.lineColor),strokeWidth:y(i.strokeWidth,n.strokeWidth),markerFill:u(i.markerFill,n.markerFill),commentFill:u(i.commentFill,n.commentFill),commentStroke:u(i.commentStroke,n.commentStroke),commentTextColor:u(i.commentTextColor,n.commentTextColor),specialFill:u(i.specialFill,n.specialFill),specialStroke:u(i.specialStroke,n.specialStroke),ruleNameColor:u(i.ruleNameColor,n.ruleNameColor),showMarkers:i.showMarkers??n.showMarkers,markerRadius:y(i.markerRadius,n.markerRadius)}},"buildRailroadStyleOptions"),It=e((t)=>{let{fontFamily:a,fontSize:l,terminalFill:n,terminalStroke:i,terminalTextColor:o,nonTerminalFill:g,nonTerminalStroke:m,nonTerminalTextColor:d,lineColor:f,strokeWidth:p,markerFill:h,commentFill:k,commentStroke:c,commentTextColor:x,specialFill:z,specialStroke:F,ruleNameColor:v}=_(t);return`
|
|
3
|
-
.railroad-diagram {
|
|
4
|
-
font-family: ${a};
|
|
5
|
-
font-size: ${l}px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.railroad-terminal rect {
|
|
9
|
-
fill: ${n};
|
|
10
|
-
stroke: ${i};
|
|
11
|
-
stroke-width: ${p}px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.railroad-terminal text {
|
|
15
|
-
fill: ${o};
|
|
16
|
-
font-family: ${a};
|
|
17
|
-
font-size: ${l}px;
|
|
18
|
-
text-anchor: middle;
|
|
19
|
-
dominant-baseline: middle;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.railroad-nonterminal rect {
|
|
23
|
-
fill: ${g};
|
|
24
|
-
stroke: ${m};
|
|
25
|
-
stroke-width: ${p}px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.railroad-nonterminal text {
|
|
29
|
-
fill: ${d};
|
|
30
|
-
font-family: ${a};
|
|
31
|
-
font-size: ${l}px;
|
|
32
|
-
text-anchor: middle;
|
|
33
|
-
dominant-baseline: middle;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.railroad-line {
|
|
37
|
-
stroke: ${f};
|
|
38
|
-
stroke-width: ${p}px;
|
|
39
|
-
fill: none;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.railroad-start circle,
|
|
43
|
-
.railroad-end circle {
|
|
44
|
-
fill: ${h};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.railroad-comment ellipse {
|
|
48
|
-
fill: ${k};
|
|
49
|
-
stroke: ${c};
|
|
50
|
-
stroke-width: ${p}px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.railroad-comment text {
|
|
54
|
-
fill: ${x};
|
|
55
|
-
font-style: italic;
|
|
56
|
-
font-family: ${a};
|
|
57
|
-
font-size: ${l}px;
|
|
58
|
-
text-anchor: middle;
|
|
59
|
-
dominant-baseline: middle;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.railroad-special rect {
|
|
63
|
-
fill: ${z};
|
|
64
|
-
stroke: ${F};
|
|
65
|
-
stroke-width: ${p}px;
|
|
66
|
-
stroke-dasharray: 5,3;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.railroad-special text {
|
|
70
|
-
fill: ${d};
|
|
71
|
-
font-family: ${a};
|
|
72
|
-
font-size: ${l}px;
|
|
73
|
-
text-anchor: middle;
|
|
74
|
-
dominant-baseline: middle;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.railroad-rule-name {
|
|
78
|
-
font-weight: bold;
|
|
79
|
-
fill: ${v};
|
|
80
|
-
font-family: ${a};
|
|
81
|
-
font-size: ${l}px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.railroad-group {
|
|
85
|
-
/* Grouping container, no specific styles */
|
|
86
|
-
}
|
|
87
|
-
`},"getStyles"),w=class{constructor(){this.d=""}static{e(this,"PathBuilder")}moveTo(t,a){return this.d+=`M ${t} ${a} `,this}lineTo(t,a){return this.d+=`L ${t} ${a} `,this}horizontalTo(t){return this.d+=`H ${t} `,this}verticalTo(t){return this.d+=`V ${t} `,this}arcTo(t,a,l,n,i,o,g){return this.d+=`A ${t} ${a} ${l} ${n?1:0} ${i?1:0} ${o} ${g} `,this}build(){return this.d.trim()}},me=class{constructor(t,a=_()){this.textCache=new Map,this.svg=t,this.config=a}static{e(this,"RailroadRenderer")}measureText(t){if(this.textCache.has(t))return this.textCache.get(t);let a=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(t),l=a.node().getBBox(),n={width:l.width,height:l.height};return a.remove(),this.textCache.set(t,n),n}renderTerminal(t,a){let l=this.measureText(a),n=l.width+this.config.padding*2,i=l.height+this.config.padding*2,o=t.append("g").attr("class","railroad-terminal");return o.append("rect").attr("x",0).attr("y",0).attr("width",n).attr("height",i).attr("rx",10).attr("ry",10),o.append("text").attr("x",n/2).attr("y",i/2).text(a),{element:o.node(),dimensions:{width:n,height:i,up:i/2,down:i/2}}}renderNonTerminal(t,a){let l=this.measureText(a),n=l.width+this.config.padding*2,i=l.height+this.config.padding*2,o=t.append("g").attr("class","railroad-nonterminal");return o.append("rect").attr("x",0).attr("y",0).attr("width",n).attr("height",i),o.append("text").attr("x",n/2).attr("y",i/2).text(a),{element:o.node(),dimensions:{width:n,height:i,up:i/2,down:i/2}}}renderSequence(t,a){let l=a.map((d)=>this.renderExpression(t,d)),n=0,i=0,o=0;for(let d of l)n+=d.dimensions.width,i=Math.max(i,d.dimensions.up),o=Math.max(o,d.dimensions.down);n+=(l.length-1)*this.config.horizontalSeparation;let g=t.append("g").attr("class","railroad-sequence"),m=0;for(let d=0;d<l.length;d++){let f=l[d],p=i-f.dimensions.up;if(g.node().appendChild(f.element).setAttribute("transform",`translate(${m}, ${p})`),d<l.length-1){let k=m+f.dimensions.width,c=k+this.config.horizontalSeparation,x=i;g.append("path").attr("class","railroad-line").attr("d",new w().moveTo(k,x).lineTo(c,x).build())}m+=f.dimensions.width+this.config.horizontalSeparation}return{element:g.node(),dimensions:{width:n,height:i+o,up:i,down:o}}}renderChoice(t,a){let l=a.map((h)=>this.renderExpression(t,h)),n=0,i=0;for(let h of l)n=Math.max(n,h.dimensions.width),i+=h.dimensions.height;i+=(l.length-1)*this.config.verticalSeparation;let o=this.config.arcRadius,g=o*4,m=n+g,d=t.append("g").attr("class","railroad-choice"),f=0,p=i/2;for(let h of l){let k=f,c=k+h.dimensions.up,x=o*2+(n-h.dimensions.width)/2;d.node().appendChild(h.element).setAttribute("transform",`translate(${x}, ${k})`);let F=new w,v=c>p;if(c===p)F.moveTo(0,p).lineTo(x,c);else F.moveTo(0,p).arcTo(o,o,0,!1,v,o,p+(v?o:-o)).lineTo(o,c-(v?o:-o)).arcTo(o,o,0,!1,!v,o*2,c).lineTo(x,c);d.append("path").attr("class","railroad-line").attr("d",F.build());let A=new w,Y=x+h.dimensions.width,q=m-o*2;if(c===p)A.moveTo(Y,c).lineTo(m,p);else A.moveTo(Y,c).lineTo(q,c).arcTo(o,o,0,!1,!v,m-o,c+(v?-o:o)).lineTo(m-o,p+(v?o:-o)).arcTo(o,o,0,!1,v,m,p);d.append("path").attr("class","railroad-line").attr("d",A.build()),f+=h.dimensions.height+this.config.verticalSeparation}return{element:d.node(),dimensions:{width:m,height:i,up:p,down:i-p}}}renderOptional(t,a){let l=this.renderExpression(t,a),n=this.config.arcRadius,i=n*2,o=l.dimensions.width+n*4,g=l.dimensions.height+i,m=t.append("g").attr("class","railroad-optional"),d=n*2,f=i;m.node().appendChild(l.element).setAttribute("transform",`translate(${d}, ${f})`);let h=f+l.dimensions.up,k=new w().moveTo(0,h).lineTo(n*2,h);m.append("path").attr("class","railroad-line").attr("d",k.build());let c=new w().moveTo(d+l.dimensions.width,h).lineTo(o,h);m.append("path").attr("class","railroad-line").attr("d",c.build());let x=new w().moveTo(0,h).arcTo(n,n,0,!1,!1,n,h-n).lineTo(n,n).arcTo(n,n,0,!1,!0,n*2,0).lineTo(o-n*2,0).arcTo(n,n,0,!1,!0,o-n,n).lineTo(o-n,h-n).arcTo(n,n,0,!1,!1,o,h);return m.append("path").attr("class","railroad-line").attr("d",x.build()),{element:m.node(),dimensions:{width:o,height:g,up:h,down:g-h}}}renderRepetition(t,a,l){let n=this.renderExpression(t,a),i=this.config.arcRadius,o=i*2,g=n.dimensions.width+i*4,m=l===0,d=n.dimensions.height+o+(m?o:0),f=t.append("g").attr("class","railroad-repetition"),p=i*2,h=m?o:0;f.node().appendChild(n.element).setAttribute("transform",`translate(${p}, ${h})`);let c=h+n.dimensions.up;f.append("path").attr("class","railroad-line").attr("d",new w().moveTo(0,c).lineTo(i*2,c).build()),f.append("path").attr("class","railroad-line").attr("d",new w().moveTo(p+n.dimensions.width,c).lineTo(g,c).build());let x=h+n.dimensions.height+i,z=new w().moveTo(p+n.dimensions.width,c).arcTo(i,i,0,!1,!0,p+n.dimensions.width+i,c+i).lineTo(p+n.dimensions.width+i,x).arcTo(i,i,0,!1,!0,p+n.dimensions.width,x+i).lineTo(i*2,x+i).arcTo(i,i,0,!1,!0,i,x).lineTo(i,c+i).arcTo(i,i,0,!1,!0,i*2,c);if(f.append("path").attr("class","railroad-line").attr("d",z.build()),m){let F=new w().moveTo(0,c).arcTo(i,i,0,!1,!1,i,c-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(g-i*2,0).arcTo(i,i,0,!1,!0,g-i,i).lineTo(g-i,c-i).arcTo(i,i,0,!1,!1,g,c);f.append("path").attr("class","railroad-line").attr("d",F.build())}return{element:f.node(),dimensions:{width:g,height:d,up:c,down:d-c}}}renderSpecial(t,a){let l=this.measureText("? "+a+" ?"),n=l.width+this.config.padding*2,i=l.height+this.config.padding*2,o=t.append("g").attr("class","railroad-special");return o.append("rect").attr("x",0).attr("y",0).attr("width",n).attr("height",i),o.append("text").attr("x",n/2).attr("y",i/2).text("? "+a+" ?"),{element:o.node(),dimensions:{width:n,height:i,up:i/2,down:i/2}}}renderExpression(t,a){switch(a.type){case"terminal":return this.renderTerminal(t,a.value);case"nonterminal":return this.renderNonTerminal(t,a.name);case"sequence":return this.renderSequence(t,a.elements);case"choice":return this.renderChoice(t,a.alternatives);case"optional":return this.renderOptional(t,a.element);case"repetition":return this.renderRepetition(t,a.element,a.min);case"special":return this.renderSpecial(t,a.text);default:throw Error(`Unknown node type: ${a.type}`)}}renderRule(t,a){let l=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${a})`),n=t.name+" =",i=this.measureText(n).width+20,o=i+20,g=l.append("g"),m=this.renderExpression(g,t.definition),d=Math.max(20,m.dimensions.up),f=d-m.dimensions.up;return g.attr("transform",`translate(${o}, ${f})`),l.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",d).text(n),l.append("g").attr("class","railroad-start").append("circle").attr("cx",i).attr("cy",d).attr("r",this.config.markerRadius),l.append("g").attr("class","railroad-end").append("circle").attr("cx",o+m.dimensions.width+10).attr("cy",d).attr("r",this.config.markerRadius),l.append("path").attr("class","railroad-line").attr("d",new w().moveTo(i+this.config.markerRadius,d).lineTo(o,d).build()),l.append("path").attr("class","railroad-line").attr("d",new w().moveTo(o+m.dimensions.width,d).lineTo(o+m.dimensions.width+10-this.config.markerRadius,d).build()),{height:Math.max(40,f+m.dimensions.height+this.config.padding*2),width:o+m.dimensions.width+10+this.config.markerRadius}}renderDiagram(t){let a=this.config.padding,l=0;for(let n of t){let i=this.renderRule(n,a);a+=i.height+this.config.verticalSeparation,l=Math.max(l,i.width)}return{width:l+this.config.padding*2,height:a+this.config.padding}}},P=e((t,a,l)=>{B(t,a.height,a.width,l),t.attr("viewBox",`0 0 ${a.width} ${a.height}`)},"configureRailroadSvgSize"),he=e((t,a,l)=>{r.debug(`[Railroad] Rendering diagram
|
|
88
|
-
`+t);try{let n=V(a);n.attr("class","railroad-diagram");let o=b().railroad?.useMaxWidth??!0,g=K.getRules();if(r.debug(`[Railroad] Rendering ${g.length} rules`),g.length===0){r.warn("[Railroad] No rules to render"),P(n,{height:100,width:200},o);return}let d=new me(n,_()).renderDiagram(g);P(n,d,o),r.debug("[Railroad] Render complete")}catch(n){throw r.error("[Railroad] Render error:",n),n}},"draw"),Rt={draw:he};
|
|
89
|
-
export{K,It,Rt};
|
package/web/chunk-3t0211rw.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{rr}from"./chunk-aqfpnhmt.js";export{rr as createRailroadServices};
|
package/web/chunk-44rmrmcn.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{yi}from"./chunk-aqfpnhmt.js";export{yi as createWardleyServices};
|