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