@caweb/html-webpack-plugin 1.5.26 → 1.5.28

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 +26 -20
  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 +26 -20
  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 +26 -20
  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 +26 -20
  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 +26 -20
  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 +26 -20
  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 +26 -20
  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 +26 -20
  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 +26 -20
  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 +26 -20
  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 +26 -20
  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 +26 -20
  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 +3 -3
@@ -6365,17 +6365,27 @@ __webpack_require__.r(__webpack_exports__);
6365
6365
  //@ts-check
6366
6366
  window.addEventListener('DOMContentLoaded', () => {
6367
6367
  let location_hash = window.location.hash.replace(/(\|)/g, "\\$1");
6368
+ let target = document.querySelector(location_hash);
6368
6369
  const header = document.querySelector('header');
6369
6370
  const pageContainer = document.querySelector('#page-container');
6370
6371
  const alerts = document.querySelector('.alerts');
6371
6372
  const utilityHeader = document.querySelector('.utility-header');
6373
+
6374
+ // scroll to target
6375
+ if (target) {
6376
+ setTimeout(() => {
6377
+ target.scrollIntoView({
6378
+ behavior: 'smooth'
6379
+ });
6380
+ }, 1000);
6381
+ }
6382
+ if (!header) {
6383
+ return;
6384
+ }
6372
6385
  const compactHeader = () => {
6373
- if (!header) {
6374
- return;
6375
- }
6376
6386
  let scrollHeights = 0;
6377
6387
 
6378
- // lets collect the scroll height of any elements above the header.
6388
+ // lets collect the height of any elements above the header.
6379
6389
  let current = header.previousElementSibling;
6380
6390
  let miscElementHeights = 0;
6381
6391
  while (current) {
@@ -6390,38 +6400,34 @@ window.addEventListener('DOMContentLoaded', () => {
6390
6400
  if (document.body.scrollTop >= header.offsetHeight || document.documentElement.scrollTop >= header.offsetHeight) {
6391
6401
  // lets add the scroll heights of any alerts
6392
6402
  if (alerts) {
6393
- scrollHeights += alerts.scrollHeight;
6403
+ scrollHeights += alerts.clientHeight;
6394
6404
  }
6395
6405
 
6396
6406
  // lets add the scroll heights of the utility header
6397
6407
  if (utilityHeader) {
6398
- scrollHeights += utilityHeader.scrollHeight;
6408
+ scrollHeights += utilityHeader.clientHeight;
6399
6409
  }
6400
6410
 
6401
6411
  // move the header up to the scroll height, minus any elements above the header
6402
6412
  header.style.top = `-${scrollHeights - miscElementHeights}px`;
6403
6413
 
6404
6414
  // 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;`);
6415
+ pageContainer?.setAttribute('style', `margin-top: ${header.clientHeight + miscElementHeights - scrollHeights}px;`);
6406
6416
  } else {
6407
- header.style.top = `${miscElementHeights}px`; // reset header top position
6408
-
6409
- pageContainer?.setAttribute('style', `margin-top: ${miscElementHeights}px;`);
6417
+ // reset header to initial position
6418
+ header.style.top = `${miscElementHeights}px`;
6419
+ pageContainer?.setAttribute('style', `margin-top: ${header.clientHeight + miscElementHeights}px;`);
6410
6420
  }
6421
+
6422
+ // for each element with an id we add the scroll-margin-top
6423
+ document.querySelectorAll('#page-container [id]').forEach(element => {
6424
+ element?.setAttribute('style', `scroll-margin-top: ${header.clientHeight + miscElementHeights - scrollHeights}px;`);
6425
+ });
6411
6426
  };
6412
6427
 
6413
6428
  // reset position on scroll
6414
6429
  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
- }
6430
+ compactHeader();
6425
6431
  });
6426
6432
 
6427
6433
  /***/ }),