@multiplatform.one/markdown 6.4.0 → 6.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +15 -9
- package/dist/cjs/Aside/index.cjs +0 -117
- package/dist/cjs/Aside/index.native.js +0 -126
- package/dist/cjs/Aside/index.native.js.map +0 -1
- package/dist/cjs/ExternalIcon/index.cjs +0 -48
- package/dist/cjs/ExternalIcon/index.native.js +0 -53
- package/dist/cjs/ExternalIcon/index.native.js.map +0 -1
- package/dist/cjs/Hr/index.cjs +0 -33
- package/dist/cjs/Hr/index.native.js +0 -38
- package/dist/cjs/Hr/index.native.js.map +0 -1
- package/dist/cjs/Li/index.cjs +0 -38
- package/dist/cjs/Li/index.native.js +0 -41
- package/dist/cjs/Li/index.native.js.map +0 -1
- package/dist/cjs/Markdown.cjs +0 -66
- package/dist/cjs/Markdown.native.js +0 -71
- package/dist/cjs/Markdown.native.js.map +0 -1
- package/dist/cjs/MarkdownSimpleTable/index.cjs +0 -150
- package/dist/cjs/MarkdownSimpleTable/index.native.js +0 -183
- package/dist/cjs/MarkdownSimpleTable/index.native.js.map +0 -1
- package/dist/cjs/Mdx/index.cjs +0 -66
- package/dist/cjs/Mdx/index.native.js +0 -70
- package/dist/cjs/Mdx/index.native.js.map +0 -1
- package/dist/cjs/MdxCodeBlock/index.cjs +0 -193
- package/dist/cjs/MdxCodeBlock/index.native.js +0 -216
- package/dist/cjs/MdxCodeBlock/index.native.js.map +0 -1
- package/dist/cjs/MdxCodeBlock/mdxCodeBlockContext.cjs +0 -29
- package/dist/cjs/MdxCodeBlock/mdxCodeBlockContext.native.js +0 -32
- package/dist/cjs/MdxCodeBlock/mdxCodeBlockContext.native.js.map +0 -1
- package/dist/cjs/Notice/index.cjs +0 -51
- package/dist/cjs/Notice/index.native.js +0 -55
- package/dist/cjs/Notice/index.native.js.map +0 -1
- package/dist/cjs/Table/index.cjs +0 -134
- package/dist/cjs/Table/index.native.js +0 -145
- package/dist/cjs/Table/index.native.js.map +0 -1
- package/dist/cjs/Tabs/index.cjs +0 -61
- package/dist/cjs/Tabs/index.native.js +0 -71
- package/dist/cjs/Tabs/index.native.js.map +0 -1
- package/dist/cjs/Ul/index.cjs +0 -35
- package/dist/cjs/Ul/index.native.js +0 -38
- package/dist/cjs/Ul/index.native.js.map +0 -1
- package/dist/cjs/Video/index.cjs +0 -86
- package/dist/cjs/Video/index.native.js +0 -91
- package/dist/cjs/Video/index.native.js.map +0 -1
- package/dist/cjs/components/Blockquote.cjs +0 -60
- package/dist/cjs/components/Blockquote.native.js +0 -73
- package/dist/cjs/components/Blockquote.native.js.map +0 -1
- package/dist/cjs/components/Break.cjs +0 -35
- package/dist/cjs/components/Break.native.js +0 -38
- package/dist/cjs/components/Break.native.js.map +0 -1
- package/dist/cjs/components/CodeBlock.cjs +0 -69
- package/dist/cjs/components/CodeBlock.native.js +0 -77
- package/dist/cjs/components/CodeBlock.native.js.map +0 -1
- package/dist/cjs/components/Heading.cjs +0 -71
- package/dist/cjs/components/Heading.native.js +0 -76
- package/dist/cjs/components/Heading.native.js.map +0 -1
- package/dist/cjs/components/HorizontalRule.cjs +0 -34
- package/dist/cjs/components/HorizontalRule.native.js +0 -37
- package/dist/cjs/components/HorizontalRule.native.js.map +0 -1
- package/dist/cjs/components/Image.cjs +0 -51
- package/dist/cjs/components/Image.native.js +0 -58
- package/dist/cjs/components/Image.native.js.map +0 -1
- package/dist/cjs/components/InlineCode.cjs +0 -45
- package/dist/cjs/components/InlineCode.native.js +0 -49
- package/dist/cjs/components/InlineCode.native.js.map +0 -1
- package/dist/cjs/components/InlineStyles.cjs +0 -58
- package/dist/cjs/components/InlineStyles.native.js +0 -64
- package/dist/cjs/components/InlineStyles.native.js.map +0 -1
- package/dist/cjs/components/Link.cjs +0 -71
- package/dist/cjs/components/Link.native.js +0 -76
- package/dist/cjs/components/Link.native.js.map +0 -1
- package/dist/cjs/components/List.cjs +0 -152
- package/dist/cjs/components/List.native.js +0 -161
- package/dist/cjs/components/List.native.js.map +0 -1
- package/dist/cjs/components/Paragraph.cjs +0 -43
- package/dist/cjs/components/Paragraph.native.js +0 -47
- package/dist/cjs/components/Paragraph.native.js.map +0 -1
- package/dist/cjs/components/Table.cjs +0 -119
- package/dist/cjs/components/Table.native.js +0 -134
- package/dist/cjs/components/Table.native.js.map +0 -1
- package/dist/cjs/components/index.cjs +0 -55
- package/dist/cjs/components/index.native.js +0 -58
- package/dist/cjs/components/index.native.js.map +0 -1
- package/dist/cjs/hooks/index.cjs +0 -22
- package/dist/cjs/hooks/index.native.js +0 -25
- package/dist/cjs/hooks/index.native.js.map +0 -1
- package/dist/cjs/hooks/useCompileAndEvaluateMdx.cjs +0 -42
- package/dist/cjs/hooks/useCompileAndEvaluateMdx.native.js +0 -45
- package/dist/cjs/hooks/useCompileAndEvaluateMdx.native.js.map +0 -1
- package/dist/cjs/hooks/useCompileMdx.cjs +0 -113
- package/dist/cjs/hooks/useCompileMdx.native.js +0 -135
- package/dist/cjs/hooks/useCompileMdx.native.js.map +0 -1
- package/dist/cjs/hooks/useEvaluateMdx.cjs +0 -64
- package/dist/cjs/hooks/useEvaluateMdx.native.js +0 -69
- package/dist/cjs/hooks/useEvaluateMdx.native.js.map +0 -1
- package/dist/cjs/icons/index.cjs +0 -135
- package/dist/cjs/icons/index.native.js +0 -146
- package/dist/cjs/icons/index.native.js.map +0 -1
- package/dist/cjs/index.cjs +0 -53
- package/dist/cjs/index.native.js +0 -56
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/cjs/mdxComponents.cjs +0 -324
- package/dist/cjs/mdxComponents.native.js +0 -386
- package/dist/cjs/mdxComponents.native.js.map +0 -1
- package/dist/cjs/mermaid/MermaidBlock.cjs +0 -110
- package/dist/cjs/mermaid/MermaidBlock.native.js +0 -41
- package/dist/cjs/mermaid/MermaidBlock.native.js.map +0 -1
- package/dist/cjs/mermaid/index.cjs +0 -31
- package/dist/cjs/mermaid/index.native.js +0 -34
- package/dist/cjs/mermaid/index.native.js.map +0 -1
- package/dist/cjs/mermaid/mountDiagramSvg.cjs +0 -54
- package/dist/cjs/mermaid/mountDiagramSvg.native.js +0 -98
- package/dist/cjs/mermaid/mountDiagramSvg.native.js.map +0 -1
- package/dist/cjs/mermaid/renderMermaidDiagram.cjs +0 -92
- package/dist/cjs/mermaid/renderMermaidDiagram.native.js +0 -110
- package/dist/cjs/mermaid/renderMermaidDiagram.native.js.map +0 -1
- package/dist/cjs/parser.cjs +0 -49
- package/dist/cjs/parser.native.js +0 -52
- package/dist/cjs/parser.native.js.map +0 -1
- package/dist/cjs/renderer.cjs +0 -334
- package/dist/cjs/renderer.native.js +0 -356
- package/dist/cjs/renderer.native.js.map +0 -1
- package/dist/cjs/shared/colorRamps.cjs +0 -64
- package/dist/cjs/shared/colorRamps.native.js +0 -67
- package/dist/cjs/shared/colorRamps.native.js.map +0 -1
- package/dist/cjs/shared/cutoffGradient.cjs +0 -54
- package/dist/cjs/shared/cutoffGradient.native.js +0 -63
- package/dist/cjs/shared/cutoffGradient.native.js.map +0 -1
- package/dist/cjs/shared/index.cjs +0 -20
- package/dist/cjs/shared/index.native.js +0 -23
- package/dist/cjs/shared/index.native.js.map +0 -1
- package/dist/cjs/shiki/index.cjs +0 -18
- package/dist/cjs/shiki/index.native.js +0 -21
- package/dist/cjs/shiki/index.native.js.map +0 -1
- package/dist/cjs/types.cjs +0 -18
- package/dist/cjs/types.native.js +0 -21
- package/dist/cjs/types.native.js.map +0 -1
- package/dist/cjs/util/rehypeMetaAttributes.cjs +0 -45
- package/dist/cjs/util/rehypeMetaAttributes.native.js +0 -49
- package/dist/cjs/util/rehypeMetaAttributes.native.js.map +0 -1
- package/dist/esm/Aside/index.mjs +0 -91
- package/dist/esm/Aside/index.mjs.map +0 -1
- package/dist/esm/Aside/index.native.js +0 -97
- package/dist/esm/Aside/index.native.js.map +0 -1
- package/dist/esm/ExternalIcon/index.mjs +0 -23
- package/dist/esm/ExternalIcon/index.mjs.map +0 -1
- package/dist/esm/ExternalIcon/index.native.js +0 -25
- package/dist/esm/ExternalIcon/index.native.js.map +0 -1
- package/dist/esm/Hr/index.mjs +0 -8
- package/dist/esm/Hr/index.mjs.map +0 -1
- package/dist/esm/Hr/index.native.js +0 -10
- package/dist/esm/Hr/index.native.js.map +0 -1
- package/dist/esm/Li/index.mjs +0 -13
- package/dist/esm/Li/index.mjs.map +0 -1
- package/dist/esm/Li/index.native.js +0 -13
- package/dist/esm/Li/index.native.js.map +0 -1
- package/dist/esm/Markdown.mjs +0 -41
- package/dist/esm/Markdown.mjs.map +0 -1
- package/dist/esm/Markdown.native.js +0 -43
- package/dist/esm/Markdown.native.js.map +0 -1
- package/dist/esm/MarkdownSimpleTable/index.mjs +0 -125
- package/dist/esm/MarkdownSimpleTable/index.mjs.map +0 -1
- package/dist/esm/MarkdownSimpleTable/index.native.js +0 -155
- package/dist/esm/MarkdownSimpleTable/index.native.js.map +0 -1
- package/dist/esm/Mdx/index.mjs +0 -41
- package/dist/esm/Mdx/index.mjs.map +0 -1
- package/dist/esm/Mdx/index.native.js +0 -42
- package/dist/esm/Mdx/index.native.js.map +0 -1
- package/dist/esm/MdxCodeBlock/index.mjs +0 -157
- package/dist/esm/MdxCodeBlock/index.mjs.map +0 -1
- package/dist/esm/MdxCodeBlock/index.native.js +0 -177
- package/dist/esm/MdxCodeBlock/index.native.js.map +0 -1
- package/dist/esm/MdxCodeBlock/mdxCodeBlockContext.mjs +0 -4
- package/dist/esm/MdxCodeBlock/mdxCodeBlockContext.mjs.map +0 -1
- package/dist/esm/MdxCodeBlock/mdxCodeBlockContext.native.js +0 -4
- package/dist/esm/MdxCodeBlock/mdxCodeBlockContext.native.js.map +0 -1
- package/dist/esm/Notice/index.mjs +0 -26
- package/dist/esm/Notice/index.mjs.map +0 -1
- package/dist/esm/Notice/index.native.js +0 -27
- package/dist/esm/Notice/index.native.js.map +0 -1
- package/dist/esm/Table/index.mjs +0 -104
- package/dist/esm/Table/index.mjs.map +0 -1
- package/dist/esm/Table/index.native.js +0 -112
- package/dist/esm/Table/index.native.js.map +0 -1
- package/dist/esm/Tabs/index.mjs +0 -35
- package/dist/esm/Tabs/index.mjs.map +0 -1
- package/dist/esm/Tabs/index.native.js +0 -42
- package/dist/esm/Tabs/index.native.js.map +0 -1
- package/dist/esm/Ul/index.mjs +0 -10
- package/dist/esm/Ul/index.mjs.map +0 -1
- package/dist/esm/Ul/index.native.js +0 -10
- package/dist/esm/Ul/index.native.js.map +0 -1
- package/dist/esm/Video/index.mjs +0 -61
- package/dist/esm/Video/index.mjs.map +0 -1
- package/dist/esm/Video/index.native.js +0 -63
- package/dist/esm/Video/index.native.js.map +0 -1
- package/dist/esm/components/Blockquote.mjs +0 -35
- package/dist/esm/components/Blockquote.mjs.map +0 -1
- package/dist/esm/components/Blockquote.native.js +0 -45
- package/dist/esm/components/Blockquote.native.js.map +0 -1
- package/dist/esm/components/Break.mjs +0 -10
- package/dist/esm/components/Break.mjs.map +0 -1
- package/dist/esm/components/Break.native.js +0 -10
- package/dist/esm/components/Break.native.js.map +0 -1
- package/dist/esm/components/CodeBlock.mjs +0 -44
- package/dist/esm/components/CodeBlock.mjs.map +0 -1
- package/dist/esm/components/CodeBlock.native.js +0 -49
- package/dist/esm/components/CodeBlock.native.js.map +0 -1
- package/dist/esm/components/Heading.mjs +0 -46
- package/dist/esm/components/Heading.mjs.map +0 -1
- package/dist/esm/components/Heading.native.js +0 -48
- package/dist/esm/components/Heading.native.js.map +0 -1
- package/dist/esm/components/HorizontalRule.mjs +0 -9
- package/dist/esm/components/HorizontalRule.mjs.map +0 -1
- package/dist/esm/components/HorizontalRule.native.js +0 -9
- package/dist/esm/components/HorizontalRule.native.js.map +0 -1
- package/dist/esm/components/Image.mjs +0 -26
- package/dist/esm/components/Image.mjs.map +0 -1
- package/dist/esm/components/Image.native.js +0 -30
- package/dist/esm/components/Image.native.js.map +0 -1
- package/dist/esm/components/InlineCode.mjs +0 -20
- package/dist/esm/components/InlineCode.mjs.map +0 -1
- package/dist/esm/components/InlineCode.native.js +0 -21
- package/dist/esm/components/InlineCode.native.js.map +0 -1
- package/dist/esm/components/InlineStyles.mjs +0 -31
- package/dist/esm/components/InlineStyles.mjs.map +0 -1
- package/dist/esm/components/InlineStyles.native.js +0 -34
- package/dist/esm/components/InlineStyles.native.js.map +0 -1
- package/dist/esm/components/Link.mjs +0 -46
- package/dist/esm/components/Link.mjs.map +0 -1
- package/dist/esm/components/Link.native.js +0 -48
- package/dist/esm/components/Link.native.js.map +0 -1
- package/dist/esm/components/List.mjs +0 -126
- package/dist/esm/components/List.mjs.map +0 -1
- package/dist/esm/components/List.native.js +0 -132
- package/dist/esm/components/List.native.js.map +0 -1
- package/dist/esm/components/Paragraph.mjs +0 -18
- package/dist/esm/components/Paragraph.mjs.map +0 -1
- package/dist/esm/components/Paragraph.native.js +0 -19
- package/dist/esm/components/Paragraph.native.js.map +0 -1
- package/dist/esm/components/Table.mjs +0 -92
- package/dist/esm/components/Table.mjs.map +0 -1
- package/dist/esm/components/Table.native.js +0 -104
- package/dist/esm/components/Table.native.js.map +0 -1
- package/dist/esm/components/index.mjs +0 -14
- package/dist/esm/components/index.mjs.map +0 -1
- package/dist/esm/components/index.native.js +0 -14
- package/dist/esm/components/index.native.js.map +0 -1
- package/dist/esm/hooks/index.mjs +0 -4
- package/dist/esm/hooks/index.mjs.map +0 -1
- package/dist/esm/hooks/index.native.js +0 -4
- package/dist/esm/hooks/index.native.js.map +0 -1
- package/dist/esm/hooks/useCompileAndEvaluateMdx.mjs +0 -17
- package/dist/esm/hooks/useCompileAndEvaluateMdx.mjs.map +0 -1
- package/dist/esm/hooks/useCompileAndEvaluateMdx.native.js +0 -17
- package/dist/esm/hooks/useCompileAndEvaluateMdx.native.js.map +0 -1
- package/dist/esm/hooks/useCompileMdx.mjs +0 -76
- package/dist/esm/hooks/useCompileMdx.mjs.map +0 -1
- package/dist/esm/hooks/useCompileMdx.native.js +0 -95
- package/dist/esm/hooks/useCompileMdx.native.js.map +0 -1
- package/dist/esm/hooks/useEvaluateMdx.mjs +0 -28
- package/dist/esm/hooks/useEvaluateMdx.mjs.map +0 -1
- package/dist/esm/hooks/useEvaluateMdx.native.js +0 -30
- package/dist/esm/hooks/useEvaluateMdx.native.js.map +0 -1
- package/dist/esm/icons/index.mjs +0 -107
- package/dist/esm/icons/index.mjs.map +0 -1
- package/dist/esm/icons/index.native.js +0 -115
- package/dist/esm/icons/index.native.js.map +0 -1
- package/dist/esm/index.mjs +0 -23
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js +0 -23
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/mdxComponents.mjs +0 -298
- package/dist/esm/mdxComponents.mjs.map +0 -1
- package/dist/esm/mdxComponents.native.js +0 -357
- package/dist/esm/mdxComponents.native.js.map +0 -1
- package/dist/esm/mermaid/MermaidBlock.mjs +0 -85
- package/dist/esm/mermaid/MermaidBlock.mjs.map +0 -1
- package/dist/esm/mermaid/MermaidBlock.native.js +0 -13
- package/dist/esm/mermaid/MermaidBlock.native.js.map +0 -1
- package/dist/esm/mermaid/index.mjs +0 -4
- package/dist/esm/mermaid/index.mjs.map +0 -1
- package/dist/esm/mermaid/index.native.js +0 -4
- package/dist/esm/mermaid/index.native.js.map +0 -1
- package/dist/esm/mermaid/mountDiagramSvg.mjs +0 -29
- package/dist/esm/mermaid/mountDiagramSvg.mjs.map +0 -1
- package/dist/esm/mermaid/mountDiagramSvg.native.js +0 -70
- package/dist/esm/mermaid/mountDiagramSvg.native.js.map +0 -1
- package/dist/esm/mermaid/renderMermaidDiagram.mjs +0 -55
- package/dist/esm/mermaid/renderMermaidDiagram.mjs.map +0 -1
- package/dist/esm/mermaid/renderMermaidDiagram.native.js +0 -70
- package/dist/esm/mermaid/renderMermaidDiagram.native.js.map +0 -1
- package/dist/esm/parser.mjs +0 -12
- package/dist/esm/parser.mjs.map +0 -1
- package/dist/esm/parser.native.js +0 -12
- package/dist/esm/parser.native.js.map +0 -1
- package/dist/esm/renderer.mjs +0 -308
- package/dist/esm/renderer.mjs.map +0 -1
- package/dist/esm/renderer.native.js +0 -327
- package/dist/esm/renderer.native.js.map +0 -1
- package/dist/esm/shared/colorRamps.mjs +0 -36
- package/dist/esm/shared/colorRamps.mjs.map +0 -1
- package/dist/esm/shared/colorRamps.native.js +0 -36
- package/dist/esm/shared/colorRamps.native.js.map +0 -1
- package/dist/esm/shared/cutoffGradient.mjs +0 -28
- package/dist/esm/shared/cutoffGradient.mjs.map +0 -1
- package/dist/esm/shared/cutoffGradient.native.js +0 -34
- package/dist/esm/shared/cutoffGradient.native.js.map +0 -1
- package/dist/esm/shared/index.mjs +0 -2
- package/dist/esm/shared/index.mjs.map +0 -1
- package/dist/esm/shared/index.native.js +0 -2
- package/dist/esm/shared/index.native.js.map +0 -1
- package/dist/esm/shiki/index.mjs +0 -2
- package/dist/esm/shiki/index.mjs.map +0 -1
- package/dist/esm/shiki/index.native.js +0 -2
- package/dist/esm/shiki/index.native.js.map +0 -1
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/types.native.js +0 -2
- package/dist/esm/types.native.js.map +0 -1
- package/dist/esm/util/rehypeMetaAttributes.mjs +0 -20
- package/dist/esm/util/rehypeMetaAttributes.mjs.map +0 -1
- package/dist/esm/util/rehypeMetaAttributes.native.js +0 -21
- package/dist/esm/util/rehypeMetaAttributes.native.js.map +0 -1
- package/dist/jsx/Aside/index.mjs +0 -91
- package/dist/jsx/Aside/index.mjs.map +0 -1
- package/dist/jsx/Aside/index.native.js +0 -126
- package/dist/jsx/Aside/index.native.js.map +0 -1
- package/dist/jsx/ExternalIcon/index.mjs +0 -23
- package/dist/jsx/ExternalIcon/index.mjs.map +0 -1
- package/dist/jsx/ExternalIcon/index.native.js +0 -53
- package/dist/jsx/ExternalIcon/index.native.js.map +0 -1
- package/dist/jsx/Hr/index.mjs +0 -8
- package/dist/jsx/Hr/index.mjs.map +0 -1
- package/dist/jsx/Hr/index.native.js +0 -38
- package/dist/jsx/Hr/index.native.js.map +0 -1
- package/dist/jsx/Li/index.mjs +0 -13
- package/dist/jsx/Li/index.mjs.map +0 -1
- package/dist/jsx/Li/index.native.js +0 -41
- package/dist/jsx/Li/index.native.js.map +0 -1
- package/dist/jsx/Markdown.mjs +0 -41
- package/dist/jsx/Markdown.mjs.map +0 -1
- package/dist/jsx/Markdown.native.js +0 -71
- package/dist/jsx/Markdown.native.js.map +0 -1
- package/dist/jsx/MarkdownSimpleTable/index.mjs +0 -125
- package/dist/jsx/MarkdownSimpleTable/index.mjs.map +0 -1
- package/dist/jsx/MarkdownSimpleTable/index.native.js +0 -183
- package/dist/jsx/MarkdownSimpleTable/index.native.js.map +0 -1
- package/dist/jsx/Mdx/index.mjs +0 -41
- package/dist/jsx/Mdx/index.mjs.map +0 -1
- package/dist/jsx/Mdx/index.native.js +0 -70
- package/dist/jsx/Mdx/index.native.js.map +0 -1
- package/dist/jsx/MdxCodeBlock/index.mjs +0 -157
- package/dist/jsx/MdxCodeBlock/index.mjs.map +0 -1
- package/dist/jsx/MdxCodeBlock/index.native.js +0 -216
- package/dist/jsx/MdxCodeBlock/index.native.js.map +0 -1
- package/dist/jsx/MdxCodeBlock/mdxCodeBlockContext.mjs +0 -4
- package/dist/jsx/MdxCodeBlock/mdxCodeBlockContext.mjs.map +0 -1
- package/dist/jsx/MdxCodeBlock/mdxCodeBlockContext.native.js +0 -32
- package/dist/jsx/MdxCodeBlock/mdxCodeBlockContext.native.js.map +0 -1
- package/dist/jsx/Notice/index.mjs +0 -26
- package/dist/jsx/Notice/index.mjs.map +0 -1
- package/dist/jsx/Notice/index.native.js +0 -55
- package/dist/jsx/Notice/index.native.js.map +0 -1
- package/dist/jsx/Table/index.mjs +0 -104
- package/dist/jsx/Table/index.mjs.map +0 -1
- package/dist/jsx/Table/index.native.js +0 -145
- package/dist/jsx/Table/index.native.js.map +0 -1
- package/dist/jsx/Tabs/index.mjs +0 -35
- package/dist/jsx/Tabs/index.mjs.map +0 -1
- package/dist/jsx/Tabs/index.native.js +0 -71
- package/dist/jsx/Tabs/index.native.js.map +0 -1
- package/dist/jsx/Ul/index.mjs +0 -10
- package/dist/jsx/Ul/index.mjs.map +0 -1
- package/dist/jsx/Ul/index.native.js +0 -38
- package/dist/jsx/Ul/index.native.js.map +0 -1
- package/dist/jsx/Video/index.mjs +0 -61
- package/dist/jsx/Video/index.mjs.map +0 -1
- package/dist/jsx/Video/index.native.js +0 -91
- package/dist/jsx/Video/index.native.js.map +0 -1
- package/dist/jsx/components/Blockquote.mjs +0 -35
- package/dist/jsx/components/Blockquote.mjs.map +0 -1
- package/dist/jsx/components/Blockquote.native.js +0 -73
- package/dist/jsx/components/Blockquote.native.js.map +0 -1
- package/dist/jsx/components/Break.mjs +0 -10
- package/dist/jsx/components/Break.mjs.map +0 -1
- package/dist/jsx/components/Break.native.js +0 -38
- package/dist/jsx/components/Break.native.js.map +0 -1
- package/dist/jsx/components/CodeBlock.mjs +0 -44
- package/dist/jsx/components/CodeBlock.mjs.map +0 -1
- package/dist/jsx/components/CodeBlock.native.js +0 -77
- package/dist/jsx/components/CodeBlock.native.js.map +0 -1
- package/dist/jsx/components/Heading.mjs +0 -46
- package/dist/jsx/components/Heading.mjs.map +0 -1
- package/dist/jsx/components/Heading.native.js +0 -76
- package/dist/jsx/components/Heading.native.js.map +0 -1
- package/dist/jsx/components/HorizontalRule.mjs +0 -9
- package/dist/jsx/components/HorizontalRule.mjs.map +0 -1
- package/dist/jsx/components/HorizontalRule.native.js +0 -37
- package/dist/jsx/components/HorizontalRule.native.js.map +0 -1
- package/dist/jsx/components/Image.mjs +0 -26
- package/dist/jsx/components/Image.mjs.map +0 -1
- package/dist/jsx/components/Image.native.js +0 -58
- package/dist/jsx/components/Image.native.js.map +0 -1
- package/dist/jsx/components/InlineCode.mjs +0 -20
- package/dist/jsx/components/InlineCode.mjs.map +0 -1
- package/dist/jsx/components/InlineCode.native.js +0 -49
- package/dist/jsx/components/InlineCode.native.js.map +0 -1
- package/dist/jsx/components/InlineStyles.mjs +0 -31
- package/dist/jsx/components/InlineStyles.mjs.map +0 -1
- package/dist/jsx/components/InlineStyles.native.js +0 -64
- package/dist/jsx/components/InlineStyles.native.js.map +0 -1
- package/dist/jsx/components/Link.mjs +0 -46
- package/dist/jsx/components/Link.mjs.map +0 -1
- package/dist/jsx/components/Link.native.js +0 -76
- package/dist/jsx/components/Link.native.js.map +0 -1
- package/dist/jsx/components/List.mjs +0 -126
- package/dist/jsx/components/List.mjs.map +0 -1
- package/dist/jsx/components/List.native.js +0 -161
- package/dist/jsx/components/List.native.js.map +0 -1
- package/dist/jsx/components/Paragraph.mjs +0 -18
- package/dist/jsx/components/Paragraph.mjs.map +0 -1
- package/dist/jsx/components/Paragraph.native.js +0 -47
- package/dist/jsx/components/Paragraph.native.js.map +0 -1
- package/dist/jsx/components/Table.mjs +0 -92
- package/dist/jsx/components/Table.mjs.map +0 -1
- package/dist/jsx/components/Table.native.js +0 -134
- package/dist/jsx/components/Table.native.js.map +0 -1
- package/dist/jsx/components/index.mjs +0 -14
- package/dist/jsx/components/index.mjs.map +0 -1
- package/dist/jsx/components/index.native.js +0 -58
- package/dist/jsx/components/index.native.js.map +0 -1
- package/dist/jsx/hooks/index.mjs +0 -4
- package/dist/jsx/hooks/index.mjs.map +0 -1
- package/dist/jsx/hooks/index.native.js +0 -25
- package/dist/jsx/hooks/index.native.js.map +0 -1
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.mjs +0 -17
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.mjs.map +0 -1
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.native.js +0 -45
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.native.js.map +0 -1
- package/dist/jsx/hooks/useCompileMdx.mjs +0 -76
- package/dist/jsx/hooks/useCompileMdx.mjs.map +0 -1
- package/dist/jsx/hooks/useCompileMdx.native.js +0 -135
- package/dist/jsx/hooks/useCompileMdx.native.js.map +0 -1
- package/dist/jsx/hooks/useEvaluateMdx.mjs +0 -28
- package/dist/jsx/hooks/useEvaluateMdx.mjs.map +0 -1
- package/dist/jsx/hooks/useEvaluateMdx.native.js +0 -69
- package/dist/jsx/hooks/useEvaluateMdx.native.js.map +0 -1
- package/dist/jsx/icons/index.mjs +0 -107
- package/dist/jsx/icons/index.mjs.map +0 -1
- package/dist/jsx/icons/index.native.js +0 -146
- package/dist/jsx/icons/index.native.js.map +0 -1
- package/dist/jsx/index.js +0 -23
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs +0 -23
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/index.native.js +0 -56
- package/dist/jsx/index.native.js.map +0 -1
- package/dist/jsx/mdxComponents.mjs +0 -298
- package/dist/jsx/mdxComponents.mjs.map +0 -1
- package/dist/jsx/mdxComponents.native.js +0 -386
- package/dist/jsx/mdxComponents.native.js.map +0 -1
- package/dist/jsx/mermaid/MermaidBlock.mjs +0 -85
- package/dist/jsx/mermaid/MermaidBlock.mjs.map +0 -1
- package/dist/jsx/mermaid/MermaidBlock.native.js +0 -41
- package/dist/jsx/mermaid/MermaidBlock.native.js.map +0 -1
- package/dist/jsx/mermaid/index.mjs +0 -4
- package/dist/jsx/mermaid/index.mjs.map +0 -1
- package/dist/jsx/mermaid/index.native.js +0 -34
- package/dist/jsx/mermaid/index.native.js.map +0 -1
- package/dist/jsx/mermaid/mountDiagramSvg.mjs +0 -29
- package/dist/jsx/mermaid/mountDiagramSvg.mjs.map +0 -1
- package/dist/jsx/mermaid/mountDiagramSvg.native.js +0 -98
- package/dist/jsx/mermaid/mountDiagramSvg.native.js.map +0 -1
- package/dist/jsx/mermaid/renderMermaidDiagram.mjs +0 -55
- package/dist/jsx/mermaid/renderMermaidDiagram.mjs.map +0 -1
- package/dist/jsx/mermaid/renderMermaidDiagram.native.js +0 -110
- package/dist/jsx/mermaid/renderMermaidDiagram.native.js.map +0 -1
- package/dist/jsx/parser.mjs +0 -12
- package/dist/jsx/parser.mjs.map +0 -1
- package/dist/jsx/parser.native.js +0 -52
- package/dist/jsx/parser.native.js.map +0 -1
- package/dist/jsx/renderer.mjs +0 -308
- package/dist/jsx/renderer.mjs.map +0 -1
- package/dist/jsx/renderer.native.js +0 -356
- package/dist/jsx/renderer.native.js.map +0 -1
- package/dist/jsx/shared/colorRamps.mjs +0 -36
- package/dist/jsx/shared/colorRamps.mjs.map +0 -1
- package/dist/jsx/shared/colorRamps.native.js +0 -67
- package/dist/jsx/shared/colorRamps.native.js.map +0 -1
- package/dist/jsx/shared/cutoffGradient.mjs +0 -28
- package/dist/jsx/shared/cutoffGradient.mjs.map +0 -1
- package/dist/jsx/shared/cutoffGradient.native.js +0 -63
- package/dist/jsx/shared/cutoffGradient.native.js.map +0 -1
- package/dist/jsx/shared/index.mjs +0 -2
- package/dist/jsx/shared/index.mjs.map +0 -1
- package/dist/jsx/shared/index.native.js +0 -23
- package/dist/jsx/shared/index.native.js.map +0 -1
- package/dist/jsx/shiki/index.mjs +0 -2
- package/dist/jsx/shiki/index.mjs.map +0 -1
- package/dist/jsx/shiki/index.native.js +0 -21
- package/dist/jsx/shiki/index.native.js.map +0 -1
- package/dist/jsx/types.mjs +0 -2
- package/dist/jsx/types.mjs.map +0 -1
- package/dist/jsx/types.native.js +0 -21
- package/dist/jsx/types.native.js.map +0 -1
- package/dist/jsx/util/rehypeMetaAttributes.mjs +0 -20
- package/dist/jsx/util/rehypeMetaAttributes.mjs.map +0 -1
- package/dist/jsx/util/rehypeMetaAttributes.native.js +0 -49
- package/dist/jsx/util/rehypeMetaAttributes.native.js.map +0 -1
- package/types/Aside/index.d.ts +0 -11
- package/types/Aside/index.d.ts.map +0 -1
- package/types/ExternalIcon/index.d.ts +0 -2
- package/types/ExternalIcon/index.d.ts.map +0 -1
- package/types/Hr/index.d.ts +0 -2
- package/types/Hr/index.d.ts.map +0 -1
- package/types/Li/index.d.ts +0 -6
- package/types/Li/index.d.ts.map +0 -1
- package/types/Markdown.d.ts +0 -22
- package/types/Markdown.d.ts.map +0 -1
- package/types/MarkdownSimpleTable/index.d.ts +0 -16
- package/types/MarkdownSimpleTable/index.d.ts.map +0 -1
- package/types/Mdx/index.d.ts +0 -9
- package/types/Mdx/index.d.ts.map +0 -1
- package/types/MdxCodeBlock/index.d.ts +0 -7
- package/types/MdxCodeBlock/index.d.ts.map +0 -1
- package/types/MdxCodeBlock/mdxCodeBlockContext.d.ts +0 -13
- package/types/MdxCodeBlock/mdxCodeBlockContext.d.ts.map +0 -1
- package/types/Notice/index.d.ts +0 -12
- package/types/Notice/index.d.ts.map +0 -1
- package/types/Table/index.d.ts +0 -20
- package/types/Table/index.d.ts.map +0 -1
- package/types/Tabs/index.d.ts +0 -21
- package/types/Tabs/index.d.ts.map +0 -1
- package/types/Ul/index.d.ts +0 -6
- package/types/Ul/index.d.ts.map +0 -1
- package/types/Video/index.d.ts +0 -12
- package/types/Video/index.d.ts.map +0 -1
- package/types/components/Blockquote.d.ts +0 -3
- package/types/components/Blockquote.d.ts.map +0 -1
- package/types/components/Break.d.ts +0 -3
- package/types/components/Break.d.ts.map +0 -1
- package/types/components/CodeBlock.d.ts +0 -17
- package/types/components/CodeBlock.d.ts.map +0 -1
- package/types/components/Heading.d.ts +0 -3
- package/types/components/Heading.d.ts.map +0 -1
- package/types/components/HorizontalRule.d.ts +0 -3
- package/types/components/HorizontalRule.d.ts.map +0 -1
- package/types/components/Image.d.ts +0 -3
- package/types/components/Image.d.ts.map +0 -1
- package/types/components/InlineCode.d.ts +0 -12
- package/types/components/InlineCode.d.ts.map +0 -1
- package/types/components/InlineStyles.d.ts +0 -5
- package/types/components/InlineStyles.d.ts.map +0 -1
- package/types/components/Link.d.ts +0 -3
- package/types/components/Link.d.ts.map +0 -1
- package/types/components/List.d.ts +0 -10
- package/types/components/List.d.ts.map +0 -1
- package/types/components/Paragraph.d.ts +0 -3
- package/types/components/Paragraph.d.ts.map +0 -1
- package/types/components/Table.d.ts +0 -13
- package/types/components/Table.d.ts.map +0 -1
- package/types/components/index.d.ts +0 -13
- package/types/components/index.d.ts.map +0 -1
- package/types/hooks/index.d.ts +0 -4
- package/types/hooks/index.d.ts.map +0 -1
- package/types/hooks/useCompileAndEvaluateMdx.d.ts +0 -9
- package/types/hooks/useCompileAndEvaluateMdx.d.ts.map +0 -1
- package/types/hooks/useCompileMdx.d.ts +0 -13
- package/types/hooks/useCompileMdx.d.ts.map +0 -1
- package/types/hooks/useEvaluateMdx.d.ts +0 -5
- package/types/hooks/useEvaluateMdx.d.ts.map +0 -1
- package/types/icons/index.d.ts +0 -12
- package/types/icons/index.d.ts.map +0 -1
- package/types/index.d.ts +0 -29
- package/types/index.d.ts.map +0 -1
- package/types/mdxComponents.d.ts +0 -8
- package/types/mdxComponents.d.ts.map +0 -1
- package/types/mermaid/MermaidBlock.d.ts +0 -15
- package/types/mermaid/MermaidBlock.d.ts.map +0 -1
- package/types/mermaid/MermaidBlock.native.d.ts +0 -10
- package/types/mermaid/MermaidBlock.native.d.ts.map +0 -1
- package/types/mermaid/index.d.ts +0 -18
- package/types/mermaid/index.d.ts.map +0 -1
- package/types/mermaid/mountDiagramSvg.d.ts +0 -11
- package/types/mermaid/mountDiagramSvg.d.ts.map +0 -1
- package/types/mermaid/renderMermaidDiagram.d.ts +0 -33
- package/types/mermaid/renderMermaidDiagram.d.ts.map +0 -1
- package/types/parser.d.ts +0 -11
- package/types/parser.d.ts.map +0 -1
- package/types/renderer.d.ts +0 -32
- package/types/renderer.d.ts.map +0 -1
- package/types/shared/colorRamps.d.ts +0 -39
- package/types/shared/colorRamps.d.ts.map +0 -1
- package/types/shared/cutoffGradient.d.ts +0 -12
- package/types/shared/cutoffGradient.d.ts.map +0 -1
- package/types/shared/index.d.ts +0 -2
- package/types/shared/index.d.ts.map +0 -1
- package/types/shiki/index.d.ts +0 -8
- package/types/shiki/index.d.ts.map +0 -1
- package/types/types.d.ts +0 -160
- package/types/types.d.ts.map +0 -1
- package/types/util/rehypeMetaAttributes.d.ts +0 -2
- package/types/util/rehypeMetaAttributes.d.ts.map +0 -1
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var Markdown_exports = {};
|
|
26
|
-
__export(Markdown_exports, {
|
|
27
|
-
Markdown: () => Markdown
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(Markdown_exports);
|
|
30
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
var import_react = require("react");
|
|
32
|
-
var import_tamagui = require("tamagui");
|
|
33
|
-
var import_parser = require("./parser.native.js");
|
|
34
|
-
var import_renderer = require("./renderer.native.js");
|
|
35
|
-
function Markdown(param) {
|
|
36
|
-
var {
|
|
37
|
-
children,
|
|
38
|
-
components,
|
|
39
|
-
codeTheme = "auto",
|
|
40
|
-
...viewProps
|
|
41
|
-
} = param;
|
|
42
|
-
var themeName = (0, import_tamagui.useThemeName)();
|
|
43
|
-
var resolvedCodeTheme = (0, import_react.useMemo)(function () {
|
|
44
|
-
var _ref;
|
|
45
|
-
if (codeTheme !== "auto") {
|
|
46
|
-
return codeTheme;
|
|
47
|
-
}
|
|
48
|
-
var isDark = (_ref = themeName === null || themeName === void 0 ? void 0 : themeName.includes("dark")) !== null && _ref !== void 0 ? _ref : false;
|
|
49
|
-
return isDark ? "github-dark" : "github-light";
|
|
50
|
-
}, [codeTheme, themeName]);
|
|
51
|
-
var rendered = (0, import_react.useMemo)(function () {
|
|
52
|
-
if (!children || typeof children !== "string") {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
try {
|
|
56
|
-
var ast = (0, import_parser.parseMarkdown)(children);
|
|
57
|
-
return (0, import_renderer.renderMarkdown)(ast, {
|
|
58
|
-
components,
|
|
59
|
-
codeTheme: resolvedCodeTheme
|
|
60
|
-
});
|
|
61
|
-
} catch (error) {
|
|
62
|
-
console.error("Markdown parsing error:", error);
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
}, [children, components, resolvedCodeTheme]);
|
|
66
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
67
|
-
...viewProps,
|
|
68
|
-
children: rendered
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=Markdown.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Markdown_exports","__export","Markdown","module","exports","import_jsx_runtime","require","import_react","import_tamagui","import_parser","import_renderer","param","children","components","codeTheme","viewProps","themeName","useThemeName","resolvedCodeTheme","useMemo","_ref","isDark","includes","rendered","ast","parseMarkdown","renderMarkdown","error","console"],"sources":["../../src/Markdown.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,gBAAA;AAAAC,QAAA,CAAAD,gBAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA;AAAA;AAIAC,MAAA,CAAAC,OAAA,GAAAT,YAAwB,CAAAK,gBAAA;AACxB,IAAAK,kBAAmD,GAAAC,OAAA;AACnD,IAAAC,YAAA,GAAAD,OAA8B;AAC9B,IAAAE,cAAA,GAAAF,OAA+B;AAqDtB,IAAAG,aAAA,GAAAH,OAAA;AAhCF,IAAAI,eAAkB,GAAAJ,OAAA;AAAA,SACvBJ,SAAAS,KAAA;EACA;IAAAC,QAAA;IAAAC,UAAA;IAAAC,SAAA;IAAA,GAAAC;EAAA,IAAAJ,KAAA;EACA,IAAAK,SAAY,OAAAR,cAAA,CAAAS,YAAA;EACZ,IAAGC,iBAAA,OAAAX,YAAA,CAAAY,OAAA;IACsB,IAAAC,IAAA;IACzB,IAAMN,SAAA,WAAY;MAGlB,OAAMA,SAAA;IACJ;IACE,IAAAO,MAAO,IAAAD,IAAA,GAAAJ,SAAA,aAAAA,SAAA,uBAAAA,SAAA,CAAAM,QAAA,sBAAAF,IAAA,cAAAA,IAAA;IACT,OAAAC,MAAA;EAEA,IACAP,SAAO,EACTE,SAAI,CAEJ;EACE,IAAAO,QAAK,OAAYhB,YAAO,CAAAY,OAAa,cAAU;IAC7C,KAAAP,QAAO,WAAAA,QAAA;MACT;IAEA;IACE;MACA,IAAAY,GAAA,IAAO,GAAAf,aAAA,CAAAgB,aAAA,EAAeb,QAAO;MAC/B,OAAS,IAAAF,eAAO,CAAAgB,cAAA,EAAAF,GAAA;QACdX,UAAQ;QACRC,SAAO,EAAAI;MACT;IACF,CAAG,CAAC,OAAAS,KAAU;MAEdC,OAAO,CAAAD,KAAA,4BAAAA,KAAA,CAAC;MACV","ignoreList":[]}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
23
|
-
var MarkdownSimpleTable_exports = {};
|
|
24
|
-
__export(MarkdownSimpleTable_exports, {
|
|
25
|
-
MarkdownSimpleTable: () => MarkdownSimpleTable
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(MarkdownSimpleTable_exports);
|
|
28
|
-
var import_tamagui = require("tamagui");
|
|
29
|
-
var import_table_primitives = require("@multiplatform.one/table-primitives");
|
|
30
|
-
var import_theme = require("@multiplatform.one/theme");
|
|
31
|
-
var import_Link = require("../components/Link.cjs");
|
|
32
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
-
const markdownPattern = /(\*\*\[([^\]]+)\]\(([^)]+)\)\*\*)|(\[([^\]]+)\]\(([^)]+)\))|(\*\*([^*]+)\*\*)|(`([^`]+)`)/g;
|
|
34
|
-
function parseCell(content) {
|
|
35
|
-
if (typeof content !== "string") return content;
|
|
36
|
-
const matches = [...content.matchAll(markdownPattern)];
|
|
37
|
-
if (!matches.length) return content;
|
|
38
|
-
const parts = [];
|
|
39
|
-
let lastIndex = 0;
|
|
40
|
-
for (const match of matches) {
|
|
41
|
-
const matchIndex = match.index ?? 0;
|
|
42
|
-
if (matchIndex > lastIndex) {
|
|
43
|
-
parts.push(content.slice(lastIndex, matchIndex));
|
|
44
|
-
}
|
|
45
|
-
const key = `m-${matchIndex}`;
|
|
46
|
-
if (match[1]) {
|
|
47
|
-
parts.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
48
|
-
fontWeight: "700",
|
|
49
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Link.Link, {
|
|
50
|
-
href: match[3],
|
|
51
|
-
children: match[2]
|
|
52
|
-
})
|
|
53
|
-
}, key));
|
|
54
|
-
} else if (match[4]) {
|
|
55
|
-
parts.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Link.Link, {
|
|
56
|
-
href: match[6],
|
|
57
|
-
children: match[5]
|
|
58
|
-
}, key));
|
|
59
|
-
} else if (match[7]) {
|
|
60
|
-
parts.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
61
|
-
fontWeight: "700",
|
|
62
|
-
children: match[8]
|
|
63
|
-
}, key));
|
|
64
|
-
} else if (match[9]) {
|
|
65
|
-
parts.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
66
|
-
fontFamily: "$mono",
|
|
67
|
-
backgroundColor: "$color4",
|
|
68
|
-
paddingHorizontal: "$1.5",
|
|
69
|
-
paddingVertical: "$0.5",
|
|
70
|
-
borderRadius: "$2",
|
|
71
|
-
children: match[10]
|
|
72
|
-
}, key));
|
|
73
|
-
}
|
|
74
|
-
lastIndex = matchIndex + match[0].length;
|
|
75
|
-
}
|
|
76
|
-
if (lastIndex < content.length) {
|
|
77
|
-
parts.push(content.slice(lastIndex));
|
|
78
|
-
}
|
|
79
|
-
return parts.length === 1 ? parts[0] : parts;
|
|
80
|
-
}
|
|
81
|
-
function MarkdownSimpleTable({
|
|
82
|
-
headers,
|
|
83
|
-
rows
|
|
84
|
-
}) {
|
|
85
|
-
const {
|
|
86
|
-
knobProps
|
|
87
|
-
} = (0, import_theme.useResolvedKnobs)();
|
|
88
|
-
const media = (0, import_tamagui.useMedia)();
|
|
89
|
-
const isMobile = media.sm;
|
|
90
|
-
const table = /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_table_primitives.Table, {
|
|
91
|
-
render: "table",
|
|
92
|
-
width: "auto",
|
|
93
|
-
cellWidth: "auto",
|
|
94
|
-
style: {
|
|
95
|
-
tableLayout: "auto"
|
|
96
|
-
},
|
|
97
|
-
borderColor: "$borderColor",
|
|
98
|
-
borderRadius: knobProps.borderRadius.borderRadius,
|
|
99
|
-
alignCells: {
|
|
100
|
-
x: "start",
|
|
101
|
-
y: "center"
|
|
102
|
-
},
|
|
103
|
-
alignHeaderCells: {
|
|
104
|
-
x: "start",
|
|
105
|
-
y: "center"
|
|
106
|
-
},
|
|
107
|
-
...(isMobile && {
|
|
108
|
-
minWidth: 760
|
|
109
|
-
}),
|
|
110
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Head, {
|
|
111
|
-
render: "thead",
|
|
112
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Row, {
|
|
113
|
-
render: "tr",
|
|
114
|
-
rowLocation: "first",
|
|
115
|
-
children: headers.map((header, headerIdx) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.HeaderCell, {
|
|
116
|
-
render: "th",
|
|
117
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
118
|
-
size: "$4",
|
|
119
|
-
fontWeight: "600",
|
|
120
|
-
children: header
|
|
121
|
-
})
|
|
122
|
-
}, `h-${headerIdx}`))
|
|
123
|
-
})
|
|
124
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Body, {
|
|
125
|
-
render: "tbody",
|
|
126
|
-
children: rows.map((row, rowIdx) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Row, {
|
|
127
|
-
render: "tr",
|
|
128
|
-
rowLocation: rowIdx === rows.length - 1 ? "last" : "middle",
|
|
129
|
-
children: row.map((cell, cellIdx) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Cell, {
|
|
130
|
-
render: "td",
|
|
131
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
132
|
-
render: "span",
|
|
133
|
-
display: "block",
|
|
134
|
-
size: "$4",
|
|
135
|
-
maxWidth: 480,
|
|
136
|
-
children: parseCell(cell)
|
|
137
|
-
})
|
|
138
|
-
}, `c-${rowIdx}-${cellIdx}`))
|
|
139
|
-
}, `r-${rowIdx}`))
|
|
140
|
-
})]
|
|
141
|
-
});
|
|
142
|
-
if (isMobile) {
|
|
143
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.ScrollView, {
|
|
144
|
-
horizontal: true,
|
|
145
|
-
showsHorizontalScrollIndicator: false,
|
|
146
|
-
children: table
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
return table;
|
|
150
|
-
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var MarkdownSimpleTable_exports = {};
|
|
26
|
-
__export(MarkdownSimpleTable_exports, {
|
|
27
|
-
MarkdownSimpleTable: () => MarkdownSimpleTable
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(MarkdownSimpleTable_exports);
|
|
30
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
var import_tamagui = require("tamagui");
|
|
32
|
-
var import_table_primitives = require("@multiplatform.one/table-primitives");
|
|
33
|
-
var import_theme = require("@multiplatform.one/theme");
|
|
34
|
-
var import_Link = require("../components/Link.native.js");
|
|
35
|
-
var markdownPattern = /(\*\*\[([^\]]+)\]\(([^)]+)\)\*\*)|(\[([^\]]+)\]\(([^)]+)\))|(\*\*([^*]+)\*\*)|(`([^`]+)`)/g;
|
|
36
|
-
function parseCell(content) {
|
|
37
|
-
if (typeof content !== "string") return content;
|
|
38
|
-
var matches = [...content.matchAll(markdownPattern)];
|
|
39
|
-
if (!matches.length) return content;
|
|
40
|
-
var parts = [];
|
|
41
|
-
var lastIndex = 0;
|
|
42
|
-
var _iteratorNormalCompletion = true,
|
|
43
|
-
_didIteratorError = false,
|
|
44
|
-
_iteratorError = void 0;
|
|
45
|
-
try {
|
|
46
|
-
for (var _iterator = matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
47
|
-
var match = _step.value;
|
|
48
|
-
var _match_index;
|
|
49
|
-
var matchIndex = (_match_index = match.index) !== null && _match_index !== void 0 ? _match_index : 0;
|
|
50
|
-
if (matchIndex > lastIndex) {
|
|
51
|
-
parts.push(content.slice(lastIndex, matchIndex));
|
|
52
|
-
}
|
|
53
|
-
var key = `m-${matchIndex}`;
|
|
54
|
-
if (match[1]) {
|
|
55
|
-
parts.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
56
|
-
fontWeight: "700",
|
|
57
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Link.Link, {
|
|
58
|
-
href: match[3],
|
|
59
|
-
children: match[2]
|
|
60
|
-
})
|
|
61
|
-
}, key));
|
|
62
|
-
} else if (match[4]) {
|
|
63
|
-
parts.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Link.Link, {
|
|
64
|
-
href: match[6],
|
|
65
|
-
children: match[5]
|
|
66
|
-
}, key));
|
|
67
|
-
} else if (match[7]) {
|
|
68
|
-
parts.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
69
|
-
fontWeight: "700",
|
|
70
|
-
children: match[8]
|
|
71
|
-
}, key));
|
|
72
|
-
} else if (match[9]) {
|
|
73
|
-
parts.push(/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
74
|
-
fontFamily: "$mono",
|
|
75
|
-
backgroundColor: "$color4",
|
|
76
|
-
paddingHorizontal: "$1.5",
|
|
77
|
-
paddingVertical: "$0.5",
|
|
78
|
-
borderRadius: "$2",
|
|
79
|
-
children: match[10]
|
|
80
|
-
}, key));
|
|
81
|
-
}
|
|
82
|
-
lastIndex = matchIndex + match[0].length;
|
|
83
|
-
}
|
|
84
|
-
} catch (err) {
|
|
85
|
-
_didIteratorError = true;
|
|
86
|
-
_iteratorError = err;
|
|
87
|
-
} finally {
|
|
88
|
-
try {
|
|
89
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
90
|
-
_iterator.return();
|
|
91
|
-
}
|
|
92
|
-
} finally {
|
|
93
|
-
if (_didIteratorError) {
|
|
94
|
-
throw _iteratorError;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
if (lastIndex < content.length) {
|
|
99
|
-
parts.push(content.slice(lastIndex));
|
|
100
|
-
}
|
|
101
|
-
return parts.length === 1 ? parts[0] : parts;
|
|
102
|
-
}
|
|
103
|
-
function MarkdownSimpleTable(param) {
|
|
104
|
-
var {
|
|
105
|
-
headers,
|
|
106
|
-
rows
|
|
107
|
-
} = param;
|
|
108
|
-
var {
|
|
109
|
-
knobProps
|
|
110
|
-
} = (0, import_theme.useResolvedKnobs)();
|
|
111
|
-
var media = (0, import_tamagui.useMedia)();
|
|
112
|
-
var isMobile = media.sm;
|
|
113
|
-
var table = /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_table_primitives.Table, {
|
|
114
|
-
render: "table",
|
|
115
|
-
// Auto width/layout: a real <table> with width:100% against the
|
|
116
|
-
// scroller's indefinite width hits Chromium's 1e6px table clamp.
|
|
117
|
-
width: "auto",
|
|
118
|
-
cellWidth: "auto",
|
|
119
|
-
style: {
|
|
120
|
-
tableLayout: "auto"
|
|
121
|
-
},
|
|
122
|
-
borderColor: "$borderColor",
|
|
123
|
-
borderRadius: knobProps.borderRadius.borderRadius,
|
|
124
|
-
alignCells: {
|
|
125
|
-
x: "start",
|
|
126
|
-
y: "center"
|
|
127
|
-
},
|
|
128
|
-
alignHeaderCells: {
|
|
129
|
-
x: "start",
|
|
130
|
-
y: "center"
|
|
131
|
-
},
|
|
132
|
-
...(isMobile && {
|
|
133
|
-
minWidth: 760
|
|
134
|
-
}),
|
|
135
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Head, {
|
|
136
|
-
render: "thead",
|
|
137
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Row, {
|
|
138
|
-
render: "tr",
|
|
139
|
-
rowLocation: "first",
|
|
140
|
-
children: headers.map(function (header, headerIdx) {
|
|
141
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.HeaderCell, {
|
|
142
|
-
render: "th",
|
|
143
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
144
|
-
size: "$4",
|
|
145
|
-
fontWeight: "600",
|
|
146
|
-
children: header
|
|
147
|
-
})
|
|
148
|
-
}, `h-${headerIdx}`);
|
|
149
|
-
})
|
|
150
|
-
})
|
|
151
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Body, {
|
|
152
|
-
render: "tbody",
|
|
153
|
-
children: rows.map(function (row, rowIdx) {
|
|
154
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Row, {
|
|
155
|
-
render: "tr",
|
|
156
|
-
rowLocation: rowIdx === rows.length - 1 ? "last" : "middle",
|
|
157
|
-
children: row.map(function (cell, cellIdx) {
|
|
158
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Cell, {
|
|
159
|
-
render: "td",
|
|
160
|
-
children: (/* maxWidth caps the column's max-content contribution so long cells wrap */
|
|
161
|
-
/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
162
|
-
render: "span",
|
|
163
|
-
display: "block",
|
|
164
|
-
size: "$4",
|
|
165
|
-
maxWidth: 480,
|
|
166
|
-
children: parseCell(cell)
|
|
167
|
-
}))
|
|
168
|
-
}, `c-${rowIdx}-${cellIdx}`);
|
|
169
|
-
})
|
|
170
|
-
}, `r-${rowIdx}`);
|
|
171
|
-
})
|
|
172
|
-
})]
|
|
173
|
-
});
|
|
174
|
-
if (isMobile) {
|
|
175
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.ScrollView, {
|
|
176
|
-
horizontal: true,
|
|
177
|
-
showsHorizontalScrollIndicator: false,
|
|
178
|
-
children: table
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
return table;
|
|
182
|
-
}
|
|
183
|
-
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","MarkdownSimpleTable_exports","__export","MarkdownSimpleTable","module","exports","import_jsx_runtime","require","import_tamagui","import_table_primitives","import_theme","import_Link","markdownPattern","parseCell","content","matches","matchAll","length","parts","lastIndex","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Symbol","iterator","_step","next","done","match","_match_index","matchIndex","index","push","slice","key","jsx","Text","fontWeight","children","Link","href","fontFamily","backgroundColor","paddingHorizontal","paddingVertical","borderRadius","err","return","param","headers","rows","knobProps","useResolvedKnobs","media","useMedia","isMobile","sm","table","jsxs","Table","render","width","cellWidth","style","tableLayout"],"sources":["../../../src/MarkdownSimpleTable/index.tsx"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
|
package/dist/cjs/Mdx/index.cjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
23
|
-
var Mdx_exports = {};
|
|
24
|
-
__export(Mdx_exports, {
|
|
25
|
-
MDX: () => MDX
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(Mdx_exports);
|
|
28
|
-
var import_react = require("@mdx-js/react");
|
|
29
|
-
var import_components = require("@multiplatform.one/components");
|
|
30
|
-
var import_hooks = require("../hooks/index.cjs");
|
|
31
|
-
var import_mdxComponents = require("../mdxComponents.cjs");
|
|
32
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
|
-
const logger = console;
|
|
34
|
-
function MDX({
|
|
35
|
-
children,
|
|
36
|
-
debug,
|
|
37
|
-
...props
|
|
38
|
-
}) {
|
|
39
|
-
const components = (0, import_react.useMDXComponents)();
|
|
40
|
-
const {
|
|
41
|
-
Component,
|
|
42
|
-
code,
|
|
43
|
-
frontmatter
|
|
44
|
-
} = (0, import_hooks.useCompileAndEvaluateMdx)(children);
|
|
45
|
-
if (!Component) return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
46
|
-
if (debug) {
|
|
47
|
-
logger.debug("MDX", {
|
|
48
|
-
frontmatter
|
|
49
|
-
});
|
|
50
|
-
logger.debug(code);
|
|
51
|
-
}
|
|
52
|
-
return (
|
|
53
|
-
// contain runtime render errors (e.g. missing component mappings) so
|
|
54
|
-
// sibling content outside the MDX renderer survives
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
(0, import_jsx_runtime.jsx)(import_components.ErrorBoundary, {
|
|
57
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(Component, {
|
|
58
|
-
components: {
|
|
59
|
-
...import_mdxComponents.mdxComponents,
|
|
60
|
-
...components,
|
|
61
|
-
...props.components
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
})
|
|
65
|
-
);
|
|
66
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: true
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
-
get: () => from[key],
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
25
|
-
var Mdx_exports = {};
|
|
26
|
-
__export(Mdx_exports, {
|
|
27
|
-
MDX: () => MDX
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(Mdx_exports);
|
|
30
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
var import_react = require("@mdx-js/react");
|
|
32
|
-
var import_components = require("@multiplatform.one/components");
|
|
33
|
-
var import_hooks = require("../hooks/index.native.js");
|
|
34
|
-
var import_mdxComponents = require("../mdxComponents.native.js");
|
|
35
|
-
var logger = console;
|
|
36
|
-
function MDX(param) {
|
|
37
|
-
var {
|
|
38
|
-
children,
|
|
39
|
-
debug,
|
|
40
|
-
...props
|
|
41
|
-
} = param;
|
|
42
|
-
var components = (0, import_react.useMDXComponents)();
|
|
43
|
-
var {
|
|
44
|
-
Component,
|
|
45
|
-
code,
|
|
46
|
-
frontmatter
|
|
47
|
-
} = (0, import_hooks.useCompileAndEvaluateMdx)(children);
|
|
48
|
-
if (!Component) return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
|
|
49
|
-
if (debug) {
|
|
50
|
-
logger.debug("MDX", {
|
|
51
|
-
frontmatter
|
|
52
|
-
});
|
|
53
|
-
logger.debug(code);
|
|
54
|
-
}
|
|
55
|
-
return (
|
|
56
|
-
// contain runtime render errors (e.g. missing component mappings) so
|
|
57
|
-
// sibling content outside the MDX renderer survives
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
(0, import_jsx_runtime.jsx)(import_components.ErrorBoundary, {
|
|
60
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(Component, {
|
|
61
|
-
components: {
|
|
62
|
-
...import_mdxComponents.mdxComponents,
|
|
63
|
-
...components,
|
|
64
|
-
...props.components
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
})
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Mdx_exports","__export","MDX","module","exports","import_jsx_runtime","require","import_react","import_components","import_hooks","import_mdxComponents","logger","console","param","children","debug","props","components","useMDXComponents","Component","code","frontmatter","useCompileAndEvaluateMdx","jsx","Fragment","ErrorBoundary","mdxComponents"],"sources":["../../../src/Mdx/index.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,WAAA;AAAAC,QAAA,CAAAD,WAAA;EAAAE,GAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAiC,CAAAK,WAAA;AACjC,IAAAK,kBAAA,GAA8BC,OAAA;AAG9B,IAAAC,YAAA,GAAyCD,OAAA;AACzC,IAAAE,iBAAA,GAAAF,OAA8B;AAaL,IAAAG,YAAA,GAAAH,OAAA;AALzB,IAAAI,oBAAe,GAAAJ,OAAA;AAER,IAAAK,MAAS,GAAIC,OAAE;AACpB,SAAMV,IAAAW,KAAA;EACN;IAAMC,QAAE;IAAAC,KAAW;IAAA,GAAMC;EAAA,IAAAH,KAAY;EACrC,IAAII,UAAC,GAAW,IAAAV,YAAO,CAAAW,gBAAA;EACvB,IAAI;IAAAC,SAAO;IAAAC,IAAA;IAAAC;EAAA,QAAAZ,YAAA,CAAAa,wBAAA,EAAAR,QAAA;EACT,KAAAK,SAAO,EAAM,OAAO,eAAe,IAAAd,kBAAA,CAAAkB,GAAA,EAAAlB,kBAAA,CAAAmB,QAAA;EACnC,IAAAT,KAAO;IACTJ,MAAA,CAAAI,KAAA;MACAM;IAAA;IAAAV,MAAA,CAAAI,KAAA,CAAAK,IAAA;EAAA;EAII;IAAC;IAAA;IACa;IACP,IAAAf,kBAAA,CAAAkB,GAAA,EAAAf,iBAAA,CAAAiB,aAAA;MAAAX,QACA,qBAAAT,kBAAA,CAAAkB,GAAA,EAAAJ,SAAA;QAAAF,UACA,EAAM;UACX,GAAAP,oBAAA,CAAAgB,aAAA;UAAA,GAAAT,UAAA;UAEJ,GAAAD,KAAA,CAAAC;QAAA;MAEJ","ignoreList":[]}
|