@stacksjs/stx 0.2.115 → 0.2.117
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/cli.js +454 -420
- package/dist/includes.js +2 -1
- package/dist/menubar.d.ts +1 -0
- package/dist/menubar.js +2 -6
- package/dist/pwa.js +274 -240
- package/dist/render.d.ts +14 -0
- package/dist/render.js +1 -1
- package/dist/runtime-globals.d.ts +4 -2
- package/dist/signal-processing.js +2 -2
- package/dist/signals.js +42 -8
- package/dist/ssg.js +343 -309
- package/dist/utils.js +3 -3
- package/package.json +5 -5
package/dist/utils.js
CHANGED
|
@@ -637,9 +637,9 @@ ${triedPaths.map((p) => ` - ${p}`).join(`
|
|
|
637
637
|
});
|
|
638
638
|
const { rewriteStxImportSpecifiers } = await import("./signal-processing.js");
|
|
639
639
|
bundledContent = bundledContent.replace(/^\s*import\s+(?:type\s+)?\{([^}]*)\}\s+from\s+['"](?:stx|@stacksjs\/stx|@stacksjs\/browser)['"]\s*;?\s*$/gm, (_match, specifiers) => rewriteStxImportSpecifiers(specifiers));
|
|
640
|
-
const content = transformStoreImports(bundledContent), wrappedContent = `
|
|
640
|
+
const content = transformStoreImports(bundledContent), componentLocalNames = extractVariableNames(content), wrappedContent = `
|
|
641
641
|
(function() {
|
|
642
|
-
${buildRuntimeGlobalsDestructure("const", COMPONENT_SCOPE_LOCAL_GLOBALS)}
|
|
642
|
+
${buildRuntimeGlobalsDestructure("const", [...COMPONENT_SCOPE_LOCAL_GLOBALS, ...componentLocalNames])}
|
|
643
643
|
const __scope = window.stx._scopes = window.stx._scopes || {};
|
|
644
644
|
const __scopeVars = __scope['${scopeId}'] = __scope['${scopeId}'] || {};
|
|
645
645
|
const __previousCurrentElement = window.__STX_CURRENT_ELEMENT__;
|
|
@@ -657,7 +657,7 @@ ${content}
|
|
|
657
657
|
// Register all defined signals and functions in this scope
|
|
658
658
|
const __localVars = {};
|
|
659
659
|
try {
|
|
660
|
-
${
|
|
660
|
+
${componentLocalNames.map((v) => `if (typeof ${v} !== 'undefined') __localVars['${v}'] = ${v};`).join(`
|
|
661
661
|
`)}
|
|
662
662
|
}
|
|
663
663
|
catch (e) {}
|
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.117",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -117,12 +117,12 @@
|
|
|
117
117
|
"dependencies": {
|
|
118
118
|
"@cwcss/crosswind": "^0.2.12",
|
|
119
119
|
"@stacksjs/clapp": "^0.2.0",
|
|
120
|
-
"@stacksjs/desktop": "0.2.
|
|
121
|
-
"@stacksjs/sanitizer": "0.2.
|
|
120
|
+
"@stacksjs/desktop": "0.2.117",
|
|
121
|
+
"@stacksjs/sanitizer": "0.2.117",
|
|
122
122
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
123
|
-
"bun-plugin-stx": "0.2.
|
|
123
|
+
"bun-plugin-stx": "0.2.117",
|
|
124
124
|
"bunfig": "^0.15.15",
|
|
125
|
-
"stx-router": "0.2.
|
|
125
|
+
"stx-router": "0.2.117",
|
|
126
126
|
"ts-broadcasting": "^0.0.9",
|
|
127
127
|
"ts-images": "^0.1.9",
|
|
128
128
|
"ts-syntax-highlighter": "^0.2.1"
|