zss-engine 0.2.66 → 0.2.68
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/cjs/utils/hash.js
CHANGED
|
@@ -61,7 +61,7 @@ function genBase36Hash(obj, seed, length) {
|
|
|
61
61
|
const normalized = deepNormalize(obj);
|
|
62
62
|
const hashValue = murmurhash3_32(normalized, seed);
|
|
63
63
|
const hashStr = hashValue.toString(36);
|
|
64
|
-
const firstChar = '
|
|
64
|
+
const firstChar = 'z';
|
|
65
65
|
let result = firstChar + hashStr;
|
|
66
66
|
if (result.length > length) {
|
|
67
67
|
result = result.slice(0, length);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.splitAtomicAndNested = splitAtomicAndNested;
|
|
4
4
|
exports.processAtomicProps = processAtomicProps;
|
|
5
5
|
const index_js_1 = require("../index.js");
|
|
6
|
-
const
|
|
6
|
+
const shorthand_js_1 = require("./shorthand.js");
|
|
7
7
|
function splitAtomicAndNested(obj, flat, nonFlat) {
|
|
8
8
|
Object.entries(obj).forEach(([property, value]) => {
|
|
9
9
|
if (property.startsWith(':') || property.startsWith('&')) {
|
|
@@ -27,7 +27,7 @@ function splitAtomicAndNested(obj, flat, nonFlat) {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
const LONG_TO_SHORT = {};
|
|
30
|
-
Object.entries(
|
|
30
|
+
Object.entries(shorthand_js_1.SHORTHAND_PROPERTIES).forEach(([shorthand, longhands]) => {
|
|
31
31
|
longhands.forEach(long => {
|
|
32
32
|
LONG_TO_SHORT[long] = shorthand;
|
|
33
33
|
});
|
|
@@ -41,8 +41,8 @@ function processAtomicProps(flatProps, atomicHashes, allStyleSheets, parentAtRul
|
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
43
43
|
const kebab = (0, index_js_1.camelToKebabCase)(property);
|
|
44
|
-
if (
|
|
45
|
-
const longhands =
|
|
44
|
+
if (shorthand_js_1.SHORTHAND_PROPERTIES[kebab]) {
|
|
45
|
+
const longhands = shorthand_js_1.SHORTHAND_PROPERTIES[kebab];
|
|
46
46
|
longhands.forEach(l => seen.delete(l));
|
|
47
47
|
seen.add(kebab);
|
|
48
48
|
resultQueue.push([property, value]);
|
package/dist/esm/utils/hash.js
CHANGED
|
@@ -58,7 +58,7 @@ export function genBase36Hash(obj, seed, length) {
|
|
|
58
58
|
const normalized = deepNormalize(obj);
|
|
59
59
|
const hashValue = murmurhash3_32(normalized, seed);
|
|
60
60
|
const hashStr = hashValue.toString(36);
|
|
61
|
-
const firstChar = '
|
|
61
|
+
const firstChar = 'z';
|
|
62
62
|
let result = firstChar + hashStr;
|
|
63
63
|
if (result.length > length) {
|
|
64
64
|
result = result.slice(0, length);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { camelToKebabCase, genBase36Hash, applyCssValue, transpileAtomic } from '../index.js';
|
|
2
|
-
import { SHORTHAND_PROPERTIES } from './shorthand';
|
|
2
|
+
import { SHORTHAND_PROPERTIES } from './shorthand.js';
|
|
3
3
|
function splitAtomicAndNested(obj, flat, nonFlat) {
|
|
4
4
|
Object.entries(obj).forEach(([property, value]) => {
|
|
5
5
|
if (property.startsWith(':') || property.startsWith('&')) {
|