@stacksjs/stx 0.2.239 → 0.2.240
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-4awxsp8f.js → chunk-092sm06a.js} +2 -2
- package/dist/{chunk-11mxy34t.js → chunk-0cznrnwk.js} +2 -2
- package/dist/{chunk-mbwe1z12.js → chunk-0kq46rxg.js} +1 -1
- package/dist/{chunk-p4a35r71.js → chunk-0ks60fk1.js} +1 -1
- package/dist/{chunk-cjhpwef8.js → chunk-0s88j6n8.js} +1 -1
- package/dist/{chunk-bskzz385.js → chunk-15rgmdtq.js} +1 -1
- package/dist/{chunk-hk8j3eps.js → chunk-19m7hed6.js} +1 -1
- package/dist/chunk-1fj21pgq.js +2 -0
- package/dist/{chunk-n7w8kgfw.js → chunk-1p0r6k2f.js} +1 -1
- package/dist/{chunk-xgtcq9bj.js → chunk-1px4xey5.js} +1 -1
- package/dist/{chunk-p56hfz00.js → chunk-20q757q9.js} +1 -1
- package/dist/{chunk-8t7w323q.js → chunk-2p5qa9pm.js} +1 -1
- package/dist/{chunk-msxcd1kp.js → chunk-2qkasmq1.js} +2 -2
- package/dist/chunk-2vjheprp.js +2 -0
- package/dist/{chunk-hv6hat6p.js → chunk-33pdtz6a.js} +1 -1
- package/dist/{chunk-0e1pt5my.js → chunk-37nm0f2v.js} +2 -2
- package/dist/chunk-404eam50.js +2 -0
- package/dist/chunk-4t43nqtn.js +2 -0
- package/dist/{chunk-5q44vwmg.js → chunk-5w362c8x.js} +1 -1
- package/dist/chunk-6brdnp9j.js +2 -0
- package/dist/chunk-6fdg7043.js +2 -0
- package/dist/chunk-6h4f19sb.js +2 -0
- package/dist/{chunk-qygqf2zb.js → chunk-6mk7fd7v.js} +1 -1
- package/dist/{chunk-jz3cjfz1.js → chunk-6mtc3b9a.js} +1 -1
- package/dist/{chunk-frh6b2q7.js → chunk-6qtx7w2r.js} +1 -1
- package/dist/{chunk-wdwf3wzg.js → chunk-78bpc81t.js} +1 -1
- package/dist/{chunk-4tybm7fx.js → chunk-7djq40jk.js} +1 -1
- package/dist/{chunk-z0y4gcsp.js → chunk-7mqbw6qv.js} +1 -1
- package/dist/{chunk-rkhfhfas.js → chunk-8g7xy48w.js} +1 -1
- package/dist/{chunk-1jcyfxq5.js → chunk-8x4h673x.js} +1 -1
- package/dist/{chunk-k46js7bz.js → chunk-9228drk4.js} +1 -1
- package/dist/{chunk-n0kbk2ge.js → chunk-98pkw4t1.js} +1 -1
- package/dist/chunk-9h74bkfh.js +2 -0
- package/dist/{chunk-2fspj91j.js → chunk-a8fx6wcb.js} +1 -1
- package/dist/{chunk-ggsxz07y.js → chunk-adj1k3w7.js} +1 -1
- package/dist/{chunk-a6m63ra1.js → chunk-ae85dv6n.js} +1 -1
- package/dist/{chunk-cs9cynxh.js → chunk-ajjwrrmz.js} +1 -1
- package/dist/{chunk-5a1b5kjt.js → chunk-ax56kn66.js} +1 -1
- package/dist/{chunk-8k7evyhh.js → chunk-b212gjes.js} +1 -1
- package/dist/{chunk-nnd1hqht.js → chunk-b220zqbz.js} +3 -3
- package/dist/chunk-b5w02n3z.js +22 -0
- package/dist/{chunk-m2v35nze.js → chunk-bn0td54v.js} +1 -1
- package/dist/{chunk-wr17wgn4.js → chunk-brpvf652.js} +1 -1
- package/dist/{chunk-7qgt3b5t.js → chunk-bx4nptd2.js} +1 -1
- package/dist/{chunk-1xgva25g.js → chunk-by3zs4ag.js} +1 -1
- package/dist/{chunk-sbpzt8yd.js → chunk-c0apssp7.js} +1 -1
- package/dist/{chunk-v65nfy32.js → chunk-c9843bnq.js} +1 -1
- package/dist/{chunk-mccyah24.js → chunk-cda7v05f.js} +1 -1
- package/dist/chunk-cj3zqzd0.js +2 -0
- package/dist/chunk-ekx9j0rv.js +2 -0
- package/dist/{chunk-9778d23n.js → chunk-enewax5b.js} +1 -1
- package/dist/{chunk-fee1k8c5.js → chunk-etx5vb1n.js} +1 -1
- package/dist/chunk-eyfmvy7z.js +2 -0
- package/dist/chunk-fdp386zd.js +2 -0
- package/dist/chunk-fethffrc.js +2 -0
- package/dist/{chunk-yf04htgs.js → chunk-fnty12j5.js} +1 -1
- package/dist/{chunk-04tp3hjf.js → chunk-ft61rs60.js} +10 -10
- package/dist/{chunk-qa8qmer5.js → chunk-g553n48p.js} +1 -1
- package/dist/{chunk-s8bx0wv7.js → chunk-gaj725dz.js} +1 -1
- package/dist/chunk-h4ccaa7d.js +2 -0
- package/dist/{chunk-sqe4sz8r.js → chunk-j79s71z4.js} +1 -1
- package/dist/{chunk-8p8qa1s9.js → chunk-k26kt6fp.js} +1 -1
- package/dist/{chunk-2k9xsqnx.js → chunk-kq9abgx2.js} +1 -1
- package/dist/{chunk-x58dcsjw.js → chunk-m0xp6xjr.js} +1 -1
- package/dist/{chunk-vtfzc29r.js → chunk-m8h6km5v.js} +1 -1
- package/dist/chunk-mjck13y3.js +2 -0
- package/dist/{chunk-1kg9sz9a.js → chunk-mv2v3g62.js} +1 -1
- package/dist/{chunk-g6bdbdvj.js → chunk-myqyr2dp.js} +1 -1
- package/dist/{chunk-4s11yb67.js → chunk-n07dds2d.js} +1 -1
- package/dist/{chunk-6x3jqwxp.js → chunk-n3tj3h1q.js} +1 -1
- package/dist/{chunk-mxva4zmq.js → chunk-nhn7qftp.js} +1 -1
- package/dist/chunk-np6b30jn.js +2 -0
- package/dist/{chunk-h3paff80.js → chunk-nw7y6zw8.js} +1 -1
- package/dist/{chunk-hx0zj6c9.js → chunk-nzser3gj.js} +1 -1
- package/dist/chunk-p6gb0bak.js +2 -0
- package/dist/{chunk-frv8qh41.js → chunk-p7a8mgns.js} +1 -1
- package/dist/{chunk-a0zaf8r9.js → chunk-phj11c6x.js} +1 -1
- package/dist/{chunk-5e2j8d7r.js → chunk-q9vxc3gc.js} +1 -1
- package/dist/chunk-qmww6n4b.js +2 -0
- package/dist/{chunk-j4ze77e0.js → chunk-qs0fp63n.js} +1 -1
- package/dist/{chunk-9hcw5zsr.js → chunk-qv3g8tde.js} +1 -1
- package/dist/chunk-r2zcdk2f.js +2 -0
- package/dist/chunk-r4wxxggc.js +2 -0
- package/dist/{chunk-7y7dp1ba.js → chunk-sdfe1xce.js} +1 -1
- package/dist/{chunk-j2pmv4jw.js → chunk-shh4byc3.js} +1 -1
- package/dist/chunk-sxx50f3k.js +2 -0
- package/dist/{chunk-s2smc4wv.js → chunk-szchgak8.js} +1 -1
- package/dist/chunk-t2fwnrw9.js +2 -0
- package/dist/chunk-tx9zv1xv.js +2 -0
- package/dist/{chunk-w9yfvb4d.js → chunk-v0tmvq31.js} +1 -1
- package/dist/{chunk-spnkgsft.js → chunk-v2vv4etv.js} +22 -22
- package/dist/chunk-v8mxhfp7.js +2 -0
- package/dist/chunk-vd3w4q9e.js +2 -0
- package/dist/chunk-vgnjrgnk.js +2 -0
- package/dist/{chunk-d1pp19wx.js → chunk-w3pzxz3m.js} +1 -1
- package/dist/chunk-wjebx46w.js +2 -0
- package/dist/chunk-wz1gwj81.js +2 -0
- package/dist/{chunk-evv58hf5.js → chunk-x41v697c.js} +1 -1
- package/dist/{chunk-v4t1kxm7.js → chunk-xddvx94h.js} +1 -1
- package/dist/{chunk-7hfjv9ej.js → chunk-xj05xmfg.js} +1 -1
- package/dist/{chunk-r2kag877.js → chunk-z2gmz9ew.js} +2 -2
- package/dist/{chunk-jjehgxtc.js → chunk-z8t5cs8f.js} +1 -1
- package/dist/cli.js +14 -14
- package/dist/client-script.d.ts +6 -0
- package/dist/client-script.js +1 -2
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/database.js +1 -1
- package/dist/pwa.js +2 -2
- package/dist/ssg.js +2 -2
- package/dist/stx-virtual-ts.js +3 -0
- package/dist/visual-testing.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-0b88ky9d.js +0 -2
- package/dist/chunk-0prbc65y.js +0 -2
- package/dist/chunk-38nq2ymv.js +0 -2
- package/dist/chunk-412apa52.js +0 -2
- package/dist/chunk-5kmwyys8.js +0 -2
- package/dist/chunk-9scfmhph.js +0 -2
- package/dist/chunk-a0aqpzm6.js +0 -2
- package/dist/chunk-cff5gpvr.js +0 -2
- package/dist/chunk-csjhh5t2.js +0 -2
- package/dist/chunk-dcc04y1t.js +0 -2
- package/dist/chunk-e4gycrtb.js +0 -2
- package/dist/chunk-f7se90b8.js +0 -2
- package/dist/chunk-g98vjcbj.js +0 -2
- package/dist/chunk-h451yyp6.js +0 -2
- package/dist/chunk-hd1hr94w.js +0 -2
- package/dist/chunk-hfc4afre.js +0 -2
- package/dist/chunk-hr7hvaf0.js +0 -2
- package/dist/chunk-j5rmhyqr.js +0 -2
- package/dist/chunk-je7cvg5j.js +0 -2
- package/dist/chunk-jqnckvbk.js +0 -2
- package/dist/chunk-mdk3c8n2.js +0 -2
- package/dist/chunk-n27c7jvr.js +0 -2
- package/dist/chunk-nrzx6d77.js +0 -2
- package/dist/chunk-pz3n5qde.js +0 -2
- package/dist/chunk-tpc0vwvz.js +0 -22
- package/dist/chunk-wc5385mg.js +0 -2
- package/dist/chunk-x21s75kv.js +0 -2
- package/dist/chunk-yzftmbry.js +0 -2
- package/dist/chunk-z54ans51.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{gl as _,hl as h}from"./chunk-r84h7wxw.js";import{Pl as m,
|
|
2
|
+
import{gl as _,hl as h}from"./chunk-r84h7wxw.js";import{Pl as m,cs as p}from"./chunk-v2vv4etv.js";import{jt as N}from"./chunk-1px4xey5.js";import K from"path";import q from"fs";var l=5,u=1;function i(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function L(...J){if(i())console.log("[stx:bundler]",...J)}var D=[];function v(J,z,Y){D.push({filePath:J||"<inline>",message:z,details:Y})}function Yw(){return D.slice()}function Zw(){D.length=0}var F;function $w(J){F=J}function b(){if(F)return F;try{let J=p.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var f=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function Qw(J){let z=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,Y;while((Y=z.exec(J))!==null){let M=Y[1];if(!f.some((w)=>w.test(M)))return L("detected user import:",M),!0}let Z=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((Y=Z.exec(J))!==null){let M=Y[1];if(/\.css(?:\?.*)?$/.test(M))continue;if(!f.some((w)=>w.test(M)))return L("detected side-effect import:",M),!0}return!1}function t(J,z,Y,Z){let M=($,w)=>{let G=$===Y?z:K.dirname($),W=K.resolve(G,w),H=[W,`${W}.ts`,`${W}.tsx`,`${W}.js`,`${W}.mjs`,`${W}.jsx`,K.join(W,"index.ts"),K.join(W,"index.tsx"),K.join(W,"index.js"),K.join(W,"index.mjs")];for(let j of H)try{if(q.existsSync(j)&&q.statSync(j,{throwIfNoEntry:!1})?.isFile())return j}catch{}return W};return{name:"stx-client-bundle",setup($){$.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(w)=>({path:w.path,external:!0})),$.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(w)=>({path:w.path,external:!0})),$.onResolve({filter:/^\//},(w)=>{if(q.existsSync(w.path))return{path:w.path};return{path:w.path,external:!0}}),$.onResolve({filter:/^\.\.?\//},(w)=>{let G=M(w.importer,w.path);return Z.add(G),{path:G}}),$.onResolve({filter:/^[@~]\//},(w)=>{let G=K.resolve(J,w.path.slice(2)),W=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,K.join(G,"index.ts"),K.join(G,"index.tsx"),K.join(G,"index.js"),K.join(G,"index.mjs")];for(let H of W)if(q.existsSync(H)&&q.statSync(H,{throwIfNoEntry:!1})?.isFile())return L(`resolved ${w.path[0]}/ import:`,w.path,"\u2192",H),Z.add(H),{path:H};return console.warn(`[stx:bundler] could not resolve ${w.path[0]}/ import:`,w.path),{path:G}}),$.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(w)=>{let G=K.extname(w.path).toLowerCase(),W=G===".json"?"json":G===".tsx"?"tsx":G===".jsx"?"jsx":G===".ts"||G===".mts"||G===".cts"?"ts":"js";if(w.path!==Y)Z.add(w.path);return{contents:q.readFileSync(w.path,"utf8"),loader:W}})}}}var R=new Map,g=Symbol.for("stx.client-bundle-build-queue");function s(J){let z=globalThis,Z=(z[g]??Promise.resolve()).then(J,J);return z[g]=Z.then(()=>{return},()=>{return}),Z}async function Xw(J,z,Y={}){let Z=Y.projectRoot||process.cwd(),M=Y.minify??!1,$=Y.cacheDir||N(Z,"bundle-cache"),w=new Bun.CryptoHasher("md5");w.update(`${l}\x00${J}\x00${z}`);let G=w.digest("hex").slice(0,12),W=K.join($,`${G}.js`),H=K.join($,`${G}.deps.json`),j=Bun.file(W);if(await j.exists()){let V=Bun.file(H),O=!0;if(await V.exists())try{let y=JSON.parse(await V.text());if(y.metadataVersion!==u||!Array.isArray(y.files))O=!1;for(let S of Array.isArray(y.files)?y.files:[])try{if(q.statSync(S.path).mtimeMs!==S.mtimeMs){O=!1;break}}catch{O=!1;break}}catch{O=!1}if(O)return L("cache hit:",G),await j.text();L("cache invalidated by dep change:",G)}let T=R.get(G);if(T)return await T;let x=s(()=>a(J,z,{projectRoot:Z,minify:M,cacheDir:$,hash:G,cachePath:W,depsPath:H}));R.set(G,x);try{return await x}finally{R.delete(G)}}async function a(J,z,Y){let{projectRoot:Z,minify:M,cacheDir:$,hash:w,cachePath:G,depsPath:W}=Y,H=N(Z,"bundle-tmp"),j=K.join(H,`${w}.ts`),T=K.join(H,"out",w);q.mkdirSync(H,{recursive:!0}),q.mkdirSync(T,{recursive:!0});let x=K.dirname(z),V=[],O=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,y=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,S;while((S=O.exec(J))!==null){if(S[1])continue;if(S[2])S[2].split(",").forEach((I)=>{let X=e(I);if(X)V.push(X)});else if(S[3])V.push(S[3])}while((S=y.exec(J))!==null){if(S[1])continue;V.push(S[2])}let B=V.length>0?`
|
|
3
3
|
export { ${V.join(", ")} }`:"";await Bun.write(j,J+B),L("bundling:",w,"from:",K.basename(z));let P=new Set;try{let I=await Bun.build({entrypoints:[j],outdir:T,target:"browser",format:"esm",minify:M,plugins:[t(Z,x,j,P)],define:{"process.env.NODE_ENV":M?'"production"':'"development"',...m()},root:Z});if(!I.success){let C=I.logs.filter((U)=>U.level==="error").map((U)=>U.message).join(", ")||`Unable to bundle ${K.basename(z)}`,A=_(I.logs,z||void 0);if(console.warn("[stx:bundler] build failed:",C),v(z||"",C,A),b()==="error")throw Error(C);return J}let X="";for(let Q of I.outputs){X=await Q.text();break}let k=[];for(let Q of X.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let C of Q[1].split(",")){let A=C.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(A){k.push([A[2],A[1]]);continue}let U=C.trim();if(/^[A-Za-z_$][\w$]*$/.test(U))k.push([U,U])}let c=X.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];X=X.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let E=`__stxBundle_${w}`,o=k.map(([Q,C])=>`${JSON.stringify(Q)}: ${C}`).join(", "),n=k.map(([Q])=>`var ${Q} = undefined;`).join(`
|
|
4
4
|
`),r=k.map(([Q])=>`${Q} = ${E}[${JSON.stringify(Q)}];`).join(`
|
|
5
5
|
`);if(X=`${c.join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{l as a,m as b,n as c}from"./chunk-q9n5swx7.js";import"./chunk-
|
|
2
|
+
import{l as a,m as b,n as c}from"./chunk-q9n5swx7.js";import"./chunk-qs0fp63n.js";export{c as updateContextTree,b as updateContextStoryFiles,a as createContext};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Wi as a,Xi as b,Yi as c}from"./chunk-5w362c8x.js";import"./chunk-ht51fz7w.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var{defineProperty:e,getOwnPropertyNames:g,getOwnPropertyDescriptor:h}=Object,i=Object.prototype.hasOwnProperty;function j(a){return this[a]}var m=(a)=>{var b=(f??=new WeakMap).get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function"){for(var d of g(a))if(!i.call(b,d))e(b,d,{get:j.bind(a,d),enumerable:!(c=h(a,d))||c.enumerable})}return f.set(a,b),b},f;var k=(a)=>a;function l(a,b){this[a]=k.bind(null,b)}var n=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:l.bind(b,c)})};var o=(a,b)=>()=>(a&&(b=a(a=0)),b);var p=import.meta.require;
|
|
3
|
-
export{m as
|
|
3
|
+
export{m as Lu,n as Mu,o as Nu,p as Ou};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Js as _}from"./chunk-mv2v3g62.js";import"./chunk-qs0fp63n.js";function W(j,G,H=240){return j.slice(G,G+H)}var v=[{rule:"route-params",pattern:/\blocation\s*\.\s*pathname\s*\.\s*(?:match|split)\s*\(/g,primitive:"useRoute() / useRouteParams() / useRouteParam(name)",why:"parsing the URL by hand re-implements the router and does not update on SPA navigation"},{rule:"alert",pattern:/(?<![.#\w$])(?:(?:window|globalThis)\s*\.\s*)?alert\s*\(/g,primitive:"stxAlert(message)",why:"themed, focus-trapped and non-blocking \u2014 but `await` it if the code after it "+"depended on the native dialog blocking until dismissal",reject:(j)=>/\b(?:async\s+)?function\s+alert\s*\(/.test(j)||/\b(?:const|let|var)\s+alert\s*=/.test(j)},{rule:"search-params",pattern:/new\s+URLSearchParams\s*\(/g,primitive:"useSearchParams()",why:"reactive, and writes back through the router instead of history.replaceState",reject:(j,G)=>{let H=j.indexOf("(",G);if(H===-1)return!0;let Q=j.slice(H+1,j.indexOf(")",H)+1);return!/\b(?:location|search|href|url)\b/i.test(Q)}},{rule:"navigate",pattern:/\blocation\s*\.\s*(?:assign|replace)\s*\(|\blocation\s*\.\s*href\s*=/g,primitive:"navigate(path) / goBack()",why:"a full document load throws away every store and the scroll position; navigate() is an SPA transition",reject:(j,G)=>/^[^\n]*?(?:['"`]\s*)?(?:mailto:|tel:|sms:|https?:\/\/|\/\/)/.test(W(j,G,160))},{rule:"fetch",pattern:/new\s+AbortController\s*\(/g,primitive:"useFetch(url) / useAsyncData(key, fn)",why:"cancellation, loading and error state are already wired; hand-rolling them is where the races live"},{rule:"polling",pattern:/setInterval\s*\(/g,primitive:"useEventSource() / useSSE() / useWebSocket() / useChannel()",why:"polling burns requests and lags; the push primitives are delivered",reject:(j,G)=>!/\bfetch\s*\(|\$fetch\b|useFetch\b|\.get\s*\(|axios\b/.test(W(j,G))},{rule:"debounce",pattern:/\bclearTimeout\s*\(/g,primitive:"useDebounce(fn, ms) / useThrottle(fn, ms)",why:"a hand-held timer handle per call site is the usual source of stale-result bugs",requires:(j)=>/setTimeout\s*\(/.test(j)},{rule:"click-outside",pattern:/document\s*\.\s*addEventListener\s*\(\s*['"](?:click|mousedown|pointerdown)['"]/g,primitive:"useClickOutside(ref, fn)",why:"the document-level listener plus the blur race is exactly what this composable exists to remove"},{rule:"focus",pattern:/\.\s*(?:getElementById|querySelector)\s*\([^)]*\)\s*(?:\?\.)?\s*\.?focus\s*\(/g,primitive:"useFocus(ref) with x-ref",why:"a query by id breaks under nested scopes and SPA navigation; a ref does not"},{rule:"clipboard",pattern:/navigator\s*\.\s*(?:clipboard|share)\b/g,primitive:"useClipboard() / useShare()",why:"permission state, the copied flag and the unsupported-browser fallback are already handled"},{rule:"watch",pattern:/\beffect\s*\(\s*\(\s*\)\s*=>\s*\{[^}]*\bvoid\s+\w+\s*\(\s*\)/g,primitive:"watch(source, cb) / watchMultiple([...], cb)",why:"the `void a(); void b()` dance is a manual dependency list; watch takes one directly"}],U=["confirm","tooltip",...v.map((j)=>j.rule)];function N(j,G){let H=1;for(let Q=0;Q<G;Q++)if(j[Q]===`
|
|
3
3
|
`)H++;return H}function P(j,G){let H=j.lastIndexOf(`
|
|
4
4
|
`,G)+1,Q=j.indexOf(`
|
|
5
5
|
`,G);return j.slice(H,Q===-1?j.length:Q).trim().slice(0,120)}function q(j,G){let H=j.slice(0,G),Q=H.lastIndexOf("function"),X=H.lastIndexOf("=>"),M=Math.max(Q,X);if(M===-1)return!1;let z=j.slice(Math.max(0,M-120),M);return/\basync\b[^;{}]*$/.test(z)}function L(j){return/\b(?:async\s+)?function\s+confirm\s*\(/.test(j)||/\b(?:const|let|var)\s+confirm\s*=/.test(j)||/\bimport\s*\{[^}]*\bconfirm\b[^}]*\}/.test(j)}function O(j,G,H){if(L(j))return j;let Q=/(^|[^\w$.])(?:(?:window|globalThis)\s*\.\s*)?confirm\s*\(/g,X=F(j),M="",z=0,Y;while((Y=Q.exec(X))!==null){let Z=Y.index+Y[1].length,$=N(j,Z),J=P(j,Z);if(/stxConfirm\s*\($/.test(j.slice(0,Z+8)))continue;let D=q(j,Z);if(H.push({file:G,line:$,rule:"confirm",applied:D,snippet:J,reason:D?void 0:"stxConfirm() returns a Promise and native confirm() is synchronous, so this needs `await` inside an async function. Rewriting it here would make the condition always true."}),D)M+=j.slice(z,Z)+"await stxConfirm(",z=Z+(Y[0].length-Y[1].length)}return M+j.slice(z)}function w(j,G,H){let Q=/(<[a-z][\w-]*\b[^>]*?)\stitle=(["'])(.*?)\2/gis,X=C(j),M="",z=0,Y;while((Y=Q.exec(X))!==null){let[Z,$,J,D]=Y,K=N(j,Y.index),B=P(j,Y.index),V=$.match(/^<([A-Za-z][\w-]*)/)?.[1]??"";if(/^[A-Z]/.test(V)){H.push({file:G,line:K,rule:"tooltip",applied:!1,snippet:B,reason:`\`title\` on <${V}> is a component prop, not an HTML attribute \u2014 `+"adding x-tooltip here would put a tooltip on a component and may duplicate text it already renders."});continue}if(/\bx-tooltip[=\s]/.test($)||D.trim()===""){H.push({file:G,line:K,rule:"tooltip",applied:!1,snippet:B,reason:/\bx-tooltip[=\s]/.test($)?"already has x-tooltip":"empty title"});continue}H.push({file:G,line:K,rule:"tooltip",applied:!0,snippet:B}),M+=j.slice(z,Y.index)+`${$} x-tooltip=${J}${D}${J} title=${J}${D}${J}`,z=Y.index+Z.length}return M+j.slice(z)}function C(j){return j.replace(/<!--[\s\S]*?-->/g,(G)=>G.replace(/[^\n]/g," ")).replace(/\{\{--[\s\S]*?--\}\}/g,(G)=>G.replace(/[^\n]/g," "))}function E(j){let G=(H)=>H.replace(/[^\n]/g," ");return j.replace(/\/\*[\s\S]*?\*\//g,G).replace(/\/\/[^\n]*/g,G)}function F(j,G=!1){let H=C(j);return(G?E(H):_(H)).replace(/<script\b([^>]*)>([\s\S]*?)<\/script\s*>/gi,(X,M)=>/\bclient\b/i.test(M)?X:X.replace(/[^\n]/g," "))}function S(j,G,H,Q){let X=F(j),M=F(j,!0);for(let z of v){if(!H.includes(z.rule))continue;if(z.requires&&!z.requires(j))continue;z.pattern.lastIndex=0;let Y,Z=/['"]/.test(z.pattern.source)?M:X;z.pattern.lastIndex=0;while((Y=z.pattern.exec(Z))!==null){if(z.reject?.(j,Y.index))continue;Q.push({file:G,line:N(j,Y.index),rule:z.rule,applied:!1,snippet:P(j,Y.index),reason:`${z.primitive} \u2014 ${z.why}`})}}}function k(j,G={}){let H=G.rules??U,Q=G.file??"<source>",X=[];S(j,Q,H,X);let M=j;if(H.includes("confirm"))M=O(M,Q,X);if(H.includes("tooltip"))M=w(M,Q,X);X.sort((Z,$)=>Z.line-$.line);let z=new Set,Y=X.filter((Z)=>{let $=`${Z.rule}:${Z.line}`;if(z.has($))return!1;return z.add($),!0});return{code:M,findings:Y}}var I=new Set(["confirm","tooltip"]);function A(j,G){if(j.length===0)return"No hand-rolled equivalents found.";let H=j.filter((z)=>z.applied),Q=j.filter((z)=>!z.applied&&I.has(z.rule)),X=j.filter((z)=>!z.applied&&!I.has(z.rule)),M=[];if(H.length>0){M.push(G?`Rewrote ${H.length} site(s):`:`Would rewrite ${H.length} site(s) (pass --fix):`);for(let z of H)M.push(` ${z.file}:${z.line} [${z.rule}] ${z.snippet}`)}if(Q.length>0){M.push("",`Needs a human \u2014 ${Q.length} site(s):`);for(let z of Q)M.push(` ${z.file}:${z.line} [${z.rule}] ${z.snippet}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$r as a,as as b,bs as c,cs as d,ds as e,es as f}from"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{f as validateConfig,b as resolveStxDirectories,c as loadStxConfig,e as defineStxConfig,a as defaultConfig,d as config};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Jh as a,Kh as b,Lh as c,Mh as d,Nh as e,Oh as f,Ph as g,Qh as h,Rh as i}from"./chunk-
|
|
2
|
+
import{Jh as a,Kh as b,Lh as c,Mh as d,Nh as e,Oh as f,Ph as g,Qh as h,Rh as i}from"./chunk-78bpc81t.js";import"./chunk-j93x5fzs.js";import"./chunk-qs0fp63n.js";export{c as setCachedImageResult,e as processImage,f as optimizeImage,b as getCachedImageResult,i as generateSrcset,h as generateResponsiveVariants,d as clearImageCache,g as applyTransformations,a as ImageProcessorCache};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{dh as L,eh as w,fh as x,gh as p,hh as F,ih as T,lh as I,mh as f,nh as l,oh as n,ph as i,qh as P,rh as o,sh as a}from"./chunk-
|
|
2
|
+
import{dh as L,eh as w,fh as x,gh as p,hh as F,ih as T,lh as I,mh as f,nh as l,oh as n,ph as i,qh as P,rh as o,sh as a}from"./chunk-9228drk4.js";import{Bs as ZG}from"./chunk-19m7hed6.js";function HG(X,Z={}){let{src:G,alt:J,width:q,height:$,sizes:K="100vw",loading:Q="lazy",priority:Y=!1,quality:M=x,placeholder:N="none",formats:j=w,widths:C=L,decoding:B="async",fetchpriority:V,objectFit:O,objectPosition:W}=X,H=X.class,z=X.style,{processedImage:R,variants:_,optimize:E=!0,isDev:S=!1}=Z;if(_&&_.length>0)return OG(X,_,R);if(S||!E)return MG(X);return VG(X)}function OG(X,Z,G){let{src:J,alt:q,width:$,height:K,sizes:Q="100vw",loading:Y="lazy",priority:M=!1,decoding:N="async",fetchpriority:j,objectFit:C,objectPosition:B,placeholder:V="none"}=X,O=X.class,W=X.style,H=n(Z),z=l(Z),R=typeof Q==="object"?f(Q):Q,_=G?G.aspectRatio:$&&K?Number($)/Number(K):void 0,E=[];if(_)E.push(`aspect-ratio: ${_}`);if(C)E.push(`object-fit: ${C}`);if(B)E.push(`object-position: ${B}`);if(W)E.push(W);let S=E.length>0?` style="${E.join("; ")}"`:"",b=O?` class="${O}"`:"",u=M?"":` loading="${Y}"`,d=` decoding="${N}"`,h=j?` fetchpriority="${j}"`:M?' fetchpriority="high"':"",r=["avif","webp","jpeg","png"],s=[];for(let U of r){let D=H.get(U);if(D&&D.length>0){let m=I(D),QG=P(U);s.push(` <source type="${QG}" srcset="${m}" sizes="${R}" />`)}}let e="",t="",g;if(V!=="none"&&G?.placeholder){let U=`img-${Math.random().toString(36).slice(2,8)}`;if(e=`<div class="stx-image-wrapper" id="${U}">`,t="</div>",V==="blur")g=`
|
|
3
3
|
#${U} {
|
|
4
4
|
position: relative;
|
|
5
5
|
background-image: url('${G.placeholder}');
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$k as c,Zk as a,_k as b,al as d,bl as e,cl as f,dl as g,el as h,fl as i}from"./chunk-phj11c6x.js";import"./chunk-r84h7wxw.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{a as shouldLogBundlerDiagnostics,e as setBundlerFallbackMode,f as resolveBundlerFallback,b as recordBundleFailure,h as queueClientBundleBuild,g as hasUserImports,c as getBundleFailures,d as clearBundleFailures,i as bundleClientScript};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{dj as a,ej as b,fj as c,gj as d,hj as e,ij as f,jj as g,kj as h,lj as i,mj as j,nj as k,oj as l,pj as m,qj as n}from"./chunk-
|
|
2
|
+
import{dj as a,ej as b,fj as c,gj as d,hj as e,ij as f,jj as g,kj as h,lj as i,mj as j,nj as k,oj as l,pj as m,qj as n}from"./chunk-etx5vb1n.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{lm as a,mm as b,nm as c,om as d,pm as e,qm as f,rm as g,sm as h,tm as i,um as j,vm as k,wm as l,xm as m,ym as n,zm as o}from"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{h as usesSignalsInScript,o as unescapeHtml,c as registerFilters,b as registerFilter,l as processExpressions,k as interpolateScriptsInTemplate,i as interpolateScriptExpressions,j as interpolateScriptAttributes,d as getAllFilters,n as evaluateExpression,g as escapeHtmlValue,f as escapeHtml,a as defaultFilters,e as clearCustomFilters,m as applyFilters};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Nj as a,Oj as b,Pj as c,Qj as d,Rj as e,Sj as f,Tj as g,Uj as h,Vj as i,Wj as j,Xj as k}from"./chunk-m0xp6xjr.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{a as templateCache,b as readFileCached,d as invalidateFileCacheByDir,c as invalidateFileCache,k as hashFilePath,f as getCachedSignalsRuntime,g as getCachedRouterScript,h as clearDevCaches,i as checkCache,j as cacheTemplate,e as __setSignalsGeneratorsForTest};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{At as p,lt as a,mt as b,nt as c,ot as d,pt as e,qt as f,rt as g,st as h,tt as i,ut as j,vt as k,wt as l,xt as m,yt as n,zt as o}from"./chunk-a8fx6wcb.js";import"./chunk-qs0fp63n.js";export{i as useTitle,f as useSeoMeta,i as usePageTitle,d as useHead,g as seoMetaToHeadConfig,c as resetHead,k as renderHtmlAttrs,j as renderHead,l as renderBodyAttrs,o as processTitleDirective,p as processMetaDirective,n as processHeadDirective,e as mergeHeadConfigs,b as getPageMeta,a as getHead,h as definePageMeta,m as applyHead};
|