@absolutejs/absolute 0.19.0-beta.853 → 0.19.0-beta.855

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.
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  var __require = import.meta.require;
3
3
 
4
- // .angular-partial-tmp-pvZpZk/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-WCxiat/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-pvZpZk/src/core/streamingSlotRegistrar.ts
4
+ // .angular-partial-tmp-WCxiat/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-pvZpZk/src/core/streamingSlotRegistry.ts
51
+ // .angular-partial-tmp-WCxiat/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";
@@ -3506,26 +3506,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
3506
3506
  if (existsSync4(fromNodeModules))
3507
3507
  return fromNodeModules;
3508
3508
  return resolve5(import.meta.dir, "./dev/client");
3509
- }, devClientDir, hmrClientPath, hmrRuntimePath, injectHMRRegistration = (content, sourceId) => {
3510
- const entityClassRegex = /(?:export\s+)?class\s+(\w+(?:Component|Service|Directive|Pipe))\s/g;
3511
- const entityNames = [];
3512
- let match;
3513
- while ((match = entityClassRegex.exec(content)) !== null) {
3514
- if (match[1])
3515
- entityNames.push(match[1]);
3516
- }
3517
- if (entityNames.length === 0)
3518
- return content;
3519
- const registrations = entityNames.map((name) => ` if (typeof ${name} === 'function') window.__ANGULAR_HMR__.register('${sourceId}#${name}', ${name});`).join(`
3520
- `);
3521
- const hmrBlock = `
3522
- // Angular HMR Runtime Layer (Level 3) \u2014 Auto-registration
3523
- if (typeof window !== 'undefined' && window.__ANGULAR_HMR__) {
3524
- ${registrations}
3525
- }
3526
- `;
3527
- return content + hmrBlock;
3528
- }, formatDiagnosticMessage = (diagnostic) => {
3509
+ }, devClientDir, hmrClientPath, formatDiagnosticMessage = (diagnostic) => {
3529
3510
  try {
3530
3511
  return ts.flattenDiagnosticMessageText(diagnostic.messageText, `
3531
3512
  `);
@@ -4348,14 +4329,10 @@ export default ${componentClassName};
4348
4329
  export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
4349
4330
  `;
4350
4331
  }
4351
- if (hmr) {
4352
- rewritten = injectHMRRegistration(rewritten, resolvedEntry);
4353
- }
4354
4332
  await traceAngularPhase("wrapper/write-server-output", () => fs.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
4355
4333
  const relativePath = relative3(indexesDir, rawServerFile).replace(/\\/g, "/");
4356
4334
  const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
4357
4335
  const hmrPreamble = hmr ? `window.__HMR_FRAMEWORK__ = "angular";
4358
- import "${hmrRuntimePath}";
4359
4336
  import "${hmrClientPath}";
4360
4337
  ` : "";
4361
4338
  const hydration = hmr ? `${hmrPreamble}
@@ -4397,68 +4374,66 @@ var absoluteHttpTransferCacheOptions = {
4397
4374
  }
4398
4375
  };
4399
4376
 
4400
- // Re-export the page module so HMR fast-patch (in handlers/angular.ts) can
4401
- // dynamically import this chunk and discover the freshly-built component
4402
- // classes without needing a separate build artifact.
4403
- 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
+ };
4404
4397
 
4405
- // Record this evaluation's \`routes\` and \`providers\` exports for the
4406
- // HMR fast-patch to compare against on the next reload. If they change
4407
- // (a new route was added, a provider was edited), fast-patch falls back
4408
- // to a full re-bootstrap because those values are consumed once at
4409
- // bootstrap and won't propagate to the running router/injector via an
4410
- // in-place component patch.
4411
- if (typeof window !== 'undefined' && window.__ANGULAR_HMR__ && typeof window.__ANGULAR_HMR__.recordPageExports === 'function') {
4412
- var __abs_hmr_routes = Reflect.get(pageModule, 'routes');
4413
- 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;
4414
4401
  }
4415
4402
 
4416
- // Re-Bootstrap HMR with View Transitions API.
4417
- // Skipped during fast-patch: the HMR client sets
4418
- // window.__ANGULAR_HMR_FAST_PATCH__ = true before \`import()\`-ing this
4419
- // chunk so it can read the new component classes via \`export *\` above
4420
- // without destroying the running app.
4421
- if (!window.__ANGULAR_HMR_FAST_PATCH__) {
4422
- if (window.__ANGULAR_APP__) {
4423
- try { window.__ANGULAR_APP__.destroy(); } catch (_err) { /* ignore */ }
4424
- window.__ANGULAR_APP__ = null;
4425
- }
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
+ }
4426
4408
 
4427
- // Ensure root element exists after destroy (Angular removes it)
4428
- var _sel = ${componentClassName}.\u0275cmp?.selectors?.[0]?.[0] || 'ng-app';
4429
- if (!document.querySelector(_sel)) {
4430
- (document.getElementById('root') || document.body).appendChild(document.createElement(_sel));
4431
- }
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;
4432
4417
 
4433
- var providers = [provideZonelessChangeDetection()];
4434
- if (!window.__HMR_SKIP_HYDRATION__ && !pageHasIslands) {
4435
- 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
+ });
4436
4424
  }
4437
- delete window.__HMR_SKIP_HYDRATION__;
4438
- providers.push.apply(providers, pageProviders);
4439
- providers.push.apply(providers, propProviders);
4440
- window.__ABS_SLOT_HYDRATION_PENDING__ = pageHasRawStreamingSlots;
4441
-
4442
- if (pageHasRawStreamingSlots) {
4425
+ } else {
4426
+ bootstrapApplication(${componentClassName}, {
4427
+ providers: providers
4428
+ }).then(function (appRef) {
4429
+ window.__ANGULAR_APP__ = appRef;
4443
4430
  window.__ABS_SLOT_HYDRATION_PENDING__ = false;
4444
4431
  if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {
4445
4432
  requestAnimationFrame(function() {
4446
4433
  window.__ABS_SLOT_FLUSH__();
4447
4434
  });
4448
4435
  }
4449
- } else {
4450
- bootstrapApplication(${componentClassName}, {
4451
- providers: providers
4452
- }).then(function (appRef) {
4453
- window.__ANGULAR_APP__ = appRef;
4454
- window.__ABS_SLOT_HYDRATION_PENDING__ = false;
4455
- if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {
4456
- requestAnimationFrame(function() {
4457
- window.__ABS_SLOT_FLUSH__();
4458
- });
4459
- }
4460
- });
4461
- }
4436
+ });
4462
4437
  }
4463
4438
  `.trim() : `
4464
4439
  import '@angular/compiler';
@@ -4560,7 +4535,6 @@ var init_compileAngular = __esm(() => {
4560
4535
  init_generatedDir();
4561
4536
  devClientDir = resolveDevClientDir();
4562
4537
  hmrClientPath = join6(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
4563
- hmrRuntimePath = join6(devClientDir, "handlers", "angularRuntime.ts").replace(/\\/g, "/");
4564
4538
  jitContentCache = new Map;
4565
4539
  wrapperOutputCache = new Map;
4566
4540
  });
@@ -15047,5 +15021,5 @@ export {
15047
15021
  ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
15048
15022
  };
15049
15023
 
15050
- //# debugId=7EBB82784475E43F64756E2164756E21
15024
+ //# debugId=318E5CC16B03F9DE64756E2164756E21
15051
15025
  //# sourceMappingURL=index.js.map