@multiplatform.one/markdown 6.0.4 → 6.3.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/README.md +61 -0
- package/dist/cjs/Aside/index.cjs +37 -32
- package/dist/cjs/Aside/index.native.js +41 -34
- package/dist/cjs/Aside/index.native.js.map +1 -1
- package/dist/cjs/ExternalIcon/index.cjs +2 -0
- package/dist/cjs/ExternalIcon/index.native.js +2 -0
- package/dist/cjs/ExternalIcon/index.native.js.map +1 -1
- package/dist/cjs/Hr/index.cjs +3 -11
- package/dist/cjs/Hr/index.native.js +3 -11
- package/dist/cjs/Hr/index.native.js.map +1 -1
- package/dist/cjs/{SimpleTable → MarkdownSimpleTable}/index.cjs +27 -9
- package/dist/{jsx/SimpleTable → cjs/MarkdownSimpleTable}/index.native.js +32 -11
- package/dist/cjs/MarkdownSimpleTable/index.native.js.map +1 -0
- package/dist/cjs/Mdx/index.cjs +15 -7
- package/dist/cjs/Mdx/index.native.js +15 -7
- package/dist/cjs/Mdx/index.native.js.map +1 -1
- package/dist/cjs/MdxCodeBlock/index.cjs +28 -20
- package/dist/cjs/MdxCodeBlock/index.native.js +33 -22
- package/dist/cjs/MdxCodeBlock/index.native.js.map +1 -1
- package/dist/cjs/Notice/index.cjs +13 -56
- package/dist/cjs/Notice/index.native.js +13 -56
- package/dist/cjs/Notice/index.native.js.map +1 -1
- package/dist/cjs/Table/index.cjs +13 -0
- package/dist/cjs/Table/index.native.js +15 -0
- package/dist/cjs/Table/index.native.js.map +1 -1
- package/dist/cjs/Tabs/index.cjs +15 -47
- package/dist/cjs/Tabs/index.native.js +20 -52
- package/dist/cjs/Tabs/index.native.js.map +1 -1
- package/dist/cjs/Ul/index.cjs +2 -2
- package/dist/cjs/Ul/index.native.js +2 -2
- package/dist/cjs/Ul/index.native.js.map +1 -1
- package/dist/cjs/Video/index.cjs +4 -2
- package/dist/cjs/Video/index.native.js +4 -2
- package/dist/cjs/Video/index.native.js.map +1 -1
- package/dist/cjs/components/Blockquote.cjs +16 -3
- package/dist/cjs/components/Blockquote.native.js +25 -3
- package/dist/cjs/components/Blockquote.native.js.map +1 -1
- package/dist/cjs/components/Break.cjs +1 -0
- package/dist/cjs/components/Break.native.js +1 -0
- package/dist/cjs/components/Break.native.js.map +1 -1
- package/dist/cjs/components/CodeBlock.cjs +20 -60
- package/dist/cjs/components/CodeBlock.native.js +22 -64
- package/dist/cjs/components/CodeBlock.native.js.map +1 -1
- package/dist/cjs/components/Heading.cjs +23 -0
- package/dist/cjs/components/Heading.native.js +24 -0
- package/dist/cjs/components/Heading.native.js.map +1 -1
- package/dist/cjs/components/Image.cjs +3 -5
- package/dist/cjs/components/Image.native.js +6 -5
- package/dist/cjs/components/Image.native.js.map +1 -1
- package/dist/cjs/components/InlineCode.cjs +3 -6
- package/dist/cjs/components/InlineCode.native.js +3 -6
- package/dist/cjs/components/InlineCode.native.js.map +1 -1
- package/dist/cjs/components/InlineStyles.cjs +3 -0
- package/dist/cjs/components/InlineStyles.native.js +3 -0
- package/dist/cjs/components/InlineStyles.native.js.map +1 -1
- package/dist/cjs/components/Link.cjs +22 -5
- package/dist/cjs/components/Link.native.js +23 -5
- package/dist/cjs/components/Link.native.js.map +1 -1
- package/dist/cjs/components/List.cjs +87 -9
- package/dist/cjs/components/List.native.js +91 -9
- package/dist/cjs/components/List.native.js.map +1 -1
- package/dist/cjs/components/Paragraph.cjs +6 -1
- package/dist/cjs/components/Paragraph.native.js +6 -1
- package/dist/cjs/components/Paragraph.native.js.map +1 -1
- package/dist/cjs/components/Table.cjs +57 -24
- package/dist/cjs/components/Table.native.js +67 -25
- package/dist/cjs/components/Table.native.js.map +1 -1
- package/dist/cjs/hooks/useCompileMdx.cjs +61 -28
- package/dist/cjs/hooks/useCompileMdx.native.js +80 -28
- package/dist/cjs/hooks/useCompileMdx.native.js.map +1 -1
- package/dist/cjs/hooks/useEvaluateMdx.cjs +7 -1
- package/dist/cjs/hooks/useEvaluateMdx.native.js +9 -3
- package/dist/cjs/hooks/useEvaluateMdx.native.js.map +1 -1
- package/dist/cjs/icons/index.cjs +31 -101
- package/dist/cjs/icons/index.native.js +36 -116
- package/dist/cjs/icons/index.native.js.map +1 -1
- package/dist/cjs/index.cjs +6 -4
- package/dist/cjs/index.native.js +6 -4
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/mdxComponents.cjs +13 -6
- package/dist/cjs/mdxComponents.native.js +16 -6
- package/dist/cjs/mdxComponents.native.js.map +1 -1
- package/dist/cjs/mermaid/MermaidBlock.cjs +110 -0
- package/dist/cjs/mermaid/MermaidBlock.native.js +41 -0
- package/dist/cjs/mermaid/MermaidBlock.native.js.map +1 -0
- package/dist/cjs/mermaid/index.cjs +31 -0
- package/dist/cjs/mermaid/index.native.js +34 -0
- package/dist/cjs/mermaid/index.native.js.map +1 -0
- package/dist/cjs/mermaid/mountDiagramSvg.cjs +54 -0
- package/dist/cjs/mermaid/mountDiagramSvg.native.js +98 -0
- package/dist/cjs/mermaid/mountDiagramSvg.native.js.map +1 -0
- package/dist/cjs/mermaid/renderMermaidDiagram.cjs +92 -0
- package/dist/cjs/mermaid/renderMermaidDiagram.native.js +110 -0
- package/dist/cjs/mermaid/renderMermaidDiagram.native.js.map +1 -0
- package/dist/cjs/renderer.cjs +9 -1
- package/dist/cjs/renderer.native.js +10 -2
- package/dist/cjs/renderer.native.js.map +1 -1
- package/dist/cjs/shared/colorRamps.cjs +1 -11
- package/dist/cjs/shared/colorRamps.native.js +1 -11
- package/dist/cjs/shared/colorRamps.native.js.map +1 -1
- package/dist/cjs/shared/cutoffGradient.cjs +54 -0
- package/dist/cjs/shared/cutoffGradient.native.js +63 -0
- package/dist/cjs/shared/cutoffGradient.native.js.map +1 -0
- package/dist/cjs/shiki/index.cjs +1 -16
- package/dist/cjs/shiki/index.native.js +0 -15
- package/dist/cjs/shiki/index.native.js.map +1 -1
- package/dist/esm/Aside/index.mjs +39 -34
- package/dist/esm/Aside/index.mjs.map +1 -1
- package/dist/esm/Aside/index.native.js +43 -36
- package/dist/esm/Aside/index.native.js.map +1 -1
- package/dist/esm/ExternalIcon/index.mjs +2 -0
- package/dist/esm/ExternalIcon/index.mjs.map +1 -1
- package/dist/esm/ExternalIcon/index.native.js +2 -0
- package/dist/esm/ExternalIcon/index.native.js.map +1 -1
- package/dist/esm/Hr/index.mjs +4 -12
- package/dist/esm/Hr/index.mjs.map +1 -1
- package/dist/esm/Hr/index.native.js +4 -12
- package/dist/esm/Hr/index.native.js.map +1 -1
- package/dist/esm/{SimpleTable → MarkdownSimpleTable}/index.mjs +24 -6
- package/dist/esm/MarkdownSimpleTable/index.mjs.map +1 -0
- package/dist/esm/{SimpleTable → MarkdownSimpleTable}/index.native.js +29 -8
- package/dist/esm/MarkdownSimpleTable/index.native.js.map +1 -0
- package/dist/esm/Mdx/index.mjs +15 -7
- package/dist/esm/Mdx/index.mjs.map +1 -1
- package/dist/esm/Mdx/index.native.js +15 -7
- package/dist/esm/Mdx/index.native.js.map +1 -1
- package/dist/esm/MdxCodeBlock/index.mjs +30 -22
- package/dist/esm/MdxCodeBlock/index.mjs.map +1 -1
- package/dist/esm/MdxCodeBlock/index.native.js +35 -24
- package/dist/esm/MdxCodeBlock/index.native.js.map +1 -1
- package/dist/esm/Notice/index.mjs +15 -57
- package/dist/esm/Notice/index.mjs.map +1 -1
- package/dist/esm/Notice/index.native.js +15 -57
- package/dist/esm/Notice/index.native.js.map +1 -1
- package/dist/esm/Table/index.mjs +13 -0
- package/dist/esm/Table/index.mjs.map +1 -1
- package/dist/esm/Table/index.native.js +15 -0
- package/dist/esm/Table/index.native.js.map +1 -1
- package/dist/esm/Tabs/index.mjs +17 -49
- package/dist/esm/Tabs/index.mjs.map +1 -1
- package/dist/esm/Tabs/index.native.js +22 -54
- package/dist/esm/Tabs/index.native.js.map +1 -1
- package/dist/esm/Ul/index.mjs +2 -2
- package/dist/esm/Ul/index.mjs.map +1 -1
- package/dist/esm/Ul/index.native.js +2 -2
- package/dist/esm/Ul/index.native.js.map +1 -1
- package/dist/esm/Video/index.mjs +4 -2
- package/dist/esm/Video/index.mjs.map +1 -1
- package/dist/esm/Video/index.native.js +4 -2
- package/dist/esm/Video/index.native.js.map +1 -1
- package/dist/esm/components/Blockquote.mjs +17 -4
- package/dist/esm/components/Blockquote.mjs.map +1 -1
- package/dist/esm/components/Blockquote.native.js +26 -4
- package/dist/esm/components/Blockquote.native.js.map +1 -1
- package/dist/esm/components/Break.mjs +2 -1
- package/dist/esm/components/Break.mjs.map +1 -1
- package/dist/esm/components/Break.native.js +2 -1
- package/dist/esm/components/Break.native.js.map +1 -1
- package/dist/esm/components/CodeBlock.mjs +21 -61
- package/dist/esm/components/CodeBlock.mjs.map +1 -1
- package/dist/esm/components/CodeBlock.native.js +23 -65
- package/dist/esm/components/CodeBlock.native.js.map +1 -1
- package/dist/esm/components/Heading.mjs +24 -1
- package/dist/esm/components/Heading.mjs.map +1 -1
- package/dist/esm/components/Heading.native.js +25 -1
- package/dist/esm/components/Heading.native.js.map +1 -1
- package/dist/esm/components/Image.mjs +3 -5
- package/dist/esm/components/Image.mjs.map +1 -1
- package/dist/esm/components/Image.native.js +6 -5
- package/dist/esm/components/Image.native.js.map +1 -1
- package/dist/esm/components/InlineCode.mjs +3 -6
- package/dist/esm/components/InlineCode.mjs.map +1 -1
- package/dist/esm/components/InlineCode.native.js +3 -6
- package/dist/esm/components/InlineCode.native.js.map +1 -1
- package/dist/esm/components/InlineStyles.mjs +3 -0
- package/dist/esm/components/InlineStyles.mjs.map +1 -1
- package/dist/esm/components/InlineStyles.native.js +3 -0
- package/dist/esm/components/InlineStyles.native.js.map +1 -1
- package/dist/esm/components/Link.mjs +23 -6
- package/dist/esm/components/Link.mjs.map +1 -1
- package/dist/esm/components/Link.native.js +24 -6
- package/dist/esm/components/Link.native.js.map +1 -1
- package/dist/esm/components/List.mjs +88 -10
- package/dist/esm/components/List.mjs.map +1 -1
- package/dist/esm/components/List.native.js +92 -10
- package/dist/esm/components/List.native.js.map +1 -1
- package/dist/esm/components/Paragraph.mjs +6 -1
- package/dist/esm/components/Paragraph.mjs.map +1 -1
- package/dist/esm/components/Paragraph.native.js +6 -1
- package/dist/esm/components/Paragraph.native.js.map +1 -1
- package/dist/esm/components/Table.mjs +59 -26
- package/dist/esm/components/Table.mjs.map +1 -1
- package/dist/esm/components/Table.native.js +69 -27
- package/dist/esm/components/Table.native.js.map +1 -1
- package/dist/esm/hooks/useCompileMdx.mjs +61 -29
- package/dist/esm/hooks/useCompileMdx.mjs.map +1 -1
- package/dist/esm/hooks/useCompileMdx.native.js +80 -29
- package/dist/esm/hooks/useCompileMdx.native.js.map +1 -1
- package/dist/esm/hooks/useEvaluateMdx.mjs +7 -1
- package/dist/esm/hooks/useEvaluateMdx.mjs.map +1 -1
- package/dist/esm/hooks/useEvaluateMdx.native.js +9 -3
- package/dist/esm/hooks/useEvaluateMdx.native.js.map +1 -1
- package/dist/esm/icons/index.mjs +32 -100
- package/dist/esm/icons/index.mjs.map +1 -1
- package/dist/esm/icons/index.native.js +37 -115
- package/dist/esm/icons/index.native.js.map +1 -1
- package/dist/esm/index.mjs +5 -3
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +5 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/mdxComponents.mjs +14 -7
- package/dist/esm/mdxComponents.mjs.map +1 -1
- package/dist/esm/mdxComponents.native.js +17 -7
- package/dist/esm/mdxComponents.native.js.map +1 -1
- package/dist/esm/mermaid/MermaidBlock.mjs +85 -0
- package/dist/esm/mermaid/MermaidBlock.mjs.map +1 -0
- package/dist/esm/mermaid/MermaidBlock.native.js +13 -0
- package/dist/esm/mermaid/MermaidBlock.native.js.map +1 -0
- package/dist/esm/mermaid/index.mjs +4 -0
- package/dist/esm/mermaid/index.mjs.map +1 -0
- package/dist/esm/mermaid/index.native.js +4 -0
- package/dist/esm/mermaid/index.native.js.map +1 -0
- package/dist/esm/mermaid/mountDiagramSvg.mjs +29 -0
- package/dist/esm/mermaid/mountDiagramSvg.mjs.map +1 -0
- package/dist/esm/mermaid/mountDiagramSvg.native.js +70 -0
- package/dist/esm/mermaid/mountDiagramSvg.native.js.map +1 -0
- package/dist/esm/mermaid/renderMermaidDiagram.mjs +55 -0
- package/dist/esm/mermaid/renderMermaidDiagram.mjs.map +1 -0
- package/dist/esm/mermaid/renderMermaidDiagram.native.js +70 -0
- package/dist/esm/mermaid/renderMermaidDiagram.native.js.map +1 -0
- package/dist/esm/renderer.mjs +9 -1
- package/dist/esm/renderer.mjs.map +1 -1
- package/dist/esm/renderer.native.js +10 -2
- package/dist/esm/renderer.native.js.map +1 -1
- package/dist/esm/shared/colorRamps.mjs +1 -10
- package/dist/esm/shared/colorRamps.mjs.map +1 -1
- package/dist/esm/shared/colorRamps.native.js +1 -10
- package/dist/esm/shared/colorRamps.native.js.map +1 -1
- package/dist/esm/shared/cutoffGradient.mjs +28 -0
- package/dist/esm/shared/cutoffGradient.mjs.map +1 -0
- package/dist/esm/shared/cutoffGradient.native.js +34 -0
- package/dist/esm/shared/cutoffGradient.native.js.map +1 -0
- package/dist/esm/shiki/index.mjs +1 -2
- package/dist/esm/shiki/index.mjs.map +1 -1
- package/dist/esm/shiki/index.native.js +1 -2
- package/dist/esm/shiki/index.native.js.map +1 -1
- package/dist/jsx/Aside/index.mjs +39 -34
- package/dist/jsx/Aside/index.mjs.map +1 -1
- package/dist/jsx/Aside/index.native.js +41 -34
- package/dist/jsx/Aside/index.native.js.map +1 -1
- package/dist/jsx/ExternalIcon/index.mjs +2 -0
- package/dist/jsx/ExternalIcon/index.mjs.map +1 -1
- package/dist/jsx/ExternalIcon/index.native.js +2 -0
- package/dist/jsx/ExternalIcon/index.native.js.map +1 -1
- package/dist/jsx/Hr/index.mjs +4 -12
- package/dist/jsx/Hr/index.mjs.map +1 -1
- package/dist/jsx/Hr/index.native.js +3 -11
- package/dist/jsx/Hr/index.native.js.map +1 -1
- package/dist/jsx/{SimpleTable → MarkdownSimpleTable}/index.mjs +24 -6
- package/dist/jsx/MarkdownSimpleTable/index.mjs.map +1 -0
- package/dist/{cjs/SimpleTable → jsx/MarkdownSimpleTable}/index.native.js +32 -11
- package/dist/jsx/MarkdownSimpleTable/index.native.js.map +1 -0
- package/dist/jsx/Mdx/index.mjs +15 -7
- package/dist/jsx/Mdx/index.mjs.map +1 -1
- package/dist/jsx/Mdx/index.native.js +15 -7
- package/dist/jsx/Mdx/index.native.js.map +1 -1
- package/dist/jsx/MdxCodeBlock/index.mjs +30 -22
- package/dist/jsx/MdxCodeBlock/index.mjs.map +1 -1
- package/dist/jsx/MdxCodeBlock/index.native.js +33 -22
- package/dist/jsx/MdxCodeBlock/index.native.js.map +1 -1
- package/dist/jsx/Notice/index.mjs +15 -57
- package/dist/jsx/Notice/index.mjs.map +1 -1
- package/dist/jsx/Notice/index.native.js +13 -56
- package/dist/jsx/Notice/index.native.js.map +1 -1
- package/dist/jsx/Table/index.mjs +13 -0
- package/dist/jsx/Table/index.mjs.map +1 -1
- package/dist/jsx/Table/index.native.js +15 -0
- package/dist/jsx/Table/index.native.js.map +1 -1
- package/dist/jsx/Tabs/index.mjs +17 -49
- package/dist/jsx/Tabs/index.mjs.map +1 -1
- package/dist/jsx/Tabs/index.native.js +20 -52
- package/dist/jsx/Tabs/index.native.js.map +1 -1
- package/dist/jsx/Ul/index.mjs +2 -2
- package/dist/jsx/Ul/index.mjs.map +1 -1
- package/dist/jsx/Ul/index.native.js +2 -2
- package/dist/jsx/Ul/index.native.js.map +1 -1
- package/dist/jsx/Video/index.mjs +4 -2
- package/dist/jsx/Video/index.mjs.map +1 -1
- package/dist/jsx/Video/index.native.js +4 -2
- package/dist/jsx/Video/index.native.js.map +1 -1
- package/dist/jsx/components/Blockquote.mjs +17 -4
- package/dist/jsx/components/Blockquote.mjs.map +1 -1
- package/dist/jsx/components/Blockquote.native.js +25 -3
- package/dist/jsx/components/Blockquote.native.js.map +1 -1
- package/dist/jsx/components/Break.mjs +2 -1
- package/dist/jsx/components/Break.mjs.map +1 -1
- package/dist/jsx/components/Break.native.js +1 -0
- package/dist/jsx/components/Break.native.js.map +1 -1
- package/dist/jsx/components/CodeBlock.mjs +21 -61
- package/dist/jsx/components/CodeBlock.mjs.map +1 -1
- package/dist/jsx/components/CodeBlock.native.js +22 -64
- package/dist/jsx/components/CodeBlock.native.js.map +1 -1
- package/dist/jsx/components/Heading.mjs +24 -1
- package/dist/jsx/components/Heading.mjs.map +1 -1
- package/dist/jsx/components/Heading.native.js +24 -0
- package/dist/jsx/components/Heading.native.js.map +1 -1
- package/dist/jsx/components/Image.mjs +3 -5
- package/dist/jsx/components/Image.mjs.map +1 -1
- package/dist/jsx/components/Image.native.js +6 -5
- package/dist/jsx/components/Image.native.js.map +1 -1
- package/dist/jsx/components/InlineCode.mjs +3 -6
- package/dist/jsx/components/InlineCode.mjs.map +1 -1
- package/dist/jsx/components/InlineCode.native.js +3 -6
- package/dist/jsx/components/InlineCode.native.js.map +1 -1
- package/dist/jsx/components/InlineStyles.mjs +3 -0
- package/dist/jsx/components/InlineStyles.mjs.map +1 -1
- package/dist/jsx/components/InlineStyles.native.js +3 -0
- package/dist/jsx/components/InlineStyles.native.js.map +1 -1
- package/dist/jsx/components/Link.mjs +23 -6
- package/dist/jsx/components/Link.mjs.map +1 -1
- package/dist/jsx/components/Link.native.js +23 -5
- package/dist/jsx/components/Link.native.js.map +1 -1
- package/dist/jsx/components/List.mjs +88 -10
- package/dist/jsx/components/List.mjs.map +1 -1
- package/dist/jsx/components/List.native.js +91 -9
- package/dist/jsx/components/List.native.js.map +1 -1
- package/dist/jsx/components/Paragraph.mjs +6 -1
- package/dist/jsx/components/Paragraph.mjs.map +1 -1
- package/dist/jsx/components/Paragraph.native.js +6 -1
- package/dist/jsx/components/Paragraph.native.js.map +1 -1
- package/dist/jsx/components/Table.mjs +59 -26
- package/dist/jsx/components/Table.mjs.map +1 -1
- package/dist/jsx/components/Table.native.js +67 -25
- package/dist/jsx/components/Table.native.js.map +1 -1
- package/dist/jsx/hooks/useCompileMdx.mjs +61 -29
- package/dist/jsx/hooks/useCompileMdx.mjs.map +1 -1
- package/dist/jsx/hooks/useCompileMdx.native.js +80 -28
- package/dist/jsx/hooks/useCompileMdx.native.js.map +1 -1
- package/dist/jsx/hooks/useEvaluateMdx.mjs +7 -1
- package/dist/jsx/hooks/useEvaluateMdx.mjs.map +1 -1
- package/dist/jsx/hooks/useEvaluateMdx.native.js +9 -3
- package/dist/jsx/hooks/useEvaluateMdx.native.js.map +1 -1
- package/dist/jsx/icons/index.mjs +32 -100
- package/dist/jsx/icons/index.mjs.map +1 -1
- package/dist/jsx/icons/index.native.js +36 -116
- package/dist/jsx/icons/index.native.js.map +1 -1
- package/dist/jsx/index.js +5 -3
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +5 -3
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +6 -4
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/mdxComponents.mjs +14 -7
- package/dist/jsx/mdxComponents.mjs.map +1 -1
- package/dist/jsx/mdxComponents.native.js +16 -6
- package/dist/jsx/mdxComponents.native.js.map +1 -1
- package/dist/jsx/mermaid/MermaidBlock.mjs +85 -0
- package/dist/jsx/mermaid/MermaidBlock.mjs.map +1 -0
- package/dist/jsx/mermaid/MermaidBlock.native.js +41 -0
- package/dist/jsx/mermaid/MermaidBlock.native.js.map +1 -0
- package/dist/jsx/mermaid/index.mjs +4 -0
- package/dist/jsx/mermaid/index.mjs.map +1 -0
- package/dist/jsx/mermaid/index.native.js +34 -0
- package/dist/jsx/mermaid/index.native.js.map +1 -0
- package/dist/jsx/mermaid/mountDiagramSvg.mjs +29 -0
- package/dist/jsx/mermaid/mountDiagramSvg.mjs.map +1 -0
- package/dist/jsx/mermaid/mountDiagramSvg.native.js +98 -0
- package/dist/jsx/mermaid/mountDiagramSvg.native.js.map +1 -0
- package/dist/jsx/mermaid/renderMermaidDiagram.mjs +55 -0
- package/dist/jsx/mermaid/renderMermaidDiagram.mjs.map +1 -0
- package/dist/jsx/mermaid/renderMermaidDiagram.native.js +110 -0
- package/dist/jsx/mermaid/renderMermaidDiagram.native.js.map +1 -0
- package/dist/jsx/renderer.mjs +9 -1
- package/dist/jsx/renderer.mjs.map +1 -1
- package/dist/jsx/renderer.native.js +10 -2
- package/dist/jsx/renderer.native.js.map +1 -1
- package/dist/jsx/shared/colorRamps.mjs +1 -10
- package/dist/jsx/shared/colorRamps.mjs.map +1 -1
- package/dist/jsx/shared/colorRamps.native.js +1 -11
- package/dist/jsx/shared/colorRamps.native.js.map +1 -1
- package/dist/jsx/shared/cutoffGradient.mjs +28 -0
- package/dist/jsx/shared/cutoffGradient.mjs.map +1 -0
- package/dist/jsx/shared/cutoffGradient.native.js +63 -0
- package/dist/jsx/shared/cutoffGradient.native.js.map +1 -0
- package/dist/jsx/shiki/index.mjs +1 -2
- package/dist/jsx/shiki/index.mjs.map +1 -1
- package/dist/jsx/shiki/index.native.js +0 -15
- package/dist/jsx/shiki/index.native.js.map +1 -1
- package/package.json +25 -14
- package/src/Aside/index.tsx +42 -35
- package/src/ExternalIcon/index.tsx +8 -1
- package/src/Hr/index.tsx +3 -6
- package/src/{SimpleTable → MarkdownSimpleTable}/index.tsx +30 -12
- package/src/MarkdownSimpleTable/markdownSimpleTable.spec.tsx +92 -0
- package/src/Mdx/index.tsx +12 -7
- package/src/MdxCodeBlock/index.tsx +33 -20
- package/src/Notice/index.tsx +12 -54
- package/src/Table/index.tsx +22 -6
- package/src/Tabs/index.tsx +26 -52
- package/src/Ul/index.ts +2 -2
- package/src/Video/index.tsx +15 -12
- package/src/components/Blockquote.tsx +29 -4
- package/src/components/Break.tsx +3 -1
- package/src/components/CodeBlock.tsx +49 -79
- package/src/components/Heading.tsx +15 -2
- package/src/components/Image.tsx +6 -3
- package/src/components/InlineCode.tsx +14 -7
- package/src/components/InlineStyles.tsx +15 -3
- package/src/components/Link.tsx +29 -6
- package/src/components/List.tsx +111 -11
- package/src/components/Paragraph.tsx +6 -1
- package/src/components/Table.tsx +56 -35
- package/src/components/markdownPrimitives.spec.tsx +121 -0
- package/src/docBlocks.spec.tsx +85 -0
- package/src/hooks/useCompileMdx.ts +75 -35
- package/src/hooks/useEvaluateMdx.ts +7 -1
- package/src/icons/index.tsx +36 -58
- package/src/index.ts +15 -3
- package/src/markdownComponent.spec.tsx +58 -0
- package/src/mdx.spec.tsx +4 -0
- package/src/mdxComponents.spec.tsx +185 -0
- package/src/mdxComponents.tsx +14 -5
- package/src/mermaid/MermaidBlock.native.tsx +15 -0
- package/src/mermaid/MermaidBlock.tsx +88 -0
- package/src/mermaid/index.ts +23 -0
- package/src/mermaid/mountDiagramSvg.ts +49 -0
- package/src/mermaid/renderMermaidDiagram.spec.ts +89 -0
- package/src/mermaid/renderMermaidDiagram.ts +78 -0
- package/src/renderer.spec.tsx +276 -0
- package/src/renderer.tsx +13 -1
- package/src/shared/colorRamps.ts +0 -10
- package/src/shared/cutoffGradient.ts +40 -0
- package/src/shiki/index.ts +7 -11
- package/src/stories/Blocks.stories.tsx +232 -0
- package/src/stories/Callouts.stories.tsx +147 -0
- package/src/stories/Code.stories.tsx +116 -0
- package/src/stories/Inline.stories.tsx +162 -0
- package/src/stories/Mdx.stories.tsx +107 -0
- package/src/stories/Media.stories.tsx +148 -0
- package/src/stories/Tables.stories.tsx +173 -0
- package/types/Aside/index.d.ts +11 -0
- package/types/Aside/index.d.ts.map +1 -0
- package/types/ExternalIcon/index.d.ts +2 -0
- package/types/ExternalIcon/index.d.ts.map +1 -0
- package/types/Hr/index.d.ts +2 -0
- package/types/Hr/index.d.ts.map +1 -0
- package/types/Li/index.d.ts +6 -0
- package/types/Li/index.d.ts.map +1 -0
- package/types/Markdown.d.ts +22 -0
- package/types/Markdown.d.ts.map +1 -0
- package/types/MarkdownSimpleTable/index.d.ts +16 -0
- package/types/MarkdownSimpleTable/index.d.ts.map +1 -0
- package/types/Mdx/index.d.ts +9 -0
- package/types/Mdx/index.d.ts.map +1 -0
- package/types/MdxCodeBlock/index.d.ts +7 -0
- package/types/MdxCodeBlock/index.d.ts.map +1 -0
- package/types/MdxCodeBlock/mdxCodeBlockContext.d.ts +13 -0
- package/types/MdxCodeBlock/mdxCodeBlockContext.d.ts.map +1 -0
- package/types/Notice/index.d.ts +12 -0
- package/types/Notice/index.d.ts.map +1 -0
- package/types/Table/index.d.ts +20 -0
- package/types/Table/index.d.ts.map +1 -0
- package/types/Tabs/index.d.ts +21 -0
- package/types/Tabs/index.d.ts.map +1 -0
- package/types/Ul/index.d.ts +6 -0
- package/types/Ul/index.d.ts.map +1 -0
- package/types/Video/index.d.ts +12 -0
- package/types/Video/index.d.ts.map +1 -0
- package/types/components/Blockquote.d.ts +3 -0
- package/types/components/Blockquote.d.ts.map +1 -0
- package/types/components/Break.d.ts +3 -0
- package/types/components/Break.d.ts.map +1 -0
- package/types/components/CodeBlock.d.ts +17 -0
- package/types/components/CodeBlock.d.ts.map +1 -0
- package/types/components/Heading.d.ts +3 -0
- package/types/components/Heading.d.ts.map +1 -0
- package/types/components/HorizontalRule.d.ts +3 -0
- package/types/components/HorizontalRule.d.ts.map +1 -0
- package/types/components/Image.d.ts +3 -0
- package/types/components/Image.d.ts.map +1 -0
- package/types/components/InlineCode.d.ts +12 -0
- package/types/components/InlineCode.d.ts.map +1 -0
- package/types/components/InlineStyles.d.ts +5 -0
- package/types/components/InlineStyles.d.ts.map +1 -0
- package/types/components/Link.d.ts +3 -0
- package/types/components/Link.d.ts.map +1 -0
- package/types/components/List.d.ts +10 -0
- package/types/components/List.d.ts.map +1 -0
- package/types/components/Paragraph.d.ts +3 -0
- package/types/components/Paragraph.d.ts.map +1 -0
- package/types/components/Table.d.ts +13 -0
- package/types/components/Table.d.ts.map +1 -0
- package/types/components/index.d.ts +13 -0
- package/types/components/index.d.ts.map +1 -0
- package/types/hooks/index.d.ts +4 -0
- package/types/hooks/index.d.ts.map +1 -0
- package/types/hooks/useCompileAndEvaluateMdx.d.ts +9 -0
- package/types/hooks/useCompileAndEvaluateMdx.d.ts.map +1 -0
- package/types/hooks/useCompileMdx.d.ts +13 -0
- package/types/hooks/useCompileMdx.d.ts.map +1 -0
- package/types/hooks/useEvaluateMdx.d.ts +5 -0
- package/types/hooks/useEvaluateMdx.d.ts.map +1 -0
- package/types/icons/index.d.ts +12 -0
- package/types/icons/index.d.ts.map +1 -0
- package/types/index.d.ts +29 -0
- package/types/index.d.ts.map +1 -0
- package/types/mdxComponents.d.ts +8 -0
- package/types/mdxComponents.d.ts.map +1 -0
- package/types/mermaid/MermaidBlock.d.ts +15 -0
- package/types/mermaid/MermaidBlock.d.ts.map +1 -0
- package/types/mermaid/MermaidBlock.native.d.ts +10 -0
- package/types/mermaid/MermaidBlock.native.d.ts.map +1 -0
- package/types/mermaid/index.d.ts +18 -0
- package/types/mermaid/index.d.ts.map +1 -0
- package/types/mermaid/mountDiagramSvg.d.ts +11 -0
- package/types/mermaid/mountDiagramSvg.d.ts.map +1 -0
- package/types/mermaid/renderMermaidDiagram.d.ts +33 -0
- package/types/mermaid/renderMermaidDiagram.d.ts.map +1 -0
- package/types/parser.d.ts +11 -0
- package/types/parser.d.ts.map +1 -0
- package/types/renderer.d.ts +32 -0
- package/types/renderer.d.ts.map +1 -0
- package/types/shared/colorRamps.d.ts +39 -0
- package/types/shared/colorRamps.d.ts.map +1 -0
- package/types/shared/cutoffGradient.d.ts +12 -0
- package/types/shared/cutoffGradient.d.ts.map +1 -0
- package/types/shared/index.d.ts +2 -0
- package/types/shared/index.d.ts.map +1 -0
- package/types/shiki/index.d.ts +8 -0
- package/types/shiki/index.d.ts.map +1 -0
- package/types/types.d.ts +160 -0
- package/types/types.d.ts.map +1 -0
- package/types/util/rehypeMetaAttributes.d.ts +2 -0
- package/types/util/rehypeMetaAttributes.d.ts.map +1 -0
- package/dist/cjs/ExternalIcon/ExternalIcon.spec.cjs +0 -37
- package/dist/cjs/ExternalIcon/ExternalIcon.spec.native.js +0 -40
- package/dist/cjs/ExternalIcon/ExternalIcon.spec.native.js.map +0 -1
- package/dist/cjs/Hr/hr.spec.cjs +0 -21
- package/dist/cjs/Hr/hr.spec.native.js +0 -24
- package/dist/cjs/Hr/hr.spec.native.js.map +0 -1
- package/dist/cjs/Li/li.spec.cjs +0 -45
- package/dist/cjs/Li/li.spec.native.js +0 -50
- package/dist/cjs/Li/li.spec.native.js.map +0 -1
- package/dist/cjs/Markdown.stories.cjs +0 -153
- package/dist/cjs/Markdown.stories.native.js +0 -162
- package/dist/cjs/Markdown.stories.native.js.map +0 -1
- package/dist/cjs/Mdx/mdx.spec.cjs +0 -139
- package/dist/cjs/Mdx/mdx.spec.native.js +0 -158
- package/dist/cjs/Mdx/mdx.spec.native.js.map +0 -1
- package/dist/cjs/MdxCodeBlock/mdxCodeBlock.spec.cjs +0 -90
- package/dist/cjs/MdxCodeBlock/mdxCodeBlock.spec.native.js +0 -122
- package/dist/cjs/MdxCodeBlock/mdxCodeBlock.spec.native.js.map +0 -1
- package/dist/cjs/SimpleTable/index.native.js.map +0 -1
- package/dist/cjs/Ul/ul.spec.cjs +0 -150
- package/dist/cjs/Ul/ul.spec.native.js +0 -153
- package/dist/cjs/Ul/ul.spec.native.js.map +0 -1
- package/dist/cjs/hooks/useCompileAndEvaluateMdx.spec.cjs +0 -34
- package/dist/cjs/hooks/useCompileAndEvaluateMdx.spec.native.js +0 -49
- package/dist/cjs/hooks/useCompileAndEvaluateMdx.spec.native.js.map +0 -1
- package/dist/cjs/mdx.spec.cjs +0 -400
- package/dist/cjs/mdx.spec.native.js +0 -465
- package/dist/cjs/mdx.spec.native.js.map +0 -1
- package/dist/cjs/parser.spec.cjs +0 -109
- package/dist/cjs/parser.spec.native.js +0 -114
- package/dist/cjs/parser.spec.native.js.map +0 -1
- package/dist/cjs/shiki/highlighter.cjs +0 -89
- package/dist/cjs/shiki/highlighter.native.js +0 -94
- package/dist/cjs/shiki/highlighter.native.js.map +0 -1
- package/dist/cjs/util/util.spec.cjs +0 -81
- package/dist/cjs/util/util.spec.native.js +0 -84
- package/dist/cjs/util/util.spec.native.js.map +0 -1
- package/dist/esm/ExternalIcon/ExternalIcon.spec.mjs +0 -38
- package/dist/esm/ExternalIcon/ExternalIcon.spec.mjs.map +0 -1
- package/dist/esm/ExternalIcon/ExternalIcon.spec.native.js +0 -38
- package/dist/esm/ExternalIcon/ExternalIcon.spec.native.js.map +0 -1
- package/dist/esm/Hr/hr.spec.mjs +0 -22
- package/dist/esm/Hr/hr.spec.mjs.map +0 -1
- package/dist/esm/Hr/hr.spec.native.js +0 -22
- package/dist/esm/Hr/hr.spec.native.js.map +0 -1
- package/dist/esm/Li/li.spec.mjs +0 -46
- package/dist/esm/Li/li.spec.mjs.map +0 -1
- package/dist/esm/Li/li.spec.native.js +0 -48
- package/dist/esm/Li/li.spec.native.js.map +0 -1
- package/dist/esm/Markdown.stories.mjs +0 -125
- package/dist/esm/Markdown.stories.mjs.map +0 -1
- package/dist/esm/Markdown.stories.native.js +0 -131
- package/dist/esm/Markdown.stories.native.js.map +0 -1
- package/dist/esm/Mdx/mdx.spec.mjs +0 -140
- package/dist/esm/Mdx/mdx.spec.mjs.map +0 -1
- package/dist/esm/Mdx/mdx.spec.native.js +0 -156
- package/dist/esm/Mdx/mdx.spec.native.js.map +0 -1
- package/dist/esm/MdxCodeBlock/mdxCodeBlock.spec.mjs +0 -91
- package/dist/esm/MdxCodeBlock/mdxCodeBlock.spec.mjs.map +0 -1
- package/dist/esm/MdxCodeBlock/mdxCodeBlock.spec.native.js +0 -96
- package/dist/esm/MdxCodeBlock/mdxCodeBlock.spec.native.js.map +0 -1
- package/dist/esm/SimpleTable/index.mjs.map +0 -1
- package/dist/esm/SimpleTable/index.native.js.map +0 -1
- package/dist/esm/Ul/ul.spec.mjs +0 -151
- package/dist/esm/Ul/ul.spec.mjs.map +0 -1
- package/dist/esm/Ul/ul.spec.native.js +0 -151
- package/dist/esm/Ul/ul.spec.native.js.map +0 -1
- package/dist/esm/hooks/useCompileAndEvaluateMdx.spec.mjs +0 -35
- package/dist/esm/hooks/useCompileAndEvaluateMdx.spec.mjs.map +0 -1
- package/dist/esm/hooks/useCompileAndEvaluateMdx.spec.native.js +0 -47
- package/dist/esm/hooks/useCompileAndEvaluateMdx.spec.native.js.map +0 -1
- package/dist/esm/mdx.spec.mjs +0 -377
- package/dist/esm/mdx.spec.mjs.map +0 -1
- package/dist/esm/mdx.spec.native.js +0 -439
- package/dist/esm/mdx.spec.native.js.map +0 -1
- package/dist/esm/parser.spec.mjs +0 -110
- package/dist/esm/parser.spec.mjs.map +0 -1
- package/dist/esm/parser.spec.native.js +0 -112
- package/dist/esm/parser.spec.native.js.map +0 -1
- package/dist/esm/shiki/highlighter.mjs +0 -59
- package/dist/esm/shiki/highlighter.mjs.map +0 -1
- package/dist/esm/shiki/highlighter.native.js +0 -61
- package/dist/esm/shiki/highlighter.native.js.map +0 -1
- package/dist/esm/util/util.spec.mjs +0 -82
- package/dist/esm/util/util.spec.mjs.map +0 -1
- package/dist/esm/util/util.spec.native.js +0 -82
- package/dist/esm/util/util.spec.native.js.map +0 -1
- package/dist/jsx/ExternalIcon/ExternalIcon.spec.mjs +0 -38
- package/dist/jsx/ExternalIcon/ExternalIcon.spec.mjs.map +0 -1
- package/dist/jsx/ExternalIcon/ExternalIcon.spec.native.js +0 -40
- package/dist/jsx/ExternalIcon/ExternalIcon.spec.native.js.map +0 -1
- package/dist/jsx/Hr/hr.spec.mjs +0 -22
- package/dist/jsx/Hr/hr.spec.mjs.map +0 -1
- package/dist/jsx/Hr/hr.spec.native.js +0 -24
- package/dist/jsx/Hr/hr.spec.native.js.map +0 -1
- package/dist/jsx/Li/li.spec.mjs +0 -46
- package/dist/jsx/Li/li.spec.mjs.map +0 -1
- package/dist/jsx/Li/li.spec.native.js +0 -50
- package/dist/jsx/Li/li.spec.native.js.map +0 -1
- package/dist/jsx/Markdown.stories.mjs +0 -125
- package/dist/jsx/Markdown.stories.mjs.map +0 -1
- package/dist/jsx/Markdown.stories.native.js +0 -162
- package/dist/jsx/Markdown.stories.native.js.map +0 -1
- package/dist/jsx/Mdx/mdx.spec.mjs +0 -140
- package/dist/jsx/Mdx/mdx.spec.mjs.map +0 -1
- package/dist/jsx/Mdx/mdx.spec.native.js +0 -158
- package/dist/jsx/Mdx/mdx.spec.native.js.map +0 -1
- package/dist/jsx/MdxCodeBlock/mdxCodeBlock.spec.mjs +0 -91
- package/dist/jsx/MdxCodeBlock/mdxCodeBlock.spec.mjs.map +0 -1
- package/dist/jsx/MdxCodeBlock/mdxCodeBlock.spec.native.js +0 -122
- package/dist/jsx/MdxCodeBlock/mdxCodeBlock.spec.native.js.map +0 -1
- package/dist/jsx/SimpleTable/index.mjs.map +0 -1
- package/dist/jsx/SimpleTable/index.native.js.map +0 -1
- package/dist/jsx/Ul/ul.spec.mjs +0 -151
- package/dist/jsx/Ul/ul.spec.mjs.map +0 -1
- package/dist/jsx/Ul/ul.spec.native.js +0 -153
- package/dist/jsx/Ul/ul.spec.native.js.map +0 -1
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.spec.mjs +0 -35
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.spec.mjs.map +0 -1
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.spec.native.js +0 -49
- package/dist/jsx/hooks/useCompileAndEvaluateMdx.spec.native.js.map +0 -1
- package/dist/jsx/mdx.spec.mjs +0 -377
- package/dist/jsx/mdx.spec.mjs.map +0 -1
- package/dist/jsx/mdx.spec.native.js +0 -465
- package/dist/jsx/mdx.spec.native.js.map +0 -1
- package/dist/jsx/parser.spec.mjs +0 -110
- package/dist/jsx/parser.spec.mjs.map +0 -1
- package/dist/jsx/parser.spec.native.js +0 -114
- package/dist/jsx/parser.spec.native.js.map +0 -1
- package/dist/jsx/shiki/highlighter.mjs +0 -59
- package/dist/jsx/shiki/highlighter.mjs.map +0 -1
- package/dist/jsx/shiki/highlighter.native.js +0 -94
- package/dist/jsx/shiki/highlighter.native.js.map +0 -1
- package/dist/jsx/util/util.spec.mjs +0 -82
- package/dist/jsx/util/util.spec.mjs.map +0 -1
- package/dist/jsx/util/util.spec.native.js +0 -84
- package/dist/jsx/util/util.spec.native.js.map +0 -1
- package/src/shiki/highlighter.ts +0 -148
|
@@ -25,6 +25,7 @@ __export(Heading_exports, {
|
|
|
25
25
|
Heading: () => Heading
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(Heading_exports);
|
|
28
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
28
29
|
var import_tamagui = require("tamagui");
|
|
29
30
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
31
|
const headingComponents = {
|
|
@@ -35,14 +36,36 @@ const headingComponents = {
|
|
|
35
36
|
5: import_tamagui.H5,
|
|
36
37
|
6: import_tamagui.H6
|
|
37
38
|
};
|
|
39
|
+
const headingBaseSize = {
|
|
40
|
+
1: 9,
|
|
41
|
+
2: 8,
|
|
42
|
+
3: 7,
|
|
43
|
+
4: 6,
|
|
44
|
+
5: 5,
|
|
45
|
+
6: 4
|
|
46
|
+
};
|
|
47
|
+
const sizeShift = {
|
|
48
|
+
$3: -1,
|
|
49
|
+
$4: 0,
|
|
50
|
+
$5: 1
|
|
51
|
+
};
|
|
38
52
|
function Heading({
|
|
39
53
|
level,
|
|
40
54
|
children
|
|
41
55
|
}) {
|
|
42
56
|
const Component = headingComponents[level];
|
|
57
|
+
const {
|
|
58
|
+
knobProps
|
|
59
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
60
|
+
const headingFamily = import_tamagui.isWeb ? null : {
|
|
61
|
+
fontFamily: knobProps.heading.fontFamily
|
|
62
|
+
};
|
|
63
|
+
const size = `$${headingBaseSize[level] + (sizeShift[knobProps.sizeToken] ?? 0)}`;
|
|
43
64
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Component, {
|
|
44
65
|
marginTop: "$3",
|
|
45
66
|
marginBottom: "$2",
|
|
67
|
+
size,
|
|
68
|
+
...headingFamily,
|
|
46
69
|
children
|
|
47
70
|
});
|
|
48
71
|
}
|
|
@@ -28,6 +28,7 @@ __export(Heading_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(Heading_exports);
|
|
30
30
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
31
32
|
var import_tamagui = require("tamagui");
|
|
32
33
|
var headingComponents = {
|
|
33
34
|
1: import_tamagui.H1,
|
|
@@ -37,15 +38,38 @@ var headingComponents = {
|
|
|
37
38
|
5: import_tamagui.H5,
|
|
38
39
|
6: import_tamagui.H6
|
|
39
40
|
};
|
|
41
|
+
var headingBaseSize = {
|
|
42
|
+
1: 9,
|
|
43
|
+
2: 8,
|
|
44
|
+
3: 7,
|
|
45
|
+
4: 6,
|
|
46
|
+
5: 5,
|
|
47
|
+
6: 4
|
|
48
|
+
};
|
|
49
|
+
var sizeShift = {
|
|
50
|
+
$3: -1,
|
|
51
|
+
$4: 0,
|
|
52
|
+
$5: 1
|
|
53
|
+
};
|
|
40
54
|
function Heading(param) {
|
|
41
55
|
var {
|
|
42
56
|
level,
|
|
43
57
|
children
|
|
44
58
|
} = param;
|
|
59
|
+
var _sizeShift_knobProps_sizeToken;
|
|
45
60
|
var Component = headingComponents[level];
|
|
61
|
+
var {
|
|
62
|
+
knobProps
|
|
63
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
64
|
+
var headingFamily = import_tamagui.isWeb ? null : {
|
|
65
|
+
fontFamily: knobProps.heading.fontFamily
|
|
66
|
+
};
|
|
67
|
+
var size = `$${headingBaseSize[level] + ((_sizeShift_knobProps_sizeToken = sizeShift[knobProps.sizeToken]) !== null && _sizeShift_knobProps_sizeToken !== void 0 ? _sizeShift_knobProps_sizeToken : 0)}`;
|
|
46
68
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Component, {
|
|
47
69
|
marginTop: "$3",
|
|
48
70
|
marginBottom: "$2",
|
|
71
|
+
size,
|
|
72
|
+
...headingFamily,
|
|
49
73
|
children
|
|
50
74
|
});
|
|
51
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Heading_exports","__export","Heading","module","exports","import_jsx_runtime","require","import_tamagui","headingComponents","H1","H2","H3","H4","H5","H6","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Heading_exports","__export","Heading","module","exports","import_jsx_runtime","require","import_theme","import_tamagui","headingComponents","H1","H2","H3","H4","H5","H6","headingBaseSize"],"sources":["../../../src/components/Heading.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,OAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAiC,CAAAK,eAAA;AACjC,IAAAK,kBAA8C,GAAAC,OAAA;AA2B1C,IAAAC,YAAA,GAAAD,OAAA;AAxBJ,IAAAE,cAAM,GAAAF,OAAoB;AAAA,IACxBG,iBAAG;EACH,GAAGD,cAAA,CAAAE,EAAA;EACH,GAAGF,cAAA,CAAAG,EAAA;EACH,GAAGH,cAAA,CAAAI,EAAA;EACH,GAAGJ,cAAA,CAAAK,EAAA;EACH,GAAGL,cAAA,CAAAM,EAAA;EACL,GAAAN,cAAA,CAAAO;AAGA;AAGA,IAAAC,eAA0C,GAAE;EAErC;EACL;EAIA;EACA;EACA;EACA;AAKF","ignoreList":[]}
|
|
@@ -39,14 +39,12 @@ function MarkdownImage({
|
|
|
39
39
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
40
40
|
marginVertical: "$2",
|
|
41
41
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Image, {
|
|
42
|
-
|
|
43
|
-
uri: src
|
|
44
|
-
},
|
|
42
|
+
src,
|
|
45
43
|
alt: alt || "",
|
|
46
|
-
|
|
44
|
+
"aria-label": alt || title || void 0,
|
|
47
45
|
width: "100%",
|
|
48
46
|
height: 200,
|
|
49
|
-
|
|
47
|
+
objectFit: "contain",
|
|
50
48
|
borderRadius: knobProps.borderRadius.borderRadius
|
|
51
49
|
})
|
|
52
50
|
});
|
|
@@ -42,14 +42,15 @@ function MarkdownImage(param) {
|
|
|
42
42
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
43
43
|
marginVertical: "$2",
|
|
44
44
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Image, {
|
|
45
|
-
source:
|
|
46
|
-
|
|
47
|
-
}
|
|
45
|
+
// src (string), not source: the RN source object never reaches the
|
|
46
|
+
// DOM <img> src on web, so the image silently renders empty; tamagui
|
|
47
|
+
// maps src back to source={{uri}} on native.
|
|
48
|
+
src,
|
|
48
49
|
alt: alt || "",
|
|
49
|
-
|
|
50
|
+
"aria-label": alt || title || void 0,
|
|
50
51
|
width: "100%",
|
|
51
52
|
height: 200,
|
|
52
|
-
|
|
53
|
+
objectFit: "contain",
|
|
53
54
|
borderRadius: knobProps.borderRadius.borderRadius
|
|
54
55
|
})
|
|
55
56
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Image_exports","__export","MarkdownImage","module","exports","import_jsx_runtime","require","import_tamagui","import_theme","param","src","alt","title","knobProps","useResolvedKnobs","jsx","View","marginVertical","children","Image","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Image_exports","__export","MarkdownImage","module","exports","import_jsx_runtime","require","import_tamagui","import_theme","param","src","alt","title","knobProps","useResolvedKnobs","jsx","View","marginVertical","children","Image","width","height"],"sources":["../../../src/components/Image.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA4C,CAAAK,aAAA;AAC5C,IAAAK,kBAAiC,GAAAC,OAAA;AAO3B,IAAAC,cAAA,GAAAD,OAAA;AAJC,IAAAE,YAAS,GAAAF,OAAgB,2BAA+B;AAC7D,SAAMJ,aAAYA,CAAAO,KAAI;EACtB;IAAAC,GACE;IAAAC,GAAA;IAAAC;EAAA,IAAAH,KAAA;EACE,IAAC;IAAAI;EAAA,QAAAL,YAAA,CAAAM,gBAAA;EAAA,0BAAAT,kBAAA,CAAAU,GAAA,EAAAR,cAAA,CAAAS,IAAA;IAAAC,cAIC;IAAAC,QACK,iBAAO,IAAAb,kBAAA,CAAAU,GAAA,EAAAR,cAAA,CAAAY,KAAA;MACZ;MACA;MACA;MACAT,GAAA;MACAC,GAAA,EAAAA,GAAA,MAAc;MAAuB,cAAAA,GAAA,IAAAC,KAAA;MAEzCQ,KAAA;MAEJC,MAAA","ignoreList":[]}
|
|
@@ -25,9 +25,8 @@ __export(InlineCode_exports, {
|
|
|
25
25
|
InlineCode: () => InlineCode
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(InlineCode_exports);
|
|
28
|
-
var
|
|
28
|
+
var import_components = require("@multiplatform.one/components");
|
|
29
29
|
var import_theme = require("@multiplatform.one/theme");
|
|
30
|
-
var import_colorRamps = require("../shared/colorRamps.cjs");
|
|
31
30
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
31
|
function InlineCode({
|
|
33
32
|
children
|
|
@@ -35,11 +34,9 @@ function InlineCode({
|
|
|
35
34
|
const {
|
|
36
35
|
knobProps
|
|
37
36
|
} = (0, import_theme.useResolvedKnobs)();
|
|
38
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
39
|
-
fontFamily: "$mono",
|
|
37
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.CodeInline, {
|
|
40
38
|
fontSize: knobProps.sizeToken,
|
|
41
|
-
|
|
42
|
-
color: import_colorRamps.markdownCodeColors.text.base,
|
|
39
|
+
lineHeight: knobProps.sizeToken,
|
|
43
40
|
paddingHorizontal: "$1.5",
|
|
44
41
|
paddingVertical: "$0.5",
|
|
45
42
|
borderRadius: knobProps.borderRadius.borderRadius,
|
|
@@ -28,9 +28,8 @@ __export(InlineCode_exports, {
|
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(InlineCode_exports);
|
|
30
30
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
var
|
|
31
|
+
var import_components = require("@multiplatform.one/components");
|
|
32
32
|
var import_theme = require("@multiplatform.one/theme");
|
|
33
|
-
var import_colorRamps = require("../shared/colorRamps.native.js");
|
|
34
33
|
function InlineCode(param) {
|
|
35
34
|
var {
|
|
36
35
|
children
|
|
@@ -38,11 +37,9 @@ function InlineCode(param) {
|
|
|
38
37
|
var {
|
|
39
38
|
knobProps
|
|
40
39
|
} = (0, import_theme.useResolvedKnobs)();
|
|
41
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
42
|
-
fontFamily: "$mono",
|
|
40
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_components.CodeInline, {
|
|
43
41
|
fontSize: knobProps.sizeToken,
|
|
44
|
-
|
|
45
|
-
color: import_colorRamps.markdownCodeColors.text.base,
|
|
42
|
+
lineHeight: knobProps.sizeToken,
|
|
46
43
|
paddingHorizontal: "$1.5",
|
|
47
44
|
paddingVertical: "$0.5",
|
|
48
45
|
borderRadius: knobProps.borderRadius.borderRadius,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","InlineCode_exports","__export","InlineCode","module","exports","import_jsx_runtime","require","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","InlineCode_exports","__export","InlineCode","module","exports","import_jsx_runtime","require","import_components","import_theme","param","children","knobProps","useResolvedKnobs","jsx","CodeInline","fontSize","sizeToken","lineHeight","paddingHorizontal","paddingVertical","borderRadius"],"sources":["../../../src/components/InlineCode.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,kBAAA;AAAAC,QAAA,CAAAD,kBAAA;EAAAE,UAAA,EAAAA,CAAA,KAAAA;AAAA;AAUAC,MAAA,CAAAC,OAAA,GAAAT,YAA2B,CAAAK,kBAAA;AAC3B,IAAAK,kBAAiC,GAAAC,OAAA;AAM7B,IAAAC,iBAAA,GAAAD,OAAA;AAHG,IAAAE,YAAS,GAAAF,OAAa,2BAA6B;AACxD,SAAMJ,UAAEA,CAAUO,KAAA;EAClB;IAAAC;EACE,IAAAD,KAAA;EAAA,IAAC;IAAAE;EAAA,QAAAH,YAAA,CAAAI,gBAAA;EAAA,0BAAAP,kBAAA,CAAAQ,GAAA,EAAAN,iBAAA,CAAAO,UAAA;IAAAC,QACC,EAAAJ,SAAU,CAAAK,SAAU;IAAAC,UACpB,EAAAN,SAAY,CAAAK,SAAU;IAAAE,iBACtB,QAAkB;IAAAC,eAClB,QAAgB;IAAAC,YAChB,EAAAT,SAAc,CAAAS,YAAU,CAAAA,YAAa;IAAAV;EAEpC;AAAA","ignoreList":[]}
|
|
@@ -33,6 +33,7 @@ function Strong({
|
|
|
33
33
|
children
|
|
34
34
|
}) {
|
|
35
35
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
36
|
+
render: "strong",
|
|
36
37
|
fontWeight: "bold",
|
|
37
38
|
children
|
|
38
39
|
});
|
|
@@ -41,6 +42,7 @@ function Emphasis({
|
|
|
41
42
|
children
|
|
42
43
|
}) {
|
|
43
44
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
45
|
+
render: "em",
|
|
44
46
|
fontStyle: "italic",
|
|
45
47
|
children
|
|
46
48
|
});
|
|
@@ -49,6 +51,7 @@ function Strikethrough({
|
|
|
49
51
|
children
|
|
50
52
|
}) {
|
|
51
53
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
54
|
+
render: "del",
|
|
52
55
|
textDecorationLine: "line-through",
|
|
53
56
|
children
|
|
54
57
|
});
|
|
@@ -36,6 +36,7 @@ function Strong(param) {
|
|
|
36
36
|
children
|
|
37
37
|
} = param;
|
|
38
38
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
39
|
+
render: "strong",
|
|
39
40
|
fontWeight: "bold",
|
|
40
41
|
children
|
|
41
42
|
});
|
|
@@ -45,6 +46,7 @@ function Emphasis(param) {
|
|
|
45
46
|
children
|
|
46
47
|
} = param;
|
|
47
48
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
49
|
+
render: "em",
|
|
48
50
|
fontStyle: "italic",
|
|
49
51
|
children
|
|
50
52
|
});
|
|
@@ -54,6 +56,7 @@ function Strikethrough(param) {
|
|
|
54
56
|
children
|
|
55
57
|
} = param;
|
|
56
58
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
59
|
+
render: "del",
|
|
57
60
|
textDecorationLine: "line-through",
|
|
58
61
|
children
|
|
59
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","InlineStyles_exports","__export","Emphasis","Strikethrough","Strong","module","exports","import_jsx_runtime","require","import_tamagui","param","children","jsx","Text","fontWeight"],"sources":["../../../src/components/InlineStyles.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,MAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAX,YAAqB,CAAAK,oBAAA;
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","InlineStyles_exports","__export","Emphasis","Strikethrough","Strong","module","exports","import_jsx_runtime","require","import_tamagui","param","children","jsx","Text","render","fontWeight"],"sources":["../../../src/components/InlineStyles.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,QAAA,EAAAA,CAAA,KAAAA,QAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,MAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAX,YAAqB,CAAAK,oBAAA;AAKjB,IAAAO,kBAAA,GAAAC,OAAA;AAFG,IAAAC,cAAkB,GAAAD,OAAS,UAAgB;AAChD,SACEJ,OAAAM,KAAA;EAIJ;IAAAC;EAAA,IAAAD,KAAA;EAEO,OAAS,eAAW,IAASH,kBAAgB,CAAAK,GAAA,EAAAH,cAAA,CAAAI,IAAA;IAClDC,MACE;IAIJC,UAAA;IAEOJ;EACL;AAKF","ignoreList":[]}
|
|
@@ -29,26 +29,43 @@ var import_tamagui = require("tamagui");
|
|
|
29
29
|
var import_platform = require("@multiplatform.one/platform");
|
|
30
30
|
var import_colorRamps = require("../shared/colorRamps.cjs");
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
const safeProtocols = /* @__PURE__ */new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
33
|
+
function getSafeHref(href) {
|
|
34
|
+
if (!href) return void 0;
|
|
35
|
+
const trimmed = href.trim();
|
|
36
|
+
const match = trimmed.match(/^([a-z][a-z0-9+.-]*):/i);
|
|
37
|
+
if (!match) return trimmed;
|
|
38
|
+
return safeProtocols.has(match[1].toLowerCase()) ? trimmed : void 0;
|
|
39
|
+
}
|
|
32
40
|
function Link({
|
|
33
41
|
href,
|
|
34
42
|
title,
|
|
35
43
|
children
|
|
36
44
|
}) {
|
|
45
|
+
const safeHref = getSafeHref(href);
|
|
46
|
+
const isExternal = !!safeHref && /^https?:\/\//i.test(safeHref);
|
|
37
47
|
const handlePress = () => {
|
|
38
|
-
if (
|
|
39
|
-
(0, import_platform.openUrl)(href);
|
|
40
|
-
}
|
|
48
|
+
if (!import_tamagui.isWeb && safeHref) (0, import_platform.openUrl)(safeHref);
|
|
41
49
|
};
|
|
42
50
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
51
|
+
render: "a",
|
|
52
|
+
href: safeHref,
|
|
53
|
+
target: isExternal ? "_blank" : void 0,
|
|
54
|
+
rel: isExternal ? "noopener noreferrer" : void 0,
|
|
55
|
+
title: title || void 0,
|
|
43
56
|
color: import_colorRamps.markdownLinkColors.text.base,
|
|
44
57
|
textDecorationLine: "underline",
|
|
45
58
|
cursor: "pointer",
|
|
46
59
|
onPress: handlePress,
|
|
47
|
-
accessibilityRole: "link",
|
|
48
|
-
accessibilityLabel: title || void 0,
|
|
49
60
|
hoverStyle: {
|
|
50
61
|
color: import_colorRamps.markdownLinkColors.text.hover
|
|
51
62
|
},
|
|
63
|
+
focusVisibleStyle: {
|
|
64
|
+
outlineColor: "$outlineColor",
|
|
65
|
+
outlineWidth: 2,
|
|
66
|
+
outlineStyle: "solid",
|
|
67
|
+
outlineOffset: 2
|
|
68
|
+
},
|
|
52
69
|
children
|
|
53
70
|
});
|
|
54
71
|
}
|
|
@@ -31,27 +31,45 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
31
31
|
var import_tamagui = require("tamagui");
|
|
32
32
|
var import_platform = require("@multiplatform.one/platform");
|
|
33
33
|
var import_colorRamps = require("../shared/colorRamps.native.js");
|
|
34
|
+
var safeProtocols = /* @__PURE__ */new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
35
|
+
function getSafeHref(href) {
|
|
36
|
+
if (!href) return void 0;
|
|
37
|
+
var trimmed = href.trim();
|
|
38
|
+
var match = trimmed.match(/^([a-z][a-z0-9+.-]*):/i);
|
|
39
|
+
if (!match) return trimmed;
|
|
40
|
+
return safeProtocols.has(match[1].toLowerCase()) ? trimmed : void 0;
|
|
41
|
+
}
|
|
34
42
|
function Link(param) {
|
|
35
43
|
var {
|
|
36
44
|
href,
|
|
37
45
|
title,
|
|
38
46
|
children
|
|
39
47
|
} = param;
|
|
48
|
+
var safeHref = getSafeHref(href);
|
|
49
|
+
var isExternal = !!safeHref && /^https?:\/\//i.test(safeHref);
|
|
40
50
|
var handlePress = function handlePress2() {
|
|
41
|
-
if (
|
|
42
|
-
(0, import_platform.openUrl)(href);
|
|
43
|
-
}
|
|
51
|
+
if (!import_tamagui.isWeb && safeHref) (0, import_platform.openUrl)(safeHref);
|
|
44
52
|
};
|
|
45
53
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
54
|
+
render: "a",
|
|
55
|
+
// @ts-expect-error anchor attributes forwarded to the DOM element
|
|
56
|
+
href: safeHref,
|
|
57
|
+
target: isExternal ? "_blank" : void 0,
|
|
58
|
+
rel: isExternal ? "noopener noreferrer" : void 0,
|
|
59
|
+
title: title || void 0,
|
|
46
60
|
color: import_colorRamps.markdownLinkColors.text.base,
|
|
47
61
|
textDecorationLine: "underline",
|
|
48
62
|
cursor: "pointer",
|
|
49
63
|
onPress: handlePress,
|
|
50
|
-
accessibilityRole: "link",
|
|
51
|
-
accessibilityLabel: title || void 0,
|
|
52
64
|
hoverStyle: {
|
|
53
65
|
color: import_colorRamps.markdownLinkColors.text.hover
|
|
54
66
|
},
|
|
67
|
+
focusVisibleStyle: {
|
|
68
|
+
outlineColor: "$outlineColor",
|
|
69
|
+
outlineWidth: 2,
|
|
70
|
+
outlineStyle: "solid",
|
|
71
|
+
outlineOffset: 2
|
|
72
|
+
},
|
|
55
73
|
children
|
|
56
74
|
});
|
|
57
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Link_exports","__export","Link","module","exports","import_jsx_runtime","require","import_tamagui","import_platform","import_colorRamps","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Link_exports","__export","Link","module","exports","import_jsx_runtime","require","import_tamagui","import_platform","import_colorRamps","safeProtocols","Set","getSafeHref","href","trimmed","trim","match","has","toLowerCase","param","title","children","safeHref","isExternal","test","handlePress","handlePress2","isWeb","openUrl","jsx","Text","render","target","rel","color","markdownLinkColors","text","base","textDecorationLine","cursor","onPress","hoverStyle","hover","focusVisibleStyle"],"sources":["../../../src/components/Link.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,YAAA;AAAAC,QAAA,CAAAD,YAAA;EAAAE,IAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA4B,CAAAK,YAAA;AAC5B,IAAAK,kBAAwB,GAAAC,OAAA;AACxB,IAAAC,cAAA,GAAAD,OAAmC;AAwB/B,IAAAE,eAAA,GAAAF,OAAA;AArBJ,IAAAG,iBAAM,GAAgBH,OAAA,iCAAS,CAAQ;AAEvC,IAAAI,aAAS,kBAA+C,IAAAC,GAAA,EACtD,MAAK,EACL,OAAM,EACN,QAAM,EAEN,KAAK,EACL,MACF;AAEO,SAASC,WAAOA,CAAAC,IAAM;EAC3B,KAAAA,IAAM,SAAW;EACjB,IAAAC,OAAM,GAAAD,IAAA,CAAaE,IAAE;EAErB,IAAAC,KAAM,GAAAF,OAAA,CAAcE,KAAA,CAAM;EAExB,KAAAA,KAAK,SAAAF,OAAA;EACP,OAAAJ,aAAA,CAAAO,GAAA,CAAAD,KAAA,IAAAE,WAAA,MAAAJ,OAAA;AAEA;AACE,SAACZ,KAAAiB,KAAA;EAAA;IAAAN,IAAA;IAAAO,KAAA;IAAAC;EAAA,IAAAF,KAAA;EAAA,IACCG,QAAO,GAAAV,WAAA,CAAAC,IAAA;EAAA,IAEPU,UAAM,KAAAD,QAAA,oBAAAE,IAAA,CAAAF,QAAA;EAAA,IACNG,WAAQ,YAAaC,YAAWA,CAAA;IAAA,IAChC,CAAAnB,cAAK,CAAaoB,KAAA,IAAAL,QAAA,MAAAd,eAAwB,CAAAoB,OAAA,EAAAN,QAAA;EAAA;EAC1B,OAChB,eAAO,IAAAjB,kBAAA,CAAAwB,GAAmB,EAAAtB,cAAK,CAAAuB,IAAA;IAAAC,MAC/B;IAAmB;IACZlB,IACP,EAAAS,QAAS;IAAAU,MACT,EAAAT,UAAc,WAAO;IAA8BU,GACnD,EAAAV,UAAA,wBAAmB;IAAAH,KACjB,EAAAA,KAAA,SAAc;IAAAc,KACd,EAAAzB,iBAAc,CAAA0B,kBAAA,CAAAC,IAAA,CAAAC,IAAA;IAAAC,kBACA;IAAAC,MACd;IAAeC,OACjB,EAAAf,WAAA;IAAAgB,UAEC;MAAAP,KAAA,EAAAzB,iBAAA,CAAA0B,kBAAA,CAAAC,IAAA,CAAAM;IACH;IAEJC,iBAAA","ignoreList":[]}
|
|
@@ -26,33 +26,109 @@ __export(List_exports, {
|
|
|
26
26
|
MarkdownListItem: () => MarkdownListItem
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(List_exports);
|
|
29
|
+
var import_react = require("react");
|
|
30
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
29
31
|
var import_tamagui = require("tamagui");
|
|
32
|
+
var import_icons = require("../icons/index.cjs");
|
|
30
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
const listReset = {
|
|
35
|
+
listStyleType: "none",
|
|
36
|
+
paddingInlineStart: 0,
|
|
37
|
+
marginBlockStart: 0,
|
|
38
|
+
marginBlockEnd: 0
|
|
39
|
+
};
|
|
31
40
|
function MarkdownList({
|
|
32
|
-
ordered
|
|
33
|
-
start
|
|
41
|
+
ordered,
|
|
42
|
+
start,
|
|
34
43
|
children
|
|
35
44
|
}) {
|
|
45
|
+
const items = import_react.Children.map(children, child => {
|
|
46
|
+
if (!(0, import_react.isValidElement)(child) || child.type !== MarkdownListItem) return child;
|
|
47
|
+
const childProps = child.props;
|
|
48
|
+
return (0, import_react.cloneElement)(child, {
|
|
49
|
+
ordered: childProps.ordered ?? ordered,
|
|
50
|
+
start: childProps.start ?? start ?? void 0
|
|
51
|
+
});
|
|
52
|
+
});
|
|
36
53
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
54
|
+
render: ordered ? "ol" : "ul",
|
|
55
|
+
start: ordered ? start ?? void 0 : void 0,
|
|
56
|
+
style: listReset,
|
|
37
57
|
marginVertical: "$2",
|
|
38
|
-
children
|
|
58
|
+
children: items
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function getTaskBoxMetrics() {
|
|
62
|
+
const bodyFont = (0, import_tamagui.getConfig)()?.fontsParsed?.$body;
|
|
63
|
+
const fontSize = Math.round((0, import_tamagui.getVariableValue)(bodyFont?.size?.$true) || 14);
|
|
64
|
+
const lineHeight = Math.round((0, import_tamagui.getVariableValue)(bodyFont?.lineHeight?.$6) || fontSize * 2);
|
|
65
|
+
return {
|
|
66
|
+
boxSize: Math.round(fontSize * 1.15),
|
|
67
|
+
lineHeight
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
const taskInlineGapMap = {
|
|
71
|
+
small: "$1.5",
|
|
72
|
+
medium: "$2",
|
|
73
|
+
large: "$2.5"
|
|
74
|
+
};
|
|
75
|
+
function clampTaskBoxRadius(radiusToken, pointy) {
|
|
76
|
+
if (pointy || radiusToken === "$0") return 0;
|
|
77
|
+
const num = Number.parseInt(radiusToken.replace("$", ""), 10);
|
|
78
|
+
return Number.isFinite(num) && num > 2 ? "$2" : radiusToken;
|
|
79
|
+
}
|
|
80
|
+
function TaskCheckbox({
|
|
81
|
+
checked
|
|
82
|
+
}) {
|
|
83
|
+
const {
|
|
84
|
+
knobProps
|
|
85
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
86
|
+
const {
|
|
87
|
+
boxSize,
|
|
88
|
+
lineHeight
|
|
89
|
+
} = getTaskBoxMetrics();
|
|
90
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
91
|
+
height: lineHeight,
|
|
92
|
+
justifyContent: "center",
|
|
93
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
94
|
+
role: "checkbox",
|
|
95
|
+
"aria-checked": checked,
|
|
96
|
+
"aria-disabled": true,
|
|
97
|
+
width: boxSize,
|
|
98
|
+
height: boxSize,
|
|
99
|
+
borderWidth: knobProps.borderRadius.borderWidth,
|
|
100
|
+
borderColor: "$color7",
|
|
101
|
+
backgroundColor: knobProps.outlined ? "transparent" : "$color5",
|
|
102
|
+
borderRadius: clampTaskBoxRadius(knobProps.borderRadius.borderRadius, knobProps.pointy),
|
|
103
|
+
alignItems: "center",
|
|
104
|
+
justifyContent: "center",
|
|
105
|
+
children: checked ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_icons.CheckIcon, {
|
|
106
|
+
size: Math.round(boxSize * 0.72),
|
|
107
|
+
color: knobProps.textAccentColor,
|
|
108
|
+
strokeWidth: knobProps.textWeight.fontWeight === "700" ? 3 : 2.5
|
|
109
|
+
}) : null
|
|
110
|
+
})
|
|
39
111
|
});
|
|
40
112
|
}
|
|
41
113
|
function MarkdownListItem({
|
|
42
114
|
checked,
|
|
43
115
|
children,
|
|
44
116
|
index = 0,
|
|
45
|
-
ordered = false
|
|
117
|
+
ordered = false,
|
|
118
|
+
start
|
|
46
119
|
}) {
|
|
47
|
-
const
|
|
120
|
+
const {
|
|
121
|
+
knobProps
|
|
122
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
123
|
+
const bullet = ordered ? `${(start ?? 1) + index}.` : "\u2022";
|
|
48
124
|
if (checked !== null && checked !== void 0) {
|
|
49
125
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
126
|
+
render: "li",
|
|
50
127
|
marginBottom: "$1",
|
|
51
128
|
alignItems: "flex-start",
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
children: checked ? "\u2611" : "\u2610"
|
|
129
|
+
gap: taskInlineGapMap[knobProps.space] ?? "$2",
|
|
130
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(TaskCheckbox, {
|
|
131
|
+
checked
|
|
56
132
|
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
57
133
|
flex: 1,
|
|
58
134
|
children
|
|
@@ -60,11 +136,13 @@ function MarkdownListItem({
|
|
|
60
136
|
});
|
|
61
137
|
}
|
|
62
138
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
139
|
+
render: "li",
|
|
63
140
|
marginBottom: "$1",
|
|
64
141
|
alignItems: "flex-start",
|
|
65
142
|
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
66
143
|
width: 24,
|
|
67
144
|
color: "$color11",
|
|
145
|
+
"aria-hidden": true,
|
|
68
146
|
children: bullet
|
|
69
147
|
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
70
148
|
flex: 1,
|
|
@@ -29,16 +29,91 @@ __export(List_exports, {
|
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(List_exports);
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
+
var import_react = require("react");
|
|
33
|
+
var import_theme = require("@multiplatform.one/theme");
|
|
32
34
|
var import_tamagui = require("tamagui");
|
|
35
|
+
var import_icons = require("../icons/index.native.js");
|
|
36
|
+
var listReset = {
|
|
37
|
+
listStyleType: "none",
|
|
38
|
+
paddingInlineStart: 0,
|
|
39
|
+
marginBlockStart: 0,
|
|
40
|
+
marginBlockEnd: 0
|
|
41
|
+
};
|
|
33
42
|
function MarkdownList(param) {
|
|
34
43
|
var {
|
|
35
|
-
ordered
|
|
36
|
-
start
|
|
44
|
+
ordered,
|
|
45
|
+
start,
|
|
37
46
|
children
|
|
38
47
|
} = param;
|
|
48
|
+
var items = import_react.Children.map(children, function (child) {
|
|
49
|
+
var _childProps_ordered, _ref, _childProps_start;
|
|
50
|
+
if (! /* @__PURE__ */(0, import_react.isValidElement)(child) || child.type !== MarkdownListItem) return child;
|
|
51
|
+
var childProps = child.props;
|
|
52
|
+
return /* @__PURE__ */(0, import_react.cloneElement)(child, {
|
|
53
|
+
ordered: (_childProps_ordered = childProps.ordered) !== null && _childProps_ordered !== void 0 ? _childProps_ordered : ordered,
|
|
54
|
+
start: (_ref = (_childProps_start = childProps.start) !== null && _childProps_start !== void 0 ? _childProps_start : start) !== null && _ref !== void 0 ? _ref : void 0
|
|
55
|
+
});
|
|
56
|
+
});
|
|
39
57
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
58
|
+
render: ordered ? "ol" : "ul",
|
|
59
|
+
start: ordered ? start !== null && start !== void 0 ? start : void 0 : void 0,
|
|
60
|
+
style: listReset,
|
|
40
61
|
marginVertical: "$2",
|
|
41
|
-
children
|
|
62
|
+
children: items
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function getTaskBoxMetrics() {
|
|
66
|
+
var _getConfig_fontsParsed, _getConfig, _bodyFont_size, _bodyFont_lineHeight;
|
|
67
|
+
var bodyFont = (_getConfig = (0, import_tamagui.getConfig)()) === null || _getConfig === void 0 ? void 0 : (_getConfig_fontsParsed = _getConfig.fontsParsed) === null || _getConfig_fontsParsed === void 0 ? void 0 : _getConfig_fontsParsed.$body;
|
|
68
|
+
var fontSize = Math.round((0, import_tamagui.getVariableValue)(bodyFont === null || bodyFont === void 0 ? void 0 : (_bodyFont_size = bodyFont.size) === null || _bodyFont_size === void 0 ? void 0 : _bodyFont_size.$true) || 14);
|
|
69
|
+
var lineHeight = Math.round((0, import_tamagui.getVariableValue)(bodyFont === null || bodyFont === void 0 ? void 0 : (_bodyFont_lineHeight = bodyFont.lineHeight) === null || _bodyFont_lineHeight === void 0 ? void 0 : _bodyFont_lineHeight.$6) || fontSize * 2);
|
|
70
|
+
return {
|
|
71
|
+
boxSize: Math.round(fontSize * 1.15),
|
|
72
|
+
lineHeight
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
var taskInlineGapMap = {
|
|
76
|
+
small: "$1.5",
|
|
77
|
+
medium: "$2",
|
|
78
|
+
large: "$2.5"
|
|
79
|
+
};
|
|
80
|
+
function clampTaskBoxRadius(radiusToken, pointy) {
|
|
81
|
+
if (pointy || radiusToken === "$0") return 0;
|
|
82
|
+
var num = Number.parseInt(radiusToken.replace("$", ""), 10);
|
|
83
|
+
return Number.isFinite(num) && num > 2 ? "$2" : radiusToken;
|
|
84
|
+
}
|
|
85
|
+
function TaskCheckbox(param) {
|
|
86
|
+
var {
|
|
87
|
+
checked
|
|
88
|
+
} = param;
|
|
89
|
+
var {
|
|
90
|
+
knobProps
|
|
91
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
92
|
+
var {
|
|
93
|
+
boxSize,
|
|
94
|
+
lineHeight
|
|
95
|
+
} = getTaskBoxMetrics();
|
|
96
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
97
|
+
height: lineHeight,
|
|
98
|
+
justifyContent: "center",
|
|
99
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
100
|
+
role: "checkbox",
|
|
101
|
+
"aria-checked": checked,
|
|
102
|
+
"aria-disabled": true,
|
|
103
|
+
width: boxSize,
|
|
104
|
+
height: boxSize,
|
|
105
|
+
borderWidth: knobProps.borderRadius.borderWidth,
|
|
106
|
+
borderColor: "$color7",
|
|
107
|
+
backgroundColor: knobProps.outlined ? "transparent" : "$color5",
|
|
108
|
+
borderRadius: clampTaskBoxRadius(knobProps.borderRadius.borderRadius, knobProps.pointy),
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
justifyContent: "center",
|
|
111
|
+
children: checked ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_icons.CheckIcon, {
|
|
112
|
+
size: Math.round(boxSize * 0.72),
|
|
113
|
+
color: knobProps.textAccentColor,
|
|
114
|
+
strokeWidth: knobProps.textWeight.fontWeight === "700" ? 3 : 2.5
|
|
115
|
+
}) : null
|
|
116
|
+
})
|
|
42
117
|
});
|
|
43
118
|
}
|
|
44
119
|
function MarkdownListItem(param) {
|
|
@@ -46,17 +121,22 @@ function MarkdownListItem(param) {
|
|
|
46
121
|
checked,
|
|
47
122
|
children,
|
|
48
123
|
index = 0,
|
|
49
|
-
ordered = false
|
|
124
|
+
ordered = false,
|
|
125
|
+
start
|
|
50
126
|
} = param;
|
|
51
|
-
var
|
|
127
|
+
var {
|
|
128
|
+
knobProps
|
|
129
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
130
|
+
var bullet = ordered ? `${(start !== null && start !== void 0 ? start : 1) + index}.` : "\u2022";
|
|
52
131
|
if (checked !== null && checked !== void 0) {
|
|
132
|
+
var _taskInlineGapMap_knobProps_space;
|
|
53
133
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
134
|
+
render: "li",
|
|
54
135
|
marginBottom: "$1",
|
|
55
136
|
alignItems: "flex-start",
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
children: checked ? "\u2611" : "\u2610"
|
|
137
|
+
gap: (_taskInlineGapMap_knobProps_space = taskInlineGapMap[knobProps.space]) !== null && _taskInlineGapMap_knobProps_space !== void 0 ? _taskInlineGapMap_knobProps_space : "$2",
|
|
138
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(TaskCheckbox, {
|
|
139
|
+
checked
|
|
60
140
|
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
61
141
|
flex: 1,
|
|
62
142
|
children
|
|
@@ -64,11 +144,13 @@ function MarkdownListItem(param) {
|
|
|
64
144
|
});
|
|
65
145
|
}
|
|
66
146
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
147
|
+
render: "li",
|
|
67
148
|
marginBottom: "$1",
|
|
68
149
|
alignItems: "flex-start",
|
|
69
150
|
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
70
151
|
width: 24,
|
|
71
152
|
color: "$color11",
|
|
153
|
+
"aria-hidden": true,
|
|
72
154
|
children: bullet
|
|
73
155
|
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
|
|
74
156
|
flex: 1,
|