@stacksjs/stx 0.2.908 → 0.2.910
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-tpryfx8t.js → chunk-13kfjnyn.js} +4 -4
- package/dist/chunk-1a911c4c.js +2 -0
- package/dist/{chunk-6mw288vd.js → chunk-24hrd8sg.js} +1 -1
- package/dist/{chunk-6756txp1.js → chunk-29trx6h3.js} +1 -1
- package/dist/{chunk-kt3f4rpy.js → chunk-2cbrcb9m.js} +1 -1
- package/dist/{chunk-jg5xc2m1.js → chunk-2r84qtat.js} +2 -2
- package/dist/{chunk-amye7vb0.js → chunk-3760wpvw.js} +1 -1
- package/dist/chunk-3rzpkjmn.js +2 -0
- package/dist/{chunk-kydh790y.js → chunk-44qcbbc4.js} +1 -1
- package/dist/{chunk-1pdntpwe.js → chunk-4ccbj4z6.js} +1 -1
- package/dist/{chunk-d8mnaesb.js → chunk-4kh0616n.js} +4 -4
- package/dist/{chunk-4hrryats.js → chunk-4zw9trtx.js} +1 -1
- package/dist/{chunk-q4nk8sq2.js → chunk-5k55yk8g.js} +1 -1
- package/dist/{chunk-y9xq82ep.js → chunk-688hf1mx.js} +1 -1
- package/dist/chunk-6w9sgs52.js +2 -0
- package/dist/{chunk-zkp5awqw.js → chunk-7apr0ww2.js} +1 -1
- package/dist/chunk-7w9ksdbp.js +2 -0
- package/dist/{chunk-f2yqqpvr.js → chunk-850b0cxa.js} +1 -1
- package/dist/{chunk-3qneemwh.js → chunk-87aqcw1w.js} +1 -1
- package/dist/{chunk-ddn98yz4.js → chunk-8d6wkfdx.js} +1 -1
- package/dist/{chunk-4ajsp5dp.js → chunk-94k80qpp.js} +1 -1
- package/dist/{chunk-trnw1tg5.js → chunk-9grwqzpe.js} +1 -1
- package/dist/{chunk-xqe3c7pa.js → chunk-9nf58keq.js} +1 -1
- package/dist/chunk-9yvhj108.js +2 -0
- package/dist/{chunk-sxqha69q.js → chunk-a259mfax.js} +2 -2
- package/dist/{chunk-vkxrsy13.js → chunk-ah615efp.js} +1 -1
- package/dist/{chunk-c0kgwh4k.js → chunk-anj2j86n.js} +2 -2
- package/dist/{chunk-xwarwkaw.js → chunk-azyq6fds.js} +1 -1
- package/dist/{chunk-f74qzgp8.js → chunk-ba27s9vr.js} +1 -1
- package/dist/{chunk-1x0wcskp.js → chunk-c829tgwv.js} +1 -1
- package/dist/{chunk-14497kj1.js → chunk-caaexbqy.js} +1 -1
- package/dist/{chunk-vqys4n8f.js → chunk-ccq7d7ar.js} +1 -1
- package/dist/{chunk-mrx20xza.js → chunk-cd2jc724.js} +1 -1
- package/dist/chunk-cf4apy9s.js +3 -0
- package/dist/{chunk-f3msm5tk.js → chunk-cqcxj08t.js} +1 -1
- package/dist/{chunk-qpf782pt.js → chunk-cw7vnkc8.js} +1 -1
- package/dist/{chunk-a0esj80g.js → chunk-d5szrgdq.js} +1 -1
- package/dist/{chunk-skxkqh9a.js → chunk-dh4p07cc.js} +1 -1
- package/dist/{chunk-s91tcznf.js → chunk-dqt1kw68.js} +1 -1
- package/dist/{chunk-p2b90rz9.js → chunk-e4fseqnv.js} +1 -1
- package/dist/{chunk-69wpv1pr.js → chunk-g17g6w1t.js} +2 -2
- package/dist/{chunk-0ek3s3b6.js → chunk-ggez55jb.js} +107 -107
- package/dist/{chunk-av45fw8a.js → chunk-gt3426kc.js} +1 -1
- package/dist/{chunk-v25gm9d9.js → chunk-gwvkqf5r.js} +4 -4
- package/dist/{chunk-xn8eabng.js → chunk-jcp3rs1t.js} +1 -1
- package/dist/{chunk-7xpez9tc.js → chunk-kvcz1926.js} +1 -1
- package/dist/{chunk-45326z5v.js → chunk-kvrbdez2.js} +1 -1
- package/dist/{chunk-cjntf1jg.js → chunk-magfdzdj.js} +1 -1
- package/dist/{chunk-5baag5dz.js → chunk-pgqc8895.js} +4 -4
- package/dist/{chunk-59bbk5gx.js → chunk-ph8k7jdx.js} +2 -2
- package/dist/{chunk-4jmztn9d.js → chunk-pmmctgdd.js} +1 -1
- package/dist/{chunk-yvp5tfrz.js → chunk-pn3gj7zm.js} +1 -1
- package/dist/{chunk-pb2mztar.js → chunk-q33tyfpp.js} +1 -1
- package/dist/{chunk-hg4vfrxr.js → chunk-q6jecdtg.js} +1 -1
- package/dist/{chunk-cfbmjgd0.js → chunk-r2ns89f7.js} +1 -1
- package/dist/{chunk-zk6qmkhb.js → chunk-r425m35g.js} +1 -1
- package/dist/chunk-ssdjny2r.js +2 -0
- package/dist/chunk-sx1jg8dw.js +2 -0
- package/dist/{chunk-rdeje2dd.js → chunk-vd03gnnb.js} +5 -5
- package/dist/chunk-vf29gp9a.js +2 -0
- package/dist/{chunk-yjhktn0b.js → chunk-x40j9ta1.js} +2 -2
- package/dist/{chunk-am610nan.js → chunk-xjbj655y.js} +3 -3
- package/dist/{chunk-9343arqn.js → chunk-ya8nwtdn.js} +1 -1
- package/dist/{chunk-3npzxjr4.js → chunk-zbzfkh3m.js} +1 -1
- package/dist/cli.js +7 -7
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +2 -2
- package/dist/stx-virtual-ts.js +5 -9
- package/package.json +5 -5
- package/dist/chunk-7hgqyea0.js +0 -2
- package/dist/chunk-7m5rpqjy.js +0 -2
- package/dist/chunk-b25twdd7.js +0 -2
- package/dist/chunk-b7fmkwz2.js +0 -2
- package/dist/chunk-cssvev8r.js +0 -2
- package/dist/chunk-g67xjfe6.js +0 -3
- package/dist/chunk-naj7m2av.js +0 -2
- package/dist/chunk-qn9rrwp8.js +0 -2
- package/dist/chunk-z8e2m6kz.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{gy,my,gg,Ps}from"./chunk-
|
|
2
|
+
import{gy,my,gg,Ps}from"./chunk-ba27s9vr.js";import"./chunk-cf4apy9s.js";import"./chunk-9bexzgws.js";import"./chunk-v0yay1kw.js";import{Fr}from"./chunk-ggez55jb.js";import"./chunk-4zw9trtx.js";import"./chunk-w98yt4d4.js";import{Ee}from"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Ee as freeIdentifiers,Ps as processComponents,gg as processESImports,Fr as rendersAsElement,gy as resetMarginStackWarnings,my as resetTemplateLoopWarnings};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{vu,Jm,xu,Su,Ym,Zm}from"./chunk-
|
|
2
|
+
import{vu,Jm,xu,Su,Ym,Zm}from"./chunk-dh4p07cc.js";import"./chunk-ggez55jb.js";import"./chunk-4zw9trtx.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Zm as applySlots,Ym as extractSlotContent,Jm as parseSlotElement,vu as parseSlots,Su as processSlots,xu as renderSlot};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{Z}from"./chunk-13awnyq0.js";import R from"path";var B=/__stxModules\["((?:[^"\\]|\\.)*)"\]/g;function ns(...d){let g=new Set;for(let l of d){if(!l||!l.includes("__stxModules["))continue;for(let e of l.matchAll(B))try{g.add(JSON.parse(`"${e[1]}"`))}catch{}}return[...g].sort()}function $o(...d){let g=new Map,l=(e,n)=>{let o=g.get(e);if(o===null)return;if(n===null){g.set(e,null);return}let s=o??new Set;for(let i of n)s.add(i);g.set(e,s)};for(let e of d){if(!e||!e.includes("__stxModules["))continue;let n=[];for(let s of e.matchAll(/([\w$]+)\s*=\s*globalThis\.__stxModules\s*&&\s*globalThis\.__stxModules\["((?:[^"\\]|\\.)*)"\]/g)){let i;try{i=JSON.parse(`"${s[2]}"`)}catch{continue}n.push({variable:s[1],id:i,start:s.index+s[0].length,end:e.length})}let o=e.match(/__stxModules\["(?:[^"\\]|\\.)*"\]/g)?.length??0;if(n.length===0||o!==n.length){for(let s of ns(e))l(s,null);continue}for(let[s,i]of n.entries()){let p=n.slice(s+1).find((h)=>h.variable===i.variable);i.end=p?p.start:e.length}for(let s of n){let i=new Set,p=!1,h=s.variable.replace(/[$]/g,"\\$&"),r=e.slice(s.start,s.end);for(let a of r.matchAll(new RegExp(`(?<![\\w$.])${h}(?![\\w$])`,"g"))){let f=r.slice(a.index+s.variable.length,a.index+s.variable.length+200),c=/^\s*\[\s*(["'])([A-Za-z_$][\w$]*)\1\s*\]/.exec(f)??/^\s*\.\s*([A-Za-z_$][\w$]*)/.exec(f);if(c){i.add(c[c.length-1]);continue}if(/^\s*[!=]==?\s*(?:undefined|void 0)\b/.test(f))continue;p=!0;break}l(s.id,p?null:i)}}return g}function k(d,g,l){let e=[],n=[];return d.forEach((o,s)=>{let i=o.startsWith("npm:")?o.slice(4):R.resolve(g,o),p=`__stxRegistered${s}`,h=JSON.stringify(o),r=l?.get(o);if(r&&[...r].every((a)=>/^[A-Za-z_$][\w$]*$/.test(a))){let a=[...r].sort(),f=a.map((m,_)=>`${m} as ${p}_${_}`);e.push(a.length>0?`import { ${f.join(", ")} } from ${JSON.stringify(i)};`:`import ${JSON.stringify(i)};`);let c=a.map((m,_)=>`get ${JSON.stringify(m)}() { return ${p}_${_}; }`).join(", ");n.push(`if (!globalThis.__stxModules[${h}]) globalThis.__stxModules[${h}] = { ${c} };`);return}e.push(`import * as ${p} from ${JSON.stringify(i)};`),n.push(`if (!globalThis.__stxModules[${h}]) globalThis.__stxModules[${h}] = ${p};`)}),[...e,"globalThis.__stxModules = globalThis.__stxModules || {};",...n].join(`
|
|
3
|
-
`)}async function vm(d,g={}){if(d.length===0)return null;let l=process.cwd(),e=k(d,l,g.names),n;try{let{bundleClientScript:f}=await import("./chunk-
|
|
3
|
+
`)}async function vm(d,g={}){if(d.length===0)return null;let l=process.cwd(),e=k(d,l,g.names),n;try{let{bundleClientScript:f}=await import("./chunk-q33tyfpp.js"),c=()=>f(e,R.join(l,".stx-module-registry.ts"),{projectRoot:l,minify:g.minify,externalizeUserModules:!1,collectInputs:g.collectInputs,throwOnFailure:!0});try{n=await c()}catch(m){if(!g.names)throw m;e=k(d,l,void 0),n=await c()}}catch(f){let{formatBuildFailure:c}=await import("./chunk-nrap20qt.js"),m=c(f);console.warn(`[stx] could not build the page module registry (#1957): ${m}`);let _=`[stx] the page module registry did not build, so ${d.join(", ")} cannot load (#1957): ${m}`;return`;console.error(${JSON.stringify(_)});`}let{transformAutoImports:o,generateAutoImportDestructuring:s}=await import("./chunk-cw7vnkc8.js"),i=o(n),p=s(i.stxImports,i.browserImports),{transformStoreImports:h}=await import("./chunk-q9yahsww.js");n=h(i.code);let r=JSON.stringify(new Bun.CryptoHasher("md5").update(e).digest("hex").slice(0,12)),a=Z(n);return[a?";await (async function() {":";(function() {"," var __stxBundles = globalThis.__stxModuleBundles || (globalThis.__stxModuleBundles = {});",` if (__stxBundles[${r}]) { ${a?"await __stxBundles["+r+"];":""} return; }`,a?`var __resolveBundle, __rejectBundle;
|
|
4
4
|
__stxBundles[${r}]=new Promise(function(resolve,reject){__resolveBundle=resolve;__rejectBundle=reject;});
|
|
5
5
|
__stxBundles[${r}].catch(function(){});
|
|
6
6
|
try {`:`__stxBundles[${r}] = true;`,p,n,a?`__resolveBundle();
|
|
7
7
|
} catch(error) { delete __stxBundles[${r}]; __rejectBundle(error); throw error; }`:"","})();"].join(`
|
|
8
8
|
`)}var j=/^import(?:[ \t]*(\{[^}]*\})[ \t]*from|[ \t]*\*[ \t]*as[ \t]+([\w$]+)[ \t]+from)?[ \t]*["']\.\/(chunk-[\w-]+)\.js["'][ \t]*;?[ \t]*$/gm,O=/^export\s*\{([^}]*)\}\s*;?[ \t]*$/gm,I=new Set(["__preload","__chunks"]),N=/^("[^"]*"|[\w$]+)(?:\s+as\s+("[^"]*"|[\w$]+))?$/;function P(d){let g=[],l=[],e=!0,o=d.replace(/^var __chunkGraphs;[\s\S]*?^var __chunks = [\s\S]*?^\};[ \t]*\n?/m,"").replace(/^__chunks\(import\.meta\.url,[^\n]*\);[ \t]*\n?/gm,"").replace(j,(h,r,a,f)=>{let c=`__stxChunkExports${g.length}`;if(g.push(f),l.push(`var ${c} = __stxChunk(${JSON.stringify(f)});`),a)l.push(`var ${a} = ${c};`);else if(r)for(let m of r.slice(1,-1).split(",")){let _=m.trim();if(!_)continue;let w=N.exec(_);if(!w){e=!1;continue}if(I.has(w[1]))continue;let M=w[1].startsWith('"')?JSON.parse(w[1]):w[1],t=w[2]??w[1];if(t.startsWith('"')){e=!1;continue}l.push(`var ${t} = ${c}[${JSON.stringify(M)}];`)}return""});if(!e)throw Error("an import it does not read");let s=[];o=o.replace(/\(\s*__preload\([^)]*\)\s*,\s*import\(\s*["']\.\/(chunk-[\w-]+)\.js["']\s*\)\s*\)|\bimport\(\s*["']\.\/(chunk-[\w-]+)\.js["']\s*\)/g,(h,r,a)=>{let f=r??a;return s.push(f),`Promise.resolve().then(function () { return __stxChunk(${JSON.stringify(f)}); })`});let i=[];o=o.replace(O,(h,r)=>{for(let a of r.split(",")){let f=a.trim();if(!f)continue;let c=N.exec(f);if(!c||c[1].startsWith('"')){e=!1;continue}if(I.has(c[1]))continue;let m=c[2]??c[1];i.push([c[1],m.startsWith('"')?JSON.parse(m):m])}return""});let p=[/\bimport\.meta\b/,/\b__chunks\b/,/\b__preload\b/,/^\s*export\s+(?:default\b|const\b|let\b|var\b|function\b|class\b|async\b|\*|\{)/m,/\bfrom\s*["']\.\/chunk-/,/^\s*import\s*["']\.\/chunk-/m].find((h)=>h.test(o));if(!e||p)throw Error(`${p?`${p.source} is left in it`:"an export it does not read"}`);return{reads:l.join(`
|
|
9
9
|
`),chunks:g,lazy:s,body:o,exports:i}}function su(d){if(/\bexport\s+(?:let|var)\b/.test(d))return!0;if(d.length/Math.max(1,d.split(`
|
|
10
|
-
`).length)>200)return!1;for(let g of d.matchAll(/\bexport\s*\{([^}]*)\}(?!\s*from\b)/g))for(let l of g[1].split(",")){let e=l.trim().split(/\s+as\s+/)[0].trim();if(!/^[A-Za-z_$][\w$]*$/.test(e))continue;let n=e.replace(/[$]/g,"\\$&");if(!new RegExp(`(?<![\\w$.])(?:let|var)\\s+${n}(?![\\w$])`,"g").test(d))continue;let s=new RegExp(`(?<![\\w$.])${n}\\s*(?:=(?![=>])|[-+*/%&|^]=|\\*\\*=|<<=|>>>?=|&&=|\\|\\|=|\\?\\?=|\\+\\+|--)|(?:\\+\\+|--)\\s*${n}(?![\\w$])`,"g"),i=new RegExp(`(?<![\\w$.])(?:let|var|const)\\s+${n}\\s*=`,"g");if((d.match(s)?.length??0)>(d.match(i)?.length??0))return!0}return!1}async function Ro(d,g={}){let l=d.filter((n)=>n.ids.length>0);if(l.length===0)return{chunks:new Map,routes:new Map,reads:new Map};let e=process.cwd();try{let{bundleClientEntriesSplit:n}=await import("./chunk-
|
|
10
|
+
`).length)>200)return!1;for(let g of d.matchAll(/\bexport\s*\{([^}]*)\}(?!\s*from\b)/g))for(let l of g[1].split(",")){let e=l.trim().split(/\s+as\s+/)[0].trim();if(!/^[A-Za-z_$][\w$]*$/.test(e))continue;let n=e.replace(/[$]/g,"\\$&");if(!new RegExp(`(?<![\\w$.])(?:let|var)\\s+${n}(?![\\w$])`,"g").test(d))continue;let s=new RegExp(`(?<![\\w$.])${n}\\s*(?:=(?![=>])|[-+*/%&|^]=|\\*\\*=|<<=|>>>?=|&&=|\\|\\|=|\\?\\?=|\\+\\+|--)|(?:\\+\\+|--)\\s*${n}(?![\\w$])`,"g"),i=new RegExp(`(?<![\\w$.])(?:let|var|const)\\s+${n}\\s*=`,"g");if((d.match(s)?.length??0)>(d.match(i)?.length??0))return!0}return!1}async function Ro(d,g={}){let l=d.filter((n)=>n.ids.length>0);if(l.length===0)return{chunks:new Map,routes:new Map,reads:new Map};let e=process.cwd();try{let{bundleClientEntriesSplit:n}=await import("./chunk-q33tyfpp.js"),o=[],s=await n(new Map(l.map((t)=>[t.name,k(t.ids,e,t.names)])),{projectRoot:e,filePath:R.join(e,".stx-module-registry.ts"),collectInputs:o});g.collectInputs?.push(...o);let{transformAutoImports:i,generateAutoImportDestructuring:p}=await import("./chunk-cw7vnkc8.js"),{transformStoreImports:h}=await import("./chunk-q9yahsww.js"),r=new Map;for(let[t,u]of[...s.chunks,...s.entries])try{r.set(t,P(u))}catch(x){throw Error(`cannot read ${t}: ${x instanceof Error?x.message:String(x)}`)}for(let[t,u]of[...s.chunks,...s.entries])if(/\b__esm\(/.test(u))throw Error(`${t} initialises a module lazily`);for(let t of o)if(/\.(?:[cm]?[jt]sx?)$/.test(t)&&su(await Bun.file(t).text()))throw Error(`${t} exports a binding that changes after it is read`);let a=new Set,f=new Set,c=(t)=>{if(f.has(t))return;if(a.has(t))throw Error(`the chunks import each other (${t})`);a.add(t);for(let u of r.get(t)?.chunks??[]){if(!r.has(u))throw Error(`${t} imports ${u}, which was not built`);c(u)}for(let u of r.get(t)?.lazy??[])if(!r.has(u))throw Error(`${t} imports ${u}, which was not built`);a.delete(t),f.add(t)};for(let t of r.keys())c(t);let m=(t)=>{let u=i(t.body);return{prelude:p(u.stxImports,u.browserImports),body:h(u.code)}},_=new Map;for(let t of s.chunks.keys()){let u=r.get(t),{prelude:x,body:v}=m(u),b=u.exports.map(([S,y])=>`get ${JSON.stringify(y)}() { return ${S}; }`).join(", ");_.set(t,`function (__stxChunk) {
|
|
11
11
|
${x}
|
|
12
12
|
${u.reads}
|
|
13
13
|
${v}
|