@generaltranslation/react-core 2.0.0-odysseus.1 → 11.0.0-odysseus.9
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/CHANGELOG.md +95 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/components/branches/Branch.cjs +2 -0
- package/dist/components/branches/Branch.cjs.map +1 -0
- package/dist/components/branches/Branch.d.ts +30 -0
- package/dist/components/branches/Branch.d.ts.map +1 -0
- package/dist/components/branches/Branch.mjs +2 -0
- package/dist/components/branches/Branch.mjs.map +1 -0
- package/dist/components/branches/Plural.cjs +2 -0
- package/dist/components/branches/Plural.cjs.map +1 -0
- package/dist/components/branches/Plural.d.ts +19 -0
- package/dist/components/branches/Plural.d.ts.map +1 -0
- package/dist/components/branches/Plural.mjs +2 -0
- package/dist/components/branches/Plural.mjs.map +1 -0
- package/dist/components/branches/Plural.rsc.cjs +2 -0
- package/dist/components/branches/Plural.rsc.cjs.map +1 -0
- package/dist/components/branches/Plural.rsc.d.ts +15 -0
- package/dist/components/branches/Plural.rsc.d.ts.map +1 -0
- package/dist/components/branches/Plural.rsc.mjs +2 -0
- package/dist/components/branches/Plural.rsc.mjs.map +1 -0
- package/dist/components/branches/Plural.shared.cjs +2 -0
- package/dist/components/branches/Plural.shared.cjs.map +1 -0
- package/dist/components/branches/Plural.shared.d.ts +18 -0
- package/dist/components/branches/Plural.shared.d.ts.map +1 -0
- package/dist/components/branches/Plural.shared.mjs +2 -0
- package/dist/components/branches/Plural.shared.mjs.map +1 -0
- package/dist/components/derivation/Derive.cjs +2 -0
- package/dist/components/derivation/Derive.cjs.map +1 -0
- package/dist/components/derivation/Derive.d.ts +19 -0
- package/dist/components/derivation/Derive.d.ts.map +1 -0
- package/dist/components/derivation/Derive.mjs +2 -0
- package/dist/components/derivation/Derive.mjs.map +1 -0
- package/dist/components/helpers/InternalLocaleSelector.cjs +2 -0
- package/dist/components/helpers/InternalLocaleSelector.cjs.map +1 -0
- package/dist/components/helpers/InternalLocaleSelector.d.ts +38 -0
- package/dist/components/helpers/InternalLocaleSelector.d.ts.map +1 -0
- package/dist/components/helpers/InternalLocaleSelector.mjs +2 -0
- package/dist/components/helpers/InternalLocaleSelector.mjs.map +1 -0
- package/dist/components/helpers/InternalRegionSelector.cjs +2 -0
- package/dist/components/helpers/InternalRegionSelector.cjs.map +1 -0
- package/dist/components/helpers/InternalRegionSelector.d.ts +33 -0
- package/dist/components/helpers/InternalRegionSelector.d.ts.map +1 -0
- package/dist/components/helpers/InternalRegionSelector.mjs +2 -0
- package/dist/components/helpers/InternalRegionSelector.mjs.map +1 -0
- package/dist/components/translation/T.cjs +2 -0
- package/dist/components/translation/T.cjs.map +1 -0
- package/dist/components/translation/T.d.ts +18 -0
- package/dist/components/translation/T.d.ts.map +1 -0
- package/dist/components/translation/T.mjs +2 -0
- package/dist/components/translation/T.mjs.map +1 -0
- package/dist/components/translation/T.rsc.cjs +2 -0
- package/dist/components/translation/T.rsc.cjs.map +1 -0
- package/dist/components/translation/T.rsc.d.ts +17 -0
- package/dist/components/translation/T.rsc.d.ts.map +1 -0
- package/dist/components/translation/T.rsc.mjs +2 -0
- package/dist/components/translation/T.rsc.mjs.map +1 -0
- package/dist/components/translation/Tx.rsc.cjs +2 -0
- package/dist/components/translation/Tx.rsc.cjs.map +1 -0
- package/dist/components/translation/Tx.rsc.d.ts +17 -0
- package/dist/components/translation/Tx.rsc.d.ts.map +1 -0
- package/dist/components/translation/Tx.rsc.mjs +2 -0
- package/dist/components/translation/Tx.rsc.mjs.map +1 -0
- package/dist/components/variables/Currency.cjs +2 -0
- package/dist/components/variables/Currency.cjs.map +1 -0
- package/dist/components/variables/Currency.d.ts +18 -0
- package/dist/components/variables/Currency.d.ts.map +1 -0
- package/dist/components/variables/Currency.mjs +2 -0
- package/dist/components/variables/Currency.mjs.map +1 -0
- package/dist/components/variables/Currency.rsc.cjs +2 -0
- package/dist/components/variables/Currency.rsc.cjs.map +1 -0
- package/dist/components/variables/Currency.rsc.d.ts +14 -0
- package/dist/components/variables/Currency.rsc.d.ts.map +1 -0
- package/dist/components/variables/Currency.rsc.mjs +2 -0
- package/dist/components/variables/Currency.rsc.mjs.map +1 -0
- package/dist/components/variables/Currency.shared.cjs +2 -0
- package/dist/components/variables/Currency.shared.cjs.map +1 -0
- package/dist/components/variables/Currency.shared.d.ts +17 -0
- package/dist/components/variables/Currency.shared.d.ts.map +1 -0
- package/dist/components/variables/Currency.shared.mjs +2 -0
- package/dist/components/variables/Currency.shared.mjs.map +1 -0
- package/dist/components/variables/DateTime.cjs +2 -0
- package/dist/components/variables/DateTime.cjs.map +1 -0
- package/dist/components/variables/DateTime.d.ts +18 -0
- package/dist/components/variables/DateTime.d.ts.map +1 -0
- package/dist/components/variables/DateTime.mjs +2 -0
- package/dist/components/variables/DateTime.mjs.map +1 -0
- package/dist/components/variables/DateTime.rsc.cjs +2 -0
- package/dist/components/variables/DateTime.rsc.cjs.map +1 -0
- package/dist/components/variables/DateTime.rsc.d.ts +14 -0
- package/dist/components/variables/DateTime.rsc.d.ts.map +1 -0
- package/dist/components/variables/DateTime.rsc.mjs +2 -0
- package/dist/components/variables/DateTime.rsc.mjs.map +1 -0
- package/dist/components/variables/DateTime.shared.cjs +2 -0
- package/dist/components/variables/DateTime.shared.cjs.map +1 -0
- package/dist/components/variables/DateTime.shared.d.ts +16 -0
- package/dist/components/variables/DateTime.shared.d.ts.map +1 -0
- package/dist/components/variables/DateTime.shared.mjs +2 -0
- package/dist/components/variables/DateTime.shared.mjs.map +1 -0
- package/dist/components/variables/Num.cjs +2 -0
- package/dist/components/variables/Num.cjs.map +1 -0
- package/dist/components/variables/Num.d.ts +18 -0
- package/dist/components/variables/Num.d.ts.map +1 -0
- package/dist/components/variables/Num.mjs +2 -0
- package/dist/components/variables/Num.mjs.map +1 -0
- package/dist/components/variables/Num.rsc.cjs +2 -0
- package/dist/components/variables/Num.rsc.cjs.map +1 -0
- package/dist/components/variables/Num.rsc.d.ts +14 -0
- package/dist/components/variables/Num.rsc.d.ts.map +1 -0
- package/dist/components/variables/Num.rsc.mjs +2 -0
- package/dist/components/variables/Num.rsc.mjs.map +1 -0
- package/dist/components/variables/Num.shared.cjs +2 -0
- package/dist/components/variables/Num.shared.cjs.map +1 -0
- package/dist/components/variables/Num.shared.d.ts +16 -0
- package/dist/components/variables/Num.shared.d.ts.map +1 -0
- package/dist/components/variables/Num.shared.mjs +2 -0
- package/dist/components/variables/Num.shared.mjs.map +1 -0
- package/dist/components/variables/RelativeTime.cjs +2 -0
- package/dist/components/variables/RelativeTime.cjs.map +1 -0
- package/dist/components/variables/RelativeTime.d.ts +18 -0
- package/dist/components/variables/RelativeTime.d.ts.map +1 -0
- package/dist/components/variables/RelativeTime.mjs +2 -0
- package/dist/components/variables/RelativeTime.mjs.map +1 -0
- package/dist/components/variables/RelativeTime.rsc.cjs +2 -0
- package/dist/components/variables/RelativeTime.rsc.cjs.map +1 -0
- package/dist/components/variables/RelativeTime.rsc.d.ts +14 -0
- package/dist/components/variables/RelativeTime.rsc.d.ts.map +1 -0
- package/dist/components/variables/RelativeTime.rsc.mjs +2 -0
- package/dist/components/variables/RelativeTime.rsc.mjs.map +1 -0
- package/dist/components/variables/RelativeTime.shared.cjs +2 -0
- package/dist/components/variables/RelativeTime.shared.cjs.map +1 -0
- package/dist/components/variables/RelativeTime.shared.d.ts +20 -0
- package/dist/components/variables/RelativeTime.shared.d.ts.map +1 -0
- package/dist/components/variables/RelativeTime.shared.mjs +2 -0
- package/dist/components/variables/RelativeTime.shared.mjs.map +1 -0
- package/dist/components/variables/Var.cjs +2 -0
- package/dist/components/variables/Var.cjs.map +1 -0
- package/dist/components/variables/Var.d.ts +27 -0
- package/dist/components/variables/Var.d.ts.map +1 -0
- package/dist/components/variables/Var.mjs +2 -0
- package/dist/components/variables/Var.mjs.map +1 -0
- package/dist/components-rsc.cjs +1 -0
- package/dist/components-rsc.d.ts +32 -531
- package/dist/components-rsc.mjs +1 -0
- package/dist/components.cjs +1 -0
- package/dist/components.d.ts +14 -495
- package/dist/components.mjs +1 -0
- package/dist/condition-store/singleton-operations.cjs +2 -0
- package/dist/condition-store/singleton-operations.cjs.map +1 -0
- package/dist/condition-store/singleton-operations.d.ts +12 -0
- package/dist/condition-store/singleton-operations.d.ts.map +1 -0
- package/dist/condition-store/singleton-operations.mjs +2 -0
- package/dist/condition-store/singleton-operations.mjs.map +1 -0
- package/dist/context/InternalGTProvider.cjs +2 -0
- package/dist/context/InternalGTProvider.cjs.map +1 -0
- package/dist/context/InternalGTProvider.d.ts +39 -0
- package/dist/context/InternalGTProvider.d.ts.map +1 -0
- package/dist/context/InternalGTProvider.mjs +2 -0
- package/dist/context/InternalGTProvider.mjs.map +1 -0
- package/dist/context/context.cjs +2 -0
- package/dist/context/context.cjs.map +1 -0
- package/dist/context/context.mjs +2 -0
- package/dist/context/context.mjs.map +1 -0
- package/dist/cookies.cjs +1 -0
- package/dist/cookies.d.ts +2 -0
- package/dist/cookies.mjs +1 -0
- package/dist/functions/helpers/getTranslationsSnapshot.cjs +2 -0
- package/dist/functions/helpers/getTranslationsSnapshot.cjs.map +1 -0
- package/dist/functions/helpers/getTranslationsSnapshot.d.ts +14 -0
- package/dist/functions/helpers/getTranslationsSnapshot.d.ts.map +1 -0
- package/dist/functions/helpers/getTranslationsSnapshot.mjs +2 -0
- package/dist/functions/helpers/getTranslationsSnapshot.mjs.map +1 -0
- package/dist/functions/translation/t.cjs +2 -0
- package/dist/functions/translation/t.cjs.map +1 -0
- package/dist/functions/translation/t.d.ts +34 -0
- package/dist/functions/translation/t.d.ts.map +1 -0
- package/dist/functions/translation/t.mjs +2 -0
- package/dist/functions/translation/t.mjs.map +1 -0
- package/dist/hooks/condition-store.cjs +2 -0
- package/dist/hooks/condition-store.cjs.map +1 -0
- package/dist/hooks/condition-store.d.ts +23 -0
- package/dist/hooks/condition-store.d.ts.map +1 -0
- package/dist/hooks/condition-store.mjs +2 -0
- package/dist/hooks/condition-store.mjs.map +1 -0
- package/dist/hooks/external-store/useTrackedDictionaryObjResolver.cjs +2 -0
- package/dist/hooks/external-store/useTrackedDictionaryObjResolver.cjs.map +1 -0
- package/dist/hooks/external-store/useTrackedDictionaryObjResolver.mjs +2 -0
- package/dist/hooks/external-store/useTrackedDictionaryObjResolver.mjs.map +1 -0
- package/dist/hooks/external-store/useTrackedDictionaryResolver.cjs +2 -0
- package/dist/hooks/external-store/useTrackedDictionaryResolver.cjs.map +1 -0
- package/dist/hooks/external-store/useTrackedDictionaryResolver.mjs +2 -0
- package/dist/hooks/external-store/useTrackedDictionaryResolver.mjs.map +1 -0
- package/dist/hooks/external-store/useTrackedTranslationResolver.cjs +2 -0
- package/dist/hooks/external-store/useTrackedTranslationResolver.cjs.map +1 -0
- package/dist/hooks/external-store/useTrackedTranslationResolver.d.ts +10 -0
- package/dist/hooks/external-store/useTrackedTranslationResolver.d.ts.map +1 -0
- package/dist/hooks/external-store/useTrackedTranslationResolver.mjs +2 -0
- package/dist/hooks/external-store/useTrackedTranslationResolver.mjs.map +1 -0
- package/dist/hooks/external-store.cjs +2 -0
- package/dist/hooks/external-store.cjs.map +1 -0
- package/dist/hooks/external-store.mjs +2 -0
- package/dist/hooks/external-store.mjs.map +1 -0
- package/dist/hooks/i18n-config.cjs +2 -0
- package/dist/hooks/i18n-config.cjs.map +1 -0
- package/dist/hooks/i18n-config.d.ts +9 -0
- package/dist/hooks/i18n-config.d.ts.map +1 -0
- package/dist/hooks/i18n-config.mjs +2 -0
- package/dist/hooks/i18n-config.mjs.map +1 -0
- package/dist/hooks/useGT.cjs +2 -0
- package/dist/hooks/useGT.cjs.map +1 -0
- package/dist/hooks/useGT.d.ts +8 -0
- package/dist/hooks/useGT.d.ts.map +1 -0
- package/dist/hooks/useGT.mjs +2 -0
- package/dist/hooks/useGT.mjs.map +1 -0
- package/dist/hooks/useInternalLocaleSelector.cjs +2 -0
- package/dist/hooks/useInternalLocaleSelector.cjs.map +1 -0
- package/dist/hooks/useInternalLocaleSelector.d.ts +11 -0
- package/dist/hooks/useInternalLocaleSelector.d.ts.map +1 -0
- package/dist/hooks/useInternalLocaleSelector.mjs +2 -0
- package/dist/hooks/useInternalLocaleSelector.mjs.map +1 -0
- package/dist/hooks/useInternalRegionSelector.cjs +2 -0
- package/dist/hooks/useInternalRegionSelector.cjs.map +1 -0
- package/dist/hooks/useInternalRegionSelector.d.ts +41 -0
- package/dist/hooks/useInternalRegionSelector.d.ts.map +1 -0
- package/dist/hooks/useInternalRegionSelector.mjs +2 -0
- package/dist/hooks/useInternalRegionSelector.mjs.map +1 -0
- package/dist/hooks/useMessages.cjs +2 -0
- package/dist/hooks/useMessages.cjs.map +1 -0
- package/dist/hooks/useMessages.d.ts +8 -0
- package/dist/hooks/useMessages.d.ts.map +1 -0
- package/dist/hooks/useMessages.mjs +2 -0
- package/dist/hooks/useMessages.mjs.map +1 -0
- package/dist/hooks/useTranslations.cjs +2 -0
- package/dist/hooks/useTranslations.cjs.map +1 -0
- package/dist/hooks/useTranslations.d.ts +10 -0
- package/dist/hooks/useTranslations.d.ts.map +1 -0
- package/dist/hooks/useTranslations.mjs +2 -0
- package/dist/hooks/useTranslations.mjs.map +1 -0
- package/dist/hooks/utils/getFormatLocales.cjs +2 -0
- package/dist/hooks/utils/getFormatLocales.cjs.map +1 -0
- package/dist/hooks/utils/getFormatLocales.d.ts +13 -0
- package/dist/hooks/utils/getFormatLocales.d.ts.map +1 -0
- package/dist/hooks/utils/getFormatLocales.mjs +2 -0
- package/dist/hooks/utils/getFormatLocales.mjs.map +1 -0
- package/dist/hooks/utils/getShouldTranslate.cjs +2 -0
- package/dist/hooks/utils/getShouldTranslate.cjs.map +1 -0
- package/dist/hooks/utils/getShouldTranslate.d.ts +8 -0
- package/dist/hooks/utils/getShouldTranslate.d.ts.map +1 -0
- package/dist/hooks/utils/getShouldTranslate.mjs +2 -0
- package/dist/hooks/utils/getShouldTranslate.mjs.map +1 -0
- package/dist/hooks/utils/missing-translation.cjs +2 -0
- package/dist/hooks/utils/missing-translation.cjs.map +1 -0
- package/dist/hooks/utils/missing-translation.d.ts +10 -0
- package/dist/hooks/utils/missing-translation.d.ts.map +1 -0
- package/dist/hooks/utils/missing-translation.mjs +2 -0
- package/dist/hooks/utils/missing-translation.mjs.map +1 -0
- package/dist/hooks/utils.cjs +2 -0
- package/dist/hooks/utils.cjs.map +1 -0
- package/dist/hooks/utils.d.ts +14 -0
- package/dist/hooks/utils.d.ts.map +1 -0
- package/dist/hooks/utils.mjs +2 -0
- package/dist/hooks/utils.mjs.map +1 -0
- package/dist/hooks.cjs +1 -0
- package/dist/hooks.d.ts +9 -130
- package/dist/hooks.mjs +1 -0
- package/dist/i18n-cache/ReactI18nCache.cjs +2 -0
- package/dist/i18n-cache/ReactI18nCache.cjs.map +1 -0
- package/dist/i18n-cache/ReactI18nCache.d.ts +10 -0
- package/dist/i18n-cache/ReactI18nCache.d.ts.map +1 -0
- package/dist/i18n-cache/ReactI18nCache.mjs +2 -0
- package/dist/i18n-cache/ReactI18nCache.mjs.map +1 -0
- package/dist/i18n-cache/singleton-operations.cjs +2 -0
- package/dist/i18n-cache/singleton-operations.cjs.map +1 -0
- package/dist/i18n-cache/singleton-operations.d.ts +8 -0
- package/dist/i18n-cache/singleton-operations.d.ts.map +1 -0
- package/dist/i18n-cache/singleton-operations.mjs +2 -0
- package/dist/i18n-cache/singleton-operations.mjs.map +1 -0
- package/dist/i18n-store/I18nStore.cjs +2 -0
- package/dist/i18n-store/I18nStore.cjs.map +1 -0
- package/dist/i18n-store/I18nStore.d.ts +41 -0
- package/dist/i18n-store/I18nStore.d.ts.map +1 -0
- package/dist/i18n-store/I18nStore.mjs +2 -0
- package/dist/i18n-store/I18nStore.mjs.map +1 -0
- package/dist/i18n-store/singleton-operations.cjs +2 -0
- package/dist/i18n-store/singleton-operations.cjs.map +1 -0
- package/dist/i18n-store/singleton-operations.d.ts +9 -0
- package/dist/i18n-store/singleton-operations.d.ts.map +1 -0
- package/dist/i18n-store/singleton-operations.mjs +2 -0
- package/dist/i18n-store/singleton-operations.mjs.map +1 -0
- package/dist/i18n-store/storeTypes.d.ts +21 -0
- package/dist/i18n-store/storeTypes.d.ts.map +1 -0
- package/dist/i18n-store/useI18nStore.cjs +2 -0
- package/dist/i18n-store/useI18nStore.cjs.map +1 -0
- package/dist/i18n-store/useI18nStore.mjs +2 -0
- package/dist/i18n-store/useI18nStore.mjs.map +1 -0
- package/dist/i18n-store/utils/dictionaries.cjs +2 -0
- package/dist/i18n-store/utils/dictionaries.cjs.map +1 -0
- package/dist/i18n-store/utils/dictionaries.mjs +2 -0
- package/dist/i18n-store/utils/dictionaries.mjs.map +1 -0
- package/dist/i18n-store/utils/subscriptions.cjs +2 -0
- package/dist/i18n-store/utils/subscriptions.cjs.map +1 -0
- package/dist/i18n-store/utils/subscriptions.mjs +2 -0
- package/dist/i18n-store/utils/subscriptions.mjs.map +1 -0
- package/dist/i18n-store/utils/translations.cjs +2 -0
- package/dist/i18n-store/utils/translations.cjs.map +1 -0
- package/dist/i18n-store/utils/translations.mjs +2 -0
- package/dist/i18n-store/utils/translations.mjs.map +1 -0
- package/dist/pure.cjs +1 -0
- package/dist/pure.d.ts +31 -676
- package/dist/pure.mjs +1 -0
- package/dist/setup/i18nConfig.cjs +2 -0
- package/dist/setup/i18nConfig.cjs.map +1 -0
- package/dist/setup/i18nConfig.d.ts +21 -0
- package/dist/setup/i18nConfig.d.ts.map +1 -0
- package/dist/setup/i18nConfig.mjs +2 -0
- package/dist/setup/i18nConfig.mjs.map +1 -0
- package/dist/setup/initializeGTSPA.cjs +2 -0
- package/dist/setup/initializeGTSPA.cjs.map +1 -0
- package/dist/setup/initializeGTSPA.d.ts +16 -0
- package/dist/setup/initializeGTSPA.d.ts.map +1 -0
- package/dist/setup/initializeGTSPA.mjs +2 -0
- package/dist/setup/initializeGTSPA.mjs.map +1 -0
- package/dist/setup/initializeGTSRA.cjs +2 -0
- package/dist/setup/initializeGTSRA.cjs.map +1 -0
- package/dist/setup/initializeGTSRA.d.ts +11 -0
- package/dist/setup/initializeGTSRA.d.ts.map +1 -0
- package/dist/setup/initializeGTSRA.mjs +2 -0
- package/dist/setup/initializeGTSRA.mjs.map +1 -0
- package/dist/utils/cookies.cjs +2 -0
- package/dist/utils/cookies.cjs.map +1 -0
- package/dist/utils/cookies.d.ts +16 -0
- package/dist/utils/cookies.d.ts.map +1 -0
- package/dist/utils/cookies.mjs +2 -0
- package/dist/utils/cookies.mjs.map +1 -0
- package/dist/utils/dictionaries/flattenDictionary.cjs +2 -0
- package/dist/utils/dictionaries/flattenDictionary.cjs.map +1 -0
- package/dist/utils/dictionaries/flattenDictionary.d.ts +15 -0
- package/dist/utils/dictionaries/flattenDictionary.d.ts.map +1 -0
- package/dist/utils/dictionaries/flattenDictionary.mjs +2 -0
- package/dist/utils/dictionaries/flattenDictionary.mjs.map +1 -0
- package/dist/utils/dictionaries/getDictionaryEntry.cjs +2 -0
- package/dist/utils/dictionaries/getDictionaryEntry.cjs.map +1 -0
- package/dist/utils/dictionaries/getDictionaryEntry.d.ts +8 -0
- package/dist/utils/dictionaries/getDictionaryEntry.d.ts.map +1 -0
- package/dist/utils/dictionaries/getDictionaryEntry.mjs +2 -0
- package/dist/utils/dictionaries/getDictionaryEntry.mjs.map +1 -0
- package/dist/utils/dictionaries/getEntryAndMetadata.cjs +2 -0
- package/dist/utils/dictionaries/getEntryAndMetadata.cjs.map +1 -0
- package/dist/utils/dictionaries/getEntryAndMetadata.d.ts +10 -0
- package/dist/utils/dictionaries/getEntryAndMetadata.d.ts.map +1 -0
- package/dist/utils/dictionaries/getEntryAndMetadata.mjs +2 -0
- package/dist/utils/dictionaries/getEntryAndMetadata.mjs.map +1 -0
- package/dist/utils/dictionaries/indexDict.cjs +2 -0
- package/dist/utils/dictionaries/indexDict.cjs.map +1 -0
- package/dist/utils/dictionaries/indexDict.mjs +2 -0
- package/dist/utils/dictionaries/indexDict.mjs.map +1 -0
- package/dist/utils/dictionaries/isDictionaryEntry.cjs +2 -0
- package/dist/utils/dictionaries/isDictionaryEntry.cjs.map +1 -0
- package/dist/utils/dictionaries/isDictionaryEntry.d.ts +12 -0
- package/dist/utils/dictionaries/isDictionaryEntry.d.ts.map +1 -0
- package/dist/utils/dictionaries/isDictionaryEntry.mjs +2 -0
- package/dist/utils/dictionaries/isDictionaryEntry.mjs.map +1 -0
- package/dist/utils/dictionaries/mergeDictionaries.cjs +2 -0
- package/dist/utils/dictionaries/mergeDictionaries.cjs.map +1 -0
- package/dist/utils/dictionaries/mergeDictionaries.d.ts +7 -0
- package/dist/utils/dictionaries/mergeDictionaries.d.ts.map +1 -0
- package/dist/utils/dictionaries/mergeDictionaries.mjs +2 -0
- package/dist/utils/dictionaries/mergeDictionaries.mjs.map +1 -0
- package/dist/utils/internal/addGTIdentifier.cjs +2 -0
- package/dist/utils/internal/addGTIdentifier.cjs.map +1 -0
- package/dist/utils/internal/addGTIdentifier.d.ts +8 -0
- package/dist/utils/internal/addGTIdentifier.d.ts.map +1 -0
- package/dist/utils/internal/addGTIdentifier.mjs +2 -0
- package/dist/utils/internal/addGTIdentifier.mjs.map +1 -0
- package/dist/utils/internal/removeInjectedT.cjs +2 -0
- package/dist/utils/internal/removeInjectedT.cjs.map +1 -0
- package/dist/utils/internal/removeInjectedT.mjs +2 -0
- package/dist/utils/internal/removeInjectedT.mjs.map +1 -0
- package/dist/utils/internal/writeChildrenAsObjects.cjs +2 -0
- package/dist/utils/internal/writeChildrenAsObjects.cjs.map +1 -0
- package/dist/utils/internal/writeChildrenAsObjects.d.ts +14 -0
- package/dist/utils/internal/writeChildrenAsObjects.d.ts.map +1 -0
- package/dist/utils/internal/writeChildrenAsObjects.mjs +2 -0
- package/dist/utils/internal/writeChildrenAsObjects.mjs.map +1 -0
- package/dist/utils/plurals/getPluralBranch.cjs +2 -0
- package/dist/utils/plurals/getPluralBranch.cjs.map +1 -0
- package/dist/utils/plurals/getPluralBranch.d.ts +12 -0
- package/dist/utils/plurals/getPluralBranch.d.ts.map +1 -0
- package/dist/utils/plurals/getPluralBranch.mjs +2 -0
- package/dist/utils/plurals/getPluralBranch.mjs.map +1 -0
- package/dist/utils/rendering/createRenderPipeline.cjs +2 -0
- package/dist/utils/rendering/createRenderPipeline.cjs.map +1 -0
- package/dist/utils/rendering/createRenderPipeline.d.ts +18 -0
- package/dist/utils/rendering/createRenderPipeline.d.ts.map +1 -0
- package/dist/utils/rendering/createRenderPipeline.mjs +2 -0
- package/dist/utils/rendering/createRenderPipeline.mjs.map +1 -0
- package/dist/utils/rendering/createRenderVariable.cjs +2 -0
- package/dist/utils/rendering/createRenderVariable.cjs.map +1 -0
- package/dist/utils/rendering/createRenderVariable.d.ts +46 -0
- package/dist/utils/rendering/createRenderVariable.d.ts.map +1 -0
- package/dist/utils/rendering/createRenderVariable.mjs +2 -0
- package/dist/utils/rendering/createRenderVariable.mjs.map +1 -0
- package/dist/utils/rendering/getDefaultRenderSettings.cjs +2 -0
- package/dist/utils/rendering/getDefaultRenderSettings.cjs.map +1 -0
- package/dist/utils/rendering/getDefaultRenderSettings.d.ts +10 -0
- package/dist/utils/rendering/getDefaultRenderSettings.d.ts.map +1 -0
- package/dist/utils/rendering/getDefaultRenderSettings.mjs +2 -0
- package/dist/utils/rendering/getDefaultRenderSettings.mjs.map +1 -0
- package/dist/utils/rendering/getGTTag.cjs +2 -0
- package/dist/utils/rendering/getGTTag.cjs.map +1 -0
- package/dist/utils/rendering/getGTTag.mjs +2 -0
- package/dist/utils/rendering/getGTTag.mjs.map +1 -0
- package/dist/utils/rendering/renderDefaultChildren.shared.cjs +2 -0
- package/dist/utils/rendering/renderDefaultChildren.shared.cjs.map +1 -0
- package/dist/utils/rendering/renderDefaultChildren.shared.d.ts +12 -0
- package/dist/utils/rendering/renderDefaultChildren.shared.d.ts.map +1 -0
- package/dist/utils/rendering/renderDefaultChildren.shared.mjs +2 -0
- package/dist/utils/rendering/renderDefaultChildren.shared.mjs.map +1 -0
- package/dist/utils/rendering/renderPipeline.cjs +2 -0
- package/dist/utils/rendering/renderPipeline.cjs.map +1 -0
- package/dist/utils/rendering/renderPipeline.mjs +2 -0
- package/dist/utils/rendering/renderPipeline.mjs.map +1 -0
- package/dist/utils/rendering/renderPipeline.rsc.cjs +2 -0
- package/dist/utils/rendering/renderPipeline.rsc.cjs.map +1 -0
- package/dist/utils/rendering/renderPipeline.rsc.d.ts +11 -0
- package/dist/utils/rendering/renderPipeline.rsc.d.ts.map +1 -0
- package/dist/utils/rendering/renderPipeline.rsc.mjs +2 -0
- package/dist/utils/rendering/renderPipeline.rsc.mjs.map +1 -0
- package/dist/utils/rendering/renderPreparedT.shared.cjs +2 -0
- package/dist/utils/rendering/renderPreparedT.shared.cjs.map +1 -0
- package/dist/utils/rendering/renderPreparedT.shared.d.ts +16 -0
- package/dist/utils/rendering/renderPreparedT.shared.d.ts.map +1 -0
- package/dist/utils/rendering/renderPreparedT.shared.mjs +2 -0
- package/dist/utils/rendering/renderPreparedT.shared.mjs.map +1 -0
- package/dist/utils/rendering/renderTranslatedChildren.shared.cjs +2 -0
- package/dist/utils/rendering/renderTranslatedChildren.shared.cjs.map +1 -0
- package/dist/utils/rendering/renderTranslatedChildren.shared.d.ts +13 -0
- package/dist/utils/rendering/renderTranslatedChildren.shared.d.ts.map +1 -0
- package/dist/utils/rendering/renderTranslatedChildren.shared.mjs +2 -0
- package/dist/utils/rendering/renderTranslatedChildren.shared.mjs.map +1 -0
- package/dist/utils/translation/prepareT.shared.cjs +2 -0
- package/dist/utils/translation/prepareT.shared.cjs.map +1 -0
- package/dist/utils/translation/prepareT.shared.d.ts +40 -0
- package/dist/utils/translation/prepareT.shared.d.ts.map +1 -0
- package/dist/utils/translation/prepareT.shared.mjs +2 -0
- package/dist/utils/translation/prepareT.shared.mjs.map +1 -0
- package/dist/utils/translation/usePrepareT.cjs +2 -0
- package/dist/utils/translation/usePrepareT.cjs.map +1 -0
- package/dist/utils/translation/usePrepareT.mjs +2 -0
- package/dist/utils/translation/usePrepareT.mjs.map +1 -0
- package/dist/utils/types.d.ts +106 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/utils.cjs +2 -0
- package/dist/utils/utils.cjs.map +1 -0
- package/dist/utils/utils.mjs +2 -0
- package/dist/utils/utils.mjs.map +1 -0
- package/dist/utils/variables/_getVariableProps.cjs +2 -0
- package/dist/utils/variables/_getVariableProps.cjs.map +1 -0
- package/dist/utils/variables/_getVariableProps.d.ts +13 -0
- package/dist/utils/variables/_getVariableProps.d.ts.map +1 -0
- package/dist/utils/variables/_getVariableProps.mjs +2 -0
- package/dist/utils/variables/_getVariableProps.mjs.map +1 -0
- package/dist/utils/variables/getVariableName.cjs +2 -0
- package/dist/utils/variables/getVariableName.cjs.map +1 -0
- package/dist/utils/variables/getVariableName.d.ts +12 -0
- package/dist/utils/variables/getVariableName.d.ts.map +1 -0
- package/dist/utils/variables/getVariableName.mjs +2 -0
- package/dist/utils/variables/getVariableName.mjs.map +1 -0
- package/package.json +24 -13
- package/dist/components-rsc.cjs.min.cjs +0 -2
- package/dist/components-rsc.cjs.min.cjs.map +0 -1
- package/dist/components-rsc.d.ts.map +0 -1
- package/dist/components-rsc.esm.min.mjs +0 -2
- package/dist/components-rsc.esm.min.mjs.map +0 -1
- package/dist/components.cjs.min.cjs +0 -2
- package/dist/components.cjs.min.cjs.map +0 -1
- package/dist/components.d.ts.map +0 -1
- package/dist/components.esm.min.mjs +0 -2
- package/dist/components.esm.min.mjs.map +0 -1
- package/dist/hooks.cjs.min.cjs +0 -2
- package/dist/hooks.cjs.min.cjs.map +0 -1
- package/dist/hooks.d.ts.map +0 -1
- package/dist/hooks.esm.min.mjs +0 -2
- package/dist/hooks.esm.min.mjs.map +0 -1
- package/dist/pure.cjs.min.cjs +0 -2
- package/dist/pure.cjs.min.cjs.map +0 -1
- package/dist/pure.d.ts.map +0 -1
- package/dist/pure.esm.min.mjs +0 -2
- package/dist/pure.esm.min.mjs.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../i18n-cache/singleton-operations.cjs`),t=require(`../../utils/translation/prepareT.shared.cjs`),n=require(`../../utils/rendering/renderPipeline.rsc.cjs`);let r=require(`gt-i18n/internal`);async function i({children:i,_locale:a,_enableI18n:o,_renderPreparedT:s=n.renderPreparedT,...c}){let l=a,u=o,d=(0,r.getI18nConfig)().getDefaultLocale(),f=u&&(0,r.getI18nConfig)().requiresTranslation(l),p=t.prepareT({sourceChildren:i,params:c,locale:l});if(!f)return s({...p,targetJsxChildren:void 0,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f});let m=await e.getReactI18nCache().lookupTranslationWithFallback(l,p.sourceJsxChildren,p.targetOptions);return s({...p,targetJsxChildren:m,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f})}i._gtt=`translate-runtime`,exports.RscTx=i;
|
|
2
|
+
//# sourceMappingURL=Tx.rsc.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tx.rsc.cjs","names":["renderPreparedT","prepareT","getReactI18nCache"],"sources":["../../../src/components/translation/Tx.rsc.tsx"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport type { ReactNode } from 'react';\nimport { getReactI18nCache } from '../../i18n-cache/singleton-operations';\nimport { renderPreparedT } from '../../utils/rendering/renderPipeline.rsc';\nimport {\n prepareT,\n type ResolvedTProps,\n} from '../../utils/translation/prepareT.shared';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nasync function RscTx({\n children: sourceChildren,\n _locale,\n _enableI18n,\n // TODO: don't expose to consumer, this should be thru an internal path\n _renderPreparedT = renderPreparedT,\n ...params\n}: ResolvedTProps): Promise<ReactNode> {\n const locale = _locale;\n const enableI18n = _enableI18n;\n const defaultLocale = getI18nConfig().getDefaultLocale();\n const shouldTranslate =\n enableI18n && getI18nConfig().requiresTranslation(locale);\n const prepared = prepareT({\n sourceChildren,\n params,\n locale,\n });\n\n if (!shouldTranslate) {\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren: undefined,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n }\n\n const i18nCache = getReactI18nCache();\n const targetJsxChildren = await i18nCache.lookupTranslationWithFallback(\n locale,\n prepared.sourceJsxChildren,\n prepared.targetOptions\n );\n\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscTx._gtt = 'translate-runtime';\n\n// ===== Exports ===== //\n\nexport { RscTx };\n"],"mappings":"kQAaA,eAAe,EAAM,CACnB,SAAU,EACV,UACA,cAEA,mBAAmBA,EAAAA,gBACnB,GAAG,GACkC,CACrC,IAAM,EAAS,EACT,EAAa,EACb,GAAA,EAAA,EAAA,gBAA+B,CAAC,kBAAkB,CAClD,EACJ,IAAA,EAAA,EAAA,gBAA6B,CAAC,oBAAoB,EAAO,CACrD,EAAWC,EAAAA,SAAS,CACxB,iBACA,SACA,SACD,CAAC,CAEF,GAAI,CAAC,EACH,OAAO,EAAiB,CACtB,GAAG,EACH,kBAAmB,IAAA,GACnB,SACA,gBACA,aACA,kBACD,CAAC,CAIJ,IAAM,EAAoB,MADRC,EAAAA,mBACuB,CAAC,8BACxC,EACA,EAAS,kBACT,EAAS,cACV,CAED,OAAO,EAAiB,CACtB,GAAG,EACH,oBACA,SACA,gBACA,aACA,kBACD,CAAC,CAIJ,EAAM,KAAO"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ResolvedTProps } from "../../utils/translation/prepareT.shared.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/translation/Tx.rsc.d.ts
|
|
5
|
+
declare function RscTx({
|
|
6
|
+
children: sourceChildren,
|
|
7
|
+
_locale,
|
|
8
|
+
_enableI18n,
|
|
9
|
+
_renderPreparedT,
|
|
10
|
+
...params
|
|
11
|
+
}: ResolvedTProps): Promise<ReactNode>;
|
|
12
|
+
declare namespace RscTx {
|
|
13
|
+
var _gtt: string;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { RscTx };
|
|
17
|
+
//# sourceMappingURL=Tx.rsc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tx.rsc.d.ts","names":[],"sources":["../../../src/components/translation/Tx.rsc.tsx"],"mappings":";;;;iBAae,KAAA,CAAA;EACb,QAAA,EAAU,cAAA;EACV,OAAA;EACA,WAAA;EAEA,gBAAA;EAAA,GACG;AAAA,GACF,cAAA,GAAiB,OAAA,CAAQ,SAAA;AAAA,kBAPb,KAAA;EAAA,IAAK,IAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{getReactI18nCache as e}from"../../i18n-cache/singleton-operations.mjs";import{prepareT as t}from"../../utils/translation/prepareT.shared.mjs";import{renderPreparedT as n}from"../../utils/rendering/renderPipeline.rsc.mjs";import{getI18nConfig as r}from"gt-i18n/internal";async function i({children:i,_locale:a,_enableI18n:o,_renderPreparedT:s=n,...c}){let l=a,u=o,d=r().getDefaultLocale(),f=u&&r().requiresTranslation(l),p=t({sourceChildren:i,params:c,locale:l});if(!f)return s({...p,targetJsxChildren:void 0,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f});let m=await e().lookupTranslationWithFallback(l,p.sourceJsxChildren,p.targetOptions);return s({...p,targetJsxChildren:m,locale:l,defaultLocale:d,enableI18n:u,shouldTranslate:f})}i._gtt=`translate-runtime`;export{i as RscTx};
|
|
2
|
+
//# sourceMappingURL=Tx.rsc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tx.rsc.mjs","names":[],"sources":["../../../src/components/translation/Tx.rsc.tsx"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport type { ReactNode } from 'react';\nimport { getReactI18nCache } from '../../i18n-cache/singleton-operations';\nimport { renderPreparedT } from '../../utils/rendering/renderPipeline.rsc';\nimport {\n prepareT,\n type ResolvedTProps,\n} from '../../utils/translation/prepareT.shared';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nasync function RscTx({\n children: sourceChildren,\n _locale,\n _enableI18n,\n // TODO: don't expose to consumer, this should be thru an internal path\n _renderPreparedT = renderPreparedT,\n ...params\n}: ResolvedTProps): Promise<ReactNode> {\n const locale = _locale;\n const enableI18n = _enableI18n;\n const defaultLocale = getI18nConfig().getDefaultLocale();\n const shouldTranslate =\n enableI18n && getI18nConfig().requiresTranslation(locale);\n const prepared = prepareT({\n sourceChildren,\n params,\n locale,\n });\n\n if (!shouldTranslate) {\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren: undefined,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n }\n\n const i18nCache = getReactI18nCache();\n const targetJsxChildren = await i18nCache.lookupTranslationWithFallback(\n locale,\n prepared.sourceJsxChildren,\n prepared.targetOptions\n );\n\n return _renderPreparedT({\n ...prepared,\n targetJsxChildren,\n locale,\n defaultLocale,\n enableI18n,\n shouldTranslate,\n });\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscTx._gtt = 'translate-runtime';\n\n// ===== Exports ===== //\n\nexport { RscTx };\n"],"mappings":"qRAaA,eAAe,EAAM,CACnB,SAAU,EACV,UACA,cAEA,mBAAmB,EACnB,GAAG,GACkC,CACrC,IAAM,EAAS,EACT,EAAa,EACb,EAAgB,GAAe,CAAC,kBAAkB,CAClD,EACJ,GAAc,GAAe,CAAC,oBAAoB,EAAO,CACrD,EAAW,EAAS,CACxB,iBACA,SACA,SACD,CAAC,CAEF,GAAI,CAAC,EACH,OAAO,EAAiB,CACtB,GAAG,EACH,kBAAmB,IAAA,GACnB,SACA,gBACA,aACA,kBACD,CAAC,CAIJ,IAAM,EAAoB,MADR,GACuB,CAAC,8BACxC,EACA,EAAS,kBACT,EAAS,cACV,CAED,OAAO,EAAiB,CACtB,GAAG,EACH,oBACA,SACA,gBACA,aACA,kBACD,CAAC,CAIJ,EAAM,KAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../hooks/condition-store.cjs`),t=require(`./Currency.shared.cjs`);let n=require(`react/jsx-runtime`);function r({_enableI18n:n,_locale:r,...i}){return t.computeCurrency({...i,_enableI18n:n??e.useEnableI18n(),_locale:r??e.useLocale()})}function i(e){return(0,n.jsx)(r,{...e})}r._gtt=`variable-currency-automatic`,i._gtt=`variable-currency`,exports.Currency=i,exports.GtInternalCurrency=r;
|
|
2
|
+
//# sourceMappingURL=Currency.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Currency.cjs","names":["computeCurrency","useEnableI18n","useLocale"],"sources":["../../../src/components/variables/Currency.tsx"],"sourcesContent":["import { useEnableI18n, useLocale } from '../../hooks/condition-store';\nimport { computeCurrency, type CurrencyProps } from './Currency.shared';\n\n// ===== Component ===== //\n\nfunction GtInternalCurrency({\n _enableI18n,\n _locale,\n ...props\n}: CurrencyProps): string | null {\n return computeCurrency({\n ...props,\n _enableI18n: _enableI18n ?? useEnableI18n(),\n _locale: _locale ?? useLocale(),\n });\n}\n\nfunction Currency(props: CurrencyProps): React.JSX.Element {\n return <GtInternalCurrency {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nGtInternalCurrency._gtt = 'variable-currency-automatic';\nCurrency._gtt = 'variable-currency';\n\n// ===== Exports ===== //\n\nexport { GtInternalCurrency, Currency };\n"],"mappings":"yKAKA,SAAS,EAAmB,CAC1B,cACA,UACA,GAAG,GAC4B,CAC/B,OAAOA,EAAAA,gBAAgB,CACrB,GAAG,EACH,YAAa,GAAeC,EAAAA,eAAe,CAC3C,QAAS,GAAWC,EAAAA,WAAW,CAChC,CAAC,CAGJ,SAAS,EAAS,EAAyC,CACzD,OAAO,EAAA,EAAA,KAAC,EAAD,CAAoB,GAAI,EAAS,CAAA,CAI1C,EAAmB,KAAO,8BAC1B,EAAS,KAAO"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CurrencyProps } from "./Currency.shared.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/variables/Currency.d.ts
|
|
4
|
+
declare function GtInternalCurrency({
|
|
5
|
+
_enableI18n,
|
|
6
|
+
_locale,
|
|
7
|
+
...props
|
|
8
|
+
}: CurrencyProps): string | null;
|
|
9
|
+
declare namespace GtInternalCurrency {
|
|
10
|
+
var _gtt: string;
|
|
11
|
+
}
|
|
12
|
+
declare function Currency(props: CurrencyProps): React.JSX.Element;
|
|
13
|
+
declare namespace Currency {
|
|
14
|
+
var _gtt: string;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Currency, GtInternalCurrency };
|
|
18
|
+
//# sourceMappingURL=Currency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Currency.d.ts","names":[],"sources":["../../../src/components/variables/Currency.tsx"],"mappings":";;;iBAKS,kBAAA,CAAA;EACP,WAAA;EACA,OAAA;EAAA,GACG;AAAA,GACF,aAAA;AAAA,kBAJM,kBAAA;EAAA,IAAkB,IAAA;AAAA;AAAA,iBAYlB,QAAA,CAAS,KAAA,EAAO,aAAA,GAAgB,KAAA,CAAM,GAAA,CAAI,OAAA;AAAA,kBAA1C,QAAA;EAAA,IAAQ,IAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useEnableI18n as e,useLocale as t}from"../../hooks/condition-store.mjs";import{computeCurrency as n}from"./Currency.shared.mjs";import{jsx as r}from"react/jsx-runtime";function i({_enableI18n:r,_locale:i,...a}){return n({...a,_enableI18n:r??e(),_locale:i??t()})}function a(e){return r(i,{...e})}i._gtt=`variable-currency-automatic`,a._gtt=`variable-currency`;export{a as Currency,i as GtInternalCurrency};
|
|
2
|
+
//# sourceMappingURL=Currency.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Currency.mjs","names":[],"sources":["../../../src/components/variables/Currency.tsx"],"sourcesContent":["import { useEnableI18n, useLocale } from '../../hooks/condition-store';\nimport { computeCurrency, type CurrencyProps } from './Currency.shared';\n\n// ===== Component ===== //\n\nfunction GtInternalCurrency({\n _enableI18n,\n _locale,\n ...props\n}: CurrencyProps): string | null {\n return computeCurrency({\n ...props,\n _enableI18n: _enableI18n ?? useEnableI18n(),\n _locale: _locale ?? useLocale(),\n });\n}\n\nfunction Currency(props: CurrencyProps): React.JSX.Element {\n return <GtInternalCurrency {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nGtInternalCurrency._gtt = 'variable-currency-automatic';\nCurrency._gtt = 'variable-currency';\n\n// ===== Exports ===== //\n\nexport { GtInternalCurrency, Currency };\n"],"mappings":"+KAKA,SAAS,EAAmB,CAC1B,cACA,UACA,GAAG,GAC4B,CAC/B,OAAO,EAAgB,CACrB,GAAG,EACH,YAAa,GAAe,GAAe,CAC3C,QAAS,GAAW,GAAW,CAChC,CAAC,CAGJ,SAAS,EAAS,EAAyC,CACzD,OAAO,EAAC,EAAD,CAAoB,GAAI,EAAS,CAAA,CAI1C,EAAmB,KAAO,8BAC1B,EAAS,KAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./Currency.shared.cjs`);let t=require(`react/jsx-runtime`);function n(t){return e.computeCurrency(t)}function r(e){return(0,t.jsx)(n,{...e})}r._gtt=`variable-currency`,n._gtt=`variable-currency-automatic`,exports.RscCurrency=r,exports.RscGtInternalCurrency=n;
|
|
2
|
+
//# sourceMappingURL=Currency.rsc.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Currency.rsc.cjs","names":["computeCurrency"],"sources":["../../../src/components/variables/Currency.rsc.tsx"],"sourcesContent":["import { computeCurrency, type ResolvedCurrencyProps } from './Currency.shared';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nfunction RscGtInternalCurrency(props: ResolvedCurrencyProps): string | null {\n return computeCurrency(props);\n}\n\nfunction RscCurrency(props: ResolvedCurrencyProps): React.JSX.Element {\n return <RscGtInternalCurrency {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscCurrency._gtt = 'variable-currency';\nRscGtInternalCurrency._gtt = 'variable-currency-automatic';\n\n// ===== Exports ===== //\n\nexport { RscCurrency, RscGtInternalCurrency };\n"],"mappings":"4HAMA,SAAS,EAAsB,EAA6C,CAC1E,OAAOA,EAAAA,gBAAgB,EAAM,CAG/B,SAAS,EAAY,EAAiD,CACpE,OAAO,EAAA,EAAA,KAAC,EAAD,CAAuB,GAAI,EAAS,CAAA,CAI7C,EAAY,KAAO,oBACnB,EAAsB,KAAO"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ResolvedCurrencyProps } from "./Currency.shared.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/variables/Currency.rsc.d.ts
|
|
4
|
+
declare function RscGtInternalCurrency(props: ResolvedCurrencyProps): string | null;
|
|
5
|
+
declare namespace RscGtInternalCurrency {
|
|
6
|
+
var _gtt: string;
|
|
7
|
+
}
|
|
8
|
+
declare function RscCurrency(props: ResolvedCurrencyProps): React.JSX.Element;
|
|
9
|
+
declare namespace RscCurrency {
|
|
10
|
+
var _gtt: string;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { RscCurrency, RscGtInternalCurrency };
|
|
14
|
+
//# sourceMappingURL=Currency.rsc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Currency.rsc.d.ts","names":[],"sources":["../../../src/components/variables/Currency.rsc.tsx"],"mappings":";;;iBAMS,qBAAA,CAAsB,KAAA,EAAO,qBAAA;AAAA,kBAA7B,qBAAA;EAAA,IAAqB,IAAA;AAAA;AAAA,iBAIrB,WAAA,CAAY,KAAA,EAAO,qBAAA,GAAwB,KAAA,CAAM,GAAA,CAAI,OAAA;AAAA,kBAArD,WAAA;EAAA,IAAW,IAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{computeCurrency as e}from"./Currency.shared.mjs";import{jsx as t}from"react/jsx-runtime";function n(t){return e(t)}function r(e){return t(n,{...e})}r._gtt=`variable-currency`,n._gtt=`variable-currency-automatic`;export{r as RscCurrency,n as RscGtInternalCurrency};
|
|
2
|
+
//# sourceMappingURL=Currency.rsc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Currency.rsc.mjs","names":[],"sources":["../../../src/components/variables/Currency.rsc.tsx"],"sourcesContent":["import { computeCurrency, type ResolvedCurrencyProps } from './Currency.shared';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nfunction RscGtInternalCurrency(props: ResolvedCurrencyProps): string | null {\n return computeCurrency(props);\n}\n\nfunction RscCurrency(props: ResolvedCurrencyProps): React.JSX.Element {\n return <RscGtInternalCurrency {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscCurrency._gtt = 'variable-currency';\nRscGtInternalCurrency._gtt = 'variable-currency-automatic';\n\n// ===== Exports ===== //\n\nexport { RscCurrency, RscGtInternalCurrency };\n"],"mappings":"gGAMA,SAAS,EAAsB,EAA6C,CAC1E,OAAO,EAAgB,EAAM,CAG/B,SAAS,EAAY,EAAiD,CACpE,OAAO,EAAC,EAAD,CAAuB,GAAI,EAAS,CAAA,CAI7C,EAAY,KAAO,oBACnB,EAAsB,KAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../hooks/utils/getFormatLocales.cjs`);let t=require(`gt-i18n/internal`);function n({_enableI18n:n,_locale:r,children:i,currency:a=`USD`,options:o={},locales:s=[]}){let c=e.getFormatLocales({locale:r,enableI18n:n,localesProp:s}),l=(0,t.getI18nConfig)().getGTClass();if(i==null)return null;let u=typeof i==`string`?parseFloat(i):i;return l.formatCurrency(u,a,{locales:c,...o})}exports.computeCurrency=n;
|
|
2
|
+
//# sourceMappingURL=Currency.shared.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Currency.shared.cjs","names":["getFormatLocales"],"sources":["../../../src/components/variables/Currency.shared.ts"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure compute logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype CurrencyProps = {\n children: number | string | null | undefined;\n currency?: string;\n options?: Intl.NumberFormatOptions;\n locales?: string[];\n name?: string;\n _locale?: string;\n _enableI18n?: boolean;\n};\n\ntype ResolvedCurrencyProps = CurrencyProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction computeCurrency({\n _enableI18n,\n _locale,\n children,\n currency = 'USD',\n options = {},\n locales: localesProp = [],\n}: ResolvedCurrencyProps): string | null {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n const gt = getI18nConfig().getGTClass();\n if (children == null) return null;\n const parsedNumber =\n typeof children === 'string' ? parseFloat(children) : children;\n return gt.formatCurrency(parsedNumber, currency, {\n locales,\n ...options,\n });\n}\n\nexport { computeCurrency };\nexport type { CurrencyProps, ResolvedCurrencyProps };\n"],"mappings":"4IAsBA,SAAS,EAAgB,CACvB,cACA,UACA,WACA,WAAW,MACX,UAAU,EAAE,CACZ,QAAS,EAAc,EAAE,EACc,CACvC,IAAM,EAAUA,EAAAA,iBAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CACI,GAAA,EAAA,EAAA,gBAAoB,CAAC,YAAY,CACvC,GAAI,GAAY,KAAM,OAAO,KAC7B,IAAM,EACJ,OAAO,GAAa,SAAW,WAAW,EAAS,CAAG,EACxD,OAAO,EAAG,eAAe,EAAc,EAAU,CAC/C,UACA,GAAG,EACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/components/variables/Currency.shared.d.ts
|
|
2
|
+
type CurrencyProps = {
|
|
3
|
+
children: number | string | null | undefined;
|
|
4
|
+
currency?: string;
|
|
5
|
+
options?: Intl.NumberFormatOptions;
|
|
6
|
+
locales?: string[];
|
|
7
|
+
name?: string;
|
|
8
|
+
_locale?: string;
|
|
9
|
+
_enableI18n?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type ResolvedCurrencyProps = CurrencyProps & {
|
|
12
|
+
_locale: string;
|
|
13
|
+
_enableI18n: boolean;
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { type CurrencyProps, type ResolvedCurrencyProps };
|
|
17
|
+
//# sourceMappingURL=Currency.shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Currency.shared.d.ts","names":[],"sources":["../../../src/components/variables/Currency.shared.ts"],"mappings":";KAOK,aAAA;EACH,QAAA;EACA,QAAA;EACA,OAAA,GAAU,IAAA,CAAK,mBAAA;EACf,OAAA;EACA,IAAA;EACA,OAAA;EACA,WAAA;AAAA;AAAA,KAGG,qBAAA,GAAwB,aAAA;EAC3B,OAAA;EACA,WAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{getFormatLocales as e}from"../../hooks/utils/getFormatLocales.mjs";import{getI18nConfig as t}from"gt-i18n/internal";function n({_enableI18n:n,_locale:r,children:i,currency:a=`USD`,options:o={},locales:s=[]}){let c=e({locale:r,enableI18n:n,localesProp:s}),l=t().getGTClass();if(i==null)return null;let u=typeof i==`string`?parseFloat(i):i;return l.formatCurrency(u,a,{locales:c,...o})}export{n as computeCurrency};
|
|
2
|
+
//# sourceMappingURL=Currency.shared.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Currency.shared.mjs","names":[],"sources":["../../../src/components/variables/Currency.shared.ts"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure compute logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype CurrencyProps = {\n children: number | string | null | undefined;\n currency?: string;\n options?: Intl.NumberFormatOptions;\n locales?: string[];\n name?: string;\n _locale?: string;\n _enableI18n?: boolean;\n};\n\ntype ResolvedCurrencyProps = CurrencyProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction computeCurrency({\n _enableI18n,\n _locale,\n children,\n currency = 'USD',\n options = {},\n locales: localesProp = [],\n}: ResolvedCurrencyProps): string | null {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n const gt = getI18nConfig().getGTClass();\n if (children == null) return null;\n const parsedNumber =\n typeof children === 'string' ? parseFloat(children) : children;\n return gt.formatCurrency(parsedNumber, currency, {\n locales,\n ...options,\n });\n}\n\nexport { computeCurrency };\nexport type { CurrencyProps, ResolvedCurrencyProps };\n"],"mappings":"2HAsBA,SAAS,EAAgB,CACvB,cACA,UACA,WACA,WAAW,MACX,UAAU,EAAE,CACZ,QAAS,EAAc,EAAE,EACc,CACvC,IAAM,EAAU,EAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CACI,EAAK,GAAe,CAAC,YAAY,CACvC,GAAI,GAAY,KAAM,OAAO,KAC7B,IAAM,EACJ,OAAO,GAAa,SAAW,WAAW,EAAS,CAAG,EACxD,OAAO,EAAG,eAAe,EAAc,EAAU,CAC/C,UACA,GAAG,EACJ,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../hooks/condition-store.cjs`),t=require(`./DateTime.shared.cjs`);let n=require(`react/jsx-runtime`);function r({_enableI18n:n,_locale:r,...i}){return t.computeDateTime({...i,_enableI18n:n??e.useEnableI18n(),_locale:r??e.useLocale()})}function i(e){return(0,n.jsx)(r,{...e})}r._gtt=`variable-datetime-automatic`,i._gtt=`variable-datetime`,exports.DateTime=i,exports.GtInternalDateTime=r;
|
|
2
|
+
//# sourceMappingURL=DateTime.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTime.cjs","names":["computeDateTime","useEnableI18n","useLocale"],"sources":["../../../src/components/variables/DateTime.tsx"],"sourcesContent":["import { useEnableI18n, useLocale } from '../../hooks/condition-store';\nimport { computeDateTime, type DateTimeProps } from './DateTime.shared';\n\n// ===== Component ===== //\n\nfunction GtInternalDateTime({\n _enableI18n,\n _locale,\n ...props\n}: DateTimeProps): string | null {\n return computeDateTime({\n ...props,\n _enableI18n: _enableI18n ?? useEnableI18n(),\n _locale: _locale ?? useLocale(),\n });\n}\n\nfunction DateTime(props: DateTimeProps): React.JSX.Element {\n return <GtInternalDateTime {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nGtInternalDateTime._gtt = 'variable-datetime-automatic';\nDateTime._gtt = 'variable-datetime';\n\n// ===== Exports ===== //\n\nexport { GtInternalDateTime, DateTime };\n"],"mappings":"yKAKA,SAAS,EAAmB,CAC1B,cACA,UACA,GAAG,GAC4B,CAC/B,OAAOA,EAAAA,gBAAgB,CACrB,GAAG,EACH,YAAa,GAAeC,EAAAA,eAAe,CAC3C,QAAS,GAAWC,EAAAA,WAAW,CAChC,CAAC,CAGJ,SAAS,EAAS,EAAyC,CACzD,OAAO,EAAA,EAAA,KAAC,EAAD,CAAoB,GAAI,EAAS,CAAA,CAI1C,EAAmB,KAAO,8BAC1B,EAAS,KAAO"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DateTimeProps } from "./DateTime.shared.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/variables/DateTime.d.ts
|
|
4
|
+
declare function GtInternalDateTime({
|
|
5
|
+
_enableI18n,
|
|
6
|
+
_locale,
|
|
7
|
+
...props
|
|
8
|
+
}: DateTimeProps): string | null;
|
|
9
|
+
declare namespace GtInternalDateTime {
|
|
10
|
+
var _gtt: string;
|
|
11
|
+
}
|
|
12
|
+
declare function DateTime(props: DateTimeProps): React.JSX.Element;
|
|
13
|
+
declare namespace DateTime {
|
|
14
|
+
var _gtt: string;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { DateTime, GtInternalDateTime };
|
|
18
|
+
//# sourceMappingURL=DateTime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTime.d.ts","names":[],"sources":["../../../src/components/variables/DateTime.tsx"],"mappings":";;;iBAKS,kBAAA,CAAA;EACP,WAAA;EACA,OAAA;EAAA,GACG;AAAA,GACF,aAAA;AAAA,kBAJM,kBAAA;EAAA,IAAkB,IAAA;AAAA;AAAA,iBAYlB,QAAA,CAAS,KAAA,EAAO,aAAA,GAAgB,KAAA,CAAM,GAAA,CAAI,OAAA;AAAA,kBAA1C,QAAA;EAAA,IAAQ,IAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useEnableI18n as e,useLocale as t}from"../../hooks/condition-store.mjs";import{computeDateTime as n}from"./DateTime.shared.mjs";import{jsx as r}from"react/jsx-runtime";function i({_enableI18n:r,_locale:i,...a}){return n({...a,_enableI18n:r??e(),_locale:i??t()})}function a(e){return r(i,{...e})}i._gtt=`variable-datetime-automatic`,a._gtt=`variable-datetime`;export{a as DateTime,i as GtInternalDateTime};
|
|
2
|
+
//# sourceMappingURL=DateTime.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTime.mjs","names":[],"sources":["../../../src/components/variables/DateTime.tsx"],"sourcesContent":["import { useEnableI18n, useLocale } from '../../hooks/condition-store';\nimport { computeDateTime, type DateTimeProps } from './DateTime.shared';\n\n// ===== Component ===== //\n\nfunction GtInternalDateTime({\n _enableI18n,\n _locale,\n ...props\n}: DateTimeProps): string | null {\n return computeDateTime({\n ...props,\n _enableI18n: _enableI18n ?? useEnableI18n(),\n _locale: _locale ?? useLocale(),\n });\n}\n\nfunction DateTime(props: DateTimeProps): React.JSX.Element {\n return <GtInternalDateTime {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nGtInternalDateTime._gtt = 'variable-datetime-automatic';\nDateTime._gtt = 'variable-datetime';\n\n// ===== Exports ===== //\n\nexport { GtInternalDateTime, DateTime };\n"],"mappings":"+KAKA,SAAS,EAAmB,CAC1B,cACA,UACA,GAAG,GAC4B,CAC/B,OAAO,EAAgB,CACrB,GAAG,EACH,YAAa,GAAe,GAAe,CAC3C,QAAS,GAAW,GAAW,CAChC,CAAC,CAGJ,SAAS,EAAS,EAAyC,CACzD,OAAO,EAAC,EAAD,CAAoB,GAAI,EAAS,CAAA,CAI1C,EAAmB,KAAO,8BAC1B,EAAS,KAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./DateTime.shared.cjs`);let t=require(`react/jsx-runtime`);function n(t){return e.computeDateTime(t)}function r(e){return(0,t.jsx)(n,{...e})}r._gtt=`variable-datetime`,n._gtt=`variable-datetime-automatic`,exports.RscDateTime=r,exports.RscGtInternalDateTime=n;
|
|
2
|
+
//# sourceMappingURL=DateTime.rsc.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTime.rsc.cjs","names":["computeDateTime"],"sources":["../../../src/components/variables/DateTime.rsc.tsx"],"sourcesContent":["import { computeDateTime, type ResolvedDateTimeProps } from './DateTime.shared';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nfunction RscGtInternalDateTime(props: ResolvedDateTimeProps): string | null {\n return computeDateTime(props);\n}\n\nfunction RscDateTime(props: ResolvedDateTimeProps): React.JSX.Element {\n return <RscGtInternalDateTime {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscDateTime._gtt = 'variable-datetime';\nRscGtInternalDateTime._gtt = 'variable-datetime-automatic';\n\n// ===== Exports ===== //\n\nexport { RscDateTime, RscGtInternalDateTime };\n"],"mappings":"4HAMA,SAAS,EAAsB,EAA6C,CAC1E,OAAOA,EAAAA,gBAAgB,EAAM,CAG/B,SAAS,EAAY,EAAiD,CACpE,OAAO,EAAA,EAAA,KAAC,EAAD,CAAuB,GAAI,EAAS,CAAA,CAI7C,EAAY,KAAO,oBACnB,EAAsB,KAAO"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ResolvedDateTimeProps } from "./DateTime.shared.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/variables/DateTime.rsc.d.ts
|
|
4
|
+
declare function RscGtInternalDateTime(props: ResolvedDateTimeProps): string | null;
|
|
5
|
+
declare namespace RscGtInternalDateTime {
|
|
6
|
+
var _gtt: string;
|
|
7
|
+
}
|
|
8
|
+
declare function RscDateTime(props: ResolvedDateTimeProps): React.JSX.Element;
|
|
9
|
+
declare namespace RscDateTime {
|
|
10
|
+
var _gtt: string;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { RscDateTime, RscGtInternalDateTime };
|
|
14
|
+
//# sourceMappingURL=DateTime.rsc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTime.rsc.d.ts","names":[],"sources":["../../../src/components/variables/DateTime.rsc.tsx"],"mappings":";;;iBAMS,qBAAA,CAAsB,KAAA,EAAO,qBAAA;AAAA,kBAA7B,qBAAA;EAAA,IAAqB,IAAA;AAAA;AAAA,iBAIrB,WAAA,CAAY,KAAA,EAAO,qBAAA,GAAwB,KAAA,CAAM,GAAA,CAAI,OAAA;AAAA,kBAArD,WAAA;EAAA,IAAW,IAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{computeDateTime as e}from"./DateTime.shared.mjs";import{jsx as t}from"react/jsx-runtime";function n(t){return e(t)}function r(e){return t(n,{...e})}r._gtt=`variable-datetime`,n._gtt=`variable-datetime-automatic`;export{r as RscDateTime,n as RscGtInternalDateTime};
|
|
2
|
+
//# sourceMappingURL=DateTime.rsc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTime.rsc.mjs","names":[],"sources":["../../../src/components/variables/DateTime.rsc.tsx"],"sourcesContent":["import { computeDateTime, type ResolvedDateTimeProps } from './DateTime.shared';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nfunction RscGtInternalDateTime(props: ResolvedDateTimeProps): string | null {\n return computeDateTime(props);\n}\n\nfunction RscDateTime(props: ResolvedDateTimeProps): React.JSX.Element {\n return <RscGtInternalDateTime {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscDateTime._gtt = 'variable-datetime';\nRscGtInternalDateTime._gtt = 'variable-datetime-automatic';\n\n// ===== Exports ===== //\n\nexport { RscDateTime, RscGtInternalDateTime };\n"],"mappings":"gGAMA,SAAS,EAAsB,EAA6C,CAC1E,OAAO,EAAgB,EAAM,CAG/B,SAAS,EAAY,EAAiD,CACpE,OAAO,EAAC,EAAD,CAAuB,GAAI,EAAS,CAAA,CAI7C,EAAY,KAAO,oBACnB,EAAsB,KAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../hooks/utils/getFormatLocales.cjs`);let t=require(`gt-i18n/internal`);function n({_enableI18n:n,_locale:r,children:i,options:a={},locales:o=[]}){let s=e.getFormatLocales({locale:r,enableI18n:n,localesProp:o}),c=(0,t.getI18nConfig)().getGTClass();return i==null?null:c.formatDateTime(i,{locales:s,...a}).replace(/[\u200F\u202B\u202E]/g,``)}exports.computeDateTime=n;
|
|
2
|
+
//# sourceMappingURL=DateTime.shared.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTime.shared.cjs","names":["getFormatLocales"],"sources":["../../../src/components/variables/DateTime.shared.ts"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure compute logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype DateTimeProps = {\n children: Date | null | undefined;\n locales?: string[];\n options?: Intl.DateTimeFormatOptions;\n name?: string;\n _locale?: string;\n _enableI18n?: boolean;\n};\n\ntype ResolvedDateTimeProps = DateTimeProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction computeDateTime({\n _enableI18n,\n _locale,\n children,\n options = {},\n locales: localesProp = [],\n}: ResolvedDateTimeProps): string | null {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n // TODO: theres a world in which we don't need the i18n cache, if user passes their own params\n const gt = getI18nConfig().getGTClass();\n if (children == null) return null;\n return gt\n .formatDateTime(children, { locales, ...options })\n .replace(/[\\u200F\\u202B\\u202E]/g, '');\n}\n\nexport { computeDateTime };\nexport type { DateTimeProps, ResolvedDateTimeProps };\n"],"mappings":"4IAqBA,SAAS,EAAgB,CACvB,cACA,UACA,WACA,UAAU,EAAE,CACZ,QAAS,EAAc,EAAE,EACc,CACvC,IAAM,EAAUA,EAAAA,iBAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CAEI,GAAA,EAAA,EAAA,gBAAoB,CAAC,YAAY,CAEvC,OADI,GAAY,KAAa,KACtB,EACJ,eAAe,EAAU,CAAE,UAAS,GAAG,EAAS,CAAC,CACjD,QAAQ,wBAAyB,GAAG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/components/variables/DateTime.shared.d.ts
|
|
2
|
+
type DateTimeProps = {
|
|
3
|
+
children: Date | null | undefined;
|
|
4
|
+
locales?: string[];
|
|
5
|
+
options?: Intl.DateTimeFormatOptions;
|
|
6
|
+
name?: string;
|
|
7
|
+
_locale?: string;
|
|
8
|
+
_enableI18n?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type ResolvedDateTimeProps = DateTimeProps & {
|
|
11
|
+
_locale: string;
|
|
12
|
+
_enableI18n: boolean;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { type DateTimeProps, type ResolvedDateTimeProps };
|
|
16
|
+
//# sourceMappingURL=DateTime.shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTime.shared.d.ts","names":[],"sources":["../../../src/components/variables/DateTime.shared.ts"],"mappings":";KAOK,aAAA;EACH,QAAA,EAAU,IAAA;EACV,OAAA;EACA,OAAA,GAAU,IAAA,CAAK,qBAAA;EACf,IAAA;EACA,OAAA;EACA,WAAA;AAAA;AAAA,KAGG,qBAAA,GAAwB,aAAA;EAC3B,OAAA;EACA,WAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{getFormatLocales as e}from"../../hooks/utils/getFormatLocales.mjs";import{getI18nConfig as t}from"gt-i18n/internal";function n({_enableI18n:n,_locale:r,children:i,options:a={},locales:o=[]}){let s=e({locale:r,enableI18n:n,localesProp:o}),c=t().getGTClass();return i==null?null:c.formatDateTime(i,{locales:s,...a}).replace(/[\u200F\u202B\u202E]/g,``)}export{n as computeDateTime};
|
|
2
|
+
//# sourceMappingURL=DateTime.shared.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateTime.shared.mjs","names":[],"sources":["../../../src/components/variables/DateTime.shared.ts"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure compute logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype DateTimeProps = {\n children: Date | null | undefined;\n locales?: string[];\n options?: Intl.DateTimeFormatOptions;\n name?: string;\n _locale?: string;\n _enableI18n?: boolean;\n};\n\ntype ResolvedDateTimeProps = DateTimeProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction computeDateTime({\n _enableI18n,\n _locale,\n children,\n options = {},\n locales: localesProp = [],\n}: ResolvedDateTimeProps): string | null {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n // TODO: theres a world in which we don't need the i18n cache, if user passes their own params\n const gt = getI18nConfig().getGTClass();\n if (children == null) return null;\n return gt\n .formatDateTime(children, { locales, ...options })\n .replace(/[\\u200F\\u202B\\u202E]/g, '');\n}\n\nexport { computeDateTime };\nexport type { DateTimeProps, ResolvedDateTimeProps };\n"],"mappings":"2HAqBA,SAAS,EAAgB,CACvB,cACA,UACA,WACA,UAAU,EAAE,CACZ,QAAS,EAAc,EAAE,EACc,CACvC,IAAM,EAAU,EAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CAEI,EAAK,GAAe,CAAC,YAAY,CAEvC,OADI,GAAY,KAAa,KACtB,EACJ,eAAe,EAAU,CAAE,UAAS,GAAG,EAAS,CAAC,CACjD,QAAQ,wBAAyB,GAAG"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../hooks/condition-store.cjs`),t=require(`./Num.shared.cjs`);let n=require(`react/jsx-runtime`);function r({_enableI18n:n,_locale:r,...i}){return t.computeNum({...i,_enableI18n:n??e.useEnableI18n(),_locale:r??e.useLocale()})}function i(e){return(0,n.jsx)(r,{...e})}r._gtt=`variable-number-automatic`,i._gtt=`variable-number`,exports.GtInternalNum=r,exports.Num=i;
|
|
2
|
+
//# sourceMappingURL=Num.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Num.cjs","names":["computeNum","useEnableI18n","useLocale"],"sources":["../../../src/components/variables/Num.tsx"],"sourcesContent":["import { useEnableI18n, useLocale } from '../../hooks/condition-store';\nimport { computeNum, type NumProps } from './Num.shared';\n\n// ===== Component ===== //\n\nfunction GtInternalNum({\n _enableI18n,\n _locale,\n ...props\n}: NumProps): string | null {\n return computeNum({\n ...props,\n _enableI18n: _enableI18n ?? useEnableI18n(),\n _locale: _locale ?? useLocale(),\n });\n}\n\nfunction Num(props: NumProps): React.JSX.Element {\n return <GtInternalNum {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nGtInternalNum._gtt = 'variable-number-automatic';\nNum._gtt = 'variable-number';\n\n// ===== Exports ===== //\n\nexport { GtInternalNum, Num };\n"],"mappings":"oKAKA,SAAS,EAAc,CACrB,cACA,UACA,GAAG,GACuB,CAC1B,OAAOA,EAAAA,WAAW,CAChB,GAAG,EACH,YAAa,GAAeC,EAAAA,eAAe,CAC3C,QAAS,GAAWC,EAAAA,WAAW,CAChC,CAAC,CAGJ,SAAS,EAAI,EAAoC,CAC/C,OAAO,EAAA,EAAA,KAAC,EAAD,CAAe,GAAI,EAAS,CAAA,CAIrC,EAAc,KAAO,4BACrB,EAAI,KAAO"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NumProps } from "./Num.shared.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/variables/Num.d.ts
|
|
4
|
+
declare function GtInternalNum({
|
|
5
|
+
_enableI18n,
|
|
6
|
+
_locale,
|
|
7
|
+
...props
|
|
8
|
+
}: NumProps): string | null;
|
|
9
|
+
declare namespace GtInternalNum {
|
|
10
|
+
var _gtt: string;
|
|
11
|
+
}
|
|
12
|
+
declare function Num(props: NumProps): React.JSX.Element;
|
|
13
|
+
declare namespace Num {
|
|
14
|
+
var _gtt: string;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { GtInternalNum, Num };
|
|
18
|
+
//# sourceMappingURL=Num.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Num.d.ts","names":[],"sources":["../../../src/components/variables/Num.tsx"],"mappings":";;;iBAKS,aAAA,CAAA;EACP,WAAA;EACA,OAAA;EAAA,GACG;AAAA,GACF,QAAA;AAAA,kBAJM,aAAA;EAAA,IAAa,IAAA;AAAA;AAAA,iBAYb,GAAA,CAAI,KAAA,EAAO,QAAA,GAAW,KAAA,CAAM,GAAA,CAAI,OAAA;AAAA,kBAAhC,GAAA;EAAA,IAAG,IAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useEnableI18n as e,useLocale as t}from"../../hooks/condition-store.mjs";import{computeNum as n}from"./Num.shared.mjs";import{jsx as r}from"react/jsx-runtime";function i({_enableI18n:r,_locale:i,...a}){return n({...a,_enableI18n:r??e(),_locale:i??t()})}function a(e){return r(i,{...e})}i._gtt=`variable-number-automatic`,a._gtt=`variable-number`;export{i as GtInternalNum,a as Num};
|
|
2
|
+
//# sourceMappingURL=Num.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Num.mjs","names":[],"sources":["../../../src/components/variables/Num.tsx"],"sourcesContent":["import { useEnableI18n, useLocale } from '../../hooks/condition-store';\nimport { computeNum, type NumProps } from './Num.shared';\n\n// ===== Component ===== //\n\nfunction GtInternalNum({\n _enableI18n,\n _locale,\n ...props\n}: NumProps): string | null {\n return computeNum({\n ...props,\n _enableI18n: _enableI18n ?? useEnableI18n(),\n _locale: _locale ?? useLocale(),\n });\n}\n\nfunction Num(props: NumProps): React.JSX.Element {\n return <GtInternalNum {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nGtInternalNum._gtt = 'variable-number-automatic';\nNum._gtt = 'variable-number';\n\n// ===== Exports ===== //\n\nexport { GtInternalNum, Num };\n"],"mappings":"qKAKA,SAAS,EAAc,CACrB,cACA,UACA,GAAG,GACuB,CAC1B,OAAO,EAAW,CAChB,GAAG,EACH,YAAa,GAAe,GAAe,CAC3C,QAAS,GAAW,GAAW,CAChC,CAAC,CAGJ,SAAS,EAAI,EAAoC,CAC/C,OAAO,EAAC,EAAD,CAAe,GAAI,EAAS,CAAA,CAIrC,EAAc,KAAO,4BACrB,EAAI,KAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./Num.shared.cjs`);let t=require(`react/jsx-runtime`);function n(t){return e.computeNum(t)}function r(e){return(0,t.jsx)(n,{...e})}r._gtt=`variable-number`,n._gtt=`variable-number-automatic`,exports.RscGtInternalNum=n,exports.RscNum=r;
|
|
2
|
+
//# sourceMappingURL=Num.rsc.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Num.rsc.cjs","names":["computeNum"],"sources":["../../../src/components/variables/Num.rsc.tsx"],"sourcesContent":["import { computeNum, type ResolvedNumProps } from './Num.shared';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nfunction RscGtInternalNum(props: ResolvedNumProps): string | null {\n return computeNum(props);\n}\n\nfunction RscNum(props: ResolvedNumProps): React.JSX.Element {\n return <RscGtInternalNum {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscNum._gtt = 'variable-number';\nRscGtInternalNum._gtt = 'variable-number-automatic';\n\n// ===== Exports ===== //\n\nexport { RscGtInternalNum, RscNum };\n"],"mappings":"uHAMA,SAAS,EAAiB,EAAwC,CAChE,OAAOA,EAAAA,WAAW,EAAM,CAG1B,SAAS,EAAO,EAA4C,CAC1D,OAAO,EAAA,EAAA,KAAC,EAAD,CAAkB,GAAI,EAAS,CAAA,CAIxC,EAAO,KAAO,kBACd,EAAiB,KAAO"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ResolvedNumProps } from "./Num.shared.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/variables/Num.rsc.d.ts
|
|
4
|
+
declare function RscGtInternalNum(props: ResolvedNumProps): string | null;
|
|
5
|
+
declare namespace RscGtInternalNum {
|
|
6
|
+
var _gtt: string;
|
|
7
|
+
}
|
|
8
|
+
declare function RscNum(props: ResolvedNumProps): React.JSX.Element;
|
|
9
|
+
declare namespace RscNum {
|
|
10
|
+
var _gtt: string;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { RscGtInternalNum, RscNum };
|
|
14
|
+
//# sourceMappingURL=Num.rsc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Num.rsc.d.ts","names":[],"sources":["../../../src/components/variables/Num.rsc.tsx"],"mappings":";;;iBAMS,gBAAA,CAAiB,KAAA,EAAO,gBAAA;AAAA,kBAAxB,gBAAA;EAAA,IAAgB,IAAA;AAAA;AAAA,iBAIhB,MAAA,CAAO,KAAA,EAAO,gBAAA,GAAmB,KAAA,CAAM,GAAA,CAAI,OAAA;AAAA,kBAA3C,MAAA;EAAA,IAAM,IAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{computeNum as e}from"./Num.shared.mjs";import{jsx as t}from"react/jsx-runtime";function n(t){return e(t)}function r(e){return t(n,{...e})}r._gtt=`variable-number`,n._gtt=`variable-number-automatic`;export{n as RscGtInternalNum,r as RscNum};
|
|
2
|
+
//# sourceMappingURL=Num.rsc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Num.rsc.mjs","names":[],"sources":["../../../src/components/variables/Num.rsc.tsx"],"sourcesContent":["import { computeNum, type ResolvedNumProps } from './Num.shared';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nfunction RscGtInternalNum(props: ResolvedNumProps): string | null {\n return computeNum(props);\n}\n\nfunction RscNum(props: ResolvedNumProps): React.JSX.Element {\n return <RscGtInternalNum {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscNum._gtt = 'variable-number';\nRscGtInternalNum._gtt = 'variable-number-automatic';\n\n// ===== Exports ===== //\n\nexport { RscGtInternalNum, RscNum };\n"],"mappings":"sFAMA,SAAS,EAAiB,EAAwC,CAChE,OAAO,EAAW,EAAM,CAG1B,SAAS,EAAO,EAA4C,CAC1D,OAAO,EAAC,EAAD,CAAkB,GAAI,EAAS,CAAA,CAIxC,EAAO,KAAO,kBACd,EAAiB,KAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../hooks/utils/getFormatLocales.cjs`);let t=require(`gt-i18n/internal`);function n({_enableI18n:n,_locale:r,children:i,options:a={},locales:o=[]}){let s=e.getFormatLocales({locale:r,enableI18n:n,localesProp:o}),c=(0,t.getI18nConfig)().getGTClass();if(i==null)return null;let l=typeof i==`string`?parseFloat(i):i;return c.formatNum(l,{locales:s,...a})}exports.computeNum=n;
|
|
2
|
+
//# sourceMappingURL=Num.shared.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Num.shared.cjs","names":["getFormatLocales"],"sources":["../../../src/components/variables/Num.shared.ts"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure compute logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype NumProps = {\n children: number | string | null | undefined;\n options?: Intl.NumberFormatOptions;\n locales?: string[];\n name?: string;\n _locale?: string;\n _enableI18n?: boolean;\n};\n\ntype ResolvedNumProps = NumProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction computeNum({\n _enableI18n,\n _locale,\n children,\n options = {},\n locales: localesProp = [],\n}: ResolvedNumProps): string | null {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n const gt = getI18nConfig().getGTClass();\n if (children == null) return null;\n const parsedNumber =\n typeof children === 'string' ? parseFloat(children) : children;\n return gt.formatNum(parsedNumber, { locales, ...options });\n}\n\nexport { computeNum };\nexport type { NumProps, ResolvedNumProps };\n"],"mappings":"4IAqBA,SAAS,EAAW,CAClB,cACA,UACA,WACA,UAAU,EAAE,CACZ,QAAS,EAAc,EAAE,EACS,CAClC,IAAM,EAAUA,EAAAA,iBAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CACI,GAAA,EAAA,EAAA,gBAAoB,CAAC,YAAY,CACvC,GAAI,GAAY,KAAM,OAAO,KAC7B,IAAM,EACJ,OAAO,GAAa,SAAW,WAAW,EAAS,CAAG,EACxD,OAAO,EAAG,UAAU,EAAc,CAAE,UAAS,GAAG,EAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/components/variables/Num.shared.d.ts
|
|
2
|
+
type NumProps = {
|
|
3
|
+
children: number | string | null | undefined;
|
|
4
|
+
options?: Intl.NumberFormatOptions;
|
|
5
|
+
locales?: string[];
|
|
6
|
+
name?: string;
|
|
7
|
+
_locale?: string;
|
|
8
|
+
_enableI18n?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type ResolvedNumProps = NumProps & {
|
|
11
|
+
_locale: string;
|
|
12
|
+
_enableI18n: boolean;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { type NumProps, type ResolvedNumProps };
|
|
16
|
+
//# sourceMappingURL=Num.shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Num.shared.d.ts","names":[],"sources":["../../../src/components/variables/Num.shared.ts"],"mappings":";KAOK,QAAA;EACH,QAAA;EACA,OAAA,GAAU,IAAA,CAAK,mBAAA;EACf,OAAA;EACA,IAAA;EACA,OAAA;EACA,WAAA;AAAA;AAAA,KAGG,gBAAA,GAAmB,QAAA;EACtB,OAAA;EACA,WAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{getFormatLocales as e}from"../../hooks/utils/getFormatLocales.mjs";import{getI18nConfig as t}from"gt-i18n/internal";function n({_enableI18n:n,_locale:r,children:i,options:a={},locales:o=[]}){let s=e({locale:r,enableI18n:n,localesProp:o}),c=t().getGTClass();if(i==null)return null;let l=typeof i==`string`?parseFloat(i):i;return c.formatNum(l,{locales:s,...a})}export{n as computeNum};
|
|
2
|
+
//# sourceMappingURL=Num.shared.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Num.shared.mjs","names":[],"sources":["../../../src/components/variables/Num.shared.ts"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure compute logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype NumProps = {\n children: number | string | null | undefined;\n options?: Intl.NumberFormatOptions;\n locales?: string[];\n name?: string;\n _locale?: string;\n _enableI18n?: boolean;\n};\n\ntype ResolvedNumProps = NumProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction computeNum({\n _enableI18n,\n _locale,\n children,\n options = {},\n locales: localesProp = [],\n}: ResolvedNumProps): string | null {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n const gt = getI18nConfig().getGTClass();\n if (children == null) return null;\n const parsedNumber =\n typeof children === 'string' ? parseFloat(children) : children;\n return gt.formatNum(parsedNumber, { locales, ...options });\n}\n\nexport { computeNum };\nexport type { NumProps, ResolvedNumProps };\n"],"mappings":"2HAqBA,SAAS,EAAW,CAClB,cACA,UACA,WACA,UAAU,EAAE,CACZ,QAAS,EAAc,EAAE,EACS,CAClC,IAAM,EAAU,EAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CACI,EAAK,GAAe,CAAC,YAAY,CACvC,GAAI,GAAY,KAAM,OAAO,KAC7B,IAAM,EACJ,OAAO,GAAa,SAAW,WAAW,EAAS,CAAG,EACxD,OAAO,EAAG,UAAU,EAAc,CAAE,UAAS,GAAG,EAAS,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../hooks/condition-store.cjs`),t=require(`./RelativeTime.shared.cjs`);let n=require(`react/jsx-runtime`);function r({_enableI18n:n,_locale:r,...i}){return t.computeRelativeTime({...i,_enableI18n:n??e.useEnableI18n(),_locale:r??e.useLocale()})}function i(e){return(0,n.jsx)(r,{...e})}r._gtt=`variable-relative-time-automatic`,i._gtt=`variable-relative-time`,exports.GtInternalRelativeTime=r,exports.RelativeTime=i;
|
|
2
|
+
//# sourceMappingURL=RelativeTime.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelativeTime.cjs","names":["computeRelativeTime","useEnableI18n","useLocale"],"sources":["../../../src/components/variables/RelativeTime.tsx"],"sourcesContent":["import { useEnableI18n, useLocale } from '../../hooks/condition-store';\nimport {\n computeRelativeTime,\n type RelativeTimeProps,\n} from './RelativeTime.shared';\n\n// ===== Component ===== //\n\nfunction GtInternalRelativeTime({\n _enableI18n,\n _locale,\n ...props\n}: RelativeTimeProps): string | null {\n return computeRelativeTime({\n ...props,\n _enableI18n: _enableI18n ?? useEnableI18n(),\n _locale: _locale ?? useLocale(),\n });\n}\n\nfunction RelativeTime(props: RelativeTimeProps): React.JSX.Element {\n return <GtInternalRelativeTime {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nGtInternalRelativeTime._gtt = 'variable-relative-time-automatic';\nRelativeTime._gtt = 'variable-relative-time';\n\n// ===== Exports ===== //\n\nexport { GtInternalRelativeTime, RelativeTime };\n"],"mappings":"6KAQA,SAAS,EAAuB,CAC9B,cACA,UACA,GAAG,GACgC,CACnC,OAAOA,EAAAA,oBAAoB,CACzB,GAAG,EACH,YAAa,GAAeC,EAAAA,eAAe,CAC3C,QAAS,GAAWC,EAAAA,WAAW,CAChC,CAAC,CAGJ,SAAS,EAAa,EAA6C,CACjE,OAAO,EAAA,EAAA,KAAC,EAAD,CAAwB,GAAI,EAAS,CAAA,CAI9C,EAAuB,KAAO,mCAC9B,EAAa,KAAO"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RelativeTimeProps } from "./RelativeTime.shared.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/variables/RelativeTime.d.ts
|
|
4
|
+
declare function GtInternalRelativeTime({
|
|
5
|
+
_enableI18n,
|
|
6
|
+
_locale,
|
|
7
|
+
...props
|
|
8
|
+
}: RelativeTimeProps): string | null;
|
|
9
|
+
declare namespace GtInternalRelativeTime {
|
|
10
|
+
var _gtt: string;
|
|
11
|
+
}
|
|
12
|
+
declare function RelativeTime(props: RelativeTimeProps): React.JSX.Element;
|
|
13
|
+
declare namespace RelativeTime {
|
|
14
|
+
var _gtt: string;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { GtInternalRelativeTime, RelativeTime };
|
|
18
|
+
//# sourceMappingURL=RelativeTime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelativeTime.d.ts","names":[],"sources":["../../../src/components/variables/RelativeTime.tsx"],"mappings":";;;iBAQS,sBAAA,CAAA;EACP,WAAA;EACA,OAAA;EAAA,GACG;AAAA,GACF,iBAAA;AAAA,kBAJM,sBAAA;EAAA,IAAsB,IAAA;AAAA;AAAA,iBAYtB,YAAA,CAAa,KAAA,EAAO,iBAAA,GAAoB,KAAA,CAAM,GAAA,CAAI,OAAA;AAAA,kBAAlD,YAAA;EAAA,IAAY,IAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useEnableI18n as e,useLocale as t}from"../../hooks/condition-store.mjs";import{computeRelativeTime as n}from"./RelativeTime.shared.mjs";import{jsx as r}from"react/jsx-runtime";function i({_enableI18n:r,_locale:i,...a}){return n({...a,_enableI18n:r??e(),_locale:i??t()})}function a(e){return r(i,{...e})}i._gtt=`variable-relative-time-automatic`,a._gtt=`variable-relative-time`;export{i as GtInternalRelativeTime,a as RelativeTime};
|
|
2
|
+
//# sourceMappingURL=RelativeTime.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelativeTime.mjs","names":[],"sources":["../../../src/components/variables/RelativeTime.tsx"],"sourcesContent":["import { useEnableI18n, useLocale } from '../../hooks/condition-store';\nimport {\n computeRelativeTime,\n type RelativeTimeProps,\n} from './RelativeTime.shared';\n\n// ===== Component ===== //\n\nfunction GtInternalRelativeTime({\n _enableI18n,\n _locale,\n ...props\n}: RelativeTimeProps): string | null {\n return computeRelativeTime({\n ...props,\n _enableI18n: _enableI18n ?? useEnableI18n(),\n _locale: _locale ?? useLocale(),\n });\n}\n\nfunction RelativeTime(props: RelativeTimeProps): React.JSX.Element {\n return <GtInternalRelativeTime {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nGtInternalRelativeTime._gtt = 'variable-relative-time-automatic';\nRelativeTime._gtt = 'variable-relative-time';\n\n// ===== Exports ===== //\n\nexport { GtInternalRelativeTime, RelativeTime };\n"],"mappings":"uLAQA,SAAS,EAAuB,CAC9B,cACA,UACA,GAAG,GACgC,CACnC,OAAO,EAAoB,CACzB,GAAG,EACH,YAAa,GAAe,GAAe,CAC3C,QAAS,GAAW,GAAW,CAChC,CAAC,CAGJ,SAAS,EAAa,EAA6C,CACjE,OAAO,EAAC,EAAD,CAAwB,GAAI,EAAS,CAAA,CAI9C,EAAuB,KAAO,mCAC9B,EAAa,KAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`./RelativeTime.shared.cjs`);let t=require(`react/jsx-runtime`);function n(t){return e.computeRelativeTime(t)}function r(e){return(0,t.jsx)(n,{...e})}r._gtt=`variable-relative-time`,n._gtt=`variable-relative-time-automatic`,exports.RscGtInternalRelativeTime=n,exports.RscRelativeTime=r;
|
|
2
|
+
//# sourceMappingURL=RelativeTime.rsc.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelativeTime.rsc.cjs","names":["computeRelativeTime"],"sources":["../../../src/components/variables/RelativeTime.rsc.tsx"],"sourcesContent":["import {\n computeRelativeTime,\n type ResolvedRelativeTimeProps,\n} from './RelativeTime.shared';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nfunction RscGtInternalRelativeTime(\n props: ResolvedRelativeTimeProps\n): string | null {\n return computeRelativeTime(props);\n}\n\nfunction RscRelativeTime(props: ResolvedRelativeTimeProps): React.JSX.Element {\n return <RscGtInternalRelativeTime {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscRelativeTime._gtt = 'variable-relative-time';\nRscGtInternalRelativeTime._gtt = 'variable-relative-time-automatic';\n\n// ===== Exports ===== //\n\nexport { RscGtInternalRelativeTime, RscRelativeTime };\n"],"mappings":"gIASA,SAAS,EACP,EACe,CACf,OAAOA,EAAAA,oBAAoB,EAAM,CAGnC,SAAS,EAAgB,EAAqD,CAC5E,OAAO,EAAA,EAAA,KAAC,EAAD,CAA2B,GAAI,EAAS,CAAA,CAIjD,EAAgB,KAAO,yBACvB,EAA0B,KAAO"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ResolvedRelativeTimeProps } from "./RelativeTime.shared.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/variables/RelativeTime.rsc.d.ts
|
|
4
|
+
declare function RscGtInternalRelativeTime(props: ResolvedRelativeTimeProps): string | null;
|
|
5
|
+
declare namespace RscGtInternalRelativeTime {
|
|
6
|
+
var _gtt: string;
|
|
7
|
+
}
|
|
8
|
+
declare function RscRelativeTime(props: ResolvedRelativeTimeProps): React.JSX.Element;
|
|
9
|
+
declare namespace RscRelativeTime {
|
|
10
|
+
var _gtt: string;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { RscGtInternalRelativeTime, RscRelativeTime };
|
|
14
|
+
//# sourceMappingURL=RelativeTime.rsc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelativeTime.rsc.d.ts","names":[],"sources":["../../../src/components/variables/RelativeTime.rsc.tsx"],"mappings":";;;iBASS,yBAAA,CACP,KAAA,EAAO,yBAAA;AAAA,kBADA,yBAAA;EAAA,IAAyB,IAAA;AAAA;AAAA,iBAMzB,eAAA,CAAgB,KAAA,EAAO,yBAAA,GAA4B,KAAA,CAAM,GAAA,CAAI,OAAA;AAAA,kBAA7D,eAAA;EAAA,IAAe,IAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{computeRelativeTime as e}from"./RelativeTime.shared.mjs";import{jsx as t}from"react/jsx-runtime";function n(t){return e(t)}function r(e){return t(n,{...e})}r._gtt=`variable-relative-time`,n._gtt=`variable-relative-time-automatic`;export{n as RscGtInternalRelativeTime,r as RscRelativeTime};
|
|
2
|
+
//# sourceMappingURL=RelativeTime.rsc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelativeTime.rsc.mjs","names":[],"sources":["../../../src/components/variables/RelativeTime.rsc.tsx"],"sourcesContent":["import {\n computeRelativeTime,\n type ResolvedRelativeTimeProps,\n} from './RelativeTime.shared';\n\n// RSC implementation: request conditions are passed explicitly instead of\n// being read from hooks. This module must stay free of hook/context imports\n// so it can be exported from the components-rsc entrypoint.\n\nfunction RscGtInternalRelativeTime(\n props: ResolvedRelativeTimeProps\n): string | null {\n return computeRelativeTime(props);\n}\n\nfunction RscRelativeTime(props: ResolvedRelativeTimeProps): React.JSX.Element {\n return <RscGtInternalRelativeTime {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nRscRelativeTime._gtt = 'variable-relative-time';\nRscGtInternalRelativeTime._gtt = 'variable-relative-time-automatic';\n\n// ===== Exports ===== //\n\nexport { RscGtInternalRelativeTime, RscRelativeTime };\n"],"mappings":"wGASA,SAAS,EACP,EACe,CACf,OAAO,EAAoB,EAAM,CAGnC,SAAS,EAAgB,EAAqD,CAC5E,OAAO,EAAC,EAAD,CAA2B,GAAI,EAAS,CAAA,CAIjD,EAAgB,KAAO,yBACvB,EAA0B,KAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require(`../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../hooks/utils/getFormatLocales.cjs`);let t=require(`gt-i18n/internal`);function n({_enableI18n:n,_locale:r,date:i,children:a,value:o,unit:s,baseDate:c,locales:l=[],options:u={}}){let d=e.getFormatLocales({locale:r,enableI18n:n,localesProp:l}),f=(0,t.getI18nConfig)().getGTClass(),p=i??a;return process.env.NODE_ENV===`development`&&o!==void 0&&!s&&console.warn("<RelativeTime>: `value` was provided without `unit`. The `value` prop will be ignored."),o!==void 0&&s?f.formatRelativeTime(o,s,{locales:d,numeric:u.numeric,style:u.style,localeMatcher:u.localeMatcher}):p==null?null:f.formatRelativeTimeFromDate(p,{locales:d,baseDate:c??new Date,numeric:u.numeric,style:u.style,localeMatcher:u.localeMatcher})}exports.computeRelativeTime=n;
|
|
2
|
+
//# sourceMappingURL=RelativeTime.shared.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelativeTime.shared.cjs","names":["getFormatLocales"],"sources":["../../../src/components/variables/RelativeTime.shared.ts"],"sourcesContent":["import { getI18nConfig } from 'gt-i18n/internal';\nimport { getFormatLocales } from '../../hooks/utils/getFormatLocales';\n\n// Pure compute logic shared by the hook-based and RSC implementations. This\n// module must stay free of hook/context imports so it can be reached from the\n// components-rsc entrypoint.\n\ntype RelativeTimeProps = {\n date?: Date | null | undefined;\n children?: Date | null | undefined;\n name?: string;\n value?: number;\n unit?: Intl.RelativeTimeFormatUnit;\n baseDate?: Date;\n locales?: string[];\n options?: Intl.RelativeTimeFormatOptions;\n _locale?: string;\n _enableI18n?: boolean;\n};\n\ntype ResolvedRelativeTimeProps = RelativeTimeProps & {\n _locale: string;\n _enableI18n: boolean;\n};\n\nfunction computeRelativeTime({\n _enableI18n,\n _locale,\n date,\n children,\n value,\n unit,\n baseDate,\n locales: localesProp = [],\n options = {},\n}: ResolvedRelativeTimeProps): string | null {\n const locales = getFormatLocales({\n locale: _locale,\n enableI18n: _enableI18n,\n localesProp,\n });\n const gt = getI18nConfig().getGTClass();\n const resolvedDate = date ?? children;\n\n if (process.env.NODE_ENV === 'development' && value !== undefined && !unit) {\n // eslint-disable-next-line no-console\n console.warn(\n '<RelativeTime>: `value` was provided without `unit`. The `value` prop will be ignored.'\n );\n }\n\n if (value !== undefined && unit) {\n return gt.formatRelativeTime(value, unit, {\n locales,\n numeric: options.numeric,\n style: options.style,\n localeMatcher: options.localeMatcher,\n });\n }\n\n if (resolvedDate != null) {\n return gt.formatRelativeTimeFromDate(resolvedDate, {\n locales,\n baseDate: baseDate ?? new Date(),\n numeric: options.numeric,\n style: options.style,\n localeMatcher: options.localeMatcher,\n });\n }\n\n return null;\n}\n\nexport { computeRelativeTime };\nexport type { RelativeTimeProps, ResolvedRelativeTimeProps };\n"],"mappings":"4IAyBA,SAAS,EAAoB,CAC3B,cACA,UACA,OACA,WACA,QACA,OACA,WACA,QAAS,EAAc,EAAE,CACzB,UAAU,EAAE,EAC+B,CAC3C,IAAM,EAAUA,EAAAA,iBAAiB,CAC/B,OAAQ,EACR,WAAY,EACZ,cACD,CAAC,CACI,GAAA,EAAA,EAAA,gBAAoB,CAAC,YAAY,CACjC,EAAe,GAAQ,EA4B7B,OA1BI,QAAQ,IAAI,WAAa,eAAiB,IAAU,IAAA,IAAa,CAAC,GAEpE,QAAQ,KACN,yFACD,CAGC,IAAU,IAAA,IAAa,EAClB,EAAG,mBAAmB,EAAO,EAAM,CACxC,UACA,QAAS,EAAQ,QACjB,MAAO,EAAQ,MACf,cAAe,EAAQ,cACxB,CAAC,CAGA,GAAgB,KAUb,KATE,EAAG,2BAA2B,EAAc,CACjD,UACA,SAAU,GAAY,IAAI,KAC1B,QAAS,EAAQ,QACjB,MAAO,EAAQ,MACf,cAAe,EAAQ,cACxB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/components/variables/RelativeTime.shared.d.ts
|
|
2
|
+
type RelativeTimeProps = {
|
|
3
|
+
date?: Date | null | undefined;
|
|
4
|
+
children?: Date | null | undefined;
|
|
5
|
+
name?: string;
|
|
6
|
+
value?: number;
|
|
7
|
+
unit?: Intl.RelativeTimeFormatUnit;
|
|
8
|
+
baseDate?: Date;
|
|
9
|
+
locales?: string[];
|
|
10
|
+
options?: Intl.RelativeTimeFormatOptions;
|
|
11
|
+
_locale?: string;
|
|
12
|
+
_enableI18n?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type ResolvedRelativeTimeProps = RelativeTimeProps & {
|
|
15
|
+
_locale: string;
|
|
16
|
+
_enableI18n: boolean;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { type RelativeTimeProps, type ResolvedRelativeTimeProps };
|
|
20
|
+
//# sourceMappingURL=RelativeTime.shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelativeTime.shared.d.ts","names":[],"sources":["../../../src/components/variables/RelativeTime.shared.ts"],"mappings":";KAOK,iBAAA;EACH,IAAA,GAAO,IAAA;EACP,QAAA,GAAW,IAAA;EACX,IAAA;EACA,KAAA;EACA,IAAA,GAAO,IAAA,CAAK,sBAAA;EACZ,QAAA,GAAW,IAAA;EACX,OAAA;EACA,OAAA,GAAU,IAAA,CAAK,yBAAA;EACf,OAAA;EACA,WAAA;AAAA;AAAA,KAGG,yBAAA,GAA4B,iBAAA;EAC/B,OAAA;EACA,WAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{getFormatLocales as e}from"../../hooks/utils/getFormatLocales.mjs";import{getI18nConfig as t}from"gt-i18n/internal";function n({_enableI18n:n,_locale:r,date:i,children:a,value:o,unit:s,baseDate:c,locales:l=[],options:u={}}){let d=e({locale:r,enableI18n:n,localesProp:l}),f=t().getGTClass(),p=i??a;return process.env.NODE_ENV===`development`&&o!==void 0&&!s&&console.warn("<RelativeTime>: `value` was provided without `unit`. The `value` prop will be ignored."),o!==void 0&&s?f.formatRelativeTime(o,s,{locales:d,numeric:u.numeric,style:u.style,localeMatcher:u.localeMatcher}):p==null?null:f.formatRelativeTimeFromDate(p,{locales:d,baseDate:c??new Date,numeric:u.numeric,style:u.style,localeMatcher:u.localeMatcher})}export{n as computeRelativeTime};
|
|
2
|
+
//# sourceMappingURL=RelativeTime.shared.mjs.map
|