UNPKG

p-slides

Version:

Presentations made simple with Web Components

76 lines (75 loc) 3.31 kB
/** * The class corresponding to the `<p-slide>` element. * @tag p-slide * @attribute {string} aria-current - When set to `'page'`, the slide is the current one in the presentation. It's discouraged to set it manually * @attribute {string} effect - Effect name for entering the slide from, or exiting to, the previous slide * @fires {PresentationFragmentToggleEvent} p-slides.fragmenttoggle - When a fragment has been shown or hidden */ export class PresentationSlideElement extends HTMLElement { /** @internal */ static get observedAttributes(): string[]; /** @internal */ attributeChangedCallback(attribute: any, _: any, value: any): void; /** @internal */ connectedCallback(): void; /** @internal */ disconnectedCallback(): void; /** * The parent presentation deck. */ get deck(): import("./deck.js").PresentationDeckElement | null; set isActive(isActive: boolean); /** * Whether the slide is the current one in the presentation. This will set the `aria-current` attribute to either * `'page'` or `'false'`. * * It's discouraged to set it manually. */ get isActive(): boolean; set isPrevious(isPrevious: boolean); /** * Whether the slide is past the current one in the presentation. This will set a `previous` attribute on the * `<p-slide>` element, that can be used for styling purposes. A slide can be the current one _and_ marked as * "previous" when going backward in the presentation. * * It's discouraged to set it manually. */ get isPrevious(): boolean; /** * The list of the fragment elements as they appear in the slide's markup. * @type {Element[]} */ get fragments(): Element[]; /** * The fragments grouped using their indexes. * @type {Element[][]} */ get fragmentSequence(): Element[][]; /** * The next group of fragments that will be activated when advancing the presentation, if any. */ get nextInactiveFragments(): Element[] | undefined; /** * The last group of fragments that has been activated when advancing the presentation, if any. */ get lastActivatedFragments(): Element[] | undefined; /** * The list of the speaker notes as they appear in the slide's fragment sequence. * @type {Array<Element | Comment>} */ get notes(): Array<Element | Comment>; /** * Attempts to advance the presentation by showing a new block of fragments on the current slide. It returns `true` if * no fragments are left to show in the current slide (the deck will advance to the next slide). * @fires {PresentationFragmentToggleEvent} p-slides.fragmenttoggle - If a set of fragments has been toggled */ next(): boolean; /** * Attempts to bring the presentation back by hiding the last shown block of fragments on the current slide. It * returns `true` if no fragments are left to hide in the current slide (the deck will go back to the previous slide). * @fires {PresentationFragmentToggleEvent} p-slides.fragmenttoggle - If a set of fragments has been toggled */ previous(): boolean; #private; } export type PresentationFragmentToggleEvent = import("../declarations.js").PresentationFragmentToggleEvent;