├── .gitignore ├── .npmignore ├── .vscode └── settings.json ├── README.md ├── examples └── tsnyc-jan-2020.md ├── img ├── config.png ├── slides-after.png └── slides.png ├── package.json ├── rollup.config.js ├── scripts ├── getDTS.js └── getRevealAssets.js ├── src ├── index.ts ├── slideshow │ ├── ambient.d.ts │ ├── markdown.js │ ├── marked.js │ ├── reveal.d.ts │ ├── slideshow.css │ └── slideshow.ts └── vendor │ ├── ds │ └── createDesignSystem.d.ts │ ├── playground.d.ts │ ├── pluginUtils.d.ts │ ├── sandbox.d.ts │ ├── tsWorker.d.ts │ ├── typescript-vfs.d.ts │ └── utils.ts ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *-error.log 3 | dist 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | .gitignore 3 | rollup.config.jss 4 | !dist 5 | scripts 6 | .vscode 7 | yarn* 8 | tsconfig.json 9 | rollup* 10 | img 11 | examples 12 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "node_modules/typescript/lib" 3 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## TypeScript Playground Present 2 | 3 | A way to present your TypeScript talk in style! 4 | 5 | This plugin adds a copy of [Reveal.js](https://github.com/hakimel/reveal.js) above the playground, slides are created 6 | using Markdown (via [marked](https://github.com/markedjs/marked)) and have the ability to set the text in the playground. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | With markdown looking like: 15 | 16 | ````md 17 | 18 | 19 | # TSNYC Jan 2020 20 | 21 | --- 22 | 23 | ## What is TypeScript? 24 | 25 | TypeScript extends JavaScript by adding types. 26 | 27 | TypeScript speeds up your development experience by catching errors and providing fixes before you even run your code. 28 | 29 | Any browser, any OS, anywhere JavaScript runs. Entirely Open Source. 30 | 31 | --- 32 | 33 | ## `import type` 34 | 35 | ### Why? 36 | 37 | > ### Guaranteed Side-effect free syntax 38 | > 39 | > Tools like Babel, which don’t type-check can be certain with 100% accuracy
whether to remove the import. 40 | 41 | 42 | // Look at the JS, this isn't included in the output 43 | import {DangerDSLType} from "danger" 44 | 45 | declare const myDSL: DangerDSLType 46 | 47 | myDSL.bitbucket_cloud 48 | 49 | // On the other hand, this one is... 50 | import {danger} from "danger" 51 | danger.git 52 | 53 | // But why? 54 | 55 | // TS keeps track of whether an import is a "JS" value 56 | // or a TypeScript type. 57 | import {DangerDSLJSONType, message} from "danger" 58 | message 59 | 60 | // Babel cannot do this! 61 | 62 | // So now Babel knows that it can always skip these 63 | // 'import type' statements 64 | import type {DangerUtilsDSL} from "danger" 65 | 66 | // Because they can't be used with "JS" values: 67 | import type {markdown} from "danger" 68 | 69 | 70 | --- 71 | ```` 72 | 73 | This markdown would turn into 2 slides, where the showing the second would change the Playground's code. 74 | 75 | ## Examples 76 | 77 | - [TSNY Jan 2020](./examples/tsnyc-jan-2020.md) - [gist](https://gist.github.com/orta/d7dbd4cdb8d1f99c52871fb15db620bc) 78 |
_Note: the `` element is not visible, so [view the source](https://gist.githubusercontent.com/orta/d7dbd4cdb8d1f99c52871fb15db620bc/raw/33eff5573a2a592d7be4364a791d6f0e1d557b72/index.md) please._ 79 | 80 | ## Useful info for making slides 81 | 82 | 1. Get started by making a gist: https://gist.github.com 83 | 2. Make an `index.md` and add some example markdown 84 | 3. Split your slides with `---` 85 | 4. Save your gist, then tell the playground to load that gist 86 | 87 | #### Playground support 88 | 89 | You can change the playground support by putting your code inside the `` HTML element in the slides. This lets you use 90 | markdown code blocks to show the code in the slides: 91 | 92 | ````md 93 | # Network Requests 94 | 95 | There are a few ways to get info from an API 96 | 97 | --- 98 | 99 | # What is `await`? 100 | 101 | ```ts 102 | const response = await fetch("mysite.com/api/dogs") 103 | ``` 104 | 105 | 106 | import fetch from "node-fetch" 107 | 108 | const start = await () => { 109 | const response = await fetch("https://mysite.com/api/dogs) 110 | ... 111 | } 112 | 113 | 114 | --- 115 | 116 | # How do Promises work? 117 | ```` 118 | 119 | #### Build In Slides 120 | 121 | Reveal.js supports building out sections in a slide [using fragments]([https://github.com/hakimel/reveal.js#element-attributes](https://revealjs.com/fragments/)) 122 | 123 | ```md 124 | # Anyone can contribute 125 | 126 | It takes a village to make a big OSS project 127 | --- 128 | # Extra thanks to 129 | 130 | - Orta Therox 131 | - Danger McShane 132 | 133 | --- 134 | ``` 135 | 136 | ## TODO 137 | 138 | - Make it pretty 139 | - Add a back to slides button 140 | - Add a down to code button when playground has changed 141 | - Are there more things we can hook into than just code? 142 | 143 | ## Contributing 144 | 145 | You can use `yarn start` to set up both a copy of rollup to generate the JS, and serve to host it 146 | 147 | ```sh 148 | yarn start 149 | ``` 150 | 151 | Then set up the TypeScript playground to get a plugin from from `http://localhost:5000/index.js`. 152 | -------------------------------------------------------------------------------- /examples/tsnyc-jan-2020.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # TSNYC Jan 2020 4 | 5 | --- 6 | 7 | ## What is TypeScript? 8 | 9 | TypeScript extends JavaScript by adding types. 10 | 11 | TypeScript speeds up your development experience by catching errors and providing fixes before you even run your code. 12 | 13 | Any browser, any OS, anywhere JavaScript runs. Entirely Open Source. 14 | 15 | --- 16 | 17 | 18 | 19 | ## Your organizers: Dan, Jason, Kirill and Orta' 20 | 21 | --- 22 | 23 | ### Meetup Format 24 | 25 | - Summary of TypeScript changes 26 | - Two or Three 10–20 minute talks: Beginner, Intermediate, Advanced 27 | - Q&As after each talk 28 | 29 | Please use #tsnyc on Twitter, Instagram, etc. 30 | 31 | We follow the JSConf Code of Conduct 32 | 33 | --- 34 | 35 | ## v3.8 Five main features 36 | 37 | - Import type 38 | - Private Fields 39 | - Top Level Await 40 | - JSDoc Improvements 41 | - Watch Options 42 | 43 | --- 44 | 45 | ## `import type` 46 | 47 | ### Why? 48 | 49 | > ### Guaranteed Side-effect free syntax 50 | > 51 | > Tools like Babel, which don’t type-check can be certain with 100% accuracy
whether to remove the import. 52 | 53 | 54 | // Look at the JS, this isn't included in the output 55 | import {DangerDSLType} from "danger" 56 | 57 | declare const myDSL: DangerDSLType 58 | 59 | myDSL.bitbucket_cloud 60 | 61 | // On the other hand, this one is... 62 | import {danger} from "danger" 63 | danger.git 64 | 65 | // But why? 66 | 67 | // TS keeps track of whether an import is a "JS" value 68 | // or a TypeScript type. 69 | import {DangerDSLJSONType, message} from "danger" 70 | message 71 | 72 | // Babel cannot do this! 73 | 74 | // So now Babel knows that it can always skip these 75 | // 'import type' statements 76 | import type {DangerUtilsDSL} from "danger" 77 | 78 | // Because they can't be used with "JS" values: 79 | import type {markdown} from "danger" 80 | 81 | 82 | --- 83 | 84 | ## `import type` 85 | 86 | > ### Guaranteed Side-effect-y imports 87 | > 88 | > There are folks who want to rely on importing side-effects, but also import a type from that import 89 | 90 | --- 91 | 92 | ```ts 93 | // This statement will get erased because of import elision. 94 | import { SomeTypeFoo, SomeOtherTypeBar } from "./module-with-side-effects"; 95 | 96 | // This statement always sticks around. 97 | import "./module-with-side-effects"; 98 | ``` 99 | -------------------------------------------------------------------------------- /img/config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/playground-slides/6916100ebe227ae3886b550eb20f369396414d6a/img/config.png -------------------------------------------------------------------------------- /img/slides-after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/playground-slides/6916100ebe227ae3886b550eb20f369396414d6a/img/slides-after.png -------------------------------------------------------------------------------- /img/slides.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orta/playground-slides/6916100ebe227ae3886b550eb20f369396414d6a/img/slides.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typescript-playground-presentation-mode", 3 | "description": "Present your TypeScript talk directly in the playground, powered by GitHub gists!", 4 | "repository": { 5 | "url": "https://github.com/orta/playground-slides" 6 | }, 7 | "version": "0.5.1", 8 | "main": "dist/index.js", 9 | "author": "Orta Therox", 10 | "license": "MIT", 11 | "keywords": [ 12 | "playground-plugin" 13 | ], 14 | "scripts": { 15 | "build": "node scripts/getDTS.js; rollup -c rollup.config.js;", 16 | "start": "concurrently -p \"[{name}]\" -n \"ROLLUP,SITE\" -c \"bgBlue.bold,bgMagenta.bold\" \"yarn rollup -c rollup.config.js --watch\" \"yarn serve dist\"", 17 | "prepublish": "yarn build", 18 | "postinstall": "yarn build" 19 | }, 20 | "devDependencies": { 21 | "@polvtypes/reveal.js": "^3.8.1", 22 | "@rollup/plugin-commonjs": "^11.0.2", 23 | "@rollup/plugin-json": "^4.0.2", 24 | "@rollup/plugin-node-resolve": "^7.1.0", 25 | "@rollup/plugin-typescript": "^3.0.0", 26 | "@types/commonmark": "^0.27.4", 27 | "concurrently": "^5.1.0", 28 | "monaco-editor": "^0.19.3", 29 | "node-fetch": "^2.6.0", 30 | "react": "^16.13.1", 31 | "rollup": "^1.31.0", 32 | "serve": "^11.3.0", 33 | "typescript": " 3.8.0-beta" 34 | }, 35 | "dependencies": { 36 | "reveal.js": "^3.9.2", 37 | "tslib": "^1.10.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import typescript from "@rollup/plugin-typescript"; 2 | import node from "@rollup/plugin-node-resolve"; 3 | import commonjs from "@rollup/plugin-commonjs"; 4 | import json from "@rollup/plugin-json"; 5 | import {copyFileSync, existsSync, mkdirSync} from "fs" 6 | 7 | if (!existsSync('dist')) { 8 | mkdirSync('dist') 9 | } 10 | 11 | copyFileSync("src/slideshow/slideshow.css", "dist/slideshow.css") 12 | 13 | export default ["index.ts", "slideshow/slideshow.ts", "slideshow/markdown.js"].map(name => ({ 14 | input: `src/${name}`, 15 | output: { 16 | name, 17 | dir: "dist", 18 | format: "amd" 19 | }, 20 | plugins: [typescript({ tsconfig: "tsconfig.json" }), commonjs(), node(), json()] 21 | })); 22 | -------------------------------------------------------------------------------- /scripts/getDTS.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | // Grab the DTS files from the TypeScript website 4 | // then do a bit of string manipulation in order to make it 5 | // compile without _all_ of the dependencies 6 | 7 | const nodeFetch = require("node-fetch").default 8 | const { writeFileSync, existsSync, mkdirSync } = require("fs") 9 | const { join } = require("path") 10 | 11 | const getFileAndStoreLocally = async (url, path, editFunc) => { 12 | const editingFunc = editFunc ? editFunc : text => text 13 | const packageJSON = await nodeFetch(url) 14 | const contents = await packageJSON.text() 15 | writeFileSync(join(__dirname, "..", path), editingFunc(contents), "utf8") 16 | } 17 | 18 | const go = async () => { 19 | const vendor = join("src", "vendor") 20 | const ds = join("src", "vendor", "ds") 21 | 22 | if (!existsSync(vendor)) mkdirSync(vendor) 23 | if (!existsSync(ds)) mkdirSync(ds) 24 | 25 | const host = "https://www.staging-typescript.org" 26 | 27 | // For playground-dev purposes 28 | // const host = "http://localhost:8000"; 29 | 30 | // The API for the monaco typescript worker 31 | await getFileAndStoreLocally(host + "/js/sandbox/tsWorker.d.ts", join(vendor, "tsWorker.d.ts")) 32 | 33 | // The Design System DTS 34 | await getFileAndStoreLocally( 35 | host + "/js/playground/ds/createDesignSystem.d.ts", 36 | join(ds, "createDesignSystem.d.ts"), 37 | text => { 38 | const renameImport = text.replace("typescriptlang-org/static/js/sandbox", "../sandbox") 39 | return renameImport 40 | } 41 | ) 42 | 43 | // Util funcs 44 | await getFileAndStoreLocally(host + "/js/playground/pluginUtils.d.ts", join(vendor, "pluginUtils.d.ts"), text => { 45 | const renameImport = text.replace('from "typescript-sandbox"', 'from "./sandbox"') 46 | return renameImport 47 | }) 48 | 49 | // TS-VFS 50 | await getFileAndStoreLocally( 51 | host + "/js/sandbox/vendor/typescript-vfs.d.ts", 52 | join(vendor, "typescript-vfs.d.ts"), 53 | text => { 54 | const removeImports = text.replace('/// ', "") 55 | const removedLZ = removeImports.replace('import("lz-string").LZStringStatic', "any") 56 | return removedLZ 57 | } 58 | ) 59 | 60 | // Sandbox 61 | await getFileAndStoreLocally(host + "/js/sandbox/index.d.ts", join(vendor, "sandbox.d.ts"), text => { 62 | const removeImports = text.replace(/^import/g, "// import").replace(/\nimport/g, "\n// import") 63 | const replaceTSVFS = removeImports.replace( 64 | '// import * as tsvfs from "./vendor/typescript-vfs"', 65 | "\nimport * as tsvfs from './typescript-vfs'" 66 | ) 67 | const removedLZ = replaceTSVFS.replace("lzstring: typeof lzstring", "// lzstring: typeof lzstring") 68 | const addedTsWorkerImport = 'import { TypeScriptWorker } from "./tsWorker";' + removedLZ 69 | return addedTsWorkerImport 70 | }) 71 | 72 | // Playground 73 | await getFileAndStoreLocally(host + "/js/playground/index.d.ts", join(vendor, "/playground.d.ts"), text => { 74 | const replaceSandbox = text.replace(/typescript-sandbox/g, "./sandbox") 75 | const replaceTSVFS = replaceSandbox.replace( 76 | /typescriptlang-org\/static\/js\/sandbox\/vendor\/typescript-vfs/g, 77 | "./typescript-vfs" 78 | ) 79 | const removedLZ = replaceTSVFS.replace("lzstring: typeof", "// lzstring: typeof") 80 | const removedWorker = removedLZ.replace("getWorkerProcess", "// getWorkerProcess") 81 | const removedUI = removedWorker.replace("ui:", "// ui:") 82 | return removedUI 83 | }) 84 | } 85 | 86 | go() 87 | -------------------------------------------------------------------------------- /scripts/getRevealAssets.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | // Grab CSS 4 | 5 | const nodeFetch = require("node-fetch").default; 6 | const { writeFileSync } = require("fs"); 7 | const { join } = require("path"); 8 | 9 | const getFileAndStoreLocally = async (url, path, editFunc) => { 10 | const editingFunc = editFunc ? editFunc : text => text; 11 | const packageJSON = await nodeFetch(url); 12 | const contents = await packageJSON.text(); 13 | writeFileSync(join(__dirname, "..", path), editingFunc(contents), "utf8"); 14 | }; 15 | 16 | const go = async () => { 17 | await getFileAndStoreLocally( 18 | "https://raw.githubusercontent.com/hakimel/reveal.js/master/css/reveal.css", 19 | "dist/reveal.css" 20 | ); 21 | await getFileAndStoreLocally( 22 | "https://raw.githubusercontent.com/hakimel/reveal.js/master/css/theme/white.css", 23 | "dist/reveal-theme.css" 24 | ); 25 | }; 26 | 27 | go(); 28 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { el } from './vendor/utils'; 2 | 3 | declare const playground: ReturnType; 4 | 5 | const slidePlugin: import("./vendor/playground").PlaygroundPlugin = { 6 | id: "present", 7 | displayName: "Present", 8 | didMount: (_sandbox, container) =>{ 9 | const p = (str: string) => el(str, "p", container) 10 | const h4 = (str: string) => el(str, "h4", container) 11 | 12 | h4("Create a Slideshow") 13 | p("Use Markdown powered by GitHub Gists") 14 | p("This plugin adds Reveal.js support to the TypeScript Playground, slides have the ability to change the code inside the playground.") 15 | 16 | h4("Get Started") 17 | p(`Create a gist with an index.md using a set of ---s to split between slides. You can find out more about the syntax here. If you want to demo the slides, click here to try an existing deck.`) 18 | 19 | const startButton = document.createElement("input") 20 | 21 | const gistForm = createGistInputForm(startButton) 22 | container.appendChild(gistForm) 23 | 24 | p(`Then when you're ready, hit start below. This will start the slides and scroll you to the top of the page. You can scroll (down with the mouse, or press escape) to get back to the code below it.`) 25 | 26 | startButton.type = "button" 27 | startButton.value = "Start slideshow" 28 | container.appendChild(startButton) 29 | 30 | const firstRunSetup = () => { 31 | const re = window.require as any 32 | const isDev = document.location.host.includes("localhost") 33 | 34 | // https://unpkg.com/browse/typescript-playground-presentation-mode@0.0.1/dist/x.js => unpkg/browse/typescript-playground-presentation-mode@0.0.1/dist/x 35 | const prefix = isDev ? "local" : "unpkg/typescript-playground-presentation-mode/dist" 36 | 37 | re([prefix + "/slideshow"], (slides: typeof import("./slideshow/slideshow")) => { 38 | // @ts-ignore sets the window.Reveal for the upcoming plugins 39 | window.Reveal = slides.revealJS 40 | 41 | re([prefix + "/markdown"], ( ) => { 42 | slides.startSlides(localStorage.getItem("playground-slides-gist-href")) 43 | // p.textContent = "In slideshow, scroll up to get back to your slides." 44 | startButton.disabled = true 45 | }) 46 | }) 47 | } 48 | 49 | startButton.onclick = () => { 50 | firstRunSetup() 51 | } 52 | } 53 | } 54 | 55 | const createGistInputForm = (startButton: HTMLInputElement) => { 56 | const form = document.createElement("form") 57 | 58 | const gistHref = document.createElement("input") 59 | gistHref.type = "url" 60 | gistHref.id = "gist-input" 61 | gistHref.placeholder = "https://gist.github.com/.../..." 62 | const storedGistHref = localStorage.getItem("playground-slides-gist-href") 63 | gistHref.value = storedGistHref 64 | 65 | const updateState = ({ enable }) => { 66 | if (enable) { 67 | gistHref.classList.add("good") 68 | startButton.disabled = false 69 | 70 | } else { 71 | gistHref.classList.remove("good") 72 | startButton.disabled = true 73 | } 74 | } 75 | 76 | const textUpdate = (e) => { 77 | const href = e.target.value.toLowerCase().trim() 78 | localStorage.setItem("playground-slides-gist-href", href) 79 | updateState({ enable: isGist(href) }) 80 | } 81 | 82 | gistHref.onkeyup = textUpdate 83 | gistHref.onpaste = textUpdate 84 | gistHref.onchange = textUpdate 85 | gistHref.onblur = textUpdate 86 | gistHref.oninput = textUpdate 87 | form.appendChild(gistHref) 88 | 89 | updateState({ enable: isGist(storedGistHref) }) 90 | return form 91 | } 92 | 93 | const isGist = (str: string) => { 94 | return str && str.startsWith("https://gist.github.com/") && str.split("/").length === 5 95 | } 96 | 97 | export default slidePlugin 98 | 99 | -------------------------------------------------------------------------------- /src/slideshow/ambient.d.ts: -------------------------------------------------------------------------------- 1 | declare module "reveal.js" 2 | -------------------------------------------------------------------------------- /src/slideshow/markdown.js: -------------------------------------------------------------------------------- 1 | // This is a modified version of https://github.com/hakimel/reveal.js/blob/master/plugin/markdown/markdown.js 2 | // which is MIT licensed 3 | 4 | // Modified to: 5 | // - Work well as an AMD module 6 | // - Work under strict mode JS 7 | 8 | import marked from "./marked" 9 | 10 | /** 11 | * The reveal.js markdown plugin. Handles parsing of 12 | * markdown inside of presentations as well as loading 13 | * of external markdown documents. 14 | */ 15 | 16 | 17 | var DEFAULT_SLIDE_SEPARATOR = '^\r?\n---\r?\n$', 18 | DEFAULT_NOTES_SEPARATOR = 'notes?:', 19 | DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$', 20 | DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = '\\\.slide:\\\s*?(\\\S.+?)$'; 21 | 22 | var SCRIPT_END_PLACEHOLDER = '__SCRIPT_END__'; 23 | 24 | 25 | /** 26 | * Retrieves the markdown contents of a slide section 27 | * element. Normalizes leading tabs/whitespace. 28 | */ 29 | function getMarkdownFromSlide( section ) { 30 | 31 | // look for a ' ); 39 | 40 | var leadingWs = text.match( /^\n?(\s*)/ )[1].length, 41 | leadingTabs = text.match( /^\n?(\t*)/ )[1].length; 42 | 43 | if( leadingTabs > 0 ) { 44 | text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' ); 45 | } 46 | else if( leadingWs > 1 ) { 47 | text = text.replace( new RegExp('\\n? {' + leadingWs + '}', 'g'), '\n' ); 48 | } 49 | 50 | return text; 51 | 52 | } 53 | 54 | /** 55 | * Given a markdown slide section element, this will 56 | * return all arguments that aren't related to markdown 57 | * parsing. Used to forward any other user-defined arguments 58 | * to the output markdown slide. 59 | */ 60 | function getForwardedAttributes( section ) { 61 | 62 | var attributes = section.attributes; 63 | var result = []; 64 | 65 | for( var i = 0, len = attributes.length; i < len; i++ ) { 66 | var name = attributes[i].name, 67 | value = attributes[i].value; 68 | 69 | // disregard attributes that are used for markdown loading/parsing 70 | if( /data\-(markdown|separator|vertical|notes)/gi.test( name ) ) continue; 71 | 72 | if( value ) { 73 | result.push( name + '="' + value + '"' ); 74 | } 75 | else { 76 | result.push( name ); 77 | } 78 | } 79 | 80 | return result.join( ' ' ); 81 | 82 | } 83 | 84 | /** 85 | * Inspects the given options and fills out default 86 | * values for what's not defined. 87 | */ 88 | function getSlidifyOptions( options ) { 89 | 90 | options = options || {}; 91 | options.separator = options.separator || DEFAULT_SLIDE_SEPARATOR; 92 | options.notesSeparator = options.notesSeparator || DEFAULT_NOTES_SEPARATOR; 93 | options.attributes = options.attributes || ''; 94 | 95 | return options; 96 | 97 | } 98 | 99 | /** 100 | * Helper function for constructing a markdown slide. 101 | */ 102 | function createMarkdownSlide( content, options ) { 103 | 104 | options = getSlidifyOptions( options ); 105 | 106 | var notesMatch = content.split( new RegExp( options.notesSeparator, 'mgi' ) ); 107 | 108 | if( notesMatch.length === 2 ) { 109 | content = notesMatch[0] + ''; 110 | } 111 | 112 | // prevent script end tags in the content from interfering 113 | // with parsing 114 | content = content.replace( /<\/script>/g, SCRIPT_END_PLACEHOLDER ); 115 | 116 | return ''; 117 | 118 | } 119 | 120 | /** 121 | * Parses a data string into multiple slides based 122 | * on the passed in separator arguments. 123 | */ 124 | function slidify( markdown, options ) { 125 | 126 | options = getSlidifyOptions( options ); 127 | 128 | var separatorRegex = new RegExp( options.separator + ( options.verticalSeparator ? '|' + options.verticalSeparator : '' ), 'mg' ), 129 | horizontalSeparatorRegex = new RegExp( options.separator ); 130 | 131 | var matches, 132 | lastIndex = 0, 133 | isHorizontal, 134 | wasHorizontal = true, 135 | content, 136 | sectionStack = []; 137 | 138 | // iterate until all blocks between separators are stacked up 139 | while( matches = separatorRegex.exec( markdown ) ) { 140 | let notes = null; 141 | 142 | // determine direction (horizontal by default) 143 | isHorizontal = horizontalSeparatorRegex.test( matches[0] ); 144 | 145 | if( !isHorizontal && wasHorizontal ) { 146 | // create vertical stack 147 | sectionStack.push( [] ); 148 | } 149 | 150 | // pluck slide content from markdown input 151 | content = markdown.substring( lastIndex, matches.index ); 152 | 153 | if( isHorizontal && wasHorizontal ) { 154 | // add to horizontal stack 155 | sectionStack.push( content ); 156 | } 157 | else { 158 | // add to vertical stack 159 | sectionStack[sectionStack.length-1].push( content ); 160 | } 161 | 162 | lastIndex = separatorRegex.lastIndex; 163 | wasHorizontal = isHorizontal; 164 | } 165 | 166 | // add the remaining slide 167 | ( wasHorizontal ? sectionStack : sectionStack[sectionStack.length-1] ).push( markdown.substring( lastIndex ) ); 168 | 169 | var markdownSections = ''; 170 | 171 | // flatten the hierarchical stack, and insert
tags 172 | for( var i = 0, len = sectionStack.length; i < len; i++ ) { 173 | // vertical 174 | if( sectionStack[i] instanceof Array ) { 175 | markdownSections += '
'; 176 | 177 | sectionStack[i].forEach( function( child ) { 178 | markdownSections += '
' + createMarkdownSlide( child, options ) + '
'; 179 | } ); 180 | 181 | markdownSections += '
'; 182 | } 183 | else { 184 | markdownSections += '
' + createMarkdownSlide( sectionStack[i], options ) + '
'; 185 | } 186 | } 187 | 188 | return markdownSections; 189 | 190 | } 191 | 192 | /** 193 | * Parses any current data-markdown slides, splits 194 | * multi-slide markdown into separate sections and 195 | * handles loading of external markdown. 196 | */ 197 | function processSlides() { 198 | 199 | return new Promise( function( resolve ) { 200 | 201 | var externalPromises = []; 202 | 203 | [].slice.call( document.querySelectorAll( '[data-markdown]') ).forEach( function( section, i ) { 204 | 205 | if( section.getAttribute( 'data-markdown' ).length ) { 206 | 207 | externalPromises.push( loadExternalMarkdown( section ).then( 208 | 209 | // Finished loading external file 210 | function( xhr, url ) { 211 | section.outerHTML = slidify( xhr.responseText, { 212 | separator: section.getAttribute( 'data-separator' ), 213 | verticalSeparator: section.getAttribute( 'data-separator-vertical' ), 214 | notesSeparator: section.getAttribute( 'data-separator-notes' ), 215 | attributes: getForwardedAttributes( section ) 216 | }); 217 | }, 218 | 219 | // Failed to load markdown 220 | function( xhr, url ) { 221 | debugger 222 | section.outerHTML = '
' + 223 | 'ERROR: The attempt to fetch ' + url + ' failed with HTTP status ' + xhr.status + '.' + 224 | 'Check your browser\'s JavaScript console for more details.' + 225 | '

Remember that you need to serve the presentation HTML from a HTTP server.

' + 226 | '
'; 227 | } 228 | 229 | ) ); 230 | 231 | } 232 | else if( section.getAttribute( 'data-separator' ) || section.getAttribute( 'data-separator-vertical' ) || section.getAttribute( 'data-separator-notes' ) ) { 233 | 234 | section.outerHTML = slidify( getMarkdownFromSlide( section ), { 235 | separator: section.getAttribute( 'data-separator' ), 236 | verticalSeparator: section.getAttribute( 'data-separator-vertical' ), 237 | notesSeparator: section.getAttribute( 'data-separator-notes' ), 238 | attributes: getForwardedAttributes( section ) 239 | }); 240 | 241 | } 242 | else { 243 | section.innerHTML = createMarkdownSlide( getMarkdownFromSlide( section ) ); 244 | } 245 | 246 | }); 247 | 248 | Promise.all( externalPromises ).then( resolve ); 249 | 250 | } ); 251 | 252 | } 253 | 254 | function loadExternalMarkdown( section ) { 255 | 256 | return new Promise( function( resolve, reject ) { 257 | 258 | var xhr = new XMLHttpRequest(), 259 | url = section.getAttribute( 'data-markdown' ); 260 | 261 | datacharset = section.getAttribute( 'data-charset' ); 262 | 263 | // see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes 264 | if( datacharset != null && datacharset != '' ) { 265 | xhr.overrideMimeType( 'text/html; charset=' + datacharset ); 266 | } 267 | 268 | xhr.onreadystatechange = function( section, xhr ) { 269 | if( xhr.readyState === 4 ) { 270 | // file protocol yields status code 0 (useful for local debug, mobile applications etc.) 271 | if ( ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status === 0 ) { 272 | 273 | resolve( xhr, url ); 274 | 275 | } 276 | else { 277 | 278 | reject( xhr, url ); 279 | 280 | } 281 | } 282 | }.bind( this, section, xhr ); 283 | 284 | xhr.open( 'GET', url, true ); 285 | 286 | try { 287 | xhr.send(); 288 | } 289 | catch ( e ) { 290 | alert( 'Failed to get the Markdown file ' + url + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + e ); 291 | resolve( xhr, url ); 292 | } 293 | 294 | } ); 295 | 296 | } 297 | 298 | /** 299 | * Check if a node value has the attributes pattern. 300 | * If yes, extract it and add that value as one or several attributes 301 | * to the target element. 302 | * 303 | * You need Cache Killer on Chrome to see the effect on any FOM transformation 304 | * directly on refresh (F5) 305 | * http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development/7000899#answer-11786277 306 | */ 307 | function addAttributeInElement( node, elementTarget, separator ) { 308 | 309 | var mardownClassesInElementsRegex = new RegExp( separator, 'mg' ); 310 | var mardownClassRegex = new RegExp( "([^\"= ]+?)=\"([^\"=]+?)\"", 'mg' ); 311 | var nodeValue = node.nodeValue; 312 | if( matches = mardownClassesInElementsRegex.exec( nodeValue ) ) { 313 | 314 | var classes = matches[1]; 315 | nodeValue = nodeValue.substring( 0, matches.index ) + nodeValue.substring( mardownClassesInElementsRegex.lastIndex ); 316 | node.nodeValue = nodeValue; 317 | while( matchesClass = mardownClassRegex.exec( classes ) ) { 318 | elementTarget.setAttribute( matchesClass[1], matchesClass[2] ); 319 | } 320 | return true; 321 | } 322 | return false; 323 | } 324 | 325 | /** 326 | * Add attributes to the parent element of a text node, 327 | * or the element of an attribute node. 328 | */ 329 | function addAttributes( section, element, previousElement, separatorElementAttributes, separatorSectionAttributes ) { 330 | 331 | if ( element != null && element.childNodes != undefined && element.childNodes.length > 0 ) { 332 | var previousParentElement = element; 333 | for( var i = 0; i < element.childNodes.length; i++ ) { 334 | var childElement = element.childNodes[i]; 335 | if ( i > 0 ) { 336 | var j = i - 1; 337 | while ( j >= 0 ) { 338 | var aPreviousChildElement = element.childNodes[j]; 339 | if ( typeof aPreviousChildElement.setAttribute == 'function' && aPreviousChildElement.tagName != "BR" ) { 340 | previousParentElement = aPreviousChildElement; 341 | break; 342 | } 343 | j = j - 1; 344 | } 345 | } 346 | var parentSection = section; 347 | if( childElement.nodeName == "section" ) { 348 | parentSection = childElement ; 349 | previousParentElement = childElement ; 350 | } 351 | if ( typeof childElement.setAttribute == 'function' || childElement.nodeType == Node.COMMENT_NODE ) { 352 | addAttributes( parentSection, childElement, previousParentElement, separatorElementAttributes, separatorSectionAttributes ); 353 | } 354 | } 355 | } 356 | 357 | if ( element.nodeType == Node.COMMENT_NODE ) { 358 | if ( addAttributeInElement( element, previousElement, separatorElementAttributes ) == false ) { 359 | addAttributeInElement( element, section, separatorSectionAttributes ); 360 | } 361 | } 362 | } 363 | 364 | /** 365 | * Converts any current data-markdown slides in the 366 | * DOM to HTML. 367 | */ 368 | function convertSlides() { 369 | 370 | var sections = document.querySelectorAll( '[data-markdown]:not([data-markdown-parsed])'); 371 | 372 | [].slice.call( sections ).forEach( function( section ) { 373 | 374 | section.setAttribute( 'data-markdown-parsed', true ) 375 | 376 | var notes = section.querySelector( 'aside.notes' ); 377 | var markdown = getMarkdownFromSlide( section ); 378 | 379 | section.innerHTML = marked( markdown ); 380 | addAttributes( section, section, null, section.getAttribute( 'data-element-attributes' ) || 381 | section.parentNode.getAttribute( 'data-element-attributes' ) || 382 | DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR, 383 | section.getAttribute( 'data-attributes' ) || 384 | section.parentNode.getAttribute( 'data-attributes' ) || 385 | DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR); 386 | 387 | // If there were notes, we need to re-add them after 388 | // having overwritten the section's HTML 389 | if( notes ) { 390 | section.appendChild( notes ); 391 | } 392 | 393 | } ); 394 | 395 | return Promise.resolve(); 396 | 397 | } 398 | 399 | // API 400 | var RevealMarkdown = { 401 | 402 | /** 403 | * Starts processing and converting Markdown within the 404 | * current reveal.js deck. 405 | * 406 | * @param {function} callback function to invoke once 407 | * we've finished loading and parsing Markdown 408 | */ 409 | init: function( callback ) { 410 | 411 | if( typeof marked === 'undefined' ) { 412 | throw 'The reveal.js Markdown plugin requires marked to be loaded'; 413 | } 414 | 415 | if( typeof hljs !== 'undefined' ) { 416 | marked.setOptions({ 417 | highlight: function( code, lang ) { 418 | return hljs.highlightAuto( code, [lang] ).value; 419 | } 420 | }); 421 | } 422 | 423 | // marked can be configured via reveal.js config options 424 | var options = Reveal.getConfig().markdown; 425 | if( options ) { 426 | marked.setOptions( options ); 427 | } 428 | 429 | return processSlides().then( convertSlides ); 430 | 431 | }, 432 | 433 | // TODO: Do these belong in the API? 434 | processSlides: processSlides, 435 | convertSlides: convertSlides, 436 | slidify: slidify 437 | 438 | }; 439 | 440 | // Register our plugin so that reveal.js will call our 441 | // plugin 'init' method as part of the initialization 442 | Reveal.registerPlugin( 'markdown', RevealMarkdown ); 443 | 444 | export default RevealMarkdown; 445 | -------------------------------------------------------------------------------- /src/slideshow/marked.js: -------------------------------------------------------------------------------- 1 | /** 2 | * marked - a markdown parser 3 | * Copyright (c) 2011-2018, Christopher Jeffrey. (MIT Licensed) 4 | * https://github.com/markedjs/marked 5 | */ 6 | !function(e){"use strict";var k={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:f,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:f,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:f,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function a(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||m.defaults,this.rules=k.normal,this.options.pedantic?this.rules=k.pedantic:this.options.gfm&&(this.options.tables?this.rules=k.tables:this.rules=k.gfm)}k._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,k._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,k.def=i(k.def).replace("label",k._label).replace("title",k._title).getRegex(),k.bullet=/(?:[*+-]|\d{1,9}\.)/,k.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,k.item=i(k.item,"gm").replace(/bull/g,k.bullet).getRegex(),k.list=i(k.list).replace(/bull/g,k.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+k.def.source+")").getRegex(),k._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",k._comment=//,k.html=i(k.html,"i").replace("comment",k._comment).replace("tag",k._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),k.paragraph=i(k.paragraph).replace("hr",k.hr).replace("heading",k.heading).replace("lheading",k.lheading).replace("tag",k._tag).getRegex(),k.blockquote=i(k.blockquote).replace("paragraph",k.paragraph).getRegex(),k.normal=d({},k),k.gfm=d({},k.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),k.gfm.paragraph=i(k.paragraph).replace("(?!","(?!"+k.gfm.fences.source.replace("\\1","\\2")+"|"+k.list.source.replace("\\1","\\3")+"|").getRegex(),k.tables=d({},k.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),k.pedantic=d({},k.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",k._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),a.rules=k,a.lex=function(e,t){return new a(t).lex(e)},a.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},a.prototype.token=function(e,t){var n,r,s,i,l,o,a,h,p,u,c,g,f,d,m,b;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),1 ?/gm,""),this.token(s,t),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),a={type:"list_start",ordered:d=1<(i=s[2]).length,start:d?+i:"",loose:!1},this.tokens.push(a),n=!(h=[]),f=(s=s[0].match(this.rules.item)).length,c=0;c?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:f,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:f,text:/^(`+|[^`])[\s\S]*?(?=[\\?@\\[^_{|}~",n.em=i(n.em).replace(/punctuation/g,n._punctuation).getRegex(),n._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,n._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,n._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,n.autolink=i(n.autolink).replace("scheme",n._scheme).replace("email",n._email).getRegex(),n._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,n.tag=i(n.tag).replace("comment",k._comment).replace("attribute",n._attribute).getRegex(),n._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,n._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f\\]*\)|[^\s\x00-\x1f()\\])*?)/,n._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,n.link=i(n.link).replace("label",n._label).replace("href",n._href).replace("title",n._title).getRegex(),n.reflink=i(n.reflink).replace("label",n._label).getRegex(),n.normal=d({},n),n.pedantic=d({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",n._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n._label).getRegex()}),n.gfm=d({},n.normal,{escape:i(n.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:i(n.text).replace("]|","~]|").replace("|$","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|$").getRegex()}),n.gfm.url=i(n.gfm.url,"i").replace("email",n.gfm._extended_email).getRegex(),n.breaks=d({},n.gfm,{br:i(n.br).replace("{2,}","*").getRegex(),text:i(n.gfm.text).replace("{2,}","*").getRegex()}),h.rules=n,h.output=function(e,t,n){return new h(t,n).output(e)},h.prototype.output=function(e){for(var t,n,r,s,i,l,o="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),o+=u(i[1]);else if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(this.inRawBlock=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):u(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,r=i[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],s=t[3]):s="":s=i[3]?i[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),o+=this.outputLink(i,{href:h.escapes(r),title:h.escapes(s)}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[6]||i[5]||i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(u(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),r="@"===i[2]?"mailto:"+(n=u(this.mangle(i[1]))):n=u(i[1]),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.inRawBlock?o+=this.renderer.text(i[0]):o+=this.renderer.text(u(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===i[2])r="mailto:"+(n=u(i[0]));else{for(;l=i[0],i[0]=this.rules._backpedal.exec(i[0])[0],l!==i[0];);n=u(i[0]),r="www."===i[1]?"http://"+n:n}e=e.substring(i[0].length),o+=this.renderer.link(r,null,n)}return o},h.escapes=function(e){return e?e.replace(h.rules._escapes,"$1"):e},h.prototype.outputLink=function(e,t){var n=t.href,r=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,u(e[1]))},h.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},h.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,s=0;s'+(n?e:u(e,!0))+"\n":"
"+(n?e:u(e,!0))+"
"},r.prototype.blockquote=function(e){return"
\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.checkbox=function(e){return" "},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(null===(e=l(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "},r.prototype.image=function(e,t,n){if(null===(e=l(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},r.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},p.parse=function(e,t){return new p(t).parse(e)},p.prototype.parse=function(e){this.inline=new h(e.links,this.options),this.inlineText=new h(e.links,d({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},p.prototype.next=function(){return this.token=this.tokens.pop()},p.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},p.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},p.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s="",i="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t))for(var n=t;this.seen[n]++,t=n+"-"+this.seen[n],this.seen.hasOwnProperty(t););return this.seen[t]=0,t},u.escapeTest=/[&<>"']/,u.escapeReplace=/[&<>"']/g,u.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},u.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,u.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var o={},g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function f(){}function d(e){for(var t,n,r=1;rt)n.splice(t);else for(;n.lengthAn error occurred:

    "+u(e.message+"",!0)+"
    ";throw e}}f.exec=f,m.options=m.setOptions=function(e){return d(m.defaults,e),m},m.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new r,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},m.defaults=m.getDefaults(),m.Parser=p,m.parser=p.parse,m.Renderer=r,m.TextRenderer=s,m.Lexer=a,m.lexer=a.lex,m.InlineLexer=h,m.inlineLexer=h.output,m.Slugger=t,m.parse=m,"undefined"!=typeof module&&"object"==typeof exports?module.exports=m:"function"==typeof define&&define.amd?define(function(){return m}):e.marked=m}(this||("undefined"!=typeof window?window:global)); -------------------------------------------------------------------------------- /src/slideshow/reveal.d.ts: -------------------------------------------------------------------------------- 1 | export interface RevealStatic { 2 | /** 3 | * The reveal.js version 4 | */ 5 | VERSION: string; 6 | 7 | /** 8 | * Starts up the presentation if the client is capable. 9 | */ 10 | initialize: (config?: RevealOptions) => void; 11 | /** 12 | * Applies the configuration settings from the config 13 | * object. May be called multiple times. 14 | */ 15 | configure: (diff: RevealOptions) => void; 16 | 17 | /** 18 | * Steps from the current point in the presentation to the 19 | * slide which matches the specified horizontal and vertical 20 | * indices. 21 | * 22 | * @param {number} [h=indexh] Horizontal index of the target slide 23 | * @param {number} [v=indexv] Vertical index of the target slide 24 | * @param {number} [f] Index of a fragment within the 25 | * target slide to activate 26 | * @param {number} [o] Origin for use in multimaster environments 27 | */ 28 | slide(indexh: number, indexv?: number, f?: number, o?: number): void; 29 | /** 30 | * Navigation methods 31 | */ 32 | left(): void; 33 | /** 34 | * Navigation methods 35 | */ 36 | right(): void; 37 | /** 38 | * Navigation methods 39 | */ 40 | up(): void; 41 | /** 42 | * Navigation methods 43 | */ 44 | down(): void; 45 | /** 46 | * Navigates backwards, prioritized in the following order: 47 | * 1) Previous fragment 48 | * 2) Previous vertical slide 49 | * 3) Previous horizontal slide 50 | */ 51 | prev(): void; 52 | /** 53 | * The reverse of #navigatePrev(). 54 | */ 55 | next(): void; 56 | 57 | /** 58 | * Navigate to the specified slide fragment. 59 | * 60 | * @param {?number} index The index of the fragment that 61 | * should be shown, -1 means all are invisible 62 | * @param {number} offset Integer offset to apply to the 63 | * fragment index 64 | * 65 | * @return {boolean} true if a change was made in any 66 | * fragments visibility as part of this call 67 | */ 68 | navigateFragment(index: number | null, offset: number): boolean; 69 | /** 70 | * Navigate to the previous slide fragment. 71 | * 72 | * @return {boolean} true if there was a previous fragment, 73 | * false otherwise 74 | */ 75 | prevFragment(): boolean; 76 | /** 77 | * Navigate to the next slide fragment. 78 | * 79 | * @return {boolean} true if there was a next fragment, 80 | * false otherwise 81 | */ 82 | nextFragment(): boolean; 83 | 84 | /** 85 | * Randomize the order of slides 86 | */ 87 | shuffle(): void; 88 | 89 | /** 90 | * Toggles the overview mode on/off 91 | * @param override 92 | */ 93 | toggleOverview(override?: boolean): void; 94 | /** 95 | * Toggles the "black screen" mode on/off 96 | * @param override 97 | */ 98 | togglePause(override?: boolean): void; 99 | /** 100 | * Toggles the auto slide mode on/off 101 | * @param override 102 | */ 103 | toggleAutoSlide(override?: boolean): void; 104 | /** 105 | * Open or close help overlay window. 106 | * 107 | * @param {Boolean} [override] Flag which overrides the 108 | * toggle logic and forcibly sets the desired state. True means 109 | * help is open, false means it's closed. 110 | */ 111 | toggleHelp(override?: boolean): void; 112 | 113 | /** 114 | * Returns the previous slide element, may be null 115 | */ 116 | getPreviousSlide(): Element | null; 117 | /** 118 | * Returns the current slide element 119 | */ 120 | getCurrentSlide(): Element; 121 | 122 | /** 123 | * Returns the indices of the current, or specified, slide 124 | * @param slide 125 | */ 126 | getIndices(slide?: Element): { h: number; v: number }; 127 | /** 128 | * Presentation progress on range of 0-1 129 | */ 130 | getProgress(): number; 131 | /** 132 | * Returns the total number of slides 133 | */ 134 | getTotalSlides(): number; 135 | 136 | /** 137 | * Returns the speaker notes string for a slide, or null 138 | * @param slide 139 | */ 140 | getSlideNotes(slide?: Element): string | null; 141 | 142 | /** 143 | * Forward event binding to the reveal DOM element 144 | * @param type 145 | * @param listener 146 | * @param useCapture 147 | */ 148 | addEventListener(type: string, listener: (event: any) => void, useCapture?: boolean): void; 149 | /** 150 | * Forward event binding to the reveal DOM element 151 | * @param type 152 | * @param listener 153 | * @param useCapture 154 | */ 155 | removeEventListener(type: string, listener: (event: any) => void, useCapture?: boolean): void; 156 | 157 | /** 158 | * Returns true if we're currently on the first slide 159 | */ 160 | isFirstSlide(): boolean; 161 | /** 162 | * Returns true if we're currently on the last slide 163 | */ 164 | isLastSlide(): boolean; 165 | /** 166 | * Returns true if we're on the last slide in the current vertical stack 167 | */ 168 | isLastVerticalSlide(): boolean; 169 | /** 170 | * Checks if we are currently in the paused mode. 171 | */ 172 | isPaused(): boolean; 173 | /** 174 | * Checks if the overview is currently active. 175 | * 176 | * @return {Boolean} true if the overview is active, 177 | * false otherwise 178 | */ 179 | isOverview(): boolean; 180 | /** 181 | * Checks if the auto slide mode is currently on. 182 | */ 183 | isAutoSliding(): boolean; 184 | 185 | /** 186 | * Forces an update in slide layout 187 | */ 188 | layout(): void; 189 | /** 190 | * Adds all internal event listeners (such as keyboard) 191 | */ 192 | addEventListeners(): void; 193 | /** 194 | * Removes all internal event listeners (such as keyboard) 195 | */ 196 | removeEventListeners(): void; 197 | /** 198 | * Returns the slide element at the specified index 199 | * @param x 200 | * @param y 201 | */ 202 | getSlide(x: number, y?: number): Element; 203 | /** 204 | * Returns the current scale of the presentation content 205 | */ 206 | getScale(): number; 207 | /** 208 | * Returns the current configuration object 209 | */ 210 | getConfig(): RevealOptions; 211 | /** 212 | * Helper method, retrieves query string as a key/value hash 213 | */ 214 | getQueryHash(): Record; 215 | /** 216 | * Facility for persisting and restoring the presentation state 217 | * @param state 218 | */ 219 | setState(state: any): void; 220 | /** 221 | * Facility for persisting and restoring the presentation state 222 | */ 223 | getState(): any; 224 | 225 | /** 226 | * update slides after dynamic changes 227 | */ 228 | sync(): void; 229 | /** 230 | * Updates reveal.js to keep in sync with new slide attributes. For 231 | * example, if you add a new `data-background-image` you can call 232 | * this to have reveal.js render the new background image. 233 | * 234 | * Similar to #sync() but more efficient when you only need to 235 | * refresh a specific slide. 236 | * 237 | * @param {HTMLElement} slide 238 | */ 239 | syncSlide(slide: HTMLElement): void; 240 | /** 241 | * Formats the fragments on the given slide so that they have 242 | * valid indices. Call this if fragments are changed in the DOM 243 | * after reveal.js has already initialized. 244 | * 245 | * @param {HTMLElement} slide 246 | * @return {Array} a list of the HTML fragments that were synced 247 | */ 248 | syncFragments(slide: HTMLElement): HTMLElement[]; 249 | /** 250 | * Checks if reveal.js has been loaded and is ready for use 251 | */ 252 | isReady(): boolean; 253 | 254 | /** 255 | * @alias slide 256 | * @deprecated 257 | */ 258 | navigateTo(indexh: number, indexv?: number, f?: number, o?: number): void; 259 | /** 260 | * @alias left 261 | * @deprecated 262 | */ 263 | navigateLeft(): void; 264 | /** 265 | * @alias right 266 | * @deprecated 267 | */ 268 | navigateRight(): void; 269 | /** 270 | * @alias up 271 | * @deprecated 272 | */ 273 | navigateUp(): void; 274 | /** 275 | * @alias down 276 | * @deprecated 277 | */ 278 | navigateDown(): void; 279 | /** 280 | * @alias prev 281 | * @deprecated 282 | */ 283 | navigatePrev(): void; 284 | /** 285 | * @alias next 286 | * @deprecated 287 | */ 288 | navigateNext(): void; 289 | 290 | /** 291 | * Determine what available routes there are for navigation. 292 | * 293 | * @return {{left: boolean, right: boolean, up: boolean, down: boolean}} 294 | */ 295 | availableRoutes(): { left: boolean; right: boolean; up: boolean; down: boolean }; 296 | /** 297 | * Returns an object describing the available fragment 298 | * directions. 299 | * 300 | * @return {{prev: boolean, next: boolean}} 301 | */ 302 | availableFragments(): { prev: boolean; next: boolean }; 303 | /** 304 | * Called when the given slide is within the configured view 305 | * distance. Shows the slide element and loads any content 306 | * that is set to load lazily (data-src). 307 | * 308 | * @param {HTMLElement} slide Slide to show 309 | */ 310 | loadSlide(slide: HTMLElement): void; 311 | /** 312 | * Unloads and hides the given slide. This is called when the 313 | * slide is moved outside of the configured view distance. 314 | * 315 | * @param {HTMLElement} slide 316 | */ 317 | unloadSlide(): HTMLElement; 318 | /** 319 | * Returns the number of past slides. This can be used as a global 320 | * flattened index for slides. 321 | * 322 | * @return {number} Past slide count 323 | */ 324 | getSlidePastCount(): number; 325 | /** 326 | * Returns an array of objects where each object represents the 327 | * attributes on its respective slide. 328 | */ 329 | getSlidesAttributes(): Record[]; 330 | /** 331 | * Retrieves all slides in this presentation. 332 | */ 333 | getSlides(): Element[]; 334 | /** 335 | * Returns the background element for the given slide. 336 | * All slides, even the ones with no background properties 337 | * defined, have a background element so as long as the 338 | * index is valid an element will be returned. 339 | * 340 | * @param {mixed} x Horizontal background index OR a slide 341 | * HTML element 342 | * @param {number} y Vertical background index 343 | * @return {(HTMLElement[]|*)} 344 | */ 345 | getSlideBackground(x: number | Element, y: number): HTMLElement[] | undefined; 346 | /** 347 | * Returns the top-level DOM element 348 | */ 349 | getRevealElement(): Element | Element[]; 350 | /** 351 | * Returns a hash with all registered plugins 352 | */ 353 | getPlugins(): Record; 354 | /** 355 | * Add a custom key binding with optional description to 356 | * be added to the help screen. 357 | */ 358 | addKeyBinding( 359 | binding: 360 | | string 361 | | { 362 | keyCode: string; 363 | key?: string; 364 | description?: string; 365 | }, 366 | callback: () => void 367 | ): void; 368 | /** 369 | * Removes the specified custom key binding. 370 | */ 371 | removeKeyBinding(keyCode: string): void; 372 | /** 373 | * Registers a new plugin with this reveal.js instance. 374 | * 375 | * reveal.js waits for all regisered plugins to initialize 376 | * before considering itself ready, as long as the plugin 377 | * is registered before calling `Reveal.initialize()`. 378 | */ 379 | registerPlugin(id: string, plugin: any): any; 380 | /** 381 | * Checks if a specific plugin has been registered. 382 | * 383 | * @param {String} id Unique plugin identifier 384 | */ 385 | hasPlugin(id: string): boolean; 386 | /** 387 | * Returns the specific plugin instance, if a plugin 388 | * with the given ID has been registered. 389 | * 390 | * @param {String} id Unique plugin identifier 391 | */ 392 | getPlugin(id: string): any; 393 | /** 394 | * Programmatically triggers a keyboard event 395 | */ 396 | triggerKey(keyCode: string): void; 397 | /** 398 | * Registers a new shortcut to include in the help overlay 399 | */ 400 | registerKeyboardShortcut(key: string, value: any): void; 401 | } 402 | 403 | interface RevealOptions { 404 | /** 405 | * Display presentation control arrows 406 | * @default true 407 | */ 408 | controls?: boolean; 409 | /** 410 | * Help the user learn the controls by providing hints, for example by 411 | * bouncing the down arrow when they first encounter a vertical slide 412 | * @default true 413 | */ 414 | controlsTutorial?: boolean; 415 | /** 416 | * Determines where controls appear, "edges" or "bottom-right" 417 | * @default "bottom-right" 418 | */ 419 | controlsLayout?: "edges" | "bottom-right"; 420 | /** 421 | * Visibility rule for backwards navigation arrows; "faded", "hidden" 422 | * or "visible" 423 | * @default "faded" 424 | */ 425 | controlsBackArrows?: "faded" | "hidden" | "visible"; 426 | /** 427 | * Display a presentation progress bar 428 | * @default true 429 | */ 430 | progress?: boolean; 431 | /** 432 | * Display the page number of the current slide 433 | * - true: Show slide number 434 | * - false: Hide slide number 435 | * 436 | * Can optionally be set as a string that specifies the number formatting: 437 | * - "h.v": Horizontal . vertical slide number (default) 438 | * - "h/v": Horizontal / vertical slide number 439 | * - "c": Flattened slide number 440 | * - "c/t": Flattened slide number / total slides 441 | * 442 | * Alternatively, you can provide a function that returns the slide 443 | * number for the current slide. The function needs to return an array 444 | * with one string [slideNumber] or three strings [n1,delimiter,n2]. 445 | * See #formatSlideNumber(). 446 | * 447 | * 448 | * @default false 449 | */ 450 | slideNumber?: boolean | string | (() => [string] | [string, string, string]); 451 | /** 452 | * Can be used to limit the contexts in which the slide number appears 453 | * - "all": Always show the slide number 454 | * - "print": Only when printing to PDF 455 | * - "speaker": Only in the speaker view 456 | * 457 | * @default "all" 458 | */ 459 | showSlideNumber?: "all" | "print" | "speaker"; 460 | 461 | /** 462 | * Push each slide change to the browser history. Implies `hash: true` 463 | * @default false 464 | */ 465 | history?: boolean; 466 | 467 | /** 468 | * Enable keyboard shortcuts for navigation 469 | * 470 | * 471 | * @default true 472 | */ 473 | keyboard?: boolean | Record void)>; 474 | /** 475 | * Optional function that blocks keyboard events when retuning false 476 | * @default null 477 | */ 478 | keyboardCondition?: (() => boolean) | null; 479 | /** 480 | * Enable the slide overview mode 481 | * @default true 482 | */ 483 | overview?: boolean; 484 | /** 485 | * Vertical centering of slides 486 | * @default true 487 | */ 488 | center?: boolean; 489 | /** 490 | * Enables touch navigation on devices with touch input 491 | * @default true 492 | */ 493 | touch?: boolean; 494 | /** 495 | * Loop the presentation 496 | * @default true 497 | */ 498 | loop?: boolean; 499 | /** 500 | * Change the presentation direction to be RTL 501 | * @default true 502 | */ 503 | rtl?: boolean; 504 | /** 505 | * Randomizes the order of slides each time the presentation loads 506 | * @default false 507 | */ 508 | shuffle?: boolean; 509 | /** 510 | * Turns fragments on and off globally 511 | * @default true 512 | */ 513 | fragments?: boolean; 514 | /** 515 | * Flags whether to include the current fragment in the URL, 516 | * so that reloading brings you to the same fragment position 517 | * @default false 518 | */ 519 | fragmentInURL?: boolean; 520 | /** 521 | * Flags if the presentation is running in an embedded mode, 522 | * i.e. contained within a limited portion of the screen 523 | * @default false 524 | */ 525 | embedded?: boolean; 526 | /** 527 | * Flags if we should show a help overlay when the question-mark 528 | * key is pressed 529 | * @default true 530 | */ 531 | help?: boolean; 532 | /** 533 | * Flags if speaker notes should be visible to all viewers 534 | * @default false 535 | */ 536 | showNotes?: boolean; 537 | /** 538 | * Controls automatic progression to the next slide 539 | * - 0: Auto-sliding only happens if the data-autoslide HTML attribute 540 | * is present on the current slide or fragment 541 | * - 1+: All slides will progress automatically at the given interval 542 | * - false: No auto-sliding, even if data-autoslide is present 543 | * 544 | * @default 0 545 | */ 546 | autoSlide?: number | false; 547 | /** 548 | * Stop auto-sliding after user input 549 | * @default true 550 | */ 551 | autoSlideStoppable?: boolean; 552 | /** 553 | * Use this method for navigation when auto-sliding (defaults to navigateNext) 554 | * @default navigateNext 555 | */ 556 | autoSlideMethod?: any; 557 | /** 558 | * Enable slide navigation via mouse wheel 559 | * @default false 560 | */ 561 | mouseWheel?: boolean; 562 | /** 563 | * Hides the address bar on mobile devices 564 | * @default true 565 | */ 566 | hideAddressBar?: boolean; 567 | /** 568 | * Opens links in an iframe preview overlay 569 | * Add `data-preview-link` and `data-preview-link="false"` to customise each link 570 | * individually 571 | * @default false 572 | */ 573 | previewLinks?: boolean; 574 | /** 575 | * Transition style 576 | * @default "slide" 577 | */ 578 | transition?: "none" | "fade" | "slide" | "convex" | "concave" | "zoom"; 579 | /** 580 | * Transition speed 581 | * @default "default" 582 | */ 583 | transitionSpeed?: "default" | "fast" | "slow"; 584 | /** 585 | * Transition style for full page slide backgrounds 586 | * @default "fade" 587 | */ 588 | backgroundTransition?: "none" | "fade" | "slide" | "convex" | "concave" | "zoom"; 589 | /** 590 | * Number of slides away from the current that are visible 591 | * @default 3 592 | */ 593 | viewDistance?: number; 594 | 595 | /** 596 | * Parallax background image 597 | * CSS syntax, e.g. "a.jpg" 598 | * https://github.com/hakimel/reveal.js/#parallax-background 599 | * @default "" 600 | */ 601 | parallaxBackgroundImage?: string; 602 | 603 | /** 604 | * Parallax background size 605 | * CSS syntax, e.g. "3000px 2000px" 606 | * @default "" 607 | */ 608 | parallaxBackgroundSize?: string; 609 | 610 | /** 611 | * Number of pixels to move the parallax background per slide 612 | * - Calculated automatically unless specified 613 | * - Set to 0 to disable movement along an axis 614 | * @default null 615 | */ 616 | parallaxBackgroundHorizontal?: number | null; 617 | /** 618 | * Number of pixels to move the parallax background per slide 619 | * - Calculated automatically unless specified 620 | * - Set to 0 to disable movement along an axis 621 | * @default null 622 | */ 623 | parallaxBackgroundVertical?: number | null; 624 | /** 625 | * Parallax background repeat 626 | * @default "" 627 | */ 628 | parallaxBackgroundRepeat?: "repeat" | "repeat-x" | "repeat-y" | "no-repeat" | "initial" | "inherit"; 629 | /** 630 | * Parallax background position 631 | * CSS syntax, e.g. "top left" 632 | * @default "" 633 | */ 634 | parallaxBackgroundPosition?: string; 635 | /** 636 | * Apply a 3D roll to links on hover 637 | * @default false 638 | */ 639 | rollingLinks?: boolean; 640 | theme?: string; 641 | 642 | /** 643 | * The "normal" size of the presentation, aspect ratio will be preserved 644 | * when the presentation is scaled to fit different resolutions 645 | * 646 | * 647 | * @default 960 648 | */ 649 | width?: number | string; 650 | /** 651 | * The "normal" size of the presentation, aspect ratio will be preserved 652 | * when the presentation is scaled to fit different resolutions 653 | * 654 | * 655 | * @default 700 656 | */ 657 | height?: number | string; 658 | /** 659 | * Factor of the display size that should remain empty around the content 660 | * @default 0.04 661 | */ 662 | margin?: number | string; 663 | /** 664 | * Bounds for smallest/largest possible scale to apply to content 665 | * @default 0.2 666 | */ 667 | minScale?: number | string; 668 | /** 669 | * Bounds for smallest/largest possible scale to apply to content 670 | * @default 2.0 671 | */ 672 | maxScale?: number | string; 673 | 674 | /** 675 | * Script dependencies to load 676 | * https://github.com/hakimel/reveal.js/#dependencies> 677 | */ 678 | dependencies?: RevealDependency[]; 679 | 680 | /** 681 | * Exposes the reveal.js API through window.postMessage 682 | * @default true 683 | */ 684 | postMessage?: boolean; 685 | 686 | /** 687 | * Dispatches all reveal.js events to the parent window through postMessage 688 | * @default false 689 | */ 690 | postMessageEvents?: boolean; 691 | 692 | /** 693 | * https://github.com/hakimel/reveal.js/#multiplexing 694 | */ 695 | multiplex?: MultiplexConfig; 696 | 697 | /** 698 | * https://github.com/hakimel/reveal.js/#mathjax 699 | */ 700 | math?: MathConfig; 701 | 702 | /** 703 | * Use 1 based indexing for # links to match slide number (default is zero based) 704 | * @default false 705 | */ 706 | hashOneBasedIndex?: boolean; 707 | /** 708 | * Add the current slide number to the URL hash so that reloading the 709 | * page/copying the URL will return you to the same slide 710 | * @default false 711 | */ 712 | hash?: boolean; 713 | 714 | /** 715 | * Disables the default reveal.js slide layout so that you can use 716 | * custom CSS layout 717 | * @default false 718 | */ 719 | disableLayout?: boolean; 720 | 721 | /** 722 | * Changes the behavior of our navigation directions. 723 | * 724 | * "default" 725 | * Left/right arrow keys step between horizontal slides, up/down 726 | * arrow keys step between vertical slides. Space key steps through 727 | * all slides (both horizontal and vertical). 728 | * 729 | * "linear" 730 | * Removes the up/down arrows. Left/right arrows step through all 731 | * slides (both horizontal and vertical). 732 | * 733 | * "grid" 734 | * When this is enabled, stepping left/right from a vertical stack 735 | * to an adjacent vertical stack will land you at the same vertical 736 | * index. 737 | * 738 | * Consider a deck with six slides ordered in two vertical stacks: 739 | * 1.1 2.1 740 | * 1.2 2.2 741 | * 1.3 2.3 742 | * 743 | * If you're on slide 1.3 and navigate right, you will normally move 744 | * from 1.3 -> 2.1. If "grid" is used, the same navigation takes you 745 | * from 1.3 -> 2.3. 746 | */ 747 | navigationMode?: "default" | "linear" | "grid"; 748 | 749 | /** 750 | * Flags if it should be possible to pause the presentation (blackout) 751 | * @default true 752 | */ 753 | pause?: boolean; 754 | 755 | /** 756 | * Global override for autolaying embedded media (video/audio/iframe) 757 | * - null: Media will only autoplay if data-autoplay is present 758 | * - true: All media will autoplay, regardless of individual setting 759 | * - false: No media will autoplay, regardless of individual setting 760 | * 761 | * @default null 762 | */ 763 | autoplayMedia?: boolean | null; 764 | 765 | /** 766 | * Global override for preloading lazy-loaded iframes 767 | * - null: Iframes with data-src AND data-preload will be loaded when within 768 | * the viewDistance, iframes with only data-src will be loaded when visible 769 | * - true: All iframes with data-src will be loaded when within the viewDistance 770 | * - false: All iframes with data-src will be loaded only when visible 771 | * 772 | * @default null 773 | */ 774 | preloadIframes?: boolean | null; 775 | 776 | /** 777 | * Specify the average time in seconds that you think you will spend 778 | * presenting each slide. This is used to show a pacing timer in the 779 | * speaker view 780 | * @default null 781 | */ 782 | defaultTiming?: number | null; 783 | 784 | /** 785 | * Focuses body when page changes visibility to ensure keyboard shortcuts work 786 | * @default true 787 | */ 788 | focusBodyOnPageVisibilityChange?: boolean; 789 | 790 | /** 791 | * The maximum number of pages a single slide can expand onto when printing 792 | * to PDF, unlimited by default 793 | * @default Number.POSITIVE_INFINITY 794 | */ 795 | pdfMaxPagesPerSlide?: number; 796 | 797 | /** 798 | * Prints each fragment on a separate slide 799 | * @default true 800 | */ 801 | pdfSeparateFragments?: boolean; 802 | 803 | /** 804 | * Offset used to reduce the height of content within exported PDF pages. 805 | * This exists to account for environment differences based on how you 806 | * print to PDF. CLI printing options, like phantomjs and wkpdf, can end 807 | * on precisely the total height of the document whereas in-browser 808 | * printing has to end one pixel before. 809 | */ 810 | pdfPageHeightOffset?: number; 811 | 812 | /** 813 | * The display mode that will be used to show slides 814 | * @default "block" 815 | */ 816 | display?: string; 817 | 818 | /** 819 | * Hide cursor if inactive 820 | * @default true 821 | */ 822 | hideInactiveCursor?: boolean; 823 | 824 | /** 825 | * Time before the cursor is hidden (in ms) 826 | * @default 5000 827 | */ 828 | hideCursorTime?: number; 829 | } 830 | 831 | /** 832 | * https://github.com/hakimel/reveal.js/#slide-changed-event 833 | */ 834 | interface SlideEvent { 835 | previousSlide?: Element; 836 | currentSlide: Element; 837 | indexh: number; 838 | indexv?: number; 839 | } 840 | 841 | /** 842 | * https://github.com/hakimel/reveal.js/#fragment-events 843 | */ 844 | interface FragmentEvent { 845 | fragment: Element; 846 | } 847 | 848 | /** 849 | * https://github.com/hakimel/reveal.js/#multiplexing 850 | */ 851 | interface MultiplexConfig { 852 | /** 853 | * Obtained from the socket.io server. Gives this (the master) control of the presentation 854 | */ 855 | secret?: string; 856 | /** 857 | * Obtained from the socket.io server 858 | */ 859 | id: string; 860 | /** 861 | * Location of socket.io server 862 | */ 863 | url: string; 864 | } 865 | 866 | /** 867 | * https://github.com/hakimel/reveal.js/#mathjax 868 | */ 869 | interface MathConfig { 870 | /** 871 | * Obtained from the socket.io server. Gives this (the master) control of the presentation 872 | */ 873 | mathjax: string; 874 | /** 875 | * Obtained from the socket.io server 876 | */ 877 | config: string; 878 | } 879 | 880 | /** 881 | * https://github.com/hakimel/reveal.js/#dependencies 882 | */ 883 | interface RevealDependency { 884 | src: string; 885 | condition?: () => boolean; 886 | async?: boolean; 887 | callback?: () => void; 888 | } 889 | -------------------------------------------------------------------------------- /src/slideshow/slideshow.ts: -------------------------------------------------------------------------------- 1 | declare const sandbox: ReturnType; 2 | 3 | import reveal from "reveal.js" 4 | export const revealJS = reveal as import("./reveal").RevealStatic 5 | 6 | export const startSlides = (url: string) => { 7 | // Expects a URL like https://gist.github.com/orta/d7dbd4cdb8d1f99c52871fb15db620bc 8 | // Convert to: https://gist.githubusercontent.com/orta/d7dbd4cdb8d1f99c52871fb15db620bc/raw/index.md 9 | // 10 | const rawURL = url.replace("https://gist.github.com", "https://gist.githubusercontent.com") 11 | return fetch(rawURL + "/raw/index.md", {cache: "no-store"}).then(r => { 12 | return r.text() 13 | }).then(markdown => { 14 | const main = document.body 15 | const divReveal = document.createElement("div") 16 | divReveal.className = "reveal" 17 | main.insertBefore(divReveal, main.firstChild) 18 | 19 | const div = document.createElement("div") 20 | div.className = "slides" 21 | divReveal.appendChild(div) 22 | 23 | const section = document.createElement("section") 24 | section.setAttribute("data-markdown", "") 25 | section.setAttribute("data-separator", "---") 26 | div.appendChild(section) 27 | 28 | const textarea = document.createElement("textarea") 29 | textarea.setAttribute("data-template", "") 30 | textarea.textContent = markdown 31 | section.appendChild(textarea) 32 | 33 | 34 | const addCSS = (href: string) => { 35 | var link = document.createElement("link"); 36 | link.type = "text/css"; 37 | link.rel = "stylesheet"; 38 | link.href = href; 39 | document.head.appendChild(link) 40 | } 41 | 42 | const isDev = document.location.host.includes("localhost") 43 | const unpkgURL = "https://unpkg.com/typescript-playground-presentation-mode/dist/slideshow.css" 44 | const href2 = isDev ? "http://localhost:5000/slideshow.css" : unpkgURL 45 | addCSS(href2) 46 | 47 | revealJS.initialize({ 48 | keyboard: { 49 | 27: function() { 50 | const top = document.getElementsByClassName("raised")[0] 51 | top.scrollIntoView(true) 52 | sandbox.editor.focus() 53 | }, 54 | }, 55 | controlsTutorial: false, 56 | overview: false, 57 | fragments: false, 58 | }) 59 | 60 | // All this faff is because the viewport will be at the bottom briefly during initialization, 61 | // which means the first slide is way off, so we force it to the top, make it invisivle, delay a 62 | // few ms do a re-layout and show the slides in the right position 63 | window.scrollTo({ top: 0 }) 64 | const element = revealJS.getRevealElement() as HTMLElement 65 | element.style.opacity = "0" 66 | setTimeout(() => { 67 | revealJS.layout() 68 | element.style.opacity = "100" 69 | }, 300) 70 | 71 | // Hook into the reveal JS slide changed notifications so that we can update monaco underneath 72 | revealJS.addEventListener("slidechanged", (deets: SlideChanged) => { 73 | if (deets.currentSlide && deets.currentSlide.getElementsByTagName("playground")) { 74 | const code = deets.currentSlide.getElementsByTagName("playground")[0]! 75 | if (code && code.textContent) { 76 | sandbox.setText(code.textContent.trim()) 77 | } 78 | } 79 | }) 80 | }) 81 | 82 | // rElement.focus()/ 83 | 84 | } 85 | 86 | interface SlideChanged { 87 | indexh: number 88 | indexv: number 89 | previousSlide: Element 90 | currentSlide: Element 91 | origin: any 92 | } 93 | -------------------------------------------------------------------------------- /src/vendor/ds/createDesignSystem.d.ts: -------------------------------------------------------------------------------- 1 | import type { Sandbox } from "../sandbox"; 2 | import type { DiagnosticRelatedInformation, Node } from "typescript"; 3 | export declare type LocalStorageOption = { 4 | blurb: string; 5 | flag: string; 6 | display: string; 7 | emptyImpliesEnabled?: true; 8 | oneline?: true; 9 | requireRestart?: true; 10 | onchange?: (newValue: boolean) => void; 11 | }; 12 | export declare type OptionsListConfig = { 13 | style: "separated" | "rows"; 14 | requireRestart?: true; 15 | }; 16 | export declare const createDesignSystem: (sandbox: Sandbox) => (container: Element) => { 17 | /** Clear the sidebar */ 18 | clear: () => void; 19 | /** Present code in a pre > code */ 20 | code: (code: string) => HTMLElement; 21 | /** Ideally only use this once, and maybe even prefer using subtitles everywhere */ 22 | title: (title: string) => HTMLElement; 23 | /** Used to denote sections, give info etc */ 24 | subtitle: (subtitle: string) => HTMLElement; 25 | /** Used to show a paragraph */ 26 | p: (subtitle: string) => HTMLElement; 27 | /** When you can't do something, or have nothing to show */ 28 | showEmptyScreen: (message: string) => HTMLDivElement; 29 | /** 30 | * Shows a list of hoverable, and selectable items (errors, highlights etc) which have code representation. 31 | * The type is quite small, so it should be very feasible for you to massage other data to fit into this function 32 | */ 33 | listDiags: (model: import("monaco-editor").editor.ITextModel, diags: DiagnosticRelatedInformation[]) => HTMLUListElement; 34 | /** Shows a single option in local storage (adds an li to the container BTW) */ 35 | localStorageOption: (setting: LocalStorageOption) => HTMLLIElement; 36 | /** Uses localStorageOption to create a list of options */ 37 | showOptionList: (options: LocalStorageOption[], style: OptionsListConfig) => void; 38 | /** Shows a full-width text input */ 39 | createTextInput: (config: { 40 | id: string; 41 | placeholder: string; 42 | onChanged?: ((text: string, input: HTMLInputElement) => void) | undefined; 43 | onEnter: (text: string, input: HTMLInputElement) => void; 44 | value?: string | undefined; 45 | keepValueAcrossReloads?: true | undefined; 46 | isEnabled?: ((input: HTMLInputElement) => boolean) | undefined; 47 | }) => HTMLFormElement; 48 | /** Renders an AST tree */ 49 | createASTTree: (node: Node) => HTMLDivElement; 50 | /** Creates an input button */ 51 | button: (settings: { 52 | label: string; 53 | onclick?: ((ev: MouseEvent) => void) | undefined; 54 | }) => HTMLInputElement; 55 | /** Used to re-create a UI like the tab bar at the top of the plugins section */ 56 | createTabBar: () => HTMLDivElement; 57 | /** Used with createTabBar to add buttons */ 58 | createTabButton: (text: string) => HTMLButtonElement; 59 | /** A general "restart your browser" message */ 60 | declareRestartRequired: (i?: ((key: string) => string) | undefined) => void; 61 | }; 62 | -------------------------------------------------------------------------------- /src/vendor/playground.d.ts: -------------------------------------------------------------------------------- 1 | declare type Sandbox = import("./sandbox").Sandbox; 2 | declare type Monaco = typeof import("monaco-editor"); 3 | import { PluginUtils } from "./pluginUtils"; 4 | import type React from "react"; 5 | export { PluginUtils } from "./pluginUtils"; 6 | export declare type PluginFactory = { 7 | (i: (key: string, components?: any) => string, utils: PluginUtils): PlaygroundPlugin; 8 | }; 9 | /** The interface of all sidebar plugins */ 10 | export interface PlaygroundPlugin { 11 | /** Not public facing, but used by the playground to uniquely identify plugins */ 12 | id: string; 13 | /** To show in the tabs */ 14 | displayName: string; 15 | /** Should this plugin be selected when the plugin is first loaded? Lets you check for query vars etc to load a particular plugin */ 16 | shouldBeSelected?: () => boolean; 17 | /** Before we show the tab, use this to set up your HTML - it will all be removed by the playground when someone navigates off the tab */ 18 | willMount?: (sandbox: Sandbox, container: HTMLDivElement) => void; 19 | /** After we show the tab */ 20 | didMount?: (sandbox: Sandbox, container: HTMLDivElement) => void; 21 | /** Model changes while this plugin is actively selected */ 22 | modelChanged?: (sandbox: Sandbox, model: import("monaco-editor").editor.ITextModel, container: HTMLDivElement) => void; 23 | /** Delayed model changes while this plugin is actively selected, useful when you are working with the TS API because it won't run on every keypress */ 24 | modelChangedDebounce?: (sandbox: Sandbox, model: import("monaco-editor").editor.ITextModel, container: HTMLDivElement) => void; 25 | /** Before we remove the tab */ 26 | willUnmount?: (sandbox: Sandbox, container: HTMLDivElement) => void; 27 | /** After we remove the tab */ 28 | didUnmount?: (sandbox: Sandbox, container: HTMLDivElement) => void; 29 | /** An object you can use to keep data around in the scope of your plugin object */ 30 | data?: any; 31 | } 32 | interface PlaygroundConfig { 33 | /** Language like "en" / "ja" etc */ 34 | lang: string; 35 | /** Site prefix, like "v2" during the pre-release */ 36 | prefix: string; 37 | /** Optional plugins so that we can re-use the playground with different sidebars */ 38 | plugins?: PluginFactory[]; 39 | /** Should this playground load up custom plugins from localStorage? */ 40 | supportCustomPlugins: boolean; 41 | } 42 | export declare const setupPlayground: (sandbox: Sandbox, monaco: Monaco, config: PlaygroundConfig, i: (key: string) => string, react: typeof React) => { 43 | exporter: { 44 | openProjectInStackBlitz: () => void; 45 | openProjectInCodeSandbox: () => void; 46 | reportIssue: () => Promise; 47 | copyAsMarkdownIssue: () => Promise; 48 | copyForChat: () => void; 49 | copyForChatWithPreview: () => void; 50 | openInTSAST: () => void; 51 | }; 52 | // ui: import("./createUI").UI; 53 | registerPlugin: (plugin: PlaygroundPlugin) => void; 54 | plugins: PlaygroundPlugin[]; 55 | getCurrentPlugin: () => PlaygroundPlugin; 56 | tabs: HTMLButtonElement[]; 57 | setDidUpdateTab: (func: (newPlugin: PlaygroundPlugin, previousPlugin: PlaygroundPlugin) => void) => void; 58 | createUtils: (sb: any, react: typeof React) => { 59 | el: (str: string, elementType: string, container: Element) => HTMLElement; 60 | requireURL: (path: string) => string; 61 | react: typeof React; 62 | createDesignSystem: (container: Element) => { 63 | clear: () => void; 64 | code: (code: string) => HTMLElement; 65 | title: (title: string) => HTMLElement; 66 | subtitle: (subtitle: string) => HTMLElement; 67 | p: (subtitle: string) => HTMLElement; 68 | showEmptyScreen: (message: string) => HTMLDivElement; 69 | listDiags: (model: import("monaco-editor").editor.ITextModel, diags: import("typescript").DiagnosticRelatedInformation[]) => HTMLUListElement; 70 | localStorageOption: (setting: import("./ds/createDesignSystem").LocalStorageOption) => HTMLLIElement; 71 | showOptionList: (options: import("./ds/createDesignSystem").LocalStorageOption[], style: import("./ds/createDesignSystem").OptionsListConfig) => void; 72 | createTextInput: (config: { 73 | id: string; 74 | placeholder: string; 75 | onChanged?: ((text: string, input: HTMLInputElement) => void) | undefined; 76 | onEnter: (text: string, input: HTMLInputElement) => void; 77 | value?: string | undefined; 78 | keepValueAcrossReloads?: true | undefined; 79 | isEnabled?: ((input: HTMLInputElement) => boolean) | undefined; 80 | }) => HTMLFormElement; 81 | createASTTree: (node: import("typescript").Node) => HTMLDivElement; 82 | button: (settings: { 83 | label: string; 84 | onclick?: ((ev: MouseEvent) => void) | undefined; 85 | }) => HTMLInputElement; 86 | createTabBar: () => HTMLDivElement; 87 | createTabButton: (text: string) => HTMLButtonElement; 88 | declareRestartRequired: (i?: ((key: string) => string) | undefined) => void; 89 | }; 90 | flashHTMLElement: (element: HTMLElement) => void; 91 | setNotifications: (pluginID: string, amount: number) => void; 92 | }; 93 | }; 94 | export declare type Playground = ReturnType; 95 | -------------------------------------------------------------------------------- /src/vendor/pluginUtils.d.ts: -------------------------------------------------------------------------------- 1 | import type React from "react"; 2 | /** Creates a set of util functions which is exposed to Plugins to make it easier to build consistent UIs */ 3 | export declare const createUtils: (sb: any, react: typeof React) => { 4 | /** Use this to make a few dumb element generation funcs */ 5 | el: (str: string, elementType: string, container: Element) => HTMLElement; 6 | /** Get a relative URL for something in your dist folder depending on if you're in dev mode or not */ 7 | requireURL: (path: string) => string; 8 | /** The Gatsby copy of React */ 9 | react: typeof React; 10 | /** 11 | * The playground plugin design system. Calling any of the functions will append the 12 | * element to the container you pass into the first param, and return the HTMLElement 13 | */ 14 | createDesignSystem: (container: Element) => { 15 | clear: () => void; 16 | code: (code: string) => HTMLElement; 17 | title: (title: string) => HTMLElement; 18 | subtitle: (subtitle: string) => HTMLElement; 19 | p: (subtitle: string) => HTMLElement; 20 | showEmptyScreen: (message: string) => HTMLDivElement; 21 | listDiags: (model: import("monaco-editor").editor.ITextModel, diags: import("typescript").DiagnosticRelatedInformation[]) => HTMLUListElement; 22 | localStorageOption: (setting: import("./ds/createDesignSystem").LocalStorageOption) => HTMLLIElement; 23 | showOptionList: (options: import("./ds/createDesignSystem").LocalStorageOption[], style: import("./ds/createDesignSystem").OptionsListConfig) => void; 24 | createTextInput: (config: { 25 | id: string; 26 | placeholder: string; 27 | onChanged?: ((text: string, input: HTMLInputElement) => void) | undefined; 28 | onEnter: (text: string, input: HTMLInputElement) => void; 29 | value?: string | undefined; 30 | keepValueAcrossReloads?: true | undefined; 31 | isEnabled?: ((input: HTMLInputElement) => boolean) | undefined; 32 | }) => HTMLFormElement; 33 | createASTTree: (node: import("typescript").Node) => HTMLDivElement; 34 | button: (settings: { 35 | label: string; 36 | onclick?: ((ev: MouseEvent) => void) | undefined; 37 | }) => HTMLInputElement; 38 | createTabBar: () => HTMLDivElement; 39 | createTabButton: (text: string) => HTMLButtonElement; 40 | declareRestartRequired: (i?: ((key: string) => string) | undefined) => void; 41 | }; 42 | /** Flashes a HTML Element */ 43 | flashHTMLElement: (element: HTMLElement) => void; 44 | /** Add a little red button in the top corner of a plugin tab with a number */ 45 | setNotifications: (pluginID: string, amount: number) => void; 46 | }; 47 | export declare type PluginUtils = ReturnType; 48 | -------------------------------------------------------------------------------- /src/vendor/sandbox.d.ts: -------------------------------------------------------------------------------- 1 | import { TypeScriptWorker } from "./tsWorker";// import { TypeScriptWorker } from "./tsWorker"; 2 | // import lzstring from "./vendor/lzstring.min"; 3 | 4 | import * as tsvfs from './typescript-vfs'; 5 | declare type CompilerOptions = import("monaco-editor").languages.typescript.CompilerOptions; 6 | declare type Monaco = typeof import("monaco-editor"); 7 | /** 8 | * These are settings for the playground which are the equivalent to props in React 9 | * any changes to it should require a new setup of the playground 10 | */ 11 | export declare type PlaygroundConfig = { 12 | /** The default source code for the playground */ 13 | text: string; 14 | /** Should it run the ts or js IDE services */ 15 | useJavaScript: boolean; 16 | /** Compiler options which are automatically just forwarded on */ 17 | compilerOptions: CompilerOptions; 18 | /** Optional monaco settings overrides */ 19 | monacoSettings?: import("monaco-editor").editor.IEditorOptions; 20 | /** Acquire types via type acquisition */ 21 | acquireTypes: boolean; 22 | /** Support twoslash compiler options */ 23 | supportTwoslashCompilerOptions: boolean; 24 | /** Get the text via query params and local storage, useful when the editor is the main experience */ 25 | suppressAutomaticallyGettingDefaultText?: true; 26 | /** Suppress setting compiler options from the compiler flags from query params */ 27 | suppressAutomaticallyGettingCompilerFlags?: true; 28 | /** Logging system */ 29 | logger: { 30 | log: (...args: any[]) => void; 31 | error: (...args: any[]) => void; 32 | groupCollapsed: (...args: any[]) => void; 33 | groupEnd: (...args: any[]) => void; 34 | }; 35 | } & ({ 36 | domID: string; 37 | } | { 38 | elementToAppend: HTMLElement; 39 | }); 40 | /** The default settings which we apply a partial over */ 41 | export declare function defaultPlaygroundSettings(): { 42 | /** The default source code for the playground */ 43 | text: string; 44 | /** Should it run the ts or js IDE services */ 45 | useJavaScript: boolean; 46 | /** Compiler options which are automatically just forwarded on */ 47 | compilerOptions: import("monaco-editor").languages.typescript.CompilerOptions; 48 | /** Optional monaco settings overrides */ 49 | monacoSettings?: import("monaco-editor").editor.IEditorOptions | undefined; 50 | /** Acquire types via type acquisition */ 51 | acquireTypes: boolean; 52 | /** Support twoslash compiler options */ 53 | supportTwoslashCompilerOptions: boolean; 54 | /** Get the text via query params and local storage, useful when the editor is the main experience */ 55 | suppressAutomaticallyGettingDefaultText?: true | undefined; 56 | /** Suppress setting compiler options from the compiler flags from query params */ 57 | suppressAutomaticallyGettingCompilerFlags?: true | undefined; 58 | /** Logging system */ 59 | logger: { 60 | log: (...args: any[]) => void; 61 | error: (...args: any[]) => void; 62 | groupCollapsed: (...args: any[]) => void; 63 | groupEnd: (...args: any[]) => void; 64 | }; 65 | } & { 66 | domID: string; 67 | }; 68 | /** Creates a sandbox editor, and returns a set of useful functions and the editor */ 69 | export declare const createTypeScriptSandbox: (partialConfig: Partial, monaco: Monaco, ts: typeof import("typescript")) => { 70 | /** The same config you passed in */ 71 | config: { 72 | text: string; 73 | useJavaScript: boolean; 74 | compilerOptions: CompilerOptions; 75 | monacoSettings?: import("monaco-editor").editor.IEditorOptions | undefined; 76 | acquireTypes: boolean; 77 | supportTwoslashCompilerOptions: boolean; 78 | suppressAutomaticallyGettingDefaultText?: true | undefined; 79 | suppressAutomaticallyGettingCompilerFlags?: true | undefined; 80 | logger: { 81 | log: (...args: any[]) => void; 82 | error: (...args: any[]) => void; 83 | groupCollapsed: (...args: any[]) => void; 84 | groupEnd: (...args: any[]) => void; 85 | }; 86 | domID: string; 87 | }; 88 | /** A list of TypeScript versions you can use with the TypeScript sandbox */ 89 | supportedVersions: readonly ["3.9.2", "3.8.3", "3.8.2", "3.7.5", "3.6.3", "3.5.1", "3.3.3", "3.1.6", "3.0.1", "2.8.1", "2.7.2", "2.4.1"]; 90 | /** The monaco editor instance */ 91 | editor: import("monaco-editor").editor.IStandaloneCodeEditor; 92 | /** Either "typescript" or "javascript" depending on your config */ 93 | language: string; 94 | /** The outer monaco module, the result of require("monaco-editor") */ 95 | monaco: typeof import("monaco-editor"); 96 | /** Gets a monaco-typescript worker, this will give you access to a language server. Note: prefer this for language server work because it happens on a webworker . */ 97 | getWorkerProcess: () => Promise; 98 | /** A copy of require("@typescript/vfs") this can be used to quickly set up an in-memory compiler runs for ASTs, or to get complex language server results (anything above has to be serialized when passed)*/ 99 | tsvfs: typeof tsvfs; 100 | /** Get all the different emitted files after TypeScript is run */ 101 | getEmitResult: () => Promise; 102 | /** Gets just the JavaScript for your sandbox, will transpile if in TS only */ 103 | getRunnableJS: () => Promise; 104 | /** Gets the DTS output of the main code in the editor */ 105 | getDTSForCode: () => Promise; 106 | /** The monaco-editor dom node, used for showing/hiding the editor */ 107 | getDomNode: () => HTMLElement; 108 | /** The model is an object which monaco uses to keep track of text in the editor. Use this to directly modify the text in the editor */ 109 | getModel: () => import("monaco-editor").editor.ITextModel; 110 | /** Gets the text of the main model, which is the text in the editor */ 111 | getText: () => string; 112 | /** Shortcut for setting the model's text content which would update the editor */ 113 | setText: (text: string) => void; 114 | /** Gets the AST of the current text in monaco - uses `createTSProgram`, so the performance caveat applies there too */ 115 | getAST: () => Promise; 116 | /** The module you get from require("typescript") */ 117 | ts: typeof import("typescript"); 118 | /** Create a new Program, a TypeScript data model which represents the entire project. As well as some of the 119 | * primitive objects you would normally need to do work with the files. 120 | * 121 | * The first time this is called it has to download all the DTS files which is needed for an exact compiler run. Which 122 | * at max is about 1.5MB - after that subsequent downloads of dts lib files come from localStorage. 123 | * 124 | * Try to use this sparingly as it can be computationally expensive, at the minimum you should be using the debounced setup. 125 | * 126 | * TODO: It would be good to create an easy way to have a single program instance which is updated for you 127 | * when the monaco model changes. 128 | */ 129 | setupTSVFS: () => Promise<{ 130 | program: import("typescript").Program; 131 | system: import("typescript").System; 132 | host: { 133 | compilerHost: import("typescript").CompilerHost; 134 | updateFile: (sourceFile: import("typescript").SourceFile) => boolean; 135 | }; 136 | }>; 137 | /** Uses the above call setupTSVFS, but only returns the program */ 138 | createTSProgram: () => Promise; 139 | /** The Sandbox's default compiler options */ 140 | compilerDefaults: import("monaco-editor").languages.typescript.CompilerOptions; 141 | /** The Sandbox's current compiler options */ 142 | getCompilerOptions: () => import("monaco-editor").languages.typescript.CompilerOptions; 143 | /** Replace the Sandbox's compiler options */ 144 | setCompilerSettings: (opts: CompilerOptions) => void; 145 | /** Overwrite the Sandbox's compiler options */ 146 | updateCompilerSetting: (key: keyof CompilerOptions, value: any) => void; 147 | /** Update a single compiler option in the SAndbox */ 148 | updateCompilerSettings: (opts: CompilerOptions) => void; 149 | /** A way to get callbacks when compiler settings have changed */ 150 | setDidUpdateCompilerSettings: (func: (opts: CompilerOptions) => void) => void; 151 | /** A copy of lzstring, which is used to archive/unarchive code */ 152 | // lzstring: typeof lzstring; 153 | /** Returns compiler options found in the params of the current page */ 154 | createURLQueryWithCompilerOptions: (sandbox: any, paramOverrides?: any) => string; 155 | /** Returns compiler options in the source code using twoslash notation */ 156 | getTwoSlashComplierOptions: (code: string) => any; 157 | /** Gets to the current monaco-language, this is how you talk to the background webworkers */ 158 | languageServiceDefaults: import("monaco-editor").languages.typescript.LanguageServiceDefaults; 159 | /** The path which represents the current file using the current compiler options */ 160 | filepath: string; 161 | }; 162 | export declare type Sandbox = ReturnType; 163 | export {}; 164 | -------------------------------------------------------------------------------- /src/vendor/tsWorker.d.ts: -------------------------------------------------------------------------------- 1 | import ts from 'typescript'; 2 | export declare class TypeScriptWorker implements ts.LanguageServiceHost { 3 | private _ctx; 4 | private _extraLibs; 5 | private _languageService; 6 | private _compilerOptions; 7 | constructor(ctx: any, createData: any); 8 | getCompilationSettings(): ts.CompilerOptions; 9 | getScriptFileNames(): string[]; 10 | private _getModel; 11 | getScriptVersion(fileName: string): string; 12 | getScriptSnapshot(fileName: string): ts.IScriptSnapshot | undefined; 13 | getScriptKind?(fileName: string): ts.ScriptKind; 14 | getCurrentDirectory(): string; 15 | getDefaultLibFileName(options: ts.CompilerOptions): string; 16 | isDefaultLibFileName(fileName: string): boolean; 17 | private static clearFiles; 18 | getSyntacticDiagnostics(fileName: string): Promise; 19 | getSemanticDiagnostics(fileName: string): Promise; 20 | getSuggestionDiagnostics(fileName: string): Promise; 21 | getCompilerOptionsDiagnostics(fileName: string): Promise; 22 | getCompletionsAtPosition(fileName: string, position: number): Promise; 23 | getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise; 24 | getSignatureHelpItems(fileName: string, position: number): Promise; 25 | getQuickInfoAtPosition(fileName: string, position: number): Promise; 26 | getOccurrencesAtPosition(fileName: string, position: number): Promise | undefined>; 27 | getDefinitionAtPosition(fileName: string, position: number): Promise | undefined>; 28 | getReferencesAtPosition(fileName: string, position: number): Promise; 29 | getNavigationBarItems(fileName: string): Promise; 30 | getFormattingEditsForDocument(fileName: string, options: ts.FormatCodeOptions): Promise; 31 | getFormattingEditsForRange(fileName: string, start: number, end: number, options: ts.FormatCodeOptions): Promise; 32 | getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: ts.FormatCodeOptions): Promise; 33 | findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise; 34 | getRenameInfo(fileName: string, positon: number, options: ts.RenameInfoOptions): Promise; 35 | getEmitOutput(fileName: string): Promise; 36 | getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: ts.FormatCodeOptions): Promise>; 37 | updateExtraLibs(extraLibs: IExtraLibs): void; 38 | } 39 | export interface IExtraLib { 40 | content: string; 41 | version: number; 42 | } 43 | export interface IExtraLibs { 44 | [path: string]: IExtraLib; 45 | } 46 | -------------------------------------------------------------------------------- /src/vendor/typescript-vfs.d.ts: -------------------------------------------------------------------------------- 1 | 2 | declare type System = import("typescript").System; 3 | declare type CompilerOptions = import("typescript").CompilerOptions; 4 | declare type CustomTransformers = import("typescript").CustomTransformers; 5 | declare type LanguageServiceHost = import("typescript").LanguageServiceHost; 6 | declare type CompilerHost = import("typescript").CompilerHost; 7 | declare type SourceFile = import("typescript").SourceFile; 8 | declare type TS = typeof import("typescript"); 9 | export interface VirtualTypeScriptEnvironment { 10 | sys: System; 11 | languageService: import("typescript").LanguageService; 12 | getSourceFile: (fileName: string) => import("typescript").SourceFile | undefined; 13 | createFile: (fileName: string, content: string) => void; 14 | updateFile: (fileName: string, content: string, replaceTextSpan?: import("typescript").TextSpan) => void; 15 | } 16 | /** 17 | * Makes a virtual copy of the TypeScript environment. This is the main API you want to be using with 18 | * @typescript/vfs. A lot of the other exposed functions are used by this function to get set up. 19 | * 20 | * @param sys an object which conforms to the TS Sys (a shim over read/write access to the fs) 21 | * @param rootFiles a list of files which are considered inside the project 22 | * @param ts a copy pf the TypeScript module 23 | * @param compilerOptions the options for this compiler run 24 | * @param customTransformers custom transformers for this compiler run 25 | */ 26 | export declare function createVirtualTypeScriptEnvironment(sys: System, rootFiles: string[], ts: TS, compilerOptions?: CompilerOptions, customTransformers?: CustomTransformers): VirtualTypeScriptEnvironment; 27 | /** 28 | * Grab the list of lib files for a particular target, will return a bit more than necessary (by including 29 | * the dom) but that's OK 30 | * 31 | * @param target The compiler settings target baseline 32 | * @param ts A copy of the TypeScript module 33 | */ 34 | export declare const knownLibFilesForCompilerOptions: (compilerOptions: CompilerOptions, ts: TS) => string[]; 35 | /** 36 | * Sets up a Map with lib contents by grabbing the necessary files from 37 | * the local copy of typescript via the file system. 38 | */ 39 | export declare const createDefaultMapFromNodeModules: (compilerOptions: CompilerOptions, ts?: typeof import("typescript") | undefined) => Map; 40 | /** 41 | * Adds recursively files from the FS into the map based on the folder 42 | */ 43 | export declare const addAllFilesFromFolder: (map: Map, workingDir: string) => void; 44 | /** Adds all files from node_modules/@types into the FS Map */ 45 | export declare const addFilesForTypesIntoFolder: (map: Map) => void; 46 | /** 47 | * Create a virtual FS Map with the lib files from a particular TypeScript 48 | * version based on the target, Always includes dom ATM. 49 | * 50 | * @param options The compiler target, which dictates the libs to set up 51 | * @param version the versions of TypeScript which are supported 52 | * @param cache should the values be stored in local storage 53 | * @param ts a copy of the typescript import 54 | * @param lzstring an optional copy of the lz-string import 55 | * @param fetcher an optional replacement for the global fetch function (tests mainly) 56 | * @param storer an optional replacement for the localStorage global (tests mainly) 57 | */ 58 | export declare const createDefaultMapFromCDN: (options: CompilerOptions, version: string, cache: boolean, ts: TS, lzstring?: any | undefined, fetcher?: typeof fetch | undefined, storer?: Storage | undefined) => Promise>; 59 | /** 60 | * Creates an in-memory System object which can be used in a TypeScript program, this 61 | * is what provides read/write aspects of the virtual fs 62 | */ 63 | export declare function createSystem(files: Map): System; 64 | /** 65 | * Creates a file-system backed System object which can be used in a TypeScript program, you provide 66 | * a set of virtual files which are prioritised over the FS versions, then a path to the root of your 67 | * project (basically the folder your node_modules lives) 68 | */ 69 | export declare function createFSBackedSystem(files: Map, projectRoot: string): System; 70 | /** 71 | * Creates an in-memory CompilerHost -which is essentially an extra wrapper to System 72 | * which works with TypeScript objects - returns both a compiler host, and a way to add new SourceFile 73 | * instances to the in-memory file system. 74 | */ 75 | export declare function createVirtualCompilerHost(sys: System, compilerOptions: CompilerOptions, ts: TS): { 76 | compilerHost: CompilerHost; 77 | updateFile: (sourceFile: SourceFile) => boolean; 78 | }; 79 | /** 80 | * Creates an object which can host a language service against the virtual file-system 81 | */ 82 | export declare function createVirtualLanguageServiceHost(sys: System, rootFiles: string[], compilerOptions: CompilerOptions, ts: TS, customTransformers?: CustomTransformers): { 83 | languageServiceHost: LanguageServiceHost; 84 | updateFile: (sourceFile: import("typescript").SourceFile) => void; 85 | }; 86 | export {}; 87 | -------------------------------------------------------------------------------- /src/vendor/utils.ts: -------------------------------------------------------------------------------- 1 | /** Get a relative URL for something in your dist folder depending on if you're in dev mode or not */ 2 | export const requireURL = (path: string) => { 3 | // https://unpkg.com/browse/typescript-playground-presentation-mode@0.0.1/dist/x.js => unpkg/browse/typescript-playground-presentation-mode@0.0.1/dist/x 4 | const isDev = document.location.host.includes("localhost") 5 | const prefix = isDev ? "local/" : "unpkg/typescript-playground-presentation-mode/dist/" 6 | return prefix + path 7 | } 8 | 9 | /** Use this to make a few dumb element generation funcs */ 10 | export const el = (str: string, el: string,container: Element) => { 11 | const para = document.createElement(el) 12 | para.innerHTML = str 13 | container.appendChild(para) 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noEmit": true, 4 | "allowSyntheticDefaultImports": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@polvtypes/reveal.js@^3.8.1": 6 | version "3.8.1" 7 | resolved "https://registry.yarnpkg.com/@polvtypes/reveal.js/-/reveal.js-3.8.1.tgz#52f928053e191758bdd2828b934bad8a38eecc66" 8 | integrity sha512-3mw7MeO0D1sspdoh1nXOYSbHJFINmMqNgixNhx85osRza5movvGMkJL+kCZtOJBMKXvZFxhJcLV+huI4KTfDLQ== 9 | 10 | "@rollup/plugin-commonjs@^11.0.2": 11 | version "11.0.2" 12 | resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.2.tgz#837cc6950752327cb90177b608f0928a4e60b582" 13 | integrity sha512-MPYGZr0qdbV5zZj8/2AuomVpnRVXRU5XKXb3HVniwRoRCreGlf5kOE081isNWeiLIi6IYkwTX9zE0/c7V8g81g== 14 | dependencies: 15 | "@rollup/pluginutils" "^3.0.0" 16 | estree-walker "^1.0.1" 17 | is-reference "^1.1.2" 18 | magic-string "^0.25.2" 19 | resolve "^1.11.0" 20 | 21 | "@rollup/plugin-json@^4.0.2": 22 | version "4.0.2" 23 | resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.0.2.tgz#482185ee36ac7dd21c346e2dbcc22ffed0c6f2d6" 24 | integrity sha512-t4zJMc98BdH42mBuzjhQA7dKh0t4vMJlUka6Fz0c+iO5IVnWaEMiYBy1uBj9ruHZzXBW23IPDGL9oCzBkQ9Udg== 25 | dependencies: 26 | "@rollup/pluginutils" "^3.0.4" 27 | 28 | "@rollup/plugin-node-resolve@^7.1.0": 29 | version "7.1.0" 30 | resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.0.tgz#94ed832a0444f5e8c529526303c83f8283e4cbc5" 31 | integrity sha512-pN3fQsTYuA/guTDCyAthMHWqupoGVSO4bgUFVK8ulr/zmNY9bY/xewNO2ptHJYZY1FW3KkblF+I4a4MWEBYJQA== 32 | dependencies: 33 | "@rollup/pluginutils" "^3.0.6" 34 | "@types/resolve" "0.0.8" 35 | builtin-modules "^3.1.0" 36 | is-module "^1.0.0" 37 | resolve "^1.14.2" 38 | 39 | "@rollup/plugin-typescript@^3.0.0": 40 | version "3.0.0" 41 | resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-3.0.0.tgz#9398fcca1cef67ac325fef19c28dece24c9a5263" 42 | integrity sha512-O6915Ril3+Q0B4P898PULAcPFZfPuatEB/4nox7bnK48ekGrmamMYhMB5tOqWjihEWrw4oz/NL+c+/kS3Fk95g== 43 | dependencies: 44 | "@rollup/pluginutils" "^3.0.1" 45 | resolve "^1.14.1" 46 | 47 | "@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.0.6": 48 | version "3.0.8" 49 | resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.0.8.tgz#4e94d128d94b90699e517ef045422960d18c8fde" 50 | integrity sha512-rYGeAc4sxcZ+kPG/Tw4/fwJODC3IXHYDH4qusdN/b6aLw5LPUbzpecYbEJh4sVQGPFJxd2dBU4kc1H3oy9/bnw== 51 | dependencies: 52 | estree-walker "^1.0.1" 53 | 54 | "@rollup/pluginutils@^3.0.1": 55 | version "3.0.6" 56 | resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.0.6.tgz#3ae0bbbce2eed53bf46b7fba8c393557c6c7f705" 57 | integrity sha512-Nb6U7sg11v8D+E4mxRxwT+UumUL7MSnwI8V1SJB3THyW2MOGD/Q6GyxLtpnjrbT3zTRPSozzDMyVZwemgldO3w== 58 | dependencies: 59 | estree-walker "^1.0.1" 60 | 61 | "@types/commonmark@^0.27.4": 62 | version "0.27.4" 63 | resolved "https://registry.yarnpkg.com/@types/commonmark/-/commonmark-0.27.4.tgz#8f42990e5cf3b6b95bd99eaa452e157aab679b82" 64 | integrity sha512-7koSjp08QxKoS1/+3T15+kD7+vqOUvZRHvM8PutF3Xsk5aAEkdlIGRsHJ3/XsC3izoqTwBdRW/vH7rzCKkIicA== 65 | 66 | "@types/estree@*": 67 | version "0.0.42" 68 | resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.42.tgz#8d0c1f480339efedb3e46070e22dd63e0430dd11" 69 | integrity sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ== 70 | 71 | "@types/estree@0.0.39": 72 | version "0.0.39" 73 | resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" 74 | integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== 75 | 76 | "@types/node@*": 77 | version "13.7.0" 78 | resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.0.tgz#b417deda18cf8400f278733499ad5547ed1abec4" 79 | integrity sha512-GnZbirvmqZUzMgkFn70c74OQpTTUcCzlhQliTzYjQMqg+hVKcDnxdL19Ne3UdYzdMA/+W3eb646FWn/ZaT1NfQ== 80 | 81 | "@types/resolve@0.0.8": 82 | version "0.0.8" 83 | resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" 84 | integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== 85 | dependencies: 86 | "@types/node" "*" 87 | 88 | "@zeit/schemas@2.6.0": 89 | version "2.6.0" 90 | resolved "https://registry.yarnpkg.com/@zeit/schemas/-/schemas-2.6.0.tgz#004e8e553b4cd53d538bd38eac7bcbf58a867fe3" 91 | integrity sha512-uUrgZ8AxS+Lio0fZKAipJjAh415JyrOZowliZAzmnJSsf7piVL5w+G0+gFJ0KSu3QRhvui/7zuvpLz03YjXAhg== 92 | 93 | accepts@~1.3.5: 94 | version "1.3.7" 95 | resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" 96 | integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== 97 | dependencies: 98 | mime-types "~2.1.24" 99 | negotiator "0.6.2" 100 | 101 | acorn@^7.1.0: 102 | version "7.1.0" 103 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c" 104 | integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ== 105 | 106 | ajv@6.5.3: 107 | version "6.5.3" 108 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9" 109 | integrity sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg== 110 | dependencies: 111 | fast-deep-equal "^2.0.1" 112 | fast-json-stable-stringify "^2.0.0" 113 | json-schema-traverse "^0.4.1" 114 | uri-js "^4.2.2" 115 | 116 | ansi-align@^2.0.0: 117 | version "2.0.0" 118 | resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" 119 | integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= 120 | dependencies: 121 | string-width "^2.0.0" 122 | 123 | ansi-regex@^3.0.0: 124 | version "3.0.0" 125 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 126 | integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= 127 | 128 | ansi-regex@^4.1.0: 129 | version "4.1.0" 130 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" 131 | integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== 132 | 133 | ansi-styles@^3.2.0, ansi-styles@^3.2.1: 134 | version "3.2.1" 135 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 136 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== 137 | dependencies: 138 | color-convert "^1.9.0" 139 | 140 | arch@^2.1.0: 141 | version "2.1.1" 142 | resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.1.tgz#8f5c2731aa35a30929221bb0640eed65175ec84e" 143 | integrity sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg== 144 | 145 | arg@2.0.0: 146 | version "2.0.0" 147 | resolved "https://registry.yarnpkg.com/arg/-/arg-2.0.0.tgz#c06e7ff69ab05b3a4a03ebe0407fac4cba657545" 148 | integrity sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w== 149 | 150 | balanced-match@^1.0.0: 151 | version "1.0.0" 152 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 153 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 154 | 155 | boxen@1.3.0: 156 | version "1.3.0" 157 | resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" 158 | integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== 159 | dependencies: 160 | ansi-align "^2.0.0" 161 | camelcase "^4.0.0" 162 | chalk "^2.0.1" 163 | cli-boxes "^1.0.0" 164 | string-width "^2.0.0" 165 | term-size "^1.2.0" 166 | widest-line "^2.0.0" 167 | 168 | brace-expansion@^1.1.7: 169 | version "1.1.11" 170 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 171 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 172 | dependencies: 173 | balanced-match "^1.0.0" 174 | concat-map "0.0.1" 175 | 176 | builtin-modules@^3.1.0: 177 | version "3.1.0" 178 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" 179 | integrity sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== 180 | 181 | bytes@3.0.0: 182 | version "3.0.0" 183 | resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" 184 | integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= 185 | 186 | camelcase@^4.0.0: 187 | version "4.1.0" 188 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" 189 | integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= 190 | 191 | camelcase@^5.0.0: 192 | version "5.3.1" 193 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" 194 | integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== 195 | 196 | chalk@2.4.1: 197 | version "2.4.1" 198 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" 199 | integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== 200 | dependencies: 201 | ansi-styles "^3.2.1" 202 | escape-string-regexp "^1.0.5" 203 | supports-color "^5.3.0" 204 | 205 | chalk@^2.0.1, chalk@^2.4.2: 206 | version "2.4.2" 207 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" 208 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== 209 | dependencies: 210 | ansi-styles "^3.2.1" 211 | escape-string-regexp "^1.0.5" 212 | supports-color "^5.3.0" 213 | 214 | cli-boxes@^1.0.0: 215 | version "1.0.0" 216 | resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" 217 | integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= 218 | 219 | clipboardy@1.2.3: 220 | version "1.2.3" 221 | resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.3.tgz#0526361bf78724c1f20be248d428e365433c07ef" 222 | integrity sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA== 223 | dependencies: 224 | arch "^2.1.0" 225 | execa "^0.8.0" 226 | 227 | cliui@^5.0.0: 228 | version "5.0.0" 229 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" 230 | integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== 231 | dependencies: 232 | string-width "^3.1.0" 233 | strip-ansi "^5.2.0" 234 | wrap-ansi "^5.1.0" 235 | 236 | color-convert@^1.9.0: 237 | version "1.9.3" 238 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 239 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== 240 | dependencies: 241 | color-name "1.1.3" 242 | 243 | color-name@1.1.3: 244 | version "1.1.3" 245 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 246 | integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= 247 | 248 | compressible@~2.0.14: 249 | version "2.0.18" 250 | resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" 251 | integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== 252 | dependencies: 253 | mime-db ">= 1.43.0 < 2" 254 | 255 | compression@1.7.3: 256 | version "1.7.3" 257 | resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" 258 | integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== 259 | dependencies: 260 | accepts "~1.3.5" 261 | bytes "3.0.0" 262 | compressible "~2.0.14" 263 | debug "2.6.9" 264 | on-headers "~1.0.1" 265 | safe-buffer "5.1.2" 266 | vary "~1.1.2" 267 | 268 | concat-map@0.0.1: 269 | version "0.0.1" 270 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 271 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 272 | 273 | concurrently@^5.1.0: 274 | version "5.1.0" 275 | resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-5.1.0.tgz#05523986ba7aaf4b58a49ddd658fab88fa783132" 276 | integrity sha512-9ViZMu3OOCID3rBgU31mjBftro2chOop0G2u1olq1OuwRBVRw/GxHTg80TVJBUTJfoswMmEUeuOg1g1yu1X2dA== 277 | dependencies: 278 | chalk "^2.4.2" 279 | date-fns "^2.0.1" 280 | lodash "^4.17.15" 281 | read-pkg "^4.0.1" 282 | rxjs "^6.5.2" 283 | spawn-command "^0.0.2-1" 284 | supports-color "^6.1.0" 285 | tree-kill "^1.2.2" 286 | yargs "^13.3.0" 287 | 288 | content-disposition@0.5.2: 289 | version "0.5.2" 290 | resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" 291 | integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= 292 | 293 | cross-spawn@^5.0.1: 294 | version "5.1.0" 295 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" 296 | integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= 297 | dependencies: 298 | lru-cache "^4.0.1" 299 | shebang-command "^1.2.0" 300 | which "^1.2.9" 301 | 302 | date-fns@^2.0.1: 303 | version "2.9.0" 304 | resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.9.0.tgz#d0b175a5c37ed5f17b97e2272bbc1fa5aec677d2" 305 | integrity sha512-khbFLu/MlzLjEzy9Gh8oY1hNt/Dvxw3J6Rbc28cVoYWQaC1S3YI4xwkF9ZWcjDLscbZlY9hISMr66RFzZagLsA== 306 | 307 | debug@2.6.9: 308 | version "2.6.9" 309 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" 310 | integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== 311 | dependencies: 312 | ms "2.0.0" 313 | 314 | decamelize@^1.2.0: 315 | version "1.2.0" 316 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" 317 | integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= 318 | 319 | deep-extend@^0.6.0: 320 | version "0.6.0" 321 | resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" 322 | integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== 323 | 324 | emoji-regex@^7.0.1: 325 | version "7.0.3" 326 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" 327 | integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== 328 | 329 | error-ex@^1.3.1: 330 | version "1.3.2" 331 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" 332 | integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== 333 | dependencies: 334 | is-arrayish "^0.2.1" 335 | 336 | escape-string-regexp@^1.0.5: 337 | version "1.0.5" 338 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 339 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= 340 | 341 | estree-walker@^1.0.1: 342 | version "1.0.1" 343 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" 344 | integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== 345 | 346 | execa@^0.7.0: 347 | version "0.7.0" 348 | resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" 349 | integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= 350 | dependencies: 351 | cross-spawn "^5.0.1" 352 | get-stream "^3.0.0" 353 | is-stream "^1.1.0" 354 | npm-run-path "^2.0.0" 355 | p-finally "^1.0.0" 356 | signal-exit "^3.0.0" 357 | strip-eof "^1.0.0" 358 | 359 | execa@^0.8.0: 360 | version "0.8.0" 361 | resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" 362 | integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo= 363 | dependencies: 364 | cross-spawn "^5.0.1" 365 | get-stream "^3.0.0" 366 | is-stream "^1.1.0" 367 | npm-run-path "^2.0.0" 368 | p-finally "^1.0.0" 369 | signal-exit "^3.0.0" 370 | strip-eof "^1.0.0" 371 | 372 | fast-deep-equal@^2.0.1: 373 | version "2.0.1" 374 | resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" 375 | integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= 376 | 377 | fast-json-stable-stringify@^2.0.0: 378 | version "2.1.0" 379 | resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" 380 | integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== 381 | 382 | fast-url-parser@1.1.3: 383 | version "1.1.3" 384 | resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" 385 | integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0= 386 | dependencies: 387 | punycode "^1.3.2" 388 | 389 | find-up@^3.0.0: 390 | version "3.0.0" 391 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" 392 | integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== 393 | dependencies: 394 | locate-path "^3.0.0" 395 | 396 | get-caller-file@^2.0.1: 397 | version "2.0.5" 398 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" 399 | integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== 400 | 401 | get-stream@^3.0.0: 402 | version "3.0.0" 403 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" 404 | integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= 405 | 406 | has-flag@^3.0.0: 407 | version "3.0.0" 408 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 409 | integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= 410 | 411 | hosted-git-info@^2.1.4: 412 | version "2.8.5" 413 | resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" 414 | integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== 415 | 416 | ini@~1.3.0: 417 | version "1.3.5" 418 | resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" 419 | integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== 420 | 421 | is-arrayish@^0.2.1: 422 | version "0.2.1" 423 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 424 | integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= 425 | 426 | is-fullwidth-code-point@^2.0.0: 427 | version "2.0.0" 428 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 429 | integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= 430 | 431 | is-module@^1.0.0: 432 | version "1.0.0" 433 | resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" 434 | integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= 435 | 436 | is-reference@^1.1.2: 437 | version "1.1.4" 438 | resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.4.tgz#3f95849886ddb70256a3e6d062b1a68c13c51427" 439 | integrity sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw== 440 | dependencies: 441 | "@types/estree" "0.0.39" 442 | 443 | is-stream@^1.1.0: 444 | version "1.1.0" 445 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" 446 | integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= 447 | 448 | isexe@^2.0.0: 449 | version "2.0.0" 450 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 451 | integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= 452 | 453 | "js-tokens@^3.0.0 || ^4.0.0": 454 | version "4.0.0" 455 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" 456 | integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== 457 | 458 | json-parse-better-errors@^1.0.1: 459 | version "1.0.2" 460 | resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" 461 | integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== 462 | 463 | json-schema-traverse@^0.4.1: 464 | version "0.4.1" 465 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" 466 | integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== 467 | 468 | locate-path@^3.0.0: 469 | version "3.0.0" 470 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" 471 | integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== 472 | dependencies: 473 | p-locate "^3.0.0" 474 | path-exists "^3.0.0" 475 | 476 | lodash@^4.17.15: 477 | version "4.17.15" 478 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" 479 | integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== 480 | 481 | loose-envify@^1.1.0, loose-envify@^1.4.0: 482 | version "1.4.0" 483 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" 484 | integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== 485 | dependencies: 486 | js-tokens "^3.0.0 || ^4.0.0" 487 | 488 | lru-cache@^4.0.1: 489 | version "4.1.5" 490 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" 491 | integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== 492 | dependencies: 493 | pseudomap "^1.0.2" 494 | yallist "^2.1.2" 495 | 496 | magic-string@^0.25.2: 497 | version "0.25.6" 498 | resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.6.tgz#5586387d1242f919c6d223579cc938bf1420795e" 499 | integrity sha512-3a5LOMSGoCTH5rbqobC2HuDNRtE2glHZ8J7pK+QZYppyWA36yuNpsX994rIY2nCuyP7CZYy7lQq/X2jygiZ89g== 500 | dependencies: 501 | sourcemap-codec "^1.4.4" 502 | 503 | mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": 504 | version "1.43.0" 505 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" 506 | integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== 507 | 508 | mime-db@~1.33.0: 509 | version "1.33.0" 510 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" 511 | integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== 512 | 513 | mime-types@2.1.18: 514 | version "2.1.18" 515 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" 516 | integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== 517 | dependencies: 518 | mime-db "~1.33.0" 519 | 520 | mime-types@~2.1.24: 521 | version "2.1.26" 522 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" 523 | integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== 524 | dependencies: 525 | mime-db "1.43.0" 526 | 527 | minimatch@3.0.4: 528 | version "3.0.4" 529 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 530 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 531 | dependencies: 532 | brace-expansion "^1.1.7" 533 | 534 | minimist@^1.2.0: 535 | version "1.2.0" 536 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 537 | integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= 538 | 539 | monaco-editor@^0.19.3: 540 | version "0.19.3" 541 | resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.19.3.tgz#1c994b3186c00650dbcd034d5370d46bf56c0663" 542 | integrity sha512-2n1vJBVQF2Hhi7+r1mMeYsmlf18hjVb6E0v5SoMZyb4aeOmYPKun+CE3gYpiNA1KEvtSdaDHFBqH9d7Wd9vREg== 543 | 544 | ms@2.0.0: 545 | version "2.0.0" 546 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 547 | integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= 548 | 549 | negotiator@0.6.2: 550 | version "0.6.2" 551 | resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" 552 | integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== 553 | 554 | node-fetch@^2.6.0: 555 | version "2.6.0" 556 | resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" 557 | integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== 558 | 559 | normalize-package-data@^2.3.2: 560 | version "2.5.0" 561 | resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" 562 | integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== 563 | dependencies: 564 | hosted-git-info "^2.1.4" 565 | resolve "^1.10.0" 566 | semver "2 || 3 || 4 || 5" 567 | validate-npm-package-license "^3.0.1" 568 | 569 | npm-run-path@^2.0.0: 570 | version "2.0.2" 571 | resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" 572 | integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= 573 | dependencies: 574 | path-key "^2.0.0" 575 | 576 | object-assign@^4.1.1: 577 | version "4.1.1" 578 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 579 | integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= 580 | 581 | on-headers@~1.0.1: 582 | version "1.0.2" 583 | resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" 584 | integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== 585 | 586 | p-finally@^1.0.0: 587 | version "1.0.0" 588 | resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" 589 | integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= 590 | 591 | p-limit@^2.0.0: 592 | version "2.2.2" 593 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" 594 | integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== 595 | dependencies: 596 | p-try "^2.0.0" 597 | 598 | p-locate@^3.0.0: 599 | version "3.0.0" 600 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" 601 | integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== 602 | dependencies: 603 | p-limit "^2.0.0" 604 | 605 | p-try@^2.0.0: 606 | version "2.2.0" 607 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" 608 | integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== 609 | 610 | parse-json@^4.0.0: 611 | version "4.0.0" 612 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" 613 | integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= 614 | dependencies: 615 | error-ex "^1.3.1" 616 | json-parse-better-errors "^1.0.1" 617 | 618 | path-exists@^3.0.0: 619 | version "3.0.0" 620 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" 621 | integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= 622 | 623 | path-is-inside@1.0.2: 624 | version "1.0.2" 625 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 626 | integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= 627 | 628 | path-key@^2.0.0: 629 | version "2.0.1" 630 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" 631 | integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= 632 | 633 | path-parse@^1.0.6: 634 | version "1.0.6" 635 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 636 | integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== 637 | 638 | path-to-regexp@2.2.1: 639 | version "2.2.1" 640 | resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.2.1.tgz#90b617025a16381a879bc82a38d4e8bdeb2bcf45" 641 | integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== 642 | 643 | pify@^3.0.0: 644 | version "3.0.0" 645 | resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" 646 | integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= 647 | 648 | prop-types@^15.6.2: 649 | version "15.7.2" 650 | resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" 651 | integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== 652 | dependencies: 653 | loose-envify "^1.4.0" 654 | object-assign "^4.1.1" 655 | react-is "^16.8.1" 656 | 657 | pseudomap@^1.0.2: 658 | version "1.0.2" 659 | resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" 660 | integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= 661 | 662 | punycode@^1.3.2: 663 | version "1.4.1" 664 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 665 | integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= 666 | 667 | punycode@^2.1.0: 668 | version "2.1.1" 669 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" 670 | integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== 671 | 672 | range-parser@1.2.0: 673 | version "1.2.0" 674 | resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" 675 | integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= 676 | 677 | rc@^1.0.1, rc@^1.1.6: 678 | version "1.2.8" 679 | resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" 680 | integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== 681 | dependencies: 682 | deep-extend "^0.6.0" 683 | ini "~1.3.0" 684 | minimist "^1.2.0" 685 | strip-json-comments "~2.0.1" 686 | 687 | react-is@^16.8.1: 688 | version "16.13.1" 689 | resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" 690 | integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== 691 | 692 | react@^16.13.1: 693 | version "16.13.1" 694 | resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e" 695 | integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== 696 | dependencies: 697 | loose-envify "^1.1.0" 698 | object-assign "^4.1.1" 699 | prop-types "^15.6.2" 700 | 701 | read-pkg@^4.0.1: 702 | version "4.0.1" 703 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" 704 | integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc= 705 | dependencies: 706 | normalize-package-data "^2.3.2" 707 | parse-json "^4.0.0" 708 | pify "^3.0.0" 709 | 710 | registry-auth-token@3.3.2: 711 | version "3.3.2" 712 | resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" 713 | integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== 714 | dependencies: 715 | rc "^1.1.6" 716 | safe-buffer "^5.0.1" 717 | 718 | registry-url@3.1.0: 719 | version "3.1.0" 720 | resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" 721 | integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= 722 | dependencies: 723 | rc "^1.0.1" 724 | 725 | require-directory@^2.1.1: 726 | version "2.1.1" 727 | resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" 728 | integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= 729 | 730 | require-main-filename@^2.0.0: 731 | version "2.0.0" 732 | resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" 733 | integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== 734 | 735 | resolve@^1.10.0, resolve@^1.11.0, resolve@^1.14.1, resolve@^1.14.2: 736 | version "1.15.0" 737 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5" 738 | integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw== 739 | dependencies: 740 | path-parse "^1.0.6" 741 | 742 | reveal.js@^3.9.2: 743 | version "3.9.2" 744 | resolved "https://registry.yarnpkg.com/reveal.js/-/reveal.js-3.9.2.tgz#7f63d3dfec338b6c313dcabdf006e8cf80e0b358" 745 | integrity sha512-Dvv2oA9FrtOHE2DWj5js8pMRfwq++Wmvsn1EyAdYLC80lBjTphns+tPsB652Bnvep9AVviuVS/b4XoVY9rXHLA== 746 | 747 | rollup@^1.31.0: 748 | version "1.31.0" 749 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.31.0.tgz#e2a87212e96aa7850f3eb53fdd02cf89f2d2fe9a" 750 | integrity sha512-9C6ovSyNeEwvuRuUUmsTpJcXac1AwSL1a3x+O5lpmQKZqi5mmrjauLeqIjvREC+yNRR8fPdzByojDng+af3nVw== 751 | dependencies: 752 | "@types/estree" "*" 753 | "@types/node" "*" 754 | acorn "^7.1.0" 755 | 756 | rxjs@^6.5.2: 757 | version "6.5.4" 758 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" 759 | integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== 760 | dependencies: 761 | tslib "^1.9.0" 762 | 763 | safe-buffer@5.1.2: 764 | version "5.1.2" 765 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" 766 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== 767 | 768 | safe-buffer@^5.0.1: 769 | version "5.2.0" 770 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" 771 | integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== 772 | 773 | "semver@2 || 3 || 4 || 5": 774 | version "5.7.1" 775 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" 776 | integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== 777 | 778 | serve-handler@6.1.2: 779 | version "6.1.2" 780 | resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.2.tgz#f05b0421a313fff2d257838cba00cbcc512cd2b6" 781 | integrity sha512-RFh49wX7zJmmOVDcIjiDSJnMH+ItQEvyuYLYuDBVoA/xmQSCuj+uRmk1cmBB5QQlI3qOiWKp6p4DUGY+Z5AB2A== 782 | dependencies: 783 | bytes "3.0.0" 784 | content-disposition "0.5.2" 785 | fast-url-parser "1.1.3" 786 | mime-types "2.1.18" 787 | minimatch "3.0.4" 788 | path-is-inside "1.0.2" 789 | path-to-regexp "2.2.1" 790 | range-parser "1.2.0" 791 | 792 | serve@^11.3.0: 793 | version "11.3.0" 794 | resolved "https://registry.yarnpkg.com/serve/-/serve-11.3.0.tgz#1d342e13e310501ecf17b6602f1f35da640d6448" 795 | integrity sha512-AU0g50Q1y5EVFX56bl0YX5OtVjUX1N737/Htj93dQGKuHiuLvVB45PD8Muar70W6Kpdlz8aNJfoUqTyAq9EE/A== 796 | dependencies: 797 | "@zeit/schemas" "2.6.0" 798 | ajv "6.5.3" 799 | arg "2.0.0" 800 | boxen "1.3.0" 801 | chalk "2.4.1" 802 | clipboardy "1.2.3" 803 | compression "1.7.3" 804 | serve-handler "6.1.2" 805 | update-check "1.5.2" 806 | 807 | set-blocking@^2.0.0: 808 | version "2.0.0" 809 | resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" 810 | integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= 811 | 812 | shebang-command@^1.2.0: 813 | version "1.2.0" 814 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" 815 | integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= 816 | dependencies: 817 | shebang-regex "^1.0.0" 818 | 819 | shebang-regex@^1.0.0: 820 | version "1.0.0" 821 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" 822 | integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= 823 | 824 | signal-exit@^3.0.0: 825 | version "3.0.2" 826 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 827 | integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= 828 | 829 | sourcemap-codec@^1.4.4: 830 | version "1.4.8" 831 | resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" 832 | integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== 833 | 834 | spawn-command@^0.0.2-1: 835 | version "0.0.2-1" 836 | resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" 837 | integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A= 838 | 839 | spdx-correct@^3.0.0: 840 | version "3.1.0" 841 | resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" 842 | integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== 843 | dependencies: 844 | spdx-expression-parse "^3.0.0" 845 | spdx-license-ids "^3.0.0" 846 | 847 | spdx-exceptions@^2.1.0: 848 | version "2.2.0" 849 | resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" 850 | integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== 851 | 852 | spdx-expression-parse@^3.0.0: 853 | version "3.0.0" 854 | resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" 855 | integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== 856 | dependencies: 857 | spdx-exceptions "^2.1.0" 858 | spdx-license-ids "^3.0.0" 859 | 860 | spdx-license-ids@^3.0.0: 861 | version "3.0.5" 862 | resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" 863 | integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== 864 | 865 | string-width@^2.0.0, string-width@^2.1.1: 866 | version "2.1.1" 867 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" 868 | integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== 869 | dependencies: 870 | is-fullwidth-code-point "^2.0.0" 871 | strip-ansi "^4.0.0" 872 | 873 | string-width@^3.0.0, string-width@^3.1.0: 874 | version "3.1.0" 875 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" 876 | integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== 877 | dependencies: 878 | emoji-regex "^7.0.1" 879 | is-fullwidth-code-point "^2.0.0" 880 | strip-ansi "^5.1.0" 881 | 882 | strip-ansi@^4.0.0: 883 | version "4.0.0" 884 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" 885 | integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= 886 | dependencies: 887 | ansi-regex "^3.0.0" 888 | 889 | strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: 890 | version "5.2.0" 891 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" 892 | integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== 893 | dependencies: 894 | ansi-regex "^4.1.0" 895 | 896 | strip-eof@^1.0.0: 897 | version "1.0.0" 898 | resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" 899 | integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= 900 | 901 | strip-json-comments@~2.0.1: 902 | version "2.0.1" 903 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 904 | integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= 905 | 906 | supports-color@^5.3.0: 907 | version "5.5.0" 908 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 909 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== 910 | dependencies: 911 | has-flag "^3.0.0" 912 | 913 | supports-color@^6.1.0: 914 | version "6.1.0" 915 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" 916 | integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== 917 | dependencies: 918 | has-flag "^3.0.0" 919 | 920 | term-size@^1.2.0: 921 | version "1.2.0" 922 | resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" 923 | integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= 924 | dependencies: 925 | execa "^0.7.0" 926 | 927 | tree-kill@^1.2.2: 928 | version "1.2.2" 929 | resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" 930 | integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== 931 | 932 | tslib@^1.10.0, tslib@^1.9.0: 933 | version "1.10.0" 934 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" 935 | integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== 936 | 937 | "typescript@ 3.8.0-beta": 938 | version "3.8.0-beta" 939 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.0-beta.tgz#acdcaf9f24c7e20b1ff0a6329d1e8d63691e2e13" 940 | integrity sha512-mQEmQUJg0CQBhf/GSVnGscKv/jrKsrLxE01AhdjYmBNoXX2Iah3i38ufxXByXacK6Fc5Nr9oMz7MjpjgddiknA== 941 | 942 | update-check@1.5.2: 943 | version "1.5.2" 944 | resolved "https://registry.yarnpkg.com/update-check/-/update-check-1.5.2.tgz#2fe09f725c543440b3d7dabe8971f2d5caaedc28" 945 | integrity sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ== 946 | dependencies: 947 | registry-auth-token "3.3.2" 948 | registry-url "3.1.0" 949 | 950 | uri-js@^4.2.2: 951 | version "4.2.2" 952 | resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" 953 | integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== 954 | dependencies: 955 | punycode "^2.1.0" 956 | 957 | validate-npm-package-license@^3.0.1: 958 | version "3.0.4" 959 | resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" 960 | integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== 961 | dependencies: 962 | spdx-correct "^3.0.0" 963 | spdx-expression-parse "^3.0.0" 964 | 965 | vary@~1.1.2: 966 | version "1.1.2" 967 | resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" 968 | integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= 969 | 970 | which-module@^2.0.0: 971 | version "2.0.0" 972 | resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" 973 | integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= 974 | 975 | which@^1.2.9: 976 | version "1.3.1" 977 | resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" 978 | integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== 979 | dependencies: 980 | isexe "^2.0.0" 981 | 982 | widest-line@^2.0.0: 983 | version "2.0.1" 984 | resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" 985 | integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== 986 | dependencies: 987 | string-width "^2.1.1" 988 | 989 | wrap-ansi@^5.1.0: 990 | version "5.1.0" 991 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" 992 | integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== 993 | dependencies: 994 | ansi-styles "^3.2.0" 995 | string-width "^3.0.0" 996 | strip-ansi "^5.0.0" 997 | 998 | y18n@^4.0.0: 999 | version "4.0.0" 1000 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" 1001 | integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== 1002 | 1003 | yallist@^2.1.2: 1004 | version "2.1.2" 1005 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" 1006 | integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= 1007 | 1008 | yargs-parser@^13.1.1: 1009 | version "13.1.1" 1010 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" 1011 | integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== 1012 | dependencies: 1013 | camelcase "^5.0.0" 1014 | decamelize "^1.2.0" 1015 | 1016 | yargs@^13.3.0: 1017 | version "13.3.0" 1018 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" 1019 | integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== 1020 | dependencies: 1021 | cliui "^5.0.0" 1022 | find-up "^3.0.0" 1023 | get-caller-file "^2.0.1" 1024 | require-directory "^2.1.1" 1025 | require-main-filename "^2.0.0" 1026 | set-blocking "^2.0.0" 1027 | string-width "^3.0.0" 1028 | which-module "^2.0.0" 1029 | y18n "^4.0.0" 1030 | yargs-parser "^13.1.1" 1031 | --------------------------------------------------------------------------------