/** * @license MIT * @module @whoj/utils-vue@2.4.0 * @copyright (c) 2026 Jonson B. */ export { ComputedRefable, MaybeRef, ReadonlyRefable, Refable, refOf } from './composables/refOf.js'; import { Ref, ComputedRef, Plugin, Directive, ObjectDirective } from 'vue'; import Fuse from 'fuse.js'; export { unrefOf } from './composables/unrefOf.js'; export { ComputedRefableElement, NullableElement, RefableElement, UnRefElementReturn, VueInstance, unrefElement } from './composables/unrefOfEl.js'; export { UseLinkTagOptions, UseLinkTagReturn, useLinkTag } from './composables/useLinkTag.js'; export { UseStyleTagOptions, UseStyleTagReturn, useStyleTag } from './composables/useStyleTag.js'; export { listenEvent } from './composables/listenEvent.js'; export { tryOnMounted } from './composables/tryOnMounted.js'; export { tryOnUnmounted } from './composables/tryOnUnmounted.js'; export { tryOnScopeDispose } from './composables/tryOnScopeDispose.js'; import '@whoj/utils-types'; type FuseOptions = Fuse.IFuseOptions; type FuseResult = Fuse.FuseResult; type MaybeReactive = Ref | Array | Ref> | Ref> | ComputedRef>; declare class FuseJS { /** * @type Ref */ fuse: Ref>; /** * @type Ref */ resultsRaw: Ref[]>; /** * @type ComputedRef */ results: ComputedRef>; /** * @type Ref */ search: Ref; /** * @type ComputedRef */ noResults: ComputedRef; /** * @param items * @param options */ /** * It takes an array of items and an optional FuseOptions object, and then it creates a new Fuse instance with those * items and options, and then it runs the search with the current search value * @param items - DataT[] - The items to search through. * @param options - FuseOptions */ loadItems(items: DataT[], options?: FuseOptions): void; /** * If there is no search string, clear the results. Otherwise, search the fuse * @param {string} [search] - The search string to use. * @returns The results of the search. */ runSearch(search?: string): void; /** * We create a new Fuse instance with the list of items and options, and then we create a computed property that returns * the results of the search * @param list - This is the list of items that you want to search. It can be an array of items, or a reactive object * that contains an array of items. * @param options - FuseOptions */ constructor(list: MaybeReactive, options?: FuseOptions); } /** * It takes a list of data and an optional options object, and returns a FuseJS object that can be used to search the list * @param list - The list of data to search through. * @param [options] - FuseOptions * @returns A new instance of the FuseJS class. * * @__NO_SIDE_EFFECTS__ */ declare function useFuseJs(list: MaybeReactive, options?: FuseOptions): FuseJS; type DirectiveEl = HTMLElement | HTMLButtonElement | HTMLAnchorElement; interface RippleOptions { /** * * @default `rgba(0, 0, 0, 0.35)` */ color?: string; /** * * @default `true` */ enable?: boolean; /** * * @default `1` */ zIndex?: string; } interface DirectiveProps { /** * * @default `mousedown` */ event: keyof HTMLElementEventMap; /** * * @default `450` */ transition: number; } declare const vRipple: Directive; /** * It takes an element, an optional event name, and an optional options object, and then calls the rippleHandler function * with the element, an object with the event name as a key and a boolean value, and the options object * @param {DirectiveEl | Ref} el - The element to apply the ripple effect to. * @param event - The event that triggers the ripple effect. * @param {RippleOptions} [options] - RippleOptions * * @__NO_SIDE_EFFECTS__ */ declare function useRipple(el: DirectiveEl | Ref, event?: K, options?: RippleOptions): void; declare const Ripple: Plugin<[undefined | RippleOptions]>; interface ImgFallbackOptions { error?: string; loading?: string; } type ImgFallbackObjDirective = ObjectDirective; declare const vImgFallback: ImgFallbackObjDirective; declare const ImgFallback: Plugin<[undefined | ImgFallbackOptions]>; export { FuseJS, ImgFallback, Ripple, useFuseJs, useRipple, vImgFallback, vRipple }; export type { DirectiveProps, FuseOptions, FuseResult, ImgFallbackOptions, MaybeReactive, RippleOptions };