bun-plugin-stx 0.2.35 → 0.2.42
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.
|
@@ -1039,6 +1039,13 @@ else {
|
|
|
1039
1039
|
var newTitle=doc.querySelector('title');
|
|
1040
1040
|
if(newTitle)document.title=newTitle.textContent;
|
|
1041
1041
|
|
|
1042
|
+
// Update <html lang> from the destination doc so screen readers,
|
|
1043
|
+
// CSS :lang() selectors, and any i18n picker that mirrors
|
|
1044
|
+
// document.documentElement.lang stay accurate after SPA hops.
|
|
1045
|
+
if(doc.documentElement&&doc.documentElement.lang){
|
|
1046
|
+
document.documentElement.lang=doc.documentElement.lang;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1042
1049
|
window.dispatchEvent(new CustomEvent('stx:navigate',{detail:{url:url}}));
|
|
1043
1050
|
|
|
1044
1051
|
// Execute page scripts FIRST \u2014 they define setup functions and set _latestSetup
|
|
@@ -1236,7 +1243,7 @@ else {
|
|
|
1236
1243
|
function injectViewTransitionCSS(){
|
|
1237
1244
|
if(document.getElementById('stx-view-transitions'))return;
|
|
1238
1245
|
var s=document.createElement('style');s.id='stx-view-transitions';
|
|
1239
|
-
s.textContent='::view-transition-group(root){animation:none}::view-transition-old(root){animation:none}::view-transition-new(root){animation:none}
|
|
1246
|
+
s.textContent='::view-transition-group(root){animation:none}::view-transition-old(root){animation:none}::view-transition-new(root){animation:none}main,#app-content,[data-stx-content]{view-transition-name:stx-content}::view-transition-old(stx-content){animation:stx-fade-out .15s ease-out both}::view-transition-new(stx-content){animation:stx-fade-in .15s ease-in .1s both}@keyframes stx-fade-out{from{opacity:1}to{opacity:0}}@keyframes stx-fade-in{from{opacity:0}to{opacity:1}}::view-transition{background:transparent}::view-transition-group(stx-content){background:inherit;overflow:hidden}';
|
|
1240
1247
|
(document.head||document.documentElement).appendChild(s);
|
|
1241
1248
|
}
|
|
1242
1249
|
|
|
@@ -307,6 +307,11 @@ function stxPlugin(userOptions) {
|
|
|
307
307
|
console.error("Failed to build web components:", error);
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
+
build.onResolve({ filter: /^\// }, (args) => {
|
|
311
|
+
if (args.path.startsWith("//"))
|
|
312
|
+
return null;
|
|
313
|
+
return { external: true, path: args.path };
|
|
314
|
+
});
|
|
310
315
|
build.onLoad({ filter: /\.md$/ }, async (args) => {
|
|
311
316
|
const filePath = args.path;
|
|
312
317
|
try {
|
package/dist/index.js
CHANGED
package/dist/preload.js
CHANGED
package/dist/serve.js
CHANGED
|
@@ -8956,7 +8956,7 @@ After installing: bun add bun-plugin-stx`);
|
|
|
8956
8956
|
pageMiddlewarePatterns.length = 0;
|
|
8957
8957
|
await Promise.all(files.map((f) => detectPageMiddleware(f)));
|
|
8958
8958
|
try {
|
|
8959
|
-
const { Router } = await import("./chunk-
|
|
8959
|
+
const { Router } = await import("./chunk-nyzhqegd.js");
|
|
8960
8960
|
const pagesDir = patterns[0]?.replace(/\/$/, "") || "pages";
|
|
8961
8961
|
const router = new Router(process19.cwd(), { pagesDir });
|
|
8962
8962
|
console.log(`[stx] Generated ${router.routes.length} routes \u2192 .stx/routes.ts`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-plugin-stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.42",
|
|
5
5
|
"description": "A Bun plugin that allows for using Laravel Blade-like syntax.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
"typecheck": "bun tsc --noEmit"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@stacksjs/stx": "0.2.
|
|
75
|
+
"@stacksjs/stx": "0.2.42"
|
|
76
76
|
}
|
|
77
77
|
}
|