@vezham/icons-vscode 1.0.7 → 27.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +173 -21
- package/dist/extension.js +124 -0
- package/dist/icon.png +0 -0
- package/dist/{ui.html → index.html} +1246 -1045
- package/dist/package.json +87 -0
- package/package.json +59 -64
- package/CHANGELOG.md +0 -61
- package/README.md +0 -101
- package/extension.js +0 -122
- package/resources/icon.png +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "icons",
|
|
3
|
+
"displayName": "Vezham Icons — Open Source SVG Icon Library",
|
|
4
|
+
"version": "27.0.3",
|
|
5
|
+
"description": "Browse and insert handcrafted Vezham SVG icons directly into your HTML, React, Vue, Svelte, or vanilla JS code. Outline, filled, duotone-outline, and duotone-filled styles available.",
|
|
6
|
+
"categories": [
|
|
7
|
+
"Other",
|
|
8
|
+
"Snippets"
|
|
9
|
+
],
|
|
10
|
+
"keywords": [
|
|
11
|
+
"duotone icons",
|
|
12
|
+
"filled icons",
|
|
13
|
+
"heroicons",
|
|
14
|
+
"icon browser",
|
|
15
|
+
"icon picker",
|
|
16
|
+
"icons",
|
|
17
|
+
"lucide",
|
|
18
|
+
"outline icons",
|
|
19
|
+
"react-icons",
|
|
20
|
+
"svelte-icons",
|
|
21
|
+
"svg",
|
|
22
|
+
"vue-icons"
|
|
23
|
+
],
|
|
24
|
+
"homepage": "https://vezham.com",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/vezham/vx-fe-assets-pkgs/issues"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/vezham/vx-fe-assets-pkgs",
|
|
31
|
+
"directory": "packages/icons-vscode"
|
|
32
|
+
},
|
|
33
|
+
"publisher": "Vezham",
|
|
34
|
+
"main": "./extension.js",
|
|
35
|
+
"files": [
|
|
36
|
+
"extension.js",
|
|
37
|
+
"icon.png",
|
|
38
|
+
"index.html"
|
|
39
|
+
],
|
|
40
|
+
"contributes": {
|
|
41
|
+
"commands": [
|
|
42
|
+
{
|
|
43
|
+
"command": "vezham-icons.focusExplorer",
|
|
44
|
+
"title": "Focus on Vezham Icons"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"views": {
|
|
48
|
+
"vezham-icons-explorer": [
|
|
49
|
+
{
|
|
50
|
+
"type": "webview",
|
|
51
|
+
"id": "vezham-icons.views.explorer",
|
|
52
|
+
"name": "Vezham Icons"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"viewsContainers": {
|
|
57
|
+
"activitybar": [
|
|
58
|
+
{
|
|
59
|
+
"id": "vezham-icons-explorer",
|
|
60
|
+
"title": "Vezham Icons",
|
|
61
|
+
"icon": "icon.png"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"activationEvents": [],
|
|
67
|
+
"engines": {
|
|
68
|
+
"vscode": "^1.80.0"
|
|
69
|
+
},
|
|
70
|
+
"icon": "icon.png",
|
|
71
|
+
"badges": [
|
|
72
|
+
{
|
|
73
|
+
"description": "2,700+ Icons",
|
|
74
|
+
"url": "https://img.shields.io/badge/icons-2,700%2B-blue",
|
|
75
|
+
"href": "https://vezham.com"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"description": "MIT License",
|
|
79
|
+
"url": "https://img.shields.io/badge/license-MIT-6C5CE7",
|
|
80
|
+
"href": "https://github.com/vezham/vx-fe-assets-pkgs/blob/main/LICENSE"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"galleryBanner": {
|
|
84
|
+
"color": "#09090b",
|
|
85
|
+
"theme": "dark"
|
|
86
|
+
}
|
|
87
|
+
}
|
package/package.json
CHANGED
|
@@ -1,77 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vezham/icons-vscode",
|
|
3
3
|
"displayName": "Vezham Icons — Open Source SVG Icon Library",
|
|
4
|
+
"version": "27.0.3",
|
|
4
5
|
"description": "Browse and insert handcrafted Vezham SVG icons directly into your HTML, React, Vue, Svelte, or vanilla JS code. Outline, filled, duotone-outline, and duotone-filled styles available.",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
6
|
+
"categories": [
|
|
7
|
+
"Other",
|
|
8
|
+
"Snippets"
|
|
9
|
+
],
|
|
10
10
|
"keywords": [
|
|
11
|
-
"icons",
|
|
12
|
-
"
|
|
13
|
-
"react-icons",
|
|
14
|
-
"lucide",
|
|
11
|
+
"duotone icons",
|
|
12
|
+
"filled icons",
|
|
15
13
|
"heroicons",
|
|
16
|
-
"icon picker",
|
|
17
14
|
"icon browser",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
15
|
+
"icon picker",
|
|
16
|
+
"icons",
|
|
17
|
+
"lucide",
|
|
20
18
|
"outline icons",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"Snippets",
|
|
26
|
-
"Other"
|
|
19
|
+
"react-icons",
|
|
20
|
+
"svelte-icons",
|
|
21
|
+
"svg",
|
|
22
|
+
"vue-icons"
|
|
27
23
|
],
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
"
|
|
24
|
+
"homepage": "https://vezham.com",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/vezham/vx-fe-assets-pkgs/issues"
|
|
31
27
|
},
|
|
32
|
-
"badges": [
|
|
33
|
-
{
|
|
34
|
-
"url": "https://img.shields.io/badge/icons-2,700%2B-blue",
|
|
35
|
-
"href": "https://vezham.com",
|
|
36
|
-
"description": "2,700+ Icons"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"url": "https://img.shields.io/badge/license-MIT-6C5CE7",
|
|
40
|
-
"href": "https://github.com/vezham/reicon/blob/main/LICENSE",
|
|
41
|
-
"description": "MIT License"
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
"icon": "resources/icon.png",
|
|
45
|
-
"license": "MIT",
|
|
46
28
|
"repository": {
|
|
47
29
|
"type": "git",
|
|
48
|
-
"url": "https://github.com/vezham/
|
|
30
|
+
"url": "https://github.com/vezham/vx-fe-assets-pkgs",
|
|
49
31
|
"directory": "packages/icons-vscode"
|
|
50
32
|
},
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
"homepage": "https://vezham.com",
|
|
55
|
-
"activationEvents": [],
|
|
56
|
-
"main": "./extension.js",
|
|
33
|
+
"publisher": "Vezham",
|
|
34
|
+
"main": "./dist/extension.js",
|
|
57
35
|
"files": [
|
|
58
|
-
"dist"
|
|
59
|
-
"extension.js",
|
|
60
|
-
"resources",
|
|
61
|
-
"README.md",
|
|
62
|
-
"CHANGELOG.md",
|
|
63
|
-
"LICENSE"
|
|
36
|
+
"dist"
|
|
64
37
|
],
|
|
65
38
|
"contributes": {
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
},
|
|
39
|
+
"commands": [
|
|
40
|
+
{
|
|
41
|
+
"command": "vezham-icons.focusExplorer",
|
|
42
|
+
"title": "Focus on Vezham Icons"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
75
45
|
"views": {
|
|
76
46
|
"vezham-icons-explorer": [
|
|
77
47
|
{
|
|
@@ -81,17 +51,42 @@
|
|
|
81
51
|
}
|
|
82
52
|
]
|
|
83
53
|
},
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
54
|
+
"viewsContainers": {
|
|
55
|
+
"activitybar": [
|
|
56
|
+
{
|
|
57
|
+
"id": "vezham-icons-explorer",
|
|
58
|
+
"title": "Vezham Icons",
|
|
59
|
+
"icon": "dist/icon.png"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
90
63
|
},
|
|
64
|
+
"activationEvents": [],
|
|
91
65
|
"devDependencies": {
|
|
92
66
|
"@types/vscode": "^1.80.0"
|
|
93
67
|
},
|
|
68
|
+
"engines": {
|
|
69
|
+
"vscode": "^1.80.0"
|
|
70
|
+
},
|
|
71
|
+
"icon": "dist/icon.png",
|
|
72
|
+
"badges": [
|
|
73
|
+
{
|
|
74
|
+
"description": "2,700+ Icons",
|
|
75
|
+
"url": "https://img.shields.io/badge/icons-2,700%2B-blue",
|
|
76
|
+
"href": "https://vezham.com"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"description": "MIT License",
|
|
80
|
+
"url": "https://img.shields.io/badge/license-MIT-6C5CE7",
|
|
81
|
+
"href": "https://github.com/vezham/vx-fe-assets-pkgs/blob/main/LICENSE"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"galleryBanner": {
|
|
85
|
+
"color": "#09090b",
|
|
86
|
+
"theme": "dark"
|
|
87
|
+
},
|
|
94
88
|
"scripts": {
|
|
95
|
-
"build": "node scripts/build.cjs"
|
|
89
|
+
"build": "node scripts/build.cjs",
|
|
90
|
+
"package-vsix": "cd dist && pnpm dlx @vscode/vsce@4.1.1 package --no-dependencies --skip-license --out ../vezham-icons.vsix"
|
|
96
91
|
}
|
|
97
92
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# @vezham/icons-vscode
|
|
2
|
-
|
|
3
|
-
## 1.0.7
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- [`c43db4f`](https://github.com/vezham/reicon/commit/c43db4f097764211f4be548959ef3838c0dd2dd8) Thanks [@vx-vigneshwaran](https://github.com/vx-vigneshwaran)! - ver bump
|
|
8
|
-
|
|
9
|
-
## 1.0.6
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- [`bed8648`](https://github.com/vezham/reicon/commit/bed8648a66912ad84254f564b7d1d6b7814410d5) Thanks [@suresh-vtpl](https://github.com/suresh-vtpl)! - Sync scolar icons
|
|
14
|
-
|
|
15
|
-
## 1.0.5
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- [`04f1b53`](https://github.com/vezham/reicon/commit/04f1b53e6197abbaeeae26d58eb80b10f5c4ab31) Thanks [@vx-vigneshwaran](https://github.com/vx-vigneshwaran)! - updated data icons dir
|
|
20
|
-
|
|
21
|
-
## 1.0.4
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- [`6f36c9b`](https://github.com/vezham/reicon/commit/6f36c9be7ef6ff9b78059599c2c863bdb6ed7127) Thanks [@vx-vigneshwaran](https://github.com/vx-vigneshwaran)! - added gzip
|
|
26
|
-
|
|
27
|
-
## 1.0.3
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- [`29b4248`](https://github.com/vezham/reicon/commit/29b4248f563ca39b593ff998ffff7169768befe9) Thanks [@vx-vigneshwaran](https://github.com/vx-vigneshwaran)! - ver bump
|
|
32
|
-
|
|
33
|
-
## 1.0.2
|
|
34
|
-
|
|
35
|
-
### Patch Changes
|
|
36
|
-
|
|
37
|
-
- [`4d77cc0`](https://github.com/vezham/reicon/commit/4d77cc06e255e5afb6b9c9a20fab5add9e81d39b) Thanks [@vx-vigneshwaran](https://github.com/vx-vigneshwaran)! - tag update
|
|
38
|
-
|
|
39
|
-
## 1.0.1
|
|
40
|
-
|
|
41
|
-
### Patch Changes
|
|
42
|
-
|
|
43
|
-
- [`4806b30`](https://github.com/vezham/reicon/commit/4806b301dbc3172a6b9cfd3c3e76879c8997aa23) Thanks [@vx-vigneshwaran](https://github.com/vx-vigneshwaran)! - ver bump
|
|
44
|
-
|
|
45
|
-
## 1.0.0
|
|
46
|
-
|
|
47
|
-
### Patch Changes
|
|
48
|
-
|
|
49
|
-
- [`4bc7ae2`](https://github.com/vezham/reicon/commit/4bc7ae21342fe26c90359bc0d5cbb74258b32fe7) Thanks [@vx-vigneshwaran](https://github.com/vx-vigneshwaran)! - ver bump
|
|
50
|
-
|
|
51
|
-
## 1.0.1
|
|
52
|
-
|
|
53
|
-
### Patch Changes
|
|
54
|
-
|
|
55
|
-
- [`345a93a`](https://github.com/vezham/reicon/commit/345a93aa6f5a5b7f0d4598a0708eb24dd704046a) Thanks [@vx-vigneshwaran](https://github.com/vx-vigneshwaran)! - ver bump
|
|
56
|
-
|
|
57
|
-
## 1.0.0
|
|
58
|
-
|
|
59
|
-
### Patch Changes
|
|
60
|
-
|
|
61
|
-
- [`ccfadd2`](https://github.com/vezham/reicon/commit/ccfadd29b3031f81cc6986d9e2ff084eca798c81) Thanks [@vx-vigneshwaran](https://github.com/vx-vigneshwaran)! - init test
|
package/README.md
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="https://vezham.com">
|
|
3
|
-
<img src="https://vezham.com/readme-banner.png" alt="Vezham Icons for VS Code — SVG Icon Library for VS Code" width="100%" />
|
|
4
|
-
</a>
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
<a href="https://marketplace.visualstudio.com/items?itemName=Vezham.icons"><img src="https://img.shields.io/visual-studio-marketplace/v/Vezham.icons?color=black&label=marketplace" alt="VS Marketplace version" /></a>
|
|
9
|
-
<a href="https://marketplace.visualstudio.com/items?itemName=Vezham.icons"><img src="https://img.shields.io/visual-studio-marketplace/d/Vezham.icons?color=black&label=downloads" alt="VS Marketplace downloads" /></a>
|
|
10
|
-
<a href="https://github.com/vezham/reicon/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-black" alt="MIT License" /></a>
|
|
11
|
-
<a href="https://vezham.com"><img src="https://img.shields.io/badge/docs-vezham.com-black" alt="Documentation" /></a>
|
|
12
|
-
<a href="https://github.com/vezham/reicon"><img src="https://img.shields.io/badge/github-Vezham-black" alt="GitHub" /></a>
|
|
13
|
-
</p>
|
|
14
|
-
|
|
15
|
-
<h1 align="center">Vezham Icons for VS Code</h1>
|
|
16
|
-
|
|
17
|
-
<p align="center">
|
|
18
|
-
<b>Browse and insert 2674+ Vezham icons</b> • outline, filled, duotone-outline, and duotone-filled weights • React, Vue, Svelte, SVG, JSX • Smart code insertion
|
|
19
|
-
</p>
|
|
20
|
-
|
|
21
|
-
<p align="center">
|
|
22
|
-
<a href="#features">Features</a> •
|
|
23
|
-
<a href="#quick-start">Quick Start</a> •
|
|
24
|
-
<a href="#configuration">Configuration</a> •
|
|
25
|
-
<a href="#related-packages">Related</a> •
|
|
26
|
-
<a href="#links">Links</a>
|
|
27
|
-
</p>
|
|
28
|
-
|
|
29
|
-
**Vezham Icons for VS Code** brings the official, pixel-perfect Vezham Icons library directly into your code editor. Browse, search, customize, and insert icons instantly in multiple formats with zero context switching.
|
|
30
|
-
|
|
31
|
-
| 🔗 Resource | Link |
|
|
32
|
-
|---|---|
|
|
33
|
-
| 🌐 Website & icon browser | [vezham.com](https://vezham.com) |
|
|
34
|
-
| 📖 Documentation | [vezham.com/docs](https://vezham.com/docs) |
|
|
35
|
-
| 📦 Marketplage | [marketplace.visualstudio.com/items?itemName=Vezham.icons](https://marketplace.visualstudio.com/items?itemName=Vezham.icons) |
|
|
36
|
-
| 🎨 Figma plugin | [vezham.com/docs/figma](https://vezham.com/docs/figma) |
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Features
|
|
41
|
-
|
|
42
|
-
- **Activity Bar Panel** — A custom sidebar panel that houses the icon browser
|
|
43
|
-
- **2674+ Pixel-Perfect Icons** — Browse the complete collection in both **outline** and **filled** weights
|
|
44
|
-
- **Smart Code Insertion** — Click any icon to instantly insert it at your cursor in your preferred framework syntax:
|
|
45
|
-
- **React (JSX)**: `<Home size={24} color="#6c5ce7" />`
|
|
46
|
-
- **Vue**: `<Home :size="24" color="#6c5ce7" />`
|
|
47
|
-
- **Svelte**: `<Home size={24} color="#6c5ce7" />`
|
|
48
|
-
- **SVG**: Raw SVG code `<svg ...>...</svg>`
|
|
49
|
-
- **Live Customization** — Adjust size (in pixels) and color (using preset swatches or hex inputs) directly in the sidebar toolbar before inserting
|
|
50
|
-
- **Smart Theme Adaptation** — Automatically uses `currentColor` by default to match your VS Code theme
|
|
51
|
-
- **State Persistence** — Remembers your preferred format, color, size, and category choices between editor sessions
|
|
52
|
-
- **Clipboard Fallback** — Copies the formatted code snippet to your clipboard automatically if no text editor is currently active
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## Quick Start
|
|
57
|
-
|
|
58
|
-
1. Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=Vezham.icons)
|
|
59
|
-
2. Click the **Vezham Icons** logo in the Activity Bar on the left
|
|
60
|
-
3. Search for icons by name, category, or description keywords
|
|
61
|
-
4. Set your preferred **Format** (React, Vue, Svelte, SVG), **Size**, and **Color**
|
|
62
|
-
5. Click on any icon grid card to instantly insert the code at your cursor
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Configuration
|
|
67
|
-
|
|
68
|
-
| Feature | Description |
|
|
69
|
-
|---------|-------------|
|
|
70
|
-
| **Search** | Press `Cmd+F` (Mac) / `Ctrl+F` (Win) when the panel is open to focus the search input |
|
|
71
|
-
| **Theme Color** | Use the `currentColor` option to match the surrounding text color |
|
|
72
|
-
| **Preview Size** | Use the button menu (top-right) to increase or decrease preview size |
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Related packages
|
|
77
|
-
|
|
78
|
-
| Package | Description |
|
|
79
|
-
|---------|-------------|
|
|
80
|
-
| [`/icons`](https://npmjs.com/package/@vezham/icons) | Core vanilla JS + CDN runtime. No framework required. |
|
|
81
|
-
| [`@vezham/icons-react`](https://npmjs.com/package/@vezham/icons-react) | React components for 2674+ icons. |
|
|
82
|
-
| [`@vezham/icons-vue`](https://npmjs.com/package/@vezham/icons-vue) | Vue 3 components for 2674+ icons. |
|
|
83
|
-
| [`@vezham/icons-svelte`](https://npmjs.com/package/@vezham/icons-svelte) | Svelte components for 2674+ icons. |
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## Links
|
|
88
|
-
|
|
89
|
-
- 🌐 Website: [vezham.com](https://vezham.com)
|
|
90
|
-
- 📖 Documentation: [vezham.com/docs](https://vezham.com/docs)
|
|
91
|
-
- 🛍️ Marketplace: [marketplace.visualstudio.com/items?itemName=Vezham.icons](https://marketplace.visualstudio.com/items?itemName=Vezham.icons)
|
|
92
|
-
- 🐙 GitHub: [github.com/vezham/reicon](https://github.com/vezham/reicon)
|
|
93
|
-
- 🐛 Issues: [github.com/vezham/reicon/issues](https://github.com/vezham/reicon/issues)
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## License
|
|
98
|
-
|
|
99
|
-
MIT © [Dev Chauhan](https://devchauhan.in)
|
|
100
|
-
|
|
101
|
-
Free to use in personal and commercial projects. Attribution is appreciated but not required.
|
package/extension.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
const vscode = require('vscode');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @param {vscode.ExtensionContext} context
|
|
7
|
-
*/
|
|
8
|
-
function activate(context) {
|
|
9
|
-
const provider = new VezhamIconsWebviewViewProvider(context.extensionUri);
|
|
10
|
-
|
|
11
|
-
context.subscriptions.push(
|
|
12
|
-
vscode.window.registerWebviewViewProvider(VezhamIconsWebviewViewProvider.viewType, provider)
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
context.subscriptions.push(
|
|
16
|
-
vscode.commands.registerCommand('vezham-icons.focusExplorer', () => {
|
|
17
|
-
vscode.commands.executeCommand('workbench.view.extension.vezham-icons-explorer');
|
|
18
|
-
})
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
class VezhamIconsWebviewViewProvider {
|
|
23
|
-
static viewType = 'vezham-icons.views.explorer';
|
|
24
|
-
|
|
25
|
-
constructor(extensionUri) {
|
|
26
|
-
this._extensionUri = extensionUri;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @param {vscode.WebviewView} webviewView
|
|
31
|
-
* @param {vscode.WebviewViewResolveContext} context
|
|
32
|
-
* @param {vscode.CancellationToken} _token
|
|
33
|
-
*/
|
|
34
|
-
resolveWebviewView(webviewView, context, _token) {
|
|
35
|
-
this._view = webviewView;
|
|
36
|
-
|
|
37
|
-
webviewView.webview.options = {
|
|
38
|
-
enableScripts: true,
|
|
39
|
-
localResourceRoots: [
|
|
40
|
-
this._extensionUri
|
|
41
|
-
]
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
webviewView.webview.html = this._getHtmlForWebview(webviewView.webview);
|
|
45
|
-
|
|
46
|
-
webviewView.webview.onDidReceiveMessage(data => {
|
|
47
|
-
switch (data.type) {
|
|
48
|
-
case 'insert-icon':
|
|
49
|
-
this._insertIcon(data.snippet, data.name);
|
|
50
|
-
break;
|
|
51
|
-
case 'open-url':
|
|
52
|
-
vscode.env.openExternal(vscode.Uri.parse(data.url));
|
|
53
|
-
break;
|
|
54
|
-
case 'show-toast':
|
|
55
|
-
vscode.window.showInformationMessage(data.message);
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @param {string} snippet
|
|
63
|
-
* @param {string} name
|
|
64
|
-
*/
|
|
65
|
-
_insertIcon(snippet, name) {
|
|
66
|
-
const editor = vscode.window.activeTextEditor;
|
|
67
|
-
if (!editor) {
|
|
68
|
-
// Fallback: Copy to clipboard if no editor is active
|
|
69
|
-
vscode.env.clipboard.writeText(snippet);
|
|
70
|
-
vscode.window.showInformationMessage(`No active editor. Copied "${name}" snippet to clipboard.`);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
editor.edit(editBuilder => {
|
|
75
|
-
editBuilder.insert(editor.selection.active, snippet);
|
|
76
|
-
}).then(success => {
|
|
77
|
-
if (success) {
|
|
78
|
-
vscode.window.setStatusBarMessage(`Inserted Vezham icon "${name}"`, 3000);
|
|
79
|
-
} else {
|
|
80
|
-
vscode.window.showErrorMessage(`Failed to insert Vezham icon "${name}"`);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @param {vscode.Webview} webview
|
|
87
|
-
*/
|
|
88
|
-
_getHtmlForWebview(webview) {
|
|
89
|
-
const htmlPath = path.join(this._extensionUri.fsPath, 'dist', 'ui.html');
|
|
90
|
-
if (!fs.existsSync(htmlPath)) {
|
|
91
|
-
return `
|
|
92
|
-
<!DOCTYPE html>
|
|
93
|
-
<html lang="en">
|
|
94
|
-
<head>
|
|
95
|
-
<meta charset="UTF-8">
|
|
96
|
-
<title>Vezham Icons</title>
|
|
97
|
-
<style>
|
|
98
|
-
body {
|
|
99
|
-
font-family: sans-serif;
|
|
100
|
-
padding: 20px;
|
|
101
|
-
color: var(--vscode-editor-foreground, #cccccc);
|
|
102
|
-
background-color: var(--vscode-editor-background, #1e1e1e);
|
|
103
|
-
}
|
|
104
|
-
</style>
|
|
105
|
-
</head>
|
|
106
|
-
<body>
|
|
107
|
-
<h3>Vezham Icons webview file not found</h3>
|
|
108
|
-
<p>Please make sure you have run the build command inside the icons-vscode directory.</p>
|
|
109
|
-
</body>
|
|
110
|
-
</html>
|
|
111
|
-
`;
|
|
112
|
-
}
|
|
113
|
-
return fs.readFileSync(htmlPath, 'utf8');
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function deactivate() {}
|
|
118
|
-
|
|
119
|
-
module.exports = {
|
|
120
|
-
activate,
|
|
121
|
-
deactivate
|
|
122
|
-
};
|
package/resources/icon.png
DELETED
|
Binary file
|