@intlayer/core 6.1.6 → 7.0.0-canary.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 +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
package/dist/types/index.d.ts
CHANGED
|
@@ -1,13 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { ConditionContent, ConditionContentStates, cond as condition } from "./transpiler/condition/condition.js";
|
|
2
|
+
import { EnterFormat, EnumerationContent, EnumerationContentState, enu as enumeration } from "./transpiler/enumeration/enumeration.js";
|
|
3
|
+
import { FileContent, FileContentConstructor, file, fileContent } from "./transpiler/file/file.js";
|
|
4
|
+
import { Gender, GenderContent, GenderContentStates, gender } from "./transpiler/gender/gender.js";
|
|
5
|
+
import { getInsertionValues } from "./transpiler/insertion/getInsertionValues.js";
|
|
6
|
+
import { InsertionContent, InsertionContentConstructor, insert as insertion } from "./transpiler/insertion/insertion.js";
|
|
7
|
+
import { getMarkdownMetadata } from "./transpiler/markdown/getMarkdownMetadata.js";
|
|
8
|
+
import { MarkdownContent, MarkdownContentConstructor, md as markdown } from "./transpiler/markdown/markdown.js";
|
|
9
|
+
import { DotPath, NestedContent, NestedContentState, ValidDotPathsFor, nest as nesting } from "./transpiler/nesting/nesting.js";
|
|
10
|
+
import { TranslationContent, t as translation } from "./transpiler/translation/translation.js";
|
|
11
|
+
import { getCondition } from "./interpreter/getCondition.js";
|
|
12
|
+
import { GetNestingResult, getNesting } from "./interpreter/getNesting.js";
|
|
13
|
+
import { ConditionCond, DeepTransformContent, EnumerationCond, FileCond, GenderCond, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, IsAny, NestedCond, NodeProps, Plugins, TranslationCond, conditionPlugin, enumerationPlugin, filePlugin, genderPlugin, insertionPlugin, nestedPlugin, translationPlugin } from "./interpreter/getContent/plugins.js";
|
|
14
|
+
import { deepTransformNode } from "./interpreter/getContent/deepTransform.js";
|
|
15
|
+
import { getContent } from "./interpreter/getContent/getContent.js";
|
|
16
|
+
import { getDictionary } from "./interpreter/getDictionary.js";
|
|
17
|
+
import { findMatchingCondition, getEnumeration } from "./interpreter/getEnumeration.js";
|
|
18
|
+
import { getIntlayer } from "./interpreter/getIntlayer.js";
|
|
19
|
+
import { getTranslation } from "./interpreter/getTranslation.js";
|
|
20
|
+
import { filterMissingTranslationsOnlyPlugin, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary } from "./deepTransformPlugins/getFilterMissingTranslationsContent.js";
|
|
21
|
+
import { filterTranslationsOnlyPlugin, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary } from "./deepTransformPlugins/getFilterTranslationsOnlyContent.js";
|
|
22
|
+
import { getFilteredLocalesContent, getFilteredLocalesDictionary } from "./deepTransformPlugins/getFilteredLocalesContent.js";
|
|
23
|
+
import { getLocalizedContent, getPerLocaleDictionary } from "./deepTransformPlugins/getLocalizedContent.js";
|
|
24
|
+
import { buildMaskPlugin, getMaskContent } from "./deepTransformPlugins/getMaskContent.js";
|
|
25
|
+
import { checkMissingLocalesPlugin, getMissingLocalesContent } from "./deepTransformPlugins/getMissingLocalesContent.js";
|
|
26
|
+
import { getReplacedValuesContent } from "./deepTransformPlugins/getReplacedValuesContent.js";
|
|
27
|
+
import { insertContentInDictionary } from "./deepTransformPlugins/insertContentInDictionary.js";
|
|
28
|
+
import { editDictionaryByKeyPath } from "./dictionaryManipulator/editDictionaryByKeyPath.js";
|
|
29
|
+
import { getContentNodeByKeyPath } from "./dictionaryManipulator/getContentNodeByKeyPath.js";
|
|
30
|
+
import { getDefaultNode } from "./dictionaryManipulator/getDefaultNode.js";
|
|
31
|
+
import { getEmptyNode } from "./dictionaryManipulator/getEmptyNode.js";
|
|
32
|
+
import { getNodeChildren } from "./dictionaryManipulator/getNodeChildren.js";
|
|
33
|
+
import { getNodeType } from "./dictionaryManipulator/getNodeType.js";
|
|
34
|
+
import { getUnmergedDictionaryByKeyPath } from "./dictionaryManipulator/getUnmergedDictionaryByKeyPath.js";
|
|
35
|
+
import { mergeDictionaries } from "./dictionaryManipulator/mergeDictionaries.js";
|
|
36
|
+
import { normalizeDictionaries, normalizeDictionary } from "./dictionaryManipulator/normalizeDictionary.js";
|
|
37
|
+
import { orderDictionaries } from "./dictionaryManipulator/orderDictionaries.js";
|
|
38
|
+
import { removeContentNodeByKeyPath } from "./dictionaryManipulator/removeContentNodeByKeyPath.js";
|
|
39
|
+
import { renameContentNodeByKeyPath } from "./dictionaryManipulator/renameContentNodeByKeyPath.js";
|
|
40
|
+
import { updateNodeChildren } from "./dictionaryManipulator/updateNodeChildren.js";
|
|
41
|
+
import { compact } from "./formatters/compact.js";
|
|
42
|
+
import { currency } from "./formatters/currency.js";
|
|
43
|
+
import { date } from "./formatters/date.js";
|
|
44
|
+
import { list } from "./formatters/list.js";
|
|
45
|
+
import { number } from "./formatters/number.js";
|
|
46
|
+
import { percentage } from "./formatters/percentage.js";
|
|
47
|
+
import { relativeTime } from "./formatters/relativeTime.js";
|
|
48
|
+
import { units } from "./formatters/units.js";
|
|
49
|
+
import { StorageAttributes, getStorageAttributes } from "./getStorageAttributes.js";
|
|
50
|
+
import { LocaleStorage, LocaleStorageOptions, getLocaleFromStorage, setLocaleInStorage } from "./utils/localeStorage.js";
|
|
51
|
+
import { getBrowserLocale, localeStorageOptions } from "./localization/getBrowserLocale.js";
|
|
52
|
+
import { getHTMLTextDir } from "./localization/getHTMLTextDir.js";
|
|
53
|
+
import { getLocaleFromPath } from "./localization/getLocaleFromPath.js";
|
|
54
|
+
import { getLocaleLang } from "./localization/getLocaleLang.js";
|
|
55
|
+
import { getLocaleName } from "./localization/getLocaleName.js";
|
|
56
|
+
import { getLocalizedUrl } from "./localization/getLocalizedUrl.js";
|
|
57
|
+
import { getMultilingualUrls } from "./localization/getMultilingualUrls.js";
|
|
58
|
+
import { getPathWithoutLocale } from "./localization/getPathWithoutLocale.js";
|
|
59
|
+
import { localeDetector } from "./localization/localeDetector.js";
|
|
60
|
+
import { localeFlatMap, localeMap, localeRecord } from "./localization/localeMapper.js";
|
|
61
|
+
import { localeResolver } from "./localization/localeResolver.js";
|
|
62
|
+
import { checkIsURLAbsolute } from "./utils/checkIsURLAbsolute.js";
|
|
63
|
+
import { CachedIntl, createCachedIntl } from "./utils/intl.js";
|
|
64
|
+
import { isSameKeyPath } from "./utils/isSameKeyPath.js";
|
|
65
|
+
import { isValidElement } from "./utils/isValidReactElement.js";
|
|
66
|
+
import { parseYaml } from "./utils/parseYaml.js";
|
|
67
|
+
export { CachedIntl, CachedIntl as Intl, ConditionCond, ConditionContent, ConditionContentStates, DeepTransformContent, DotPath, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, FileCond, FileContent, FileContentConstructor, Gender, GenderCond, GenderContent, GenderContentStates, GetNestingResult, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, InsertionContent, InsertionContentConstructor, IsAny, LocaleStorage, LocaleStorageOptions, MarkdownContent, MarkdownContentConstructor, NestedCond, NestedContent, NestedContentState, NodeProps, Plugins, StorageAttributes, TranslationCond, TranslationContent, ValidDotPathsFor, buildMaskPlugin, checkIsURLAbsolute, checkMissingLocalesPlugin, compact, condition as cond, conditionPlugin, createCachedIntl, currency, date, deepTransformNode, editDictionaryByKeyPath, enumeration as enu, enumerationPlugin, file, fileContent, filePlugin, filterMissingTranslationsOnlyPlugin, filterTranslationsOnlyPlugin, findMatchingCondition, gender, genderPlugin, getBrowserLocale, getCondition, getContent, getContentNodeByKeyPath, getDefaultNode, getDictionary, getEmptyNode, getEnumeration, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary, getFilteredLocalesContent, getFilteredLocalesDictionary, getHTMLTextDir, getInsertionValues, getIntlayer, getLocaleFromPath, getLocaleFromStorage, getLocaleLang, getLocaleName, getLocalizedContent, getLocalizedUrl, getMarkdownMetadata, getMaskContent, getMissingLocalesContent, getMultilingualUrls, getNesting, getNodeChildren, getNodeType, getPathWithoutLocale, getPerLocaleDictionary, getReplacedValuesContent, getStorageAttributes, getTranslation, getUnmergedDictionaryByKeyPath, insertion as insert, insertContentInDictionary, insertionPlugin, isSameKeyPath, isValidElement, list, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, markdown as md, mergeDictionaries, nesting as nest, nestedPlugin, normalizeDictionaries, normalizeDictionary, number, orderDictionaries, parseYaml, percentage, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, setLocaleInStorage, translation as t, translationPlugin, units, updateNodeChildren };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ConditionContentStates } from "../transpiler/condition/condition.js";
|
|
2
|
+
|
|
3
|
+
//#region src/interpreter/getCondition.d.ts
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
* Allow to pick a content based on a condition.
|
|
4
7
|
*
|
|
@@ -21,5 +24,7 @@ import type { ConditionContentStates } from '../transpiler/condition/condition';
|
|
|
21
24
|
* }, undefined);
|
|
22
25
|
* // 'The condition is validated'
|
|
23
26
|
*/
|
|
24
|
-
|
|
27
|
+
declare const getCondition: <Content>(conditionContent: ConditionContentStates<Content>, state?: boolean) => Content;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { getCondition };
|
|
25
30
|
//# sourceMappingURL=getCondition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCondition.d.ts","
|
|
1
|
+
{"version":3,"file":"getCondition.d.ts","names":[],"sources":["../../../src/interpreter/getCondition.ts"],"sourcesContent":[],"mappings":";;;;;;AAwBA;;;;;;;;;;;;;;;;;;;;cAAa,0CACO,uBAAuB,8BAExC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NodeProps } from "./plugins.js";
|
|
2
|
+
|
|
3
|
+
//#region src/interpreter/getContent/deepTransform.d.ts
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
* Recursively traverses a node (object/array/primitive).
|
|
4
7
|
* Applies the *first* plugin that can transform a node, then stops descending further.
|
|
5
8
|
* If no plugin transforms it, it recurses into its children.
|
|
6
9
|
*/
|
|
7
|
-
|
|
10
|
+
declare const deepTransformNode: (node: any, props: NodeProps) => any;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { deepTransformNode };
|
|
8
13
|
//# sourceMappingURL=deepTransform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepTransform.d.ts","
|
|
1
|
+
{"version":3,"file":"deepTransform.d.ts","names":[],"sources":["../../../../src/interpreter/getContent/deepTransform.ts"],"sourcesContent":[],"mappings":";;;;;;AAQA;;;cAAa,sCAAuC"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { DeepTransformContent, IInterpreterPluginState, NodeProps } from "./plugins.js";
|
|
2
|
+
import { ContentNode, DeclaredLocales, LocalesValues } from "@intlayer/types";
|
|
3
|
+
|
|
4
|
+
//#region src/interpreter/getContent/getContent.d.ts
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* Transforms a node in a single pass, applying each plugin as needed.
|
|
6
8
|
*
|
|
7
9
|
* @param node The node to transform.
|
|
8
10
|
* @param locale The locale to use if your transformers need it (e.g. for translations).
|
|
9
11
|
*/
|
|
10
|
-
|
|
12
|
+
declare const getContent: <T extends ContentNode, L extends LocalesValues = DeclaredLocales>(node: T, nodeProps: NodeProps, locale?: L) => DeepTransformContent<T, IInterpreterPluginState, L>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { getContent };
|
|
11
15
|
//# sourceMappingURL=getContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getContent.d.ts","
|
|
1
|
+
{"version":3,"file":"getContent.d.ts","names":[],"sources":["../../../../src/interpreter/getContent/getContent.ts"],"sourcesContent":[],"mappings":";;;;;;;AA0BA;;;;AAIQ,cAJK,UAIL,EAAA,CAAA,UAHI,WAGJ,EAAA,UAFI,aAEJ,GAFoB,eAEpB,CAAA,CAAA,IAAA,EAAA,CAAA,EAAA,SAAA,EACK,SADL,EAAA,MAAA,CAAA,EAEG,CAFH,EAAA,GAmBA,oBAnBA,CAmBqB,CAnBrB,EAmBwB,uBAnBxB,EAmBiD,CAnBjD,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ConditionCond, DeepTransformContent, EnumerationCond, FileCond, GenderCond, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, IsAny, NestedCond, NodeProps, Plugins, TranslationCond, conditionPlugin, enumerationPlugin, filePlugin, genderPlugin, insertionPlugin, nestedPlugin, translationPlugin } from "./plugins.js";
|
|
2
|
+
import { deepTransformNode } from "./deepTransform.js";
|
|
3
|
+
import { getContent } from "./getContent.js";
|
|
4
|
+
export { ConditionCond, DeepTransformContent, EnumerationCond, FileCond, GenderCond, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, IsAny, NestedCond, NodeProps, Plugins, TranslationCond, conditionPlugin, deepTransformNode, enumerationPlugin, filePlugin, genderPlugin, getContent, insertionPlugin, nestedPlugin, translationPlugin };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { Gender } from "../../transpiler/gender/gender.js";
|
|
2
|
+
import { GetNestingResult } from "../getNesting.js";
|
|
3
|
+
import { DeclaredLocales, DictionaryKeys, KeyPath, Locale, LocalesValues, NodeType } from "@intlayer/types";
|
|
4
|
+
|
|
5
|
+
//#region src/interpreter/getContent/plugins.d.ts
|
|
6
|
+
|
|
5
7
|
/** ---------------------------------------------
|
|
6
8
|
* PLUGIN DEFINITION
|
|
7
9
|
* --------------------------------------------- */
|
|
@@ -12,75 +14,75 @@ import { type GetNestingResult } from '../getNesting';
|
|
|
12
14
|
*
|
|
13
15
|
* > `transformFn` is a function that can be used to deeply transform inside the plugin.
|
|
14
16
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
type Plugins = {
|
|
18
|
+
id: string;
|
|
19
|
+
canHandle: (node: any) => boolean;
|
|
20
|
+
transform: (node: any, props: NodeProps, transformFn: (node: any, props: NodeProps) => any) => any;
|
|
19
21
|
};
|
|
20
22
|
/** ---------------------------------------------
|
|
21
23
|
* TRANSLATION PLUGIN
|
|
22
24
|
* --------------------------------------------- */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} ? DeepTransformContent<
|
|
25
|
+
type TranslationCond<T, S, L extends LocalesValues> = T extends {
|
|
26
|
+
nodeType: NodeType | string;
|
|
27
|
+
[NodeType.Translation]: infer U;
|
|
28
|
+
} ? U extends Record<PropertyKey, unknown> ? L extends keyof U ? DeepTransformContent<U[L], S> : DeepTransformContent<U[keyof U], S> : never : never;
|
|
27
29
|
/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */
|
|
28
|
-
|
|
30
|
+
declare const translationPlugin: (locale: LocalesValues, fallback?: LocalesValues) => Plugins;
|
|
29
31
|
/** ---------------------------------------------
|
|
30
32
|
* ENUMERATION PLUGIN
|
|
31
33
|
* --------------------------------------------- */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
type EnumerationCond<T, S, L> = T extends {
|
|
35
|
+
nodeType: NodeType | string;
|
|
36
|
+
[NodeType.Enumeration]: object;
|
|
35
37
|
} ? (quantity: number) => DeepTransformContent<T[NodeType.Enumeration][keyof T[NodeType.Enumeration]], S> : never;
|
|
36
38
|
/** Enumeration plugin. Replaces node with a function that takes quantity => string. */
|
|
37
|
-
|
|
39
|
+
declare const enumerationPlugin: Plugins;
|
|
38
40
|
/** ---------------------------------------------
|
|
39
41
|
* CONDITION PLUGIN
|
|
40
42
|
* --------------------------------------------- */
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
type ConditionCond<T, S, L> = T extends {
|
|
44
|
+
nodeType: NodeType | string;
|
|
45
|
+
[NodeType.Condition]: object;
|
|
44
46
|
} ? (value: boolean) => DeepTransformContent<T[NodeType.Condition][keyof T[NodeType.Condition]], S> : never;
|
|
45
47
|
/** Condition plugin. Replaces node with a function that takes boolean => string. */
|
|
46
|
-
|
|
48
|
+
declare const conditionPlugin: Plugins;
|
|
47
49
|
/** ---------------------------------------------
|
|
48
50
|
* GENDER PLUGIN
|
|
49
51
|
* --------------------------------------------- */
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
type GenderCond<T, S, L> = T extends {
|
|
53
|
+
nodeType: NodeType | string;
|
|
54
|
+
[NodeType.Gender]: object;
|
|
53
55
|
} ? (value: Gender) => DeepTransformContent<T[NodeType.Gender][keyof T[NodeType.Gender]], S> : never;
|
|
54
56
|
/** Gender plugin. Replaces node with a function that takes gender => string. */
|
|
55
|
-
|
|
57
|
+
declare const genderPlugin: Plugins;
|
|
56
58
|
/** ---------------------------------------------
|
|
57
59
|
* INSERTION PLUGIN
|
|
58
60
|
* --------------------------------------------- */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
type InsertionCond<T, S, L> = T extends {
|
|
62
|
+
nodeType: NodeType | string;
|
|
63
|
+
[NodeType.Insertion]: infer I;
|
|
64
|
+
fields?: infer U;
|
|
63
65
|
} ? U extends readonly string[] ? (data: Record<U[number], string | number>) => DeepTransformContent<I, S> : (data: Record<string, string | number>) => DeepTransformContent<I, S> : never;
|
|
64
|
-
|
|
66
|
+
declare const insertionPlugin: Plugins;
|
|
65
67
|
/** ---------------------------------------------
|
|
66
68
|
* NESTED PLUGIN
|
|
67
69
|
* --------------------------------------------- */
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
type NestedCond<T, S, L> = T extends {
|
|
71
|
+
nodeType: NodeType | string;
|
|
72
|
+
[NodeType.Nested]: infer U;
|
|
71
73
|
} ? U extends {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
dictionaryKey: infer K extends DictionaryKeys;
|
|
75
|
+
path?: infer P;
|
|
74
76
|
} ? GetNestingResult<K, P, S> : never : never;
|
|
75
77
|
/** Nested plugin. Replaces node with the result of `getNesting`. */
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
declare const nestedPlugin: Plugins;
|
|
79
|
+
type FileCond<T> = T extends {
|
|
80
|
+
nodeType: NodeType | string;
|
|
81
|
+
[NodeType.File]: string;
|
|
82
|
+
content?: string;
|
|
81
83
|
} ? string : never;
|
|
82
84
|
/** File plugin. Replaces node with the result of `getNesting`. */
|
|
83
|
-
|
|
85
|
+
declare const filePlugin: Plugins;
|
|
84
86
|
/**
|
|
85
87
|
* PLUGIN RESULT
|
|
86
88
|
*/
|
|
@@ -88,48 +90,48 @@ export declare const filePlugin: Plugins;
|
|
|
88
90
|
* Interface that defines the properties of a node.
|
|
89
91
|
* This interface can be augmented in other packages, such as `react-intlayer`.
|
|
90
92
|
*/
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
interface NodeProps {
|
|
94
|
+
dictionaryKey: string;
|
|
95
|
+
keyPath: KeyPath[];
|
|
96
|
+
plugins?: Plugins[];
|
|
97
|
+
locale?: Locale;
|
|
98
|
+
dictionaryPath?: string;
|
|
99
|
+
children?: any;
|
|
98
100
|
}
|
|
99
101
|
/**
|
|
100
102
|
* Interface that defines the plugins that can be used to transform a node.
|
|
101
103
|
* This interface can be augmented in other packages, such as `react-intlayer`.
|
|
102
104
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
interface IInterpreterPlugin<T, S, L extends LocalesValues> {
|
|
106
|
+
translation: TranslationCond<T, S, L>;
|
|
107
|
+
insertion: InsertionCond<T, S, L>;
|
|
108
|
+
enumeration: EnumerationCond<T, S, L>;
|
|
109
|
+
condition: ConditionCond<T, S, L>;
|
|
110
|
+
nested: NestedCond<T, S, L>;
|
|
109
111
|
}
|
|
110
112
|
/**
|
|
111
113
|
* Allow to avoid overwriting import from `intlayer` package when `IInterpreterPlugin<T>` interface is augmented in another package, such as `react-intlayer`.
|
|
112
114
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
type IInterpreterPluginState = {
|
|
116
|
+
translation: true;
|
|
117
|
+
enumeration: true;
|
|
118
|
+
condition: true;
|
|
119
|
+
insertion: true;
|
|
120
|
+
nested: true;
|
|
119
121
|
};
|
|
120
122
|
/**
|
|
121
123
|
* Utility type to check if a plugin can be applied to a node.
|
|
122
124
|
*/
|
|
123
|
-
type CheckApplyPlugin<T, K extends keyof IInterpreterPlugin<T, S>, S> = K extends keyof S ? S[K] extends true ? IInterpreterPlugin<T, S>[K] extends never ? never : IInterpreterPlugin<T, S>[K] : never : never;
|
|
125
|
+
type CheckApplyPlugin<T, K$1 extends keyof IInterpreterPlugin<T, S, L>, S, L extends LocalesValues = DeclaredLocales> = K$1 extends keyof S ? S[K$1] extends true ? IInterpreterPlugin<T, S, L>[K$1] extends never ? never : IInterpreterPlugin<T, S, L>[K$1] : never : never;
|
|
124
126
|
/**
|
|
125
127
|
* Traverse recursively through an object or array, applying each plugin as needed.
|
|
126
128
|
*/
|
|
127
|
-
type Traverse<T, S> = T extends ReadonlyArray<infer U> ? Array<DeepTransformContent<U, S>> : T extends object ? {
|
|
128
|
-
|
|
129
|
-
} : T;
|
|
129
|
+
type Traverse<T, S, L extends LocalesValues = DeclaredLocales> = T extends ReadonlyArray<infer U> ? Array<DeepTransformContent<U, S, L>> : T extends object ? { [K in keyof T]: DeepTransformContent<T[K], S, L> } : T;
|
|
130
|
+
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
130
131
|
/**
|
|
131
132
|
* Traverse recursively through an object or array, applying each plugin as needed.
|
|
132
133
|
*/
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
type DeepTransformContent<T, S = IInterpreterPluginState, L extends LocalesValues = DeclaredLocales> = IsAny<T> extends true ? T : CheckApplyPlugin<T, keyof IInterpreterPlugin<T, S, L>, S> extends never ? Traverse<T, S, L> : IInterpreterPlugin<T, S, L>[keyof IInterpreterPlugin<T, S, L>];
|
|
135
|
+
//#endregion
|
|
136
|
+
export { ConditionCond, DeepTransformContent, EnumerationCond, FileCond, GenderCond, IInterpreterPlugin, IInterpreterPluginState, InsertionCond, IsAny, NestedCond, NodeProps, Plugins, TranslationCond, conditionPlugin, enumerationPlugin, filePlugin, genderPlugin, insertionPlugin, nestedPlugin, translationPlugin };
|
|
135
137
|
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../../../src/interpreter/getContent/plugins.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAoCA;AAcA;;;;;;;AAIc,KAlBF,OAAA,GAkBE;EACR,EAAA,EAAA,MAAA;EAAgB,SAAA,EAAA,CAAA,IAAA,EAAA,GAAA,EAAA,GAAA,OAAA;EACO,SAAA,EAAA,CAAA,IAAA,EAAA,GAAA,EAAA,KAAA,EAflB,SAekB,EAAA,WAAA,EAAA,CAAA,IAAA,EAAA,GAAA,EAAA,KAAA,EAdO,SAcP,EAAA,GAAA,GAAA,EAAA,GAAA,GAAA;CAAE;;;;AACM,KAPzB,eAOyB,CAAA,CAAA,EAAA,CAAA,EAAA,UAPO,aAOP,CAAA,GAPwB,CAOxB,SAAA;EAAI,QAAA,EAN7B,QAM6B,GAAA,MAAA;EAAjC,CALL,QAAA,CAAS,WAAA,CAKJ,EAAA,KAAA,EAAA;CAAoB,GAHxB,CAGw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T,EAsCY,CAtCZ,EAsCe,CAtCf,CAAA,EAsCmB,CAtCnB,CAAA,SAAA,KAAA,GAwClC,QAxCkC,CAwCzB,CAxCyB,EAwCtB,CAxCsB,EAwCnB,CAxCmB,CAAA,GA0ClC,kBA1CkC,CA0Cf,CA1Ce,EA0CZ,CA1CY,EA0CT,CA1CS,CAAA,CAAA,MA0CA,kBA1CA,CA0CmB,CA1CnB,EA0CsB,CA1CtB,EA0CyB,CA1CzB,CAAA,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { DeepTransformContent, IInterpreterPluginState, Plugins } from "./getContent/plugins.js";
|
|
2
|
+
import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
3
|
+
|
|
4
|
+
//#region src/interpreter/getDictionary.d.ts
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* Transforms a dictionary in a single pass, applying each plugin as needed.
|
|
6
8
|
*
|
|
@@ -9,5 +11,7 @@ import type { Plugins, DeepTransformContent } from './getContent';
|
|
|
9
11
|
* @param additionalPlugins An array of NodeTransformer that define how to transform recognized nodes.
|
|
10
12
|
* If omitted, we’ll use a default set of plugins.
|
|
11
13
|
*/
|
|
12
|
-
|
|
14
|
+
declare const getDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L, plugins?: Plugins[]) => DeepTransformContent<T["content"], IInterpreterPluginState, L>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { getDictionary };
|
|
13
17
|
//# sourceMappingURL=getDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../../src/interpreter/getDictionary.ts"],"sourcesContent":[],"mappings":";;;;;;;AAqBA;;;;;;AAMY,cANC,aAMD,EAAA,CAAA,UALA,UAKA,EAAA,UAJA,aAIA,GAJgB,eAIhB,CAAA,CAAA,UAAA,EAFE,CAEF,EAAA,MAAA,CAAA,EADD,CACC,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,EAAA,GACT,oBADS,CACY,CADZ,CAAA,SAAA,CAAA,EAC0B,uBAD1B,EACmD,CADnD,CAAA"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EnterFormat, EnumerationContentState } from "../transpiler/enumeration/enumeration.js";
|
|
2
|
+
|
|
3
|
+
//#region src/interpreter/getEnumeration.d.ts
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
* Find the matching condition for a quantity.
|
|
4
7
|
*
|
|
@@ -26,7 +29,7 @@ import type { EnterFormat, EnumerationContentState } from '../transpiler/enumera
|
|
|
26
29
|
*
|
|
27
30
|
* If no keys match, the default key is '1'.
|
|
28
31
|
*/
|
|
29
|
-
|
|
32
|
+
declare const findMatchingCondition: <Content>(enumerationContent: EnumerationContentState<Content>, quantity: number) => EnterFormat;
|
|
30
33
|
/**
|
|
31
34
|
* Allow to pick a content based on a quantity.
|
|
32
35
|
*
|
|
@@ -53,5 +56,7 @@ export declare const findMatchingCondition: <Content>(enumerationContent: Enumer
|
|
|
53
56
|
* ```
|
|
54
57
|
*
|
|
55
58
|
*/
|
|
56
|
-
|
|
59
|
+
declare const getEnumeration: <Content>(enumerationContent: EnumerationContentState<Content>, quantity: number) => Content;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { findMatchingCondition, getEnumeration };
|
|
57
62
|
//# sourceMappingURL=getEnumeration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEnumeration.d.ts","
|
|
1
|
+
{"version":3,"file":"getEnumeration.d.ts","names":[],"sources":["../../../src/interpreter/getEnumeration.ts"],"sourcesContent":[],"mappings":";;;;;;AA6BA;;;;;AA4DA;;;;;;;;;;;;;;;;;;;;cA5Da,qDACS,wBAAwB,+BAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyDU,8CACS,wBAAwB,+BAE3C"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { Gender, GenderContentStates } from "../transpiler/gender/gender.js";
|
|
2
|
+
|
|
3
|
+
//#region src/interpreter/getGender.d.ts
|
|
4
|
+
type GenderEntry = Gender | 'm' | 'f';
|
|
3
5
|
/**
|
|
4
6
|
* Allow to pick a content based on a gender.
|
|
5
7
|
*
|
|
@@ -22,6 +24,7 @@ type GederEntry = Gender | 'm' | 'f';
|
|
|
22
24
|
* }, undefined);
|
|
23
25
|
* // 'The gender is validated'
|
|
24
26
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
declare const getGender: <Content>(genderContent: GenderContentStates<Content>, gender: GenderEntry) => Content;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { getGender };
|
|
27
30
|
//# sourceMappingURL=getGender.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGender.d.ts","
|
|
1
|
+
{"version":3,"file":"getGender.d.ts","names":[],"sources":["../../../src/interpreter/getGender.ts"],"sourcesContent":[],"mappings":";;;KAEK,WAAA,GAAc;;AAF8C;AAgCjE;;;;;;;;;;;;;;;;;;;;cAAa,oCACI,oBAAoB,kBAC3B,gBACP"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { InsertionContent } from "../transpiler/insertion/insertion.js";
|
|
2
|
+
|
|
3
|
+
//#region src/interpreter/getInsertion.d.ts
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
6
|
* Allow to insert values in a string.
|
|
4
7
|
*
|
|
@@ -12,5 +15,7 @@ import type { InsertionContent } from '../transpiler';
|
|
|
12
15
|
* ```
|
|
13
16
|
*
|
|
14
17
|
*/
|
|
15
|
-
|
|
18
|
+
declare const getInsertion: (content: string, values: { [K in InsertionContent["fields"][number]]: string | number }) => string;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { getInsertion };
|
|
16
21
|
//# sourceMappingURL=getInsertion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInsertion.d.ts","
|
|
1
|
+
{"version":3,"file":"getInsertion.d.ts","names":[],"sources":["../../../src/interpreter/getInsertion.ts"],"sourcesContent":[],"mappings":";;;;;;AAeA;;;;;;;;;;;cAAa,gDAEK"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { DeepTransformContent, IInterpreterPluginState, Plugins } from "./getContent/plugins.js";
|
|
2
|
+
import { DeclaredLocales, DictionaryKeys, DictionaryRegistryContent, LocalesValues } from "@intlayer/types";
|
|
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 };
|
|
6
8
|
//# sourceMappingURL=getIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getIntlayer.d.ts","
|
|
1
|
+
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../../src/interpreter/getIntlayer.ts"],"sourcesContent":[],"mappings":";;;;cAea,wBACD,0BACA,gBAAgB,sBAErB,YACI,aACC,cACT,qBACD,0BAA0B,IAC1B,yBACA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ValidDotPathsFor } from "../transpiler/nesting/nesting.js";
|
|
2
|
+
import { DeepTransformContent, IInterpreterPluginState, NodeProps } from "./getContent/plugins.js";
|
|
3
|
+
import { DictionaryKeys, DictionaryRegistryContent, GetSubPath } from "@intlayer/types";
|
|
4
|
+
|
|
5
|
+
//#region src/interpreter/getNesting.d.ts
|
|
6
|
+
type GetNestingResult<K$1 extends DictionaryKeys, P$1 = undefined, S = IInterpreterPluginState> = GetSubPath<DeepTransformContent<DictionaryRegistryContent<K$1>, S>, P$1>;
|
|
6
7
|
/**
|
|
7
8
|
* Allow to extract the content of another dictionary.
|
|
8
9
|
*
|
|
@@ -12,5 +13,7 @@ export type GetNestingResult<K extends DictionaryKeys, P = undefined, S = IInter
|
|
|
12
13
|
* // 'Example content'
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
+
declare const getNesting: <K extends DictionaryKeys, P>(dictionaryKey: K, path?: P extends ValidDotPathsFor<K> ? P : never, props?: NodeProps) => GetNestingResult<K, P>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { GetNestingResult, getNesting };
|
|
16
19
|
//# sourceMappingURL=getNesting.d.ts.map
|