@stacksjs/stx 0.2.412 → 0.2.414
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/appearance-bootstrap.js +1 -1
- package/dist/binding-manifest.d.ts +1 -1
- package/dist/builtins/image-delivery.d.ts +38 -0
- package/dist/builtins/image-delivery.js +17 -0
- package/dist/builtins/stx-image.js +1 -5
- package/dist/bundle-analyzer.js +20 -20
- package/dist/chunk-020xyn9q.js +3 -0
- package/dist/chunk-04jhmfbz.js +2 -0
- package/dist/chunk-10957mcb.js +2 -0
- package/dist/chunk-1098mas0.js +2 -0
- package/dist/chunk-169n1vpx.js +12 -0
- package/dist/chunk-1b6t12hd.js +2 -0
- package/dist/chunk-1chw8xsw.js +2 -0
- package/dist/chunk-1xdzcy9d.js +14 -0
- package/dist/chunk-2ce7f416.js +2 -0
- package/dist/chunk-2gr351s0.js +7 -0
- package/dist/chunk-2mkcjw08.js +2 -0
- package/dist/chunk-2v8wztd5.js +2 -0
- package/dist/chunk-340a824p.js +2 -0
- package/dist/chunk-39g1134q.js +2 -0
- package/dist/chunk-3c74vag1.js +2 -0
- package/dist/chunk-3kthfs03.js +3 -0
- package/dist/chunk-3qn1wcdg.js +2 -0
- package/dist/chunk-3s2vnqcf.js +2 -0
- package/dist/chunk-48bwk47q.js +2 -0
- package/dist/chunk-4bjravgk.js +2 -0
- package/dist/chunk-4jjme6a5.js +2 -0
- package/dist/chunk-5g3y8kym.js +2 -0
- package/dist/chunk-5gsxpaqk.js +2 -0
- package/dist/{chunk-bwsxym3d.js → chunk-5qns2sdz.js} +17 -17
- package/dist/chunk-69mc2np8.js +2785 -0
- package/dist/chunk-6cfa3g0r.js +2 -0
- package/dist/{chunk-bjar18jd.js → chunk-6h38kkjf.js} +46 -52
- package/dist/chunk-6hc5vz20.js +3 -0
- package/dist/chunk-6q6g76vg.js +499 -0
- package/dist/{chunk-dbc5awz9.js → chunk-6sgswrqw.js} +29 -29
- package/dist/chunk-6y8hnymb.js +2 -0
- package/dist/chunk-74j18qk0.js +930 -0
- package/dist/chunk-752hw7cd.js +4 -0
- package/dist/{chunk-t5ja7qkn.js → chunk-765e1s44.js} +11 -76
- package/dist/chunk-7gkv67ky.js +4 -0
- package/dist/chunk-7z2ra0yf.js +2 -0
- package/dist/chunk-866n724v.js +2 -0
- package/dist/chunk-8nhshfz6.js +5 -0
- package/dist/chunk-92ps1xpk.js +2 -0
- package/dist/chunk-9g27ybyr.js +3 -0
- package/dist/{chunk-xq1acw1r.js → chunk-9pt8fd2n.js} +13 -13
- package/dist/{chunk-qvnbnsv9.js → chunk-9vrja6vp.js} +4 -4
- package/dist/chunk-9xrbve19.js +2 -0
- package/dist/chunk-a688m6js.js +3 -0
- package/dist/chunk-afhxw2t8.js +2 -0
- package/dist/chunk-ak1cgcah.js +5 -0
- package/dist/{chunk-4m7ajama.js → chunk-amd6ey3t.js} +14 -14
- package/dist/chunk-apg16xcn.js +2 -0
- package/dist/chunk-b52s5z0c.js +2 -0
- package/dist/chunk-b84h16er.js +61 -0
- package/dist/{chunk-hx998w7n.js → chunk-bay9s6rs.js} +13 -13
- package/dist/chunk-bmt7w2pk.js +2 -0
- package/dist/chunk-btmhj5t7.js +2 -0
- package/dist/chunk-ce1sejr3.js +3 -0
- package/dist/chunk-cg8hg6cs.js +3 -0
- package/dist/{chunk-8wp64mym.js → chunk-czxt605c.js} +4 -5
- package/dist/chunk-d44b9ktb.js +4 -0
- package/dist/chunk-daz5aqcf.js +24 -0
- package/dist/chunk-dgdm3hy3.js +2 -0
- package/dist/chunk-dvgv8nry.js +11 -0
- package/dist/chunk-dx7n22ed.js +2 -0
- package/dist/chunk-e57rhf65.js +3 -0
- package/dist/chunk-eed4fwps.js +3 -0
- package/dist/chunk-ej9j6k1q.js +3 -0
- package/dist/chunk-et0rr8c7.js +3 -0
- package/dist/chunk-f46qsp4m.js +4 -0
- package/dist/chunk-f6az0xj5.js +2 -0
- package/dist/{chunk-bjcsc6wx.js → chunk-fh1qrp68.js} +21 -21
- package/dist/chunk-fjs0a8h7.js +2 -0
- package/dist/chunk-fr2txj8q.js +829 -0
- package/dist/{chunk-vx86cf4r.js → chunk-ft4p6d28.js} +14 -14
- package/dist/chunk-fyzajkrx.js +2 -0
- package/dist/chunk-fzapbw9p.js +3 -0
- package/dist/chunk-g578mcb0.js +194 -0
- package/dist/chunk-gawrg4gb.js +216 -0
- package/dist/chunk-gw07qmjk.js +2 -0
- package/dist/chunk-h0atqq82.js +32 -0
- package/dist/chunk-h6zsqb9r.js +3 -0
- package/dist/{chunk-hdysywd8.js → chunk-h85hrwkq.js} +13 -13
- package/dist/chunk-hbxz85wy.js +2 -0
- package/dist/chunk-hjg3ndgh.js +2 -0
- package/dist/chunk-hkxsewzk.js +2 -0
- package/dist/chunk-hrbbbtbn.js +2 -0
- package/dist/chunk-j03revz2.js +8 -0
- package/dist/chunk-j9qcrwbg.js +2 -0
- package/dist/chunk-jk4njz0w.js +2 -0
- package/dist/chunk-jmabeqfq.js +2 -0
- package/dist/chunk-jt0n43mk.js +2 -0
- package/dist/chunk-kjbv8a3m.js +2 -0
- package/dist/chunk-m1vdghnx.js +2 -0
- package/dist/chunk-m4sk62wb.js +5 -0
- package/dist/chunk-md8rqn48.js +30 -0
- package/dist/chunk-mepdnezf.js +17 -0
- package/dist/chunk-mhq0pjws.js +2 -0
- package/dist/chunk-mp6hy8g4.js +2 -0
- package/dist/chunk-ngc2wke4.js +3 -0
- package/dist/chunk-nn2vstke.js +2 -0
- package/dist/chunk-p2v2a68k.js +2 -0
- package/dist/{chunk-qn5srnj3.js → chunk-pbh4smw3.js} +16 -16
- package/dist/chunk-pdt69hpb.js +2 -0
- package/dist/chunk-pgzvyrv6.js +29 -0
- package/dist/chunk-pj1wg7jg.js +2 -0
- package/dist/chunk-pqxzp1bb.js +3 -0
- package/dist/chunk-px7fvbj6.js +3 -0
- package/dist/chunk-q4c06e8x.js +20 -0
- package/dist/chunk-q6vrb2pe.js +2 -0
- package/dist/chunk-q7qchkvk.js +2 -0
- package/dist/chunk-q9bdh4s5.js +8 -0
- package/dist/chunk-qet5gc6s.js +2033 -0
- package/dist/chunk-qz519eyp.js +2 -0
- package/dist/chunk-r3f9jcf7.js +5 -0
- package/dist/chunk-rs4v4fha.js +4 -0
- package/dist/chunk-s2x4wcrz.js +2 -0
- package/dist/chunk-s5xezjps.js +3 -0
- package/dist/chunk-scezfp0w.js +30 -0
- package/dist/chunk-sd321bn3.js +2 -0
- package/dist/{chunk-eenk6s3t.js → chunk-sd47dzs0.js} +79 -79
- package/dist/chunk-se7mwqd1.js +2 -0
- package/dist/chunk-shr559s7.js +3 -0
- package/dist/chunk-syaw6b75.js +2 -0
- package/dist/chunk-t4hzprsm.js +3 -0
- package/dist/{chunk-s9za1vvd.js → chunk-t61vdbje.js} +89 -89
- package/dist/chunk-tfexmdkt.js +3 -0
- package/dist/chunk-thyt8ed8.js +6 -0
- package/dist/chunk-v091jft4.js +12 -0
- package/dist/chunk-v4vaqxrf.js +33 -0
- package/dist/chunk-vgvtnwxa.js +4 -0
- package/dist/chunk-x0q32ees.js +3 -0
- package/dist/chunk-x5bpeb4a.js +2 -0
- package/dist/chunk-x72tv2cg.js +3 -0
- package/dist/chunk-xfp7k0v8.js +64 -0
- package/dist/chunk-xtdw3692.js +6 -0
- package/dist/chunk-y1cmjvk3.js +43 -0
- package/dist/chunk-y5310237.js +311 -0
- package/dist/chunk-ya0qecph.js +27 -0
- package/dist/chunk-yazk54jr.js +8 -0
- package/dist/chunk-ydjfar14.js +2 -0
- package/dist/chunk-ym95v4nc.js +3 -0
- package/dist/chunk-ynvdvbat.js +18 -0
- package/dist/chunk-yvx1ap9b.js +3 -0
- package/dist/chunk-z0g9jvv0.js +40 -0
- package/dist/chunk-z6d0jmjb.js +2 -0
- package/dist/{chunk-fpwzacpm.js → chunk-zhxdpzga.js} +4 -4
- package/dist/cli.js +110 -110
- package/dist/craft-entry.js +7 -7
- package/dist/craft.js +7 -7
- package/dist/database.js +2 -2
- package/dist/image-optimization/component.js +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/media/image/component.js +5 -5
- package/dist/media/protected/component.js +2 -2
- package/dist/media/video/index.js +4 -4
- package/dist/native/bridge/protocol.d.ts +325 -0
- package/dist/native/bridge/protocol.js +219 -0
- package/dist/native/cli.d.ts +24 -0
- package/dist/native/cli.js +52 -0
- package/dist/native/compiler/bundle.d.ts +41 -0
- package/dist/native/compiler/bundle.js +90 -0
- package/dist/native/compiler/client-script.d.ts +8 -0
- package/dist/native/compiler/client-script.js +31 -0
- package/dist/native/compiler/codegen.d.ts +10 -0
- package/dist/native/compiler/codegen.js +145 -0
- package/dist/native/compiler/headwind-to-style.d.ts +395 -0
- package/dist/native/compiler/headwind-to-style.js +1163 -0
- package/dist/native/compiler/html-to-ir.d.ts +41 -0
- package/dist/native/compiler/html-to-ir.js +411 -0
- package/dist/native/compiler/icons.d.ts +220 -0
- package/dist/native/compiler/icons.js +208 -0
- package/dist/native/compiler/ir.d.ts +234 -0
- package/dist/native/compiler/ir.js +15 -0
- package/dist/native/compiler/parser.d.ts +88 -0
- package/dist/native/compiler/parser.js +753 -0
- package/dist/native/compiler/render-screen.d.ts +26 -0
- package/dist/native/compiler/render-screen.js +31 -0
- package/dist/native/components/primitives.d.ts +291 -0
- package/dist/native/components/primitives.js +22 -0
- package/dist/native/hot-reload/client.d.ts +62 -0
- package/dist/native/hot-reload/client.js +324 -0
- package/dist/native/index.d.ts +90 -0
- package/dist/native/index.js +34 -0
- package/dist/native/primitives/ActivityIndicator.stx +5 -0
- package/dist/native/primitives/Button.stx +5 -0
- package/dist/native/primitives/DatePicker.stx +5 -0
- package/dist/native/primitives/FlatList.stx +5 -0
- package/dist/native/primitives/Image.stx +5 -0
- package/dist/native/primitives/ImageBackground.stx +5 -0
- package/dist/native/primitives/KeyboardAvoidingView.stx +5 -0
- package/dist/native/primitives/Modal.stx +5 -0
- package/dist/native/primitives/Picker.stx +5 -0
- package/dist/native/primitives/Pressable.stx +5 -0
- package/dist/native/primitives/RefreshControl.stx +5 -0
- package/dist/native/primitives/SafeAreaView.stx +5 -0
- package/dist/native/primitives/ScrollView.stx +5 -0
- package/dist/native/primitives/SectionList.stx +5 -0
- package/dist/native/primitives/Slider.stx +5 -0
- package/dist/native/primitives/StatusBar.stx +5 -0
- package/dist/native/primitives/Switch.stx +5 -0
- package/dist/native/primitives/Text.stx +5 -0
- package/dist/native/primitives/TextInput.stx +5 -0
- package/dist/native/primitives/TouchableHighlight.stx +5 -0
- package/dist/native/primitives/TouchableOpacity.stx +5 -0
- package/dist/native/primitives/View.stx +5 -0
- package/dist/native/runtime/craft.d.ts +75 -0
- package/dist/native/runtime/craft.js +0 -0
- package/dist/native/runtime/entry.d.ts +1 -0
- package/dist/native/runtime/entry.js +3 -0
- package/dist/native/runtime/index.d.ts +45 -0
- package/dist/native/runtime/index.js +165 -0
- package/dist/native/runtime/native-host.d.ts +33 -0
- package/dist/native/runtime/native-host.js +184 -0
- package/dist/native/runtime/screen.d.ts +43 -0
- package/dist/native/runtime/screen.js +808 -0
- package/dist/pwa/service-worker.js +1 -1
- package/dist/pwa/workbox.js +1 -1
- package/dist/pwa.js +8 -8
- package/dist/site-url.d.ts +1 -1
- package/dist/ssg.js +53 -53
- package/dist/visual-testing.js +42 -42
- package/dist/web-components/reactive-generator.js +2 -2
- package/package.json +9 -5
- package/dist/chunk-00g9x6w2.js +0 -2
- package/dist/chunk-04tgatyy.js +0 -2
- package/dist/chunk-097jnwd5.js +0 -2
- package/dist/chunk-0btmm4m2.js +0 -147
- package/dist/chunk-0c2h69k2.js +0 -4
- package/dist/chunk-0pkk226n.js +0 -2
- package/dist/chunk-0we9nw1d.js +0 -3
- package/dist/chunk-0y46fbkx.js +0 -3
- package/dist/chunk-18n1ftn0.js +0 -33
- package/dist/chunk-1a0v39k5.js +0 -3
- package/dist/chunk-1fs9jvpb.js +0 -2
- package/dist/chunk-1qq26zt0.js +0 -2
- package/dist/chunk-1te8k8gp.js +0 -3
- package/dist/chunk-1ws3xcea.js +0 -1199
- package/dist/chunk-213jwgpx.js +0 -3
- package/dist/chunk-24w86pek.js +0 -32
- package/dist/chunk-27fgag95.js +0 -4
- package/dist/chunk-2fw05hs2.js +0 -3
- package/dist/chunk-2tbez006.js +0 -2
- package/dist/chunk-38wvkv3s.js +0 -2
- package/dist/chunk-3rkejwjp.js +0 -2
- package/dist/chunk-3t65wb35.js +0 -2
- package/dist/chunk-3w6z6tw9.js +0 -2
- package/dist/chunk-4q1c6fw2.js +0 -7
- package/dist/chunk-50pszj17.js +0 -2
- package/dist/chunk-563shnkz.js +0 -3
- package/dist/chunk-5h104qh1.js +0 -2
- package/dist/chunk-5qjk7drw.js +0 -20
- package/dist/chunk-603x5gb2.js +0 -2
- package/dist/chunk-6kd5jjwc.js +0 -2
- package/dist/chunk-6kdrncsx.js +0 -30
- package/dist/chunk-6zggmce7.js +0 -4422
- package/dist/chunk-72rwcbp6.js +0 -3
- package/dist/chunk-76w34xne.js +0 -3
- package/dist/chunk-7dmgt8at.js +0 -2
- package/dist/chunk-82pd4b5w.js +0 -2
- package/dist/chunk-8d7nf67s.js +0 -2
- package/dist/chunk-8w2mqdnv.js +0 -2
- package/dist/chunk-90b2vt2n.js +0 -2
- package/dist/chunk-9e8t0twa.js +0 -3
- package/dist/chunk-9fqp72ze.js +0 -5
- package/dist/chunk-9xew0kgf.js +0 -2
- package/dist/chunk-a7bnvz91.js +0 -24
- package/dist/chunk-akwd34xt.js +0 -29
- package/dist/chunk-anydpa34.js +0 -3
- package/dist/chunk-aq1xq0r4.js +0 -16
- package/dist/chunk-bbt3tp6f.js +0 -499
- package/dist/chunk-bn1edb1y.js +0 -47
- package/dist/chunk-btd7ds3x.js +0 -2
- package/dist/chunk-c4511wng.js +0 -2
- package/dist/chunk-c4h579e3.js +0 -2
- package/dist/chunk-cj3adc77.js +0 -5
- package/dist/chunk-cs54ek9m.js +0 -6
- package/dist/chunk-ct1jwd4r.js +0 -2
- package/dist/chunk-cxrgxzxc.js +0 -2
- package/dist/chunk-de8t7sc9.js +0 -17
- package/dist/chunk-fcnrgxck.js +0 -2
- package/dist/chunk-fqzcft9d.js +0 -2
- package/dist/chunk-gbmeh7jg.js +0 -3
- package/dist/chunk-gc06g35w.js +0 -2
- package/dist/chunk-gs18069g.js +0 -194
- package/dist/chunk-gvbf1mhs.js +0 -930
- package/dist/chunk-h564hgzt.js +0 -2
- package/dist/chunk-h83jrhfq.js +0 -3
- package/dist/chunk-hj4vpyhp.js +0 -2
- package/dist/chunk-hrkvsj5c.js +0 -11
- package/dist/chunk-hyr4ag1k.js +0 -2
- package/dist/chunk-jxvmf02k.js +0 -2
- package/dist/chunk-k5ptvy0b.js +0 -4
- package/dist/chunk-k80sn8d1.js +0 -2
- package/dist/chunk-k8t2cmyd.js +0 -2
- package/dist/chunk-kmsyvaex.js +0 -8
- package/dist/chunk-kq4b6cwj.js +0 -2
- package/dist/chunk-kvmx7dnb.js +0 -2
- package/dist/chunk-kxc2h5vn.js +0 -5
- package/dist/chunk-mbxehgrq.js +0 -2
- package/dist/chunk-mgnq5de2.js +0 -2
- package/dist/chunk-mgrckqww.js +0 -2
- package/dist/chunk-mq5ewmz6.js +0 -2
- package/dist/chunk-mrahwn5v.js +0 -8
- package/dist/chunk-n2swas11.js +0 -3
- package/dist/chunk-n4299xgy.js +0 -2
- package/dist/chunk-naw4jt7j.js +0 -2
- package/dist/chunk-ny67c03k.js +0 -3
- package/dist/chunk-p4jb9v0w.js +0 -2
- package/dist/chunk-p4zrvt5f.js +0 -14
- package/dist/chunk-p5wp0ce6.js +0 -43
- package/dist/chunk-pcxp4r9n.js +0 -3
- package/dist/chunk-pjrn29gg.js +0 -2
- package/dist/chunk-prxwsp7n.js +0 -2
- package/dist/chunk-py2r6wtv.js +0 -2
- package/dist/chunk-q738pwv6.js +0 -2
- package/dist/chunk-q9n5swx7.js +0 -3
- package/dist/chunk-qmmp5kb5.js +0 -2
- package/dist/chunk-qqpqgwvb.js +0 -30
- package/dist/chunk-rcv2ehpq.js +0 -18
- package/dist/chunk-rq414kn5.js +0 -3
- package/dist/chunk-rz9f3zqz.js +0 -7
- package/dist/chunk-s6g8wksg.js +0 -2
- package/dist/chunk-s8jd13nb.js +0 -3
- package/dist/chunk-spxsw4mp.js +0 -2
- package/dist/chunk-strcy64y.js +0 -2
- package/dist/chunk-t1htzg9e.js +0 -4
- package/dist/chunk-t1tdjjht.js +0 -216
- package/dist/chunk-tat1cjec.js +0 -2
- package/dist/chunk-td08rnk3.js +0 -3
- package/dist/chunk-tgadbsd4.js +0 -2
- package/dist/chunk-tgrpp58r.js +0 -2
- package/dist/chunk-tkyrk66a.js +0 -3
- package/dist/chunk-tp8pzf94.js +0 -3
- package/dist/chunk-twz64kvy.js +0 -2
- package/dist/chunk-v3nwkveg.js +0 -12
- package/dist/chunk-vsbmc9kt.js +0 -2
- package/dist/chunk-vzgzaw66.js +0 -12
- package/dist/chunk-wc66mcn4.js +0 -4367
- package/dist/chunk-wkanrfb3.js +0 -2
- package/dist/chunk-x8f6wqxd.js +0 -2
- package/dist/chunk-xsng1mtq.js +0 -3
- package/dist/chunk-xwts5yky.js +0 -4
- package/dist/chunk-z5rwnnk1.js +0 -3
- package/dist/chunk-zcz9rs6p.js +0 -3
- package/dist/chunk-zpcnbdhn.js +0 -64
- package/dist/chunk-zq4ssxj9.js +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function
|
|
2
|
+
function v(){return`<script data-stx-hydration-runtime>
|
|
3
3
|
(function() {
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
@@ -159,16 +159,10 @@ else {
|
|
|
159
159
|
stxIslands.initIslands();
|
|
160
160
|
}
|
|
161
161
|
})();
|
|
162
|
-
</script>`}function
|
|
163
|
-
|
|
164
|
-
if (!window.__stxIslands) return;
|
|
165
|
-
${Array.from(q.entries()).map(([w,z])=>` window.__stxIslands.register('${w}', function() { return import('${z}'); });`).join(`
|
|
166
|
-
`)}
|
|
167
|
-
})();
|
|
168
|
-
</script>`}function E(q){let j=q.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(j)return j[1];let w=q.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(w)return w[1];return null}function V(q,j){let w={},z=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,G;while((G=z.exec(q))!==null){let K=G[1],Q=G[2];if(Q in j)w[K]=j[Q];else w[K]=Q}return w}function f(){let q=new Map;return{islands:q,register(j){q.set(j.id,j)},get(j){return q.get(j)},async hydrate(j){let w=q.get(j);if(!w||w.hydrated)return;if(w.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:j,component:w.component}}))},async hydrateAll(){let j=Array.from(q.values()).filter((w)=>!w.hydrated).map((w)=>this.hydrate(w.id));await Promise.all(j)}}}function k(q){return`
|
|
169
|
-
<script data-hydrate="${q}">
|
|
162
|
+
</script>`}function b(e){let t=e.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(t)return t[1];let n=e.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(n)return n[1];return null}function w(e,t){let n={},r=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,i;while((i=r.exec(e))!==null){let d=i[1],o=i[2];if(o in t)n[d]=t[o];else n[d]=o}return n}function fa(){let e=new Map;return{islands:e,register(t){e.set(t.id,t)},get(t){return e.get(t)},async hydrate(t){let n=e.get(t);if(!n||n.hydrated)return;if(n.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:t,component:n.component}}))},async hydrateAll(){let t=Array.from(e.values()).filter((n)=>!n.hydrated).map((n)=>this.hydrate(n.id));await Promise.all(t)}}}function I(e){return`
|
|
163
|
+
<script data-hydrate="${e}">
|
|
170
164
|
(function() {
|
|
171
|
-
const island = document.querySelector('[data-island="${
|
|
165
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
172
166
|
if (!island) return;
|
|
173
167
|
|
|
174
168
|
// Immediately hydrate
|
|
@@ -176,10 +170,10 @@ ${Array.from(q.entries()).map(([w,z])=>` window.__stxIslands.register('${w}', f
|
|
|
176
170
|
island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
177
171
|
})();
|
|
178
172
|
</script>
|
|
179
|
-
`}function
|
|
180
|
-
<script data-hydrate="${
|
|
173
|
+
`}function L(e,t){let n=t.timeout||2000,r=t.priority||"low";return`
|
|
174
|
+
<script data-hydrate="${e}">
|
|
181
175
|
(function() {
|
|
182
|
-
const island = document.querySelector('[data-island="${
|
|
176
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
183
177
|
if (!island) return;
|
|
184
178
|
|
|
185
179
|
function hydrate() {
|
|
@@ -189,8 +183,8 @@ ${Array.from(q.entries()).map(([w,z])=>` window.__stxIslands.register('${w}', f
|
|
|
189
183
|
}
|
|
190
184
|
|
|
191
185
|
if ('requestIdleCallback' in window) {
|
|
192
|
-
const idleOptions = { timeout: ${
|
|
193
|
-
${
|
|
186
|
+
const idleOptions = { timeout: ${n} };
|
|
187
|
+
${r==="high"?"requestIdleCallback(hydrate, idleOptions);":`
|
|
194
188
|
// Low priority: wait for multiple idle periods
|
|
195
189
|
let idleCount = 0;
|
|
196
190
|
function waitForIdle() {
|
|
@@ -208,14 +202,14 @@ else {
|
|
|
208
202
|
}
|
|
209
203
|
else {
|
|
210
204
|
// Fallback for browsers without requestIdleCallback
|
|
211
|
-
setTimeout(hydrate, ${
|
|
205
|
+
setTimeout(hydrate, ${n});
|
|
212
206
|
}
|
|
213
207
|
})();
|
|
214
208
|
</script>
|
|
215
|
-
`}function
|
|
216
|
-
<script data-hydrate="${
|
|
209
|
+
`}function C(e,t){let n=t.rootMargin||"0px",r=t.threshold||0;return`
|
|
210
|
+
<script data-hydrate="${e}">
|
|
217
211
|
(function() {
|
|
218
|
-
const island = document.querySelector('[data-island="${
|
|
212
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
219
213
|
if (!island) return;
|
|
220
214
|
|
|
221
215
|
function hydrate() {
|
|
@@ -233,8 +227,8 @@ else {
|
|
|
233
227
|
}
|
|
234
228
|
});
|
|
235
229
|
}, {
|
|
236
|
-
rootMargin: '${
|
|
237
|
-
threshold: ${JSON.stringify(
|
|
230
|
+
rootMargin: '${n}',
|
|
231
|
+
threshold: ${JSON.stringify(r)}
|
|
238
232
|
});
|
|
239
233
|
|
|
240
234
|
observer.observe(island);
|
|
@@ -245,10 +239,10 @@ else {
|
|
|
245
239
|
}
|
|
246
240
|
})();
|
|
247
241
|
</script>
|
|
248
|
-
`}function
|
|
249
|
-
<script data-hydrate="${
|
|
242
|
+
`}function S(e,t){let n=t.media||"(min-width: 768px)";return`
|
|
243
|
+
<script data-hydrate="${e}">
|
|
250
244
|
(function() {
|
|
251
|
-
const island = document.querySelector('[data-island="${
|
|
245
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
252
246
|
if (!island) return;
|
|
253
247
|
|
|
254
248
|
function hydrate() {
|
|
@@ -257,7 +251,7 @@ else {
|
|
|
257
251
|
island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
|
|
258
252
|
}
|
|
259
253
|
|
|
260
|
-
const mediaQuery = window.matchMedia('${
|
|
254
|
+
const mediaQuery = window.matchMedia('${n}');
|
|
261
255
|
|
|
262
256
|
function handleMediaChange(e) {
|
|
263
257
|
if (e.matches) {
|
|
@@ -274,10 +268,10 @@ else {
|
|
|
274
268
|
}
|
|
275
269
|
})();
|
|
276
270
|
</script>
|
|
277
|
-
`}function
|
|
278
|
-
<script data-hydrate="${
|
|
271
|
+
`}function k(e){return`
|
|
272
|
+
<script data-hydrate="${e}">
|
|
279
273
|
(function() {
|
|
280
|
-
const island = document.querySelector('[data-island="${
|
|
274
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
281
275
|
if (!island) return;
|
|
282
276
|
|
|
283
277
|
function hydrate() {
|
|
@@ -296,10 +290,10 @@ else {
|
|
|
296
290
|
events.forEach(e => island.addEventListener(e, handler, { once: true, passive: true }));
|
|
297
291
|
})();
|
|
298
292
|
</script>
|
|
299
|
-
`}function
|
|
300
|
-
<script data-hydrate="${
|
|
293
|
+
`}function H(e,t){let n=t.event||"stx:activate";return`
|
|
294
|
+
<script data-hydrate="${e}">
|
|
301
295
|
(function() {
|
|
302
|
-
const island = document.querySelector('[data-island="${
|
|
296
|
+
const island = document.querySelector('[data-island="${e}"]');
|
|
303
297
|
if (!island) return;
|
|
304
298
|
|
|
305
299
|
function hydrate() {
|
|
@@ -309,36 +303,36 @@ else {
|
|
|
309
303
|
}
|
|
310
304
|
|
|
311
305
|
// Listen for custom event
|
|
312
|
-
window.addEventListener('${
|
|
313
|
-
if (!e.detail || e.detail.id === '${
|
|
314
|
-
window.removeEventListener('${
|
|
306
|
+
window.addEventListener('${n}', function handler(e) {
|
|
307
|
+
if (!e.detail || e.detail.id === '${e}' || e.detail.id === '*') {
|
|
308
|
+
window.removeEventListener('${n}', handler);
|
|
315
309
|
hydrate();
|
|
316
310
|
}
|
|
317
311
|
});
|
|
318
312
|
})();
|
|
319
313
|
</script>
|
|
320
|
-
`}function
|
|
321
|
-
`+
|
|
322
|
-
<script type="application/json" data-island-props="${
|
|
323
|
-
<div data-island="${
|
|
324
|
-
data-strategy="${
|
|
325
|
-
${
|
|
314
|
+
`}function ga(e,t={},n){let r=e,i=!1,d=/@client:(load|idle|visible|media|only|hover|event)/i.test(e);if(r=u(r,"load",t),r=u(r,"idle",t),r=u(r,"visible",t),r=u(r,"media",t),r=M(r),r=u(r,"hover",t),r=u(r,"event",t),i=d&&r!==e,i)r+=`
|
|
315
|
+
`+v();return r}function u(e,t,n){let r=new RegExp(`@client:${t}(?:\\s*\\(([^)]*)\\))?\\s*([\\s\\S]*?)@endclient`,"gi");return e.replace(r,(i,d,o)=>{let a={strategy:t};if(d)try{let E=d.split(",").map((h)=>h.trim());for(let h of E){let[m,g]=h.split(":").map((p)=>p.trim());if(m&&g){let p=g.replace(/^['"]|['"]$/g,"");a[m]=p}}}catch{}let s=`island-${Math.random().toString(36).substring(2,9)}`,y=b(o.trim()),f=w(o.trim(),n),c=[];if(a.rootMargin)c.push(`data-root-margin="${a.rootMargin}"`);if(a.threshold!==void 0)c.push(`data-threshold="${a.threshold}"`);if(a.media)c.push(`data-media="${a.media}"`);if(a.event)c.push(`data-event="${a.event}"`);if(y)c.push(`data-component="${y}"`);let x=Object.keys(f).length>0?`
|
|
316
|
+
<script type="application/json" data-island-props="${s}">${JSON.stringify(f)}</script>`:"",l="";switch(t){case"load":l=I(s);break;case"idle":l=L(s,a);break;case"visible":l=C(s,a);break;case"media":l=S(s,a);break;case"hover":l=k(s);break;case"event":l=H(s,a);break}return`
|
|
317
|
+
<div data-island="${s}"
|
|
318
|
+
data-strategy="${t}"
|
|
319
|
+
${c.join(`
|
|
326
320
|
`)}
|
|
327
321
|
class="stx-island"
|
|
328
322
|
style="contents;">
|
|
329
|
-
${
|
|
323
|
+
${o.trim()}${x}
|
|
330
324
|
</div>
|
|
331
|
-
${
|
|
332
|
-
`})}function
|
|
333
|
-
<div data-island="${
|
|
325
|
+
${l}
|
|
326
|
+
`})}function M(e){let t=/@client:only\s*([\s\S]*?)@endclient/gi;return e.replace(t,(n,r)=>{let i=`island-only-${Math.random().toString(36).substring(2,9)}`;return`
|
|
327
|
+
<div data-island="${i}"
|
|
334
328
|
data-strategy="only"
|
|
335
329
|
class="stx-island stx-client-only">
|
|
336
330
|
<!-- Client-only content will be rendered here -->
|
|
337
|
-
<template data-client-content>${
|
|
331
|
+
<template data-client-content>${r.trim()}</template>
|
|
338
332
|
</div>
|
|
339
|
-
<script data-hydrate="${
|
|
333
|
+
<script data-hydrate="${i}">
|
|
340
334
|
(function() {
|
|
341
|
-
const island = document.querySelector('[data-island="${
|
|
335
|
+
const island = document.querySelector('[data-island="${i}"]');
|
|
342
336
|
if (!island) return;
|
|
343
337
|
|
|
344
338
|
const template = island.querySelector('template[data-client-content]');
|
|
@@ -348,7 +342,7 @@ else {
|
|
|
348
342
|
}
|
|
349
343
|
})();
|
|
350
344
|
</script>
|
|
351
|
-
`})}function
|
|
345
|
+
`})}function ma(){return`
|
|
352
346
|
/* Island base styles */
|
|
353
347
|
.stx-island {
|
|
354
348
|
display: contents;
|
|
@@ -389,9 +383,9 @@ else {
|
|
|
389
383
|
.stx-island.hydrated {
|
|
390
384
|
opacity: 1;
|
|
391
385
|
}
|
|
392
|
-
`}function
|
|
386
|
+
`}function ha(e){if(typeof window>"u")return;let t=document.querySelector(`[data-island="${e}"]`);if(!t||t.classList.contains("hydrated"))return;t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))}function ya(e){if(typeof window>"u")return;document.querySelectorAll(`[data-strategy="${e}"]:not(.hydrated)`).forEach((n)=>{n.classList.add("hydrated"),n.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function ba(){if(typeof window>"u")return;document.querySelectorAll(".stx-island:not(.hydrated)").forEach((t)=>{t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function va(e){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${e}"]`)?.classList.contains("hydrated")??!1}function wa(e){return new Promise((t)=>{if(typeof window>"u"){t();return}let n=document.querySelector(`[data-island="${e}"]`);if(!n){t();return}if(n.classList.contains("hydrated")){t();return}n.addEventListener("stx:hydrated",()=>t(),{once:!0})})}function xa(e){return e.replace(/@static\s*([\s\S]*?)@endstatic/gi,(t,n)=>`<div class="stx-static">${n.trim()}</div>`)}function Sa(e){let t=e.map((n)=>({id:n.id,component:n.component,strategy:n.options.strategy,props:n.props}));return`
|
|
393
387
|
<script type="application/json" id="stx-island-manifest">
|
|
394
|
-
${JSON.stringify(
|
|
388
|
+
${JSON.stringify(t)}
|
|
395
389
|
</script>
|
|
396
|
-
`}var
|
|
397
|
-
export{
|
|
390
|
+
`}var ml={processPartialHydrationDirectives:ga,processStaticDirectives:xa,generatePartialHydrationCSS:ma,generateIslandManifest:Sa,createIslandRegistry:fa,hydrateIsland:ha,hydrateByStrategy:ya,hydrateAll:ba,isHydrated:va,onHydrated:wa};
|
|
391
|
+
export{fa,ga,ma,ha,ya,ba,va,wa,xa,Sa,ml};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var l=null,k=[],a=0,p=new Set;function v(){return l}function b(e){let i=l;return k.push(e),l=e,i}function T(e){k.pop(),l=e}function y(){return a>0}function g(e){p.add(e)}function m(e){a++;try{e()}finally{if(a--,a===0){let i=[...p];p.clear();for(let n of i)n()}}}function D(e){let i=l;l=null;try{return e()}finally{l=i}}var h=[],f=[];function U(e){let i=e,n=new Set,r=new Set,o=()=>{let t=v();if(t)r.add(t);return i};return o.set=(t)=>{if(!Object.is(t,i)){let c=i;if(i=t,n.forEach((s)=>{try{s(i,c)}catch(u){console.error("[stx] subscriber error:",u)}}),y())r.forEach((s)=>g(s));else r.forEach((s)=>s())}},o.update=(t)=>{o.set(t(i))},o.subscribe=(t)=>(n.add(t),()=>n.delete(t)),Object.defineProperty(o,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(o,"value",{get:()=>o(),set:(t)=>o.set(t),configurable:!0}),o}function An(e){let i,n=!0,r=new Set,o=()=>{if(!n)if(n=!0,y())r.forEach((c)=>g(c));else r.forEach((c)=>c())},t=()=>{let c=v();if(c)r.add(c);if(n){let s=b(o);try{i=e()}finally{T(s)}n=!1}return i};return Object.defineProperty(t,"_isDerived",{value:!0,writable:!1}),Object.defineProperty(t,"value",{get:()=>t(),configurable:!0}),t}function Gt(e,i={}){let n,r=!1,o=()=>{if(r)return;if(n){let c=n;n=void 0;try{c()}catch(s){console.error("[stx] effect cleanup error:",s)}}let t=b(o);try{let c=e();n=typeof c==="function"?c:void 0}catch(c){r=!0,console.error("[stx] effect error (the effect is disposed):",c)}finally{T(t)}};if(i.immediate!==!1)o();return()=>{if(r=!0,n){let t=n;n=void 0,t()}}}function Nr(e){m(e)}function Lr(e){h.push(e)}function Pn(e){f.push(e)}function iu(){C(h,"onMount",f)}function ou(){C(f,"onDestroy")}function C(e,i,n){let r=e.splice(0,e.length);for(let o of r)try{let t=o();if(n&&typeof t==="function")n.push(t)}catch(t){console.error(`[stx] ${i} callback threw:`,t)}}function au(){return{mount:h.length,destroy:f.length}}function Jt(e){return typeof e==="function"&&e._isSignal===!0}function Yt(e){return typeof e==="function"&&e._isDerived===!0}function jr(e){if(Jt(e)||Yt(e))return e();return e}function In(e){return D(e)}function cu(e,i){let n=typeof e==="function"?e:()=>e,r=U([]),o=An(()=>r().reduce((s,u)=>i(s,u.action),n())),t=!1;return Gt(()=>{if(n(),!t){t=!0;return}if(In(()=>r().length))r.set([])}),[o,(s,u)=>{let x={action:s};r.set([...r(),x]);let d=()=>{let S=r().filter((A)=>A!==x);if(S.length!==r().length)r.set(S)};if(u&&typeof u.then==="function")Promise.resolve(u).then(d,d);return d}]}
|
|
3
|
+
export{U,An,Gt,Nr,Lr,Pn,iu,ou,au,Jt,Yt,jr,In,cu};
|