@plumeria/compiler 16.2.2 → 16.2.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.
- package/dist/index.js +211 -145
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -42,35 +42,72 @@ const rs = __importStar(require("@rust-gear/glob"));
|
|
|
42
42
|
const utils_1 = require("@plumeria/utils");
|
|
43
43
|
const utils_2 = require("@plumeria/utils");
|
|
44
44
|
function extractStylesFromExpression(expression, ctx) {
|
|
45
|
+
let expr = expression;
|
|
46
|
+
if (ctx.localStyleAliases &&
|
|
47
|
+
utils_1.t.isIdentifier(expr) &&
|
|
48
|
+
ctx.localStyleAliases[expr.value]) {
|
|
49
|
+
expr = ctx.localStyleAliases[expr.value];
|
|
50
|
+
}
|
|
45
51
|
const results = [];
|
|
46
|
-
if (utils_1.t.isObjectExpression(
|
|
47
|
-
const object = (0, utils_1.objectExpressionToObject)(
|
|
52
|
+
if (utils_1.t.isObjectExpression(expr)) {
|
|
53
|
+
const object = (0, utils_1.objectExpressionToObject)(expr, ctx.mergedStaticTable, ctx.mergedKeyframesTable, ctx.mergedViewTransitionTable, ctx.mergedCreateThemeHashTable, ctx.scannedTables.createThemeObjectTable, ctx.mergedCreateTable, ctx.mergedCreateStaticHashTable, ctx.scannedTables.createStaticObjectTable, ctx.mergedVariantsTable);
|
|
48
54
|
if (object)
|
|
49
55
|
results.push(object);
|
|
50
56
|
}
|
|
51
|
-
else if (utils_1.t.isMemberExpression(
|
|
52
|
-
const memberExpr =
|
|
53
|
-
if (utils_1.t.isIdentifier(memberExpr.object)
|
|
54
|
-
utils_1.t.isIdentifier(memberExpr.property)) {
|
|
57
|
+
else if (utils_1.t.isMemberExpression(expr)) {
|
|
58
|
+
const memberExpr = expr;
|
|
59
|
+
if (utils_1.t.isIdentifier(memberExpr.object)) {
|
|
55
60
|
const variableName = memberExpr.object.value;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
if (utils_1.t.isIdentifier(memberExpr.property)) {
|
|
62
|
+
const propertyName = memberExpr.property.value;
|
|
63
|
+
const styleSet = ctx.localCreateStyles[variableName];
|
|
64
|
+
if (styleSet && styleSet.obj[propertyName]) {
|
|
65
|
+
results.push(styleSet.obj[propertyName]);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
const hash = ctx.mergedCreateTable[variableName];
|
|
69
|
+
if (hash) {
|
|
70
|
+
const object = ctx.scannedTables.createObjectTable[hash];
|
|
71
|
+
if (object && object[propertyName]) {
|
|
72
|
+
results.push(object[propertyName]);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
60
76
|
}
|
|
61
|
-
else {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
else if (memberExpr.property.type === 'Computed') {
|
|
78
|
+
const computedProp = memberExpr.property;
|
|
79
|
+
const innerExpr = computedProp.expression;
|
|
80
|
+
let styleObj;
|
|
81
|
+
const styleSet = ctx.localCreateStyles[variableName];
|
|
82
|
+
if (styleSet) {
|
|
83
|
+
styleObj = styleSet.obj;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
const hash = ctx.mergedCreateTable[variableName];
|
|
87
|
+
if (hash) {
|
|
88
|
+
styleObj = ctx.scannedTables.createObjectTable[hash];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (styleObj) {
|
|
92
|
+
if (utils_1.t.isStringLiteral(innerExpr)) {
|
|
93
|
+
const key = innerExpr.value;
|
|
94
|
+
if (styleObj[key]) {
|
|
95
|
+
results.push(styleObj[key]);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
Object.values(styleObj).forEach((style) => {
|
|
100
|
+
if (style && typeof style === 'object') {
|
|
101
|
+
results.push(style);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
67
104
|
}
|
|
68
105
|
}
|
|
69
106
|
}
|
|
70
107
|
}
|
|
71
108
|
}
|
|
72
|
-
else if (utils_1.t.isIdentifier(
|
|
73
|
-
const identifier =
|
|
109
|
+
else if (utils_1.t.isIdentifier(expr)) {
|
|
110
|
+
const identifier = expr;
|
|
74
111
|
const object = ctx.localCreateStyles[identifier.value];
|
|
75
112
|
if (object)
|
|
76
113
|
results.push(object.obj);
|
|
@@ -83,19 +120,19 @@ function extractStylesFromExpression(expression, ctx) {
|
|
|
83
120
|
}
|
|
84
121
|
}
|
|
85
122
|
}
|
|
86
|
-
else if (utils_1.t.isConditionalExpression(
|
|
87
|
-
const condExpr =
|
|
123
|
+
else if (utils_1.t.isConditionalExpression(expr)) {
|
|
124
|
+
const condExpr = expr;
|
|
88
125
|
results.push(...extractStylesFromExpression(condExpr.consequent, ctx));
|
|
89
126
|
results.push(...extractStylesFromExpression(condExpr.alternate, ctx));
|
|
90
127
|
}
|
|
91
|
-
else if (utils_1.t.isBinaryExpression(
|
|
92
|
-
['&&', '||', '??'].includes(
|
|
93
|
-
const binaryExpr =
|
|
128
|
+
else if (utils_1.t.isBinaryExpression(expr) &&
|
|
129
|
+
['&&', '||', '??'].includes(expr.operator)) {
|
|
130
|
+
const binaryExpr = expr;
|
|
94
131
|
results.push(...extractStylesFromExpression(binaryExpr.left, ctx));
|
|
95
132
|
results.push(...extractStylesFromExpression(binaryExpr.right, ctx));
|
|
96
133
|
}
|
|
97
|
-
else if (
|
|
98
|
-
const parenExpr =
|
|
134
|
+
else if (expr.type === 'ParenthesisExpression') {
|
|
135
|
+
const parenExpr = expr;
|
|
99
136
|
results.push(...extractStylesFromExpression(parenExpr.expression, ctx));
|
|
100
137
|
}
|
|
101
138
|
return results;
|
|
@@ -131,6 +168,7 @@ function compileCSS(options) {
|
|
|
131
168
|
const createStaticImportMap = {};
|
|
132
169
|
const plumeriaAliases = {};
|
|
133
170
|
const localImports = {};
|
|
171
|
+
const localStyleAliases = {};
|
|
134
172
|
(0, utils_1.traverse)(ast, {
|
|
135
173
|
ImportDeclaration({ node }) {
|
|
136
174
|
const sourcePath = node.source.value;
|
|
@@ -153,12 +191,20 @@ function compileCSS(options) {
|
|
|
153
191
|
const actualPath = (0, utils_1.resolveImportPath)(sourcePath, resourcePath);
|
|
154
192
|
if (actualPath) {
|
|
155
193
|
node.specifiers.forEach((specifier) => {
|
|
156
|
-
if (specifier.type === 'ImportSpecifier'
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
194
|
+
if (specifier.type === 'ImportSpecifier' ||
|
|
195
|
+
specifier.type === 'ImportDefaultSpecifier') {
|
|
196
|
+
const importedName = specifier.type === 'ImportDefaultSpecifier'
|
|
197
|
+
? 'default'
|
|
198
|
+
: specifier.imported
|
|
199
|
+
? specifier.imported.value
|
|
200
|
+
: specifier.local.value;
|
|
160
201
|
const localName = specifier.local.value;
|
|
161
|
-
|
|
202
|
+
let resolvedKey = `${actualPath}-${importedName}`;
|
|
203
|
+
const resolved = (0, utils_1.resolveExport)(actualPath, importedName);
|
|
204
|
+
if (resolved) {
|
|
205
|
+
resolvedKey = `${resolved.filePath}-${resolved.localName}`;
|
|
206
|
+
}
|
|
207
|
+
const uniqueKey = resolvedKey;
|
|
162
208
|
localImports[localName] = { actualPath, importedName };
|
|
163
209
|
if (scannedTables.staticTable[uniqueKey])
|
|
164
210
|
importMap[localName] = scannedTables.staticTable[uniqueKey];
|
|
@@ -278,6 +324,7 @@ function compileCSS(options) {
|
|
|
278
324
|
localCreateStyles: {},
|
|
279
325
|
sourceBuffer,
|
|
280
326
|
baseByteOffset,
|
|
327
|
+
localStyleAliases,
|
|
281
328
|
};
|
|
282
329
|
const componentParamNames = new Set();
|
|
283
330
|
for (const node of ast.body) {
|
|
@@ -316,6 +363,12 @@ function compileCSS(options) {
|
|
|
316
363
|
records.forEach((r) => extractedSheets.push(r.sheet));
|
|
317
364
|
};
|
|
318
365
|
const extractAndProcessConditionals = (args, isStyleName = false) => {
|
|
366
|
+
args.forEach((arg) => {
|
|
367
|
+
if (utils_1.t.isIdentifier(arg.expression) &&
|
|
368
|
+
localStyleAliases[arg.expression.value]) {
|
|
369
|
+
arg.expression = localStyleAliases[arg.expression.value];
|
|
370
|
+
}
|
|
371
|
+
});
|
|
319
372
|
const conditionals = [];
|
|
320
373
|
let groupIdCounter = 0;
|
|
321
374
|
let baseStyle = {};
|
|
@@ -690,128 +743,138 @@ function compileCSS(options) {
|
|
|
690
743
|
};
|
|
691
744
|
(0, utils_1.traverse)(ast, {
|
|
692
745
|
VariableDeclarator({ node }) {
|
|
693
|
-
if (utils_1.t.isIdentifier(node.id) &&
|
|
694
|
-
node.init
|
|
695
|
-
utils_1.t.isCallExpression(
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
(ctx.
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
prop.
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
func.type !== '
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
p
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
actualBody = actualBody.expression;
|
|
748
|
-
if (actualBody?.type === 'BlockStatement') {
|
|
749
|
-
const first = actualBody.stmts?.[0];
|
|
750
|
-
if (first?.type === 'ReturnStatement')
|
|
751
|
-
actualBody = first.argument;
|
|
746
|
+
if (utils_1.t.isIdentifier(node.id) && node.init) {
|
|
747
|
+
const init = node.init;
|
|
748
|
+
if (utils_1.t.isCallExpression(init)) {
|
|
749
|
+
const callee = init.callee;
|
|
750
|
+
let pName;
|
|
751
|
+
if (utils_1.t.isMemberExpression(callee) &&
|
|
752
|
+
utils_1.t.isIdentifier(callee.object) &&
|
|
753
|
+
utils_1.t.isIdentifier(callee.property)) {
|
|
754
|
+
if (plumeriaAliases[callee.object.value] === 'NAMESPACE')
|
|
755
|
+
pName = callee.property.value;
|
|
756
|
+
}
|
|
757
|
+
else if (utils_1.t.isIdentifier(callee) &&
|
|
758
|
+
plumeriaAliases[callee.value]) {
|
|
759
|
+
pName = plumeriaAliases[callee.value];
|
|
760
|
+
}
|
|
761
|
+
const isTheme = pName === 'createTheme';
|
|
762
|
+
if (pName &&
|
|
763
|
+
init.arguments.length > 0 &&
|
|
764
|
+
((!isTheme &&
|
|
765
|
+
init.arguments.length === 1 &&
|
|
766
|
+
utils_1.t.isObjectExpression(init.arguments[0].expression)) ||
|
|
767
|
+
(isTheme &&
|
|
768
|
+
init.arguments.length >= 2 &&
|
|
769
|
+
utils_1.t.isObjectExpression(init.arguments[1].expression)))) {
|
|
770
|
+
const arg = isTheme
|
|
771
|
+
? init.arguments[1].expression
|
|
772
|
+
: init.arguments[0].expression;
|
|
773
|
+
const resolveVariable = (name) => ctx.localCreateStyles[name]?.obj ||
|
|
774
|
+
(ctx.mergedCreateThemeHashTable[name]
|
|
775
|
+
? ctx.scannedTables.createAtomicMapTable[ctx.mergedCreateThemeHashTable[name]]
|
|
776
|
+
: undefined);
|
|
777
|
+
if (pName === 'create') {
|
|
778
|
+
const obj = (0, utils_1.objectExpressionToObject)(arg, ctx.mergedStaticTable, ctx.mergedKeyframesTable, ctx.mergedViewTransitionTable, ctx.mergedCreateThemeHashTable, ctx.scannedTables.createThemeObjectTable, ctx.mergedCreateTable, ctx.mergedCreateStaticHashTable, ctx.scannedTables.createStaticObjectTable, ctx.mergedVariantsTable, resolveVariable);
|
|
779
|
+
if (obj) {
|
|
780
|
+
const styleFunctions = {};
|
|
781
|
+
arg.properties.forEach((prop) => {
|
|
782
|
+
if (prop.type !== 'KeyValueProperty' ||
|
|
783
|
+
prop.key.type !== 'Identifier')
|
|
784
|
+
return;
|
|
785
|
+
const func = prop.value;
|
|
786
|
+
if (func.type !== 'ArrowFunctionExpression' &&
|
|
787
|
+
func.type !== 'FunctionExpression')
|
|
788
|
+
return;
|
|
789
|
+
const params = func.params.map((p) => {
|
|
790
|
+
if (utils_1.t.isIdentifier(p))
|
|
791
|
+
return p.value;
|
|
792
|
+
if (typeof p === 'object' &&
|
|
793
|
+
p !== null &&
|
|
794
|
+
'pat' in p &&
|
|
795
|
+
utils_1.t.isIdentifier(p.pat))
|
|
796
|
+
return p.pat.value;
|
|
797
|
+
return 'arg';
|
|
798
|
+
});
|
|
799
|
+
let actualBody = func.body;
|
|
752
800
|
if (actualBody?.type === 'ParenthesisExpression')
|
|
753
801
|
actualBody = actualBody.expression;
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
802
|
+
if (actualBody?.type === 'BlockStatement') {
|
|
803
|
+
const first = actualBody.stmts?.[0];
|
|
804
|
+
if (first?.type === 'ReturnStatement')
|
|
805
|
+
actualBody = first.argument;
|
|
806
|
+
if (actualBody?.type === 'ParenthesisExpression')
|
|
807
|
+
actualBody = actualBody.expression;
|
|
808
|
+
}
|
|
809
|
+
if (actualBody && actualBody.type === 'ObjectExpression') {
|
|
810
|
+
styleFunctions[prop.key.value] = {
|
|
811
|
+
params,
|
|
812
|
+
body: actualBody,
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
});
|
|
816
|
+
ctx.localCreateStyles[node.id.value] = {
|
|
817
|
+
type: 'create',
|
|
818
|
+
obj,
|
|
819
|
+
functions: styleFunctions,
|
|
820
|
+
};
|
|
821
|
+
}
|
|
767
822
|
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
823
|
+
else if (pName === 'variants') {
|
|
824
|
+
const obj = (0, utils_1.objectExpressionToObject)(arg, ctx.mergedStaticTable, ctx.mergedKeyframesTable, ctx.mergedViewTransitionTable, ctx.mergedCreateThemeHashTable, ctx.scannedTables.createThemeObjectTable, ctx.mergedCreateTable, ctx.mergedCreateStaticHashTable, ctx.scannedTables.createStaticObjectTable, ctx.mergedVariantsTable, resolveVariable);
|
|
825
|
+
if (obj) {
|
|
826
|
+
const { hashMap } = (0, utils_1.processVariants)(obj);
|
|
827
|
+
ctx.localCreateStyles[node.id.value] = {
|
|
828
|
+
type: 'variant',
|
|
829
|
+
obj,
|
|
830
|
+
hashMap,
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
else if (pName === 'createTheme') {
|
|
835
|
+
let selector = '';
|
|
836
|
+
const selectorExpr = init.arguments[0].expression;
|
|
837
|
+
if (utils_1.t.isStringLiteral(selectorExpr)) {
|
|
838
|
+
selector = selectorExpr.value;
|
|
839
|
+
}
|
|
840
|
+
const obj = (0, utils_1.objectExpressionToObject)(arg, ctx.mergedStaticTable, ctx.mergedKeyframesTable, ctx.mergedViewTransitionTable, ctx.mergedCreateThemeHashTable, ctx.scannedTables.createThemeObjectTable, ctx.mergedCreateTable, ctx.mergedCreateStaticHashTable, ctx.scannedTables.createStaticObjectTable, ctx.mergedVariantsTable);
|
|
841
|
+
const hash = (0, zss_engine_1.genBase36Hash)({ _themeSelector: selector, ...obj }, 1, 8);
|
|
842
|
+
const uKey = `${resourcePath}-${node.id.value}`;
|
|
843
|
+
ctx.scannedTables.createThemeHashTable[uKey] = hash;
|
|
844
|
+
ctx.scannedTables.createThemeObjectTable[hash] = obj;
|
|
845
|
+
if (ctx.scannedTables.createThemeSelectorTable) {
|
|
846
|
+
ctx.scannedTables.createThemeSelectorTable[hash] = selector;
|
|
847
|
+
}
|
|
848
|
+
const themeHashMap = {};
|
|
849
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
850
|
+
const cssVarName = (0, zss_engine_1.camelToKebabCase)(key);
|
|
851
|
+
const atomicHash = (0, zss_engine_1.genBase36Hash)({ [key]: value }, 1, 8);
|
|
852
|
+
themeHashMap[key] = `var(--${atomicHash}-${cssVarName})`;
|
|
853
|
+
}
|
|
854
|
+
ctx.scannedTables.createAtomicMapTable[hash] = themeHashMap;
|
|
773
855
|
ctx.localCreateStyles[node.id.value] = {
|
|
774
|
-
type: '
|
|
775
|
-
obj,
|
|
776
|
-
hashMap,
|
|
856
|
+
type: 'create',
|
|
857
|
+
obj: ctx.scannedTables.createAtomicMapTable[hash],
|
|
777
858
|
};
|
|
778
859
|
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
const uKey = `${resourcePath}-${node.id.value}`;
|
|
789
|
-
ctx.scannedTables.createThemeHashTable[uKey] = hash;
|
|
790
|
-
ctx.scannedTables.createThemeObjectTable[hash] = obj;
|
|
791
|
-
if (ctx.scannedTables.createThemeSelectorTable) {
|
|
792
|
-
ctx.scannedTables.createThemeSelectorTable[hash] = selector;
|
|
793
|
-
}
|
|
794
|
-
const themeHashMap = {};
|
|
795
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
796
|
-
const cssVarName = (0, zss_engine_1.camelToKebabCase)(key);
|
|
797
|
-
const atomicHash = (0, zss_engine_1.genBase36Hash)({ [key]: value }, 1, 8);
|
|
798
|
-
themeHashMap[key] = `var(--${atomicHash}-${cssVarName})`;
|
|
860
|
+
else if (pName === 'createStatic') {
|
|
861
|
+
const obj = (0, utils_1.objectExpressionToObject)(arg, ctx.mergedStaticTable, ctx.mergedKeyframesTable, ctx.mergedViewTransitionTable, ctx.mergedCreateThemeHashTable, ctx.scannedTables.createThemeObjectTable, ctx.mergedCreateTable, ctx.mergedCreateStaticHashTable, ctx.scannedTables.createStaticObjectTable, ctx.mergedVariantsTable);
|
|
862
|
+
if (obj) {
|
|
863
|
+
const hash = (0, zss_engine_1.genBase36Hash)(obj, 1, 8);
|
|
864
|
+
const uKey = `${resourcePath}-${node.id.value}`;
|
|
865
|
+
ctx.scannedTables.createStaticHashTable[uKey] = hash;
|
|
866
|
+
ctx.scannedTables.createStaticObjectTable[hash] = obj;
|
|
867
|
+
ctx.mergedCreateStaticHashTable[node.id.value] = hash;
|
|
868
|
+
}
|
|
799
869
|
}
|
|
800
|
-
ctx.scannedTables.createAtomicMapTable[hash] = themeHashMap;
|
|
801
|
-
ctx.localCreateStyles[node.id.value] = {
|
|
802
|
-
type: 'create',
|
|
803
|
-
obj: ctx.scannedTables.createAtomicMapTable[hash],
|
|
804
|
-
};
|
|
805
870
|
}
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
ctx.mergedCreateStaticHashTable[node.id.value] = hash;
|
|
814
|
-
}
|
|
871
|
+
}
|
|
872
|
+
else if (utils_1.t.isMemberExpression(init) &&
|
|
873
|
+
utils_1.t.isIdentifier(init.object)) {
|
|
874
|
+
const objName = init.object.value;
|
|
875
|
+
if (ctx.localCreateStyles[objName] !== undefined ||
|
|
876
|
+
ctx.mergedCreateTable[objName] !== undefined) {
|
|
877
|
+
localStyleAliases[node.id.value] = init;
|
|
815
878
|
}
|
|
816
879
|
}
|
|
817
880
|
}
|
|
@@ -839,7 +902,10 @@ function compileCSS(options) {
|
|
|
839
902
|
if (node.value &&
|
|
840
903
|
node.value.type === 'JSXExpressionContainer' &&
|
|
841
904
|
node.value.expression.type !== 'JSXEmptyExpression') {
|
|
842
|
-
|
|
905
|
+
let expr = node.value.expression;
|
|
906
|
+
if (utils_1.t.isIdentifier(expr) && localStyleAliases[expr.value]) {
|
|
907
|
+
expr = localStyleAliases[expr.value];
|
|
908
|
+
}
|
|
843
909
|
const styles = extractStylesFromExpression(expr, ctx);
|
|
844
910
|
styles.forEach(processStyle);
|
|
845
911
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/compiler",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.4",
|
|
4
4
|
"description": "Plumeria swc based compiler for statically extracting css",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist/"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@plumeria/utils": "^16.2.
|
|
24
|
+
"@plumeria/utils": "^16.2.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@rust-gear/glob": "1.0.0",
|