@hua-labs/i18n-core 2.1.0 → 2.2.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/LICENSE +21 -0
- package/README.md +9 -3
- package/dist/chunk-4IYWT7MS.mjs +1104 -0
- package/dist/chunk-4IYWT7MS.mjs.map +1 -0
- package/dist/index.cjs +2086 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +22 -22
- package/dist/index.d.ts +249 -0
- package/dist/index.mjs +373 -264
- package/dist/index.mjs.map +1 -1
- package/dist/{server-4TeBq6hp.d.mts → server-CQztOmd-.d.mts} +48 -11
- package/dist/server-CQztOmd-.d.ts +404 -0
- package/dist/{chunk-EZL5TNH5.mjs → server.cjs} +148 -46
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -0
- package/dist/server.mjs +1 -1
- package/package.json +16 -13
- package/src/__tests__/default-value.test.ts +149 -0
- package/src/components/MissingKeyOverlay.tsx +6 -4
- package/src/core/translator.tsx +392 -195
- package/src/hooks/useI18n.tsx +511 -367
- package/src/index.ts +5 -2
- package/src/types/index.ts +341 -156
- package/dist/chunk-EZL5TNH5.mjs.map +0 -1
package/src/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ import React from 'react';
|
|
|
9
9
|
import { I18nProvider, useI18n } from './hooks/useI18n';
|
|
10
10
|
import { useTranslation, useLanguageChange } from './hooks/useTranslation';
|
|
11
11
|
import { Translator, ssrTranslate, serverTranslate } from './core/translator';
|
|
12
|
-
import { I18nConfig, I18nContextType, TranslationParams, TypedTranslationKeys, ResolveStringKey, ResolveArrayKey, ResolvePluralKey, PluralValue, PluralCategory } from './types';
|
|
12
|
+
import { I18nConfig, I18nContextType, TranslationParams, TypedTranslationKeys, ResolveStringKey, ResolveArrayKey, ResolvePluralKey, PluralValue, PluralCategory, I18nPlatformAdapter, webPlatformAdapter, headlessPlatformAdapter } from './types';
|
|
13
13
|
|
|
14
14
|
// Window 객체 타입 확장
|
|
15
15
|
declare global {
|
|
@@ -391,5 +391,8 @@ export { I18nProvider };
|
|
|
391
391
|
// 핵심 클래스/함수들 export
|
|
392
392
|
export { Translator, ssrTranslate, serverTranslate };
|
|
393
393
|
|
|
394
|
+
// 플랫폼 어댑터 export
|
|
395
|
+
export { webPlatformAdapter, headlessPlatformAdapter };
|
|
396
|
+
|
|
394
397
|
// 타입 export
|
|
395
|
-
export type { I18nConfig, I18nContextType, TranslationParams, TypedTranslationKeys, ResolveStringKey, ResolveArrayKey, ResolvePluralKey, PluralValue, PluralCategory };
|
|
398
|
+
export type { I18nConfig, I18nContextType, TranslationParams, TypedTranslationKeys, ResolveStringKey, ResolveArrayKey, ResolvePluralKey, PluralValue, PluralCategory, I18nPlatformAdapter };
|