UNPKG

1.48 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.StylableMeta = exports.RESERVED_ROOT_NAME = void 0;
4const stylable_utils_1 = require("./stylable-utils");
5const stylable_value_parsers_1 = require("./stylable-value-parsers");
6exports.RESERVED_ROOT_NAME = 'root';
7class StylableMeta {
8 constructor(ast, diagnostics) {
9 this.ast = ast;
10 this.diagnostics = diagnostics;
11 this.globals = {};
12 const rootSymbol = {
13 _kind: 'class',
14 name: exports.RESERVED_ROOT_NAME,
15 [stylable_value_parsers_1.valueMapping.root]: true,
16 };
17 this.rawAst = ast.clone();
18 this.source = stylable_utils_1.getSourcePath(ast, diagnostics);
19 this.root = exports.RESERVED_ROOT_NAME;
20 this.namespace = '';
21 this.imports = [];
22 this.vars = [];
23 this.cssVars = {};
24 this.keyframes = [];
25 this.elements = {};
26 this.classes = {
27 [exports.RESERVED_ROOT_NAME]: rootSymbol,
28 };
29 this.mappedSymbols = {
30 [exports.RESERVED_ROOT_NAME]: rootSymbol,
31 };
32 this.mappedKeyframes = {};
33 this.customSelectors = {};
34 this.urls = [];
35 this.scopes = [];
36 this.simpleSelectors = {};
37 this.mixins = [];
38 this.transformDiagnostics = null;
39 this.transformedScopes = null;
40 }
41}
42exports.StylableMeta = StylableMeta;
43//# sourceMappingURL=stylable-meta.js.map
\No newline at end of file