@eric-emg/symphiq-components 1.2.63 → 1.2.64

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.
@@ -11196,6 +11196,17 @@ class TooltipContainerComponent {
11196
11196
  // Don't let container bounds force tooltips away from edges
11197
11197
  const effectiveLeft = 0;
11198
11198
  const effectiveRight = bounds?.right ?? window.innerWidth;
11199
+ console.log('🔍 [Tooltip calculateLeft]', {
11200
+ position,
11201
+ 'rect.left': rect.left,
11202
+ 'rect.right': rect.right,
11203
+ 'rect.width': rect.width,
11204
+ tooltipWidth,
11205
+ bounds,
11206
+ effectiveLeft,
11207
+ effectiveRight,
11208
+ 'window.innerWidth': window.innerWidth
11209
+ });
11199
11210
  // Handle 'auto' positioning with mouse coordinates
11200
11211
  if (position === 'auto' && mousePos) {
11201
11212
  const halfWidth = tooltipWidth / 2;
@@ -11217,16 +11228,31 @@ class TooltipContainerComponent {
11217
11228
  // Check if centered tooltip would go off bounds
11218
11229
  const wouldGoOffLeft = centerPosition - halfWidth < effectiveLeft + padding;
11219
11230
  const wouldGoOffRight = centerPosition + halfWidth > effectiveRight - padding;
11231
+ console.log('📍 [Tooltip top/bottom calculation]', {
11232
+ centerPosition,
11233
+ halfWidth,
11234
+ 'centerPosition - halfWidth': centerPosition - halfWidth,
11235
+ 'centerPosition + halfWidth': centerPosition + halfWidth,
11236
+ wouldGoOffLeft,
11237
+ wouldGoOffRight,
11238
+ 'effectiveLeft + padding': effectiveLeft + padding,
11239
+ 'effectiveRight - padding': effectiveRight - padding
11240
+ });
11220
11241
  if (wouldGoOffLeft) {
11221
11242
  // Align to left edge with padding
11222
- return effectiveLeft + padding + halfWidth;
11243
+ const result = effectiveLeft + padding + halfWidth;
11244
+ console.log('⬅️ [Tooltip adjusting LEFT]', { result });
11245
+ return result;
11223
11246
  }
11224
11247
  else if (wouldGoOffRight) {
11225
11248
  // Align to right edge with padding
11226
- return effectiveRight - padding - halfWidth;
11249
+ const result = effectiveRight - padding - halfWidth;
11250
+ console.log('➡️ [Tooltip adjusting RIGHT]', { result });
11251
+ return result;
11227
11252
  }
11228
11253
  else {
11229
11254
  // Center normally (transform will be applied)
11255
+ console.log('🎯 [Tooltip centered]', { centerPosition });
11230
11256
  return centerPosition;
11231
11257
  }
11232
11258
  }
@@ -11234,20 +11260,28 @@ class TooltipContainerComponent {
11234
11260
  const leftPosition = rect.left - tooltipWidth - 8;
11235
11261
  // If tooltip would go off left edge, position it to the right instead
11236
11262
  if (leftPosition < effectiveLeft + padding) {
11237
- return rect.right + 8;
11263
+ const result = rect.right + 8;
11264
+ console.log('⬅️➡️ [Tooltip LEFT flipped to RIGHT]', { leftPosition, result });
11265
+ return result;
11238
11266
  }
11267
+ console.log('⬅️ [Tooltip LEFT]', { leftPosition });
11239
11268
  return leftPosition;
11240
11269
  }
11241
11270
  case 'right': {
11242
11271
  const rightPosition = rect.right + 8;
11243
11272
  // If tooltip would go off right edge, position it to the left instead
11244
11273
  if (rightPosition + tooltipWidth > effectiveRight - padding) {
11245
- return rect.left - tooltipWidth - 8;
11274
+ const result = rect.left - tooltipWidth - 8;
11275
+ console.log('➡️⬅️ [Tooltip RIGHT flipped to LEFT]', { rightPosition, result });
11276
+ return result;
11246
11277
  }
11278
+ console.log('➡️ [Tooltip RIGHT]', { rightPosition });
11247
11279
  return rightPosition;
11248
11280
  }
11249
11281
  default:
11250
- return rect.left + rect.width / 2;
11282
+ const defaultResult = rect.left + rect.width / 2;
11283
+ console.log('🔄 [Tooltip DEFAULT]', { defaultResult });
11284
+ return defaultResult;
11251
11285
  }
11252
11286
  }
11253
11287
  calculateTop() {