crossnote 0.9.43 → 0.9.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/out/cjs/index.cjs +590 -379
  2. package/out/cli/index.cjs +3867 -912
  3. package/out/dependencies/README.md +46 -6
  4. package/out/dependencies/mermaid/mermaid.min.js +1475 -1475
  5. package/out/dependencies/pele/pele.global.js +150 -0
  6. package/out/dependencies/reveal/css/reveal.css +1 -8
  7. package/out/dependencies/reveal/css/theme/beige.css +1 -301
  8. package/out/dependencies/reveal/css/theme/black-contrast.css +1 -0
  9. package/out/dependencies/reveal/css/theme/black.css +1 -294
  10. package/out/dependencies/reveal/css/theme/blood.css +1 -323
  11. package/out/dependencies/reveal/css/theme/dracula.css +1 -0
  12. package/out/dependencies/reveal/css/theme/league.css +1 -303
  13. package/out/dependencies/reveal/css/theme/moon.css +1 -301
  14. package/out/dependencies/reveal/css/theme/night.css +1 -295
  15. package/out/dependencies/reveal/css/theme/serif.css +1 -297
  16. package/out/dependencies/reveal/css/theme/simple.css +1 -297
  17. package/out/dependencies/reveal/css/theme/sky.css +1 -304
  18. package/out/dependencies/reveal/css/theme/solarized.css +1 -298
  19. package/out/dependencies/reveal/css/theme/white-contrast.css +1 -0
  20. package/out/dependencies/reveal/css/theme/white.css +1 -294
  21. package/out/dependencies/reveal/js/reveal.js +39 -8
  22. package/out/dependencies/reveal/plugin/notes/notes.js +970 -1
  23. package/out/esm/index.mjs +604 -393
  24. package/out/server-app/server-app.css +1 -1
  25. package/out/server-app/server-app.js +10 -10
  26. package/out/styles/style-template.css +1 -1
  27. package/out/types/src/custom-markdown-it-features/admonition.d.ts +1 -1
  28. package/out/types/src/custom-markdown-it-features/callout.d.ts +1 -1
  29. package/out/types/src/custom-markdown-it-features/code-fences.d.ts +2 -2
  30. package/out/types/src/custom-markdown-it-features/colon-fenced-code-blocks.d.ts +1 -1
  31. package/out/types/src/custom-markdown-it-features/critic-markup.d.ts +1 -1
  32. package/out/types/src/custom-markdown-it-features/curly-bracket-attributes.d.ts +1 -1
  33. package/out/types/src/custom-markdown-it-features/emoji.d.ts +1 -1
  34. package/out/types/src/custom-markdown-it-features/html5-embed.d.ts +1 -1
  35. package/out/types/src/custom-markdown-it-features/linkify.d.ts +3 -0
  36. package/out/types/src/custom-markdown-it-features/math.d.ts +1 -1
  37. package/out/types/src/custom-markdown-it-features/sourcemap.d.ts +1 -1
  38. package/out/types/src/custom-markdown-it-features/tag.d.ts +1 -1
  39. package/out/types/src/custom-markdown-it-features/widget.d.ts +1 -1
  40. package/out/types/src/custom-markdown-it-features/wikilink.d.ts +1 -1
  41. package/out/types/src/lib/css-for-style.d.ts +1 -0
  42. package/out/types/src/lib/dangerous-urls.d.ts +1 -1
  43. package/out/types/src/lib/json-for-script.d.ts +1 -0
  44. package/out/types/src/lib/pele-bundle.d.ts +2 -0
  45. package/out/types/src/lib/pele.d.ts +14 -0
  46. package/out/types/src/markdown-engine/index.d.ts +8 -1
  47. package/out/types/src/markdown-engine/mathjax-config.d.ts +5 -0
  48. package/out/types/src/markdown-engine/mermaid-polyfill.d.ts +1 -1
  49. package/out/types/src/markdown-engine/page-markers.d.ts +4 -0
  50. package/out/types/src/markdown-engine/pele-export.d.ts +1 -0
  51. package/out/types/src/markdown-engine/presentation-export.d.ts +7 -0
  52. package/out/types/src/markdown-engine/presentation-notes.d.ts +2 -0
  53. package/out/types/src/markdown-engine/sanitize.d.ts +3 -0
  54. package/out/types/src/markdown-engine/toc.d.ts +1 -1
  55. package/out/types/src/markdown-engine/transformer.d.ts +7 -1
  56. package/out/types/src/notebook/index.d.ts +7 -6
  57. package/out/types/src/notebook/types.d.ts +5 -3
  58. package/out/types/src/renderers/pele.d.ts +4 -0
  59. package/out/types/src/webview/components/ContextMenu.d.ts +1 -0
  60. package/out/types/src/webview/lib/mermaid.d.ts +9 -0
  61. package/out/types/src/webview/lib/pele.d.ts +3 -0
  62. package/out/types/src/webview/lib/sanitize.d.ts +1 -0
  63. package/out/types/src/webview/lib/source-text-map.d.ts +2 -1
  64. package/out/types/test/browser/context-menu-harness.d.ts +1 -0
  65. package/out/types/test/browser/context-menu.spec.d.ts +1 -0
  66. package/out/types/test/browser/mathjax-config-sources.spec.d.ts +1 -0
  67. package/out/types/test/browser/mermaid-measure.spec.d.ts +1 -0
  68. package/out/types/test/browser/mermaid-polyfill.spec.d.ts +1 -0
  69. package/out/types/test/browser/mermaid-sanitize.spec.d.ts +1 -0
  70. package/out/types/test/browser/mouse-wheel-zoom.spec.d.ts +1 -0
  71. package/out/types/test/browser/pele.spec.d.ts +1 -0
  72. package/out/types/test/browser/presentation-print.spec.d.ts +1 -0
  73. package/out/types/test/browser/presentation.spec.d.ts +1 -0
  74. package/out/types/test/browser/preview-container-harness.d.ts +1 -0
  75. package/out/types/test/browser/sanitize-stable.spec.d.ts +1 -0
  76. package/out/types/test/browser/scroll-sync.spec.d.ts +1 -0
  77. package/out/types/test/browser/sidebar-position.spec.d.ts +1 -0
  78. package/out/types/test/config-escaping.test.d.ts +1 -0
  79. package/out/types/test/ebook-export.test.d.ts +1 -0
  80. package/out/types/test/ebook-images.test.d.ts +1 -0
  81. package/out/types/test/fixtures/mutating-markup.d.ts +4 -0
  82. package/out/types/test/fixtures/pele-diagrams.d.ts +6 -0
  83. package/out/types/test/fixtures/pele-hostile.d.ts +2 -0
  84. package/out/types/test/front-matter-escaping.test.d.ts +1 -0
  85. package/out/types/test/html5-embed.test.d.ts +1 -0
  86. package/out/types/test/import-fragment-own-headings.test.d.ts +1 -0
  87. package/out/types/test/indented-code-import.test.d.ts +1 -0
  88. package/out/types/test/linkify.test.d.ts +1 -0
  89. package/out/types/test/markdown-export-toc.test.d.ts +1 -0
  90. package/out/types/test/markdown-it.test.d.ts +1 -0
  91. package/out/types/test/mathjax-config-file.test.d.ts +1 -0
  92. package/out/types/test/mathjax-diagram-sources.test.d.ts +1 -0
  93. package/out/types/test/mutation-xss.test.d.ts +1 -0
  94. package/out/types/test/note-trust.test.d.ts +1 -0
  95. package/out/types/test/page-markers.test.d.ts +1 -0
  96. package/out/types/test/pandoc-export-slide-markers.test.d.ts +1 -0
  97. package/out/types/test/pandoc-fragment-import-lines.test.d.ts +1 -0
  98. package/out/types/test/parser-hook-trust.test.d.ts +1 -0
  99. package/out/types/test/pele-diagrams.test.d.ts +1 -0
  100. package/out/types/test/pele-export.test.d.ts +1 -0
  101. package/out/types/test/pele-preview-script.test.d.ts +1 -0
  102. package/out/types/test/pele-renderer.test.d.ts +1 -0
  103. package/out/types/test/pele-vendor.test.d.ts +1 -0
  104. package/out/types/test/presentation-export-script.test.d.ts +1 -0
  105. package/out/types/test/presentation-export.test.d.ts +1 -0
  106. package/out/types/test/presentation-preview-script.test.d.ts +1 -0
  107. package/out/types/test/presentation-slides.test.d.ts +1 -0
  108. package/out/types/test/reveal-vendor.test.d.ts +1 -0
  109. package/out/types/test/sanitize-stable.test.d.ts +1 -0
  110. package/out/types/test/sidebar-toc.test.d.ts +1 -0
  111. package/out/types/test/toc-bracket.test.d.ts +1 -0
  112. package/out/types/test/webview-mermaid-render.test.d.ts +1 -0
  113. package/out/types/test/webview-pele-render.test.d.ts +1 -0
  114. package/out/types/tsconfig.tsbuildinfo +1 -1
  115. package/out/webview/backlinks.css +1 -1
  116. package/out/webview/backlinks.js +4 -4
  117. package/out/webview/graph-view.css +1 -1
  118. package/out/webview/preview.css +1 -1
  119. package/out/webview/preview.js +201 -201
  120. package/package.json +5 -5
  121. package/out/dependencies/reveal/css/print/paper.css +0 -203
  122. package/out/dependencies/reveal/css/print/pdf.css +0 -164
  123. package/out/dependencies/reveal/css/reset.css +0 -30
  124. package/out/dependencies/reveal/css/theme/README.md +0 -21
  125. package/out/dependencies/reveal/lib/css/zenburn.css +0 -80
  126. package/out/dependencies/reveal/lib/font/league-gothic/LICENSE +0 -2
  127. package/out/dependencies/reveal/lib/font/league-gothic/league-gothic.css +0 -10
  128. package/out/dependencies/reveal/lib/font/league-gothic/league-gothic.eot +0 -0
  129. package/out/dependencies/reveal/lib/font/league-gothic/league-gothic.ttf +0 -0
  130. package/out/dependencies/reveal/lib/font/league-gothic/league-gothic.woff +0 -0
  131. package/out/dependencies/reveal/lib/font/source-sans-pro/LICENSE +0 -45
  132. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
  133. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
  134. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
  135. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
  136. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
  137. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
  138. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
  139. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
  140. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
  141. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
  142. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
  143. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
  144. package/out/dependencies/reveal/lib/font/source-sans-pro/source-sans-pro.css +0 -39
  145. package/out/dependencies/reveal/lib/js/classList.js +0 -2
  146. package/out/dependencies/reveal/lib/js/head.min.js +0 -6
  147. package/out/dependencies/reveal/lib/js/html5shiv.js +0 -7
  148. package/out/dependencies/reveal/plugin/multiplex/client.js +0 -13
  149. package/out/dependencies/reveal/plugin/multiplex/index.js +0 -64
  150. package/out/dependencies/reveal/plugin/multiplex/master.js +0 -34
  151. package/out/dependencies/reveal/plugin/multiplex/package.json +0 -19
  152. package/out/dependencies/reveal/plugin/notes/notes.html +0 -792
  153. package/out/dependencies/reveal/plugin/notes/plugin.js +0 -261
  154. package/out/dependencies/reveal/plugin/notes/speaker-view.html +0 -891
  155. package/out/dependencies/reveal/plugin/notes-server/client.js +0 -65
  156. package/out/dependencies/reveal/plugin/notes-server/index.js +0 -69
  157. package/out/dependencies/reveal/plugin/notes-server/notes.html +0 -585
  158. package/out/dependencies/reveal/plugin/print-pdf/print-pdf.js +0 -67
  159. package/out/dependencies/reveal/plugin/search/plugin.js +0 -243
  160. package/out/dependencies/reveal/plugin/search/search.js +0 -7
  161. package/out/dependencies/reveal/plugin/zoom/plugin.js +0 -264
  162. package/out/dependencies/reveal/plugin/zoom/zoom.js +0 -11
  163. package/out/dependencies/reveal/plugin/zoom-js/zoom.js +0 -272
