@anaralabs/lector 3.5.13 → 3.5.14
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.
- package/dist/_tsup-dts-rollup.d.ts +2 -1
- package/dist/index.js +5 -0
- package/package.json +1 -1
|
@@ -97,7 +97,7 @@ declare interface AnnotationState {
|
|
|
97
97
|
setAnnotations: (annotations: Annotation[]) => void;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
export declare const AnnotationTooltip: ({ annotation, children, renderTooltipContent, hoverTooltipContent, onOpenChange, className, focusedOpenId, hoverClassName, isOpen: controlledIsOpen, hoverIsOpen: controlledHoverIsOpen, }: AnnotationTooltipProps) => JSX.Element;
|
|
100
|
+
export declare const AnnotationTooltip: ({ annotation, children, renderTooltipContent, hoverTooltipContent, onOpenChange, className, focusedOpenId, focusedHoverOpenId, hoverClassName, isOpen: controlledIsOpen, hoverIsOpen: controlledHoverIsOpen, }: AnnotationTooltipProps) => JSX.Element;
|
|
101
101
|
|
|
102
102
|
export declare type AnnotationTooltipContentProps = {
|
|
103
103
|
annotation: Annotation;
|
|
@@ -113,6 +113,7 @@ declare interface AnnotationTooltipProps {
|
|
|
113
113
|
onOpenChange?: (open: boolean) => void;
|
|
114
114
|
isOpen?: boolean;
|
|
115
115
|
focusedOpenId?: string;
|
|
116
|
+
focusedHoverOpenId?: string;
|
|
116
117
|
className?: string;
|
|
117
118
|
hoverClassName?: string;
|
|
118
119
|
hoverIsOpen?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -275,6 +275,7 @@ var AnnotationTooltip = ({
|
|
|
275
275
|
onOpenChange,
|
|
276
276
|
className,
|
|
277
277
|
focusedOpenId,
|
|
278
|
+
focusedHoverOpenId,
|
|
278
279
|
hoverClassName,
|
|
279
280
|
isOpen: controlledIsOpen,
|
|
280
281
|
hoverIsOpen: controlledHoverIsOpen
|
|
@@ -317,6 +318,7 @@ var AnnotationTooltip = ({
|
|
|
317
318
|
}, [controlledIsOpen, isOpen, setIsOpen]);
|
|
318
319
|
const handleMouseEnter = useCallback(() => {
|
|
319
320
|
if (focusedOpenId && focusedOpenId !== annotation.id) return;
|
|
321
|
+
if (focusedHoverOpenId && focusedHoverOpenId !== annotation.id) return;
|
|
320
322
|
if (hoverTooltipContent) {
|
|
321
323
|
if (closeTimeoutRef.current) {
|
|
322
324
|
clearTimeout(closeTimeoutRef.current);
|
|
@@ -335,6 +337,8 @@ var AnnotationTooltip = ({
|
|
|
335
337
|
closeTimeoutRef.current = setTimeout(closeTooltip, 100);
|
|
336
338
|
}, [hoverTooltipContent, closeTooltip]);
|
|
337
339
|
const handleTooltipMouseEnter = useCallback(() => {
|
|
340
|
+
if (focusedOpenId && focusedOpenId !== annotation.id) return;
|
|
341
|
+
if (focusedHoverOpenId && focusedHoverOpenId !== annotation.id) return;
|
|
338
342
|
isMouseInTooltipRef.current = true;
|
|
339
343
|
if (closeTimeoutRef.current) {
|
|
340
344
|
clearTimeout(closeTimeoutRef.current);
|
|
@@ -505,6 +509,7 @@ var AnnotationHighlightLayer = ({
|
|
|
505
509
|
className: tooltipClassName,
|
|
506
510
|
hoverClassName: hoverTooltipClassName,
|
|
507
511
|
focusedOpenId: focusedAnnotationId,
|
|
512
|
+
focusedHoverOpenId: focusedHoverAnnotationId,
|
|
508
513
|
isOpen: focusedAnnotationId === annotation.id,
|
|
509
514
|
hoverIsOpen: focusedHoverAnnotationId === annotation.id,
|
|
510
515
|
onOpenChange: (open) => {
|