markdown-flow-ui 0.1.70 → 0.1.71-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/core.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/arduino.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/bash.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/c.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/cpp.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/csharp.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/css.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/diff.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/go.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/graphql.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/ini.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/java.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/javascript.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/json.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/kotlin.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/latex.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/less.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/lua.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/makefile.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/markdown.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/objectivec.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/perl.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/php-template.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/php.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/plaintext.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/python-repl.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/python.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/r.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/ruby.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/rust.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/scss.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/shell.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/sql.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/swift.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/typescript.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/vbnet.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/vhdl.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/wasm.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/xml.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/yaml.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.js +8 -6
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.js.map +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lowlight@3.3.0/node_modules/lowlight/lib/common.js +80 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lowlight@3.3.0/node_modules/lowlight/lib/common.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lowlight@3.3.0/node_modules}/lowlight/lib/index.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lowlight@3.3.0/node_modules/lowlight/lib/index.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.js +11 -11
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.js.map +1 -1
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules}/mdast-util-gfm-autolink-literal/lib/index.js +4 -4
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules}/mdast-util-gfm-footnote/lib/index.js +2 -2
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules}/mdast-util-gfm-table/lib/index.js +3 -3
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules}/mdast-util-gfm-task-list-item/lib/index.js +2 -2
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules}/mdast-util-gfm-task-list-item/lib/index.js.map +1 -1
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules}/mdast-util-gfm/lib/index.js +5 -5
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules}/mdast-util-phrasing/lib/index.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/code.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/root.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/encode-info.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +14 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/format-link-as-autolink.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js +1 -1
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules}/micromark-extension-gfm-autolink-literal/lib/syntax.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules}/micromark-extension-gfm-footnote/lib/syntax.js +4 -4
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules}/micromark-extension-gfm-strikethrough/lib/syntax.js +3 -3
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules}/micromark-extension-gfm-table/lib/edit-map.js.map +1 -1
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules}/micromark-extension-gfm-table/lib/infer.js.map +1 -1
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules}/micromark-extension-gfm-table/lib/syntax.js +2 -2
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules}/micromark-extension-gfm-table/lib/syntax.js.map +1 -1
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules}/micromark-extension-gfm-task-list-item/lib/syntax.js +2 -2
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.js +19 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.js +1 -1
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules}/rehype-highlight/lib/index.js +4 -4
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules/rehype-highlight/lib/index.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/index.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/{remark-flow@0.1.3-beta.0 → remark-flow@0.1.6}/node_modules/remark-flow/dist/interaction-parser.js +30 -51
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/interaction-parser.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/{remark-flow@0.1.3-beta.0 → remark-flow@0.1.6}/node_modules/remark-flow/dist/remark-custom-variable.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-custom-variable.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-flow.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/{remark-flow@0.1.3-beta.0 → remark-flow@0.1.6}/node_modules/remark-flow/dist/remark-interaction.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-interaction.js.map +1 -0
- package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules}/remark-gfm/lib/index.js +2 -2
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js.map +1 -0
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js +1 -1
- package/dist/_virtual/core.js +1 -1
- package/dist/_virtual/index.js +1 -1
- package/dist/_virtual/index3.js +5 -4
- package/dist/_virtual/index3.js.map +1 -1
- package/dist/_virtual/index4.js +4 -5
- package/dist/_virtual/index4.js.map +1 -1
- package/dist/_virtual/index5.js +3 -5
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +4 -4
- package/dist/_virtual/index7.js +5 -3
- package/dist/_virtual/index7.js.map +1 -1
- package/dist/assets/markdown-flow-ui.css +1 -1
- package/dist/components/ContentRender/ContentRender.js +9 -9
- package/dist/components/ContentRender/ContentRender.js.map +1 -1
- package/dist/components/ContentRender/plugins/MermaidChart.js +7 -1
- package/dist/components/ContentRender/plugins/MermaidChart.js.map +1 -1
- package/dist/components/ContentRender/utils/highlight-languages.js +22 -22
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.js +1 -1
- package/dist/components/ui/inputGroup/textarea.js +1 -1
- package/package.json +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.3-beta.0/node_modules/remark-flow/dist/index.js.map +0 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.3-beta.0/node_modules/remark-flow/dist/interaction-parser.js.map +0 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.3-beta.0/node_modules/remark-flow/dist/remark-custom-variable.js.map +0 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.3-beta.0/node_modules/remark-flow/dist/remark-flow.js.map +0 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.3-beta.0/node_modules/remark-flow/dist/remark-interaction.js.map +0 -1
- package/dist/node_modules/ccount/index.js.map +0 -1
- package/dist/node_modules/devlop/lib/default.js +0 -6
- package/dist/node_modules/devlop/lib/default.js.map +0 -1
- package/dist/node_modules/escape-string-regexp/index.js +0 -9
- package/dist/node_modules/escape-string-regexp/index.js.map +0 -1
- package/dist/node_modules/hast-util-is-element/lib/index.js +0 -66
- package/dist/node_modules/hast-util-is-element/lib/index.js.map +0 -1
- package/dist/node_modules/hast-util-to-text/lib/index.js +0 -227
- package/dist/node_modules/hast-util-to-text/lib/index.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/arduino.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/bash.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/c.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/cpp.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/csharp.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/css.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/diff.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/go.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/graphql.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/ini.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/java.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/javascript.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/json.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/kotlin.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/latex.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/less.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/lua.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/makefile.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/markdown.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/objectivec.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/perl.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/php-template.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/php.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/plaintext.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/python-repl.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/python.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/r.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/ruby.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/rust.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/scss.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/shell.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/sql.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/swift.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/typescript.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/vbnet.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/vhdl.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/wasm.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/xml.js.map +0 -1
- package/dist/node_modules/highlight.js/es/languages/yaml.js.map +0 -1
- package/dist/node_modules/highlight.js/lib/core.js.map +0 -1
- package/dist/node_modules/longest-streak/index.js +0 -13
- package/dist/node_modules/longest-streak/index.js.map +0 -1
- package/dist/node_modules/lowlight/lib/common.js +0 -80
- package/dist/node_modules/lowlight/lib/common.js.map +0 -1
- package/dist/node_modules/lowlight/lib/index.js.map +0 -1
- package/dist/node_modules/markdown-table/index.js.map +0 -1
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.js +0 -71
- package/dist/node_modules/mdast-util-find-and-replace/lib/index.js.map +0 -1
- package/dist/node_modules/mdast-util-gfm/lib/index.js.map +0 -1
- package/dist/node_modules/mdast-util-gfm-autolink-literal/lib/index.js.map +0 -1
- package/dist/node_modules/mdast-util-gfm-footnote/lib/index.js.map +0 -1
- package/dist/node_modules/mdast-util-gfm-strikethrough/lib/index.js.map +0 -1
- package/dist/node_modules/mdast-util-gfm-table/lib/index.js.map +0 -1
- package/dist/node_modules/mdast-util-phrasing/lib/index.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/blockquote.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/break.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/code.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/definition.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/emphasis.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/heading.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/html.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image-reference.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/image.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/index.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/inline-code.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link-reference.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/link.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list-item.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/list.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/paragraph.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/root.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/strong.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/text.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-bullet.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-fence.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-quote.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-rule.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/check-strong.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/encode-info.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js +0 -14
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js.map +0 -1
- package/dist/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js.map +0 -1
- package/dist/node_modules/mdast-util-to-string/lib/index.js +0 -30
- package/dist/node_modules/mdast-util-to-string/lib/index.js.map +0 -1
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +0 -19
- package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js.map +0 -1
- package/dist/node_modules/micromark-extension-gfm/index.js +0 -19
- package/dist/node_modules/micromark-extension-gfm/index.js.map +0 -1
- package/dist/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js.map +0 -1
- package/dist/node_modules/micromark-extension-gfm-footnote/lib/syntax.js.map +0 -1
- package/dist/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js.map +0 -1
- package/dist/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js.map +0 -1
- package/dist/node_modules/micromark-factory-space/index.js +0 -16
- package/dist/node_modules/micromark-factory-space/index.js.map +0 -1
- package/dist/node_modules/micromark-util-character/index.js +0 -35
- package/dist/node_modules/micromark-util-character/index.js.map +0 -1
- package/dist/node_modules/micromark-util-chunked/index.js +0 -13
- package/dist/node_modules/micromark-util-chunked/index.js.map +0 -1
- package/dist/node_modules/micromark-util-classify-character/index.js +0 -11
- package/dist/node_modules/micromark-util-classify-character/index.js.map +0 -1
- package/dist/node_modules/micromark-util-combine-extensions/index.js +0 -37
- package/dist/node_modules/micromark-util-combine-extensions/index.js.map +0 -1
- package/dist/node_modules/micromark-util-normalize-identifier/index.js +0 -7
- package/dist/node_modules/micromark-util-normalize-identifier/index.js.map +0 -1
- package/dist/node_modules/micromark-util-resolve-all/index.js +0 -13
- package/dist/node_modules/micromark-util-resolve-all/index.js.map +0 -1
- package/dist/node_modules/rehype-highlight/lib/index.js.map +0 -1
- package/dist/node_modules/remark-gfm/lib/index.js.map +0 -1
- package/dist/node_modules/unist-util-find-after/lib/index.js +0 -33
- package/dist/node_modules/unist-util-find-after/lib/index.js.map +0 -1
- package/dist/node_modules/unist-util-is/lib/index.js +0 -85
- package/dist/node_modules/unist-util-is/lib/index.js.map +0 -1
- package/dist/node_modules/unist-util-visit/lib/index.js +0 -17
- package/dist/node_modules/unist-util-visit/lib/index.js.map +0 -1
- package/dist/node_modules/unist-util-visit-parents/lib/color.js +0 -7
- package/dist/node_modules/unist-util-visit-parents/lib/color.js.map +0 -1
- package/dist/node_modules/unist-util-visit-parents/lib/index.js +0 -57
- package/dist/node_modules/unist-util-visit-parents/lib/index.js.map +0 -1
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/ccount@2.0.1/node_modules}/ccount/index.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/core.js.map +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/arduino.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/bash.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/c.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/cpp.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/csharp.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/css.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/diff.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/go.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/graphql.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/ini.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/java.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/javascript.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/json.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/kotlin.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/latex.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/less.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/lua.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/makefile.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/markdown.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/objectivec.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/perl.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/php-template.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/php.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/plaintext.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/python-repl.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/python.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/r.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/ruby.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/rust.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/scss.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/shell.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/sql.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/swift.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/typescript.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/vbnet.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/vhdl.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/wasm.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/xml.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/es/languages/yaml.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules}/highlight.js/lib/core.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/markdown-table@3.0.4/node_modules}/markdown-table/index.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules}/mdast-util-gfm-strikethrough/lib/index.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/blockquote.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/break.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/definition.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/emphasis.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/heading.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/html.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/image-reference.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/image.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/index.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/inline-code.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/link-reference.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/link.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/list-item.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/list.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/paragraph.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/strong.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/text.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/handle/thematic-break.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/check-bullet-ordered.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/check-bullet-other.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/check-bullet.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/check-emphasis.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/check-fence.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/check-list-item-indent.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/check-quote.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/check-rule-repetition.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/check-rule.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/check-strong.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/encode-character-reference.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/format-code-as-indented.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules}/mdast-util-to-markdown/lib/util/pattern-in-scope.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules}/micromark-extension-gfm-table/lib/edit-map.js +0 -0
- /package/dist/{node_modules → Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules}/micromark-extension-gfm-table/lib/infer.js +0 -0
- /package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/{remark-flow@0.1.3-beta.0 → remark-flow@0.1.6}/node_modules/remark-flow/dist/index.js +0 -0
- /package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/{remark-flow@0.1.3-beta.0 → remark-flow@0.1.6}/node_modules/remark-flow/dist/remark-flow.js +0 -0
- /package/dist/{Documents/ai-shifu/markdown-flow-ui/node_modules → node_modules}/@codemirror/state/dist/index.js +0 -0
- /package/dist/{Documents/ai-shifu/markdown-flow-ui/node_modules → node_modules}/@codemirror/state/dist/index.js.map +0 -0
- /package/dist/{Documents/ai-shifu/markdown-flow-ui/node_modules → node_modules}/@marijn/find-cluster-break/src/index.js +0 -0
- /package/dist/{Documents/ai-shifu/markdown-flow-ui/node_modules → node_modules}/@marijn/find-cluster-break/src/index.js.map +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as t } from "../../_virtual/jsx-runtime.js";
|
|
2
|
-
/* empty css
|
|
2
|
+
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import S, { useRef as x, useEffect as i } from "react";
|
|
5
5
|
import B from "../../_virtual/index.js";
|
|
@@ -14,9 +14,9 @@ import { subsetLanguages as z, highlightLanguages as A } from "./utils/highlight
|
|
|
14
14
|
import { parseMarkdownSegments as H, mermaidBlockIsComplete as G } from "./utils/mermaid-parse.js";
|
|
15
15
|
import { Markdown as K } from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-markdown@10.1.0_@types_react@19.2.2_react@19.0.1/node_modules/react-markdown/lib/index.js";
|
|
16
16
|
import $ from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js";
|
|
17
|
-
import q from "../../node_modules/rehype-highlight/lib/index.js";
|
|
17
|
+
import q from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules/rehype-highlight/lib/index.js";
|
|
18
18
|
import D from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-katex@7.0.1/node_modules/rehype-katex/lib/index.js";
|
|
19
|
-
import F from "../../node_modules/remark-gfm/lib/index.js";
|
|
19
|
+
import F from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js";
|
|
20
20
|
import J from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-math@6.0.0/node_modules/remark-math/lib/index.js";
|
|
21
21
|
import O from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.js";
|
|
22
22
|
const Q = ({ svg: s }) => {
|
|
@@ -39,8 +39,8 @@ const Q = ({ svg: s }) => {
|
|
|
39
39
|
readonly: N = !1,
|
|
40
40
|
onTypeFinished: l,
|
|
41
41
|
confirmButtonText: y,
|
|
42
|
-
copyButtonText:
|
|
43
|
-
copiedButtonText:
|
|
42
|
+
copyButtonText: v,
|
|
43
|
+
copiedButtonText: C,
|
|
44
44
|
onClickCustomButtonAfterContent: w,
|
|
45
45
|
beforeSend: R
|
|
46
46
|
// tooltipMinLength,
|
|
@@ -107,8 +107,8 @@ const Q = ({ svg: s }) => {
|
|
|
107
107
|
P,
|
|
108
108
|
{
|
|
109
109
|
...e,
|
|
110
|
-
copyButtonText:
|
|
111
|
-
copiedButtonText:
|
|
110
|
+
copyButtonText: v,
|
|
111
|
+
copiedButtonText: C
|
|
112
112
|
}
|
|
113
113
|
)
|
|
114
114
|
}, c = x(!1);
|
|
@@ -152,11 +152,11 @@ const Q = ({ svg: s }) => {
|
|
|
152
152
|
if (e.type === "svg")
|
|
153
153
|
return /* @__PURE__ */ t.jsx(Q, { svg: e.value }, r);
|
|
154
154
|
}),
|
|
155
|
-
n && S.createElement(n, {
|
|
155
|
+
n && /* @__PURE__ */ t.jsx("div", { className: "content-render-custom-bar", children: S.createElement(n, {
|
|
156
156
|
content: s,
|
|
157
157
|
displayContent: u,
|
|
158
158
|
onSend: a
|
|
159
|
-
})
|
|
159
|
+
}) })
|
|
160
160
|
] });
|
|
161
161
|
};
|
|
162
162
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentRender.js","sources":["../../../src/components/ContentRender/ContentRender.tsx"],"sourcesContent":["import \"highlight.js/styles/github.css\";\nimport \"katex/dist/katex.min.css\";\nimport React, { useEffect, useRef } from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport rehypeHighlight from \"rehype-highlight\";\nimport rehypeKatex from \"rehype-katex\";\nimport rehypeRaw from \"rehype-raw\";\nimport remarkBreaks from \"remark-breaks\";\nimport remarkFlow from \"remark-flow\";\nimport remarkGfm from \"remark-gfm\";\nimport remarkMath from \"remark-math\";\nimport { CustomRenderBarProps, OnSendContentParams } from \"../types\";\nimport \"./contentRender.css\";\nimport \"./github-markdown-light.css\";\nimport CodeBlock from \"./CodeBlock\";\nimport CustomButtonInputVariable, {\n ComponentsWithCustomVariable,\n} from \"./plugins/CustomVariable\";\nimport MermaidChart from \"./plugins/MermaidChart\";\nimport useTypewriterStateMachine from \"./useTypewriterStateMachine\";\nimport {\n preserveCustomVariableProperties,\n restoreCustomVariableProperties,\n} from \"./utils/custom-variable-props\";\nimport {\n highlightLanguages,\n subsetLanguages,\n} from \"./utils/highlight-languages\";\n// import { processMarkdownText } from \"./utils/process-markdown\";\nimport {\n parseMarkdownSegments,\n mermaidBlockIsComplete,\n} from \"./utils/mermaid-parse\";\n// Define component Props type\nexport interface ContentRenderProps {\n content: string;\n /**\n+ * Callback invoked when the custom button after content is clicked.\n+ * This button is rendered via the `<custom-button-after-content>` tag in markdown content.\n+ * @example\n+ * ```tsx\n+ * <ContentRender\n+ * content=\"Hello <custom-button-after-content>Ask</custom-button-after-content>\"\n+ * onClickCustomButtonAfterContent={() => console.log('Button clicked')}\n+ * />\n+ * ```\n+ */\n customRenderBar?: CustomRenderBarProps;\n onClickCustomButtonAfterContent?: () => void;\n onSend?: (content: OnSendContentParams) => void;\n typingSpeed?: number;\n enableTypewriter?: boolean;\n defaultButtonText?: string;\n defaultInputText?: string; // Text input by user\n defaultSelectedValues?: string[]; // Default selected values for multi-select\n readonly?: boolean;\n onTypeFinished?: () => void;\n // Multi-select confirm button text (i18n support)\n confirmButtonText?: string;\n // Copy button text (i18n support)\n copyButtonText?: string;\n // Copied state text (i18n support)\n copiedButtonText?: string;\n // Dynamic interaction format for multi-select support\n dynamicInteractionFormat?: string;\n beforeSend?: (param: OnSendContentParams) => boolean;\n // tooltipMinLength?: number; // Control minimum character length for tooltip display, default 10\n}\n\n// Render svg string via Shadow DOM to avoid markdown wrapping\nconst SvgBlockInShadow: React.FC<{ svg: string }> = ({ svg }) => {\n const hostRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const host = hostRef.current;\n if (!host) return;\n const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: \"open\" });\n shadowRoot.innerHTML = svg;\n }, [svg]);\n\n return <div className=\"content-render-svg\" ref={hostRef} />;\n};\n\n// Extended component interface\ntype CustomComponents = ComponentsWithCustomVariable & {\n \"custom-button-after-content\"?: React.ComponentType<{\n children: React.ReactNode;\n }>;\n};\n\nconst ContentRender: React.FC<ContentRenderProps> = ({\n content,\n customRenderBar,\n onSend,\n typingSpeed = 30,\n enableTypewriter = false,\n defaultButtonText,\n defaultInputText,\n defaultSelectedValues,\n readonly = false,\n onTypeFinished,\n confirmButtonText,\n copyButtonText,\n copiedButtonText,\n onClickCustomButtonAfterContent,\n beforeSend,\n // tooltipMinLength,\n}) => {\n // Use custom Hook to handle typewriter effect\n const { displayContent, isComplete } = useTypewriterStateMachine({\n // processMarkdownText will let code block printf(\"You win!\\n\") become printf(\"You win!<br/>\");\n // content: processMarkdownText(content),\n content: content,\n typingSpeed,\n disabled: !enableTypewriter,\n });\n\n const components: CustomComponents = {\n \"custom-button-after-content\": ({\n children,\n }: {\n children: React.ReactNode;\n }) => {\n return (\n <button\n className=\"content-render-custom-button-after-content\"\n onClick={onClickCustomButtonAfterContent}\n >\n {children}\n </button>\n );\n },\n \"custom-variable\": (props) => (\n <CustomButtonInputVariable\n {...props}\n readonly={readonly}\n defaultButtonText={defaultButtonText}\n defaultInputText={defaultInputText}\n defaultSelectedValues={defaultSelectedValues}\n onSend={onSend}\n beforeSend={beforeSend}\n confirmButtonText={confirmButtonText}\n // tooltipMinLength={tooltipMinLength}\n />\n ),\n code: (props) => {\n const { className, children, ...rest } = props as {\n className?: string;\n children?: React.ReactNode;\n };\n const match = /language-(\\w+)/.exec(className || \"\");\n const language = match?.[1];\n if (language === \"mermaid\") {\n const chartContent = children?.toString().replace(/\\n$/, \"\") || \"\";\n const frozen = mermaidBlockIsComplete(content, chartContent);\n return <MermaidChart chart={chartContent} frozen={frozen} />;\n }\n\n return (\n <code className={className} {...rest}>\n {children}\n </code>\n );\n },\n table: ({ ...props }) => (\n <div className=\"content-render-table-container\">\n <table className=\"content-render-table\" {...props} />\n </div>\n ),\n th: ({ ...props }) => <th className=\"content-render-th\" {...props} />,\n td: ({ ...props }) => <td className=\"content-render-td\" {...props} />,\n tr: ({ ...props }) => <tr className=\"content-render-tr\" {...props} />,\n li: ({ node, ...props }) => {\n const className = node?.properties?.className;\n const hasTaskListItem =\n (typeof className === \"string\" &&\n className.includes(\"task-list-item\")) ||\n (Array.isArray(className) && className.includes(\"task-list-item\"));\n if (hasTaskListItem) {\n return <li className=\"content-render-task-list-item\" {...props} />;\n }\n return <li {...props} />;\n },\n ol: ({ ...props }) => <ol className=\"content-render-ol\" {...props} />,\n ul: ({ ...props }) => <ul className=\"content-render-ul\" {...props} />,\n input: ({ ...props }) => {\n if (props.type === \"checkbox\") {\n return (\n <input\n type=\"checkbox\"\n className=\"content-render-checkbox\"\n disabled\n {...props}\n />\n );\n }\n return <input {...props} />;\n },\n a: ({ children, ...props }) => (\n <a target=\"_blank\" rel=\"noopener noreferrer\" {...props}>\n {children}\n </a>\n ),\n pre: (props) => (\n <CodeBlock\n {...props}\n copyButtonText={copyButtonText}\n copiedButtonText={copiedButtonText}\n />\n ),\n };\n\n const hasCompleted = useRef(false);\n\n useEffect(() => {\n if (isComplete && !hasCompleted.current) {\n hasCompleted.current = true; // Mark as completed\n onTypeFinished?.(); // Call the passed callback\n }\n }, [isComplete, onTypeFinished]);\n useEffect(() => {\n hasCompleted.current = false; // Reset completion status when content changes\n }, [content]);\n\n const segments = parseMarkdownSegments(displayContent);\n\n return (\n <div className={`content-render markdown-body`}>\n {segments.map((seg, index) => {\n if (seg.type === \"text\") {\n return (\n <ReactMarkdown\n key={index}\n remarkPlugins={[remarkGfm, remarkMath, remarkFlow, remarkBreaks]}\n rehypePlugins={[\n preserveCustomVariableProperties,\n rehypeRaw,\n restoreCustomVariableProperties,\n [\n rehypeHighlight,\n { languages: highlightLanguages, subset: subsetLanguages },\n ],\n rehypeKatex,\n ]}\n components={components}\n >\n {seg.value}\n </ReactMarkdown>\n );\n }\n\n if (seg.type === \"mermaid\") {\n return (\n <MermaidChart\n key={index}\n chart={seg.value}\n frozen={!seg.complete}\n />\n );\n }\n\n if (seg.type === \"svg\") {\n return <SvgBlockInShadow key={index} svg={seg.value} />;\n }\n })}\n\n {customRenderBar &&\n React.createElement(customRenderBar, {\n content,\n displayContent,\n onSend,\n })}\n </div>\n );\n};\n\nexport default ContentRender;\n"],"names":["SvgBlockInShadow","svg","hostRef","useRef","useEffect","host","shadowRoot","jsx","ContentRender","content","customRenderBar","onSend","typingSpeed","enableTypewriter","defaultButtonText","defaultInputText","defaultSelectedValues","readonly","onTypeFinished","confirmButtonText","copyButtonText","copiedButtonText","onClickCustomButtonAfterContent","beforeSend","displayContent","isComplete","useTypewriterStateMachine","components","children","props","CustomButtonInputVariable","className","rest","chartContent","frozen","mermaidBlockIsComplete","MermaidChart","node","CodeBlock","hasCompleted","segments","parseMarkdownSegments","jsxs","seg","index","ReactMarkdown","remarkGfm","remarkMath","remarkFlow","remarkBreaks","preserveCustomVariableProperties","rehypeRaw","restoreCustomVariableProperties","rehypeHighlight","highlightLanguages","subsetLanguages","rehypeKatex","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsEA,MAAMA,IAA8C,CAA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AAC,OAAA,EAAI,WAAW,gCACb,UAAA;AAAA,IAAAF,EAAS,IAAI,CAACG,GAAKC,MAAU;AAC5B,UAAID,EAAI,SAAS;AACf,eACEpC,gBAAAA,EAAAA;AAAAA,UAACsC;AAAAA,UAAA;AAAA,YAEC,eAAe,CAACC,GAAWC,GAAYC,GAAYC,CAAY;AAAA,YAC/D,eAAe;AAAA,cACbC;AAAA,cACAC;AAAA,cACAC;AAAA,cACA;AAAA,gBACEC;AAAA,gBACA,EAAE,WAAWC,GAAoB,QAAQC,EAAA;AAAA,cAAgB;AAAA,cAE3DC;AAAA,YAAA;AAAA,YAEF,YAAA7B;AAAA,YAEC,UAAAgB,EAAI;AAAA,UAAA;AAAA,UAdAC;AAAA,QAAA;AAmBX,UAAID,EAAI,SAAS;AACf,eACEpC,gBAAAA,EAAAA;AAAAA,UAAC6B;AAAA,UAAA;AAAA,YAEC,OAAOO,EAAI;AAAA,YACX,QAAQ,CAACA,EAAI;AAAA,UAAA;AAAA,UAFRC;AAAA,QAAA;AAOX,UAAID,EAAI,SAAS;AACf,eAAOpC,gBAAAA,EAAAA,IAACP,GAAA,EAA6B,KAAK2C,EAAI,SAAhBC,CAAuB;AAAA,IAEzD,CAAC;AAAA,IAEAlC,KACC+C,EAAM,cAAc/C,GAAiB;AAAA,MACnC,SAAAD;AAAA,MACA,gBAAAe;AAAA,MACA,QAAAb;AAAA,IAAA,CACD;AAAA,EAAA,GACL;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"ContentRender.js","sources":["../../../src/components/ContentRender/ContentRender.tsx"],"sourcesContent":["import \"highlight.js/styles/github.css\";\nimport \"katex/dist/katex.min.css\";\nimport React, { useEffect, useRef } from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport rehypeHighlight from \"rehype-highlight\";\nimport rehypeKatex from \"rehype-katex\";\nimport rehypeRaw from \"rehype-raw\";\nimport remarkBreaks from \"remark-breaks\";\nimport remarkFlow from \"remark-flow\";\nimport remarkGfm from \"remark-gfm\";\nimport remarkMath from \"remark-math\";\nimport { CustomRenderBarProps, OnSendContentParams } from \"../types\";\nimport \"./contentRender.css\";\nimport \"./github-markdown-light.css\";\nimport CodeBlock from \"./CodeBlock\";\nimport CustomButtonInputVariable, {\n ComponentsWithCustomVariable,\n} from \"./plugins/CustomVariable\";\nimport MermaidChart from \"./plugins/MermaidChart\";\nimport useTypewriterStateMachine from \"./useTypewriterStateMachine\";\nimport {\n preserveCustomVariableProperties,\n restoreCustomVariableProperties,\n} from \"./utils/custom-variable-props\";\nimport {\n highlightLanguages,\n subsetLanguages,\n} from \"./utils/highlight-languages\";\n// import { processMarkdownText } from \"./utils/process-markdown\";\nimport {\n parseMarkdownSegments,\n mermaidBlockIsComplete,\n} from \"./utils/mermaid-parse\";\n// Define component Props type\nexport interface ContentRenderProps {\n content: string;\n /**\n+ * Callback invoked when the custom button after content is clicked.\n+ * This button is rendered via the `<custom-button-after-content>` tag in markdown content.\n+ * @example\n+ * ```tsx\n+ * <ContentRender\n+ * content=\"Hello <custom-button-after-content>Ask</custom-button-after-content>\"\n+ * onClickCustomButtonAfterContent={() => console.log('Button clicked')}\n+ * />\n+ * ```\n+ */\n customRenderBar?: CustomRenderBarProps;\n onClickCustomButtonAfterContent?: () => void;\n onSend?: (content: OnSendContentParams) => void;\n typingSpeed?: number;\n enableTypewriter?: boolean;\n defaultButtonText?: string;\n defaultInputText?: string; // Text input by user\n defaultSelectedValues?: string[]; // Default selected values for multi-select\n readonly?: boolean;\n onTypeFinished?: () => void;\n // Multi-select confirm button text (i18n support)\n confirmButtonText?: string;\n // Copy button text (i18n support)\n copyButtonText?: string;\n // Copied state text (i18n support)\n copiedButtonText?: string;\n // Dynamic interaction format for multi-select support\n dynamicInteractionFormat?: string;\n beforeSend?: (param: OnSendContentParams) => boolean;\n // tooltipMinLength?: number; // Control minimum character length for tooltip display, default 10\n}\n\n// Render svg string via Shadow DOM to avoid markdown wrapping\nconst SvgBlockInShadow: React.FC<{ svg: string }> = ({ svg }) => {\n const hostRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const host = hostRef.current;\n if (!host) return;\n const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: \"open\" });\n shadowRoot.innerHTML = svg;\n }, [svg]);\n\n return <div className=\"content-render-svg\" ref={hostRef} />;\n};\n\n// Extended component interface\ntype CustomComponents = ComponentsWithCustomVariable & {\n \"custom-button-after-content\"?: React.ComponentType<{\n children: React.ReactNode;\n }>;\n};\n\nconst ContentRender: React.FC<ContentRenderProps> = ({\n content,\n customRenderBar,\n onSend,\n typingSpeed = 30,\n enableTypewriter = false,\n defaultButtonText,\n defaultInputText,\n defaultSelectedValues,\n readonly = false,\n onTypeFinished,\n confirmButtonText,\n copyButtonText,\n copiedButtonText,\n onClickCustomButtonAfterContent,\n beforeSend,\n // tooltipMinLength,\n}) => {\n // Use custom Hook to handle typewriter effect\n const { displayContent, isComplete } = useTypewriterStateMachine({\n // processMarkdownText will let code block printf(\"You win!\\n\") become printf(\"You win!<br/>\");\n // content: processMarkdownText(content),\n content: content,\n typingSpeed,\n disabled: !enableTypewriter,\n });\n\n const components: CustomComponents = {\n \"custom-button-after-content\": ({\n children,\n }: {\n children: React.ReactNode;\n }) => {\n return (\n <button\n className=\"content-render-custom-button-after-content\"\n onClick={onClickCustomButtonAfterContent}\n >\n {children}\n </button>\n );\n },\n \"custom-variable\": (props) => (\n <CustomButtonInputVariable\n {...props}\n readonly={readonly}\n defaultButtonText={defaultButtonText}\n defaultInputText={defaultInputText}\n defaultSelectedValues={defaultSelectedValues}\n onSend={onSend}\n beforeSend={beforeSend}\n confirmButtonText={confirmButtonText}\n // tooltipMinLength={tooltipMinLength}\n />\n ),\n code: (props) => {\n const { className, children, ...rest } = props as {\n className?: string;\n children?: React.ReactNode;\n };\n const match = /language-(\\w+)/.exec(className || \"\");\n const language = match?.[1];\n if (language === \"mermaid\") {\n const chartContent = children?.toString().replace(/\\n$/, \"\") || \"\";\n const frozen = mermaidBlockIsComplete(content, chartContent);\n return <MermaidChart chart={chartContent} frozen={frozen} />;\n }\n\n return (\n <code className={className} {...rest}>\n {children}\n </code>\n );\n },\n table: ({ ...props }) => (\n <div className=\"content-render-table-container\">\n <table className=\"content-render-table\" {...props} />\n </div>\n ),\n th: ({ ...props }) => <th className=\"content-render-th\" {...props} />,\n td: ({ ...props }) => <td className=\"content-render-td\" {...props} />,\n tr: ({ ...props }) => <tr className=\"content-render-tr\" {...props} />,\n li: ({ node, ...props }) => {\n const className = node?.properties?.className;\n const hasTaskListItem =\n (typeof className === \"string\" &&\n className.includes(\"task-list-item\")) ||\n (Array.isArray(className) && className.includes(\"task-list-item\"));\n if (hasTaskListItem) {\n return <li className=\"content-render-task-list-item\" {...props} />;\n }\n return <li {...props} />;\n },\n ol: ({ ...props }) => <ol className=\"content-render-ol\" {...props} />,\n ul: ({ ...props }) => <ul className=\"content-render-ul\" {...props} />,\n input: ({ ...props }) => {\n if (props.type === \"checkbox\") {\n return (\n <input\n type=\"checkbox\"\n className=\"content-render-checkbox\"\n disabled\n {...props}\n />\n );\n }\n return <input {...props} />;\n },\n a: ({ children, ...props }) => (\n <a target=\"_blank\" rel=\"noopener noreferrer\" {...props}>\n {children}\n </a>\n ),\n pre: (props) => (\n <CodeBlock\n {...props}\n copyButtonText={copyButtonText}\n copiedButtonText={copiedButtonText}\n />\n ),\n };\n\n const hasCompleted = useRef(false);\n\n useEffect(() => {\n if (isComplete && !hasCompleted.current) {\n hasCompleted.current = true; // Mark as completed\n onTypeFinished?.(); // Call the passed callback\n }\n }, [isComplete, onTypeFinished]);\n useEffect(() => {\n hasCompleted.current = false; // Reset completion status when content changes\n }, [content]);\n\n const segments = parseMarkdownSegments(displayContent);\n\n return (\n <div className={`content-render markdown-body`}>\n {segments.map((seg, index) => {\n if (seg.type === \"text\") {\n return (\n <ReactMarkdown\n key={index}\n remarkPlugins={[remarkGfm, remarkMath, remarkFlow, remarkBreaks]}\n rehypePlugins={[\n preserveCustomVariableProperties,\n rehypeRaw,\n restoreCustomVariableProperties,\n [\n rehypeHighlight,\n { languages: highlightLanguages, subset: subsetLanguages },\n ],\n rehypeKatex,\n ]}\n components={components}\n >\n {seg.value}\n </ReactMarkdown>\n );\n }\n\n if (seg.type === \"mermaid\") {\n return (\n <MermaidChart\n key={index}\n chart={seg.value}\n frozen={!seg.complete}\n />\n );\n }\n\n if (seg.type === \"svg\") {\n return <SvgBlockInShadow key={index} svg={seg.value} />;\n }\n })}\n\n {customRenderBar && (\n <div className=\"content-render-custom-bar\">\n {React.createElement(customRenderBar, {\n content,\n displayContent,\n onSend,\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport default ContentRender;\n"],"names":["SvgBlockInShadow","svg","hostRef","useRef","useEffect","host","shadowRoot","jsx","ContentRender","content","customRenderBar","onSend","typingSpeed","enableTypewriter","defaultButtonText","defaultInputText","defaultSelectedValues","readonly","onTypeFinished","confirmButtonText","copyButtonText","copiedButtonText","onClickCustomButtonAfterContent","beforeSend","displayContent","isComplete","useTypewriterStateMachine","components","children","props","CustomButtonInputVariable","className","rest","chartContent","frozen","mermaidBlockIsComplete","MermaidChart","node","CodeBlock","hasCompleted","segments","parseMarkdownSegments","jsxs","seg","index","ReactMarkdown","remarkGfm","remarkMath","remarkFlow","remarkBreaks","preserveCustomVariableProperties","rehypeRaw","restoreCustomVariableProperties","rehypeHighlight","highlightLanguages","subsetLanguages","rehypeKatex","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsEA,MAAMA,IAA8C,CAAC,EAAE,KAAAC,QAAU;AAC/D,QAAMC,IAAUC,EAAuB,IAAI;AAE3C,SAAAC,EAAU,MAAM;AACd,UAAMC,IAAOH,EAAQ;AACrB,QAAI,CAACG,EAAM;AACX,UAAMC,IAAaD,EAAK,cAAcA,EAAK,aAAa,EAAE,MAAM,QAAQ;AACxE,IAAAC,EAAW,YAAYL;AAAA,EACzB,GAAG,CAACA,CAAG,CAAC,GAEDM,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,sBAAqB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C,GAAoB,QAAQC,EAAA;AAAA,cAAgB;AAAA,cAE3DC;AAAA,YAAA;AAAA,YAEF,YAAA7B;AAAA,YAEC,UAAAgB,EAAI;AAAA,UAAA;AAAA,UAdAC;AAAA,QAAA;AAmBX,UAAID,EAAI,SAAS;AACf,eACEpC,gBAAAA,EAAAA;AAAAA,UAAC6B;AAAA,UAAA;AAAA,YAEC,OAAOO,EAAI;AAAA,YACX,QAAQ,CAACA,EAAI;AAAA,UAAA;AAAA,UAFRC;AAAA,QAAA;AAOX,UAAID,EAAI,SAAS;AACf,eAAOpC,gBAAAA,EAAAA,IAACP,GAAA,EAA6B,KAAK2C,EAAI,SAAhBC,CAAuB;AAAA,IAEzD,CAAC;AAAA,IAEAlC,KACCH,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,6BACZ,UAAAkD,EAAM,cAAc/C,GAAiB;AAAA,MACpC,SAAAD;AAAA,MACA,gBAAAe;AAAA,MACA,QAAAb;AAAA,IAAA,CACD,EAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -55,7 +55,13 @@ const l = {
|
|
|
55
55
|
] })
|
|
56
56
|
] });
|
|
57
57
|
}
|
|
58
|
-
return /* @__PURE__ */ e.jsx("div", { className: "my-4 text-center overflow-auto", children: m ? /* @__PURE__ */ e.jsx(
|
|
58
|
+
return /* @__PURE__ */ e.jsx("div", { className: "my-4 text-center overflow-auto content-render-mermaid", children: m ? /* @__PURE__ */ e.jsx(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: "content-render-mermaid-inner",
|
|
62
|
+
dangerouslySetInnerHTML: { __html: m }
|
|
63
|
+
}
|
|
64
|
+
) : /* @__PURE__ */ e.jsx("div", { className: "py-8 text-gray-500 italic", children: a?.loading ?? l.loading }) });
|
|
59
65
|
}, M = j.memo(S, (r, a) => r.chart === a.chart && r.frozen === a.frozen);
|
|
60
66
|
export {
|
|
61
67
|
M as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidChart.js","sources":["../../../../src/components/ContentRender/plugins/MermaidChart.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport mermaid from \"mermaid\";\n\nexport interface MermaidChartProps {\n chart: string;\n messages?: {\n emptyChart?: string;\n loading?: string;\n badge?: string;\n };\n frozen?: boolean;\n}\n\nconst DEFAULT_MESSAGES = {\n emptyChart: \"Empty chart content\",\n loading: \"Loading Mermaid chart...\",\n badge: \"mermaid\",\n} as const;\n\nconst MERMAID_FONT_STACK =\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, \"Open Sans\", \"Helvetica Neue\", sans-serif';\n\nconst preprocessChart = (raw: string) =>\n raw.trim().replace(/^_streaming\\s*/i, \"\");\n\nconst MermaidChart: React.FC<MermaidChartProps> = ({\n chart,\n messages,\n frozen,\n}) => {\n const [svg, setSvg] = useState(\"\");\n const [error, setError] = useState(\"\");\n const [hasRendered, setHasRendered] = useState(false);\n\n const renderChart = async () => {\n try {\n const cleaned = preprocessChart(chart);\n\n if (!cleaned) {\n setError(messages?.emptyChart ?? DEFAULT_MESSAGES.emptyChart);\n setSvg(\"\");\n return;\n }\n\n // Initialize mermaid with the same font stack used in markdown content.\n // Using a concrete stack avoids clipping caused by `inherit` resolving to\n // Storybook's default font during off-screen rendering.\n mermaid.initialize({\n startOnLoad: false,\n theme: \"default\",\n securityLevel: \"loose\",\n fontFamily: MERMAID_FONT_STACK,\n themeVariables: {\n fontFamily: MERMAID_FONT_STACK,\n },\n });\n\n // use mermaid.parse to check for errors\n try {\n await mermaid.parse(cleaned);\n } catch (parseErr) {\n const parseErrorMsg = String(parseErr).toLowerCase();\n setError(parseErrorMsg);\n setSvg(\"\");\n // once render success, setHasRendered flag\n setHasRendered(true);\n return;\n }\n\n const id = `mermaid-${Date.now()}`;\n\n // Render the chart\n const { svg: renderedSvg } = await mermaid.render(id, cleaned);\n setSvg(renderedSvg);\n setError(\"\");\n } catch (err) {\n const errorMsg = String(err).toLowerCase();\n setError(errorMsg);\n setSvg(\"\");\n }\n };\n\n useEffect(() => {\n if (frozen && hasRendered) return; // 核心:被冻结就不渲染\n renderChart();\n }, [chart, frozen]);\n\n if (error) {\n const displayChart = preprocessChart(chart) || chart.trim();\n return (\n <div className=\"my-4 border border-gray-200 rounded-lg bg-gray-50\">\n <div className=\"px-4 py-3 bg-gray-100 border-b border-gray-200 flex items-center gap-2\">\n <span className=\"text-yellow-600\">⚠️</span>\n <span className=\"text-sm text-yellow-700 font-medium whitespace-pre-wrap\">\n {error}\n </span>\n </div>\n <div className=\"relative\">\n <pre className=\"p-4 text-sm font-mono text-yellow-800\">\n <code>{displayChart}</code>\n </pre>\n <div className=\"absolute top-2 right-2 px-2 py-1 text-xs text-yellow-700 bg-white/90 rounded border border-gray-200\">\n {messages?.badge ?? DEFAULT_MESSAGES.badge}\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"my-4 text-center overflow-auto\">\n {svg ? (\n <div
|
|
1
|
+
{"version":3,"file":"MermaidChart.js","sources":["../../../../src/components/ContentRender/plugins/MermaidChart.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport mermaid from \"mermaid\";\n\nexport interface MermaidChartProps {\n chart: string;\n messages?: {\n emptyChart?: string;\n loading?: string;\n badge?: string;\n };\n frozen?: boolean;\n}\n\nconst DEFAULT_MESSAGES = {\n emptyChart: \"Empty chart content\",\n loading: \"Loading Mermaid chart...\",\n badge: \"mermaid\",\n} as const;\n\nconst MERMAID_FONT_STACK =\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, \"Open Sans\", \"Helvetica Neue\", sans-serif';\n\nconst preprocessChart = (raw: string) =>\n raw.trim().replace(/^_streaming\\s*/i, \"\");\n\nconst MermaidChart: React.FC<MermaidChartProps> = ({\n chart,\n messages,\n frozen,\n}) => {\n const [svg, setSvg] = useState(\"\");\n const [error, setError] = useState(\"\");\n const [hasRendered, setHasRendered] = useState(false);\n\n const renderChart = async () => {\n try {\n const cleaned = preprocessChart(chart);\n\n if (!cleaned) {\n setError(messages?.emptyChart ?? DEFAULT_MESSAGES.emptyChart);\n setSvg(\"\");\n return;\n }\n\n // Initialize mermaid with the same font stack used in markdown content.\n // Using a concrete stack avoids clipping caused by `inherit` resolving to\n // Storybook's default font during off-screen rendering.\n mermaid.initialize({\n startOnLoad: false,\n theme: \"default\",\n securityLevel: \"loose\",\n fontFamily: MERMAID_FONT_STACK,\n themeVariables: {\n fontFamily: MERMAID_FONT_STACK,\n },\n });\n\n // use mermaid.parse to check for errors\n try {\n await mermaid.parse(cleaned);\n } catch (parseErr) {\n const parseErrorMsg = String(parseErr).toLowerCase();\n setError(parseErrorMsg);\n setSvg(\"\");\n // once render success, setHasRendered flag\n setHasRendered(true);\n return;\n }\n\n const id = `mermaid-${Date.now()}`;\n\n // Render the chart\n const { svg: renderedSvg } = await mermaid.render(id, cleaned);\n setSvg(renderedSvg);\n setError(\"\");\n } catch (err) {\n const errorMsg = String(err).toLowerCase();\n setError(errorMsg);\n setSvg(\"\");\n }\n };\n\n useEffect(() => {\n if (frozen && hasRendered) return; // 核心:被冻结就不渲染\n renderChart();\n }, [chart, frozen]);\n\n if (error) {\n const displayChart = preprocessChart(chart) || chart.trim();\n return (\n <div className=\"my-4 border border-gray-200 rounded-lg bg-gray-50\">\n <div className=\"px-4 py-3 bg-gray-100 border-b border-gray-200 flex items-center gap-2\">\n <span className=\"text-yellow-600\">⚠️</span>\n <span className=\"text-sm text-yellow-700 font-medium whitespace-pre-wrap\">\n {error}\n </span>\n </div>\n <div className=\"relative\">\n <pre className=\"p-4 text-sm font-mono text-yellow-800\">\n <code>{displayChart}</code>\n </pre>\n <div className=\"absolute top-2 right-2 px-2 py-1 text-xs text-yellow-700 bg-white/90 rounded border border-gray-200\">\n {messages?.badge ?? DEFAULT_MESSAGES.badge}\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"my-4 text-center overflow-auto content-render-mermaid\">\n {svg ? (\n <div\n className=\"content-render-mermaid-inner\"\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n ) : (\n <div className=\"py-8 text-gray-500 italic\">\n {messages?.loading ?? DEFAULT_MESSAGES.loading}\n </div>\n )}\n </div>\n );\n};\n\nexport default React.memo(MermaidChart, (prev, next) => {\n return prev.chart === next.chart && prev.frozen === next.frozen;\n});\n"],"names":["DEFAULT_MESSAGES","MERMAID_FONT_STACK","preprocessChart","raw","MermaidChart","chart","messages","frozen","svg","setSvg","useState","error","setError","hasRendered","setHasRendered","renderChart","cleaned","mermaid","parseErr","parseErrorMsg","id","renderedSvg","err","errorMsg","useEffect","displayChart","jsxs","jsx","MermaidChart$1","React","prev","next"],"mappings":";;;AAaA,MAAMA,IAAmB;AAAA,EACvB,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AACT,GAEMC,IACJ,+HAEIC,IAAkB,CAACC,MACvBA,EAAI,OAAO,QAAQ,mBAAmB,EAAE,GAEpCC,IAA4C,CAAC;AAAA,EACjD,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAKC,CAAM,IAAIC,EAAS,EAAE,GAC3B,CAACC,GAAOC,CAAQ,IAAIF,EAAS,EAAE,GAC/B,CAACG,GAAaC,CAAc,IAAIJ,EAAS,EAAK,GAE9CK,IAAc,YAAY;AAC9B,QAAI;AACF,YAAMC,IAAUd,EAAgBG,CAAK;AAErC,UAAI,CAACW,GAAS;AACZ,QAAAJ,EAASN,GAAU,cAAcN,EAAiB,UAAU,GAC5DS,EAAO,EAAE;AACT;AAAA,MACF;AAKAQ,MAAAA,EAAQ,WAAW;AAAA,QACjB,aAAa;AAAA,QACb,OAAO;AAAA,QACP,eAAe;AAAA,QACf,YAAYhB;AAAA,QACZ,gBAAgB;AAAA,UACd,YAAYA;AAAA,QAAA;AAAA,MACd,CACD;AAGD,UAAI;AACF,cAAMgB,EAAQ,MAA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BAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,yDACZ,UAAAnB,IACCmB,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,yBAAyB,EAAE,QAAQnB,EAAA;AAAA,IAAI;AAAA,EAAA,0BAGxC,OAAA,EAAI,WAAU,6BACZ,UAAAF,GAAU,WAAWN,EAAiB,QAAA,CACzC,EAAA,CAEJ;AAEJ,GAEA4B,IAAeC,EAAM,KAAKzB,GAAc,CAAC0B,GAAMC,MACtCD,EAAK,UAAUC,EAAK,SAASD,EAAK,WAAWC,EAAK,MAC1D;"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import o from "../../../node_modules/highlight.js/es/languages/javascript.js";
|
|
2
|
-
import m from "../../../node_modules/highlight.js/es/languages/typescript.js";
|
|
3
|
-
import r from "../../../node_modules/highlight.js/es/languages/python.js";
|
|
4
|
-
import i from "../../../node_modules/highlight.js/es/languages/java.js";
|
|
5
|
-
import t from "../../../node_modules/highlight.js/es/languages/xml.js";
|
|
6
|
-
import a from "../../../node_modules/highlight.js/es/languages/css.js";
|
|
7
|
-
import f from "../../../node_modules/highlight.js/es/languages/json.js";
|
|
8
|
-
import p from "../../../node_modules/highlight.js/es/languages/bash.js";
|
|
9
|
-
import l from "../../../node_modules/highlight.js/es/languages/sql.js";
|
|
10
|
-
import s from "../../../node_modules/highlight.js/es/languages/markdown.js";
|
|
11
|
-
import h from "../../../node_modules/highlight.js/es/languages/c.js";
|
|
12
|
-
import c from "../../../node_modules/highlight.js/es/languages/cpp.js";
|
|
13
|
-
import e from "../../../node_modules/highlight.js/es/languages/go.js";
|
|
14
|
-
import n from "../../../node_modules/highlight.js/es/languages/plaintext.js";
|
|
15
|
-
import g from "../../../node_modules/highlight.js/es/languages/rust.js";
|
|
16
|
-
import j from "../../../node_modules/highlight.js/es/languages/shell.js";
|
|
17
|
-
import u from "../../../node_modules/highlight.js/es/languages/scss.js";
|
|
18
|
-
import x from "../../../node_modules/highlight.js/es/languages/yaml.js";
|
|
19
|
-
import y from "../../../node_modules/highlight.js/es/languages/vhdl.js";
|
|
20
|
-
import v from "../../../node_modules/highlight.js/es/languages/latex.js";
|
|
21
|
-
import d from "../../../node_modules/highlight.js/es/languages/lua.js";
|
|
22
|
-
import b from "../../../node_modules/highlight.js/es/languages/php.js";
|
|
1
|
+
import o from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/javascript.js";
|
|
2
|
+
import m from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/typescript.js";
|
|
3
|
+
import r from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/python.js";
|
|
4
|
+
import i from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/java.js";
|
|
5
|
+
import t from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/xml.js";
|
|
6
|
+
import a from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/css.js";
|
|
7
|
+
import f from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/json.js";
|
|
8
|
+
import p from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/bash.js";
|
|
9
|
+
import l from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/sql.js";
|
|
10
|
+
import s from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/markdown.js";
|
|
11
|
+
import h from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/c.js";
|
|
12
|
+
import c from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/cpp.js";
|
|
13
|
+
import e from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/go.js";
|
|
14
|
+
import n from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/plaintext.js";
|
|
15
|
+
import g from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/rust.js";
|
|
16
|
+
import j from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/shell.js";
|
|
17
|
+
import u from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/scss.js";
|
|
18
|
+
import x from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/yaml.js";
|
|
19
|
+
import y from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/vhdl.js";
|
|
20
|
+
import v from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/latex.js";
|
|
21
|
+
import d from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/lua.js";
|
|
22
|
+
import b from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/php.js";
|
|
23
23
|
const S = {
|
|
24
24
|
javascript: o,
|
|
25
25
|
js: o,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ViewPlugin as j, Decoration as q } from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@codemirror_view@6.38.6/node_modules/@codemirror/view/dist/index.js";
|
|
2
|
-
import { RangeSetBuilder as z } from "../../../
|
|
2
|
+
import { RangeSetBuilder as z } from "../../../node_modules/@codemirror/state/dist/index.js";
|
|
3
3
|
import { createVariableExpressionRegexp as G } from "../utils.js";
|
|
4
4
|
const S = /\{\{.*?\}\}/g, C = /<!--[\s\S]*?-->/g, E = /===.*?===/g, F = /\?\[(.*?)\]/g;
|
|
5
5
|
function W(c) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as i } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import * as d from "react";
|
|
3
3
|
import n from "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.js";
|
|
4
|
-
import "../../../_virtual/
|
|
4
|
+
import "../../../_virtual/index3.js";
|
|
5
5
|
import "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.js";
|
|
6
6
|
import "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.js";
|
|
7
7
|
import "../../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/raf.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../../../node_modules/.pnpm/remark-flow@0.1.3-beta.0/node_modules/remark-flow/dist/index.js"],"sourcesContent":["\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.remarkInteraction = exports.remarkFlow = exports.remarkCustomVariable = exports.InteractionType = exports.InteractionParser = exports.createInteractionParser = void 0;\nconst remark_custom_variable_1 = __importDefault(require(\"./remark-custom-variable\"));\nexports.remarkCustomVariable = remark_custom_variable_1.default;\nconst remark_flow_1 = __importDefault(require(\"./remark-flow\"));\nexports.remarkFlow = remark_flow_1.default;\nconst remark_interaction_1 = __importDefault(require(\"./remark-interaction\"));\nexports.remarkInteraction = remark_interaction_1.default;\nvar interaction_parser_1 = require(\"./interaction-parser\");\nObject.defineProperty(exports, \"createInteractionParser\", { enumerable: true, get: function () { return interaction_parser_1.createInteractionParser; } });\nObject.defineProperty(exports, \"InteractionParser\", { enumerable: true, get: function () { return interaction_parser_1.InteractionParser; } });\nObject.defineProperty(exports, \"InteractionType\", { enumerable: true, get: function () { return interaction_parser_1.InteractionType; } });\nexports.default = remark_interaction_1.default;\n//# sourceMappingURL=index.js.map"],"names":["__importDefault","this","mod","exports","remark_custom_variable_1","require$$0","remark_flow_1","require$$1","remark_interaction_1","require$$2","interaction_parser_1","require$$3"],"mappings":";;;;;;;;AACA,QAAIA,IAAmBC,KAAQA,EAAK,mBAAoB,SAAUC,GAAK;AACnE,aAAQA,KAAOA,EAAI,aAAcA,IAAM,EAAE,SAAWA,EAAG;AAAA,IAC3D;AACA,WAAO,eAAcC,GAAU,cAAc,EAAE,OAAO,IAAM,GAC5DA,EAAA,oBAA4BA,eAAqBA,EAAA,uBAA+BA,EAAA,kBAA0BA,EAAA,oBAA4BA,EAAA,0BAAkC;AACxK,UAAMC,IAA2BJ,EAAgBK,GAAmC;AACpF,IAAAF,EAAA,uBAA+BC,EAAyB;AACxD,UAAME,IAAgBN,EAAgBO,GAAwB;AAC9D,IAAAJ,EAAA,aAAqBG,EAAc;AACnC,UAAME,IAAuBR,EAAgBS,GAA+B;AAC5E,IAAAN,EAAA,oBAA4BK,EAAqB;AACjD,QAAIE,IAAuBC,EAAA;AAC3B,WAAO,eAAeR,GAAS,2BAA2B,EAAE,YAAY,IAAM,KAAK,WAAY;AAAE,aAAOO,EAAqB;AAAA,IAAwB,EAAE,CAAE,GACzJ,OAAO,eAAeP,GAAS,qBAAqB,EAAE,YAAY,IAAM,KAAK,WAAY;AAAE,aAAOO,EAAqB;AAAA,IAAkB,EAAE,CAAE,GAC7I,OAAO,eAAeP,GAAS,mBAAmB,EAAE,YAAY,IAAM,KAAK,WAAY;AAAE,aAAOO,EAAqB;AAAA,IAAgB,EAAE,CAAE,GACzIP,EAAA,UAAkBK,EAAqB;AAAA;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interaction-parser.js","sources":["../../../../../../../../../../node_modules/.pnpm/remark-flow@0.1.3-beta.0/node_modules/remark-flow/dist/interaction-parser.js"],"sourcesContent":["\"use strict\";\n/**\n * MarkdownFlow Interactive Block Layered Parser - TypeScript Version\n *\n * Uses a three-layer analysis architecture:\n * Layer 1: ?[] format validation\n * Layer 2: Variable detection and pattern classification\n * Layer 3: Specific content parsing\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InteractionParser = exports.COMPILED_REGEXES = exports.InteractionType = void 0;\nexports.parseInteractionFormat = parseInteractionFormat;\nexports.createInteractionParser = createInteractionParser;\n// Interaction input type enumeration\nvar InteractionType;\n(function (InteractionType) {\n InteractionType[\"TEXT_ONLY\"] = \"text_only\";\n InteractionType[\"BUTTONS_ONLY\"] = \"buttons_only\";\n InteractionType[\"BUTTONS_WITH_TEXT\"] = \"buttons_with_text\";\n InteractionType[\"BUTTONS_MULTI_SELECT\"] = \"buttons_multi_select\";\n InteractionType[\"BUTTONS_MULTI_WITH_TEXT\"] = \"buttons_multi_with_text\";\n InteractionType[\"NON_ASSIGNMENT_BUTTON\"] = \"non_assignment_button\";\n})(InteractionType || (exports.InteractionType = InteractionType = {}));\n// Pre-compiled regex constants\nexports.COMPILED_REGEXES = {\n // Layer 1: Basic format validation - matches ?[content] but excludes ?[text](url) format\n LAYER1_INTERACTION: /\\?\\[([^\\]]*)\\](?!\\()/,\n // Layer 2: Variable detection - matches %{{variable}}content format (supports letters, numbers, underscores, Chinese characters, with optional spaces)\n LAYER2_VARIABLE: /^%\\{\\{\\s*([a-zA-Z_\\u4e00-\\u9fa5][a-zA-Z0-9_\\u4e00-\\u9fa5]*)\\s*\\}\\}(.*)$/,\n // Layer 3: Split content before and after ...\n LAYER3_ELLIPSIS: /^(.*?)\\.\\.\\.(.*)/,\n // Layer 3: Split Button//value format\n LAYER3_BUTTON_VALUE: /^(.+?)\\/\\/(.+)$/,\n // Layer 3: Split on single | but not || (compat-safe, avoid lookbehind)\n LAYER3_SINGLE_PIPE_SPLIT: /\\|(?!\\|)/,\n};\n/**\n * Layered interaction parser class\n */\nclass InteractionParser {\n constructor() {\n // Constructor is intentionally empty - no initialization needed\n }\n /**\n * Main parsing method\n *\n * @param content - Raw content of interaction block\n * @returns Standardized parse result\n */\n parse(content) {\n try {\n // Layer 1: Validate basic format\n const innerContent = this._layer1ValidateFormat(content);\n if (innerContent === null) {\n return this._createErrorResult(`Invalid interaction format: ${content}`);\n }\n // Layer 2: Variable detection and pattern classification\n const [hasVariable, variableName, remainingContent] = this._layer2DetectVariable(innerContent);\n // Layer 3: Specific content parsing\n if (hasVariable && variableName) {\n return this._layer3ParseVariableInteraction(variableName, remainingContent);\n }\n else {\n return this._layer3ParseDisplayButtons(innerContent);\n }\n }\n catch (error) {\n return this._createErrorResult(`Parsing error: ${error instanceof Error ? error.message : 'Unknown error'}`);\n }\n }\n /**\n * Parse and convert to remark-compatible format\n *\n * @param content - Raw content of interaction block\n * @returns remark-compatible result object\n */\n parseToRemarkFormat(content) {\n const result = this.parse(content);\n if (result.error) {\n // Compatibility handling when parsing fails\n return { placeholder: content.trim() };\n }\n // Convert to remark-compatible format\n const remarkResult = {};\n if (result.type === InteractionType.NON_ASSIGNMENT_BUTTON) {\n // Non-assignment button\n const nonAssignmentResult = result;\n remarkResult.buttonTexts = nonAssignmentResult.buttons.map(b => b.display);\n remarkResult.buttonValues = nonAssignmentResult.buttons.map(b => b.value);\n }\n else if (result.type !== null) {\n // Variable interaction\n const variableResult = result;\n remarkResult.variableName = variableResult.variable;\n if (variableResult.buttons) {\n remarkResult.buttonTexts = variableResult.buttons.map(b => b.display);\n remarkResult.buttonValues = variableResult.buttons.map(b => b.value);\n }\n if (variableResult.question !== undefined) {\n remarkResult.placeholder = variableResult.question;\n }\n if (variableResult.isMultiSelect !== undefined) {\n remarkResult.isMultiSelect = variableResult.isMultiSelect;\n }\n }\n return remarkResult;\n }\n /**\n * Layer 1: Validate ?[] format and extract content\n *\n * @param content - Raw content\n * @returns Extracted bracket content, returns null if validation fails\n */\n _layer1ValidateFormat(content) {\n content = content.trim();\n const match = exports.COMPILED_REGEXES.LAYER1_INTERACTION.exec(content);\n if (!match) {\n return null;\n }\n // Ensure the match is the complete content (no other text)\n const matchedText = match[0];\n if (matchedText.trim() !== content) {\n return null;\n }\n return match[1];\n }\n /**\n * Layer 2: Detect variables and perform pattern classification\n *\n * @param innerContent - Content extracted from layer 1\n * @returns [hasVariable, variableName, remainingContent]\n */\n _layer2DetectVariable(innerContent) {\n const match = exports.COMPILED_REGEXES.LAYER2_VARIABLE.exec(innerContent);\n if (!match) {\n // No variable, entire content used for display button parsing\n return [false, null, innerContent];\n }\n const variableName = match[1].trim();\n const remainingContent = match[2].trim();\n return [true, variableName, remainingContent];\n }\n /**\n * Layer 3: Parse variable interaction (variable assignment type)\n *\n * @param variableName - Variable name\n * @param content - Content after variable\n * @returns Parse result\n */\n _layer3ParseVariableInteraction(variableName, content) {\n // Detect if there's ... separator\n const ellipsisMatch = exports.COMPILED_REGEXES.LAYER3_ELLIPSIS.exec(content);\n if (ellipsisMatch) {\n // Has ... separator\n const beforeEllipsis = ellipsisMatch[1].trim();\n const question = ellipsisMatch[2].trim();\n if (beforeEllipsis) {\n // Button group + text input: ?[%{{var}} Button1 | Button2 | ...question]\n const [buttons, isMultiSelect] = this._parseButtons(beforeEllipsis);\n const interactionType = isMultiSelect\n ? InteractionType.BUTTONS_MULTI_WITH_TEXT\n : InteractionType.BUTTONS_WITH_TEXT;\n return {\n type: interactionType,\n variable: variableName,\n buttons: buttons,\n question: question,\n isMultiSelect: isMultiSelect,\n };\n }\n else {\n // Pure text input\n return {\n type: InteractionType.TEXT_ONLY,\n variable: variableName,\n question: question,\n isMultiSelect: false,\n };\n }\n }\n else {\n // No ... separator\n if ((/\\|/.test(content) || /\\|\\|/.test(content)) && content) {\n // Pure button group: ?[%{{var}} Button1 | Button2] or ?[%{{var}} Button1 || Button2]\n const [buttons, isMultiSelect] = this._parseButtons(content);\n const interactionType = isMultiSelect\n ? InteractionType.BUTTONS_MULTI_SELECT\n : InteractionType.BUTTONS_ONLY;\n return {\n type: interactionType,\n variable: variableName,\n buttons: buttons,\n isMultiSelect: isMultiSelect,\n };\n }\n else if (content) {\n // Single button: ?[%{{var}} Button1] or ?[%{{var}} Button1//id1]\n const button = this._parseSingleButton(content);\n return {\n type: InteractionType.BUTTONS_ONLY,\n variable: variableName,\n buttons: [button],\n isMultiSelect: false,\n };\n }\n else {\n // Pure text input (no prompt): ?[%{{var}}]\n return {\n type: InteractionType.TEXT_ONLY,\n variable: variableName,\n question: '',\n isMultiSelect: false,\n };\n }\n }\n }\n /**\n * Layer 3: Parse display buttons (non-variable assignment type)\n *\n * @param content - Content\n * @returns Parse result\n */\n _layer3ParseDisplayButtons(content) {\n if (!content) {\n // Empty content: ?[]\n return {\n type: InteractionType.NON_ASSIGNMENT_BUTTON,\n buttons: [{ display: '', value: '' }],\n };\n }\n if (/\\|/.test(content)) {\n // Multiple buttons: ?[Continue | Cancel]\n const [buttons] = this._parseButtons(content); // Only use buttons, ignore isMultiSelect for display buttons\n return {\n type: InteractionType.NON_ASSIGNMENT_BUTTON,\n buttons: buttons,\n };\n }\n else {\n // Single button: ?[Continue]\n const button = this._parseSingleButton(content);\n return {\n type: InteractionType.NON_ASSIGNMENT_BUTTON,\n buttons: [button],\n };\n }\n }\n /**\n * Parse button group with fault tolerance\n *\n * @param content - Button content, separated by | or ||\n * @returns [button list, isMultiSelect]\n */\n _parseButtons(content) {\n if (!content || typeof content !== 'string') {\n return [[], false];\n }\n const [_separator, isMultiSelect] = this._detectSeparatorType(content);\n const buttons = [];\n try {\n // Use different splitting logic based on separator type\n let buttonTexts;\n if (isMultiSelect) {\n // Multi-select mode: split on ||, preserve single |\n buttonTexts = content.split('||');\n }\n else {\n // Single-select mode: split on single |, but preserve ||\n buttonTexts = this._splitSinglePipes(content);\n }\n for (const buttonText of buttonTexts) {\n const trimmed = buttonText.trim();\n if (trimmed) {\n const button = this._parseSingleButton(trimmed);\n buttons.push(button);\n }\n }\n }\n catch {\n // Fallback to treating entire content as single button\n return [[{ display: content.trim(), value: content.trim() }], false];\n }\n // For empty content (like just separators), return empty list\n if (!buttons.length &&\n (content.trim() === '||' || content.trim() === '|')) {\n return [[], isMultiSelect];\n }\n // Ensure at least one button exists (but only if there's actual content)\n if (!buttons.length && content.trim()) {\n buttons.push({ display: content.trim(), value: content.trim() });\n }\n return [buttons, isMultiSelect];\n }\n /**\n * Parse single button, supports Button//value format\n *\n * @param buttonText - Button text\n * @returns {display: display text, value: actual value}\n */\n _parseSingleButton(buttonText) {\n buttonText = buttonText.trim();\n // Detect Button//value format\n const match = exports.COMPILED_REGEXES.LAYER3_BUTTON_VALUE.exec(buttonText);\n if (match) {\n const display = match[1].trim();\n const value = match[2].trim();\n return { display: display, value: value };\n }\n else {\n return { display: buttonText, value: buttonText };\n }\n }\n /**\n * Detect separator type and whether it's multi-select\n *\n * Logic: The first separator type encountered determines the parsing mode:\n * - If first separator is |, then || is treated as part of the value\n * - If first separator is ||, then single | is treated as part of the value\n *\n * @param content - Button content to analyze\n * @returns [separator, isMultiSelect] where separator is '|' or '||'\n */\n _detectSeparatorType(content) {\n if (!content || typeof content !== 'string') {\n return ['|', false];\n }\n // Find the position of first single pipe and first double pipe\n const singlePipePos = content.indexOf('|');\n const doublePipePos = content.indexOf('||');\n // If no pipes found\n if (singlePipePos === -1) {\n return ['|', false];\n }\n // If no double pipe found, definitely single-select\n if (doublePipePos === -1) {\n return ['|', false];\n }\n // Both found - check which comes first\n // If double pipe comes first or at the same position (which means\n // the single pipe is part of the double pipe), it's multi-select mode\n if (doublePipePos <= singlePipePos) {\n return ['||', true];\n }\n // If single pipe comes first, it's single-select mode\n return ['|', false];\n }\n /**\n * Split content by single pipes while preserving double pipes.\n *\n * Replaces lookbehind-based regex for Safari 15 compatibility.\n */\n _splitSinglePipes(content) {\n const segments = [];\n let current = '';\n for (let i = 0; i < content.length; i++) {\n const char = content[i];\n if (char === '|') {\n const prevIsPipe = i > 0 && content[i - 1] === '|';\n const nextIsPipe = i + 1 < content.length && content[i + 1] === '|';\n if (!prevIsPipe && !nextIsPipe) {\n segments.push(current);\n current = '';\n continue;\n }\n }\n current += char;\n }\n segments.push(current);\n return segments;\n }\n /**\n * Create error result\n *\n * @param errorMessage - Error message\n * @returns Error result\n */\n _createErrorResult(errorMessage) {\n return {\n type: null,\n error: errorMessage,\n };\n }\n}\nexports.InteractionParser = InteractionParser;\n/**\n * Convenience function for parsing interaction format\n *\n * Supported formats:\n * 1. ?[%{{var}}...question] - Pure text input\n * 2. ?[%{{var}} option1|option2] - Pure button group (supports display//value format)\n * 3. ?[%{{var}} option1|option2|...question] - Button group + text input\n * 4. ?[%{{var}} option1||option2] - Multi-select button group\n * 5. ?[%{{var}} option1||option2||...question] - Multi-select button group + text input\n * 6. ?[%{{var}} single option] - Single button selection\n * 7. ?[Continue] or ?[Continue|Cancel] - Non-assignment button\n *\n * @param content - Raw content of interaction block\n * @returns [interaction type, parsed data]\n */\nfunction parseInteractionFormat(content) {\n // Use new layered parser\n const parser = new InteractionParser();\n const result = parser.parse(content);\n // Handle parse errors\n if (result.error) {\n // Compatibility handling when parsing fails\n return [InteractionType.TEXT_ONLY, { question: content.trim() }];\n }\n // Extract parse result and convert to original return format\n const interactionType = result.type;\n // Build return data dictionary for backward compatibility\n const returnData = {};\n if (result.type !== InteractionType.NON_ASSIGNMENT_BUTTON) {\n const variableResult = result;\n if (variableResult.variable !== undefined) {\n returnData.variable = variableResult.variable;\n }\n if (variableResult.buttons !== undefined) {\n returnData.buttons = variableResult.buttons;\n }\n if (variableResult.question !== undefined) {\n returnData.question = variableResult.question;\n }\n if (variableResult.isMultiSelect !== undefined) {\n returnData.isMultiSelect = variableResult.isMultiSelect;\n }\n }\n else {\n const buttonResult = result;\n if (buttonResult.buttons !== undefined) {\n returnData.buttons = buttonResult.buttons;\n }\n }\n // Ensure we have a valid interaction type, fallback to TEXT_ONLY if null\n const finalType = interactionType || InteractionType.TEXT_ONLY;\n return [finalType, returnData];\n}\n/**\n * Factory function to create parser instance\n */\nfunction createInteractionParser() {\n return new InteractionParser();\n}\n//# sourceMappingURL=interaction-parser.js.map"],"names":["exports","parseInteractionFormat","createInteractionParser","InteractionType","InteractionParser","content","innerContent","hasVariable","variableName","remainingContent","error","result","remarkResult","nonAssignmentResult","b","variableResult","match","ellipsisMatch","beforeEllipsis","question","buttons","isMultiSelect","button","_separator","buttonTexts","buttonText","trimmed","display","value","singlePipePos","doublePipePos","segments","current","i","char","prevIsPipe","nextIsPipe","errorMessage","interactionType","returnData","buttonResult"],"mappings":";;;;AASA,WAAO,eAAcA,GAAU,cAAc,EAAE,OAAO,IAAM,GAC5DA,EAAA,oBAA4BA,EAAA,mBAA2BA,EAAA,kBAA0B,QACjFA,EAAA,yBAAiCC,GACjCD,EAAA,0BAAkCE;AAElC,QAAIC;AACJ,KAAC,SAAUA,GAAiB;AACxB,MAAAA,EAAgB,YAAe,aAC/BA,EAAgB,eAAkB,gBAClCA,EAAgB,oBAAuB,qBACvCA,EAAgB,uBAA0B,wBAC1CA,EAAgB,0BAA6B,2BAC7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,IADS,IAAIP,EAAiB,EACd,MAAMC,CAAO;AAEnC,UAAIM,EAAO;AAEP,eAAO,CAACR,EAAgB,WAAW,EAAE,UAAUE,EAAQ,KAAI,GAAI;AAGnE,YAAMiC,IAAkB3B,EAAO,MAEzB4B,IAAa,CAAA;AACnB,UAAI5B,EAAO,SAASR,EAAgB,uBAAuB;AACvD,cAAMY,IAAiBJ;AACvB,QAAII,EAAe,aAAa,WAC5BwB,EAAW,WAAWxB,EAAe,WAErCA,EAAe,YAAY,WAC3BwB,EAAW,UAAUxB,EAAe,UAEpCA,EAAe,aAAa,WAC5BwB,EAAW,WAAWxB,EAAe,WAErCA,EAAe,kBAAkB,WACjCwB,EAAW,gBAAgBxB,EAAe;AAAA,MAEtD,OACS;AACD,cAAMyB,IAAe7B;AACrB,QAAI6B,EAAa,YAAY,WACzBD,EAAW,UAAUC,EAAa;AAAA,MAE9C;AAGI,aAAO,CADWF,KAAmBnC,EAAgB,WAClCoC,CAAU;AAAA,IACjC;AAIA,aAASrC,IAA0B;AAC/B,aAAO,IAAIE,EAAiB;AAAA,IAChC;AAAA;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remark-custom-variable.js","sources":["../../../../../../../../../../node_modules/.pnpm/remark-flow@0.1.3-beta.0/node_modules/remark-flow/dist/remark-custom-variable.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkCustomVariable;\nconst unist_util_visit_1 = require(\"unist-util-visit\");\nconst interaction_parser_1 = require(\"./interaction-parser\");\n/**\n * Create AST node segments\n */\nfunction createSegments(value, startIndex, endIndex, parsedResult, hName) {\n return [\n {\n type: 'text',\n value: value.substring(0, startIndex),\n },\n {\n type: 'element',\n data: {\n hName,\n hProperties: parsedResult,\n },\n },\n {\n type: 'text',\n value: value.substring(endIndex),\n },\n ];\n}\nfunction remarkCustomVariable() {\n return (tree) => {\n // Create parser instance\n const parser = new interaction_parser_1.InteractionParser();\n (0, unist_util_visit_1.visit)(tree, 'text', (node, index, parent) => {\n // Input validation\n if (index === null || parent === null)\n return;\n const value = node.value;\n // Check if contains interaction syntax\n const interactionRegex = /\\?\\[([^\\]]*)\\](?!\\()/;\n const match = interactionRegex.exec(value);\n if (match) {\n const fullMatch = match[0];\n const startIndex = match.index;\n const endIndex = startIndex + fullMatch.length;\n try {\n // Check for invalid variable syntax\n const innerContent = match[1];\n if (innerContent.includes('%{')) {\n if (!innerContent.includes('%{{')) {\n // Contains invalid variable syntax %{variable} instead of %{{variable}}\n return;\n }\n // Check for empty variable name %{{}}\n if (innerContent.includes('%{{}}')) {\n return;\n }\n }\n // Convert to remark compatible format (handle all types for backward compatibility)\n const parsedResult = parser.parseToRemarkFormat(fullMatch);\n // Create AST segments\n const segments = createSegments(value, startIndex, endIndex, parsedResult, 'custom-variable');\n parent.children.splice(index, 1, ...segments);\n }\n catch (error) {\n console.warn('Failed to parse variable interaction syntax:', error);\n // Keep original if parsing fails\n }\n }\n });\n };\n}\n//# sourceMappingURL=remark-custom-variable.js.map"],"names":["remarkCustomVariable_1","remarkCustomVariable","unist_util_visit_1","require$$0","interaction_parser_1","require$$1","createSegments","value","startIndex","endIndex","parsedResult","hName","tree","parser","node","index","parent","match","fullMatch","innerContent","segments","error"],"mappings":";;;;;;SACA,OAAO,eAAeA,GAAS,cAAc,EAAE,OAAO,IAAM,GAC5DA,EAAA,UAAkBC;AAClB,QAAMC,IAAqBC,GACrBC,IAAuBC,EAAA;AAI7B,WAASC,EAAeC,GAAOC,GAAYC,GAAUC,GAAcC,GAAO;AACtE,WAAO;AAAA,MACH;AAAA,QACI,MAAM;AAAA,QACN,OAAOJ,EAAM,UAAU,GAAGC,CAAU;AAAA;MAExC;AAAA,QACI,MAAM;AAAA,QACN,MAAM;AAAA,UACF,OAAAG;AAAA,UACA,aAAaD;AAAA;;MAGrB;AAAA,QACI,MAAM;AAAA,QACN,OAAOH,EAAM,UAAUE,CAAQ;AAAA;;EAG3C;AACA,WAASR,IAAuB;AAC5B,WAAO,CAACW,MAAS;AAEb,YAAMC,IAAS,IAAIT,EAAqB,kBAAiB;AACzD,UAAIF,EAAmB,OAAOU,GAAM,QAAQ,CAACE,GAAMC,GAAOC,MAAW;AAEjE,YAAID,MAAU,QAAQC,MAAW;AAC7B;AACJ,cAAMT,IAAQO,EAAK,OAGbG,IADmB,uBACM,KAAKV,CAAK;AACzC,YAAIU,GAAO;AACP,gBAAMC,IAAYD,EAAM,CAAC,GACnBT,IAAaS,EAAM,OACnBR,IAAWD,IAAaU,EAAU;AACxC,cAAI;AAEA,kBAAMC,IAAeF,EAAM,CAAC;AAC5B,gBAAIE,EAAa,SAAS,IAAI,MACtB,CAACA,EAAa,SAAS,KAAK,KAK5BA,EAAa,SAAS,OAAO;AAC7B;AAIR,kBAAMT,IAAeG,EAAO,oBAAoBK,CAAS,GAEnDE,IAAWd,EAAeC,GAAOC,GAAYC,GAAUC,GAAc,iBAAiB;AAC5F,YAAAM,EAAO,SAAS,OAAOD,GAAO,GAAG,GAAGK,CAAQ;AAAA,UAChE,SACuBC,GAAO;AACV,oBAAQ,KAAK,gDAAgDA,CAAK;AAAA,UAEtF;AAAA,QACA;AAAA,MACA,CAAS;AAAA,IACT;AAAA,EACA;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remark-flow.js","sources":["../../../../../../../../../../node_modules/.pnpm/remark-flow@0.1.3-beta.0/node_modules/remark-flow/dist/remark-flow.js"],"sourcesContent":["\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkFlow;\nconst remark_interaction_1 = __importDefault(require(\"./remark-interaction\"));\n/**\n * remarkFlow plugin - uses unified interaction parser\n */\nfunction remarkFlow() {\n return (tree) => {\n // Use unified interaction plugin\n const interactionPlugin = (0, remark_interaction_1.default)();\n interactionPlugin(tree);\n };\n}\n//# sourceMappingURL=remark-flow.js.map"],"names":["__importDefault","this","mod","remarkFlow_1","remarkFlow","remark_interaction_1","require$$0","tree"],"mappings":";;;;;;AACA,MAAIA,IAAmBC,KAAQA,EAAK,mBAAoB,SAAUC,GAAK;AACnE,WAAQA,KAAOA,EAAI,aAAcA,IAAM,EAAE,SAAWA,EAAG;AAAA,EAC3D;AACA,SAAO,eAAeC,GAAS,cAAc,EAAE,OAAO,IAAM,GAC5DA,EAAA,UAAkBC;AAClB,QAAMC,IAAuBL,EAAgBM,GAA+B;AAI5E,WAASF,IAAa;AAClB,WAAO,CAACG,MAAS;AAGb,UAD8BF,EAAqB,SAAO,EACxCE,CAAI;AAAA,IAC9B;AAAA,EACA;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remark-interaction.js","sources":["../../../../../../../../../../node_modules/.pnpm/remark-flow@0.1.3-beta.0/node_modules/remark-flow/dist/remark-interaction.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = remarkInteraction;\nconst unist_util_visit_1 = require(\"unist-util-visit\");\nconst interaction_parser_1 = require(\"./interaction-parser\");\n/**\n * Create AST node segments\n */\nfunction createSegments(value, startIndex, endIndex, parsedResult, hName) {\n return [\n {\n type: 'text',\n value: value.substring(0, startIndex),\n },\n {\n type: 'element',\n data: {\n hName,\n hProperties: parsedResult,\n },\n },\n {\n type: 'text',\n value: value.substring(endIndex),\n },\n ];\n}\nfunction remarkInteraction() {\n return (tree) => {\n // Create parser instance\n const parser = new interaction_parser_1.InteractionParser();\n (0, unist_util_visit_1.visit)(tree, 'text', (node, index, parent) => {\n // Input validation\n if (index === null || parent === null)\n return;\n const value = node.value;\n // Check if contains interaction syntax\n const interactionRegex = /\\?\\[([^\\]]*)\\](?!\\()/;\n const match = interactionRegex.exec(value);\n if (match) {\n const fullMatch = match[0];\n const startIndex = match.index;\n const endIndex = startIndex + fullMatch.length;\n try {\n const parsedResult = parser.parseToRemarkFormat(fullMatch);\n // Create AST segments\n const segments = createSegments(value, startIndex, endIndex, parsedResult, 'custom-variable');\n parent.children.splice(index, 1, ...segments);\n }\n catch (error) {\n console.warn('Failed to parse interaction syntax:', error);\n // Keep original if parsing fails\n }\n }\n });\n };\n}\n//# sourceMappingURL=remark-interaction.js.map"],"names":["remarkInteraction_1","remarkInteraction","unist_util_visit_1","require$$0","interaction_parser_1","require$$1","createSegments","value","startIndex","endIndex","parsedResult","hName","tree","parser","node","index","parent","match","fullMatch","segments","error"],"mappings":";;;;;;SACA,OAAO,eAAeA,GAAS,cAAc,EAAE,OAAO,IAAM,GAC5DA,EAAA,UAAkBC;AAClB,QAAMC,IAAqBC,GACrBC,IAAuBC,EAAA;AAI7B,WAASC,EAAeC,GAAOC,GAAYC,GAAUC,GAAcC,GAAO;AACtE,WAAO;AAAA,MACH;AAAA,QACI,MAAM;AAAA,QACN,OAAOJ,EAAM,UAAU,GAAGC,CAAU;AAAA;MAExC;AAAA,QACI,MAAM;AAAA,QACN,MAAM;AAAA,UACF,OAAAG;AAAA,UACA,aAAaD;AAAA;;MAGrB;AAAA,QACI,MAAM;AAAA,QACN,OAAOH,EAAM,UAAUE,CAAQ;AAAA;;EAG3C;AACA,WAASR,IAAoB;AACzB,WAAO,CAACW,MAAS;AAEb,YAAMC,IAAS,IAAIT,EAAqB,kBAAiB;AACzD,UAAIF,EAAmB,OAAOU,GAAM,QAAQ,CAACE,GAAMC,GAAOC,MAAW;AAEjE,YAAID,MAAU,QAAQC,MAAW;AAC7B;AACJ,cAAMT,IAAQO,EAAK,OAGbG,IADmB,uBACM,KAAKV,CAAK;AACzC,YAAIU,GAAO;AACP,gBAAMC,IAAYD,EAAM,CAAC,GACnBT,IAAaS,EAAM,OACnBR,IAAWD,IAAaU,EAAU;AACxC,cAAI;AACA,kBAAMR,IAAeG,EAAO,oBAAoBK,CAAS,GAEnDC,IAAWb,EAAeC,GAAOC,GAAYC,GAAUC,GAAc,iBAAiB;AAC5F,YAAAM,EAAO,SAAS,OAAOD,GAAO,GAAG,GAAGI,CAAQ;AAAA,UAChE,SACuBC,GAAO;AACV,oBAAQ,KAAK,uCAAuCA,CAAK;AAAA,UAE7E;AAAA,QACA;AAAA,MACA,CAAS;AAAA,IACT;AAAA,EACA;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/ccount/index.js"],"sourcesContent":["/**\n * Count how often a character (or substring) is used in a string.\n *\n * @param {string} value\n * Value to search in.\n * @param {string} character\n * Character (or substring) to look for.\n * @return {number}\n * Number of times `character` occurred in `value`.\n */\nexport function ccount(value, character) {\n const source = String(value)\n\n if (typeof character !== 'string') {\n throw new TypeError('Expected character')\n }\n\n let count = 0\n let index = source.indexOf(character)\n\n while (index !== -1) {\n count++\n index = source.indexOf(character, index + character.length)\n }\n\n return count\n}\n"],"names":["ccount","value","character","source","count","index"],"mappings":"AAUO,SAASA,EAAOC,GAAOC,GAAW;AACvC,QAAMC,IAAS,OAAOF,CAAK;AAE3B,MAAI,OAAOC,KAAc;AACvB,UAAM,IAAI,UAAU,oBAAoB;AAG1C,MAAIE,IAAQ,GACRC,IAAQF,EAAO,QAAQD,CAAS;AAEpC,SAAOG,MAAU;AACf,IAAAD,KACAC,IAAQF,EAAO,QAAQD,GAAWG,IAAQH,EAAU,MAAM;AAG5D,SAAOE;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default.js","sources":["../../../../../../../node_modules/devlop/lib/default.js"],"sourcesContent":["export function deprecate(fn) {\n return fn\n}\n\nexport function equal() {}\n\nexport function ok() {}\n\nexport function unreachable() {}\n"],"names":["ok"],"mappings":"AAMO,SAASA,IAAK;AAAC;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../node_modules/escape-string-regexp/index.js"],"sourcesContent":["export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n"],"names":["escapeStringRegexp","string"],"mappings":"AAAe,SAASA,EAAmBC,GAAQ;AAClD,MAAI,OAAOA,KAAW;AACrB,UAAM,IAAI,UAAU,mBAAmB;AAKxC,SAAOA,EACL,QAAQ,uBAAuB,MAAM,EACrC,QAAQ,MAAM,OAAO;AACxB;","x_google_ignoreList":[0]}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
const f = (
|
|
2
|
-
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
3
|
-
/**
|
|
4
|
-
* @type {(
|
|
5
|
-
* (<Condition extends TestFunction>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &
|
|
6
|
-
* (<Condition extends string>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &
|
|
7
|
-
* ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &
|
|
8
|
-
* ((test?: Test) => Check)
|
|
9
|
-
* )}
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* @param {Test | null | undefined} [test]
|
|
13
|
-
* @returns {Check}
|
|
14
|
-
*/
|
|
15
|
-
(function(n) {
|
|
16
|
-
if (n == null)
|
|
17
|
-
return y;
|
|
18
|
-
if (typeof n == "string")
|
|
19
|
-
return a(n);
|
|
20
|
-
if (typeof n == "object")
|
|
21
|
-
return u(n);
|
|
22
|
-
if (typeof n == "function")
|
|
23
|
-
return i(n);
|
|
24
|
-
throw new Error("Expected function, string, or array as `test`");
|
|
25
|
-
})
|
|
26
|
-
);
|
|
27
|
-
function u(n) {
|
|
28
|
-
const r = [];
|
|
29
|
-
let t = -1;
|
|
30
|
-
for (; ++t < n.length; )
|
|
31
|
-
r[t] = f(n[t]);
|
|
32
|
-
return i(e);
|
|
33
|
-
function e(...o) {
|
|
34
|
-
let c = -1;
|
|
35
|
-
for (; ++c < r.length; )
|
|
36
|
-
if (r[c].apply(this, o)) return !0;
|
|
37
|
-
return !1;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function a(n) {
|
|
41
|
-
return i(r);
|
|
42
|
-
function r(t) {
|
|
43
|
-
return t.tagName === n;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function i(n) {
|
|
47
|
-
return r;
|
|
48
|
-
function r(t, e, o) {
|
|
49
|
-
return !!(p(t) && n.call(
|
|
50
|
-
this,
|
|
51
|
-
t,
|
|
52
|
-
typeof e == "number" ? e : void 0,
|
|
53
|
-
o || void 0
|
|
54
|
-
));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function y(n) {
|
|
58
|
-
return !!(n && typeof n == "object" && "type" in n && n.type === "element" && "tagName" in n && typeof n.tagName == "string");
|
|
59
|
-
}
|
|
60
|
-
function p(n) {
|
|
61
|
-
return n !== null && typeof n == "object" && "type" in n && "tagName" in n;
|
|
62
|
-
}
|
|
63
|
-
export {
|
|
64
|
-
f as convertElement
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/hast-util-is-element/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} Element\n * @typedef {import('hast').Parents} Parents\n */\n\n/**\n * @template Fn\n * @template Fallback\n * @typedef {Fn extends (value: any) => value is infer Thing ? Thing : Fallback} Predicate\n */\n\n/**\n * @callback Check\n * Check that an arbitrary value is an element.\n * @param {unknown} this\n * Context object (`this`) to call `test` with\n * @param {unknown} [element]\n * Anything (typically a node).\n * @param {number | null | undefined} [index]\n * Position of `element` in its parent.\n * @param {Parents | null | undefined} [parent]\n * Parent of `element`.\n * @returns {boolean}\n * Whether this is an element and passes a test.\n *\n * @typedef {Array<TestFunction | string> | TestFunction | string | null | undefined} Test\n * Check for an arbitrary element.\n *\n * * when `string`, checks that the element has that tag name\n * * when `function`, see `TestFunction`\n * * when `Array`, checks if one of the subtests pass\n *\n * @callback TestFunction\n * Check if an element passes a test.\n * @param {unknown} this\n * The given context.\n * @param {Element} element\n * An element.\n * @param {number | undefined} [index]\n * Position of `element` in its parent.\n * @param {Parents | undefined} [parent]\n * Parent of `element`.\n * @returns {boolean | undefined | void}\n * Whether this element passes the test.\n *\n * Note: `void` is included until TS sees no return as `undefined`.\n */\n\n/**\n * Check if `element` is an `Element` and whether it passes the given test.\n *\n * @param element\n * Thing to check, typically `element`.\n * @param test\n * Check for a specific element.\n * @param index\n * Position of `element` in its parent.\n * @param parent\n * Parent of `element`.\n * @param context\n * Context object (`this`) to call `test` with.\n * @returns\n * Whether `element` is an `Element` and passes a test.\n * @throws\n * When an incorrect `test`, `index`, or `parent` is given; there is no error\n * thrown when `element` is not a node or not an element.\n */\nexport const isElement =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (<Condition extends TestFunction>(element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &\n * (<Condition extends string>(element: unknown, test: Condition, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &\n * ((element?: null | undefined) => false) &\n * ((element: unknown, test?: null | undefined, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &\n * ((element: unknown, test?: Test, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => boolean)\n * )}\n */\n (\n /**\n * @param {unknown} [element]\n * @param {Test | undefined} [test]\n * @param {number | null | undefined} [index]\n * @param {Parents | null | undefined} [parent]\n * @param {unknown} [context]\n * @returns {boolean}\n */\n // eslint-disable-next-line max-params\n function (element, test, index, parent, context) {\n const check = convertElement(test)\n\n if (\n index !== null &&\n index !== undefined &&\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 !== null &&\n parent !== undefined &&\n (!parent.type || !parent.children)\n ) {\n throw new Error('Expected valid `parent`')\n }\n\n if (\n (index === null || index === undefined) !==\n (parent === null || parent === undefined)\n ) {\n throw new Error('Expected both `index` and `parent`')\n }\n\n return looksLikeAnElement(element)\n ? check.call(context, element, index, parent)\n : false\n }\n )\n\n/**\n * Generate a check 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 * an `element`, `index`, and `parent`.\n *\n * @param test\n * A test for a specific element.\n * @returns\n * A check.\n */\nexport const convertElement =\n // Note: overloads in JSDoc can’t yet use different `@template`s.\n /**\n * @type {(\n * (<Condition extends TestFunction>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & Predicate<Condition, Element>) &\n * (<Condition extends string>(test: Condition) => (element: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element & {tagName: Condition}) &\n * ((test?: null | undefined) => (element?: unknown, index?: number | null | undefined, parent?: Parents | null | undefined, context?: unknown) => element is Element) &\n * ((test?: Test) => Check)\n * )}\n */\n (\n /**\n * @param {Test | null | undefined} [test]\n * @returns {Check}\n */\n function (test) {\n if (test === null || test === undefined) {\n return element\n }\n\n if (typeof test === 'string') {\n return tagNameFactory(test)\n }\n\n // Assume array.\n if (typeof test === 'object') {\n return anyFactory(test)\n }\n\n if (typeof test === 'function') {\n return castFactory(test)\n }\n\n throw new Error('Expected function, string, or array as `test`')\n }\n )\n\n/**\n * Handle multiple tests.\n *\n * @param {Array<TestFunction | string>} tests\n * @returns {Check}\n */\nfunction anyFactory(tests) {\n /** @type {Array<Check>} */\n const checks = []\n let index = -1\n\n while (++index < tests.length) {\n checks[index] = convertElement(tests[index])\n }\n\n return castFactory(any)\n\n /**\n * @this {unknown}\n * @type {TestFunction}\n */\n function any(...parameters) {\n let index = -1\n\n while (++index < checks.length) {\n if (checks[index].apply(this, parameters)) return true\n }\n\n return false\n }\n}\n\n/**\n * Turn a string into a test for an element with a certain type.\n *\n * @param {string} check\n * @returns {Check}\n */\nfunction tagNameFactory(check) {\n return castFactory(tagName)\n\n /**\n * @param {Element} element\n * @returns {boolean}\n */\n function tagName(element) {\n return element.tagName === check\n }\n}\n\n/**\n * Turn a custom test into a test for an element that passes that test.\n *\n * @param {TestFunction} testFunction\n * @returns {Check}\n */\nfunction castFactory(testFunction) {\n return check\n\n /**\n * @this {unknown}\n * @type {Check}\n */\n function check(value, index, parent) {\n return Boolean(\n looksLikeAnElement(value) &&\n testFunction.call(\n this,\n value,\n typeof index === 'number' ? index : undefined,\n parent || undefined\n )\n )\n }\n}\n\n/**\n * Make sure something is an element.\n *\n * @param {unknown} element\n * @returns {element is Element}\n */\nfunction element(element) {\n return Boolean(\n element &&\n typeof element === 'object' &&\n 'type' in element &&\n element.type === 'element' &&\n 'tagName' in element &&\n typeof element.tagName === 'string'\n )\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Element}\n */\nfunction looksLikeAnElement(value) {\n return (\n value !== null &&\n typeof value === 'object' &&\n 'type' in value &&\n 'tagName' in value\n )\n}\n"],"names":["convertElement","test","element","tagNameFactory","anyFactory","castFactory","tests","checks","index","any","parameters","check","tagName","testFunction","value","parent","looksLikeAnElement"],"mappings":"AAwIY,MAACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeT,SAAUC,GAAM;AACd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