@purview-dev/astroc4 1.0.0-prerelease.3 → 1.0.0-prerelease.4

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.
@@ -0,0 +1,327 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3
+ "$generated": {
4
+ "repo": "likec4/likec4",
5
+ "ref": "main",
6
+ "sha": "da5af77245f9",
7
+ "by": "astroc4/scripts/sync-grammar.ts"
8
+ },
9
+ "name": "likec4",
10
+ "displayName": "LikeC4",
11
+ "scopeName": "source.likec4",
12
+ "fileTypes": [
13
+ "c4",
14
+ "likec4"
15
+ ],
16
+ "patterns": [
17
+ {
18
+ "include": "#everything"
19
+ }
20
+ ],
21
+ "repository": {
22
+ "everything": {
23
+ "patterns": [
24
+ {
25
+ "include": "#comments"
26
+ },
27
+ {
28
+ "include": "#strings"
29
+ },
30
+ {
31
+ "include": "#urls"
32
+ },
33
+ {
34
+ "include": "#icons"
35
+ },
36
+ {
37
+ "include": "#hex-colors"
38
+ },
39
+ {
40
+ "include": "#tags"
41
+ },
42
+ {
43
+ "include": "#typed-arrow"
44
+ },
45
+ {
46
+ "include": "#declarations"
47
+ },
48
+ {
49
+ "include": "#keywords"
50
+ },
51
+ {
52
+ "include": "#numbers"
53
+ },
54
+ {
55
+ "include": "#operators"
56
+ },
57
+ {
58
+ "include": "#punctuation"
59
+ }
60
+ ]
61
+ },
62
+ "comments": {
63
+ "patterns": [
64
+ {
65
+ "name": "comment.block.likec4",
66
+ "begin": "/\\*",
67
+ "end": "\\*/",
68
+ "captures": {
69
+ "0": {
70
+ "name": "punctuation.definition.comment.likec4"
71
+ }
72
+ }
73
+ },
74
+ {
75
+ "name": "comment.line.double-slash.likec4",
76
+ "match": "//.*$",
77
+ "captures": {
78
+ "0": {
79
+ "name": "punctuation.definition.comment.likec4"
80
+ }
81
+ }
82
+ }
83
+ ]
84
+ },
85
+ "strings": {
86
+ "patterns": [
87
+ {
88
+ "name": "string.quoted.triple.likec4",
89
+ "begin": "'''",
90
+ "end": "'''",
91
+ "beginCaptures": {
92
+ "0": {
93
+ "name": "punctuation.definition.string.begin.likec4"
94
+ }
95
+ },
96
+ "endCaptures": {
97
+ "0": {
98
+ "name": "punctuation.definition.string.end.likec4"
99
+ }
100
+ }
101
+ },
102
+ {
103
+ "name": "string.quoted.triple.likec4",
104
+ "begin": "\"\"\"",
105
+ "end": "\"\"\"",
106
+ "beginCaptures": {
107
+ "0": {
108
+ "name": "punctuation.definition.string.begin.likec4"
109
+ }
110
+ },
111
+ "endCaptures": {
112
+ "0": {
113
+ "name": "punctuation.definition.string.end.likec4"
114
+ }
115
+ }
116
+ },
117
+ {
118
+ "name": "string.quoted.single.likec4",
119
+ "begin": "'",
120
+ "end": "'|$",
121
+ "beginCaptures": {
122
+ "0": {
123
+ "name": "punctuation.definition.string.begin.likec4"
124
+ }
125
+ },
126
+ "endCaptures": {
127
+ "0": {
128
+ "name": "punctuation.definition.string.end.likec4"
129
+ }
130
+ },
131
+ "patterns": [
132
+ {
133
+ "name": "constant.character.escape.likec4",
134
+ "match": "\\\\."
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ "name": "string.quoted.double.likec4",
140
+ "begin": "\"",
141
+ "end": "\"|$",
142
+ "beginCaptures": {
143
+ "0": {
144
+ "name": "punctuation.definition.string.begin.likec4"
145
+ }
146
+ },
147
+ "endCaptures": {
148
+ "0": {
149
+ "name": "punctuation.definition.string.end.likec4"
150
+ }
151
+ },
152
+ "patterns": [
153
+ {
154
+ "name": "constant.character.escape.likec4",
155
+ "match": "\\\\."
156
+ }
157
+ ]
158
+ }
159
+ ]
160
+ },
161
+ "urls": {
162
+ "name": "markup.underline.link.likec4",
163
+ "match": "\\bhttps?://[^\\s'\"]+"
164
+ },
165
+ "icons": {
166
+ "comment": "Bundled icon ids: `tech:nginx`, `aws:…`, `gcp:…`, …",
167
+ "match": "\\b(aws|azure|bootstrap|gcp|md|tech)(:)([\\w-]+)",
168
+ "captures": {
169
+ "1": {
170
+ "name": "support.constant.icon-pack.likec4"
171
+ },
172
+ "2": {
173
+ "name": "punctuation.separator.likec4"
174
+ },
175
+ "3": {
176
+ "name": "support.constant.icon.likec4"
177
+ }
178
+ }
179
+ },
180
+ "hex-colors": {
181
+ "name": "constant.other.color.rgb-value.hex.likec4",
182
+ "match": "#(?:[0-9A-Fa-f]{8}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})(?![\\w-])"
183
+ },
184
+ "tags": {
185
+ "name": "entity.name.tag.likec4",
186
+ "match": "#[A-Za-z_][\\w-]*"
187
+ },
188
+ "typed-arrow": {
189
+ "comment": "`a -[https]-> b`",
190
+ "match": "(-\\[)\\s*([A-Za-z_][\\w-]*)\\s*(\\]->)",
191
+ "captures": {
192
+ "1": {
193
+ "name": "keyword.operator.arrow.likec4"
194
+ },
195
+ "2": {
196
+ "name": "entity.name.type.relationship.likec4"
197
+ },
198
+ "3": {
199
+ "name": "keyword.operator.arrow.likec4"
200
+ }
201
+ }
202
+ },
203
+ "declarations": {
204
+ "patterns": [
205
+ {
206
+ "comment": "`element system`, `deploymentNode region`, `tag tls`, `relationship https`. Not `where tag is #x`.",
207
+ "match": "\\b(element|deploymentNode|tag|relationship)\\s+(?!is\\b)([A-Za-z_][\\w-]*)(?=\\s*(?:\\{|$|//))",
208
+ "captures": {
209
+ "1": {
210
+ "name": "storage.type.likec4"
211
+ },
212
+ "2": {
213
+ "name": "entity.name.type.likec4"
214
+ }
215
+ }
216
+ },
217
+ {
218
+ "comment": "`color testingBlue #0046BE` declares; `color testingBlue` inside a style block only refers.",
219
+ "match": "\\b(color)\\s+([A-Za-z_][\\w-]*)(?=\\s+#)",
220
+ "captures": {
221
+ "1": {
222
+ "name": "storage.type.likec4"
223
+ },
224
+ "2": {
225
+ "name": "entity.name.type.likec4"
226
+ }
227
+ }
228
+ },
229
+ {
230
+ "comment": "`view index`, `dynamic view firstRequest`, `deployment view prod`, `view internals of site`",
231
+ "match": "\\b(?:(dynamic|deployment)\\s+)?(view)\\s+([A-Za-z_]\\w*)",
232
+ "captures": {
233
+ "1": {
234
+ "name": "storage.modifier.likec4"
235
+ },
236
+ "2": {
237
+ "name": "storage.type.view.likec4"
238
+ },
239
+ "3": {
240
+ "name": "entity.name.function.view.likec4"
241
+ }
242
+ }
243
+ },
244
+ {
245
+ "comment": "`reader = actor 'Engineer'`",
246
+ "match": "\\b([A-Za-z_]\\w*)\\s*(=)(?!=)\\s*(?!(?:autoLayout|deploymentNode|dynamic|element|exclude|extend|extends|from|icons|import|include|instance|instanceOf|is|metadata|node|not|of|predicate|relationship|rgb|rgba|view|where|with|add|deployment|diff|dynamicPredicateGroup|global|group|likec4lib|model|predicateGroup|rank|remove|specification|style|styleGroup|views|alt|break|catch|else|finally|if|loop|opt|par|parallel|try|when)\\b)([A-Za-z_]\\w*)?",
247
+ "captures": {
248
+ "1": {
249
+ "name": "variable.other.definition.likec4"
250
+ },
251
+ "2": {
252
+ "name": "keyword.operator.assignment.likec4"
253
+ },
254
+ "3": {
255
+ "name": "entity.name.type.likec4"
256
+ }
257
+ }
258
+ }
259
+ ]
260
+ },
261
+ "keywords": {
262
+ "patterns": [
263
+ {
264
+ "comment": "Keywords that open a block: `model { … }`.",
265
+ "name": "keyword.control.block.likec4",
266
+ "match": "\\b(?:add|deployment|diff|dynamicPredicateGroup|global|group|likec4lib|model|predicateGroup|rank|remove|specification|style|styleGroup|views)\\b(?=\\s*\\{)"
267
+ },
268
+ {
269
+ "name": "keyword.operator.word.likec4",
270
+ "match": "\\b(?:and|or|not|is)\\b"
271
+ },
272
+ {
273
+ "name": "keyword.control.likec4",
274
+ "match": "\\b(?:autoLayout|deploymentNode|dynamic|element|exclude|extend|extends|from|icons|import|include|instance|instanceOf|is|metadata|node|not|of|predicate|relationship|rgb|rgba|view|where|with|alt|break|catch|else|finally|if|loop|opt|par|parallel|try|when|add|deployment|diff|dynamicPredicateGroup|global|group|likec4lib|model|predicateGroup|rank|remove|specification|style|styleGroup|views)\\b"
275
+ },
276
+ {
277
+ "name": "variable.language.likec4",
278
+ "match": "\\b(?:source|target)\\b"
279
+ },
280
+ {
281
+ "name": "support.type.property-name.likec4",
282
+ "match": "\\b(?:border|color|description|descriptionFile|head|icon|iconColor|iconPosition|iconSize|includeAncestors|kind|line|link|multiple|navigateTo|notation|notes|opacity|order|padding|routing|shape|size|sizing|style|summary|tag|tail|technology|textSize|title|variant)\\b"
283
+ },
284
+ {
285
+ "name": "constant.language.likec4",
286
+ "match": "\\b(?:agent|amber|auto|blue|bottom|BottomTop|browser|bucket|component|crow|cylinder|dashed|diagram|diamond|document|dot|dotted|fixed|gray|green|indigo|large|left|LeftRight|lg|max|md|medium|min|mobile|muted|none|normal|odiamond|odot|onormal|open|ortho|person|primary|queue|rectangle|red|right|RightLeft|same|secondary|sequence|sink|sky|slate|sm|small|solid|source|spline|storage|top|TopBottom|vee|xl|xlarge|xs|xsmall)\\b"
287
+ }
288
+ ]
289
+ },
290
+ "numbers": {
291
+ "name": "constant.numeric.likec4",
292
+ "match": "\\b\\d+(?:\\.\\d+)?%?"
293
+ },
294
+ "operators": {
295
+ "patterns": [
296
+ {
297
+ "name": "keyword.operator.arrow.likec4",
298
+ "match": "\\]<->|\\]->|<->|->"
299
+ },
300
+ {
301
+ "name": "keyword.operator.wildcard.likec4",
302
+ "match": "\\.\\*\\*|\\.\\*|\\*\\*|\\*"
303
+ }
304
+ ]
305
+ },
306
+ "punctuation": {
307
+ "patterns": [
308
+ {
309
+ "name": "punctuation.section.block.begin.likec4",
310
+ "match": "\\{"
311
+ },
312
+ {
313
+ "name": "punctuation.section.block.end.likec4",
314
+ "match": "\\}"
315
+ },
316
+ {
317
+ "name": "punctuation.separator.comma.likec4",
318
+ "match": ","
319
+ },
320
+ {
321
+ "name": "punctuation.accessor.likec4",
322
+ "match": "\\."
323
+ }
324
+ ]
325
+ }
326
+ }
327
+ }
@@ -0,0 +1,21 @@
1
+ export declare const translations: {
2
+ en: {
3
+ 'likec4.view.title': string;
4
+ 'likec4.view.description': string;
5
+ 'likec4.view.hint': string;
6
+ 'likec4.view.badge': string;
7
+ 'likec4.view.loading': string;
8
+ 'likec4.fence.title': string;
9
+ 'likec4.fence.hint': string;
10
+ 'likec4.fence.loading': string;
11
+ 'likec4.error.title': string;
12
+ 'likec4.error.body': string;
13
+ 'likec4.error.retry': string;
14
+ 'likec4.error.viewIdRequired': string;
15
+ 'likec4.error.noProjects': string;
16
+ 'likec4.error.unknownProject': string;
17
+ 'likec4.error.unresolvedProject': string;
18
+ 'likec4.error.loadFailed': string;
19
+ };
20
+ };
21
+ export default translations;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purview-dev/astroc4",
3
- "version": "1.0.0-prerelease.3",
3
+ "version": "1.0.0-prerelease.4",
4
4
  "description": "Interactive LikeC4 architecture diagrams for Astro and Starlight: <LikeC4View>, ```likec4 fences, and LikeC4 syntax highlighting derived from the live Langium grammar.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -52,6 +52,7 @@
52
52
  ],
53
53
  "scripts": {
54
54
  "build:lib": "bun scripts/build.ts",
55
+ "prepublishOnly": "bun scripts/check-dist.ts",
55
56
  "dev": "bun run build:lib && cd playground && astro dev",
56
57
  "build": "bun run build:lib && cd playground && astro build",
57
58
  "preview": "cd playground && astro preview",