@stacksjs/stx 0.2.480 → 0.2.482

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.
Files changed (63) hide show
  1. package/dist/chunk-0jp07cjs.js +2 -0
  2. package/dist/{chunk-csc538a5.js → chunk-1kkyg54v.js} +1 -1
  3. package/dist/{chunk-jcwn5641.js → chunk-1m9v96z5.js} +1 -1
  4. package/dist/{chunk-w1fy86aa.js → chunk-1z26g0cf.js} +13 -4
  5. package/dist/{chunk-npayazc2.js → chunk-3aw80qrg.js} +1 -1
  6. package/dist/{chunk-0f9p3jm6.js → chunk-3nq94g1b.js} +1 -1
  7. package/dist/{chunk-by8be7t7.js → chunk-44dk5bb5.js} +5 -5
  8. package/dist/{chunk-fk10wpkj.js → chunk-49h8ke5d.js} +1 -1
  9. package/dist/{chunk-ynhfzv5f.js → chunk-5fvzzqa3.js} +1 -1
  10. package/dist/{chunk-9cskmz6f.js → chunk-6vn4pa76.js} +1 -1
  11. package/dist/{chunk-3mqagqx2.js → chunk-7kjkmvrn.js} +1 -1
  12. package/dist/{chunk-ab4ajce4.js → chunk-8emc4aq5.js} +2 -2
  13. package/dist/{chunk-yx89t1we.js → chunk-8xvrcwtk.js} +1 -1
  14. package/dist/{chunk-1yt6vfyx.js → chunk-91jyax19.js} +1 -1
  15. package/dist/{chunk-4wc6hckd.js → chunk-960axmf7.js} +1 -1
  16. package/dist/{chunk-trz5bkxe.js → chunk-969np51a.js} +1 -1
  17. package/dist/{chunk-k6e9yc83.js → chunk-9vqz2m13.js} +1 -1
  18. package/dist/{chunk-rnh4sxhv.js → chunk-abts223v.js} +1 -1
  19. package/dist/{chunk-fmgr96es.js → chunk-ap9nnv9z.js} +1 -1
  20. package/dist/{chunk-w267tk8j.js → chunk-b1kdmkk8.js} +18 -18
  21. package/dist/{chunk-kw7z9xtf.js → chunk-cd6hz56r.js} +1 -1
  22. package/dist/{chunk-scj3j6xz.js → chunk-cgszdc9m.js} +1 -1
  23. package/dist/{chunk-3sscb1dw.js → chunk-d20gxzk9.js} +1 -1
  24. package/dist/chunk-dbj4sn74.js +2 -0
  25. package/dist/{chunk-jtq3nhwp.js → chunk-eg5djbse.js} +1 -1
  26. package/dist/{chunk-yw9h2zty.js → chunk-ep7hz9af.js} +1 -1
  27. package/dist/{chunk-sf1fxvwa.js → chunk-f4v80grv.js} +1 -1
  28. package/dist/{chunk-e6c12w2y.js → chunk-gzbzfndm.js} +1 -1
  29. package/dist/{chunk-3wkzj28f.js → chunk-hq97tyb6.js} +1 -1
  30. package/dist/{chunk-vbbyxjnq.js → chunk-jbmwm6k4.js} +1 -1
  31. package/dist/{chunk-sw168dnp.js → chunk-jvdren00.js} +1 -1
  32. package/dist/{chunk-fd5x89cr.js → chunk-jxrnagej.js} +2 -2
  33. package/dist/{chunk-2ead6r6z.js → chunk-k7t0rmzy.js} +1 -1
  34. package/dist/{chunk-wfyq4tde.js → chunk-kd7m4d0g.js} +1 -1
  35. package/dist/{chunk-hf3mx0b8.js → chunk-kmf7yh91.js} +1 -1
  36. package/dist/{chunk-js8envem.js → chunk-kzzjk2mx.js} +1 -1
  37. package/dist/chunk-mhwptrvm.js +2 -0
  38. package/dist/{chunk-tjk5b18m.js → chunk-pd5r4j8r.js} +1 -1
  39. package/dist/{chunk-0w4ajnbv.js → chunk-pe9bvwqn.js} +2 -2
  40. package/dist/{chunk-083amvsc.js → chunk-q4wpzj1f.js} +1 -1
  41. package/dist/chunk-q8pn42an.js +15 -0
  42. package/dist/{chunk-mfby8kxp.js → chunk-q9996m6n.js} +1 -1
  43. package/dist/{chunk-g9a2ajsa.js → chunk-r54tkwpc.js} +1 -1
  44. package/dist/{chunk-r63029hr.js → chunk-ra321t5d.js} +1 -1
  45. package/dist/{chunk-6tvv828r.js → chunk-rycvcgkc.js} +1 -1
  46. package/dist/{chunk-nepqqe3b.js → chunk-sqjdb265.js} +1 -1
  47. package/dist/{chunk-sms5qrmn.js → chunk-v9t3z8nm.js} +1 -1
  48. package/dist/{chunk-txkq59z8.js → chunk-vcs1fx8e.js} +1 -1
  49. package/dist/{chunk-nmck8fae.js → chunk-w28c9st3.js} +1 -1
  50. package/dist/{chunk-p87ckkwb.js → chunk-x73mzzm8.js} +1 -1
  51. package/dist/cli.js +8 -8
  52. package/dist/client-script-bundler.js +11 -7
  53. package/dist/craft-entry.js +1 -1
  54. package/dist/craft.js +1 -1
  55. package/dist/native/runtime/shared-screen.js +2 -1
  56. package/dist/pwa.js +1 -1
  57. package/dist/signals.js +12 -3
  58. package/dist/ssg.js +2 -2
  59. package/package.json +5 -5
  60. package/dist/chunk-77m49nv1.js +0 -2
  61. package/dist/chunk-bgamctxe.js +0 -2
  62. package/dist/chunk-nt98fd0r.js +0 -15
  63. package/dist/chunk-qa3ts1cb.js +0 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.480",
