@zenithbuild/language 0.6.1 → 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 +68 -95
- 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,54 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenithbuild/language",
|
|
3
3
|
"displayName": "Zenith Language Support",
|
|
4
|
-
"description": "
|
|
5
|
-
"version": "0.6.
|
|
4
|
+
"description": "Canonical Zenith syntax highlighting, snippets, and VS Code integration",
|
|
5
|
+
"version": "0.6.17",
|
|
6
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",
|
|
7
18
|
"engines": {
|
|
8
|
-
"vscode": "^1.
|
|
19
|
+
"vscode": "^1.90.0"
|
|
9
20
|
},
|
|
10
|
-
"main": "./out/extension.
|
|
21
|
+
"main": "./out/extension.cjs",
|
|
11
22
|
"activationEvents": [
|
|
12
23
|
"onLanguage:zenith",
|
|
13
|
-
"onCommand:zenith.runContractPack",
|
|
14
|
-
"onCommand:zenith.runLegacyTests",
|
|
15
|
-
"onCommand:zenith.build",
|
|
16
24
|
"onCommand:zenith.restartServer"
|
|
17
25
|
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"test": "node --test test/grammar-snippets.spec.js",
|
|
20
|
-
"build:server": "cd ../zenith-language-server && bun run build",
|
|
21
|
-
"compile": "bun x esbuild src/extension.ts --bundle --outfile=out/extension.js --external:vscode --external:vscode-languageclient/node --format=cjs --platform=node && cp ../zenith-language-server/dist/server.js out/server.js",
|
|
22
|
-
"watch": "bun run compile -- --watch",
|
|
23
|
-
"build:markplace": "bun run build:marketplace",
|
|
24
|
-
"build:marketplace": "bun run build:server && bun run compile && node scripts/build.js marketplace",
|
|
25
|
-
"build:openvsx": "bun run build:server && bun run compile && node scripts/build.js openvsx",
|
|
26
|
-
"build:all": "bun run build:server && bun run compile && node scripts/build.js all",
|
|
27
|
-
"release": "bun run scripts/release.ts",
|
|
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
26
|
"categories": [
|
|
41
27
|
"Programming Languages"
|
|
42
28
|
],
|
|
43
|
-
"icon": "assets/logo.png",
|
|
44
29
|
"keywords": [
|
|
45
30
|
"zenith",
|
|
46
|
-
"
|
|
31
|
+
"language",
|
|
32
|
+
"lsp",
|
|
47
33
|
"syntax",
|
|
48
|
-
"
|
|
49
|
-
"intellisense",
|
|
50
|
-
"framework"
|
|
34
|
+
"tooling"
|
|
51
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
|
+
},
|
|
52
66
|
"contributes": {
|
|
53
67
|
"languages": [
|
|
54
68
|
{
|
|
@@ -65,32 +79,32 @@
|
|
|
65
79
|
"configuration": "./language-configuration.json"
|
|
66
80
|
}
|
|
67
81
|
],
|
|
68
|
-
"snippets": [
|
|
69
|
-
{
|
|
70
|
-
"language": "zenith",
|
|
71
|
-
"path": "./snippets/zenith.code-snippets"
|
|
72
|
-
}
|
|
73
|
-
],
|
|
74
82
|
"grammars": [
|
|
75
83
|
{
|
|
76
84
|
"language": "zenith",
|
|
77
85
|
"scopeName": "text.html.zenith",
|
|
78
86
|
"path": "./syntaxes/zenith.tmLanguage.json",
|
|
79
87
|
"embeddedLanguages": {
|
|
80
|
-
"source.js": "javascript",
|
|
81
88
|
"source.ts": "typescript",
|
|
82
|
-
"source.
|
|
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"
|
|
89
|
+
"source.css": "css"
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
],
|
|
93
|
+
"snippets": [
|
|
94
|
+
{
|
|
95
|
+
"language": "zenith",
|
|
96
|
+
"path": "./snippets/zenith.code-snippets"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"commands": [
|
|
100
|
+
{
|
|
101
|
+
"command": "zenith.restartServer",
|
|
102
|
+
"title": "Zenith: Restart Server",
|
|
103
|
+
"category": "Zenith"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
91
106
|
"configurationDefaults": {
|
|
92
107
|
"[zenith]": {
|
|
93
|
-
"editor.formatOnSave": true,
|
|
94
108
|
"editor.wordBasedSuggestions": "off",
|
|
95
109
|
"editor.suggest.insertMode": "replace",
|
|
96
110
|
"editor.semanticHighlighting.enabled": true,
|
|
@@ -108,45 +122,19 @@
|
|
|
108
122
|
"zenith": "html"
|
|
109
123
|
}
|
|
110
124
|
},
|
|
111
|
-
"commands": [
|
|
112
|
-
{
|
|
113
|
-
"command": "zenith.runContractPack",
|
|
114
|
-
"title": "Zenith: Run Contract Pack",
|
|
115
|
-
"category": "Zenith"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"command": "zenith.runLegacyTests",
|
|
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
125
|
"configuration": {
|
|
134
126
|
"type": "object",
|
|
135
127
|
"title": "Zenith",
|
|
136
128
|
"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
129
|
"zenith.strictDomLints": {
|
|
147
130
|
"type": "boolean",
|
|
148
131
|
"default": false,
|
|
149
|
-
"description": "
|
|
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."
|
|
150
138
|
},
|
|
151
139
|
"zenith.languageServer.path": {
|
|
152
140
|
"type": "string",
|
|
@@ -155,20 +143,5 @@
|
|
|
155
143
|
}
|
|
156
144
|
}
|
|
157
145
|
}
|
|
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"
|
|
166
|
-
},
|
|
167
|
-
"publishConfig": {
|
|
168
|
-
"access": "public"
|
|
169
|
-
},
|
|
170
|
-
"license": "MIT",
|
|
171
|
-
"dependencies": {
|
|
172
|
-
"vscode-languageclient": "^9.0.1"
|
|
173
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
|
}
|