@windrun-huaiin/base-ui 3.2.1 → 3.2.3
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/index.d.mts +31 -1
- package/dist/components/index.d.ts +31 -1
- package/dist/components/index.js +163 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +160 -0
- 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 +161 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +158 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/language-detector.tsx +1 -1
- package/src/components/language-switcher.tsx +1 -1
- package/src/components/script/google-analytics-script.tsx +2 -2
- package/src/components/script/microsoft-clarity-script.tsx +2 -2
package/package.json
CHANGED
@@ -35,7 +35,7 @@ interface LanguagePreference {
|
|
35
35
|
timestamp: number;
|
36
36
|
}
|
37
37
|
|
38
|
-
export
|
38
|
+
export function LanguageDetector({ i18nConfig }: LanguageDetectorProps) {
|
39
39
|
const [show, setShow] = useState(false)
|
40
40
|
const [detectedLocale, setDetectedLocale] = useState<Locale | null>(null)
|
41
41
|
const currentLocale = useLocale()
|
@@ -25,7 +25,7 @@ interface LanguageSwitcherProps {
|
|
25
25
|
localeLabels: Record<string, string>;
|
26
26
|
}
|
27
27
|
|
28
|
-
export
|
28
|
+
export function LanguageSwitcher({ locales, localeLabels }: LanguageSwitcherProps) {
|
29
29
|
const locale = useLocale()
|
30
30
|
const router = useRouter()
|
31
31
|
const pathname = usePathname()
|
@@ -6,7 +6,7 @@ import Script from "next/script";
|
|
6
6
|
const googleAnalyticsId = process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID!;
|
7
7
|
|
8
8
|
export function GoogleAnalyticsScript() {
|
9
|
-
//
|
9
|
+
// Only load in production environment
|
10
10
|
if (process.env.NODE_ENV !== 'production') {
|
11
11
|
return null
|
12
12
|
}
|
@@ -47,7 +47,7 @@ export function useGoogleAnalytics() {
|
|
47
47
|
};
|
48
48
|
}
|
49
49
|
|
50
|
-
//
|
50
|
+
// Add gtag type definition to window
|
51
51
|
declare global {
|
52
52
|
interface Window {
|
53
53
|
dataLayer: any[];
|
@@ -4,8 +4,8 @@ import Script from 'next/script'
|
|
4
4
|
|
5
5
|
const microsoftClarityId = process.env.NEXT_PUBLIC_MICROSOFT_CLARITY_ID!;
|
6
6
|
|
7
|
-
export
|
8
|
-
//
|
7
|
+
export function MicrosoftClarityScript() {
|
8
|
+
// Only load in production environment
|
9
9
|
if (process.env.NODE_ENV !== 'production') {
|
10
10
|
return null
|
11
11
|
}
|