Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oku-ui/use-composable

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oku-ui/use-composable - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

dist/unrefElement.d.ts

69

dist/index.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc