@multiplatform.one/markdown 9.16.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Aside/index.cjs +87 -101
- package/dist/cjs/Aside/index.native.cjs +119 -0
- package/dist/cjs/Aside/index.native.js +93 -109
- package/dist/cjs/Aside/index.native.js.map +1 -1
- package/dist/cjs/ExternalIcon/index.cjs +28 -34
- package/dist/cjs/ExternalIcon/index.native.cjs +46 -0
- package/dist/cjs/ExternalIcon/index.native.js +30 -35
- package/dist/cjs/ExternalIcon/index.native.js.map +1 -1
- package/dist/cjs/Hr/index.cjs +14 -20
- package/dist/cjs/Hr/index.native.cjs +30 -0
- package/dist/cjs/Hr/index.native.js +15 -20
- package/dist/cjs/Hr/index.native.js.map +1 -1
- package/dist/cjs/Li/index.cjs +20 -26
- package/dist/cjs/Li/index.native.cjs +34 -0
- package/dist/cjs/Li/index.native.js +20 -25
- package/dist/cjs/Li/index.native.js.map +1 -1
- package/dist/cjs/Markdown.cjs +38 -43
- package/dist/cjs/Markdown.native.cjs +56 -0
- package/dist/cjs/Markdown.native.js +38 -42
- package/dist/cjs/Markdown.native.js.map +1 -1
- package/dist/cjs/MarkdownSimpleTable/index.cjs +112 -131
- package/dist/cjs/MarkdownSimpleTable/index.native.cjs +159 -0
- package/dist/cjs/MarkdownSimpleTable/index.native.js +136 -158
- package/dist/cjs/MarkdownSimpleTable/index.native.js.map +1 -1
- package/dist/cjs/Mdx/index.cjs +27 -50
- package/dist/cjs/Mdx/index.native.cjs +46 -0
- package/dist/cjs/Mdx/index.native.js +27 -49
- package/dist/cjs/Mdx/index.native.js.map +1 -1
- package/dist/cjs/MdxCodeBlock/index.cjs +138 -176
- package/dist/cjs/MdxCodeBlock/index.native.cjs +181 -0
- package/dist/cjs/MdxCodeBlock/index.native.js +150 -195
- package/dist/cjs/MdxCodeBlock/index.native.js.map +1 -1
- package/dist/cjs/MdxCodeBlock/mdxCodeBlockContext.cjs +14 -18
- package/dist/cjs/MdxCodeBlock/mdxCodeBlockContext.native.cjs +27 -0
- package/dist/cjs/MdxCodeBlock/mdxCodeBlockContext.native.js +14 -17
- package/dist/cjs/MdxCodeBlock/mdxCodeBlockContext.native.js.map +1 -1
- package/dist/cjs/Notice/index.cjs +34 -45
- package/dist/cjs/Notice/index.native.cjs +52 -0
- package/dist/cjs/Notice/index.native.js +34 -44
- package/dist/cjs/Notice/index.native.js.map +1 -1
- package/dist/cjs/Table/index.cjs +89 -123
- package/dist/cjs/Table/index.native.cjs +121 -0
- package/dist/cjs/Table/index.native.js +89 -124
- package/dist/cjs/Table/index.native.js.map +1 -1
- package/dist/cjs/Tabs/index.cjs +33 -45
- package/dist/cjs/Tabs/index.native.cjs +58 -0
- package/dist/cjs/Tabs/index.native.js +38 -49
- package/dist/cjs/Tabs/index.native.js.map +1 -1
- package/dist/cjs/Ul/index.cjs +19 -23
- package/dist/cjs/Ul/index.native.cjs +33 -0
- package/dist/cjs/Ul/index.native.js +19 -22
- package/dist/cjs/Ul/index.native.js.map +1 -1
- package/dist/cjs/Video/index.cjs +61 -78
- package/dist/cjs/Video/index.native.cjs +78 -0
- package/dist/cjs/Video/index.native.js +61 -79
- package/dist/cjs/Video/index.native.js.map +1 -1
- package/dist/cjs/components/Blockquote.cjs +37 -47
- package/dist/cjs/components/Blockquote.native.cjs +56 -0
- package/dist/cjs/components/Blockquote.native.js +39 -55
- package/dist/cjs/components/Blockquote.native.js.map +1 -1
- package/dist/cjs/components/Break.cjs +16 -22
- package/dist/cjs/components/Break.native.cjs +32 -0
- package/dist/cjs/components/Break.native.js +16 -21
- package/dist/cjs/components/Break.native.js.map +1 -1
- package/dist/cjs/components/CodeBlock.cjs +42 -54
- package/dist/cjs/components/CodeBlock.native.cjs +61 -0
- package/dist/cjs/components/CodeBlock.native.js +43 -57
- package/dist/cjs/components/CodeBlock.native.js.map +1 -1
- package/dist/cjs/components/Heading.cjs +42 -53
- package/dist/cjs/components/Heading.native.cjs +65 -0
- package/dist/cjs/components/Heading.native.js +43 -53
- package/dist/cjs/components/Heading.native.js.map +1 -1
- package/dist/cjs/components/HorizontalRule.cjs +25 -31
- package/dist/cjs/components/HorizontalRule.native.cjs +41 -0
- package/dist/cjs/components/HorizontalRule.native.js +25 -30
- package/dist/cjs/components/HorizontalRule.native.js.map +1 -1
- package/dist/cjs/components/Image.cjs +28 -38
- package/dist/cjs/components/Image.native.cjs +44 -0
- package/dist/cjs/components/Image.native.js +28 -41
- package/dist/cjs/components/Image.native.js.map +1 -1
- package/dist/cjs/components/InlineCode.cjs +25 -33
- package/dist/cjs/components/InlineCode.native.cjs +41 -0
- package/dist/cjs/components/InlineCode.native.js +25 -32
- package/dist/cjs/components/InlineCode.native.js.map +1 -1
- package/dist/cjs/components/InlineStyles.cjs +40 -54
- package/dist/cjs/components/InlineStyles.native.cjs +62 -0
- package/dist/cjs/components/InlineStyles.native.js +40 -53
- package/dist/cjs/components/InlineStyles.native.js.map +1 -1
- package/dist/cjs/components/Link.cjs +53 -61
- package/dist/cjs/components/Link.native.cjs +73 -0
- package/dist/cjs/components/Link.native.js +53 -61
- package/dist/cjs/components/Link.native.js.map +1 -1
- package/dist/cjs/components/List.cjs +107 -132
- package/dist/cjs/components/List.native.cjs +143 -0
- package/dist/cjs/components/List.native.js +111 -135
- package/dist/cjs/components/List.native.js.map +1 -1
- package/dist/cjs/components/Paragraph.cjs +22 -30
- package/dist/cjs/components/Paragraph.native.cjs +38 -0
- package/dist/cjs/components/Paragraph.native.js +22 -29
- package/dist/cjs/components/Paragraph.native.js.map +1 -1
- package/dist/cjs/components/Table.cjs +85 -104
- package/dist/cjs/components/Table.native.cjs +116 -0
- package/dist/cjs/components/Table.native.js +89 -111
- package/dist/cjs/components/Table.native.js.map +1 -1
- package/dist/cjs/components/index.cjs +30 -32
- package/dist/cjs/components/index.native.cjs +55 -0
- package/dist/cjs/components/index.native.js +30 -31
- package/dist/cjs/components/index.native.js.map +1 -1
- package/dist/cjs/hooks/index.cjs +9 -11
- package/dist/cjs/hooks/index.native.cjs +22 -0
- package/dist/cjs/hooks/index.native.js +9 -10
- package/dist/cjs/hooks/index.native.js.map +1 -1
- package/dist/cjs/hooks/useCompileAndEvaluateMdx.cjs +22 -29
- package/dist/cjs/hooks/useCompileAndEvaluateMdx.native.cjs +37 -0
- package/dist/cjs/hooks/useCompileAndEvaluateMdx.native.js +22 -28
- package/dist/cjs/hooks/useCompileAndEvaluateMdx.native.js.map +1 -1
- package/dist/cjs/hooks/useCompileMdx.cjs +89 -92
- package/dist/cjs/hooks/useCompileMdx.native.cjs +129 -0
- package/dist/cjs/hooks/useCompileMdx.native.js +106 -110
- package/dist/cjs/hooks/useCompileMdx.native.js.map +1 -1
- package/dist/cjs/hooks/useEvaluateMdx.cjs +34 -43
- package/dist/cjs/hooks/useEvaluateMdx.native.cjs +59 -0
- package/dist/cjs/hooks/useEvaluateMdx.native.js +36 -44
- package/dist/cjs/hooks/useEvaluateMdx.native.js.map +1 -1
- package/dist/cjs/icons/index.cjs +101 -115
- package/dist/cjs/icons/index.native.cjs +129 -0
- package/dist/cjs/icons/index.native.js +103 -118
- package/dist/cjs/icons/index.native.js.map +1 -1
- package/dist/cjs/index.cjs +18 -20
- package/dist/cjs/index.native.cjs +53 -0
- package/dist/cjs/index.native.js +18 -19
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/mdxComponents.cjs +247 -353
- package/dist/cjs/mdxComponents.native.cjs +349 -0
- package/dist/cjs/mdxComponents.native.js +300 -408
- package/dist/cjs/mdxComponents.native.js.map +1 -1
- package/dist/cjs/mermaid/MermaidBlock.cjs +84 -94
- package/dist/cjs/mermaid/MermaidBlock.native.cjs +34 -0
- package/dist/cjs/mermaid/MermaidBlock.native.js +19 -24
- package/dist/cjs/mermaid/MermaidBlock.native.js.map +1 -1
- package/dist/cjs/mermaid/index.cjs +16 -18
- package/dist/cjs/mermaid/index.native.cjs +31 -0
- package/dist/cjs/mermaid/index.native.js +16 -17
- package/dist/cjs/mermaid/index.native.js.map +1 -1
- package/dist/cjs/mermaid/mountDiagramSvg.cjs +37 -41
- package/dist/cjs/mermaid/mountDiagramSvg.native.cjs +90 -0
- package/dist/cjs/mermaid/mountDiagramSvg.native.js +74 -81
- package/dist/cjs/mermaid/mountDiagramSvg.native.js.map +1 -1
- package/dist/cjs/mermaid/renderMermaidDiagram.cjs +56 -67
- package/dist/cjs/mermaid/renderMermaidDiagram.native.cjs +37 -0
- package/dist/cjs/mermaid/renderMermaidDiagram.native.js +20 -21
- package/dist/cjs/mermaid/renderMermaidDiagram.native.js.map +1 -1
- package/dist/cjs/parser.cjs +20 -27
- package/dist/cjs/parser.native.cjs +44 -0
- package/dist/cjs/parser.native.js +20 -26
- package/dist/cjs/parser.native.js.map +1 -1
- package/dist/cjs/renderer.cjs +250 -314
- package/dist/cjs/renderer.native.cjs +295 -0
- package/dist/cjs/renderer.native.js +267 -330
- package/dist/cjs/renderer.native.js.map +1 -1
- package/dist/cjs/shared/colorRamps.cjs +28 -42
- package/dist/cjs/shared/colorRamps.native.cjs +46 -0
- package/dist/cjs/shared/colorRamps.native.js +29 -42
- package/dist/cjs/shared/colorRamps.native.js.map +1 -1
- package/dist/cjs/shared/cutoffGradient.cjs +36 -38
- package/dist/cjs/shared/cutoffGradient.native.cjs +60 -0
- package/dist/cjs/shared/cutoffGradient.native.js +42 -43
- package/dist/cjs/shared/cutoffGradient.native.js.map +1 -1
- package/dist/cjs/shared/textRidesText.cjs +39 -41
- package/dist/cjs/shared/textRidesText.native.cjs +76 -0
- package/dist/cjs/shared/textRidesText.native.js +56 -59
- package/dist/cjs/shared/textRidesText.native.js.map +1 -1
- package/dist/cjs/shared/tokenPx.cjs +29 -29
- package/dist/cjs/shared/tokenPx.native.cjs +45 -0
- package/dist/cjs/shared/tokenPx.native.js +31 -30
- package/dist/cjs/shared/tokenPx.native.js.map +1 -1
- package/dist/cjs/shared/useMarkdownTableKnobs.cjs +43 -49
- package/dist/cjs/shared/useMarkdownTableKnobs.native.cjs +57 -0
- package/dist/cjs/shared/useMarkdownTableKnobs.native.js +43 -48
- package/dist/cjs/shared/useMarkdownTableKnobs.native.js.map +1 -1
- package/dist/cjs/shiki/index.cjs +9 -11
- package/dist/cjs/shiki/index.native.cjs +18 -0
- package/dist/cjs/shiki/index.native.js +9 -10
- package/dist/cjs/shiki/index.native.js.map +1 -1
- package/dist/cjs/types.cjs +9 -11
- package/dist/cjs/types.native.cjs +18 -0
- package/dist/cjs/types.native.js +9 -10
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/util/rehypeMetaAttributes.cjs +28 -32
- package/dist/cjs/util/rehypeMetaAttributes.native.cjs +44 -0
- package/dist/cjs/util/rehypeMetaAttributes.native.js +29 -32
- package/dist/cjs/util/rehypeMetaAttributes.native.js.map +1 -1
- package/dist/esm/Aside/index.mjs +76 -86
- package/dist/esm/Aside/index.mjs.map +1 -1
- package/dist/esm/Aside/index.native.js +83 -96
- package/dist/esm/Aside/index.native.js.map +1 -1
- package/dist/esm/ExternalIcon/index.mjs +16 -16
- package/dist/esm/ExternalIcon/index.mjs.map +1 -1
- package/dist/esm/ExternalIcon/index.native.js +19 -19
- package/dist/esm/ExternalIcon/index.native.js.map +1 -1
- package/dist/esm/Hr/index.mjs +3 -3
- package/dist/esm/Hr/index.mjs.map +1 -1
- package/dist/esm/Hr/index.native.js +4 -4
- package/dist/esm/Hr/index.native.js.map +1 -1
- package/dist/esm/Li/index.mjs +8 -8
- package/dist/esm/Li/index.mjs.map +1 -1
- package/dist/esm/Li/index.native.js +8 -8
- package/dist/esm/Li/index.native.js.map +1 -1
- package/dist/esm/Markdown.mjs +26 -25
- package/dist/esm/Markdown.mjs.map +1 -1
- package/dist/esm/Markdown.native.js +27 -26
- package/dist/esm/Markdown.native.js.map +1 -1
- package/dist/esm/MarkdownSimpleTable/index.mjs +100 -113
- package/dist/esm/MarkdownSimpleTable/index.mjs.map +1 -1
- package/dist/esm/MarkdownSimpleTable/index.native.js +125 -142
- package/dist/esm/MarkdownSimpleTable/index.native.js.map +1 -1
- package/dist/esm/Mdx/index.mjs +15 -32
- package/dist/esm/Mdx/index.mjs.map +1 -1
- package/dist/esm/Mdx/index.native.js +16 -33
- package/dist/esm/Mdx/index.native.js.map +1 -1
- package/dist/esm/MdxCodeBlock/index.mjs +125 -152
- package/dist/esm/MdxCodeBlock/index.mjs.map +1 -1
- package/dist/esm/MdxCodeBlock/index.native.js +137 -172
- package/dist/esm/MdxCodeBlock/index.native.js.map +1 -1
- package/dist/esm/MdxCodeBlock/mdxCodeBlockContext.mjs +2 -0
- package/dist/esm/MdxCodeBlock/mdxCodeBlockContext.mjs.map +1 -1
- package/dist/esm/MdxCodeBlock/mdxCodeBlockContext.native.js +2 -0
- package/dist/esm/MdxCodeBlock/mdxCodeBlockContext.native.js.map +1 -1
- package/dist/esm/Notice/index.mjs +22 -27
- package/dist/esm/Notice/index.mjs.map +1 -1
- package/dist/esm/Notice/index.native.js +23 -28
- package/dist/esm/Notice/index.native.js.map +1 -1
- package/dist/esm/Table/index.mjs +73 -103
- package/dist/esm/Table/index.mjs.map +1 -1
- package/dist/esm/Table/index.native.js +74 -106
- package/dist/esm/Table/index.native.js.map +1 -1
- package/dist/esm/Tabs/index.mjs +20 -28
- package/dist/esm/Tabs/index.mjs.map +1 -1
- package/dist/esm/Tabs/index.native.js +26 -34
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/Ul/index.mjs +7 -5
- package/dist/esm/Ul/index.mjs.map +1 -1
- package/dist/esm/Ul/index.native.js +7 -5
- package/dist/esm/Ul/index.native.js.map +1 -1
- package/dist/esm/Video/index.mjs +50 -61
- package/dist/esm/Video/index.mjs.map +1 -1
- package/dist/esm/Video/index.native.js +51 -64
- package/dist/esm/Video/index.native.js.map +1 -1
- package/dist/esm/components/Blockquote.mjs +27 -31
- package/dist/esm/components/Blockquote.mjs.map +1 -1
- package/dist/esm/components/Blockquote.native.js +30 -41
- package/dist/esm/components/Blockquote.native.js.map +1 -1
- package/dist/esm/components/Break.mjs +4 -4
- package/dist/esm/components/Break.mjs.map +1 -1
- package/dist/esm/components/Break.native.js +5 -5
- package/dist/esm/components/Break.native.js.map +1 -1
- package/dist/esm/components/CodeBlock.mjs +31 -37
- package/dist/esm/components/CodeBlock.mjs.map +1 -1
- package/dist/esm/components/CodeBlock.native.js +33 -42
- package/dist/esm/components/CodeBlock.native.js.map +1 -1
- package/dist/esm/components/Heading.mjs +30 -35
- package/dist/esm/components/Heading.mjs.map +1 -1
- package/dist/esm/components/Heading.native.js +32 -37
- package/dist/esm/components/Heading.native.js.map +1 -1
- package/dist/esm/components/HorizontalRule.mjs +13 -13
- package/dist/esm/components/HorizontalRule.mjs.map +1 -1
- package/dist/esm/components/HorizontalRule.native.js +14 -14
- package/dist/esm/components/HorizontalRule.native.js.map +1 -1
- package/dist/esm/components/Image.mjs +17 -21
- package/dist/esm/components/Image.mjs.map +1 -1
- package/dist/esm/components/Image.native.js +18 -26
- package/dist/esm/components/Image.native.js.map +1 -1
- package/dist/esm/components/InlineCode.mjs +13 -15
- package/dist/esm/components/InlineCode.mjs.map +1 -1
- package/dist/esm/components/InlineCode.native.js +14 -16
- package/dist/esm/components/InlineCode.native.js.map +1 -1
- package/dist/esm/components/InlineStyles.mjs +26 -36
- package/dist/esm/components/InlineStyles.mjs.map +1 -1
- package/dist/esm/components/InlineStyles.native.js +27 -37
- package/dist/esm/components/InlineStyles.native.js.map +1 -1
- package/dist/esm/components/Link.mjs +41 -43
- package/dist/esm/components/Link.mjs.map +1 -1
- package/dist/esm/components/Link.native.js +42 -45
- package/dist/esm/components/Link.native.js.map +1 -1
- package/dist/esm/components/List.mjs +95 -116
- package/dist/esm/components/List.mjs.map +1 -1
- package/dist/esm/components/List.native.js +100 -121
- package/dist/esm/components/List.native.js.map +1 -1
- package/dist/esm/components/Paragraph.mjs +11 -13
- package/dist/esm/components/Paragraph.mjs.map +1 -1
- package/dist/esm/components/Paragraph.native.js +12 -14
- package/dist/esm/components/Paragraph.native.js.map +1 -1
- package/dist/esm/components/Table.mjs +71 -86
- package/dist/esm/components/Table.mjs.map +1 -1
- package/dist/esm/components/Table.native.js +76 -95
- package/dist/esm/components/Table.native.js.map +1 -1
- package/dist/esm/components/index.mjs +4 -4
- package/dist/esm/components/index.native.js +4 -4
- package/dist/esm/hooks/index.mjs +5 -4
- package/dist/esm/hooks/index.native.js +5 -4
- package/dist/esm/hooks/useCompileAndEvaluateMdx.mjs +10 -11
- package/dist/esm/hooks/useCompileAndEvaluateMdx.mjs.map +1 -1
- package/dist/esm/hooks/useCompileAndEvaluateMdx.native.js +10 -11
- package/dist/esm/hooks/useCompileAndEvaluateMdx.native.js.map +1 -1
- package/dist/esm/hooks/useCompileMdx.mjs +73 -67
- package/dist/esm/hooks/useCompileMdx.mjs.map +1 -1
- package/dist/esm/hooks/useCompileMdx.native.js +90 -86
- package/dist/esm/hooks/useCompileMdx.native.js.map +1 -1
- package/dist/esm/hooks/useEvaluateMdx.mjs +19 -17
- package/dist/esm/hooks/useEvaluateMdx.mjs.map +1 -1
- package/dist/esm/hooks/useEvaluateMdx.native.js +21 -19
- package/dist/esm/hooks/useEvaluateMdx.native.js.map +1 -1
- package/dist/esm/icons/index.mjs +86 -96
- package/dist/esm/icons/index.mjs.map +1 -1
- package/dist/esm/icons/index.native.js +89 -101
- package/dist/esm/icons/index.native.js.map +1 -1
- package/dist/esm/index.mjs +34 -18
- package/dist/esm/index.native.js +34 -18
- package/dist/esm/mdxComponents.mjs +234 -336
- package/dist/esm/mdxComponents.mjs.map +1 -1
- package/dist/esm/mdxComponents.native.js +288 -393
- package/dist/esm/mdxComponents.native.js.map +1 -1
- package/dist/esm/mermaid/MermaidBlock.mjs +72 -76
- package/dist/esm/mermaid/MermaidBlock.mjs.map +1 -1
- package/dist/esm/mermaid/MermaidBlock.native.js +8 -8
- package/dist/esm/mermaid/MermaidBlock.native.js.map +1 -1
- package/dist/esm/mermaid/index.mjs +2 -2
- package/dist/esm/mermaid/index.native.js +2 -2
- package/dist/esm/mermaid/mountDiagramSvg.mjs +24 -23
- package/dist/esm/mermaid/mountDiagramSvg.mjs.map +1 -1
- package/dist/esm/mermaid/mountDiagramSvg.native.js +61 -64
- package/dist/esm/mermaid/mountDiagramSvg.native.js.map +1 -1
- package/dist/esm/mermaid/renderMermaidDiagram.mjs +39 -42
- package/dist/esm/mermaid/renderMermaidDiagram.mjs.map +1 -1
- package/dist/esm/mermaid/renderMermaidDiagram.native.js +6 -5
- package/dist/esm/mermaid/renderMermaidDiagram.native.js.map +1 -1
- package/dist/esm/parser.mjs +4 -2
- package/dist/esm/parser.mjs.map +1 -1
- package/dist/esm/parser.native.js +4 -2
- package/dist/esm/parser.native.js.map +1 -1
- package/dist/esm/renderer.mjs +238 -298
- package/dist/esm/renderer.mjs.map +1 -1
- package/dist/esm/renderer.native.js +256 -316
- package/dist/esm/renderer.native.js.map +1 -1
- package/dist/esm/shared/colorRamps.mjs +14 -25
- package/dist/esm/shared/colorRamps.mjs.map +1 -1
- package/dist/esm/shared/colorRamps.native.js +14 -25
- package/dist/esm/shared/colorRamps.native.js.map +1 -1
- package/dist/esm/shared/cutoffGradient.mjs +23 -21
- package/dist/esm/shared/cutoffGradient.mjs.map +1 -1
- package/dist/esm/shared/cutoffGradient.native.js +29 -27
- package/dist/esm/shared/cutoffGradient.native.js.map +1 -1
- package/dist/esm/shared/textRidesText.mjs +26 -24
- package/dist/esm/shared/textRidesText.mjs.map +1 -1
- package/dist/esm/shared/textRidesText.native.js +43 -43
- package/dist/esm/shared/textRidesText.native.js.map +1 -1
- package/dist/esm/shared/tokenPx.mjs +17 -11
- package/dist/esm/shared/tokenPx.mjs.map +1 -1
- package/dist/esm/shared/tokenPx.native.js +19 -13
- package/dist/esm/shared/tokenPx.native.js.map +1 -1
- package/dist/esm/shared/useMarkdownTableKnobs.mjs +31 -31
- package/dist/esm/shared/useMarkdownTableKnobs.mjs.map +1 -1
- package/dist/esm/shared/useMarkdownTableKnobs.native.js +31 -31
- package/dist/esm/shared/useMarkdownTableKnobs.native.js.map +1 -1
- package/dist/esm/shiki/index.mjs +0 -2
- package/dist/esm/shiki/index.native.js +0 -2
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/types.native.js +0 -2
- package/dist/esm/util/rehypeMetaAttributes.mjs +16 -14
- package/dist/esm/util/rehypeMetaAttributes.mjs.map +1 -1
- package/dist/esm/util/rehypeMetaAttributes.native.js +17 -15
- package/dist/esm/util/rehypeMetaAttributes.native.js.map +1 -1
- package/dist/jsx/Aside/index.mjs +76 -86
- package/dist/jsx/Aside/index.mjs.map +1 -1
- package/dist/jsx/Aside/index.native.cjs +119 -0
- package/dist/jsx/Aside/index.native.js +93 -109
- package/dist/jsx/Aside/index.native.js.map +1 -1
- package/dist/jsx/ExternalIcon/index.mjs +16 -16
- package/dist/jsx/ExternalIcon/index.mjs.map +1 -1
- package/dist/jsx/ExternalIcon/index.native.cjs +46 -0
- package/dist/jsx/ExternalIcon/index.native.js +30 -35
- package/dist/jsx/ExternalIcon/index.native.js.map +1 -1
- package/dist/jsx/Hr/index.mjs +3 -3
- package/dist/jsx/Hr/index.mjs.map +1 -1
- package/dist/jsx/Hr/index.native.cjs +30 -0
- package/dist/jsx/Hr/index.native.js +15 -20
- package/dist/jsx/Hr/index.native.js.map +1 -1
- package/dist/jsx/Li/index.mjs +8 -8
- package/dist/jsx/Li/index.mjs.map +1 -1
- package/dist/jsx/Li/index.native.cjs +34 -0
- package/dist/jsx/Li/index.native.js +20 -25
- package/dist/jsx/Li/index.native.js.map +1 -1
- package/dist/jsx/Markdown.mjs +26 -25
- package/dist/jsx/Markdown.mjs.map +1 -1
- package/dist/jsx/Markdown.native.cjs +56 -0
- package/dist/jsx/Markdown.native.js +38 -42
- package/dist/jsx/Markdown.native.js.map +1 -1
- package/dist/jsx/MarkdownSimpleTable/index.mjs +100 -113
- package/dist/jsx/MarkdownSimpleTable/index.mjs.map +1 -1
- package/dist/jsx/MarkdownSimpleTable/index.native.cjs +159 -0
- package/dist/jsx/MarkdownSimpleTable/index.native.js +136 -158
- package/dist/jsx/MarkdownSimpleTable/index.native.js.map +1 -1
- package/dist/jsx/Mdx/index.mjs +15 -32
- package/dist/jsx/Mdx/index.mjs.map +1 -1
- package/dist/jsx/Mdx/index.native.cjs +46 -0
- package/dist/jsx/Mdx/index.native.js +27 -49
- package/dist/jsx/Mdx/index.native.js.map +1 -1
- package/dist/jsx/MdxCodeBlock/index.mjs +125 -152
- package/dist/jsx/MdxCodeBlock/index.mjs.map +1 -1
- package/dist/jsx/MdxCodeBlock/index.native.cjs +181 -0
- package/dist/jsx/MdxCodeBlock/index.native.js +150 -195
- package/dist/jsx/MdxCodeBlock/index.native.js.map +1 -1
- package/dist/jsx/MdxCodeBlock/mdxCodeBlockContext.mjs +2 -0
- package/dist/jsx/MdxCodeBlock/mdxCodeBlockContext.mjs.map +1 -1
- package/dist/jsx/MdxCodeBlock/mdxCodeBlockContext.native.cjs +27 -0
- package/dist/jsx/MdxCodeBlock/mdxCodeBlockContext.native.js +14 -17
- package/dist/jsx/MdxCodeBlock/mdxCodeBlockContext.native.js.map +1 -1
- package/dist/jsx/Notice/index.mjs +22 -27
- package/dist/jsx/Notice/index.mjs.map +1 -1
- package/dist/jsx/Notice/index.native.cjs +52 -0
- package/dist/jsx/Notice/index.native.js +34 -44
- package/dist/jsx/Notice/index.native.js.map +1 -1
- package/dist/jsx/Table/index.mjs +73 -103
- package/dist/jsx/Table/index.mjs.map +1 -1
- package/dist/jsx/Table/index.native.cjs +121 -0
- package/dist/jsx/Table/index.native.js +89 -124
- package/dist/jsx/Table/index.native.js.map +1 -1
- package/dist/jsx/Tabs/index.mjs +20 -28
- package/dist/jsx/Tabs/index.mjs.map +1 -1
- package/dist/jsx/Tabs/index.native.cjs +58 -0
- package/dist/jsx/Tabs/index.native.js +38 -49
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Ul/index.mjs +7 -5
- package/dist/jsx/Ul/index.mjs.map +1 -1
- package/dist/jsx/Ul/index.native.cjs +33 -0
- package/dist/jsx/Ul/index.native.js +19 -22
- package/dist/jsx/Ul/index.native.js.map +1 -1
- package/dist/jsx/Video/index.mjs +50 -61
- package/dist/jsx/Video/index.mjs.map +1 -1
- package/dist/jsx/Video/index.native.cjs +78 -0
- package/dist/jsx/Video/index.native.js +61 -79
- package/dist/jsx/Video/index.native.js.map +1 -1
- package/dist/jsx/components/Blockquote.mjs +27 -31
- package/dist/jsx/components/Blockquote.mjs.map +1 -1
- package/dist/jsx/components/Blockquote.native.cjs +56 -0
- package/dist/jsx/components/Blockquote.native.js +39 -55
- package/dist/jsx/components/Blockquote.native.js.map +1 -1
- package/dist/jsx/components/Break.mjs +4 -4
- package/dist/jsx/components/Break.mjs.map +1 -1
- package/dist/jsx/components/Break.native.cjs +32 -0
- package/dist/jsx/components/Break.native.js +16 -21
- package/dist/jsx/components/Break.native.js.map +1 -1
- package/dist/jsx/components/CodeBlock.mjs +31 -37
- package/dist/jsx/components/CodeBlock.mjs.map +1 -1
- package/dist/jsx/components/CodeBlock.native.cjs +61 -0
- package/dist/jsx/components/CodeBlock.native.js +43 -57
- package/dist/jsx/components/CodeBlock.native.js.map +1 -1
- package/dist/jsx/components/Heading.mjs +30 -35
- package/dist/jsx/components/Heading.mjs.map +1 -1
- package/dist/jsx/components/Heading.native.cjs +65 -0
- package/dist/jsx/components/Heading.native.js +43 -53
- package/dist/jsx/components/Heading.native.js.map +1 -1
- package/dist/jsx/components/HorizontalRule.mjs +13 -13
- package/dist/jsx/components/HorizontalRule.mjs.map +1 -1
- package/dist/jsx/components/HorizontalRule.native.cjs +41 -0
- package/dist/jsx/components/HorizontalRule.native.js +25 -30
- package/dist/jsx/components/HorizontalRule.native.js.map +1 -1
- package/dist/jsx/components/Image.mjs +17 -21
- package/dist/jsx/components/Image.mjs.map +1 -1
- package/dist/jsx/components/Image.native.cjs +44 -0
- package/dist/jsx/components/Image.native.js +28 -41
- package/dist/jsx/components/Image.native.js.map +1 -1
- package/dist/jsx/components/InlineCode.mjs +13 -15
- package/dist/jsx/components/InlineCode.mjs.map +1 -1
- package/dist/jsx/components/InlineCode.native.cjs +41 -0
- package/dist/jsx/components/InlineCode.native.js +25 -32
- package/dist/jsx/components/InlineCode.native.js.map +1 -1
- package/dist/jsx/components/InlineStyles.mjs +26 -36
- package/dist/jsx/components/InlineStyles.mjs.map +1 -1
- package/dist/jsx/components/InlineStyles.native.cjs +62 -0
- package/dist/jsx/components/InlineStyles.native.js +40 -53
- package/dist/jsx/components/InlineStyles.native.js.map +1 -1
- package/dist/jsx/components/Link.mjs +41 -43
- package/dist/jsx/components/Link.mjs.map +1 -1
- package/dist/jsx/components/Link.native.cjs +73 -0
- package/dist/jsx/components/Link.native.js +53 -61
- package/dist/jsx/components/Link.native.js.map +1 -1
- package/dist/jsx/components/List.mjs +95 -116
- package/dist/jsx/components/List.mjs.map +1 -1
- package/dist/jsx/components/List.native.cjs +143 -0
- package/dist/jsx/components/List.native.js +111 -135
- package/dist/jsx/components/List.native.js.map +1 -1
- package/dist/jsx/components/Paragraph.mjs +11 -13
- package/dist/jsx/components/Paragraph.mjs.map +1 -1
- package/dist/jsx/components/Paragraph.native.cjs +38 -0
- package/dist/jsx/components/Paragraph.native.js +22 -29
- package/dist/jsx/components/Paragraph.native.js.map +1 -1
- package/dist/jsx/components/Table.mjs +71 -86
- package/dist/jsx/components/Table.mjs.map +1 -1
- package/dist/jsx/components/Table.native.cjs +116 -0
- package/dist/jsx/components/Table.native.js +89 -111
- package/dist/jsx/components/Table.native.js.map +1 -1
- package/dist/jsx/components/index.mjs +4 -4
- package/dist/jsx/components/index.native.cjs +55 -0
- package/dist/jsx/components/index.native.js +30 -31
- package/dist/jsx/components/index.native.js.map +1 -1
- package/dist/jsx/hooks/index.mjs +5 -4
- package/dist/jsx/hooks/index.native.cjs +22 -0
- package/dist/jsx/hooks/index.native.js +9 -10
- package/dist/jsx/hooks/index.native.js.map +1 -1
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.mjs +10 -11
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.mjs.map +1 -1
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.native.cjs +37 -0
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.native.js +22 -28
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.native.js.map +1 -1
- package/dist/jsx/hooks/useCompileMdx.mjs +73 -67
- package/dist/jsx/hooks/useCompileMdx.mjs.map +1 -1
- package/dist/jsx/hooks/useCompileMdx.native.cjs +129 -0
- package/dist/jsx/hooks/useCompileMdx.native.js +106 -110
- package/dist/jsx/hooks/useCompileMdx.native.js.map +1 -1
- package/dist/jsx/hooks/useEvaluateMdx.mjs +19 -17
- package/dist/jsx/hooks/useEvaluateMdx.mjs.map +1 -1
- package/dist/jsx/hooks/useEvaluateMdx.native.cjs +59 -0
- package/dist/jsx/hooks/useEvaluateMdx.native.js +36 -44
- package/dist/jsx/hooks/useEvaluateMdx.native.js.map +1 -1
- package/dist/jsx/icons/index.mjs +86 -96
- package/dist/jsx/icons/index.mjs.map +1 -1
- package/dist/jsx/icons/index.native.cjs +129 -0
- package/dist/jsx/icons/index.native.js +103 -118
- package/dist/jsx/icons/index.native.js.map +1 -1
- package/dist/jsx/index.js +34 -18
- package/dist/jsx/index.mjs +34 -18
- package/dist/jsx/index.native.cjs +53 -0
- package/dist/jsx/index.native.js +18 -19
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/mdxComponents.mjs +234 -336
- package/dist/jsx/mdxComponents.mjs.map +1 -1
- package/dist/jsx/mdxComponents.native.cjs +349 -0
- package/dist/jsx/mdxComponents.native.js +300 -408
- package/dist/jsx/mdxComponents.native.js.map +1 -1
- package/dist/jsx/mermaid/MermaidBlock.mjs +72 -76
- package/dist/jsx/mermaid/MermaidBlock.mjs.map +1 -1
- package/dist/jsx/mermaid/MermaidBlock.native.cjs +34 -0
- package/dist/jsx/mermaid/MermaidBlock.native.js +19 -24
- package/dist/jsx/mermaid/MermaidBlock.native.js.map +1 -1
- package/dist/jsx/mermaid/index.mjs +2 -2
- package/dist/jsx/mermaid/index.native.cjs +31 -0
- package/dist/jsx/mermaid/index.native.js +16 -17
- package/dist/jsx/mermaid/index.native.js.map +1 -1
- package/dist/jsx/mermaid/mountDiagramSvg.mjs +24 -23
- package/dist/jsx/mermaid/mountDiagramSvg.mjs.map +1 -1
- package/dist/jsx/mermaid/mountDiagramSvg.native.cjs +90 -0
- package/dist/jsx/mermaid/mountDiagramSvg.native.js +74 -81
- package/dist/jsx/mermaid/mountDiagramSvg.native.js.map +1 -1
- package/dist/jsx/mermaid/renderMermaidDiagram.mjs +39 -42
- package/dist/jsx/mermaid/renderMermaidDiagram.mjs.map +1 -1
- package/dist/jsx/mermaid/renderMermaidDiagram.native.cjs +37 -0
- package/dist/jsx/mermaid/renderMermaidDiagram.native.js +20 -21
- package/dist/jsx/mermaid/renderMermaidDiagram.native.js.map +1 -1
- package/dist/jsx/parser.mjs +4 -2
- package/dist/jsx/parser.mjs.map +1 -1
- package/dist/jsx/parser.native.cjs +44 -0
- package/dist/jsx/parser.native.js +20 -26
- package/dist/jsx/parser.native.js.map +1 -1
- package/dist/jsx/renderer.mjs +238 -298
- package/dist/jsx/renderer.mjs.map +1 -1
- package/dist/jsx/renderer.native.cjs +295 -0
- package/dist/jsx/renderer.native.js +267 -330
- package/dist/jsx/renderer.native.js.map +1 -1
- package/dist/jsx/shared/colorRamps.mjs +14 -25
- package/dist/jsx/shared/colorRamps.mjs.map +1 -1
- package/dist/jsx/shared/colorRamps.native.cjs +46 -0
- package/dist/jsx/shared/colorRamps.native.js +29 -42
- package/dist/jsx/shared/colorRamps.native.js.map +1 -1
- package/dist/jsx/shared/cutoffGradient.mjs +23 -21
- package/dist/jsx/shared/cutoffGradient.mjs.map +1 -1
- package/dist/jsx/shared/cutoffGradient.native.cjs +60 -0
- package/dist/jsx/shared/cutoffGradient.native.js +42 -43
- package/dist/jsx/shared/cutoffGradient.native.js.map +1 -1
- package/dist/jsx/shared/textRidesText.mjs +26 -24
- package/dist/jsx/shared/textRidesText.mjs.map +1 -1
- package/dist/jsx/shared/textRidesText.native.cjs +76 -0
- package/dist/jsx/shared/textRidesText.native.js +56 -59
- package/dist/jsx/shared/textRidesText.native.js.map +1 -1
- package/dist/jsx/shared/tokenPx.mjs +17 -11
- package/dist/jsx/shared/tokenPx.mjs.map +1 -1
- package/dist/jsx/shared/tokenPx.native.cjs +45 -0
- package/dist/jsx/shared/tokenPx.native.js +31 -30
- package/dist/jsx/shared/tokenPx.native.js.map +1 -1
- package/dist/jsx/shared/useMarkdownTableKnobs.mjs +31 -31
- package/dist/jsx/shared/useMarkdownTableKnobs.mjs.map +1 -1
- package/dist/jsx/shared/useMarkdownTableKnobs.native.cjs +57 -0
- package/dist/jsx/shared/useMarkdownTableKnobs.native.js +43 -48
- package/dist/jsx/shared/useMarkdownTableKnobs.native.js.map +1 -1
- package/dist/jsx/shiki/index.mjs +0 -2
- package/dist/jsx/shiki/index.native.cjs +18 -0
- package/dist/jsx/shiki/index.native.js +9 -10
- package/dist/jsx/shiki/index.native.js.map +1 -1
- package/dist/jsx/types.mjs +0 -2
- package/dist/jsx/types.native.cjs +18 -0
- package/dist/jsx/types.native.js +9 -10
- package/dist/jsx/types.native.js.map +1 -1
- package/dist/jsx/util/rehypeMetaAttributes.mjs +16 -14
- package/dist/jsx/util/rehypeMetaAttributes.mjs.map +1 -1
- package/dist/jsx/util/rehypeMetaAttributes.native.cjs +44 -0
- package/dist/jsx/util/rehypeMetaAttributes.native.js +29 -32
- package/dist/jsx/util/rehypeMetaAttributes.native.js.map +1 -1
- package/package.json +16 -16
- package/src/Aside/index.tsx +10 -10
- package/src/Li/index.tsx +3 -3
- package/src/Markdown.stories.tsx +3 -3
- package/src/MdxCodeBlock/index.tsx +8 -9
- package/src/Notice/index.tsx +1 -1
- package/src/Renderer.stories.tsx +7 -7
- package/src/Table/index.tsx +1 -1
- package/src/Tabs/index.tsx +1 -1
- package/src/Ul/index.ts +4 -4
- package/src/Video/index.tsx +5 -5
- package/src/codeInk.spec.tsx +16 -10
- package/src/components/Blockquote.tsx +5 -7
- package/src/components/CodeBlock.tsx +2 -2
- package/src/components/Heading.tsx +4 -4
- package/src/components/HorizontalRule.tsx +2 -2
- package/src/components/Image.tsx +1 -1
- package/src/components/InlineCode.tsx +3 -3
- package/src/components/Link.tsx +7 -10
- package/src/components/List.tsx +17 -17
- package/src/components/Paragraph.tsx +1 -1
- package/src/components/Table.tsx +1 -1
- package/src/components/markdownPrimitives.spec.tsx +5 -3
- package/src/docBlocks.spec.tsx +20 -6
- package/src/icons/Icons.stories.tsx +23 -23
- package/src/icons/icons.spec.tsx +1 -1
- package/src/icons/index.tsx +8 -5
- package/src/mdx.spec.tsx +2 -2
- package/src/mdxComponents.tsx +31 -32
- package/src/mermaid/MermaidBlock.stories.tsx +2 -2
- package/src/mermaid/MermaidBlock.tsx +3 -3
- package/src/mermaid/MermaidBlockNative.stories.tsx +3 -3
- package/src/mermaid/MountDiagramSvg.stories.tsx +11 -11
- package/src/mermaid/RenderMermaidDiagram.stories.tsx +11 -11
- package/src/renderer.spec.tsx +2 -2
- package/src/renderer.tsx +1 -3
- package/src/shared/colorRamps.ts +9 -9
- package/src/shared/tokenPx.ts +7 -8
- package/src/shared/useMarkdownTableKnobs.ts +1 -1
- package/src/stories/Blocks.stories.tsx +8 -8
- package/src/stories/Callouts.stories.tsx +8 -8
- package/src/stories/Code.stories.tsx +8 -8
- package/src/stories/Inline.stories.tsx +6 -6
- package/src/stories/Mdx.stories.tsx +5 -5
- package/src/stories/Media.stories.tsx +6 -6
- package/src/stories/Tables.stories.tsx +7 -7
- package/types/Aside/index.d.ts +2 -2
- package/types/Aside/index.d.ts.map +1 -1
- package/types/ExternalIcon/index.d.ts +1 -1
- package/types/ExternalIcon/index.d.ts.map +1 -1
- package/types/Hr/index.d.ts +1 -1
- package/types/Hr/index.d.ts.map +1 -1
- package/types/Li/index.d.ts +1 -2
- package/types/Li/index.d.ts.map +1 -1
- package/types/Markdown.d.ts +1 -1
- package/types/Markdown.d.ts.map +1 -1
- package/types/MarkdownSimpleTable/index.d.ts +1 -1
- package/types/MarkdownSimpleTable/index.d.ts.map +1 -1
- package/types/Mdx/index.d.ts +1 -1
- package/types/Mdx/index.d.ts.map +1 -1
- package/types/MdxCodeBlock/index.d.ts +1 -1
- package/types/MdxCodeBlock/index.d.ts.map +1 -1
- package/types/Notice/index.d.ts +1 -1
- package/types/Notice/index.d.ts.map +1 -1
- package/types/Table/index.d.ts +6 -6
- package/types/Table/index.d.ts.map +1 -1
- package/types/Tabs/index.d.ts +2 -2
- package/types/Tabs/index.d.ts.map +1 -1
- package/types/Ul/index.d.ts +1 -4
- package/types/Ul/index.d.ts.map +1 -1
- package/types/Video/index.d.ts +1 -1
- package/types/Video/index.d.ts.map +1 -1
- package/types/components/Blockquote.d.ts +1 -1
- package/types/components/Blockquote.d.ts.map +1 -1
- package/types/components/Break.d.ts +1 -1
- package/types/components/Break.d.ts.map +1 -1
- package/types/components/CodeBlock.d.ts +1 -1
- package/types/components/CodeBlock.d.ts.map +1 -1
- package/types/components/Heading.d.ts +1 -1
- package/types/components/Heading.d.ts.map +1 -1
- package/types/components/HorizontalRule.d.ts +1 -1
- package/types/components/HorizontalRule.d.ts.map +1 -1
- package/types/components/Image.d.ts +1 -1
- package/types/components/Image.d.ts.map +1 -1
- package/types/components/InlineCode.d.ts +1 -1
- package/types/components/InlineCode.d.ts.map +1 -1
- package/types/components/InlineStyles.d.ts +3 -3
- package/types/components/InlineStyles.d.ts.map +1 -1
- package/types/components/Link.d.ts +1 -1
- package/types/components/Link.d.ts.map +1 -1
- package/types/components/List.d.ts +2 -2
- package/types/components/List.d.ts.map +1 -1
- package/types/components/Paragraph.d.ts +1 -1
- package/types/components/Paragraph.d.ts.map +1 -1
- package/types/components/Table.d.ts +3 -3
- package/types/components/Table.d.ts.map +1 -1
- package/types/icons/index.d.ts +4 -4
- package/types/icons/index.d.ts.map +1 -1
- package/types/mdxComponents.d.ts +1 -4
- package/types/mdxComponents.d.ts.map +1 -1
- package/types/mermaid/MermaidBlock.d.ts +1 -1
- package/types/mermaid/MermaidBlock.d.ts.map +1 -1
- package/types/mermaid/MermaidBlock.native.d.ts +1 -1
- package/types/mermaid/MermaidBlock.native.d.ts.map +1 -1
- package/types/renderer.d.ts.map +1 -1
- package/types/shared/colorRamps.d.ts +9 -9
- package/types/shared/tokenPx.d.ts.map +1 -1
- package/types/shared/useMarkdownTableKnobs.d.ts +3 -1
- package/types/shared/useMarkdownTableKnobs.d.ts.map +1 -1
- package/dist/esm/components/index.mjs.map +0 -1
- package/dist/esm/components/index.native.js.map +0 -1
- package/dist/esm/hooks/index.mjs.map +0 -1
- package/dist/esm/hooks/index.native.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/mermaid/index.mjs.map +0 -1
- package/dist/esm/mermaid/index.native.js.map +0 -1
- package/dist/esm/shiki/index.mjs.map +0 -1
- package/dist/esm/shiki/index.native.js.map +0 -1
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/types.native.js.map +0 -1
- package/dist/jsx/components/index.mjs.map +0 -1
- package/dist/jsx/hooks/index.mjs.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/mermaid/index.mjs.map +0 -1
- package/dist/jsx/shiki/index.mjs.map +0 -1
- package/dist/jsx/types.mjs.map +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
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", { value: true }), mod);
|
|
23
|
+
var Markdown_exports = {};
|
|
24
|
+
__export(Markdown_exports, { Markdown: () => Markdown });
|
|
25
|
+
module.exports = __toCommonJS(Markdown_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_tamagui = require("tamagui");
|
|
29
|
+
var import_parser = require("./parser.native.js");
|
|
30
|
+
var import_renderer = require("./renderer.native.js");
|
|
31
|
+
function Markdown(param) {
|
|
32
|
+
var { children, components, codeTheme = "auto", ...viewProps } = param;
|
|
33
|
+
var rendered = (0, import_react.useMemo)(function() {
|
|
34
|
+
if (!children || typeof children !== "string") {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
var ast = (0, import_parser.parseMarkdown)(children);
|
|
39
|
+
return (0, import_renderer.renderMarkdown)(ast, {
|
|
40
|
+
components,
|
|
41
|
+
codeTheme
|
|
42
|
+
});
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.error("Markdown parsing error:", error);
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}, [
|
|
48
|
+
children,
|
|
49
|
+
components,
|
|
50
|
+
codeTheme
|
|
51
|
+
]);
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
53
|
+
...viewProps,
|
|
54
|
+
children: rendered
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -5,27 +5,23 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
12
|
};
|
|
13
13
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
21
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
23
|
var Markdown_exports = {};
|
|
26
|
-
__export(Markdown_exports, {
|
|
27
|
-
Markdown: () => Markdown
|
|
28
|
-
});
|
|
24
|
+
__export(Markdown_exports, { Markdown: () => Markdown });
|
|
29
25
|
module.exports = __toCommonJS(Markdown_exports);
|
|
30
26
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
27
|
var import_react = require("react");
|
|
@@ -33,30 +29,30 @@ var import_tamagui = require("tamagui");
|
|
|
33
29
|
var import_parser = require("./parser.native.js");
|
|
34
30
|
var import_renderer = require("./renderer.native.js");
|
|
35
31
|
function Markdown(param) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
});
|
|
32
|
+
var { children, components, codeTheme = "auto", ...viewProps } = param;
|
|
33
|
+
var rendered = (0, import_react.useMemo)(function() {
|
|
34
|
+
if (!children || typeof children !== "string") {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
var ast = (0, import_parser.parseMarkdown)(children);
|
|
39
|
+
return (0, import_renderer.renderMarkdown)(ast, {
|
|
40
|
+
components,
|
|
41
|
+
codeTheme
|
|
42
|
+
});
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.error("Markdown parsing error:", error);
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}, [
|
|
48
|
+
children,
|
|
49
|
+
components,
|
|
50
|
+
codeTheme
|
|
51
|
+
]);
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
53
|
+
...viewProps,
|
|
54
|
+
children: rendered
|
|
55
|
+
});
|
|
61
56
|
}
|
|
57
|
+
|
|
62
58
|
//# sourceMappingURL=Markdown.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Markdown.native.js","names":[],"sources":["cjs/Markdown.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Markdown_exports = {};\n__export(Markdown_exports, {\n Markdown: () => Markdown\n});\nmodule.exports = __toCommonJS(Markdown_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_react = require(\"react\");\nvar import_tamagui = require(\"tamagui\");\nvar import_parser = require(\"./parser\");\nvar import_renderer = require(\"./renderer\");\nfunction Markdown(param) {\n var { children, components, codeTheme = \"auto\", ...viewProps } = param;\n var rendered = (0, import_react.useMemo)(function() {\n if (!children || typeof children !== \"string\") {\n return null;\n }\n try {\n var ast = (0, import_parser.parseMarkdown)(children);\n return (0, import_renderer.renderMarkdown)(ast, {\n components,\n codeTheme\n });\n } catch (error) {\n console.error(\"Markdown parsing error:\", error);\n return null;\n }\n }, [\n children,\n components,\n codeTheme\n ]);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.View, {\n ...viewProps,\n children: rendered\n });\n}\n//# sourceMappingURL=Markdown.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,mBAAmB,CAAC;AACxB,SAAS,kBAAkB,EACzB,gBAAgB,SAClB,CAAC;AACD,OAAO,UAAU,aAAa,gBAAgB;AAC9C,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,eAAe,QAAQ,OAAO;AAClC,IAAI,iBAAiB,QAAQ,SAAS;AACtC,IAAI,gBAAgB,QAAQ,oBAAU;AACtC,IAAI,kBAAkB,QAAQ,sBAAY;AAC1C,SAAS,SAAS,OAAO;CACvB,IAAI,EAAE,UAAU,YAAY,YAAY,QAAQ,GAAG,cAAc;CACjE,IAAI,YAAY,GAAG,aAAa,QAAO,CAAE,WAAW;EAClD,IAAI,CAAC,YAAY,OAAO,aAAa,UAAU;GAC7C,OAAO;EACT;EACA,IAAI;GACF,IAAI,OAAO,GAAG,cAAc,cAAa,CAAE,QAAQ;GACnD,QAAQ,GAAG,gBAAgB,eAAc,CAAE,KAAK;IAC9C;IACA;GACF,CAAC;EACH,SAAS,OAAO;GACd,QAAQ,MAAM,2BAA2B,KAAK;GAC9C,OAAO;EACT;CACF,GAAG;EACD;EACA;EACA;CACF,CAAC;CACD,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,MAAM;EACtE,GAAG;EACH,UAAU;CACZ,CAAC;AACH"}
|
|
@@ -3,27 +3,23 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
10
|
};
|
|
11
11
|
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
19
|
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: true
|
|
22
|
-
}), mod);
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
21
|
var MarkdownSimpleTable_exports = {};
|
|
24
|
-
__export(MarkdownSimpleTable_exports, {
|
|
25
|
-
MarkdownSimpleTable: () => MarkdownSimpleTable
|
|
26
|
-
});
|
|
22
|
+
__export(MarkdownSimpleTable_exports, { MarkdownSimpleTable: () => MarkdownSimpleTable });
|
|
27
23
|
module.exports = __toCommonJS(MarkdownSimpleTable_exports);
|
|
28
24
|
var import_tamagui = require("tamagui");
|
|
29
25
|
var import_components = require("@multiplatform.one/components");
|
|
@@ -34,118 +30,103 @@ var import_useMarkdownTableKnobs = require("../shared/useMarkdownTableKnobs.cjs"
|
|
|
34
30
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
31
|
const markdownPattern = /(\*\*\[([^\]]+)\]\(([^)]+)\)\*\*)|(\[([^\]]+)\]\(([^)]+)\))|(\*\*([^*]+)\*\*)|(`([^`]+)`)/g;
|
|
36
32
|
function parseCell(content) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
33
|
+
if (typeof content !== "string") return content;
|
|
34
|
+
const matches = [...content.matchAll(markdownPattern)];
|
|
35
|
+
if (!matches.length) return content;
|
|
36
|
+
const parts = [];
|
|
37
|
+
let lastIndex = 0;
|
|
38
|
+
for (const match of matches) {
|
|
39
|
+
const matchIndex = match.index ?? 0;
|
|
40
|
+
if (matchIndex > lastIndex) {
|
|
41
|
+
parts.push(content.slice(lastIndex, matchIndex));
|
|
42
|
+
}
|
|
43
|
+
const key = `m-${matchIndex}`;
|
|
44
|
+
if (match[1]) {
|
|
45
|
+
parts.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Text, {
|
|
46
|
+
fontWeight: "700",
|
|
47
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Link.Link, {
|
|
48
|
+
href: match[3],
|
|
49
|
+
children: match[2]
|
|
50
|
+
})
|
|
51
|
+
}, key));
|
|
52
|
+
} else if (match[4]) {
|
|
53
|
+
parts.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Link.Link, {
|
|
54
|
+
href: match[6],
|
|
55
|
+
children: match[5]
|
|
56
|
+
}, key));
|
|
57
|
+
} else if (match[7]) {
|
|
58
|
+
parts.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Text, {
|
|
59
|
+
fontWeight: "700",
|
|
60
|
+
children: match[8]
|
|
61
|
+
}, key));
|
|
62
|
+
} else if (match[9]) {
|
|
63
|
+
parts.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_InlineCode.InlineCode, { children: match[10] }, key));
|
|
64
|
+
}
|
|
65
|
+
lastIndex = matchIndex + match[0].length;
|
|
66
|
+
}
|
|
67
|
+
if (lastIndex < content.length) {
|
|
68
|
+
parts.push(content.slice(lastIndex));
|
|
69
|
+
}
|
|
70
|
+
return parts.length === 1 ? parts[0] : parts;
|
|
71
|
+
}
|
|
72
|
+
function MarkdownSimpleTable({ headers, rows }) {
|
|
73
|
+
const { frameProps, headerTextProps, cellTextProps, cellPad, headRule } = (0, import_useMarkdownTableKnobs.useMarkdownTableKnobs)();
|
|
74
|
+
const media = (0, import_tamagui.useMedia)();
|
|
75
|
+
const isMobile = media.sm;
|
|
76
|
+
const table = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_table_primitives.Table, {
|
|
77
|
+
render: "table",
|
|
78
|
+
width: "auto",
|
|
79
|
+
cellWidth: "auto",
|
|
80
|
+
style: { tableLayout: "auto" },
|
|
81
|
+
alignCells: {
|
|
82
|
+
x: "start",
|
|
83
|
+
y: "center"
|
|
84
|
+
},
|
|
85
|
+
alignHeaderCells: {
|
|
86
|
+
x: "start",
|
|
87
|
+
y: "center"
|
|
88
|
+
},
|
|
89
|
+
...frameProps,
|
|
90
|
+
...isMobile && { minWidth: 760 },
|
|
91
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.Head, {
|
|
92
|
+
render: "thead",
|
|
93
|
+
...headRule,
|
|
94
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.Row, {
|
|
95
|
+
render: "tr",
|
|
96
|
+
rowLocation: "first",
|
|
97
|
+
children: headers.map((header, headerIdx) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.HeaderCell, {
|
|
98
|
+
render: "th",
|
|
99
|
+
...cellPad,
|
|
100
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
101
|
+
...headerTextProps,
|
|
102
|
+
children: header
|
|
103
|
+
})
|
|
104
|
+
}, `h-${headerIdx}`))
|
|
105
|
+
})
|
|
106
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.Body, {
|
|
107
|
+
render: "tbody",
|
|
108
|
+
children: rows.map((row, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.Row, {
|
|
109
|
+
render: "tr",
|
|
110
|
+
rowLocation: rowIdx === rows.length - 1 ? "last" : "middle",
|
|
111
|
+
children: row.map((cell, cellIdx) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.Cell, {
|
|
112
|
+
render: "td",
|
|
113
|
+
...cellPad,
|
|
114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
115
|
+
render: "span",
|
|
116
|
+
display: "block",
|
|
117
|
+
...cellTextProps,
|
|
118
|
+
children: parseCell(cell)
|
|
119
|
+
})
|
|
120
|
+
}, `c-${rowIdx}-${cellIdx}`))
|
|
121
|
+
}, `r-${rowIdx}`))
|
|
122
|
+
})]
|
|
123
|
+
});
|
|
124
|
+
if (isMobile) {
|
|
125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.ScrollView, {
|
|
126
|
+
horizontal: true,
|
|
127
|
+
showsHorizontalScrollIndicator: false,
|
|
128
|
+
children: table
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
return table;
|
|
77
132
|
}
|
|
78
|
-
function MarkdownSimpleTable({
|
|
79
|
-
headers,
|
|
80
|
-
rows
|
|
81
|
-
}) {
|
|
82
|
-
const {
|
|
83
|
-
frameProps,
|
|
84
|
-
headerTextProps,
|
|
85
|
-
cellTextProps,
|
|
86
|
-
cellPad,
|
|
87
|
-
headRule
|
|
88
|
-
} = (0, import_useMarkdownTableKnobs.useMarkdownTableKnobs)();
|
|
89
|
-
const media = (0, import_tamagui.useMedia)();
|
|
90
|
-
const isMobile = media.sm;
|
|
91
|
-
const table = /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_table_primitives.Table, {
|
|
92
|
-
render: "table",
|
|
93
|
-
width: "auto",
|
|
94
|
-
cellWidth: "auto",
|
|
95
|
-
style: {
|
|
96
|
-
tableLayout: "auto"
|
|
97
|
-
},
|
|
98
|
-
alignCells: {
|
|
99
|
-
x: "start",
|
|
100
|
-
y: "center"
|
|
101
|
-
},
|
|
102
|
-
alignHeaderCells: {
|
|
103
|
-
x: "start",
|
|
104
|
-
y: "center"
|
|
105
|
-
},
|
|
106
|
-
...frameProps,
|
|
107
|
-
...(isMobile && {
|
|
108
|
-
minWidth: 760
|
|
109
|
-
}),
|
|
110
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Head, {
|
|
111
|
-
render: "thead",
|
|
112
|
-
...headRule,
|
|
113
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Row, {
|
|
114
|
-
render: "tr",
|
|
115
|
-
rowLocation: "first",
|
|
116
|
-
children: headers.map((header, headerIdx) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.HeaderCell, {
|
|
117
|
-
render: "th",
|
|
118
|
-
...cellPad,
|
|
119
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
120
|
-
...headerTextProps,
|
|
121
|
-
children: header
|
|
122
|
-
})
|
|
123
|
-
}, `h-${headerIdx}`))
|
|
124
|
-
})
|
|
125
|
-
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Body, {
|
|
126
|
-
render: "tbody",
|
|
127
|
-
children: rows.map((row, rowIdx) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Row, {
|
|
128
|
-
render: "tr",
|
|
129
|
-
rowLocation: rowIdx === rows.length - 1 ? "last" : "middle",
|
|
130
|
-
children: row.map((cell, cellIdx) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_table_primitives.Table.Cell, {
|
|
131
|
-
render: "td",
|
|
132
|
-
...cellPad,
|
|
133
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
134
|
-
render: "span",
|
|
135
|
-
display: "block",
|
|
136
|
-
...cellTextProps,
|
|
137
|
-
children: parseCell(cell)
|
|
138
|
-
})
|
|
139
|
-
}, `c-${rowIdx}-${cellIdx}`))
|
|
140
|
-
}, `r-${rowIdx}`))
|
|
141
|
-
})]
|
|
142
|
-
});
|
|
143
|
-
if (isMobile) {
|
|
144
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.ScrollView, {
|
|
145
|
-
horizontal: true,
|
|
146
|
-
showsHorizontalScrollIndicator: false,
|
|
147
|
-
children: table
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
return table;
|
|
151
|
-
}
|
|
@@ -0,0 +1,159 @@
|
|
|
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", { value: true }), mod);
|
|
23
|
+
var MarkdownSimpleTable_exports = {};
|
|
24
|
+
__export(MarkdownSimpleTable_exports, { MarkdownSimpleTable: () => MarkdownSimpleTable });
|
|
25
|
+
module.exports = __toCommonJS(MarkdownSimpleTable_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
var import_tamagui = require("tamagui");
|
|
28
|
+
var import_components = require("@multiplatform.one/components");
|
|
29
|
+
var import_table_primitives = require("@multiplatform.one/table-primitives");
|
|
30
|
+
var import_Link = require("../components/Link.native.js");
|
|
31
|
+
var import_InlineCode = require("../components/InlineCode.native.js");
|
|
32
|
+
var import_useMarkdownTableKnobs = require("../shared/useMarkdownTableKnobs.native.js");
|
|
33
|
+
var markdownPattern = /(\*\*\[([^\]]+)\]\(([^)]+)\)\*\*)|(\[([^\]]+)\]\(([^)]+)\))|(\*\*([^*]+)\*\*)|(`([^`]+)`)/g;
|
|
34
|
+
function parseCell(content) {
|
|
35
|
+
if (typeof content !== "string") return content;
|
|
36
|
+
var matches = [...content.matchAll(markdownPattern)];
|
|
37
|
+
if (!matches.length) return content;
|
|
38
|
+
var parts = [];
|
|
39
|
+
var lastIndex = 0;
|
|
40
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
41
|
+
try {
|
|
42
|
+
for (var _iterator = matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
43
|
+
var match = _step.value;
|
|
44
|
+
var _match_index;
|
|
45
|
+
var matchIndex = (_match_index = match.index) !== null && _match_index !== void 0 ? _match_index : 0;
|
|
46
|
+
if (matchIndex > lastIndex) {
|
|
47
|
+
parts.push(content.slice(lastIndex, matchIndex));
|
|
48
|
+
}
|
|
49
|
+
var key = `m-${matchIndex}`;
|
|
50
|
+
if (match[1]) {
|
|
51
|
+
parts.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Text, {
|
|
52
|
+
fontWeight: "700",
|
|
53
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Link.Link, {
|
|
54
|
+
href: match[3],
|
|
55
|
+
children: match[2]
|
|
56
|
+
})
|
|
57
|
+
}, key));
|
|
58
|
+
} else if (match[4]) {
|
|
59
|
+
parts.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Link.Link, {
|
|
60
|
+
href: match[6],
|
|
61
|
+
children: match[5]
|
|
62
|
+
}, key));
|
|
63
|
+
} else if (match[7]) {
|
|
64
|
+
parts.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Text, {
|
|
65
|
+
fontWeight: "700",
|
|
66
|
+
children: match[8]
|
|
67
|
+
}, key));
|
|
68
|
+
} else if (match[9]) {
|
|
69
|
+
parts.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_InlineCode.InlineCode, { children: match[10] }, key));
|
|
70
|
+
}
|
|
71
|
+
lastIndex = matchIndex + match[0].length;
|
|
72
|
+
}
|
|
73
|
+
} catch (err) {
|
|
74
|
+
_didIteratorError = true;
|
|
75
|
+
_iteratorError = err;
|
|
76
|
+
} finally {
|
|
77
|
+
try {
|
|
78
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
79
|
+
_iterator.return();
|
|
80
|
+
}
|
|
81
|
+
} finally {
|
|
82
|
+
if (_didIteratorError) {
|
|
83
|
+
throw _iteratorError;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (lastIndex < content.length) {
|
|
88
|
+
parts.push(content.slice(lastIndex));
|
|
89
|
+
}
|
|
90
|
+
return parts.length === 1 ? parts[0] : parts;
|
|
91
|
+
}
|
|
92
|
+
function MarkdownSimpleTable(param) {
|
|
93
|
+
var { headers, rows } = param;
|
|
94
|
+
var { frameProps, headerTextProps, cellTextProps, cellPad, headRule } = (0, import_useMarkdownTableKnobs.useMarkdownTableKnobs)();
|
|
95
|
+
var media = (0, import_tamagui.useMedia)();
|
|
96
|
+
var isMobile = media.sm;
|
|
97
|
+
var table = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_table_primitives.Table, {
|
|
98
|
+
render: "table",
|
|
99
|
+
width: "auto",
|
|
100
|
+
cellWidth: "auto",
|
|
101
|
+
style: { tableLayout: "auto" },
|
|
102
|
+
alignCells: {
|
|
103
|
+
x: "start",
|
|
104
|
+
y: "center"
|
|
105
|
+
},
|
|
106
|
+
alignHeaderCells: {
|
|
107
|
+
x: "start",
|
|
108
|
+
y: "center"
|
|
109
|
+
},
|
|
110
|
+
...frameProps,
|
|
111
|
+
...isMobile && { minWidth: 760 },
|
|
112
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.Head, {
|
|
113
|
+
render: "thead",
|
|
114
|
+
...headRule,
|
|
115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.Row, {
|
|
116
|
+
render: "tr",
|
|
117
|
+
rowLocation: "first",
|
|
118
|
+
children: headers.map(function(header, headerIdx) {
|
|
119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.HeaderCell, {
|
|
120
|
+
render: "th",
|
|
121
|
+
...cellPad,
|
|
122
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
123
|
+
...headerTextProps,
|
|
124
|
+
children: header
|
|
125
|
+
})
|
|
126
|
+
}, `h-${headerIdx}`);
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.Body, {
|
|
130
|
+
render: "tbody",
|
|
131
|
+
children: rows.map(function(row, rowIdx) {
|
|
132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.Row, {
|
|
133
|
+
render: "tr",
|
|
134
|
+
rowLocation: rowIdx === rows.length - 1 ? "last" : "middle",
|
|
135
|
+
children: row.map(function(cell, cellIdx) {
|
|
136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_table_primitives.Table.Cell, {
|
|
137
|
+
render: "td",
|
|
138
|
+
...cellPad,
|
|
139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
140
|
+
render: "span",
|
|
141
|
+
display: "block",
|
|
142
|
+
...cellTextProps,
|
|
143
|
+
children: parseCell(cell)
|
|
144
|
+
})
|
|
145
|
+
}, `c-${rowIdx}-${cellIdx}`);
|
|
146
|
+
})
|
|
147
|
+
}, `r-${rowIdx}`);
|
|
148
|
+
})
|
|
149
|
+
})]
|
|
150
|
+
});
|
|
151
|
+
if (isMobile) {
|
|
152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.ScrollView, {
|
|
153
|
+
horizontal: true,
|
|
154
|
+
showsHorizontalScrollIndicator: false,
|
|
155
|
+
children: table
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return table;
|
|
159
|
+
}
|