diff --git a/dist/reveal.esm.js b/dist/reveal.esm.js index 9622b423..7a89603c 100644 --- a/dist/reveal.esm.js +++ b/dist/reveal.esm.js @@ -1,5 +1,5 @@ /*! -* reveal.js 4.0.0-dev (Tue May 12 2020) +* reveal.js 4.0.0-dev (Mon May 18 2020) * https://revealjs.com * MIT licensed * diff --git a/dist/reveal.js b/dist/reveal.js index a48c8591..34056eb9 100644 --- a/dist/reveal.js +++ b/dist/reveal.js @@ -1,5 +1,5 @@ /*! -* reveal.js 4.0.0-dev (Tue May 12 2020) +* reveal.js 4.0.0-dev (Mon May 18 2020) * https://revealjs.com * MIT licensed * diff --git a/gulpfile.js b/gulpfile.js index 575173d9..2812f3ad 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -38,6 +38,8 @@ process.setMaxListeners(20); const babelConfig = { exclude: 'node_modules/**', compact: false, + extensions: ['.js', '.html'], + plugins: ['transform-html-import-to-string'], presets: [[ '@babel/preset-env', { diff --git a/js/index.js b/js/index.js index ff6f6331..db5577d0 100644 --- a/js/index.js +++ b/js/index.js @@ -16,7 +16,7 @@ let Reveal = Deck; /** * The below is a thin shell that mimics the pre 4.0 * reveal.js API and ensures backwards compatibility. - * This API only allows for once Reveal instance per + * This API only allows for one Reveal instance per * page, whereas the new API above lets you run many * presentations on the same page. * diff --git a/package-lock.json b/package-lock.json index e2a61283..7277c187 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1425,6 +1425,12 @@ "object.assign": "^4.1.0" } }, + "babel-plugin-transform-html-import-to-string": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-html-import-to-string/-/babel-plugin-transform-html-import-to-string-0.0.1.tgz", + "integrity": "sha1-lJFSUV2q12TPVcUasXh9IG3s+J0=", + "dev": true + }, "bach": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", diff --git a/package.json b/package.json index 5917e446..8c758c80 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "@rollup/plugin-commonjs": "^11.1.0", "@rollup/plugin-node-resolve": "^7.1.3", "babel-eslint": "^10.1.0", + "babel-plugin-transform-html-import-to-string": "0.0.1", "colors": "^1.4.0", "core-js": "^3.6.5", "glob": "^7.1.6", @@ -47,14 +48,14 @@ "gulp-sass": "^4.0.2", "gulp-tap": "^2.0.0", "gulp-zip": "^5.0.1", + "highlight.js": "^10.0.1", + "marked": "^1.0.0", "node-qunit-puppeteer": "^2.0.1", "qunit": "^2.9.3", "rollup": "^2.6.1", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-terser": "^5.3.0", - "yargs": "^15.1.0", - "highlight.js": "^10.0.1", - "marked": "^1.0.0" + "yargs": "^15.1.0" }, "browserslist": "> 0.5%, IE 11, not dead", "eslintConfig": { diff --git a/plugin/notes/notes.esm.js b/plugin/notes/notes.esm.js index 1e5f340b..bb34fddf 100644 --- a/plugin/notes/notes.esm.js +++ b/plugin/notes/notes.esm.js @@ -1 +1 @@ -export default function(){var e,t=null;function n(n){var a;!t||t.closed?(n||(n="plugin/notes/notes.html"),(t=window.open(n,"reveal.js - Notes","width=1100,height=700"))?(a=setInterval((function(){t.postMessage(JSON.stringify({namespace:"reveal-notes",type:"connect",url:window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,state:e.getState()}),"*")}),500),window.addEventListener("message",(function(n){var s,r,i,d,l=JSON.parse(n.data);l&&"reveal-notes"===l.namespace&&"connected"===l.type&&(clearInterval(a),e.on("slidechanged",o),e.on("fragmentshown",o),e.on("fragmenthidden",o),e.on("overviewhidden",o),e.on("overviewshown",o),e.on("paused",o),e.on("resumed",o),o()),l&&"reveal-notes"===l.namespace&&"call"===l.type&&(s=l.methodName,r=l.arguments,i=l.callId,d=e[s].apply(e,r),t.postMessage(JSON.stringify({namespace:"reveal-notes",type:"return",result:d,callId:i}),"*"))}))):alert("Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.")):t.focus();function o(n){var a=e.getCurrentSlide(),o=a.querySelector("aside.notes"),s=a.querySelector(".current-fragment"),r={namespace:"reveal-notes",type:"state",notes:"",markdown:!1,whitespace:"normal",state:e.getState()};if(a.hasAttribute("data-notes")&&(r.notes=a.getAttribute("data-notes"),r.whitespace="pre-wrap"),s){var i=s.querySelector("aside.notes");i?o=i:s.hasAttribute("data-notes")&&(r.notes=s.getAttribute("data-notes"),r.whitespace="pre-wrap",o=null)}o&&(r.notes=o.innerHTML,r.markdown="string"==typeof o.getAttribute("data-markdown")),t.postMessage(JSON.stringify(r),"*")}}return{id:"notes",init:function(t){e=t,/receiver/i.test(window.location.search)||(null!==window.location.search.match(/(\?|\&)notes/gi)&&n(),e.addKeyBinding({keyCode:83,key:"S",description:"Speaker notes view"},(function(){n()})))},open:n}} +export default function(){var t,n=null;function e(){var e;!n||n.closed?((n=window.open("about:blank","reveal.js - Notes","width=1100,height=700")).document.write("\n\t
\n\t\t\n\n\t\t