@absolutejs/absolute 0.19.0-beta.410 → 0.19.0-beta.412

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,18 +1,24 @@
1
- import { Component, ElementRef, Input, inject, signal } from '@angular/core';
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Input, NgZone, inject, signal } from '@angular/core';
2
2
  import { DomSanitizer } from '@angular/platform-browser';
3
3
  import { registerStreamingSlot } from './core/streamingSlotRegistrar.js';
4
4
  import * as i0 from "@angular/core";
5
5
  const SLOT_PATCH_EVENT = 'absolutejs:slot-patch';
6
6
  export class StreamSlotComponent {
7
7
  constructor() {
8
+ this.cdr = inject(ChangeDetectorRef);
8
9
  this.sanitizer = inject(DomSanitizer);
9
10
  this.hostElement = inject((ElementRef));
11
+ this.zone = inject(NgZone);
10
12
  this.patchListener = (event) => {
11
13
  const detail = event.detail;
12
14
  if (!detail || detail.id !== this.id || typeof detail.html !== 'string') {
13
15
  return;
14
16
  }
15
- this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(detail.html));
17
+ const nextHtml = detail.html;
18
+ this.zone.run(() => {
19
+ this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(nextHtml));
20
+ this.cdr.markForCheck();
21
+ });
16
22
  };
17
23
  this.fallbackHtml = '';
18
24
  this.currentHtml = signal('', ...(ngDevMode ? [{ debugName: "currentHtml" }] : /* istanbul ignore next */ []));
@@ -37,6 +43,7 @@ export class StreamSlotComponent {
37
43
  const existingHtml = slotElement?.innerHTML;
38
44
  if (existingHtml && existingHtml !== this.fallbackHtml) {
39
45
  this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(existingHtml));
46
+ this.cdr.markForCheck();
40
47
  }
41
48
  }
42
49
  ngOnDestroy() {
@@ -50,14 +57,14 @@ export class StreamSlotComponent {
50
57
  [attr.id]="'slot-' + id"
51
58
  [attr.class]="className"
52
59
  data-absolute-slot="true"
53
- ngSkipHydration
54
60
  [innerHTML]="currentHtml()"
55
61
  ></div>
56
- `, isInline: true }); }
62
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
57
63
  }
58
64
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: StreamSlotComponent, decorators: [{
59
65
  type: Component,
60
66
  args: [{
67
+ changeDetection: ChangeDetectionStrategy.OnPush,
61
68
  selector: 'abs-stream-slot',
62
69
  standalone: true,
63
70
  template: `
@@ -65,7 +72,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
65
72
  [attr.id]="'slot-' + id"
66
73
  [attr.class]="className"
67
74
  data-absolute-slot="true"
68
- ngSkipHydration
69
75
  [innerHTML]="currentHtml()"
70
76
  ></div>
71
77
  `
@@ -169160,7 +169160,7 @@ ${registrations}
169160
169160
  ({ tsLibDir } = cached);
169161
169161
  cached.lastUsed = Date.now();
169162
169162
  } else {
169163
- const tsPath = __require.resolve("typescript");
169163
+ const tsPath = __require.resolve("/home/alexkahn/abs/absolutejs/node_modules/typescript/lib/typescript.js");
169164
169164
  const tsRootDir = dirname(tsPath);
169165
169165
  tsLibDir = tsRootDir.endsWith("lib") ? tsRootDir : resolve(tsRootDir, "lib");
169166
169166
  const config = readConfiguration("./tsconfig.json");
@@ -181372,9 +181372,12 @@ import { Component as Component3, computed, input } from "@angular/core";
181372
181372
 
181373
181373
  // src/angular/components/stream-slot.component.ts
181374
181374
  import {
181375
+ ChangeDetectionStrategy,
181376
+ ChangeDetectorRef,
181375
181377
  Component as Component2,
181376
181378
  ElementRef,
181377
181379
  Input as Input2,
181380
+ NgZone,
181378
181381
  inject,
181379
181382
  signal
181380
181383
  } from "@angular/core";
@@ -181385,14 +181388,20 @@ class StreamSlotComponent {
181385
181388
  constructor() {
181386
181389
  this.fallbackHtml = "";
181387
181390
  }
181391
+ cdr = inject(ChangeDetectorRef);
181388
181392
  sanitizer = inject(DomSanitizer);
181389
181393
  hostElement = inject(ElementRef);
181394
+ zone = inject(NgZone);
181390
181395
  patchListener = (event) => {
181391
181396
  const detail = event.detail;
181392
181397
  if (!detail || detail.id !== this.id || typeof detail.html !== "string") {
181393
181398
  return;
181394
181399
  }
181395
- this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(detail.html));
181400
+ const nextHtml = detail.html;
181401
+ this.zone.run(() => {
181402
+ this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(nextHtml));
181403
+ this.cdr.markForCheck();
181404
+ });
181396
181405
  };
181397
181406
  currentHtml = signal("");
181398
181407
  ngOnInit() {
@@ -181415,6 +181424,7 @@ class StreamSlotComponent {
181415
181424
  const existingHtml = slotElement?.innerHTML;
181416
181425
  if (existingHtml && existingHtml !== this.fallbackHtml) {
181417
181426
  this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(existingHtml));
181427
+ this.cdr.markForCheck();
181418
181428
  }
181419
181429
  }
181420
181430
  ngOnDestroy() {
@@ -181449,6 +181459,7 @@ __legacyDecorateClassTS([
181449
181459
  ], StreamSlotComponent.prototype, "timeoutMs", undefined);
181450
181460
  StreamSlotComponent = __legacyDecorateClassTS([
181451
181461
  Component2({
181462
+ changeDetection: ChangeDetectionStrategy.OnPush,
181452
181463
  selector: "abs-stream-slot",
181453
181464
  standalone: true,
181454
181465
  template: `
@@ -181456,7 +181467,6 @@ StreamSlotComponent = __legacyDecorateClassTS([
181456
181467
  [attr.id]="'slot-' + id"
181457
181468
  [attr.class]="className"
181458
181469
  data-absolute-slot="true"
181459
- ngSkipHydration
181460
181470
  [innerHTML]="currentHtml()"
181461
181471
  ></div>
181462
181472
  `
@@ -181657,5 +181667,5 @@ export {
181657
181667
  DeferSlotComponent
181658
181668
  };
181659
181669
 
181660
- //# debugId=372A44A54775508664756E2164756E21
181670
+ //# debugId=69C195A7E1EB7A6764756E2164756E21
181661
181671
  //# sourceMappingURL=index.js.map