@vezham/icons-vscode 1.0.7 → 27.0.2

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/extension.js CHANGED
@@ -1,94 +1,101 @@
1
- const vscode = require('vscode');
2
- const path = require('path');
3
- const fs = require('fs');
1
+ const vscode = require('vscode')
2
+ const path = require('path')
3
+ const fs = require('fs')
4
4
 
5
5
  /**
6
6
  * @param {vscode.ExtensionContext} context
7
7
  */
8
8
  function activate(context) {
9
- const provider = new VezhamIconsWebviewViewProvider(context.extensionUri);
9
+ const provider = new VezhamIconsWebviewViewProvider(context.extensionUri)
10
10
 
11
- context.subscriptions.push(
12
- vscode.window.registerWebviewViewProvider(VezhamIconsWebviewViewProvider.viewType, provider)
13
- );
11
+ context.subscriptions.push(
12
+ vscode.window.registerWebviewViewProvider(
13
+ VezhamIconsWebviewViewProvider.viewType,
14
+ provider
15
+ )
16
+ )
14
17
 
15
- context.subscriptions.push(
16
- vscode.commands.registerCommand('vezham-icons.focusExplorer', () => {
17
- vscode.commands.executeCommand('workbench.view.extension.vezham-icons-explorer');
18
- })
19
- );
18
+ context.subscriptions.push(
19
+ vscode.commands.registerCommand('vezham-icons.focusExplorer', () => {
20
+ vscode.commands.executeCommand(
21
+ 'workbench.view.extension.vezham-icons-explorer'
22
+ )
23
+ })
24
+ )
20
25
  }
21
26
 
22
27
  class VezhamIconsWebviewViewProvider {
23
- static viewType = 'vezham-icons.views.explorer';
28
+ static viewType = 'vezham-icons.views.explorer'
24
29
 
25
- constructor(extensionUri) {
26
- this._extensionUri = extensionUri;
27
- }
30
+ constructor(extensionUri) {
31
+ this._extensionUri = extensionUri
32
+ }
33
+
34
+ /**
35
+ * @param {vscode.WebviewView} webviewView
36
+ */
37
+ resolveWebviewView(webviewView) {
38
+ this._view = webviewView
28
39
 
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;
40
+ webviewView.webview.options = {
41
+ enableScripts: true,
42
+ localResourceRoots: [this._extensionUri]
43
+ }
36
44
 
37
- webviewView.webview.options = {
38
- enableScripts: true,
39
- localResourceRoots: [
40
- this._extensionUri
41
- ]
42
- };
45
+ webviewView.webview.html = this._getHtmlForWebview()
43
46
 
44
- webviewView.webview.html = this._getHtmlForWebview(webviewView.webview);
47
+ webviewView.webview.onDidReceiveMessage(data => {
48
+ switch (data.type) {
49
+ case 'insert-icon':
50
+ this._insertIcon(data.snippet, data.name)
51
+ break
52
+ case 'open-url':
53
+ vscode.env.openExternal(vscode.Uri.parse(data.url))
54
+ break
55
+ case 'show-toast':
56
+ vscode.window.showInformationMessage(data.message)
57
+ break
58
+ }
59
+ })
60
+ }
45
61
 
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
- });
62
+ /**
63
+ * @param {string} snippet
64
+ * @param {string} name
65
+ */
66
+ _insertIcon(snippet, name) {
67
+ const editor = vscode.window.activeTextEditor
68
+ if (!editor) {
69
+ // Fallback: Copy to clipboard if no editor is active
70
+ vscode.env.clipboard.writeText(snippet)
71
+ vscode.window.showInformationMessage(
72
+ `No active editor. Copied "${name}" snippet to clipboard.`
73
+ )
74
+ return
59
75
  }
60
76
 
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;
77
+ editor
78
+ .edit(editBuilder => {
79
+ editBuilder.insert(editor.selection.active, snippet)
80
+ })
81
+ .then(success => {
82
+ if (success) {
83
+ vscode.window.setStatusBarMessage(
84
+ `Inserted Vezham icon "${name}"`,
85
+ 3000
86
+ )
87
+ } else {
88
+ vscode.window.showErrorMessage(
89
+ `Failed to insert Vezham icon "${name}"`
90
+ )
72
91
  }
92
+ })
93
+ }
73
94
 
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 `
95
+ _getHtmlForWebview() {
96
+ const htmlPath = path.join(this._extensionUri.fsPath, 'dist', 'index.html')
97
+ if (!fs.existsSync(htmlPath)) {
98
+ return `
92
99
  <!DOCTYPE html>
93
100
  <html lang="en">
94
101
  <head>
@@ -108,15 +115,10 @@ class VezhamIconsWebviewViewProvider {
108
115
  <p>Please make sure you have run the build command inside the icons-vscode directory.</p>
109
116
  </body>
110
117
  </html>
111
- `;
112
- }
113
- return fs.readFileSync(htmlPath, 'utf8');
118
+ `
114
119
  }
120
+ return fs.readFileSync(htmlPath, 'utf8')
121
+ }
115
122
  }
116
123
 
