import { SheetConfig, Sheet, SheetInit } from 'twind'; /** * [[include:src/sheets/README.md]] * * @packageDocumentation * @module twind/sheets */ /** * Creates an sheet which inserts style rules through the Document Object Model. */ declare const domSheet: ({ nonce, target, }?: SheetConfig) => Sheet; /** * Allows to reset and snaphot the current state of an sheet and * in extension the internal mutable state (caches, ...) of `tw`. */ interface Storage { /** * Register a function that should be called to create a new state. */ init: SheetInit; /** * Creates a snapshot of the current state, invokes all init callbacks to create a fresh state * and returns the snaphot. */ reset: (snapshot?: unknown[] | undefined) => unknown[]; } /** * A sheet that collects styles into an array. */ interface VirtualSheet extends Sheet, Storage { init: SheetInit; } /** * Creates an sheet which collects style rules into an array. */ declare const virtualSheet: () => VirtualSheet; interface StyleTagProperties { id: string; textContent: string; } interface HasTarget { readonly target: readonly string[]; } declare type StyleTagSheet = HasTarget | readonly string[]; /** * Transforms css rules into `