@caweb/html-webpack-plugin 1.5.26 → 1.5.27

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.
Files changed (121) hide show
  1. package/build/delta-rtl.css +5 -5
  2. package/build/delta-rtl.min.css +1 -1
  3. package/build/delta.asset.php +1 -1
  4. package/build/delta.css +4 -4
  5. package/build/delta.css.map +1 -1
  6. package/build/delta.js +16 -21
  7. package/build/delta.js.map +1 -1
  8. package/build/delta.min.asset.php +1 -1
  9. package/build/delta.min.css +1 -1
  10. package/build/delta.min.js +1 -1
  11. package/build/eureka-rtl.css +5 -5
  12. package/build/eureka-rtl.min.css +1 -1
  13. package/build/eureka.asset.php +1 -1
  14. package/build/eureka.css +4 -4
  15. package/build/eureka.css.map +1 -1
  16. package/build/eureka.js +16 -21
  17. package/build/eureka.js.map +1 -1
  18. package/build/eureka.min.asset.php +1 -1
  19. package/build/eureka.min.css +1 -1
  20. package/build/eureka.min.js +1 -1
  21. package/build/mono-rtl.css +5 -5
  22. package/build/mono-rtl.min.css +1 -1
  23. package/build/mono.asset.php +1 -1
  24. package/build/mono.css +4 -4
  25. package/build/mono.css.map +1 -1
  26. package/build/mono.js +16 -21
  27. package/build/mono.js.map +1 -1
  28. package/build/mono.min.asset.php +1 -1
  29. package/build/mono.min.css +1 -1
  30. package/build/mono.min.js +1 -1
  31. package/build/oceanside-rtl.css +5 -5
  32. package/build/oceanside-rtl.min.css +1 -1
  33. package/build/oceanside.asset.php +1 -1
  34. package/build/oceanside.css +4 -4
  35. package/build/oceanside.css.map +1 -1
  36. package/build/oceanside.js +16 -21
  37. package/build/oceanside.js.map +1 -1
  38. package/build/oceanside.min.asset.php +1 -1
  39. package/build/oceanside.min.css +1 -1
  40. package/build/oceanside.min.js +1 -1
  41. package/build/orangecounty-rtl.css +5 -5
  42. package/build/orangecounty-rtl.min.css +1 -1
  43. package/build/orangecounty.asset.php +1 -1
  44. package/build/orangecounty.css +4 -4
  45. package/build/orangecounty.css.map +1 -1
  46. package/build/orangecounty.js +16 -21
  47. package/build/orangecounty.js.map +1 -1
  48. package/build/orangecounty.min.asset.php +1 -1
  49. package/build/orangecounty.min.css +1 -1
  50. package/build/orangecounty.min.js +1 -1
  51. package/build/pasorobles-rtl.css +5 -5
  52. package/build/pasorobles-rtl.min.css +1 -1
  53. package/build/pasorobles.asset.php +1 -1
  54. package/build/pasorobles.css +4 -4
  55. package/build/pasorobles.css.map +1 -1
  56. package/build/pasorobles.js +16 -21
  57. package/build/pasorobles.js.map +1 -1
  58. package/build/pasorobles.min.asset.php +1 -1
  59. package/build/pasorobles.min.css +1 -1
  60. package/build/pasorobles.min.js +1 -1
  61. package/build/sacramento-rtl.css +5 -5
  62. package/build/sacramento-rtl.min.css +1 -1
  63. package/build/sacramento.asset.php +1 -1
  64. package/build/sacramento.css +4 -4
  65. package/build/sacramento.css.map +1 -1
  66. package/build/sacramento.js +16 -21
  67. package/build/sacramento.js.map +1 -1
  68. package/build/sacramento.min.asset.php +1 -1
  69. package/build/sacramento.min.css +1 -1
  70. package/build/sacramento.min.js +1 -1
  71. package/build/santabarbara-rtl.css +5 -5
  72. package/build/santabarbara-rtl.min.css +1 -1
  73. package/build/santabarbara.asset.php +1 -1
  74. package/build/santabarbara.css +4 -4
  75. package/build/santabarbara.css.map +1 -1
  76. package/build/santabarbara.js +16 -21
  77. package/build/santabarbara.js.map +1 -1
  78. package/build/santabarbara.min.asset.php +1 -1
  79. package/build/santabarbara.min.css +1 -1
  80. package/build/santabarbara.min.js +1 -1
  81. package/build/santacruz-rtl.css +5 -5
  82. package/build/santacruz-rtl.min.css +1 -1
  83. package/build/santacruz.asset.php +1 -1
  84. package/build/santacruz.css +4 -4
  85. package/build/santacruz.css.map +1 -1
  86. package/build/santacruz.js +16 -21
  87. package/build/santacruz.js.map +1 -1
  88. package/build/santacruz.min.asset.php +1 -1
  89. package/build/santacruz.min.css +1 -1
  90. package/build/santacruz.min.js +1 -1
  91. package/build/shasta-rtl.css +5 -5
  92. package/build/shasta-rtl.min.css +1 -1
  93. package/build/shasta.asset.php +1 -1
  94. package/build/shasta.css +4 -4
  95. package/build/shasta.css.map +1 -1
  96. package/build/shasta.js +16 -21
  97. package/build/shasta.js.map +1 -1
  98. package/build/shasta.min.asset.php +1 -1
  99. package/build/shasta.min.css +1 -1
  100. package/build/shasta.min.js +1 -1
  101. package/build/sierra-rtl.css +5 -5
  102. package/build/sierra-rtl.min.css +1 -1
  103. package/build/sierra.asset.php +1 -1
  104. package/build/sierra.css +4 -4
  105. package/build/sierra.css.map +1 -1
  106. package/build/sierra.js +16 -21
  107. package/build/sierra.js.map +1 -1
  108. package/build/sierra.min.asset.php +1 -1
  109. package/build/sierra.min.css +1 -1
  110. package/build/sierra.min.js +1 -1
  111. package/build/trinity-rtl.css +5 -5
  112. package/build/trinity-rtl.min.css +1 -1
  113. package/build/trinity.asset.php +1 -1
  114. package/build/trinity.css +4 -4
  115. package/build/trinity.css.map +1 -1
  116. package/build/trinity.js +16 -21
  117. package/build/trinity.js.map +1 -1
  118. package/build/trinity.min.asset.php +1 -1
  119. package/build/trinity.min.css +1 -1
  120. package/build/trinity.min.js +1 -1
  121. package/package.json +2 -2
