@plumeria/compiler 18.3.3 → 18.3.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 +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -890,7 +890,7 @@ function compileCSS(options) {
|
|
|
890
890
|
selector = selectorExpr.value;
|
|
891
891
|
}
|
|
892
892
|
const obj = (0, utils_1.objectExpressionToObject)(args[1].expression, ctx.mergedStaticTable, ctx.mergedKeyframesTable, ctx.mergedViewTransitionTable, ctx.mergedCreateThemeHashTable, ctx.scannedTables.createThemeObjectTable, ctx.mergedCreateTable, ctx.mergedCreateStaticHashTable, ctx.scannedTables.createStaticObjectTable, ctx.mergedVariantsTable);
|
|
893
|
-
const hash = (0,
|
|
893
|
+
const hash = (0, utils_1.themeHashOf)(selector, obj);
|
|
894
894
|
ctx.scannedTables.createThemeObjectTable[hash] = obj;
|
|
895
895
|
if (ctx.scannedTables.createThemeSelectorTable) {
|
|
896
896
|
ctx.scannedTables.createThemeSelectorTable[hash] = selector;
|
|
@@ -965,7 +965,7 @@ function compileCSS(options) {
|
|
|
965
965
|
selector = selectorExpr.value;
|
|
966
966
|
}
|
|
967
967
|
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);
|
|
968
|
-
const hash = (0,
|
|
968
|
+
const hash = (0, utils_1.themeHashOf)(selector, obj);
|
|
969
969
|
const uKey = `${resourcePath}-${node.id.value}`;
|
|
970
970
|
ctx.scannedTables.createThemeHashTable[uKey] = hash;
|
|
971
971
|
ctx.scannedTables.createThemeObjectTable[hash] = obj;
|
|
@@ -975,7 +975,7 @@ function compileCSS(options) {
|
|
|
975
975
|
const themeHashMap = {};
|
|
976
976
|
for (const [key, value] of Object.entries(obj)) {
|
|
977
977
|
const cssVarName = (0, zss_engine_1.camelToKebabCase)(key);
|
|
978
|
-
const atomicHash = (0, zss_engine_1.genBase36Hash)({ [key]: value }, 1, 8);
|
|
978
|
+
const atomicHash = (0, zss_engine_1.genBase36Hash)({ _theme: hash, [key]: value }, 1, 8);
|
|
979
979
|
themeHashMap[key] = `var(--${atomicHash}-${cssVarName})`;
|
|
980
980
|
}
|
|
981
981
|
ctx.scannedTables.createAtomicMapTable[hash] = themeHashMap;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/compiler",
|
|
3
|
-
"version": "18.3.
|
|
3
|
+
"version": "18.3.4",
|
|
4
4
|
"description": "Internal SWC-based compiler that statically extracts CSS for Plumeria.",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist/"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@plumeria/utils": "^18.3.
|
|
24
|
+
"@plumeria/utils": "^18.3.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@rust-gear/glob": "1.1.1",
|