@zenithbuild/language 0.6.0 → 0.6.17
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/README.md +7 -55
- package/language-configuration.json +25 -120
- package/out/extension.cjs +113 -0
- package/out/server.mjs +597 -0
- package/package.json +139 -166
- package/snippets/zenith.code-snippets +31 -47
- package/syntaxes/zenith.tmLanguage.json +162 -714
- package/.github/workflows/release.yml +0 -261
- package/.releaserc.json +0 -73
- package/.vscodeignore +0 -9
- package/CHANGELOG.md +0 -90
- package/RELEASE_NOTES.md +0 -30
- package/RELEASE_NOTES_v0.6.0.md +0 -26
- package/assets/logo.png +0 -0
- package/bun.lock +0 -91
- package/icons/zen.icns +0 -0
- package/icons/zenith-icon-theme.json +0 -14
- package/scripts/build.js +0 -141
- package/scripts/release.ts +0 -571
- package/src/extension.ts +0 -147
- package/test/fixtures/grammar-test.zen +0 -36
- package/test/grammar-snippets.spec.js +0 -73
- package/tsconfig.json +0 -26
package/package.json
CHANGED
|
@@ -1,174 +1,147 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
"name": "@zenithbuild/language",
|
|
3
|
+
"displayName": "Zenith Language Support",
|
|
4
|
+
"description": "Canonical Zenith syntax highlighting, snippets, and VS Code integration",
|
|
5
|
+
"version": "0.6.17",
|
|
6
|
+
"publisher": "ZenithBuild",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"private": false,
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/zenithbuild/framework",
|
|
12
|
+
"directory": "packages/language"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/zenithbuild/framework/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/zenithbuild/framework#readme",
|
|
18
|
+
"engines": {
|
|
19
|
+
"vscode": "^1.90.0"
|
|
20
|
+
},
|
|
21
|
+
"main": "./out/extension.cjs",
|
|
22
|
+
"activationEvents": [
|
|
23
|
+
"onLanguage:zenith",
|
|
24
|
+
"onCommand:zenith.restartServer"
|
|
25
|
+
],
|
|
26
|
+
"categories": [
|
|
27
|
+
"Programming Languages"
|
|
28
|
+
],
|
|
29
|
+
"keywords": [
|
|
30
|
+
"zenith",
|
|
31
|
+
"language",
|
|
32
|
+
"lsp",
|
|
33
|
+
"syntax",
|
|
34
|
+
"tooling"
|
|
35
|
+
],
|
|
36
|
+
"files": [
|
|
37
|
+
"out",
|
|
38
|
+
"snippets",
|
|
39
|
+
"syntaxes",
|
|
40
|
+
"language-configuration.json",
|
|
41
|
+
"README.md",
|
|
42
|
+
"LICENSE",
|
|
43
|
+
"package.json"
|
|
44
|
+
],
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "bun run build:server && rm -rf out && mkdir -p out && bun x esbuild src/extension.ts --bundle --outfile=out/extension.cjs --external:vscode --external:vscode-languageclient/node --format=cjs --platform=node && cp ../language-server/dist/server.mjs out/server.mjs",
|
|
50
|
+
"build:server": "bun run --cwd ../language-server build",
|
|
51
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
52
|
+
"test": "node --test test/*.spec.mjs",
|
|
53
|
+
"prepublishOnly": "bun run build"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"vscode-languageclient": "^9.0.1"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@types/node": "latest",
|
|
60
|
+
"@types/vscode": "^1.90.0",
|
|
61
|
+
"esbuild": "^0.25.11",
|
|
62
|
+
"typescript": "^5.7.3",
|
|
63
|
+
"vscode-oniguruma": "^2.0.1",
|
|
64
|
+
"vscode-textmate": "^9.2.0"
|
|
65
|
+
},
|
|
66
|
+
"contributes": {
|
|
67
|
+
"languages": [
|
|
68
|
+
{
|
|
69
|
+
"id": "zenith",
|
|
70
|
+
"aliases": [
|
|
71
|
+
"Zenith",
|
|
72
|
+
"zenith"
|
|
73
|
+
],
|
|
74
|
+
"extensions": [
|
|
75
|
+
".zen",
|
|
76
|
+
".zen.html",
|
|
77
|
+
".zenx"
|
|
78
|
+
],
|
|
79
|
+
"configuration": "./language-configuration.json"
|
|
80
|
+
}
|
|
17
81
|
],
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"release:dry": "bun run scripts/release.ts --dry-run",
|
|
29
|
-
"release:patch": "bun run scripts/release.ts --bump=patch",
|
|
30
|
-
"release:minor": "bun run scripts/release.ts --bump=minor",
|
|
31
|
-
"release:major": "bun run scripts/release.ts --bump=major",
|
|
32
|
-
"build": "tsc"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@types/node": "^20.0.0",
|
|
36
|
-
"@types/vscode": "^1.80.0",
|
|
37
|
-
"esbuild": "^0.19.0",
|
|
38
|
-
"typescript": "^5.0.0"
|
|
39
|
-
},
|
|
40
|
-
"categories": [
|
|
41
|
-
"Programming Languages"
|
|
82
|
+
"grammars": [
|
|
83
|
+
{
|
|
84
|
+
"language": "zenith",
|
|
85
|
+
"scopeName": "text.html.zenith",
|
|
86
|
+
"path": "./syntaxes/zenith.tmLanguage.json",
|
|
87
|
+
"embeddedLanguages": {
|
|
88
|
+
"source.ts": "typescript",
|
|
89
|
+
"source.css": "css"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
42
92
|
],
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
"zenith",
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
"highlighting",
|
|
49
|
-
"intellisense",
|
|
50
|
-
"framework"
|
|
93
|
+
"snippets": [
|
|
94
|
+
{
|
|
95
|
+
"language": "zenith",
|
|
96
|
+
"path": "./snippets/zenith.code-snippets"
|
|
97
|
+
}
|
|
51
98
|
],
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"snippets": [
|
|
69
|
-
{
|
|
70
|
-
"language": "zenith",
|
|
71
|
-
"path": "./snippets/zenith.code-snippets"
|
|
72
|
-
}
|
|
73
|
-
],
|
|
74
|
-
"grammars": [
|
|
75
|
-
{
|
|
76
|
-
"language": "zenith",
|
|
77
|
-
"scopeName": "text.html.zenith",
|
|
78
|
-
"path": "./syntaxes/zenith.tmLanguage.json",
|
|
79
|
-
"embeddedLanguages": {
|
|
80
|
-
"source.js": "javascript",
|
|
81
|
-
"source.ts": "typescript",
|
|
82
|
-
"source.ts.embedded.zenith": "typescript",
|
|
83
|
-
"source.css": "css",
|
|
84
|
-
"text.html.basic": "html",
|
|
85
|
-
"meta.embedded.block.javascript": "javascript",
|
|
86
|
-
"meta.embedded.block.typescript": "typescript",
|
|
87
|
-
"meta.embedded.block.css": "css"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
"configurationDefaults": {
|
|
92
|
-
"[zenith]": {
|
|
93
|
-
"editor.formatOnSave": true,
|
|
94
|
-
"editor.wordBasedSuggestions": "off",
|
|
95
|
-
"editor.suggest.insertMode": "replace",
|
|
96
|
-
"editor.semanticHighlighting.enabled": true,
|
|
97
|
-
"editor.quickSuggestions": {
|
|
98
|
-
"other": true,
|
|
99
|
-
"comments": false,
|
|
100
|
-
"strings": true
|
|
101
|
-
},
|
|
102
|
-
"editor.autoClosingBrackets": "always"
|
|
103
|
-
},
|
|
104
|
-
"emmet.includeLanguages": {
|
|
105
|
-
"zenith": "html"
|
|
106
|
-
},
|
|
107
|
-
"emmet.syntaxProfiles": {
|
|
108
|
-
"zenith": "html"
|
|
109
|
-
}
|
|
99
|
+
"commands": [
|
|
100
|
+
{
|
|
101
|
+
"command": "zenith.restartServer",
|
|
102
|
+
"title": "Zenith: Restart Server",
|
|
103
|
+
"category": "Zenith"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"configurationDefaults": {
|
|
107
|
+
"[zenith]": {
|
|
108
|
+
"editor.wordBasedSuggestions": "off",
|
|
109
|
+
"editor.suggest.insertMode": "replace",
|
|
110
|
+
"editor.semanticHighlighting.enabled": true,
|
|
111
|
+
"editor.quickSuggestions": {
|
|
112
|
+
"other": true,
|
|
113
|
+
"comments": false,
|
|
114
|
+
"strings": true
|
|
110
115
|
},
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"title": "Zenith: Run Legacy Tests",
|
|
120
|
-
"category": "Zenith"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"command": "zenith.build",
|
|
124
|
-
"title": "Zenith: Build",
|
|
125
|
-
"category": "Zenith"
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"command": "zenith.restartServer",
|
|
129
|
-
"title": "Zenith: Restart Server",
|
|
130
|
-
"category": "Zenith"
|
|
131
|
-
}
|
|
132
|
-
],
|
|
133
|
-
"configuration": {
|
|
134
|
-
"type": "object",
|
|
135
|
-
"title": "Zenith",
|
|
136
|
-
"properties": {
|
|
137
|
-
"zenith.componentScripts": {
|
|
138
|
-
"type": "string",
|
|
139
|
-
"enum": [
|
|
140
|
-
"forbid",
|
|
141
|
-
"allow"
|
|
142
|
-
],
|
|
143
|
-
"default": "forbid",
|
|
144
|
-
"description": "Component script contract mode. 'forbid' enforces structural-only components; 'allow' disables this diagnostic."
|
|
145
|
-
},
|
|
146
|
-
"zenith.strictDomLints": {
|
|
147
|
-
"type": "boolean",
|
|
148
|
-
"default": false,
|
|
149
|
-
"description": "When true, ZEN-DOM-* lints (querySelector, addEventListener, etc.) are reported as errors instead of warnings."
|
|
150
|
-
},
|
|
151
|
-
"zenith.languageServer.path": {
|
|
152
|
-
"type": "string",
|
|
153
|
-
"default": "",
|
|
154
|
-
"description": "Optional absolute or workspace-relative path to a custom Zenith language server entry file."
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
"repository": {
|
|
160
|
-
"type": "git",
|
|
161
|
-
"url": "https://github.com/zenithbuild/zenith"
|
|
162
|
-
},
|
|
163
|
-
"homepage": "https://github.com/zenithbuild/zenith#readme",
|
|
164
|
-
"bugs": {
|
|
165
|
-
"url": "https://github.com/zenithbuild/zenith/issues"
|
|
116
|
+
"editor.autoClosingBrackets": "always"
|
|
117
|
+
},
|
|
118
|
+
"emmet.includeLanguages": {
|
|
119
|
+
"zenith": "html"
|
|
120
|
+
},
|
|
121
|
+
"emmet.syntaxProfiles": {
|
|
122
|
+
"zenith": "html"
|
|
123
|
+
}
|
|
166
124
|
},
|
|
167
|
-
"
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
125
|
+
"configuration": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"title": "Zenith",
|
|
128
|
+
"properties": {
|
|
129
|
+
"zenith.strictDomLints": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"default": false,
|
|
132
|
+
"description": "Report ZEN-DOM-* warnings as errors when true."
|
|
133
|
+
},
|
|
134
|
+
"zenith.enableFrameworkSnippets": {
|
|
135
|
+
"type": "boolean",
|
|
136
|
+
"default": false,
|
|
137
|
+
"description": "Reserved compatibility flag. Zenith ships only canonical Zenith snippets."
|
|
138
|
+
},
|
|
139
|
+
"zenith.languageServer.path": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"default": "",
|
|
142
|
+
"description": "Optional absolute or workspace-relative path to a custom Zenith language server entry file."
|
|
143
|
+
}
|
|
144
|
+
}
|
|
173
145
|
}
|
|
146
|
+
}
|
|
174
147
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"prefix": "state
|
|
2
|
+
"state-toggle": {
|
|
3
|
+
"prefix": "state-toggle",
|
|
4
4
|
"body": [
|
|
5
5
|
"state ${1:open} = false",
|
|
6
6
|
"function toggle${1/(.*)/${1:/capitalize}/}() { ${1:open} = !${1:open} }",
|
|
@@ -8,87 +8,71 @@
|
|
|
8
8
|
],
|
|
9
9
|
"description": "State variable with toggle function"
|
|
10
10
|
},
|
|
11
|
-
"
|
|
12
|
-
"prefix": "signal
|
|
11
|
+
"signal-counter": {
|
|
12
|
+
"prefix": "signal-counter",
|
|
13
13
|
"body": [
|
|
14
14
|
"const ${1:count} = signal(${2:0})",
|
|
15
|
+
"${1:count}.set(${1:count}.get() + 1)",
|
|
15
16
|
"$0"
|
|
16
17
|
],
|
|
17
|
-
"description": "Signal with get/set"
|
|
18
|
+
"description": "Signal with explicit get/set"
|
|
18
19
|
},
|
|
19
|
-
"
|
|
20
|
-
"prefix": "ref
|
|
20
|
+
"ref-dom": {
|
|
21
|
+
"prefix": "ref-dom",
|
|
21
22
|
"body": [
|
|
22
|
-
"const ${1:
|
|
23
|
+
"const ${1:node} = ref<${2:HTMLElement}>()",
|
|
23
24
|
"$0"
|
|
24
25
|
],
|
|
25
|
-
"description": "Ref for DOM node"
|
|
26
|
+
"description": "Ref for a DOM node"
|
|
26
27
|
},
|
|
27
|
-
"
|
|
28
|
-
"prefix": "
|
|
28
|
+
"zenmount-cleanup": {
|
|
29
|
+
"prefix": "zenmount-cleanup",
|
|
29
30
|
"body": [
|
|
30
31
|
"zenMount((ctx) => {",
|
|
31
32
|
"\t$0",
|
|
32
|
-
"\tctx.cleanup(${1:
|
|
33
|
+
"\tctx.cleanup(${1:dispose})",
|
|
33
34
|
"})"
|
|
34
35
|
],
|
|
35
|
-
"description": "zenMount with
|
|
36
|
+
"description": "zenMount with registered cleanup"
|
|
36
37
|
},
|
|
37
|
-
"
|
|
38
|
-
"prefix": "
|
|
38
|
+
"zeneffect-basic": {
|
|
39
|
+
"prefix": "zeneffect-basic",
|
|
39
40
|
"body": [
|
|
40
41
|
"zenEffect(() => {",
|
|
41
42
|
"\t$0",
|
|
42
43
|
"})"
|
|
43
44
|
],
|
|
44
|
-
"description": "
|
|
45
|
+
"description": "Basic zenEffect pattern"
|
|
45
46
|
},
|
|
46
|
-
"
|
|
47
|
-
"prefix": "
|
|
48
|
-
"body": [
|
|
49
|
-
"const win = zenWindow()",
|
|
50
|
-
"if (!win) return",
|
|
51
|
-
"$0"
|
|
52
|
-
],
|
|
53
|
-
"description": "SSR-safe window access"
|
|
54
|
-
},
|
|
55
|
-
"zenOn Keydown Escape": {
|
|
56
|
-
"prefix": "zenOn keydown escape",
|
|
47
|
+
"zenon-keydown-escape": {
|
|
48
|
+
"prefix": "zenon-keydown-escape",
|
|
57
49
|
"body": [
|
|
58
50
|
"const doc = zenDocument()",
|
|
59
51
|
"if (!doc) return",
|
|
60
|
-
"const offKey = zenOn(doc, 'keydown', (
|
|
61
|
-
"\tif (
|
|
52
|
+
"const offKey = zenOn(doc, 'keydown', (event) => {",
|
|
53
|
+
"\tif (event.key === 'Escape') ${1:closeMenu}()",
|
|
62
54
|
"})",
|
|
63
55
|
"ctx.cleanup(offKey)",
|
|
64
56
|
"$0"
|
|
65
57
|
],
|
|
66
|
-
"description": "
|
|
58
|
+
"description": "Escape key listener via zenOn"
|
|
67
59
|
},
|
|
68
|
-
"
|
|
69
|
-
"prefix": "
|
|
60
|
+
"zenresize-viewport": {
|
|
61
|
+
"prefix": "zenresize-viewport",
|
|
70
62
|
"body": [
|
|
71
|
-
"const
|
|
63
|
+
"const offResize = zenResize(({ w, h }) => {",
|
|
72
64
|
"\t$0",
|
|
73
65
|
"})",
|
|
74
|
-
"ctx.cleanup(
|
|
75
|
-
],
|
|
76
|
-
"description": "zenResize with ctx.cleanup (use inside zenMount)"
|
|
77
|
-
},
|
|
78
|
-
"collectRefs Links": {
|
|
79
|
-
"prefix": "collectRefs links",
|
|
80
|
-
"body": [
|
|
81
|
-
"const nodes = collectRefs(${1:refA}, ${2:refB}, ${3:refC})",
|
|
82
|
-
"$0"
|
|
66
|
+
"ctx.cleanup(offResize)"
|
|
83
67
|
],
|
|
84
|
-
"description": "
|
|
68
|
+
"description": "Viewport resize handling via zenResize"
|
|
85
69
|
},
|
|
86
|
-
"
|
|
87
|
-
"prefix": "
|
|
70
|
+
"collectrefs": {
|
|
71
|
+
"prefix": "collectrefs",
|
|
88
72
|
"body": [
|
|
89
|
-
"
|
|
73
|
+
"const nodes = collectRefs(${1:firstRef}, ${2:secondRef}, ${3:thirdRef})",
|
|
90
74
|
"$0"
|
|
91
75
|
],
|
|
92
|
-
"description": "
|
|
76
|
+
"description": "Collect multiple refs deterministically"
|
|
93
77
|
}
|
|
94
78
|
}
|