p-slides
Version:
Presentations made simple with Web Components
44 lines (43 loc) • 2.93 kB
TypeScript
/**
* The `<p-deck>` element will start loading its stylesheet at the default location of `css/`, if nothing has been set
* on `PresentationDeckElement.styles`. You can change that _before defining or instantiating_ a `<p-deck>` element.
*
* Don't forget the final slash! Or do, if you want to provide a prefix for the file names.
* @param {string} root
*/
export function setStyleRoot(root: string): void;
/** @param {PresentationSlideElement} slide @internal */
export function collectNotes(slide: PresentationSlideElement): (Element | Comment)[];
export function whenAllDefined(): Promise<CustomElementConstructor[]>;
/** @internal */
export const INITIALLY_VISIBLE: "p-initially-visible";
/** @internal */
export const FRAGMENTS: "p-fragment,[p-fragment]";
export function applyStylesheets(deck: PresentationDeckElement): Promise<CSSStyleSheet[]>;
export function isSlide(element: unknown): element is PresentationSlideElement;
export function selectSlide(slides: PresentationSlideElement[], nextSlide: PresentationSlideElement): void;
export function copyNotes(noteContainer: Element, notes: Array<Element | Comment>): void;
export function checkNoteActivations(noteContainer: Element, notes: Array<Element | Comment>): void;
export function fireEvent<N extends PresentationEventSimpleName>(target: EventTarget, eventName: N, detail?: HTMLElementEventMap[`p-slides.${N}`]["detail"]): boolean;
export function formatClock(millis: number): [number, number, number];
export function isFragmentActivated(element: Element): boolean;
export function setFragmentActivation(activate: boolean): (...elements: Element[]) => void;
export function setCurrentFragments(slide: PresentationSlideElement): void;
export function getSequencedFragments(fragments: ArrayLike<Element>): Element[][];
export function getLabel<C extends {
labels: T;
}, T extends Record<string, string | ((context: C) => string)>>(context: C, name: keyof T): string;
export function updateHighlightIndex(key: string, current: number, columns: number, slides: number): number;
export function getHighlightSelector(index: number): string;
export function getHighlightIndex(selector: string): number;
export function generateTextId(element: Element): Promise<string>;
/** @internal */
export let whateverMotion: boolean;
/** @type {PresentationKeyHandler} @internal */
export const defaultKeyHandler: PresentationKeyHandler;
/** @type {PresentationKeyHandler} @internal */
export const gridKeyHandler: PresentationKeyHandler;
export type PresentationDeckElement = import("./components/deck.js").PresentationDeckElement;
export type PresentationSlideElement = import("./components/slide.js").PresentationSlideElement;
export type PresentationKeyHandler = import("./declarations.js").PresentationKeyHandler;
export type PresentationEventSimpleName = { [E in keyof HTMLElementEventMap]: E extends `p-slides.${infer N}` ? N : never; }[keyof HTMLElementEventMap];