Merge branch 'dev' into patch-1

edit
Hakim El Hattab 2020-01-27 13:51:24 +01:00 committed by GitHub
commit 9693816480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 687 additions and 378 deletions

View File

@ -1,4 +1,4 @@
Copyright (C) 2019 Hakim El Hattab, http://hakim.se, and reveal.js contributors Copyright (C) 2020 Hakim El Hattab, http://hakim.se, and reveal.js contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -1,6 +1,6 @@
# reveal.js [![Build Status](https://travis-ci.org/hakimel/reveal.js.svg?branch=master)](https://travis-ci.org/hakimel/reveal.js) <a href="https://slides.com?ref=github"><img src="https://s3.amazonaws.com/static.slid.es/images/slides-github-banner-320x40.png?1" alt="Slides" width="160" height="20"></a> # reveal.js [![Build Status](https://travis-ci.org/hakimel/reveal.js.svg?branch=master)](https://travis-ci.org/hakimel/reveal.js) <a href="https://slides.com?ref=github"><img src="https://s3.amazonaws.com/static.slid.es/images/slides-github-banner-320x40.png?1" alt="Slides" width="160" height="20"></a>
A framework for easily creating beautiful presentations using HTML. [Check out the live demo](http://revealjs.com/). A framework for easily creating beautiful presentations using HTML. [Check out the live demo](https://revealjs.com/).
reveal.js comes with a broad range of features including [nested slides](https://github.com/hakimel/reveal.js#markup), [Markdown contents](https://github.com/hakimel/reveal.js#markdown), [PDF export](https://github.com/hakimel/reveal.js#pdf-export), [speaker notes](https://github.com/hakimel/reveal.js#speaker-notes) and a [JavaScript API](https://github.com/hakimel/reveal.js#api). There's also a fully featured visual editor and platform for sharing reveal.js presentations at [slides.com](https://slides.com?ref=github). reveal.js comes with a broad range of features including [nested slides](https://github.com/hakimel/reveal.js#markup), [Markdown contents](https://github.com/hakimel/reveal.js#markdown), [PDF export](https://github.com/hakimel/reveal.js#pdf-export), [speaker notes](https://github.com/hakimel/reveal.js#speaker-notes) and a [JavaScript API](https://github.com/hakimel/reveal.js#api). There's also a fully featured visual editor and platform for sharing reveal.js presentations at [slides.com](https://slides.com?ref=github).
@ -27,6 +27,7 @@ reveal.js comes with a broad range of features including [nested slides](https:/
- [Touch Navigation](#touch-navigation) - [Touch Navigation](#touch-navigation)
- [Lazy Loading](#lazy-loading) - [Lazy Loading](#lazy-loading)
- [API](#api) - [API](#api)
- [Custom Key Bindings](#custom-key-bindings)
- [Slide Changed Event](#slide-changed-event) - [Slide Changed Event](#slide-changed-event)
- [Presentation State](#presentation-state) - [Presentation State](#presentation-state)
- [Slide States](#slide-states) - [Slide States](#slide-states)
@ -86,7 +87,7 @@ The core of reveal.js is very easy to install. You'll simply need to download a
Some reveal.js features, like external Markdown and speaker notes, require that presentations run from a local web server. The following instructions will set up such a server as well as all of the development tasks needed to make edits to the reveal.js source code. Some reveal.js features, like external Markdown and speaker notes, require that presentations run from a local web server. The following instructions will set up such a server as well as all of the development tasks needed to make edits to the reveal.js source code.
1. Install [Node.js](http://nodejs.org/) (9.0.0 or later) 1. Install [Node.js](https://nodejs.org/) (9.0.0 or later)
1. Clone the reveal.js repository 1. Clone the reveal.js repository
```sh ```sh
@ -340,6 +341,19 @@ Reveal.initialize({
// speaker view // speaker view
defaultTiming: 120, defaultTiming: 120,
// Specify the total time in seconds that is available to
// present. If this is set to a nonzero value, the pacing
// timer will work out the time available for each slide,
// instead of using the defaultTiming value
totalTime: 0,
// Specify the minimum amount of time you want to allot to
// each slide, if using the totalTime calculation method. If
// the automated time allocation causes slide pacing to fall
// below this threshold, then you will see an alert in the
// speaker notes window
minimumTimePerSlide: 0;
// Enable slide navigation via mouse wheel // Enable slide navigation via mouse wheel
mouseWheel: false, mouseWheel: false,
@ -369,6 +383,11 @@ Reveal.initialize({
// Number of slides away from the current that are visible // Number of slides away from the current that are visible
viewDistance: 3, viewDistance: 3,
// 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.
mobileViewDistance: 2,
// Parallax background image // Parallax background image
parallaxBackgroundImage: '', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'" parallaxBackgroundImage: '', // e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
@ -531,7 +550,7 @@ Slides can be nested within other slides to create vertical stacks (see [Markup]
<img src="https://static.slid.es/support/reveal.js-vertical-slides.gif" width="450"> <img src="https://static.slid.es/support/reveal.js-vertical-slides.gif" width="450">
#### Navigation Mode #### Navigation Mode
You can finetune the reveal.js navigation behavior by using the `navigationMode` config option. Note that these options are only useful for presnetations that use a mix of horizontal and vertical slides. The following navigation modes are available: You can fine tune the reveal.js navigation behavior by using the `navigationMode` config option. Note that these options are only useful for presentations that use a mix of horizontal and vertical slides. The following navigation modes are available:
| Value | Description | | Value | Description |
| :--------------------------- | :---------- | | :--------------------------- | :---------- |
@ -629,6 +648,15 @@ Reveal.getProgress(); // (0 == first slide, 1 == last slide)
Reveal.getSlides(); // Array of all slides Reveal.getSlides(); // Array of all slides
Reveal.getTotalSlides(); // Total number of slides Reveal.getTotalSlides(); // Total number of slides
// Returns an array with all horizontal/vertical slides in the deck
Reveal.getHorizontalSlides();
Reveal.getVerticalSlides();
// Checks if the presentation contains two or more
// horizontal/vertical slides
Reveal.hasHorizontalSlides();
Reveal.hasVerticalSlides();
// Returns the speaker notes for the current slide // Returns the speaker notes for the current slide
Reveal.getSlideNotes(); Reveal.getSlideNotes();
@ -640,7 +668,7 @@ Reveal.isPaused();
Reveal.isAutoSliding(); Reveal.isAutoSliding();
// Returns the top-level DOM element // Returns the top-level DOM element
getRevealElement(); // <div class="reveal">...</div> Reveal.getRevealElement(); // <div class="reveal">...</div>
``` ```
### Custom Key Bindings ### Custom Key Bindings
@ -778,6 +806,8 @@ Embeds a web page as a slide background that covers 100% of the reveal.js width
</section> </section>
``` ```
Iframes are lazy-loaded when they become visible. If you'd like to preload iframes ahead of time, you can append a `data-preload` attribute to the slide `<section>`. You can also enable preloading globally for all iframes using the `preloadIframes` configuration option.
#### Background Transitions #### Background Transitions
Backgrounds transition using a fade animation by default. This can be changed to a linear sliding transition by passing `backgroundTransition: 'slide'` to the `Reveal.initialize()` call. Alternatively you can set `data-background-transition` on any section with a background to override that specific transition. Backgrounds transition using a fade animation by default. This can be changed to a linear sliding transition by passing `backgroundTransition: 'slide'` to the `Reveal.initialize()` call. Alternatively you can set `data-background-transition` on any section with a background to override that specific transition.
@ -1065,18 +1095,38 @@ The framework has a built-in postMessage API that can be used when communicating
<window>.postMessage( JSON.stringify({ method: 'slide', args: [ 2 ] }), '*' ); <window>.postMessage( JSON.stringify({ method: 'slide', args: [ 2 ] }), '*' );
``` ```
#### postMessage Events
When reveal.js runs inside of an iframe it can optionally bubble all of its events to the parent. Bubbled events are stringified JSON with three fields: namespace, eventName and state. Here's how you subscribe to them from the parent window: When reveal.js runs inside of an iframe it can optionally bubble all of its events to the parent. Bubbled events are stringified JSON with three fields: namespace, eventName and state. Here's how you subscribe to them from the parent window:
```javascript ```javascript
window.addEventListener( 'message', function( event ) { window.addEventListener( 'message', function( event ) {
var data = JSON.parse( event.data ); var data = JSON.parse( event.data );
if( data.namespace === 'reveal' && data.eventName ==='slidechanged' ) { if( data.namespace === 'reveal' && data.eventName === 'slidechanged' ) {
// Slide changed, see data.state for slide number // Slide changed, see data.state for slide number
} }
} ); } );
``` ```
This cross-window messaging can be toggled on or off using configuration flags. #### postMessage Callbacks
When you call any method via the postMessage API, reveal.js will dispatch a message with the return value. This is done so that you can call a getter method and see what the result is. Check out this example:
```javascript
<revealWindow>.postMessage( JSON.stringify({ method: 'getTotalSlides' }), '*' );
window.addEventListener( 'message', function( event ) {
var data = JSON.parse( event.data );
// `data.method`` is the method that we invoked
if( data.namespace === 'reveal' && data.eventName === 'callback' && data.method === 'getTotalSlides' ) {
data.result // = the total number of slides
}
} );
```
#### Turning postMessage on/off
This cross-window messaging can be toggled on or off using configuration flags. These are the default values.
```javascript ```javascript
Reveal.initialize({ Reveal.initialize({
@ -1208,7 +1258,7 @@ The speaker notes window will also show:
- Current wall-clock time - Current wall-clock time
- (Optionally) a pacing timer which indicates whether the current pace of the presentation is on track for the right timing (shown in green), and if not, whether the presenter should speed up (shown in red) or has the luxury of slowing down (blue). - (Optionally) a pacing timer which indicates whether the current pace of the presentation is on track for the right timing (shown in green), and if not, whether the presenter should speed up (shown in red) or has the luxury of slowing down (blue).
The pacing timer can be enabled by configuring by the `defaultTiming` parameter in the `Reveal` configuration block, which specifies the number of seconds per slide. 120 can be a reasonable rule of thumb. Timings can also be given per slide `<section>` by setting the `data-timing` attribute. Both values are in numbers of seconds. The pacing timer can be enabled by configuring the `defaultTiming` parameter in the `Reveal` configuration block, which specifies the number of seconds per slide. 120 can be a reasonable rule of thumb. Alternatively, you can enable the timer by setting `totalTime`, which sets the total length of your presentation (also in seconds). If both values are specified, `totalTime` wins and `defaultTiming` is ignored. Regardless of the baseline timing method, timings can also be given per slide `<section>` by setting the `data-timing` attribute (again, in seconds).
## Server Side Speaker Notes ## Server Side Speaker Notes
@ -1228,7 +1278,7 @@ Reveal.initialize({
Then: Then:
1. Install [Node.js](http://nodejs.org/) (4.0.0 or later) 1. Install [Node.js](http://nodejs.org/) (9.0.0 or later)
2. Run `npm install` 2. Run `npm install`
3. Run `node plugin/notes-server` 3. Run `node plugin/notes-server`
@ -1237,7 +1287,7 @@ Then:
Plugins should register themselves with reveal.js by calling `Reveal.registerPlugin( 'myPluginID', MyPlugin )`. Registered plugin instances can optionally expose an "init" function that reveal.js will call to initialize them. Plugins should register themselves with reveal.js by calling `Reveal.registerPlugin( 'myPluginID', MyPlugin )`. Registered plugin instances can optionally expose an "init" function that reveal.js will call to initialize them.
When reveal.js is booted up via `Reveal.initialize()`, it will go through all registered plugins and invoke their "init" methods. If the "init" method returns a Promise, reveal.js will wait for that promise to be fullfilled before finshing the startup sequence and firing the [ready](#ready-event) event. Here's an example of a plugin that does some asynchronous work before reveal.js can proceed: When reveal.js is booted up via `Reveal.initialize()`, it will go through all registered plugins and invoke their "init" methods. If the "init" method returns a Promise, reveal.js will wait for that promise to be fulfilled before finishing the startup sequence and firing the [ready](#ready-event) event. Here's an example of a plugin that does some asynchronous work before reveal.js can proceed:
```javascript ```javascript
let MyPlugin = { let MyPlugin = {
@ -1248,7 +1298,7 @@ Reveal.addEventListener( 'ready', () => console.log( 'Three seconds later...' )
Reveal.initialize(); Reveal.initialize();
``` ```
If the init method does _not_ return a Promise, the plugin is considered ready right away and will not hold up the reveal.js startup sequence. Note that reveal.js will *not* wait for init Promise fulfillment if the plugin is loaded as an [async dependency](#dependencies). If the plugin's init method does _not_ return a Promise, the plugin is considered ready right away and will not hold up the reveal.js startup sequence.
### Retrieving Plugins ### Retrieving Plugins
@ -1304,7 +1354,7 @@ Reveal.initialize({
#### Client presentation #### Client presentation
Served from a publicly accessible static file server. Examples include: GitHub Pages, Amazon S3, Dreamhost, Akamai, etc. The more reliable, the better. Your audience can then access the client presentation via `http://example.com/path/to/presentation/client/index.html`, with the configuration below causing them to connect to the socket.io server as clients. Served from a publicly accessible static file server. Examples include: GitHub Pages, Amazon S3, Dreamhost, Akamai, etc. The more reliable, the better. Your audience can then access the client presentation via `https://example.com/path/to/presentation/client/index.html`, with the configuration below causing them to connect to the socket.io server as clients.
Example configuration: Example configuration:
@ -1338,7 +1388,7 @@ Server that receives the `slideChanged` events from the master presentation and
Or you can use the socket.io server at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/). Or you can use the socket.io server at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/).
You'll need to generate a unique secret and token pair for your master and client presentations. To do so, visit `http://example.com/token`, where `http://example.com` is the location of your socket.io server. Or if you're going to use the socket.io server at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/), visit [https://reveal-js-multiplex-ccjbegmaii.now.sh/token](https://reveal-js-multiplex-ccjbegmaii.now.sh/token). You'll need to generate a unique secret and token pair for your master and client presentations. To do so, visit `https://example.com/token`, where `https://example.com` is the location of your socket.io server. Or if you're going to use the socket.io server at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/), visit [https://reveal-js-multiplex-ccjbegmaii.now.sh/token](https://reveal-js-multiplex-ccjbegmaii.now.sh/token).
You are very welcome to point your presentations at the Socket.io server running at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/), but availability and stability are not guaranteed. You are very welcome to point your presentations at the Socket.io server running at [https://reveal-js-multiplex-ccjbegmaii.now.sh/](https://reveal-js-multiplex-ccjbegmaii.now.sh/), but availability and stability are not guaranteed.
@ -1401,7 +1451,7 @@ Reveal.initialize({
If you want to display math equations in your presentation you can easily do so by including this plugin. The plugin is a very thin wrapper around the [MathJax](http://www.mathjax.org/) library. To use it you'll need to include it as a reveal.js dependency, [find our more about dependencies here](#dependencies). If you want to display math equations in your presentation you can easily do so by including this plugin. The plugin is a very thin wrapper around the [MathJax](http://www.mathjax.org/) library. To use it you'll need to include it as a reveal.js dependency, [find our more about dependencies here](#dependencies).
The plugin defaults to using [LaTeX](http://en.wikipedia.org/wiki/LaTeX) but that can be adjusted through the `math` configuration object. Note that MathJax is loaded from a remote server. If you want to use it offline you'll need to download a copy of the library and adjust the `mathjax` configuration value. The plugin defaults to using [LaTeX](https://en.wikipedia.org/wiki/LaTeX) but that can be adjusted through the `math` configuration object. Note that MathJax is loaded from a remote server. If you want to use it offline you'll need to download a copy of the library and adjust the `mathjax` configuration value.
Below is an example of how the plugin can be configured. If you don't intend to change these values you do not need to include the `math` config object at all. Below is an example of how the plugin can be configured. If you don't intend to change these values you do not need to include the `math` config object at all.
@ -1411,9 +1461,9 @@ Reveal.initialize({
math: { math: {
mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js', mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html config: 'TeX-AMS_HTML-full', // See http://docs.mathjax.org/en/latest/config-files.html
// pass other options into `MathJax.Hub.Config()` // pass other options into `MathJax.Hub.Config()`
TeX: { Macros: macros } TeX: { Macros: { RR: "{\\bf R}" } }
}, },
dependencies: [ dependencies: [
@ -1435,4 +1485,4 @@ If you want to include math inside of a presentation written in Markdown you nee
MIT licensed MIT licensed
Copyright (C) 2019 Hakim El Hattab, http://hakim.se Copyright (C) 2020 Hakim El Hattab, http://hakim.se

View File

@ -3,7 +3,7 @@
* http://revealjs.com * http://revealjs.com
* MIT licensed * MIT licensed
* *
* Copyright (C) 2019 Hakim El Hattab, http://hakim.se * Copyright (C) 2020 Hakim El Hattab, http://hakim.se
*/ */
/********************************************* /*********************************************
* GLOBAL STYLES * GLOBAL STYLES
@ -77,29 +77,29 @@ body {
text-decoration: line-through; } text-decoration: line-through; }
.reveal .slides section .fragment.fade-up { .reveal .slides section .fragment.fade-up {
-webkit-transform: translate(0, 20%); -webkit-transform: translate(0, 40px);
transform: translate(0, 20%); } transform: translate(0, 40px); }
.reveal .slides section .fragment.fade-up.visible { .reveal .slides section .fragment.fade-up.visible {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
transform: translate(0, 0); } transform: translate(0, 0); }
.reveal .slides section .fragment.fade-down { .reveal .slides section .fragment.fade-down {
-webkit-transform: translate(0, -20%); -webkit-transform: translate(0, -40px);
transform: translate(0, -20%); } transform: translate(0, -40px); }
.reveal .slides section .fragment.fade-down.visible { .reveal .slides section .fragment.fade-down.visible {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
transform: translate(0, 0); } transform: translate(0, 0); }
.reveal .slides section .fragment.fade-right { .reveal .slides section .fragment.fade-right {
-webkit-transform: translate(-20%, 0); -webkit-transform: translate(-40px, 0);
transform: translate(-20%, 0); } transform: translate(-40px, 0); }
.reveal .slides section .fragment.fade-right.visible { .reveal .slides section .fragment.fade-right.visible {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
transform: translate(0, 0); } transform: translate(0, 0); }
.reveal .slides section .fragment.fade-left { .reveal .slides section .fragment.fade-left {
-webkit-transform: translate(20%, 0); -webkit-transform: translate(40px, 0);
transform: translate(20%, 0); } transform: translate(40px, 0); }
.reveal .slides section .fragment.fade-left.visible { .reveal .slides section .fragment.fade-left.visible {
-webkit-transform: translate(0, 0); -webkit-transform: translate(0, 0);
transform: translate(0, 0); } transform: translate(0, 0); }
@ -227,7 +227,7 @@ body {
bottom: 12px; bottom: 12px;
right: 12px; right: 12px;
left: auto; left: auto;
z-index: 1; z-index: 11;
color: #000; color: #000;
pointer-events: none; pointer-events: none;
font-size: 10px; } font-size: 10px; }
@ -312,7 +312,8 @@ body {
transform: rotate(90deg); } transform: rotate(90deg); }
.reveal .controls .navigate-down { .reveal .controls .navigate-down {
right: 3.2em; right: 3.2em;
bottom: 0; bottom: -1.4em;
padding-bottom: 1.4em;
-webkit-transform: translateY(10px); -webkit-transform: translateY(10px);
transform: translateY(10px); } transform: translateY(10px); }
.reveal .controls .navigate-down .controls-arrow { .reveal .controls .navigate-down .controls-arrow {
@ -395,18 +396,18 @@ body {
right: auto; } right: auto; }
.reveal .controls[data-controls-layout="edges"] .navigate-left { .reveal .controls[data-controls-layout="edges"] .navigate-left {
top: 50%; top: 50%;
left: 8px; left: 0.8em;
margin-top: -1.8em; } margin-top: -1.8em; }
.reveal .controls[data-controls-layout="edges"] .navigate-right { .reveal .controls[data-controls-layout="edges"] .navigate-right {
top: 50%; top: 50%;
right: 8px; right: 0.8em;
margin-top: -1.8em; } margin-top: -1.8em; }
.reveal .controls[data-controls-layout="edges"] .navigate-up { .reveal .controls[data-controls-layout="edges"] .navigate-up {
top: 8px; top: 0.8em;
left: 50%; left: 50%;
margin-left: -1.8em; } margin-left: -1.8em; }
.reveal .controls[data-controls-layout="edges"] .navigate-down { .reveal .controls[data-controls-layout="edges"] .navigate-down {
bottom: 8px; bottom: -0.3em;
left: 50%; left: 50%;
margin-left: -1.8em; } } margin-left: -1.8em; } }
@ -1453,9 +1454,16 @@ body {
text-align: right; text-align: right;
vertical-align: top; } vertical-align: top; }
.reveal .hljs[data-line-numbers]:not([data-line-numbers=""]) tr:not(.highlight-line) { .reveal .hljs.has-highlights tr:not(.highlight-line) {
opacity: 0.4; } opacity: 0.4; }
.reveal .hljs:not(:first-child).fragment {
position: absolute;
top: 0;
left: 0;
width: 100%;
box-sizing: border-box; }
/********************************************* /*********************************************
* ROLLING LINKS * ROLLING LINKS
*********************************************/ *********************************************/

View File

@ -3,7 +3,7 @@
* http://revealjs.com * http://revealjs.com
* MIT licensed * MIT licensed
* *
* Copyright (C) 2019 Hakim El Hattab, http://hakim.se * Copyright (C) 2020 Hakim El Hattab, http://hakim.se
*/ */
@ -102,7 +102,7 @@ body {
} }
.reveal .slides section .fragment.fade-up { .reveal .slides section .fragment.fade-up {
transform: translate(0, 20%); transform: translate(0, 40px);
&.visible { &.visible {
transform: translate(0, 0); transform: translate(0, 0);
@ -110,7 +110,7 @@ body {
} }
.reveal .slides section .fragment.fade-down { .reveal .slides section .fragment.fade-down {
transform: translate(0, -20%); transform: translate(0, -40px);
&.visible { &.visible {
transform: translate(0, 0); transform: translate(0, 0);
@ -118,7 +118,7 @@ body {
} }
.reveal .slides section .fragment.fade-right { .reveal .slides section .fragment.fade-right {
transform: translate(-20%, 0); transform: translate(-40px, 0);
&.visible { &.visible {
transform: translate(0, 0); transform: translate(0, 0);
@ -126,7 +126,7 @@ body {
} }
.reveal .slides section .fragment.fade-left { .reveal .slides section .fragment.fade-left {
transform: translate(20%, 0); transform: translate(40px, 0);
&.visible { &.visible {
transform: translate(0, 0); transform: translate(0, 0);
@ -263,7 +263,7 @@ $controlsArrowAngleActive: 36deg;
bottom: $spacing; bottom: $spacing;
right: $spacing; right: $spacing;
left: auto; left: auto;
z-index: 1; z-index: 11;
color: #000; color: #000;
pointer-events: none; pointer-events: none;
font-size: 10px; font-size: 10px;
@ -355,7 +355,8 @@ $controlsArrowAngleActive: 36deg;
.navigate-down { .navigate-down {
right: $controlArrowSpacing + $controlArrowSize/2; right: $controlArrowSpacing + $controlArrowSize/2;
bottom: 0; bottom: -$controlArrowSpacing;
padding-bottom: $controlArrowSpacing;
transform: translateY( 10px ); transform: translateY( 10px );
.controls-arrow { .controls-arrow {
@ -452,7 +453,7 @@ $controlsArrowAngleActive: 36deg;
// Edge aligned controls layout // Edge aligned controls layout
@media screen and (min-width: 500px) { @media screen and (min-width: 500px) {
$spacing: 8px; $spacing: 0.8em;
.reveal .controls[data-controls-layout="edges"] { .reveal .controls[data-controls-layout="edges"] {
& { & {
@ -489,7 +490,7 @@ $controlsArrowAngleActive: 36deg;
} }
.navigate-down { .navigate-down {
bottom: $spacing; bottom: $spacing - $controlArrowSpacing + 0.3em;
left: 50%; left: 50%;
margin-left: -$controlArrowSize/2; margin-left: -$controlArrowSize/2;
} }
@ -1590,10 +1591,18 @@ $controlsArrowAngleActive: 36deg;
vertical-align: top; vertical-align: top;
} }
.reveal .hljs[data-line-numbers]:not([data-line-numbers=""]) tr:not(.highlight-line) { .reveal .hljs.has-highlights tr:not(.highlight-line) {
opacity: 0.4; opacity: 0.4;
} }
.reveal .hljs:not(:first-child).fragment {
position: absolute;
top: 0;
left: 0;
width: 100%;
box-sizing: border-box;
}
/********************************************* /*********************************************
* ROLLING LINKS * ROLLING LINKS

View File

@ -4,7 +4,7 @@ Themes are written using Sass to keep things modular and reduce the need for rep
## Creating a Theme ## Creating a Theme
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `npm run build -- css-themes`. To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/gruntfile.js)) when you run `npm run build -- css-themes`.
Each theme file does four things in the following order: Each theme file does four things in the following order:

View File

@ -241,7 +241,7 @@
<section> <section>
<h2>Pretty Code</h2> <h2>Pretty Code</h2>
<pre><code class="hljs" data-trim data-line-numbers="4,8-11"> <pre><code class="hljs" data-trim data-line-numbers="4|9|4,8-11">
import React, { useState } from 'react'; import React, { useState } from 'react';
function Example() { function Example() {
@ -412,7 +412,7 @@ Reveal.addEventListener( 'customevent', function() {
dependencies: [ dependencies: [
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true }, { src: 'plugin/highlight/highlight.js' },
{ src: 'plugin/search/search.js', async: true }, { src: 'plugin/search/search.js', async: true },
{ src: 'plugin/zoom-js/zoom.js', async: true }, { src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true } { src: 'plugin/notes/notes.js', async: true }

View File

@ -19,7 +19,7 @@ module.exports = grunt => {
' * http://revealjs.com\n' + ' * http://revealjs.com\n' +
' * MIT licensed\n' + ' * MIT licensed\n' +
' *\n' + ' *\n' +
' * Copyright (C) 2019 Hakim El Hattab, http://hakim.se\n' + ' * Copyright (C) 2020 Hakim El Hattab, http://hakim.se\n' +
' */' ' */'
}, },

View File

@ -37,11 +37,12 @@
// - https://github.com/hakimel/reveal.js#configuration // - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies // - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({ Reveal.initialize({
hash: true,
dependencies: [ dependencies: [
{ src: 'plugin/markdown/marked.js' }, { src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' }, { src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true }, { src: 'plugin/highlight/highlight.js' },
{ src: 'plugin/highlight/highlight.js', async: true } { src: 'plugin/notes/notes.js', async: true }
] ]
}); });
</script> </script>

View File

@ -3,7 +3,7 @@
* http://revealjs.com * http://revealjs.com
* MIT licensed * MIT licensed
* *
* Copyright (C) 2019 Hakim El Hattab, http://hakim.se * Copyright (C) 2020 Hakim El Hattab, http://hakim.se
*/ */
(function( root, factory ) { (function( root, factory ) {
if( typeof define === 'function' && define.amd ) { if( typeof define === 'function' && define.amd ) {
@ -270,6 +270,11 @@
// Number of slides away from the current that are visible // Number of slides away from the current that are visible
viewDistance: 3, viewDistance: 3,
// 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.
mobileViewDistance: 2,
// The display mode that will be used to show slides // The display mode that will be used to show slides
display: 'block', display: 'block',
@ -447,7 +452,8 @@
*/ */
function checkCapabilities() { function checkCapabilities() {
isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( UA ); isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( UA ) ||
( navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 ); // iPadOS
isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA ); isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA );
var testElement = document.createElement( 'div' ); var testElement = document.createElement( 'div' );
@ -1217,6 +1223,8 @@
if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor; if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor;
if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition ); if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition );
if( slide.hasAttribute( 'data-preload' ) ) element.setAttribute( 'data-preload', '' );
// Background image options are set on the content wrapper // Background image options are set on the content wrapper
if( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize; if( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize;
if( data.backgroundRepeat ) contentElement.style.backgroundRepeat = data.backgroundRepeat; if( data.backgroundRepeat ) contentElement.style.backgroundRepeat = data.backgroundRepeat;
@ -1276,7 +1284,11 @@
// Check if the requested method can be found // Check if the requested method can be found
if( data.method && typeof Reveal[data.method] === 'function' ) { if( data.method && typeof Reveal[data.method] === 'function' ) {
Reveal[data.method].apply( Reveal, data.args ); var result = Reveal[data.method].apply( Reveal, data.args );
// Dispatch a postMessage event with the returned value from
// our method invocation for getter functions
dispatchPostMessage( 'callback', { method: data.method, result: result } );
} }
} }
}, false ); }, false );
@ -1447,8 +1459,8 @@
keyboardShortcuts['&#8595; , J'] = 'Navigate down'; keyboardShortcuts['&#8595; , J'] = 'Navigate down';
} }
keyboardShortcuts['Home , &#8984;/CTRL &#8592;'] = 'First slide'; keyboardShortcuts['Home , Shift &#8592;'] = 'First slide';
keyboardShortcuts['End , &#8984;/CTRL &#8594;'] = 'Last slide'; keyboardShortcuts['End , Shift &#8594;'] = 'Last slide';
keyboardShortcuts['B , .'] = 'Pause'; keyboardShortcuts['B , .'] = 'Pause';
keyboardShortcuts['F'] = 'Fullscreen'; keyboardShortcuts['F'] = 'Fullscreen';
keyboardShortcuts['ESC, O'] = 'Slide overview'; keyboardShortcuts['ESC, O'] = 'Slide overview';
@ -1981,8 +1993,25 @@
// If we're in an iframe, post each reveal.js event to the // If we're in an iframe, post each reveal.js event to the
// parent window. Used by the notes plugin // parent window. Used by the notes plugin
dispatchPostMessage( type );
}
/**
* Dispatched a postMessage of the given type from our window.
*/
function dispatchPostMessage( type, data ) {
if( config.postMessageEvents && window.parent !== window.self ) { if( config.postMessageEvents && window.parent !== window.self ) {
window.parent.postMessage( JSON.stringify({ namespace: 'reveal', eventName: type, state: getState() }), '*' ); var message = {
namespace: 'reveal',
eventName: type,
state: getState()
};
extend( message, data );
window.parent.postMessage( JSON.stringify( message ), '*' );
} }
} }
@ -2243,10 +2272,12 @@
transformSlides( { layout: '' } ); transformSlides( { layout: '' } );
} }
else { else {
// Prefer zoom for scaling up so that content remains crisp. // Zoom Scaling
// Don't use zoom to scale down since that can lead to shifts // Content remains crisp no matter how much we scale. Side
// in text layout/line breaks. // effects are minor differences in text layout and iframe
if( scale > 1 && features.zoom ) { // viewports changing size. A 200x200 iframe viewport in a
// 2x zoomed presentation ends up having a 400x400 viewport.
if( scale > 1 && features.zoom && window.devicePixelRatio < 2 ) {
dom.slides.style.zoom = scale; dom.slides.style.zoom = scale;
dom.slides.style.left = ''; dom.slides.style.left = '';
dom.slides.style.top = ''; dom.slides.style.top = '';
@ -2254,7 +2285,10 @@
dom.slides.style.right = ''; dom.slides.style.right = '';
transformSlides( { layout: '' } ); transformSlides( { layout: '' } );
} }
// Apply scale transform as a fallback // Transform Scaling
// Content layout remains the exact same when scaled up.
// Side effect is content becoming blurred, especially with
// high scale values on ldpi screens.
else { else {
dom.slides.style.zoom = ''; dom.slides.style.zoom = '';
dom.slides.style.left = '50%'; dom.slides.style.left = '50%';
@ -3039,11 +3073,11 @@
syncBackground( slide ); syncBackground( slide );
syncFragments( slide ); syncFragments( slide );
loadSlide( slide );
updateBackground(); updateBackground();
updateNotes(); updateNotes();
loadSlide( slide );
} }
/** /**
@ -3255,9 +3289,10 @@
// be visible // be visible
var viewDistance = isOverview() ? 10 : config.viewDistance; var viewDistance = isOverview() ? 10 : config.viewDistance;
// Limit view distance on weaker devices // Shorten the view distance on devices that typically have
// less resources
if( isMobileDevice ) { if( isMobileDevice ) {
viewDistance = isOverview() ? 6 : 2; viewDistance = isOverview() ? 6 : config.mobileViewDistance;
} }
// All slides need to be visible when exporting to PDF // All slides need to be visible when exporting to PDF
@ -3309,7 +3344,7 @@
} }
// Flag if there are ANY vertical slides, anywhere in the deck // Flag if there are ANY vertical slides, anywhere in the deck
if( dom.wrapper.querySelectorAll( '.slides>section>section' ).length ) { if( hasVerticalSlides() ) {
dom.wrapper.classList.add( 'has-vertical-slides' ); dom.wrapper.classList.add( 'has-vertical-slides' );
} }
else { else {
@ -3317,7 +3352,7 @@
} }
// Flag if there are ANY horizontal slides, anywhere in the deck // Flag if there are ANY horizontal slides, anywhere in the deck
if( dom.wrapper.querySelectorAll( '.slides>section' ).length > 1 ) { if( hasHorizontalSlides() ) {
dom.wrapper.classList.add( 'has-horizontal-slides' ); dom.wrapper.classList.add( 'has-horizontal-slides' );
} }
else { else {
@ -3599,7 +3634,7 @@
// Stop content inside of previous backgrounds // Stop content inside of previous backgrounds
if( previousBackground ) { if( previousBackground ) {
stopEmbeddedContent( previousBackground ); stopEmbeddedContent( previousBackground, { unloadIframes: !shouldPreload( previousBackground ) } );
} }
@ -3778,6 +3813,7 @@
background.style.display = 'block'; background.style.display = 'block';
var backgroundContent = slide.slideBackgroundContentElement; var backgroundContent = slide.slideBackgroundContentElement;
var backgroundIframe = slide.getAttribute( 'data-background-iframe' );
// If the background contains media, load it // If the background contains media, load it
if( background.hasAttribute( 'data-loaded' ) === false ) { if( background.hasAttribute( 'data-loaded' ) === false ) {
@ -3786,8 +3822,7 @@
var backgroundImage = slide.getAttribute( 'data-background-image' ), var backgroundImage = slide.getAttribute( 'data-background-image' ),
backgroundVideo = slide.getAttribute( 'data-background-video' ), backgroundVideo = slide.getAttribute( 'data-background-video' ),
backgroundVideoLoop = slide.hasAttribute( 'data-background-video-loop' ), backgroundVideoLoop = slide.hasAttribute( 'data-background-video-loop' ),
backgroundVideoMuted = slide.hasAttribute( 'data-background-video-muted' ), backgroundVideoMuted = slide.hasAttribute( 'data-background-video-muted' );
backgroundIframe = slide.getAttribute( 'data-background-iframe' );
// Images // Images
if( backgroundImage ) { if( backgroundImage ) {
@ -3827,15 +3862,9 @@
iframe.setAttribute( 'allowfullscreen', '' ); iframe.setAttribute( 'allowfullscreen', '' );
iframe.setAttribute( 'mozallowfullscreen', '' ); iframe.setAttribute( 'mozallowfullscreen', '' );
iframe.setAttribute( 'webkitallowfullscreen', '' ); iframe.setAttribute( 'webkitallowfullscreen', '' );
iframe.setAttribute( 'allow', 'autoplay' );
// Only load autoplaying content when the slide is shown to iframe.setAttribute( 'data-src', backgroundIframe );
// avoid having it play in the background
if( /autoplay=(1|true|yes)/gi.test( backgroundIframe ) ) {
iframe.setAttribute( 'data-src', backgroundIframe );
}
else {
iframe.setAttribute( 'src', backgroundIframe );
}
iframe.style.width = '100%'; iframe.style.width = '100%';
iframe.style.height = '100%'; iframe.style.height = '100%';
@ -3846,6 +3875,19 @@
} }
} }
// Start loading preloadable iframes
var backgroundIframeElement = backgroundContent.querySelector( 'iframe[data-src]' );
if( backgroundIframeElement ) {
// Check if this iframe is eligible to be preloaded
if( shouldPreload( background ) && !/autoplay=(1|true|yes)/gi.test( backgroundIframe ) ) {
if( backgroundIframeElement.getAttribute( 'src' ) !== backgroundIframe ) {
backgroundIframeElement.setAttribute( 'src', backgroundIframe );
}
}
}
} }
} }
@ -3865,6 +3907,11 @@
var background = getSlideBackground( slide ); var background = getSlideBackground( slide );
if( background ) { if( background ) {
background.style.display = 'none'; background.style.display = 'none';
// Unload any background iframes
toArray( background.querySelectorAll( 'iframe[src]' ) ).forEach( function( element ) {
element.removeAttribute( 'src' );
} );
} }
// Reset lazy-loaded media elements with src attributes // Reset lazy-loaded media elements with src attributes
@ -4429,7 +4476,44 @@
*/ */
function getSlides() { function getSlides() {
return toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' )); return toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ) );
}
/**
* Returns a list of all horizontal slides in the deck. Each
* vertical stack is included as one horizontal slide in the
* resulting array.
*/
function getHorizontalSlides() {
return toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) );
}
/**
* Returns all vertical slides that exist within this deck.
*/
function getVerticalSlides() {
return toArray( dom.wrapper.querySelectorAll( '.slides>section>section' ) );
}
/**
* Returns true if there are at least two horizontal slides.
*/
function hasHorizontalSlides() {
return getHorizontalSlides().length > 1;
}
/**
* Returns true if there are at least two vertical slides.
*/
function hasVerticalSlides() {
return getVerticalSlides().length > 1;
} }
@ -4667,6 +4751,8 @@
if( fragments.length ) { if( fragments.length ) {
var maxIndex = 0;
if( typeof index !== 'number' ) { if( typeof index !== 'number' ) {
var currentFragment = sortFragments( currentSlide.querySelectorAll( '.fragment.visible' ) ).pop(); var currentFragment = sortFragments( currentSlide.querySelectorAll( '.fragment.visible' ) ).pop();
if( currentFragment ) { if( currentFragment ) {
@ -4680,6 +4766,8 @@
i = parseInt( el.getAttribute( 'data-fragment-index' ), 10 ); i = parseInt( el.getAttribute( 'data-fragment-index' ), 10 );
} }
maxIndex = Math.max( maxIndex, i );
// Visible fragments // Visible fragments
if( i <= index ) { if( i <= index ) {
if( !el.classList.contains( 'visible' ) ) changedFragments.shown.push( el ); if( !el.classList.contains( 'visible' ) ) changedFragments.shown.push( el );
@ -4703,6 +4791,13 @@
} ); } );
// Write the current fragment index to the slide <section>.
// This can be used by end users to apply styles based on
// the current fragment index.
index = typeof index === 'number' ? index : -1;
index = Math.max( Math.min( index, maxIndex ), -1 );
currentSlide.setAttribute( 'data-fragment', index );
} }
} }
@ -5116,8 +5211,8 @@
// Whitelist specific modified + keycode combinations // Whitelist specific modified + keycode combinations
var prevSlideShortcut = event.shiftKey && event.keyCode === 32; var prevSlideShortcut = event.shiftKey && event.keyCode === 32;
var firstSlideShortcut = ( event.metaKey || event.ctrlKey ) && keyCode === 37; var firstSlideShortcut = event.shiftKey && keyCode === 37;
var lastSlideShortcut = ( event.metaKey || event.ctrlKey ) && keyCode === 39; var lastSlideShortcut = event.shiftKey && keyCode === 39;
// Prevent all other events when a modifier is pressed // Prevent all other events when a modifier is pressed
var unusedModifier = !prevSlideShortcut && !firstSlideShortcut && !lastSlideShortcut && var unusedModifier = !prevSlideShortcut && !firstSlideShortcut && !lastSlideShortcut &&
@ -5144,6 +5239,10 @@
return false; return false;
} }
// Use linear navigation if we're configured to OR if
// the presentation is one-dimensional
var useLinearMode = config.navigationMode === 'linear' || !hasHorizontalSlides() || !hasVerticalSlides();
var triggered = false; var triggered = false;
// 1. User defined key bindings // 1. User defined key bindings
@ -5216,7 +5315,7 @@
if( firstSlideShortcut ) { if( firstSlideShortcut ) {
slide( 0 ); slide( 0 );
} }
else if( !isOverview() && config.navigationMode === 'linear' ) { else if( !isOverview() && useLinearMode ) {
navigatePrev(); navigatePrev();
} }
else { else {
@ -5228,7 +5327,7 @@
if( lastSlideShortcut ) { if( lastSlideShortcut ) {
slide( Number.MAX_VALUE ); slide( Number.MAX_VALUE );
} }
else if( !isOverview() && config.navigationMode === 'linear' ) { else if( !isOverview() && useLinearMode ) {
navigateNext(); navigateNext();
} }
else { else {
@ -5237,7 +5336,7 @@
} }
// K, UP // K, UP
else if( keyCode === 75 || keyCode === 38 ) { else if( keyCode === 75 || keyCode === 38 ) {
if( !isOverview() && config.navigationMode === 'linear' ) { if( !isOverview() && useLinearMode ) {
navigatePrev(); navigatePrev();
} }
else { else {
@ -5246,7 +5345,7 @@
} }
// J, DOWN // J, DOWN
else if( keyCode === 74 || keyCode === 40 ) { else if( keyCode === 74 || keyCode === 40 ) {
if( !isOverview() && config.navigationMode === 'linear' ) { if( !isOverview() && useLinearMode ) {
navigateNext(); navigateNext();
} }
else { else {
@ -5356,19 +5455,49 @@
if( deltaX > touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) { if( deltaX > touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) {
touch.captured = true; touch.captured = true;
navigateLeft(); if( config.navigationMode === 'linear' ) {
if( config.rtl ) {
navigateNext();
}
else {
navigatePrev();
}
}
else {
navigateLeft();
}
} }
else if( deltaX < -touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) { else if( deltaX < -touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) {
touch.captured = true; touch.captured = true;
navigateRight(); if( config.navigationMode === 'linear' ) {
if( config.rtl ) {
navigatePrev();
}
else {
navigateNext();
}
}
else {
navigateRight();
}
} }
else if( deltaY > touch.threshold ) { else if( deltaY > touch.threshold ) {
touch.captured = true; touch.captured = true;
navigateUp(); if( config.navigationMode === 'linear' ) {
navigatePrev();
}
else {
navigateUp();
}
} }
else if( deltaY < -touch.threshold ) { else if( deltaY < -touch.threshold ) {
touch.captured = true; touch.captured = true;
navigateDown(); if( config.navigationMode === 'linear' ) {
navigateNext();
}
else {
navigateDown();
}
} }
// If we're embedded, only block touch events if they have // If we're embedded, only block touch events if they have
@ -5905,6 +6034,15 @@
// Returns the speaker notes string for a slide, or null // Returns the speaker notes string for a slide, or null
getSlideNotes: getSlideNotes, getSlideNotes: getSlideNotes,
// Returns an array with all horizontal/vertical slides in the deck
getHorizontalSlides: getHorizontalSlides,
getVerticalSlides: getVerticalSlides,
// Checks if the presentation contains two or more
// horizontal/vertical slides
hasHorizontalSlides: hasHorizontalSlides,
hasVerticalSlides: hasVerticalSlides,
// Returns the previous slide element, may be null // Returns the previous slide element, may be null
getPreviousSlide: function() { getPreviousSlide: function() {
return previousSlide; return previousSlide;

360
package-lock.json generated
View File

@ -44,18 +44,18 @@
"dev": true "dev": true
}, },
"agent-base": { "agent-base": {
"version": "4.2.1", "version": "4.3.0",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
"integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
"dev": true, "dev": true,
"requires": { "requires": {
"es6-promisify": "^5.0.0" "es6-promisify": "^5.0.0"
} }
}, },
"ajv": { "ajv": {
"version": "6.9.2", "version": "6.10.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.2.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
"integrity": "sha512-4UFy0/LgDo7Oa/+wOAlj44tp9K78u38E5/359eSrqEp1Z5PdVfimCcs7SluXMP755RUQu6d2b4AvF0R1C9RZjg==", "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
"dev": true, "dev": true,
"requires": { "requires": {
"fast-deep-equal": "^2.0.1", "fast-deep-equal": "^2.0.1",
@ -275,9 +275,9 @@
"dev": true "dev": true
}, },
"aws4": { "aws4": {
"version": "1.8.0", "version": "1.9.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.0.tgz",
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "integrity": "sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==",
"dev": true "dev": true
}, },
"backo2": { "backo2": {
@ -712,9 +712,9 @@
"dev": true "dev": true
}, },
"combined-stream": { "combined-stream": {
"version": "1.0.7", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dev": true, "dev": true,
"requires": { "requires": {
"delayed-stream": "~1.0.0" "delayed-stream": "~1.0.0"
@ -1263,9 +1263,9 @@
} }
}, },
"es6-promise": { "es6-promise": {
"version": "4.2.6", "version": "4.2.8",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
"integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==", "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
"dev": true "dev": true
}, },
"es6-promisify": { "es6-promisify": {
@ -1615,9 +1615,9 @@
} }
}, },
"extend": { "extend": {
"version": "3.0.0", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ=", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
"dev": true "dev": true
}, },
"extend-shallow": { "extend-shallow": {
@ -1737,15 +1737,15 @@
"dev": true "dev": true
}, },
"process-nextick-args": { "process-nextick-args": {
"version": "2.0.0", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
"dev": true "dev": true
}, },
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.7",
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dev": true, "dev": true,
"requires": { "requires": {
"core-util-is": "~1.0.0", "core-util-is": "~1.0.0",
@ -1781,9 +1781,9 @@
"dev": true "dev": true
}, },
"fast-json-stable-stringify": { "fast-json-stable-stringify": {
"version": "2.0.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
"dev": true "dev": true
}, },
"faye-websocket": { "faye-websocket": {
@ -1988,9 +1988,9 @@
"dev": true "dev": true
}, },
"fstream": { "fstream": {
"version": "1.0.11", "version": "1.0.12",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
"integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
"dev": true, "dev": true,
"requires": { "requires": {
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
@ -2305,9 +2305,9 @@
} }
}, },
"lodash": { "lodash": {
"version": "4.17.11", "version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true "dev": true
} }
} }
@ -2790,12 +2790,12 @@
"dev": true "dev": true
}, },
"https-proxy-agent": { "https-proxy-agent": {
"version": "2.2.1", "version": "2.2.4",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
"integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
"dev": true, "dev": true,
"requires": { "requires": {
"agent-base": "^4.1.0", "agent-base": "^4.3.0",
"debug": "^3.1.0" "debug": "^3.1.0"
}, },
"dependencies": { "dependencies": {
@ -3120,9 +3120,9 @@
"dev": true "dev": true
}, },
"js-yaml": { "js-yaml": {
"version": "3.13.0", "version": "3.13.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"dev": true, "dev": true,
"requires": { "requires": {
"argparse": "^1.0.7", "argparse": "^1.0.7",
@ -3276,21 +3276,9 @@
} }
}, },
"lodash": { "lodash": {
"version": "4.17.11", "version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
},
"lodash.assign": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
"integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=",
"dev": true
},
"lodash.clonedeep": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
"dev": true "dev": true
}, },
"lodash.isfinite": { "lodash.isfinite": {
@ -3299,12 +3287,6 @@
"integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=", "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M=",
"dev": true "dev": true
}, },
"lodash.mergewith": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz",
"integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==",
"dev": true
},
"loud-rejection": { "loud-rejection": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
@ -3431,18 +3413,18 @@
"dev": true "dev": true
}, },
"mime-db": { "mime-db": {
"version": "1.38.0", "version": "1.43.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz",
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==",
"dev": true "dev": true
}, },
"mime-types": { "mime-types": {
"version": "2.1.22", "version": "2.1.26",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz",
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"mime-db": "~1.38.0" "mime-db": "1.43.0"
} }
}, },
"minimatch": { "minimatch": {
@ -3461,9 +3443,9 @@
"dev": true "dev": true
}, },
"mixin-deep": { "mixin-deep": {
"version": "1.3.1", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
"integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
"dev": true, "dev": true,
"requires": { "requires": {
"for-in": "^1.0.2", "for-in": "^1.0.2",
@ -3559,9 +3541,9 @@
"dev": true "dev": true
}, },
"nan": { "nan": {
"version": "2.12.1", "version": "2.14.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
"integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==",
"dev": true "dev": true
}, },
"nanomatch": { "nanomatch": {
@ -3609,45 +3591,6 @@
"which": "1" "which": "1"
}, },
"dependencies": { "dependencies": {
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"semver": { "semver": {
"version": "5.3.0", "version": "5.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
@ -3673,9 +3616,9 @@
} }
}, },
"node-sass": { "node-sass": {
"version": "4.11.0", "version": "4.13.0",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.11.0.tgz", "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.0.tgz",
"integrity": "sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA==", "integrity": "sha512-W1XBrvoJ1dy7VsvTAS5q1V45lREbTlZQqFbiHb3R3OTTCma0XBtuG6xZ6Z4506nR4lmHPTqVRwxT6KgtWC97CA==",
"dev": true, "dev": true,
"requires": { "requires": {
"async-foreach": "^0.1.3", "async-foreach": "^0.1.3",
@ -3685,12 +3628,10 @@
"get-stdin": "^4.0.1", "get-stdin": "^4.0.1",
"glob": "^7.0.3", "glob": "^7.0.3",
"in-publish": "^2.0.0", "in-publish": "^2.0.0",
"lodash.assign": "^4.2.0", "lodash": "^4.17.15",
"lodash.clonedeep": "^4.3.2",
"lodash.mergewith": "^4.6.0",
"meow": "^3.7.0", "meow": "^3.7.0",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"nan": "^2.10.0", "nan": "^2.13.2",
"node-gyp": "^3.8.0", "node-gyp": "^3.8.0",
"npmlog": "^4.0.0", "npmlog": "^4.0.0",
"request": "^2.88.0", "request": "^2.88.0",
@ -3699,44 +3640,11 @@
"true-case-path": "^1.0.2" "true-case-path": "^1.0.2"
}, },
"dependencies": { "dependencies": {
"balanced-match": { "lodash": {
"version": "1.0.0", "version": "4.17.15",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true "dev": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
} }
} }
}, },
@ -4153,9 +4061,9 @@
} }
}, },
"lodash": { "lodash": {
"version": "4.17.11", "version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true "dev": true
} }
} }
@ -4229,9 +4137,9 @@
"dev": true "dev": true
}, },
"psl": { "psl": {
"version": "1.1.31", "version": "1.7.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz",
"integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", "integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==",
"dev": true "dev": true
}, },
"punycode": { "punycode": {
@ -4241,9 +4149,9 @@
"dev": true "dev": true
}, },
"puppeteer": { "puppeteer": {
"version": "1.12.2", "version": "1.20.0",
"resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.12.2.tgz", "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-1.20.0.tgz",
"integrity": "sha512-xWSyCeD6EazGlfnQweMpM+Hs6X6PhUYhNTHKFj/axNZDq4OmrVERf70isBf7HsnFgB3zOC1+23/8+wCAZYg+Pg==", "integrity": "sha512-bt48RDBy2eIwZPrkgbcwHtb51mj2nKvHOPMaSH2IsWiv7lOG9k9zhaRzpDZafrk05ajMc3cu+lSQYYOfH2DkVQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"debug": "^4.1.0", "debug": "^4.1.0",
@ -4266,9 +4174,9 @@
} }
}, },
"mime": { "mime": {
"version": "2.4.0", "version": "2.4.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz", "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz",
"integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==", "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==",
"dev": true "dev": true
} }
} }
@ -4572,47 +4480,6 @@
"lodash": "^4.0.0", "lodash": "^4.0.0",
"scss-tokenizer": "^0.2.3", "scss-tokenizer": "^0.2.3",
"yargs": "^7.0.0" "yargs": "^7.0.0"
},
"dependencies": {
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
}
} }
}, },
"scss-tokenizer": { "scss-tokenizer": {
@ -4773,9 +4640,9 @@
"dev": true "dev": true
}, },
"set-value": { "set-value": {
"version": "2.0.0", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
"integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
"dev": true, "dev": true,
"requires": { "requires": {
"extend-shallow": "^2.0.1", "extend-shallow": "^2.0.1",
@ -5248,13 +5115,13 @@
"dev": true "dev": true
}, },
"tar": { "tar": {
"version": "2.2.1", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
"dev": true, "dev": true,
"requires": { "requires": {
"block-stream": "*", "block-stream": "*",
"fstream": "^1.0.2", "fstream": "^1.0.12",
"inherits": "2" "inherits": "2"
} }
}, },
@ -5379,26 +5246,10 @@
"glob": "^7.1.2" "glob": "^7.1.2"
}, },
"dependencies": { "dependencies": {
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"glob": { "glob": {
"version": "7.1.3", "version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true, "dev": true,
"requires": { "requires": {
"fs.realpath": "^1.0.0", "fs.realpath": "^1.0.0",
@ -5488,38 +5339,15 @@
} }
}, },
"union-value": { "union-value": {
"version": "1.0.0", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
"integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
"dev": true, "dev": true,
"requires": { "requires": {
"arr-union": "^3.1.0", "arr-union": "^3.1.0",
"get-value": "^2.0.6", "get-value": "^2.0.6",
"is-extendable": "^0.1.1", "is-extendable": "^0.1.1",
"set-value": "^0.4.3" "set-value": "^2.0.1"
},
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"dev": true,
"requires": {
"is-extendable": "^0.1.0"
}
},
"set-value": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
"integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
"dev": true,
"requires": {
"extend-shallow": "^2.0.1",
"is-extendable": "^0.1.1",
"is-plain-object": "^2.0.1",
"to-object-path": "^0.3.0"
}
}
} }
}, },
"unpipe": { "unpipe": {
@ -5649,9 +5477,9 @@
"dev": true "dev": true
}, },
"uuid": { "uuid": {
"version": "3.3.2", "version": "3.3.3",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==",
"dev": true "dev": true
}, },
"v8flags": { "v8flags": {

View File

@ -36,7 +36,7 @@
"grunt-sass": "^3.0.2", "grunt-sass": "^3.0.2",
"grunt-zip": "~0.17.1", "grunt-zip": "~0.17.1",
"load-grunt-tasks": "^4.0.0", "load-grunt-tasks": "^4.0.0",
"node-sass": "^4.11.0", "node-sass": "^4.13.0",
"mustache": "^2.3.0", "mustache": "^2.3.0",
"socket.io": "^2.2.0" "socket.io": "^2.2.0"
}, },

File diff suppressed because one or more lines are too long

View File

@ -539,12 +539,17 @@
callRevealApi( 'getSlidesAttributes', [], function ( slideAttributes ) { callRevealApi( 'getSlidesAttributes', [], function ( slideAttributes ) {
callRevealApi( 'getConfig', [], function ( config ) { callRevealApi( 'getConfig', [], function ( config ) {
var totalTime = config.totalTime;
var minTimePerSlide = config.minimumTimePerSlide || 0;
var defaultTiming = config.defaultTiming; var defaultTiming = config.defaultTiming;
if (defaultTiming == null) { if ((defaultTiming == null) && (totalTime == null)) {
callback(null); callback(null);
return; return;
} }
// Setting totalTime overrides defaultTiming
if (totalTime) {
defaultTiming = 0;
}
var timings = []; var timings = [];
for ( var i in slideAttributes ) { for ( var i in slideAttributes ) {
var slide = slideAttributes[ i ]; var slide = slideAttributes[ i ];
@ -559,7 +564,22 @@
} }
timings.push(timing); timings.push(timing);
} }
if ( totalTime ) {
// After we've allocated time to individual slides, we summarize it and
// subtract it from the total time
var remainingTime = totalTime - timings.reduce( function(a, b) { return a + b; }, 0 );
// The remaining time is divided by the number of slides that have 0 seconds
// allocated at the moment, giving the average time-per-slide on the remaining slides
var remainingSlides = (timings.filter( function(x) { return x == 0 }) ).length
var timePerSlide = Math.round( remainingTime / remainingSlides, 0 )
// And now we replace every zero-value timing with that average
timings = timings.map( function(x) { return (x==0 ? timePerSlide : x) } );
}
var slidesUnderMinimum = timings.filter( function(x) { return (x < minTimePerSlide) } ).length
if ( slidesUnderMinimum ) {
message = "The pacing time for " + slidesUnderMinimum + " slide(s) is under the configured minimum of " + minTimePerSlide + " seconds. Check the data-timing attribute on individual slides, or consider increasing the totalTime or minimumTimePerSlide configuration options (or removing some slides).";
alert(message);
}
callback( timings ); callback( timings );
} ); } );
} ); } );

View File

@ -0,0 +1,104 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>reveal.js - Test Iframe Backgrounds</title>
<link rel="stylesheet" href="../css/reveal.css">
<link rel="stylesheet" href="qunit-2.5.0.css">
</head>
<body style="overflow: auto;">
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<div class="reveal" style="display: none;">
<div class="slides">
<section data-background-iframe="#1">1</section>
<section data-background-iframe="#2">2</section>
<section data-background-iframe="#3" data-preload>3</section>
<section data-background-iframe="#4">4</section>
<section data-background-iframe="#5">5</section>
<section data-background-iframe="#6">6</section>
</div>
</div>
<script src="../js/reveal.js"></script>
<script src="qunit-2.5.0.js"></script>
<script>
Reveal.addEventListener( 'ready', function() {
function getIframe( index ) {
return document.querySelectorAll( '.slide-background' )[index].querySelector( 'iframe' );
}
QUnit.module( 'Iframe' );
QUnit.test( 'Using default settings', function( assert ) {
Reveal.slide(0);
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), false, 'not preloaded when within viewDistance' );
Reveal.slide(1);
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
Reveal.slide(0);
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), false, 'unloaded when slide becomes invisible' );
});
QUnit.test( 'Using data-preload', function( assert ) {
Reveal.slide(1);
assert.strictEqual( getIframe(2).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
Reveal.slide(0);
assert.strictEqual( getIframe(3).hasAttribute( 'src' ), false, 'unloads outside of viewDistance' );
});
QUnit.test( 'Using preloadIframes: true', function( assert ) {
Reveal.configure({ preloadIframes: true });
Reveal.slide(1);
assert.strictEqual( getIframe(0).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
assert.strictEqual( getIframe(2).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
});
QUnit.test( 'Using preloadIframes: false', function( assert ) {
Reveal.configure({ preloadIframes: false });
Reveal.slide(0);
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
assert.strictEqual( getIframe(2).hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
Reveal.slide(1);
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
});
} );
Reveal.initialize({
viewDistance: 3
});
</script>
</body>
</html>

View File

@ -250,6 +250,22 @@ Reveal.addEventListener( 'ready', function() {
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'Reveal.slide( 2, 0, 1 )' ); assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'Reveal.slide( 2, 0, 1 )' );
}); });
QUnit.test( 'data-fragment is set on slide <section>', function( assert ) {
Reveal.slide( 2, 0, -1 );
assert.deepEqual( Reveal.getCurrentSlide().getAttribute( 'data-fragment' ), '-1' );
Reveal.slide( 2, 0, 2 );
assert.deepEqual( Reveal.getCurrentSlide().getAttribute( 'data-fragment' ), '2' );
Reveal.slide( 2, 0, 0 );
assert.deepEqual( Reveal.getCurrentSlide().getAttribute( 'data-fragment' ), '0' );
var fragmentSlide = Reveal.getCurrentSlide();
Reveal.slide( 3, 0 );
assert.deepEqual( fragmentSlide.getAttribute( 'data-fragment' ), '0', 'data-fragment persists when jumping to another slide' );
});
QUnit.test( 'Hiding all fragments', function( assert ) { QUnit.test( 'Hiding all fragments', function( assert ) {
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' ); var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );