@plumeria/utils 12.0.0 → 12.0.2
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/parser.js +2 -16
- package/package.json +1 -1
package/dist/parser.js
CHANGED
|
@@ -534,13 +534,8 @@ function resolveCreateStaticTableMemberExpression(node, createStaticHashTable, c
|
|
|
534
534
|
}
|
|
535
535
|
const fileCache = {};
|
|
536
536
|
let globalAgregatedTables = null;
|
|
537
|
-
let lastScanTime = 0;
|
|
538
|
-
const CACHE_DURATION = 500;
|
|
539
537
|
function scanAll() {
|
|
540
|
-
|
|
541
|
-
if (globalAgregatedTables &&
|
|
542
|
-
(process.env.NODE_ENV === 'production' ||
|
|
543
|
-
now - lastScanTime < CACHE_DURATION)) {
|
|
538
|
+
if (globalAgregatedTables && process.env.NODE_ENV === 'production') {
|
|
544
539
|
return globalAgregatedTables;
|
|
545
540
|
}
|
|
546
541
|
const localTables = {
|
|
@@ -803,15 +798,6 @@ function scanAll() {
|
|
|
803
798
|
localTables.createStaticHashTable[uniqueKey] = hash;
|
|
804
799
|
localTables.createStaticObjectTable[hash] = obj;
|
|
805
800
|
localCreateStaticObjectTable[hash] = obj;
|
|
806
|
-
const hashMap = {
|
|
807
|
-
__static: {},
|
|
808
|
-
};
|
|
809
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
810
|
-
if (typeof value === 'string') {
|
|
811
|
-
hashMap.__static[key] = value;
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
localTables.createAtomicMapTable[hash] = hashMap;
|
|
815
801
|
}
|
|
816
802
|
else if (method === 'keyframes') {
|
|
817
803
|
const hash = (0, zss_engine_1.genBase36Hash)(obj, 1, 8);
|
|
@@ -841,6 +827,7 @@ function scanAll() {
|
|
|
841
827
|
const cssVarName = (0, zss_engine_1.camelToKebabCase)(key);
|
|
842
828
|
hashMap[key] = `var(--${hash}-${cssVarName})`;
|
|
843
829
|
}
|
|
830
|
+
localCreateAtomicMapTable[hash] = hashMap;
|
|
844
831
|
localTables.createAtomicMapTable[hash] = hashMap;
|
|
845
832
|
}
|
|
846
833
|
else if (method === 'create') {
|
|
@@ -896,7 +883,6 @@ function scanAll() {
|
|
|
896
883
|
}
|
|
897
884
|
}
|
|
898
885
|
globalAgregatedTables = localTables;
|
|
899
|
-
lastScanTime = now;
|
|
900
886
|
return localTables;
|
|
901
887
|
}
|
|
902
888
|
function extractOndemandStyles(obj, extractedSheets, t) {
|