import type { CSSResultGroup } from 'lit'; import { ShoelaceElement } from '../../internal/shoelace-element'; /** * @summary The Mutation Observer component offers a thin, declarative interface to the [`MutationObserver API`](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver). * @documentation https://dsa.service-public-autonomie.fr/latest/librairie-webcomponents/utilitaires/mutation-observer-observateur-de-mutations/web-knSJy0Dt * * @event {{ mutationList: MutationRecord[] }} dsa-mutation - Emitted when a mutation occurs. * * @slot - The content to watch for mutations. */ export default class DSAMutationObserver extends ShoelaceElement { static styles: CSSResultGroup; private mutationObserver; private readonly handleMutation; /** * Watches for changes to attributes. To watch only specific attributes, separate them by a space, e.g. * `attr="class id title"`. To watch all attributes, use `*`. */ attr: string; /** Indicates whether or not the attribute's previous value should be recorded when monitoring changes. */ attrOldValue: boolean; /** Watches for changes to the character data contained within the node. */ charData: boolean; /** Indicates whether or not the previous value of the node's text should be recorded. */ charDataOldValue: boolean; /** Watches for the addition or removal of new child nodes. */ childList: boolean; /** Disables the observer. */ disabled: boolean; connectedCallback(): void; disconnectedCallback(): void; private startObserver; private stopObserver; handleDisabledChange(): void; handleChange(): void; render(): import("lit").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'dsa-mutation-observer': DSAMutationObserver; } }