@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,2 +1,2 @@
|
|
|
1
|
-
import{__rest as
|
|
1
|
+
import{__rest as o,__assign as i}from"../../../../../node_modules/tslib/tslib.es6.mjs.js";import{jsx as e}from"react/jsx-runtime";import{SectionWrapper as t}from"../../molecules/Sections/SectionWrapper.js";import{ConditionList as d}from"../../molecules/Condition/ConditionList.js";var n=function(n){var s=n.conditions,r=n.onAdd,l=n.onRemove,m=n.onEdit,h=n.isHighlighted,g=n.highlightedIds,c=n.footer,f=o(n,["conditions","onAdd","onRemove","onEdit","isHighlighted","highlightedIds","footer"]);return e(t,i({},f,{collapsible:!0},{children:e(d,{items:s,onAdd:r,onRemove:l,onEdit:m,isHighlighted:h,highlightedIds:g,footer:c})}))};export{n as ConditionSection};
|
|
2
2
|
//# sourceMappingURL=ConditionSection.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as i}from"../../../../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{InputDataReasoningCard as o}from"../../InputDataReasoningCard.js";import{ConditionSection as n}from"../../organisms/ConditionSection/ConditionSection.js";import{ConfigSection as l}from"../../organisms/ConfigSection/ConfigSection.js";import{ScopeSection as a}from"../../organisms/ScopeSection/ScopeSection.js";import{TextSection as r}from"../../organisms/TextSection/TextSection.js";var d=function(d){var s,c,h=d.state,p=d.handlers,u=d.uiState,g=(null==u?void 0:u.highlights)||{},m=function(i){return i&&0!==i.length?"".concat(i.length," condition").concat(i.length>1?"s":""):"Empty"},f={marginTop:"-12px",marginBottom:"24px",position:"relative",zIndex:1},v={marginTop:"-8px"};return e("div",i({className:"traffic-manager-template"},{children:[t(r,i({id:"rule-title",title:"Rule Title",rows:1,placeholder:"Enter a short, descriptive title for the rule",required:!0,value:h.ruleTitle,onChange:p.setRuleTitle,isHighlighted:g.ruleTitle},u)),h.citation.ruleTitle&&t("div",i({style:f},{children:t(o,{citation:h.citation.ruleTitle,citations:h.citations,fieldName:"Rule Title",fieldValue:h.ruleTitle||"Current Title"})})),t(r,i({id:"rule-description",title:"Rule Description",rows:4,placeholder:"Explain the rule behaviour",required:!0,value:h.ruleDescription,onChange:p.setRuleDescription,isHighlighted:g.ruleDescription},u)),h.citation.ruleDescription&&t("div",i({style:f},{children:t(o,{citation:h.citation.ruleDescription,citations:h.citations,fieldName:"Rule Description",fieldValue:h.ruleDescription||"Current Description"})})),t(a,i({id:"scope",required:!0,scopeData:h.scopeData,onScopeChange:p.onScopeChange,tierLabel:"Where should this rule apply?",stationLabel:"Which rule set should this rule belong to?",highlights:null==u?void 0:u.highlights},u)),h.citation.scopeData&&t("div",i({style:f},{children:t(o,{citation:h.citation.scopeData,citations:h.citations,fieldName:"Scope",fieldValue:(null===(c=null===(s=h.scopeData)||void 0===s?void 0:s.tiers)||void 0===c?void 0:c.join(", "))||"Selected Tiers"})})),t(n,i({id:"when-to-apply",title:"When to apply",required:!0,dividerRequired:!0,conditions:h.whenToApplyConditions,onAdd:p.addWhenToApply,onRemove:p.removeWhenToApply,onEdit:p.editWhenToApply,isHighlighted:g.wta,highlightedIds:null==u?void 0:u.highlightedIds,footer:h.citation.whenToApply&&t("div",i({style:v},{children:t(o,{citation:h.citation.whenToApply,citations:h.citations,fieldName:"When to apply",fieldValue:m(h.whenToApplyConditions)})}))},u)),t(n,i({id:"when-not-to-apply",title:"When NOT to apply",required:!1,dividerRequired:!0,conditions:h.whenNotToApplyConditions,onAdd:p.addWhenNotToApply,onRemove:p.removeWhenNotToApply,onEdit:p.editWhenNotToApply,isHighlighted:g.wnta,highlightedIds:null==u?void 0:u.highlightedIds,footer:h.citation.whenNotToApply&&t("div",i({style:v},{children:t(o,{citation:h.citation.whenNotToApply,citations:h.citations,fieldName:"When Not to apply",fieldValue:m(h.whenNotToApplyConditions)})}))},u)),t(l,i({id:"config",title:"Configuration",required:!0,onConfigChange:p.onConfigChange,highlights:null==u?void 0:u.highlights},u)),h.citation.configData&&t("div",i({style:f},{children:t(o,{citation:h.citation.configData,citations:h.citations,fieldName:"Configuration",fieldValue:"Proposed Configuration"})}))]}))};export{d as CreateRule};
|
|
2
2
|
//# sourceMappingURL=CreateRule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bookemon.js","sources":["../../../../../../../node_modules/@e-llm-studio/citation/dist/features/Bookemon/Bookemon.js"],"sourcesContent":["import{__assign as e,__awaiter as o,__generator as t}from\"../../node_modules/tslib/tslib.es6.mjs.js\";import{jsx as i,jsxs as r,Fragment as n}from\"react/jsx-runtime\";import{useState as l,useRef as a}from\"react\";import d from\"../../node_modules/@material-ui/core/esm/Accordion/Accordion.js\";import s from\"../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js\";import c from\"../../_virtual/ExpandMore.js\";import h from\"../../_virtual/Close.js\";import{PanelGroup as p,Panel as u,PanelResizeHandle as m}from\"../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js\";import g from\"./BookDetailsCard/BookDetailsCard.js\";import y from\"./BookOverviewCard/BookOverviewCard.js\";import v from\"./BookElementsCard/BookElementsCard.js\";import f from\"./BookCopyrightsCard/BookCopyrightsCard.js\";import x from\"./BookPeopleAwardsCard/BookPeopleAwardsCard.js\";import b from\"./BookPreview/BookPreview.js\";import k from\"../../node_modules/@material-ui/core/esm/Dialog/Dialog.js\";import C from\"../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js\";import B from\"../../node_modules/@material-ui/core/esm/Typography/Typography.js\";import w from\"../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js\";import j from\"../../node_modules/@material-ui/core/esm/IconButton/IconButton.js\";var F={dialogPaper:{maxWidth:\"none\",fontFamily:\"Inter, sans-serif\"},dialogContent:{padding:0,backgroundColor:\"#FFFFFF\",overflow:\"hidden\",height:\"90vh\",position:\"relative\"},container:{display:\"flex\",height:\"100%\",width:\"100%\",alignItems:\"flex-start\"},leftPanel:{height:\"100%\",padding:\"24px\",overflowY:\"auto\",backgroundColor:\"#F3F4F6\",borderRadius:\"12px\",boxSizing:\"border-box\"},rightPanel:{width:\"40%\",backgroundColor:\"#FFFFFF\",height:\"100%\",display:\"flex\",flexDirection:\"column\",justifyContent:\"flex-start\",overflow:\"auto\",flex:1,boxSizing:\"border-box\",overflowY:\"auto\"},accordion:{borderRadius:\"12px\",boxShadow:\"none\",marginBottom:\"24px\"},accordionSummary:{paddingLeft:\"16px\",paddingRight:\"16px\"},accordionDetails:{paddingLeft:\"16px\",paddingRight:\"16px\",paddingBottom:\"16px\"},heading:{fontWeight:\"bold\",color:\"#000000\",fontSize:\"16px\"},blurOverlay:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backdropFilter:\"blur(10px)\",WebkitBackdropFilter:\"blur(10px)\",backgroundColor:\"rgba(255, 255, 255, 0.5)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:10,borderRadius:\"12px\"},closeButton:{position:\"absolute\",top:\"8px\",right:\"8px\",color:\"#111827\"},resizeHandle:{width:\"10px\",backgroundColor:\"#e5e7eb\",cursor:\"col-resize\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},iconContainer:{display:\"flex\",flexDirection:\"column\",gap:\"4px\"},dot:{width:\"4px\",height:\"4px\",backgroundColor:\"#6b7280\",borderRadius:\"50%\"},resizeHandleBar:{width:\"2px\",height:\"24px\",backgroundColor:\"#666\",borderRadius:\"2px\"}},S={wrapper:{alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\"},inner:{width:\"100%\"},iconWrapper:{width:\"80px\",height:\"80px\",background:\"linear-gradient(to right, #3B82F6, #9333EA)\",borderRadius:\"50%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",margin:\"0 auto 24px auto\"},icon:{width:\"40px\",height:\"40px\",color:\"#FFFFFF\"},heading:{fontSize:\"36px\",fontWeight:\"bold\",color:\"#9333EA\",marginBottom:\"16px\"},text:{fontSize:\"18px\",color:\"#4B5563\",lineHeight:1.6,textAlign:\"center\"},errorState:{color:\"#CE3928\",padding:\"18px 0px\",display:\"flex\",justifyContent:\"center\",width:\"100%\"}},D=i(\"svg\",e({style:S.icon,fill:\"none\",stroke:\"currentColor\",viewBox:\"0 0 24 24\"},{children:i(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",strokeWidth:2,d:\"M13 10V3L4 14h7v7l9-11h-7z\"})})),z=function(o){var t=o.header,n=o.subheader,l=o.icon;return i(\"div\",e({style:S.wrapper},{children:r(\"div\",e({style:S.inner},{children:[i(\"div\",e({style:{marginBottom:\"32px\"}},{children:i(\"div\",e({style:S.iconWrapper},{children:l||D}))})),r(\"div\",{children:[i(\"h1\",e({style:S.heading},{children:t})),i(\"p\",e({style:S.text},{children:n}))]})]}))}))},P=function(S){var P=S.open,A=S.onClose,I=S.isNonHighlightedBlur,H=S.isBookemon,E=S.getHighlightContent,L=S.handleFetchManuscriptElements,_=S.data,O=S.showComingSoon,T=void 0!==O&&O,W=S.comingSoonData,M=void 0===W?{header:\"Bookemon Coming Soon!!\",subheader:\"We're working on something amazing. Stay tuned for updates!\",icon:D}:W,R=S.customStyle,N=void 0===R?{}:R,V=S.isBlurToggleVisible,Q=void 0!==V&&V,Y=l({textToHighLight:\"\",content:\"\"}),q=Y[0],G=Y[1],J=l(1),K=J[0],U=J[1],X=l(!1),Z=X[0],$=X[1],ee=l(\"Book Preview\"),oe=ee[0],te=ee[1],ie=l(70),re=ie[0],ne=ie[1],le=a(null),ae=l(!1),de=ae[0],se=ae[1],ce=function(e,i,r,n){return void 0===n&&(n=0),o(void 0,void 0,void 0,(function(){var o,l,a,d,s,c,h,p,u,m,g,y,v,f,x,b;return t(this,(function(t){switch(t.label){case 0:G({textToHighLight:\"\",content:\"\"}),se(!1),$(!0),te(i),t.label=1;case 1:return t.trys.push([1,5,6,7]),r&&0!==r.length?[4,E([r[n]])]:($(!1),ne(70),null===(x=le.current)||void 0===x||x.resize(70),[2]);case 2:if(o=t.sent(),l=(null==o?void 0:o.data)||o||[],!Array.isArray(l)||0===l.length)return se(!0),$(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g,\" \").replace(/ /g,\" \").replace(/[\\u200B-\\u200D\\uFEFF]/g,\"\").replace(/[\\u2018\\u2019]/g,\"'\").replace(/[\\u201C\\u201D]/g,'\"').replace(/[\\u2013\\u2014]/g,\"-\").replace(/[.,!?;:'\"(){}\\[\\]—–…\\/\\\\@#&*_|\\^~%=+<>`]/g,\"\").replace(/\\s+/g,\" \").trim().toLowerCase():\"\"})(e),s=null,c=0,h=l;c<h.length;c++)if(y=h[c],a(y.normalizedContent||y.htmlContent).includes(d)){s=y;break}if(!s)for(p=d.split(\" \").filter(Boolean);p.length>0;){for(u=p.join(\" \"),m=0,g=l;m<g.length;m++)if(y=g[m],a(y.normalizedContent||y.htmlContent).includes(u)){s=y;break}if(s)break;p.pop()}return v=l.map((function(e){return e.htmlContent})).join(\"\\n\"),G({textToHighLight:s?s.htmlContent:\"\",content:v}),ne(50),null===(b=le.current)||void 0===b||b.resize(50),!s&&n+1<r.length?[4,ce(e,i,r,n+1)]:[3,4];case 3:return[2,t.sent()];case 4:return[2];case 5:return f=t.sent(),console.error(\"Highlight error:\",f),se(!0),[3,7];case 6:return $(!1),[7];case 7:return[2]}}))}))},he=_.bookAwards,pe=_.bookCopyRight,ue=_.bookDetails,me=_.bookElements,ge=_.bookOverView,ye=_.bookCoverImage,ve=null==ue?void 0:ue.isbn;return i(k,e({open:P,fullWidth:!0,PaperProps:{style:e(e({},null==F?void 0:F.dialogPaper),null==N?void 0:N.dialogDimension)}},{children:r(C,e({style:F.dialogContent},{children:[!T&&i(\"div\",e({style:F.container},{children:r(p,e({direction:\"horizontal\"},{children:[i(u,e({order:1,ref:le,defaultSize:re||70},{children:r(\"div\",e({style:e(e({},null==F?void 0:F.leftPanel),null==N?void 0:N.leftPanel)},{children:[i(\"div\",e({style:{marginBottom:\"24px\"}},{children:r(d,e({defaultExpanded:!0,elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:\"Book Overview\"}))})),i(w,e({style:F.accordionDetails},{children:ge&&Object.keys(ge).length>0?i(y,{data:ge}):i(\"div\",e({style:F.errorState},{children:\"No overview data available.\"}))}))]}))})),i(\"div\",e({style:{marginBottom:\"24px\"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:\"Book Manuscript Elements\"}))})),i(w,e({style:F.accordionDetails},{children:i(v,{data:me,handleFetchManuscriptElements:L,BookIsbn:ve,updateQuotesToHighLight:ce})}))]}))})),i(\"div\",e({style:{marginBottom:\"24px\"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:\"Book Metadata Details\"}))})),i(w,e({style:F.accordionDetails},{children:ue&&Object.keys(ue).length>0?i(g,{data:ue}):i(\"div\",e({style:F.errorState},{children:\"No Book Metadata data available.\"}))}))]}))})),i(\"div\",e({style:{marginBottom:\"24px\"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:\"Copyrights & Marketing\"}))})),i(w,e({style:F.accordionDetails},{children:pe&&Object.keys(pe).length>0?i(f,{data:pe}):i(\"div\",e({style:F.errorState},{children:\"No Copyrights & Marketing data available.\"}))}))]}))})),i(\"div\",{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:\"People & Awards\"}))})),i(w,e({style:F.accordionDetails},{children:he&&Object.keys(he).length>0?i(x,{data:he}):i(\"div\",e({style:F.errorState},{children:\"No People & Awards data available.\"}))}))]}))})]}))})),i(m,{style:{width:\"3px\",background:\"#D1D5DC\",cursor:\"col-resize\"}}),i(u,e({order:2,minSize:30,maxSize:50,style:{overflow:\"visible\",position:\"relative\",transition:\"all 300ms ease-in-out\",WebkitTransition:\"all 300ms ease-in-out\"}},{children:i(b,{bookOverView:ge,bookCoverImage:ye,onClose:A,clickableElementCategory:oe,quotesToHighLightData:q,updateQuotesToHighLight:ce,citationLoad:Z,previewPage:K,setPreviewPage:U,customStyle:N,comingSoonData:M,isNonHighlightedBlur:I,isBlurToggleVisible:Q,isBookemon:H,noHtmlContent:de})}))]}))})),T?r(\"div\",e({style:F.blurOverlay},{children:[i(j,e({style:F.closeButton,onClick:A},{children:i(h,{})})),i(z,{header:M.header,subheader:M.subheader,icon:M.icon})]})):i(n,{})]}))}))};export{S as comingSoonStyles,P as default,D as defaultIcon};\n//# sourceMappingURL=Bookemon.js.map\n"],"names":["S","wrapper","alignItems","justifyContent","textAlign","inner","width","iconWrapper","height","background","borderRadius","display","margin","icon","color","heading","fontSize","fontWeight","marginBottom","text","lineHeight","errorState","padding","i","e","style","fill","stroke","viewBox","children","strokeLinecap","strokeLinejoin","strokeWidth","d"],"mappings":"2mDAAu0C,IAA8/CA,EAAE,CAACC,QAAQ,CAACC,WAAW,SAASC,eAAe,SAASC,UAAU,UAAUC,MAAM,CAACC,MAAM,QAAQC,YAAY,CAACD,MAAM,OAAOE,OAAO,OAAOC,WAAW,8CAA8CC,aAAa,MAAMC,QAAQ,OAAOT,WAAW,SAASC,eAAe,SAASS,OAAO,oBAAoBC,KAAK,CAACP,MAAM,OAAOE,OAAO,OAAOM,MAAM,WAAWC,QAAQ,CAACC,SAAS,OAAOC,WAAW,OAAOH,MAAM,UAAUI,aAAa,QAAQC,KAAK,CAACH,SAAS,OAAOF,MAAM,UAAUM,WAAW,IAAIhB,UAAU,UAAUiB,WAAW,CAACP,MAAM,UAAUQ,QAAQ,WAAWX,QAAQ,OAAOR,eAAe,SAASG,MAAM,SAAWiB,EAAE,MAAMC,EAAE,CAACC,MAAMzB,EAAEa,KAAKa,KAAK,OAAOC,OAAO,eAAeC,QAAQ,aAAa,CAACC,SAASN,EAAE,OAAO,CAACO,cAAc,QAAQC,eAAe,QAAQC,YAAY,EAAEC,EAAE"}
|
|
1
|
+
{"version":3,"file":"Bookemon.js","sources":["../../../../../../../node_modules/@e-llm-studio/citation/dist/features/Bookemon/Bookemon.js"],"sourcesContent":["import{__assign as e,__awaiter as o,__generator as t}from\"../../node_modules/tslib/tslib.es6.mjs.js\";import{jsx as i,jsxs as r,Fragment as n}from\"react/jsx-runtime\";import{useState as l,useRef as a}from\"react\";import d from\"../../node_modules/@material-ui/core/esm/Accordion/Accordion.js\";import s from\"../../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js\";import c from\"../../_virtual/ExpandMore.js\";import h from\"../../_virtual/Close.js\";import{PanelGroup as p,Panel as u,PanelResizeHandle as m}from\"../../node_modules/react-resizable-panels/dist/react-resizable-panels.browser.js\";import g from\"./BookDetailsCard/BookDetailsCard.js\";import y from\"./BookOverviewCard/BookOverviewCard.js\";import v from\"./BookElementsCard/BookElementsCard.js\";import f from\"./BookCopyrightsCard/BookCopyrightsCard.js\";import x from\"./BookPeopleAwardsCard/BookPeopleAwardsCard.js\";import b from\"./BookPreview/BookPreview.js\";import k from\"../../node_modules/@material-ui/core/esm/Dialog/Dialog.js\";import C from\"../../node_modules/@material-ui/core/esm/DialogContent/DialogContent.js\";import B from\"../../node_modules/@material-ui/core/esm/Typography/Typography.js\";import w from\"../../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js\";import j from\"../../node_modules/@material-ui/core/esm/IconButton/IconButton.js\";var F={dialogPaper:{maxWidth:\"none\",fontFamily:\"Inter, sans-serif\"},dialogContent:{padding:0,backgroundColor:\"#FFFFFF\",overflow:\"hidden\",height:\"90vh\",position:\"relative\"},container:{display:\"flex\",height:\"100%\",width:\"100%\",alignItems:\"flex-start\"},leftPanel:{height:\"100%\",padding:\"24px\",overflowY:\"auto\",backgroundColor:\"#F3F4F6\",borderRadius:\"12px\",boxSizing:\"border-box\"},rightPanel:{width:\"40%\",backgroundColor:\"#FFFFFF\",height:\"100%\",display:\"flex\",flexDirection:\"column\",justifyContent:\"flex-start\",overflow:\"auto\",flex:1,boxSizing:\"border-box\",overflowY:\"auto\"},accordion:{borderRadius:\"12px\",boxShadow:\"none\",marginBottom:\"24px\"},accordionSummary:{paddingLeft:\"16px\",paddingRight:\"16px\"},accordionDetails:{paddingLeft:\"16px\",paddingRight:\"16px\",paddingBottom:\"16px\"},heading:{fontWeight:\"bold\",color:\"#000000\",fontSize:\"16px\"},blurOverlay:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",backdropFilter:\"blur(10px)\",WebkitBackdropFilter:\"blur(10px)\",backgroundColor:\"rgba(255, 255, 255, 0.5)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:10,borderRadius:\"12px\"},closeButton:{position:\"absolute\",top:\"8px\",right:\"8px\",color:\"#111827\"},resizeHandle:{width:\"10px\",backgroundColor:\"#e5e7eb\",cursor:\"col-resize\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},iconContainer:{display:\"flex\",flexDirection:\"column\",gap:\"4px\"},dot:{width:\"4px\",height:\"4px\",backgroundColor:\"#6b7280\",borderRadius:\"50%\"},resizeHandleBar:{width:\"2px\",height:\"24px\",backgroundColor:\"#666\",borderRadius:\"2px\"}},S={wrapper:{alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\"},inner:{width:\"100%\"},iconWrapper:{width:\"80px\",height:\"80px\",background:\"linear-gradient(to right, #3B82F6, #9333EA)\",borderRadius:\"50%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",margin:\"0 auto 24px auto\"},icon:{width:\"40px\",height:\"40px\",color:\"#FFFFFF\"},heading:{fontSize:\"36px\",fontWeight:\"bold\",color:\"#9333EA\",marginBottom:\"16px\"},text:{fontSize:\"18px\",color:\"#4B5563\",lineHeight:1.6,textAlign:\"center\"},errorState:{color:\"#CE3928\",padding:\"18px 0px\",display:\"flex\",justifyContent:\"center\",width:\"100%\"}},D=i(\"svg\",e({style:S.icon,fill:\"none\",stroke:\"currentColor\",viewBox:\"0 0 24 24\"},{children:i(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",strokeWidth:2,d:\"M13 10V3L4 14h7v7l9-11h-7z\"})})),z=function(o){var t=o.header,n=o.subheader,l=o.icon;return i(\"div\",e({style:S.wrapper},{children:r(\"div\",e({style:S.inner},{children:[i(\"div\",e({style:{marginBottom:\"32px\"}},{children:i(\"div\",e({style:S.iconWrapper},{children:l||D}))})),r(\"div\",{children:[i(\"h1\",e({style:S.heading},{children:t})),i(\"p\",e({style:S.text},{children:n}))]})]}))}))},P=function(S){var P=S.open,A=S.onClose,I=S.isNonHighlightedBlur,H=S.isBookemon,E=S.getHighlightContent,L=S.handleFetchManuscriptElements,_=S.data,O=S.showComingSoon,T=void 0!==O&&O,W=S.comingSoonData,M=void 0===W?{header:\"Bookemon Coming Soon!!\",subheader:\"We're working on something amazing. Stay tuned for updates!\",icon:D}:W,R=S.customStyle,N=void 0===R?{}:R,V=S.isBlurToggleVisible,Q=void 0!==V&&V,Y=l({textToHighLight:\"\",content:\"\"}),q=Y[0],G=Y[1],J=l(1),K=J[0],U=J[1],X=l(!1),Z=X[0],$=X[1],ee=l(\"Book Preview\"),oe=ee[0],te=ee[1],ie=l(70),re=ie[0],ne=ie[1],le=a(null),ae=l(!1),de=ae[0],se=ae[1],ce=_.bookAwards,he=_.bookCopyRight,pe=_.bookDetails,ue=_.bookElements,me=_.bookOverView,ge=_.bookCoverImage,ye=function(e,i,r,n){return void 0===n&&(n=0),o(void 0,void 0,void 0,(function(){var o,l,a,d,s,c,h,p,u,m,g,y,v,f,x,b;return t(this,(function(t){switch(t.label){case 0:G({textToHighLight:\"\",content:\"\"}),se(!1),$(!0),te(i),t.label=1;case 1:return t.trys.push([1,5,6,7]),r&&0!==r.length?[4,E([r[n]])]:($(!1),ne(70),null===(x=le.current)||void 0===x||x.resize(70),[2]);case 2:if(o=t.sent(),l=(null==o?void 0:o.data)||o||[],!Array.isArray(l)||0===l.length)return se(!0),$(!1),[2];for(d=(a=function(e){return e?e.replace(/<[^>]*>/g,\" \").replace(/ /g,\" \").replace(/[\\u200B-\\u200D\\uFEFF]/g,\"\").replace(/[\\u2018\\u2019]/g,\"'\").replace(/[\\u201C\\u201D]/g,'\"').replace(/[\\u2013\\u2014]/g,\"-\").replace(/[.,!?;:'\"(){}\\[\\]—–…\\/\\\\@#&*_|\\^~%=+<>`]/g,\"\").replace(/\\s+/g,\" \").trim().toLowerCase():\"\"})(e),s=null,c=0,h=l;c<h.length;c++)if(y=h[c],a(y.normalizedContent||y.htmlContent).includes(d)){s=y;break}if(!s)for(p=d.split(\" \").filter(Boolean);p.length>0;){for(u=p.join(\" \"),m=0,g=l;m<g.length;m++)if(y=g[m],a(y.normalizedContent||y.htmlContent).includes(u)){s=y;break}if(s)break;p.pop()}return v=l.map((function(e){return e.htmlContent})).join(\"\\n\"),G({textToHighLight:s?s.htmlContent:\"\",content:v}),ne(50),null===(b=le.current)||void 0===b||b.resize(50),!s&&n+1<r.length?[4,ye(e,i,r,n+1)]:[3,4];case 3:return[2,t.sent()];case 4:return[2];case 5:return f=t.sent(),console.error(\"Highlight error:\",f),se(!0),[3,7];case 6:return $(!1),[7];case 7:return[2]}}))}))},ve=null==pe?void 0:pe.isbn;return i(k,e({open:P,fullWidth:!0,PaperProps:{style:e(e({},null==F?void 0:F.dialogPaper),null==N?void 0:N.dialogDimension)}},{children:r(C,e({style:F.dialogContent},{children:[!T&&i(\"div\",e({style:F.container},{children:r(p,e({direction:\"horizontal\"},{children:[i(u,e({order:1,ref:le,defaultSize:re||70},{children:r(\"div\",e({style:e(e({},null==F?void 0:F.leftPanel),null==N?void 0:N.leftPanel)},{children:[i(\"div\",e({style:{marginBottom:\"24px\"}},{children:r(d,e({defaultExpanded:!0,elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:\"Book Overview\"}))})),i(w,e({style:F.accordionDetails},{children:me&&Object.keys(me).length>0?i(y,{data:me}):i(\"div\",e({style:F.errorState},{children:\"No overview data available.\"}))}))]}))})),i(\"div\",e({style:{marginBottom:\"24px\"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:\"Book Manuscript Elements\"}))})),i(w,e({style:F.accordionDetails},{children:i(v,{data:ue,title:(null==me?void 0:me.title)||\"\",handleFetchManuscriptElements:L,BookIsbn:ve,updateQuotesToHighLight:ye})}))]}))})),i(\"div\",e({style:{marginBottom:\"24px\"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:\"Book Metadata Details\"}))})),i(w,e({style:F.accordionDetails},{children:pe&&Object.keys(pe).length>0?i(g,{data:pe}):i(\"div\",e({style:F.errorState},{children:\"No Book Metadata data available.\"}))}))]}))})),i(\"div\",e({style:{marginBottom:\"24px\"}},{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:\"Copyrights & Marketing\"}))})),i(w,e({style:F.accordionDetails},{children:he&&Object.keys(he).length>0?i(f,{data:he}):i(\"div\",e({style:F.errorState},{children:\"No Copyrights & Marketing data available.\"}))}))]}))})),i(\"div\",{children:r(d,e({elevation:0,style:F.accordion},{children:[i(s,e({expandIcon:i(c,{}),style:F.accordionSummary},{children:i(B,e({style:F.heading},{children:\"People & Awards\"}))})),i(w,e({style:F.accordionDetails},{children:ce&&Object.keys(ce).length>0?i(x,{data:ce}):i(\"div\",e({style:F.errorState},{children:\"No People & Awards data available.\"}))}))]}))})]}))})),i(m,{style:{width:\"3px\",background:\"#D1D5DC\",cursor:\"col-resize\"}}),i(u,e({order:2,minSize:30,maxSize:50,style:{overflow:\"visible\",position:\"relative\",transition:\"all 300ms ease-in-out\",WebkitTransition:\"all 300ms ease-in-out\"}},{children:i(b,{bookOverView:me,bookCoverImage:ge,onClose:A,clickableElementCategory:oe,quotesToHighLightData:q,updateQuotesToHighLight:ye,citationLoad:Z,previewPage:K,setPreviewPage:U,customStyle:N,comingSoonData:M,isNonHighlightedBlur:I,isBlurToggleVisible:Q,isBookemon:H,noHtmlContent:de})}))]}))})),T?r(\"div\",e({style:F.blurOverlay},{children:[i(j,e({style:F.closeButton,onClick:A},{children:i(h,{})})),i(z,{header:M.header,subheader:M.subheader,icon:M.icon})]})):i(n,{})]}))}))};export{S as comingSoonStyles,P as default,D as defaultIcon};\n//# sourceMappingURL=Bookemon.js.map\n"],"names":["S","wrapper","alignItems","justifyContent","textAlign","inner","width","iconWrapper","height","background","borderRadius","display","margin","icon","color","heading","fontSize","fontWeight","marginBottom","text","lineHeight","errorState","padding","i","e","style","fill","stroke","viewBox","children","strokeLinecap","strokeLinejoin","strokeWidth","d"],"mappings":"2mDAAu0C,IAA8/CA,EAAE,CAACC,QAAQ,CAACC,WAAW,SAASC,eAAe,SAASC,UAAU,UAAUC,MAAM,CAACC,MAAM,QAAQC,YAAY,CAACD,MAAM,OAAOE,OAAO,OAAOC,WAAW,8CAA8CC,aAAa,MAAMC,QAAQ,OAAOT,WAAW,SAASC,eAAe,SAASS,OAAO,oBAAoBC,KAAK,CAACP,MAAM,OAAOE,OAAO,OAAOM,MAAM,WAAWC,QAAQ,CAACC,SAAS,OAAOC,WAAW,OAAOH,MAAM,UAAUI,aAAa,QAAQC,KAAK,CAACH,SAAS,OAAOF,MAAM,UAAUM,WAAW,IAAIhB,UAAU,UAAUiB,WAAW,CAACP,MAAM,UAAUQ,QAAQ,WAAWX,QAAQ,OAAOR,eAAe,SAASG,MAAM,SAAWiB,EAAE,MAAMC,EAAE,CAACC,MAAMzB,EAAEa,KAAKa,KAAK,OAAOC,OAAO,eAAeC,QAAQ,aAAa,CAACC,SAASN,EAAE,OAAO,CAACO,cAAc,QAAQC,eAAe,QAAQC,YAAY,EAAEC,EAAE"}
|
package/dist/node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__rest as n,__spreadArray as
|
|
1
|
+
import{__assign as e,__rest as n,__spreadArray as t}from"../../node_modules/tslib/tslib.es6.mjs.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";import a,{useEffect as o}from"react";import{ReactMarkdown as l}from"../../node_modules/react-markdown/lib/react-markdown.js";import d from"../../node_modules/rehype-raw/lib/index.js";import p from"../../node_modules/remark-gfm/lib/index.js";import{visit as s}from"../../node_modules/unist-util-visit/lib/index.js";function m(){return function(e){s(e,"text",(function(e,n,r){var i;if(r&&"string"==typeof e.value&&e.value.includes("✓")){for(var a=e.value.split("✓"),o=[],l=0;l<a.length;l++){var d=a[l];d&&o.push({type:"text",value:d}),l<a.length-1&&o.push({type:"element",tagName:"span",properties:{className:["text-green-600","font-medium","inline-block","mr-1","align-middle"]},children:[{type:"text",value:"✓"}]})}return(i=r.children).splice.apply(i,t([n,1],o,!1)),n+o.length}}))}}var u=function(n,t){if(!t||!t.trim())return n;var r=new RegExp("(".concat(t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),")"),"gi");return n.split(r).map((function(n,t){return r.test(n)?i("mark",e({className:"custom-highlight"},{children:n}),t):n}))};function c(){return function(e){s(e,"element",(function(e,n,t){if(t&&"p"===e.tagName)return e.children&&1===e.children.length&&"element"===e.children[0].type&&"details"===e.children[0].tagName?(t.children.splice(n,1,e.children[0]),n):void 0}))}}var f=function(e){var n;return"text"===(null==e?void 0:e.type)&&/^\s*$/.test(null!==(n=e.value)&&void 0!==n?n:"")};function g(){return function(e){s(e,"element",(function(e){var n,t;if("details"===e.tagName&&"data-target"in(e.properties||{})){var r=e.children||[],i=0;"element"===(null===(n=r[0])||void 0===n?void 0:n.type)&&"summary"===(null===(t=r[0])||void 0===t?void 0:t.tagName)&&(i=1);var a=r.slice(i),o=a.filter((function(e){return!f(e)}));if((1!==o.length||"element"!==o[0].type||!o[0].properties||!("data-popup"in o[0].properties)&&void 0===o[0].properties["data-popup"])&&!o.some((function(e){return"element"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&("data-popup"in e.properties||void 0!==e.properties["data-popup"])}))){var l={type:"element",tagName:"div",properties:{"data-popup":""},children:a};e.children=r.slice(0,i).concat([l])}}}))}}function h(){return function(e){s(e,"element",(function(e){var n,t;if("details"===e.tagName){var r=e.properties||{};if(!("data-inline"in r)&&!("data-target"in r)){var i=e.children||[],a=0;"element"===(null===(n=i[0])||void 0===n?void 0:n.type)&&"summary"===(null===(t=i[0])||void 0===t?void 0:t.tagName)&&(a=1);var o=i.slice(a),l=o.filter((function(e){return!f(e)}));if((1!==l.length||"element"!==l[0].type||!l[0].properties||!("data-popup"in l[0].properties)&&void 0===l[0].properties["data-popup"])&&!l.some((function(e){return"element"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&("data-popup"in e.properties||void 0!==e.properties["data-popup"])}))){var d={type:"element",tagName:"div",properties:{"data-popup":""},children:o};e.children=i.slice(0,a).concat([d])}}}}))}}var v=function(t){var s=t.value,f=t.highlightedText,v=a.useRef(null),y=a.useRef(null);return o((function(){if(f){var e=setTimeout((function(){if(y.current){var e=y.current.querySelector("mark.custom-highlight");e&&e.scrollIntoView({behavior:"smooth",block:"center"})}}),100);return function(){return clearTimeout(e)}}}),[f,s]),r("div",e({ref:y,className:"flex h-[42vh] gap-4"},{children:[i("div",e({className:"h-[42vh] flex-1 rounded-xl border border-gray-200 bg-white p-5 shadow-sm"},{children:i("div",e({ref:y,className:"h-full overflow-y-auto pr-2"},{children:i(l,e({remarkPlugins:[p],rehypePlugins:[d,c,m,g,h],components:{details:function(t){t.node;var a=n(t,["node"]),o=!!a["data-inline"],l=!!a["data-target"];return o?i("details",e({},a,{className:"md-details md-details--inline relative my-1 inline-block rounded-[8px] align-middle",onToggle:function(e){e.stopPropagation(),function(e){var n=e.currentTarget,t=n.getAttribute("data-inline");if(t&&v.current){var r=v.current.querySelector('details[data-target="'.concat(t,'"]'));r&&(r.open=n.open)}}(e)}},{children:a.children})):l?r("details",e({},a,{className:"md-details md-details--target my-2 block",onToggle:function(e){return e.stopPropagation()}},{children:[i("summary",{className:"md-target-dummy-summary","aria-hidden":"true"}),a.children]})):i("details",e({},a,{className:"md-details md-details--block relative my-1 w-full rounded-[8px] align-middle",onToggle:function(e){return e.stopPropagation()}},{children:a.children}))},summary:function(t){t.node;var r=n(t,["node"]);return i("div",e({className:"mt-0"},{children:i("summary",e({className:"md-summary inline-flex cursor-pointer select-none items-center gap-1 py-1 font-medium hover:opacity-90",style:{color:"#19213D",fontWeight:500},onClick:function(e){return e.stopPropagation()}},r,{children:i("span",e({className:"whitespace-nowrap align-middle"},{children:r.children}))}))}))},ul:function(t){t.node;var r=n(t,["node"]);return i("ol",e({className:"md-ol my-1 list-decimal pl-5"},r))},ol:function(t){t.node;var r=n(t,["node"]);return i("ol",e({className:"md-ol my-1 list-decimal pl-5"},r))},div:function(t){var r,a=t.node,o=n(t,["node"]),l=(null==a?void 0:a.properties)&&("data-popup"in a.properties||void 0!==(null===(r=a.properties)||void 0===r?void 0:r["data-popup"]));return i("div",l?e({},o,{className:(o.className?o.className+" ":"")+"md-popup",role:"region"}):e({},o))},p:function(e){var n=e.children,t=Array.isArray(n)?n:[n];return i("p",{children:t.map((function(e,n){return"string"==typeof e?u(e,f):i(a.Fragment,{children:e},n)}))})},li:function(n){var t=n.children;return i("li",e({style:{marginBottom:"4px"}},{children:t.map((function(e){return"string"==typeof e?u(e,f):e}))}))},code:function(t){var r=t.children,a=n(t,["children"]);return i("code",e({},a,{children:r.map((function(e){return"string"==typeof e?u(e,f):e}))}))}}},{children:s}))}))})),i("style",{children:"\n .custom-highlight {\n background-color: #fef08a; \n color: #374151; \n padding: 2px 4px;\n border-radius: 4px;\n }\n .md-root strong { color: #19213D !important; }\n .md-check-green { color: #16A34A !important; font-weight: 500; }\n details > summary::-webkit-details-marker { display: none; }\n .md-summary span { white-space: nowrap; }\n\n .md-target-dummy-summary { display: none !important; }\n\n /* Chevron animation */\n .md-details[open] > summary .md-chevron { transform: rotate(180deg); transition: transform .25s cubic-bezier(.2,.8,.2,1); }\n .md-details > summary .md-chevron { transition: transform .25s cubic-bezier(.2,.8,.2,1); }\n\n /* Normal details open look */\n .md-details--block[open] {\n \n padding: 8px 10px;\n border-radius: 8px;\n }\n\n /* Inline trigger never reveals inner content */\n .md-details--inline > :not(summary) { display: none !important; }\n\n /* Target popups (animated) */\n .md-details--target .md-popup,\n .md-details--target [data-popup] {\n display: block;\n margin-top: 6px;\n border: 1px solid #6D28D9;\n color: #6D28D9;\n border-radius: 10px;\n padding: 12px;\n box-shadow: 0 8px 24px rgba(0,0,0,.06);\n opacity: 0;\n transform: translateY(-4px);\n transition: opacity .2s ease, transform .2s ease;\n font-size: 12px;\n line-height: 1.35;\n background: #6D28D91A;\n }\n .md-details--target[open] .md-popup,\n .md-details--target[open] [data-popup] {\n opacity: 1;\n transform: translateY(0);\n }\n\n /* Popup body for normal details (✓ items) */\n .md-details--block[open] .md-popup,\n .md-details--block[open] [data-popup] {\n display: block;\n border: 1px solid #6D28D9;\n color: #6D28D9;\n border-radius: 10px;\n padding: 12px; \n font-size: 12px;\n line-height: 1.35;\n font-weight: 500;\n background: #6D28D91A;\n }\n\n /* ---- NESTED POPUP GUARD: if a popup is inside a popup, neutralize the inner one ---- */\n .md-popup .md-popup,\n .md-popup [data-popup] {\n border: none !important;\n background: transparent !important;\n padding: 0 !important;\n box-shadow: none !important;\n color: inherit !important;\n }\n "})]}))};export{v as default};
|
|
2
2
|
//# sourceMappingURL=MarkdownRenderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownRenderer.js","sources":["../../../../../../../node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js"],"sourcesContent":["import{__assign as e,__rest as n,__spreadArray as t}from\"../../node_modules/tslib/tslib.es6.mjs.js\";import{jsxs as r,jsx as i}from\"react/jsx-runtime\";import o,{useEffect as a}from\"react\";import{ReactMarkdown as l}from\"../../node_modules/react-markdown/lib/react-markdown.js\";import d from\"../../node_modules/rehype-raw/lib/index.js\";import p from\"../../node_modules/remark-gfm/lib/index.js\";import{visit as s}from\"../../node_modules/unist-util-visit/lib/index.js\";function u(){return function(e){s(e,\"text\",(function(e,n,r){var i;if(r&&\"string\"==typeof e.value&&e.value.includes(\"✓\")){for(var o=e.value.split(\"✓\"),a=[],l=0;l<o.length;l++){var d=o[l];d&&a.push({type:\"text\",value:d}),l<o.length-1&&a.push({type:\"element\",tagName:\"span\",properties:{className:[\"text-green-600\",\"font-medium\",\"inline-block\",\"mr-1\",\"align-middle\"]},children:[{type:\"text\",value:\"✓\"}]})}return(i=r.children).splice.apply(i,t([n,1],a,!1)),n+a.length}}))}}var m=function(n,t){if(!t)return n;var r=new RegExp(t.replace(/[-[\\]/{}()*+?.\\\\^$|]/g,\"\\\\$&\"),\"gi\"),o=n.split(r),a=n.match(r);if(!a)return n;var l=[];return o.forEach((function(n,t){l.push(n),a[t]&&l.push(i(\"span\",e({className:\"rounded bg-yellow-200 px-1 py-0.5 text-gray-700\"},{children:a[t]}),t))})),l};function c(){return function(e){s(e,\"element\",(function(e,n,t){if(t&&\"p\"===e.tagName)return e.children&&1===e.children.length&&\"element\"===e.children[0].type&&\"details\"===e.children[0].tagName?(t.children.splice(n,1,e.children[0]),n):void 0}))}}var f=function(e){var n;return\"text\"===(null==e?void 0:e.type)&&/^\\s*$/.test(null!==(n=e.value)&&void 0!==n?n:\"\")};function g(){return function(e){s(e,\"element\",(function(e){var n,t;if(\"details\"===e.tagName&&\"data-target\"in(e.properties||{})){var r=e.children||[],i=0;\"element\"===(null===(n=r[0])||void 0===n?void 0:n.type)&&\"summary\"===(null===(t=r[0])||void 0===t?void 0:t.tagName)&&(i=1);var o=r.slice(i),a=o.filter((function(e){return!f(e)}));if((1!==a.length||\"element\"!==a[0].type||!a[0].properties||!(\"data-popup\"in a[0].properties)&&void 0===a[0].properties[\"data-popup\"])&&!a.some((function(e){return\"element\"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&(\"data-popup\"in e.properties||void 0!==e.properties[\"data-popup\"])}))){var l={type:\"element\",tagName:\"div\",properties:{\"data-popup\":\"\"},children:o};e.children=r.slice(0,i).concat([l])}}}))}}function h(){return function(e){s(e,\"element\",(function(e){var n,t;if(\"details\"===e.tagName){var r=e.properties||{};if(!(\"data-inline\"in r)&&!(\"data-target\"in r)){var i=e.children||[],o=0;\"element\"===(null===(n=i[0])||void 0===n?void 0:n.type)&&\"summary\"===(null===(t=i[0])||void 0===t?void 0:t.tagName)&&(o=1);var a=i.slice(o),l=a.filter((function(e){return!f(e)}));if((1!==l.length||\"element\"!==l[0].type||!l[0].properties||!(\"data-popup\"in l[0].properties)&&void 0===l[0].properties[\"data-popup\"])&&!l.some((function(e){return\"element\"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&(\"data-popup\"in e.properties||void 0!==e.properties[\"data-popup\"])}))){var d={type:\"element\",tagName:\"div\",properties:{\"data-popup\":\"\"},children:a};e.children=i.slice(0,o).concat([d])}}}}))}}var v=function(t){var s=t.value,f=t.highlightedText,v=o.useRef(null),y=o.useRef(null);a((function(){if(f){var e=setTimeout((function(){if(y.current){var e=y.current.querySelector(\"span.bg-yellow-200\");e&&e.scrollIntoView({behavior:\"smooth\",block:\"center\"})}}),100);return function(){return clearTimeout(e)}}}),[f]);return r(\"div\",e({ref:y,className:\"flex h-[42vh] gap-4\"},{children:[i(\"div\",e({className:\"h-[42vh] flex-1 rounded-xl border border-gray-200 bg-white p-5 shadow-sm\"},{children:i(\"div\",e({className:\"h-full overflow-y-auto pr-2\"},{children:i(l,e({remarkPlugins:[p],rehypePlugins:[d,c,u,g,h],components:{details:function(t){t.node;var o=n(t,[\"node\"]),a=!!o[\"data-inline\"],l=!!o[\"data-target\"];return a?i(\"details\",e({},o,{className:\"md-details md-details--inline relative my-1 inline-block rounded-[8px] align-middle\",onToggle:function(e){e.stopPropagation(),function(e){var n=e.currentTarget,t=n.getAttribute(\"data-inline\");if(t&&v.current){var r=v.current.querySelector('details[data-target=\"'.concat(t,'\"]'));r&&(r.open=n.open)}}(e)}},{children:o.children})):l?r(\"details\",e({},o,{className:\"md-details md-details--target my-2 block\",onToggle:function(e){return e.stopPropagation()}},{children:[i(\"summary\",{className:\"md-target-dummy-summary\",\"aria-hidden\":\"true\"}),o.children]})):i(\"details\",e({},o,{className:\"md-details md-details--block relative my-1 w-full rounded-[8px] align-middle\",onToggle:function(e){return e.stopPropagation()}},{children:o.children}))},summary:function(t){t.node;var r=n(t,[\"node\"]);return i(\"div\",e({className:\"mt-0\"},{children:i(\"summary\",e({className:\"md-summary inline-flex cursor-pointer select-none items-center gap-1 py-1 font-medium hover:opacity-90\",style:{color:\"#19213D\",fontWeight:500},onClick:function(e){return e.stopPropagation()}},r,{children:i(\"span\",e({className:\"whitespace-nowrap align-middle\"},{children:r.children}))}))}))},ul:function(t){t.node;var r=n(t,[\"node\"]);return i(\"ol\",e({className:\"md-ol my-1 list-decimal pl-5\"},r))},ol:function(t){t.node;var r=n(t,[\"node\"]);return i(\"ol\",e({className:\"md-ol my-1 list-decimal pl-5\"},r))},div:function(t){var r,o=t.node,a=n(t,[\"node\"]),l=(null==o?void 0:o.properties)&&(\"data-popup\"in o.properties||void 0!==(null===(r=o.properties)||void 0===r?void 0:r[\"data-popup\"]));return i(\"div\",l?e({},a,{className:(a.className?a.className+\" \":\"\")+\"md-popup\",role:\"region\"}):e({},a))},p:function(e){var n=e.children,t=Array.isArray(n)?n:[n];return i(\"p\",{children:t.map((function(e,n){return\"string\"==typeof e?m(e,f):i(o.Fragment,{children:e},n)}))})},li:function(e){var n=e.children;return i(\"li\",{children:n.map((function(e){return\"string\"==typeof e?m(e,f):e}))})},code:function(t){var r=t.children,o=n(t,[\"children\"]);return i(\"code\",e({},o,{children:r.map((function(e){return\"string\"==typeof e?m(e,f):e}))}))}}},{children:s}))}))})),i(\"style\",{children:\"\\n .md-root strong { color: #19213D !important; }\\n .md-check-green { color: #16A34A !important; font-weight: 500; }\\n details > summary::-webkit-details-marker { display: none; }\\n .md-summary span { white-space: nowrap; }\\n\\n .md-target-dummy-summary { display: none !important; }\\n\\n /* Chevron animation */\\n .md-details[open] > summary .md-chevron { transform: rotate(180deg); transition: transform .25s cubic-bezier(.2,.8,.2,1); }\\n .md-details > summary .md-chevron { transition: transform .25s cubic-bezier(.2,.8,.2,1); }\\n\\n /* Normal details open look */\\n .md-details--block[open] {\\n \\n padding: 8px 10px;\\n border-radius: 8px;\\n }\\n\\n /* Inline trigger never reveals inner content */\\n .md-details--inline > :not(summary) { display: none !important; }\\n\\n /* Target popups (animated) */\\n .md-details--target .md-popup,\\n .md-details--target [data-popup] {\\n display: block;\\n margin-top: 6px;\\n border: 1px solid #6D28D9;\\n color: #6D28D9;\\n border-radius: 10px;\\n padding: 12px;\\n box-shadow: 0 8px 24px rgba(0,0,0,.06);\\n opacity: 0;\\n transform: translateY(-4px);\\n transition: opacity .2s ease, transform .2s ease;\\n font-size: 12px;\\n line-height: 1.35;\\n background: #6D28D91A;\\n }\\n .md-details--target[open] .md-popup,\\n .md-details--target[open] [data-popup] {\\n opacity: 1;\\n transform: translateY(0);\\n }\\n\\n /* Popup body for normal details (✓ items) */\\n .md-details--block[open] .md-popup,\\n .md-details--block[open] [data-popup] {\\n display: block;\\n border: 1px solid #6D28D9;\\n color: #6D28D9;\\n border-radius: 10px;\\n padding: 12px; \\n font-size: 12px;\\n line-height: 1.35;\\n font-weight: 500;\\n background: #6D28D91A;\\n }\\n\\n /* ---- NESTED POPUP GUARD: if a popup is inside a popup, neutralize the inner one ---- */\\n .md-popup .md-popup,\\n .md-popup [data-popup] {\\n border: none !important;\\n background: transparent !important;\\n padding: 0 !important;\\n box-shadow: none !important;\\n color: inherit !important;\\n }\\n \"})]}))};export{v as default};\n//# sourceMappingURL=MarkdownRenderer.js.map\n"],"names":["u","e","s","n","r","i","value","includes","o","split","a","l","length","d","push","type","tagName","properties","className","children","splice","apply","t","m","RegExp","replace","match","forEach","c","f","test","g","slice","filter","some","concat","h","v","highlightedText","useRef","y","setTimeout","current","querySelector","scrollIntoView","behavior","block","clearTimeout","ref","remarkPlugins","p","rehypePlugins","components","details","node","onToggle","stopPropagation","currentTarget","getAttribute","open","summary","style","color","fontWeight","onClick","ul","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AAWnE,EAAE,CAAE,EAACS,GAAG,EAAEwC,EAAE,SAASjD,GAAG,IAAIE,EAAEF,EAAEkB,SAASG,EAAE+C,MAAMC,QAAQnE,GAAGA,EAAE,CAACA,GAAG,OAAOE,EAAE,IAAI,CAACc,SAASG,EAAEiD,KAAK,SAAStE,EAAEE,GAAG,MAAM,iBAAiBF,EAAEsB,EAAEtB,EAAE4B,GAAGxB,EAAEG,EAAEgE,SAAS,CAACrD,SAASlB,GAAGE,EAAG,KAAI,EAAEsE,GAAG,SAASxE,GAAG,IAAIE,EAAEF,EAAEkB,SAAS,OAAOd,EAAE,KAAK,CAACc,SAAShB,EAAEoE,KAAG,SAAWtE,GAAG,MAAM,iBAAiBA,EAAEsB,EAAEtB,EAAE4B,GAAG5B,CAAE,KAAI,EAAEyE,KAAK,SAASpD,GAAG,IAAIlB,EAAEkB,EAAEH,SAASX,EAAEL,EAAEmB,EAAE,CAAC,aAAa,OAAOjB,EAAE,OAAOJ,EAAE,CAAA,EAAGO,EAAE,CAACW,SAASf,EAAEmE,KAAG,SAAWtE,GAAG,MAAM,iBAAiBA,EAAEsB,EAAEtB,EAAE4B,GAAG5B,CAAE,MAAK,IAAI,CAACkB,SAASjB,WAAWG,EAAE,QAAQ,CAACc,SAAS,k5EAAk5E"}
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.js","sources":["../../../../../../../node_modules/@e-llm-studio/citation/dist/features/CitationRenderer/MarkdownRenderer.js"],"sourcesContent":["import{__assign as e,__rest as n,__spreadArray as t}from\"../../node_modules/tslib/tslib.es6.mjs.js\";import{jsxs as r,jsx as i}from\"react/jsx-runtime\";import o,{useEffect as a}from\"react\";import{ReactMarkdown as l}from\"../../node_modules/react-markdown/lib/react-markdown.js\";import d from\"../../node_modules/rehype-raw/lib/index.js\";import p from\"../../node_modules/remark-gfm/lib/index.js\";import{visit as s}from\"../../node_modules/unist-util-visit/lib/index.js\";function m(){return function(e){s(e,\"text\",(function(e,n,r){var i;if(r&&\"string\"==typeof e.value&&e.value.includes(\"✓\")){for(var o=e.value.split(\"✓\"),a=[],l=0;l<o.length;l++){var d=o[l];d&&a.push({type:\"text\",value:d}),l<o.length-1&&a.push({type:\"element\",tagName:\"span\",properties:{className:[\"text-green-600\",\"font-medium\",\"inline-block\",\"mr-1\",\"align-middle\"]},children:[{type:\"text\",value:\"✓\"}]})}return(i=r.children).splice.apply(i,t([n,1],a,!1)),n+a.length}}))}}var u=function(n,t){if(!t||!t.trim())return n;var r=new RegExp(\"(\".concat(t.replace(/[-[\\]/{}()*+?.\\\\^$|]/g,\"\\\\$&\"),\")\"),\"gi\");return n.split(r).map((function(n,t){return r.test(n)?i(\"mark\",e({className:\"custom-highlight\"},{children:n}),t):n}))};function c(){return function(e){s(e,\"element\",(function(e,n,t){if(t&&\"p\"===e.tagName)return e.children&&1===e.children.length&&\"element\"===e.children[0].type&&\"details\"===e.children[0].tagName?(t.children.splice(n,1,e.children[0]),n):void 0}))}}var f=function(e){var n;return\"text\"===(null==e?void 0:e.type)&&/^\\s*$/.test(null!==(n=e.value)&&void 0!==n?n:\"\")};function g(){return function(e){s(e,\"element\",(function(e){var n,t;if(\"details\"===e.tagName&&\"data-target\"in(e.properties||{})){var r=e.children||[],i=0;\"element\"===(null===(n=r[0])||void 0===n?void 0:n.type)&&\"summary\"===(null===(t=r[0])||void 0===t?void 0:t.tagName)&&(i=1);var o=r.slice(i),a=o.filter((function(e){return!f(e)}));if((1!==a.length||\"element\"!==a[0].type||!a[0].properties||!(\"data-popup\"in a[0].properties)&&void 0===a[0].properties[\"data-popup\"])&&!a.some((function(e){return\"element\"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&(\"data-popup\"in e.properties||void 0!==e.properties[\"data-popup\"])}))){var l={type:\"element\",tagName:\"div\",properties:{\"data-popup\":\"\"},children:o};e.children=r.slice(0,i).concat([l])}}}))}}function h(){return function(e){s(e,\"element\",(function(e){var n,t;if(\"details\"===e.tagName){var r=e.properties||{};if(!(\"data-inline\"in r)&&!(\"data-target\"in r)){var i=e.children||[],o=0;\"element\"===(null===(n=i[0])||void 0===n?void 0:n.type)&&\"summary\"===(null===(t=i[0])||void 0===t?void 0:t.tagName)&&(o=1);var a=i.slice(o),l=a.filter((function(e){return!f(e)}));if((1!==l.length||\"element\"!==l[0].type||!l[0].properties||!(\"data-popup\"in l[0].properties)&&void 0===l[0].properties[\"data-popup\"])&&!l.some((function(e){return\"element\"===(null==e?void 0:e.type)&&(null==e?void 0:e.properties)&&(\"data-popup\"in e.properties||void 0!==e.properties[\"data-popup\"])}))){var d={type:\"element\",tagName:\"div\",properties:{\"data-popup\":\"\"},children:a};e.children=i.slice(0,o).concat([d])}}}}))}}var v=function(t){var s=t.value,f=t.highlightedText,v=o.useRef(null),y=o.useRef(null);a((function(){if(f){var e=setTimeout((function(){if(y.current){var e=y.current.querySelector(\"mark.custom-highlight\");e&&e.scrollIntoView({behavior:\"smooth\",block:\"center\"})}}),100);return function(){return clearTimeout(e)}}}),[f,s]);return r(\"div\",e({ref:y,className:\"flex h-[42vh] gap-4\"},{children:[i(\"div\",e({className:\"h-[42vh] flex-1 rounded-xl border border-gray-200 bg-white p-5 shadow-sm\"},{children:i(\"div\",e({ref:y,className:\"h-full overflow-y-auto pr-2\"},{children:i(l,e({remarkPlugins:[p],rehypePlugins:[d,c,m,g,h],components:{details:function(t){t.node;var o=n(t,[\"node\"]),a=!!o[\"data-inline\"],l=!!o[\"data-target\"];return a?i(\"details\",e({},o,{className:\"md-details md-details--inline relative my-1 inline-block rounded-[8px] align-middle\",onToggle:function(e){e.stopPropagation(),function(e){var n=e.currentTarget,t=n.getAttribute(\"data-inline\");if(t&&v.current){var r=v.current.querySelector('details[data-target=\"'.concat(t,'\"]'));r&&(r.open=n.open)}}(e)}},{children:o.children})):l?r(\"details\",e({},o,{className:\"md-details md-details--target my-2 block\",onToggle:function(e){return e.stopPropagation()}},{children:[i(\"summary\",{className:\"md-target-dummy-summary\",\"aria-hidden\":\"true\"}),o.children]})):i(\"details\",e({},o,{className:\"md-details md-details--block relative my-1 w-full rounded-[8px] align-middle\",onToggle:function(e){return e.stopPropagation()}},{children:o.children}))},summary:function(t){t.node;var r=n(t,[\"node\"]);return i(\"div\",e({className:\"mt-0\"},{children:i(\"summary\",e({className:\"md-summary inline-flex cursor-pointer select-none items-center gap-1 py-1 font-medium hover:opacity-90\",style:{color:\"#19213D\",fontWeight:500},onClick:function(e){return e.stopPropagation()}},r,{children:i(\"span\",e({className:\"whitespace-nowrap align-middle\"},{children:r.children}))}))}))},ul:function(t){t.node;var r=n(t,[\"node\"]);return i(\"ol\",e({className:\"md-ol my-1 list-decimal pl-5\"},r))},ol:function(t){t.node;var r=n(t,[\"node\"]);return i(\"ol\",e({className:\"md-ol my-1 list-decimal pl-5\"},r))},div:function(t){var r,o=t.node,a=n(t,[\"node\"]),l=(null==o?void 0:o.properties)&&(\"data-popup\"in o.properties||void 0!==(null===(r=o.properties)||void 0===r?void 0:r[\"data-popup\"]));return i(\"div\",l?e({},a,{className:(a.className?a.className+\" \":\"\")+\"md-popup\",role:\"region\"}):e({},a))},p:function(e){var n=e.children,t=Array.isArray(n)?n:[n];return i(\"p\",{children:t.map((function(e,n){return\"string\"==typeof e?u(e,f):i(o.Fragment,{children:e},n)}))})},li:function(n){var t=n.children;return i(\"li\",e({style:{marginBottom:\"4px\"}},{children:t.map((function(e){return\"string\"==typeof e?u(e,f):e}))}))},code:function(t){var r=t.children,o=n(t,[\"children\"]);return i(\"code\",e({},o,{children:r.map((function(e){return\"string\"==typeof e?u(e,f):e}))}))}}},{children:s}))}))})),i(\"style\",{children:\"\\n .custom-highlight {\\n background-color: #fef08a; \\n color: #374151; \\n padding: 2px 4px;\\n border-radius: 4px;\\n }\\n .md-root strong { color: #19213D !important; }\\n .md-check-green { color: #16A34A !important; font-weight: 500; }\\n details > summary::-webkit-details-marker { display: none; }\\n .md-summary span { white-space: nowrap; }\\n\\n .md-target-dummy-summary { display: none !important; }\\n\\n /* Chevron animation */\\n .md-details[open] > summary .md-chevron { transform: rotate(180deg); transition: transform .25s cubic-bezier(.2,.8,.2,1); }\\n .md-details > summary .md-chevron { transition: transform .25s cubic-bezier(.2,.8,.2,1); }\\n\\n /* Normal details open look */\\n .md-details--block[open] {\\n \\n padding: 8px 10px;\\n border-radius: 8px;\\n }\\n\\n /* Inline trigger never reveals inner content */\\n .md-details--inline > :not(summary) { display: none !important; }\\n\\n /* Target popups (animated) */\\n .md-details--target .md-popup,\\n .md-details--target [data-popup] {\\n display: block;\\n margin-top: 6px;\\n border: 1px solid #6D28D9;\\n color: #6D28D9;\\n border-radius: 10px;\\n padding: 12px;\\n box-shadow: 0 8px 24px rgba(0,0,0,.06);\\n opacity: 0;\\n transform: translateY(-4px);\\n transition: opacity .2s ease, transform .2s ease;\\n font-size: 12px;\\n line-height: 1.35;\\n background: #6D28D91A;\\n }\\n .md-details--target[open] .md-popup,\\n .md-details--target[open] [data-popup] {\\n opacity: 1;\\n transform: translateY(0);\\n }\\n\\n /* Popup body for normal details (✓ items) */\\n .md-details--block[open] .md-popup,\\n .md-details--block[open] [data-popup] {\\n display: block;\\n border: 1px solid #6D28D9;\\n color: #6D28D9;\\n border-radius: 10px;\\n padding: 12px; \\n font-size: 12px;\\n line-height: 1.35;\\n font-weight: 500;\\n background: #6D28D91A;\\n }\\n\\n /* ---- NESTED POPUP GUARD: if a popup is inside a popup, neutralize the inner one ---- */\\n .md-popup .md-popup,\\n .md-popup [data-popup] {\\n border: none !important;\\n background: transparent !important;\\n padding: 0 !important;\\n box-shadow: none !important;\\n color: inherit !important;\\n }\\n \"})]}))};export{v as default};\n//# sourceMappingURL=MarkdownRenderer.js.map\n"],"names":["m","e","s","n","r","i","value","includes","o","split","a","l","length","d","push","type","tagName","properties","className","children","splice","apply","t","u","trim","RegExp","concat","replace","map","test","c","f","g","slice","filter","some","h","v","highlightedText","useRef","y","setTimeout","current","querySelector","scrollIntoView","behavior","block","clearTimeout","ref","remarkPlugins","p","rehypePlugins","components","details","node","onToggle","stopPropagation","currentTarget","getAttribute","open","summary","style","color","fontWeight","onClick","ul","ol","div","role","Array","isArray","Fragment","li","marginBottom","code"],"mappings":"gdAAgd,SAASA,IAAI,OAAO,SAASC,GAAGC,EAAED,EAAE,QAAQ,SAASA,EAAEE,EAAEC,GAAG,IAAIC,EAAE,GAAGD,GAAG,iBAAiBH,EAAEK,OAAOL,EAAEK,MAAMC,SAAS,KAAK,CAAC,IAAI,IAAIC,EAAEP,EAAEK,MAAMG,MAAM,KAAKC,EAAE,GAAGC,EAAE,EAAEA,EAAEH,EAAEI,OAAOD,IAAI,CAAC,IAAIE,EAAEL,EAAEG,GAAGE,GAAGH,EAAEI,KAAK,CAACC,KAAK,OAAOT,MAAMO,IAAIF,EAAEH,EAAEI,OAAO,GAAGF,EAAEI,KAAK,CAACC,KAAK,UAAUC,QAAQ,OAAOC,WAAW,CAACC,UAAU,CAAC,iBAAiB,cAAc,eAAe,OAAO,iBAAiBC,SAAS,CAAC,CAACJ,KAAK,OAAOT,MAAM,OAAO,CAAC,OAAOD,EAAED,EAAEe,UAAUC,OAAOC,MAAMhB,EAAEiB,EAAE,CAACnB,EAAE,GAAGO,GAAE,IAAKP,EAAEO,EAAEE,MAAM,CAAE,GAAE,CAAC,CAAC,IAAIW,EAAE,SAASpB,EAAEmB,GAAG,IAAIA,IAAIA,EAAEE,OAAO,OAAOrB,EAAE,IAAIC,EAAE,IAAIqB,OAAO,IAAIC,OAAOJ,EAAEK,QAAQ,wBAAwB,QAAQ,KAAK,MAAM,OAAOxB,EAAEM,MAAML,GAAGwB,cAAczB,EAAEmB,GAAG,OAAOlB,EAAEyB,KAAK1B,GAAGE,EAAE,OAAOJ,EAAE,CAACiB,UAAU,oBAAoB,CAACC,SAAShB,IAAImB,GAAGnB,CAAE,GAAE,EAAE,SAAS2B,IAAI,OAAO,SAAS7B,GAAGC,EAAED,EAAE,WAAS,SAAWA,EAAEE,EAAEmB,GAAG,GAAGA,GAAG,MAAMrB,EAAEe,QAAQ,OAAOf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,EAAE,CAAE,EAACS,GAAG,EAAEwC,EAAE,SAASjD,GAAG,IAAIE,EAAEF,EAAEkB,SAASG,EAAE+C,MAAMC,QAAQnE,GAAGA,EAAE,CAACA,GAAG,OAAOE,EAAE,IAAI,CAACc,SAASG,EAAEM,KAAK,SAAS3B,EAAEE,GAAG,MAAM,iBAAiBF,EAAEsB,EAAEtB,EAAE8B,GAAG1B,EAAEG,EAAE+D,SAAS,CAACpD,SAASlB,GAAGE,EAAG,KAAI,EAAEqE,GAAG,SAASrE,GAAG,IAAImB,EAAEnB,EAAEgB,SAAS,OAAOd,EAAE,KAAKJ,EAAE,CAAC4D,MAAM,CAACY,aAAa,QAAQ,CAACtD,SAASG,EAAEM,KAAK,SAAS3B,GAAG,MAAM,iBAAiBA,EAAEsB,EAAEtB,EAAE8B,GAAG9B,CAAE,MAAK,EAAEyE,KAAK,SAASpD,GAAG,IAAIlB,EAAEkB,EAAEH,SAASX,EAAEL,EAAEmB,EAAE,CAAC,aAAa,OAAOjB,EAAE,OAAOJ,EAAE,CAAA,EAAGO,EAAE,CAACW,SAASf,EAAEwB,KAAG,SAAW3B,GAAG,MAAM,iBAAiBA,EAAEsB,EAAEtB,EAAE8B,GAAG9B,CAAE,MAAK,IAAI,CAACkB,SAASjB,WAAWG,EAAE,QAAQ,CAACc,SAAS,ikFAAikF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"../node_modules/escape-string-regexp/index.js";import{visitParents as t}from"
|
|
1
|
+
import e from"../node_modules/escape-string-regexp/index.js";import{visitParents as t}from"../node_modules/unist-util-visit-parents/lib/index.js";import{convert as n}from"../node_modules/unist-util-is/lib/index.js";const r={}.hasOwnProperty,i=function(e,i,s,u){let c,p;"string"==typeof i||i instanceof RegExp?(p=[[i,s]],c=u):(p=i,c=s),c||(c={});const f=n(c.ignore||[]),a=function(e){const t=[];if("object"!=typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let n=-1;for(;++n<e.length;)t.push([o(e[n][0]),l(e[n][1])])}else{let n;for(n in e)r.call(e,n)&&t.push([o(n),l(e[n])])}return t}(p);let d=-1;for(;++d<a.length;)t(e,"text",h);return e;function h(e,t){let n,r=-1;for(;++r<t.length;){const e=t[r];if(f(e,n?n.children.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=a[d][0],i=a[d][1];let o=0;const l=n.children.indexOf(e);let s=!1,u=[];r.lastIndex=0;let c=r.exec(e.value);for(;c;){const n=c.index,l={index:c.index,input:c.input,stack:[...t,e]};let p=i(...c,l);if("string"==typeof p&&(p=p.length>0?{type:"text",value:p}:void 0),!1!==p&&(o!==n&&u.push({type:"text",value:e.value.slice(o,n)}),Array.isArray(p)?u.push(...p):p&&u.push(p),o=n+c[0].length,s=!0),!r.global)break;c=r.exec(e.value)}s?(o<e.value.length&&u.push({type:"text",value:e.value.slice(o)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}};function o(t){return"string"==typeof t?new RegExp(e(t),"g"):t}function l(e){return"function"==typeof e?e:()=>e}export{i as findAndReplace};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-find-and-replace/lib/index.js"],"sourcesContent":["/**\n * @import {Nodes, Parents, PhrasingContent, Root, Text} from 'mdast'\n * @import {BuildVisitor, Test, VisitorResult} from 'unist-util-visit-parents'\n */\n\n/**\n * @typedef RegExpMatchObject\n * Info on the match.\n * @property {number} index\n * The index of the search at which the result was found.\n * @property {string} input\n * A copy of the search string in the text node.\n * @property {[...Array<Parents>, Text]} stack\n * All ancestors of the text node, where the last node is the text itself.\n *\n * @typedef {RegExp | string} Find\n * Pattern to find.\n *\n * Strings are escaped and then turned into global expressions.\n *\n * @typedef {Array<FindAndReplaceTuple>} FindAndReplaceList\n * Several find and replaces, in array form.\n *\n * @typedef {[Find, Replace?]} FindAndReplaceTuple\n * Find and replace in tuple form.\n *\n * @typedef {ReplaceFunction | string | null | undefined} Replace\n * Thing to replace with.\n *\n * @callback ReplaceFunction\n * Callback called when a search matches.\n * @param {...any} parameters\n * The parameters are the result of corresponding search expression:\n *\n * * `value` (`string`) — whole match\n * * `...capture` (`Array<string>`) — matches from regex capture groups\n * * `match` (`RegExpMatchObject`) — info on the match\n * @returns {Array<PhrasingContent> | PhrasingContent | string | false | null | undefined}\n * Thing to replace with.\n *\n * * when `null`, `undefined`, `''`, remove the match\n * * …or when `false`, do not replace at all\n * * …or when `string`, replace with a text node of that value\n * * …or when `Node` or `Array<Node>`, replace with those nodes\n *\n * @typedef {[RegExp, ReplaceFunction]} Pair\n * Normalized find and replace.\n *\n * @typedef {Array<Pair>} Pairs\n * All find and replaced.\n *\n * @typedef Options\n * Configuration.\n * @property {Test | null | undefined} [ignore]\n * Test for which nodes to ignore (optional).\n */\n\nimport escape from 'escape-string-regexp'\nimport {visitParents} from 'unist-util-visit-parents'\nimport {convert} from 'unist-util-is'\n\n/**\n * Find patterns in a tree and replace them.\n *\n * The algorithm searches the tree in *preorder* for complete values in `Text`\n * nodes.\n * Partial matches are not supported.\n *\n * @param {Nodes} tree\n * Tree to change.\n * @param {FindAndReplaceList | FindAndReplaceTuple} list\n * Patterns to find.\n * @param {Options | null | undefined} [options]\n * Configuration (when `find` is not `Find`).\n * @returns {undefined}\n * Nothing.\n */\nexport function findAndReplace(tree, list, options) {\n const settings = options || {}\n const ignored = convert(settings.ignore || [])\n const pairs = toPairs(list)\n let pairIndex = -1\n\n while (++pairIndex < pairs.length) {\n visitParents(tree, 'text', visitor)\n }\n\n /** @type {BuildVisitor<Root, 'text'>} */\n function visitor(node, parents) {\n let index = -1\n /** @type {Parents | undefined} */\n let grandparent\n\n while (++index < parents.length) {\n const parent = parents[index]\n /** @type {Array<Nodes> | undefined} */\n const siblings = grandparent ? grandparent.children : undefined\n\n if (\n ignored(\n parent,\n siblings ? siblings.indexOf(parent) : undefined,\n grandparent\n )\n ) {\n return\n }\n\n grandparent = parent\n }\n\n if (grandparent) {\n return handler(node, parents)\n }\n }\n\n /**\n * Handle a text node which is not in an ignored parent.\n *\n * @param {Text} node\n * Text node.\n * @param {Array<Parents>} parents\n * Parents.\n * @returns {VisitorResult}\n * Result.\n */\n function handler(node, parents) {\n const parent = parents[parents.length - 1]\n const find = pairs[pairIndex][0]\n const replace = pairs[pairIndex][1]\n let start = 0\n /** @type {Array<Nodes>} */\n const siblings = parent.children\n const index = siblings.indexOf(node)\n let change = false\n /** @type {Array<PhrasingContent>} */\n let nodes = []\n\n find.lastIndex = 0\n\n let match = find.exec(node.value)\n\n while (match) {\n const position = match.index\n /** @type {RegExpMatchObject} */\n const matchObject = {\n index: match.index,\n input: match.input,\n stack: [...parents, node]\n }\n let value = replace(...match, matchObject)\n\n if (typeof value === 'string') {\n value = value.length > 0 ? {type: 'text', value} : undefined\n }\n\n // It wasn’t a match after all.\n if (value === false) {\n // False acts as if there was no match.\n // So we need to reset `lastIndex`, which currently being at the end of\n // the current match, to the beginning.\n find.lastIndex = position + 1\n } else {\n if (start !== position) {\n nodes.push({\n type: 'text',\n value: node.value.slice(start, position)\n })\n }\n\n if (Array.isArray(value)) {\n nodes.push(...value)\n } else if (value) {\n nodes.push(value)\n }\n\n start = position + match[0].length\n change = true\n }\n\n if (!find.global) {\n break\n }\n\n match = find.exec(node.value)\n }\n\n if (change) {\n if (start < node.value.length) {\n nodes.push({type: 'text', value: node.value.slice(start)})\n }\n\n parent.children.splice(index, 1, ...nodes)\n } else {\n nodes = [node]\n }\n\n return index + nodes.length\n }\n}\n\n/**\n * Turn a tuple or a list of tuples into pairs.\n *\n * @param {FindAndReplaceList | FindAndReplaceTuple} tupleOrList\n * Schema.\n * @returns {Pairs}\n * Clean pairs.\n */\nfunction toPairs(tupleOrList) {\n /** @type {Pairs} */\n const result = []\n\n if (!Array.isArray(tupleOrList)) {\n throw new TypeError('Expected find and replace tuple or list of tuples')\n }\n\n /** @type {FindAndReplaceList} */\n // @ts-expect-error: correct.\n const list =\n !tupleOrList[0] || Array.isArray(tupleOrList[0])\n ? tupleOrList\n : [tupleOrList]\n\n let index = -1\n\n while (++index < list.length) {\n const tuple = list[index]\n result.push([toExpression(tuple[0]), toFunction(tuple[1])])\n }\n\n return result\n}\n\n/**\n * Turn a find into an expression.\n *\n * @param {Find} find\n * Find.\n * @returns {RegExp}\n * Expression.\n */\nfunction toExpression(find) {\n return typeof find === 'string' ? new RegExp(escape(find), 'g') : find\n}\n\n/**\n * Turn a replace into a function.\n *\n * @param {Replace} replace\n * Replace.\n * @returns {ReplaceFunction}\n * Function.\n */\nfunction toFunction(replace) {\n return typeof replace === 'function'\n ? replace\n : function () {\n return replace\n }\n}\n"],"names":["findAndReplace","tree","list","options","ignored","convert","ignore","pairs","tupleOrList","result","Array","isArray","TypeError","index","length","tuple","push","toExpression","toFunction","toPairs","pairIndex","visitParents","visitor","node","parents","grandparent","parent","siblings","children","undefined","indexOf","find","replace","start","change","nodes","lastIndex","match","exec","value","position","matchObject","input","stack","type","slice","global","splice","handler","RegExp","escape"],"mappings":"mMA6EO,SAASA,EAAeC,EAAMC,EAAMC,GACzC,MACMC,EAAUC,GADCF,GAAW,CAAE,GACGG,QAAU,IACrCC,EAiIR,SAAiBC,GAEf,MAAMC,EAAS,GAEf,IAAKC,MAAMC,QAAQH,GACjB,MAAM,IAAII,UAAU,qDAKtB,MAAMV,GACHM,EAAY,IAAME,MAAMC,QAAQH,EAAY,IACzCA,EACA,CAACA,GAEP,IAAIK,GAAS,EAEb,OAASA,EAAQX,EAAKY,QAAQ,CAC5B,MAAMC,EAAQb,EAAKW,GACnBJ,EAAOO,KAAK,CAACC,EAAaF,EAAM,IAAKG,EAAWH,EAAM,KACvD,CAED,OAAON,CACT,CAxJgBU,CAAQjB,GACtB,IAAIkB,GAAa,EAEjB,OAASA,EAAYb,EAAMO,QACzBO,EAAapB,EAAM,OAAQqB,GAI7B,SAASA,EAAQC,EAAMC,GACrB,IAEIC,EAFAZ,GAAS,EAIb,O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AEpCA,EAAQ,CAACZ,GAGX,OAAOV,EAAQsB,EAAMrB,MACtB,CAtFUkC,CAAQzB,EAAMC,EAExB,CAqFH,CA2CA,SAASP,EAAac,GACpB,MAAuB,iBAATA,EAAoB,IAAIkB,OAAOC,EAAOnB,GAAO,KAAOA,CACpE,CAUA,SAASb,EAAWc,GAClB,MAA0B,mBAAZA,EACVA,EACA,WACE,OAAOA,CACR,CACP"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-find-and-replace/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Parent} MdastParent\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').Text} Text\n * @typedef {import('unist-util-visit-parents').Test} Test\n * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult\n */\n\n/**\n * @typedef {Content | Root} Node\n * @typedef {Extract<Node, MdastParent>} Parent\n * @typedef {Exclude<Parent, Root>} ContentParent\n *\n * @typedef RegExpMatchObject\n * Info on the match.\n * @property {number} index\n * The index of the search at which the result was found.\n * @property {string} input\n * A copy of the search string in the text node.\n * @property {[Root, ...Array<ContentParent>, Text]} stack\n * All ancestors of the text node, where the last node is the text itself.\n *\n * @callback ReplaceFunction\n * Callback called when a search matches.\n * @param {...any} parameters\n * The parameters are the result of corresponding search expression:\n *\n * * `value` (`string`) — whole match\n * * `...capture` (`Array<string>`) — matches from regex capture groups\n * * `match` (`RegExpMatchObject`) — info on the match\n * @returns {Array<PhrasingContent> | PhrasingContent | string | false | undefined | null}\n * Thing to replace with.\n *\n * * when `null`, `undefined`, `''`, remove the match\n * * …or when `false`, do not replace at all\n * * …or when `string`, replace with a text node of that value\n * * …or when `Node` or `Array<Node>`, replace with those nodes\n *\n * @typedef {string | RegExp} Find\n * Pattern to find.\n *\n * Strings are escaped and then turned into global expressions.\n *\n * @typedef {Array<FindAndReplaceTuple>} FindAndReplaceList\n * Several find and replaces, in array form.\n * @typedef {Record<string, Replace>} FindAndReplaceSchema\n * Several find and replaces, in object form.\n * @typedef {[Find, Replace]} FindAndReplaceTuple\n * Find and replace in tuple form.\n * @typedef {string | ReplaceFunction} Replace\n * Thing to replace with.\n * @typedef {[RegExp, ReplaceFunction]} Pair\n * Normalized find and replace.\n * @typedef {Array<Pair>} Pairs\n * All find and replaced.\n *\n * @typedef Options\n * Configuration.\n * @property {Test | null | undefined} [ignore]\n * Test for which nodes to ignore.\n */\n\nimport escape from 'escape-string-regexp'\nimport {visitParents} from 'unist-util-visit-parents'\nimport {convert} from 'unist-util-is'\n\nconst own = {}.hasOwnProperty\n\n/**\n * Find patterns in a tree and replace them.\n *\n * The algorithm searches the tree in *preorder* for complete values in `Text`\n * nodes.\n * Partial matches are not supported.\n *\n * @param tree\n * Tree to change.\n * @param find\n * Patterns to find.\n * @param replace\n * Things to replace with (when `find` is `Find`) or configuration.\n * @param options\n * Configuration (when `find` is not `Find`).\n * @returns\n * Given, modified, tree.\n */\n// To do: next major: remove `find` & `replace` combo, remove schema.\nexport const findAndReplace =\n /**\n * @type {(\n * (<Tree extends Node>(tree: Tree, find: Find, replace?: Replace | null | undefined, options?: Options | null | undefined) => Tree) &\n * (<Tree extends Node>(tree: Tree, schema: FindAndReplaceSchema | FindAndReplaceList, options?: Options | null | undefined) => Tree)\n * )}\n **/\n (\n /**\n * @template {Node} Tree\n * @param {Tree} tree\n * @param {Find | FindAndReplaceSchema | FindAndReplaceList} find\n * @param {Replace | Options | null | undefined} [replace]\n * @param {Options | null | undefined} [options]\n * @returns {Tree}\n */\n function (tree, find, replace, options) {\n /** @type {Options | null | undefined} */\n let settings\n /** @type {FindAndReplaceSchema|FindAndReplaceList} */\n let schema\n\n if (typeof find === 'string' || find instanceof RegExp) {\n // @ts-expect-error don’t expect options twice.\n schema = [[find, replace]]\n settings = options\n } else {\n schema = find\n // @ts-expect-error don’t expect replace twice.\n settings = replace\n }\n\n if (!settings) {\n settings = {}\n }\n\n const ignored = convert(settings.ignore || [])\n const pairs = toPairs(schema)\n let pairIndex = -1\n\n while (++pairIndex < pairs.length) {\n visitParents(tree, 'text', visitor)\n }\n\n // To do next major: don’t return the given tree.\n return tree\n\n /** @type {import('unist-util-visit-parents/complex-types.js').BuildVisitor<Root, 'text'>} */\n function visitor(node, parents) {\n let index = -1\n /** @type {Parent | undefined} */\n let grandparent\n\n while (++index < parents.length) {\n const parent = parents[index]\n\n if (\n ignored(\n parent,\n // @ts-expect-error: TS doesn’t understand but it’s perfect.\n grandparent ? grandparent.children.indexOf(parent) : undefined,\n grandparent\n )\n ) {\n return\n }\n\n grandparent = parent\n }\n\n if (grandparent) {\n return handler(node, parents)\n }\n }\n\n /**\n * Handle a text node which is not in an ignored parent.\n *\n * @param {Text} node\n * Text node.\n * @param {Array<Parent>} parents\n * Parents.\n * @returns {VisitorResult}\n * Result.\n */\n function handler(node, parents) {\n const parent = parents[parents.length - 1]\n const find = pairs[pairIndex][0]\n const replace = pairs[pairIndex][1]\n let start = 0\n // @ts-expect-error: TS is wrong, some of these children can be text.\n const index = parent.children.indexOf(node)\n let change = false\n /** @type {Array<PhrasingContent>} */\n let nodes = []\n\n find.lastIndex = 0\n\n let match = find.exec(node.value)\n\n while (match) {\n const position = match.index\n /** @type {RegExpMatchObject} */\n const matchObject = {\n index: match.index,\n input: match.input,\n // @ts-expect-error: stack is fine.\n stack: [...parents, node]\n }\n let value = replace(...match, matchObject)\n\n if (typeof value === 'string') {\n value = value.length > 0 ? {type: 'text', value} : undefined\n }\n\n // It wasn’t a match after all.\n if (value !== false) {\n if (start !== position) {\n nodes.push({\n type: 'text',\n value: node.value.slice(start, position)\n })\n }\n\n if (Array.isArray(value)) {\n nodes.push(...value)\n } else if (value) {\n nodes.push(value)\n }\n\n start = position + match[0].length\n change = true\n }\n\n if (!find.global) {\n break\n }\n\n match = find.exec(node.value)\n }\n\n if (change) {\n if (start < node.value.length) {\n nodes.push({type: 'text', value: node.value.slice(start)})\n }\n\n parent.children.splice(index, 1, ...nodes)\n } else {\n nodes = [node]\n }\n\n return index + nodes.length\n }\n }\n )\n\n/**\n * Turn a schema into pairs.\n *\n * @param {FindAndReplaceSchema | FindAndReplaceList} schema\n * Schema.\n * @returns {Pairs}\n * Clean pairs.\n */\nfunction toPairs(schema) {\n /** @type {Pairs} */\n const result = []\n\n if (typeof schema !== 'object') {\n throw new TypeError('Expected array or object as schema')\n }\n\n if (Array.isArray(schema)) {\n let index = -1\n\n while (++index < schema.length) {\n result.push([\n toExpression(schema[index][0]),\n toFunction(schema[index][1])\n ])\n }\n } else {\n /** @type {string} */\n let key\n\n for (key in schema) {\n if (own.call(schema, key)) {\n result.push([toExpression(key), toFunction(schema[key])])\n }\n }\n }\n\n return result\n}\n\n/**\n * Turn a find into an expression.\n *\n * @param {Find} find\n * Find.\n * @returns {RegExp}\n * Expression.\n */\nfunction toExpression(find) {\n return typeof find === 'string' ? new RegExp(escape(find), 'g') : find\n}\n\n/**\n * Turn a replace into a function.\n *\n * @param {Replace} replace\n * Replace.\n * @returns {ReplaceFunction}\n * Function.\n */\nfunction toFunction(replace) {\n return typeof replace === 'function' ? replace : () => replace\n}\n"],"names":["own","hasOwnProperty","findAndReplace","tree","find","replace","options","settings","schema","RegExp","ignored","convert","ignore","pairs","result","TypeError","Array","isArray","index","length","push","toExpression","toFunction","key","call","toPairs","pairIndex","visitParents","visitor","node","parents","grandparent","parent","children","indexOf","undefined","start","change","nodes","lastIndex","match","exec","value","position","matchObject","input","stack","type","slice","global","splice","handler","escape"],"mappings":"uNAoEA,MAAMA,EAAM,CAAE,EAACC,eAqBFC,EAOb,SAScC,EAAMC,EAAMC,EAASC,GAE7B,IAAIC,EAEAC,EAEgB,iBAATJ,GAAqBA,aAAgBK,QAE9CD,EAAS,CAAC,CAACJ,EAAMC,IACjBE,EAAWD,IAEXE,EAASJ,EAETG,EAAWF,GAGRE,IACHA,EAAW,CAAE,GAGf,MAAMG,EAAUC,EAAQJ,EAASK,QAAU,IACr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TA,EAAQA,EAAMvB,OAAS,EAAI,CAAC4B,KAAM,OAAQL,cAASP,IAIvC,IAAVO,IACEN,IAAUO,GACZL,EAAMlB,KAAK,CACT2B,KAAM,OACNL,MAAOb,EAAKa,MAAMM,MAAMZ,EAAOO,KAI/B3B,MAAMC,QAAQyB,GAChBJ,EAAMlB,QAAQsB,GACLA,GACTJ,EAAMlB,KAAKsB,GAGbN,EAAQO,EAAWH,EAAM,GAAGrB,OAC5BkB,GAAS,IAGNjC,EAAK6C,OACR,MAGFT,EAAQpC,EAAKqC,KAAKZ,EAAKa,MACxB,CAEGL,GACED,EAAQP,EAAKa,MAAMvB,QACrBmB,EAAMlB,KAAK,CAAC2B,KAAM,OAAQL,MAAOb,EAAKa,MAAMM,MAAMZ,KAGpDJ,EAAOC,SAASiB,OAAOhC,EAAO,KAAMoB,IAEpCA,EAAQ,CAACT,GAGX,OAAOX,EAAQoB,EAAMnB,MACtB,CAjFUgC,CAAQtB,EAAMC,EAExB,CAiFJ,EAiDH,SAAST,EAAajB,GACpB,MAAuB,iBAATA,EAAoB,IAAIK,OAAO2C,EAAOhD,GAAO,KAAOA,CACpE,CAUA,SAASkB,EAAWjB,GAClB,MAA0B,mBAAZA,EAAyBA,EAAU,IAAMA,CACzD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const t=function(e){if(null==e)return r;if("string"==typeof e)return function(t){return n(r);function r(n){return n&&n.type===t}}(e);if("object"==typeof e)return Array.isArray(e)?function(r){const e=[];let o=-1;for(;++o<r.length;)e[o]=t(r[o]);return n(u);function u(...t){let n=-1;for(;++n<e.length;)if(e[n].call(this,...t))return!0;return!1}}(e):function(t){return n(r);function r(n){let r;for(r in t)if(n[r]!==t[r])return!1;return!0}}(e);if("function"==typeof e)return n(e);throw new Error("Expected function, string, or object as test")};function n(t){return function(n,...r){return Boolean(n&&"object"==typeof n&&"type"in n&&Boolean(t.call(this,n,...r)))}}function r(){return!0}export{t as convert};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/dist/node_modules/mdast-util-find-and-replace/node_modules/unist-util-is/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/mdast-util-find-and-replace/node_modules/unist-util-is/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n */\n\n/**\n * @typedef {Record<string, unknown>} Props\n * @typedef {null | undefined | string | Props | TestFunctionAnything | Array<string | Props | TestFunctionAnything>} Test\n * Check for an arbitrary node, unaware of TypeScript inferral.\n *\n * @callback TestFunctionAnything\n * Check if a node passes a test, unaware of TypeScript inferral.\n * @param {unknown} this\n * The given context.\n * @param {Node} node\n * A node.\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean | void}\n * Whether this node passes the test.\n */\n\n/**\n * @template {Node} Kind\n * Node type.\n * @typedef {Kind['type'] | Partial<Kind> | TestFunctionPredicate<Kind> | Array<Kind['type'] | Partial<Kind> | TestFunctionPredicate<Kind>>} PredicateTest\n * Check for a node that can be inferred by TypeScript.\n */\n\n/**\n * Check if a node passes a certain test.\n *\n * @template {Node} Kind\n * Node type.\n * @callback TestFunctionPredicate\n * Complex test function for a node that can be inferred by TypeScript.\n * @param {Node} node\n * A node.\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {node is Kind}\n * Whether this node passes the test.\n */\n\n/**\n * @callback AssertAnything\n * Check that an arbitrary value is a node, unaware of TypeScript inferral.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {boolean}\n * Whether this is a node and passes a test.\n */\n\n/**\n * Check if a node is a node and passes a certain node test.\n *\n * @template {Node} Kind\n * Node type.\n * @callback AssertPredicate\n * Check that an arbitrary value is a specific node, aware of TypeScript.\n * @param {unknown} [node]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * The node’s position in its parent.\n * @param {Parent | null | undefined} [parent]\n * The node’s parent.\n * @returns {node is Kind}\n * Whether this is a node and passes a test.\n */\n\n/**\n * Check if `node` is a `Node` and whether it passes the given test.\n *\n * @param node\n * Thing to check, typically `Node`.\n * @param test\n * A check for a specific node.\n * @param index\n * The node’s position in its parent.\n * @param parent\n * The node’s parent.\n * @returns\n * Whether `node` is a node and passes a test.\n */\nexport const is =\n /**\n * @type {(\n * (() => false) &\n * (<Kind extends Node = Node>(node: unknown, test: PredicateTest<Kind>, index: number, parent: Parent, context?: unknown) => node is Kind) &\n * (<Kind extends Node = Node>(node: unknown, test: PredicateTest<Kind>, index?: null | undefined, parent?: null | undefined, context?: unknown) => node is Kind) &\n * ((node: unknown, test: Test, index: number, parent: Parent, context?: unknown) => boolean) &\n * ((node: unknown, test?: Test, index?: null | undefined, parent?: null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [node]\n * @param {Test} [test]\n * @param {number | null | undefined} [index]\n * @param {Parent | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function is(node, test, index, parent, context) {\n const check = convert(test)\n\n if (\n index !== undefined &&\n index !== null &&\n (typeof index !== 'number' ||\n index < 0 ||\n index === Number.POSITIVE_INFINITY)\n ) {\n throw new Error('Expected positive finite index')\n }\n\n if (\n parent !== undefined &&\n parent !== null &&\n (!is(parent) || !parent.children)\n ) {\n throw new Error('Expected parent node')\n }\n\n if (\n (parent === undefined || parent === null) !==\n (index === undefined || index === null)\n ) {\n throw new Error('Expected both parent and index')\n }\n\n // @ts-expect-error Looks like a node.\n return node && node.type && typeof node.type === 'string'\n ? Boolean(check.call(context, node, index, parent))\n : false\n }\n )\n\n/**\n * Generate an assertion from a test.\n *\n * Useful if you’re going to test many nodes, for example when creating a\n * utility where something else passes a compatible test.\n *\n * The created function is a bit faster because it expects valid input only:\n * a `node`, `index`, and `parent`.\n *\n * @param test\n * * when nullish, checks if `node` is a `Node`.\n * * when `string`, works like passing `(node) => node.type === test`.\n * * when `function` checks if function passed the node is true.\n * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.\n * * when `array`, checks if any one of the subtests pass.\n * @returns\n * An assertion.\n */\nexport const convert =\n /**\n * @type {(\n * (<Kind extends Node>(test: PredicateTest<Kind>) => AssertPredicate<Kind>) &\n * ((test?: Test) => AssertAnything)\n * )}\n */\n (\n /**\n * @param {Test} [test]\n * @returns {AssertAnything}\n */\n function (test) {\n if (test === undefined || test === null) {\n return ok\n }\n\n if (typeof test === 'string') {\n return typeFactory(test)\n }\n\n if (typeof test === 'object') {\n return Array.isArray(test) ? anyFactory(test) : propsFactory(test)\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n throw new Error('Expected function, string, or object as test')\n }\n )\n\n/**\n * @param {Array<string | Props | TestFunctionAnything>} tests\n * @returns {AssertAnything}\n */\nfunction anyFactory(tests) {\n /** @type {Array<AssertAnything>} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convert(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @param {Array<unknown>} parameters\n * @returns {boolean}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].call(this, ...parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn an object into a test for a node with a certain fields.\n *\n * @param {Props} check\n * @returns {AssertAnything}\n */\nfunction propsFactory(check) {\n return castFactory(all)\n\n /**\n * @param {Node} node\n * @returns {boolean}\n */\n function all(node) {\n /** @type {string} */\n let key\n\n for (key in check) {\n // @ts-expect-error: hush, it sure works as an index.\n if (node[key] !== check[key]) return false\n }\n\n return true\n }\n}\n\n/**\n * Turn a string into a test for a node with a certain type.\n *\n * @param {string} check\n * @returns {AssertAnything}\n */\nfunction typeFactory(check) {\n return castFactory(type)\n\n /**\n * @param {Node} node\n */\n function type(node) {\n return node && node.type === check\n }\n}\n\n/**\n * Turn a custom test into a test for a node that passes that test.\n *\n * @param {TestFunctionAnything} check\n * @returns {AssertAnything}\n */\nfunction castFactory(check) {\n return assertion\n\n /**\n * @this {unknown}\n * @param {unknown} node\n * @param {Array<unknown>} parameters\n * @returns {boolean}\n */\n function assertion(node, ...parameters) {\n return Boolean(\n node &&\n typeof node === 'object' &&\n 'type' in node &&\n // @ts-expect-error: fine.\n Boolean(check.call(this, node, ...parameters))\n )\n }\n}\n\nfunction ok() {\n return true\n}\n"],"names":["convert","test","ok","check","castFactory","type","node","typeFactory","Array","isArray","tests","checks","index","length","any","parameters","call","this","anyFactory","all","key","propsFactory","Error","Boolean"],"mappings":"AAqKY,MAACA,EAOb,SAKcC,GACR,GAAIA,QACF,OAAOC,EAGT,GAAoB,iBAATD,EACT,OA8ER,SAAqBE,GACnB,OAAOC,EAAYC,GAKnB,SAASA,EAAKC,GACZ,OAAOA,GAAQA,EAAKD,OAASF,CAC9B,CACH,CAvFeI,CAAYN,GAGrB,GAAoB,iBAATA,EACT,OAAOO,MAAMC,QAAQR,GAe7B,SAAoBS,GAElB,MAAMC,EAAS,GACf,IAAIC,GAAS,EAEb,OAASA,EAAQF,EAAMG,QACrBF,EAAOC,GAASZ,EAAQU,EAAME,IAGhC,OAAOR,EAAYU,GAOnB,SAASA,KAAOC,GACd,IAAIH,GAAS,EAEb,OAASA,EAAQD,EAAOE,QACtB,GAAIF,EAAOC,GAAOI,KAAKC,QAASF,GAAa,OAAO,EAGtD,OAAO,CACR,CACH,CAxCqCG,CAAWjB,GAgDhD,SAAsBE,GACpB,OAAOC,EAAYe,GAMnB,SAASA,EAAIb,GAEX,IAAIc,EAEJ,IAAKA,KAAOjB,EAEV,GAAIG,EAAKc,KAASjB,EAAMiB,GAAM,OAAO,EAGvC,OAAO,CACR,CACH,CAlEwDC,CAAapB,GAG/D,GAAoB,mBAATA,EACT,OAAOG,EAAYH,GAGrB,MAAM,IAAIqB,MAAM,+CAEnB,EAkFH,SAASlB,EAAYD,GACnB,OAQA,SAAmBG,KAASS,GAC1B,OAAOQ,QACLjB,GACkB,iBAATA,GACP,SAAUA,GAEViB,QAAQpB,EAAMa,KAAKC,KAAMX,KAASS,IAEvC,CACH,CAEA,SAASb,IACP,OAAO,CACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.browser.js","sources":["../../../../../../node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/color.browser.js"],"sourcesContent":["/**\n * @param {string} d\n * @returns {string}\n */\nexport function color(d) {\n return d\n}\n"],"names":["color","d"],"mappings":"AAIO,SAASA,EAAMC,GACpB,OAAOA,CACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{convert as n}from"../../unist-util-is/lib/index.js";import{color as t}from"./color.browser.js";const e=!0,r=!1,o="skip",i=function(i,f,u,c){"function"==typeof f&&"function"!=typeof u&&(c=u,u=f,f=null);const l=n(f),p=c?-1:1;!function n(i,s,y){const a=i&&"object"==typeof i?i:{};if("string"==typeof a.type){const n="string"==typeof a.tagName?a.tagName:"string"==typeof a.name?a.name:void 0;Object.defineProperty(m,"name",{value:"node ("+t(i.type+(n?"<"+n+">":""))+")"})}return m;function m(){let t,a,m,d=[];if((!f||l(i,s,y[y.length-1]||null))&&(d=function(n){if(Array.isArray(n))return n;if("number"==typeof n)return[e,n];return[n]}(u(i,y)),d[0]===r))return d;if(i.children&&d[0]!==o)for(a=(c?i.children.length:-1)+p,m=y.concat(i);a>-1&&a<i.children.length;){if(t=n(i.children[a],a,m)(),t[0]===r)return t;a="number"==typeof t[1]?t[1]:a+p}return d}}(i,void 0,[])()};export{e as CONTINUE,r as EXIT,o as SKIP,i as visitParents};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n * @typedef {import('unist-util-is').Test} Test\n */\n\n/**\n * @typedef {boolean | 'skip'} Action\n * Union of the action types.\n *\n * @typedef {number} Index\n * Move to the sibling at `index` next (after node itself is completely\n * traversed).\n *\n * Useful if mutating the tree, such as removing the node the visitor is\n * currently on, or any of its previous siblings.\n * Results less than 0 or greater than or equal to `children.length` stop\n * traversing the parent.\n *\n * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple\n * List with one or two values, the first an action, the second an index.\n *\n * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult\n * Any value that can be returned from a visitor.\n */\n\n/**\n * @template {Node} [Visited=Node]\n * Visited node type.\n * @template {Parent} [Ancestor=Parent]\n * Ancestor type.\n * @callback Visitor\n * Handle a node (matching `test`, if given).\n *\n * Visitors are free to transform `node`.\n * They can also transform the parent of node (the last of `ancestors`).\n *\n * Replacing `node` itself, if `SKIP` is not returned, still causes its\n * descendants to be walked (which is a bug).\n *\n * When adding or removing previous siblings of `node` (or next siblings, in\n * case of reverse), the `Visitor` should return a new `Index` to specify the\n * sibling to traverse after `node` is traversed.\n * Adding or removing next siblings of `node` (or previous siblings, in case\n * of reverse) is handled as expected without needing to return a new `Index`.\n *\n * Removing the children property of an ancestor still results in them being\n * traversed.\n * @param {Visited} node\n * Found node.\n * @param {Array<Ancestor>} ancestors\n * Ancestors of `node`.\n * @returns {VisitorResult}\n * What to do next.\n *\n * An `Index` is treated as a tuple of `[CONTINUE, Index]`.\n * An `Action` is treated as a tuple of `[Action]`.\n *\n * Passing a tuple back only makes sense if the `Action` is `SKIP`.\n * When the `Action` is `EXIT`, that action can be returned.\n * When the `Action` is `CONTINUE`, `Index` can be returned.\n */\n\n/**\n * @template {Node} [Tree=Node]\n * Tree type.\n * @template {Test} [Check=string]\n * Test type.\n * @typedef {Visitor<import('./complex-types.js').Matches<import('./complex-types.js').InclusiveDescendant<Tree>, Check>, Extract<import('./complex-types.js').InclusiveDescendant<Tree>, Parent>>} BuildVisitor\n * Build a typed `Visitor` function from a tree and a test.\n *\n * It will infer which values are passed as `node` and which as `parents`.\n */\n\nimport {convert} from 'unist-util-is'\nimport {color} from './color.js'\n\n/**\n * Continue traversing as normal.\n */\nexport const CONTINUE = true\n\n/**\n * Stop traversing immediately.\n */\nexport const EXIT = false\n\n/**\n * Do not traverse this node’s children.\n */\nexport const SKIP = 'skip'\n\n/**\n * Visit nodes, with ancestral information.\n *\n * This algorithm performs *depth-first* *tree traversal* in *preorder*\n * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).\n *\n * You can choose for which nodes `visitor` is called by passing a `test`.\n * For complex tests, you should test yourself in `visitor`, as it will be\n * faster and will have improved type information.\n *\n * Walking the tree is an intensive task.\n * Make use of the return values of the visitor when possible.\n * Instead of walking a tree multiple times, walk it once, use `unist-util-is`\n * to check if a node matches, and then perform different operations.\n *\n * You can change the tree.\n * See `Visitor` for more info.\n *\n * @param tree\n * Tree to traverse.\n * @param test\n * `unist-util-is`-compatible test\n * @param visitor\n * Handle each node.\n * @param reverse\n * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).\n * @returns\n * Nothing.\n */\nexport const visitParents =\n /**\n * @type {(\n * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: BuildVisitor<Tree, Check>, reverse?: boolean | null | undefined) => void) &\n * (<Tree extends Node>(tree: Tree, visitor: BuildVisitor<Tree>, reverse?: boolean | null | undefined) => void)\n * )}\n */\n (\n /**\n * @param {Node} tree\n * @param {Test} test\n * @param {Visitor<Node>} visitor\n * @param {boolean | null | undefined} [reverse]\n * @returns {void}\n */\n function (tree, test, visitor, reverse) {\n if (typeof test === 'function' && typeof visitor !== 'function') {\n reverse = visitor\n // @ts-expect-error no visitor given, so `visitor` is test.\n visitor = test\n test = null\n }\n\n const is = convert(test)\n const step = reverse ? -1 : 1\n\n factory(tree, undefined, [])()\n\n /**\n * @param {Node} node\n * @param {number | undefined} index\n * @param {Array<Parent>} parents\n */\n function factory(node, index, parents) {\n /** @type {Record<string, unknown>} */\n // @ts-expect-error: hush\n const value = node && typeof node === 'object' ? node : {}\n\n if (typeof value.type === 'string') {\n const name =\n // `hast`\n typeof value.tagName === 'string'\n ? value.tagName\n : // `xast`\n typeof value.name === 'string'\n ? value.name\n : undefined\n\n Object.defineProperty(visit, 'name', {\n value:\n 'node (' + color(node.type + (name ? '<' + name + '>' : '')) + ')'\n })\n }\n\n return visit\n\n function visit() {\n /** @type {ActionTuple} */\n let result = []\n /** @type {ActionTuple} */\n let subresult\n /** @type {number} */\n let offset\n /** @type {Array<Parent>} */\n let grandparents\n\n if (!test || is(node, index, parents[parents.length - 1] || null)) {\n result = toResult(visitor(node, parents))\n\n if (result[0] === EXIT) {\n return result\n }\n }\n\n // @ts-expect-error looks like a parent.\n if (node.children && result[0] !== SKIP) {\n // @ts-expect-error looks like a parent.\n offset = (reverse ? node.children.length : -1) + step\n // @ts-expect-error looks like a parent.\n grandparents = parents.concat(node)\n\n // @ts-expect-error looks like a parent.\n while (offset > -1 && offset < node.children.length) {\n // @ts-expect-error looks like a parent.\n subresult = factory(node.children[offset], offset, grandparents)()\n\n if (subresult[0] === EXIT) {\n return subresult\n }\n\n offset =\n typeof subresult[1] === 'number' ? subresult[1] : offset + step\n }\n }\n\n return result\n }\n }\n }\n )\n\n/**\n * Turn a return value into a clean result.\n *\n * @param {VisitorResult} value\n * Valid return values from visitors.\n * @returns {ActionTuple}\n * Clean result.\n */\nfunction toResult(value) {\n if (Array.isArray(value)) {\n return value\n }\n\n if (typeof value === 'number') {\n return [CONTINUE, value]\n }\n\n return [value]\n}\n"],"names":["CONTINUE","EXIT","SKIP","visitParents","tree","test","visitor","reverse","is","convert","step","factory","node","index","parents","value","type","name","tagName","undefined","Object","defineProperty","visit","color","subresult","offset","grandparents","result","length","Array","isArray","toResult","children","concat"],"mappings":"sGAgFY,MAACA,GAAW,EAKXC,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,CAvEDhB,CAAQP,OAAMe,EAAW,GAAzBR,EAyEH"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{toString as e}from"../../mdast-util-to-string/lib/index.js";import{parse as t}from"../../micromark/lib/parse.js";import{preprocess as n}from"../../micromark/lib/preprocess.js";import{postprocess as i}from"../../micromark/lib/postprocess.js";import{decodeNumericCharacterReference as r}from"../../micromark-util-decode-numeric-character-reference/index.js";import{decodeString as s}from"../../micromark-util-decode-string/index.js";import{normalizeIdentifier as c}from"../../micromark-util-normalize-identifier/index.js";import{decodeNamedCharacterReference as a}from"../../decode-named-character-reference/index.dom.js";import{stringifyPosition as l}from"../node_modules/unist-util-stringify-position/lib/index.js";const o={}.hasOwnProperty,h=function(h,f,k){return"string"!=typeof f&&(k=f,f=void 0),function(t){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:g(de),autolinkProtocol:P,autolinkEmail:P,atxHeading:g(le),blockQuote:g(ie),characterEscape:P,characterReference:P,codeFenced:g(re),codeFencedFenceInfo:y,codeFencedFenceMeta:y,codeIndented:g(re,y),codeText:g(se,y),codeTextData:P,data:P,codeFlowValue:P,definition:g(ce),definitionDestinationString:y,definitionLabelString:y,definitionTitleString:y,emphasis:g(ae),hardBreakEscape:g(oe),hardBreakTrailing:g(oe),htmlFlow:g(he,y),htmlFlowData:P,htmlText:g(he,y),htmlTextData:P,image:g(ue),label:y,link:g(de),listItem:g(pe),listItemValue:E,listOrdered:g(fe,I),listUnordered:g(fe),paragraph:g(ke),reference:X,referenceString:y,resourceDestinationString:y,resourceTitleString:y,setextHeading:g(le),strong:g(me),thematicBreak:g(ye)},exit:{atxHeading:S(),atxHeadingSequence:B,autolink:S(),autolinkEmail:ne,autolinkProtocol:te,blockQuote:S(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:ee,codeFenced:S(C),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:F,codeFlowValue:V,codeIndented:S(H),codeText:S(q),codeTextData:V,data:V,definition:S(),definitionDestinationString:z,definitionLabelString:R,definitionTitleString:j,emphasis:S(),hardBreakEscape:S(Q),hardBreakTrailing:S(Q),htmlFlow:S(_),htmlFlowData:V,htmlText:S(U),htmlTextData:V,image:S(N),label:$,labelText:W,lineEnding:M,link:S(A),listItem:S(),listOrdered:S(),listUnordered:S(),paragraph:S(),referenceString:Y,resourceDestinationString:G,resourceTitleString:J,resource:K,setextHeading:S(O),setextHeadingLineSequence:L,setextHeadingText:D,strong:S(),thematicBreak:S()}};d(n,(t||{}).mdastExtensions||[]);const i={};return h;function h(e){let t={type:"root",children:[]};const i={stack:[t],tokenStack:[],config:n,enter:x,exit:b,buffer:y,resume:T,setData:k,getData:m},r=[];let s=-1;for(;++s<e.length;)if("listOrdered"===e[s][1].type||"listUnordered"===e[s][1].type)if("enter"===e[s][0])r.push(s);else{s=f(e,r.pop(),s)}for(s=-1;++s<e.length;){const t=n[e[s][0]];o.call(t,e[s][1].type)&&t[e[s][1].type].call(Object.assign({sliceSerialize:e[s][2].sliceSerialize},i),e[s][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||p).call(i,void 0,e[0])}for(t.position={start:u(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:u(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},s=-1;++s<n.transforms.length;)t=n.transforms[s](t)||t;return t}function f(e,t,n){let i,r,s,c,a=t-1,l=-1,o=!1;for(;++a<=n;){const t=e[a];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?l++:l--,c=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!i||c||l||s||(s=a),c=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(c=void 0),!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(i){let c=a;for(r=void 0;c--;){const t=e[c];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;r&&(e[r][1].type="lineEndingBlank",o=!0),t[1].type="lineEnding",r=c}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}s&&(!r||s<r)&&(i._spread=!0),i.end=Object.assign({},r?e[r][1].start:t[1].end),e.splice(r||a,0,["exit",i,t[2]]),a++,n++}"listItemPrefix"===t[1].type&&(i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0},e.splice(a,0,["enter",i,t[2]]),a++,n++,s=void 0,c=!0)}}return e[t][1]._spread=o,n}function k(e,t){i[e]=t}function m(e){return i[e]}function g(e,t){return n;function n(n){x.call(this,e(n),n),t&&t.call(this,n)}}function y(){this.stack.push({type:"fragment",children:[]})}function x(e,t,n){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:u(t.start)},e}function S(e){return t;function t(t){e&&e.call(this,t),b.call(this,t)}}function b(e,t){const n=this.stack.pop(),i=this.tokenStack.pop();if(!i)throw new Error("Cannot close `"+e.type+"` ("+l({start:e.start,end:e.end})+"): it’s not open");if(i[0].type!==e.type)if(t)t.call(this,e,i[0]);else{(i[1]||p).call(this,e,i[0])}return n.position.end=u(e.end),n}function T(){return e(this.stack.pop())}function I(){k("expectingFirstListItemValue",!0)}function E(e){if(m("expectingFirstListItemValue")){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),k("expectingFirstListItemValue")}}function v(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function F(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function w(){m("flowCodeInside")||(this.buffer(),k("flowCodeInside",!0))}function C(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),k("flowCodeInside")}function H(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function R(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=c(this.sliceSerialize(e)).toLowerCase()}function j(){const e=this.resume();this.stack[this.stack.length-1].title=e}function z(){const e=this.resume();this.stack[this.stack.length-1].url=e}function B(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function D(){k("setextHeadingSlurpLineEnding",!0)}function L(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function O(){k("setextHeadingSlurpLineEnding")}function P(e){const t=this.stack[this.stack.length-1];let n=t.children[t.children.length-1];n&&"text"===n.type||(n=ge(),n.position={start:u(e.start)},t.children.push(n)),this.stack.push(n)}function V(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=u(e.end)}function M(e){const t=this.stack[this.stack.length-1];if(m("atHardBreak")){return t.children[t.children.length-1].position.end=u(e.end),void k("atHardBreak")}!m("setextHeadingSlurpLineEnding")&&n.canContainEols.includes(t.type)&&(P.call(this,e),V.call(this,e))}function Q(){k("atHardBreak",!0)}function _(){const e=this.resume();this.stack[this.stack.length-1].value=e}function U(){const e=this.resume();this.stack[this.stack.length-1].value=e}function q(){const e=this.resume();this.stack[this.stack.length-1].value=e}function A(){const e=this.stack[this.stack.length-1];if(m("inReference")){const t=m("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;k("referenceType")}function N(){const e=this.stack[this.stack.length-1];if(m("inReference")){const t=m("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;k("referenceType")}function W(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=s(t),n.identifier=c(t).toLowerCase()}function $(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(k("inReference",!0),"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function G(){const e=this.resume();this.stack[this.stack.length-1].url=e}function J(){const e=this.resume();this.stack[this.stack.length-1].title=e}function K(){k("inReference")}function X(){k("referenceType","collapsed")}function Y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=c(this.sliceSerialize(e)).toLowerCase(),k("referenceType","full")}function Z(e){k("characterReferenceType",e.type)}function ee(e){const t=this.sliceSerialize(e),n=m("characterReferenceType");let i;if(n)i=r(t,"characterReferenceMarkerNumeric"===n?10:16),k("characterReferenceType");else{i=a(t)}const s=this.stack.pop();s.value+=i,s.position.end=u(e.end)}function te(e){V.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function ne(e){V.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function ie(){return{type:"blockquote",children:[]}}function re(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ae(){return{type:"emphasis",children:[]}}function le(){return{type:"heading",depth:void 0,children:[]}}function oe(){return{type:"break"}}function he(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function de(){return{type:"link",title:null,url:"",children:[]}}function fe(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function pe(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ke(){return{type:"paragraph",children:[]}}function me(){return{type:"strong",children:[]}}function ge(){return{type:"text",value:""}}function ye(){return{type:"thematicBreak"}}}(k)(i(t(k).document().write(n()(h,f,!0))))};function u(e){return{line:e.line,column:e.column,offset:e.offset}}function d(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?d(e,i):f(e,i)}}function f(e,t){let n;for(n in t)if(o.call(t,n))if("canContainEols"===n){const i=t[n];i&&e[n].push(...i)}else if("transforms"===n){const i=t[n];i&&e[n].push(...i)}else if("enter"===n||"exit"===n){const i=t[n];i&&Object.assign(e[n],i)}}function p(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+l({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+l({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+l({start:t.start,end:t.end})+") is still open")}export{h as fromMarkdown};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/mdast-util-from-markdown/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('micromark-util-types').Encoding} Encoding\n * @typedef {import('micromark-util-types').Event} Event\n * @typedef {import('micromark-util-types').ParseOptions} ParseOptions\n * @typedef {import('micromark-util-types').Token} Token\n * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext\n * @typedef {import('micromark-util-types').Value} Value\n *\n * @typedef {import('unist').Parent} UnistParent\n * @typedef {import('unist').Point} Point\n *\n * @typedef {import('mdast').PhrasingContent} PhrasingContent\n * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent\n * @typedef {import('mdast').Content} Content\n * @typedef {import('mdast').Break} Break\n * @typedef {import('mdast').Blockquote} Blockquote\n * @typedef {import('mdast').Code} Code\n * @typedef {import('mdast').Definition} Definition\n * @typedef {import('mdast').Emphasis} Emphasis\n * @typedef {import('mdast').Heading} Heading\n * @typedef {import('mdast').HTML} HTML\n * @typedef {import('mdast').Image} Image\n * @typedef {import('mdast').ImageReference} ImageReference\n * @typedef {import('mdast').InlineCode} InlineCode\n * @typedef {import('mdast').Link} Link\n * @typedef {import('mdast').LinkReference} LinkReference\n * @typedef {import('mdast').List} List\n * @typedef {import('mdast').ListItem} ListItem\n * @typedef {import('mdast').Paragraph} Paragraph\n * @typedef {import('mdast').Root} Root\n * @typedef {import('mdast').Strong} Strong\n * @typedef {import('mdast').Text} Text\n * @typedef {import('mdast').ThematicBreak} ThematicBreak\n * @typedef {import('mdast').ReferenceType} ReferenceType\n * @typedef {import('../index.js').CompileData} CompileData\n */\n\n/**\n * @typedef {Root | Content} Node\n * @typedef {Extract<Node, UnistParent>} Parent\n *\n * @typedef {Omit<UnistParent, 'type' | 'children'> & {type: 'fragment', children: Array<PhrasingContent>}} Fragment\n */\n\n/**\n * @callback Transform\n * Extra transform, to change the AST afterwards.\n * @param {Root} tree\n * Tree to transform.\n * @returns {Root | undefined | null | void}\n * New tree or nothing (in which case the current tree is used).\n *\n * @callback Handle\n * Handle a token.\n * @param {CompileContext} this\n * Context.\n * @param {Token} token\n * Current token.\n * @returns {void}\n * Nothing.\n *\n * @typedef {Record<string, Handle>} Handles\n * Token types mapping to handles\n *\n * @callback OnEnterError\n * Handle the case where the `right` token is open, but it is closed (by the\n * `left` token) or because we reached the end of the document.\n * @param {Omit<CompileContext, 'sliceSerialize'>} this\n * Context.\n * @param {Token | undefined} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {void}\n * Nothing.\n *\n * @callback OnExitError\n * Handle the case where the `right` token is open but it is closed by\n * exiting the `left` token.\n * @param {Omit<CompileContext, 'sliceSerialize'>} this\n * Context.\n * @param {Token} left\n * Left token.\n * @param {Token} right\n * Right token.\n * @returns {void}\n * Nothing.\n *\n * @typedef {[Token, OnEnterError | undefined]} TokenTuple\n * Open token on the stack, with an optional error handler for when\n * that token isn’t closed properly.\n */\n\n/**\n * @typedef Config\n * Configuration.\n *\n * We have our defaults, but extensions will add more.\n * @property {Array<string>} canContainEols\n * Token types where line endings are used.\n * @property {Handles} enter\n * Opening handles.\n * @property {Handles} exit\n * Closing handles.\n * @property {Array<Transform>} transforms\n * Tree transforms.\n *\n * @typedef {Partial<Config>} Extension\n * Change how markdown tokens from micromark are turned into mdast.\n *\n * @typedef CompileContext\n * mdast compiler context.\n * @property {Array<Node | Fragment>} stack\n * Stack of nodes.\n * @property {Array<TokenTuple>} tokenStack\n * Stack of tokens.\n * @property {<Key extends keyof CompileData>(key: Key) => CompileData[Key]} getData\n * Get data from the key/value store.\n * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void} setData\n * Set data into the key/value store.\n * @property {(this: CompileContext) => void} buffer\n * Capture some of the output data.\n * @property {(this: CompileContext) => string} resume\n * Stop capturing and access the output data.\n * @property {<Kind extends Node>(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter\n * Enter a token.\n * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit\n * Exit a token.\n * @property {TokenizeContext['sliceSerialize']} sliceSerialize\n * Get the string value of a token.\n * @property {Config} config\n * Configuration.\n *\n * @typedef FromMarkdownOptions\n * Configuration for how to build mdast.\n * @property {Array<Extension | Array<Extension>> | null | undefined} [mdastExtensions]\n * Extensions for this utility to change how tokens are turned into a tree.\n *\n * @typedef {ParseOptions & FromMarkdownOptions} Options\n * Configuration.\n */\n\n// To do: micromark: create a registry of tokens?\n// To do: next major: don’t return given `Node` from `enter`.\n// To do: next major: remove setter/getter.\n\nimport {toString} from 'mdast-util-to-string'\nimport {parse} from 'micromark/lib/parse.js'\nimport {preprocess} from 'micromark/lib/preprocess.js'\nimport {postprocess} from 'micromark/lib/postprocess.js'\nimport {decodeNumericCharacterReference} from 'micromark-util-decode-numeric-character-reference'\nimport {decodeString} from 'micromark-util-decode-string'\nimport {normalizeIdentifier} from 'micromark-util-normalize-identifier'\nimport {decodeNamedCharacterReference} from 'decode-named-character-reference'\nimport {stringifyPosition} from 'unist-util-stringify-position'\nconst own = {}.hasOwnProperty\n\n/**\n * @param value\n * Markdown to parse.\n * @param encoding\n * Character encoding for when `value` is `Buffer`.\n * @param options\n * Configuration.\n * @returns\n * mdast tree.\n */\nexport const fromMarkdown =\n /**\n * @type {(\n * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &\n * ((value: Value, options?: Options | null | undefined) => Root)\n * )}\n */\n\n /**\n * @param {Value} value\n * @param {Encoding | Options | null | undefined} [encoding]\n * @param {Options | null | undefined} [options]\n * @returns {Root}\n */\n function (value, encoding, options) {\n if (typeof encoding !== 'string') {\n options = encoding\n encoding = undefined\n }\n return compiler(options)(\n postprocess(\n parse(options).document().write(preprocess()(value, encoding, true))\n )\n )\n }\n\n/**\n * Note this compiler only understand complete buffering, not streaming.\n *\n * @param {Options | null | undefined} [options]\n */\nfunction compiler(options) {\n /** @type {Config} */\n const config = {\n transforms: [],\n canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],\n enter: {\n autolink: opener(link),\n autolinkProtocol: onenterdata,\n autolinkEmail: onenterdata,\n atxHeading: opener(heading),\n blockQuote: opener(blockQuote),\n characterEscape: onenterdata,\n characterReference: onenterdata,\n codeFenced: opener(codeFlow),\n codeFencedFenceInfo: buffer,\n codeFencedFenceMeta: buffer,\n codeIndented: opener(codeFlow, buffer),\n codeText: opener(codeText, buffer),\n codeTextData: onenterdata,\n data: onenterdata,\n codeFlowValue: onenterdata,\n definition: opener(definition),\n definitionDestinationString: buffer,\n definitionLabelString: buffer,\n definitionTitleString: buffer,\n emphasis: opener(emphasis),\n hardBreakEscape: opener(hardBreak),\n hardBreakTrailing: opener(hardBreak),\n htmlFlow: opener(html, buffer),\n htmlFlowData: onenterdata,\n htmlText: opener(html, buffer),\n htmlTextData: onenterdata,\n image: opener(image),\n label: buffer,\n link: opener(link),\n listItem: opener(listItem),\n listItemValue: onenterlistitemvalue,\n listOrdered: opener(list, onenterlistordered),\n listUnordered: opener(list),\n paragraph: opener(paragraph),\n reference: onenterreference,\n referenceString: buffer,\n resourceDestinationString: buffer,\n resourceTitleString: buffer,\n setextHeading: opener(heading),\n strong: opener(strong),\n thematicBreak: opener(thematicBreak)\n },\n exit: {\n atxHeading: closer(),\n atxHeadingSequence: onexitatxheadingsequence,\n autolink: closer(),\n autolinkEmail: onexitautolinkemail,\n autolinkProtocol: onexitautolinkprotocol,\n blockQuote: closer(),\n characterEscapeValue: onexitdata,\n characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,\n characterReferenceMarkerNumeric: onexitcharacterreferencemarker,\n characterReferenceValue: onexitcharacterreferencevalue,\n codeFenced: closer(onexitcodefenced),\n codeFencedFence: onexitcodefencedfence,\n codeFencedFenceInfo: onexitcodefencedfenceinfo,\n codeFencedFenceMeta: onexitcodefencedfencemeta,\n codeFlowValue: onexitdata,\n codeIndented: closer(onexitcodeindented),\n codeText: closer(onexitcodetext),\n codeTextData: onexitdata,\n data: onexitdata,\n definition: closer(),\n definitionDestinationString: onexitdefinitiondestinationstring,\n definitionLabelString: onexitdefinitionlabelstring,\n definitionTitleString: onexitdefinitiontitlestring,\n emphasis: closer(),\n hardBreakEscape: closer(onexithardbreak),\n hardBreakTrailing: closer(onexithardbreak),\n htmlFlow: closer(onexithtmlflow),\n htmlFlowData: onexitdata,\n htmlText: closer(onexithtmltext),\n htmlTextData: onexitdata,\n image: closer(onexitimage),\n label: onexitlabel,\n labelText: onexitlabeltext,\n lineEnding: onexitlineending,\n link: closer(onexitlink),\n listItem: closer(),\n listOrdered: closer(),\n listUnordered: closer(),\n paragraph: closer(),\n referenceString: onexitreferencestring,\n resourceDestinationString: onexitresourcedestinationstring,\n resourceTitleString: onexitresourcetitlestring,\n resource: onexitresource,\n setextHeading: closer(onexitsetextheading),\n setextHeadingLineSequence: onexitsetextheadinglinesequence,\n setextHeadingText: onexitsetextheadingtext,\n strong: closer(),\n thematicBreak: closer()\n }\n }\n configure(config, (options || {}).mdastExtensions || [])\n\n /** @type {CompileData} */\n const data = {}\n return compile\n\n /**\n * Turn micromark events into an mdast tree.\n *\n * @param {Array<Event>} events\n * Events.\n * @returns {Root}\n * mdast tree.\n */\n function compile(events) {\n /** @type {Root} */\n let tree = {\n type: 'root',\n children: []\n }\n /** @type {Omit<CompileContext, 'sliceSerialize'>} */\n const context = {\n stack: [tree],\n tokenStack: [],\n config,\n enter,\n exit,\n buffer,\n resume,\n setData,\n getData\n }\n /** @type {Array<number>} */\n const listStack = []\n let index = -1\n while (++index < events.length) {\n // We preprocess lists to add `listItem` tokens, and to infer whether\n // items the list itself are spread out.\n if (\n events[index][1].type === 'listOrdered' ||\n events[index][1].type === 'listUnordered'\n ) {\n if (events[index][0] === 'enter') {\n listStack.push(index)\n } else {\n const tail = listStack.pop()\n index = prepareList(events, tail, index)\n }\n }\n }\n index = -1\n while (++index < events.length) {\n const handler = config[events[index][0]]\n if (own.call(handler, events[index][1].type)) {\n handler[events[index][1].type].call(\n Object.assign(\n {\n sliceSerialize: events[index][2].sliceSerialize\n },\n context\n ),\n events[index][1]\n )\n }\n }\n\n // Handle tokens still being open.\n if (context.tokenStack.length > 0) {\n const tail = context.tokenStack[context.tokenStack.length - 1]\n const handler = tail[1] || defaultOnError\n handler.call(context, undefined, tail[0])\n }\n\n // Figure out `root` position.\n tree.position = {\n start: point(\n events.length > 0\n ? events[0][1].start\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n ),\n end: point(\n events.length > 0\n ? events[events.length - 2][1].end\n : {\n line: 1,\n column: 1,\n offset: 0\n }\n )\n }\n\n // Call transforms.\n index = -1\n while (++index < config.transforms.length) {\n tree = config.transforms[index](tree) || tree\n }\n return tree\n }\n\n /**\n * @param {Array<Event>} events\n * @param {number} start\n * @param {number} length\n * @returns {number}\n */\n function prepareList(events, start, length) {\n let index = start - 1\n let containerBalance = -1\n let listSpread = false\n /** @type {Token | undefined} */\n let listItem\n /** @type {number | undefined} */\n let lineIndex\n /** @type {number | undefined} */\n let firstBlankLineIndex\n /** @type {boolean | undefined} */\n let atMarker\n while (++index <= length) {\n const event = events[index]\n if (\n event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered' ||\n event[1].type === 'blockQuote'\n ) {\n if (event[0] === 'enter') {\n containerBalance++\n } else {\n containerBalance--\n }\n atMarker = undefined\n } else if (event[1].type === 'lineEndingBlank') {\n if (event[0] === 'enter') {\n if (\n listItem &&\n !atMarker &&\n !containerBalance &&\n !firstBlankLineIndex\n ) {\n firstBlankLineIndex = index\n }\n atMarker = undefined\n }\n } else if (\n event[1].type === 'linePrefix' ||\n event[1].type === 'listItemValue' ||\n event[1].type === 'listItemMarker' ||\n event[1].type === 'listItemPrefix' ||\n event[1].type === 'listItemPrefixWhitespace'\n ) {\n // Empty.\n } else {\n atMarker = undefined\n }\n if (\n (!containerBalance &&\n event[0] === 'enter' &&\n event[1].type === 'listItemPrefix') ||\n (containerBalance === -1 &&\n event[0] === 'exit' &&\n (event[1].type === 'listUnordered' ||\n event[1].type === 'listOrdered'))\n ) {\n if (listItem) {\n let tailIndex = index\n lineIndex = undefined\n while (tailIndex--) {\n const tailEvent = events[tailIndex]\n if (\n tailEvent[1].type === 'lineEnding' ||\n tailEvent[1].type === 'lineEndingBlank'\n ) {\n if (tailEvent[0] === 'exit') continue\n if (lineIndex) {\n events[lineIndex][1].type = 'lineEndingBlank'\n listSpread = true\n }\n tailEvent[1].type = 'lineEnding'\n lineIndex = tailIndex\n } else if (\n tailEvent[1].type === 'linePrefix' ||\n tailEvent[1].type === 'blockQuotePrefix' ||\n tailEvent[1].type === 'blockQuotePrefixWhitespace' ||\n tailEvent[1].type === 'blockQuoteMarker' ||\n tailEvent[1].type === 'listItemIndent'\n ) {\n // Empty\n } else {\n break\n }\n }\n if (\n firstBlankLineIndex &&\n (!lineIndex || firstBlankLineIndex < lineIndex)\n ) {\n listItem._spread = true\n }\n\n // Fix position.\n listItem.end = Object.assign(\n {},\n lineIndex ? events[lineIndex][1].start : event[1].end\n )\n events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])\n index++\n length++\n }\n\n // Create a new list item.\n if (event[1].type === 'listItemPrefix') {\n listItem = {\n type: 'listItem',\n _spread: false,\n start: Object.assign({}, event[1].start),\n // @ts-expect-error: we’ll add `end` in a second.\n end: undefined\n }\n // @ts-expect-error: `listItem` is most definitely defined, TS...\n events.splice(index, 0, ['enter', listItem, event[2]])\n index++\n length++\n firstBlankLineIndex = undefined\n atMarker = true\n }\n }\n }\n events[start][1]._spread = listSpread\n return length\n }\n\n /**\n * Set data.\n *\n * @template {keyof CompileData} Key\n * Field type.\n * @param {Key} key\n * Key of field.\n * @param {CompileData[Key]} [value]\n * New value.\n * @returns {void}\n * Nothing.\n */\n function setData(key, value) {\n data[key] = value\n }\n\n /**\n * Get data.\n *\n * @template {keyof CompileData} Key\n * Field type.\n * @param {Key} key\n * Key of field.\n * @returns {CompileData[Key]}\n * Value.\n */\n function getData(key) {\n return data[key]\n }\n\n /**\n * Create an opener handle.\n *\n * @param {(token: Token) => Node} create\n * Create a node.\n * @param {Handle} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function opener(create, and) {\n return open\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {void}\n */\n function open(token) {\n enter.call(this, create(token), token)\n if (and) and.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @returns {void}\n */\n function buffer() {\n this.stack.push({\n type: 'fragment',\n children: []\n })\n }\n\n /**\n * @template {Node} Kind\n * Node type.\n * @this {CompileContext}\n * Context.\n * @param {Kind} node\n * Node to enter.\n * @param {Token} token\n * Corresponding token.\n * @param {OnEnterError | undefined} [errorHandler]\n * Handle the case where this token is open, but it is closed by something else.\n * @returns {Kind}\n * The given node.\n */\n function enter(node, token, errorHandler) {\n const parent = this.stack[this.stack.length - 1]\n // @ts-expect-error: Assume `Node` can exist as a child of `parent`.\n parent.children.push(node)\n this.stack.push(node)\n this.tokenStack.push([token, errorHandler])\n // @ts-expect-error: `end` will be patched later.\n node.position = {\n start: point(token.start)\n }\n return node\n }\n\n /**\n * Create a closer handle.\n *\n * @param {Handle} [and]\n * Optional function to also run.\n * @returns {Handle}\n * Handle.\n */\n function closer(and) {\n return close\n\n /**\n * @this {CompileContext}\n * @param {Token} token\n * @returns {void}\n */\n function close(token) {\n if (and) and.call(this, token)\n exit.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * Context.\n * @param {Token} token\n * Corresponding token.\n * @param {OnExitError | undefined} [onExitError]\n * Handle the case where another token is open.\n * @returns {Node}\n * The closed node.\n */\n function exit(token, onExitError) {\n const node = this.stack.pop()\n const open = this.tokenStack.pop()\n if (!open) {\n throw new Error(\n 'Cannot close `' +\n token.type +\n '` (' +\n stringifyPosition({\n start: token.start,\n end: token.end\n }) +\n '): it’s not open'\n )\n } else if (open[0].type !== token.type) {\n if (onExitError) {\n onExitError.call(this, token, open[0])\n } else {\n const handler = open[1] || defaultOnError\n handler.call(this, token, open[0])\n }\n }\n node.position.end = point(token.end)\n return node\n }\n\n /**\n * @this {CompileContext}\n * @returns {string}\n */\n function resume() {\n return toString(this.stack.pop())\n }\n\n //\n // Handlers.\n //\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistordered() {\n setData('expectingFirstListItemValue', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onenterlistitemvalue(token) {\n if (getData('expectingFirstListItemValue')) {\n const ancestor = this.stack[this.stack.length - 2]\n ancestor.start = Number.parseInt(this.sliceSerialize(token), 10)\n setData('expectingFirstListItemValue')\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfenceinfo() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.lang = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfencemeta() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.meta = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefencedfence() {\n // Exit if this is the closing fence.\n if (getData('flowCodeInside')) return\n this.buffer()\n setData('flowCodeInside', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodefenced() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g, '')\n setData('flowCodeInside')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcodeindented() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data.replace(/(\\r?\\n|\\r)$/g, '')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitionlabelstring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.label = label\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiontitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitdefinitiondestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitatxheadingsequence(token) {\n const node = this.stack[this.stack.length - 1]\n if (!node.depth) {\n const depth = this.sliceSerialize(token).length\n node.depth = depth\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadingtext() {\n setData('setextHeadingSlurpLineEnding', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheadinglinesequence(token) {\n const node = this.stack[this.stack.length - 1]\n node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitsetextheading() {\n setData('setextHeadingSlurpLineEnding')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterdata(token) {\n const node = this.stack[this.stack.length - 1]\n let tail = node.children[node.children.length - 1]\n if (!tail || tail.type !== 'text') {\n // Add a new text node.\n tail = text()\n // @ts-expect-error: we’ll add `end` later.\n tail.position = {\n start: point(token.start)\n }\n // @ts-expect-error: Assume `parent` accepts `text`.\n node.children.push(tail)\n }\n this.stack.push(tail)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitdata(token) {\n const tail = this.stack.pop()\n tail.value += this.sliceSerialize(token)\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlineending(token) {\n const context = this.stack[this.stack.length - 1]\n // If we’re at a hard break, include the line ending in there.\n if (getData('atHardBreak')) {\n const tail = context.children[context.children.length - 1]\n tail.position.end = point(token.end)\n setData('atHardBreak')\n return\n }\n if (\n !getData('setextHeadingSlurpLineEnding') &&\n config.canContainEols.includes(context.type)\n ) {\n onenterdata.call(this, token)\n onexitdata.call(this, token)\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithardbreak() {\n setData('atHardBreak', true)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmlflow() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexithtmltext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcodetext() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.value = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlink() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (getData('inReference')) {\n /** @type {ReferenceType} */\n const referenceType = getData('referenceType') || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n setData('referenceType')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitimage() {\n const node = this.stack[this.stack.length - 1]\n // Note: there are also `identifier` and `label` fields on this link node!\n // These are used / cleaned here.\n // To do: clean.\n if (getData('inReference')) {\n /** @type {ReferenceType} */\n const referenceType = getData('referenceType') || 'shortcut'\n node.type += 'Reference'\n // @ts-expect-error: mutate.\n node.referenceType = referenceType\n // @ts-expect-error: mutate.\n delete node.url\n delete node.title\n } else {\n // @ts-expect-error: mutate.\n delete node.identifier\n // @ts-expect-error: mutate.\n delete node.label\n }\n setData('referenceType')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabeltext(token) {\n const string = this.sliceSerialize(token)\n const ancestor = this.stack[this.stack.length - 2]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n ancestor.label = decodeString(string)\n // @ts-expect-error: same as above.\n ancestor.identifier = normalizeIdentifier(string).toLowerCase()\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitlabel() {\n const fragment = this.stack[this.stack.length - 1]\n const value = this.resume()\n const node = this.stack[this.stack.length - 1]\n // Assume a reference.\n setData('inReference', true)\n if (node.type === 'link') {\n /** @type {Array<StaticPhrasingContent>} */\n // @ts-expect-error: Assume static phrasing content.\n const children = fragment.children\n node.children = children\n } else {\n node.alt = value\n }\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcedestinationstring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.url = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresourcetitlestring() {\n const data = this.resume()\n const node = this.stack[this.stack.length - 1]\n node.title = data\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitresource() {\n setData('inReference')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onenterreference() {\n setData('referenceType', 'collapsed')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitreferencestring(token) {\n const label = this.resume()\n const node = this.stack[this.stack.length - 1]\n // @ts-expect-error: stash this on the node, as it might become a reference\n // later.\n node.label = label\n // @ts-expect-error: same as above.\n node.identifier = normalizeIdentifier(\n this.sliceSerialize(token)\n ).toLowerCase()\n setData('referenceType', 'full')\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n\n function onexitcharacterreferencemarker(token) {\n setData('characterReferenceType', token.type)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitcharacterreferencevalue(token) {\n const data = this.sliceSerialize(token)\n const type = getData('characterReferenceType')\n /** @type {string} */\n let value\n if (type) {\n value = decodeNumericCharacterReference(\n data,\n type === 'characterReferenceMarkerNumeric' ? 10 : 16\n )\n setData('characterReferenceType')\n } else {\n const result = decodeNamedCharacterReference(data)\n value = result\n }\n const tail = this.stack.pop()\n tail.value += value\n tail.position.end = point(token.end)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkprotocol(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = this.sliceSerialize(token)\n }\n\n /**\n * @this {CompileContext}\n * @type {Handle}\n */\n function onexitautolinkemail(token) {\n onexitdata.call(this, token)\n const node = this.stack[this.stack.length - 1]\n node.url = 'mailto:' + this.sliceSerialize(token)\n }\n\n //\n // Creaters.\n //\n\n /** @returns {Blockquote} */\n function blockQuote() {\n return {\n type: 'blockquote',\n children: []\n }\n }\n\n /** @returns {Code} */\n function codeFlow() {\n return {\n type: 'code',\n lang: null,\n meta: null,\n value: ''\n }\n }\n\n /** @returns {InlineCode} */\n function codeText() {\n return {\n type: 'inlineCode',\n value: ''\n }\n }\n\n /** @returns {Definition} */\n function definition() {\n return {\n type: 'definition',\n identifier: '',\n label: null,\n title: null,\n url: ''\n }\n }\n\n /** @returns {Emphasis} */\n function emphasis() {\n return {\n type: 'emphasis',\n children: []\n }\n }\n\n /** @returns {Heading} */\n function heading() {\n // @ts-expect-error `depth` will be set later.\n return {\n type: 'heading',\n depth: undefined,\n children: []\n }\n }\n\n /** @returns {Break} */\n function hardBreak() {\n return {\n type: 'break'\n }\n }\n\n /** @returns {HTML} */\n function html() {\n return {\n type: 'html',\n value: ''\n }\n }\n\n /** @returns {Image} */\n function image() {\n return {\n type: 'image',\n title: null,\n url: '',\n alt: null\n }\n }\n\n /** @returns {Link} */\n function link() {\n return {\n type: 'link',\n title: null,\n url: '',\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {List}\n */\n function list(token) {\n return {\n type: 'list',\n ordered: token.type === 'listOrdered',\n start: null,\n spread: token._spread,\n children: []\n }\n }\n\n /**\n * @param {Token} token\n * @returns {ListItem}\n */\n function listItem(token) {\n return {\n type: 'listItem',\n spread: token._spread,\n checked: null,\n children: []\n }\n }\n\n /** @returns {Paragraph} */\n function paragraph() {\n return {\n type: 'paragraph',\n children: []\n }\n }\n\n /** @returns {Strong} */\n function strong() {\n return {\n type: 'strong',\n children: []\n }\n }\n\n /** @returns {Text} */\n function text() {\n return {\n type: 'text',\n value: ''\n }\n }\n\n /** @returns {ThematicBreak} */\n function thematicBreak() {\n return {\n type: 'thematicBreak'\n }\n }\n}\n\n/**\n * Copy a point-like value.\n *\n * @param {Point} d\n * Point-like value.\n * @returns {Point}\n * unist point.\n */\nfunction point(d) {\n return {\n line: d.line,\n column: d.column,\n offset: d.offset\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Array<Extension | Array<Extension>>} extensions\n * @returns {void}\n */\nfunction configure(combined, extensions) {\n let index = -1\n while (++index < extensions.length) {\n const value = extensions[index]\n if (Array.isArray(value)) {\n configure(combined, value)\n } else {\n extension(combined, value)\n }\n }\n}\n\n/**\n * @param {Config} combined\n * @param {Extension} extension\n * @returns {void}\n */\nfunction extension(combined, extension) {\n /** @type {keyof Extension} */\n let key\n for (key in extension) {\n if (own.call(extension, key)) {\n if (key === 'canContainEols') {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n } else if (key === 'transforms') {\n const right = extension[key]\n if (right) {\n combined[key].push(...right)\n }\n } else if (key === 'enter' || key === 'exit') {\n const right = extension[key]\n if (right) {\n Object.assign(combined[key], right)\n }\n }\n }\n }\n}\n\n/** @type {OnEnterError} */\nfunction defaultOnError(left, right) {\n if (left) {\n throw new Error(\n 'Cannot close `' +\n left.type +\n '` (' +\n stringifyPosition({\n start: left.start,\n end: left.end\n }) +\n '): a different token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is open'\n )\n } else {\n throw new Error(\n 'Cannot close document, a token (`' +\n right.type +\n '`, ' +\n stringifyPosition({\n start: right.start,\n end: right.end\n }) +\n ') is still open'\n )\n }\n}\n"],"names":["own","hasOwnProperty","fromMarkdown","value","encoding","options","undefined","config","transforms","canContainEols","enter","autolink","opener","link","autolinkProtocol","onenterdata","autolinkEmail","atxHeading","heading","blockQuote","characterEscape","characterReference","codeFenced","codeFlow","codeFencedFenceInfo","buffer","codeFencedFenceMeta","codeIndented","codeText","codeTextData","data","codeFlowValue","definition","definitionDestinationString","definitionLabelString","definitionTitleString","emphasis","hardBreakEscape","hardBreak","hardBreakTrailing","htmlFlow","html","htmlFlowData","htmlText","htmlTextData","image","label","listItem","listItemValue","onenterlistitemvalue","listOrdered","list","onenterlistordered","listUnordered","paragraph","reference","onenterreference","referenceString","resourceDestinationString","resourceTitleString","setextHeading","strong","thematicBreak","exit","closer","atxHeadingSequence","onexitatxheadingsequence","onexitautolinkemail","onexitautolinkprotocol","characterEscapeValue","onexitdata","characterReferenceMarkerHexadecimal","onexitcharacterreferencemarker","characterReferenceMarkerNumeric","characterReferenceValue","onexitcharacterreferencevalue","onexitcodefenced","codeFencedFence","onexitcodefencedfence","onexitcodefencedfenceinfo","onexitcodefencedfencemeta","onexitcodeindented","onexitcodetext","onexitdefinitiondestinationstring","onexitdefinitionlabelstring","onexitdefinitiontitlestring","onexithardbreak","onexithtmlflow","onexithtmltext","onexitimage","onexitlabel","labelText","onexitlabeltext","lineEnding","onexitlineending","onexitlink","onexitreferencestring","onexitresourcedestinationstring","onexitresourcetitlestring","resource","onexitresource","onexitsetextheading","setextHeadingLineSequence","onexitsetextheadinglinesequence","setextHeadingText","onexitsetextheadingtext","configure","mdastExtensions","compile","events","tree","type","children","context","stack","tokenStack","resume","setData","getData","listStack","index","length","push","prepareList","pop","handler","call","Object","assign","sliceSerialize","tail","defaultOnError","position","start","point","line","column","offset","end","lineIndex","firstBlankLineIndex","atMarker","containerBalance","listSpread","event","tailIndex","tailEvent","_spread","splice","key","create","and","open","token","this","node","errorHandler","close","onExitError","Error","stringifyPosition","toString","Number","parseInt","lang","meta","replace","identifier","normalizeIdentifier","toLowerCase","title","url","depth","charCodeAt","text","includes","referenceType","string","ancestor","decodeString","fragment","alt","decodeNumericCharacterReference","decodeNamedCharacterReference","ordered","spread","checked","compiler","postprocess","parse","document","write","preprocess","d","combined","extensions","Array","isArray","extension","right","left"],"mappings":"ktBA2JA,MAAMA,EAAM,CAAE,EAACC,eAYFC,EAcX,SAAUC,EAAOC,EAAUC,GAKzB,MAJwB,iBAAbD,IACTC,EAAUD,EACVA,OAAWE,GAcjB,SAAkBD,GAEhB,MAAME,EAAS,CACbC,WAAY,GACZC,eAAgB,CAAC,WAAY,WAAY,UAAW,YAAa,UACjEC,MAAO,CACLC,SAAUC,EAAOC,IACjBC,iBAAkBC,EAClBC,cAAeD,EACfE,WAAYL,EAAOM,IACnBC,WAAYP,EAAOO,IACnBC,gBAAiBL,EACjBM,mBAAoBN,EACpBO,WAAYV,EAAOW,IACnBC,oBAAqBC,EACrBC,oBAAqBD,EACrBE,aAAcf,EAAOW,GAAUE,GAC/BG,SAAUhB,EAAOgB,GAAUH,GAC3BI,aAAcd,EACde,KAAMf,EACNgB,cAAehB,EACfiB,WAAYpB,EAAOoB,IACnBC,4BAA6BR,EAC7BS,sBAAuBT,EACvBU,sBAAuBV,EACvBW,SAAUxB,EAAOwB,IACjBC,gBAAiBzB,EAAO0B,IACxBC,kBAAmB3B,EAAO0B,IAC1BE,SAAU5B,EAAO6B,GAAMhB,GACvBiB,aAAc3B,EACd4B,SAAU/B,EAAO6B,GAAMhB,GACvBmB,aAAc7B,EACd8B,MAAOjC,EAAOiC,IACdC,MAAOrB,EACPZ,KAAMD,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D,GACFL,EAAS7C,GAAK3B,QAAQ6E,EAEhC,MAAa,GAAY,eAARlD,EAAsB,CAC/B,MAAMkD,EAAQD,EAAUjD,GACpBkD,GACFL,EAAS7C,GAAK3B,QAAQ6E,EAEzB,MAAM,GAAY,UAARlD,GAA2B,SAARA,EAAgB,CAC5C,MAAMkD,EAAQD,EAAUjD,GACpBkD,GACFxE,OAAOC,OAAOkE,EAAS7C,GAAMkD,EAEhC,CAGP,CAGA,SAASpE,EAAeqE,EAAMD,GAC5B,MAAIC,EACI,IAAIzC,MACR,iBACEyC,EAAKzF,KACL,MACAiD,EAAkB,CAChB3B,MAAOmE,EAAKnE,MACZK,IAAK8D,EAAK9D,MAEZ,0BACA6D,EAAMxF,KACN,MACAiD,EAAkB,CAChB3B,MAAOkE,EAAMlE,MACbK,IAAK6D,EAAM7D,MAEb,aAGE,IAAIqB,MACR,oCACEwC,EAAMxF,KACN,MACAiD,EAAkB,CAChB3B,MAAOkE,EAAMlE,MACbK,IAAK6D,EAAM7D,MAEb,kBAGR"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function n(n){return n&&"object"==typeof n?"position"in n||"type"in n?i(n.position):"start"in n||"end"in n?i(n):"line"in n||"column"in n?t(n):"":""}function t(n){return e(n&&n.line)+":"+e(n&&n.column)}function i(n){return t(n&&n.start)+"-"+t(n&&n.end)}function e(n){return n&&"number"==typeof n?n:1}export{n as stringifyPosition};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Point} Point\n * @typedef {import('unist').Position} Position\n */\n\n/**\n * @typedef NodeLike\n * @property {string} type\n * @property {PositionLike | null | undefined} [position]\n *\n * @typedef PositionLike\n * @property {PointLike | null | undefined} [start]\n * @property {PointLike | null | undefined} [end]\n *\n * @typedef PointLike\n * @property {number | null | undefined} [line]\n * @property {number | null | undefined} [column]\n * @property {number | null | undefined} [offset]\n */\n\n/**\n * Serialize the positional info of a point, position (start and end points),\n * or node.\n *\n * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value]\n * Node, position, or point.\n * @returns {string}\n * Pretty printed positional info of a node (`string`).\n *\n * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)\n * or a point `l:c` (when given `point`), where `l` stands for line, `c` for\n * column, `s` for `start`, and `e` for end.\n * An empty string (`''`) is returned if the given value is neither `node`,\n * `position`, nor `point`.\n */\nexport function stringifyPosition(value) {\n // Nothing.\n if (!value || typeof value !== 'object') {\n return ''\n }\n\n // Node.\n if ('position' in value || 'type' in value) {\n return position(value.position)\n }\n\n // Position.\n if ('start' in value || 'end' in value) {\n return position(value)\n }\n\n // Point.\n if ('line' in value || 'column' in value) {\n return point(value)\n }\n\n // ?\n return ''\n}\n\n/**\n * @param {Point | PointLike | null | undefined} point\n * @returns {string}\n */\nfunction point(point) {\n return index(point && point.line) + ':' + index(point && point.column)\n}\n\n/**\n * @param {Position | PositionLike | null | undefined} pos\n * @returns {string}\n */\nfunction position(pos) {\n return point(pos && pos.start) + '-' + point(pos && pos.end)\n}\n\n/**\n * @param {number | null | undefined} value\n * @returns {number}\n */\nfunction index(value) {\n return value && typeof value === 'number' ? value : 1\n}\n"],"names":["stringifyPosition","value","position","point","index","line","column","pos","start","end"],"mappings":"AAoCO,SAASA,EAAkBC,GAEhC,OAAKA,GAA0B,iBAAVA,EAKjB,aAAcA,GAAS,SAAUA,EAC5BC,EAASD,EAAMC,UAIpB,UAAWD,GAAS,QAASA,EACxBC,EAASD,GAId,SAAUA,GAAS,WAAYA,EAC1BE,EAAMF,GAIR,GAnBE,EAoBX,CAMA,SAASE,EAAMA,GACb,OAAOC,EAAMD,GAASA,EAAME,MAAQ,IAAMD,EAAMD,GAASA,EAAMG,OACjE,CAMA,SAASJ,EAASK,GAChB,OAAOJ,EAAMI,GAAOA,EAAIC,OAAS,IAAML,EAAMI,GAAOA,EAAIE,IAC1D,CAMA,SAASL,EAAMH,GACb,OAAOA,GAA0B,iBAAVA,EAAqBA,EAAQ,CACtD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{gfmAutolinkLiteralToMarkdown as t,gfmAutolinkLiteralFromMarkdown as i}from"../../mdast-util-gfm-autolink-literal/lib/index.js";import{gfmFootnoteToMarkdown as m,gfmFootnoteFromMarkdown as o}from"../../mdast-util-gfm-footnote/lib/index.js";import{gfmStrikethroughToMarkdown as r,gfmStrikethroughFromMarkdown as e}from"../../mdast-util-gfm-strikethrough/lib/index.js";import{gfmTableToMarkdown as l,gfmTableFromMarkdown as n}from"../../mdast-util-gfm-table/lib/index.js";import{gfmTaskListItemToMarkdown as s,gfmTaskListItemFromMarkdown as f}from"../../mdast-util-gfm-task-list-item/lib/index.js";function u(){return[i,o(),e,n,f]}function d(i){return{extensions:[t,m(),r,l(i),s]}}export{u as gfmFromMarkdown,d as gfmToMarkdown};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|