├── .eslintrc.json
├── .gitignore
├── .prettierrc
├── .vscode
├── extensions.json
├── launch.json
├── settings.json
└── tasks.json
├── .vscodeignore
├── .yarnrc
├── CHANGELOG.md
├── README.md
├── media
├── banner.png
├── glance-sm.png
└── glance.png
├── package-lock.json
├── package.json
├── src
├── core
│ ├── SvgSpritesViewer.ts
│ ├── SvgSpritesViewerActions.ts
│ ├── SvgSpritesViewerDocumentActions.ts
│ ├── consts
│ │ └── consts.ts
│ └── utils
│ │ └── fns.ts
├── extension.ts
└── view
│ └── app
│ ├── .eslintrc.json
│ ├── App.tsx
│ ├── Content.tsx
│ ├── assets
│ └── icons.svg
│ ├── components
│ ├── ControlPanel
│ │ ├── AppearanceControl.tsx
│ │ ├── ControlPanel.tsx
│ │ ├── ToolsPanel.tsx
│ │ └── style.scss
│ ├── Footer
│ │ ├── Footer.tsx
│ │ └── style.scss
│ ├── Grid
│ │ ├── Grid.tsx
│ │ ├── GridItem.tsx
│ │ └── style.scss
│ ├── Icon.tsx
│ └── Searchbar
│ │ ├── Searchbar.tsx
│ │ └── style.scss
│ ├── consts
│ └── message.ts
│ ├── index.scss
│ ├── index.tsx
│ ├── store
│ └── store.ts
│ ├── tsconfig.json
│ ├── types
│ └── file-loader.d.ts
│ └── utils
│ ├── clipboard.ts
│ ├── fns.ts
│ └── vscode.ts
├── tsconfig.json
├── tsconfig.tsbuildinfo
├── vsc-extension-quickstart.md
├── webpack.config.js
├── yarn-error.log
└── yarn.lock
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "parser": "@typescript-eslint/parser",
4 | "parserOptions": {
5 | "ecmaVersion": 6,
6 | "sourceType": "module"
7 | },
8 | "plugins": ["@typescript-eslint"],
9 | "rules": {
10 | "@typescript-eslint/naming-convention": "warn",
11 | "@typescript-eslint/semi": "off",
12 | "curly": "warn",
13 | "eqeqeq": "warn",
14 | "no-throw-literal": "warn",
15 | "semi": "off"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | out
2 | dist
3 | node_modules
4 | .vscode-test/
5 | *.vsix
6 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "es5",
3 | "tabWidth": 4,
4 | "semi": false,
5 | "singleQuote": true
6 | }
7 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "dbaeumer.vscode-eslint"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | // A launch configuration that compiles the extension and then opens it inside a new window
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | {
6 | "version": "0.2.0",
7 | "configurations": [
8 | {
9 | "name": "Run Extension",
10 | "type": "extensionHost",
11 | "request": "launch",
12 | "args": [
13 | "--extensionDevelopmentPath=${workspaceFolder}"
14 | ],
15 | "outFiles": [
16 | "${workspaceFolder}/out/**/*.js"
17 | ],
18 | "preLaunchTask": "${defaultBuildTask}"
19 | },
20 | {
21 | "name": "Extension Tests",
22 | "type": "extensionHost",
23 | "request": "launch",
24 | "args": [
25 | "--extensionDevelopmentPath=${workspaceFolder}",
26 | "--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
27 | ],
28 | "outFiles": [
29 | "${workspaceFolder}/out/test/**/*.js"
30 | ],
31 | "preLaunchTask": "${defaultBuildTask}"
32 | }
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | // Place your settings in this file to overwrite default and user settings.
2 | {
3 | "files.exclude": {
4 | "out": false // set this to true to hide the "out" folder with the compiled JS files
5 | },
6 | "search.exclude": {
7 | "out": true // set this to false to include "out" folder in search results
8 | },
9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10 | "typescript.tsc.autoDetect": "off"
11 | }
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | // See https://go.microsoft.com/fwlink/?LinkId=733558
2 | // for the documentation about the tasks.json format
3 | {
4 | "version": "2.0.0",
5 | "tasks": [
6 | {
7 | "type": "npm",
8 | "script": "watch",
9 | "problemMatcher": "$tsc-watch",
10 | "isBackground": true,
11 | "presentation": {
12 | "reveal": "never"
13 | },
14 | "group": {
15 | "kind": "build",
16 | "isDefault": true
17 | }
18 | }
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/.vscodeignore:
--------------------------------------------------------------------------------
1 | .vscode/**
2 | .vscode-test/**
3 | out/test/**
4 | src/**
5 | .gitignore
6 | .yarnrc
7 | vsc-extension-quickstart.md
8 | **/tsconfig.json
9 | **/.eslintrc.json
10 | **/*.map
11 | **/*.ts
12 |
--------------------------------------------------------------------------------
/.yarnrc:
--------------------------------------------------------------------------------
1 | --ignore-engines true
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | All notable changes to the "svgicon" extension will be documented in this file.
4 |
5 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6 |
7 | ## [Unreleased]
8 |
9 | - Initial release
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
Glance
3 |
4 | A `VSCode` extension for viewing [SVG sprites](https://css-tricks.com/svg-symbol-good-choice-icons/) easy-peasy.
5 |
6 | ## ✨ Features
7 |
8 | - [x] A viewer for SVG sprites
9 | - [x] Search sprites
10 | - [x] A function to copy the icon's ID or SVG to clipboard
11 | - [x] Appearance controls
12 | - [x] Easily add, edit, and remove SVG sprites
13 |
14 | 
15 |
16 | > **Psst** [Watch video to see glance in action! 🔥](https://youtu.be/dK5gAxghYSo)
17 |
18 | ## 💪 Usage
19 |
20 | There are two ways to preview SVG sprites with Glance.
21 |
22 | ### First method
23 |
24 | - Open a SVG file that has sprites, make sure this is your active editor
25 | - Click on `Glance` button at the editor title bar. Voila 🎉
26 |
27 | ### Second method
28 |
29 | - Follow the first above
30 | - `Cmd+Shift+P`, then type `Glance`
31 | - Press enter. Voila 🎉
32 |
33 | > While at Glance`s preview page, click on an icon to copy it's Id to clipboard. You can configure this at the controls panel to copy the SVG code instead.
34 |
35 |
45 |
46 | ## 📝 Release Notes
47 |
48 | ### 0.0.1
49 |
50 | - Initial release of Glance
51 |
52 | ### 0.0.2
53 |
54 | - Fix some typos
55 | - Fix single grid item flush issue
56 |
57 | ### 0.0.3
58 |
59 | - Fix some typos
60 |
61 | ### 0.0.4
62 |
63 | - Bug fixes
64 |
65 | ### 0.0.5
66 |
67 | - Fix activation issue bug
68 |
69 | ### 0.0.6
70 |
71 | - Activate plugin when runs the Glance command
72 | - Also activate plugin when user views XML documents
73 |
74 | ### 0.0.7
75 |
76 | - Implement add single svg or sprites
77 | - Implement rename sprite asset
78 | - Implement delete sprite asset
79 |
80 | ### 0.0.8
81 |
82 | - Use nanoid instead of shortid
83 |
--------------------------------------------------------------------------------
/media/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahkohd/glance/25cddd9b9ebc7fcbc7a34e983a94568a6d680b99/media/banner.png
--------------------------------------------------------------------------------
/media/glance-sm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahkohd/glance/25cddd9b9ebc7fcbc7a34e983a94568a6d680b99/media/glance-sm.png
--------------------------------------------------------------------------------
/media/glance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahkohd/glance/25cddd9b9ebc7fcbc7a34e983a94568a6d680b99/media/glance.png
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "glance",
3 | "displayName": "Glance",
4 | "description": "Grace SVG sprites.",
5 | "version": "0.0.8",
6 | "icon": "media/glance.png",
7 | "homepage": "https://github.com/ahkohd/glance/blob/master/README.md",
8 | "repository": {
9 | "type": "git",
10 | "url": "https://github.com/ahkohd/glance.git"
11 | },
12 | "engines": {
13 | "vscode": "^1.54.0"
14 | },
15 | "author": {
16 | "name": "Victor Aremu",
17 | "email": "victor.olorunbunmi@gmail.com"
18 | },
19 | "publisher": "ahkohd",
20 | "categories": [
21 | "Visualization",
22 | "Other"
23 | ],
24 | "activationEvents": [
25 | "onLanguage:svg",
26 | "onLanguage:xml",
27 | "onCommand:glance.open"
28 | ],
29 | "main": "./out/extension.js",
30 | "contributes": {
31 | "commands": [
32 | {
33 | "command": "glance.open",
34 | "title": "Glance"
35 | }
36 | ],
37 | "menus": {
38 | "editor/title": [
39 | {
40 | "when": "resourceLangId == svg",
41 | "command": "glance.open",
42 | "group": "navigation"
43 | },
44 | {
45 | "when": "resourceLangId == xml",
46 | "command": "glance.open",
47 | "group": "navigation"
48 | }
49 | ]
50 | }
51 | },
52 | "scripts": {
53 | "vscode:prepublish": "yarn run compile",
54 | "compile": "npm-run-all compile:*",
55 | "watch": "npm-run-all -p watch:*",
56 | "pretest": "yarn run compile && yarn run lint",
57 | "lint": "eslint src --ext ts",
58 | "test": "node ./out/test/runTest.js",
59 | "compile:extension": "tsc -p ./",
60 | "compile:views": "webpack --mode development",
61 | "watch:extension": "tsc -watch -p ./",
62 | "watch:views": "webpack --watch --mode development"
63 | },
64 | "devDependencies": {
65 | "@types/glob": "^7.1.3",
66 | "@types/mocha": "^8.0.4",
67 | "@types/node": "^12.11.7",
68 | "@types/shortid": "^0.0.29",
69 | "@types/svg-parser": "^2.0.1",
70 | "@types/vscode": "^1.54.0",
71 | "@typescript-eslint/eslint-plugin": "^4.14.1",
72 | "@typescript-eslint/parser": "^4.14.1",
73 | "eslint": "^7.19.0",
74 | "glob": "^7.1.6",
75 | "mocha": "^8.2.1",
76 | "typescript": "^4.1.3",
77 | "vscode-test": "^1.5.0",
78 | "webpack-cli": "^4.5.0"
79 | },
80 | "dependencies": {
81 | "@types/react": "^17.0.2",
82 | "@types/react-dom": "^17.0.1",
83 | "css-loader": "^5.1.1",
84 | "eslint-plugin-react": "^7.22.0",
85 | "nanoid": "^3.1.25",
86 | "npm-run-all": "^4.1.5",
87 | "react": "^17.0.1",
88 | "react-dom": "^17.0.1",
89 | "react-sweet-state": "^2.5.2",
90 | "sass": "^1.32.8",
91 | "sass-loader": "^11.0.1",
92 | "style-loader": "^2.0.0",
93 | "svg-parser": "^2.0.4",
94 | "ts-loader": "^8.0.17",
95 | "webpack": "^5.24.3",
96 | "xml-formatter": "^2.4.0"
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/src/core/SvgSpritesViewer.ts:
--------------------------------------------------------------------------------
1 | import { ExtensionContext, window, TextEditor } from 'vscode'
2 | import SvgSpritesViewerDocumentActions from './SvgSpritesViewerDocumentActions'
3 | import { Text } from './consts/consts'
4 | import { nanoid } from 'nanoid'
5 |
6 | export default class SvgSpritesViewer {
7 | public static instance = new SvgSpritesViewer()
8 |
9 | public static textEditors: Map = new Map<
10 | string,
11 | TextEditor
12 | >()
13 |
14 | public static supportedLanguages = ['xml', 'svg']
15 |
16 | public onActivate(context: ExtensionContext): void {
17 | const activeTextEditor = window.activeTextEditor
18 |
19 | if (activeTextEditor?.document) {
20 | const documentId = nanoid()
21 |
22 | SvgSpritesViewerDocumentActions.glanceDocument(
23 | documentId,
24 | activeTextEditor.document,
25 | context
26 | )
27 | SvgSpritesViewer.textEditors.set(documentId, activeTextEditor)
28 | } else {
29 | window.showErrorMessage(Text.notASVGDocument)
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/core/SvgSpritesViewerActions.ts:
--------------------------------------------------------------------------------
1 | import { WebviewPanel, ExtensionContext, window } from 'vscode'
2 | import { WebViewMessage } from '../view/app/consts/message'
3 | import SvgSpritesViewerDocumentActions from './SvgSpritesViewerDocumentActions'
4 |
5 | export class SvgSpritesViewerActions {
6 | static attachListenerToPanel(
7 | panel: WebviewPanel,
8 | context: ExtensionContext
9 | ): void {
10 | panel.webview.onDidReceiveMessage(
11 | (message) => {
12 | switch (message.command) {
13 | case WebViewMessage.alert:
14 | SvgSpritesViewerActions.showMessage(message)
15 | break
16 | case WebViewMessage.reload:
17 | SvgSpritesViewerDocumentActions.reloadWebview(
18 | message.textEditorId,
19 | context,
20 | panel
21 | )
22 | break
23 | case WebViewMessage.renameSprite:
24 | SvgSpritesViewerDocumentActions.renameSprite(
25 | message.spriteId,
26 | message.newSpriteId,
27 | message.textEditorId,
28 | context,
29 | panel
30 | )
31 | break
32 | case WebViewMessage.addNewSprites:
33 | SvgSpritesViewerDocumentActions.addNewSprites(
34 | message.svgs,
35 | message.textEditorId,
36 | context,
37 | panel
38 | )
39 | break
40 | case WebViewMessage.deleteSprite:
41 | SvgSpritesViewerActions.confirmFirstThenRun(() => {
42 | SvgSpritesViewerDocumentActions.removeSprite(
43 | message.spriteId,
44 | message.textEditorId,
45 | context,
46 | panel
47 | )
48 | })
49 | break
50 | }
51 | },
52 | undefined,
53 | context.subscriptions
54 | )
55 | }
56 |
57 | static showMessage(message: any): void {
58 | switch (message.type) {
59 | case 'info':
60 | window.showInformationMessage(message.text)
61 | break
62 | case 'error':
63 | window.showErrorMessage(message.text)
64 | break
65 | }
66 | }
67 |
68 | static confirmFirstThenRun(
69 | callback: () => void,
70 | message = 'Do you want to do this?'
71 | ): void {
72 | window
73 | .showInformationMessage(message, ...['Yes', 'No'])
74 | .then((answer) => {
75 | if (answer === 'Yes') {
76 | callback()
77 | }
78 | })
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/src/core/SvgSpritesViewerDocumentActions.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Uri,
3 | TextDocument,
4 | ExtensionContext,
5 | WebviewPanel,
6 | window,
7 | workspace,
8 | } from 'vscode'
9 | import { join, basename, parse as parsepath } from 'path'
10 | import { RootNode, parse, ElementNode } from 'svg-parser'
11 | const xmlFormatter = require('xml-formatter')
12 | import { Text } from './consts/consts'
13 | import SvgSpritesViewer from './SvgSpritesViewer'
14 | import { SvgSpritesViewerActions } from './SvgSpritesViewerActions'
15 | import {
16 | isASpriteSVG,
17 | nodeToSymbolTag,
18 | openWebview,
19 | strToValidVariableName,
20 | elementNodesToWriteBuffer,
21 | readFile,
22 | } from './utils/fns'
23 |
24 | export default class SvgSpritesViewerDocumentActions {
25 | static getWebviewContent(
26 | svgTree: RootNode,
27 | extensionPath: string,
28 | textEditorId: string
29 | ): string {
30 | const reactAppPathOnDisk = Uri.file(
31 | join(extensionPath, 'out', 'svgSpriteViewer.js')
32 | )
33 |
34 | const reactAppUri = reactAppPathOnDisk.with({
35 | scheme: 'vscode-resource',
36 | })
37 |
38 | return `
39 |
40 |
41 |
42 |
43 |
44 | Glance
45 |
49 |
50 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | `
61 | }
62 |
63 | static glanceDocument(
64 | textEditorId: string,
65 | textDocument: TextDocument,
66 | context: ExtensionContext
67 | ): void {
68 | const { fileName, getText, languageId } = textDocument
69 |
70 | if (SvgSpritesViewer.supportedLanguages.includes(languageId)) {
71 | const svgTree = parse(getText()) ?? null
72 |
73 | if (!svgTree) {
74 | window.showErrorMessage(Text.unableToParseSvgDocument)
75 | } else if (isASpriteSVG(svgTree)) {
76 | const { extensionPath } = context
77 | const panel = openWebview(basename(fileName), extensionPath)
78 |
79 | panel.webview.html =
80 | SvgSpritesViewerDocumentActions.getWebviewContent(
81 | svgTree,
82 | extensionPath,
83 | textEditorId
84 | )
85 |
86 | SvgSpritesViewerActions.attachListenerToPanel(panel, context)
87 |
88 | panel.onDidDispose(() =>
89 | SvgSpritesViewer.textEditors.delete(textEditorId)
90 | )
91 | } else {
92 | window.showErrorMessage(Text.notASpriteSvgDocument)
93 | }
94 | } else {
95 | window.showErrorMessage(Text.notASVGDocument)
96 | }
97 | }
98 |
99 | static async reloadWebview(
100 | textEditorId: string,
101 | context: ExtensionContext,
102 | panel: WebviewPanel,
103 | readFromUri: boolean = true
104 | ) {
105 | try {
106 | const { getText, uri } =
107 | SvgSpritesViewer.textEditors.get(textEditorId)!.document
108 | const { extensionPath } = context
109 |
110 | const text = !readFromUri ? getText() : await readFile(uri)
111 |
112 | const svgTree = parse(text) ?? null
113 |
114 | panel.webview.html =
115 | SvgSpritesViewerDocumentActions.getWebviewContent(
116 | svgTree,
117 | extensionPath,
118 | textEditorId
119 | )
120 | } catch (e) {
121 | window.showErrorMessage(Text.unableToRefreshWebview)
122 | }
123 | }
124 |
125 | static async removeSprite(
126 | spriteId: string,
127 | textEditorId: string,
128 | context: ExtensionContext,
129 | panel: WebviewPanel
130 | ) {
131 | try {
132 | const {
133 | document: { uri },
134 | } = SvgSpritesViewer.textEditors.get(textEditorId)!
135 | const svgTree = parse(await readFile(uri)) ?? null
136 |
137 | if (svgTree && isASpriteSVG(svgTree)) {
138 | const sprites: Array = (
139 | svgTree.children[0] as ElementNode
140 | ).children as Array
141 |
142 | if (sprites) {
143 | const svgSymbolIndex = sprites.findIndex(
144 | (node: ElementNode) =>
145 | node.tagName === 'symbol' &&
146 | node.properties?.id === spriteId
147 | )
148 |
149 | if (svgSymbolIndex >= 0) {
150 | sprites.splice(svgSymbolIndex, 1)
151 |
152 | const writeData = elementNodesToWriteBuffer(sprites)
153 |
154 | workspace.fs.writeFile(uri, writeData).then(
155 | () => {
156 | SvgSpritesViewerDocumentActions.reloadWebview(
157 | textEditorId,
158 | context,
159 | panel
160 | )
161 |
162 | window.showInformationMessage(
163 | Text.spriteDeleted.replace(
164 | '{}',
165 | `#${spriteId}`
166 | )
167 | )
168 | },
169 | () => {
170 | window.showErrorMessage(
171 | Text.unableToUpdateSprite
172 | )
173 | }
174 | )
175 | } else {
176 | window.showErrorMessage(Text.spriteNotFound)
177 | }
178 | }
179 | } else {
180 | window.showErrorMessage(Text.unableToParseSvgDocument)
181 | }
182 | } catch (e) {
183 | window.showErrorMessage(e.message)
184 | }
185 | }
186 |
187 | static async renameSprite(
188 | spriteId: string,
189 | newSpriteId: string,
190 | textEditorId: string,
191 | context: ExtensionContext,
192 | panel: WebviewPanel
193 | ) {
194 | try {
195 | const {
196 | document: { uri },
197 | } = SvgSpritesViewer.textEditors.get(textEditorId)!
198 |
199 | const svgTree = parse(await readFile(uri)) ?? null
200 |
201 | if (svgTree && isASpriteSVG(svgTree)) {
202 | const sprites: Array = (
203 | svgTree.children[0] as ElementNode
204 | ).children as Array
205 |
206 | if (sprites) {
207 | const svgSymbolIndex = sprites.findIndex(
208 | (node: ElementNode) =>
209 | node.tagName === 'symbol' &&
210 | node.properties?.id === spriteId
211 | )
212 |
213 | if (svgSymbolIndex >= 0) {
214 | sprites[svgSymbolIndex].properties!.id =
215 | strToValidVariableName(newSpriteId)
216 |
217 | const writeData = elementNodesToWriteBuffer(sprites)
218 |
219 | workspace.fs.writeFile(uri, writeData).then(
220 | () => {
221 | SvgSpritesViewerDocumentActions.reloadWebview(
222 | textEditorId,
223 | context,
224 | panel
225 | )
226 |
227 | window.showInformationMessage(
228 | Text.spriteRenamed
229 | )
230 | },
231 | () => {
232 | window.showErrorMessage(
233 | Text.unableToUpdateSprite
234 | )
235 | }
236 | )
237 | } else {
238 | window.showErrorMessage(Text.spriteNotFound)
239 | }
240 | }
241 | } else {
242 | window.showErrorMessage(Text.unableToParseSvgDocument)
243 | }
244 | } catch (e) {
245 | window.showErrorMessage(e.message)
246 | }
247 | }
248 |
249 | static async addNewSprites(
250 | svgs: Array<{ svg: string; name: string }>,
251 | textEditorId: string,
252 | context: ExtensionContext,
253 | panel: WebviewPanel
254 | ) {
255 | const symbols: string[] = []
256 |
257 | // parse and extract symbols from svgs
258 | svgs.forEach(({ svg, name }) => {
259 | const svgTree = parse(svg) ?? null
260 |
261 | if (!svgTree) {
262 | window.showErrorMessage(
263 | Text.unableToParseSvgDocumentSpecific.replace('{}', name)
264 | )
265 | } else {
266 | if (isASpriteSVG(svgTree)) {
267 | ;(svgTree.children[0] as ElementNode).children.forEach(
268 | (child) => {
269 | symbols.push(nodeToSymbolTag(child as ElementNode))
270 | }
271 | )
272 | } else {
273 | symbols.push(
274 | nodeToSymbolTag(
275 | svgTree.children[0] as ElementNode,
276 | strToValidVariableName(parsepath(name).name)
277 | )
278 | )
279 | }
280 | }
281 | })
282 |
283 | if (symbols.length > 0) {
284 | const newSprites = symbols.join('')
285 |
286 | const {
287 | document: { uri },
288 | } = SvgSpritesViewer.textEditors.get(textEditorId)!
289 |
290 | const sprites = await readFile(uri)
291 | const lastIndexOfClosingSvgTag = sprites.lastIndexOf('')
292 | const updatedSprites = xmlFormatter(
293 | `${sprites.slice(
294 | 0,
295 | lastIndexOfClosingSvgTag
296 | )}${newSprites}${sprites.slice(lastIndexOfClosingSvgTag)}`
297 | )
298 |
299 | const writeData = Buffer.from(updatedSprites, 'utf8')
300 |
301 | workspace.fs.writeFile(uri, writeData).then(
302 | () => {
303 | SvgSpritesViewerDocumentActions.reloadWebview(
304 | textEditorId,
305 | context,
306 | panel
307 | )
308 |
309 | window.showInformationMessage(
310 | Text.newSpritesAdd.replace(
311 | '{}',
312 | `${symbols.length.toString()} new sprite${
313 | symbols.length > 1 ? 's' : ''
314 | }`
315 | )
316 | )
317 | },
318 | () => {
319 | window.showErrorMessage(Text.unableToAddNewSprite)
320 | }
321 | )
322 | }
323 | }
324 | }
325 |
--------------------------------------------------------------------------------
/src/core/consts/consts.ts:
--------------------------------------------------------------------------------
1 | export enum Text {
2 | unableToParseSvgDocument = 'Oops! Unable to parse SVG document',
3 | unableToParseSvgDocumentSpecific = 'Oops! Unable to parse {}, it may be broken',
4 | notASpriteSvgDocument = 'Oops! No sprite found in the SVG document',
5 | notASVGDocument = 'Oops! Glance only works with SVG documents',
6 | webViewRefreshed = 'Glance refreshed!',
7 | unableToRefreshWebview = 'Oops! Unable to refresh',
8 | newSpritesAdd = 'Successfully add {}!',
9 | spriteDeleted = '{} deleted!',
10 | spriteRenamed = 'Sprite was updated!',
11 | unableToAddNewSprite = 'Oops! Unable to add new sprite, please check what you have',
12 | unableToUpdateSprite = 'Oops! Unable to sprite, please check what you have',
13 | spriteNotFound = 'Oops! Sprite not found',
14 | }
15 |
16 | export const WEB_VIEW_NAME = 'svg-sprite-preview'
17 | export const WEB_VIEW_TITLE = '🖼 SVG sprites [Glance]'
18 |
--------------------------------------------------------------------------------
/src/core/utils/fns.ts:
--------------------------------------------------------------------------------
1 | import * as vscode from 'vscode'
2 | import { join } from 'path'
3 | import { RootNode, ElementNode } from 'svg-parser'
4 | import { WEB_VIEW_NAME, WEB_VIEW_TITLE } from '../consts/consts'
5 | import { nodeToSvgText } from '../../view/app/utils/fns'
6 | import { nanoid } from 'nanoid'
7 | import xmlFormatter = require('xml-formatter')
8 |
9 | export const openWebview = (
10 | documentFileName: string,
11 | extensionPath: string
12 | ) => {
13 | return vscode.window.createWebviewPanel(
14 | WEB_VIEW_NAME,
15 | WEB_VIEW_TITLE.replace('SVG', documentFileName),
16 | vscode.ViewColumn.One,
17 | {
18 | enableScripts: true,
19 | localResourceRoots: [vscode.Uri.file(join(extensionPath, 'out'))],
20 | }
21 | )
22 | }
23 |
24 | export const isASpriteSVG = (svgTree: RootNode) => {
25 | const firstChildTag =
26 | ((svgTree?.children[0] as ElementNode)?.children[0] as ElementNode) ??
27 | null
28 |
29 | return (
30 | firstChildTag &&
31 | firstChildTag.tagName === 'symbol' &&
32 | firstChildTag?.properties?.id
33 | )
34 | }
35 |
36 | export const nodeToSymbolTag = (node: ElementNode, name?: string): string => {
37 | const symbolId = name
38 | ? name
39 | : node?.properties?.id ?? strToValidVariableName(nanoid())
40 |
41 | if (node.type === 'element') {
42 | return `
47 | !['width', 'height', 'id', 'stroke', 'xmlns'].includes(
48 | entry[0]
49 | )
50 | )
51 | .map((entry) => `${entry[0]}="${entry[1]}"`)
52 | .join(' ')} xmlns="http://www.w3.org/2000/svg">${node.children
53 | .map((children) => nodeToSvgText(children as ElementNode))
54 | .join('')}`
55 | } else {
56 | return ''
57 | }
58 | }
59 |
60 | export const elementNodesToWriteBuffer = (sprites: Array) =>
61 | Buffer.from(
62 | xmlFormatter(
63 | ``
66 | ),
67 | 'utf8'
68 | )
69 |
70 | export const strToValidVariableName = (str: string, replaceHyphen = false) => {
71 | let convertedStr = str.trim()
72 |
73 | // remove all special characters
74 | convertedStr = convertedStr.replace(/[^0-9a-zA-Z -]+/g, '')
75 |
76 | // replace whitespace to underscore
77 | convertedStr = convertedStr.replace(/\s+/g, '_')
78 |
79 | if (replaceHyphen) {
80 | convertedStr = convertedStr.replace(/\-+/g, '_')
81 | }
82 |
83 | // check if string starts with a numeric character
84 | if (/^\d+$/.test(convertedStr.charAt(0))) {
85 | // remove the starting numeric character
86 | convertedStr = convertedStr.slice(1)
87 | }
88 |
89 | return convertedStr
90 | }
91 |
92 | export const readFile = (uri: vscode.Uri): Promise => {
93 | return new Promise((resolve, reject) => {
94 | vscode.workspace.fs.readFile(uri).then(
95 | (data) => {
96 | resolve(new TextDecoder().decode(data))
97 | },
98 | (e) => reject(e)
99 | )
100 | })
101 | }
102 |
--------------------------------------------------------------------------------
/src/extension.ts:
--------------------------------------------------------------------------------
1 | import { ExtensionContext, commands } from 'vscode'
2 | import SvgSpritesViewer from './core/SvgSpritesViewer'
3 |
4 | export function activate(context: ExtensionContext) {
5 | let disposable = commands.registerCommand('glance.open', () =>
6 | SvgSpritesViewer.instance.onActivate(context)
7 | )
8 |
9 | context.subscriptions.push(disposable)
10 | }
11 |
12 | export function deactivate() {}
13 |
--------------------------------------------------------------------------------
/src/view/app/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "browser": true,
3 | "extends": ["eslint:recommended", "plugin:react/recommended"],
4 | "rules": {
5 | "@typescript-eslint/naming-convention": "off",
6 | "semi": "off"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/src/view/app/App.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Footer from 'components/Footer/Footer'
3 | import Content from 'Content'
4 |
5 | const App = () => {
6 | return (
7 |
8 |
9 |
10 |
11 | )
12 | }
13 |
14 | export default App
15 |
--------------------------------------------------------------------------------
/src/view/app/Content.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ControlPanel from 'components/ControlPanel/ControlPanel'
3 | // import Searchbar from 'components/Searchbar/Searchbar'
4 | import Grid from 'components/Grid/Grid'
5 |
6 | const Content = () => {
7 | return (
8 |
9 | {/* */}
10 |
11 |
12 |
13 |
14 |
15 | )
16 | }
17 |
18 | export default Content
19 |
--------------------------------------------------------------------------------
/src/view/app/assets/icons.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/view/app/components/ControlPanel/AppearanceControl.tsx:
--------------------------------------------------------------------------------
1 | import React, { ChangeEvent } from 'react'
2 | import useStore from 'store/store'
3 |
4 | const AppearanceControl = () => {
5 | const [{ config }, actions] = useStore()
6 |
7 | const handleChange = (
8 | event: ChangeEvent
9 | ) => {
10 | const key = event.target.name
11 |
12 | actions.configure({
13 | [key]: event.target.value,
14 | })
15 | }
16 |
17 | return (
18 |
88 | )
89 | }
90 |
91 | export default AppearanceControl
92 |
--------------------------------------------------------------------------------
/src/view/app/components/ControlPanel/ControlPanel.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Searchbar from 'components/Searchbar/Searchbar'
3 | import ToolsPanel from './ToolsPanel'
4 | import AppearanceControl from './AppearanceControl'
5 | import './style.scss'
6 |
7 | const ControlPanel = () => {
8 | return (
9 |
14 | )
15 | }
16 |
17 | export default ControlPanel
18 |
--------------------------------------------------------------------------------
/src/view/app/components/ControlPanel/ToolsPanel.tsx:
--------------------------------------------------------------------------------
1 | import Icon from 'components/Icon'
2 | import { WebViewMessage } from 'consts/message'
3 | import React, { ChangeEvent } from 'react'
4 | import { vscode } from 'utils/vscode'
5 | import './style.scss'
6 |
7 | const ToolsPanel = () => {
8 | const handleRefresh = () => {
9 | vscode.postMessage({
10 | command: WebViewMessage.reload,
11 | textEditorId: (window as any).textEditorId,
12 | })
13 | }
14 |
15 | const handleAddNewSprites = async (
16 | event: ChangeEvent
17 | ) => {
18 | const { files } = event.target
19 | if (files) {
20 | const svgs = await Promise.all(
21 | Array.from(files).map((file) => file.text())
22 | )
23 |
24 | vscode.postMessage({
25 | command: WebViewMessage.addNewSprites,
26 | textEditorId: (window as any).textEditorId,
27 | svgs: svgs.map((svg, i) => ({
28 | svg,
29 | name: files[i].name,
30 | })),
31 | })
32 | }
33 | }
34 |
35 | return (
36 |
37 |
38 |
50 |
53 |
54 |
55 | )
56 | }
57 |
58 | export default ToolsPanel
59 |
--------------------------------------------------------------------------------
/src/view/app/components/ControlPanel/style.scss:
--------------------------------------------------------------------------------
1 | .control_panel {
2 | padding-left: 1rem;
3 | }
4 |
5 | .config_controls {
6 | list-style: none;
7 | display: flex;
8 | flex-direction: column;
9 | padding: 0;
10 |
11 | label {
12 | margin-bottom: 5px;
13 | text-transform: uppercase;
14 | white-space: nowrap;
15 | text-overflow: ellipsis;
16 | overflow: hidden;
17 | }
18 |
19 | li {
20 | display: flex;
21 | flex: 1;
22 | flex-direction: column;
23 | margin-bottom: 20px;
24 |
25 | &:hover {
26 | color: var(--vscode-input-foreground);
27 | }
28 |
29 | input {
30 | flex: 1;
31 | }
32 |
33 | .control {
34 | flex: 1;
35 | display: flex;
36 |
37 | input {
38 | box-sizing: content-box;
39 | }
40 | }
41 | }
42 |
43 | @media screen and (max-width: 1165px) {
44 | & {
45 | display: grid;
46 | grid-template-columns: repeat(auto-fit, minmax(10px, 1fr));
47 | grid-column-gap: 1rem;
48 | padding: 0;
49 | margin: 0;
50 | }
51 | }
52 | }
53 |
54 | .tools_panel {
55 | display: flex;
56 | align-items: center;
57 | justify-content: flex-end;
58 |
59 | .tools_panel__actions {
60 | display: flex;
61 | align-items: center;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/src/view/app/components/Footer/Footer.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import './style.scss'
3 |
4 | const Footer = (): JSX.Element => {
5 | return (
6 |
9 | )
10 | }
11 |
12 | export default Footer
13 |
--------------------------------------------------------------------------------
/src/view/app/components/Footer/style.scss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahkohd/glance/25cddd9b9ebc7fcbc7a34e983a94568a6d680b99/src/view/app/components/Footer/style.scss
--------------------------------------------------------------------------------
/src/view/app/components/Grid/Grid.tsx:
--------------------------------------------------------------------------------
1 | import React, { useMemo } from 'react'
2 | import { ElementNode } from 'svg-parser'
3 | import useStore from 'store/store'
4 | import GridItem, { SVGRecord } from './GridItem'
5 | import { nodeToSvgText } from 'utils/fns'
6 | import './style.scss'
7 |
8 | const Grid = () => {
9 | const [{ svgTree, query, config }] = useStore()
10 |
11 | const assets: SVGRecord[] = useMemo(
12 | () =>
13 | (svgTree.children ?? [])
14 | .filter((child) =>
15 | ((child as ElementNode)?.properties?.id as string)
16 | .toLowerCase()
17 | .includes(query.toLowerCase())
18 | )
19 | .map((_node) => {
20 | const node = _node as ElementNode
21 |
22 | return {
23 | id: node.properties?.id ?? '',
24 | viewBox: node.properties?.viewBox ?? '',
25 | svgText: node.children
26 | .map((childNode) =>
27 | nodeToSvgText(childNode as ElementNode)
28 | )
29 | .join(''),
30 | } as SVGRecord
31 | }),
32 | [query, svgTree, config]
33 | )
34 |
35 | return (
36 |
37 | {assets.length > 0 ? (
38 |
39 | {assets.map((svg, index) => (
40 |
41 | ))}
42 |
43 | ) : (
44 |
45 | No result found for "{query}", try another keyword 🤷🏽♂️
46 |
47 | )}
48 |
49 | )
50 | }
51 |
52 | export default Grid
53 |
--------------------------------------------------------------------------------
/src/view/app/components/Grid/GridItem.tsx:
--------------------------------------------------------------------------------
1 | import { WebViewMessage } from 'consts/message'
2 | import React, {
3 | ChangeEvent,
4 | MouseEvent,
5 | useMemo,
6 | useRef,
7 | useState,
8 | KeyboardEvent,
9 | } from 'react'
10 | import useStore from 'store/store'
11 | import { copyToClipboard } from 'utils/clipboard'
12 | import { vscode } from 'utils/vscode'
13 | import { renderToString } from 'react-dom/server'
14 | import Icon from 'components/Icon'
15 |
16 | export interface SVGRecord {
17 | id: string
18 | viewBox: string
19 | svgText: string
20 | }
21 |
22 | interface GridItemProps {
23 | svg: SVGRecord
24 | }
25 |
26 | const GridItem = (props: GridItemProps): JSX.Element => {
27 | const [{ query, config }] = useStore()
28 | const { svg } = props
29 | const [editMode, setEditMode] = useState(false)
30 | const [spriteName, setSpriteName] = useState(svg.id)
31 | const inputRef = useRef(null)
32 |
33 | const getSize = (value: string | undefined) => {
34 | const size = parseInt(value ?? '0')
35 |
36 | if (size > 100) {
37 | return 100
38 | } else if (size < 10) {
39 | return 10
40 | } else {
41 | return size
42 | }
43 | }
44 |
45 | const handleClick = () => {
46 | copyToClipboard(
47 | config.copyType === 'assetId' ? svg.id : renderToString(Svg)
48 | )
49 |
50 | vscode.postMessage({
51 | command: WebViewMessage.alert,
52 | text: `${svg.id} copied to clipboard!`,
53 | type: 'info',
54 | })
55 | }
56 |
57 | const handleRenameSprite = () => {
58 | vscode.postMessage({
59 | command: WebViewMessage.renameSprite,
60 | spriteId: props.svg.id,
61 | newSpriteId: spriteName,
62 | textEditorId: (window as any).textEditorId,
63 | })
64 | }
65 |
66 | const handleToggleEditMode = (
67 | event: MouseEvent | KeyboardEvent
68 | ) => {
69 | event.stopPropagation()
70 |
71 | setEditMode((prev) => {
72 | const next = !prev
73 | const inputElem = inputRef.current!
74 |
75 | if (next) {
76 | inputElem.focus()
77 | } else {
78 | inputElem.blur()
79 | inputElem.readOnly = true
80 | if (spriteName !== props.svg.id) handleRenameSprite()
81 | }
82 |
83 | return next
84 | })
85 | }
86 |
87 | const handleOnNameChange = (event: ChangeEvent) => {
88 | setSpriteName(event.target.value)
89 | }
90 |
91 | const handleDeleteSprite = (event: MouseEvent) => {
92 | event.stopPropagation()
93 |
94 | vscode.postMessage({
95 | command: WebViewMessage.deleteSprite,
96 | spriteId: svg.id,
97 | textEditorId: (window as any).textEditorId,
98 | })
99 | }
100 |
101 | const Svg = useMemo(
102 | () => (
103 |
115 | ),
116 | [config, query]
117 | )
118 |
119 | return (
120 |
121 | {Svg}
122 | e.stopPropagation()}
129 | onChange={handleOnNameChange}
130 | onKeyDown={(e) => e.key === 'Enter' && handleToggleEditMode(e)}
131 | />
132 |
133 |
140 |
143 |
144 |
145 | )
146 | }
147 |
148 | export default GridItem
149 |
--------------------------------------------------------------------------------
/src/view/app/components/Grid/style.scss:
--------------------------------------------------------------------------------
1 | .svg_grid {
2 | display: grid;
3 | grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
4 | grid-column-gap: 20px;
5 |
6 | .svg_grid__preview {
7 | color: unset;
8 | display: flex;
9 | place-content: center;
10 | place-items: center;
11 | flex-direction: column;
12 | padding: 2rem 0;
13 | overflow: hidden;
14 | text-overflow: ellipsis;
15 | text-decoration: none;
16 | border: 1px dotted transparent;
17 | max-width: 128px;
18 | position: relative;
19 |
20 | &:hover {
21 | color: var(--vscode-input-foreground);
22 | cursor: pointer;
23 | border-color: var(--vscode-input-border);
24 |
25 | .svg_grid__actions {
26 | opacity: 1;
27 | pointer-events: all;
28 | }
29 | }
30 | }
31 |
32 | .svg_grid__label {
33 | white-space: nowrap;
34 | overflow: hidden;
35 | text-overflow: ellipsis;
36 | width: 70%;
37 | text-align: center;
38 | border: none;
39 | background: transparent;
40 | font-family: var(--vscode-editor-font-family);
41 | color: rgba($color: #fff, $alpha: 0.7);
42 |
43 | &:read-only {
44 | cursor: pointer;
45 | outline: none;
46 | }
47 | }
48 |
49 | .svg_grid__actions {
50 | display: flex;
51 | width: 100%;
52 | align-items: center;
53 | justify-content: center;
54 | position: absolute;
55 | bottom: 5%;
56 | pointer-events: none;
57 | opacity: 0;
58 | transition: ease all 0.2s;
59 |
60 | & button:first-child {
61 | margin-right: 2px;
62 | }
63 |
64 | & button:first-child {
65 | margin-left: 2px;
66 | }
67 | }
68 | }
69 |
70 | .content__content {
71 | flex: 1;
72 | overflow: scroll;
73 | padding: 0.5rem;
74 | }
75 |
--------------------------------------------------------------------------------
/src/view/app/components/Icon.tsx:
--------------------------------------------------------------------------------
1 | import React, { FC, MouseEvent, CSSProperties } from 'react'
2 | import icons from '../assets/icons.svg'
3 |
4 | export interface IconProps {
5 | width?: string | number
6 | height?: string | number
7 | id: string
8 | className?: string
9 | onClick?: (event: MouseEvent) => void
10 | color?: string
11 | size?: number | string
12 | style?: CSSProperties
13 | }
14 |
15 | const Icon: FC = ({
16 | width,
17 | height,
18 | id,
19 | className,
20 | onClick,
21 | color,
22 | size,
23 | style,
24 | }: IconProps) => {
25 | return (
26 |
35 | )
36 | }
37 |
38 | export default Icon
39 |
--------------------------------------------------------------------------------
/src/view/app/components/Searchbar/Searchbar.tsx:
--------------------------------------------------------------------------------
1 | import React, { ChangeEvent, useEffect, useRef } from 'react'
2 | import useStore from 'store/store'
3 | import './style.scss'
4 |
5 | const Searchbar = () => {
6 | const inputRef = useRef(null)
7 |
8 | const [{ svgTree }, actions] = useStore()
9 |
10 | const onShortcut = (event: any) => {
11 | if (event.keyCode === 191) {
12 | inputRef.current?.focus()
13 | }
14 | }
15 |
16 | const handleChange = (event: ChangeEvent) =>
17 | actions.setQuery(event.target.value)
18 |
19 | useEffect(() => {
20 | document.addEventListener('keyup', onShortcut)
21 | return () => {
22 | document.removeEventListener('keyup', onShortcut)
23 | }
24 | })
25 |
26 | return (
27 |
28 |
35 |
36 | )
37 | }
38 |
39 | export default Searchbar
40 |
--------------------------------------------------------------------------------
/src/view/app/components/Searchbar/style.scss:
--------------------------------------------------------------------------------
1 | .searchbar__container {
2 | display: flex;
3 |
4 | .input__searchbar {
5 | flex: 1;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/view/app/consts/message.ts:
--------------------------------------------------------------------------------
1 | export enum WebViewMessage {
2 | alert,
3 | reload,
4 | addNewSprites,
5 | deleteSprite,
6 | renameSprite,
7 | }
8 |
--------------------------------------------------------------------------------
/src/view/app/index.scss:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 |
5 | html,
6 | body {
7 | outline: 0;
8 | padding: 0;
9 | margin: 0;
10 | }
11 |
12 | body {
13 | font-size: var(--vscode-editor-font-size);
14 | font-weight: var(--vscode-editor-font-weight);
15 | font-family: var(--vscode-editor-font-family);
16 |
17 | overflow: hidden;
18 | }
19 |
20 | #root {
21 | height: 100vh;
22 | width: 100vw;
23 | padding: 1vw;
24 | }
25 |
26 | #App {
27 | width: 100%;
28 |
29 | footer {
30 | height: 30px;
31 | cursor: default;
32 | }
33 |
34 | & > main {
35 | height: calc(100vh - 60px);
36 | display: flex;
37 | flex-direction: column;
38 |
39 | .content {
40 | height: 80vh;
41 | flex: 1;
42 | display: flex;
43 |
44 | aside {
45 | width: 30%;
46 | }
47 |
48 | @media screen and (max-width: 1165px) {
49 | border-bottom: 1px solid var(--vscode-input-border);
50 | margin-bottom: 0.5rem;
51 | flex-direction: column-reverse;
52 |
53 | aside {
54 | width: 100%;
55 | }
56 | }
57 | }
58 | }
59 | }
60 |
61 | .input {
62 | background: var(--vscode-input-background);
63 | color: var(--vscode-input-foreground);
64 | border: 1px solid var(--vscode-input-border);
65 | padding: 8px 10px !important;
66 | font-family: var(--vscode-editor-font-family);
67 |
68 | &::placeholder {
69 | color: var(--vscode-input-placeholderForeground);
70 | font-family: var(--vscode-editor-font-family);
71 | }
72 | }
73 |
74 | .control {
75 | height: 35px;
76 | display: flex;
77 | overflow: hidden;
78 |
79 | input,
80 | select {
81 | flex: 1;
82 | width: 100%;
83 | }
84 |
85 | select {
86 | appearance: none;
87 | line-height: normal;
88 | position: relative;
89 | }
90 | }
91 |
92 | label {
93 | font-weight: bold;
94 | display: block;
95 | }
96 |
97 | .text--error {
98 | color: var(--vscode-input-foreground);
99 | opacity: 0.6;
100 | }
101 |
102 | .text--italics {
103 | font-style: italic;
104 | }
105 |
106 | .mb-20 {
107 | margin-bottom: 20px;
108 | }
109 |
110 | .mb-15 {
111 | margin-bottom: 12px;
112 | }
113 |
114 | .mb-5 {
115 | margin-bottom: 5px;
116 | }
117 |
118 | .mr-5 {
119 | margin-right: 5px;
120 | }
121 |
122 | .mt-5 {
123 | margin-top: 10px;
124 | }
125 |
126 | .btn--icon {
127 | background: transparent;
128 | padding: 2px;
129 | border: none;
130 | cursor: pointer;
131 | outline: none;
132 | border-radius: 4px;
133 | position: relative;
134 |
135 | &:hover {
136 | background: rgba(255, 225, 255, 0.1);
137 | }
138 |
139 | &:focus {
140 | outline: 1px solid var(--vscode-input-border);
141 | }
142 |
143 | input[type='file'] {
144 | opacity: 0;
145 | width: 0;
146 | height: 0;
147 | }
148 |
149 | label {
150 | opacity: 0;
151 | width: 100%;
152 | height: 100%;
153 | position: absolute;
154 | cursor: pointer;
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/src/view/app/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 | import * as ReactDOM from "react-dom";
3 | import App from "./App";
4 |
5 | import "./index.scss";
6 |
7 | ReactDOM.render(, document.getElementById("root"));
8 |
--------------------------------------------------------------------------------
/src/view/app/store/store.ts:
--------------------------------------------------------------------------------
1 | import { createStore, createHook } from 'react-sweet-state'
2 | import { ElementNode } from 'svg-parser'
3 |
4 | interface PreviewConfig {
5 | color: string
6 | size: string
7 | strokeWidth: string
8 | }
9 |
10 | const Store = createStore({
11 | initialState: {
12 | svgTree: (window as any)?.initialData?.children[0] as ElementNode,
13 | config: {
14 | color: 'currentColor',
15 | size: '38',
16 | strokeWidth: '',
17 | stroke: '',
18 | copyType: 'assetId',
19 | },
20 | query: '',
21 | },
22 | actions: {
23 | configure:
24 | (config: Partial) =>
25 | ({ setState, getState }) => {
26 | setState({
27 | config: {
28 | ...getState().config,
29 | ...config,
30 | },
31 | })
32 | },
33 | setQuery:
34 | (query: string) =>
35 | ({ setState }) => {
36 | setState({
37 | query,
38 | })
39 | },
40 | },
41 | })
42 |
43 | const useStore = createHook(Store)
44 |
45 | export default useStore
46 |
--------------------------------------------------------------------------------
/src/view/app/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "./",
4 | "module": "commonjs",
5 | "target": "es2015",
6 | "lib": ["es6", "dom"],
7 | "allowJs": true,
8 | "jsx": "react",
9 | "moduleResolution": "node",
10 | "noImplicitReturns": true,
11 | "noImplicitThis": true,
12 | "noImplicitAny": true,
13 | "strictNullChecks": true,
14 | "skipLibCheck": true,
15 | "esModuleInterop": true,
16 | "allowSyntheticDefaultImports": true,
17 | "strict": true,
18 | "forceConsistentCasingInFileNames": true,
19 | "isolatedModules": true,
20 | "resolveJsonModule": true,
21 | "noEmit": false,
22 | "sourceMap": true,
23 | "noUnusedLocals": true,
24 | "noUnusedParameters": true,
25 | "incremental": true,
26 | "noFallthroughCasesInSwitch": true
27 | },
28 | "types": ["typePatches"]
29 | }
30 |
--------------------------------------------------------------------------------
/src/view/app/types/file-loader.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.svg?inline' {
2 | const content: any
3 | export default content
4 | }
5 |
6 | declare module '*.svg' {
7 | const content: any
8 | export default content
9 | }
10 |
--------------------------------------------------------------------------------
/src/view/app/utils/clipboard.ts:
--------------------------------------------------------------------------------
1 | export const copyToClipboard = (textToCopy: string): Promise => {
2 | if (navigator.clipboard && window.isSecureContext) {
3 | // navigator clipboard api method'
4 | return navigator.clipboard.writeText(textToCopy)
5 | } else {
6 | // text area method
7 | const textArea = document.createElement('textarea')
8 | textArea.value = textToCopy
9 | // make the textarea out of viewport
10 | textArea.style.position = 'fixed'
11 | textArea.style.left = '-999999px'
12 | textArea.style.top = '-999999px'
13 | document.body.appendChild(textArea)
14 | textArea.focus()
15 | textArea.select()
16 | return new Promise((res, rej) => {
17 | // here the magic happens
18 | document.execCommand('copy') ? res() : rej()
19 | textArea.remove()
20 | })
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/view/app/utils/fns.ts:
--------------------------------------------------------------------------------
1 | import { ElementNode } from 'svg-parser'
2 |
3 | export const nodeToSvgText = (node: ElementNode): string => {
4 | if (node.type === 'element') {
5 | return `<${node.tagName} ${Object.entries(node.properties as any)
6 | .map((entry) => `${entry[0]}="${entry[1]}"`)
7 | .join(' ')}>${node.children
8 | .map((children) => nodeToSvgText(children as ElementNode))
9 | .join('')}${node.tagName}>`
10 | }
11 |
12 | return ''
13 | }
14 |
--------------------------------------------------------------------------------
/src/view/app/utils/vscode.ts:
--------------------------------------------------------------------------------
1 | export const vscode = (window as any).acquireVsCodeApi()
2 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "./src",
4 | "paths": {
5 | "*": ["*"]
6 | },
7 | "module": "commonjs",
8 | "target": "es6",
9 | "outDir": "out",
10 | "lib": ["es6", "dom"],
11 | "sourceMap": true,
12 | "rootDir": "src",
13 | "strict": true,
14 | "jsx": "react",
15 | "noUnusedLocals": true,
16 | "noImplicitReturns": true,
17 | "noFallthroughCasesInSwitch": true,
18 | "experimentalDecorators": true,
19 | "declarationMap": false
20 | },
21 | "exclude": ["node_modules", ".vscode-test", "**/view/app/**"]
22 | }
23 |
--------------------------------------------------------------------------------
/tsconfig.tsbuildinfo:
--------------------------------------------------------------------------------
1 | {
2 | "program": {
3 | "fileInfos": {
4 | "./node_modules/typescript/lib/lib.es5.d.ts": {
5 | "version": "b3584bc5798ed422ce2516df360ffa9cf2d80b5eae852867db9ba3743145f895",
6 | "signature": "b3584bc5798ed422ce2516df360ffa9cf2d80b5eae852867db9ba3743145f895",
7 | "affectsGlobalScope": true
8 | },
9 | "./node_modules/typescript/lib/lib.es2015.d.ts": {
10 | "version": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6",
11 | "signature": "dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6",
12 | "affectsGlobalScope": false
13 | },
14 | "./node_modules/typescript/lib/lib.es2016.d.ts": {
15 | "version": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467",
16 | "signature": "7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467",
17 | "affectsGlobalScope": false
18 | },
19 | "./node_modules/typescript/lib/lib.es2017.d.ts": {
20 | "version": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",
21 | "signature": "8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",
22 | "affectsGlobalScope": false
23 | },
24 | "./node_modules/typescript/lib/lib.es2018.d.ts": {
25 | "version": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",
26 | "signature": "5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",
27 | "affectsGlobalScope": false
28 | },
29 | "./node_modules/typescript/lib/lib.dom.d.ts": {
30 | "version": "feeeb1dd8a80fb76be42b0426e8f3ffa9bdef3c2f3c12c147e7660b1c5ba8b3b",
31 | "signature": "feeeb1dd8a80fb76be42b0426e8f3ffa9bdef3c2f3c12c147e7660b1c5ba8b3b",
32 | "affectsGlobalScope": true
33 | },
34 | "./node_modules/typescript/lib/lib.es2015.core.d.ts": {
35 | "version": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17",
36 | "signature": "46ee15e9fefa913333b61eaf6b18885900b139867d89832a515059b62cf16a17",
37 | "affectsGlobalScope": true
38 | },
39 | "./node_modules/typescript/lib/lib.es2015.collection.d.ts": {
40 | "version": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c",
41 | "signature": "43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c",
42 | "affectsGlobalScope": true
43 | },
44 | "./node_modules/typescript/lib/lib.es2015.generator.d.ts": {
45 | "version": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a",
46 | "signature": "cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a",
47 | "affectsGlobalScope": true
48 | },
49 | "./node_modules/typescript/lib/lib.es2015.iterable.d.ts": {
50 | "version": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a",
51 | "signature": "8b2a5df1ce95f78f6b74f1a555ccdb6baab0486b42d8345e0871dd82811f9b9a",
52 | "affectsGlobalScope": true
53 | },
54 | "./node_modules/typescript/lib/lib.es2015.promise.d.ts": {
55 | "version": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c",
56 | "signature": "2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c",
57 | "affectsGlobalScope": true
58 | },
59 | "./node_modules/typescript/lib/lib.es2015.proxy.d.ts": {
60 | "version": "810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357",
61 | "signature": "810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357",
62 | "affectsGlobalScope": true
63 | },
64 | "./node_modules/typescript/lib/lib.es2015.reflect.d.ts": {
65 | "version": "62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6",
66 | "signature": "62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6",
67 | "affectsGlobalScope": true
68 | },
69 | "./node_modules/typescript/lib/lib.es2015.symbol.d.ts": {
70 | "version": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93",
71 | "signature": "3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93",
72 | "affectsGlobalScope": true
73 | },
74 | "./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts": {
75 | "version": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551",
76 | "signature": "9d122b7e8c1a5c72506eea50c0973cba55b92b5532d5cafa8a6ce2c547d57551",
77 | "affectsGlobalScope": true
78 | },
79 | "./node_modules/typescript/lib/lib.es2016.array.include.d.ts": {
80 | "version": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006",
81 | "signature": "3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006",
82 | "affectsGlobalScope": true
83 | },
84 | "./node_modules/typescript/lib/lib.es2017.object.d.ts": {
85 | "version": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a",
86 | "signature": "17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a",
87 | "affectsGlobalScope": true
88 | },
89 | "./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts": {
90 | "version": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98",
91 | "signature": "7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98",
92 | "affectsGlobalScope": true
93 | },
94 | "./node_modules/typescript/lib/lib.es2017.string.d.ts": {
95 | "version": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577",
96 | "signature": "6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577",
97 | "affectsGlobalScope": true
98 | },
99 | "./node_modules/typescript/lib/lib.es2017.intl.d.ts": {
100 | "version": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d",
101 | "signature": "12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d",
102 | "affectsGlobalScope": true
103 | },
104 | "./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts": {
105 | "version": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e",
106 | "signature": "b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e",
107 | "affectsGlobalScope": true
108 | },
109 | "./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts": {
110 | "version": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a",
111 | "signature": "0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a",
112 | "affectsGlobalScope": true
113 | },
114 | "./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts": {
115 | "version": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359",
116 | "signature": "a40c4d82bf13fcded295ac29f354eb7d40249613c15e07b53f2fc75e45e16359",
117 | "affectsGlobalScope": true
118 | },
119 | "./node_modules/typescript/lib/lib.es2018.intl.d.ts": {
120 | "version": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e",
121 | "signature": "df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e",
122 | "affectsGlobalScope": true
123 | },
124 | "./node_modules/typescript/lib/lib.es2018.promise.d.ts": {
125 | "version": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c",
126 | "signature": "bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c",
127 | "affectsGlobalScope": true
128 | },
129 | "./node_modules/typescript/lib/lib.es2018.regexp.d.ts": {
130 | "version": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8",
131 | "signature": "c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8",
132 | "affectsGlobalScope": true
133 | },
134 | "./node_modules/typescript/lib/lib.es2020.bigint.d.ts": {
135 | "version": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09",
136 | "signature": "7b5a10e3c897fabece5a51aa85b4111727d7adb53c2734b5d37230ff96802a09",
137 | "affectsGlobalScope": true
138 | },
139 | "./node_modules/typescript/lib/lib.esnext.intl.d.ts": {
140 | "version": "506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e",
141 | "signature": "506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e",
142 | "affectsGlobalScope": true
143 | },
144 | "./src/consts.ts": {
145 | "version": "761f9dfa8a7926a30ca9b4bba74a926d911e2709b04cb27243058932dbf6e78d",
146 | "signature": "f8bb6bef0c01f7b0e6b6b5bd3e699cc0466dfea72b857a6037f4ee4adbaafe82",
147 | "affectsGlobalScope": false
148 | },
149 | "./node_modules/@types/vscode/index.d.ts": {
150 | "version": "19e8e603cbf6a73486f00afc7277f66b852eac7cff894500c1c692de21ba5fb3",
151 | "signature": "19e8e603cbf6a73486f00afc7277f66b852eac7cff894500c1c692de21ba5fb3",
152 | "affectsGlobalScope": true
153 | },
154 | "./node_modules/@types/svg-parser/index.d.ts": {
155 | "version": "a488477a94c2733bf32c58eaa223c50bd70fedd8397fe07ee587fe02bbca4c8d",
156 | "signature": "a488477a94c2733bf32c58eaa223c50bd70fedd8397fe07ee587fe02bbca4c8d",
157 | "affectsGlobalScope": false
158 | },
159 | "./src/lib.ts": {
160 | "version": "c8a82899ead7b9e929a1956133b4062270699cb7de0cb6aa4e15060a390f742e",
161 | "signature": "70f094c91679e1b71bb09d9e193a9db2563fa47e9c08d4565aff195aecddd253",
162 | "affectsGlobalScope": false
163 | },
164 | "./src/extension.ts": {
165 | "version": "f8c91bdf0c9e17feed92f5320142e6ae5f1cdc88731dd27ee0acd0ea9d54469d",
166 | "signature": "2caa813611cb793b9df7b36e79c41c3fd041606ef7cb7250d6d0704cac44e446",
167 | "affectsGlobalScope": false
168 | },
169 | "./node_modules/vscode-test/out/download.d.ts": {
170 | "version": "1281c0f7e0d8e8bb28dd23808ccbcb5c132ae3efd51a04163244a43046663d2a",
171 | "signature": "1281c0f7e0d8e8bb28dd23808ccbcb5c132ae3efd51a04163244a43046663d2a",
172 | "affectsGlobalScope": false
173 | },
174 | "./node_modules/vscode-test/out/runtest.d.ts": {
175 | "version": "95e9a6fb8e050236e760fc57d845968998668a67a084e6c5911017660c0054ca",
176 | "signature": "95e9a6fb8e050236e760fc57d845968998668a67a084e6c5911017660c0054ca",
177 | "affectsGlobalScope": false
178 | },
179 | "./node_modules/@types/node/globals.d.ts": {
180 | "version": "74d61a149bea97a20b324410e4520796ffc36dcf35b54f03cfd0cfe922bb61cc",
181 | "signature": "74d61a149bea97a20b324410e4520796ffc36dcf35b54f03cfd0cfe922bb61cc",
182 | "affectsGlobalScope": true
183 | },
184 | "./node_modules/@types/node/async_hooks.d.ts": {
185 | "version": "22ee92839290a810fe7c20ae9a909fdaee2180e394fa5993c99300a585f60885",
186 | "signature": "22ee92839290a810fe7c20ae9a909fdaee2180e394fa5993c99300a585f60885",
187 | "affectsGlobalScope": false
188 | },
189 | "./node_modules/@types/node/buffer.d.ts": {
190 | "version": "e63d5487b6d47f8abcbfdc3af9450d56118041805dd043febd249af0502dc9b1",
191 | "signature": "e63d5487b6d47f8abcbfdc3af9450d56118041805dd043febd249af0502dc9b1",
192 | "affectsGlobalScope": false
193 | },
194 | "./node_modules/@types/node/child_process.d.ts": {
195 | "version": "5f505b075956d1c7db95d14e2e7a27d4e4a9d1ffc34b83b8273c51b074d575bd",
196 | "signature": "5f505b075956d1c7db95d14e2e7a27d4e4a9d1ffc34b83b8273c51b074d575bd",
197 | "affectsGlobalScope": false
198 | },
199 | "./node_modules/@types/node/cluster.d.ts": {
200 | "version": "458d55b08da524f900192dafb5837fcc2471cb59c0c149eea4754c180f943473",
201 | "signature": "458d55b08da524f900192dafb5837fcc2471cb59c0c149eea4754c180f943473",
202 | "affectsGlobalScope": false
203 | },
204 | "./node_modules/@types/node/console.d.ts": {
205 | "version": "65409a1cc0ce6d0e4bc9a4dfd35e7df27b8b2646c9055230fdbb03f694b0cc88",
206 | "signature": "65409a1cc0ce6d0e4bc9a4dfd35e7df27b8b2646c9055230fdbb03f694b0cc88",
207 | "affectsGlobalScope": false
208 | },
209 | "./node_modules/@types/node/constants.d.ts": {
210 | "version": "e9339a66a8c672260b9c6b727f6d818c42a8d13bade07dfaf907103928e3c456",
211 | "signature": "e9339a66a8c672260b9c6b727f6d818c42a8d13bade07dfaf907103928e3c456",
212 | "affectsGlobalScope": false
213 | },
214 | "./node_modules/@types/node/crypto.d.ts": {
215 | "version": "51d9197446e865a6919a2f217f4d0ad19f77483e5c7f2ebc520de4dc416dc5a3",
216 | "signature": "51d9197446e865a6919a2f217f4d0ad19f77483e5c7f2ebc520de4dc416dc5a3",
217 | "affectsGlobalScope": false
218 | },
219 | "./node_modules/@types/node/dgram.d.ts": {
220 | "version": "b39ae9f0d9d0bdcde86891b047ac912602a59fa188c1d2c4bc201fc7c86cfaa9",
221 | "signature": "b39ae9f0d9d0bdcde86891b047ac912602a59fa188c1d2c4bc201fc7c86cfaa9",
222 | "affectsGlobalScope": false
223 | },
224 | "./node_modules/@types/node/dns.d.ts": {
225 | "version": "f8a7a6d7af6267022984c5604ec31c4539fea5cb749e63ff3a0cf8a42fd19603",
226 | "signature": "f8a7a6d7af6267022984c5604ec31c4539fea5cb749e63ff3a0cf8a42fd19603",
227 | "affectsGlobalScope": false
228 | },
229 | "./node_modules/@types/node/domain.d.ts": {
230 | "version": "6570493ff2552919da1e6480f20d0b623b8007343a777922fca7788b6ce85ea1",
231 | "signature": "6570493ff2552919da1e6480f20d0b623b8007343a777922fca7788b6ce85ea1",
232 | "affectsGlobalScope": false
233 | },
234 | "./node_modules/@types/node/events.d.ts": {
235 | "version": "d42d0bfd355a4f9f247789676137aec627d0b23122452c388a6c1a83105ae811",
236 | "signature": "d42d0bfd355a4f9f247789676137aec627d0b23122452c388a6c1a83105ae811",
237 | "affectsGlobalScope": false
238 | },
239 | "./node_modules/@types/node/fs.d.ts": {
240 | "version": "5efce49fe6c5e6c7211f4cfb93724adc1cf5783c63d608dca8cb61bfcbee29e6",
241 | "signature": "5efce49fe6c5e6c7211f4cfb93724adc1cf5783c63d608dca8cb61bfcbee29e6",
242 | "affectsGlobalScope": false
243 | },
244 | "./node_modules/@types/node/http.d.ts": {
245 | "version": "444f395c911236782c542358dc1c06b3c00a2b64f1ea25ea2f75add0312b6dd8",
246 | "signature": "444f395c911236782c542358dc1c06b3c00a2b64f1ea25ea2f75add0312b6dd8",
247 | "affectsGlobalScope": false
248 | },
249 | "./node_modules/@types/node/http2.d.ts": {
250 | "version": "36602da01088f0ec8ba2faa6e298e2496340143de5384fbd9cb88927846352e8",
251 | "signature": "36602da01088f0ec8ba2faa6e298e2496340143de5384fbd9cb88927846352e8",
252 | "affectsGlobalScope": false
253 | },
254 | "./node_modules/@types/node/https.d.ts": {
255 | "version": "1939c52bd6e3fe0c5beacd7f5762f9847e86861059685fbdf471bd8afaf87944",
256 | "signature": "1939c52bd6e3fe0c5beacd7f5762f9847e86861059685fbdf471bd8afaf87944",
257 | "affectsGlobalScope": false
258 | },
259 | "./node_modules/@types/node/inspector.d.ts": {
260 | "version": "d4fa2c2de99b1f4ff83aba4732c33fff918bf5869c04674aa2bfe927adfbd386",
261 | "signature": "d4fa2c2de99b1f4ff83aba4732c33fff918bf5869c04674aa2bfe927adfbd386",
262 | "affectsGlobalScope": false
263 | },
264 | "./node_modules/@types/node/module.d.ts": {
265 | "version": "9cd5d57333119af9861227e2415a944d23ae7fa67706ac60a4c9a5cfde0a5a05",
266 | "signature": "9cd5d57333119af9861227e2415a944d23ae7fa67706ac60a4c9a5cfde0a5a05",
267 | "affectsGlobalScope": false
268 | },
269 | "./node_modules/@types/node/net.d.ts": {
270 | "version": "cf36f4557f363a203e39329aba07cc2f916ae181b4f71c61814db2e9ca6ca30c",
271 | "signature": "cf36f4557f363a203e39329aba07cc2f916ae181b4f71c61814db2e9ca6ca30c",
272 | "affectsGlobalScope": false
273 | },
274 | "./node_modules/@types/node/os.d.ts": {
275 | "version": "b0d1073a8fbdd7b36fd048d82b1f148ce161ed54569a4b4b43007733ee643fff",
276 | "signature": "b0d1073a8fbdd7b36fd048d82b1f148ce161ed54569a4b4b43007733ee643fff",
277 | "affectsGlobalScope": false
278 | },
279 | "./node_modules/@types/node/path.d.ts": {
280 | "version": "311f6a6b6c05d334c29eb795d765bfbb596bb43a78fcb72bc23a6121eefb3924",
281 | "signature": "311f6a6b6c05d334c29eb795d765bfbb596bb43a78fcb72bc23a6121eefb3924",
282 | "affectsGlobalScope": false
283 | },
284 | "./node_modules/@types/node/perf_hooks.d.ts": {
285 | "version": "b76f9cfe8fdfe10bb5ab1b540ea866771b89bb0e0acafbe119c9c8cbe398c092",
286 | "signature": "b76f9cfe8fdfe10bb5ab1b540ea866771b89bb0e0acafbe119c9c8cbe398c092",
287 | "affectsGlobalScope": false
288 | },
289 | "./node_modules/@types/node/process.d.ts": {
290 | "version": "7e56a8722b9aeae9496e1278539f1b7da4651614b487346e225beba1c7b29fb5",
291 | "signature": "7e56a8722b9aeae9496e1278539f1b7da4651614b487346e225beba1c7b29fb5",
292 | "affectsGlobalScope": true
293 | },
294 | "./node_modules/@types/node/punycode.d.ts": {
295 | "version": "a7b43c69f9602d198825e403ee34e5d64f83c48b391b2897e8c0e6f72bca35f8",
296 | "signature": "a7b43c69f9602d198825e403ee34e5d64f83c48b391b2897e8c0e6f72bca35f8",
297 | "affectsGlobalScope": false
298 | },
299 | "./node_modules/@types/node/querystring.d.ts": {
300 | "version": "c567c7d3038a689bd3274285c3a421eaabc3289d38e8441e686a91db97a3d663",
301 | "signature": "c567c7d3038a689bd3274285c3a421eaabc3289d38e8441e686a91db97a3d663",
302 | "affectsGlobalScope": false
303 | },
304 | "./node_modules/@types/node/readline.d.ts": {
305 | "version": "ae0784437911149dabe5cd245e5858305ebf2c30d44a80a037aa990b8500c5f3",
306 | "signature": "ae0784437911149dabe5cd245e5858305ebf2c30d44a80a037aa990b8500c5f3",
307 | "affectsGlobalScope": false
308 | },
309 | "./node_modules/@types/node/repl.d.ts": {
310 | "version": "133c3fe00db1cce01ae605753f88e29aa707c9a22c5f25c48d9d6e2ee6dab0c7",
311 | "signature": "133c3fe00db1cce01ae605753f88e29aa707c9a22c5f25c48d9d6e2ee6dab0c7",
312 | "affectsGlobalScope": false
313 | },
314 | "./node_modules/@types/node/stream.d.ts": {
315 | "version": "fe7b61b633d3c7ec4ebd8039f40e650adbe7ce872239de15da90d2452849c060",
316 | "signature": "fe7b61b633d3c7ec4ebd8039f40e650adbe7ce872239de15da90d2452849c060",
317 | "affectsGlobalScope": false
318 | },
319 | "./node_modules/@types/node/string_decoder.d.ts": {
320 | "version": "05af2a124f5a9113e7503539a3f1e1c72e92d9c756a2e5ad2e5afab11e0325d7",
321 | "signature": "05af2a124f5a9113e7503539a3f1e1c72e92d9c756a2e5ad2e5afab11e0325d7",
322 | "affectsGlobalScope": false
323 | },
324 | "./node_modules/@types/node/timers.d.ts": {
325 | "version": "2f9c94d2805d249de1ed836937ce1c62dd051bae445661e62ecf238b69893b29",
326 | "signature": "2f9c94d2805d249de1ed836937ce1c62dd051bae445661e62ecf238b69893b29",
327 | "affectsGlobalScope": false
328 | },
329 | "./node_modules/@types/node/tls.d.ts": {
330 | "version": "c1e031196368cb57b219684032865182384fcd3d60027783a42449f6e0a580d1",
331 | "signature": "c1e031196368cb57b219684032865182384fcd3d60027783a42449f6e0a580d1",
332 | "affectsGlobalScope": false
333 | },
334 | "./node_modules/@types/node/trace_events.d.ts": {
335 | "version": "0b7733d83619ac4e3963e2a9f7c75dc1e9af6850cb2354c9554977813092c10a",
336 | "signature": "0b7733d83619ac4e3963e2a9f7c75dc1e9af6850cb2354c9554977813092c10a",
337 | "affectsGlobalScope": false
338 | },
339 | "./node_modules/@types/node/tty.d.ts": {
340 | "version": "3ce933f0c3955f67f67eb7d6b5c83c2c54a18472c1d6f2bb651e51dd40c84837",
341 | "signature": "3ce933f0c3955f67f67eb7d6b5c83c2c54a18472c1d6f2bb651e51dd40c84837",
342 | "affectsGlobalScope": false
343 | },
344 | "./node_modules/@types/node/url.d.ts": {
345 | "version": "911690e5b1cdb5516785d9f811b5f9679fae1a2a1df5fad1f001e8d167c7fd98",
346 | "signature": "911690e5b1cdb5516785d9f811b5f9679fae1a2a1df5fad1f001e8d167c7fd98",
347 | "affectsGlobalScope": false
348 | },
349 | "./node_modules/@types/node/util.d.ts": {
350 | "version": "bd180a2d4ada8a0e92ad33333933e2c96646ea94837bf80f68ec7f95e79b5e12",
351 | "signature": "bd180a2d4ada8a0e92ad33333933e2c96646ea94837bf80f68ec7f95e79b5e12",
352 | "affectsGlobalScope": false
353 | },
354 | "./node_modules/@types/node/v8.d.ts": {
355 | "version": "121cfafda904699b1abc90b7894128a78692a877380d70a9eca2e2b79207076a",
356 | "signature": "121cfafda904699b1abc90b7894128a78692a877380d70a9eca2e2b79207076a",
357 | "affectsGlobalScope": false
358 | },
359 | "./node_modules/@types/node/vm.d.ts": {
360 | "version": "8ef3d66d40dd2b5332b4e84bf591219a04d41a7fdb5237d470f7b2002557e427",
361 | "signature": "8ef3d66d40dd2b5332b4e84bf591219a04d41a7fdb5237d470f7b2002557e427",
362 | "affectsGlobalScope": false
363 | },
364 | "./node_modules/@types/node/worker_threads.d.ts": {
365 | "version": "e959c2855e83468c9b9f2bb73860f718dd80cc82a6d9b8793b81dedf7b1aa249",
366 | "signature": "e959c2855e83468c9b9f2bb73860f718dd80cc82a6d9b8793b81dedf7b1aa249",
367 | "affectsGlobalScope": false
368 | },
369 | "./node_modules/@types/node/zlib.d.ts": {
370 | "version": "ce67e3dcf0f09888d0059fc61017ea22a7e5ac9112c727159fbff7937498e8dd",
371 | "signature": "ce67e3dcf0f09888d0059fc61017ea22a7e5ac9112c727159fbff7937498e8dd",
372 | "affectsGlobalScope": false
373 | },
374 | "./node_modules/@types/node/ts3.4/base.d.ts": {
375 | "version": "067b1964df87a4fc98ebffbd2bada6d7ed14a5b032f9071ea39478d82e701a99",
376 | "signature": "067b1964df87a4fc98ebffbd2bada6d7ed14a5b032f9071ea39478d82e701a99",
377 | "affectsGlobalScope": false
378 | },
379 | "./node_modules/@types/node/globals.global.d.ts": {
380 | "version": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1",
381 | "signature": "2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1",
382 | "affectsGlobalScope": true
383 | },
384 | "./node_modules/@types/node/wasi.d.ts": {
385 | "version": "2580346168c485710cca0ae724e081c715dafaba9ee1f735aceecc2432427027",
386 | "signature": "2580346168c485710cca0ae724e081c715dafaba9ee1f735aceecc2432427027",
387 | "affectsGlobalScope": false
388 | },
389 | "./node_modules/@types/node/ts3.6/base.d.ts": {
390 | "version": "8300cfa9e51f601acc2ac1e95bb079375e2ffc0a0e334e81bf4bbdeb7a5932ff",
391 | "signature": "8300cfa9e51f601acc2ac1e95bb079375e2ffc0a0e334e81bf4bbdeb7a5932ff",
392 | "affectsGlobalScope": false
393 | },
394 | "./node_modules/@types/node/assert.d.ts": {
395 | "version": "8ea1394bb5549f22e31c1896fb14d943185b72b14db2f39c8fc00e64e8b67361",
396 | "signature": "8ea1394bb5549f22e31c1896fb14d943185b72b14db2f39c8fc00e64e8b67361",
397 | "affectsGlobalScope": false
398 | },
399 | "./node_modules/@types/node/base.d.ts": {
400 | "version": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b",
401 | "signature": "e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b",
402 | "affectsGlobalScope": false
403 | },
404 | "./node_modules/@types/node/index.d.ts": {
405 | "version": "23dca7e2d421cdf16f12144497b3da31302dfbe88d648eff16bf37944483f3bd",
406 | "signature": "23dca7e2d421cdf16f12144497b3da31302dfbe88d648eff16bf37944483f3bd",
407 | "affectsGlobalScope": false
408 | },
409 | "./node_modules/vscode-test/out/util.d.ts": {
410 | "version": "a9245dcecee566ef4e5655449042092e7c53b41d3a041d741d1cef537b592df6",
411 | "signature": "a9245dcecee566ef4e5655449042092e7c53b41d3a041d741d1cef537b592df6",
412 | "affectsGlobalScope": false
413 | },
414 | "./node_modules/vscode-test/out/index.d.ts": {
415 | "version": "862ce526f7857b819561f942d55022e9515ec0d7d1fcb21453fe94fbe401ee58",
416 | "signature": "862ce526f7857b819561f942d55022e9515ec0d7d1fcb21453fe94fbe401ee58",
417 | "affectsGlobalScope": false
418 | },
419 | "./src/test/runtest.ts": {
420 | "version": "92bd1d7938825ed315183d445111581fadf48405d121a8862fb501b3a7c0cf08",
421 | "signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
422 | "affectsGlobalScope": false
423 | },
424 | "./src/test/suite/extension.test.ts": {
425 | "version": "01620e51ccb2919d33fdedb05ccc005a27d55ab92e107c894eda4edc1c781f88",
426 | "signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
427 | "affectsGlobalScope": false
428 | },
429 | "./node_modules/@types/mocha/index.d.ts": {
430 | "version": "d8cebc259915afa4b2c56b7efcb8056739ec65f4479c1b880ff668eb98654ae7",
431 | "signature": "d8cebc259915afa4b2c56b7efcb8056739ec65f4479c1b880ff668eb98654ae7",
432 | "affectsGlobalScope": true
433 | },
434 | "./node_modules/@types/minimatch/index.d.ts": {
435 | "version": "1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633",
436 | "signature": "1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633",
437 | "affectsGlobalScope": false
438 | },
439 | "./node_modules/@types/glob/index.d.ts": {
440 | "version": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0",
441 | "signature": "393137c76bd922ba70a2f8bf1ade4f59a16171a02fb25918c168d48875b0cfb0",
442 | "affectsGlobalScope": false
443 | },
444 | "./src/test/suite/index.ts": {
445 | "version": "303598a15f6d31dcc4e29c20702b085490dd039577d3ca2f7914d011d5c9d4f9",
446 | "signature": "c857342db333f0cc05bfe458928b17471d20fd715406aff3bc6d92572c78a374",
447 | "affectsGlobalScope": false
448 | },
449 | "./node_modules/@types/eslint/helpers.d.ts": {
450 | "version": "f345b0888d003fd69cb32bad3a0aa04c615ccafc572019e4bd86a52bd5e49e46",
451 | "signature": "f345b0888d003fd69cb32bad3a0aa04c615ccafc572019e4bd86a52bd5e49e46",
452 | "affectsGlobalScope": true
453 | },
454 | "./node_modules/@types/json-schema/index.d.ts": {
455 | "version": "3a1e165b22a1cb8df82c44c9a09502fd2b33f160cd277de2cd3a055d8e5c6b27",
456 | "signature": "3a1e165b22a1cb8df82c44c9a09502fd2b33f160cd277de2cd3a055d8e5c6b27",
457 | "affectsGlobalScope": false
458 | },
459 | "./node_modules/@types/estree/index.d.ts": {
460 | "version": "745a853d60bf782583a58584f59e202cae5c7a898b0c92696442602a3ef17a87",
461 | "signature": "745a853d60bf782583a58584f59e202cae5c7a898b0c92696442602a3ef17a87",
462 | "affectsGlobalScope": false
463 | },
464 | "./node_modules/@types/eslint/index.d.ts": {
465 | "version": "edb3e2f61a2a6e29a5f9043f73adf65951d52b4c1f22e84050381f7ef0d77318",
466 | "signature": "edb3e2f61a2a6e29a5f9043f73adf65951d52b4c1f22e84050381f7ef0d77318",
467 | "affectsGlobalScope": false
468 | },
469 | "./node_modules/@types/eslint-scope/index.d.ts": {
470 | "version": "274bda283ef15f4205603ca9967313fc013aa77ae89f2cbeab5fbd51439e96ed",
471 | "signature": "274bda283ef15f4205603ca9967313fc013aa77ae89f2cbeab5fbd51439e96ed",
472 | "affectsGlobalScope": false
473 | },
474 | "./node_modules/@types/prop-types/index.d.ts": {
475 | "version": "a7e32dcb90bf0c1b7a1e4ac89b0f7747cbcba25e7beddc1ebf17be1e161842ad",
476 | "signature": "a7e32dcb90bf0c1b7a1e4ac89b0f7747cbcba25e7beddc1ebf17be1e161842ad",
477 | "affectsGlobalScope": false
478 | },
479 | "./node_modules/@types/react/global.d.ts": {
480 | "version": "ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6",
481 | "signature": "ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6",
482 | "affectsGlobalScope": true
483 | },
484 | "./node_modules/csstype/index.d.ts": {
485 | "version": "0a6f28e1d77b99b0ef7da2f0bf50f301ea8a7eb7b4f573e458e725452a477bd2",
486 | "signature": "0a6f28e1d77b99b0ef7da2f0bf50f301ea8a7eb7b4f573e458e725452a477bd2",
487 | "affectsGlobalScope": false
488 | },
489 | "./node_modules/@types/react/index.d.ts": {
490 | "version": "9692a141afe8f30a5542189ffceb1a043f3d1fbaf0e07d28a8e9ac6d32c4cb01",
491 | "signature": "9692a141afe8f30a5542189ffceb1a043f3d1fbaf0e07d28a8e9ac6d32c4cb01",
492 | "affectsGlobalScope": true
493 | },
494 | "./node_modules/@types/react-dom/index.d.ts": {
495 | "version": "5e7837730e7ef63981cbd8d878388c4b37acc70dc3190881e230a23e3b4f9514",
496 | "signature": "5e7837730e7ef63981cbd8d878388c4b37acc70dc3190881e230a23e3b4f9514",
497 | "affectsGlobalScope": false
498 | }
499 | },
500 | "options": {
501 | "module": 1,
502 | "target": 2,
503 | "outDir": "./out",
504 | "lib": [
505 | "lib.es2015.d.ts",
506 | "lib.dom.d.ts"
507 | ],
508 | "sourceMap": true,
509 | "rootDir": "./src",
510 | "strict": true,
511 | "jsx": 2,
512 | "noUnusedLocals": true,
513 | "noImplicitReturns": true,
514 | "noFallthroughCasesInSwitch": true,
515 | "experimentalDecorators": true,
516 | "noImplicitThis": true,
517 | "noImplicitAny": true,
518 | "strictNullChecks": true,
519 | "skipLibCheck": true,
520 | "esModuleInterop": true,
521 | "allowSyntheticDefaultImports": true,
522 | "forceConsistentCasingInFileNames": true,
523 | "isolatedModules": true,
524 | "resolveJsonModule": true,
525 | "noEmit": true,
526 | "declaration": true,
527 | "noUnusedParameters": true,
528 | "incremental": true,
529 | "watch": true,
530 | "project": "./",
531 | "configFilePath": "./tsconfig.json"
532 | },
533 | "referencedMap": {
534 | "./node_modules/@types/eslint-scope/index.d.ts": [
535 | "./node_modules/@types/eslint/index.d.ts",
536 | "./node_modules/@types/estree/index.d.ts"
537 | ],
538 | "./node_modules/@types/eslint/index.d.ts": [
539 | "./node_modules/@types/eslint/helpers.d.ts",
540 | "./node_modules/@types/estree/index.d.ts",
541 | "./node_modules/@types/json-schema/index.d.ts"
542 | ],
543 | "./node_modules/@types/glob/index.d.ts": [
544 | "./node_modules/@types/minimatch/index.d.ts",
545 | "./node_modules/@types/node/events.d.ts",
546 | "./node_modules/@types/node/index.d.ts"
547 | ],
548 | "./node_modules/@types/node/assert.d.ts": [
549 | "./node_modules/@types/node/assert.d.ts"
550 | ],
551 | "./node_modules/@types/node/async_hooks.d.ts": [
552 | "./node_modules/@types/node/async_hooks.d.ts"
553 | ],
554 | "./node_modules/@types/node/base.d.ts": [
555 | "./node_modules/@types/node/assert.d.ts",
556 | "./node_modules/@types/node/ts3.6/base.d.ts"
557 | ],
558 | "./node_modules/@types/node/buffer.d.ts": [
559 | "./node_modules/@types/node/buffer.d.ts"
560 | ],
561 | "./node_modules/@types/node/child_process.d.ts": [
562 | "./node_modules/@types/node/child_process.d.ts",
563 | "./node_modules/@types/node/events.d.ts",
564 | "./node_modules/@types/node/net.d.ts",
565 | "./node_modules/@types/node/stream.d.ts"
566 | ],
567 | "./node_modules/@types/node/cluster.d.ts": [
568 | "./node_modules/@types/node/child_process.d.ts",
569 | "./node_modules/@types/node/cluster.d.ts",
570 | "./node_modules/@types/node/events.d.ts",
571 | "./node_modules/@types/node/net.d.ts"
572 | ],
573 | "./node_modules/@types/node/constants.d.ts": [
574 | "./node_modules/@types/node/constants.d.ts"
575 | ],
576 | "./node_modules/@types/node/crypto.d.ts": [
577 | "./node_modules/@types/node/crypto.d.ts",
578 | "./node_modules/@types/node/stream.d.ts"
579 | ],
580 | "./node_modules/@types/node/dgram.d.ts": [
581 | "./node_modules/@types/node/dgram.d.ts",
582 | "./node_modules/@types/node/dns.d.ts",
583 | "./node_modules/@types/node/events.d.ts",
584 | "./node_modules/@types/node/net.d.ts"
585 | ],
586 | "./node_modules/@types/node/dns.d.ts": [
587 | "./node_modules/@types/node/dns.d.ts"
588 | ],
589 | "./node_modules/@types/node/domain.d.ts": [
590 | "./node_modules/@types/node/domain.d.ts",
591 | "./node_modules/@types/node/events.d.ts"
592 | ],
593 | "./node_modules/@types/node/events.d.ts": [
594 | "./node_modules/@types/node/events.d.ts"
595 | ],
596 | "./node_modules/@types/node/fs.d.ts": [
597 | "./node_modules/@types/node/events.d.ts",
598 | "./node_modules/@types/node/fs.d.ts",
599 | "./node_modules/@types/node/stream.d.ts",
600 | "./node_modules/@types/node/url.d.ts"
601 | ],
602 | "./node_modules/@types/node/http.d.ts": [
603 | "./node_modules/@types/node/http.d.ts",
604 | "./node_modules/@types/node/net.d.ts",
605 | "./node_modules/@types/node/stream.d.ts",
606 | "./node_modules/@types/node/url.d.ts"
607 | ],
608 | "./node_modules/@types/node/http2.d.ts": [
609 | "./node_modules/@types/node/events.d.ts",
610 | "./node_modules/@types/node/fs.d.ts",
611 | "./node_modules/@types/node/http.d.ts",
612 | "./node_modules/@types/node/http2.d.ts",
613 | "./node_modules/@types/node/net.d.ts",
614 | "./node_modules/@types/node/stream.d.ts",
615 | "./node_modules/@types/node/tls.d.ts",
616 | "./node_modules/@types/node/url.d.ts"
617 | ],
618 | "./node_modules/@types/node/https.d.ts": [
619 | "./node_modules/@types/node/http.d.ts",
620 | "./node_modules/@types/node/https.d.ts",
621 | "./node_modules/@types/node/tls.d.ts",
622 | "./node_modules/@types/node/url.d.ts"
623 | ],
624 | "./node_modules/@types/node/index.d.ts": [
625 | "./node_modules/@types/node/base.d.ts"
626 | ],
627 | "./node_modules/@types/node/inspector.d.ts": [
628 | "./node_modules/@types/node/events.d.ts",
629 | "./node_modules/@types/node/inspector.d.ts"
630 | ],
631 | "./node_modules/@types/node/net.d.ts": [
632 | "./node_modules/@types/node/dns.d.ts",
633 | "./node_modules/@types/node/events.d.ts",
634 | "./node_modules/@types/node/net.d.ts",
635 | "./node_modules/@types/node/stream.d.ts"
636 | ],
637 | "./node_modules/@types/node/os.d.ts": [
638 | "./node_modules/@types/node/os.d.ts"
639 | ],
640 | "./node_modules/@types/node/path.d.ts": [
641 | "./node_modules/@types/node/path.d.ts"
642 | ],
643 | "./node_modules/@types/node/perf_hooks.d.ts": [
644 | "./node_modules/@types/node/async_hooks.d.ts",
645 | "./node_modules/@types/node/perf_hooks.d.ts"
646 | ],
647 | "./node_modules/@types/node/process.d.ts": [
648 | "./node_modules/@types/node/tty.d.ts"
649 | ],
650 | "./node_modules/@types/node/punycode.d.ts": [
651 | "./node_modules/@types/node/punycode.d.ts"
652 | ],
653 | "./node_modules/@types/node/querystring.d.ts": [
654 | "./node_modules/@types/node/querystring.d.ts"
655 | ],
656 | "./node_modules/@types/node/readline.d.ts": [
657 | "./node_modules/@types/node/events.d.ts",
658 | "./node_modules/@types/node/readline.d.ts"
659 | ],
660 | "./node_modules/@types/node/repl.d.ts": [
661 | "./node_modules/@types/node/readline.d.ts",
662 | "./node_modules/@types/node/repl.d.ts",
663 | "./node_modules/@types/node/util.d.ts",
664 | "./node_modules/@types/node/vm.d.ts"
665 | ],
666 | "./node_modules/@types/node/stream.d.ts": [
667 | "./node_modules/@types/node/events.d.ts",
668 | "./node_modules/@types/node/stream.d.ts"
669 | ],
670 | "./node_modules/@types/node/string_decoder.d.ts": [
671 | "./node_modules/@types/node/string_decoder.d.ts"
672 | ],
673 | "./node_modules/@types/node/timers.d.ts": [
674 | "./node_modules/@types/node/timers.d.ts"
675 | ],
676 | "./node_modules/@types/node/tls.d.ts": [
677 | "./node_modules/@types/node/net.d.ts",
678 | "./node_modules/@types/node/tls.d.ts"
679 | ],
680 | "./node_modules/@types/node/trace_events.d.ts": [
681 | "./node_modules/@types/node/trace_events.d.ts"
682 | ],
683 | "./node_modules/@types/node/ts3.4/base.d.ts": [
684 | "./node_modules/@types/node/async_hooks.d.ts",
685 | "./node_modules/@types/node/buffer.d.ts",
686 | "./node_modules/@types/node/child_process.d.ts",
687 | "./node_modules/@types/node/cluster.d.ts",
688 | "./node_modules/@types/node/console.d.ts",
689 | "./node_modules/@types/node/constants.d.ts",
690 | "./node_modules/@types/node/crypto.d.ts",
691 | "./node_modules/@types/node/dgram.d.ts",
692 | "./node_modules/@types/node/dns.d.ts",
693 | "./node_modules/@types/node/domain.d.ts",
694 | "./node_modules/@types/node/events.d.ts",
695 | "./node_modules/@types/node/fs.d.ts",
696 | "./node_modules/@types/node/globals.d.ts",
697 | "./node_modules/@types/node/http.d.ts",
698 | "./node_modules/@types/node/http2.d.ts",
699 | "./node_modules/@types/node/https.d.ts",
700 | "./node_modules/@types/node/inspector.d.ts",
701 | "./node_modules/@types/node/module.d.ts",
702 | "./node_modules/@types/node/net.d.ts",
703 | "./node_modules/@types/node/os.d.ts",
704 | "./node_modules/@types/node/path.d.ts",
705 | "./node_modules/@types/node/perf_hooks.d.ts",
706 | "./node_modules/@types/node/process.d.ts",
707 | "./node_modules/@types/node/punycode.d.ts",
708 | "./node_modules/@types/node/querystring.d.ts",
709 | "./node_modules/@types/node/readline.d.ts",
710 | "./node_modules/@types/node/repl.d.ts",
711 | "./node_modules/@types/node/stream.d.ts",
712 | "./node_modules/@types/node/string_decoder.d.ts",
713 | "./node_modules/@types/node/timers.d.ts",
714 | "./node_modules/@types/node/tls.d.ts",
715 | "./node_modules/@types/node/trace_events.d.ts",
716 | "./node_modules/@types/node/tty.d.ts",
717 | "./node_modules/@types/node/url.d.ts",
718 | "./node_modules/@types/node/util.d.ts",
719 | "./node_modules/@types/node/v8.d.ts",
720 | "./node_modules/@types/node/vm.d.ts",
721 | "./node_modules/@types/node/worker_threads.d.ts",
722 | "./node_modules/@types/node/zlib.d.ts"
723 | ],
724 | "./node_modules/@types/node/ts3.6/base.d.ts": [
725 | "./node_modules/@types/node/globals.global.d.ts",
726 | "./node_modules/@types/node/ts3.4/base.d.ts",
727 | "./node_modules/@types/node/wasi.d.ts"
728 | ],
729 | "./node_modules/@types/node/tty.d.ts": [
730 | "./node_modules/@types/node/net.d.ts",
731 | "./node_modules/@types/node/tty.d.ts"
732 | ],
733 | "./node_modules/@types/node/url.d.ts": [
734 | "./node_modules/@types/node/querystring.d.ts",
735 | "./node_modules/@types/node/url.d.ts"
736 | ],
737 | "./node_modules/@types/node/util.d.ts": [
738 | "./node_modules/@types/node/util.d.ts"
739 | ],
740 | "./node_modules/@types/node/v8.d.ts": [
741 | "./node_modules/@types/node/stream.d.ts",
742 | "./node_modules/@types/node/v8.d.ts"
743 | ],
744 | "./node_modules/@types/node/vm.d.ts": [
745 | "./node_modules/@types/node/vm.d.ts"
746 | ],
747 | "./node_modules/@types/node/wasi.d.ts": [
748 | "./node_modules/@types/node/wasi.d.ts"
749 | ],
750 | "./node_modules/@types/node/worker_threads.d.ts": [
751 | "./node_modules/@types/node/events.d.ts",
752 | "./node_modules/@types/node/fs.d.ts",
753 | "./node_modules/@types/node/stream.d.ts",
754 | "./node_modules/@types/node/vm.d.ts",
755 | "./node_modules/@types/node/worker_threads.d.ts"
756 | ],
757 | "./node_modules/@types/node/zlib.d.ts": [
758 | "./node_modules/@types/node/stream.d.ts",
759 | "./node_modules/@types/node/zlib.d.ts"
760 | ],
761 | "./node_modules/@types/react-dom/index.d.ts": [
762 | "./node_modules/@types/react/index.d.ts"
763 | ],
764 | "./node_modules/@types/react/index.d.ts": [
765 | "./node_modules/@types/prop-types/index.d.ts",
766 | "./node_modules/@types/react/global.d.ts",
767 | "./node_modules/csstype/index.d.ts"
768 | ],
769 | "./node_modules/vscode-test/out/index.d.ts": [
770 | "./node_modules/vscode-test/out/download.d.ts",
771 | "./node_modules/vscode-test/out/runtest.d.ts",
772 | "./node_modules/vscode-test/out/util.d.ts"
773 | ],
774 | "./node_modules/vscode-test/out/runtest.d.ts": [
775 | "./node_modules/vscode-test/out/download.d.ts"
776 | ],
777 | "./node_modules/vscode-test/out/util.d.ts": [
778 | "./node_modules/@types/node/https.d.ts",
779 | "./node_modules/@types/node/index.d.ts",
780 | "./node_modules/vscode-test/out/download.d.ts"
781 | ],
782 | "./src/extension.ts": [
783 | "./node_modules/@types/vscode/index.d.ts",
784 | "./src/lib.ts"
785 | ],
786 | "./src/lib.ts": [
787 | "./node_modules/@types/node/path.d.ts",
788 | "./node_modules/@types/svg-parser/index.d.ts",
789 | "./node_modules/@types/vscode/index.d.ts",
790 | "./src/consts.ts"
791 | ],
792 | "./src/test/runtest.ts": [
793 | "./node_modules/@types/node/path.d.ts",
794 | "./node_modules/vscode-test/out/index.d.ts"
795 | ],
796 | "./src/test/suite/extension.test.ts": [
797 | "./node_modules/@types/node/assert.d.ts",
798 | "./node_modules/@types/vscode/index.d.ts"
799 | ],
800 | "./src/test/suite/index.ts": [
801 | "./node_modules/@types/glob/index.d.ts",
802 | "./node_modules/@types/mocha/index.d.ts",
803 | "./node_modules/@types/node/path.d.ts"
804 | ]
805 | },
806 | "exportedModulesMap": {
807 | "./node_modules/@types/eslint-scope/index.d.ts": [
808 | "./node_modules/@types/eslint/index.d.ts",
809 | "./node_modules/@types/estree/index.d.ts"
810 | ],
811 | "./node_modules/@types/eslint/index.d.ts": [
812 | "./node_modules/@types/eslint/helpers.d.ts",
813 | "./node_modules/@types/estree/index.d.ts",
814 | "./node_modules/@types/json-schema/index.d.ts"
815 | ],
816 | "./node_modules/@types/glob/index.d.ts": [
817 | "./node_modules/@types/minimatch/index.d.ts",
818 | "./node_modules/@types/node/events.d.ts",
819 | "./node_modules/@types/node/index.d.ts"
820 | ],
821 | "./node_modules/@types/node/assert.d.ts": [
822 | "./node_modules/@types/node/assert.d.ts"
823 | ],
824 | "./node_modules/@types/node/async_hooks.d.ts": [
825 | "./node_modules/@types/node/async_hooks.d.ts"
826 | ],
827 | "./node_modules/@types/node/base.d.ts": [
828 | "./node_modules/@types/node/assert.d.ts",
829 | "./node_modules/@types/node/ts3.6/base.d.ts"
830 | ],
831 | "./node_modules/@types/node/buffer.d.ts": [
832 | "./node_modules/@types/node/buffer.d.ts"
833 | ],
834 | "./node_modules/@types/node/child_process.d.ts": [
835 | "./node_modules/@types/node/child_process.d.ts",
836 | "./node_modules/@types/node/events.d.ts",
837 | "./node_modules/@types/node/net.d.ts",
838 | "./node_modules/@types/node/stream.d.ts"
839 | ],
840 | "./node_modules/@types/node/cluster.d.ts": [
841 | "./node_modules/@types/node/child_process.d.ts",
842 | "./node_modules/@types/node/cluster.d.ts",
843 | "./node_modules/@types/node/events.d.ts",
844 | "./node_modules/@types/node/net.d.ts"
845 | ],
846 | "./node_modules/@types/node/constants.d.ts": [
847 | "./node_modules/@types/node/constants.d.ts"
848 | ],
849 | "./node_modules/@types/node/crypto.d.ts": [
850 | "./node_modules/@types/node/crypto.d.ts",
851 | "./node_modules/@types/node/stream.d.ts"
852 | ],
853 | "./node_modules/@types/node/dgram.d.ts": [
854 | "./node_modules/@types/node/dgram.d.ts",
855 | "./node_modules/@types/node/dns.d.ts",
856 | "./node_modules/@types/node/events.d.ts",
857 | "./node_modules/@types/node/net.d.ts"
858 | ],
859 | "./node_modules/@types/node/dns.d.ts": [
860 | "./node_modules/@types/node/dns.d.ts"
861 | ],
862 | "./node_modules/@types/node/domain.d.ts": [
863 | "./node_modules/@types/node/domain.d.ts",
864 | "./node_modules/@types/node/events.d.ts"
865 | ],
866 | "./node_modules/@types/node/events.d.ts": [
867 | "./node_modules/@types/node/events.d.ts"
868 | ],
869 | "./node_modules/@types/node/fs.d.ts": [
870 | "./node_modules/@types/node/events.d.ts",
871 | "./node_modules/@types/node/fs.d.ts",
872 | "./node_modules/@types/node/stream.d.ts",
873 | "./node_modules/@types/node/url.d.ts"
874 | ],
875 | "./node_modules/@types/node/http.d.ts": [
876 | "./node_modules/@types/node/http.d.ts",
877 | "./node_modules/@types/node/net.d.ts",
878 | "./node_modules/@types/node/stream.d.ts",
879 | "./node_modules/@types/node/url.d.ts"
880 | ],
881 | "./node_modules/@types/node/http2.d.ts": [
882 | "./node_modules/@types/node/events.d.ts",
883 | "./node_modules/@types/node/fs.d.ts",
884 | "./node_modules/@types/node/http.d.ts",
885 | "./node_modules/@types/node/http2.d.ts",
886 | "./node_modules/@types/node/net.d.ts",
887 | "./node_modules/@types/node/stream.d.ts",
888 | "./node_modules/@types/node/tls.d.ts",
889 | "./node_modules/@types/node/url.d.ts"
890 | ],
891 | "./node_modules/@types/node/https.d.ts": [
892 | "./node_modules/@types/node/http.d.ts",
893 | "./node_modules/@types/node/https.d.ts",
894 | "./node_modules/@types/node/tls.d.ts",
895 | "./node_modules/@types/node/url.d.ts"
896 | ],
897 | "./node_modules/@types/node/index.d.ts": [
898 | "./node_modules/@types/node/base.d.ts"
899 | ],
900 | "./node_modules/@types/node/inspector.d.ts": [
901 | "./node_modules/@types/node/events.d.ts",
902 | "./node_modules/@types/node/inspector.d.ts"
903 | ],
904 | "./node_modules/@types/node/net.d.ts": [
905 | "./node_modules/@types/node/dns.d.ts",
906 | "./node_modules/@types/node/events.d.ts",
907 | "./node_modules/@types/node/net.d.ts",
908 | "./node_modules/@types/node/stream.d.ts"
909 | ],
910 | "./node_modules/@types/node/os.d.ts": [
911 | "./node_modules/@types/node/os.d.ts"
912 | ],
913 | "./node_modules/@types/node/path.d.ts": [
914 | "./node_modules/@types/node/path.d.ts"
915 | ],
916 | "./node_modules/@types/node/perf_hooks.d.ts": [
917 | "./node_modules/@types/node/async_hooks.d.ts",
918 | "./node_modules/@types/node/perf_hooks.d.ts"
919 | ],
920 | "./node_modules/@types/node/process.d.ts": [
921 | "./node_modules/@types/node/tty.d.ts"
922 | ],
923 | "./node_modules/@types/node/punycode.d.ts": [
924 | "./node_modules/@types/node/punycode.d.ts"
925 | ],
926 | "./node_modules/@types/node/querystring.d.ts": [
927 | "./node_modules/@types/node/querystring.d.ts"
928 | ],
929 | "./node_modules/@types/node/readline.d.ts": [
930 | "./node_modules/@types/node/events.d.ts",
931 | "./node_modules/@types/node/readline.d.ts"
932 | ],
933 | "./node_modules/@types/node/repl.d.ts": [
934 | "./node_modules/@types/node/readline.d.ts",
935 | "./node_modules/@types/node/repl.d.ts",
936 | "./node_modules/@types/node/util.d.ts",
937 | "./node_modules/@types/node/vm.d.ts"
938 | ],
939 | "./node_modules/@types/node/stream.d.ts": [
940 | "./node_modules/@types/node/events.d.ts",
941 | "./node_modules/@types/node/stream.d.ts"
942 | ],
943 | "./node_modules/@types/node/string_decoder.d.ts": [
944 | "./node_modules/@types/node/string_decoder.d.ts"
945 | ],
946 | "./node_modules/@types/node/timers.d.ts": [
947 | "./node_modules/@types/node/timers.d.ts"
948 | ],
949 | "./node_modules/@types/node/tls.d.ts": [
950 | "./node_modules/@types/node/net.d.ts",
951 | "./node_modules/@types/node/tls.d.ts"
952 | ],
953 | "./node_modules/@types/node/trace_events.d.ts": [
954 | "./node_modules/@types/node/trace_events.d.ts"
955 | ],
956 | "./node_modules/@types/node/ts3.4/base.d.ts": [
957 | "./node_modules/@types/node/async_hooks.d.ts",
958 | "./node_modules/@types/node/buffer.d.ts",
959 | "./node_modules/@types/node/child_process.d.ts",
960 | "./node_modules/@types/node/cluster.d.ts",
961 | "./node_modules/@types/node/console.d.ts",
962 | "./node_modules/@types/node/constants.d.ts",
963 | "./node_modules/@types/node/crypto.d.ts",
964 | "./node_modules/@types/node/dgram.d.ts",
965 | "./node_modules/@types/node/dns.d.ts",
966 | "./node_modules/@types/node/domain.d.ts",
967 | "./node_modules/@types/node/events.d.ts",
968 | "./node_modules/@types/node/fs.d.ts",
969 | "./node_modules/@types/node/globals.d.ts",
970 | "./node_modules/@types/node/http.d.ts",
971 | "./node_modules/@types/node/http2.d.ts",
972 | "./node_modules/@types/node/https.d.ts",
973 | "./node_modules/@types/node/inspector.d.ts",
974 | "./node_modules/@types/node/module.d.ts",
975 | "./node_modules/@types/node/net.d.ts",
976 | "./node_modules/@types/node/os.d.ts",
977 | "./node_modules/@types/node/path.d.ts",
978 | "./node_modules/@types/node/perf_hooks.d.ts",
979 | "./node_modules/@types/node/process.d.ts",
980 | "./node_modules/@types/node/punycode.d.ts",
981 | "./node_modules/@types/node/querystring.d.ts",
982 | "./node_modules/@types/node/readline.d.ts",
983 | "./node_modules/@types/node/repl.d.ts",
984 | "./node_modules/@types/node/stream.d.ts",
985 | "./node_modules/@types/node/string_decoder.d.ts",
986 | "./node_modules/@types/node/timers.d.ts",
987 | "./node_modules/@types/node/tls.d.ts",
988 | "./node_modules/@types/node/trace_events.d.ts",
989 | "./node_modules/@types/node/tty.d.ts",
990 | "./node_modules/@types/node/url.d.ts",
991 | "./node_modules/@types/node/util.d.ts",
992 | "./node_modules/@types/node/v8.d.ts",
993 | "./node_modules/@types/node/vm.d.ts",
994 | "./node_modules/@types/node/worker_threads.d.ts",
995 | "./node_modules/@types/node/zlib.d.ts"
996 | ],
997 | "./node_modules/@types/node/ts3.6/base.d.ts": [
998 | "./node_modules/@types/node/globals.global.d.ts",
999 | "./node_modules/@types/node/ts3.4/base.d.ts",
1000 | "./node_modules/@types/node/wasi.d.ts"
1001 | ],
1002 | "./node_modules/@types/node/tty.d.ts": [
1003 | "./node_modules/@types/node/net.d.ts",
1004 | "./node_modules/@types/node/tty.d.ts"
1005 | ],
1006 | "./node_modules/@types/node/url.d.ts": [
1007 | "./node_modules/@types/node/querystring.d.ts",
1008 | "./node_modules/@types/node/url.d.ts"
1009 | ],
1010 | "./node_modules/@types/node/util.d.ts": [
1011 | "./node_modules/@types/node/util.d.ts"
1012 | ],
1013 | "./node_modules/@types/node/v8.d.ts": [
1014 | "./node_modules/@types/node/stream.d.ts",
1015 | "./node_modules/@types/node/v8.d.ts"
1016 | ],
1017 | "./node_modules/@types/node/vm.d.ts": [
1018 | "./node_modules/@types/node/vm.d.ts"
1019 | ],
1020 | "./node_modules/@types/node/wasi.d.ts": [
1021 | "./node_modules/@types/node/wasi.d.ts"
1022 | ],
1023 | "./node_modules/@types/node/worker_threads.d.ts": [
1024 | "./node_modules/@types/node/events.d.ts",
1025 | "./node_modules/@types/node/fs.d.ts",
1026 | "./node_modules/@types/node/stream.d.ts",
1027 | "./node_modules/@types/node/vm.d.ts",
1028 | "./node_modules/@types/node/worker_threads.d.ts"
1029 | ],
1030 | "./node_modules/@types/node/zlib.d.ts": [
1031 | "./node_modules/@types/node/stream.d.ts",
1032 | "./node_modules/@types/node/zlib.d.ts"
1033 | ],
1034 | "./node_modules/@types/react-dom/index.d.ts": [
1035 | "./node_modules/@types/react/index.d.ts"
1036 | ],
1037 | "./node_modules/@types/react/index.d.ts": [
1038 | "./node_modules/@types/prop-types/index.d.ts",
1039 | "./node_modules/@types/react/global.d.ts",
1040 | "./node_modules/csstype/index.d.ts"
1041 | ],
1042 | "./node_modules/vscode-test/out/index.d.ts": [
1043 | "./node_modules/vscode-test/out/download.d.ts",
1044 | "./node_modules/vscode-test/out/runtest.d.ts",
1045 | "./node_modules/vscode-test/out/util.d.ts"
1046 | ],
1047 | "./node_modules/vscode-test/out/runtest.d.ts": [
1048 | "./node_modules/vscode-test/out/download.d.ts"
1049 | ],
1050 | "./node_modules/vscode-test/out/util.d.ts": [
1051 | "./node_modules/@types/node/https.d.ts",
1052 | "./node_modules/@types/node/index.d.ts",
1053 | "./node_modules/vscode-test/out/download.d.ts"
1054 | ],
1055 | "./src/extension.ts": [
1056 | "./node_modules/@types/vscode/index.d.ts"
1057 | ],
1058 | "./src/lib.ts": [
1059 | "./node_modules/@types/vscode/index.d.ts"
1060 | ]
1061 | },
1062 | "semanticDiagnosticsPerFile": [
1063 | "./node_modules/@types/eslint-scope/index.d.ts",
1064 | "./node_modules/@types/eslint/helpers.d.ts",
1065 | "./node_modules/@types/eslint/index.d.ts",
1066 | "./node_modules/@types/estree/index.d.ts",
1067 | "./node_modules/@types/glob/index.d.ts",
1068 | "./node_modules/@types/json-schema/index.d.ts",
1069 | "./node_modules/@types/minimatch/index.d.ts",
1070 | "./node_modules/@types/mocha/index.d.ts",
1071 | "./node_modules/@types/node/assert.d.ts",
1072 | "./node_modules/@types/node/async_hooks.d.ts",
1073 | "./node_modules/@types/node/base.d.ts",
1074 | "./node_modules/@types/node/buffer.d.ts",
1075 | "./node_modules/@types/node/child_process.d.ts",
1076 | "./node_modules/@types/node/cluster.d.ts",
1077 | "./node_modules/@types/node/console.d.ts",
1078 | "./node_modules/@types/node/constants.d.ts",
1079 | "./node_modules/@types/node/crypto.d.ts",
1080 | "./node_modules/@types/node/dgram.d.ts",
1081 | "./node_modules/@types/node/dns.d.ts",
1082 | "./node_modules/@types/node/domain.d.ts",
1083 | "./node_modules/@types/node/events.d.ts",
1084 | "./node_modules/@types/node/fs.d.ts",
1085 | "./node_modules/@types/node/globals.d.ts",
1086 | "./node_modules/@types/node/globals.global.d.ts",
1087 | "./node_modules/@types/node/http.d.ts",
1088 | "./node_modules/@types/node/http2.d.ts",
1089 | "./node_modules/@types/node/https.d.ts",
1090 | "./node_modules/@types/node/index.d.ts",
1091 | "./node_modules/@types/node/inspector.d.ts",
1092 | "./node_modules/@types/node/module.d.ts",
1093 | "./node_modules/@types/node/net.d.ts",
1094 | "./node_modules/@types/node/os.d.ts",
1095 | "./node_modules/@types/node/path.d.ts",
1096 | "./node_modules/@types/node/perf_hooks.d.ts",
1097 | "./node_modules/@types/node/process.d.ts",
1098 | "./node_modules/@types/node/punycode.d.ts",
1099 | "./node_modules/@types/node/querystring.d.ts",
1100 | "./node_modules/@types/node/readline.d.ts",
1101 | "./node_modules/@types/node/repl.d.ts",
1102 | "./node_modules/@types/node/stream.d.ts",
1103 | "./node_modules/@types/node/string_decoder.d.ts",
1104 | "./node_modules/@types/node/timers.d.ts",
1105 | "./node_modules/@types/node/tls.d.ts",
1106 | "./node_modules/@types/node/trace_events.d.ts",
1107 | "./node_modules/@types/node/ts3.4/base.d.ts",
1108 | "./node_modules/@types/node/ts3.6/base.d.ts",
1109 | "./node_modules/@types/node/tty.d.ts",
1110 | "./node_modules/@types/node/url.d.ts",
1111 | "./node_modules/@types/node/util.d.ts",
1112 | "./node_modules/@types/node/v8.d.ts",
1113 | "./node_modules/@types/node/vm.d.ts",
1114 | "./node_modules/@types/node/wasi.d.ts",
1115 | "./node_modules/@types/node/worker_threads.d.ts",
1116 | "./node_modules/@types/node/zlib.d.ts",
1117 | "./node_modules/@types/prop-types/index.d.ts",
1118 | "./node_modules/@types/react-dom/index.d.ts",
1119 | "./node_modules/@types/react/global.d.ts",
1120 | "./node_modules/@types/react/index.d.ts",
1121 | "./node_modules/@types/svg-parser/index.d.ts",
1122 | "./node_modules/@types/vscode/index.d.ts",
1123 | "./node_modules/csstype/index.d.ts",
1124 | "./node_modules/typescript/lib/lib.dom.d.ts",
1125 | "./node_modules/typescript/lib/lib.es2015.collection.d.ts",
1126 | "./node_modules/typescript/lib/lib.es2015.core.d.ts",
1127 | "./node_modules/typescript/lib/lib.es2015.d.ts",
1128 | "./node_modules/typescript/lib/lib.es2015.generator.d.ts",
1129 | "./node_modules/typescript/lib/lib.es2015.iterable.d.ts",
1130 | "./node_modules/typescript/lib/lib.es2015.promise.d.ts",
1131 | "./node_modules/typescript/lib/lib.es2015.proxy.d.ts",
1132 | "./node_modules/typescript/lib/lib.es2015.reflect.d.ts",
1133 | "./node_modules/typescript/lib/lib.es2015.symbol.d.ts",
1134 | "./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts",
1135 | "./node_modules/typescript/lib/lib.es2016.array.include.d.ts",
1136 | "./node_modules/typescript/lib/lib.es2016.d.ts",
1137 | "./node_modules/typescript/lib/lib.es2017.d.ts",
1138 | "./node_modules/typescript/lib/lib.es2017.intl.d.ts",
1139 | "./node_modules/typescript/lib/lib.es2017.object.d.ts",
1140 | "./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts",
1141 | "./node_modules/typescript/lib/lib.es2017.string.d.ts",
1142 | "./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts",
1143 | "./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts",
1144 | "./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts",
1145 | "./node_modules/typescript/lib/lib.es2018.d.ts",
1146 | "./node_modules/typescript/lib/lib.es2018.intl.d.ts",
1147 | "./node_modules/typescript/lib/lib.es2018.promise.d.ts",
1148 | "./node_modules/typescript/lib/lib.es2018.regexp.d.ts",
1149 | "./node_modules/typescript/lib/lib.es2020.bigint.d.ts",
1150 | "./node_modules/typescript/lib/lib.es5.d.ts",
1151 | "./node_modules/typescript/lib/lib.esnext.intl.d.ts",
1152 | "./node_modules/vscode-test/out/download.d.ts",
1153 | "./node_modules/vscode-test/out/index.d.ts",
1154 | "./node_modules/vscode-test/out/runtest.d.ts",
1155 | "./node_modules/vscode-test/out/util.d.ts",
1156 | "./src/consts.ts",
1157 | "./src/extension.ts",
1158 | "./src/lib.ts",
1159 | "./src/test/runtest.ts",
1160 | "./src/test/suite/extension.test.ts",
1161 | [
1162 | "./src/test/suite/index.ts",
1163 | [
1164 | {
1165 | "file": "./src/test/suite/index.ts",
1166 | "start": 177,
1167 | "length": 5,
1168 | "code": 2351,
1169 | "category": 1,
1170 | "messageText": {
1171 | "messageText": "This expression is not constructable.",
1172 | "category": 1,
1173 | "code": 2351,
1174 | "next": [
1175 | {
1176 | "messageText": "Type 'typeof Mocha' has no construct signatures.",
1177 | "category": 1,
1178 | "code": 2761
1179 | }
1180 | ]
1181 | },
1182 | "relatedInformation": [
1183 | {
1184 | "file": "./src/test/suite/index.ts",
1185 | "start": 30,
1186 | "length": 31,
1187 | "messageText": "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.",
1188 | "category": 3,
1189 | "code": 7038
1190 | }
1191 | ]
1192 | },
1193 | {
1194 | "file": "./src/test/suite/index.ts",
1195 | "start": 303,
1196 | "length": 4,
1197 | "code": 2349,
1198 | "category": 1,
1199 | "messageText": {
1200 | "messageText": "This expression is not callable.",
1201 | "category": 1,
1202 | "code": 2349,
1203 | "next": [
1204 | {
1205 | "messageText": "Type 'typeof G' has no call signatures.",
1206 | "category": 1,
1207 | "code": 2757
1208 | }
1209 | ]
1210 | },
1211 | "relatedInformation": [
1212 | {
1213 | "file": "./src/test/suite/index.ts",
1214 | "start": 62,
1215 | "length": 29,
1216 | "messageText": "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.",
1217 | "category": 3,
1218 | "code": 7038
1219 | }
1220 | ]
1221 | },
1222 | {
1223 | "file": "./src/test/suite/index.ts",
1224 | "start": 346,
1225 | "length": 3,
1226 | "messageText": "Parameter 'err' implicitly has an 'any' type.",
1227 | "category": 1,
1228 | "code": 7006
1229 | },
1230 | {
1231 | "file": "./src/test/suite/index.ts",
1232 | "start": 351,
1233 | "length": 5,
1234 | "messageText": "Parameter 'files' implicitly has an 'any' type.",
1235 | "category": 1,
1236 | "code": 7006
1237 | },
1238 | {
1239 | "file": "./src/test/suite/index.ts",
1240 | "start": 453,
1241 | "length": 1,
1242 | "messageText": "Parameter 'f' implicitly has an 'any' type.",
1243 | "category": 1,
1244 | "code": 7006
1245 | },
1246 | {
1247 | "file": "./src/test/suite/index.ts",
1248 | "start": 552,
1249 | "length": 8,
1250 | "messageText": "Parameter 'failures' implicitly has an 'any' type.",
1251 | "category": 1,
1252 | "code": 7006
1253 | }
1254 | ]
1255 | ]
1256 | ],
1257 | "affectedFilesPendingEmit": [
1258 | [
1259 | "./node_modules/@types/eslint-scope/index.d.ts",
1260 | 1
1261 | ],
1262 | [
1263 | "./node_modules/@types/eslint/helpers.d.ts",
1264 | 1
1265 | ],
1266 | [
1267 | "./node_modules/@types/eslint/index.d.ts",
1268 | 1
1269 | ],
1270 | [
1271 | "./node_modules/@types/estree/index.d.ts",
1272 | 1
1273 | ],
1274 | [
1275 | "./node_modules/@types/glob/index.d.ts",
1276 | 1
1277 | ],
1278 | [
1279 | "./node_modules/@types/json-schema/index.d.ts",
1280 | 1
1281 | ],
1282 | [
1283 | "./node_modules/@types/minimatch/index.d.ts",
1284 | 1
1285 | ],
1286 | [
1287 | "./node_modules/@types/mocha/index.d.ts",
1288 | 1
1289 | ],
1290 | [
1291 | "./node_modules/@types/node/assert.d.ts",
1292 | 1
1293 | ],
1294 | [
1295 | "./node_modules/@types/node/async_hooks.d.ts",
1296 | 1
1297 | ],
1298 | [
1299 | "./node_modules/@types/node/base.d.ts",
1300 | 1
1301 | ],
1302 | [
1303 | "./node_modules/@types/node/buffer.d.ts",
1304 | 1
1305 | ],
1306 | [
1307 | "./node_modules/@types/node/child_process.d.ts",
1308 | 1
1309 | ],
1310 | [
1311 | "./node_modules/@types/node/cluster.d.ts",
1312 | 1
1313 | ],
1314 | [
1315 | "./node_modules/@types/node/console.d.ts",
1316 | 1
1317 | ],
1318 | [
1319 | "./node_modules/@types/node/constants.d.ts",
1320 | 1
1321 | ],
1322 | [
1323 | "./node_modules/@types/node/crypto.d.ts",
1324 | 1
1325 | ],
1326 | [
1327 | "./node_modules/@types/node/dgram.d.ts",
1328 | 1
1329 | ],
1330 | [
1331 | "./node_modules/@types/node/dns.d.ts",
1332 | 1
1333 | ],
1334 | [
1335 | "./node_modules/@types/node/domain.d.ts",
1336 | 1
1337 | ],
1338 | [
1339 | "./node_modules/@types/node/events.d.ts",
1340 | 1
1341 | ],
1342 | [
1343 | "./node_modules/@types/node/fs.d.ts",
1344 | 1
1345 | ],
1346 | [
1347 | "./node_modules/@types/node/globals.d.ts",
1348 | 1
1349 | ],
1350 | [
1351 | "./node_modules/@types/node/globals.global.d.ts",
1352 | 1
1353 | ],
1354 | [
1355 | "./node_modules/@types/node/http.d.ts",
1356 | 1
1357 | ],
1358 | [
1359 | "./node_modules/@types/node/http2.d.ts",
1360 | 1
1361 | ],
1362 | [
1363 | "./node_modules/@types/node/https.d.ts",
1364 | 1
1365 | ],
1366 | [
1367 | "./node_modules/@types/node/index.d.ts",
1368 | 1
1369 | ],
1370 | [
1371 | "./node_modules/@types/node/inspector.d.ts",
1372 | 1
1373 | ],
1374 | [
1375 | "./node_modules/@types/node/module.d.ts",
1376 | 1
1377 | ],
1378 | [
1379 | "./node_modules/@types/node/net.d.ts",
1380 | 1
1381 | ],
1382 | [
1383 | "./node_modules/@types/node/os.d.ts",
1384 | 1
1385 | ],
1386 | [
1387 | "./node_modules/@types/node/path.d.ts",
1388 | 1
1389 | ],
1390 | [
1391 | "./node_modules/@types/node/perf_hooks.d.ts",
1392 | 1
1393 | ],
1394 | [
1395 | "./node_modules/@types/node/process.d.ts",
1396 | 1
1397 | ],
1398 | [
1399 | "./node_modules/@types/node/punycode.d.ts",
1400 | 1
1401 | ],
1402 | [
1403 | "./node_modules/@types/node/querystring.d.ts",
1404 | 1
1405 | ],
1406 | [
1407 | "./node_modules/@types/node/readline.d.ts",
1408 | 1
1409 | ],
1410 | [
1411 | "./node_modules/@types/node/repl.d.ts",
1412 | 1
1413 | ],
1414 | [
1415 | "./node_modules/@types/node/stream.d.ts",
1416 | 1
1417 | ],
1418 | [
1419 | "./node_modules/@types/node/string_decoder.d.ts",
1420 | 1
1421 | ],
1422 | [
1423 | "./node_modules/@types/node/timers.d.ts",
1424 | 1
1425 | ],
1426 | [
1427 | "./node_modules/@types/node/tls.d.ts",
1428 | 1
1429 | ],
1430 | [
1431 | "./node_modules/@types/node/trace_events.d.ts",
1432 | 1
1433 | ],
1434 | [
1435 | "./node_modules/@types/node/ts3.4/base.d.ts",
1436 | 1
1437 | ],
1438 | [
1439 | "./node_modules/@types/node/ts3.6/base.d.ts",
1440 | 1
1441 | ],
1442 | [
1443 | "./node_modules/@types/node/tty.d.ts",
1444 | 1
1445 | ],
1446 | [
1447 | "./node_modules/@types/node/url.d.ts",
1448 | 1
1449 | ],
1450 | [
1451 | "./node_modules/@types/node/util.d.ts",
1452 | 1
1453 | ],
1454 | [
1455 | "./node_modules/@types/node/v8.d.ts",
1456 | 1
1457 | ],
1458 | [
1459 | "./node_modules/@types/node/vm.d.ts",
1460 | 1
1461 | ],
1462 | [
1463 | "./node_modules/@types/node/wasi.d.ts",
1464 | 1
1465 | ],
1466 | [
1467 | "./node_modules/@types/node/worker_threads.d.ts",
1468 | 1
1469 | ],
1470 | [
1471 | "./node_modules/@types/node/zlib.d.ts",
1472 | 1
1473 | ],
1474 | [
1475 | "./node_modules/@types/prop-types/index.d.ts",
1476 | 1
1477 | ],
1478 | [
1479 | "./node_modules/@types/react-dom/index.d.ts",
1480 | 1
1481 | ],
1482 | [
1483 | "./node_modules/@types/react/global.d.ts",
1484 | 1
1485 | ],
1486 | [
1487 | "./node_modules/@types/react/index.d.ts",
1488 | 1
1489 | ],
1490 | [
1491 | "./node_modules/@types/svg-parser/index.d.ts",
1492 | 1
1493 | ],
1494 | [
1495 | "./node_modules/@types/vscode/index.d.ts",
1496 | 1
1497 | ],
1498 | [
1499 | "./node_modules/csstype/index.d.ts",
1500 | 1
1501 | ],
1502 | [
1503 | "./node_modules/typescript/lib/lib.es2015.d.ts",
1504 | 1
1505 | ],
1506 | [
1507 | "./node_modules/typescript/lib/lib.es2016.d.ts",
1508 | 1
1509 | ],
1510 | [
1511 | "./node_modules/typescript/lib/lib.es2017.d.ts",
1512 | 1
1513 | ],
1514 | [
1515 | "./node_modules/typescript/lib/lib.es2018.d.ts",
1516 | 1
1517 | ],
1518 | [
1519 | "./node_modules/vscode-test/out/download.d.ts",
1520 | 1
1521 | ],
1522 | [
1523 | "./node_modules/vscode-test/out/index.d.ts",
1524 | 1
1525 | ],
1526 | [
1527 | "./node_modules/vscode-test/out/runtest.d.ts",
1528 | 1
1529 | ],
1530 | [
1531 | "./node_modules/vscode-test/out/util.d.ts",
1532 | 1
1533 | ],
1534 | [
1535 | "./src/consts.ts",
1536 | 1
1537 | ],
1538 | [
1539 | "./src/extension.ts",
1540 | 1
1541 | ],
1542 | [
1543 | "./src/lib.ts",
1544 | 1
1545 | ],
1546 | [
1547 | "./src/test/runtest.ts",
1548 | 1
1549 | ],
1550 | [
1551 | "./src/test/suite/extension.test.ts",
1552 | 1
1553 | ],
1554 | [
1555 | "./src/test/suite/index.ts",
1556 | 1
1557 | ]
1558 | ]
1559 | },
1560 | "version": "4.2.3"
1561 | }
--------------------------------------------------------------------------------
/vsc-extension-quickstart.md:
--------------------------------------------------------------------------------
1 | # Welcome to your VS Code Extension
2 |
3 | ## What's in the folder
4 |
5 | * This folder contains all of the files necessary for your extension.
6 | * `package.json` - this is the manifest file in which you declare your extension and command.
7 | * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin.
8 | * `src/extension.ts` - this is the main file where you will provide the implementation of your command.
9 | * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.
10 | * We pass the function containing the implementation of the command as the second parameter to `registerCommand`.
11 |
12 | ## Get up and running straight away
13 |
14 | * Press `F5` to open a new window with your extension loaded.
15 | * Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.
16 | * Set breakpoints in your code inside `src/extension.ts` to debug your extension.
17 | * Find output from your extension in the debug console.
18 |
19 | ## Make changes
20 |
21 | * You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.
22 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
23 |
24 |
25 | ## Explore the API
26 |
27 | * You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.
28 |
29 | ## Run tests
30 |
31 | * Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`.
32 | * Press `F5` to run the tests in a new window with your extension loaded.
33 | * See the output of the test result in the debug console.
34 | * Make changes to `src/test/suite/extension.test.ts` or create new test files inside the `test/suite` folder.
35 | * The provided test runner will only consider files matching the name pattern `**.test.ts`.
36 | * You can create folders inside the `test` folder to structure your tests any way you want.
37 |
38 | ## Go further
39 |
40 | * Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension).
41 | * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VSCode extension marketplace.
42 | * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).
43 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 |
3 | module.exports = {
4 | entry: {
5 | svgSpriteViewer: './src/view/app/index.tsx',
6 | },
7 | output: {
8 | path: path.resolve(__dirname, 'out'),
9 | filename: '[name].js',
10 | },
11 | devtool: 'eval-source-map',
12 | resolve: {
13 | extensions: ['.js', '.ts', '.tsx', '.json'],
14 | modules: ['node_modules', path.resolve(__dirname, './src/view/app')],
15 | },
16 | module: {
17 | rules: [
18 | {
19 | test: /\.(ts|tsx)$/,
20 | loader: 'ts-loader',
21 | options: {},
22 | },
23 | {
24 | test: /\.svg$/,
25 | type: 'asset/inline',
26 | },
27 | {
28 | test: /\.scss$/,
29 | use: [
30 | {
31 | loader: 'style-loader',
32 | },
33 | {
34 | loader: 'css-loader',
35 | },
36 | {
37 | loader: 'sass-loader',
38 | },
39 | ],
40 | },
41 | ],
42 | },
43 | performance: {
44 | hints: false,
45 | },
46 | }
47 |
--------------------------------------------------------------------------------