├── .gitignore ├── .npmignore ├── CONTRIBUTING.md ├── README.md ├── package.json ├── rollup.config.js ├── scripts └── getDTS.js ├── src ├── index.ts ├── vendor │ ├── playground.d.ts │ ├── pluginUtils.d.ts │ ├── sandbox.d.ts │ ├── tsWorker.d.ts │ ├── typescript-vfs.d.ts │ └── utils.ts └── vim-monaco │ ├── cm │ └── keymap_vim.ts │ ├── cm_adapter.ts │ ├── demo.ts │ ├── index.ts │ └── statusbar.ts ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # dotenv environment variables file 55 | .env 56 | 57 | # gatsby files 58 | .cache/ 59 | public 60 | 61 | # Mac files 62 | .DS_Store 63 | 64 | # Yarn 65 | yarn-error.log 66 | .pnp/ 67 | .pnp.js 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | dist 71 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | .gitignore 3 | rollup.config.jss 4 | !dist 5 | scripts 6 | .vscode 7 | yarn* 8 | tsconfig.json 9 | rollup* 10 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing to a TypeScript Playground Plugin 2 | 3 | ## Contributing 4 | 5 | You can use `yarn start` to set up both a copy of Rollup to generate the JS, and Serve to host it. 6 | 7 | ```sh 8 | yarn start 9 | ``` 10 | 11 | Then set up the TypeScript playground to connect to a dev plugin at `http://localhost:5000/`. 12 | 13 | #### Plugin API 14 | 15 | The plugin API is documented in the [interface PlaygroundPlugin in `./src/vendor/playground.d.ts`](src/vendor/playground.d.ts) 16 | 17 | Roughly: 18 | 19 | - There are a set of mounting and un-mounting functions which you can use to handle your UI in the sidebar 20 | - There are `modelChanged` methods, which are shortcuts to knowing when the code in monaco editor has changed 21 | 22 | ### Sandbox 23 | 24 | The plugins are passed copies of the TypeScript sandbox, which is a high level API wrapper to the [`monaco-editor`](https://microsoft.github.io/monaco-editor/). You can learn more about the sandbox on [the TypeScript website](http://www.typescriptlang.org/v2/dev/sandbox/ 25 | 26 | #### Rollup 27 | 28 | [Rollup](https://rollupjs.org) is a JavaScript bundler, that will take all of the TypeScript + JavaScript code you reference and then create an AMD bundle for it all. AMD bundles are used in Monaco, TypeScript Sandbox and the Playground - so, this is used for consistency with the rest of the ecosystem. 29 | 30 | ## Adding a dependency 31 | 32 | Because most node_modules expect to be running in node, you might have to do some work to get the dependency working on the web. 33 | 34 | The route to handle this is via rollup: 35 | 36 | - add a new dependency via `yarn add xyz` 37 | - import it into your `index.ts` 38 | - run `yarn build` - did it provide some error messages? 39 | - If it did, you may need to edit your `rollup.config.js`. 40 | - You could probably start by taking the [rollup config from `playground-plugin-tsquery`](https://github.com/orta/playground-plugin-tsquery/blob/master/rollup.config.js) and by adding any extra externals and globals. 41 | 42 | #### Serve 43 | 44 | [Serve](https://github.com/zeit/serve) is used to make a web-server for the dist folder. 45 | 46 | ## Deployment 47 | 48 | This module should be deployed to npm when you would like the world to see it, this may mean making your code handle a staging vs production environment (because the URLs will be different.) 49 | 50 | For example, this is how you can handle getting the URL for a CSS file which is included in your `dist` folder: 51 | 52 | ```ts 53 | const isDev = document.location.host.includes('localhost') 54 | const unpkgURL = 'https://unpkg.com/typescript-playground-presentation-mode@latest/dist/slideshow.css' 55 | const cssHref = isDev ? 'http://localhost:5000/slideshow.css' : unpkgURL 56 | ``` 57 | 58 | ### Post-Deploy 59 | 60 | Once this is deployed, you can test it on the TypeScript playground by passing in the name of your plugin on npm to the custom plugin box. This is effectively your staging environment. 61 | 62 | Once you're happy and it's polished, you can apply to have it in the default plugin list. 63 | 64 | ## Support 65 | 66 | Ask questions either on the TypeScript Website issues](https://github.com/microsoft/TypeScript-Website/issues), or in the [TypeScript Community Discord](https://discord.gg/typescript) - in the TypeScript Website channel. 67 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## TypeScript Playground Vim Plugin 2 | 3 | Provides Vim keybindings for TypeScript Playground editor. 4 | 5 | ## Running this plugin 6 | 7 | - [Click this link](https://www.typescriptlang.org/play?install-plugin=ts-playground-plugin-vim) to install 8 | 9 | or 10 | 11 | - Open up the TypeScript Playground 12 | - Go the "Options" in the sidebar 13 | - Look for "Plugins from npm" 14 | - Add "ts-playground-plugin-vim" 15 | - Reload the browser 16 | 17 | Then it will show up as a tab in the sidebar. 18 | 19 | ## Contributing 20 | 21 | See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full details, however, TLDR: 22 | 23 | ```sh 24 | git clone ... 25 | yarn install 26 | yarn start 27 | ``` 28 | 29 | Then tick the box for starting plugin development inside the TypeScript Playground. 30 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-playground-plugin-vim", 3 | "version": "0.1.4", 4 | "main": "dist/index.js", 5 | "license": "MIT", 6 | "keywords": [ 7 | "playground-plugin" 8 | ], 9 | "scripts": { 10 | "build": "rollup -c rollup.config.js;", 11 | "compile": "tsc", 12 | "start": "concurrently -p \"[{name}]\" -n \"ROLLUP,SITE\" -c \"bgBlue.bold,bgMagenta.bold\" \"yarn rollup -c rollup.config.js --watch\" \"yarn serve dist\"" 13 | }, 14 | "devDependencies": { 15 | "@rollup/plugin-commonjs": "^11.0.2", 16 | "@rollup/plugin-json": "^4.0.2", 17 | "@rollup/plugin-node-resolve": "^7.1.0", 18 | "@rollup/plugin-typescript": "^3.0.0", 19 | "@types/react": "^16.9.23", 20 | "concurrently": "^5.1.0", 21 | "monaco-editor": "^0.19.3", 22 | "node-fetch": "^2.6.1", 23 | "rollup": "^1.31.0", 24 | "serve": "^11.3.0", 25 | "typescript": "latest" 26 | }, 27 | "dependencies": { 28 | "monaco-vim": "^0.1.7", 29 | "tslib": "^1.10.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /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 | 6 | // You can have more root bundles by extending this array 7 | const rootFiles = ['index.ts'] 8 | 9 | export default rootFiles.map(name => { 10 | /** @type { import("rollup").RollupOptions } */ 11 | const options = { 12 | input: `src/${name}`, 13 | external: ['typescript', 'monaco-editor'], 14 | output: { 15 | name, 16 | dir: 'dist', 17 | format: 'amd', 18 | }, 19 | plugins: [typescript({ tsconfig: 'tsconfig.json', noEmitOnError: false }), commonjs(), node(), json()], 20 | } 21 | 22 | return options 23 | }) 24 | 25 | /** Note: 26 | * if you end up wanting to import a dependency which relies on typescript, you will need 27 | * settings which adds these extra options. It will re-use the window.ts for the typescript 28 | * dependency, and I've not figured a way to remove fs and path. 29 | * 30 | const options = { 31 | external: ['typescript', 'fs', 'path'], 32 | output: { 33 | paths: { 34 | "typescript":"typescript-sandbox/index", 35 | "fs":"typescript-sandbox/index", 36 | "path":"typescript-sandbox/index", 37 | }, 38 | }, 39 | plugins: [typescript({ tsconfig: "tsconfig.json" }), externalGlobals({ typescript: "window.ts" }), commonjs(), node(), json()] 40 | }; 41 | * 42 | */ 43 | -------------------------------------------------------------------------------- /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 | if (!existsSync(vendor)) { 21 | mkdirSync(vendor) 22 | } 23 | 24 | const host = 'https://www.typescriptlang.org/v2' 25 | // const host = "http://localhost:8000"; 26 | 27 | await getFileAndStoreLocally(host + '/js/sandbox/tsWorker.d.ts', join(vendor, 'tsWorker.d.ts')) 28 | 29 | await getFileAndStoreLocally(host + '/js/playground/pluginUtils.d.ts', join(vendor, 'pluginUtils.d.ts')) 30 | 31 | await getFileAndStoreLocally( 32 | host + '/js/sandbox/vendor/typescript-vfs.d.ts', 33 | join(vendor, 'typescript-vfs.d.ts'), 34 | text => { 35 | const removeImports = text.replace('/// ', '') 36 | const removedLZ = removeImports.replace('import("lz-string").LZStringStatic', 'any') 37 | return removedLZ 38 | } 39 | ) 40 | 41 | await getFileAndStoreLocally(host + '/js/sandbox/index.d.ts', join(vendor, 'sandbox.d.ts'), text => { 42 | const removeImports = text.replace(/^import/g, '// import').replace(/\nimport/g, '\n// import') 43 | const replaceTSVFS = removeImports.replace( 44 | "// import * as tsvfs from './vendor/typescript-vfs'", 45 | "\nimport * as tsvfs from './typescript-vfs'" 46 | ) 47 | const removedLZ = replaceTSVFS.replace('lzstring: typeof lzstring', '// lzstring: typeof lzstring') 48 | const addedTsWorkerImport = 'import { TypeScriptWorker } from "./tsWorker";' + removedLZ 49 | return addedTsWorkerImport 50 | }) 51 | 52 | await getFileAndStoreLocally(host + '/js/playground/index.d.ts', join(vendor, '/playground.d.ts'), text => { 53 | const replaceSandbox = text.replace(/typescript-sandbox/g, './sandbox') 54 | const replaceTSVFS = replaceSandbox.replace( 55 | /typescriptlang-org\/static\/js\/sandbox\/vendor\/typescript-vfs/g, 56 | './typescript-vfs' 57 | ) 58 | const removedLZ = replaceTSVFS.replace('lzstring: typeof', '// lzstring: typeof') 59 | const removedWorker = removedLZ.replace('getWorkerProcess', '// getWorkerProcess') 60 | const removedUI = removedWorker.replace('ui:', '// ui:') 61 | return removedUI 62 | }) 63 | } 64 | 65 | go() 66 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import type { PlaygroundPlugin, PluginUtils } from "./vendor/playground" 2 | import type { Sandbox } from "./vendor/sandbox"; 3 | import { initVimMode } from "./vim-monaco"; 4 | 5 | let vimMode; 6 | let vimStatus: HTMLDivElement; 7 | 8 | function startVimMode(sandbox: Sandbox) { 9 | const mainNode = document.querySelector('main'); 10 | if (!vimStatus) { 11 | vimStatus = document.createElement("div"); 12 | vimStatus.style.position = "absolute"; 13 | vimStatus.style.bottom = ".4rem"; 14 | vimStatus.style.left = "1rem"; 15 | vimStatus.style.fontSize = "small"; 16 | if (mainNode) { 17 | mainNode.appendChild(vimStatus); 18 | mainNode.style.position = "relative"; 19 | } 20 | } else { 21 | vimStatus.style.display = "block"; 22 | } 23 | if (!vimMode) { 24 | vimMode = initVimMode(sandbox.editor, vimStatus); 25 | } 26 | localStorage.setItem("tsplayvim", "activated"); 27 | } 28 | 29 | function stopVimMode() { 30 | if (vimStatus) { 31 | vimStatus.style.display = "none"; 32 | } 33 | if (vimMode) { 34 | vimMode.dispose(); 35 | } 36 | vimMode = null; 37 | localStorage.removeItem("tsplayvim"); 38 | } 39 | 40 | if ("sandbox" in globalThis && !!localStorage.getItem("tsplayvim")) { 41 | const sandbox = (globalThis as unknown as { sandbox: Sandbox }).sandbox; 42 | startVimMode(sandbox); 43 | } 44 | 45 | const makePlugin = (utils: PluginUtils) => { 46 | const customPlugin: PlaygroundPlugin = { 47 | id: 'ts-playground-vim', 48 | displayName: 'Vim', 49 | didMount: (sandbox, container) => { 50 | 51 | const p = (str: string) => utils.el(str, "p", container); 52 | p("This plugin provides Vim keybindings to the editor.") 53 | 54 | const startButton = document.createElement('button') 55 | startButton.style.fontSize = "16px"; 56 | startButton.style.cursor = "pointer"; 57 | startButton.style.padding = "4px 8px"; 58 | startButton.innerText = "Use vim mode"; 59 | container.appendChild(startButton) 60 | 61 | if (localStorage.getItem("tsplayvim")) { 62 | startVimMode(sandbox); 63 | startButton.innerText = "Stop Vim mode"; 64 | } 65 | 66 | startButton.onclick = () => { 67 | if (!vimMode) { 68 | startVimMode(sandbox); 69 | startButton.innerText = "Stop Vim mode"; 70 | } else { 71 | stopVimMode(); 72 | startButton.innerText = "Use Vim mode"; 73 | } 74 | } 75 | }, 76 | } 77 | 78 | return customPlugin 79 | } 80 | 81 | export default makePlugin 82 | -------------------------------------------------------------------------------- /src/vendor/playground.d.ts: -------------------------------------------------------------------------------- 1 | declare type Sandbox = import('./sandbox').Sandbox; 2 | import type React from 'react'; 3 | export { PluginUtils } from './pluginUtils'; 4 | export declare type PluginFactory = { 5 | (i: (key: string, components?: any) => string): PlaygroundPlugin; 6 | }; 7 | /** The interface of all sidebar plugins */ 8 | export interface PlaygroundPlugin { 9 | /** Not public facing, but used by the playground to uniquely identify plugins */ 10 | id: string; 11 | /** To show in the tabs */ 12 | displayName: string; 13 | /** Should this plugin be selected when the plugin is first loaded? Let's you check for query vars etc to load a particular plugin */ 14 | shouldBeSelected?: () => boolean; 15 | /** 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 */ 16 | willMount?: (sandbox: Sandbox, container: HTMLDivElement) => void; 17 | /** After we show the tab */ 18 | didMount?: (sandbox: Sandbox, container: HTMLDivElement) => void; 19 | /** Model changes while this plugin is actively selected */ 20 | modelChanged?: (sandbox: Sandbox, model: import('monaco-editor').editor.ITextModel) => void; 21 | /** 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 */ 22 | modelChangedDebounce?: (sandbox: Sandbox, model: import('monaco-editor').editor.ITextModel) => void; 23 | /** Before we remove the tab */ 24 | willUnmount?: (sandbox: Sandbox, container: HTMLDivElement) => void; 25 | /** After we remove the tab */ 26 | didUnmount?: (sandbox: Sandbox, container: HTMLDivElement) => void; 27 | /** An object you can use to keep data around in the scope of your plugin object */ 28 | data?: any; 29 | } 30 | interface PlaygroundConfig { 31 | lang: string; 32 | prefix: string; 33 | } 34 | export declare const setupPlayground: (sandbox: { 35 | config: { 36 | text: string; 37 | useJavaScript: boolean; 38 | compilerOptions: import("monaco-editor").languages.typescript.CompilerOptions; 39 | monacoSettings?: import("monaco-editor").editor.IEditorOptions | undefined; 40 | acquireTypes: boolean; 41 | supportTwoslashCompilerOptions: boolean; 42 | suppressAutomaticallyGettingDefaultText?: true | undefined; 43 | suppressAutomaticallyGettingCompilerFlags?: true | undefined; 44 | logger: { 45 | log: (...args: any[]) => void; 46 | error: (...args: any[]) => void; 47 | groupCollapsed: (...args: any[]) => void; 48 | groupEnd: (...args: any[]) => void; 49 | }; 50 | domID: string; 51 | }; 52 | supportedVersions: readonly ["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"]; 53 | editor: import("monaco-editor").editor.IStandaloneCodeEditor; 54 | language: string; 55 | monaco: typeof import("monaco-editor"); 56 | // getWorkerProcess: () => Promise; 57 | tsvfs: typeof import("./typescript-vfs"); 58 | getEmitResult: () => Promise; 59 | getRunnableJS: () => Promise; 60 | getDTSForCode: () => Promise; 61 | getDomNode: () => HTMLElement; 62 | getModel: () => import("monaco-editor").editor.ITextModel; 63 | getText: () => string; 64 | setText: (text: string) => void; 65 | getAST: () => Promise; 66 | ts: typeof import("typescript"); 67 | createTSProgram: () => Promise; 68 | compilerDefaults: import("monaco-editor").languages.typescript.CompilerOptions; 69 | getCompilerOptions: () => import("monaco-editor").languages.typescript.CompilerOptions; 70 | setCompilerSettings: (opts: import("monaco-editor").languages.typescript.CompilerOptions) => void; 71 | updateCompilerSetting: (key: string | number, value: any) => void; 72 | updateCompilerSettings: (opts: import("monaco-editor").languages.typescript.CompilerOptions) => void; 73 | setDidUpdateCompilerSettings: (func: (opts: import("monaco-editor").languages.typescript.CompilerOptions) => void) => void; 74 | // lzstring: typeof import("typescriptlang-org/static/js/sandbox/vendor/lzstring.min"); 75 | createURLQueryWithCompilerOptions: (sandbox: any, paramOverrides?: any) => string; 76 | getTwoSlashComplierOptions: (code: string) => any; 77 | languageServiceDefaults: import("monaco-editor").languages.typescript.LanguageServiceDefaults; 78 | }, monaco: typeof import("monaco-editor"), config: PlaygroundConfig, i: (key: string) => string, react: typeof React) => { 79 | exporter: { 80 | openProjectInStackBlitz: () => void; 81 | openProjectInCodeSandbox: () => void; 82 | reportIssue: () => Promise; 83 | copyAsMarkdownIssue: () => Promise; 84 | copyForChat: () => void; 85 | copyForChatWithPreview: () => void; 86 | openInTSAST: () => void; 87 | }; 88 | // ui: import("./createUI").UI; 89 | registerPlugin: (plugin: PlaygroundPlugin) => void; 90 | }; 91 | export declare type Playground = ReturnType; 92 | -------------------------------------------------------------------------------- /src/vendor/pluginUtils.d.ts: -------------------------------------------------------------------------------- 1 | import type { Node } from "typescript"; 2 | import type React from 'react'; 3 | /** Creates a set of util functions which is exposed to Plugins to make it easier to build consistent UIs */ 4 | export declare const createUtils: (sb: any, react: typeof React) => { 5 | /** Use this to make a few dumb element generation funcs */ 6 | el: (str: string, el: string, container: Element) => void; 7 | /** Get a relative URL for something in your dist folder depending on if you're in dev mode or not */ 8 | requireURL: (path: string) => string; 9 | /** Returns a div which has an interactive AST a TypeScript AST by passing in the root node */ 10 | createASTTree: (node: Node) => HTMLDivElement; 11 | /** The Gatsby copy of React */ 12 | react: typeof React; 13 | }; 14 | export declare type PluginUtils = ReturnType; 15 | -------------------------------------------------------------------------------- /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 | /** 7 | * These are settings for the playground which are the equivalent to props in React 8 | * any changes to it should require a new setup of the playground 9 | */ 10 | export declare type PlaygroundConfig = { 11 | /** The default source code for the playground */ 12 | text: string; 13 | /** Should it run the ts or js IDE services */ 14 | useJavaScript: boolean; 15 | /** Compiler options which are automatically just forwarded on */ 16 | compilerOptions: CompilerOptions; 17 | /** Optional monaco settings overrides */ 18 | monacoSettings?: import('monaco-editor').editor.IEditorOptions; 19 | /** Acquire types via type acquisition */ 20 | acquireTypes: boolean; 21 | /** Support twoslash compiler options */ 22 | supportTwoslashCompilerOptions: boolean; 23 | /** Get the text via query params and local storage, useful when the editor is the main experience */ 24 | suppressAutomaticallyGettingDefaultText?: true; 25 | /** Suppress setting compiler options from the compiler flags from query params */ 26 | suppressAutomaticallyGettingCompilerFlags?: true; 27 | /** Logging system */ 28 | logger: { 29 | log: (...args: any[]) => void; 30 | error: (...args: any[]) => void; 31 | groupCollapsed: (...args: any[]) => void; 32 | groupEnd: (...args: any[]) => void; 33 | }; 34 | } & ({ 35 | domID: string; 36 | } | { 37 | elementToAppend: HTMLElement; 38 | }); 39 | /** The default settings which we apply a partial over */ 40 | export declare function defaultPlaygroundSettings(): { 41 | /** The default source code for the playground */ 42 | text: string; 43 | /** Should it run the ts or js IDE services */ 44 | useJavaScript: boolean; 45 | /** Compiler options which are automatically just forwarded on */ 46 | compilerOptions: import("monaco-editor").languages.typescript.CompilerOptions; 47 | /** Optional monaco settings overrides */ 48 | monacoSettings?: import("monaco-editor").editor.IEditorOptions | undefined; 49 | /** Acquire types via type acquisition */ 50 | acquireTypes: boolean; 51 | /** Support twoslash compiler options */ 52 | supportTwoslashCompilerOptions: boolean; 53 | /** Get the text via query params and local storage, useful when the editor is the main experience */ 54 | suppressAutomaticallyGettingDefaultText?: true | undefined; 55 | /** Suppress setting compiler options from the compiler flags from query params */ 56 | suppressAutomaticallyGettingCompilerFlags?: true | undefined; 57 | /** Logging system */ 58 | logger: { 59 | log: (...args: any[]) => void; 60 | error: (...args: any[]) => void; 61 | groupCollapsed: (...args: any[]) => void; 62 | groupEnd: (...args: any[]) => void; 63 | }; 64 | } & { 65 | domID: string; 66 | }; 67 | /** Creates a sandbox editor, and returns a set of useful functions and the editor */ 68 | export declare const createTypeScriptSandbox: (partialConfig: Partial<{ 69 | /** The default source code for the playground */ 70 | text: string; 71 | /** Should it run the ts or js IDE services */ 72 | useJavaScript: boolean; 73 | /** Compiler options which are automatically just forwarded on */ 74 | compilerOptions: import("monaco-editor").languages.typescript.CompilerOptions; 75 | /** Optional monaco settings overrides */ 76 | monacoSettings?: import("monaco-editor").editor.IEditorOptions | undefined; 77 | /** Acquire types via type acquisition */ 78 | acquireTypes: boolean; 79 | /** Support twoslash compiler options */ 80 | supportTwoslashCompilerOptions: boolean; 81 | /** Get the text via query params and local storage, useful when the editor is the main experience */ 82 | suppressAutomaticallyGettingDefaultText?: true | undefined; 83 | /** Suppress setting compiler options from the compiler flags from query params */ 84 | suppressAutomaticallyGettingCompilerFlags?: true | undefined; 85 | /** Logging system */ 86 | logger: { 87 | log: (...args: any[]) => void; 88 | error: (...args: any[]) => void; 89 | groupCollapsed: (...args: any[]) => void; 90 | groupEnd: (...args: any[]) => void; 91 | }; 92 | } & { 93 | domID: string; 94 | }> | Partial<{ 95 | /** The default source code for the playground */ 96 | text: string; 97 | /** Should it run the ts or js IDE services */ 98 | useJavaScript: boolean; 99 | /** Compiler options which are automatically just forwarded on */ 100 | compilerOptions: import("monaco-editor").languages.typescript.CompilerOptions; 101 | /** Optional monaco settings overrides */ 102 | monacoSettings?: import("monaco-editor").editor.IEditorOptions | undefined; 103 | /** Acquire types via type acquisition */ 104 | acquireTypes: boolean; 105 | /** Support twoslash compiler options */ 106 | supportTwoslashCompilerOptions: boolean; 107 | /** Get the text via query params and local storage, useful when the editor is the main experience */ 108 | suppressAutomaticallyGettingDefaultText?: true | undefined; 109 | /** Suppress setting compiler options from the compiler flags from query params */ 110 | suppressAutomaticallyGettingCompilerFlags?: true | undefined; 111 | /** Logging system */ 112 | logger: { 113 | log: (...args: any[]) => void; 114 | error: (...args: any[]) => void; 115 | groupCollapsed: (...args: any[]) => void; 116 | groupEnd: (...args: any[]) => void; 117 | }; 118 | } & { 119 | elementToAppend: HTMLElement; 120 | }>, monaco: typeof import("monaco-editor"), ts: typeof import("typescript")) => { 121 | /** The same config you passed in */ 122 | config: { 123 | text: string; 124 | useJavaScript: boolean; 125 | compilerOptions: import("monaco-editor").languages.typescript.CompilerOptions; 126 | monacoSettings?: import("monaco-editor").editor.IEditorOptions | undefined; 127 | acquireTypes: boolean; 128 | supportTwoslashCompilerOptions: boolean; 129 | suppressAutomaticallyGettingDefaultText?: true | undefined; 130 | suppressAutomaticallyGettingCompilerFlags?: true | undefined; 131 | logger: { 132 | log: (...args: any[]) => void; 133 | error: (...args: any[]) => void; 134 | groupCollapsed: (...args: any[]) => void; 135 | groupEnd: (...args: any[]) => void; 136 | }; 137 | domID: string; 138 | }; 139 | /** A list of TypeScript versions you can use with the TypeScript sandbox */ 140 | supportedVersions: readonly ["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"]; 141 | /** The monaco editor instance */ 142 | editor: import("monaco-editor").editor.IStandaloneCodeEditor; 143 | /** Either "typescript" or "javascript" depending on your config */ 144 | language: string; 145 | /** The outer monaco module, the result of require("monaco-editor") */ 146 | monaco: typeof import("monaco-editor"); 147 | /** 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 . */ 148 | getWorkerProcess: () => Promise; 149 | /** 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)*/ 150 | tsvfs: typeof tsvfs; 151 | /** Get all the different emitted files after TypeScript is run */ 152 | getEmitResult: () => Promise; 153 | /** Gets just the JavaScript for your sandbox, will transpile if in TS only */ 154 | getRunnableJS: () => Promise; 155 | /** Gets the DTS output of the main code in the editor */ 156 | getDTSForCode: () => Promise; 157 | /** The monaco-editor dom node, used for showing/hiding the editor */ 158 | getDomNode: () => HTMLElement; 159 | /** 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 */ 160 | getModel: () => import("monaco-editor").editor.ITextModel; 161 | /** Gets the text of the main model, which is the text in the editor */ 162 | getText: () => string; 163 | /** Shortcut for setting the model's text content which would update the editor */ 164 | setText: (text: string) => void; 165 | /** Gets the AST of the current text in monaco - uses `createTSProgram`, so the performance caveat applies there too */ 166 | getAST: () => Promise; 167 | /** The module you get from require("typescript") */ 168 | ts: typeof import("typescript"); 169 | /** Create a new Program, a TypeScript data model which represents the entire project. 170 | * 171 | * The first time this is called it has to download all the DTS files which is needed for an exact compiler run. Which 172 | * at max is about 1.5MB - after that subsequent downloads of dts lib files come from localStorage. 173 | * 174 | * Try to use this sparingly as it can be computationally expensive, at the minimum you should be using the debounced setup. 175 | * 176 | * TODO: It would be good to create an easy way to have a single program instance which is updated for you 177 | * when the monaco model changes. 178 | */ 179 | createTSProgram: () => Promise; 180 | /** The Sandbox's default compiler options */ 181 | compilerDefaults: import("monaco-editor").languages.typescript.CompilerOptions; 182 | /** The Sandbox's current compiler options */ 183 | getCompilerOptions: () => import("monaco-editor").languages.typescript.CompilerOptions; 184 | /** Replace the Sandbox's compiler options */ 185 | setCompilerSettings: (opts: import("monaco-editor").languages.typescript.CompilerOptions) => void; 186 | /** Overwrite the Sandbox's compiler options */ 187 | updateCompilerSetting: (key: string | number, value: any) => void; 188 | /** Update a single compiler option in the SAndbox */ 189 | updateCompilerSettings: (opts: import("monaco-editor").languages.typescript.CompilerOptions) => void; 190 | /** A way to get callbacks when compiler settings have changed */ 191 | setDidUpdateCompilerSettings: (func: (opts: import("monaco-editor").languages.typescript.CompilerOptions) => void) => void; 192 | /** A copy of lzstring, which is used to archive/unarchive code */ 193 | // lzstring: typeof lzstring; 194 | /** Returns compiler options found in the params of the current page */ 195 | createURLQueryWithCompilerOptions: (sandbox: any, paramOverrides?: any) => string; 196 | /** Returns compiler options in the source code using twoslash notation */ 197 | getTwoSlashComplierOptions: (code: string) => any; 198 | /** Gets to the current monaco-language, this is how you talk to the background webworkers */ 199 | languageServiceDefaults: import("monaco-editor").languages.typescript.LanguageServiceDefaults; 200 | }; 201 | export declare type Sandbox = ReturnType; 202 | export {}; 203 | -------------------------------------------------------------------------------- /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 TS = typeof import('typescript'); 5 | export interface VirtualTypeScriptEnvironment { 6 | sys: System; 7 | languageService: import('typescript').LanguageService; 8 | getSourceFile: (fileName: string) => import('typescript').SourceFile | undefined; 9 | createFile: (fileName: string, content: string) => void; 10 | updateFile: (fileName: string, content: string, replaceTextSpan?: import('typescript').TextSpan) => void; 11 | } 12 | /** 13 | * Makes a virtual copy of the TypeScript environment. This is the main API you want to be using with 14 | * typescript-vfs. A lot of the other exposed functions are used by this function to get set up. 15 | * 16 | * @param sys an object which conforms to the TS Sys (a shim over read/write access to the fs) 17 | * @param rootFiles a list of files which are considered inside the project 18 | * @param ts a copy pf the TypeScript module 19 | * @param compilerOptions the options for this compiler run 20 | */ 21 | export declare function createVirtualTypeScriptEnvironment(sys: System, rootFiles: string[], ts: TS, compilerOptions?: CompilerOptions): VirtualTypeScriptEnvironment; 22 | /** 23 | * Grab the list of lib files for a particular target, will return a bit more than necessary (by including 24 | * the dom) but that's OK 25 | * 26 | * @param target The compiler settings target baseline 27 | * @param ts A copy of the TypeScript module 28 | */ 29 | export declare const knownLibFilesForCompilerOptions: (compilerOptions: import("typescript").CompilerOptions, ts: typeof import("typescript")) => string[]; 30 | /** 31 | * Sets up a Map with lib contents by grabbing the necessary files from 32 | * the local copy of typescript via the file system. 33 | */ 34 | export declare const createDefaultMapFromNodeModules: (compilerOptions: import("typescript").CompilerOptions) => Map; 35 | /** 36 | * Create a virtual FS Map with the lib files from a particular TypeScript 37 | * version based on the target, Always includes dom ATM. 38 | * 39 | * @param options The compiler target, which dictates the libs to set up 40 | * @param version the versions of TypeScript which are supported 41 | * @param cache should the values be stored in local storage 42 | * @param ts a copy of the typescript import 43 | * @param lzstring an optional copy of the lz-string import 44 | * @param fetcher an optional replacement for the global fetch function (tests mainly) 45 | * @param storer an optional replacement for the localStorage global (tests mainly) 46 | */ 47 | export declare const createDefaultMapFromCDN: (options: import("typescript").CompilerOptions, version: string, cache: boolean, ts: typeof import("typescript"), lzstring?: any | undefined, fetcher?: typeof fetch | undefined, storer?: Storage | undefined) => Promise>; 48 | /** 49 | * Creates an in-memory System object which can be used in a TypeScript program, this 50 | * is what provides read/write aspects of the virtual fs 51 | */ 52 | export declare function createSystem(files: Map): System; 53 | /** 54 | * Creates an in-memory CompilerHost -which is essentially an extra wrapper to System 55 | * which works with TypeScript objects - returns both a compiler host, and a way to add new SourceFile 56 | * instances to the in-memory file system. 57 | */ 58 | export declare function createVirtualCompilerHost(sys: System, compilerOptions: CompilerOptions, ts: TS): { 59 | compilerHost: import("typescript").CompilerHost; 60 | updateFile: (sourceFile: import("typescript").SourceFile) => boolean; 61 | }; 62 | /** 63 | * Creates an object which can host a language service against the virtual file-system 64 | */ 65 | export declare function createVirtualLanguageServiceHost(sys: System, rootFiles: string[], compilerOptions: CompilerOptions, ts: TS): { 66 | languageServiceHost: import("typescript").LanguageServiceHost; 67 | updateFile: (sourceFile: import("typescript").SourceFile) => void; 68 | }; 69 | export {}; 70 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/vim-monaco/cm_adapter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * An adapter to make CodeMirror's vim bindings work with monaco 3 | */ 4 | // import { TypeOperations } from 'monaco-editor/esm/vs/editor/common/controller/cursorTypeOperations'; 5 | 6 | const { 7 | editor: monacoEditor, 8 | KeyCode, 9 | KeyMod, 10 | Range, 11 | Position, 12 | Selection, 13 | SelectionDirection, 14 | } = (globalThis as any).monaco; 15 | const VerticalRevealType = { 16 | Bottom: 4, 17 | }; 18 | 19 | // for monaco 0.19.x where x < 3 20 | const EditorOptConstants = { 21 | readOnly: 65, 22 | cursorWidth: 20, 23 | fontInfo: 32, 24 | }; 25 | 26 | const { userAgent, platform } = window.navigator; 27 | const edge = /Edge\/(\d+)/.exec(userAgent); 28 | const ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent); 29 | const mac = ios || /Mac/.test(platform); 30 | 31 | const nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; 32 | 33 | function isWordCharBasic(ch) { 34 | return /\w/.test(ch) || ch > "\x80" && 35 | (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)) 36 | } 37 | 38 | function Pos(line, column) { 39 | if (!(this instanceof Pos)) { 40 | return new Pos(line, column); 41 | } 42 | 43 | this.line = line; 44 | this.ch = column; 45 | } 46 | 47 | function signal(cm, signal, args) { 48 | cm.dispatch(signal, args); 49 | } 50 | 51 | function dummy(key) { 52 | return function() { 53 | // console.log(key, 'dummy function called with', Array.prototype.slice.call(arguments)); 54 | } 55 | } 56 | 57 | let doFold, noFold; 58 | 59 | if (String.prototype.normalize) { 60 | doFold = function(str) { return str.normalize("NFD").toLowerCase() } 61 | noFold = function(str) { return str.normalize("NFD") } 62 | } else { 63 | doFold = function(str) { return str.toLowerCase() } 64 | noFold = function(str) { return str } 65 | } 66 | 67 | var StringStream = function(string, tabSize) { 68 | this.pos = this.start = 0; 69 | this.string = string; 70 | this.tabSize = tabSize || 8; 71 | this.lastColumnPos = this.lastColumnValue = 0; 72 | this.lineStart = 0; 73 | }; 74 | 75 | StringStream.prototype = { 76 | eol: function() {return this.pos >= this.string.length;}, 77 | sol: function() {return this.pos == this.lineStart;}, 78 | peek: function() {return this.string.charAt(this.pos) || undefined;}, 79 | next: function() { 80 | if (this.pos < this.string.length) 81 | return this.string.charAt(this.pos++); 82 | }, 83 | eat: function(match) { 84 | var ch = this.string.charAt(this.pos); 85 | if (typeof match == "string") var ok = ch == match; 86 | else var ok = ch && (match.test ? match.test(ch) : match(ch)); 87 | if (ok) {++this.pos; return ch;} 88 | }, 89 | eatWhile: function(match) { 90 | var start = this.pos; 91 | while (this.eat(match)){} 92 | return this.pos > start; 93 | }, 94 | eatSpace: function() { 95 | var start = this.pos; 96 | while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; 97 | return this.pos > start; 98 | }, 99 | skipToEnd: function() {this.pos = this.string.length;}, 100 | skipTo: function(ch) { 101 | var found = this.string.indexOf(ch, this.pos); 102 | if (found > -1) {this.pos = found; return true;} 103 | }, 104 | backUp: function(n) {this.pos -= n;}, 105 | column: function() { 106 | throw "not implemented"; 107 | }, 108 | indentation: function() { 109 | throw "not implemented"; 110 | }, 111 | match: function(pattern, consume, caseInsensitive) { 112 | if (typeof pattern == "string") { 113 | var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; 114 | var substr = this.string.substr(this.pos, pattern.length); 115 | if (cased(substr) == cased(pattern)) { 116 | if (consume !== false) this.pos += pattern.length; 117 | return true; 118 | } 119 | } else { 120 | var match = this.string.slice(this.pos).match(pattern); 121 | if (match && match.index > 0) return null; 122 | if (match && consume !== false) this.pos += match[0].length; 123 | return match; 124 | } 125 | }, 126 | current: function(){return this.string.slice(this.start, this.pos);}, 127 | hideFirstChars: function(n, inner) { 128 | this.lineStart += n; 129 | try { return inner(); } 130 | finally { this.lineStart -= n; } 131 | } 132 | }; 133 | 134 | function toCmPos(pos) { 135 | return new Pos(pos.lineNumber - 1, pos.column - 1); 136 | } 137 | 138 | function toMonacoPos(pos) { 139 | return new Position(pos.line + 1, pos.ch + 1); 140 | } 141 | 142 | class Marker { 143 | cm: any; 144 | id: any; 145 | lineNumber: any; 146 | column: any; 147 | constructor(cm, id, line, ch) { 148 | this.cm = cm; 149 | this.id = id; 150 | this.lineNumber = line + 1; 151 | this.column = ch + 1; 152 | cm.marks[this.id] = this; 153 | } 154 | 155 | clear() { 156 | delete this.cm.marks[this.id]; 157 | } 158 | 159 | find() { 160 | return toCmPos(this); 161 | } 162 | } 163 | 164 | function monacoToCmKey(e, skip = false) { 165 | let addQuotes = true; 166 | let keyName = monaco.KeyCode[e.keyCode]; 167 | 168 | if (e.key) { 169 | keyName = e.key; 170 | addQuotes = false; 171 | } 172 | 173 | let key = keyName; 174 | let skipOnlyShiftCheck = skip; 175 | 176 | switch (e.keyCode) { 177 | case KeyCode.Shift: 178 | case KeyCode.Meta: 179 | case KeyCode.Alt: 180 | case KeyCode.Ctrl: 181 | return key; 182 | case KeyCode.Escape: 183 | skipOnlyShiftCheck = true; 184 | key = 'Esc'; 185 | break; 186 | } 187 | 188 | if (keyName.startsWith('KEY_')) { 189 | key = keyName[keyName.length - 1].toLowerCase(); 190 | } else if (keyName.endsWith('Arrow')) { 191 | skipOnlyShiftCheck = true; 192 | key = keyName.substr(0, keyName.length - 5); 193 | } else if (keyName.startsWith('US_')) { 194 | key = e.browserEvent.key; 195 | } 196 | 197 | if (!skipOnlyShiftCheck && !e.altKey && !e.ctrlKey && !e.metaKey) { 198 | key = e.key || e.browserEvent.key; 199 | } else { 200 | if (e.altKey) { 201 | key = `Alt-${key}`; 202 | } 203 | if (e.ctrlKey) { 204 | key = `Ctrl-${key}`; 205 | } 206 | if (e.metaKey) { 207 | key = `Meta-${key}`; 208 | } 209 | if (e.shiftKey) { 210 | key = `Shift-${key}`; 211 | } 212 | } 213 | 214 | if (key.length === 1 && addQuotes) { 215 | key = `'${key}'`; 216 | } 217 | 218 | return key; 219 | } 220 | 221 | class CMAdapter { 222 | static Pos = Pos; 223 | static signal = signal; 224 | static on = dummy('on'); 225 | static off = dummy('off'); 226 | static addClass = dummy('addClass'); 227 | static rmClass = dummy('rmClass'); 228 | static defineOption = dummy('defineOption'); 229 | static keyMap = { 230 | 'default': function(key) { 231 | return function(cm) { 232 | return true; 233 | } 234 | } 235 | }; 236 | static isWordChar = isWordCharBasic; 237 | static keyName = monacoToCmKey; 238 | static StringStream = StringStream; 239 | static e_stop = function(e) { 240 | if (e.stopPropagation) { 241 | e.stopPropagation(); 242 | } else { 243 | e.cancelBubble = true; 244 | } 245 | CMAdapter.e_preventDefault(e); 246 | return false; 247 | }; 248 | 249 | static e_preventDefault = function(e) { 250 | if (e.preventDefault) { 251 | e.preventDefault(); 252 | 253 | if (e.browserEvent) { 254 | e.browserEvent.preventDefault(); 255 | } 256 | } else { 257 | e.returnValue = false; 258 | } 259 | 260 | return false; 261 | }; 262 | 263 | static commands = { 264 | redo: function(cm) { 265 | cm.triggerEditorAction('redo'); 266 | }, 267 | undo: function(cm) { 268 | cm.triggerEditorAction('undo'); 269 | }, 270 | newlineAndIndent: function(cm) { 271 | cm.triggerEditorAction('editor.action.insertLineAfter'); 272 | } 273 | }; 274 | 275 | static lookupKey = function lookupKey(key, map, handle) { 276 | if (typeof map === 'string') { 277 | map = CMAdapter.keyMap[map]; 278 | } 279 | const found = typeof map == "function" ? map(key) : map[key]; 280 | 281 | if (found === false) return "nothing"; 282 | if (found === "...") return "multi"; 283 | if (found != null && handle(found)) return "handled"; 284 | 285 | if (map.fallthrough) { 286 | if (!Array.isArray(map.fallthrough)) 287 | return lookupKey(key, map.fallthrough, handle); 288 | for (var i = 0; i < map.fallthrough.length; i++) { 289 | var result = lookupKey(key, map.fallthrough[i], handle); 290 | if (result) return result; 291 | } 292 | } 293 | } 294 | 295 | static defineExtension = function(name, fn) { 296 | CMAdapter.prototype[name] = fn; 297 | }; 298 | 299 | state: any; 300 | marks: any; 301 | $uid: any; 302 | disposables: any[]; 303 | listeners: any; 304 | curOp: any; 305 | attached: any; 306 | statusBar: any; 307 | ctxInsert: any; 308 | 309 | constructor(public editor) { 310 | this.editor = editor; 311 | this.state = {}; 312 | this.marks = {}; 313 | this.$uid = 0; 314 | this.disposables = []; 315 | this.listeners = {}; 316 | this.curOp = {}; 317 | this.attached = false; 318 | this.statusBar = null; 319 | this.addLocalListeners(); 320 | this.ctxInsert = this.editor.createContextKey('insertMode', true); 321 | } 322 | 323 | attach() { 324 | CMAdapter.keyMap.vim.attach(this); 325 | } 326 | 327 | addLocalListeners() { 328 | this.disposables.push( 329 | this.editor.onDidChangeCursorPosition(this.handleCursorChange), 330 | this.editor.onDidChangeModelContent(this.handleChange), 331 | this.editor.onKeyDown(this.handleKeyDown), 332 | ); 333 | } 334 | 335 | handleKeyDown = (e) => { 336 | // Allow previously registered keydown listeners to handle the event and 337 | // prevent this extension from also handling it. 338 | if (e.browserEvent.defaultPrevented & e.keyCode !== KeyCode.Escape) { 339 | return; 340 | } 341 | 342 | if (!this.attached) { 343 | return; 344 | } 345 | 346 | const key = monacoToCmKey(e); 347 | 348 | if (this.replaceMode) { 349 | this.handleReplaceMode(key, e); 350 | } 351 | 352 | if (!key) { 353 | return; 354 | } 355 | 356 | if (CMAdapter.keyMap.vim && CMAdapter.keyMap.vim.call) { 357 | const cmd = CMAdapter.keyMap.vim.call(key, this); 358 | if (cmd) { 359 | e.preventDefault(); 360 | e.stopPropagation(); 361 | 362 | try { 363 | cmd(); 364 | } catch (err) { 365 | console.error(err); 366 | } 367 | } 368 | } 369 | } 370 | 371 | handleReplaceMode(key, e) { 372 | let fromReplace = false; 373 | let char = key; 374 | const pos = this.editor.getPosition(); 375 | let range = new Range(pos.lineNumber, pos.column, pos.lineNumber, pos.column + 1); 376 | let forceMoveMarkers = true; 377 | 378 | if (key.startsWith('\'')) { 379 | char = key[1]; 380 | } else if (char === 'Enter') { 381 | char = '\n'; 382 | } else if (char === 'Backspace') { 383 | const lastItem = this.replaceStack.pop(); 384 | 385 | if (!lastItem) { 386 | return; 387 | } 388 | 389 | fromReplace = true; 390 | char = lastItem; 391 | range = new Range(pos.lineNumber, pos.column, pos.lineNumber, pos.column - 1); 392 | } else { 393 | return; 394 | } 395 | 396 | e.preventDefault(); 397 | e.stopPropagation(); 398 | 399 | if (!this.replaceStack) { 400 | this.replaceStack = []; 401 | } 402 | 403 | if (!fromReplace) { 404 | this.replaceStack.push(this.editor.getModel().getValueInRange(range)); 405 | } 406 | 407 | this.editor.executeEdits('vim', [{ 408 | text: char, 409 | range, 410 | forceMoveMarkers, 411 | }]); 412 | 413 | if (fromReplace) { 414 | this.editor.setPosition(range.getStartPosition()); 415 | } 416 | } 417 | 418 | handleCursorChange = (e) => { 419 | const { position, source } = e; 420 | const { editor } = this; 421 | const selection = editor.getSelection(); 422 | 423 | if (!this.ctxInsert.get() && e.source === 'mouse' && selection.isEmpty()) { 424 | const maxCol = editor.getModel().getLineMaxColumn(position.lineNumber); 425 | 426 | if (e.position.column === maxCol) { 427 | editor.setPosition(new Position(e.position.lineNumber, maxCol - 1)); 428 | return; 429 | } 430 | } 431 | 432 | this.dispatch('cursorActivity', this, e); 433 | } 434 | 435 | handleChange = (e) => { 436 | const { changes } = e; 437 | const change = { 438 | text: changes.reduce((acc, change) => { 439 | acc.push(change.text); 440 | return acc; 441 | }, []), 442 | origin: '+input' 443 | }; 444 | const curOp = this.curOp = this.curOp || {}; 445 | 446 | if (!curOp.changeHandlers) { 447 | curOp.changeHandlers = this.listeners['change'] && this.listeners['change'].slice(); 448 | } 449 | 450 | if (this.virtualSelectionMode()) { 451 | return; 452 | } 453 | 454 | if (!curOp.lastChange) { 455 | curOp.lastChange = curOp.change = change; 456 | } else { 457 | curOp.lastChange.next = curOp.lastChange = change; 458 | } 459 | 460 | this.dispatch('change', this, change); 461 | }; 462 | 463 | setOption(key, value) { 464 | this.state[key] = value; 465 | 466 | if (key === 'theme') { 467 | monacoEditor.setTheme(value); 468 | } 469 | } 470 | 471 | getConfiguration() { 472 | const { editor } = this; 473 | let opts = EditorOptConstants; 474 | 475 | if (typeof editor.getConfiguration === 'function') { 476 | return editor.getConfiguration(); 477 | } else if ('EditorOption' in monacoEditor) { // for monaco 0.19.3 onwards 478 | opts = monacoEditor.EditorOption; 479 | } 480 | 481 | return { 482 | readOnly: editor.getOption(opts.readOnly), 483 | viewInfo: { 484 | cursorWidth: editor.getOption(opts.cursorWidth), 485 | }, 486 | fontInfo: editor.getOption(opts.fontInfo), 487 | }; 488 | } 489 | 490 | getOption(key) { 491 | if (key === 'readOnly') { 492 | return this.getConfiguration().readOnly; 493 | } else if (key === 'firstLineNumber') { 494 | return this.firstLine() + 1; 495 | } else if (key === 'indentWithTabs') { 496 | return !this.editor.getModel().getOptions().insertSpaces; 497 | } else { 498 | if (typeof this.editor.getConfiguration === 'function') { 499 | return this.editor.getRawConfiguration()[key]; 500 | } 501 | return this.editor.getRawOptions()[key]; 502 | } 503 | return this.state[key]; 504 | } 505 | 506 | dispatch(signal, ...args) { 507 | const listeners = this.listeners[signal]; 508 | if (!listeners) { 509 | return; 510 | } 511 | 512 | listeners.forEach(handler => handler(...args)); 513 | } 514 | 515 | on(event, handler) { 516 | if (!this.listeners[event]) { 517 | this.listeners[event] = []; 518 | } 519 | 520 | this.listeners[event].push(handler); 521 | } 522 | 523 | off(event, handler) { 524 | const listeners = this.listeners[event]; 525 | if (!listeners) { 526 | return; 527 | } 528 | 529 | this.listeners[event] = listeners.filter(l => l !== handler); 530 | } 531 | 532 | firstLine() { 533 | return 0; 534 | } 535 | 536 | lastLine() { 537 | return this.lineCount() - 1; 538 | } 539 | 540 | lineCount() { 541 | return this.editor.getModel().getLineCount(); 542 | } 543 | 544 | defaultTextHeight() { 545 | return 1; 546 | } 547 | 548 | getLine(line) { 549 | if (line < 0) { 550 | return ''; 551 | } 552 | const model = this.editor.getModel(); 553 | const maxLines = model.getLineCount(); 554 | 555 | if (line + 1 > maxLines) { 556 | line = maxLines - 1; 557 | } 558 | 559 | return this.editor.getModel().getLineContent(line + 1); 560 | } 561 | 562 | getAnchorForSelection(selection) { 563 | if (selection.isEmpty()) { 564 | return selection.getPosition(); 565 | } 566 | 567 | const selDir = selection.getDirection(); 568 | return (selDir === SelectionDirection.LTR) ? selection.getStartPosition() : selection.getEndPosition(); 569 | } 570 | 571 | getHeadForSelection(selection) { 572 | if (selection.isEmpty()) { 573 | return selection.getPosition(); 574 | } 575 | 576 | const selDir = selection.getDirection(); 577 | return (selDir === SelectionDirection.LTR) ? selection.getEndPosition() : selection.getStartPosition(); 578 | } 579 | 580 | getCursor(type = null) { 581 | if (!type) { 582 | return toCmPos(this.editor.getPosition()); 583 | } 584 | 585 | const sel = this.editor.getSelection(); 586 | let pos; 587 | 588 | if (sel.isEmpty()) { 589 | pos = sel.getPosition(); 590 | } else if (type === 'anchor') { 591 | pos = this.getAnchorForSelection(sel); 592 | } else { 593 | pos = this.getHeadForSelection(sel); 594 | } 595 | 596 | return toCmPos(pos); 597 | } 598 | 599 | getRange(start, end) { 600 | const p1 = toMonacoPos(start); 601 | const p2 = toMonacoPos(end); 602 | 603 | return this.editor.getModel().getValueInRange(Range.fromPositions(p1, p2)); 604 | } 605 | 606 | getSelection() { 607 | return this.editor.getModel().getValueInRange(this.editor.getSelection()); 608 | } 609 | 610 | replaceRange(text, start, end) { 611 | const p1 = toMonacoPos(start); 612 | const p2 = !end ? p1 : toMonacoPos(end); 613 | 614 | this.editor.executeEdits('vim', [{ 615 | text, 616 | range: Range.fromPositions(p1, p2), 617 | }]); 618 | // @TODO - Check if this breaks any other expectation 619 | this.pushUndoStop(); 620 | } 621 | 622 | pushUndoStop() { 623 | this.editor.pushUndoStop(); 624 | } 625 | 626 | setCursor(line, ch) { 627 | let pos = line; 628 | 629 | if (typeof line !== 'object') { 630 | pos = {}; 631 | pos.line = line; 632 | pos.ch = ch; 633 | } 634 | 635 | const monacoPos = this.editor.getModel().validatePosition(toMonacoPos(pos)); 636 | this.editor.setPosition(toMonacoPos(pos)); 637 | this.editor.revealPosition(monacoPos); 638 | } 639 | 640 | somethingSelected() { 641 | return !this.editor.getSelection().isEmpty(); 642 | } 643 | 644 | operation(fn, force) { 645 | return fn(); 646 | } 647 | 648 | listSelections() { 649 | const selections = this.editor.getSelections(); 650 | 651 | if (!selections.length || this.inVirtualSelectionMode) { 652 | return [{ 653 | anchor: this.getCursor('anchor'), 654 | head: this.getCursor('head'), 655 | }]; 656 | } 657 | 658 | return selections.map(sel => { 659 | const pos = sel.getPosition(); 660 | const start = sel.getStartPosition(); 661 | const end = sel.getEndPosition(); 662 | 663 | return { 664 | anchor: this.clipPos(toCmPos(this.getAnchorForSelection(sel))), 665 | head: this.clipPos(toCmPos(this.getHeadForSelection(sel))), 666 | }; 667 | }); 668 | } 669 | 670 | focus() { 671 | this.editor.focus(); 672 | } 673 | 674 | setSelections(selections, primIndex) { 675 | const hasSel = !!this.editor.getSelections().length; 676 | const sels = selections.map((sel, index) => { 677 | const { anchor, head } = sel; 678 | 679 | if (hasSel) { 680 | return Selection.fromPositions(toMonacoPos(anchor), toMonacoPos(head)); 681 | } else { 682 | return Selection.fromPositions(toMonacoPos(head), toMonacoPos(anchor)); 683 | } 684 | }); 685 | 686 | if (!primIndex) { 687 | sels.reverse(); 688 | } else if (sels[primIndex]) { 689 | sels.push(sels.splice(primIndex, 1)[0]); 690 | } 691 | 692 | if (!sels.length) { 693 | return; 694 | } 695 | 696 | const sel = sels[0]; 697 | let posToReveal; 698 | 699 | if (sel.getDirection() === SelectionDirection.LTR) { 700 | posToReveal = sel.getEndPosition(); 701 | } else { 702 | posToReveal = sel.getStartPosition(); 703 | } 704 | 705 | this.editor.setSelections(sels); 706 | this.editor.revealPosition(posToReveal); 707 | } 708 | 709 | setSelection(frm, to) { 710 | const range = Range.fromPositions(toMonacoPos(frm), toMonacoPos(to)); 711 | this.editor.setSelection(range); 712 | } 713 | 714 | getSelections() { 715 | const { editor } = this; 716 | return editor.getSelections().map(sel => editor.getModel().getValueInRange(sel)); 717 | } 718 | 719 | replaceSelections(texts) { 720 | const { editor } = this; 721 | 722 | editor.getSelections().forEach((sel, index) => { 723 | editor.executeEdits('vim', [{ 724 | range: sel, 725 | text: texts[index], 726 | forceMoveMarkers: false, 727 | }]); 728 | }) 729 | } 730 | 731 | toggleOverwrite(toggle) { 732 | if (toggle) { 733 | this.enterVimMode(); 734 | this.replaceMode = true; 735 | } else { 736 | this.leaveVimMode(); 737 | this.replaceMode = false; 738 | this.replaceStack = []; 739 | } 740 | } 741 | 742 | charCoords(pos, mode) { 743 | 744 | return { 745 | top: pos.line, 746 | left: pos.ch, 747 | }; 748 | } 749 | 750 | coordsChar(pos, mode) { 751 | if (mode === 'local') { 752 | 753 | } 754 | } 755 | 756 | clipPos(p) { 757 | const pos = this.editor.getModel().validatePosition(toMonacoPos(p)); 758 | return toCmPos(pos); 759 | } 760 | 761 | setBookmark(cursor, options) { 762 | const bm = new Marker(this, this.$uid++, cursor.line, cursor.ch); 763 | 764 | if (!options || !options.insertLeft) { 765 | bm.$insertRight = true; 766 | } 767 | 768 | this.marks[bm.id] = bm; 769 | return bm; 770 | } 771 | 772 | getScrollInfo() { 773 | const { editor } = this; 774 | const [ range ] = editor.getVisibleRanges(); 775 | 776 | return { 777 | left: 0, 778 | top: range.startLineNumber - 1, 779 | height: editor.getModel().getLineCount(), 780 | clientHeight: range.endLineNumber - range.startLineNumber + 1, 781 | }; 782 | } 783 | 784 | triggerEditorAction(action) { 785 | this.editor.trigger('vim', action); 786 | } 787 | 788 | dispose() { 789 | this.dispatch('dispose'); 790 | this.removeOverlay(); 791 | 792 | if (CMAdapter.keyMap.vim) { 793 | CMAdapter.keyMap.vim.detach(this); 794 | } 795 | 796 | this.disposables.forEach(d => d.dispose()); 797 | } 798 | 799 | getInputField() {} 800 | getWrapperElement() {} 801 | 802 | enterVimMode(toVim = true) { 803 | this.ctxInsert.set(false); 804 | const config = this.getConfiguration(); 805 | this.initialCursorWidth = config.viewInfo.cursorWidth || 0; 806 | 807 | this.editor.updateOptions({ 808 | cursorWidth: config.fontInfo.typicalFullwidthCharacterWidth, 809 | cursorBlinking: 'solid', 810 | }); 811 | } 812 | 813 | leaveVimMode() { 814 | this.ctxInsert.set(true); 815 | 816 | this.editor.updateOptions({ 817 | cursorWidth: this.initialCursorWidth || 0, 818 | cursorBlinking: 'blink', 819 | }); 820 | } 821 | 822 | virtualSelectionMode() { 823 | return this.inVirtualSelectionMode; 824 | } 825 | 826 | markText() { 827 | // only used for fat-cursor, not needed 828 | return {clear: function() {}, find: function() {}}; 829 | } 830 | 831 | getUserVisibleLines() { 832 | const ranges = this.editor.getVisibleRanges(); 833 | if (!ranges.length) { 834 | return { 835 | top: 0, 836 | bottom: 0, 837 | }; 838 | } 839 | 840 | const res = { 841 | top: Infinity, 842 | bottom: 0, 843 | }; 844 | 845 | ranges.reduce((acc, range) => { 846 | if (range.startLineNumber < acc.top) { 847 | acc.top = range.startLineNumber; 848 | } 849 | 850 | if (range.endLineNumber > acc.bottom) { 851 | acc.bottom = range.endLineNumber; 852 | } 853 | 854 | return acc; 855 | }, res); 856 | 857 | res.top -= 1; 858 | res.bottom -= 1; 859 | 860 | return res; 861 | } 862 | 863 | findPosV(startPos, amount, unit) { 864 | const { editor } = this; 865 | let finalAmount = amount; 866 | let finalUnit = unit; 867 | const pos = toMonacoPos(startPos); 868 | 869 | if (unit === 'page') { 870 | const editorHeight = editor.getLayoutInfo().height; 871 | const lineHeight = this.getConfiguration().fontInfo.lineHeight; 872 | finalAmount = finalAmount * Math.floor(editorHeight / lineHeight); 873 | finalUnit = 'line'; 874 | } 875 | 876 | if (unit === 'line') { 877 | pos.lineNumber += finalAmount; 878 | } 879 | 880 | return toCmPos(pos); 881 | } 882 | 883 | findMatchingBracket(pos) { 884 | const mPos = toMonacoPos(pos); 885 | const res = this.editor.getModel().matchBracket(mPos); 886 | 887 | if (!res || !(res.length === 2)) { 888 | return { 889 | to: null, 890 | }; 891 | } 892 | 893 | return { 894 | to: toCmPos(res[1].getStartPosition()), 895 | }; 896 | } 897 | 898 | findFirstNonWhiteSpaceCharacter(line) { 899 | return this.editor.getModel().getLineFirstNonWhitespaceColumn(line + 1) - 1; 900 | } 901 | 902 | scrollTo(x, y) { 903 | if (!x && !y) { 904 | return; 905 | } 906 | if (!x) { 907 | if (y < 0) { 908 | y = this.editor.getPosition().lineNumber - y; 909 | } 910 | this.editor.setScrollTop(this.editor.getTopForLineNumber(y + 1)); 911 | } 912 | } 913 | 914 | moveCurrentLineTo(viewPosition) { 915 | const { editor } = this; 916 | const pos = editor.getPosition(); 917 | const range = Range.fromPositions(pos, pos); 918 | 919 | switch(viewPosition) { 920 | case 'top': 921 | editor.revealRangeAtTop(range); 922 | return; 923 | case 'center': 924 | editor.revealRangeInCenter(range); 925 | return; 926 | case 'bottom': 927 | // private api. no other way 928 | editor._revealRange(range, VerticalRevealType.Bottom); 929 | return; 930 | } 931 | } 932 | 933 | getSearchCursor(query, pos, caseFold) { 934 | let matchCase = false; 935 | let isRegex = false; 936 | 937 | if (query instanceof RegExp && !query.global) { 938 | matchCase = !query.ignoreCase; 939 | query = query.source; 940 | isRegex = true; 941 | } 942 | 943 | if (pos.ch == undefined) pos.ch = Number.MAX_VALUE; 944 | 945 | const monacoPos = toMonacoPos(pos); 946 | const context = this; 947 | const { editor } = this; 948 | let lastSearch = null; 949 | const model = editor.getModel(); 950 | const matches = model.findMatches(query, false, isRegex, matchCase) || []; 951 | 952 | return { 953 | getMatches() {return matches;}, 954 | findNext() {return this.find(false);}, 955 | findPrevious() {return this.find(true);}, 956 | jumpTo(index) { 957 | if (!matches || !matches.length) { 958 | return false; 959 | } 960 | var match = matches[index]; 961 | lastSearch = match.range; 962 | context.highlightRanges([lastSearch], 'currentFindMatch'); 963 | context.highlightRanges(matches.map(m => m.range).filter(r => !r.equalsRange(lastSearch))); 964 | 965 | return lastSearch; 966 | }, 967 | find(back) { 968 | if (!matches || !matches.length) { 969 | return false; 970 | } 971 | 972 | let match; 973 | 974 | if (back) { 975 | const pos = lastSearch ? lastSearch.getStartPosition() : monacoPos; 976 | match = model.findPreviousMatch(query, pos, isRegex, matchCase); 977 | 978 | if (!match || !match.range.getStartPosition().isBeforeOrEqual(pos)) { 979 | return false; 980 | } 981 | } else { 982 | const pos = lastSearch ? lastSearch.getEndPosition() : monacoPos; 983 | match = model.findNextMatch(query, pos, isRegex, matchCase); 984 | if (!match || !pos.isBeforeOrEqual(match.range.getStartPosition())) { 985 | return false; 986 | } 987 | } 988 | 989 | lastSearch = match.range; 990 | context.highlightRanges([lastSearch], 'currentFindMatch'); 991 | context.highlightRanges(matches.map(m => m.range).filter(r => !r.equalsRange(lastSearch))); 992 | 993 | return lastSearch; 994 | }, 995 | from() { 996 | return lastSearch && toCmPos(lastSearch.getStartPosition()); 997 | }, 998 | to() { 999 | return lastSearch && toCmPos(lastSearch.getEndPosition()); 1000 | }, 1001 | replace(text) { 1002 | if (lastSearch) { 1003 | editor.executeEdits('vim', [{ 1004 | range: lastSearch, 1005 | text, 1006 | forceMoveMarkers: true, 1007 | }]); 1008 | 1009 | lastSearch.setEndPosition(editor.getPosition()); 1010 | editor.setPosition(lastSearch.getStartPosition()); 1011 | } 1012 | } 1013 | }; 1014 | } 1015 | 1016 | highlightRanges(ranges, className = 'findMatch') { 1017 | const decorationKey = `decoration${className}`; 1018 | this[decorationKey] = this.editor.deltaDecorations( 1019 | this[decorationKey] || [], 1020 | ranges.map(range => ({ 1021 | range, 1022 | options: { 1023 | stickiness: monacoEditor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, 1024 | zIndex: 13, 1025 | className, 1026 | showIfCollapsed: true, 1027 | }, 1028 | })), 1029 | ); 1030 | 1031 | return this[decorationKey]; 1032 | } 1033 | 1034 | addOverlay({ query }, hasBoundary, style) { 1035 | let matchCase = false; 1036 | let isRegex = false; 1037 | 1038 | if (query && query instanceof RegExp && !query.global) { 1039 | isRegex = true; 1040 | matchCase = !query.ignoreCase; 1041 | query = query.source; 1042 | } 1043 | 1044 | const match = this.editor.getModel().findNextMatch(query, this.editor.getPosition(), isRegex, matchCase); 1045 | 1046 | if (!match || !match.range) { 1047 | return; 1048 | } 1049 | 1050 | this.highlightRanges([match.range]); 1051 | } 1052 | 1053 | removeOverlay() { 1054 | ['currentFindMatch', 'findMatch'].forEach(key => { 1055 | this.editor.deltaDecorations(this[`decoration${key}`] || [], []); 1056 | }); 1057 | } 1058 | 1059 | scrollIntoView(pos) { 1060 | if (!pos) { 1061 | return; 1062 | } 1063 | this.editor.revealPosition(toMonacoPos(pos)); 1064 | } 1065 | 1066 | moveH(units, type) { 1067 | if (type !== 'char') { 1068 | return; 1069 | } 1070 | const pos = this.editor.getPosition(); 1071 | this.editor.setPosition(new Position(pos.lineNumber, pos.column + units)); 1072 | } 1073 | 1074 | /** 1075 | * Uses internal apis which not sure why is internal 1076 | */ 1077 | scanForBracket(pos, dir, dd, config) { 1078 | const mPos = toMonacoPos(pos); 1079 | const model = this.editor.getModel(); 1080 | let range = model.matchBracket(mPos); 1081 | 1082 | if (!range || range.length !== 2) { 1083 | const bracket = '{(['; 1084 | for(let i=0; i `import${t}`).join('\n'), 9 | minimap: { 10 | enabled: false, 11 | }, 12 | theme: 'vs', 13 | language: 'javascript', 14 | fontSize: 15, 15 | scrollBeyondLastLine: false, 16 | }); 17 | editor.focus(); 18 | const vimMode = initVimMode(editor, statusNode); 19 | 20 | const editorNode2 = document.getElementById('editor2'); 21 | const statusNode2 = document.getElementById('status2'); 22 | const editor2 = monaco.editor.create(editorNode2, { 23 | value: [1, 2, 3, 4, 5, 6, 7, 8].map(t => `import${t}`).join('\n'), 24 | minimap: { 25 | enabled: false, 26 | }, 27 | theme: 'vs', 28 | language: 'javascript', 29 | fontSize: 15, 30 | scrollBeyondLastLine: false, 31 | }); 32 | editor.focus(); 33 | const vimMode2 = initVimMode(editor2, statusNode2); 34 | 35 | window.editor = editor; 36 | window.vimMode = vimMode; 37 | window.editor2 = editor; 38 | window.vimMode2 = vimMode2; 39 | -------------------------------------------------------------------------------- /src/vim-monaco/index.ts: -------------------------------------------------------------------------------- 1 | // Souces under this dir are copyed from https://github.com/brijeshb42/monaco-vim 2 | 3 | import { default as VimMode } from './cm/keymap_vim'; 4 | import StatusBar from './statusbar'; 5 | 6 | export function initVimMode( 7 | editor, 8 | statusbarNode = null, 9 | StatusBarClass = StatusBar, 10 | sanitizer = null) { 11 | const vimAdapter = new VimMode(editor); 12 | 13 | if (!statusbarNode) { 14 | vimAdapter.attach(); 15 | return vimAdapter; 16 | } 17 | 18 | const statusBar = new StatusBarClass(statusbarNode, editor, sanitizer); 19 | let keyBuffer = ''; 20 | 21 | vimAdapter.on('vim-mode-change', (mode) => { 22 | statusBar.setMode(mode); 23 | }); 24 | 25 | vimAdapter.on('vim-keypress', (key) => { 26 | if (key === ':') { 27 | keyBuffer = ''; 28 | } else { 29 | keyBuffer += key; 30 | } 31 | statusBar.setKeyBuffer(keyBuffer); 32 | }); 33 | 34 | vimAdapter.on('vim-command-done', () => { 35 | keyBuffer = ''; 36 | statusBar.setKeyBuffer(keyBuffer); 37 | }); 38 | 39 | vimAdapter.on('dispose', function() { 40 | statusBar.toggleVisibility(false); 41 | statusBar.closeInput(); 42 | statusBar.clear(); 43 | }); 44 | 45 | statusBar.toggleVisibility(true); 46 | vimAdapter.setStatusBar(statusBar) 47 | vimAdapter.attach(); 48 | 49 | return vimAdapter; 50 | } 51 | 52 | export { 53 | VimMode, 54 | StatusBar, 55 | }; 56 | -------------------------------------------------------------------------------- /src/vim-monaco/statusbar.ts: -------------------------------------------------------------------------------- 1 | export default class VimStatusBar { 2 | constructor(node, editor, sanitizer = null) { 3 | this.node = node; 4 | this.modeInfoNode = document.createElement('span'); 5 | this.secInfoNode = document.createElement('span'); 6 | this.notifNode = document.createElement('span'); 7 | this.notifNode.className = 'vim-notification'; 8 | this.keyInfoNode = document.createElement('span'); 9 | this.keyInfoNode.setAttribute('style', 'float: right'); 10 | this.node.appendChild(this.modeInfoNode); 11 | this.node.appendChild(this.secInfoNode); 12 | this.node.appendChild(this.notifNode); 13 | this.node.appendChild(this.keyInfoNode); 14 | this.toggleVisibility(false); 15 | this.editor = editor; 16 | this.sanitizer = sanitizer; 17 | } 18 | 19 | setMode(ev) { 20 | if (ev.mode === 'visual' && ev.subMode === 'linewise') { 21 | this.setText('--VISUAL LINE--'); 22 | return; 23 | } 24 | 25 | this.setText(`--${ev.mode.toUpperCase()}--`); 26 | } 27 | 28 | setKeyBuffer(key) { 29 | this.keyInfoNode.textContent = key; 30 | } 31 | 32 | setSec(text, callback, options) { 33 | this.notifNode.textContent = ''; 34 | if (text === undefined) { 35 | return; 36 | } 37 | 38 | this.setInnerHtml_(this.secInfoNode, text); 39 | const input = this.secInfoNode.querySelector('input'); 40 | 41 | if (input) { 42 | input.focus(); 43 | this.input = { 44 | callback, 45 | options, 46 | node: input, 47 | }; 48 | 49 | if (options) { 50 | if (options.selectValueOnOpen) { 51 | input.select(); 52 | } 53 | 54 | if (options.value) { 55 | input.value = options.value; 56 | } 57 | } 58 | 59 | this.addInputListeners(); 60 | } 61 | 62 | return this.closeInput; 63 | } 64 | 65 | setText(text) { 66 | this.modeInfoNode.textContent = text; 67 | } 68 | 69 | toggleVisibility(toggle) { 70 | if (toggle) { 71 | this.node.style.display = 'block'; 72 | } else { 73 | this.node.style.display = 'none'; 74 | } 75 | 76 | if (this.input) { 77 | this.removeInputListeners(); 78 | } 79 | 80 | clearInterval(this.notifTimeout); 81 | } 82 | 83 | closeInput = () => { 84 | this.removeInputListeners(); 85 | this.input = null; 86 | this.setSec(''); 87 | 88 | if (this.editor) { 89 | this.editor.focus(); 90 | } 91 | }; 92 | 93 | clear = () => { 94 | this.setInnerHtml_(this.node, ''); 95 | } 96 | 97 | inputKeyUp = (e) => { 98 | const { options } = this.input; 99 | if (options && options.onKeyUp) { 100 | options.onKeyUp(e, e.target.value, this.closeInput); 101 | } 102 | }; 103 | 104 | inputBlur = () => { 105 | const { options } = this.input; 106 | 107 | if (options.closeOnBlur) { 108 | this.closeInput(); 109 | } 110 | }; 111 | 112 | inputKeyDown = (e) => { 113 | const { options, callback } = this.input; 114 | 115 | if (options && options.onKeyDown && options.onKeyDown(e, e.target.value, this.closeInput)) { 116 | return; 117 | } 118 | 119 | if (e.keyCode === 27 || (options && options.closeOnEnter !== false && e.keyCode == 13)) { 120 | this.input.node.blur(); 121 | e.stopPropagation(); 122 | this.closeInput(); 123 | } 124 | 125 | if (e.keyCode === 13 && callback) { 126 | e.stopPropagation(); 127 | e.preventDefault(); 128 | callback(e.target.value); 129 | } 130 | }; 131 | 132 | addInputListeners() { 133 | const { node } = this.input; 134 | node.addEventListener('keyup', this.inputKeyUp); 135 | node.addEventListener('keydown', this.inputKeyDown); 136 | node.addEventListener('input', this.inputKeyInput); 137 | node.addEventListener('blur', this.inputBlur); 138 | } 139 | 140 | removeInputListeners() { 141 | if (!this.input || !this.input.node) { 142 | return; 143 | } 144 | 145 | const { node } = this.input; 146 | node.removeEventListener('keyup', this.inputKeyUp); 147 | node.removeEventListener('keydown', this.inputKeyDown); 148 | node.removeEventListener('input', this.inputKeyInput); 149 | node.removeEventListener('blur', this.inputBlur); 150 | } 151 | 152 | showNotification(text) { 153 | const sp = document.createElement('span'); 154 | this.setInnerHtml_(sp, text); 155 | this.notifNode.textContent = sp.textContent; 156 | this.notifTimeout = setTimeout(() => { 157 | this.notifNode.textContent = ''; 158 | }, 5000); 159 | } 160 | 161 | setInnerHtml_(element, htmlContents) { 162 | if (this.sanitizer) { 163 | // Clear out previous contents first. 164 | while (element.children.length) { 165 | element.removeChild(element.children[0]); 166 | } 167 | element.appendChild(this.sanitizer(htmlContents)); 168 | } else { 169 | element.innerHTML = htmlContents; 170 | } 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "noEmit": 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 | "@rollup/plugin-commonjs@^11.0.2": 6 | version "11.0.2" 7 | resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.2.tgz#837cc6950752327cb90177b608f0928a4e60b582" 8 | integrity sha512-MPYGZr0qdbV5zZj8/2AuomVpnRVXRU5XKXb3HVniwRoRCreGlf5kOE081isNWeiLIi6IYkwTX9zE0/c7V8g81g== 9 | dependencies: 10 | "@rollup/pluginutils" "^3.0.0" 11 | estree-walker "^1.0.1" 12 | is-reference "^1.1.2" 13 | magic-string "^0.25.2" 14 | resolve "^1.11.0" 15 | 16 | "@rollup/plugin-json@^4.0.2": 17 | version "4.0.2" 18 | resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.0.2.tgz#482185ee36ac7dd21c346e2dbcc22ffed0c6f2d6" 19 | integrity sha512-t4zJMc98BdH42mBuzjhQA7dKh0t4vMJlUka6Fz0c+iO5IVnWaEMiYBy1uBj9ruHZzXBW23IPDGL9oCzBkQ9Udg== 20 | dependencies: 21 | "@rollup/pluginutils" "^3.0.4" 22 | 23 | "@rollup/plugin-node-resolve@^7.1.0": 24 | version "7.1.1" 25 | resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.1.tgz#8c6e59c4b28baf9d223028d0e450e06a485bb2b7" 26 | integrity sha512-14ddhD7TnemeHE97a4rLOhobfYvUVcaYuqTnL8Ti7Jxi9V9Jr5LY7Gko4HZ5k4h4vqQM0gBQt6tsp9xXW94WPA== 27 | dependencies: 28 | "@rollup/pluginutils" "^3.0.6" 29 | "@types/resolve" "0.0.8" 30 | builtin-modules "^3.1.0" 31 | is-module "^1.0.0" 32 | resolve "^1.14.2" 33 | 34 | "@rollup/plugin-typescript@^3.0.0": 35 | version "3.1.1" 36 | resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-3.1.1.tgz#a39175a552ed82a3e424862e6bb403bf9da451ee" 37 | integrity sha512-VPY1MbzIJT+obpav9Kns4MlipVJ1FuefwzO4s1uCVXAzVWya+bhhNauOmmqR/hy1zj7tePfh3t9iBN+HbIzyRA== 38 | dependencies: 39 | "@rollup/pluginutils" "^3.0.1" 40 | resolve "^1.14.1" 41 | 42 | "@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.1", "@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.0.6": 43 | version "3.0.8" 44 | resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.0.8.tgz#4e94d128d94b90699e517ef045422960d18c8fde" 45 | integrity sha512-rYGeAc4sxcZ+kPG/Tw4/fwJODC3IXHYDH4qusdN/b6aLw5LPUbzpecYbEJh4sVQGPFJxd2dBU4kc1H3oy9/bnw== 46 | dependencies: 47 | estree-walker "^1.0.1" 48 | 49 | "@types/estree@*": 50 | version "0.0.44" 51 | resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.44.tgz#980cc5a29a3ef3bea6ff1f7d021047d7ea575e21" 52 | integrity sha512-iaIVzr+w2ZJ5HkidlZ3EJM8VTZb2MJLCjw3V+505yVts0gRC4UMvjw0d1HPtGqI/HQC/KdsYtayfzl+AXY2R8g== 53 | 54 | "@types/estree@0.0.39": 55 | version "0.0.39" 56 | resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" 57 | integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== 58 | 59 | "@types/node@*": 60 | version "13.11.0" 61 | resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.0.tgz#390ea202539c61c8fa6ba4428b57e05bc36dc47b" 62 | integrity sha512-uM4mnmsIIPK/yeO+42F2RQhGUIs39K2RFmugcJANppXe6J1nvH87PvzPZYpza7Xhhs8Yn9yIAVdLZ84z61+0xQ== 63 | 64 | "@types/prop-types@*": 65 | version "15.7.3" 66 | resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" 67 | integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== 68 | 69 | "@types/react@^16.9.23": 70 | version "16.9.32" 71 | resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.32.tgz#f6368625b224604148d1ddf5920e4fefbd98d383" 72 | integrity sha512-fmejdp0CTH00mOJmxUPPbWCEBWPvRIL4m8r0qD+BSDUqmutPyGQCHifzMpMzdvZwROdEdL78IuZItntFWgPXHQ== 73 | dependencies: 74 | "@types/prop-types" "*" 75 | csstype "^2.2.0" 76 | 77 | "@types/resolve@0.0.8": 78 | version "0.0.8" 79 | resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" 80 | integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== 81 | dependencies: 82 | "@types/node" "*" 83 | 84 | "@zeit/schemas@2.6.0": 85 | version "2.6.0" 86 | resolved "https://registry.yarnpkg.com/@zeit/schemas/-/schemas-2.6.0.tgz#004e8e553b4cd53d538bd38eac7bcbf58a867fe3" 87 | integrity sha512-uUrgZ8AxS+Lio0fZKAipJjAh415JyrOZowliZAzmnJSsf7piVL5w+G0+gFJ0KSu3QRhvui/7zuvpLz03YjXAhg== 88 | 89 | accepts@~1.3.5: 90 | version "1.3.7" 91 | resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" 92 | integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== 93 | dependencies: 94 | mime-types "~2.1.24" 95 | negotiator "0.6.2" 96 | 97 | acorn@^7.1.0: 98 | version "7.1.1" 99 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" 100 | integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== 101 | 102 | ajv@6.5.3: 103 | version "6.5.3" 104 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9" 105 | integrity sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg== 106 | dependencies: 107 | fast-deep-equal "^2.0.1" 108 | fast-json-stable-stringify "^2.0.0" 109 | json-schema-traverse "^0.4.1" 110 | uri-js "^4.2.2" 111 | 112 | ansi-align@^2.0.0: 113 | version "2.0.0" 114 | resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" 115 | integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= 116 | dependencies: 117 | string-width "^2.0.0" 118 | 119 | ansi-regex@^3.0.0: 120 | version "3.0.0" 121 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 122 | integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= 123 | 124 | ansi-regex@^4.1.0: 125 | version "4.1.0" 126 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" 127 | integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== 128 | 129 | ansi-styles@^3.2.0, ansi-styles@^3.2.1: 130 | version "3.2.1" 131 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 132 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== 133 | dependencies: 134 | color-convert "^1.9.0" 135 | 136 | arch@^2.1.0: 137 | version "2.1.1" 138 | resolved "https://registry.yarnpkg.com/arch/-/arch-2.1.1.tgz#8f5c2731aa35a30929221bb0640eed65175ec84e" 139 | integrity sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg== 140 | 141 | arg@2.0.0: 142 | version "2.0.0" 143 | resolved "https://registry.yarnpkg.com/arg/-/arg-2.0.0.tgz#c06e7ff69ab05b3a4a03ebe0407fac4cba657545" 144 | integrity sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w== 145 | 146 | balanced-match@^1.0.0: 147 | version "1.0.0" 148 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 149 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 150 | 151 | boxen@1.3.0: 152 | version "1.3.0" 153 | resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" 154 | integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== 155 | dependencies: 156 | ansi-align "^2.0.0" 157 | camelcase "^4.0.0" 158 | chalk "^2.0.1" 159 | cli-boxes "^1.0.0" 160 | string-width "^2.0.0" 161 | term-size "^1.2.0" 162 | widest-line "^2.0.0" 163 | 164 | brace-expansion@^1.1.7: 165 | version "1.1.11" 166 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 167 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 168 | dependencies: 169 | balanced-match "^1.0.0" 170 | concat-map "0.0.1" 171 | 172 | builtin-modules@^3.1.0: 173 | version "3.1.0" 174 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" 175 | integrity sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== 176 | 177 | bytes@3.0.0: 178 | version "3.0.0" 179 | resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" 180 | integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= 181 | 182 | camelcase@^4.0.0: 183 | version "4.1.0" 184 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" 185 | integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= 186 | 187 | camelcase@^5.0.0: 188 | version "5.3.1" 189 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" 190 | integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== 191 | 192 | chalk@2.4.1: 193 | version "2.4.1" 194 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" 195 | integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== 196 | dependencies: 197 | ansi-styles "^3.2.1" 198 | escape-string-regexp "^1.0.5" 199 | supports-color "^5.3.0" 200 | 201 | chalk@^2.0.1, chalk@^2.4.2: 202 | version "2.4.2" 203 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" 204 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== 205 | dependencies: 206 | ansi-styles "^3.2.1" 207 | escape-string-regexp "^1.0.5" 208 | supports-color "^5.3.0" 209 | 210 | cli-boxes@^1.0.0: 211 | version "1.0.0" 212 | resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" 213 | integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= 214 | 215 | clipboardy@1.2.3: 216 | version "1.2.3" 217 | resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.2.3.tgz#0526361bf78724c1f20be248d428e365433c07ef" 218 | integrity sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA== 219 | dependencies: 220 | arch "^2.1.0" 221 | execa "^0.8.0" 222 | 223 | cliui@^5.0.0: 224 | version "5.0.0" 225 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" 226 | integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== 227 | dependencies: 228 | string-width "^3.1.0" 229 | strip-ansi "^5.2.0" 230 | wrap-ansi "^5.1.0" 231 | 232 | color-convert@^1.9.0: 233 | version "1.9.3" 234 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 235 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== 236 | dependencies: 237 | color-name "1.1.3" 238 | 239 | color-name@1.1.3: 240 | version "1.1.3" 241 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 242 | integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= 243 | 244 | compressible@~2.0.14: 245 | version "2.0.18" 246 | resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" 247 | integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== 248 | dependencies: 249 | mime-db ">= 1.43.0 < 2" 250 | 251 | compression@1.7.3: 252 | version "1.7.3" 253 | resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" 254 | integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== 255 | dependencies: 256 | accepts "~1.3.5" 257 | bytes "3.0.0" 258 | compressible "~2.0.14" 259 | debug "2.6.9" 260 | on-headers "~1.0.1" 261 | safe-buffer "5.1.2" 262 | vary "~1.1.2" 263 | 264 | concat-map@0.0.1: 265 | version "0.0.1" 266 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 267 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 268 | 269 | concurrently@^5.1.0: 270 | version "5.1.0" 271 | resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-5.1.0.tgz#05523986ba7aaf4b58a49ddd658fab88fa783132" 272 | integrity sha512-9ViZMu3OOCID3rBgU31mjBftro2chOop0G2u1olq1OuwRBVRw/GxHTg80TVJBUTJfoswMmEUeuOg1g1yu1X2dA== 273 | dependencies: 274 | chalk "^2.4.2" 275 | date-fns "^2.0.1" 276 | lodash "^4.17.15" 277 | read-pkg "^4.0.1" 278 | rxjs "^6.5.2" 279 | spawn-command "^0.0.2-1" 280 | supports-color "^6.1.0" 281 | tree-kill "^1.2.2" 282 | yargs "^13.3.0" 283 | 284 | content-disposition@0.5.2: 285 | version "0.5.2" 286 | resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" 287 | integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= 288 | 289 | cross-spawn@^5.0.1: 290 | version "5.1.0" 291 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" 292 | integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= 293 | dependencies: 294 | lru-cache "^4.0.1" 295 | shebang-command "^1.2.0" 296 | which "^1.2.9" 297 | 298 | csstype@^2.2.0: 299 | version "2.6.10" 300 | resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b" 301 | integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w== 302 | 303 | date-fns@^2.0.1: 304 | version "2.11.1" 305 | resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.11.1.tgz#197b8be1bbf5c5e6fe8bea817f0fe111820e7a12" 306 | integrity sha512-3RdUoinZ43URd2MJcquzBbDQo+J87cSzB8NkXdZiN5ia1UNyep0oCyitfiL88+R7clGTeq/RniXAc16gWyAu1w== 307 | 308 | debug@2.6.9: 309 | version "2.6.9" 310 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" 311 | integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== 312 | dependencies: 313 | ms "2.0.0" 314 | 315 | decamelize@^1.2.0: 316 | version "1.2.0" 317 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" 318 | integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= 319 | 320 | deep-extend@^0.6.0: 321 | version "0.6.0" 322 | resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" 323 | integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== 324 | 325 | emoji-regex@^7.0.1: 326 | version "7.0.3" 327 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" 328 | integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== 329 | 330 | error-ex@^1.3.1: 331 | version "1.3.2" 332 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" 333 | integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== 334 | dependencies: 335 | is-arrayish "^0.2.1" 336 | 337 | escape-string-regexp@^1.0.5: 338 | version "1.0.5" 339 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 340 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= 341 | 342 | estree-walker@^1.0.1: 343 | version "1.0.1" 344 | resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" 345 | integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== 346 | 347 | execa@^0.7.0: 348 | version "0.7.0" 349 | resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" 350 | integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= 351 | dependencies: 352 | cross-spawn "^5.0.1" 353 | get-stream "^3.0.0" 354 | is-stream "^1.1.0" 355 | npm-run-path "^2.0.0" 356 | p-finally "^1.0.0" 357 | signal-exit "^3.0.0" 358 | strip-eof "^1.0.0" 359 | 360 | execa@^0.8.0: 361 | version "0.8.0" 362 | resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da" 363 | integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo= 364 | dependencies: 365 | cross-spawn "^5.0.1" 366 | get-stream "^3.0.0" 367 | is-stream "^1.1.0" 368 | npm-run-path "^2.0.0" 369 | p-finally "^1.0.0" 370 | signal-exit "^3.0.0" 371 | strip-eof "^1.0.0" 372 | 373 | fast-deep-equal@^2.0.1: 374 | version "2.0.1" 375 | resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" 376 | integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= 377 | 378 | fast-json-stable-stringify@^2.0.0: 379 | version "2.1.0" 380 | resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" 381 | integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== 382 | 383 | fast-url-parser@1.1.3: 384 | version "1.1.3" 385 | resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" 386 | integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0= 387 | dependencies: 388 | punycode "^1.3.2" 389 | 390 | find-up@^3.0.0: 391 | version "3.0.0" 392 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" 393 | integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== 394 | dependencies: 395 | locate-path "^3.0.0" 396 | 397 | get-caller-file@^2.0.1: 398 | version "2.0.5" 399 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" 400 | integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== 401 | 402 | get-stream@^3.0.0: 403 | version "3.0.0" 404 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" 405 | integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= 406 | 407 | has-flag@^3.0.0: 408 | version "3.0.0" 409 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 410 | integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= 411 | 412 | hosted-git-info@^2.1.4: 413 | version "2.8.8" 414 | resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" 415 | integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== 416 | 417 | ini@~1.3.0: 418 | version "1.3.8" 419 | resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" 420 | integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== 421 | 422 | is-arrayish@^0.2.1: 423 | version "0.2.1" 424 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 425 | integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= 426 | 427 | is-fullwidth-code-point@^2.0.0: 428 | version "2.0.0" 429 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 430 | integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= 431 | 432 | is-module@^1.0.0: 433 | version "1.0.0" 434 | resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" 435 | integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= 436 | 437 | is-reference@^1.1.2: 438 | version "1.1.4" 439 | resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.4.tgz#3f95849886ddb70256a3e6d062b1a68c13c51427" 440 | integrity sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw== 441 | dependencies: 442 | "@types/estree" "0.0.39" 443 | 444 | is-stream@^1.1.0: 445 | version "1.1.0" 446 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" 447 | integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= 448 | 449 | isexe@^2.0.0: 450 | version "2.0.0" 451 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 452 | integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= 453 | 454 | json-parse-better-errors@^1.0.1: 455 | version "1.0.2" 456 | resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" 457 | integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== 458 | 459 | json-schema-traverse@^0.4.1: 460 | version "0.4.1" 461 | resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" 462 | integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== 463 | 464 | locate-path@^3.0.0: 465 | version "3.0.0" 466 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" 467 | integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== 468 | dependencies: 469 | p-locate "^3.0.0" 470 | path-exists "^3.0.0" 471 | 472 | lodash@^4.17.15: 473 | version "4.17.19" 474 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" 475 | integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== 476 | 477 | lru-cache@^4.0.1: 478 | version "4.1.5" 479 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" 480 | integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== 481 | dependencies: 482 | pseudomap "^1.0.2" 483 | yallist "^2.1.2" 484 | 485 | magic-string@^0.25.2: 486 | version "0.25.7" 487 | resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" 488 | integrity sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA== 489 | dependencies: 490 | sourcemap-codec "^1.4.4" 491 | 492 | mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": 493 | version "1.43.0" 494 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" 495 | integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== 496 | 497 | mime-db@~1.33.0: 498 | version "1.33.0" 499 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" 500 | integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== 501 | 502 | mime-types@2.1.18: 503 | version "2.1.18" 504 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" 505 | integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== 506 | dependencies: 507 | mime-db "~1.33.0" 508 | 509 | mime-types@~2.1.24: 510 | version "2.1.26" 511 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" 512 | integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== 513 | dependencies: 514 | mime-db "1.43.0" 515 | 516 | minimatch@3.0.4: 517 | version "3.0.4" 518 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 519 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 520 | dependencies: 521 | brace-expansion "^1.1.7" 522 | 523 | minimist@^1.2.0: 524 | version "1.2.5" 525 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" 526 | integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== 527 | 528 | monaco-editor@^0.19.3: 529 | version "0.19.3" 530 | resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.19.3.tgz#1c994b3186c00650dbcd034d5370d46bf56c0663" 531 | integrity sha512-2n1vJBVQF2Hhi7+r1mMeYsmlf18hjVb6E0v5SoMZyb4aeOmYPKun+CE3gYpiNA1KEvtSdaDHFBqH9d7Wd9vREg== 532 | 533 | monaco-vim@^0.1.7: 534 | version "0.1.7" 535 | resolved "https://registry.yarnpkg.com/monaco-vim/-/monaco-vim-0.1.7.tgz#6c0489f2adc59b6663817d98e1e8b59a8577281a" 536 | integrity sha512-03K3OhmsxoUdgsWnHDJFont4gNMdut1dq9MPGml9S7RVp8gkt1v9ZJ0OhkUBnDkRMt8NX0+NP+aK7i+rxnqdUg== 537 | 538 | ms@2.0.0: 539 | version "2.0.0" 540 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 541 | integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= 542 | 543 | negotiator@0.6.2: 544 | version "0.6.2" 545 | resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" 546 | integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== 547 | 548 | node-fetch@^2.6.1: 549 | version "2.6.1" 550 | resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" 551 | integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== 552 | 553 | normalize-package-data@^2.3.2: 554 | version "2.5.0" 555 | resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" 556 | integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== 557 | dependencies: 558 | hosted-git-info "^2.1.4" 559 | resolve "^1.10.0" 560 | semver "2 || 3 || 4 || 5" 561 | validate-npm-package-license "^3.0.1" 562 | 563 | npm-run-path@^2.0.0: 564 | version "2.0.2" 565 | resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" 566 | integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= 567 | dependencies: 568 | path-key "^2.0.0" 569 | 570 | on-headers@~1.0.1: 571 | version "1.0.2" 572 | resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" 573 | integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== 574 | 575 | p-finally@^1.0.0: 576 | version "1.0.0" 577 | resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" 578 | integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= 579 | 580 | p-limit@^2.0.0: 581 | version "2.3.0" 582 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" 583 | integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== 584 | dependencies: 585 | p-try "^2.0.0" 586 | 587 | p-locate@^3.0.0: 588 | version "3.0.0" 589 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" 590 | integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== 591 | dependencies: 592 | p-limit "^2.0.0" 593 | 594 | p-try@^2.0.0: 595 | version "2.2.0" 596 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" 597 | integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== 598 | 599 | parse-json@^4.0.0: 600 | version "4.0.0" 601 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" 602 | integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= 603 | dependencies: 604 | error-ex "^1.3.1" 605 | json-parse-better-errors "^1.0.1" 606 | 607 | path-exists@^3.0.0: 608 | version "3.0.0" 609 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" 610 | integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= 611 | 612 | path-is-inside@1.0.2: 613 | version "1.0.2" 614 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 615 | integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= 616 | 617 | path-key@^2.0.0: 618 | version "2.0.1" 619 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" 620 | integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= 621 | 622 | path-parse@^1.0.6: 623 | version "1.0.6" 624 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 625 | integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== 626 | 627 | path-to-regexp@2.2.1: 628 | version "2.2.1" 629 | resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-2.2.1.tgz#90b617025a16381a879bc82a38d4e8bdeb2bcf45" 630 | integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== 631 | 632 | pify@^3.0.0: 633 | version "3.0.0" 634 | resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" 635 | integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= 636 | 637 | pseudomap@^1.0.2: 638 | version "1.0.2" 639 | resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" 640 | integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= 641 | 642 | punycode@^1.3.2: 643 | version "1.4.1" 644 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 645 | integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= 646 | 647 | punycode@^2.1.0: 648 | version "2.1.1" 649 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" 650 | integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== 651 | 652 | range-parser@1.2.0: 653 | version "1.2.0" 654 | resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" 655 | integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= 656 | 657 | rc@^1.0.1, rc@^1.1.6: 658 | version "1.2.8" 659 | resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" 660 | integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== 661 | dependencies: 662 | deep-extend "^0.6.0" 663 | ini "~1.3.0" 664 | minimist "^1.2.0" 665 | strip-json-comments "~2.0.1" 666 | 667 | read-pkg@^4.0.1: 668 | version "4.0.1" 669 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" 670 | integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc= 671 | dependencies: 672 | normalize-package-data "^2.3.2" 673 | parse-json "^4.0.0" 674 | pify "^3.0.0" 675 | 676 | registry-auth-token@3.3.2: 677 | version "3.3.2" 678 | resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" 679 | integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== 680 | dependencies: 681 | rc "^1.1.6" 682 | safe-buffer "^5.0.1" 683 | 684 | registry-url@3.1.0: 685 | version "3.1.0" 686 | resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" 687 | integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= 688 | dependencies: 689 | rc "^1.0.1" 690 | 691 | require-directory@^2.1.1: 692 | version "2.1.1" 693 | resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" 694 | integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= 695 | 696 | require-main-filename@^2.0.0: 697 | version "2.0.0" 698 | resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" 699 | integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== 700 | 701 | resolve@^1.10.0, resolve@^1.11.0, resolve@^1.14.1, resolve@^1.14.2: 702 | version "1.15.1" 703 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" 704 | integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== 705 | dependencies: 706 | path-parse "^1.0.6" 707 | 708 | rollup@^1.31.0: 709 | version "1.32.1" 710 | resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.32.1.tgz#4480e52d9d9e2ae4b46ba0d9ddeaf3163940f9c4" 711 | integrity sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A== 712 | dependencies: 713 | "@types/estree" "*" 714 | "@types/node" "*" 715 | acorn "^7.1.0" 716 | 717 | rxjs@^6.5.2: 718 | version "6.5.5" 719 | resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" 720 | integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== 721 | dependencies: 722 | tslib "^1.9.0" 723 | 724 | safe-buffer@5.1.2: 725 | version "5.1.2" 726 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" 727 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== 728 | 729 | safe-buffer@^5.0.1: 730 | version "5.2.0" 731 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" 732 | integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== 733 | 734 | "semver@2 || 3 || 4 || 5": 735 | version "5.7.1" 736 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" 737 | integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== 738 | 739 | serve-handler@6.1.2: 740 | version "6.1.2" 741 | resolved "https://registry.yarnpkg.com/serve-handler/-/serve-handler-6.1.2.tgz#f05b0421a313fff2d257838cba00cbcc512cd2b6" 742 | integrity sha512-RFh49wX7zJmmOVDcIjiDSJnMH+ItQEvyuYLYuDBVoA/xmQSCuj+uRmk1cmBB5QQlI3qOiWKp6p4DUGY+Z5AB2A== 743 | dependencies: 744 | bytes "3.0.0" 745 | content-disposition "0.5.2" 746 | fast-url-parser "1.1.3" 747 | mime-types "2.1.18" 748 | minimatch "3.0.4" 749 | path-is-inside "1.0.2" 750 | path-to-regexp "2.2.1" 751 | range-parser "1.2.0" 752 | 753 | serve@^11.3.0: 754 | version "11.3.0" 755 | resolved "https://registry.yarnpkg.com/serve/-/serve-11.3.0.tgz#1d342e13e310501ecf17b6602f1f35da640d6448" 756 | integrity sha512-AU0g50Q1y5EVFX56bl0YX5OtVjUX1N737/Htj93dQGKuHiuLvVB45PD8Muar70W6Kpdlz8aNJfoUqTyAq9EE/A== 757 | dependencies: 758 | "@zeit/schemas" "2.6.0" 759 | ajv "6.5.3" 760 | arg "2.0.0" 761 | boxen "1.3.0" 762 | chalk "2.4.1" 763 | clipboardy "1.2.3" 764 | compression "1.7.3" 765 | serve-handler "6.1.2" 766 | update-check "1.5.2" 767 | 768 | set-blocking@^2.0.0: 769 | version "2.0.0" 770 | resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" 771 | integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= 772 | 773 | shebang-command@^1.2.0: 774 | version "1.2.0" 775 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" 776 | integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= 777 | dependencies: 778 | shebang-regex "^1.0.0" 779 | 780 | shebang-regex@^1.0.0: 781 | version "1.0.0" 782 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" 783 | integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= 784 | 785 | signal-exit@^3.0.0: 786 | version "3.0.3" 787 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" 788 | integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== 789 | 790 | sourcemap-codec@^1.4.4: 791 | version "1.4.8" 792 | resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" 793 | integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== 794 | 795 | spawn-command@^0.0.2-1: 796 | version "0.0.2-1" 797 | resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" 798 | integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A= 799 | 800 | spdx-correct@^3.0.0: 801 | version "3.1.0" 802 | resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" 803 | integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== 804 | dependencies: 805 | spdx-expression-parse "^3.0.0" 806 | spdx-license-ids "^3.0.0" 807 | 808 | spdx-exceptions@^2.1.0: 809 | version "2.2.0" 810 | resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" 811 | integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== 812 | 813 | spdx-expression-parse@^3.0.0: 814 | version "3.0.0" 815 | resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" 816 | integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== 817 | dependencies: 818 | spdx-exceptions "^2.1.0" 819 | spdx-license-ids "^3.0.0" 820 | 821 | spdx-license-ids@^3.0.0: 822 | version "3.0.5" 823 | resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" 824 | integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== 825 | 826 | string-width@^2.0.0, string-width@^2.1.1: 827 | version "2.1.1" 828 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" 829 | integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== 830 | dependencies: 831 | is-fullwidth-code-point "^2.0.0" 832 | strip-ansi "^4.0.0" 833 | 834 | string-width@^3.0.0, string-width@^3.1.0: 835 | version "3.1.0" 836 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" 837 | integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== 838 | dependencies: 839 | emoji-regex "^7.0.1" 840 | is-fullwidth-code-point "^2.0.0" 841 | strip-ansi "^5.1.0" 842 | 843 | strip-ansi@^4.0.0: 844 | version "4.0.0" 845 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" 846 | integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= 847 | dependencies: 848 | ansi-regex "^3.0.0" 849 | 850 | strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: 851 | version "5.2.0" 852 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" 853 | integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== 854 | dependencies: 855 | ansi-regex "^4.1.0" 856 | 857 | strip-eof@^1.0.0: 858 | version "1.0.0" 859 | resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" 860 | integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= 861 | 862 | strip-json-comments@~2.0.1: 863 | version "2.0.1" 864 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 865 | integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= 866 | 867 | supports-color@^5.3.0: 868 | version "5.5.0" 869 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 870 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== 871 | dependencies: 872 | has-flag "^3.0.0" 873 | 874 | supports-color@^6.1.0: 875 | version "6.1.0" 876 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" 877 | integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== 878 | dependencies: 879 | has-flag "^3.0.0" 880 | 881 | term-size@^1.2.0: 882 | version "1.2.0" 883 | resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" 884 | integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= 885 | dependencies: 886 | execa "^0.7.0" 887 | 888 | tree-kill@^1.2.2: 889 | version "1.2.2" 890 | resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" 891 | integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== 892 | 893 | tslib@^1.10.0, tslib@^1.9.0: 894 | version "1.11.1" 895 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" 896 | integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== 897 | 898 | typescript@latest: 899 | version "3.8.3" 900 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" 901 | integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== 902 | 903 | update-check@1.5.2: 904 | version "1.5.2" 905 | resolved "https://registry.yarnpkg.com/update-check/-/update-check-1.5.2.tgz#2fe09f725c543440b3d7dabe8971f2d5caaedc28" 906 | integrity sha512-1TrmYLuLj/5ZovwUS7fFd1jMH3NnFDN1y1A8dboedIDt7zs/zJMo6TwwlhYKkSeEwzleeiSBV5/3c9ufAQWDaQ== 907 | dependencies: 908 | registry-auth-token "3.3.2" 909 | registry-url "3.1.0" 910 | 911 | uri-js@^4.2.2: 912 | version "4.2.2" 913 | resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" 914 | integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== 915 | dependencies: 916 | punycode "^2.1.0" 917 | 918 | validate-npm-package-license@^3.0.1: 919 | version "3.0.4" 920 | resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" 921 | integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== 922 | dependencies: 923 | spdx-correct "^3.0.0" 924 | spdx-expression-parse "^3.0.0" 925 | 926 | vary@~1.1.2: 927 | version "1.1.2" 928 | resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" 929 | integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= 930 | 931 | which-module@^2.0.0: 932 | version "2.0.0" 933 | resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" 934 | integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= 935 | 936 | which@^1.2.9: 937 | version "1.3.1" 938 | resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" 939 | integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== 940 | dependencies: 941 | isexe "^2.0.0" 942 | 943 | widest-line@^2.0.0: 944 | version "2.0.1" 945 | resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" 946 | integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== 947 | dependencies: 948 | string-width "^2.1.1" 949 | 950 | wrap-ansi@^5.1.0: 951 | version "5.1.0" 952 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" 953 | integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== 954 | dependencies: 955 | ansi-styles "^3.2.0" 956 | string-width "^3.0.0" 957 | strip-ansi "^5.0.0" 958 | 959 | y18n@^4.0.0: 960 | version "4.0.0" 961 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" 962 | integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== 963 | 964 | yallist@^2.1.2: 965 | version "2.1.2" 966 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" 967 | integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= 968 | 969 | yargs-parser@^13.1.2: 970 | version "13.1.2" 971 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" 972 | integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== 973 | dependencies: 974 | camelcase "^5.0.0" 975 | decamelize "^1.2.0" 976 | 977 | yargs@^13.3.0: 978 | version "13.3.2" 979 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" 980 | integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== 981 | dependencies: 982 | cliui "^5.0.0" 983 | find-up "^3.0.0" 984 | get-caller-file "^2.0.1" 985 | require-directory "^2.1.1" 986 | require-main-filename "^2.0.0" 987 | set-blocking "^2.0.0" 988 | string-width "^3.0.0" 989 | which-module "^2.0.0" 990 | y18n "^4.0.0" 991 | yargs-parser "^13.1.2" 992 | --------------------------------------------------------------------------------