@windrun-huaiin/base-ui 5.0.0 → 5.1.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/package.json CHANGED
@@ -1,30 +1,23 @@
1
1
  {
2
2
  "name": "@windrun-huaiin/base-ui",
3
- "version": "5.0.0",
3
+ "version": "5.1.1",
4
4
  "description": "Base UI components for windrun-huaiin projects",
5
- "main": "./dist/index.js",
6
- "module": "./dist/index.mjs",
7
- "types": "./dist/index.d.ts",
5
+ "type": "module",
8
6
  "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.js"
13
- },
14
- "./ui/*": {
15
- "types": "./dist/ui/*.d.ts",
16
- "import": "./dist/ui/*.mjs",
17
- "require": "./dist/ui/*.js"
7
+ "./ui": {
8
+ "types": "./dist/ui/index.d.ts",
9
+ "import": "./dist/ui/index.mjs",
10
+ "require": "./dist/ui/index.js"
18
11
  },
19
12
  "./components": {
20
13
  "types": "./dist/components/index.d.ts",
21
14
  "import": "./dist/components/index.mjs",
22
15
  "require": "./dist/components/index.js"
23
16
  },
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"
17
+ "./components/server": {
18
+ "types": "./dist/components/server.d.ts",
19
+ "import": "./dist/components/server.mjs",
20
+ "require": "./dist/components/server.js"
28
21
  },
29
22
  "./src/*": "./src/*",
30
23
  "./styles/base-ui.css": "./dist/base-ui.css"
@@ -43,15 +36,15 @@
43
36
  "@radix-ui/react-slot": "^1.2.2",
44
37
  "class-variance-authority": "^0.7.1",
45
38
  "lucide-react": "^0.511.0",
46
- "@windrun-huaiin/lib": "^5.0.0"
39
+ "@windrun-huaiin/lib": "^5.1.1"
47
40
  },
48
41
  "peerDependencies": {
49
- "react": "19.1.0",
50
- "react-dom": "19.1.0",
42
+ "clsx": "^2.0.0",
51
43
  "next": "15.3.2",
52
44
  "next-intl": "^3.26.5",
53
45
  "next-themes": "^0.4.6",
54
- "clsx": "^2.0.0",
46
+ "react": "19.1.0",
47
+ "react-dom": "19.1.0",
55
48
  "tailwind-merge": "^3.0.0",
56
49
  "tailwindcss": "^4.1.7"
57
50
  },
@@ -1,19 +1,10 @@
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'
1
+ "use client"
2
+ export * from './404-page';
3
+ export * from './go-to-top';
4
+ export * from './language-detector';
5
+ export * from './language-switcher';
12
6
 
13
- // Main server/universal components
14
- export * from './global-icon';
15
- // Icon Configuration
16
- export { createSiteIcon } from './site-icon';
7
+ // Script Components (All Client-side)
8
+ export * from './script/google-analytics-script';
9
+ export * from './script/microsoft-clarity-script';
17
10
 
18
- // For client components, please use:
19
- // import { ... } from '@base-ui/components/client'
@@ -0,0 +1,4 @@
1
+ // Main server/universal components
2
+ export * from './global-icon';
3
+ // Icon Configuration
4
+ export { createSiteIcon } from './site-icon';
package/src/ui/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- // UI Components - Only actively used components
1
+ "use client";
2
2
  export * from './alert-dialog';
3
3
  export { Button, buttonVariants, type ButtonProps } from './button';
4
4
  export * from './dropdown-menu';
@@ -1,50 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
3
-
4
- interface NotFoundPageProps {
5
- siteIcon: ReactNode;
6
- }
7
- declare function NotFoundPage({ siteIcon }: NotFoundPageProps): react_jsx_runtime.JSX.Element;
8
-
9
- type I18nConfig = {
10
- locales: readonly string[];
11
- detector: {
12
- storagePrefix: string;
13
- storageKey: string;
14
- autoCloseTimeout: number;
15
- expirationDays: number;
16
- };
17
- };
18
- interface LanguageDetectorProps {
19
- i18nConfig: I18nConfig;
20
- }
21
- declare function LanguageDetector({ i18nConfig }: LanguageDetectorProps): react_jsx_runtime.JSX.Element | null;
22
-
23
- /**
24
- * @license
25
- * MIT License
26
- * Copyright (c) 2025 D8ger
27
- *
28
- * This source code is licensed under the MIT license found in the
29
- * LICENSE file in the root directory of this source tree.
30
- */
31
- interface LanguageSwitcherProps {
32
- locales: readonly string[];
33
- localeLabels: Record<string, string>;
34
- }
35
- declare function LanguageSwitcher({ locales, localeLabels }: LanguageSwitcherProps): react_jsx_runtime.JSX.Element;
36
-
37
- declare function GoogleAnalyticsScript(): react_jsx_runtime.JSX.Element | null;
38
- declare function useGoogleAnalytics(): {
39
- trackEvent: (event: string, data?: Record<string, unknown>) => void;
40
- };
41
- declare global {
42
- interface Window {
43
- dataLayer: any[];
44
- gtag: (...args: any[]) => void;
45
- }
46
- }
47
-
48
- declare function MicrosoftClarityScript(): react_jsx_runtime.JSX.Element | null;
49
-
50
- export { GoogleAnalyticsScript, LanguageDetector, LanguageSwitcher, MicrosoftClarityScript, NotFoundPage, useGoogleAnalytics };