@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,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/localization/getLocaleLang.ts
|
|
2
2
|
/**
|
|
3
3
|
* Returns the language code of the given locale for locales including the country code.
|
|
4
4
|
*
|
|
@@ -14,6 +14,5 @@
|
|
|
14
14
|
*/
|
|
15
15
|
const getLocaleLang = (locale) => locale?.split("-")[0] ?? "";
|
|
16
16
|
|
|
17
|
-
//#endregion
|
|
18
17
|
export { getLocaleLang };
|
|
19
18
|
//# sourceMappingURL=getLocaleLang.mjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { CachedIntl } from "../utils/intl.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/localization/getLocaleName.ts
|
|
4
4
|
const getLocaleName = (displayLocale, targetLocale = displayLocale) => {
|
|
5
5
|
return new CachedIntl.DisplayNames(targetLocale, { type: "language" }).of(displayLocale) ?? "Unknown locale";
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
-
//#endregion
|
|
9
8
|
export { getLocaleName };
|
|
10
9
|
//# sourceMappingURL=getLocaleName.mjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { getPathWithoutLocale } from "./getPathWithoutLocale.mjs";
|
|
2
|
-
import { getRewriteRules } from "./rewriteMatch.mjs";
|
|
3
1
|
import { getCanonicalPath } from "./getCanonicalPath.mjs";
|
|
2
|
+
import { getPathWithoutLocale } from "./getPathWithoutLocale.mjs";
|
|
4
3
|
import { getPrefix, resolveRoutingConfig } from "./getPrefix.mjs";
|
|
4
|
+
import { getRewriteRules } from "./rewriteMatch.mjs";
|
|
5
5
|
import { resolveLocalizedPath } from "./rewriteUtils.mjs";
|
|
6
6
|
import { internationalization } from "@intlayer/config/built";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/localization/getLocalizedPath.ts
|
|
9
9
|
/**
|
|
10
10
|
* Localizes an application path for a locale: resolves the `routing.rewrite`
|
|
11
11
|
* rules, then applies the locale representation of the routing mode — a path
|
|
@@ -73,6 +73,5 @@ const getLocalizedPath = (canonicalPath, locale = internationalization?.defaultL
|
|
|
73
73
|
return `${localizedPath}${parsedPath.search}${parsedPath.hash}`;
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
//#endregion
|
|
77
76
|
export { getLocalizedPath };
|
|
78
77
|
//# sourceMappingURL=getLocalizedPath.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { checkIsURLAbsolute } from "../utils/checkIsURLAbsolute.mjs";
|
|
2
2
|
import { getDomainHostname, getDomainOrigin } from "./domainUtils.mjs";
|
|
3
|
-
import { resolveRoutingConfig } from "./getPrefix.mjs";
|
|
4
3
|
import { getLocalizedPath } from "./getLocalizedPath.mjs";
|
|
4
|
+
import { resolveRoutingConfig } from "./getPrefix.mjs";
|
|
5
5
|
import { internationalization } from "@intlayer/config/built";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/localization/getLocalizedUrl.ts
|
|
8
8
|
/**
|
|
9
9
|
* Generate URL by prefixing the given URL with the referenced locale or adding search parameters
|
|
10
10
|
* based on the routing mode. Handles both absolute and relative URLs appropriately.
|
|
@@ -72,6 +72,5 @@ const getLocalizedUrl = (url, currentLocale = internationalization?.defaultLocal
|
|
|
72
72
|
return `${normalizedDomain ? normalizedDomain : isAbsoluteUrl ? `${parsedUrl.protocol}//${parsedUrl.host}` : ""}${getLocalizedPath(`${parsedUrl.pathname}${parsedUrl.search}${parsedUrl.hash}`, currentLocale, options)}`;
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
//#endregion
|
|
76
75
|
export { getLocalizedUrl };
|
|
77
76
|
//# sourceMappingURL=getLocalizedUrl.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { resolveRoutingConfig } from "./getPrefix.mjs";
|
|
2
1
|
import { getLocalizedUrl } from "./getLocalizedUrl.mjs";
|
|
2
|
+
import { resolveRoutingConfig } from "./getPrefix.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/localization/getMultilingualUrls.ts
|
|
5
5
|
/**
|
|
6
6
|
* Generates multilingual URLs by prefixing the given URL with each supported locale
|
|
7
7
|
* or adding search parameters based on the routing mode.
|
|
@@ -41,6 +41,5 @@ const getMultilingualUrls = (url, options = {}) => {
|
|
|
41
41
|
return Object.fromEntries((resolved.locales ?? []).map((locale) => [locale, getLocalizedUrl(url, locale, resolved)]));
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
//#endregion
|
|
45
44
|
export { getMultilingualUrls };
|
|
46
45
|
//# sourceMappingURL=getMultilingualUrls.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { checkIsURLAbsolute } from "../utils/checkIsURLAbsolute.mjs";
|
|
2
2
|
import { internationalization } from "@intlayer/config/built";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/localization/getPathWithoutLocale.ts
|
|
5
5
|
/**
|
|
6
6
|
* True when the build-time routing mode is known and is not a prefix-based
|
|
7
7
|
* mode (neither 'prefix-all' nor 'prefix-no-default').
|
|
@@ -66,6 +66,5 @@ const getPathWithoutLocale = (inputUrl, locales = internationalization?.locales)
|
|
|
66
66
|
return url.toString().replace("http://e.com", "");
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
//#endregion
|
|
70
69
|
export { getPathWithoutLocale };
|
|
71
70
|
//# sourceMappingURL=getPathWithoutLocale.mjs.map
|
|
@@ -2,7 +2,7 @@ import { isLocaleExclusiveOnDomain } from "./domainUtils.mjs";
|
|
|
2
2
|
import { internationalization, routing } from "@intlayer/config/built";
|
|
3
3
|
import { DEFAULT_LOCALE, LOCALES, ROUTING_MODE } from "@intlayer/config/defaultValues";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/localization/getPrefix.ts
|
|
6
6
|
/**
|
|
7
7
|
* Resolves routing configuration by merging provided options with configuration defaults.
|
|
8
8
|
* Single source of truth for default routing config resolution across all localization functions.
|
|
@@ -81,6 +81,5 @@ const getPrefix = (locale, options = {}) => {
|
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
//#endregion
|
|
85
84
|
export { getPrefix, isDeclaredLocale, resolveRoutingConfig };
|
|
86
85
|
//# sourceMappingURL=getPrefix.mjs.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { getPathWithoutLocale } from "./getPathWithoutLocale.mjs";
|
|
2
1
|
import { comparePaths, normalizePath } from "./comparePaths.mjs";
|
|
3
2
|
import { getDomainHostname, getDomainOrigin, getLocaleFromDomain, isLocaleExclusiveOnDomain } from "./domainUtils.mjs";
|
|
4
|
-
import { getRewriteRules } from "./rewriteMatch.mjs";
|
|
5
|
-
import { getCanonicalPath } from "./getCanonicalPath.mjs";
|
|
6
|
-
import { getPrefix, isDeclaredLocale } from "./getPrefix.mjs";
|
|
7
|
-
import { getInternalPath, getRewritePath, resolveLocalizedPath } from "./rewriteUtils.mjs";
|
|
8
|
-
import { getLocalizedPath } from "./getLocalizedPath.mjs";
|
|
9
|
-
import { getLocalizedUrl } from "./getLocalizedUrl.mjs";
|
|
10
|
-
import { getMultilingualUrls } from "./getMultilingualUrls.mjs";
|
|
11
3
|
import { generateSitemap, generateSitemapUrl } from "./generateSitemap.mjs";
|
|
12
|
-
import { localeResolver } from "./localeResolver.mjs";
|
|
13
|
-
import { localeDetector } from "./localeDetector.mjs";
|
|
14
4
|
import { getBrowserLocale } from "./getBrowserLocale.mjs";
|
|
5
|
+
import { getCanonicalPath } from "./getCanonicalPath.mjs";
|
|
15
6
|
import { getHTMLTextDir } from "./getHTMLTextDir.mjs";
|
|
16
7
|
import { getLocale } from "./getLocale.mjs";
|
|
17
8
|
import { getLocaleFromPath } from "./getLocaleFromPath.mjs";
|
|
18
9
|
import { getLocaleFromRequest } from "./getLocaleFromRequest.mjs";
|
|
19
10
|
import { getLocaleLang } from "./getLocaleLang.mjs";
|
|
20
11
|
import { getLocaleName } from "./getLocaleName.mjs";
|
|
12
|
+
import { getLocalizedPath } from "./getLocalizedPath.mjs";
|
|
13
|
+
import { getLocalizedUrl } from "./getLocalizedUrl.mjs";
|
|
14
|
+
import { getMultilingualUrls } from "./getMultilingualUrls.mjs";
|
|
15
|
+
import { getPathWithoutLocale } from "./getPathWithoutLocale.mjs";
|
|
16
|
+
import { getPrefix, isDeclaredLocale } from "./getPrefix.mjs";
|
|
17
|
+
import { localeDetector } from "./localeDetector.mjs";
|
|
21
18
|
import { localeFlatMap, localeMap, localeRecord } from "./localeMapper.mjs";
|
|
19
|
+
import { localeResolver } from "./localeResolver.mjs";
|
|
22
20
|
import { formatProxyEnabledMessage, isProxyStorageLocaleEnabled, resolveProxyMode } from "./proxyMode.mjs";
|
|
23
21
|
import { getPreloadLocale, resolveBrowserLocale } from "./resolveBrowserLocale.mjs";
|
|
22
|
+
import { getRewriteRules } from "./rewriteMatch.mjs";
|
|
23
|
+
import { getInternalPath, getRewritePath, resolveLocalizedPath } from "./rewriteUtils.mjs";
|
|
24
24
|
import { validatePrefix } from "./validatePrefix.mjs";
|
|
25
25
|
|
|
26
26
|
export { comparePaths, formatProxyEnabledMessage, generateSitemap, generateSitemapUrl, getBrowserLocale, getCanonicalPath, getDomainHostname, getDomainOrigin, getHTMLTextDir, getInternalPath, getLocale, getLocaleFromDomain, getLocaleFromPath, getLocaleFromRequest, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMultilingualUrls, getPathWithoutLocale, getPrefix, getPreloadLocale, getRewritePath, getRewriteRules, isDeclaredLocale, isLocaleExclusiveOnDomain, isProxyStorageLocaleEnabled, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, normalizePath, resolveBrowserLocale, resolveLocalizedPath, resolveProxyMode, validatePrefix };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { localeResolver } from "./localeResolver.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/localization/localeDetector.ts
|
|
4
4
|
/**
|
|
5
5
|
* Constants
|
|
6
6
|
*/
|
|
@@ -158,6 +158,5 @@ const localeDetector = (headers, availableLocales, defaultLocale) => {
|
|
|
158
158
|
return detectedLocale;
|
|
159
159
|
};
|
|
160
160
|
|
|
161
|
-
//#endregion
|
|
162
161
|
export { getPreferredLanguages, localeDetector };
|
|
163
162
|
//# sourceMappingURL=localeDetector.mjs.map
|
|
@@ -2,7 +2,7 @@ import { getPrefix } from "./getPrefix.mjs";
|
|
|
2
2
|
import { internationalization, routing } from "@intlayer/config/built";
|
|
3
3
|
import { DEFAULT_LOCALE } from "@intlayer/config/defaultValues";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/localization/localeMapper.ts
|
|
6
6
|
/**
|
|
7
7
|
* Map the locale data to an array of objects
|
|
8
8
|
*
|
|
@@ -115,6 +115,5 @@ const localeRecord = (mapper, locales = internationalization.locales ?? [], defa
|
|
|
115
115
|
return acc;
|
|
116
116
|
}, {});
|
|
117
117
|
|
|
118
|
-
//#endregion
|
|
119
118
|
export { localeFlatMap, localeMap, localeRecord };
|
|
120
119
|
//# sourceMappingURL=localeMapper.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { internationalization } from "@intlayer/config/built";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/localization/localeResolver.ts
|
|
4
4
|
/**
|
|
5
5
|
* Resolves the most specific locale from a user-provided list,
|
|
6
6
|
* or falls back to the default locale if no match is found.
|
|
@@ -22,6 +22,5 @@ const localeResolver = (selectedLocale, locales = internationalization?.locales,
|
|
|
22
22
|
return defaultLocale;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { localeResolver };
|
|
27
26
|
//# sourceMappingURL=localeResolver.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { colorize } from "@intlayer/config/logger";
|
|
2
2
|
import * as ANSIColors from "@intlayer/config/colors";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/localization/proxyMode.ts
|
|
5
5
|
/**
|
|
6
6
|
* Resolves the effective {@link ProxyMode} from the `routing.enableProxy`
|
|
7
7
|
* configuration value.
|
|
@@ -85,6 +85,5 @@ const isProxyStorageLocaleEnabled = (proxyMode, isDevServer) => !(proxyMode ===
|
|
|
85
85
|
*/
|
|
86
86
|
const formatProxyEnabledMessage = (isStorageLocaleSuppressed, purpose = "dev") => [`Intlayer proxy ${colorize("enabled", ANSIColors.GREEN)}`, isStorageLocaleSuppressed && colorize(`- storage redirection disabled for ${purpose} purpose`, ANSIColors.GREY)].filter(Boolean).join(" ");
|
|
87
87
|
|
|
88
|
-
//#endregion
|
|
89
88
|
export { formatProxyEnabledMessage, isProxyStorageLocaleEnabled, resolveProxyMode };
|
|
90
89
|
//# sourceMappingURL=proxyMode.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getLocaleFromStorageClient } from "../utils/localeStorage.mjs";
|
|
2
2
|
import { getLocaleFromDomain } from "./domainUtils.mjs";
|
|
3
|
-
import { resolveRoutingConfig } from "./getPrefix.mjs";
|
|
4
3
|
import { getLocaleFromPath } from "./getLocaleFromPath.mjs";
|
|
4
|
+
import { resolveRoutingConfig } from "./getPrefix.mjs";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/localization/resolveBrowserLocale.ts
|
|
7
7
|
/**
|
|
8
8
|
* Resolves the locale of the current document outside of React.
|
|
9
9
|
*
|
|
@@ -56,6 +56,5 @@ const getPreloadLocale = () => {
|
|
|
56
56
|
return memoizedLocale;
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
//#endregion
|
|
60
59
|
export { getPreloadLocale, resolveBrowserLocale };
|
|
61
60
|
//# sourceMappingURL=resolveBrowserLocale.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/localization/rewriteMatch.ts
|
|
2
2
|
/**
|
|
3
3
|
* Normalizes legacy Record format or extracts specialized rules from RewriteObject.
|
|
4
4
|
*
|
|
@@ -54,6 +54,5 @@ const extractParams = (url, pattern) => {
|
|
|
54
54
|
return match ? match.slice(1) : null;
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
//#endregion
|
|
58
57
|
export { extractParams, fillPath, getRewriteRules };
|
|
59
58
|
//# sourceMappingURL=rewriteMatch.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { extractParams, fillPath, getRewriteRules } from "./rewriteMatch.mjs";
|
|
2
1
|
import { getCanonicalPath } from "./getCanonicalPath.mjs";
|
|
2
|
+
import { extractParams, fillPath, getRewriteRules } from "./rewriteMatch.mjs";
|
|
3
3
|
import { internationalization } from "@intlayer/config/built";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/localization/rewriteUtils.ts
|
|
6
6
|
/**
|
|
7
7
|
* Given a canonical path (e.g., "/products/123"), finds the localized URL pattern
|
|
8
8
|
* (e.g., "/produits/123") and reports whether a rule actually matched.
|
|
@@ -59,6 +59,5 @@ const getRewritePath = (pathname, locale, rewrite) => {
|
|
|
59
59
|
if (isRewritten && localizedPath !== pathname) return localizedPath;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
//#endregion
|
|
63
62
|
export { getInternalPath, getRewritePath, resolveLocalizedPath };
|
|
64
63
|
//# sourceMappingURL=rewriteUtils.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getPrefix, resolveRoutingConfig } from "./getPrefix.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/localization/validatePrefix.ts
|
|
4
4
|
/**
|
|
5
5
|
* True when the build-time routing mode is known and is NOT 'no-prefix'.
|
|
6
6
|
*/
|
|
@@ -56,6 +56,5 @@ const validatePrefix = (locale, options) => {
|
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
//#endregion
|
|
60
59
|
export { validatePrefix };
|
|
61
60
|
//# sourceMappingURL=validatePrefix.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ATTRIBUTE_NAME_START_R, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, CONSECUTIVE_NEWLINE_R, DO_NOT_PROCESS_HTML_ELEMENTS, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FRONT_MATTER_R, GFM_TASK_R, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_LEFT_TRIM_AMOUNT_R, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, NAMED_CODES_TO_UNICODE, NP_TABLE_R, ORDERED, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, PARAGRAPH_R, Priority, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, RuleType, SCOPE_BLOCK, SCOPE_BOTH, SCOPE_INLINE, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, TEXT_BOLD_R, TEXT_EMPHASIZED_R, TEXT_ESCAPED_R, TEXT_MARKED_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, UNORDERED, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R } from "./constants.mjs";
|
|
2
2
|
import { matchCustomComponent, matchHtmlBlockElement, matchSelfClosingElement, startsWithCustomComponent, startsWithElement, startsWithHtmlBlockElement, startsWithSelfClosingElement } from "./elementScanner.mjs";
|
|
3
|
-
import { allowInline, anyScopeRegex, attributeValueToNodePropValue, blockRegex, captureNothing, cx, get, inlineRegex, normalizeAttributeKey, parseBlock, parseCaptureInline, parseInline, parseSimpleInline, parseTableAlign, parseTableCells, parseTableRow, renderNothing, sanitizer, simpleInlineRegex, slugify, some, startsWith, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, unquote } from "./utils.mjs";
|
|
4
3
|
import { parserFor } from "./parser.mjs";
|
|
5
4
|
import { createRenderer, renderFor } from "./renderer.mjs";
|
|
5
|
+
import { allowInline, anyScopeRegex, attributeValueToNodePropValue, blockRegex, captureNothing, cx, get, inlineRegex, normalizeAttributeKey, parseBlock, parseCaptureInline, parseInline, parseSimpleInline, parseTableAlign, parseTableCells, parseTableRow, renderNothing, sanitizer, simpleInlineRegex, slugify, some, startsWith, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, unquote } from "./utils.mjs";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/markdown/compiler.ts
|
|
8
8
|
const IMAGE_R = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;
|
|
9
9
|
const LINK_R = new RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`);
|
|
10
10
|
/**
|
|
@@ -1113,6 +1113,5 @@ const compileWithOptions = (markdown, runtime, options = {}) => {
|
|
|
1113
1113
|
}, compilerOptions);
|
|
1114
1114
|
};
|
|
1115
1115
|
|
|
1116
|
-
//#endregion
|
|
1117
1116
|
export { compile, compileWithOptions, createCompiler, getRuleSet, parseMarkdown, renderMarkdownAst };
|
|
1118
1117
|
//# sourceMappingURL=compiler.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/markdown/constants.ts
|
|
2
2
|
/**
|
|
3
3
|
* Analogous to `node.type`. Please note that the values here may change at any time,
|
|
4
4
|
* so do not hard code against the value directly.
|
|
@@ -276,6 +276,5 @@ const generateListRegex = (type) => {
|
|
|
276
276
|
const ORDERED_LIST_R = generateListRegex(1);
|
|
277
277
|
const UNORDERED_LIST_R = generateListRegex(2);
|
|
278
278
|
|
|
279
|
-
//#endregion
|
|
280
279
|
export { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_NAME_START_R, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, DO_NOT_PROCESS_HTML_ELEMENTS, FENCE_DELIMITER_R, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, GFM_TASK_R, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, INLINE_SKIP_R, INTERPOLATION_R, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LOOKAHEAD, NAMED_CODES_TO_UNICODE, NP_TABLE_R, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, PARAGRAPH_R, Priority, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, RuleScope, RuleType, SCOPE_BLOCK, SCOPE_BOTH, SCOPE_INLINE, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, TABLE_CENTER_ALIGN, TABLE_LEFT_ALIGN, TABLE_RIGHT_ALIGN, TABLE_TRIM_PIPES, TAB_R, TEXT_BOLD_R, TEXT_EMPHASIZED_R, TEXT_ESCAPED_R, TEXT_MARKED_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, UNESCAPE_R, UNORDERED, UNORDERED_LIST_BULLET, UNORDERED_LIST_ITEM_PREFIX, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex };
|
|
281
280
|
//# sourceMappingURL=constants.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/markdown/elementScanner.ts
|
|
2
2
|
/**
|
|
3
3
|
* Lean, non-backtracking element scanner for HTML blocks, custom components, and self-closing tags.
|
|
4
4
|
*/
|
|
@@ -178,6 +178,5 @@ const startsWithSelfClosingElement = (source) => matchSelfClosingElement(source)
|
|
|
178
178
|
const startsWithCustomComponent = (source) => matchCustomComponent(source) !== null;
|
|
179
179
|
const startsWithElement = (source) => startsWithHtmlBlockElement(source) || startsWithSelfClosingElement(source);
|
|
180
180
|
|
|
181
|
-
//#endregion
|
|
182
181
|
export { matchCustomComponent, matchElement, matchHtmlBlockElement, matchSelfClosingElement, startsWithCustomComponent, startsWithElement, startsWithHtmlBlockElement, startsWithSelfClosingElement };
|
|
183
182
|
//# sourceMappingURL=elementScanner.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getMarkdownMetadata } from "../transpiler/markdown/getMarkdownMetadata.mjs";
|
|
2
2
|
import { validateMarkdown } from "../transpiler/markdown/validateMarkdown.mjs";
|
|
3
3
|
import { md as markdown } from "../transpiler/markdown/markdown.mjs";
|
|
4
|
+
import { compile, compileWithOptions, createCompiler, getRuleSet, parseMarkdown, renderMarkdownAst } from "./compiler.mjs";
|
|
4
5
|
import { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_NAME_START_R, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, DO_NOT_PROCESS_HTML_ELEMENTS, FENCE_DELIMITER_R, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, GFM_TASK_R, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, INLINE_SKIP_R, INTERPOLATION_R, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LOOKAHEAD, NAMED_CODES_TO_UNICODE, NP_TABLE_R, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, PARAGRAPH_R, Priority, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, RuleScope, RuleType, SCOPE_BLOCK, SCOPE_BOTH, SCOPE_INLINE, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, TABLE_CENTER_ALIGN, TABLE_LEFT_ALIGN, TABLE_RIGHT_ALIGN, TABLE_TRIM_PIPES, TAB_R, TEXT_BOLD_R, TEXT_EMPHASIZED_R, TEXT_ESCAPED_R, TEXT_MARKED_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, UNESCAPE_R, UNORDERED, UNORDERED_LIST_BULLET, UNORDERED_LIST_ITEM_PREFIX, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex } from "./constants.mjs";
|
|
5
|
-
import { allowInline, anyScopeRegex, attributeValueToNodePropValue, blockRegex, captureNothing, cx, get, inlineRegex, normalizeAttributeKey, normalizeWhitespace, parseBlock, parseCaptureInline, parseInline, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, qualifies, renderNothing, sanitizer, simpleInlineRegex, slugify, some, startsWith, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, unquote } from "./utils.mjs";
|
|
6
6
|
import { parserFor } from "./parser.mjs";
|
|
7
7
|
import { createRenderer, renderFor } from "./renderer.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { allowInline, anyScopeRegex, attributeValueToNodePropValue, blockRegex, captureNothing, cx, get, inlineRegex, normalizeAttributeKey, normalizeWhitespace, parseBlock, parseCaptureInline, parseInline, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, qualifies, renderNothing, sanitizer, simpleInlineRegex, slugify, some, startsWith, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, unquote } from "./utils.mjs";
|
|
9
9
|
|
|
10
10
|
export { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_NAME_START_R, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, DO_NOT_PROCESS_HTML_ELEMENTS, FENCE_DELIMITER_R, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, GFM_TASK_R, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, INLINE_SKIP_R, INTERPOLATION_R, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LOOKAHEAD, NAMED_CODES_TO_UNICODE, NP_TABLE_R, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, PARAGRAPH_R, Priority, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, RuleScope, RuleType, SCOPE_BLOCK, SCOPE_BOTH, SCOPE_INLINE, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, TABLE_CENTER_ALIGN, TABLE_LEFT_ALIGN, TABLE_RIGHT_ALIGN, TABLE_TRIM_PIPES, TAB_R, TEXT_BOLD_R, TEXT_EMPHASIZED_R, TEXT_ESCAPED_R, TEXT_MARKED_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, UNESCAPE_R, UNORDERED, UNORDERED_LIST_BULLET, UNORDERED_LIST_ITEM_PREFIX, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R, allowInline, anyScopeRegex, attributeValueToNodePropValue, blockRegex, captureNothing, compile, compileWithOptions, createCompiler, createRenderer, cx, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex, get, getMarkdownMetadata, getRuleSet, inlineRegex, markdown as md, normalizeAttributeKey, normalizeWhitespace, parseBlock, parseCaptureInline, parseInline, parseMarkdown, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, parserFor, qualifies, renderFor, renderMarkdownAst, renderNothing, sanitizer, simpleInlineRegex, slugify, some, startsWith, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, unquote, validateMarkdown };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RuleType, SCOPE_BLOCK, SCOPE_INLINE } from "./constants.mjs";
|
|
2
2
|
import { normalizeWhitespace, qualifies } from "./utils.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/markdown/parser.ts
|
|
5
5
|
/**
|
|
6
6
|
* Advance the incremental lookbehind carried on the parse state.
|
|
7
7
|
*
|
|
@@ -137,6 +137,5 @@ const parserFor = (rules) => {
|
|
|
137
137
|
return (source, state) => nestedParse(normalizeWhitespace(source), state);
|
|
138
138
|
};
|
|
139
139
|
|
|
140
|
-
//#endregion
|
|
141
140
|
export { parserFor };
|
|
142
141
|
//# sourceMappingURL=parser.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/markdown/renderer.ts
|
|
2
2
|
/**
|
|
3
3
|
* Creates a renderer for AST nodes.
|
|
4
4
|
* Renamed from `reactFor` to be framework-agnostic.
|
|
@@ -46,6 +46,5 @@ const createRenderer = (rules, userRender) => {
|
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
//#endregion
|
|
50
49
|
export { createRenderer, renderFor };
|
|
51
50
|
//# sourceMappingURL=renderer.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ATTRIBUTES_TO_SANITIZE, CAPTURE_LETTER_AFTER_HYPHEN, CR_NEWLINE_R, FENCE_DELIMITER_R, FORMFEED_R, HTML_CUSTOM_ATTR_R, INTERPOLATION_R, TABLE_CENTER_ALIGN, TABLE_LEFT_ALIGN, TABLE_RIGHT_ALIGN, TABLE_TRIM_PIPES, TAB_R, UNESCAPE_R } from "./constants.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/markdown/utils.ts
|
|
4
4
|
/**
|
|
5
5
|
* Trim trailing whitespace from a string.
|
|
6
6
|
*/
|
|
@@ -441,6 +441,5 @@ const some = (probes, input) => {
|
|
|
441
441
|
return false;
|
|
442
442
|
};
|
|
443
443
|
|
|
444
|
-
//#endregion
|
|
445
444
|
export { allowInline, anyScopeRegex, attributeValueToNodePropValue, blockRegex, captureNothing, cx, get, inlineRegex, normalizeAttributeKey, normalizeWhitespace, parseBlock, parseCaptureInline, parseInline, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, qualifies, renderNothing, sanitizer, simpleInlineRegex, slugify, some, startsWith, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, unquote };
|
|
446
445
|
//# sourceMappingURL=utils.mjs.map
|
|
@@ -7,7 +7,7 @@ import { plural } from "../transpiler/plural/plural.mjs";
|
|
|
7
7
|
import { select } from "../transpiler/select/select.mjs";
|
|
8
8
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/messageFormat/ICU.ts
|
|
11
11
|
const parseICU = (text) => {
|
|
12
12
|
let index = 0;
|
|
13
13
|
const parseNodes = () => {
|
|
@@ -417,6 +417,5 @@ const icuToIntlayerFormatter = (message) => {
|
|
|
417
417
|
});
|
|
418
418
|
};
|
|
419
419
|
|
|
420
|
-
//#endregion
|
|
421
420
|
export { icuToIntlayerFormatter, intlayerToICUFormatter };
|
|
422
421
|
//# sourceMappingURL=ICU.mjs.map
|
|
@@ -7,7 +7,7 @@ import { plural } from "../transpiler/plural/plural.mjs";
|
|
|
7
7
|
import { select } from "../transpiler/select/select.mjs";
|
|
8
8
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/messageFormat/i18next.ts
|
|
11
11
|
const parseI18Next = (text) => {
|
|
12
12
|
let index = 0;
|
|
13
13
|
const parseNodes = () => {
|
|
@@ -399,6 +399,5 @@ const i18nextToIntlayerFormatter = (message) => {
|
|
|
399
399
|
});
|
|
400
400
|
};
|
|
401
401
|
|
|
402
|
-
//#endregion
|
|
403
402
|
export { i18nextToIntlayerFormatter, intlayerToI18nextFormatter };
|
|
404
403
|
//# sourceMappingURL=i18next.mjs.map
|
|
@@ -2,7 +2,7 @@ import { icuToIntlayerFormatter, intlayerToICUFormatter } from "./ICU.mjs";
|
|
|
2
2
|
import { i18nextToIntlayerFormatter, intlayerToI18nextFormatter } from "./i18next.mjs";
|
|
3
3
|
import { navigatePath } from "./navigatePath.mjs";
|
|
4
4
|
import { intlayerToPortableObjectFormatter, portableObjectToIntlayerFormatter } from "./po.mjs";
|
|
5
|
-
import { intlayerToVueI18nFormatter, vueI18nToIntlayerFormatter } from "./vue-i18n.mjs";
|
|
6
5
|
import { createMessageResolver, interpolateMessage, parseTaggedMessage, resolveMessage, resolveMessageNode, resolveMessageNodeToString } from "./resolveMessage.mjs";
|
|
6
|
+
import { intlayerToVueI18nFormatter, vueI18nToIntlayerFormatter } from "./vue-i18n.mjs";
|
|
7
7
|
|
|
8
8
|
export { createMessageResolver, i18nextToIntlayerFormatter, icuToIntlayerFormatter, interpolateMessage, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToPortableObjectFormatter, intlayerToVueI18nFormatter, navigatePath, parseTaggedMessage, portableObjectToIntlayerFormatter, resolveMessage, resolveMessageNode, resolveMessageNodeToString, vueI18nToIntlayerFormatter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/messageFormat/navigatePath.ts
|
|
2
2
|
/**
|
|
3
3
|
* Reads a dotted `path` (e.g. `counter.label`) out of a nested content value.
|
|
4
4
|
*
|
|
@@ -31,6 +31,5 @@ const navigatePath = (contentValue, path, keySeparator = ".") => {
|
|
|
31
31
|
return current;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
//#endregion
|
|
35
34
|
export { navigatePath };
|
|
36
35
|
//# sourceMappingURL=navigatePath.mjs.map
|
|
@@ -6,7 +6,7 @@ import { insert as insertion } from "../transpiler/insertion/insertion.mjs";
|
|
|
6
6
|
import { plural } from "../transpiler/plural/plural.mjs";
|
|
7
7
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/messageFormat/po.ts
|
|
10
10
|
/**
|
|
11
11
|
* Extracts the string value from a transformed AST node or generic object.
|
|
12
12
|
*/
|
|
@@ -162,6 +162,5 @@ const portableObjectToIntlayerFormatter = (message) => {
|
|
|
162
162
|
});
|
|
163
163
|
};
|
|
164
164
|
|
|
165
|
-
//#endregion
|
|
166
165
|
export { intlayerToPortableObjectFormatter, portableObjectToIntlayerFormatter };
|
|
167
166
|
//# sourceMappingURL=po.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getEnumeration } from "../interpreter/getEnumeration.mjs";
|
|
2
1
|
import { getCachedIntl } from "../utils/intl.mjs";
|
|
2
|
+
import { getEnumeration } from "../interpreter/getEnumeration.mjs";
|
|
3
3
|
import { getPlural } from "../interpreter/getPlural.mjs";
|
|
4
4
|
import { getSelect } from "../interpreter/getSelect.mjs";
|
|
5
5
|
import { icuToIntlayerFormatter } from "./ICU.mjs";
|
|
@@ -7,7 +7,7 @@ import { i18nextToIntlayerFormatter } from "./i18next.mjs";
|
|
|
7
7
|
import { vueI18nToIntlayerFormatter } from "./vue-i18n.mjs";
|
|
8
8
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/messageFormat/resolveMessage.ts
|
|
11
11
|
/** Internal enumeration metadata keys injected by the converters. */
|
|
12
12
|
const ENUMERATION_METADATA_KEYS = [
|
|
13
13
|
"__intlayer_icu_var",
|
|
@@ -212,6 +212,5 @@ const parseTaggedMessage = (message) => {
|
|
|
212
212
|
return tokens;
|
|
213
213
|
};
|
|
214
214
|
|
|
215
|
-
//#endregion
|
|
216
215
|
export { createMessageResolver, interpolateMessage, parseTaggedMessage, resolveMessage, resolveMessageNode, resolveMessageNodeToString };
|
|
217
216
|
//# sourceMappingURL=resolveMessage.mjs.map
|
|
@@ -3,7 +3,7 @@ import { gender } from "../transpiler/gender/gender.mjs";
|
|
|
3
3
|
import { insert as insertion } from "../transpiler/insertion/insertion.mjs";
|
|
4
4
|
import { icuToIntlayerFormatter, intlayerToICUFormatter } from "./ICU.mjs";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/messageFormat/verify-icu-format.ts
|
|
7
7
|
/**
|
|
8
8
|
* Verification script to demonstrate ICU format conversion
|
|
9
9
|
* This script shows that Intlayer correctly converts {{var}} (internal format)
|
|
@@ -62,5 +62,4 @@ console.log("ICU MessageFormat uses single braces: {var}");
|
|
|
62
62
|
console.log("Intlayer internal format uses double braces: {{var}}");
|
|
63
63
|
console.log("The conversion between these formats is handled automatically.");
|
|
64
64
|
|
|
65
|
-
//#endregion
|
|
66
65
|
//# sourceMappingURL=verify-icu-format.mjs.map
|
|
@@ -3,7 +3,7 @@ import { enu as enumeration } from "../transpiler/enumeration/enumeration.mjs";
|
|
|
3
3
|
import { insert as insertion } from "../transpiler/insertion/insertion.mjs";
|
|
4
4
|
import * as NodeTypes from "@intlayer/types/nodeType";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/messageFormat/vue-i18n.ts
|
|
7
7
|
const parseVueI18nPart = (text) => {
|
|
8
8
|
let index = 0;
|
|
9
9
|
const nodes = [];
|
|
@@ -197,6 +197,5 @@ const vueI18nToIntlayerFormatter = (message) => {
|
|
|
197
197
|
});
|
|
198
198
|
};
|
|
199
199
|
|
|
200
|
-
//#endregion
|
|
201
200
|
export { intlayerToVueI18nFormatter, vueI18nToIntlayerFormatter };
|
|
202
201
|
//# sourceMappingURL=vue-i18n.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CONDITION, formatNodeType } from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/transpiler/condition/condition.ts
|
|
4
4
|
/**
|
|
5
5
|
* Function intended to be used to build intlayer dictionaries.
|
|
6
6
|
*
|
|
@@ -20,6 +20,5 @@ import { CONDITION, formatNodeType } from "@intlayer/types/nodeType";
|
|
|
20
20
|
*/
|
|
21
21
|
const condition = (content) => formatNodeType(CONDITION, content);
|
|
22
22
|
|
|
23
|
-
//#endregion
|
|
24
23
|
export { condition as cond };
|
|
25
24
|
//# sourceMappingURL=condition.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ENUMERATION, formatNodeType } from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/transpiler/enumeration/enumeration.ts
|
|
4
4
|
/**
|
|
5
5
|
* Function intended to be used to build intlayer dictionaries.
|
|
6
6
|
*
|
|
@@ -22,6 +22,5 @@ import { ENUMERATION, formatNodeType } from "@intlayer/types/nodeType";
|
|
|
22
22
|
*/
|
|
23
23
|
const enumeration = (content) => formatNodeType(ENUMERATION, content);
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { enumeration as enu };
|
|
27
26
|
//# sourceMappingURL=enumeration.mjs.map
|
|
@@ -3,7 +3,7 @@ import { colorizePath, getAppLogger } from "@intlayer/config/logger";
|
|
|
3
3
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
4
4
|
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/transpiler/file/file.ts
|
|
7
7
|
const fileContent = (path, callerDir, baseDir) => {
|
|
8
8
|
const isRelativePath = path.startsWith("./") || path.startsWith("../");
|
|
9
9
|
const appLogger = getAppLogger();
|
|
@@ -45,6 +45,5 @@ const file = (path) => {
|
|
|
45
45
|
return fileContent(path, callerDir, INTLAYER_BASE_DIR);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
//#endregion
|
|
49
48
|
export { file, fileContent };
|
|
50
49
|
//# sourceMappingURL=file.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/transpiler/file/fileBrowser.ts
|
|
2
2
|
/**
|
|
3
3
|
* Function intended to be used to build intlayer dictionaries.
|
|
4
4
|
*
|
|
@@ -18,6 +18,5 @@ const file = (_path) => {
|
|
|
18
18
|
throw new Error("file is not available in browser");
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
//#endregion
|
|
22
21
|
export { file };
|
|
23
22
|
//# sourceMappingURL=fileBrowser.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GENDER, formatNodeType } from "@intlayer/types/nodeType";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/transpiler/gender/gender.ts
|
|
4
4
|
/**
|
|
5
5
|
* Function intended to be used to build intlayer dictionaries.
|
|
6
6
|
*
|
|
@@ -20,6 +20,5 @@ import { GENDER, formatNodeType } from "@intlayer/types/nodeType";
|
|
|
20
20
|
*/
|
|
21
21
|
const gender = (content) => formatNodeType(GENDER, content);
|
|
22
22
|
|
|
23
|
-
//#endregion
|
|
24
23
|
export { gender };
|
|
25
24
|
//# sourceMappingURL=gender.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/transpiler/html/getHTMLCustomComponents.ts
|
|
2
2
|
const parseAttributes = (attributesString) => {
|
|
3
3
|
const attributes = {};
|
|
4
4
|
if (!attributesString?.trim()) return attributes;
|
|
@@ -37,6 +37,5 @@ const getHTMLCustomComponents = (content) => {
|
|
|
37
37
|
return components;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
40
|
export { getHTMLCustomComponents };
|
|
42
41
|
//# sourceMappingURL=getHTMLCustomComponents.mjs.map
|