markdown-flow-ui 0.3.6 → 0.3.7
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/_virtual/index8.cjs +1 -1
- package/dist/_virtual/index8.es.js +2 -2
- package/dist/_virtual/index9.cjs +1 -1
- package/dist/_virtual/index9.es.js +2 -2
- package/dist/assets/markdown-flow-ui.css +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs +3 -3
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +145 -143
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
- package/dist/markdown-flow-ui-lib.css +1 -1
- package/dist/markdown-flow-ui.css +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +92 -89
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/{react-tooltip/node_modules/@radix-ui/react-popper → react-popper}/dist/index.es.js +5 -5
- package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +50 -47
- package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js +9 -9
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +10 -7
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js +1 -1
- package/dist/node_modules/classnames/index.cjs +1 -1
- package/dist/node_modules/classnames/index.es.js +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.cjs +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.cjs.map +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.es.js +809 -900
- package/dist/node_modules/i18next/dist/esm/i18next.es.js.map +1 -1
- package/dist/node_modules/katex/dist/katex.cjs +14 -14
- package/dist/node_modules/katex/dist/katex.cjs.map +1 -1
- package/dist/node_modules/katex/dist/katex.es.js +1302 -1192
- package/dist/node_modules/katex/dist/katex.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.es.js +52 -29
- package/dist/node_modules/lucide-react/dist/esm/Icon.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/context.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/context.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/context.es.js +6 -0
- package/dist/node_modules/lucide-react/dist/esm/context.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.es.js +13 -16
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.es.js +16 -10
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.es.js +13 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.es.js +8 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/check.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js +10 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js +12 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.es.js +14 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.es.js +11 -5
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js +13 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.es.js +22 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.es.js +20 -8
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js +17 -11
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/image.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/image.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/image.es.js +14 -8
- package/dist/node_modules/lucide-react/dist/esm/icons/image.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js +11 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.es.js +15 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.es.js +25 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.es.js +16 -10
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.es.js +19 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.es.js +19 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.es.js +14 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.es.js +19 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.es.js +15 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.es.js +13 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.es.js +19 -13
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/x.es.js +13 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/x.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.es.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.es.js +44 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/{defaultAttributes.es.js → shared/src/build/defaultAttributes.es.js} +4 -4
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.es.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.es.js +5 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.es.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.es.js +5 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.es.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.es.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.es.js.map +1 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.cjs +3 -3
- package/dist/node_modules/micromark/lib/create-tokenizer.cjs.map +1 -1
- package/dist/node_modules/micromark/lib/create-tokenizer.es.js +78 -76
- package/dist/node_modules/micromark/lib/create-tokenizer.es.js.map +1 -1
- package/dist/node_modules/micromark/lib/initialize/document.cjs +1 -1
- package/dist/node_modules/micromark/lib/initialize/document.cjs.map +1 -1
- package/dist/node_modules/micromark/lib/initialize/document.es.js +77 -75
- package/dist/node_modules/micromark/lib/initialize/document.es.js.map +1 -1
- package/dist/node_modules/micromark/lib/initialize/text.cjs +1 -1
- package/dist/node_modules/micromark/lib/initialize/text.cjs.map +1 -1
- package/dist/node_modules/micromark/lib/initialize/text.es.js +67 -64
- package/dist/node_modules/micromark/lib/initialize/text.es.js.map +1 -1
- package/dist/node_modules/micromark/lib/preprocess.cjs +1 -1
- package/dist/node_modules/micromark/lib/preprocess.cjs.map +1 -1
- package/dist/node_modules/micromark/lib/preprocess.es.js +19 -14
- package/dist/node_modules/micromark/lib/preprocess.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/attention.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/attention.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/attention.es.js +36 -32
- package/dist/node_modules/micromark-core-commonmark/lib/attention.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.es.js +49 -61
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.es.js +21 -27
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.es.js +18 -14
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.es.js +59 -71
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.es.js +87 -85
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.es.js +11 -10
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.es.js +12 -11
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.cjs +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.cjs.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.es.js +18 -0
- package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.es.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.es.js +35 -33
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.es.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.cjs +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.cjs.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js +32 -28
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.cjs +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.cjs.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.es.js +18 -14
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.es.js.map +1 -1
- package/dist/node_modules/micromark-factory-space/index.cjs +1 -1
- package/dist/node_modules/micromark-factory-space/index.cjs.map +1 -1
- package/dist/node_modules/micromark-factory-space/index.es.js +24 -10
- package/dist/node_modules/micromark-factory-space/index.es.js.map +1 -1
- package/dist/node_modules/micromark-util-edit-map/index.cjs +2 -0
- package/dist/node_modules/micromark-util-edit-map/index.cjs.map +1 -0
- package/dist/node_modules/micromark-util-edit-map/index.es.js +83 -0
- package/dist/node_modules/micromark-util-edit-map/index.es.js.map +1 -0
- package/package.json +24 -17
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.es.js +0 -50
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.es.js +0 -82
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js +0 -216
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +0 -105
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.es.js +0 -18
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.es.js +0 -39
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js +0 -99
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +0 -16
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js +0 -70
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.es.js +0 -39
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.es.js +0 -99
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.es.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.es.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.es.js +0 -19
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.es.js.map +0 -1
- /package/dist/node_modules/@radix-ui/{react-tooltip/node_modules/@radix-ui/react-arrow → react-arrow}/dist/index.cjs +0 -0
- /package/dist/node_modules/@radix-ui/{react-tooltip/node_modules/@radix-ui/react-arrow → react-arrow}/dist/index.es.js +0 -0
|
@@ -1,125 +1,127 @@
|
|
|
1
1
|
import { factorySpace as I } from "../../../micromark-factory-space/index.es.js";
|
|
2
2
|
import { markdownLineEnding as N } from "../../../micromark-util-character/index.es.js";
|
|
3
|
-
import {
|
|
3
|
+
import { EditMap as y } from "../../../micromark-util-edit-map/index.es.js";
|
|
4
4
|
const L = {
|
|
5
5
|
tokenize: T
|
|
6
|
-
},
|
|
7
|
-
tokenize:
|
|
6
|
+
}, z = {
|
|
7
|
+
tokenize: M
|
|
8
8
|
};
|
|
9
9
|
function T(i) {
|
|
10
|
-
const
|
|
11
|
-
let s = 0, t,
|
|
12
|
-
return
|
|
13
|
-
function
|
|
10
|
+
const n = this, l = [];
|
|
11
|
+
let s = 0, t, d, w;
|
|
12
|
+
return h;
|
|
13
|
+
function h(e) {
|
|
14
14
|
if (s < l.length) {
|
|
15
|
-
const
|
|
16
|
-
return
|
|
15
|
+
const r = l[s];
|
|
16
|
+
return n.containerState = r[1], i.attempt(r[0].continuation, B, p)(e);
|
|
17
17
|
}
|
|
18
|
-
return p(
|
|
18
|
+
return p(e);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
if (s++,
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
let u =
|
|
20
|
+
function B(e) {
|
|
21
|
+
if (s++, n.containerState._closeFlow) {
|
|
22
|
+
n.containerState._closeFlow = void 0, t && x();
|
|
23
|
+
const r = n.events.length;
|
|
24
|
+
let u = r, o;
|
|
25
25
|
for (; u--; )
|
|
26
|
-
if (
|
|
27
|
-
|
|
26
|
+
if (n.events[u][0] === "exit" && n.events[u][1].type === "chunkFlow") {
|
|
27
|
+
o = n.events[u][1].end;
|
|
28
28
|
break;
|
|
29
29
|
}
|
|
30
30
|
f(s);
|
|
31
|
-
let c =
|
|
32
|
-
for (; c <
|
|
33
|
-
|
|
34
|
-
...
|
|
31
|
+
let c = r;
|
|
32
|
+
for (; c < n.events.length; )
|
|
33
|
+
n.events[c][1].end = {
|
|
34
|
+
...o
|
|
35
35
|
}, c++;
|
|
36
|
-
|
|
36
|
+
const a = new y();
|
|
37
|
+
return a.add(u + 1, 0, n.events.slice(r)), a.add(r, c - r, []), a.consume(n.events), p(e);
|
|
37
38
|
}
|
|
38
|
-
return
|
|
39
|
+
return h(e);
|
|
39
40
|
}
|
|
40
|
-
function p(
|
|
41
|
+
function p(e) {
|
|
41
42
|
if (s === l.length) {
|
|
42
43
|
if (!t)
|
|
43
|
-
return m(
|
|
44
|
+
return m(e);
|
|
44
45
|
if (t.currentConstruct && t.currentConstruct.concrete)
|
|
45
|
-
return v(
|
|
46
|
-
|
|
46
|
+
return v(e);
|
|
47
|
+
n.interrupt = !!(t.currentConstruct && !t._gfmTableDynamicInterruptHack);
|
|
47
48
|
}
|
|
48
|
-
return
|
|
49
|
+
return n.containerState = {}, i.check(z, _, b)(e);
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
-
return t && x(), f(s), m(
|
|
51
|
+
function _(e) {
|
|
52
|
+
return t && x(), f(s), m(e);
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
return
|
|
54
|
+
function b(e) {
|
|
55
|
+
return n.parser.lazy[n.now().line] = s !== l.length, w = n.now().offset, v(e);
|
|
55
56
|
}
|
|
56
|
-
function m(
|
|
57
|
-
return
|
|
57
|
+
function m(e) {
|
|
58
|
+
return n.containerState = {}, i.attempt(z, E, v)(e);
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
-
return s++, l.push([
|
|
60
|
+
function E(e) {
|
|
61
|
+
return s++, l.push([n.currentConstruct, n.containerState]), m(e);
|
|
61
62
|
}
|
|
62
|
-
function v(
|
|
63
|
-
if (
|
|
64
|
-
t && x(), f(0), i.consume(
|
|
63
|
+
function v(e) {
|
|
64
|
+
if (e === null) {
|
|
65
|
+
t && x(), f(0), i.consume(e);
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
67
|
-
return t = t ||
|
|
68
|
+
return t = t || n.parser.flow(n.now()), i.enter("chunkFlow", {
|
|
68
69
|
_tokenizer: t,
|
|
69
70
|
contentType: "flow",
|
|
70
|
-
previous:
|
|
71
|
-
}),
|
|
71
|
+
previous: d
|
|
72
|
+
}), k(e);
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
-
if (
|
|
75
|
-
|
|
74
|
+
function k(e) {
|
|
75
|
+
if (e === null) {
|
|
76
|
+
S(i.exit("chunkFlow"), !0), f(0), i.consume(e);
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
|
-
return N(
|
|
79
|
+
return N(e) ? (i.consume(e), S(i.exit("chunkFlow")), s = 0, n.interrupt = void 0, h) : (i.consume(e), k);
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
-
const u =
|
|
82
|
-
if (
|
|
83
|
-
let
|
|
84
|
-
for (;
|
|
81
|
+
function S(e, r) {
|
|
82
|
+
const u = n.sliceStream(e);
|
|
83
|
+
if (r && u.push(null), e.previous = d, d && (d.next = e), d = e, t.defineSkip(e.start), t.write(u), n.parser.lazy[e.start.line]) {
|
|
84
|
+
let o = t.events.length;
|
|
85
|
+
for (; o--; )
|
|
85
86
|
if (
|
|
86
87
|
// The token starts before the line ending…
|
|
87
|
-
t.events[
|
|
88
|
-
(!t.events[
|
|
89
|
-
t.events[
|
|
88
|
+
t.events[o][1].start.offset < w && // …and either is not ended yet…
|
|
89
|
+
(!t.events[o][1].end || // …or ends after it.
|
|
90
|
+
t.events[o][1].end.offset > w)
|
|
90
91
|
)
|
|
91
92
|
return;
|
|
92
|
-
const c =
|
|
93
|
-
let
|
|
94
|
-
for (;
|
|
95
|
-
if (
|
|
96
|
-
if (
|
|
97
|
-
|
|
93
|
+
const c = n.events.length;
|
|
94
|
+
let a = c, g, F;
|
|
95
|
+
for (; a--; )
|
|
96
|
+
if (n.events[a][0] === "exit" && n.events[a][1].type === "chunkFlow") {
|
|
97
|
+
if (g) {
|
|
98
|
+
F = n.events[a][1].end;
|
|
98
99
|
break;
|
|
99
100
|
}
|
|
100
|
-
|
|
101
|
+
g = !0;
|
|
101
102
|
}
|
|
102
|
-
for (f(s),
|
|
103
|
-
|
|
104
|
-
...
|
|
105
|
-
},
|
|
106
|
-
|
|
103
|
+
for (f(s), o = c; o < n.events.length; )
|
|
104
|
+
n.events[o][1].end = {
|
|
105
|
+
...F
|
|
106
|
+
}, o++;
|
|
107
|
+
const C = new y();
|
|
108
|
+
C.add(a + 1, 0, n.events.slice(c)), C.add(c, o - c, []), C.consume(n.events);
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
|
-
function f(
|
|
110
|
-
let
|
|
111
|
-
for (;
|
|
112
|
-
const u = l[
|
|
113
|
-
|
|
111
|
+
function f(e) {
|
|
112
|
+
let r = l.length;
|
|
113
|
+
for (; r-- > e; ) {
|
|
114
|
+
const u = l[r];
|
|
115
|
+
n.containerState = u[1], u[0].exit.call(n, i);
|
|
114
116
|
}
|
|
115
|
-
l.length =
|
|
117
|
+
l.length = e;
|
|
116
118
|
}
|
|
117
119
|
function x() {
|
|
118
|
-
t.write([null]),
|
|
120
|
+
t.write([null]), d = void 0, t = void 0, n.containerState._closeFlow = void 0;
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
|
-
function
|
|
122
|
-
return I(i, i.attempt(this.parser.constructs.document,
|
|
123
|
+
function M(i, n, l) {
|
|
124
|
+
return I(i, i.attempt(this.parser.constructs.document, n, l), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
123
125
|
}
|
|
124
126
|
export {
|
|
125
127
|
L as document
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.es.js","sources":["../../../../../node_modules/micromark/lib/initialize/document.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * ContainerState,\n * InitialConstruct,\n * Initializer,\n * Point,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\n/**\n * @typedef {[Construct, ContainerState]} StackItem\n * Construct and its state.\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\nimport { splice } from 'micromark-util-chunked';\n/** @type {InitialConstruct} */\nexport const document = {\n tokenize: initializeDocument\n};\n\n/** @type {Construct} */\nconst containerConstruct = {\n tokenize: tokenizeContainer\n};\n\n/**\n * @this {TokenizeContext}\n * Self.\n * @type {Initializer}\n * Initializer.\n */\nfunction initializeDocument(effects) {\n const self = this;\n /** @type {Array<StackItem>} */\n const stack = [];\n let continued = 0;\n /** @type {TokenizeContext | undefined} */\n let childFlow;\n /** @type {Token | undefined} */\n let childToken;\n /** @type {number} */\n let lineStartOffset;\n return start;\n\n /** @type {State} */\n function start(code) {\n // First we iterate through the open blocks, starting with the root\n // document, and descending through last children down to the last open\n // block.\n // Each block imposes a condition that the line must satisfy if the block is\n // to remain open.\n // For example, a block quote requires a `>` character.\n // A paragraph requires a non-blank line.\n // In this phase we may match all or just some of the open blocks.\n // But we cannot close unmatched blocks yet, because we may have a lazy\n // continuation line.\n if (continued < stack.length) {\n const item = stack[continued];\n self.containerState = item[1];\n return effects.attempt(item[0].continuation, documentContinue, checkNewContainers)(code);\n }\n\n // Done.\n return checkNewContainers(code);\n }\n\n /** @type {State} */\n function documentContinue(code) {\n continued++;\n\n // Note: this field is called `_closeFlow` but it also closes containers.\n // Perhaps a good idea to rename it but it’s already used in the wild by\n // extensions.\n if (self.containerState._closeFlow) {\n self.containerState._closeFlow = undefined;\n if (childFlow) {\n closeFlow();\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when dealing with lazy lines in `writeToChild`.\n const indexBeforeExits = self.events.length;\n let indexBeforeFlow = indexBeforeExits;\n /** @type {Point | undefined} */\n let point;\n\n // Find the flow chunk.\n while (indexBeforeFlow--) {\n if (self.events[indexBeforeFlow][0] === 'exit' && self.events[indexBeforeFlow][1].type === \"chunkFlow\") {\n point = self.events[indexBeforeFlow][1].end;\n break;\n }\n }\n exitContainers(continued);\n\n // Fix positions.\n let index = indexBeforeExits;\n while (index < self.events.length) {\n self.events[index][1].end = {\n ...point\n };\n index++;\n }\n\n // Inject the exits earlier (they’re still also at the end).\n splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));\n\n // Discard the duplicate exits.\n self.events.length = index;\n return checkNewContainers(code);\n }\n return start(code);\n }\n\n /** @type {State} */\n function checkNewContainers(code) {\n // Next, after consuming the continuation markers for existing blocks, we\n // look for new block starts (e.g. `>` for a block quote).\n // If we encounter a new block start, we close any blocks unmatched in\n // step 1 before creating the new block as a child of the last matched\n // block.\n if (continued === stack.length) {\n // No need to `check` whether there’s a container, of `exitContainers`\n // would be moot.\n // We can instead immediately `attempt` to parse one.\n if (!childFlow) {\n return documentContinued(code);\n }\n\n // If we have concrete content, such as block HTML or fenced code,\n // we can’t have containers “pierce” into them, so we can immediately\n // start.\n if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {\n return flowStart(code);\n }\n\n // If we do have flow, it could still be a blank line,\n // but we’d be interrupting it w/ a new container if there’s a current\n // construct.\n // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer\n // needed in micromark-extension-gfm-table@1.0.6).\n self.interrupt = Boolean(childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack);\n }\n\n // Check if there is a new container.\n self.containerState = {};\n return effects.check(containerConstruct, thereIsANewContainer, thereIsNoNewContainer)(code);\n }\n\n /** @type {State} */\n function thereIsANewContainer(code) {\n if (childFlow) closeFlow();\n exitContainers(continued);\n return documentContinued(code);\n }\n\n /** @type {State} */\n function thereIsNoNewContainer(code) {\n self.parser.lazy[self.now().line] = continued !== stack.length;\n lineStartOffset = self.now().offset;\n return flowStart(code);\n }\n\n /** @type {State} */\n function documentContinued(code) {\n // Try new containers.\n self.containerState = {};\n return effects.attempt(containerConstruct, containerContinue, flowStart)(code);\n }\n\n /** @type {State} */\n function containerContinue(code) {\n continued++;\n stack.push([self.currentConstruct, self.containerState]);\n // Try another.\n return documentContinued(code);\n }\n\n /** @type {State} */\n function flowStart(code) {\n if (code === null) {\n if (childFlow) closeFlow();\n exitContainers(0);\n effects.consume(code);\n return;\n }\n childFlow = childFlow || self.parser.flow(self.now());\n effects.enter(\"chunkFlow\", {\n _tokenizer: childFlow,\n contentType: \"flow\",\n previous: childToken\n });\n return flowContinue(code);\n }\n\n /** @type {State} */\n function flowContinue(code) {\n if (code === null) {\n writeToChild(effects.exit(\"chunkFlow\"), true);\n exitContainers(0);\n effects.consume(code);\n return;\n }\n if (markdownLineEnding(code)) {\n effects.consume(code);\n writeToChild(effects.exit(\"chunkFlow\"));\n // Get ready for the next line.\n continued = 0;\n self.interrupt = undefined;\n return start;\n }\n effects.consume(code);\n return flowContinue;\n }\n\n /**\n * @param {Token} token\n * Token.\n * @param {boolean | undefined} [endOfFile]\n * Whether the token is at the end of the file (default: `false`).\n * @returns {undefined}\n * Nothing.\n */\n function writeToChild(token, endOfFile) {\n const stream = self.sliceStream(token);\n if (endOfFile) stream.push(null);\n token.previous = childToken;\n if (childToken) childToken.next = token;\n childToken = token;\n childFlow.defineSkip(token.start);\n childFlow.write(stream);\n\n // Alright, so we just added a lazy line:\n //\n // ```markdown\n // > a\n // b.\n //\n // Or:\n //\n // > ~~~c\n // d\n //\n // Or:\n //\n // > | e |\n // f\n // ```\n //\n // The construct in the second example (fenced code) does not accept lazy\n // lines, so it marked itself as done at the end of its first line, and\n // then the content construct parses `d`.\n // Most constructs in markdown match on the first line: if the first line\n // forms a construct, a non-lazy line can’t “unmake” it.\n //\n // The construct in the third example is potentially a GFM table, and\n // those are *weird*.\n // It *could* be a table, from the first line, if the following line\n // matches a condition.\n // In this case, that second line is lazy, which “unmakes” the first line\n // and turns the whole into one content block.\n //\n // We’ve now parsed the non-lazy and the lazy line, and can figure out\n // whether the lazy line started a new flow block.\n // If it did, we exit the current containers between the two flow blocks.\n if (self.parser.lazy[token.start.line]) {\n let index = childFlow.events.length;\n while (index--) {\n if (\n // The token starts before the line ending…\n childFlow.events[index][1].start.offset < lineStartOffset && (\n // …and either is not ended yet…\n !childFlow.events[index][1].end ||\n // …or ends after it.\n childFlow.events[index][1].end.offset > lineStartOffset)) {\n // Exit: there’s still something open, which means it’s a lazy line\n // part of something.\n return;\n }\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when closing flow in `documentContinue`.\n const indexBeforeExits = self.events.length;\n let indexBeforeFlow = indexBeforeExits;\n /** @type {boolean | undefined} */\n let seen;\n /** @type {Point | undefined} */\n let point;\n\n // Find the previous chunk (the one before the lazy line).\n while (indexBeforeFlow--) {\n if (self.events[indexBeforeFlow][0] === 'exit' && self.events[indexBeforeFlow][1].type === \"chunkFlow\") {\n if (seen) {\n point = self.events[indexBeforeFlow][1].end;\n break;\n }\n seen = true;\n }\n }\n exitContainers(continued);\n\n // Fix positions.\n index = indexBeforeExits;\n while (index < self.events.length) {\n self.events[index][1].end = {\n ...point\n };\n index++;\n }\n\n // Inject the exits earlier (they’re still also at the end).\n splice(self.events, indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));\n\n // Discard the duplicate exits.\n self.events.length = index;\n }\n }\n\n /**\n * @param {number} size\n * Size.\n * @returns {undefined}\n * Nothing.\n */\n function exitContainers(size) {\n let index = stack.length;\n\n // Exit open containers.\n while (index-- > size) {\n const entry = stack[index];\n self.containerState = entry[1];\n entry[0].exit.call(self, effects);\n }\n stack.length = size;\n }\n function closeFlow() {\n childFlow.write([null]);\n childToken = undefined;\n childFlow = undefined;\n self.containerState._closeFlow = undefined;\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n * Tokenizer.\n */\nfunction tokenizeContainer(effects, ok, nok) {\n // Always populated by defaults.\n\n return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), \"linePrefix\", this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4);\n}"],"names":["document","initializeDocument","containerConstruct","tokenizeContainer","effects","self","stack","continued","childFlow","childToken","lineStartOffset","start","code","item","documentContinue","checkNewContainers","closeFlow","indexBeforeExits","indexBeforeFlow","point","exitContainers","index","splice","documentContinued","flowStart","thereIsANewContainer","thereIsNoNewContainer","containerContinue","flowContinue","writeToChild","markdownLineEnding","token","endOfFile","stream","seen","size","entry","ok","nok","factorySpace"],"mappings":";;;AAuBY,MAACA,IAAW;AAAA,EACtB,UAAUC;AACZ,GAGMC,IAAqB;AAAA,EACzB,UAAUC;AACZ;AAQA,SAASF,EAAmBG,GAAS;AACnC,QAAMC,IAAO,MAEPC,IAAQ,CAAA;AACd,MAAIC,IAAY,GAEZC,GAEAC,GAEAC;AACJ,SAA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kB,GAAG,GAAGb,EAAK,OAAO,MAAMY,CAAgB,CAAC,GAG/EZ,EAAK,OAAO,SAASgB;AAAA,IACvB;AAAA,EACF;AAQA,WAASD,EAAee,GAAM;AAC5B,QAAId,IAAQf,EAAM;AAGlB,WAAOe,MAAUc,KAAM;AACrB,YAAMC,IAAQ9B,EAAMe,CAAK;AACzB,MAAAhB,EAAK,iBAAiB+B,EAAM,CAAC,GAC7BA,EAAM,CAAC,EAAE,KAAK,KAAK/B,GAAMD,CAAO;AAAA,IAClC;AACA,IAAAE,EAAM,SAAS6B;AAAA,EACjB;AACA,WAASnB,IAAY;AACnB,IAAAR,EAAU,MAAM,CAAC,IAAI,CAAC,GACtBC,IAAa,QACbD,IAAY,QACZH,EAAK,eAAe,aAAa;AAAA,EACnC;AACF;AAQA,SAASF,EAAkBC,GAASiC,GAAIC,GAAK;AAG3C,SAAOC,EAAanC,GAASA,EAAQ,QAAQ,KAAK,OAAO,WAAW,UAAUiC,GAAIC,CAAG,GAAG,cAAc,KAAK,OAAO,WAAW,QAAQ,KAAK,SAAS,cAAc,IAAI,SAAY,CAAC;AACpL;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"document.es.js","sources":["../../../../../node_modules/micromark/lib/initialize/document.js"],"sourcesContent":["/**\n * @import {\n * Construct,\n * ContainerState,\n * InitialConstruct,\n * Initializer,\n * Point,\n * State,\n * TokenizeContext,\n * Tokenizer,\n * Token\n * } from 'micromark-util-types'\n */\n\n/**\n * @typedef {[Construct, ContainerState]} StackItem\n * Construct and its state.\n */\n\nimport { factorySpace } from 'micromark-factory-space';\nimport { markdownLineEnding } from 'micromark-util-character';\nimport { EditMap } from 'micromark-util-edit-map';\n/** @type {InitialConstruct} */\nexport const document = {\n tokenize: initializeDocument\n};\n\n/** @type {Construct} */\nconst containerConstruct = {\n tokenize: tokenizeContainer\n};\n\n/**\n * @this {TokenizeContext}\n * Self.\n * @type {Initializer}\n * Initializer.\n */\nfunction initializeDocument(effects) {\n const self = this;\n /** @type {Array<StackItem>} */\n const stack = [];\n let continued = 0;\n /** @type {TokenizeContext | undefined} */\n let childFlow;\n /** @type {Token | undefined} */\n let childToken;\n /** @type {number} */\n let lineStartOffset;\n return start;\n\n /** @type {State} */\n function start(code) {\n // First we iterate through the open blocks, starting with the root\n // document, and descending through last children down to the last open\n // block.\n // Each block imposes a condition that the line must satisfy if the block is\n // to remain open.\n // For example, a block quote requires a `>` character.\n // A paragraph requires a non-blank line.\n // In this phase we may match all or just some of the open blocks.\n // But we cannot close unmatched blocks yet, because we may have a lazy\n // continuation line.\n if (continued < stack.length) {\n const item = stack[continued];\n self.containerState = item[1];\n return effects.attempt(item[0].continuation, documentContinue, checkNewContainers)(code);\n }\n\n // Done.\n return checkNewContainers(code);\n }\n\n /** @type {State} */\n function documentContinue(code) {\n continued++;\n\n // Note: this field is called `_closeFlow` but it also closes containers.\n // Perhaps a good idea to rename it but it’s already used in the wild by\n // extensions.\n if (self.containerState._closeFlow) {\n self.containerState._closeFlow = undefined;\n if (childFlow) {\n closeFlow();\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when dealing with lazy lines in `writeToChild`.\n const indexBeforeExits = self.events.length;\n let indexBeforeFlow = indexBeforeExits;\n /** @type {Point | undefined} */\n let point;\n\n // Find the flow chunk.\n while (indexBeforeFlow--) {\n if (self.events[indexBeforeFlow][0] === 'exit' && self.events[indexBeforeFlow][1].type === \"chunkFlow\") {\n point = self.events[indexBeforeFlow][1].end;\n break;\n }\n }\n exitContainers(continued);\n\n // Fix positions.\n let index = indexBeforeExits;\n while (index < self.events.length) {\n self.events[index][1].end = {\n ...point\n };\n index++;\n }\n const editMap = new EditMap();\n // Inject the exits earlier (they’re still also at the end).\n editMap.add(indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));\n // Discard the duplicate exits.\n editMap.add(indexBeforeExits, index - indexBeforeExits, []);\n editMap.consume(self.events);\n return checkNewContainers(code);\n }\n return start(code);\n }\n\n /** @type {State} */\n function checkNewContainers(code) {\n // Next, after consuming the continuation markers for existing blocks, we\n // look for new block starts (e.g. `>` for a block quote).\n // If we encounter a new block start, we close any blocks unmatched in\n // step 1 before creating the new block as a child of the last matched\n // block.\n if (continued === stack.length) {\n // No need to `check` whether there’s a container, of `exitContainers`\n // would be moot.\n // We can instead immediately `attempt` to parse one.\n if (!childFlow) {\n return documentContinued(code);\n }\n\n // If we have concrete content, such as block HTML or fenced code,\n // we can’t have containers “pierce” into them, so we can immediately\n // start.\n if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {\n return flowStart(code);\n }\n\n // If we do have flow, it could still be a blank line,\n // but we’d be interrupting it w/ a new container if there’s a current\n // construct.\n // To do: next major: remove `_gfmTableDynamicInterruptHack` (no longer\n // needed in micromark-extension-gfm-table@1.0.6).\n self.interrupt = Boolean(childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack);\n }\n\n // Check if there is a new container.\n self.containerState = {};\n return effects.check(containerConstruct, thereIsANewContainer, thereIsNoNewContainer)(code);\n }\n\n /** @type {State} */\n function thereIsANewContainer(code) {\n if (childFlow) {\n closeFlow();\n }\n exitContainers(continued);\n return documentContinued(code);\n }\n\n /** @type {State} */\n function thereIsNoNewContainer(code) {\n self.parser.lazy[self.now().line] = continued !== stack.length;\n lineStartOffset = self.now().offset;\n return flowStart(code);\n }\n\n /** @type {State} */\n function documentContinued(code) {\n // Try new containers.\n self.containerState = {};\n return effects.attempt(containerConstruct, containerContinue, flowStart)(code);\n }\n\n /** @type {State} */\n function containerContinue(code) {\n continued++;\n stack.push([self.currentConstruct, self.containerState]);\n // Try another.\n return documentContinued(code);\n }\n\n /** @type {State} */\n function flowStart(code) {\n if (code === null) {\n if (childFlow) {\n closeFlow();\n }\n exitContainers(0);\n effects.consume(code);\n return;\n }\n childFlow = childFlow || self.parser.flow(self.now());\n effects.enter(\"chunkFlow\", {\n _tokenizer: childFlow,\n contentType: \"flow\",\n previous: childToken\n });\n return flowContinue(code);\n }\n\n /** @type {State} */\n function flowContinue(code) {\n if (code === null) {\n writeToChild(effects.exit(\"chunkFlow\"), true);\n exitContainers(0);\n effects.consume(code);\n return;\n }\n if (markdownLineEnding(code)) {\n effects.consume(code);\n writeToChild(effects.exit(\"chunkFlow\"));\n // Get ready for the next line.\n continued = 0;\n self.interrupt = undefined;\n return start;\n }\n effects.consume(code);\n return flowContinue;\n }\n\n /**\n * @param {Token} token\n * Token.\n * @param {boolean | undefined} [endOfFile]\n * Whether the token is at the end of the file (default: `false`).\n * @returns {undefined}\n * Nothing.\n */\n function writeToChild(token, endOfFile) {\n const stream = self.sliceStream(token);\n if (endOfFile) {\n stream.push(null);\n }\n token.previous = childToken;\n if (childToken) {\n childToken.next = token;\n }\n childToken = token;\n childFlow.defineSkip(token.start);\n childFlow.write(stream);\n\n // Alright, so we just added a lazy line:\n //\n // ```markdown\n // > a\n // b.\n //\n // Or:\n //\n // > ~~~c\n // d\n //\n // Or:\n //\n // > | e |\n // f\n // ```\n //\n // The construct in the second example (fenced code) does not accept lazy\n // lines, so it marked itself as done at the end of its first line, and\n // then the content construct parses `d`.\n // Most constructs in markdown match on the first line: if the first line\n // forms a construct, a non-lazy line can’t “unmake” it.\n //\n // The construct in the third example is potentially a GFM table, and\n // those are *weird*.\n // It *could* be a table, from the first line, if the following line\n // matches a condition.\n // In this case, that second line is lazy, which “unmakes” the first line\n // and turns the whole into one content block.\n //\n // We’ve now parsed the non-lazy and the lazy line, and can figure out\n // whether the lazy line started a new flow block.\n // If it did, we exit the current containers between the two flow blocks.\n if (self.parser.lazy[token.start.line]) {\n let index = childFlow.events.length;\n while (index--) {\n if (\n // The token starts before the line ending…\n childFlow.events[index][1].start.offset < lineStartOffset && (\n // …and either is not ended yet…\n !childFlow.events[index][1].end ||\n // …or ends after it.\n childFlow.events[index][1].end.offset > lineStartOffset)) {\n // Exit: there’s still something open, which means it’s a lazy line\n // part of something.\n return;\n }\n }\n\n // Note: this algorithm for moving events around is similar to the\n // algorithm when closing flow in `documentContinue`.\n const indexBeforeExits = self.events.length;\n let indexBeforeFlow = indexBeforeExits;\n /** @type {boolean | undefined} */\n let seen;\n /** @type {Point | undefined} */\n let point;\n\n // Find the previous chunk (the one before the lazy line).\n while (indexBeforeFlow--) {\n if (self.events[indexBeforeFlow][0] === 'exit' && self.events[indexBeforeFlow][1].type === \"chunkFlow\") {\n if (seen) {\n point = self.events[indexBeforeFlow][1].end;\n break;\n }\n seen = true;\n }\n }\n exitContainers(continued);\n\n // Fix positions.\n index = indexBeforeExits;\n while (index < self.events.length) {\n self.events[index][1].end = {\n ...point\n };\n index++;\n }\n const editMap = new EditMap();\n // Inject the exits earlier (they’re still also at the end).\n editMap.add(indexBeforeFlow + 1, 0, self.events.slice(indexBeforeExits));\n // Discard the duplicate exits.\n editMap.add(indexBeforeExits, index - indexBeforeExits, []);\n editMap.consume(self.events);\n }\n }\n\n /**\n * @param {number} size\n * Size.\n * @returns {undefined}\n * Nothing.\n */\n function exitContainers(size) {\n let index = stack.length;\n\n // Exit open containers.\n while (index-- > size) {\n const entry = stack[index];\n self.containerState = entry[1];\n entry[0].exit.call(self, effects);\n }\n stack.length = size;\n }\n function closeFlow() {\n childFlow.write([null]);\n childToken = undefined;\n childFlow = undefined;\n self.containerState._closeFlow = undefined;\n }\n}\n\n/**\n * @this {TokenizeContext}\n * Context.\n * @type {Tokenizer}\n * Tokenizer.\n */\nfunction tokenizeContainer(effects, ok, nok) {\n // Always populated by defaults.\n\n return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), \"linePrefix\", this.parser.constructs.disable.null.includes('codeIndented') ? undefined : 4);\n}"],"names":["document","initializeDocument","containerConstruct","tokenizeContainer","effects","self","stack","continued","childFlow","childToken","lineStartOffset","start","code","item","documentContinue","checkNewContainers","closeFlow","indexBeforeExits","indexBeforeFlow","point","exitContainers","index","editMap","EditMap","documentContinued","flowStart","thereIsANewContainer","thereIsNoNewContainer","containerContinue","flowContinue","writeToChild","markdownLineEnding","token","endOfFile","stream","seen","size","entry","ok","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
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../../micromark-util-edit-map/index.cjs"),m={resolveAll:g()},y=x("string"),b=x("text");function x(i){return{resolveAll:g(i==="text"?k:void 0),tokenize:a};function a(n){const r=this,t=this.parser.constructs[i],l=n.attempt(t,s,u);return s;function s(e){return f(e)?l(e):u(e)}function u(e){if(e===null){n.consume(e);return}return n.enter("data"),n.consume(e),o}function o(e){return f(e)?(n.exit("data"),l(e)):(n.consume(e),o)}function f(e){if(e===null)return!0;const d=t[e];let c=-1;if(d)for(;++c<d.length;){const h=d[c];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function g(i){return a;function a(n,r){let t=-1,l;for(;++t<=n.length;)l===void 0?n[t]&&n[t][1].type==="data"&&(l=t,t++):(!n[t]||n[t][1].type!=="data")&&(t!==l+2&&(n[l][1].end=n[t-1][1].end,n.splice(l+2,t-l-2),t=l+2),l=void 0);return i?i(n,r):n}}function k(i,a){const n=new p.EditMap;let r=0;for(;++r<=i.length;)if((r===i.length||i[r][1].type==="lineEnding")&&i[r-1][1].type==="data"){const t=i[r-1][1],l=a.sliceStream(t);let s=l.length,u=-1,o=0,f;for(;s--;){const e=l[s];if(typeof e=="string"){for(u=e.length;e.charCodeAt(u-1)===32;)o++,u--;if(u)break;u=-1}else if(e===-2)f=!0,o++;else if(e!==-1){s++;break}}if(a._contentTypeTextTrailing&&r===i.length&&(o=0),o){const e={type:r===i.length||f||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?u:t.start._bufferIndex+u,_index:t.start._index+s,line:t.end.line,column:t.end.column-o,offset:t.end.offset-o},end:{...t.end}};t.end={...e.start},t.start.offset===t.end.offset?Object.assign(t,e):n.add(r,0,[["enter",e,a],["exit",e,a]])}r++}return n.consume(i),i}exports.resolver=m;exports.string=y;exports.text=b;
|
|
2
2
|
//# sourceMappingURL=text.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.cjs","sources":["../../../../../node_modules/micromark/lib/initialize/text.js"],"sourcesContent":["/**\n * @import {\n * Code,\n * InitialConstruct,\n * Initializer,\n * Resolver,\n * State,\n * TokenizeContext\n * } from 'micromark-util-types'\n */\n\nexport const resolver = {\n resolveAll: createResolver()\n};\nexport const string = initializeFactory('string');\nexport const text = initializeFactory('text');\n\n/**\n * @param {'string' | 'text'} field\n * Field.\n * @returns {InitialConstruct}\n * Construct.\n */\nfunction initializeFactory(field) {\n return {\n resolveAll: createResolver(field === 'text' ? resolveAllLineSuffixes : undefined),\n tokenize: initializeText\n };\n\n /**\n * @this {TokenizeContext}\n * Context.\n * @type {Initializer}\n */\n function initializeText(effects) {\n const self = this;\n const constructs = this.parser.constructs[field];\n const text = effects.attempt(constructs, start, notText);\n return start;\n\n /** @type {State} */\n function start(code) {\n return atBreak(code) ? text(code) : notText(code);\n }\n\n /** @type {State} */\n function notText(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"data\");\n effects.consume(code);\n return data;\n }\n\n /** @type {State} */\n function data(code) {\n if (atBreak(code)) {\n effects.exit(\"data\");\n return text(code);\n }\n\n // Data.\n effects.consume(code);\n return data;\n }\n\n /**\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether the code is a break.\n */\n function atBreak(code) {\n if (code === null) {\n return true;\n }\n const list = constructs[code];\n let index = -1;\n if (list) {\n // Always populated by defaults.\n\n while (++index < list.length) {\n const item = list[index];\n if (!item.previous || item.previous.call(self, self.previous)) {\n return true;\n }\n }\n }\n return false;\n }\n }\n}\n\n/**\n * @param {Resolver | undefined} [extraResolver]\n * Resolver.\n * @returns {Resolver}\n * Resolver.\n */\nfunction createResolver(extraResolver) {\n return resolveAllText;\n\n /** @type {Resolver} */\n function resolveAllText(events, context) {\n let index = -1;\n /** @type {number | undefined} */\n let enter;\n\n // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n while (++index <= events.length) {\n if (enter === undefined) {\n if (events[index] && events[index][1].type === \"data\") {\n enter = index;\n index++;\n }\n } else if (!events[index] || events[index][1].type !== \"data\") {\n // Don’t do anything if there is one data token.\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end;\n events.splice(enter + 2, index - enter - 2);\n index = enter + 2;\n }\n enter = undefined;\n }\n }\n return extraResolver ? extraResolver(events, context) : events;\n }\n}\n\n/**\n * A rather ugly set of instructions which again looks at chunks in the input\n * stream.\n * The reason to do this here is that it is *much* faster to parse in reverse.\n * And that we can’t hook into `null` to split the line suffix before an EOF.\n * To do: figure out if we can make this into a clean utility, or even in core.\n * As it will be useful for GFMs literal autolink extension (and maybe even\n * tables?)\n *\n * @type {Resolver}\n */\nfunction resolveAllLineSuffixes(events, context) {\n let eventIndex = 0; // Skip first.\n\n while (++eventIndex <= events.length) {\n if ((eventIndex === events.length || events[eventIndex][1].type === \"lineEnding\") && events[eventIndex - 1][1].type === \"data\") {\n const data = events[eventIndex - 1][1];\n const chunks = context.sliceStream(data);\n let index = chunks.length;\n let bufferIndex = -1;\n let size = 0;\n /** @type {boolean | undefined} */\n let tabs;\n while (index--) {\n const chunk = chunks[index];\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length;\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++;\n bufferIndex--;\n }\n if (bufferIndex) break;\n bufferIndex = -1;\n }\n // Number\n else if (chunk === -2) {\n tabs = true;\n size++;\n } else if (chunk === -1) {\n // Empty\n } else {\n // Replacement character, exit.\n index++;\n break;\n }\n }\n\n // Allow final trailing whitespace.\n if (context._contentTypeTextTrailing && eventIndex === events.length) {\n size = 0;\n }\n if (size) {\n const token = {\n type: eventIndex === events.length || tabs || size < 2 ? \"lineSuffix\" : \"hardBreakTrailing\",\n start: {\n _bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex,\n _index: data.start._index + index,\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size\n },\n end: {\n ...data.end\n }\n };\n data.end = {\n ...token.start\n };\n if (data.start.offset === data.end.offset) {\n Object.assign(data, token);\n } else {\n
|
|
1
|
+
{"version":3,"file":"text.cjs","sources":["../../../../../node_modules/micromark/lib/initialize/text.js"],"sourcesContent":["/**\n * @import {\n * Code,\n * InitialConstruct,\n * Initializer,\n * Resolver,\n * State,\n * TokenizeContext\n * } from 'micromark-util-types'\n */\n\nimport { EditMap } from 'micromark-util-edit-map';\nexport const resolver = {\n resolveAll: createResolver()\n};\nexport const string = initializeFactory('string');\nexport const text = initializeFactory('text');\n\n/**\n * @param {'string' | 'text'} field\n * Field.\n * @returns {InitialConstruct}\n * Construct.\n */\nfunction initializeFactory(field) {\n return {\n resolveAll: createResolver(field === 'text' ? resolveAllLineSuffixes : undefined),\n tokenize: initializeText\n };\n\n /**\n * @this {TokenizeContext}\n * Context.\n * @type {Initializer}\n */\n function initializeText(effects) {\n const self = this;\n const constructs = this.parser.constructs[field];\n const text = effects.attempt(constructs, start, notText);\n return start;\n\n /** @type {State} */\n function start(code) {\n return atBreak(code) ? text(code) : notText(code);\n }\n\n /** @type {State} */\n function notText(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"data\");\n effects.consume(code);\n return data;\n }\n\n /** @type {State} */\n function data(code) {\n if (atBreak(code)) {\n effects.exit(\"data\");\n return text(code);\n }\n\n // Data.\n effects.consume(code);\n return data;\n }\n\n /**\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether the code is a break.\n */\n function atBreak(code) {\n if (code === null) {\n return true;\n }\n const list = constructs[code];\n let index = -1;\n if (list) {\n // Always populated by defaults.\n\n while (++index < list.length) {\n const item = list[index];\n if (!item.previous || item.previous.call(self, self.previous)) {\n return true;\n }\n }\n }\n return false;\n }\n }\n}\n\n/**\n * @param {Resolver | undefined} [extraResolver]\n * Resolver.\n * @returns {Resolver}\n * Resolver.\n */\nfunction createResolver(extraResolver) {\n return resolveAllText;\n\n /** @type {Resolver} */\n function resolveAllText(events, context) {\n let index = -1;\n /** @type {number | undefined} */\n let enter;\n\n // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n while (++index <= events.length) {\n if (enter === undefined) {\n if (events[index] && events[index][1].type === \"data\") {\n enter = index;\n index++;\n }\n } else if (!events[index] || events[index][1].type !== \"data\") {\n // Don’t do anything if there is one data token.\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end;\n events.splice(enter + 2, index - enter - 2);\n index = enter + 2;\n }\n enter = undefined;\n }\n }\n return extraResolver ? extraResolver(events, context) : events;\n }\n}\n\n/**\n * A rather ugly set of instructions which again looks at chunks in the input\n * stream.\n * The reason to do this here is that it is *much* faster to parse in reverse.\n * And that we can’t hook into `null` to split the line suffix before an EOF.\n * To do: figure out if we can make this into a clean utility, or even in core.\n * As it will be useful for GFMs literal autolink extension (and maybe even\n * tables?)\n *\n * @type {Resolver}\n */\nfunction resolveAllLineSuffixes(events, context) {\n const editMap = new EditMap();\n let eventIndex = 0; // Skip first.\n\n while (++eventIndex <= events.length) {\n if ((eventIndex === events.length || events[eventIndex][1].type === \"lineEnding\") && events[eventIndex - 1][1].type === \"data\") {\n const data = events[eventIndex - 1][1];\n const chunks = context.sliceStream(data);\n let index = chunks.length;\n let bufferIndex = -1;\n let size = 0;\n /** @type {boolean | undefined} */\n let tabs;\n while (index--) {\n const chunk = chunks[index];\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length;\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++;\n bufferIndex--;\n }\n if (bufferIndex) {\n break;\n }\n bufferIndex = -1;\n }\n // Number\n else if (chunk === -2) {\n tabs = true;\n size++;\n } else if (chunk === -1) {\n // Empty\n } else {\n // Replacement character, exit.\n index++;\n break;\n }\n }\n\n // Allow final trailing whitespace.\n if (context._contentTypeTextTrailing && eventIndex === events.length) {\n size = 0;\n }\n if (size) {\n const token = {\n type: eventIndex === events.length || tabs || size < 2 ? \"lineSuffix\" : \"hardBreakTrailing\",\n start: {\n _bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex,\n _index: data.start._index + index,\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size\n },\n end: {\n ...data.end\n }\n };\n data.end = {\n ...token.start\n };\n if (data.start.offset === data.end.offset) {\n Object.assign(data, token);\n } else {\n editMap.add(eventIndex, 0, [['enter', token, context], ['exit', token, context]]);\n }\n }\n eventIndex++;\n }\n }\n editMap.consume(events);\n return events;\n}"],"names":["resolver","createResolver","string","initializeFactory","text","field","resolveAllLineSuffixes","initializeText","effects","self","constructs","start","notText","code","atBreak","data","list","index","item","extraResolver","resolveAllText","events","context","enter","editMap","EditMap","eventIndex","chunks","bufferIndex","size","tabs","chunk","token"],"mappings":"8IAYaA,EAAW,CACtB,WAAYC,EAAc,CAC5B,EACaC,EAASC,EAAkB,QAAQ,EACnCC,EAAOD,EAAkB,MAAM,EAQ5C,SAASA,EAAkBE,EAAO,CAChC,MAAO,CACL,WAAYJ,EAAeI,IAAU,OAASC,EAAyB,MAAS,EAChF,SAAUC,CACd,EAOE,SAASA,EAAeC,EAAS,CAC/B,MAAMC,EAAO,KACPC,EAAa,KAAK,OAAO,WAAWL,CAAK,EACzCD,EAAOI,EAAQ,QAAQE,EAAYC,EAAOC,CAAO,EACvD,OAAOD,EAGP,SAASA,EAAME,EAAM,CACnB,OAAOC,EAAQD,CAAI,EAAIT,EAAKS,CAAI,EAAID,EAAQC,CAAI,CAClD,CAGA,SAASD,EAAQC,EAAM,CACrB,GAAIA,IAAS,KAAM,CACjBL,EAAQ,QAAQK,CAAI,EACpB,MACF,CACA,OAAAL,EAAQ,MAAM,MAAM,EACpBA,EAAQ,QAAQK,CAAI,EACbE,CACT,CAGA,SAASA,EAAKF,EAAM,CAClB,OAAIC,EAAQD,CAAI,GACdL,EAAQ,KAAK,MAAM,EACZJ,EAAKS,CAAI,IAIlBL,EAAQ,QAAQK,CAAI,EACbE,EACT,CAQA,SAASD,EAAQD,EAAM,CACrB,GAAIA,IAAS,KACX,MAAO,GAET,MAAMG,EAAON,EAAWG,CAAI,EAC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C1B,GAAI,OAAOc,GAAU,SAAU,CAE7B,IADAH,EAAcG,EAAM,OACbA,EAAM,WAAWH,EAAc,CAAC,IAAM,IAC3CC,IACAD,IAEF,GAAIA,EACF,MAEFA,EAAc,EAChB,SAESG,IAAU,GACjBD,EAAO,GACPD,YACSE,IAAU,GAEd,CAELd,IACA,KACF,CACF,CAMA,GAHIK,EAAQ,0BAA4BI,IAAeL,EAAO,SAC5DQ,EAAO,GAELA,EAAM,CACR,MAAMG,EAAQ,CACZ,KAAMN,IAAeL,EAAO,QAAUS,GAAQD,EAAO,EAAI,aAAe,oBACxE,MAAO,CACL,aAAcZ,EAAQW,EAAcb,EAAK,MAAM,aAAea,EAC9D,OAAQb,EAAK,MAAM,OAASE,EAC5B,KAAMF,EAAK,IAAI,KACf,OAAQA,EAAK,IAAI,OAASc,EAC1B,OAAQd,EAAK,IAAI,OAASc,CACtC,EACU,IAAK,CACH,GAAGd,EAAK,GACpB,CACA,EACQA,EAAK,IAAM,CACT,GAAGiB,EAAM,KACnB,EACYjB,EAAK,MAAM,SAAWA,EAAK,IAAI,OACjC,OAAO,OAAOA,EAAMiB,CAAK,EAEzBR,EAAQ,IAAIE,EAAY,EAAG,CAAC,CAAC,QAASM,EAAOV,CAAO,EAAG,CAAC,OAAQU,EAAOV,CAAO,CAAC,CAAC,CAEpF,CACAI,GACF,CAEF,OAAAF,EAAQ,QAAQH,CAAM,EACfA,CACT","x_google_ignoreList":[0]}
|
|
@@ -1,96 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { EditMap as g } from "../../../micromark-util-edit-map/index.es.js";
|
|
2
|
+
const y = {
|
|
3
|
+
resolveAll: p()
|
|
4
|
+
}, b = x("string"), T = x("text");
|
|
5
|
+
function x(i) {
|
|
5
6
|
return {
|
|
6
|
-
resolveAll:
|
|
7
|
+
resolveAll: p(i === "text" ? m : void 0),
|
|
7
8
|
tokenize: o
|
|
8
9
|
};
|
|
9
|
-
function o(
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
function
|
|
13
|
-
return
|
|
10
|
+
function o(n) {
|
|
11
|
+
const r = this, t = this.parser.constructs[i], l = n.attempt(t, f, u);
|
|
12
|
+
return f;
|
|
13
|
+
function f(e) {
|
|
14
|
+
return s(e) ? l(e) : u(e);
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
if (
|
|
17
|
-
|
|
16
|
+
function u(e) {
|
|
17
|
+
if (e === null) {
|
|
18
|
+
n.consume(e);
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
|
-
return
|
|
21
|
+
return n.enter("data"), n.consume(e), a;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
return
|
|
23
|
+
function a(e) {
|
|
24
|
+
return s(e) ? (n.exit("data"), l(e)) : (n.consume(e), a);
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
if (
|
|
26
|
+
function s(e) {
|
|
27
|
+
if (e === null)
|
|
27
28
|
return !0;
|
|
28
|
-
const
|
|
29
|
-
let
|
|
30
|
-
if (
|
|
31
|
-
for (; ++
|
|
32
|
-
const h = c
|
|
33
|
-
if (!h.previous || h.previous.call(
|
|
29
|
+
const d = t[e];
|
|
30
|
+
let c = -1;
|
|
31
|
+
if (d)
|
|
32
|
+
for (; ++c < d.length; ) {
|
|
33
|
+
const h = d[c];
|
|
34
|
+
if (!h.previous || h.previous.call(r, r.previous))
|
|
34
35
|
return !0;
|
|
35
36
|
}
|
|
36
37
|
return !1;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function p(i) {
|
|
41
42
|
return o;
|
|
42
|
-
function o(
|
|
43
|
-
let
|
|
44
|
-
for (; ++
|
|
45
|
-
|
|
46
|
-
return
|
|
43
|
+
function o(n, r) {
|
|
44
|
+
let t = -1, l;
|
|
45
|
+
for (; ++t <= n.length; )
|
|
46
|
+
l === void 0 ? n[t] && n[t][1].type === "data" && (l = t, t++) : (!n[t] || n[t][1].type !== "data") && (t !== l + 2 && (n[l][1].end = n[t - 1][1].end, n.splice(l + 2, t - l - 2), t = l + 2), l = void 0);
|
|
47
|
+
return i ? i(n, r) : n;
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
else if (
|
|
65
|
-
|
|
50
|
+
function m(i, o) {
|
|
51
|
+
const n = new g();
|
|
52
|
+
let r = 0;
|
|
53
|
+
for (; ++r <= i.length; )
|
|
54
|
+
if ((r === i.length || i[r][1].type === "lineEnding") && i[r - 1][1].type === "data") {
|
|
55
|
+
const t = i[r - 1][1], l = o.sliceStream(t);
|
|
56
|
+
let f = l.length, u = -1, a = 0, s;
|
|
57
|
+
for (; f--; ) {
|
|
58
|
+
const e = l[f];
|
|
59
|
+
if (typeof e == "string") {
|
|
60
|
+
for (u = e.length; e.charCodeAt(u - 1) === 32; )
|
|
61
|
+
a++, u--;
|
|
62
|
+
if (u)
|
|
63
|
+
break;
|
|
64
|
+
u = -1;
|
|
65
|
+
} else if (e === -2)
|
|
66
|
+
s = !0, a++;
|
|
67
|
+
else if (e !== -1) {
|
|
68
|
+
f++;
|
|
66
69
|
break;
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
|
-
if (o._contentTypeTextTrailing &&
|
|
70
|
-
const
|
|
71
|
-
type:
|
|
72
|
+
if (o._contentTypeTextTrailing && r === i.length && (a = 0), a) {
|
|
73
|
+
const e = {
|
|
74
|
+
type: r === i.length || s || a < 2 ? "lineSuffix" : "hardBreakTrailing",
|
|
72
75
|
start: {
|
|
73
|
-
_bufferIndex:
|
|
74
|
-
_index:
|
|
75
|
-
line:
|
|
76
|
-
column:
|
|
77
|
-
offset:
|
|
76
|
+
_bufferIndex: f ? u : t.start._bufferIndex + u,
|
|
77
|
+
_index: t.start._index + f,
|
|
78
|
+
line: t.end.line,
|
|
79
|
+
column: t.end.column - a,
|
|
80
|
+
offset: t.end.offset - a
|
|
78
81
|
},
|
|
79
82
|
end: {
|
|
80
|
-
...
|
|
83
|
+
...t.end
|
|
81
84
|
}
|
|
82
85
|
};
|
|
83
|
-
|
|
84
|
-
...
|
|
85
|
-
},
|
|
86
|
+
t.end = {
|
|
87
|
+
...e.start
|
|
88
|
+
}, t.start.offset === t.end.offset ? Object.assign(t, e) : n.add(r, 0, [["enter", e, o], ["exit", e, o]]);
|
|
86
89
|
}
|
|
87
|
-
|
|
90
|
+
r++;
|
|
88
91
|
}
|
|
89
|
-
return
|
|
92
|
+
return n.consume(i), i;
|
|
90
93
|
}
|
|
91
94
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
y as resolver,
|
|
96
|
+
b as string,
|
|
97
|
+
T as text
|
|
95
98
|
};
|
|
96
99
|
//# sourceMappingURL=text.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.es.js","sources":["../../../../../node_modules/micromark/lib/initialize/text.js"],"sourcesContent":["/**\n * @import {\n * Code,\n * InitialConstruct,\n * Initializer,\n * Resolver,\n * State,\n * TokenizeContext\n * } from 'micromark-util-types'\n */\n\nexport const resolver = {\n resolveAll: createResolver()\n};\nexport const string = initializeFactory('string');\nexport const text = initializeFactory('text');\n\n/**\n * @param {'string' | 'text'} field\n * Field.\n * @returns {InitialConstruct}\n * Construct.\n */\nfunction initializeFactory(field) {\n return {\n resolveAll: createResolver(field === 'text' ? resolveAllLineSuffixes : undefined),\n tokenize: initializeText\n };\n\n /**\n * @this {TokenizeContext}\n * Context.\n * @type {Initializer}\n */\n function initializeText(effects) {\n const self = this;\n const constructs = this.parser.constructs[field];\n const text = effects.attempt(constructs, start, notText);\n return start;\n\n /** @type {State} */\n function start(code) {\n return atBreak(code) ? text(code) : notText(code);\n }\n\n /** @type {State} */\n function notText(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"data\");\n effects.consume(code);\n return data;\n }\n\n /** @type {State} */\n function data(code) {\n if (atBreak(code)) {\n effects.exit(\"data\");\n return text(code);\n }\n\n // Data.\n effects.consume(code);\n return data;\n }\n\n /**\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether the code is a break.\n */\n function atBreak(code) {\n if (code === null) {\n return true;\n }\n const list = constructs[code];\n let index = -1;\n if (list) {\n // Always populated by defaults.\n\n while (++index < list.length) {\n const item = list[index];\n if (!item.previous || item.previous.call(self, self.previous)) {\n return true;\n }\n }\n }\n return false;\n }\n }\n}\n\n/**\n * @param {Resolver | undefined} [extraResolver]\n * Resolver.\n * @returns {Resolver}\n * Resolver.\n */\nfunction createResolver(extraResolver) {\n return resolveAllText;\n\n /** @type {Resolver} */\n function resolveAllText(events, context) {\n let index = -1;\n /** @type {number | undefined} */\n let enter;\n\n // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n while (++index <= events.length) {\n if (enter === undefined) {\n if (events[index] && events[index][1].type === \"data\") {\n enter = index;\n index++;\n }\n } else if (!events[index] || events[index][1].type !== \"data\") {\n // Don’t do anything if there is one data token.\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end;\n events.splice(enter + 2, index - enter - 2);\n index = enter + 2;\n }\n enter = undefined;\n }\n }\n return extraResolver ? extraResolver(events, context) : events;\n }\n}\n\n/**\n * A rather ugly set of instructions which again looks at chunks in the input\n * stream.\n * The reason to do this here is that it is *much* faster to parse in reverse.\n * And that we can’t hook into `null` to split the line suffix before an EOF.\n * To do: figure out if we can make this into a clean utility, or even in core.\n * As it will be useful for GFMs literal autolink extension (and maybe even\n * tables?)\n *\n * @type {Resolver}\n */\nfunction resolveAllLineSuffixes(events, context) {\n let eventIndex = 0; // Skip first.\n\n while (++eventIndex <= events.length) {\n if ((eventIndex === events.length || events[eventIndex][1].type === \"lineEnding\") && events[eventIndex - 1][1].type === \"data\") {\n const data = events[eventIndex - 1][1];\n const chunks = context.sliceStream(data);\n let index = chunks.length;\n let bufferIndex = -1;\n let size = 0;\n /** @type {boolean | undefined} */\n let tabs;\n while (index--) {\n const chunk = chunks[index];\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length;\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++;\n bufferIndex--;\n }\n if (bufferIndex) break;\n bufferIndex = -1;\n }\n // Number\n else if (chunk === -2) {\n tabs = true;\n size++;\n } else if (chunk === -1) {\n // Empty\n } else {\n // Replacement character, exit.\n index++;\n break;\n }\n }\n\n // Allow final trailing whitespace.\n if (context._contentTypeTextTrailing && eventIndex === events.length) {\n size = 0;\n }\n if (size) {\n const token = {\n type: eventIndex === events.length || tabs || size < 2 ? \"lineSuffix\" : \"hardBreakTrailing\",\n start: {\n _bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex,\n _index: data.start._index + index,\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size\n },\n end: {\n ...data.end\n }\n };\n data.end = {\n ...token.start\n };\n if (data.start.offset === data.end.offset) {\n Object.assign(data, token);\n } else {\n
|
|
1
|
+
{"version":3,"file":"text.es.js","sources":["../../../../../node_modules/micromark/lib/initialize/text.js"],"sourcesContent":["/**\n * @import {\n * Code,\n * InitialConstruct,\n * Initializer,\n * Resolver,\n * State,\n * TokenizeContext\n * } from 'micromark-util-types'\n */\n\nimport { EditMap } from 'micromark-util-edit-map';\nexport const resolver = {\n resolveAll: createResolver()\n};\nexport const string = initializeFactory('string');\nexport const text = initializeFactory('text');\n\n/**\n * @param {'string' | 'text'} field\n * Field.\n * @returns {InitialConstruct}\n * Construct.\n */\nfunction initializeFactory(field) {\n return {\n resolveAll: createResolver(field === 'text' ? resolveAllLineSuffixes : undefined),\n tokenize: initializeText\n };\n\n /**\n * @this {TokenizeContext}\n * Context.\n * @type {Initializer}\n */\n function initializeText(effects) {\n const self = this;\n const constructs = this.parser.constructs[field];\n const text = effects.attempt(constructs, start, notText);\n return start;\n\n /** @type {State} */\n function start(code) {\n return atBreak(code) ? text(code) : notText(code);\n }\n\n /** @type {State} */\n function notText(code) {\n if (code === null) {\n effects.consume(code);\n return;\n }\n effects.enter(\"data\");\n effects.consume(code);\n return data;\n }\n\n /** @type {State} */\n function data(code) {\n if (atBreak(code)) {\n effects.exit(\"data\");\n return text(code);\n }\n\n // Data.\n effects.consume(code);\n return data;\n }\n\n /**\n * @param {Code} code\n * Code.\n * @returns {boolean}\n * Whether the code is a break.\n */\n function atBreak(code) {\n if (code === null) {\n return true;\n }\n const list = constructs[code];\n let index = -1;\n if (list) {\n // Always populated by defaults.\n\n while (++index < list.length) {\n const item = list[index];\n if (!item.previous || item.previous.call(self, self.previous)) {\n return true;\n }\n }\n }\n return false;\n }\n }\n}\n\n/**\n * @param {Resolver | undefined} [extraResolver]\n * Resolver.\n * @returns {Resolver}\n * Resolver.\n */\nfunction createResolver(extraResolver) {\n return resolveAllText;\n\n /** @type {Resolver} */\n function resolveAllText(events, context) {\n let index = -1;\n /** @type {number | undefined} */\n let enter;\n\n // A rather boring computation (to merge adjacent `data` events) which\n // improves mm performance by 29%.\n while (++index <= events.length) {\n if (enter === undefined) {\n if (events[index] && events[index][1].type === \"data\") {\n enter = index;\n index++;\n }\n } else if (!events[index] || events[index][1].type !== \"data\") {\n // Don’t do anything if there is one data token.\n if (index !== enter + 2) {\n events[enter][1].end = events[index - 1][1].end;\n events.splice(enter + 2, index - enter - 2);\n index = enter + 2;\n }\n enter = undefined;\n }\n }\n return extraResolver ? extraResolver(events, context) : events;\n }\n}\n\n/**\n * A rather ugly set of instructions which again looks at chunks in the input\n * stream.\n * The reason to do this here is that it is *much* faster to parse in reverse.\n * And that we can’t hook into `null` to split the line suffix before an EOF.\n * To do: figure out if we can make this into a clean utility, or even in core.\n * As it will be useful for GFMs literal autolink extension (and maybe even\n * tables?)\n *\n * @type {Resolver}\n */\nfunction resolveAllLineSuffixes(events, context) {\n const editMap = new EditMap();\n let eventIndex = 0; // Skip first.\n\n while (++eventIndex <= events.length) {\n if ((eventIndex === events.length || events[eventIndex][1].type === \"lineEnding\") && events[eventIndex - 1][1].type === \"data\") {\n const data = events[eventIndex - 1][1];\n const chunks = context.sliceStream(data);\n let index = chunks.length;\n let bufferIndex = -1;\n let size = 0;\n /** @type {boolean | undefined} */\n let tabs;\n while (index--) {\n const chunk = chunks[index];\n if (typeof chunk === 'string') {\n bufferIndex = chunk.length;\n while (chunk.charCodeAt(bufferIndex - 1) === 32) {\n size++;\n bufferIndex--;\n }\n if (bufferIndex) {\n break;\n }\n bufferIndex = -1;\n }\n // Number\n else if (chunk === -2) {\n tabs = true;\n size++;\n } else if (chunk === -1) {\n // Empty\n } else {\n // Replacement character, exit.\n index++;\n break;\n }\n }\n\n // Allow final trailing whitespace.\n if (context._contentTypeTextTrailing && eventIndex === events.length) {\n size = 0;\n }\n if (size) {\n const token = {\n type: eventIndex === events.length || tabs || size < 2 ? \"lineSuffix\" : \"hardBreakTrailing\",\n start: {\n _bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex,\n _index: data.start._index + index,\n line: data.end.line,\n column: data.end.column - size,\n offset: data.end.offset - size\n },\n end: {\n ...data.end\n }\n };\n data.end = {\n ...token.start\n };\n if (data.start.offset === data.end.offset) {\n Object.assign(data, token);\n } else {\n editMap.add(eventIndex, 0, [['enter', token, context], ['exit', token, context]]);\n }\n }\n eventIndex++;\n }\n }\n editMap.consume(events);\n return events;\n}"],"names":["resolver","createResolver","string","initializeFactory","text","field","resolveAllLineSuffixes","initializeText","effects","self","constructs","start","notText","code","atBreak","data","list","index","item","extraResolver","resolveAllText","events","context","enter","editMap","EditMap","eventIndex","chunks","bufferIndex","size","tabs","chunk","token"],"mappings":";AAYY,MAACA,IAAW;AAAA,EACtB,YAAYC,EAAc;AAC5B,GACaC,IAASC,EAAkB,QAAQ,GACnCC,IAAOD,EAAkB,MAAM;AAQ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eAAe;AAAA,UACxE,OAAO;AAAA,YACL,cAAcZ,IAAQW,IAAcb,EAAK,MAAM,eAAea;AAAA,YAC9D,QAAQb,EAAK,MAAM,SAASE;AAAA,YAC5B,MAAMF,EAAK,IAAI;AAAA,YACf,QAAQA,EAAK,IAAI,SAASc;AAAA,YAC1B,QAAQd,EAAK,IAAI,SAASc;AAAA,UACtC;AAAA,UACU,KAAK;AAAA,YACH,GAAGd,EAAK;AAAA,UACpB;AAAA,QACA;AACQ,QAAAA,EAAK,MAAM;AAAA,UACT,GAAGiB,EAAM;AAAA,QACnB,GACYjB,EAAK,MAAM,WAAWA,EAAK,IAAI,SACjC,OAAO,OAAOA,GAAMiB,CAAK,IAEzBR,EAAQ,IAAIE,GAAY,GAAG,CAAC,CAAC,SAASM,GAAOV,CAAO,GAAG,CAAC,QAAQU,GAAOV,CAAO,CAAC,CAAC;AAAA,MAEpF;AACA,MAAAI;AAAA,IACF;AAEF,SAAAF,EAAQ,QAAQH,CAAM,GACfA;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=/[\0\t\n\r]/g;function g(){let s=1,c="",d=!0,i;return u;function u(e,p,a){e=c+(typeof e=="string"?e.toString():new TextDecoder(p||void 0).decode(e));const t=[];let n=0;for(c="",d&&(e.charCodeAt(0)===65279&&n++,d=void 0);n<e.length;){h.lastIndex=n;const o=h.exec(e),r=o&&o.index!==void 0?o.index:e.length,f=e.charCodeAt(r);if(!o){c=e.slice(n);break}if(f===10&&n===r&&i)t.push(-3),i=void 0;else switch(i&&(t.push(-5),i=void 0),n<r&&(t.push(e.slice(n,r)),s+=r-n),f){case 0:{t.push(65533),s++;break}case 9:{const l=Math.ceil(s/4)*4;for(t.push(-2);s++<l;)t.push(-1);break}case 10:{t.push(-4),s=1;break}default:i=!0,s=1}n=r+1}return a&&(i&&t.push(-5),c&&t.push(c),t.push(null)),t}}exports.preprocess=g;
|
|
2
2
|
//# sourceMappingURL=preprocess.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocess.cjs","sources":["../../../../node_modules/micromark/lib/preprocess.js"],"sourcesContent":["/**\n * @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'\n */\n\n/**\n * @callback Preprocessor\n * Preprocess a value.\n * @param {Value} value\n * Value.\n * @param {Encoding | null | undefined} [encoding]\n * Encoding when `value` is a typed array (optional).\n * @param {boolean | null | undefined} [end=false]\n * Whether this is the last chunk (default: `false`).\n * @returns {Array<Chunk>}\n * Chunks.\n */\n\nconst search = /[\\0\\t\\n\\r]/g;\n\n/**\n * @returns {Preprocessor}\n * Preprocess a value.\n */\nexport function preprocess() {\n let column = 1;\n let buffer = '';\n /** @type {boolean | undefined} */\n let start = true;\n /** @type {boolean | undefined} */\n let atCarriageReturn;\n return preprocessor;\n\n /** @type {Preprocessor} */\n // eslint-disable-next-line complexity\n function preprocessor(value, encoding, end) {\n
|
|
1
|
+
{"version":3,"file":"preprocess.cjs","sources":["../../../../node_modules/micromark/lib/preprocess.js"],"sourcesContent":["/**\n * @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'\n */\n\n/**\n * @callback Preprocessor\n * Preprocess a value.\n * @param {Value} value\n * Value.\n * @param {Encoding | null | undefined} [encoding]\n * Encoding when `value` is a typed array (optional).\n * @param {boolean | null | undefined} [end=false]\n * Whether this is the last chunk (default: `false`).\n * @returns {Array<Chunk>}\n * Chunks.\n */\n\nconst search = /[\\0\\t\\n\\r]/g;\n\n/**\n * @returns {Preprocessor}\n * Preprocess a value.\n */\nexport function preprocess() {\n let column = 1;\n let buffer = '';\n /** @type {boolean | undefined} */\n let start = true;\n /** @type {boolean | undefined} */\n let atCarriageReturn;\n return preprocessor;\n\n /** @type {Preprocessor} */\n // eslint-disable-next-line complexity\n function preprocessor(value, encoding, end) {\n value = buffer + (typeof value === 'string' ? value.toString() : new TextDecoder(encoding || undefined).decode(value));\n\n /** @type {Array<Chunk>} */\n const chunks = [];\n let startPosition = 0;\n buffer = '';\n if (start) {\n // To do: `markdown-rs` actually parses BOMs (byte order mark).\n if (value.charCodeAt(0) === 65279) {\n startPosition++;\n }\n start = undefined;\n }\n while (startPosition < value.length) {\n search.lastIndex = startPosition;\n const match = search.exec(value);\n const endPosition = match && match.index !== undefined ? match.index : value.length;\n const code = value.charCodeAt(endPosition);\n if (!match) {\n buffer = value.slice(startPosition);\n break;\n }\n if (code === 10 && startPosition === endPosition && atCarriageReturn) {\n chunks.push(-3);\n atCarriageReturn = undefined;\n } else {\n if (atCarriageReturn) {\n chunks.push(-5);\n atCarriageReturn = undefined;\n }\n if (startPosition < endPosition) {\n chunks.push(value.slice(startPosition, endPosition));\n column += endPosition - startPosition;\n }\n switch (code) {\n case 0:\n {\n chunks.push(65533);\n column++;\n break;\n }\n case 9:\n {\n const next = Math.ceil(column / 4) * 4;\n chunks.push(-2);\n while (column++ < next) {\n chunks.push(-1);\n }\n break;\n }\n case 10:\n {\n chunks.push(-4);\n column = 1;\n break;\n }\n default:\n {\n atCarriageReturn = true;\n column = 1;\n }\n }\n }\n startPosition = endPosition + 1;\n }\n if (end) {\n if (atCarriageReturn) {\n chunks.push(-5);\n }\n if (buffer) {\n chunks.push(buffer);\n }\n chunks.push(null);\n }\n return chunks;\n }\n}"],"names":["search","preprocess","column","buffer","start","atCarriageReturn","preprocessor","value","encoding","end","chunks","startPosition","match","endPosition","code","next"],"mappings":"gFAiBA,MAAMA,EAAS,cAMR,SAASC,GAAa,CAC3B,IAAIC,EAAS,EACTC,EAAS,GAETC,EAAQ,GAERC,EACJ,OAAOC,EAIP,SAASA,EAAaC,EAAOC,EAAUC,EAAK,CAC1CF,EAAQJ,GAAU,OAAOI,GAAU,SAAWA,EAAM,SAAQ,EAAK,IAAI,YAAYC,GAAY,MAAS,EAAE,OAAOD,CAAK,GAGpH,MA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