tailwind-styled-v4 4.0.0 → 5.0.0

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.
Files changed (77) hide show
  1. package/dist/animate.cjs +754 -235
  2. package/dist/animate.cjs.map +1 -1
  3. package/dist/animate.d.cts +55 -99
  4. package/dist/animate.d.ts +55 -99
  5. package/dist/animate.js +742 -235
  6. package/dist/animate.js.map +1 -1
  7. package/dist/chunk-VZEJV27B.js +11 -0
  8. package/dist/chunk-VZEJV27B.js.map +1 -0
  9. package/dist/chunk-Y5D3E72P.cjs +13 -0
  10. package/dist/chunk-Y5D3E72P.cjs.map +1 -0
  11. package/dist/css.cjs +61 -11
  12. package/dist/css.cjs.map +1 -1
  13. package/dist/css.d.cts +3 -18
  14. package/dist/css.d.ts +3 -18
  15. package/dist/css.js +61 -11
  16. package/dist/css.js.map +1 -1
  17. package/dist/devtools.cjs +200 -88
  18. package/dist/devtools.cjs.map +1 -1
  19. package/dist/devtools.js +200 -88
  20. package/dist/devtools.js.map +1 -1
  21. package/dist/index.cjs +430 -135
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +74 -3
  24. package/dist/index.d.ts +74 -3
  25. package/dist/index.js +415 -132
  26. package/dist/index.js.map +1 -1
  27. package/dist/next.cjs +118 -138
  28. package/dist/next.cjs.map +1 -1
  29. package/dist/next.d.cts +28 -19
  30. package/dist/next.d.ts +28 -19
  31. package/dist/next.js +111 -131
  32. package/dist/next.js.map +1 -1
  33. package/dist/preset.cjs +312 -18
  34. package/dist/preset.cjs.map +1 -1
  35. package/dist/preset.d.cts +29 -2
  36. package/dist/preset.d.ts +29 -2
  37. package/dist/preset.js +311 -19
  38. package/dist/preset.js.map +1 -1
  39. package/dist/turbopackLoader.cjs +24 -2676
  40. package/dist/turbopackLoader.cjs.map +1 -1
  41. package/dist/turbopackLoader.d.cts +3 -13
  42. package/dist/turbopackLoader.d.ts +3 -13
  43. package/dist/turbopackLoader.js +24 -2670
  44. package/dist/turbopackLoader.js.map +1 -1
  45. package/dist/vite.cjs +90 -57
  46. package/dist/vite.cjs.map +1 -1
  47. package/dist/vite.d.cts +35 -6
  48. package/dist/vite.d.ts +35 -6
  49. package/dist/vite.js +90 -58
  50. package/dist/vite.js.map +1 -1
  51. package/dist/webpackLoader.cjs +27 -2646
  52. package/dist/webpackLoader.cjs.map +1 -1
  53. package/dist/webpackLoader.d.cts +3 -10
  54. package/dist/webpackLoader.d.ts +3 -10
  55. package/dist/webpackLoader.js +27 -2640
  56. package/dist/webpackLoader.js.map +1 -1
  57. package/package.json +31 -28
  58. package/dist/astTransform-ua-eapqs.d.cts +0 -41
  59. package/dist/astTransform-ua-eapqs.d.ts +0 -41
  60. package/dist/compiler.cjs +0 -3594
  61. package/dist/compiler.cjs.map +0 -1
  62. package/dist/compiler.d.cts +0 -716
  63. package/dist/compiler.d.ts +0 -716
  64. package/dist/compiler.js +0 -3535
  65. package/dist/compiler.js.map +0 -1
  66. package/dist/plugins.cjs +0 -396
  67. package/dist/plugins.cjs.map +0 -1
  68. package/dist/plugins.d.cts +0 -231
  69. package/dist/plugins.d.ts +0 -231
  70. package/dist/plugins.js +0 -381
  71. package/dist/plugins.js.map +0 -1
  72. package/dist/theme.cjs +0 -154
  73. package/dist/theme.cjs.map +0 -1
  74. package/dist/theme.d.cts +0 -181
  75. package/dist/theme.d.ts +0 -181
  76. package/dist/theme.js +0 -148
  77. package/dist/theme.js.map +0 -1
