@eric-emg/symphiq-components 1.2.102 → 1.2.103

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,37 +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
25086
+ // Hard-coded offset for parent app header
25087
+ const PARENT_HEADER_HEIGHT = 72;
25094
25088
  if (this.containerElement) {
25095
25089
  const rect = this.containerElement.getBoundingClientRect();
25096
25090
  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);
25091
+ this.containerTopOffset.set(viewportOffset + PARENT_HEADER_HEIGHT);
25092
+ }
25093
+ else {
25094
+ this.containerTopOffset.set(PARENT_HEADER_HEIGHT);
25117
25095
  }
25118
25096
  }
25119
25097
  else {