update packages and add valign

This commit is contained in:
2026-04-05 20:00:27 +02:00
parent b062fb98e3
commit 03fb00e374
640 changed files with 109768 additions and 39311 deletions

37
scripts/reveal.js/dist/utils/color.d.ts vendored Normal file
View File

@@ -0,0 +1,37 @@
/**
* Converts various color input formats to an {r:0,g:0,b:0} object.
*
* @param {string} color The string representation of a color
* @example
* colorToRgb('#000');
* @example
* colorToRgb('#000000');
* @example
* colorToRgb('rgb(0,0,0)');
* @example
* colorToRgb('rgba(0,0,0)');
*
* @return {{r: number, g: number, b: number, [a]: number}|null}
*/
export declare const colorToRgb: (color: string) => {
r: number;
g: number;
b: number;
a?: undefined;
} | {
r: number;
g: number;
b: number;
a: number;
} | null;
/**
* Calculates brightness on a scale of 0-255.
*
* @param {string} color See colorToRgb for supported formats.
* @see {@link colorToRgb}
*/
export declare const colorBrightness: (color: string | {
r: number;
g: number;
b: number;
} | null) => number | null;

View File

@@ -0,0 +1,10 @@
export declare const SLIDES_SELECTOR = ".slides section";
export declare const HORIZONTAL_SLIDES_SELECTOR = ".slides>section";
export declare const VERTICAL_SLIDES_SELECTOR = ".slides>section.present>section";
export declare const HORIZONTAL_BACKGROUNDS_SELECTOR = ".backgrounds>.slide-background";
export declare const POST_MESSAGE_METHOD_BLACKLIST: RegExp;
export declare const FRAGMENT_STYLE_REGEX: RegExp;
export declare const SLIDE_NUMBER_FORMAT_HORIZONTAL_DOT_VERTICAL = "h.v";
export declare const SLIDE_NUMBER_FORMAT_HORIZONTAL_SLASH_VERTICAL = "h/v";
export declare const SLIDE_NUMBER_FORMAT_CURRENT = "c";
export declare const SLIDE_NUMBER_FORMAT_CURRENT_SLASH_TOTAL = "c/t";

View File

@@ -0,0 +1,3 @@
export declare const isMobile: boolean;
export declare const isChrome: boolean;
export declare const isAndroid: boolean;

View File

@@ -0,0 +1,8 @@
/**
* Loads a JavaScript file from the given URL and executes it.
*
* @param {string} url Address of the .js file to load
* @param {function} callback Method to invoke when the script
* has loaded and executed
*/
export declare const loadScript: (url: string, callback?: (error?: Error) => void) => void;

121
scripts/reveal.js/dist/utils/util.d.ts vendored Normal file
View File

@@ -0,0 +1,121 @@
/**
* Extend object a with the properties of object b.
* If there's a conflict, object b takes precedence.
*
* @param {object} a
* @param {object} b
*/
export declare const extend: (a: Record<string, any>, b: Record<string, any>) => Record<string, any>;
/**
* querySelectorAll but returns an Array.
*/
export declare const queryAll: (el: Element | Document, selector: string) => Element[];
/**
* classList.toggle() with cross browser support
*/
export declare const toggleClass: (el: Element, className: string, value: boolean) => void;
type DeserializedValue = string | number | boolean | null;
/**
* Utility for deserializing a value.
*
* @param {*} value
* @return {*}
*/
export declare const deserialize: (value: string) => DeserializedValue;
/**
* Measures the distance in pixels between point a
* and point b.
*
* @param {object} a point with x/y properties
* @param {object} b point with x/y properties
*
* @return {number}
*/
export declare const distanceBetween: (a: {
x: number;
y: number;
}, b: {
x: number;
y: number;
}) => number;
/**
* Applies a CSS transform to the target element.
*
* @param {HTMLElement} element
* @param {string} transform
*/
export declare const transformElement: (element: HTMLElement, transform: string) => void;
/**
* Element.matches with IE support.
*
* @param {HTMLElement} target The element to match
* @param {String} selector The CSS selector to match
* the element against
*
* @return {Boolean}
*/
export declare const matches: (target: any, selector: string) => boolean;
/**
* Find the closest parent that matches the given
* selector.
*
* @param {HTMLElement} target The child element
* @param {String} selector The CSS selector to match
* the parents against
*
* @return {HTMLElement} The matched parent or null
* if no matching parent was found
*/
export declare const closest: (target: Element | null, selector: string) => Element | null;
/**
* Handling the fullscreen functionality via the fullscreen API
*
* @see http://fullscreen.spec.whatwg.org/
* @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode
*/
export declare const enterFullscreen: (element?: Element) => void;
/**
* Creates an HTML element and returns a reference to it.
* If the element already exists the existing instance will
* be returned.
*
* @param {HTMLElement} container
* @param {string} tagname
* @param {string} classname
* @param {string} innerHTML
*
* @return {HTMLElement}
*/
export declare const createSingletonNode: (container: Element, tagname: string, classname: string, innerHTML?: string) => Element;
/**
* Injects the given CSS styles into the DOM.
*
* @param {string} value
*/
export declare const createStyleSheet: (value: string) => HTMLStyleElement;
/**
* Returns a key:value hash of all query params.
*/
export declare const getQueryHash: () => Record<string, DeserializedValue>;
/**
* Returns the remaining height within the parent of the
* target element.
*
* remaining height = [ configured parent height ] - [ current parent height ]
*
* @param {HTMLElement} element
* @param {number} [height]
*/
export declare const getRemainingHeight: (element: HTMLElement | null, height?: number) => number;
/**
* Guess the MIME type for common file formats.
*/
export declare const getMimeTypeFromFile: (filename?: string) => string | undefined;
/**
* Encodes a string for RFC3986-compliant URL format.
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI#encoding_for_rfc3986
*
* @param {string} url
*/
export declare const encodeRFC3986URI: (url?: string) => string;
export {};