@schukai/monster 3.100.15 → 3.100.16

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
 
4
4
 
5
+ ## [3.100.16] - 2025-01-20
6
+
7
+ ### Bug Fixes
8
+
9
+ - update resizeobserver
10
+
11
+
12
+
5
13
  ## [3.100.15] - 2025-01-20
6
14
 
7
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.100.15"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.100.16"}
@@ -267,7 +267,20 @@ function attachResizeObserver() {
267
267
  });
268
268
  });
269
269
 
270
- this[resizeObserverSymbol].observe(this.parentElement);
270
+ requestAnimationFrame(() => {
271
+
272
+ let parent = this.parentNode;
273
+ while(!(parent instanceof HTMLElement) && parent !== null) {
274
+ parent = parent.parentNode;
275
+ }
276
+
277
+ if (parent instanceof HTMLElement) {
278
+ this[resizeObserverSymbol].observe(parent);
279
+ }
280
+
281
+
282
+ });
283
+
271
284
  }
272
285
 
273
286
  /**
@@ -689,7 +689,18 @@ function attachResizeObserver() {
689
689
  });
690
690
  });
691
691
 
692
- this[resizeObserverSymbol].observe(this.parentElement);
692
+ requestAnimationFrame(() => {
693
+
694
+ let parent = this.parentNode;
695
+ while(!(parent instanceof HTMLElement) && parent !== null) {
696
+ parent = parent.parentNode;
697
+ }
698
+
699
+ if (parent instanceof HTMLElement) {
700
+ this[resizeObserverSymbol].observe(parent);
701
+ }
702
+ });
703
+
693
704
  }
694
705
 
695
706
  function disconnectResizeObserver() {
@@ -567,8 +567,21 @@ function updateResizeObserverObservation() {
567
567
  this[resizeObserverSymbol].observe(node);
568
568
  });
569
569
 
570
- if (this.parentElement === null) return;
571
- this[resizeObserverSymbol].observe(this.parentElement);
570
+ requestAnimationFrame(() => {
571
+
572
+ let parent = this.parentNode;
573
+ while(!(parent instanceof HTMLElement) && parent !== null) {
574
+ parent = parent.parentNode;
575
+ }
576
+
577
+ if (parent instanceof HTMLElement) {
578
+ this[resizeObserverSymbol].observe(parent);
579
+ }
580
+
581
+
582
+ });
583
+
584
+
572
585
  }
573
586
 
574
587
  /**
@@ -345,7 +345,20 @@ function attachResizeObserver() {
345
345
  });
346
346
  });
347
347
 
348
- this[resizeObserverSymbol].observe(this.parentElement);
348
+ requestAnimationFrame(() => {
349
+
350
+ let parent = this.parentNode;
351
+ while(!(parent instanceof HTMLElement) && parent !== null) {
352
+ parent = parent.parentNode;
353
+ }
354
+
355
+ if (parent instanceof HTMLElement) {
356
+ this[resizeObserverSymbol].observe(parent);
357
+ }
358
+
359
+
360
+ });
361
+
349
362
  }
350
363
 
351
364
  function disconnectResizeObserver() {
@@ -1097,7 +1097,20 @@ function attachResizeObserver() {
1097
1097
  });
1098
1098
  });
1099
1099
 
1100
- this[resizeObserverSymbol].observe(this.parentElement);
1100
+ requestAnimationFrame(() => {
1101
+
1102
+ let parent = this.parentNode;
1103
+ while(!(parent instanceof HTMLElement) && parent !== null) {
1104
+ parent = parent.parentNode;
1105
+ }
1106
+
1107
+ if (parent instanceof HTMLElement) {
1108
+ this[resizeObserverSymbol].observe(parent);
1109
+ }
1110
+
1111
+
1112
+ });
1113
+
1101
1114
  }
1102
1115
 
1103
1116
  /**
@@ -357,7 +357,20 @@ function attachResizeObserver() {
357
357
  });
358
358
  });
359
359
 
360
- this[resizeObserverSymbol].observe(this.parentElement);
360
+ requestAnimationFrame(() => {
361
+
362
+ let parent = this.parentNode;
363
+ while(!(parent instanceof HTMLElement) && parent !== null) {
364
+ parent = parent.parentNode;
365
+ }
366
+
367
+ if (parent instanceof HTMLElement) {
368
+ this[resizeObserverSymbol].observe(parent);
369
+ }
370
+
371
+
372
+ });
373
+
361
374
  }
362
375
 
363
376
  function disconnectResizeObserver() {