@absolutejs/absolute 0.19.0-beta.842 → 0.19.0-beta.844

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/build.js CHANGED
@@ -12089,16 +12089,17 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
12089
12089
  ].join(", ")}`);
12090
12090
  }
12091
12091
  const original = await traceAngularPhase("wrapper/read-server-output", () => fs.readFile(rawServerFile, "utf-8"), { entry: resolvedEntry });
12092
- const detectExportedComponentClass = (source, fallback) => {
12092
+ const detectExportedComponentClass = (source) => {
12093
12093
  const defaultMatch = source.match(/export\s+default\s+([A-Za-z_$][\w$]*)\s*;/);
12094
12094
  if (defaultMatch)
12095
12095
  return defaultMatch[1];
12096
12096
  const exportClassMatch = source.match(/export\s+(?:default\s+)?class\s+([A-Za-z_$][\w$]*)/);
12097
12097
  if (exportClassMatch)
12098
12098
  return exportClassMatch[1];
12099
- return fallback;
12099
+ return null;
12100
12100
  };
12101
- const componentClassName = await traceAngularPhase("wrapper/detect-component-class", () => detectExportedComponentClass(original, `${toPascal(fileBase)}Component`), { entry: resolvedEntry });
12101
+ const detectedClassName = await traceAngularPhase("wrapper/detect-component-class", () => detectExportedComponentClass(original), { entry: resolvedEntry });
12102
+ const componentClassName = detectedClassName ?? `${toPascal(fileBase)}Component`;
12102
12103
  const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
12103
12104
  const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
12104
12105
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
@@ -12118,7 +12119,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
12118
12119
  ${rewritten}`;
12119
12120
  }
12120
12121
  rewritten = rewritten.replace(new RegExp(`templateUrl:\\s*['"]\\.\\/${fileBase}\\.html['"]`), `templateUrl: '../../pages/${fileBase}.html'`);
12121
- if (!rewritten.includes("export default")) {
12122
+ if (detectedClassName && !rewritten.includes("export default")) {
12122
12123
  rewritten += `
12123
12124
  export default ${componentClassName};
12124
12125
  `;
@@ -13139,11 +13140,13 @@ var init_buildReactVendor = __esm(() => {
13139
13140
  var RESERVED_KEYS, VALID_IDENTIFIER, generateVendorEntrySource = async (specifier) => {
13140
13141
  const mod = await import(specifier);
13141
13142
  const exportKeys = Object.keys(mod).filter((key) => !RESERVED_KEYS.has(key) && VALID_IDENTIFIER.test(key));
13142
- const explicitNamedExports = exportKeys.length > 0 ? `export { ${exportKeys.join(", ")} } from '${specifier}';
13143
+ const localBindings = exportKeys.map((key, i) => `const __abs_${i} = __abs_ns[${JSON.stringify(key)}];`).join(`
13144
+ `);
13145
+ const reExportClause = exportKeys.length > 0 ? `export { ${exportKeys.map((key, i) => `__abs_${i} as ${key}`).join(", ")} };
13143
13146
  ` : "";
13144
13147
  return `import * as __abs_ns from '${specifier}';
13145
- export * from '${specifier}';
13146
- ` + explicitNamedExports + `export default __abs_ns.default;
13148
+ ` + (localBindings ? `${localBindings}
13149
+ ` : "") + reExportClause + `export default __abs_ns.default;
13147
13150
  export const __ABSOLUTE_VENDOR_NAMESPACE__ = __abs_ns;
13148
13151
  `;
13149
13152
  };
@@ -13153,7 +13156,7 @@ var init_vendorEntrySource = __esm(() => {
13153
13156
  "__esModule",
13154
13157
  "__ABSOLUTE_VENDOR_NAMESPACE__"
13155
13158
  ]);
13156
- VALID_IDENTIFIER = /^[$_a-zA-Z][$_a-zA-Z0-9]*$/;
13159
+ VALID_IDENTIFIER = /^[$_\p{L}][$_\p{L}\p{N}]*$/u;
13157
13160
  });
13158
13161
 
13159
13162
  // src/build/buildAngularVendor.ts
@@ -19345,5 +19348,5 @@ export {
19345
19348
  build
19346
19349
  };
19347
19350
 
19348
- //# debugId=4D4396D799FC767D64756E2164756E21
19351
+ //# debugId=D939AECE9DBFA2CD64756E2164756E21
19349
19352
  //# sourceMappingURL=build.js.map