@intlayer/core 9.7.0 → 9.7.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 +1 -2
- package/dist/cjs/deepTransformPlugins/getEditedContent.cjs +2 -3
- package/dist/cjs/deepTransformPlugins/getFilterMissingTranslationsContent.cjs +5 -6
- package/dist/cjs/deepTransformPlugins/getFilterTranslationsOnlyContent.cjs +4 -5
- package/dist/cjs/deepTransformPlugins/getFilteredLocalesContent.cjs +3 -4
- package/dist/cjs/deepTransformPlugins/getLocalizedContent.cjs +3 -4
- package/dist/cjs/deepTransformPlugins/getMaskContent.cjs +2 -3
- package/dist/cjs/deepTransformPlugins/getMissingLocalesContent.cjs +3 -4
- package/dist/cjs/deepTransformPlugins/getMultilingualDictionary.cjs +3 -4
- package/dist/cjs/deepTransformPlugins/getReplacedValuesContent.cjs +2 -3
- package/dist/cjs/deepTransformPlugins/getSplittedContent.cjs +2 -3
- package/dist/cjs/deepTransformPlugins/index.cjs +11 -11
- package/dist/cjs/deepTransformPlugins/insertContentInDictionary.cjs +2 -3
- package/dist/cjs/dictionaryManipulator/editDictionaryByKeyPath.cjs +2 -3
- package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs +7 -4
- package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs.map +1 -1
- package/dist/cjs/dictionaryManipulator/getDefaultNode.cjs +2 -3
- package/dist/cjs/dictionaryManipulator/getEmptyNode.cjs +2 -3
- package/dist/cjs/dictionaryManipulator/getNestedDictionaryReferences.cjs +1 -2
- package/dist/cjs/dictionaryManipulator/getNodeChildren.cjs +2 -3
- package/dist/cjs/dictionaryManipulator/getNodeType.cjs +3 -4
- package/dist/cjs/dictionaryManipulator/index.cjs +31 -21
- package/dist/cjs/dictionaryManipulator/mergeDictionaries.cjs +3 -4
- package/dist/cjs/dictionaryManipulator/mergeQualifiedDictionaries.cjs +4 -5
- package/dist/cjs/dictionaryManipulator/normalizeDictionary.cjs +4 -5
- package/dist/cjs/dictionaryManipulator/orderDictionaries.cjs +1 -2
- package/dist/cjs/dictionaryManipulator/plainDynamicLoader.cjs +1 -2
- package/dist/cjs/dictionaryManipulator/preloadedDynamicLoader.cjs +7 -3
- package/dist/cjs/dictionaryManipulator/qualifiedDictionary.cjs +1 -2
- package/dist/cjs/dictionaryManipulator/qualifiedDictionaryDeclaration.cjs +2 -3
- package/dist/cjs/dictionaryManipulator/qualifiedDynamicLoader.cjs +8 -4
- package/dist/cjs/dictionaryManipulator/removeContentNodeByKeyPath.cjs +2 -3
- package/dist/cjs/dictionaryManipulator/renameContentNodeByKeyPath.cjs +2 -3
- package/dist/cjs/dictionaryManipulator/updateNodeChildren.cjs +2 -3
- package/dist/cjs/formatters/compact.cjs +2 -3
- package/dist/cjs/formatters/currency.cjs +2 -3
- package/dist/cjs/formatters/date.cjs +2 -3
- package/dist/cjs/formatters/index.cjs +9 -9
- package/dist/cjs/formatters/list.cjs +2 -3
- package/dist/cjs/formatters/number.cjs +2 -3
- package/dist/cjs/formatters/percentage.cjs +2 -3
- package/dist/cjs/formatters/relativeTime.cjs +2 -3
- package/dist/cjs/formatters/units.cjs +2 -3
- package/dist/cjs/index.cjs +129 -119
- package/dist/cjs/interpreter/dictionaryTransformCache.cjs +1 -2
- package/dist/cjs/interpreter/getCondition.cjs +1 -2
- package/dist/cjs/interpreter/getContent/deepTransform.cjs +2 -3
- package/dist/cjs/interpreter/getContent/getContent.cjs +3 -4
- package/dist/cjs/interpreter/getContent/index.cjs +3 -3
- package/dist/cjs/interpreter/getContent/plugins.cjs +17 -16
- package/dist/cjs/interpreter/getContent/plugins.cjs.map +1 -1
- package/dist/cjs/interpreter/getDictionary.cjs +5 -6
- package/dist/cjs/interpreter/getDictionaryAsync.cjs +7 -8
- package/dist/cjs/interpreter/getEnumeration.cjs +1 -2
- package/dist/cjs/interpreter/getGender.cjs +1 -2
- package/dist/cjs/interpreter/getHTML.cjs +1 -2
- package/dist/cjs/interpreter/getInsertion.cjs +1 -2
- package/dist/cjs/interpreter/getIntlayer.cjs +2 -3
- package/dist/cjs/interpreter/getIntlayerAsync.cjs +3 -4
- package/dist/cjs/interpreter/getNesting.cjs +2 -3
- package/dist/cjs/interpreter/getNesting.optimized.cjs +2 -3
- package/dist/cjs/interpreter/getPlural.cjs +2 -3
- package/dist/cjs/interpreter/getSelect.cjs +1 -2
- package/dist/cjs/interpreter/getTranslation.cjs +1 -2
- package/dist/cjs/interpreter/index.cjs +20 -20
- package/dist/cjs/interpreter/interpolableNode.cjs +3 -4
- package/dist/cjs/interpreter/resolveInterpreterLocale.cjs +2 -3
- package/dist/cjs/interpreter/splitAndJoinInsertion.cjs +1 -2
- package/dist/cjs/localization/comparePaths.cjs +3 -4
- package/dist/cjs/localization/domainUtils.cjs +1 -2
- package/dist/cjs/localization/generateSitemap.cjs +4 -5
- package/dist/cjs/localization/getBrowserLocale.cjs +3 -4
- package/dist/cjs/localization/getCanonicalPath.cjs +2 -3
- package/dist/cjs/localization/getHTMLTextDir.cjs +1 -2
- package/dist/cjs/localization/getLocale.cjs +4 -5
- package/dist/cjs/localization/getLocaleFromPath.cjs +3 -4
- package/dist/cjs/localization/getLocaleFromRequest.cjs +5 -6
- package/dist/cjs/localization/getLocaleLang.cjs +1 -2
- package/dist/cjs/localization/getLocaleName.cjs +2 -3
- package/dist/cjs/localization/getLocalizedPath.cjs +6 -7
- package/dist/cjs/localization/getLocalizedUrl.cjs +5 -6
- package/dist/cjs/localization/getMultilingualUrls.cjs +3 -4
- package/dist/cjs/localization/getPathWithoutLocale.cjs +2 -3
- package/dist/cjs/localization/getPrefix.cjs +2 -3
- package/dist/cjs/localization/index.cjs +24 -24
- package/dist/cjs/localization/localeDetector.cjs +2 -3
- package/dist/cjs/localization/localeMapper.cjs +2 -3
- package/dist/cjs/localization/localeResolver.cjs +1 -2
- package/dist/cjs/localization/proxyMode.cjs +2 -3
- package/dist/cjs/localization/resolveBrowserLocale.cjs +5 -6
- package/dist/cjs/localization/rewriteMatch.cjs +1 -2
- package/dist/cjs/localization/rewriteUtils.cjs +3 -4
- package/dist/cjs/localization/validatePrefix.cjs +2 -3
- package/dist/cjs/markdown/compiler.cjs +6 -7
- package/dist/cjs/markdown/constants.cjs +1 -2
- package/dist/cjs/markdown/elementScanner.cjs +1 -2
- package/dist/cjs/markdown/index.cjs +8 -8
- package/dist/cjs/markdown/parser.cjs +3 -4
- package/dist/cjs/markdown/renderer.cjs +1 -2
- package/dist/cjs/markdown/utils.cjs +2 -3
- package/dist/cjs/messageFormat/ICU.cjs +9 -10
- package/dist/cjs/messageFormat/i18next.cjs +9 -10
- package/dist/cjs/messageFormat/index.cjs +6 -6
- package/dist/cjs/messageFormat/navigatePath.cjs +1 -2
- package/dist/cjs/messageFormat/po.cjs +8 -9
- package/dist/cjs/messageFormat/resolveMessage.cjs +9 -10
- package/dist/cjs/messageFormat/verify-icu-format.cjs +5 -6
- package/dist/cjs/messageFormat/vue-i18n.cjs +5 -6
- package/dist/cjs/transpiler/condition/condition.cjs +1 -2
- package/dist/cjs/transpiler/condition/index.cjs +1 -1
- package/dist/cjs/transpiler/enumeration/enumeration.cjs +1 -2
- package/dist/cjs/transpiler/enumeration/index.cjs +1 -1
- package/dist/cjs/transpiler/file/file.cjs +1 -2
- package/dist/cjs/transpiler/file/fileBrowser.cjs +1 -2
- package/dist/cjs/transpiler/file/index.cjs +1 -1
- package/dist/cjs/transpiler/gender/gender.cjs +1 -2
- package/dist/cjs/transpiler/gender/index.cjs +1 -1
- package/dist/cjs/transpiler/html/getHTMLCustomComponents.cjs +1 -2
- package/dist/cjs/transpiler/html/html.cjs +3 -4
- package/dist/cjs/transpiler/html/htmlTags.cjs +1 -2
- package/dist/cjs/transpiler/html/index.cjs +3 -3
- package/dist/cjs/transpiler/html/validateHTML.cjs +1 -2
- package/dist/cjs/transpiler/index.cjs +15 -15
- package/dist/cjs/transpiler/insertion/getInsertionValues.cjs +1 -2
- package/dist/cjs/transpiler/insertion/index.cjs +2 -2
- package/dist/cjs/transpiler/insertion/insertion.cjs +2 -3
- package/dist/cjs/transpiler/markdown/getMarkdownMetadata.cjs +2 -3
- package/dist/cjs/transpiler/markdown/index.cjs +3 -3
- package/dist/cjs/transpiler/markdown/markdown.cjs +5 -6
- package/dist/cjs/transpiler/markdown/validateMarkdown.cjs +2 -3
- package/dist/cjs/transpiler/nesting/index.cjs +1 -1
- package/dist/cjs/transpiler/nesting/nesting.cjs +1 -2
- package/dist/cjs/transpiler/plural/index.cjs +1 -1
- package/dist/cjs/transpiler/plural/plural.cjs +1 -2
- package/dist/cjs/transpiler/select/index.cjs +1 -1
- package/dist/cjs/transpiler/select/select.cjs +1 -2
- package/dist/cjs/transpiler/translation/index.cjs +1 -1
- package/dist/cjs/transpiler/translation/translation.cjs +1 -2
- package/dist/cjs/utils/checkIsURLAbsolute.cjs +1 -2
- package/dist/cjs/utils/cookieExpiry.cjs +1 -2
- package/dist/cjs/utils/getCookie.cjs +1 -2
- package/dist/cjs/utils/index.cjs +9 -9
- package/dist/cjs/utils/intl.cjs +2 -3
- package/dist/cjs/utils/intlayerNodePrototype.cjs +1 -2
- package/dist/cjs/utils/isSameKeyPath.cjs +1 -2
- package/dist/cjs/utils/isValidReactElement.cjs +1 -2
- package/dist/cjs/utils/localeStorage.cjs +3 -4
- package/dist/cjs/utils/parseYaml.cjs +1 -2
- package/dist/cjs/utils/stringifyYaml.cjs +1 -2
- package/dist/esm/deepTransformPlugins/getEditedContent.mjs +1 -2
- package/dist/esm/deepTransformPlugins/getFilterMissingTranslationsContent.mjs +2 -3
- package/dist/esm/deepTransformPlugins/getFilterTranslationsOnlyContent.mjs +2 -3
- package/dist/esm/deepTransformPlugins/getFilteredLocalesContent.mjs +1 -2
- package/dist/esm/deepTransformPlugins/getLocalizedContent.mjs +2 -3
- package/dist/esm/deepTransformPlugins/getMaskContent.mjs +1 -2
- package/dist/esm/deepTransformPlugins/getMissingLocalesContent.mjs +1 -2
- package/dist/esm/deepTransformPlugins/getMultilingualDictionary.mjs +1 -2
- package/dist/esm/deepTransformPlugins/getReplacedValuesContent.mjs +1 -2
- package/dist/esm/deepTransformPlugins/getSplittedContent.mjs +1 -2
- package/dist/esm/deepTransformPlugins/insertContentInDictionary.mjs +1 -2
- package/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs +1 -2
- package/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs +6 -3
- package/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs.map +1 -1
- package/dist/esm/dictionaryManipulator/getDefaultNode.mjs +1 -2
- package/dist/esm/dictionaryManipulator/getEmptyNode.mjs +1 -2
- package/dist/esm/dictionaryManipulator/getNestedDictionaryReferences.mjs +1 -2
- package/dist/esm/dictionaryManipulator/getNodeChildren.mjs +1 -2
- package/dist/esm/dictionaryManipulator/getNodeType.mjs +1 -2
- package/dist/esm/dictionaryManipulator/index.mjs +6 -6
- package/dist/esm/dictionaryManipulator/mergeDictionaries.mjs +1 -2
- package/dist/esm/dictionaryManipulator/mergeQualifiedDictionaries.mjs +2 -3
- package/dist/esm/dictionaryManipulator/normalizeDictionary.mjs +2 -3
- package/dist/esm/dictionaryManipulator/orderDictionaries.mjs +1 -2
- package/dist/esm/dictionaryManipulator/plainDynamicLoader.mjs +1 -2
- package/dist/esm/dictionaryManipulator/preloadedDynamicLoader.mjs +1 -2
- package/dist/esm/dictionaryManipulator/qualifiedDictionary.mjs +1 -2
- package/dist/esm/dictionaryManipulator/qualifiedDictionaryDeclaration.mjs +1 -2
- package/dist/esm/dictionaryManipulator/qualifiedDynamicLoader.mjs +1 -2
- package/dist/esm/dictionaryManipulator/removeContentNodeByKeyPath.mjs +1 -2
- package/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs +1 -2
- package/dist/esm/dictionaryManipulator/updateNodeChildren.mjs +1 -2
- package/dist/esm/formatters/compact.mjs +1 -2
- package/dist/esm/formatters/currency.mjs +1 -2
- package/dist/esm/formatters/date.mjs +1 -2
- package/dist/esm/formatters/list.mjs +1 -2
- package/dist/esm/formatters/number.mjs +1 -2
- package/dist/esm/formatters/percentage.mjs +1 -2
- package/dist/esm/formatters/relativeTime.mjs +1 -2
- package/dist/esm/formatters/units.mjs +1 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/interpreter/dictionaryTransformCache.mjs +1 -2
- package/dist/esm/interpreter/getCondition.mjs +1 -2
- package/dist/esm/interpreter/getContent/deepTransform.mjs +1 -2
- package/dist/esm/interpreter/getContent/getContent.mjs +1 -2
- package/dist/esm/interpreter/getContent/index.mjs +1 -1
- package/dist/esm/interpreter/getContent/plugins.mjs +6 -5
- package/dist/esm/interpreter/getContent/plugins.mjs.map +1 -1
- package/dist/esm/interpreter/getDictionary.mjs +3 -4
- package/dist/esm/interpreter/getDictionaryAsync.mjs +5 -6
- package/dist/esm/interpreter/getEnumeration.mjs +1 -2
- package/dist/esm/interpreter/getGender.mjs +1 -2
- package/dist/esm/interpreter/getHTML.mjs +1 -2
- package/dist/esm/interpreter/getInsertion.mjs +1 -2
- package/dist/esm/interpreter/getIntlayer.mjs +1 -2
- package/dist/esm/interpreter/getIntlayerAsync.mjs +2 -3
- package/dist/esm/interpreter/getNesting.mjs +1 -2
- package/dist/esm/interpreter/getNesting.optimized.mjs +1 -2
- package/dist/esm/interpreter/getPlural.mjs +1 -2
- package/dist/esm/interpreter/getSelect.mjs +1 -2
- package/dist/esm/interpreter/getTranslation.mjs +1 -2
- package/dist/esm/interpreter/index.mjs +7 -7
- package/dist/esm/interpreter/interpolableNode.mjs +1 -2
- package/dist/esm/interpreter/resolveInterpreterLocale.mjs +1 -2
- package/dist/esm/interpreter/splitAndJoinInsertion.mjs +1 -2
- package/dist/esm/localization/comparePaths.mjs +1 -2
- package/dist/esm/localization/domainUtils.mjs +1 -2
- package/dist/esm/localization/generateSitemap.mjs +2 -3
- package/dist/esm/localization/getBrowserLocale.mjs +1 -2
- package/dist/esm/localization/getCanonicalPath.mjs +1 -2
- package/dist/esm/localization/getHTMLTextDir.mjs +1 -2
- package/dist/esm/localization/getLocale.mjs +2 -3
- package/dist/esm/localization/getLocaleFromPath.mjs +1 -2
- package/dist/esm/localization/getLocaleFromRequest.mjs +2 -3
- package/dist/esm/localization/getLocaleLang.mjs +1 -2
- package/dist/esm/localization/getLocaleName.mjs +1 -2
- package/dist/esm/localization/getLocalizedPath.mjs +3 -4
- package/dist/esm/localization/getLocalizedUrl.mjs +2 -3
- package/dist/esm/localization/getMultilingualUrls.mjs +2 -3
- package/dist/esm/localization/getPathWithoutLocale.mjs +1 -2
- package/dist/esm/localization/getPrefix.mjs +1 -2
- package/dist/esm/localization/index.mjs +10 -10
- package/dist/esm/localization/localeDetector.mjs +1 -2
- package/dist/esm/localization/localeMapper.mjs +1 -2
- package/dist/esm/localization/localeResolver.mjs +1 -2
- package/dist/esm/localization/proxyMode.mjs +1 -2
- package/dist/esm/localization/resolveBrowserLocale.mjs +2 -3
- package/dist/esm/localization/rewriteMatch.mjs +1 -2
- package/dist/esm/localization/rewriteUtils.mjs +2 -3
- package/dist/esm/localization/validatePrefix.mjs +1 -2
- package/dist/esm/markdown/compiler.mjs +2 -3
- package/dist/esm/markdown/constants.mjs +1 -2
- package/dist/esm/markdown/elementScanner.mjs +1 -2
- package/dist/esm/markdown/index.mjs +2 -2
- package/dist/esm/markdown/parser.mjs +1 -2
- package/dist/esm/markdown/renderer.mjs +1 -2
- package/dist/esm/markdown/utils.mjs +1 -2
- package/dist/esm/messageFormat/ICU.mjs +1 -2
- package/dist/esm/messageFormat/i18next.mjs +1 -2
- package/dist/esm/messageFormat/index.mjs +1 -1
- package/dist/esm/messageFormat/navigatePath.mjs +1 -2
- package/dist/esm/messageFormat/po.mjs +1 -2
- package/dist/esm/messageFormat/resolveMessage.mjs +2 -3
- package/dist/esm/messageFormat/verify-icu-format.mjs +1 -2
- package/dist/esm/messageFormat/vue-i18n.mjs +1 -2
- package/dist/esm/transpiler/condition/condition.mjs +1 -2
- package/dist/esm/transpiler/enumeration/enumeration.mjs +1 -2
- package/dist/esm/transpiler/file/file.mjs +1 -2
- package/dist/esm/transpiler/file/fileBrowser.mjs +1 -2
- package/dist/esm/transpiler/gender/gender.mjs +1 -2
- package/dist/esm/transpiler/html/getHTMLCustomComponents.mjs +1 -2
- package/dist/esm/transpiler/html/html.mjs +1 -2
- package/dist/esm/transpiler/html/htmlTags.mjs +1 -2
- package/dist/esm/transpiler/html/index.mjs +1 -1
- package/dist/esm/transpiler/html/validateHTML.mjs +1 -2
- package/dist/esm/transpiler/index.mjs +1 -1
- package/dist/esm/transpiler/insertion/getInsertionValues.mjs +1 -2
- package/dist/esm/transpiler/insertion/insertion.mjs +1 -2
- package/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs +1 -2
- package/dist/esm/transpiler/markdown/index.mjs +1 -1
- package/dist/esm/transpiler/markdown/markdown.mjs +1 -2
- package/dist/esm/transpiler/markdown/validateMarkdown.mjs +1 -2
- package/dist/esm/transpiler/nesting/nesting.mjs +1 -2
- package/dist/esm/transpiler/plural/plural.mjs +1 -2
- package/dist/esm/transpiler/select/select.mjs +1 -2
- package/dist/esm/transpiler/translation/translation.mjs +1 -2
- package/dist/esm/utils/checkIsURLAbsolute.mjs +1 -2
- package/dist/esm/utils/cookieExpiry.mjs +1 -2
- package/dist/esm/utils/getCookie.mjs +1 -2
- package/dist/esm/utils/index.mjs +4 -4
- package/dist/esm/utils/intl.mjs +1 -2
- package/dist/esm/utils/intlayerNodePrototype.mjs +1 -2
- package/dist/esm/utils/isSameKeyPath.mjs +1 -2
- package/dist/esm/utils/isValidReactElement.mjs +1 -2
- package/dist/esm/utils/localeStorage.mjs +1 -2
- package/dist/esm/utils/parseYaml.mjs +1 -2
- package/dist/esm/utils/stringifyYaml.mjs +1 -2
- package/dist/types/deepTransformPlugins/getEditedContent.d.ts +0 -2
- package/dist/types/deepTransformPlugins/getEditedContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +0 -2
- package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +0 -2
- package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +0 -2
- package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts +0 -2
- package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getMaskContent.d.ts +0 -2
- package/dist/types/deepTransformPlugins/getMaskContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts +0 -2
- package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getMultilingualDictionary.d.ts +0 -2
- package/dist/types/deepTransformPlugins/getMultilingualDictionary.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts +0 -2
- package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getSplittedContent.d.ts +1 -2
- package/dist/types/deepTransformPlugins/getSplittedContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/index.d.ts +1 -1
- package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts +0 -2
- package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts +0 -2
- package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts +0 -2
- package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getDefaultNode.d.ts +0 -2
- package/dist/types/dictionaryManipulator/getDefaultNode.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getEmptyNode.d.ts +0 -2
- package/dist/types/dictionaryManipulator/getEmptyNode.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getNestedDictionaryReferences.d.ts +0 -2
- package/dist/types/dictionaryManipulator/getNestedDictionaryReferences.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getNodeChildren.d.ts +0 -2
- package/dist/types/dictionaryManipulator/getNodeChildren.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getNodeType.d.ts +0 -2
- package/dist/types/dictionaryManipulator/getNodeType.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/index.d.ts +2 -2
- package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts +0 -2
- package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/mergeQualifiedDictionaries.d.ts +0 -2
- package/dist/types/dictionaryManipulator/mergeQualifiedDictionaries.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts +0 -2
- package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/orderDictionaries.d.ts +0 -2
- package/dist/types/dictionaryManipulator/orderDictionaries.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/plainDynamicLoader.d.ts +0 -2
- package/dist/types/dictionaryManipulator/plainDynamicLoader.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/preloadedDynamicLoader.d.ts +0 -2
- package/dist/types/dictionaryManipulator/preloadedDynamicLoader.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/qualifiedDictionary.d.ts +0 -2
- package/dist/types/dictionaryManipulator/qualifiedDictionary.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/qualifiedDictionaryDeclaration.d.ts +0 -2
- package/dist/types/dictionaryManipulator/qualifiedDictionaryDeclaration.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts +0 -2
- package/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts +0 -2
- package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts +0 -2
- package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts +0 -2
- package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts.map +1 -1
- package/dist/types/formatters/compact.d.ts +0 -2
- package/dist/types/formatters/compact.d.ts.map +1 -1
- package/dist/types/formatters/currency.d.ts +0 -2
- package/dist/types/formatters/currency.d.ts.map +1 -1
- package/dist/types/formatters/date.d.ts +0 -2
- package/dist/types/formatters/date.d.ts.map +1 -1
- package/dist/types/formatters/index.d.ts +1 -1
- package/dist/types/formatters/list.d.ts +0 -2
- package/dist/types/formatters/list.d.ts.map +1 -1
- package/dist/types/formatters/number.d.ts +0 -2
- package/dist/types/formatters/number.d.ts.map +1 -1
- package/dist/types/formatters/percentage.d.ts +0 -2
- package/dist/types/formatters/percentage.d.ts.map +1 -1
- package/dist/types/formatters/relativeTime.d.ts +1 -2
- package/dist/types/formatters/relativeTime.d.ts.map +1 -1
- package/dist/types/formatters/units.d.ts +0 -2
- package/dist/types/formatters/units.d.ts.map +1 -1
- package/dist/types/index.d.ts +8 -8
- package/dist/types/interpreter/dictionaryTransformCache.d.ts +0 -2
- package/dist/types/interpreter/dictionaryTransformCache.d.ts.map +1 -1
- package/dist/types/interpreter/getCondition.d.ts +0 -2
- package/dist/types/interpreter/getCondition.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/deepTransform.d.ts +0 -2
- package/dist/types/interpreter/getContent/deepTransform.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/getContent.d.ts +0 -2
- package/dist/types/interpreter/getContent/getContent.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/index.d.ts +1 -1
- package/dist/types/interpreter/getContent/plugins.d.ts +8 -5
- package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -1
- package/dist/types/interpreter/getDictionary.d.ts +0 -2
- package/dist/types/interpreter/getDictionary.d.ts.map +1 -1
- package/dist/types/interpreter/getDictionaryAsync.d.ts +1 -3
- package/dist/types/interpreter/getDictionaryAsync.d.ts.map +1 -1
- package/dist/types/interpreter/getEnumeration.d.ts +0 -2
- package/dist/types/interpreter/getEnumeration.d.ts.map +1 -1
- package/dist/types/interpreter/getGender.d.ts +1 -2
- package/dist/types/interpreter/getGender.d.ts.map +1 -1
- package/dist/types/interpreter/getHTML.d.ts +1 -2
- package/dist/types/interpreter/getHTML.d.ts.map +1 -1
- package/dist/types/interpreter/getInsertion.d.ts +0 -2
- package/dist/types/interpreter/getInsertion.d.ts.map +1 -1
- package/dist/types/interpreter/getIntlayer.d.ts +0 -2
- package/dist/types/interpreter/getIntlayer.d.ts.map +1 -1
- package/dist/types/interpreter/getIntlayerAsync.d.ts +0 -2
- package/dist/types/interpreter/getIntlayerAsync.d.ts.map +1 -1
- package/dist/types/interpreter/getNesting.d.ts +0 -2
- package/dist/types/interpreter/getNesting.d.ts.map +1 -1
- package/dist/types/interpreter/getNesting.optimized.d.ts +2 -4
- package/dist/types/interpreter/getNesting.optimized.d.ts.map +1 -1
- package/dist/types/interpreter/getPlural.d.ts +0 -2
- package/dist/types/interpreter/getPlural.d.ts.map +1 -1
- package/dist/types/interpreter/getSelect.d.ts +0 -2
- package/dist/types/interpreter/getSelect.d.ts.map +1 -1
- package/dist/types/interpreter/getTranslation.d.ts +0 -2
- package/dist/types/interpreter/getTranslation.d.ts.map +1 -1
- package/dist/types/interpreter/index.d.ts +3 -3
- package/dist/types/interpreter/interpolableNode.d.ts +0 -2
- package/dist/types/interpreter/interpolableNode.d.ts.map +1 -1
- package/dist/types/interpreter/resolveInterpreterLocale.d.ts +0 -2
- package/dist/types/interpreter/resolveInterpreterLocale.d.ts.map +1 -1
- package/dist/types/interpreter/splitAndJoinInsertion.d.ts +0 -2
- package/dist/types/interpreter/splitAndJoinInsertion.d.ts.map +1 -1
- package/dist/types/localization/comparePaths.d.ts +0 -2
- package/dist/types/localization/comparePaths.d.ts.map +1 -1
- package/dist/types/localization/domainUtils.d.ts +0 -2
- package/dist/types/localization/domainUtils.d.ts.map +1 -1
- package/dist/types/localization/generateSitemap.d.ts +0 -2
- package/dist/types/localization/generateSitemap.d.ts.map +1 -1
- package/dist/types/localization/getBrowserLocale.d.ts +1 -2
- package/dist/types/localization/getBrowserLocale.d.ts.map +1 -1
- package/dist/types/localization/getCanonicalPath.d.ts +0 -2
- package/dist/types/localization/getCanonicalPath.d.ts.map +1 -1
- package/dist/types/localization/getHTMLTextDir.d.ts +1 -2
- package/dist/types/localization/getHTMLTextDir.d.ts.map +1 -1
- package/dist/types/localization/getLocale.d.ts +0 -2
- package/dist/types/localization/getLocale.d.ts.map +1 -1
- package/dist/types/localization/getLocaleFromPath.d.ts +0 -2
- package/dist/types/localization/getLocaleFromPath.d.ts.map +1 -1
- package/dist/types/localization/getLocaleFromRequest.d.ts +0 -2
- package/dist/types/localization/getLocaleFromRequest.d.ts.map +1 -1
- package/dist/types/localization/getLocaleLang.d.ts +0 -2
- package/dist/types/localization/getLocaleLang.d.ts.map +1 -1
- package/dist/types/localization/getLocaleName.d.ts +0 -2
- package/dist/types/localization/getLocaleName.d.ts.map +1 -1
- package/dist/types/localization/getLocalizedPath.d.ts +0 -2
- package/dist/types/localization/getLocalizedPath.d.ts.map +1 -1
- package/dist/types/localization/getLocalizedUrl.d.ts +0 -2
- package/dist/types/localization/getLocalizedUrl.d.ts.map +1 -1
- package/dist/types/localization/getMultilingualUrls.d.ts +0 -2
- package/dist/types/localization/getMultilingualUrls.d.ts.map +1 -1
- package/dist/types/localization/getPathWithoutLocale.d.ts +0 -2
- package/dist/types/localization/getPathWithoutLocale.d.ts.map +1 -1
- package/dist/types/localization/getPrefix.d.ts +0 -2
- package/dist/types/localization/getPrefix.d.ts.map +1 -1
- package/dist/types/localization/index.d.ts +1 -1
- package/dist/types/localization/localeDetector.d.ts +0 -2
- package/dist/types/localization/localeDetector.d.ts.map +1 -1
- package/dist/types/localization/localeMapper.d.ts +0 -2
- package/dist/types/localization/localeMapper.d.ts.map +1 -1
- package/dist/types/localization/localeResolver.d.ts +0 -2
- package/dist/types/localization/localeResolver.d.ts.map +1 -1
- package/dist/types/localization/proxyMode.d.ts +0 -2
- package/dist/types/localization/proxyMode.d.ts.map +1 -1
- package/dist/types/localization/resolveBrowserLocale.d.ts +0 -2
- package/dist/types/localization/resolveBrowserLocale.d.ts.map +1 -1
- package/dist/types/localization/rewriteMatch.d.ts +0 -2
- package/dist/types/localization/rewriteMatch.d.ts.map +1 -1
- package/dist/types/localization/rewriteUtils.d.ts +1 -2
- package/dist/types/localization/rewriteUtils.d.ts.map +1 -1
- package/dist/types/localization/validatePrefix.d.ts +0 -2
- package/dist/types/localization/validatePrefix.d.ts.map +1 -1
- package/dist/types/markdown/compiler.d.ts +2 -3
- package/dist/types/markdown/compiler.d.ts.map +1 -1
- package/dist/types/markdown/constants.d.ts +0 -2
- package/dist/types/markdown/constants.d.ts.map +1 -1
- package/dist/types/markdown/elementScanner.d.ts +0 -2
- package/dist/types/markdown/elementScanner.d.ts.map +1 -1
- package/dist/types/markdown/index.d.ts +2 -2
- package/dist/types/markdown/parser.d.ts +0 -2
- package/dist/types/markdown/parser.d.ts.map +1 -1
- package/dist/types/markdown/renderer.d.ts +0 -2
- package/dist/types/markdown/renderer.d.ts.map +1 -1
- package/dist/types/markdown/types.d.ts +0 -2
- package/dist/types/markdown/types.d.ts.map +1 -1
- package/dist/types/markdown/utils.d.ts +1 -2
- package/dist/types/markdown/utils.d.ts.map +1 -1
- package/dist/types/messageFormat/ICU.d.ts +0 -2
- package/dist/types/messageFormat/ICU.d.ts.map +1 -1
- package/dist/types/messageFormat/i18next.d.ts +0 -2
- package/dist/types/messageFormat/i18next.d.ts.map +1 -1
- package/dist/types/messageFormat/navigatePath.d.ts +0 -2
- package/dist/types/messageFormat/navigatePath.d.ts.map +1 -1
- package/dist/types/messageFormat/po.d.ts +0 -2
- package/dist/types/messageFormat/po.d.ts.map +1 -1
- package/dist/types/messageFormat/resolveMessage.d.ts +0 -2
- package/dist/types/messageFormat/resolveMessage.d.ts.map +1 -1
- package/dist/types/messageFormat/vue-i18n.d.ts +0 -2
- package/dist/types/messageFormat/vue-i18n.d.ts.map +1 -1
- package/dist/types/transpiler/condition/condition.d.ts +0 -2
- package/dist/types/transpiler/condition/condition.d.ts.map +1 -1
- package/dist/types/transpiler/enumeration/enumeration.d.ts +0 -2
- package/dist/types/transpiler/enumeration/enumeration.d.ts.map +1 -1
- package/dist/types/transpiler/file/file.d.ts +0 -2
- package/dist/types/transpiler/file/file.d.ts.map +1 -1
- package/dist/types/transpiler/file/fileBrowser.d.ts +0 -2
- package/dist/types/transpiler/file/fileBrowser.d.ts.map +1 -1
- package/dist/types/transpiler/gender/gender.d.ts +0 -2
- package/dist/types/transpiler/gender/gender.d.ts.map +1 -1
- package/dist/types/transpiler/html/getHTMLCustomComponents.d.ts +0 -2
- package/dist/types/transpiler/html/getHTMLCustomComponents.d.ts.map +1 -1
- package/dist/types/transpiler/html/html.d.ts +1 -2
- package/dist/types/transpiler/html/html.d.ts.map +1 -1
- package/dist/types/transpiler/html/htmlTags.d.ts +0 -2
- package/dist/types/transpiler/html/htmlTags.d.ts.map +1 -1
- package/dist/types/transpiler/html/validateHTML.d.ts +0 -2
- package/dist/types/transpiler/html/validateHTML.d.ts.map +1 -1
- package/dist/types/transpiler/insertion/getInsertionValues.d.ts +0 -2
- package/dist/types/transpiler/insertion/getInsertionValues.d.ts.map +1 -1
- package/dist/types/transpiler/insertion/insertion.d.ts +0 -2
- package/dist/types/transpiler/insertion/insertion.d.ts.map +1 -1
- package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts +0 -2
- package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts.map +1 -1
- package/dist/types/transpiler/markdown/markdown.d.ts +0 -2
- package/dist/types/transpiler/markdown/markdown.d.ts.map +1 -1
- package/dist/types/transpiler/markdown/validateMarkdown.d.ts +0 -2
- package/dist/types/transpiler/markdown/validateMarkdown.d.ts.map +1 -1
- package/dist/types/transpiler/nesting/nesting.d.ts +0 -2
- package/dist/types/transpiler/nesting/nesting.d.ts.map +1 -1
- package/dist/types/transpiler/plural/plural.d.ts +0 -2
- package/dist/types/transpiler/plural/plural.d.ts.map +1 -1
- package/dist/types/transpiler/select/select.d.ts +0 -2
- package/dist/types/transpiler/select/select.d.ts.map +1 -1
- package/dist/types/transpiler/translation/translation.d.ts +0 -2
- package/dist/types/transpiler/translation/translation.d.ts.map +1 -1
- package/dist/types/utils/checkIsURLAbsolute.d.ts +0 -2
- package/dist/types/utils/checkIsURLAbsolute.d.ts.map +1 -1
- package/dist/types/utils/cookieExpiry.d.ts +0 -2
- package/dist/types/utils/cookieExpiry.d.ts.map +1 -1
- package/dist/types/utils/getCookie.d.ts +0 -2
- package/dist/types/utils/getCookie.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/intl.d.ts +0 -2
- package/dist/types/utils/intl.d.ts.map +1 -1
- package/dist/types/utils/intlayerNodePrototype.d.ts +0 -2
- package/dist/types/utils/intlayerNodePrototype.d.ts.map +1 -1
- package/dist/types/utils/isSameKeyPath.d.ts +0 -2
- package/dist/types/utils/isSameKeyPath.d.ts.map +1 -1
- package/dist/types/utils/isValidReactElement.d.ts +0 -2
- package/dist/types/utils/isValidReactElement.d.ts.map +1 -1
- package/dist/types/utils/localeStorage.d.ts +0 -2
- package/dist/types/utils/localeStorage.d.ts.map +1 -1
- package/dist/types/utils/parseYaml.d.ts +0 -2
- package/dist/types/utils/parseYaml.d.ts.map +1 -1
- package/dist/types/utils/stringifyYaml.d.ts +0 -2
- package/dist/types/utils/stringifyYaml.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_transpiler_markdown_getMarkdownMetadata = require(
|
|
3
|
-
const
|
|
4
|
-
const
|
|
2
|
+
const require_transpiler_markdown_getMarkdownMetadata = require("./getMarkdownMetadata.cjs");
|
|
3
|
+
const require_transpiler_markdown_markdown = require("./markdown.cjs");
|
|
4
|
+
const require_transpiler_markdown_validateMarkdown = require("./validateMarkdown.cjs");
|
|
5
5
|
|
|
6
6
|
exports.getMarkdownMetadata = require_transpiler_markdown_getMarkdownMetadata.getMarkdownMetadata;
|
|
7
7
|
exports.md = require_transpiler_markdown_markdown.md;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_interpreter_getContent_getContent = require(
|
|
3
|
-
const require_transpiler_html_getHTMLCustomComponents = require(
|
|
4
|
-
const require_transpiler_markdown_getMarkdownMetadata = require(
|
|
5
|
-
const require_transpiler_markdown_validateMarkdown = require(
|
|
2
|
+
const require_interpreter_getContent_getContent = require("../../interpreter/getContent/getContent.cjs");
|
|
3
|
+
const require_transpiler_html_getHTMLCustomComponents = require("../html/getHTMLCustomComponents.cjs");
|
|
4
|
+
const require_transpiler_markdown_getMarkdownMetadata = require("./getMarkdownMetadata.cjs");
|
|
5
|
+
const require_transpiler_markdown_validateMarkdown = require("./validateMarkdown.cjs");
|
|
6
6
|
let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/transpiler/markdown/markdown.ts
|
|
9
9
|
const awaitContent = async (content) => {
|
|
10
10
|
if (typeof content === "string" || typeof content === "object") return content;
|
|
11
11
|
if (typeof content === "function") return content();
|
|
@@ -58,6 +58,5 @@ const markdown = (content, components) => {
|
|
|
58
58
|
});
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
//#endregion
|
|
62
61
|
exports.md = markdown;
|
|
63
62
|
//# sourceMappingURL=markdown.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_transpiler_html_validateHTML = require(
|
|
2
|
+
const require_transpiler_html_validateHTML = require("../html/validateHTML.cjs");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/transpiler/markdown/validateMarkdown.ts
|
|
5
5
|
/**
|
|
6
6
|
* Strips fenced code blocks and inline code from markdown content so that
|
|
7
7
|
* HTML-like syntax inside code is not mistakenly validated.
|
|
@@ -71,6 +71,5 @@ const validateMarkdown = (content) => {
|
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
//#endregion
|
|
75
74
|
exports.validateMarkdown = validateMarkdown;
|
|
76
75
|
//# sourceMappingURL=validateMarkdown.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_transpiler_nesting_nesting = require(
|
|
2
|
+
const require_transpiler_nesting_nesting = require("./nesting.cjs");
|
|
3
3
|
|
|
4
4
|
exports.nest = require_transpiler_nesting_nesting.nest;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/transpiler/nesting/nesting.ts
|
|
5
5
|
/**
|
|
6
6
|
* Function intended to be used to build intlayer dictionaries.
|
|
7
7
|
*
|
|
@@ -22,6 +22,5 @@ const nesting = (dictionaryKey, path) => (0, _intlayer_types_nodeType.formatNode
|
|
|
22
22
|
path
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
exports.nest = nesting;
|
|
27
26
|
//# sourceMappingURL=nesting.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_transpiler_plural_plural = require(
|
|
2
|
+
const require_transpiler_plural_plural = require("./plural.cjs");
|
|
3
3
|
|
|
4
4
|
exports.DEFAULT_PLURAL_VARIABLE = require_transpiler_plural_plural.DEFAULT_PLURAL_VARIABLE;
|
|
5
5
|
exports.plural = require_transpiler_plural_plural.plural;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/transpiler/plural/plural.ts
|
|
5
5
|
/** Name of the value a plural selects on when no `variable` is declared. */
|
|
6
6
|
const DEFAULT_PLURAL_VARIABLE = "count";
|
|
7
7
|
/**
|
|
@@ -45,7 +45,6 @@ const DEFAULT_PLURAL_VARIABLE = "count";
|
|
|
45
45
|
*/
|
|
46
46
|
const plural = (content, options) => (0, _intlayer_types_nodeType.formatNodeType)(_intlayer_types_nodeType.PLURAL, content, options?.variable ? { variable: options.variable } : void 0);
|
|
47
47
|
|
|
48
|
-
//#endregion
|
|
49
48
|
exports.DEFAULT_PLURAL_VARIABLE = DEFAULT_PLURAL_VARIABLE;
|
|
50
49
|
exports.plural = plural;
|
|
51
50
|
//# sourceMappingURL=plural.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/transpiler/select/select.ts
|
|
5
5
|
/**
|
|
6
6
|
* Function intended to be used to build intlayer dictionaries.
|
|
7
7
|
*
|
|
@@ -37,6 +37,5 @@ let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
|
|
|
37
37
|
*/
|
|
38
38
|
const select = (content, variable) => (0, _intlayer_types_nodeType.formatNodeType)(_intlayer_types_nodeType.SELECT, content, { variable });
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
40
|
exports.select = select;
|
|
42
41
|
//# sourceMappingURL=select.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_transpiler_translation_translation = require(
|
|
2
|
+
const require_transpiler_translation_translation = require("./translation.cjs");
|
|
3
3
|
|
|
4
4
|
exports.t = require_transpiler_translation_translation.t;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/transpiler/translation/translation.ts
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
* Function intended to be used to build intlayer dictionaries.
|
|
@@ -24,6 +24,5 @@ let _intlayer_types_nodeType = require("@intlayer/types/nodeType");
|
|
|
24
24
|
*/
|
|
25
25
|
const translation = (content) => (0, _intlayer_types_nodeType.formatNodeType)(_intlayer_types_nodeType.TRANSLATION, content);
|
|
26
26
|
|
|
27
|
-
//#endregion
|
|
28
27
|
exports.t = translation;
|
|
29
28
|
//# sourceMappingURL=translation.cjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/utils/checkIsURLAbsolute.ts
|
|
3
3
|
const checkIsURLAbsolute = (url) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(url);
|
|
4
4
|
|
|
5
|
-
//#endregion
|
|
6
5
|
exports.checkIsURLAbsolute = checkIsURLAbsolute;
|
|
7
6
|
//# sourceMappingURL=checkIsURLAbsolute.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/utils/cookieExpiry.ts
|
|
3
3
|
/**
|
|
4
4
|
* Resolves a normalized cookie `expires` value to an absolute timestamp
|
|
5
5
|
* (epoch ms). The value is produced by the config-build merge step, so it is
|
|
@@ -41,7 +41,6 @@ const buildCookieString = (name, value, attributes) => {
|
|
|
41
41
|
return parts.join("; ");
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
//#endregion
|
|
45
44
|
exports.buildCookieString = buildCookieString;
|
|
46
45
|
exports.resolveExpiresToTimestamp = resolveExpiresToTimestamp;
|
|
47
46
|
//# sourceMappingURL=cookieExpiry.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/utils/getCookie.ts
|
|
3
3
|
/**
|
|
4
4
|
* Retrieves a cookie by name from a cookie string or document.cookie
|
|
5
5
|
* @param name - The name of the cookie to retrieve
|
|
@@ -27,6 +27,5 @@ const getCookie = (name, cookieString) => {
|
|
|
27
27
|
} catch {}
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
//#endregion
|
|
31
30
|
exports.getCookie = getCookie;
|
|
32
31
|
//# sourceMappingURL=getCookie.cjs.map
|
package/dist/cjs/utils/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const require_utils_intl = require(
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const require_utils_stringifyYaml = require(
|
|
2
|
+
const require_utils_checkIsURLAbsolute = require("./checkIsURLAbsolute.cjs");
|
|
3
|
+
const require_utils_getCookie = require("./getCookie.cjs");
|
|
4
|
+
const require_utils_intl = require("./intl.cjs");
|
|
5
|
+
const require_utils_intlayerNodePrototype = require("./intlayerNodePrototype.cjs");
|
|
6
|
+
const require_utils_isSameKeyPath = require("./isSameKeyPath.cjs");
|
|
7
|
+
const require_utils_isValidReactElement = require("./isValidReactElement.cjs");
|
|
8
|
+
const require_utils_localeStorage = require("./localeStorage.cjs");
|
|
9
|
+
const require_utils_parseYaml = require("./parseYaml.cjs");
|
|
10
|
+
const require_utils_stringifyYaml = require("./stringifyYaml.cjs");
|
|
11
11
|
|
|
12
12
|
exports.CachedIntl = require_utils_intl.CachedIntl;
|
|
13
13
|
exports.Intl = require_utils_intl.CachedIntl;
|
package/dist/cjs/utils/intl.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_interpreter_resolveInterpreterLocale = require(
|
|
2
|
+
const require_interpreter_resolveInterpreterLocale = require("../interpreter/resolveInterpreterLocale.cjs");
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/utils/intl.ts
|
|
5
5
|
const MAX_CACHE_SIZE = 50;
|
|
6
6
|
const cache = /* @__PURE__ */ new Map();
|
|
7
7
|
const alreadyWarnedConstructors = /* @__PURE__ */ new Set();
|
|
@@ -149,7 +149,6 @@ const CachedIntl = {
|
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
-
//#endregion
|
|
153
152
|
exports.CachedIntl = CachedIntl;
|
|
154
153
|
exports.Intl = CachedIntl;
|
|
155
154
|
exports.bindIntl = bindIntl;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/utils/intlayerNodePrototype.ts
|
|
3
3
|
/**
|
|
4
4
|
* Built prototypes, per base prototype, then per value type (`'string'`…) or,
|
|
5
5
|
* for objects, per value prototype.
|
|
@@ -61,6 +61,5 @@ const getIntlayerNodePrototype = (value, basePrototype = Object.prototype) => {
|
|
|
61
61
|
return prototype;
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
//#endregion
|
|
65
64
|
exports.getIntlayerNodePrototype = getIntlayerNodePrototype;
|
|
66
65
|
//# sourceMappingURL=intlayerNodePrototype.cjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/utils/isSameKeyPath.ts
|
|
3
3
|
const isSameKeyPath = (keyPath1, keyPath2) => keyPath1.every((element, index) => keyPath2[index] && keyPath2[index].key === element.key && keyPath2[index].type === element.type);
|
|
4
4
|
|
|
5
|
-
//#endregion
|
|
6
5
|
exports.isSameKeyPath = isSameKeyPath;
|
|
7
6
|
//# sourceMappingURL=isSameKeyPath.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/utils/isValidReactElement.ts
|
|
3
3
|
/**
|
|
4
4
|
* Verifies the object is a ReactElement.
|
|
5
5
|
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
@@ -9,6 +9,5 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
9
9
|
*/
|
|
10
10
|
const isValidElement = (object) => typeof object === "object" && typeof object?.key !== "undefined" && typeof object?.props !== "undefined";
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
exports.isValidElement = isValidElement;
|
|
14
13
|
//# sourceMappingURL=isValidReactElement.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_utils_cookieExpiry = require(
|
|
3
|
-
const require_utils_getCookie = require(
|
|
2
|
+
const require_utils_cookieExpiry = require("./cookieExpiry.cjs");
|
|
3
|
+
const require_utils_getCookie = require("./getCookie.cjs");
|
|
4
4
|
let _intlayer_config_built = require("@intlayer/config/built");
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/utils/localeStorage.ts
|
|
7
7
|
/**
|
|
8
8
|
* True when cookie storage is explicitly disabled at build time.
|
|
9
9
|
*/
|
|
@@ -287,7 +287,6 @@ const LocaleStorage = (options) => ({
|
|
|
287
287
|
setLocale: (locale) => setLocaleInStorage(locale, options)
|
|
288
288
|
});
|
|
289
289
|
|
|
290
|
-
//#endregion
|
|
291
290
|
exports.LocaleStorage = LocaleStorage;
|
|
292
291
|
exports.LocaleStorageClient = LocaleStorageClient;
|
|
293
292
|
exports.LocaleStorageServer = LocaleStorageServer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/utils/parseYaml.ts
|
|
3
3
|
const PRESERVED_LITERALS = /* @__PURE__ */ new Set([
|
|
4
4
|
"true",
|
|
5
5
|
"false",
|
|
@@ -254,6 +254,5 @@ const parseYaml = (input) => {
|
|
|
254
254
|
return value;
|
|
255
255
|
};
|
|
256
256
|
|
|
257
|
-
//#endregion
|
|
258
257
|
exports.parseYaml = parseYaml;
|
|
259
258
|
//# sourceMappingURL=parseYaml.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
2
|
+
// src/utils/stringifyYaml.ts
|
|
3
3
|
const NEEDS_QUOTING = /[\n\r\t#:{}[\],&*?|<>=!%@`'"\\]|^[-?!]|\s$|^\s|^[>|]|^[.]{2,}/;
|
|
4
4
|
const PRESERVED_LITERALS = /* @__PURE__ */ new Set([
|
|
5
5
|
"true",
|
|
@@ -53,6 +53,5 @@ const serializeValue = (value, indent) => {
|
|
|
53
53
|
};
|
|
54
54
|
const stringifyYaml = (value) => `${serializeValue(value, "")}\n`;
|
|
55
55
|
|
|
56
|
-
//#endregion
|
|
57
56
|
exports.stringifyYaml = stringifyYaml;
|
|
58
57
|
//# sourceMappingURL=stringifyYaml.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/deepTransformPlugins/getEditedContent.ts
|
|
4
4
|
/** Whether `node` is a plain (non-array) object, i.e. a content branch. */
|
|
5
5
|
const isRecordNode = (node) => typeof node === "object" && node !== null && !Array.isArray(node);
|
|
6
6
|
/** Whether `node` is a typed node, whatever its `nodeType`. */
|
|
@@ -92,6 +92,5 @@ const getEditedDictionary = (previousDictionary, newDictionary, defaultLocale) =
|
|
|
92
92
|
content: getEditedContent(previousDictionary?.content, newDictionary.content, defaultLocale)
|
|
93
93
|
});
|
|
94
94
|
|
|
95
|
-
//#endregion
|
|
96
95
|
export { getEditedContent, getEditedDictionary };
|
|
97
96
|
//# sourceMappingURL=getEditedContent.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
2
1
|
import { getTranslation } from "../interpreter/getTranslation.mjs";
|
|
2
|
+
import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
3
3
|
import { t as translation } from "../transpiler/translation/translation.mjs";
|
|
4
4
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
5
5
|
import { internationalization } from "@intlayer/config/built";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/deepTransformPlugins/getFilterMissingTranslationsContent.ts
|
|
8
8
|
/**
|
|
9
9
|
* Helper function to check if a node or its children contain translation nodes
|
|
10
10
|
*/
|
|
@@ -203,6 +203,5 @@ const getFilterMissingTranslationsDictionary = (dictionary, localeToCheck) => ({
|
|
|
203
203
|
})
|
|
204
204
|
});
|
|
205
205
|
|
|
206
|
-
//#endregion
|
|
207
206
|
export { filterMissingTranslationsOnlyPlugin, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary };
|
|
208
207
|
//# sourceMappingURL=getFilterMissingTranslationsContent.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
2
1
|
import { getTranslation } from "../interpreter/getTranslation.mjs";
|
|
2
|
+
import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
3
3
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
4
4
|
import { internationalization } from "@intlayer/config/built";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/deepTransformPlugins/getFilterTranslationsOnlyContent.ts
|
|
7
7
|
/**
|
|
8
8
|
* Helper function to check if a node or its children contain translation nodes
|
|
9
9
|
*/
|
|
@@ -85,6 +85,5 @@ const getFilterTranslationsOnlyDictionary = (dictionary, locale = internationali
|
|
|
85
85
|
}, fallback)
|
|
86
86
|
});
|
|
87
87
|
|
|
88
|
-
//#endregion
|
|
89
88
|
export { filterTranslationsOnlyPlugin, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary };
|
|
90
89
|
//# sourceMappingURL=getFilterTranslationsOnlyContent.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
2
2
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/deepTransformPlugins/getFilteredLocalesContent.ts
|
|
5
5
|
const filterTranslationsPlugin = (locales) => ({
|
|
6
6
|
id: "filter-translations-plugin",
|
|
7
7
|
canHandle: (node) => typeof node === "object" && node?.nodeType === NodeTypes.TRANSLATION,
|
|
@@ -38,6 +38,5 @@ const getFilteredLocalesDictionary = (dictionary, locale) => {
|
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
//#endregion
|
|
42
41
|
export { getFilteredLocalesContent, getFilteredLocalesDictionary };
|
|
43
42
|
//# sourceMappingURL=getFilteredLocalesContent.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
2
1
|
import { translationPlugin } from "../interpreter/getContent/plugins.mjs";
|
|
2
|
+
import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/deepTransformPlugins/getLocalizedContent.ts
|
|
5
5
|
/**
|
|
6
6
|
* Transforms a node in a single pass, applying each plugin as needed.
|
|
7
7
|
* In comparison to `getContent`, this function will only apply the translation plugin.
|
|
@@ -27,6 +27,5 @@ const getPerLocaleDictionary = (dictionary, locale, fallback) => ({
|
|
|
27
27
|
}, fallback)
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
//#endregion
|
|
31
30
|
export { getLocalizedContent, getPerLocaleDictionary };
|
|
32
31
|
//# sourceMappingURL=getLocalizedContent.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/deepTransformPlugins/getMaskContent.ts
|
|
4
4
|
const passTypedNodePlugin = {
|
|
5
5
|
id: "pass-typed-node-plugin",
|
|
6
6
|
canHandle: (node) => typeof node === "object" && typeof node?.nodeType === "string",
|
|
@@ -21,6 +21,5 @@ const getMaskContent = (source) => ({
|
|
|
21
21
|
})
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
//#endregion
|
|
25
24
|
export { buildMaskPlugin, getMaskContent };
|
|
26
25
|
//# sourceMappingURL=getMaskContent.mjs.map
|
|
@@ -2,7 +2,7 @@ import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
|
2
2
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
3
3
|
import { internationalization } from "@intlayer/config/built";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/deepTransformPlugins/getMissingLocalesContent.ts
|
|
6
6
|
/**
|
|
7
7
|
* Returns all key paths present in obj, INCLUDING those whose leaf value is null.
|
|
8
8
|
* Used for structural presence checks (a locale must have every key another locale has,
|
|
@@ -142,6 +142,5 @@ const getMissingLocalesContentFromDictionary = (dictionary, locales = internatio
|
|
|
142
142
|
keyPath: []
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
-
//#endregion
|
|
146
145
|
export { checkMissingLocalesPlugin, getMissingLocalesContent, getMissingLocalesContentFromDictionary };
|
|
147
146
|
//# sourceMappingURL=getMissingLocalesContent.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
2
2
|
import { t as translation } from "../transpiler/translation/translation.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/deepTransformPlugins/getMultilingualDictionary.ts
|
|
5
5
|
/**
|
|
6
6
|
* Transform a per-locale dictionary into a multilingual dictionary.
|
|
7
7
|
*
|
|
@@ -82,6 +82,5 @@ const getMultilingualDictionary = (dictionary) => {
|
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
-
//#endregion
|
|
86
85
|
export { getMultilingualDictionary };
|
|
87
86
|
//# sourceMappingURL=getMultilingualDictionary.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { deepTransformNode } from "../interpreter/getContent/deepTransform.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/deepTransformPlugins/getReplacedValuesContent.ts
|
|
4
4
|
const replaceValuesPlugin = (value) => ({
|
|
5
5
|
id: "replace-values-plugin",
|
|
6
6
|
canHandle: (node) => typeof node === "string" || typeof node === "number" || typeof node === "boolean",
|
|
@@ -56,6 +56,5 @@ const getReplacedValuesContent = (node, value, nodeProps) => {
|
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
//#endregion
|
|
60
59
|
export { getReplacedValuesContent };
|
|
61
60
|
//# sourceMappingURL=getReplacedValuesContent.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/deepTransformPlugins/getSplittedContent.ts
|
|
4
4
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
5
5
|
const hasNodeType = (value) => isObject(value) && typeof value.nodeType === "string";
|
|
6
6
|
const mergeValues = (a, b) => {
|
|
@@ -115,6 +115,5 @@ const getSplittedContent = (content) => {
|
|
|
115
115
|
*/
|
|
116
116
|
const getSplittedDictionaryContent = (dictionary) => getSplittedContent(dictionary.content);
|
|
117
117
|
|
|
118
|
-
//#endregion
|
|
119
118
|
export { getSplittedContent, getSplittedDictionaryContent };
|
|
120
119
|
//# sourceMappingURL=getSplittedContent.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/deepTransformPlugins/insertContentInDictionary.ts
|
|
4
4
|
/**
|
|
5
5
|
* Deep merge helper that handles translation blocks
|
|
6
6
|
* @param target - The target object (dictionary content)
|
|
@@ -109,6 +109,5 @@ const insertContentInDictionary = (dictionary, content, locale) => {
|
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
//#endregion
|
|
113
112
|
export { insertContentInDictionary };
|
|
114
113
|
//# sourceMappingURL=insertContentInDictionary.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/dictionaryManipulator/editDictionaryByKeyPath.ts
|
|
4
4
|
const editDictionaryByKeyPath = (dictionaryContent, keyPath, newValue) => {
|
|
5
5
|
let currentValue = dictionaryContent;
|
|
6
6
|
let parentValue = null;
|
|
@@ -59,6 +59,5 @@ const editDictionaryByKeyPath = (dictionaryContent, keyPath, newValue) => {
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
//#endregion
|
|
63
62
|
export { editDictionaryByKeyPath };
|
|
64
63
|
//# sourceMappingURL=editDictionaryByKeyPath.mjs.map
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/dictionaryManipulator/getContentNodeByKeyPath.ts
|
|
4
4
|
const getContentNodeByKeyPath = (dictionaryContent, keyPath, fallbackLocale) => {
|
|
5
5
|
let currentValue = structuredClone(dictionaryContent);
|
|
6
6
|
for (const keyObj of keyPath) {
|
|
7
|
-
|
|
7
|
+
while (currentValue?.nodeType === NodeTypes.TRANSLATION && keyObj.type !== NodeTypes.TRANSLATION) {
|
|
8
|
+
const translations = currentValue[NodeTypes.TRANSLATION];
|
|
9
|
+
if (!translations) break;
|
|
10
|
+
currentValue = (fallbackLocale && translations[fallbackLocale]) ?? Object.values(translations)[0];
|
|
11
|
+
}
|
|
8
12
|
if (keyObj.type === NodeTypes.OBJECT || keyObj.type === NodeTypes.ARRAY) currentValue = currentValue?.[keyObj.key];
|
|
9
13
|
if (keyObj.type === NodeTypes.TRANSLATION || keyObj.type === NodeTypes.CONDITION || keyObj.type === NodeTypes.ENUMERATION || keyObj.type === NodeTypes.PLURAL || keyObj.type === NodeTypes.GENDER || keyObj.type === NodeTypes.SELECT) currentValue = currentValue?.[keyObj.type]?.[keyObj.key];
|
|
10
14
|
if (keyObj.type === NodeTypes.MARKDOWN || keyObj.type === NodeTypes.HTML || keyObj.type === NodeTypes.INSERTION || keyObj.type === NodeTypes.FILE) currentValue = currentValue?.[keyObj.type];
|
|
@@ -12,6 +16,5 @@ const getContentNodeByKeyPath = (dictionaryContent, keyPath, fallbackLocale) =>
|
|
|
12
16
|
return currentValue;
|
|
13
17
|
};
|
|
14
18
|
|
|
15
|
-
//#endregion
|
|
16
19
|
export { getContentNodeByKeyPath };
|
|
17
20
|
//# sourceMappingURL=getContentNodeByKeyPath.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getContentNodeByKeyPath.mjs","names":[],"sources":["../../../src/dictionaryManipulator/getContentNodeByKeyPath.ts"],"sourcesContent":["import type { ContentNode } from '@intlayer/types/dictionary';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\nimport * as NodeTypes from '@intlayer/types/nodeType';\n\nexport const getContentNodeByKeyPath = (\n dictionaryContent: ContentNode,\n keyPath: KeyPath[],\n fallbackLocale?: LocalesValues\n): ContentNode => {\n let currentValue: any = structuredClone(dictionaryContent);\n\n for (const keyObj of keyPath) {\n // Auto-resolve translation nodes when
|
|
1
|
+
{"version":3,"file":"getContentNodeByKeyPath.mjs","names":[],"sources":["../../../src/dictionaryManipulator/getContentNodeByKeyPath.ts"],"sourcesContent":["import type { ContentNode } from '@intlayer/types/dictionary';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\nimport * as NodeTypes from '@intlayer/types/nodeType';\n\nexport const getContentNodeByKeyPath = (\n dictionaryContent: ContentNode,\n keyPath: KeyPath[],\n fallbackLocale?: LocalesValues\n): ContentNode => {\n let currentValue: any = structuredClone(dictionaryContent);\n\n for (const keyObj of keyPath) {\n // Auto-resolve translation nodes when the key does not target translation\n while (\n currentValue?.nodeType === NodeTypes.TRANSLATION &&\n keyObj.type !== NodeTypes.TRANSLATION\n ) {\n const translations = currentValue[NodeTypes.TRANSLATION];\n if (!translations) break;\n currentValue =\n (fallbackLocale && translations[fallbackLocale]) ??\n Object.values(translations)[0];\n }\n\n if (keyObj.type === NodeTypes.OBJECT || keyObj.type === NodeTypes.ARRAY) {\n currentValue = currentValue?.[keyObj.key];\n }\n\n if (\n keyObj.type === NodeTypes.TRANSLATION ||\n keyObj.type === NodeTypes.CONDITION ||\n keyObj.type === NodeTypes.ENUMERATION ||\n keyObj.type === NodeTypes.PLURAL ||\n keyObj.type === NodeTypes.GENDER ||\n keyObj.type === NodeTypes.SELECT\n ) {\n currentValue = currentValue?.[keyObj.type]?.[keyObj.key];\n }\n\n if (\n keyObj.type === NodeTypes.MARKDOWN ||\n keyObj.type === NodeTypes.HTML ||\n keyObj.type === NodeTypes.INSERTION ||\n keyObj.type === NodeTypes.FILE\n ) {\n currentValue = currentValue?.[keyObj.type];\n }\n }\n\n return currentValue as ContentNode;\n};\n"],"mappings":";;;AAKA,MAAa,2BACX,mBACA,SACA,mBACgB;CAChB,IAAI,eAAoB,gBAAgB,iBAAiB;CAEzD,KAAK,MAAM,UAAU,SAAS;EAE5B,OACE,cAAc,aAAa,UAAU,eACrC,OAAO,SAAS,UAAU,aAC1B;GACA,MAAM,eAAe,aAAa,UAAU;GAC5C,IAAI,CAAC,cAAc;GACnB,gBACG,kBAAkB,aAAa,oBAChC,OAAO,OAAO,YAAY,CAAC,CAAC;EAChC;EAEA,IAAI,OAAO,SAAS,UAAU,UAAU,OAAO,SAAS,UAAU,OAChE,eAAe,eAAe,OAAO;EAGvC,IACE,OAAO,SAAS,UAAU,eAC1B,OAAO,SAAS,UAAU,aAC1B,OAAO,SAAS,UAAU,eAC1B,OAAO,SAAS,UAAU,UAC1B,OAAO,SAAS,UAAU,UAC1B,OAAO,SAAS,UAAU,QAE1B,eAAe,eAAe,OAAO,KAAK,GAAG,OAAO;EAGtD,IACE,OAAO,SAAS,UAAU,YAC1B,OAAO,SAAS,UAAU,QAC1B,OAAO,SAAS,UAAU,aAC1B,OAAO,SAAS,UAAU,MAE1B,eAAe,eAAe,OAAO;CAEzC;CAEA,OAAO;AACT"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/dictionaryManipulator/getDefaultNode.ts
|
|
4
4
|
const getDefaultNode = (nodeType, locales, content) => {
|
|
5
5
|
const clonedContent = structuredClone(content);
|
|
6
6
|
switch (nodeType) {
|
|
@@ -71,6 +71,5 @@ const getDefaultNode = (nodeType, locales, content) => {
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
//#endregion
|
|
75
74
|
export { getDefaultNode };
|
|
76
75
|
//# sourceMappingURL=getDefaultNode.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/dictionaryManipulator/getEmptyNode.ts
|
|
4
4
|
const getEmptyNode = (section) => {
|
|
5
5
|
if (typeof section === "string") return "";
|
|
6
6
|
if (typeof section === "number") return 0;
|
|
@@ -20,6 +20,5 @@ const getEmptyNode = (section) => {
|
|
|
20
20
|
return Object.fromEntries(mappedSectionObject);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
//#endregion
|
|
24
23
|
export { getEmptyNode };
|
|
25
24
|
//# sourceMappingURL=getEmptyNode.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NESTED } from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/dictionaryManipulator/getNestedDictionaryReferences.ts
|
|
4
4
|
/**
|
|
5
5
|
* Compact alias some minified pipelines emit in place of `nodeType: 'nested'`.
|
|
6
6
|
* Matched defensively so the scan keeps working on already-minified content.
|
|
@@ -145,6 +145,5 @@ const getNestedDictionaryGraph = (dictionaries) => {
|
|
|
145
145
|
return closeOverNestedEdges(directEdges);
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
//#endregion
|
|
149
148
|
export { getNestedDictionaryGraph, getNestedDictionaryKeys, getNestedDictionaryReferences };
|
|
150
149
|
//# sourceMappingURL=getNestedDictionaryReferences.mjs.map
|