zss-engine 2.2.5 → 2.2.6
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/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applyCssValue = exports.camelToKebabCase = exports.overrideLonghand = exports.processAtomicProps = exports.splitAtomicAndNested = exports.transpileAtomic = exports.transpile = exports.genBase36Hash = exports.isTestingDevelopment = exports.isDevelopment = exports.isServer = void 0;
|
|
3
|
+
exports.exceptionCamelCase = exports.applyCssValue = exports.camelToKebabCase = exports.overrideLonghand = exports.processAtomicProps = exports.splitAtomicAndNested = exports.transpileAtomic = exports.transpile = exports.genBase36Hash = exports.isTestingDevelopment = exports.isDevelopment = exports.isServer = void 0;
|
|
4
4
|
var helper_js_1 = require("./utils/helper.js");
|
|
5
5
|
Object.defineProperty(exports, "isServer", { enumerable: true, get: function () { return helper_js_1.isServer; } });
|
|
6
6
|
Object.defineProperty(exports, "isDevelopment", { enumerable: true, get: function () { return helper_js_1.isDevelopment; } });
|
|
@@ -19,3 +19,4 @@ Object.defineProperty(exports, "overrideLonghand", { enumerable: true, get: func
|
|
|
19
19
|
var helper_js_2 = require("./utils/helper.js");
|
|
20
20
|
Object.defineProperty(exports, "camelToKebabCase", { enumerable: true, get: function () { return helper_js_2.camelToKebabCase; } });
|
|
21
21
|
Object.defineProperty(exports, "applyCssValue", { enumerable: true, get: function () { return helper_js_2.applyCssValue; } });
|
|
22
|
+
Object.defineProperty(exports, "exceptionCamelCase", { enumerable: true, get: function () { return helper_js_2.exceptionCamelCase; } });
|
package/dist/cjs/utils/helper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.camelToKebabCase = exports.applyCssValue = exports.isTestingDevelopment = exports.isDevelopment = exports.isServer = void 0;
|
|
3
|
+
exports.camelToKebabCase = exports.applyCssValue = exports.exceptionCamelCase = exports.isTestingDevelopment = exports.isDevelopment = exports.isServer = void 0;
|
|
4
4
|
const hex_to_color_name_js_1 = require("./hex-to-color-name.js");
|
|
5
5
|
const isWindowDefined = typeof window !== 'undefined';
|
|
6
6
|
const isDocumentDefined = typeof document !== 'undefined';
|
|
@@ -42,6 +42,7 @@ const exception = [
|
|
|
42
42
|
'z-index',
|
|
43
43
|
'zoom',
|
|
44
44
|
];
|
|
45
|
+
exports.exceptionCamelCase = exception.map(prop => prop.replace(/-([a-z])/g, (_, char) => char.toUpperCase()));
|
|
45
46
|
const convertHexToColorName = (value) => {
|
|
46
47
|
return value.replace(/#[0-9a-fA-F]{3,6}\b/g, match => {
|
|
47
48
|
return hex_to_color_name_js_1.hexToColorName[match.toLowerCase()] || match;
|
package/dist/esm/index.js
CHANGED
|
@@ -4,4 +4,4 @@ export { transpile } from './utils/transpile.js';
|
|
|
4
4
|
export { transpileAtomic } from './utils/transpile-atomic.js';
|
|
5
5
|
export { splitAtomicAndNested, processAtomicProps } from './utils/processor-atomic.js';
|
|
6
6
|
export { overrideLonghand } from './utils/override-longhand.js';
|
|
7
|
-
export { camelToKebabCase, applyCssValue } from './utils/helper.js';
|
|
7
|
+
export { camelToKebabCase, applyCssValue, exceptionCamelCase } from './utils/helper.js';
|
package/dist/esm/utils/helper.js
CHANGED
|
@@ -39,6 +39,7 @@ const exception = [
|
|
|
39
39
|
'z-index',
|
|
40
40
|
'zoom',
|
|
41
41
|
];
|
|
42
|
+
export const exceptionCamelCase = exception.map(prop => prop.replace(/-([a-z])/g, (_, char) => char.toUpperCase()));
|
|
42
43
|
const convertHexToColorName = (value) => {
|
|
43
44
|
return value.replace(/#[0-9a-fA-F]{3,6}\b/g, match => {
|
|
44
45
|
return hexToColorName[match.toLowerCase()] || match;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export { transpile } from './utils/transpile.js';
|
|
|
8
8
|
export { transpileAtomic } from './utils/transpile-atomic.js';
|
|
9
9
|
export { splitAtomicAndNested, processAtomicProps } from './utils/processor-atomic.js';
|
|
10
10
|
export { overrideLonghand } from './utils/override-longhand.js';
|
|
11
|
-
export { camelToKebabCase, applyCssValue } from './utils/helper.js';
|
|
11
|
+
export { camelToKebabCase, applyCssValue, exceptionCamelCase } from './utils/helper.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const isServer: boolean;
|
|
2
2
|
export declare const isDevelopment: boolean;
|
|
3
3
|
export declare const isTestingDevelopment: boolean;
|
|
4
|
+
export declare const exceptionCamelCase: string[];
|
|
4
5
|
export declare const applyCssValue: (value: string | number, cssProp: string) => string;
|
|
5
6
|
export declare const camelToKebabCase: (property: string) => string;
|
package/package.json
CHANGED