@gemx-dev/heatmap-react 3.5.92-dev.22 → 3.5.92-dev.24

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 (76) hide show
  1. package/dist/esm/components/VizElement/ElementCallout.d.ts +2 -2
  2. package/dist/esm/components/VizElement/ElementCallout.d.ts.map +1 -1
  3. package/dist/esm/components/VizElement/ElementCalloutClicked.d.ts +2 -2
  4. package/dist/esm/components/VizElement/ElementCalloutClicked.d.ts.map +1 -1
  5. package/dist/esm/components/VizElement/ElementCalloutHovered.d.ts +2 -1
  6. package/dist/esm/components/VizElement/ElementCalloutHovered.d.ts.map +1 -1
  7. package/dist/esm/components/VizElement/ElementMissing.d.ts +2 -1
  8. package/dist/esm/components/VizElement/ElementMissing.d.ts.map +1 -1
  9. package/dist/esm/components/VizElement/HeatmapElements.d.ts +4 -4
  10. package/dist/esm/components/VizElement/HeatmapElements.d.ts.map +1 -1
  11. package/dist/esm/components/VizElement/VizElements.d.ts +4 -3
  12. package/dist/esm/components/VizElement/VizElements.d.ts.map +1 -1
  13. package/dist/esm/components/VizScrollmap/HoverZones.d.ts +3 -3
  14. package/dist/esm/components/VizScrollmap/HoverZones.d.ts.map +1 -1
  15. package/dist/esm/components/VizScrollmap/Minimap.d.ts +3 -3
  16. package/dist/esm/components/VizScrollmap/Minimap.d.ts.map +1 -1
  17. package/dist/esm/helpers/canvas-backdrop.d.ts.map +1 -1
  18. package/dist/esm/helpers/viewport/element.d.ts +2 -2
  19. package/dist/esm/helpers/viewport/element.d.ts.map +1 -1
  20. package/dist/esm/helpers/viz-elm-callout/viz-elm.d.ts.map +1 -1
  21. package/dist/esm/hooks/viz-canvas/useHeatmapCanvas.d.ts.map +1 -1
  22. package/dist/esm/hooks/viz-elm/useClickedElement.d.ts +2 -2
  23. package/dist/esm/hooks/viz-elm/useClickedElement.d.ts.map +1 -1
  24. package/dist/esm/hooks/viz-elm/useElementCalloutVisible.d.ts +2 -1
  25. package/dist/esm/hooks/viz-elm/useElementCalloutVisible.d.ts.map +1 -1
  26. package/dist/esm/hooks/viz-elm/useHeatmapElementPosition.d.ts +3 -3
  27. package/dist/esm/hooks/viz-elm/useHeatmapElementPosition.d.ts.map +1 -1
  28. package/dist/esm/hooks/viz-elm/useHoveredElement.d.ts +2 -1
  29. package/dist/esm/hooks/viz-elm/useHoveredElement.d.ts.map +1 -1
  30. package/dist/esm/index.js +31 -84
  31. package/dist/esm/index.mjs +31 -84
  32. package/dist/esm/libs/visualizer/renderers/ScrollBucketRenderer.d.ts.map +1 -1
  33. package/dist/esm/types/viz-elm-callout.d.ts +2 -1
  34. package/dist/esm/types/viz-elm-callout.d.ts.map +1 -1
  35. package/dist/umd/components/VizElement/ElementCallout.d.ts +2 -2
  36. package/dist/umd/components/VizElement/ElementCallout.d.ts.map +1 -1
  37. package/dist/umd/components/VizElement/ElementCalloutClicked.d.ts +2 -2
  38. package/dist/umd/components/VizElement/ElementCalloutClicked.d.ts.map +1 -1
  39. package/dist/umd/components/VizElement/ElementCalloutHovered.d.ts +2 -1
  40. package/dist/umd/components/VizElement/ElementCalloutHovered.d.ts.map +1 -1
  41. package/dist/umd/components/VizElement/ElementMissing.d.ts +2 -1
  42. package/dist/umd/components/VizElement/ElementMissing.d.ts.map +1 -1
  43. package/dist/umd/components/VizElement/HeatmapElements.d.ts +4 -4
  44. package/dist/umd/components/VizElement/HeatmapElements.d.ts.map +1 -1
  45. package/dist/umd/components/VizElement/VizElements.d.ts +4 -3
  46. package/dist/umd/components/VizElement/VizElements.d.ts.map +1 -1
  47. package/dist/umd/components/VizScrollmap/HoverZones.d.ts +3 -3
  48. package/dist/umd/components/VizScrollmap/HoverZones.d.ts.map +1 -1
  49. package/dist/umd/components/VizScrollmap/Minimap.d.ts +3 -3
  50. package/dist/umd/components/VizScrollmap/Minimap.d.ts.map +1 -1
  51. package/dist/umd/helpers/canvas-backdrop.d.ts.map +1 -1
  52. package/dist/umd/helpers/viewport/element.d.ts +2 -2
  53. package/dist/umd/helpers/viewport/element.d.ts.map +1 -1
  54. package/dist/umd/helpers/viz-elm-callout/viz-elm.d.ts.map +1 -1
  55. package/dist/umd/hooks/viz-canvas/useHeatmapCanvas.d.ts.map +1 -1
  56. package/dist/umd/hooks/viz-elm/useClickedElement.d.ts +2 -2
  57. package/dist/umd/hooks/viz-elm/useClickedElement.d.ts.map +1 -1
  58. package/dist/umd/hooks/viz-elm/useElementCalloutVisible.d.ts +2 -1
  59. package/dist/umd/hooks/viz-elm/useElementCalloutVisible.d.ts.map +1 -1
  60. package/dist/umd/hooks/viz-elm/useHeatmapElementPosition.d.ts +3 -3
  61. package/dist/umd/hooks/viz-elm/useHeatmapElementPosition.d.ts.map +1 -1
  62. package/dist/umd/hooks/viz-elm/useHoveredElement.d.ts +2 -1
  63. package/dist/umd/hooks/viz-elm/useHoveredElement.d.ts.map +1 -1
  64. package/dist/umd/index.js +2 -2
  65. package/dist/umd/libs/visualizer/renderers/ScrollBucketRenderer.d.ts.map +1 -1
  66. package/dist/umd/types/viz-elm-callout.d.ts +2 -1
  67. package/dist/umd/types/viz-elm-callout.d.ts.map +1 -1
  68. package/package.json +1 -1
  69. package/dist/esm/hooks/viz-canvas/useAreamap.d.ts +0 -14
  70. package/dist/esm/hooks/viz-canvas/useAreamap.d.ts.map +0 -1
  71. package/dist/esm/hooks/viz-canvas/useAttentionMap.d.ts +0 -9
  72. package/dist/esm/hooks/viz-canvas/useAttentionMap.d.ts.map +0 -1
  73. package/dist/umd/hooks/viz-canvas/useAreamap.d.ts +0 -14
  74. package/dist/umd/hooks/viz-canvas/useAreamap.d.ts.map +0 -1
  75. package/dist/umd/hooks/viz-canvas/useAttentionMap.d.ts +0 -9
  76. package/dist/umd/hooks/viz-canvas/useAttentionMap.d.ts.map +0 -1