117
- function deactivate() {}
118
-
119
- module.exports = {
120
- activate,
121
- deactivate
122
- };
124
+ module.exports = { activate }
package/package.json CHANGED
@@ -1,77 +1,48 @@
1
1
  {
2
2
  "name": "@vezham/icons-vscode",
3
3
  "displayName": "Vezham Icons — Open Source SVG Icon Library",
4
+ "version": "27.0.2",
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
- "version": "1.0.7",
6
- "publisher": "DevChauhan",
7
- "engines": {
8
- "vscode": "^1.80.0"
9
- },
6
+ "categories": [
7
+ "Other",
8
+ "Snippets"
9
+ ],
10
10
  "keywords": [
11
- "icons",
12
- "svg",
13
- "react-icons",
14
- "lucide",
11
+ "duotone icons",
12
+ "filled icons",
15
13
  "heroicons",
16
- "icon picker",
17
14
  "icon browser",
18
- "vue-icons",
19
- "svelte-icons",
15
+ "icon picker",
16
+ "icons",
17
+ "lucide",
20
18
  "outline icons",
21
- "filled icons",
22
- "duotone icons"
23
- ],
24
- "categories": [
25
- "Snippets",
26
- "Other"
19
+ "react-icons",
20
+ "svelte-icons",
21
+ "svg",
22
+ "vue-icons"
27
23
  ],
28
- "galleryBanner": {
29
- "color": "#09090b",
30
- "theme": "dark"
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/reicon",
30
+ "url": "https://github.com/vezham/vx-fe-assets-pkgs",
49
31
  "directory": "packages/icons-vscode"
50
32
  },
51
- "bugs": {
52
- "url": "https://github.com/vezham/reicon/issues"
53
- },
54
- "homepage": "https://vezham.com",
55
- "activationEvents": [],
56
33
  "main": "./extension.js",
57
34
  "files": [
58
35
  "dist",
59
36
  "extension.js",
60
- "resources",
61
- "README.md",
62
- "CHANGELOG.md",
63
- "LICENSE"
37
+ "resources"
64
38
  ],
65
39
  "contributes": {
66
- "viewsContainers": {
67
- "activitybar": [
68
- {
69
- "id": "vezham-icons-explorer",
70
- "title": "Vezham Icons",
71
- "icon": "resources/icon.png"
72
- }
73
- ]
74
- },
40
+ "commands": [
41
+ {
42
+ "command": "vezham-icons.focusExplorer",
43
+ "title": "Focus on Vezham Icons"
44
+ }
45
+ ],
75
46
  "views": {
76
47
  "vezham-icons-explorer": [
77
48
  {
@@ -81,16 +52,40 @@
81
52
  }
82
53
  ]
83
54
  },
84
- "commands": [
85
- {
86
- "command": "vezham-icons.focusExplorer",
87
- "title": "Focus on Vezham Icons"
88
- }
89
- ]
55
+ "viewsContainers": {
56
+ "activitybar": [
57
+ {
58
+ "id": "vezham-icons-explorer",
59
+ "title": "Vezham Icons",
60
+ "icon": "resources/icon.png"
61
+ }
62
+ ]
63
+ }
90
64
  },
65
+ "activationEvents": [],
91
66
  "devDependencies": {
92
67
  "@types/vscode": "^1.80.0"
93
68
  },
69
+ "engines": {
70
+ "vscode": "^1.80.0"
71
+ },
72
+ "icon": "resources/icon.png",
73
+ "badges": [
74
+ {
75
+ "description": "2,700+ Icons",
76
+ "url": "https://img.shields.io/badge/icons-2,700%2B-blue",
77
+ "href": "https://vezham.com"
78
+ },
79
+ {
80
+ "description": "MIT License",
81
+ "url": "https://img.shields.io/badge/license-MIT-6C5CE7",
82
+ "href": "https://github.com/vezham/vx-fe-assets-pkgs/blob/main/LICENSE"
83
+ }
84
+ ],
85
+ "galleryBanner": {
86
+ "color": "#09090b",
87
+ "theme": "dark"
88
+ },
94
89
  "scripts": {
95
90
  "build": "node scripts/build.cjs"
96
91
  }
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
- | 🔗 &nbsp; Resource | Link |
32
- |---|---|
33
- | 🌐 &nbsp; Website & icon browser | [vezham.com](https://vezham.com) |
34
- | 📖 &nbsp; Documentation | [vezham.com/docs](https://vezham.com/docs) |
35
- | 📦 &nbsp; Marketplage | [marketplace.visualstudio.com/items?itemName=Vezham.icons](https://marketplace.visualstudio.com/items?itemName=Vezham.icons) |
36
- | 🎨 &nbsp; 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
- - 🌐 &nbsp; Website: [vezham.com](https://vezham.com)
90
- - 📖 &nbsp; Documentation: [vezham.com/docs](https://vezham.com/docs)
91
- - 🛍️ &nbsp; Marketplace: [marketplace.visualstudio.com/items?itemName=Vezham.icons](https://marketplace.visualstudio.com/items?itemName=Vezham.icons)
92
- - 🐙 &nbsp; GitHub: [github.com/vezham/reicon](https://github.com/vezham/reicon)
93
- - 🐛 &nbsp; 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.
Binary file