@schukai/monster 4.43.7 → 4.43.9

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,22 @@
2
2
 
3
3
 
4
4
 
5
+ ## [4.43.9] - 2025-10-13
6
+
7
+ ### Bug Fixes
8
+
9
+ - calc with [#336](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/336)
10
+
11
+
12
+
13
+ ## [4.43.8] - 2025-10-12
14
+
15
+ ### Bug Fixes
16
+
17
+ - new position strategy [#336](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/336)
18
+
19
+
20
+
5
21
  ## [4.43.7] - 2025-10-11
6
22
 
7
23
  ### Bug Fixes
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.4","@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":"4.43.7"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.7.4","@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":"4.43.9"}
@@ -108,7 +108,9 @@ class SiteNavigation extends CustomElement {
108
108
  connectedCallback() {
109
109
  super.connectedCallback();
110
110
  attachResizeObserver.call(this);
111
- setTimeout(() => populateTabs.call(this), 0);
111
+ requestAnimationFrame(() => {
112
+ populateTabs.call(this);
113
+ });
112
114
  }
113
115
 
114
116
  disconnectedCallback() {
@@ -156,6 +158,18 @@ function initEventHandler() {
156
158
 
157
159
  if (!hamburgerButton || !hamburgerNav || !hamburgerCloseButton) return;
158
160
 
161
+ const getBestPositionStrategy = (element) => {
162
+ let parent = element.parentElement;
163
+ while (parent) {
164
+ const parentPosition = window.getComputedStyle(parent).position;
165
+ if (["fixed", "sticky"].includes(parentPosition)) {
166
+ return "fixed";
167
+ }
168
+ parent = parent.parentElement;
169
+ }
170
+ return "absolute";
171
+ };
172
+
159
173
  const handleOutsideClick = (event) => {
160
174
  if (
161
175
  !hamburgerButton.contains(event.target) &&
@@ -200,10 +214,12 @@ function initEventHandler() {
200
214
  });
201
215
 
202
216
  cleanup = autoUpdate(hamburgerButton, hamburgerNav, () => {
203
- // Desktop view where the hamburger menu is a dropdown
204
217
  if (window.innerWidth > 768) {
218
+ const strategy = getBestPositionStrategy(this);
219
+
205
220
  computePosition(hamburgerButton, hamburgerNav, {
206
221
  placement: "bottom-end",
222
+ strategy: strategy,
207
223
  middleware: [
208
224
  offset(8),
209
225
  flip(),
@@ -265,9 +281,11 @@ function attachResizeObserver() {
265
281
  delete this[timerCallbackSymbol];
266
282
  }
267
283
  }
268
- this[timerCallbackSymbol] = new DeadMansSwitch(200, () =>
269
- populateTabs.call(this),
270
- );
284
+ this[timerCallbackSymbol] = new DeadMansSwitch(200, () => {
285
+ requestAnimationFrame(() => {
286
+ populateTabs.call(this);
287
+ });
288
+ });
271
289
  });
272
290
  this[resizeObserverSymbol].observe(this[navElementSymbol]);
273
291
  }
@@ -156,7 +156,7 @@ function getMonsterVersion() {
156
156
  }
157
157
 
158
158
  /** don't touch, replaced by make with package.json version */
159
- monsterVersion = new Version("4.43.6");
159
+ monsterVersion = new Version("4.43.8");
160
160
 
161
161
  return monsterVersion;
162
162
  }
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version("4.43.6")
10
+ monsterVersion = new Version("4.43.8")
11
11
 
12
12
  let m = getMonsterVersion();
13
13
 
@@ -9,8 +9,8 @@
9
9
  </head>
10
10
  <body>
11
11
  <div id="headline" style="display: flex;align-items: center;justify-content: center;flex-direction: column;">
12
- <h1 style='margin-bottom: 0.1em;'>Monster 4.43.6</h1>
13
- <div id="lastupdate" style='font-size:0.7em'>last update Sa 11. Okt 18:38:25 CEST 2025</div>
12
+ <h1 style='margin-bottom: 0.1em;'>Monster 4.43.8</h1>
13
+ <div id="lastupdate" style='font-size:0.7em'>last update Mo 13. Okt 09:26:37 CEST 2025</div>
14
14
  </div>
15
15
  <div id="mocha-errors"
16
16
  style="color: red;font-weight: bold;display: flex;align-items: center;justify-content: center;flex-direction: column;margin:20px;"></div>