@intlayer/core 9.4.3 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/dist/cjs/dictionaryManipulator/qualifiedDictionary.cjs.map +1 -1
- package/dist/cjs/formatters/list.cjs.map +1 -1
- package/dist/cjs/index.cjs +5 -8
- package/dist/cjs/interpreter/getPlural.cjs.map +1 -1
- package/dist/cjs/markdown/compiler.cjs +437 -209
- package/dist/cjs/markdown/compiler.cjs.map +1 -1
- package/dist/cjs/markdown/constants.cjs +32 -50
- package/dist/cjs/markdown/constants.cjs.map +1 -1
- package/dist/cjs/markdown/elementScanner.cjs +191 -0
- package/dist/cjs/markdown/elementScanner.cjs.map +1 -0
- package/dist/cjs/markdown/index.cjs +5 -8
- package/dist/cjs/markdown/parser.cjs +90 -48
- package/dist/cjs/markdown/parser.cjs.map +1 -1
- package/dist/cjs/markdown/renderer.cjs +14 -11
- package/dist/cjs/markdown/renderer.cjs.map +1 -1
- package/dist/cjs/markdown/utils.cjs +123 -34
- package/dist/cjs/markdown/utils.cjs.map +1 -1
- package/dist/esm/dictionaryManipulator/qualifiedDictionary.mjs.map +1 -1
- package/dist/esm/formatters/list.mjs.map +1 -1
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/interpreter/getPlural.mjs.map +1 -1
- package/dist/esm/markdown/compiler.mjs +438 -211
- package/dist/esm/markdown/compiler.mjs.map +1 -1
- package/dist/esm/markdown/constants.mjs +29 -43
- package/dist/esm/markdown/constants.mjs.map +1 -1
- package/dist/esm/markdown/elementScanner.mjs +183 -0
- package/dist/esm/markdown/elementScanner.mjs.map +1 -0
- package/dist/esm/markdown/index.mjs +3 -3
- package/dist/esm/markdown/parser.mjs +90 -48
- package/dist/esm/markdown/parser.mjs.map +1 -1
- package/dist/esm/markdown/renderer.mjs +14 -11
- package/dist/esm/markdown/renderer.mjs.map +1 -1
- package/dist/esm/markdown/utils.mjs +124 -35
- package/dist/esm/markdown/utils.mjs.map +1 -1
- package/dist/types/deepTransformPlugins/getEditedContent.d.ts +2 -3
- package/dist/types/deepTransformPlugins/getEditedContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +3 -4
- package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +3 -4
- package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +2 -3
- package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts +2 -3
- package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getMaskContent.d.ts +2 -3
- package/dist/types/deepTransformPlugins/getMaskContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts +3 -4
- package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getMultilingualDictionary.d.ts +1 -2
- package/dist/types/deepTransformPlugins/getMultilingualDictionary.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts +1 -2
- package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/getSplittedContent.d.ts +2 -3
- package/dist/types/deepTransformPlugins/getSplittedContent.d.ts.map +1 -1
- package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts +1 -2
- package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts +1 -2
- package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts +1 -2
- package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getDefaultNode.d.ts +1 -2
- package/dist/types/dictionaryManipulator/getDefaultNode.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getEmptyNode.d.ts +1 -2
- package/dist/types/dictionaryManipulator/getEmptyNode.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getNestedDictionaryReferences.d.ts +4 -5
- package/dist/types/dictionaryManipulator/getNestedDictionaryReferences.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getNodeChildren.d.ts +1 -2
- package/dist/types/dictionaryManipulator/getNodeChildren.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/getNodeType.d.ts +1 -2
- package/dist/types/dictionaryManipulator/getNodeType.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts +1 -2
- package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/mergeQualifiedDictionaries.d.ts +1 -2
- package/dist/types/dictionaryManipulator/mergeQualifiedDictionaries.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts +2 -3
- package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/orderDictionaries.d.ts +1 -2
- package/dist/types/dictionaryManipulator/orderDictionaries.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/plainDynamicLoader.d.ts +4 -5
- package/dist/types/dictionaryManipulator/plainDynamicLoader.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/preloadedDynamicLoader.d.ts +4 -4
- package/dist/types/dictionaryManipulator/preloadedDynamicLoader.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/qualifiedDictionary.d.ts +14 -15
- package/dist/types/dictionaryManipulator/qualifiedDictionary.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/qualifiedDictionaryDeclaration.d.ts +5 -6
- package/dist/types/dictionaryManipulator/qualifiedDictionaryDeclaration.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts +7 -7
- package/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts +1 -2
- package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts +1 -2
- package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts.map +1 -1
- package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts +1 -2
- package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts.map +1 -1
- package/dist/types/formatters/compact.d.ts +1 -2
- package/dist/types/formatters/compact.d.ts.map +1 -1
- package/dist/types/formatters/currency.d.ts +1 -2
- package/dist/types/formatters/currency.d.ts.map +1 -1
- package/dist/types/formatters/date.d.ts +3 -4
- package/dist/types/formatters/date.d.ts.map +1 -1
- package/dist/types/formatters/index.d.ts +2 -2
- package/dist/types/formatters/list.d.ts +2 -3
- package/dist/types/formatters/list.d.ts.map +1 -1
- package/dist/types/formatters/number.d.ts +1 -2
- package/dist/types/formatters/number.d.ts.map +1 -1
- package/dist/types/formatters/percentage.d.ts +1 -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 +1 -2
- package/dist/types/formatters/units.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -5
- package/dist/types/interpreter/dictionaryTransformCache.d.ts +4 -5
- package/dist/types/interpreter/dictionaryTransformCache.d.ts.map +1 -1
- package/dist/types/interpreter/getCondition.d.ts +1 -2
- package/dist/types/interpreter/getCondition.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/deepTransform.d.ts +1 -2
- package/dist/types/interpreter/getContent/deepTransform.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/getContent.d.ts +2 -3
- package/dist/types/interpreter/getContent/getContent.d.ts.map +1 -1
- package/dist/types/interpreter/getContent/plugins.d.ts +28 -29
- package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -1
- package/dist/types/interpreter/getDictionary.d.ts +1 -2
- package/dist/types/interpreter/getDictionary.d.ts.map +1 -1
- package/dist/types/interpreter/getDictionaryAsync.d.ts +1 -2
- package/dist/types/interpreter/getDictionaryAsync.d.ts.map +1 -1
- package/dist/types/interpreter/getEnumeration.d.ts +2 -3
- 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 +1 -2
- package/dist/types/interpreter/getInsertion.d.ts.map +1 -1
- package/dist/types/interpreter/getIntlayer.d.ts +1 -2
- package/dist/types/interpreter/getIntlayer.d.ts.map +1 -1
- package/dist/types/interpreter/getIntlayerAsync.d.ts +1 -2
- package/dist/types/interpreter/getIntlayerAsync.d.ts.map +1 -1
- package/dist/types/interpreter/getNesting.d.ts +2 -3
- package/dist/types/interpreter/getNesting.d.ts.map +1 -1
- package/dist/types/interpreter/getNesting.optimized.d.ts +1 -2
- package/dist/types/interpreter/getNesting.optimized.d.ts.map +1 -1
- package/dist/types/interpreter/getPlural.d.ts +3 -4
- package/dist/types/interpreter/getPlural.d.ts.map +1 -1
- package/dist/types/interpreter/getSelect.d.ts +1 -2
- package/dist/types/interpreter/getSelect.d.ts.map +1 -1
- package/dist/types/interpreter/getTranslation.d.ts +1 -2
- package/dist/types/interpreter/getTranslation.d.ts.map +1 -1
- package/dist/types/interpreter/interpolableNode.d.ts +5 -6
- package/dist/types/interpreter/interpolableNode.d.ts.map +1 -1
- package/dist/types/interpreter/splitAndJoinInsertion.d.ts +1 -2
- package/dist/types/interpreter/splitAndJoinInsertion.d.ts.map +1 -1
- package/dist/types/localization/comparePaths.d.ts +2 -3
- package/dist/types/localization/comparePaths.d.ts.map +1 -1
- package/dist/types/localization/domainUtils.d.ts +5 -6
- package/dist/types/localization/domainUtils.d.ts.map +1 -1
- package/dist/types/localization/generateSitemap.d.ts +4 -5
- package/dist/types/localization/generateSitemap.d.ts.map +1 -1
- package/dist/types/localization/getBrowserLocale.d.ts +2 -3
- package/dist/types/localization/getBrowserLocale.d.ts.map +1 -1
- package/dist/types/localization/getCanonicalPath.d.ts +1 -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 +2 -3
- package/dist/types/localization/getLocale.d.ts.map +1 -1
- package/dist/types/localization/getLocaleFromPath.d.ts +1 -2
- package/dist/types/localization/getLocaleFromPath.d.ts.map +1 -1
- package/dist/types/localization/getLocaleLang.d.ts +1 -2
- package/dist/types/localization/getLocaleLang.d.ts.map +1 -1
- package/dist/types/localization/getLocaleName.d.ts +1 -2
- package/dist/types/localization/getLocaleName.d.ts.map +1 -1
- package/dist/types/localization/getLocalizedPath.d.ts +1 -2
- package/dist/types/localization/getLocalizedPath.d.ts.map +1 -1
- package/dist/types/localization/getLocalizedUrl.d.ts +1 -2
- package/dist/types/localization/getLocalizedUrl.d.ts.map +1 -1
- package/dist/types/localization/getMultilingualUrls.d.ts +1 -2
- package/dist/types/localization/getMultilingualUrls.d.ts.map +1 -1
- package/dist/types/localization/getPathWithoutLocale.d.ts +1 -2
- package/dist/types/localization/getPathWithoutLocale.d.ts.map +1 -1
- package/dist/types/localization/getPrefix.d.ts +7 -8
- package/dist/types/localization/getPrefix.d.ts.map +1 -1
- package/dist/types/localization/localeDetector.d.ts +2 -3
- package/dist/types/localization/localeDetector.d.ts.map +1 -1
- package/dist/types/localization/localeMapper.d.ts +4 -5
- package/dist/types/localization/localeMapper.d.ts.map +1 -1
- package/dist/types/localization/localeResolver.d.ts +1 -2
- package/dist/types/localization/localeResolver.d.ts.map +1 -1
- package/dist/types/localization/proxyMode.d.ts +4 -5
- package/dist/types/localization/proxyMode.d.ts.map +1 -1
- package/dist/types/localization/resolveBrowserLocale.d.ts +2 -3
- package/dist/types/localization/resolveBrowserLocale.d.ts.map +1 -1
- package/dist/types/localization/rewriteMatch.d.ts +3 -4
- package/dist/types/localization/rewriteMatch.d.ts.map +1 -1
- package/dist/types/localization/rewriteUtils.d.ts +5 -6
- package/dist/types/localization/rewriteUtils.d.ts.map +1 -1
- package/dist/types/localization/validatePrefix.d.ts +2 -3
- package/dist/types/localization/validatePrefix.d.ts.map +1 -1
- package/dist/types/markdown/compiler.d.ts +50 -8
- package/dist/types/markdown/compiler.d.ts.map +1 -1
- package/dist/types/markdown/constants.d.ts +101 -93
- package/dist/types/markdown/constants.d.ts.map +1 -1
- package/dist/types/markdown/elementScanner.d.ts +14 -0
- package/dist/types/markdown/elementScanner.d.ts.map +1 -0
- package/dist/types/markdown/index.d.ts +4 -4
- package/dist/types/markdown/parser.d.ts +1 -7
- package/dist/types/markdown/parser.d.ts.map +1 -1
- package/dist/types/markdown/renderer.d.ts +2 -7
- package/dist/types/markdown/renderer.d.ts.map +1 -1
- package/dist/types/markdown/types.d.ts +62 -50
- package/dist/types/markdown/types.d.ts.map +1 -1
- package/dist/types/markdown/utils.d.ts +35 -31
- package/dist/types/markdown/utils.d.ts.map +1 -1
- package/dist/types/messageFormat/ICU.d.ts +3 -4
- package/dist/types/messageFormat/ICU.d.ts.map +1 -1
- package/dist/types/messageFormat/i18next.d.ts +2 -3
- package/dist/types/messageFormat/i18next.d.ts.map +1 -1
- package/dist/types/messageFormat/navigatePath.d.ts +1 -2
- package/dist/types/messageFormat/navigatePath.d.ts.map +1 -1
- package/dist/types/messageFormat/po.d.ts +3 -4
- package/dist/types/messageFormat/po.d.ts.map +1 -1
- package/dist/types/messageFormat/resolveMessage.d.ts +7 -8
- package/dist/types/messageFormat/resolveMessage.d.ts.map +1 -1
- package/dist/types/messageFormat/vue-i18n.d.ts +2 -3
- package/dist/types/messageFormat/vue-i18n.d.ts.map +1 -1
- package/dist/types/transpiler/condition/condition.d.ts +3 -3
- package/dist/types/transpiler/condition/condition.d.ts.map +1 -1
- package/dist/types/transpiler/enumeration/enumeration.d.ts +4 -4
- package/dist/types/transpiler/enumeration/enumeration.d.ts.map +1 -1
- package/dist/types/transpiler/file/file.d.ts +4 -5
- package/dist/types/transpiler/file/file.d.ts.map +1 -1
- package/dist/types/transpiler/file/fileBrowser.d.ts +1 -2
- package/dist/types/transpiler/file/fileBrowser.d.ts.map +1 -1
- package/dist/types/transpiler/gender/gender.d.ts +4 -4
- package/dist/types/transpiler/gender/gender.d.ts.map +1 -1
- package/dist/types/transpiler/html/getHTMLCustomComponents.d.ts +1 -2
- package/dist/types/transpiler/html/getHTMLCustomComponents.d.ts.map +1 -1
- package/dist/types/transpiler/html/html.d.ts +3 -4
- package/dist/types/transpiler/html/html.d.ts.map +1 -1
- package/dist/types/transpiler/html/htmlTags.d.ts +2 -3
- package/dist/types/transpiler/html/htmlTags.d.ts.map +1 -1
- package/dist/types/transpiler/html/validateHTML.d.ts +4 -5
- package/dist/types/transpiler/html/validateHTML.d.ts.map +1 -1
- package/dist/types/transpiler/insertion/getInsertionValues.d.ts +1 -2
- package/dist/types/transpiler/insertion/getInsertionValues.d.ts.map +1 -1
- package/dist/types/transpiler/insertion/insertion.d.ts +3 -3
- package/dist/types/transpiler/insertion/insertion.d.ts.map +1 -1
- package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts +1 -2
- package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts.map +1 -1
- package/dist/types/transpiler/markdown/markdown.d.ts +3 -3
- package/dist/types/transpiler/markdown/markdown.d.ts.map +1 -1
- package/dist/types/transpiler/markdown/validateMarkdown.d.ts +3 -3
- package/dist/types/transpiler/markdown/validateMarkdown.d.ts.map +1 -1
- package/dist/types/transpiler/nesting/nesting.d.ts +5 -5
- package/dist/types/transpiler/nesting/nesting.d.ts.map +1 -1
- package/dist/types/transpiler/plural/plural.d.ts +4 -4
- package/dist/types/transpiler/plural/plural.d.ts.map +1 -1
- package/dist/types/transpiler/select/select.d.ts +3 -3
- package/dist/types/transpiler/select/select.d.ts.map +1 -1
- package/dist/types/transpiler/translation/translation.d.ts +2 -2
- package/dist/types/transpiler/translation/translation.d.ts.map +1 -1
- package/dist/types/utils/checkIsURLAbsolute.d.ts +1 -2
- package/dist/types/utils/checkIsURLAbsolute.d.ts.map +1 -1
- package/dist/types/utils/cookieExpiry.d.ts +2 -3
- package/dist/types/utils/cookieExpiry.d.ts.map +1 -1
- package/dist/types/utils/getCookie.d.ts +1 -2
- package/dist/types/utils/getCookie.d.ts.map +1 -1
- package/dist/types/utils/intl.d.ts +7 -7
- package/dist/types/utils/intl.d.ts.map +1 -1
- package/dist/types/utils/isSameKeyPath.d.ts +1 -2
- package/dist/types/utils/isSameKeyPath.d.ts.map +1 -1
- package/dist/types/utils/isValidReactElement.d.ts +1 -2
- package/dist/types/utils/isValidReactElement.d.ts.map +1 -1
- package/dist/types/utils/localeStorage.d.ts +14 -15
- package/dist/types/utils/localeStorage.d.ts.map +1 -1
- package/dist/types/utils/parseYaml.d.ts +3 -4
- package/dist/types/utils/parseYaml.d.ts.map +1 -1
- package/dist/types/utils/stringifyYaml.d.ts +1 -2
- package/dist/types/utils/stringifyYaml.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getDictionaryAsync.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getEnumeration.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getGender.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getInsertion.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getPlural.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getSelect.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/index.d.ts +0 -7
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/interpolableNode.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/index.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/nesting/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/nesting/nesting.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getDictionaryAsync.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getEnumeration.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getGender.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getInsertion.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getPlural.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getSelect.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/index.d.ts +0 -7
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/interpolableNode.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/intlayer/dist/types/index.d.ts +0 -6
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/index.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/nesting/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/nesting/nesting.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getDictionaryAsync.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getEnumeration.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getGender.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getInsertion.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getPlural.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getSelect.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/index.d.ts +0 -7
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/interpolableNode.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/intlayer/dist/types/index.d.ts +0 -6
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/index.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/nesting/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/nesting/nesting.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getDictionaryAsync.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getEnumeration.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getGender.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getInsertion.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getPlural.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getSelect.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/index.d.ts +0 -7
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/interpolableNode.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/intlayer/dist/types/index.d.ts +0 -6
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/index.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/nesting/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/nesting/nesting.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getDictionaryAsync.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getEnumeration.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getGender.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getInsertion.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getPlural.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/getSelect.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/index.d.ts +0 -7
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/interpreter/interpolableNode.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/intlayer/dist/types/index.d.ts +0 -6
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/index.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/nesting/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/@intlayer/core/dist/types/transpiler/nesting/nesting.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/dictionaryManipulator/plainDynamicLoader.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/dictionaryManipulator/qualifiedDynamicLoader.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/formatters/compact.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/formatters/currency.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/formatters/date.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/formatters/index.d.ts +0 -9
- package/dist/types/@intlayer/core/dist/types/formatters/list.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/formatters/number.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/formatters/percentage.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/formatters/relativeTime.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/formatters/units.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/interpreter/dictionaryTransformCache.d.ts +0 -4
- package/dist/types/@intlayer/core/dist/types/interpreter/getCondition.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/interpreter/getContent/deepTransform.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/interpreter/getContent/getContent.d.ts +0 -3
- package/dist/types/@intlayer/core/dist/types/interpreter/getContent/index.d.ts +0 -3
- package/dist/types/@intlayer/core/dist/types/interpreter/getContent/plugins.d.ts +0 -7
- package/dist/types/@intlayer/core/dist/types/interpreter/getDictionary.d.ts +0 -4
- package/dist/types/@intlayer/core/dist/types/interpreter/getDictionaryAsync.d.ts +0 -6
- package/dist/types/@intlayer/core/dist/types/interpreter/getEnumeration.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/interpreter/getGender.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/interpreter/getInsertion.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/interpreter/getIntlayer.d.ts +0 -4
- package/dist/types/@intlayer/core/dist/types/interpreter/getIntlayerAsync.d.ts +0 -4
- package/dist/types/@intlayer/core/dist/types/interpreter/getNesting.d.ts +0 -6
- package/dist/types/@intlayer/core/dist/types/interpreter/getPlural.d.ts +0 -3
- package/dist/types/@intlayer/core/dist/types/interpreter/getSelect.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/interpreter/getTranslation.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/interpreter/index.d.ts +0 -18
- package/dist/types/@intlayer/core/dist/types/interpreter/interpolableNode.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/intlayer/dist/types/index.d.ts +0 -6
- package/dist/types/@intlayer/core/dist/types/localization/comparePaths.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/localization/domainUtils.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/generateSitemap.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/getBrowserLocale.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/localization/getCanonicalPath.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/getHTMLTextDir.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/localization/getLocale.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/localization/getLocaleFromPath.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/getLocaleLang.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/localization/getLocaleName.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/localization/getLocalizedPath.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/getLocalizedUrl.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/getMultilingualUrls.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/getPathWithoutLocale.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/localization/getPrefix.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/index.d.ts +0 -22
- package/dist/types/@intlayer/core/dist/types/localization/localeDetector.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/localeMapper.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/localization/localeResolver.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/localization/resolveBrowserLocale.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/rewriteMatch.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/localization/rewriteUtils.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/localization/validatePrefix.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/markdown/index.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/transpiler/condition/condition.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/condition/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/enumeration/enumeration.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/enumeration/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/file/file.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/file/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/gender/gender.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/gender/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/html/html.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/html/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/index.d.ts +0 -22
- package/dist/types/@intlayer/core/dist/types/transpiler/insertion/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/insertion/insertion.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/markdown/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/markdown/markdown.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/nesting/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/nesting/nesting.d.ts +0 -4
- package/dist/types/@intlayer/core/dist/types/transpiler/plural/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/plural/plural.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/select/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/select/select.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/translation/index.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/transpiler/translation/translation.d.ts +0 -2
- package/dist/types/@intlayer/core/dist/types/utils/index.d.ts +0 -3
- package/dist/types/@intlayer/core/dist/types/utils/intl.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/utils/isSameKeyPath.d.ts +0 -1
- package/dist/types/@intlayer/core/dist/types/utils/localeStorage.d.ts +0 -2
- package/dist/types/intlayer/dist/types/index.d.ts +0 -14
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* - `'disabled'` — the option was explicitly set to `false`. The proxy is not
|
|
14
14
|
* registered at all (Vite) or becomes a pass-through (Next.js).
|
|
15
15
|
*/
|
|
16
|
-
type ProxyMode = 'auto' | 'forced' | 'disabled';
|
|
16
|
+
export type ProxyMode = 'auto' | 'forced' | 'disabled';
|
|
17
17
|
/**
|
|
18
18
|
* Resolves the effective {@link ProxyMode} from the `routing.enableProxy`
|
|
19
19
|
* configuration value.
|
|
@@ -34,7 +34,7 @@ type ProxyMode = 'auto' | 'forced' | 'disabled';
|
|
|
34
34
|
* resolveProxyMode(false); // 'disabled'
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
declare const resolveProxyMode: (enableProxy?: boolean) => ProxyMode;
|
|
37
|
+
export declare const resolveProxyMode: (enableProxy?: boolean) => ProxyMode;
|
|
38
38
|
/**
|
|
39
39
|
* Indicates whether the proxy may use the locale held in storage (cookie or
|
|
40
40
|
* header) as a source when deciding which locale a request resolves to.
|
|
@@ -59,7 +59,7 @@ declare const resolveProxyMode: (enableProxy?: boolean) => ProxyMode;
|
|
|
59
59
|
* isProxyStorageLocaleEnabled('forced', true); // true — explicitly opted in
|
|
60
60
|
* ```
|
|
61
61
|
*/
|
|
62
|
-
declare const isProxyStorageLocaleEnabled: (proxyMode: ProxyMode, isDevServer: boolean) => boolean;
|
|
62
|
+
export declare const isProxyStorageLocaleEnabled: (proxyMode: ProxyMode, isDevServer: boolean) => boolean;
|
|
63
63
|
/**
|
|
64
64
|
* Builds the line announcing that a server has mounted the locale-routing
|
|
65
65
|
* proxy.
|
|
@@ -86,7 +86,6 @@ declare const isProxyStorageLocaleEnabled: (proxyMode: ProxyMode, isDevServer: b
|
|
|
86
86
|
* // Intlayer proxy enabled
|
|
87
87
|
* ```
|
|
88
88
|
*/
|
|
89
|
-
declare const formatProxyEnabledMessage: (isStorageLocaleSuppressed: boolean) => string;
|
|
89
|
+
export declare const formatProxyEnabledMessage: (isStorageLocaleSuppressed: boolean) => string;
|
|
90
90
|
//#endregion
|
|
91
|
-
export { ProxyMode, formatProxyEnabledMessage, isProxyStorageLocaleEnabled, resolveProxyMode };
|
|
92
91
|
//# sourceMappingURL=proxyMode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxyMode.d.ts","names":[],"sources":["../../../src/localization/proxyMode.ts"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"proxyMode.d.ts","names":[],"sources":["../../../src/localization/proxyMode.ts"],"mappings":";;;;;;;;;;;;;;;YAiBY;;;;;;;;;;;;;;;;;;;;;qBAsBC,mBAAgB,0BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;qBAkC5C,8BAA2B,WAC3B,WAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA8BT,4BAAyB"}
|
|
@@ -15,7 +15,7 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
|
15
15
|
* @param options - Routing overrides, defaulting to the built configuration.
|
|
16
16
|
* @returns The resolved locale, falling back to the default locale off-browser.
|
|
17
17
|
*/
|
|
18
|
-
declare const resolveBrowserLocale: (options?: RoutingOptions) => LocalesValues;
|
|
18
|
+
export declare const resolveBrowserLocale: (options?: RoutingOptions) => LocalesValues;
|
|
19
19
|
/**
|
|
20
20
|
* {@link resolveBrowserLocale}, memoized for the current URL.
|
|
21
21
|
*
|
|
@@ -29,7 +29,6 @@ declare const resolveBrowserLocale: (options?: RoutingOptions) => LocalesValues;
|
|
|
29
29
|
* chunks with that locale, instead of preloading the old one and silently
|
|
30
30
|
* falling back to an asynchronous read.
|
|
31
31
|
*/
|
|
32
|
-
declare const getPreloadLocale: () => LocalesValues;
|
|
32
|
+
export declare const getPreloadLocale: () => LocalesValues;
|
|
33
33
|
//#endregion
|
|
34
|
-
export { getPreloadLocale, resolveBrowserLocale };
|
|
35
34
|
//# sourceMappingURL=resolveBrowserLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBrowserLocale.d.ts","names":[],"sources":["../../../src/localization/resolveBrowserLocale.ts"],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"resolveBrowserLocale.d.ts","names":[],"sources":["../../../src/localization/resolveBrowserLocale.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAoBa,uBAAoB,UACrB,mBACT;;;;;;;;;;;;;;qBAqDU,wBAAuB"}
|
|
@@ -6,15 +6,14 @@ import { RewriteObject, RewriteRules, RoutingConfig } from "@intlayer/types/conf
|
|
|
6
6
|
* Idempotent: already-normalized rules are handed back untouched, so a caller
|
|
7
7
|
* holding resolved rules can pass them on without re-normalizing.
|
|
8
8
|
*/
|
|
9
|
-
declare const getRewriteRules: <const Context extends keyof RewriteObject = 'url'>(rewrite: RoutingConfig['rewrite'] | RewriteRules, context?: Context) => RewriteRules | undefined;
|
|
9
|
+
export declare const getRewriteRules: <const Context extends keyof RewriteObject = 'url'>(rewrite: RoutingConfig['rewrite'] | RewriteRules, context?: Context) => RewriteRules | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* Replaces route parameters in a path with provided values.
|
|
12
12
|
*/
|
|
13
|
-
declare const fillPath: (pattern: string, params: string[]) => string;
|
|
13
|
+
export declare const fillPath: (pattern: string, params: string[]) => string;
|
|
14
14
|
/**
|
|
15
15
|
* Extract values from a URL based on a pattern.
|
|
16
16
|
*/
|
|
17
|
-
declare const extractParams: (url: string, pattern: string) => string[] | null;
|
|
17
|
+
export declare const extractParams: (url: string, pattern: string) => string[] | null;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { extractParams, fillPath, getRewriteRules };
|
|
20
19
|
//# sourceMappingURL=rewriteMatch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewriteMatch.d.ts","names":[],"sources":["../../../src/localization/rewriteMatch.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"rewriteMatch.d.ts","names":[],"sources":["../../../src/localization/rewriteMatch.ts"],"mappings":";;;;;;;;qBAYa,wBACL,sBAAsB,uBAAqB,SAExC,2BAA2B,cAAY,UACvC,YACR;;;;qBA+DU,WAAQ,iBAAmB;;;;qBAa3B,gBAAa,aACb"}
|
|
@@ -8,7 +8,7 @@ import { RewriteRules, RoutingConfig } from "@intlayer/types/config";
|
|
|
8
8
|
* input that was passed in, so a literal input keeps its literal type. Only a
|
|
9
9
|
* rewritten path is computed at runtime and therefore widens to `string`.
|
|
10
10
|
*/
|
|
11
|
-
type LocalizedPathResult<CanonicalPath extends string = string> = {
|
|
11
|
+
export type LocalizedPathResult<CanonicalPath extends string = string> = {
|
|
12
12
|
path: CanonicalPath;
|
|
13
13
|
isRewritten: false;
|
|
14
14
|
} | {
|
|
@@ -31,7 +31,7 @@ type WithLeadingSlash<Path extends string> = Path extends `/${string}` ? Path :
|
|
|
31
31
|
* type B = InternalPath<'/', 'fr'>; // '/fr'
|
|
32
32
|
* type C = InternalPath<'/fr/about', 'fr'>; // '/fr/about' (already prefixed)
|
|
33
33
|
*/
|
|
34
|
-
type InternalPath<Path extends string, Locale extends string> = string extends Path ? string : WithLeadingSlash<Path> extends (infer Prefixed extends string) ? Prefixed extends `/${Locale}` | `/${Locale}/${string}` ? Prefixed : Prefixed extends '/' ? `/${Locale}` : `/${Locale}${Prefixed}` : never;
|
|
34
|
+
export type InternalPath<Path extends string, Locale extends string> = string extends Path ? string : WithLeadingSlash<Path> extends (infer Prefixed extends string) ? Prefixed extends `/${Locale}` | `/${Locale}/${string}` ? Prefixed : Prefixed extends '/' ? `/${Locale}` : `/${Locale}${Prefixed}` : never;
|
|
35
35
|
/**
|
|
36
36
|
* Given a canonical path (e.g., "/products/123"), finds the localized URL pattern
|
|
37
37
|
* (e.g., "/produits/123") and reports whether a rule actually matched.
|
|
@@ -46,16 +46,15 @@ type InternalPath<Path extends string, Locale extends string> = string extends P
|
|
|
46
46
|
* @param rewriteRules - Normalized rules, as returned by {@link getRewriteRules}.
|
|
47
47
|
* @returns The localized path, discriminated on whether a rewrite rule matched.
|
|
48
48
|
*/
|
|
49
|
-
declare const resolveLocalizedPath: <const CanonicalPath extends string, const Locale extends LocalesValues = ResolvedDefaultLocale>(canonicalPath: CanonicalPath, locale?: Locale, rewriteRules?: RewriteRules) => LocalizedPathResult<CanonicalPath>;
|
|
49
|
+
export declare const resolveLocalizedPath: <const CanonicalPath extends string, const Locale extends LocalesValues = ResolvedDefaultLocale>(canonicalPath: CanonicalPath, locale?: Locale, rewriteRules?: RewriteRules) => LocalizedPathResult<CanonicalPath>;
|
|
50
50
|
/**
|
|
51
51
|
* Returns the internal path for a given canonical path and locale.
|
|
52
52
|
* Ensures the locale prefix is present exactly once.
|
|
53
53
|
*/
|
|
54
|
-
declare const getInternalPath: <const Path extends string, const Locale extends LocalesValues>(canonicalPath: Path, locale: Locale) => InternalPath<Path, Locale>;
|
|
54
|
+
export declare const getInternalPath: <const Path extends string, const Locale extends LocalesValues>(canonicalPath: Path, locale: Locale) => InternalPath<Path, Locale>;
|
|
55
55
|
/**
|
|
56
56
|
* Given a current pathname and locale, returns the pretty localized path if a rewrite rule exists and the path is not already localized.
|
|
57
57
|
*/
|
|
58
|
-
declare const getRewritePath: <const Path extends string, const Locale extends LocalesValues = ResolvedDefaultLocale>(pathname: Path, locale: Locale, rewrite?: RoutingConfig['rewrite']) => string | undefined;
|
|
58
|
+
export declare const getRewritePath: <const Path extends string, const Locale extends LocalesValues = ResolvedDefaultLocale>(pathname: Path, locale: Locale, rewrite?: RoutingConfig['rewrite']) => string | undefined;
|
|
59
59
|
//#endregion
|
|
60
|
-
export { InternalPath, LocalizedPathResult, getInternalPath, getRewritePath, resolveLocalizedPath };
|
|
61
60
|
//# sourceMappingURL=rewriteUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewriteUtils.d.ts","names":[],"sources":["../../../src/localization/rewriteUtils.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"rewriteUtils.d.ts","names":[],"sources":["../../../src/localization/rewriteUtils.ts"],"mappings":";;;;;;;;;;YAgBY,oBAAoB;EAC1B,MAAM;EAAe;;EACrB;EAAc;;;KAGf,iBAAiB,uBAAuB,4BACzC,WACI;;;;;;;;;;;;;;;YAgBI,aACV,qBACA,wCACiB,gBAEf,iBAAiB,qBAAoB,2BACnC,qBAAqB,eAAe,qBAClC,WACA,2BACM,eACA,SAAS;;;;;;;;;;;;;;;qBAiBV,6BACL,oCACA,eAAe,gBAAgB,uBAAqB,eAE3C,eAAa,SACnB,QAAM,eACA,iBACd,oBAAoB;;;;;qBAkCV,wBACL,2BACA,eAAe,eAAa,eAEnB,MAAI,QACX,WACP,aAAa,MAAM;;;;qBAoBT,uBACL,2BACA,eAAe,gBAAgB,uBAAqB,UAEhD,MAAI,QACN,QAAM,UACJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RoutingOptions } from "./getPrefix.js";
|
|
2
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
3
|
//#region src/localization/validatePrefix.d.ts
|
|
4
|
-
type ValidatePrefixResult = {
|
|
4
|
+
export type ValidatePrefixResult = {
|
|
5
5
|
isValid: boolean;
|
|
6
6
|
localePrefix: string | undefined;
|
|
7
7
|
};
|
|
@@ -27,7 +27,6 @@ type ValidatePrefixResult = {
|
|
|
27
27
|
* mode: 'prefix-all',
|
|
28
28
|
* });
|
|
29
29
|
*/
|
|
30
|
-
declare const validatePrefix: (locale: LocalesValues | undefined | null, options?: RoutingOptions) => ValidatePrefixResult;
|
|
30
|
+
export declare const validatePrefix: (locale: LocalesValues | undefined | null, options?: RoutingOptions) => ValidatePrefixResult;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { ValidatePrefixResult, validatePrefix };
|
|
33
32
|
//# sourceMappingURL=validatePrefix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validatePrefix.d.ts","names":[],"sources":["../../../src/localization/validatePrefix.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"validatePrefix.d.ts","names":[],"sources":["../../../src/localization/validatePrefix.ts"],"mappings":";;;YAyBY;EACV;EACA;;;;;;;;;;;;;;;;;;;;;;;;qBAyBW,iBAAc,QACjB,kCAAgC,UAC9B,mBACT"}
|
|
@@ -1,15 +1,58 @@
|
|
|
1
1
|
import { CompileOptions, MarkdownContext, MarkdownOptions, MarkdownRuntime } from "./types.js";
|
|
2
|
+
import { parserFor } from "./parser.js";
|
|
3
|
+
import { renderFor } from "./renderer.js";
|
|
2
4
|
//#region src/markdown/compiler.d.ts
|
|
5
|
+
type CreateElementFunction = (tag: any, props: Record<string, any> | null, ...children: any[]) => unknown;
|
|
3
6
|
type FootnoteDef = {
|
|
4
7
|
footnote: string;
|
|
5
8
|
identifier: string;
|
|
6
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Footnote and reference tables belonging to the document currently being
|
|
12
|
+
* parsed or rendered. Rules reach them through a ref so a rule set can outlive
|
|
13
|
+
* a single document and be reused.
|
|
14
|
+
*/
|
|
15
|
+
type DocumentScope = {
|
|
16
|
+
footnotes: FootnoteDef[];
|
|
17
|
+
references: MarkdownReferences;
|
|
18
|
+
};
|
|
19
|
+
type DocumentScopeRef = {
|
|
20
|
+
current: DocumentScope;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* A cached rule set, together with the values it was built from. The signature
|
|
24
|
+
* holds every input that changes the shape of the rules; anything else (the
|
|
25
|
+
* markdown itself, the document scope) is free to vary between uses.
|
|
26
|
+
*/
|
|
27
|
+
type DocumentParser = ReturnType<typeof parserFor>;
|
|
28
|
+
type DocumentEmitter = ReturnType<typeof renderFor>;
|
|
29
|
+
type RuleSetCacheEntry = {
|
|
30
|
+
/** The inputs this set was built from, compared field by field on lookup. */
|
|
31
|
+
ctx: MarkdownContext<any>;
|
|
32
|
+
options: MarkdownOptions;
|
|
33
|
+
parseOnly: boolean;
|
|
34
|
+
createElement: CreateElementFunction;
|
|
35
|
+
scope: DocumentScopeRef;
|
|
36
|
+
/**
|
|
37
|
+
* Built with the rules, not per call. `parserFor` resolves precedence and
|
|
38
|
+
* fills the first-character dispatch tables, and `renderFor` walks the rule
|
|
39
|
+
* set — repeating either for every string was most of what compiling a
|
|
40
|
+
* dictionary of short strings cost.
|
|
41
|
+
*/
|
|
42
|
+
parse: DocumentParser;
|
|
43
|
+
emit: DocumentEmitter;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Returns the rule set for these options, building it only when no cached set
|
|
47
|
+
* was made from the same inputs.
|
|
48
|
+
*/
|
|
49
|
+
export declare const getRuleSet: (ctx: MarkdownContext<any>, options: MarkdownOptions, parseOnly: boolean) => RuleSetCacheEntry;
|
|
7
50
|
/** Link/image reference definitions (`[id]: target "title"`) collected while parsing. */
|
|
8
|
-
type MarkdownReferences = Record<string, {
|
|
51
|
+
export type MarkdownReferences = Record<string, {
|
|
9
52
|
target: string;
|
|
10
53
|
title?: string;
|
|
11
54
|
}>;
|
|
12
|
-
type ParsedMarkdown = {
|
|
55
|
+
export type ParsedMarkdown = {
|
|
13
56
|
ast: any[];
|
|
14
57
|
footnotes: FootnoteDef[];
|
|
15
58
|
/**
|
|
@@ -20,11 +63,10 @@ type ParsedMarkdown = {
|
|
|
20
63
|
references: MarkdownReferences;
|
|
21
64
|
inline: boolean;
|
|
22
65
|
};
|
|
23
|
-
declare const parseMarkdown: (markdown: string, ctx: MarkdownContext<any>, options?: MarkdownOptions) => ParsedMarkdown;
|
|
24
|
-
declare const renderMarkdownAst: (parsed: ParsedMarkdown, ctx: MarkdownContext<any>, options?: MarkdownOptions) => unknown;
|
|
25
|
-
declare const compile: (markdown: string, ctx: MarkdownContext<any>, options?: MarkdownOptions) => unknown;
|
|
26
|
-
declare const createCompiler: (ctx: MarkdownContext<any>) => (markdown: string, options?: MarkdownOptions) => unknown;
|
|
27
|
-
declare const compileWithOptions: (markdown: string, runtime: MarkdownRuntime, options?: CompileOptions<any>) => unknown;
|
|
66
|
+
export declare const parseMarkdown: (markdown: string, ctx: MarkdownContext<any>, options?: MarkdownOptions) => ParsedMarkdown;
|
|
67
|
+
export declare const renderMarkdownAst: (parsed: ParsedMarkdown, ctx: MarkdownContext<any>, options?: MarkdownOptions) => unknown;
|
|
68
|
+
export declare const compile: (markdown: string, ctx: MarkdownContext<any>, options?: MarkdownOptions) => unknown;
|
|
69
|
+
export declare const createCompiler: (ctx: MarkdownContext<any>) => (markdown: string, options?: MarkdownOptions) => unknown;
|
|
70
|
+
export declare const compileWithOptions: (markdown: string, runtime: MarkdownRuntime, options?: CompileOptions<any>) => unknown;
|
|
28
71
|
//#endregion
|
|
29
|
-
export { MarkdownReferences, ParsedMarkdown, compile, compileWithOptions, createCompiler, parseMarkdown, renderMarkdownAst };
|
|
30
72
|
//# sourceMappingURL=compiler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.d.ts","names":[],"sources":["../../../src/markdown/compiler.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","names":[],"sources":["../../../src/markdown/compiler.ts"],"mappings":";;;;KAgHK,yBACH,UACA,OAAO,+BACJ;KAGA;EAAgB;EAAkB;;;;;;;KA2KlC;EACH,WAAW;EACX,YAAY;;KAGT;EAAqB,SAAS;;;;;;;KAY9B,iBAAiB,kBAAkB;KACnC,kBAAkB,kBAAkB;KAEpC;;EAEH,KAAK;EACL,SAAS;EACT;EACA,eAAe;EACf,OAAO;;;;;;;EAOP,OAAO;EACP,MAAM;;;;;;qBAsCK,aAAU,KAChB,sBAAoB,SAChB,iBAAe,uBAEvB;;YA2/BS,qBAAqB;EAE7B;EAAgB;;YAGR;EACV;EACA,WAAW;;;;;;EAMX,YAAY;EACZ;;qBAsSW,gBAAa,kBACR,KACX,sBAAoB,UAChB,oBACR;qBAiBU,oBAAiB,QACpB,gBAAc,KACjB,sBAAoB,UAChB;qBAaE,UAAO,kBACF,KACX,sBAAoB,UAChB;qBA8BE,iBAAc,KACnB,0BAAoB,kBACT,UAAY;qBAGlB,qBAAkB,kBACb,SACP,iBAAe,UACf"}
|
|
@@ -3,7 +3,7 @@
|
|
|
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.
|
|
5
5
|
*/
|
|
6
|
-
declare const RuleType: {
|
|
6
|
+
export declare const RuleType: {
|
|
7
7
|
readonly blockQuote: '0';
|
|
8
8
|
readonly breakLine: '1';
|
|
9
9
|
readonly breakThematic: '2';
|
|
@@ -44,11 +44,11 @@ declare const RuleType: {
|
|
|
44
44
|
readonly textStrikethroughed: '32';
|
|
45
45
|
readonly unorderedList: '33';
|
|
46
46
|
};
|
|
47
|
-
type RuleTypeValue = (typeof RuleType)[keyof typeof RuleType];
|
|
47
|
+
export type RuleTypeValue = (typeof RuleType)[keyof typeof RuleType];
|
|
48
48
|
/**
|
|
49
49
|
* Priority levels for rule ordering.
|
|
50
50
|
*/
|
|
51
|
-
declare const Priority: {
|
|
51
|
+
export declare const Priority: {
|
|
52
52
|
/** anything that must scan the tree before everything else */
|
|
53
53
|
readonly MAX: 0;
|
|
54
54
|
/** scans for block-level constructs */
|
|
@@ -60,136 +60,144 @@ declare const Priority: {
|
|
|
60
60
|
/** bare text and stuff that is considered leftovers */
|
|
61
61
|
readonly MIN: 4;
|
|
62
62
|
};
|
|
63
|
-
type PriorityValue = (typeof Priority)[keyof typeof Priority];
|
|
63
|
+
export type PriorityValue = (typeof Priority)[keyof typeof Priority];
|
|
64
|
+
/**
|
|
65
|
+
* Parsing scope for markdown rules.
|
|
66
|
+
* Bitmask representation for fast bitwise checking and bundle minification.
|
|
67
|
+
* - BLOCK (1): evaluated only when !state.inline && !state.simple
|
|
68
|
+
* - INLINE (2): evaluated only when state.inline || state.simple
|
|
69
|
+
* - BOTH (3): evaluated in both scopes (default)
|
|
70
|
+
*/
|
|
71
|
+
export declare const RuleScope: {
|
|
72
|
+
readonly BLOCK: 1;
|
|
73
|
+
readonly INLINE: 2;
|
|
74
|
+
readonly BOTH: 3;
|
|
75
|
+
};
|
|
76
|
+
export declare const SCOPE_BLOCK: 1;
|
|
77
|
+
export declare const SCOPE_INLINE: 2;
|
|
78
|
+
export declare const SCOPE_BOTH: 3;
|
|
79
|
+
export type RuleScopeValue = (typeof RuleScope)[keyof typeof RuleScope] | 'block' | 'inline' | 'both';
|
|
64
80
|
/**
|
|
65
81
|
* Map of HTML attributes to their JSX prop equivalents.
|
|
66
82
|
* Some renderers use camelCase for certain attributes.
|
|
67
83
|
*/
|
|
68
|
-
declare const ATTRIBUTE_TO_NODE_PROP_MAP: Record<string, string>;
|
|
84
|
+
export declare const ATTRIBUTE_TO_NODE_PROP_MAP: Record<string, string>;
|
|
69
85
|
/**
|
|
70
86
|
* Default HTML entity to unicode mappings.
|
|
71
87
|
*/
|
|
72
|
-
declare const NAMED_CODES_TO_UNICODE: Record<string, string>;
|
|
88
|
+
export declare const NAMED_CODES_TO_UNICODE: Record<string, string>;
|
|
73
89
|
/** HTML elements that should not have their content processed */
|
|
74
|
-
declare const DO_NOT_PROCESS_HTML_ELEMENTS: string[];
|
|
90
|
+
export declare const DO_NOT_PROCESS_HTML_ELEMENTS: string[];
|
|
75
91
|
/** Attributes that require URL sanitization */
|
|
76
|
-
declare const ATTRIBUTES_TO_SANITIZE: string[];
|
|
92
|
+
export declare const ATTRIBUTES_TO_SANITIZE: string[];
|
|
77
93
|
/** Attribute extractor regex */
|
|
78
|
-
declare const ATTR_EXTRACTOR_R: RegExp;
|
|
94
|
+
export declare const ATTR_EXTRACTOR_R: RegExp;
|
|
79
95
|
/** Block end detection */
|
|
80
|
-
declare const BLOCK_END_R: RegExp;
|
|
96
|
+
export declare const BLOCK_END_R: RegExp;
|
|
81
97
|
/** Blockquote patterns */
|
|
82
|
-
declare const BLOCKQUOTE_R: RegExp;
|
|
83
|
-
declare const BLOCKQUOTE_TRIM_LEFT_MULTILINE_R: RegExp;
|
|
84
|
-
declare const BLOCKQUOTE_ALERT_R: RegExp;
|
|
98
|
+
export declare const BLOCKQUOTE_R: RegExp;
|
|
99
|
+
export declare const BLOCKQUOTE_TRIM_LEFT_MULTILINE_R: RegExp;
|
|
100
|
+
export declare const BLOCKQUOTE_ALERT_R: RegExp;
|
|
85
101
|
/** Line break patterns */
|
|
86
|
-
declare const BREAK_LINE_R: RegExp;
|
|
87
|
-
declare const BREAK_THEMATIC_R: RegExp;
|
|
102
|
+
export declare const BREAK_LINE_R: RegExp;
|
|
103
|
+
export declare const BREAK_THEMATIC_R: RegExp;
|
|
88
104
|
/** Code block patterns */
|
|
89
|
-
declare const CODE_BLOCK_FENCED_R: RegExp;
|
|
90
|
-
declare const CODE_BLOCK_R: RegExp;
|
|
105
|
+
export declare const CODE_BLOCK_FENCED_R: RegExp;
|
|
106
|
+
export declare const CODE_BLOCK_R: RegExp;
|
|
91
107
|
/** A single line opening or closing a fenced code block, with its indentation. */
|
|
92
|
-
declare const FENCE_DELIMITER_R: RegExp;
|
|
93
|
-
declare const CODE_INLINE_R: RegExp;
|
|
108
|
+
export declare const FENCE_DELIMITER_R: RegExp;
|
|
109
|
+
export declare const CODE_INLINE_R: RegExp;
|
|
94
110
|
/** Newline patterns */
|
|
95
|
-
declare const CONSECUTIVE_NEWLINE_R: RegExp;
|
|
96
|
-
declare const CR_NEWLINE_R: RegExp;
|
|
111
|
+
export declare const CONSECUTIVE_NEWLINE_R: RegExp;
|
|
112
|
+
export declare const CR_NEWLINE_R: RegExp;
|
|
97
113
|
/** Footnote patterns */
|
|
98
|
-
declare const FOOTNOTE_R: RegExp;
|
|
99
|
-
declare const FOOTNOTE_REFERENCE_R: RegExp;
|
|
114
|
+
export declare const FOOTNOTE_R: RegExp;
|
|
115
|
+
export declare const FOOTNOTE_REFERENCE_R: RegExp;
|
|
100
116
|
/** Form feed */
|
|
101
|
-
declare const FORMFEED_R: RegExp;
|
|
117
|
+
export declare const FORMFEED_R: RegExp;
|
|
102
118
|
/** Front matter */
|
|
103
|
-
declare const FRONT_MATTER_R: RegExp;
|
|
119
|
+
export declare const FRONT_MATTER_R: RegExp;
|
|
104
120
|
/** GFM task */
|
|
105
|
-
declare const GFM_TASK_R: RegExp;
|
|
121
|
+
export declare const GFM_TASK_R: RegExp;
|
|
106
122
|
/** Heading patterns */
|
|
107
|
-
declare const HEADING_R: RegExp;
|
|
108
|
-
declare const HEADING_ATX_COMPLIANT_R: RegExp;
|
|
109
|
-
declare const HEADING_SETEXT_R: RegExp;
|
|
110
|
-
|
|
111
|
-
declare const HTML_CHAR_CODE_R: RegExp;
|
|
112
|
-
declare const HTML_COMMENT_R: RegExp;
|
|
113
|
-
declare const HTML_CUSTOM_ATTR_R: RegExp;
|
|
114
|
-
declare const HTML_SELF_CLOSING_ELEMENT_R: RegExp;
|
|
115
|
-
/** Custom component pattern */
|
|
116
|
-
declare const CUSTOM_COMPONENT_R: RegExp;
|
|
123
|
+
export declare const HEADING_R: RegExp;
|
|
124
|
+
export declare const HEADING_ATX_COMPLIANT_R: RegExp;
|
|
125
|
+
export declare const HEADING_SETEXT_R: RegExp;
|
|
126
|
+
/** HTML patterns */
|
|
127
|
+
export declare const HTML_CHAR_CODE_R: RegExp;
|
|
128
|
+
export declare const HTML_COMMENT_R: RegExp;
|
|
129
|
+
export declare const HTML_CUSTOM_ATTR_R: RegExp;
|
|
117
130
|
/** Interpolation */
|
|
118
|
-
declare const INTERPOLATION_R: RegExp;
|
|
131
|
+
export declare const INTERPOLATION_R: RegExp;
|
|
119
132
|
/** Link patterns */
|
|
120
|
-
declare const LINK_AUTOLINK_BARE_URL_R: RegExp;
|
|
121
|
-
declare const LINK_AUTOLINK_R: RegExp;
|
|
122
|
-
declare const CAPTURE_LETTER_AFTER_HYPHEN: RegExp;
|
|
123
|
-
/** Table patterns */
|
|
124
|
-
declare const NP_TABLE_R: RegExp;
|
|
125
|
-
declare const TABLE_TRIM_PIPES: RegExp;
|
|
126
|
-
declare const TABLE_CENTER_ALIGN: RegExp;
|
|
127
|
-
declare const TABLE_LEFT_ALIGN: RegExp;
|
|
128
|
-
declare const TABLE_RIGHT_ALIGN: RegExp;
|
|
129
|
-
/** Paragraph */
|
|
130
|
-
declare const PARAGRAPH_R: RegExp;
|
|
131
|
-
/** Reference patterns */
|
|
132
|
-
declare const REFERENCE_IMAGE_OR_LINK: RegExp;
|
|
133
|
-
declare const REFERENCE_IMAGE_R: RegExp;
|
|
134
|
-
declare const REFERENCE_LINK_R: RegExp;
|
|
133
|
+
export declare const LINK_AUTOLINK_BARE_URL_R: RegExp;
|
|
134
|
+
export declare const LINK_AUTOLINK_R: RegExp;
|
|
135
|
+
export declare const CAPTURE_LETTER_AFTER_HYPHEN: RegExp;
|
|
135
136
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
137
|
+
* Table patterns.
|
|
138
|
+
*
|
|
139
|
+
* The row scans spell "any character but a newline" as `[^\n]` rather than `.`:
|
|
140
|
+
* `.` is a four-range exclusion, and matching it over rows this wide costs a
|
|
141
|
+
* third more than the single-range class. It is also the more faithful reading
|
|
142
|
+
* — only `\n` ends a line here, and `\r` is normalized away before parsing.
|
|
139
143
|
*/
|
|
140
|
-
declare const
|
|
141
|
-
declare const
|
|
142
|
-
declare const
|
|
144
|
+
export declare const NP_TABLE_R: RegExp;
|
|
145
|
+
export declare const TABLE_TRIM_PIPES: RegExp;
|
|
146
|
+
export declare const TABLE_CENTER_ALIGN: RegExp;
|
|
147
|
+
export declare const TABLE_LEFT_ALIGN: RegExp;
|
|
148
|
+
export declare const TABLE_RIGHT_ALIGN: RegExp;
|
|
149
|
+
/** Paragraph */
|
|
150
|
+
export declare const PARAGRAPH_R: RegExp;
|
|
151
|
+
/** Reference patterns */
|
|
152
|
+
export declare const REFERENCE_IMAGE_OR_LINK: RegExp;
|
|
153
|
+
export declare const REFERENCE_IMAGE_R: RegExp;
|
|
154
|
+
export declare const REFERENCE_LINK_R: RegExp;
|
|
143
155
|
/** Block detection */
|
|
144
|
-
declare const SHOULD_RENDER_AS_BLOCK_R: RegExp;
|
|
145
|
-
/**
|
|
146
|
-
declare const TAB_R: RegExp;
|
|
147
|
-
|
|
148
|
-
declare const
|
|
149
|
-
declare const TRIM_STARTING_NEWLINES: RegExp;
|
|
150
|
-
declare const HTML_LEFT_TRIM_AMOUNT_R: RegExp;
|
|
156
|
+
export declare const SHOULD_RENDER_AS_BLOCK_R: RegExp;
|
|
157
|
+
/** Tabs, which `normalizeWhitespace` widens to four spaces. */
|
|
158
|
+
export declare const TAB_R: RegExp;
|
|
159
|
+
export declare const TRIM_STARTING_NEWLINES: RegExp;
|
|
160
|
+
export declare const HTML_LEFT_TRIM_AMOUNT_R: RegExp;
|
|
151
161
|
/** List patterns */
|
|
152
|
-
declare const ORDERED_LIST_BULLET = "(?:\\d+\\.)";
|
|
153
|
-
declare const UNORDERED_LIST_BULLET = "(?:[*+-])";
|
|
162
|
+
export declare const ORDERED_LIST_BULLET = "(?:\\d+\\.)";
|
|
163
|
+
export declare const UNORDERED_LIST_BULLET = "(?:[*+-])";
|
|
154
164
|
/** Text formatting patterns */
|
|
155
|
-
declare const TEXT_ESCAPED_R: RegExp;
|
|
156
|
-
declare const UNESCAPE_R: RegExp;
|
|
157
|
-
declare const TEXT_PLAIN_R: RegExp;
|
|
165
|
+
export declare const TEXT_ESCAPED_R: RegExp;
|
|
166
|
+
export declare const UNESCAPE_R: RegExp;
|
|
158
167
|
/** Shortcode pattern */
|
|
159
|
-
declare const SHORTCODE_R: RegExp;
|
|
160
|
-
type ListType = 1 | 2;
|
|
161
|
-
declare const ORDERED: ListType;
|
|
162
|
-
declare const UNORDERED: ListType;
|
|
168
|
+
export declare const SHORTCODE_R: RegExp;
|
|
169
|
+
export type ListType = 1 | 2;
|
|
170
|
+
export declare const ORDERED: ListType;
|
|
171
|
+
export declare const UNORDERED: ListType;
|
|
163
172
|
/**
|
|
164
173
|
* Ensure there's at least one more instance of the delimiter later
|
|
165
174
|
* in the current sequence.
|
|
166
175
|
*/
|
|
167
|
-
declare const LOOKAHEAD: (double: number) => string;
|
|
176
|
+
export declare const LOOKAHEAD: (double: number) => string;
|
|
168
177
|
/**
|
|
169
178
|
* For inline formatting, this partial attempts to ignore characters that
|
|
170
179
|
* may appear in nested formatting.
|
|
171
180
|
*/
|
|
172
|
-
declare const INLINE_SKIP_R = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\[^\\s]|[\\s\\S])+?)";
|
|
181
|
+
export declare const INLINE_SKIP_R = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\[^\\s]|[\\s\\S])+?)";
|
|
173
182
|
/** Bold text pattern */
|
|
174
|
-
declare const TEXT_BOLD_R: RegExp;
|
|
183
|
+
export declare const TEXT_BOLD_R: RegExp;
|
|
175
184
|
/** Emphasized text pattern */
|
|
176
|
-
declare const TEXT_EMPHASIZED_R: RegExp;
|
|
185
|
+
export declare const TEXT_EMPHASIZED_R: RegExp;
|
|
177
186
|
/** Marked text pattern */
|
|
178
|
-
declare const TEXT_MARKED_R: RegExp;
|
|
187
|
+
export declare const TEXT_MARKED_R: RegExp;
|
|
179
188
|
/** Strikethrough text pattern */
|
|
180
|
-
declare const TEXT_STRIKETHROUGHED_R: RegExp;
|
|
181
|
-
declare const generateListItemPrefix: (type: ListType) => string;
|
|
182
|
-
declare const ORDERED_LIST_ITEM_PREFIX: string;
|
|
183
|
-
declare const UNORDERED_LIST_ITEM_PREFIX: string;
|
|
184
|
-
declare const generateListItemPrefixRegex: (type: ListType) => RegExp;
|
|
185
|
-
declare const ORDERED_LIST_ITEM_PREFIX_R: RegExp;
|
|
186
|
-
declare const UNORDERED_LIST_ITEM_PREFIX_R: RegExp;
|
|
187
|
-
declare const generateListItemRegex: (type: ListType) => RegExp;
|
|
188
|
-
declare const ORDERED_LIST_ITEM_R: RegExp;
|
|
189
|
-
declare const UNORDERED_LIST_ITEM_R: RegExp;
|
|
190
|
-
declare const generateListRegex: (type: ListType) => RegExp;
|
|
191
|
-
declare const ORDERED_LIST_R: RegExp;
|
|
192
|
-
declare const UNORDERED_LIST_R: RegExp;
|
|
189
|
+
export declare const TEXT_STRIKETHROUGHED_R: RegExp;
|
|
190
|
+
export declare const generateListItemPrefix: (type: ListType) => string;
|
|
191
|
+
export declare const ORDERED_LIST_ITEM_PREFIX: string;
|
|
192
|
+
export declare const UNORDERED_LIST_ITEM_PREFIX: string;
|
|
193
|
+
export declare const generateListItemPrefixRegex: (type: ListType) => RegExp;
|
|
194
|
+
export declare const ORDERED_LIST_ITEM_PREFIX_R: RegExp;
|
|
195
|
+
export declare const UNORDERED_LIST_ITEM_PREFIX_R: RegExp;
|
|
196
|
+
export declare const generateListItemRegex: (type: ListType) => RegExp;
|
|
197
|
+
export declare const ORDERED_LIST_ITEM_R: RegExp;
|
|
198
|
+
export declare const UNORDERED_LIST_ITEM_R: RegExp;
|
|
199
|
+
export declare const generateListRegex: (type: ListType) => RegExp;
|
|
200
|
+
export declare const ORDERED_LIST_R: RegExp;
|
|
201
|
+
export declare const UNORDERED_LIST_R: RegExp;
|
|
193
202
|
//#endregion
|
|
194
|
-
export { ATTRIBUTES_TO_SANITIZE, 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, CUSTOM_COMPONENT_OPENING_TAG_R, CUSTOM_COMPONENT_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_BLOCK_ELEMENT_R, HTML_BLOCK_OPENING_TAG_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, HTML_SELF_CLOSING_ELEMENT_R, HTML_SELF_CLOSING_OPENING_TAG_R, INLINE_SKIP_R, INTERPOLATION_R, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LOOKAHEAD, ListType, NAMED_CODES_TO_UNICODE, NORMALIZE_WHITESPACE_R, 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, PriorityValue, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, RuleType, RuleTypeValue, 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_PLAIN_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 };
|
|
195
203
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/markdown/constants.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/markdown/constants.ts"],"mappings":";;;;;qBAQa;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;;WAEA;;WAEA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;YAUU,wBAAwB,uBAAuB;;;;qBAS9C;;WAEX;;WAEA;;WAEA;;WAEA;;WAEA;;YAGU,wBAAwB,uBAAuB;;;;;;;;qBAa9C;WACX;WACA;WACA;;qBAGW;qBACA;qBACA;YAED,yBACA,wBAAwB;;;;;qBAavB,4BAA4B;;;;qBAuD5B,wBAAwB;;qBAcxB;;qBAGA;;qBAcA,kBAAgB;;qBAIhB,aAAW;;qBAGX,cAAY;qBACZ,kCAAgC;qBAChC,oBAAkB;;qBAGlB,cAAY;qBACZ,kBAAgB;;qBAOhB,qBAAmB;qBAEnB,cAAY;;qBAEZ,mBAAiB;qBACjB,eAAa;;qBAGb,uBAAqB;qBACrB,cAAY;;qBAGZ,YAAU;qBACV,sBAAoB;;qBAGpB,YAAU;;qBAGV,gBAAc;;qBAGd,YAAU;;qBAGV,WAAS;qBACT,yBAAuB;qBAEvB,kBAAgB;;qBAIhB,kBAAgB;qBAEhB,gBAAc;qBACd,oBAAkB;;qBAGlB,iBAAe;;qBAGf,0BAAwB;qBACxB,iBAAe;qBACf,6BAA2B;;;;;;;;;qBAU3B,YAAU;qBAEV,kBAAgB;qBAChB,oBAAkB;qBAClB,kBAAgB;qBAChB,mBAAiB;;qBAGjB,aAAW;;qBAGX,yBAAuB;qBAEvB,mBAAiB;qBACjB,kBAAgB;;qBAGhB,0BAAwB;;qBAGxB,OAAK;qBACL,wBAAsB;qBACtB,yBAAuB;;qBAGvB;qBACA;;qBAGA,gBAAc;qBACd,YAAU;;qBAGV,aAAW;YAMZ;qBACC,SAAS;qBACT,WAAW;;;;;qBAUX,YAAS;;;;;qBAOT;;qBAIA,aAAW;;qBAKX,mBAAiB;;qBAKjB,eAAa;;qBAKb,wBAAsB;qBAQtB,yBAAsB,MAAU;qBAQhC;qBACA;qBAEA,8BAA2B,MAAU,aAAW;qBAOhD,4BAA0B;qBAC1B,8BAA4B;qBAG5B,wBAAqB,MAAU,aAAW;qBAc1C,qBAAmB;qBACnB,uBAAqB;qBAErB,oBAAiB,MAAU,aAAW;qBA4BtC,gBAAc;qBACd,kBAAgB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/markdown/elementScanner.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Lean, non-backtracking element scanner for HTML blocks, custom components, and self-closing tags.
|
|
4
|
+
*/
|
|
5
|
+
export declare const matchElement: (source: string, customComponent: boolean) => RegExpMatchArray | null;
|
|
6
|
+
export declare const matchSelfClosingElement: (source: string) => RegExpMatchArray | null;
|
|
7
|
+
export declare const matchHtmlBlockElement: (source: string) => RegExpMatchArray;
|
|
8
|
+
export declare const matchCustomComponent: (source: string) => RegExpMatchArray;
|
|
9
|
+
export declare const startsWithHtmlBlockElement: (source: string) => boolean;
|
|
10
|
+
export declare const startsWithSelfClosingElement: (source: string) => boolean;
|
|
11
|
+
export declare const startsWithCustomComponent: (source: string) => boolean;
|
|
12
|
+
export declare const startsWithElement: (source: string) => boolean;
|
|
13
|
+
//#endregion
|
|
14
|
+
//# sourceMappingURL=elementScanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elementScanner.d.ts","names":[],"sources":["../../../src/markdown/elementScanner.ts"],"mappings":";;;;qBA+Ga,eAAY,gBACT,6BAEb;qBAkHU,0BAAuB,mBAEjC;qBA4DU,wBAAqB,mBAAkB;qBAEvC,uBAAoB,mBAAkB;qBAEtC,6BAA0B;qBAE1B,+BAA4B;qBAE5B,4BAAyB;qBAEzB,oBAAiB"}
|
|
@@ -3,10 +3,10 @@ import { getMarkdownMetadata } from "../transpiler/markdown/getMarkdownMetadata.
|
|
|
3
3
|
import { MarkdownContent, MarkdownContentConstructor, md as markdown } from "../transpiler/markdown/markdown.js";
|
|
4
4
|
import { MarkdownValidationResult, validateMarkdown } from "../transpiler/markdown/validateMarkdown.js";
|
|
5
5
|
import "../transpiler/markdown/index.js";
|
|
6
|
+
import { ATTRIBUTES_TO_SANITIZE, 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, ListType, 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, PriorityValue, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, RuleScope, RuleScopeValue, RuleType, RuleTypeValue, 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.js";
|
|
6
7
|
import { BlockQuoteNode, BoldTextNode, BreakLineNode, BreakThematicNode, CodeBlockNode, CodeFencedNode, CodeInlineNode, CompileOptions, ComponentOverrides, CustomComponentNode, ElementType, EscapedTextNode, FootnoteNode, FootnoteReferenceNode, GFMTaskNode, HTMLCommentNode, HTMLNode, HTMLSelfClosingNode, HTMLTag, HeadingNode, HeadingSetextNode, ImageNode, ItalicTextNode, LinkAngleBraceNode, LinkBareURLNode, LinkNode, MarkdownContext, MarkdownOptions, MarkdownRuntime, MarkedTextNode, NestedParser, NewlineNode, OrderedListNode, ParagraphNode, ParseState, Parser, ParserResult, ReferenceImageNode, ReferenceLinkNode, ReferenceNode, RenderRuleHook, Rule, RuleOutput, Rules, StrikethroughTextNode, TableNode, TableSeparatorNode, TextNode, UnorderedListNode } from "./types.js";
|
|
7
|
-
import { MarkdownReferences, ParsedMarkdown, compile, compileWithOptions, createCompiler, parseMarkdown, renderMarkdownAst } from "./compiler.js";
|
|
8
|
-
import { ATTRIBUTES_TO_SANITIZE, 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, CUSTOM_COMPONENT_OPENING_TAG_R, CUSTOM_COMPONENT_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_BLOCK_ELEMENT_R, HTML_BLOCK_OPENING_TAG_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, HTML_SELF_CLOSING_ELEMENT_R, HTML_SELF_CLOSING_OPENING_TAG_R, INLINE_SKIP_R, INTERPOLATION_R, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LOOKAHEAD, ListType, NAMED_CODES_TO_UNICODE, NORMALIZE_WHITESPACE_R, 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, PriorityValue, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, RuleType, RuleTypeValue, 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_PLAIN_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.js";
|
|
9
8
|
import { parserFor } from "./parser.js";
|
|
10
9
|
import { createRenderer, renderFor } from "./renderer.js";
|
|
11
|
-
import {
|
|
12
|
-
|
|
10
|
+
import { MarkdownReferences, ParsedMarkdown, compile, compileWithOptions, createCompiler, getRuleSet, parseMarkdown, renderMarkdownAst } from "./compiler.js";
|
|
11
|
+
import { BlockSyntaxProbe, 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.js";
|
|
12
|
+
export { ATTRIBUTES_TO_SANITIZE, 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, type BlockQuoteNode, BlockSyntaxProbe, type BoldTextNode, type BreakLineNode, type BreakThematicNode, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, type CodeBlockNode, type CodeFencedNode, type CodeInlineNode, type CompileOptions, type ComponentOverrides, type CustomComponentNode, DO_NOT_PROCESS_HTML_ELEMENTS, type ElementType, type EscapedTextNode, FENCE_DELIMITER_R, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, type FootnoteNode, type FootnoteReferenceNode, type GFMTaskNode, GFM_TASK_R, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, type HTMLCommentNode, type HTMLNode, type HTMLSelfClosingNode, type HTMLTag, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, type HeadingNode, type HeadingSetextNode, INLINE_SKIP_R, INTERPOLATION_R, type ImageNode, type ItalicTextNode, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LOOKAHEAD, type LinkAngleBraceNode, type LinkBareURLNode, type LinkNode, ListType, MarkdownContent, MarkdownContentConstructor, type MarkdownContext, type MarkdownOptions, MarkdownReferences, type MarkdownRuntime, type HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, type MarkedTextNode, NAMED_CODES_TO_UNICODE, NP_TABLE_R, type NestedParser, type NewlineNode, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, type OrderedListNode, PARAGRAPH_R, type ParagraphNode, type ParseState, ParsedMarkdown, type Parser, type ParserResult, Priority, PriorityValue, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, type ReferenceImageNode, type ReferenceLinkNode, type ReferenceNode, type RenderRuleHook, type Rule, type RuleOutput, RuleScope, RuleScopeValue, RuleType, RuleTypeValue, type Rules, SCOPE_BLOCK, SCOPE_BOTH, SCOPE_INLINE, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, type StrikethroughTextNode, 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, type TableNode, type TableSeparatorNode, type TextNode, UNESCAPE_R, UNORDERED, UNORDERED_LIST_BULLET, UNORDERED_LIST_ITEM_PREFIX, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R, type UnorderedListNode, 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 };
|
|
@@ -3,13 +3,7 @@ import { ParseState, ParserResult, Rules } from "./types.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates a parser for a given set of rules, with the precedence
|
|
5
5
|
* specified as a list of rules.
|
|
6
|
-
*
|
|
7
|
-
* @param rules - An object containing rule type -> {match, order, parse} objects
|
|
8
|
-
* (lower order is higher precedence)
|
|
9
|
-
*
|
|
10
|
-
* @returns The resulting parse function
|
|
11
6
|
*/
|
|
12
|
-
declare const parserFor: (rules: Rules) => ((source: string, state: ParseState) => ParserResult[]);
|
|
7
|
+
export declare const parserFor: (rules: Rules) => ((source: string, state: ParseState) => ParserResult[]);
|
|
13
8
|
//#endregion
|
|
14
|
-
export { parserFor };
|
|
15
9
|
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","names":[],"sources":["../../../src/markdown/parser.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"parser.d.ts","names":[],"sources":["../../../src/markdown/parser.ts"],"mappings":";;;;;;qBAoEa,YAAS,OACb,YACJ,gBAAgB,OAAO,eAAe"}
|
|
@@ -7,15 +7,10 @@ import { ParseState, ParserResult, RenderRuleHook, RuleOutput, Rules } from "./t
|
|
|
7
7
|
* @param render - The render function to call for each node
|
|
8
8
|
* @returns A function that renders AST to output
|
|
9
9
|
*/
|
|
10
|
-
declare const renderFor: (render: (ast: ParserResult, render: RuleOutput, state: ParseState) => unknown) => (ast: ParserResult | ParserResult[], state?: ParseState) => any;
|
|
10
|
+
export declare const renderFor: (render: (ast: ParserResult, render: RuleOutput, state: ParseState) => unknown) => (ast: ParserResult | ParserResult[], state?: ParseState) => any;
|
|
11
11
|
/**
|
|
12
12
|
* Creates a renderer from rules with optional custom render hook.
|
|
13
|
-
*
|
|
14
|
-
* @param rules - The rules object containing _render functions
|
|
15
|
-
* @param userRender - Optional custom render hook for full control
|
|
16
|
-
* @returns A render function for AST nodes
|
|
17
13
|
*/
|
|
18
|
-
declare const createRenderer: (rules: Rules, userRender?: RenderRuleHook) => (ast: ParserResult, render: RuleOutput, state: ParseState) => unknown;
|
|
14
|
+
export declare const createRenderer: (rules: Rules, userRender?: RenderRuleHook) => (ast: ParserResult, render: RuleOutput, state: ParseState) => unknown;
|
|
19
15
|
//#endregion
|
|
20
|
-
export { createRenderer, renderFor };
|
|
21
16
|
//# sourceMappingURL=renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","names":[],"sources":["../../../src/markdown/renderer.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","names":[],"sources":["../../../src/markdown/renderer.ts"],"mappings":";;;;;;;;;qBAiBa,YAAS,SACX,KAAK,cAAc,QAAQ,YAAY,OAAO,4BAAsB,KAGtE,eAAe,gBAAc,QAC3B;;;;qBA0CE,iBAAc,OAAW,OAAK,aAAe,oBAAc,KAM7D,cAAY,QACT,YAAU,OACX"}
|