@viamrobotics/prime-core
Advanced tools
Comparing version 0.0.104 to 0.0.105
/// <reference types="svelte" /> | ||
import { type Readable } from 'svelte/store'; | ||
import { type FloatingStyle, type FloatingPlacement } from '../floating'; | ||
import { type FloatingStyleStore } from '../floating'; | ||
export type TooltipVisibility = 'invisible' | 'visible'; | ||
export interface TooltipContext { | ||
id: string; | ||
style: Readable<FloatingStyle | undefined>; | ||
style: FloatingStyleStore; | ||
isVisible: Readable<boolean>; | ||
@@ -12,8 +12,2 @@ setHovered: (isHovered: boolean) => void; | ||
setHoverDelayMS: (hoverDelayMS: number) => void; | ||
setTarget: (target: HTMLElement | undefined) => void; | ||
setTooltip: (options: { | ||
tooltip: HTMLElement | undefined; | ||
arrow: HTMLElement | undefined; | ||
placement: FloatingPlacement; | ||
}) => void; | ||
} | ||
@@ -20,0 +14,0 @@ export interface TooltipElements { |
import { setContext, getContext } from 'svelte'; | ||
import { derived, writable } from 'svelte/store'; | ||
import { floatingStyle, } from '../floating'; | ||
import { floatingStyle } from '../floating'; | ||
import { uniqueId } from '../unique-id'; | ||
@@ -53,3 +53,3 @@ import { noop } from 'lodash-es'; | ||
flip: { fallbackAxisSideDirection: 'start', crossAxis: false }, | ||
auto: true, | ||
auto: false, | ||
}); | ||
@@ -63,11 +63,3 @@ return { | ||
setHoverDelayMS: hoverDelayMS.set, | ||
setTarget: (target) => style.register({ referenceElement: target }), | ||
setTooltip: ({ tooltip, arrow, placement }) => { | ||
style.register({ | ||
placement, | ||
floatingElement: tooltip, | ||
arrowElement: arrow, | ||
}); | ||
}, | ||
}; | ||
}; |
{ | ||
"name": "@viamrobotics/prime-core", | ||
"version": "0.0.104", | ||
"version": "0.0.105", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
360306
6583