@oku-ui/utils
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -1,72 +0,8 @@ | ||
import { Ref } from 'vue'; | ||
declare function clamp(value: number, [min, max]: [number, number]): number; | ||
declare function composeEventHandlers<E>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: { | ||
checkForDefaultPrevented?: boolean | undefined; | ||
}): (event: E) => void; | ||
/** | ||
* Checks whether a given VNode is a render-vialble element. | ||
*/ | ||
declare function isValidVNodeElement(input: any): boolean; | ||
type Measurable = { | ||
getBoundingClientRect(): DOMRect; | ||
}; | ||
type CallbackFn = (rect: DOMRect) => void; | ||
/** | ||
* Observes an element's rectangle on screen (getBoundingClientRect) | ||
* This is useful to track elements on the screen and attach other elements | ||
* that might be in different layers, etc. | ||
*/ | ||
declare function observeElementRect( | ||
/** The element whose rect to observe */ | ||
elementToObserve: Measurable, | ||
/** The callback which will be called when the rect changes */ | ||
callback: CallbackFn): () => void; | ||
declare const isOn: (key: any) => boolean; | ||
/** | ||
* Void function | ||
*/ | ||
type Fn = () => void; | ||
/** | ||
* Any function | ||
*/ | ||
type AnyFn = (...args: any[]) => any; | ||
/** | ||
* A ref that allow to set null or undefined | ||
*/ | ||
type RemovableRef<T> = Omit<Ref<T>, 'value'> & { | ||
get value(): T; | ||
set value(value: T | null | undefined); | ||
}; | ||
/** | ||
* Maybe it's a ref, or a plain value | ||
* | ||
* ```ts | ||
* type MaybeRef<T> = T | Ref<T> | ||
* ``` | ||
*/ | ||
type MaybeRef<T> = T | Ref<T>; | ||
/** | ||
* Maybe it's a ref, or a plain value, or a getter function | ||
* | ||
* ```ts | ||
* type MaybeRefOrGetter<T> = (() => T) | T | Ref<T> | ComputedRef<T> | ||
* ``` | ||
*/ | ||
type MaybeRefOrGetter<T> = MaybeRef<T> | (() => T); | ||
/** | ||
* Get the value of value/ref/getter. | ||
*/ | ||
declare function toValue<T>(r: MaybeRefOrGetter<T>): T; | ||
/** | ||
* @deprecated use `toValue` instead | ||
*/ | ||
declare const resolveUnref: typeof toValue; | ||
export { type AnyFn, type Fn, type MaybeRef, type MaybeRefOrGetter, type Measurable, type RemovableRef, clamp, composeEventHandlers, isOn, isValidVNodeElement, observeElementRect, resolveUnref, toValue }; | ||
export { clamp } from './number'; | ||
export { composeEventHandlers } from './composeEventHandlers'; | ||
export { isValidVNodeElement } from './isValidVNodeElement'; | ||
export { observeElementRect } from './observeElementRect'; | ||
export type { Measurable } from './observeElementRect'; | ||
export * from './isOn'; | ||
export * from './types'; | ||
export * from './toValue'; |
{ | ||
"name": "@oku-ui/utils", | ||
"type": "module", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"license": "MIT", | ||
@@ -41,4 +41,6 @@ "source": "src/index.ts", | ||
"release": "pnpm build && pnpm bumpp --commit='version(utils): release %s' --no-tag && pnpm publish", | ||
"release:beta": "pnpm release --tag beta", | ||
"release:alpha": "pnpm release --tag alpha", | ||
"clean": "rimraf ./dist && rimraf ./node_modules" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
19
151
8012
1