zss-engine 2.2.7 → 2.2.8
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 +5 -9
- package/dist/cjs/utils/helper.js +1 -6
- package/dist/esm/index.js +0 -1
- package/dist/esm/utils/helper.js +0 -5
- package/dist/types/index.d.ts +1 -4
- package/dist/types/types/css-properties.d.ts +23 -0
- package/dist/types/utils/helper.d.ts +0 -3
- package/dist/types/utils/override-longhand.d.ts +1 -1
- package/dist/types/utils/transpile.d.ts +2 -2
- package/package.json +1 -1
- package/dist/cjs/types/main/global.js +0 -2
- package/dist/cjs/types/main/variableTypes.js +0 -2
- package/dist/cjs/types/main/viewTransition.js +0 -2
- package/dist/esm/types/main/global.js +0 -1
- package/dist/esm/types/main/variableTypes.js +0 -1
- package/dist/esm/types/main/viewTransition.js +0 -1
- package/dist/types/types/common/css-properties.d.ts +0 -46
- package/dist/types/types/main/global.d.ts +0 -37
- package/dist/types/types/main/variableTypes.d.ts +0 -7
- package/dist/types/types/main/viewTransition.d.ts +0 -7
- /package/dist/cjs/types/{common/css-properties.js → css-properties.js} +0 -0
- /package/dist/cjs/types/{common/css-property.js → css-property.js} +0 -0
- /package/dist/esm/types/{common/css-properties.js → css-properties.js} +0 -0
- /package/dist/esm/types/{common/css-property.js → css-property.js} +0 -0
- /package/dist/types/types/{common/css-property.d.ts → css-property.d.ts} +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.exceptionCamelCase = exports.applyCssValue = exports.camelToKebabCase = exports.overrideLonghand = exports.processAtomicProps = exports.splitAtomicAndNested = exports.transpileAtomic = exports.transpile = exports.genBase36Hash =
|
|
4
|
-
var helper_js_1 = require("./utils/helper.js");
|
|
5
|
-
Object.defineProperty(exports, "isServer", { enumerable: true, get: function () { return helper_js_1.isServer; } });
|
|
6
|
-
Object.defineProperty(exports, "isDevelopment", { enumerable: true, get: function () { return helper_js_1.isDevelopment; } });
|
|
7
|
-
Object.defineProperty(exports, "isTestingDevelopment", { enumerable: true, get: function () { return helper_js_1.isTestingDevelopment; } });
|
|
3
|
+
exports.exceptionCamelCase = exports.applyCssValue = exports.camelToKebabCase = exports.overrideLonghand = exports.processAtomicProps = exports.splitAtomicAndNested = exports.transpileAtomic = exports.transpile = exports.genBase36Hash = void 0;
|
|
8
4
|
var hash_js_1 = require("./utils/hash.js");
|
|
9
5
|
Object.defineProperty(exports, "genBase36Hash", { enumerable: true, get: function () { return hash_js_1.genBase36Hash; } });
|
|
10
6
|
var transpile_js_1 = require("./utils/transpile.js");
|
|
@@ -16,7 +12,7 @@ Object.defineProperty(exports, "splitAtomicAndNested", { enumerable: true, get:
|
|
|
16
12
|
Object.defineProperty(exports, "processAtomicProps", { enumerable: true, get: function () { return processor_atomic_js_1.processAtomicProps; } });
|
|
17
13
|
var override_longhand_js_1 = require("./utils/override-longhand.js");
|
|
18
14
|
Object.defineProperty(exports, "overrideLonghand", { enumerable: true, get: function () { return override_longhand_js_1.overrideLonghand; } });
|
|
19
|
-
var
|
|
20
|
-
Object.defineProperty(exports, "camelToKebabCase", { enumerable: true, get: function () { return
|
|
21
|
-
Object.defineProperty(exports, "applyCssValue", { enumerable: true, get: function () { return
|
|
22
|
-
Object.defineProperty(exports, "exceptionCamelCase", { enumerable: true, get: function () { return
|
|
15
|
+
var helper_js_1 = require("./utils/helper.js");
|
|
16
|
+
Object.defineProperty(exports, "camelToKebabCase", { enumerable: true, get: function () { return helper_js_1.camelToKebabCase; } });
|
|
17
|
+
Object.defineProperty(exports, "applyCssValue", { enumerable: true, get: function () { return helper_js_1.applyCssValue; } });
|
|
18
|
+
Object.defineProperty(exports, "exceptionCamelCase", { enumerable: true, get: function () { return helper_js_1.exceptionCamelCase; } });
|
package/dist/cjs/utils/helper.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.camelToKebabCase = exports.applyCssValue = exports.exceptionCamelCase =
|
|
3
|
+
exports.camelToKebabCase = exports.applyCssValue = exports.exceptionCamelCase = void 0;
|
|
4
4
|
const hex_to_color_name_js_1 = require("./hex-to-color-name.js");
|
|
5
|
-
const isWindowDefined = typeof window !== 'undefined';
|
|
6
|
-
const isDocumentDefined = typeof document !== 'undefined';
|
|
7
|
-
exports.isServer = !isWindowDefined || !isDocumentDefined;
|
|
8
|
-
exports.isDevelopment = process.env.NODE_ENV === 'development';
|
|
9
|
-
exports.isTestingDevelopment = process.env.NODE_ENV === 'test' || exports.isDevelopment;
|
|
10
5
|
const exception = [
|
|
11
6
|
'animation-iteration-count',
|
|
12
7
|
'aspect-ratio',
|
package/dist/esm/index.js
CHANGED
package/dist/esm/utils/helper.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { hexToColorName } from './hex-to-color-name.js';
|
|
2
|
-
const isWindowDefined = typeof window !== 'undefined';
|
|
3
|
-
const isDocumentDefined = typeof document !== 'undefined';
|
|
4
|
-
export const isServer = !isWindowDefined || !isDocumentDefined;
|
|
5
|
-
export const isDevelopment = process.env.NODE_ENV === 'development';
|
|
6
|
-
export const isTestingDevelopment = process.env.NODE_ENV === 'test' || isDevelopment;
|
|
7
2
|
const exception = [
|
|
8
3
|
'animation-iteration-count',
|
|
9
4
|
'aspect-ratio',
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
export type { CSSProperties } from './types/
|
|
2
|
-
export type { CreateTheme } from './types/main/variableTypes';
|
|
3
|
-
export type { ViewTransition } from './types/main/viewTransition';
|
|
4
|
-
export { isServer, isDevelopment, isTestingDevelopment } from './utils/helper.js';
|
|
1
|
+
export type { CSSProperties } from './types/css-properties.js';
|
|
5
2
|
export { genBase36Hash } from './utils/hash.js';
|
|
6
3
|
export { transpile } from './utils/transpile.js';
|
|
7
4
|
export { transpileAtomic } from './utils/transpile-atomic.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Properties } from 'csstype';
|
|
2
|
+
type CSSVariableKey = `--${string}`;
|
|
3
|
+
type CSSVariableValue = `var(${CSSVariableKey})`;
|
|
4
|
+
type CSSVariableProperty = {
|
|
5
|
+
[key: CSSVariableKey]: string | number;
|
|
6
|
+
};
|
|
7
|
+
type BaseCSSProperties = {
|
|
8
|
+
[K in keyof Properties]: Properties[K] | CSSVariableValue;
|
|
9
|
+
};
|
|
10
|
+
type ArrayString = `[${string}`;
|
|
11
|
+
type ArraySelector = {
|
|
12
|
+
[key in ArrayString]: BaseCSSProperties | CSSVariableProperty;
|
|
13
|
+
};
|
|
14
|
+
type ColonString = `:${string}`;
|
|
15
|
+
type ColonSelector = {
|
|
16
|
+
[key in ColonString]: BaseCSSProperties | CSSVariableProperty;
|
|
17
|
+
};
|
|
18
|
+
type Query = `@media ${string}` | `@container ${string}`;
|
|
19
|
+
type QuerySelector = {
|
|
20
|
+
[K in Query]: BaseCSSProperties | ColonSelector | ArraySelector | CSSVariableProperty;
|
|
21
|
+
};
|
|
22
|
+
export type CSSProperties = BaseCSSProperties | ArraySelector | ColonSelector | QuerySelector | CSSVariableProperty;
|
|
23
|
+
export {};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export declare const isServer: boolean;
|
|
2
|
-
export declare const isDevelopment: boolean;
|
|
3
|
-
export declare const isTestingDevelopment: boolean;
|
|
4
1
|
export declare const exceptionCamelCase: string[];
|
|
5
2
|
export declare const applyCssValue: (value: string | number, cssProp: string) => string;
|
|
6
3
|
export declare const camelToKebabCase: (property: string) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CSSProperties } from '../types/
|
|
1
|
+
import { CSSProperties } from '../types/css-properties.js';
|
|
2
2
|
export declare const overrideLonghand: (style: CSSProperties) => CSSProperties;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function transpile(object:
|
|
1
|
+
import type { CSSProperties } from '../types/css-properties.js';
|
|
2
|
+
export declare function transpile(object: Record<string, CSSProperties>, base36Hash?: string, core?: string): {
|
|
3
3
|
styleSheet: string;
|
|
4
4
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { CSSVariableValue, CSSVariableProperty } from '../main/variableTypes';
|
|
2
|
-
import type { Properties, Property } from 'csstype';
|
|
3
|
-
type ColorValue = Exclude<Property.Color, '-moz-initial'> | (string & {});
|
|
4
|
-
type CSSColorProperty = Exclude<ColorValue, SystemColorKeyword>;
|
|
5
|
-
type SystemColorKeyword = 'ActiveBorder' | 'ActiveCaption' | 'AppWorkspace' | 'Background' | 'ButtonFace' | 'ButtonHighlight' | 'ButtonShadow' | 'ButtonText' | 'CaptionText' | 'GrayText' | 'Highlight' | 'HighlightText' | 'InactiveBorder' | 'InactiveCaption' | 'InactiveCaptionText' | 'InfoBackground' | 'InfoText' | 'Menu' | 'MenuText' | 'Scrollbar' | 'ThreeDDarkShadow' | 'ThreeDFace' | 'ThreeDHighlight' | 'ThreeDLightShadow' | 'ThreeDShadow' | 'Window' | 'WindowFrame' | 'WindowText';
|
|
6
|
-
type ExcludeMozInitial<T> = Exclude<T, '-moz-initial'>;
|
|
7
|
-
type CSSTypeProperties = Properties<number | (string & {})>;
|
|
8
|
-
type CustomProperties = {
|
|
9
|
-
[K in keyof CSSTypeProperties]: ExcludeMozInitial<CSSTypeProperties[K]>;
|
|
10
|
-
};
|
|
11
|
-
type BaseCSSProperties = {
|
|
12
|
-
[K in keyof CustomProperties]: CustomProperties[K] | CSSVariableValue;
|
|
13
|
-
};
|
|
14
|
-
interface CommonProperties extends BaseCSSProperties {
|
|
15
|
-
accentColor?: CSSColorProperty;
|
|
16
|
-
color?: CSSColorProperty;
|
|
17
|
-
borderLeftColor?: CSSColorProperty;
|
|
18
|
-
borderRightColor?: CSSColorProperty;
|
|
19
|
-
borderTopColor?: CSSColorProperty;
|
|
20
|
-
borderBottomColor?: CSSColorProperty;
|
|
21
|
-
borderBlockColor?: CSSColorProperty;
|
|
22
|
-
borderBlockStartColor?: CSSColorProperty;
|
|
23
|
-
borderBlockEndColor?: CSSColorProperty;
|
|
24
|
-
borderInlineColor?: CSSColorProperty;
|
|
25
|
-
borderInlineStartColor?: CSSColorProperty;
|
|
26
|
-
borderInlineEndColor?: CSSColorProperty;
|
|
27
|
-
backgroundColor?: CSSColorProperty;
|
|
28
|
-
outlineColor?: CSSColorProperty;
|
|
29
|
-
textDecorationColor?: CSSColorProperty;
|
|
30
|
-
caretColor?: CSSColorProperty;
|
|
31
|
-
columnRuleColor?: CSSColorProperty;
|
|
32
|
-
}
|
|
33
|
-
type ArrayString = `[${string}`;
|
|
34
|
-
type ArraySelector = {
|
|
35
|
-
[key in ArrayString]: CommonProperties | CSSVariableProperty;
|
|
36
|
-
};
|
|
37
|
-
type ColonString = `:${string}`;
|
|
38
|
-
type ColonSelector = {
|
|
39
|
-
[key in ColonString]: CommonProperties | CSSVariableProperty;
|
|
40
|
-
};
|
|
41
|
-
export type Query = `@media ${string}` | `@container ${string}`;
|
|
42
|
-
type QuerySelector = {
|
|
43
|
-
[K in Query]: CommonProperties | ColonSelector | ArraySelector | CSSVariableProperty;
|
|
44
|
-
};
|
|
45
|
-
export type CSSProperties = CommonProperties | ArraySelector | ColonSelector | QuerySelector | CSSVariableProperty;
|
|
46
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties, Query } from '../common/css-properties';
|
|
2
|
-
type JSXType = keyof HTMLElementTagNameMap | '*' | ':root';
|
|
3
|
-
type HTMLSelector = {
|
|
4
|
-
[K in JSXType]: CSSProperties;
|
|
5
|
-
};
|
|
6
|
-
type ClassName = `.${string}`;
|
|
7
|
-
type ClassNameSelector = {
|
|
8
|
-
[K in ClassName]: CSSProperties;
|
|
9
|
-
};
|
|
10
|
-
type Attribute = `${string}[${string}]${string}`;
|
|
11
|
-
type AttributeSelector = {
|
|
12
|
-
[K in Attribute]: CSSProperties;
|
|
13
|
-
};
|
|
14
|
-
type Consecutive = `${JSXType} ${string}`;
|
|
15
|
-
type ConsecutiveSelector = {
|
|
16
|
-
[K in Consecutive]: CSSProperties;
|
|
17
|
-
};
|
|
18
|
-
type PseudoClass = `${JSXType}:${string}`;
|
|
19
|
-
type PseudoClassSelector = {
|
|
20
|
-
[K in PseudoClass]: CSSProperties;
|
|
21
|
-
};
|
|
22
|
-
type PseudoElement = `::${string}`;
|
|
23
|
-
type PseudoElementSelector = {
|
|
24
|
-
[K in PseudoElement]: CSSProperties;
|
|
25
|
-
};
|
|
26
|
-
type KeyframesInSelector = 'from' | 'to' | `${number}%`;
|
|
27
|
-
export type Keyframes = {
|
|
28
|
-
[K in KeyframesInSelector]?: CSSProperties;
|
|
29
|
-
};
|
|
30
|
-
type KeyframesSelector = {
|
|
31
|
-
[K in `@keyframes ${string}`]: Keyframes;
|
|
32
|
-
};
|
|
33
|
-
type QuerySelectorHTML = {
|
|
34
|
-
[K in Query]: CSSHTML;
|
|
35
|
-
};
|
|
36
|
-
export type CSSHTML = HTMLSelector | ClassNameSelector | AttributeSelector | ConsecutiveSelector | PseudoClassSelector | PseudoElementSelector | KeyframesSelector | QuerySelectorHTML;
|
|
37
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
type CSSVariableKey = `--${string}`;
|
|
2
|
-
export type CSSVariableValue = `var(${CSSVariableKey})`;
|
|
3
|
-
export type CSSVariableProperty = {
|
|
4
|
-
[key: CSSVariableKey]: string | number;
|
|
5
|
-
};
|
|
6
|
-
export type CreateTheme = Record<string, Record<string, string | number>>;
|
|
7
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|