zss-engine 0.2.8 → 0.2.9
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 +8 -4
- package/types/types/main/global.d.ts +19 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zss-engine",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Zero-runtime Style Sheet Engine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"zero-runtime",
|
|
@@ -23,10 +23,14 @@
|
|
|
23
23
|
"main": "dist/index.js",
|
|
24
24
|
"module": "dist/index.mjs",
|
|
25
25
|
"types": "types/index.d.ts",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist/",
|
|
28
|
+
"types/"
|
|
29
|
+
],
|
|
26
30
|
"scripts": {
|
|
27
|
-
"build": "
|
|
31
|
+
"build": "rimraf dist types && pnpm esm && pnpm cjs",
|
|
28
32
|
"cjs": "tsc --project tsconfig.cjs.json",
|
|
29
|
-
"esm": "tsc --project tsconfig.esm.json && node
|
|
33
|
+
"esm": "tsc --project tsconfig.esm.json && node esm.create.mjs",
|
|
30
34
|
"test": "jest"
|
|
31
35
|
},
|
|
32
36
|
"dependencies": {
|
|
@@ -38,7 +42,7 @@
|
|
|
38
42
|
"fast-glob": "^3.3.3",
|
|
39
43
|
"jest": "^29.7.0",
|
|
40
44
|
"jest-environment-jsdom": "^29.7.0",
|
|
41
|
-
"
|
|
45
|
+
"rimraf": "^6.0.1",
|
|
42
46
|
"ts-jest": "^29.2.6",
|
|
43
47
|
"typescript": "^5.6.3"
|
|
44
48
|
}
|
|
@@ -1,37 +1,45 @@
|
|
|
1
1
|
import type { CustomProperties, MediaQuery } from '../common/css-properties';
|
|
2
2
|
type JSXType = keyof HTMLElementTagNameMap | '*' | ':root';
|
|
3
3
|
type HTMLType = {
|
|
4
|
-
|
|
4
|
+
[K in JSXType]: CustomProperties;
|
|
5
5
|
};
|
|
6
6
|
type ClassName = `.${string}`;
|
|
7
7
|
type ClassNameType = {
|
|
8
|
-
|
|
8
|
+
[K in ClassName]: CustomProperties;
|
|
9
9
|
};
|
|
10
10
|
type Attribute = `${string}[${string}]${string}`;
|
|
11
11
|
type AttributeType = {
|
|
12
|
-
|
|
12
|
+
[K in Attribute]: CustomProperties;
|
|
13
13
|
};
|
|
14
14
|
type Consecutive = `${JSXType} ${string}`;
|
|
15
15
|
type ConsecutiveType = {
|
|
16
|
-
|
|
16
|
+
[K in Consecutive]: CustomProperties;
|
|
17
17
|
};
|
|
18
18
|
type PseudoClass = `${JSXType}:${string}`;
|
|
19
19
|
type PseudoClassType = {
|
|
20
|
-
|
|
20
|
+
[K in PseudoClass]: CustomProperties;
|
|
21
21
|
};
|
|
22
22
|
type PseudoElement = `::${string}`;
|
|
23
23
|
type PseudoElementType = {
|
|
24
|
-
|
|
24
|
+
[K in PseudoElement]: CustomProperties;
|
|
25
25
|
};
|
|
26
26
|
type KeyframeSelector = 'from' | 'to' | `${number}%`;
|
|
27
27
|
export type KeyframesDefinition = {
|
|
28
|
-
|
|
28
|
+
[K in KeyframeSelector]?: CustomProperties;
|
|
29
29
|
};
|
|
30
30
|
type KeyframesType = {
|
|
31
|
-
|
|
31
|
+
[K in `@keyframes ${string}`]: KeyframesDefinition;
|
|
32
32
|
};
|
|
33
33
|
type MediaQueryHTMLType = {
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
export type CustomHTMLType =
|
|
34
|
+
[K in MediaQuery]: CustomHTMLType;
|
|
35
|
+
};
|
|
36
|
+
export type CustomHTMLType =
|
|
37
|
+
| HTMLType
|
|
38
|
+
| ClassNameType
|
|
39
|
+
| AttributeType
|
|
40
|
+
| ConsecutiveType
|
|
41
|
+
| PseudoClassType
|
|
42
|
+
| PseudoElementType
|
|
43
|
+
| KeyframesType
|
|
44
|
+
| MediaQueryHTMLType;
|
|
37
45
|
export {};
|