@absolutejs/absolute 0.19.0-beta.852 → 0.19.0-beta.854

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.
Files changed (44) hide show
  1. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  2. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  3. package/dist/angular/index.js +52 -76
  4. package/dist/angular/index.js.map +3 -3
  5. package/dist/angular/server.js +53 -77
  6. package/dist/angular/server.js.map +3 -3
  7. package/dist/build.js +2129 -730
  8. package/dist/build.js.map +17 -8
  9. package/dist/dev/client/handlers/angularHmrShim.ts +77 -0
  10. package/dist/dev/client/hmrClient.ts +55 -5
  11. package/dist/index.js +2219 -778
  12. package/dist/index.js.map +18 -9
  13. package/dist/react/index.js +3 -1
  14. package/dist/react/index.js.map +2 -2
  15. package/dist/react/server.js +3 -1
  16. package/dist/react/server.js.map +2 -2
  17. package/dist/src/core/prepare.d.ts +25 -0
  18. package/dist/src/dev/angular/fastHmrCompiler.d.ts +32 -0
  19. package/dist/src/dev/angular/hmrCompiler.d.ts +18 -0
  20. package/dist/src/dev/angular/hmrImportGenerator.d.ts +3 -0
  21. package/dist/src/dev/angular/hmrInjectionPlugin.d.ts +7 -0
  22. package/dist/src/dev/angular/resolveOwningComponents.d.ts +8 -0
  23. package/dist/src/dev/angular/vendor/translator/api/ast_factory.d.ts +363 -0
  24. package/dist/src/dev/angular/vendor/translator/api/import_generator.d.ts +49 -0
  25. package/dist/src/dev/angular/vendor/translator/context.d.ts +18 -0
  26. package/dist/src/dev/angular/vendor/translator/translator.d.ts +75 -0
  27. package/dist/src/dev/angular/vendor/translator/ts_util.d.ts +12 -0
  28. package/dist/src/dev/angular/vendor/translator/typescript_ast_factory.d.ts +66 -0
  29. package/dist/src/dev/angular/vendor/translator/typescript_translator.d.ts +13 -0
  30. package/dist/src/dev/rebuildTrigger.d.ts +1 -0
  31. package/dist/src/plugins/hmr.d.ts +25 -0
  32. package/dist/src/vue/components/Image.d.ts +1 -1
  33. package/dist/svelte/index.js +3 -1
  34. package/dist/svelte/index.js.map +2 -2
  35. package/dist/svelte/server.js +3 -1
  36. package/dist/svelte/server.js.map +2 -2
  37. package/dist/vue/index.js +3 -1
  38. package/dist/vue/index.js.map +2 -2
  39. package/dist/vue/server.js +3 -1
  40. package/dist/vue/server.js.map +2 -2
  41. package/package.json +1 -1
  42. package/dist/dev/client/handlers/angular.ts +0 -684
  43. package/dist/dev/client/handlers/angularRuntime.ts +0 -415
  44. package/dist/src/dev/angular/editTypeDetection.d.ts +0 -8
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-FGqhVS/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-Z1uJ5x/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-FGqhVS/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-Z1uJ5x/src/core/streamingSlotRegistrar.ts
5
5
  var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
6
6
  var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
7
7
  var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
48
48
  getWarningController()?.maybeWarn(primitiveName);
49
49
  };
50
50
 
51
- // .angular-partial-tmp-FGqhVS/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-Z1uJ5x/src/core/streamingSlotRegistry.ts
52
52
  var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
53
53
  var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
54
54
  var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
