@stacksjs/stx 0.2.897 → 0.2.899
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-qe0t0m38.js → chunk-0b57fgpn.js} +4 -4
- package/dist/chunk-0f2d61b3.js +2 -0
- package/dist/{chunk-pjj54ddk.js → chunk-0gc1hez6.js} +3 -3
- package/dist/chunk-0ht6exrv.js +2 -0
- package/dist/{chunk-t3zmfh8w.js → chunk-150cz8qq.js} +7 -7
- package/dist/chunk-1pbghytr.js +2 -0
- package/dist/chunk-1tb18a92.js +2 -0
- package/dist/{chunk-dvjv4c3a.js → chunk-2sz1kh9m.js} +1 -1
- package/dist/chunk-2vqamyay.js +2 -0
- package/dist/chunk-36mz0nwv.js +2 -0
- package/dist/{chunk-3fnb12nh.js → chunk-3k4rteax.js} +13 -13
- package/dist/chunk-3m37fzvh.js +2 -0
- package/dist/chunk-3my2eef2.js +2 -0
- package/dist/{chunk-5qv5v8kc.js → chunk-40fpt0r6.js} +10 -10
- package/dist/{chunk-khm56bfm.js → chunk-46khhke2.js} +1 -1
- package/dist/{chunk-6g5z6r27.js → chunk-472w7t7p.js} +2 -2
- package/dist/{chunk-mjj36awr.js → chunk-4e28p8vf.js} +6 -6
- package/dist/{chunk-bgfs3mbg.js → chunk-4hk1mjtv.js} +5 -5
- package/dist/chunk-4jtewn1v.js +2 -0
- package/dist/chunk-4s6w89m2.js +2 -0
- package/dist/{chunk-dtpxzcrw.js → chunk-4wd5sn16.js} +7 -7
- package/dist/{chunk-1bft48gk.js → chunk-50wjk5ap.js} +2 -2
- package/dist/{chunk-ch9028z3.js → chunk-54x7h3sb.js} +1 -1
- package/dist/chunk-5astk182.js +2 -0
- package/dist/{chunk-3b3mkgpj.js → chunk-5g5khx0m.js} +2 -2
- package/dist/{chunk-zf68afyh.js → chunk-5gnt3qtn.js} +3 -3
- package/dist/{chunk-80ky40mm.js → chunk-5jrpzepc.js} +2 -2
- package/dist/{chunk-q0y8gv18.js → chunk-5mrt1enm.js} +2 -2
- package/dist/{chunk-wg6fmren.js → chunk-5tm1pvt3.js} +2 -2
- package/dist/chunk-5tvse0vw.js +2 -0
- package/dist/{chunk-ytjn0gq2.js → chunk-5yvgzh6n.js} +2 -2
- package/dist/{chunk-n6q1d66k.js → chunk-65g78sge.js} +1 -1
- package/dist/chunk-65rx54n6.js +2 -0
- package/dist/{chunk-x5bn2svk.js → chunk-67pq803s.js} +2 -2
- package/dist/{chunk-neg6ckjg.js → chunk-68r2zs20.js} +4 -4
- package/dist/{chunk-h0stypkf.js → chunk-6hjcqaqr.js} +2 -2
- package/dist/chunk-70ez3njv.js +2 -0
- package/dist/chunk-726w7fm2.js +2 -0
- package/dist/{chunk-xy8smv5e.js → chunk-73ebyhqq.js} +2 -2
- package/dist/chunk-73nazfe5.js +2 -0
- package/dist/{chunk-vk2jy6mn.js → chunk-7b3dqeyr.js} +2 -2
- package/dist/{chunk-whcrca58.js → chunk-7nn5s0c3.js} +30 -30
- package/dist/{chunk-062qfv99.js → chunk-7pfhr4nk.js} +2 -2
- package/dist/chunk-7r294vc9.js +2 -0
- package/dist/chunk-7rn7w53f.js +2 -0
- package/dist/{chunk-qnz406aa.js → chunk-7z1hqp86.js} +4 -4
- package/dist/chunk-81qvg3yd.js +2 -0
- package/dist/{chunk-e16ef18k.js → chunk-83hs9905.js} +2 -2
- package/dist/chunk-8a9gmbxa.js +2 -0
- package/dist/chunk-8jvwapq3.js +2 -0
- package/dist/{chunk-jdpzwv1t.js → chunk-8rgy17fj.js} +8 -8
- package/dist/{chunk-2g7cs1n8.js → chunk-8v2hsn4d.js} +3 -3
- package/dist/{chunk-y1d3j2j7.js → chunk-8xb09hnn.js} +4 -4
- package/dist/{chunk-xmg6bmh6.js → chunk-945zygwa.js} +13 -13
- package/dist/{chunk-pvm48tse.js → chunk-9ejk9mwk.js} +2 -2
- package/dist/{chunk-bw2m1e7g.js → chunk-9hwg13ec.js} +5 -5
- package/dist/{chunk-b8zrn7k4.js → chunk-9jpsxqaf.js} +1 -1
- package/dist/{chunk-d6ghx785.js → chunk-9m45t60c.js} +80 -80
- package/dist/{chunk-hj98d829.js → chunk-9n5san33.js} +14 -14
- package/dist/chunk-9vafweyd.js +3 -0
- package/dist/{chunk-zwqkbk2m.js → chunk-9w7whtbx.js} +2 -2
- package/dist/{chunk-1ph2yhfn.js → chunk-arfpzf17.js} +2 -2
- package/dist/chunk-avqxkbrd.js +2 -0
- package/dist/{chunk-htx5yezj.js → chunk-ayady5ws.js} +2 -2
- package/dist/{chunk-3xkrnf5m.js → chunk-b6ctdvdf.js} +6 -6
- package/dist/{chunk-tkjjyh6k.js → chunk-becs8132.js} +5 -5
- package/dist/chunk-bmwcgmev.js +2 -0
- package/dist/{chunk-67j2m620.js → chunk-bzd387yx.js} +4 -4
- package/dist/{chunk-mhrnjaka.js → chunk-c0x9wyj7.js} +4 -4
- package/dist/chunk-cgqpn3e2.js +2 -0
- package/dist/chunk-cp82351f.js +2 -0
- package/dist/chunk-cvxg2rc1.js +2 -0
- package/dist/{chunk-jxydtkdw.js → chunk-d1bwb2kz.js} +3 -3
- package/dist/{chunk-05x1rd86.js → chunk-de61k0ab.js} +2 -2
- package/dist/chunk-dj8fyaea.js +2 -0
- package/dist/chunk-dmc91qke.js +2 -0
- package/dist/{chunk-gdyjd163.js → chunk-e0bwzxfd.js} +6 -6
- package/dist/{chunk-2hpkr84c.js → chunk-e4xd1ca7.js} +1 -1
- package/dist/{chunk-j1npj5xc.js → chunk-e5q1ammf.js} +3 -3
- package/dist/{chunk-xvncq3m5.js → chunk-eb5cma4b.js} +2 -2
- package/dist/{chunk-3bsz7zj3.js → chunk-eb5v9npc.js} +2 -2
- package/dist/{chunk-aj5tsksz.js → chunk-edpsk4bg.js} +5 -5
- package/dist/{chunk-xqb0rzk1.js → chunk-eka2e4cm.js} +4 -4
- package/dist/{chunk-pnmafbv5.js → chunk-ern5hyvr.js} +1 -1
- package/dist/{chunk-41z7f41b.js → chunk-esm0pnpz.js} +2 -2
- package/dist/chunk-fe1wmmr5.js +2 -0
- package/dist/{chunk-r5ecgcx2.js → chunk-ffytbb4x.js} +5 -5
- package/dist/{chunk-vf4ejngv.js → chunk-fksmr50h.js} +6 -6
- package/dist/{chunk-dt80hbq8.js → chunk-fsxk5fsh.js} +8 -8
- package/dist/{chunk-2bnsxgfe.js → chunk-ft9h5qbs.js} +4 -4
- package/dist/chunk-fznzn35q.js +2 -0
- package/dist/{chunk-6xaeq730.js → chunk-g065d7p7.js} +2 -2
- package/dist/{chunk-rf0smj4c.js → chunk-g32hc78c.js} +2 -2
- package/dist/{chunk-nq60tjkz.js → chunk-gnf1e5q7.js} +2 -2
- package/dist/{chunk-x89k2af8.js → chunk-gq3gttt5.js} +21 -21
- package/dist/chunk-h2gnz7ja.js +2 -0
- package/dist/chunk-hc8ks7y3.js +2 -0
- package/dist/{chunk-cphc60zw.js → chunk-hdfhaddy.js} +2 -2
- package/dist/{chunk-t0ttxayz.js → chunk-hnjeqxqy.js} +2 -2
- package/dist/chunk-hpqvq1r9.js +2 -0
- package/dist/chunk-hs2a040z.js +2 -0
- package/dist/{chunk-9d578fvc.js → chunk-javb4e3b.js} +5 -5
- package/dist/chunk-jq49238b.js +2 -0
- package/dist/chunk-jr3fmkq7.js +2 -0
- package/dist/chunk-k2fw6paw.js +2 -0
- package/dist/chunk-k352spys.js +2 -0
- package/dist/{chunk-1knk403z.js → chunk-k3566kgd.js} +2 -2
- package/dist/{chunk-cmg9x1ka.js → chunk-k3ytyhkr.js} +3 -3
- package/dist/chunk-k79dvx67.js +2 -0
- package/dist/chunk-km1k3c4e.js +2 -0
- package/dist/chunk-kvjbpbmw.js +2 -0
- package/dist/chunk-mhv84p0x.js +2 -0
- package/dist/{chunk-vx1s055y.js → chunk-mjqsz20a.js} +2 -2
- package/dist/chunk-mmtyp5z4.js +2 -0
- package/dist/{chunk-8hwfdwgn.js → chunk-mry67rsk.js} +6 -6
- package/dist/{chunk-ksmn19qw.js → chunk-n3fgrsva.js} +2 -2
- package/dist/{chunk-bzpxjvcq.js → chunk-n8xjqsze.js} +3 -3
- package/dist/{chunk-p3hbsrk9.js → chunk-nc5d3a5r.js} +5 -5
- package/dist/chunk-p4hm5srd.js +2 -0
- package/dist/{chunk-0jkj8thz.js → chunk-p89rpak1.js} +1 -1
- package/dist/{chunk-hxws025y.js → chunk-p92272k0.js} +2 -2
- package/dist/{chunk-at8dv8dn.js → chunk-pd31ge72.js} +6 -6
- package/dist/chunk-pjpy86c3.js +3 -0
- package/dist/chunk-psyqrxg0.js +2 -0
- package/dist/chunk-q4yq72wh.js +2 -0
- package/dist/{chunk-s557tht3.js → chunk-q6p96qq7.js} +7 -7
- package/dist/{chunk-115bb91s.js → chunk-qs0zk04y.js} +2 -2
- package/dist/{chunk-ta07gj66.js → chunk-qt2mr3f0.js} +31 -16
- package/dist/{chunk-a0aqs5a8.js → chunk-qykbjg3z.js} +2 -2
- package/dist/chunk-qzx6h6af.js +2 -0
- package/dist/{chunk-g5nfqzfh.js → chunk-r0az4z6d.js} +2 -2
- package/dist/{chunk-txegy370.js → chunk-r9n86na1.js} +41 -41
- package/dist/{chunk-bgggjcwt.js → chunk-rapr0m13.js} +3 -3
- package/dist/{chunk-gm48z1nk.js → chunk-rrpfn9rr.js} +1 -1
- package/dist/chunk-ryp47rwp.js +2 -0
- package/dist/{chunk-3qk8vf9m.js → chunk-t14bn66j.js} +3 -3
- package/dist/chunk-t9j000tb.js +2 -0
- package/dist/{chunk-yfqrwazc.js → chunk-tga3nrn6.js} +5 -5
- package/dist/chunk-tgwwa872.js +2 -0
- package/dist/chunk-v0r6zb87.js +2 -0
- package/dist/{chunk-18dv485d.js → chunk-v5v6w6rn.js} +2 -2
- package/dist/{chunk-9rjgq8k4.js → chunk-vbmvft7g.js} +1 -1
- package/dist/{chunk-kk2p2tgv.js → chunk-vfctk20v.js} +3 -3
- package/dist/{chunk-8jb5fsnf.js → chunk-vgvxs1ag.js} +2 -2
- package/dist/{chunk-rb2zbdqd.js → chunk-vw7crz0z.js} +4 -4
- package/dist/chunk-vxtna1b1.js +2 -0
- package/dist/chunk-x43x2c6v.js +2 -0
- package/dist/chunk-xqx8t9w5.js +2 -0
- package/dist/{chunk-sh7a0g09.js → chunk-xr1s56k5.js} +3 -3
- package/dist/chunk-y10eaxgc.js +2 -0
- package/dist/chunk-ytk4f2j9.js +2 -0
- package/dist/chunk-z33r3pzy.js +2 -0
- package/dist/chunk-zcys6b06.js +2 -0
- package/dist/chunk-zkr42285.js +2 -0
- package/dist/chunk-zpwh9bpc.js +2 -0
- package/dist/chunk-zrs22j09.js +2 -0
- package/dist/chunk-zw6tgr0s.js +2 -0
- package/dist/cli.js +19 -19
- package/dist/client/signals-scope-disposal-runtime.js +18 -3
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/dynamic-components.js +47 -25
- package/dist/offline/app-service-worker.js +2 -2
- package/dist/pwa.js +3 -3
- package/dist/ssg.js +4 -4
- package/package.json +5 -5
- package/dist/chunk-02qhay07.js +0 -2
- package/dist/chunk-04x7mp45.js +0 -2
- package/dist/chunk-0k437z3q.js +0 -2
- package/dist/chunk-1a7a8cjs.js +0 -2
- package/dist/chunk-1p4q6t48.js +0 -2
- package/dist/chunk-1z6pqvmf.js +0 -2
- package/dist/chunk-2nqmw4dv.js +0 -2
- package/dist/chunk-35j7gaj5.js +0 -2
- package/dist/chunk-4akw3bym.js +0 -2
- package/dist/chunk-4azhfxrm.js +0 -2
- package/dist/chunk-4d85str1.js +0 -2
- package/dist/chunk-4s2x5p6r.js +0 -2
- package/dist/chunk-53kcqdjj.js +0 -2
- package/dist/chunk-5eq2e6p3.js +0 -2
- package/dist/chunk-5y4q7k3j.js +0 -2
- package/dist/chunk-690518hw.js +0 -2
- package/dist/chunk-732gb689.js +0 -2
- package/dist/chunk-7wj6yx6f.js +0 -2
- package/dist/chunk-80xzjxah.js +0 -2
- package/dist/chunk-87tmvvvp.js +0 -2
- package/dist/chunk-9afkttvz.js +0 -2
- package/dist/chunk-a27xsdp6.js +0 -2
- package/dist/chunk-ah8az9vv.js +0 -2
- package/dist/chunk-arr79m90.js +0 -2
- package/dist/chunk-at843zxh.js +0 -2
- package/dist/chunk-awb046ct.js +0 -2
- package/dist/chunk-b5njp1ef.js +0 -2
- package/dist/chunk-cjxfc5j5.js +0 -2
- package/dist/chunk-cp5x6kx1.js +0 -2
- package/dist/chunk-d2whsv81.js +0 -2
- package/dist/chunk-dr6fqa3x.js +0 -2
- package/dist/chunk-e28czxw3.js +0 -2
- package/dist/chunk-e8szp5wa.js +0 -2
- package/dist/chunk-essd43ad.js +0 -2
- package/dist/chunk-f60k8j9m.js +0 -2
- package/dist/chunk-ffkhg23t.js +0 -2
- package/dist/chunk-fsk3rk2x.js +0 -2
- package/dist/chunk-gz7egees.js +0 -2
- package/dist/chunk-hk241gt2.js +0 -2
- package/dist/chunk-j9kejcrx.js +0 -2
- package/dist/chunk-jc3zrmpz.js +0 -2
- package/dist/chunk-jhbz5w30.js +0 -2
- package/dist/chunk-jk6yg125.js +0 -2
- package/dist/chunk-k4x680e3.js +0 -2
- package/dist/chunk-kfdmm240.js +0 -2
- package/dist/chunk-n5ypn9nh.js +0 -2
- package/dist/chunk-pyqacq37.js +0 -2
- package/dist/chunk-rc12m1j7.js +0 -2
- package/dist/chunk-ry7nh392.js +0 -2
- package/dist/chunk-sccjcyb9.js +0 -2
- package/dist/chunk-sezkn93y.js +0 -2
- package/dist/chunk-snkbn5y8.js +0 -2
- package/dist/chunk-sw0gme6q.js +0 -2
- package/dist/chunk-tbh7r1wh.js +0 -2
- package/dist/chunk-v3jyb8k6.js +0 -2
- package/dist/chunk-w6r18he3.js +0 -2
- package/dist/chunk-wg2n94gf.js +0 -3
- package/dist/chunk-wkk0gska.js +0 -2
- package/dist/chunk-x6565mhk.js +0 -2
- package/dist/chunk-xfjezd96.js +0 -2
- package/dist/chunk-xwgdcc7w.js +0 -2
- package/dist/chunk-z4tdnfxd.js +0 -2
- package/dist/chunk-zn5dcfhc.js +0 -2
- package/dist/chunk-zxjdfgdx.js +0 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { decodeStxProp } from "./component-processing.js";
|
|
1
2
|
import { renderComponentWithSlot, resolveTemplatePath } from "./utils.js";
|
|
2
3
|
import { safeEvaluate } from "./safe-evaluator.js";
|
|
3
4
|
function escapeHtmlComment(value) {
|
|
@@ -107,29 +108,62 @@ function displayExpression(expr) {
|
|
|
107
108
|
return mustache ? mustache[1] : expr;
|
|
108
109
|
}
|
|
109
110
|
function renderAsElement(name, attrs, slotContent) {
|
|
110
|
-
const cleanedAttrs = attrs.replace(/\s*(?::is|v-bind:is)\s*=\s*"[^"]*"/gi, "").
|
|
111
|
+
const cleanedAttrs = attrs.replace(/\s*(?::is|v-bind:is|__stx_is)\s*=\s*"[^"]*"/gi, "").replace(/\b__stx_([\w-]+)\s*=\s*"([^"]*)"/g, (_match, name, encoded) => {
|
|
112
|
+
const value = decodeStxProp(encoded);
|
|
113
|
+
if (value === null || value === void 0 || value === !1)
|
|
114
|
+
return "";
|
|
115
|
+
if (value === !0)
|
|
116
|
+
return name;
|
|
117
|
+
return `${name}="${String(value).replace(/&/g, "&").replace(/"/g, """)}"`;
|
|
118
|
+
}).trim(), open = cleanedAttrs ? `<${name} ${cleanedAttrs}>` : `<${name}>`;
|
|
111
119
|
if (VOID_TAGS.has(name))
|
|
112
120
|
return cleanedAttrs ? `<${name} ${cleanedAttrs}>` : `<${name}>`;
|
|
113
121
|
return `${open}${slotContent}</${name}>`;
|
|
114
122
|
}
|
|
123
|
+
function resolveTagName(expr, encoded, context) {
|
|
124
|
+
if (encoded !== void 0) {
|
|
125
|
+
const value = decodeStxProp(encoded);
|
|
126
|
+
return typeof value === "string" && value ? value : null;
|
|
127
|
+
}
|
|
128
|
+
return resolveIsName(expr ?? "", context);
|
|
129
|
+
}
|
|
130
|
+
function parseTagProps(attrs, context) {
|
|
131
|
+
const props = {}, propsPattern = /(?::([a-zA-Z_][a-zA-Z0-9_-]*)|([a-zA-Z_][a-zA-Z0-9_-]*))\s*=\s*"([^"]*)"/g;
|
|
132
|
+
let propMatch;
|
|
133
|
+
while ((propMatch = propsPattern.exec(attrs.trim())) !== null) {
|
|
134
|
+
const propName = propMatch[1] || propMatch[2], propValue = propMatch[3];
|
|
135
|
+
if (propMatch[1])
|
|
136
|
+
try {
|
|
137
|
+
props[propName] = safeEvaluate(propValue, context);
|
|
138
|
+
} catch {
|
|
139
|
+
props[propName] = propValue;
|
|
140
|
+
}
|
|
141
|
+
else if (propName.startsWith("__stx_"))
|
|
142
|
+
props[propName.slice(6)] = decodeStxProp(propValue);
|
|
143
|
+
else
|
|
144
|
+
props[propName] = propValue;
|
|
145
|
+
}
|
|
146
|
+
return props;
|
|
147
|
+
}
|
|
115
148
|
export async function processDynamicComponents(template, context, filePath, options, dependencies) {
|
|
116
149
|
let result = template;
|
|
117
|
-
const componentPattern = /<component\s+(?::is|v-bind:is)\s*=\s*"([^"]*)"([^>]*)>([\s\S]*?)<\/component>/gi, matches = [];
|
|
150
|
+
const componentPattern = /<component\s+(?:(?::is|v-bind:is)\s*=\s*"([^"]*)"|__stx_is\s*=\s*"([^"]*)")([^>]*)>([\s\S]*?)<\/component>/gi, matches = [];
|
|
118
151
|
let match;
|
|
119
152
|
while ((match = componentPattern.exec(result)) !== null)
|
|
120
153
|
matches.push({
|
|
121
154
|
full: match[0],
|
|
122
155
|
expr: match[1],
|
|
123
|
-
|
|
124
|
-
|
|
156
|
+
encoded: match[2],
|
|
157
|
+
attrs: match[3],
|
|
158
|
+
slotContent: match[4],
|
|
125
159
|
index: match.index
|
|
126
160
|
});
|
|
127
161
|
for (let i = matches.length - 1;i >= 0; i--) {
|
|
128
162
|
const m = matches[i];
|
|
129
163
|
try {
|
|
130
|
-
const componentName =
|
|
164
|
+
const componentName = resolveTagName(m.expr, m.encoded, context);
|
|
131
165
|
if (!componentName || typeof componentName !== "string") {
|
|
132
|
-
const replacement = `<!-- dynamic component: could not resolve "${escapeHtmlComment(displayExpression(m.expr))}" -->`;
|
|
166
|
+
const replacement = `<!-- dynamic component: could not resolve "${escapeHtmlComment(displayExpression(m.expr ?? "a value a loop evaluated"))}" -->`;
|
|
133
167
|
result = result.slice(0, m.index) + replacement + result.slice(m.index + m.full.length);
|
|
134
168
|
continue;
|
|
135
169
|
}
|
|
@@ -138,20 +172,7 @@ export async function processDynamicComponents(template, context, filePath, opti
|
|
|
138
172
|
result = result.slice(0, m.index) + rendered + result.slice(m.index + m.full.length);
|
|
139
173
|
continue;
|
|
140
174
|
}
|
|
141
|
-
const
|
|
142
|
-
let propMatch;
|
|
143
|
-
while ((propMatch = propsPattern.exec(propsStr)) !== null) {
|
|
144
|
-
const propName = propMatch[1] || propMatch[2], propValue = propMatch[3];
|
|
145
|
-
if (propMatch[1])
|
|
146
|
-
try {
|
|
147
|
-
props[propName] = safeEvaluate(propValue, context);
|
|
148
|
-
} catch {
|
|
149
|
-
props[propName] = propValue;
|
|
150
|
-
}
|
|
151
|
-
else
|
|
152
|
-
props[propName] = propValue;
|
|
153
|
-
}
|
|
154
|
-
const componentsDir = options.componentsDir || "components", rendered = await renderComponentWithSlot(componentName, props, m.slotContent, componentsDir, context, filePath, options, new Set, dependencies ?? new Set);
|
|
175
|
+
const props = parseTagProps(m.attrs, context), componentsDir = options.componentsDir || "components", rendered = await renderComponentWithSlot(componentName, props, m.slotContent, componentsDir, context, filePath, options, new Set, dependencies ?? new Set);
|
|
155
176
|
result = result.slice(0, m.index) + rendered + result.slice(m.index + m.full.length);
|
|
156
177
|
} catch (error) {
|
|
157
178
|
const errorMsg = error instanceof Error ? error.message : String(error), replacement = `<!-- dynamic component error: ${escapeHtmlComment(errorMsg)} -->`;
|
|
@@ -163,21 +184,22 @@ export async function processDynamicComponents(template, context, filePath, opti
|
|
|
163
184
|
}
|
|
164
185
|
async function processSelfClosingDynamicComponents(template, context, filePath, options, dependencies) {
|
|
165
186
|
let result = template;
|
|
166
|
-
const pattern = /<component\s+(?::is|v-bind:is)\s*=\s*"([^"]*)"([^>]*?)\/>/gi, matches = [];
|
|
187
|
+
const pattern = /<component\s+(?:(?::is|v-bind:is)\s*=\s*"([^"]*)"|__stx_is\s*=\s*"([^"]*)")([^>]*?)\/>/gi, matches = [];
|
|
167
188
|
let match;
|
|
168
189
|
while ((match = pattern.exec(result)) !== null)
|
|
169
190
|
matches.push({
|
|
170
191
|
full: match[0],
|
|
171
192
|
expr: match[1],
|
|
172
|
-
|
|
193
|
+
encoded: match[2],
|
|
194
|
+
attrs: match[3],
|
|
173
195
|
index: match.index
|
|
174
196
|
});
|
|
175
197
|
for (let i = matches.length - 1;i >= 0; i--) {
|
|
176
198
|
const m = matches[i];
|
|
177
199
|
try {
|
|
178
|
-
const componentName =
|
|
200
|
+
const componentName = resolveTagName(m.expr, m.encoded, context);
|
|
179
201
|
if (!componentName || typeof componentName !== "string") {
|
|
180
|
-
const replacement = `<!-- dynamic component: could not resolve "${escapeHtmlComment(displayExpression(m.expr))}" -->`;
|
|
202
|
+
const replacement = `<!-- dynamic component: could not resolve "${escapeHtmlComment(displayExpression(m.expr ?? "a value a loop evaluated"))}" -->`;
|
|
181
203
|
result = result.slice(0, m.index) + replacement + result.slice(m.index + m.full.length);
|
|
182
204
|
continue;
|
|
183
205
|
}
|
|
@@ -186,7 +208,7 @@ async function processSelfClosingDynamicComponents(template, context, filePath,
|
|
|
186
208
|
result = result.slice(0, m.index) + rendered + result.slice(m.index + m.full.length);
|
|
187
209
|
continue;
|
|
188
210
|
}
|
|
189
|
-
const componentsDir = options.componentsDir || "components", rendered = await renderComponentWithSlot(componentName,
|
|
211
|
+
const componentsDir = options.componentsDir || "components", rendered = await renderComponentWithSlot(componentName, parseTagProps(m.attrs, context), "", componentsDir, context, filePath, options, new Set, dependencies ?? new Set);
|
|
190
212
|
result = result.slice(0, m.index) + rendered + result.slice(m.index + m.full.length);
|
|
191
213
|
} catch (error) {
|
|
192
214
|
const errorMsg = error instanceof Error ? error.message : String(error), replacement = `<!-- dynamic component error: ${escapeHtmlComment(errorMsg)} -->`;
|
|
@@ -455,7 +455,7 @@ function keepAssets(html) {
|
|
|
455
455
|
keepingAssets[url] = cache.match(url).then(function (hit) {
|
|
456
456
|
if (hit) return;
|
|
457
457
|
return background(function (signal) {
|
|
458
|
-
return fetch(url, { credentials: 'same-origin', signal: signal, priority: 'low' }).then(function (asset) {
|
|
458
|
+
return fetch(url, { credentials: 'same-origin', headers: { 'Purpose': 'prefetch' }, signal: signal, priority: 'low' }).then(function (asset) {
|
|
459
459
|
if (asset.status === 200) return keepAsset(cache, url, asset);
|
|
460
460
|
delete keepingAssets[url];
|
|
461
461
|
});
|
|
@@ -473,7 +473,7 @@ function precache() {
|
|
|
473
473
|
return caches.open(SHELL).then(function (cache) {
|
|
474
474
|
return Promise.all(wanted.map(function (page) {
|
|
475
475
|
return Promise.all([false, true].map(function (fragment) {
|
|
476
|
-
var headers = fragment ? { 'X-STX-Router': 'true', 'Accept': 'text/html' } : { 'Accept': 'text/html' };
|
|
476
|
+
var headers = fragment ? { 'X-STX-Router': 'true', 'Accept': 'text/html', 'Purpose': 'prefetch' } : { 'Accept': 'text/html', 'Purpose': 'prefetch' };
|
|
477
477
|
return background(function (signal) {
|
|
478
478
|
return fetch(page.url, { headers: headers, credentials: 'same-origin', signal: signal, priority: 'low' }).then(function (response) {
|
|
479
479
|
if (response.status !== 200 || response.redirected) return null;
|
package/dist/pwa.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-
|
|
2
|
+
import{So,tn,Zl,sm}from"./chunk-bzd387yx.js";import{xo,sa,tm,nm,rm}from"./chunk-nc5d3a5r.js";import{Xl,Jl,Yl,Qg,em}from"./chunk-g32hc78c.js";import{nt,Vn,oa}from"./chunk-xr1s56k5.js";import{om,im,am,cm,ko,qy}from"./chunk-n3fgrsva.js";import B from"fs";import w from"path";import O from"fs";import u from"path";var v=[72,96,128,144,152,192,384,512],S=[120,152,167,180],P=[16,32];async function M(n,t){let e={success:!0,generatedFiles:[],errors:[],warnings:[]},r=n.pwa?.icons;if(!r?.src)return e.errors.push("No source icon specified in pwa.icons.src"),e.success=!1,e;let o=u.isAbsolute(r.src)?r.src:u.resolve(process.cwd(),r.src);if(!await Bun.file(o).exists())return e.errors.push(`Source icon not found: ${o}`),e.success=!1,e;let a=u.resolve(t,r.outputDir||"pwa-icons");try{O.mkdirSync(a,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${a}`),e.success=!1,e}let s=r.sizes||v,l=r.generateWebP??!0,p=r.generateAppleIcons??!0;try{let c;try{c=await import("sharp")}catch{return e.errors.push(`sharp is not installed. Install it with: bun add sharp
|
|
3
|
+
Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-zcys6b06.js"),o=await Bun.file(e).text();return await r(o,{},e,n,new Set)}catch(r){console.warn(`[PWA] Failed to process custom offline page: ${r}`)}else console.warn(`[PWA] Custom offline page not found: ${e}`)}return E(n)}function E(n){let t=n.pwa?.offline,e=n.pwa?.manifest,r=t?.fallbackTitle||"You are offline",o=t?.fallbackMessage||"Please check your internet connection and try again.",a=e?.themeColor||"#4f46e5",s=e?.shortName||e?.name||"App";return`<!DOCTYPE html>
|
|
4
4
|
<html lang="en">
|
|
5
5
|
<head>
|
|
6
6
|
<meta charset="UTF-8">
|
|
@@ -233,4 +233,4 @@ Icon generation requires the sharp package for image processing.`),e.success=!1,
|
|
|
233
233
|
}, 5000);
|
|
234
234
|
</script>
|
|
235
235
|
</body>
|
|
236
|
-
</html>`}function b(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=nt(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=
|
|
236
|
+
</html>`}function b(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=nt(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=So(n,t);if(a){let s=tn(n),l=w.join(t,s);await Bun.write(l,a),e.files.serviceWorker=l}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate service worker: ${s}`),e.success=!1}return e}function ae(n,t){return sa(n,t)}function se(n){return n.pwa?.enabled===!0}export{S as APPLE_TOUCH_ICON_SIZES,v as DEFAULT_ICON_SIZES,P as FAVICON_SIZES,Jl as auditBuildOutput,Xl as auditConfig,re as buildPwaAssets,Yl as calculateAuditResult,em as formatAuditResult,oa as formatSize,j as generateManifest,_ as generateManifestJson,nm as generateManifestLink,F as generateOfflinePage,nt as generatePrecacheManifest,Vn as generatePrecacheManifestJs,M as generatePwaIcons,xo as generatePwaTags,So as generateServiceWorker,sm as generateServiceWorkerAuto,tm as generateSwRegistrationScript,rm as generateThemeColorMeta,N as getExpectedIconPaths,tn as getServiceWorkerFileName,sa as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,Zl as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,ko as pwaDirectives,om as pwaInstallDirective,am as pwaOfflineDirective,cm as pwaPushDirective,im as pwaUpdateDirective,qy as registerPwaDirectives,Qg as runPwaAudit,D as validateManifest};
|
package/dist/ssg.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-0jdz31q1.js";import"./chunk-
|
|
3
|
-
`)}function V(e){return async()=>({paths:await e(),fallback:!1})}var At;function Ot(e){let n=t(e),{depths:s}=h(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(n))!==null){if(s[c.index]!==0)continue;let u=_(n,"(",")",o.lastIndex-1),g=n.indexOf("{",u+1),P=_(n,"{","}",g);if(u<0||g<0||P<0)break;return e.slice(c.index,P+1)}let r=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=r.exec(n))!==null){if(s[c.index]!==0)continue;let u=
|
|
2
|
+
import"./chunk-0jdz31q1.js";import"./chunk-5g5khx0m.js";import"./chunk-qs0zk04y.js";import{_,Al}from"./chunk-945zygwa.js";import"./chunk-hdfhaddy.js";import"./chunk-7b3dqeyr.js";import{Vt,x}from"./chunk-9m45t60c.js";import"./chunk-esm0pnpz.js";import"./chunk-472w7t7p.js";import"./chunk-5mrt1enm.js";import{Lt,jt,Bt,Ft,zt,Ht}from"./chunk-0b57fgpn.js";import{a}from"./chunk-40fpt0r6.js";import{Us}from"./chunk-150cz8qq.js";import"./chunk-vw7crz0z.js";import"./chunk-becs8132.js";import{Te,mn,hn}from"./chunk-7z1hqp86.js";import"./chunk-g065d7p7.js";import{S}from"./chunk-fsxk5fsh.js";import{Pt,i}from"./chunk-r9n86na1.js";import"./chunk-eka2e4cm.js";import"./chunk-q6p96qq7.js";import{Ps}from"./chunk-8rgy17fj.js";import"./chunk-8v2hsn4d.js";import"./chunk-de61k0ab.js";import{kc,_c,Cc}from"./chunk-vfctk20v.js";import{fn,fr,gr}from"./chunk-arfpzf17.js";import{gn}from"./chunk-9jpsxqaf.js";import"./chunk-9vafweyd.js";import"./chunk-5jrpzepc.js";import{re,Ae}from"./chunk-e0bwzxfd.js";import"./chunk-vbmvft7g.js";import"./chunk-65g78sge.js";import"./chunk-rapr0m13.js";import{l}from"./chunk-pjpy86c3.js";import{tt}from"./chunk-qykbjg3z.js";import{t,h}from"./chunk-68r2zs20.js";import{f}from"./chunk-p92272k0.js";import R from"fs";import w from"path";import{createHash as $t}from"crypto";function kt(e){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(e).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return e}}var Dt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Rt(e){return Bun.hash(e).toString(16)}function lt(e,n={}){if(!e.includes('type="stx/island"'))return{html:e,chunks:[]};let s=new Map,o=e.replace(Dt,(r,u,g,P)=>{let b=P.trim();if(!b)return r;if(/\bdata-stx-src=/.test(g))return r;if(n.minify)b=kt(b);let p=Rt(b);if(!s.has(p))s.set(p,b);let k=n.integrity?` data-stx-integrity="sha384-${$t("sha384").update(b).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${k}${g}></script>`}),c=Array.from(s,([r,u])=>({hash:r,code:u}));return{html:o,chunks:c}}var Et=new Set(["visible","idle"]);function ut(e){if(!e.includes("data-stx-src="))return e;let n=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=s.exec(e))!==null)n.set(o[1],o[2]);let c=new Set,r=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=r.exec(e))!==null)if(Et.has(n.get(u[1])||""))c.add(u[2]);let g=/<\/head\s*>/iy,P=x(e,(p,k)=>(g.lastIndex=k,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(c.size===0||P===-1)return e;let b=Array.from(c).filter((p)=>!e.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!b)return e;return e.slice(0,P)+b+e.slice(P)}var Ct=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function Y(e){let n=e.trim();if(!n)return null;let s=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function It(e){for(let n of Ct){let s=e[n];if(!s)continue;let o=Y(s);if(o)return{url:o,source:"env",via:n}}return null}function dt(e){if(!e||typeof e!=="object")return null;let n=e,s=n.site?.url??n.url??n.app?.url;return typeof s==="string"?Y(s):null}async function Tt(e){let{existsSync:n}=await import("fs"),s=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(e,o);if(!n(c))continue;try{let r=await import(c),u=dt(r.default??r);if(u)return u}catch{}}return null}async function gt(e={}){let n=e.cwd??process.cwd(),s=e.env??process.env;if(e.explicit){let u=Y(e.explicit);if(u)return{url:u,source:"option"}}let o=dt(e.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let c=await Tt(n);if(c)return{url:c,source:"site.config",via:"url"};let r=It(s);if(r)return r;return{url:"http://localhost",source:"fallback"}}function pt(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
|
|
3
|
+
`)}function V(e){return async()=>({paths:await e(),fallback:!1})}var At;function Ot(e){let n=t(e),{depths:s}=h(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(n))!==null){if(s[c.index]!==0)continue;let u=_(n,"(",")",o.lastIndex-1),g=n.indexOf("{",u+1),P=_(n,"{","}",g);if(u<0||g<0||P<0)break;return e.slice(c.index,P+1)}let r=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=r.exec(n))!==null){if(s[c.index]!==0)continue;let u=Al(n,r.lastIndex).endPos;return e.slice(r.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function ft(e){let n="read";try{let s=await Bun.file(e).text();n="parse";let o=gn(s),c=[...o.server,...o.client,...o.signals].filter((r)=>/(?:^|\s)server(?:\s|=|$)/i.test(t(r.attrs))).sort((r,u)=>s.indexOf(r.fullTag)-s.indexOf(u.fullTag));for(let r of c){if(!/\bgetStaticPaths\b/.test(t(r.content)))continue;let u=(At??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(r.content);if(!/\bgetStaticPaths\b/.test(t(u)))continue;let g=Ot(u);if(/\bdefineStaticPaths\b/.test(t(g))&&Vt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");n="execute";let P=Function("defineStaticPaths",`return (${g})`)(V);if(typeof P!=="function")throw TypeError("getStaticPaths must be a function");let b=await P();n="result";let p=Array.isArray(b)?{paths:b}:b;if(!p||typeof p!=="object"||!("paths"in p)||!Array.isArray(p.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let k of p.paths)if(!k||typeof k!=="object"||!k.params||typeof k.params!=="object"||Array.isArray(k.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(s){return{kind:"error",phase:n,error:s instanceof Error?s:Error(String(s))}}}class ht{cacheDir;cache=new Map;loaded=!1;salt;constructor(e,n=""){this.cacheDir=e,this.salt=n}async load(){if(this.loaded)return;let e=w.join(this.cacheDir,"build-cache.json");if(await Bun.file(e).exists())try{let n=JSON.parse(await Bun.file(e).text());for(let[s,o]of Object.entries(n))this.cache.set(s,o)}catch{}this.loaded=!0}async save(){await R.promises.mkdir(this.cacheDir,{recursive:!0});let e=w.join(this.cacheDir,"build-cache.json"),n={};for(let[s,o]of this.cache)n[s]=o;await Bun.write(e,JSON.stringify(n))}getHash(e,n){let s=R.statSync(e),o=`${this.salt}|${e}:${s.mtimeMs}`;for(let r of n)if(R.existsSync(r)){let u=R.statSync(r);o+=`:${r}:${u.mtimeMs}`}let c=0;for(let r=0;r<o.length;r++){let u=o.charCodeAt(r);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(e,n){let s=this.cache.get(e);if(!s)return null;let o=wt(n).some((u)=>R.existsSync(u)),c=[n,...s.dependencies??[]].some((u)=>u.endsWith(".stx")&&R.existsSync(u)&&Ps(R.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||c)return this.cache.delete(e),null;let r=this.getHash(n,s.dependencies??[]);if(s.hash!==r)return this.cache.delete(e),null;return s.html}set(e,n,s,o){let c=this.getHash(n,s);this.cache.set(e,{hash:c,html:o,generatedAt:Date.now(),dependencies:s})}}class mt{cacheDir;constructor(e){this.cacheDir=e}getFilePath(e){let n=e.replace(/[^a-zA-Z0-9]/g,"_")+".json";return w.join(this.cacheDir,"isr",n)}async get(e){let n=this.getFilePath(e);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(e,n){let s=this.getFilePath(e);await R.promises.mkdir(w.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(n))}async invalidate(e){let n=this.getFilePath(e);if(await Bun.file(n).exists())await R.promises.unlink(n)}async invalidatePattern(e){let n=w.join(this.cacheDir,"isr");if(!R.existsSync(n))return;let s=await R.promises.readdir(n);for(let o of s){let c=o.replace(/_/g,"/").replace(".json","");if(e.test(c))await R.promises.unlink(w.join(n,o))}}async needsRevalidation(e){let n=await this.get(e);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function Ut(e){let n=[];if(!e.isDynamic)n.push({url:e.pattern,params:{}});else{let s=await ft(e.filePath);if(s.kind==="error")throw Error(`getStaticPaths ${s.phase} failed for ${e.pattern} (${e.filePath}): ${s.error.message}`,{cause:s.error});if(s.kind==="absent")return console.warn(`Warning: Dynamic route ${e.pattern} (${e.filePath}) has no getStaticPaths`),n;let o=s.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${e.pattern} (${e.filePath})`),n;for(let c of o.paths){let r=e.pattern;for(let[u,g]of Object.entries(c.params))r=r.replace(`:${u}`,g).replace(`:${u}*`,g);n.push({url:r,params:c.params,props:c.props,revalidate:c.revalidate})}}return n}function wt(e){return[e.replace(/\.stx$/,".data.ts"),e.replace(/\.stx$/,".data.js"),e+".data.ts",e+".data.js"]}async function _t(e){for(let n of wt(e))if(await Bun.file(n).exists())try{let s=await import(n);if(typeof s.default==="function")return await s.default();else if(typeof s.default==="object")return s.default;else if(typeof s.getData==="function")return await s.getData();else{let{default:o,...c}=s;return c}}catch(s){console.error(`Error loading data file ${n}:`,s)}return null}async function Mt(e,n,s){let o=e.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[1];if(!c.includes("getStaticProps"))return null;try{let r=c.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!r)return null;return await Function("params",`
|
|
4
4
|
return (async function getStaticProps() {
|
|
5
5
|
${r[1]}
|
|
6
6
|
})()
|
|
@@ -36,7 +36,7 @@ ${e.map((o)=>{let c=new URL(o.loc,n).href,r=` <url>
|
|
|
36
36
|
${s.join(`
|
|
37
37
|
`)}
|
|
38
38
|
</channel>
|
|
39
|
-
</rss>`}async function Xt(e={}){let n=Date.now();hn();let s=await a(process.cwd()),o=s.build||{},c=await gt({explicit:e.domain||o.domain,stxConfig:s});if(c.source==="fallback"&&(e.sitemap??o.sitemap??!0))console.warn(pt());let r={router:e.router??s?.router??{},pagesDir:e.pagesDir||o.pagesDir||"pages",outputDir:e.outputDir||o.outputDir||"dist",baseUrl:e.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:e.revalidate??o.revalidate??!1,sitemap:e.sitemap??o.sitemap??!0,sitemapExclude:e.sitemapExclude||o.sitemapExclude||[],robots:e.robots??o.robots??!0,rss:e.rss??o.rss??!1,concurrency:e.concurrency||o.concurrency||10,cache:e.cache??o.cache??!0,cacheDir:e.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:e.contentLoaders||[],hooks:e.hooks||{},minify:e.minify??o.minify??!0,generate404:e.generate404??o.generate404??!0,publicDir:e.publicDir||o.publicDir||"public",trailingSlash:e.trailingSlash??o.trailingSlash??!1,cleanOutput:e.cleanOutput??o.cleanOutput??!0,cacheSalt:e.cacheSalt??"",partialsDir:e.partialsDir||s?.partialsDir||"",componentsDir:e.componentsDir||s?.componentsDir||"",failOnIncludeError:e.failOnIncludeError??!0,failOnServerScriptError:e.failOnServerScriptError??!0,chunkIslands:e.chunkIslands===!0,prefetchIslands:e.prefetchIslands===!0,integrityIslands:e.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,P=0,b={},p={};await r.hooks.onBuildStart?.();try{if(r.cleanOutput&&R.existsSync(r.outputDir))await R.promises.rm(r.outputDir,{recursive:!0});await R.promises.mkdir(r.outputDir,{recursive:!0});let C=r.cacheSalt;if(!C){let{resolveUserCssConfig:d,fingerprintConfig:y}=await import("./chunk-
|
|
39
|
+
</rss>`}async function Xt(e={}){let n=Date.now();hn();let s=await a(process.cwd()),o=s.build||{},c=await gt({explicit:e.domain||o.domain,stxConfig:s});if(c.source==="fallback"&&(e.sitemap??o.sitemap??!0))console.warn(pt());let r={router:e.router??s?.router??{},pagesDir:e.pagesDir||o.pagesDir||"pages",outputDir:e.outputDir||o.outputDir||"dist",baseUrl:e.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:e.revalidate??o.revalidate??!1,sitemap:e.sitemap??o.sitemap??!0,sitemapExclude:e.sitemapExclude||o.sitemapExclude||[],robots:e.robots??o.robots??!0,rss:e.rss??o.rss??!1,concurrency:e.concurrency||o.concurrency||10,cache:e.cache??o.cache??!0,cacheDir:e.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:e.contentLoaders||[],hooks:e.hooks||{},minify:e.minify??o.minify??!0,generate404:e.generate404??o.generate404??!0,publicDir:e.publicDir||o.publicDir||"public",trailingSlash:e.trailingSlash??o.trailingSlash??!1,cleanOutput:e.cleanOutput??o.cleanOutput??!0,cacheSalt:e.cacheSalt??"",partialsDir:e.partialsDir||s?.partialsDir||"",componentsDir:e.componentsDir||s?.componentsDir||"",failOnIncludeError:e.failOnIncludeError??!0,failOnServerScriptError:e.failOnServerScriptError??!0,chunkIslands:e.chunkIslands===!0,prefetchIslands:e.prefetchIslands===!0,integrityIslands:e.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,P=0,b={},p={};await r.hooks.onBuildStart?.();try{if(r.cleanOutput&&R.existsSync(r.outputDir))await R.promises.rm(r.outputDir,{recursive:!0});await R.promises.mkdir(r.outputDir,{recursive:!0});let C=r.cacheSalt;if(!C){let{resolveUserCssConfig:d,fingerprintConfig:y}=await import("./chunk-p4hm5srd.js");try{C=y(await d(process.cwd()))}catch{}}let{prepareImageDelivery:v}=await import("./chunk-fe1wmmr5.js"),E=await v(r.publicDir,r.outputDir);if(E.count>0)console.log(`Optimized ${E.count} image(s) for responsive delivery`),C=[C,E.fingerprint].filter(Boolean).join(":");let O=new ht(r.cacheDir,C);if(r.cache)await O.load();try{let{generateCss:d}=await import("./chunk-p4hm5srd.js");await d('<div class="bg-black"></div>')}catch{}Lt();let St=s?.routeMiddleware?.dir||"middleware";await Bt(process.cwd(),St);let K=jt();if(K.length>0)console.log(`Loaded ${K.length} middleware: ${K.join(", ")}`);let xt=s?.routeMiddleware?.global||[];Cc(s?.layoutsDir,l(process.cwd()));let Q=re(".",{pagesDir:r.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${Q.length} routes`);let U=[];for(let d of Q)try{let y=await Ut(d);for(let D of y)U.push({route:d,url:D.url,params:D.params,props:D.props,revalidate:D.revalidate??r.revalidate})}catch(y){let D=y instanceof Error?y:Error(String(y));u.failedCount++,u.errors.push({route:d.pattern,error:D}),await r.hooks.onError?.(D,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,D)}u.totalPages=U.length+u.failedCount,console.log(`Generating ${U.length} pages...`);let M=[],et=[];for(let d=0;d<U.length;d+=r.concurrency)et.push(U.slice(d,d+r.concurrency));for(let d of et)await Promise.all(d.map(async(y)=>{let{route:D,url:m,params:G,props:bt,revalidate:it}=y;try{await r.hooks.onPageStart?.(m);let H=await Bun.file(D.filePath).text(),A=Qt(H),vt=A?.middleware?Array.isArray(A.middleware)?A.middleware:[A.middleware]:[],st=[...xt,...vt];if(st.length>0){let j=Ft(m,G,A||{}),z=zt(j,null,void 0,{isServer:!0}),F=await Ht(st,z);if(F.redirect){let I=typeof F.redirect==="string"?F.redirect:F.redirect.path||F.redirect,W=te(String(I),m),L=ee(m,r);await R.promises.mkdir(w.dirname(L),{recursive:!0}),await Bun.write(L,W),u.successCount++,u.pages.push({route:m,outputPath:L,size:Buffer.byteLength(W),cached:!1}),M.push({loc:m,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${m} \u2192 redirect to ${I}`);return}if(F.abort){let I=typeof F.abort==="string"?F.abort:F.abort?.error?.message||"aborted";console.warn(` \u21B3 ${m} \u2014 middleware aborted: ${I}`);return}}let at=A?.validate;if(typeof at==="function")try{if(!await at({params:G})){console.warn(`Validation failed for ${m}, skipping...`);return}}catch{}let B=null,ot=!1;if(r.cache){if(B=O.get(m,D.filePath),B)ot=!0,u.cachedCount++}if(!B){let j=await yt(D,G,bt,r,s);if(B=j.html,r.failOnIncludeError&&j.includeFailures.length>0)throw Error(`${j.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
|
|
40
40
|
${j.includeFailures.join(`
|
|
41
41
|
`)}
|
|
42
42
|
Set ssg.failOnIncludeError to false to build anyway.`);if(r.failOnServerScriptError&&j.serverScriptFailures.length>0)throw Error(`${j.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
|
|
@@ -65,7 +65,7 @@ ${d}`)}if(r.cache)await O.save();if(r.generate404){let d=w.join(r.pagesDir,"404.
|
|
|
65
65
|
<a href="/">Go home</a>
|
|
66
66
|
</div>
|
|
67
67
|
</body>
|
|
68
|
-
</html>`)}for(let d of[500]){let y=w.join(r.pagesDir,`${d}.stx`);if(await Bun.file(y).exists()){let D=new Set,m={...s,minifyClient:!0,debug:!1,cache:!1},G=await i(await Bun.file(y).text(),{},y,m,D);await Bun.write(w.join(r.outputDir,`${d}.html`),G)}}let X=w.join(r.pagesDir,"error.stx");if(await Bun.file(X).exists()){let d=new Set,y={...s,minifyClient:!0,debug:!1,cache:!1},D=await i(await Bun.file(X).text(),{},X,y,d);await Bun.write(w.join(r.outputDir,"error.html"),D)}if(r.sitemap&&M.length>0){let d=Jt(M,r.domain),y=w.join(r.outputDir,"sitemap.xml");await Bun.write(y,d),u.sitemapPath=y,console.log(`Generated sitemap.xml with ${M.length} URLs`)}if(r.robots!==!1){let d=typeof r.robots==="object"?r.robots:{},y=[...r.sitemapExclude.filter((m)=>typeof m==="string"),...d.disallow||[]],D=
|
|
68
|
+
</html>`)}for(let d of[500]){let y=w.join(r.pagesDir,`${d}.stx`);if(await Bun.file(y).exists()){let D=new Set,m={...s,minifyClient:!0,debug:!1,cache:!1},G=await i(await Bun.file(y).text(),{},y,m,D);await Bun.write(w.join(r.outputDir,`${d}.html`),G)}}let X=w.join(r.pagesDir,"error.stx");if(await Bun.file(X).exists()){let d=new Set,y={...s,minifyClient:!0,debug:!1,cache:!1},D=await i(await Bun.file(X).text(),{},X,y,d);await Bun.write(w.join(r.outputDir,"error.html"),D)}if(r.sitemap&&M.length>0){let d=Jt(M,r.domain),y=w.join(r.outputDir,"sitemap.xml");await Bun.write(y,d),u.sitemapPath=y,console.log(`Generated sitemap.xml with ${M.length} URLs`)}if(r.robots!==!1){let d=typeof r.robots==="object"?r.robots:{},y=[...r.sitemapExclude.filter((m)=>typeof m==="string"),...d.disallow||[]],D=Us({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...y.length>0?{disallow:y}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",r.domain).href}:{}});await Bun.write(w.join(r.outputDir,"robots.txt"),D),console.log("Generated robots.txt")}if(r.rss){let d=typeof r.rss==="object"?r.rss:{title:"Site Feed",description:"Latest updates",link:r.domain},y=[];if(d.getItems)y=await d.getItems();let D=Kt(d,y),m=w.join(r.outputDir,"rss.xml");await Bun.write(m,D),u.rssPath=m,console.log(`Generated rss.xml with ${y.length} items`)}let q=kc(r.outputDir);if(q.assets>0)console.log(`Externalized ${q.assets} asset(s) from ${q.pages} page(s) (${(q.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let J=_c(r.outputDir);if(J.assets>0)console.log(`Externalized ${J.assets} repeated asset(s) from ${J.pages} page(s) (${(J.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(r.publicDir&&R.existsSync(r.publicDir))await Z(r.publicDir,r.outputDir),console.log(`Copied public assets from ${r.publicDir}`);let nt=gr();if(nt)await Z(nt,w.join(r.outputDir,fr)),console.log(`Copied assets from ${fn}`)}catch(C){throw await r.hooks.onError?.(C),C}if(u.buildTime=Date.now()-n,g.size>0){u.islandChunks={count:g.size,totalBytes:P};let C={generatedChunks:g.size,totalBytes:P,chunks:b,pages:p};await Bun.write(w.join(r.outputDir,"_stx","islands-manifest.json"),JSON.stringify(C,null,2))}await r.hooks.onBuildEnd?.(u);let k=u.islandChunks?`
|
|
69
69
|
Island chunks: ${u.islandChunks.count} (${(u.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
|
|
70
70
|
Build complete!
|
|
71
71
|
Total: ${u.totalPages} pages
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.899",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -127,14 +127,14 @@
|
|
|
127
127
|
},
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@stacksjs/clapp": "^0.2.17",
|
|
130
|
-
"@stacksjs/desktop": "0.2.
|
|
131
|
-
"@stacksjs/sanitizer": "0.2.
|
|
130
|
+
"@stacksjs/desktop": "0.2.899",
|
|
131
|
+
"@stacksjs/sanitizer": "0.2.899",
|
|
132
132
|
"@stacksjs/ts-css": "^0.3.21",
|
|
133
133
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
134
134
|
"@types/dom-speech-recognition": "^0.0.12",
|
|
135
|
-
"bun-plugin-stx": "0.2.
|
|
135
|
+
"bun-plugin-stx": "0.2.899",
|
|
136
136
|
"bunfig": "^0.15.21",
|
|
137
|
-
"stx-router": "0.2.
|
|
137
|
+
"stx-router": "0.2.899",
|
|
138
138
|
"ts-broadcasting": "^0.0.13",
|
|
139
139
|
"ts-images": "^0.2.22",
|
|
140
140
|
"ts-syntax-highlighter": "^0.2.1"
|
package/dist/chunk-02qhay07.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{dh,Va,Bu,ph,fh,gh,mh,hh,Fu,zu,yh,bh,wh,vh}from"./chunk-at8dv8dn.js";import"./chunk-txegy370.js";import"./chunk-dt80hbq8.js";import"./chunk-s557tht3.js";import"./chunk-05x1rd86.js";import"./chunk-xqb0rzk1.js";import"./chunk-wg2n94gf.js";import"./chunk-2g7cs1n8.js";import"./chunk-80ky40mm.js";import"./chunk-jdpzwv1t.js";import"./chunk-gdyjd163.js";import"./chunk-9rjgq8k4.js";import"./chunk-6xaeq730.js";import"./chunk-n6q1d66k.js";import"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Bu as SUSPENSE_RESOLVER_RUNTIME,Va as buildSuspenseResolveScript,hh as createStreamRenderer,gh as extractStreamBoundaries,vh as generateHydrationRuntime,zu as islandDirective,bh as processSectionDirectives,fh as processStreamDirectives,yh as registerStreamingDirectives,ph as renderStreamingPage,dh as streamTemplate,mh as streamTemplateSimple,wh as streamToResponse,Fu as streamingSuspenseDirective};
|
package/dist/chunk-04x7mp45.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Fo,Fh,zh}from"./chunk-j1npj5xc.js";import"./chunk-qnz406aa.js";import"./chunk-tkjjyh6k.js";import"./chunk-115bb91s.js";import"./chunk-jdpzwv1t.js";import"./chunk-gdyjd163.js";import"./chunk-9rjgq8k4.js";import"./chunk-n6q1d66k.js";import"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{zh as clearComposableCache,Fh as getComposableScript,Fo as listComposableModules};
|
package/dist/chunk-0k437z3q.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Nm,Mm,Dm,Lm,gu,jm,Bm,Fm,zm,Hm,Vm,Um}from"./chunk-t0ttxayz.js";export{Vm as Broadcast,Um as BroadcastServer,gu as broadcast,zm as broadcastPresence,Fm as broadcastPrivate,Hm as channel,Nm as getBroadcastServer,Lm as loadChannels,Mm as startBroadcasting,Dm as stopBroadcasting,jm as toUser,Bm as toUsers};
|
package/dist/chunk-1a7a8cjs.js
DELETED
package/dist/chunk-1p4q6t48.js
DELETED
package/dist/chunk-1z6pqvmf.js
DELETED
package/dist/chunk-2nqmw4dv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{la,ua,da,fm,pa,fa,gm,ga,ma,Ql,mm}from"./chunk-zf68afyh.js";export{la as VideoProcessorCache,Ql as analyzeVideo,fm as clearVideoCache,ma as generateDASHManifest,ga as generateHLSManifest,pa as generatePoster,gm as generateSpriteSheet,fa as generateThumbnails,ua as getCachedVideoResult,mm as processVideo,da as setCachedVideoResult};
|
package/dist/chunk-35j7gaj5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Vu,Wo,cr,Uu,Wu,qu,Ku,Gu,Xu,Ju,Yu,Zu,Qu,ed,td,nd,rd,sd,od,id,ad,cd,ld,ud,dd,pd,fd,gd,md,hd,yd,bd,wd,vd,xd,Sd,kd,_d,Cd,Ed,Td,$d,Rd,Ad,Pd,Id,Od,Nd,dn,ec,Md,Dd,Ld,tc,jd,Bd,Fd,zd,Hd,Vd,nc,Ud,Wd,qd,Kd,Gd,Xd,Jd,Yd,Zd,lr,Qd,ep,tp,np,rp,sp,op,ip,ap,cp,lp,up,qo,dp,pp,fp,gp,mp,ys,bs,hp,yp,bp,wp,vp,rc,xp,Sp,kp,sc,Ko,_p,Cp,oc,ic,ws,ac,Ep,pn,Tp,cc,lc,Go,$p,Xo,Rp,Ap,Pp,Ip,Op,Np,Mp,uc,Dp,Lp,dc,jp,Bp,Fp,zp,Hp,Vp,Up,Wp,qp,Kp,Gp,Xp,Jp,Yp,Zp,Qp,ef,tf,nf,rf,sf,of,af,cf,pc,lf,uf,df,pf,ff,gf,mf,hf,yf,bf,wf,ur,fc,gc,vf,dr,xf,Sf,kf,mc,hc,vs,xs,_f,Jo,Cf,Ef,Tf,$f,Rf,Af,Pf,If,Of,Nf,Mf,Df,Lf,jf,Bf,Ff,zf,Hf,Vf,Uf,yc,Wf,qf,bc,wc,Kf,Gf}from"./chunk-whcrca58.js";export{Od as AVAILABLE_COMPONENTS,rc as AutoUpdater,Nd as COMPONENT_STYLES,vs as DEFAULT_WATCH_INTERVAL_MS,hc as MAX_WATCH_INTERVAL_MS,mc as MIN_WATCH_INTERVAL_MS,Vd as MODAL_STYLES,Zu as TOAST_STYLES,Jd as TRAY_MENU_STYLES,oc as UPDATE_MANIFEST_ASSET,Bd as alert,sf as appInfo,Af as appleScript,Gf as applicationDataDirectory,Rf as audio,qf as backgroundDelay,ef as battery,$f as biometric,bf as bluetooth,Mf as bonjour,pn as bundlePathForExecutable,$p as caffeinate,xp as canReplaceBundle,Sp as clearQuarantine,Wp as clipboard,Hd as closeAllModals,up as closeAllWindows,jd as confirm,cf as contextMenu,zf as continuityCamera,Ff as coreml,wp as craftBinaryNotFoundMessage,qo as craftWindowArguments,ur as crashReporter,xd as createAccordion,gd as createAutocomplete,od as createAvatar,sd as createBadge,Qu as createButton,id as createCard,$d as createChart,td as createCheckbox,yd as createChip,Rd as createCodeEditor,dd as createColorPicker,Td as createDataGrid,pd as createDatePicker,bs as createDiskImage,cd as createDropdown,Pd as createFileExplorer,Ep as createGitHubUpdateManifest,ac as createGitHubUpdater,hd as createImageView,zp as createInterval,md as createLabel,_d as createListView,Ad as createMediaPlayer,Ud as createMenubar,kd as createModalComponent,Kf as createNativeUpdateApi,wc as createPantrySelfUpdater,Op as createPreferences,rd as createProgressBar,ud as createRadioButton,ld as createRating,wd as createScrollView,Go as createSelfUpdater,nd as createSlider,vd as createSplitView,Sd as createStepper,nc as createSystemTray,Cd as createTable,ad as createTabs,ed as createTextInput,fd as createTimePicker,Fp as createTimer,bd as createTooltip,Ed as createTreeView,Id as createWebView,dp as createWindow,fp as createWindowWithHTML,Xo as decaffeinate,Qp as deepLinks,Hp as delay,Xu as dismissAlertById,Ju as dismissAllAlerts,Yp as dragOut,kp as extractBundle,Pf as fileAssociations,Jo as focus,Ef as focusShortcutsReady,Up as formatCompact,Ip as formatDuration,Pp as formatRemainingTime,Dp as formatShortcut,Vp as formatTime,Kp as fs,sc as generateUpdateManifest,Yu as getActiveAlertCount,zd as getActiveModalCount,Wd as getActiveTrayInstances,cp as getActiveWindowIds,Ap as getCaffeinateStatus,Uf as getCapabilities,yc as getCapability,ip as getDesktopConfig,sp as getDialogBridgeScript,Bp as getRegisteredHotkeys,Gd as getSimulatedTrayHTML,Xd as getTrayBridgeScript,qd as getTrayInstance,lp as getWindow,mp as getWindowBridgeScript,ic as githubLatestAssetUrl,ws as githubReleaseAssetUrl,Xp as globalShortcuts,dr as handoff,Cf as hasFocusShortcuts,vf as iap,Mp as isAutoLaunchEnabled,Wf as isAvailable,Rp as isCaffeinated,Zp as isDragOutAvailable,gp as isWebviewAvailable,df as keychain,xf as liveActivities,Tf as localServer,Sf as location,Nf as log,hp as macOSRuntimeExecutablePath,af as menu,Bf as midi,gf as nativeAutoLaunch,mf as nativeTray,hf as nativeWindow,tf as network,qp as notifications,Gu as notify,pp as openDevWindow,yp as pack,bp as packageApp,bc as parsePantryUpdateManifest,uc as parseShortcut,Of as pdf,pf as permissions,ff as printing,Fd as prompt,cc as quitLauncher,Ko as readBundleIdentity,fc as redactPII,Lp as registerHotkey,lc as relaunchBundle,Vu as requestNotificationPermission,ap as resetDesktopConfig,vp as resolveCraftBinary,ys as resolveCraftExecutablePath,Tp as runningBundleTeamId,uf as screen,kf as screenCapture,xs as screenSharing,Vf as serial,Hf as serviceMenu,Np as setAutoLaunch,op as setDesktopConfig,Gp as shell,Wo as showAlert,ep as showAlertDialog,Qd as showColorPicker,tp as showConfirmDialog,np as showErrorDialog,Dd as showErrorModal,Ku as showErrorToast,ec as showInfoModal,Uu as showInfoToast,lr as showMessageBox,dn as showModal,Yd as showOpenDialog,tc as showQuestionModal,Zd as showSaveDialog,Ld as showSuccessModal,Wu as showSuccessToast,cr as showToast,rp as showWarningDialog,Md as showWarningModal,qu as showWarningToast,pc as sidebar,gc as signPayload,wf as speech,Lf as speechRecognition,Df as spotlight,of as standardMenus,_p as swapBundle,lf as system,If as tags,Jp as theme,yf as touchbar,Kd as triggerTrayAction,jp as unregisterAllHotkeys,dc as unregisterHotkey,nf as updater,Cp as verifyBundleTrust,jf as vision,_f as watchScreenSharing,rf as windowEvents};
|
package/dist/chunk-4akw3bym.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ia,aa,ca,cm,lm,um,Zl,dm,pm}from"./chunk-ch9028z3.js";export{ia as ImageProcessorCache,Zl as applyTransformations,cm as clearImageCache,dm as generateResponsiveVariants,pm as generateSrcset,aa as getCachedImageResult,um as optimizeImage,lm as processImage,ca as setCachedImageResult};
|
package/dist/chunk-4azhfxrm.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{hu,qm,yu,bu,Km,Gm}from"./chunk-18dv485d.js";import"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Gm as applySlots,Km as extractSlotContent,qm as parseSlotElement,hu as parseSlots,bu as processSlots,yu as renderSlot};
|
package/dist/chunk-4d85str1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ao,Ea,is,Po,Io,Un,an,Ta,as,cs,Oo,No,Em,Tm,Et}from"./chunk-aj5tsksz.js";export{Et as DeployError,Ea as calculateSha1,is as collectDeployFiles,cs as createDefaultNetlifyConfig,Po as createFileManifest,Ao as createNetlifyClient,Em as deploy,as as detectProjectConfig,Io as filterRequiredFiles,Un as formatSize,Ta as generateNetlifyToml,an as getTotalSize,No as hasNetlifyConfig,Tm as initNetlify,Oo as writeNetlifyConfig};
|
package/dist/chunk-4s2x5p6r.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{py,As,di,Ps,xr,pi,fi,fg,Is,Os,Ns,gi,Nc,gg,Ot}from"./chunk-jdpzwv1t.js";import"./chunk-gdyjd163.js";import"./chunk-9rjgq8k4.js";import"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import{X}from"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{fg as bindLoopInterpolations,py as clearScriptScanCache,Is as convertServerLoopAttributesToDirectives,pi as convertSignalDirectivesToAttributes,Os as convertSignalLoopsToAttributes,xr as extractClientSignalNames,X as extractExports,Nc as findMarkupIndexOutsideScripts,Ps as hasSignalsSyntax,di as parseLoopExpression,fi as preEvalLiteralReactiveIfs,Ns as processScriptSetup,gi as processSignals,gg as rewriteStxImportSpecifiers,As as scanScriptTags,Ot as stripStxRuntimeImports};
|
package/dist/chunk-53kcqdjj.js
DELETED
package/dist/chunk-5eq2e6p3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{_i,Ci,Dt,Se,Tr,Us,$r,Ws,qs,vg,xg,Sg,Rr,kg,_g,Cg,Eg,Jc,Yc,Zc,Ei,Qc,Tg,Lt,jt,Bt,Ft,zt,Ht,ft,$g}from"./chunk-qe0t0m38.js";export{$r as Router,Cg as abortNavigation,Us as bracketPathToRegex,Lt as clearMiddleware,Yc as createClientCookieManager,zt as createMiddlewareContext,Ft as createRouteLocation,Jc as createServerCookieManager,Zc as createStorageManager,Eg as defineMiddleware,xg as defineRoute,Sg as defineRoutes,Ws as findErrorPage,qs as formatRoutes,Ci as generateRouteManifest,_i as generateRouteTypes,Qc as getMiddleware,jt as getMiddlewareNames,ft as getRouterScript,$g as getRouterScriptDev,Tg as hasMiddleware,Dt as isFileRequestPath,Bt as loadMiddlewareFromDirectory,Tr as matchRoute,_g as navigateTo,Se as patternToRegex,Ei as registerMiddleware,kg as resetRoutes,Rr as route,Ht as runMiddleware,vg as setAppUrl};
|
package/dist/chunk-5y4q7k3j.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Rs,dg,ai,pg}from"./chunk-2g7cs1n8.js";import"./chunk-80ky40mm.js";import"./chunk-jdpzwv1t.js";import"./chunk-gdyjd163.js";import"./chunk-9rjgq8k4.js";import"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import{Wt}from"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{pg as declareBareLoopHead,Wt as parseLoopBinding,dg as processLoops,ai as processLoopsAsync,Rs as reportDeferredLoopWarnings};
|
package/dist/chunk-690518hw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{vi,xi,Si,ki,zs,Hs,Sy,ky,_y,Cy,Vs,Ey}from"./chunk-t3zmfh8w.js";import"./chunk-xmg6bmh6.js";import"./chunk-0jdz31q1.js";export{Ey as generateDefaultRobotsTxt,Vs as generateRobotsTxt,ky as generateSitemap,_y as generateSitemapIndex,ki as injectSeoTags,zs as metaDirective,vi as processMetaDirectives,Si as processSeoDirective,xi as processStructuredData,Sy as registerSeoDirectives,Cy as scanForSitemapEntries,Hs as structuredDataDirective};
|
package/dist/chunk-732gb689.js
DELETED
package/dist/chunk-7wj6yx6f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{uy,dy,ug,$s}from"./chunk-xqb0rzk1.js";import"./chunk-wg2n94gf.js";import"./chunk-80ky40mm.js";import"./chunk-9rjgq8k4.js";import{jr}from"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import{yt}from"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{yt as freeIdentifiers,$s as processComponents,ug as processESImports,jr as rendersAsElement,uy as resetMarginStackWarnings,dy as resetTemplateLoopWarnings};
|
package/dist/chunk-80xzjxah.js
DELETED
package/dist/chunk-87tmvvvp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{y,Bi,bl,wl,jg,Bg,Fg,zg,Hg,co,Vg,Xe,ie,Je,Ug,Fr,Wg,Sl,kl,Hi,Ye,s,Pn,_l,b,Ce,$y}from"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{kl as SIGNAL_COMPOSABLE_CALL,Ce as clearComponentCache,Hi as componentClientSignalNames,Bi as convertToCommonJS,b as createDetailedErrorMessage,Hg as extractDirectiveNames,bl as extractScriptFromTemplate,y as extractVariables,s as fileExists,$y as getComponentCacheStats,Bg as getPositionInfo,ie as getSharedTranspiler,_l as getSourceLineInfo,zg as hasDirectives,wl as hasVariables,Wg as isHydrateTrigger,Vg as isJavaScriptScript,Ye as renderComponentWithSlot,Pn as resolveTemplatePath,Ug as scopeOnRootElement,co as scopeSequenceKey,Xe as shouldTranspileTypeScript,Sl as slotContentHasExpressions,Je as transpileTypeScript,Fr as userComponentFileExists,Fg as validateDirective,jg as validateTemplate};
|
package/dist/chunk-9afkttvz.js
DELETED
package/dist/chunk-a27xsdp6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{vn,Yo,Zo,Qo,ny,ei}from"./chunk-tkjjyh6k.js";import"./chunk-rb2zbdqd.js";import"./chunk-qe0t0m38.js";import"./chunk-41z7f41b.js";export{Zo as buildServerApi,ny as createServerApi,vn as discoverServerApi,Yo as generateApiTypes,ei as isServerApiSource,Qo as productionApiDispatcher};
|
package/dist/chunk-ah8az9vv.js
DELETED
package/dist/chunk-arr79m90.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{le,ue,de,Xn,Ee,Fe,us,wu,$t,ln,Jn,Yn,Zn,pe,Qn,er,ds}from"./chunk-062qfv99.js";import"./chunk-pvm48tse.js";export{ue as DEFAULT_FORMATS,de as DEFAULT_QUALITY,le as DEFAULT_WIDTHS,ds as ImageProcessingError,er as formatSize,ln as generateSizes,$t as generateSrcSet,Jn as getFallbackVariant,us as getImageMetadata,pe as getMimeType,Qn as getTotalSize,Yn as groupVariantsByFormat,Ee as isImageBackendAvailable,Zn as isImageFile,Xn as isSharpAvailable,Fe as processImage,wu as resizeAndConvert};
|
package/dist/chunk-at843zxh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{q,bg,yi,zc,a,j,vy,xy}from"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{j as config,q as defaultConfig,vy as defineStxConfig,yi as discoverConfig,a as loadStxConfig,zc as resolveInstalledPackage,bg as resolveStxDirectories,xy as validateConfig};
|
package/dist/chunk-awb046ct.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ja,Ya,Za,Qa,Qh}from"./chunk-3fnb12nh.js";import"./chunk-whcrca58.js";import"./chunk-9d578fvc.js";import"./chunk-pvm48tse.js";import"./chunk-txegy370.js";import"./chunk-dt80hbq8.js";import"./chunk-s557tht3.js";import"./chunk-05x1rd86.js";import"./chunk-xqb0rzk1.js";import"./chunk-wg2n94gf.js";import"./chunk-2g7cs1n8.js";import"./chunk-80ky40mm.js";import"./chunk-jdpzwv1t.js";import"./chunk-gdyjd163.js";import"./chunk-9rjgq8k4.js";import"./chunk-6xaeq730.js";import"./chunk-n6q1d66k.js";import"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Ja as buildNative,Qh as default,Ya as findCraftBinary,Qa as getAvailableFormats,Za as getAvailableTargets};
|
package/dist/chunk-b5njp1ef.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{km}from"./chunk-jxydtkdw.js";import"./chunk-txegy370.js";import"./chunk-dt80hbq8.js";import"./chunk-s557tht3.js";import"./chunk-05x1rd86.js";import"./chunk-xqb0rzk1.js";import"./chunk-wg2n94gf.js";import"./chunk-2g7cs1n8.js";import"./chunk-80ky40mm.js";import"./chunk-jdpzwv1t.js";import"./chunk-gdyjd163.js";import"./chunk-9rjgq8k4.js";import"./chunk-6xaeq730.js";import"./chunk-n6q1d66k.js";import"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{km as startInteractive};
|
package/dist/chunk-cjxfc5j5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Om}from"./chunk-vx1s055y.js";import"./chunk-dtpxzcrw.js";import"./chunk-ta07gj66.js";import"./chunk-b8zrn7k4.js";import"./chunk-tkjjyh6k.js";import"./chunk-txegy370.js";import"./chunk-dt80hbq8.js";import"./chunk-s557tht3.js";import"./chunk-05x1rd86.js";import"./chunk-xqb0rzk1.js";import"./chunk-wg2n94gf.js";import"./chunk-2g7cs1n8.js";import"./chunk-80ky40mm.js";import"./chunk-jdpzwv1t.js";import"./chunk-gdyjd163.js";import"./chunk-9rjgq8k4.js";import"./chunk-6xaeq730.js";import"./chunk-n6q1d66k.js";import"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Om as buildForProduction};
|
package/dist/chunk-cp5x6kx1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{At,rr,Hh}from"./chunk-ta07gj66.js";import{xe,sr,Vh,or,zo,ps,gs,Uh,Wh,qh,ir,ar,Ho,ms,Kh}from"./chunk-1bft48gk.js";import"./chunk-cphc60zw.js";export{zo as batch,Hh as default,sr as derived,or as effect,At as generateSignalsRuntime,rr as generateSignalsRuntimeDev,ar as isDerived,ir as isSignal,Vh as memo,gs as onDestroy,ps as onMount,ms as peek,qh as pendingLifecycleCounts,Wh as runDestroyCallbacks,Uh as runMountCallbacks,xe as state,Ho as untrack,Kh as useOptimistic};
|
package/dist/chunk-d2whsv81.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{mg,fy,gy,my,hy,hg,yg,yy,by,hi,wy,_r,Cr,Ds}from"./chunk-6xaeq730.js";import{gt}from"./chunk-zkwkhesc.js";import"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{hy as __setSignalsGeneratorsForTest,gt as cacheEngineFingerprint,Cr as cacheTemplate,_r as checkCache,wy as clearDevCaches,yg as getCachedRouterScript,hg as getCachedSignalsRuntime,yy as getServeClientAsset,hi as getServeModuleBundle,Ds as hashFilePath,gy as invalidateFileCache,my as invalidateFileCacheByDir,fy as readFileCached,by as registerServeModuleBundle,mg as templateCache};
|
package/dist/chunk-dr6fqa3x.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Pa,Rm,Mo,Am,pu,fu,Pm,Im}from"./chunk-hj98d829.js";import"./chunk-j1npj5xc.js";import"./chunk-qnz406aa.js";import"./chunk-tkjjyh6k.js";import"./chunk-115bb91s.js";import"./chunk-jdpzwv1t.js";import"./chunk-gdyjd163.js";import"./chunk-9rjgq8k4.js";import"./chunk-n6q1d66k.js";import"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import{_e,no}from"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Pa as buildScriptVirtualFile,Rm as buildVirtualSource,_e as extractScriptBlocks,no as extractTemplateExpressions,pu as findRuntimeTypeDeclarations,fu as findStxModuleDeclarations,Im as formatTypecheckDiagnostics,Am as sourcePathFor,Pm as typecheckStxFiles,Mo as virtualPathFor};
|
package/dist/chunk-e28czxw3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{su,$a,ou,iu,Ra,au,cu,lu,uu,Aa,du,$m}from"./chunk-mhrnjaka.js";import{ja,mu}from"./chunk-e16ef18k.js";import{le,ue,de,Xn,Ee,Fe,us,$t,ln,Jn,Yn,Zn,pe,Qn,er,ds}from"./chunk-062qfv99.js";import{vu}from"./chunk-xvncq3m5.js";import"./chunk-pvm48tse.js";export{ue as DEFAULT_FORMATS,de as DEFAULT_QUALITY,le as DEFAULT_WIDTHS,ds as ImageProcessingError,iu as clearImageCache,Ra as createImageDirective,mu as createImageHandler,cu as createImagePlugin,$m as defaultImageConfig,er as formatSize,Aa as generateImageManifest,ln as generateSizes,$t as generateSrcSet,Jn as getFallbackVariant,us as getImageMetadata,pe as getMimeType,Qn as getTotalSize,Yn as groupVariantsByFormat,ja as handleImageRequest,au as imageDirective,Ee as isImageBackendAvailable,Zn as isImageFile,Xn as isSharpAvailable,uu as optimizeDirectory,lu as optimizeImage,$a as parseImageComponent,Fe as processImage,ou as processImageComponents,su as renderImageComponent,vu as rewriteImagesWithSiblings,du as writeImageManifest};
|
package/dist/chunk-e8szp5wa.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Qi,Ny,My,Ml,et,Yg,yo,Dy,Ly,jy,By,Fy,zy,Hy,Vy,Uy}from"./chunk-xmg6bmh6.js";import"./chunk-0jdz31q1.js";export{zy as applyHead,Dy as definePageMeta,Qi as getHead,Ny as getPageMeta,et as mergeHeadConfigs,Hy as processHeadDirective,Uy as processMetaDirective,Vy as processTitleDirective,Fy as renderBodyAttrs,jy as renderHead,By as renderHtmlAttrs,My as resetHead,yo as seoMetaToHeadConfig,Ml as useHead,Ly as usePageTitle,Yg as useSeoMeta,Ly as useTitle};
|
package/dist/chunk-essd43ad.js
DELETED
package/dist/chunk-f60k8j9m.js
DELETED
package/dist/chunk-ffkhg23t.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Mh,Bo,Dh,Lh,jh,Bh}from"./chunk-2bnsxgfe.js";import"./chunk-qnz406aa.js";import"./chunk-tkjjyh6k.js";import"./chunk-115bb91s.js";import"./chunk-jdpzwv1t.js";import"./chunk-gdyjd163.js";import"./chunk-9rjgq8k4.js";import"./chunk-n6q1d66k.js";import"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Bh as clearStoreCache,Mh as getStoreScript,jh as getStoreScriptFor,Lh as pageStoresAll,Bo as storesRead,Dh as storesReadInFiles};
|
package/dist/chunk-fsk3rk2x.js
DELETED
package/dist/chunk-gz7egees.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Xf,Jf,Te,Yf,Cc,mn,hn,ey,Ec,yn,gr,Zf,Qf,eg,Ss,tg,ng,Tc,bn,rg,wn,$c,ty}from"./chunk-qnz406aa.js";import"./chunk-tkjjyh6k.js";import"./chunk-115bb91s.js";import"./chunk-n6q1d66k.js";import"./chunk-5qv5v8kc.js";import"./chunk-bgggjcwt.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-qe0t0m38.js";import"./chunk-d6ghx785.js";import"./chunk-6g5z6r27.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{gr as MODULE_SPECIFIER_PREFIX,Tc as assertBundleBuildCanSettle,Xf as bundleCacheDir,Jf as bundleCacheEntryLimit,ty as bundleClientEntriesSplit,wn as bundleClientScript,hn as clearBundleFailures,Te as clientBundleDependencies,mn as getBundleFailures,yn as hasUserImports,ng as isWithinBundlerCallback,bn as moduleSubstitutionKey,Qf as normalizeRegistrySpecifiers,rg as queueClientBundleBuild,Cc as recordBundleFailure,Zf as registryIdForPath,Ec as resolveBundlerFallback,eg as rewriteRegistryImports,ey as setBundlerFallbackMode,Yf as shouldLogBundlerDiagnostics,$c as tempBuildName,Ss as withModuleSubstitutes,tg as withinBundlerCallback};
|
package/dist/chunk-hk241gt2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Cu,Eu,Tu,$u,Ru,Au,Pu,Iu,Ou,Nu,ch}from"./chunk-vf4ejngv.js";export{Cu as createIslandRegistry,ch as default,Nu as generateIslandManifest,Tu as generatePartialHydrationCSS,Au as hydrateAll,Ru as hydrateByStrategy,$u as hydrateIsland,Pu as isHydrated,Iu as onHydrated,Eu as processPartialHydrationDirectives,Ou as processStaticDirectives};
|
package/dist/chunk-j9kejcrx.js
DELETED
package/dist/chunk-jc3zrmpz.js
DELETED
package/dist/chunk-jhbz5w30.js
DELETED