@absolutejs/absolute 0.19.0-beta.325 → 0.19.0-beta.326

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.
@@ -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 window(windowBoundaries) {
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 = 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
- window.complete();
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 window = _a2.window;
37256
- return cb(window);
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 window = new Subject_1.Subject;
37319
- windows.push(window);
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, window);
37323
- window.complete();
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(window.asObservable());
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 window;
37380
+ var window2;
37381
37381
  var closingSubscriber;
37382
37382
  var handleError = function(err) {
37383
- window.error(err);
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
- window === null || window === undefined || window.complete();
37389
- window = new Subject_1.Subject;
37390
- subscriber.next(window.asObservable());
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 window.next(value);
37402
+ return window2.next(value);
37403
37403
  }, function() {
37404
- window.complete();
37404
+ window2.complete();
37405
37405
  subscriber.complete();
37406
37406
  }, handleError, function() {
37407
37407
  closingSubscriber === null || closingSubscriber === undefined || closingSubscriber.unsubscribe();
37408
- window = null;
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,55 @@ 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 getIslandSignature = (props) => {
38317
+ const attributes = getIslandMarkerAttributes(props);
38318
+ return [
38319
+ attributes["data-component"],
38320
+ attributes["data-framework"],
38321
+ attributes["data-hydrate"],
38322
+ attributes["data-props"]
38323
+ ].join("::");
38324
+ };
38325
+ var isMatchingIslandElement = (element2, props) => {
38326
+ if (!(element2 instanceof HTMLElement)) {
38327
+ return false;
38328
+ }
38329
+ const attributes = getIslandMarkerAttributes(props);
38330
+ 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"];
38331
+ };
38332
+ var preserveIslandMarkup = (props) => {
38333
+ if (typeof document === "undefined") {
38334
+ return {
38335
+ attributes: getIslandMarkerAttributes(props),
38336
+ innerHTML: ""
38337
+ };
38338
+ }
38339
+ const claimMap = getClaimMap();
38340
+ const signature = getIslandSignature(props);
38341
+ const claimedCount = claimMap?.get(signature) ?? 0;
38342
+ const candidates = Array.from(document.querySelectorAll('[data-island="true"]')).filter((element2) => isMatchingIslandElement(element2, props));
38343
+ const candidate = candidates[claimedCount];
38344
+ if (claimMap) {
38345
+ claimMap.set(signature, claimedCount + 1);
38346
+ }
38347
+ return {
38348
+ attributes: getIslandMarkerAttributes(props),
38349
+ innerHTML: candidate?.innerHTML ?? ""
38350
+ };
38351
+ };
38352
+
38353
+ // src/angular/Island.browser.ts
38354
+ init_islandMarkupAttributes();
38307
38355
  var toAttributeString = (props) => serializeIslandAttributes(getIslandMarkerAttributes(props));
38308
38356
 
38309
38357
  class IslandComponent {
@@ -38316,12 +38364,14 @@ class IslandComponent {
38316
38364
  sanitizer = inject(DomSanitizer);
38317
38365
  markup = "";
38318
38366
  ngOnChanges() {
38319
- this.markup = this.sanitizer.bypassSecurityTrustHtml(`<div ${toAttributeString({
38367
+ const runtimeProps = {
38320
38368
  component: this.component,
38321
38369
  framework: this.framework,
38322
38370
  hydrate: this.hydrate,
38323
38371
  props: this.props
38324
- })}></div>`);
38372
+ };
38373
+ const { innerHTML } = preserveIslandMarkup(runtimeProps);
38374
+ this.markup = this.sanitizer.bypassSecurityTrustHtml(`<div ${toAttributeString(runtimeProps)}>${innerHTML}</div>`);
38325
38375
  }
38326
38376
  }
38327
38377
  __legacyDecorateClassTS([
@@ -38471,5 +38521,5 @@ export {
38471
38521
  Island
38472
38522
  };
38473
38523
 
38474
- //# debugId=065196AB5D1B047D64756E2164756E21
38524
+ //# debugId=6EBF9C003A02044964756E2164756E21
38475
38525
  //# sourceMappingURL=browser.js.map