holie-vkit 1.2.4 → 1.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.
@@ -0,0 +1,18 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface I18nProviderProps {
3
+ children: ReactNode;
4
+ }
5
+ /**
6
+ * I18nProvider - Centralized i18n provider for all holie projects
7
+ *
8
+ * Usage:
9
+ * ```tsx
10
+ * import { I18nProvider } from 'holie-vkit';
11
+ *
12
+ * <I18nProvider>
13
+ * <App />
14
+ * </I18nProvider>
15
+ * ```
16
+ */
17
+ export declare const I18nProvider: React.FC<I18nProviderProps>;
18
+ export { I18nextProvider } from 'react-i18next';
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { I18nextProvider } from 'react-i18next';
3
+ import { initializeI18n } from '../i18n/config';
4
+ /**
5
+ * I18nProvider - Centralized i18n provider for all holie projects
6
+ *
7
+ * Usage:
8
+ * ```tsx
9
+ * import { I18nProvider } from 'holie-vkit';
10
+ *
11
+ * <I18nProvider>
12
+ * <App />
13
+ * </I18nProvider>
14
+ * ```
15
+ */
16
+ export const I18nProvider = ({ children }) => {
17
+ const i18n = initializeI18n();
18
+ return (_jsx(I18nextProvider, { i18n: i18n, children: children }));
19
+ };
20
+ export { I18nextProvider } from 'react-i18next';
@@ -1,5 +1,7 @@
1
1
  import * as React from "react";
