@absolutejs/absolute 0.19.0-beta.325 → 0.19.0-beta.327
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 +106 -23
- package/dist/angular/browser.js.map +5 -4
- package/dist/client/index.js +96 -1
- package/dist/client/index.js.map +6 -4
- package/dist/react/browser.js +35 -2
- package/dist/react/browser.js.map +3 -3
- package/dist/src/client/preserveIslandMarkup.d.ts +2 -0
- package/dist/vue/browser.js +35 -2
- package/dist/vue/browser.js.map +3 -3
- package/dist/vue/index.js +35 -2
- package/dist/vue/index.js.map +3 -3
- package/package.json +1 -1
package/dist/angular/browser.js
CHANGED
|
@@ -37089,7 +37089,7 @@ var require_window = __commonJS((exports) => {
|
|
|
37089
37089
|
var OperatorSubscriber_1 = require_OperatorSubscriber();
|
|
37090
37090
|
var noop_1 = require_noop();
|
|
37091
37091
|
var innerFrom_1 = require_innerFrom();
|
|
37092
|
-
function
|
|
37092
|
+
function window2(windowBoundaries) {
|
|
37093
37093
|
return lift_1.operate(function(source, subscriber) {
|
|
37094
37094
|
var windowSubject = new Subject_1.Subject;
|
|
37095
37095
|
subscriber.next(windowSubject.asObservable());
|
|
@@ -37113,7 +37113,7 @@ var require_window = __commonJS((exports) => {
|
|
|
37113
37113
|
};
|
|
37114
37114
|
});
|
|
37115
37115
|
}
|
|
37116
|
-
exports.window =
|
|
37116
|
+
exports.window = window2;
|
|
37117
37117
|
});
|
|
37118
37118
|
|
|
37119
37119
|
// node_modules/rxjs/dist/cjs/internal/operators/windowCount.js
|
|
@@ -37218,8 +37218,8 @@ var require_windowTime = __commonJS((exports) => {
|
|
|
37218
37218
|
var windowRecords = [];
|
|
37219
37219
|
var restartOnClose = false;
|
|
37220
37220
|
var closeWindow = function(record) {
|
|
37221
|
-
var { window, subs } = record;
|
|
37222
|
-
|
|
37221
|
+
var { window: window2, subs } = record;
|
|
37222
|
+
window2.complete();
|
|
37223
37223
|
subs.unsubscribe();
|
|
37224
37224
|
arrRemove_1.arrRemove(windowRecords, record);
|
|
37225
37225
|
restartOnClose && startWindow();
|
|
@@ -37252,8 +37252,8 @@ var require_windowTime = __commonJS((exports) => {
|
|
|
37252
37252
|
};
|
|
37253
37253
|
var terminate = function(cb) {
|
|
37254
37254
|
loop(function(_a2) {
|
|
37255
|
-
var
|
|
37256
|
-
return cb(
|
|
37255
|
+
var window2 = _a2.window;
|
|
37256
|
+
return cb(window2);
|
|
37257
37257
|
});
|
|
37258
37258
|
cb(subscriber);
|
|
37259
37259
|
subscriber.unsubscribe();
|
|
@@ -37315,12 +37315,12 @@ var require_windowToggle = __commonJS((exports) => {
|
|
|
37315
37315
|
subscriber.error(err);
|
|
37316
37316
|
};
|
|
37317
37317
|
innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(openValue) {
|
|
37318
|
-
var
|
|
37319
|
-
windows.push(
|
|
37318
|
+
var window2 = new Subject_1.Subject;
|
|
37319
|
+
windows.push(window2);
|
|
37320
37320
|
var closingSubscription = new Subscription_1.Subscription;
|
|
37321
37321
|
var closeWindow = function() {
|
|
37322
|
-
arrRemove_1.arrRemove(windows,
|
|
37323
|
-
|
|
37322
|
+
arrRemove_1.arrRemove(windows, window2);
|
|
37323
|
+
window2.complete();
|
|
37324
37324
|
closingSubscription.unsubscribe();
|
|
37325
37325
|
};
|
|
37326
37326
|
var closingNotifier;
|
|
@@ -37330,7 +37330,7 @@ var require_windowToggle = __commonJS((exports) => {
|
|
|
37330
37330
|
handleError(err);
|
|
37331
37331
|
return;
|
|
37332
37332
|
}
|
|
37333
|
-
subscriber.next(
|
|
37333
|
+
subscriber.next(window2.asObservable());
|
|
37334
37334
|
closingSubscription.add(closingNotifier.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, closeWindow, noop_1.noop, handleError)));
|
|
37335
37335
|
}, noop_1.noop));
|
|
37336
37336
|
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) {
|
|
@@ -37377,17 +37377,17 @@ var require_windowWhen = __commonJS((exports) => {
|
|
|
37377
37377
|
var innerFrom_1 = require_innerFrom();
|
|
37378
37378
|
function windowWhen(closingSelector) {
|
|
37379
37379
|
return lift_1.operate(function(source, subscriber) {
|
|
37380
|
-
var
|
|
37380
|
+
var window2;
|
|
37381
37381
|
var closingSubscriber;
|
|
37382
37382
|
var handleError = function(err) {
|
|
37383
|
-
|
|
37383
|
+
window2.error(err);
|
|
37384
37384
|
subscriber.error(err);
|
|
37385
37385
|
};
|
|
37386
37386
|
var openWindow = function() {
|
|
37387
37387
|
closingSubscriber === null || closingSubscriber === undefined || closingSubscriber.unsubscribe();
|
|
37388
|
-
|
|
37389
|
-
|
|
37390
|
-
subscriber.next(
|
|
37388
|
+
window2 === null || window2 === undefined || window2.complete();
|
|
37389
|
+
window2 = new Subject_1.Subject;
|
|
37390
|
+
subscriber.next(window2.asObservable());
|
|
37391
37391
|
var closingNotifier;
|
|
37392
37392
|
try {
|
|
37393
37393
|
closingNotifier = innerFrom_1.innerFrom(closingSelector());
|
|
@@ -37399,13 +37399,13 @@ var require_windowWhen = __commonJS((exports) => {
|
|
|
37399
37399
|
};
|
|
37400
37400
|
openWindow();
|
|
37401
37401
|
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) {
|
|
37402
|
-
return
|
|
37402
|
+
return window2.next(value);
|
|
37403
37403
|
}, function() {
|
|
37404
|
-
|
|
37404
|
+
window2.complete();
|
|
37405
37405
|
subscriber.complete();
|
|
37406
37406
|
}, handleError, function() {
|
|
37407
37407
|
closingSubscriber === null || closingSubscriber === undefined || closingSubscriber.unsubscribe();
|
|
37408
|
-
|
|
37408
|
+
window2 = null;
|
|
37409
37409
|
}));
|
|
37410
37410
|
});
|
|
37411
37411
|
}
|
|
@@ -38295,7 +38295,6 @@ var require_cjs = __commonJS((exports) => {
|
|
|
38295
38295
|
|
|
38296
38296
|
// src/angular/Island.browser.ts
|
|
38297
38297
|
init_compiler();
|
|
38298
|
-
init_islandMarkupAttributes();
|
|
38299
38298
|
import {
|
|
38300
38299
|
Component as Component3,
|
|
38301
38300
|
Input,
|
|
@@ -38304,6 +38303,88 @@ import {
|
|
|
38304
38303
|
import {
|
|
38305
38304
|
DomSanitizer
|
|
38306
38305
|
} from "@angular/platform-browser";
|
|
38306
|
+
|
|
38307
|
+
// src/client/preserveIslandMarkup.ts
|
|
38308
|
+
init_islandMarkupAttributes();
|
|
38309
|
+
var getClaimMap = () => {
|
|
38310
|
+
if (typeof window === "undefined") {
|
|
38311
|
+
return null;
|
|
38312
|
+
}
|
|
38313
|
+
window.__ABS_CLAIMED_ISLAND_MARKUP__ ??= new Map;
|
|
38314
|
+
return window.__ABS_CLAIMED_ISLAND_MARKUP__;
|
|
38315
|
+
};
|
|
38316
|
+
var getSnapshotMap = () => {
|
|
38317
|
+
if (typeof window === "undefined") {
|
|
38318
|
+
return null;
|
|
38319
|
+
}
|
|
38320
|
+
window.__ABS_SERVER_ISLAND_HTML__ ??= new Map;
|
|
38321
|
+
return window.__ABS_SERVER_ISLAND_HTML__;
|
|
38322
|
+
};
|
|
38323
|
+
var getIslandSignature = (props) => {
|
|
38324
|
+
const attributes = getIslandMarkerAttributes(props);
|
|
38325
|
+
return [
|
|
38326
|
+
attributes["data-component"],
|
|
38327
|
+
attributes["data-framework"],
|
|
38328
|
+
attributes["data-hydrate"],
|
|
38329
|
+
attributes["data-props"]
|
|
38330
|
+
].join("::");
|
|
38331
|
+
};
|
|
38332
|
+
var isMatchingIslandElement = (element2, props) => {
|
|
38333
|
+
if (!(element2 instanceof HTMLElement)) {
|
|
38334
|
+
return false;
|
|
38335
|
+
}
|
|
38336
|
+
const attributes = getIslandMarkerAttributes(props);
|
|
38337
|
+
return element2.dataset.island === "true" && element2.dataset.component === attributes["data-component"] && element2.dataset.framework === attributes["data-framework"] && (element2.dataset.hydrate ?? "load") === attributes["data-hydrate"] && (element2.dataset.props ?? "{}") === attributes["data-props"];
|
|
38338
|
+
};
|
|
38339
|
+
var initializeIslandMarkupSnapshot = () => {
|
|
38340
|
+
if (typeof document === "undefined") {
|
|
38341
|
+
return;
|
|
38342
|
+
}
|
|
38343
|
+
const snapshotMap = getSnapshotMap();
|
|
38344
|
+
if (!snapshotMap || snapshotMap.size > 0) {
|
|
38345
|
+
return;
|
|
38346
|
+
}
|
|
38347
|
+
const elements = Array.from(document.querySelectorAll('[data-island="true"]'));
|
|
38348
|
+
for (const element2 of elements) {
|
|
38349
|
+
if (!(element2 instanceof HTMLElement)) {
|
|
38350
|
+
continue;
|
|
38351
|
+
}
|
|
38352
|
+
const signature = [
|
|
38353
|
+
element2.dataset.component,
|
|
38354
|
+
element2.dataset.framework,
|
|
38355
|
+
element2.dataset.hydrate ?? "load",
|
|
38356
|
+
element2.dataset.props ?? "{}"
|
|
38357
|
+
].join("::");
|
|
38358
|
+
const existing = snapshotMap.get(signature) ?? [];
|
|
38359
|
+
existing.push(element2.innerHTML);
|
|
38360
|
+
snapshotMap.set(signature, existing);
|
|
38361
|
+
}
|
|
38362
|
+
};
|
|
38363
|
+
var preserveIslandMarkup = (props) => {
|
|
38364
|
+
if (typeof document === "undefined") {
|
|
38365
|
+
return {
|
|
38366
|
+
attributes: getIslandMarkerAttributes(props),
|
|
38367
|
+
innerHTML: ""
|
|
38368
|
+
};
|
|
38369
|
+
}
|
|
38370
|
+
const claimMap = getClaimMap();
|
|
38371
|
+
const snapshotMap = getSnapshotMap();
|
|
38372
|
+
const signature = getIslandSignature(props);
|
|
38373
|
+
const claimedCount = claimMap?.get(signature) ?? 0;
|
|
38374
|
+
const snapshotCandidate = snapshotMap?.get(signature)?.[claimedCount];
|
|
38375
|
+
const candidates = Array.from(document.querySelectorAll('[data-island="true"]')).filter((element2) => isMatchingIslandElement(element2, props));
|
|
38376
|
+
const candidate = candidates[claimedCount];
|
|
38377
|
+
if (claimMap) {
|
|
38378
|
+
claimMap.set(signature, claimedCount + 1);
|
|
38379
|
+
}
|
|
38380
|
+
return {
|
|
38381
|
+
attributes: getIslandMarkerAttributes(props),
|
|
38382
|
+
innerHTML: snapshotCandidate ?? candidate?.innerHTML ?? ""
|
|
38383
|
+
};
|
|
38384
|
+
};
|
|
38385
|
+
|
|
38386
|
+
// src/angular/Island.browser.ts
|
|
38387
|
+
init_islandMarkupAttributes();
|
|
38307
38388
|
var toAttributeString = (props) => serializeIslandAttributes(getIslandMarkerAttributes(props));
|
|
38308
38389
|
|
|
38309
38390
|
class IslandComponent {
|
|
@@ -38316,12 +38397,14 @@ class IslandComponent {
|
|
|
38316
38397
|
sanitizer = inject(DomSanitizer);
|
|
38317
38398
|
markup = "";
|
|
38318
38399
|
ngOnChanges() {
|
|
38319
|
-
|
|
38400
|
+
const runtimeProps = {
|
|
38320
38401
|
component: this.component,
|
|
38321
38402
|
framework: this.framework,
|
|
38322
38403
|
hydrate: this.hydrate,
|
|
38323
38404
|
props: this.props
|
|
38324
|
-
}
|
|
38405
|
+
};
|
|
38406
|
+
const { innerHTML } = preserveIslandMarkup(runtimeProps);
|
|
38407
|
+
this.markup = this.sanitizer.bypassSecurityTrustHtml(`<div ${toAttributeString(runtimeProps)}>${innerHTML}</div>`);
|
|
38325
38408
|
}
|
|
38326
38409
|
}
|
|
38327
38410
|
__legacyDecorateClassTS([
|
|
@@ -38471,5 +38554,5 @@ export {
|
|
|
38471
38554
|
Island
|
|
38472
38555
|
};
|
|
38473
38556
|
|
|
38474
|
-
//# debugId=
|
|
38557
|
+
//# debugId=BDD2A8F49709FCFA64756E2164756E21
|
|
38475
38558
|
//# sourceMappingURL=browser.js.map
|