import { Unhead } from './client.js'; import { HeadEntryOptions, ActiveHeadEntry } from './types.js'; import { HeadSafe } from './types.js'; import { ResolvableHead, UseSeoMetaInput, InferLink, Link, InferScript, Script } from './types.js'; export { c as createUnhead } from './shared/unhead.CiMlWnKE.js'; export { u as useScript } from './shared/unhead.BJiCebK1.js'; import 'hookable'; declare function useHead, I = ResolvableHead>(unhead: T, input?: ResolvableHead, options?: HeadEntryOptions): ActiveHeadEntry; declare function useHeadSafe>(unhead: T, input?: HeadSafe, options?: HeadEntryOptions): ActiveHeadEntry; declare function useSeoMeta>(unhead: T, input?: UseSeoMetaInput, options?: HeadEntryOptions): ActiveHeadEntry; type IsUnion = T extends U ? ([U] extends [T] ? false : true) : never; type DefinedLink = T extends { rel: infer U; } ? IsUnion extends false ? T extends Link ? T : Link & Omit : Link & Omit : never; type DefinedScript = T extends { type: infer U; } ? IsUnion extends false ? T extends Script ? T : Script & Omit : Script & Omit : T extends Script ? T : Script & Omit; /** * Typed helper for declaring a `` element inside {@link useHead}. * * Known `rel` values stay strict: `rel: 'preload'` still requires `as`, * preload fonts still require `crossorigin`, `rel: 'mask-icon'` still requires * `color`, etc. Non-standard `rel` values not covered by `KnownLinkRel` (e.g. * OpenID endpoints, custom protocol discovery links) are accepted via * `GenericLink` without losing strictness on the rest of the union. * * Standard rels like `'me'`, `'webmention'`, `'privacy-policy'`, and * `'terms-of-service'` are already in the `Link` union, so they work with * `useHead` directly without this helper. * * @example * ```ts * import { defineLink, useHead } from 'unhead' * * useHead({ * link: [ * defineLink({ rel: 'openid2.provider', href: 'https://example.com/openid' }), * defineLink({ rel: 'EditURI', href: '/rsd.xml', type: 'application/rsd+xml' }), * ], * }) * ``` */ declare function defineLink(link: T & InferLink): DefinedLink; /** * Typed helper for declaring a `