@multiplatform.one/markdown 9.17.0 → 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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Button,
|
|
2
3
|
Code,
|
|
3
4
|
ErrorBoundary,
|
|
4
5
|
HighlightedCode,
|
|
@@ -12,7 +13,7 @@ import { LinearGradient } from "@tamagui/linear-gradient";
|
|
|
12
13
|
import rangeParser from "parse-numeric-range";
|
|
13
14
|
import type { ReactNode } from "react";
|
|
14
15
|
import { useContext, useMemo, useState } from "react";
|
|
15
|
-
import {
|
|
16
|
+
import { TooltipSimple, XStack, YStack } from "tamagui";
|
|
16
17
|
import { CheckCircleIcon, ClipboardIcon } from "../icons";
|
|
17
18
|
import { useCutoffGradientColors } from "../shared/cutoffGradient";
|
|
18
19
|
import { tokenPx } from "../shared/tokenPx";
|
|
@@ -94,7 +95,7 @@ export function MDXCodeBlock(props: MDXCodeBlockProps) {
|
|
|
94
95
|
}, [isHighlightingLines, line]);
|
|
95
96
|
|
|
96
97
|
return (
|
|
97
|
-
<YStack position="relative" marginBottom="
|
|
98
|
+
<YStack position="relative" marginBottom="4">
|
|
98
99
|
<ErrorBoundary>
|
|
99
100
|
<YStack
|
|
100
101
|
position="relative"
|
|
@@ -118,7 +119,7 @@ export function MDXCodeBlock(props: MDXCodeBlockProps) {
|
|
|
118
119
|
/>
|
|
119
120
|
<XStack
|
|
120
121
|
position="absolute"
|
|
121
|
-
bottom="
|
|
122
|
+
bottom="4"
|
|
122
123
|
left={0}
|
|
123
124
|
right={0}
|
|
124
125
|
justifyContent="center"
|
|
@@ -163,26 +164,24 @@ export function MDXCodeBlock(props: MDXCodeBlockProps) {
|
|
|
163
164
|
</ScrollView>
|
|
164
165
|
</Pre>
|
|
165
166
|
)}
|
|
166
|
-
<XStack position="absolute" top="
|
|
167
|
+
<XStack position="absolute" top="3" insetInlineEnd="3" {...knobProps.gap}>
|
|
167
168
|
{(!isCollapsed || !isCollapsible) && (copyable ?? !disableCopy) && (
|
|
168
169
|
<TooltipSimple label={hasCopied ? "Copied" : "Copy to clipboard"}>
|
|
169
170
|
<Button
|
|
170
171
|
aria-label="Copy code to clipboard"
|
|
171
|
-
size="
|
|
172
|
+
size="2"
|
|
173
|
+
display="max-xs:none"
|
|
172
174
|
icon={
|
|
173
175
|
hasCopied ? <CheckCircleIcon size={iconPx} /> : <ClipboardIcon size={iconPx} />
|
|
174
176
|
}
|
|
175
177
|
onPress={onCopy}
|
|
176
|
-
$max-xs={{
|
|
177
|
-
display: "none",
|
|
178
|
-
}}
|
|
179
178
|
/>
|
|
180
179
|
</TooltipSimple>
|
|
181
180
|
)}
|
|
182
181
|
{isCollapsible && (
|
|
183
182
|
<Button
|
|
184
183
|
aria-label="Show or hide code"
|
|
185
|
-
size="
|
|
184
|
+
size="2"
|
|
186
185
|
onPress={() => setIsCollapsed((x) => !x)}
|
|
187
186
|
>
|
|
188
187
|
{isCollapsed ? "Show code" : "Hide code"}
|
package/src/Notice/index.tsx
CHANGED
|
@@ -39,7 +39,7 @@ export function Notice({
|
|
|
39
39
|
});
|
|
40
40
|
const content = (raw ?? disableUnwrap) ? children : unwrapText(children);
|
|
41
41
|
return (
|
|
42
|
-
<Alert intent={themeIntentMap[theme]} title={title} marginVertical="
|
|
42
|
+
<Alert intent={themeIntentMap[theme]} title={title} marginVertical="4" {...props}>
|
|
43
43
|
{content}
|
|
44
44
|
</Alert>
|
|
45
45
|
);
|
package/src/Renderer.stories.tsx
CHANGED
|
@@ -78,7 +78,7 @@ export const Main: Story = {
|
|
|
78
78
|
codeTheme: { control: "select", options: ["auto", "github-dark", "github-light"] },
|
|
79
79
|
},
|
|
80
80
|
render: (args: any) => (
|
|
81
|
-
<YStack maxWidth={700} padding="
|
|
81
|
+
<YStack maxWidth={700} padding="4">
|
|
82
82
|
{renderMarkdown(parseMarkdown(kitchenSink), { codeTheme: args.codeTheme })}
|
|
83
83
|
</YStack>
|
|
84
84
|
),
|
|
@@ -87,7 +87,7 @@ export const Main: Story = {
|
|
|
87
87
|
/** GitLab parity: a mermaid fence renders as a diagram, not as code. */
|
|
88
88
|
export const MermaidFence: Story = {
|
|
89
89
|
render: () => (
|
|
90
|
-
<YStack maxWidth={700} padding="
|
|
90
|
+
<YStack maxWidth={700} padding="4">
|
|
91
91
|
{renderMarkdown(parseMarkdown(mermaidFence))}
|
|
92
92
|
</YStack>
|
|
93
93
|
),
|
|
@@ -95,13 +95,13 @@ export const MermaidFence: Story = {
|
|
|
95
95
|
|
|
96
96
|
const overrides: Partial<MarkdownComponents> = {
|
|
97
97
|
h1: ({ children }) => (
|
|
98
|
-
<Paragraph size="$8" color="$
|
|
98
|
+
<Paragraph size="$8" color="$blue-10">
|
|
99
99
|
{children}
|
|
100
100
|
</Paragraph>
|
|
101
101
|
),
|
|
102
|
-
p: ({ children }) => <Paragraph color="$
|
|
102
|
+
p: ({ children }) => <Paragraph color="$green-10">{children}</Paragraph>,
|
|
103
103
|
blockquote: ({ children }) => (
|
|
104
|
-
<YStack borderLeftWidth={4} borderColor="
|
|
104
|
+
<YStack borderLeftWidth={4} borderColor="blue-8" paddingLeft="3">
|
|
105
105
|
{children}
|
|
106
106
|
</YStack>
|
|
107
107
|
),
|
|
@@ -113,7 +113,7 @@ const overrides: Partial<MarkdownComponents> = {
|
|
|
113
113
|
*/
|
|
114
114
|
export const CustomComponents: Story = {
|
|
115
115
|
render: () => (
|
|
116
|
-
<YStack maxWidth={700} padding="
|
|
116
|
+
<YStack maxWidth={700} padding="4">
|
|
117
117
|
{renderMarkdown(
|
|
118
118
|
parseMarkdown("# Overridden heading\n\nAn overridden paragraph.\n\n> An overridden quote."),
|
|
119
119
|
{ components: overrides },
|
|
@@ -129,7 +129,7 @@ export const CustomComponents: Story = {
|
|
|
129
129
|
*/
|
|
130
130
|
export const UnknownNodes: Story = {
|
|
131
131
|
render: () => (
|
|
132
|
-
<YStack maxWidth={700} padding="
|
|
132
|
+
<YStack maxWidth={700} padding="4" gap="3">
|
|
133
133
|
<Paragraph>Unknown container keeps its children:</Paragraph>
|
|
134
134
|
{renderMarkdown({
|
|
135
135
|
type: "root",
|
package/src/Table/index.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { Table as BaseTable } from "@multiplatform.one/table-primitives";
|
|
|
5
5
|
import { useMarkdownTableKnobs } from "../shared/useMarkdownTableKnobs";
|
|
6
6
|
|
|
7
7
|
const MDXTableFrame = styled(YStack, {
|
|
8
|
-
marginVertical: "
|
|
8
|
+
marginVertical: "4",
|
|
9
9
|
overflow: "hidden",
|
|
10
10
|
});
|
|
11
11
|
|
package/src/Tabs/index.tsx
CHANGED
|
@@ -25,7 +25,7 @@ export function MDXTabs({ items, children, defaultValue }: MDXTabsProps) {
|
|
|
25
25
|
const defaultIndex = defaultValue ? Math.max(items.indexOf(defaultValue), 0) : 0;
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<YStack marginVertical="
|
|
28
|
+
<YStack marginVertical="4">
|
|
29
29
|
<Tabs
|
|
30
30
|
items={items.map((label, index) => ({
|
|
31
31
|
value: values[index]!,
|
package/src/Ul/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { YStack, styled } from "tamagui";
|
|
2
2
|
|
|
3
3
|
export const UL = styled(YStack, {
|
|
4
|
-
|
|
4
|
+
displayName: "UL",
|
|
5
5
|
render: "ul",
|
|
6
|
-
marginVertical: "
|
|
7
|
-
marginInlineStart: "
|
|
8
|
-
marginInlineEnd: "
|
|
6
|
+
marginVertical: "1",
|
|
7
|
+
marginInlineStart: "4",
|
|
8
|
+
marginInlineEnd: "2",
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
export type ULProps = React.ComponentProps<typeof UL>;
|
package/src/Video/index.tsx
CHANGED
|
@@ -31,9 +31,9 @@ export function Video({
|
|
|
31
31
|
<YStack
|
|
32
32
|
render="figure"
|
|
33
33
|
marginHorizontal={0}
|
|
34
|
-
marginVertical="
|
|
35
|
-
gap="
|
|
36
|
-
paddingTop={children && !hasMedia ? "
|
|
34
|
+
marginVertical="6"
|
|
35
|
+
gap="2"
|
|
36
|
+
paddingTop={`${children && !hasMedia ? "2" : undefined}`}
|
|
37
37
|
{...props}
|
|
38
38
|
>
|
|
39
39
|
{isWeb ? (
|
|
@@ -57,12 +57,12 @@ export function Video({
|
|
|
57
57
|
<YStack
|
|
58
58
|
{...knobProps.panelPadding}
|
|
59
59
|
{...knobProps.borderRadius}
|
|
60
|
-
backgroundColor="
|
|
60
|
+
backgroundColor="color-3"
|
|
61
61
|
alignItems="center"
|
|
62
62
|
justifyContent="center"
|
|
63
63
|
minHeight={fallbackMin}
|
|
64
64
|
>
|
|
65
|
-
<Paragraph color="
|
|
65
|
+
<Paragraph color="color-9" size={knobProps.sizeToken as any} {...knobProps.body}>
|
|
66
66
|
Video playback requires a native video player
|
|
67
67
|
</Paragraph>
|
|
68
68
|
</YStack>
|
package/src/codeInk.spec.tsx
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* code surface.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { atomicStyle, cssVariableName } from "@multiplatform.one/test-utils";
|
|
8
9
|
import { createDefaultThemeConfig } from "@multiplatform.one/theme";
|
|
9
10
|
import { cleanup, render, waitFor } from "@testing-library/react";
|
|
10
11
|
import type { ReactElement } from "react";
|
|
@@ -18,8 +19,9 @@ import * as rendererStories from "./Renderer.stories";
|
|
|
18
19
|
afterEach(cleanup);
|
|
19
20
|
|
|
20
21
|
const houseConfig = createDefaultThemeConfig();
|
|
21
|
-
// Tamagui
|
|
22
|
-
|
|
22
|
+
// Tamagui hashes the whole style value into the class, so the token name lives
|
|
23
|
+
// only in the rule's `var()`, and MPO spells its theme keys kebab.
|
|
24
|
+
const inkToken = (el: Element) => cssVariableName(atomicStyle(el).color);
|
|
23
25
|
const fence = "```typescript\nconst greeting = 1;\n```";
|
|
24
26
|
|
|
25
27
|
function houseRender(ui: ReactElement, scheme: "light" | "dark" = "light") {
|
|
@@ -37,24 +39,28 @@ function tokenSpan(container: HTMLElement, text: string) {
|
|
|
37
39
|
return matches.find((span) => !matches.some((other) => other !== span && span.contains(other)));
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
async function
|
|
41
|
-
await waitFor(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
async function keywordInk(container: HTMLElement) {
|
|
43
|
+
await waitFor(
|
|
44
|
+
() => {
|
|
45
|
+
const span = tokenSpan(container, "const");
|
|
46
|
+
expect(span && atomicStyle(span).color).toBeTruthy();
|
|
47
|
+
},
|
|
48
|
+
{ timeout: 30000 },
|
|
49
|
+
);
|
|
50
|
+
return inkToken(tokenSpan(container, "const")!);
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
describe("MPO-474: markdown code ink follows the theme", () => {
|
|
48
54
|
for (const scheme of ["light", "dark"] as const) {
|
|
49
|
-
it(`${scheme}: <Markdown> paints $
|
|
55
|
+
it(`${scheme}: <Markdown> paints $syntax-purple, not a GitHub hex`, async () => {
|
|
50
56
|
const { container } = houseRender(<Markdown>{fence}</Markdown>, scheme);
|
|
51
|
-
expect(await
|
|
57
|
+
expect(await keywordInk(container)).toBe("syntax-purple");
|
|
52
58
|
}, 35000);
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
it("renderMarkdown's default code theme is the house theme, not github-dark", async () => {
|
|
56
62
|
const { container } = houseRender(<>{renderMarkdown(parseMarkdown(fence))}</>);
|
|
57
|
-
expect(await
|
|
63
|
+
expect(await keywordInk(container)).toBe("syntax-purple");
|
|
58
64
|
}, 35000);
|
|
59
65
|
|
|
60
66
|
it("the Renderer story shows the house theme by default", () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { View,
|
|
2
|
-
import { useResolvedKnobs } from "@multiplatform.one/theme";
|
|
1
|
+
import { View, isWeb, useTheme } from "tamagui";
|
|
2
|
+
import { tokenNumber, useResolvedKnobs } from "@multiplatform.one/theme";
|
|
3
3
|
import { markdownBlockquoteColors } from "../shared/colorRamps";
|
|
4
4
|
import type { BlockquoteProps } from "../types";
|
|
5
5
|
|
|
@@ -8,9 +8,7 @@ export function Blockquote({ children }: BlockquoteProps) {
|
|
|
8
8
|
const theme = useTheme();
|
|
9
9
|
const padToken = knobProps.panelPadding.padding as number | string;
|
|
10
10
|
const pad =
|
|
11
|
-
typeof padToken === "number"
|
|
12
|
-
? padToken
|
|
13
|
-
: ((getTokens().space as any)?.[padToken]?.val ?? padToken);
|
|
11
|
+
typeof padToken === "number" ? padToken : (tokenNumber("space", padToken) ?? padToken);
|
|
14
12
|
const railWidth = knobProps.borderRadius.borderWidth;
|
|
15
13
|
return (
|
|
16
14
|
<View
|
|
@@ -20,7 +18,7 @@ export function Blockquote({ children }: BlockquoteProps) {
|
|
|
20
18
|
// containerRadius fragment). Rail thickness rides borderWidth (0 hides).
|
|
21
19
|
{...knobProps.containerRadius}
|
|
22
20
|
paddingVertical={knobProps.gap.gap}
|
|
23
|
-
marginVertical="
|
|
21
|
+
marginVertical="3"
|
|
24
22
|
// CSS logical properties keep the border and padding on the logical
|
|
25
23
|
// start side in RTL (SB-M-1215); tamagui borderStartWidth does not
|
|
26
24
|
// compile to working CSS in this version. Native uses the RN logical
|
|
@@ -30,7 +28,7 @@ export function Blockquote({ children }: BlockquoteProps) {
|
|
|
30
28
|
style: {
|
|
31
29
|
borderInlineStartWidth: railWidth,
|
|
32
30
|
borderInlineStartStyle: railWidth ? "solid" : "none",
|
|
33
|
-
borderInlineStartColor: theme
|
|
31
|
+
borderInlineStartColor: theme["color-8"]?.val ?? theme["border-color"]?.val,
|
|
34
32
|
paddingInlineStart: pad,
|
|
35
33
|
} as any,
|
|
36
34
|
}
|
|
@@ -34,7 +34,7 @@ export function CodeBlock({ children, lang, theme: themeProp = "auto" }: CodeBlo
|
|
|
34
34
|
// Full fragment spread (AGENTS.md knob rule) so the cornerSmoothing
|
|
35
35
|
// class rides along with the outer radius; the fallback keeps the old
|
|
36
36
|
// default when a Preset override drops the fragment.
|
|
37
|
-
{...(knobProps.borderRadiusNested ?? { borderRadius: "
|
|
37
|
+
{...(knobProps.borderRadiusNested ?? { borderRadius: "4" })}
|
|
38
38
|
backgroundColor={markdownCodeColors.background.base}
|
|
39
39
|
borderWidth={knobProps.borderRadius.borderWidth}
|
|
40
40
|
borderColor={edgeColorAt(markdownCodeColors.border.base, knobProps.borderWidthStop)}
|
|
@@ -42,7 +42,7 @@ export function CodeBlock({ children, lang, theme: themeProp = "auto" }: CodeBlo
|
|
|
42
42
|
// the complete panelPadding role fragment —
|
|
43
43
|
// components-CodeBlock parity.
|
|
44
44
|
{...knobProps.panelPadding}
|
|
45
|
-
marginVertical="
|
|
45
|
+
marginVertical="2"
|
|
46
46
|
overflow="hidden"
|
|
47
47
|
>
|
|
48
48
|
<ScrollView horizontal showsHorizontalScrollIndicator={false}>
|
|
@@ -15,7 +15,7 @@ const headingComponents = {
|
|
|
15
15
|
const headingBaseSize = { 1: 9, 2: 8, 3: 7, 4: 6, 5: 5, 6: 4 } as const;
|
|
16
16
|
|
|
17
17
|
/** Size knob shifts the whole heading scale one step, preserving hierarchy. */
|
|
18
|
-
const sizeShift: Record<string, number> = {
|
|
18
|
+
const sizeShift: Record<string, number> = { "3": -1, "4": 0, "5": 1 };
|
|
19
19
|
|
|
20
20
|
export function Heading({ level, children }: HeadingProps) {
|
|
21
21
|
const Component = headingComponents[level];
|
|
@@ -24,11 +24,11 @@ export function Heading({ level, children }: HeadingProps) {
|
|
|
24
24
|
// fontFamily override is native-only (same pattern as PageHeader).
|
|
25
25
|
const { knobProps } = useResolvedKnobs();
|
|
26
26
|
const headingFamily = isWeb ? null : { fontFamily: knobProps.heading.fontFamily };
|
|
27
|
-
const size =
|
|
27
|
+
const size = String(headingBaseSize[level] + (sizeShift[knobProps.sizeToken] ?? 0));
|
|
28
28
|
return (
|
|
29
29
|
<Component
|
|
30
|
-
marginTop="
|
|
31
|
-
marginBottom="
|
|
30
|
+
marginTop="3"
|
|
31
|
+
marginBottom="2"
|
|
32
32
|
size={size as any}
|
|
33
33
|
{...knobProps.heading}
|
|
34
34
|
{...headingFamily}
|
|
@@ -13,11 +13,11 @@ export function HorizontalRule(_props: HorizontalRuleProps) {
|
|
|
13
13
|
<View
|
|
14
14
|
role="separator"
|
|
15
15
|
height={1}
|
|
16
|
-
backgroundColor="
|
|
16
|
+
backgroundColor="border-color"
|
|
17
17
|
alignSelf="stretch"
|
|
18
18
|
flexGrow={0}
|
|
19
19
|
flexShrink={0}
|
|
20
|
-
marginVertical="
|
|
20
|
+
marginVertical="4"
|
|
21
21
|
/>
|
|
22
22
|
);
|
|
23
23
|
}
|
package/src/components/Image.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import type { ImageProps } from "../types";
|
|
|
5
5
|
export function MarkdownImage({ src, alt, title }: ImageProps) {
|
|
6
6
|
const { knobProps } = useResolvedKnobs();
|
|
7
7
|
return (
|
|
8
|
-
<View marginVertical="
|
|
8
|
+
<View marginVertical="2">
|
|
9
9
|
<TamaguiImage
|
|
10
10
|
// src (string), not source: the RN source object never reaches the
|
|
11
11
|
// DOM <img> src on web, so the image silently renders empty; tamagui
|
|
@@ -17,10 +17,10 @@ export function InlineCode({ children }: InlineCodeProps) {
|
|
|
17
17
|
return (
|
|
18
18
|
<CodeInline
|
|
19
19
|
fontSize={knobProps.sizeToken}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
paddingVertical="$0.5"
|
|
20
|
+
paddingHorizontal="1-5"
|
|
21
|
+
paddingVertical="0-5"
|
|
23
22
|
{...knobProps.body}
|
|
23
|
+
lineHeight={knobProps.sizeToken}
|
|
24
24
|
{...knobProps.borderRadius}
|
|
25
25
|
>
|
|
26
26
|
{children}
|
package/src/components/Link.tsx
CHANGED
|
@@ -34,19 +34,16 @@ export function Link({ href, title, children }: LinkProps) {
|
|
|
34
34
|
rel={isExternal ? "noopener noreferrer" : undefined}
|
|
35
35
|
title={title || undefined}
|
|
36
36
|
{...knobProps.body}
|
|
37
|
-
color={markdownLinkColors.text.base}
|
|
37
|
+
color={{ default: markdownLinkColors.text.base, hover: markdownLinkColors.text.hover }}
|
|
38
38
|
textDecorationLine="underline"
|
|
39
39
|
cursor="pointer"
|
|
40
40
|
onPress={handlePress}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
// line box, into the ascenders/descenders of the surrounding prose.
|
|
48
|
-
outlineOffset: FOCUS_RING_HALO_OFFSET,
|
|
49
|
-
}}
|
|
41
|
+
outlineColor={{ "focus-visible": "outline-color" }}
|
|
42
|
+
outlineWidth={{ "focus-visible": 2 }}
|
|
43
|
+
outlineStyle={{ "focus-visible": "solid" }}
|
|
44
|
+
// LC-71 §4 halo: inline text link. Offset 0 puts the band across the
|
|
45
|
+
// line box, into the ascenders/descenders of the surrounding prose.
|
|
46
|
+
outlineOffset={{ "focus-visible": FOCUS_RING_HALO_OFFSET }}
|
|
50
47
|
>
|
|
51
48
|
{children}
|
|
52
49
|
</Text>
|
package/src/components/List.tsx
CHANGED
|
@@ -24,8 +24,8 @@ export function MarkdownList({ ordered, start, children }: ListProps) {
|
|
|
24
24
|
<View
|
|
25
25
|
render={ordered ? "ol" : "ul"}
|
|
26
26
|
start={ordered ? (start ?? undefined) : undefined}
|
|
27
|
+
marginVertical="2"
|
|
27
28
|
style={listReset}
|
|
28
|
-
marginVertical="$2"
|
|
29
29
|
>
|
|
30
30
|
{items}
|
|
31
31
|
</View>
|
|
@@ -40,30 +40,30 @@ interface ListItemInternalProps extends ListItemProps {
|
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Typography of the prose the task marker sits beside: markdown Paragraph
|
|
43
|
-
* renders the
|
|
43
|
+
* renders the body font at size 4 with lineHeight 6 (./Paragraph.tsx).
|
|
44
44
|
* The box derives from those same tokens so it scales with the body type
|
|
45
45
|
* instead of a hardcoded glyph column (theme-propagation-spec: MarkdownListItem
|
|
46
46
|
* marker "scales with type/size").
|
|
47
47
|
*/
|
|
48
48
|
function getTaskBoxMetrics() {
|
|
49
|
-
const bodyFont = getConfig()?.fontsParsed
|
|
50
|
-
const fontSize = Math.round(getVariableValue(bodyFont?.size
|
|
51
|
-
const lineHeight = Math.round(getVariableValue(bodyFont?.lineHeight
|
|
49
|
+
const bodyFont = getConfig()?.fontsParsed?.body;
|
|
50
|
+
const fontSize = Math.round(getVariableValue(bodyFont?.size?.["4"]) || 14);
|
|
51
|
+
const lineHeight = Math.round(getVariableValue(bodyFont?.lineHeight?.["6"]) || fontSize * 2);
|
|
52
52
|
return { fontSize, boxSize: Math.round(fontSize * 1.15), lineHeight };
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/** Box↔label gap at a size token's stop — mirrors the forms Checkbox inline gap. */
|
|
56
56
|
const taskInlineGapMap: Record<string, string> = {
|
|
57
|
-
small: "
|
|
58
|
-
medium: "
|
|
59
|
-
large: "
|
|
57
|
+
small: "1-5",
|
|
58
|
+
medium: "2",
|
|
59
|
+
large: "2-5",
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
/** Cap the radius knob for a small square control (R-CLAMP: never a circle). */
|
|
63
63
|
function clampTaskBoxRadius(radiusToken: string, pointy: boolean): string | number {
|
|
64
|
-
if (pointy || radiusToken === "
|
|
64
|
+
if (pointy || radiusToken === "0") return 0;
|
|
65
65
|
const num = Number.parseInt(radiusToken.replace("$", ""), 10);
|
|
66
|
-
return Number.isFinite(num) && num > 2 ? "
|
|
66
|
+
return Number.isFinite(num) && num > 2 ? "2" : radiusToken;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|
|
@@ -84,8 +84,8 @@ function TaskCheckbox({ checked }: { checked: boolean }) {
|
|
|
84
84
|
width={boxSize}
|
|
85
85
|
height={boxSize}
|
|
86
86
|
borderWidth={knobProps.borderRadius.borderWidth}
|
|
87
|
-
borderColor="
|
|
88
|
-
backgroundColor={knobProps.outlined ? "transparent" : "
|
|
87
|
+
borderColor="color-7"
|
|
88
|
+
backgroundColor={`${knobProps.outlined ? "transparent" : "color-5"}`}
|
|
89
89
|
borderRadius={clampTaskBoxRadius(
|
|
90
90
|
knobProps.borderRadius.borderRadius as string,
|
|
91
91
|
knobProps.pointy,
|
|
@@ -120,9 +120,9 @@ export function MarkdownListItem({
|
|
|
120
120
|
return (
|
|
121
121
|
<XStack
|
|
122
122
|
render="li"
|
|
123
|
-
marginBottom="
|
|
123
|
+
marginBottom="1"
|
|
124
124
|
alignItems="flex-start"
|
|
125
|
-
gap={taskInlineGapMap[sizeTokenStop(knobProps.sizeToken)] ?? "
|
|
125
|
+
gap={taskInlineGapMap[sizeTokenStop(knobProps.sizeToken)] ?? "2"}
|
|
126
126
|
>
|
|
127
127
|
<TaskCheckbox checked={checked} />
|
|
128
128
|
<View flex={1}>{children}</View>
|
|
@@ -135,11 +135,11 @@ export function MarkdownListItem({
|
|
|
135
135
|
return (
|
|
136
136
|
<XStack
|
|
137
137
|
render="li"
|
|
138
|
-
marginBottom="
|
|
138
|
+
marginBottom="1"
|
|
139
139
|
alignItems="flex-start"
|
|
140
|
-
gap={taskInlineGapMap[sizeTokenStop(knobProps.sizeToken)] ?? "
|
|
140
|
+
gap={taskInlineGapMap[sizeTokenStop(knobProps.sizeToken)] ?? "2"}
|
|
141
141
|
>
|
|
142
|
-
<Text width={markerWidth} color="
|
|
142
|
+
<Text width={markerWidth} color="color-11" {...knobProps.body} aria-hidden>
|
|
143
143
|
{bullet}
|
|
144
144
|
</Text>
|
|
145
145
|
<View flex={1}>{children}</View>
|
|
@@ -8,7 +8,7 @@ export function Paragraph({ children }: ParagraphProps) {
|
|
|
8
8
|
// the paired lineHeight, replacing the old fixed $6.
|
|
9
9
|
const { knobProps } = useResolvedKnobs();
|
|
10
10
|
return (
|
|
11
|
-
<TamaguiParagraph marginBottom="
|
|
11
|
+
<TamaguiParagraph marginBottom="2" size={knobProps.sizeToken as any} {...knobProps.body}>
|
|
12
12
|
{children}
|
|
13
13
|
</TamaguiParagraph>
|
|
14
14
|
);
|
package/src/components/Table.tsx
CHANGED
|
@@ -25,7 +25,7 @@ export function MarkdownTable({ children }: TableProps) {
|
|
|
25
25
|
const bodyRows = rows.filter((row) => !isHeaderRow(row));
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
<ScrollView horizontal showsHorizontalScrollIndicator={false} marginVertical="
|
|
28
|
+
<ScrollView horizontal showsHorizontalScrollIndicator={false} marginVertical="3">
|
|
29
29
|
<YStack minWidth="100%">
|
|
30
30
|
<Table
|
|
31
31
|
render="table"
|
|
@@ -26,10 +26,12 @@ describe("markdown CodeBlock (canonical code family)", () => {
|
|
|
26
26
|
);
|
|
27
27
|
await waitFor(
|
|
28
28
|
() => {
|
|
29
|
-
const
|
|
30
|
-
(el) =>
|
|
29
|
+
const inks = new Set(
|
|
30
|
+
Array.from(container.querySelectorAll("span")).flatMap((el) =>
|
|
31
|
+
el.className.split(" ").filter((name) => name.startsWith("_c-")),
|
|
32
|
+
),
|
|
31
33
|
);
|
|
32
|
-
expect(
|
|
34
|
+
expect(inks.size).toBeGreaterThan(1);
|
|
33
35
|
},
|
|
34
36
|
{ timeout: 30000 },
|
|
35
37
|
);
|
package/src/docBlocks.spec.tsx
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { fireEvent, screen } from "@testing-library/react";
|
|
8
|
-
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
8
|
+
import { renderWithProviders, withMeasuredLayout } from "@multiplatform.one/test-utils";
|
|
9
9
|
import { Text } from "tamagui";
|
|
10
10
|
import { describe, expect, it } from "vitest";
|
|
11
11
|
import { MDXAside, MDXNote } from "./Aside";
|
|
@@ -18,11 +18,13 @@ describe("MDXAside", () => {
|
|
|
18
18
|
expect(screen.queryByText("Show more")).toBeNull();
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
it("cuts off
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
21
|
+
it("cuts off element content taller than the max and expands on Show more", () => {
|
|
22
|
+
withMeasuredLayout({ width: 390, height: 1000 }, () =>
|
|
23
|
+
renderWithProviders(
|
|
24
|
+
<MDXAside>
|
|
25
|
+
<Text>long embedded content</Text>
|
|
26
|
+
</MDXAside>,
|
|
27
|
+
),
|
|
26
28
|
);
|
|
27
29
|
// Content is still rendered inside the clipped container...
|
|
28
30
|
expect(screen.getByText("long embedded content")).toBeTruthy();
|
|
@@ -33,6 +35,18 @@ describe("MDXAside", () => {
|
|
|
33
35
|
expect(screen.queryByText("Show more")).toBeNull();
|
|
34
36
|
expect(screen.getByText("long embedded content")).toBeTruthy();
|
|
35
37
|
});
|
|
38
|
+
|
|
39
|
+
it("leaves element content that fits uncut", () => {
|
|
40
|
+
withMeasuredLayout({ width: 390, height: 24 }, () =>
|
|
41
|
+
renderWithProviders(
|
|
42
|
+
<MDXAside>
|
|
43
|
+
<Text>short embedded content</Text>
|
|
44
|
+
</MDXAside>,
|
|
45
|
+
),
|
|
46
|
+
);
|
|
47
|
+
expect(screen.getByText("short embedded content")).toBeTruthy();
|
|
48
|
+
expect(screen.queryByText("Show more")).toBeNull();
|
|
49
|
+
});
|
|
36
50
|
});
|
|
37
51
|
|
|
38
52
|
describe("MDXNote", () => {
|