@anaralabs/lector 3.5.12 → 3.5.13
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 +3 -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, hoverClassName, isOpen: controlledIsOpen, hoverIsOpen: controlledHoverIsOpen, }: AnnotationTooltipProps) => JSX.Element;
|
|
100
|
+
export declare const AnnotationTooltip: ({ annotation, children, renderTooltipContent, hoverTooltipContent, onOpenChange, className, focusedOpenId, hoverClassName, isOpen: controlledIsOpen, hoverIsOpen: controlledHoverIsOpen, }: AnnotationTooltipProps) => JSX.Element;
|
|
101
101
|
|
|
102
102
|
export declare type AnnotationTooltipContentProps = {
|
|
103
103
|
annotation: Annotation;
|
|
@@ -112,6 +112,7 @@ declare interface AnnotationTooltipProps {
|
|
|
112
112
|
hoverTooltipContent?: React.ReactNode;
|
|
113
113
|
onOpenChange?: (open: boolean) => void;
|
|
114
114
|
isOpen?: boolean;
|
|
115
|
+
focusedOpenId?: string;
|
|
115
116
|
className?: string;
|
|
116
117
|
hoverClassName?: string;
|
|
117
118
|
hoverIsOpen?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -274,6 +274,7 @@ var AnnotationTooltip = ({
|
|
|
274
274
|
hoverTooltipContent,
|
|
275
275
|
onOpenChange,
|
|
276
276
|
className,
|
|
277
|
+
focusedOpenId,
|
|
277
278
|
hoverClassName,
|
|
278
279
|
isOpen: controlledIsOpen,
|
|
279
280
|
hoverIsOpen: controlledHoverIsOpen
|
|
@@ -315,6 +316,7 @@ var AnnotationTooltip = ({
|
|
|
315
316
|
}
|
|
316
317
|
}, [controlledIsOpen, isOpen, setIsOpen]);
|
|
317
318
|
const handleMouseEnter = useCallback(() => {
|
|
319
|
+
if (focusedOpenId && focusedOpenId !== annotation.id) return;
|
|
318
320
|
if (hoverTooltipContent) {
|
|
319
321
|
if (closeTimeoutRef.current) {
|
|
320
322
|
clearTimeout(closeTimeoutRef.current);
|
|
@@ -502,6 +504,7 @@ var AnnotationHighlightLayer = ({
|
|
|
502
504
|
annotation,
|
|
503
505
|
className: tooltipClassName,
|
|
504
506
|
hoverClassName: hoverTooltipClassName,
|
|
507
|
+
focusedOpenId: focusedAnnotationId,
|
|
505
508
|
isOpen: focusedAnnotationId === annotation.id,
|
|
506
509
|
hoverIsOpen: focusedHoverAnnotationId === annotation.id,
|
|
507
510
|
onOpenChange: (open) => {
|