package/package.json CHANGED
@@ -1,64 +1,68 @@
1
1
  {
2
2
  "name": "tailwind-styled-v4",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "Zero-config, zero-runtime, compiler-driven Tailwind styling — tw.div, variants, RSC-aware",
5
5
  "author": "Dictionar32",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
+ "sideEffects": false,
9
+ "engines": {
10
+ "node": ">=20"
11
+ },
8
12
  "main": "./dist/index.cjs",
9
13
  "module": "./dist/index.js",
10
14
  "types": "./dist/index.d.ts",
11
15
  "exports": {
12
16
  ".": {
13
- "types": "./dist/index.d.ts",
14
- "import": "./dist/index.js",
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js",
15
19
  "require": "./dist/index.cjs",
16
20
  "default": "./dist/index.js"
17
21
  },
18
22
  "./next": {
19
- "types": "./dist/next.d.ts",
20
- "import": "./dist/next.js",
23
+ "types": "./dist/next.d.ts",
24
+ "import": "./dist/next.js",
21
25
  "require": "./dist/next.cjs"
22
26
  },
23
27
  "./vite": {
24
- "types": "./dist/vite.d.ts",
25
- "import": "./dist/vite.js",
28
+ "types": "./dist/vite.d.ts",
29
+ "import": "./dist/vite.js",
26
30
  "require": "./dist/vite.cjs"
27
31
  },
28
32
  "./compiler": {
29
- "types": "./dist/compiler.d.ts",
30
- "import": "./dist/compiler.js",
31
- "require": "./dist/compiler.cjs"
33
+ "types": "../compiler/dist/index.d.ts",
34
+ "import": "../compiler/dist/index.js",
35
+ "require": "../compiler/dist/index.cjs"
32
36
  },
33
37
  "./preset": {
34
- "types": "./dist/preset.d.ts",
35
- "import": "./dist/preset.js",
38
+ "types": "./dist/preset.d.ts",
39
+ "import": "./dist/preset.js",
36
40
  "require": "./dist/preset.cjs"
37
41
  },
38
42
  "./css": {
39
- "types": "./dist/css.d.ts",
40
- "import": "./dist/css.js",
43
+ "types": "./dist/css.d.ts",
44
+ "import": "./dist/css.js",
41
45
  "require": "./dist/css.cjs"
42
46
  },
43
47
  "./plugins": {
44
- "types": "./dist/plugins.d.ts",
45
- "import": "./dist/plugins.js",
46
- "require": "./dist/plugins.cjs"
48
+ "types": "../plugin/dist/index.d.ts",
49
+ "import": "../plugin/dist/index.js",
50
+ "require": "../plugin/dist/index.cjs"
47
51
  },
48
52
  "./devtools": {
49
- "types": "./dist/devtools.d.ts",
50
- "import": "./dist/devtools.js",
53
+ "types": "./dist/devtools.d.ts",
54
+ "import": "./dist/devtools.js",
51
55
  "require": "./dist/devtools.cjs"
52
56
  },
53
57
  "./animate": {
54
- "types": "./dist/animate.d.ts",
55
- "import": "./dist/animate.js",
58
+ "types": "./dist/animate.d.ts",
59
+ "import": "./dist/animate.js",
56
60
  "require": "./dist/animate.cjs"
57
61
  },
58
62
  "./theme": {
59
- "types": "./dist/theme.d.ts",
60
- "import": "./dist/theme.js",
61
- "require": "./dist/theme.cjs"
63
+ "types": "../theme/dist/index.d.ts",
64
+ "import": "../theme/dist/index.js",
65
+ "require": "../theme/dist/index.cjs"
62
66
  },
63
67
  "./package.json": "./package.json"
64
68
  },
@@ -68,8 +72,6 @@
68
72
  "CHANGELOG.md",
69
73
  "LICENSE"
70
74
  ],
