@absolutejs/absolute 0.19.0-beta.414 → 0.19.0-beta.415
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/angular/browser.js +14 -27
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/stream-slot.component.js +16 -28
- package/dist/angular/index.js +24 -27
- package/dist/angular/index.js.map +4 -4
- package/dist/client/index.js +11 -1
- package/dist/client/index.js.map +3 -3
- package/dist/index.js +11 -1
- package/dist/index.js.map +3 -3
- package/dist/react/index.js +11 -1
- package/dist/react/index.js.map +3 -3
- package/dist/src/angular/components/stream-slot.component.d.ts +1 -3
- package/dist/src/client/streamSwap.d.ts +1 -0
- package/dist/svelte/index.js +11 -1
- package/dist/svelte/index.js.map +3 -3
- package/dist/vue/index.js +11 -1
- package/dist/vue/index.js.map +3 -3
- package/package.json +1 -1
package/dist/angular/browser.js
CHANGED
|
@@ -9555,33 +9555,25 @@ import {
|
|
|
9555
9555
|
ChangeDetectionStrategy,
|
|
9556
9556
|
ChangeDetectorRef,
|
|
9557
9557
|
Component as Component2,
|
|
9558
|
-
ElementRef as ElementRef2,
|
|
9559
9558
|
Input as Input2,
|
|
9560
9559
|
NgZone,
|
|
9561
9560
|
inject,
|
|
9562
9561
|
signal
|
|
9563
9562
|
} from "@angular/core";
|
|
9564
9563
|
import { DomSanitizer } from "@angular/platform-browser";
|
|
9565
|
-
var SLOT_PATCH_EVENT = "absolutejs:slot-patch";
|
|
9566
|
-
|
|
9567
9564
|
class StreamSlotComponent {
|
|
9568
9565
|
constructor() {
|
|
9569
9566
|
this.fallbackHtml = "";
|
|
9570
9567
|
}
|
|
9571
9568
|
cdr = inject(ChangeDetectorRef);
|
|
9572
9569
|
sanitizer = inject(DomSanitizer);
|
|
9573
|
-
hostElement = inject(ElementRef2);
|
|
9574
9570
|
zone = inject(NgZone);
|
|
9575
|
-
|
|
9576
|
-
const detail = event.detail;
|
|
9577
|
-
if (!detail || detail.id !== this.id || typeof detail.html !== "string") {
|
|
9578
|
-
return;
|
|
9579
|
-
}
|
|
9580
|
-
const nextHtml = detail.html;
|
|
9571
|
+
slotConsumer = (html) => {
|
|
9581
9572
|
this.zone.run(() => {
|
|
9582
|
-
this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(
|
|
9573
|
+
this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(html));
|
|
9583
9574
|
this.cdr.markForCheck();
|
|
9584
9575
|
});
|
|
9576
|
+
return true;
|
|
9585
9577
|
};
|
|
9586
9578
|
currentHtml = signal("");
|
|
9587
9579
|
ngOnInit() {
|
|
@@ -9596,27 +9588,25 @@ class StreamSlotComponent {
|
|
|
9596
9588
|
});
|
|
9597
9589
|
return;
|
|
9598
9590
|
}
|
|
9599
|
-
|
|
9600
|
-
this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(existingHtml && existingHtml.length > 0 ? existingHtml : this.fallbackHtml));
|
|
9591
|
+
this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(this.fallbackHtml));
|
|
9601
9592
|
}
|
|
9602
9593
|
ngAfterViewInit() {
|
|
9603
9594
|
if (typeof window === "undefined")
|
|
9604
9595
|
return;
|
|
9605
|
-
window.
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
this.
|
|
9596
|
+
const consumers = window.__ABS_SLOT_CONSUMERS__ = window.__ABS_SLOT_CONSUMERS__ ?? {};
|
|
9597
|
+
consumers[this.id] = this.slotConsumer;
|
|
9598
|
+
const pendingHtml = window.__ABS_SLOT_PENDING__?.[this.id];
|
|
9599
|
+
if (typeof pendingHtml === "string") {
|
|
9600
|
+
this.slotConsumer(pendingHtml);
|
|
9601
|
+
delete window.__ABS_SLOT_PENDING__?.[this.id];
|
|
9610
9602
|
}
|
|
9611
9603
|
}
|
|
9612
9604
|
ngOnDestroy() {
|
|
9613
9605
|
if (typeof window === "undefined")
|
|
9614
9606
|
return;
|
|
9615
|
-
window.
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
const slotElement = this.hostElement.nativeElement.querySelector(`#slot-${this.id}`);
|
|
9619
|
-
return slotElement?.innerHTML ?? "";
|
|
9607
|
+
if (window.__ABS_SLOT_CONSUMERS__) {
|
|
9608
|
+
delete window.__ABS_SLOT_CONSUMERS__[this.id];
|
|
9609
|
+
}
|
|
9620
9610
|
}
|
|
9621
9611
|
}
|
|
9622
9612
|
__legacyDecorateClassTS([
|
|
@@ -9645,9 +9635,6 @@ __legacyDecorateClassTS([
|
|
|
9645
9635
|
], StreamSlotComponent.prototype, "timeoutMs", undefined);
|
|
9646
9636
|
StreamSlotComponent = __legacyDecorateClassTS([
|
|
9647
9637
|
Component2({
|
|
9648
|
-
host: {
|
|
9649
|
-
ngSkipHydration: "true"
|
|
9650
|
-
},
|
|
9651
9638
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9652
9639
|
selector: "abs-stream-slot",
|
|
9653
9640
|
standalone: true,
|
|
@@ -9856,5 +9843,5 @@ export {
|
|
|
9856
9843
|
DeferSlotComponent
|
|
9857
9844
|
};
|
|
9858
9845
|
|
|
9859
|
-
//# debugId=
|
|
9846
|
+
//# debugId=EF8B0D441AD9D61C64756E2164756E21
|
|
9860
9847
|
//# sourceMappingURL=browser.js.map
|