@touchvue/chat 1.0.0-beta.13 → 1.0.0-beta.15
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/es/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.mjs +469 -0
- package/es/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.mjs.map +1 -0
- package/es/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.mjs +63 -0
- package/es/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.mjs.map +1 -0
- package/es/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.mjs +9 -0
- package/es/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.mjs.map +1 -0
- package/es/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.mjs +9 -0
- package/es/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.mjs.map +1 -0
- package/es/node_modules/.pnpm/{linkify-it@3.0.3 → linkify-it@5.0.0}/node_modules/linkify-it/index.mjs +162 -157
- package/es/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs.map +1 -0
- package/es/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs +195 -0
- package/es/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/common/html_blocks.mjs +6 -3
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.mjs +26 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.mjs +291 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.mjs +6 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +81 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +18 -10
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +70 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/index.mjs +81 -107
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.mjs +135 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.mjs +63 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.mjs +197 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/presets/commonmark.mjs +24 -11
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/presets/default.mjs +21 -10
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/presets/zero.mjs +25 -11
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/renderer.mjs +72 -95
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/ruler.mjs +37 -50
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/blockquote.mjs +48 -121
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/code.mjs +13 -12
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/fence.mjs +30 -29
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.mjs +55 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.mjs +44 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.mjs +73 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/lheading.mjs +33 -29
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/list.mjs +92 -123
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.mjs +49 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.mjs +211 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/state_block.mjs +49 -61
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.mjs +232 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/block.mjs +5 -5
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/inline.mjs +6 -6
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.mjs +138 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/normalize.mjs +8 -7
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/replacements.mjs +32 -25
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +50 -55
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/state_core.mjs +5 -7
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.mjs +46 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.mjs +75 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/backticks.mjs +20 -18
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +33 -34
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +48 -52
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.mjs +55 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.mjs +73 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.mjs → markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs} +17 -9
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +54 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/image.mjs +31 -43
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/link.mjs +34 -41
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.mjs +59 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/newline.mjs +11 -13
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +31 -62
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +42 -42
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs.map +1 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.mjs +89 -0
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.mjs.map +1 -0
- package/es/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/token.mjs +22 -29
- package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.mjs.map +1 -0
- package/es/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.mjs +5 -0
- package/es/{_virtual → node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl}/index.mjs.map +1 -1
- package/es/node_modules/.pnpm/{mdurl@1.0.1/node_modules/mdurl → mdurl@2.0.0/node_modules/mdurl/lib}/decode.mjs +32 -40
- package/es/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs.map +1 -0
- package/es/node_modules/.pnpm/{mdurl@1.0.1/node_modules/mdurl → mdurl@2.0.0/node_modules/mdurl/lib}/encode.mjs +22 -29
- package/es/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs.map +1 -0
- package/es/node_modules/.pnpm/{mdurl@1.0.1/node_modules/mdurl → mdurl@2.0.0/node_modules/mdurl/lib}/format.mjs +5 -5
- package/es/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs.map +1 -0
- package/es/node_modules/.pnpm/{mdurl@1.0.1/node_modules/mdurl → mdurl@2.0.0/node_modules/mdurl/lib}/parse.mjs +101 -84
- package/es/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs.map +1 -0
- package/es/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.mjs +443 -0
- package/es/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.mjs.map +1 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs +4 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs.map +1 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs +4 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs.map +1 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs +4 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs.map +1 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs +4 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs.map +1 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs +4 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs.map +1 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.mjs +7 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.mjs.map +1 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs +4 -0
- package/es/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs.map +1 -0
- package/es/package.json.mjs +1 -1
- package/es/packages/components/touchchat/component/ImageFile.vue2.mjs +19 -4
- package/es/packages/components/touchchat/component/ImageFile.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/ChatInput.vue2.mjs +5 -2
- package/es/packages/components/touchchat/src/AiChat/ChatInput.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/TouchChat.vue2.mjs +44 -7
- package/es/packages/components/touchchat/src/AiChat/TouchChat.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/src/AiChat/UserMessage.vue2.mjs.map +1 -1
- package/es/packages/components/touchchat/utils/markdown.mjs +2 -2
- package/es/packages/components/touchchat/utils/markdown.mjs.map +1 -1
- package/lib/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js +477 -0
- package/lib/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js.map +1 -0
- package/lib/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js +66 -0
- package/lib/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
- package/lib/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js +13 -0
- package/lib/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
- package/lib/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js +13 -0
- package/lib/node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
- package/lib/node_modules/.pnpm/{linkify-it@3.0.3 → linkify-it@5.0.0}/node_modules/linkify-it/index.js +163 -156
- package/lib/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.js.map +1 -0
- package/lib/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.js +199 -0
- package/lib/node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/common/html_blocks.js +8 -3
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.js +29 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.js +308 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.js +12 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.js +85 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/helpers/parse_link_label.js +20 -10
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.js +74 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/index.js +81 -106
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/parser_block.js +42 -43
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/parser_core.js +21 -25
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/parser_inline.js +69 -67
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/presets/commonmark.js +26 -11
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/presets/default.js +23 -10
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/presets/zero.js +27 -11
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/renderer.js +79 -100
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/ruler.js +39 -50
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/blockquote.js +50 -121
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/code.js +15 -12
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/fence.js +32 -29
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.js +59 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.js +48 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.js +77 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/lheading.js +35 -29
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/list.js +96 -125
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.js +53 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.js +215 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_block/state_block.js +56 -66
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.js +236 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/block.js +7 -5
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.js +18 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.js +142 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/normalize.js +10 -7
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/replacements.js +34 -25
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/smartquotes.js +52 -55
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_core/state_core.js +7 -7
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.js +50 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.js +79 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/backticks.js +22 -18
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +35 -34
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/emphasis.js +48 -52
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.js +59 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.js +77 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.js +45 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.js +58 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/image.js +34 -44
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/link.js +37 -42
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.js +63 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/newline.js +14 -14
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.js +129 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/rules_inline/strikethrough.js +42 -42
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.js.map +1 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.js +93 -0
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.js.map +1 -0
- package/lib/node_modules/.pnpm/{markdown-it@12.3.2 → markdown-it@14.1.0}/node_modules/markdown-it/lib/token.js +24 -29
- package/lib/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.js.map +1 -0
- package/lib/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.js +14 -0
- package/lib/{_virtual → node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl}/index.js.map +1 -1
- package/lib/node_modules/.pnpm/{mdurl@1.0.1/node_modules/mdurl → mdurl@2.0.0/node_modules/mdurl/lib}/decode.js +34 -40
- package/lib/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.js.map +1 -0
- package/lib/node_modules/.pnpm/{mdurl@1.0.1/node_modules/mdurl → mdurl@2.0.0/node_modules/mdurl/lib}/encode.js +23 -28
- package/lib/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.js.map +1 -0
- package/lib/node_modules/.pnpm/{mdurl@1.0.1/node_modules/mdurl → mdurl@2.0.0/node_modules/mdurl/lib}/format.js +7 -5
- package/lib/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.js.map +1 -0
- package/lib/node_modules/.pnpm/{mdurl@1.0.1/node_modules/mdurl → mdurl@2.0.0/node_modules/mdurl/lib}/parse.js +103 -84
- package/lib/node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.js.map +1 -0
- package/lib/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js +453 -0
- package/lib/node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js.map +1 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.js +8 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.js.map +1 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.js +8 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.js.map +1 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.js +8 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.js.map +1 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.js +8 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.js.map +1 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.js +8 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.js.map +1 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.js +18 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.js.map +1 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.js +8 -0
- package/lib/node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.js.map +1 -0
- package/lib/package.json.js +1 -1
- package/lib/packages/components/touchchat/component/ImageFile.vue2.js +18 -3
- package/lib/packages/components/touchchat/component/ImageFile.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue2.js +5 -2
- package/lib/packages/components/touchchat/src/AiChat/ChatInput.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue2.js +44 -7
- package/lib/packages/components/touchchat/src/AiChat/TouchChat.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/src/AiChat/UserMessage.vue2.js.map +1 -1
- package/lib/packages/components/touchchat/utils/markdown.js +1 -1
- package/package.json +1 -1
- package/theme/components/index.css +20 -0
- package/theme/index.css +20 -0
- package/theme/skin/default.css +20 -0
- package/es/_virtual/emphasis.mjs +0 -4
- package/es/_virtual/emphasis.mjs.map +0 -1
- package/es/_virtual/html_re.mjs +0 -4
- package/es/_virtual/html_re.mjs.map +0 -1
- package/es/_virtual/index.mjs +0 -4
- package/es/_virtual/index2.mjs +0 -4
- package/es/_virtual/index2.mjs.map +0 -1
- package/es/_virtual/index3.mjs +0 -4
- package/es/_virtual/index3.mjs.map +0 -1
- package/es/_virtual/strikethrough.mjs +0 -4
- package/es/_virtual/strikethrough.mjs.map +0 -1
- package/es/_virtual/utils.mjs +0 -4
- package/es/_virtual/utils.mjs.map +0 -1
- package/es/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.mjs +0 -4253
- package/es/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.mjs.map +0 -1
- package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.mjs +0 -196
- package/es/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.mjs +0 -9
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.mjs +0 -7
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_blocks.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.mjs +0 -29
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.mjs +0 -324
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.mjs +0 -11
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +0 -83
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_label.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +0 -56
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.mjs +0 -138
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.mjs +0 -69
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.mjs +0 -197
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/commonmark.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/default.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/zero.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/renderer.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/ruler.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/blockquote.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/code.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/fence.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.mjs +0 -57
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.mjs +0 -47
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.mjs +0 -76
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/lheading.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/list.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.mjs +0 -50
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.mjs +0 -197
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/state_block.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.mjs +0 -223
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/block.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.mjs +0 -132
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/normalize.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/replacements.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/smartquotes.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/state_core.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.mjs +0 -74
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/backticks.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/emphasis.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.mjs +0 -51
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.mjs +0 -54
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +0 -48
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/image.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/link.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/newline.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.mjs +0 -56
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.mjs.map +0 -1
- package/es/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/token.mjs.map +0 -1
- package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.mjs.map +0 -1
- package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.mjs.map +0 -1
- package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.mjs.map +0 -1
- package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.mjs +0 -13
- package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.mjs.map +0 -1
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.mjs +0 -12
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.mjs.map +0 -1
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.mjs +0 -12
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.mjs.map +0 -1
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.mjs +0 -4
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.mjs.map +0 -1
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.mjs +0 -12
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.mjs.map +0 -1
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.mjs +0 -23
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.mjs.map +0 -1
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.mjs +0 -12
- package/es/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.mjs.map +0 -1
- package/lib/_virtual/emphasis.js +0 -6
- package/lib/_virtual/emphasis.js.map +0 -1
- package/lib/_virtual/html_re.js +0 -6
- package/lib/_virtual/html_re.js.map +0 -1
- package/lib/_virtual/index.js +0 -6
- package/lib/_virtual/index2.js +0 -6
- package/lib/_virtual/index2.js.map +0 -1
- package/lib/_virtual/index3.js +0 -6
- package/lib/_virtual/index3.js.map +0 -1
- package/lib/_virtual/strikethrough.js +0 -6
- package/lib/_virtual/strikethrough.js.map +0 -1
- package/lib/_virtual/utils.js +0 -6
- package/lib/_virtual/utils.js.map +0 -1
- package/lib/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.js +0 -6380
- package/lib/node_modules/.pnpm/entities@2.1.0/node_modules/entities/lib/maps/entities.json.js.map +0 -1
- package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/index.js.map +0 -1
- package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.js +0 -198
- package/lib/node_modules/.pnpm/linkify-it@3.0.3/node_modules/linkify-it/lib/re.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.js +0 -13
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/index.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.js +0 -9
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/entities.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_blocks.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.js +0 -33
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/html_re.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.js +0 -326
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/common/utils.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.js +0 -15
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/index.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.js +0 -85
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_destination.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_label.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.js +0 -58
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/helpers/parse_link_title.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/index.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_block.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_core.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/parser_inline.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/commonmark.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/default.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/presets/zero.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/renderer.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/ruler.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/blockquote.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/code.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/fence.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.js +0 -59
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/heading.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.js +0 -49
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/hr.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.js +0 -78
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/html_block.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/lheading.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/list.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.js +0 -52
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/paragraph.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.js +0 -199
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/reference.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/state_block.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.js +0 -225
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_block/table.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/block.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.js +0 -16
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/inline.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.js +0 -134
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/linkify.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/normalize.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/replacements.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/smartquotes.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_core/state_core.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.js +0 -76
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/autolink.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/backticks.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/balance_pairs.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/emphasis.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.js +0 -53
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/entity.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.js +0 -56
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/escape.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.js +0 -50
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/html_inline.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/image.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/link.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/newline.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.js +0 -158
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/state_inline.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/strikethrough.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.js +0 -58
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.js +0 -35
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/rules_inline/text_collapse.js.map +0 -1
- package/lib/node_modules/.pnpm/markdown-it@12.3.2/node_modules/markdown-it/lib/token.js.map +0 -1
- package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/decode.js.map +0 -1
- package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/encode.js.map +0 -1
- package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/format.js.map +0 -1
- package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.js +0 -17
- package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/index.js.map +0 -1
- package/lib/node_modules/.pnpm/mdurl@1.0.1/node_modules/mdurl/parse.js.map +0 -1
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.js +0 -14
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cc/regex.js.map +0 -1
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.js +0 -14
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Cf/regex.js.map +0 -1
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.js +0 -6
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/P/regex.js.map +0 -1
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.js +0 -14
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/categories/Z/regex.js.map +0 -1
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.js +0 -25
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/index.js.map +0 -1
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.js +0 -14
- package/lib/node_modules/.pnpm/uc.micro@1.0.6/node_modules/uc.micro/properties/Any/regex.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './common/utils.mjs';
|
|
1
|
+
import { escapeHtml, unescapeAll, assign } from './common/utils.mjs';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* class Renderer
|
|
@@ -10,47 +9,37 @@ import './common/utils.mjs';
|
|
|
10
9
|
**/
|
|
11
10
|
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
var unescapeAll = utils.unescapeAll;
|
|
15
|
-
var escapeHtml = utils.escapeHtml;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
19
|
-
|
|
20
|
-
var default_rules = {};
|
|
21
|
-
|
|
12
|
+
const default_rules = {};
|
|
22
13
|
|
|
23
14
|
default_rules.code_inline = function (tokens, idx, options, env, slf) {
|
|
24
|
-
|
|
15
|
+
const token = tokens[idx];
|
|
25
16
|
|
|
26
17
|
return '<code' + slf.renderAttrs(token) + '>' +
|
|
27
|
-
escapeHtml(
|
|
28
|
-
'</code>'
|
|
18
|
+
escapeHtml(token.content) +
|
|
19
|
+
'</code>'
|
|
29
20
|
};
|
|
30
21
|
|
|
31
|
-
|
|
32
22
|
default_rules.code_block = function (tokens, idx, options, env, slf) {
|
|
33
|
-
|
|
23
|
+
const token = tokens[idx];
|
|
34
24
|
|
|
35
25
|
return '<pre' + slf.renderAttrs(token) + '><code>' +
|
|
36
26
|
escapeHtml(tokens[idx].content) +
|
|
37
|
-
'</code></pre>\n'
|
|
27
|
+
'</code></pre>\n'
|
|
38
28
|
};
|
|
39
29
|
|
|
40
|
-
|
|
41
30
|
default_rules.fence = function (tokens, idx, options, env, slf) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
highlighted, i, arr, tmpAttrs, tmpToken;
|
|
31
|
+
const token = tokens[idx];
|
|
32
|
+
const info = token.info ? unescapeAll(token.info).trim() : '';
|
|
33
|
+
let langName = '';
|
|
34
|
+
let langAttrs = '';
|
|
47
35
|
|
|
48
36
|
if (info) {
|
|
49
|
-
arr = info.split(/(\s+)/g);
|
|
37
|
+
const arr = info.split(/(\s+)/g);
|
|
50
38
|
langName = arr[0];
|
|
51
39
|
langAttrs = arr.slice(2).join('');
|
|
52
40
|
}
|
|
53
41
|
|
|
42
|
+
let highlighted;
|
|
54
43
|
if (options.highlight) {
|
|
55
44
|
highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content);
|
|
56
45
|
} else {
|
|
@@ -58,42 +47,36 @@ default_rules.fence = function (tokens, idx, options, env, slf) {
|
|
|
58
47
|
}
|
|
59
48
|
|
|
60
49
|
if (highlighted.indexOf('<pre') === 0) {
|
|
61
|
-
return highlighted + '\n'
|
|
50
|
+
return highlighted + '\n'
|
|
62
51
|
}
|
|
63
52
|
|
|
64
53
|
// If language exists, inject class gently, without modifying original token.
|
|
65
54
|
// May be, one day we will add .deepClone() for token and simplify this part, but
|
|
66
55
|
// now we prefer to keep things local.
|
|
67
56
|
if (info) {
|
|
68
|
-
i
|
|
69
|
-
tmpAttrs = token.attrs ? token.attrs.slice() : [];
|
|
57
|
+
const i = token.attrIndex('class');
|
|
58
|
+
const tmpAttrs = token.attrs ? token.attrs.slice() : [];
|
|
70
59
|
|
|
71
60
|
if (i < 0) {
|
|
72
|
-
tmpAttrs.push([
|
|
61
|
+
tmpAttrs.push(['class', options.langPrefix + langName]);
|
|
73
62
|
} else {
|
|
74
63
|
tmpAttrs[i] = tmpAttrs[i].slice();
|
|
75
64
|
tmpAttrs[i][1] += ' ' + options.langPrefix + langName;
|
|
76
65
|
}
|
|
77
66
|
|
|
78
67
|
// Fake token just to render attributes
|
|
79
|
-
tmpToken = {
|
|
68
|
+
const tmpToken = {
|
|
80
69
|
attrs: tmpAttrs
|
|
81
70
|
};
|
|
82
71
|
|
|
83
|
-
return
|
|
84
|
-
+ highlighted
|
|
85
|
-
+ '</code></pre>\n';
|
|
72
|
+
return `<pre><code${slf.renderAttrs(tmpToken)}>${highlighted}</code></pre>\n`
|
|
86
73
|
}
|
|
87
74
|
|
|
88
|
-
|
|
89
|
-
return '<pre><code' + slf.renderAttrs(token) + '>'
|
|
90
|
-
+ highlighted
|
|
91
|
-
+ '</code></pre>\n';
|
|
75
|
+
return `<pre><code${slf.renderAttrs(token)}>${highlighted}</code></pre>\n`
|
|
92
76
|
};
|
|
93
77
|
|
|
94
|
-
|
|
95
78
|
default_rules.image = function (tokens, idx, options, env, slf) {
|
|
96
|
-
|
|
79
|
+
const token = tokens[idx];
|
|
97
80
|
|
|
98
81
|
// "alt" attr MUST be set, even if empty. Because it's mandatory and
|
|
99
82
|
// should be placed on proper position for tests.
|
|
@@ -103,38 +86,33 @@ default_rules.image = function (tokens, idx, options, env, slf) {
|
|
|
103
86
|
token.attrs[token.attrIndex('alt')][1] =
|
|
104
87
|
slf.renderInlineAsText(token.children, options, env);
|
|
105
88
|
|
|
106
|
-
return slf.renderToken(tokens, idx, options)
|
|
89
|
+
return slf.renderToken(tokens, idx, options)
|
|
107
90
|
};
|
|
108
91
|
|
|
109
|
-
|
|
110
92
|
default_rules.hardbreak = function (tokens, idx, options /*, env */) {
|
|
111
|
-
return options.xhtmlOut ? '<br />\n' : '<br>\n'
|
|
93
|
+
return options.xhtmlOut ? '<br />\n' : '<br>\n'
|
|
112
94
|
};
|
|
113
95
|
default_rules.softbreak = function (tokens, idx, options /*, env */) {
|
|
114
|
-
return options.breaks ? (options.xhtmlOut ? '<br />\n' : '<br>\n') : '\n'
|
|
96
|
+
return options.breaks ? (options.xhtmlOut ? '<br />\n' : '<br>\n') : '\n'
|
|
115
97
|
};
|
|
116
98
|
|
|
117
|
-
|
|
118
99
|
default_rules.text = function (tokens, idx /*, options, env */) {
|
|
119
|
-
return escapeHtml(tokens[idx].content)
|
|
100
|
+
return escapeHtml(tokens[idx].content)
|
|
120
101
|
};
|
|
121
102
|
|
|
122
|
-
|
|
123
103
|
default_rules.html_block = function (tokens, idx /*, options, env */) {
|
|
124
|
-
return tokens[idx].content
|
|
104
|
+
return tokens[idx].content
|
|
125
105
|
};
|
|
126
106
|
default_rules.html_inline = function (tokens, idx /*, options, env */) {
|
|
127
|
-
return tokens[idx].content
|
|
107
|
+
return tokens[idx].content
|
|
128
108
|
};
|
|
129
109
|
|
|
130
|
-
|
|
131
110
|
/**
|
|
132
111
|
* new Renderer()
|
|
133
112
|
*
|
|
134
113
|
* Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.
|
|
135
114
|
**/
|
|
136
|
-
function Renderer() {
|
|
137
|
-
|
|
115
|
+
function Renderer () {
|
|
138
116
|
/**
|
|
139
117
|
* Renderer#rules -> Object
|
|
140
118
|
*
|
|
@@ -160,22 +138,21 @@ function Renderer() {
|
|
|
160
138
|
* }
|
|
161
139
|
* ```
|
|
162
140
|
*
|
|
163
|
-
* See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.
|
|
141
|
+
* See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs)
|
|
164
142
|
* for more details and examples.
|
|
165
143
|
**/
|
|
166
144
|
this.rules = assign({}, default_rules);
|
|
167
145
|
}
|
|
168
146
|
|
|
169
|
-
|
|
170
147
|
/**
|
|
171
148
|
* Renderer.renderAttrs(token) -> String
|
|
172
149
|
*
|
|
173
150
|
* Render token attributes to string.
|
|
174
151
|
**/
|
|
175
|
-
Renderer.prototype.renderAttrs = function renderAttrs(token) {
|
|
176
|
-
|
|
152
|
+
Renderer.prototype.renderAttrs = function renderAttrs (token) {
|
|
153
|
+
let i, l, result;
|
|
177
154
|
|
|
178
|
-
if (!token.attrs) { return ''
|
|
155
|
+
if (!token.attrs) { return '' }
|
|
179
156
|
|
|
180
157
|
result = '';
|
|
181
158
|
|
|
@@ -183,10 +160,9 @@ Renderer.prototype.renderAttrs = function renderAttrs(token) {
|
|
|
183
160
|
result += ' ' + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"';
|
|
184
161
|
}
|
|
185
162
|
|
|
186
|
-
return result
|
|
163
|
+
return result
|
|
187
164
|
};
|
|
188
165
|
|
|
189
|
-
|
|
190
166
|
/**
|
|
191
167
|
* Renderer.renderToken(tokens, idx, options) -> String
|
|
192
168
|
* - tokens (Array): list of tokens
|
|
@@ -196,15 +172,13 @@ Renderer.prototype.renderAttrs = function renderAttrs(token) {
|
|
|
196
172
|
* Default token renderer. Can be overriden by custom function
|
|
197
173
|
* in [[Renderer#rules]].
|
|
198
174
|
**/
|
|
199
|
-
Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
needLf = false,
|
|
203
|
-
token = tokens[idx];
|
|
175
|
+
Renderer.prototype.renderToken = function renderToken (tokens, idx, options) {
|
|
176
|
+
const token = tokens[idx];
|
|
177
|
+
let result = '';
|
|
204
178
|
|
|
205
179
|
// Tight list paragraphs
|
|
206
180
|
if (token.hidden) {
|
|
207
|
-
return ''
|
|
181
|
+
return ''
|
|
208
182
|
}
|
|
209
183
|
|
|
210
184
|
// Insert a newline between hidden paragraph and subsequent opening
|
|
@@ -230,18 +204,18 @@ Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
|
|
|
230
204
|
}
|
|
231
205
|
|
|
232
206
|
// Check if we need to add a newline after this tag
|
|
207
|
+
let needLf = false;
|
|
233
208
|
if (token.block) {
|
|
234
209
|
needLf = true;
|
|
235
210
|
|
|
236
211
|
if (token.nesting === 1) {
|
|
237
212
|
if (idx + 1 < tokens.length) {
|
|
238
|
-
nextToken = tokens[idx + 1];
|
|
213
|
+
const nextToken = tokens[idx + 1];
|
|
239
214
|
|
|
240
215
|
if (nextToken.type === 'inline' || nextToken.hidden) {
|
|
241
216
|
// Block-level tag containing an inline tag.
|
|
242
217
|
//
|
|
243
218
|
needLf = false;
|
|
244
|
-
|
|
245
219
|
} else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {
|
|
246
220
|
// Opening tag + closing tag of the same type. E.g. `<li></li>`.
|
|
247
221
|
//
|
|
@@ -253,10 +227,9 @@ Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
|
|
|
253
227
|
|
|
254
228
|
result += needLf ? '>\n' : '>';
|
|
255
229
|
|
|
256
|
-
return result
|
|
230
|
+
return result
|
|
257
231
|
};
|
|
258
232
|
|
|
259
|
-
|
|
260
233
|
/**
|
|
261
234
|
* Renderer.renderInline(tokens, options, env) -> String
|
|
262
235
|
* - tokens (Array): list on block tokens to render
|
|
@@ -266,12 +239,11 @@ Renderer.prototype.renderToken = function renderToken(tokens, idx, options) {
|
|
|
266
239
|
* The same as [[Renderer.render]], but for single token of `inline` type.
|
|
267
240
|
**/
|
|
268
241
|
Renderer.prototype.renderInline = function (tokens, options, env) {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
rules = this.rules;
|
|
242
|
+
let result = '';
|
|
243
|
+
const rules = this.rules;
|
|
272
244
|
|
|
273
|
-
for (
|
|
274
|
-
type = tokens[i].type;
|
|
245
|
+
for (let i = 0, len = tokens.length; i < len; i++) {
|
|
246
|
+
const type = tokens[i].type;
|
|
275
247
|
|
|
276
248
|
if (typeof rules[type] !== 'undefined') {
|
|
277
249
|
result += rules[type](tokens, i, options, env, this);
|
|
@@ -280,10 +252,9 @@ Renderer.prototype.renderInline = function (tokens, options, env) {
|
|
|
280
252
|
}
|
|
281
253
|
}
|
|
282
254
|
|
|
283
|
-
return result
|
|
255
|
+
return result
|
|
284
256
|
};
|
|
285
257
|
|
|
286
|
-
|
|
287
258
|
/** internal
|
|
288
259
|
* Renderer.renderInlineAsText(tokens, options, env) -> String
|
|
289
260
|
* - tokens (Array): list on block tokens to render
|
|
@@ -295,22 +266,31 @@ Renderer.prototype.renderInline = function (tokens, options, env) {
|
|
|
295
266
|
* instead of simple escaping.
|
|
296
267
|
**/
|
|
297
268
|
Renderer.prototype.renderInlineAsText = function (tokens, options, env) {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
for (
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
269
|
+
let result = '';
|
|
270
|
+
|
|
271
|
+
for (let i = 0, len = tokens.length; i < len; i++) {
|
|
272
|
+
switch (tokens[i].type) {
|
|
273
|
+
case 'text':
|
|
274
|
+
result += tokens[i].content;
|
|
275
|
+
break
|
|
276
|
+
case 'image':
|
|
277
|
+
result += this.renderInlineAsText(tokens[i].children, options, env);
|
|
278
|
+
break
|
|
279
|
+
case 'html_inline':
|
|
280
|
+
case 'html_block':
|
|
281
|
+
result += tokens[i].content;
|
|
282
|
+
break
|
|
283
|
+
case 'softbreak':
|
|
284
|
+
case 'hardbreak':
|
|
285
|
+
result += '\n';
|
|
286
|
+
break
|
|
287
|
+
// all other tokens are skipped
|
|
307
288
|
}
|
|
308
289
|
}
|
|
309
290
|
|
|
310
|
-
return result
|
|
291
|
+
return result
|
|
311
292
|
};
|
|
312
293
|
|
|
313
|
-
|
|
314
294
|
/**
|
|
315
295
|
* Renderer.render(tokens, options, env) -> String
|
|
316
296
|
* - tokens (Array): list on block tokens to render
|
|
@@ -321,26 +301,23 @@ Renderer.prototype.renderInlineAsText = function (tokens, options, env) {
|
|
|
321
301
|
* this method directly.
|
|
322
302
|
**/
|
|
323
303
|
Renderer.prototype.render = function (tokens, options, env) {
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
rules = this.rules;
|
|
304
|
+
let result = '';
|
|
305
|
+
const rules = this.rules;
|
|
327
306
|
|
|
328
|
-
for (i = 0, len = tokens.length; i < len; i++) {
|
|
329
|
-
type = tokens[i].type;
|
|
307
|
+
for (let i = 0, len = tokens.length; i < len; i++) {
|
|
308
|
+
const type = tokens[i].type;
|
|
330
309
|
|
|
331
310
|
if (type === 'inline') {
|
|
332
311
|
result += this.renderInline(tokens[i].children, options, env);
|
|
333
312
|
} else if (typeof rules[type] !== 'undefined') {
|
|
334
|
-
result += rules[
|
|
313
|
+
result += rules[type](tokens, i, options, env, this);
|
|
335
314
|
} else {
|
|
336
315
|
result += this.renderToken(tokens, i, options, env);
|
|
337
316
|
}
|
|
338
317
|
}
|
|
339
318
|
|
|
340
|
-
return result
|
|
319
|
+
return result
|
|
341
320
|
};
|
|
342
321
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
export { renderer as r };
|
|
322
|
+
export { Renderer as default };
|
|
346
323
|
//# sourceMappingURL=renderer.mjs.map
|
package/es/node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderer.mjs","sources":["../../../../../../../../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.mjs"],"sourcesContent":["/**\n * class Renderer\n *\n * Generates HTML from parsed token stream. Each instance has independent\n * copy of rules. Those can be rewritten with ease. Also, you can add new\n * rules if you create plugin and adds new token types.\n **/\n\nimport { assign, unescapeAll, escapeHtml } from './common/utils.mjs'\n\nconst default_rules = {}\n\ndefault_rules.code_inline = function (tokens, idx, options, env, slf) {\n const token = tokens[idx]\n\n return '<code' + slf.renderAttrs(token) + '>' +\n escapeHtml(token.content) +\n '</code>'\n}\n\ndefault_rules.code_block = function (tokens, idx, options, env, slf) {\n const token = tokens[idx]\n\n return '<pre' + slf.renderAttrs(token) + '><code>' +\n escapeHtml(tokens[idx].content) +\n '</code></pre>\\n'\n}\n\ndefault_rules.fence = function (tokens, idx, options, env, slf) {\n const token = tokens[idx]\n const info = token.info ? unescapeAll(token.info).trim() : ''\n let langName = ''\n let langAttrs = ''\n\n if (info) {\n const arr = info.split(/(\\s+)/g)\n langName = arr[0]\n langAttrs = arr.slice(2).join('')\n }\n\n let highlighted\n if (options.highlight) {\n highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content)\n } else {\n highlighted = escapeHtml(token.content)\n }\n\n if (highlighted.indexOf('<pre') === 0) {\n return highlighted + '\\n'\n }\n\n // If language exists, inject class gently, without modifying original token.\n // May be, one day we will add .deepClone() for token and simplify this part, but\n // now we prefer to keep things local.\n if (info) {\n const i = token.attrIndex('class')\n const tmpAttrs = token.attrs ? token.attrs.slice() : []\n\n if (i < 0) {\n tmpAttrs.push(['class', options.langPrefix + langName])\n } else {\n tmpAttrs[i] = tmpAttrs[i].slice()\n tmpAttrs[i][1] += ' ' + options.langPrefix + langName\n }\n\n // Fake token just to render attributes\n const tmpToken = {\n attrs: tmpAttrs\n }\n\n return `<pre><code${slf.renderAttrs(tmpToken)}>${highlighted}</code></pre>\\n`\n }\n\n return `<pre><code${slf.renderAttrs(token)}>${highlighted}</code></pre>\\n`\n}\n\ndefault_rules.image = function (tokens, idx, options, env, slf) {\n const token = tokens[idx]\n\n // \"alt\" attr MUST be set, even if empty. Because it's mandatory and\n // should be placed on proper position for tests.\n //\n // Replace content with actual value\n\n token.attrs[token.attrIndex('alt')][1] =\n slf.renderInlineAsText(token.children, options, env)\n\n return slf.renderToken(tokens, idx, options)\n}\n\ndefault_rules.hardbreak = function (tokens, idx, options /*, env */) {\n return options.xhtmlOut ? '<br />\\n' : '<br>\\n'\n}\ndefault_rules.softbreak = function (tokens, idx, options /*, env */) {\n return options.breaks ? (options.xhtmlOut ? '<br />\\n' : '<br>\\n') : '\\n'\n}\n\ndefault_rules.text = function (tokens, idx /*, options, env */) {\n return escapeHtml(tokens[idx].content)\n}\n\ndefault_rules.html_block = function (tokens, idx /*, options, env */) {\n return tokens[idx].content\n}\ndefault_rules.html_inline = function (tokens, idx /*, options, env */) {\n return tokens[idx].content\n}\n\n/**\n * new Renderer()\n *\n * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.\n **/\nfunction Renderer () {\n /**\n * Renderer#rules -> Object\n *\n * Contains render rules for tokens. Can be updated and extended.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.renderer.rules.strong_open = function () { return '<b>'; };\n * md.renderer.rules.strong_close = function () { return '</b>'; };\n *\n * var result = md.renderInline(...);\n * ```\n *\n * Each rule is called as independent static function with fixed signature:\n *\n * ```javascript\n * function my_token_render(tokens, idx, options, env, renderer) {\n * // ...\n * return renderedHTML;\n * }\n * ```\n *\n * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs)\n * for more details and examples.\n **/\n this.rules = assign({}, default_rules)\n}\n\n/**\n * Renderer.renderAttrs(token) -> String\n *\n * Render token attributes to string.\n **/\nRenderer.prototype.renderAttrs = function renderAttrs (token) {\n let i, l, result\n\n if (!token.attrs) { return '' }\n\n result = ''\n\n for (i = 0, l = token.attrs.length; i < l; i++) {\n result += ' ' + escapeHtml(token.attrs[i][0]) + '=\"' + escapeHtml(token.attrs[i][1]) + '\"'\n }\n\n return result\n}\n\n/**\n * Renderer.renderToken(tokens, idx, options) -> String\n * - tokens (Array): list of tokens\n * - idx (Numbed): token index to render\n * - options (Object): params of parser instance\n *\n * Default token renderer. Can be overriden by custom function\n * in [[Renderer#rules]].\n **/\nRenderer.prototype.renderToken = function renderToken (tokens, idx, options) {\n const token = tokens[idx]\n let result = ''\n\n // Tight list paragraphs\n if (token.hidden) {\n return ''\n }\n\n // Insert a newline between hidden paragraph and subsequent opening\n // block-level tag.\n //\n // For example, here we should insert a newline before blockquote:\n // - a\n // >\n //\n if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {\n result += '\\n'\n }\n\n // Add token name, e.g. `<img`\n result += (token.nesting === -1 ? '</' : '<') + token.tag\n\n // Encode attributes, e.g. `<img src=\"foo\"`\n result += this.renderAttrs(token)\n\n // Add a slash for self-closing tags, e.g. `<img src=\"foo\" /`\n if (token.nesting === 0 && options.xhtmlOut) {\n result += ' /'\n }\n\n // Check if we need to add a newline after this tag\n let needLf = false\n if (token.block) {\n needLf = true\n\n if (token.nesting === 1) {\n if (idx + 1 < tokens.length) {\n const nextToken = tokens[idx + 1]\n\n if (nextToken.type === 'inline' || nextToken.hidden) {\n // Block-level tag containing an inline tag.\n //\n needLf = false\n } else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {\n // Opening tag + closing tag of the same type. E.g. `<li></li>`.\n //\n needLf = false\n }\n }\n }\n }\n\n result += needLf ? '>\\n' : '>'\n\n return result\n}\n\n/**\n * Renderer.renderInline(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * The same as [[Renderer.render]], but for single token of `inline` type.\n **/\nRenderer.prototype.renderInline = function (tokens, options, env) {\n let result = ''\n const rules = this.rules\n\n for (let i = 0, len = tokens.length; i < len; i++) {\n const type = tokens[i].type\n\n if (typeof rules[type] !== 'undefined') {\n result += rules[type](tokens, i, options, env, this)\n } else {\n result += this.renderToken(tokens, i, options)\n }\n }\n\n return result\n}\n\n/** internal\n * Renderer.renderInlineAsText(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Special kludge for image `alt` attributes to conform CommonMark spec.\n * Don't try to use it! Spec requires to show `alt` content with stripped markup,\n * instead of simple escaping.\n **/\nRenderer.prototype.renderInlineAsText = function (tokens, options, env) {\n let result = ''\n\n for (let i = 0, len = tokens.length; i < len; i++) {\n switch (tokens[i].type) {\n case 'text':\n result += tokens[i].content\n break\n case 'image':\n result += this.renderInlineAsText(tokens[i].children, options, env)\n break\n case 'html_inline':\n case 'html_block':\n result += tokens[i].content\n break\n case 'softbreak':\n case 'hardbreak':\n result += '\\n'\n break\n default:\n // all other tokens are skipped\n }\n }\n\n return result\n}\n\n/**\n * Renderer.render(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Takes token stream and generates HTML. Probably, you will never need to call\n * this method directly.\n **/\nRenderer.prototype.render = function (tokens, options, env) {\n let result = ''\n const rules = this.rules\n\n for (let i = 0, len = tokens.length; i < len; i++) {\n const type = tokens[i].type\n\n if (type === 'inline') {\n result += this.renderInline(tokens[i].children, options, env)\n } else if (typeof rules[type] !== 'undefined') {\n result += rules[type](tokens, i, options, env, this)\n } else {\n result += this.renderToken(tokens, i, options, env)\n }\n }\n\n return result\n}\n\nexport default Renderer\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA,MAAM,aAAa,GAAG,GAAE;AACxB;AACA,aAAa,CAAC,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EAAC;AACnE,KAAK,MAAM,IAAI,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,WAAW,EAAE;AACnD,MAAM,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAC;AAC1D,KAAK,MAAM;AACX,MAAM,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAC;AACzD,KAAK;AACL,GAAG;AACH;AACA,EAAE,OAAO,MAAM;AACf;;;;","x_google_ignoreList":[0]}
|
|
@@ -16,11 +16,10 @@
|
|
|
16
16
|
* [[MarkdownIt.use]].
|
|
17
17
|
**/
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
/**
|
|
21
20
|
* new Ruler()
|
|
22
21
|
**/
|
|
23
|
-
function Ruler() {
|
|
22
|
+
function Ruler () {
|
|
24
23
|
// List of added rules. Each element is:
|
|
25
24
|
//
|
|
26
25
|
// {
|
|
@@ -40,31 +39,28 @@ function Ruler() {
|
|
|
40
39
|
this.__cache__ = null;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
44
42
|
// Helper methods, should not be used directly
|
|
45
43
|
|
|
46
|
-
|
|
47
44
|
// Find rule index by name
|
|
48
45
|
//
|
|
49
46
|
Ruler.prototype.__find__ = function (name) {
|
|
50
|
-
for (
|
|
47
|
+
for (let i = 0; i < this.__rules__.length; i++) {
|
|
51
48
|
if (this.__rules__[i].name === name) {
|
|
52
|
-
return i
|
|
49
|
+
return i
|
|
53
50
|
}
|
|
54
51
|
}
|
|
55
|
-
return -1
|
|
52
|
+
return -1
|
|
56
53
|
};
|
|
57
54
|
|
|
58
|
-
|
|
59
55
|
// Build rules lookup cache
|
|
60
56
|
//
|
|
61
57
|
Ruler.prototype.__compile__ = function () {
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
const self = this;
|
|
59
|
+
const chains = [''];
|
|
64
60
|
|
|
65
61
|
// collect unique names
|
|
66
62
|
self.__rules__.forEach(function (rule) {
|
|
67
|
-
if (!rule.enabled) { return
|
|
63
|
+
if (!rule.enabled) { return }
|
|
68
64
|
|
|
69
65
|
rule.alt.forEach(function (altName) {
|
|
70
66
|
if (chains.indexOf(altName) < 0) {
|
|
@@ -78,16 +74,15 @@ Ruler.prototype.__compile__ = function () {
|
|
|
78
74
|
chains.forEach(function (chain) {
|
|
79
75
|
self.__cache__[chain] = [];
|
|
80
76
|
self.__rules__.forEach(function (rule) {
|
|
81
|
-
if (!rule.enabled) { return
|
|
77
|
+
if (!rule.enabled) { return }
|
|
82
78
|
|
|
83
|
-
if (chain && rule.alt.indexOf(chain) < 0) { return
|
|
79
|
+
if (chain && rule.alt.indexOf(chain) < 0) { return }
|
|
84
80
|
|
|
85
81
|
self.__cache__[chain].push(rule.fn);
|
|
86
82
|
});
|
|
87
83
|
});
|
|
88
84
|
};
|
|
89
85
|
|
|
90
|
-
|
|
91
86
|
/**
|
|
92
87
|
* Ruler.at(name, fn [, options])
|
|
93
88
|
* - name (String): rule name to replace.
|
|
@@ -114,17 +109,16 @@ Ruler.prototype.__compile__ = function () {
|
|
|
114
109
|
* ```
|
|
115
110
|
**/
|
|
116
111
|
Ruler.prototype.at = function (name, fn, options) {
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
const index = this.__find__(name);
|
|
113
|
+
const opt = options || {};
|
|
119
114
|
|
|
120
|
-
if (index === -1) { throw new Error('Parser rule not found: ' + name)
|
|
115
|
+
if (index === -1) { throw new Error('Parser rule not found: ' + name) }
|
|
121
116
|
|
|
122
117
|
this.__rules__[index].fn = fn;
|
|
123
118
|
this.__rules__[index].alt = opt.alt || [];
|
|
124
119
|
this.__cache__ = null;
|
|
125
120
|
};
|
|
126
121
|
|
|
127
|
-
|
|
128
122
|
/**
|
|
129
123
|
* Ruler.before(beforeName, ruleName, fn [, options])
|
|
130
124
|
* - beforeName (String): new rule will be added before this one.
|
|
@@ -150,22 +144,21 @@ Ruler.prototype.at = function (name, fn, options) {
|
|
|
150
144
|
* ```
|
|
151
145
|
**/
|
|
152
146
|
Ruler.prototype.before = function (beforeName, ruleName, fn, options) {
|
|
153
|
-
|
|
154
|
-
|
|
147
|
+
const index = this.__find__(beforeName);
|
|
148
|
+
const opt = options || {};
|
|
155
149
|
|
|
156
|
-
if (index === -1) { throw new Error('Parser rule not found: ' + beforeName)
|
|
150
|
+
if (index === -1) { throw new Error('Parser rule not found: ' + beforeName) }
|
|
157
151
|
|
|
158
152
|
this.__rules__.splice(index, 0, {
|
|
159
153
|
name: ruleName,
|
|
160
154
|
enabled: true,
|
|
161
|
-
fn
|
|
155
|
+
fn,
|
|
162
156
|
alt: opt.alt || []
|
|
163
157
|
});
|
|
164
158
|
|
|
165
159
|
this.__cache__ = null;
|
|
166
160
|
};
|
|
167
161
|
|
|
168
|
-
|
|
169
162
|
/**
|
|
170
163
|
* Ruler.after(afterName, ruleName, fn [, options])
|
|
171
164
|
* - afterName (String): new rule will be added after this one.
|
|
@@ -191,15 +184,15 @@ Ruler.prototype.before = function (beforeName, ruleName, fn, options) {
|
|
|
191
184
|
* ```
|
|
192
185
|
**/
|
|
193
186
|
Ruler.prototype.after = function (afterName, ruleName, fn, options) {
|
|
194
|
-
|
|
195
|
-
|
|
187
|
+
const index = this.__find__(afterName);
|
|
188
|
+
const opt = options || {};
|
|
196
189
|
|
|
197
|
-
if (index === -1) { throw new Error('Parser rule not found: ' + afterName)
|
|
190
|
+
if (index === -1) { throw new Error('Parser rule not found: ' + afterName) }
|
|
198
191
|
|
|
199
192
|
this.__rules__.splice(index + 1, 0, {
|
|
200
193
|
name: ruleName,
|
|
201
194
|
enabled: true,
|
|
202
|
-
fn
|
|
195
|
+
fn,
|
|
203
196
|
alt: opt.alt || []
|
|
204
197
|
});
|
|
205
198
|
|
|
@@ -230,19 +223,18 @@ Ruler.prototype.after = function (afterName, ruleName, fn, options) {
|
|
|
230
223
|
* ```
|
|
231
224
|
**/
|
|
232
225
|
Ruler.prototype.push = function (ruleName, fn, options) {
|
|
233
|
-
|
|
226
|
+
const opt = options || {};
|
|
234
227
|
|
|
235
228
|
this.__rules__.push({
|
|
236
229
|
name: ruleName,
|
|
237
230
|
enabled: true,
|
|
238
|
-
fn
|
|
231
|
+
fn,
|
|
239
232
|
alt: opt.alt || []
|
|
240
233
|
});
|
|
241
234
|
|
|
242
235
|
this.__cache__ = null;
|
|
243
236
|
};
|
|
244
237
|
|
|
245
|
-
|
|
246
238
|
/**
|
|
247
239
|
* Ruler.enable(list [, ignoreInvalid]) -> Array
|
|
248
240
|
* - list (String|Array): list of rule names to enable.
|
|
@@ -256,27 +248,26 @@ Ruler.prototype.push = function (ruleName, fn, options) {
|
|
|
256
248
|
* See also [[Ruler.disable]], [[Ruler.enableOnly]].
|
|
257
249
|
**/
|
|
258
250
|
Ruler.prototype.enable = function (list, ignoreInvalid) {
|
|
259
|
-
if (!Array.isArray(list)) { list = [
|
|
251
|
+
if (!Array.isArray(list)) { list = [list]; }
|
|
260
252
|
|
|
261
|
-
|
|
253
|
+
const result = [];
|
|
262
254
|
|
|
263
255
|
// Search by name and enable
|
|
264
256
|
list.forEach(function (name) {
|
|
265
|
-
|
|
257
|
+
const idx = this.__find__(name);
|
|
266
258
|
|
|
267
259
|
if (idx < 0) {
|
|
268
|
-
if (ignoreInvalid) { return
|
|
269
|
-
throw new Error('Rules manager: invalid rule name ' + name)
|
|
260
|
+
if (ignoreInvalid) { return }
|
|
261
|
+
throw new Error('Rules manager: invalid rule name ' + name)
|
|
270
262
|
}
|
|
271
263
|
this.__rules__[idx].enabled = true;
|
|
272
264
|
result.push(name);
|
|
273
265
|
}, this);
|
|
274
266
|
|
|
275
267
|
this.__cache__ = null;
|
|
276
|
-
return result
|
|
268
|
+
return result
|
|
277
269
|
};
|
|
278
270
|
|
|
279
|
-
|
|
280
271
|
/**
|
|
281
272
|
* Ruler.enableOnly(list [, ignoreInvalid])
|
|
282
273
|
* - list (String|Array): list of rule names to enable (whitelist).
|
|
@@ -288,14 +279,13 @@ Ruler.prototype.enable = function (list, ignoreInvalid) {
|
|
|
288
279
|
* See also [[Ruler.disable]], [[Ruler.enable]].
|
|
289
280
|
**/
|
|
290
281
|
Ruler.prototype.enableOnly = function (list, ignoreInvalid) {
|
|
291
|
-
if (!Array.isArray(list)) { list = [
|
|
282
|
+
if (!Array.isArray(list)) { list = [list]; }
|
|
292
283
|
|
|
293
284
|
this.__rules__.forEach(function (rule) { rule.enabled = false; });
|
|
294
285
|
|
|
295
286
|
this.enable(list, ignoreInvalid);
|
|
296
287
|
};
|
|
297
288
|
|
|
298
|
-
|
|
299
289
|
/**
|
|
300
290
|
* Ruler.disable(list [, ignoreInvalid]) -> Array
|
|
301
291
|
* - list (String|Array): list of rule names to disable.
|
|
@@ -309,27 +299,26 @@ Ruler.prototype.enableOnly = function (list, ignoreInvalid) {
|
|
|
309
299
|
* See also [[Ruler.enable]], [[Ruler.enableOnly]].
|
|
310
300
|
**/
|
|
311
301
|
Ruler.prototype.disable = function (list, ignoreInvalid) {
|
|
312
|
-
if (!Array.isArray(list)) { list = [
|
|
302
|
+
if (!Array.isArray(list)) { list = [list]; }
|
|
313
303
|
|
|
314
|
-
|
|
304
|
+
const result = [];
|
|
315
305
|
|
|
316
306
|
// Search by name and disable
|
|
317
307
|
list.forEach(function (name) {
|
|
318
|
-
|
|
308
|
+
const idx = this.__find__(name);
|
|
319
309
|
|
|
320
310
|
if (idx < 0) {
|
|
321
|
-
if (ignoreInvalid) { return
|
|
322
|
-
throw new Error('Rules manager: invalid rule name ' + name)
|
|
311
|
+
if (ignoreInvalid) { return }
|
|
312
|
+
throw new Error('Rules manager: invalid rule name ' + name)
|
|
323
313
|
}
|
|
324
314
|
this.__rules__[idx].enabled = false;
|
|
325
315
|
result.push(name);
|
|
326
316
|
}, this);
|
|
327
317
|
|
|
328
318
|
this.__cache__ = null;
|
|
329
|
-
return result
|
|
319
|
+
return result
|
|
330
320
|
};
|
|
331
321
|
|
|
332
|
-
|
|
333
322
|
/**
|
|
334
323
|
* Ruler.getRules(chainName) -> Array
|
|
335
324
|
*
|
|
@@ -345,10 +334,8 @@ Ruler.prototype.getRules = function (chainName) {
|
|
|
345
334
|
}
|
|
346
335
|
|
|
347
336
|
// Chain can be empty, if rules disabled. But we still have to return Array.
|
|
348
|
-
return this.__cache__[chainName] || []
|
|
337
|
+
return this.__cache__[chainName] || []
|
|
349
338
|
};
|
|
350
339
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
export { ruler as r };
|
|
340
|
+
export { Ruler as default };
|
|
354
341
|
//# sourceMappingURL=ruler.mjs.map
|