tailwind-styled-v4 1.0.1 → 4.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.
- package/dist/animate.cjs +252 -0
- package/dist/animate.cjs.map +1 -0
- package/dist/animate.d.cts +117 -0
- package/dist/animate.d.ts +117 -0
- package/dist/animate.js +245 -0
- package/dist/animate.js.map +1 -0
- package/dist/astTransform-ua-eapqs.d.cts +41 -0
- package/dist/astTransform-ua-eapqs.d.ts +41 -0
- package/dist/compiler.cjs +3594 -0
- package/dist/compiler.cjs.map +1 -0
- package/dist/compiler.d.cts +716 -0
- package/dist/compiler.d.ts +716 -0
- package/dist/compiler.js +3535 -0
- package/dist/compiler.js.map +1 -0
- package/dist/css.cjs +71 -0
- package/dist/css.cjs.map +1 -0
- package/dist/css.d.cts +45 -0
- package/dist/css.d.ts +45 -0
- package/dist/css.js +62 -0
- package/dist/css.js.map +1 -0
- package/dist/devtools.cjs +959 -0
- package/dist/devtools.cjs.map +1 -0
- package/dist/devtools.d.cts +22 -0
- package/dist/devtools.d.ts +22 -0
- package/dist/devtools.js +952 -0
- package/dist/devtools.js.map +1 -0
- package/dist/index.cjs +1058 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +584 -0
- package/dist/index.d.ts +449 -980
- package/dist/index.js +1021 -3
- package/dist/index.js.map +1 -1
- package/dist/next.cjs +268 -0
- package/dist/next.cjs.map +1 -0
- package/dist/next.d.cts +45 -0
- package/dist/next.d.ts +45 -0
- package/dist/next.js +261 -0
- package/dist/next.js.map +1 -0
- package/dist/plugins.cjs +396 -0
- package/dist/plugins.cjs.map +1 -0
- package/dist/plugins.d.cts +231 -0
- package/dist/plugins.d.ts +231 -0
- package/dist/plugins.js +381 -0
- package/dist/plugins.js.map +1 -0
- package/dist/preset.cjs +129 -0
- package/dist/preset.cjs.map +1 -0
- package/dist/preset.d.cts +249 -0
- package/dist/preset.d.ts +249 -0
- package/dist/preset.js +124 -0
- package/dist/preset.js.map +1 -0
- package/dist/theme.cjs +154 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.cts +181 -0
- package/dist/theme.d.ts +181 -0
- package/dist/theme.js +148 -0
- package/dist/theme.js.map +1 -0
- package/dist/turbopackLoader.cjs +2689 -0
- package/dist/turbopackLoader.cjs.map +1 -0
- package/dist/turbopackLoader.d.cts +22 -0
- package/dist/turbopackLoader.d.ts +22 -0
- package/dist/turbopackLoader.js +2681 -0
- package/dist/turbopackLoader.js.map +1 -0
- package/dist/vite.cjs +105 -0
- package/dist/vite.cjs.map +1 -0
- package/dist/vite.d.cts +22 -0
- package/dist/vite.d.ts +22 -0
- package/dist/vite.js +96 -0
- package/dist/vite.js.map +1 -0
- package/dist/webpackLoader.cjs +2670 -0
- package/dist/webpackLoader.cjs.map +1 -0
- package/dist/webpackLoader.d.cts +24 -0
- package/dist/webpackLoader.d.ts +24 -0
- package/dist/webpackLoader.js +2662 -0
- package/dist/webpackLoader.js.map +1 -0
- package/package.json +62 -32
- package/CHANGELOG.md +0 -75
- package/LICENSE +0 -21
- package/README.md +0 -608
- package/dist/cli/init.js +0 -208
- package/dist/compiler/index.d.mts +0 -214
- package/dist/compiler/index.d.ts +0 -214
- package/dist/compiler/index.js +0 -546
- package/dist/compiler/index.js.map +0 -1
- package/dist/compiler/index.mjs +0 -504
- package/dist/compiler/index.mjs.map +0 -1
- package/dist/index.d.mts +0 -1115
- package/dist/index.mjs +0 -4
- package/dist/index.mjs.map +0 -1
- package/dist/turbopack-loader.js +0 -232
- package/dist/webpack-loader.js +0 -213
package/package.json
CHANGED
|
@@ -1,37 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwind-styled-v4",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "Zero-config, zero-runtime, compiler-driven Tailwind styling — tw.div, variants, RSC-aware",
|
|
5
5
|
"author": "Dictionar32",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.cjs",
|
|
9
|
+
"module": "./dist/index.js",
|
|
9
10
|
"types": "./dist/index.d.ts",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"build": "tsup",
|
|
12
|
-
"dev": "tsup --watch",
|
|
13
|
-
"clean": "rm -rf dist"
|
|
14
|
-
},
|
|
15
11
|
"exports": {
|
|
16
12
|
".": {
|
|
17
|
-
"types":
|
|
18
|
-
"import":
|
|
19
|
-
"require": "./dist/index.
|
|
20
|
-
"default": "./dist/index.
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"require": "./dist/index.cjs",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./next": {
|
|
19
|
+
"types": "./dist/next.d.ts",
|
|
20
|
+
"import": "./dist/next.js",
|
|
21
|
+
"require": "./dist/next.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./vite": {
|
|
24
|
+
"types": "./dist/vite.d.ts",
|
|
25
|
+
"import": "./dist/vite.js",
|
|
26
|
+
"require": "./dist/vite.cjs"
|
|
21
27
|
},
|
|
22
28
|
"./compiler": {
|
|
23
|
-
"types":
|
|
24
|
-
"import":
|
|
25
|
-
"require": "./dist/compiler
|
|
29
|
+
"types": "./dist/compiler.d.ts",
|
|
30
|
+
"import": "./dist/compiler.js",
|
|
31
|
+
"require": "./dist/compiler.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./preset": {
|
|
34
|
+
"types": "./dist/preset.d.ts",
|
|
35
|
+
"import": "./dist/preset.js",
|
|
36
|
+
"require": "./dist/preset.cjs"
|
|
26
37
|
},
|
|
27
|
-
"./
|
|
28
|
-
"
|
|
38
|
+
"./css": {
|
|
39
|
+
"types": "./dist/css.d.ts",
|
|
40
|
+
"import": "./dist/css.js",
|
|
41
|
+
"require": "./dist/css.cjs"
|
|
29
42
|
},
|
|
30
|
-
"./
|
|
31
|
-
"
|
|
43
|
+
"./plugins": {
|
|
44
|
+
"types": "./dist/plugins.d.ts",
|
|
45
|
+
"import": "./dist/plugins.js",
|
|
46
|
+
"require": "./dist/plugins.cjs"
|
|
32
47
|
},
|
|
33
|
-
"./
|
|
34
|
-
"
|
|
48
|
+
"./devtools": {
|
|
49
|
+
"types": "./dist/devtools.d.ts",
|
|
50
|
+
"import": "./dist/devtools.js",
|
|
51
|
+
"require": "./dist/devtools.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./animate": {
|
|
54
|
+
"types": "./dist/animate.d.ts",
|
|
55
|
+
"import": "./dist/animate.js",
|
|
56
|
+
"require": "./dist/animate.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./theme": {
|
|
59
|
+
"types": "./dist/theme.d.ts",
|
|
60
|
+
"import": "./dist/theme.js",
|
|
61
|
+
"require": "./dist/theme.cjs"
|
|
35
62
|
},
|
|
36
63
|
"./package.json": "./package.json"
|
|
37
64
|
},
|
|
@@ -42,26 +69,29 @@
|
|
|
42
69
|
"LICENSE"
|
|
43
70
|
],
|
|
44
71
|
"sideEffects": false,
|
|
45
|
-
"engines": {
|
|
46
|
-
"node": ">=18"
|
|
47
|
-
},
|
|
72
|
+
"engines": { "node": ">=18" },
|
|
48
73
|
"dependencies": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
74
|
+
"tailwind-merge": "^3",
|
|
75
|
+
"postcss": "^8"
|
|
51
76
|
},
|
|
52
77
|
"peerDependencies": {
|
|
53
78
|
"react": ">=18",
|
|
54
|
-
"react-dom": ">=18"
|
|
55
|
-
|
|
79
|
+
"react-dom": ">=18"
|
|
80
|
+
},
|
|
81
|
+
"peerDependenciesOptional": {
|
|
82
|
+
"tailwindcss": "^4",
|
|
83
|
+
"@tailwindcss/postcss": "^4"
|
|
56
84
|
},
|
|
57
85
|
"devDependencies": {
|
|
86
|
+
"@tailwind-styled/animate": "*",
|
|
58
87
|
"@types/node": "^20",
|
|
59
88
|
"@types/react": "^19",
|
|
60
|
-
"@types/react-dom": "^19",
|
|
61
89
|
"tsup": "^8",
|
|
62
90
|
"typescript": "^5"
|
|
63
91
|
},
|
|
64
|
-
"
|
|
65
|
-
"
|
|
92
|
+
"scripts": {
|
|
93
|
+
"build": "tsup",
|
|
94
|
+
"dev": "tsup --watch",
|
|
95
|
+
"clean": "rm -rf dist"
|
|
66
96
|
}
|
|
67
97
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to `tailwind-styled-v4` will be documented here.
|
|
4
|
-
|
|
5
|
-
## [1.0.0] — Initial Release
|
|
6
|
-
|
|
7
|
-
### Added
|
|
8
|
-
|
|
9
|
-
#### Core Engine
|
|
10
|
-
- `tw` proxy — template literal & object config syntax
|
|
11
|
-
- `tw.tag\`classes\`` — template literal API
|
|
12
|
-
- `tw.tag({ base, variants, compoundVariants, defaultVariants })` — object config API
|
|
13
|
-
- `tw(Component)\`classes\`` — wrap any existing component
|
|
14
|
-
- `Component.extend\`extra-classes\`` — chain extra classes
|
|
15
|
-
- `Component.withVariants(config)` — merge new variants
|
|
16
|
-
|
|
17
|
-
#### Runtime Engines
|
|
18
|
-
- **propEngine** — 80+ props (padding, margin, sizing, colors, flex, grid, layout, effects, animation, interaction)
|
|
19
|
-
- **responsiveEngine** — `{ base, sm, md, lg, xl, 2xl }` responsive objects
|
|
20
|
-
- **variantEngine** — CVA-style variants with `defaultVariants` support
|
|
21
|
-
- **compoundVariant** — multi-condition compound variants
|
|
22
|
-
- **classResolver** — central resolver combining all engines via `tailwind-merge`
|
|
23
|
-
|
|
24
|
-
#### Standalone APIs
|
|
25
|
-
- `cv()` — standalone class variants function (shadcn/ui & Radix compatible)
|
|
26
|
-
- `withTw(Component, base?)` — HOC untuk wrap third-party components
|
|
27
|
-
- `cls\`...\`` — tagged template for static class strings
|
|
28
|
-
- `cx(...inputs)` — lightweight class joiner (~100b, zero-dep)
|
|
29
|
-
- `cxm(...inputs)` — cx + tailwind-merge deduplication
|
|
30
|
-
|
|
31
|
-
#### Plugin System
|
|
32
|
-
- `registerPlugin({ name, props })` — custom prop resolver plugins
|
|
33
|
-
- `loadBuiltinPlugins()` — 6 built-in plugins: animation, grid, backdrop, gradient, scroll, print
|
|
34
|
-
- `listPlugins()` / `getPlugin(name)` — plugin introspection
|
|
35
|
-
|
|
36
|
-
#### Theme System
|
|
37
|
-
- `setTheme(tokens)` — deep-merge semantic tokens
|
|
38
|
-
- `replaceTheme(tokens)` — replace entire theme
|
|
39
|
-
- `getTheme()` / `getThemeNamespace(key)` — read current theme
|
|
40
|
-
- `onThemeChange(listener)` — subscription API
|
|
41
|
-
- `loadDefaultTheme()` — semantic token preset (primary, surface, muted, etc.)
|
|
42
|
-
- `loadDarkTheme()` — fintech/crypto/Web3 dark preset
|
|
43
|
-
|
|
44
|
-
#### Zero-Runtime Compiler
|
|
45
|
-
- `withTailwindStyled(opts)(nextConfig)` — Next.js HOC wrapper
|
|
46
|
-
- `tailwindStyledPlugin(opts)` — Vite plugin
|
|
47
|
-
- Webpack loader (`tailwind-styled-v4/webpack-loader`)
|
|
48
|
-
- Static transform: `tw.div\`p-4\`` → `styled.div.attrs(()=>({className:"p-4"}))\`\``
|
|
49
|
-
- Dynamic guard: skips interpolated templates (`${}`) safely
|
|
50
|
-
- `data-tw="tw-xxxxx"` attribute injection for DevTools (dev mode)
|
|
51
|
-
|
|
52
|
-
#### Build Tools
|
|
53
|
-
- `generateTailwindTypes.ts` — generates **58.055** Tailwind class type unions
|
|
54
|
-
- `generateSafelist.ts` — scans src/ and outputs `tailwind.safelist.json`
|
|
55
|
-
- `extractAllClasses(source)` — extract classes from any source string
|
|
56
|
-
|
|
57
|
-
#### IntelliSense
|
|
58
|
-
- **58.055 class definitions** in `tailwind.generated.ts`
|
|
59
|
-
- Coverage: all colors (21 palettes × 11 shades), spacing, sizing, flexbox, grid, effects, transitions, animations, responsive prefixes (sm/md/lg/xl/2xl), state prefixes (hover/focus/active/disabled/dark/group-hover/peer-hover/focus-visible/focus-within)
|
|
60
|
-
|
|
61
|
-
#### Developer Experience
|
|
62
|
-
- `shouldForwardProp` — tw props tidak bocor ke DOM attributes
|
|
63
|
-
- `blockProp(name)` / `allowProp(name)` — fine-grained forwarding control
|
|
64
|
-
- `hashClass(input)` → `"tw-xxxxx"` — stable component hash
|
|
65
|
-
- `componentName(tag, classes)` — display name generator for React DevTools
|
|
66
|
-
- Source maps enabled in all builds
|
|
67
|
-
|
|
68
|
-
#### Stack Compatibility
|
|
69
|
-
- Next.js 15/16 (App Router + Pages Router)
|
|
70
|
-
- React 18/19
|
|
71
|
-
- Tailwind CSS v3/v4
|
|
72
|
-
- styled-components v5/v6
|
|
73
|
-
- TypeScript 4.9/5.x
|
|
74
|
-
- shadcn/ui, Radix UI, Headless UI
|
|
75
|
-
- Vite 4/5, Webpack 4/5
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 tailwind-styled-v4
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|