Vendor reveal.js 5.2.1 (from 5.1.0)
Contains the upstream 5.2.x feature set, most notably the lightbox
(data-preview-image/data-preview-video opens media full-size in an
overlay), controls: "speaker-only", search API extensions and
speaker-view fixes. The package's local additions are carried over
unchanged: IDS theme (ids.css/ids.scss), extra theme fonts,
chalkboard/customcontrols/menu plugins, and the 1280x720 default
slide size (patched in js/config.js and the dist bundles).
Also fixes a pre-existing fork bug (unrelated to the upgrade): the
slidechanged Highcharts resize hook in default.html now checks that
Highcharts exists, no longer throwing in decks without highcharter.
Docs: README (Rmd + rendered md) gained a short Lightbox section,
NEWS.md notes the library bump.
Verified: examples/ids.html and examples/simple.html re-render and run
error-free through all 13/5 slides (Reveal.VERSION = 5.2.1); lightbox
opens on click and closes with Esc in a dedicated test deck.
Change-Id: I0751129dfb0c9d20b56241377905876314a26011
diff --git a/inst/reveal.js-5.2.1/test/test-destroy.html b/inst/reveal.js-5.2.1/test/test-destroy.html
new file mode 100644
index 0000000..1fa9cd2
--- /dev/null
+++ b/inst/reveal.js-5.2.1/test/test-destroy.html
@@ -0,0 +1,97 @@
+<!doctype html>
+<html lang="en">
+
+ <head>
+ <meta charset="utf-8">
+
+ <title>reveal.js - Test Dependencies</title>
+
+ <link rel="stylesheet" href="../dist/reveal.css">
+ <link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
+ <script src="../node_modules/qunit/qunit/qunit.js"></script>
+ </head>
+
+ <body style="overflow: auto;">
+
+ <div id="qunit"></div>
+ <div id="qunit-fixture"></div>
+
+ <div class="reveal deck1" style="display: none;">
+ <div class="slides">
+ <section>Slide content</section>
+ </div>
+ </div>
+
+ <div class="reveal deck2" style="display: none;">
+ <div class="slides">
+ <section>Slide content</section>
+ </div>
+ </div>
+
+ <script type="module">
+ import Reveal from '../dist/reveal.esm.js'
+ import Markdown from '../plugin/markdown/markdown.esm.js'
+
+ QUnit.module( 'Destroy' );
+
+ QUnit.test( 'Destruction during initialization', function( assert ) {
+
+ let deck = new Reveal( document.querySelector( '.deck1' ) );
+
+ deck.initialize({ plugins: [ Markdown ] });
+
+ let firstAttemptSuccess = false;
+ let repeatedAttemptSuccess = false;
+
+ try {
+ deck.destroy();
+ firstAttemptSuccess = true;
+ }
+ catch( error ) {
+ console.error( error );
+ }
+
+ assert.ok( firstAttemptSuccess, 'was successful' );
+
+ // should be able to destroy twice with no side effect
+ try {
+ deck.destroy();
+ repeatedAttemptSuccess = true;
+ }
+ catch( error ) {
+ console.error( error );
+ }
+
+ assert.ok( repeatedAttemptSuccess, 'destroyed twice with no exceptions' );
+
+ } );
+
+ QUnit.test( 'Destruction after initialization', function( assert ) {
+
+ assert.expect( 1 );
+ let done = assert.async( 1 );
+ let deck = new Reveal( document.querySelector( '.deck2' ) );
+
+ deck.initialize({ plugins: [ Markdown ] }).then(() => {
+ let wasSuccessful = false;
+
+ try {
+ deck.destroy();
+ wasSuccessful = true;
+ }
+ catch( error ) {
+ console.error( error );
+ }
+
+ if( wasSuccessful ) {
+ assert.ok( true, 'was successful' );
+ }
+
+ done();
+ });
+
+ } );
+ </script>
+
+ </body>
+</html>