zss-engine 0.2.44 → 0.2.46
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/package.json +1 -1
- package/types/types/common/css-properties.d.ts +4 -4
- package/types/types/common/properties.d.ts +5 -0
- package/types/types/main/create.d.ts +7 -1
- package/types/types/main/global.d.ts +13 -13
- package/types/types/common/css-property.d.ts +0 -5
- /package/dist/cjs/types/common/{css-property.js → properties.js} +0 -0
- /package/dist/esm/types/common/{css-property.js → properties.js} +0 -0
package/package.json
CHANGED
|
@@ -38,9 +38,9 @@ type ColonString = `:${string}`;
|
|
|
38
38
|
type ColonSelector = {
|
|
39
39
|
[key in ColonString]: CommonProperties;
|
|
40
40
|
};
|
|
41
|
-
export type
|
|
42
|
-
type
|
|
43
|
-
[K in
|
|
41
|
+
export type Query = `@media ${string}` | `@container ${string}`;
|
|
42
|
+
type QuerySelector = {
|
|
43
|
+
[K in Query]: CommonProperties | ColonSelector | AndSelector;
|
|
44
44
|
};
|
|
45
|
-
export type CSSProperties = CommonProperties | AndSelector | ColonSelector |
|
|
45
|
+
export type CSSProperties = CommonProperties | AndSelector | ColonSelector | QuerySelector | CSSVariableProperty;
|
|
46
46
|
export {};
|
|
@@ -5,6 +5,12 @@ export type CreateStyleType<T> = {
|
|
|
5
5
|
export type CreateStyle = {
|
|
6
6
|
[key: string]: CSSProperties;
|
|
7
7
|
};
|
|
8
|
+
type Selector<Properties> = {
|
|
9
|
+
readonly properties: Properties;
|
|
10
|
+
};
|
|
8
11
|
export type ReturnType<T> = {
|
|
9
|
-
[K in keyof T]: Readonly<
|
|
12
|
+
[K in keyof T]: Readonly<{
|
|
13
|
+
[P in keyof T[K]]: P extends `@media ${string}` | `@container ${string}` | `:${string}` | `&${string}` ? Selector<keyof T[K][P]> : Readonly<T[K][P]>;
|
|
14
|
+
}>;
|
|
10
15
|
};
|
|
16
|
+
export {};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import type { CSSProperties,
|
|
1
|
+
import type { CSSProperties, Query } from '../common/css-properties';
|
|
2
2
|
type JSXType = keyof HTMLElementTagNameMap | '*' | ':root';
|
|
3
|
-
type
|
|
3
|
+
type HTMLSelector = {
|
|
4
4
|
[K in JSXType]: CSSProperties;
|
|
5
5
|
};
|
|
6
6
|
type ClassName = `.${string}`;
|
|
7
|
-
type
|
|
7
|
+
type ClassNameSelector = {
|
|
8
8
|
[K in ClassName]: CSSProperties;
|
|
9
9
|
};
|
|
10
10
|
type Attribute = `${string}[${string}]${string}`;
|
|
11
|
-
type
|
|
11
|
+
type AttributeSelector = {
|
|
12
12
|
[K in Attribute]: CSSProperties;
|
|
13
13
|
};
|
|
14
14
|
type Consecutive = `${JSXType} ${string}`;
|
|
15
|
-
type
|
|
15
|
+
type ConsecutiveSelector = {
|
|
16
16
|
[K in Consecutive]: CSSProperties;
|
|
17
17
|
};
|
|
18
18
|
type PseudoClass = `${JSXType}:${string}`;
|
|
19
|
-
type
|
|
19
|
+
type PseudoClassSelector = {
|
|
20
20
|
[K in PseudoClass]: CSSProperties;
|
|
21
21
|
};
|
|
22
22
|
type PseudoElement = `::${string}`;
|
|
23
|
-
type
|
|
23
|
+
type PseudoElementSelector = {
|
|
24
24
|
[K in PseudoElement]: CSSProperties;
|
|
25
25
|
};
|
|
26
|
-
type
|
|
26
|
+
type KeyframesInSelector = 'from' | 'to' | `${number}%`;
|
|
27
27
|
export type CreateKeyframes = {
|
|
28
|
-
[K in
|
|
28
|
+
[K in KeyframesInSelector]?: CSSProperties;
|
|
29
29
|
};
|
|
30
|
-
type
|
|
30
|
+
type KeyframesSelector = {
|
|
31
31
|
[K in `@keyframes ${string}`]: CreateKeyframes;
|
|
32
32
|
};
|
|
33
|
-
type
|
|
34
|
-
[K in
|
|
33
|
+
type QuerySelectorHTML = {
|
|
34
|
+
[K in Query]: CSSHTML;
|
|
35
35
|
};
|
|
36
|
-
export type CSSHTML =
|
|
36
|
+
export type CSSHTML = HTMLSelector | ClassNameSelector | AttributeSelector | ConsecutiveSelector | PseudoClassSelector | PseudoElementSelector | KeyframesSelector | QuerySelectorHTML;
|
|
37
37
|
export {};
|
|
File without changes
|
|
File without changes
|