chaincss 2.2.0 → 2.3.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/dist/compiler/accessibility-engine.d.ts +57 -0
- package/dist/compiler/constraint-solver.d.ts +85 -0
- package/dist/compiler/intent-api.d.ts +73 -0
- package/dist/compiler/layout-intelligence.d.ts +71 -0
- package/dist/compiler/pass-manager.d.ts +157 -0
- package/dist/compiler/pattern-learner.d.ts +112 -0
- package/dist/compiler/responsive-inference.d.ts +63 -0
- package/dist/compiler/semantic-tokens.d.ts +57 -0
- package/dist/compiler/source-optimizer.d.ts +109 -0
- package/dist/compiler/style-ir.d.ts +183 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +3475 -0
- package/package.json +1 -1
- package/src/compiler/accessibility-engine.ts +502 -0
- package/src/compiler/constraint-solver.ts +407 -0
- package/src/compiler/intent-api.ts +505 -0
- package/src/compiler/layout-intelligence.ts +697 -0
- package/src/compiler/pass-manager.ts +657 -0
- package/src/compiler/pattern-learner.ts +398 -0
- package/src/compiler/responsive-inference.ts +415 -0
- package/src/compiler/semantic-tokens.ts +468 -0
- package/src/compiler/source-optimizer.ts +541 -0
- package/src/compiler/style-ir.ts +495 -0
- package/src/index.ts +175 -0
- package/ROADMAP.md +0 -31
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
// src/compiler/semantic-tokens.ts
|
|
2
|
+
/**
|
|
3
|
+
* Semantic Token System
|
|
4
|
+
*
|
|
5
|
+
* Intent-based styling that maps semantic concepts to design tokens.
|
|
6
|
+
* Wraps the existing token system — both coexist.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* chain.surface('interactive') // → maps to background, color, border-radius
|
|
10
|
+
* chain.text('primary') // → maps to color, font-weight
|
|
11
|
+
* chain.elevation('floating') // → maps to box-shadow, z-index
|
|
12
|
+
* chain.state('hover') // → maps to hover pseudo-class
|
|
13
|
+
* chain.spacing('comfortable') // → maps to padding
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import type { StyleIR, IRRule, IRPass } from './style-ir.js';
|
|
17
|
+
import { createDeclaration } from './style-ir.js';
|
|
18
|
+
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// Types
|
|
21
|
+
// ============================================================================
|
|
22
|
+
|
|
23
|
+
export type SurfaceIntent = 'interactive' | 'container' | 'overlay' | 'sheet' | 'tooltip' | 'input';
|
|
24
|
+
export type TextIntent = 'primary' | 'secondary' | 'muted' | 'link' | 'inverse' | 'code';
|
|
25
|
+
export type ElevationIntent = 'flat' | 'raised' | 'floating' | 'sticky' | 'overlay' | 'modal';
|
|
26
|
+
export type StateIntent = 'hover' | 'active' | 'focus' | 'disabled' | 'loading' | 'selected';
|
|
27
|
+
export type SpacingIntent = 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious' | 'generous';
|
|
28
|
+
|
|
29
|
+
export interface SemanticMapping {
|
|
30
|
+
properties: Record<string, string | number>;
|
|
31
|
+
pseudoClass?: string;
|
|
32
|
+
description: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ThemeContext {
|
|
36
|
+
mode: 'light' | 'dark' | 'high-contrast';
|
|
37
|
+
brand?: Record<string, string>;
|
|
38
|
+
containerContext?: 'light' | 'dark';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// Default Theme Map (light theme)
|
|
43
|
+
// ============================================================================
|
|
44
|
+
|
|
45
|
+
const DEFAULT_THEME: Record<string, Record<string, SemanticMapping>> = {
|
|
46
|
+
// --- SURFACES ---
|
|
47
|
+
surface: {
|
|
48
|
+
interactive: {
|
|
49
|
+
properties: {
|
|
50
|
+
backgroundColor: '$colors.primary.500',
|
|
51
|
+
color: '$colors.white',
|
|
52
|
+
borderRadius: '$radii.md',
|
|
53
|
+
cursor: 'pointer',
|
|
54
|
+
transition: 'all 0.2s ease',
|
|
55
|
+
},
|
|
56
|
+
description: 'Clickable surface — buttons, CTAs, links',
|
|
57
|
+
},
|
|
58
|
+
container: {
|
|
59
|
+
properties: {
|
|
60
|
+
backgroundColor: '$colors.neutral.100',
|
|
61
|
+
color: '$colors.neutral.900',
|
|
62
|
+
borderRadius: '$radii.lg',
|
|
63
|
+
border: '1px solid $colors.neutral.200',
|
|
64
|
+
},
|
|
65
|
+
description: 'Content container — cards, sections, panels',
|
|
66
|
+
},
|
|
67
|
+
overlay: {
|
|
68
|
+
properties: {
|
|
69
|
+
backgroundColor: '$colors.white',
|
|
70
|
+
color: '$colors.neutral.900',
|
|
71
|
+
borderRadius: '$radii.xl',
|
|
72
|
+
boxShadow: '$shadows.xl',
|
|
73
|
+
zIndex: '50',
|
|
74
|
+
},
|
|
75
|
+
description: 'Modal overlay — dialogs, drawers',
|
|
76
|
+
},
|
|
77
|
+
sheet: {
|
|
78
|
+
properties: {
|
|
79
|
+
backgroundColor: '$colors.neutral.50',
|
|
80
|
+
color: '$colors.neutral.800',
|
|
81
|
+
borderRadius: '$radii.lg $radii.lg 0 0',
|
|
82
|
+
boxShadow: '$shadows.lg',
|
|
83
|
+
},
|
|
84
|
+
description: 'Bottom sheet — mobile menus, action sheets',
|
|
85
|
+
},
|
|
86
|
+
tooltip: {
|
|
87
|
+
properties: {
|
|
88
|
+
backgroundColor: '$colors.neutral.900',
|
|
89
|
+
color: '$colors.white',
|
|
90
|
+
borderRadius: '$radii.sm',
|
|
91
|
+
padding: '4px 8px',
|
|
92
|
+
fontSize: '12px',
|
|
93
|
+
boxShadow: '$shadows.md',
|
|
94
|
+
},
|
|
95
|
+
description: 'Tooltip — hover information popups',
|
|
96
|
+
},
|
|
97
|
+
input: {
|
|
98
|
+
properties: {
|
|
99
|
+
backgroundColor: '$colors.white',
|
|
100
|
+
color: '$colors.neutral.900',
|
|
101
|
+
borderRadius: '$radii.md',
|
|
102
|
+
border: '1px solid $colors.neutral.300',
|
|
103
|
+
padding: '8px 12px',
|
|
104
|
+
},
|
|
105
|
+
description: 'Input field — text inputs, selects, textareas',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
// --- TEXT ---
|
|
110
|
+
text: {
|
|
111
|
+
primary: {
|
|
112
|
+
properties: {
|
|
113
|
+
color: '$colors.neutral.900',
|
|
114
|
+
fontWeight: '400',
|
|
115
|
+
},
|
|
116
|
+
description: 'Primary body text — main content',
|
|
117
|
+
},
|
|
118
|
+
secondary: {
|
|
119
|
+
properties: {
|
|
120
|
+
color: '$colors.neutral.600',
|
|
121
|
+
fontWeight: '400',
|
|
122
|
+
},
|
|
123
|
+
description: 'Secondary text — descriptions, captions',
|
|
124
|
+
},
|
|
125
|
+
muted: {
|
|
126
|
+
properties: {
|
|
127
|
+
color: '$colors.neutral.400',
|
|
128
|
+
fontSize: '14px',
|
|
129
|
+
fontWeight: '400',
|
|
130
|
+
},
|
|
131
|
+
description: 'Muted text — placeholders, hints, meta info',
|
|
132
|
+
},
|
|
133
|
+
link: {
|
|
134
|
+
properties: {
|
|
135
|
+
color: '$colors.primary.500',
|
|
136
|
+
fontWeight: '500',
|
|
137
|
+
textDecoration: 'underline',
|
|
138
|
+
cursor: 'pointer',
|
|
139
|
+
},
|
|
140
|
+
description: 'Link text — hyperlinks, navigational text',
|
|
141
|
+
},
|
|
142
|
+
inverse: {
|
|
143
|
+
properties: {
|
|
144
|
+
color: '$colors.white',
|
|
145
|
+
fontWeight: '500',
|
|
146
|
+
},
|
|
147
|
+
description: 'Inverse text — text on dark backgrounds',
|
|
148
|
+
},
|
|
149
|
+
code: {
|
|
150
|
+
properties: {
|
|
151
|
+
fontFamily: 'monospace',
|
|
152
|
+
fontSize: '14px',
|
|
153
|
+
color: '$colors.neutral.800',
|
|
154
|
+
backgroundColor: '$colors.neutral.100',
|
|
155
|
+
borderRadius: '$radii.sm',
|
|
156
|
+
padding: '2px 6px',
|
|
157
|
+
},
|
|
158
|
+
description: 'Code text — inline code, code blocks',
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
// --- ELEVATION ---
|
|
163
|
+
elevation: {
|
|
164
|
+
flat: {
|
|
165
|
+
properties: {
|
|
166
|
+
boxShadow: 'none',
|
|
167
|
+
zIndex: '0',
|
|
168
|
+
},
|
|
169
|
+
description: 'Flat — no elevation, base level',
|
|
170
|
+
},
|
|
171
|
+
raised: {
|
|
172
|
+
properties: {
|
|
173
|
+
boxShadow: '$shadows.sm',
|
|
174
|
+
zIndex: '10',
|
|
175
|
+
},
|
|
176
|
+
description: 'Raised — subtle lift, cards on light backgrounds',
|
|
177
|
+
},
|
|
178
|
+
floating: {
|
|
179
|
+
properties: {
|
|
180
|
+
boxShadow: '$shadows.md',
|
|
181
|
+
zIndex: '20',
|
|
182
|
+
},
|
|
183
|
+
description: 'Floating — dropdowns, popovers',
|
|
184
|
+
},
|
|
185
|
+
sticky: {
|
|
186
|
+
properties: {
|
|
187
|
+
boxShadow: '$shadows.md',
|
|
188
|
+
zIndex: '30',
|
|
189
|
+
position: 'sticky',
|
|
190
|
+
top: '0',
|
|
191
|
+
},
|
|
192
|
+
description: 'Sticky — sticky headers, persistent nav',
|
|
193
|
+
},
|
|
194
|
+
overlay: {
|
|
195
|
+
properties: {
|
|
196
|
+
boxShadow: '$shadows.xl',
|
|
197
|
+
zIndex: '50',
|
|
198
|
+
position: 'fixed',
|
|
199
|
+
},
|
|
200
|
+
description: 'Overlay — modals, dialogs',
|
|
201
|
+
},
|
|
202
|
+
modal: {
|
|
203
|
+
properties: {
|
|
204
|
+
boxShadow: '$shadows.2xl',
|
|
205
|
+
zIndex: '100',
|
|
206
|
+
position: 'fixed',
|
|
207
|
+
backdropFilter: 'blur(4px)',
|
|
208
|
+
},
|
|
209
|
+
description: 'Modal — full-screen overlay with backdrop',
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
|
|
213
|
+
// --- STATES ---
|
|
214
|
+
state: {
|
|
215
|
+
hover: {
|
|
216
|
+
properties: {
|
|
217
|
+
filter: 'brightness(1.1)',
|
|
218
|
+
transition: 'filter 0.2s ease',
|
|
219
|
+
},
|
|
220
|
+
pseudoClass: 'hover',
|
|
221
|
+
description: 'Hover state — slight brightening',
|
|
222
|
+
},
|
|
223
|
+
active: {
|
|
224
|
+
properties: {
|
|
225
|
+
filter: 'brightness(0.95)',
|
|
226
|
+
transform: 'scale(0.98)',
|
|
227
|
+
transition: 'all 0.1s ease',
|
|
228
|
+
},
|
|
229
|
+
pseudoClass: 'active',
|
|
230
|
+
description: 'Active/pressed state — slight darkening + press',
|
|
231
|
+
},
|
|
232
|
+
focus: {
|
|
233
|
+
properties: {
|
|
234
|
+
outline: '2px solid $colors.primary.500',
|
|
235
|
+
outlineOffset: '2px',
|
|
236
|
+
},
|
|
237
|
+
pseudoClass: 'focus-visible',
|
|
238
|
+
description: 'Focus state — accessible focus ring',
|
|
239
|
+
},
|
|
240
|
+
disabled: {
|
|
241
|
+
properties: {
|
|
242
|
+
opacity: '0.5',
|
|
243
|
+
cursor: 'not-allowed',
|
|
244
|
+
pointerEvents: 'none',
|
|
245
|
+
},
|
|
246
|
+
pseudoClass: 'disabled',
|
|
247
|
+
description: 'Disabled state — reduced opacity, no interaction',
|
|
248
|
+
},
|
|
249
|
+
loading: {
|
|
250
|
+
properties: {
|
|
251
|
+
cursor: 'wait',
|
|
252
|
+
opacity: '0.7',
|
|
253
|
+
pointerEvents: 'none',
|
|
254
|
+
},
|
|
255
|
+
description: 'Loading state — waiting cursor, partially transparent',
|
|
256
|
+
},
|
|
257
|
+
selected: {
|
|
258
|
+
properties: {
|
|
259
|
+
backgroundColor: '$colors.primary.50',
|
|
260
|
+
color: '$colors.primary.700',
|
|
261
|
+
fontWeight: '600',
|
|
262
|
+
},
|
|
263
|
+
pseudoClass: 'selected',
|
|
264
|
+
description: 'Selected state — highlighted background',
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
|
|
268
|
+
// --- SPACING ---
|
|
269
|
+
spacing: {
|
|
270
|
+
none: {
|
|
271
|
+
properties: { padding: '0', gap: '0' },
|
|
272
|
+
description: 'No spacing',
|
|
273
|
+
},
|
|
274
|
+
tight: {
|
|
275
|
+
properties: { padding: '4px 8px', gap: '4px' },
|
|
276
|
+
description: 'Tight spacing — icon buttons, chips, badges',
|
|
277
|
+
},
|
|
278
|
+
compact: {
|
|
279
|
+
properties: { padding: '8px 12px', gap: '8px' },
|
|
280
|
+
description: 'Compact spacing — dense lists, toolbars',
|
|
281
|
+
},
|
|
282
|
+
comfortable: {
|
|
283
|
+
properties: { padding: '12px 16px', gap: '12px' },
|
|
284
|
+
description: 'Comfortable spacing — form fields, cards (default)',
|
|
285
|
+
},
|
|
286
|
+
spacious: {
|
|
287
|
+
properties: { padding: '24px 32px', gap: '24px' },
|
|
288
|
+
description: 'Spacious spacing — hero sections, feature cards',
|
|
289
|
+
},
|
|
290
|
+
generous: {
|
|
291
|
+
properties: { padding: '48px 64px', gap: '32px' },
|
|
292
|
+
description: 'Generous spacing — landing pages, large sections',
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
// ============================================================================
|
|
298
|
+
// Dark Theme Overrides
|
|
299
|
+
// ============================================================================
|
|
300
|
+
|
|
301
|
+
const DARK_OVERRIDES: Record<string, Record<string, Partial<Record<string, string | number>>>> = {
|
|
302
|
+
surface: {
|
|
303
|
+
interactive: { backgroundColor: '$colors.primary.400', color: '$colors.white' },
|
|
304
|
+
container: { backgroundColor: '$colors.neutral.800', color: '$colors.neutral.100', border: '1px solid $colors.neutral.700' },
|
|
305
|
+
overlay: { backgroundColor: '$colors.neutral.850', color: '$colors.neutral.100' },
|
|
306
|
+
sheet: { backgroundColor: '$colors.neutral.800', color: '$colors.neutral.100' },
|
|
307
|
+
input: { backgroundColor: '$colors.neutral.800', color: '$colors.neutral.100', border: '1px solid $colors.neutral.600' },
|
|
308
|
+
},
|
|
309
|
+
text: {
|
|
310
|
+
primary: { color: '$colors.neutral.100' },
|
|
311
|
+
secondary: { color: '$colors.neutral.400' },
|
|
312
|
+
muted: { color: '$colors.neutral.500' },
|
|
313
|
+
inverse: { color: '$colors.neutral.900' },
|
|
314
|
+
code: { backgroundColor: '$colors.neutral.800', color: '$colors.neutral.200' },
|
|
315
|
+
},
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
// ============================================================================
|
|
319
|
+
// High Contrast Overrides
|
|
320
|
+
// ============================================================================
|
|
321
|
+
|
|
322
|
+
const HIGH_CONTRAST_OVERRIDES: Record<string, Record<string, Partial<Record<string, string | number>>>> = {
|
|
323
|
+
surface: {
|
|
324
|
+
interactive: { backgroundColor: '$colors.black', color: '$colors.white', border: '2px solid $colors.white' },
|
|
325
|
+
container: { backgroundColor: '$colors.white', color: '$colors.black', border: '2px solid $colors.black' },
|
|
326
|
+
input: { backgroundColor: '$colors.white', color: '$colors.black', border: '2px solid $colors.black' },
|
|
327
|
+
},
|
|
328
|
+
text: {
|
|
329
|
+
primary: { color: '$colors.black', fontWeight: '500' },
|
|
330
|
+
secondary: { color: '$colors.neutral.800', fontWeight: '500' },
|
|
331
|
+
muted: { color: '$colors.neutral.700' },
|
|
332
|
+
link: { color: '$colors.blue.800', textDecoration: 'underline' },
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
// ============================================================================
|
|
337
|
+
// Resolver
|
|
338
|
+
// ============================================================================
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Resolve a semantic intent to concrete CSS properties.
|
|
342
|
+
* Applies theme overrides based on context.
|
|
343
|
+
*/
|
|
344
|
+
export function resolveSemantic(
|
|
345
|
+
category: 'surface' | 'text' | 'elevation' | 'state' | 'spacing',
|
|
346
|
+
intent: string,
|
|
347
|
+
themeContext: ThemeContext = { mode: 'light' }
|
|
348
|
+
): SemanticMapping | null {
|
|
349
|
+
const baseMap = DEFAULT_THEME[category];
|
|
350
|
+
if (!baseMap) return null;
|
|
351
|
+
|
|
352
|
+
const mapping = baseMap[intent];
|
|
353
|
+
if (!mapping) return null;
|
|
354
|
+
|
|
355
|
+
// Start with base properties
|
|
356
|
+
const properties = { ...mapping.properties };
|
|
357
|
+
|
|
358
|
+
// Apply dark overrides
|
|
359
|
+
if (themeContext.mode === 'dark' && DARK_OVERRIDES[category]?.[intent]) {
|
|
360
|
+
Object.assign(properties, DARK_OVERRIDES[category][intent]);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// Apply high contrast overrides (they take priority)
|
|
364
|
+
if (themeContext.mode === 'high-contrast' && HIGH_CONTRAST_OVERRIDES[category]?.[intent]) {
|
|
365
|
+
Object.assign(properties, HIGH_CONTRAST_OVERRIDES[category][intent]);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// Container context override (e.g., button inside dark section)
|
|
369
|
+
if (themeContext.containerContext === 'dark' && category === 'surface') {
|
|
370
|
+
// Invert surface colors for dark containers
|
|
371
|
+
if (intent === 'interactive') {
|
|
372
|
+
properties.backgroundColor = '$colors.primary.300';
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return {
|
|
377
|
+
properties,
|
|
378
|
+
pseudoClass: mapping.pseudoClass,
|
|
379
|
+
description: mapping.description,
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Get all available intents for a category.
|
|
385
|
+
*/
|
|
386
|
+
export function getSemanticIntents(
|
|
387
|
+
category: 'surface' | 'text' | 'elevation' | 'state' | 'spacing'
|
|
388
|
+
): string[] {
|
|
389
|
+
const map = DEFAULT_THEME[category];
|
|
390
|
+
return map ? Object.keys(map) : [];
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Get the description of a semantic intent.
|
|
395
|
+
*/
|
|
396
|
+
export function getSemanticDescription(
|
|
397
|
+
category: 'surface' | 'text' | 'elevation' | 'state' | 'spacing',
|
|
398
|
+
intent: string
|
|
399
|
+
): string | null {
|
|
400
|
+
return DEFAULT_THEME[category]?.[intent]?.description || null;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// ============================================================================
|
|
404
|
+
// IR Pass
|
|
405
|
+
// ============================================================================
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Semantic Token IR pass.
|
|
409
|
+
* Resolves any _semantic metadata on rules into concrete declarations.
|
|
410
|
+
*/
|
|
411
|
+
export const semanticTokensPass: IRPass = (ir: StyleIR): StyleIR => {
|
|
412
|
+
for (const rule of ir.rules) {
|
|
413
|
+
const semanticIntents: Array<{ category: string; intent: string; theme?: ThemeContext }> =
|
|
414
|
+
rule.meta._semantic || [];
|
|
415
|
+
|
|
416
|
+
for (const { category, intent, theme } of semanticIntents) {
|
|
417
|
+
const resolved = resolveSemantic(category as any, intent, theme);
|
|
418
|
+
if (!resolved) continue;
|
|
419
|
+
|
|
420
|
+
for (const [prop, value] of Object.entries(resolved.properties)) {
|
|
421
|
+
const decl = createDeclaration(prop, value);
|
|
422
|
+
decl.history.push({
|
|
423
|
+
pass: 'semantic-tokens',
|
|
424
|
+
action: 'resolved-intent',
|
|
425
|
+
timestamp: Date.now(),
|
|
426
|
+
reason: category + ':' + intent + ' → ' + prop + ': ' + value,
|
|
427
|
+
});
|
|
428
|
+
decl.meta.semantic = { category, intent };
|
|
429
|
+
|
|
430
|
+
if (resolved.pseudoClass) {
|
|
431
|
+
// Add as pseudo-class
|
|
432
|
+
let pc = rule.pseudoClasses.find(p => p.name === resolved.pseudoClass);
|
|
433
|
+
if (!pc) {
|
|
434
|
+
pc = {
|
|
435
|
+
id: 'semantic-pc-' + Date.now(),
|
|
436
|
+
name: resolved.pseudoClass!,
|
|
437
|
+
declarations: [],
|
|
438
|
+
source: rule.source,
|
|
439
|
+
history: [],
|
|
440
|
+
};
|
|
441
|
+
rule.pseudoClasses.push(pc);
|
|
442
|
+
}
|
|
443
|
+
pc.declarations.push(decl);
|
|
444
|
+
} else {
|
|
445
|
+
rule.declarations.push(decl);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
return ir;
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
// ============================================================================
|
|
455
|
+
// Quick API
|
|
456
|
+
// ============================================================================
|
|
457
|
+
|
|
458
|
+
export const semanticTokens = {
|
|
459
|
+
resolve: resolveSemantic,
|
|
460
|
+
getIntents: getSemanticIntents,
|
|
461
|
+
getDescription: getSemanticDescription,
|
|
462
|
+
pass: semanticTokensPass,
|
|
463
|
+
theme: DEFAULT_THEME,
|
|
464
|
+
darkOverrides: DARK_OVERRIDES,
|
|
465
|
+
highContrastOverrides: HIGH_CONTRAST_OVERRIDES,
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
export default semanticTokens;
|