@@ -1,9 +1,9 @@
1
- import type { ElementInfo, IHorizontalAlignment } from '../../types';
1
+ import type { ElementInfo, IHeatmapRef, IHorizontalAlignment } from '../../types';
2
2
  export type ICalloutPositionMode = 'absolute' | 'fixed';
3
3
  export interface ElementCalloutProps {
4
4
  element: ElementInfo;
5
5
  target: string;
6
- visualRef: React.RefObject<HTMLDivElement>;
6
+ visualRef: IHeatmapRef['Visual'];
7
7
  alignment?: IHorizontalAlignment;
8
8
  offset?: {
9
9
  x: number;
@@ -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;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,CAkDxD,CAAC"}
1
+ {"version":3,"file":"ElementCallout.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCallout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAoB,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAiBpG,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,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,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,CAkDxD,CAAC"}
@@ -1,8 +1,8 @@
1
- import type { ElementRect } from '../../types';
1
+ import type { ElementRect, IHeatmapRef } from '../../types';
2
2
  import type { ICalloutPositionMode } from './ElementCallout';
3
3
  interface ElementCalloutClickedProps {
4
4
  isSecondary?: boolean;
5
- visualRef: React.RefObject<HTMLDivElement>;
5
+ visualRef: IHeatmapRef['Visual'];
6
6
  positionMode?: ICalloutPositionMode;
7
7
  containerRef?: React.RefObject<HTMLDivElement>;
8
8
  getRect: (el?: any) => ElementRect | null;
@@ -1 +1 @@
1
- {"version":3,"file":"ElementCalloutClicked.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCalloutClicked.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAU7D,UAAU,0BAA0B;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,WAAW,GAAG,IAAI,CAAC;CAC3C;AAgCD,eAAO,MAAM,qBAAqB,kEAAuC,CAAC"}
1
+ {"version":3,"file":"ElementCalloutClicked.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCalloutClicked.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAU7D,UAAU,0BAA0B;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/C,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,WAAW,GAAG,IAAI,CAAC;CAC3C;AAgCD,eAAO,MAAM,qBAAqB,kEAAuC,CAAC"}
@@ -1,7 +1,8 @@
1
+ import type { IHeatmapRef } from '../../types';
1
2
  import type { ICalloutPositionMode } from './ElementCallout';
2
3
  interface ElementCalloutHoveredProps {
3
4
  isSecondary?: boolean;
4
- visualRef: React.RefObject<HTMLDivElement>;
5
+ visualRef: IHeatmapRef['Visual'];
5
6
  positionMode?: ICalloutPositionMode;
6
7
  onClick?: (event?: React.MouseEvent<HTMLDivElement>, hash?: string) => void;
7
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ElementCalloutHovered.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCalloutHovered.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAW7D,UAAU,0BAA0B;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7E;AAkBD,eAAO,MAAM,qBAAqB,kEAAuC,CAAC"}
1
+ {"version":3,"file":"ElementCalloutHovered.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementCalloutHovered.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAW7D,UAAU,0BAA0B;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7E;AAkBD,eAAO,MAAM,qBAAqB,kEAAuC,CAAC"}
@@ -1,6 +1,7 @@
1
+ import type { IHeatmapRef } from '../../types';
1
2
  interface Props {
2
3
  show?: boolean;
3
- visualRef: React.RefObject<HTMLDivElement>;
4
+ visualRef: IHeatmapRef['Visual'];
4
5
  }
5
6
  export declare const ElementMissing: React.FC<Props>;
6
7
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ElementMissing.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementMissing.tsx"],"names":[],"mappings":"AAGA,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;CAC5C;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAoF1C,CAAC"}
1
+ {"version":3,"file":"ElementMissing.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/ElementMissing.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/C,UAAU,KAAK;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAoF1C,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { IHeatmapInfo, WebVisualizer } from '../../types';
1
+ import type { IHeatmapInfo, IHeatmapRef, WebVisualizer } from '../../types';
2
2
  import { type ICalloutPositionMode } from './ElementCallout';
3
3
  interface HeatmapElementsProps {
4
4
  heatmapInfo?: IHeatmapInfo;
@@ -8,9 +8,9 @@ interface HeatmapElementsProps {
8
8
  isHideTopRank?: boolean;
9
9
  isSecondary?: boolean;
10
10
  positionMode?: ICalloutPositionMode;
11
- iframeRef: React.RefObject<HTMLIFrameElement>;
12
- wrapperRef: React.RefObject<HTMLElement>;
13
- visualRef: React.RefObject<HTMLDivElement>;
11
+ iframeRef: IHeatmapRef['Iframe'];
12
+ wrapperRef: IHeatmapRef['Wrapper'];
13
+ visualRef: IHeatmapRef['Visual'];
14
14
  }
15
15
  export declare const HeatmapElements: React.FC<HeatmapElementsProps>;
16
16
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"HeatmapElements.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/HeatmapElements.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAe7D,UAAU,oBAAoB;IAC5B,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC9C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACzC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;CAC5C;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgD1D,CAAC"}
1
+ {"version":3,"file":"HeatmapElements.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/HeatmapElements.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAe7D,UAAU,oBAAoB;IAC5B,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,UAAU,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgD1D,CAAC"}
@@ -1,7 +1,8 @@
1
+ import type { IHeatmapRef } from '../../types';
1
2
  interface VizElementsProps {
2
- iframeRef: React.RefObject<HTMLIFrameElement | null>;
3
- visualRef: React.RefObject<HTMLDivElement | null>;
4
- wrapperRef: React.RefObject<HTMLDivElement>;
3
+ iframeRef: IHeatmapRef['Iframe'];
4
+ visualRef: IHeatmapRef['Visual'];
5
+ wrapperRef: IHeatmapRef['Wrapper'];
5
6
  }
6
7
  export declare const VizElements: React.FC<VizElementsProps>;
7
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"VizElements.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/VizElements.tsx"],"names":[],"mappings":"AAMA,UAAU,gBAAgB;IACxB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClD,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;CAC7C;AACD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAiClD,CAAC"}
1
+ {"version":3,"file":"VizElements.d.ts","sourceRoot":"","sources":["../../../src/components/VizElement/VizElements.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,aAAa,CAAC;AAM9D,UAAU,gBAAgB;IACxB,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,UAAU,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CACpC;AACD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAiClD,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { IScrollMapPosition } from '../../types';
1
+ import type { IHeatmapRef, IScrollMapPosition } from '../../types';
2
2
  interface HoverZonesProps {
3
- wrapperRef: React.RefObject<HTMLElement>;
4
- iframeRef: React.RefObject<HTMLIFrameElement | null>;
3
+ wrapperRef: IHeatmapRef['Wrapper'];
4
+ iframeRef: IHeatmapRef['Iframe'];
5
5
  position?: IScrollMapPosition;
6
6
  currentScrollPercent: number;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HoverZones.d.ts","sourceRoot":"","sources":["../../../src/components/VizScrollmap/HoverZones.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMtD,UAAU,eAAe;IACvB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACzC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkChD,CAAC"}
1
+ {"version":3,"file":"HoverZones.d.ts","sourceRoot":"","sources":["../../../src/components/VizScrollmap/HoverZones.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKnE,UAAU,eAAe;IACvB,UAAU,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAUhD,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { IScrollZone } from '../../types';
1
+ import type { IHeatmapRef } from '../../types';
2
2
  interface MinimapProps {
3
- zones: IScrollZone[];
4
- maxUsers: number;
3
+ wrapperRef: IHeatmapRef['Wrapper'];
4
+ iframeRef: IHeatmapRef['Iframe'];
5
5
  }
6
6
  export declare const Minimap: React.FC<MinimapProps>;
7
7
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Minimap.d.ts","sourceRoot":"","sources":["../../../src/components/VizScrollmap/Minimap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM/C,UAAU,YAAY;IACpB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAuD1C,CAAC"}
1
+ {"version":3,"file":"Minimap.d.ts","sourceRoot":"","sources":["../../../src/components/VizScrollmap/Minimap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAW/C,UAAU,YAAY;IACpB,UAAU,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA8D1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"canvas-backdrop.d.ts","sourceRoot":"","sources":["../../src/helpers/canvas-backdrop.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE;QACV,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,eAAe,KAAG,IAgDjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,iBAAiB,KAAG,IAKvD,CAAC"}
1
+ {"version":3,"file":"canvas-backdrop.d.ts","sourceRoot":"","sources":["../../src/helpers/canvas-backdrop.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE;QACV,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,eAAe,KAAG,IA6BjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,iBAAiB,KAAG,IAKvD,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ElementRect, IVisualDomViewport } from '../../types';
2
- export declare function isElementInViewport(elementRect: ElementRect, visualRef: React.RefObject<HTMLDivElement>, scale: number): boolean;
1
+ import type { ElementRect, IHeatmapRef, IVisualDomViewport } from '../../types';
2
+ export declare function isElementInViewport(elementRect: ElementRect, visualRef: IHeatmapRef['Visual'], scale: number): boolean;
3
3
  export declare function isElementRectInViewport(elementRect: ElementRect, visualRect: IVisualDomViewport, scale: number): boolean;
4
4
  //# sourceMappingURL=element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../src/helpers/viewport/element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEnE,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAC1C,KAAK,EAAE,MAAM,GACZ,OAAO,CAqBT;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,kBAAkB,EAC9B,KAAK,EAAE,MAAM,GACZ,OAAO,CAoBT"}
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../src/helpers/viewport/element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEhF,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,EAChC,KAAK,EAAE,MAAM,GACZ,OAAO,CAqBT;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,kBAAkB,EAC9B,KAAK,EAAE,MAAM,GACZ,OAAO,CAoBT"}
@@ -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;AAkErB,eAAO,MAAM,mBAAmB,GAAI,SAAS,yBAAyB,eAkDrE,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,OAAO,iCAAiC,SAiEnF,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,EAM1B,MAAM,aAAa,CAAC;AAgErB,eAAO,MAAM,mBAAmB,GAAI,SAAS,yBAAyB,eAkDrE,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,OAAO,iCAAiC,SAiEnF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useHeatmapCanvas.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-canvas/useHeatmapCanvas.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB,YAwB5B,CAAC"}
1
+ {"version":3,"file":"useHeatmapCanvas.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-canvas/useHeatmapCanvas.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB,YA4B5B,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { ElementInfo, ElementRect } from '../../types';
1
+ import type { ElementInfo, ElementRect, IHeatmapRef } from '../../types';
2
2
  interface Params {
3
- visualRef: React.RefObject<HTMLDivElement>;
3
+ visualRef: IHeatmapRef['Visual'];
4
4
  getRect: (el?: any) => ElementRect | null;
5
5
  }
6
6
  export declare const scrollToElementIfNeeded: (visualRef: React.RefObject<HTMLDivElement>, rect: ElementRect, scale: number, onScrollComplete?: () => void) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useClickedElement.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useClickedElement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAQ5D,UAAU,MAAM;IACd,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,WAAW,GAAG,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,uBAAuB,GAClC,WAAW,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAC1C,MAAM,WAAW,EACjB,OAAO,MAAM,EACb,mBAAmB,MAAM,IAAI,KAC5B,IAkCF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,wBAAwB,MAAM;;;;CA0D/D,CAAC"}
1
+ {"version":3,"file":"useClickedElement.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useClickedElement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAQzE,UAAU,MAAM;IACd,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,WAAW,GAAG,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,uBAAuB,GAClC,WAAW,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAC1C,MAAM,WAAW,EACjB,OAAO,MAAM,EACb,mBAAmB,MAAM,IAAI,KAC5B,IAkCF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,wBAAwB,MAAM;;;;CA0D/D,CAAC"}
@@ -1,5 +1,6 @@
1
+ import type { IHeatmapRef } from '../../types';
1
2
  interface Params {
2
- visualRef: React.RefObject<HTMLDivElement>;
3
+ visualRef: IHeatmapRef['Visual'];
3
4
  getRect: (el?: any) => any;
4
5
  positionMode?: 'absolute' | 'fixed';
5
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useElementCalloutVisible.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useElementCalloutVisible.ts"],"names":[],"mappings":"AAIA,UAAU,MAAM;IACd,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC3C,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;IAC3B,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,wBAAwB,GAAI,sCAAsC,MAAM,OAuCpF,CAAC"}
1
+ {"version":3,"file":"useElementCalloutVisible.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useElementCalloutVisible.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM/C,UAAU,MAAM;IACd,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;IAC3B,YAAY,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,wBAAwB,GAAI,sCAAsC,MAAM,OAuCpF,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { ElementRect, IClickmapSorted, WebVisualizer } from '../../types';
1
+ import type { ElementRect, IClickmapSorted, IHeatmapRef, WebVisualizer } from '../../types';
2
2
  interface Params {
3
- iframeRef: React.RefObject<HTMLIFrameElement>;
4
- wrapperRef: React.RefObject<HTMLElement>;
3
+ iframeRef: IHeatmapRef['Iframe'];
4
+ wrapperRef: IHeatmapRef['Wrapper'];
5
5
  visualizer?: WebVisualizer;
6
6
  }
7
7
  export declare const useHeatmapElementPosition: ({ iframeRef, wrapperRef, visualizer }: Params) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useHeatmapElementPosition.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useHeatmapElementPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO/E,UAAU,MAAM;IACd,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC9C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACzC,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,yBAAyB,GAAI,uCAAuC,MAAM;wBAMxE,eAAe,KAAG,WAAW,GAAG,IAAI;CA2ClD,CAAC"}
1
+ {"version":3,"file":"useHeatmapElementPosition.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useHeatmapElementPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO5F,UAAU,MAAM;IACd,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,UAAU,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,yBAAyB,GAAI,uCAAuC,MAAM;wBAMxE,eAAe,KAAG,WAAW,GAAG,IAAI;CA2ClD,CAAC"}
@@ -1,5 +1,6 @@
1
+ import type { IHeatmapRef } from '../../types';
1
2
  interface Params {
2
- iframeRef: React.RefObject<HTMLIFrameElement>;
3
+ iframeRef: IHeatmapRef['Iframe'];
3
4
  getRect: (el?: any) => any;
4
5
  }
5
6
  export declare const useHoveredElement: ({ iframeRef, getRect }: Params) => {
@@ -1 +1 @@
1
- {"version":3,"file":"useHoveredElement.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useHoveredElement.ts"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACd,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC9C,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,GAAI,wBAAwB,MAAM;uEAiDpD,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC;;0BA4B/B,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,MAAM;CA6B3D,CAAC;AAiBF,eAAO,MAAM,6BAA6B,GACxC,SAAS,MAAM,EACf,SAAS,MAAM,EACf,YAAY,OAAO,EACnB,OAAO,MAAM,KACZ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAUxB,CAAC"}
1
+ {"version":3,"file":"useHoveredElement.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-elm/useHoveredElement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,aAAa,CAAC;AAe7D,UAAU,MAAM;IACd,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,GAAI,wBAAwB,MAAM;uEAiDpD,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC;;0BA4B/B,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,MAAM;CA6B3D,CAAC;AAiBF,eAAO,MAAM,6BAA6B,GACxC,SAAS,MAAM,EACf,SAAS,MAAM,EACf,YAAY,OAAO,EACnB,OAAO,MAAM,KACZ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAUxB,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1677,30 +1677,15 @@ const drawBackdropWithCutout = (options) => {
1677
1677
  const height = Math.min(canvasHeight - top, activeRect.height + cutoutExpansion * 2);
1678
1678
  // Clear previous drawing
1679
1679
  ctx.clearRect(0, 0, canvasWidth, canvasHeight);
1680
- // Set backdrop style
1680
+ // Draw backdrop as a single path with a cutout hole using evenodd fill rule.
1681
+ // This avoids seam artifacts that appear when using 4 separate rectangles
1682
+ // with fractional coordinates (sub-pixel gaps at rect boundaries).
1681
1683
  ctx.fillStyle = backdropColor;
1682
1684
  ctx.globalAlpha = backdropOpacity;
1683
- // Draw backdrop in 4 rectangles around the active element
1684
- // This creates a cutout effect
1685
- // Top rectangle (above active element)
1686
- if (top > 0) {
1687
- ctx.fillRect(0, 0, canvasWidth, top);
1688
- }
1689
- // Bottom rectangle (below active element)
1690
- const bottomY = top + height;
1691
- if (bottomY < canvasHeight) {
1692
- ctx.fillRect(0, bottomY, canvasWidth, canvasHeight - bottomY);
1693
- }
1694
- // Left rectangle (left of active element)
1695
- if (left > 0) {
1696
- ctx.fillRect(0, top, left, height);
1697
- }
1698
- // Right rectangle (right of active element)
1699
- const rightX = left + width;
1700
- if (rightX < canvasWidth) {
1701
- ctx.fillRect(rightX, top, canvasWidth - rightX, height);
1702
- }
1703
- // Reset alpha
1685
+ ctx.beginPath();
1686
+ ctx.rect(0, 0, canvasWidth, canvasHeight); // outer (full canvas)
1687
+ ctx.rect(left, top, width, height); // inner (cutout hole)
1688
+ ctx.fill('evenodd');
1704
1689
  ctx.globalAlpha = 1.0;
1705
1690
  };
1706
1691
  /**
@@ -3221,7 +3206,7 @@ function useAreaEditMode({ iframeRef, onAreaCreatedElement, enabled = false, })
3221
3206
  }
3222
3207
  iframeDocument.addEventListener('mousemove', handleMouseMove);
3223
3208
  iframeDocument.addEventListener('scroll', handleMouseLeave);
3224
- iframeDocument.removeEventListener('mouseleave', handleMouseLeave);
3209
+ iframeDocument.addEventListener('mouseleave', handleMouseLeave);
3225
3210
  iframeDocument.addEventListener('click', handleClick);
3226
3211
  return () => {
3227
3212
  iframeDocument.removeEventListener('mousemove', handleMouseMove);
@@ -3596,6 +3581,7 @@ const useHeatmapCanvas = () => {
3596
3581
  const heatmapType = useHeatmapSettingContext((state) => state.heatmapType);
3597
3582
  const clickMode = useHeatmapSettingContext((state) => state.clickMode);
3598
3583
  const scrollType = useHeatmapSettingContext((state) => state.scrollType);
3584
+ const setSelectedElement = useHeatmapClickContext((s) => s.setSelectedElement);
3599
3585
  const { start: startClickmap } = useClickmap();
3600
3586
  const { start: startAreaClickmap } = useAreaClickmap();
3601
3587
  const { start: startScrollmap } = useScrollmap();
@@ -3614,7 +3600,10 @@ const useHeatmapCanvas = () => {
3614
3600
  startScrollmap();
3615
3601
  break;
3616
3602
  }
3617
- }, [heatmapType, clickMode, startClickmap, startAreaClickmap, startScrollmap, scrollType]);
3603
+ return () => {
3604
+ setSelectedElement(null);
3605
+ };
3606
+ }, [heatmapType, clickMode, startClickmap, startAreaClickmap, startScrollmap, scrollType]); // eslint-disable-line react-hooks/exhaustive-deps
3618
3607
  };
3619
3608
 
3620
3609
  const scrollToElementIfNeeded = (visualRef, rect, scale, onScrollComplete) => {
@@ -6103,19 +6092,24 @@ class ScrollBucketRenderer {
6103
6092
  if (canvas.width <= 0 || canvas.height <= 0)
6104
6093
  return;
6105
6094
  const buckets = this.mapToBuckets(data);
6106
- if (buckets.length === 0)
6107
- return;
6108
- const maxPercent = Math.max(...buckets.map((b) => b.percent));
6109
- if (maxPercent <= 0)
6110
- return;
6095
+ const maxPercent = buckets.length > 0 ? Math.max(...buckets.map((b) => b.percent)) : 0;
6096
+ // Coldest hue (240 = blue) used as the baseline for buckets with no data
6097
+ const coldColor = 'hsla(240, 100%, 50%, 0.6)';
6111
6098
  const gradient = context.createLinearGradient(0, 0, 0, canvas.height);
6112
- for (const bucket of buckets) {
6113
- const stopMid = (bucket.startY + bucket.endY) / 2 / 100;
6114
- // Same hue direction as HeatmapHelper.scroll() (MaxHue = 240):
6115
- // high percent → hue 0 (red/hot), low percent → hue 240 (blue/cold)
6116
- const hue = (1 - bucket.percent / maxPercent) * 240;
6117
- const color = `hsla(${Math.round(hue)}, 100%, 50%, 0.6)`;
6118
- gradient.addColorStop(stopMid, color);
6099
+ if (buckets.length === 0 || maxPercent <= 0) {
6100
+ // No data fill entire canvas with the coldest color
6101
+ gradient.addColorStop(0, coldColor);
6102
+ gradient.addColorStop(1, coldColor);
6103
+ }
6104
+ else {
6105
+ for (const bucket of buckets) {
6106
+ const stopMid = (bucket.startY + bucket.endY) / 2 / 100;
6107
+ // Same hue direction as HeatmapHelper.scroll() (MaxHue = 240):
6108
+ // high percent → hue 0 (red/hot), low percent → hue 240 (blue/cold)
6109
+ const hue = (1 - bucket.percent / maxPercent) * 240;
6110
+ const color = `hsla(${Math.round(hue)}, 100%, 50%, 0.6)`;
6111
+ gradient.addColorStop(stopMid, color);
6112
+ }
6119
6113
  }
6120
6114
  context.fillStyle = gradient;
6121
6115
  context.fillRect(0, 0, canvas.width, canvas.height);
@@ -8485,45 +8479,6 @@ const VizClickmap = ({ iframeRef, visualRef, wrapperRef }) => {
8485
8479
  }
8486
8480
  };
8487
8481
 
8488
- const IS_ENABLE_MINIMAP = false;
8489
- const Minimap = ({ zones, maxUsers }) => {
8490
- const scrollType = useHeatmapSettingContext((s) => s.scrollType);
8491
- const showMinimap = useHeatmapScrollContext((s) => s.showMinimap);
8492
- const isScrollType = [EScrollType.Attention].includes(scrollType ?? EScrollType.Depth);
8493
- if (!showMinimap || !isScrollType || !IS_ENABLE_MINIMAP)
8494
- return null;
8495
- return (jsx("div", { style: {
8496
- position: 'fixed',
8497
- left: '20px',
8498
- top: '50%',
8499
- transform: 'translateY(-50%)',
8500
- width: '60px',
8501
- height: '400px',
8502
- backgroundColor: 'white',
8503
- borderRadius: '8px',
8504
- boxShadow: '0 4px 16px rgba(0,0,0,0.15)',
8505
- zIndex: 10002,
8506
- padding: '8px',
8507
- boxSizing: 'border-box',
8508
- }, children: jsx("div", { style: {
8509
- width: '100%',
8510
- height: '100%',
8511
- borderRadius: '4px',
8512
- overflow: 'hidden',
8513
- display: 'flex',
8514
- flexDirection: 'column',
8515
- }, children: zones.map((zone) => {
8516
- const normalized = maxUsers > 0 ? zone.percUsers / maxUsers : 0;
8517
- const color = getScrollGradientColor(normalized);
8518
- return (jsx("div", { title: `${zone.label}: ${zone.percUsers.toFixed(2)}%`, style: {
8519
- width: '100%',
8520
- flex: `${zone.endY - zone.startY}`,
8521
- backgroundColor: color,
8522
- borderBottom: '1px solid rgba(255,255,255,0.2)',
8523
- } }, zone.id));
8524
- }) }) }));
8525
- };
8526
-
8527
8482
  const ScrollZoneTooltip = ({ zone, position, currentScrollPercent, scrollmap, }) => {
8528
8483
  const CompScrollZoneTooltip = useHeatmapControlStore((state) => state.controls.ScrollZoneTooltip);
8529
8484
  const tooltipRef = useRef(null);
@@ -8549,17 +8504,9 @@ const ScrollZoneTooltip = ({ zone, position, currentScrollPercent, scrollmap, })
8549
8504
 
8550
8505
  const HoverZones = ({ iframeRef, wrapperRef, position, currentScrollPercent }) => {
8551
8506
  const scrollmap = useHeatmapDataContext((s) => s.scrollmap);
8552
- // const hoveredZone = useHeatmapVizScrollStore((state) => state.hoveredZone);
8553
- // const setHoveredZone = useHeatmapVizScrollStore((state) => state.setHoveredZone);
8554
- const { zones, isReady, maxUsers } = useScrollmapZones({
8555
- iframeRef,
8556
- wrapperRef,
8557
- });
8558
- if (!isReady || !zones.length)
8559
- return null;
8560
8507
  if (!position)
8561
8508
  return null;
8562
- return (jsxs(Fragment, { children: [jsx(ScrollZoneTooltip, { position: position, currentScrollPercent: currentScrollPercent, scrollmap: scrollmap || [] }), jsx(Minimap, { zones: zones, maxUsers: maxUsers })] }));
8509
+ return (jsx(Fragment, { children: jsx(ScrollZoneTooltip, { position: position, currentScrollPercent: currentScrollPercent, scrollmap: scrollmap || [] }) }));
8563
8510
  };
8564
8511
 
8565
8512
  const ScrollOverlay = ({ wrapperRef, iframeRef }) => {
@@ -1677,30 +1677,15 @@ const drawBackdropWithCutout = (options) => {
1677
1677
  const height = Math.min(canvasHeight - top, activeRect.height + cutoutExpansion * 2);
1678
1678
  // Clear previous drawing
1679
1679
  ctx.clearRect(0, 0, canvasWidth, canvasHeight);
1680
- // Set backdrop style
1680
+ // Draw backdrop as a single path with a cutout hole using evenodd fill rule.
1681
+ // This avoids seam artifacts that appear when using 4 separate rectangles
1682
+ // with fractional coordinates (sub-pixel gaps at rect boundaries).
1681
1683
  ctx.fillStyle = backdropColor;
1682
1684
  ctx.globalAlpha = backdropOpacity;
1683
- // Draw backdrop in 4 rectangles around the active element
1684
- // This creates a cutout effect
1685
- // Top rectangle (above active element)
1686
- if (top > 0) {
1687
- ctx.fillRect(0, 0, canvasWidth, top);
1688
- }
1689
- // Bottom rectangle (below active element)
1690
- const bottomY = top + height;
1691
- if (bottomY < canvasHeight) {
1692
- ctx.fillRect(0, bottomY, canvasWidth, canvasHeight - bottomY);
1693
- }
1694
- // Left rectangle (left of active element)
1695
- if (left > 0) {
1696
- ctx.fillRect(0, top, left, height);
1697
- }
1698
- // Right rectangle (right of active element)
1699
- const rightX = left + width;
1700
- if (rightX < canvasWidth) {
1701
- ctx.fillRect(rightX, top, canvasWidth - rightX, height);
1702
- }
1703
- // Reset alpha
1685
+ ctx.beginPath();
1686
+ ctx.rect(0, 0, canvasWidth, canvasHeight); // outer (full canvas)
1687
+ ctx.rect(left, top, width, height); // inner (cutout hole)
1688
+ ctx.fill('evenodd');
1704
1689
  ctx.globalAlpha = 1.0;
1705
1690
  };
1706
1691
  /**
@@ -3221,7 +3206,7 @@ function useAreaEditMode({ iframeRef, onAreaCreatedElement, enabled = false, })
3221
3206
  }
3222
3207
  iframeDocument.addEventListener('mousemove', handleMouseMove);
3223
3208
  iframeDocument.addEventListener('scroll', handleMouseLeave);
3224
- iframeDocument.removeEventListener('mouseleave', handleMouseLeave);
3209
+ iframeDocument.addEventListener('mouseleave', handleMouseLeave);
3225
3210
  iframeDocument.addEventListener('click', handleClick);
3226
3211
  return () => {
3227
3212
  iframeDocument.removeEventListener('mousemove', handleMouseMove);
@@ -3596,6 +3581,7 @@ const useHeatmapCanvas = () => {
3596
3581
  const heatmapType = useHeatmapSettingContext((state) => state.heatmapType);
3597
3582
  const clickMode = useHeatmapSettingContext((state) => state.clickMode);
3598
3583
  const scrollType = useHeatmapSettingContext((state) => state.scrollType);
3584
+ const setSelectedElement = useHeatmapClickContext((s) => s.setSelectedElement);
3599
3585
  const { start: startClickmap } = useClickmap();
3600
3586
  const { start: startAreaClickmap } = useAreaClickmap();
3601
3587
  const { start: startScrollmap } = useScrollmap();
@@ -3614,7 +3600,10 @@ const useHeatmapCanvas = () => {
3614
3600
  startScrollmap();
3615
3601
  break;
3616
3602
  }
3617
- }, [heatmapType, clickMode, startClickmap, startAreaClickmap, startScrollmap, scrollType]);
3603
+ return () => {
3604
+ setSelectedElement(null);
3605
+ };
3606
+ }, [heatmapType, clickMode, startClickmap, startAreaClickmap, startScrollmap, scrollType]); // eslint-disable-line react-hooks/exhaustive-deps
3618
3607
  };
3619
3608
 
3620
3609
  const scrollToElementIfNeeded = (visualRef, rect, scale, onScrollComplete) => {
@@ -6103,19 +6092,24 @@ class ScrollBucketRenderer {
6103
6092
  if (canvas.width <= 0 || canvas.height <= 0)
6104
6093
  return;
6105
6094
  const buckets = this.mapToBuckets(data);
6106
- if (buckets.length === 0)
6107
- return;
6108
- const maxPercent = Math.max(...buckets.map((b) => b.percent));
6109
- if (maxPercent <= 0)
6110
- return;
6095
+ const maxPercent = buckets.length > 0 ? Math.max(...buckets.map((b) => b.percent)) : 0;
6096
+ // Coldest hue (240 = blue) used as the baseline for buckets with no data
6097
+ const coldColor = 'hsla(240, 100%, 50%, 0.6)';
6111
6098
  const gradient = context.createLinearGradient(0, 0, 0, canvas.height);
6112
- for (const bucket of buckets) {
6113
- const stopMid = (bucket.startY + bucket.endY) / 2 / 100;
6114
- // Same hue direction as HeatmapHelper.scroll() (MaxHue = 240):
6115
- // high percent → hue 0 (red/hot), low percent → hue 240 (blue/cold)
6116
- const hue = (1 - bucket.percent / maxPercent) * 240;
6117
- const color = `hsla(${Math.round(hue)}, 100%, 50%, 0.6)`;
6118
- gradient.addColorStop(stopMid, color);
6099
+ if (buckets.length === 0 || maxPercent <= 0) {
6100
+ // No data fill entire canvas with the coldest color
6101
+ gradient.addColorStop(0, coldColor);
6102
+ gradient.addColorStop(1, coldColor);
6103
+ }
6104
+ else {
6105
+ for (const bucket of buckets) {
6106
+ const stopMid = (bucket.startY + bucket.endY) / 2 / 100;
6107
+ // Same hue direction as HeatmapHelper.scroll() (MaxHue = 240):
6108
+ // high percent → hue 0 (red/hot), low percent → hue 240 (blue/cold)
6109
+ const hue = (1 - bucket.percent / maxPercent) * 240;
6110
+ const color = `hsla(${Math.round(hue)}, 100%, 50%, 0.6)`;
6111
+ gradient.addColorStop(stopMid, color);
6112
+ }
6119
6113
  }
6120
6114
  context.fillStyle = gradient;
6121
6115
  context.fillRect(0, 0, canvas.width, canvas.height);
@@ -8485,45 +8479,6 @@ const VizClickmap = ({ iframeRef, visualRef, wrapperRef }) => {
8485
8479
  }
8486
8480
  };
8487
8481
 
8488
- const IS_ENABLE_MINIMAP = false;
8489
- const Minimap = ({ zones, maxUsers }) => {
8490
- const scrollType = useHeatmapSettingContext((s) => s.scrollType);
8491
- const showMinimap = useHeatmapScrollContext((s) => s.showMinimap);
8492
- const isScrollType = [EScrollType.Attention].includes(scrollType ?? EScrollType.Depth);
8493
- if (!showMinimap || !isScrollType || !IS_ENABLE_MINIMAP)
8494
- return null;
8495
- return (jsx("div", { style: {
8496
- position: 'fixed',
8497
- left: '20px',
8498
- top: '50%',
8499
- transform: 'translateY(-50%)',
8500
- width: '60px',
8501
- height: '400px',
8502
- backgroundColor: 'white',
8503
- borderRadius: '8px',
8504
- boxShadow: '0 4px 16px rgba(0,0,0,0.15)',
8505
- zIndex: 10002,
8506
- padding: '8px',
8507
- boxSizing: 'border-box',
8508
- }, children: jsx("div", { style: {
8509
- width: '100%',
8510
- height: '100%',
8511
- borderRadius: '4px',
8512
- overflow: 'hidden',
8513
- display: 'flex',
8514
- flexDirection: 'column',
8515
- }, children: zones.map((zone) => {
8516
- const normalized = maxUsers > 0 ? zone.percUsers / maxUsers : 0;
8517
- const color = getScrollGradientColor(normalized);
8518
- return (jsx("div", { title: `${zone.label}: ${zone.percUsers.toFixed(2)}%`, style: {
8519
- width: '100%',
8520
- flex: `${zone.endY - zone.startY}`,
8521
- backgroundColor: color,
8522
- borderBottom: '1px solid rgba(255,255,255,0.2)',
8523
- } }, zone.id));
8524
- }) }) }));
8525
- };
8526
-
8527
8482
  const ScrollZoneTooltip = ({ zone, position, currentScrollPercent, scrollmap, }) => {
8528
8483
  const CompScrollZoneTooltip = useHeatmapControlStore((state) => state.controls.ScrollZoneTooltip);
8529
8484
  const tooltipRef = useRef(null);
@@ -8549,17 +8504,9 @@ const ScrollZoneTooltip = ({ zone, position, currentScrollPercent, scrollmap, })
8549
8504
 
8550
8505
  const HoverZones = ({ iframeRef, wrapperRef, position, currentScrollPercent }) => {
8551
8506
  const scrollmap = useHeatmapDataContext((s) => s.scrollmap);
8552
- // const hoveredZone = useHeatmapVizScrollStore((state) => state.hoveredZone);
8553
- // const setHoveredZone = useHeatmapVizScrollStore((state) => state.setHoveredZone);
8554
- const { zones, isReady, maxUsers } = useScrollmapZones({
8555
- iframeRef,
8556
- wrapperRef,
8557
- });
8558
- if (!isReady || !zones.length)
8559
- return null;
8560
8507
  if (!position)
8561
8508
  return null;
8562
- return (jsxs(Fragment, { children: [jsx(ScrollZoneTooltip, { position: position, currentScrollPercent: currentScrollPercent, scrollmap: scrollmap || [] }), jsx(Minimap, { zones: zones, maxUsers: maxUsers })] }));
8509
+ return (jsx(Fragment, { children: jsx(ScrollZoneTooltip, { position: position, currentScrollPercent: currentScrollPercent, scrollmap: scrollmap || [] }) }));
8563
8510
  };
8564
8511
 
8565
8512
  const ScrollOverlay = ({ wrapperRef, iframeRef }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollBucketRenderer.d.ts","sourceRoot":"","sources":["../../../../src/libs/visualizer/renderers/ScrollBucketRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;CACjB;AAYD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,kBAAkB,CAAqC;IAC/D,OAAO,CAAC,aAAa,CAA8C;gBAEvD,OAAO,EAAE,aAAa,GAAG,IAAI;IAKzC,OAAO,CAAC,MAAM,CAIZ;IAEF,OAAO,CAAC,wBAAwB,CAG9B;IAEF,OAAO,CAAC,wBAAwB,CAS9B;IAEF,KAAK,QAAO,IAAI,CAEd;IAEF,KAAK,QAAO,IAAI,CAGd;IAEF;;;;;OAKG;IACH,YAAY,GAAU,MAAM,iBAAiB,EAAE,KAAG,OAAO,CAAC,IAAI,CAAC,CAQ7D;IAEF,OAAO,CAAC,IAAI,CAuCV;IAEF;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY,CA0BlB;CACH"}
1
+ {"version":3,"file":"ScrollBucketRenderer.d.ts","sourceRoot":"","sources":["../../../../src/libs/visualizer/renderers/ScrollBucketRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;CACjB;AAYD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,kBAAkB,CAAqC;IAC/D,OAAO,CAAC,aAAa,CAA8C;gBAEvD,OAAO,EAAE,aAAa,GAAG,IAAI;IAKzC,OAAO,CAAC,MAAM,CAIZ;IAEF,OAAO,CAAC,wBAAwB,CAG9B;IAEF,OAAO,CAAC,wBAAwB,CAS9B;IAEF,KAAK,QAAO,IAAI,CAEd;IAEF,KAAK,QAAO,IAAI,CAGd;IAEF;;;;;OAKG;IACH,YAAY,GAAU,MAAM,iBAAiB,EAAE,KAAG,OAAO,CAAC,IAAI,CAAC,CAQ7D;IAEF,OAAO,CAAC,IAAI,CA4CV;IAEF;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY,CA0BlB;CACH"}
@@ -1,4 +1,5 @@
1
1
  import type { ICalloutPositionMode } from '../components/VizElement/ElementCallout';
2
+ import type { IHeatmapRef } from './heatmap-ref';
2
3
  import type { ElementInfo } from './viz-elm';
3
4
  export type IVerticalPlacement = 'top' | 'bottom';
4
5
  export type IHorizontalPlacement = 'left' | 'right';
@@ -72,7 +73,7 @@ export interface ICalcCalloutPositionProps {
72
73
  };
73
74
  alignment?: IHorizontalAlignment;
74
75
  positionMode?: ICalloutPositionMode;
75
- visualRef?: React.RefObject<HTMLDivElement> | null;
76
+ visualRef?: IHeatmapRef['Visual'] | null;
76
77
  }
77
78
  export interface ICalcCalloutPositionAbsoluteProps {
78
79
  widthScale: number;