update packages and add valign
This commit is contained in:
40
scripts/reveal.js/dist/plugin/highlight.d.ts
vendored
Normal file
40
scripts/reveal.js/dist/plugin/highlight.d.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import { HLJSApi } from 'highlight.js';
|
||||
import { RevealPlugin } from 'reveal.js';
|
||||
export interface HighlightLine {
|
||||
start?: number;
|
||||
end?: number;
|
||||
}
|
||||
export interface HighlightLineNumbersOptions {
|
||||
singleLine?: boolean;
|
||||
startFrom?: number;
|
||||
}
|
||||
export interface HighlightJsApi extends HLJSApi {
|
||||
initLineNumbersOnLoad(options?: HighlightLineNumbersOptions): void;
|
||||
lineNumbersBlock(element: HTMLElement, options?: HighlightLineNumbersOptions): void;
|
||||
lineNumbersValue(code: string, options?: HighlightLineNumbersOptions): string | undefined;
|
||||
}
|
||||
export interface HighlightScrollState {
|
||||
currentBlock?: HTMLElement;
|
||||
animationFrameID?: number;
|
||||
}
|
||||
export interface HighlightLineBounds {
|
||||
top: number;
|
||||
bottom: number;
|
||||
}
|
||||
export type HighlightLineStep = HighlightLine[];
|
||||
export interface HighlightPlugin extends RevealPlugin {
|
||||
id: 'highlight';
|
||||
HIGHLIGHT_STEP_DELIMITER: '|';
|
||||
HIGHLIGHT_LINE_DELIMITER: ',';
|
||||
HIGHLIGHT_LINE_RANGE_DELIMITER: '-';
|
||||
hljs: HighlightJsApi;
|
||||
highlightBlock(block: HTMLElement): void;
|
||||
scrollHighlightedLineIntoView(block: HTMLElement, scrollState: HighlightScrollState, skipAnimation?: boolean): void;
|
||||
easeInOutQuart(t: number): number;
|
||||
getHighlightedLineBounds(block: HTMLElement): HighlightLineBounds;
|
||||
highlightLines(block: HTMLElement, linesToHighlight?: string): void;
|
||||
deserializeHighlightSteps(highlightSteps: string): HighlightLineStep[];
|
||||
serializeHighlightSteps(highlightSteps: HighlightLineStep[]): string;
|
||||
}
|
||||
declare const Highlight: () => HighlightPlugin;
|
||||
export default Highlight;
|
||||
17
scripts/reveal.js/dist/plugin/highlight.js
vendored
Normal file
17
scripts/reveal.js/dist/plugin/highlight.js
vendored
Normal file
File diff suppressed because one or more lines are too long
49449
scripts/reveal.js/dist/plugin/highlight.mjs
vendored
Normal file
49449
scripts/reveal.js/dist/plugin/highlight.mjs
vendored
Normal file
File diff suppressed because one or more lines are too long
71
scripts/reveal.js/dist/plugin/highlight/monokai.css
vendored
Normal file
71
scripts/reveal.js/dist/plugin/highlight/monokai.css
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Monokai style - ported by Luigi Maselli - http://grigio.org
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #272822;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-strong,
|
||||
.hljs-name {
|
||||
color: #f92672;
|
||||
}
|
||||
|
||||
.hljs-code {
|
||||
color: #66d9ef;
|
||||
}
|
||||
|
||||
.hljs-class .hljs-title {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #bf79db;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-bullet,
|
||||
.hljs-subst,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-emphasis,
|
||||
.hljs-type,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #a6e22e;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-deletion,
|
||||
.hljs-meta {
|
||||
color: #75715e;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-doctag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-selector-id {
|
||||
font-weight: bold;
|
||||
}
|
||||
79
scripts/reveal.js/dist/plugin/highlight/zenburn.css
vendored
Normal file
79
scripts/reveal.js/dist/plugin/highlight/zenburn.css
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
|
||||
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
|
||||
based on dark.css by Ivan Sagalaev
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #3f3f3f;
|
||||
color: #dcdcdc;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-tag {
|
||||
color: #e3ceab;
|
||||
}
|
||||
|
||||
.hljs-template-tag {
|
||||
color: #dcdcdc;
|
||||
}
|
||||
|
||||
.hljs-number {
|
||||
color: #8cd0d3;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute {
|
||||
color: #efdcbc;
|
||||
}
|
||||
|
||||
.hljs-literal {
|
||||
color: #efefaf;
|
||||
}
|
||||
|
||||
.hljs-subst {
|
||||
color: #8f8f8f;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-section,
|
||||
.hljs-type {
|
||||
color: #efef8f;
|
||||
}
|
||||
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-link {
|
||||
color: #dca3a3;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-string,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name {
|
||||
color: #cc9393;
|
||||
}
|
||||
|
||||
.hljs-addition,
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-meta {
|
||||
color: #7f9f7f;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
21
scripts/reveal.js/dist/plugin/markdown.d.ts
vendored
Normal file
21
scripts/reveal.js/dist/plugin/markdown.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { MarkdownConfig, RevealPlugin } from 'reveal.js';
|
||||
import { Marked } from 'marked';
|
||||
export interface MarkdownSlidifyOptions {
|
||||
separator?: string | null;
|
||||
verticalSeparator?: string | null;
|
||||
notesSeparator?: string;
|
||||
attributes?: string;
|
||||
}
|
||||
export interface MarkdownOptions extends MarkdownConfig {
|
||||
animateLists?: boolean;
|
||||
}
|
||||
export interface MarkdownPlugin extends RevealPlugin {
|
||||
id: 'markdown';
|
||||
processSlides(scope: ParentNode): Promise<void[]>;
|
||||
convertSlides(): Promise<void>;
|
||||
slidify(markdown: string, options?: MarkdownSlidifyOptions): string;
|
||||
readonly marked: Marked | null;
|
||||
readonly markdownOptions: MarkdownOptions;
|
||||
}
|
||||
declare const Markdown: () => MarkdownPlugin;
|
||||
export default Markdown;
|
||||
63
scripts/reveal.js/dist/plugin/markdown.js
vendored
Normal file
63
scripts/reveal.js/dist/plugin/markdown.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1380
scripts/reveal.js/dist/plugin/markdown.mjs
vendored
Normal file
1380
scripts/reveal.js/dist/plugin/markdown.mjs
vendored
Normal file
File diff suppressed because one or more lines are too long
21
scripts/reveal.js/dist/plugin/math.d.ts
vendored
Normal file
21
scripts/reveal.js/dist/plugin/math.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { RevealPlugin } from 'reveal.js';
|
||||
export interface KaTeXPlugin extends RevealPlugin {
|
||||
id: 'katex';
|
||||
}
|
||||
export interface MathJax2Plugin extends RevealPlugin {
|
||||
id: 'mathjax2';
|
||||
}
|
||||
export interface MathJax3Plugin extends RevealPlugin {
|
||||
id: 'mathjax3';
|
||||
}
|
||||
export interface MathJax4Plugin extends RevealPlugin {
|
||||
id: 'mathjax4';
|
||||
}
|
||||
export interface MathPlugin extends MathJax2Plugin {
|
||||
KaTeX: () => KaTeXPlugin;
|
||||
MathJax2: () => MathJax2Plugin;
|
||||
MathJax3: () => MathJax3Plugin;
|
||||
MathJax4: () => MathJax4Plugin;
|
||||
}
|
||||
declare const Math: MathPlugin;
|
||||
export default Math;
|
||||
1
scripts/reveal.js/dist/plugin/math.js
vendored
Normal file
1
scripts/reveal.js/dist/plugin/math.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(d,p){typeof exports=="object"&&typeof module<"u"?module.exports=p():typeof define=="function"&&define.amd?define(p):(d=typeof globalThis<"u"?globalThis:d||self,d.RevealMath=p())})(this,(function(){"use strict";const d=()=>{let n,s={version:"latest",delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],ignoredTags:["script","noscript","style","textarea","pre","code"]};const r=t=>{let a=document.createElement("link");a.rel="stylesheet",a.href=t,document.head.appendChild(a)},o=t=>new Promise((a,i)=>{const l=document.createElement("script");l.type="text/javascript",l.onload=a,l.onerror=i,l.src=t,document.head.append(l)});async function e(t){for(const a of t)await o(a)}return{id:"katex",init:function(t){n=t;let a=n.getConfig().katex||{},i={...s,...a};const{local:l,version:x,extensions:$,...g}=i;let c=i.local||"https://cdn.jsdelivr.net/npm/katex",u=i.local?"":"@"+i.version,M=c+u+"/dist/katex.min.css",J=c+u+"/dist/katex.min.js",v=c+u+"/dist/contrib/mhchem.min.js",S=c+u+"/dist/contrib/auto-render.min.js",h=[J];i.extensions&&i.extensions.includes("mhchem")&&h.push(v),h.push(S);const m=()=>{renderMathInElement(t.getSlidesElement(),g),n.layout()};r(M),e(h).then(()=>{n.isReady()?m():n.on("ready",m.bind(this))})}}},p=()=>{let n,s={messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]],skipTags:["script","noscript","style","textarea","pre","code"]},skipStartupTypeset:!0};function r(o,e){let t=document.querySelector("head"),a=document.createElement("script");a.type="text/javascript",a.src=o;let i=()=>{typeof e=="function"&&(e.call(),e=null)};a.onload=i,a.onreadystatechange=()=>{this.readyState==="loaded"&&i()},t.appendChild(a)}return{id:"mathjax2",init:function(o){n=o;let e=n.getConfig().mathjax2||n.getConfig().math||{},t={...s,...e},a=t.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js",i=t.config||"TeX-AMS_HTML-full",l=a+"?config="+i;t.tex2jax={...s.tex2jax,...e.tex2jax},t.mathjax=t.config=null,r(l,function(){MathJax.Hub.Config(t),MathJax.Hub.Queue(["Typeset",MathJax.Hub,n.getRevealElement()]),MathJax.Hub.Queue(n.layout),n.on("slidechanged",function(x){MathJax.Hub.Queue(["Typeset",MathJax.Hub,x.currentSlide])})})}}},f=()=>{let n,s={tex:{inlineMath:[["$","$"],["\\(","\\)"]]},options:{skipHtmlTags:["script","noscript","style","textarea","pre","code"]},startup:{ready:()=>{MathJax.startup.defaultReady(),MathJax.startup.promise.then(()=>{n.layout()})}}};function r(o,e){let t=document.createElement("script");t.type="text/javascript",t.id="MathJax-script",t.src=o,t.async=!0,t.onload=()=>{typeof e=="function"&&(e.call(),e=null)},document.head.appendChild(t)}return{id:"mathjax3",init:function(o){n=o;let e=n.getConfig().mathjax3||{},t={...s,...e};t.tex={...s.tex,...e.tex},t.options={...s.options,...e.options},t.startup={...s.startup,...e.startup};let a=t.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";t.mathjax=null,window.MathJax=t,r(a,function(){n.addEventListener("slidechanged",function(i){MathJax.typeset()})})}}},y=()=>{let n,s={tex:{inlineMath:[["$","$"],["\\(","\\)"]]},options:{skipHtmlTags:["script","noscript","style","textarea","pre","code"]},startup:{ready:()=>{MathJax.startup.defaultReady(),MathJax.startup.promise.then(()=>{n.layout()})}}};function r(o,e){let t=document.createElement("script");t.type="text/javascript",t.id="MathJax-script",t.src=o,t.async=!0,t.onload=()=>{typeof e=="function"&&(e.call(),e=null)},document.head.appendChild(t)}return{id:"mathjax4",init:function(o){n=o;let e=n.getConfig().mathjax4||{},t={...s,...e};t.tex={...s.tex,...e.tex},t.options={...s.options,...e.options},t.startup={...s.startup,...e.startup};let a=t.mathjax||"https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js";t.mathjax=null,window.MathJax=t,r(a,function(){MathJax.startup.promise.then(()=>{MathJax.typeset(),n.addEventListener("slidechanged",function(i){MathJax.typeset()})})})}}},j=p;return Plugin=Object.assign(j(),{KaTeX:d,MathJax2:p,MathJax3:f,MathJax4:y})}));
|
||||
154
scripts/reveal.js/dist/plugin/math.mjs
vendored
Normal file
154
scripts/reveal.js/dist/plugin/math.mjs
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
const M = () => {
|
||||
let a, s = {
|
||||
version: "latest",
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: !0 },
|
||||
// Note: $$ has to come before $
|
||||
{ left: "$", right: "$", display: !1 },
|
||||
{ left: "\\(", right: "\\)", display: !1 },
|
||||
{ left: "\\[", right: "\\]", display: !0 }
|
||||
],
|
||||
ignoredTags: ["script", "noscript", "style", "textarea", "pre", "code"]
|
||||
};
|
||||
const r = (t) => {
|
||||
let n = document.createElement("link");
|
||||
n.rel = "stylesheet", n.href = t, document.head.appendChild(n);
|
||||
}, o = (t) => new Promise((n, i) => {
|
||||
const l = document.createElement("script");
|
||||
l.type = "text/javascript", l.onload = n, l.onerror = i, l.src = t, document.head.append(l);
|
||||
});
|
||||
async function e(t) {
|
||||
for (const n of t)
|
||||
await o(n);
|
||||
}
|
||||
return {
|
||||
id: "katex",
|
||||
init: function(t) {
|
||||
a = t;
|
||||
let n = a.getConfig().katex || {}, i = { ...s, ...n };
|
||||
const { local: l, version: u, extensions: $, ...m } = i;
|
||||
let p = i.local || "https://cdn.jsdelivr.net/npm/katex", c = i.local ? "" : "@" + i.version, f = p + c + "/dist/katex.min.css", y = p + c + "/dist/katex.min.js", j = p + c + "/dist/contrib/mhchem.min.js", g = p + c + "/dist/contrib/auto-render.min.js", d = [y];
|
||||
i.extensions && i.extensions.includes("mhchem") && d.push(j), d.push(g);
|
||||
const h = () => {
|
||||
renderMathInElement(t.getSlidesElement(), m), a.layout();
|
||||
};
|
||||
r(f), e(d).then(() => {
|
||||
a.isReady() ? h() : a.on("ready", h.bind(this));
|
||||
});
|
||||
}
|
||||
};
|
||||
}, x = () => {
|
||||
let a, s = {
|
||||
messageStyle: "none",
|
||||
tex2jax: {
|
||||
inlineMath: [["$", "$"], ["\\(", "\\)"]],
|
||||
skipTags: ["script", "noscript", "style", "textarea", "pre", "code"]
|
||||
},
|
||||
skipStartupTypeset: !0
|
||||
};
|
||||
function r(o, e) {
|
||||
let t = document.querySelector("head"), n = document.createElement("script");
|
||||
n.type = "text/javascript", n.src = o;
|
||||
let i = () => {
|
||||
typeof e == "function" && (e.call(), e = null);
|
||||
};
|
||||
n.onload = i, n.onreadystatechange = () => {
|
||||
this.readyState === "loaded" && i();
|
||||
}, t.appendChild(n);
|
||||
}
|
||||
return {
|
||||
id: "mathjax2",
|
||||
init: function(o) {
|
||||
a = o;
|
||||
let e = a.getConfig().mathjax2 || a.getConfig().math || {}, t = { ...s, ...e }, n = t.mathjax || "https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js", i = t.config || "TeX-AMS_HTML-full", l = n + "?config=" + i;
|
||||
t.tex2jax = { ...s.tex2jax, ...e.tex2jax }, t.mathjax = t.config = null, r(l, function() {
|
||||
MathJax.Hub.Config(t), MathJax.Hub.Queue(["Typeset", MathJax.Hub, a.getRevealElement()]), MathJax.Hub.Queue(a.layout), a.on("slidechanged", function(u) {
|
||||
MathJax.Hub.Queue(["Typeset", MathJax.Hub, u.currentSlide]);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}, J = () => {
|
||||
let a, s = {
|
||||
tex: {
|
||||
inlineMath: [["$", "$"], ["\\(", "\\)"]]
|
||||
},
|
||||
options: {
|
||||
skipHtmlTags: ["script", "noscript", "style", "textarea", "pre", "code"]
|
||||
},
|
||||
startup: {
|
||||
ready: () => {
|
||||
MathJax.startup.defaultReady(), MathJax.startup.promise.then(() => {
|
||||
a.layout();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function r(o, e) {
|
||||
let t = document.createElement("script");
|
||||
t.type = "text/javascript", t.id = "MathJax-script", t.src = o, t.async = !0, t.onload = () => {
|
||||
typeof e == "function" && (e.call(), e = null);
|
||||
}, document.head.appendChild(t);
|
||||
}
|
||||
return {
|
||||
id: "mathjax3",
|
||||
init: function(o) {
|
||||
a = o;
|
||||
let e = a.getConfig().mathjax3 || {}, t = { ...s, ...e };
|
||||
t.tex = { ...s.tex, ...e.tex }, t.options = { ...s.options, ...e.options }, t.startup = { ...s.startup, ...e.startup };
|
||||
let n = t.mathjax || "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js";
|
||||
t.mathjax = null, window.MathJax = t, r(n, function() {
|
||||
a.addEventListener("slidechanged", function(i) {
|
||||
MathJax.typeset();
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}, v = () => {
|
||||
let a, s = {
|
||||
tex: {
|
||||
inlineMath: [["$", "$"], ["\\(", "\\)"]]
|
||||
},
|
||||
options: {
|
||||
skipHtmlTags: ["script", "noscript", "style", "textarea", "pre", "code"]
|
||||
},
|
||||
startup: {
|
||||
ready: () => {
|
||||
MathJax.startup.defaultReady(), MathJax.startup.promise.then(() => {
|
||||
a.layout();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
function r(o, e) {
|
||||
let t = document.createElement("script");
|
||||
t.type = "text/javascript", t.id = "MathJax-script", t.src = o, t.async = !0, t.onload = () => {
|
||||
typeof e == "function" && (e.call(), e = null);
|
||||
}, document.head.appendChild(t);
|
||||
}
|
||||
return {
|
||||
id: "mathjax4",
|
||||
init: function(o) {
|
||||
a = o;
|
||||
let e = a.getConfig().mathjax4 || {}, t = { ...s, ...e };
|
||||
t.tex = { ...s.tex, ...e.tex }, t.options = { ...s.options, ...e.options }, t.startup = { ...s.startup, ...e.startup };
|
||||
let n = t.mathjax || "https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js";
|
||||
t.mathjax = null, window.MathJax = t, r(n, function() {
|
||||
MathJax.startup.promise.then(() => {
|
||||
MathJax.typeset(), a.addEventListener("slidechanged", function(i) {
|
||||
MathJax.typeset();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
}, S = x;
|
||||
const k = Plugin = Object.assign(S(), {
|
||||
KaTeX: M,
|
||||
MathJax2: x,
|
||||
MathJax3: J,
|
||||
MathJax4: v
|
||||
}), C = k;
|
||||
export {
|
||||
C as default
|
||||
};
|
||||
7
scripts/reveal.js/dist/plugin/notes.d.ts
vendored
Normal file
7
scripts/reveal.js/dist/plugin/notes.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { RevealPlugin } from 'reveal.js';
|
||||
export interface NotesPlugin extends RevealPlugin {
|
||||
id: 'notes';
|
||||
open(): void;
|
||||
}
|
||||
declare const Notes: () => NotesPlugin;
|
||||
export default Notes;
|
||||
970
scripts/reveal.js/dist/plugin/notes.js
vendored
Normal file
970
scripts/reveal.js/dist/plugin/notes.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2126
scripts/reveal.js/dist/plugin/notes.mjs
vendored
Normal file
2126
scripts/reveal.js/dist/plugin/notes.mjs
vendored
Normal file
File diff suppressed because one or more lines are too long
9
scripts/reveal.js/dist/plugin/search.d.ts
vendored
Normal file
9
scripts/reveal.js/dist/plugin/search.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { RevealPlugin } from 'reveal.js';
|
||||
export interface SearchPlugin extends RevealPlugin {
|
||||
id: 'search';
|
||||
open(): void;
|
||||
close(): void;
|
||||
toggle(): void;
|
||||
}
|
||||
declare const Search: () => SearchPlugin;
|
||||
export default Search;
|
||||
2
scripts/reveal.js/dist/plugin/search.js
vendored
Normal file
2
scripts/reveal.js/dist/plugin/search.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
(function(p,y){typeof exports=="object"&&typeof module<"u"?module.exports=y():typeof define=="function"&&define.amd?define(y):(p=typeof globalThis<"u"?globalThis:p||self,p.RevealSearch=y())})(this,(function(){"use strict";return()=>{let c,t,i,n,o,v,s;function x(){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;"/>
|
||||
</span>`,i=t.querySelector(".searchinput"),i.style.width="240px",i.style.fontSize="14px",i.style.padding="4px 6px",i.style.color="#000",i.style.background="#fff",i.style.borderRadius="2px",i.style.border="0",i.style.outline="0",i.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",i.style["-webkit-appearance"]="none",c.getRevealElement().appendChild(t),i.addEventListener("keyup",function(r){r.keyCode===13?(r.preventDefault(),L(),v=!1):v=!0},!1),m()}function E(){t||x(),t.style.display="inline",i.focus(),i.select()}function m(){t||x(),t.style.display="none",s&&s.remove()}function N(){t||x(),t.style.display!=="inline"?E():m()}function L(){if(v){var r=i.value;r===""?(s&&s.remove(),n=null):(s=new I("slidecontent"),n=s.apply(r),o=0)}n&&(n.length&&n.length<=o&&(o=0),n.length>o&&(c.slide(n[o].h,n[o].v),o++))}function I(r,f){var M=document.getElementById(r)||document.body,S=f||"EM",B=new RegExp("^(?:"+S+"|SCRIPT|FORM)$"),R=["#ff6","#a0ffff","#9f9","#f99","#f6f"],b=[],D=0,g="",d=[];this.setRegex=function(e){e=e.trim(),g=new RegExp("("+e+")","i")},this.getRegex=function(){return g.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(e){if(!(e==null||!e)&&g&&!B.test(e.nodeName)){if(e.hasChildNodes())for(var l=0;l<e.childNodes.length;l++)this.hiliteWords(e.childNodes[l]);if(e.nodeType==3){var T,a;if((T=e.nodeValue)&&(a=g.exec(T))){for(var h=e;h!=null&&h.nodeName!="SECTION";)h=h.parentNode;for(var w=c.getIndices(h),F=d.length,k=!1,l=0;l<F;l++)d[l].h===w.h&&d[l].v===w.v&&(k=!0);k||d.push(w),b[a[0].toLowerCase()]||(b[a[0].toLowerCase()]=R[D++%R.length]);var u=document.createElement(S);u.appendChild(document.createTextNode(a[0])),u.style.backgroundColor=b[a[0].toLowerCase()],u.style.fontStyle="inherit",u.style.color="#000";var C=e.splitText(a.index);C.nodeValue=C.nodeValue.substring(a[0].length),e.parentNode.insertBefore(u,C)}}}},this.remove=function(){for(var e=document.getElementsByTagName(S),l;e.length&&(l=e[0]);)l.parentNode.replaceChild(l.firstChild,l)},this.apply=function(e){if(!(e==null||!e))return this.remove(),this.setRegex(e),this.hiliteWords(M),d}}return{id:"search",init:r=>{c=r,c.registerKeyboardShortcut("CTRL + Shift + F","Search"),document.addEventListener("keydown",function(f){f.key=="F"&&(f.ctrlKey||f.metaKey)&&(f.preventDefault(),N())},!1)},open:E,close:m,toggle:N}}}));
|
||||
73
scripts/reveal.js/dist/plugin/search.mjs
vendored
Normal file
73
scripts/reveal.js/dist/plugin/search.mjs
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
const D = () => {
|
||||
let f, t, l, n, a, y, s;
|
||||
function g() {
|
||||
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;"/>
|
||||
</span>`, l = t.querySelector(".searchinput"), l.style.width = "240px", l.style.fontSize = "14px", l.style.padding = "4px 6px", l.style.color = "#000", l.style.background = "#fff", l.style.borderRadius = "2px", l.style.border = "0", l.style.outline = "0", l.style.boxShadow = "0 2px 18px rgba(0, 0, 0, 0.2)", l.style["-webkit-appearance"] = "none", f.getRevealElement().appendChild(t), l.addEventListener("keyup", function(r) {
|
||||
r.keyCode === 13 ? (r.preventDefault(), k(), y = !1) : y = !0;
|
||||
}, !1), v();
|
||||
}
|
||||
function w() {
|
||||
t || g(), t.style.display = "inline", l.focus(), l.select();
|
||||
}
|
||||
function v() {
|
||||
t || g(), t.style.display = "none", s && s.remove();
|
||||
}
|
||||
function C() {
|
||||
t || g(), t.style.display !== "inline" ? w() : v();
|
||||
}
|
||||
function k() {
|
||||
if (y) {
|
||||
var r = l.value;
|
||||
r === "" ? (s && s.remove(), n = null) : (s = new T("slidecontent"), n = s.apply(r), a = 0);
|
||||
}
|
||||
n && (n.length && n.length <= a && (a = 0), n.length > a && (f.slide(n[a].h, n[a].v), a++));
|
||||
}
|
||||
function T(r, c) {
|
||||
var L = document.getElementById(r) || document.body, x = c || "EM", I = new RegExp("^(?:" + x + "|SCRIPT|FORM)$"), E = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"], m = [], M = 0, p = "", d = [];
|
||||
this.setRegex = function(e) {
|
||||
e = e.trim(), p = new RegExp("(" + e + ")", "i");
|
||||
}, this.getRegex = function() {
|
||||
return p.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " ");
|
||||
}, this.hiliteWords = function(e) {
|
||||
if (!(e == null || !e) && p && !I.test(e.nodeName)) {
|
||||
if (e.hasChildNodes())
|
||||
for (var i = 0; i < e.childNodes.length; i++)
|
||||
this.hiliteWords(e.childNodes[i]);
|
||||
if (e.nodeType == 3) {
|
||||
var N, o;
|
||||
if ((N = e.nodeValue) && (o = p.exec(N))) {
|
||||
for (var h = e; h != null && h.nodeName != "SECTION"; )
|
||||
h = h.parentNode;
|
||||
for (var S = f.getIndices(h), B = d.length, R = !1, i = 0; i < B; i++)
|
||||
d[i].h === S.h && d[i].v === S.v && (R = !0);
|
||||
R || d.push(S), m[o[0].toLowerCase()] || (m[o[0].toLowerCase()] = E[M++ % E.length]);
|
||||
var u = document.createElement(x);
|
||||
u.appendChild(document.createTextNode(o[0])), u.style.backgroundColor = m[o[0].toLowerCase()], u.style.fontStyle = "inherit", u.style.color = "#000";
|
||||
var b = e.splitText(o.index);
|
||||
b.nodeValue = b.nodeValue.substring(o[0].length), e.parentNode.insertBefore(u, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, this.remove = function() {
|
||||
for (var e = document.getElementsByTagName(x), i; e.length && (i = e[0]); )
|
||||
i.parentNode.replaceChild(i.firstChild, i);
|
||||
}, this.apply = function(e) {
|
||||
if (!(e == null || !e))
|
||||
return this.remove(), this.setRegex(e), this.hiliteWords(L), d;
|
||||
};
|
||||
}
|
||||
return {
|
||||
id: "search",
|
||||
init: (r) => {
|
||||
f = r, f.registerKeyboardShortcut("CTRL + Shift + F", "Search"), document.addEventListener("keydown", function(c) {
|
||||
c.key == "F" && (c.ctrlKey || c.metaKey) && (c.preventDefault(), C());
|
||||
}, !1);
|
||||
},
|
||||
open: w,
|
||||
close: v,
|
||||
toggle: C
|
||||
};
|
||||
}, F = D;
|
||||
export {
|
||||
F as default
|
||||
};
|
||||
6
scripts/reveal.js/dist/plugin/zoom.d.ts
vendored
Normal file
6
scripts/reveal.js/dist/plugin/zoom.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { RevealPlugin } from 'reveal.js';
|
||||
export interface ZoomPlugin extends RevealPlugin {
|
||||
id: 'zoom';
|
||||
}
|
||||
declare const Zoom: () => ZoomPlugin;
|
||||
export default Zoom;
|
||||
1
scripts/reveal.js/dist/plugin/zoom.js
vendored
Normal file
1
scripts/reveal.js/dist/plugin/zoom.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function(f,m){typeof exports=="object"&&typeof module<"u"?module.exports=m():typeof define=="function"&&define.amd?define(m):(f=typeof globalThis<"u"?globalThis:f||self,f.RevealZoom=m())})(this,(function(){"use strict";const f={id:"zoom",init:function(n){n.getRevealElement().addEventListener("mousedown",function(i){var l=/Linux/.test(window.navigator.platform)?"ctrl":"alt",r=(n.getConfig().zoomKey?n.getConfig().zoomKey:l)+"Key",s=n.getConfig().zoomLevel?n.getConfig().zoomLevel:2;i[r]&&!n.isOverview()&&(i.preventDefault(),u.to({x:i.clientX,y:i.clientY,scale:s,pan:!1}))})},destroy:()=>{u.reset()}},m=()=>f;var u=(function(){var n=1,i=0,l=0,r=-1,s=-1,y="transform"in document.body.style;y&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",function(e){n!==1&&e.keyCode===27&&u.out()}),document.addEventListener("mousemove",function(e){n!==1&&(i=e.clientX,l=e.clientY)});function c(e,t){var o=w();if(e.width=e.width||1,e.height=e.height||1,e.x-=(window.innerWidth-e.width*t)/2,e.y-=(window.innerHeight-e.height*t)/2,y)if(t===1)document.body.style.transform="";else{var d=o.x+"px "+o.y+"px",h="translate("+-e.x+"px,"+-e.y+"px) scale("+t+")";document.body.style.transformOrigin=d,document.body.style.transform=h}else t===1?(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=-(o.x+e.x)/t+"px",document.body.style.top=-(o.y+e.y)/t+"px",document.body.style.width=t*100+"%",document.body.style.height=t*100+"%",document.body.style.zoom=t);n=t,document.documentElement.classList&&(n!==1?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function a(){var e=.12,t=window.innerWidth*e,o=window.innerHeight*e,d=w();l<o?window.scroll(d.x,d.y-(1-l/o)*(14/n)):l>window.innerHeight-o&&window.scroll(d.x,d.y+(1-(window.innerHeight-l)/o)*(14/n)),i<t?window.scroll(d.x-(1-i/t)*(14/n),d.y):i>window.innerWidth-t&&window.scroll(d.x+(1-(window.innerWidth-i)/t)*(14/n),d.y)}function w(){return{x:window.scrollX!==void 0?window.scrollX:window.pageXOffset,y:window.scrollY!==void 0?window.scrollY:window.pageYOffset}}return{to:function(e){if(n!==1)u.out();else{if(e.x=e.x||0,e.y=e.y||0,e.element){var t=20,o=e.element.getBoundingClientRect();e.x=o.left-t,e.y=o.top-t,e.width=o.width+t*2,e.height=o.height+t*2}e.width!==void 0&&e.height!==void 0&&(e.scale=Math.max(Math.min(window.innerWidth/e.width,window.innerHeight/e.height),1)),e.scale>1&&(e.x*=e.scale,e.y*=e.scale,c(e,e.scale),e.pan!==!1&&(r=setTimeout(function(){s=setInterval(a,1e3/60)},800)))}},out:function(){clearTimeout(r),clearInterval(s),c({x:0,y:0},1),n=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return n}}})();return m}));
|
||||
93
scripts/reveal.js/dist/plugin/zoom.mjs
vendored
Normal file
93
scripts/reveal.js/dist/plugin/zoom.mjs
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
const c = {
|
||||
id: "zoom",
|
||||
init: function(n) {
|
||||
n.getRevealElement().addEventListener("mousedown", function(o) {
|
||||
var l = /Linux/.test(window.navigator.platform) ? "ctrl" : "alt", f = (n.getConfig().zoomKey ? n.getConfig().zoomKey : l) + "Key", m = n.getConfig().zoomLevel ? n.getConfig().zoomLevel : 2;
|
||||
o[f] && !n.isOverview() && (o.preventDefault(), r.to({
|
||||
x: o.clientX,
|
||||
y: o.clientY,
|
||||
scale: m,
|
||||
pan: !1
|
||||
}));
|
||||
});
|
||||
},
|
||||
destroy: () => {
|
||||
r.reset();
|
||||
}
|
||||
}, h = () => c;
|
||||
var r = (function() {
|
||||
var n = 1, o = 0, l = 0, f = -1, m = -1, u = "transform" in document.body.style;
|
||||
u && (document.body.style.transition = "transform 0.8s ease"), document.addEventListener("keyup", function(e) {
|
||||
n !== 1 && e.keyCode === 27 && r.out();
|
||||
}), document.addEventListener("mousemove", function(e) {
|
||||
n !== 1 && (o = e.clientX, l = e.clientY);
|
||||
});
|
||||
function y(e, t) {
|
||||
var i = s();
|
||||
if (e.width = e.width || 1, e.height = e.height || 1, e.x -= (window.innerWidth - e.width * t) / 2, e.y -= (window.innerHeight - e.height * t) / 2, u)
|
||||
if (t === 1)
|
||||
document.body.style.transform = "";
|
||||
else {
|
||||
var d = i.x + "px " + i.y + "px", w = "translate(" + -e.x + "px," + -e.y + "px) scale(" + t + ")";
|
||||
document.body.style.transformOrigin = d, document.body.style.transform = w;
|
||||
}
|
||||
else
|
||||
t === 1 ? (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 = -(i.x + e.x) / t + "px", document.body.style.top = -(i.y + e.y) / t + "px", document.body.style.width = t * 100 + "%", document.body.style.height = t * 100 + "%", document.body.style.zoom = t);
|
||||
n = t, document.documentElement.classList && (n !== 1 ? document.documentElement.classList.add("zoomed") : document.documentElement.classList.remove("zoomed"));
|
||||
}
|
||||
function a() {
|
||||
var e = 0.12, t = window.innerWidth * e, i = window.innerHeight * e, d = s();
|
||||
l < i ? window.scroll(d.x, d.y - (1 - l / i) * (14 / n)) : l > window.innerHeight - i && window.scroll(d.x, d.y + (1 - (window.innerHeight - l) / i) * (14 / n)), o < t ? window.scroll(d.x - (1 - o / t) * (14 / n), d.y) : o > window.innerWidth - t && window.scroll(d.x + (1 - (window.innerWidth - o) / t) * (14 / n), d.y);
|
||||
}
|
||||
function s() {
|
||||
return {
|
||||
x: window.scrollX !== void 0 ? window.scrollX : window.pageXOffset,
|
||||
y: window.scrollY !== void 0 ? window.scrollY : window.pageYOffset
|
||||
};
|
||||
}
|
||||
return {
|
||||
/**
|
||||
* Zooms in on either a rectangle or HTML element.
|
||||
*
|
||||
* @param {Object} options
|
||||
* - element: HTML element to zoom in on
|
||||
* OR
|
||||
* - x/y: coordinates in non-transformed space to zoom in on
|
||||
* - width/height: the portion of the screen to zoom in on
|
||||
* - scale: can be used instead of width/height to explicitly set scale
|
||||
*/
|
||||
to: function(e) {
|
||||
if (n !== 1)
|
||||
r.out();
|
||||
else {
|
||||
if (e.x = e.x || 0, e.y = e.y || 0, e.element) {
|
||||
var t = 20, i = e.element.getBoundingClientRect();
|
||||
e.x = i.left - t, e.y = i.top - t, e.width = i.width + t * 2, e.height = i.height + t * 2;
|
||||
}
|
||||
e.width !== void 0 && e.height !== void 0 && (e.scale = Math.max(Math.min(window.innerWidth / e.width, window.innerHeight / e.height), 1)), e.scale > 1 && (e.x *= e.scale, e.y *= e.scale, y(e, e.scale), e.pan !== !1 && (f = setTimeout(function() {
|
||||
m = setInterval(a, 1e3 / 60);
|
||||
}, 800)));
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Resets the document zoom state to its default.
|
||||
*/
|
||||
out: function() {
|
||||
clearTimeout(f), clearInterval(m), y({ x: 0, y: 0 }, 1), n = 1;
|
||||
},
|
||||
// Alias
|
||||
magnify: function(e) {
|
||||
this.to(e);
|
||||
},
|
||||
reset: function() {
|
||||
this.out();
|
||||
},
|
||||
zoomLevel: function() {
|
||||
return n;
|
||||
}
|
||||
};
|
||||
})();
|
||||
const g = h;
|
||||
export {
|
||||
g as default
|
||||
};
|
||||
Reference in New Issue
Block a user