strivui 0.0.5
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/.vscode/extensions.json +5 -0
- package/.vscode/launch.json +21 -0
- package/.vscode/settings.json +18 -0
- package/.vscode/tasks.json +85 -0
- package/.vscode-test.mjs +5 -0
- package/.vscodeignore +15 -0
- package/CHANGELOG.md +9 -0
- package/README.md +81 -0
- package/esbuild.js +56 -0
- package/eslint.config.mjs +28 -0
- package/icon.png +0 -0
- package/package.json +91 -0
- package/snippets/strivuiClasses.json +85 -0
- package/src/extension.ts +26 -0
- package/src/test/extension.test.ts +15 -0
- package/src/test.html +34 -0
- package/tsconfig.json +16 -0
- package/vsc-extension-quickstart.md +48 -0
|
@@ -0,0 +1,21 @@
|
|
|
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}/dist/**/*.js"
|
|
17
|
+
],
|
|
18
|
+
"preLaunchTask": "${defaultBuildTask}"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files.exclude": {
|
|
3
|
+
"out": false, // set this to true to hide the "out" folder with the compiled JS files
|
|
4
|
+
"dist": false // set this to true to hide the "dist" 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
|
+
"dist": true // set this to false to include "dist" folder in search results
|
|
9
|
+
},
|
|
10
|
+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
|
|
11
|
+
"typescript.tsc.autoDetect": "off",
|
|
12
|
+
// 🔧 Enable snippet suggestions inside JSX strings
|
|
13
|
+
"editor.quickSuggestions": {
|
|
14
|
+
"other": true,
|
|
15
|
+
"comments": false,
|
|
16
|
+
"strings": true
|
|
17
|
+
}
|
|
18
|
+
}p
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
"label": "watch",
|
|
8
|
+
"dependsOn": [
|
|
9
|
+
"npm: watch:tsc",
|
|
10
|
+
"npm: watch:esbuild"
|
|
11
|
+
],
|
|
12
|
+
"presentation": {
|
|
13
|
+
"reveal": "never"
|
|
14
|
+
},
|
|
15
|
+
"group": {
|
|
16
|
+
"kind": "build",
|
|
17
|
+
"isDefault": true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "npm",
|
|
22
|
+
"script": "watch:esbuild",
|
|
23
|
+
"group": "build",
|
|
24
|
+
// INLINE THE PROBLEM MATCHER HERE
|
|
25
|
+
"problemMatcher": { // <--- Changed from "$esbuild-watch" to the direct definition
|
|
26
|
+
"base": "$tsc-watch", // You can try with or without this 'base' property.
|
|
27
|
+
// If the error persists with 'base', remove this line again.
|
|
28
|
+
"fileLocation": ["relative", "${workspaceFolder}"],
|
|
29
|
+
"pattern": [
|
|
30
|
+
{
|
|
31
|
+
"regexp": "\\[([^\\s]+)\\]\\s+(ERROR|WARNING):\\s+([^\\n]+)",
|
|
32
|
+
"file": 1,
|
|
33
|
+
"severity": 2,
|
|
34
|
+
"message": 3
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"regexp": "\\s+at\\s+(.+):(\\d+):(\\d+)",
|
|
38
|
+
"file": 1,
|
|
39
|
+
"line": 2,
|
|
40
|
+
"column": 3,
|
|
41
|
+
"loop": true
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"isBackground": true,
|
|
46
|
+
"label": "npm: watch:esbuild",
|
|
47
|
+
"presentation": {
|
|
48
|
+
"group": "watch",
|
|
49
|
+
"reveal": "never"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "npm",
|
|
54
|
+
"script": "watch:tsc",
|
|
55
|
+
"group": "build",
|
|
56
|
+
"problemMatcher": "$tsc-watch",
|
|
57
|
+
"isBackground": true,
|
|
58
|
+
"label": "npm: watch:tsc",
|
|
59
|
+
"presentation": {
|
|
60
|
+
"group": "watch",
|
|
61
|
+
"reveal": "never"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "npm",
|
|
66
|
+
"script": "watch-tests",
|
|
67
|
+
"problemMatcher": "$tsc-watch",
|
|
68
|
+
"isBackground": true,
|
|
69
|
+
"presentation": {
|
|
70
|
+
"reveal": "never",
|
|
71
|
+
"group": "watchers"
|
|
72
|
+
},
|
|
73
|
+
"group": "build"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"label": "tasks: watch-tests",
|
|
77
|
+
"dependsOn": [
|
|
78
|
+
"npm: watch",
|
|
79
|
+
"npm: watch-tests"
|
|
80
|
+
],
|
|
81
|
+
"problemMatcher": []
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
// REMOVED: No top-level "problemMatchers" array needed when defined inline
|
|
85
|
+
}
|
package/.vscode-test.mjs
ADDED
package/.vscodeignore
ADDED
package/CHANGELOG.md
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# ✨🌈 Strive UI Snippets for VS Code
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
![StrivUi]
|
|
6
|
+
|
|
7
|
+
Supercharge your **Visual Studio Code** experience with blazing fast utility class snippets
|
|
8
|
+
Designed for developers who love speed, structure, and style 💻⚡
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🌟 Why Strive UI?
|
|
13
|
+
|
|
14
|
+
Strive UI gives you **autocomplete magic** 🎩 for commonly used like utility classes. No more typing full class names — just type a prefix and boom 💥 — instant suggestions!
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🔥 Snippet Features
|
|
19
|
+
|
|
20
|
+
🚀 Rapid access to commonly used utility classes
|
|
21
|
+
🎯 Autocomplete suggestions as you type
|
|
22
|
+
🔄 Works seamlessly in **HTML**, **JSX**, **TSX**, and more
|
|
23
|
+
🧠 Smart placeholders to save your brain-cycles
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 📚 Supported Snippets
|
|
28
|
+
|
|
29
|
+
| 🛠️ Utility | ⌨️ Prefix | 💡 Examples |
|
|
30
|
+
|-------------------|--------------|----------------------------------------|
|
|
31
|
+
| **Padding** | `p-` | `p-4`, `p-8`, `p-16` |
|
|
32
|
+
| **Margin** | `m-` | `m-2`, `m-6`, `m-auto` |
|
|
33
|
+
| **Width** | `w-` | `w-full`, `w-64`, `w-screen` |
|
|
34
|
+
| **Height** | `h-` | `h-20`, `h-screen`, `h-full` |
|
|
35
|
+
| **Flexbox** | `flex` | `flex`, `flex-col`, `items-center` |
|
|
36
|
+
| **Grid** | `grid` | `grid`, `grid-cols-2`, `gap-4` |
|
|
37
|
+
| **Font Size** | `text-` | `text-sm`, `text-xl`, `text-4xl` |
|
|
38
|
+
| **Font Weight** | `font-` | `font-light`, `font-semibold` |
|
|
39
|
+
| **Rounded Corners**| `rounded-` | `rounded-md`, `rounded-full` |
|
|
40
|
+
| **Shadow** | `shadow-` | `shadow`, `shadow-lg`, `shadow-md` |
|
|
41
|
+
| **Position** | `pos-` | `absolute`, `relative`, `fixed` |
|
|
42
|
+
| **Z-Index** | `z-` | `z-10`, `z-20`, `z-auto` |
|
|
43
|
+
|
|
44
|
+
> 💡 These are not just static snippets — they use VS Code's **intelligent placeholder options** to give you dropdowns as you type!
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 🚀 How to Use
|
|
49
|
+
|
|
50
|
+
1. 🔍 **Search** for `Strive UI Snippets` in the **VS Code Marketplace**
|
|
51
|
+
2. 🔧 **Install** the extension
|
|
52
|
+
3. ✨ Start typing any prefix like `p-`, `text-`, `w-`, etc.
|
|
53
|
+
4. 💡 Use `Tab` or `Enter` to auto-insert with suggestions
|
|
54
|
+
|
|
55
|
+
It’s that simple. Get your **layout built faster** than ever before! ⏱️
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 🧬 Snippet Example
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
"Padding": {
|
|
63
|
+
"prefix": "p-",
|
|
64
|
+
"body": "p-${1|0,1,2,3,4,5,6,8,10,12,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96|}",
|
|
65
|
+
"description": "📏 Padding utility"
|
|
66
|
+
}
|
|
67
|
+
🧠 You can choose padding values from the dropdown — no memorization needed!
|
|
68
|
+
|
|
69
|
+
👨💻 Author
|
|
70
|
+
Built with ❤️ by Syed Abdullah Ali
|
|
71
|
+
A creative mind passionate about design systems, developer tooling, and pixel-perfect UIs.
|
|
72
|
+
|
|
73
|
+
📜 License
|
|
74
|
+
Licensed under the MIT License.
|
|
75
|
+
Free to use, modify, and contribute — just don’t forget to ⭐ the repo!
|
|
76
|
+
|
|
77
|
+
📣 Final Thoughts
|
|
78
|
+
💥 Whether you're building a dashboard, landing page, or e-commerce UI,
|
|
79
|
+
Strive UI Snippets will save you time and effort — so you can focus on what really matters: building amazing apps 🚀
|
|
80
|
+
|
|
81
|
+
✨ Happy Coding! 🎯
|
package/esbuild.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const esbuild = require("esbuild");
|
|
2
|
+
|
|
3
|
+
const production = process.argv.includes('--production');
|
|
4
|
+
const watch = process.argv.includes('--watch');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @type {import('esbuild').Plugin}
|
|
8
|
+
*/
|
|
9
|
+
const esbuildProblemMatcherPlugin = {
|
|
10
|
+
name: 'esbuild-problem-matcher',
|
|
11
|
+
|
|
12
|
+
setup(build) {
|
|
13
|
+
build.onStart(() => {
|
|
14
|
+
console.log('[watch] build started');
|
|
15
|
+
});
|
|
16
|
+
build.onEnd((result) => {
|
|
17
|
+
result.errors.forEach(({ text, location }) => {
|
|
18
|
+
console.error(`✘ [ERROR] ${text}`);
|
|
19
|
+
console.error(` ${location.file}:${location.line}:${location.column}:`);
|
|
20
|
+
});
|
|
21
|
+
console.log('[watch] build finished');
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
async function main() {
|
|
27
|
+
const ctx = await esbuild.context({
|
|
28
|
+
entryPoints: [
|
|
29
|
+
'src/extension.ts'
|
|
30
|
+
],
|
|
31
|
+
bundle: true,
|
|
32
|
+
format: 'cjs',
|
|
33
|
+
minify: production,
|
|
34
|
+
sourcemap: !production,
|
|
35
|
+
sourcesContent: false,
|
|
36
|
+
platform: 'node',
|
|
37
|
+
outfile: 'dist/extension.js',
|
|
38
|
+
external: ['vscode'],
|
|
39
|
+
logLevel: 'silent',
|
|
40
|
+
plugins: [
|
|
41
|
+
/* add to the end of plugins array */
|
|
42
|
+
esbuildProblemMatcherPlugin,
|
|
43
|
+
],
|
|
44
|
+
});
|
|
45
|
+
if (watch) {
|
|
46
|
+
await ctx.watch();
|
|
47
|
+
} else {
|
|
48
|
+
await ctx.rebuild();
|
|
49
|
+
await ctx.dispose();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
main().catch(e => {
|
|
54
|
+
console.error(e);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
2
|
+
import tsParser from "@typescript-eslint/parser";
|
|
3
|
+
|
|
4
|
+
export default [{
|
|
5
|
+
files: ["**/*.ts"],
|
|
6
|
+
}, {
|
|
7
|
+
plugins: {
|
|
8
|
+
"@typescript-eslint": typescriptEslint,
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
languageOptions: {
|
|
12
|
+
parser: tsParser,
|
|
13
|
+
ecmaVersion: 2022,
|
|
14
|
+
sourceType: "module",
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
rules: {
|
|
18
|
+
"@typescript-eslint/naming-convention": ["warn", {
|
|
19
|
+
selector: "import",
|
|
20
|
+
format: ["camelCase", "PascalCase"],
|
|
21
|
+
}],
|
|
22
|
+
|
|
23
|
+
curly: "warn",
|
|
24
|
+
eqeqeq: "warn",
|
|
25
|
+
"no-throw-literal": "warn",
|
|
26
|
+
semi: "warn",
|
|
27
|
+
},
|
|
28
|
+
}];
|
package/icon.png
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "strivui",
|
|
3
|
+
"publisher": "StriveUi",
|
|
4
|
+
"displayName": "StrivUi",
|
|
5
|
+
"icon": "icon.png",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"react",
|
|
8
|
+
"ui-library",
|
|
9
|
+
"components",
|
|
10
|
+
"react-components",
|
|
11
|
+
"strivui",
|
|
12
|
+
"typescript",
|
|
13
|
+
"javascript",
|
|
14
|
+
"styled-components",
|
|
15
|
+
"design-system",
|
|
16
|
+
"tailwindcss",
|
|
17
|
+
"accessibility",
|
|
18
|
+
"reusable-components",
|
|
19
|
+
"frontend",
|
|
20
|
+
"react-ui",
|
|
21
|
+
"ui-kit"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/Syed-Dev-Sphere/StrivUI.git"
|
|
27
|
+
},
|
|
28
|
+
"description": "",
|
|
29
|
+
"version": "0.0.5",
|
|
30
|
+
"engines": {
|
|
31
|
+
"vscode": "^1.102.0"
|
|
32
|
+
},
|
|
33
|
+
"categories": [
|
|
34
|
+
"Other"
|
|
35
|
+
],
|
|
36
|
+
"activationEvents": [],
|
|
37
|
+
"main": "./dist/extension.js",
|
|
38
|
+
"contributes": {
|
|
39
|
+
"commands": [
|
|
40
|
+
{
|
|
41
|
+
"command": "strivui.helloWorld",
|
|
42
|
+
"title": "Hello World"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"snippets": [
|
|
46
|
+
{
|
|
47
|
+
"language": "html",
|
|
48
|
+
"path": "./snippets/strivuiClasses.json"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"language": "javascript",
|
|
52
|
+
"path": "./snippets/strivuiClasses.json"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"language": "javascriptreact",
|
|
56
|
+
"path": "./snippets/strivuiClasses.json"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"language": "typescriptreact",
|
|
60
|
+
"path": "./snippets/strivuiClasses.json"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"vscode:prepublish": "npm run package",
|
|
66
|
+
"compile": "npm run check-types && npm run lint && node esbuild.js",
|
|
67
|
+
"watch": "npm-run-all -p watch:*",
|
|
68
|
+
"watch:esbuild": "node esbuild.js --watch",
|
|
69
|
+
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
|
|
70
|
+
"package": "npm run check-types && npm run lint && node esbuild.js --production",
|
|
71
|
+
"compile-tests": "tsc -p . --outDir out",
|
|
72
|
+
"watch-tests": "tsc -p . -w --outDir out",
|
|
73
|
+
"pretest": "npm run compile-tests && npm run compile && npm run lint",
|
|
74
|
+
"check-types": "tsc --noEmit",
|
|
75
|
+
"lint": "eslint src",
|
|
76
|
+
"test": "vscode-test"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@types/vscode": "^1.102.0",
|
|
80
|
+
"@types/mocha": "^10.0.10",
|
|
81
|
+
"@types/node": "20.x",
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^8.31.1",
|
|
83
|
+
"@typescript-eslint/parser": "^8.31.1",
|
|
84
|
+
"eslint": "^9.25.1",
|
|
85
|
+
"esbuild": "^0.25.3",
|
|
86
|
+
"npm-run-all": "^4.1.5",
|
|
87
|
+
"typescript": "^5.8.3",
|
|
88
|
+
"@vscode/test-cli": "^0.0.11",
|
|
89
|
+
"@vscode/test-electron": "^2.5.2"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Padding": {
|
|
3
|
+
"prefix": "p-",
|
|
4
|
+
"body": "p-${1|0,1,2,3,4,5,6,8,10,12,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96|}",
|
|
5
|
+
"description": "📏 Padding utility"
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
"Margin": {
|
|
9
|
+
"prefix": "m-",
|
|
10
|
+
"body": "m-${1|0,1,2,3,4,5,6,8,10,12,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96|}",
|
|
11
|
+
"description": "📏 Margin utility"
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
"Width": {
|
|
15
|
+
"prefix": "w-",
|
|
16
|
+
"body": "w-${1|0,1,2,3,4,5,6,8,10,12,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96,auto,full,screen|}",
|
|
17
|
+
"description": "📏 Width utility"
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
"Height": {
|
|
21
|
+
"prefix": "h-",
|
|
22
|
+
"body": "h-${1|0,1,2,3,4,5,6,8,10,12,16,20,24,28,32,36,40,44,48,52,56,60,64,72,80,96,auto,full,screen|}",
|
|
23
|
+
"description": "📏 Height utility"
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
"Flex": {
|
|
27
|
+
"prefix": "flex",
|
|
28
|
+
"body": "flex",
|
|
29
|
+
"description": "📦 Flex container"
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
"Flex Direction": {
|
|
33
|
+
"prefix": "flex-",
|
|
34
|
+
"body": "flex-${1|row,col|}",
|
|
35
|
+
"description": "↔️ Flex direction"
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
"Grid": {
|
|
39
|
+
"prefix": "grid",
|
|
40
|
+
"body": "grid",
|
|
41
|
+
"description": "📊 Grid container"
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
"Grid Columns": {
|
|
45
|
+
"prefix": "grid-cols-",
|
|
46
|
+
"body": "grid-cols-${1|1,2,3,4,5,6,7,8,9,10,11,12|}",
|
|
47
|
+
"description": "📊 Grid columns"
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
"Font Size": {
|
|
51
|
+
"prefix": "text-",
|
|
52
|
+
"body": "text-${1|xs,sm,base,lg,xl,2xl,3xl,4xl,5xl,6xl,7xl,8xl,9xl|}",
|
|
53
|
+
"description": "🔤 Font size"
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
"Font Weight": {
|
|
57
|
+
"prefix": "font-",
|
|
58
|
+
"body": "font-${1|thin,light,normal,medium,semibold,bold,extrabold,black|}",
|
|
59
|
+
"description": "🔤 Font weight"
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
"Border Radius": {
|
|
63
|
+
"prefix": "rounded-",
|
|
64
|
+
"body": "rounded-${1|none,sm,base,md,lg,xl,full|}",
|
|
65
|
+
"description": "🟢 Border radius"
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
"Shadow": {
|
|
69
|
+
"prefix": "shadow-",
|
|
70
|
+
"body": "shadow-${1|sm,base,md,lg,xl,2xl,inner,none|}",
|
|
71
|
+
"description": "🌑 Shadow utility"
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
"Position": {
|
|
75
|
+
"prefix": "pos-",
|
|
76
|
+
"body": "${1|static,relative,absolute,fixed,sticky|}",
|
|
77
|
+
"description": "📍 Position utility"
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
"Z-Index": {
|
|
81
|
+
"prefix": "z-",
|
|
82
|
+
"body": "z-${1|0,10,20,30,40,50,60,70,80,90,100,auto|}",
|
|
83
|
+
"description": "🔼 Z-index utility"
|
|
84
|
+
}
|
|
85
|
+
}
|
package/src/extension.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// The module 'vscode' contains the VS Code extensibility API
|
|
2
|
+
// Import the module and reference it with the alias vscode in your code below
|
|
3
|
+
import * as vscode from 'vscode';
|
|
4
|
+
|
|
5
|
+
// This method is called when your extension is activated
|
|
6
|
+
// Your extension is activated the very first time the command is executed
|
|
7
|
+
export function activate(context: vscode.ExtensionContext) {
|
|
8
|
+
|
|
9
|
+
// Use the console to output diagnostic information (console.log) and errors (console.error)
|
|
10
|
+
// This line of code will only be executed once when your extension is activated
|
|
11
|
+
console.log('Congratulations, your extension "strivui" is now active!');
|
|
12
|
+
|
|
13
|
+
// The command has been defined in the package.json file
|
|
14
|
+
// Now provide the implementation of the command with registerCommand
|
|
15
|
+
// The commandId parameter must match the command field in package.json
|
|
16
|
+
const disposable = vscode.commands.registerCommand('strivui.helloWorld', () => {
|
|
17
|
+
// The code you place here will be executed every time your command is executed
|
|
18
|
+
// Display a message box to the user
|
|
19
|
+
vscode.window.showInformationMessage('Hello World from StrivUi!');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
context.subscriptions.push(disposable);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// This method is called when your extension is deactivated
|
|
26
|
+
export function deactivate() {}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as assert from 'assert';
|
|
2
|
+
|
|
3
|
+
// You can import and use all API from the 'vscode' module
|
|
4
|
+
// as well as import your extension to test it
|
|
5
|
+
import * as vscode from 'vscode';
|
|
6
|
+
// import * as myExtension from '../../extension';
|
|
7
|
+
|
|
8
|
+
suite('Extension Test Suite', () => {
|
|
9
|
+
vscode.window.showInformationMessage('Start all tests.');
|
|
10
|
+
|
|
11
|
+
test('Sample test', () => {
|
|
12
|
+
assert.strictEqual(-1, [1, 2, 3].indexOf(5));
|
|
13
|
+
assert.strictEqual(-1, [1, 2, 3].indexOf(0));
|
|
14
|
+
});
|
|
15
|
+
});
|
package/src/test.html
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title>Text Input Test</title>
|
|
6
|
+
<style>
|
|
7
|
+
body {
|
|
8
|
+
font-family: sans-serif;
|
|
9
|
+
padding: 2rem;
|
|
10
|
+
}
|
|
11
|
+
input, button {
|
|
12
|
+
padding: 0.5rem;
|
|
13
|
+
font-size: 1rem;
|
|
14
|
+
}
|
|
15
|
+
input {
|
|
16
|
+
margin-right: 0.5rem;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<h1>Text Input Test</h1>
|
|
22
|
+
<input type="text" id="textInput" placeholder="Type something..." class="grid-cols-8"/>
|
|
23
|
+
<button onclick="showText()">Show Text</button>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
function showText() {
|
|
27
|
+
const input = document.getElementById('textInput');
|
|
28
|
+
if (input) {
|
|
29
|
+
alert('You typed: ' + input.value);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "Node16",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"lib": [
|
|
6
|
+
"ES2022"
|
|
7
|
+
],
|
|
8
|
+
"sourceMap": true,
|
|
9
|
+
"rootDir": "src",
|
|
10
|
+
"strict": true, /* enable all strict type-checking options */
|
|
11
|
+
/* Additional Checks */
|
|
12
|
+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
13
|
+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
14
|
+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
## Setup
|
|
13
|
+
|
|
14
|
+
* install the recommended extensions (amodio.tsl-problem-matcher, ms-vscode.extension-test-runner, and dbaeumer.vscode-eslint)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Get up and running straight away
|
|
18
|
+
|
|
19
|
+
* Press `F5` to open a new window with your extension loaded.
|
|
20
|
+
* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.
|
|
21
|
+
* Set breakpoints in your code inside `src/extension.ts` to debug your extension.
|
|
22
|
+
* Find output from your extension in the debug console.
|
|
23
|
+
|
|
24
|
+
## Make changes
|
|
25
|
+
|
|
26
|
+
* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.
|
|
27
|
+
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Explore the API
|
|
31
|
+
|
|
32
|
+
* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`.
|
|
33
|
+
|
|
34
|
+
## Run tests
|
|
35
|
+
|
|
36
|
+
* Install the [Extension Test Runner](https://marketplace.visualstudio.com/items?itemName=ms-vscode.extension-test-runner)
|
|
37
|
+
* Run the "watch" task via the **Tasks: Run Task** command. Make sure this is running, or tests might not be discovered.
|
|
38
|
+
* Open the Testing view from the activity bar and click the Run Test" button, or use the hotkey `Ctrl/Cmd + ; A`
|
|
39
|
+
* See the output of the test result in the Test Results view.
|
|
40
|
+
* Make changes to `src/test/extension.test.ts` or create new test files inside the `test` folder.
|
|
41
|
+
* The provided test runner will only consider files matching the name pattern `**.test.ts`.
|
|
42
|
+
* You can create folders inside the `test` folder to structure your tests any way you want.
|
|
43
|
+
|
|
44
|
+
## Go further
|
|
45
|
+
|
|
46
|
+
* Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension).
|
|
47
|
+
* [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VS Code extension marketplace.
|
|
48
|
+
* Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration).
|