@absolutejs/absolute 0.19.0-beta.414 → 0.19.0-beta.416
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 -31
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/stream-slot.component.js +16 -32
- package/dist/angular/index.js +24 -31
- 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 +3 -6
- 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,21 @@ class StreamSlotComponent {
|
|
|
9596
9588
|
});
|
|
9597
9589
|
return;
|
|
9598
9590
|
}
|
|
9599
|
-
const
|
|
9600
|
-
this.
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
if (typeof
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
const existingHtml = this.readSlotHtml();
|
|
9607
|
-
if (existingHtml && existingHtml !== this.fallbackHtml) {
|
|
9608
|
-
this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(existingHtml));
|
|
9609
|
-
this.cdr.markForCheck();
|
|
9591
|
+
const consumers = window.__ABS_SLOT_CONSUMERS__ = window.__ABS_SLOT_CONSUMERS__ ?? {};
|
|
9592
|
+
consumers[this.id] = this.slotConsumer;
|
|
9593
|
+
this.currentHtml.set(this.sanitizer.bypassSecurityTrustHtml(this.fallbackHtml));
|
|
9594
|
+
const pendingHtml = window.__ABS_SLOT_PENDING__?.[this.id];
|
|
9595
|
+
if (typeof pendingHtml === "string") {
|
|
9596
|
+
this.slotConsumer(pendingHtml);
|
|
9597
|
+
delete window.__ABS_SLOT_PENDING__?.[this.id];
|
|
9610
9598
|
}
|
|
9611
9599
|
}
|
|
9612
9600
|
ngOnDestroy() {
|
|
9613
9601
|
if (typeof window === "undefined")
|
|
9614
9602
|
return;
|
|
9615
|
-
window.
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
const slotElement = this.hostElement.nativeElement.querySelector(`#slot-${this.id}`);
|
|
9619
|
-
return slotElement?.innerHTML ?? "";
|
|
9603
|
+
if (window.__ABS_SLOT_CONSUMERS__) {
|
|
9604
|
+
delete window.__ABS_SLOT_CONSUMERS__[this.id];
|
|
9605
|
+
}
|
|
9620
9606
|
}
|
|
9621
9607
|
}
|
|
9622
9608
|
__legacyDecorateClassTS([
|
|
@@ -9645,9 +9631,6 @@ __legacyDecorateClassTS([
|
|
|
9645
9631
|
], StreamSlotComponent.prototype, "timeoutMs", undefined);
|
|
9646
9632
|
StreamSlotComponent = __legacyDecorateClassTS([
|
|
9647
9633
|
Component2({
|
|
9648
|
-
host: {
|
|
9649
|
-
ngSkipHydration: "true"
|
|
9650
|
-
},
|
|
9651
9634
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9652
9635
|
selector: "abs-stream-slot",
|
|
9653
9636
|
standalone: true,
|
|
@@ -9856,5 +9839,5 @@ export {
|
|
|
9856
9839
|
DeferSlotComponent
|
|
9857
9840
|
};
|
|
9858
9841
|
|
|
9859
|
-
//# debugId=
|
|
9842
|
+
//# debugId=A491037FA344484C64756E2164756E21
|
|
9860
9843
|
//# sourceMappingURL=browser.js.map
|