@schukai/monster 4.95.0 → 4.96.0

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
+ ## [4.96.0] - 2026-01-13
6
+
7
+ ### Add Features
8
+
9
+ - Improve dots visibility logic in columnbar component
10
+
11
+
12
+
5
13
  ## [4.95.0] - 2026-01-13
6
14
 
7
15
  ### Add Features
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"Volker Schukai","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.95.0"}
1
+ {"author":"Volker Schukai","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.96.0"}
@@ -502,25 +502,27 @@ function updateDotsVisibility() {
502
502
  return;
503
503
  }
504
504
 
505
- if (maxDots >= dots.length) {
506
- if (!enforceMaxVisible) {
507
- return;
508
- }
509
- }
510
-
511
- let visibleDots = Math.max(1, maxDots - 1);
512
- if (enforceMaxVisible) {
513
- visibleDots = Math.min(visibleDots, configuredMaxVisible);
505
+ const configLimit = enforceMaxVisible
506
+ ? configuredMaxVisible
507
+ : Number.POSITIVE_INFINITY;
508
+ const baseLimit = Math.min(maxDots, configLimit, dots.length);
509
+ const needsIndicator = baseLimit < dots.length;
510
+
511
+ let visibleDots = baseLimit;
512
+ if (needsIndicator) {
513
+ visibleDots = Math.min(Math.max(1, maxDots - 1), configLimit, dots.length);
514
514
  }
515
515
  for (let i = visibleDots; i < dots.length; i++) {
516
516
  dots[i].classList.add("dots-overflow-hidden");
517
517
  }
518
518
 
519
519
  const hiddenCount = dots.length - visibleDots;
520
- const overflowIndicator = document.createElement("li");
521
- overflowIndicator.className = "dots-overflow-indicator";
522
- overflowIndicator.textContent = `+${hiddenCount}`;
523
- dotsContainer.appendChild(overflowIndicator);
520
+ if (hiddenCount > 0) {
521
+ const overflowIndicator = document.createElement("li");
522
+ overflowIndicator.className = "dots-overflow-indicator";
523
+ overflowIndicator.textContent = `+${hiddenCount}`;
524
+ dotsContainer.appendChild(overflowIndicator);
525
+ }
524
526
  } finally {
525
527
  this[dotsUpdateInProgressSymbol] = false;
526
528
  }