@e-llm-studio/instant-learning 0.0.104 → 0.0.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ChatComponent.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/CognitiveDecisioningCard.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/InputDataReasoningCard.js +2 -0
- package/dist/cjs/features/IL-OTJ/_components/InputDataReasoningCard.js.map +1 -0
- package/dist/cjs/features/IL-OTJ/_components/MessageRendering.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/MinimizedThinkingSteps.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
- package/dist/cjs/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/cjs/node_modules/@e-llm-studio/citation/dist/features/Bookemon/Bookemon.js.map +1 -1
- package/dist/cjs/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js +1 -1
- package/dist/cjs/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-find-and-replace/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-find-and-replace/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-is/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-is/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/color.browser.js +2 -0
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/color.browser.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-from-markdown/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-from-markdown/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/lib/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/cjs/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-gfm-footnote/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-footnote/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-strikethrough/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-table/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-table/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-task-list-item/lib/index.js +1 -1
- package/dist/cjs/node_modules/mdast-util-gfm-task-list-item/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/association.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/association.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/container-flow.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +1 -1
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/safe.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/safe.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/track.js +2 -0
- package/dist/cjs/node_modules/mdast-util-to-markdown/lib/util/track.js.map +1 -0
- package/dist/cjs/node_modules/mdast-util-to-string/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark/lib/constructs.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/constructs.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/create-tokenizer.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/create-tokenizer.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/content.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/content.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/document.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/document.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/flow.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/flow.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/text.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/initialize/text.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/parse.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/parse.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/postprocess.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/postprocess.js.map +1 -0
- package/dist/cjs/node_modules/micromark/lib/preprocess.js +2 -0
- package/dist/cjs/node_modules/micromark/lib/preprocess.js.map +1 -0
- package/dist/cjs/node_modules/micromark/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/attention.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/attention.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/autolink.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/autolink.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/blank-line.js +1 -1
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -1
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/block-quote.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/block-quote.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/character-escape.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/character-escape.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/character-reference.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/character-reference.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-fenced.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-fenced.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-indented.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-indented.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-text.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/code-text.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/content.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/content.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/definition.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/definition.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/heading-atx.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/heading-atx.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/html-flow.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/html-flow.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/html-text.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/html-text.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-end.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-end.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-start-image.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-start-image.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-start-link.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/label-start-link.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/line-ending.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/line-ending.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/list.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/list.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/setext-underline.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/setext-underline.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/thematic-break.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/lib/thematic-break.js.map +1 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-core-commonmark/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm/index.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/edit-map.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/edit-map.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/infer.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/syntax.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/lib/syntax.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-table/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-table/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +1 -1
- package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-destination/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-destination/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-destination/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-destination/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-label/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-label/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-label/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-label/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-space/index.js +1 -1
- package/dist/cjs/node_modules/micromark-factory-space/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-factory-space/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-space/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-title/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-title/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-title/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-title/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-whitespace/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-whitespace/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-factory-whitespace/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-factory-whitespace/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-chunked/index.js +1 -1
- package/dist/cjs/node_modules/micromark-util-chunked/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-util-classify-character/index.js +1 -1
- package/dist/cjs/node_modules/micromark-util-classify-character/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/cjs/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-combine-extensions/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-util-decode-numeric-character-reference/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-decode-numeric-character-reference/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-decode-string/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-decode-string/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-html-tag-name/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-html-tag-name/index.js.map +1 -0
- package/dist/cjs/node_modules/micromark-util-normalize-identifier/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-util-resolve-all/index.js.map +1 -1
- package/dist/cjs/node_modules/micromark-util-subtokenize/index.js +2 -0
- package/dist/cjs/node_modules/micromark-util-subtokenize/index.js.map +1 -0
- package/dist/cjs/node_modules/react-markdown/lib/react-markdown.js +1 -1
- package/dist/cjs/node_modules/react-markdown/lib/react-markdown.js.map +1 -1
- package/dist/cjs/node_modules/react-markdown/node_modules/remark-parse/lib/index.js +1 -1
- package/dist/cjs/node_modules/react-markdown/node_modules/remark-parse/lib/index.js.map +1 -1
- package/dist/cjs/node_modules/remark-gfm/index.js +2 -0
- package/dist/cjs/node_modules/remark-gfm/index.js.map +1 -0
- package/dist/cjs/node_modules/unified/lib/index.js +2 -0
- package/dist/cjs/node_modules/unified/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/is-plain-obj/index.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/unist-util-stringify-position/lib/index.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/index.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/index.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minpath.browser.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minpath.browser.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minproc.browser.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minproc.browser.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minurl.browser.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minurl.browser.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minurl.shared.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile/lib/minurl.shared.js.map +1 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile-message/lib/index.js +2 -0
- package/dist/cjs/node_modules/unified/node_modules/vfile-message/lib/index.js.map +1 -0
- package/dist/features/IL-OTJ/ILOTJ.js +1 -1
- package/dist/features/IL-OTJ/_components/ChatComponent.js +1 -1
- package/dist/features/IL-OTJ/_components/CitationLink.js +1 -1
- package/dist/features/IL-OTJ/_components/CognitiveDecisioningCard.js +1 -1
- package/dist/features/IL-OTJ/_components/ILPopup.styles.js +1 -1
- package/dist/features/IL-OTJ/_components/InputDataReasoningCard.js +2 -0
- package/dist/features/IL-OTJ/_components/InputDataReasoningCard.js.map +1 -0
- package/dist/features/IL-OTJ/_components/MessageRendering.js +1 -1
- package/dist/features/IL-OTJ/_components/MinimizedThinkingSteps.js +1 -1
- package/dist/features/IL-OTJ/_components/molecules/Condition/ConditionList.js +1 -1
- package/dist/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.js +1 -1
- package/dist/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.js +1 -1
- package/dist/node_modules/@e-llm-studio/citation/dist/features/Bookemon/Bookemon.js.map +1 -1
- package/dist/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js +1 -1
- package/dist/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js.map +1 -1
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-is/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-is/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/color.browser.js +2 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/color.browser.js.map +1 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-from-markdown/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/lib/index.js +2 -0
- package/dist/node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js +1 -1
- package/dist/node_modules/mdast-util-gfm-task-list-item/lib/index.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/association.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/association.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-flow.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-flow.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/indent-lines.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +1 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/safe.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/safe.js.map +1 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/track.js +2 -0
- package/dist/node_modules/mdast-util-to-markdown/lib/util/track.js.map +1 -0
- package/dist/node_modules/mdast-util-to-string/lib/index.js.map +1 -1
- package/dist/node_modules/micromark/lib/constructs.js +2 -0
- package/dist/node_modules/micromark/lib/constructs.js.map +1 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js +2 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/content.js +2 -0
- package/dist/node_modules/micromark/lib/initialize/content.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/document.js +2 -0
- package/dist/node_modules/micromark/lib/initialize/document.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js +2 -0
- package/dist/node_modules/micromark/lib/initialize/flow.js.map +1 -0
- package/dist/node_modules/micromark/lib/initialize/text.js +2 -0
- package/dist/node_modules/micromark/lib/initialize/text.js.map +1 -0
- package/dist/node_modules/micromark/lib/parse.js +2 -0
- package/dist/node_modules/micromark/lib/parse.js.map +1 -0
- package/dist/node_modules/micromark/lib/postprocess.js +2 -0
- package/dist/node_modules/micromark/lib/postprocess.js.map +1 -0
- package/dist/node_modules/micromark/lib/preprocess.js +2 -0
- package/dist/node_modules/micromark/lib/preprocess.js.map +1 -0
- package/dist/node_modules/micromark/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/attention.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/autolink.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/code-text.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/content.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/definition.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/html-text.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/list.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-core-commonmark/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm/index.js +1 -1
- package/dist/node_modules/micromark-extension-gfm/index.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-footnote/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/infer.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-table/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js +1 -1
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-extension-gfm-task-list-item/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-destination/index.js +2 -0
- package/dist/node_modules/micromark-factory-destination/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-destination/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-factory-destination/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-label/index.js +2 -0
- package/dist/node_modules/micromark-factory-label/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-label/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-factory-label/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-space/index.js +1 -1
- package/dist/node_modules/micromark-factory-space/index.js.map +1 -1
- package/dist/node_modules/micromark-factory-space/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-factory-space/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-title/index.js +2 -0
- package/dist/node_modules/micromark-factory-title/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-title/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-factory-title/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js +2 -0
- package/dist/node_modules/micromark-factory-whitespace/index.js.map +1 -0
- package/dist/node_modules/micromark-factory-whitespace/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-factory-whitespace/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-util-chunked/index.js +1 -1
- package/dist/node_modules/micromark-util-chunked/index.js.map +1 -1
- package/dist/node_modules/micromark-util-classify-character/index.js +1 -1
- package/dist/node_modules/micromark-util-classify-character/index.js.map +1 -1
- package/dist/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/index.js +2 -0
- package/dist/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/index.js.map +1 -0
- package/dist/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js +2 -0
- package/dist/node_modules/micromark-util-classify-character/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js.map +1 -0
- package/dist/node_modules/micromark-util-combine-extensions/index.js.map +1 -1
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +2 -0
- package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js.map +1 -0
- package/dist/node_modules/micromark-util-decode-string/index.js +2 -0
- package/dist/node_modules/micromark-util-decode-string/index.js.map +1 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js +2 -0
- package/dist/node_modules/micromark-util-html-tag-name/index.js.map +1 -0
- package/dist/node_modules/micromark-util-normalize-identifier/index.js.map +1 -1
- package/dist/node_modules/micromark-util-resolve-all/index.js.map +1 -1
- package/dist/node_modules/micromark-util-subtokenize/index.js +2 -0
- package/dist/node_modules/micromark-util-subtokenize/index.js.map +1 -0
- package/dist/node_modules/react-markdown/lib/react-markdown.js +1 -1
- package/dist/node_modules/react-markdown/lib/react-markdown.js.map +1 -1
- package/dist/node_modules/react-markdown/node_modules/remark-parse/lib/index.js +1 -1
- package/dist/node_modules/react-markdown/node_modules/remark-parse/lib/index.js.map +1 -1
- package/dist/node_modules/remark-gfm/index.js +2 -0
- package/dist/node_modules/remark-gfm/index.js.map +1 -0
- package/dist/node_modules/unified/lib/index.js +2 -0
- package/dist/node_modules/unified/lib/index.js.map +1 -0
- package/dist/node_modules/unified/node_modules/is-plain-obj/index.js +2 -0
- package/dist/node_modules/unified/node_modules/is-plain-obj/index.js.map +1 -0
- package/dist/node_modules/unified/node_modules/unist-util-stringify-position/lib/index.js +2 -0
- package/dist/node_modules/unified/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/index.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/index.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minpath.browser.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minpath.browser.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minproc.browser.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minproc.browser.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minurl.browser.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minurl.browser.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minurl.shared.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile/lib/minurl.shared.js.map +1 -0
- package/dist/node_modules/unified/node_modules/vfile-message/lib/index.js +2 -0
- package/dist/node_modules/unified/node_modules/vfile-message/lib/index.js.map +1 -0
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/ILOTJ.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/ILOTJTest.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ChatComponent.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/_components/ChatComponent.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts +13 -0
- package/dist/types/src/features/IL-OTJ/_components/CitationLink.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/CognitiveDecisioningCard.d.ts +3 -0
- package/dist/types/src/features/IL-OTJ/_components/CognitiveDecisioningCard.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/ILPopup.styles.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts +10 -0
- package/dist/types/src/features/IL-OTJ/_components/InputDataReasoningCard.d.ts.map +1 -0
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering.d.ts +3 -1
- package/dist/types/src/features/IL-OTJ/_components/MessageRendering.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/_svg/RightSideIcons.d.ts +1 -0
- package/dist/types/src/features/IL-OTJ/_components/_svg/RightSideIcons.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts +3 -1
- package/dist/types/src/features/IL-OTJ/_components/molecules/Condition/ConditionList.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts +1 -1
- package/dist/types/src/features/IL-OTJ/_components/organisms/ConditionSection/ConditionSection.d.ts.map +1 -1
- package/dist/types/src/features/IL-OTJ/_components/templates/TrafficManager/CreateRule.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm/lib/index.js"],"sourcesContent":["/**\n * @
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n */\n\n/**\n * @typedef {import('mdast-util-gfm-table').Options} Options\n * Configuration.\n */\n\nimport {\n gfmAutolinkLiteralFromMarkdown,\n gfmAutolinkLiteralToMarkdown\n} from 'mdast-util-gfm-autolink-literal'\nimport {\n gfmFootnoteFromMarkdown,\n gfmFootnoteToMarkdown\n} from 'mdast-util-gfm-footnote'\nimport {\n gfmStrikethroughFromMarkdown,\n gfmStrikethroughToMarkdown\n} from 'mdast-util-gfm-strikethrough'\nimport {gfmTableFromMarkdown, gfmTableToMarkdown} from 'mdast-util-gfm-table'\nimport {\n gfmTaskListItemFromMarkdown,\n gfmTaskListItemToMarkdown\n} from 'mdast-util-gfm-task-list-item'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @returns {Array<FromMarkdownExtension>}\n * Extension for `mdast-util-from-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmFromMarkdown() {\n return [\n gfmAutolinkLiteralFromMarkdown,\n gfmFootnoteFromMarkdown(),\n gfmStrikethroughFromMarkdown,\n gfmTableFromMarkdown,\n gfmTaskListItemFromMarkdown\n ]\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM (autolink\n * literals, footnotes, strikethrough, tables, tasklists).\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM (autolink literals,\n * footnotes, strikethrough, tables, tasklists).\n */\nexport function gfmToMarkdown(options) {\n return {\n extensions: [\n gfmAutolinkLiteralToMarkdown,\n gfmFootnoteToMarkdown(),\n gfmStrikethroughToMarkdown,\n gfmTableToMarkdown(options),\n gfmTaskListItemToMarkdown\n ]\n }\n}\n"],"names":["gfmFromMarkdown","gfmAutolinkLiteralFromMarkdown","gfmFootnoteFromMarkdown","gfmStrikethroughFromMarkdown","gfmTableFromMarkdown","gfmTaskListItemFromMarkdown","gfmToMarkdown","options","extensions","gfmAutolinkLiteralToMarkdown","gfmFootnoteToMarkdown","gfmStrikethroughToMarkdown","gfmTableToMarkdown","gfmTaskListItemToMarkdown"],"mappings":"0lBAoCO,SAASA,IACd,MAAO,CACLC,EACAC,IACAC,EACAC,EACAC,EAEJ,CAYO,SAASC,EAAcC,GAC5B,MAAO,CACLC,WAAY,CACVC,EACAC,IACAC,EACAC,EAAmBL,GACnBM,GAGN"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ccount as t}from"../../ccount/index.js";import{
|
|
1
|
+
import{ccount as t}from"../../ccount/index.js";import{findAndReplace as n}from"../../mdast-util-find-and-replace/lib/index.js";import{unicodeWhitespace as i,unicodePunctuation as e}from"../node_modules/micromark-util-character/index.js";const l="phrasing",r=["autolink","link","image","label"],o={transforms:[function(t){n(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,a],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,s]],{ignore:["link","linkReference"]})}],enter:{literalAutolink:function(t){this.enter({type:"link",title:null,url:"",children:[]},t)},literalAutolinkEmail:u,literalAutolinkHttp:u,literalAutolinkWww:u},exit:{literalAutolink:function(t){this.exit(t)},literalAutolinkEmail:function(t){this.config.exit.autolinkEmail.call(this,t)},literalAutolinkHttp:function(t){this.config.exit.autolinkProtocol.call(this,t)},literalAutolinkWww:function(t){this.config.exit.data.call(this,t);this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(t)}}},c={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:l,notInConstruct:r},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:l,notInConstruct:r},{character:":",before:"[ps]",after:"\\/",inConstruct:l,notInConstruct:r}]};function u(t){this.config.enter.autolinkProtocol.call(this,t)}function a(n,i,e,l,r){let o="";if(!f(r))return!1;if(/^w/i.test(i)&&(e=i+e,i="",o="http://"),!function(t){const n=t.split(".");if(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))return!1;return!0}(e))return!1;const c=function(n){const i=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!i)return[n,void 0];n=n.slice(0,i.index);let e=i[0],l=e.indexOf(")");const r=t(n,"(");let o=t(n,")");for(;-1!==l&&r>o;)n+=e.slice(0,l+1),e=e.slice(l+1),l=e.indexOf(")"),o++;return[n,e]}(e+l);if(!c[0])return!1;const u={type:"link",title:null,url:o+i+c[0],children:[{type:"text",value:i+c[0]}]};return c[1]?[u,{type:"text",value:c[1]}]:u}function s(t,n,i,e){return!(!f(e,!0)||/[-\d_]$/.test(i))&&{type:"link",title:null,url:"mailto:"+n+"@"+i,children:[{type:"text",value:n+"@"+i}]}}function f(t,n){const l=t.input.charCodeAt(t.index-1);return(0===t.index||i(l)||e(l))&&(!n||47!==l)}export{o as gfmAutolinkLiteralFromMarkdown,c as gfmAutolinkLiteralToMarkdown};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm-autolink-literal/lib/index.js"],"sourcesContent":["/**\n * @import {RegExpMatchObject, ReplaceFunction} from 'mdast-util-find-and-replace'\n * @import {CompileContext, Extension as FromMarkdownExtension, Handle as FromMarkdownHandle, Transform as FromMarkdownTransform} from 'mdast-util-from-markdown'\n * @import {ConstructName, Options as ToMarkdownExtension} from 'mdast-util-to-markdown'\n * @import {Link, PhrasingContent} from 'mdast'\n */\n\nimport {ccount} from 'ccount'\nimport {ok as assert} from 'devlop'\nimport {unicodePunctuation, unicodeWhitespace} from 'micromark-util-character'\nimport {findAndReplace} from 'mdast-util-find-and-replace'\n\n/** @type {ConstructName} */\nconst inConstruct = 'phrasing'\n/** @type {Array<ConstructName>} */\nconst notInConstruct = ['autolink', 'link', 'image', 'label']\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM autolink\n * literals in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n */\nexport function gfmAutolinkLiteralFromMarkdown() {\n return {\n transforms: [transformGfmAutolinkLiterals],\n enter: {\n literalAutolink: enterLiteralAutolink,\n literalAutolinkEmail: enterLiteralAutolinkValue,\n literalAutolinkHttp: enterLiteralAutolinkValue,\n literalAutolinkWww: enterLiteralAutolinkValue\n },\n exit: {\n literalAutolink: exitLiteralAutolink,\n literalAutolinkEmail: exitLiteralAutolinkEmail,\n literalAutolinkHttp: exitLiteralAutolinkHttp,\n literalAutolinkWww: exitLiteralAutolinkWww\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM autolink\n * literals in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n */\nexport function gfmAutolinkLiteralToMarkdown() {\n return {\n unsafe: [\n {\n character: '@',\n before: '[+\\\\-.\\\\w]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: '.',\n before: '[Ww]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: ':',\n before: '[ps]',\n after: '\\\\/',\n inConstruct,\n notInConstruct\n }\n ]\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolink(token) {\n this.enter({type: 'link', title: null, url: '', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolinkValue(token) {\n this.config.enter.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkHttp(token) {\n this.config.exit.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkWww(token) {\n this.config.exit.data.call(this, token)\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'link')\n node.url = 'http://' + this.sliceSerialize(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkEmail(token) {\n this.config.exit.autolinkEmail.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolink(token) {\n this.exit(token)\n}\n\n/** @type {FromMarkdownTransform} */\nfunction transformGfmAutolinkLiterals(tree) {\n findAndReplace(\n tree,\n [\n [/(https?:\\/\\/|www(?=\\.))([-.\\w]+)([^ \\t\\r\\n]*)/gi, findUrl],\n [/(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)/gu, findEmail]\n ],\n {ignore: ['link', 'linkReference']}\n )\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} protocol\n * @param {string} domain\n * @param {string} path\n * @param {RegExpMatchObject} match\n * @returns {Array<PhrasingContent> | Link | false}\n */\n// eslint-disable-next-line max-params\nfunction findUrl(_, protocol, domain, path, match) {\n let prefix = ''\n\n // Not an expected previous character.\n if (!previous(match)) {\n return false\n }\n\n // Treat `www` as part of the domain.\n if (/^w/i.test(protocol)) {\n domain = protocol + domain\n protocol = ''\n prefix = 'http://'\n }\n\n if (!isCorrectDomain(domain)) {\n return false\n }\n\n const parts = splitUrl(domain + path)\n\n if (!parts[0]) return false\n\n /** @type {Link} */\n const result = {\n type: 'link',\n title: null,\n url: prefix + protocol + parts[0],\n children: [{type: 'text', value: protocol + parts[0]}]\n }\n\n if (parts[1]) {\n return [result, {type: 'text', value: parts[1]}]\n }\n\n return result\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} atext\n * @param {string} label\n * @param {RegExpMatchObject} match\n * @returns {Link | false}\n */\nfunction findEmail(_, atext, label, match) {\n if (\n // Not an expected previous character.\n !previous(match, true) ||\n // Label ends in not allowed character.\n /[-\\d_]$/.test(label)\n ) {\n return false\n }\n\n return {\n type: 'link',\n title: null,\n url: 'mailto:' + atext + '@' + label,\n children: [{type: 'text', value: atext + '@' + label}]\n }\n}\n\n/**\n * @param {string} domain\n * @returns {boolean}\n */\nfunction isCorrectDomain(domain) {\n const parts = domain.split('.')\n\n if (\n parts.length < 2 ||\n (parts[parts.length - 1] &&\n (/_/.test(parts[parts.length - 1]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 1]))) ||\n (parts[parts.length - 2] &&\n (/_/.test(parts[parts.length - 2]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 2])))\n ) {\n return false\n }\n\n return true\n}\n\n/**\n * @param {string} url\n * @returns {[string, string | undefined]}\n */\nfunction splitUrl(url) {\n const trailExec = /[!\"&'),.:;<>?\\]}]+$/.exec(url)\n\n if (!trailExec) {\n return [url, undefined]\n }\n\n url = url.slice(0, trailExec.index)\n\n let trail = trailExec[0]\n let closingParenIndex = trail.indexOf(')')\n const openingParens = ccount(url, '(')\n let closingParens = ccount(url, ')')\n\n while (closingParenIndex !== -1 && openingParens > closingParens) {\n url += trail.slice(0, closingParenIndex + 1)\n trail = trail.slice(closingParenIndex + 1)\n closingParenIndex = trail.indexOf(')')\n closingParens++\n }\n\n return [url, trail]\n}\n\n/**\n * @param {RegExpMatchObject} match\n * @param {boolean | null | undefined} [email=false]\n * @returns {boolean}\n */\nfunction previous(match, email) {\n const code = match.input.charCodeAt(match.index - 1)\n\n return (\n (match.index === 0 ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)) &&\n // If it’s an email, the previous character should not be a slash.\n (!email || code !== 47)\n )\n}\n"],"names":["inConstruct","notInConstruct","gfmAutolinkLiteralFromMarkdown","transforms","transformGfmAutolinkLiterals","enter","literalAutolink","enterLiteralAutolink","literalAutolinkEmail","enterLiteralAutolinkValue","literalAutolinkHttp","literalAutolinkWww","exit","exitLiteralAutolink","exitLiteralAutolinkEmail","exitLiteralAutolinkHttp","exitLiteralAutolinkWww","gfmAutolinkLiteralToMarkdown","unsafe","character","before","after","token","this","type","title","url","children","config","autolinkProtocol","call","data","node","stack","length","assert","sliceSerialize","autolinkEmail","tree","findAndReplace","findUrl","findEmail","ignore","_","protocol","domain","path","match","prefix","previous","test","parts","split","isCorrectDomain","trailExec","exec","undefined","slice","index","trail","closingParenIndex","indexOf","openingParens","ccount","closingParens","splitUrl","result","value","atext","label","email","code","input","charCodeAt","unicodeWhitespace","unicodePunctuation"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm-autolink-literal/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-from-markdown').Transform} FromMarkdownTransform\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n *\n * @typedef {import('mdast-util-find-and-replace').ReplaceFunction} ReplaceFunction\n * @typedef {import('mdast-util-find-and-replace').RegExpMatchObject} RegExpMatchObject\n */\n\nimport {ccount} from 'ccount'\nimport {findAndReplace} from 'mdast-util-find-and-replace'\nimport {unicodePunctuation, unicodeWhitespace} from 'micromark-util-character'\n\n/** @type {ConstructName} */\nconst inConstruct = 'phrasing'\n/** @type {Array<ConstructName>} */\nconst notInConstruct = ['autolink', 'link', 'image', 'label']\n\n// To do: next major: expose functions instead of extensions.\n\n/**\n * Extension for `mdast-util-from-markdown` to enable GFM autolink literals.\n *\n * @type {FromMarkdownExtension}\n */\nexport const gfmAutolinkLiteralFromMarkdown = {\n transforms: [transformGfmAutolinkLiterals],\n enter: {\n literalAutolink: enterLiteralAutolink,\n literalAutolinkEmail: enterLiteralAutolinkValue,\n literalAutolinkHttp: enterLiteralAutolinkValue,\n literalAutolinkWww: enterLiteralAutolinkValue\n },\n exit: {\n literalAutolink: exitLiteralAutolink,\n literalAutolinkEmail: exitLiteralAutolinkEmail,\n literalAutolinkHttp: exitLiteralAutolinkHttp,\n literalAutolinkWww: exitLiteralAutolinkWww\n }\n}\n\n/**\n * Extension for `mdast-util-to-markdown` to enable GFM autolink literals.\n *\n * @type {ToMarkdownExtension}\n */\nexport const gfmAutolinkLiteralToMarkdown = {\n unsafe: [\n {\n character: '@',\n before: '[+\\\\-.\\\\w]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {\n character: '.',\n before: '[Ww]',\n after: '[\\\\-.\\\\w]',\n inConstruct,\n notInConstruct\n },\n {character: ':', before: '[ps]', after: '\\\\/', inConstruct, notInConstruct}\n ]\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolink(token) {\n this.enter({type: 'link', title: null, url: '', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterLiteralAutolinkValue(token) {\n this.config.enter.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkHttp(token) {\n this.config.exit.autolinkProtocol.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkWww(token) {\n this.config.exit.data.call(this, token)\n const node = /** @type {Link} */ (this.stack[this.stack.length - 1])\n node.url = 'http://' + this.sliceSerialize(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolinkEmail(token) {\n this.config.exit.autolinkEmail.call(this, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitLiteralAutolink(token) {\n this.exit(token)\n}\n\n/** @type {FromMarkdownTransform} */\nfunction transformGfmAutolinkLiterals(tree) {\n findAndReplace(\n tree,\n [\n [/(https?:\\/\\/|www(?=\\.))([-.\\w]+)([^ \\t\\r\\n]*)/gi, findUrl],\n [/([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)/g, findEmail]\n ],\n {ignore: ['link', 'linkReference']}\n )\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} protocol\n * @param {string} domain\n * @param {string} path\n * @param {RegExpMatchObject} match\n * @returns {Link | Array<PhrasingContent> | false}\n */\n// eslint-disable-next-line max-params\nfunction findUrl(_, protocol, domain, path, match) {\n let prefix = ''\n\n // Not an expected previous character.\n if (!previous(match)) {\n return false\n }\n\n // Treat `www` as part of the domain.\n if (/^w/i.test(protocol)) {\n domain = protocol + domain\n protocol = ''\n prefix = 'http://'\n }\n\n if (!isCorrectDomain(domain)) {\n return false\n }\n\n const parts = splitUrl(domain + path)\n\n if (!parts[0]) return false\n\n /** @type {Link} */\n const result = {\n type: 'link',\n title: null,\n url: prefix + protocol + parts[0],\n children: [{type: 'text', value: protocol + parts[0]}]\n }\n\n if (parts[1]) {\n return [result, {type: 'text', value: parts[1]}]\n }\n\n return result\n}\n\n/**\n * @type {ReplaceFunction}\n * @param {string} _\n * @param {string} atext\n * @param {string} label\n * @param {RegExpMatchObject} match\n * @returns {Link | false}\n */\nfunction findEmail(_, atext, label, match) {\n if (\n // Not an expected previous character.\n !previous(match, true) ||\n // Label ends in not allowed character.\n /[-\\d_]$/.test(label)\n ) {\n return false\n }\n\n return {\n type: 'link',\n title: null,\n url: 'mailto:' + atext + '@' + label,\n children: [{type: 'text', value: atext + '@' + label}]\n }\n}\n\n/**\n * @param {string} domain\n * @returns {boolean}\n */\nfunction isCorrectDomain(domain) {\n const parts = domain.split('.')\n\n if (\n parts.length < 2 ||\n (parts[parts.length - 1] &&\n (/_/.test(parts[parts.length - 1]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 1]))) ||\n (parts[parts.length - 2] &&\n (/_/.test(parts[parts.length - 2]) ||\n !/[a-zA-Z\\d]/.test(parts[parts.length - 2])))\n ) {\n return false\n }\n\n return true\n}\n\n/**\n * @param {string} url\n * @returns {[string, string | undefined]}\n */\nfunction splitUrl(url) {\n const trailExec = /[!\"&'),.:;<>?\\]}]+$/.exec(url)\n\n if (!trailExec) {\n return [url, undefined]\n }\n\n url = url.slice(0, trailExec.index)\n\n let trail = trailExec[0]\n let closingParenIndex = trail.indexOf(')')\n const openingParens = ccount(url, '(')\n let closingParens = ccount(url, ')')\n\n while (closingParenIndex !== -1 && openingParens > closingParens) {\n url += trail.slice(0, closingParenIndex + 1)\n trail = trail.slice(closingParenIndex + 1)\n closingParenIndex = trail.indexOf(')')\n closingParens++\n }\n\n return [url, trail]\n}\n\n/**\n * @param {RegExpMatchObject} match\n * @param {boolean | null | undefined} [email=false]\n * @returns {boolean}\n */\nfunction previous(match, email) {\n const code = match.input.charCodeAt(match.index - 1)\n\n return (\n (match.index === 0 ||\n unicodeWhitespace(code) ||\n unicodePunctuation(code)) &&\n (!email || code !== 47)\n )\n}\n"],"names":["inConstruct","notInConstruct","gfmAutolinkLiteralFromMarkdown","transforms","tree","findAndReplace","findUrl","findEmail","ignore","enter","literalAutolink","token","this","type","title","url","children","literalAutolinkEmail","enterLiteralAutolinkValue","literalAutolinkHttp","literalAutolinkWww","exit","config","autolinkEmail","call","autolinkProtocol","data","stack","length","sliceSerialize","gfmAutolinkLiteralToMarkdown","unsafe","character","before","after","_","protocol","domain","path","match","prefix","previous","test","parts","split","isCorrectDomain","trailExec","exec","undefined","slice","index","trail","closingParenIndex","indexOf","openingParens","ccount","closingParens","splitUrl","result","value","atext","label","email","code","input","charCodeAt","unicodeWhitespace","unicodePunctuation"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/index.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Code} Code\n */\n\nimport {unicodePunctuationRegex} from './lib/unicode-punctuation-regex.js'\n\n/**\n * Check whether the character code represents an ASCII alpha (`a` through `z`,\n * case insensitive).\n *\n * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.\n *\n * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`)\n * to U+005A (`Z`).\n *\n * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)\n * to U+007A (`z`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiAlpha = regexCheck(/[A-Za-z]/)\n\n/**\n * Check whether the character code represents an ASCII alphanumeric (`a`\n * through `z`, case insensitive, or `0` through `9`).\n *\n * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha\n * (see `asciiAlpha`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiAlphanumeric = regexCheck(/[\\dA-Za-z]/)\n\n/**\n * Check whether the character code represents an ASCII atext.\n *\n * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in\n * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),\n * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F\n * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E\n * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE\n * (`{`) to U+007E TILDE (`~`).\n *\n * See:\n * **\\[RFC5322]**:\n * [Internet Message Format](https://tools.ietf.org/html/rfc5322).\n * P. Resnick.\n * IETF.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiAtext = regexCheck(/[#-'*+\\--9=?A-Z^-~]/)\n\n/**\n * Check whether a character code is an ASCII control character.\n *\n * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)\n * to U+001F (US), or U+007F (DEL).\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function asciiControl(code) {\n return (\n // Special whitespace codes (which have negative values), C0 and Control\n // character DEL\n code !== null && (code < 32 || code === 127)\n )\n}\n\n/**\n * Check whether the character code represents an ASCII digit (`0` through `9`).\n *\n * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to\n * U+0039 (`9`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiDigit = regexCheck(/\\d/)\n\n/**\n * Check whether the character code represents an ASCII hex digit (`a` through\n * `f`, case insensitive, or `0` through `9`).\n *\n * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex\n * digit, or an ASCII lower hex digit.\n *\n * An **ASCII upper hex digit** is a character in the inclusive range U+0041\n * (`A`) to U+0046 (`F`).\n *\n * An **ASCII lower hex digit** is a character in the inclusive range U+0061\n * (`a`) to U+0066 (`f`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiHexDigit = regexCheck(/[\\dA-Fa-f]/)\n\n/**\n * Check whether the character code represents ASCII punctuation.\n *\n * An **ASCII punctuation** is a character in the inclusive ranges U+0021\n * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT\n * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT\n * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/)\n\n/**\n * Check whether a character code is a markdown line ending.\n *\n * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN\n * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).\n *\n * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE\n * RETURN (CR) are replaced by these virtual characters depending on whether\n * they occurred together.\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownLineEnding(code) {\n return code !== null && code < -2\n}\n\n/**\n * Check whether a character code is a markdown line ending (see\n * `markdownLineEnding`) or markdown space (see `markdownSpace`).\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownLineEndingOrSpace(code) {\n return code !== null && (code < 0 || code === 32)\n}\n\n/**\n * Check whether a character code is a markdown space.\n *\n * A **markdown space** is the concrete character U+0020 SPACE (SP) and the\n * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).\n *\n * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is\n * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL\n * SPACE (VS) characters, depending on the column at which the tab occurred.\n *\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether it matches.\n */\nexport function markdownSpace(code) {\n return code === -2 || code === -1 || code === 32\n}\n\n// Size note: removing ASCII from the regex and using `asciiPunctuation` here\n// In fact adds to the bundle size.\n/**\n * Check whether the character code represents Unicode punctuation.\n *\n * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,\n * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`\n * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`\n * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII\n * punctuation (see `asciiPunctuation`).\n *\n * See:\n * **\\[UNICODE]**:\n * [The Unicode Standard](https://www.unicode.org/versions/).\n * Unicode Consortium.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const unicodePunctuation = regexCheck(unicodePunctuationRegex)\n\n/**\n * Check whether the character code represents Unicode whitespace.\n *\n * Note that this does handle micromark specific markdown whitespace characters.\n * See `markdownLineEndingOrSpace` to check that.\n *\n * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,\n * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),\n * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\\[UNICODE]**).\n *\n * See:\n * **\\[UNICODE]**:\n * [The Unicode Standard](https://www.unicode.org/versions/).\n * Unicode Consortium.\n *\n * @param code\n * Code.\n * @returns\n * Whether it matches.\n */\nexport const unicodeWhitespace = regexCheck(/\\s/)\n\n/**\n * Create a code check from a regex.\n *\n * @param {RegExp} regex\n * @returns {(code: Code) => boolean}\n */\nfunction regexCheck(regex) {\n return check\n\n /**\n * Check whether a code matches the bound regex.\n *\n * @param {Code} code\n * Character code.\n * @returns {boolean}\n * Whether the character code matches the bound regex.\n */\n function check(code) {\n return code !== null && regex.test(String.fromCharCode(code))\n }\n}\n"],"names":["unicodePunctuation","regexCheck","unicodePunctuationRegex","unicodeWhitespace","regex","code","test","String","fromCharCode"],"mappings":"6EAyMY,MAACA,EAAqBC,EAAWC,GAsBhCC,EAAoBF,EAAW,MAQ5C,SAASA,EAAWG,GAClB,OAUA,SAAeC,GACb,OAAgB,OAATA,GAAiBD,EAAME,KAAKC,OAAOC,aAAaH,GACxD,CACH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const u=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;export{u as unicodePunctuationRegex};
|
|
2
|
+
//# sourceMappingURL=unicode-punctuation-regex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unicode-punctuation-regex.js","sources":["../../../../../../node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character/lib/unicode-punctuation-regex.js"],"sourcesContent":["// This module is generated by `script/`.\n//\n// CommonMark handles attention (emphasis, strong) markers based on what comes\n// before or after them.\n// One such difference is if those characters are Unicode punctuation.\n// This script is generated from the Unicode data.\n\n/**\n * Regular expression that matches a unicode punctuation character.\n */\nexport const unicodePunctuationRegex =\n /[!-\\/:-@\\[-`\\{-~\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061D-\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1B7D\\u1B7E\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4F\\u2E52-\\u2E5D\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]/\n"],"names":["unicodePunctuationRegex"],"mappings":"AAUY,MAACA,EACX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{normalizeIdentifier as t}from"../../micromark-util-normalize-identifier/index.js";import{association as e}from"../../mdast-util-to-markdown/lib/util/association.js";import{containerFlow as n}from"../../mdast-util-to-markdown/lib/util/container-flow.js";import{indentLines as i}from"../../mdast-util-to-markdown/lib/util/indent-lines.js";import{safe as o}from"../../mdast-util-to-markdown/lib/util/safe.js";import{track as r}from"../../mdast-util-to-markdown/lib/util/track.js";function f(){return{enter:{gfmFootnoteDefinition:s,gfmFootnoteDefinitionLabelString:a,gfmFootnoteCall:u,gfmFootnoteCallString:h},exit:{gfmFootnoteDefinition:m,gfmFootnoteDefinitionLabelString:c,gfmFootnoteCall:b,gfmFootnoteCallString:d}}}function l(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:k,footnoteReference:g}}}function s(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function a(){this.buffer()}function c(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.label=n,i.identifier=t(this.sliceSerialize(e)).toLowerCase()}function m(t){this.exit(t)}function u(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function h(){this.buffer()}function d(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.label=n,i.identifier=t(this.sliceSerialize(e)).toLowerCase()}function b(t){this.exit(t)}function g(t,n,i,f){const l=r(f);let s=l.move("[^");const a=i.enter("footnoteReference"),c=i.enter("reference");return s+=l.move(o(i,e(t),{...l.current(),before:s,after:"]"})),c(),a(),s+=l.move("]"),s}function k(t,f,l,s){const a=r(s);let c=a.move("[^");const m=l.enter("footnoteDefinition"),u=l.enter("label");return c+=a.move(o(l,e(t),{...a.current(),before:c,after:"]"})),u(),c+=a.move("]:"+(t.children&&t.children.length>0?" ":"")),a.shift(4),c+=a.move(i(n(t,l,a.current()),p)),m(),c}function p(t,e,n){return 0===e?t:(n?"":" ")+t}g.peek=function(){return"["};export{f as gfmFootnoteFromMarkdown,l as gfmFootnoteToMarkdown};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm-footnote/lib/index.js"],"sourcesContent":["/**\n * @import
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm-footnote/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').FootnoteReference} FootnoteReference\n * @typedef {import('mdast').FootnoteDefinition} FootnoteDefinition\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Map} Map\n */\n\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {association} from 'mdast-util-to-markdown/lib/util/association.js'\nimport {containerFlow} from 'mdast-util-to-markdown/lib/util/container-flow.js'\nimport {indentLines} from 'mdast-util-to-markdown/lib/util/indent-lines.js'\nimport {safe} from 'mdast-util-to-markdown/lib/util/safe.js'\nimport {track} from 'mdast-util-to-markdown/lib/util/track.js'\n\nfootnoteReference.peek = footnoteReferencePeek\n\n// To do: next major: rename `context` -> `state`, `safeOptions` to `info`, use\n// utilities on `state`.\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown`.\n */\nexport function gfmFootnoteFromMarkdown() {\n return {\n enter: {\n gfmFootnoteDefinition: enterFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,\n gfmFootnoteCall: enterFootnoteCall,\n gfmFootnoteCallString: enterFootnoteCallString\n },\n exit: {\n gfmFootnoteDefinition: exitFootnoteDefinition,\n gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,\n gfmFootnoteCall: exitFootnoteCall,\n gfmFootnoteCallString: exitFootnoteCallString\n }\n }\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM footnotes\n * in markdown.\n *\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown`.\n */\nexport function gfmFootnoteToMarkdown() {\n return {\n // This is on by default already.\n unsafe: [{character: '[', inConstruct: ['phrasing', 'label', 'reference']}],\n handlers: {footnoteDefinition, footnoteReference}\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinition(token) {\n this.enter(\n {type: 'footnoteDefinition', identifier: '', label: '', children: []},\n token\n )\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteDefinitionLabelString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinitionLabelString(token) {\n const label = this.resume()\n const node = /** @type {FootnoteDefinition} */ (\n this.stack[this.stack.length - 1]\n )\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteDefinition(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCall(token) {\n this.enter({type: 'footnoteReference', identifier: '', label: ''}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterFootnoteCallString() {\n this.buffer()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCallString(token) {\n const label = this.resume()\n const node = /** @type {FootnoteDefinition} */ (\n this.stack[this.stack.length - 1]\n )\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitFootnoteCall(token) {\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteReference} node\n */\nfunction footnoteReference(node, _, context, safeOptions) {\n const tracker = track(safeOptions)\n let value = tracker.move('[^')\n const exit = context.enter('footnoteReference')\n const subexit = context.enter('reference')\n value += tracker.move(\n safe(context, association(node), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n exit()\n value += tracker.move(']')\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction footnoteReferencePeek() {\n return '['\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {FootnoteDefinition} node\n */\nfunction footnoteDefinition(node, _, context, safeOptions) {\n const tracker = track(safeOptions)\n let value = tracker.move('[^')\n const exit = context.enter('footnoteDefinition')\n const subexit = context.enter('label')\n value += tracker.move(\n safe(context, association(node), {\n ...tracker.current(),\n before: value,\n after: ']'\n })\n )\n subexit()\n value += tracker.move(\n ']:' + (node.children && node.children.length > 0 ? ' ' : '')\n )\n tracker.shift(4)\n value += tracker.move(\n indentLines(containerFlow(node, context, tracker.current()), map)\n )\n exit()\n\n return value\n}\n\n/** @type {Map} */\nfunction map(line, index, blank) {\n if (index === 0) {\n return line\n }\n\n return (blank ? '' : ' ') + line\n}\n"],"names":["gfmFootnoteFromMarkdown","enter","gfmFootnoteDefinition","enterFootnoteDefinition","gfmFootnoteDefinitionLabelString","enterFootnoteDefinitionLabelString","gfmFootnoteCall","enterFootnoteCall","gfmFootnoteCallString","enterFootnoteCallString","exit","exitFootnoteDefinition","exitFootnoteDefinitionLabelString","exitFootnoteCall","exitFootnoteCallString","gfmFootnoteToMarkdown","unsafe","character","inConstruct","handlers","footnoteDefinition","footnoteReference","token","this","type","identifier","label","children","buffer","resume","node","stack","length","normalizeIdentifier","sliceSerialize","toLowerCase","_","context","safeOptions","tracker","track","value","move","subexit","safe","association","current","before","after","shift","indentLines","containerFlow","map","line","index","blank","peek"],"mappings":"oeA8BO,SAASA,IACd,MAAO,CACLC,MAAO,CACLC,sBAAuBC,EACvBC,iCAAkCC,EAClCC,gBAAiBC,EACjBC,sBAAuBC,GAEzBC,KAAM,CACJR,sBAAuBS,EACvBP,iCAAkCQ,EAClCN,gBAAiBO,EACjBL,sBAAuBM,GAG7B,CASO,SAASC,IACd,MAAO,CAELC,OAAQ,CAAC,CAACC,UAAW,IAAKC,YAAa,CAAC,WAAY,QAAS,eAC7DC,SAAU,CAACC,qBAAoBC,qBAEnC,CAMA,SAASlB,EAAwBmB,GAC/BC,KAAKtB,MACH,CAACuB,KAAM,qBAAsBC,WAAY,GAAIC,MAAO,GAAIC,SAAU,IAClEL,EAEJ,CAMA,SAASjB,IACPkB,KAAKK,QACP,CAMA,SAAShB,EAAkCU,GACzC,MAAMI,EAAQH,KAAKM,SACbC,EACJP,KAAKQ,MAAMR,KAAKQ,MAAMC,OAAS,GAEjCF,EAAKJ,MAAQA,EACbI,EAAKL,WAAaQ,EAChBV,KAAKW,eAAeZ,IACpBa,aACJ,CAMA,SAASxB,EAAuBW,GAC9BC,KAAKb,KAAKY,EACZ,CAMA,SAASf,EAAkBe,GACzBC,KAAKtB,MAAM,CAACuB,KAAM,oBAAqBC,WAAY,GAAIC,MAAO,IAAKJ,EACrE,CAMA,SAASb,IACPc,KAAKK,QACP,CAMA,SAASd,EAAuBQ,GAC9B,MAAMI,EAAQH,KAAKM,SACbC,EACJP,KAAKQ,MAAMR,KAAKQ,MAAMC,OAAS,GAEjCF,EAAKJ,MAAQA,EACbI,EAAKL,WAAaQ,EAChBV,KAAKW,eAAeZ,IACpBa,aACJ,CAMA,SAAStB,EAAiBS,GACxBC,KAAKb,KAAKY,EACZ,CAMA,SAASD,EAAkBS,EAAMM,EAAGC,EAASC,GAC3C,MAAMC,EAAUC,EAAMF,GACtB,IAAIG,EAAQF,EAAQG,KAAK,MACzB,MAAMhC,EAAO2B,EAAQpC,MAAM,qBACrB0C,EAAUN,EAAQpC,MAAM,aAW9B,OAVAwC,GAASF,EAAQG,KACfE,EAAKP,EAASQ,EAAYf,GAAO,IAC5BS,EAAQO,UACXC,OAAQN,EACRO,MAAO,OAGXL,IACAjC,IACA+B,GAASF,EAAQG,KAAK,KACfD,CACT,CAWA,SAASrB,EAAmBU,EAAMM,EAAGC,EAASC,GAC5C,MAAMC,EAAUC,EAAMF,GACtB,IAAIG,EAAQF,EAAQG,KAAK,MACzB,MAAMhC,EAAO2B,EAAQpC,MAAM,sBACrB0C,EAAUN,EAAQpC,MAAM,SAkB9B,OAjBAwC,GAASF,EAAQG,KACfE,EAAKP,EAASQ,EAAYf,GAAO,IAC5BS,EAAQO,UACXC,OAAQN,EACRO,MAAO,OAGXL,IACAF,GAASF,EAAQG,KACf,MAAQZ,EAAKH,UAAYG,EAAKH,SAASK,OAAS,EAAI,IAAM,KAE5DO,EAAQU,MAAM,GACdR,GAASF,EAAQG,KACfQ,EAAYC,EAAcrB,EAAMO,EAASE,EAAQO,WAAYM,IAE/D1C,IAEO+B,CACT,CAGA,SAASW,EAAIC,EAAMC,EAAOC,GACxB,OAAc,IAAVD,EACKD,GAGDE,EAAQ,GAAK,QAAUF,CACjC,CA5LAhC,EAAkBmC,KAoJlB,WACE,MAAO,GACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{containerPhrasing as t}from"../../mdast-util-to-markdown/lib/util/container-phrasing.js";import{track as e}from"../../mdast-util-to-markdown/lib/util/track.js";i.peek=function(){return"~"};const n={canContainEols:["delete"],enter:{strikethrough:function(t){this.enter({type:"delete",children:[]},t)}},exit:{strikethrough:function(t){this.exit(t)}}},r={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"]}],handlers:{delete:i}};function i(n,r,i,o){const s=e(o),a=i.enter("strikethrough");let u=s.move("~~");return u+=t(n,i,{...s.current(),before:u,after:"~"}),u+=s.move("~~"),a(),u}export{n as gfmStrikethroughFromMarkdown,r as gfmStrikethroughToMarkdown};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm-strikethrough/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Delete} Delete\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm-strikethrough/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Delete} Delete\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').ConstructName} ConstructName\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\nimport {containerPhrasing} from 'mdast-util-to-markdown/lib/util/container-phrasing.js'\nimport {track} from 'mdast-util-to-markdown/lib/util/track.js'\n\n// To do: next major: expose functions.\n// To do: next major: use `state`, state utilities.\n\n/**\n * List of constructs that occur in phrasing (paragraphs, headings), but cannot\n * contain strikethrough.\n * So they sort of cancel each other out.\n * Note: could use a better name.\n *\n * Note: keep in sync with: <https://github.com/syntax-tree/mdast-util-to-markdown/blob/8ce8dbf/lib/unsafe.js#L14>\n *\n * @type {Array<ConstructName>}\n */\nconst constructsWithoutStrikethrough = [\n 'autolink',\n 'destinationLiteral',\n 'destinationRaw',\n 'reference',\n 'titleQuote',\n 'titleApostrophe'\n]\n\nhandleDelete.peek = peekDelete\n\n/**\n * Extension for `mdast-util-from-markdown` to enable GFM strikethrough.\n *\n * @type {FromMarkdownExtension}\n */\nexport const gfmStrikethroughFromMarkdown = {\n canContainEols: ['delete'],\n enter: {strikethrough: enterStrikethrough},\n exit: {strikethrough: exitStrikethrough}\n}\n\n/**\n * Extension for `mdast-util-to-markdown` to enable GFM strikethrough.\n *\n * @type {ToMarkdownExtension}\n */\nexport const gfmStrikethroughToMarkdown = {\n unsafe: [\n {\n character: '~',\n inConstruct: 'phrasing',\n notInConstruct: constructsWithoutStrikethrough\n }\n ],\n handlers: {delete: handleDelete}\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterStrikethrough(token) {\n this.enter({type: 'delete', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitStrikethrough(token) {\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {Delete} node\n */\nfunction handleDelete(node, _, context, safeOptions) {\n const tracker = track(safeOptions)\n const exit = context.enter('strikethrough')\n let value = tracker.move('~~')\n value += containerPhrasing(node, context, {\n ...tracker.current(),\n before: value,\n after: '~'\n })\n value += tracker.move('~~')\n exit()\n return value\n}\n\n/** @type {ToMarkdownHandle} */\nfunction peekDelete() {\n return '~'\n}\n"],"names":["handleDelete","peek","gfmStrikethroughFromMarkdown","canContainEols","enter","strikethrough","token","this","type","children","exit","gfmStrikethroughToMarkdown","unsafe","character","inConstruct","notInConstruct","handlers","delete","node","_","context","safeOptions","tracker","track","value","move","containerPhrasing","current","before","after"],"mappings":"uKAqCAA,EAAaC,KAgEb,WACE,MAAO,GACT,EA3DY,MAACC,EAA+B,CAC1CC,eAAgB,CAAC,UACjBC,MAAO,CAACC,cAwBV,SAA4BC,GAC1BC,KAAKH,MAAM,CAACI,KAAM,SAAUC,SAAU,IAAKH,EAC7C,GAzBEI,KAAM,CAACL,cA+BT,SAA2BC,GACzBC,KAAKG,KAAKJ,EACZ,IAzBaK,EAA6B,CACxCC,OAAQ,CACN,CACEC,UAAW,IACXC,YAAa,WACbC,eAhCiC,CACrC,WACA,qBACA,iBACA,YACA,aACA,qBA6BAC,SAAU,CAACC,OAAQjB,IAuBrB,SAASA,EAAakB,EAAMC,EAAGC,EAASC,GACtC,MAAMC,EAAUC,EAAMF,GAChBX,EAAOU,EAAQhB,MAAM,iBAC3B,IAAIoB,EAAQF,EAAQG,KAAK,MAQzB,OAPAD,GAASE,EAAkBR,EAAME,EAAS,IACrCE,EAAQK,UACXC,OAAQJ,EACRK,MAAO,MAETL,GAASF,EAAQG,KAAK,MACtBf,IACOc,CACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{containerPhrasing as t}from"../../mdast-util-to-markdown/lib/util/container-phrasing.js";import{inlineCode as e}from"../../mdast-util-to-markdown/lib/handle/inline-code.js";import{markdownTable as n}from"../../markdown-table/index.js";const a={enter:{table:function(t){const e=t._align;this.enter({type:"table",align:e.map((t=>"none"===t?null:t)),children:[]},t),this.setData("inTable",!0)},tableData:l,tableHeader:l,tableRow:function(t){this.enter({type:"tableRow",children:[]},t)}},exit:{codeText:function(t){let e=this.resume();this.getData("inTable")&&(e=e.replace(/\\([\\|])/g,i));this.stack[this.stack.length-1].value=e,this.exit(t)},table:function(t){this.exit(t),this.setData("inTable")},tableData:r,tableHeader:r,tableRow:r}};function r(t){this.exit(t)}function l(t){this.enter({type:"tableCell",children:[]},t)}function i(t,e){return"|"===e?e:t}function c(a){const r=a||{},l=r.tableCellPadding,i=r.tablePipeAlign,c=r.stringLength,o=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(t,e,n,a){return u(function(t,e,n){const a=t.children;let r=-1;const l=[],i=e.enter("table");for(;++r<a.length;)l[r]=h(a[r],e,n);return i(),l}(t,n,a),t.align)},tableRow:function(t,e,n,a){const r=u([h(t,n,a)]);return r.slice(0,r.indexOf("\n"))},tableCell:s,inlineCode:function(t,n,a){let r=e(t,n,a);a.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r}}};function s(e,n,a,r){const l=a.enter("tableCell"),i=a.enter("phrasing"),c=t(e,a,{...r,before:o,after:o});return i(),l(),c}function u(t,e){return n(t,{align:e,alignDelimiters:i,padding:l,stringLength:c})}function h(t,e,n){const a=t.children;let r=-1;const l=[],i=e.enter("tableRow");for(;++r<a.length;)l[r]=s(a[r],0,e,n);return i(),l}}export{a as gfmTableFromMarkdown,c as gfmTableToMarkdown};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm-table/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Table} Table\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('mdast').TableRow} TableRow\n *\n * @typedef {import('markdown-table').Options} MarkdownTableOptions\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').State} State\n * @typedef {import('mdast-util-to-markdown').Info} Info\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [tableCellPadding=true]\n * Whether to add a space of padding between delimiters and cells (default:\n * `true`).\n * @property {boolean | null | undefined} [tablePipeAlign=true]\n * Whether to align the delimiters (default: `true`).\n * @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]\n * Function to detect the length of table cell content, used when aligning\n * the delimiters between cells (optional).\n */\n\nimport {ok as assert} from 'devlop'\nimport {markdownTable} from 'markdown-table'\nimport {defaultHandlers} from 'mdast-util-to-markdown'\n\n/**\n * Create an extension for `mdast-util-from-markdown` to enable GFM tables in\n * markdown.\n *\n * @returns {FromMarkdownExtension}\n * Extension for `mdast-util-from-markdown` to enable GFM tables.\n */\nexport function gfmTableFromMarkdown() {\n return {\n enter: {\n table: enterTable,\n tableData: enterCell,\n tableHeader: enterCell,\n tableRow: enterRow\n },\n exit: {\n codeText: exitCodeText,\n table: exitTable,\n tableData: exit,\n tableHeader: exit,\n tableRow: exit\n }\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterTable(token) {\n const align = token._align\n assert(align, 'expected `_align` on table')\n this.enter(\n {\n type: 'table',\n align: align.map(function (d) {\n return d === 'none' ? null : d\n }),\n children: []\n },\n token\n )\n this.data.inTable = true\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitTable(token) {\n this.exit(token)\n this.data.inTable = undefined\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterRow(token) {\n this.enter({type: 'tableRow', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exit(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterCell(token) {\n this.enter({type: 'tableCell', children: []}, token)\n}\n\n// Overwrite the default code text data handler to unescape escaped pipes when\n// they are in tables.\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCodeText(token) {\n let value = this.resume()\n\n if (this.data.inTable) {\n value = value.replace(/\\\\([\\\\|])/g, replace)\n }\n\n const node = this.stack[this.stack.length - 1]\n assert(node.type === 'inlineCode')\n node.value = value\n this.exit(token)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @returns {string}\n */\nfunction replace($0, $1) {\n // Pipes work, backslashes don’t (but can’t escape pipes).\n return $1 === '|' ? $1 : $0\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM tables in\n * markdown.\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM tables.\n */\nexport function gfmTableToMarkdown(options) {\n const settings = options || {}\n const padding = settings.tableCellPadding\n const alignDelimiters = settings.tablePipeAlign\n const stringLength = settings.stringLength\n const around = padding ? ' ' : '|'\n\n return {\n unsafe: [\n {character: '\\r', inConstruct: 'tableCell'},\n {character: '\\n', inConstruct: 'tableCell'},\n // A pipe, when followed by a tab or space (padding), or a dash or colon\n // (unpadded delimiter row), could result in a table.\n {atBreak: true, character: '|', after: '[\\t :-]'},\n // A pipe in a cell must be encoded.\n {character: '|', inConstruct: 'tableCell'},\n // A colon must be followed by a dash, in which case it could start a\n // delimiter row.\n {atBreak: true, character: ':', after: '-'},\n // A delimiter row can also start with a dash, when followed by more\n // dashes, a colon, or a pipe.\n // This is a stricter version than the built in check for lists, thematic\n // breaks, and setex heading underlines though:\n // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>\n {atBreak: true, character: '-', after: '[:|-]'}\n ],\n handlers: {\n inlineCode: inlineCodeWithTable,\n table: handleTable,\n tableCell: handleTableCell,\n tableRow: handleTableRow\n }\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {Table} node\n */\n function handleTable(node, _, state, info) {\n return serializeData(handleTableAsData(node, state, info), node.align)\n }\n\n /**\n * This function isn’t really used normally, because we handle rows at the\n * table level.\n * But, if someone passes in a table row, this ensures we make somewhat sense.\n *\n * @type {ToMarkdownHandle}\n * @param {TableRow} node\n */\n function handleTableRow(node, _, state, info) {\n const row = handleTableRowAsData(node, state, info)\n const value = serializeData([row])\n // `markdown-table` will always add an align row\n return value.slice(0, value.indexOf('\\n'))\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {TableCell} node\n */\n function handleTableCell(node, _, state, info) {\n const exit = state.enter('tableCell')\n const subexit = state.enter('phrasing')\n const value = state.containerPhrasing(node, {\n ...info,\n before: around,\n after: around\n })\n subexit()\n exit()\n return value\n }\n\n /**\n * @param {Array<Array<string>>} matrix\n * @param {Array<string | null | undefined> | null | undefined} [align]\n */\n function serializeData(matrix, align) {\n return markdownTable(matrix, {\n align,\n // @ts-expect-error: `markdown-table` types should support `null`.\n alignDelimiters,\n // @ts-expect-error: `markdown-table` types should support `null`.\n padding,\n // @ts-expect-error: `markdown-table` types should support `null`.\n stringLength\n })\n }\n\n /**\n * @param {Table} node\n * @param {State} state\n * @param {Info} info\n */\n function handleTableAsData(node, state, info) {\n const children = node.children\n let index = -1\n /** @type {Array<Array<string>>} */\n const result = []\n const subexit = state.enter('table')\n\n while (++index < children.length) {\n result[index] = handleTableRowAsData(children[index], state, info)\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @param {TableRow} node\n * @param {State} state\n * @param {Info} info\n */\n function handleTableRowAsData(node, state, info) {\n const children = node.children\n let index = -1\n /** @type {Array<string>} */\n const result = []\n const subexit = state.enter('tableRow')\n\n while (++index < children.length) {\n // Note: the positional info as used here is incorrect.\n // Making it correct would be impossible due to aligning cells?\n // And it would need copy/pasting `markdown-table` into this project.\n result[index] = handleTableCell(children[index], node, state, info)\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {InlineCode} node\n */\n function inlineCodeWithTable(node, parent, state) {\n let value = defaultHandlers.inlineCode(node, parent, state)\n\n if (state.stack.includes('tableCell')) {\n value = value.replace(/\\|/g, '\\\\$&')\n }\n\n return value\n }\n}\n"],"names":["gfmTableFromMarkdown","enter","table","enterTable","tableData","enterCell","tableHeader","tableRow","enterRow","exit","codeText","exitCodeText","exitTable","token","align","_align","this","type","map","d","children","data","inTable","undefined","value","resume","replace","node","stack","length","assert","$0","$1","gfmTableToMarkdown","options","settings","padding","tableCellPadding","alignDelimiters","tablePipeAlign","stringLength","around","unsafe","character","inConstruct","atBreak","after","handlers","inlineCode","parent","state","defaultHandlers","includes","_","info","serializeData","index","result","subexit","handleTableRowAsData","handleTableAsData","tableCell","handleTableCell","slice","indexOf","containerPhrasing","before","matrix","markdownTable"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm-table/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Table} Table\n * @typedef {import('mdast').TableRow} TableRow\n * @typedef {import('mdast').TableCell} TableCell\n * @typedef {import('mdast').InlineCode} InlineCode\n *\n * @typedef {import('markdown-table').MarkdownTableOptions} MarkdownTableOptions\n *\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n *\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Context} ToMarkdownContext\n * @typedef {import('mdast-util-to-markdown').SafeOptions} SafeOptions\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {boolean | null | undefined} [tableCellPadding=true]\n * Whether to add a space of padding between delimiters and cells.\n * @property {boolean | null | undefined} [tablePipeAlign=true]\n * Whether to align the delimiters.\n * @property {MarkdownTableOptions['stringLength'] | null | undefined} [stringLength]\n * Function to detect the length of table cell content, used when aligning\n * the delimiters between cells\n */\n\nimport {containerPhrasing} from 'mdast-util-to-markdown/lib/util/container-phrasing.js'\nimport {inlineCode} from 'mdast-util-to-markdown/lib/handle/inline-code.js'\nimport {markdownTable} from 'markdown-table'\n\n// To do: next major: use `state` and `state` utilities from `mdast-util-to-markdown`.\n// To do: next major: use `defaultHandlers.inlineCode`.\n// To do: next major: expose functions.\n\n/**\n * Extension for `mdast-util-from-markdown` to enable GFM tables.\n *\n * @type {FromMarkdownExtension}\n */\nexport const gfmTableFromMarkdown = {\n enter: {\n table: enterTable,\n tableData: enterCell,\n tableHeader: enterCell,\n tableRow: enterRow\n },\n exit: {\n codeText: exitCodeText,\n table: exitTable,\n tableData: exit,\n tableHeader: exit,\n tableRow: exit\n }\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterTable(token) {\n /** @type {Array<'left' | 'right' | 'center' | 'none'>} */\n // @ts-expect-error: `align` is custom.\n const align = token._align\n this.enter(\n {\n type: 'table',\n align: align.map((d) => (d === 'none' ? null : d)),\n children: []\n },\n token\n )\n this.setData('inTable', true)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitTable(token) {\n this.exit(token)\n this.setData('inTable')\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterRow(token) {\n this.enter({type: 'tableRow', children: []}, token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exit(token) {\n this.exit(token)\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction enterCell(token) {\n this.enter({type: 'tableCell', children: []}, token)\n}\n\n// Overwrite the default code text data handler to unescape escaped pipes when\n// they are in tables.\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCodeText(token) {\n let value = this.resume()\n\n if (this.getData('inTable')) {\n value = value.replace(/\\\\([\\\\|])/g, replace)\n }\n\n const node = /** @type {InlineCode} */ (this.stack[this.stack.length - 1])\n node.value = value\n this.exit(token)\n}\n\n/**\n * @param {string} $0\n * @param {string} $1\n * @returns {string}\n */\nfunction replace($0, $1) {\n // Pipes work, backslashes don’t (but can’t escape pipes).\n return $1 === '|' ? $1 : $0\n}\n\n/**\n * Create an extension for `mdast-util-to-markdown` to enable GFM tables in\n * markdown.\n *\n * @param {Options | null | undefined} [options]\n * Configuration.\n * @returns {ToMarkdownExtension}\n * Extension for `mdast-util-to-markdown` to enable GFM tables.\n */\nexport function gfmTableToMarkdown(options) {\n const settings = options || {}\n const padding = settings.tableCellPadding\n const alignDelimiters = settings.tablePipeAlign\n const stringLength = settings.stringLength\n const around = padding ? ' ' : '|'\n\n return {\n unsafe: [\n {character: '\\r', inConstruct: 'tableCell'},\n {character: '\\n', inConstruct: 'tableCell'},\n // A pipe, when followed by a tab or space (padding), or a dash or colon\n // (unpadded delimiter row), could result in a table.\n {atBreak: true, character: '|', after: '[\\t :-]'},\n // A pipe in a cell must be encoded.\n {character: '|', inConstruct: 'tableCell'},\n // A colon must be followed by a dash, in which case it could start a\n // delimiter row.\n {atBreak: true, character: ':', after: '-'},\n // A delimiter row can also start with a dash, when followed by more\n // dashes, a colon, or a pipe.\n // This is a stricter version than the built in check for lists, thematic\n // breaks, and setex heading underlines though:\n // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>\n {atBreak: true, character: '-', after: '[:|-]'}\n ],\n handlers: {\n table: handleTable,\n tableRow: handleTableRow,\n tableCell: handleTableCell,\n inlineCode: inlineCodeWithTable\n }\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {Table} node\n */\n function handleTable(node, _, context, safeOptions) {\n return serializeData(\n handleTableAsData(node, context, safeOptions),\n node.align\n )\n }\n\n /**\n * This function isn’t really used normally, because we handle rows at the\n * table level.\n * But, if someone passes in a table row, this ensures we make somewhat sense.\n *\n * @type {ToMarkdownHandle}\n * @param {TableRow} node\n */\n function handleTableRow(node, _, context, safeOptions) {\n const row = handleTableRowAsData(node, context, safeOptions)\n const value = serializeData([row])\n // `markdown-table` will always add an align row\n return value.slice(0, value.indexOf('\\n'))\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {TableCell} node\n */\n function handleTableCell(node, _, context, safeOptions) {\n const exit = context.enter('tableCell')\n const subexit = context.enter('phrasing')\n const value = containerPhrasing(node, context, {\n ...safeOptions,\n before: around,\n after: around\n })\n subexit()\n exit()\n return value\n }\n\n /**\n * @param {Array<Array<string>>} matrix\n * @param {Array<string | null | undefined> | null | undefined} [align]\n */\n function serializeData(matrix, align) {\n return markdownTable(matrix, {\n align,\n // @ts-expect-error: `markdown-table` types should support `null`.\n alignDelimiters,\n // @ts-expect-error: `markdown-table` types should support `null`.\n padding,\n // @ts-expect-error: `markdown-table` types should support `null`.\n stringLength\n })\n }\n\n /**\n * @param {Table} node\n * @param {ToMarkdownContext} context\n * @param {SafeOptions} safeOptions\n */\n function handleTableAsData(node, context, safeOptions) {\n const children = node.children\n let index = -1\n /** @type {Array<Array<string>>} */\n const result = []\n const subexit = context.enter('table')\n\n while (++index < children.length) {\n result[index] = handleTableRowAsData(\n children[index],\n context,\n safeOptions\n )\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @param {TableRow} node\n * @param {ToMarkdownContext} context\n * @param {SafeOptions} safeOptions\n */\n function handleTableRowAsData(node, context, safeOptions) {\n const children = node.children\n let index = -1\n /** @type {Array<string>} */\n const result = []\n const subexit = context.enter('tableRow')\n\n while (++index < children.length) {\n // Note: the positional info as used here is incorrect.\n // Making it correct would be impossible due to aligning cells?\n // And it would need copy/pasting `markdown-table` into this project.\n result[index] = handleTableCell(\n children[index],\n node,\n context,\n safeOptions\n )\n }\n\n subexit()\n\n return result\n }\n\n /**\n * @type {ToMarkdownHandle}\n * @param {InlineCode} node\n */\n function inlineCodeWithTable(node, parent, context) {\n let value = inlineCode(node, parent, context)\n\n if (context.stack.includes('tableCell')) {\n value = value.replace(/\\|/g, '\\\\$&')\n }\n\n return value\n }\n}\n"],"names":["gfmTableFromMarkdown","enter","table","token","align","_align","this","type","map","d","children","setData","tableData","enterCell","tableHeader","tableRow","exit","codeText","value","resume","getData","replace","stack","length","$0","$1","gfmTableToMarkdown","options","settings","padding","tableCellPadding","alignDelimiters","tablePipeAlign","stringLength","around","unsafe","character","inConstruct","atBreak","after","handlers","node","_","context","safeOptions","serializeData","index","result","subexit","handleTableRowAsData","handleTableAsData","slice","indexOf","tableCell","handleTableCell","inlineCode","parent","includes","containerPhrasing","before","matrix","markdownTable"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{listItem as t}from"../../mdast-util-to-markdown/lib/handle/list-item.js";import{track as e}from"../../mdast-util-to-markdown/lib/util/track.js";const s={exit:{taskListCheckValueChecked:a,taskListCheckValueUnchecked:a,paragraph:function(t){const e=this.stack[this.stack.length-2];if(e&&"listItem"===e.type&&"boolean"==typeof e.checked){const t=this.stack[this.stack.length-1],s=t.children[0];if(s&&"text"===s.type){const i=e.children;let a,n=-1;for(;++n<i.length;){const t=i[n];if("paragraph"===t.type){a=t;break}}a===t&&(s.value=s.value.slice(1),0===s.value.length?t.children.shift():t.position&&s.position&&"number"==typeof s.position.start.offset&&(s.position.start.column++,s.position.start.offset++,t.position.start=Object.assign({},s.position.start)))}}this.exit(t)}}},i={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:function(s,i,a,n){const o=s.children[0],c="boolean"==typeof s.checked&&o&&"paragraph"===o.type,r="["+(s.checked?"x":" ")+"] ",h=e(n);c&&h.move(r);let l=t(s,i,a,{...n,...h.current()});c&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(t){return t+r})));return l}}};function a(t){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===t.type}export{s as gfmTaskListItemFromMarkdown,i as gfmTaskListItemToMarkdown};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm-task-list-item/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-gfm-task-list-item/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Parent} Parent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast-util-from-markdown').CompileContext} CompileContext\n * @typedef {import('mdast-util-from-markdown').Extension} FromMarkdownExtension\n * @typedef {import('mdast-util-from-markdown').Handle} FromMarkdownHandle\n * @typedef {import('mdast-util-to-markdown').Options} ToMarkdownExtension\n * @typedef {import('mdast-util-to-markdown').Handle} ToMarkdownHandle\n */\n\n/**\n * @typedef {Extract<Root | Content, Parent>} Parents\n */\n\nimport {listItem} from 'mdast-util-to-markdown/lib/handle/list-item.js'\nimport {track} from 'mdast-util-to-markdown/lib/util/track.js'\n\n// To do: next major: rename `context` -> `state`, `safeOptions` -> `info`, use\n// `track` from `state`.\n// To do: next major: replace exports with functions.\n// To do: next major: use `defaulthandlers.listItem`.\n\n/**\n * Extension for `mdast-util-from-markdown` to enable GFM task list items.\n *\n * @type {FromMarkdownExtension}\n */\nexport const gfmTaskListItemFromMarkdown = {\n exit: {\n taskListCheckValueChecked: exitCheck,\n taskListCheckValueUnchecked: exitCheck,\n paragraph: exitParagraphWithTaskListItem\n }\n}\n\n/**\n * Extension for `mdast-util-to-markdown` to enable GFM task list items.\n *\n * @type {ToMarkdownExtension}\n */\nexport const gfmTaskListItemToMarkdown = {\n unsafe: [{atBreak: true, character: '-', after: '[:|-]'}],\n handlers: {listItem: listItemWithTaskListItem}\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitCheck(token) {\n const node = /** @type {ListItem} */ (this.stack[this.stack.length - 2])\n // We’re always in a paragraph, in a list item.\n node.checked = token.type === 'taskListCheckValueChecked'\n}\n\n/**\n * @this {CompileContext}\n * @type {FromMarkdownHandle}\n */\nfunction exitParagraphWithTaskListItem(token) {\n const parent = /** @type {Parents} */ (this.stack[this.stack.length - 2])\n\n if (\n parent &&\n parent.type === 'listItem' &&\n typeof parent.checked === 'boolean'\n ) {\n const node = /** @type {Paragraph} */ (this.stack[this.stack.length - 1])\n const head = node.children[0]\n\n if (head && head.type === 'text') {\n const siblings = parent.children\n let index = -1\n /** @type {Paragraph | undefined} */\n let firstParaghraph\n\n while (++index < siblings.length) {\n const sibling = siblings[index]\n if (sibling.type === 'paragraph') {\n firstParaghraph = sibling\n break\n }\n }\n\n if (firstParaghraph === node) {\n // Must start with a space or a tab.\n head.value = head.value.slice(1)\n\n if (head.value.length === 0) {\n node.children.shift()\n } else if (\n node.position &&\n head.position &&\n typeof head.position.start.offset === 'number'\n ) {\n head.position.start.column++\n head.position.start.offset++\n node.position.start = Object.assign({}, head.position.start)\n }\n }\n }\n }\n\n this.exit(token)\n}\n\n/**\n * @type {ToMarkdownHandle}\n * @param {ListItem} node\n */\nfunction listItemWithTaskListItem(node, parent, context, safeOptions) {\n const head = node.children[0]\n const checkable =\n typeof node.checked === 'boolean' && head && head.type === 'paragraph'\n const checkbox = '[' + (node.checked ? 'x' : ' ') + '] '\n const tracker = track(safeOptions)\n\n if (checkable) {\n tracker.move(checkbox)\n }\n\n let value = listItem(node, parent, context, {\n ...safeOptions,\n ...tracker.current()\n })\n\n if (checkable) {\n value = value.replace(/^(?:[*+-]|\\d+\\.)([\\r\\n]| {1,3})/, check)\n }\n\n return value\n\n /**\n * @param {string} $0\n * @returns {string}\n */\n function check($0) {\n return $0 + checkbox\n }\n}\n"],"names":["gfmTaskListItemFromMarkdown","exit","taskListCheckValueChecked","exitCheck","taskListCheckValueUnchecked","paragraph","token","parent","this","stack","length","type","checked","node","head","children","siblings","firstParaghraph","index","sibling","value","slice","shift","position","start","offset","column","Object","assign","gfmTaskListItemToMarkdown","unsafe","atBreak","character","after","handlers","listItem","context","safeOptions","checkable","checkbox","tracker","track","move","current","replace","$0"],"mappings":"uJA8BY,MAACA,EAA8B,CACzCC,KAAM,CACJC,0BAA2BC,EAC3BC,4BAA6BD,EAC7BE,UA4BJ,SAAuCC,GACrC,MAAMC,EAAiCC,KAAKC,MAAMD,KAAKC,MAAMC,OAAS,GAEtE,GACEH,GACgB,aAAhBA,EAAOI,MACmB,kBAAnBJ,EAAOK,QACd,CACA,MAAMC,EAAiCL,KAAKC,MAAMD,KAAKC,MAAMC,OAAS,GAChEI,EAAOD,EAAKE,SAAS,GAE3B,GAAID,GAAsB,SAAdA,EAAKH,KAAiB,CAChC,MAAMK,EAAWT,EAAOQ,SACxB,IAEIE,EAFAC,GAAS,EAIb,OAASA,EAAQF,EAASN,QAAQ,CAChC,MAAMS,EAAUH,EAASE,GACzB,GAAqB,cAAjBC,EAAQR,KAAsB,CAChCM,EAAkBE,EAClB,KACD,CACF,CAEGF,IAAoBJ,IAEtBC,EAAKM,MAAQN,EAAKM,MAAMC,MAAM,GAEJ,IAAtBP,EAAKM,MAAMV,OACbG,EAAKE,SAASO,QAEdT,EAAKU,UACLT,EAAKS,UACiC,iBAA/BT,EAAKS,SAASC,MAAMC,SAE3BX,EAAKS,SAASC,MAAME,SACpBZ,EAAKS,SAASC,MAAMC,SACpBZ,EAAKU,SAASC,MAAQG,OAAOC,OAAO,GAAId,EAAKS,SAASC,QAG3D,CACF,CAEDhB,KAAKP,KAAKK,EACZ,IAhEauB,EAA4B,CACvCC,OAAQ,CAAC,CAACC,SAAS,EAAMC,UAAW,IAAKC,MAAO,UAChDC,SAAU,CAACC,SAoEb,SAAkCtB,EAAMN,EAAQ6B,EAASC,GACvD,MAAMvB,EAAOD,EAAKE,SAAS,GACrBuB,EACoB,kBAAjBzB,EAAKD,SAAyBE,GAAsB,cAAdA,EAAKH,KAC9C4B,EAAW,KAAO1B,EAAKD,QAAU,IAAM,KAAO,KAC9C4B,EAAUC,EAAMJ,GAElBC,GACFE,EAAQE,KAAKH,GAGf,IAAInB,EAAQe,EAAStB,EAAMN,EAAQ6B,EAAS,IACvCC,KACAG,EAAQG,YAGTL,IACFlB,EAAQA,EAAMwB,QAAQ,mCASxB,SAAeC,GACb,OAAOA,EAAKN,CACb,KARD,OAAOnB,CAST,IA1FA,SAASjB,EAAUG,GACqBE,KAAKC,MAAMD,KAAKC,MAAMC,OAAS,GAEhEE,QAAyB,8BAAfN,EAAMK,IACvB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
1
|
+
import{patternCompile as e}from"../util/pattern-compile.js";function t(t,n,r){let o=t.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(o);)s+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++i<r.unsafe.length;){const t=r.unsafe[i],n=e(t);let s;if(t.atBreak)for(;s=n.exec(o);){let e=s.index;10===o.charCodeAt(e)&&13===o.charCodeAt(e-1)&&e--,o=o.slice(0,e)+" "+o.slice(s.index+1)}}return s+o+s}t.peek=function(){return"`"};export{t as inlineCode};
|
|
2
2
|
//# sourceMappingURL=inline-code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-code.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js"],"sourcesContent":["/**\n * @
|
|
1
|
+
{"version":3,"file":"inline-code.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/handle/inline-code.js"],"sourcesContent":["/**\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('../types.js').Parent} Parent\n * @typedef {import('../types.js').State} State\n */\n\nimport {patternCompile} from '../util/pattern-compile.js'\n\ninlineCode.peek = inlineCodePeek\n\n/**\n * @param {InlineCode} node\n * @param {Parent | undefined} _\n * @param {State} state\n * @returns {string}\n */\nexport function inlineCode(node, _, state) {\n let value = node.value || ''\n let sequence = '`'\n let index = -1\n\n // If there is a single grave accent on its own in the code, use a fence of\n // two.\n // If there are two in a row, use one.\n while (new RegExp('(^|[^`])' + sequence + '([^`]|$)').test(value)) {\n sequence += '`'\n }\n\n // If this is not just spaces or eols (tabs don’t count), and either the\n // first or last character are a space, eol, or tick, then pad with spaces.\n if (\n /[^ \\r\\n]/.test(value) &&\n ((/^[ \\r\\n]/.test(value) && /[ \\r\\n]$/.test(value)) || /^`|`$/.test(value))\n ) {\n value = ' ' + value + ' '\n }\n\n // We have a potential problem: certain characters after eols could result in\n // blocks being seen.\n // For example, if someone injected the string `'\\n# b'`, then that would\n // result in an ATX heading.\n // We can’t escape characters in `inlineCode`, but because eols are\n // transformed to spaces when going from markdown to HTML anyway, we can swap\n // them out.\n while (++index < state.unsafe.length) {\n const pattern = state.unsafe[index]\n const expression = patternCompile(pattern)\n /** @type {RegExpExecArray | null} */\n let match\n\n // Only look for `atBreak`s.\n // Btw: note that `atBreak` patterns will always start the regex at LF or\n // CR.\n if (!pattern.atBreak) continue\n\n while ((match = expression.exec(value))) {\n let position = match.index\n\n // Support CRLF (patterns only look for one of the characters).\n if (\n value.charCodeAt(position) === 10 /* `\\n` */ &&\n value.charCodeAt(position - 1) === 13 /* `\\r` */\n ) {\n position--\n }\n\n value = value.slice(0, position) + ' ' + value.slice(match.index + 1)\n }\n }\n\n return sequence + value + sequence\n}\n\n/**\n * @returns {string}\n */\nfunction inlineCodePeek() {\n return '`'\n}\n"],"names":["inlineCode","node","_","state","value","sequence","index","RegExp","test","unsafe","length","pattern","expression","patternCompile","match","atBreak","exec","position","charCodeAt","slice","peek"],"mappings":"4DAgBO,SAASA,EAAWC,EAAMC,EAAGC,GAClC,IAAIC,EAAQH,EAAKG,OAAS,GACtBC,EAAW,IACXC,GAAS,EAKb,KAAO,IAAIC,OAAO,WAAaF,EAAW,YAAYG,KAAKJ,IACzDC,GAAY,IAmBd,IAbE,WAAWG,KAAKJ,KACd,WAAWI,KAAKJ,IAAU,WAAWI,KAAKJ,IAAW,QAAQI,KAAKJ,MAEpEA,EAAQ,IAAMA,EAAQ,OAUfE,EAAQH,EAAMM,OAAOC,QAAQ,CACpC,MAAMC,EAAUR,EAAMM,OAAOH,GACvBM,EAAaC,EAAeF,GAElC,IAAIG,EAKJ,GAAKH,EAAQI,QAEb,KAAQD,EAAQF,EAAWI,KAAKZ,IAAS,CACvC,IAAIa,EAAWH,EAAMR,MAIY,KAA/BF,EAAMc,WAAWD,IACkB,KAAnCb,EAAMc,WAAWD,EAAW,IAE5BA,IAGFb,EAAQA,EAAMe,MAAM,EAAGF,GAAY,IAAMb,EAAMe,MAAML,EAAMR,MAAQ,EACpE,CACF,CAED,OAAOD,EAAWD,EAAQC,CAC5B,CA/DAL,EAAWoB,KAoEX,WACE,MAAO,GACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/handle/list-item.js"],"sourcesContent":["/**\n * @import {
|
|
1
|
+
{"version":3,"file":"list-item.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/handle/list-item.js"],"sourcesContent":["/**\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('../types.js').Map} Map\n * @typedef {import('../types.js').Parent} Parent\n * @typedef {import('../types.js').State} State\n * @typedef {import('../types.js').Info} Info\n */\n\nimport {checkBullet} from '../util/check-bullet.js'\nimport {checkListItemIndent} from '../util/check-list-item-indent.js'\n\n/**\n * @param {ListItem} node\n * @param {Parent | undefined} parent\n * @param {State} state\n * @param {Info} info\n * @returns {string}\n */\nexport function listItem(node, parent, state, info) {\n const listItemIndent = checkListItemIndent(state)\n let bullet = state.bulletCurrent || checkBullet(state)\n\n // Add the marker value for ordered lists.\n if (parent && parent.type === 'list' && parent.ordered) {\n bullet =\n (typeof parent.start === 'number' && parent.start > -1\n ? parent.start\n : 1) +\n (state.options.incrementListMarker === false\n ? 0\n : parent.children.indexOf(node)) +\n bullet\n }\n\n let size = bullet.length + 1\n\n if (\n listItemIndent === 'tab' ||\n (listItemIndent === 'mixed' &&\n ((parent && parent.type === 'list' && parent.spread) || node.spread))\n ) {\n size = Math.ceil(size / 4) * 4\n }\n\n const tracker = state.createTracker(info)\n tracker.move(bullet + ' '.repeat(size - bullet.length))\n tracker.shift(size)\n const exit = state.enter('listItem')\n const value = state.indentLines(\n state.containerFlow(node, tracker.current()),\n map\n )\n exit()\n\n return value\n\n /** @type {Map} */\n function map(line, index, blank) {\n if (index) {\n return (blank ? '' : ' '.repeat(size)) + line\n }\n\n return (blank ? bullet : bullet + ' '.repeat(size - bullet.length)) + line\n }\n}\n"],"names":["listItem","node","parent","state","info","listItemIndent","checkListItemIndent","bullet","bulletCurrent","checkBullet","type","ordered","start","options","incrementListMarker","children","indexOf","size","length","spread","Math","ceil","tracker","createTracker","move","repeat","shift","exit","enter","value","indentLines","containerFlow","current","line","index","blank"],"mappings":"8HAkBO,SAASA,EAASC,EAAMC,EAAQC,EAAOC,GAC5C,MAAMC,EAAiBC,EAAoBH,GAC3C,IAAII,EAASJ,EAAMK,eAAiBC,EAAYN,GAG5CD,GAA0B,SAAhBA,EAAOQ,MAAmBR,EAAOS,UAC7CJ,GAC2B,iBAAjBL,EAAOU,OAAsBV,EAAOU,OAAS,EACjDV,EAAOU,MACP,KACmC,IAAtCT,EAAMU,QAAQC,oBACX,EACAZ,EAAOa,SAASC,QAAQf,IAC5BM,GAGJ,IAAIU,EAAOV,EAAOW,OAAS,GAGN,QAAnBb,GACoB,UAAnBA,IACGH,GAA0B,SAAhBA,EAAOQ,MAAmBR,EAAOiB,QAAWlB,EAAKkB,WAE/DF,EAA6B,EAAtBG,KAAKC,KAAKJ,EAAO,IAG1B,MAAMK,EAAUnB,EAAMoB,cAAcnB,GACpCkB,EAAQE,KAAKjB,EAAS,IAAIkB,OAAOR,EAAOV,EAAOW,SAC/CI,EAAQI,MAAMT,GACd,MAAMU,EAAOxB,EAAMyB,MAAM,YACnBC,EAAQ1B,EAAM2B,YAClB3B,EAAM4B,cAAc9B,EAAMqB,EAAQU,YAQpC,SAAaC,EAAMC,EAAOC,GACxB,GAAID,EACF,OAAQC,EAAQ,GAAK,IAAIV,OAAOR,IAASgB,EAG3C,OAAQE,EAAQ5B,EAASA,EAAS,IAAIkB,OAAOR,EAAOV,EAAOW,SAAWe,CACvE,IATD,OAFAN,IAEOE,CAUT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"association.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/association.js"],"sourcesContent":["/**\n * @typedef {import('../types.js').AssociationId} AssociationId\n */\n\nimport {decodeString} from 'micromark-util-decode-string'\n\n/**\n * Get an identifier from an association to match it to others.\n *\n * Associations are nodes that match to something else through an ID:\n * <https://github.com/syntax-tree/mdast#association>.\n *\n * The `label` of an association is the string value: character escapes and\n * references work, and casing is intact.\n * The `identifier` is used to match one association to another:\n * controversially, character escapes and references don’t work in this\n * matching: `©` does not match `©`, and `\\+` does not match `+`.\n *\n * But casing is ignored (and whitespace) is trimmed and collapsed: ` A\\nb`\n * matches `a b`.\n * So, we do prefer the label when figuring out how we’re going to serialize:\n * it has whitespace, casing, and we can ignore most useless character\n * escapes and all character references.\n *\n * @type {AssociationId}\n */\nexport function association(node) {\n if (node.label || !node.identifier) {\n return node.label || ''\n }\n\n return decodeString(node.identifier)\n}\n"],"names":["association","node","label","identifier","decodeString"],"mappings":"8EA0BO,SAASA,EAAYC,GAC1B,OAAIA,EAAKC,QAAUD,EAAKE,WACfF,EAAKC,OAAS,GAGhBE,EAAaH,EAAKE,WAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-bullet.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js"],"sourcesContent":["/**\n * @
|
|
1
|
+
{"version":3,"file":"check-bullet.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/check-bullet.js"],"sourcesContent":["/**\n * @typedef {import('../types.js').State} State\n * @typedef {import('../types.js').Options} Options\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['bullet'], null | undefined>}\n */\nexport function checkBullet(state) {\n const marker = state.options.bullet || '*'\n\n if (marker !== '*' && marker !== '+' && marker !== '-') {\n throw new Error(\n 'Cannot serialize items with `' +\n marker +\n '` for `options.bullet`, expected `*`, `+`, or `-`'\n )\n }\n\n return marker\n}\n"],"names":["checkBullet","state","marker","options","bullet","Error"],"mappings":"AASO,SAASA,EAAYC,GAC1B,MAAMC,EAASD,EAAME,QAAQC,QAAU,IAEvC,GAAe,MAAXF,GAA6B,MAAXA,GAA6B,MAAXA,EACtC,MAAM,IAAIG,MACR,gCACEH,EACA,qDAIN,OAAOA,CACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function t(t){const e=t.options.listItemIndent||"one";if("tab"!==e&&"one"!==e&&"mixed"!==e)throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}export{t as checkListItemIndent};
|
|
1
|
+
function t(t){const e=t.options.listItemIndent||"tab";if(1===e||"1"===e)return"one";if("tab"!==e&&"one"!==e&&"mixed"!==e)throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}export{t as checkListItemIndent};
|
|
2
2
|
//# sourceMappingURL=check-list-item-indent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-list-item-indent.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js"],"sourcesContent":["/**\n * @
|
|
1
|
+
{"version":3,"file":"check-list-item-indent.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js"],"sourcesContent":["/**\n * @typedef {import('../types.js').State} State\n * @typedef {import('../types.js').Options} Options\n */\n\n/**\n * @param {State} state\n * @returns {Exclude<Options['listItemIndent'], null | undefined>}\n */\nexport function checkListItemIndent(state) {\n const style = state.options.listItemIndent || 'tab'\n\n // To do: remove in a major.\n // @ts-expect-error: deprecated.\n if (style === 1 || style === '1') {\n return 'one'\n }\n\n if (style !== 'tab' && style !== 'one' && style !== 'mixed') {\n throw new Error(\n 'Cannot serialize items with `' +\n style +\n '` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`'\n )\n }\n\n return style\n}\n"],"names":["checkListItemIndent","state","style","options","listItemIndent","Error"],"mappings":"AASO,SAASA,EAAoBC,GAClC,MAAMC,EAAQD,EAAME,QAAQC,gBAAkB,MAI9C,GAAc,IAAVF,GAAyB,MAAVA,EACjB,MAAO,MAGT,GAAc,QAAVA,GAA6B,QAAVA,GAA6B,UAAVA,EACxC,MAAM,IAAIG,MACR,gCACEH,EACA,qEAIN,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e,t,r){const o=t.indexStack,i=e.children||[],u=t.createTracker(r),c=[];let l=-1;for(o.push(-1);++l<i.length;){const r=i[l];o[o.length-1]=l,c.push(u.move(t.handle(r,e,t,{before:"\n",after:"\n",...u.current()}))),"list"!==r.type&&(t.bulletLastUsed=void 0),l<i.length-1&&c.push(u.move(n(r,i[l+1],e,t)))}return o.pop(),c.join("")}function n(e,n,t,r){let o=r.join.length;for(;o--;){const i=r.join[o](e,n,t,r);if(!0===i||1===i)break;if("number"==typeof i)return"\n".repeat(1+i);if(!1===i)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}export{e as containerFlow};
|
|
2
|
+
//# sourceMappingURL=container-flow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-flow.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/container-flow.js"],"sourcesContent":["/**\n * @typedef {import('../types.js').FlowContent} FlowContent\n * @typedef {import('../types.js').Node} Node\n * @typedef {import('../types.js').Parent} Parent\n * @typedef {import('../types.js').State} State\n * @typedef {import('../types.js').TrackFields} TrackFields\n */\n\n/**\n * @param {Parent & {children: Array<FlowContent>}} parent\n * Parent of flow nodes.\n * @param {State} state\n * Info passed around about the current state.\n * @param {TrackFields} info\n * Info on where we are in the document we are generating.\n * @returns {string}\n * Serialized children, joined by (blank) lines.\n */\nexport function containerFlow(parent, state, info) {\n const indexStack = state.indexStack\n const children = parent.children || []\n const tracker = state.createTracker(info)\n /** @type {Array<string>} */\n const results = []\n let index = -1\n\n indexStack.push(-1)\n\n while (++index < children.length) {\n const child = children[index]\n\n indexStack[indexStack.length - 1] = index\n\n results.push(\n tracker.move(\n state.handle(child, parent, state, {\n before: '\\n',\n after: '\\n',\n ...tracker.current()\n })\n )\n )\n\n if (child.type !== 'list') {\n state.bulletLastUsed = undefined\n }\n\n if (index < children.length - 1) {\n results.push(\n tracker.move(between(child, children[index + 1], parent, state))\n )\n }\n }\n\n indexStack.pop()\n\n return results.join('')\n}\n\n/**\n * @param {Node} left\n * @param {Node} right\n * @param {Parent} parent\n * @param {State} state\n * @returns {string}\n */\nfunction between(left, right, parent, state) {\n let index = state.join.length\n\n while (index--) {\n const result = state.join[index](left, right, parent, state)\n\n if (result === true || result === 1) {\n break\n }\n\n if (typeof result === 'number') {\n return '\\n'.repeat(1 + result)\n }\n\n if (result === false) {\n return '\\n\\n<!---->\\n\\n'\n }\n }\n\n return '\\n\\n'\n}\n"],"names":["containerFlow","parent","state","info","indexStack","children","tracker","createTracker","results","index","push","length","child","move","handle","before","after","current","type","bulletLastUsed","undefined","between","pop","join","left","right","result","repeat"],"mappings":"AAkBO,SAASA,EAAcC,EAAQC,EAAOC,GAC3C,MAAMC,EAAaF,EAAME,WACnBC,EAAWJ,EAAOI,UAAY,GAC9BC,EAAUJ,EAAMK,cAAcJ,GAE9BK,EAAU,GAChB,IAAIC,GAAS,EAIb,IAFAL,EAAWM,MAAM,KAERD,EAAQJ,EAASM,QAAQ,CAChC,MAAMC,EAAQP,EAASI,GAEvBL,EAAWA,EAAWO,OAAS,GAAKF,EAEpCD,EAAQE,KACNJ,EAAQO,KACNX,EAAMY,OAAOF,EAAOX,EAAQC,EAAO,CACjCa,OAAQ,KACRC,MAAO,QACJV,EAAQW,cAKE,SAAfL,EAAMM,OACRhB,EAAMiB,oBAAiBC,GAGrBX,EAAQJ,EAASM,OAAS,GAC5BH,EAAQE,KACNJ,EAAQO,KAAKQ,EAAQT,EAAOP,EAASI,EAAQ,GAAIR,EAAQC,IAG9D,CAID,OAFAE,EAAWkB,MAEJd,EAAQe,KAAK,GACtB,CASA,SAASF,EAAQG,EAAMC,EAAOxB,EAAQC,GACpC,IAAIO,EAAQP,EAAMqB,KAAKZ,OAEvB,KAAOF,KAAS,CACd,MAAMiB,EAASxB,EAAMqB,KAAKd,GAAOe,EAAMC,EAAOxB,EAAQC,GAEtD,IAAe,IAAXwB,GAA8B,IAAXA,EACrB,MAGF,GAAsB,iBAAXA,EACT,MAAO,KAAKC,OAAO,EAAID,GAGzB,IAAe,IAAXA,EACF,MAAO,uBAEV,CAED,MAAO,MACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e,t,r){const n=t.indexStack,l=e.children||[],h=[];let c=-1,a=r.before;n.push(-1);let o=t.createTracker(r);for(;++c<l.length;){const p=l[c];let f;if(n[n.length-1]=c,c+1<l.length){let r=t.handle.handlers[l[c+1].type];r&&r.peek&&(r=r.peek),f=r?r(l[c+1],e,t,{before:"",after:"",...o.current()}).charAt(0):""}else f=r.after;h.length>0&&("\r"===a||"\n"===a)&&"html"===p.type&&(h[h.length-1]=h[h.length-1].replace(/(\r?\n|\r)$/," "),a=" ",o=t.createTracker(r),o.move(h.join(""))),h.push(o.move(t.handle(p,e,t,{...o.current(),before:a,after:f}))),a=h[h.length-1].slice(-1)}return n.pop(),h.join("")}export{e as containerPhrasing};
|
|
2
|
+
//# sourceMappingURL=container-phrasing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-phrasing.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/container-phrasing.js"],"sourcesContent":["/**\n * @typedef {import('../types.js').Handle} Handle\n * @typedef {import('../types.js').Info} Info\n * @typedef {import('../types.js').Parent} Parent\n * @typedef {import('../types.js').PhrasingContent} PhrasingContent\n * @typedef {import('../types.js').State} State\n */\n\n/**\n * Serialize the children of a parent that contains phrasing children.\n *\n * These children will be joined flush together.\n *\n * @param {Parent & {children: Array<PhrasingContent>}} parent\n * Parent of flow nodes.\n * @param {State} state\n * Info passed around about the current state.\n * @param {Info} info\n * Info on where we are in the document we are generating.\n * @returns {string}\n * Serialized children, joined together.\n */\nexport function containerPhrasing(parent, state, info) {\n const indexStack = state.indexStack\n const children = parent.children || []\n /** @type {Array<string>} */\n const results = []\n let index = -1\n let before = info.before\n\n indexStack.push(-1)\n let tracker = state.createTracker(info)\n\n while (++index < children.length) {\n const child = children[index]\n /** @type {string} */\n let after\n\n indexStack[indexStack.length - 1] = index\n\n if (index + 1 < children.length) {\n /** @type {Handle} */\n // @ts-expect-error: hush, it’s actually a `zwitch`.\n let handle = state.handle.handlers[children[index + 1].type]\n /** @type {Handle} */\n // @ts-expect-error: hush, it’s actually a `zwitch`.\n if (handle && handle.peek) handle = handle.peek\n after = handle\n ? handle(children[index + 1], parent, state, {\n before: '',\n after: '',\n ...tracker.current()\n }).charAt(0)\n : ''\n } else {\n after = info.after\n }\n\n // In some cases, html (text) can be found in phrasing right after an eol.\n // When we’d serialize that, in most cases that would be seen as html\n // (flow).\n // As we can’t escape or so to prevent it from happening, we take a somewhat\n // reasonable approach: replace that eol with a space.\n // See: <https://github.com/syntax-tree/mdast-util-to-markdown/issues/15>\n if (\n results.length > 0 &&\n (before === '\\r' || before === '\\n') &&\n child.type === 'html'\n ) {\n results[results.length - 1] = results[results.length - 1].replace(\n /(\\r?\\n|\\r)$/,\n ' '\n )\n before = ' '\n\n // To do: does this work to reset tracker?\n tracker = state.createTracker(info)\n tracker.move(results.join(''))\n }\n\n results.push(\n tracker.move(\n state.handle(child, parent, state, {\n ...tracker.current(),\n before,\n after\n })\n )\n )\n\n before = results[results.length - 1].slice(-1)\n }\n\n indexStack.pop()\n\n return results.join('')\n}\n"],"names":["containerPhrasing","parent","state","info","indexStack","children","results","index","before","push","tracker","createTracker","length","child","after","handle","handlers","type","peek","current","charAt","replace","move","join","slice","pop"],"mappings":"AAsBO,SAASA,EAAkBC,EAAQC,EAAOC,GAC/C,MAAMC,EAAaF,EAAME,WACnBC,EAAWJ,EAAOI,UAAY,GAE9BC,EAAU,GAChB,IAAIC,GAAS,EACTC,EAASL,EAAKK,OAElBJ,EAAWK,MAAM,GACjB,IAAIC,EAAUR,EAAMS,cAAcR,GAElC,OAASI,EAAQF,EAASO,QAAQ,CAChC,MAAMC,EAAQR,EAASE,GAEvB,IAAIO,EAIJ,GAFAV,EAAWA,EAAWQ,OAAS,GAAKL,EAEhCA,EAAQ,EAAIF,EAASO,OAAQ,CAG/B,IAAIG,EAASb,EAAMa,OAAOC,SAASX,EAASE,EAAQ,GAAGU,MAGnDF,GAAUA,EAAOG,OAAMH,EAASA,EAAOG,MAC3CJ,EAAQC,EACJA,EAAOV,EAASE,EAAQ,GAAIN,EAAQC,EAAO,CACzCM,OAAQ,GACRM,MAAO,MACJJ,EAAQS,YACVC,OAAO,GACV,EACV,MACMN,EAAQX,EAAKW,MAUbR,EAAQM,OAAS,IACL,OAAXJ,GAA8B,OAAXA,IACL,SAAfK,EAAMI,OAENX,EAAQA,EAAQM,OAAS,GAAKN,EAAQA,EAAQM,OAAS,GAAGS,QACxD,cACA,KAEFb,EAAS,IAGTE,EAAUR,EAAMS,cAAcR,GAC9BO,EAAQY,KAAKhB,EAAQiB,KAAK,MAG5BjB,EAAQG,KACNC,EAAQY,KACNpB,EAAMa,OAAOF,EAAOZ,EAAQC,EAAO,IAC9BQ,EAAQS,UACXX,SACAM,YAKNN,EAASF,EAAQA,EAAQM,OAAS,GAAGY,OAAO,EAC7C,CAID,OAFApB,EAAWqB,MAEJnB,EAAQiB,KAAK,GACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indent-lines.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/indent-lines.js"],"sourcesContent":["/**\n * @typedef {import('../types.js').IndentLines} IndentLines\n */\n\nconst eol = /\\r?\\n|\\r/g\n\n/**\n * @type {IndentLines}\n */\nexport function indentLines(value, map) {\n /** @type {Array<string>} */\n const result = []\n let start = 0\n let line = 0\n /** @type {RegExpExecArray | null} */\n let match\n\n while ((match = eol.exec(value))) {\n one(value.slice(start, match.index))\n result.push(match[0])\n start = match.index + match[0].length\n line++\n }\n\n one(value.slice(start))\n\n return result.join('')\n\n /**\n * @param {string} value\n */\n function one(value) {\n result.push(map(value, line, !value))\n }\n}\n"],"names":["eol","indentLines","value","map","result","match","start","line","exec","one","slice","index","push","length","join"],"mappings":"AAIA,MAAMA,EAAM,YAKL,SAASC,EAAYC,EAAOC,GAEjC,MAAMC,EAAS,GACf,IAGIC,EAHAC,EAAQ,EACRC,EAAO,EAIX,KAAQF,EAAQL,EAAIQ,KAAKN,IACvBO,EAAIP,EAAMQ,MAAMJ,EAAOD,EAAMM,QAC7BP,EAAOQ,KAAKP,EAAM,IAClBC,EAAQD,EAAMM,MAAQN,EAAM,GAAGQ,OAC/BN,IAKF,OAFAE,EAAIP,EAAMQ,MAAMJ,IAETF,EAAOU,KAAK,IAKnB,SAASL,EAAIP,GACXE,EAAOQ,KAAKT,EAAID,EAAOK,GAAOL,GAC/B,CACH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e){if(!e._compiled){const r=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((r?"("+r+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}export{e as patternCompile};
|
|
2
|
+
//# sourceMappingURL=pattern-compile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern-compile.js","sources":["../../../../../node_modules/mdast-util-to-markdown/lib/util/pattern-compile.js"],"sourcesContent":["/**\n * @typedef {import('../types.js').Unsafe} Unsafe\n */\n\n/**\n * @param {Unsafe} pattern\n * @returns {RegExp}\n */\nexport function patternCompile(pattern) {\n if (!pattern._compiled) {\n const before =\n (pattern.atBreak ? '[\\\\r\\\\n][\\\\t ]*' : '') +\n (pattern.before ? '(?:' + pattern.before + ')' : '')\n\n pattern._compiled = new RegExp(\n (before ? '(' + before + ')' : '') +\n (/[|\\\\{}()[\\]^$+*?.-]/.test(pattern.character) ? '\\\\' : '') +\n pattern.character +\n (pattern.after ? '(?:' + pattern.after + ')' : ''),\n 'g'\n )\n }\n\n return pattern._compiled\n}\n"],"names":["patternCompile","pattern","_compiled","before","atBreak","RegExp","test","character","after"],"mappings":"AAQO,SAASA,EAAeC,GAC7B,IAAKA,EAAQC,UAAW,CACtB,MAAMC,GACHF,EAAQG,QAAU,kBAAoB,KACtCH,EAAQE,OAAS,MAAQF,EAAQE,OAAS,IAAM,IAEnDF,EAAQC,UAAY,IAAIG,QACrBF,EAAS,IAAMA,EAAS,IAAM,KAC5B,sBAAsBG,KAAKL,EAAQM,WAAa,KAAO,IACxDN,EAAQM,WACPN,EAAQO,MAAQ,MAAQP,EAAQO,MAAQ,IAAM,IACjD,IAEH,CAED,OAAOP,EAAQC,SACjB"}
|