@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/package.json CHANGED
@@ -1,174 +1,147 @@
1
1
  {
2
- "name": "@zenithbuild/language",
3
- "displayName": "Zenith Language Support",
4
- "description": "Syntax highlighting, IntelliSense, and editor support for Zenith Framework (.zen files)",
5
- "version": "0.6.0",
6
- "publisher": "ZenithBuild",
7
- "engines": {
8
- "vscode": "^1.80.0"
9
- },
10
- "main": "./out/extension.js",
11
- "activationEvents": [
12
- "onLanguage:zenith",
13
- "onCommand:zenith.runContractPack",
14
- "onCommand:zenith.runLegacyTests",
15
- "onCommand:zenith.build",
16
- "onCommand:zenith.restartServer"
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
- "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
- "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
- "icon": "assets/logo.png",
44
- "keywords": [
45
- "zenith",
46
- "zen",
47
- "syntax",
48
- "highlighting",
49
- "intellisense",
50
- "framework"
93
+ "snippets": [
94
+ {
95
+ "language": "zenith",
96
+ "path": "./snippets/zenith.code-snippets"
97
+ }
51
98
  ],
52
- "contributes": {
53
- "languages": [
54
- {
55
- "id": "zenith",
56
- "aliases": [
57
- "Zenith",
58
- "zenith"
59
- ],
60
- "extensions": [
61
- ".zen",
62
- ".zen.html",
63
- ".zenx"
64
- ],
65
- "configuration": "./language-configuration.json"
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
- "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
- "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
- "publishConfig": {
168
- "access": "public"
169
- },
170
- "license": "MIT",
171
- "dependencies": {
172
- "vscode-languageclient": "^9.0.1"
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
- "State Toggle": {
3
- "prefix": "state toggle",
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
- "Signal Counter": {
12
- "prefix": "signal counter",
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
- "Ref DOM": {
20
- "prefix": "ref dom",
20
+ "ref-dom": {
21
+ "prefix": "ref-dom",
21
22
  "body": [
22
- "const ${1:el} = ref<${2:HTMLElement}>()",
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
- "zenMount Cleanup": {
28
- "prefix": "zenMount cleanup",
28
+ "zenmount-cleanup": {
29
+ "prefix": "zenmount-cleanup",
29
30
  "body": [
30
31
  "zenMount((ctx) => {",
31
32
  "\t$0",
32
- "\tctx.cleanup(${1:disposer})",
33
+ "\tctx.cleanup(${1:dispose})",
33
34
  "})"
34
35
  ],
35
- "description": "zenMount with ctx.cleanup for disposers"
36
+ "description": "zenMount with registered cleanup"
36
37
  },
37
- "zenEffect Pattern": {
38
- "prefix": "zenEffect pattern",
38
+ "zeneffect-basic": {
39
+ "prefix": "zeneffect-basic",
39
40
  "body": [
40
41
  "zenEffect(() => {",
41
42
  "\t$0",
42
43
  "})"
43
44
  ],
44
- "description": "Reactive effect"
45
+ "description": "Basic zenEffect pattern"
45
46
  },
46
- "zenWindow": {
47
- "prefix": "zenWindow",
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', (e) => {",
61
- "\tif (e.key === 'Escape') ${1:closeMenu}()",
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": "zenOn keydown with Escape handler (use inside zenMount)"
58
+ "description": "Escape key listener via zenOn"
67
59
  },
68
- "zenResize Viewport": {
69
- "prefix": "zenResize viewport",
60
+ "zenresize-viewport": {
61
+ "prefix": "zenresize-viewport",
70
62
  "body": [
71
- "const off = zenResize(({ w, h }) => {",
63
+ "const offResize = zenResize(({ w, h }) => {",
72
64
  "\t$0",
73
65
  "})",
74
- "ctx.cleanup(off)"
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": "Collect multiple refs into node list"
68
+ "description": "Viewport resize handling via zenResize"
85
69
  },
86
- "on:click Handler": {
87
- "prefix": "on:click",
70
+ "collectrefs": {
71
+ "prefix": "collectrefs",
88
72
  "body": [
89
- "on:click={${1:handler}}",
73
+ "const nodes = collectRefs(${1:firstRef}, ${2:secondRef}, ${3:thirdRef})",
90
74
  "$0"
91
75
  ],
92
- "description": "Canonical event binding"
76
+ "description": "Collect multiple refs deterministically"
93
77
  }
94
78
  }