2
- export declare const TooltipProvider: any;
2
+ export declare const TooltipProvider: React.FC<{
3
+ children: React.ReactNode;
4
+ }>;
3
5
  export interface TooltipProps {
4
6
  content: React.ReactNode;
5
7
  children: React.ReactNode;
@@ -1,7 +1,9 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4
- export const TooltipProvider = TooltipPrimitive.Provider;
3
+ // Simple TooltipProvider wrapper - works with the custom Tooltip component
4
+ export const TooltipProvider = ({ children }) => {
5
+ return _jsx(_Fragment, { children: children });
6
+ };
5
7
  export const Tooltip = ({ content, children, className = '' }) => {
6
8
  const [visible, setVisible] = React.useState(false);
7
9
  return (_jsxs("span", { className: "relative inline-block", onMouseEnter: () => setVisible(true), onMouseLeave: () => setVisible(false), children: [children, visible && (_jsx("span", { className: `absolute z-50 left-1/2 -translate-x-1/2 mt-2 px-2 py-1 rounded bg-black text-white text-xs whitespace-nowrap ${className}`, children: content }))] }));
@@ -0,0 +1,6 @@
1
+ export type Language = 'nl' | 'en' | 'de' | 'fr';
2
+ export declare const SUPPORTED_LANGUAGES: Language[];
3
+ export declare const DEFAULT_LANGUAGE: Language;
4
+ export declare const initializeI18n: () => import("i18next").i18n;
5
+ declare const _default: import("i18next").i18n;
6
+ export default _default;
@@ -0,0 +1,53 @@
1
+ import i18next from 'i18next';
2
+ import { initReactI18next } from 'react-i18next';
3
+ import LanguageDetector from 'i18next-browser-languagedetector';
4
+ // Import locales
5
+ import nlCommon from './locales/nl.json';
6
+ import enCommon from './locales/en.json';
7
+ import deCommon from './locales/de.json';
8
+ import frCommon from './locales/fr.json';
9
+ // Supported languages
10
+ export const SUPPORTED_LANGUAGES = ['nl', 'en', 'de', 'fr'];
11
+ export const DEFAULT_LANGUAGE = 'nl';
12
+ // Initialize i18next
13
+ export const initializeI18n = () => {
14
+ if (i18next.isInitialized) {
15
+ return i18next;
16
+ }
17
+ i18next
18
+ .use(LanguageDetector)
19
+ .use(initReactI18next)
20
+ .init({
21
+ resources: {
22
+ nl: { translation: nlCommon },
23
+ en: { translation: enCommon },
24
+ de: { translation: deCommon },
25
+ fr: { translation: frCommon },
26
+ },
27
+ fallbackLng: DEFAULT_LANGUAGE,
28
+ supportedLngs: SUPPORTED_LANGUAGES,
29
+ ns: ['translation'],
30
+ defaultNS: 'translation',
31
+ // Language detector options
32
+ detection: {
33
+ order: ['localStorage', 'navigator', 'htmlTag'],
34
+ caches: ['localStorage'],
35
+ },
36
+ // String interpolation options
37
+ interpolation: {
38
+ escapeValue: false, // React already escapes values
39
+ formatSeparator: ',',
40
+ },
41
+ // Performance optimization: lazy load translations only when needed
42
+ react: {
43
+ useSuspense: false, // Disable suspense for SSR compatibility
44
+ bindI18n: 'languageChanged loaded',
45
+ bindI18nStore: 'added removed',
46
+ transEmptyNodeValue: '',
47
+ transSupportBasicHtmlNodes: true,
48
+ transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
49
+ },
50
+ });
51
+ return i18next;
52
+ };
53
+ export default initializeI18n();
@@ -0,0 +1,38 @@
1
+ {
2
+ "common": {
3
+ "home": "Startseite",
4
+ "about": "Über uns",
5
+ "contact": "Kontakt",
6
+ "services": "Dienstleistungen",
7
+ "portfolio": "Portfolio",
8
+ "faq": "Häufig gestellte Fragen",
9
+ "back": "Zurück",
10
+ "next": "Nächste",
11
+ "previous": "Vorherige",
12
+ "close": "Schließen",
13
+ "loading": "Wird geladen...",
14
+ "error": "Ein Fehler ist aufgetreten",
15
+ "success": "Erfolg",
16
+ "cancel": "Abbrechen",
17
+ "save": "Speichern",
18
+ "delete": "Löschen",
19
+ "edit": "Bearbeiten",
20
+ "language": "Sprache",
21
+ "noData": "Keine Daten verfügbar",
22
+ "searchPlaceholder": "Suchen..."
23
+ },
24
+ "buttons": {
25
+ "startNow": "Jetzt Starten",
26
+ "learnMore": "Mehr Erfahren",
27
+ "signup": "Anmelden",
28
+ "login": "Einloggen",
29
+ "logout": "Abmelden",
30
+ "submit": "Absenden"
31
+ },
32
+ "errors": {
33
+ "notFound": "Seite nicht gefunden",
34
+ "unauthorized": "Nicht autorisiert",
35
+ "serverError": "Serverfehler",
36
+ "tryAgain": "Versuchen Sie es erneut"
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "common": {
3
+ "home": "Home",
4
+ "about": "About",
5
+ "contact": "Contact",
6
+ "services": "Services",
7
+ "portfolio": "Portfolio",
8
+ "faq": "FAQ",
9
+ "back": "Back",
10
+ "next": "Next",
11
+ "previous": "Previous",
12
+ "close": "Close",
13
+ "loading": "Loading...",
14
+ "error": "An error occurred",
15
+ "success": "Success",
16
+ "cancel": "Cancel",
17
+ "save": "Save",
18
+ "delete": "Delete",
19
+ "edit": "Edit",
20
+ "language": "Language",
21
+ "noData": "No data available",
22
+ "searchPlaceholder": "Search..."
23
+ },
24
+ "buttons": {
25
+ "startNow": "Start Now",
26
+ "learnMore": "Learn More",
27
+ "signup": "Sign Up",
28
+ "login": "Login",
29
+ "logout": "Logout",
30
+ "submit": "Submit"
31
+ },
32
+ "errors": {
33
+ "notFound": "Page not found",
34
+ "unauthorized": "Unauthorized",
35
+ "serverError": "Server error",
36
+ "tryAgain": "Try again"
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "common": {
3
+ "home": "Accueil",
4
+ "about": "À propos",
5
+ "contact": "Contact",
6
+ "services": "Services",
7
+ "portfolio": "Portfolio",
8
+ "faq": "FAQ",
9
+ "back": "Retour",
10
+ "next": "Suivant",
11
+ "previous": "Précédent",
12
+ "close": "Fermer",
13
+ "loading": "Chargement...",
14
+ "error": "Une erreur s'est produite",
15
+ "success": "Succès",
16
+ "cancel": "Annuler",
17
+ "save": "Enregistrer",
18
+ "delete": "Supprimer",
19
+ "edit": "Modifier",
20
+ "language": "Langue",
21
+ "noData": "Aucune donnée disponible",
22
+ "searchPlaceholder": "Rechercher..."
23
+ },
24
+ "buttons": {
25
+ "startNow": "Commencer Maintenant",
26
+ "learnMore": "En Savoir Plus",
27
+ "signup": "S'inscrire",
28
+ "login": "Se Connecter",
29
+ "logout": "Se Déconnecter",
30
+ "submit": "Soumettre"
31
+ },
32
+ "errors": {
33
+ "notFound": "Page non trouvée",
34
+ "unauthorized": "Non autorisé",
35
+ "serverError": "Erreur serveur",
36
+ "tryAgain": "Réessayez"
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "common": {
3
+ "home": "Start",
4
+ "about": "Over ons",
5
+ "contact": "Contact",
6
+ "services": "Diensten",
7
+ "portfolio": "Portfolio",
8
+ "faq": "FAQ",
9
+ "back": "Terug",
10
+ "next": "Volgende",
11
+ "previous": "Vorige",
12
+ "close": "Sluiten",
13
+ "loading": "Laden...",
14
+ "error": "Er is een fout opgetreden",
15
+ "success": "Succes",
16
+ "cancel": "Annuleren",
17
+ "save": "Opslaan",
18
+ "delete": "Verwijderen",
19
+ "edit": "Bewerken",
20
+ "language": "Taal",
21
+ "noData": "Geen gegevens beschikbaar",
22
+ "searchPlaceholder": "Zoeken..."
23
+ },
24
+ "buttons": {
25
+ "startNow": "Start Nu",
26
+ "learnMore": "Meer Informatie",
27
+ "signup": "Registreren",
28
+ "login": "Inloggen",
29
+ "logout": "Uitloggen",
30
+ "submit": "Verzenden"
31
+ },
32
+ "errors": {
33
+ "notFound": "Pagina niet gevonden",
34
+ "unauthorized": "Ongeautoriseerd",
35
+ "serverError": "Serverfout",
36
+ "tryAgain": "Probeer opnieuw"
37
+ }
38
+ }
package/dist/index.d.ts CHANGED
@@ -5,11 +5,13 @@ export * from './components/LanguageSwitcher';
5
5
  export * from './components/Toaster';
6
6
  export * from './components/Navbar';
7
7
  export * from './components/Footer';
8
+ export * from './components/I18nProvider';
8
9
  export * from './hooks/useI18n';
9
10
  export * from './hooks/useAnalytics';
10
11
  export { useAICompletion } from './hooks/useAICompletion';
11
12
  export * from './utils/i18n';
12
13
  export * from './utils/analytics';
14
+ export * from './i18n/config';
13
15
  export * from './utils/shared';
14
16
  export * from './constants/categories';
15
17
  export * from './constants/designTokens';
@@ -29,7 +31,7 @@ export * from './components/Textarea';
29
31
  export * from './components/Card';
30
32
  export * from './components/Checkbox';
31
33
  export * from './components/Tooltip';
32
- export * from './components/TooltipProvider';
34
+ export { TooltipProvider } from './components/TooltipProvider';
33
35
  export * from './components/Popover';
34
36
  export * from './components/Sheet';
35
37
  export * from './components/Dialog';
package/dist/index.js CHANGED
@@ -5,11 +5,13 @@ export * from './components/LanguageSwitcher';
5
5
  export * from './components/Toaster';
6
6
  export * from './components/Navbar';
7
7
  export * from './components/Footer';
8
+ export * from './components/I18nProvider';
8
9
  export * from './hooks/useI18n';
9
10
  export * from './hooks/useAnalytics';
10
11
  export { useAICompletion } from './hooks/useAICompletion';
11
12
  export * from './utils/i18n';
12
13
  export * from './utils/analytics';
14
+ export * from './i18n/config';
13
15
  export * from './utils/shared';
14
16
  export * from './constants/categories';
15
17
  export * from './constants/designTokens';
@@ -30,7 +32,7 @@ export * from './components/Textarea';
30
32
  export * from './components/Card';
31
33
  export * from './components/Checkbox';
32
34
  export * from './components/Tooltip';
33
- export * from './components/TooltipProvider';
35
+ export { TooltipProvider } from './components/TooltipProvider';
34
36
  export * from './components/Popover';
35
37
  export * from './components/Sheet';
36
38
  export * from './components/Dialog';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holie-vkit",
3
- "version": "1.2.4",
3
+ "version": "1.3.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
@@ -14,9 +14,12 @@
14
14
  "@radix-ui/react-dropdown-menu": "^2.1.16",
15
15
  "@radix-ui/react-accordion": "^1.0.3",
16
16
  "clsx": "^2.1.1",
17
+ "i18next": "^25.6.3",
18
+ "i18next-browser-languagedetector": "^8.2.0",
17
19
  "lucide-react": "^0.563.0",
18
20
  "react": "^19.2.4",
19
21
  "react-dom": "^19.2.4",
22
+ "react-i18next": "^16.3.5",
20
23
  "tailwind-merge": "^3.4.0",
21
24
  "zod": "^4.3.6"
22
25
  },