@enjoys/context-engine 1.2.0 → 1.3.1
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/data/codeActions/css.json +111 -0
- package/data/codeActions/tailwindcss.json +76 -0
- package/data/codeLens/css.json +68 -0
- package/data/codeLens/tailwindcss.json +47 -0
- package/data/color/css.json +124 -0
- package/data/color/tailwindcss.json +53 -0
- package/data/commands/css.json +41 -0
- package/data/commands/manifest.json +729 -727
- package/data/commands/tailwindcss.json +53 -0
- package/data/completion/css.json +383 -0
- package/data/completion/javascript.json +27 -0
- package/data/completion/redis-cli.json +1 -1
- package/data/completion/tailwindcss.json +284 -0
- package/data/completion/typescript.json +27 -0
- package/data/declaration/css.json +59 -0
- package/data/declaration/tailwindcss.json +65 -0
- package/data/definition/css.json +115 -0
- package/data/definition/redis-cli.json +1 -1
- package/data/definition/tailwindcss.json +115 -0
- package/data/documentHighlight/css.json +50 -0
- package/data/documentHighlight/tailwindcss.json +65 -0
- package/data/documentRangeFormatting/css.json +101 -0
- package/data/documentRangeFormatting/tailwindcss.json +55 -0
- package/data/documentSymbol/css.json +96 -0
- package/data/documentSymbol/tailwindcss.json +61 -0
- package/data/foldingRange/css.json +66 -0
- package/data/foldingRange/tailwindcss.json +60 -0
- package/data/formatting/css.json +73 -0
- package/data/formatting/tailwindcss.json +48 -0
- package/data/hover/css.json +68 -0
- package/data/hover/redis-cli.json +1 -1
- package/data/hover/tailwindcss.json +968 -0
- package/data/implementation/css.json +65 -0
- package/data/implementation/tailwindcss.json +59 -0
- package/data/inlayHints/css.json +87 -0
- package/data/inlayHints/tailwindcss.json +111 -0
- package/data/inlineCompletions/css.json +125 -0
- package/data/inlineCompletions/javascript.json +12 -0
- package/data/inlineCompletions/tailwindcss.json +411 -0
- package/data/inlineCompletions/typescript.json +12 -0
- package/data/linkedEditingRange/css.json +40 -0
- package/data/linkedEditingRange/tailwindcss.json +30 -0
- package/data/links/css.json +55 -0
- package/data/links/tailwindcss.json +40 -0
- package/data/manifest.json +62 -0
- package/data/onTypeFormatting/css.json +82 -0
- package/data/onTypeFormatting/tailwindcss.json +63 -0
- package/data/rangeSemanticTokens/css.json +125 -0
- package/data/rangeSemanticTokens/tailwindcss.json +95 -0
- package/data/references/css.json +65 -0
- package/data/references/tailwindcss.json +59 -0
- package/data/rename/css.json +91 -0
- package/data/rename/tailwindcss.json +58 -0
- package/data/selectionRange/css.json +55 -0
- package/data/selectionRange/tailwindcss.json +35 -0
- package/data/semanticTokens/css.json +107 -0
- package/data/semanticTokens/tailwindcss.json +161 -0
- package/data/signatureHelp/css.json +137 -0
- package/data/signatureHelp/tailwindcss.json +64 -0
- package/data/typeDefinition/css.json +53 -0
- package/data/typeDefinition/tailwindcss.json +47 -0
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "css",
|
|
3
|
+
"implementationPatterns": [
|
|
4
|
+
{
|
|
5
|
+
"pattern": "--(([a-zA-Z_][a-zA-Z0-9_-]*))\\s*:\\s*([^;]+);",
|
|
6
|
+
"captureGroup": 1,
|
|
7
|
+
"kind": "variable",
|
|
8
|
+
"description": "Custom property definition. The implementation of a CSS variable (--name: value) that can be referenced with var(--name)."
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"pattern": "([.#]?[a-zA-Z_][a-zA-Z0-9_-]*)\\s*\\{[^}]+\\}",
|
|
12
|
+
"captureGroup": 1,
|
|
13
|
+
"kind": "selector",
|
|
14
|
+
"description": "Selector rule implementation. The full rule block that defines styles for a given selector, including all property declarations."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"pattern": "@keyframes\\s+([a-zA-Z_][a-zA-Z0-9_-]*)\\s*\\{[\\s\\S]*?\\n\\}",
|
|
18
|
+
"captureGroup": 1,
|
|
19
|
+
"kind": "animation",
|
|
20
|
+
"description": "@keyframes implementation. The full animation definition including all keyframe stops (from/to or percentage-based)."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"pattern": "@font-face\\s*\\{[^}]*font-family\\s*:\\s*['\"]?([^'\";}]+)[^}]*\\}",
|
|
24
|
+
"captureGroup": 1,
|
|
25
|
+
"kind": "font",
|
|
26
|
+
"description": "@font-face implementation. The full font declaration including family name, sources, weight ranges, and display strategy."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"pattern": "@layer\\s+([a-zA-Z_][a-zA-Z0-9_-]*)\\s*\\{[\\s\\S]*?\\n\\}",
|
|
30
|
+
"captureGroup": 1,
|
|
31
|
+
"kind": "layer",
|
|
32
|
+
"description": "@layer implementation. The full cascade layer block containing all rules assigned to this layer."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"pattern": "@counter-style\\s+([a-zA-Z_][a-zA-Z0-9_-]*)\\s*\\{[^}]+\\}",
|
|
36
|
+
"captureGroup": 1,
|
|
37
|
+
"kind": "counter-style",
|
|
38
|
+
"description": "@counter-style implementation. Defines a custom counter style with system, symbols, and suffix descriptors."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"pattern": "@property\\s+--(([a-zA-Z_][a-zA-Z0-9_-]*))\\s*\\{[^}]+\\}",
|
|
42
|
+
"captureGroup": 1,
|
|
43
|
+
"kind": "registered-property",
|
|
44
|
+
"description": "@property (Houdini) implementation. Registers a custom property with syntax, inherits, and initial-value descriptors."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"pattern": "@media\\s+([^{]+)\\s*\\{[\\s\\S]*?\\n\\}",
|
|
48
|
+
"captureGroup": 1,
|
|
49
|
+
"kind": "media-query",
|
|
50
|
+
"description": "@media implementation. The full media query block containing conditional styles for specific device/viewport conditions."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"pattern": "@supports\\s+([^{]+)\\s*\\{[\\s\\S]*?\\n\\}",
|
|
54
|
+
"captureGroup": 1,
|
|
55
|
+
"kind": "feature-query",
|
|
56
|
+
"description": "@supports implementation. The full feature query block containing styles applied only if the browser supports the tested feature."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"pattern": "@container\\s+(?:([a-zA-Z_][a-zA-Z0-9_-]*)\\s+)?\\([^)]+\\)\\s*\\{[\\s\\S]*?\\n\\}",
|
|
60
|
+
"captureGroup": 1,
|
|
61
|
+
"kind": "container-query",
|
|
62
|
+
"description": "@container implementation. The full container query block containing styles applied based on container element size."
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "tailwindcss",
|
|
3
|
+
"implementationPatterns": [
|
|
4
|
+
{
|
|
5
|
+
"pattern": "@apply\\s+([\\w\\s:/-]+)\\s*;",
|
|
6
|
+
"captureGroup": 1,
|
|
7
|
+
"kind": "class",
|
|
8
|
+
"description": "Implementation of utility classes applied via @apply directive — resolves to their CSS property declarations."
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"pattern": "\\.([\\w-]+)\\s*\\{[^}]*@apply\\s+([\\w\\s:/-]+)",
|
|
12
|
+
"captureGroup": 1,
|
|
13
|
+
"kind": "class",
|
|
14
|
+
"description": "Custom component class implementation using @apply to compose Tailwind utilities."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"pattern": "addUtilities\\s*\\(\\s*\\{([^}]+)\\}",
|
|
18
|
+
"captureGroup": 1,
|
|
19
|
+
"kind": "function",
|
|
20
|
+
"description": "Plugin-defined utility implementations registered via the addUtilities API."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"pattern": "addComponents\\s*\\(\\s*\\{([^}]+)\\}",
|
|
24
|
+
"captureGroup": 1,
|
|
25
|
+
"kind": "function",
|
|
26
|
+
"description": "Plugin-defined component implementations registered via the addComponents API."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"pattern": "matchUtilities\\s*\\(\\s*\\{\\s*['\"]?([\\w-]+)['\"]?",
|
|
30
|
+
"captureGroup": 1,
|
|
31
|
+
"kind": "function",
|
|
32
|
+
"description": "Dynamic utility implementations registered via matchUtilities — supports arbitrary values."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"pattern": "@layer\\s+(components)\\s*\\{([^}]+)\\}",
|
|
36
|
+
"captureGroup": 2,
|
|
37
|
+
"kind": "module",
|
|
38
|
+
"description": "Component layer implementations — custom components defined within @layer components."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"pattern": "@layer\\s+(utilities)\\s*\\{([^}]+)\\}",
|
|
42
|
+
"captureGroup": 2,
|
|
43
|
+
"kind": "module",
|
|
44
|
+
"description": "Utility layer implementations — custom utilities defined within @layer utilities."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"pattern": "@layer\\s+(base)\\s*\\{([^}]+)\\}",
|
|
48
|
+
"captureGroup": 2,
|
|
49
|
+
"kind": "module",
|
|
50
|
+
"description": "Base layer implementations — base style overrides defined within @layer base."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"pattern": "plugin\\s*\\(\\s*function\\s*\\(\\s*\\{([^}]+)\\}",
|
|
54
|
+
"captureGroup": 1,
|
|
55
|
+
"kind": "function",
|
|
56
|
+
"description": "Tailwind plugin implementation defining custom utilities, components, or base styles."
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "css",
|
|
3
|
+
"inlayHintPatterns": [
|
|
4
|
+
{
|
|
5
|
+
"pattern": "([.#]?[a-zA-Z_][a-zA-Z0-9_-]*(?:\\s*[>+~]\\s*[.#]?[a-zA-Z_][a-zA-Z0-9_-]*)*)\\s*\\{",
|
|
6
|
+
"kind": "type",
|
|
7
|
+
"label": "specificity: (${id}, ${class}, ${type})",
|
|
8
|
+
"position": "after",
|
|
9
|
+
"description": "Displays the computed specificity of a CSS selector as an (ID, Class, Type) tuple. Helps understand cascade priority."
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"pattern": "#([0-9a-fA-F]{3,8})\\b",
|
|
13
|
+
"kind": "type",
|
|
14
|
+
"label": "■ ${color}",
|
|
15
|
+
"position": "after",
|
|
16
|
+
"description": "Shows a color swatch preview inline after hex color values for visual identification."
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"pattern": ":\\s*(-?\\d+(\\.\\d+)?)px\\b",
|
|
20
|
+
"kind": "type",
|
|
21
|
+
"label": "${rem}rem",
|
|
22
|
+
"position": "after",
|
|
23
|
+
"description": "Displays the rem equivalent of pixel values (assumes 16px base). Example: 24px → 1.5rem."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"pattern": ":\\s*(-?\\d+(\\.\\d+)?)rem\\b",
|
|
27
|
+
"kind": "type",
|
|
28
|
+
"label": "${px}px",
|
|
29
|
+
"position": "after",
|
|
30
|
+
"description": "Displays the pixel equivalent of rem values (assumes 16px base). Example: 1.5rem → 24px."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"pattern": "margin:\\s*([^;]+);",
|
|
34
|
+
"kind": "type",
|
|
35
|
+
"label": "↑${top} →${right} ↓${bottom} ←${left}",
|
|
36
|
+
"position": "after",
|
|
37
|
+
"description": "Expands margin shorthand to show computed values for each side (top, right, bottom, left)."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"pattern": "padding:\\s*([^;]+);",
|
|
41
|
+
"kind": "type",
|
|
42
|
+
"label": "↑${top} →${right} ↓${bottom} ←${left}",
|
|
43
|
+
"position": "after",
|
|
44
|
+
"description": "Expands padding shorthand to show computed values for each side (top, right, bottom, left)."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"pattern": "z-index:\\s*(-?\\d+)",
|
|
48
|
+
"kind": "type",
|
|
49
|
+
"label": "stacking layer: ${level}",
|
|
50
|
+
"position": "after",
|
|
51
|
+
"description": "Indicates the relative stacking layer of the z-index value within the current stacking context."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"pattern": "transition:\\s*([^;]+);",
|
|
55
|
+
"kind": "type",
|
|
56
|
+
"label": "⏱ ${totalDuration}",
|
|
57
|
+
"position": "after",
|
|
58
|
+
"description": "Shows the total transition duration including delay for quick reference."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"pattern": "animation:\\s*([^;]+);",
|
|
62
|
+
"kind": "type",
|
|
63
|
+
"label": "⏱ ${duration} × ${iterations}",
|
|
64
|
+
"position": "after",
|
|
65
|
+
"description": "Shows animation duration and iteration count for quick reference."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"pattern": "grid-template-columns:\\s*repeat\\((\\d+|auto-fill|auto-fit),\\s*([^)]+)\\)",
|
|
69
|
+
"kind": "type",
|
|
70
|
+
"label": "${count} columns",
|
|
71
|
+
"position": "after",
|
|
72
|
+
"description": "Shows the number of grid columns generated by repeat() for easier visualization."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"pattern": "font-size:\\s*clamp\\(([^,]+),\\s*([^,]+),\\s*([^)]+)\\)",
|
|
76
|
+
"kind": "type",
|
|
77
|
+
"label": "min: ${1}, preferred: ${2}, max: ${3}",
|
|
78
|
+
"position": "after",
|
|
79
|
+
"description": "Breaks down clamp() function parameters for fluid font-size declarations."
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"typeInferenceRules": {
|
|
83
|
+
"specificity": "Computed as (count of #id selectors, count of .class/:pseudo-class/[attribute] selectors, count of element/::pseudo-element selectors)",
|
|
84
|
+
"pxToRem": "Divide pixel value by 16 (default browser font-size)",
|
|
85
|
+
"shorthandExpansion": "1 value = all sides; 2 values = vertical|horizontal; 3 values = top|horizontal|bottom; 4 values = top|right|bottom|left"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "tailwindcss",
|
|
3
|
+
"inlayHintPatterns": [
|
|
4
|
+
{
|
|
5
|
+
"pattern": "\\bp-(\\d+)\\b",
|
|
6
|
+
"kind": "type",
|
|
7
|
+
"label": "padding: ${1 * 0.25}rem",
|
|
8
|
+
"position": "after",
|
|
9
|
+
"description": "Shows the computed padding value in rem for spacing utilities. E.g. p-4 → padding: 1rem (16px)."
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"pattern": "\\bm-(\\d+)\\b",
|
|
13
|
+
"kind": "type",
|
|
14
|
+
"label": "margin: ${1 * 0.25}rem",
|
|
15
|
+
"position": "after",
|
|
16
|
+
"description": "Shows the computed margin value in rem. E.g. m-4 → margin: 1rem (16px)."
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"pattern": "\\bgap-(\\d+)\\b",
|
|
20
|
+
"kind": "type",
|
|
21
|
+
"label": "gap: ${1 * 0.25}rem",
|
|
22
|
+
"position": "after",
|
|
23
|
+
"description": "Shows the computed gap value. E.g. gap-4 → gap: 1rem (16px)."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"pattern": "\\bw-(\\d+)\\b",
|
|
27
|
+
"kind": "type",
|
|
28
|
+
"label": "width: ${1 * 0.25}rem",
|
|
29
|
+
"position": "after",
|
|
30
|
+
"description": "Shows the computed width value for numeric width utilities."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"pattern": "\\bh-(\\d+)\\b",
|
|
34
|
+
"kind": "type",
|
|
35
|
+
"label": "height: ${1 * 0.25}rem",
|
|
36
|
+
"position": "after",
|
|
37
|
+
"description": "Shows the computed height value for numeric height utilities."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"pattern": "\\bbg-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(50|100|200|300|400|500|600|700|800|900|950)\\b",
|
|
41
|
+
"kind": "type",
|
|
42
|
+
"label": "→ #{color_hex}",
|
|
43
|
+
"position": "after",
|
|
44
|
+
"description": "Shows the hex color value for Tailwind palette colors. E.g. bg-blue-500 → #3b82f6."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"pattern": "\\btext-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(50|100|200|300|400|500|600|700|800|900|950)\\b",
|
|
48
|
+
"kind": "type",
|
|
49
|
+
"label": "→ #{color_hex}",
|
|
50
|
+
"position": "after",
|
|
51
|
+
"description": "Shows the hex color value for text color utilities."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"pattern": "\\bborder-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(50|100|200|300|400|500|600|700|800|900|950)\\b",
|
|
55
|
+
"kind": "type",
|
|
56
|
+
"label": "→ #{color_hex}",
|
|
57
|
+
"position": "after",
|
|
58
|
+
"description": "Shows the hex color value for border color utilities."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"pattern": "\\b(sm):",
|
|
62
|
+
"kind": "parameter",
|
|
63
|
+
"label": "≥640px",
|
|
64
|
+
"position": "after",
|
|
65
|
+
"description": "Shows the min-width breakpoint value for sm: prefix."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"pattern": "\\b(md):",
|
|
69
|
+
"kind": "parameter",
|
|
70
|
+
"label": "≥768px",
|
|
71
|
+
"position": "after",
|
|
72
|
+
"description": "Shows the min-width breakpoint value for md: prefix."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"pattern": "\\b(lg):",
|
|
76
|
+
"kind": "parameter",
|
|
77
|
+
"label": "≥1024px",
|
|
78
|
+
"position": "after",
|
|
79
|
+
"description": "Shows the min-width breakpoint value for lg: prefix."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"pattern": "\\b(xl):",
|
|
83
|
+
"kind": "parameter",
|
|
84
|
+
"label": "≥1280px",
|
|
85
|
+
"position": "after",
|
|
86
|
+
"description": "Shows the min-width breakpoint value for xl: prefix."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"pattern": "\\b(2xl):",
|
|
90
|
+
"kind": "parameter",
|
|
91
|
+
"label": "≥1536px",
|
|
92
|
+
"position": "after",
|
|
93
|
+
"description": "Shows the min-width breakpoint value for 2xl: prefix."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"pattern": "\\btext-(xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)\\b",
|
|
97
|
+
"kind": "type",
|
|
98
|
+
"label": "→ font-size",
|
|
99
|
+
"position": "after",
|
|
100
|
+
"description": "Shows the computed font-size. E.g. text-lg → 1.125rem / 18px."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"pattern": "\\brounded-(none|sm|md|lg|xl|2xl|3xl|full)\\b",
|
|
104
|
+
"kind": "type",
|
|
105
|
+
"label": "→ border-radius",
|
|
106
|
+
"position": "after",
|
|
107
|
+
"description": "Shows the computed border-radius value. E.g. rounded-lg → 0.5rem / 8px."
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"typeInferenceRules": {}
|
|
111
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "css",
|
|
3
|
+
"inlineCompletions": [
|
|
4
|
+
{
|
|
5
|
+
"triggerPattern": "display:\\s*",
|
|
6
|
+
"insertText": "flex;\njustify-content: ${1:center};\nalign-items: ${2:center};",
|
|
7
|
+
"description": "Flexbox layout with justify-content and align-items. Most common pattern for centering elements.",
|
|
8
|
+
"completeBracketPairs": true
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"triggerPattern": "display:\\s*g",
|
|
12
|
+
"insertText": "grid;\ngrid-template-columns: repeat(${1:auto-fill}, minmax(${2:250px}, 1fr));\ngap: ${3:1rem};",
|
|
13
|
+
"description": "Responsive CSS Grid layout with auto-fill and minmax for fluid column sizing.",
|
|
14
|
+
"completeBracketPairs": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"triggerPattern": "@media\\s*\\(",
|
|
18
|
+
"insertText": "max-width: ${1:768px}) {\n\t$0\n}",
|
|
19
|
+
"description": "Desktop-first media query breakpoint. Applies styles at or below the specified width.",
|
|
20
|
+
"completeBracketPairs": true
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"triggerPattern": "@media\\s*\\(min",
|
|
24
|
+
"insertText": "min-width: ${1:768px}) {\n\t$0\n}",
|
|
25
|
+
"description": "Mobile-first media query breakpoint. Applies styles at or above the specified width.",
|
|
26
|
+
"completeBracketPairs": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"triggerPattern": "@media\\s*\\(prefers-color",
|
|
30
|
+
"insertText": "prefers-color-scheme: dark) {\n\t:root {\n\t\t--bg: ${1:#121212};\n\t\t--text: ${2:#e0e0e0};\n\t}\n}",
|
|
31
|
+
"description": "Prefers-color-scheme dark mode media query with CSS custom property overrides.",
|
|
32
|
+
"completeBracketPairs": true
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"triggerPattern": "animation:\\s*",
|
|
36
|
+
"insertText": "${1:name} ${2:0.3s} ${3:ease-in-out} ${4:forwards};",
|
|
37
|
+
"description": "Animation shorthand with name, duration, timing function, and fill mode.",
|
|
38
|
+
"completeBracketPairs": true
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"triggerPattern": "transition:\\s*",
|
|
42
|
+
"insertText": "${1:all} ${2:0.3s} ${3:ease};",
|
|
43
|
+
"description": "Transition shorthand with property, duration, and timing function.",
|
|
44
|
+
"completeBracketPairs": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"triggerPattern": "background:\\s*linear",
|
|
48
|
+
"insertText": "linear-gradient(${1|to right,to bottom,135deg,to bottom right|}, ${2:#667eea}, ${3:#764ba2});",
|
|
49
|
+
"description": "Linear gradient background with direction and color stops.",
|
|
50
|
+
"completeBracketPairs": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"triggerPattern": "position:\\s*a",
|
|
54
|
+
"insertText": "absolute;\ntop: ${1:50%};\nleft: ${2:50%};\ntransform: translate(-50%, -50%);",
|
|
55
|
+
"description": "Absolute centering pattern using position absolute with transform.",
|
|
56
|
+
"completeBracketPairs": true
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"triggerPattern": "position:\\s*s(?=t)",
|
|
60
|
+
"insertText": "sticky;\ntop: ${1:0};",
|
|
61
|
+
"description": "Sticky positioning with top offset. Element sticks to position during scroll.",
|
|
62
|
+
"completeBracketPairs": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"triggerPattern": "@keyframes\\s+",
|
|
66
|
+
"insertText": "${1:animationName} {\n\tfrom {\n\t\t${2:opacity: 0;}\n\t\t${3:transform: translateY(10px);}\n\t}\n\tto {\n\t\t${4:opacity: 1;}\n\t\t${5:transform: translateY(0);}\n\t}\n}",
|
|
67
|
+
"description": "Keyframes animation definition with from/to states for fade and slide effect.",
|
|
68
|
+
"completeBracketPairs": true
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"triggerPattern": "@font-face\\s*\\{",
|
|
72
|
+
"insertText": "\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:fonts/${1}.woff2}') format('woff2'),\n\t url('${3:fonts/${1}.woff}') format('woff');\n\tfont-weight: ${4:400};\n\tfont-style: ${5:normal};\n\tfont-display: ${6:swap};\n",
|
|
73
|
+
"description": "Font-face declaration with woff2/woff sources and font-display swap for performance.",
|
|
74
|
+
"completeBracketPairs": true
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"triggerPattern": "grid-template-areas:\\s*",
|
|
78
|
+
"insertText": "\"${1:header} ${1:header} ${1:header}\"\n\t\"${2:sidebar} ${3:main} ${3:main}\"\n\t\"${4:footer} ${4:footer} ${4:footer}\";",
|
|
79
|
+
"description": "Grid template areas with a common header/sidebar/main/footer layout.",
|
|
80
|
+
"completeBracketPairs": true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"triggerPattern": "border-radius:\\s*",
|
|
84
|
+
"insertText": "${1|4px,8px,12px,50%,9999px|};",
|
|
85
|
+
"description": "Border radius with common presets: subtle rounding, moderate rounding, circle, and pill shape.",
|
|
86
|
+
"completeBracketPairs": true
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"triggerPattern": "box-shadow:\\s*",
|
|
90
|
+
"insertText": "${1:0} ${2:2px} ${3:4px} ${4:rgba(0, 0, 0, 0.1)};",
|
|
91
|
+
"description": "Box shadow with x-offset, y-offset, blur radius, and semi-transparent color.",
|
|
92
|
+
"completeBracketPairs": true
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"triggerPattern": "text-overflow:\\s*",
|
|
96
|
+
"insertText": "ellipsis;\nwhite-space: nowrap;\noverflow: hidden;",
|
|
97
|
+
"description": "Text truncation pattern with ellipsis, preventing text wrap and hiding overflow.",
|
|
98
|
+
"completeBracketPairs": true
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"triggerPattern": "@layer\\s+",
|
|
102
|
+
"insertText": "${1:base}, ${2:components}, ${3:utilities};",
|
|
103
|
+
"description": "Cascade layer ordering declaration. Layers listed first have lowest priority.",
|
|
104
|
+
"completeBracketPairs": true
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"triggerPattern": "@container\\s*\\(",
|
|
108
|
+
"insertText": "min-width: ${1:400px}) {\n\t$0\n}",
|
|
109
|
+
"description": "Container query for component-level responsive design based on container size.",
|
|
110
|
+
"completeBracketPairs": true
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"triggerPattern": "scroll-snap-type:\\s*",
|
|
114
|
+
"insertText": "${1|x,y,both|} ${2|mandatory,proximity|};",
|
|
115
|
+
"description": "Scroll snap type for axis and strictness. Creates carousel-like scroll behavior.",
|
|
116
|
+
"completeBracketPairs": true
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"triggerPattern": "aspect-ratio:\\s*",
|
|
120
|
+
"insertText": "${1|16 / 9,4 / 3,1 / 1,3 / 2,21 / 9|};",
|
|
121
|
+
"description": "Aspect ratio with common presets: widescreen, standard, square, photo, ultrawide.",
|
|
122
|
+
"completeBracketPairs": true
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
@@ -12,6 +12,18 @@
|
|
|
12
12
|
"insertText": "const ${1:name} = (${2:params}) => {\n\t$0\n};",
|
|
13
13
|
"description": "Arrow function",
|
|
14
14
|
"completeBracketPairs": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"triggerPattern": "^\\\\s*rfc\\\\s*$",
|
|
18
|
+
"insertText": "function ${1:Component}() {\n\treturn (\n\t\t<div className=\"${2}\">${3}</div>\n\t);\n}\n\nexport default ${1:Component};",
|
|
19
|
+
"description": "React function component (JSX)",
|
|
20
|
+
"completeBracketPairs": true
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"triggerPattern": "^\\\\s*useState\\\\s*$",
|
|
24
|
+
"insertText": "const [${1:state}, set${2:State}] = useState(${3:initial});",
|
|
25
|
+
"description": "React useState hook",
|
|
26
|
+
"completeBracketPairs": true
|
|
15
27
|
}
|
|
16
28
|
]
|
|
17
29
|
}
|