@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
|
@@ -5705,10 +5705,10 @@ else {
|
|
|
5705
5705
|
var root = scriptEl ? scriptEl.nextElementSibling : null;
|
|
5706
5706
|
if (!root && scriptEl) root = scriptEl.previousElementSibling || scriptEl.parentElement;
|
|
5707
5707
|
|
|
5708
|
-
// SPA fallback: during router navigation, script is appended to
|
|
5708
|
+
// SPA fallback: during router navigation, script is appended to body>
|
|
5709
5709
|
// (not inside the content container), so nextElementSibling won't find the page content.
|
|
5710
5710
|
// Only use fallback when we genuinely couldn't find a suitable root element.
|
|
5711
|
-
// Do NOT fallback just because the script is in
|
|
5711
|
+
// Do NOT fallback just because the script is in body> \u2014 layout scripts in body>
|
|
5712
5712
|
// with valid siblings (e.g. sidebar <aside>) should use those siblings as root.
|
|
5713
5713
|
var needsFallback = !root || root === document.body
|
|
5714
5714
|
|| (root && root.tagName === 'SCRIPT');
|
|
@@ -6027,7 +6027,7 @@ else {
|
|
|
6027
6027
|
mountCallbacks.forEach(fn => fn());
|
|
6028
6028
|
});
|
|
6029
6029
|
|
|
6030
|
-
// Multi-root fragment fix: a no
|
|
6030
|
+
// Multi-root fragment fix: a no-body> setup page tags only the FIRST
|
|
6031
6031
|
// top-level element with data-stx (signal-processing.ts marks one element),
|
|
6032
6032
|
// so sibling root elements were orphaned \u2014 their :if / :for / {{ }} / x-text
|
|
6033
6033
|
// never hydrated, which read as "{{ }} doesn't work under :if/:for". The
|
|
@@ -6124,7 +6124,7 @@ else {
|
|
|
6124
6124
|
el.querySelectorAll('[x-cloak]').forEach(function(c) { c.removeAttribute('x-cloak'); });
|
|
6125
6125
|
});
|
|
6126
6126
|
|
|
6127
|
-
// Process
|
|
6127
|
+
// Process head> elements (title, meta) that may contain {{ }} expressions
|
|
6128
6128
|
// Use componentScope which now contains variables from processed components
|
|
6129
6129
|
const headElements = document.querySelectorAll('head title, head meta[content]');
|
|
6130
6130
|
headElements.forEach(el => {
|
|
@@ -6320,7 +6320,7 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
|
|
|
6320
6320
|
|
|
6321
6321
|
// Apply new page's SFC setup function. During SPA navigation, re-executed page
|
|
6322
6322
|
// scripts set window.stx._latestSetup to the new setup function. This takes priority
|
|
6323
|
-
// over the stale data-stx attribute on
|
|
6323
|
+
// over the stale data-stx attribute on body> (which has the PREVIOUS page's function name).
|
|
6324
6324
|
var usedLatestSetup = false;
|
|
6325
6325
|
if (window.stx._latestSetup && typeof window.stx._latestSetup === 'function') {
|
|
6326
6326
|
try {
|
|
@@ -6404,7 +6404,7 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
|
|
|
6404
6404
|
|
|
6405
6405
|
// Process the container content \u2014 bind {{ }}, :attr, @event directives.
|
|
6406
6406
|
// Run synchronously (not in setTimeout) so componentScope is captured correctly.
|
|
6407
|
-
// The DOMContentLoaded path processes
|
|
6407
|
+
// The DOMContentLoaded path processes body> synchronously \u2014 the SPA path must match.
|
|
6408
6408
|
console.log('[stx:load] container:', container.tagName, '__stx_scope:', !!container.__stx_scope, 'scope keys:', Object.keys(componentScope).slice(0, 10));
|
|
6409
6409
|
if (!container.__stx_scope) {
|
|
6410
6410
|
// Dispose previous effects on the container (from prior navigation)
|
package/dist/signals.js
CHANGED
|
@@ -4443,10 +4443,10 @@ else {
|
|
|
4443
4443
|
var root = scriptEl ? scriptEl.nextElementSibling : null;
|
|
4444
4444
|
if (!root && scriptEl) root = scriptEl.previousElementSibling || scriptEl.parentElement;
|
|
4445
4445
|
|
|
4446
|
-
// SPA fallback: during router navigation, script is appended to
|
|
4446
|
+
// SPA fallback: during router navigation, script is appended to body>
|
|
4447
4447
|
// (not inside the content container), so nextElementSibling won't find the page content.
|
|
4448
4448
|
// Only use fallback when we genuinely couldn't find a suitable root element.
|
|
4449
|
-
// Do NOT fallback just because the script is in
|
|
4449
|
+
// Do NOT fallback just because the script is in body> \u2014 layout scripts in body>
|
|
4450
4450
|
// with valid siblings (e.g. sidebar <aside>) should use those siblings as root.
|
|
4451
4451
|
var needsFallback = !root || root === document.body
|
|
4452
4452
|
|| (root && root.tagName === 'SCRIPT');
|
|
@@ -4765,7 +4765,7 @@ else {
|
|
|
4765
4765
|
mountCallbacks.forEach(fn => fn());
|
|
4766
4766
|
});
|
|
4767
4767
|
|
|
4768
|
-
// Multi-root fragment fix: a no
|
|
4768
|
+
// Multi-root fragment fix: a no-body> setup page tags only the FIRST
|
|
4769
4769
|
// top-level element with data-stx (signal-processing.ts marks one element),
|
|
4770
4770
|
// so sibling root elements were orphaned \u2014 their :if / :for / {{ }} / x-text
|
|
4771
4771
|
// never hydrated, which read as "{{ }} doesn't work under :if/:for". The
|
|
@@ -4862,7 +4862,7 @@ else {
|
|
|
4862
4862
|
el.querySelectorAll('[x-cloak]').forEach(function(c) { c.removeAttribute('x-cloak'); });
|
|
4863
4863
|
});
|
|
4864
4864
|
|
|
4865
|
-
// Process
|
|
4865
|
+
// Process head> elements (title, meta) that may contain {{ }} expressions
|
|
4866
4866
|
// Use componentScope which now contains variables from processed components
|
|
4867
4867
|
const headElements = document.querySelectorAll('head title, head meta[content]');
|
|
4868
4868
|
headElements.forEach(el => {
|
|
@@ -5058,7 +5058,7 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
|
|
|
5058
5058
|
|
|
5059
5059
|
// Apply new page's SFC setup function. During SPA navigation, re-executed page
|
|
5060
5060
|
// scripts set window.stx._latestSetup to the new setup function. This takes priority
|
|
5061
|
-
// over the stale data-stx attribute on
|
|
5061
|
+
// over the stale data-stx attribute on body> (which has the PREVIOUS page's function name).
|
|
5062
5062
|
var usedLatestSetup = false;
|
|
5063
5063
|
if (window.stx._latestSetup && typeof window.stx._latestSetup === 'function') {
|
|
5064
5064
|
try {
|
|
@@ -5142,7 +5142,7 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
|
|
|
5142
5142
|
|
|
5143
5143
|
// Process the container content \u2014 bind {{ }}, :attr, @event directives.
|
|
5144
5144
|
// Run synchronously (not in setTimeout) so componentScope is captured correctly.
|
|
5145
|
-
// The DOMContentLoaded path processes
|
|
5145
|
+
// The DOMContentLoaded path processes body> synchronously \u2014 the SPA path must match.
|
|
5146
5146
|
console.log('[stx:load] container:', container.tagName, '__stx_scope:', !!container.__stx_scope, 'scope keys:', Object.keys(componentScope).slice(0, 10));
|
|
5147
5147
|
if (!container.__stx_scope) {
|
|
5148
5148
|
// Dispose previous effects on the container (from prior navigation)
|