/** * Low-level Effect wrappers for Document APIS and usage from the Context. * @since 8.19.0 */ import * as Context from "@typed/context/Extensions"; import type * as Effect from "effect/Effect"; import type * as Scope from "effect/Scope"; import type { AddEventListenerOptions } from "./EventTarget.js"; /** * @since 8.19.0 * @category models */ export interface Document extends globalThis.Document { } /** * @since 8.19.0 * @category context */ export declare const Document: Context.Tagged; /** * Retrieve the body element from the current Document * @since 8.19.0 * @category elements */ export declare const getBody: Effect.Effect; /** * Retrieve the head element from the current Document * @since 8.19.0 * @category elements */ export declare const getHead: Effect.Effect; /** * Add an event listener to the document * @since 8.19.0 * @category events */ export declare const addDocumentListener: (options: AddEventListenerOptions) => Effect.Effect; /** * Create a new element * @since 8.19.0 * @category elements */ export declare const createElement: (tagName: TagName) => Effect.Effect; /** * Create a new element with a namespace * @since 8.19.0 * @category elements */ export declare const createElementNS: (namespaceURI: string, tagName: string) => Effect.Effect; /** * Create a new SVG element * @since 8.19.0 * @category elements */ export declare const createSvgElement: (tagName: TagName) => Effect.Effect; /** * Create a new text node * @since 8.19.0 * @category elements */ export declare const createTextNode: (data: string) => Effect.Effect; /** * Create a new comment node * @since 8.19.0 * @category elements */ export declare const createComment: (data: string) => Effect.Effect; /** * Create a new document fragment * @since 8.19.0 * @category elements */ export declare const createDocumentFragment: Effect.Effect; /** * Create a new TreeWalker * @since 8.19.0 */ export declare const createTreeWalker: (root: Node, whatToShow?: number, filter?: NodeFilter | null) => Effect.Effect; /** * Create a new Range * @since 8.19.0 */ export declare const createRange: Effect.Effect; /** * Create a new Attr * @since 8.19.0 * @category atrributes */ export declare const createAttributeNS: (namespace: string | null, qualifiedName: string) => Effect.Effect; /** * Get the element * @since 8.19.0 */ export declare const getDocumentElement: Effect.Effect; /** * Import a node into the current document * @since 8.19.0 */ export declare const importNode: (node: T, deep?: boolean) => Effect.Effect; /** * Update the title of the document * @since 8.19.0 */ export declare const updateTitle: (title: string) => Effect.Effect; /** * Params for updating a meta tag * @since 8.19.0 */ export type MetaParams = { readonly name: string; readonly content: string; readonly httpEquiv?: string; }; /** * Update a meta tag * @since 8.19.0 * @category metadata */ export declare const updateMeta: (params: MetaParams) => Effect.Effect; /** * Update a link tag * @since 8.19.0 * @category metadata */ export type LinkParams = { readonly rel: string; readonly href: string; readonly crossOrigin?: "anonymous" | "use-credentials"; readonly hreflang?: string; readonly media?: string; readonly referrerPolicy?: "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url"; readonly sizes?: string; readonly type?: string; }; /** * Update a link tag * @since 8.19.0 * @category metadata */ export declare const updateLink: (params: LinkParams) => Effect.Effect; //# sourceMappingURL=Document.d.ts.map