Update to reveal.js 4.6.1
Change-Id: I566737c50b93dd8c094ad3c3fa59865260b3b4ba
diff --git a/inst/reveal.js-4.6.1/plugin/customcontrols/LICENSE b/inst/reveal.js-4.6.1/plugin/customcontrols/LICENSE
new file mode 100644
index 0000000..0eb3683
--- /dev/null
+++ b/inst/reveal.js-4.6.1/plugin/customcontrols/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2021 Asvin Goel
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/inst/reveal.js-4.6.1/plugin/customcontrols/README.md b/inst/reveal.js-4.6.1/plugin/customcontrols/README.md
new file mode 100644
index 0000000..568859f
--- /dev/null
+++ b/inst/reveal.js-4.6.1/plugin/customcontrols/README.md
@@ -0,0 +1,60 @@
+# Custom controls
+
+This plugin allows to add responsive custom controls to reveal.js which allow arbitrary positioning, layout, and behaviour of the controls.
+
+[Check out the demo](https://rajgoel.github.io/reveal.js-demos/)
+
+## Setup
+
+To use the plugin include
+```html
+<!-- Font awesome is used by several plugins -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js"></script>
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
+<!-- Custom controls plugin -->
+<script src="https://cdn.jsdelivr.net/npm/reveal.js-plugins@latest/customcontrols/plugin.js"></script>
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reveal.js-plugins@latest/customcontrols/style.css">
+```
+to the header of your presentation and configure reveal.js and the plugin by
+
+```js
+Reveal.initialize({
+ customcontrols: {
+ // add configuration here
+ },
+ // ...
+ plugins: [ RevealCustomControls ],
+ // ...
+});
+```
+
+## Configuration
+
+The plugin can be configured by adding custom controls and changing the layout of the slide number, e.g., by:
+
+
+```javascript
+Reveal.initialize({
+ // ...
+ customcontrols: {
+ controls: [
+ {
+ id: 'toggle-overview',
+ title: 'Toggle overview (O)',
+ icon: '<i class="fa fa-th"></i>',
+ action: 'Reveal.toggleOverview();'
+ }
+ ]
+ },
+ // ...
+
+});
+```
+
+The `id` and `title` are optional. The configuration should be self explaining and any number of controls can be added. The style file can be altered to control the layout and responsiveness of the custom controls.
+
+## License
+
+MIT licensed
+
+Copyright (C) 2023 Asvin Goel
diff --git a/inst/reveal.js-4.6.1/plugin/customcontrols/VERSION b/inst/reveal.js-4.6.1/plugin/customcontrols/VERSION
new file mode 100644
index 0000000..cf78d5b
--- /dev/null
+++ b/inst/reveal.js-4.6.1/plugin/customcontrols/VERSION
@@ -0,0 +1 @@
+4.2.4
diff --git a/inst/reveal.js-4.6.1/plugin/customcontrols/plugin.js b/inst/reveal.js-4.6.1/plugin/customcontrols/plugin.js
new file mode 100644
index 0000000..39d28e4
--- /dev/null
+++ b/inst/reveal.js-4.6.1/plugin/customcontrols/plugin.js
@@ -0,0 +1,73 @@
+/*****************************************************************
+** Author: Asvin Goel, goel@telematique.eu
+**
+** A plugin replacing the default controls by custom controls.
+**
+** Version: 2.0.1
+**
+** License: MIT license (see LICENSE.md)
+**
+******************************************************************/
+window.RevealCustomControls = window.RevealCustomControls || {
+ id: 'RevealCustomControls',
+ init: function(deck) {
+ initCustomControls(deck);
+ }
+};
+
+const initCustomControls = function(Reveal){
+ var config = Reveal.getConfig().customcontrols || {};
+
+ if (Reveal.isSpeakerNotes() && new URLSearchParams(location.search).get('controls') == 'false') return;
+ if (!config?.controls?.length) return this;
+
+ var collapseIcon = config.collapseIcon || '<i class="fa fa-chevron-down"></i>';
+ var expandIcon = config.expandIcon || '<i class="fa fa-chevron-up"></i>';
+ var tooltip = config.tooltip || 'Show/hide controls';
+
+ var div = document.createElement( 'div' );
+ div.id = 'customcontrols';
+
+ var toggleButton = document.createElement( 'button' );
+ toggleButton.title = tooltip;
+ toggleButton.innerHTML = '<span id="collapse-customcontrols">' + collapseIcon + '</span>' + '<span id="expand-customcontrols">' + expandIcon + '</span>';
+
+ toggleButton.addEventListener('click', function( event ) {
+ var div = document.querySelector("div#customcontrols");
+ if ( div.classList.contains('collapsed') ) {
+ div.classList.remove('collapsed');
+ }
+ else {
+ div.classList.add('collapsed');
+ }
+ toggleButton.blur(); // unfocus button
+ });
+
+ div.appendChild(toggleButton);
+
+ var controls = document.createElement( 'ul' );
+ for (var i = 0; i < config.controls.length; i++ ) {
+ var control = document.createElement( 'li' );
+ if ( config.controls[i].id ) {
+ control.id = config.controls[i].id;
+ }
+ control.innerHTML = '<button ' + ( config.controls[i].title ? 'title="' + config.controls[i].title + '" ': '' ) + 'onclick="' + config.controls[i].action + '">' + config.controls[i].icon + '</button>';
+ controls.appendChild( control );
+ }
+ div.appendChild( controls );
+
+
+ document.querySelector(".reveal").appendChild( div );
+
+ document.addEventListener( 'resize', function( event ) {
+ // expand controls to make sure they are visible
+ var div = document.querySelector("div#customcontrols.collapsed");
+ if ( div ) {
+ div.classList.remove('collapsed');
+ }
+ } );
+
+ return this;
+
+};
+
diff --git a/inst/reveal.js-4.6.1/plugin/customcontrols/style.css b/inst/reveal.js-4.6.1/plugin/customcontrols/style.css
new file mode 100644
index 0000000..88be439
--- /dev/null
+++ b/inst/reveal.js-4.6.1/plugin/customcontrols/style.css
@@ -0,0 +1,70 @@
+#customcontrols {
+ z-index: 40;
+ position: fixed;
+ left: 70px;
+ bottom: 30px;
+ text-align: center;
+ font-size: 24px;
+}
+
+#customcontrols button {
+ background: none;
+ color: var(--r-link-color);
+ border: none;
+ padding: 0;
+ font: inherit;
+ cursor: pointer;
+ outline: inherit;
+ z-index: 40;
+}
+
+#customcontrols button:hover {
+ color: var(--r-link-color-hover);
+}
+
+#customcontrols > ul {
+ position: fixed;
+ left: 54px;
+ bottom: 64px;
+ list-style-type: none;
+ overflow: hidden;
+ margin: 0;
+ border: 1px solid var(--r-link-color);
+ border-radius: 5px;
+ padding: 10px;
+ background-color: var(--r-background-color)
+}
+
+#customcontrols ul > li {
+ margin: 0px 5px;
+ padding: 0px 5px;
+ float: left;
+}
+
+#customcontrols.collapsed #collapse-customcontrols, #customcontrols.collapsed > ul {
+ display: none;
+}
+
+#customcontrols:not(.collapsed) #expand-customcontrols {
+ display: none;
+}
+
+@media only screen and (min-width: 500px) {
+ #customcontrols > button {
+ display: none;
+ }
+ #customcontrols > ul {
+ padding-top: 0px;
+ padding-bottom: 0px;
+ bottom: 30px;
+ border: none;
+ background: none;
+ }
+}
+
+@media print {
+ #customcontrols {
+ display: none!important;
+ }
+}
+