@gemx-dev/heatmap-react 3.5.58 → 3.5.59

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 (26) hide show
  1. package/dist/esm/components/VizElement/ElementCallout.d.ts.map +1 -1
  2. package/dist/esm/components/VizElement/ElementCalloutOverlay.d.ts.map +1 -1
  3. package/dist/esm/helpers/viz-elm-callout/dimensions.d.ts +1 -1
  4. package/dist/esm/helpers/viz-elm-callout/dimensions.d.ts.map +1 -1
  5. package/dist/esm/helpers/viz-elm-callout/getter.d.ts +4 -1
  6. package/dist/esm/helpers/viz-elm-callout/getter.d.ts.map +1 -1
  7. package/dist/esm/helpers/viz-elm-callout/position-candidates.d.ts.map +1 -1
  8. package/dist/esm/helpers/viz-elm-callout/position-validator.d.ts.map +1 -1
  9. package/dist/esm/helpers/viz-elm-callout/viz-elm.d.ts.map +1 -1
  10. package/dist/esm/index.js +79 -49
  11. package/dist/esm/index.mjs +79 -49
  12. package/dist/esm/types/viz-elm-callout.d.ts +7 -2
  13. package/dist/esm/types/viz-elm-callout.d.ts.map +1 -1
  14. package/dist/umd/components/VizElement/ElementCallout.d.ts.map +1 -1
  15. package/dist/umd/components/VizElement/ElementCalloutOverlay.d.ts.map +1 -1
  16. package/dist/umd/helpers/viz-elm-callout/dimensions.d.ts +1 -1
  17. package/dist/umd/helpers/viz-elm-callout/dimensions.d.ts.map +1 -1
  18. package/dist/umd/helpers/viz-elm-callout/getter.d.ts +4 -1
  19. package/dist/umd/helpers/viz-elm-callout/getter.d.ts.map +1 -1
  20. package/dist/umd/helpers/viz-elm-callout/position-candidates.d.ts.map +1 -1
  21. package/dist/umd/helpers/viz-elm-callout/position-validator.d.ts.map +1 -1
  22. package/dist/umd/helpers/viz-elm-callout/viz-elm.d.ts.map +1 -1
  23. package/dist/umd/index.js +1 -1
  24. package/dist/umd/types/viz-elm-callout.d.ts +7 -2
  25. package/dist/umd/types/viz-elm-callout.d.ts.map +1 -1
  26. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ElementCallout.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCallout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAkBvF,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,OAAO,CAAC;AAExD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,MAAM,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8CxD,CAAC"}
