@oku-ui/use-composable
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -1,55 +0,14 @@ | ||
export { computedAsync, computedEager, isClient, reactiveOmit, reactivePick, syncRef, syncRefs, useScrollLock } from '@vueuse/core'; | ||
import * as vue from 'vue'; | ||
import { ComputedRef, Ref, ComponentPublicInstance, ComponentInternalInstance } from 'vue'; | ||
import { MaybeRefOrGetter } from '@oku-ui/utils'; | ||
type UseControllableStateParams<T> = { | ||
prop: ComputedRef<T | undefined>; | ||
onChange?: (value: T) => void; | ||
defaultProp?: ComputedRef<T | undefined>; | ||
initialValue?: T; | ||
}; | ||
declare function useControllable<T>({ prop, onChange, defaultProp, initialValue, }: UseControllableStateParams<T>): { | ||
state: ComputedRef<T>; | ||
updateValue: (nextValue: T | undefined) => void; | ||
}; | ||
/** | ||
* A custom function that converts a callback to a ref to avoid triggering re-renders when passed as a | ||
* prop or avoid re-executing effects when passed as a dependency | ||
*/ | ||
declare function useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): Ref<T>; | ||
declare function useSize(element: Ref<HTMLElement | null>): Ref<{ | ||
width: number; | ||
height: number; | ||
} | undefined>; | ||
declare function usePrevious<T>(newData: Ref<T>): vue.ComputedRef<T | undefined>; | ||
type VueInstance = ComponentPublicInstance; | ||
type MaybeComputedElementRef<T extends MaybeElement = MaybeElement> = MaybeRefOrGetter<T>; | ||
type MaybeElement = HTMLElement | SVGElement | VueInstance | undefined | null; | ||
type UnRefElementReturn<T extends MaybeElement = MaybeElement> = T extends VueInstance ? Exclude<MaybeElement, VueInstance> : T | undefined; | ||
/** | ||
* Get the dom element of a ref of element or Vue component instance | ||
* | ||
* @param elRef | ||
*/ | ||
declare function unrefElement<T extends MaybeElement>(elRef: MaybeComputedElementRef<T>): UnRefElementReturn<T>; | ||
declare function useId(deterministicId?: string): string; | ||
type RefSetter = (el: Element | ComponentPublicInstance | undefined) => void; | ||
declare function useComposedRefs(...refs: (Ref<HTMLElement | undefined | null | ComponentPublicInstance> | RefSetter)[]): (el: Element | ComponentPublicInstance | null) => void; | ||
declare function useForwardRef(): (ref: any) => void; | ||
/** | ||
* Listens for when the escape key is down | ||
*/ | ||
declare function useEscapeKeydown(onEscapeKeydownProp?: (event: KeyboardEvent) => void, ownerDocument?: Ref<Document>): void; | ||
declare function useListeners(omitKeys?: string[], instance?: ComponentInternalInstance): Record<string, any>; | ||
export { type MaybeComputedElementRef, unrefElement, useCallbackRef, useComposedRefs, useControllable, useEscapeKeydown, useForwardRef, useId, useListeners, usePrevious, useSize }; | ||
import { computedAsync, computedEager, isClient, reactiveOmit, reactivePick, syncRef, syncRefs, useScrollLock } from '@vueuse/core'; | ||
export { useControllable } from './useControllable'; | ||
export { useCallbackRef } from './useCallbackRef'; | ||
export { useSize } from './useSize'; | ||
export { usePrevious } from './usePrevious'; | ||
export { unrefElement } from './unrefElement'; | ||
export { useId } from './useId'; | ||
export { useComposedRefs } from './useComposedRefs'; | ||
export { useForwardRef } from './useForwardRef'; | ||
export { useEscapeKeydown } from './useEscapeKeydown'; | ||
export type { MaybeComputedElementRef } from './unrefElement'; | ||
export { useListeners } from './useListeners'; | ||
export { computedEager, syncRef, computedAsync, syncRefs, useScrollLock, isClient, reactiveOmit, reactivePick }; | ||
export { useRect } from './use-rect'; |
{ | ||
"name": "@oku-ui/use-composable", | ||
"type": "module", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"license": "MIT", | ||
@@ -33,3 +33,2 @@ "source": "src/index.ts", | ||
"@oku-ui/utils": "latest", | ||
"@vue/shared": "^3.4.1", | ||
"@vueuse/core": "^10.7.1" | ||
@@ -48,4 +47,6 @@ }, | ||
"release": "pnpm build && pnpm bumpp --commit='version(use-composable): 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
13540
3
27
297
1
- Removed@vue/shared@^3.4.1