4
+ "version": "0.2.482",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -122,12 +122,12 @@
122
122
  "dependencies": {
123
123
  "@stacksjs/ts-css": "^0.3.2",
124
124
  "@stacksjs/clapp": "^0.2.16",
125
- "@stacksjs/desktop": "0.2.480",
126
- "@stacksjs/sanitizer": "0.2.480",
125
+ "@stacksjs/desktop": "0.2.482",
126
+ "@stacksjs/sanitizer": "0.2.482",
127
127
  "@stacksjs/ts-i18n": "^0.1.11",
128
- "bun-plugin-stx": "0.2.480",
128
+ "bun-plugin-stx": "0.2.482",
129
129
  "bunfig": "^0.15.19",
130
- "stx-router": "0.2.480",
130
+ "stx-router": "0.2.482",
131
131
  "ts-broadcasting": "^0.0.11",
132
132
  "ts-images": "^0.2.22",
133
133
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Mr,El,_l}from"./chunk-rnh4sxhv.js";import"./chunk-nt98fd0r.js";import"./chunk-kw7z9xtf.js";import"./chunk-8scw1bes.js";import"./chunk-w267tk8j.js";import"./chunk-8adstrk5.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-mfby8kxp.js";import"./chunk-99kt56fn.js";import"./chunk-s10r6hxp.js";import"./chunk-tbef3yyk.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-9ztdvnkk.js";import"./chunk-pcq6vphz.js";export{_l as clearComposableCache,El as getComposableScript,Mr as listComposableModules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Mi,Ni}from"./chunk-by8be7t7.js";import"./chunk-6tvv828r.js";import"./chunk-3mqagqx2.js";import"./chunk-tr25zcf1.js";import"./chunk-cxbp2m66.js";import"./chunk-js8envem.js";import"./chunk-4ebwk9cw.js";import"./chunk-4wc6hckd.js";import{no}from"./chunk-0w4ajnbv.js";import"./chunk-5x9ftmve.js";import"./chunk-gkj42zq7.js";import"./chunk-3wkzj28f.js";import"./chunk-2542vq5p.js";import"./chunk-28s5x7wv.js";import"./chunk-jtq3nhwp.js";import"./chunk-se55qe2x.js";import"./chunk-w6n2j62h.js";import"./chunk-v5rgebzz.js";import"./chunk-zkg0rbmp.js";import"./chunk-sarr8kz1.js";import"./chunk-3fjpg8kb.js";import"./chunk-vvs75dse.js";import"./chunk-rnh4sxhv.js";import"./chunk-3pv6f998.js";import"./chunk-5t5ahhjp.js";import"./chunk-k4shjm8n.js";import"./chunk-cgf2a166.js";import"./chunk-7ejq9n1v.js";import"./chunk-sf1fxvwa.js";import"./chunk-w1fy86aa.js";import"./chunk-jcwn5641.js";import"./chunk-fd5x89cr.js";import"./chunk-2gmbxp60.js";import"./chunk-nt98fd0r.js";import"./chunk-kw7z9xtf.js";import"./chunk-8scw1bes.js";import{he,en,tn,K,d,n,Xn,I,o,le}from"./chunk-w267tk8j.js";import"./chunk-8adstrk5.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-mfby8kxp.js";import"./chunk-99kt56fn.js";import"./chunk-s10r6hxp.js";import"./chunk-tbef3yyk.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-9ztdvnkk.js";import"./chunk-pcq6vphz.js";export{Xn as buildWebComponents,tn as cacheTemplate,en as checkCache,no as classifyAllScripts,Mi as createMiddleware,Ni as createRoute,I as defaultConfig,d as extractVariables,K as injectRouterScript,o as loadStxConfig,he as processClientScript,n as processDirectives,le as readMarkdownFile};
@@ -1,15 +0,0 @@
1
- // @bun
2
- import{Zt,ae}from"./chunk-8scw1bes.js";import{m,Qt,w,Me,o,R}from"./chunk-w267tk8j.js";import{qr}from"./chunk-kw7z9xtf.js";import{s,we}from"./chunk-ak95401g.js";import{a}from"./chunk-kk5cyjfs.js";import f from"path";import j from"fs";var pe=10;function V(e,n,i){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(f.basename(e))||qr(e,n,i)}var ne=1,re=new Map,P=600,fe=100,W=new Map;async function me(e){let n=W.get(e)??0;if(n>0&&n<fe){W.set(e,n+1);return}W.set(e,1);try{let i=(await j.promises.readdir(e)).filter((u)=>u.endsWith(".js"));if(i.length<=P)return;let g=(await Promise.all(i.map(async(u)=>{try{return{name:u,at:(await j.promises.stat(f.join(e,u))).mtimeMs}}catch{return null}}))).filter((u)=>u!==null);g.sort((u,l)=>l.at-u.at);for(let u of g.slice(P)){let l=u.name.slice(0,-3);await j.promises.rm(f.join(e,`${l}.js`),{force:!0}),await j.promises.rm(f.join(e,`${l}.deps.json`),{force:!0})}I("pruned bundle cache to",P,"entries")}catch{}}function ie(e){return re.get(e)??[]}function X(e,n){if(e)re.set(e,n)}function La(e=process.env){return e.STX_DEBUG==="true"||e.STX_DEBUG==="1"}function I(...e){if(La())console.log("[stx:bundler]",...e)}var Z=[];function No(e,n,i){Z.push({filePath:e||"<inline>",message:n,details:i})}function gt(){return Z.slice()}function mt(){Z.length=0}var q;function bu(e){q=e}function Lo(){if(q)return q;try{let e=R.strict;return typeof e==="object"&&e!==null?e.bundlerFallback??"warn":"warn"}catch{return"warn"}}var H=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function ht(e){let n=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,i;while((i=n.exec(e))!==null){let g=i[1];if(!H.some((l)=>l.test(g)))return I("detected user import:",g),!0}let c=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((i=c.exec(e))!==null){let g=i[1];if(/\.css(?:\?.*)?$/.test(g))continue;if(!H.some((l)=>l.test(g)))return I("detected side-effect import:",g),!0}return!1}var Yt="stx-module:",ge=/\.(?:[cm]?[jt]sx?|json)$/i;function ja(e,n){return f.relative(e,n).split(f.sep).join("/")}function Ba(e,n){if(n.size===0)return e;return e.replace(/^([ \t]*import\s+(?:[^;"']*?\s+from\s+)?)(["'])([^"']+)\2/gm,(i,c,g,u)=>{let l=n.get(u);return l&&!u.startsWith(Yt)?`${c}${g}${l}${g}`:i})}function Fa(e,n){let i=0,c=(u)=>{let l=`__stxMod${i++}`,v=JSON.stringify(u);return n.push(`var ${l} = globalThis.__stxModules && globalThis.__stxModules[${v}];`,`if (${l} === undefined) throw new Error("[stx] module " + ${JSON.stringify(v)} + " is not registered on this page (#1957)");`),l},g=(u,l)=>{for(let v of u.split(",")){let M=v.trim();if(!M)continue;let p=M.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!p)continue;let t=p[1].startsWith('"')?JSON.parse(p[1]):p[1],r=p[2]??t;n.push(`var ${r} = ${l}[${JSON.stringify(t)}];`)}};return e=e.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(u,l,v)=>{let M=v.slice(Yt.length),p=c(M),t=l.trim(),r=t.match(/^([\w$]+)\s*(?:,\s*|$)/);if(r&&!t.startsWith("{")&&!t.startsWith("*"))n.push(`var ${r[1]} = ${p}.default;`),t=t.slice(r[0].length).trim();let d=t.match(/^\*\s*as\s+([\w$]+)$/);if(d)n.push(`var ${d[1]} = ${p};`);else if(t.startsWith("{"))g(t.replace(/^\{|\}$/g,""),p);return""}),e=e.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(u,l)=>(c(l.slice(Yt.length)),"")),e}function ee(e){let n=[e,`${e}.ts`,`${e}.tsx`,`${e}.js`,`${e}.mjs`,`${e}.jsx`,f.join(e,"index.ts"),f.join(e,"index.tsx"),f.join(e,"index.js"),f.join(e,"index.mjs")];for(let i of n)try{if(j.existsSync(i)&&j.statSync(i,{throwIfNoEntry:!1})?.isFile())return i}catch{}return}function he(e,n,i,c,g,u=new Map,l){let v=(p,t,r)=>{if(V(t,e,l))return null;if(!g||p!==i||!ge.test(t))return null;try{if(!j.statSync(t,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}c.add(t);let d=`${Yt}${ja(process.cwd(),t)}`;return u.set(r,d),{path:d,external:!0}},M=(p,t)=>{let r=p===i?n:f.dirname(p),d=f.resolve(r,t);return ee(d)??d};return{name:"stx-client-bundle",setup(p){if(p.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(t)=>({path:t.path,external:!0})),p.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(t)=>({path:t.path,external:!0})),p.onResolve({filter:/^\//},(t)=>{let r=ee(t.path);if(r){let d=v(t.importer,r,t.path);if(d)return d;if(r!==i)c.add(r);return{path:r}}return{path:t.path,external:!0}}),p.onResolve({filter:/^\.\.?\//},(t)=>{let r=M(t.importer,t.path),d=v(t.importer,r,t.path);if(d)return d;return c.add(r),{path:r}}),p.onResolve({filter:/^[@~]\//},(t)=>{let r=f.resolve(e,t.path.slice(2)),d=[r,`${r}.ts`,`${r}.tsx`,`${r}.js`,`${r}.mjs`,`${r}.jsx`,f.join(r,"index.ts"),f.join(r,"index.tsx"),f.join(r,"index.js"),f.join(r,"index.mjs")];for(let E of d)if(j.existsSync(E)&&j.statSync(E,{throwIfNoEntry:!1})?.isFile()){let C=v(t.importer,E,t.path);if(C)return C;return I(`resolved ${t.path[0]}/ import:`,t.path,"\u2192",E),c.add(E),{path:E}}return console.warn(`[stx:bundler] could not resolve ${t.path[0]}/ import:`,t.path),{path:r}}),g)p.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(t)=>{if(t.importer!==i)return;let r=`${Yt}npm:${t.path}`;return u.set(t.path,r),{path:r,external:!0}});p.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(t)=>{if(V(t.path,e,l))throw Error(`Server-only API source cannot be imported by a client script: ${t.path}`);let r=f.extname(t.path).toLowerCase(),d=r===".json"?"json":r===".tsx"?"tsx":r===".jsx"?"jsx":r===".ts"||r===".mts"||r===".cts"?"ts":"js";if(t.path!==i)c.add(t.path);return{contents:j.readFileSync(t.path,"utf8"),loader:d}})}}}var G=new Map,L=m(64),te=Symbol.for("stx.client-bundle-build-queue");function za(e){let n=globalThis,c=(n[te]??Promise.resolve()).then(e,e);return n[te]=c.then(()=>{return},()=>{return}),c}async function yt(e,n,i={}){let c=i.projectRoot||process.cwd(),g=(await o(c)).serverApi,u=i.minify??!1,l=i.externalizeUserModules??!0,v=i.expose?.length?[...new Set(i.expose)].sort():void 0,M=i.cacheDir||a(c,"bundle-cache"),p=new Bun.CryptoHasher("md5");p.update(`${pe}\x00${Me()}\x00${JSON.stringify(g??!1)}\x00${l?"registry":"inline"}\x00${v?v.join(","):"*"}\x00${e}\x00${n}`);let t=p.digest("hex").slice(0,12),r=f.join(M,`${t}.js`),d=L.get(r);if(d){if(Qt(d.files)&&d.files.every((A)=>!V(A.path,c,g))){I("memo hit:",t);let A=d.files.map((B)=>B.path);return X(n,A),i.collectInputs?.push(...A),d.code}L.delete(r),I("memo invalidated by dep change:",t)}let E=f.join(M,`${t}.deps.json`),C=Bun.file(r);if(await C.exists()){let A=Bun.file(E),B=!1,N=null;if(await A.exists())try{let O=JSON.parse(await A.text());if(O.metadataVersion!==ne||!Array.isArray(O.files))B=!1;else N=O.files,B=!0;if(N&&(!Qt(N)||N.some((D)=>V(D.path,c,g))))B=!1}catch{B=!1}if(B){if(I("cache hit:",t),N)X(n,N.map((D)=>D.path)),i.collectInputs?.push(...N.map((D)=>D.path));let O=await C.text();if(N)L.set(r,{code:O,files:N});return O}I("cache invalidated by dep change:",t)}let _=G.get(t);if(_){let A=await _;if(i.collectInputs)i.collectInputs.push(...(L.get(r)?.files??[]).map((B)=>B.path));return A}let z=za(()=>$e(e,n,{projectRoot:c,minify:u,cacheDir:M,hash:t,cachePath:r,depsPath:E,collectInputs:i.collectInputs,externalizeUserModules:l,serverApi:g,expose:v,throwOnFailure:i.throwOnFailure}));G.set(t,z);try{return await z}finally{G.delete(t)}}var xe=0;function Ha(e){return`${e}-${process.pid}-${++xe}`}async function $e(e,n,i){let{projectRoot:c,minify:g,cacheDir:u,hash:l,cachePath:v,depsPath:M,externalizeUserModules:p}=i,t=a(c,"bundle-tmp"),r=Ha(l),d=f.join(t,`${r}.ts`),E=f.join(t,"out",r);j.mkdirSync(t,{recursive:!0}),j.mkdirSync(E,{recursive:!0});let C=f.dirname(n),_=new Set,z=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,A=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,B=s(e),{depths:N,balanced:O}=we(B),D=(S)=>!O||N[S]===0,b;while((b=z.exec(B))!==null){if(b[1])continue;if(!D(b.index))continue;if(b[2])b[2].split(",").forEach((S)=>{let h=be(S);if(h)_.add(h)});else if(b[3])_.add(b[3])}while((b=A.exec(B))!==null){if(b[1])continue;if(!D(b.index))continue;_.add(b[2])}let se=/^[ \t]*import[ \t]+(?!type\b)(?:(\w+)\s*(?:,\s*)?)?(?:\*\s+as\s+(\w+)|\{([^}]+)\})?\s+from\b/gm;while((b=se.exec(B))!==null){if(!D(b.index))continue;let S=/^\s*['"]([^'"]+)['"]/.exec(e.slice(b.index+b[0].length))?.[1];if(S&&H.some((h)=>h.test(S)))continue;if(b[1])_.add(b[1]);if(b[2])_.add(b[2]);for(let h of(b[3]??"").split(",")){let y=h.trim();if(!y||/^type\s/.test(y))continue;let U=/\bas\s+(\w+)\s*$/.exec(y)?.[1]??/^\w+$/.exec(y)?.[0];if(U)_.add(U)}}for(let S of B.matchAll(/\bexport\s*\{([^}]+)\}/g))for(let h of S[1].split(",")){let y=/\bas\s+(\w+)\s*$/.exec(h)?.[1]??/^\s*(\w+)\s*$/.exec(h)?.[1];if(y)_.delete(y)}let oe=_.size>0?`
3
- export { ${[..._].join(", ")} }`:"";await Bun.write(d,e+oe),I("bundling:",l,"from:",f.basename(n));let Y=new Set,Q=new Map;try{let S=await Bun.build({entrypoints:[d],outdir:E,target:"browser",format:"esm",minify:g,plugins:[he(c,C,d,Y,p,Q,i.serverApi)],define:{"process.env.NODE_ENV":g?'"production"':'"development"',...w()},root:c});if(!S.success){let F=S.logs.filter((T)=>T.level==="error").map((T)=>T.message).join(", ")||`Unable to bundle ${f.basename(n)}`,k=Zt(S.logs,n||void 0);if(console.warn("[stx:bundler] build failed:",F),No(n||"",F,k),i.throwOnFailure||Lo()==="error")throw Error(F);return e}let h="";for(let x of S.outputs){h=await x.text();break}let y=[];for(let x of h.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let F of x[1].split(",")){let k=F.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(k){y.push([k[2],k[1]]);continue}let T=F.trim();if(/^[A-Za-z_$][\w$]*$/.test(T))y.push([T,T])}if(i.expose){let x=new Set(i.expose);for(let F=y.length-1;F>=0;F--)if(!x.has(y[F][0]))y.splice(F,1)}let U=[];h=Fa(Ba(h,Q),U);let le=h.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];h=h.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let K=`__stxBundle_${l}`,ce=y.map(([x,F])=>`${JSON.stringify(x)}: ${F}`).join(", "),ue=y.map(([x])=>`var ${x} = undefined;`).join(`
4
- `),de=y.map(([x])=>`${x} = ${K}[${JSON.stringify(x)}];`).join(`
5
- `);if(h=`${le.join(`
6
- `)}
7
- ${ue}
8
- var ${K} = (function() {
9
- ${U.join(`
10
- `)}
11
- ${h}
12
- return { ${ce} };
13
- })();
14
- ${de}`.trim(),I("bundled:",l,"output:",h.length,"bytes"),_.size>0&&y.length===0)return console.warn(`[stx:bundler] dropped every binding for ${f.basename(n)} (${l}); serving the unbundled source and not caching this result`),e;j.mkdirSync(u,{recursive:!0}),await Bun.write(v,h);let J=Array.from(Y).map((x)=>{try{return{path:x,mtimeMs:j.statSync(x).mtimeMs}}catch{return null}}).filter((x)=>x!==null);return await Bun.write(M,JSON.stringify({metadataVersion:ne,files:J})),X(n,J.map((x)=>x.path)),i.collectInputs?.push(...J.map((x)=>x.path)),L.set(v,{code:h,files:J}),await me(u),h}catch(S){let h=Zt(S,n||void 0),y=ae(S,n||void 0);if(console.warn(`[stx:bundler] error: ${y}`),No(n||"",y,h),i.throwOnFailure||Lo()==="error")throw S;return e}finally{try{j.rmSync(d,{force:!0}),j.rmSync(E,{recursive:!0,force:!0})}catch{}}}function be(e){let n=e.trim();if(!n)return null;let i=n.indexOf("=");if(i!==-1)n=n.slice(0,i).trim();let c=n.indexOf(":");if(c!==-1)n=n.slice(c+1).trim();if(n.startsWith("..."))n=n.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(n)?n:null}
15
- export{ie,La,No,gt,mt,bu,Lo,ht,Yt,ja,Ba,Fa,za,yt,Ha};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Kl,Xl}from"./chunk-sf1fxvwa.js";import"./chunk-nt98fd0r.js";import"./chunk-kw7z9xtf.js";import"./chunk-8scw1bes.js";import"./chunk-w267tk8j.js";import"./chunk-8adstrk5.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-mfby8kxp.js";import"./chunk-99kt56fn.js";import"./chunk-s10r6hxp.js";import"./chunk-tbef3yyk.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-9ztdvnkk.js";import"./chunk-pcq6vphz.js";export{Xl as clearStoreCache,Kl as getStoreScript};