1
+ {"version":3,"file":"ElementCallout.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCallout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAiBvF,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,OAAO,CAAC;AAExD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,MAAM,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6CxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ElementCalloutOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCalloutOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO5D,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+B/D,CAAC"}
1
+ {"version":3,"file":"ElementCalloutOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCalloutOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO5D,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2C/D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { IRectDimensions, IViewportDimensions } from '../../types';
2
- export declare const getViewportDimensions: (containerElm?: HTMLElement | null, scale?: number) => IViewportDimensions;
2
+ export declare const getViewportDimensions: (containerElm?: HTMLElement | null, _scale?: number) => IViewportDimensions;
3
3
  interface IElementDimensionsOptions {
4
4
  targetElm: Element;
5
5
  calloutElm: HTMLElement;
@@ -1 +1 @@
1
- {"version":3,"file":"dimensions.d.ts","sourceRoot":"","sources":["../../../src/helpers/viz-elm-callout/dimensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAExE,eAAO,MAAM,qBAAqB,GAAI,eAAe,WAAW,GAAG,IAAI,EAAE,QAAQ,MAAM,KAAG,mBAYzF,CAAC;AAEF,UAAU,yBAAyB;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,WAAW,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,WAAW,CAAC;CAC3B;AACD,eAAO,MAAM,oBAAoB,GAAI,SAAS,yBAAyB,KAAG,eA2CzE,CAAC"}
1
+ {"version":3,"file":"dimensions.d.ts","sourceRoot":"","sources":["../../../src/helpers/viz-elm-callout/dimensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAItF,eAAO,MAAM,qBAAqB,GAAI,eAAe,WAAW,GAAG,IAAI,EAAE,SAAS,MAAM,KAAG,mBAY1F,CAAC;AAEF,UAAU,yBAAyB;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,WAAW,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,WAAW,CAAC;CAC3B;AACD,eAAO,MAAM,oBAAoB,GAAI,SAAS,yBAAyB,KAAG,eAqCzE,CAAC"}
@@ -1,4 +1,7 @@
1
- import type { ElementInfo, ElementRect, IHeatmapInfo } from '../../types';
1
+ import type { CSSProperties } from 'react';
2
+ import type { ElementInfo, ElementRect, ICalloutPosition, ICalloutRect, IHeatmapInfo } from '../../types';
2
3
  export declare function getElementLayout(element: HTMLElement): ElementRect | null;
3
4
  export declare const buildElementInfo: (hash: string, rect: ElementRect | null, heatmapInfo: IHeatmapInfo) => ElementInfo | null;
5
+ export declare const getScaledCalloutRect: (_element: HTMLElement, _widthScale: number) => ICalloutRect;
6
+ export declare const getStyleFromCandidate: (candidate: ICalloutPosition, widthScale: number) => CSSProperties;
4
7
  //# sourceMappingURL=getter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getter.d.ts","sourceRoot":"","sources":["../../../src/helpers/viz-elm-callout/getter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAkB,YAAY,EAAE,MAAM,aAAa,CAAC;AAE1F,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAYzE;AAOD,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,EACZ,MAAM,WAAW,GAAG,IAAI,EACxB,aAAa,YAAY,KACxB,WAAW,GAAG,IAqBhB,CAAC"}
1
+ {"version":3,"file":"getter.d.ts","sourceRoot":"","sources":["../../../src/helpers/viz-elm-callout/getter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EAEX,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACb,MAAM,aAAa,CAAC;AAIrB,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAYzE;AAOD,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,EACZ,MAAM,WAAW,GAAG,IAAI,EACxB,aAAa,YAAY,KACxB,WAAW,GAAG,IAqBhB,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAAI,UAAU,WAAW,EAAE,aAAa,MAAM,KAAG,YAKjF,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,WAAW,gBAAgB,EAAE,YAAY,MAAM,KAAG,aAavF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"position-candidates.d.ts","sourceRoot":"","sources":["../../../src/helpers/viz-elm-callout/position-candidates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,kBAAkB,EAClB,wBAAwB,EAEzB,MAAM,aAAa,CAAC;AAerB,eAAO,MAAM,kCAAkC,GAAI,SAAS,wBAAwB,KAAG,kBAAkB,EA8BxG,CAAC;AAEF,eAAO,MAAM,oCAAoC,GAAI,SAAS,wBAAwB,KAAG,kBAAkB,EAU1G,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,SAAS,wBAAwB,KAAG,kBAAkB,EAK3F,CAAC"}
1
+ {"version":3,"file":"position-candidates.d.ts","sourceRoot":"","sources":["../../../src/helpers/viz-elm-callout/position-candidates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,kBAAkB,EAClB,wBAAwB,EAEzB,MAAM,aAAa,CAAC;AAerB,eAAO,MAAM,kCAAkC,GAAI,SAAS,wBAAwB,KAAG,kBAAkB,EA+BxG,CAAC;AAEF,eAAO,MAAM,oCAAoC,GAAI,SAAS,wBAAwB,KAAG,kBAAkB,EAU1G,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,SAAS,wBAAwB,KAAG,kBAAkB,EAK3F,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"position-validator.d.ts","sourceRoot":"","sources":["../../../src/helpers/viz-elm-callout/position-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItG,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,EAAE,SAAS,wBAAwB,KAAG,OAaxF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,EAAE,SAAS,wBAAwB,KAAG,OAQzF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,WAAW,kBAAkB,EAAE,SAAS,wBAAwB,KAAG,OAS1G,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,WAAW,oBAAoB,EAC/B,SAAS,wBAAwB,KAChC,OASF,CAAC"}
1
+ {"version":3,"file":"position-validator.d.ts","sourceRoot":"","sources":["../../../src/helpers/viz-elm-callout/position-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItG,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,EAAE,SAAS,wBAAwB,KAAG,OAcxF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,EAAE,SAAS,wBAAwB,KAAG,OAYzF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,WAAW,kBAAkB,EAAE,SAAS,wBAAwB,KAAG,OAe1G,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,WAAW,oBAAoB,EAC/B,SAAS,wBAAwB,KAChC,OAeF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"viz-elm.d.ts","sourceRoot":"","sources":["../../../src/helpers/viz-elm-callout/viz-elm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,yBAAyB,EAK1B,MAAM,aAAa,CAAC;AAiErB,eAAO,MAAM,mBAAmB,GAAI,SAAS,yBAAyB,eA+CrE,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,OAAO,iCAAiC,SAwEnF,CAAC"}
1
+ {"version":3,"file":"viz-elm.d.ts","sourceRoot":"","sources":["../../../src/helpers/viz-elm-callout/viz-elm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iCAAiC,EACjC,yBAAyB,EAK1B,MAAM,aAAa,CAAC;AAkErB,eAAO,MAAM,mBAAmB,GAAI,SAAS,yBAAyB,eAgDrE,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,OAAO,iCAAiC,SAiEnF,CAAC"}
package/dist/esm/index.js CHANGED
@@ -2211,6 +2211,25 @@ const buildElementInfo = (hash, rect, heatmapInfo) => {
2211
2211
  ...rect,
2212
2212
  };
2213
2213
  };
2214
+ // GETTERS
2215
+ const getScaledCalloutRect = (_element, _widthScale) => {
2216
+ return {
2217
+ width: 230,
2218
+ height: 263,
2219
+ };
2220
+ };
2221
+ const getStyleFromCandidate = (candidate, widthScale) => {
2222
+ const { horizontalAlign, placement, top, left } = candidate;
2223
+ const yTransformAlign = placement === 'top' ? 'bottom' : 'top';
2224
+ const xTransformAlign = horizontalAlign === 'left' ? 'left' : 'right';
2225
+ return {
2226
+ top,
2227
+ left,
2228
+ zIndex: Z_INDEX.CALLOUT,
2229
+ transform: `scale(${1 / widthScale})`, // TODO: remove this when we have a better way to handle the scale
2230
+ transformOrigin: `${xTransformAlign} ${yTransformAlign}`,
2231
+ };
2232
+ };
2214
2233
 
2215
2234
  function calculateRankPosition(rect, widthScale) {
2216
2235
  const top = rect.top <= 18 ? rect.top + 3 : rect.top - 18;
@@ -2222,11 +2241,11 @@ function calculateRankPosition(rect, widthScale) {
2222
2241
  };
2223
2242
  }
2224
2243
 
2225
- const getViewportDimensions = (containerElm, scale) => {
2244
+ const getViewportDimensions = (containerElm, _scale) => {
2226
2245
  if (containerElm) {
2227
2246
  const containerRect = containerElm.getBoundingClientRect();
2228
- const width = scale ? containerRect.width / scale : containerRect.width;
2229
- const height = scale ? containerRect.height / scale : containerRect.height;
2247
+ const width = containerRect.width;
2248
+ const height = containerRect.width;
2230
2249
  return { width, height };
2231
2250
  }
2232
2251
  return {
@@ -2239,6 +2258,7 @@ const getElementDimensions = (options) => {
2239
2258
  const targetRect = targetElm.getBoundingClientRect();
2240
2259
  const calloutRect = calloutElm.getBoundingClientRect();
2241
2260
  const containerRect = containerElm.getBoundingClientRect();
2261
+ const scaledCalloutRect = getScaledCalloutRect();
2242
2262
  if (scale && containerRect) {
2243
2263
  const relativeTop = (targetRect.top - containerRect.top) / scale;
2244
2264
  const relativeLeft = (targetRect.left - containerRect.left) / scale;
@@ -2254,21 +2274,13 @@ const getElementDimensions = (options) => {
2254
2274
  width: scaledWidth,
2255
2275
  height: scaledHeight,
2256
2276
  },
2257
- calloutRect: {
2258
- ...calloutRect,
2259
- width: calloutRect.width / scale,
2260
- height: calloutRect.height / scale,
2261
- },
2277
+ calloutRect: scaledCalloutRect,
2262
2278
  };
2263
2279
  }
2264
2280
  if (scale) {
2265
2281
  return {
2266
2282
  targetRect,
2267
- calloutRect: {
2268
- ...calloutRect,
2269
- width: calloutRect.width / scale,
2270
- height: calloutRect.height / scale,
2271
- },
2283
+ calloutRect: scaledCalloutRect,
2272
2284
  };
2273
2285
  }
2274
2286
  return { targetRect, calloutRect };
@@ -2334,36 +2346,50 @@ const isLeftPositionValid = (leftPos, options) => {
2334
2346
  const { width: viewportWidth } = viewport;
2335
2347
  const absLeft = rectDimensions.targetAbsoluteRect?.left ?? 0;
2336
2348
  const relLeftPos = absLeft + leftPos - offset.x;
2337
- const maxViewportWidth = viewportWidth - padding + EPSILON;
2349
+ const calloutWidthScaled = calloutWidth / options.widthScale;
2350
+ const maxViewportWidth = viewportWidth + EPSILON;
2338
2351
  const isValidLeft = relLeftPos >= padding - EPSILON;
2339
- const isRectCalloutShowValid = relLeftPos + calloutWidth <= maxViewportWidth;
2352
+ const isRectCalloutShowValid = relLeftPos + calloutWidthScaled - EPSILON <= maxViewportWidth / options.widthScale;
2340
2353
  return isValidLeft && isRectCalloutShowValid;
2341
2354
  };
2342
2355
  const isRightPositionValid = (leftPos, options) => {
2343
- const { rectDimensions, viewport, padding } = options;
2356
+ const { rectDimensions, viewport } = options;
2344
2357
  const { width: calloutWidth } = rectDimensions.calloutRect;
2345
2358
  const { width: viewportWidth } = viewport;
2346
- const maxViewportWidth = viewportWidth - padding + EPSILON;
2347
- const isValidRight = leftPos - calloutWidth - padding - EPSILON <= maxViewportWidth;
2359
+ const calloutWidthScaled = calloutWidth / options.widthScale;
2360
+ const absLeft = rectDimensions.targetAbsoluteRect?.left ?? 0;
2361
+ const relLeftPos = absLeft + leftPos;
2362
+ const maxViewportWidth = viewportWidth + EPSILON;
2363
+ const isValidRight = relLeftPos - calloutWidthScaled - EPSILON <= maxViewportWidth / options.widthScale;
2348
2364
  return isValidRight;
2349
2365
  };
2350
2366
  const isVerticalPositionValid = (placement, options) => {
2351
2367
  const { rectDimensions, viewport, padding, arrowSize } = options;
2352
- const { targetRect, calloutRect } = rectDimensions;
2368
+ const { targetRect, targetAbsoluteRect, calloutRect } = rectDimensions;
2353
2369
  const { height: viewportHeight } = viewport;
2354
2370
  const { height: calloutHeight } = calloutRect;
2355
- return placement === 'top'
2356
- ? targetRect.top - calloutHeight - padding - arrowSize > -EPSILON
2357
- : targetRect.bottom + calloutHeight + padding + arrowSize < viewportHeight + EPSILON;
2371
+ const relativeTop = (targetAbsoluteRect?.top ?? 0) + targetRect.top;
2372
+ const calloutHeightScaled = calloutHeight / options.widthScale;
2373
+ switch (placement) {
2374
+ case 'top':
2375
+ return relativeTop - calloutHeightScaled - padding - arrowSize > -EPSILON;
2376
+ case 'bottom':
2377
+ return targetRect.bottom + calloutHeight + padding + arrowSize < viewportHeight + EPSILON;
2378
+ }
2358
2379
  };
2359
2380
  const isHorizontalPositionValid = (placement, options) => {
2360
2381
  const { rectDimensions, viewport, padding, arrowSize } = options;
2361
- const { targetRect, calloutRect } = rectDimensions;
2382
+ const { targetRect, targetAbsoluteRect, calloutRect } = rectDimensions;
2362
2383
  const { width: viewportWidth } = viewport;
2363
2384
  const { width: calloutWidth } = calloutRect;
2364
- return placement === 'right'
2365
- ? targetRect.right + calloutWidth + padding + arrowSize < viewportWidth + EPSILON
2366
- : targetRect.left - calloutWidth - padding - arrowSize > -EPSILON;
2385
+ const relativeLeft = (targetAbsoluteRect?.left ?? 0) + targetRect.left;
2386
+ const relativeRight = relativeLeft + targetRect.width;
2387
+ switch (placement) {
2388
+ case 'right':
2389
+ return relativeRight + calloutWidth + padding + arrowSize < viewportWidth + EPSILON;
2390
+ case 'left':
2391
+ return relativeLeft - calloutWidth - padding - arrowSize > -EPSILON;
2392
+ }
2367
2393
  };
2368
2394
 
2369
2395
  const generateVerticalPositionCandidates = (options) => {
@@ -2493,7 +2519,7 @@ const calcCalloutPosition = (options) => {
2493
2519
  const containerElm = isAbsolute ? calloutElm.parentElement : visualRef?.current;
2494
2520
  if (!containerElm)
2495
2521
  return;
2496
- const viewport = getViewportDimensions(visualRef?.current, scale);
2522
+ const viewport = getViewportDimensions(containerElm);
2497
2523
  const rectDimensions = getElementDimensions({ targetElm, calloutElm, scale, containerElm });
2498
2524
  const containerRect = createAdjustedContainerRect({ containerElm, scale, isAbsolute, visualRef });
2499
2525
  const options = {
@@ -2504,6 +2530,7 @@ const calcCalloutPosition = (options) => {
2504
2530
  padding,
2505
2531
  arrowSize,
2506
2532
  containerRect,
2533
+ widthScale,
2507
2534
  };
2508
2535
  const candidates = generateAllCandidates(options);
2509
2536
  const candidate = selectBestPosition(candidates);
@@ -2520,7 +2547,7 @@ const calcCalloutPosition = (options) => {
2520
2547
  };
2521
2548
  };
2522
2549
  const calcCalloutPositionAbsolute = (props) => {
2523
- const { widthScale, calloutElm, containerElm, element, onChange } = props;
2550
+ const { widthScale, calloutElm, containerElm, element, setPosition } = props;
2524
2551
  const mousePosition = element?.mousePosition;
2525
2552
  if (!mousePosition)
2526
2553
  return;
@@ -2529,14 +2556,7 @@ const calcCalloutPositionAbsolute = (props) => {
2529
2556
  const rawCalloutRect = calloutElm.getBoundingClientRect();
2530
2557
  if (rawCalloutRect.width === 0 || rawCalloutRect.height === 0)
2531
2558
  return;
2532
- const calloutRect = {
2533
- ...rawCalloutRect,
2534
- width: rawCalloutRect.width / widthScale,
2535
- height: rawCalloutRect.height / widthScale,
2536
- };
2537
2559
  const containerRect = containerElm.getBoundingClientRect();
2538
- const containerWidth = containerRect.width / widthScale;
2539
- const containerHeight = containerRect.height / widthScale;
2540
2560
  const mouseX = mousePosition.x;
2541
2561
  const mouseY = mousePosition.y;
2542
2562
  const targetRect = {
@@ -2552,16 +2572,13 @@ const calcCalloutPositionAbsolute = (props) => {
2552
2572
  };
2553
2573
  const rectDimensions = {
2554
2574
  targetRect,
2555
- calloutRect,
2575
+ calloutRect: getScaledCalloutRect(),
2556
2576
  targetAbsoluteRect: {
2557
2577
  top: element.top,
2558
2578
  left: element.left,
2559
2579
  },
2560
2580
  };
2561
- const viewport = {
2562
- width: containerWidth,
2563
- height: containerHeight,
2564
- };
2581
+ const viewport = getViewportDimensions(containerElm);
2565
2582
  const options = {
2566
2583
  rectDimensions,
2567
2584
  viewport,
@@ -2570,16 +2587,19 @@ const calcCalloutPositionAbsolute = (props) => {
2570
2587
  padding,
2571
2588
  arrowSize,
2572
2589
  containerRect,
2590
+ widthScale,
2573
2591
  };
2574
2592
  const candidates = generateAllCandidates(options);
2575
2593
  const bestPosition = selectBestPosition(candidates);
2576
- const style = {
2577
- position: 'absolute',
2594
+ const finalPosition = {
2578
2595
  top: bestPosition.top,
2579
2596
  left: bestPosition.left,
2580
- zIndex: 1000,
2597
+ placement: bestPosition.placement,
2598
+ horizontalAlign: bestPosition.horizontalAlign,
2581
2599
  };
2582
- onChange(style);
2600
+ setPosition(finalPosition);
2601
+ // const styleBestPosition = getStyleFromCandidate(bestPosition, widthScale);
2602
+ // onChange(styleBestPosition);
2583
2603
  };
2584
2604
 
2585
2605
  /**
@@ -7778,6 +7798,7 @@ const DEFAULT_POSITION = {
7778
7798
  };
7779
7799
  const ElementCallout = (props) => {
7780
7800
  const viewId = useViewIdContext();
7801
+ const widthScale = useHeatmapViz((s) => s.widthScale);
7781
7802
  const CompElementCallout = useHeatmapControlStore((state) => state.controls.ElementCallout);
7782
7803
  const calloutRef = useRef(null);
7783
7804
  const element = props.element;
@@ -7790,9 +7811,7 @@ const ElementCallout = (props) => {
7790
7811
  return null;
7791
7812
  const calloutContent = (jsx("div", { ref: calloutRef, className: className, style: {
7792
7813
  position: positionMode,
7793
- top: position.top,
7794
- left: position.left,
7795
- zIndex: Z_INDEX.CALLOUT,
7814
+ ...getStyleFromCandidate(position, widthScale),
7796
7815
  }, "aria-live": "assertive", role: "tooltip", children: CompElementCallout && jsx(CompElementCallout, { elementHash: element.hash }) }));
7797
7816
  if (!document.getElementById(portalContainerId))
7798
7817
  return null;
@@ -7974,7 +7993,18 @@ const ElementCalloutOverlay = (props) => {
7974
7993
  const widthScale = useHeatmapViz((s) => s.widthScale);
7975
7994
  const CompElementCallout = useHeatmapControlStore((state) => state.controls.ElementCallout);
7976
7995
  const calloutRef = useRef(null);
7977
- const [calloutStyle, setCalloutStyle] = useState(undefined);
7996
+ const [position, setPosition] = useState({
7997
+ top: 0,
7998
+ left: 0,
7999
+ placement: 'bottom',
8000
+ horizontalAlign: 'left',
8001
+ });
8002
+ const calloutStyle = useMemo(() => {
8003
+ return {
8004
+ ...getStyleFromCandidate(position, widthScale),
8005
+ position: 'absolute',
8006
+ };
8007
+ }, [position, widthScale]);
7978
8008
  useEffect(() => {
7979
8009
  const calloutElm = calloutRef.current;
7980
8010
  const containerElm = containerRef?.current;
@@ -7985,7 +8015,7 @@ const ElementCalloutOverlay = (props) => {
7985
8015
  calloutElm,
7986
8016
  containerElm,
7987
8017
  element,
7988
- onChange: setCalloutStyle,
8018
+ setPosition,
7989
8019
  });
7990
8020
  }, [element, widthScale, containerRef]);
7991
8021
  if (!element)
@@ -2211,6 +2211,25 @@ const buildElementInfo = (hash, rect, heatmapInfo) => {
2211
2211
  ...rect,
2212
2212
  };
2213
2213
  };
2214
+ // GETTERS
2215
+ const getScaledCalloutRect = (_element, _widthScale) => {
2216
+ return {
2217
+ width: 230,
2218
+ height: 263,
2219
+ };
2220
+ };
2221
+ const getStyleFromCandidate = (candidate, widthScale) => {
2222
+ const { horizontalAlign, placement, top, left } = candidate;
2223
+ const yTransformAlign = placement === 'top' ? 'bottom' : 'top';
2224
+ const xTransformAlign = horizontalAlign === 'left' ? 'left' : 'right';
2225
+ return {
2226
+ top,
2227
+ left,
2228
+ zIndex: Z_INDEX.CALLOUT,
2229
+ transform: `scale(${1 / widthScale})`, // TODO: remove this when we have a better way to handle the scale
2230
+ transformOrigin: `${xTransformAlign} ${yTransformAlign}`,
2231
+ };
2232
+ };
2214
2233
 
2215
2234
  function calculateRankPosition(rect, widthScale) {
2216
2235
  const top = rect.top <= 18 ? rect.top + 3 : rect.top - 18;
@@ -2222,11 +2241,11 @@ function calculateRankPosition(rect, widthScale) {
2222
2241
  };
2223
2242
  }
2224
2243
 
2225
- const getViewportDimensions = (containerElm, scale) => {
2244
+ const getViewportDimensions = (containerElm, _scale) => {
2226
2245
  if (containerElm) {
2227
2246
  const containerRect = containerElm.getBoundingClientRect();
2228
- const width = scale ? containerRect.width / scale : containerRect.width;
2229
- const height = scale ? containerRect.height / scale : containerRect.height;
2247
+ const width = containerRect.width;
2248
+ const height = containerRect.width;
2230
2249
  return { width, height };
2231
2250
  }
2232
2251
  return {
@@ -2239,6 +2258,7 @@ const getElementDimensions = (options) => {
2239
2258
  const targetRect = targetElm.getBoundingClientRect();
2240
2259
  const calloutRect = calloutElm.getBoundingClientRect();
2241
2260
  const containerRect = containerElm.getBoundingClientRect();
2261
+ const scaledCalloutRect = getScaledCalloutRect();
2242
2262
  if (scale && containerRect) {
2243
2263
  const relativeTop = (targetRect.top - containerRect.top) / scale;
2244
2264
  const relativeLeft = (targetRect.left - containerRect.left) / scale;
@@ -2254,21 +2274,13 @@ const getElementDimensions = (options) => {
2254
2274
  width: scaledWidth,
2255
2275
  height: scaledHeight,
2256
2276
  },
2257
- calloutRect: {
2258
- ...calloutRect,
2259
- width: calloutRect.width / scale,
2260
- height: calloutRect.height / scale,
2261
- },
2277
+ calloutRect: scaledCalloutRect,
2262
2278
  };
2263
2279
  }
2264
2280
  if (scale) {
2265
2281
  return {
2266
2282
  targetRect,
2267
- calloutRect: {
2268
- ...calloutRect,
2269
- width: calloutRect.width / scale,
2270
- height: calloutRect.height / scale,
2271
- },
2283
+ calloutRect: scaledCalloutRect,
2272
2284
  };
2273
2285
  }
2274
2286
  return { targetRect, calloutRect };
@@ -2334,36 +2346,50 @@ const isLeftPositionValid = (leftPos, options) => {
2334
2346
  const { width: viewportWidth } = viewport;
2335
2347
  const absLeft = rectDimensions.targetAbsoluteRect?.left ?? 0;
2336
2348
  const relLeftPos = absLeft + leftPos - offset.x;
2337
- const maxViewportWidth = viewportWidth - padding + EPSILON;
2349
+ const calloutWidthScaled = calloutWidth / options.widthScale;
2350
+ const maxViewportWidth = viewportWidth + EPSILON;
2338
2351
  const isValidLeft = relLeftPos >= padding - EPSILON;
2339
- const isRectCalloutShowValid = relLeftPos + calloutWidth <= maxViewportWidth;
2352
+ const isRectCalloutShowValid = relLeftPos + calloutWidthScaled - EPSILON <= maxViewportWidth / options.widthScale;
2340
2353
  return isValidLeft && isRectCalloutShowValid;
2341
2354
  };
2342
2355
  const isRightPositionValid = (leftPos, options) => {
2343
- const { rectDimensions, viewport, padding } = options;
2356
+ const { rectDimensions, viewport } = options;
2344
2357
  const { width: calloutWidth } = rectDimensions.calloutRect;
2345
2358
  const { width: viewportWidth } = viewport;
2346
- const maxViewportWidth = viewportWidth - padding + EPSILON;
2347
- const isValidRight = leftPos - calloutWidth - padding - EPSILON <= maxViewportWidth;
2359
+ const calloutWidthScaled = calloutWidth / options.widthScale;
2360
+ const absLeft = rectDimensions.targetAbsoluteRect?.left ?? 0;
2361
+ const relLeftPos = absLeft + leftPos;
2362
+ const maxViewportWidth = viewportWidth + EPSILON;
2363
+ const isValidRight = relLeftPos - calloutWidthScaled - EPSILON <= maxViewportWidth / options.widthScale;
2348
2364
  return isValidRight;
2349
2365
  };
2350
2366
  const isVerticalPositionValid = (placement, options) => {
2351
2367
  const { rectDimensions, viewport, padding, arrowSize } = options;
2352
- const { targetRect, calloutRect } = rectDimensions;
2368
+ const { targetRect, targetAbsoluteRect, calloutRect } = rectDimensions;
2353
2369
  const { height: viewportHeight } = viewport;
2354
2370
  const { height: calloutHeight } = calloutRect;
2355
- return placement === 'top'
2356
- ? targetRect.top - calloutHeight - padding - arrowSize > -EPSILON
2357
- : targetRect.bottom + calloutHeight + padding + arrowSize < viewportHeight + EPSILON;
2371
+ const relativeTop = (targetAbsoluteRect?.top ?? 0) + targetRect.top;
2372
+ const calloutHeightScaled = calloutHeight / options.widthScale;
2373
+ switch (placement) {
2374
+ case 'top':
2375
+ return relativeTop - calloutHeightScaled - padding - arrowSize > -EPSILON;
2376
+ case 'bottom':
2377
+ return targetRect.bottom + calloutHeight + padding + arrowSize < viewportHeight + EPSILON;
2378
+ }
2358
2379
  };
2359
2380
  const isHorizontalPositionValid = (placement, options) => {
2360
2381
  const { rectDimensions, viewport, padding, arrowSize } = options;
2361
- const { targetRect, calloutRect } = rectDimensions;
2382
+ const { targetRect, targetAbsoluteRect, calloutRect } = rectDimensions;
2362
2383
  const { width: viewportWidth } = viewport;
2363
2384
  const { width: calloutWidth } = calloutRect;
2364
- return placement === 'right'
2365
- ? targetRect.right + calloutWidth + padding + arrowSize < viewportWidth + EPSILON
2366
- : targetRect.left - calloutWidth - padding - arrowSize > -EPSILON;
2385
+ const relativeLeft = (targetAbsoluteRect?.left ?? 0) + targetRect.left;
2386
+ const relativeRight = relativeLeft + targetRect.width;
2387
+ switch (placement) {
2388
+ case 'right':
2389
+ return relativeRight + calloutWidth + padding + arrowSize < viewportWidth + EPSILON;
2390
+ case 'left':
2391
+ return relativeLeft - calloutWidth - padding - arrowSize > -EPSILON;
2392
+ }
2367
2393
  };
2368
2394
 
2369
2395
  const generateVerticalPositionCandidates = (options) => {
@@ -2493,7 +2519,7 @@ const calcCalloutPosition = (options) => {
2493
2519
  const containerElm = isAbsolute ? calloutElm.parentElement : visualRef?.current;
2494
2520
  if (!containerElm)
2495
2521
  return;
2496
- const viewport = getViewportDimensions(visualRef?.current, scale);
2522
+ const viewport = getViewportDimensions(containerElm);
2497
2523
  const rectDimensions = getElementDimensions({ targetElm, calloutElm, scale, containerElm });
2498
2524
  const containerRect = createAdjustedContainerRect({ containerElm, scale, isAbsolute, visualRef });
2499
2525
  const options = {
@@ -2504,6 +2530,7 @@ const calcCalloutPosition = (options) => {
2504
2530
  padding,
2505
2531
  arrowSize,
2506
2532
  containerRect,
2533
+ widthScale,
2507
2534
  };
2508
2535
  const candidates = generateAllCandidates(options);
2509
2536
  const candidate = selectBestPosition(candidates);
@@ -2520,7 +2547,7 @@ const calcCalloutPosition = (options) => {
2520
2547
  };
2521
2548
  };
2522
2549
  const calcCalloutPositionAbsolute = (props) => {
2523
- const { widthScale, calloutElm, containerElm, element, onChange } = props;
2550
+ const { widthScale, calloutElm, containerElm, element, setPosition } = props;
2524
2551
  const mousePosition = element?.mousePosition;
2525
2552
  if (!mousePosition)
2526
2553
  return;
@@ -2529,14 +2556,7 @@ const calcCalloutPositionAbsolute = (props) => {
2529
2556
  const rawCalloutRect = calloutElm.getBoundingClientRect();
2530
2557
  if (rawCalloutRect.width === 0 || rawCalloutRect.height === 0)
2531
2558
  return;
2532
- const calloutRect = {
2533
- ...rawCalloutRect,
2534
- width: rawCalloutRect.width / widthScale,
2535
- height: rawCalloutRect.height / widthScale,
2536
- };
2537
2559
  const containerRect = containerElm.getBoundingClientRect();
2538
- const containerWidth = containerRect.width / widthScale;
2539
- const containerHeight = containerRect.height / widthScale;
2540
2560
  const mouseX = mousePosition.x;
2541
2561
  const mouseY = mousePosition.y;
2542
2562
  const targetRect = {
@@ -2552,16 +2572,13 @@ const calcCalloutPositionAbsolute = (props) => {
2552
2572
  };
2553
2573
  const rectDimensions = {
2554
2574
  targetRect,
2555
- calloutRect,
2575
+ calloutRect: getScaledCalloutRect(),
2556
2576
  targetAbsoluteRect: {
2557
2577
  top: element.top,
2558
2578
  left: element.left,
2559
2579
  },
2560
2580
  };
2561
- const viewport = {
2562
- width: containerWidth,
2563
- height: containerHeight,
2564
- };
2581
+ const viewport = getViewportDimensions(containerElm);
2565
2582
  const options = {
2566
2583
  rectDimensions,
2567
2584
  viewport,
@@ -2570,16 +2587,19 @@ const calcCalloutPositionAbsolute = (props) => {
2570
2587
  padding,
2571
2588
  arrowSize,
2572
2589
  containerRect,
2590
+ widthScale,
2573
2591
  };
2574
2592
  const candidates = generateAllCandidates(options);
2575
2593
  const bestPosition = selectBestPosition(candidates);
2576
- const style = {
2577
- position: 'absolute',
2594
+ const finalPosition = {
2578
2595
  top: bestPosition.top,
2579
2596
  left: bestPosition.left,
2580
- zIndex: 1000,
2597
+ placement: bestPosition.placement,
2598
+ horizontalAlign: bestPosition.horizontalAlign,
2581
2599
  };
2582
- onChange(style);
2600
+ setPosition(finalPosition);
2601
+ // const styleBestPosition = getStyleFromCandidate(bestPosition, widthScale);
2602
+ // onChange(styleBestPosition);
2583
2603
  };
2584
2604
 
2585
2605
  /**
@@ -7778,6 +7798,7 @@ const DEFAULT_POSITION = {
7778
7798
  };
7779
7799
  const ElementCallout = (props) => {
7780
7800
  const viewId = useViewIdContext();
7801
+ const widthScale = useHeatmapViz((s) => s.widthScale);
7781
7802
  const CompElementCallout = useHeatmapControlStore((state) => state.controls.ElementCallout);
7782
7803
  const calloutRef = useRef(null);
7783
7804
  const element = props.element;
@@ -7790,9 +7811,7 @@ const ElementCallout = (props) => {
7790
7811
  return null;
7791
7812
  const calloutContent = (jsx("div", { ref: calloutRef, className: className, style: {
7792
7813
  position: positionMode,
7793
- top: position.top,
7794
- left: position.left,
7795
- zIndex: Z_INDEX.CALLOUT,
7814
+ ...getStyleFromCandidate(position, widthScale),
7796
7815
  }, "aria-live": "assertive", role: "tooltip", children: CompElementCallout && jsx(CompElementCallout, { elementHash: element.hash }) }));
7797
7816
  if (!document.getElementById(portalContainerId))
7798
7817
  return null;
@@ -7974,7 +7993,18 @@ const ElementCalloutOverlay = (props) => {
7974
7993
  const widthScale = useHeatmapViz((s) => s.widthScale);
7975
7994
  const CompElementCallout = useHeatmapControlStore((state) => state.controls.ElementCallout);
7976
7995
  const calloutRef = useRef(null);
7977
- const [calloutStyle, setCalloutStyle] = useState(undefined);
7996
+ const [position, setPosition] = useState({
7997
+ top: 0,
7998
+ left: 0,
7999
+ placement: 'bottom',
8000
+ horizontalAlign: 'left',
8001
+ });
8002
+ const calloutStyle = useMemo(() => {
8003
+ return {
8004
+ ...getStyleFromCandidate(position, widthScale),
8005
+ position: 'absolute',
8006
+ };
8007
+ }, [position, widthScale]);
7978
8008
  useEffect(() => {
7979
8009
  const calloutElm = calloutRef.current;
7980
8010
  const containerElm = containerRef?.current;
@@ -7985,7 +8015,7 @@ const ElementCalloutOverlay = (props) => {
7985
8015
  calloutElm,
7986
8016
  containerElm,
7987
8017
  element,
7988
- onChange: setCalloutStyle,
8018
+ setPosition,
7989
8019
  });
7990
8020
  }, [element, widthScale, containerRef]);
7991
8021
  if (!element)
@@ -14,6 +14,10 @@ export interface IViewportDimensions {
14
14
  width: number;
15
15
  height: number;
16
16
  }
17
+ export interface ICalloutRect {
18
+ width: number;
19
+ height: number;
20
+ }
17
21
  export interface IRectDimensions {
18
22
  /**
19
23
  * The target elements rectangle with PORTAL element
@@ -26,7 +30,7 @@ export interface IRectDimensions {
26
30
  top: number;
27
31
  left: number;
28
32
  };
29
- calloutRect: DOMRect;
33
+ calloutRect: ICalloutRect;
30
34
  }
31
35
  export interface IPositionCandidateBase {
32
36
  top: number;
@@ -48,6 +52,7 @@ export interface IPositionCandidateOption {
48
52
  offset: IPositionCandidateOffset;
49
53
  padding: number;
50
54
  arrowSize: number;
55
+ widthScale: number;
51
56
  containerRect?: DOMRect;
52
57
  }
53
58
  export interface ICalcCalloutPositionProps {
@@ -70,6 +75,6 @@ export interface ICalcCalloutPositionAbsoluteProps {
70
75
  calloutElm: HTMLDivElement;
71
76
  containerElm: HTMLDivElement;
72
77
  element: ElementInfo;
73
- onChange: (style: React.CSSProperties) => void;
78
+ setPosition: (position: ICalloutPosition) => void;
74
79
  }
75
80
  //# sourceMappingURL=viz-elm-callout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"viz-elm-callout.d.ts","sourceRoot":"","sources":["../../src/types/viz-elm-callout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAClD,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG,oBAAoB,CAAC;AAC1E,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG,QAAQ,CAAC;AAEnE,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,iBAAiB,CAAC;IAC7B,eAAe,EAAE,oBAAoB,CAAC;CACvC;AAED,MAAM,WAAW,mBAAmB;IAClC,KAA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E,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,cAAc,CAAC;IAC3B,YAAY,EAAE,cAAc,CAAC;IAC7B,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"ElementCallout.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCallout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAkBvF,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,OAAO,CAAC;AAExD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,MAAM,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8CxD,CAAC"}
1
+ {"version":3,"file":"ElementCallout.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCallout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAiBvF,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,OAAO,CAAC;AAExD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,MAAM,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAClC,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6CxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ElementCalloutOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCalloutOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO5D,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+B/D,CAAC"}
1
+ {"version":3,"file":"ElementCalloutOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCalloutOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO5D,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2C/D,CAAC"}