brand-intent 0.12.0 → 0.13.0
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 +5 -3
- package/parser/brandParser.ts +125 -1
- package/parser/colorSystem.ts +2 -1
- package/parser/icons.ts +140 -0
- package/parser/index.ts +5 -2
- package/parser/purposeParser.ts +52 -26
- package/vscode-extension/syntaxes/brand.tmLanguage.json +454 -0
- package/vscode-extension/syntaxes/composition.tmLanguage.json +242 -0
- package/vscode-extension/syntaxes/format.tmLanguage.json +103 -0
- package/vscode-extension/syntaxes/identity.tmLanguage.json +83 -0
- package/vscode-extension/syntaxes/purpose.tmLanguage.json +251 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scopeName": "source.brand-intent-brand",
|
|
3
|
+
"name": "Brand Intent Brand",
|
|
4
|
+
"patterns": [
|
|
5
|
+
{ "include": "#family-pair" },
|
|
6
|
+
{ "include": "#comment" },
|
|
7
|
+
{ "include": "#id-field" },
|
|
8
|
+
{ "include": "#name-field" },
|
|
9
|
+
{ "include": "#tokens-enum" },
|
|
10
|
+
{ "include": "#brand-colors-header" },
|
|
11
|
+
{ "include": "#state-colors-header" },
|
|
12
|
+
{ "include": "#color-bounds-header" },
|
|
13
|
+
{ "include": "#color-rules-header" },
|
|
14
|
+
{ "include": "#color-families-header" },
|
|
15
|
+
{ "include": "#color-rules-entry" },
|
|
16
|
+
{ "include": "#color-families-property" },
|
|
17
|
+
{ "include": "#family-header" },
|
|
18
|
+
{ "include": "#family-role" },
|
|
19
|
+
{ "include": "#family-pairs-keyword" },
|
|
20
|
+
{ "include": "#color-mode-enum" },
|
|
21
|
+
{ "include": "#color-strategy-enum" },
|
|
22
|
+
{ "include": "#color-adherence-enum" },
|
|
23
|
+
{ "include": "#state-colors-entry" },
|
|
24
|
+
{ "include": "#color-bounds-entry" },
|
|
25
|
+
{ "include": "#color-adherence-override" },
|
|
26
|
+
{ "include": "#color-group-header" },
|
|
27
|
+
{ "include": "#color-group-property" },
|
|
28
|
+
{ "include": "#color-group-entry" },
|
|
29
|
+
{ "include": "#color-group-reference" },
|
|
30
|
+
{ "include": "#color-group-entry-property" },
|
|
31
|
+
{ "include": "#icons-counter-header" },
|
|
32
|
+
{ "include": "#icon-entry" },
|
|
33
|
+
{ "include": "#counter-value" },
|
|
34
|
+
{ "include": "#theme-header" },
|
|
35
|
+
{ "include": "#brand-color-entry" },
|
|
36
|
+
{ "include": "#brand-color-print-sub" },
|
|
37
|
+
{ "include": "#token-slot-ref" },
|
|
38
|
+
{ "include": "#token-slot-with-comment" },
|
|
39
|
+
{ "include": "#token-slot" },
|
|
40
|
+
{ "include": "#spacing-value" },
|
|
41
|
+
{ "include": "#divider-header" },
|
|
42
|
+
{ "include": "#divider-value" },
|
|
43
|
+
{ "include": "#font-header" },
|
|
44
|
+
{ "include": "#font-value" },
|
|
45
|
+
{ "include": "#typography-header" },
|
|
46
|
+
{ "include": "#typography-value" },
|
|
47
|
+
{ "include": "#asset-header" },
|
|
48
|
+
{ "include": "#asset-value" },
|
|
49
|
+
{ "include": "#badge-header" },
|
|
50
|
+
{ "include": "#badge-value" },
|
|
51
|
+
{ "include": "#string-field" },
|
|
52
|
+
{ "include": "#keyword-partial" }
|
|
53
|
+
],
|
|
54
|
+
"repository": {
|
|
55
|
+
"comment": {
|
|
56
|
+
"match": "^\\s*#.*$",
|
|
57
|
+
"name": "comment.line.number-sign.brand-intent-brand"
|
|
58
|
+
},
|
|
59
|
+
"id-field": {
|
|
60
|
+
"match": "^(id:)\\s+(.*)",
|
|
61
|
+
"captures": {
|
|
62
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
63
|
+
"2": { "name": "entity.name.type.brand-intent-brand" }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"name-field": {
|
|
67
|
+
"match": "^(name:)\\s+(.*)",
|
|
68
|
+
"captures": {
|
|
69
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
70
|
+
"2": { "name": "string.unquoted.brand-intent-brand" }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"tokens-enum": {
|
|
74
|
+
"match": "^(tokens:)\\s+(figma|inline)",
|
|
75
|
+
"captures": {
|
|
76
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
77
|
+
"2": { "name": "entity.name.tag.brand-intent-brand" }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"brand-colors-header": {
|
|
81
|
+
"match": "^(brand-colors)\\s*$",
|
|
82
|
+
"captures": {
|
|
83
|
+
"1": { "name": "keyword.control.brand-intent-brand" }
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"state-colors-header": {
|
|
87
|
+
"match": "^(state-colors)\\s*$",
|
|
88
|
+
"captures": {
|
|
89
|
+
"1": { "name": "keyword.control.brand-intent-brand" }
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"color-bounds-header": {
|
|
93
|
+
"match": "^(color-bounds)\\s*$",
|
|
94
|
+
"captures": {
|
|
95
|
+
"1": { "name": "keyword.control.brand-intent-brand" }
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"color-rules-header": {
|
|
99
|
+
"match": "^(color-rules)\\s*$",
|
|
100
|
+
"captures": {
|
|
101
|
+
"1": { "name": "keyword.control.brand-intent-brand" }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"color-families-header": {
|
|
105
|
+
"match": "^(color-families)\\s*$",
|
|
106
|
+
"captures": {
|
|
107
|
+
"1": { "name": "keyword.control.brand-intent-brand" }
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"color-rules-entry": {
|
|
111
|
+
"comment": "Entries under color-rules: text/figure (contrast), avoid (tone combos), tones (thresholds)",
|
|
112
|
+
"match": "^(\\s{2,})(text|figure|avoid|tones)(:\\s*)(.+)$",
|
|
113
|
+
"captures": {
|
|
114
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
115
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
116
|
+
"4": { "name": "constant.numeric.brand-intent-brand" }
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"color-families-property": {
|
|
120
|
+
"comment": "Block keys under color-families: order/borrow/distance/shared",
|
|
121
|
+
"match": "^( {2})(order|borrow|distance|shared)(:\\s*)(.+)$",
|
|
122
|
+
"captures": {
|
|
123
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
124
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
125
|
+
"4": { "name": "entity.name.tag.brand-intent-brand" }
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"family-header": {
|
|
129
|
+
"match": "^( {2})(family)\\s+(\\S+)\\s*$",
|
|
130
|
+
"captures": {
|
|
131
|
+
"2": { "name": "keyword.control.brand-intent-brand" },
|
|
132
|
+
"3": { "name": "entity.name.type.brand-intent-brand" }
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"family-role": {
|
|
136
|
+
"comment": "Family color: core/accent/contrast → #HEX [Name]",
|
|
137
|
+
"match": "^(\\s{4,})(core|accent|contrast)(:\\s*)(#[0-9A-Fa-f]{3,6})(?:\\s+(.+))?$",
|
|
138
|
+
"captures": {
|
|
139
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
140
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
141
|
+
"4": { "name": "constant.other.color.rgb-value.brand-intent-brand" },
|
|
142
|
+
"5": { "name": "string.unquoted.brand-intent-brand" }
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"family-pairs-keyword": {
|
|
146
|
+
"match": "^(\\s{4,})(pairs)\\s*$",
|
|
147
|
+
"captures": {
|
|
148
|
+
"2": { "name": "keyword.control.brand-intent-brand" }
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"family-pair": {
|
|
152
|
+
"comment": "Pair line: ground / figure (hex or $ref). Listed before #comment so indented hex is not read as a comment.",
|
|
153
|
+
"match": "^(\\s{4,})(#[0-9A-Fa-f]{3,6}|\\$[\\w-]+)(\\s*/\\s*)(#[0-9A-Fa-f]{3,6}|\\$[\\w-]+)\\s*$",
|
|
154
|
+
"captures": {
|
|
155
|
+
"2": { "name": "constant.other.color.rgb-value.brand-intent-brand" },
|
|
156
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
157
|
+
"4": { "name": "constant.other.color.rgb-value.brand-intent-brand" }
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"color-mode-enum": {
|
|
161
|
+
"match": "^(color-mode:)\\s+(static|dynamic|guided|brand)",
|
|
162
|
+
"captures": {
|
|
163
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
164
|
+
"2": { "name": "entity.name.tag.brand-intent-brand" }
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"color-strategy-enum": {
|
|
168
|
+
"match": "^(color-strategy:)\\s+(monochrome|duotone|tricolor|spectrum)",
|
|
169
|
+
"captures": {
|
|
170
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
171
|
+
"2": { "name": "entity.name.tag.brand-intent-brand" }
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"color-adherence-enum": {
|
|
175
|
+
"match": "^(color-adherence:)\\s+(strict|on-brand|flexible)",
|
|
176
|
+
"captures": {
|
|
177
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
178
|
+
"2": { "name": "entity.name.tag.brand-intent-brand" }
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"state-colors-entry": {
|
|
182
|
+
"comment": "Indented entries under state-colors: problem/warning/success/info/inactive → hex",
|
|
183
|
+
"match": "^(\\s{2,})(problem|warning|success|info|inactive)(:\\s*)(#[0-9A-Fa-f]{3,8})\\s*$",
|
|
184
|
+
"captures": {
|
|
185
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
186
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
187
|
+
"4": { "name": "constant.other.color.rgb-value.brand-intent-brand" }
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"color-bounds-entry": {
|
|
191
|
+
"comment": "Indented entries under color-bounds: light/dark (0–1) + saturation-floor (0–100)",
|
|
192
|
+
"match": "^(\\s{2,})(light|dark|saturation-floor)(:\\s*)(\\S+)",
|
|
193
|
+
"captures": {
|
|
194
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
195
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
196
|
+
"4": { "name": "constant.numeric.brand-intent-brand" }
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"color-adherence-override": {
|
|
200
|
+
"comment": "Optional tolerance overrides under color-adherence: hue-tolerance / sat-tolerance",
|
|
201
|
+
"match": "^(\\s{2,})(hue-tolerance|sat-tolerance)(:\\s*)(\\S+)",
|
|
202
|
+
"captures": {
|
|
203
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
204
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
205
|
+
"4": { "name": "constant.numeric.brand-intent-brand" }
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"color-group-header": {
|
|
209
|
+
"comment": "Grouped brand-colors: 2-space indent, bare group keyword",
|
|
210
|
+
"match": "^( {2})(primary|secondary|accent|neutral)\\s*$",
|
|
211
|
+
"captures": {
|
|
212
|
+
"2": { "name": "keyword.control.brand-intent-brand" }
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"color-group-property": {
|
|
216
|
+
"comment": "Group-level property (4-space indent): meaning / distribution. distribution's value is numeric (0–100).",
|
|
217
|
+
"match": "^( {4})(distribution)(:\\s*)(\\d+(?:\\.\\d+)?%?)\\s*$|^( {4})(meaning)(:\\s*)(.*)$",
|
|
218
|
+
"captures": {
|
|
219
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
220
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
221
|
+
"4": { "name": "constant.numeric.brand-intent-brand" },
|
|
222
|
+
"6": { "name": "support.type.property-name.brand-intent-brand" },
|
|
223
|
+
"7": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
224
|
+
"8": { "name": "string.unquoted.brand-intent-brand" }
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"color-group-entry": {
|
|
228
|
+
"comment": "Color entry header inside a group: 4-space indent, #HEX Name",
|
|
229
|
+
"match": "^( {4})(#[0-9A-Fa-f]{3,8})\\s+(.+?)\\s*$",
|
|
230
|
+
"captures": {
|
|
231
|
+
"2": { "name": "constant.other.color.rgb-value.brand-intent-brand" },
|
|
232
|
+
"3": { "name": "entity.name.type.brand-intent-brand" }
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"color-group-reference": {
|
|
236
|
+
"comment": "Layer 2 cross-group reference: $group.role",
|
|
237
|
+
"match": "^( {4})(\\$[a-z]+\\.[a-z-]+)\\s*$",
|
|
238
|
+
"captures": {
|
|
239
|
+
"2": { "name": "entity.name.tag.brand-intent-brand" }
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"color-group-entry-property": {
|
|
243
|
+
"comment": "Per-entry sub-property: 6-space indent, role / meaning / pantone / hks / cmyk",
|
|
244
|
+
"match": "^( {6})(role|meaning|pantone|hks|cmyk)(:\\s*)(.*)$",
|
|
245
|
+
"captures": {
|
|
246
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
247
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
248
|
+
"4": { "name": "string.unquoted.brand-intent-brand" }
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"theme-header": {
|
|
252
|
+
"match": "^(theme)\\s+(\\S+)",
|
|
253
|
+
"captures": {
|
|
254
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
255
|
+
"2": { "name": "entity.name.type.brand-intent-brand" }
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"brand-color-entry": {
|
|
259
|
+
"comment": "Top-level brand color: exactly 2-space indent, name: #HEX",
|
|
260
|
+
"match": "^( {2})([-\\w]+)(:\\s*)(#[0-9A-Fa-f]{3,8})\\s*$",
|
|
261
|
+
"captures": {
|
|
262
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
263
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
264
|
+
"4": { "name": "constant.other.color.rgb-value.brand-intent-brand" }
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"brand-color-print-sub": {
|
|
268
|
+
"comment": "Print sub-keys under a brand color: 4-space indent, pantone/hks/cmyk",
|
|
269
|
+
"match": "^( {4})(pantone|hks|cmyk)(:\\s*)(\\S.*)",
|
|
270
|
+
"captures": {
|
|
271
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
272
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
273
|
+
"4": { "name": "constant.numeric.brand-intent-brand" }
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"token-slot-ref": {
|
|
277
|
+
"comment": "Indented token slot with $ref value, optional alpha suffix",
|
|
278
|
+
"match": "^(\\s{2,})([-\\w]+)(:\\s*)(\\$[\\w-]+)(?:\\s+([0-9]+(?:\\.[0-9]+)?%))?",
|
|
279
|
+
"captures": {
|
|
280
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
281
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
282
|
+
"4": { "name": "entity.name.tag.brand-intent-brand" },
|
|
283
|
+
"5": { "name": "constant.numeric.brand-intent-brand" }
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"token-slot-with-comment": {
|
|
287
|
+
"comment": "Indented token slot: background: #HEX (optional NN%) (optional # annotation)",
|
|
288
|
+
"match": "^(\\s{2,})([-\\w]+)(:\\s*)(#[0-9A-Fa-f]{3,8})(?:\\s+([0-9]+(?:\\.[0-9]+)?%))?(\\s+#.*)?$",
|
|
289
|
+
"captures": {
|
|
290
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
291
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
292
|
+
"4": { "name": "constant.other.color.rgb-value.brand-intent-brand" },
|
|
293
|
+
"5": { "name": "constant.numeric.brand-intent-brand" },
|
|
294
|
+
"6": { "name": "comment.line.number-sign.brand-intent-brand" }
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"token-slot": {
|
|
298
|
+
"comment": "Indented token slot without comment, optional alpha suffix",
|
|
299
|
+
"match": "^(\\s{2,})([-\\w]+)(:\\s*)(#[0-9A-Fa-f]{3,8})(?:\\s+([0-9]+(?:\\.[0-9]+)?%))?\\s*$",
|
|
300
|
+
"captures": {
|
|
301
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
302
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
303
|
+
"4": { "name": "constant.other.color.rgb-value.brand-intent-brand" },
|
|
304
|
+
"5": { "name": "constant.numeric.brand-intent-brand" }
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"spacing-value": {
|
|
308
|
+
"comment": "Indented spacing key-value pairs",
|
|
309
|
+
"match": "^(\\s{2,})(unit|xs|s|m|l|xl)(:\\s*)(\\S+)",
|
|
310
|
+
"captures": {
|
|
311
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
312
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
313
|
+
"4": { "name": "constant.numeric.brand-intent-brand" }
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"divider-header": {
|
|
317
|
+
"match": "^(divider)\\s+(\\S+)",
|
|
318
|
+
"captures": {
|
|
319
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
320
|
+
"2": { "name": "entity.name.type.brand-intent-brand" }
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"divider-value": {
|
|
324
|
+
"comment": "Indented divider property key-value pairs (color removed in 0.6.0 — sourced from theme)",
|
|
325
|
+
"match": "^(\\s{2,})(thickness|width|spacing|align)(:\\s*)(\\S+)",
|
|
326
|
+
"captures": {
|
|
327
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
328
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
329
|
+
"4": { "name": "constant.numeric.brand-intent-brand" }
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"font-header": {
|
|
333
|
+
"match": "^(font)\\s+(\\S+)",
|
|
334
|
+
"captures": {
|
|
335
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
336
|
+
"2": { "name": "entity.name.type.brand-intent-brand" }
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"font-value": {
|
|
340
|
+
"comment": "Indented font block properties",
|
|
341
|
+
"match": "^(\\s{2,})(name|fallback|source|variable|variable-italic|static-\\d{3}i?)(:\\s*)(\\S+)",
|
|
342
|
+
"captures": {
|
|
343
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
344
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
345
|
+
"4": { "name": "string.unquoted.brand-intent-brand" }
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"typography-header": {
|
|
349
|
+
"match": "^(typography)\\s+(\\S+)",
|
|
350
|
+
"captures": {
|
|
351
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
352
|
+
"2": { "name": "entity.name.type.brand-intent-brand" }
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"typography-value": {
|
|
356
|
+
"comment": "Indented typography block properties; font ref colored teal as a cross-reference",
|
|
357
|
+
"match": "^(\\s{2,})(font)(:\\s*)(\\$[\\w]+)|^(\\s{2,})(weight|strong|size|opsz|lineHeight|letterSpacing|autofit-min|autofit-max)(:\\s*)(\\S+)|^(\\s{2,})(italic|uppercase)\\s*$",
|
|
358
|
+
"captures": {
|
|
359
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
360
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
361
|
+
"4": { "name": "entity.name.tag.brand-intent-brand" },
|
|
362
|
+
"6": { "name": "support.type.property-name.brand-intent-brand" },
|
|
363
|
+
"7": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
364
|
+
"8": { "name": "constant.numeric.brand-intent-brand" },
|
|
365
|
+
"10": { "name": "support.type.property-name.brand-intent-brand" }
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"asset-header": {
|
|
369
|
+
"match": "^(logo|photo|video|illustration)\\s+(\\S+)",
|
|
370
|
+
"captures": {
|
|
371
|
+
"1": { "name": "keyword.control.brand-intent-brand" },
|
|
372
|
+
"2": { "name": "entity.name.type.brand-intent-brand" }
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"asset-value": {
|
|
376
|
+
"match": "^(\\s{2,})(label|src|lottie|gltf|generator|group)(:\\s*)(.*)|^(\\s{2,})(aspect|scale)(:\\s*)(\\S+)|^(\\s{2,})(animated|generator-params|align-left|align-center|align-right)\\s*$|^(\\s{2,})(loop)(?:(:\\s*)(true|false))?\\s*$",
|
|
377
|
+
"captures": {
|
|
378
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
379
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
380
|
+
"4": { "name": "string.unquoted.brand-intent-brand" },
|
|
381
|
+
"6": { "name": "support.type.property-name.brand-intent-brand" },
|
|
382
|
+
"7": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
383
|
+
"8": { "name": "constant.numeric.brand-intent-brand" },
|
|
384
|
+
"10": { "name": "support.type.property-name.brand-intent-brand" },
|
|
385
|
+
"12": { "name": "support.type.property-name.brand-intent-brand" },
|
|
386
|
+
"13": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
387
|
+
"14": { "name": "constant.language.boolean.brand-intent-brand" }
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"icons-counter-header": {
|
|
391
|
+
"comment": "Bare `icons` / `counter` block headers.",
|
|
392
|
+
"match": "^(icons|counter)\\s*$",
|
|
393
|
+
"captures": {
|
|
394
|
+
"1": { "name": "keyword.control.brand-intent-brand" }
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"icon-entry": {
|
|
398
|
+
"comment": "icons entry: ID: font [$FONT] U+XXXX|GLYPH / ID: phosphor NAME [WEIGHT] / ID: PATH.svg",
|
|
399
|
+
"match": "^(\\s{2,})(?!(?:src|lottie|gltf):)([a-z][a-z0-9-]*)(:\\s*)(?:(font)(?:\\s+(\\$[\\w-]+))?\\s+(\\S+)|(phosphor)\\s+([a-z][a-z0-9-]*)(?:\\s+(thin|light|regular|bold|fill|duotone))?|(\\S+\\.svg))\\s*(#.*)?$",
|
|
400
|
+
"captures": {
|
|
401
|
+
"2": { "name": "entity.name.function.brand-intent-brand" },
|
|
402
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
403
|
+
"4": { "name": "keyword.other.brand-intent-brand" },
|
|
404
|
+
"5": { "name": "variable.other.brand-intent-brand" },
|
|
405
|
+
"6": { "name": "constant.character.brand-intent-brand" },
|
|
406
|
+
"7": { "name": "keyword.other.brand-intent-brand" },
|
|
407
|
+
"8": { "name": "string.unquoted.brand-intent-brand" },
|
|
408
|
+
"9": { "name": "variable.parameter.brand-intent-brand" },
|
|
409
|
+
"10": { "name": "string.unquoted.brand-intent-brand" },
|
|
410
|
+
"11": { "name": "comment.line.number-sign.brand-intent-brand" }
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"counter-value": {
|
|
414
|
+
"comment": "counter block properties (typography: is covered by typography-value)",
|
|
415
|
+
"match": "^(\\s{2,})(format|shape|size|padding)(:\\s*)(\\S+)\\s*(#.*)?$",
|
|
416
|
+
"captures": {
|
|
417
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
418
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
419
|
+
"4": { "name": "constant.numeric.brand-intent-brand" },
|
|
420
|
+
"5": { "name": "comment.line.number-sign.brand-intent-brand" }
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"badge-header": {
|
|
424
|
+
"comment": "Bare `label:` or `cta:` line that introduces a badge style block.",
|
|
425
|
+
"match": "^(label|cta):\\s*$",
|
|
426
|
+
"captures": {
|
|
427
|
+
"1": { "name": "keyword.control.brand-intent-brand" }
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"badge-value": {
|
|
431
|
+
"comment": "Indented badge style properties: padding (CSS shorthand) + radius",
|
|
432
|
+
"match": "^(\\s{2,})(padding|radius)(:\\s*)(.+)$",
|
|
433
|
+
"captures": {
|
|
434
|
+
"2": { "name": "support.type.property-name.brand-intent-brand" },
|
|
435
|
+
"3": { "name": "punctuation.separator.key-value.brand-intent-brand" },
|
|
436
|
+
"4": { "name": "constant.numeric.brand-intent-brand" }
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
"string-field": {
|
|
440
|
+
"match": "^(language|locale|domain|app-icon|favicon|og-image|figma-file-key|figma-collection|tokens-file|spacing):?\\s*(.+)?",
|
|
441
|
+
"captures": {
|
|
442
|
+
"1": { "name": "support.type.property-name.brand-intent-brand" },
|
|
443
|
+
"2": { "name": "string.unquoted.brand-intent-brand" }
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"keyword-partial": {
|
|
447
|
+
"comment": "Fallback: color the keyword token on incomplete lines (while typing)",
|
|
448
|
+
"match": "^(id:|name:|language:|locale:|domain:|app-icon:|favicon:|og-image:|tokens:|figma-file-key:|figma-collection:|tokens-file:|spacing:|label:|cta:|color-mode:|color-strategy:|color-adherence:|brand-colors|state-colors|color-bounds|color-rules|color-families|theme|divider|font|typography|logo|photo|video|illustration|icons|counter)(?=\\s|$)",
|
|
449
|
+
"captures": {
|
|
450
|
+
"1": { "name": "keyword.control.brand-intent-brand" }
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|