@stacksjs/stx 0.2.919 → 0.2.921
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-0678sab4.js +2 -0
- package/dist/chunk-0bnv0aaz.js +2 -0
- package/dist/chunk-0bvfm5h5.js +2 -0
- package/dist/chunk-0c3q5h03.js +2 -0
- package/dist/chunk-0fh84wr5.js +2 -0
- package/dist/chunk-0p9x0m5n.js +2 -0
- package/dist/{chunk-m390z8w8.js → chunk-0rq1w0xr.js} +7 -7
- package/dist/{chunk-fwxgzktt.js → chunk-1pc2p489.js} +2 -2
- package/dist/{chunk-2szhk8mh.js → chunk-29cy41z3.js} +4 -4
- package/dist/{chunk-9mack1g8.js → chunk-2d0pemtc.js} +3 -3
- package/dist/{chunk-1bf0grbf.js → chunk-2qnpr0ty.js} +3 -3
- package/dist/{chunk-fjpt8arw.js → chunk-2r2tayyd.js} +2 -2
- package/dist/chunk-2sfxj244.js +2 -0
- package/dist/{chunk-wxqay5c2.js → chunk-30d298vs.js} +1 -1
- package/dist/{chunk-d69k67bn.js → chunk-36j2drjv.js} +9 -9
- package/dist/{chunk-9gr7m3tb.js → chunk-3d0bjcn7.js} +1 -1
- package/dist/chunk-3k9d0h11.js +2 -0
- package/dist/{chunk-whnzf9hn.js → chunk-3mc9ew9r.js} +6 -6
- package/dist/chunk-43r0h76m.js +2 -0
- package/dist/{chunk-cbqe84g3.js → chunk-4f8h38xr.js} +2 -2
- package/dist/{chunk-858p3hkz.js → chunk-4jg8ddfy.js} +2 -2
- package/dist/chunk-4jh5t3rz.js +2 -0
- package/dist/{chunk-rk16391e.js → chunk-4nabpd82.js} +5 -5
- package/dist/{chunk-p3x7kwb5.js → chunk-4w203ddt.js} +6 -6
- package/dist/chunk-4y2k14ec.js +2 -0
- package/dist/chunk-57xcb1wn.js +2 -0
- package/dist/chunk-5ekbye3p.js +2 -0
- package/dist/chunk-5s1q4y2j.js +2 -0
- package/dist/chunk-6359fekc.js +2 -0
- package/dist/{chunk-wv0wsavj.js → chunk-66cz2ph7.js} +2 -2
- package/dist/{chunk-p0xqm2ne.js → chunk-7767n5k6.js} +1 -1
- package/dist/{chunk-xpsg91dh.js → chunk-78j6c3sf.js} +5 -5
- package/dist/{chunk-qtzfbv7e.js → chunk-7d0h2pa3.js} +5 -5
- package/dist/{chunk-jgtn9t5n.js → chunk-7g720sk3.js} +2 -2
- package/dist/chunk-7nshr15z.js +2 -0
- package/dist/{chunk-14df2jzs.js → chunk-875wejw1.js} +2 -2
- package/dist/chunk-8g6cmgn8.js +2 -0
- package/dist/chunk-8gfdy17b.js +2 -0
- package/dist/{chunk-fn0y9z1t.js → chunk-8vjsmyrk.js} +5 -5
- package/dist/chunk-8yx65vb0.js +2 -0
- package/dist/{chunk-09xqy448.js → chunk-90ps064x.js} +2 -2
- package/dist/chunk-91nwc581.js +2 -0
- package/dist/{chunk-yzqb7y45.js → chunk-94001bha.js} +5 -5
- package/dist/chunk-94skx5m6.js +2 -0
- package/dist/chunk-9aegppj7.js +2 -0
- package/dist/{chunk-gjyz5ma7.js → chunk-9ch2qhbw.js} +1 -1
- package/dist/{chunk-m6hrb7rm.js → chunk-9sk596tw.js} +25 -25
- package/dist/{chunk-3ftrv1f7.js → chunk-a3qb13vr.js} +20 -20
- package/dist/chunk-a5vzdhsk.js +2 -0
- package/dist/{chunk-jjq7c8s2.js → chunk-a78k8fkg.js} +2 -2
- package/dist/{chunk-txk2z7v0.js → chunk-ag07tdhn.js} +4 -4
- package/dist/{chunk-0wctbtad.js → chunk-amnfd29h.js} +3 -3
- package/dist/chunk-aqh48tyw.js +2 -0
- package/dist/{chunk-zaj3nnvv.js → chunk-avtq2p0c.js} +2 -2
- package/dist/{chunk-3kpxkjgm.js → chunk-b0kq5mzq.js} +2 -2
- package/dist/chunk-b6am4h24.js +2 -0
- package/dist/{chunk-qzqqzraq.js → chunk-b9z4nb1v.js} +6 -6
- package/dist/{chunk-d4xjwebv.js → chunk-bwnx71s8.js} +5 -5
- package/dist/{chunk-mr9pp5cf.js → chunk-c3nmjx26.js} +2 -2
- package/dist/chunk-cajg2sz0.js +2 -0
- package/dist/{chunk-3efpqm1f.js → chunk-dhx4m7mf.js} +2 -2
- package/dist/chunk-dktqmf4t.js +2 -0
- package/dist/chunk-dqwxyk1m.js +2 -0
- package/dist/chunk-e2kk1d9z.js +2 -0
- package/dist/{chunk-zrxvj3zf.js → chunk-e8aqkt1b.js} +6 -6
- package/dist/{chunk-mztjpp7m.js → chunk-e8hvbc53.js} +2 -2
- package/dist/{chunk-kk9h53xg.js → chunk-edjzm0vj.js} +3 -3
- package/dist/chunk-ee4ejnk2.js +2 -0
- package/dist/chunk-eezp4a40.js +2 -0
- package/dist/chunk-eh2ynja3.js +2 -0
- package/dist/chunk-emk29htn.js +2 -0
- package/dist/{chunk-xq5s4vc1.js → chunk-eqj8nj5c.js} +1 -1
- package/dist/{chunk-ktv65e3n.js → chunk-f8sh6289.js} +7 -7
- package/dist/{chunk-6n6kndk0.js → chunk-fb1hyhgf.js} +3 -3
- package/dist/chunk-fd0vnz09.js +2 -0
- package/dist/chunk-fyhtp2nt.js +2 -0
- package/dist/{chunk-xk7hdpq5.js → chunk-g2fxp9zp.js} +3 -3
- package/dist/chunk-gbct53j0.js +2 -0
- package/dist/{chunk-m9ta0640.js → chunk-gsm3rk4j.js} +2 -2
- package/dist/{chunk-x40j67z1.js → chunk-gt9bt8xa.js} +2 -2
- package/dist/{chunk-ft34x0h1.js → chunk-gxdy4qjj.js} +4 -4
- package/dist/chunk-gxtq25gr.js +2 -0
- package/dist/chunk-h1dnjn9g.js +2 -0
- package/dist/{chunk-yvaqgdv1.js → chunk-h7z23fpq.js} +1 -1
- package/dist/{chunk-sxrcac01.js → chunk-hakevnm1.js} +2 -2
- package/dist/chunk-hn7fv830.js +2 -0
- package/dist/chunk-hx6tr46s.js +1459 -0
- package/dist/chunk-jenk04c8.js +2 -0
- package/dist/{chunk-1baxccfq.js → chunk-jfy0r3hx.js} +24 -24
- package/dist/{chunk-9zwmfkfg.js → chunk-jh007a8k.js} +5 -5
- package/dist/chunk-jh1hdq31.js +3 -0
- package/dist/{chunk-tb4be5ct.js → chunk-jk1hzawb.js} +3 -3
- package/dist/{chunk-hht7n4zd.js → chunk-jya12bfn.js} +2 -2
- package/dist/chunk-k1qbgpfy.js +2 -0
- package/dist/chunk-kgmwja6f.js +2 -0
- package/dist/{chunk-z6nyyt3n.js → chunk-khf62zkn.js} +5 -5
- package/dist/chunk-kppj8rqa.js +2 -0
- package/dist/{chunk-514yg4dr.js → chunk-m3ra99h8.js} +6 -6
- package/dist/{chunk-qsnw0qyp.js → chunk-m8rzaqm8.js} +2 -2
- package/dist/chunk-msvphygp.js +2 -0
- package/dist/chunk-mzbejejf.js +2 -0
- package/dist/{chunk-v1x96kjr.js → chunk-nkgqhb7s.js} +7 -7
- package/dist/{chunk-9707zz6v.js → chunk-p17jeqz0.js} +2 -2
- package/dist/{chunk-2f46pcg0.js → chunk-pe5sstex.js} +2 -2
- package/dist/{chunk-vtj3dwhh.js → chunk-pqr4gn9b.js} +2 -2
- package/dist/{chunk-40j2pmnb.js → chunk-prj38cyp.js} +5 -5
- package/dist/{chunk-mn9t5fnv.js → chunk-q8snpht6.js} +2 -2
- package/dist/chunk-q99y5115.js +3 -0
- package/dist/{chunk-7axtwg1f.js → chunk-qzspvwv6.js} +2 -2
- package/dist/chunk-r02asm46.js +2 -0
- package/dist/{chunk-vf7tpgqz.js → chunk-r7zvrh58.js} +16 -16
- package/dist/{chunk-ex6dne7e.js → chunk-ra35ptjg.js} +2 -2
- package/dist/chunk-rc4712qh.js +2 -0
- package/dist/chunk-rq7sg012.js +33 -0
- package/dist/{chunk-v060015m.js → chunk-rt4gzqs9.js} +1 -1
- package/dist/chunk-rx1xw7q2.js +2 -0
- package/dist/{chunk-mnpfvxpa.js → chunk-rzmephr2.js} +30 -30
- package/dist/{chunk-0xyfs691.js → chunk-s3rhbwgf.js} +4 -4
- package/dist/{chunk-xap1f1bw.js → chunk-s6w14v6h.js} +2 -2
- package/dist/{chunk-nkbnsbb0.js → chunk-sdvv8zge.js} +2 -2
- package/dist/{chunk-3br07y64.js → chunk-sgppgy5e.js} +5 -5
- package/dist/{chunk-v1a5h1tc.js → chunk-sk7pptzf.js} +9 -9
- package/dist/{chunk-50zzar2c.js → chunk-sk8x8nw8.js} +3 -3
- package/dist/chunk-skjm3zdh.js +2 -0
- package/dist/{chunk-5fdc8pej.js → chunk-t4exh7c9.js} +7 -7
- package/dist/{chunk-3hfv217t.js → chunk-t64mp8x1.js} +6 -6
- package/dist/{chunk-neymp1bb.js → chunk-tfpd7aht.js} +3 -3
- package/dist/chunk-tsnzhke9.js +2 -0
- package/dist/{chunk-yye2pec5.js → chunk-tt6n2mx6.js} +14 -14
- package/dist/chunk-txyze88n.js +2 -0
- package/dist/chunk-v1t7sees.js +2 -0
- package/dist/{chunk-1a2c4pv8.js → chunk-vhp5hqwp.js} +10 -10
- package/dist/{chunk-1vsjmwr1.js → chunk-vn3hsx7v.js} +2 -2
- package/dist/chunk-vt410s5m.js +2 -0
- package/dist/{chunk-3tcy9r6r.js → chunk-w27j0apm.js} +14 -14
- package/dist/{chunk-2zb642qr.js → chunk-w5vxzk5j.js} +6 -6
- package/dist/chunk-w81a1e14.js +9 -0
- package/dist/{chunk-tnbzg7fd.js → chunk-wajvxzt0.js} +2 -2
- package/dist/chunk-wrva7jes.js +2 -0
- package/dist/{chunk-p4twxjfs.js → chunk-ws25jw6x.js} +3 -3
- package/dist/{chunk-m86sjbx7.js → chunk-ww24mxmd.js} +3 -3
- package/dist/chunk-xdprx6tx.js +1331 -0
- package/dist/chunk-xgv3gy1b.js +2 -0
- package/dist/chunk-xjhv5e5f.js +2 -0
- package/dist/chunk-xnvh4jk2.js +21 -0
- package/dist/chunk-xtakhmnb.js +2 -0
- package/dist/{chunk-zb6my502.js → chunk-y97g0kwc.js} +1 -1
- package/dist/chunk-y9f9d4zv.js +2 -0
- package/dist/{chunk-qda8tmk9.js → chunk-yfe380a4.js} +2 -2
- package/dist/{chunk-6x5a2w5a.js → chunk-ygtz9kc7.js} +2 -2
- package/dist/chunk-yyypc7s3.js +2 -0
- package/dist/chunk-z5j4prza.js +2 -0
- package/dist/{chunk-2jm7map2.js → chunk-z68teecy.js} +2 -2
- package/dist/cli.js +20 -20
- package/dist/composables/use-media-query.js +23 -22
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/native/accessibility.d.ts +1 -1
- package/dist/native/accessibility.js +5 -3
- package/dist/native/bridge/protocol.d.ts +1 -0
- package/dist/native/compiler/html-to-ir.js +14 -1
- package/dist/native/compiler/ir.d.ts +7 -0
- package/dist/native/components/primitives.d.ts +1 -0
- package/dist/native/event-names.js +4 -0
- package/dist/native/prop-names.js +3 -1
- package/dist/native/runtime/browser-renderer.js +4 -0
- package/dist/native/runtime/craft-bridge.js +1 -0
- package/dist/native/runtime/craft.d.ts +3 -0
- package/dist/native/runtime/jsc-globals.js +1 -1
- package/dist/native/runtime/native-media.js +8 -3
- package/dist/native/runtime/shared-screen.js +8 -3
- package/dist/native/testing.d.ts +2 -1
- package/dist/native/testing.js +2 -1
- package/dist/process.js +6 -3
- package/dist/pwa.js +3 -3
- package/dist/signal-processing.d.ts +2 -2
- package/dist/signal-processing.js +17 -11
- package/dist/ssg.js +9 -9
- package/dist/utils.js +2 -1
- package/dist/vue-template.d.ts +2 -0
- package/dist/vue-template.js +72 -2
- package/package.json +6 -6
- package/dist/chunk-0ebaf0pr.js +0 -2
- package/dist/chunk-0jjq552g.js +0 -2
- package/dist/chunk-15rc8t28.js +0 -2
- package/dist/chunk-1jrhjn2b.js +0 -2
- package/dist/chunk-1svffhzq.js +0 -2
- package/dist/chunk-2m4ydym0.js +0 -33
- package/dist/chunk-2mv29s6w.js +0 -9
- package/dist/chunk-3aayrnbh.js +0 -21
- package/dist/chunk-426gq0g5.js +0 -2
- package/dist/chunk-4ge80k8j.js +0 -2
- package/dist/chunk-4vdfqr64.js +0 -2
- package/dist/chunk-4yz33vzb.js +0 -2
- package/dist/chunk-4zcswx6x.js +0 -2
- package/dist/chunk-5ht628zp.js +0 -2
- package/dist/chunk-67zy5p7x.js +0 -2
- package/dist/chunk-8153bfpx.js +0 -2
- package/dist/chunk-86p0m920.js +0 -2
- package/dist/chunk-88texeh4.js +0 -2
- package/dist/chunk-8mye65n9.js +0 -2
- package/dist/chunk-8ycgk8w6.js +0 -2
- package/dist/chunk-9xcsn4pb.js +0 -2
- package/dist/chunk-a5tg553d.js +0 -2
- package/dist/chunk-agxxqjjt.js +0 -2
- package/dist/chunk-b44pvac7.js +0 -2
- package/dist/chunk-b4yp16a2.js +0 -2
- package/dist/chunk-fb63xppz.js +0 -2
- package/dist/chunk-ffqqkeye.js +0 -2
- package/dist/chunk-g1v12bjm.js +0 -2
- package/dist/chunk-gg0kkn2e.js +0 -2
- package/dist/chunk-ggg8b8n1.js +0 -2
- package/dist/chunk-ggrcg7k7.js +0 -2
- package/dist/chunk-gmn9ba8f.js +0 -3
- package/dist/chunk-gqe574d9.js +0 -2
- package/dist/chunk-hajamm16.js +0 -2
- package/dist/chunk-hg2n2264.js +0 -2
- package/dist/chunk-hxabvt31.js +0 -2
- package/dist/chunk-j3sat6vn.js +0 -2
- package/dist/chunk-j9gbnqxq.js +0 -2
- package/dist/chunk-jj2z4nxa.js +0 -2
- package/dist/chunk-k289127j.js +0 -2
- package/dist/chunk-m1hfh2t4.js +0 -2
- package/dist/chunk-m3qwqhxp.js +0 -2
- package/dist/chunk-m9smh7fs.js +0 -2
- package/dist/chunk-mhnjtc42.js +0 -2
- package/dist/chunk-n4bxb2hx.js +0 -2
- package/dist/chunk-n958bxm6.js +0 -2
- package/dist/chunk-nkr1aa5z.js +0 -2
- package/dist/chunk-p3vswt0f.js +0 -2
- package/dist/chunk-p8wnp4p1.js +0 -2
- package/dist/chunk-q3z252d9.js +0 -2
- package/dist/chunk-qfkak3jb.js +0 -2
- package/dist/chunk-rt7xy537.js +0 -2
- package/dist/chunk-rwjye578.js +0 -2
- package/dist/chunk-sbr3wg75.js +0 -1467
- package/dist/chunk-sftznswb.js +0 -2
- package/dist/chunk-tz5ktd6d.js +0 -2
- package/dist/chunk-vb609vbj.js +0 -1323
- package/dist/chunk-vtcyber4.js +0 -2
- package/dist/chunk-wq2bpt0w.js +0 -2
- package/dist/chunk-wv8zt78c.js +0 -2
- package/dist/chunk-xakqpa4z.js +0 -3
- package/dist/chunk-xy3ex6ht.js +0 -2
- package/dist/chunk-y899wtm8.js +0 -2
- package/dist/chunk-ye45znz5.js +0 -2
- package/dist/chunk-yegp50jb.js +0 -2
- package/dist/chunk-yq9aqpk8.js +0 -2
- package/dist/chunk-zt45dqfx.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
3
|
-
${p.transformSync(e).trim()}`);for(let c of g)d.add(c)}catch(c){console.warn(`[stx] framework composable ${l.basename(n)} could not be bundled:`,c)}}let w=t.filter((n)=>!d.has(n)&&!
|
|
2
|
+
import"./chunk-4jg8ddfy.js";import"./chunk-ayrd026n.js";import"./chunk-a78k8fkg.js";import"./chunk-ra35ptjg.js";import{k,E,P,ae}from"./chunk-xdprx6tx.js";import"./chunk-r7zvrh58.js";import"./chunk-875wejw1.js";import"./chunk-yfe380a4.js";import{Er}from"./chunk-1ts1pg90.js";import{existsSync as C}from"fs";import l from"path";var b=["applyOfflineUpdate","broadcast","cacheMedia","calculateDistance","canNotify","clearCookies","clearFetchCache","clearOfflineData","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","onOfflineUpdateReady","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAmbientSound","useAnimationFrame","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBreathPacer","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useCompletion","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useOutbox","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVirtualList","useVisibility","useWakeLock","useWindowSize"],F=new Set(b);var u=new Map,h=k(64),S=new Set,y=0,R=new Set(b);function z(){u.clear(),h.clear()}function I(s){let o=new Map;for(let t of s){let i=l.basename(t);if(i.endsWith(".d.ts"))continue;let r=i.replace(/\.[jt]s$/,"");if(r==="index")continue;if(r===i)continue;let a=o.get(r);if(a&&!a.endsWith(".js"))continue;o.set(r,t)}return[...o.values()].sort()}function M(s,o){let t=o.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${t}\\b`).test(s)}function L(s){if(!s)return[];let o=E(s,y),t=h.get(o);if(t)return t.slice();let i=s.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),r=[];for(let a of R){if(S.has(a))continue;let p=a.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${p}\\s*\\(`).test(i))r.push(a)}return r.sort(),h.set(o,r),r.slice()}function _(){let s=l.join(import.meta.dir,"composables"),o=import.meta.url.endsWith(".ts")?"ts":"js";if(C(l.join(s,`index.${o}`)))return s;let t=Er("@stacksjs/stx/composables");return t?l.dirname(t):void 0}async function V(s,o){let t=L(s);if(t.length===0)return null;let i=o??_();if(!i)return null;let r=`${i}\x00${t.join(",")}`,a=u.get(r);if(a!==void 0)return a||null;let p=ae({loader:"ts",target:"browser",define:P()}),v=new Set(t),m=[],d=new Set,f=[];try{let n=new Bun.Glob("*.{ts,js}");for await(let e of n.scan({cwd:i,absolute:!0}))f.push(e)}catch{return u.set(r,""),null}f=I(f);for(let n of f){let e;try{e=await Bun.file(n).text()}catch{continue}let g=[];try{g=p.scan(e).exports.filter((c)=>c!=="default")}catch{continue}if(!g.some((c)=>v.has(c)))continue;try{e=e.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^import\s+type\s+.*$/gm,""),e=e.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),e=e.replace(/^export\s+default\s+/gm,""),e=e.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),m.push(`// ${l.basename(n).replace(/\.[jt]s$/,"")}
|
|
3
|
+
${p.transformSync(e).trim()}`);for(let c of g)d.add(c)}catch(c){console.warn(`[stx] framework composable ${l.basename(n)} could not be bundled:`,c)}}let w=t.filter((n)=>!d.has(n)&&!M(s,n));if(w.length>0)console.warn(`[stx] could not bundle ${w.join(", ")} from @stacksjs/stx/composables \u2014 `+"calls to them will throw ReferenceError in the browser. Import them explicitly so the bundler inlines them, or use a runtime equivalent from window.stx.");if(m.length===0)return u.set(r,""),null;let O=[...d].map((n)=>` try { if (!(${JSON.stringify(n)} in __s)) { __s[${JSON.stringify(n)}] = ${n}; if (!(${JSON.stringify(n)} in window)) window[${JSON.stringify(n)}] = ${n}; } } catch (e) {}`).join(`
|
|
4
4
|
`),x=`<script data-stx-scoped data-stx-run="always" data-stx-framework-composables>
|
|
5
5
|
;(function(){
|
|
6
6
|
var __s = window.stx = window.stx || {};
|
|
@@ -9,4 +9,4 @@ ${m.join(`
|
|
|
9
9
|
`)}
|
|
10
10
|
${O}
|
|
11
11
|
})();
|
|
12
|
-
</script>`;return u.set(r,x),x}function q(s){S.clear();for(let o of s)S.add(o);y++}export{q as __setRuntimeOwnedForTest,z as clearFrameworkComposableCache,V as getFrameworkComposableScript,
|
|
12
|
+
</script>`;return u.set(r,x),x}function q(s){S.clear();for(let o of s)S.add(o);y++}export{q as __setRuntimeOwnedForTest,z as clearFrameworkComposableCache,V as getFrameworkComposableScript,L as referencedFrameworkComposables,I as selectComposableFiles};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{yt,Fg,zg,Hg,Ug,Vg,b,Wg,Ki,qg,$l,Rl}from"./chunk-xdprx6tx.js";import"./chunk-yfe380a4.js";import"./chunk-875wejw1.js";import"./chunk-r7zvrh58.js";import"./chunk-ayrd026n.js";import"./chunk-ra35ptjg.js";import"./chunk-a78k8fkg.js";import"./chunk-4jg8ddfy.js";export{yt as STX_ENGINE_BINDING_NAMES,Ki as convertToCommonJS,$l as extractScriptFromTemplate,b as extractVariables,Rl as hasVariables,Wg as isCompleteImport,Vg as isMissingBindingFailure,Hg as isModuleResolutionFailure,Ug as isSyntaxFailure,qg as splitDeclaration,Fg as stripTypeScript,zg as withoutStxReferrer};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{g}from"./chunk-
|
|
2
|
+
import{g}from"./chunk-r7zvrh58.js";import{createHash as j}from"crypto";function C(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var F=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function z(t){return Bun.hash(t).toString(16)}function Ac(t,e={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let n=new Map,o=t.replace(F,(r,a,u,l)=>{let c=l.trim();if(!c)return r;if(/\bdata-stx-src=/.test(u))return r;if(e.minify)c=C(c);let i=z(c);if(!n.has(i))n.set(i,c);let f=e.integrity?` data-stx-integrity="sha384-${j("sha384").update(c).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${a}" data-stx-src="/_stx/islands/${i}.js"${f}${u}></script>`}),s=Array.from(n,([r,a])=>({hash:r,code:a}));return{html:o,chunks:s}}var L=new Set(["visible","idle"]);function Pc(t){if(!t.includes("data-stx-src="))return t;let e=new Map,n=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=n.exec(t))!==null)e.set(o[1],o[2]);let s=new Set,r=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,a;while((a=r.exec(t))!==null)if(L.has(e.get(a[1])||""))s.add(a[2]);let u=/<\/head\s*>/iy,l=g(t,(i,f)=>(u.lastIndex=f,u.exec(i)?u.lastIndex:-1))[0]?.start??-1;if(s.size===0||l===-1)return t;let c=Array.from(s).filter((i)=>!t.includes(`rel="prefetch" href="${i}"`)).map((i)=>`<link rel="prefetch" href="${i}" as="script">`).join("");if(!c)return t;return t.slice(0,l)+c+t.slice(l)}import y from"fs";import M from"path";var E="_stx";function _(t){return Bun.hash(t).toString(16).slice(0,8)}function N(t){let e=[],n=(o)=>{for(let s of y.readdirSync(o,{withFileTypes:!0})){let r=M.join(o,s.name);if(s.isDirectory())n(r);else if(s.isFile()&&r.endsWith(".html"))e.push(r)}};if(y.existsSync(t))n(t);return e}var B=[{pattern:/<script\b([^>]*\bdata-stx-runtime\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"runtime",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(t)=>`<script data-stx-runtime src="${t}"></script>`},{pattern:/<script\b([^>]*\bdata-stx-router\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"router",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(t)=>`<script data-stx-router src="${t}"></script>`},{pattern:/<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"css",extension:"css",contentType:"text/css; charset=utf-8",replace:(t)=>`<link data-css="generated" rel="stylesheet" href="${t}">`}];function H(t,e=`/${E}`){let n=[],o=new Set,s=0,r=t;for(let a of B)r=r.replace(a.pattern,(u,l,c)=>{if(/(?:^|\s)stx-inline(?:\s|=|$)/i.test(l)||/\b(?:src|href)\s*=/.test(l)||!c.trim())return u;let i=`${a.prefix}.${_(c)}.${a.extension}`;if(!o.has(i))o.add(i),n.push({filename:i,contents:c,contentType:a.contentType});return s+=c.length,a.replace(`${e}/${i}`)});return{html:r,assets:n,bytesInlined:s}}function Ic(t){let e={pages:0,assets:0,bytesInlined:0},n=M.join(t,E),o=new Set;for(let s of N(t)){let r=y.readFileSync(s,"utf8"),{html:a,assets:u,bytesInlined:l}=H(r);if(a===r)continue;for(let c of u){if(o.has(c.filename))continue;o.add(c.filename),y.mkdirSync(n,{recursive:!0}),y.writeFileSync(M.join(n,c.filename),c.contents),e.assets++}y.writeFileSync(s,a),e.bytesInlined+=l,e.pages++}return e}import m from"fs";import T from"path";var O=1024,D=/<(script|style)\b([^>]*)>([\s\S]*?)<\/\1>/gi,P=new Set(["","module","text/javascript","application/javascript","module/javascript"]);function W(t){return Bun.hash(t).toString(16).slice(0,8)}function K(t){let e=[],n=(o)=>{for(let s of m.readdirSync(o,{withFileTypes:!0})){let r=T.join(o,s.name);if(s.isDirectory())n(r);else if(s.isFile()&&r.endsWith(".html"))e.push(r)}};if(m.existsSync(t))n(t);return e}function Y(t,e){let n=t.match(new RegExp(`\\b${e}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i"));if(!n)return;return n[2]??n[3]??n[4]??""}function G(t,e,n){if(/(?:^|\s)stx-inline(?:\s|=|$)|\bdata-stx-(?:color-mode-boot|appearance-bootstrap)\b/i.test(e))return!1;if(n.length<O)return!1;if(/\b(?:src|href)\s*=/i.test(e))return!1;if(t.toLowerCase()==="script"){if(!P.has((Y(e,"type")??"").trim().toLowerCase()))return!1;return!0}return!0}function X(t){let e=[];for(let n of t.matchAll(/<template\b[^>]*>[\s\S]*?<\/template>/gi))e.push([n.index,n.index+n[0].length]);return e}function Oc(t){let e={pages:0,assets:0,bytesInlined:0},n=K(t);if(n.length<2)return e;let o=new Map,s=new Map;for(let i of n){let f=m.readFileSync(i,"utf8");o.set(i,f);let R=X(f);for(let p of f.matchAll(D)){let[w,h,d,x]=p;if(!G(h,d,x))continue;if(R.some(([v,A])=>p.index>=v&&p.index<A))continue;let b=`${h.toLowerCase()}\x00${x}`,S=s.get(b);if(S)S.push({file:i,whole:w,tag:h,attrs:d,body:x});else s.set(b,[{file:i,whole:w,tag:h,attrs:d,body:x}])}}let r=[...s.values()].filter((i)=>new Set(i.map((f)=>f.file)).size>1);if(r.length===0)return e;let a=T.join(t,E),u=new Map(o),l=new Map,c=[];for(let i of r){let{tag:f,body:R}=i[0],p=f.toLowerCase()==="script",w=`${p?"chunk":"style"}.${W(R)}.${p?"js":"css"}`;c.push({filename:w,contents:R,contentType:p?"text/javascript; charset=utf-8":"text/css; charset=utf-8"});let h=`/${E}/${w}`;for(let d of i){let x=p?`<script${d.attrs} src="${h}"></script>`:`<link${d.attrs} rel="stylesheet" href="${h}">`,b=u.get(d.file),S=b.replace(d.whole,()=>x);if(S===b)continue;u.set(d.file,S),l.set(d.file,(l.get(d.file)??0)+d.body.length)}}m.mkdirSync(a,{recursive:!0});for(let i of c)m.writeFileSync(T.join(a,i.filename),i.contents),e.assets++;for(let[i,f]of u){if(f===o.get(i))continue;m.writeFileSync(i,f),e.pages++,e.bytesInlined+=l.get(i)??0}return e}import k from"fs";import I from"path";var Z="layout-types.d.ts";function J(t){let e=[],n=(o,s)=>{let r;try{r=k.readdirSync(o,{withFileTypes:!0})}catch{return}for(let a of r){if(a.name.startsWith("."))continue;let u=I.join(o,a.name);if(a.isDirectory())n(u,s?`${s}/${a.name}`:a.name);else if(a.isFile()&&a.name.endsWith(".stx")&&a.name!=="_layout.stx"){let l=a.name.slice(0,-4);e.push(s?`${s}/${l}`:l)}}};return n(t,""),e.sort()}function U(t){let e=["// Auto-generated by stx \u2014 do not edit.","//","// Makes `definePageMeta({ layout })` reject a name with no layout behind it.","// Include this file in your tsconfig (it lives in the stx state directory,","// `.stx/` by default) for the check to apply.",""];if(t.length===0)return e.push("// No layouts found \u2014 `layout` stays typed as `string`.","export {}",""),e.join(`
|
|
3
3
|
`);return e.push("declare module '@stacksjs/stx' {"," interface KnownLayouts {",...t.map((n)=>` '${n}': true`)," }","}","","export {}",""),e.join(`
|
|
4
|
-
`)}function
|
|
5
|
-
export{
|
|
4
|
+
`)}function Nc(t,e){if(!t)return[];let n=I.isAbsolute(t)?t:I.resolve(process.cwd(),t),o=J(n),s=U(o),r=I.join(e,Z);try{if(k.existsSync(r)&&k.readFileSync(r,"utf8")===s)return o;k.mkdirSync(e,{recursive:!0}),k.writeFileSync(r,s)}catch{}return o}
|
|
5
|
+
export{Ac,Pc,Ic,Oc,Nc};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{
|
|
2
|
+
import{fe}from"./chunk-vn3hsx7v.js";import R from"fs";import g from"path";import C from"crypto";var S=new Set(["webp","avif","jpeg","png"]),T=new Set(["cover","contain","fill","inside","outside"]),q=new Set([".jpg",".jpeg",".png",".webp",".avif",".gif"]),k=4096,D=80,U="cover";async function qa(e,t){let r=t.routePath??"/_stx/img",h=new URL(e.url);if(h.pathname!==r)return null;let a=A(h,t);if(!a.ok)return new Response(a.error,{status:a.status,headers:{"Content-Type":"text/plain"}});let{srcFsPath:n,srcUrl:d,width:l,height:i,format:s,quality:u,fit:c}=a,m;try{m=R.statSync(n)}catch{return new Response(`Source image not found: ${d}`,{status:404,headers:{"Content-Type":"text/plain"}})}if(!m.isFile())return new Response("Not a file",{status:404,headers:{"Content-Type":"text/plain"}});let w=t.cacheDir??".stx/cache/img";await R.promises.mkdir(w,{recursive:!0});let b=`${n}:${m.mtimeMs}:${m.size}`,I=`${l}x${i}:${s}:${u}:${c}`,f=C.createHash("sha256").update(`${b}|${I}`).digest("hex").slice(0,16),o=g.join(w,`${f}.${s}`),p={"Content-Type":fe(s),"Cache-Control":"public, max-age=31536000, immutable",ETag:`"${f}"`,"X-Stx-Image-Cache":"HIT"};if(e.headers.get("if-none-match")===`"${f}"`)return new Response(null,{status:304,headers:p});let v=Bun.file(o);if(await v.exists())return new Response(v,{headers:p});try{let x=Buffer.from(await Bun.file(n).arrayBuffer()),{resizeAndConvert:P}=await L(),F=await P(x,{width:l,height:i,format:s,quality:u,fit:c});return await Bun.write(o,F),p["X-Stx-Image-Cache"]="MISS",new Response(new Uint8Array(F),{headers:p})}catch(x){let P=x.message;return new Response(`Image processing failed: ${P}`,{status:500,headers:{"Content-Type":"text/plain"}})}}function Eu(e){return async(t)=>await qa(t,e)??new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain"}})}function A(e,t){let r=e.searchParams.get("src");if(!r)return{ok:!1,error:"Missing required param: src",status:400};if(!r.startsWith("/"))return{ok:!1,error:"src must be an absolute URL path (start with /)",status:400};if(r.startsWith("//"))return{ok:!1,error:"src must be a local path",status:400};let h=g.extname(r).toLowerCase();if(!q.has(h))return{ok:!1,error:`Unsupported source extension: ${h}`,status:400};let a=g.resolve(t.publicDir),n=g.resolve(a,r.slice(1));if(!n.startsWith(`${a}${g.sep}`)&&n!==a)return{ok:!1,error:"src is outside publicDir",status:400};let d=t.maxWidth??k,l=t.maxHeight??k,i=e.searchParams.get("w"),s=e.searchParams.get("h"),u=i?Number.parseInt(i,10):0,c=s?Number.parseInt(s,10):0;if(i&&(!Number.isFinite(u)||u<=0))return{ok:!1,error:"Invalid w (must be positive integer)",status:400};if(s&&(!Number.isFinite(c)||c<=0))return{ok:!1,error:"Invalid h (must be positive integer)",status:400};if(!i&&!s)return{ok:!1,error:"At least one of w or h is required",status:400};let m=Math.min(u||d,d),w=Math.min(c||l,l),b=e.searchParams.get("f")||"webp";if(!S.has(b))return{ok:!1,error:`Invalid f (must be one of: ${[...S].join(", ")})`,status:400};let I=b,f=e.searchParams.get("q"),o=f?Number.parseInt(f,10):t.defaultQuality??D;if(!Number.isFinite(o)||o<1||o>100)return{ok:!1,error:"Invalid q (must be 1-100)",status:400};let y=e.searchParams.get("fit")||t.defaultFit||U;if(!T.has(y))return{ok:!1,error:`Invalid fit (must be one of: ${[...T].join(", ")})`,status:400};return{ok:!0,srcFsPath:n,srcUrl:r,width:m,height:w,format:I,quality:o,fit:y}}async function L(){return await import("./chunk-0bvfm5h5.js")}
|
|
3
|
+
export{qa,Eu};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var w={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",brightRed:"\x1B[91m",brightGreen:"\x1B[92m",brightYellow:"\x1B[93m",brightBlue:"\x1B[94m",brightMagenta:"\x1B[95m",brightCyan:"\x1B[96m",brightWhite:"\x1B[97m"},R={bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",inverse:"\x1B[7m",strikethrough:"\x1B[9m"};function p(e,t){return`${w[t]}${e}\x1B[0m`}function C(e,t){return`${R[t]}${e}\x1B[0m`}var b=(e)=>p(e,"red"),S=(e)=>p(e,"green"),y=(e)=>p(e,"yellow"),O=(e)=>p(e,"blue");var c=(e)=>p(e,"cyan");var a=(e)=>C(e,"bold"),m=(e)=>C(e,"dim");function an(){console.log(""),console.log(c(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")),console.log(c(" \u2551")+a(" \uD83D\uDCD6 STX Story ")+c("\u2551")),console.log(c(" \u2551")+m(" Component Showcase & Testing ")+c("\u2551")),console.log(c(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")),console.log("")}function
|
|
3
|
-
export{an
|
|
2
|
+
var w={black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",brightRed:"\x1B[91m",brightGreen:"\x1B[92m",brightYellow:"\x1B[93m",brightBlue:"\x1B[94m",brightMagenta:"\x1B[95m",brightCyan:"\x1B[96m",brightWhite:"\x1B[97m"},R={bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",inverse:"\x1B[7m",strikethrough:"\x1B[9m"};function p(e,t){return`${w[t]}${e}\x1B[0m`}function C(e,t){return`${R[t]}${e}\x1B[0m`}var b=(e)=>p(e,"red"),S=(e)=>p(e,"green"),y=(e)=>p(e,"yellow"),O=(e)=>p(e,"blue");var c=(e)=>p(e,"cyan");var a=(e)=>C(e,"bold"),m=(e)=>C(e,"dim");function an(){console.log(""),console.log(c(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")),console.log(c(" \u2551")+a(" \uD83D\uDCD6 STX Story ")+c("\u2551")),console.log(c(" \u2551")+m(" Component Showcase & Testing ")+c("\u2551")),console.log(c(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")),console.log("")}function Ao(e,t){if(console.log(a(" Server running at:")),console.log(""),console.log(` ${m("\u279C")} ${a("Local:")} ${c(e)}`),t)console.log(` ${m("\u279C")} ${a("Network:")} ${c(t)}`);console.log("")}function cn(e){let t=e>0?"\u2713":"\u25CB",r=e>0?S:y;console.log(` ${r(t)} Found ${a(String(e))} story ${e===1?"file":"files"}`)}function _a(e,t){if(console.log(""),console.log(` ${b("\u2717")} ${a(b("Error:"))} ${e}`),t)console.log(` ${m(t)}`);console.log("")}function kt(e){console.log(` ${y("\u26A0")} ${y("Warning:")} ${e}`)}function Ca(e){console.log(` ${O("\u2139")} ${e}`)}function Ea(e,t,r){console.log(""),console.log(c(" \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557")),console.log(c(" \u2551")+a(" Build Complete ")+c("\u2551")),console.log(c(" \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D")),console.log(""),console.log(` ${S("\u2713")} Stories: ${a(String(e))}`),console.log(` ${S("\u2713")} Output: ${a(t)}`),console.log(` ${S("\u2713")} Time: ${a(`${r}ms`)}`),console.log("")}function Po(){console.log(""),console.log(a(" Keyboard Shortcuts:")),console.log(""),console.log(` ${c("h")} Show this help`),console.log(` ${c("o")} Open in browser`),console.log(` ${c("r")} Restart server`),console.log(` ${c("c")} Clear console`),console.log(` ${c("q")} Quit`),console.log("")}import h from"fs";import d from"path";async function ln(e){let{root:t,config:r}=e,o=[],i=await P(t,r.storyMatch,r.storyIgnored);for(let s of i){let n=d.resolve(t,s),l=v(s,n);o.push(l)}return o}async function P(e,t,r){let o=[];async function i(s,n){let l=await h.promises.readdir(s,{withFileTypes:!0});for(let g of l){let f=d.join(s,g.name),u=d.relative(n,f);if(T(u,r))continue;if(g.isDirectory())await i(f,n);else if(g.isFile()){if(F(u,t))o.push(u)}}}return await i(e,e),o}function T(e,t){for(let r of t)if(E(e,r))return!0;return!1}function F(e,t){for(let r of t)if(E(e,r))return!0;return!1}function E(e,t){let r=e.replace(/\\/g,"/"),i=t.replace(/\\/g,"/").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"{{GLOBSTAR}}").replace(/\*/g,"[^/]*").replace(/\?/g,".").replace(/\{\{GLOBSTAR\}\}/g,".*");return i=`^${i}$`,new RegExp(i).test(r)}function v(e,t){let r=d.basename(e,".story.stx");return{id:e.toLowerCase().replace(/\.story\.stx$/,"").replace(/[/\\]/g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),path:t,relativePath:e,fileName:r,treeFile:{title:r,path:e}}}function Ta(e,t){let{root:r,config:o}=e,i=[],s=h.watch(r,{recursive:!0},async(n,l)=>{if(!l)return;let g=l.replace(/\\/g,"/");if(!F(g,o.storyMatch))return;if(T(g,o.storyIgnored))return;let f=d.resolve(r,g);try{await h.promises.access(f);let u=v(g,f);t(n==="rename"?"add":"change",u)}catch{let u=v(g,f);t("unlink",u)}});return i.push(s),()=>{for(let n of i)n.close()}}function N(e,t){let r=t.treeFile||{title:t.fileName,path:t.relativePath};if(e.tree.file==="title")return r.title.split("/");if(e.tree.file==="path")return[...t.relativePath.split("/").slice(0,-1),r.title];if(typeof e.tree.file==="function")return e.tree.file(r);return[r.title]}function un(e,t){for(let n of t)n.treePath=N(e,n);let r=(e.tree.groups||[]).map((n)=>({groupConfig:{id:n.id||n.title,title:n.title,include:n.include},treeObject:{}})),o={treeObject:{}};r.push(o);for(let n=0;n<t.length;n++){let l=t[n],g=j(l,r,o);k(l.treePath,n,g.treeObject)}let i=e.tree.order==="asc"?(n,l)=>n.localeCompare(l):e.tree.order,s=[];for(let n of r)if(n===o)s.push(...x(n.treeObject,i));else if(n.groupConfig&&Object.keys(n.treeObject).length>0)s.push({group:!0,id:n.groupConfig.id,title:n.groupConfig.title,children:x(n.treeObject,i)});return s}function j(e,t,r){let o=e.treeFile||{title:e.fileName,path:e.relativePath};for(let i of t)if(i.groupConfig?.include&&i.groupConfig.include(o))return i;return r}function k(e,t,r){let o=r;for(let i=0;i<e.length;i++){let s=e[i];if(i===e.length-1)if(o[s]!==void 0){let l=1;while(o[`${s}-${l}`]!==void 0)l++;o[`${s}-${l}`]=t}else o[s]=t;else{if(o[s]===void 0)o[s]={};else if(typeof o[s]==="number"){let l=o[s];o[s]={"":l}}o=o[s]}}}function x(e,t){let r=[];for(let[o,i]of Object.entries(e))if(typeof i==="number")r.push({title:o,index:i});else r.push({title:o,children:x(i,t)});return r.sort((o,i)=>t(o.title,i.title)),r}
|
|
3
|
+
export{an,Ao,cn,_a,kt,Ca,Ea,Po,ln,Ta,un};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var g=0;function p(){return`async-${++g}-${Date.now().toString(36)}`}function
|
|
2
|
+
var g=0;function p(){return`async-${++g}-${Date.now().toString(36)}`}function ih(e,t={},c){let o=/@async\s*\(([^)]*)\)\s*([\s\S]*?)@error\s*([\s\S]*?)@endasync/gi,i=/@async\s*\(([^)]*)\)\s*([\s\S]*?)@endasync/gi,n=e;return n=n.replace(o,(r,s,a,d)=>{let l=p(),y=u(s);return m(l,y,a.trim(),d.trim())}),n=n.replace(i,(r,s,a)=>{let d=p(),l=u(s);return m(d,l,a.trim(),'<div class="stx-async-error">Failed to load component</div>')}),n}function u(e){let t={component:"",timeout:30000,delay:200,suspensible:!0,retries:0},c=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,o;while((o=c.exec(e))!==null){let i=o[1],n=o[2]||o[3],r=o[4],s=o[5];switch(i){case"component":t.component=n||s||"";break;case"timeout":t.timeout=r?parseInt(r,10):30000;break;case"delay":t.delay=r?parseInt(r,10):200;break;case"suspensible":t.suspensible=s==="true";break;case"retries":t.retries=r?parseInt(r,10):0;break;case"loadingComponent":t.loadingComponent=n||s;break;case"errorComponent":t.errorComponent=n||s;break}}return t}function m(e,t,c,o){let{component:i,timeout:n,delay:r,suspensible:s,retries:a}=t;return`
|
|
3
3
|
<div class="stx-async-component" data-async-id="${e}" data-component="${i}" data-status="pending">
|
|
4
4
|
<div class="stx-async-loading" data-async-loading="${e}">
|
|
5
5
|
${c}
|
|
@@ -226,7 +226,7 @@ catch (error) {
|
|
|
226
226
|
loadComponent();
|
|
227
227
|
})();
|
|
228
228
|
</script>
|
|
229
|
-
`}function
|
|
229
|
+
`}function ah(e){return{__asyncComponent:!0,...typeof e==="function"?{loader:e}:e}}function ch(e){return typeof e==="object"&&e!==null&&"__asyncComponent"in e&&e.__asyncComponent===!0}function lh(){return`
|
|
230
230
|
/* STX Async Component Styles */
|
|
231
231
|
.stx-async-component {
|
|
232
232
|
position: relative;
|
|
@@ -300,7 +300,7 @@ catch (error) {
|
|
|
300
300
|
background-size: 200% 100%;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
`}function
|
|
303
|
+
`}function uh(){return`
|
|
304
304
|
// STX Async Component Runtime
|
|
305
305
|
(function() {
|
|
306
306
|
if (typeof window === 'undefined') return;
|
|
@@ -355,4 +355,4 @@ catch (error) {
|
|
|
355
355
|
console.log('[stx] Async component runtime initialized');
|
|
356
356
|
})();
|
|
357
357
|
`}
|
|
358
|
-
export{
|
|
358
|
+
export{ih,ah,ch,lh,uh};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Lo,Na,ds,jo,Bo,Jn,dn,Ma,ps,gs,Fo,zo,Lm,jm,Tt}from"./chunk-jh007a8k.js";export{Tt as DeployError,Na as calculateSha1,ds as collectDeployFiles,gs as createDefaultNetlifyConfig,jo as createFileManifest,Lo as createNetlifyClient,Lm as deploy,ps as detectProjectConfig,Bo as filterRequiredFiles,Jn as formatSize,Ma as generateNetlifyToml,dn as getTotalSize,zo as hasNetlifyConfig,jm as initNetlify,Fo as writeNetlifyConfig};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Eg,_y,Cy,Ey,Ty,Tg,$g,$y,Ry,ki,Ay,Ar,Pr,zs}from"./chunk-1pc2p489.js";import{mt}from"./chunk-xmy75h5v.js";import"./chunk-xdprx6tx.js";import"./chunk-yfe380a4.js";import"./chunk-875wejw1.js";import"./chunk-r7zvrh58.js";import"./chunk-ayrd026n.js";import"./chunk-ra35ptjg.js";import"./chunk-a78k8fkg.js";import"./chunk-4jg8ddfy.js";export{Ty as __setSignalsGeneratorsForTest,mt as cacheEngineFingerprint,Pr as cacheTemplate,Ar as checkCache,Ay as clearDevCaches,$g as getCachedRouterScript,Tg as getCachedSignalsRuntime,$y as getServeClientAsset,ki as getServeModuleBundle,zs as hashFilePath,Cy as invalidateFileCache,Ey as invalidateFileCacheByDir,_y as readFileCached,Ry as registerServeModuleBundle,Eg as templateCache};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{U,tt}from"./chunk-
|
|
2
|
+
import{U,tt}from"./chunk-r7zvrh58.js";var o=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function u(t,e,r){let i={fullTag:r,content:e,attrs:t};if(/\bserver\b/.test(t))return{...i,type:"server"};if(/\bdata-stx-scoped\b/.test(t))return{...i,type:"client"};if(o.test(e))return{...i,type:"signals"};if(/\bclient\b/.test(t)||/\btype\s*=\s*["']module["']/.test(t)||/\bsrc\s*=/.test(t))return{...i,type:"client"};return{...i,type:"server"}}var S=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function yn(t){let e=[],r=[],i=[],c=0;while(c<t.length){let s=t.indexOf("<",c);if(s===-1)break;let p=tt(t,s);if(p>s){c=p;continue}let a=U(t,s);if(a>s){let f=t.slice(s,a),l=S.exec(f);if(l){let n=u(l[1],l[2],f);switch(n.type){case"signals":e.push(n);break;case"client":r.push(n);break;case"server":i.push(n);break}}c=a;continue}c=s+(t.startsWith("<!--",s)?4:1)}return{signals:e,client:r,server:i}}
|
|
3
3
|
export{yn};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{createHash as g}from"crypto";import{readFile as b,stat as y}from"fs/promises";async function
|
|
3
|
-
export{
|
|
2
|
+
import{createHash as g}from"crypto";import{readFile as b,stat as y}from"fs/promises";async function Y(e){try{let t=await b(e);return g("sha256").update(t).digest("hex").slice(0,16)}catch{return""}}function l(e){return g("sha256").update(e).digest("hex").slice(0,16)}function m(e,t){let r=JSON.stringify(t,Object.keys(t).sort());return`${l(e)}-${l(r)}`}async function h(e){try{return(await y(e)).mtimeMs}catch{return 0}}async function W(e){try{return await y(e),!0}catch{return!1}}import{mkdir as v,readFile as A,writeFile as P,readdir as z,rm as k,stat as B}from"fs/promises";import{join as w,dirname as D}from"path";var c=new Map,d={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500};async function E(e){try{await v(e,{recursive:!0})}catch{}}function p(e,t,r){return w(e,r,`${t}.json`)}async function C(e,t,r){if((Date.now()-e.createdAt)/86400000>r)return!1;if(await h(t)!==e.srcMtime)return!1;return!0}async function ns(e,t,r,a=d){if(!a.enabled)return null;let n=m(e,t),i=c.get(n);if(i){if(await C(i,e,a.maxAge))return i.lastAccessedAt=Date.now(),i.data;c.delete(n)}let o=p(a.directory,n,r);if(await W(o))try{let u=await A(o,"utf-8"),s=JSON.parse(u);if(await C(s,e,a.maxAge))return s.lastAccessedAt=Date.now(),c.set(n,s),s.data}catch{}return null}async function rs(e,t,r,a,n=d){if(!n.enabled)return;let i=m(e,t),o=await Y(e),u=await h(e),s={key:i,src:e,srcHash:o,srcMtime:u,optionsHash:m("",t),data:r,createdAt:Date.now(),lastAccessedAt:Date.now()};c.set(i,s);let f=p(n.directory,i,a);try{await E(D(f)),await P(f,JSON.stringify(s,null,2))}catch(x){console.warn(`[stx-media] Failed to write cache: ${x}`)}}async function ss(e,t=d){if(e==="all")c.clear();else c.clear();let r=e==="all"?["image","video"]:[e];for(let a of r){let n=w(t.directory,a);try{await k(n,{recursive:!0,force:!0})}catch{}}}
|
|
3
|
+
export{Y,W,ns,rs,ss};
|