@windrun-huaiin/base-ui 3.2.3 → 3.3.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/components/client/index.d.mts +46 -0
- package/dist/components/client/index.d.ts +46 -0
- package/dist/components/client/index.js +1822 -0
- package/dist/components/client/index.js.map +1 -0
- package/dist/components/client/index.mjs +1866 -0
- package/dist/components/client/index.mjs.map +1 -0
- package/dist/components/index.d.mts +1 -44
- package/dist/components/index.d.ts +1 -44
- package/dist/components/index.js +4 -571
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -564
- package/dist/components/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -318
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -312
- package/dist/index.mjs.map +1 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +0 -1
- package/dist/lib/index.mjs.map +1 -1
- package/dist/ui/index.js +0 -1
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/index.mjs +0 -1
- package/dist/ui/index.mjs.map +1 -1
- package/package.json +25 -19
- package/src/components/404-page.tsx +1 -1
- package/src/components/client/index.ts +15 -0
- package/src/components/global-icon.tsx +1 -1
- package/src/components/index.ts +15 -8
- package/src/index.ts +4 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@windrun-huaiin/base-ui",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.3.0",
|
4
4
|
"description": "Base UI components for windrun-huaiin projects",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"module": "./dist/index.mjs",
|
@@ -16,10 +16,15 @@
|
|
16
16
|
"import": "./dist/ui/*.mjs",
|
17
17
|
"require": "./dist/ui/*.js"
|
18
18
|
},
|
19
|
-
"./components
|
20
|
-
"types": "./dist/components
|
21
|
-
"import": "./dist/components
|
22
|
-
"require": "./dist/components
|
19
|
+
"./components": {
|
20
|
+
"types": "./dist/components/index.d.ts",
|
21
|
+
"import": "./dist/components/index.mjs",
|
22
|
+
"require": "./dist/components/index.js"
|
23
|
+
},
|
24
|
+
"./components/client": {
|
25
|
+
"types": "./dist/components/client/index.d.ts",
|
26
|
+
"import": "./dist/components/client/index.mjs",
|
27
|
+
"require": "./dist/components/client/index.js"
|
23
28
|
},
|
24
29
|
"./lib/*": {
|
25
30
|
"types": "./dist/lib/*.d.ts",
|
@@ -36,14 +41,6 @@
|
|
36
41
|
"README.md",
|
37
42
|
"LICENSE"
|
38
43
|
],
|
39
|
-
"scripts": {
|
40
|
-
"build:css": "postcss src/styles/base-ui.css -o dist/base-ui.css",
|
41
|
-
"build": "tsup && pnpm build:css",
|
42
|
-
"build:prod": "tsup && pnpm build:css",
|
43
|
-
"dev": "tsup --watch",
|
44
|
-
"clean": "rm -rf dist",
|
45
|
-
"type-check": "tsc --noEmit"
|
46
|
-
},
|
47
44
|
"dependencies": {
|
48
45
|
"@radix-ui/react-accordion": "^1.2.10",
|
49
46
|
"@radix-ui/react-alert-dialog": "^1.1.13",
|
@@ -72,7 +69,6 @@
|
|
72
69
|
"@radix-ui/react-toggle": "^1.1.8",
|
73
70
|
"@radix-ui/react-toggle-group": "^1.1.9",
|
74
71
|
"@radix-ui/react-tooltip": "^1.2.6",
|
75
|
-
"@windrun-huaiin/lib": "3.2.1",
|
76
72
|
"class-variance-authority": "^0.7.1",
|
77
73
|
"cmdk": "1.0.4",
|
78
74
|
"embla-carousel-react": "8.5.1",
|
@@ -88,17 +84,19 @@
|
|
88
84
|
"react-resizable-panels": "^2.1.9",
|
89
85
|
"recharts": "2.15.3",
|
90
86
|
"sonner": "^1.7.4",
|
91
|
-
"vaul": "^0.9.9"
|
87
|
+
"vaul": "^0.9.9",
|
88
|
+
"@windrun-huaiin/lib": "^3.2.2"
|
92
89
|
},
|
93
90
|
"peerDependencies": {
|
91
|
+
"clsx": "^2.0.0",
|
92
|
+
"next": "^15.3.2",
|
94
93
|
"react": "^19.1.0",
|
95
94
|
"react-dom": "^19.1.0",
|
96
|
-
"
|
97
|
-
"tailwindcss": "^4.1.7"
|
98
|
-
"clsx": "^2.0.0",
|
99
|
-
"tailwind-merge": "^3.0.0"
|
95
|
+
"tailwind-merge": "^3.0.0",
|
96
|
+
"tailwindcss": "^4.1.7"
|
100
97
|
},
|
101
98
|
"devDependencies": {
|
99
|
+
"@types/node": "^22.15.33",
|
102
100
|
"@types/react": "19.1.2",
|
103
101
|
"@types/react-dom": "19.1.3",
|
104
102
|
"tsup": "^8.3.5",
|
@@ -116,5 +114,13 @@
|
|
116
114
|
"license": "MIT",
|
117
115
|
"publishConfig": {
|
118
116
|
"access": "public"
|
117
|
+
},
|
118
|
+
"scripts": {
|
119
|
+
"build:css": "postcss src/styles/base-ui.css -o dist/base-ui.css",
|
120
|
+
"build": "tsup && pnpm build:css",
|
121
|
+
"build:prod": "tsup && pnpm build:css",
|
122
|
+
"dev": "tsup --watch",
|
123
|
+
"clean": "rm -rf dist",
|
124
|
+
"type-check": "tsc --noEmit"
|
119
125
|
}
|
120
126
|
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use client";
|
2
|
+
|
3
|
+
// Client Components Only
|
4
|
+
// These components use 'use client' directive and should be imported separately
|
5
|
+
// to avoid contaminating server components in the main index.ts
|
6
|
+
|
7
|
+
// Base Client Components
|
8
|
+
export * from '../404-page';
|
9
|
+
export * from '../go-to-top';
|
10
|
+
export * from '../language-detector';
|
11
|
+
export * from '../language-switcher';
|
12
|
+
|
13
|
+
// Script Components (All Client-side)
|
14
|
+
export * from '../script/google-analytics-script';
|
15
|
+
export * from '../script/microsoft-clarity-script';
|
@@ -147,7 +147,7 @@ export function getGlobalIcon(
|
|
147
147
|
|
148
148
|
const Icon = globalLucideIcons[iconKey as keyof typeof globalLucideIcons];
|
149
149
|
if (!Icon) {
|
150
|
-
if (process.env
|
150
|
+
if (typeof process !== 'undefined' && process.env?.NODE_ENV !== 'production') {
|
151
151
|
// only show in dev|test
|
152
152
|
// eslint-disable-next-line no-console
|
153
153
|
console.warn(
|
package/src/components/index.ts
CHANGED
@@ -1,10 +1,17 @@
|
|
1
|
-
//
|
2
|
-
|
1
|
+
// Server Components and Universal Components
|
2
|
+
// ⚠️ IMPORTANT: To avoid client/server component mixing issues in Next.js bundling,
|
3
|
+
// client components with 'use client' directive are exported separately.
|
4
|
+
//
|
5
|
+
// Usage:
|
6
|
+
// - Server components: import from '@base-ui/components' (this file)
|
7
|
+
// - Client components: import from '@base-ui/components/client'
|
8
|
+
//
|
9
|
+
// Example:
|
10
|
+
// import { globalLucideIcons, getGlobalIcon } from '@base-ui/components'
|
11
|
+
// import { NotFoundPage, GoToTop } from '@base-ui/components/client'
|
12
|
+
|
13
|
+
// Main server/universal components
|
3
14
|
export * from './global-icon';
|
4
|
-
export * from './go-to-top';
|
5
|
-
export * from './language-detector';
|
6
|
-
export * from './language-switcher';
|
7
15
|
|
8
|
-
//
|
9
|
-
|
10
|
-
export * from './script/microsoft-clarity-script';
|
16
|
+
// For client components, please use:
|
17
|
+
// import { ... } from '@base-ui/components/client'
|
package/src/index.ts
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
// Re-export everything from sub-modules for convenience
|
2
|
+
// ⚠️ IMPORTANT: Client components are NOT exported here to avoid server component contamination
|
3
|
+
// For client components, use: import { ... } from '@base-ui/components/client'
|
4
|
+
|
2
5
|
export * from './ui';
|
3
|
-
export * from './components';
|
6
|
+
export * from './components'; // Only server/universal components
|
4
7
|
export * from './lib';
|