@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
|
@@ -38,20 +38,20 @@ const icons = [
|
|
|
38
38
|
] as const;
|
|
39
39
|
|
|
40
40
|
export const Main: Story = {
|
|
41
|
-
args: { size: 24, color: "$
|
|
41
|
+
args: { size: 24, color: "$color-12" },
|
|
42
42
|
argTypes: {
|
|
43
43
|
size: { control: { type: "range", min: 8, max: 64, step: 2 } },
|
|
44
44
|
color: {
|
|
45
45
|
control: "select",
|
|
46
|
-
options: ["$
|
|
46
|
+
options: ["$color-12", "$color-10", "$blue-10", "$green-10", "$red-10", "#ff8800"],
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
render: (args: any) => (
|
|
50
|
-
<XStack gap="
|
|
50
|
+
<XStack gap="6" padding="4" alignItems="flex-start">
|
|
51
51
|
{icons.map(({ name, Icon }) => (
|
|
52
|
-
<YStack key={name} gap="
|
|
52
|
+
<YStack key={name} gap="2" alignItems="center">
|
|
53
53
|
<Icon size={args.size} color={args.color} />
|
|
54
|
-
<Paragraph size="$1" color="$
|
|
54
|
+
<Paragraph size="$1" color="$color-10">
|
|
55
55
|
{name}
|
|
56
56
|
</Paragraph>
|
|
57
57
|
</YStack>
|
|
@@ -63,9 +63,9 @@ export const Main: Story = {
|
|
|
63
63
|
/** The size ladder each icon is actually used at, plus the extremes. */
|
|
64
64
|
export const SizeLadder: Story = {
|
|
65
65
|
render: () => (
|
|
66
|
-
<YStack gap="
|
|
66
|
+
<YStack gap="4" padding="4">
|
|
67
67
|
{icons.map(({ name, Icon }) => (
|
|
68
|
-
<XStack key={name} gap="
|
|
68
|
+
<XStack key={name} gap="4" alignItems="center">
|
|
69
69
|
<Paragraph size="$2" width={140}>
|
|
70
70
|
{name}
|
|
71
71
|
</Paragraph>
|
|
@@ -85,10 +85,10 @@ export const SizeLadder: Story = {
|
|
|
85
85
|
*/
|
|
86
86
|
export const ThemeTokens: Story = {
|
|
87
87
|
render: () => (
|
|
88
|
-
<YStack gap="
|
|
89
|
-
{["$
|
|
90
|
-
<XStack key={token} gap="
|
|
91
|
-
<Paragraph size="$2" width={100} color="$
|
|
88
|
+
<YStack gap="4" padding="4">
|
|
89
|
+
{["$color-12", "$color-10", "$blue-10", "$green-10", "$red-10"].map((token) => (
|
|
90
|
+
<XStack key={token} gap="4" alignItems="center">
|
|
91
|
+
<Paragraph size="$2" width={100} color="$color-10">
|
|
92
92
|
{token}
|
|
93
93
|
</Paragraph>
|
|
94
94
|
{icons.map(({ name, Icon }) => (
|
|
@@ -106,24 +106,24 @@ export const ThemeTokens: Story = {
|
|
|
106
106
|
*/
|
|
107
107
|
export const InSitu: Story = {
|
|
108
108
|
render: () => (
|
|
109
|
-
<YStack gap="
|
|
110
|
-
<XStack gap="
|
|
111
|
-
<ClipboardIcon size={16} color="$
|
|
109
|
+
<YStack gap="4" padding="4" maxWidth={520}>
|
|
110
|
+
<XStack gap="3" alignItems="center">
|
|
111
|
+
<ClipboardIcon size={16} color="$color-11" />
|
|
112
112
|
<Paragraph size="$3">Copy — idle</Paragraph>
|
|
113
113
|
</XStack>
|
|
114
|
-
<XStack gap="
|
|
115
|
-
<CheckIcon size={16} color="$
|
|
114
|
+
<XStack gap="3" alignItems="center">
|
|
115
|
+
<CheckIcon size={16} color="$green-10" />
|
|
116
116
|
<Paragraph size="$3">Copy — copied</Paragraph>
|
|
117
117
|
</XStack>
|
|
118
|
-
<XStack gap="
|
|
119
|
-
<CheckCircleIcon size={16} color="$
|
|
118
|
+
<XStack gap="3" alignItems="center">
|
|
119
|
+
<CheckCircleIcon size={16} color="$green-10" />
|
|
120
120
|
<Paragraph size="$3">A completed item</Paragraph>
|
|
121
121
|
</XStack>
|
|
122
|
-
<XStack gap="
|
|
122
|
+
<XStack gap="2" alignItems="center">
|
|
123
123
|
<Paragraph size="$6" fontWeight="700">
|
|
124
124
|
A heading
|
|
125
125
|
</Paragraph>
|
|
126
|
-
<LinkIcon size={12} color="$
|
|
126
|
+
<LinkIcon size={12} color="$color-10" />
|
|
127
127
|
</XStack>
|
|
128
128
|
</YStack>
|
|
129
129
|
),
|
|
@@ -132,11 +132,11 @@ export const InSitu: Story = {
|
|
|
132
132
|
/** A custom strokeWidth is CheckIcon's only extra knob. */
|
|
133
133
|
export const CheckStrokeWidth: Story = {
|
|
134
134
|
render: () => (
|
|
135
|
-
<XStack gap="
|
|
135
|
+
<XStack gap="5" padding="4" alignItems="center">
|
|
136
136
|
{[1, 1.5, 2.5, 4].map((strokeWidth) => (
|
|
137
|
-
<YStack key={strokeWidth} gap="
|
|
137
|
+
<YStack key={strokeWidth} gap="2" alignItems="center">
|
|
138
138
|
<CheckIcon size={32} strokeWidth={strokeWidth} />
|
|
139
|
-
<Paragraph size="$1" color="$
|
|
139
|
+
<Paragraph size="$1" color="$color-10">
|
|
140
140
|
{String(strokeWidth)}
|
|
141
141
|
</Paragraph>
|
|
142
142
|
</YStack>
|
package/src/icons/icons.spec.tsx
CHANGED
|
@@ -42,7 +42,7 @@ describe("markdown icons", () => {
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
it(`${name} resolves a $token colour before it reaches the stroke (SB-M-1206)`, () => {
|
|
45
|
-
const { container } = renderWithProviders(<Icon color="$
|
|
45
|
+
const { container } = renderWithProviders(<Icon color="$color-10" />);
|
|
46
46
|
const painted = strokes(container);
|
|
47
47
|
expect(painted.length, name).toBeGreaterThan(0);
|
|
48
48
|
for (const stroke of painted) {
|
package/src/icons/index.tsx
CHANGED
|
@@ -7,15 +7,18 @@ interface IconProps {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Resolve theme tokens like "
|
|
10
|
+
* Resolve theme tokens like "color-10" to concrete values — raw SVG stroke
|
|
11
11
|
* attributes cannot consume unresolved token strings (SB-M-1206).
|
|
12
12
|
*/
|
|
13
13
|
function useIconColor(color?: string): string {
|
|
14
14
|
const theme = useTheme();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const sigil = color?.startsWith("$") === true;
|
|
16
|
+
const key = sigil ? color!.slice(1) : color;
|
|
17
|
+
const fromTheme = key
|
|
18
|
+
? (theme as Record<string, { val?: string } | undefined>)[key]?.val
|
|
19
|
+
: undefined;
|
|
20
|
+
if (fromTheme) return fromTheme;
|
|
21
|
+
return sigil || !color ? (theme.color?.val ?? "currentColor") : color;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
export function ClipboardIcon({ size = 16, color }: IconProps) {
|
package/src/mdx.spec.tsx
CHANGED
|
@@ -227,7 +227,7 @@ describe("MDX Components", () => {
|
|
|
227
227
|
expect(divElem.textContent).toBe("Div Content");
|
|
228
228
|
});
|
|
229
229
|
|
|
230
|
-
it.skip("renders the span mapping with 'token punctuation' class setting color to '$
|
|
230
|
+
it.skip("renders the span mapping with 'token punctuation' class setting color to '$red-10'", () => {
|
|
231
231
|
renderWithProviders(
|
|
232
232
|
<>
|
|
233
233
|
{(mdxComponents as Record<string, any>).span({
|
|
@@ -240,7 +240,7 @@ describe("MDX Components", () => {
|
|
|
240
240
|
const spanElem = screen.getByTestId("mdx-span");
|
|
241
241
|
expect(spanElem).toBeTruthy();
|
|
242
242
|
expect(spanElem.textContent).toBe("Span Content");
|
|
243
|
-
expect(spanElem.getAttribute("color")).toBe("$
|
|
243
|
+
expect(spanElem.getAttribute("color")).toBe("$red-10");
|
|
244
244
|
});
|
|
245
245
|
|
|
246
246
|
it.skip("renders the span mapping with an unrelated class without setting color", () => {
|
package/src/mdxComponents.tsx
CHANGED
|
@@ -34,7 +34,7 @@ const code = ({
|
|
|
34
34
|
}: any) => {
|
|
35
35
|
if (!className) return <CodeInline>{unwrapText(children)}</CodeInline>;
|
|
36
36
|
return (
|
|
37
|
-
<YStack marginTop="
|
|
37
|
+
<YStack marginTop="3">
|
|
38
38
|
<MDXCodeBlock
|
|
39
39
|
className={className}
|
|
40
40
|
isHighlightingLines={line !== undefined}
|
|
@@ -49,9 +49,10 @@ const code = ({
|
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
export const TableHighlight = styled(YStack, {
|
|
52
|
-
|
|
53
|
-
backgroundColor: "
|
|
54
|
-
|
|
52
|
+
displayName: "TableHighlight",
|
|
53
|
+
backgroundColor: "yellow-1",
|
|
54
|
+
position: "absolute",
|
|
55
|
+
inset: 0,
|
|
55
56
|
});
|
|
56
57
|
|
|
57
58
|
export type TableHighlightProps = React.ComponentProps<typeof TableHighlight>;
|
|
@@ -62,7 +63,7 @@ function MdxBlockquote({ children, ...props }: any) {
|
|
|
62
63
|
const inset = knobProps.panelPadding.padding;
|
|
63
64
|
return (
|
|
64
65
|
<YStack
|
|
65
|
-
marginVertical="
|
|
66
|
+
marginVertical="4"
|
|
66
67
|
paddingHorizontal={inset}
|
|
67
68
|
// Logical start rail so the quote mirrors in RTL; tamagui
|
|
68
69
|
// borderStartWidth does not compile to working CSS on web (SB-M-1215)
|
|
@@ -75,7 +76,7 @@ function MdxBlockquote({ children, ...props }: any) {
|
|
|
75
76
|
} as any,
|
|
76
77
|
}
|
|
77
78
|
: { style: { marginInlineStart: inset }, borderStartWidth: railWidth })}
|
|
78
|
-
borderColor="
|
|
79
|
+
borderColor="border-color"
|
|
79
80
|
justifyContent="center"
|
|
80
81
|
{...props}
|
|
81
82
|
>
|
|
@@ -83,7 +84,7 @@ function MdxBlockquote({ children, ...props }: any) {
|
|
|
83
84
|
whiteSpace="revert"
|
|
84
85
|
size={knobProps.sizeToken as any}
|
|
85
86
|
{...knobProps.body}
|
|
86
|
-
color="
|
|
87
|
+
color="color"
|
|
87
88
|
opacity={0.65}
|
|
88
89
|
>
|
|
89
90
|
{unwrapText(children)}
|
|
@@ -151,14 +152,12 @@ function MdxAnchor({ href = "", children, ...props }: { href?: string; children?
|
|
|
151
152
|
display="inline"
|
|
152
153
|
cursor="pointer"
|
|
153
154
|
{...knobProps.body}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
outlineOffset: FOCUS_RING_HALO_OFFSET,
|
|
161
|
-
}}
|
|
155
|
+
outlineColor={{ "focus-visible": "outline-color" }}
|
|
156
|
+
outlineWidth={{ "focus-visible": 2 }}
|
|
157
|
+
outlineStyle={{ "focus-visible": "solid" }}
|
|
158
|
+
// LC-71 §4 halo: inline text link. Offset 0 puts the band across the
|
|
159
|
+
// line box, into the ascenders/descenders of the surrounding prose.
|
|
160
|
+
outlineOffset={{ "focus-visible": FOCUS_RING_HALO_OFFSET }}
|
|
162
161
|
{...props}
|
|
163
162
|
>
|
|
164
163
|
{children}
|
|
@@ -189,7 +188,7 @@ function MdxP(props: any) {
|
|
|
189
188
|
render="p"
|
|
190
189
|
display="block"
|
|
191
190
|
size={knobProps.sizeToken as any}
|
|
192
|
-
marginVertical="
|
|
191
|
+
marginVertical="2"
|
|
193
192
|
{...knobProps.body}
|
|
194
193
|
{...props}
|
|
195
194
|
/>
|
|
@@ -213,16 +212,16 @@ function MdxList({
|
|
|
213
212
|
}
|
|
214
213
|
|
|
215
214
|
export const mdxComponents: MDXComponents = {
|
|
216
|
-
h1: (props) => <MdxHeading Component={H1} width="max-content" marginBottom="
|
|
215
|
+
h1: (props) => <MdxHeading Component={H1} width="max-content" marginBottom="2" {...props} />,
|
|
217
216
|
h2: ({ children, ...props }) => (
|
|
218
217
|
<MdxHeading
|
|
219
218
|
Component={H2}
|
|
220
219
|
dataHeading
|
|
221
220
|
width={"fit-content" as any}
|
|
222
|
-
size="
|
|
223
|
-
color="$
|
|
224
|
-
marginTop="
|
|
225
|
-
marginBottom="
|
|
221
|
+
size="9"
|
|
222
|
+
color="$color-12"
|
|
223
|
+
marginTop="8"
|
|
224
|
+
marginBottom="4"
|
|
226
225
|
{...props}
|
|
227
226
|
>
|
|
228
227
|
{children}
|
|
@@ -233,10 +232,10 @@ export const mdxComponents: MDXComponents = {
|
|
|
233
232
|
Component={H3}
|
|
234
233
|
link
|
|
235
234
|
dataHeading
|
|
236
|
-
size="
|
|
237
|
-
color="$
|
|
238
|
-
marginTop="
|
|
239
|
-
marginBottom="
|
|
235
|
+
size="8"
|
|
236
|
+
color="$color-11"
|
|
237
|
+
marginTop="6"
|
|
238
|
+
marginBottom="2"
|
|
240
239
|
{...props}
|
|
241
240
|
/>
|
|
242
241
|
),
|
|
@@ -245,15 +244,15 @@ export const mdxComponents: MDXComponents = {
|
|
|
245
244
|
Component={H4}
|
|
246
245
|
dataHeading
|
|
247
246
|
width={"fit-content" as any}
|
|
248
|
-
size="
|
|
249
|
-
color="$
|
|
250
|
-
marginTop="
|
|
251
|
-
marginBottom="
|
|
247
|
+
size="8"
|
|
248
|
+
color="$color-8"
|
|
249
|
+
marginTop="8"
|
|
250
|
+
marginBottom="2"
|
|
252
251
|
{...props}
|
|
253
252
|
/>
|
|
254
253
|
),
|
|
255
|
-
h5: (props) => <MdxHeading Component={H5} size="
|
|
256
|
-
h6: (props) => <MdxHeading Component={H6} marginTop="
|
|
254
|
+
h5: (props) => <MdxHeading Component={H5} size="6" marginTop="4" {...props} />,
|
|
255
|
+
h6: (props) => <MdxHeading Component={H6} marginTop="4" {...props} />,
|
|
257
256
|
p: (props) => <MdxP {...props} />,
|
|
258
257
|
a: (props) => <MdxAnchor {...props} />,
|
|
259
258
|
hr: (props) => <HR {...props} />,
|
|
@@ -270,7 +269,7 @@ export const mdxComponents: MDXComponents = {
|
|
|
270
269
|
<Paragraph render="del" fontSize="inherit" {...props} textDecorationLine="line-through" />
|
|
271
270
|
),
|
|
272
271
|
img: ({ src, alt, title, ...props }: any) => (
|
|
273
|
-
<YStack render="span" marginVertical="
|
|
272
|
+
<YStack render="span" marginVertical="6">
|
|
274
273
|
<MarkdownImage src={src} alt={alt} title={title} {...props} />
|
|
275
274
|
</YStack>
|
|
276
275
|
),
|
|
@@ -49,8 +49,8 @@ export const InvalidSource: Story = {
|
|
|
49
49
|
|
|
50
50
|
export const NativeFallbackNote: Story = {
|
|
51
51
|
render: () => (
|
|
52
|
-
<YStack gap="
|
|
53
|
-
<Text fontSize="$2" color="$
|
|
52
|
+
<YStack gap="3" maxWidth={700} padding="4">
|
|
53
|
+
<Text fontSize="$2" color="$color-10">
|
|
54
54
|
Native has no DOM mermaid engine, so MermaidBlock.native.tsx renders the source as a mermaid
|
|
55
55
|
CodeBlock. This web story is the live SVG path.
|
|
56
56
|
</Text>
|
|
@@ -63,7 +63,7 @@ export function MermaidBlock({ children }: MermaidBlockProps) {
|
|
|
63
63
|
borderColor={edgeColorAt(markdownCodeColors.border.base, knobProps.borderWidthStop)}
|
|
64
64
|
paddingHorizontal={16}
|
|
65
65
|
paddingVertical={12}
|
|
66
|
-
marginVertical="
|
|
66
|
+
marginVertical="2"
|
|
67
67
|
overflow="hidden"
|
|
68
68
|
>
|
|
69
69
|
<div
|
|
@@ -78,9 +78,9 @@ export function MermaidBlock({ children }: MermaidBlockProps) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
|
-
<View paddingTop={state.status === "error" ? "
|
|
81
|
+
<View paddingTop={`${state.status === "error" ? "2" : undefined}`}>
|
|
82
82
|
{state.status === "error" ? (
|
|
83
|
-
<Text color="$
|
|
83
|
+
<Text color="$red-11" fontSize={13} role="alert">
|
|
84
84
|
{`Mermaid: ${state.error}`}
|
|
85
85
|
</Text>
|
|
86
86
|
) : null}
|
|
@@ -60,8 +60,8 @@ export const InvalidSourceIsJustSource: Story = {
|
|
|
60
60
|
/** Side by side with what the fallback is standing in for. */
|
|
61
61
|
export const AgainstTheWebPath: Story = {
|
|
62
62
|
render: () => (
|
|
63
|
-
<YStack gap="
|
|
64
|
-
<Paragraph size="$2" color="$
|
|
63
|
+
<YStack gap="3" maxWidth={700} padding="4">
|
|
64
|
+
<Paragraph size="$2" color="$color-10">
|
|
65
65
|
This is MermaidBlock.native.tsx, the tier iOS and Android resolve. The web tier of the same
|
|
66
66
|
component renders a live SVG for this source; see Markdown/Mermaid.
|
|
67
67
|
</Paragraph>
|
|
@@ -73,7 +73,7 @@ export const AgainstTheWebPath: Story = {
|
|
|
73
73
|
/** Empty and single-line sources still paint a code block, never nothing. */
|
|
74
74
|
export const Edge: Story = {
|
|
75
75
|
render: () => (
|
|
76
|
-
<YStack gap="
|
|
76
|
+
<YStack gap="4" maxWidth={700} padding="4">
|
|
77
77
|
<NativeMermaidBlock>{""}</NativeMermaidBlock>
|
|
78
78
|
<NativeMermaidBlock>{"graph LR; A-->B"}</NativeMermaidBlock>
|
|
79
79
|
</YStack>
|
|
@@ -45,21 +45,21 @@ function MountSpecimen({ label, svg }: { label: string; svg: string }) {
|
|
|
45
45
|
}, [svg]);
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
|
-
<YStack gap="
|
|
48
|
+
<YStack gap="2">
|
|
49
49
|
<Paragraph fontWeight="600">{label}</Paragraph>
|
|
50
50
|
<View
|
|
51
51
|
borderWidth={1}
|
|
52
|
-
borderColor="
|
|
53
|
-
borderRadius="
|
|
54
|
-
padding="
|
|
55
|
-
backgroundColor="
|
|
52
|
+
borderColor="border-color"
|
|
53
|
+
borderRadius="4"
|
|
54
|
+
padding="3"
|
|
55
|
+
backgroundColor="color-2"
|
|
56
56
|
>
|
|
57
57
|
<div ref={hostRef} data-mount-host="true" />
|
|
58
58
|
</View>
|
|
59
|
-
<Paragraph size="$1" color="$
|
|
59
|
+
<Paragraph size="$1" color="$color-10">
|
|
60
60
|
{result ? `returned ${result.mounted}` : "mounting…"}
|
|
61
61
|
</Paragraph>
|
|
62
|
-
<TamaguiParagraph size="
|
|
62
|
+
<TamaguiParagraph size="1" color="color-10" fontFamily="mono">
|
|
63
63
|
{result ? result.html || "(container left empty)" : ""}
|
|
64
64
|
</TamaguiParagraph>
|
|
65
65
|
</YStack>
|
|
@@ -89,7 +89,7 @@ const foreignObjectDiagram = `<svg xmlns="http://www.w3.org/2000/svg" width="220
|
|
|
89
89
|
|
|
90
90
|
export const Main: Story = {
|
|
91
91
|
render: () => (
|
|
92
|
-
<YStack maxWidth={700} padding="
|
|
92
|
+
<YStack maxWidth={700} padding="4">
|
|
93
93
|
<MountSpecimen label="A well-formed diagram mounts as real SVG nodes" svg={plainDiagram} />
|
|
94
94
|
</YStack>
|
|
95
95
|
),
|
|
@@ -102,7 +102,7 @@ export const Main: Story = {
|
|
|
102
102
|
*/
|
|
103
103
|
export const HostileMarkupIsStripped: Story = {
|
|
104
104
|
render: () => (
|
|
105
|
-
<YStack maxWidth={700} padding="
|
|
105
|
+
<YStack maxWidth={700} padding="4">
|
|
106
106
|
<MountSpecimen
|
|
107
107
|
label="script / iframe / onload / javascript: href removed, drawing kept"
|
|
108
108
|
svg={hostileDiagram}
|
|
@@ -117,7 +117,7 @@ export const HostileMarkupIsStripped: Story = {
|
|
|
117
117
|
*/
|
|
118
118
|
export const MalformedFallsBackToHtmlParsing: Story = {
|
|
119
119
|
render: () => (
|
|
120
|
-
<YStack maxWidth={700} padding="
|
|
120
|
+
<YStack maxWidth={700} padding="4">
|
|
121
121
|
<MountSpecimen label="Unclosed html label inside foreignObject" svg={foreignObjectDiagram} />
|
|
122
122
|
</YStack>
|
|
123
123
|
),
|
|
@@ -126,7 +126,7 @@ export const MalformedFallsBackToHtmlParsing: Story = {
|
|
|
126
126
|
/** No <svg> anywhere: returns false, container untouched. */
|
|
127
127
|
export const NoSvgReturnsFalse: Story = {
|
|
128
128
|
render: () => (
|
|
129
|
-
<YStack maxWidth={700} padding="
|
|
129
|
+
<YStack maxWidth={700} padding="4" gap="5">
|
|
130
130
|
<MountSpecimen label="Plain text" svg="not markup at all" />
|
|
131
131
|
<MountSpecimen label="Empty string" svg="" />
|
|
132
132
|
</YStack>
|
|
@@ -71,19 +71,19 @@ function EngineSpecimen({
|
|
|
71
71
|
}, [code, scheme, fontFamily]);
|
|
72
72
|
|
|
73
73
|
return (
|
|
74
|
-
<YStack gap="
|
|
74
|
+
<YStack gap="2" flex={1}>
|
|
75
75
|
<Paragraph fontWeight="600">{label}</Paragraph>
|
|
76
76
|
<View
|
|
77
77
|
borderWidth={1}
|
|
78
|
-
borderColor="
|
|
79
|
-
borderRadius="
|
|
80
|
-
padding="
|
|
81
|
-
backgroundColor="
|
|
78
|
+
borderColor="border-color"
|
|
79
|
+
borderRadius="4"
|
|
80
|
+
padding="3"
|
|
81
|
+
backgroundColor="color-2"
|
|
82
82
|
minHeight={80}
|
|
83
83
|
>
|
|
84
84
|
<div ref={hostRef} />
|
|
85
85
|
</View>
|
|
86
|
-
<Paragraph size="$1" color={result && !result.ok ? "$
|
|
86
|
+
<Paragraph size="$1" color={result && !result.ok ? "$red-11" : "$color-10"} role="status">
|
|
87
87
|
{result === null
|
|
88
88
|
? "awaiting the lazy engine…"
|
|
89
89
|
: result.ok
|
|
@@ -96,7 +96,7 @@ function EngineSpecimen({
|
|
|
96
96
|
|
|
97
97
|
export const Main: Story = {
|
|
98
98
|
render: () => (
|
|
99
|
-
<YStack maxWidth={700} padding="
|
|
99
|
+
<YStack maxWidth={700} padding="4">
|
|
100
100
|
<EngineSpecimen label="A flowchart through the engine" code={FLOWCHART} />
|
|
101
101
|
</YStack>
|
|
102
102
|
),
|
|
@@ -108,7 +108,7 @@ export const Main: Story = {
|
|
|
108
108
|
*/
|
|
109
109
|
export const SchemeSwitch: Story = {
|
|
110
110
|
render: () => (
|
|
111
|
-
<XStack gap="
|
|
111
|
+
<XStack gap="4" padding="4" maxWidth={900}>
|
|
112
112
|
<EngineSpecimen label="scheme: light" code={FLOWCHART} scheme="light" />
|
|
113
113
|
<EngineSpecimen label="scheme: dark" code={FLOWCHART} scheme="dark" />
|
|
114
114
|
</XStack>
|
|
@@ -122,7 +122,7 @@ export const SchemeSwitch: Story = {
|
|
|
122
122
|
*/
|
|
123
123
|
export const InvalidSource: Story = {
|
|
124
124
|
render: () => (
|
|
125
|
-
<YStack maxWidth={700} padding="
|
|
125
|
+
<YStack maxWidth={700} padding="4">
|
|
126
126
|
<EngineSpecimen label="Invalid source returns the parse message" code={INVALID} />
|
|
127
127
|
</YStack>
|
|
128
128
|
),
|
|
@@ -131,7 +131,7 @@ export const InvalidSource: Story = {
|
|
|
131
131
|
/** fontFamily is forwarded into mermaid's theme config, and re-inits like scheme. */
|
|
132
132
|
export const FontFamily: Story = {
|
|
133
133
|
render: () => (
|
|
134
|
-
<XStack gap="
|
|
134
|
+
<XStack gap="4" padding="4" maxWidth={900}>
|
|
135
135
|
<EngineSpecimen label="engine default font" code={FLOWCHART} />
|
|
136
136
|
<EngineSpecimen
|
|
137
137
|
label='fontFamily: "Courier New, monospace"'
|
|
@@ -145,7 +145,7 @@ export const FontFamily: Story = {
|
|
|
145
145
|
/** Other grammars go through the same call; only the source changes. */
|
|
146
146
|
export const OtherGrammars: Story = {
|
|
147
147
|
render: () => (
|
|
148
|
-
<YStack gap="
|
|
148
|
+
<YStack gap="5" padding="4" maxWidth={700}>
|
|
149
149
|
<EngineSpecimen
|
|
150
150
|
label="sequenceDiagram"
|
|
151
151
|
code={"sequenceDiagram\n Client->>Engine: render\n Engine-->>Client: svg"}
|
package/src/renderer.spec.tsx
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* unsafe link protocols are stripped, and unknown nodes degrade gracefully.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { renderWithProviders } from "@multiplatform.one/test-utils";
|
|
8
|
+
import { mountedRoot, renderWithProviders } from "@multiplatform.one/test-utils";
|
|
9
9
|
import { Text, View } from "tamagui";
|
|
10
10
|
import { describe, expect, it } from "vitest";
|
|
11
11
|
import { parseMarkdown } from "./parser";
|
|
@@ -278,7 +278,7 @@ describe("renderNode — unknown node degradation", () => {
|
|
|
278
278
|
)}
|
|
279
279
|
</>,
|
|
280
280
|
);
|
|
281
|
-
const view = container
|
|
281
|
+
const view = mountedRoot(container);
|
|
282
282
|
expect(view.textContent).toBe("still visible");
|
|
283
283
|
expect(Array.from(view.childNodes).every((n) => n.nodeType === 1)).toBe(true);
|
|
284
284
|
});
|
package/src/renderer.tsx
CHANGED
|
@@ -404,8 +404,6 @@ function renderChildren(node: { children?: AnyNode[] }, options: RenderOptions):
|
|
|
404
404
|
*/
|
|
405
405
|
export function renderMarkdown(root: Root, options: RenderOptions = {}): ReactNode {
|
|
406
406
|
return (
|
|
407
|
-
<View gap="
|
|
408
|
-
{root.children.map((child, i) => renderNode(child as AnyNode, i, options))}
|
|
409
|
-
</View>
|
|
407
|
+
<View gap="1">{root.children.map((child, i) => renderNode(child as AnyNode, i, options))}</View>
|
|
410
408
|
);
|
|
411
409
|
}
|
package/src/shared/colorRamps.ts
CHANGED
|
@@ -5,32 +5,32 @@
|
|
|
5
5
|
|
|
6
6
|
export const markdownCodeColors = {
|
|
7
7
|
background: {
|
|
8
|
-
base: "
|
|
8
|
+
base: "color-3",
|
|
9
9
|
},
|
|
10
10
|
border: {
|
|
11
|
-
base: "
|
|
11
|
+
base: "color-6",
|
|
12
12
|
},
|
|
13
13
|
text: {
|
|
14
|
-
base: "
|
|
15
|
-
muted: "
|
|
14
|
+
base: "color-12",
|
|
15
|
+
muted: "color-11",
|
|
16
16
|
},
|
|
17
17
|
} as const;
|
|
18
18
|
|
|
19
19
|
export const markdownBlockquoteColors = {
|
|
20
20
|
background: {
|
|
21
|
-
base: "
|
|
21
|
+
base: "color-2",
|
|
22
22
|
},
|
|
23
23
|
border: {
|
|
24
|
-
base: "
|
|
24
|
+
base: "color-8",
|
|
25
25
|
},
|
|
26
26
|
text: {
|
|
27
|
-
base: "
|
|
27
|
+
base: "color-11",
|
|
28
28
|
},
|
|
29
29
|
} as const;
|
|
30
30
|
|
|
31
31
|
export const markdownLinkColors = {
|
|
32
32
|
text: {
|
|
33
|
-
base: "
|
|
34
|
-
hover: "
|
|
33
|
+
base: "blue-10",
|
|
34
|
+
hover: "blue-11",
|
|
35
35
|
},
|
|
36
36
|
} as const;
|
package/src/shared/tokenPx.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { tokenNumber } from "@multiplatform.one/theme";
|
|
1
2
|
import { getTokens, getVariableValue } from "tamagui";
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -13,14 +14,12 @@ export function tokenPx(
|
|
|
13
14
|
if (typeof token === "number" && Number.isFinite(token)) return token;
|
|
14
15
|
if (token == null) return fallback;
|
|
15
16
|
try {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const raw = getVariableValue(
|
|
22
|
-
(bucket as Record<string, unknown> | undefined)?.[String(token)] ?? token,
|
|
23
|
-
);
|
|
17
|
+
if (scale !== "fontSize") {
|
|
18
|
+
const n = tokenNumber(scale, token);
|
|
19
|
+
return n != null && n > 0 ? n : fallback;
|
|
20
|
+
}
|
|
21
|
+
const bucket = (getTokens() as { fontSize?: Record<string, unknown> }).fontSize;
|
|
22
|
+
const raw = getVariableValue(bucket?.[String(token)] ?? token);
|
|
24
23
|
const n = typeof raw === "number" ? raw : Number.parseFloat(String(raw));
|
|
25
24
|
return Number.isFinite(n) && n > 0 ? n : fallback;
|
|
26
25
|
} catch {
|