@intlayer/core 6.1.6-canary.0 → 7.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/cjs/deepTransformPlugins/getFilterMissingTranslationsContent.cjs +213 -0
- package/dist/cjs/deepTransformPlugins/getFilterMissingTranslationsContent.cjs.map +1 -0
- package/dist/cjs/deepTransformPlugins/getFilterTranslationsOnlyContent.cjs +95 -0
- package/dist/cjs/deepTransformPlugins/getFilterTranslationsOnlyContent.cjs.map +1 -0
- package/dist/cjs/deepTransformPlugins/getFilteredLocalesContent.cjs +46 -0
- package/dist/cjs/deepTransformPlugins/getFilteredLocalesContent.cjs.map +1 -0
- package/dist/cjs/deepTransformPlugins/getLocalizedContent.cjs +33 -0
- package/dist/cjs/deepTransformPlugins/getLocalizedContent.cjs.map +1 -0
- package/dist/cjs/deepTransformPlugins/getMaskContent.cjs +27 -0
- package/dist/cjs/deepTransformPlugins/getMaskContent.cjs.map +1 -0
- package/dist/cjs/deepTransformPlugins/getMissingLocalesContent.cjs +45 -0
- package/dist/cjs/deepTransformPlugins/getMissingLocalesContent.cjs.map +1 -0
- package/dist/cjs/deepTransformPlugins/getReplacedValuesContent.cjs +60 -0
- package/dist/cjs/deepTransformPlugins/getReplacedValuesContent.cjs.map +1 -0
- package/dist/cjs/deepTransformPlugins/index.cjs +25 -0
- package/dist/cjs/deepTransformPlugins/insertContentInDictionary.cjs +107 -0
- package/dist/cjs/deepTransformPlugins/insertContentInDictionary.cjs.map +1 -0
- package/dist/cjs/dictionaryManipulator/editDictionaryByKeyPath.cjs +59 -91
- package/dist/cjs/dictionaryManipulator/editDictionaryByKeyPath.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs +13 -39
- package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getDefaultNode.cjs +48 -94
- package/dist/cjs/dictionaryManipulator/getDefaultNode.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getEmptyNode.cjs +24 -68
- package/dist/cjs/dictionaryManipulator/getEmptyNode.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getNodeChildren.cjs +21 -56
- package/dist/cjs/dictionaryManipulator/getNodeChildren.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getNodeType.cjs +32 -49
- package/dist/cjs/dictionaryManipulator/getNodeType.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getUnmergedDictionaryByKeyPath.cjs +18 -50
- package/dist/cjs/dictionaryManipulator/getUnmergedDictionaryByKeyPath.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/index.cjs +28 -41
- package/dist/cjs/dictionaryManipulator/mergeDictionaries.cjs +69 -0
- package/dist/cjs/dictionaryManipulator/mergeDictionaries.cjs.map +1 -0
- package/dist/cjs/dictionaryManipulator/normalizeDictionary.cjs +30 -0
- package/dist/cjs/dictionaryManipulator/normalizeDictionary.cjs.map +1 -0
- package/dist/cjs/dictionaryManipulator/orderDictionaries.cjs +48 -0
- package/dist/cjs/dictionaryManipulator/orderDictionaries.cjs.map +1 -0
- package/dist/cjs/dictionaryManipulator/removeContentNodeByKeyPath.cjs +29 -54
- package/dist/cjs/dictionaryManipulator/removeContentNodeByKeyPath.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/renameContentNodeByKeyPath.cjs +37 -63
- package/dist/cjs/dictionaryManipulator/renameContentNodeByKeyPath.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/updateNodeChildren.cjs +36 -76
- package/dist/cjs/dictionaryManipulator/updateNodeChildren.cjs.map +1 -1
- package/dist/cjs/formatters/compact.cjs +24 -46
- package/dist/cjs/formatters/compact.cjs.map +1 -1
- package/dist/cjs/formatters/currency.cjs +28 -50
- package/dist/cjs/formatters/currency.cjs.map +1 -1
- package/dist/cjs/formatters/date.cjs +56 -79
- package/dist/cjs/formatters/date.cjs.map +1 -1
- package/dist/cjs/formatters/index.cjs +17 -37
- package/dist/cjs/formatters/list.cjs +29 -47
- package/dist/cjs/formatters/list.cjs.map +1 -1
- package/dist/cjs/formatters/number.cjs +17 -43
- package/dist/cjs/formatters/number.cjs.map +1 -1
- package/dist/cjs/formatters/percentage.cjs +22 -51
- package/dist/cjs/formatters/percentage.cjs.map +1 -1
- package/dist/cjs/formatters/relativeTime.cjs +28 -70
- package/dist/cjs/formatters/relativeTime.cjs.map +1 -1
- package/dist/cjs/formatters/units.cjs +22 -48
- package/dist/cjs/formatters/units.cjs.map +1 -1
- package/dist/cjs/getStorageAttributes.cjs +116 -0
- package/dist/cjs/getStorageAttributes.cjs.map +1 -0
- package/dist/cjs/index.cjs +154 -45
- package/dist/cjs/interpreter/getCondition.cjs +30 -30
- package/dist/cjs/interpreter/getCondition.cjs.map +1 -1
- package/dist/cjs/interpreter/getContent/deepTransform.cjs +38 -63
- package/dist/cjs/interpreter/getContent/deepTransform.cjs.map +1 -1
- package/dist/cjs/interpreter/getContent/getContent.cjs +31 -54
- package/dist/cjs/interpreter/getContent/getContent.cjs.map +1 -1
- package/dist/cjs/interpreter/getContent/index.cjs +13 -27
- package/dist/cjs/interpreter/getContent/plugins.cjs +135 -175
- package/dist/cjs/interpreter/getContent/plugins.cjs.map +1 -1
- package/dist/cjs/interpreter/getDictionary.cjs +21 -39
- package/dist/cjs/interpreter/getDictionary.cjs.map +1 -1
- package/dist/cjs/interpreter/getEnumeration.cjs +69 -42
- package/dist/cjs/interpreter/getEnumeration.cjs.map +1 -1
- package/dist/cjs/interpreter/getGender.cjs +33 -34
- package/dist/cjs/interpreter/getGender.cjs.map +1 -1
- package/dist/cjs/interpreter/getInsertion.cjs +18 -27
- package/dist/cjs/interpreter/getInsertion.cjs.map +1 -1
- package/dist/cjs/interpreter/getIntlayer.cjs +13 -48
- package/dist/cjs/interpreter/getIntlayer.cjs.map +1 -1
- package/dist/cjs/interpreter/getNesting.cjs +26 -41
- package/dist/cjs/interpreter/getNesting.cjs.map +1 -1
- package/dist/cjs/interpreter/getTranslation.cjs +29 -32
- package/dist/cjs/interpreter/getTranslation.cjs.map +1 -1
- package/dist/cjs/interpreter/index.cjs +26 -39
- package/dist/cjs/localization/getBrowserLocale.cjs +144 -0
- package/dist/cjs/localization/getBrowserLocale.cjs.map +1 -0
- package/dist/cjs/localization/getHTMLTextDir.cjs +49 -255
- package/dist/cjs/localization/getHTMLTextDir.cjs.map +1 -1
- package/dist/cjs/localization/getLocaleFromPath.cjs +40 -56
- package/dist/cjs/localization/getLocaleFromPath.cjs.map +1 -1
- package/dist/cjs/localization/getLocaleLang.cjs +18 -27
- package/dist/cjs/localization/getLocaleLang.cjs.map +1 -1
- package/dist/cjs/localization/getLocaleName.cjs +7 -32
- package/dist/cjs/localization/getLocaleName.cjs.map +1 -1
- package/dist/cjs/localization/getLocalizedUrl.cjs +46 -47
- package/dist/cjs/localization/getLocalizedUrl.cjs.map +1 -1
- package/dist/cjs/localization/getMultilingualUrls.cjs +69 -65
- package/dist/cjs/localization/getMultilingualUrls.cjs.map +1 -1
- package/dist/cjs/localization/getPathWithoutLocale.cjs +53 -61
- package/dist/cjs/localization/getPathWithoutLocale.cjs.map +1 -1
- package/dist/cjs/localization/index.cjs +26 -63
- package/dist/cjs/localization/localeDetector.cjs +108 -39
- package/dist/cjs/localization/localeDetector.cjs.map +1 -1
- package/dist/cjs/localization/localeMapper.cjs +118 -72
- package/dist/cjs/localization/localeMapper.cjs.map +1 -1
- package/dist/cjs/localization/localeResolver.cjs +26 -61
- package/dist/cjs/localization/localeResolver.cjs.map +1 -1
- package/dist/cjs/transpiler/condition/condition.cjs +26 -29
- package/dist/cjs/transpiler/condition/condition.cjs.map +1 -1
- package/dist/cjs/transpiler/condition/index.cjs +3 -23
- package/dist/cjs/transpiler/enumeration/enumeration.cjs +28 -29
- package/dist/cjs/transpiler/enumeration/enumeration.cjs.map +1 -1
- package/dist/cjs/transpiler/enumeration/index.cjs +3 -23
- package/dist/cjs/transpiler/file/file.cjs +52 -71
- package/dist/cjs/transpiler/file/file.cjs.map +1 -1
- package/dist/cjs/transpiler/file/fileBrowser.cjs +24 -33
- package/dist/cjs/transpiler/file/fileBrowser.cjs.map +1 -1
- package/dist/cjs/transpiler/file/index.cjs +4 -23
- package/dist/cjs/transpiler/gender/gender.cjs +26 -29
- package/dist/cjs/transpiler/gender/gender.cjs.map +1 -1
- package/dist/cjs/transpiler/gender/index.cjs +3 -23
- package/dist/cjs/transpiler/index.cjs +19 -35
- package/dist/cjs/transpiler/insertion/getInsertionValues.cjs +8 -31
- package/dist/cjs/transpiler/insertion/getInsertionValues.cjs.map +1 -1
- package/dist/cjs/transpiler/insertion/index.cjs +5 -25
- package/dist/cjs/transpiler/insertion/insertion.cjs +34 -51
- package/dist/cjs/transpiler/insertion/insertion.cjs.map +1 -1
- package/dist/cjs/transpiler/markdown/getMarkdownMetadata.cjs +53 -86
- package/dist/cjs/transpiler/markdown/getMarkdownMetadata.cjs.map +1 -1
- package/dist/cjs/transpiler/markdown/index.cjs +5 -25
- package/dist/cjs/transpiler/markdown/markdown.cjs +33 -52
- package/dist/cjs/transpiler/markdown/markdown.cjs.map +1 -1
- package/dist/cjs/transpiler/nesting/index.cjs +3 -23
- package/dist/cjs/transpiler/nesting/nesting.cjs +26 -31
- package/dist/cjs/transpiler/nesting/nesting.cjs.map +1 -1
- package/dist/cjs/transpiler/translation/index.cjs +3 -23
- package/dist/cjs/transpiler/translation/translation.cjs +29 -29
- package/dist/cjs/transpiler/translation/translation.cjs.map +1 -1
- package/dist/cjs/utils/checkIsURLAbsolute.cjs +5 -27
- package/dist/cjs/utils/checkIsURLAbsolute.cjs.map +1 -1
- package/dist/cjs/utils/intl.cjs +48 -74
- package/dist/cjs/utils/intl.cjs.map +1 -1
- package/dist/cjs/utils/isSameKeyPath.cjs +6 -30
- package/dist/cjs/utils/isSameKeyPath.cjs.map +1 -1
- package/dist/cjs/utils/isValidReactElement.cjs +12 -27
- package/dist/cjs/utils/isValidReactElement.cjs.map +1 -1
- package/dist/cjs/utils/localeStorage.cjs +143 -0
- package/dist/cjs/utils/localeStorage.cjs.map +1 -0
- package/dist/cjs/utils/parseYaml.cjs +185 -55
- package/dist/cjs/utils/parseYaml.cjs.map +1 -1
- package/dist/esm/deepTransformPlugins/getFilterMissingTranslationsContent.mjs +208 -0
- package/dist/esm/deepTransformPlugins/getFilterMissingTranslationsContent.mjs.map +1 -0
- package/dist/esm/deepTransformPlugins/getFilterTranslationsOnlyContent.mjs +90 -0
- package/dist/esm/deepTransformPlugins/getFilterTranslationsOnlyContent.mjs.map +1 -0
- package/dist/esm/deepTransformPlugins/getFilteredLocalesContent.mjs +43 -0
- package/dist/esm/deepTransformPlugins/getFilteredLocalesContent.mjs.map +1 -0
- package/dist/esm/deepTransformPlugins/getLocalizedContent.mjs +32 -0
- package/dist/esm/deepTransformPlugins/getLocalizedContent.mjs.map +1 -0
- package/dist/esm/deepTransformPlugins/getMaskContent.mjs +26 -0
- package/dist/esm/deepTransformPlugins/getMaskContent.mjs.map +1 -0
- package/dist/esm/deepTransformPlugins/getMissingLocalesContent.mjs +41 -0
- package/dist/esm/deepTransformPlugins/getMissingLocalesContent.mjs.map +1 -0
- package/dist/esm/deepTransformPlugins/getReplacedValuesContent.mjs +60 -0
- package/dist/esm/deepTransformPlugins/getReplacedValuesContent.mjs.map +1 -0
- package/dist/esm/deepTransformPlugins/index.mjs +10 -0
- package/dist/esm/deepTransformPlugins/insertContentInDictionary.mjs +105 -0
- package/dist/esm/deepTransformPlugins/insertContentInDictionary.mjs.map +1 -0
- package/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs +57 -67
- package/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs +11 -15
- package/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/getDefaultNode.mjs +46 -70
- package/dist/esm/dictionaryManipulator/getDefaultNode.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/getEmptyNode.mjs +22 -44
- package/dist/esm/dictionaryManipulator/getEmptyNode.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/getNodeChildren.mjs +19 -32
- package/dist/esm/dictionaryManipulator/getNodeChildren.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/getNodeType.mjs +31 -26
- package/dist/esm/dictionaryManipulator/getNodeType.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/getUnmergedDictionaryByKeyPath.mjs +14 -15
- package/dist/esm/dictionaryManipulator/getUnmergedDictionaryByKeyPath.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/index.mjs +15 -11
- package/dist/esm/dictionaryManipulator/mergeDictionaries.mjs +66 -0
- package/dist/esm/dictionaryManipulator/mergeDictionaries.mjs.map +1 -0
- package/dist/esm/dictionaryManipulator/normalizeDictionary.mjs +29 -0
- package/dist/esm/dictionaryManipulator/normalizeDictionary.mjs.map +1 -0
- package/dist/esm/dictionaryManipulator/orderDictionaries.mjs +46 -0
- package/dist/esm/dictionaryManipulator/orderDictionaries.mjs.map +1 -0
- package/dist/esm/dictionaryManipulator/removeContentNodeByKeyPath.mjs +27 -30
- package/dist/esm/dictionaryManipulator/removeContentNodeByKeyPath.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs +35 -39
- package/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/updateNodeChildren.mjs +34 -52
- package/dist/esm/dictionaryManipulator/updateNodeChildren.mjs.map +1 -1
- package/dist/esm/formatters/compact.mjs +21 -11
- package/dist/esm/formatters/compact.mjs.map +1 -1
- package/dist/esm/formatters/currency.mjs +25 -15
- package/dist/esm/formatters/currency.mjs.map +1 -1
- package/dist/esm/formatters/date.mjs +53 -44
- package/dist/esm/formatters/date.mjs.map +1 -1
- package/dist/esm/formatters/index.mjs +10 -9
- package/dist/esm/formatters/list.mjs +26 -12
- package/dist/esm/formatters/list.mjs.map +1 -1
- package/dist/esm/formatters/number.mjs +14 -8
- package/dist/esm/formatters/number.mjs.map +1 -1
- package/dist/esm/formatters/percentage.mjs +19 -16
- package/dist/esm/formatters/percentage.mjs.map +1 -1
- package/dist/esm/formatters/relativeTime.mjs +25 -35
- package/dist/esm/formatters/relativeTime.mjs.map +1 -1
- package/dist/esm/formatters/units.mjs +19 -13
- package/dist/esm/formatters/units.mjs.map +1 -1
- package/dist/esm/getStorageAttributes.mjs +114 -0
- package/dist/esm/getStorageAttributes.mjs.map +1 -0
- package/dist/esm/index.mjs +67 -13
- package/dist/esm/interpreter/getCondition.mjs +29 -6
- package/dist/esm/interpreter/getCondition.mjs.map +1 -1
- package/dist/esm/interpreter/getContent/deepTransform.mjs +36 -39
- package/dist/esm/interpreter/getContent/deepTransform.mjs.map +1 -1
- package/dist/esm/interpreter/getContent/getContent.mjs +28 -26
- package/dist/esm/interpreter/getContent/getContent.mjs.map +1 -1
- package/dist/esm/interpreter/getContent/index.mjs +5 -4
- package/dist/esm/interpreter/getContent/plugins.mjs +121 -139
- package/dist/esm/interpreter/getContent/plugins.mjs.map +1 -1
- package/dist/esm/interpreter/getDictionary.mjs +20 -14
- package/dist/esm/interpreter/getDictionary.mjs.map +1 -1
- package/dist/esm/interpreter/getEnumeration.mjs +67 -17
- package/dist/esm/interpreter/getEnumeration.mjs.map +1 -1
- package/dist/esm/interpreter/getGender.mjs +32 -10
- package/dist/esm/interpreter/getGender.mjs.map +1 -1
- package/dist/esm/interpreter/getInsertion.mjs +17 -3
- package/dist/esm/interpreter/getInsertion.mjs.map +1 -1
- package/dist/esm/interpreter/getIntlayer.mjs +10 -13
- package/dist/esm/interpreter/getIntlayer.mjs.map +1 -1
- package/dist/esm/interpreter/getNesting.mjs +25 -16
- package/dist/esm/interpreter/getNesting.mjs.map +1 -1
- package/dist/esm/interpreter/getTranslation.mjs +28 -8
- package/dist/esm/interpreter/getTranslation.mjs.map +1 -1
- package/dist/esm/interpreter/index.mjs +11 -10
- package/dist/esm/localization/getBrowserLocale.mjs +139 -0
- package/dist/esm/localization/getBrowserLocale.mjs.map +1 -0
- package/dist/esm/localization/getHTMLTextDir.mjs +47 -231
- package/dist/esm/localization/getHTMLTextDir.mjs.map +1 -1
- package/dist/esm/localization/getLocaleFromPath.mjs +36 -21
- package/dist/esm/localization/getLocaleFromPath.mjs.map +1 -1
- package/dist/esm/localization/getLocaleLang.mjs +17 -3
- package/dist/esm/localization/getLocaleLang.mjs.map +1 -1
- package/dist/esm/localization/getLocaleName.mjs +7 -8
- package/dist/esm/localization/getLocaleName.mjs.map +1 -1
- package/dist/esm/localization/getLocalizedUrl.mjs +43 -12
- package/dist/esm/localization/getLocalizedUrl.mjs.map +1 -1
- package/dist/esm/localization/getMultilingualUrls.mjs +65 -29
- package/dist/esm/localization/getMultilingualUrls.mjs.map +1 -1
- package/dist/esm/localization/getPathWithoutLocale.mjs +50 -26
- package/dist/esm/localization/getPathWithoutLocale.mjs.map +1 -1
- package/dist/esm/localization/index.mjs +7 -21
- package/dist/esm/localization/localeDetector.mjs +109 -6
- package/dist/esm/localization/localeDetector.mjs.map +1 -1
- package/dist/esm/localization/localeMapper.mjs +112 -35
- package/dist/esm/localization/localeMapper.mjs.map +1 -1
- package/dist/esm/localization/localeResolver.mjs +23 -26
- package/dist/esm/localization/localeResolver.mjs.map +1 -1
- package/dist/esm/transpiler/condition/condition.mjs +23 -7
- package/dist/esm/transpiler/condition/condition.mjs.map +1 -1
- package/dist/esm/transpiler/condition/index.mjs +3 -2
- package/dist/esm/transpiler/enumeration/enumeration.mjs +25 -7
- package/dist/esm/transpiler/enumeration/enumeration.mjs.map +1 -1
- package/dist/esm/transpiler/enumeration/index.mjs +3 -2
- package/dist/esm/transpiler/file/file.mjs +46 -40
- package/dist/esm/transpiler/file/file.mjs.map +1 -1
- package/dist/esm/transpiler/file/fileBrowser.mjs +22 -9
- package/dist/esm/transpiler/file/fileBrowser.mjs.map +1 -1
- package/dist/esm/transpiler/file/index.mjs +3 -2
- package/dist/esm/transpiler/gender/gender.mjs +23 -7
- package/dist/esm/transpiler/gender/gender.mjs.map +1 -1
- package/dist/esm/transpiler/gender/index.mjs +3 -2
- package/dist/esm/transpiler/index.mjs +11 -8
- package/dist/esm/transpiler/insertion/getInsertionValues.mjs +7 -7
- package/dist/esm/transpiler/insertion/getInsertionValues.mjs.map +1 -1
- package/dist/esm/transpiler/insertion/index.mjs +4 -3
- package/dist/esm/transpiler/insertion/insertion.mjs +31 -29
- package/dist/esm/transpiler/insertion/insertion.mjs.map +1 -1
- package/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs +52 -61
- package/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs.map +1 -1
- package/dist/esm/transpiler/markdown/index.mjs +4 -3
- package/dist/esm/transpiler/markdown/markdown.mjs +29 -29
- package/dist/esm/transpiler/markdown/markdown.mjs.map +1 -1
- package/dist/esm/transpiler/nesting/index.mjs +3 -2
- package/dist/esm/transpiler/nesting/nesting.mjs +23 -9
- package/dist/esm/transpiler/nesting/nesting.mjs.map +1 -1
- package/dist/esm/transpiler/translation/index.mjs +3 -2
- package/dist/esm/transpiler/translation/translation.mjs +26 -7
- package/dist/esm/transpiler/translation/translation.mjs.map +1 -1
- package/dist/esm/utils/checkIsURLAbsolute.mjs +4 -3
- package/dist/esm/utils/checkIsURLAbsolute.mjs.map +1 -1
- package/dist/esm/utils/intl.mjs +44 -49
- package/dist/esm/utils/intl.mjs.map +1 -1
- package/dist/esm/utils/isSameKeyPath.mjs +5 -6
- package/dist/esm/utils/isSameKeyPath.mjs.map +1 -1
- package/dist/esm/utils/isValidReactElement.mjs +11 -3
- package/dist/esm/utils/isValidReactElement.mjs.map +1 -1
- package/dist/esm/utils/localeStorage.mjs +139 -0
- package/dist/esm/utils/localeStorage.mjs.map +1 -0
- package/dist/esm/utils/parseYaml.mjs +184 -31
- package/dist/esm/utils/parseYaml.mjs.map +1 -1
- package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +46 -0
- package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts.map +1 -0
- package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +38 -0
- package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts.map +1 -0
- package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +30 -0
- package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts.map +1 -0
- package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts +18 -0
- package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts.map +1 -0
- package/dist/types/deepTransformPlugins/getMaskContent.d.ts +10 -0
- package/dist/types/deepTransformPlugins/getMaskContent.d.ts.map +1 -0
- package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts +16 -0
- package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts.map +1 -0
- package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts +8 -0
- package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts.map +1 -0
- package/dist/types/deepTransformPlugins/index.d.ts +9 -0
- package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts +25 -0
- package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts.map +1 -0
- package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts +6 -3
- package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts +6 -3
- package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getDefaultNode.d.ts +6 -3
- package/dist/types/dictionaryManipulator/getDefaultNode.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getEmptyNode.d.ts +6 -2
- package/dist/types/dictionaryManipulator/getEmptyNode.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getNodeChildren.d.ts +6 -2
- package/dist/types/dictionaryManipulator/getNodeChildren.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getNodeType.d.ts +6 -3
- package/dist/types/dictionaryManipulator/getNodeType.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getUnmergedDictionaryByKeyPath.d.ts +8 -3
- package/dist/types/dictionaryManipulator/getUnmergedDictionaryByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/index.d.ts +14 -11
- package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts +7 -0
- package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts.map +1 -0
- package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts +8 -0
- package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts.map +1 -0
- package/dist/types/dictionaryManipulator/orderDictionaries.d.ts +16 -0
- package/dist/types/dictionaryManipulator/orderDictionaries.d.ts.map +1 -0
- package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts +6 -3
- package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts +6 -3
- package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts +6 -2
- package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts.map +1 -1
- package/dist/types/formatters/compact.d.ts +8 -3
- package/dist/types/formatters/compact.d.ts.map +1 -1
- package/dist/types/formatters/currency.d.ts +8 -3
- package/dist/types/formatters/currency.d.ts.map +1 -1
- package/dist/types/formatters/date.d.ts +8 -3
- package/dist/types/formatters/date.d.ts.map +1 -1
- package/dist/types/formatters/index.d.ts +9 -9
- package/dist/types/formatters/list.d.ts +8 -3
- package/dist/types/formatters/list.d.ts.map +1 -1
- package/dist/types/formatters/number.d.ts +8 -3
- package/dist/types/formatters/number.d.ts.map +1 -1
- package/dist/types/formatters/percentage.d.ts +8 -3
- package/dist/types/formatters/percentage.d.ts.map +1 -1
- package/dist/types/formatters/relativeTime.d.ts +8 -5
- package/dist/types/formatters/relativeTime.d.ts.map +1 -1
- package/dist/types/formatters/units.d.ts +8 -3
- package/dist/types/formatters/units.d.ts.map +1 -1
- package/dist/types/getStorageAttributes.d.ts +25 -0
- package/dist/types/getStorageAttributes.d.ts.map +1 -0
- package/dist/types/index.d.ts +67 -13
- package/dist/types/interpreter/getCondition.d.ts +7 -2
- package/dist/types/interpreter/getCondition.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/deepTransform.d.ts +7 -2
- package/dist/types/interpreter/getContent/deepTransform.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/getContent.d.ts +8 -4
- package/dist/types/interpreter/getContent/getContent.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/index.d.ts +4 -4
- package/dist/types/interpreter/getContent/plugins.d.ts +68 -66
- package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -1
- package/dist/types/interpreter/getDictionary.d.ts +8 -4
- package/dist/types/interpreter/getDictionary.d.ts.map +1 -1
- package/dist/types/interpreter/getEnumeration.d.ts +8 -3
- package/dist/types/interpreter/getEnumeration.d.ts.map +1 -1
- package/dist/types/interpreter/getGender.d.ts +7 -4
- package/dist/types/interpreter/getGender.d.ts.map +1 -1
- package/dist/types/interpreter/getInsertion.d.ts +7 -2
- package/dist/types/interpreter/getInsertion.d.ts.map +1 -1
- package/dist/types/interpreter/getIntlayer.d.ts +7 -5
- package/dist/types/interpreter/getIntlayer.d.ts.map +1 -1
- package/dist/types/interpreter/getNesting.d.ts +9 -6
- package/dist/types/interpreter/getNesting.d.ts.map +1 -1
- package/dist/types/interpreter/getTranslation.d.ts +7 -3
- package/dist/types/interpreter/getTranslation.d.ts.map +1 -1
- package/dist/types/interpreter/index.d.ts +10 -10
- package/dist/types/localization/getBrowserLocale.d.ts +35 -0
- package/dist/types/localization/getBrowserLocale.d.ts.map +1 -0
- package/dist/types/localization/getHTMLTextDir.d.ts +6 -3
- package/dist/types/localization/getHTMLTextDir.d.ts.map +1 -1
- package/dist/types/localization/getLocaleFromPath.d.ts +7 -2
- package/dist/types/localization/getLocaleFromPath.d.ts.map +1 -1
- package/dist/types/localization/getLocaleLang.d.ts +7 -2
- package/dist/types/localization/getLocaleLang.d.ts.map +1 -1
- package/dist/types/localization/getLocaleName.d.ts +6 -2
- package/dist/types/localization/getLocaleName.d.ts.map +1 -1
- package/dist/types/localization/getLocalizedUrl.d.ts +30 -17
- package/dist/types/localization/getLocalizedUrl.d.ts.map +1 -1
- package/dist/types/localization/getMultilingualUrls.d.ts +28 -12
- package/dist/types/localization/getMultilingualUrls.d.ts.map +1 -1
- package/dist/types/localization/getPathWithoutLocale.d.ts +11 -3
- package/dist/types/localization/getPathWithoutLocale.d.ts.map +1 -1
- package/dist/types/localization/index.d.ts +12 -12
- package/dist/types/localization/localeDetector.d.ts +7 -2
- package/dist/types/localization/localeDetector.d.ts.map +1 -1
- package/dist/types/localization/localeMapper.d.ts +23 -19
- package/dist/types/localization/localeMapper.d.ts.map +1 -1
- package/dist/types/localization/localeResolver.d.ts +7 -2
- package/dist/types/localization/localeResolver.d.ts.map +1 -1
- package/dist/types/transpiler/condition/condition.d.ts +8 -5
- package/dist/types/transpiler/condition/condition.d.ts.map +1 -1
- package/dist/types/transpiler/condition/index.d.ts +2 -2
- package/dist/types/transpiler/enumeration/enumeration.d.ts +9 -6
- package/dist/types/transpiler/enumeration/enumeration.d.ts.map +1 -1
- package/dist/types/transpiler/enumeration/index.d.ts +2 -2
- package/dist/types/transpiler/file/file.d.ts +11 -6
- package/dist/types/transpiler/file/file.d.ts.map +1 -1
- package/dist/types/transpiler/file/fileBrowser.d.ts +7 -2
- package/dist/types/transpiler/file/fileBrowser.d.ts.map +1 -1
- package/dist/types/transpiler/file/index.d.ts +2 -2
- package/dist/types/transpiler/gender/gender.d.ts +9 -6
- package/dist/types/transpiler/gender/gender.d.ts.map +1 -1
- package/dist/types/transpiler/gender/index.d.ts +2 -2
- package/dist/types/transpiler/index.d.ts +11 -9
- package/dist/types/transpiler/insertion/getInsertionValues.d.ts +4 -1
- package/dist/types/transpiler/insertion/getInsertionValues.d.ts.map +1 -1
- package/dist/types/transpiler/insertion/index.d.ts +3 -3
- package/dist/types/transpiler/insertion/insertion.d.ts +8 -5
- package/dist/types/transpiler/insertion/insertion.d.ts.map +1 -1
- package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts +4 -1
- package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts.map +1 -1
- package/dist/types/transpiler/markdown/index.d.ts +3 -3
- package/dist/types/transpiler/markdown/markdown.d.ts +8 -5
- package/dist/types/transpiler/markdown/markdown.d.ts.map +1 -1
- package/dist/types/transpiler/nesting/index.d.ts +2 -2
- package/dist/types/transpiler/nesting/nesting.d.ts +24 -25
- package/dist/types/transpiler/nesting/nesting.d.ts.map +1 -1
- package/dist/types/transpiler/translation/index.d.ts +2 -2
- package/dist/types/transpiler/translation/translation.d.ts +9 -6
- package/dist/types/transpiler/translation/translation.d.ts.map +1 -1
- package/dist/types/utils/checkIsURLAbsolute.d.ts +4 -1
- package/dist/types/utils/checkIsURLAbsolute.d.ts.map +1 -1
- package/dist/types/utils/intl.d.ts +9 -10
- package/dist/types/utils/intl.d.ts.map +1 -1
- package/dist/types/utils/isSameKeyPath.d.ts +6 -2
- package/dist/types/utils/isSameKeyPath.d.ts.map +1 -1
- package/dist/types/utils/isValidReactElement.d.ts +4 -1
- package/dist/types/utils/isValidReactElement.d.ts.map +1 -1
- package/dist/types/utils/localeStorage.d.ts +105 -0
- package/dist/types/utils/localeStorage.d.ts.map +1 -0
- package/dist/types/utils/parseYaml.d.ts +4 -1
- package/dist/types/utils/parseYaml.d.ts.map +1 -1
- package/package.json +36 -121
- package/LICENSE +0 -202
- package/dist/cjs/deepTranformPlugins/getFilterTranslationsOnlyContent.cjs +0 -130
- package/dist/cjs/deepTranformPlugins/getFilterTranslationsOnlyContent.cjs.map +0 -1
- package/dist/cjs/deepTranformPlugins/getFilteredLocalesContent.cjs +0 -62
- package/dist/cjs/deepTranformPlugins/getFilteredLocalesContent.cjs.map +0 -1
- package/dist/cjs/deepTranformPlugins/getLocalisedContent.cjs +0 -51
- package/dist/cjs/deepTranformPlugins/getLocalisedContent.cjs.map +0 -1
- package/dist/cjs/deepTranformPlugins/getMaskContent.cjs +0 -49
- package/dist/cjs/deepTranformPlugins/getMaskContent.cjs.map +0 -1
- package/dist/cjs/deepTranformPlugins/getMissingLocalesContent.cjs +0 -78
- package/dist/cjs/deepTranformPlugins/getMissingLocalesContent.cjs.map +0 -1
- package/dist/cjs/deepTranformPlugins/getReplacedValuesContent.cjs +0 -82
- package/dist/cjs/deepTranformPlugins/getReplacedValuesContent.cjs.map +0 -1
- package/dist/cjs/deepTranformPlugins/index.cjs +0 -33
- package/dist/cjs/deepTranformPlugins/index.cjs.map +0 -1
- package/dist/cjs/dictionaryManipulator/index.cjs.map +0 -1
- package/dist/cjs/formatters/index.cjs.map +0 -1
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/interpreter/getContent/index.cjs.map +0 -1
- package/dist/cjs/interpreter/getIntlayerAsync.cjs +0 -37
- package/dist/cjs/interpreter/getIntlayerAsync.cjs.map +0 -1
- package/dist/cjs/interpreter/index.cjs.map +0 -1
- package/dist/cjs/localization/index.cjs.map +0 -1
- package/dist/cjs/localization/localeList.cjs +0 -256
- package/dist/cjs/localization/localeList.cjs.map +0 -1
- package/dist/cjs/transpiler/condition/index.cjs.map +0 -1
- package/dist/cjs/transpiler/enumeration/index.cjs.map +0 -1
- package/dist/cjs/transpiler/file/index.cjs.map +0 -1
- package/dist/cjs/transpiler/gender/index.cjs.map +0 -1
- package/dist/cjs/transpiler/index.cjs.map +0 -1
- package/dist/cjs/transpiler/insertion/index.cjs.map +0 -1
- package/dist/cjs/transpiler/markdown/index.cjs.map +0 -1
- package/dist/cjs/transpiler/nesting/index.cjs.map +0 -1
- package/dist/cjs/transpiler/translation/index.cjs.map +0 -1
- package/dist/cjs/types/dictionary.cjs +0 -17
- package/dist/cjs/types/dictionary.cjs.map +0 -1
- package/dist/cjs/types/index.cjs +0 -29
- package/dist/cjs/types/index.cjs.map +0 -1
- package/dist/cjs/types/intlayer.cjs +0 -35
- package/dist/cjs/types/intlayer.cjs.map +0 -1
- package/dist/cjs/types/keyPath.cjs +0 -17
- package/dist/cjs/types/keyPath.cjs.map +0 -1
- package/dist/cjs/types/nodeType.cjs +0 -53
- package/dist/cjs/types/nodeType.cjs.map +0 -1
- package/dist/cjs/types/translation.cjs +0 -17
- package/dist/cjs/types/translation.cjs.map +0 -1
- package/dist/esm/deepTranformPlugins/getFilterTranslationsOnlyContent.mjs +0 -95
- package/dist/esm/deepTranformPlugins/getFilterTranslationsOnlyContent.mjs.map +0 -1
- package/dist/esm/deepTranformPlugins/getFilteredLocalesContent.mjs +0 -40
- package/dist/esm/deepTranformPlugins/getFilteredLocalesContent.mjs.map +0 -1
- package/dist/esm/deepTranformPlugins/getLocalisedContent.mjs +0 -19
- package/dist/esm/deepTranformPlugins/getLocalisedContent.mjs.map +0 -1
- package/dist/esm/deepTranformPlugins/getMaskContent.mjs +0 -24
- package/dist/esm/deepTranformPlugins/getMaskContent.mjs.map +0 -1
- package/dist/esm/deepTranformPlugins/getMissingLocalesContent.mjs +0 -43
- package/dist/esm/deepTranformPlugins/getMissingLocalesContent.mjs.map +0 -1
- package/dist/esm/deepTranformPlugins/getReplacedValuesContent.mjs +0 -60
- package/dist/esm/deepTranformPlugins/getReplacedValuesContent.mjs.map +0 -1
- package/dist/esm/deepTranformPlugins/index.mjs +0 -7
- package/dist/esm/deepTranformPlugins/index.mjs.map +0 -1
- package/dist/esm/dictionaryManipulator/index.mjs.map +0 -1
- package/dist/esm/formatters/index.mjs.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/interpreter/getContent/index.mjs.map +0 -1
- package/dist/esm/interpreter/getIntlayerAsync.mjs +0 -13
- package/dist/esm/interpreter/getIntlayerAsync.mjs.map +0 -1
- package/dist/esm/interpreter/index.mjs.map +0 -1
- package/dist/esm/localization/index.mjs.map +0 -1
- package/dist/esm/localization/localeList.mjs +0 -232
- package/dist/esm/localization/localeList.mjs.map +0 -1
- package/dist/esm/transpiler/condition/index.mjs.map +0 -1
- package/dist/esm/transpiler/enumeration/index.mjs.map +0 -1
- package/dist/esm/transpiler/file/index.mjs.map +0 -1
- package/dist/esm/transpiler/gender/index.mjs.map +0 -1
- package/dist/esm/transpiler/index.mjs.map +0 -1
- package/dist/esm/transpiler/insertion/index.mjs.map +0 -1
- package/dist/esm/transpiler/markdown/index.mjs.map +0 -1
- package/dist/esm/transpiler/nesting/index.mjs.map +0 -1
- package/dist/esm/transpiler/translation/index.mjs.map +0 -1
- package/dist/esm/types/dictionary.mjs +0 -1
- package/dist/esm/types/dictionary.mjs.map +0 -1
- package/dist/esm/types/index.mjs +0 -5
- package/dist/esm/types/index.mjs.map +0 -1
- package/dist/esm/types/intlayer.mjs +0 -13
- package/dist/esm/types/intlayer.mjs.map +0 -1
- package/dist/esm/types/keyPath.mjs +0 -1
- package/dist/esm/types/keyPath.mjs.map +0 -1
- package/dist/esm/types/nodeType.mjs +0 -28
- package/dist/esm/types/nodeType.mjs.map +0 -1
- package/dist/esm/types/translation.mjs +0 -1
- package/dist/esm/types/translation.mjs.map +0 -1
- package/dist/types/deepTranformPlugins/getFilterTranslationsOnlyContent.d.ts +0 -13
- package/dist/types/deepTranformPlugins/getFilterTranslationsOnlyContent.d.ts.map +0 -1
- package/dist/types/deepTranformPlugins/getFilteredLocalesContent.d.ts +0 -5
- package/dist/types/deepTranformPlugins/getFilteredLocalesContent.d.ts.map +0 -1
- package/dist/types/deepTranformPlugins/getLocalisedContent.d.ts +0 -13
- package/dist/types/deepTranformPlugins/getLocalisedContent.d.ts.map +0 -1
- package/dist/types/deepTranformPlugins/getMaskContent.d.ts +0 -6
- package/dist/types/deepTranformPlugins/getMaskContent.d.ts.map +0 -1
- package/dist/types/deepTranformPlugins/getMissingLocalesContent.d.ts +0 -13
- package/dist/types/deepTranformPlugins/getMissingLocalesContent.d.ts.map +0 -1
- package/dist/types/deepTranformPlugins/getReplacedValuesContent.d.ts +0 -4
- package/dist/types/deepTranformPlugins/getReplacedValuesContent.d.ts.map +0 -1
- package/dist/types/deepTranformPlugins/index.d.ts +0 -7
- package/dist/types/deepTranformPlugins/index.d.ts.map +0 -1
- package/dist/types/dictionaryManipulator/index.d.ts.map +0 -1
- package/dist/types/formatters/index.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/interpreter/getContent/index.d.ts.map +0 -1
- package/dist/types/interpreter/getIntlayerAsync.d.ts +0 -13
- package/dist/types/interpreter/getIntlayerAsync.d.ts.map +0 -1
- package/dist/types/interpreter/index.d.ts.map +0 -1
- package/dist/types/localization/index.d.ts.map +0 -1
- package/dist/types/localization/localeList.d.ts +0 -3
- package/dist/types/localization/localeList.d.ts.map +0 -1
- package/dist/types/transpiler/condition/index.d.ts.map +0 -1
- package/dist/types/transpiler/enumeration/index.d.ts.map +0 -1
- package/dist/types/transpiler/file/index.d.ts.map +0 -1
- package/dist/types/transpiler/gender/index.d.ts.map +0 -1
- package/dist/types/transpiler/index.d.ts.map +0 -1
- package/dist/types/transpiler/insertion/index.d.ts.map +0 -1
- package/dist/types/transpiler/markdown/index.d.ts.map +0 -1
- package/dist/types/transpiler/nesting/index.d.ts.map +0 -1
- package/dist/types/transpiler/translation/index.d.ts.map +0 -1
- package/dist/types/types/dictionary.d.ts +0 -307
- package/dist/types/types/dictionary.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -5
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/types/intlayer.d.ts +0 -5
- package/dist/types/types/intlayer.d.ts.map +0 -1
- package/dist/types/types/keyPath.d.ts +0 -47
- package/dist/types/types/keyPath.d.ts.map +0 -1
- package/dist/types/types/nodeType.d.ts +0 -30
- package/dist/types/types/nodeType.d.ts.map +0 -1
- package/dist/types/types/translation.d.ts +0 -25
- package/dist/types/types/translation.d.ts.map +0 -1
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import type { ConditionContent } from '../transpiler/condition';
|
|
2
|
-
import type { EnumerationContent } from '../transpiler/enumeration';
|
|
3
|
-
import type { FileContent } from '../transpiler/file';
|
|
4
|
-
import type { GenderContent } from '../transpiler/gender';
|
|
5
|
-
import type { InsertionContent } from '../transpiler/insertion';
|
|
6
|
-
import type { MarkdownContent } from '../transpiler/markdown';
|
|
7
|
-
import type { NestedContent } from '../transpiler/nesting';
|
|
8
|
-
import type { TranslationContent } from '../transpiler/translation';
|
|
9
|
-
import type { IntlayerDictionaryTypesConnector, LanguageContent, LocalesValues } from './intlayer';
|
|
10
|
-
/**
|
|
11
|
-
* Provides a fallback to string type if the generic type T is undefined,
|
|
12
|
-
* otherwise returns T. This is useful for handling cases where no keys are found.
|
|
13
|
-
* Example: StringFallback<undefined> -> string; StringFallback<'key'> -> 'key'
|
|
14
|
-
*/
|
|
15
|
-
export type StringFallback<T> = T extends undefined ? string : T;
|
|
16
|
-
/**
|
|
17
|
-
* Represents the keys of the IntlayerDictionaryTypesConnector,
|
|
18
|
-
* ensuring they are valid dictionary keys or fallback to string if none exist.
|
|
19
|
-
*
|
|
20
|
-
* Example:
|
|
21
|
-
* ```ts
|
|
22
|
-
* DictionaryKeys -> 'key1' | 'key2'
|
|
23
|
-
* // or if IntlayerDictionaryTypesConnector is not defined,
|
|
24
|
-
* DictionaryKeys -> string
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export type DictionaryKeys = StringFallback<keyof IntlayerDictionaryTypesConnector>;
|
|
28
|
-
type BaseNode = number | string | boolean | null | undefined;
|
|
29
|
-
export type TypedNode<NodeType = undefined> = TranslationContent<NodeType> | EnumerationContent<NodeType> | ConditionContent<NodeType> | InsertionContent<NodeType> | MarkdownContent<NodeType> | NestedContent<DictionaryKeys> | GenderContent<NodeType> | FileContent;
|
|
30
|
-
type FetchableContentNode<NodeType> = (args?: any) => ContentNode<NodeType> | Promise<ContentNode<NodeType>>;
|
|
31
|
-
export type ContentNode<T = undefined, FetchableNode = false, NodeType = T extends undefined ? BaseNode : T> = NodeType | TypedNode<NodeType> | ((args?: any) => ContentNode<NodeType>) | (FetchableNode extends true ? FetchableContentNode<NodeType> : undefined);
|
|
32
|
-
type IsArray<T> = T extends any[] ? true : false;
|
|
33
|
-
type ReplaceContentValueArray<T, FetchableNode> = T extends (infer U)[] ? // Allow either a *single* typed node returning the entire array
|
|
34
|
-
ContentNode<T, FetchableNode> | ReplaceContentValue<U, FetchableNode>[] : never;
|
|
35
|
-
type ReplaceContentValueObject<T, FetchableNode> = {
|
|
36
|
-
[K in keyof T]: ReplaceContentValue<T[K], FetchableNode>;
|
|
37
|
-
};
|
|
38
|
-
type ReplaceContentValue<NodeType, FetchableNode = true> = NodeType extends object ? IsArray<NodeType> extends true ? ReplaceContentValueArray<NodeType, FetchableNode> : ContentNode<NodeType, FetchableNode> | ReplaceContentValueObject<NodeType, FetchableNode> : ContentNode<NodeType, FetchableNode>;
|
|
39
|
-
export type AutoFill = true | string | Partial<LanguageContent<string>>;
|
|
40
|
-
export type LocalDictionaryId = string;
|
|
41
|
-
export type Dictionary<ContentType = undefined, FetchableNode = false> = {
|
|
42
|
-
/**
|
|
43
|
-
* _Auto generated by the intlayer, do not modify it_
|
|
44
|
-
*
|
|
45
|
-
* The schema of the dictionary, used for JSON validation
|
|
46
|
-
*/
|
|
47
|
-
$schema?: string;
|
|
48
|
-
/**
|
|
49
|
-
* _Auto generated by the intlayer, do not modify it_
|
|
50
|
-
*
|
|
51
|
-
* For remote dictionaries, the id is the id of the dictionary in the remote server
|
|
52
|
-
*/
|
|
53
|
-
id?: string;
|
|
54
|
-
/**
|
|
55
|
-
* _Auto generated by the intlayer, do not modify it_
|
|
56
|
-
*
|
|
57
|
-
* Unique Identifier for the dictionaries. Auto generated by the intlayer, it helps to identify the dictionary and know if it is a local or remote dictionary, and his location.
|
|
58
|
-
*/
|
|
59
|
-
localId?: LocalDictionaryId;
|
|
60
|
-
/**
|
|
61
|
-
* _Auto generated by the intlayer, do not modify it_
|
|
62
|
-
*
|
|
63
|
-
* For merged dictionaries, the localIds is the ids of the dictionaries that are merged
|
|
64
|
-
*/
|
|
65
|
-
localIds?: LocalDictionaryId[];
|
|
66
|
-
/**
|
|
67
|
-
* The key of the dictionary. If multiple dictionaries have the same key, intlayer will merge them.
|
|
68
|
-
*
|
|
69
|
-
* As convention, use '-' to separate the words in the key.
|
|
70
|
-
*
|
|
71
|
-
* Example:
|
|
72
|
-
* ```json
|
|
73
|
-
* {
|
|
74
|
-
* "key": "about-page-meta",
|
|
75
|
-
* "content": { ... }
|
|
76
|
-
* }
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
key: string;
|
|
80
|
-
/**
|
|
81
|
-
* The title of the dictionary. Helps to identify the dictionary in the editor, and the CMS.
|
|
82
|
-
*
|
|
83
|
-
* Example:
|
|
84
|
-
* ```json
|
|
85
|
-
* {
|
|
86
|
-
* "key": "about-page-meta",
|
|
87
|
-
* "title": "About Page",
|
|
88
|
-
* "content": { ... }
|
|
89
|
-
* }
|
|
90
|
-
* ```
|
|
91
|
-
*/
|
|
92
|
-
title?: string;
|
|
93
|
-
/**
|
|
94
|
-
* The description of the dictionary. Helps to understand the purpose of the dictionary in the editor, and the CMS.
|
|
95
|
-
* The descrtion is also used as context for translations generation.
|
|
96
|
-
*
|
|
97
|
-
* Example:
|
|
98
|
-
* ```ts
|
|
99
|
-
* {
|
|
100
|
-
* "key": "about-page-meta",
|
|
101
|
-
* "description":[
|
|
102
|
-
* "This dictionary is manage the metadata of the About Page",
|
|
103
|
-
* "Consider good practices for SEO:",
|
|
104
|
-
* "- The title should be between 50 and 60 characters",
|
|
105
|
-
* "- The description should be between 150 and 160 characters",
|
|
106
|
-
* ].join('\n'),
|
|
107
|
-
* "content": { ... }
|
|
108
|
-
* }
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
description?: string;
|
|
112
|
-
/**
|
|
113
|
-
* _Auto generated by the intlayer, do not modify it_
|
|
114
|
-
*
|
|
115
|
-
* The available versions of the remote dictionary. Helps to know the versions of the dictionary that are available.
|
|
116
|
-
*/
|
|
117
|
-
versions?: string[];
|
|
118
|
-
/**
|
|
119
|
-
* _Managable on the CMS, do not modify it locally_
|
|
120
|
-
*
|
|
121
|
-
* The version of the remote dictionary. Helps to know the version of the dictionary that is currently used.
|
|
122
|
-
*/
|
|
123
|
-
version?: string;
|
|
124
|
-
/**
|
|
125
|
-
* _Auto generated by the intlayer, do not modify it_
|
|
126
|
-
*
|
|
127
|
-
* The file path of the local dictionary. Helps to know from what .content file the dictionary has been generated.
|
|
128
|
-
*/
|
|
129
|
-
filePath?: string;
|
|
130
|
-
/**
|
|
131
|
-
* Helps to categorize the dictionaries. The tags can provide more context and instructions for the dictionary.
|
|
132
|
-
*
|
|
133
|
-
* Example:
|
|
134
|
-
* ```json
|
|
135
|
-
* {
|
|
136
|
-
* "key": "about-page-meta",
|
|
137
|
-
* "tags": ["metadata","about-page"]
|
|
138
|
-
* }
|
|
139
|
-
* ```
|
|
140
|
-
*/
|
|
141
|
-
tags?: string[];
|
|
142
|
-
/**
|
|
143
|
-
* Transform the dictionary in a per-locale dictionary.
|
|
144
|
-
* Each field declared in a per-locale dictionary will be transformed in a translation node.
|
|
145
|
-
* If missing, the dictionary will be treated as a multilingual dictionary.
|
|
146
|
-
* If declared, do not use translation nodes in the content.
|
|
147
|
-
*
|
|
148
|
-
* Example:
|
|
149
|
-
* ```json
|
|
150
|
-
* {
|
|
151
|
-
* "key": "about-page",
|
|
152
|
-
* "locale": "en",
|
|
153
|
-
* "content": {
|
|
154
|
-
* "multilingualContent": "English content"
|
|
155
|
-
* }
|
|
156
|
-
* }
|
|
157
|
-
* ```
|
|
158
|
-
*/
|
|
159
|
-
locale?: LocalesValues;
|
|
160
|
-
/**
|
|
161
|
-
* Instruction to auto fill the dictionary.
|
|
162
|
-
* Can also be declared globally in the `intlayer.config.ts` file.
|
|
163
|
-
*
|
|
164
|
-
* Example:
|
|
165
|
-
* ```json
|
|
166
|
-
* {
|
|
167
|
-
* "key": "about-page",
|
|
168
|
-
* "autoFill": true
|
|
169
|
-
* }
|
|
170
|
-
* ```
|
|
171
|
-
* ```json
|
|
172
|
-
* {
|
|
173
|
-
* "key": "about-page",
|
|
174
|
-
* "autoFill": "./aboutPage.content.json"
|
|
175
|
-
* }
|
|
176
|
-
* ```
|
|
177
|
-
* ```json
|
|
178
|
-
* {
|
|
179
|
-
* "key": "about-page",
|
|
180
|
-
* "autoFill": "/messages/{{locale}}/{{key}}/{{fileName}}.content.json"
|
|
181
|
-
* }
|
|
182
|
-
* ```
|
|
183
|
-
* ```json
|
|
184
|
-
* {
|
|
185
|
-
* "key": "about-page",
|
|
186
|
-
* "autoFill": {
|
|
187
|
-
* "fr": "./aboutPage.fr.content.json",
|
|
188
|
-
* "es": "./aboutPage.es.content.json"
|
|
189
|
-
* }
|
|
190
|
-
* }
|
|
191
|
-
* ```
|
|
192
|
-
*
|
|
193
|
-
*/
|
|
194
|
-
autoFill?: AutoFill;
|
|
195
|
-
/**
|
|
196
|
-
* _Auto generated by the intlayer, do not modify it_
|
|
197
|
-
*
|
|
198
|
-
* Indicates if the dictionary has been auto filled.
|
|
199
|
-
* In the case of conflicts, base dictionaryed will override auto filled dictionary.
|
|
200
|
-
*/
|
|
201
|
-
autoFilled?: true;
|
|
202
|
-
/**
|
|
203
|
-
* Indicates the priority of the dictionary.
|
|
204
|
-
* In the case of conflicts, the dictionary with the highest priority will override the other dictionaries.
|
|
205
|
-
*/
|
|
206
|
-
priority?: number;
|
|
207
|
-
/**
|
|
208
|
-
* _Managable on the CMS, do not modify it locally_
|
|
209
|
-
*
|
|
210
|
-
* For remote dictionaries, indicates if the dictionary is live.
|
|
211
|
-
*
|
|
212
|
-
* Will need the `importMode` to be "live" to be effective in the `intlayer.config.ts` file. Will also need the live server to be running.
|
|
213
|
-
*
|
|
214
|
-
* A live dictionary will be fetched at runtime using the live sync API.
|
|
215
|
-
*
|
|
216
|
-
* If live, the dictionary will by transformed to include fetch functions.
|
|
217
|
-
* If not live, the dictionary will be transformed at build time using "dynamic" mode to optimize the number of fetch queries, and load performance.
|
|
218
|
-
*
|
|
219
|
-
* If live but the fetch request fails, the dictionary will return the dynamic value of the dictionary as fallback.
|
|
220
|
-
*
|
|
221
|
-
*/
|
|
222
|
-
live?: boolean;
|
|
223
|
-
/**
|
|
224
|
-
* _Auto generated by the intlayer, do not modify it_
|
|
225
|
-
*
|
|
226
|
-
* Indicates the location of the dictionary.
|
|
227
|
-
*/
|
|
228
|
-
location?: 'distant' | 'locale';
|
|
229
|
-
/**
|
|
230
|
-
* The content of the dictionary.
|
|
231
|
-
*
|
|
232
|
-
* Example:
|
|
233
|
-
* ```tsx
|
|
234
|
-
* import { t, enu, cond, nest, md, insert, file } from "intlayer";
|
|
235
|
-
*
|
|
236
|
-
* export default {
|
|
237
|
-
* key: "about-page-meta",
|
|
238
|
-
* content: {
|
|
239
|
-
* stringContent: "About Page Meta",
|
|
240
|
-
* numberContent: 123,
|
|
241
|
-
* booleanContent: true,
|
|
242
|
-
* multilingualContent: t({
|
|
243
|
-
* en: "About Page Meta",
|
|
244
|
-
* fr: "Meta de la page About",
|
|
245
|
-
* es: "Meta de la página About",
|
|
246
|
-
* }),
|
|
247
|
-
* conditionalContent: cond({
|
|
248
|
-
* true: "About Page Meta",
|
|
249
|
-
* false: "About Page Meta",
|
|
250
|
-
* }),
|
|
251
|
-
* insertionContent: insert("About Page Meta"),
|
|
252
|
-
* nestedContent: nest("about-page"),
|
|
253
|
-
* markdownContent: md("# About Page Meta"),
|
|
254
|
-
* fileContent: file("./path/to/file.txt"),
|
|
255
|
-
* jsxContent: <h1>About Page Meta</h1>,
|
|
256
|
-
* },
|
|
257
|
-
*
|
|
258
|
-
* } satisfies Dictionary<Content>;
|
|
259
|
-
* ```
|
|
260
|
-
*
|
|
261
|
-
* ```json
|
|
262
|
-
* {
|
|
263
|
-
* "key": "about-page-meta",
|
|
264
|
-
* "content": {
|
|
265
|
-
* "stringContent": "About Page Meta",
|
|
266
|
-
* "numberContent": 123,
|
|
267
|
-
* "booleanContent": true,
|
|
268
|
-
* "multilingualContent": {
|
|
269
|
-
* "nodeType": "translation",
|
|
270
|
-
* "translation": {
|
|
271
|
-
* "en": "About Page Meta",
|
|
272
|
-
* "fr": "Meta de la page About",
|
|
273
|
-
* "es": "Meta de la página About",
|
|
274
|
-
* },
|
|
275
|
-
* },
|
|
276
|
-
* "conditionalContent": {
|
|
277
|
-
* "nodeType": "condition",
|
|
278
|
-
* "condition": {
|
|
279
|
-
* "true": "About Page Meta",
|
|
280
|
-
* "false": "About Page Meta",
|
|
281
|
-
* },
|
|
282
|
-
* },
|
|
283
|
-
* "insertionContent": {
|
|
284
|
-
* "nodeType": "insertion",
|
|
285
|
-
* "insertion": "About Page Meta",
|
|
286
|
-
* },
|
|
287
|
-
* "nestedContent": {
|
|
288
|
-
* "nodeType": "nested",
|
|
289
|
-
* "nested": { "dictionaryKey": "about-page" },
|
|
290
|
-
* },
|
|
291
|
-
* "markdownContent": {
|
|
292
|
-
* "nodeType": "markdown",
|
|
293
|
-
* "markdown": "# About Page Meta",
|
|
294
|
-
* },
|
|
295
|
-
* "fileContent": {
|
|
296
|
-
* "nodeType": "file",
|
|
297
|
-
* "file": "./path/to/file.txt",
|
|
298
|
-
* },
|
|
299
|
-
* }
|
|
300
|
-
* }
|
|
301
|
-
* ```
|
|
302
|
-
*/
|
|
303
|
-
content: ContentType extends undefined ? any : ReplaceContentValue<ContentType, FetchableNode> | ContentType;
|
|
304
|
-
};
|
|
305
|
-
export type GetSubPath<T, P> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? GetSubPath<T[K], Rest> : never : P extends keyof T ? T[P] : T;
|
|
306
|
-
export {};
|
|
307
|
-
//# sourceMappingURL=dictionary.d.ts.map
|
|
@@ -1 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ACH,QAAQ,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyEG;IACH,OAAO,EAAE,WAAW,SAAS,SAAS,GAClC,GAAG,GACH,mBAAmB,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,WAAW,CAAC;CACnE,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,IAAI,EAAE,GAC/D,CAAC,SAAS,MAAM,CAAC,GACf,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GACtB,KAAK,GACP,CAAC,SAAS,MAAM,CAAC,GACf,CAAC,CAAC,CAAC,CAAC,GACJ,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intlayer.d.ts","sourceRoot":"","sources":["../../../src/types/intlayer.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,gCAAgC,EAChC,eAAe,EACf,aAAa,GACd,MAAM,UAAU,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { NodeType } from './nodeType';
|
|
2
|
-
export type ObjectNode = {
|
|
3
|
-
type: NodeType.Object;
|
|
4
|
-
key: string;
|
|
5
|
-
};
|
|
6
|
-
export type ArrayNode = {
|
|
7
|
-
type: NodeType.Array;
|
|
8
|
-
key: number;
|
|
9
|
-
};
|
|
10
|
-
export type EnumerationNode = {
|
|
11
|
-
type: NodeType.Enumeration;
|
|
12
|
-
key: string;
|
|
13
|
-
};
|
|
14
|
-
export type TranslationNode = {
|
|
15
|
-
type: NodeType.Translation;
|
|
16
|
-
key: string;
|
|
17
|
-
};
|
|
18
|
-
export type ConditionNode = {
|
|
19
|
-
type: NodeType.Condition;
|
|
20
|
-
key: string;
|
|
21
|
-
};
|
|
22
|
-
export type GenderNode = {
|
|
23
|
-
type: NodeType.Gender;
|
|
24
|
-
key: string;
|
|
25
|
-
};
|
|
26
|
-
export type InsertionNode = {
|
|
27
|
-
type: NodeType.Insertion;
|
|
28
|
-
key?: undefined;
|
|
29
|
-
};
|
|
30
|
-
export type MarkdownNode = {
|
|
31
|
-
type: NodeType.Markdown;
|
|
32
|
-
key?: undefined;
|
|
33
|
-
};
|
|
34
|
-
export type ReactNode = {
|
|
35
|
-
type: NodeType.ReactNode;
|
|
36
|
-
key?: undefined;
|
|
37
|
-
};
|
|
38
|
-
export type NestedNode = {
|
|
39
|
-
type: NodeType.Nested;
|
|
40
|
-
key?: undefined;
|
|
41
|
-
};
|
|
42
|
-
export type FileNode = {
|
|
43
|
-
type: NodeType.File;
|
|
44
|
-
key?: undefined;
|
|
45
|
-
};
|
|
46
|
-
export type KeyPath = ObjectNode | ArrayNode | TranslationNode | EnumerationNode | InsertionNode | GenderNode | MarkdownNode | ReactNode | ConditionNode | NestedNode | FileNode;
|
|
47
|
-
//# sourceMappingURL=keyPath.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keyPath.d.ts","sourceRoot":"","sources":["../../../src/types/keyPath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,QAAQ,CAAC,KAAK,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,GACT,aAAa,GACb,UAAU,GACV,QAAQ,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare enum NodeType {
|
|
2
|
-
Translation = "translation",
|
|
3
|
-
Enumeration = "enumeration",
|
|
4
|
-
Condition = "condition",
|
|
5
|
-
Insertion = "insertion",
|
|
6
|
-
File = "file",
|
|
7
|
-
Object = "object",
|
|
8
|
-
Array = "array",
|
|
9
|
-
Nested = "nested",
|
|
10
|
-
ReactNode = "reactNode",
|
|
11
|
-
Markdown = "markdown",
|
|
12
|
-
Text = "text",
|
|
13
|
-
Number = "number",
|
|
14
|
-
Boolean = "boolean",
|
|
15
|
-
Gender = "gender",
|
|
16
|
-
Unknown = "unknown"
|
|
17
|
-
}
|
|
18
|
-
type AdditionalAttributesType = {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
21
|
-
export type TypedNodeModel<T extends NodeType, Content, AdditionalAttributes extends AdditionalAttributesType = {}> = {
|
|
22
|
-
nodeType: T | `${T}`;
|
|
23
|
-
} & {
|
|
24
|
-
[K in T]: Content;
|
|
25
|
-
} & AdditionalAttributes;
|
|
26
|
-
export declare const formatNodeType: <T extends NodeType, Content = any, AdditionalAttributes extends AdditionalAttributesType = {}>(nodeType: T | `${T}`, content: Content, additionalAttributes?: {
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
}) => TypedNodeModel<T, Content, AdditionalAttributes>;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=nodeType.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nodeType.d.ts","sourceRoot":"","sources":["../../../src/types/nodeType.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,KAAK,wBAAwB,GAAG;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,CACxB,CAAC,SAAS,QAAQ,EAClB,OAAO,EACP,oBAAoB,SAAS,wBAAwB,GAAG,EAAE,IACxD;IACF,QAAQ,EAAE,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC;CACtB,GAAG;KACD,CAAC,IAAI,CAAC,GAAG,OAAO;CAClB,GAAG,oBAAoB,CAAC;AAEzB,eAAO,MAAM,cAAc,GACzB,CAAC,SAAS,QAAQ,EAClB,OAAO,GAAG,GAAG,EACb,oBAAoB,SAAS,wBAAwB,GAAG,EAAE,EAE1D,UAAU,CAAC,GAAG,GAAG,CAAC,EAAE,EACpB,SAAS,OAAO,EAChB,uBAAuB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,KAMvC,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { LocalesValues } from '@intlayer/config/client';
|
|
2
|
-
import type { IConfigLocales } from './intlayer';
|
|
3
|
-
/**
|
|
4
|
-
* If module augmented, it will return the configured locales such as Locales.ENGLISH | Locales.FRENCH | Locales.SPANISH | ...
|
|
5
|
-
* If not, it will return never
|
|
6
|
-
*/
|
|
7
|
-
export type ConfigLocales = keyof IConfigLocales<unknown>;
|
|
8
|
-
/**
|
|
9
|
-
* Record of locales and content
|
|
10
|
-
*
|
|
11
|
-
* const myVar1: TranslationContentState<string> = {
|
|
12
|
-
* "en": "",
|
|
13
|
-
* "fr": ""
|
|
14
|
-
* }
|
|
15
|
-
*
|
|
16
|
-
* const myVar2: TranslationContentState<{age: number, name: string}> = {
|
|
17
|
-
* "en": {age: 1, name: "test"},
|
|
18
|
-
* "fr": {age: 1, name: "test"}
|
|
19
|
-
* }
|
|
20
|
-
*/
|
|
21
|
-
export type TranslationContentState<Content = unknown> = {
|
|
22
|
-
[locale in LocalesValues]?: Content;
|
|
23
|
-
};
|
|
24
|
-
export type LanguageContent<Content = unknown> = keyof IConfigLocales<unknown> extends never ? TranslationContentState<Content> : IConfigLocales<Content>;
|
|
25
|
-
//# sourceMappingURL=translation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"translation.d.ts","sourceRoot":"","sources":["../../../src/types/translation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uBAAuB,CAAC,OAAO,GAAG,OAAO,IAAI;KACtD,MAAM,IAAI,aAAa,CAAC,CAAC,EAAE,OAAO;CACpC,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,OAAO,GAAG,OAAO,IAC3C,MAAM,cAAc,CAAC,OAAO,CAAC,SAAS,KAAK,GACvC,uBAAuB,CAAC,OAAO,CAAC,GAChC,cAAc,CAAC,OAAO,CAAC,CAAC"}
|