@eric-emg/symphiq-components 1.2.102 → 1.2.104

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.
@@ -25083,46 +25083,15 @@ class FloatingTocComponent {
25083
25083
  }
25084
25084
  calculateContainerOffset() {
25085
25085
  if (this.embedded) {
25086
- // If scrollElement is provided, use its top position to know where content starts
25087
- if (this.scrollElement) {
25088
- const scrollRect = this.scrollElement.getBoundingClientRect();
25089
- // The top position tells us exactly how much space headers take above it
25090
- this.containerTopOffset.set(Math.max(0, scrollRect.top));
25091
- return;
25092
- }
25093
- // Fallback: use containerElement
25094
- if (this.containerElement) {
25095
- const rect = this.containerElement.getBoundingClientRect();
25096
- const viewportOffset = Math.max(0, rect.top);
25097
- // If parentHeaderOffset is manually provided, use it
25098
- if (this.parentHeaderOffset > 0) {
25099
- this.containerTopOffset.set(viewportOffset + this.parentHeaderOffset);
25100
- return;
25101
- }
25102
- // Otherwise, try to detect all fixed/sticky headers
25103
- let totalHeaderHeight = 0;
25104
- const allHeaders = document.querySelectorAll('header, [class*="header"], [class*="navbar"]');
25105
- allHeaders.forEach(header => {
25106
- const htmlHeader = header;
25107
- const style = window.getComputedStyle(htmlHeader);
25108
- const position = style.position;
25109
- if (position === 'fixed' || position === 'sticky') {
25110
- const headerRect = htmlHeader.getBoundingClientRect();
25111
- if (headerRect.top < 100) {
25112
- totalHeaderHeight += headerRect.height;
25113
- }
25114
- }
25115
- });
25116
- this.containerTopOffset.set(viewportOffset + totalHeaderHeight);
25117
- }
25086
+ this.containerTopOffset.set(250);
25118
25087
  }
25119
25088
  else {
25120
25089
  this.containerTopOffset.set(0);
25121
25090
  }
25122
25091
  }
25123
25092
  getCalculatedTopPosition() {
25124
- if (this.embedded && this.containerTopOffset() > 0) {
25125
- return this.containerTopOffset() + 16;
25093
+ if (this.embedded) {
25094
+ return 250;
25126
25095
  }
25127
25096
  return this.BASE_OFFSET;
25128
25097
  }