@stacksjs/stx 0.2.83 → 0.2.85
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/app-shell.js +56 -56
- package/dist/build-assets.js +6 -6
- package/dist/build-mode-detector.js +101 -101
- package/dist/build-views.js +155 -155
- package/dist/build.js +43 -43
- package/dist/caching.js +6 -6
- package/dist/cli.js +57 -57
- package/dist/component-processing.js +22 -22
- package/dist/component-renderer.js +38 -38
- package/dist/components.js +101 -101
- package/dist/dev-server/index.js +42 -42
- package/dist/dev-server/serve-app.js +56 -56
- package/dist/dev-server/serve-file.js +56 -56
- package/dist/dev-server/serve-markdown.js +42 -42
- package/dist/dev-server/serve-multi.js +55 -55
- package/dist/dev-server.js +56 -56
- package/dist/docs.js +102 -102
- package/dist/dynamic-components.js +38 -38
- package/dist/includes.js +38 -38
- package/dist/index.js +56 -56
- package/dist/interactive.js +102 -102
- package/dist/lazy-loader.js +101 -101
- package/dist/plugin.js +50 -50
- package/dist/process.js +37 -37
- package/dist/production-builder.js +37 -37
- package/dist/production-server.js +37 -37
- package/dist/pwa/index.js +101 -101
- package/dist/pwa/offline.js +101 -101
- package/dist/pwa.js +90 -90
- package/dist/render.js +159 -159
- package/dist/runtime-injection.js +6 -6
- package/dist/serve.js +112 -112
- package/dist/signal-processing.js +6 -6
- package/dist/signals.js +6 -6
- package/dist/site-builder/build.js +103 -103
- package/dist/site-builder/index.js +44 -44
- package/dist/ssg.js +19 -19
- package/dist/ssr.js +89 -89
- package/dist/story/cli.js +42 -42
- package/dist/story/commands/dev.js +42 -42
- package/dist/story/commands/index.js +42 -42
- package/dist/story/index.js +42 -42
- package/dist/story/renderer.js +102 -102
- package/dist/story/server.js +42 -42
- package/dist/story/visual-testing.js +102 -102
- package/dist/streaming.js +38 -38
- package/dist/template-compiler.js +30 -30
- package/dist/template-hydrator.js +116 -116
- package/dist/testing.js +101 -101
- package/dist/utils.js +38 -38
- package/dist/variable-extractor.js +11 -11
- package/dist/web-components.js +101 -101
- package/package.json +5 -5
|
@@ -5703,10 +5703,10 @@ else {
|
|
|
5703
5703
|
var root = scriptEl ? scriptEl.nextElementSibling : null;
|
|
5704
5704
|
if (!root && scriptEl) root = scriptEl.previousElementSibling || scriptEl.parentElement;
|
|
5705
5705
|
|
|
5706
|
-
// SPA fallback: during router navigation, script is appended to
|
|
5706
|
+
// SPA fallback: during router navigation, script is appended to body>
|
|
5707
5707
|
// (not inside the content container), so nextElementSibling won't find the page content.
|
|
5708
5708
|
// Only use fallback when we genuinely couldn't find a suitable root element.
|
|
5709
|
-
// Do NOT fallback just because the script is in
|
|
5709
|
+
// Do NOT fallback just because the script is in body> \u2014 layout scripts in body>
|
|
5710
5710
|
// with valid siblings (e.g. sidebar <aside>) should use those siblings as root.
|
|
5711
5711
|
var needsFallback = !root || root === document.body
|
|
5712
5712
|
|| (root && root.tagName === 'SCRIPT');
|
|
@@ -6025,7 +6025,7 @@ else {
|
|
|
6025
6025
|
mountCallbacks.forEach(fn => fn());
|
|
6026
6026
|
});
|
|
6027
6027
|
|
|
6028
|
-
// Multi-root fragment fix: a no
|
|
6028
|
+
// Multi-root fragment fix: a no-body> setup page tags only the FIRST
|
|
6029
6029
|
// top-level element with data-stx (signal-processing.ts marks one element),
|
|
6030
6030
|
// so sibling root elements were orphaned \u2014 their :if / :for / {{ }} / x-text
|
|
6031
6031
|
// never hydrated, which read as "{{ }} doesn't work under :if/:for". The
|
|
@@ -6122,7 +6122,7 @@ else {
|
|
|
6122
6122
|
el.querySelectorAll('[x-cloak]').forEach(function(c) { c.removeAttribute('x-cloak'); });
|
|
6123
6123
|
});
|
|
6124
6124
|
|
|
6125
|
-
// Process
|
|
6125
|
+
// Process head> elements (title, meta) that may contain {{ }} expressions
|
|
6126
6126
|
// Use componentScope which now contains variables from processed components
|
|
6127
6127
|
const headElements = document.querySelectorAll('head title, head meta[content]');
|
|
6128
6128
|
headElements.forEach(el => {
|
|
@@ -6318,7 +6318,7 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
|
|
|
6318
6318
|
|
|
6319
6319
|
// Apply new page's SFC setup function. During SPA navigation, re-executed page
|
|
6320
6320
|
// scripts set window.stx._latestSetup to the new setup function. This takes priority
|
|
6321
|
-
// over the stale data-stx attribute on
|
|
6321
|
+
// over the stale data-stx attribute on body> (which has the PREVIOUS page's function name).
|
|
6322
6322
|
var usedLatestSetup = false;
|
|
6323
6323
|
if (window.stx._latestSetup && typeof window.stx._latestSetup === 'function') {
|
|
6324
6324
|
try {
|
|
@@ -6402,7 +6402,7 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
|
|
|
6402
6402
|
|
|
6403
6403
|
// Process the container content \u2014 bind {{ }}, :attr, @event directives.
|
|
6404
6404
|
// Run synchronously (not in setTimeout) so componentScope is captured correctly.
|
|
6405
|
-
// The DOMContentLoaded path processes
|
|
6405
|
+
// The DOMContentLoaded path processes body> synchronously \u2014 the SPA path must match.
|
|
6406
6406
|
console.log('[stx:load] container:', container.tagName, '__stx_scope:', !!container.__stx_scope, 'scope keys:', Object.keys(componentScope).slice(0, 10));
|
|
6407
6407
|
if (!container.__stx_scope) {
|
|
6408
6408
|
// Dispose previous effects on the container (from prior navigation)
|