hazo_config 2.1.2 → 2.1.4
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/CHANGE_LOG.md +7 -0
- package/README.md +17 -16
- package/SETUP_CHECKLIST.md +27 -4
- package/package.json +20 -16
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.1.3
|
|
4
|
+
- chore: upgrade to Tailwind CSS v4 (`tailwindcss`, `@tailwindcss/postcss`); switch PostCSS pipeline to `@tailwindcss/postcss` and drop `autoprefixer`
|
|
5
|
+
- chore: update `globals.css` to v4 syntax (`@import "tailwindcss"`, `@custom-variant dark`, `@config` reference)
|
|
6
|
+
- chore: bump `peerDependencies.tailwindcss` to `^4.0.0`
|
|
7
|
+
- chore: align canonical workspace dep versions (`clsx ^2.1.1`, `tailwind-merge ^3.5.0`, `@types/node ^20.14.10`, `@types/react ^18.3.3`, `@types/react-dom ^18.3.0`, `postcss ^8.4.49`, `typescript ^5.7.2`, `hazo_connect ^2.4.0`)
|
|
8
|
+
- docs: README and SETUP_CHECKLIST refreshed for Tailwind v4 setup
|
|
9
|
+
|
|
3
10
|
## 2.1.1
|
|
4
11
|
- chore: add `engines` field (`node >= 18.0.0`) and `prepublishOnly` script
|
|
5
12
|
- chore: widen React peer deps to support React 18 and 19
|
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ npm install hazo_config
|
|
|
36
36
|
}
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
3.
|
|
39
|
+
3. Add the `@source` directive to `globals.css` (Tailwind v4 is the supported peer):
|
|
40
40
|
```css
|
|
41
41
|
@import "tailwindcss";
|
|
42
42
|
|
|
@@ -104,38 +104,39 @@ Add these CSS custom properties to your `globals.css` or main CSS file. These ar
|
|
|
104
104
|
}
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
#### Tailwind
|
|
107
|
+
#### Tailwind v4 Setup (Required)
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
This package is built and tested against **Tailwind CSS v4** (declared as the only supported peer). Configure PostCSS to use the v4 plugin and import Tailwind from your CSS:
|
|
110
110
|
|
|
111
|
+
`postcss.config.cjs`:
|
|
111
112
|
```js
|
|
112
113
|
module.exports = {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
// ... rest of config
|
|
118
|
-
}
|
|
114
|
+
plugins: {
|
|
115
|
+
"@tailwindcss/postcss": {},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
119
118
|
```
|
|
120
119
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
Tailwind v4 uses JIT compilation and only generates CSS for classes found in scanned files. By default, it only scans your project's files, NOT files in `node_modules/`. This causes all Tailwind classes in this package to have NO CSS generated.
|
|
124
|
-
|
|
125
|
-
Add the following to your `globals.css` or main CSS file AFTER the tailwindcss import:
|
|
126
|
-
|
|
120
|
+
`globals.css`:
|
|
127
121
|
```css
|
|
128
122
|
@import "tailwindcss";
|
|
129
123
|
|
|
130
124
|
/* Required: Enable Tailwind to scan hazo_config package classes */
|
|
131
125
|
@source "../node_modules/hazo_config/dist";
|
|
126
|
+
|
|
127
|
+
/* Required: register the dark variant used by this package */
|
|
128
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
132
129
|
```
|
|
133
130
|
|
|
134
|
-
Without
|
|
131
|
+
Without the `@source` directive, the components will have:
|
|
135
132
|
- Missing hover states (transparent/invisible)
|
|
136
133
|
- Missing colors, spacing, and typography
|
|
137
134
|
- Broken layouts
|
|
138
135
|
|
|
136
|
+
> **Note:** `@tailwindcss/postcss` ships its own Lightning CSS-based prefixer, so you no longer need `autoprefixer` in your PostCSS pipeline.
|
|
137
|
+
|
|
138
|
+
> **Tailwind v3 consumers:** the `peerDependencies` constraint is `tailwindcss ^4.0.0`. v3 apps can install with `--legacy-peer-deps`, but the package's dist CSS is authored against v4 conventions and is not actively tested on v3.
|
|
139
|
+
|
|
139
140
|
### Import Paths (Server/Client Separation)
|
|
140
141
|
|
|
141
142
|
This package provides separate entry points for server and client code to prevent Next.js bundling errors:
|
package/SETUP_CHECKLIST.md
CHANGED
|
@@ -10,16 +10,37 @@ npm install hazo_config
|
|
|
10
10
|
|
|
11
11
|
## 2. Tailwind CSS Setup
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
This package supports **Tailwind v4** as its only declared peer (`tailwindcss ^4.0.0`).
|
|
14
|
+
|
|
15
|
+
### PostCSS plugin
|
|
16
|
+
|
|
17
|
+
Use the v4 PostCSS plugin (it handles vendor prefixing internally — `autoprefixer` is no longer needed):
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
// postcss.config.cjs
|
|
21
|
+
module.exports = {
|
|
22
|
+
plugins: {
|
|
23
|
+
"@tailwindcss/postcss": {},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### globals.css
|
|
15
29
|
|
|
16
30
|
```css
|
|
17
31
|
@import "tailwindcss";
|
|
32
|
+
|
|
33
|
+
/* Tailwind v4 only scans your project files by default. This directive
|
|
34
|
+
enables it to compile classes used inside the hazo_config package. */
|
|
18
35
|
@source "../node_modules/hazo_config/dist";
|
|
36
|
+
|
|
37
|
+
/* Register the dark variant the package's components use. */
|
|
38
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
19
39
|
```
|
|
20
40
|
|
|
21
|
-
### Tailwind v3
|
|
22
|
-
|
|
41
|
+
### Tailwind v3 (legacy)
|
|
42
|
+
|
|
43
|
+
The package no longer declares v3 in `peerDependencies`. v3 consumers may install with `--legacy-peer-deps` and add the dist directory to `tailwind.config.js`:
|
|
23
44
|
|
|
24
45
|
```js
|
|
25
46
|
module.exports = {
|
|
@@ -30,6 +51,8 @@ module.exports = {
|
|
|
30
51
|
}
|
|
31
52
|
```
|
|
32
53
|
|
|
54
|
+
This path is unsupported and not part of the test matrix.
|
|
55
|
+
|
|
33
56
|
## 3. CSS Custom Properties (Optional)
|
|
34
57
|
|
|
35
58
|
Add these CSS variables if you want themed styling:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_config",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "Config wrapper with error handling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,19 +13,23 @@
|
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
|
-
"import": "./dist/index.js"
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"default": "./dist/index.js"
|
|
17
18
|
},
|
|
18
19
|
"./server": {
|
|
19
20
|
"types": "./dist/server/index.d.ts",
|
|
20
|
-
"import": "./dist/server/index.js"
|
|
21
|
+
"import": "./dist/server/index.js",
|
|
22
|
+
"default": "./dist/server/index.js"
|
|
21
23
|
},
|
|
22
24
|
"./components": {
|
|
23
25
|
"types": "./dist/components/index.d.ts",
|
|
24
|
-
"import": "./dist/components/index.js"
|
|
26
|
+
"import": "./dist/components/index.js",
|
|
27
|
+
"default": "./dist/components/index.js"
|
|
25
28
|
},
|
|
26
29
|
"./lib": {
|
|
27
30
|
"types": "./dist/lib/index.d.ts",
|
|
28
|
-
"import": "./dist/lib/index.js"
|
|
31
|
+
"import": "./dist/lib/index.js",
|
|
32
|
+
"default": "./dist/lib/index.js"
|
|
29
33
|
}
|
|
30
34
|
},
|
|
31
35
|
"scripts": {
|
|
@@ -65,11 +69,11 @@
|
|
|
65
69
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
66
70
|
"@radix-ui/react-slot": "^1.2.4",
|
|
67
71
|
"class-variance-authority": "^0.7.0",
|
|
68
|
-
"clsx": "^2.1.
|
|
72
|
+
"clsx": "^2.1.1",
|
|
69
73
|
"ini": "^4.1.0",
|
|
70
74
|
"lucide-react": "^0.553.0",
|
|
71
75
|
"server-only": "^0.0.1",
|
|
72
|
-
"tailwind-merge": "^
|
|
76
|
+
"tailwind-merge": "^3.5.0"
|
|
73
77
|
},
|
|
74
78
|
"devDependencies": {
|
|
75
79
|
"@storybook/addon-essentials": "^8.0.0",
|
|
@@ -81,26 +85,26 @@
|
|
|
81
85
|
"@storybook/test": "^8.0.0",
|
|
82
86
|
"@testing-library/react": "^14.3.1",
|
|
83
87
|
"@types/ini": "^4.1.0",
|
|
84
|
-
"@types/node": "^20.
|
|
85
|
-
"@types/react": "^18.
|
|
86
|
-
"@types/react-dom": "^18.
|
|
88
|
+
"@types/node": "^20.14.10",
|
|
89
|
+
"@types/react": "^18.3.3",
|
|
90
|
+
"@types/react-dom": "^18.3.0",
|
|
91
|
+
"@tailwindcss/postcss": "^4.2.4",
|
|
87
92
|
"@vitejs/plugin-react": "^4.2.0",
|
|
88
|
-
"
|
|
89
|
-
"hazo_connect": "^2.3.3",
|
|
93
|
+
"hazo_connect": "^2.6.0",
|
|
90
94
|
"jsdom": "^24.1.3",
|
|
91
|
-
"postcss": "^8.4.
|
|
95
|
+
"postcss": "^8.4.49",
|
|
92
96
|
"react": "^18.2.0",
|
|
93
97
|
"react-dom": "^18.2.0",
|
|
94
98
|
"storybook": "^8.0.0",
|
|
95
|
-
"tailwindcss": "^
|
|
96
|
-
"typescript": "^5.
|
|
99
|
+
"tailwindcss": "^4.2.4",
|
|
100
|
+
"typescript": "^5.7.2",
|
|
97
101
|
"vite": "^6.0.0",
|
|
98
102
|
"vitest": "^1.6.1"
|
|
99
103
|
},
|
|
100
104
|
"peerDependencies": {
|
|
101
105
|
"react": "^18.0.0 || ^19.0.0",
|
|
102
106
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
103
|
-
"tailwindcss": "^
|
|
107
|
+
"tailwindcss": "^4.0.0"
|
|
104
108
|
},
|
|
105
109
|
"peerDependenciesMeta": {
|
|
106
110
|
"tailwindcss": {
|