@stratakit/foundations
Version:
Foundational pieces of StrataKit
23 lines (22 loc) • 1.01 kB
TypeScript
import * as React from "react";
/** @private */
export declare const RootContext: React.Context<RootContextValue | undefined>;
interface RootContextValue {
/** A map of all StrataKit packages and their versions. */
versions?: Map<string, string>;
/** Value of the `rootNode` prop passed to the `Root`. */
rootNode?: Document | ShadowRoot;
/** Function to load styles into the rootNode. */
loadStyles?: (rootNode: Document | ShadowRoot, options: {
css: string;
key: string;
}) => {
cleanup: () => void;
};
}
export declare const RootNodeContext: React.Context<Document | ShadowRoot | undefined>;
/** Returns the closest [rootNode](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode). */
export declare function useRootNode(): Document | ShadowRoot | undefined;
export declare const spriteSheetId = "\uD83E\uDD5D-inline-sprites";
export declare const HtmlSanitizerContext: React.Context<((html: string) => string) | undefined>;
export {};