71
- "sideEffects": false,
72
- "engines": { "node": ">=18" },
73
75
  "dependencies": {
74
76
  "tailwind-merge": "^3",
75
77
  "postcss": "^8"
@@ -83,7 +85,7 @@
83
85
  "@tailwindcss/postcss": "^4"
84
86
  },
85
87
  "devDependencies": {
86
- "@tailwind-styled/animate": "*",
88
+ "@tailwind-styled/animate": "^5.0.0",
87
89
  "@types/node": "^20",
88
90
  "@types/react": "^19",
89
91
  "tsup": "^8",
@@ -92,6 +94,7 @@
92
94
  "scripts": {
93
95
  "build": "tsup",
94
96
  "dev": "tsup --watch",
95
- "clean": "rm -rf dist"
97
+ "clean": "rm -rf dist",
98
+ "test": "npm run build && node --test test/*.test.mjs"
96
99
  }
97
100
  }
@@ -1,41 +0,0 @@
1
- /**
2
- * tailwind-styled-v4 v2 — AST Transform (RSC-Aware)
3
- *
4
- * FIXES:
5
- * #01 — Double-merge base in variant component className array
6
- * #08 — Idempotency guard — skip if already transformed
7
- *
8
- * Pipeline:
9
- * source code
10
- * ↓ idempotency check (new)
11
- * ↓ analyze RSC context
12
- * ↓ hoist components (if needed)
13
- * ↓ detect tw.server.* vs tw.*
14
- * ↓ extract + merge classes
15
- * ↓ compile variants → lookup table (variant-only, no base dupe)
16
- * ↓ generate React.forwardRef component
17
- * ↓ auto "use client" if interactive
18
- * ↓ strip tw import
19
- * ↓ inject transform marker
20
- */
21
-
22
- interface TransformOptions {
23
- mode?: "zero-runtime" | "runtime" | "extract-only";
24
- autoClientBoundary?: boolean;
25
- addDataAttr?: boolean;
26
- hoist?: boolean;
27
- filename?: string;
28
- }
29
- interface TransformResult {
30
- code: string;
31
- classes: string[];
32
- rsc?: {
33
- isServer: boolean;
34
- needsClientDirective: boolean;
35
- clientReasons: string[];
36
- };
37
- changed: boolean;
38
- }
39
- declare function transformSource(source: string, opts?: TransformOptions): TransformResult;
40
-
41
- export { type TransformOptions as T, type TransformResult as a, transformSource as t };
@@ -1,41 +0,0 @@
1
- /**
2
- * tailwind-styled-v4 v2 — AST Transform (RSC-Aware)
3
- *
4
- * FIXES:
5
- * #01 — Double-merge base in variant component className array
6
- * #08 — Idempotency guard — skip if already transformed
7
- *
8
- * Pipeline:
9
- * source code
10
- * ↓ idempotency check (new)
11
- * ↓ analyze RSC context
12
- * ↓ hoist components (if needed)
13
- * ↓ detect tw.server.* vs tw.*
14
- * ↓ extract + merge classes
15
- * ↓ compile variants → lookup table (variant-only, no base dupe)
16
- * ↓ generate React.forwardRef component
17
- * ↓ auto "use client" if interactive
18
- * ↓ strip tw import
19
- * ↓ inject transform marker
20
- */
21
-
22
- interface TransformOptions {
23
- mode?: "zero-runtime" | "runtime" | "extract-only";
24
- autoClientBoundary?: boolean;
25
- addDataAttr?: boolean;
26
- hoist?: boolean;
27
- filename?: string;
28
- }
29
- interface TransformResult {
30
- code: string;
31
- classes: string[];
32
- rsc?: {
33
- isServer: boolean;
34
- needsClientDirective: boolean;
35
- clientReasons: string[];
36
- };
37
- changed: boolean;
38
- }
39
- declare function transformSource(source: string, opts?: TransformOptions): TransformResult;
40
-
41
- export { type TransformOptions as T, type TransformResult as a, transformSource as t };