@stacksjs/stx 0.2.876 → 0.2.880
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/{chunk-fdjx4vs3.js → chunk-00tq7ghn.js} +2 -2
- package/dist/{chunk-nv4c25zj.js → chunk-02qmvcmv.js} +3 -3
- package/dist/chunk-08cb7cyw.js +2 -0
- package/dist/chunk-0h1dyd38.js +2 -0
- package/dist/{chunk-2mt2zc5y.js → chunk-0m4c42qt.js} +10 -10
- package/dist/{chunk-x4jzhgdm.js → chunk-19k15mfc.js} +2 -2
- package/dist/chunk-1avy0p8v.js +2 -0
- package/dist/chunk-1jk46ve0.js +2 -0
- package/dist/chunk-1r612xxs.js +2 -0
- package/dist/chunk-1z6rrqvm.js +2 -0
- package/dist/chunk-2d68p12e.js +2 -0
- package/dist/chunk-2haf7t5h.js +2 -0
- package/dist/{chunk-1q5w3xav.js → chunk-2r0nrvqe.js} +2 -2
- package/dist/chunk-3jp5z1qj.js +2 -0
- package/dist/{chunk-dv56x3g8.js → chunk-3q0w0bzd.js} +10 -10
- package/dist/{chunk-eknm4jrm.js → chunk-3sema2js.js} +2 -2
- package/dist/{chunk-cj44e8mw.js → chunk-3wb82rxw.js} +5 -5
- package/dist/chunk-3zds0gmd.js +2 -0
- package/dist/{chunk-qnwd5bz4.js → chunk-463weehv.js} +1 -1
- package/dist/{chunk-wm029dh0.js → chunk-4fkcn6z5.js} +18 -12
- package/dist/{chunk-976kgb3r.js → chunk-4n45qa0b.js} +9 -9
- package/dist/chunk-4pjqj54a.js +2 -0
- package/dist/{chunk-j0rqa9bk.js → chunk-4r2rfdmr.js} +5 -5
- package/dist/{chunk-ft6em3wm.js → chunk-50cnypys.js} +6 -6
- package/dist/chunk-53cc06w7.js +2 -0
- package/dist/{chunk-y2e2zm6y.js → chunk-57q4nvs9.js} +3 -3
- package/dist/{chunk-3mz9bdf7.js → chunk-59er0fc7.js} +3 -3
- package/dist/{chunk-6kp4mg3h.js → chunk-5eftxrvv.js} +2 -2
- package/dist/chunk-5p3825qw.js +2 -0
- package/dist/chunk-5rd0an89.js +2 -0
- package/dist/{chunk-pk714ynv.js → chunk-69ezjc8k.js} +4 -4
- package/dist/{chunk-75v0yxeh.js → chunk-6c1vm6bs.js} +2 -2
- package/dist/{chunk-d3q0cg47.js → chunk-6df3j3qq.js} +3 -3
- package/dist/{chunk-kzc2tqzr.js → chunk-6t04tqvh.js} +2 -2
- package/dist/chunk-78zgmqhd.js +2 -0
- package/dist/chunk-7bsrnpmh.js +33 -0
- package/dist/chunk-7dq6ebvp.js +2 -0
- package/dist/chunk-7kqgp3p7.js +2 -0
- package/dist/{chunk-wzvdr4ta.js → chunk-7mcs59pr.js} +2 -2
- package/dist/chunk-83b9k17j.js +2 -0
- package/dist/chunk-86nsbxep.js +61 -0
- package/dist/{chunk-0g2mg8cw.js → chunk-8e1cv1hh.js} +3 -3
- package/dist/chunk-8h5nje66.js +2 -0
- package/dist/{chunk-ae8q4gze.js → chunk-8va3fs07.js} +5 -5
- package/dist/{chunk-fh72k2ks.js → chunk-93jhfbeg.js} +6 -6
- package/dist/{chunk-xmws1gaf.js → chunk-94ctmp0j.js} +2 -2
- package/dist/chunk-97kgrevs.js +4 -0
- package/dist/{chunk-nn6hvsxp.js → chunk-9cbf0seq.js} +2 -2
- package/dist/{chunk-mce3g2wb.js → chunk-9f31gs4m.js} +2 -2
- package/dist/chunk-9kza7gxd.js +2 -0
- package/dist/{chunk-b4d4tjvx.js → chunk-a0q0kb0s.js} +5 -5
- package/dist/chunk-a5gnxdfe.js +2 -0
- package/dist/chunk-a60ztvnp.js +3 -0
- package/dist/{chunk-s7fhpkvf.js → chunk-a7ryj8z8.js} +6 -6
- package/dist/{chunk-gqtb53s8.js → chunk-aaea157p.js} +2 -2
- package/dist/{chunk-wp0qpa50.js → chunk-agd2b928.js} +59 -27
- package/dist/chunk-aqxh80vh.js +2 -0
- package/dist/{chunk-2tcyfrvb.js → chunk-awp8a3t4.js} +2 -2
- package/dist/chunk-axra1yas.js +2 -0
- package/dist/chunk-az8b0726.js +21 -0
- package/dist/chunk-b7d3n4aw.js +2 -0
- package/dist/{chunk-r2bxjna3.js → chunk-c0g30cjs.js} +2 -2
- package/dist/{chunk-jt5tzddc.js → chunk-c73c0wf9.js} +2 -2
- package/dist/{chunk-3922g6sh.js → chunk-cad7e5q1.js} +9 -9
- package/dist/{chunk-bjjfr7qt.js → chunk-care745q.js} +2 -2
- package/dist/chunk-ce0zbpr5.js +2 -0
- package/dist/chunk-cjv89tnb.js +20 -0
- package/dist/chunk-cv1vm1w0.js +2 -0
- package/dist/{chunk-mw0rb1sf.js → chunk-czcx3nbx.js} +6 -6
- package/dist/chunk-d7b30bg6.js +2 -0
- package/dist/{chunk-stn7p7f1.js → chunk-dwyhpbpx.js} +2 -2
- package/dist/{chunk-y75bds1g.js → chunk-e362e615.js} +30 -30
- package/dist/{chunk-ydppkb8y.js → chunk-e41pgmgk.js} +2 -2
- package/dist/{chunk-ctjxcaxq.js → chunk-ec5q4nnw.js} +66 -66
- package/dist/{chunk-k0t9ye9j.js → chunk-egjmb32c.js} +126 -71
- package/dist/{chunk-g15reb1h.js → chunk-ew3vs3jq.js} +8 -8
- package/dist/{chunk-jqxerj6k.js → chunk-ezna4dhj.js} +2 -2
- package/dist/chunk-f3j1h3ch.js +2 -0
- package/dist/{chunk-mkwavsb3.js → chunk-f7znj9xg.js} +3 -3
- package/dist/chunk-fz4c5e9m.js +2 -0
- package/dist/{chunk-esjr9qhe.js → chunk-g2xy0z0e.js} +2 -2
- package/dist/{chunk-fwbccyhw.js → chunk-g83ph305.js} +2 -2
- package/dist/{chunk-kywe0f1v.js → chunk-gbncp2gp.js} +2 -2
- package/dist/chunk-gm67jt8p.js +2 -0
- package/dist/chunk-gmp10259.js +2 -0
- package/dist/{chunk-0sa9gqmc.js → chunk-h2tq6cbr.js} +11 -11
- package/dist/chunk-h3fv0q25.js +2 -0
- package/dist/{chunk-r09kz9bf.js → chunk-h63ma36g.js} +2 -2
- package/dist/chunk-hkx51atf.js +2 -0
- package/dist/{chunk-w8k9fz1w.js → chunk-hmntqqyd.js} +7 -7
- package/dist/{chunk-3w7gacva.js → chunk-hxhmhw23.js} +3 -3
- package/dist/chunk-jghpzx5m.js +2 -0
- package/dist/chunk-k206d3pn.js +2 -0
- package/dist/chunk-k40e0ete.js +4 -0
- package/dist/chunk-k6c5t9we.js +38 -0
- package/dist/{chunk-f4vgagjb.js → chunk-kee5a3ce.js} +3 -3
- package/dist/chunk-kn9tqjgv.js +25 -0
- package/dist/chunk-kna1bdm2.js +54 -0
- package/dist/{chunk-ttjscvre.js → chunk-mygsektn.js} +3 -3
- package/dist/chunk-nb6erf75.js +9 -0
- package/dist/chunk-ngzyzcrp.js +2 -0
- package/dist/{chunk-h17pfbng.js → chunk-nysbdr4r.js} +2 -2
- package/dist/chunk-p55a910x.js +1198 -0
- package/dist/chunk-p6hcrg3r.js +3 -0
- package/dist/chunk-p746twww.js +2 -0
- package/dist/chunk-pa2vt2ej.js +2 -0
- package/dist/chunk-pa6kgbmw.js +2 -0
- package/dist/{chunk-saqzk45g.js → chunk-pdprhg5k.js} +1 -1
- package/dist/chunk-pjjrx9pk.js +2 -0
- package/dist/{chunk-7rep2jqh.js → chunk-pm4rpc4a.js} +23 -23
- package/dist/chunk-pt3rp3zg.js +2 -0
- package/dist/{chunk-4517hny7.js → chunk-q1mb0fbt.js} +2 -2
- package/dist/{chunk-k1ew643q.js → chunk-q74affc4.js} +2 -2
- package/dist/chunk-qd9v1v8z.js +2 -0
- package/dist/chunk-qfwk93fk.js +2 -0
- package/dist/chunk-qg1kw5yf.js +2 -0
- package/dist/chunk-qn6y5ttj.js +2 -0
- package/dist/chunk-qxcc0aar.js +2 -0
- package/dist/{chunk-rzd9hyhv.js → chunk-ram5944w.js} +2 -2
- package/dist/{chunk-p5m1z6e1.js → chunk-rcxer2km.js} +4 -4
- package/dist/chunk-rdxph1tp.js +2 -0
- package/dist/chunk-rnrdngnn.js +2 -0
- package/dist/{chunk-x2ftkaz3.js → chunk-rsxxajv6.js} +2 -2
- package/dist/chunk-rw5sxr5a.js +2 -0
- package/dist/chunk-rzcdwybt.js +26 -0
- package/dist/chunk-s29hp1qw.js +14 -0
- package/dist/chunk-s7xywsqd.js +3 -0
- package/dist/{chunk-d6gqh2wv.js → chunk-satrf398.js} +1 -1
- package/dist/{chunk-zn6n075d.js → chunk-shcnt6aa.js} +3 -3
- package/dist/{chunk-ysfgabpf.js → chunk-sn4ndpd7.js} +3 -3
- package/dist/{chunk-zc8a2erc.js → chunk-ssg6ne5b.js} +4 -4
- package/dist/{chunk-afxfkb60.js → chunk-sv7fdqmc.js} +6 -6
- package/dist/chunk-swz0xprw.js +2 -0
- package/dist/chunk-t8r40wgf.js +2 -0
- package/dist/{chunk-dbvsa5ya.js → chunk-t94y8g35.js} +2 -2
- package/dist/{chunk-df6vjs3p.js → chunk-t9hxyvvc.js} +5 -5
- package/dist/{chunk-cvbwxskc.js → chunk-tgzs1kbj.js} +5 -5
- package/dist/chunk-tka73egx.js +2 -0
- package/dist/{chunk-xtaq95em.js → chunk-v1s838fe.js} +1 -1
- package/dist/chunk-v3747589.js +12 -0
- package/dist/chunk-v9h2bbhf.js +2 -0
- package/dist/chunk-v9mxhch2.js +2 -0
- package/dist/chunk-vm42j29z.js +2 -0
- package/dist/chunk-w2kdhm7k.js +2 -0
- package/dist/chunk-w5zzwe2f.js +2 -0
- package/dist/chunk-wbmx0rge.js +2 -0
- package/dist/chunk-wjafpvjv.js +2 -0
- package/dist/chunk-ws2h92mm.js +3 -0
- package/dist/chunk-ws9kr80x.js +2 -0
- package/dist/{chunk-zgds9nwv.js → chunk-xf0xacc9.js} +44 -44
- package/dist/chunk-xhr35ctb.js +2 -0
- package/dist/chunk-xmmr0916.js +2 -0
- package/dist/{chunk-yxdhz4ps.js → chunk-xpbakn6t.js} +2 -2
- package/dist/chunk-xz4v9tg1.js +3 -0
- package/dist/chunk-y7e61pz3.js +3 -0
- package/dist/{chunk-v0tdg16k.js → chunk-ybjgnnyf.js} +5 -5
- package/dist/chunk-yh2hnt3m.js +12 -0
- package/dist/{chunk-w6pzkcjp.js → chunk-ymqm898x.js} +2 -2
- package/dist/{chunk-2zaatnnh.js → chunk-yp4tn4zn.js} +4 -4
- package/dist/chunk-z7k1xn6k.js +2 -0
- package/dist/{chunk-vnkvnenn.js → chunk-z9ffr9gy.js} +7 -7
- package/dist/{chunk-nnp6rf4c.js → chunk-zch65qrd.js} +1 -1
- package/dist/{chunk-pbakxcv8.js → chunk-zek9t5za.js} +2 -2
- package/dist/cli.js +23 -23
- package/dist/client/signals-dom-ready-runtime.js +6 -0
- package/dist/client/signals-mount-runtime.js +1 -1
- package/dist/client-module-registry.js +10 -4
- package/dist/client-parameter-bindings.d.ts +5 -0
- package/dist/client-parameter-bindings.js +47 -6
- package/dist/client-script-bundler.js +4 -3
- package/dist/component-library.d.ts +1 -0
- package/dist/component-library.js +42 -14
- package/dist/composable-loader.js +19 -9
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/html-masking.d.ts +2 -0
- package/dist/html-masking.js +10 -0
- package/dist/inherited-context.d.ts +1 -1
- package/dist/inherited-context.js +43 -14
- package/dist/module-syntax.d.ts +2 -0
- package/dist/module-syntax.js +21 -0
- package/dist/native-component-context.js +42 -16
- package/dist/page-module-order.d.ts +10 -0
- package/dist/page-module-order.js +139 -0
- package/dist/process.js +6 -4
- package/dist/pwa.js +3 -3
- package/dist/script-attributes.d.ts +4 -0
- package/dist/script-attributes.js +10 -0
- package/dist/ssg.js +39 -39
- package/dist/strip-literals.d.ts +2 -0
- package/dist/strip-literals.js +12 -6
- package/dist/stx-virtual-ts.d.ts +1 -0
- package/dist/stx-virtual-ts.js +21 -27
- package/dist/typecheck.js +8 -0
- package/package.json +5 -5
- package/dist/chunk-027meh1k.js +0 -2
- package/dist/chunk-0hs633pt.js +0 -2
- package/dist/chunk-0j8zre1m.js +0 -2
- package/dist/chunk-0v02qms8.js +0 -2
- package/dist/chunk-0z9gttw0.js +0 -2
- package/dist/chunk-11dwmcpy.js +0 -3
- package/dist/chunk-1a237qky.js +0 -33
- package/dist/chunk-1ehjzhnc.js +0 -25
- package/dist/chunk-1gfg6qmr.js +0 -2
- package/dist/chunk-1kgnk6ds.js +0 -2
- package/dist/chunk-1ztp5vkh.js +0 -3
- package/dist/chunk-32wvc376.js +0 -2
- package/dist/chunk-3k2d2jsn.js +0 -2
- package/dist/chunk-3te2y9qf.js +0 -2
- package/dist/chunk-40330tm5.js +0 -2
- package/dist/chunk-447jc6zc.js +0 -2
- package/dist/chunk-4dk6k0ad.js +0 -2
- package/dist/chunk-4e48zkq0.js +0 -2
- package/dist/chunk-5ep7p8te.js +0 -2
- package/dist/chunk-5gx403te.js +0 -1184
- package/dist/chunk-6q9a5bph.js +0 -2
- package/dist/chunk-7ds9mx4c.js +0 -2
- package/dist/chunk-7njy024g.js +0 -2
- package/dist/chunk-7tjewwmd.js +0 -2
- package/dist/chunk-85xabvtj.js +0 -2
- package/dist/chunk-880f8j99.js +0 -2
- package/dist/chunk-8f3dbthj.js +0 -2
- package/dist/chunk-99e3mxnn.js +0 -20
- package/dist/chunk-9gv847nn.js +0 -2
- package/dist/chunk-9mz2n39m.js +0 -2
- package/dist/chunk-akthsg33.js +0 -54
- package/dist/chunk-b1tcym2x.js +0 -2
- package/dist/chunk-bdh73gxd.js +0 -4
- package/dist/chunk-bspj1rf1.js +0 -2
- package/dist/chunk-bx3hpsxn.js +0 -2
- package/dist/chunk-byq488g4.js +0 -2
- package/dist/chunk-c4s25bm2.js +0 -2
- package/dist/chunk-csjqtzwc.js +0 -2
- package/dist/chunk-df78j74w.js +0 -4
- package/dist/chunk-dgs3d367.js +0 -2
- package/dist/chunk-dmf6zcf4.js +0 -2
- package/dist/chunk-e2b2f502.js +0 -2
- package/dist/chunk-ec6mrad6.js +0 -2
- package/dist/chunk-eecctzgp.js +0 -17
- package/dist/chunk-fa57bncd.js +0 -2
- package/dist/chunk-g4eheg0t.js +0 -24
- package/dist/chunk-gfe1jrw9.js +0 -2
- package/dist/chunk-gn16yq49.js +0 -2
- package/dist/chunk-gvs61tqn.js +0 -2
- package/dist/chunk-h2928108.js +0 -2
- package/dist/chunk-hat353vx.js +0 -2
- package/dist/chunk-jmjgj3nh.js +0 -2
- package/dist/chunk-jqtpzzz4.js +0 -12
- package/dist/chunk-jvy7z3hz.js +0 -3
- package/dist/chunk-k9dne5by.js +0 -12
- package/dist/chunk-kq8mffgf.js +0 -2
- package/dist/chunk-kx06jzdw.js +0 -2
- package/dist/chunk-n5pvdrkb.js +0 -2
- package/dist/chunk-ne8q191s.js +0 -2
- package/dist/chunk-np8wgbsa.js +0 -3
- package/dist/chunk-nthw4dca.js +0 -2
- package/dist/chunk-pp99rmjm.js +0 -72
- package/dist/chunk-pqmjeea6.js +0 -2
- package/dist/chunk-qggwr60r.js +0 -2
- package/dist/chunk-qm3v4qb7.js +0 -2
- package/dist/chunk-qty0t69x.js +0 -2
- package/dist/chunk-rjv6885r.js +0 -2
- package/dist/chunk-rm5gbthk.js +0 -2
- package/dist/chunk-sgengtap.js +0 -2
- package/dist/chunk-snz2cxqv.js +0 -2
- package/dist/chunk-szp7ajfm.js +0 -33
- package/dist/chunk-ts37jw3s.js +0 -2
- package/dist/chunk-v4emesnw.js +0 -2
- package/dist/chunk-vnrbjbrw.js +0 -3
- package/dist/chunk-vxra53wq.js +0 -2
- package/dist/chunk-x76qvq1n.js +0 -2
- package/dist/chunk-x85z6dmw.js +0 -2
- package/dist/chunk-xkfe03y9.js +0 -2
- package/dist/chunk-y4hn1qh0.js +0 -2
- package/dist/chunk-yc8ggeh2.js +0 -2
- package/dist/chunk-yfed67yc.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{n,u}from"./chunk-86nsbxep.js";import{Ci,s,An,y}from"./chunk-p55a910x.js";import{pt}from"./chunk-agd2b928.js";import{js,Bs}from"./chunk-h2tq6cbr.js";import{qc,hi,Ds,Ls}from"./chunk-ssg6ne5b.js";import{Vc,Uc}from"./chunk-mygsektn.js";import{Ot}from"./chunk-ymqm898x.js";import{kn,Zc,$r,Rr}from"./chunk-s7xywsqd.js";import{b}from"./chunk-94mpe1ny.js";import{wo}from"./chunk-dwyhpbpx.js";import{c,f}from"./chunk-xpbakn6t.js";import Q from"fs";import V from"path";import{loadConfigWithResult as Kt}from"bunfig";var K={duration:300,delay:0,ease:"ease",direction:"both"};function it(e,t={}){let{duration:i,delay:o,ease:r,direction:l,custom:d}={...K,...t};if(e==="custom"&&d)return d;switch(e){case"fade":return`${l==="in"?"opacity: 0; animation: fadeIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"opacity: 1; animation: fadeOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"opacity: 1; transition: opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
|
|
3
3
|
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
|
4
4
|
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }`;case"slide":return`${l==="in"?"transform: translateY(20px); opacity: 0; animation: slideIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"transform: translateY(0); opacity: 1; animation: slideOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"transform: translateY(0); opacity: 1; transition: transform var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms), opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
|
|
5
5
|
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
|
|
@@ -9,7 +9,7 @@ import{t,u}from"./chunk-pp99rmjm.js";import{bi,s,Cn,y}from"./chunk-5gx403te.js";
|
|
|
9
9
|
@keyframes flipIn { from { transform: perspective(400px) rotateX(-90deg); opacity: 0; } to { transform: perspective(400px) rotateX(0); opacity: 1; } }
|
|
10
10
|
@keyframes flipOut { from { transform: perspective(400px) rotateX(0); opacity: 1; } to { transform: perspective(400px) rotateX(90deg); opacity: 0; } }`;case"rotate":return`${l==="in"?"transform: rotate(-90deg); opacity: 0; animation: rotateIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"transform: rotate(0); opacity: 1; animation: rotateOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"transform: rotate(0); opacity: 1; transition: transform var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms), opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
|
|
11
11
|
@keyframes rotateIn { from { transform: rotate(-90deg); opacity: 0; } to { transform: rotate(0); opacity: 1; } }
|
|
12
|
-
@keyframes rotateOut { from { transform: rotate(0); opacity: 1; } to { transform: rotate(90deg); opacity: 0; } }`;default:return""}}function
|
|
12
|
+
@keyframes rotateOut { from { transform: rotate(0); opacity: 1; } to { transform: rotate(90deg); opacity: 0; } }`;default:return""}}function at(){return`
|
|
13
13
|
<script data-stx-scoped data-stx-run="once">
|
|
14
14
|
// Motion preferences handling
|
|
15
15
|
(function() {
|
|
@@ -37,7 +37,7 @@ else {
|
|
|
37
37
|
});
|
|
38
38
|
})();
|
|
39
39
|
</script>
|
|
40
|
-
`}function
|
|
40
|
+
`}function ot(e){return[/@animate\b/,/@transition\b/,/@scroll(?:Animate)?\b/,/@staggered\b/,/@sequence\b/,/@motion\b/,/@animationGroup\b/,/\bstx-transition\b/,/\bstx-(?:fade|scale|flip|rotate|slide|from-|observe)\b/,/data-animate=['"](?:auto|true|false)['"]/].some((i)=>i.test(e))}function lt(e=0.1,t="0px"){return`
|
|
41
41
|
<script data-stx-scoped data-stx-run="always">
|
|
42
42
|
// Intersection Observer for scroll animations
|
|
43
43
|
(function() {
|
|
@@ -52,7 +52,7 @@ else {
|
|
|
52
52
|
// Create the observer
|
|
53
53
|
const options = {
|
|
54
54
|
root: null, // Use viewport
|
|
55
|
-
rootMargin: '${
|
|
55
|
+
rootMargin: '${t}',
|
|
56
56
|
threshold: ${e}
|
|
57
57
|
};
|
|
58
58
|
|
|
@@ -80,7 +80,7 @@ else {
|
|
|
80
80
|
}
|
|
81
81
|
})();
|
|
82
82
|
</script>
|
|
83
|
-
`}function
|
|
83
|
+
`}function ct(){return`
|
|
84
84
|
<style id="stx-animation-base">
|
|
85
85
|
:root {
|
|
86
86
|
--stx-transition-duration: 300ms;
|
|
@@ -195,13 +195,13 @@ else {
|
|
|
195
195
|
transform var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);
|
|
196
196
|
}
|
|
197
197
|
</style>
|
|
198
|
-
`}function
|
|
198
|
+
`}function dt(e,t,i={}){let{staggerDelay:o=50,sequence:r=!1}=i;return`
|
|
199
199
|
<script data-stx-scoped data-stx-run="always">
|
|
200
200
|
// Animation Group: ${e}
|
|
201
201
|
(function() {
|
|
202
|
-
const elements = ${JSON.stringify(
|
|
202
|
+
const elements = ${JSON.stringify(t)};
|
|
203
203
|
const staggerDelay = ${o};
|
|
204
|
-
const sequence = ${
|
|
204
|
+
const sequence = ${r};
|
|
205
205
|
|
|
206
206
|
function animateGroup() {
|
|
207
207
|
elements.forEach((selector, index) => {
|
|
@@ -232,10 +232,10 @@ else {
|
|
|
232
232
|
}
|
|
233
233
|
})();
|
|
234
234
|
</script>
|
|
235
|
-
`}var Ae={name:"transition",handler:(e,
|
|
236
|
-
style="--stx-transition-duration: ${l}ms; --stx-transition-ease: ${d}; --stx-transition-delay: ${m}ms;">${e}</div>`},hasEndTag:!0,description:"Applies transition effects to an element"},_e={name:"scrollAnimate",handler:(e,
|
|
237
|
-
${p}`},hasEndTag:!1,description:"Coordinates multiple animations together as a group"},Ee={name:"motion",handler:(e,
|
|
238
|
-
`+
|
|
235
|
+
`}var Ae={name:"transition",handler:(e,t,i,o)=>{if(t.length<1)return`<div class="stx-error">@transition directive requires at least a transition type</div>${e}`;let r=t[0],l=t.length>1?Number.parseInt(t[1],10)||K.duration:K.duration,d=t.length>2?t[2]||K.ease:K.ease,m=t.length>3?Number.parseInt(t[3],10)||K.delay:K.delay,p=t.length>4?t[4]||K.direction:K.direction,g=`stx-transition-${Math.random().toString(36).substr(2,9)}`,v=it(r,{duration:l,delay:m,ease:d,direction:p}),h="stx-transition",x="";if(r==="fade")x="stx-fade";else if(r==="slide")x="stx-slide";else if(r==="scale")x="stx-scale";else if(r==="flip")x="stx-flip";else if(r==="rotate")x="stx-rotate";return`<div id="${g}" class="${h} ${x} ${p==="out"?"stx-out":""}"
|
|
236
|
+
style="--stx-transition-duration: ${l}ms; --stx-transition-ease: ${d}; --stx-transition-delay: ${m}ms;">${e}</div>`},hasEndTag:!0,description:"Applies transition effects to an element"},_e={name:"scrollAnimate",handler:(e,t,i,o)=>{if(t.length<1)return`<div class="stx-error">@scrollAnimate directive requires at least an animation type</div>${e}`;let r=t[0],l=t.length>1?Number.parseInt(t[1],10)||300:300,d=t.length>2?t[2]||"ease":"ease",m=t.length>3?Number.parseFloat(t[3])||0.2:0.2,p=t.length>4?Number.parseInt(t[4],10)||0:0,g=`stx-scroll-${Math.random().toString(36).substr(2,9)}`,v=`--stx-transition-duration: ${l}ms; --stx-transition-ease: ${d}; --stx-transition-delay: ${p}ms; will-change: opacity, transform;`,h="stx-transition stx-observe stx-out";if(r==="fade")h+=" stx-fade";else if(r==="slide-up"||r==="slide")h+=" stx-from-bottom";else if(r==="slide-down")h+=" stx-from-top";else if(r==="slide-left")h+=" stx-from-right";else if(r==="slide-right")h+=" stx-from-left";else if(r==="scale")h+=" stx-scale";else if(r.includes("-"))h+=` stx-${r}`;else h+=` stx-${r}`;return`<div id="${g}" class="${h}" style="${v}" data-threshold="${m}">${e}</div>`},hasEndTag:!0,description:"Applies animations that trigger when scrolled into view"},Re={name:"animationGroup",handler:(e,t,i,o)=>{if(t.length<2)return`<div class="stx-error">@animationGroup directive requires a group name and at least one element selector</div>${e}`;let r=t[0],l=t.slice(1).map((g)=>g.startsWith("#")||g.startsWith(".")?g:`#${g}`),d=i.staggerDelay||50,m=i.sequence||!0,p=dt(r,l,{staggerDelay:d,sequence:m});return`${e}
|
|
237
|
+
${p}`},hasEndTag:!1,description:"Coordinates multiple animations together as a group"},Ee={name:"motion",handler:(e,t,i,o)=>{let r=t.length>0?t[0].toLowerCase()==="true":!0,l=at();return`<div data-animate="${r?"auto":"true"}">${e}</div>${l}`},hasEndTag:!0,description:"Controls motion and animation preferences"};function Dc(e,t,i,o){let r=e;if(o.animation?.enabled===!1)return r;let l=i.includes("test")&&i.includes("animation");if(!ot(r)&&!l)return r;if(!r.includes('<style id="stx-animation-base">')){let m=ct();r=f(r,m)}if(r.includes("stx-observe")){if(!r.includes("Intersection Observer for scroll animations")){let p=lt(),g=c(r);if(g!==-1)r=r.slice(0,g)+p+`
|
|
238
|
+
`+r.slice(g)}}return r}async function mt(e,t,i,o){let r=t[0]?.replace(/['"]/g,"")||"main",l=pt();if(r!=="main")l=l.replace("container:'main'",`container:'${r}'`);return`<script data-stx-router>${l}</script>`}var Oe={name:"stxRouter",handler:mt,hasEndTag:!1,description:"Inject the STX SPA router script for client-side navigation"};var gt={enabled:!1,trackMouse:!0,trackClicks:!0,trackScroll:!0,samplingRate:100,honorDnt:!0,batchSize:50,maxDataPoints:1000,sessionTimeout:30,persistData:!1,storagePrefix:"stx_heatmap",captureAttributes:["data-heatmap-id","data-track"],ignoreSelectors:["[data-heatmap-ignore]",".heatmap-ignore"],debugOverlay:!1};function Ie(e){let t=e.heatmap;if(!t?.enabled)return"";let i={...gt,...t};return`
|
|
239
239
|
<!-- stx Heatmap - Privacy-Compliant Tracking -->
|
|
240
240
|
<script>
|
|
241
241
|
(function() {
|
|
@@ -618,9 +618,9 @@ else {
|
|
|
618
618
|
};
|
|
619
619
|
})();
|
|
620
620
|
</script>
|
|
621
|
-
`}function
|
|
622
|
-
`)){let m=d.trim();if(!m||m.startsWith("#"))continue;let p=m.indexOf(":");if(p===-1)continue;let g=m.slice(0,p).trim(),v=m.slice(p+1).trim();if(typeof v==="string"){if(v.startsWith('"')&&v.endsWith('"')||v.startsWith("'")&&v.endsWith("'"))v=v.slice(1,-1);else if(v.startsWith("[")&&v.endsWith("]"))try{v=JSON.parse(v)}catch{}else if(v==="true")v=!0;else if(v==="false")v=!1;else if(/^-?\d+(?:\.\d+)?$/.test(v))v=Number(v)}l[g]=v}return{data:l,content:
|
|
623
|
-
`),
|
|
621
|
+
`}function Lc(e,t){let i=Ie(t);if(!i)return e;let o=c(e);if(o!==-1)return e.slice(0,o)+i+e.slice(o);return e+i}var Te={name:"heatmap",hasEndTag:!1,description:"Inject privacy-compliant heatmap tracking script",handler:async(e,t,i,o)=>{let r=i.__stx_config||{};if(t.length>0){let l=ft(t.join(" "));r.heatmap={...r.heatmap,...l,enabled:!0}}return Ie(r)}};function ft(e){let t={},i=e.match(/(\w+)=["']?([^"'\s]+)["']?/g)||[];for(let o of i){let[r,l]=o.split("="),d=l?.replace(/["']/g,"");switch(r){case"endpoint":t.endpoint=d;break;case"samplingRate":t.samplingRate=Number.parseInt(d,10);break;case"batchSize":t.batchSize=Number.parseInt(d,10);break;case"trackMouse":t.trackMouse=d==="true";break;case"trackClicks":t.trackClicks=d==="true";break;case"trackScroll":t.trackScroll=d==="true";break;case"honorDnt":t.honorDnt=d==="true";break;case"debugOverlay":t.debugOverlay=d==="true";break}}return t}function G(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Me(e){let t=e.trim().toLowerCase();return!t.startsWith("javascript:")&&!t.startsWith("vbscript:")&&!t.startsWith("data:text/html")}function _r(e){let t=/^---\r?\n([\s\S]*?)\r?\n---\r?\n/,i=e.match(t);if(!i)return{data:{},content:e.trim()};let o=i[1],r=e.slice(i[0].length),l={};for(let d of o.split(`
|
|
622
|
+
`)){let m=d.trim();if(!m||m.startsWith("#"))continue;let p=m.indexOf(":");if(p===-1)continue;let g=m.slice(0,p).trim(),v=m.slice(p+1).trim();if(typeof v==="string"){if(v.startsWith('"')&&v.endsWith('"')||v.startsWith("'")&&v.endsWith("'"))v=v.slice(1,-1);else if(v.startsWith("[")&&v.endsWith("]"))try{v=JSON.parse(v)}catch{}else if(v==="true")v=!0;else if(v==="false")v=!1;else if(/^-?\d+(?:\.\d+)?$/.test(v))v=Number(v)}l[g]=v}return{data:l,content:r.trim()}}function ut(e,t={}){let{gfm:i=!0,breaks:o=!1}=t,r=e,l=[];if(r=r.replace(/```(\w*)\n([\s\S]*?)```/g,(v,h,x)=>{let w=l.length,C=h?` class="language-${G(h)}"`:"";return l.push(`<pre><code${C}>${G(x.trim())}</code></pre>`),`\x00CODEBLOCK${w}\x00`}),r=r.replace(/`([^`]*)`/g,(v,h)=>`<code>${G(h)}</code>`),r=r.replace(/^######\s+(.*)$/gm,"<h6>$1</h6>"),r=r.replace(/^#####\s+(.*)$/gm,"<h5>$1</h5>"),r=r.replace(/^####\s+(.*)$/gm,"<h4>$1</h4>"),r=r.replace(/^###\s+(.*)$/gm,"<h3>$1</h3>"),r=r.replace(/^##\s+(.*)$/gm,"<h2>$1</h2>"),r=r.replace(/^#\s+(.*)$/gm,"<h1>$1</h1>"),r=r.replace(/\*\*\*(.+?)\*\*\*/g,"<strong><em>$1</em></strong>"),r=r.replace(/___(.+?)___/g,"<strong><em>$1</em></strong>"),r=r.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),r=r.replace(/__(.+?)__/g,"<strong>$1</strong>"),r=r.replace(/\*(.+?)\*/g,"<em>$1</em>"),r=r.replace(/(?<![a-zA-Z0-9])_(.+?)_(?![a-zA-Z0-9])/g,"<em>$1</em>"),i)r=r.replace(/~~(.+?)~~/g,"<del>$1</del>");if(r=r.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(v,h,x)=>`<img src="${Me(x)?G(x):""}" alt="${G(h)}" />`),r=r.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(v,h,x)=>`<a href="${Me(x)?G(x):""}">${h}</a>`),r=r.replace(/^(?:---|\*\*\*|___)\s*$/gm,"<hr />"),r=r.replace(/^>\s+(.*)$/gm,"<blockquote>$1</blockquote>"),r=r.replace(/<\/blockquote>\n<blockquote>/g,`
|
|
623
|
+
`),r=r.replace(/^[*\-+]\s+(.*)$/gm,"<li data-ul>$1</li>"),r=r.replace(/(<li data-ul>.*<\/li>\n?)+/g,"<ul>$&</ul>"),r=r.replace(/<\/ul>\n<ul>/g,""),r=r.replace(/^\d+\.\s+(.*)$/gm,"<li data-ol>$1</li>"),r=r.replace(/(<li data-ol>.*<\/li>\n?)+/g,"<ol>$&</ol>"),r=r.replace(/<\/ol>\n<ol>/g,""),r=r.replace(/<li data-ul>/g,"<li>"),r=r.replace(/<li data-ol>/g,"<li>"),i)r=r.replace(/^\|(.+)\|\s*\n\|[-:\s|]+\|\s*\n((?:\|.+\|\s*\n)*)/gm,(v,h,x)=>{let C=`<tr>${h.split("|").map((P)=>P.trim()).filter(Boolean).map((P)=>`<th>${G(P)}</th>`).join("")}</tr>`,A=x.trim().split(`
|
|
624
624
|
`).map((P)=>`<tr>${P.split("|").map((_)=>_.trim()).filter(Boolean).map((_)=>`<td>${G(_)}</td>`).join("")}</tr>`).join(`
|
|
625
625
|
`);return`<table>
|
|
626
626
|
<thead>
|
|
@@ -629,15 +629,15 @@ ${C}
|
|
|
629
629
|
<tbody>
|
|
630
630
|
${A}
|
|
631
631
|
</tbody>
|
|
632
|
-
</table>`});if(i)
|
|
632
|
+
</table>`});if(i)r=r.replace(/<li>\s*\[\s*\]\s*/g,'<li><input type="checkbox" disabled /> '),r=r.replace(/<li>\s*\[x\]\s*/gi,'<li><input type="checkbox" checked disabled /> ');let d=r.split(`
|
|
633
633
|
`),m=[],p=!1,g=[];for(let v of d){let h=v.trim();if(/^<(?:h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|th|td|hr|div|p)/.test(h)||/^\0CODEBLOCK\d+\0$/.test(h)||h===""){if(p&&g.length>0)m.push(`<p>${g.join(o?`<br />
|
|
634
634
|
`:`
|
|
635
635
|
`)}</p>`),g=[],p=!1;m.push(v)}else p=!0,g.push(h)}if(p&&g.length>0)m.push(`<p>${g.join(o?`<br />
|
|
636
636
|
`:`
|
|
637
|
-
`)}</p>`);if(
|
|
638
|
-
`),o)
|
|
639
|
-
`);for(let v=0;v<l.length;v++)
|
|
640
|
-
`||_==="\r"||_===" "||_===void 0)h++;x=P+9}else{if(h--,h===0){w=R;break}x=R+12}}if(w===-1)continue;let C=e.slice(v,w),A=e.slice(m,w+12);
|
|
637
|
+
`)}</p>`);if(r=m.join(`
|
|
638
|
+
`),o)r=r.replace(/\n/g,`<br />
|
|
639
|
+
`);for(let v=0;v<l.length;v++)r=r.replace(`\x00CODEBLOCK${v}\x00`,l[v]);return r=r.replace(/<p>\s*<\/p>/g,""),r.trim()}async function jc(e,t,i=""){let o=e,r=[],l=/@markdown(?:\([^)]*\))?/g,d;while((d=l.exec(e))!==null){let m=d.index,p=d[0].match(/@markdown\(([^)]*)\)/),g=p?p[1]:"",v=m+d[0].length,h=1,x=v,w=-1;while(h>0&&x<e.length){let P=e.indexOf("@markdown",x),R=e.indexOf("@endmarkdown",x);if(R===-1)break;if(P!==-1&&P<R&&P!==m){let _=e[P+9];if(_==="("||_===`
|
|
640
|
+
`||_==="\r"||_===" "||_===void 0)h++;x=P+9}else{if(h--,h===0){w=R;break}x=R+12}}if(w===-1)continue;let C=e.slice(v,w),A=e.slice(m,w+12);r.push({fullMatch:A,options:g,content:C,index:m}),l.lastIndex=w+12}for(let{fullMatch:m,options:p,content:g,index:v}of r)try{let h={};if(p)p.split(",").forEach((C)=>{let A=C.trim();if(A)h[A]=!0});let x={gfm:h.gfm??!0,breaks:h.breaks??!1},w=ut(g.trim(),x);o=o.split(m).join(w)}catch(h){let x=h instanceof Error?h.message:String(h),w=y("Markdown Directive",`Error processing markdown: ${x}`,i,e,v,m);o=o.split(m).join(w)}return o}async function je(e,t,i,o){let r={gfm:!0,breaks:!1};return t.forEach((l)=>{let d=l.trim().replace(/['"]/g,"");if(d==="breaks")r.breaks=!0;if(d==="no-gfm")r.gfm=!1}),ut(e.trim(),r)}var te=[320,480,640,768,1024,1280,1536,1920,2560],ht=[1,1.5,2,3],ne=["avif","webp","jpeg"],yt={avif:"image/avif",webp:"image/webp",jpeg:"image/jpeg",png:"image/png",gif:"image/gif"};function fe(e,t=te,i={},o){return t.sort((r,l)=>r-l).map((r)=>`${se(e,{...i,w:r,fm:o})} ${r}w`).join(", ")}function Ne(e,t,i=ht,o={},r){return i.sort((l,d)=>l-d).map((l)=>{let d=Math.round(t*l);return`${se(e,{...o,w:d,dpr:l,fm:r})} ${l}x`}).join(", ")}function he(e,t="100vw"){if(!e||Object.keys(e).length===0)return t;let o=Object.entries(e).map(([r,l])=>{let d=/^\d+$/.test(r)?`${r}px`:r;return{bp:d,size:l,numericBp:Number.parseInt(d)||0}}).sort((r,l)=>r.numericBp-l.numericBp).map(({bp:r,size:l})=>`(max-width: ${r}) ${l}`);return o.push(t),o.join(", ")}function se(e,t={}){let i=Object.entries(t).filter(([,l])=>l!==void 0&&l!==null).map(([l,d])=>{if(Array.isArray(d))return[l,d.join(",")];return[l,String(d)]});if(i.length===0)return e;let o=i.map(([l,d])=>`${l}=${encodeURIComponent(d)}`).join("&"),r=e.includes("?")?"&":"?";return`${e}${r}${o}`}function ye(e){return yt[e]||"application/octet-stream"}var vt={strategy:"thumbhash",width:20,quality:50,blurLevel:40,transitionDuration:300,easing:"ease-out"},be=`
|
|
641
641
|
.stx-img-placeholder {
|
|
642
642
|
position: relative;
|
|
643
643
|
overflow: hidden;
|
|
@@ -666,11 +666,11 @@ ${A}
|
|
|
666
666
|
filter: blur(0);
|
|
667
667
|
transform: scale(1);
|
|
668
668
|
}
|
|
669
|
-
`.trim();async function bt(){try{return await import("ts-images")}catch{return null}}async function xt(e,
|
|
669
|
+
`.trim();async function bt(){try{return await import("ts-images")}catch{return null}}async function xt(e,t={}){let i={...vt,...t},o=await bt();if(o)try{return await wt(e,i,o)}catch(r){console.warn(`[stx-media] ts-images placeholder generation failed, using fallback: ${r}`)}return $t(e,i)}async function wt(e,t,i){let{generatePlaceholder:o,generateThumbHash:r}=i,d={blur:"blur",thumbhash:"thumbhash",blurhash:"thumbhash",pixelate:"pixelate","dominant-color":"dominant-color",none:"blur"}[t.strategy]||"blur";if(t.strategy==="thumbhash")return{dataURL:(await r(e)).dataUrl,width:32,height:32,aspectRatio:1,originalWidth:0,originalHeight:0,strategy:"thumbhash"};let m=await o(e,{width:t.width,height:t.height,quality:t.quality,blurLevel:t.blurLevel,strategy:d,base64Encode:!0});return{dataURL:m.dataURL,width:m.width,height:m.height,aspectRatio:m.aspectRatio,originalWidth:m.originalWidth,originalHeight:m.originalHeight,strategy:t.strategy,dominantColor:m.dominantColor,css:m.css}}function $t(e,t){let i=t.width||20,o=t.height||i,r="#e5e7eb",l=`<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${o}" viewBox="0 0 ${i} ${o}"><rect fill="#e5e7eb" width="${i}" height="${o}"/></svg>`;return{dataURL:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(l)}`,width:i,height:o,aspectRatio:i/o,originalWidth:0,originalHeight:0,strategy:t.strategy,dominantColor:"#e5e7eb"}}function Ve(e,t,i={}){let o=i.transitionDuration||300,r=i.easing||"ease-out";return`
|
|
670
670
|
#${e} {
|
|
671
671
|
--stx-img-transition-duration: ${o}ms;
|
|
672
|
-
--stx-img-transition-easing: ${
|
|
673
|
-
background-image: url('${
|
|
672
|
+
--stx-img-transition-easing: ${r};
|
|
673
|
+
background-image: url('${t.dataURL}');
|
|
674
674
|
background-size: cover;
|
|
675
675
|
background-position: center;
|
|
676
676
|
}
|
|
@@ -683,20 +683,20 @@ ${A}
|
|
|
683
683
|
#${e}.stx-img-loaded img {
|
|
684
684
|
opacity: 1;
|
|
685
685
|
}
|
|
686
|
-
`.trim()}var ve=new Map;async function ze(e,
|
|
687
|
-
`):void 0,script:rt}}async function Ct(e,
|
|
686
|
+
`.trim()}var ve=new Map;async function ze(e,t={}){let i=`${e}:${JSON.stringify(t)}`;if(ve.has(i))return ve.get(i);let o=await xt(e,t);return ve.set(i,o),o}async function St(){try{return await import("./chunk-9kza7gxd.js")}catch(e){if(!Le)console.warn("[stx-media] Image processor not available, some features disabled:",e),Le=!0;return null}}var Le=!1,xe=80,de="async",ue="lazy",We=!1;async function ce(e,t={}){let i=t,o=e;if(o.process&&!o.skipOptimization){if(i.tsImagesConfig?.enabled&&!i.isDev)return kt(o,i)}if(i.processedResult?.processed)return Se(e,i.processedResult,t);if(i.responsiveVariants)return qe(e,i.responsiveVariants,t);let{src:r,alt:l,width:d,height:m,sizes:p,widths:g=te,dpr:v,formats:h=ne,quality:x=xe,params:w={},placeholder:C="none",placeholderOptions:A={},lazy:P=!0,priority:R=!1,loading:_=R?"eager":ue,decoding:I=de,fetchpriority:T,objectFit:k,objectPosition:D,crossorigin:S,referrerpolicy:M}=e,{class:H,style:j,id:N}=e,E=e.data||{},{isDev:z=!1,baseUrl:X=""}=t;if(z&&!t.optimize)return Pt(e);let q,O,B=N||`stx-img-${Math.random().toString(36).slice(2,8)}`;if(C!=="none"&&!R)try{q=await ze(r,{strategy:C,...A}),O=Ve(B,q,A)}catch{}let oe=v!==void 0&&d!==void 0,ee;if(oe)ee=Dt(e,B,q,t);else ee=await Ct(e,B,q,t);let re;if(R){let ke=h.includes("webp")?"webp":h[0],nt=fe(r,g,{...w,q:x},ke),st=typeof p==="object"?he(p):p||"100vw";re=`<link rel="preload" as="image" imagesrcset="${nt}" imagesizes="${st}" />`}let le=[];if(!We&&C!=="none")le.push(be),We=!0;if(O)le.push(O);let rt=P?He(B):void 0;return{html:ee,preloadLink:re,css:le.length>0?le.join(`
|
|
687
|
+
`):void 0,script:rt}}async function Ct(e,t,i,o){let{src:r,alt:l,width:d,height:m,sizes:p,widths:g=te,formats:v=ne,quality:h=xe,params:x={},lazy:w=!0,priority:C=!1,loading:A=C?"eager":ue,decoding:P=de,fetchpriority:R,objectFit:_,objectPosition:I,crossorigin:T,referrerpolicy:k}=e,{class:D,style:S}=e,M=e.data||{},H=typeof p==="object"?he(p):p||"100vw",j=[];for(let z of v){let X=fe(r,g,{...x,q:h},z),q=ye(z);if(w&&!C)j.push(` <source type="${q}" data-srcset="${X}" data-sizes="${H}" />`);else j.push(` <source type="${q}" srcset="${X}" sizes="${H}" />`)}let N=we({src:se(r,{...x,q:h}),alt:l,width:d,height:m,loading:C?void 0:A,decoding:P,fetchpriority:C?"high":R,objectFit:_,objectPosition:I,crossorigin:T,referrerpolicy:k,className:Fe(D,i),style:$e(S,_,I,i),lazy:w&&!C,data:M}),E;if(i){let z=`background-image: url('${i.dataURL}'); background-size: cover; background-position: center;`;E=`<div id="${t}" class="stx-img-placeholder" style="${z}">
|
|
688
688
|
<picture>
|
|
689
|
-
${
|
|
689
|
+
${j.join(`
|
|
690
690
|
`)}
|
|
691
|
-
<img ${
|
|
691
|
+
<img ${N} />
|
|
692
692
|
</picture>
|
|
693
|
-
</div>`}else E=`<picture${
|
|
694
|
-
${
|
|
693
|
+
</div>`}else E=`<picture${t?` id="${t}"`:""}>
|
|
694
|
+
${j.join(`
|
|
695
695
|
`)}
|
|
696
|
-
<img ${
|
|
697
|
-
</picture>`;return E}function Dt(e,
|
|
698
|
-
<img ${
|
|
699
|
-
</div>`}return`<img ${
|
|
696
|
+
<img ${N} />
|
|
697
|
+
</picture>`;return E}function Dt(e,t,i,o){let{src:r,alt:l,width:d,height:m,dpr:p=[1,2,3],quality:g=xe,params:v={},lazy:h=!0,priority:x=!1,loading:w=x?"eager":ue,decoding:C=de,fetchpriority:A,objectFit:P,objectPosition:R,crossorigin:_,referrerpolicy:I}=e,{class:T,style:k}=e,D=e.data||{},S=typeof d==="number"?d:Number.parseInt(String(d),10),M=Ne(r,S,p,{...v,q:g}),H=we({src:se(r,{...v,w:S,q:g}),alt:l,width:d,height:m,loading:x?void 0:w,decoding:C,fetchpriority:x?"high":A,objectFit:P,objectPosition:R,crossorigin:_,referrerpolicy:I,className:Fe(T,i),style:$e(k,P,R,i),lazy:h&&!x,data:D}),j=h&&!x?`data-srcset="${M}"`:`srcset="${M}"`;if(i){let N=`background-image: url('${i.dataURL}'); background-size: cover; background-position: center;`;return`<div id="${t}" class="stx-img-placeholder" style="${N}">
|
|
698
|
+
<img ${H} ${j} />
|
|
699
|
+
</div>`}return`<img ${t?`id="${t}" `:""}${H} ${j} />`}function Pt(e){let{src:t,alt:i,width:o,height:r,loading:l=ue,decoding:d=de,fetchpriority:m,objectFit:p,objectPosition:g,crossorigin:v,referrerpolicy:h,priority:x=!1}=e,{class:w,style:C,id:A}=e,P=e.data||{};return{html:`<img ${we({src:t,alt:i,width:o,height:r,loading:x?"eager":l,decoding:d,fetchpriority:x?"high":m,objectFit:p,objectPosition:g,crossorigin:v,referrerpolicy:h,className:w,style:$e(C,p,g),id:A,data:P})} />`}}function we(e){let t=[];if(e.lazy)t.push(`data-src="${J(e.src)}"`),t.push('src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"');else t.push(`src="${J(e.src)}"`);if(t.push(`alt="${J(e.alt)}"`),e.width)t.push(`width="${e.width}"`);if(e.height)t.push(`height="${e.height}"`);if(e.loading)t.push(`loading="${e.loading}"`);if(e.decoding)t.push(`decoding="${e.decoding}"`);if(e.fetchpriority)t.push(`fetchpriority="${e.fetchpriority}"`);if(e.crossorigin)t.push(`crossorigin="${e.crossorigin}"`);if(e.referrerpolicy)t.push(`referrerpolicy="${e.referrerpolicy}"`);if(e.className)t.push(`class="${J(e.className)}"`);if(e.style)t.push(`style="${J(e.style)}"`);if(e.id)t.push(`id="${J(e.id)}"`);if(e.data)for(let[i,o]of Object.entries(e.data))t.push(`data-${i}="${J(o)}"`);if(e.lazy)t.push("data-stx-lazy");return t.join(" ")}function Fe(e,t){let i=[];if(e)i.push(e);if(t)i.push("stx-img-blur");return i.join(" ")||""}function $e(e,t,i,o){let r=[];if(t)r.push(`object-fit: ${t}`);if(i)r.push(`object-position: ${i}`);if(o)r.push("opacity: 0; transition: opacity 300ms ease-out");if(e)r.push(e);return r.join("; ")}function J(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function He(e){return`
|
|
700
700
|
(function() {
|
|
701
701
|
const container = document.getElementById('${e}');
|
|
702
702
|
if (!container) return;
|
|
@@ -733,7 +733,7 @@ ${N.join(`
|
|
|
733
733
|
|
|
734
734
|
observer.observe(container);
|
|
735
735
|
})();
|
|
736
|
-
`.trim()}async function kt(e,
|
|
736
|
+
`.trim()}async function kt(e,t){let i=await St();if(!i)return ce({...e,process:!1},t);let o=t.tsImagesConfig;if(e.responsiveWidths&&e.responsiveWidths.length>0||e.widths&&e.widths.length>0||!e.width&&!e.dpr){let l=await i.generateResponsiveVariants(e.src,e,o);if(l)return qe(e,l,t)}else{let l=await i.processImage(e.src,e,o);if(l.processed)return Se(e,l,t)}return ce({...e,process:!1},t)}async function Se(e,t,i){let{alt:o,width:r,height:l,lazy:d=!0,priority:m=!1,objectFit:p,objectPosition:g,crossorigin:v,referrerpolicy:h}=e,{class:x,style:w}=e,C=e.id||`stx-img-${Math.random().toString(36).slice(2,8)}`,A=e.data||{},P=t.variants||[],R=P.find((O)=>O.format==="jpeg")||P.find((O)=>O.format==="webp")||P[0],_=R?.url||e.src,I=P.filter((O)=>O.format===(R?.format||"jpeg")).map((O)=>`${O.url} ${O.width}w`).join(", "),T=new Map;for(let O of P){if(!T.has(O.format))T.set(O.format,[]);T.get(O.format).push(O)}let k=[],D=["avif","webp","jpeg","png"];for(let O of D){let B=T.get(O);if(B&&B.length>0){let oe=B.map((re)=>`${re.url} ${re.width}w`).join(", "),ee=ye(O);if(d&&!m)k.push(` <source type="${ee}" data-srcset="${oe}" />`);else k.push(` <source type="${ee}" srcset="${oe}" />`)}}let S=[];if(d&&!m){if(S.push(`data-src="${J(_)}"`),S.push('src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"'),I)S.push(`data-srcset="${I}"`)}else if(S.push(`src="${J(_)}"`),I)S.push(`srcset="${I}"`);S.push(`alt="${J(o)}"`);let M=r||t.originalWidth,H=l||t.originalHeight;if(M)S.push(`width="${M}"`);if(H)S.push(`height="${H}"`);if(!m)S.push(`loading="${d?"lazy":"eager"}"`);if(S.push('decoding="async"'),m)S.push('fetchpriority="high"');if(v)S.push(`crossorigin="${v}"`);if(h)S.push(`referrerpolicy="${h}"`);let j=[];if(p)j.push(`object-fit: ${p}`);if(g)j.push(`object-position: ${g}`);if(t.placeholder&&d)j.push("opacity: 0; transition: opacity 300ms ease-out");if(w)j.push(w);if(j.length>0)S.push(`style="${j.join("; ")}"`);let N=[];if(x)N.push(x);if(t.placeholder)N.push("stx-img-blur");if(N.length>0)S.push(`class="${N.join(" ")}"`);if(d&&!m)S.push("data-stx-lazy");for(let[O,B]of Object.entries(A))S.push(`data-${O}="${J(B)}"`);let E;if(t.placeholder||t.dominantColor&&e.useDominantColor){let O=t.placeholder?`background-image: url('${t.placeholder}'); background-size: cover; background-position: center;`:`background-color: ${t.dominantColor};`;E=`<div id="${C}" class="stx-img-placeholder" style="${O}">
|
|
737
737
|
<picture>
|
|
738
738
|
${k.join(`
|
|
739
739
|
`)}
|
|
@@ -743,17 +743,17 @@ ${k.join(`
|
|
|
743
743
|
${k.join(`
|
|
744
744
|
`)}
|
|
745
745
|
<img ${S.join(" ")} />
|
|
746
|
-
</picture>`;let
|
|
747
|
-
`):void 0,script:X}}async function qe(e,
|
|
746
|
+
</picture>`;let z=[];if(t.placeholder)z.push(be);let X=d?He(C):void 0,q;if(m&&I)q=`<link rel="preload" as="image" imagesrcset="${I}" />`;return{html:E,preloadLink:q,css:z.length>0?z.join(`
|
|
747
|
+
`):void 0,script:X}}async function qe(e,t,i){let o={src:t.src,processed:!0,variants:[],placeholder:t.placeholder?.dataURL,originalWidth:t.placeholder?.width,originalHeight:t.placeholder?.height};for(let[r,l]of Object.entries(t.byFormat))if(l)o.variants.push(...l);return Se(e,o,i)}function At(){return Ot({name:"img",hasEndTag:!1,description:"Render an optimized responsive image with srcset and lazy loading",transform:async(e,t,i,o)=>{let{src:r,alt:l,options:d}=_t(e,t,i);if(!r)return console.warn("@img directive: missing src argument"),"<!-- @img: missing src -->";let m={src:r,alt:l||"",widths:d.widths||te,formats:d.formats||ne,quality:d.quality,sizes:d.sizes,dpr:d.dpr,params:d.params,placeholder:d.placeholder,placeholderOptions:d.placeholderOptions,lazy:d.lazy!==!1,priority:d.priority||!1,loading:d.loading,decoding:d.decoding,fetchpriority:d.fetchpriority,objectFit:d.objectFit,objectPosition:d.objectPosition,class:d.class,style:d.style,id:d.id,width:d.width,height:d.height},p=i.__isDev||!1,g=await ce(m,{isDev:p}),v=g.html;if(g.preloadLink)v=g.preloadLink+`
|
|
748
748
|
`+v;if(g.css)v+=`
|
|
749
749
|
<style>${g.css}</style>`;if(g.script)v+=`
|
|
750
|
-
<script>${g.script}</script>`;return v},defaults:{src:"",alt:"",options:{lazy:!0,placeholder:"none"}}})}function _t(e,
|
|
750
|
+
<script>${g.script}</script>`;return v},defaults:{src:"",alt:"",options:{lazy:!0,placeholder:"none"}}})}function _t(e,t,i){if(t.src)return{src:String(t.src),alt:String(t.alt||""),options:t.options||{}};let o=e.trim();if(o.startsWith("@img(")||o.startsWith("("))o=o.replace(/^@img\(/,"").replace(/^\(/,"").replace(/\)$/,"");let r=Rt(o),l=Ce(r[0],i)||"",d=Ce(r[1],i)||"",m={};if(r[2]){let p=Ce(r[2],i);if(typeof p==="object"&&p!==null)m=p;else if(typeof r[2]==="string")try{m=JSON.parse(r[2])}catch{}}return{src:l,alt:d,options:m}}function Rt(e){let t=[],i="",o=!1,r="",l=0,d=0;for(let m=0;m<e.length;m++){let p=e[m],g=m>0?e[m-1]:"";if((p==='"'||p==="'"||p==="`")&&g!=="\\"){if(!o)o=!0,r=p;else if(p===r)o=!1,r="";else i+=p;continue}if(!o){if(p==="{")l++;if(p==="}")l--;if(p==="[")d++;if(p==="]")d--;if(p===","&&l===0&&d===0){t.push(i.trim()),i="";continue}}i+=p}if(i.trim())t.push(i.trim());return t}function Ce(e,t){if(typeof e!=="string")return e;let i=e.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1);if(!i.startsWith("/")&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith("{")){let o=t[i];if(o!==void 0)return o}if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(i)}catch{}return i}var Ue=At();import{existsSync as Et}from"fs";import ie from"path";function Ns(){let e=[ie.join(import.meta.dir,"primitives"),ie.join(import.meta.dir,"..","primitives"),ie.join(import.meta.dir,"native","primitives"),ie.join(import.meta.dir,"..","native","primitives")];for(let t of e)if(Et(ie.join(t,"View.stx")))return t;return e[0]}async function Je(){try{return await import("./chunk-0h1dyd38.js")}catch(e){if(!Be)console.warn("[stx-media] Video processor not available, some features disabled:",e),Be=!0;return null}}var Be=!1,Ke=!0,Ge="metadata",It="https://cdn.jsdelivr.net/npm/ts-video-player@latest/dist/index.min.js";async function pe(e,t={}){let i=t,o=e;if(o.process&&!o.skipProcessing){if(i.tsVideosConfig?.enabled&&!i.isDev)return Vt(o,i)}if(i.processedResult?.processed)return Xe(e,i.processedResult,t);let r;if(o.generatePoster&&o.src&&!e.poster)r=await zt(o,i);let{src:l,sources:d=[],poster:m,posterPlaceholder:p,controls:g=Ke,autoplay:v=!1,muted:h=!1,loop:x=!1,preload:w=Ge,playsinline:C=!0,lazy:A=!0,player:P="native",type:R,width:_,height:I,crossorigin:T,disablePictureInPicture:k=!1,disableRemotePlayback:D=!1}=e,S=r||m,{class:M,style:H}=e,j=e.id||`stx-video-${Math.random().toString(36).slice(2,8)}`;if(P==="ts-video")return Mt(e,t);if(R&&R!=="video")return Tt(l||"",R,e);let N=d.length>0?d:l?[{src:l,type:Ye(l)}]:[],E=[`id="${j}"`];if(g)E.push("controls");if(v)E.push("autoplay");if(h)E.push("muted");if(x)E.push("loop");if(C)E.push("playsinline");if(k)E.push("disablepictureinpicture");if(D)E.push("disableremoteplayback");if(T)E.push(`crossorigin="${T}"`);if(A){if(E.push(`data-preload="${w}"`),E.push('preload="none"'),S)E.push(`data-poster="${F(S)}"`);E.push("data-stx-lazy")}else if(E.push(`preload="${w}"`),S)E.push(`poster="${F(S)}"`);if(_)E.push(`width="${_}"`);if(I)E.push(`height="${I}"`);if(M)E.push(`class="${F(M)}"`);if(H)E.push(`style="${F(H)}"`);let z=N.map((O)=>` <source ${A?`data-src="${F(O.src)}"`:`src="${F(O.src)}"`} type="${O.type}"${O.media?` media="${O.media}"`:""} />`).join(`
|
|
751
751
|
`),X=`<video ${E.join(" ")}>
|
|
752
|
-
${
|
|
752
|
+
${z}
|
|
753
753
|
Your browser does not support the video tag.
|
|
754
|
-
</video>`,
|
|
754
|
+
</video>`,q;if(A)q=`
|
|
755
755
|
(function() {
|
|
756
|
-
var video = document.getElementById('${
|
|
756
|
+
var video = document.getElementById('${j}');
|
|
757
757
|
if (!video) return;
|
|
758
758
|
|
|
759
759
|
var observer = new IntersectionObserver(function(entries) {
|
|
@@ -786,20 +786,20 @@ ${L}
|
|
|
786
786
|
|
|
787
787
|
observer.observe(video);
|
|
788
788
|
})();
|
|
789
|
-
`.trim();return{html:X,script:
|
|
789
|
+
`.trim();return{html:X,script:q}}function Tt(e,t,i){let{width:o=640,height:r=360}=i,{class:l,style:d}=i,m=i.id||`stx-embed-${Math.random().toString(36).slice(2,8)}`,p,g=null;switch(t){case"youtube":g=jt(e),p=g?`https://www.youtube-nocookie.com/embed/${g}`:e;break;case"vimeo":g=Nt(e),p=g?`https://player.vimeo.com/video/${g}`:e;break;case"dailymotion":g=e.split("/").pop()||"",p=`https://www.dailymotion.com/embed/video/${g}`;break;case"twitch":g=e.split("/").pop()||"",p=`https://player.twitch.tv/?video=${g}&parent=${typeof window<"u"?window.location.hostname:"localhost"}`;break;default:p=e}let v=[`id="${m}"`,`src="${F(p)}"`,`width="${o}"`,`height="${r}"`,'frameborder="0"',"allowfullscreen",'allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"'];if(l)v.push(`class="${F(l)}"`);if(d)v.push(`style="${F(d)}"`);if(i.lazy)v.push('loading="lazy"');return{html:`<div class="stx-video-embed" style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;">
|
|
790
790
|
<iframe ${v.join(" ")} style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe>
|
|
791
|
-
</div>`}}function Mt(e,
|
|
791
|
+
</div>`}}function Mt(e,t={}){let{src:i,sources:o=[],poster:r,controls:l=!0,autoplay:d=!1,muted:m=!1,loop:p=!1,preload:g="metadata",playsinline:v=!0,lazy:h=!0,width:x,height:w}=e,{class:C,style:A}=e,P=e.id||`ts-video-${Math.random().toString(36).slice(2,8)}`,R={src:o.length>0?o:i,autoplay:d,loop:p,muted:m,playsinline:v,preload:g,poster:r,controls:l,title:e.title},_=["position: relative",x?`width: ${typeof x==="number"?x+"px":x}`:"width: 100%",w?`height: ${typeof w==="number"?w+"px":w}`:"",A||""].filter(Boolean).join("; "),I=`
|
|
792
792
|
<div
|
|
793
793
|
id="${P}"
|
|
794
|
-
class="ts-video-player${C?" "+
|
|
794
|
+
class="ts-video-player${C?" "+F(C):""}"
|
|
795
795
|
style="${_}"
|
|
796
796
|
data-ts-video-player
|
|
797
797
|
data-config='${JSON.stringify(R)}'
|
|
798
798
|
${h?"data-lazy":""}
|
|
799
799
|
>
|
|
800
800
|
<div class="ts-video-player__container">
|
|
801
|
-
${
|
|
802
|
-
<div class="ts-video-player__placeholder" style="background-image: url('${
|
|
801
|
+
${r?`
|
|
802
|
+
<div class="ts-video-player__placeholder" style="background-image: url('${F(r)}');">
|
|
803
803
|
<button class="ts-video-player__play-button" aria-label="Play video">
|
|
804
804
|
<svg viewBox="0 0 24 24" fill="currentColor" width="64" height="64">
|
|
805
805
|
<path d="M8 5v14l11-7z"/>
|
|
@@ -825,7 +825,7 @@ ${L}
|
|
|
825
825
|
|
|
826
826
|
// Load ts-video-player from CDN
|
|
827
827
|
var script = document.createElement('script');
|
|
828
|
-
script.src = '${
|
|
828
|
+
script.src = '${It}';
|
|
829
829
|
script.onload = initPlayer;
|
|
830
830
|
script.onerror = function() {
|
|
831
831
|
console.error('[stx] Failed to load ts-video-player');
|
|
@@ -955,11 +955,11 @@ else {
|
|
|
955
955
|
.ts-video-player__play-button svg {
|
|
956
956
|
margin-left: 4px;
|
|
957
957
|
}
|
|
958
|
-
`.trim();return{html:I,script:T,css:k}}function Ye(e){switch(e.split(".").pop()?.toLowerCase()){case"mp4":return"video/mp4";case"webm":return"video/webm";case"ogg":case"ogv":return"video/ogg";case"mov":return"video/quicktime";case"avi":return"video/x-msvideo";case"mkv":return"video/x-matroska";case"m3u8":return"application/x-mpegURL";default:return"video/mp4"}}function jt(e){let
|
|
959
|
-
${
|
|
958
|
+
`.trim();return{html:I,script:T,css:k}}function Ye(e){switch(e.split(".").pop()?.toLowerCase()){case"mp4":return"video/mp4";case"webm":return"video/webm";case"ogg":case"ogv":return"video/ogg";case"mov":return"video/quicktime";case"avi":return"video/x-msvideo";case"mkv":return"video/x-matroska";case"m3u8":return"application/x-mpegURL";default:return"video/mp4"}}function jt(e){let t=[/youtube\.com\/watch\?v=([^&]+)/,/youtube\.com\/embed\/([^?]+)/,/youtu\.be\/([^?]+)/,/youtube\.com\/v\/([^?]+)/];for(let i of t){let o=e.match(i);if(o)return o[1]}return null}function Nt(e){let t=e.match(/vimeo\.com\/(\d+)/);return t?t[1]:null}function F(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'")}async function Vt(e,t){let i=await Je();if(!i)return pe({...e,process:!1},t);let o=t.tsVideosConfig,r=await i.processVideo(e.src,e,o,e.onProcessProgress);if(r.processed)return Xe(e,r,t);return pe({...e,process:!1},t)}async function zt(e,t){let i=await Je();if(!i||!e.src)return;let o=typeof e.generatePoster==="object"?e.generatePoster:{timestamp:0},r=t.tsVideosConfig||{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos"};return(await i.generatePoster(e.src,o,r.outputDir,r.baseUrl||"/videos"))?.url}function Xe(e,t,i){let{controls:o=Ke,autoplay:r=!1,muted:l=!1,loop:d=!1,preload:m=Ge,playsinline:p=!0,lazy:g=!0,width:v,height:h,crossorigin:x,disablePictureInPicture:w=!1,disableRemotePlayback:C=!1}=e,{class:A,style:P}=e,R=e.id||`stx-video-${Math.random().toString(36).slice(2,8)}`,_=e.src,I=Ye(_);if(t.transcoded)_=t.transcoded.url,I="video/mp4";let T=t.streaming?.hls||t.streaming?.dash;if(T){if(t.streaming?.hls)_=t.streaming.hls.manifestUrl,I="application/x-mpegURL";else if(t.streaming?.dash)_=t.streaming.dash.manifestUrl,I="application/dash+xml"}let k=t.poster?.url||e.poster,D=[`id="${R}"`];if(o)D.push("controls");if(r)D.push("autoplay");if(l)D.push("muted");if(d)D.push("loop");if(p)D.push("playsinline");if(w)D.push("disablepictureinpicture");if(C)D.push("disableremoteplayback");if(x)D.push(`crossorigin="${x}"`);if(g){if(D.push(`data-preload="${m}"`),D.push('preload="none"'),k)D.push(`data-poster="${F(k)}"`);D.push("data-stx-lazy")}else if(D.push(`preload="${m}"`),k)D.push(`poster="${F(k)}"`);let S=v||t.metadata?.width,M=h||t.metadata?.height;if(S)D.push(`width="${S}"`);if(M)D.push(`height="${M}"`);if(A)D.push(`class="${F(A)}"`);if(P)D.push(`style="${F(P)}"`);let j=` <source ${g?`data-src="${F(_)}"`:`src="${F(_)}"`} type="${I}" />`,N=`<video ${D.join(" ")}>
|
|
959
|
+
${j}
|
|
960
960
|
Your browser does not support the video tag.
|
|
961
|
-
</video>`;if(
|
|
962
|
-
${
|
|
961
|
+
</video>`;if(t.spriteSheet)N=`<div class="stx-video-wrapper" data-sprite-sheet="${F(t.spriteSheet.url)}" data-sprite-cols="${t.spriteSheet.columns}" data-sprite-interval="${t.spriteSheet.interval}">
|
|
962
|
+
${N}
|
|
963
963
|
</div>`;let E;if(g)E=`
|
|
964
964
|
(function() {
|
|
965
965
|
var video = document.getElementById('${R}');
|
|
@@ -995,7 +995,7 @@ ${V}
|
|
|
995
995
|
|
|
996
996
|
observer.observe(video);
|
|
997
997
|
})();
|
|
998
|
-
`.trim();let
|
|
998
|
+
`.trim();let z;if(T)z=`
|
|
999
999
|
.stx-video-wrapper {
|
|
1000
1000
|
position: relative;
|
|
1001
1001
|
width: 100%;
|
|
@@ -1004,13 +1004,13 @@ ${V}
|
|
|
1004
1004
|
width: 100%;
|
|
1005
1005
|
height: auto;
|
|
1006
1006
|
}
|
|
1007
|
-
`.trim();return{html:
|
|
1007
|
+
`.trim();return{html:N,script:E,css:z}}function Ze(){return Ot({name:"video",hasEndTag:!1,description:"Render a video with optional ts-videos processing, streaming, and poster generation",transform:async(e,t,i,o)=>{let{src:r,options:l}=Lt(e,t,i);if(!r)return console.warn("@video directive: missing src argument"),"<!-- @video: missing src -->";let d={src:r,poster:l.poster,controls:l.controls!==!1,autoplay:l.autoplay||!1,muted:l.muted||!1,loop:l.loop||!1,preload:l.preload||"metadata",playsinline:l.playsinline!==!1,lazy:l.lazy!==!1,player:l.player||"native",type:l.type,width:l.width,height:l.height,class:l.class,style:l.style,id:l.id,crossorigin:l.crossorigin,disablePictureInPicture:l.disablePictureInPicture,disableRemotePlayback:l.disableRemotePlayback,title:l.title,quality:l.quality,platform:l.platform,process:l.process,generatePoster:l.generatePoster,streaming:l.streaming,transcode:l.transcode,spriteSheet:l.spriteSheet,waveform:l.waveform},p={isDev:i.__isDev||!1,tsVideosConfig:i.__tsVideosConfig},g=await pe(d,p),v=g.html;if(g.css)v+=`
|
|
1008
1008
|
<style>${g.css}</style>`;if(g.script)v+=`
|
|
1009
|
-
<script>${g.script}</script>`;return v},defaults:{src:"",options:{controls:!0,lazy:!0,preload:"metadata"}}})}function Lt(e,
|
|
1010
|
-
* ${
|
|
1009
|
+
<script>${g.script}</script>`;return v},defaults:{src:"",options:{controls:!0,lazy:!0,preload:"metadata"}}})}function Lt(e,t,i){if(t.src)return{src:String(t.src),options:t.options||{}};let o=e.trim();if(o.startsWith("@video(")||o.startsWith("("))o=o.replace(/^@video\(/,"").replace(/^\(/,"").replace(/\)$/,"");let r=Wt(o),l=Qe(r[0],i)||"",d={};if(r[1]){let m=Qe(r[1],i);if(typeof m==="object"&&m!==null)d=m;else if(typeof r[1]==="string")try{d=JSON.parse(r[1])}catch{}}return{src:l,options:d}}function Wt(e){let t=[],i="",o=!1,r="",l=0,d=0;for(let m=0;m<e.length;m++){let p=e[m],g=m>0?e[m-1]:"";if((p==='"'||p==="'"||p==="`")&&g!=="\\"){if(!o)o=!0,r=p;else if(p===r)o=!1,r="";else i+=p;continue}if(!o){if(p==="{")l++;if(p==="}")l--;if(p==="[")d++;if(p==="]")d--;if(p===","&&l===0&&d===0){t.push(i.trim()),i="";continue}}i+=p}if(i.trim())t.push(i.trim());return t}function Qe(e,t){if(typeof e!=="string")return e;let i=e.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1);if(!i.startsWith("/")&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith("{")){let o=t[i];if(o!==void 0)return o}if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(i)}catch{}return i}var De=Ze();import Ft from"fs";import U from"path";async function Ms(e,t){if(!e.webComponents?.enabled)return[];let i=e.webComponents.components||[],o=[];if(i.length>0){if(e.debug)console.log(`Building ${i.length} web components...`);for(let r of i)try{let l=await Ht(r,e,t);if(l)o.push(l)}catch(l){if(console.error(`Error building web component ${r.name}:`,l),e.debug)throw l}}return o}async function Ht(e,t,i){let{name:o,file:r,tag:l,extends:d}=e;if(!o||!r||!l)return console.error("Invalid web component configuration, missing required fields:",e),null;let m=null;if(U.isAbsolute(r)&&await s(r))m=r;else if(t.componentsDir){let A=U.join(t.componentsDir,r);if(await s(A))m=A}if(!m)m=await An(r,process.cwd(),t,i);if(!m)return console.error(`Web component source file not found: ${r}`),null;let p=await Bun.file(m).text();i.add(m);let v=(e.outputFormat||"js")==="ts",h=v?Ut({name:o,tag:l,baseElement:d,source:p,shadowDOM:e.shadowDOM??!0,template:e.template??!0,styleSource:e.styleSource,attributes:e.attributes||[],attributeTypes:e.attributeTypes||{}}):qt({name:o,tag:l,baseElement:d,source:p,shadowDOM:e.shadowDOM??!0,template:e.template??!0,styleSource:e.styleSource,attributes:e.attributes||[]}),x=t.webComponents?.outputDir||"dist/web-components";await Ft.promises.mkdir(x,{recursive:!0});let w=v?"ts":"js",C=U.join(x,`${l}.${w}`);if(await Bun.write(C,h),t.debug)console.log(`Built web component ${o} -> ${C}`);return C}function qt(e){let{name:t,tag:i,baseElement:o="HTMLElement",source:r,shadowDOM:l,template:d,styleSource:m,attributes:p=[]}=e,g=r.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").trim();if(!l)g=g.replace(/<slot\s+name=["']([^"']+)["']\s*>([\s\S]*?)<\/slot>/gi,'<div data-slot="$1">$2</div>'),g=g.replace(/<slot\s+name=["']([^"']+)["']\s*\/>/gi,'<div data-slot="$1"></div>'),g=g.replace(/<slot\s*>([\s\S]*?)<\/slot>/gi,"<div data-default-slot>$1</div>"),g=g.replace(/<slot\s*\/>/gi,"<div data-default-slot></div>");let v="";if(m)v=`<link rel="stylesheet" href="${m}">`;return`/**
|
|
1010
|
+
* ${t} Web Component
|
|
1011
1011
|
* Auto-generated from stx component
|
|
1012
1012
|
*/
|
|
1013
|
-
class ${
|
|
1013
|
+
class ${t.replace(/\W/g,"")} extends ${o} {
|
|
1014
1014
|
constructor() {
|
|
1015
1015
|
super()
|
|
1016
1016
|
this._initialized = false
|
|
@@ -1097,8 +1097,8 @@ class ${r.replace(/\W/g,"")} extends ${o} {
|
|
|
1097
1097
|
}
|
|
1098
1098
|
|
|
1099
1099
|
// Register the web component
|
|
1100
|
-
customElements.define('${i}', ${
|
|
1101
|
-
`}function Ut(e){let{name:
|
|
1100
|
+
customElements.define('${i}', ${t.replace(/\W/g,"")})
|
|
1101
|
+
`}function Ut(e){let{name:t,tag:i,baseElement:o="HTMLElement",source:r,shadowDOM:l,template:d,styleSource:m,attributes:p=[],attributeTypes:g={}}=e,v=t.replace(/\W/g,""),h=r.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").trim();if(!l)h=h.replace(/<slot\s+name=["']([^"']+)["']\s*>([\s\S]*?)<\/slot>/gi,'<div data-slot="$1">$2</div>'),h=h.replace(/<slot\s+name=["']([^"']+)["']\s*\/>/gi,'<div data-slot="$1"></div>'),h=h.replace(/<slot\s*>([\s\S]*?)<\/slot>/gi,"<div data-default-slot>$1</div>"),h=h.replace(/<slot\s*\/>/gi,"<div data-default-slot></div>");h=h.replace(/`/g,"\\`").replace(/\$\{/g,"\\${");let x=m?`<link rel="stylesheet" href="${m}">`:"",w=(k)=>{switch(g[k]){case"number":return"number";case"boolean":return"boolean";case"object":return"Record<string, unknown>";default:return"string"}},C=(k)=>k.replace(/-([a-z])/g,(D,S)=>S.toUpperCase()),A=p.map((k)=>` private _${C(k)}: ${w(k)} | null = null;`).join(`
|
|
1102
1102
|
`),P=p.map((k)=>{let D=w(k),S=C(k);return`
|
|
1103
1103
|
get ${S}(): ${D} | null {
|
|
1104
1104
|
return this._${S};
|
|
@@ -1114,7 +1114,7 @@ else {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
}`}).join(`
|
|
1116
1116
|
`),R=p.length>0?`/**
|
|
1117
|
-
* Props interface for ${
|
|
1117
|
+
* Props interface for ${t}
|
|
1118
1118
|
*/
|
|
1119
1119
|
export interface ${v}Props {
|
|
1120
1120
|
${p.map((k)=>{let D=w(k);return` ${C(k)}?: ${D};`}).join(`
|
|
@@ -1156,7 +1156,7 @@ catch { return value; }
|
|
|
1156
1156
|
${l?"this.shadowRoot!.innerHTML":"this.innerHTML"} = \`${x}${h}\`;
|
|
1157
1157
|
this._processSlots();
|
|
1158
1158
|
}`;return`/**
|
|
1159
|
-
* ${
|
|
1159
|
+
* ${t} Web Component
|
|
1160
1160
|
* Auto-generated from stx component (TypeScript)
|
|
1161
1161
|
*
|
|
1162
1162
|
* @example
|
|
@@ -1175,7 +1175,7 @@ interface SlotChangeDetail {
|
|
|
1175
1175
|
|
|
1176
1176
|
${R}
|
|
1177
1177
|
/**
|
|
1178
|
-
* ${
|
|
1178
|
+
* ${t} custom element class
|
|
1179
1179
|
* @customElement ${i}
|
|
1180
1180
|
*/
|
|
1181
1181
|
export class ${v} extends ${o} {
|
|
@@ -1253,7 +1253,7 @@ declare global {
|
|
|
1253
1253
|
|
|
1254
1254
|
// Register the web component
|
|
1255
1255
|
customElements.define('${i}', ${v});
|
|
1256
|
-
`}function Bt(e,
|
|
1256
|
+
`}function Bt(e,t){let i=e.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i),o=i?i[1].trim():"",r=t,l=[],d=!0;if(o){let h=o.match(/export\s+default\s+({[\s\S]*})/);if(h)try{let x=h[1],w=x.match(/tag\s*:\s*['"`]([^'"`]+)['"`]/);if(w)r=w[1];let C=x.match(/props\s*:\s*\[([\s\S]*?)\]/);if(C)l=C[1].split(",").map((P)=>P.trim().replace(/['"`]/g,"")).filter((P)=>P.length>0);let A=x.match(/shadowDOM\s*:\s*(true|false)/);if(A)d=A[1]==="true"}catch{}}let m=e.match(/<template\b(?![^>]*\bid\s*=)[^>]*>([\s\S]*?)<\/template>/i),p=m?m[1].trim():"",g=e.match(/<style\b[^>]*>([\s\S]*?)<\/style>/i),v=g?g[1].trim():"";return{tag:r,props:l,template:p,styles:v,script:o,shadowDOM:d}}function Jt(e){let{tag:t,props:i,template:o,styles:r,shadowDOM:l}=e,d=t.split("-").map((h)=>h.charAt(0).toUpperCase()+h.slice(1)).join(""),m=o.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),p=r.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),g=i.map((h)=>`'${h}'`).join(", "),v=i.map((h)=>`
|
|
1257
1257
|
get ${h}() {
|
|
1258
1258
|
return this.getAttribute('${h}') || '';
|
|
1259
1259
|
}
|
|
@@ -1303,9 +1303,9 @@ ${v}
|
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
1305
|
|
|
1306
|
-
customElements.define('${
|
|
1307
|
-
`}async function et(e,
|
|
1306
|
+
customElements.define('${t}', ${d});
|
|
1307
|
+
`}async function et(e,t,i,o){if(t.length<1)return u("WebComponent","@webcomponent directive requires at least the tag name parameter",n.INVALID_DIRECTIVE_SYNTAX);let r=t[0].replace(/['"]/g,""),d=(i.__stx_options||{}).componentsDir||"components",m=U.isAbsolute(d)?[U.join(d,`${r}.stx`),U.join(U.dirname(o),`${r}.stx`)]:[U.join(U.dirname(o),d,`${r}.stx`),U.join(process.cwd(),d,`${r}.stx`),U.join(U.dirname(o),`${r}.stx`)],p=null;for(let h of m)if(await s(h)){p=await Bun.file(h).text();break}if(!p)return u("WebComponent",`Component file not found: ${r}.stx`,n.FILE_NOT_FOUND);let g=Bt(p,r);return`<script type="module">
|
|
1308
1308
|
${Jt(g)}
|
|
1309
|
-
</script>`}var U={enabled:!0,ssr:!1,partialsDir:"partials",componentsDir:"components",layoutsDir:"layouts",defaultLayout:"default",debug:!1,cache:!0,stateDir:yn,cachePath:".stx/cache",cacheVersion:"1.0.0",componentRenderCacheBytes:33554432,build:{pagesDir:"pages",outputDir:"dist",baseUrl:"/",sitemap:!0,minify:!0,cache:!0,cacheDir:".stx/ssg-cache",concurrency:10,generate404:!0,publicDir:"public",trailingSlash:!1,cleanOutput:!0},customDirectives:[{name:"markdown",handler:je,hasEndTag:!0,description:"Render markdown content to HTML"},{name:"webcomponent",handler:et,hasEndTag:!1,description:"Include a web component in the template"},Dc,Mc,Is,Os,Ae,Re,Ee,_e,Oe,Te,Ue,De,...po],middleware:[],i18n:{defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},webComponents:{enabled:!1,outputDir:"dist/web-components",components:[]},docs:{enabled:!1,outputDir:"docs",format:"markdown",components:!0,templates:!0,directives:!0},streaming:{enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},hydration:{enabled:!1,mode:"islands",clientEntry:"src/client.ts",autoMarkers:!0,preload:"lazy"},router:{enabled:!0,container:"main",linkSelector:"a[href]",viewTransitions:!0,scrollToTop:!0,scrollRestoration:!0,prefetch:!0,cache:!0,cacheTTL:300000,skipSelectors:'[data-no-router], [target="_blank"]',viewTransitionCSS:{oldRoot:"fade-out 0.15s ease-in",newRoot:"fade-in 0.2s ease-out",oldContent:"slide-out 0.2s ease-in",newContent:"slide-in 0.25s ease-out"}},a11y:{enabled:!0,addSrOnlyStyles:!0,level:"AA",autoFix:!1,ignoreChecks:[]},seo:{enabled:!0,socialPreview:!0,defaultConfig:{title:"stx Project",description:"A website built with stx templating engine"}},animation:{enabled:!0,defaultDuration:300,defaultEase:"ease",respectMotionPreferences:!0,staggerDelay:50},markdown:{enabled:!0,syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0,additionalThemes:["light-plus","one-dark-pro","dracula","monokai","solarized-light","nord","github-dark"]}},loops:{maxWhileIterations:1000,useAltLoopVariable:!1},story:{enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],port:6006},pwa:{enabled:!1,manifest:{name:"stx App",shortName:"stx",description:"A Progressive Web App built with stx",startUrl:"/",display:"standalone",orientation:"any",themeColor:"#000000",backgroundColor:"#ffffff",scope:"/"},icons:{src:"public/icon.png",sizes:[72,96,128,144,152,192,384,512],generateWebP:!0,generateAppleIcons:!0,outputDir:"pwa-icons",purpose:["any","maskable"]},routes:[{pattern:"/",strategy:"network-first"},{pattern:"/static/*",strategy:"cache-first",maxAgeSeconds:2592000},{pattern:"/api/*",strategy:"network-only"},{pattern:"*.js",strategy:"stale-while-revalidate"},{pattern:"*.css",strategy:"stale-while-revalidate"},{pattern:"*.png",strategy:"cache-first"},{pattern:"*.jpg",strategy:"cache-first"},{pattern:"*.webp",strategy:"cache-first"},{pattern:"*.svg",strategy:"cache-first"}],offline:{enabled:!0,fallbackTitle:"You are offline",fallbackMessage:"Please check your internet connection and try again.",precacheAssets:[]},serviceWorker:{fileName:"sw.js",cacheVersion:"1.0.0",skipWaiting:!0,clientsClaim:!0,navigationPreload:!1,excludeRoutes:["/api/auth/*"],cacheFileTypes:["html","css","js","png","jpg","jpeg","webp","svg","woff","woff2"],useWorkbox:!1},autoInject:!0,push:{enabled:!1,defaultOptions:{vibrate:[100,50,100],requireInteraction:!1}},backgroundSync:{enabled:!1,queueName:"stx-sync-queue",maxRetentionMinutes:1440,maxRetries:3,minInterval:1000,forms:[],endpoints:[]},shareTarget:{enabled:!1,action:"/share-target",method:"POST",enctype:"multipart/form-data",params:{title:"title",text:"text",url:"url"}},fileHandlers:{enabled:!1},protocolHandlers:[],cacheStorage:{maxSize:100,maxEntries:500,maxAge:30,purgeStrategy:"lru"},updates:{enabled:!0,promptUser:!0,autoReload:!1,message:"A new version is available. Reload to update?"},precache:{enabled:!0,includeHtml:!0,includeJs:!0,includeCss:!0,includeImages:!0,includeFonts:!0,include:[],exclude:["*.map","*.LICENSE.txt"],maxFileSizeKB:500}},media:{enabled:!0,image:{enabled:!0,defaultWidths:[320,480,640,768,1024,1280,1536,1920],defaultFormats:["avif","webp","jpeg"],defaultQuality:80,placeholderStrategy:"thumbhash",lazyByDefault:!0,enableDpr:!0,defaultDpr:[1,2,3],tsImages:{enabled:!0,outputDir:"dist/images",baseUrl:"/images",formatQuality:{jpeg:{quality:85,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4,lossless:!1}},breakpoints:[320,480,640,768,1024,1280,1536,1920],batchOptions:{concurrency:4,optimizationPreset:"web"}}},video:{enabled:!0,lazyByDefault:!0,defaultControls:!0,tsVideos:{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos",defaultQuality:"high",streaming:{enabled:!0,format:"hls",segmentDuration:6,defaultQualities:[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000}]},thumbnails:{enabled:!0,count:10,format:"webp",width:320},transcoding:{defaultCodec:"h264",defaultAudioCodec:"aac",speedPreset:"medium"}}},upload:{enabled:!0,maxSize:10485760,allowedTypes:["image/*","video/*","audio/*","application/pdf"],maxConcurrent:3},protected:{enabled:!0,expirationSeconds:3600,batchSize:10},cache:{enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500}},broadcasting:{enabled:!1,driver:"bun",host:"0.0.0.0",port:6001,scheme:"ws",verbose:!1}};function Gt(e,r,i){let o=r||"pages";if(e)return{root:e,pagesDir:o};let n=i||process.cwd(),l=z.join(n,"resources","views"),d=z.join(n,"resources","layouts");if(Q.existsSync(l)&&Q.existsSync(d))return{root:"resources",pagesDir:"views"};let m=z.join(n,"resources","views","pages");if(Q.existsSync(m))return{root:"resources/views",pagesDir:o};return{root:".",pagesDir:o}}var tt=new Set,ge=["partialsDir","componentsDir","layoutsDir"],Pe=new WeakMap;function Yt(e,r){let i=r.replace(/[\\/]+$/,"");if(!i||i===".")return!0;let o=e.replace(/\\/g,"/"),n=i.replace(/\\/g,"/");return o===n||o.startsWith(`${n}/`)}function ig(e,r){let i=!e.root,o=Gt(e.root,e.pagesDir,r);if(e.root=o.root,e.pagesDir=o.pagesDir,i&&o.root!=="."){let n=`${r}::${o.root}`;if(!tt.has(n))tt.add(n),console.warn(`[stx] No "root" in config \u2014 inferred "${o.root}" from the project layout. Template directories are resolved under it; set root explicitly to pin this.`)}if(!Pe.has(e)){let n={};for(let l of ge){let d=e[l];if(typeof d==="string"&&d)n[l]=d}Pe.set(e,n)}if(e.root&&e.root!=="."){let n=e.root;for(let l of ge){let d=e[l];if(typeof d!=="string"||!d)continue;if(z.isAbsolute(d)||Yt(d,n))continue;e[l]=z.join(n,d)}}for(let n of ge){let l=e[n];if(typeof l!=="string"||!l||z.isAbsolute(l))continue;e[n]=z.resolve(r,l)}return e}function Xt(e,r){let i=Pe.get(e);for(let o of ge){let n=e[o];if(typeof n!=="string"||!n)continue;let l=z.isAbsolute(n)?n:z.join(r,n);if(Q.existsSync(l))continue;let d=i?.[o]??n,m=e.root,p=!!m&&m!==".";console.warn(`[stx] ${String(o)} resolves to "${l}", which does not exist. Configured as "${d}"`+(p?`, resolved under root "${m}".`:"."))}}function Zt(e){if(e.customDirectives)e.customDirectives=[...e.customDirectives];if(e.middleware)e.middleware=[...e.middleware];if(e.apiRoutes)e.apiRoutes={...e.apiRoutes}}function Qt(e){if(Uc(e.stateDir),e.stateDir=kr(),e.cachePath=_r(e.cachePath),e.build)e.build.cacheDir=_r(e.build.cacheDir);if(e.media?.cache)e.media.cache.directory=_r(e.media.cache.directory);if(e.story)e.story.outDir=_r(e.story.outDir)}var Y=null,Z=new Map,me=new Map,ae=null;async function ai(e,r=Kt){try{return await r(e)}catch(i){if(i instanceof Error&&i.name==="ConfigNotFoundError")return{config:e.defaultConfig};throw i}}var er=/[\\/]install[\\/]cache[\\/](?:@[^\\/]+[\\/])?[^\\/]+@[^\\/]*@@@\d+[\\/]/;function Pc(e,r){let i=b.resolve(e,{paths:[r]});if(er.test(i))throw Error(`${e} is not installed in ${r} (found only in Bun's install cache)`);return i}async function a(e){let r=e?z.resolve(e):process.cwd(),i=me.get(r);if(i&&i.signature!==As(i.graph)){let l=Z.get(r);if(Z.delete(r),me.delete(r),!e)Y=null,ae=null;let{clearComponentCache:d}=await import("./chunk-4dk6k0ad.js"),{partialsCache:m}=await import("./chunk-nthw4dca.js");if(d(),m.clear(),l&&i.configSignature===Ps(i.graph)){let p=l.then(async(g)=>{let v={...i.graph};await li(v,r),me.set(r,{graph:v,signature:As(v),configSignature:Ps(v)});let h={...g,_layerGraph:v};if(!e)Y=h;return h});return Z.set(r,p),p}}if(!e){if(Y)return Y;if(ae)return ae}let o=Z.get(r);if(o)return o;let n=(async()=>{let l=[".ts",".js",".mjs",".cjs",".json"],d=l.some((x)=>Q.existsSync(z.join(r,`stx.config${x}`))),m=l.some((x)=>Q.existsSync(z.join(r,"config",`ui${x}`))),p;if(d&&m){let x=await ai({name:"ui",cwd:z.join(r,"config"),defaultConfig:U,errorPolicy:"throw",verbose:!1});p=(await ai({name:"stx",alias:"ui",cwd:r,defaultConfig:x.config,errorPolicy:"throw",verbose:!1})).config}else p=(await ai({name:"stx",alias:"ui",cwd:r,defaultConfig:U,errorPolicy:"throw",verbose:!1})).config;if(p.extends!==void 0||i){let x=await jc(r,U);p=x.config,me.set(r,{graph:x.graph,signature:As(x.graph),configSignature:Ps(x.graph)})}if(p.runtimeConfig){let{resolveRuntimeConfig:x}=await import("./chunk-32wvc376.js");x(p.runtimeConfig,{});let{generateRuntimeConfigTypes:w}=await import("./chunk-7ds9mx4c.js");await w(r,p.runtimeConfig)}Zt(p),Qt(p),ig(p,r),Xt(p,r);let g=[],v=new Set((p.plugins??[]).map((x)=>typeof x==="string"?x:x[0]));for(let x of p.componentPackages??["@stacksjs/components"]){let w=`${x}/stx-plugin`;if(v.has(w)||v.has(x))continue;try{Pc(w,r),g.push(w)}catch{}}let h=[...p.plugins??[],...g];if(h.length>0){let{pluginManager:x}=await import("./chunk-b1tcym2x.js"),w=[],C=[],A=new Set(p.componentPackages??["@stacksjs/components"]),P=[];for(let R of h){let _=typeof R==="string"?R:R[0],I=typeof R==="string"?{}:R[1]||{};try{let T,k;try{let S=Pc(_,r);T=await import(S),k=z.dirname(S)}catch{let S=z.resolve(r,_);T=await import(S),k=z.dirname(S)}let D=T.default||T;if(!x.has(D.name))await x.register(D,p);if(D.components){let S=Array.isArray(D.components)?D.components:[D.components],j=A.has(D.name)||A.has(_)||A.has(_.replace(/\/stx-plugin$/,""));for(let F of S){let N=z.resolve(k,F);w.push(N);let V=j;if(!V){let E=bi(z.join(N,"package.json"));if(E)try{let L=JSON.parse(Q.readFileSync(z.join(E,"package.json"),"utf8"));V=typeof L.name==="string"&&A.has(L.name)}catch{}}if(V)C.push(N)}}if(D.pages){let S=z.resolve(k,D.pages),j=I.path||"/";P.push({dir:S,prefix:j})}if(D.setup){let S={addDirective:(j)=>{p.customDirectives=p.customDirectives||[],p.customDirectives.push(j)},addRoute:(j,F)=>{p.apiRoutes=p.apiRoutes||{},p.apiRoutes[j]=F},addMiddleware:(j)=>{p.middleware=p.middleware||[],p.middleware.push(j)},pluginDir:k,config:p};await D.setup(I,S)}process.stderr.write(`[stx] Plugin loaded: ${D.name||_}
|
|
1310
|
-
`)}catch(T){console.warn(`[stx] Failed to load plugin ${_}:`,T.message)}}p._pluginComponentDirs=w,p._componentPackageDirs=C,p._pluginPageDirs=P}if(p.nativePrimitives!==!1)p._nativePrimitivesFallback={dir
|
|
1311
|
-
export{
|
|
1309
|
+
</script>`}var W={enabled:!0,ssr:!1,partialsDir:"partials",componentsDir:"components",layoutsDir:"layouts",defaultLayout:"default",debug:!1,cache:!0,stateDir:kn,cachePath:".stx/cache",cacheVersion:"1.0.0",componentRenderCacheBytes:33554432,build:{pagesDir:"pages",outputDir:"dist",baseUrl:"/",sitemap:!0,minify:!0,cache:!0,cacheDir:".stx/ssg-cache",concurrency:10,generate404:!0,publicDir:"public",trailingSlash:!1,cleanOutput:!0},customDirectives:[{name:"markdown",handler:je,hasEndTag:!0,description:"Render markdown content to HTML"},{name:"webcomponent",handler:et,hasEndTag:!1,description:"Include a web component in the template"},Vc,Uc,js,Bs,Ae,Re,Ee,_e,Oe,Te,Ue,De,...wo],middleware:[],i18n:{defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},webComponents:{enabled:!1,outputDir:"dist/web-components",components:[]},docs:{enabled:!1,outputDir:"docs",format:"markdown",components:!0,templates:!0,directives:!0},streaming:{enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},hydration:{enabled:!1,mode:"islands",clientEntry:"src/client.ts",autoMarkers:!0,preload:"lazy"},router:{enabled:!0,container:"main",linkSelector:"a[href]",viewTransitions:!0,scrollToTop:!0,scrollRestoration:!0,prefetch:!0,cache:!0,cacheTTL:300000,skipSelectors:'[data-no-router], [target="_blank"]',viewTransitionCSS:{oldRoot:"fade-out 0.15s ease-in",newRoot:"fade-in 0.2s ease-out",oldContent:"slide-out 0.2s ease-in",newContent:"slide-in 0.25s ease-out"}},a11y:{enabled:!0,addSrOnlyStyles:!0,level:"AA",autoFix:!1,ignoreChecks:[]},seo:{enabled:!0,socialPreview:!0,defaultConfig:{title:"stx Project",description:"A website built with stx templating engine"}},animation:{enabled:!0,defaultDuration:300,defaultEase:"ease",respectMotionPreferences:!0,staggerDelay:50},markdown:{enabled:!0,syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0,additionalThemes:["light-plus","one-dark-pro","dracula","monokai","solarized-light","nord","github-dark"]}},loops:{maxWhileIterations:1000,useAltLoopVariable:!1},story:{enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],port:6006},pwa:{enabled:!1,manifest:{name:"stx App",shortName:"stx",description:"A Progressive Web App built with stx",startUrl:"/",display:"standalone",orientation:"any",themeColor:"#000000",backgroundColor:"#ffffff",scope:"/"},icons:{src:"public/icon.png",sizes:[72,96,128,144,152,192,384,512],generateWebP:!0,generateAppleIcons:!0,outputDir:"pwa-icons",purpose:["any","maskable"]},routes:[{pattern:"/",strategy:"network-first"},{pattern:"/static/*",strategy:"cache-first",maxAgeSeconds:2592000},{pattern:"/api/*",strategy:"network-only"},{pattern:"*.js",strategy:"stale-while-revalidate"},{pattern:"*.css",strategy:"stale-while-revalidate"},{pattern:"*.png",strategy:"cache-first"},{pattern:"*.jpg",strategy:"cache-first"},{pattern:"*.webp",strategy:"cache-first"},{pattern:"*.svg",strategy:"cache-first"}],offline:{enabled:!0,fallbackTitle:"You are offline",fallbackMessage:"Please check your internet connection and try again.",precacheAssets:[]},serviceWorker:{fileName:"sw.js",cacheVersion:"1.0.0",skipWaiting:!0,clientsClaim:!0,navigationPreload:!1,excludeRoutes:["/api/auth/*"],cacheFileTypes:["html","css","js","png","jpg","jpeg","webp","svg","woff","woff2"],useWorkbox:!1},autoInject:!0,push:{enabled:!1,defaultOptions:{vibrate:[100,50,100],requireInteraction:!1}},backgroundSync:{enabled:!1,queueName:"stx-sync-queue",maxRetentionMinutes:1440,maxRetries:3,minInterval:1000,forms:[],endpoints:[]},shareTarget:{enabled:!1,action:"/share-target",method:"POST",enctype:"multipart/form-data",params:{title:"title",text:"text",url:"url"}},fileHandlers:{enabled:!1},protocolHandlers:[],cacheStorage:{maxSize:100,maxEntries:500,maxAge:30,purgeStrategy:"lru"},updates:{enabled:!0,promptUser:!0,autoReload:!1,message:"A new version is available. Reload to update?"},precache:{enabled:!0,includeHtml:!0,includeJs:!0,includeCss:!0,includeImages:!0,includeFonts:!0,include:[],exclude:["*.map","*.LICENSE.txt"],maxFileSizeKB:500}},media:{enabled:!0,image:{enabled:!0,defaultWidths:[320,480,640,768,1024,1280,1536,1920],defaultFormats:["avif","webp","jpeg"],defaultQuality:80,placeholderStrategy:"thumbhash",lazyByDefault:!0,enableDpr:!0,defaultDpr:[1,2,3],tsImages:{enabled:!0,outputDir:"dist/images",baseUrl:"/images",formatQuality:{jpeg:{quality:85,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4,lossless:!1}},breakpoints:[320,480,640,768,1024,1280,1536,1920],batchOptions:{concurrency:4,optimizationPreset:"web"}}},video:{enabled:!0,lazyByDefault:!0,defaultControls:!0,tsVideos:{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos",defaultQuality:"high",streaming:{enabled:!0,format:"hls",segmentDuration:6,defaultQualities:[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000}]},thumbnails:{enabled:!0,count:10,format:"webp",width:320},transcoding:{defaultCodec:"h264",defaultAudioCodec:"aac",speedPreset:"medium"}}},upload:{enabled:!0,maxSize:10485760,allowedTypes:["image/*","video/*","audio/*","application/pdf"],maxConcurrent:3},protected:{enabled:!0,expirationSeconds:3600,batchSize:10},cache:{enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500}},broadcasting:{enabled:!1,driver:"bun",host:"0.0.0.0",port:6001,scheme:"ws",verbose:!1}};function Gt(e,t,i){let o=t||"pages";if(e)return{root:e,pagesDir:o};let r=i||process.cwd(),l=V.join(r,"resources","views"),d=V.join(r,"resources","layouts");if(Q.existsSync(l)&&Q.existsSync(d))return{root:"resources",pagesDir:"views"};let m=V.join(r,"resources","views","pages");if(Q.existsSync(m))return{root:"resources/views",pagesDir:o};return{root:".",pagesDir:o}}var tt=new Set,ge=["partialsDir","componentsDir","layoutsDir"],Pe=new WeakMap;function Yt(e,t){let i=t.replace(/[\\/]+$/,"");if(!i||i===".")return!0;let o=e.replace(/\\/g,"/"),r=i.replace(/\\/g,"/");return o===r||o.startsWith(`${r}/`)}function hg(e,t){let i=!e.root,o=Gt(e.root,e.pagesDir,t);if(e.root=o.root,e.pagesDir=o.pagesDir,i&&o.root!=="."){let r=`${t}::${o.root}`;if(!tt.has(r))tt.add(r),console.warn(`[stx] No "root" in config \u2014 inferred "${o.root}" from the project layout. Template directories are resolved under it; set root explicitly to pin this.`)}if(!Pe.has(e)){let r={};for(let l of ge){let d=e[l];if(typeof d==="string"&&d)r[l]=d}Pe.set(e,r)}if(e.root&&e.root!=="."){let r=e.root;for(let l of ge){let d=e[l];if(typeof d!=="string"||!d)continue;if(V.isAbsolute(d)||Yt(d,r))continue;e[l]=V.join(r,d)}}for(let r of ge){let l=e[r];if(typeof l!=="string"||!l||V.isAbsolute(l))continue;e[r]=V.resolve(t,l)}return e}function Xt(e,t){let i=Pe.get(e);for(let o of ge){let r=e[o];if(typeof r!=="string"||!r)continue;let l=V.isAbsolute(r)?r:V.join(t,r);if(Q.existsSync(l))continue;let d=i?.[o]??r,m=e.root,p=!!m&&m!==".";console.warn(`[stx] ${String(o)} resolves to "${l}", which does not exist. Configured as "${d}"`+(p?`, resolved under root "${m}".`:"."))}}function Zt(e){if(e.customDirectives)e.customDirectives=[...e.customDirectives];if(e.middleware)e.middleware=[...e.middleware];if(e.apiRoutes)e.apiRoutes={...e.apiRoutes}}function Qt(e){if(Zc(e.stateDir),e.stateDir=$r(),e.cachePath=Rr(e.cachePath),e.build)e.build.cacheDir=Rr(e.build.cacheDir);if(e.media?.cache)e.media.cache.directory=Rr(e.media.cache.directory);if(e.story)e.story.outDir=Rr(e.story.outDir)}var Y=null,Z=new Map,me=new Map,ae=null;async function gi(e,t=Kt){try{return await t(e)}catch(i){if(i instanceof Error&&i.name==="ConfigNotFoundError")return{config:e.defaultConfig};throw i}}var er=/[\\/]install[\\/]cache[\\/](?:@[^\\/]+[\\/])?[^\\/]+@[^\\/]*@@@\d+[\\/]/;function Bc(e,t){let i=b.resolve(e,{paths:[t]});if(er.test(i))throw Error(`${e} is not installed in ${t} (found only in Bun's install cache)`);return i}async function a(e){let t=e?V.resolve(e):process.cwd(),i=me.get(t);if(i&&i.signature!==Ds(i.graph)){let l=Z.get(t);if(Z.delete(t),me.delete(t),!e)Y=null,ae=null;let{clearComponentCache:d}=await import("./chunk-w2kdhm7k.js"),{partialsCache:m}=await import("./chunk-2haf7t5h.js");if(d(),m.clear(),l&&i.configSignature===Ls(i.graph)){let p=l.then(async(g)=>{let v={...i.graph};await hi(v,t),me.set(t,{graph:v,signature:Ds(v),configSignature:Ls(v)});let h={...g,_layerGraph:v};if(!e)Y=h;return h});return Z.set(t,p),p}}if(!e){if(Y)return Y;if(ae)return ae}let o=Z.get(t);if(o)return o;let r=(async()=>{let l=[".ts",".js",".mjs",".cjs",".json"],d=l.some((x)=>Q.existsSync(V.join(t,`stx.config${x}`))),m=l.some((x)=>Q.existsSync(V.join(t,"config",`ui${x}`))),p;if(d&&m){let x=await gi({name:"ui",cwd:V.join(t,"config"),defaultConfig:W,errorPolicy:"throw",verbose:!1});p=(await gi({name:"stx",alias:"ui",cwd:t,defaultConfig:x.config,errorPolicy:"throw",verbose:!1})).config}else p=(await gi({name:"stx",alias:"ui",cwd:t,defaultConfig:W,errorPolicy:"throw",verbose:!1})).config;if(p.extends!==void 0||i){let x=await qc(t,W);p=x.config,me.set(t,{graph:x.graph,signature:Ds(x.graph),configSignature:Ls(x.graph)})}if(p.runtimeConfig){let{resolveRuntimeConfig:x}=await import("./chunk-pa2vt2ej.js");x(p.runtimeConfig,{});let{generateRuntimeConfigTypes:w}=await import("./chunk-7dq6ebvp.js");await w(t,p.runtimeConfig)}Zt(p),Qt(p),hg(p,t),Xt(p,t);let g=[],v=new Set((p.plugins??[]).map((x)=>typeof x==="string"?x:x[0]));for(let x of p.componentPackages??["@stacksjs/components"]){let w=`${x}/stx-plugin`;if(v.has(w)||v.has(x))continue;try{Bc(w,t),g.push(w)}catch{}}let h=[...p.plugins??[],...g];if(h.length>0){let{pluginManager:x}=await import("./chunk-xmmr0916.js"),w=[],C=[],A=new Set(p.componentPackages??["@stacksjs/components"]),P=[];for(let R of h){let _=typeof R==="string"?R:R[0],I=typeof R==="string"?{}:R[1]||{};try{let T,k;try{let S=Bc(_,t);T=await import(S),k=V.dirname(S)}catch{let S=V.resolve(t,_);T=await import(S),k=V.dirname(S)}let D=T.default||T;if(!x.has(D.name))await x.register(D,p);if(D.components){let S=Array.isArray(D.components)?D.components:[D.components],M=A.has(D.name)||A.has(_)||A.has(_.replace(/\/stx-plugin$/,""));for(let H of S){let j=V.resolve(k,H);w.push(j);let N=M;if(!N){let E=Ci(V.join(j,"package.json"));if(E)try{let z=JSON.parse(Q.readFileSync(V.join(E,"package.json"),"utf8"));N=typeof z.name==="string"&&A.has(z.name)}catch{}}if(N)C.push(j)}}if(D.pages){let S=V.resolve(k,D.pages),M=I.path||"/";P.push({dir:S,prefix:M})}if(D.setup){let S={addDirective:(M)=>{p.customDirectives=p.customDirectives||[],p.customDirectives.push(M)},addRoute:(M,H)=>{p.apiRoutes=p.apiRoutes||{},p.apiRoutes[M]=H},addMiddleware:(M)=>{p.middleware=p.middleware||[],p.middleware.push(M)},pluginDir:k,config:p};await D.setup(I,S)}process.stderr.write(`[stx] Plugin loaded: ${D.name||_}
|
|
1310
|
+
`)}catch(T){console.warn(`[stx] Failed to load plugin ${_}:`,T.message)}}p._pluginComponentDirs=w,p._componentPackageDirs=C,p._pluginPageDirs=P}if(p.nativePrimitives!==!1)p._nativePrimitivesFallback={dir:Ns(),except:["Button","Checkbox","Switch","TextInput","Image","Video"]};return p})();if(Z.set(t,r),r.catch(()=>{if(Z.get(t)===r)Z.delete(t)}),!e)ae=r,r.then((l)=>{Y=l}).catch(()=>{});return r}var L=new Proxy(W,{get(e,t){if(Y&&t in Y)return Y[t];if(!ae)a().catch((i)=>{console.warn("[stx] Failed to load config file:",i?.message||i)});return e[t]}});function by(e){return e}function wy(e){let t=[],i=[];if(e.partialsDir!==void 0&&typeof e.partialsDir!=="string")t.push({path:"partialsDir",message:"partialsDir must be a string",severity:"error"});if(e.componentsDir!==void 0&&typeof e.componentsDir!=="string")t.push({path:"componentsDir",message:"componentsDir must be a string",severity:"error"});if(e.cache!==void 0&&typeof e.cache!=="boolean")t.push({path:"cache",message:"cache must be a boolean",severity:"error"});if(e.debug!==void 0&&typeof e.debug!=="boolean")t.push({path:"debug",message:"debug must be a boolean",severity:"error"});if(e.streaming){if(e.streaming.bufferSize!==void 0){if(typeof e.streaming.bufferSize!=="number"||e.streaming.bufferSize<=0)t.push({path:"streaming.bufferSize",message:"streaming.bufferSize must be a positive number",severity:"error"})}if(e.streaming.timeout!==void 0){if(typeof e.streaming.timeout!=="number"||e.streaming.timeout<=0)t.push({path:"streaming.timeout",message:"streaming.timeout must be a positive number",severity:"error"})}if(e.streaming.strategy!==void 0){let o=["auto","manual","sections"];if(!o.includes(e.streaming.strategy))t.push({path:"streaming.strategy",message:`streaming.strategy must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.i18n){if(e.i18n.format!==void 0){let o=["json","yaml","yml","js"];if(!o.includes(e.i18n.format))t.push({path:"i18n.format",message:`i18n.format must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.animation){if(e.animation.defaultDuration!==void 0){if(typeof e.animation.defaultDuration!=="number"||e.animation.defaultDuration<0)t.push({path:"animation.defaultDuration",message:"animation.defaultDuration must be a non-negative number",severity:"error"})}if(e.animation.staggerDelay!==void 0){if(typeof e.animation.staggerDelay!=="number"||e.animation.staggerDelay<0)t.push({path:"animation.staggerDelay",message:"animation.staggerDelay must be a non-negative number",severity:"error"})}}if(e.a11y){if(e.a11y.level!==void 0){let o=["AA","AAA"];if(!o.includes(e.a11y.level))t.push({path:"a11y.level",message:`a11y.level must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.hydration){if(e.hydration.mode!==void 0){let o=["progressive","islands"];if(!o.includes(e.hydration.mode))t.push({path:"hydration.mode",message:`hydration.mode must be one of: ${o.join(", ")}`,severity:"error"})}if(e.hydration.preload!==void 0){let o=["none","eager","lazy"];if(!o.includes(e.hydration.preload))t.push({path:"hydration.preload",message:`hydration.preload must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.customDirectives)if(!Array.isArray(e.customDirectives))t.push({path:"customDirectives",message:"customDirectives must be an array",severity:"error"});else e.customDirectives.forEach((o,r)=>{if(!o.name||typeof o.name!=="string")t.push({path:`customDirectives[${r}].name`,message:"Custom directive must have a name string",severity:"error"});if(!o.handler||typeof o.handler!=="function")t.push({path:`customDirectives[${r}].handler`,message:"Custom directive must have a handler function",severity:"error"})});if(e.middleware)if(!Array.isArray(e.middleware))t.push({path:"middleware",message:"middleware must be an array",severity:"error"});else e.middleware.forEach((o,r)=>{if(!o.name||typeof o.name!=="string")t.push({path:`middleware[${r}].name`,message:"Middleware must have a name string",severity:"error"});if(!o.handler||typeof o.handler!=="function")t.push({path:`middleware[${r}].handler`,message:"Middleware must have a handler function",severity:"error"});if(!o.timing||!["before","after"].includes(o.timing))t.push({path:`middleware[${r}].timing`,message:'Middleware timing must be "before" or "after"',severity:"error"})});if(e.debug===!0&&e.cache===!0)i.push({path:"debug+cache",message:"Debug mode with caching enabled may show stale content during development",severity:"warning"});if(e.seo?.enabled===!0&&!e.seo?.defaultConfig?.title)i.push({path:"seo.defaultConfig.title",message:"SEO is enabled but no default title is set",severity:"warning"});if(e.pwa){if(e.pwa.enabled===!0&&!e.pwa.manifest?.name)t.push({path:"pwa.manifest.name",message:"PWA manifest name is required when PWA is enabled",severity:"error"});if(e.pwa.manifest?.display!==void 0){let o=["fullscreen","standalone","minimal-ui","browser"];if(!o.includes(e.pwa.manifest.display))t.push({path:"pwa.manifest.display",message:`PWA display must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.manifest?.orientation!==void 0){let o=["portrait","landscape","any","portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"];if(!o.includes(e.pwa.manifest.orientation))t.push({path:"pwa.manifest.orientation",message:`PWA orientation must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.routes){let o=["cache-first","network-first","stale-while-revalidate","network-only","cache-only"];e.pwa.routes.forEach((r,l)=>{if(!r.pattern||typeof r.pattern!=="string")t.push({path:`pwa.routes[${l}].pattern`,message:"PWA route must have a pattern string",severity:"error"});if(!o.includes(r.strategy))t.push({path:`pwa.routes[${l}].strategy`,message:`PWA route strategy must be one of: ${o.join(", ")}`,severity:"error"});if(r.maxAgeSeconds!==void 0&&(typeof r.maxAgeSeconds!=="number"||r.maxAgeSeconds<0))t.push({path:`pwa.routes[${l}].maxAgeSeconds`,message:"PWA route maxAgeSeconds must be a non-negative number",severity:"error"});if(r.maxEntries!==void 0&&(typeof r.maxEntries!=="number"||r.maxEntries<1))t.push({path:`pwa.routes[${l}].maxEntries`,message:"PWA route maxEntries must be a positive number",severity:"error"})})}if(e.pwa.icons?.sizes){if(!Array.isArray(e.pwa.icons.sizes))t.push({path:"pwa.icons.sizes",message:"PWA icon sizes must be an array of numbers",severity:"error"});else if(e.pwa.icons.sizes.filter((r)=>typeof r!=="number"||r<16||r>1024).length>0)t.push({path:"pwa.icons.sizes",message:"PWA icon sizes must be numbers between 16 and 1024",severity:"error"})}if(e.pwa.icons?.purpose){let o=["any","maskable","monochrome"];if(e.pwa.icons.purpose.filter((l)=>!o.includes(l)).length>0)t.push({path:"pwa.icons.purpose",message:`PWA icon purpose must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.enabled===!0&&!e.pwa.icons?.src)i.push({path:"pwa.icons.src",message:"PWA is enabled but no icon source specified. Provide a 512x512 PNG for best results.",severity:"warning"});if(e.pwa.enabled===!0&&!e.pwa.manifest?.themeColor)i.push({path:"pwa.manifest.themeColor",message:"PWA theme color not set, defaulting to black",severity:"warning"})}return{valid:t.length===0,errors:t,warnings:i}}
|
|
1311
|
+
export{Dc,Lc,_r,ut,jc,Ns,Ms,W,hg,gi,Bc,a,L,by,wy};
|