@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
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import { RuleScopeValue } from "./constants.js";
|
|
1
2
|
//#region src/markdown/types.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* Permissive element type - core doesn't care what frameworks accept.
|
|
4
5
|
* Can be a string tag ('div', 'span') or any component (function, object, class)
|
|
5
6
|
*/
|
|
6
|
-
type ElementType = string | any;
|
|
7
|
+
export type ElementType = string | any;
|
|
7
8
|
/**
|
|
8
9
|
* Simple HTML tag type - no need to enumerate all tags
|
|
9
10
|
*/
|
|
10
|
-
type HTMLTag = string;
|
|
11
|
+
export type HTMLTag = string;
|
|
11
12
|
/**
|
|
12
13
|
* Runtime interface that framework adapters must implement.
|
|
13
14
|
* This allows the markdown compiler to work with any framework.
|
|
14
15
|
*/
|
|
15
|
-
type MarkdownRuntime = {
|
|
16
|
+
export type MarkdownRuntime = {
|
|
16
17
|
/**
|
|
17
18
|
* Create an element. Signature matches common UI runtimes.
|
|
18
19
|
* @param type - Tag name or component
|
|
@@ -43,7 +44,7 @@ type MarkdownRuntime = {
|
|
|
43
44
|
/**
|
|
44
45
|
* Context passed to the compiler containing runtime and configuration.
|
|
45
46
|
*/
|
|
46
|
-
type MarkdownContext<T> = {
|
|
47
|
+
export type MarkdownContext<T> = {
|
|
47
48
|
/** Framework runtime (createElement, etc.) */
|
|
48
49
|
runtime: MarkdownRuntime;
|
|
49
50
|
/** Component components for HTML tags */
|
|
@@ -58,7 +59,7 @@ type MarkdownContext<T> = {
|
|
|
58
59
|
/**
|
|
59
60
|
* Parser state passed through parsing and rendering.
|
|
60
61
|
*/
|
|
61
|
-
type ParseState = {
|
|
62
|
+
export type ParseState = {
|
|
62
63
|
/** true if the current content is inside anchor link grammar */
|
|
63
64
|
inAnchor?: boolean;
|
|
64
65
|
/** true if parsing in an HTML context */
|
|
@@ -82,137 +83,137 @@ type ParseState = {
|
|
|
82
83
|
/** true if parsing in inline context w/o links */
|
|
83
84
|
simple?: boolean;
|
|
84
85
|
};
|
|
85
|
-
type BlockQuoteNode = {
|
|
86
|
+
export type BlockQuoteNode = {
|
|
86
87
|
type: string;
|
|
87
88
|
alert?: string;
|
|
88
89
|
children: ParserResult[];
|
|
89
90
|
};
|
|
90
|
-
type BreakLineNode = {
|
|
91
|
+
export type BreakLineNode = {
|
|
91
92
|
type: string;
|
|
92
93
|
};
|
|
93
|
-
type BreakThematicNode = {
|
|
94
|
+
export type BreakThematicNode = {
|
|
94
95
|
type: string;
|
|
95
96
|
};
|
|
96
|
-
type CodeBlockNode = {
|
|
97
|
+
export type CodeBlockNode = {
|
|
97
98
|
type: string;
|
|
98
99
|
attrs?: Record<string, any>;
|
|
99
100
|
lang?: string;
|
|
100
101
|
text: string;
|
|
101
102
|
};
|
|
102
|
-
type CodeFencedNode = {
|
|
103
|
+
export type CodeFencedNode = {
|
|
103
104
|
type: string;
|
|
104
105
|
};
|
|
105
|
-
type CodeInlineNode = {
|
|
106
|
+
export type CodeInlineNode = {
|
|
106
107
|
type: string;
|
|
107
108
|
text: string;
|
|
108
109
|
};
|
|
109
|
-
type FootnoteNode = {
|
|
110
|
+
export type FootnoteNode = {
|
|
110
111
|
type: string;
|
|
111
112
|
};
|
|
112
|
-
type FootnoteReferenceNode = {
|
|
113
|
+
export type FootnoteReferenceNode = {
|
|
113
114
|
type: string;
|
|
114
115
|
target: string;
|
|
115
116
|
text: string;
|
|
116
117
|
};
|
|
117
|
-
type GFMTaskNode = {
|
|
118
|
+
export type GFMTaskNode = {
|
|
118
119
|
type: string;
|
|
119
120
|
completed: boolean;
|
|
120
121
|
};
|
|
121
|
-
type HeadingNode = {
|
|
122
|
+
export type HeadingNode = {
|
|
122
123
|
type: string;
|
|
123
124
|
children: ParserResult[];
|
|
124
125
|
id: string;
|
|
125
126
|
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
126
127
|
};
|
|
127
|
-
type HeadingSetextNode = {
|
|
128
|
+
export type HeadingSetextNode = {
|
|
128
129
|
type: string;
|
|
129
130
|
};
|
|
130
|
-
type HTMLCommentNode = {
|
|
131
|
+
export type HTMLCommentNode = {
|
|
131
132
|
type: string;
|
|
132
133
|
};
|
|
133
|
-
type ImageNode = {
|
|
134
|
+
export type ImageNode = {
|
|
134
135
|
type: string;
|
|
135
136
|
alt?: string;
|
|
136
137
|
target: string;
|
|
137
138
|
title?: string;
|
|
138
139
|
};
|
|
139
|
-
type LinkNode = {
|
|
140
|
+
export type LinkNode = {
|
|
140
141
|
type: string;
|
|
141
142
|
children: ParserResult[];
|
|
142
143
|
target: string;
|
|
143
144
|
title?: string;
|
|
144
145
|
};
|
|
145
|
-
type LinkAngleBraceNode = {
|
|
146
|
+
export type LinkAngleBraceNode = {
|
|
146
147
|
type: string;
|
|
147
148
|
};
|
|
148
|
-
type LinkBareURLNode = {
|
|
149
|
+
export type LinkBareURLNode = {
|
|
149
150
|
type: string;
|
|
150
151
|
};
|
|
151
|
-
type OrderedListNode = {
|
|
152
|
+
export type OrderedListNode = {
|
|
152
153
|
type: string;
|
|
153
154
|
items: ParserResult[][];
|
|
154
155
|
ordered: true;
|
|
155
156
|
start?: number;
|
|
156
157
|
};
|
|
157
|
-
type UnorderedListNode = {
|
|
158
|
+
export type UnorderedListNode = {
|
|
158
159
|
type: string;
|
|
159
160
|
items: ParserResult[][];
|
|
160
161
|
ordered: false;
|
|
161
162
|
};
|
|
162
|
-
type NewlineNode = {
|
|
163
|
+
export type NewlineNode = {
|
|
163
164
|
type: string;
|
|
164
165
|
};
|
|
165
|
-
type ParagraphNode = {
|
|
166
|
+
export type ParagraphNode = {
|
|
166
167
|
type: string;
|
|
167
168
|
children: ParserResult[];
|
|
168
169
|
};
|
|
169
|
-
type ReferenceNode = {
|
|
170
|
+
export type ReferenceNode = {
|
|
170
171
|
type: string;
|
|
171
172
|
};
|
|
172
|
-
type ReferenceImageNode = {
|
|
173
|
+
export type ReferenceImageNode = {
|
|
173
174
|
type: string;
|
|
174
175
|
alt?: string;
|
|
175
176
|
ref: string;
|
|
176
177
|
};
|
|
177
|
-
type ReferenceLinkNode = {
|
|
178
|
+
export type ReferenceLinkNode = {
|
|
178
179
|
type: string;
|
|
179
180
|
children: ParserResult[];
|
|
180
181
|
fallbackChildren: string;
|
|
181
182
|
ref: string;
|
|
182
183
|
};
|
|
183
|
-
type TableNode = {
|
|
184
|
+
export type TableNode = {
|
|
184
185
|
type: string;
|
|
185
186
|
align: ('left' | 'right' | 'center')[];
|
|
186
187
|
cells: ParserResult[][][];
|
|
187
188
|
header: ParserResult[][];
|
|
188
189
|
};
|
|
189
|
-
type TableSeparatorNode = {
|
|
190
|
+
export type TableSeparatorNode = {
|
|
190
191
|
type: string;
|
|
191
192
|
};
|
|
192
|
-
type TextNode = {
|
|
193
|
+
export type TextNode = {
|
|
193
194
|
type: string;
|
|
194
195
|
text: string;
|
|
195
196
|
};
|
|
196
|
-
type BoldTextNode = {
|
|
197
|
+
export type BoldTextNode = {
|
|
197
198
|
type: string;
|
|
198
199
|
children: ParserResult[];
|
|
199
200
|
};
|
|
200
|
-
type ItalicTextNode = {
|
|
201
|
+
export type ItalicTextNode = {
|
|
201
202
|
type: string;
|
|
202
203
|
children: ParserResult[];
|
|
203
204
|
};
|
|
204
|
-
type EscapedTextNode = {
|
|
205
|
+
export type EscapedTextNode = {
|
|
205
206
|
type: string;
|
|
206
207
|
};
|
|
207
|
-
type MarkedTextNode = {
|
|
208
|
+
export type MarkedTextNode = {
|
|
208
209
|
type: string;
|
|
209
210
|
children: ParserResult[];
|
|
210
211
|
};
|
|
211
|
-
type StrikethroughTextNode = {
|
|
212
|
+
export type StrikethroughTextNode = {
|
|
212
213
|
type: string;
|
|
213
214
|
children: ParserResult[];
|
|
214
215
|
};
|
|
215
|
-
type HTMLNode = {
|
|
216
|
+
export type HTMLNode = {
|
|
216
217
|
type: string;
|
|
217
218
|
attrs: Record<string, any> | null;
|
|
218
219
|
children?: ParserResult[];
|
|
@@ -220,12 +221,12 @@ type HTMLNode = {
|
|
|
220
221
|
tag: HTMLTag;
|
|
221
222
|
text?: string;
|
|
222
223
|
};
|
|
223
|
-
type HTMLSelfClosingNode = {
|
|
224
|
+
export type HTMLSelfClosingNode = {
|
|
224
225
|
type: string;
|
|
225
226
|
attrs: Record<string, any> | null;
|
|
226
227
|
tag: string;
|
|
227
228
|
};
|
|
228
|
-
type CustomComponentNode = {
|
|
229
|
+
export type CustomComponentNode = {
|
|
229
230
|
type: string;
|
|
230
231
|
attrs: Record<string, any> | null;
|
|
231
232
|
children?: ParserResult[];
|
|
@@ -236,23 +237,23 @@ type CustomComponentNode = {
|
|
|
236
237
|
/**
|
|
237
238
|
* Union of all possible parser result node types.
|
|
238
239
|
*/
|
|
239
|
-
type ParserResult = BlockQuoteNode | BreakLineNode | BreakThematicNode | CodeBlockNode | CodeFencedNode | CodeInlineNode | CustomComponentNode | FootnoteNode | FootnoteReferenceNode | GFMTaskNode | HeadingNode | HeadingSetextNode | HTMLCommentNode | ImageNode | LinkNode | LinkAngleBraceNode | LinkBareURLNode | OrderedListNode | UnorderedListNode | NewlineNode | ParagraphNode | ReferenceNode | ReferenceImageNode | ReferenceLinkNode | TableNode | TableSeparatorNode | TextNode | BoldTextNode | ItalicTextNode | EscapedTextNode | MarkedTextNode | StrikethroughTextNode | HTMLNode | HTMLSelfClosingNode;
|
|
240
|
+
export type ParserResult = BlockQuoteNode | BreakLineNode | BreakThematicNode | CodeBlockNode | CodeFencedNode | CodeInlineNode | CustomComponentNode | FootnoteNode | FootnoteReferenceNode | GFMTaskNode | HeadingNode | HeadingSetextNode | HTMLCommentNode | ImageNode | LinkNode | LinkAngleBraceNode | LinkBareURLNode | OrderedListNode | UnorderedListNode | NewlineNode | ParagraphNode | ReferenceNode | ReferenceImageNode | ReferenceLinkNode | TableNode | TableSeparatorNode | TextNode | BoldTextNode | ItalicTextNode | EscapedTextNode | MarkedTextNode | StrikethroughTextNode | HTMLNode | HTMLSelfClosingNode;
|
|
240
241
|
/**
|
|
241
242
|
* Nested parser function type.
|
|
242
243
|
*/
|
|
243
|
-
type NestedParser = (input: string, state: ParseState) => ParserResult[];
|
|
244
|
+
export type NestedParser = (input: string, state: ParseState) => ParserResult[];
|
|
244
245
|
/**
|
|
245
246
|
* Parser function type for a rule.
|
|
246
247
|
*/
|
|
247
|
-
type Parser<ParserOutput> = (capture: RegExpMatchArray, nestedParse: NestedParser, state: ParseState) => ParserOutput;
|
|
248
|
+
export type Parser<ParserOutput> = (capture: RegExpMatchArray, nestedParse: NestedParser, state: ParseState) => ParserOutput;
|
|
248
249
|
/**
|
|
249
250
|
* Output function type for rendering.
|
|
250
251
|
*/
|
|
251
|
-
type RuleOutput = (ast: ParserResult | ParserResult[], state: ParseState) => unknown;
|
|
252
|
+
export type RuleOutput = (ast: ParserResult | ParserResult[], state: ParseState) => unknown;
|
|
252
253
|
/**
|
|
253
254
|
* Rule definition for parsing and rendering markdown.
|
|
254
255
|
*/
|
|
255
|
-
type Rule<ParserOutput = ParserResult> = {
|
|
256
|
+
export type Rule<ParserOutput = ParserResult> = {
|
|
256
257
|
/** Match function - returns regex match or null */
|
|
257
258
|
_match: (source: string, state: ParseState, prevCapturedString?: string) => RegExpMatchArray | null;
|
|
258
259
|
/** Priority order for rule application */
|
|
@@ -264,6 +265,18 @@ type Rule<ParserOutput = ParserResult> = {
|
|
|
264
265
|
* should even be attempted.
|
|
265
266
|
*/
|
|
266
267
|
_qualify?: string[] | ((source: string, state: ParseState) => boolean);
|
|
268
|
+
/**
|
|
269
|
+
* Optional ASCII charCodes that can trigger this rule.
|
|
270
|
+
* If provided, the rule is only evaluated when source starts with one of these characters.
|
|
271
|
+
*/
|
|
272
|
+
_firstChars?: number[];
|
|
273
|
+
/**
|
|
274
|
+
* Optional parsing scope for this rule.
|
|
275
|
+
* SCOPE_BLOCK (1) / 'block': evaluated only when !state.inline && !state.simple
|
|
276
|
+
* SCOPE_INLINE (2) / 'inline': evaluated only when state.inline || state.simple
|
|
277
|
+
* SCOPE_BOTH (3) / 'both': evaluated in both scopes (default)
|
|
278
|
+
*/
|
|
279
|
+
_scope?: RuleScopeValue;
|
|
267
280
|
/**
|
|
268
281
|
* Render function - converts AST node to output.
|
|
269
282
|
* Uses context's runtime.createElement for element creation.
|
|
@@ -273,19 +286,19 @@ type Rule<ParserOutput = ParserResult> = {
|
|
|
273
286
|
/**
|
|
274
287
|
* Map of all rules keyed by rule type.
|
|
275
288
|
*/
|
|
276
|
-
type Rules = {
|
|
289
|
+
export type Rules = {
|
|
277
290
|
[key: string]: Rule<any>;
|
|
278
291
|
};
|
|
279
292
|
/**
|
|
280
293
|
* Map of tag overrides.
|
|
281
294
|
*/
|
|
282
|
-
type ComponentOverrides<T> = {
|
|
295
|
+
export type ComponentOverrides<T> = {
|
|
283
296
|
[tag: string]: T;
|
|
284
297
|
};
|
|
285
298
|
/**
|
|
286
299
|
* Render rule hook for custom rendering logic.
|
|
287
300
|
*/
|
|
288
|
-
type RenderRuleHook = (
|
|
301
|
+
export type RenderRuleHook = (
|
|
289
302
|
/** Resume normal processing, call this function as a fallback */
|
|
290
303
|
next: () => unknown,
|
|
291
304
|
/** The current AST node */
|
|
@@ -298,7 +311,7 @@ state: ParseState) => unknown;
|
|
|
298
311
|
* Options for the markdown compiler.
|
|
299
312
|
* This is the framework-agnostic version of MarkdownRendererOptions.
|
|
300
313
|
*/
|
|
301
|
-
type MarkdownOptions = {
|
|
314
|
+
export type MarkdownOptions = {
|
|
302
315
|
/**
|
|
303
316
|
* Disable automatic link detection for bare URLs.
|
|
304
317
|
*/
|
|
@@ -344,7 +357,7 @@ type MarkdownOptions = {
|
|
|
344
357
|
* Combined options including context and compiler options.
|
|
345
358
|
* Used by framework adapters.
|
|
346
359
|
*/
|
|
347
|
-
type CompileOptions<T = any> = MarkdownOptions & {
|
|
360
|
+
export type CompileOptions<T = any> = MarkdownOptions & {
|
|
348
361
|
/** Component components */
|
|
349
362
|
components?: ComponentOverrides<T>;
|
|
350
363
|
/** Custom named codes to unicode mappings */
|
|
@@ -355,5 +368,4 @@ type CompileOptions<T = any> = MarkdownOptions & {
|
|
|
355
368
|
slugify?: (input: string, defaultFn: (input: string) => string) => string;
|
|
356
369
|
};
|
|
357
370
|
//#endregion
|
|
358
|
-
export { 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 };
|
|
359
371
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/markdown/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/markdown/types.ts"],"mappings":";;;;;;YAUY;;;;YAKA;;;;;YAMA;;;;;;;EAOV,gBACE,MAAM,aACN,OAAO,+BACJ;;;;;EAOL;;;;;;;;;;EAWA,kBACE,KAAK,SACL,OAAO,wBACJ;;;;GAKJ;;;;;YAMS,gBAAgB;;EAE1B,SAAS;;EAET,aAAa,mBAAmB;;EAEhC,aAAa,aAAa,KAAK,SAAS;;EAExC,WAAW,cAAc,YAAY;;EAErC,sBAAsB;;;;;YAUZ;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;EAMA;;EAEA;;EAEA;;YAOU;EACV;EACA;EACA,UAAU;;YAGA;EACV;;YAGU;EACV;;YAGU;EACV;EACA,QAAQ;EACR;EACA;;YAGU;EACV;;YAGU;EACV;EACA;;YAGU;EACV;;YAGU;EACV;EACA;EACA;;YAGU;EACV;EACA;;YAGU;EACV;EACA,UAAU;EACV;EACA;;YAGU;EACV;;YAGU;EACV;;YAGU;EACV;EACA;EACA;EACA;;YAGU;EACV;EACA,UAAU;EACV;EACA;;YAGU;EACV;;YAGU;EACV;;YAGU;EACV;EACA,OAAO;EACP;EACA;;YAGU;EACV;EACA,OAAO;EACP;;YAGU;EACV;;YAGU;EACV;EACA,UAAU;;YAGA;EACV;;YAGU;EACV;EACA;EACA;;YAGU;EACV;EACA,UAAU;EACV;EACA;;YAGU;EACV;EACA;EACA,OAAO;EACP,QAAQ;;YAGE;EACV;;YAGU;EACV;EACA;;YAGU;EACV;EACA,UAAU;;YAGA;EACV;EACA,UAAU;;YAGA;EACV;;YAGU;EACV;EACA,UAAU;;YAGA;EACV;EACA,UAAU;;YAGA;EACV;EACA,OAAO;EACP,WAAW;EACX;EACA,KAAK;EACL;;YAGU;EACV;EACA,OAAO;EACP;;YAGU;EACV;EACA,OAAO;EACP,WAAW;EACX;EACA;EACA;;;;;YAMU,eACR,iBACA,gBACA,oBACA,gBACA,iBACA,iBACA,sBACA,eACA,wBACA,cACA,cACA,oBACA,kBACA,YACA,WACA,qBACA,kBACA,kBACA,oBACA,cACA,gBACA,gBACA,qBACA,oBACA,YACA,qBACA,WACA,eACA,iBACA,kBACA,iBACA,wBACA,WACA;;;;YASQ,gBAAgB,eAAe,OAAO,eAAe;;;;YAKrD,OAAO,iBACjB,SAAS,kBACT,aAAa,cACb,OAAO,eACJ;;;;YAKO,cACV,KAAK,eAAe,gBACpB,OAAO;;;;YAMG,KAAK,eAAe;;EAE9B,SACE,gBACA,OAAO,YACP,gCACG;;EAGL;;EAGA,QAAQ,OAAO,KAAK;;;;;EAMpB,wBAAwB,gBAAgB,OAAO;;;;;EAM/C;;;;;;;EAQA,SAAS;;;;;EAMT,WACE,MAAM,cACN,QAAQ,YACR,OAAO;;;;;YAOC;GACT,cAAc;;;;;YAUL,mBAAmB;GAC5B,cAAc;;;;;YAUL,kBAEV;;AAAA,qBAEA;;AAAA,MAAM,cAEN;;AAAA,gBAAgB,YAEhB;;AAAA,OAAO;;;;;YAOG;;;;EAIV;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA,aAAa;;;;EAKb,UAAU;;;;EAKV;;;;EAKA;;;;;;YAOU,eAAe,WAAW;;EAEpC,aAAa,mBAAmB;;EAEhC,sBAAsB;;EAEtB,aAAa,eAAe,KAAK,SAAS;;EAE1C,WAAW,eAAe,YAAY"}
|
|
@@ -3,37 +3,37 @@ import { NestedParser, ParseState, ParserResult, Rule } from "./types.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Trim trailing whitespace from a string.
|
|
5
5
|
*/
|
|
6
|
-
declare const trimEnd: (str: string) => string;
|
|
6
|
+
export declare const trimEnd: (str: string) => string;
|
|
7
7
|
/**
|
|
8
8
|
* Check if string starts with prefix.
|
|
9
9
|
*/
|
|
10
|
-
declare const startsWith: (str: string, prefix: string) => boolean;
|
|
10
|
+
export declare const startsWith: (str: string, prefix: string) => boolean;
|
|
11
11
|
/**
|
|
12
12
|
* Remove symmetrical leading and trailing quotes.
|
|
13
13
|
*/
|
|
14
|
-
declare const unquote: (str: string) => string;
|
|
14
|
+
export declare const unquote: (str: string) => string;
|
|
15
15
|
/**
|
|
16
16
|
* Unescape backslash-escaped characters.
|
|
17
17
|
*/
|
|
18
|
-
declare const unescapeString: (rawString:
|
|
18
|
+
export declare const unescapeString: <T extends string | undefined>(rawString: T) => T;
|
|
19
19
|
/**
|
|
20
20
|
* Join class names, filtering out falsy values.
|
|
21
21
|
*/
|
|
22
|
-
declare const cx: (...args: any[]) => string;
|
|
22
|
+
export declare const cx: (...args: any[]) => string;
|
|
23
23
|
/**
|
|
24
24
|
* Get a nested property from an object using dot notation.
|
|
25
25
|
*/
|
|
26
|
-
declare const get: (src: any, path: string, fb?: any) => any;
|
|
27
|
-
declare const slugify: (str: string) => string;
|
|
26
|
+
export declare const get: (src: any, path: string, fb?: any) => any;
|
|
27
|
+
export declare const slugify: (str: string) => string;
|
|
28
28
|
/**
|
|
29
29
|
* Sanitize URLs to prevent XSS attacks.
|
|
30
30
|
* Returns null if the URL is unsafe.
|
|
31
31
|
*/
|
|
32
|
-
declare const sanitizer: (input: string) => string | null;
|
|
32
|
+
export declare const sanitizer: (input: string) => string | null;
|
|
33
33
|
/**
|
|
34
34
|
* Normalize whitespace in source string.
|
|
35
35
|
*/
|
|
36
|
-
declare const normalizeWhitespace: (source: string) => string;
|
|
36
|
+
export declare const normalizeWhitespace: (source: string) => string;
|
|
37
37
|
/**
|
|
38
38
|
* Safely remove a uniform leading indentation from lines, but do NOT touch
|
|
39
39
|
* the content inside fenced code blocks (``` or ~~~).
|
|
@@ -44,98 +44,102 @@ declare const normalizeWhitespace: (source: string) => string;
|
|
|
44
44
|
* element but written with its fence at column 0 therefore keeps its code
|
|
45
45
|
* verbatim, instead of losing the first level of indentation.
|
|
46
46
|
*/
|
|
47
|
-
declare const trimLeadingWhitespaceOutsideFences: (text: string, whitespace: string) => string;
|
|
47
|
+
export declare const trimLeadingWhitespaceOutsideFences: (text: string, whitespace: string) => string;
|
|
48
48
|
/**
|
|
49
49
|
* Normalize HTML attribute key to JSX prop name.
|
|
50
50
|
*/
|
|
51
|
-
declare const normalizeAttributeKey: (key: string) => string;
|
|
51
|
+
export declare const normalizeAttributeKey: (key: string) => string;
|
|
52
52
|
type StyleTuple = [key: string, value: string];
|
|
53
53
|
/**
|
|
54
54
|
* Parse a CSS style string into an array of [key, value] tuples.
|
|
55
55
|
*/
|
|
56
|
-
declare const parseStyleAttribute: (styleString: string) => StyleTuple[];
|
|
56
|
+
export declare const parseStyleAttribute: (styleString: string) => StyleTuple[];
|
|
57
57
|
/**
|
|
58
58
|
* Convert an attribute value to a Node prop value.
|
|
59
59
|
*/
|
|
60
|
-
declare const attributeValueToNodePropValue: (tag: string, key: string, value: string, sanitizeUrlFn: (value: string, tag: string, attribute: string) => string | null) => any;
|
|
60
|
+
export declare const attributeValueToNodePropValue: (tag: string, key: string, value: string, sanitizeUrlFn: (value: string, tag: string, attribute: string) => string | null) => any;
|
|
61
61
|
/**
|
|
62
62
|
* Parse table alignment from a separator row.
|
|
63
63
|
*/
|
|
64
|
-
declare const parseTableAlignCapture: (alignCapture: string) => 'left' | 'right' | 'center';
|
|
64
|
+
export declare const parseTableAlignCapture: (alignCapture: string) => 'left' | 'right' | 'center';
|
|
65
65
|
/**
|
|
66
66
|
* Parse table alignment row.
|
|
67
67
|
*/
|
|
68
|
-
declare const parseTableAlign: (source: string) => ('left' | 'right' | 'center')[];
|
|
68
|
+
export declare const parseTableAlign: (source: string) => ('left' | 'right' | 'center')[];
|
|
69
69
|
/**
|
|
70
70
|
* Parse a single table row.
|
|
71
71
|
*/
|
|
72
|
-
declare const parseTableRow: (source: string, parse: NestedParser, state: ParseState, tableOutput: boolean) => ParserResult[][];
|
|
72
|
+
export declare const parseTableRow: (source: string, parse: NestedParser, state: ParseState, tableOutput: boolean) => ParserResult[][];
|
|
73
73
|
/**
|
|
74
74
|
* Parse table cells (multiple rows).
|
|
75
75
|
*/
|
|
76
|
-
declare const parseTableCells: (source: string, parse: NestedParser, state: ParseState) => ParserResult[][][];
|
|
76
|
+
export declare const parseTableCells: (source: string, parse: NestedParser, state: ParseState) => ParserResult[][][];
|
|
77
77
|
/**
|
|
78
78
|
* Check if a rule qualifies for the current source and state.
|
|
79
79
|
*/
|
|
80
|
-
declare const qualifies: (source: string, state: ParseState, qualify: NonNullable<Rule<any>['_qualify']>) => boolean;
|
|
80
|
+
export declare const qualifies: (source: string, state: ParseState, qualify: NonNullable<Rule<any>['_qualify']>) => boolean;
|
|
81
81
|
/**
|
|
82
82
|
* Marks a matcher function as eligible for being run inside an inline context.
|
|
83
83
|
*/
|
|
84
|
-
declare const allowInline: <T extends (...args: any[]) => any>(fn: T) => T & {
|
|
84
|
+
export declare const allowInline: <T extends (...args: any[]) => any>(fn: T) => T & {
|
|
85
85
|
inline: 1;
|
|
86
86
|
};
|
|
87
87
|
/**
|
|
88
88
|
* Creates a match function for an inline scoped element from a regex.
|
|
89
89
|
*/
|
|
90
|
-
declare const inlineRegex: (regex: RegExp) => ((source: string, state: ParseState) => RegExpMatchArray | null) & {
|
|
90
|
+
export declare const inlineRegex: (regex: RegExp) => ((source: string, state: ParseState) => RegExpMatchArray | null) & {
|
|
91
91
|
inline: 1;
|
|
92
92
|
};
|
|
93
93
|
/**
|
|
94
94
|
* Creates a match function for inline elements except links.
|
|
95
95
|
*/
|
|
96
|
-
declare const simpleInlineRegex: (regex: RegExp) => ((source: string, state: ParseState) => RegExpMatchArray | null) & {
|
|
96
|
+
export declare const simpleInlineRegex: (regex: RegExp) => ((source: string, state: ParseState) => RegExpMatchArray | null) & {
|
|
97
97
|
inline: 1;
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
100
100
|
* Creates a match function for a block scoped element from a regex.
|
|
101
101
|
*/
|
|
102
|
-
declare const blockRegex: (regex: RegExp) => (source: string, state: ParseState) => RegExpMatchArray | null;
|
|
102
|
+
export declare const blockRegex: (regex: RegExp) => (source: string, state: ParseState) => RegExpMatchArray | null;
|
|
103
103
|
/**
|
|
104
104
|
* Creates a match function from a regex, ignoring block/inline scope.
|
|
105
105
|
*/
|
|
106
|
-
declare const anyScopeRegex: (fn: RegExp | ((source: string, state: ParseState) => RegExpMatchArray | null)) => ((source: string, state: ParseState) => RegExpMatchArray | null) & {
|
|
106
|
+
export declare const anyScopeRegex: (fn: RegExp | ((source: string, state: ParseState) => RegExpMatchArray | null)) => ((source: string, state: ParseState) => RegExpMatchArray | null) & {
|
|
107
107
|
inline: 1;
|
|
108
108
|
};
|
|
109
109
|
/**
|
|
110
110
|
* Parse inline content (including links).
|
|
111
111
|
*/
|
|
112
|
-
declare const parseInline: (parse: NestedParser, children: string, state: ParseState) => ParserResult[];
|
|
112
|
+
export declare const parseInline: (parse: NestedParser, children: string, state: ParseState) => ParserResult[];
|
|
113
113
|
/**
|
|
114
114
|
* Parse simple inline content (no links).
|
|
115
115
|
*/
|
|
116
|
-
declare const parseSimpleInline: (parse: NestedParser, children: string, state: ParseState) => ParserResult[];
|
|
116
|
+
export declare const parseSimpleInline: (parse: NestedParser, children: string, state: ParseState) => ParserResult[];
|
|
117
117
|
/**
|
|
118
118
|
* Parse block content.
|
|
119
119
|
*/
|
|
120
|
-
declare const parseBlock: (parse: NestedParser, children: string, state?: ParseState) => ParserResult[];
|
|
120
|
+
export declare const parseBlock: (parse: NestedParser, children: string, state?: ParseState) => ParserResult[];
|
|
121
121
|
/**
|
|
122
122
|
* Helper to parse capture group 2 as inline content.
|
|
123
123
|
*/
|
|
124
|
-
declare const parseCaptureInline: (capture: RegExpMatchArray, parse: NestedParser, state: ParseState) => {
|
|
124
|
+
export declare const parseCaptureInline: (capture: RegExpMatchArray, parse: NestedParser, state: ParseState) => {
|
|
125
125
|
children: ParserResult[];
|
|
126
126
|
};
|
|
127
127
|
/**
|
|
128
128
|
* Helper that captures nothing (empty object).
|
|
129
129
|
*/
|
|
130
|
-
declare const captureNothing: () => Record<string, never>;
|
|
130
|
+
export declare const captureNothing: () => Record<string, never>;
|
|
131
131
|
/**
|
|
132
132
|
* Helper that renders nothing (null).
|
|
133
133
|
*/
|
|
134
|
-
declare const renderNothing: () => null;
|
|
134
|
+
export declare const renderNothing: () => null;
|
|
135
135
|
/**
|
|
136
136
|
* Check if any regex in a list matches the input.
|
|
137
137
|
*/
|
|
138
|
-
|
|
138
|
+
/**
|
|
139
|
+
* A block-syntax probe: either a regex to test, or a predicate for the rules
|
|
140
|
+
* whose regex was replaced by a linear scanner.
|
|
141
|
+
*/
|
|
142
|
+
export type BlockSyntaxProbe = RegExp | ((input: string) => boolean);
|
|
143
|
+
export declare const some: (probes: BlockSyntaxProbe[], input: string) => boolean;
|
|
139
144
|
//#endregion
|
|
140
|
-
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 };
|
|
141
145
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../../src/markdown/utils.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../../src/markdown/utils.ts"],"mappings":";;;;;qBAwBa,UAAO;;;;qBAWP,aAAU,aAAe;;;;qBAOzB,UAAO;;;;qBAiBP,iBAAkB,8BAA4B,WAAa,MAAI;;;;qBAQ/D,QAAE;;;;qBAKF,MAAG,UAAY,cAAc;qBAyC7B,UAAO;;;;;qBA4BP,YAAS;;;;qBAqCT,sBAAmB;;;;;;;;;;;qBA+BnB,qCAAkC,cACjC;;;;qBAwCD,wBAAqB;KAY7B,cAAc,aAAa;;;;qBAKnB,sBAAmB,wBAA0B;;;;qBA+D7C,gCAA6B,aAC7B,aACA,eACE,gBAEX,eACA,aACA;;;;qBA0CS,yBAAsB;;;;qBAqBtB,kBAAe;;;;qBAUf,gBAAa,gBACV,OACP,cAAY,OACZ,YAAU,yBAEhB;;;;qBA4HU,kBAAe,gBACZ,OACP,cAAY,OACZ,eACN;;;;qBAqCU,YAAS,gBACN,OACP,YAAU,SACR,YAAY;;;;qBAmBV,cAAe,cAAc,qBAAmB,IACvD,MACH;EAAM;;;;;qBAQI,cAAW,OAAW,aAAM,gBACZ,OAAS,eAAa;EATlC;;;;;qBAoBJ,oBAAiB,OAAW,aAAM,gBAClB,OAAS,eAAa;EArBlC;;;;;qBAgCJ,aAAU,OACb,YAAM,gBACC,OAAS,eAAa;;;;qBAW1B,gBAAa,IACpB,WAAW,gBAAgB,OAAO,eAAe,+BAAwB,gBAElD,OAAS,eAAa;EAhDlC;;;;;qBA0DJ,cAAW,OACf,cAAY,kBACH,OACT,eACN;;;;qBAeU,oBAAiB,OACrB,cAAY,kBACH,OACT,eACN;;;;qBAgBU,aAAU,OACd,cAAY,kBACH,QACT,eACN;;;;qBAoBU,qBAAkB,SACpB,kBAAgB,OAClB,cAAY,OACZ;EACJ,UAAU;;;;;qBASF,sBAAqB;;;;qBAKrB;;;;;;;;YASD,mBAAmB,WAAW;qBAE7B,OAAI,QAAY,oBAAkB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
2
2
|
//#region src/messageFormat/ICU.d.ts
|
|
3
|
-
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
3
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
4
4
|
[key: string]: JsonValue;
|
|
5
5
|
};
|
|
6
|
-
declare const intlayerToICUFormatter: (message: Dictionary['content']) => JsonValue;
|
|
7
|
-
declare const icuToIntlayerFormatter: (message: Dictionary['content']) => JsonValue;
|
|
6
|
+
export declare const intlayerToICUFormatter: (message: Dictionary['content']) => JsonValue;
|
|
7
|
+
export declare const icuToIntlayerFormatter: (message: Dictionary['content']) => JsonValue;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { JsonValue, icuToIntlayerFormatter, intlayerToICUFormatter };
|
|
10
9
|
//# sourceMappingURL=ICU.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICU.d.ts","names":[],"sources":["../../../src/messageFormat/ICU.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ICU.d.ts","names":[],"sources":["../../../src/messageFormat/ICU.ts"],"mappings":";;YAkDY,+CAKR;GACG,cAAc;;qBAknBR,yBAAsB,SACxB,0BACR;qBAQU,yBAAsB,SACxB,0BACR"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { JsonValue } from "./ICU.js";
|
|
2
2
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
3
3
|
//#region src/messageFormat/i18next.d.ts
|
|
4
|
-
declare const intlayerToI18nextFormatter: (message: Dictionary['content']) => JsonValue;
|
|
5
|
-
declare const i18nextToIntlayerFormatter: (message: JsonValue) => Dictionary['content'];
|
|
4
|
+
export declare const intlayerToI18nextFormatter: (message: Dictionary['content']) => JsonValue;
|
|
5
|
+
export declare const i18nextToIntlayerFormatter: (message: JsonValue) => Dictionary['content'];
|
|
6
6
|
//#endregion
|
|
7
|
-
export { i18nextToIntlayerFormatter, intlayerToI18nextFormatter };
|
|
8
7
|
//# sourceMappingURL=i18next.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18next.d.ts","names":[],"sources":["../../../src/messageFormat/i18next.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"i18next.d.ts","names":[],"sources":["../../../src/messageFormat/i18next.ts"],"mappings":";;;qBAklBa,6BAA0B,SAC5B,0BACR;qBAQU,6BAA0B,SAC5B,cACR"}
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
* (flat lookup only), mirroring i18next's `keySeparator: false`.
|
|
17
17
|
* @returns The value found at `path`, or `undefined` when any segment is absent.
|
|
18
18
|
*/
|
|
19
|
-
declare const navigatePath: (contentValue: unknown, path: string, keySeparator?: string | false) => unknown;
|
|
19
|
+
export declare const navigatePath: (contentValue: unknown, path: string, keySeparator?: string | false) => unknown;
|
|
20
20
|
//#endregion
|
|
21
|
-
export { navigatePath };
|
|
22
21
|
//# sourceMappingURL=navigatePath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigatePath.d.ts","names":[],"sources":["../../../src/messageFormat/navigatePath.ts"],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"navigatePath.d.ts","names":[],"sources":["../../../src/messageFormat/navigatePath.ts"],"mappings":";;;;;;;;;;;;;;;;;;qBAiBa,eAAY,uBACF,cACT"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { JsonValue } from "./ICU.js";
|
|
2
2
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
3
3
|
//#region src/messageFormat/po.d.ts
|
|
4
|
-
type PortableObject = {
|
|
4
|
+
export type PortableObject = {
|
|
5
5
|
msgid: string;
|
|
6
6
|
msgctxt?: string;
|
|
7
7
|
msgid_plural?: string;
|
|
8
8
|
msgstr: string[];
|
|
9
9
|
};
|
|
10
|
-
declare const intlayerToPortableObjectFormatter: (dictionary: Dictionary['content']) => JsonValue;
|
|
11
|
-
declare const portableObjectToIntlayerFormatter: (message: JsonValue) => Dictionary['content'];
|
|
10
|
+
export declare const intlayerToPortableObjectFormatter: (dictionary: Dictionary['content']) => JsonValue;
|
|
11
|
+
export declare const portableObjectToIntlayerFormatter: (message: JsonValue) => Dictionary['content'];
|
|
12
12
|
//#endregion
|
|
13
|
-
export { PortableObject, intlayerToPortableObjectFormatter, portableObjectToIntlayerFormatter };
|
|
14
13
|
//# sourceMappingURL=po.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"po.d.ts","names":[],"sources":["../../../src/messageFormat/po.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"po.d.ts","names":[],"sources":["../../../src/messageFormat/po.ts"],"mappings":";;;YAMY;EACV;EACA;EACA;EACA;;qBAgPW,oCAAiC,YAChC,0BACX;qBAQU,oCAAiC,SACnC,cACR"}
|
|
@@ -13,9 +13,9 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
|
13
13
|
* (`@intlayer/i18next`, `@intlayer/next-intl`, `@intlayer/vue-i18n`, …).
|
|
14
14
|
*/
|
|
15
15
|
/** Message syntax dialect of the source i18n library. */
|
|
16
|
-
type MessageFormatDialect = 'icu' | 'i18next' | 'vue-i18n';
|
|
16
|
+
export type MessageFormatDialect = 'icu' | 'i18next' | 'vue-i18n';
|
|
17
17
|
/** Interpolation values passed alongside a translation lookup. */
|
|
18
|
-
type MessageValues = Record<string, unknown>;
|
|
18
|
+
export type MessageValues = Record<string, unknown>;
|
|
19
19
|
/**
|
|
20
20
|
* Interpolates a message template with values.
|
|
21
21
|
*
|
|
@@ -24,7 +24,7 @@ type MessageValues = Record<string, unknown>;
|
|
|
24
24
|
* 2. ICU formatted arguments `{value, number}` / `{ts, date, long}`
|
|
25
25
|
* 3. Bare single-brace arguments `{name}` (ICU / vue-i18n simple args)
|
|
26
26
|
*/
|
|
27
|
-
declare const interpolateMessage: (template: string, values?: MessageValues, locale?: LocalesValues) => string;
|
|
27
|
+
export declare const interpolateMessage: (template: string, values?: MessageValues, locale?: LocalesValues) => string;
|
|
28
28
|
/**
|
|
29
29
|
* Resolves an intlayer message node tree (as produced by the
|
|
30
30
|
* `*ToIntlayerFormatter` converters, or already present in a built
|
|
@@ -33,7 +33,7 @@ declare const interpolateMessage: (template: string, values?: MessageValues, loc
|
|
|
33
33
|
* Function nodes (produced by the interpreter plugins for `insertion`,
|
|
34
34
|
* `enumeration` and `plural` content) are invoked with the values.
|
|
35
35
|
*/
|
|
36
|
-
declare const resolveMessageNode: (node: unknown, values?: MessageValues, locale?: LocalesValues) => unknown;
|
|
36
|
+
export declare const resolveMessageNode: (node: unknown, values?: MessageValues, locale?: LocalesValues) => unknown;
|
|
37
37
|
/**
|
|
38
38
|
* Resolves a raw message — string in a library dialect, or an intlayer node
|
|
39
39
|
* tree — into a final string using interpolation values and locale.
|
|
@@ -52,9 +52,9 @@ declare const resolveMessageNode: (node: unknown, values?: MessageValues, locale
|
|
|
52
52
|
* // '3 items'
|
|
53
53
|
* ```
|
|
54
54
|
*/
|
|
55
|
-
declare const resolveMessage: (message: unknown, values?: MessageValues, locale?: LocalesValues, dialect?: MessageFormatDialect) => string;
|
|
55
|
+
export declare const resolveMessage: (message: unknown, values?: MessageValues, locale?: LocalesValues, dialect?: MessageFormatDialect) => string;
|
|
56
56
|
/** A parsed token of a tagged message: plain text or a tag with children. */
|
|
57
|
-
type TaggedMessageToken = string | {
|
|
57
|
+
export type TaggedMessageToken = string | {
|
|
58
58
|
tag: string;
|
|
59
59
|
children: TaggedMessageToken[];
|
|
60
60
|
};
|
|
@@ -65,7 +65,6 @@ type TaggedMessageToken = string | {
|
|
|
65
65
|
* Used by rich-text renderers (`t.rich`, `<Trans components>`,
|
|
66
66
|
* `<i18n-t>` slots) to map tags to framework elements.
|
|
67
67
|
*/
|
|
68
|
-
declare const parseTaggedMessage: (message: string) => TaggedMessageToken[];
|
|
68
|
+
export declare const parseTaggedMessage: (message: string) => TaggedMessageToken[];
|
|
69
69
|
//#endregion
|
|
70
|
-
export { MessageFormatDialect, MessageValues, TaggedMessageToken, interpolateMessage, parseTaggedMessage, resolveMessage, resolveMessageNode };
|
|
71
70
|
//# sourceMappingURL=resolveMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveMessage.d.ts","names":[],"sources":["../../../src/messageFormat/resolveMessage.ts"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"resolveMessage.d.ts","names":[],"sources":["../../../src/messageFormat/resolveMessage.ts"],"mappings":";;;;;;;;;;;;;;;YAyBY;;YAGA,gBAAgB;;;;;;;;;qBAsFf,qBAAkB,kBACb,SACR,eAAa,SACb;;;;;;;;;qBAkCG,qBAAkB,eAChB,SACL,eAAa,SACb;;;;;;;;;;;;;;;;;;;qBA2JG,iBAAc,kBACT,SACR,eAAa,SACb,eAAa,UACZ;;YAaC;EAEN;EAAa,UAAU;;;;;;;;;qBAShB,qBAAkB,oBAAsB"}
|