@intlayer/core 8.4.0-canary.0 → 8.4.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/dist/cjs/{_virtual/_rolldown/runtime.cjs → chunk-Bmb41Sf3.cjs} +1 -1
- package/dist/cjs/deepTransformPlugins/getFilterMissingTranslationsContent.cjs +1 -1
- package/dist/cjs/deepTransformPlugins/getFilterMissingTranslationsContent.cjs.map +1 -1
- package/dist/cjs/deepTransformPlugins/getFilterTranslationsOnlyContent.cjs +1 -1
- package/dist/cjs/deepTransformPlugins/getFilterTranslationsOnlyContent.cjs.map +1 -1
- package/dist/cjs/deepTransformPlugins/getFilteredLocalesContent.cjs +1 -1
- package/dist/cjs/deepTransformPlugins/getFilteredLocalesContent.cjs.map +1 -1
- package/dist/cjs/deepTransformPlugins/getLocalizedContent.cjs +1 -1
- package/dist/cjs/deepTransformPlugins/getLocalizedContent.cjs.map +1 -1
- package/dist/cjs/deepTransformPlugins/getMissingLocalesContent.cjs +1 -1
- package/dist/cjs/deepTransformPlugins/getMissingLocalesContent.cjs.map +1 -1
- package/dist/cjs/deepTransformPlugins/getSplittedContent.cjs +1 -1
- package/dist/cjs/deepTransformPlugins/getSplittedContent.cjs.map +1 -1
- package/dist/cjs/deepTransformPlugins/insertContentInDictionary.cjs +1 -1
- package/dist/cjs/deepTransformPlugins/insertContentInDictionary.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/editDictionaryByKeyPath.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/editDictionaryByKeyPath.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getDefaultNode.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/getDefaultNode.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getEmptyNode.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/getEmptyNode.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getNodeChildren.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/getNodeChildren.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getNodeType.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/getNodeType.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/mergeDictionaries.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/mergeDictionaries.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/orderDictionaries.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/orderDictionaries.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/removeContentNodeByKeyPath.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/removeContentNodeByKeyPath.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/renameContentNodeByKeyPath.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/renameContentNodeByKeyPath.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/updateNodeChildren.cjs +1 -1
- package/dist/cjs/dictionaryManipulator/updateNodeChildren.cjs.map +1 -1
- package/dist/cjs/formatters/compact.cjs +1 -1
- package/dist/cjs/formatters/compact.cjs.map +1 -1
- package/dist/cjs/formatters/currency.cjs +1 -1
- package/dist/cjs/formatters/currency.cjs.map +1 -1
- package/dist/cjs/formatters/date.cjs +1 -1
- package/dist/cjs/formatters/date.cjs.map +1 -1
- package/dist/cjs/formatters/list.cjs +1 -1
- package/dist/cjs/formatters/list.cjs.map +1 -1
- package/dist/cjs/formatters/number.cjs +1 -1
- package/dist/cjs/formatters/number.cjs.map +1 -1
- package/dist/cjs/formatters/percentage.cjs +1 -1
- package/dist/cjs/formatters/percentage.cjs.map +1 -1
- package/dist/cjs/formatters/relativeTime.cjs +1 -1
- package/dist/cjs/formatters/relativeTime.cjs.map +1 -1
- package/dist/cjs/formatters/units.cjs +1 -1
- package/dist/cjs/formatters/units.cjs.map +1 -1
- package/dist/cjs/getContent-DrqM8pqO.cjs +2 -0
- package/dist/cjs/getContent-DrqM8pqO.cjs.map +1 -0
- package/dist/cjs/getStorageAttributes.cjs +1 -1
- package/dist/cjs/getStorageAttributes.cjs.map +1 -1
- package/dist/cjs/html-CZ1N-VL0.cjs +2 -0
- package/dist/cjs/html-CZ1N-VL0.cjs.map +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/interpreter/getContent/deepTransform.cjs +1 -1
- package/dist/cjs/interpreter/getContent/deepTransform.cjs.map +1 -1
- package/dist/cjs/interpreter/getContent/getContent.cjs +1 -2
- package/dist/cjs/interpreter/getContent/index.cjs +1 -1
- package/dist/cjs/interpreter/getContent/plugins.cjs +1 -2
- package/dist/cjs/interpreter/getDictionary.cjs +1 -2
- package/dist/cjs/interpreter/getIntlayer.cjs +1 -2
- package/dist/cjs/interpreter/getNesting.cjs +1 -2
- package/dist/cjs/interpreter/index.cjs +1 -1
- package/dist/cjs/localization/getBrowserLocale.cjs +1 -1
- package/dist/cjs/localization/getBrowserLocale.cjs.map +1 -1
- package/dist/cjs/localization/getHTMLTextDir.cjs +1 -1
- package/dist/cjs/localization/getHTMLTextDir.cjs.map +1 -1
- package/dist/cjs/localization/getLocale.cjs +1 -1
- package/dist/cjs/localization/getLocale.cjs.map +1 -1
- package/dist/cjs/localization/getLocaleFromPath.cjs +1 -1
- package/dist/cjs/localization/getLocaleFromPath.cjs.map +1 -1
- package/dist/cjs/localization/getLocalizedUrl.cjs +1 -1
- package/dist/cjs/localization/getLocalizedUrl.cjs.map +1 -1
- package/dist/cjs/localization/getMultilingualUrls.cjs +1 -1
- package/dist/cjs/localization/getMultilingualUrls.cjs.map +1 -1
- package/dist/cjs/localization/getPathWithoutLocale.cjs +1 -1
- package/dist/cjs/localization/getPathWithoutLocale.cjs.map +1 -1
- package/dist/cjs/localization/getPrefix.cjs +1 -1
- package/dist/cjs/localization/getPrefix.cjs.map +1 -1
- package/dist/cjs/localization/localeMapper.cjs +1 -1
- package/dist/cjs/localization/localeMapper.cjs.map +1 -1
- package/dist/cjs/localization/localeResolver.cjs +1 -1
- package/dist/cjs/localization/localeResolver.cjs.map +1 -1
- package/dist/cjs/localization/validatePrefix.cjs +1 -1
- package/dist/cjs/localization/validatePrefix.cjs.map +1 -1
- package/dist/cjs/messageFormat/ICU.cjs +1 -1
- package/dist/cjs/messageFormat/ICU.cjs.map +1 -1
- package/dist/cjs/messageFormat/i18next.cjs +1 -1
- package/dist/cjs/messageFormat/i18next.cjs.map +1 -1
- package/dist/cjs/messageFormat/vue-i18n.cjs +1 -1
- package/dist/cjs/messageFormat/vue-i18n.cjs.map +1 -1
- package/dist/cjs/transpiler/condition/condition.cjs +1 -1
- package/dist/cjs/transpiler/condition/condition.cjs.map +1 -1
- package/dist/cjs/transpiler/enumeration/enumeration.cjs +1 -1
- package/dist/cjs/transpiler/enumeration/enumeration.cjs.map +1 -1
- package/dist/cjs/transpiler/file/file.cjs +1 -1
- package/dist/cjs/transpiler/file/file.cjs.map +1 -1
- package/dist/cjs/transpiler/gender/gender.cjs +1 -1
- package/dist/cjs/transpiler/gender/gender.cjs.map +1 -1
- package/dist/cjs/transpiler/html/getHTMLCustomComponents.cjs +1 -2
- package/dist/cjs/transpiler/html/html.cjs +1 -2
- package/dist/cjs/transpiler/html/index.cjs +1 -1
- package/dist/cjs/transpiler/index.cjs +1 -1
- package/dist/cjs/transpiler/insertion/insertion.cjs +1 -1
- package/dist/cjs/transpiler/insertion/insertion.cjs.map +1 -1
- package/dist/cjs/transpiler/markdown/markdown.cjs +1 -1
- package/dist/cjs/transpiler/markdown/markdown.cjs.map +1 -1
- package/dist/cjs/transpiler/nesting/nesting.cjs +1 -1
- package/dist/cjs/transpiler/nesting/nesting.cjs.map +1 -1
- package/dist/cjs/transpiler/translation/translation.cjs +1 -1
- package/dist/cjs/transpiler/translation/translation.cjs.map +1 -1
- package/dist/cjs/utils/intl.cjs +1 -1
- package/dist/cjs/utils/intl.cjs.map +1 -1
- package/dist/cjs/utils/localeStorage.cjs +1 -1
- package/dist/cjs/utils/localeStorage.cjs.map +1 -1
- package/dist/esm/deepTransformPlugins/getLocalizedContent.mjs +1 -1
- package/dist/esm/deepTransformPlugins/getLocalizedContent.mjs.map +1 -1
- package/dist/esm/formatters/list.mjs.map +1 -1
- package/dist/esm/getContent-DKqtIZGL.mjs +2 -0
- package/dist/esm/getContent-DKqtIZGL.mjs.map +1 -0
- package/dist/esm/html-3bo80xzx.mjs +2 -0
- package/dist/esm/html-3bo80xzx.mjs.map +1 -0
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/interpreter/getContent/getContent.mjs +1 -2
- package/dist/esm/interpreter/getContent/index.mjs +1 -1
- package/dist/esm/interpreter/getContent/plugins.mjs +1 -2
- package/dist/esm/interpreter/getDictionary.mjs +1 -2
- package/dist/esm/interpreter/getIntlayer.mjs +1 -2
- package/dist/esm/interpreter/getNesting.mjs +1 -2
- package/dist/esm/interpreter/index.mjs +1 -1
- package/dist/esm/localization/getBrowserLocale.mjs +1 -1
- package/dist/esm/localization/getBrowserLocale.mjs.map +1 -1
- package/dist/esm/localization/getHTMLTextDir.mjs +1 -1
- package/dist/esm/localization/getHTMLTextDir.mjs.map +1 -1
- package/dist/esm/localization/localeMapper.mjs.map +1 -1
- package/dist/esm/messageFormat/ICU.mjs +1 -1
- package/dist/esm/messageFormat/ICU.mjs.map +1 -1
- package/dist/esm/messageFormat/i18next.mjs +1 -1
- package/dist/esm/messageFormat/i18next.mjs.map +1 -1
- package/dist/esm/transpiler/html/getHTMLCustomComponents.mjs +1 -2
- package/dist/esm/transpiler/html/html.mjs +1 -2
- package/dist/esm/transpiler/html/index.mjs +1 -1
- package/dist/esm/transpiler/index.mjs +1 -1
- package/dist/esm/transpiler/markdown/markdown.mjs +1 -1
- package/dist/esm/transpiler/markdown/markdown.mjs.map +1 -1
- package/dist/esm/utils/intl.mjs +1 -1
- package/dist/esm/utils/intl.mjs.map +1 -1
- package/dist/types/ICU-tA3ZHN5U.d.ts +11 -0
- package/dist/types/ICU-tA3ZHN5U.d.ts.map +1 -0
- package/dist/types/checkIsURLAbsolute-CTf3JFU6.d.ts +5 -0
- package/dist/types/checkIsURLAbsolute-CTf3JFU6.d.ts.map +1 -0
- package/dist/types/compact-IHXcM4pT.d.ts +20 -0
- package/dist/types/compact-IHXcM4pT.d.ts.map +1 -0
- package/dist/types/compiler-DFiAsUdH.d.ts +9 -0
- package/dist/types/compiler-DFiAsUdH.d.ts.map +1 -0
- package/dist/types/condition-BDUtoh_1.d.ts +28 -0
- package/dist/types/condition-BDUtoh_1.d.ts.map +1 -0
- package/dist/types/constants-CI_D82B1.d.ts +177 -0
- package/dist/types/constants-CI_D82B1.d.ts.map +1 -0
- package/dist/types/currency-PbMCnHep.d.ts +20 -0
- package/dist/types/currency-PbMCnHep.d.ts.map +1 -0
- package/dist/types/date-C-PI8KqU.d.ts +20 -0
- package/dist/types/date-C-PI8KqU.d.ts.map +1 -0
- package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +2 -50
- package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +2 -42
- package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +2 -34
- package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts +2 -18
- package/dist/types/deepTransformPlugins/getMaskContent.d.ts +2 -10
- package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts +2 -19
- package/dist/types/deepTransformPlugins/getMultilingualDictionary.d.ts +2 -32
- package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts +2 -8
- package/dist/types/deepTransformPlugins/getSplittedContent.d.ts +2 -43
- package/dist/types/deepTransformPlugins/index.d.ts +10 -10
- package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts +2 -25
- package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts +2 -8
- package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts +2 -9
- package/dist/types/dictionaryManipulator/getDefaultNode.d.ts +2 -9
- package/dist/types/dictionaryManipulator/getEmptyNode.d.ts +2 -7
- package/dist/types/dictionaryManipulator/getNodeChildren.d.ts +2 -7
- package/dist/types/dictionaryManipulator/getNodeType.d.ts +2 -8
- package/dist/types/dictionaryManipulator/index.d.ts +12 -12
- package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts +2 -7
- package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts +2 -9
- package/dist/types/dictionaryManipulator/orderDictionaries.d.ts +2 -15
- package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts +2 -8
- package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts +2 -8
- package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts +2 -7
- package/dist/types/editDictionaryByKeyPath-BYIHcsyf.d.ts +8 -0
- package/dist/types/editDictionaryByKeyPath-BYIHcsyf.d.ts.map +1 -0
- package/dist/types/enumeration-CtuvB5Zz.d.ts +40 -0
- package/dist/types/enumeration-CtuvB5Zz.d.ts.map +1 -0
- package/dist/types/file-C3q8xvQb.d.ts +28 -0
- package/dist/types/file-C3q8xvQb.d.ts.map +1 -0
- package/dist/types/formatters/compact.d.ts +2 -20
- package/dist/types/formatters/currency.d.ts +2 -20
- package/dist/types/formatters/date.d.ts +2 -20
- package/dist/types/formatters/index.d.ts +10 -10
- package/dist/types/formatters/list.d.ts +2 -24
- package/dist/types/formatters/number.d.ts +2 -16
- package/dist/types/formatters/percentage.d.ts +2 -16
- package/dist/types/formatters/relativeTime.d.ts +2 -11
- package/dist/types/formatters/units.d.ts +2 -16
- package/dist/types/gender-Dd39Ijmf.d.ts +29 -0
- package/dist/types/gender-Dd39Ijmf.d.ts.map +1 -0
- package/dist/types/getBrowserLocale-RD_Mwv1t.d.ts +35 -0
- package/dist/types/getBrowserLocale-RD_Mwv1t.d.ts.map +1 -0
- package/dist/types/getContentNodeByKeyPath-B0Tdi5mj.d.ts +9 -0
- package/dist/types/getContentNodeByKeyPath-B0Tdi5mj.d.ts.map +1 -0
- package/dist/types/getCookie-DPOvVv_h.d.ts +11 -0
- package/dist/types/getCookie-DPOvVv_h.d.ts.map +1 -0
- package/dist/types/getDefaultNode-DQNsje2D.d.ts +9 -0
- package/dist/types/getDefaultNode-DQNsje2D.d.ts.map +1 -0
- package/dist/types/getEmptyNode-DW27TTBj.d.ts +7 -0
- package/dist/types/getEmptyNode-DW27TTBj.d.ts.map +1 -0
- package/dist/types/getFilterMissingTranslationsContent-CDNQqoy1.d.ts +50 -0
- package/dist/types/getFilterMissingTranslationsContent-CDNQqoy1.d.ts.map +1 -0
- package/dist/types/getFilterTranslationsOnlyContent-D2YgBkHn.d.ts +42 -0
- package/dist/types/getFilterTranslationsOnlyContent-D2YgBkHn.d.ts.map +1 -0
- package/dist/types/getFilteredLocalesContent-D0GP-uEg.d.ts +34 -0
- package/dist/types/getFilteredLocalesContent-D0GP-uEg.d.ts.map +1 -0
- package/dist/types/getHTML-CP6OXtdo.d.ts +32 -0
- package/dist/types/getHTML-CP6OXtdo.d.ts.map +1 -0
- package/dist/types/getHTMLTextDir-4Zh8J3x7.d.ts +21 -0
- package/dist/types/getHTMLTextDir-4Zh8J3x7.d.ts.map +1 -0
- package/dist/types/getInsertionValues-Cu9IdbuE.d.ts +5 -0
- package/dist/types/getInsertionValues-Cu9IdbuE.d.ts.map +1 -0
- package/dist/types/getLocale-B9dECUM_.d.ts +11 -0
- package/dist/types/getLocale-B9dECUM_.d.ts.map +1 -0
- package/dist/types/getLocaleFromPath-621W32QA.d.ts +26 -0
- package/dist/types/getLocaleFromPath-621W32QA.d.ts.map +1 -0
- package/dist/types/getLocaleLang-Bcan1gS4.d.ts +20 -0
- package/dist/types/getLocaleLang-Bcan1gS4.d.ts.map +1 -0
- package/dist/types/getLocaleName-CfRAD9Hc.d.ts +7 -0
- package/dist/types/getLocaleName-CfRAD9Hc.d.ts.map +1 -0
- package/dist/types/getLocalizedContent-DOncZd-0.d.ts +18 -0
- package/dist/types/getLocalizedContent-DOncZd-0.d.ts.map +1 -0
- package/dist/types/getLocalizedUrl-BbqeA3-W.d.ts +49 -0
- package/dist/types/getLocalizedUrl-BbqeA3-W.d.ts.map +1 -0
- package/dist/types/getMarkdownMetadata-Bf1S1NQ0.d.ts +5 -0
- package/dist/types/getMarkdownMetadata-Bf1S1NQ0.d.ts.map +1 -0
- package/dist/types/getMaskContent-BwLFqp7v.d.ts +10 -0
- package/dist/types/getMaskContent-BwLFqp7v.d.ts.map +1 -0
- package/dist/types/getMissingLocalesContent-BYffYcdx.d.ts +19 -0
- package/dist/types/getMissingLocalesContent-BYffYcdx.d.ts.map +1 -0
- package/dist/types/getMultilingualDictionary-DO3i1MFs.d.ts +32 -0
- package/dist/types/getMultilingualDictionary-DO3i1MFs.d.ts.map +1 -0
- package/dist/types/getMultilingualUrls-CUxYYfA4.d.ts +47 -0
- package/dist/types/getMultilingualUrls-CUxYYfA4.d.ts.map +1 -0
- package/dist/types/getNodeChildren-OT7Liqke.d.ts +7 -0
- package/dist/types/getNodeChildren-OT7Liqke.d.ts.map +1 -0
- package/dist/types/getNodeType-Cp765I26.d.ts +8 -0
- package/dist/types/getNodeType-Cp765I26.d.ts.map +1 -0
- package/dist/types/getPathWithoutLocale-B_aIR7O0.d.ts +31 -0
- package/dist/types/getPathWithoutLocale-B_aIR7O0.d.ts.map +1 -0
- package/dist/types/getPrefix-X9XKkrZD.d.ts +68 -0
- package/dist/types/getPrefix-X9XKkrZD.d.ts.map +1 -0
- package/dist/types/getReplacedValuesContent-BvL25pdt.d.ts +8 -0
- package/dist/types/getReplacedValuesContent-BvL25pdt.d.ts.map +1 -0
- package/dist/types/getSplittedContent-YD4JDMfB.d.ts +43 -0
- package/dist/types/getSplittedContent-YD4JDMfB.d.ts.map +1 -0
- package/dist/types/getStorageAttributes-CIO2xWqQ.d.ts +29 -0
- package/dist/types/getStorageAttributes-CIO2xWqQ.d.ts.map +1 -0
- package/dist/types/getStorageAttributes.d.ts +2 -29
- package/dist/types/getTranslation-BG2Wg-af.d.ts +30 -0
- package/dist/types/getTranslation-BG2Wg-af.d.ts.map +1 -0
- package/dist/types/html-Dn6KrpJ3.d.ts +25 -0
- package/dist/types/html-Dn6KrpJ3.d.ts.map +1 -0
- package/dist/types/htmlTags-YxTtVUx6.d.ts +115 -0
- package/dist/types/htmlTags-YxTtVUx6.d.ts.map +1 -0
- package/dist/types/i18next-qY0AixrB.d.ts +9 -0
- package/dist/types/i18next-qY0AixrB.d.ts.map +1 -0
- package/dist/types/index-1CTsSKEn.d.ts +1 -0
- package/dist/types/index-B8xF2zGo.d.ts +1 -0
- package/dist/types/index-BcsOTSQF.d.ts +1 -0
- package/dist/types/index-BnEeKNKW.d.ts +322 -0
- package/dist/types/index-BnEeKNKW.d.ts.map +1 -0
- package/dist/types/index-Cf8zm5QQ.d.ts +1 -0
- package/dist/types/index-CfvILin8.d.ts +1 -0
- package/dist/types/index-DK_kKFOF.d.ts +1 -0
- package/dist/types/index-DeJa0xZp.d.ts +1 -0
- package/dist/types/index-Vlqtiwjx.d.ts +1 -0
- package/dist/types/index.d.ts +80 -88
- package/dist/types/insertContentInDictionary-DZ3UzG4K.d.ts +25 -0
- package/dist/types/insertContentInDictionary-DZ3UzG4K.d.ts.map +1 -0
- package/dist/types/insertion-M5fwK-29.d.ts +23 -0
- package/dist/types/insertion-M5fwK-29.d.ts.map +1 -0
- package/dist/types/interpreter/getCondition.d.ts +2 -22
- package/dist/types/interpreter/getContent/deepTransform.d.ts +2 -12
- package/dist/types/interpreter/getContent/getContent.d.ts +2 -16
- package/dist/types/interpreter/getContent/index.d.ts +1 -3
- package/dist/types/interpreter/getContent/plugins.d.ts +2 -151
- package/dist/types/interpreter/getDictionary.d.ts +2 -17
- package/dist/types/interpreter/getEnumeration.d.ts +2 -58
- package/dist/types/interpreter/getGender.d.ts +1 -1
- package/dist/types/interpreter/getGender.d.ts.map +1 -1
- package/dist/types/interpreter/getHTML.d.ts +2 -32
- package/dist/types/interpreter/getInsertion.d.ts +1 -1
- package/dist/types/interpreter/getInsertion.d.ts.map +1 -1
- package/dist/types/interpreter/getIntlayer.d.ts +2 -8
- package/dist/types/interpreter/getNesting.d.ts +2 -27
- package/dist/types/interpreter/getTranslation.d.ts +2 -30
- package/dist/types/interpreter/index.d.ts +4 -11
- package/dist/types/interpreter/splitAndJoinInsertion.d.ts +2 -25
- package/dist/types/intl-B2Ap8I5x.d.ts +33 -0
- package/dist/types/intl-B2Ap8I5x.d.ts.map +1 -0
- package/dist/types/isSameKeyPath-CkH8NdJh.d.ts +7 -0
- package/dist/types/isSameKeyPath-CkH8NdJh.d.ts.map +1 -0
- package/dist/types/isValidReactElement-BsoJ01oP.d.ts +12 -0
- package/dist/types/isValidReactElement-BsoJ01oP.d.ts.map +1 -0
- package/dist/types/list-BdjJM2Gx.d.ts +30 -0
- package/dist/types/list-BdjJM2Gx.d.ts.map +1 -0
- package/dist/types/localeDetector-BWNCQRiZ.d.ts +18 -0
- package/dist/types/localeDetector-BWNCQRiZ.d.ts.map +1 -0
- package/dist/types/localeMapper-DoAnasqf.d.ts +92 -0
- package/dist/types/localeMapper-DoAnasqf.d.ts.map +1 -0
- package/dist/types/localeResolver-bb7AWQNX.d.ts +12 -0
- package/dist/types/localeResolver-bb7AWQNX.d.ts.map +1 -0
- package/dist/types/localeStorage-CZHwY0u3.d.ts +108 -0
- package/dist/types/localeStorage-CZHwY0u3.d.ts.map +1 -0
- package/dist/types/localization/getBrowserLocale.d.ts +2 -35
- package/dist/types/localization/getHTMLTextDir.d.ts +2 -21
- package/dist/types/localization/getLocale.d.ts +2 -11
- package/dist/types/localization/getLocaleFromPath.d.ts +2 -26
- package/dist/types/localization/getLocaleLang.d.ts +2 -20
- package/dist/types/localization/getLocaleName.d.ts +2 -7
- package/dist/types/localization/getLocalizedUrl.d.ts +2 -49
- package/dist/types/localization/getMultilingualUrls.d.ts +2 -47
- package/dist/types/localization/getPathWithoutLocale.d.ts +2 -31
- package/dist/types/localization/getPrefix.d.ts +2 -68
- package/dist/types/localization/index.d.ts +16 -16
- package/dist/types/localization/localeDetector.d.ts +2 -18
- package/dist/types/localization/localeMapper.d.ts +2 -92
- package/dist/types/localization/localeResolver.d.ts +2 -12
- package/dist/types/localization/rewriteUtils.d.ts +2 -34
- package/dist/types/localization/validatePrefix.d.ts +2 -38
- package/dist/types/markdown/compiler.d.ts +2 -9
- package/dist/types/markdown/constants.d.ts +2 -177
- package/dist/types/markdown/index.d.ts +10 -10
- package/dist/types/markdown/parser.d.ts +2 -16
- package/dist/types/markdown/renderer.d.ts +2 -22
- package/dist/types/markdown/types.d.ts +2 -333
- package/dist/types/markdown/utils.d.ts +2 -140
- package/dist/types/markdown-MzfikrI1.d.ts +26 -0
- package/dist/types/markdown-MzfikrI1.d.ts.map +1 -0
- package/dist/types/mergeDictionaries-D6WUMQN5.d.ts +7 -0
- package/dist/types/mergeDictionaries-D6WUMQN5.d.ts.map +1 -0
- package/dist/types/messageFormat/ICU.d.ts +2 -11
- package/dist/types/messageFormat/i18next.d.ts +2 -9
- package/dist/types/messageFormat/index.d.ts +3 -3
- package/dist/types/messageFormat/vue-i18n.d.ts +2 -9
- package/dist/types/normalizeDictionary-coviIGTW.d.ts +9 -0
- package/dist/types/normalizeDictionary-coviIGTW.d.ts.map +1 -0
- package/dist/types/number-C8izkCmU.d.ts +16 -0
- package/dist/types/number-C8izkCmU.d.ts.map +1 -0
- package/dist/types/orderDictionaries-SSCMY6qG.d.ts +15 -0
- package/dist/types/orderDictionaries-SSCMY6qG.d.ts.map +1 -0
- package/dist/types/parseYaml-D5gxutvA.d.ts +5 -0
- package/dist/types/parseYaml-D5gxutvA.d.ts.map +1 -0
- package/dist/types/parser-BVwR6Tjw.d.ts +16 -0
- package/dist/types/parser-BVwR6Tjw.d.ts.map +1 -0
- package/dist/types/percentage-BqsvW0Zw.d.ts +16 -0
- package/dist/types/percentage-BqsvW0Zw.d.ts.map +1 -0
- package/dist/types/relativeTime-mJaYEq7H.d.ts +11 -0
- package/dist/types/relativeTime-mJaYEq7H.d.ts.map +1 -0
- package/dist/types/removeContentNodeByKeyPath-CotCOOsD.d.ts +8 -0
- package/dist/types/removeContentNodeByKeyPath-CotCOOsD.d.ts.map +1 -0
- package/dist/types/renameContentNodeByKeyPath-BuyH5gOr.d.ts +8 -0
- package/dist/types/renameContentNodeByKeyPath-BuyH5gOr.d.ts.map +1 -0
- package/dist/types/renderer-C06x2Orf.d.ts +22 -0
- package/dist/types/renderer-C06x2Orf.d.ts.map +1 -0
- package/dist/types/rewriteUtils-Bd82NiGR.d.ts +34 -0
- package/dist/types/rewriteUtils-Bd82NiGR.d.ts.map +1 -0
- package/dist/types/splitAndJoinInsertion-bkuLa7o2.d.ts +25 -0
- package/dist/types/splitAndJoinInsertion-bkuLa7o2.d.ts.map +1 -0
- package/dist/types/translation-CiC-Avxc.d.ts +33 -0
- package/dist/types/translation-CiC-Avxc.d.ts.map +1 -0
- package/dist/types/transpiler/condition/condition.d.ts +2 -28
- package/dist/types/transpiler/condition/index.d.ts +1 -1
- package/dist/types/transpiler/enumeration/enumeration.d.ts +2 -40
- package/dist/types/transpiler/enumeration/index.d.ts +1 -1
- package/dist/types/transpiler/file/file.d.ts +2 -28
- package/dist/types/transpiler/file/fileBrowser.d.ts +1 -1
- package/dist/types/transpiler/file/index.d.ts +1 -1
- package/dist/types/transpiler/gender/gender.d.ts +2 -29
- package/dist/types/transpiler/gender/index.d.ts +1 -1
- package/dist/types/transpiler/html/html.d.ts +2 -25
- package/dist/types/transpiler/html/htmlTags.d.ts +2 -115
- package/dist/types/transpiler/html/index.d.ts +3 -3
- package/dist/types/transpiler/html/validateHTML.d.ts +2 -21
- package/dist/types/transpiler/index.d.ts +15 -15
- package/dist/types/transpiler/insertion/getInsertionValues.d.ts +2 -5
- package/dist/types/transpiler/insertion/index.d.ts +2 -2
- package/dist/types/transpiler/insertion/insertion.d.ts +2 -23
- package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts +2 -5
- package/dist/types/transpiler/markdown/index.d.ts +4 -4
- package/dist/types/transpiler/markdown/markdown.d.ts +2 -26
- package/dist/types/transpiler/markdown/validateMarkdown.d.ts +3 -18
- package/dist/types/transpiler/nesting/index.d.ts +1 -1
- package/dist/types/transpiler/nesting/nesting.d.ts +2 -49
- package/dist/types/transpiler/translation/index.d.ts +1 -1
- package/dist/types/transpiler/translation/translation.d.ts +2 -33
- package/dist/types/types-C2Om0aEM.d.ts +333 -0
- package/dist/types/types-C2Om0aEM.d.ts.map +1 -0
- package/dist/types/units-CouGqa8j.d.ts +16 -0
- package/dist/types/units-CouGqa8j.d.ts.map +1 -0
- package/dist/types/updateNodeChildren-B5Tu1UBZ.d.ts +7 -0
- package/dist/types/updateNodeChildren-B5Tu1UBZ.d.ts.map +1 -0
- package/dist/types/utils/checkIsURLAbsolute.d.ts +2 -5
- package/dist/types/utils/getCookie.d.ts +2 -11
- package/dist/types/utils/index.d.ts +8 -8
- package/dist/types/utils/intl.d.ts +2 -33
- package/dist/types/utils/isSameKeyPath.d.ts +2 -7
- package/dist/types/utils/isValidReactElement.d.ts +2 -12
- package/dist/types/utils/localeStorage.d.ts +2 -108
- package/dist/types/utils/parseYaml.d.ts +2 -5
- package/dist/types/utils-Dcmgh_80.d.ts +140 -0
- package/dist/types/utils-Dcmgh_80.d.ts.map +1 -0
- package/dist/types/validateHTML-U7UKTtFd.d.ts +21 -0
- package/dist/types/validateHTML-U7UKTtFd.d.ts.map +1 -0
- package/dist/types/validateMarkdown-BUaTDDIu.d.ts +18 -0
- package/dist/types/validateMarkdown-BUaTDDIu.d.ts.map +1 -0
- package/dist/types/validatePrefix-Dtmg7QLq.d.ts +38 -0
- package/dist/types/validatePrefix-Dtmg7QLq.d.ts.map +1 -0
- package/dist/types/vue-i18n-JtUB7N_m.d.ts +9 -0
- package/dist/types/vue-i18n-JtUB7N_m.d.ts.map +1 -0
- package/package.json +6 -6
- package/dist/cjs/interpreter/getContent/getContent.cjs.map +0 -1
- package/dist/cjs/interpreter/getContent/plugins.cjs.map +0 -1
- package/dist/cjs/interpreter/getDictionary.cjs.map +0 -1
- package/dist/cjs/interpreter/getIntlayer.cjs.map +0 -1
- package/dist/cjs/interpreter/getNesting.cjs.map +0 -1
- package/dist/cjs/transpiler/html/getHTMLCustomComponents.cjs.map +0 -1
- package/dist/cjs/transpiler/html/html.cjs.map +0 -1
- package/dist/esm/interpreter/getContent/getContent.mjs.map +0 -1
- package/dist/esm/interpreter/getContent/plugins.mjs.map +0 -1
- package/dist/esm/interpreter/getDictionary.mjs.map +0 -1
- package/dist/esm/interpreter/getIntlayer.mjs.map +0 -1
- package/dist/esm/interpreter/getNesting.mjs.map +0 -1
- package/dist/esm/transpiler/html/getHTMLCustomComponents.mjs.map +0 -1
- package/dist/esm/transpiler/html/html.mjs.map +0 -1
- package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts.map +0 -1
- package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts.map +0 -1
- package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts.map +0 -1
- package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts.map +0 -1
- package/dist/types/deepTransformPlugins/getMaskContent.d.ts.map +0 -1
- package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts.map +0 -1
- package/dist/types/deepTransformPlugins/getMultilingualDictionary.d.ts.map +0 -1
- package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts.map +0 -1
- package/dist/types/deepTransformPlugins/getSplittedContent.d.ts.map +0 -1
- package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/getDefaultNode.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/getEmptyNode.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/getNodeChildren.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/getNodeType.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/orderDictionaries.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts.map +0 -1
- package/dist/types/formatters/compact.d.ts.map +0 -1
- package/dist/types/formatters/currency.d.ts.map +0 -1
- package/dist/types/formatters/date.d.ts.map +0 -1
- package/dist/types/formatters/list.d.ts.map +0 -1
- package/dist/types/formatters/number.d.ts.map +0 -1
- package/dist/types/formatters/percentage.d.ts.map +0 -1
- package/dist/types/formatters/relativeTime.d.ts.map +0 -1
- package/dist/types/formatters/units.d.ts.map +0 -1
- package/dist/types/getStorageAttributes.d.ts.map +0 -1
- package/dist/types/interpreter/getCondition.d.ts.map +0 -1
- package/dist/types/interpreter/getContent/deepTransform.d.ts.map +0 -1
- package/dist/types/interpreter/getContent/getContent.d.ts.map +0 -1
- package/dist/types/interpreter/getContent/plugins.d.ts.map +0 -1
- package/dist/types/interpreter/getDictionary.d.ts.map +0 -1
- package/dist/types/interpreter/getEnumeration.d.ts.map +0 -1
- package/dist/types/interpreter/getHTML.d.ts.map +0 -1
- package/dist/types/interpreter/getIntlayer.d.ts.map +0 -1
- package/dist/types/interpreter/getNesting.d.ts.map +0 -1
- package/dist/types/interpreter/getTranslation.d.ts.map +0 -1
- package/dist/types/interpreter/splitAndJoinInsertion.d.ts.map +0 -1
- package/dist/types/localization/getBrowserLocale.d.ts.map +0 -1
- package/dist/types/localization/getHTMLTextDir.d.ts.map +0 -1
- package/dist/types/localization/getLocale.d.ts.map +0 -1
- package/dist/types/localization/getLocaleFromPath.d.ts.map +0 -1
- package/dist/types/localization/getLocaleLang.d.ts.map +0 -1
- package/dist/types/localization/getLocaleName.d.ts.map +0 -1
- package/dist/types/localization/getLocalizedUrl.d.ts.map +0 -1
- package/dist/types/localization/getMultilingualUrls.d.ts.map +0 -1
- package/dist/types/localization/getPathWithoutLocale.d.ts.map +0 -1
- package/dist/types/localization/getPrefix.d.ts.map +0 -1
- package/dist/types/localization/localeDetector.d.ts.map +0 -1
- package/dist/types/localization/localeMapper.d.ts.map +0 -1
- package/dist/types/localization/localeResolver.d.ts.map +0 -1
- package/dist/types/localization/rewriteUtils.d.ts.map +0 -1
- package/dist/types/localization/validatePrefix.d.ts.map +0 -1
- package/dist/types/markdown/compiler.d.ts.map +0 -1
- package/dist/types/markdown/constants.d.ts.map +0 -1
- package/dist/types/markdown/parser.d.ts.map +0 -1
- package/dist/types/markdown/renderer.d.ts.map +0 -1
- package/dist/types/markdown/types.d.ts.map +0 -1
- package/dist/types/markdown/utils.d.ts.map +0 -1
- package/dist/types/messageFormat/ICU.d.ts.map +0 -1
- package/dist/types/messageFormat/i18next.d.ts.map +0 -1
- package/dist/types/messageFormat/vue-i18n.d.ts.map +0 -1
- package/dist/types/transpiler/condition/condition.d.ts.map +0 -1
- package/dist/types/transpiler/enumeration/enumeration.d.ts.map +0 -1
- package/dist/types/transpiler/file/file.d.ts.map +0 -1
- package/dist/types/transpiler/gender/gender.d.ts.map +0 -1
- package/dist/types/transpiler/html/html.d.ts.map +0 -1
- package/dist/types/transpiler/html/htmlTags.d.ts.map +0 -1
- package/dist/types/transpiler/html/validateHTML.d.ts.map +0 -1
- package/dist/types/transpiler/insertion/getInsertionValues.d.ts.map +0 -1
- package/dist/types/transpiler/insertion/insertion.d.ts.map +0 -1
- package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts.map +0 -1
- package/dist/types/transpiler/markdown/markdown.d.ts.map +0 -1
- package/dist/types/transpiler/markdown/validateMarkdown.d.ts.map +0 -1
- package/dist/types/transpiler/nesting/nesting.d.ts.map +0 -1
- package/dist/types/transpiler/translation/translation.d.ts.map +0 -1
- package/dist/types/utils/checkIsURLAbsolute.d.ts.map +0 -1
- package/dist/types/utils/getCookie.d.ts.map +0 -1
- package/dist/types/utils/intl.d.ts.map +0 -1
- package/dist/types/utils/isSameKeyPath.d.ts.map +0 -1
- package/dist/types/utils/isValidReactElement.d.ts.map +0 -1
- package/dist/types/utils/localeStorage.d.ts.map +0 -1
- package/dist/types/utils/parseYaml.d.ts.map +0 -1
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Component function that receives properly typed props
|
|
4
|
-
* Props include:
|
|
5
|
-
* - children?: any[] - Array of child elements (ReactNode[], VNode[], etc.)
|
|
6
|
-
* - [key: string]: any - Any HTML attributes (className, style, href, etc.)
|
|
7
|
-
*/
|
|
8
|
-
type Component = (props: {
|
|
9
|
-
children?: any[];
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}) => any;
|
|
12
|
-
/**
|
|
13
|
-
* Component object that delegates to another component
|
|
14
|
-
*/
|
|
15
|
-
type ComponentObject = {
|
|
16
|
-
tag: string;
|
|
17
|
-
props?: Record<string, any>;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Components map:
|
|
21
|
-
* - Function components receive typed props
|
|
22
|
-
* - String components delegate to another tag
|
|
23
|
-
* - Object components delegate with additional props
|
|
24
|
-
*/
|
|
25
|
-
type Components = Record<string, Component | string | ComponentObject>;
|
|
26
|
-
/**
|
|
27
|
-
* Interprets a string containing HTML-like tags and replaces them with provided components or strings.
|
|
28
|
-
*/
|
|
29
|
-
declare const getHTML: (content: string, values: Components) => any;
|
|
30
|
-
//#endregion
|
|
31
|
-
export { getHTML };
|
|
32
|
-
//# sourceMappingURL=getHTML.d.ts.map
|
|
1
|
+
import { t as getHTML } from "../getHTML-CP6OXtdo.js";
|
|
2
|
+
export { getHTML };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInsertion.d.ts","names":[],"sources":["../../../src/interpreter/getInsertion.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getInsertion.d.ts","names":[],"sources":["../../../src/interpreter/getInsertion.ts"],"mappings":";;;;;;;;;;;;;;;cAea,YAAA,GACX,OAAA,UACA,MAAA,UAAgB,gBAAA"}
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/interpreter/getIntlayer.d.ts
|
|
5
|
-
declare const getIntlayer: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(key: T, locale?: L, plugins?: Plugins[]) => DeepTransformContent<DictionaryRegistryContent<T>, IInterpreterPluginState, L>;
|
|
6
|
-
//#endregion
|
|
7
|
-
export { getIntlayer };
|
|
8
|
-
//# sourceMappingURL=getIntlayer.d.ts.map
|
|
1
|
+
import { t as getIntlayer } from "../index-BnEeKNKW.js";
|
|
2
|
+
export { getIntlayer };
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { GetSubPath } from "@intlayer/types/dictionary";
|
|
4
|
-
import { DictionaryKeys, DictionaryRegistryContent } from "@intlayer/types/module_augmentation";
|
|
5
|
-
|
|
6
|
-
//#region src/interpreter/getNesting.d.ts
|
|
7
|
-
type GetNestingResult<K extends DictionaryKeys, P = undefined, S = IInterpreterPluginState> = GetSubPath<DeepTransformContent<DictionaryRegistryContent<K>, S>, P>;
|
|
8
|
-
/**
|
|
9
|
-
* Extracts content from another dictionary by its key and an optional path.
|
|
10
|
-
*
|
|
11
|
-
* This allows for reusing content across different dictionaries.
|
|
12
|
-
*
|
|
13
|
-
* @param dictionaryKey - The key of the dictionary to nest.
|
|
14
|
-
* @param path - Optional dot-separated path to a specific field within the nested dictionary.
|
|
15
|
-
* @param props - Optional properties like locale and plugins.
|
|
16
|
-
* @returns The nested content.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const content = getNesting("common", "buttons.save");
|
|
21
|
-
* // 'Save'
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
declare const getNesting: <K extends DictionaryKeys, P>(dictionaryKey: K, path?: P extends ValidDotPathsFor<K> ? P : never, props?: NodeProps) => GetNestingResult<K, P>;
|
|
25
|
-
//#endregion
|
|
26
|
-
export { GetNestingResult, getNesting };
|
|
27
|
-
//# sourceMappingURL=getNesting.d.ts.map
|
|
1
|
+
import { A as GetNestingResult, j as getNesting } from "../index-BnEeKNKW.js";
|
|
2
|
+
export { GetNestingResult, getNesting };
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/interpreter/getTranslation.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Picks the appropriate content from a locale map based on the provided locale.
|
|
6
|
-
*
|
|
7
|
-
* It handles:
|
|
8
|
-
* 1. Exact locale match (e.g., 'en-US').
|
|
9
|
-
* 2. Generic locale fallback (e.g., 'en' if 'en-US' is not found).
|
|
10
|
-
* 3. Explicit fallback locale.
|
|
11
|
-
* 4. Deep merging of objects to ensure partial translations are complemented by fallbacks.
|
|
12
|
-
*
|
|
13
|
-
* @param languageContent - A map of locales to content.
|
|
14
|
-
* @param locale - The target locale to retrieve.
|
|
15
|
-
* @param fallback - Optional fallback locale if the target is not found.
|
|
16
|
-
* @returns The translated content.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const content = getTranslation({
|
|
21
|
-
* en: 'Hello',
|
|
22
|
-
* fr: 'Bonjour',
|
|
23
|
-
* }, 'fr');
|
|
24
|
-
* // 'Bonjour'
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
declare const getTranslation: <Content = string>(languageContent: StrictModeLocaleMap<Content>, locale: LocalesValues, fallback?: LocalesValues) => Content;
|
|
28
|
-
//#endregion
|
|
29
|
-
export { getTranslation };
|
|
30
|
-
//# sourceMappingURL=getTranslation.d.ts.map
|
|
1
|
+
import { t as getTranslation } from "../getTranslation-BG2Wg-af.js";
|
|
2
|
+
export { getTranslation };
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { getCondition } from "
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { getBasePlugins, getContent } from "./getContent/getContent.js";
|
|
6
|
-
import { getDictionary } from "./getDictionary.js";
|
|
7
|
-
import { findMatchingCondition, getEnumeration } from "./getEnumeration.js";
|
|
8
|
-
import { getHTML } from "./getHTML.js";
|
|
9
|
-
import { getIntlayer } from "./getIntlayer.js";
|
|
10
|
-
import { getTranslation } from "./getTranslation.js";
|
|
11
|
-
import { splitInsertionTemplate } from "./splitAndJoinInsertion.js";
|
|
1
|
+
import { A as GetNestingResult, C as conditionPlugin, D as insertionPlugin, E as genderPlugin, M as getCondition, O as nestedPlugin, S as ValueAtKey, T as filePlugin, _ as NestedCond, a as getBasePlugins, b as TranslationCond, c as ConditionCond, d as FileCond, f as GenderCond, g as IsAny, h as InsertionCond, i as getDictionary, j as getNesting, k as translationPlugin, l as DeepTransformContent, m as IInterpreterPluginState, n as findMatchingCondition, o as getContent, p as IInterpreterPlugin, r as getEnumeration, s as deepTransformNode, t as getIntlayer, u as EnumerationCond, v as NodeProps, w as enumerationPlugin, x as UnionKeys, y as Plugins } from "../index-BnEeKNKW.js";
|
|
2
|
+
import { t as getHTML } from "../getHTML-CP6OXtdo.js";
|
|
3
|
+
import { t as getTranslation } from "../getTranslation-BG2Wg-af.js";
|
|
4
|
+
import { t as splitInsertionTemplate } from "../splitAndJoinInsertion-bkuLa7o2.js";
|
|
12
5
|
export { ConditionCond, DeepTransformContent, EnumerationCond, FileCond, GenderCond, GetNestingResult, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, IsAny, NestedCond, NodeProps, Plugins, TranslationCond, UnionKeys, ValueAtKey, conditionPlugin, deepTransformNode, enumerationPlugin, filePlugin, findMatchingCondition, genderPlugin, getBasePlugins, getCondition, getContent, getDictionary, getEnumeration, getHTML, getIntlayer, getNesting, getTranslation, insertionPlugin, nestedPlugin, splitInsertionTemplate, translationPlugin };
|
|
@@ -1,25 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Core logic for splitting insertion strings and joining with values.
|
|
4
|
-
* Returns an array of parts that can be wrapped by framework-specific Fragment implementations.
|
|
5
|
-
*
|
|
6
|
-
* @param template - The template string with {{ placeholder }} syntax
|
|
7
|
-
* @param values - Map of placeholder names to their replacement values
|
|
8
|
-
* @returns Object with `isSimple` flag and `parts` array
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const result = splitInsertionTemplate('Hello {{ name }}!', { name: 'World' });
|
|
13
|
-
* // { isSimple: true, parts: 'Hello World!' }
|
|
14
|
-
*
|
|
15
|
-
* const result = splitInsertionTemplate('Hello {{ name }}!', { name: <Component /> });
|
|
16
|
-
* // { isSimple: false, parts: ['Hello ', <Component />, '!'] }
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
declare const splitInsertionTemplate: <T = any>(template: string, values?: Record<string, T>) => {
|
|
20
|
-
isSimple: boolean;
|
|
21
|
-
parts: string | T[];
|
|
22
|
-
};
|
|
23
|
-
//#endregion
|
|
24
|
-
export { splitInsertionTemplate };
|
|
25
|
-
//# sourceMappingURL=splitAndJoinInsertion.d.ts.map
|
|
1
|
+
import { t as splitInsertionTemplate } from "../splitAndJoinInsertion-bkuLa7o2.js";
|
|
2
|
+
export { splitInsertionTemplate };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/intl.d.ts
|
|
4
|
+
type IntlConstructors = { [K in keyof typeof Intl as (typeof Intl)[K] extends (new (...args: any) => any) ? K : never]: (typeof Intl)[K] };
|
|
5
|
+
type ReplaceLocaleWithLocalesValues<T> = T extends (new (locales: any, options?: infer Options) => infer Instance) ? {
|
|
6
|
+
new (locales?: LocalesValues, options?: Options): Instance;
|
|
7
|
+
new (options?: Options & {
|
|
8
|
+
locale?: LocalesValues;
|
|
9
|
+
}): Instance;
|
|
10
|
+
} : T extends (new (locales: any) => infer Instance) ? {
|
|
11
|
+
new (locales?: LocalesValues): Instance;
|
|
12
|
+
new (options?: {
|
|
13
|
+
locale?: LocalesValues;
|
|
14
|
+
}): Instance;
|
|
15
|
+
} : T;
|
|
16
|
+
type WrappedIntl = { [K in keyof typeof Intl]: K extends keyof IntlConstructors ? ReplaceLocaleWithLocalesValues<(typeof Intl)[K]> : (typeof Intl)[K] };
|
|
17
|
+
/**
|
|
18
|
+
* Factory that turns the global `Intl` into a cached clone.
|
|
19
|
+
*/
|
|
20
|
+
declare const createCachedIntl: () => WrappedIntl;
|
|
21
|
+
declare const CachedIntl: WrappedIntl;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a proxied Intl object with a preset locale.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const intl = bindIntl(Locales.FRENCH);
|
|
27
|
+
* new intl.NumberFormat(undefined, { style: 'currency', currency: 'EUR' }).format(10);
|
|
28
|
+
* // Uses 'fr' automatically
|
|
29
|
+
*/
|
|
30
|
+
declare const bindIntl: (locale: LocalesValues) => WrappedIntl;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { createCachedIntl as i, WrappedIntl as n, bindIntl as r, CachedIntl as t };
|
|
33
|
+
//# sourceMappingURL=intl-B2Ap8I5x.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intl-B2Ap8I5x.d.ts","names":[],"sources":["../../src/utils/intl.ts"],"mappings":";;;KA8BK,gBAAA,wBACgB,IAAA,YAAgB,IAAA,EAAM,CAAA,mBACpC,IAAA,iBAED,CAAA,mBACgB,IAAA,EAAM,CAAA;AAAA,KAIvB,8BAAA,MAAoC,CAAA,eACvC,OAAA,OACA,OAAA;EAAA,KAGS,OAAA,GAAU,aAAA,EAAe,OAAA,GAAU,OAAA,GAAU,QAAA;EAAA,KAC7C,OAAA,GAAU,OAAA;IAAY,MAAA,GAAS,aAAA;EAAA,IAAkB,QAAA;AAAA,IAExD,CAAA,eACI,OAAA;EAAA,KAGK,OAAA,GAAU,aAAA,GAAgB,QAAA;EAAA,KAC1B,OAAA;IAAY,MAAA,GAAS,aAAA;EAAA,IAAkB,QAAA;AAAA,IAE9C,CAAA;AAAA,KAGM,WAAA,wBACS,IAAA,GAAO,CAAA,eAAgB,gBAAA,GACtC,8BAAA,SAAuC,IAAA,EAAM,CAAA,aACrC,IAAA,EAAM,CAAA;;;;cAuFP,gBAAA,QAAuB,WAAA;AAAA,cAiCvB,UAAA,EAAU,WAAA;;AAjJM;;;;;;;cA2JhB,QAAA,GAAY,MAAA,EAAQ,aAAA,KAAgB,WAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { KeyPath } from "@intlayer/types/keyPath";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/isSameKeyPath.d.ts
|
|
4
|
+
declare const isSameKeyPath: (keyPath1: KeyPath[], keyPath2: KeyPath[]) => boolean;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { isSameKeyPath as t };
|
|
7
|
+
//# sourceMappingURL=isSameKeyPath-CkH8NdJh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isSameKeyPath-CkH8NdJh.d.ts","names":[],"sources":["../../src/utils/isSameKeyPath.ts"],"mappings":";;;cAIa,aAAA,GAAiB,QAAA,EAAU,OAAA,IAAW,QAAA,EAAU,OAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/utils/isValidReactElement.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Verifies the object is a ReactElement.
|
|
4
|
+
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
5
|
+
* @param object
|
|
6
|
+
* @return True if `object` is a ReactElement.
|
|
7
|
+
* @final
|
|
8
|
+
*/
|
|
9
|
+
declare const isValidElement: (object: any) => boolean;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { isValidElement as t };
|
|
12
|
+
//# sourceMappingURL=isValidReactElement-BsoJ01oP.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isValidReactElement-BsoJ01oP.d.ts","names":[],"sources":["../../src/utils/isValidReactElement.ts"],"mappings":";;AAQA;;;;;;cAAa,cAAA,GAAkB,MAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
+
|
|
3
|
+
//#region src/formatters/list.d.ts
|
|
4
|
+
/** Locally defined subset of Intl.ListFormatOptions so consumers don't need ES2021.Intl in their lib. */
|
|
5
|
+
type ListFormatOptions = {
|
|
6
|
+
localeMatcher?: 'lookup' | 'best fit';
|
|
7
|
+
type?: 'conjunction' | 'disjunction' | 'unit';
|
|
8
|
+
style?: 'long' | 'short' | 'narrow';
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Formats an array of values into a localized list string using the Intl API.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* list(['apple', 'banana', 'orange']);
|
|
15
|
+
* // "apple, banana, and orange"
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* list(['red', 'green', 'blue'], { locale: Locales.FRENCH, type: 'disjunction' });
|
|
19
|
+
* // "rouge, vert ou bleu"
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* list([1, 2, 3], { type: 'unit' });
|
|
23
|
+
* // "1, 2, 3"
|
|
24
|
+
*/
|
|
25
|
+
declare const list: (values: (string | number)[], options?: ListFormatOptions & {
|
|
26
|
+
locale?: LocalesValues;
|
|
27
|
+
}) => string;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { list as t };
|
|
30
|
+
//# sourceMappingURL=list-BdjJM2Gx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-BdjJM2Gx.d.ts","names":[],"sources":["../../src/formatters/list.ts"],"mappings":";;;;KAKK,iBAAA;EACH,aAAA;EACA,IAAA;EACA,KAAA;AAAA;;;;;;AAkBF;;;;;;;;;;cAAa,IAAA,GACX,MAAA,uBACA,OAAA,GAAU,iBAAA;EAAsB,MAAA,GAAS,aAAA;AAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Locale } from "@intlayer/types/allLocales";
|
|
2
|
+
|
|
3
|
+
//#region src/localization/localeDetector.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Derives the list of preferred languages based on the Accept-Language header
|
|
6
|
+
* and an optional list of available languages.
|
|
7
|
+
*/
|
|
8
|
+
declare const getPreferredLanguages: (acceptHeader: string | undefined, availableLanguages?: string[]) => string[];
|
|
9
|
+
/**
|
|
10
|
+
* Detects the locale from the request headers.
|
|
11
|
+
*
|
|
12
|
+
* Headers are provided by the browser/client and can be used to determine the user's preferred language.
|
|
13
|
+
* This function intersects the user's `Accept-Language` header with the application's available locales.
|
|
14
|
+
*/
|
|
15
|
+
declare const localeDetector: (headers: Record<string, string | undefined>, availableLocales?: Locale[], defaultLocale?: Locale) => Locale;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { localeDetector as n, getPreferredLanguages as t };
|
|
18
|
+
//# sourceMappingURL=localeDetector-BWNCQRiZ.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localeDetector-BWNCQRiZ.d.ts","names":[],"sources":["../../src/localization/localeDetector.ts"],"mappings":";;;;;AA+MA;;cAAa,qBAAA,GACX,YAAA,sBACA,kBAAA;;;AA+BF;;;;cAAa,cAAA,GACX,OAAA,EAAS,MAAA,8BACT,gBAAA,GAAmB,MAAA,IACnB,aAAA,GAAgB,MAAA,KACf,MAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
+
import { Locale } from "@intlayer/types/allLocales";
|
|
3
|
+
|
|
4
|
+
//#region src/localization/localeMapper.d.ts
|
|
5
|
+
type LocaleData = {
|
|
6
|
+
locale: Locale;
|
|
7
|
+
defaultLocale: Locale;
|
|
8
|
+
isDefault: boolean;
|
|
9
|
+
locales: Locale[];
|
|
10
|
+
urlPrefix: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Map the locale data to an array of objects
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const routes = localeMap((localizedData) =>
|
|
18
|
+
* ({
|
|
19
|
+
* path: localizedData.urlPrefix,
|
|
20
|
+
* name: localizedData.locale,
|
|
21
|
+
* isDefault: localizedData.isDefault,
|
|
22
|
+
* locales: localizedData.locales,
|
|
23
|
+
* defaultLocale: localizedData.defaultLocale,
|
|
24
|
+
* }),
|
|
25
|
+
* );
|
|
26
|
+
*
|
|
27
|
+
* // Result
|
|
28
|
+
* [
|
|
29
|
+
* { path: '/', name: 'en', isDefault: true, locales: ['en'], defaultLocale: 'en', urlPrefix: '' },
|
|
30
|
+
* { path: '/fr', name: 'fr', isDefault: false, locales: ['fr'], defaultLocale: 'en', urlPrefix: '/fr' },
|
|
31
|
+
* { path: '/es', name: 'es', isDefault: false, locales: ['es'], defaultLocale: 'en', urlPrefix: '/es' },
|
|
32
|
+
* ]
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @param mapper - The mapper function that returns an object
|
|
36
|
+
* @returns An array of objects
|
|
37
|
+
*/
|
|
38
|
+
declare const localeMap: <T>(mapper: (locale: LocaleData) => T, locales?: LocalesValues[], defaultLocale?: LocalesValues, mode?: "prefix-no-default" | "prefix-all" | "no-prefix" | "search-params") => T[];
|
|
39
|
+
/**
|
|
40
|
+
* Flatten the locale map into a single array of objects
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const routes = localeMap((localizedData) =>
|
|
45
|
+
* [{
|
|
46
|
+
* path: localizedData.urlPrefix,
|
|
47
|
+
* name: localizedData.locale,
|
|
48
|
+
* isDefault: localizedData.isDefault,
|
|
49
|
+
* locales: localizedData.locales,
|
|
50
|
+
* defaultLocale: localizedData.defaultLocale,
|
|
51
|
+
* }],
|
|
52
|
+
* );
|
|
53
|
+
*
|
|
54
|
+
* // Result
|
|
55
|
+
* [
|
|
56
|
+
* path: '/', name: 'en', isDefault: true, locales: ['en'], defaultLocale: 'en', urlPrefix: '' ,
|
|
57
|
+
* path: '/fr', name: 'fr', isDefault: false, locales: ['fr'], defaultLocale: 'en', urlPrefix: '/fr' ,
|
|
58
|
+
* path: '/es', name: 'es', isDefault: false, locales: ['es'], defaultLocale: 'en', urlPrefix: '/es' ,
|
|
59
|
+
* ]
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @param mapper - The mapper function that returns an array of objects
|
|
63
|
+
* @returns An array of objects
|
|
64
|
+
*/
|
|
65
|
+
declare const localeFlatMap: <T>(mapper: (locale: LocaleData) => T[], locales?: LocalesValues[], defaultLocale?: LocalesValues, mode?: "prefix-no-default" | "prefix-all" | "no-prefix" | "search-params") => T[];
|
|
66
|
+
/**
|
|
67
|
+
* Creates a record object mapping locales to values transformed by the mapper function
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const translations = localeRecord(({ locale }) =>
|
|
72
|
+
* require(`./translations/${locale}.json`)
|
|
73
|
+
* );
|
|
74
|
+
*
|
|
75
|
+
* // Result
|
|
76
|
+
*
|
|
77
|
+
* en: ... , // Content of translations/en.json
|
|
78
|
+
* fr: ... , // Content of translations/fr.json
|
|
79
|
+
* es: ...
|
|
80
|
+
*
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @param mapper - Function that takes locale data and returns a value for that locale
|
|
84
|
+
* @param locales - Array of locale codes to map over (defaults to configured locales)
|
|
85
|
+
* @param defaultLocale - The default locale (defaults to configured default)
|
|
86
|
+
* @param mode - URL routing mode for locale handling (defaults to configured value)
|
|
87
|
+
* @returns Record mapping locale codes to mapped values
|
|
88
|
+
*/
|
|
89
|
+
declare const localeRecord: <T>(mapper: (locale: LocaleData) => T, locales?: LocalesValues[], defaultLocale?: LocalesValues, mode?: "prefix-no-default" | "prefix-all" | "no-prefix" | "search-params") => Record<LocalesValues, T>;
|
|
90
|
+
//#endregion
|
|
91
|
+
export { localeRecord as i, localeFlatMap as n, localeMap as r, LocaleData as t };
|
|
92
|
+
//# sourceMappingURL=localeMapper-DoAnasqf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localeMapper-DoAnasqf.d.ts","names":[],"sources":["../../src/localization/localeMapper.ts"],"mappings":";;;;KAKY,UAAA;EACV,MAAA,EAAQ,MAAA;EACR,aAAA,EAAe,MAAA;EACf,SAAA;EACA,OAAA,EAAS,MAAA;EACT,SAAA;AAAA;;;;;;;;;;;;;;AA+CF;;;;;;;;;;;;;cAAa,SAAA,MACX,MAAA,GAAS,MAAA,EAAQ,UAAA,KAAe,CAAA,EAChC,OAAA,GAAS,aAAA,IACT,aAAA,GAAe,aAAA,EAEf,IAAA,0EAKC,CAAA;;;;;;;;;;AAuCH;;;;;;;;;;;;;;;;;cAAa,aAAA,MACX,MAAA,GAAS,MAAA,EAAQ,UAAA,KAAe,CAAA,IAChC,OAAA,GAAS,aAAA,IACT,aAAA,GAAe,aAAA,EAEf,IAAA,0EAKC,CAAA;;;;;;AAoCH;;;;;;;;;;;;;;;;;;cAAa,YAAA,MACX,MAAA,GAAS,MAAA,EAAQ,UAAA,KAAe,CAAA,EAChC,OAAA,GAAS,aAAA,IACT,aAAA,GAAe,aAAA,EAEf,IAAA,0EAKC,MAAA,CAAO,aAAA,EAAe,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
+
import { Locale } from "@intlayer/types/allLocales";
|
|
3
|
+
|
|
4
|
+
//#region src/localization/localeResolver.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the most specific locale from a user-provided list,
|
|
7
|
+
* or falls back to the default locale if no match is found.
|
|
8
|
+
*/
|
|
9
|
+
declare const localeResolver: (selectedLocale: LocalesValues | LocalesValues[], locales?: LocalesValues[], defaultLocale?: LocalesValues) => Locale;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { localeResolver as t };
|
|
12
|
+
//# sourceMappingURL=localeResolver-bb7AWQNX.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localeResolver-bb7AWQNX.d.ts","names":[],"sources":["../../src/localization/localeResolver.ts"],"mappings":";;;;;;AAQA;;cAAa,cAAA,GACX,cAAA,EAAgB,aAAA,GAAgB,aAAA,IAChC,OAAA,GAAS,aAAA,IACT,aAAA,GAAe,aAAA,KAEd,MAAA"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
+
import { Locale } from "@intlayer/types/allLocales";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/localeStorage.d.ts
|
|
5
|
+
type CookieBuildAttributes = {
|
|
6
|
+
/**
|
|
7
|
+
* Cookie domain to store the locale information
|
|
8
|
+
*
|
|
9
|
+
* Default: undefined
|
|
10
|
+
*
|
|
11
|
+
* Define the domain where the cookie is available. Defaults to
|
|
12
|
+
* the domain of the page where the cookie was created.
|
|
13
|
+
*/
|
|
14
|
+
domain?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Cookie path to store the locale information
|
|
17
|
+
*
|
|
18
|
+
* Default: undefined
|
|
19
|
+
*
|
|
20
|
+
* Define the path where the cookie is available. Defaults to '/'
|
|
21
|
+
*/
|
|
22
|
+
path?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Cookie secure to store the locale information
|
|
25
|
+
*
|
|
26
|
+
* Default: undefined
|
|
27
|
+
*
|
|
28
|
+
* A Boolean indicating if the cookie transmission requires a
|
|
29
|
+
* secure protocol (https). Defaults to false.
|
|
30
|
+
*/
|
|
31
|
+
secure?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Cookie httpOnly to store the locale information
|
|
34
|
+
*
|
|
35
|
+
* Default: undefined
|
|
36
|
+
*
|
|
37
|
+
* The cookie httpOnly where the locale information is stored.
|
|
38
|
+
*/
|
|
39
|
+
httpOnly?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Cookie sameSite to store the locale information
|
|
42
|
+
*
|
|
43
|
+
* Default: undefined
|
|
44
|
+
*
|
|
45
|
+
* Asserts that a cookie must not be sent with cross-origin requests,
|
|
46
|
+
* providing some protection against cross-site request forgery
|
|
47
|
+
* attacks (CSRF)
|
|
48
|
+
*/
|
|
49
|
+
sameSite?: 'strict' | 'lax' | 'none';
|
|
50
|
+
/**
|
|
51
|
+
* Cookie expires to store the locale information
|
|
52
|
+
*
|
|
53
|
+
* Default: undefined
|
|
54
|
+
*
|
|
55
|
+
* Define when the cookie will be removed. Value can be a Number
|
|
56
|
+
* which will be interpreted as days from time of creation or a
|
|
57
|
+
* Date instance. If omitted, the cookie becomes a session cookie.
|
|
58
|
+
*/
|
|
59
|
+
expires?: number | undefined;
|
|
60
|
+
};
|
|
61
|
+
type LocaleStorageOptions = {
|
|
62
|
+
overwrite?: boolean;
|
|
63
|
+
isCookieEnabled?: boolean;
|
|
64
|
+
setCookieStore?: (name: string, value: string, cookie: CookieBuildAttributes) => void;
|
|
65
|
+
setCookieString?: (name: string, cookie: string) => void;
|
|
66
|
+
getCookie?: (name: string) => string | undefined | null;
|
|
67
|
+
setSessionStorage?: (name: string, value: string) => void;
|
|
68
|
+
getSessionStorage?: (name: string) => string | undefined | null;
|
|
69
|
+
setLocaleStorage?: (name: string, value: string) => void;
|
|
70
|
+
getLocaleStorage?: (name: string) => string | undefined | null;
|
|
71
|
+
getHeader?: (name: string) => string | undefined | null;
|
|
72
|
+
setHeader?: (name: string, value: string) => void;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Retrieves the locale from various storage mechanisms (cookies, localStorage, sessionStorage, headers).
|
|
76
|
+
* The function checks storage locations in order of priority as defined in the configuration.
|
|
77
|
+
*
|
|
78
|
+
* @returns The locale if found in any storage, or undefined if not found
|
|
79
|
+
*/
|
|
80
|
+
declare const getLocaleFromStorage: (options: Pick<LocaleStorageOptions, "getCookie" | "getSessionStorage" | "getLocaleStorage" | "getHeader" | "isCookieEnabled">) => Locale | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Stores the locale in various storage mechanisms (cookies, localStorage, sessionStorage, headers).
|
|
83
|
+
* The function writes to all configured storage locations according to their attributes.
|
|
84
|
+
* Respects overwrite flags for localStorage and sessionStorage.
|
|
85
|
+
*
|
|
86
|
+
* @param locale - The locale to store
|
|
87
|
+
*/
|
|
88
|
+
declare const setLocaleInStorage: (locale: LocalesValues, options?: LocaleStorageOptions) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Utility object to get and set the locale in the storage by considering the configuration
|
|
91
|
+
*
|
|
92
|
+
* @property getLocale - Retrieves the locale from various storage mechanisms (cookies, localStorage, sessionStorage, headers).
|
|
93
|
+
* Retrieves the locale from various storage mechanisms (cookies, localStorage, sessionStorage, headers).
|
|
94
|
+
* The function checks storage locations in order of priority as defined in the configuration.
|
|
95
|
+
*
|
|
96
|
+
* @property setLocale - Stores the locale in various storage mechanisms (cookies, localStorage, sessionStorage, headers).
|
|
97
|
+
* The function writes to all configured storage locations according to their attributes.
|
|
98
|
+
* Respects overwrite flags for localStorage and sessionStorage.
|
|
99
|
+
*
|
|
100
|
+
* @returns The locale if found in any storage, or undefined if not found
|
|
101
|
+
*/
|
|
102
|
+
declare const LocaleStorage: (options: LocaleStorageOptions) => {
|
|
103
|
+
getLocale: () => Locale;
|
|
104
|
+
setLocale: (locale: LocalesValues) => void;
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
export { setLocaleInStorage as i, LocaleStorageOptions as n, getLocaleFromStorage as r, LocaleStorage as t };
|
|
108
|
+
//# sourceMappingURL=localeStorage-CZHwY0u3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localeStorage-CZHwY0u3.d.ts","names":[],"sources":["../../src/utils/localeStorage.ts"],"mappings":";;;;KAOK,qBAAA;;AAJoE;;;;;;;EAavE,MAAA;EAmCA;;;;AAgCF;;;EA3DE,IAAA;EA4DA;;;;;;;;EAnDA,MAAA;EA0DiC;;;;;;;EAlDjC,QAAA;EAsDA;;;;;;;;;EA5CA,QAAA;EA+CwC;;AAS1C;;;;;;;EA7CE,OAAA;AAAA;AAAA,KAqBU,oBAAA;EACV,SAAA;EACA,eAAA;EACA,cAAA,IACE,IAAA,UACA,KAAA,UACA,MAAA,EAAQ,qBAAA;EAEV,eAAA,IAAmB,IAAA,UAAc,MAAA;EACjC,SAAA,IAAa,IAAA;EACb,iBAAA,IAAqB,IAAA,UAAc,KAAA;EACnC,iBAAA,IAAqB,IAAA;EACrB,gBAAA,IAAoB,IAAA,UAAc,KAAA;EAClC,gBAAA,IAAoB,IAAA;EACpB,SAAA,IAAa,IAAA;EACb,SAAA,IAAa,IAAA,UAAc,KAAA;AAAA;;;AAmM7B;;;;cA1La,oBAAA,GACX,OAAA,EAAS,IAAA,CACP,oBAAA,gGAOD,MAAA;;;;;;;;cA8EU,kBAAA,GACX,MAAA,EAAQ,aAAA,EACR,OAAA,GAAU,oBAAA;;;;;;;;;;;;;;cAiGC,aAAA,GAAiB,OAAA,EAAS,oBAAA;;sBAEjB,aAAA;AAAA"}
|
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/localization/getBrowserLocale.d.ts
|
|
5
|
-
declare enum LanguageDetector {
|
|
6
|
-
Querystring = "querystring",
|
|
7
|
-
Storage = "storage",
|
|
8
|
-
Navigator = "navigator",
|
|
9
|
-
HtmlTag = "htmlTag"
|
|
10
|
-
}
|
|
11
|
-
declare const localeStorageOptions: LocaleStorageOptions;
|
|
12
|
-
type LanguageDetectorOptions = {
|
|
13
|
-
order?: LanguageDetector[];
|
|
14
|
-
lookupQuerystring?: string;
|
|
15
|
-
htmlTag?: HTMLElement | null;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Core language detector function for browser environments.
|
|
19
|
-
*
|
|
20
|
-
* Detects the user's preferred locale by checking multiple sources in order:
|
|
21
|
-
* 1. Query string parameter
|
|
22
|
-
* 2. Storage (cookies, localStorage, sessionStorage) - uses getLocaleFromStorage
|
|
23
|
-
* 3. Navigator languages - uses localeDetector
|
|
24
|
-
* 4. HTML lang attribute - uses localeDetector
|
|
25
|
-
*
|
|
26
|
-
* @param userOptions - Optional configuration for detection order and lookup keys
|
|
27
|
-
* @returns The detected locale or the default locale
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* const locale = getBrowserLocale({ order: [LanguageDetector.Storage, LanguageDetector.Navigator] });
|
|
31
|
-
*/
|
|
32
|
-
declare const getBrowserLocale: (userOptions?: LanguageDetectorOptions | undefined) => Locale;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { LanguageDetector, getBrowserLocale, localeStorageOptions };
|
|
35
|
-
//# sourceMappingURL=getBrowserLocale.d.ts.map
|
|
1
|
+
import { n as getBrowserLocale, r as localeStorageOptions, t as LanguageDetector } from "../getBrowserLocale-RD_Mwv1t.js";
|
|
2
|
+
export { LanguageDetector, getBrowserLocale, localeStorageOptions };
|
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/localization/getHTMLTextDir.d.ts
|
|
4
|
-
type Dir = 'ltr' | 'rtl' | 'auto';
|
|
5
|
-
/**
|
|
6
|
-
* Returns the text direction of the given locale.
|
|
7
|
-
*
|
|
8
|
-
* Example:
|
|
9
|
-
*
|
|
10
|
-
* getHTMLTextDir('en-US') // 'ltr'
|
|
11
|
-
* getHTMLTextDir('en') // 'ltr'
|
|
12
|
-
* getHTMLTextDir('fr-CA') // 'ltr'
|
|
13
|
-
* getHTMLTextDir('fr') // 'ltr'
|
|
14
|
-
*
|
|
15
|
-
* @param locale The locale to get the text direction for.
|
|
16
|
-
* @returns The text direction of the given locale.
|
|
17
|
-
*/
|
|
18
|
-
declare const getHTMLTextDir: (locale?: LocalesValues) => Dir;
|
|
19
|
-
//#endregion
|
|
20
|
-
export { getHTMLTextDir };
|
|
21
|
-
//# sourceMappingURL=getHTMLTextDir.d.ts.map
|
|
1
|
+
import { t as getHTMLTextDir } from "../getHTMLTextDir-4Zh8J3x7.js";
|
|
2
|
+
export { getHTMLTextDir };
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
//#region src/localization/getLocale.d.ts
|
|
4
|
-
type RequestContext = {
|
|
5
|
-
getHeader?: (name: string) => string | null | undefined;
|
|
6
|
-
getCookie?: (name: string) => string | null | undefined;
|
|
7
|
-
};
|
|
8
|
-
declare const getLocale: (ctx?: RequestContext) => Promise<Locale>;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { RequestContext, getLocale };
|
|
11
|
-
//# sourceMappingURL=getLocale.d.ts.map
|
|
1
|
+
import { n as getLocale, t as RequestContext } from "../getLocale-B9dECUM_.js";
|
|
2
|
+
export { RequestContext, getLocale };
|
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { RoutingConfig } from "@intlayer/types/config";
|
|
4
|
-
|
|
5
|
-
//#region src/localization/getLocaleFromPath.d.ts
|
|
6
|
-
type GetLocaleFromPathOptions = {
|
|
7
|
-
defaultLocale?: LocalesValues;
|
|
8
|
-
locales?: LocalesValues[];
|
|
9
|
-
mode?: RoutingConfig['mode'];
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Extracts the locale segment from the given URL or pathname based on the routing mode.
|
|
13
|
-
*
|
|
14
|
-
* Mode Behaviors:
|
|
15
|
-
* - 'prefix-no-default': Checks path prefiIf no prefix found, assumes default locale.
|
|
16
|
-
* - 'prefix-all': Checks path prefix.
|
|
17
|
-
* - 'search-params': Checks for 'locale' query parameter.
|
|
18
|
-
* - 'no-prefix': Returns undefined (or default if fallback is true).
|
|
19
|
-
*
|
|
20
|
-
* @param inputUrl - The complete URL string or pathname to process.
|
|
21
|
-
* @returns The detected locale, default locale (if fallback/implicit), or undefined.
|
|
22
|
-
*/
|
|
23
|
-
declare const getLocaleFromPath: (inputUrl?: string, options?: GetLocaleFromPathOptions) => Locale | undefined;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { getLocaleFromPath };
|
|
26
|
-
//# sourceMappingURL=getLocaleFromPath.d.ts.map
|
|
1
|
+
import { t as getLocaleFromPath } from "../getLocaleFromPath-621W32QA.js";
|
|
2
|
+
export { getLocaleFromPath };
|