@@ -1,67 +0,0 @@
1
- /**
2
- * phantomjs script for printing presentations to PDF.
3
- *
4
- * Example:
5
- * phantomjs print-pdf.js "http://revealjs.com?print-pdf" reveal-demo.pdf
6
- *
7
- * @author Manuel Bieh (https://github.com/manuelbieh)
8
- * @author Hakim El Hattab (https://github.com/hakimel)
9
- * @author Manuel Riezebosch (https://github.com/riezebosch)
10
- */
11
-
12
- // html2pdf.js
13
- var system = require( 'system' );
14
-
15
- var probePage = new WebPage();
16
- var printPage = new WebPage();
17
-
18
- var inputFile = system.args[1] || 'index.html?print-pdf';
19
- var outputFile = system.args[2] || 'slides.pdf';
20
-
21
- if( outputFile.match( /\.pdf$/gi ) === null ) {
22
- outputFile += '.pdf';
23
- }
24
-
25
- console.log( 'Export PDF: Reading reveal.js config [1/4]' );
26
-
27
- probePage.open( inputFile, function( status ) {
28
-
29
- console.log( 'Export PDF: Preparing print layout [2/4]' );
30
-
31
- var config = probePage.evaluate( function() {
32
- return Reveal.getConfig();
33
- } );
34
-
35
- if( config ) {
36
-
37
- printPage.paperSize = {
38
- width: Math.floor( config.width * ( 1 + config.margin ) ),
39
- height: Math.floor( config.height * ( 1 + config.margin ) ),
40
- border: 0
41
- };
42
-
43
- printPage.open( inputFile, function( status ) {
44
- console.log( 'Export PDF: Preparing pdf [3/4]')
45
- printPage.evaluate( function() {
46
- Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom );
47
- } );
48
- } );
49
-
50
- printPage.onCallback = function( data ) {
51
- // For some reason we need to "jump the queue" for syntax highlighting to work.
52
- // See: http://stackoverflow.com/a/3580132/129269
53
- setTimeout( function() {
54
- console.log( 'Export PDF: Writing file [4/4]' );
55
- printPage.render( outputFile );
56
- console.log( 'Export PDF: Finished successfully!' );
57
- phantom.exit();
58
- }, 0 );
59
- };
60
- }
61
- else {
62
-
63
- console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' );
64
- phantom.exit( 1 );
65
-
66
- }
67
- } );
@@ -1,243 +0,0 @@
1
- /*!
2
- * Handles finding a text string anywhere in the slides and showing the next occurrence to the user
3
- * by navigatating to that slide and highlighting it.
4
- *
5
- * @author Jon Snyder <snyder.jon@gmail.com>, February 2013
6
- */
7
-
8
- const Plugin = () => {
9
-
10
- // The reveal.js instance this plugin is attached to
11
- let deck;
12
-
13
- let searchElement;
14
- let searchButton;
15
- let searchInput;
16
-
17
- let matchedSlides;
18
- let currentMatchedIndex;
19
- let searchboxDirty;
20
- let hilitor;
21
-
22
- function render() {
23
-
24
- searchElement = document.createElement( 'div' );
25
- searchElement.classList.add( 'searchbox' );
26
- searchElement.style.position = 'absolute';
27
- searchElement.style.top = '10px';
28
- searchElement.style.right = '10px';
29
- searchElement.style.zIndex = 10;
30
-
31
- //embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/:
32
- searchElement.innerHTML = `<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>
33
- </span>`;
34
-
35
- searchInput = searchElement.querySelector( '.searchinput' );
36
- searchInput.style.width = '240px';
37
- searchInput.style.fontSize = '14px';
38
- searchInput.style.padding = '4px 6px';
39
- searchInput.style.color = '#000';
40
- searchInput.style.background = '#fff';
41
- searchInput.style.borderRadius = '2px';
42
- searchInput.style.border = '0';
43
- searchInput.style.outline = '0';
44
- searchInput.style.boxShadow = '0 2px 18px rgba(0, 0, 0, 0.2)';
45
- searchInput.style['-webkit-appearance'] = 'none';
46
-
47
- deck.getRevealElement().appendChild( searchElement );
48
-
49
- // searchButton.addEventListener( 'click', function(event) {
50
- // doSearch();
51
- // }, false );
52
-
53
- searchInput.addEventListener( 'keyup', function( event ) {
54
- switch (event.keyCode) {
55
- case 13:
56
- event.preventDefault();
57
- doSearch();
58
- searchboxDirty = false;
59
- break;
60
- default:
61
- searchboxDirty = true;
62
- }
63
- }, false );
64
-
65
- closeSearch();
66
-
67
- }
68
-
69
- function openSearch() {
70
- if( !searchElement ) render();
71
-
72
- searchElement.style.display = 'inline';
73
- searchInput.focus();
74
- searchInput.select();
75
- }
76
-
77
- function closeSearch() {
78
- if( !searchElement ) render();
79
-
80
- searchElement.style.display = 'none';
81
- if(hilitor) hilitor.remove();
82
- }
83
-
84
- function toggleSearch() {
85
- if( !searchElement ) render();
86
-
87
- if (searchElement.style.display !== 'inline') {
88
- openSearch();
89
- }
90
- else {
91
- closeSearch();
92
- }
93
- }
94
-
95
- function doSearch() {
96
- //if there's been a change in the search term, perform a new search:
97
- if (searchboxDirty) {
98
- var searchstring = searchInput.value;
99
-
100
- if (searchstring === '') {
101
- if(hilitor) hilitor.remove();
102
- matchedSlides = null;
103
- }
104
- else {
105
- //find the keyword amongst the slides
106
- hilitor = new Hilitor("slidecontent");
107
- matchedSlides = hilitor.apply(searchstring);
108
- currentMatchedIndex = 0;
109
- }
110
- }
111
-
112
- if (matchedSlides) {
113
- //navigate to the next slide that has the keyword, wrapping to the first if necessary
114
- if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) {
115
- currentMatchedIndex = 0;
116
- }
117
- if (matchedSlides.length > currentMatchedIndex) {
118
- deck.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v);
119
- currentMatchedIndex++;
120
- }
121
- }
122
- }
123
-
124
- // Original JavaScript code by Chirp Internet: www.chirp.com.au
125
- // Please acknowledge use of this code by including this header.
126
- // 2/2013 jon: modified regex to display any match, not restricted to word boundaries.
127
- function Hilitor(id, tag) {
128
-
129
- var targetNode = document.getElementById(id) || document.body;
130
- var hiliteTag = tag || "EM";
131
- var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM)$");
132
- var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"];
133
- var wordColor = [];
134
- var colorIdx = 0;
135
- var matchRegex = "";
136
- var matchingSlides = [];
137
-
138
- this.setRegex = function(input)
139
- {
140
- input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|");
141
- matchRegex = new RegExp("(" + input + ")","i");
142
- }
143
-
144
- this.getRegex = function()
145
- {
146
- return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " ");
147
- }
148
-
149
- // recursively apply word highlighting
150
- this.hiliteWords = function(node)
151
- {
152
- if(node == undefined || !node) return;
153
- if(!matchRegex) return;
154
- if(skipTags.test(node.nodeName)) return;
155
-
156
- if(node.hasChildNodes()) {
157
- for(var i=0; i < node.childNodes.length; i++)
158
- this.hiliteWords(node.childNodes[i]);
159
- }
160
- if(node.nodeType == 3) { // NODE_TEXT
161
- var nv, regs;
162
- if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) {
163
- //find the slide's section element and save it in our list of matching slides
164
- var secnode = node;
165
- while (secnode != null && secnode.nodeName != 'SECTION') {
166
- secnode = secnode.parentNode;
167
- }
168
-
169
- var slideIndex = deck.getIndices(secnode);
170
- var slidelen = matchingSlides.length;
171
- var alreadyAdded = false;
172
- for (var i=0; i < slidelen; i++) {
173
- if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) {
174
- alreadyAdded = true;
175
- }
176
- }
177
- if (! alreadyAdded) {
178
- matchingSlides.push(slideIndex);
179
- }
180
-
181
- if(!wordColor[regs[0].toLowerCase()]) {
182
- wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length];
183
- }
184
-
185
- var match = document.createElement(hiliteTag);
186
- match.appendChild(document.createTextNode(regs[0]));
187
- match.style.backgroundColor = wordColor[regs[0].toLowerCase()];
188
- match.style.fontStyle = "inherit";
189
- match.style.color = "#000";
190
-
191
- var after = node.splitText(regs.index);
192
- after.nodeValue = after.nodeValue.substring(regs[0].length);
193
- node.parentNode.insertBefore(match, after);
194
- }
195
- }
196
- };
197
-
198
- // remove highlighting
199
- this.remove = function()
200
- {
201
- var arr = document.getElementsByTagName(hiliteTag);
202
- var el;
203
- while(arr.length && (el = arr[0])) {
204
- el.parentNode.replaceChild(el.firstChild, el);
205
- }
206
- };
207
-
208
- // start highlighting at target node
209
- this.apply = function(input)
210
- {
211
- if(input == undefined || !input) return;
212
- this.remove();
213
- this.setRegex(input);
214
- this.hiliteWords(targetNode);
215
- return matchingSlides;
216
- };
217
-
218
- }
219
-
220
- return {
221
-
222
- id: 'search',
223
-
224
- init: reveal => {
225
-
226
- deck = reveal;
227
- deck.registerKeyboardShortcut( 'CTRL + Shift + F', 'Search' );
228
-
229
- document.addEventListener( 'keydown', function( event ) {
230
- if( event.key == "F" && (event.ctrlKey || event.metaKey) ) { //Control+Shift+f
231
- event.preventDefault();
232
- toggleSearch();
233
- }
234
- }, false );
235
-
236
- },
237
-
238
- open: openSearch
239
-
240
- }
241
- };
242
-
243
- export default Plugin;
@@ -1,7 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealSearch=t()}(this,(function(){"use strict";
2
- /*!
3
- * Handles finding a text string anywhere in the slides and showing the next occurrence to the user
4
- * by navigatating to that slide and highlighting it.
5
- *
6
- * @author Jon Snyder <snyder.jon@gmail.com>, February 2013
7
- */return()=>{let e,t,n,l,o,i,r;function s(){t=document.createElement("div"),t.classList.add("searchbox"),t.style.position="absolute",t.style.top="10px",t.style.right="10px",t.style.zIndex=10,t.innerHTML='<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>\n\t\t</span>',n=t.querySelector(".searchinput"),n.style.width="240px",n.style.fontSize="14px",n.style.padding="4px 6px",n.style.color="#000",n.style.background="#fff",n.style.borderRadius="2px",n.style.border="0",n.style.outline="0",n.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",n.style["-webkit-appearance"]="none",e.getRevealElement().appendChild(t),n.addEventListener("keyup",(function(t){if(13===t.keyCode)t.preventDefault(),function(){if(i){var t=n.value;""===t?(r&&r.remove(),l=null):(r=new c("slidecontent"),l=r.apply(t),o=0)}l&&(l.length&&l.length<=o&&(o=0),l.length>o&&(e.slide(l[o].h,l[o].v),o++))}(),i=!1;else i=!0}),!1),d()}function a(){t||s(),t.style.display="inline",n.focus(),n.select()}function d(){t||s(),t.style.display="none",r&&r.remove()}function c(t,n){var l=document.getElementById(t)||document.body,o=n||"EM",i=new RegExp("^(?:"+o+"|SCRIPT|FORM)$"),r=["#ff6","#a0ffff","#9f9","#f99","#f6f"],s=[],a=0,d="",c=[];this.setRegex=function(e){e=e.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w'-]+/g,"|"),d=new RegExp("("+e+")","i")},this.getRegex=function(){return d.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(t){if(null!=t&&t&&d&&!i.test(t.nodeName)){if(t.hasChildNodes())for(var n=0;n<t.childNodes.length;n++)this.hiliteWords(t.childNodes[n]);var l,f;if(3==t.nodeType)if((l=t.nodeValue)&&(f=d.exec(l))){for(var p=t;null!=p&&"SECTION"!=p.nodeName;)p=p.parentNode;var u=e.getIndices(p),h=c.length,y=!1;for(n=0;n<h;n++)c[n].h===u.h&&c[n].v===u.v&&(y=!0);y||c.push(u),s[f[0].toLowerCase()]||(s[f[0].toLowerCase()]=r[a++%r.length]);var g=document.createElement(o);g.appendChild(document.createTextNode(f[0])),g.style.backgroundColor=s[f[0].toLowerCase()],g.style.fontStyle="inherit",g.style.color="#000";var v=t.splitText(f.index);v.nodeValue=v.nodeValue.substring(f[0].length),t.parentNode.insertBefore(g,v)}}},this.remove=function(){for(var e,t=document.getElementsByTagName(o);t.length&&(e=t[0]);)e.parentNode.replaceChild(e.firstChild,e)},this.apply=function(e){if(null!=e&&e)return this.remove(),this.setRegex(e),this.hiliteWords(l),c}}return{id:"search",init:n=>{e=n,e.registerKeyboardShortcut("CTRL + Shift + F","Search"),document.addEventListener("keydown",(function(e){"F"==e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),t||s(),"inline"!==t.style.display?a():d())}),!1)},open:a}}}));
@@ -1,264 +0,0 @@
1
- /*!
2
- * reveal.js Zoom plugin
3
- */
4
- const Plugin = {
5
-
6
- id: 'zoom',
7
-
8
- init: function( reveal ) {
9
-
10
- reveal.getRevealElement().addEventListener( 'mousedown', function( event ) {
11
- var defaultModifier = /Linux/.test( window.navigator.platform ) ? 'ctrl' : 'alt';
12
-
13
- var modifier = ( reveal.getConfig().zoomKey ? reveal.getConfig().zoomKey : defaultModifier ) + 'Key';
14
- var zoomLevel = ( reveal.getConfig().zoomLevel ? reveal.getConfig().zoomLevel : 2 );
15
-
16
- if( event[ modifier ] && !reveal.isOverview() ) {
17
- event.preventDefault();
18
-
19
- zoom.to({
20
- x: event.clientX,
21
- y: event.clientY,
22
- scale: zoomLevel,
23
- pan: false
24
- });
25
- }
26
- } );
27
-
28
- },
29
-
30
- destroy: () => {
31
-
32
- zoom.reset();
33
-
34
- }
35
-
36
- };
37
-
38
- export default () => Plugin;
39
-
40
- /*!
41
- * zoom.js 0.3 (modified for use with reveal.js)
42
- * http://lab.hakim.se/zoom-js
43
- * MIT licensed
44
- *
45
- * Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se
46
- */
47
- var zoom = (function(){
48
-
49
- // The current zoom level (scale)
50
- var level = 1;
51
-
52
- // The current mouse position, used for panning
53
- var mouseX = 0,
54
- mouseY = 0;
55
-
56
- // Timeout before pan is activated
57
- var panEngageTimeout = -1,
58
- panUpdateInterval = -1;
59
-
60
- // Check for transform support so that we can fallback otherwise
61
- var supportsTransforms = 'transform' in document.body.style;
62
-
63
- if( supportsTransforms ) {
64
- // The easing that will be applied when we zoom in/out
65
- document.body.style.transition = 'transform 0.8s ease';
66
- }
67
-
68
- // Zoom out if the user hits escape
69
- document.addEventListener( 'keyup', function( event ) {
70
- if( level !== 1 && event.keyCode === 27 ) {
71
- zoom.out();
72
- }
73
- } );
74
-
75
- // Monitor mouse movement for panning
76
- document.addEventListener( 'mousemove', function( event ) {
77
- if( level !== 1 ) {
78
- mouseX = event.clientX;
79
- mouseY = event.clientY;
80
- }
81
- } );
82
-
83
- /**
84
- * Applies the CSS required to zoom in, prefers the use of CSS3
85
- * transforms but falls back on zoom for IE.
86
- *
87
- * @param {Object} rect
88
- * @param {Number} scale
89
- */
90
- function magnify( rect, scale ) {
91
-
92
- var scrollOffset = getScrollOffset();
93
-
94
- // Ensure a width/height is set
95
- rect.width = rect.width || 1;
96
- rect.height = rect.height || 1;
97
-
98
- // Center the rect within the zoomed viewport
99
- rect.x -= ( window.innerWidth - ( rect.width * scale ) ) / 2;
100
- rect.y -= ( window.innerHeight - ( rect.height * scale ) ) / 2;
101
-
102
- if( supportsTransforms ) {
103
- // Reset
104
- if( scale === 1 ) {
105
- document.body.style.transform = '';
106
- }
107
- // Scale
108
- else {
109
- var origin = scrollOffset.x +'px '+ scrollOffset.y +'px',
110
- transform = 'translate('+ -rect.x +'px,'+ -rect.y +'px) scale('+ scale +')';
111
-
112
- document.body.style.transformOrigin = origin;
113
- document.body.style.transform = transform;
114
- }
115
- }
116
- else {
117
- // Reset
118
- if( scale === 1 ) {
119
- document.body.style.position = '';
120
- document.body.style.left = '';
121
- document.body.style.top = '';
122
- document.body.style.width = '';
123
- document.body.style.height = '';
124
- document.body.style.zoom = '';
125
- }
126
- // Scale
127
- else {
128
- document.body.style.position = 'relative';
129
- document.body.style.left = ( - ( scrollOffset.x + rect.x ) / scale ) + 'px';
130
- document.body.style.top = ( - ( scrollOffset.y + rect.y ) / scale ) + 'px';
131
- document.body.style.width = ( scale * 100 ) + '%';
132
- document.body.style.height = ( scale * 100 ) + '%';
133
- document.body.style.zoom = scale;
134
- }
135
- }
136
-
137
- level = scale;
138
-
139
- if( document.documentElement.classList ) {
140
- if( level !== 1 ) {
141
- document.documentElement.classList.add( 'zoomed' );
142
- }
143
- else {
144
- document.documentElement.classList.remove( 'zoomed' );
145
- }
146
- }
147
- }
148
-
149
- /**
150
- * Pan the document when the mosue cursor approaches the edges
151
- * of the window.
152
- */
153
- function pan() {
154
- var range = 0.12,
155
- rangeX = window.innerWidth * range,
156
- rangeY = window.innerHeight * range,
157
- scrollOffset = getScrollOffset();
158
-
159
- // Up
160
- if( mouseY < rangeY ) {
161
- window.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) );
162
- }
163
- // Down
164
- else if( mouseY > window.innerHeight - rangeY ) {
165
- window.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) );
166
- }
167
-
168
- // Left
169
- if( mouseX < rangeX ) {
170
- window.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y );
171
- }
172
- // Right
173
- else if( mouseX > window.innerWidth - rangeX ) {
174
- window.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y );
175
- }
176
- }
177
-
178
- function getScrollOffset() {
179
- return {
180
- x: window.scrollX !== undefined ? window.scrollX : window.pageXOffset,
181
- y: window.scrollY !== undefined ? window.scrollY : window.pageYOffset
182
- }
183
- }
184
-
185
- return {
186
- /**
187
- * Zooms in on either a rectangle or HTML element.
188
- *
189
- * @param {Object} options
190
- * - element: HTML element to zoom in on
191
- * OR
192
- * - x/y: coordinates in non-transformed space to zoom in on
193
- * - width/height: the portion of the screen to zoom in on
194
- * - scale: can be used instead of width/height to explicitly set scale
195
- */
196
- to: function( options ) {
197
-
198
- // Due to an implementation limitation we can't zoom in
199
- // to another element without zooming out first
200
- if( level !== 1 ) {
201
- zoom.out();
202
- }
203
- else {
204
- options.x = options.x || 0;
205
- options.y = options.y || 0;
206
-
207
- // If an element is set, that takes precedence
208
- if( !!options.element ) {
209
- // Space around the zoomed in element to leave on screen
210
- var padding = 20;
211
- var bounds = options.element.getBoundingClientRect();
212
-
213
- options.x = bounds.left - padding;
214
- options.y = bounds.top - padding;
215
- options.width = bounds.width + ( padding * 2 );
216
- options.height = bounds.height + ( padding * 2 );
217
- }
218
-
219
- // If width/height values are set, calculate scale from those values
220
- if( options.width !== undefined && options.height !== undefined ) {
221
- options.scale = Math.max( Math.min( window.innerWidth / options.width, window.innerHeight / options.height ), 1 );
222
- }
223
-
224
- if( options.scale > 1 ) {
225
- options.x *= options.scale;
226
- options.y *= options.scale;
227
-
228
- magnify( options, options.scale );
229
-
230
- if( options.pan !== false ) {
231
-
232
- // Wait with engaging panning as it may conflict with the
233
- // zoom transition
234
- panEngageTimeout = setTimeout( function() {
235
- panUpdateInterval = setInterval( pan, 1000 / 60 );
236
- }, 800 );
237
-
238
- }
239
- }
240
- }
241
- },
242
-
243
- /**
244
- * Resets the document zoom state to its default.
245
- */
246
- out: function() {
247
- clearTimeout( panEngageTimeout );
248
- clearInterval( panUpdateInterval );
249
-
250
- magnify( { x: 0, y: 0 }, 1 );
251
-
252
- level = 1;
253
- },
254
-
255
- // Alias
256
- magnify: function( options ) { this.to( options ) },
257
- reset: function() { this.out() },
258
-
259
- zoomLevel: function() {
260
- return level;
261
- }
262
- }
263
-
264
- })();
@@ -1,11 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).RevealZoom=t()}(this,(function(){"use strict";
2
- /*!
3
- * reveal.js Zoom plugin
4
- */const e={id:"zoom",init:function(e){e.getRevealElement().addEventListener("mousedown",(function(o){var n=/Linux/.test(window.navigator.platform)?"ctrl":"alt",i=(e.getConfig().zoomKey?e.getConfig().zoomKey:n)+"Key",d=e.getConfig().zoomLevel?e.getConfig().zoomLevel:2;o[i]&&!e.isOverview()&&(o.preventDefault(),t.to({x:o.clientX,y:o.clientY,scale:d,pan:!1}))}))},destroy:()=>{t.reset()}};var t=function(){var e=1,o=0,n=0,i=-1,d=-1,l="transform"in document.body.style;function s(t,o){var n=r();if(t.width=t.width||1,t.height=t.height||1,t.x-=(window.innerWidth-t.width*o)/2,t.y-=(window.innerHeight-t.height*o)/2,l)if(1===o)document.body.style.transform="";else{var i=n.x+"px "+n.y+"px",d="translate("+-t.x+"px,"+-t.y+"px) scale("+o+")";document.body.style.transformOrigin=i,document.body.style.transform=d}else 1===o?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(n.x+t.x)/o+"px",document.body.style.top=-(n.y+t.y)/o+"px",document.body.style.width=100*o+"%",document.body.style.height=100*o+"%",document.body.style.zoom=o);e=o,document.documentElement.classList&&(1!==e?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function c(){var t=.12*window.innerWidth,i=.12*window.innerHeight,d=r();n<i?window.scroll(d.x,d.y-14/e*(1-n/i)):n>window.innerHeight-i&&window.scroll(d.x,d.y+(1-(window.innerHeight-n)/i)*(14/e)),o<t?window.scroll(d.x-14/e*(1-o/t),d.y):o>window.innerWidth-t&&window.scroll(d.x+(1-(window.innerWidth-o)/t)*(14/e),d.y)}function r(){return{x:void 0!==window.scrollX?window.scrollX:window.pageXOffset,y:void 0!==window.scrollY?window.scrollY:window.pageYOffset}}return l&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",(function(o){1!==e&&27===o.keyCode&&t.out()})),document.addEventListener("mousemove",(function(t){1!==e&&(o=t.clientX,n=t.clientY)})),{to:function(o){if(1!==e)t.out();else{if(o.x=o.x||0,o.y=o.y||0,o.element){var n=o.element.getBoundingClientRect();o.x=n.left-20,o.y=n.top-20,o.width=n.width+40,o.height=n.height+40}void 0!==o.width&&void 0!==o.height&&(o.scale=Math.max(Math.min(window.innerWidth/o.width,window.innerHeight/o.height),1)),o.scale>1&&(o.x*=o.scale,o.y*=o.scale,s(o,o.scale),!1!==o.pan&&(i=setTimeout((function(){d=setInterval(c,1e3/60)}),800)))}},out:function(){clearTimeout(i),clearInterval(d),s({x:0,y:0},1),e=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return e}}}();
5
- /*!
6
- * zoom.js 0.3 (modified for use with reveal.js)
7
- * http://lab.hakim.se/zoom-js
8
- * MIT licensed
9
- *
10
- * Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se
11
- */return()=>e}));