@multiplatform.one/markdown 7.4.1 → 7.5.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 +6 -4
- package/dist/cjs/Aside/index.native.js +6 -4
- package/dist/cjs/Aside/index.native.js.map +1 -1
- package/dist/cjs/Hr/index.cjs +2 -3
- package/dist/cjs/Hr/index.native.js +2 -3
- package/dist/cjs/Hr/index.native.js.map +1 -1
- package/dist/cjs/MarkdownSimpleTable/index.cjs +15 -15
- package/dist/cjs/MarkdownSimpleTable/index.native.js +17 -18
- package/dist/cjs/MarkdownSimpleTable/index.native.js.map +1 -1
- package/dist/cjs/MdxCodeBlock/index.cjs +9 -5
- package/dist/cjs/MdxCodeBlock/index.native.js +9 -5
- package/dist/cjs/MdxCodeBlock/index.native.js.map +1 -1
- package/dist/cjs/Table/index.cjs +20 -8
- package/dist/cjs/Table/index.native.js +20 -8
- package/dist/cjs/Table/index.native.js.map +1 -1
- package/dist/cjs/Video/index.cjs +11 -7
- package/dist/cjs/Video/index.native.js +12 -7
- package/dist/cjs/Video/index.native.js.map +1 -1
- package/dist/cjs/components/Blockquote.cjs +5 -4
- package/dist/cjs/components/Blockquote.native.js +7 -6
- package/dist/cjs/components/Blockquote.native.js.map +1 -1
- package/dist/cjs/components/CodeBlock.cjs +2 -2
- package/dist/cjs/components/CodeBlock.native.js +3 -3
- package/dist/cjs/components/CodeBlock.native.js.map +1 -1
- package/dist/cjs/components/Heading.cjs +1 -0
- package/dist/cjs/components/Heading.native.js +1 -0
- package/dist/cjs/components/Heading.native.js.map +1 -1
- package/dist/cjs/components/HorizontalRule.cjs +12 -1
- package/dist/cjs/components/HorizontalRule.native.js +12 -1
- package/dist/cjs/components/HorizontalRule.native.js.map +1 -1
- package/dist/cjs/components/Image.cjs +2 -2
- package/dist/cjs/components/Image.native.js +3 -2
- package/dist/cjs/components/Image.native.js.map +1 -1
- package/dist/cjs/components/InlineCode.cjs +2 -1
- package/dist/cjs/components/InlineCode.native.js +2 -1
- package/dist/cjs/components/InlineCode.native.js.map +1 -1
- package/dist/cjs/components/InlineStyles.cjs +14 -1
- package/dist/cjs/components/InlineStyles.native.js +14 -1
- package/dist/cjs/components/InlineStyles.native.js.map +1 -1
- package/dist/cjs/components/Link.cjs +5 -0
- package/dist/cjs/components/Link.native.js +5 -0
- package/dist/cjs/components/Link.native.js.map +1 -1
- package/dist/cjs/components/List.cjs +8 -1
- package/dist/cjs/components/List.native.js +11 -3
- package/dist/cjs/components/List.native.js.map +1 -1
- package/dist/cjs/components/Table.cjs +15 -9
- package/dist/cjs/components/Table.native.js +17 -12
- package/dist/cjs/components/Table.native.js.map +1 -1
- package/dist/cjs/mdxComponents.cjs +175 -108
- package/dist/cjs/mdxComponents.native.js +184 -113
- package/dist/cjs/mdxComponents.native.js.map +1 -1
- package/dist/cjs/mermaid/MermaidBlock.cjs +1 -1
- package/dist/cjs/mermaid/renderMermaidDiagram.native.js +11 -81
- package/dist/cjs/mermaid/renderMermaidDiagram.native.js.map +1 -1
- package/dist/cjs/shared/index.cjs +13 -1
- package/dist/cjs/shared/index.native.js +12 -0
- package/dist/cjs/shared/index.native.js.map +1 -1
- package/dist/cjs/shared/tokenPx.cjs +41 -0
- package/dist/cjs/shared/tokenPx.native.js +46 -0
- package/dist/cjs/shared/tokenPx.native.js.map +1 -0
- package/dist/cjs/shared/useMarkdownTableKnobs.cjs +61 -0
- package/dist/cjs/shared/useMarkdownTableKnobs.native.js +64 -0
- package/dist/cjs/shared/useMarkdownTableKnobs.native.js.map +1 -0
- package/dist/esm/Aside/index.mjs +6 -4
- package/dist/esm/Aside/index.mjs.map +1 -1
- package/dist/esm/Aside/index.native.js +6 -4
- package/dist/esm/Aside/index.native.js.map +1 -1
- package/dist/esm/Hr/index.mjs +2 -3
- package/dist/esm/Hr/index.mjs.map +1 -1
- package/dist/esm/Hr/index.native.js +2 -3
- package/dist/esm/Hr/index.native.js.map +1 -1
- package/dist/esm/MarkdownSimpleTable/index.mjs +15 -15
- package/dist/esm/MarkdownSimpleTable/index.mjs.map +1 -1
- package/dist/esm/MarkdownSimpleTable/index.native.js +17 -18
- package/dist/esm/MarkdownSimpleTable/index.native.js.map +1 -1
- package/dist/esm/MdxCodeBlock/index.mjs +9 -5
- package/dist/esm/MdxCodeBlock/index.mjs.map +1 -1
- package/dist/esm/MdxCodeBlock/index.native.js +9 -5
- package/dist/esm/MdxCodeBlock/index.native.js.map +1 -1
- package/dist/esm/Table/index.mjs +20 -8
- package/dist/esm/Table/index.mjs.map +1 -1
- package/dist/esm/Table/index.native.js +20 -8
- package/dist/esm/Table/index.native.js.map +1 -1
- package/dist/esm/Video/index.mjs +11 -7
- package/dist/esm/Video/index.mjs.map +1 -1
- package/dist/esm/Video/index.native.js +12 -7
- package/dist/esm/Video/index.native.js.map +1 -1
- package/dist/esm/components/Blockquote.mjs +5 -4
- package/dist/esm/components/Blockquote.mjs.map +1 -1
- package/dist/esm/components/Blockquote.native.js +7 -6
- package/dist/esm/components/Blockquote.native.js.map +1 -1
- package/dist/esm/components/CodeBlock.mjs +2 -2
- package/dist/esm/components/CodeBlock.mjs.map +1 -1
- package/dist/esm/components/CodeBlock.native.js +3 -3
- package/dist/esm/components/CodeBlock.native.js.map +1 -1
- package/dist/esm/components/Heading.mjs +1 -0
- package/dist/esm/components/Heading.mjs.map +1 -1
- package/dist/esm/components/Heading.native.js +1 -0
- package/dist/esm/components/Heading.native.js.map +1 -1
- package/dist/esm/components/HorizontalRule.mjs +13 -2
- package/dist/esm/components/HorizontalRule.mjs.map +1 -1
- package/dist/esm/components/HorizontalRule.native.js +13 -2
- package/dist/esm/components/HorizontalRule.native.js.map +1 -1
- package/dist/esm/components/Image.mjs +2 -2
- package/dist/esm/components/Image.mjs.map +1 -1
- package/dist/esm/components/Image.native.js +3 -2
- package/dist/esm/components/Image.native.js.map +1 -1
- package/dist/esm/components/InlineCode.mjs +2 -1
- package/dist/esm/components/InlineCode.mjs.map +1 -1
- package/dist/esm/components/InlineCode.native.js +2 -1
- package/dist/esm/components/InlineCode.native.js.map +1 -1
- package/dist/esm/components/InlineStyles.mjs +14 -1
- package/dist/esm/components/InlineStyles.mjs.map +1 -1
- package/dist/esm/components/InlineStyles.native.js +14 -1
- package/dist/esm/components/InlineStyles.native.js.map +1 -1
- package/dist/esm/components/Link.mjs +5 -0
- package/dist/esm/components/Link.mjs.map +1 -1
- package/dist/esm/components/Link.native.js +5 -0
- package/dist/esm/components/Link.native.js.map +1 -1
- package/dist/esm/components/List.mjs +8 -1
- package/dist/esm/components/List.mjs.map +1 -1
- package/dist/esm/components/List.native.js +11 -3
- package/dist/esm/components/List.native.js.map +1 -1
- package/dist/esm/components/Table.mjs +15 -9
- package/dist/esm/components/Table.mjs.map +1 -1
- package/dist/esm/components/Table.native.js +17 -12
- package/dist/esm/components/Table.native.js.map +1 -1
- package/dist/esm/mdxComponents.mjs +175 -108
- package/dist/esm/mdxComponents.mjs.map +1 -1
- package/dist/esm/mdxComponents.native.js +184 -113
- package/dist/esm/mdxComponents.native.js.map +1 -1
- package/dist/esm/mermaid/MermaidBlock.mjs +1 -1
- package/dist/esm/mermaid/MermaidBlock.mjs.map +1 -1
- package/dist/esm/mermaid/renderMermaidDiagram.native.js +9 -68
- package/dist/esm/mermaid/renderMermaidDiagram.native.js.map +1 -1
- package/dist/esm/shared/index.mjs +3 -0
- package/dist/esm/shared/index.mjs.map +1 -1
- package/dist/esm/shared/index.native.js +3 -0
- package/dist/esm/shared/index.native.js.map +1 -1
- package/dist/esm/shared/tokenPx.mjs +16 -0
- package/dist/esm/shared/tokenPx.mjs.map +1 -0
- package/dist/esm/shared/tokenPx.native.js +18 -0
- package/dist/esm/shared/tokenPx.native.js.map +1 -0
- package/dist/esm/shared/useMarkdownTableKnobs.mjs +36 -0
- package/dist/esm/shared/useMarkdownTableKnobs.mjs.map +1 -0
- package/dist/esm/shared/useMarkdownTableKnobs.native.js +36 -0
- package/dist/esm/shared/useMarkdownTableKnobs.native.js.map +1 -0
- package/dist/jsx/Aside/index.mjs +6 -4
- package/dist/jsx/Aside/index.mjs.map +1 -1
- package/dist/jsx/Aside/index.native.js +6 -4
- package/dist/jsx/Aside/index.native.js.map +1 -1
- package/dist/jsx/Hr/index.mjs +2 -3
- package/dist/jsx/Hr/index.mjs.map +1 -1
- package/dist/jsx/Hr/index.native.js +2 -3
- package/dist/jsx/Hr/index.native.js.map +1 -1
- package/dist/jsx/MarkdownSimpleTable/index.mjs +15 -15
- package/dist/jsx/MarkdownSimpleTable/index.mjs.map +1 -1
- package/dist/jsx/MarkdownSimpleTable/index.native.js +17 -18
- package/dist/jsx/MarkdownSimpleTable/index.native.js.map +1 -1
- package/dist/jsx/MdxCodeBlock/index.mjs +9 -5
- package/dist/jsx/MdxCodeBlock/index.mjs.map +1 -1
- package/dist/jsx/MdxCodeBlock/index.native.js +9 -5
- package/dist/jsx/MdxCodeBlock/index.native.js.map +1 -1
- package/dist/jsx/Table/index.mjs +20 -8
- package/dist/jsx/Table/index.mjs.map +1 -1
- package/dist/jsx/Table/index.native.js +20 -8
- package/dist/jsx/Table/index.native.js.map +1 -1
- package/dist/jsx/Video/index.mjs +11 -7
- package/dist/jsx/Video/index.mjs.map +1 -1
- package/dist/jsx/Video/index.native.js +12 -7
- package/dist/jsx/Video/index.native.js.map +1 -1
- package/dist/jsx/components/Blockquote.mjs +5 -4
- package/dist/jsx/components/Blockquote.mjs.map +1 -1
- package/dist/jsx/components/Blockquote.native.js +7 -6
- package/dist/jsx/components/Blockquote.native.js.map +1 -1
- package/dist/jsx/components/CodeBlock.mjs +2 -2
- package/dist/jsx/components/CodeBlock.mjs.map +1 -1
- package/dist/jsx/components/CodeBlock.native.js +3 -3
- package/dist/jsx/components/CodeBlock.native.js.map +1 -1
- package/dist/jsx/components/Heading.mjs +1 -0
- package/dist/jsx/components/Heading.mjs.map +1 -1
- package/dist/jsx/components/Heading.native.js +1 -0
- package/dist/jsx/components/Heading.native.js.map +1 -1
- package/dist/jsx/components/HorizontalRule.mjs +13 -2
- package/dist/jsx/components/HorizontalRule.mjs.map +1 -1
- package/dist/jsx/components/HorizontalRule.native.js +12 -1
- package/dist/jsx/components/HorizontalRule.native.js.map +1 -1
- package/dist/jsx/components/Image.mjs +2 -2
- package/dist/jsx/components/Image.mjs.map +1 -1
- package/dist/jsx/components/Image.native.js +3 -2
- package/dist/jsx/components/Image.native.js.map +1 -1
- package/dist/jsx/components/InlineCode.mjs +2 -1
- package/dist/jsx/components/InlineCode.mjs.map +1 -1
- package/dist/jsx/components/InlineCode.native.js +2 -1
- package/dist/jsx/components/InlineCode.native.js.map +1 -1
- package/dist/jsx/components/InlineStyles.mjs +14 -1
- package/dist/jsx/components/InlineStyles.mjs.map +1 -1
- package/dist/jsx/components/InlineStyles.native.js +14 -1
- package/dist/jsx/components/InlineStyles.native.js.map +1 -1
- package/dist/jsx/components/Link.mjs +5 -0
- package/dist/jsx/components/Link.mjs.map +1 -1
- package/dist/jsx/components/Link.native.js +5 -0
- package/dist/jsx/components/Link.native.js.map +1 -1
- package/dist/jsx/components/List.mjs +8 -1
- package/dist/jsx/components/List.mjs.map +1 -1
- package/dist/jsx/components/List.native.js +11 -3
- package/dist/jsx/components/List.native.js.map +1 -1
- package/dist/jsx/components/Table.mjs +15 -9
- package/dist/jsx/components/Table.mjs.map +1 -1
- package/dist/jsx/components/Table.native.js +17 -12
- package/dist/jsx/components/Table.native.js.map +1 -1
- package/dist/jsx/mdxComponents.mjs +175 -108
- package/dist/jsx/mdxComponents.mjs.map +1 -1
- package/dist/jsx/mdxComponents.native.js +184 -113
- package/dist/jsx/mdxComponents.native.js.map +1 -1
- package/dist/jsx/mermaid/MermaidBlock.mjs +1 -1
- package/dist/jsx/mermaid/MermaidBlock.mjs.map +1 -1
- package/dist/jsx/mermaid/renderMermaidDiagram.native.js +11 -81
- package/dist/jsx/mermaid/renderMermaidDiagram.native.js.map +1 -1
- package/dist/jsx/shared/index.mjs +3 -0
- package/dist/jsx/shared/index.mjs.map +1 -1
- package/dist/jsx/shared/index.native.js +12 -0
- package/dist/jsx/shared/index.native.js.map +1 -1
- package/dist/jsx/shared/tokenPx.mjs +16 -0
- package/dist/jsx/shared/tokenPx.mjs.map +1 -0
- package/dist/jsx/shared/tokenPx.native.js +46 -0
- package/dist/jsx/shared/tokenPx.native.js.map +1 -0
- package/dist/jsx/shared/useMarkdownTableKnobs.mjs +36 -0
- package/dist/jsx/shared/useMarkdownTableKnobs.mjs.map +1 -0
- package/dist/jsx/shared/useMarkdownTableKnobs.native.js +64 -0
- package/dist/jsx/shared/useMarkdownTableKnobs.native.js.map +1 -0
- package/package.json +14 -9
- package/src/Aside/index.tsx +6 -4
- package/src/Hr/hr.spec.tsx +11 -10
- package/src/Hr/index.tsx +2 -2
- package/src/MarkdownSimpleTable/index.tsx +10 -24
- package/src/MdxCodeBlock/index.tsx +10 -4
- package/src/Table/index.tsx +11 -11
- package/src/Video/index.tsx +15 -5
- package/src/components/Blockquote.tsx +6 -5
- package/src/components/CodeBlock.tsx +2 -2
- package/src/components/Heading.tsx +7 -1
- package/src/components/HorizontalRule.tsx +19 -2
- package/src/components/Image.tsx +3 -2
- package/src/components/InlineCode.tsx +2 -1
- package/src/components/InlineStyles.tsx +7 -3
- package/src/components/Link.tsx +3 -0
- package/src/components/List.tsx +10 -3
- package/src/components/Table.tsx +13 -10
- package/src/designLaw.spec.tsx +130 -0
- package/src/mdxComponents.tsx +168 -87
- package/src/mermaid/MermaidBlock.tsx +1 -1
- package/src/mermaid/nativeGraph.spec.ts +90 -0
- package/src/mermaid/renderMermaidDiagram.native.ts +50 -0
- package/src/mermaid/renderMermaidDiagram.spec.ts +23 -0
- package/src/shared/index.ts +2 -0
- package/src/shared/tokenPx.ts +29 -0
- package/src/shared/useMarkdownTableKnobs.ts +38 -0
- package/src/stories/Blocks.stories.tsx +5 -5
- package/types/Aside/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/MarkdownSimpleTable/index.d.ts.map +1 -1
- package/types/MdxCodeBlock/index.d.ts.map +1 -1
- package/types/Table/index.d.ts.map +1 -1
- package/types/Video/index.d.ts.map +1 -1
- package/types/components/Blockquote.d.ts.map +1 -1
- package/types/components/Heading.d.ts.map +1 -1
- package/types/components/HorizontalRule.d.ts +5 -1
- package/types/components/HorizontalRule.d.ts.map +1 -1
- package/types/components/Image.d.ts.map +1 -1
- package/types/components/InlineCode.d.ts.map +1 -1
- package/types/components/InlineStyles.d.ts.map +1 -1
- package/types/components/Link.d.ts.map +1 -1
- package/types/components/List.d.ts.map +1 -1
- package/types/components/Table.d.ts.map +1 -1
- package/types/mdxComponents.d.ts.map +1 -1
- package/types/mermaid/renderMermaidDiagram.native.d.ts +45 -0
- package/types/mermaid/renderMermaidDiagram.native.d.ts.map +1 -0
- package/types/shared/index.d.ts +2 -0
- package/types/shared/index.d.ts.map +1 -1
- package/types/shared/tokenPx.d.ts +7 -0
- package/types/shared/tokenPx.d.ts.map +1 -0
- package/types/shared/useMarkdownTableKnobs.d.ts +39 -0
- package/types/shared/useMarkdownTableKnobs.d.ts.map +1 -0
|
@@ -28,16 +28,17 @@ __export(mdxComponents_exports, {
|
|
|
28
28
|
module.exports = __toCommonJS(mdxComponents_exports);
|
|
29
29
|
var import_components = require("@multiplatform.one/components");
|
|
30
30
|
var import_theme = require("@multiplatform.one/theme");
|
|
31
|
+
var import_tokenPx = require("./shared/tokenPx.cjs");
|
|
31
32
|
var import_router = require("@multiplatform.one/router");
|
|
32
33
|
var import_react = require("react");
|
|
33
34
|
var import_tamagui = require("tamagui");
|
|
34
35
|
var import_ExternalIcon = require("./ExternalIcon/index.cjs");
|
|
35
36
|
var import_Hr = require("./Hr/index.cjs");
|
|
36
37
|
var import_icons = require("./icons/index.cjs");
|
|
37
|
-
var
|
|
38
|
+
var import_List = require("./components/List.cjs");
|
|
39
|
+
var import_Image = require("./components/Image.cjs");
|
|
38
40
|
var import_MdxCodeBlock = require("./MdxCodeBlock/index.cjs");
|
|
39
41
|
var import_Table = require("./Table/index.cjs");
|
|
40
|
-
var import_Ul = require("./Ul/index.cjs");
|
|
41
42
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
43
|
const code = ({
|
|
43
44
|
hero: _hero,
|
|
@@ -77,167 +78,228 @@ function MdxBlockquote({
|
|
|
77
78
|
const {
|
|
78
79
|
knobProps
|
|
79
80
|
} = (0, import_theme.useResolvedKnobs)();
|
|
81
|
+
const railWidth = knobProps.borderRadius.borderWidth;
|
|
82
|
+
const inset = knobProps.panelPadding.padding;
|
|
80
83
|
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
81
84
|
marginVertical: "$4",
|
|
82
|
-
paddingHorizontal:
|
|
85
|
+
paddingHorizontal: inset,
|
|
83
86
|
...(import_tamagui.isWeb ? {
|
|
84
87
|
style: {
|
|
85
|
-
marginInlineStart:
|
|
86
|
-
borderInlineStartWidth:
|
|
87
|
-
borderInlineStartStyle: "solid"
|
|
88
|
+
marginInlineStart: inset,
|
|
89
|
+
borderInlineStartWidth: railWidth,
|
|
90
|
+
borderInlineStartStyle: railWidth ? "solid" : "none"
|
|
88
91
|
}
|
|
89
92
|
} : {
|
|
90
93
|
style: {
|
|
91
|
-
marginInlineStart:
|
|
94
|
+
marginInlineStart: inset
|
|
92
95
|
},
|
|
93
|
-
borderStartWidth:
|
|
96
|
+
borderStartWidth: railWidth
|
|
94
97
|
}),
|
|
95
98
|
borderColor: "$borderColor",
|
|
96
99
|
justifyContent: "center",
|
|
97
100
|
...props,
|
|
98
101
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
99
102
|
whiteSpace: "revert",
|
|
100
|
-
size:
|
|
101
|
-
|
|
102
|
-
fontWeight: "300",
|
|
103
|
+
size: knobProps.sizeToken,
|
|
104
|
+
...knobProps.body,
|
|
103
105
|
color: "$color",
|
|
104
106
|
opacity: 0.65,
|
|
105
107
|
children: (0, import_components.unwrapText)(children)
|
|
106
108
|
})
|
|
107
109
|
});
|
|
108
110
|
}
|
|
111
|
+
function MdxHeading({
|
|
112
|
+
Component,
|
|
113
|
+
children,
|
|
114
|
+
id,
|
|
115
|
+
size,
|
|
116
|
+
color,
|
|
117
|
+
marginTop,
|
|
118
|
+
marginBottom,
|
|
119
|
+
dataHeading,
|
|
120
|
+
link,
|
|
121
|
+
...props
|
|
122
|
+
}) {
|
|
123
|
+
const {
|
|
124
|
+
knobProps
|
|
125
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
126
|
+
const heading = /* @__PURE__ */(0, import_jsx_runtime.jsx)(Component, {
|
|
127
|
+
maxWidth: "100%",
|
|
128
|
+
position: "relative",
|
|
129
|
+
width: link ? "fit-content" : void 0,
|
|
130
|
+
size,
|
|
131
|
+
color,
|
|
132
|
+
marginTop: link ? void 0 : marginTop,
|
|
133
|
+
marginBottom: link ? void 0 : marginBottom,
|
|
134
|
+
...(dataHeading ? {
|
|
135
|
+
"data-heading": true
|
|
136
|
+
} : {}),
|
|
137
|
+
...knobProps.heading,
|
|
138
|
+
...props,
|
|
139
|
+
children
|
|
140
|
+
});
|
|
141
|
+
if (!link) return heading;
|
|
142
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(LinkHeading, {
|
|
143
|
+
"data-heading": true,
|
|
144
|
+
marginTop,
|
|
145
|
+
marginBottom,
|
|
146
|
+
id,
|
|
147
|
+
children: [heading, getNonTextChildren(children)]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function MdxAnchor({
|
|
151
|
+
href = "",
|
|
152
|
+
children,
|
|
153
|
+
...props
|
|
154
|
+
}) {
|
|
155
|
+
const {
|
|
156
|
+
knobProps
|
|
157
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
158
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_router.Link, {
|
|
159
|
+
href,
|
|
160
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.Paragraph, {
|
|
161
|
+
render: "span",
|
|
162
|
+
fontSize: "inherit",
|
|
163
|
+
display: "inline",
|
|
164
|
+
cursor: "pointer",
|
|
165
|
+
...knobProps.body,
|
|
166
|
+
focusVisibleStyle: {
|
|
167
|
+
outlineColor: "$outlineColor",
|
|
168
|
+
outlineWidth: 2,
|
|
169
|
+
outlineStyle: "solid",
|
|
170
|
+
outlineOffset: 2
|
|
171
|
+
},
|
|
172
|
+
...props,
|
|
173
|
+
children: [children, typeof href === "string" && href.startsWith("http") ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
174
|
+
children: ["\xA0", /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
175
|
+
fontSize: "inherit",
|
|
176
|
+
display: "inline-flex",
|
|
177
|
+
y: 2,
|
|
178
|
+
style: {
|
|
179
|
+
marginLeft: -1
|
|
180
|
+
},
|
|
181
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_ExternalIcon.ExternalIcon, {})
|
|
182
|
+
})]
|
|
183
|
+
}) : null]
|
|
184
|
+
})
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function MdxStrong(props) {
|
|
188
|
+
const {
|
|
189
|
+
knobProps
|
|
190
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
191
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
192
|
+
render: "strong",
|
|
193
|
+
fontSize: "inherit",
|
|
194
|
+
...knobProps.body,
|
|
195
|
+
...props,
|
|
196
|
+
fontWeight: "700"
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
function MdxP(props) {
|
|
200
|
+
const {
|
|
201
|
+
knobProps
|
|
202
|
+
} = (0, import_theme.useResolvedKnobs)();
|
|
203
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
204
|
+
render: "p",
|
|
205
|
+
display: "block",
|
|
206
|
+
size: knobProps.sizeToken,
|
|
207
|
+
marginVertical: "$2",
|
|
208
|
+
...knobProps.body,
|
|
209
|
+
...props
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function MdxList({
|
|
213
|
+
ordered,
|
|
214
|
+
children,
|
|
215
|
+
start
|
|
216
|
+
}) {
|
|
217
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_List.MarkdownList, {
|
|
218
|
+
ordered,
|
|
219
|
+
start,
|
|
220
|
+
children: import_react.Children.toArray(children).map(child => typeof child === "string" ? null : child)
|
|
221
|
+
});
|
|
222
|
+
}
|
|
109
223
|
const mdxComponents = {
|
|
110
|
-
h1: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
111
|
-
|
|
224
|
+
h1: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxHeading, {
|
|
225
|
+
Component: import_tamagui.H1,
|
|
112
226
|
width: "max-content",
|
|
113
|
-
position: "relative",
|
|
114
227
|
marginBottom: "$2",
|
|
115
228
|
...props
|
|
116
229
|
}),
|
|
117
230
|
h2: ({
|
|
118
231
|
children,
|
|
119
232
|
...props
|
|
120
|
-
}) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
121
|
-
|
|
233
|
+
}) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxHeading, {
|
|
234
|
+
Component: import_tamagui.H2,
|
|
235
|
+
dataHeading: true,
|
|
122
236
|
width: "fit-content",
|
|
123
|
-
marginTop: "$8",
|
|
124
|
-
marginBottom: "$4",
|
|
125
|
-
"data-heading": true,
|
|
126
237
|
size: "$9",
|
|
127
238
|
color: "$color12",
|
|
239
|
+
marginTop: "$8",
|
|
240
|
+
marginBottom: "$4",
|
|
128
241
|
...props,
|
|
129
242
|
children
|
|
130
243
|
}),
|
|
131
|
-
h3: ({
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"
|
|
244
|
+
h3: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxHeading, {
|
|
245
|
+
Component: import_tamagui.H3,
|
|
246
|
+
link: true,
|
|
247
|
+
dataHeading: true,
|
|
248
|
+
size: "$8",
|
|
249
|
+
color: "$color11",
|
|
137
250
|
marginTop: "$6",
|
|
138
251
|
marginBottom: "$2",
|
|
139
|
-
|
|
140
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.H3, {
|
|
141
|
-
maxWidth: "100%",
|
|
142
|
-
position: "relative",
|
|
143
|
-
width: "fit-content",
|
|
144
|
-
size: "$8",
|
|
145
|
-
color: "$color11",
|
|
146
|
-
fontWeight: "600",
|
|
147
|
-
...props,
|
|
148
|
-
children
|
|
149
|
-
}), getNonTextChildren(children)]
|
|
252
|
+
...props
|
|
150
253
|
}),
|
|
151
|
-
h4: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
152
|
-
|
|
254
|
+
h4: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxHeading, {
|
|
255
|
+
Component: import_tamagui.H4,
|
|
256
|
+
dataHeading: true,
|
|
153
257
|
width: "fit-content",
|
|
154
|
-
marginTop: "$8",
|
|
155
|
-
marginBottom: "$2",
|
|
156
258
|
size: "$8",
|
|
157
259
|
color: "$color8",
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
|
|
260
|
+
marginTop: "$8",
|
|
261
|
+
marginBottom: "$2",
|
|
262
|
+
...props
|
|
161
263
|
}),
|
|
162
|
-
h5: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
264
|
+
h5: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxHeading, {
|
|
265
|
+
Component: import_tamagui.H5,
|
|
163
266
|
size: "$6",
|
|
164
|
-
fontWeight: "600",
|
|
165
267
|
marginTop: "$4",
|
|
166
268
|
...props
|
|
167
269
|
}),
|
|
168
|
-
h6: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
270
|
+
h6: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxHeading, {
|
|
271
|
+
Component: import_tamagui.H6,
|
|
169
272
|
marginTop: "$4",
|
|
170
273
|
...props
|
|
171
274
|
}),
|
|
172
|
-
p: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
173
|
-
render: "p",
|
|
174
|
-
display: "block",
|
|
175
|
-
size: "$6",
|
|
176
|
-
marginVertical: "$2",
|
|
275
|
+
p: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxP, {
|
|
177
276
|
...props
|
|
178
277
|
}),
|
|
179
|
-
a: ({
|
|
180
|
-
href = "",
|
|
181
|
-
children,
|
|
278
|
+
a: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxAnchor, {
|
|
182
279
|
...props
|
|
183
|
-
})
|
|
184
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_router.Link, {
|
|
185
|
-
href,
|
|
186
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.Paragraph, {
|
|
187
|
-
render: "span",
|
|
188
|
-
fontSize: "inherit",
|
|
189
|
-
display: "inline",
|
|
190
|
-
cursor: "pointer",
|
|
191
|
-
focusVisibleStyle: {
|
|
192
|
-
outlineColor: "$outlineColor",
|
|
193
|
-
outlineWidth: 2,
|
|
194
|
-
outlineStyle: "solid",
|
|
195
|
-
outlineOffset: 2
|
|
196
|
-
},
|
|
197
|
-
...props,
|
|
198
|
-
children: [children, typeof href === "string" && href.startsWith("http") ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
199
|
-
children: ["\xA0", /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Text, {
|
|
200
|
-
fontSize: "inherit",
|
|
201
|
-
display: "inline-flex",
|
|
202
|
-
y: 2,
|
|
203
|
-
style: {
|
|
204
|
-
marginLeft: -1
|
|
205
|
-
},
|
|
206
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_ExternalIcon.ExternalIcon, {})
|
|
207
|
-
})]
|
|
208
|
-
}) : null]
|
|
209
|
-
})
|
|
210
|
-
});
|
|
211
|
-
},
|
|
280
|
+
}),
|
|
212
281
|
hr: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Hr.HR, {
|
|
213
282
|
...props
|
|
214
283
|
}),
|
|
215
284
|
ul: ({
|
|
216
285
|
children
|
|
217
|
-
}) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
children: import_react.Children.toArray(children).map(x => typeof x === "string" ? null : x)
|
|
286
|
+
}) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxList, {
|
|
287
|
+
ordered: false,
|
|
288
|
+
children
|
|
221
289
|
}),
|
|
222
|
-
ol:
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
290
|
+
ol: ({
|
|
291
|
+
children,
|
|
292
|
+
start
|
|
293
|
+
}) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxList, {
|
|
294
|
+
ordered: true,
|
|
295
|
+
start: typeof start === "number" ? start : Number(start) || void 0,
|
|
296
|
+
children
|
|
226
297
|
}),
|
|
227
|
-
li: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
228
|
-
render: "li",
|
|
229
|
-
size: "$6",
|
|
230
|
-
marginBottom: "$1.5",
|
|
231
|
-
style: {
|
|
232
|
-
listStyleType: "disc"
|
|
233
|
-
},
|
|
298
|
+
li: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_List.MarkdownListItem, {
|
|
234
299
|
children: props.children
|
|
235
300
|
}),
|
|
236
|
-
strong: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
237
|
-
|
|
238
|
-
fontSize: "inherit",
|
|
239
|
-
...props,
|
|
240
|
-
fontWeight: "700"
|
|
301
|
+
strong: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(MdxStrong, {
|
|
302
|
+
...props
|
|
241
303
|
}),
|
|
242
304
|
em: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, {
|
|
243
305
|
render: "em",
|
|
@@ -252,14 +314,18 @@ const mdxComponents = {
|
|
|
252
314
|
textDecorationLine: "line-through"
|
|
253
315
|
}),
|
|
254
316
|
img: ({
|
|
317
|
+
src,
|
|
318
|
+
alt,
|
|
319
|
+
title,
|
|
255
320
|
...props
|
|
256
321
|
}) => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
|
|
257
322
|
render: "span",
|
|
258
323
|
marginVertical: "$6",
|
|
259
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
324
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_Image.MarkdownImage, {
|
|
325
|
+
src,
|
|
326
|
+
alt,
|
|
327
|
+
title,
|
|
328
|
+
...props
|
|
263
329
|
})
|
|
264
330
|
}),
|
|
265
331
|
pre: ({
|
|
@@ -296,6 +362,7 @@ const LinkHeading = ({
|
|
|
296
362
|
const {
|
|
297
363
|
knobProps
|
|
298
364
|
} = (0, import_theme.useResolvedKnobs)();
|
|
365
|
+
const iconPx = (0, import_tokenPx.tokenPx)(knobProps.label.fontSize, 12, "fontSize");
|
|
299
366
|
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_tamagui.XStack, {
|
|
300
367
|
render: "a",
|
|
301
368
|
"data-heading": true,
|
|
@@ -310,7 +377,7 @@ const LinkHeading = ({
|
|
|
310
377
|
render: "span",
|
|
311
378
|
opacity: 0.3,
|
|
312
379
|
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_icons.LinkIcon, {
|
|
313
|
-
size:
|
|
380
|
+
size: iconPx
|
|
314
381
|
})
|
|
315
382
|
})]
|
|
316
383
|
});
|