From 4fe690e1e2ae929406e0ec40494762f9656f675c Mon Sep 17 00:00:00 2001 From: rasm-its Date: Sat, 26 Sep 2026 20:07:29 +0200 Subject: [PATCH] Added i18n exports --- dist/exports/client.d.ts | 4 ++-- dist/exports/client.js | 4 +++- dist/exports/client.js.map | 2 +- src/exports/client.ts | 12 ++++++++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/dist/exports/client.d.ts b/dist/exports/client.d.ts index 1e66075..d80f00a 100644 --- a/dist/exports/client.d.ts +++ b/dist/exports/client.d.ts @@ -10,8 +10,8 @@ export { Analytics } from '../modules/analytics/client.js'; */ export { ConsentProvider, CookieBanner, CookieButton, useConsent, useConsentContext, } from '../modules/consent/client.js'; export type { CookieBannerClassNames } from '../modules/consent/client.js'; -export { resolveFormMessage } from '../modules/notifications/resolveFormMessage.js'; -export type { FormNotificationTexts } from '../modules/notifications/types.js'; +export { buildLocalizedPath, getLocaleCodes, getLocalizedSlugs, switchLocalePath, } from '../modules/i18n/index.js'; +export type { I18nConfig, LocalizedSlugs } from '../modules/i18n/index.js'; export { Turnstile } from '../modules/turnstile/client.js'; export { TurnstileProvider, useTurnstile } from '../modules/turnstile/client.js'; export type { TurnstileProps } from '../modules/turnstile/client.js'; diff --git a/dist/exports/client.js b/dist/exports/client.js index e4b2dc0..215c75d 100644 --- a/dist/exports/client.js +++ b/dist/exports/client.js @@ -9,7 +9,9 @@ export { Analytics } from '../modules/analytics/client.js'; * components. Kept separate from the main entry so server bundles don't pull in * client-only code. */ export { ConsentProvider, CookieBanner, CookieButton, useConsent, useConsentContext } from '../modules/consent/client.js'; -export { resolveFormMessage } from '../modules/notifications/resolveFormMessage.js'; +// Pure i18n path helpers — no server/RSC deps, safe to import in client +// components (e.g. a LanguageSwitcher that computes locale URLs on the client). +export { buildLocalizedPath, getLocaleCodes, getLocalizedSlugs, switchLocalePath } from '../modules/i18n/index.js'; export { Turnstile } from '../modules/turnstile/client.js'; export { TurnstileProvider, useTurnstile } from '../modules/turnstile/client.js'; diff --git a/dist/exports/client.js.map b/dist/exports/client.js.map index 4a8cde4..67eff2d 100644 --- a/dist/exports/client.js.map +++ b/dist/exports/client.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/exports/client.ts"],"sourcesContent":["'use client'\nexport { MaskedField } from '../globals/SiteIntegrations/components/MaskedField.js'\nexport { TestEmailButton } from '../globals/SiteIntegrations/components/TestEmailButton.js'\nexport { Analytics } from '../modules/analytics/client.js'\n/**\n * Entry point: ipal-kit/client\n *\n * Client-side ('use client') exports — React hooks, providers, and UI\n * components. Kept separate from the main entry so server bundles don't pull in\n * client-only code.\n */\nexport {\n ConsentProvider,\n CookieBanner,\n CookieButton,\n useConsent,\n useConsentContext,\n} from '../modules/consent/client.js'\nexport type { CookieBannerClassNames } from '../modules/consent/client.js'\nexport { resolveFormMessage } from '../modules/notifications/resolveFormMessage.js'\nexport type { FormNotificationTexts } from '../modules/notifications/types.js'\nexport { Turnstile } from '../modules/turnstile/client.js'\nexport { TurnstileProvider, useTurnstile } from '../modules/turnstile/client.js'\nexport type { TurnstileProps } from '../modules/turnstile/client.js'\n"],"names":["MaskedField","TestEmailButton","Analytics","ConsentProvider","CookieBanner","CookieButton","useConsent","useConsentContext","resolveFormMessage","Turnstile","TurnstileProvider","useTurnstile"],"mappings":"AAAA;AACA,SAASA,WAAW,QAAQ,wDAAuD;AACnF,SAASC,eAAe,QAAQ,4DAA2D;AAC3F,SAASC,SAAS,QAAQ,iCAAgC;AAC1D;;;;;;CAMC,GACD,SACEC,eAAe,EACfC,YAAY,EACZC,YAAY,EACZC,UAAU,EACVC,iBAAiB,QACZ,+BAA8B;AAErC,SAASC,kBAAkB,QAAQ,iDAAgD;AAEnF,SAASC,SAAS,QAAQ,iCAAgC;AAC1D,SAASC,iBAAiB,EAAEC,YAAY,QAAQ,iCAAgC"} \ No newline at end of file +{"version":3,"sources":["../../src/exports/client.ts"],"sourcesContent":["'use client'\nexport { MaskedField } from '../globals/SiteIntegrations/components/MaskedField.js'\nexport { TestEmailButton } from '../globals/SiteIntegrations/components/TestEmailButton.js'\nexport { Analytics } from '../modules/analytics/client.js'\n/**\n * Entry point: ipal-kit/client\n *\n * Client-side ('use client') exports — React hooks, providers, and UI\n * components. Kept separate from the main entry so server bundles don't pull in\n * client-only code.\n */\nexport {\n ConsentProvider,\n CookieBanner,\n CookieButton,\n useConsent,\n useConsentContext,\n} from '../modules/consent/client.js'\n\nexport type { CookieBannerClassNames } from '../modules/consent/client.js'\n// Pure i18n path helpers — no server/RSC deps, safe to import in client\n// components (e.g. a LanguageSwitcher that computes locale URLs on the client).\nexport {\n buildLocalizedPath,\n getLocaleCodes,\n getLocalizedSlugs,\n switchLocalePath,\n} from '../modules/i18n/index.js'\nexport type { I18nConfig, LocalizedSlugs } from '../modules/i18n/index.js'\nexport { Turnstile } from '../modules/turnstile/client.js'\nexport { TurnstileProvider, useTurnstile } from '../modules/turnstile/client.js'\nexport type { TurnstileProps } from '../modules/turnstile/client.js'\n"],"names":["MaskedField","TestEmailButton","Analytics","ConsentProvider","CookieBanner","CookieButton","useConsent","useConsentContext","buildLocalizedPath","getLocaleCodes","getLocalizedSlugs","switchLocalePath","Turnstile","TurnstileProvider","useTurnstile"],"mappings":"AAAA;AACA,SAASA,WAAW,QAAQ,wDAAuD;AACnF,SAASC,eAAe,QAAQ,4DAA2D;AAC3F,SAASC,SAAS,QAAQ,iCAAgC;AAC1D;;;;;;CAMC,GACD,SACEC,eAAe,EACfC,YAAY,EACZC,YAAY,EACZC,UAAU,EACVC,iBAAiB,QACZ,+BAA8B;AAGrC,wEAAwE;AACxE,gFAAgF;AAChF,SACEC,kBAAkB,EAClBC,cAAc,EACdC,iBAAiB,EACjBC,gBAAgB,QACX,2BAA0B;AAEjC,SAASC,SAAS,QAAQ,iCAAgC;AAC1D,SAASC,iBAAiB,EAAEC,YAAY,QAAQ,iCAAgC"} \ No newline at end of file diff --git a/src/exports/client.ts b/src/exports/client.ts index 3780132..c5208c2 100644 --- a/src/exports/client.ts +++ b/src/exports/client.ts @@ -16,9 +16,17 @@ export { useConsent, useConsentContext, } from '../modules/consent/client.js' + export type { CookieBannerClassNames } from '../modules/consent/client.js' -export { resolveFormMessage } from '../modules/notifications/resolveFormMessage.js' -export type { FormNotificationTexts } from '../modules/notifications/types.js' +// Pure i18n path helpers — no server/RSC deps, safe to import in client +// components (e.g. a LanguageSwitcher that computes locale URLs on the client). +export { + buildLocalizedPath, + getLocaleCodes, + getLocalizedSlugs, + switchLocalePath, +} from '../modules/i18n/index.js' +export type { I18nConfig, LocalizedSlugs } from '../modules/i18n/index.js' export { Turnstile } from '../modules/turnstile/client.js' export { TurnstileProvider, useTurnstile } from '../modules/turnstile/client.js' export type { TurnstileProps } from '../modules/turnstile/client.js'