@stacksjs/stx 0.2.115 → 0.2.116

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/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
- ${extractVariableNames(content).map((v) => `if (typeof ${v} !== 'undefined') __localVars['${v}'] = ${v};`).join(`
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.115",
4
+ "version": "0.2.116",
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.115",
121
- "@stacksjs/sanitizer": "0.2.115",
120
+ "@stacksjs/desktop": "0.2.116",
121
+ "@stacksjs/sanitizer": "0.2.116",
122
122
  "@stacksjs/ts-i18n": "^0.1.11",
123
- "bun-plugin-stx": "0.2.115",
123
+ "bun-plugin-stx": "0.2.116",
124
124
  "bunfig": "^0.15.15",
125
- "stx-router": "0.2.115",
125
+ "stx-router": "0.2.116",
126
126
  "ts-broadcasting": "^0.0.9",
127
127
  "ts-images": "^0.1.9",
128
128
  "ts-syntax-highlighter": "^0.2.1"