tailwind-styled-v4 4.0.0 → 5.0.1
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/CHANGELOG.md +398 -0
- package/LICENSE +21 -0
- package/README.md +532 -0
- package/dist/analyzer.d.mts +114 -0
- package/dist/analyzer.d.ts +114 -0
- package/dist/analyzer.js +1555 -0
- package/dist/analyzer.js.map +1 -0
- package/dist/analyzer.mjs +1544 -0
- package/dist/analyzer.mjs.map +1 -0
- package/dist/animate.d.mts +46 -0
- package/dist/animate.d.ts +41 -112
- package/dist/animate.js +792 -235
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +782 -0
- package/dist/animate.mjs.map +1 -0
- package/dist/atomic.d.mts +18 -0
- package/dist/atomic.d.ts +18 -0
- package/dist/atomic.js +191 -0
- package/dist/atomic.js.map +1 -0
- package/dist/atomic.mjs +185 -0
- package/dist/atomic.mjs.map +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +6063 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.mjs +6053 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/{compiler.d.cts → compiler.d.mts} +503 -210
- package/dist/compiler.d.ts +503 -210
- package/dist/compiler.js +1549 -566
- package/dist/compiler.js.map +1 -1
- package/dist/{compiler.cjs → compiler.mjs} +1476 -627
- package/dist/compiler.mjs.map +1 -0
- package/dist/dashboard.d.mts +272 -0
- package/dist/dashboard.d.ts +272 -0
- package/dist/dashboard.js +249 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/dashboard.mjs +239 -0
- package/dist/dashboard.mjs.map +1 -0
- package/dist/devtools.js +336 -211
- package/dist/devtools.js.map +1 -1
- package/dist/{devtools.cjs → devtools.mjs} +331 -220
- package/dist/devtools.mjs.map +1 -0
- package/dist/engine.d.mts +84 -0
- package/dist/engine.d.ts +84 -0
- package/dist/engine.js +3014 -0
- package/dist/engine.js.map +1 -0
- package/dist/engine.mjs +3005 -0
- package/dist/engine.mjs.map +1 -0
- package/dist/{index.d.cts → index.d.mts} +75 -4
- package/dist/index.d.ts +75 -4
- package/dist/index.js +1341 -149
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2162 -0
- package/dist/index.mjs.map +1 -0
- package/dist/liveTokenEngine-DYN3Zale.d.mts +34 -0
- package/dist/liveTokenEngine-DYN3Zale.d.ts +34 -0
- package/dist/next.d.mts +55 -0
- package/dist/next.d.ts +30 -20
- package/dist/next.js +6947 -149
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +7050 -0
- package/dist/next.mjs.map +1 -0
- package/dist/plugin.d.mts +90 -0
- package/dist/plugin.d.ts +90 -0
- package/dist/plugin.js +185 -0
- package/dist/plugin.js.map +1 -0
- package/dist/plugin.mjs +174 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/pluginRegistry.d.mts +83 -0
- package/dist/pluginRegistry.d.ts +83 -0
- package/dist/pluginRegistry.js +303 -0
- package/dist/pluginRegistry.js.map +1 -0
- package/dist/pluginRegistry.mjs +298 -0
- package/dist/pluginRegistry.mjs.map +1 -0
- package/dist/{preset.d.cts → preset.d.mts} +29 -2
- package/dist/preset.d.ts +29 -2
- package/dist/preset.js +318 -21
- package/dist/preset.js.map +1 -1
- package/dist/preset.mjs +414 -0
- package/dist/preset.mjs.map +1 -0
- package/dist/rspack.d.mts +33 -0
- package/dist/rspack.d.ts +33 -0
- package/dist/rspack.js +55 -0
- package/dist/rspack.js.map +1 -0
- package/dist/rspack.mjs +45 -0
- package/dist/rspack.mjs.map +1 -0
- package/dist/runtime.d.mts +62 -0
- package/dist/runtime.d.ts +62 -0
- package/dist/runtime.js +207 -0
- package/dist/runtime.js.map +1 -0
- package/dist/runtime.mjs +188 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/runtimeCss.d.mts +65 -0
- package/dist/runtimeCss.d.ts +65 -0
- package/dist/runtimeCss.js +188 -0
- package/dist/runtimeCss.js.map +1 -0
- package/dist/runtimeCss.mjs +173 -0
- package/dist/runtimeCss.mjs.map +1 -0
- package/dist/scanner.d.mts +25 -0
- package/dist/scanner.d.ts +25 -0
- package/dist/scanner.js +717 -0
- package/dist/scanner.js.map +1 -0
- package/dist/scanner.mjs +703 -0
- package/dist/scanner.mjs.map +1 -0
- package/dist/shared.d.mts +85 -0
- package/dist/shared.d.ts +85 -0
- package/dist/shared.js +255 -0
- package/dist/shared.js.map +1 -0
- package/dist/shared.mjs +233 -0
- package/dist/shared.mjs.map +1 -0
- package/dist/storybookAddon.d.mts +108 -0
- package/dist/storybookAddon.d.ts +108 -0
- package/dist/storybookAddon.js +95 -0
- package/dist/storybookAddon.js.map +1 -0
- package/dist/storybookAddon.mjs +88 -0
- package/dist/storybookAddon.mjs.map +1 -0
- package/dist/svelte.d.mts +114 -0
- package/dist/svelte.d.ts +114 -0
- package/dist/svelte.js +67 -0
- package/dist/svelte.js.map +1 -0
- package/dist/svelte.mjs +59 -0
- package/dist/svelte.mjs.map +1 -0
- package/dist/testing.d.mts +185 -0
- package/dist/testing.d.ts +185 -0
- package/dist/testing.js +173 -0
- package/dist/testing.js.map +1 -0
- package/dist/testing.mjs +158 -0
- package/dist/testing.mjs.map +1 -0
- package/dist/{theme.d.cts → theme.d.mts} +18 -11
- package/dist/theme.d.ts +18 -11
- package/dist/theme.js +205 -19
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +311 -0
- package/dist/theme.mjs.map +1 -0
- package/dist/types-DXr2PmGP.d.mts +31 -0
- package/dist/types-DXr2PmGP.d.ts +31 -0
- package/dist/vite.d.mts +51 -0
- package/dist/vite.d.ts +35 -6
- package/dist/vite.js +4254 -57
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +4281 -0
- package/dist/vite.mjs.map +1 -0
- package/dist/vue.d.mts +89 -0
- package/dist/vue.d.ts +89 -0
- package/dist/vue.js +104 -0
- package/dist/vue.js.map +1 -0
- package/dist/vue.mjs +96 -0
- package/dist/vue.mjs.map +1 -0
- package/package.json +173 -67
- package/dist/animate.cjs +0 -252
- package/dist/animate.cjs.map +0 -1
- package/dist/animate.d.cts +0 -117
- package/dist/astTransform-ua-eapqs.d.cts +0 -41
- package/dist/astTransform-ua-eapqs.d.ts +0 -41
- package/dist/compiler.cjs.map +0 -1
- package/dist/css.cjs +0 -71
- package/dist/css.cjs.map +0 -1
- package/dist/css.d.cts +0 -45
- package/dist/css.d.ts +0 -45
- package/dist/css.js +0 -62
- package/dist/css.js.map +0 -1
- package/dist/devtools.cjs.map +0 -1
- package/dist/index.cjs +0 -1058
- package/dist/index.cjs.map +0 -1
- package/dist/next.cjs +0 -268
- package/dist/next.cjs.map +0 -1
- package/dist/next.d.cts +0 -45
- package/dist/plugins.cjs +0 -396
- package/dist/plugins.cjs.map +0 -1
- package/dist/plugins.d.cts +0 -231
- package/dist/plugins.d.ts +0 -231
- package/dist/plugins.js +0 -381
- package/dist/plugins.js.map +0 -1
- package/dist/preset.cjs +0 -129
- package/dist/preset.cjs.map +0 -1
- package/dist/theme.cjs +0 -154
- package/dist/theme.cjs.map +0 -1
- package/dist/turbopackLoader.cjs +0 -2689
- package/dist/turbopackLoader.cjs.map +0 -1
- package/dist/turbopackLoader.d.cts +0 -22
- package/dist/turbopackLoader.d.ts +0 -22
- package/dist/turbopackLoader.js +0 -2681
- package/dist/turbopackLoader.js.map +0 -1
- package/dist/vite.cjs +0 -105
- package/dist/vite.cjs.map +0 -1
- package/dist/vite.d.cts +0 -22
- package/dist/webpackLoader.cjs +0 -2670
- package/dist/webpackLoader.cjs.map +0 -1
- package/dist/webpackLoader.d.cts +0 -24
- package/dist/webpackLoader.d.ts +0 -24
- package/dist/webpackLoader.js +0 -2662
- package/dist/webpackLoader.js.map +0 -1
- /package/dist/{devtools.d.cts → devtools.d.mts} +0 -0
package/dist/animate.d.cts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* tailwind-styled-v4 — Animation DSL
|
|
3
|
-
*
|
|
4
|
-
* Compile-time animation system. Define animations dengan Tailwind class,
|
|
5
|
-
* compiler generate @keyframes — nol runtime, nol JS overhead.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
*
|
|
9
|
-
* // Cara 1: .animate() chaining pada tw component
|
|
10
|
-
* const FadeIn = tw.div.animate({
|
|
11
|
-
* from: "opacity-0 translate-y-2",
|
|
12
|
-
* to: "opacity-100 translate-y-0",
|
|
13
|
-
* duration: 300,
|
|
14
|
-
* easing: "ease-out"
|
|
15
|
-
* })
|
|
16
|
-
*
|
|
17
|
-
* // Cara 2: standalone animate() utility
|
|
18
|
-
* const fadeIn = animate({
|
|
19
|
-
* from: "opacity-0 scale-95",
|
|
20
|
-
* to: "opacity-100 scale-100",
|
|
21
|
-
* duration: 200,
|
|
22
|
-
* })
|
|
23
|
-
* const Box = tw.div`${fadeIn}`
|
|
24
|
-
*
|
|
25
|
-
* // Cara 3: preset animations
|
|
26
|
-
* const Card = tw.div`${animations.fadeIn} ${animations.slideUp}`
|
|
27
|
-
*
|
|
28
|
-
* // Cara 4: tw.keyframes() custom
|
|
29
|
-
* const spin = tw.keyframes("spin", {
|
|
30
|
-
* "0%": "rotate-0",
|
|
31
|
-
* "100%": "rotate-180",
|
|
32
|
-
* })
|
|
33
|
-
*/
|
|
34
|
-
interface AnimateOptions {
|
|
35
|
-
/** Tailwind classes for animation start state */
|
|
36
|
-
from: string;
|
|
37
|
-
/** Tailwind classes for animation end state */
|
|
38
|
-
to: string;
|
|
39
|
-
/** Duration in ms. Default: 300 */
|
|
40
|
-
duration?: number;
|
|
41
|
-
/** CSS easing. Default: "ease-out" */
|
|
42
|
-
easing?: string;
|
|
43
|
-
/** Delay in ms. Default: 0 */
|
|
44
|
-
delay?: number;
|
|
45
|
-
/** Fill mode. Default: "both" */
|
|
46
|
-
fill?: "none" | "forwards" | "backwards" | "both";
|
|
47
|
-
/** Iteration count. Default: 1 */
|
|
48
|
-
iterations?: number | "infinite";
|
|
49
|
-
/** Direction. Default: "normal" */
|
|
50
|
-
direction?: "normal" | "reverse" | "alternate" | "alternate-reverse";
|
|
51
|
-
/** Animation name override (auto-generated from from+to if not set) */
|
|
52
|
-
name?: string;
|
|
53
|
-
}
|
|
54
|
-
interface KeyframesDefinition {
|
|
55
|
-
[stop: string]: string;
|
|
56
|
-
}
|
|
57
|
-
interface CompiledAnimation {
|
|
58
|
-
/** CSS animation class name to apply */
|
|
59
|
-
className: string;
|
|
60
|
-
/** @keyframes CSS to inject */
|
|
61
|
-
keyframesCss: string;
|
|
62
|
-
/** animation CSS shorthand */
|
|
63
|
-
animationCss: string;
|
|
64
|
-
}
|
|
65
|
-
declare function getAnimationRegistry(): Map<string, CompiledAnimation>;
|
|
66
|
-
/**
|
|
67
|
-
* Compile AnimateOptions into CSS animation + @keyframes.
|
|
68
|
-
*
|
|
69
|
-
* Called at build time by the compiler, or at runtime in dev mode.
|
|
70
|
-
*/
|
|
71
|
-
declare function compileAnimation(opts: AnimateOptions): CompiledAnimation;
|
|
72
|
-
/**
|
|
73
|
-
* Generate an animation class string to use in tw template literals.
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* const fadeIn = animate({ from: "opacity-0", to: "opacity-100", duration: 200 })
|
|
77
|
-
* const Box = tw.div`${fadeIn} p-4 bg-white`
|
|
78
|
-
*/
|
|
79
|
-
declare function animate(opts: AnimateOptions): string;
|
|
80
|
-
/**
|
|
81
|
-
* Define a custom keyframe animation with multiple stops.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* const pulse = tw.keyframes("pulse", {
|
|
85
|
-
* "0%, 100%": "opacity-100 scale-100",
|
|
86
|
-
* "50%": "opacity-50 scale-95",
|
|
87
|
-
* })
|
|
88
|
-
* const Dot = tw.div`${pulse} w-4 h-4 rounded-full bg-blue-500`
|
|
89
|
-
*/
|
|
90
|
-
declare function keyframes(name: string, stops: KeyframesDefinition): string;
|
|
91
|
-
/**
|
|
92
|
-
* Collection of ready-to-use animation class strings.
|
|
93
|
-
*
|
|
94
|
-
* @example
|
|
95
|
-
* const Card = tw.div`${animations.fadeIn} p-4 bg-white`
|
|
96
|
-
* const Modal = tw.div`${animations.scaleIn} fixed inset-0`
|
|
97
|
-
*/
|
|
98
|
-
declare const animations: {
|
|
99
|
-
readonly fadeIn: string;
|
|
100
|
-
readonly fadeOut: string;
|
|
101
|
-
readonly slideUp: string;
|
|
102
|
-
readonly slideDown: string;
|
|
103
|
-
readonly slideLeft: string;
|
|
104
|
-
readonly slideRight: string;
|
|
105
|
-
readonly scaleIn: string;
|
|
106
|
-
readonly scaleOut: string;
|
|
107
|
-
readonly blurIn: string;
|
|
108
|
-
readonly bounceIn: string;
|
|
109
|
-
readonly spinIn: string;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Get all compiled animation CSS to inject into a stylesheet.
|
|
113
|
-
* Called by the CSS extraction engine at build time.
|
|
114
|
-
*/
|
|
115
|
-
declare function extractAnimationCss(): string;
|
|
116
|
-
|
|
117
|
-
export { type AnimateOptions, type CompiledAnimation, type KeyframesDefinition, animate, animations, compileAnimation, extractAnimationCss, getAnimationRegistry, keyframes };
|
|
@@ -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 };
|