@@ -6364,18 +6364,17 @@ window.addEventListener('DOMContentLoaded', () => {
6364
6364
  __webpack_require__.r(__webpack_exports__);
6365
6365
  //@ts-check
6366
6366
  window.addEventListener('DOMContentLoaded', () => {
6367
- let location_hash = window.location.hash.replace(/(\|)/g, "\\$1");
6368
6367
  const header = document.querySelector('header');
6369
6368
  const pageContainer = document.querySelector('#page-container');
6370
6369
  const alerts = document.querySelector('.alerts');
6371
6370
  const utilityHeader = document.querySelector('.utility-header');
6371
+ if (!header) {
6372
+ return;
6373
+ }
6372
6374
  const compactHeader = () => {
6373
- if (!header) {
6374
- return;
6375
- }
6376
6375
  let scrollHeights = 0;
6377
6376
 
6378
- // lets collect the scroll height of any elements above the header.
6377
+ // lets collect the height of any elements above the header.
6379
6378
  let current = header.previousElementSibling;
6380
6379
  let miscElementHeights = 0;
6381
6380
  while (current) {
@@ -6390,38 +6389,34 @@ window.addEventListener('DOMContentLoaded', () => {
6390
6389
  if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {
6391
6390
  // lets add the scroll heights of any alerts
6392
6391
  if (alerts) {
6393
- scrollHeights += alerts.scrollHeight;
6392
+ scrollHeights += alerts.clientHeight;
6394
6393
  }
6395
6394
 
6396
6395
  // lets add the scroll heights of the utility header
6397
6396
  if (utilityHeader) {
6398
- scrollHeights += utilityHeader.scrollHeight;
6397
+ scrollHeights += utilityHeader.clientHeight;
6399
6398
  }
6400
6399
 
6401
6400
  // move the header up to the scroll height, minus any elements above the header
6402
6401
  header.style.top = `-${scrollHeights - miscElementHeights}px`;
6403
6402
 
6404
6403
  // we add the header height + misc element heights to the page container as margin-top, minus the scroll heights since those get hidden
6405
- pageContainer?.setAttribute('style', `margin-top: ${header.offsetHeight + miscElementHeights - scrollHeights}px;`);
6404
+ pageContainer?.setAttribute('style', `margin-top: ${header.clientHeight + miscElementHeights - scrollHeights}px;`);
6406
6405
  } else {
6407
- header.style.top = `${miscElementHeights}px`; // reset header top position
6408
-
6409
- pageContainer?.setAttribute('style', `margin-top: ${miscElementHeights}px;`);
6406
+ // reset header to initial position
6407
+ header.style.top = `${miscElementHeights}px`;
6408
+ pageContainer?.setAttribute('style', `margin-top: ${header.clientHeight + miscElementHeights}px;`);
6410
6409
  }
6410
+
6411
+ // for each element with an id we add the scroll-margin-top
6412
+ document.querySelectorAll('#page-container [id]').forEach(element => {
6413
+ element?.setAttribute('style', `scroll-margin-top: ${header.clientHeight + miscElementHeights - scrollHeights}px;`);
6414
+ });
6411
6415
  };
6412
6416
 
6413
6417
  // reset position on scroll
6414
6418
  window.addEventListener('scroll', compactHeader);
6415
-
6416
- // scroll to target
6417
- if (location_hash) {
6418
- let target = document.querySelector(location_hash);
6419
- setTimeout(() => {
6420
- target?.scrollIntoView({
6421
- behavior: 'smooth'
6422
- });
6423
- }, 1000);
6424
- }
6419
+ compactHeader();
6425
6420
  });
6426
6421
 
6427
6422
  /***/ }),