@@ -2769,6 +2769,8 @@ var colors2, frameworkColors, formatPath = (filePath) => {
2769
2769
  console.error(`${timestamp} ${tag} ${fullMessage}`);
2770
2770
  }, logHmrUpdate = (path, framework, duration) => {
2771
2771
  log("hmr update", { duration, framework, path });
2772
+ }, logInfo = (message) => {
2773
+ log(message);
2772
2774
  }, logScriptUpdate = (path, framework, duration) => {
2773
2775
  log("script update", { duration, framework, path });
2774
2776
  }, logServerReload = () => {
@@ -3504,26 +3506,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
3504
3506
  if (existsSync4(fromNodeModules))
3505
3507
  return fromNodeModules;
3506
3508
  return resolve5(import.meta.dir, "./dev/client");
3507
- }, devClientDir, hmrClientPath, hmrRuntimePath, injectHMRRegistration = (content, sourceId) => {
3508
- const entityClassRegex = /(?:export\s+)?class\s+(\w+(?:Component|Service|Directive|Pipe))\s/g;
3509
- const entityNames = [];
3510
- let match;
3511
- while ((match = entityClassRegex.exec(content)) !== null) {
3512
- if (match[1])
3513
- entityNames.push(match[1]);
3514
- }
3515
- if (entityNames.length === 0)
3516
- return content;
3517
- const registrations = entityNames.map((name) => ` if (typeof ${name} === 'function') window.__ANGULAR_HMR__.register('${sourceId}#${name}', ${name});`).join(`
3518
- `);
3519
- const hmrBlock = `
3520
- // Angular HMR Runtime Layer (Level 3) \u2014 Auto-registration
3521
- if (typeof window !== 'undefined' && window.__ANGULAR_HMR__) {
3522
- ${registrations}
3523
- }
3524
- `;
3525
- return content + hmrBlock;
3526
- }, formatDiagnosticMessage = (diagnostic) => {
3509
+ }, devClientDir, hmrClientPath, formatDiagnosticMessage = (diagnostic) => {
3527
3510
  try {
3528
3511
  return ts.flattenDiagnosticMessageText(diagnostic.messageText, `
3529
3512
  `);
@@ -4346,14 +4329,10 @@ export default ${componentClassName};
4346
4329
  export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4347
4330
  `;
4348
4331
  }
4349
- if (hmr) {
4350
- rewritten = injectHMRRegistration(rewritten, resolvedEntry);
4351
- }
4352
4332
  await traceAngularPhase("wrapper/write-server-output", () => fs.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
4353
4333
  const relativePath = relative3(indexesDir, rawServerFile).replace(/\\/g, "/");
4354
4334
  const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
4355
4335
  const hmrPreamble = hmr ? `window.__HMR_FRAMEWORK__ = "angular";
4356
- import "${hmrRuntimePath}";
4357
4336
  import "${hmrClientPath}";
4358
4337
  ` : "";
4359
4338
  const hydration = hmr ? `${hmrPreamble}
@@ -4395,68 +4374,66 @@ var absoluteHttpTransferCacheOptions = {
4395
4374
  }
4396
4375
  };
4397
4376
 
4398
- // Re-export the page module so HMR fast-patch (in handlers/angular.ts) can
4399
- // dynamically import this chunk and discover the freshly-built component
4400
- // classes without needing a separate build artifact.
4401
- export * from '${normalizedImportPath}';
4377
+ // SURGICAL_HMR Tier 1 \u2014 Re-bootstrap hook. The dev client invokes
4378
+ // \`window.__ABS_ANGULAR_REBOOTSTRAP__()\` when it receives an
4379
+ // \`angular:rebootstrap\` WS message; the hook looks up this page's
4380
+ // freshly-built bundle URL (the rebuild already broadcast its
4381
+ // updated manifest, so window.__HMR_MANIFEST__ is current) and
4382
+ // dynamic-imports it. Re-importing the chunk re-runs the
4383
+ // destroy+bootstrap block below \u2014 no special path needed because
4384
+ // chunk eval is the bootstrap.
4385
+ window.__ABS_ANGULAR_PAGE_BUNDLE_ID__ = '${toPascal(fileBase)}Index';
4386
+ window.__ABS_ANGULAR_REBOOTSTRAP__ = async function() {
4387
+ var id = window.__ABS_ANGULAR_PAGE_BUNDLE_ID__;
4388
+ var manifest = window.__HMR_MANIFEST__ || {};
4389
+ var newUrl = manifest[id];
4390
+ if (!newUrl) {
4391
+ console.warn('[absolutejs] no bundle URL in manifest for', id, '\u2014 full reload');
4392
+ window.location.reload();
4393
+ return;
4394
+ }
4395
+ await import(newUrl + '?t=' + Date.now());
4396
+ };
4402
4397
 
4403
- // Record this evaluation's \`routes\` and \`providers\` exports for the
4404
- // HMR fast-patch to compare against on the next reload. If they change
4405
- // (a new route was added, a provider was edited), fast-patch falls back
4406
- // to a full re-bootstrap because those values are consumed once at
4407
- // bootstrap and won't propagate to the running router/injector via an
4408
- // in-place component patch.
4409
- if (typeof window !== 'undefined' && window.__ANGULAR_HMR__ && typeof window.__ANGULAR_HMR__.recordPageExports === 'function') {
4410
- var __abs_hmr_routes = Reflect.get(pageModule, 'routes');
4411
- window.__ANGULAR_HMR__.recordPageExports('${resolvedEntry}', __abs_hmr_routes, maybePageProviders);
4398
+ if (window.__ANGULAR_APP__) {
4399
+ try { window.__ANGULAR_APP__.destroy(); } catch (_err) { /* ignore */ }
4400
+ window.__ANGULAR_APP__ = null;
4412
4401
  }
4413
4402
 
4414
- // Re-Bootstrap HMR with View Transitions API.
4415
- // Skipped during fast-patch: the HMR client sets
4416
- // window.__ANGULAR_HMR_FAST_PATCH__ = true before \`import()\`-ing this
4417
- // chunk so it can read the new component classes via \`export *\` above
4418
- // without destroying the running app.
4419
- if (!window.__ANGULAR_HMR_FAST_PATCH__) {
4420
- if (window.__ANGULAR_APP__) {
4421
- try { window.__ANGULAR_APP__.destroy(); } catch (_err) { /* ignore */ }
4422
- window.__ANGULAR_APP__ = null;
4423
- }
4403
+ // Ensure root element exists after destroy (Angular removes it)
4404
+ var _sel = ${componentClassName}.\u0275cmp?.selectors?.[0]?.[0] || 'ng-app';
4405
+ if (!document.querySelector(_sel)) {
4406
+ (document.getElementById('root') || document.body).appendChild(document.createElement(_sel));
4407
+ }
4424
4408
 
4425
- // Ensure root element exists after destroy (Angular removes it)
4426
- var _sel = ${componentClassName}.\u0275cmp?.selectors?.[0]?.[0] || 'ng-app';
4427
- if (!document.querySelector(_sel)) {
4428
- (document.getElementById('root') || document.body).appendChild(document.createElement(_sel));
4429
- }
4409
+ var providers = [provideZonelessChangeDetection()];
4410
+ if (!window.__HMR_SKIP_HYDRATION__ && !pageHasIslands) {
4411
+ providers.push(provideClientHydration(withHttpTransferCacheOptions(absoluteHttpTransferCacheOptions)));
4412
+ }
4413
+ delete window.__HMR_SKIP_HYDRATION__;
4414
+ providers.push.apply(providers, pageProviders);
4415
+ providers.push.apply(providers, propProviders);
4416
+ window.__ABS_SLOT_HYDRATION_PENDING__ = pageHasRawStreamingSlots;
4430
4417
 
4431
- var providers = [provideZonelessChangeDetection()];
4432
- if (!window.__HMR_SKIP_HYDRATION__ && !pageHasIslands) {
4433
- providers.push(provideClientHydration(withHttpTransferCacheOptions(absoluteHttpTransferCacheOptions)));
4418
+ if (pageHasRawStreamingSlots) {
4419
+ window.__ABS_SLOT_HYDRATION_PENDING__ = false;
4420
+ if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {
4421
+ requestAnimationFrame(function() {
4422
+ window.__ABS_SLOT_FLUSH__();
4423
+ });
4434
4424
  }
4435
- delete window.__HMR_SKIP_HYDRATION__;
4436
- providers.push.apply(providers, pageProviders);
4437
- providers.push.apply(providers, propProviders);
4438
- window.__ABS_SLOT_HYDRATION_PENDING__ = pageHasRawStreamingSlots;
4439
-
4440
- if (pageHasRawStreamingSlots) {
4425
+ } else {
4426
+ bootstrapApplication(${componentClassName}, {
4427
+ providers: providers
4428
+ }).then(function (appRef) {
4429
+ window.__ANGULAR_APP__ = appRef;
4441
4430
  window.__ABS_SLOT_HYDRATION_PENDING__ = false;
4442
4431
  if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {
4443
4432
  requestAnimationFrame(function() {
4444
4433
  window.__ABS_SLOT_FLUSH__();
4445
4434
  });
4446
4435
  }
4447
- } else {
4448
- bootstrapApplication(${componentClassName}, {
4449
- providers: providers
4450
- }).then(function (appRef) {
4451
- window.__ANGULAR_APP__ = appRef;
4452
- window.__ABS_SLOT_HYDRATION_PENDING__ = false;
4453
- if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {
4454
- requestAnimationFrame(function() {
4455
- window.__ABS_SLOT_FLUSH__();
4456
- });
4457
- }
4458
- });
4459
- }
4436
+ });
4460
4437
  }
4461
4438
  `.trim() : `
4462
4439
  import '@angular/compiler';
@@ -4558,7 +4535,6 @@ var init_compileAngular = __esm(() => {
4558
4535
  init_generatedDir();
4559
4536
  devClientDir = resolveDevClientDir();
4560
4537
  hmrClientPath = join6(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
4561
- hmrRuntimePath = join6(devClientDir, "handlers", "angularRuntime.ts").replace(/\\/g, "/");
4562
4538
  jitContentCache = new Map;
4563
4539
  wrapperOutputCache = new Map;
4564
4540
  });
@@ -15045,5 +15021,5 @@ export {
15045
15021
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
15046
15022
  };
15047
15023
 
15048
- //# debugId=BCDBB77EEE4BE49164756E2164756E21
15024
+ //# debugId=318E5CC16B03F9DE64756E2164756E21
15049
15025
  //# sourceMappingURL=index.js.map