update packages and add valign
This commit is contained in:
Vendored
+753
@@ -0,0 +1,753 @@
|
||||
/**
|
||||
* Slide transition styles.
|
||||
*
|
||||
* @see {@link https://revealjs.com/transitions/}
|
||||
*/
|
||||
type TransitionStyle = 'none' | 'fade' | 'slide' | 'convex' | 'concave' | 'zoom';
|
||||
/**
|
||||
* Slide transition speeds.
|
||||
*
|
||||
* @see {@link https://revealjs.com/transitions/}
|
||||
*/
|
||||
type TransitionSpeed = 'default' | 'fast' | 'slow';
|
||||
/**
|
||||
* Fragment animation classes.
|
||||
*
|
||||
* @see {@link https://revealjs.com/fragments/}
|
||||
*/
|
||||
type FragmentAnimation = 'fade-out' | 'fade-up' | 'fade-down' | 'fade-left' | 'fade-right' | 'fade-in-then-out' | 'fade-in-then-semi-out' | 'grow' | 'shrink' | 'strike' | 'highlight-red' | 'highlight-blue' | 'highlight-green' | 'highlight-current-red' | 'highlight-current-blue' | 'highlight-current-green' | (string & {});
|
||||
/**
|
||||
* katex - Math Plugin configuration
|
||||
*
|
||||
* @see {@link https://github.com/reveal/revealjs.com/blob/master/src/math.md}
|
||||
* @see {@link https://github.com/hakimel/reveal.js/blob/master/plugin/math/katex.js}
|
||||
*/
|
||||
interface KatexConfig {
|
||||
local?: string;
|
||||
version?: string;
|
||||
delimiters?: Array<{
|
||||
left: string;
|
||||
right: string;
|
||||
display: boolean;
|
||||
}>;
|
||||
ignoredTags?: string[];
|
||||
}
|
||||
/**
|
||||
* mathjax2 - Math Plugin configuration
|
||||
*
|
||||
* @see {@link https://github.com/reveal/revealjs.com/blob/master/src/math.md}
|
||||
* @see {@link https://github.com/hakimel/reveal.js/blob/master/plugin/math/mathjax2.js}
|
||||
*/
|
||||
interface Mathjax2Config {
|
||||
mathjax?: string;
|
||||
config?: string;
|
||||
tex2jax?: {
|
||||
inlineMath?: any;
|
||||
skipTags?: string[];
|
||||
};
|
||||
}
|
||||
/**
|
||||
* mathjax3 - Math Plugin configuration
|
||||
*
|
||||
* @see {@link https://github.com/reveal/revealjs.com/blob/master/src/math.md}
|
||||
* @see {@link https://github.com/hakimel/reveal.js/blob/master/plugin/math/mathjax3.js}
|
||||
*/
|
||||
interface Mathjax3Config {
|
||||
mathjax?: string;
|
||||
tex?: {
|
||||
inlineMath?: any;
|
||||
};
|
||||
options?: {
|
||||
skipHtmlTags: string[];
|
||||
};
|
||||
}
|
||||
/**
|
||||
* mathjax4 - Math Plugin configuration
|
||||
*
|
||||
* @see {@link https://github.com/reveal/revealjs.com/blob/master/src/math.md}
|
||||
* @see {@link https://github.com/hakimel/reveal.js/blob/master/plugin/math/mathjax4.js}
|
||||
*/
|
||||
interface Mathjax4Config {
|
||||
mathjax?: string;
|
||||
tex?: {
|
||||
inlineMath?: Array<[string, string]>;
|
||||
displayMath?: Array<[string, string]>;
|
||||
macros?: Record<string, string | [string, number]>;
|
||||
};
|
||||
options?: {
|
||||
skipHtmlTags?: string[];
|
||||
};
|
||||
startup?: {
|
||||
ready?: () => void;
|
||||
};
|
||||
output?: {
|
||||
font?: string;
|
||||
displayOverflow?: string;
|
||||
linebreaks?: {
|
||||
inline?: boolean;
|
||||
width?: string;
|
||||
lineleading?: number;
|
||||
LinebreakVisitor?: unknown;
|
||||
};
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Highlight Plugin configuration
|
||||
*
|
||||
* @see {@link https://github.com/hakimel/reveal.js/blob/master/plugin/highlight/plugin.js}
|
||||
*/
|
||||
interface HighlightConfig {
|
||||
highlightOnLoad?: boolean;
|
||||
escapeHTML?: boolean;
|
||||
beforeHighlight?: (...args: any) => any;
|
||||
}
|
||||
/**
|
||||
* Markdown Plugin configuration
|
||||
*
|
||||
* @see {@link https://github.com/reveal/revealjs.com/blob/master/src/markdown.md}
|
||||
* @see {@link https://marked.js.org/using_advanced}
|
||||
*/
|
||||
interface MarkdownConfig {
|
||||
async?: boolean;
|
||||
baseUrl?: string;
|
||||
breaks?: boolean;
|
||||
gfm?: boolean;
|
||||
headerIds?: boolean;
|
||||
headerPrefix?: string;
|
||||
highlight?: (...args: any) => any;
|
||||
langPrefix?: string;
|
||||
mangle?: boolean;
|
||||
pedantic?: boolean;
|
||||
renderer?: object;
|
||||
sanitize?: boolean;
|
||||
sanitizer?: (...args: any) => any;
|
||||
silent?: boolean;
|
||||
smartLists?: boolean;
|
||||
smartypants?: boolean;
|
||||
tokenizer?: object;
|
||||
walkTokens?: (...args: any) => any;
|
||||
xhtml?: boolean;
|
||||
separator?: string;
|
||||
verticalSeparator?: string;
|
||||
notesSeparator?: string;
|
||||
attributes?: string;
|
||||
}
|
||||
/**
|
||||
* Configuration object for reveal.js.
|
||||
*
|
||||
* @see {@link https://revealjs.com/config/}
|
||||
*/
|
||||
interface RevealConfig {
|
||||
/**
|
||||
* The "normal" size of the presentation, aspect ratio will be preserved
|
||||
* when the presentation is scaled to fit different resolutions
|
||||
*
|
||||
* @see {@link https://revealjs.com/presentation-size/}
|
||||
*
|
||||
* @defaultValue 960
|
||||
*/
|
||||
width?: number | string;
|
||||
/**
|
||||
* The "normal" size of the presentation, aspect ratio will be preserved
|
||||
* when the presentation is scaled to fit different resolutions
|
||||
*
|
||||
* @see {@link https://revealjs.com/presentation-size/}
|
||||
*
|
||||
* @defaultValue 700
|
||||
*/
|
||||
height?: number | string;
|
||||
/**
|
||||
* Factor of the display size that should remain empty around the content
|
||||
*
|
||||
* @see {@link https://revealjs.com/presentation-size/}
|
||||
*
|
||||
* @defaultValue 0.04
|
||||
*/
|
||||
margin?: number;
|
||||
/**
|
||||
* The smallest possible factor to scale content down by in order to fit
|
||||
* the available viewport.
|
||||
*
|
||||
* @see {@link https://revealjs.com/presentation-size/}
|
||||
*
|
||||
* @defaultValue 0.2
|
||||
*/
|
||||
minScale?: number;
|
||||
/**
|
||||
* The largest possible factor to scale content up by in order to cover
|
||||
* the available viewport.
|
||||
*
|
||||
* @see {@link https://revealjs.com/presentation-size/}
|
||||
*
|
||||
* @defaultValue 2.0
|
||||
*/
|
||||
maxScale?: number;
|
||||
/**
|
||||
* Display presentation control arrows
|
||||
* - true: Display controls in all views
|
||||
* - false: Hide controls in all views
|
||||
* - 'speaker': Display controls only in the speaker view
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
controls?: boolean | 'speaker' | 'speaker-only';
|
||||
/**
|
||||
* Help the user learn the controls by providing hints, for example by
|
||||
* bouncing the down arrow when they first encounter a vertical slide
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
controlsTutorial?: boolean;
|
||||
/**
|
||||
* Determines where controls appear, "edges" or "bottom-right"
|
||||
*
|
||||
* @defaultValue 'bottom-right'
|
||||
*/
|
||||
controlsLayout?: 'edges' | 'bottom-right';
|
||||
/**
|
||||
* Visibility rule for backwards navigation arrows; "faded", "hidden"
|
||||
* or "visible"
|
||||
*
|
||||
* @defaultValue 'faded'
|
||||
*/
|
||||
controlsBackArrows?: 'faded' | 'hidden' | 'visible';
|
||||
/**
|
||||
* Display a presentation progress bar
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
progress?: boolean;
|
||||
/**
|
||||
* Display the page number of the current slide
|
||||
* - true: Show slide number
|
||||
* - false: Hide slide number
|
||||
*
|
||||
* Can optionally be set as a string that specifies the number formatting:
|
||||
* - "h.v": Horizontal . vertical slide number (default)
|
||||
* - "h/v": Horizontal / vertical slide number
|
||||
* - "c": Flattened slide number
|
||||
* - "c/t": Flattened slide number / total slides
|
||||
*
|
||||
* Alternatively, you can provide a function that returns the slide
|
||||
* number for the current slide. The function should take in a slide
|
||||
* object and return an array with one string [slideNumber] or
|
||||
* three strings [n1,delimiter,n2]. See #formatSlideNumber().
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
slideNumber?: boolean | 'h.v' | 'h/v' | 'c' | 'c/t' | ((slide: any) => string | [string, string, string]);
|
||||
/**
|
||||
* Can be used to limit the contexts in which the slide number appears
|
||||
* - "all": Always show the slide number
|
||||
* - "print": Only when printing to PDF
|
||||
* - "speaker": Only in the speaker view
|
||||
*
|
||||
* @defaultValue 'all'
|
||||
*/
|
||||
showSlideNumber?: 'all' | 'print' | 'speaker';
|
||||
/**
|
||||
* Use 1 based indexing for # links to match slide number (default is zero
|
||||
* based)
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
hashOneBasedIndex?: boolean;
|
||||
/**
|
||||
* Add the current slide number to the URL hash so that reloading the
|
||||
* page/copying the URL will return you to the same slide
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
hash?: boolean;
|
||||
/**
|
||||
* Flags if we should monitor the hash and change slides accordingly
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
respondToHashChanges?: boolean;
|
||||
/**
|
||||
* Enable support for jump-to-slide navigation shortcuts
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
jumpToSlide?: boolean;
|
||||
/**
|
||||
* Push each slide change to the browser history. Implies `hash: true`
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
history?: boolean;
|
||||
/**
|
||||
* Enable keyboard shortcuts for navigation
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
keyboard?: boolean | {
|
||||
[keyCode: number]: string | ((event: KeyboardEvent) => void);
|
||||
};
|
||||
/**
|
||||
* Optional function that blocks keyboard events when returning false
|
||||
*
|
||||
* If you set this to 'focused', we will only capture keyboard events
|
||||
* for embedded decks when they are in focus
|
||||
*
|
||||
* @defaultValue null
|
||||
*/
|
||||
keyboardCondition?: null | 'focused' | ((event: KeyboardEvent) => boolean);
|
||||
/**
|
||||
* Disables the default reveal.js slide layout (scaling and centering)
|
||||
* so that you can use custom CSS layout
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
disableLayout?: boolean;
|
||||
/**
|
||||
* Enable the slide overview mode
|
||||
*
|
||||
* @see {@link https://revealjs.com/overview/}
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
overview?: boolean;
|
||||
/**
|
||||
* Vertical centering of slides
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
center?: boolean;
|
||||
/**
|
||||
* Enables touch navigation on devices with touch input
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
touch?: boolean;
|
||||
/**
|
||||
* Loop the presentation
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
loop?: boolean;
|
||||
/**
|
||||
* Change the presentation direction to be RTL
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
rtl?: boolean;
|
||||
/**
|
||||
* Changes the behavior of our navigation directions.
|
||||
*
|
||||
* "default"
|
||||
* Left/right arrow keys step between horizontal slides, up/down
|
||||
* arrow keys step between vertical slides. Space key steps through
|
||||
* all slides (both horizontal and vertical).
|
||||
*
|
||||
* "linear"
|
||||
* Removes the up/down arrows. Left/right arrows step through all
|
||||
* slides (both horizontal and vertical).
|
||||
*
|
||||
* "grid"
|
||||
* When this is enabled, stepping left/right from a vertical stack
|
||||
* to an adjacent vertical stack will land you at the same vertical
|
||||
* index.
|
||||
*
|
||||
* Consider a deck with six slides ordered in two vertical stacks:
|
||||
* 1.1 2.1
|
||||
* 1.2 2.2
|
||||
* 1.3 2.3
|
||||
*
|
||||
* If you're on slide 1.3 and navigate right, you will normally move
|
||||
* from 1.3 -> 2.1. If "grid" is used, the same navigation takes you
|
||||
* from 1.3 -> 2.3.
|
||||
*
|
||||
* @defaultValue 'default'
|
||||
*/
|
||||
navigationMode?: 'default' | 'linear' | 'grid';
|
||||
/**
|
||||
* Randomizes the order of slides each time the presentation loads
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
shuffle?: boolean;
|
||||
/**
|
||||
* Turns fragments on and off globally
|
||||
*
|
||||
* @see {@link https://revealjs.com/fragments/}
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
fragments?: boolean;
|
||||
/**
|
||||
* Flags whether to include the current fragment in the URL,
|
||||
* so that reloading brings you to the same fragment position
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
fragmentInURL?: boolean;
|
||||
/**
|
||||
* Flags if the presentation is running in an embedded mode,
|
||||
* i.e. contained within a limited portion of the screen
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
embedded?: boolean;
|
||||
/**
|
||||
* Flags if we should show a help overlay when the question-mark
|
||||
* key is pressed
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
help?: boolean;
|
||||
/**
|
||||
* Flags if it should be possible to pause the presentation (blackout)
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
pause?: boolean;
|
||||
/**
|
||||
* Flags if speaker notes should be visible to all viewers
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
showNotes?: boolean;
|
||||
/**
|
||||
* Flags if slides with data-visibility="hidden" should be kept visible
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
showHiddenSlides?: boolean;
|
||||
/**
|
||||
* Global override for autoplaying embedded media (video/audio/iframe)
|
||||
* - null: Media will only autoplay if data-autoplay is present
|
||||
* - true: All media will autoplay, regardless of individual setting
|
||||
* - false: No media will autoplay, regardless of individual setting
|
||||
*
|
||||
* @defaultValue null
|
||||
*/
|
||||
autoPlayMedia?: null | boolean;
|
||||
/**
|
||||
* Global override for preloading lazy-loaded iframes
|
||||
* - null: Iframes with data-src AND data-preload will be loaded when within
|
||||
* the viewDistance, iframes with only data-src will be loaded when visible
|
||||
* - true: All iframes with data-src will be loaded when within the viewDistance
|
||||
* - false: All iframes with data-src will be loaded only when visible
|
||||
*
|
||||
* @defaultValue null
|
||||
*/
|
||||
preloadIframes?: null | boolean;
|
||||
/**
|
||||
* Prevent embedded iframes from automatically focusing on themselves
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
preventIframeAutoFocus?: boolean;
|
||||
/**
|
||||
* Can be used to globally disable auto-animation
|
||||
*
|
||||
* @see {@link https://revealjs.com/auto-animate/}
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
autoAnimate?: boolean;
|
||||
/**
|
||||
* Optionally provide a custom element matcher that will be
|
||||
* used to dictate which elements we can animate between.
|
||||
*
|
||||
* @defaultValue null
|
||||
*/
|
||||
autoAnimateMatcher?: null | Function;
|
||||
/**
|
||||
* Default settings for our auto-animate transitions, can be
|
||||
* overridden per-slide or per-element via data arguments
|
||||
*
|
||||
* @defaultValue 'ease'
|
||||
*/
|
||||
autoAnimateEasing?: 'ease' | string;
|
||||
/**
|
||||
* Number of seconds to animate each element.
|
||||
*
|
||||
* @defaultValue 1.0
|
||||
*/
|
||||
autoAnimateDuration?: number;
|
||||
/**
|
||||
* Should unmatched elements be faded in?
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
autoAnimateUnmatched?: boolean;
|
||||
/**
|
||||
* CSS properties that can be auto-animated. Position & scale
|
||||
* is matched separately so there's no need to include styles
|
||||
* like top/right/bottom/left, width/height or margin.
|
||||
*
|
||||
* @defaultValue ['opacity', 'color', 'background-color', 'padding', 'font-size', 'line-height', 'letter-spacing', 'border-width', 'border-color', 'border-radius', 'outline', 'outline-offset']
|
||||
*/
|
||||
autoAnimateStyles?: string[];
|
||||
/**
|
||||
* Controls automatic progression to the next slide
|
||||
* - 0: Auto-sliding only happens if the data-autoslide HTML attribute
|
||||
* is present on the current slide or fragment
|
||||
* - 1+: All slides will progress automatically at the given interval
|
||||
* - false: No auto-sliding, even if data-autoslide is present
|
||||
*
|
||||
* @defaultValue 0
|
||||
*/
|
||||
autoSlide?: number | false;
|
||||
/**
|
||||
* Stop auto-sliding after user input
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
autoSlideStoppable?: boolean;
|
||||
/**
|
||||
* Use this method for navigation when auto-sliding (defaults to navigateNext)
|
||||
*
|
||||
* @defaultValue null
|
||||
*/
|
||||
autoSlideMethod?: null | Function;
|
||||
/**
|
||||
* Specify the average time in seconds that you think you will spend
|
||||
* presenting each slide. This is used to show a pacing timer in the
|
||||
* speaker view
|
||||
*
|
||||
* @defaultValue null
|
||||
*/
|
||||
defaultTiming?: null;
|
||||
/**
|
||||
* Enable slide navigation via mouse wheel
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
mouseWheel?: boolean;
|
||||
/**
|
||||
* Opens links in an iframe preview overlay
|
||||
* Add `data-preview-link` and `data-preview-link="false"` to customize each link
|
||||
* individually
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
previewLinks?: boolean;
|
||||
/**
|
||||
* Exposes the reveal.js API through window.postMessage
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
postMessage?: boolean;
|
||||
/**
|
||||
* Dispatches all reveal.js events to the parent window through postMessage
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
postMessageEvents?: boolean;
|
||||
/**
|
||||
* Focuses body when page changes visibility to ensure keyboard shortcuts work
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
focusBodyOnPageVisibilityChange?: boolean;
|
||||
/**
|
||||
* Transition style
|
||||
*
|
||||
* @see {@link https://revealjs.com/transitions/}
|
||||
*
|
||||
* @defaultValue 'slide'
|
||||
*/
|
||||
transition?: TransitionStyle;
|
||||
/**
|
||||
* Transition speed
|
||||
*
|
||||
* @defaultValue 'default'
|
||||
*/
|
||||
transitionSpeed?: TransitionSpeed;
|
||||
/**
|
||||
* Transition style for full page slide backgrounds
|
||||
*
|
||||
* @defaultValue 'fade'
|
||||
*/
|
||||
backgroundTransition?: TransitionStyle;
|
||||
/**
|
||||
* Parallax background image
|
||||
*
|
||||
* @defaultValue ''
|
||||
*/
|
||||
parallaxBackgroundImage?: null | string;
|
||||
/**
|
||||
* Parallax background size
|
||||
*
|
||||
* @defaultValue ''
|
||||
*/
|
||||
parallaxBackgroundSize?: null | string;
|
||||
/**
|
||||
* Parallax background repeat
|
||||
*
|
||||
* @defaultValue ''
|
||||
*/
|
||||
parallaxBackgroundRepeat?: null | string;
|
||||
/**
|
||||
* Parallax background position
|
||||
*
|
||||
* @defaultValue ''
|
||||
*/
|
||||
parallaxBackgroundPosition?: null | string;
|
||||
/**
|
||||
* Amount of pixels to move the parallax background per slide step
|
||||
*
|
||||
* @defaultValue null
|
||||
*/
|
||||
parallaxBackgroundHorizontal?: null | number;
|
||||
/**
|
||||
*
|
||||
* @defaultValue null
|
||||
*/
|
||||
parallaxBackgroundVertical?: null | number;
|
||||
/**
|
||||
* Can be used to initialize reveal.js in one of the following views:
|
||||
* - print: Render the presentation so that it can be printed to PDF
|
||||
* - scroll: Show the presentation as a tall scrollable page with scroll
|
||||
* triggered animations
|
||||
*
|
||||
* @see {@link https://revealjs.com/scroll-view/}
|
||||
*
|
||||
* @defaultValue null
|
||||
*/
|
||||
view?: null | 'print' | 'scroll';
|
||||
/**
|
||||
* Adjusts the height of each slide in the scroll view.
|
||||
* - full: Each slide is as tall as the viewport
|
||||
* - compact: Slides are as small as possible, allowing multiple slides
|
||||
* to be visible in parallel on tall devices
|
||||
*
|
||||
* @defaultValue 'full'
|
||||
*/
|
||||
scrollLayout?: 'full' | 'compact';
|
||||
/**
|
||||
* Control how scroll snapping works in the scroll view.
|
||||
* - false: No snapping, scrolling is continuous
|
||||
* - proximity: Snap when close to a slide
|
||||
* - mandatory: Always snap to the closest slide
|
||||
*
|
||||
* Only applies to presentations in scroll view.
|
||||
*
|
||||
* @defaultValue 'mandatory'
|
||||
*/
|
||||
scrollSnap?: false | 'proximity' | 'mandatory';
|
||||
/**
|
||||
* Enables and configures the scroll view progress bar.
|
||||
* - 'auto': Show the scrollbar while scrolling, hide while idle
|
||||
* - true: Always show the scrollbar
|
||||
* - false: Never show the scrollbar
|
||||
*
|
||||
* @defaultValue 'auto'
|
||||
*/
|
||||
scrollProgress?: 'auto' | boolean;
|
||||
/**
|
||||
* Automatically activate the scroll view when we the viewport falls
|
||||
* below the given width.
|
||||
*
|
||||
* @defaultValue 435
|
||||
*/
|
||||
scrollActivationWidth?: number;
|
||||
/**
|
||||
* The maximum number of pages a single slide can expand onto when printing
|
||||
* to PDF, unlimited by default
|
||||
*
|
||||
* @defaultValue Number.POSITIVE_INFINITY
|
||||
*/
|
||||
pdfMaxPagesPerSlide?: number;
|
||||
/**
|
||||
* Prints each fragment on a separate slide
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
pdfSeparateFragments?: boolean;
|
||||
/**
|
||||
* Offset used to reduce the height of content within exported PDF pages.
|
||||
* This exists to account for environment differences based on how you
|
||||
* print to PDF. CLI printing options, like phantomjs and wkpdf, can end
|
||||
* on precisely the total height of the document whereas in-browser
|
||||
* printing has to end one pixel before.
|
||||
*
|
||||
* @defaultValue -1
|
||||
*/
|
||||
pdfPageHeightOffset?: number;
|
||||
/**
|
||||
* Number of slides away from the current that are visible
|
||||
*
|
||||
* @defaultValue 3
|
||||
*/
|
||||
viewDistance?: number;
|
||||
/**
|
||||
* Number of slides away from the current that are visible on mobile
|
||||
* devices. It is advisable to set this to a lower number than
|
||||
* viewDistance in order to save resources.
|
||||
*
|
||||
* @defaultValue 2
|
||||
*/
|
||||
mobileViewDistance?: number;
|
||||
/**
|
||||
* The display mode that will be used to show slides
|
||||
*
|
||||
* @defaultValue 'block'
|
||||
*/
|
||||
display?: string;
|
||||
/**
|
||||
* Hide cursor if inactive
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
hideInactiveCursor?: boolean;
|
||||
/**
|
||||
* Time before the cursor is hidden (in ms)
|
||||
*
|
||||
* @defaultValue 5000
|
||||
*/
|
||||
hideCursorTime?: number;
|
||||
/**
|
||||
* Should we automatically sort and set indices for fragments
|
||||
* at each sync? (See Reveal.sync)
|
||||
*
|
||||
* @defaultValue true
|
||||
*/
|
||||
sortFragmentsOnSync?: boolean;
|
||||
/**
|
||||
* Highlight plugin configuration
|
||||
*/
|
||||
highlight?: HighlightConfig;
|
||||
/**
|
||||
* Markdown plugin configuration
|
||||
*/
|
||||
markdown?: MarkdownConfig;
|
||||
/**
|
||||
* KaTeX math plugin configuration
|
||||
*/
|
||||
katex?: KatexConfig;
|
||||
/**
|
||||
* MathJax 2 plugin configuration
|
||||
*/
|
||||
mathjax2?: Mathjax2Config;
|
||||
/**
|
||||
* MathJax 3 plugin configuration
|
||||
*/
|
||||
mathjax3?: Mathjax3Config;
|
||||
/**
|
||||
* MathJax 4 plugin configuration
|
||||
*/
|
||||
mathjax4?: Mathjax4Config;
|
||||
/**
|
||||
* Script dependencies to load
|
||||
*
|
||||
* @defaultValue []
|
||||
*/
|
||||
dependencies?: any[];
|
||||
/**
|
||||
* Plugin objects to register and use for this presentation
|
||||
*
|
||||
* @defaultValue []
|
||||
*/
|
||||
plugins?: any[];
|
||||
}
|
||||
/**
|
||||
* The default reveal.js config object.
|
||||
*/
|
||||
declare const defaultConfig: RevealConfig;
|
||||
export type { RevealConfig, TransitionStyle, TransitionSpeed, FragmentAnimation, KatexConfig, Mathjax2Config, Mathjax3Config, Mathjax4Config, HighlightConfig, MarkdownConfig, };
|
||||
export { defaultConfig };
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
import { HLJSApi } from 'highlight.js';
|
||||
import { RevealPlugin } from 'reveal.js';
|
||||
export interface HighlightLine {
|
||||
start?: number;
|
||||
end?: number;
|
||||
}
|
||||
export interface HighlightLineNumbersOptions {
|
||||
singleLine?: boolean;
|
||||
startFrom?: number;
|
||||
}
|
||||
export interface HighlightJsApi extends HLJSApi {
|
||||
initLineNumbersOnLoad(options?: HighlightLineNumbersOptions): void;
|
||||
lineNumbersBlock(element: HTMLElement, options?: HighlightLineNumbersOptions): void;
|
||||
lineNumbersValue(code: string, options?: HighlightLineNumbersOptions): string | undefined;
|
||||
}
|
||||
export interface HighlightScrollState {
|
||||
currentBlock?: HTMLElement;
|
||||
animationFrameID?: number;
|
||||
}
|
||||
export interface HighlightLineBounds {
|
||||
top: number;
|
||||
bottom: number;
|
||||
}
|
||||
export type HighlightLineStep = HighlightLine[];
|
||||
export interface HighlightPlugin extends RevealPlugin {
|
||||
id: 'highlight';
|
||||
HIGHLIGHT_STEP_DELIMITER: '|';
|
||||
HIGHLIGHT_LINE_DELIMITER: ',';
|
||||
HIGHLIGHT_LINE_RANGE_DELIMITER: '-';
|
||||
hljs: HighlightJsApi;
|
||||
highlightBlock(block: HTMLElement): void;
|
||||
scrollHighlightedLineIntoView(block: HTMLElement, scrollState: HighlightScrollState, skipAnimation?: boolean): void;
|
||||
easeInOutQuart(t: number): number;
|
||||
getHighlightedLineBounds(block: HTMLElement): HighlightLineBounds;
|
||||
highlightLines(block: HTMLElement, linesToHighlight?: string): void;
|
||||
deserializeHighlightSteps(highlightSteps: string): HighlightLineStep[];
|
||||
serializeHighlightSteps(highlightSteps: HighlightLineStep[]): string;
|
||||
}
|
||||
declare const Highlight: () => HighlightPlugin;
|
||||
export default Highlight;
|
||||
+17
File diff suppressed because one or more lines are too long
+49449
File diff suppressed because one or more lines are too long
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Monokai style - ported by Luigi Maselli - http://grigio.org
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #272822;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-strong,
|
||||
.hljs-name {
|
||||
color: #f92672;
|
||||
}
|
||||
|
||||
.hljs-code {
|
||||
color: #66d9ef;
|
||||
}
|
||||
|
||||
.hljs-class .hljs-title {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #bf79db;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-bullet,
|
||||
.hljs-subst,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-emphasis,
|
||||
.hljs-type,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #a6e22e;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-deletion,
|
||||
.hljs-meta {
|
||||
color: #75715e;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-doctag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-selector-id {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
|
||||
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
|
||||
based on dark.css by Ivan Sagalaev
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #3f3f3f;
|
||||
color: #dcdcdc;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-tag {
|
||||
color: #e3ceab;
|
||||
}
|
||||
|
||||
.hljs-template-tag {
|
||||
color: #dcdcdc;
|
||||
}
|
||||
|
||||
.hljs-number {
|
||||
color: #8cd0d3;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute {
|
||||
color: #efdcbc;
|
||||
}
|
||||
|
||||
.hljs-literal {
|
||||
color: #efefaf;
|
||||
}
|
||||
|
||||
.hljs-subst {
|
||||
color: #8f8f8f;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-section,
|
||||
.hljs-type {
|
||||
color: #efef8f;
|
||||
}
|
||||
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-link {
|
||||
color: #dca3a3;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-string,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name {
|
||||
color: #cc9393;
|
||||
}
|
||||
|
||||
.hljs-addition,
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-meta {
|
||||
color: #7f9f7f;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { MarkdownConfig, RevealPlugin } from 'reveal.js';
|
||||
import { Marked } from 'marked';
|
||||
export interface MarkdownSlidifyOptions {
|
||||
separator?: string | null;
|
||||
verticalSeparator?: string | null;
|
||||
notesSeparator?: string;
|
||||
attributes?: string;
|
||||
}
|
||||
export interface MarkdownOptions extends MarkdownConfig {
|
||||
animateLists?: boolean;
|
||||
}
|
||||
export interface MarkdownPlugin extends RevealPlugin {
|
||||
id: 'markdown';
|
||||
processSlides(scope: ParentNode): Promise<void[]>;
|
||||
convertSlides(): Promise<void>;
|
||||
slidify(markdown: string, options?: MarkdownSlidifyOptions): string;
|
||||
readonly marked: Marked | null;
|
||||
readonly markdownOptions: MarkdownOptions;
|
||||
}
|
||||
declare const Markdown: () => MarkdownPlugin;
|
||||
export default Markdown;
|
||||
+63
File diff suppressed because one or more lines are too long
+1380
File diff suppressed because one or more lines are too long
+21
@@ -0,0 +1,21 @@
|
||||
import { RevealPlugin } from 'reveal.js';
|
||||
export interface KaTeXPlugin extends RevealPlugin {
|
||||
id: 'katex';
|
||||
}
|
||||
export interface MathJax2Plugin extends RevealPlugin {
|
||||
id: 'mathjax2';
|
||||
}
|
||||
export interface MathJax3Plugin extends RevealPlugin {
|
||||
id: 'mathjax3';
|
||||
}
|
||||
export interface MathJax4Plugin extends RevealPlugin {
|
||||
id: 'mathjax4';
|
||||
}
|
||||
export interface MathPlugin extends MathJax2Plugin {
|
||||
KaTeX: () => KaTeXPlugin;
|
||||
MathJax2: () => MathJax2Plugin;
|
||||
MathJax3: () => MathJax3Plugin;
|
||||
MathJax4: () => MathJax4Plugin;
|
||||
}
|
||||
declare const Math: MathPlugin;
|
||||
export default Math;
|
||||
+1
@@ -0,0 +1 @@
|
||||
(function(d,p){typeof exports=="object"&&typeof module<"u"?module.exports=p():typeof define=="function"&&define.amd?define(p):(d=typeof globalThis<"u"?globalThis:d||self,d.RevealMath=p())})(this,(function(){"use strict";const d=()=>{let n,s={version:"latest",delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],ignoredTags:["script","noscript","style","textarea","pre","code"]};const r=t=>{let a=document.createElement("link");a.rel="stylesheet",a.href=t,document.head.appendChild(a)},o=t=>new Promise((a,i)=>{const l=document.createElement("script");l.type="text/javascript",l.onload=a,l.onerror=i,l.src=t,document.head.append(l)});async function e(t){for(const a of t)await o(a)}return{id:"katex",init:function(t){n=t;let a=n.getConfig().katex||{},i={...s,...a};const{local:l,version:x,extensions:$,...g}=i;let c=i.local||"https://cdn.jsdelivr.net/npm/katex",u=i.local?"":"@"+i.version,M=c+u+"/dist/katex.min.css",J=c+u+"/dist/katex.min.js",v=c+u+"/dist/contrib/mhchem.min.js",S=c+u+"/dist/contrib/auto-render.min.js",h=[J];i.extensions&&i.extensions.includes("mhchem")&&h.push(v),h.push(S);const m=()=>{renderMathInElement(t.getSlidesElement(),g),n.layout()};r(M),e(h).then(()=>{n.isReady()?m():n.on("ready",m.bind(this))})}}},p=()=>{let n,s={messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]],skipTags:["script","noscript","style","textarea","pre","code"]},skipStartupTypeset:!0};function r(o,e){let t=document.querySelector("head"),a=document.createElement("script");a.type="text/javascript",a.src=o;let i=()=>{typeof e=="function"&&(e.call(),e=null)};a.onload=i,a.onreadystatechange=()=>{this.readyState==="loaded"&&i()},t.appendChild(a)}return{id:"mathjax2",init:function(o){n=o;let e=n.getConfig().mathjax2||n.getConfig().math||{},t={...s,...e},a=t.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js",i=t.config||"TeX-AMS_HTML-full",l=a+"?config="+i;t.tex2jax={...s.tex2jax,...e.tex2jax},t.mathjax=t.config=null,r(l,function(){MathJax.Hub.Config(t),MathJax.Hub.Queue(["Typeset",MathJax.Hub,n.getRevealElement()]),MathJax.Hub.Queue(n.layout),n.on("slidechanged",function(x){MathJax.Hub.Queue(["Typeset",MathJax.Hub,x.currentSlide])})})}}},f=()=>{let n,s={tex:{inlineMath:[["$","$"],["\\(","\\)"]]},options:{skipHtmlTags:["script","noscript","style","textarea","pre","code"]},startup:{ready:()=>{MathJax.startup.defaultReady(),MathJax.startup.promise.then(()=>{n.layout()})}}};function r(o,e){let t=document.createElement("script");t.type="text/javascript",t.id="MathJax-script",t.src=o,t.async=!0,t.onload=()=>{typeof e=="function"&&(e.call(),e=null)},document.head.appendChild(t)}return{id:"mathjax3",init:function(o){n=o;let e=n.getConfig().mathjax3||{},t={...s,...e};t.tex={...s.tex,...e.tex},t.options={...s.options,...e.options},t.startup={...s.startup,...e.startup};let a=t.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";t.mathjax=null,window.MathJax=t,r(a,function(){n.addEventListener("slidechanged",function(i){MathJax.typeset()})})}}},y=()=>{let n,s={tex:{inlineMath:[["$","$"],["\\(","\\)"]]},options:{skipHtmlTags:["script","noscript","style","textarea","pre","code"]},startup:{ready:()=>{MathJax.startup.defaultReady(),MathJax.startup.promise.then(()=>{n.layout()})}}};function r(o,e){let t=document.createElement("script");t.type="text/javascript",t.id="MathJax-script",t.src=o,t.async=!0,t.onload=()=>{typeof e=="function"&&(e.call(),e=null)},document.head.appendChild(t)}return{id:"mathjax4",init:function(o){n=o;let e=n.getConfig().mathjax4||{},t={...s,...e};t.tex={...s.tex,...e.tex},t.options={...s.options,...e.options},t.startup={...s.startup,...e.startup};let a=t.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js";t.mathjax=null,window.MathJax=t,r(a,function(){MathJax.startup.promise.then(()=>{MathJax.typeset(),n.addEventListener("slidechanged",function(i){MathJax.typeset()})})})}}},j=p;return Plugin=Object.assign(j(),{KaTeX:d,MathJax2:p,MathJax3:f,MathJax4:y})}));
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
const M = () => {
|
||||
let a, s = {
|
||||
version: "latest",
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: !0 },
|
||||
// Note: $$ has to come before $
|
||||
{ left: "$", right: "$", display: !1 },
|
||||
{ left: "\\(", right: "\\)", display: !1 },
|
||||
{ left: "\\[", right: "\\]", display: !0 }
|
||||
],
|
||||
ignoredTags: ["script", "noscript", "style", "textarea", "pre", "code"]
|
||||
};
|
||||
const r = (t) => {
|
||||
let n = document.createElement("link");
|
||||
n.rel = "stylesheet", n.href = t, document.head.appendChild(n);
|
||||
}, o = (t) => new Promise((n, i) => {
|
||||
const l = document.createElement("script");
|
||||
l.type = "text/javascript", l.onload = n, l.onerror = i, l.src = t, document.head.append(l);
|
||||
});
|
||||
async function e(t) {
|
||||
for (const n of t)
|
||||
await o(n);
|
||||
}
|
||||
return {
|
||||
id: "katex",
|
||||
init: function(t) {
|
||||
a = t;
|
||||
let n = a.getConfig().katex || {}, i = { ...s, ...n };
|
||||
const { local: l, version: u, extensions: $, ...m } = i;
|
||||
let p = i.local || "https://cdn.jsdelivr.net/npm/katex", c = i.local ? "" : "@" + i.version, f = p + c + "/dist/katex.min.css", y = p + c + "/dist/katex.min.js", j = p + c + "/dist/contrib/mhchem.min.js", g = p + c + "/dist/contrib/auto-render.min.js", d = [y];
|
||||
i.extensions && i.extensions.includes("mhchem") && d.push(j), d.push(g);
|
||||
const h = () => {
|
||||
renderMathInElement(t.getSlidesElement(), m), a.layout();
|
||||
};
|
||||
r(f), e(d).then(() => {
|
||||
a.isReady() ? h() : a.on("ready", h.bind(this));
|
||||
});
|
||||
}
|
||||
};
|
||||
}, x = () => {
|
||||
let a, s = {
|
||||
messageStyle: "none",
|
||||
tex2jax: {
|
||||
inlineMath: [["$", "$"], ["\\(", "\\)"]],
|
||||
skipTags: ["script", "noscript", "style", "textarea", "pre", "code"]
|
||||
},
|
||||
skipStartupTypeset: !0
|
||||
};
|
||||
function r(o, e) {
|
||||
let t = document.querySelector("head"), n = document.createElement("script");
|
||||
n.type = "text/javascript", n.src = o;
|
||||
let i = () => {
|
||||
typeof e == "function" && (e.call(), e = null);
|
||||
};
|
||||
n.onload = i, n.onreadystatechange = () => {
|
||||
this.readyState === "loaded" && i();
|
||||
}, t.appendChild(n);
|
||||
}
|
||||
return {
|
||||
id: "mathjax2",
|
||||
init: function(o) {
|
||||
a = o;
|
||||
let e = a.getConfig().mathjax2 || a.getConfig().math || {}, t = { ...s, ...e }, n = t.mathjax || "https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js", i = t.config || "TeX-AMS_HTML-full", l = n + "?config=" + i;
|
||||
t.tex2jax = { ...s.tex2jax, ...e.tex2jax }, t.mathjax = t.config = null, r(l, function() {
|
||||
MathJax.Hub.Config(t), MathJax.Hub.Queue(["Typeset", MathJax.Hub, a.getRevealElement()]), MathJax.Hub.Queue(a.layout), a.on("slidechanged", function(u) {
|
||||
MathJax.Hub.Queue(["Typeset", MathJax.Hub, u.currentSlide]);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}, J = () => {
|
||||
let a, s = {
|
||||
tex: {
|
||||
inlineMath: [["$", "$"], ["\\(", "\\)"]]
|
||||
},
|
||||
options: {
|
||||
skipHtmlTags: ["script", "noscript", "style", "textarea", "pre", "code"]
|
||||
},
|
||||
startup: {
|
||||
ready: () => {
|
||||
MathJax.startup.defaultReady(), MathJax.startup.promise.then(() => {
|
||||
a.layout();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function r(o, e) {
|
||||
let t = document.createElement("script");
|
||||
t.type = "text/javascript", t.id = "MathJax-script", t.src = o, t.async = !0, t.onload = () => {
|
||||
typeof e == "function" && (e.call(), e = null);
|
||||
}, document.head.appendChild(t);
|
||||
}
|
||||
return {
|
||||
id: "mathjax3",
|
||||
init: function(o) {
|
||||
a = o;
|
||||
let e = a.getConfig().mathjax3 || {}, t = { ...s, ...e };
|
||||
t.tex = { ...s.tex, ...e.tex }, t.options = { ...s.options, ...e.options }, t.startup = { ...s.startup, ...e.startup };
|
||||
let n = t.mathjax || "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";
|
||||
t.mathjax = null, window.MathJax = t, r(n, function() {
|
||||
a.addEventListener("slidechanged", function(i) {
|
||||
MathJax.typeset();
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}, v = () => {
|
||||
let a, s = {
|
||||
tex: {
|
||||
inlineMath: [["$", "$"], ["\\(", "\\)"]]
|
||||
},
|
||||
options: {
|
||||
skipHtmlTags: ["script", "noscript", "style", "textarea", "pre", "code"]
|
||||
},
|
||||
startup: {
|
||||
ready: () => {
|
||||
MathJax.startup.defaultReady(), MathJax.startup.promise.then(() => {
|
||||
a.layout();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function r(o, e) {
|
||||
let t = document.createElement("script");
|
||||
t.type = "text/javascript", t.id = "MathJax-script", t.src = o, t.async = !0, t.onload = () => {
|
||||
typeof e == "function" && (e.call(), e = null);
|
||||
}, document.head.appendChild(t);
|
||||
}
|
||||
return {
|
||||
id: "mathjax4",
|
||||
init: function(o) {
|
||||
a = o;
|
||||
let e = a.getConfig().mathjax4 || {}, t = { ...s, ...e };
|
||||
t.tex = { ...s.tex, ...e.tex }, t.options = { ...s.options, ...e.options }, t.startup = { ...s.startup, ...e.startup };
|
||||
let n = t.mathjax || "https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js";
|
||||
t.mathjax = null, window.MathJax = t, r(n, function() {
|
||||
MathJax.startup.promise.then(() => {
|
||||
MathJax.typeset(), a.addEventListener("slidechanged", function(i) {
|
||||
MathJax.typeset();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}, S = x;
|
||||
const k = Plugin = Object.assign(S(), {
|
||||
KaTeX: M,
|
||||
MathJax2: x,
|
||||
MathJax3: J,
|
||||
MathJax4: v
|
||||
}), C = k;
|
||||
export {
|
||||
C as default
|
||||
};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import { RevealPlugin } from 'reveal.js';
|
||||
export interface NotesPlugin extends RevealPlugin {
|
||||
id: 'notes';
|
||||
open(): void;
|
||||
}
|
||||
declare const Notes: () => NotesPlugin;
|
||||
export default Notes;
|
||||
+970
File diff suppressed because one or more lines are too long
+2126
File diff suppressed because one or more lines are too long
+9
@@ -0,0 +1,9 @@
|
||||
import { RevealPlugin } from 'reveal.js';
|
||||
export interface SearchPlugin extends RevealPlugin {
|
||||
id: 'search';
|
||||
open(): void;
|
||||
close(): void;
|
||||
toggle(): void;
|
||||
}
|
||||
declare const Search: () => SearchPlugin;
|
||||
export default Search;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
(function(p,y){typeof exports=="object"&&typeof module<"u"?module.exports=y():typeof define=="function"&&define.amd?define(y):(p=typeof globalThis<"u"?globalThis:p||self,p.RevealSearch=y())})(this,(function(){"use strict";return()=>{let c,t,i,n,o,v,s;function x(){t=document.createElement("div"),t.classList.add("searchbox"),t.style.position="absolute",t.style.top="10px",t.style.right="10px",t.style.zIndex=10,t.innerHTML=`<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>
|
||||
</span>`,i=t.querySelector(".searchinput"),i.style.width="240px",i.style.fontSize="14px",i.style.padding="4px 6px",i.style.color="#000",i.style.background="#fff",i.style.borderRadius="2px",i.style.border="0",i.style.outline="0",i.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",i.style["-webkit-appearance"]="none",c.getRevealElement().appendChild(t),i.addEventListener("keyup",function(r){r.keyCode===13?(r.preventDefault(),L(),v=!1):v=!0},!1),m()}function E(){t||x(),t.style.display="inline",i.focus(),i.select()}function m(){t||x(),t.style.display="none",s&&s.remove()}function N(){t||x(),t.style.display!=="inline"?E():m()}function L(){if(v){var r=i.value;r===""?(s&&s.remove(),n=null):(s=new I("slidecontent"),n=s.apply(r),o=0)}n&&(n.length&&n.length<=o&&(o=0),n.length>o&&(c.slide(n[o].h,n[o].v),o++))}function I(r,f){var M=document.getElementById(r)||document.body,S=f||"EM",B=new RegExp("^(?:"+S+"|SCRIPT|FORM)$"),R=["#ff6","#a0ffff","#9f9","#f99","#f6f"],b=[],D=0,g="",d=[];this.setRegex=function(e){e=e.trim(),g=new RegExp("("+e+")","i")},this.getRegex=function(){return g.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(e){if(!(e==null||!e)&&g&&!B.test(e.nodeName)){if(e.hasChildNodes())for(var l=0;l<e.childNodes.length;l++)this.hiliteWords(e.childNodes[l]);if(e.nodeType==3){var T,a;if((T=e.nodeValue)&&(a=g.exec(T))){for(var h=e;h!=null&&h.nodeName!="SECTION";)h=h.parentNode;for(var w=c.getIndices(h),F=d.length,k=!1,l=0;l<F;l++)d[l].h===w.h&&d[l].v===w.v&&(k=!0);k||d.push(w),b[a[0].toLowerCase()]||(b[a[0].toLowerCase()]=R[D++%R.length]);var u=document.createElement(S);u.appendChild(document.createTextNode(a[0])),u.style.backgroundColor=b[a[0].toLowerCase()],u.style.fontStyle="inherit",u.style.color="#000";var C=e.splitText(a.index);C.nodeValue=C.nodeValue.substring(a[0].length),e.parentNode.insertBefore(u,C)}}}},this.remove=function(){for(var e=document.getElementsByTagName(S),l;e.length&&(l=e[0]);)l.parentNode.replaceChild(l.firstChild,l)},this.apply=function(e){if(!(e==null||!e))return this.remove(),this.setRegex(e),this.hiliteWords(M),d}}return{id:"search",init:r=>{c=r,c.registerKeyboardShortcut("CTRL + Shift + F","Search"),document.addEventListener("keydown",function(f){f.key=="F"&&(f.ctrlKey||f.metaKey)&&(f.preventDefault(),N())},!1)},open:E,close:m,toggle:N}}}));
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
const D = () => {
|
||||
let f, t, l, n, a, y, s;
|
||||
function g() {
|
||||
t = document.createElement("div"), t.classList.add("searchbox"), t.style.position = "absolute", t.style.top = "10px", t.style.right = "10px", t.style.zIndex = 10, t.innerHTML = `<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>
|
||||
</span>`, l = t.querySelector(".searchinput"), l.style.width = "240px", l.style.fontSize = "14px", l.style.padding = "4px 6px", l.style.color = "#000", l.style.background = "#fff", l.style.borderRadius = "2px", l.style.border = "0", l.style.outline = "0", l.style.boxShadow = "0 2px 18px rgba(0, 0, 0, 0.2)", l.style["-webkit-appearance"] = "none", f.getRevealElement().appendChild(t), l.addEventListener("keyup", function(r) {
|
||||
r.keyCode === 13 ? (r.preventDefault(), k(), y = !1) : y = !0;
|
||||
}, !1), v();
|
||||
}
|
||||
function w() {
|
||||
t || g(), t.style.display = "inline", l.focus(), l.select();
|
||||
}
|
||||
function v() {
|
||||
t || g(), t.style.display = "none", s && s.remove();
|
||||
}
|
||||
function C() {
|
||||
t || g(), t.style.display !== "inline" ? w() : v();
|
||||
}
|
||||
function k() {
|
||||
if (y) {
|
||||
var r = l.value;
|
||||
r === "" ? (s && s.remove(), n = null) : (s = new T("slidecontent"), n = s.apply(r), a = 0);
|
||||
}
|
||||
n && (n.length && n.length <= a && (a = 0), n.length > a && (f.slide(n[a].h, n[a].v), a++));
|
||||
}
|
||||
function T(r, c) {
|
||||
var L = document.getElementById(r) || document.body, x = c || "EM", I = new RegExp("^(?:" + x + "|SCRIPT|FORM)$"), E = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"], m = [], M = 0, p = "", d = [];
|
||||
this.setRegex = function(e) {
|
||||
e = e.trim(), p = new RegExp("(" + e + ")", "i");
|
||||
}, this.getRegex = function() {
|
||||
return p.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " ");
|
||||
}, this.hiliteWords = function(e) {
|
||||
if (!(e == null || !e) && p && !I.test(e.nodeName)) {
|
||||
if (e.hasChildNodes())
|
||||
for (var i = 0; i < e.childNodes.length; i++)
|
||||
this.hiliteWords(e.childNodes[i]);
|
||||
if (e.nodeType == 3) {
|
||||
var N, o;
|
||||
if ((N = e.nodeValue) && (o = p.exec(N))) {
|
||||
for (var h = e; h != null && h.nodeName != "SECTION"; )
|
||||
h = h.parentNode;
|
||||
for (var S = f.getIndices(h), B = d.length, R = !1, i = 0; i < B; i++)
|
||||
d[i].h === S.h && d[i].v === S.v && (R = !0);
|
||||
R || d.push(S), m[o[0].toLowerCase()] || (m[o[0].toLowerCase()] = E[M++ % E.length]);
|
||||
var u = document.createElement(x);
|
||||
u.appendChild(document.createTextNode(o[0])), u.style.backgroundColor = m[o[0].toLowerCase()], u.style.fontStyle = "inherit", u.style.color = "#000";
|
||||
var b = e.splitText(o.index);
|
||||
b.nodeValue = b.nodeValue.substring(o[0].length), e.parentNode.insertBefore(u, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, this.remove = function() {
|
||||
for (var e = document.getElementsByTagName(x), i; e.length && (i = e[0]); )
|
||||
i.parentNode.replaceChild(i.firstChild, i);
|
||||
}, this.apply = function(e) {
|
||||
if (!(e == null || !e))
|
||||
return this.remove(), this.setRegex(e), this.hiliteWords(L), d;
|
||||
};
|
||||
}
|
||||
return {
|
||||
id: "search",
|
||||
init: (r) => {
|
||||
f = r, f.registerKeyboardShortcut("CTRL + Shift + F", "Search"), document.addEventListener("keydown", function(c) {
|
||||
c.key == "F" && (c.ctrlKey || c.metaKey) && (c.preventDefault(), C());
|
||||
}, !1);
|
||||
},
|
||||
open: w,
|
||||
close: v,
|
||||
toggle: C
|
||||
};
|
||||
}, F = D;
|
||||
export {
|
||||
F as default
|
||||
};
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { RevealPlugin } from 'reveal.js';
|
||||
export interface ZoomPlugin extends RevealPlugin {
|
||||
id: 'zoom';
|
||||
}
|
||||
declare const Zoom: () => ZoomPlugin;
|
||||
export default Zoom;
|
||||
+1
@@ -0,0 +1 @@
|
||||
(function(f,m){typeof exports=="object"&&typeof module<"u"?module.exports=m():typeof define=="function"&&define.amd?define(m):(f=typeof globalThis<"u"?globalThis:f||self,f.RevealZoom=m())})(this,(function(){"use strict";const f={id:"zoom",init:function(n){n.getRevealElement().addEventListener("mousedown",function(i){var l=/Linux/.test(window.navigator.platform)?"ctrl":"alt",r=(n.getConfig().zoomKey?n.getConfig().zoomKey:l)+"Key",s=n.getConfig().zoomLevel?n.getConfig().zoomLevel:2;i[r]&&!n.isOverview()&&(i.preventDefault(),u.to({x:i.clientX,y:i.clientY,scale:s,pan:!1}))})},destroy:()=>{u.reset()}},m=()=>f;var u=(function(){var n=1,i=0,l=0,r=-1,s=-1,y="transform"in document.body.style;y&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",function(e){n!==1&&e.keyCode===27&&u.out()}),document.addEventListener("mousemove",function(e){n!==1&&(i=e.clientX,l=e.clientY)});function c(e,t){var o=w();if(e.width=e.width||1,e.height=e.height||1,e.x-=(window.innerWidth-e.width*t)/2,e.y-=(window.innerHeight-e.height*t)/2,y)if(t===1)document.body.style.transform="";else{var d=o.x+"px "+o.y+"px",h="translate("+-e.x+"px,"+-e.y+"px) scale("+t+")";document.body.style.transformOrigin=d,document.body.style.transform=h}else t===1?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(o.x+e.x)/t+"px",document.body.style.top=-(o.y+e.y)/t+"px",document.body.style.width=t*100+"%",document.body.style.height=t*100+"%",document.body.style.zoom=t);n=t,document.documentElement.classList&&(n!==1?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function a(){var e=.12,t=window.innerWidth*e,o=window.innerHeight*e,d=w();l<o?window.scroll(d.x,d.y-(1-l/o)*(14/n)):l>window.innerHeight-o&&window.scroll(d.x,d.y+(1-(window.innerHeight-l)/o)*(14/n)),i<t?window.scroll(d.x-(1-i/t)*(14/n),d.y):i>window.innerWidth-t&&window.scroll(d.x+(1-(window.innerWidth-i)/t)*(14/n),d.y)}function w(){return{x:window.scrollX!==void 0?window.scrollX:window.pageXOffset,y:window.scrollY!==void 0?window.scrollY:window.pageYOffset}}return{to:function(e){if(n!==1)u.out();else{if(e.x=e.x||0,e.y=e.y||0,e.element){var t=20,o=e.element.getBoundingClientRect();e.x=o.left-t,e.y=o.top-t,e.width=o.width+t*2,e.height=o.height+t*2}e.width!==void 0&&e.height!==void 0&&(e.scale=Math.max(Math.min(window.innerWidth/e.width,window.innerHeight/e.height),1)),e.scale>1&&(e.x*=e.scale,e.y*=e.scale,c(e,e.scale),e.pan!==!1&&(r=setTimeout(function(){s=setInterval(a,1e3/60)},800)))}},out:function(){clearTimeout(r),clearInterval(s),c({x:0,y:0},1),n=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return n}}})();return m}));
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
const c = {
|
||||
id: "zoom",
|
||||
init: function(n) {
|
||||
n.getRevealElement().addEventListener("mousedown", function(o) {
|
||||
var l = /Linux/.test(window.navigator.platform) ? "ctrl" : "alt", f = (n.getConfig().zoomKey ? n.getConfig().zoomKey : l) + "Key", m = n.getConfig().zoomLevel ? n.getConfig().zoomLevel : 2;
|
||||
o[f] && !n.isOverview() && (o.preventDefault(), r.to({
|
||||
x: o.clientX,
|
||||
y: o.clientY,
|
||||
scale: m,
|
||||
pan: !1
|
||||
}));
|
||||
});
|
||||
},
|
||||
destroy: () => {
|
||||
r.reset();
|
||||
}
|
||||
}, h = () => c;
|
||||
var r = (function() {
|
||||
var n = 1, o = 0, l = 0, f = -1, m = -1, u = "transform" in document.body.style;
|
||||
u && (document.body.style.transition = "transform 0.8s ease"), document.addEventListener("keyup", function(e) {
|
||||
n !== 1 && e.keyCode === 27 && r.out();
|
||||
}), document.addEventListener("mousemove", function(e) {
|
||||
n !== 1 && (o = e.clientX, l = e.clientY);
|
||||
});
|
||||
function y(e, t) {
|
||||
var i = s();
|
||||
if (e.width = e.width || 1, e.height = e.height || 1, e.x -= (window.innerWidth - e.width * t) / 2, e.y -= (window.innerHeight - e.height * t) / 2, u)
|
||||
if (t === 1)
|
||||
document.body.style.transform = "";
|
||||
else {
|
||||
var d = i.x + "px " + i.y + "px", w = "translate(" + -e.x + "px," + -e.y + "px) scale(" + t + ")";
|
||||
document.body.style.transformOrigin = d, document.body.style.transform = w;
|
||||
}
|
||||
else
|
||||
t === 1 ? (document.body.style.position = "", document.body.style.left = "", document.body.style.top = "", document.body.style.width = "", document.body.style.height = "", document.body.style.zoom = "") : (document.body.style.position = "relative", document.body.style.left = -(i.x + e.x) / t + "px", document.body.style.top = -(i.y + e.y) / t + "px", document.body.style.width = t * 100 + "%", document.body.style.height = t * 100 + "%", document.body.style.zoom = t);
|
||||
n = t, document.documentElement.classList && (n !== 1 ? document.documentElement.classList.add("zoomed") : document.documentElement.classList.remove("zoomed"));
|
||||
}
|
||||
function a() {
|
||||
var e = 0.12, t = window.innerWidth * e, i = window.innerHeight * e, d = s();
|
||||
l < i ? window.scroll(d.x, d.y - (1 - l / i) * (14 / n)) : l > window.innerHeight - i && window.scroll(d.x, d.y + (1 - (window.innerHeight - l) / i) * (14 / n)), o < t ? window.scroll(d.x - (1 - o / t) * (14 / n), d.y) : o > window.innerWidth - t && window.scroll(d.x + (1 - (window.innerWidth - o) / t) * (14 / n), d.y);
|
||||
}
|
||||
function s() {
|
||||
return {
|
||||
x: window.scrollX !== void 0 ? window.scrollX : window.pageXOffset,
|
||||
y: window.scrollY !== void 0 ? window.scrollY : window.pageYOffset
|
||||
};
|
||||
}
|
||||
return {
|
||||
/**
|
||||
* Zooms in on either a rectangle or HTML element.
|
||||
*
|
||||
* @param {Object} options
|
||||
* - element: HTML element to zoom in on
|
||||
* OR
|
||||
* - x/y: coordinates in non-transformed space to zoom in on
|
||||
* - width/height: the portion of the screen to zoom in on
|
||||
* - scale: can be used instead of width/height to explicitly set scale
|
||||
*/
|
||||
to: function(e) {
|
||||
if (n !== 1)
|
||||
r.out();
|
||||
else {
|
||||
if (e.x = e.x || 0, e.y = e.y || 0, e.element) {
|
||||
var t = 20, i = e.element.getBoundingClientRect();
|
||||
e.x = i.left - t, e.y = i.top - t, e.width = i.width + t * 2, e.height = i.height + t * 2;
|
||||
}
|
||||
e.width !== void 0 && e.height !== void 0 && (e.scale = Math.max(Math.min(window.innerWidth / e.width, window.innerHeight / e.height), 1)), e.scale > 1 && (e.x *= e.scale, e.y *= e.scale, y(e, e.scale), e.pan !== !1 && (f = setTimeout(function() {
|
||||
m = setInterval(a, 1e3 / 60);
|
||||
}, 800)));
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Resets the document zoom state to its default.
|
||||
*/
|
||||
out: function() {
|
||||
clearTimeout(f), clearInterval(m), y({ x: 0, y: 0 }, 1), n = 1;
|
||||
},
|
||||
// Alias
|
||||
magnify: function(e) {
|
||||
this.to(e);
|
||||
},
|
||||
reset: function() {
|
||||
this.out();
|
||||
},
|
||||
zoomLevel: function() {
|
||||
return n;
|
||||
}
|
||||
};
|
||||
})();
|
||||
const g = h;
|
||||
export {
|
||||
g as default
|
||||
};
|
||||
Vendored
+1
-30
@@ -1,30 +1 @@
|
||||
/* http://meyerweb.com/eric/tools/css/reset/
|
||||
v4.0 | 20180602
|
||||
License: none (public domain)
|
||||
*/
|
||||
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
main, menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, main, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,main,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}
|
||||
|
||||
Vendored
+1
-9
File diff suppressed because one or more lines are too long
Vendored
+864
@@ -0,0 +1,864 @@
|
||||
import { RevealConfig, TransitionStyle, TransitionSpeed, FragmentAnimation, KatexConfig, Mathjax2Config, Mathjax3Config, Mathjax4Config, HighlightConfig, MarkdownConfig } from './config';
|
||||
export type {
|
||||
RevealConfig,
|
||||
TransitionStyle,
|
||||
TransitionSpeed,
|
||||
FragmentAnimation,
|
||||
KatexConfig,
|
||||
Mathjax2Config,
|
||||
Mathjax3Config,
|
||||
Mathjax4Config,
|
||||
HighlightConfig,
|
||||
MarkdownConfig,
|
||||
} from './config';
|
||||
|
||||
export default Reveal;
|
||||
|
||||
// The type definitions in this file are adapted from those
|
||||
// originally created by the community on DefinitelyTyped:
|
||||
// https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/reveal.js
|
||||
|
||||
/**
|
||||
* reveal.js - MIT licensed
|
||||
*
|
||||
* Copyright (C) 2011-2026 Hakim El Hattab, https://hakim.se
|
||||
*
|
||||
* @see {@link https://revealjs.com}
|
||||
* @see {@link https://github.com/hakimel/reveal.js/blob/master/js/reveal.js}
|
||||
* @see {@link https://revealjs.com/api/}
|
||||
*/
|
||||
declare const Reveal: {
|
||||
new (options?: RevealConfig): RevealApi;
|
||||
new (revealElement: HTMLElement, options?: RevealConfig): RevealApi;
|
||||
} & RevealApi;
|
||||
|
||||
/**
|
||||
* The public reveal.js API
|
||||
*
|
||||
* @see {@link https://github.com/hakimel/reveal.js/blob/master/js/reveal.js}
|
||||
*/
|
||||
export interface RevealApi {
|
||||
/**
|
||||
* The reveal.js version
|
||||
*
|
||||
* @returns reveal.js version
|
||||
*/
|
||||
VERSION: string;
|
||||
|
||||
/**
|
||||
* Starts up the presentation.
|
||||
*
|
||||
* @param options - RevealOption see {@link Options}
|
||||
* @returns a promise
|
||||
*/
|
||||
initialize(options?: RevealConfig): Promise<RevealApi>;
|
||||
|
||||
/**
|
||||
* Applies the configuration settings from the config
|
||||
* object. May be called multiple times.
|
||||
*
|
||||
* @param options - RevealOption see {@link RevealConfig}
|
||||
*/
|
||||
configure(options?: RevealConfig): void;
|
||||
|
||||
/**
|
||||
* Uninitializes reveal.js by undoing changes made to the
|
||||
* DOM and removing all event listeners.
|
||||
*/
|
||||
destroy(): void;
|
||||
|
||||
/**
|
||||
* Syncs the presentation with the current DOM. Useful
|
||||
* when new slides or control elements are added or when
|
||||
* the configuration has changed.
|
||||
*/
|
||||
sync(): void;
|
||||
|
||||
/**
|
||||
* Updates reveal.js to keep in sync with new slide attributes. For
|
||||
* example, if you add a new `data-background-image` you can call
|
||||
* this to have reveal.js render the new background image.
|
||||
*
|
||||
* Similar to #sync() but more efficient when you only need to
|
||||
* refresh a specific slide. Dispatches a `slidesync` event
|
||||
* when syncing has completed.
|
||||
*
|
||||
* @param slide
|
||||
* @see {@link sync}
|
||||
*/
|
||||
syncSlide(slide: HTMLElement): void;
|
||||
|
||||
/**
|
||||
* Formats the fragments on the given slide so that they have
|
||||
* valid indices. Call this if fragments are changed in the DOM
|
||||
* after reveal.js has already initialized.
|
||||
*
|
||||
* @param slide
|
||||
* @returns a list of the HTML fragments that were synced
|
||||
*/
|
||||
syncFragments(slide: HTMLElement): HTMLElement[];
|
||||
|
||||
/**
|
||||
* Removes hidden slides (data-visibility="hidden") from the DOM.
|
||||
* This happens automatically when reveal.js initialized, so only
|
||||
* call this to remove hidden slides before initialization.
|
||||
*/
|
||||
removeHiddenSlides(): void;
|
||||
|
||||
/**
|
||||
* Steps from the current point in the presentation to the
|
||||
* slide which matches the specified horizontal and vertical
|
||||
* indices.
|
||||
*
|
||||
* @param horizontalIndex - Horizontal index of the target slide
|
||||
* @param verticalIndex - Vertical index of the target slide
|
||||
* @param fragmentIndex - Index of a fragment within the target slide to activate
|
||||
* @param origin - Origin for use in multimaster environments
|
||||
*/
|
||||
slide(
|
||||
horizontalIndex?: number,
|
||||
verticalIndex?: number,
|
||||
fragmentIndex?: number,
|
||||
origin?: number
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Navigate one step to the left
|
||||
*
|
||||
* @param params see {@link NavigateParams}
|
||||
*/
|
||||
left: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Navigate one step to the right
|
||||
*
|
||||
* @param params see {@link NavigateParams}
|
||||
*/
|
||||
right: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Navigate one step up
|
||||
*
|
||||
* @param params see {@link NavigateParams}
|
||||
*/
|
||||
up: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Navigate one step down
|
||||
*
|
||||
* @param params see {@link NavigateParams}
|
||||
*/
|
||||
down: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Navigates backwards, prioritized in the following order:
|
||||
* 1) Previous fragment
|
||||
* 2) Previous vertical slide
|
||||
* 3) Previous horizontal slide
|
||||
*
|
||||
* @param params see {@link NavigateParams}
|
||||
*/
|
||||
prev: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Navigates forwards, prioritized in the following order:
|
||||
* 1) Next fragment
|
||||
* 2) Next vertical slide
|
||||
* 3) Next horizontal slide
|
||||
*
|
||||
* @param params see {@link NavigateParams}
|
||||
*/
|
||||
next: NavigationFunction;
|
||||
|
||||
// Navigation aliases
|
||||
|
||||
/**
|
||||
* Alias for `left` see {@link left}
|
||||
*/
|
||||
navigateLeft: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Alias for `right` see {@link right}
|
||||
*/
|
||||
navigateRight: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Alias for `up` see {@link up}
|
||||
*/
|
||||
navigateUp: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Alias for `down` see {@link down}
|
||||
*/
|
||||
navigateDown: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Alias for `prev` see {@link prev}
|
||||
*/
|
||||
navigatePrev: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Alias for `next` see {@link next}
|
||||
*/
|
||||
navigateNext: NavigationFunction;
|
||||
|
||||
/**
|
||||
* Navigate to the specified slide fragment.
|
||||
*
|
||||
* @param index - The index of the fragment that
|
||||
* should be shown, -1 means all are invisible
|
||||
* @param offset - Integer offset to apply to the
|
||||
* fragment index
|
||||
*
|
||||
* @returns true if a change was made in any
|
||||
* fragments visibility as part of this call
|
||||
*/
|
||||
navigateFragment(index?: number, offset?: number): boolean;
|
||||
|
||||
/**
|
||||
* Navigate to the previous slide fragment.
|
||||
*
|
||||
* @returns true if there was a previous fragment,
|
||||
* false otherwise
|
||||
*/
|
||||
prevFragment(): boolean;
|
||||
|
||||
/**
|
||||
* Navigate to the next slide fragment.
|
||||
*
|
||||
* @returns true if there was a next fragment,
|
||||
* false otherwise
|
||||
*/
|
||||
nextFragment(): boolean;
|
||||
|
||||
/**
|
||||
* Adds a listener to one of our custom reveal.js events,
|
||||
* like slidechanged and slidesync.
|
||||
*
|
||||
* @param type
|
||||
* @param listener
|
||||
* @param useCapture
|
||||
*/
|
||||
on: HTMLElement['addEventListener'];
|
||||
|
||||
/**
|
||||
* Unsubscribes from a reveal.js event.
|
||||
*
|
||||
* @param type
|
||||
* @param listener
|
||||
* @param useCapture
|
||||
*/
|
||||
off: HTMLElement['removeEventListener'];
|
||||
|
||||
/**
|
||||
* Legacy event binding methods left in for backwards compatibility
|
||||
* Adds a listener to one of our custom reveal.js events,
|
||||
* like slidechanged and slidesync.
|
||||
* See: {@link on}
|
||||
*
|
||||
* @param type
|
||||
* @param listener
|
||||
* @param useCapture
|
||||
*/
|
||||
addEventListener: HTMLElement['addEventListener'];
|
||||
|
||||
/**
|
||||
* Legacy event binding methods left in for backwards compatibility
|
||||
* Unsubscribes from a reveal.js event.
|
||||
* See: {@link off}
|
||||
*
|
||||
* @param type
|
||||
* @param listener
|
||||
* @param useCapture
|
||||
*/
|
||||
removeEventListener: HTMLElement['removeEventListener'];
|
||||
|
||||
/**
|
||||
* Applies JavaScript-controlled layout rules to the
|
||||
* presentation.
|
||||
*/
|
||||
layout(): void;
|
||||
|
||||
/**
|
||||
* Randomly shuffles all slides in the deck.
|
||||
*/
|
||||
shuffle(slides?: HTMLElement[]): void;
|
||||
|
||||
/**
|
||||
* Determine what available routes there are for navigation.
|
||||
*
|
||||
* @param params - If includeFragments is set, a route will be considered
|
||||
* available if either a slide OR a fragment is available in the given direction
|
||||
*
|
||||
* @returns Available route {left, right, up, down}
|
||||
*/
|
||||
availableRoutes(params?: { includeFragments?: boolean }): {
|
||||
down: boolean;
|
||||
left: boolean;
|
||||
right: boolean;
|
||||
up: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns an object describing the available fragment
|
||||
* directions.
|
||||
*
|
||||
* @returns Available fragments {prev, next}
|
||||
*/
|
||||
availableFragments(): { prev: boolean; next: boolean };
|
||||
|
||||
/**
|
||||
* Open or close help overlay window.
|
||||
*
|
||||
* @param override - Flag which overrides the
|
||||
* toggle logic and forcibly sets the desired state. True means
|
||||
* help is open, false means it's closed.
|
||||
*/
|
||||
toggleHelp(override?: boolean): void;
|
||||
|
||||
/**
|
||||
* Toggles the slide overview mode on and off.
|
||||
*
|
||||
* @param override - Flag which overrides the
|
||||
* toggle logic and forcibly sets the desired state. True means
|
||||
* overview is open, false means it's closed.
|
||||
*/
|
||||
toggleOverview(override?: boolean): void;
|
||||
|
||||
/**
|
||||
* Toggles the paused mode on and off.
|
||||
*
|
||||
* @param override - Flag which overrides the
|
||||
* toggle logic and forcibly sets the desired state.
|
||||
*/
|
||||
togglePause(override?: boolean): void;
|
||||
|
||||
/**
|
||||
* Toggles the auto slide mode on and off.
|
||||
*
|
||||
* @param override - Flag which sets the desired state.
|
||||
* True means autoplay starts, false means it stops.
|
||||
*/
|
||||
toggleAutoSlide(override?: boolean): void;
|
||||
|
||||
/**
|
||||
* @returns true if we're currently on the first slide in
|
||||
* the presentation.
|
||||
*/
|
||||
isFirstSlide(): boolean;
|
||||
|
||||
/**
|
||||
* @returns Returns true if we're currently on the last slide in
|
||||
* the presentation. If the last slide is a stack, we only
|
||||
* consider this the last slide if it's at the end of the
|
||||
* stack.
|
||||
*/
|
||||
isLastSlide(): boolean;
|
||||
|
||||
/**
|
||||
* @returns true if we're on the last slide in the current
|
||||
* vertical stack.
|
||||
*/
|
||||
isLastVerticalSlide(): boolean;
|
||||
|
||||
/**
|
||||
* Checks if the current or specified slide is vertical
|
||||
* (nested within another slide).
|
||||
*
|
||||
* @param slide - the slide to check orientation of. Defaults to the current slide.
|
||||
* @return true if the current or specified slide is vertical
|
||||
*/
|
||||
isVerticalSlide(slide?: HTMLElement): boolean;
|
||||
|
||||
/**
|
||||
* @returns true if we are currently in the paused mode.
|
||||
*/
|
||||
isPaused(): boolean;
|
||||
|
||||
/**
|
||||
* @returns true if the auto slide mode is currently on.
|
||||
*/
|
||||
isAutoSliding(): boolean;
|
||||
|
||||
/**
|
||||
* @returns true if this presentation is running inside of
|
||||
* the speaker notes window.
|
||||
*/
|
||||
isSpeakerNotes(): boolean;
|
||||
|
||||
/**
|
||||
* @returns true if the overview is active, false otherwise
|
||||
*/
|
||||
isOverview(): boolean;
|
||||
|
||||
/**
|
||||
* Checks if the presentation is focused
|
||||
*
|
||||
* @returns true if the it is focused, false otherwise
|
||||
*/
|
||||
isFocused(): boolean;
|
||||
|
||||
/**
|
||||
* Checks if this reveal.js instance is being used to print a PDF.
|
||||
*
|
||||
* @returns true if being used to print a PDF, false otherwise
|
||||
*/
|
||||
isPrintingPDF(): boolean;
|
||||
|
||||
/**
|
||||
* Checks if reveal.js has been loaded and is ready for use
|
||||
*
|
||||
* @returns true if reveal.js is ready for use, false otherwise
|
||||
*/
|
||||
isReady(): boolean;
|
||||
|
||||
/**
|
||||
* Called when the given slide is within the configured view
|
||||
* distance. Shows the slide element and loads any content
|
||||
* that is set to load lazily (data-src).
|
||||
*
|
||||
* @param slide - Slide to show
|
||||
*/
|
||||
loadSlide(slide: HTMLElement, options?: { excludeIframes?: boolean }): void;
|
||||
|
||||
/**
|
||||
* Unloads and hides the given slide. This is called when the
|
||||
* slide is moved outside of the configured view distance.
|
||||
*
|
||||
* @param slide
|
||||
*/
|
||||
unloadSlide(slide: HTMLElement): void;
|
||||
|
||||
/**
|
||||
* Opens a preview window for the target URL.
|
||||
*
|
||||
* @param url - url for preview iframe src
|
||||
*/
|
||||
showPreview(url: string): void;
|
||||
|
||||
/**
|
||||
* Closes any currently open overlay.
|
||||
*/
|
||||
hidePreview(): void;
|
||||
|
||||
/**
|
||||
* Binds all internal event listeners.
|
||||
*/
|
||||
addEventListeners(): void;
|
||||
|
||||
/**
|
||||
* Unbinds all internal event listeners.
|
||||
*/
|
||||
removeEventListeners(): void;
|
||||
|
||||
/**
|
||||
* Dispatches an event of the specified type from the
|
||||
* reveal DOM element.
|
||||
*/
|
||||
dispatchEvent({
|
||||
target,
|
||||
type,
|
||||
data,
|
||||
bubbles,
|
||||
}: {
|
||||
/** `revealElement` by default */
|
||||
target?: HTMLElement;
|
||||
type: string;
|
||||
data?: unknown;
|
||||
bubbles?: boolean;
|
||||
}): Event;
|
||||
|
||||
/**
|
||||
* Retrieves the current state of the presentation as
|
||||
* an object. This state can then be restored at any
|
||||
* time.
|
||||
*
|
||||
* @returns The current state - {indexh, indexv, indexf, paused, overview}
|
||||
*/
|
||||
getState(): RevealState;
|
||||
|
||||
/**
|
||||
* Restores the presentation to the given state.
|
||||
*
|
||||
* @param object - state as generated by getState()
|
||||
* @see {@link getState} generates the parameter `state`
|
||||
*/
|
||||
setState(object: RevealState): void;
|
||||
|
||||
/**
|
||||
* Returns a value ranging from 0-1 that represents
|
||||
* how far into the presentation we have navigated.
|
||||
*
|
||||
* @returns a value ranging from 0-1 that represents
|
||||
* how far into the presentation we have navigated.
|
||||
*/
|
||||
getProgress(): number;
|
||||
|
||||
/**
|
||||
* Retrieves the h/v location and fragment of the current,
|
||||
* or specified, slide.
|
||||
*
|
||||
* @param slide - if specified, the returned index will
|
||||
* be for this slide rather than the currently active one
|
||||
*
|
||||
* @return h/v location and fragment of the current,
|
||||
* or specified, slide. {h, v, f}
|
||||
*/
|
||||
getIndices(slide?: HTMLElement): { h: number; v: number; f: number };
|
||||
|
||||
/**
|
||||
* Returns an array of objects where each object represents the
|
||||
* attributes on its respective slide.
|
||||
*
|
||||
* @returns an array of objects where each object represents the
|
||||
* attributes on its respective slide.
|
||||
*/
|
||||
getSlidesAttributes(): Record<string, string>[];
|
||||
|
||||
/**
|
||||
* Returns the number of past slides. This can be used as a global
|
||||
* flattened index for slides.
|
||||
*
|
||||
* @param [slide] - The slide we're counting before, defaults to current slide
|
||||
*
|
||||
* @returns Past slide count
|
||||
*/
|
||||
getSlidePastCount(slide?: HTMLElement): number;
|
||||
|
||||
/**
|
||||
* Retrieves the total number of slides in this presentation.
|
||||
*
|
||||
* @returns the total number of slides in this presentation.
|
||||
*/
|
||||
getTotalSlides(): number;
|
||||
|
||||
/**
|
||||
* Returns the slide element matching the specified index.
|
||||
*
|
||||
* @param x - slide index
|
||||
* @param [y] - slide index
|
||||
*
|
||||
* @returns the slide element matching the specified index
|
||||
*/
|
||||
getSlide(x: number, y?: number): HTMLElement | undefined;
|
||||
|
||||
/**
|
||||
* Returns the previous slide element, may be null
|
||||
*
|
||||
* @returns the previous slide element, may be null
|
||||
*/
|
||||
getPreviousSlide(): HTMLElement | null;
|
||||
|
||||
/**
|
||||
* Returns the current slide element
|
||||
*
|
||||
* @returns the current slide element
|
||||
*/
|
||||
getCurrentSlide(): HTMLElement;
|
||||
|
||||
/**
|
||||
* Returns the background element for the given slide.
|
||||
* All slides, even the ones with no background properties
|
||||
* defined, have a background element so as long as the
|
||||
* index is valid an element will be returned.
|
||||
*
|
||||
* @param element A slide
|
||||
* @returns the background element for the given slide
|
||||
*/
|
||||
getSlideBackground(element: HTMLElement): HTMLElement | undefined;
|
||||
|
||||
/**
|
||||
* Returns the background element for the given slide.
|
||||
* All slides, even the ones with no background properties
|
||||
* defined, have a background element so as long as the
|
||||
* index is valid an element will be returned.
|
||||
*
|
||||
* @param x - Horizontal background index OR a slide
|
||||
* HTML element
|
||||
* @param [y] - Vertical background index
|
||||
* @returns the background element for the given slide
|
||||
*/
|
||||
getSlideBackground(x: number, y?: number): HTMLElement | undefined;
|
||||
|
||||
/**
|
||||
* Retrieves the speaker notes from a slide. Notes can be
|
||||
* defined in two ways:
|
||||
* 1. As a data-notes attribute on the slide <section>
|
||||
* 2. As an <aside class="notes"> inside of the slide
|
||||
*
|
||||
* @param [slide] - defaults to current slide
|
||||
* @returns the speaker notes from a slide
|
||||
*/
|
||||
getSlideNotes(slide?: HTMLElement): string | null;
|
||||
|
||||
/**
|
||||
* Retrieves all slides in this presentation.
|
||||
*
|
||||
* @returns all slides in this presentation
|
||||
*/
|
||||
getSlides(): HTMLElement[];
|
||||
|
||||
/**
|
||||
* Returns a list of all horizontal slides in the deck. Each
|
||||
* vertical stack is included as one horizontal slide in the
|
||||
* resulting array.
|
||||
*
|
||||
* @returns a list of all horizontal slides in the deck
|
||||
*/
|
||||
getHorizontalSlides(): HTMLElement[];
|
||||
|
||||
/**
|
||||
* Returns all vertical slides that exist within this deck.
|
||||
*
|
||||
* @returns all vertical slides that exist within this deck
|
||||
*/
|
||||
getVerticalSlides(): HTMLElement[];
|
||||
|
||||
/**
|
||||
* Returns true if there are at least two horizontal slides.
|
||||
*
|
||||
* @returns true if there are at least two horizontal slides
|
||||
*/
|
||||
hasHorizontalSlides(): boolean;
|
||||
|
||||
/**
|
||||
* Returns true if there are at least two vertical slides.
|
||||
*
|
||||
* @returns true if there are at least two vertical slides
|
||||
*/
|
||||
hasVerticalSlides(): boolean;
|
||||
|
||||
/**
|
||||
* Checks if the deck has navigated on either axis at least once
|
||||
*
|
||||
* @returns true if the deck has navigated on either horizontal axis
|
||||
* at least once
|
||||
*/
|
||||
hasNavigatedHorizontally(): boolean;
|
||||
|
||||
/**
|
||||
* Checks if the deck has navigated on either axis at least once
|
||||
*
|
||||
* @returns true if the deck has navigated on either vertically axis
|
||||
* at least once
|
||||
*/
|
||||
hasNavigatedVertically(): boolean;
|
||||
|
||||
/**
|
||||
* Add a custom key binding with optional description to
|
||||
* be added to the help screen.
|
||||
*
|
||||
* @param binding
|
||||
* @param callback
|
||||
*/
|
||||
addKeyBinding(
|
||||
keyCode: number | { keyCode: number; key: string; description: string },
|
||||
callback: string | ((event: KeyboardEvent) => void)
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Removes the specified custom key binding.
|
||||
*
|
||||
* @param keyCode
|
||||
*/
|
||||
removeKeyBinding(keyCode: number): void;
|
||||
|
||||
/**
|
||||
* Programmatically triggers a keyboard event
|
||||
*
|
||||
* @param keyCode
|
||||
*/
|
||||
triggerKey(keyCode: number): void;
|
||||
|
||||
/**
|
||||
* Registers a new shortcut to include in the help overlay
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
registerKeyboardShortcut(key: string, value: string): void;
|
||||
|
||||
/**
|
||||
* Calculates the computed pixel size of our slides. These
|
||||
* values are based on the width and height configuration
|
||||
* options.
|
||||
*
|
||||
* @param [presentationWidth=dom.wrapper.offsetWidth]
|
||||
* @param [presentationHeight=dom.wrapper.offsetHeight]
|
||||
* @returns the computed pixel size of the slides
|
||||
*/
|
||||
getComputedSlideSize(
|
||||
presentationWidth?: number,
|
||||
presentationHeight?: number
|
||||
): ComputedSlideSize;
|
||||
|
||||
/**
|
||||
* Returns the current scale of the presentation content
|
||||
*
|
||||
* @returns the current scale of the presentation content
|
||||
*/
|
||||
getScale(): number;
|
||||
|
||||
/**
|
||||
* Returns the current configuration object
|
||||
*
|
||||
* @returns the current configuration object
|
||||
*/
|
||||
getConfig(): RevealConfig;
|
||||
|
||||
/**
|
||||
* Returns a key:value hash of all query params.
|
||||
*
|
||||
* @returns a key:value hash of all query params
|
||||
*/
|
||||
getQueryHash(): Record<string, string>;
|
||||
|
||||
/**
|
||||
* Return a hash URL that will resolve to the given slide location.
|
||||
*
|
||||
* @param slide - the slide to link to
|
||||
* @returns a hash URL that will resolve to the given slide location
|
||||
*/
|
||||
getSlidePath(slide?: HTMLElement): string;
|
||||
|
||||
/**
|
||||
* @returns reveal.js DOM element
|
||||
*/
|
||||
getRevealElement(): HTMLElement | null;
|
||||
|
||||
/**
|
||||
* @returns reveal.js DOM element
|
||||
*/
|
||||
getSlidesElement(): HTMLElement | null;
|
||||
|
||||
/**
|
||||
* @returns reveal.js DOM element
|
||||
*/
|
||||
getViewportElement(): HTMLElement | null;
|
||||
|
||||
/**
|
||||
* @returns reveal.js DOM element
|
||||
*/
|
||||
getBackgroundsElement(): HTMLDivElement | undefined;
|
||||
|
||||
/**
|
||||
* Registers a new plugin with this reveal.js instance.
|
||||
*
|
||||
* reveal.js waits for all registered plugins to initialize
|
||||
* before considering itself ready, as long as the plugin
|
||||
* is registered before calling `Reveal.initialize()`.
|
||||
*
|
||||
* @param plugin
|
||||
*/
|
||||
registerPlugin(plugin: RevealPlugin): void;
|
||||
|
||||
/**
|
||||
* Checks if a specific plugin has been registered.
|
||||
*
|
||||
* @param id - unique plugin identifier
|
||||
* @returns true if a specific plugin has been registered.
|
||||
*/
|
||||
hasPlugin(id: string): boolean;
|
||||
|
||||
/**
|
||||
* Returns the specific plugin instance, if a plugin
|
||||
* with the given ID has been registered.
|
||||
*
|
||||
* @param id - unique plugin identifier
|
||||
* @returns plugin instance
|
||||
*/
|
||||
getPlugin(id: string): RevealPlugin | undefined;
|
||||
|
||||
/**
|
||||
* @returns id:plugin hash of all plugins
|
||||
*/
|
||||
getPlugins(): Record<string, RevealPlugin>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for navigation
|
||||
*/
|
||||
export interface NavigateParams {
|
||||
skipFragments?: boolean;
|
||||
}
|
||||
|
||||
export type NavigationFunction = (params?: NavigateParams) => void;
|
||||
|
||||
/**
|
||||
* Multiplex configuration
|
||||
*
|
||||
* @see {@link https://github.com/reveal/multiplex}
|
||||
*/
|
||||
export interface MultiplexConfig {
|
||||
// Obtained from the socket.io server. Gives this (the master) control of the presentation
|
||||
secret: string | null;
|
||||
// Obtained from the socket.io server
|
||||
id: string;
|
||||
// Location of socket.io server
|
||||
url: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reveal Dependency
|
||||
*
|
||||
* @see {@link https://revealjs.com/plugins/#dependencies}
|
||||
*/
|
||||
export interface RevealDependency {
|
||||
src: string;
|
||||
async?: boolean;
|
||||
callback?: () => void;
|
||||
condition?: () => boolean;
|
||||
}
|
||||
|
||||
export interface ComputedSlideSize {
|
||||
width: number;
|
||||
height: number;
|
||||
presentationWidth: number;
|
||||
presentationHeight: number;
|
||||
}
|
||||
|
||||
export interface RevealState {
|
||||
indexh: number;
|
||||
indexv: number;
|
||||
indexf: number;
|
||||
paused: boolean;
|
||||
overview: boolean;
|
||||
|
||||
/**
|
||||
* URL of an iframe being previewed
|
||||
*/
|
||||
previewIframe?: string;
|
||||
|
||||
/**
|
||||
* URL of an image being previewed
|
||||
*/
|
||||
previewImage?: string;
|
||||
|
||||
/**
|
||||
* URL of a video being previewed
|
||||
*/
|
||||
previewVideo?: string;
|
||||
|
||||
/**
|
||||
* Fit mode of the previewed media
|
||||
*/
|
||||
previewFit?: 'none' | 'scale-down' | 'contain' | 'cover';
|
||||
}
|
||||
|
||||
export interface SlideSyncEvent extends Event {
|
||||
slide: HTMLElement;
|
||||
}
|
||||
|
||||
// NOTE: it is possible to extend type definitions depend on the plugin
|
||||
/**
|
||||
* Reveal Plugin
|
||||
*
|
||||
* @see {@link https://revealjs.com/creating-plugins/}
|
||||
*/
|
||||
export interface RevealPlugin {
|
||||
id: string;
|
||||
init?(reveal: RevealApi): void | Promise<void>;
|
||||
destroy?(): void;
|
||||
}
|
||||
|
||||
export type RevealPluginFactory = () => RevealPlugin;
|
||||
Vendored
-9
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
Vendored
+35
-4
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
+3580
File diff suppressed because it is too large
Load Diff
+1
-366
File diff suppressed because one or more lines are too long
+1
-362
File diff suppressed because one or more lines are too long
+1
-359
File diff suppressed because one or more lines are too long
+1
-392
File diff suppressed because one or more lines are too long
+1
-385
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
SIL Open Font License (OFL)
|
||||
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
|
||||
@@ -1,10 +0,0 @@
|
||||
@font-face {
|
||||
font-family: 'League Gothic';
|
||||
src: url('./league-gothic.eot');
|
||||
src: url('./league-gothic.eot?#iefix') format('embedded-opentype'),
|
||||
url('./league-gothic.woff') format('woff'),
|
||||
url('./league-gothic.ttf') format('truetype');
|
||||
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,45 +0,0 @@
|
||||
SIL Open Font License
|
||||
|
||||
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
—————————————————————————————-
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
—————————————————————————————-
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
“Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
||||
|
||||
“Reserved Font Name” refers to any names specified as such after the copyright statement(s).
|
||||
|
||||
“Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
||||
|
||||
“Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
||||
|
||||
“Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1,39 +0,0 @@
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
src: url('./source-sans-pro-regular.eot');
|
||||
src: url('./source-sans-pro-regular.eot?#iefix') format('embedded-opentype'),
|
||||
url('./source-sans-pro-regular.woff') format('woff'),
|
||||
url('./source-sans-pro-regular.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
src: url('./source-sans-pro-italic.eot');
|
||||
src: url('./source-sans-pro-italic.eot?#iefix') format('embedded-opentype'),
|
||||
url('./source-sans-pro-italic.woff') format('woff'),
|
||||
url('./source-sans-pro-italic.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
src: url('./source-sans-pro-semibold.eot');
|
||||
src: url('./source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'),
|
||||
url('./source-sans-pro-semibold.woff') format('woff'),
|
||||
url('./source-sans-pro-semibold.ttf') format('truetype');
|
||||
font-weight: 600;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
src: url('./source-sans-pro-semibolditalic.eot');
|
||||
src: url('./source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'),
|
||||
url('./source-sans-pro-semibolditalic.woff') format('woff'),
|
||||
url('./source-sans-pro-semibolditalic.ttf') format('truetype');
|
||||
font-weight: 600;
|
||||
font-style: italic;
|
||||
}
|
||||
+1
-368
File diff suppressed because one or more lines are too long
+1
-362
File diff suppressed because one or more lines are too long
+1
-360
File diff suppressed because one or more lines are too long
+1
-363
File diff suppressed because one or more lines are too long
+1
-362
File diff suppressed because one or more lines are too long
Vendored
+1
-370
File diff suppressed because one or more lines are too long
+1
-363
File diff suppressed because one or more lines are too long
+1
-362
File diff suppressed because one or more lines are too long
+1
-359
File diff suppressed because one or more lines are too long
@@ -1,360 +0,0 @@
|
||||
/**
|
||||
* White compact & high contrast reveal.js theme, with headers not in capitals.
|
||||
*
|
||||
* By Peter Kehl. Based on white.(s)css by Hakim El Hattab, http://hakim.se
|
||||
*
|
||||
* - Keep the source similar to black.css - for easy comparison.
|
||||
* - $mainFontSize controls code blocks, too (although under some ratio).
|
||||
*/
|
||||
@import url(./fonts/source-sans-pro/source-sans-pro.css);
|
||||
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* GLOBAL STYLES
|
||||
*********************************************/
|
||||
:root {
|
||||
--r-background-color: #fff;
|
||||
--r-main-font: Source Sans Pro, Helvetica, sans-serif;
|
||||
--r-main-font-size: 25px;
|
||||
--r-main-color: #000;
|
||||
--r-block-margin: 20px;
|
||||
--r-heading-margin: 0 0 20px 0;
|
||||
--r-heading-font: Source Sans Pro, Helvetica, sans-serif;
|
||||
--r-heading-color: #000;
|
||||
--r-heading-line-height: 1.2;
|
||||
--r-heading-letter-spacing: normal;
|
||||
--r-heading-text-transform: none;
|
||||
--r-heading-text-shadow: none;
|
||||
--r-heading-font-weight: 450;
|
||||
--r-heading1-text-shadow: none;
|
||||
--r-heading1-size: 2.5em;
|
||||
--r-heading2-size: 1.6em;
|
||||
--r-heading3-size: 1.3em;
|
||||
--r-heading4-size: 1em;
|
||||
--r-code-font: monospace;
|
||||
--r-link-color: #2a76dd;
|
||||
--r-link-color-dark: #1a53a1;
|
||||
--r-link-color-hover: #6ca0e8;
|
||||
--r-selection-background-color: #98bdef;
|
||||
--r-selection-color: #fff;
|
||||
}
|
||||
|
||||
.reveal-viewport {
|
||||
background: #fff;
|
||||
background-color: var(--r-background-color);
|
||||
}
|
||||
|
||||
.reveal {
|
||||
font-family: var(--r-main-font);
|
||||
font-size: var(--r-main-font-size);
|
||||
font-weight: normal;
|
||||
color: var(--r-main-color);
|
||||
}
|
||||
|
||||
.reveal ::selection {
|
||||
color: var(--r-selection-color);
|
||||
background: var(--r-selection-background-color);
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.reveal ::-moz-selection {
|
||||
color: var(--r-selection-color);
|
||||
background: var(--r-selection-background-color);
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.reveal .slides section,
|
||||
.reveal .slides section > section {
|
||||
line-height: 1.3;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* HEADERS
|
||||
*********************************************/
|
||||
.reveal h1,
|
||||
.reveal h2,
|
||||
.reveal h3,
|
||||
.reveal h4,
|
||||
.reveal h5,
|
||||
.reveal h6 {
|
||||
margin: var(--r-heading-margin);
|
||||
color: var(--r-heading-color);
|
||||
font-family: var(--r-heading-font);
|
||||
font-weight: var(--r-heading-font-weight);
|
||||
line-height: var(--r-heading-line-height);
|
||||
letter-spacing: var(--r-heading-letter-spacing);
|
||||
text-transform: var(--r-heading-text-transform);
|
||||
text-shadow: var(--r-heading-text-shadow);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.reveal h1 {
|
||||
font-size: var(--r-heading1-size);
|
||||
}
|
||||
|
||||
.reveal h2 {
|
||||
font-size: var(--r-heading2-size);
|
||||
}
|
||||
|
||||
.reveal h3 {
|
||||
font-size: var(--r-heading3-size);
|
||||
}
|
||||
|
||||
.reveal h4 {
|
||||
font-size: var(--r-heading4-size);
|
||||
}
|
||||
|
||||
.reveal h1 {
|
||||
text-shadow: var(--r-heading1-text-shadow);
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* OTHER
|
||||
*********************************************/
|
||||
.reveal p {
|
||||
margin: var(--r-block-margin) 0;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/* Remove trailing margins after titles */
|
||||
.reveal h1:last-child,
|
||||
.reveal h2:last-child,
|
||||
.reveal h3:last-child,
|
||||
.reveal h4:last-child,
|
||||
.reveal h5:last-child,
|
||||
.reveal h6:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Ensure certain elements are never larger than the slide itself */
|
||||
.reveal img,
|
||||
.reveal video,
|
||||
.reveal iframe {
|
||||
max-width: 95%;
|
||||
max-height: 95%;
|
||||
}
|
||||
|
||||
.reveal strong,
|
||||
.reveal b {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.reveal em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.reveal ol,
|
||||
.reveal dl,
|
||||
.reveal ul {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
margin: 0 0 0 1em;
|
||||
}
|
||||
|
||||
.reveal ol {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
.reveal ul {
|
||||
list-style-type: disc;
|
||||
}
|
||||
|
||||
.reveal ul ul {
|
||||
list-style-type: square;
|
||||
}
|
||||
|
||||
.reveal ul ul ul {
|
||||
list-style-type: circle;
|
||||
}
|
||||
|
||||
.reveal ul ul,
|
||||
.reveal ul ol,
|
||||
.reveal ol ol,
|
||||
.reveal ol ul {
|
||||
display: block;
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.reveal dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.reveal dd {
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 70%;
|
||||
margin: var(--r-block-margin) auto;
|
||||
padding: 5px;
|
||||
font-style: italic;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.reveal blockquote p:first-child,
|
||||
.reveal blockquote p:last-child {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.reveal q {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.reveal pre {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 90%;
|
||||
margin: var(--r-block-margin) auto;
|
||||
text-align: left;
|
||||
font-size: 0.55em;
|
||||
font-family: var(--r-code-font);
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.reveal code {
|
||||
font-family: var(--r-code-font);
|
||||
text-transform: none;
|
||||
tab-size: 2;
|
||||
}
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
padding: 5px;
|
||||
overflow: auto;
|
||||
max-height: 400px;
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
.reveal .code-wrapper {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.reveal .code-wrapper code {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.reveal table {
|
||||
margin: auto;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.reveal table th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.reveal table th,
|
||||
.reveal table td {
|
||||
text-align: left;
|
||||
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
|
||||
.reveal table th[align=center],
|
||||
.reveal table td[align=center] {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.reveal table th[align=right],
|
||||
.reveal table td[align=right] {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.reveal table tbody tr:last-child th,
|
||||
.reveal table tbody tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub;
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
font-size: 0.6em;
|
||||
line-height: 1.2em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.reveal small * {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.reveal img {
|
||||
margin: var(--r-block-margin) 0;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* LINKS
|
||||
*********************************************/
|
||||
.reveal a {
|
||||
color: var(--r-link-color);
|
||||
text-decoration: none;
|
||||
transition: color 0.15s ease;
|
||||
}
|
||||
|
||||
.reveal a:hover {
|
||||
color: var(--r-link-color-hover);
|
||||
text-shadow: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.reveal .roll span:after {
|
||||
color: #fff;
|
||||
background: var(--r-link-color-dark);
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* Frame helper
|
||||
*********************************************/
|
||||
.reveal .r-frame {
|
||||
border: 4px solid var(--r-main-color);
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.reveal a .r-frame {
|
||||
transition: all 0.15s linear;
|
||||
}
|
||||
|
||||
.reveal a:hover .r-frame {
|
||||
border-color: var(--r-link-color);
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls {
|
||||
color: var(--r-link-color);
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: var(--r-link-color);
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* PRINT BACKGROUND
|
||||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: var(--r-background-color);
|
||||
}
|
||||
}
|
||||
+37
@@ -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;
|
||||
+10
@@ -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";
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
export declare const isMobile: boolean;
|
||||
export declare const isChrome: boolean;
|
||||
export declare const isAndroid: boolean;
|
||||
+8
@@ -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
@@ -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 {};
|
||||
Reference in New Issue
Block a user