import { type Observer, type Reference } from "@knyt/artisan"; /** * @internal scope: workspace */ /** * ### Private Remarks * * This is not a reactive controller, as it does not react to host updates. * It only responds to changes in the root reference. * Its purpose is to manage adopted style sheets for a root, * separating style sheet adoption from controller logic. * This makes its role clearer, especially in the context of HMR. */ export declare class StyleSheetAdoptionAdapter implements Observer { #private; constructor({ root }: { root: Reference.Maybe; }); /** * Called when the host's root changes. * * @internal scope: module */ next(root: ShadowRoot | Document | null): void; /** * Adds the given style sheet to the adopted style sheets. * If the style sheet is already present, this is a no-op. */ adoptStyleSheet(input: StyleSheetAdoptionAdapter.Input): void; /** * Removes the first occurrence of the given style sheet from the adopted * style sheets. */ dropStyleSheet(input: StyleSheetAdoptionAdapter.Input): void; /** * Checks whether the given input is already adopted. */ hasStyleSheet(input: StyleSheetAdoptionAdapter.Input): boolean; /** * Drops all adopted style sheets. */ clearStyleSheets(): void; } export declare namespace StyleSheetAdoptionAdapter { type Input = CSSStyleSheet | { toCSSStyleSheet: (CSSStyleSheetConstructor?: typeof CSSStyleSheet) => CSSStyleSheet; }; } //# sourceMappingURL=StyleSheetAdoptionAdapter.d.ts.map